1function DTe(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var FTe={env:"production",apiUrl:"https://api.kanbu.ai/v1",coreAiUrl:"https://ai-core.kanbu.ai/v1",voiceApiUrl:"https://voice-api.kanbu.ai/v1",playgroundUrl:"https://playground.kanbu.ai",postHog:{apiKey:"phc_5z0ZURwQK5ZlV9gqiaCryJpJHpxl1UeRwpGwehAA7qW",host:"https://eu.i.posthog.com"},gtm:{id:"GTM-T8D86T65"},version:"0.46.2"};const PW=FTe,os={...PW,debug:document.cookie.includes("debug=true")||PW.debug};(function(e,t,n,r,i){e[r]=e[r]||[],e[r].push({"gtm.start":new Date().getTime(),event:"gtm.js"});var s=t.getElementsByTagName(n)[0],a=t.createElement(n),o="";a.async=!0,a.src="https://www.googletagmanager.com/gtm.js?id="+i+o,s.parentNode.insertBefore(a,s)})(window,document,"script","dataLayer",os?.gtm?.id??"");var hr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $c(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var sO={exports:{}},l_={};/** 2 * @license React 3 * react-jsx-runtime.production.js 4 * 5 * Copyright (c) Meta Platforms, Inc. and affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var MW;function LTe(){if(MW)return l_;MW=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,s){var a=null;if(s!==void 0&&(a=""+s),i.key!==void 0&&(a=""+i.key),"key"in i){s={};for(var o in i)o!=="key"&&(s[o]=i[o])}else s=i;return i=s.ref,{$$typeof:e,type:r,key:a,ref:i!==void 0?i:null,props:s}}return l_.Fragment=t,l_.jsx=n,l_.jsxs=n,l_}var DW;function zTe(){return DW||(DW=1,sO.exports=LTe()),sO.exports}var l=zTe(),aO,FW;function $Te(){if(FW)return aO;FW=1;var e="Expected a function",t="__lodash_hash_undefined__",n="[object Function]",r="[object GeneratorFunction]",i="[object Symbol]",s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/,o=/^\./,c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/[\\^$.*+?()[\]{}|]/g,d=/\\(\\)?/g,h=/^\[object .+?Constructor\]$/,p=typeof hr=="object"&&hr&&hr.Object===Object&&hr,g=typeof self=="object"&&self&&self.Object===Object&&self,v=p||g||Function("return this")();function x(Ie,dt){return Ie?.[dt]}function _(Ie){var dt=!1;if(Ie!=null&&typeof Ie.toString!="function")try{dt=!!(Ie+"")}catch{}return dt}var w=Array.prototype,S=Function.prototype,E=Object.prototype,T=v["__core-js_shared__"],N=(function(){var Ie=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||"");return Ie?"Symbol(src)_1."+Ie:""})(),A=S.toString,k=E.hasOwnProperty,j=E.toString,R=RegExp("^"+A.call(k).replace(u,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=v.Symbol,V=w.splice,U=ie(v,"Map"),G=ie(Object,"create"),Q=P?P.prototype:void 0,Z=Q?Q.toString:void 0;function K(Ie){var dt=-1,$t=Ie?Ie.length:0;for(this.clear();++dt<$t;){var Mn=Ie[dt];this.set(Mn[0],Mn[1])}}function te(){this.__data__=G?G(null):{}}function ne(Ie){return this.has(Ie)&&delete this.__data__[Ie]}function se(Ie){var dt=this.__data__;if(G){var $t=dt[Ie];return $t===t?void 0:$t}return k.call(dt,Ie)?dt[Ie]:void 0}function H(Ie){var dt=this.__data__;
9return G?dt[Ie]!==void 0:k.call(dt,Ie)}function O(Ie,dt){var $t=this.__data__;return $t[Ie]=G&&dt===void 0?t:dt,this}K.prototype.clear=te,K.prototype.delete=ne,K.prototype.get=se,K.prototype.has=H,K.prototype.set=O;function L(Ie){var dt=-1,$t=Ie?Ie.length:0;for(this.clear();++dt<$t;){var Mn=Ie[dt];this.set(Mn[0],Mn[1])}}function M(){this.__data__=[]}function q(Ie){var dt=this.__data__,$t=ke(dt,Ie);if($t<0)return!1;var Mn=dt.length-1;return $t==Mn?dt.pop():V.call(dt,$t,1),!0}function X(Ie){var dt=this.__data__,$t=ke(dt,Ie);return $t<0?void 0:dt[$t][1]}function J(Ie){return ke(this.__data__,Ie)>-1}function W(Ie,dt){var $t=this.__data__,Mn=ke($t,Ie);return Mn<0?$t.push([Ie,dt]):$t[Mn][1]=dt,this}L.prototype.clear=M,L.prototype.delete=q,L.prototype.get=X,L.prototype.has=J,L.prototype.set=W;function re(Ie){var dt=-1,$t=Ie?Ie.length:0;for(this.clear();++dt<$t;){var Mn=Ie[dt];this.set(Mn[0],Mn[1])}}function ae(){this.__data__={hash:new K,map:new(U||L),string:new K}}function ce(Ie){return pt(this,Ie).delete(Ie)}function Te(Ie){return pt(this,Ie).get(Ie)}function fe(Ie){return pt(this,Ie).has(Ie)}function xe(Ie,dt){return pt(this,Ie).set(Ie,dt),this}re.prototype.clear=ae,re.prototype.delete=ce,re.prototype.get=Te,re.prototype.has=fe,re.prototype.set=xe;function ke(Ie,dt){for(var $t=Ie.length;$t--;)if(oe(Ie[$t][0],dt))return $t;return-1}function Fe(Ie,dt){dt=ue(dt,Ie)?[dt]:et(dt);for(var $t=0,Mn=dt.length;Ie!=null&&$t<Mn;)Ie=Ie[me(dt[$t++])];return $t&&$t==Mn?Ie:void 0}function tt(Ie){if(!Ht(Ie)||De(Ie))return!1;var dt=Ut(Ie)||_(Ie)?R:h;return dt.test(we(Ie))}function Se(Ie){if(typeof Ie=="string")return Ie;if(Ct(Ie))return Z?Z.call(Ie):"";var dt=Ie+"";return dt=="0"&&1/Ie==-1/0?"-0":dt}function et(Ie){return St(Ie)?Ie:be(Ie)}function pt(Ie,dt){var $t=Ie.__data__;return Ne(dt)?$t[typeof dt=="string"?"string":"hash"]:$t.map}function ie(Ie,dt){var $t=x(Ie,dt);return tt($t)?$t:void 0}function ue(Ie,dt){if(St(Ie))return!1;var $t=typeof Ie;return $t=="number"||$t=="symbol"||$t=="boolean"||Ie==null||Ct(Ie)?!0:a.test(Ie)||!s.test(Ie)||dt!=null&&Ie in Object(dt)}function Ne(Ie){var dt=typeof Ie;return dt=="string"||dt=="number"||dt=="symbol"||dt=="boolean"?Ie!=="__proto__":Ie===null}function De(Ie){return!!N&&N in Ie}var be=Le(function(Ie){Ie=Wt(Ie);var dt=[];return o.test(Ie)&&dt.push(""),Ie.replace(c,function($t,Mn,Ve,ct){dt.push(Ve?ct.replace(d,"$1"):Mn||$t)}),dt});function me(Ie){if(typeof Ie=="string"||Ct(Ie))return Ie;var dt=Ie+"";return dt=="0"&&1/Ie==-1/0?"-0":dt}function we(Ie){if(Ie!=null){try{return A.call(Ie)}catch{}try{return Ie+""}catch{}}return""}function Le(Ie,dt){if(typeof Ie!="function"||dt&&typeof dt!="function")throw new TypeError(e);var $t=function(){var Mn=arguments,Ve=dt?dt.apply(this,Mn):Mn[0],ct=$t.cache;if(ct.has(Ve))return ct.get(Ve);var Gt=Ie.apply(this,Mn);return $t.cache=ct.set(Ve,Gt),Gt};return $t.cache=new(Le.Cache||re),$t}Le.Cache=re;function oe(Ie,dt){return Ie===dt||Ie!==Ie&&dt!==dt}var St=Array.isArray;function Ut(Ie){var dt=Ht(Ie)?j.call(Ie):"";return dt==n||dt==r}function Ht(Ie){var dt=typeof Ie;return!!Ie&&(dt=="object"||dt=="function")}function Rt(Ie){return!!Ie&&typeof Ie=="object"}function Ct(Ie){return typeof Ie=="symbol"||Rt(Ie)&&j.call(Ie)==i}function Wt(Ie){return Ie==null?"":Se(Ie)}function Tn(Ie,dt,$t){var Mn=Ie==null?void 0:Fe(Ie,dt);return Mn===void 0?$t:Mn}return aO=Tn,aO}var BTe=$Te();const v2=$c(BTe),r9="-",UTe=e=>{const t=HTe(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const o=a.split(r9);return o[0]===""&&o.length!==1&&o.shift(),Cie(o,t)||VTe(a)},getConflictingClassGroupIds:(a,o)=>{const c=n[a]||[];return o&&r[a]?[...c,...r[a]]:c}}},Cie=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?Cie(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(r9);return t.validators.find(({validator:a})=>a(s))?.classGroupId},LW=/^\[(.+)\]$/,VTe=e=>{if(LW.test(e)){const t=LW.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},HTe=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const i in n)ID(n[i],r,i,t);return r},ID=(e,t,n,r)=>{e.forEach(i=>
vendor: 6,727 bytes, line 9
9{if(typeof i=="string"){const s=i===""?t:zW(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(qTe(i)){ID(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,a])=>{ID(a,zW(t,s),n,r)})})},zW=(e,t)=>{let n=e;return t.split(r9).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},qTe=e=>e.isThemeGetter,WTe=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,a)=>{n.set(s,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let a=n.get(s);if(a!==void 0)return a;if((a=r.get(s))!==void 0)return i(s,a),a},set(s,a){n.has(s)?n.set(s,a):i(s,a)}}},OD="!",PD=":",GTe=PD.length,KTe=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const s=[];let a=0,o=0,c=0,u;for(let v=0;v<i.length;v++){let x=i[v];if(a===0&&o===0){if(x===PD){s.push(i.slice(c,v)),c=v+GTe;continue}if(x==="/"){u=v;continue}}x==="["?a++:x==="]"?a--:x==="("?o++:x===")"&&o--}const d=s.length===0?i:i.substring(c),h=YTe(d),p=h!==d,g=u&&u>c?u-c:void 0;return{modifiers:s,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:g}};if(t){const i=t+PD,s=r;r=a=>a.startsWith(i)?s(a.substring(i.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(n){const i=r;r=s=>n({className:s,parseClassName:i})}return r},YTe=e=>e.endsWith(OD)?e.substring(0,e.length-1):e.startsWith(OD)?e.substring(1):e,XTe=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const i=[];let s=[];return r.forEach(a=>{a[0]==="["||t[a]?(i.push(...s.sort(),a),s=[]):s.push(a)}),i.push(...s.sort()),i}},QTe=e=>({cache:WTe(e.cacheSize),parseClassName:KTe(e),sortModifiers:XTe(e),...UTe(e)}),ZTe=/\s+/,JTe=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:s}=t,a=[],o=e.trim().split(ZTe);let c="";for(let u=o.length-1;u>=0;u-=1){const d=o[u],{isExternal:h,modifiers:p,hasImportantModifier:g,baseClassName:v,maybePostfixModifierPosition:x}=n(d);if(h){c=d+(c.length>0?" "+c:c);continue}let _=!!x,w=r(_?v.substring(0,x):v);if(!w){if(!_){c=d+(c.length>0?" "+c:c);continue}if(w=r(v),!w){c=d+(c.length>0?" "+c:c);continue}_=!1}const S=s(p).join(":"),E=g?S+OD:S,T=E+w;if(a.includes(T))continue;a.push(T);const N=i(w,_);for(let A=0;A<N.length;++A){const k=N[A];a.push(E+k)}c=d+(c.length>0?" "+c:c)}return c};function eAe(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Tie(t))&&(r&&(r+=" "),r+=n);return r}const Tie=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Tie(e[r]))&&(n&&(n+=" "),n+=t);return n};function tAe(e,...t){let n,r,i,s=a;function a(c){const u=t.reduce((d,h)=>h(d),e());return n=QTe(u),r=n.cache.get,i=n.cache.set,s=o,o(c)}function o(c){const u=r(c);if(u)return u;const d=JTe(c,n);return i(c,d),d}return function(){return s(eAe.apply(null,arguments))}}const ca=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Aie=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,kie=/^\((?:(\w[\w-]*):)?(.+)\)$/i,nAe=/^\d+\/\d+$/,rAe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,iAe=/\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$/,sAe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,aAe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,oAe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,mv=e=>nAe.test(e),cr=e=>!!e&&!Number.isNaN(Number(e)),_p=e=>!!e&&Number.isInteger(Number(e)),oO=e=>e.endsWith("%")&&cr(e.slice(0,-1)),Cf=e=>rAe.test(e),lAe=()=>!0,cAe=e=>iAe.test(e)&&!sAe.test(e),Nie=()=>!1,uAe=e=>aAe.test(e),dAe=e=>oAe.test(e),fAe=e=>!pn(e)&&!mn(e),hAe=e=>Ay(e,Iie,Nie),pn=e=>Aie.test(e),vg=e=>Ay(e,Oie,cAe),lO=e=>Ay(e,vAe,cr),$W=e=>Ay(e,jie,Nie),pAe=e=>Ay(e,Rie,dAe),AT=e=>Ay(e,Pie,uAe),mn=e=>kie.test(e),c_=e=>ky(e,Oie),mAe=e=>ky(e,yAe),BW=e=>ky(e,jie),gAe=e=>ky(e,Iie),xAe=e=>ky(e,Rie),kT=e=>ky(e,Pie,!0),Ay=(e,t,n)=>{const r=Aie.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ky=(e,t,n=!1)=>{const r=kie.exec(e);return r?r[1]?t(r[1]):n:!1},jie=e=>e==="position"||e==="percentage",Rie=e=>e==="image"||e==="url",Iie=e=>e==="length"||e==="size"||e==="bg-size",Oie=e=>e==="length",vAe=e=>e==="number",yAe=e=>e==="family-name",Pie=e=>e==="shadow",bAe=()=>{const e=ca("color"),t=ca("font"),n=ca("text"),r=ca("font-weight"),i=ca("tracking"),s=ca("leading"),a=ca("breakpoint"),o=ca("container"),c=ca("spacing"),u=ca("radius"),d=ca("shadow"),h=ca("inset-shadow"),p=ca("text-shadow"),g=ca("drop-shadow"),v=ca("blur"),x=ca("perspective"),_=ca("aspect"),w=ca("ease"),S=ca("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],N=()=>[...T(),mn,pn],A=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],j=()=>[mn,pn,c],R=()=>[mv,"full","auto",...j()],P=()=>[_p,"none","subgrid",mn,pn],V=()=>["auto",{span:["full",_p,mn,pn]},_p,mn,pn],U=()=>[_p,"auto",mn,pn],G=()=>["auto","min","max","fr",mn,pn],Q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Z=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...j()],te=()=>[mv,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],ne=()=>[e,mn,pn],se=()=>[...T(),BW,$W,{position:[mn,pn]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],O=()=>["auto","cover","contain",gAe,hAe,{size:[mn,pn]}],L=()=>[oO,c_,vg],M=()=>["","none","full",u,mn,pn],q=()=>["",cr,c_,vg],X=()=>["solid","dashed","dotted","double"],J=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],W=()=>[cr,oO,BW,$W],re=()=>["","none",v,mn,pn],ae=()=>["none",cr,mn,pn],ce=()=>["none",cr,mn,pn],Te=()=>[cr,mn,pn],fe=()=>[mv,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Cf],breakpoint:[Cf],color:[lAe],container:[Cf],"drop-shadow":[Cf],ease:["in","out","in-out"],font:[fAe],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Cf],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Cf],shadow:[Cf],spacing:["px",cr],text:[Cf],"text-shadow":[Cf],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",mv,pn,mn,_]}
vendor: 10,774 bytes, line 9
9],container:["container"],columns:[{columns:[cr,pn,mn,o]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"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:N()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:R()}],"inset-x":[{"inset-x":R()}],"inset-y":[{"inset-y":R()}],start:[{start:R()}],end:[{end:R()}],top:[{top:R()}],right:[{right:R()}],bottom:[{bottom:R()}],left:[{left:R()}],visibility:["visible","invisible","collapse"],z:[{z:[_p,"auto",mn,pn]}],basis:[{basis:[mv,"full","auto",o,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[cr,mv,"auto","initial","none",pn]}],grow:[{grow:["",cr,mn,pn]}],shrink:[{shrink:["",cr,mn,pn]}],order:[{order:[_p,"first","last","none",mn,pn]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:V()}],"col-start":[{"col-start":U()}],"col-end":[{"col-end":U()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:V()}],"row-start":[{"row-start":U()}],"row-end":[{"row-end":U()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":G()}],"auto-rows":[{"auto-rows":G()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...Q(),"normal"]}],"justify-items":[{"justify-items":[...Z(),"normal"]}],"justify-self":[{"justify-self":["auto",...Z()]}],"align-content":[{content:["normal",...Q()]}],"align-items":[{items:[...Z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Z(),{baseline:["","last"]}]}],"place-content":[{"place-content":Q()}],"place-items":[{"place-items":[...Z(),"baseline"]}],"place-self":[{"place-self":["auto",...Z()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],m:[{m:K()}],mx:[{mx:K()}],my:[{my:K()}],ms:[{ms:K()}],me:[{me:K()}],mt:[{mt:K()}],mr:[{mr:K()}],mb:[{mb:K()}],ml:[{ml:K()}],"space-x":[{"space-x":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:te()}],w:[{w:[o,"screen",...te()]}],"min-w":[{"min-w":[o,"screen","none",...te()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[a]},...te()]}],h:[{h:["screen","lh",...te()]}],"min-h":[{"min-h":["screen","lh","none",...te()]}],"max-h":[{"max-h":["screen","lh",...te()]}],"font-size":[{text:["base",n,c_,vg]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,mn,lO]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",oO,pn]}],"font-family":[{font:[mAe,pn,t]}],"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:[i,mn,pn]}],"line-clamp":[{"line-clamp":[cr,"none",mn,lO]}],leading:[{leading:[s,...j()]}],"list-image":[{"list-image":["none",mn,pn]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",mn,pn]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:ne()}],"text-color":[{text:ne()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...X(),"wavy"]}],"text-decoration-thickness":[{decoration:[cr,"from-font","auto",mn,vg]}],"text-decoration-color":[{decoration:ne()}],"underline-offset":[{"underline-offset":[cr,"auto",mn,pn]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",mn,pn]}],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",mn,pn]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:se()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:O()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},_p,mn,pn],radial:["",mn,pn],conic:[_p,mn,pn]},xAe,pAe]}],"bg-color":[{bg:ne()}],"gradient-from-pos":[{from:L()}],"gradient-via-pos":[{via:L()}],"gradient-to-pos":[{to:L()}],"gradient-from":[{from:ne()}],"gradient-via":[{via:ne()}],"gradient-to":[{to:ne()}],rounded:[{rounded:M()}],"rounded-s":[{"rounded-s":M()}],"rounded-e":[{"rounded-e":M()}],"rounded-t":[{"rounded-t":M()}],"rounded-r":[{"rounded-r":M()}],"rounded-b":[{"rounded-b":M()}],"rounded-l":[{"rounded-l":M()}],"rounded-ss":[{"rounded-ss":M()}],"rounded-se":[{"rounded-se":M()}],"rounded-ee":[{"rounded-ee":M()}],"rounded-es":[{"rounded-es":M()}],"rounded-tl":[{"rounded-tl":M()}],"rounded-tr":[{"rounded-tr":M()}],"rounded-br":[{"rounded-br":M()}],"rounded-bl":[{"rounded-bl":M()}],"border-w":[{border:q()}],"border-w-x":[{"border-x":q()}],"border-w-y":[{"border-y":q()}],"border-w-s":[{"border-s":q()}],"border-w-e":[{"border-e":q()}],"border-w-t":[{"border-t":q()}],"border-w-r":[{"border-r":q()}],"border-w-b":[{"border-b":q()}],"border-w-l":[{"border-l":q()}],"divide-x":[{"divide-x":q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...X(),"hidden","none"]}],"divide-style":[{divide:[...X(),"hidden","none"]}],"border-color":[{border:ne()}],"border-color-x":[{"border-x":ne()}],"border-color-y":[{"border-y":ne()}],"border-color-s":[{"border-s":ne()}],"border-color-e":[{"border-e":ne()}],"border-color-t":[{"border-t":ne()}],"border-color-r":[{"border-r":ne()}],"border-color-b":[{"border-b":ne()}],"border-color-l":[{"border-l":ne()}],"divide-color":[{divide:ne()}],"outline-style":[{outline:[...X(),"none","hidden"]}],"outline-offset":[{"outline-offset":[cr,mn,pn]}],"outline-w":[{outline:["",cr,c_,vg]}],"outline-color":[{outline:ne()}],shadow:[{shadow:["","none",d,kT,AT]}],"shadow-color":[{shadow:ne()}],"inset-shadow":[{"inset-shadow":["none",h,kT,AT]}],"inset-shadow-color":[{"inset-shadow":ne()}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:ne()}],"ring-offset-w":[{"ring-offset":[cr,vg]}],"ring-offset-color":[{"ring-offset":ne()}],"inset-ring-w":[{"inset-ring":q()}],"inset-ring-color":[{"inset-ring":ne()}],"text-shadow":[{"text-shadow":["none",p,kT,AT]}],"text-shadow-color":[{"text-shadow":ne()}],opacity:[{opacity:[cr,mn,pn]}],"mix-blend":[{"mix-blend":[...J(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":J()}],"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":[cr]}],"mask-image-linear-from-pos":[{"mask-linear-from":W()}],"mask-image-linear-to-pos":[{"mask-linear-to":W()}],"mask-image-linear-from-color":[{"mask-linear-from":ne()}],"mask-image-linear-to-color":[{"mask-linear-to":ne()}],"mask-image-t-from-pos":[{"mask-t-from":W()}],"mask-image-t-to-pos":[{"mask-t-to":W()}],"mask-image-t-from-color":[{"mask-t-from":ne()}],"mask-image-t-to-color":[{"mask-t-to":ne()}],"mask-image-r-from-pos":[{"mask-r-from":W()}],"mask-image-r-to-pos":[{"mask-r-to":W()}],"mask-image-r-from-color":[{"mask-r-from":ne()}],"mask-image-r-to-color":[{"mask-r-to":ne()}],"mask-image-b-from-pos":[{"mask-b-from":W()}],"mask-image-b-to-pos":[{"mask-b-to":W()}],"mask-image-b-from-color":[{"mask-b-from":ne()}],"mask-image-b-to-color":[{"mask-b-to":ne()}],"mask-image-l-from-pos":[{"mask-l-from":W()}],"mask-image-l-to-pos":[{"mask-l-to":W()}],"mask-image-l-from-color":[{"mask-l-from":ne()}],"mask-image-l-to-color":[{"mask-l-to":ne()}],"mask-image-x-from-pos":[{"mask-x-from":W()}],"mask-image-x-to-pos":[{"mask-x-to":W()}],"mask-image-x-from-color":[{"mask-x-from":ne()}],"mask-image-x-to-color":[{"mask-x-to":ne()}],"mask-image-y-from-pos":[{"mask-y-from":W()}],"mask-image-y-to-pos":[{"mask-y-to":W()}],"mask-image-y-from-color":[{"mask-y-from":ne()}],"mask-image-y-to-color":[{"mask-y-to":ne()}],"mask-image-radial":[{"mask-radial":[mn,pn]}],"mask-image-radial-from-pos":[{"mask-radial-from":W()}],"mask-image-radial-to-pos":[{"mask-radial-to":W()}],"mask-image-radial-from-color":[{"mask-radial-from":ne()}],"mask-image-radial-to-color":[{"mask-radial-to":ne()}],"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":T()}],"mask-image-conic-pos":[{"mask-conic":[cr]}],"mask-image-conic-from-pos":[{"mask-conic-from":W()}],"mask-image-conic-to-pos":[{"mask-conic-to":W()}],"mask-image-conic-from-color":[{"mask-conic-from":ne()}],"mask-image-conic-to-color":[{"mask-conic-to":ne()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:se()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:O()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",mn,pn]}],filter:[{filter:["","none",mn,pn]}],blur:[{blur:re()}],brightness:[{brightness:[cr,mn,pn]}],contrast:[{contrast:[cr,mn,pn]}],"drop-shadow":[{"drop-shadow":["","none",g,kT,AT]}],"drop-shadow-color":[{"drop-shadow":ne()}],grayscale:[{grayscale:["",cr,mn,pn]}
9],"hue-rotate":[{"hue-rotate":[cr,mn,pn]}],invert:[{invert:["",cr,mn,pn]}],saturate:[{saturate:[cr,mn,pn]}],sepia:[{sepia:["",cr,mn,pn]}],"backdrop-filter":[{"backdrop-filter":["","none",mn,pn]}],"backdrop-blur":[{"backdrop-blur":re()}],"backdrop-brightness":[{"backdrop-brightness":[cr,mn,pn]}],"backdrop-contrast":[{"backdrop-contrast":[cr,mn,pn]}],"backdrop-grayscale":[{"backdrop-grayscale":["",cr,mn,pn]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[cr,mn,pn]}],"backdrop-invert":[{"backdrop-invert":["",cr,mn,pn]}],"backdrop-opacity":[{"backdrop-opacity":[cr,mn,pn]}],"backdrop-saturate":[{"backdrop-saturate":[cr,mn,pn]}],"backdrop-sepia":[{"backdrop-sepia":["",cr,mn,pn]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",mn,pn]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[cr,"initial",mn,pn]}],ease:[{ease:["linear","initial",w,mn,pn]}],delay:[{delay:[cr,mn,pn]}],animate:[{animate:["none",S,mn,pn]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,mn,pn]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:ae()}],"rotate-x":[{"rotate-x":ae()}],"rotate-y":[{"rotate-y":ae()}],"rotate-z":[{"rotate-z":ae()}],scale:[{scale:ce()}],"scale-x":[{"scale-x":ce()}],"scale-y":[{"scale-y":ce()}],"scale-z":[{"scale-z":ce()}],"scale-3d":["scale-3d"],skew:[{skew:Te()}],"skew-x":[{"skew-x":Te()}],"skew-y":[{"skew-y":Te()}],transform:[{transform:[mn,pn,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:fe()}],"translate-x":[{"translate-x":fe()}],"translate-y":[{"translate-y":fe()}],"translate-z":[{"translate-z":fe()}],"translate-none":["translate-none"],accent:[{accent:ne()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:ne()}],"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",mn,pn]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"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",mn,pn]}],fill:[{fill:["none",...ne()]}],"stroke-w":[{stroke:[cr,c_,vg,lO]}],stroke:[{stroke:["none",...ne()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],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-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},i9=tAe(bAe);let Mie;function Die(e){Mie=e}Die({});function qi(e,t,n=[]){for(const r in e){const i=e[r];if(typeof i=="object"){qi(i,t,[...n,r]);continue}if(typeof i=="string"){const s=v2(Mie,t);e[r]=i9(i,v2(s,[...n,r].join(".")))}}return e}Die({toast:{toast:"[&>[data-icon]]:mt-0.5",error:"[&_[data-description]]:text-foreground",success:"[&_[data-description]]:text-foreground"}});const $p=e=>typeof e=="string",_Ae=e=>typeof e=="function",UW=new Map,Fie="en";function s9(e){return[...Array.isArray(e)?e:[e],Fie]}function a9(e,t,n){const r=s9(e);n||(n="default");let i;if(typeof n=="string")switch(i={day:"numeric",month:"short",year:"numeric"},n){case"full":i.weekday="long";case"long":i.month="long";break;case"short":i.month="numeric";break}else i=n;return Yk(()=>
9Xk("date",r,n),()=>new Intl.DateTimeFormat(r,i)).format($p(t)?new Date(t):t)}function wAe(e,t,n){let r;if(n||(n="default"),typeof n=="string")switch(r={second:"numeric",minute:"numeric",hour:"numeric"},n){case"full":case"long":r.timeZoneName="short";break;case"short":delete r.second}else r=n;return a9(e,t,r)}function MD(e,t,n){const r=s9(e);return Yk(()=>Xk("number",r,n),()=>new Intl.NumberFormat(r,n)).format(t)}function VW(e,t,n,{offset:r=0,...i}){const s=s9(e),a=t?Yk(()=>Xk("plural-ordinal",s),()=>new Intl.PluralRules(s,{type:"ordinal"})):Yk(()=>Xk("plural-cardinal",s),()=>new Intl.PluralRules(s,{type:"cardinal"}));return i[n]??i[a.select(n-r)]??i.other}function Yk(e,t){const n=e();let r=UW.get(n);return r||(r=t(),UW.set(n,r)),r}function Xk(e,t,n){const r=t.join("-");return`${e}-${r}-${JSON.stringify(n)}`}const Lie=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,zie=e=>e.replace(/\\u([a-fA-F0-9]{4})|\\x([a-fA-F0-9]{2})/g,(t,n,r)=>{if(n){const i=parseInt(n,16);return String.fromCharCode(i)}else{const i=parseInt(r,16);return String.fromCharCode(i)}}),$ie="%__lingui_octothorpe__%",SAe=(e,t,n={})=>{const r=t||e,i=a=>typeof a=="object"?a:n[a],s=(a,o)=>{const c=Object.keys(n).length?i("number"):void 0,u=MD(r,a,c);return o.replace(new RegExp($ie,"g"),u)};return{plural:(a,o)=>{const{offset:c=0}=o,u=VW(r,!1,a,o);return s(a-c,u)},selectordinal:(a,o)=>{const{offset:c=0}=o,u=VW(r,!0,a,o);return s(a-c,u)},select:EAe,number:(a,o)=>MD(r,a,i(o)||{style:o}),date:(a,o)=>a9(r,a,i(o)||o),time:(a,o)=>wAe(r,a,i(o)||o)}},EAe=(e,t)=>t[e]??t.other;function CAe(e,t,n){return(r={},i)=>{const s=SAe(t,n,i),a=(c,u=!1)=>Array.isArray(c)?c.reduce((d,h)=>{if(h==="#"&&u)return d+$ie;if($p(h))return d+h;const[p,g,v]=h;let x={};g==="plural"||g==="selectordinal"||g==="select"?Object.entries(v).forEach(([w,S])=>{x[w]=a(S,g==="plural"||g==="selectordinal")}):x=v;let _;if(g){const w=s[g];_=w(r[p],x)}else _=r[p];return _==null?d:d+_},""):c,o=a(e);return $p(o)&&Lie.test(o)?zie(o):$p(o)?o:o?String(o):""}}var TAe=Object.defineProperty,AAe=(e,t,n)=>t in e?TAe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kAe=(e,t,n)=>(AAe(e,t+"",n),n);class NAe{constructor(){kAe(this,"_events",{})}on(t,n){var r;return(r=this._events)[t]??(r[t]=[]),this._events[t].push(n),()=>this.removeListener(t,n)}removeListener(t,n){const r=this._getListeners(t);if(!r)return;const i=r.indexOf(n);~i&&r.splice(i,1)}emit(t,...n){const r=this._getListeners(t);r&&r.map(i=>i.apply(this,n))}_getListeners(t){const n=this._events[t];return Array.isArray(n)?n:!1}}var jAe=Object.defineProperty,RAe=(e,t,n)=>t in e?jAe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yg=(e,t,n)=>(RAe(e,typeof t!="symbol"?t+"":t,n),n);class IAe extends NAe{constructor(t){super(),yg(this,"_locale",""),yg(this,"_locales"),yg(this,"_localeData",{}),yg(this,"_messages",{}),yg(this,"_missing"),yg(this,"_messageCompiler"),yg(this,"t",this._.bind(this)),t.missing!=null&&(this._missing=t.missing),t.messages!=null&&this.load(t.messages),t.localeData!=null&&this.loadLocaleData(t.localeData),(typeof t.locale=="string"||t.locales)&&this.activate(t.locale??Fie,t.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){return this._messages[this._locale]??{}}get localeData(){return this._localeData[this._locale]??{}}_loadLocaleData(t,n){const r=this._localeData[t];r?Object.assign(r,n):this._localeData[t]=n}setMessagesCompiler(t){return this._messageCompiler=t,this}loadLocaleData(t,n){typeof t=="string"?this._loadLocaleData(t,n):Object.keys(t).forEach(r=>this._loadLocaleData(r,t[r])),this.emit("change")}_load(t,n){const r=this._messages[t];r?Object.assign(r,n):this._messages[t]=n}load(t,n){typeof t=="string"&&typeof n=="object"?this._load(t,n):Object.entries(t).forEach(([r,i])=>this._load(r,i)),this.emit("change")}loadAndActivate({locale:t,locales:n,messages:r}){this._locale=t,this._locales=n||void 0,this._messages[this._locale]=r,this.emit("change")}activate(t,n){this._locale=t,this._locales=n,this.emit("change")}_(t,n,r){if(!this.locale)throw new Error("Lingui: Attempted to call a translation function without setting a locale.\nMake sure to call `i18n.activate(locale)` before using Lingui functions.\nThis issue may al
9so occur due to a race condition in your initialization logic.");let i=r?.message;t||(t=""),$p(t)||(n=t.values||n,i=t.message,t=t.id);const s=this.messages[t],a=s===void 0,o=this._missing;if(o&&a)return _Ae(o)?o(this._locale,t):o;a&&this.emit("missing",{id:t,locale:this._locale});let c=s||i||t;return $p(c)&&(this._messageCompiler?c=this._messageCompiler(c):console.warn(`Uncompiled message detected! Message: 10 11> ${c} 12 13That means you use raw catalog or your catalog doesn't have a translation for the message and fallback was used. 14ICU features such as interpolation and plurals will not work properly for that message. 15 16Please compile your catalog first. 17`)),$p(c)&&Lie.test(c)?zie(c):$p(c)?c:CAe(c,this._locale,this._locales)(n,r?.formats)}date(t,n){return a9(this._locales||this._locale,t,n)}number(t,n){return MD(this._locales||this._locale,t,n)}}function OAe(e={}){return new IAe(e)}const Be=OAe();var cO={exports:{}},Un={};/** 18 * @license React 19 * react.production.js 20 * 21 * Copyright (c) Meta Platforms, Inc. and affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */var HW;function PAe(){if(HW)return Un;HW=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),a=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),p=Symbol.iterator;function g(O){return O===null||typeof O!="object"?null:(O=p&&O[p]||O["@@iterator"],typeof O=="function"?O:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,_={};function w(O,L,M){this.props=O,this.context=L,this.refs=_,this.updater=M||v}w.prototype.isReactComponent={},w.prototype.setState=function(O,L){if(typeof O!="object"&&typeof O!="function"&&O!=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,O,L,"setState")},w.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function S(){}S.prototype=w.prototype;function E(O,L,M){this.props=O,this.context=L,this.refs=_,this.updater=M||v}var T=E.prototype=new S;T.constructor=E,x(T,w.prototype),T.isPureReactComponent=!0;var N=Array.isArray;function A(){}var k={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function R(O,L,M){var q=M.ref;return{$$typeof:e,type:O,key:L,ref:q!==void 0?q:null,props:M}}function P(O,L){return R(O.type,L,O.props)}function V(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function U(O){var L={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(M){return L[M]})}var G=/\/+/g;function Q(O,L){return typeof O=="object"&&O!==null&&O.key!=null?U(""+O.key):L.toString(36)}function Z(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(A,A):(O.status="pending",O.then(function(L){O.status==="pending"&&(O.status="fulfilled",O.value=L)},function(L){O.status==="pending"&&(O.status="rejected",O.reason=L)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function K(O,L,M,q,X){var J=typeof O;(J==="undefined"||J==="boolean")&&(O=null);var W=!1;if(O===null)W=!0;else switch(J){case"bigint":case"string":case"number":W=!0;break;case"object":switch(O.$$typeof){case e:case t:W=!0;break;case d:return W=O._init,K(W(O._payload),L,M,q,X)}}if(W)return X=X(O),W=q===""?"."+Q(O,0):q,N(X)?(M="",W!=null&&(M=W.replace(G,"$&/")+"/"),K(X,L,M,"",function(ce){return ce})):X!=null&&(V(X)&&(X=P(X,M+(X.key==null||O&&O.key===X.key?"":(""+X.key).replace(G,"$&/")+"/")+W)),L.push(X)),1;W=0;var re=q===""?".":q+":";if(N(O))for(var ae=0;ae<O.length;ae++)q=O[ae],J=re+Q(q,ae),W+=K(q,L,M,J,X);else if(ae=g(O),typeof ae=="function")for(O=ae.call(O),ae=0;!(q=O.next()).done;)q=q.value,J=re+Q(q,ae++),W+=K(q,L,M,J,X);else if(J==="object"){if(typeof O.then=="function")return K(Z(O),L,M,q,X);throw L=String(O),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return W}
vendor: 4,288 bytes, line 25
25function te(O,L,M){if(O==null)return O;var q=[],X=0;return K(O,q,"","",function(J){return L.call(M,J,X++)}),q}function ne(O){if(O._status===-1){var L=O._result;L=L(),L.then(function(M){(O._status===0||O._status===-1)&&(O._status=1,O._result=M)},function(M){(O._status===0||O._status===-1)&&(O._status=2,O._result=M)}),O._status===-1&&(O._status=0,O._result=L)}if(O._status===1)return O._result.default;throw O._result}var se=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O),error:O});if(!window.dispatchEvent(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)},H={map:te,forEach:function(O,L,M){te(O,function(){L.apply(this,arguments)},M)},count:function(O){var L=0;return te(O,function(){L++}),L},toArray:function(O){return te(O,function(L){return L})||[]},only:function(O){if(!V(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return Un.Activity=h,Un.Children=H,Un.Component=w,Un.Fragment=n,Un.Profiler=i,Un.PureComponent=E,Un.StrictMode=r,Un.Suspense=c,Un.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=k,Un.__COMPILER_RUNTIME={__proto__:null,c:function(O){return k.H.useMemoCache(O)}},Un.cache=function(O){return function(){return O.apply(null,arguments)}},Un.cacheSignal=function(){return null},Un.cloneElement=function(O,L,M){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var q=x({},O.props),X=O.key;if(L!=null)for(J in L.key!==void 0&&(X=""+L.key),L)!j.call(L,J)||J==="key"||J==="__self"||J==="__source"||J==="ref"&&L.ref===void 0||(q[J]=L[J]);var J=arguments.length-2;if(J===1)q.children=M;else if(1<J){for(var W=Array(J),re=0;re<J;re++)W[re]=arguments[re+2];q.children=W}return R(O.type,X,q)},Un.createContext=function(O){return O={$$typeof:a,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:s,_context:O},O},Un.createElement=function(O,L,M){var q,X={},J=null;if(L!=null)for(q in L.key!==void 0&&(J=""+L.key),L)j.call(L,q)&&q!=="key"&&q!=="__self"&&q!=="__source"&&(X[q]=L[q]);var W=arguments.length-2;if(W===1)X.children=M;else if(1<W){for(var re=Array(W),ae=0;ae<W;ae++)re[ae]=arguments[ae+2];X.children=re}if(O&&O.defaultProps)for(q in W=O.defaultProps,W)X[q]===void 0&&(X[q]=W[q]);return R(O,J,X)},Un.createRef=function(){return{current:null}},Un.forwardRef=function(O){return{$$typeof:o,render:O}},Un.isValidElement=V,Un.lazy=function(O){return{$$typeof:d,_payload:{_status:-1,_result:O},_init:ne}},Un.memo=function(O,L){return{$$typeof:u,type:O,compare:L===void 0?null:L}},Un.startTransition=function(O){var L=k.T,M={};k.T=M;try{var q=O(),X=k.S;X!==null&&X(M,q),typeof q=="object"&&q!==null&&typeof q.then=="function"&&q.then(A,se)}catch(J){se(J)}finally{L!==null&&M.types!==null&&(L.types=M.types),k.T=L}},Un.unstable_useCacheRefresh=function(){return k.H.useCacheRefresh()},Un.use=function(O){return k.H.use(O)},Un.useActionState=function(O,L,M){return k.H.useActionState(O,L,M)},Un.useCallback=function(O,L){return k.H.useCallback(O,L)},Un.useContext=function(O){return k.H.useContext(O)},Un.useDebugValue=function(){},Un.useDeferredValue=function(O,L){return k.H.useDeferredValue(O,L)},Un.useEffect=function(O,L){return k.H.useEffect(O,L)},Un.useEffectEvent=function(O){return k.H.useEffectEvent(O)},Un.useId=function(){return k.H.useId()},Un.useImperativeHandle=function(O,L,M){return k.H.useImperativeHandle(O,L,M)},Un.useInsertionEffect=function(O,L){return k.H.useInsertionEffect(O,L)},Un.useLayoutEffect=function(O,L){return k.H.useLayoutEffect(O,L)},Un.useMemo=function(O,L){return k.H.useMemo(O,L)},Un.useOptimistic=function(O,L){return k.H.useOptimistic(O,L)},Un.useReducer=function(O,L,M){return k.H.useReducer(O,L,M)},Un.useRef=function(O){return k.H.useRef(O)},Un.useState=function(O){return k.H.useState(O)},Un.useSyncExternalStore=function(O,L,M){return k.H.useSyncExternalStore(O,L,M)},Un.useTransition=function(){return k.H.useTransition()},Un.version="19.2.0",Un}var qW;
25function WS(){return qW||(qW=1,cO.exports=PAe()),cO.exports}var b=WS();const Y=$c(b),pj=DTe({__proto__:null,default:Y},[b]),MAe=/<([a-zA-Z0-9]+)>([\s\S]*?)<\/\1>|<([a-zA-Z0-9]+)\/>/,DAe={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0};function Bie(e,t={}){const n=e.split(MAe);if(n.length===1)return e;const r=FAe(0,"$lingui$"),i=[],s=n.shift();s&&i.push(s);for(const[a,o,c]of Uie(n)){let u=typeof a<"u"?t[a]:void 0;(!u||DAe[u.type]&&o)&&(console.error(u?`${u.type} is a void element tag therefore it must have no children`:`Can't use element at index '${a}' as it is not declared in the original translation`),u=Y.createElement(Y.Fragment)),Array.isArray(u)&&(u=Y.createElement(Y.Fragment,{},u)),i.push(Y.cloneElement(u,{key:r()},o?Bie(o,t):u.props.children)),c&&i.push(c)}return i.length===1?i[0]:i}function Uie(e){if(!e.length)return[];const[t,n,r,i]=e.slice(0,4);return[[t||r,n||"",i]].concat(Uie(e.slice(4,e.length)))}const FAe=(e=0,t="")=>()=>`${t}_${e++}`;function LAe(e){const{render:t,component:n,id:r,message:i,formats:s,lingui:{i18n:a,defaultComponent:o}}=e,{values:c,components:u}=$Ae(e),d=a&&typeof a._=="function"?a._(r,c,{message:i,formats:s}):r,h=d?Bie(d,u):null;if(t===null||n===null)return h;const p=o||zAe,g={id:r,message:i,translation:h,children:h};if(t&&n)console.error("You can't use both `component` and `render` prop at the same time. `component` is ignored.");else if(t&&typeof t!="function")console.error(`Invalid value supplied to prop \`render\`. It must be a function, provided ${t}`);else if(n&&typeof n!="function")return console.error(`Invalid value supplied to prop \`component\`. It must be a React component, provided ${n}`),Y.createElement(p,g,h);if(typeof t=="function")return t(g);const v=n||p;return Y.createElement(v,g,h)}const zAe=({children:e})=>Y.createElement(Y.Fragment,null,e),$Ae=e=>{if(!e.values)return{values:void 0,components:e.components};const t={...e.values},n={...e.components};return Object.entries(e.values).forEach(([r,i])=>{if(typeof i=="string"||typeof i=="number")return;const s=Object.keys(n).length;n[s]=Y.createElement(Y.Fragment,null,i),t[r]=`<${s}/>`}),{values:t,components:n}},Vie=Y.createContext(null),Hie=e=>Y.useContext(Vie);function Me(){return Hie()}function BAe({i18n:e,defaultComponent:t,children:n}){const r=Y.useRef(e.locale),i=Y.useCallback(()=>({i18n:e,defaultComponent:t,_:e.t.bind(e)}),[e,t]),[s,a]=Y.useState(i());return Y.useEffect(()=>{const o=()=>{r.current=e.locale,a(i())},c=e.on("change",o);return r.current!==e.locale&&o(),c},[e,i]),r.current?Y.createElement(Vie.Provider,{value:s},n):null}function D(e){const t=Hie();return Y.createElement(LAe,{...e,lingui:t})}var at=typeof window<"u"?window:void 0,ll=typeof globalThis<"u"?globalThis:at,qie=Array.prototype,WW=qie.forEach,GW=qie.indexOf,Hl=ll?.navigator,ln=ll?.document,al=ll?.location,DD=ll?.fetch,FD=ll!=null&&ll.XMLHttpRequest&&"withCredentials"in new ll.XMLHttpRequest?ll.XMLHttpRequest:void 0,KW=ll?.AbortController,rl=Hl?.userAgent,$n=at??{},Df={DEBUG:!1,LIB_VERSION:"1.275.3"};function YW(e,t,n,r,i,s,a){try{var o=e[s](a),c=o.value}catch(u){return void n(u)}o.done?t(c):Promise.resolve(c).then(r,i)}function XW(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var s=e.apply(t,n);function a(c){YW(s,r,i,a,o,"next",c)}function o(c){YW(s,r,i,a,o,"throw",c)}a(void 0)}))}}function dn(){return dn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dn.apply(null,arguments)}function Wie(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var UAe=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"];function vr(e,t){return e.indexOf(t)!==-1}var mj=function(e){return e.trim()},LD=function(e){return e.replace(/^\$/,"")},VAe=Array.isArray,Gie=Object.prototype,Kie=Gie.hasOwnProperty,gj=Gie.toString,Mi=VAe||function(e){return gj.call(e)==="[object Array]"},Jp=e=>typeof e=="function",fo=e=>e===Object(e)&&!Mi(e),e1=e=>{if(fo(e)){for(var t in e)if(Kie.call(e,t))return!1;return!0}return!1},en=e=>e===void 0,pa=e=>gj.call(e)=="[object String]",zD=e=>pa(e)&&e.trim().length===0,Lh=e=>e===null,Qi=e=>en(e)||Lh(e),Fd=e=>gj.call(e)=="[object Number]",em=e=>gj.call(e)==="[object Boolean]",HAe=e=>e instanceof FormData,qAe=e=>vr(UAe,e);function $D(e){return e===null||typeof e!="object"}function Qk(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function Yie(e){return!en(Event)&&(function(t,n){try{return t instanceof n}catch{return!1}})(e,Event)}var WAe=[!0,"true",1,"1","yes"],uO=e=>vr(WAe,e),GAe=[!1,"false",0,"0","no"];function bd(e,t,n,r,i){return t>n&&(r.warn("min cannot be greater than max."),t=n),Fd(e)?e>n?(r.warn(" cannot be greater than max: "+n+". Using max value instead."),n):e<t?(r.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(r.warn(" must be a number. using max or fallback. max: "+n+", fallback: "+i),bd(i||n,t,n,r))}let KAe=class{constructor(t){this.t=t,this.i={},this.o=()=>
25{Object.keys(this.i).forEach((n=>{var r=this.h(n)+this.m;r>=this.S?delete this.i[n]:this.$(n,r)}))},this.h=n=>this.i[String(n)],this.$=(n,r)=>{this.i[String(n)]=r},this.consumeRateLimit=n=>{var r,i,s=(r=this.h(n))!==null&&r!==void 0?r:this.S;if((s=Math.max(s-1,0))===0)return!0;this.$(n,s);var a=s===0;return a&&((i=this.k)==null||i.call(this,n)),a},this.k=this.t.k,this.S=bd(this.t.bucketSize,0,100,this.t.P),this.m=bd(this.t.refillRate,0,this.S,this.t.P),this.T=bd(this.t.refillInterval,0,864e5,this.t.P),this.I=setInterval((()=>{this.o()}),this.T)}stop(){this.I&&(clearInterval(this.I),this.I=void 0)}};var NT,QW,dO,YAe=e=>e instanceof Error;function XAe(e){var t=globalThis._posthogChunkIds;if(t){var n=Object.keys(t);return dO&&n.length===QW||(QW=n.length,dO=n.reduce(((r,i)=>{NT||(NT={});var s=NT[i];if(s)r[s[0]]=s[1];else for(var a=e(i),o=a.length-1;o>=0;o--){var c=a[o],u=c?.filename,d=t[i];if(u&&d){r[u]=d,NT[i]=[u,d];break}}return r}),{})),dO}}var W1="?";function BD(e,t,n,r){var i={platform:"web:javascript",filename:e,function:t==="<anonymous>"?W1:t,in_app:!0};return en(n)||(i.lineno=n),en(r)||(i.colno=r),i}var Xie=(e,t)=>{var n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:W1,n?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},QAe=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,ZAe=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,JAe=/\((\S*)(?::(\d+))(?::(\d+))\)/,eke=e=>{var t=QAe.exec(e);if(t){var[,n,r,i]=t;return BD(n,W1,+r,+i)}var s=ZAe.exec(e);if(s){if(s[2]&&s[2].indexOf("eval")===0){var a=JAe.exec(s[2]);a&&(s[2]=a[1],s[3]=a[2],s[4]=a[3])}var[o,c]=Xie(s[1]||W1,s[2]);return BD(c,o,s[3]?+s[3]:void 0,s[4]?+s[4]:void 0)}},tke=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,nke=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,rke=e=>{var t=tke.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){var n=nke.exec(t[3]);n&&(t[1]=t[1]||"eval",t[3]=n[1],t[4]=n[2],t[5]="")}var r=t[3],i=t[1]||W1;return[i,r]=Xie(i,r),BD(r,i,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},ZW=/\(error: (.*)\)/,JW=50;function ike(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r,i){i===void 0&&(i=0);for(var s=[],a=r.split(` 26`),o=i;o<a.length;o++){var c=a[o];if(!(c.length>1024)){var u=ZW.test(c)?c.replace(ZW,"$1"):c;if(!u.match(/\S*Error: /)){for(var d of t){var h=d(u);if(h){s.push(h);break}}if(s.length>=JW)break}}}return(function(p){if(!p.length)return[];var g=Array.from(p);return g.reverse(),g.slice(0,JW).map((v=>{return dn({},v,{filename:v.filename||(x=g,x[x.length-1]||{}).filename,function:v.function||W1});var x}))})(s)}}let ske=class{constructor(t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r=[]),this.coercers=t,this.modifiers=r,this.stackParser=ike(...n)}buildFromUnknown(t,n){n===void 0&&(n={});var r=n&&n.mechanism||{handled:!0,type:"generic"},i=this.buildCoercingContext(r,n,0).apply(t),s=this.buildParsingContext(),a=this.parseStacktrace(i,s);return{$exception_list:this.convertToExceptionList(a,r),$exception_level:"error"}}modifyFrames(t){var n=this;return XW((function*(){for(var r of t)r.stacktrace&&r.stacktrace.frames&&Mi(r.stacktrace.frames)&&(r.stacktrace.frames=yield n.applyModifiers(r.stacktrace.frames));return t}))()}coerceFallback(t){var n;return{type:"Error",value:"Unknown error",stack:(n=t.syntheticException)==null?void 0:n.stack,synthetic:!0}}parseStacktrace(t,n){var r,i;return t.cause!=null&&(r=this.parseStacktrace(t.cause,n)),t.stack!=""&&t.stack!=null&&(i=this.applyChunkIds(this.stackParser(t.stack,t.synthetic?1:0),n.chunkIdMap)),dn({},t,{cause:r,stack:i})}applyChunkIds(t,n){return t.map((r=>(r.filename&&n&&(r.chunk_id=n[r.filename]),r)))}applyCoercers(t,n){for(var r of this.coercers)if(r.match(t))return r.coerce(t,n);return this.coerceFallback(n)}applyModifiers(t){var n=this;return XW((function*(){var r=t;for(var i of n.modifiers)r=yield i(r);return r}))()}convertToExceptionList(t,n){var r,i,s,a={type:t.type,value:t.value,mechanism:{type:(r=n.type)!==null&&r!==void 0?r:"generic",handled:(i=n.handled)===null||i===void 0||i,synthetic:(s=t.synthetic)!==null&&s!==void 0&&s}};t.stack&&(a.stacktrace={type:"raw",frames:t.stack});var o=[a];return t.cause!=null&&o.push(...this.convertToExceptionList(t.cause,dn({},n,{handled:!0}))),o}buildParsingContext(){return{chunkIdMap:XAe(this.stackParser)}}buildCoercingContext(t,n,r){r===void 0&&(r=0);var i=(s,a)=>
vendor: 5,002 bytes, line 26
26{if(a<=4){var o=this.buildCoercingContext(t,n,a);return this.applyCoercers(s,o)}};return dn({},n,{syntheticException:r==0?n.syntheticException:void 0,mechanism:t,apply:s=>i(s,r),next:s=>i(s,r+1)})}},ake=class{match(t){return this.isDOMException(t)||this.isDOMError(t)}coerce(t,n){var r=pa(t.stack);return{type:this.getType(t),value:this.getValue(t),stack:r?t.stack:void 0,cause:t.cause?n.next(t.cause):void 0,synthetic:!1}}getType(t){return this.isDOMError(t)?"DOMError":"DOMException"}getValue(t){var n=t.name||(this.isDOMError(t)?"DOMError":"DOMException");return t.message?n+": "+t.message:n}isDOMException(t){return Qk(t,"DOMException")}isDOMError(t){return Qk(t,"DOMError")}},oke=class{match(t){return(n=>n instanceof Error)(t)}coerce(t,n){return{type:this.getType(t),value:this.getMessage(t,n),stack:this.getStack(t),cause:t.cause?n.next(t.cause):void 0,synthetic:!1}}getType(t){return t.name||t.constructor.name}getMessage(t,n){var r=t.message;return r.error&&typeof r.error.message=="string"?String(r.error.message):String(r)}getStack(t){return t.stacktrace||t.stack||void 0}},lke=class{constructor(){}match(t){return Qk(t,"ErrorEvent")&&t.error!=null}coerce(t,n){var r,i=n.apply(t.error);return i||{type:"ErrorEvent",value:t.message,stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}};var cke=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let uke=class{match(t){return typeof t=="string"}coerce(t,n){var r,[i,s]=this.getInfos(t);return{type:i??"Error",value:s??t,stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}getInfos(t){var n="Error",r=t,i=t.match(cke);return i&&(n=i[1],r=i[2]),[n,r]}};var dke=["fatal","error","warning","log","info","debug"];function Qie(e,t){t===void 0&&(t=40);var n=Object.keys(e);if(n.sort(),!n.length)return"[object has no keys]";for(var r=n.length;r>0;r--){var i=n.slice(0,r).join(", ");if(!(i.length>t))return r===n.length||i.length<=t?i:i.slice(0,t)+"..."}return""}let fke=class{match(t){return typeof t=="object"&&t!==null}coerce(t,n){var r,i=this.getErrorPropertyFromObject(t);return i?n.apply(i):{type:this.getType(t),value:this.getValue(t),stack:(r=n.syntheticException)==null?void 0:r.stack,level:this.isSeverityLevel(t.level)?t.level:"error",synthetic:!0}}getType(t){return Yie(t)?t.constructor.name:"Error"}getValue(t){if("name"in t&&typeof t.name=="string"){var n="'"+t.name+"' captured as exception";return"message"in t&&typeof t.message=="string"&&(n+=" with message: '"+t.message+"'"),n}if("message"in t&&typeof t.message=="string")return t.message;var r=this.getObjectClassName(t);return(r&&r!=="Object"?"'"+r+"'":"Object")+" captured as exception with keys: "+Qie(t)}isSeverityLevel(t){return pa(t)&&!zD(t)&&dke.indexOf(t)>=0}getErrorPropertyFromObject(t){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];if(YAe(r))return r}}getObjectClassName(t){try{var n=Object.getPrototypeOf(t);return n?n.constructor.name:void 0}catch{return}}},hke=class{match(t){return Yie(t)}coerce(t,n){var r,i=t.constructor.name;return{type:i,value:i+" captured as exception with keys: "+Qie(t),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}},pke=class{match(t){return $D(t)}coerce(t,n){var r;return{type:"Error",value:"Primitive value captured as exception: "+String(t),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}},mke=class{match(t){return Qk(t,"PromiseRejectionEvent")}coerce(t,n){var r,i=this.getUnhandledRejectionReason(t);return $D(i)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(i),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}:n.apply(i)}getUnhandledRejectionReason(t){if($D(t))return t;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return t}};var Zie=e=>{var t={R:function(n){if(at&&(Df.DEBUG||$n.POSTHOG_DEBUG)&&!en(at.console)&&at.console){for(var r=("__rrweb_original__"in at.console[n])?at.console[n].__rrweb_original__:at.console[n],i=arguments.length,s=new Array(i>1?i-1:0),a=1;a<i;a++)s[a-1]=arguments[a];r(e,...s)}},info:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];t.R("log",...r)},warn:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];t.R("warn",...r)},error:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];t.R("error",...r)},critical:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];console.error(e,...r)},uninitializedWarning:n=>{t.error("You must initialize PostHog before calling "+n)},createLogger:n=>Zie(e+" "+n)};return t},on=Zie("[PostHog.js]"),Ra=on.createLogger,gke=Ra("[ExternalScriptsLoader]"),eG=(e,t,n)=>{if(e.config.disable_external_dependency_loading)return gke.warn(t+" was requested but loading of external scripts is disabled."),n("Loading of external scripts is disabled");var r=ln?.querySelectorAll("script");
26if(r){for(var i,s=function(){if(r[a].src===t){var c=r[a];return c.__posthog_loading_callback_fired?{v:n()}:(c.addEventListener("load",(u=>{c.__posthog_loading_callback_fired=!0,n(void 0,u)})),c.onerror=u=>n(u),{v:void 0})}},a=0;a<r.length;a++)if(i=s())return i.v}var o=()=>{if(!ln)return n("document not found");var c=ln.createElement("script");if(c.type="text/javascript",c.crossOrigin="anonymous",c.src=t,c.onload=h=>{c.__posthog_loading_callback_fired=!0,n(void 0,h)},c.onerror=h=>n(h),e.config.prepare_external_dependency_script&&(c=e.config.prepare_external_dependency_script(c)),!c)return n("prepare_external_dependency_script returned null");var u,d=ln.querySelectorAll("body > script");d.length>0?(u=d[0].parentNode)==null||u.insertBefore(c,d[0]):ln.body.appendChild(c)};ln!=null&&ln.body?o():ln?.addEventListener("DOMContentLoaded",o)};$n.__PosthogExtensions__=$n.__PosthogExtensions__||{},$n.__PosthogExtensions__.loadExternalDependency=(e,t,n)=>{var r="/static/"+t+".js?v="+e.version;if(t==="remote-config"&&(r="/array/"+e.config.token+"/config.js"),t==="toolbar"){var i=3e5;r=r+"&t="+Math.floor(Date.now()/i)*i}var s=e.requestRouter.endpointFor("assets",r);eG(e,s,n)},$n.__PosthogExtensions__.loadSiteApp=(e,t,n)=>{var r=e.requestRouter.endpointFor("api",t);eG(e,r,n)};var Zk={};function tm(e,t,n){if(Mi(e)){if(WW&&e.forEach===WW)e.forEach(t,n);else if("length"in e&&e.length===+e.length){for(var r=0,i=e.length;r<i;r++)if(r in e&&t.call(n,e[r],r)===Zk)return}}}function Oi(e,t,n){if(!Qi(e)){if(Mi(e))return tm(e,t,n);if(HAe(e)){for(var r of e.entries())if(t.call(n,r[1],r[0])===Zk)return}else for(var i in e)if(Kie.call(e,i)&&t.call(n,e[i],i)===Zk)return}}var Ps=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return tm(n,(function(i){for(var s in i)i[s]!==void 0&&(e[s]=i[s])})),e},Ny=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return tm(n,(function(i){tm(i,(function(s){e.push(s)}))})),e};function ik(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r}var tG=function(e){try{return e()}catch{return}},xke=function(e){return function(){try{for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(this,n)}catch(i){on.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),on.critical(i)}}},o9=function(e){var t={};return Oi(e,(function(n,r){(pa(n)&&n.length>0||Fd(n))&&(t[r]=n)})),t};function vke(e,t){return n=e,r=s=>pa(s)&&!Lh(t)?s.slice(0,t):s,i=new Set,(function s(a,o){return a!==Object(a)?r?r(a,o):a:i.has(a)?void 0:(i.add(a),Mi(a)?(c=[],tm(a,(u=>{c.push(s(u))}))):(c={},Oi(a,((u,d)=>{i.has(u)||(c[d]=s(u,d))}))),c);var c})(n);var n,r,i}var yke=["herokuapp.com","vercel.app","netlify.app"];function bke(e){var t=e?.hostname;if(!pa(t))return!1;var n=t.split(".").slice(-2).join(".");for(var r of yke)if(n===r)return!1;return!0}function Jie(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]}function ma(e,t,n,r){var{capture:i=!1,passive:s=!0}=r??{};e?.addEventListener(t,n,{capture:i,passive:s})}var ese="$people_distinct_id",ew="__alias",tw="__timers",nG="$autocapture_disabled_server_side",UD="$heatmaps_enabled_server_side",rG="$exception_capture_enabled_server_side",VD="$error_tracking_suppression_rules",iG="$error_tracking_capture_extension_exceptions",sG="$web_vitals_enabled_server_side",tse="$dead_clicks_enabled_server_side",aG="$web_vitals_allowed_metrics",fO="$session_recording_remote_config",Jk="$sesid",nse="$session_is_sampled",t1="$enabled_feature_flags",nw="$early_access_features",HD="$feature_flag_details",rw="$stored_person_properties",Dg="$stored_group_properties",qD="$surveys",jT="$surveys_activated",eN="$flag_call_reported",Ff="$user_state",WD="$client_session_props",GD="$capture_rate_limit",KD="$initial_campaign_params",YD="$initial_referrer_info",tN="$initial_person_info",nN="$epp",rse="__POSTHOG_TOOLBAR__",u_="$posthog_cookieless",_ke=[ese,ew,"__cmpns",tw,"$session_recording_enabled_server_side",UD,Jk,t1,VD,Ff,nw,HD,Dg,rw,qD,eN,WD,GD,KD,YD,nN,tN];function oG(e){return e instanceof Element&&(e.id===rse||!(e.closest==null||!e.closest(".toolbar-global-fade-container")))}function xj(e){return!!e&&e.nodeType===1}function nm(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function ise(e){return!!e&&e.nodeType===3}function sse(e){return!!e&&e.nodeType===11}function l9(e){return e?mj(e).split(/\s+/):[]}function lG(e){var t=at?.location.href;return!!(t&&e&&e.some((n=>t.match(n))))}function rN(e){var t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return l9(t)}function ase(e){return Qi(e)?null:mj(e).split(/(\s+)/).filter((t=>y2(t))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function vj(e){var t="";
vendor: 4,560 bytes, line 26
26return XD(e)&&!dse(e)&&e.childNodes&&e.childNodes.length&&Oi(e.childNodes,(function(n){var r;ise(n)&&n.textContent&&(t+=(r=ase(n.textContent))!==null&&r!==void 0?r:"")})),mj(t)}function ose(e){return en(e.target)?e.srcElement||null:(t=e.target)!=null&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}var c9=["a","button","form","input","select","textarea","label"];function lse(e,t){if(en(t))return!0;var n,r=function(s){if(t.some((a=>s.matches(a))))return{v:!0}};for(var i of e)if(n=r(i))return n.v;return!1}function cse(e){var t=e.parentNode;return!(!t||!xj(t))&&t}var cG=[".ph-no-rageclick",".ph-no-capture"],u9=e=>!e||nm(e,"html")||!xj(e),use=(e,t)=>{if(!at||u9(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var n=!1,r=[e],i=e;i.parentNode&&!nm(i,"body");)if(sse(i.parentNode))r.push(i.parentNode.host),i=i.parentNode.host;else{var s=cse(i);if(!s)break;if(t||c9.indexOf(s.tagName.toLowerCase())>-1)n=!0;else{var a=at.getComputedStyle(s);a&&a.getPropertyValue("cursor")==="pointer"&&(n=!0)}r.push(s),i=s}return{parentIsUsefulElement:n,targetElementList:r}};function wke(e,t,n,r,i){var s,a,o,c;if(n===void 0&&(n=void 0),!at||u9(e)||(s=n)!=null&&s.url_allowlist&&!lG(n.url_allowlist)||(a=n)!=null&&a.url_ignorelist&&lG(n.url_ignorelist))return!1;if((o=n)!=null&&o.dom_event_allowlist){var u=n.dom_event_allowlist;if(u&&!u.some((v=>t.type===v)))return!1}var{parentIsUsefulElement:d,targetElementList:h}=use(e,r);if(!(function(v,x){var _=x?.element_allowlist;if(en(_))return!0;var w,S=function(T){if(_.some((N=>T.tagName.toLowerCase()===N)))return{v:!0}};for(var E of v)if(w=S(E))return w.v;return!1})(h,n)||!lse(h,(c=n)==null?void 0:c.css_selector_allowlist))return!1;var p=at.getComputedStyle(e);if(p&&p.getPropertyValue("cursor")==="pointer"&&t.type==="click")return!0;var g=e.tagName.toLowerCase();switch(g){case"html":return!1;case"form":return(i||["submit"]).indexOf(t.type)>=0;case"input":case"select":case"textarea":return(i||["change","click"]).indexOf(t.type)>=0;default:return d?(i||["click"]).indexOf(t.type)>=0:(i||["click"]).indexOf(t.type)>=0&&(c9.indexOf(g)>-1||e.getAttribute("contenteditable")==="true")}}function XD(e){for(var t=e;t.parentNode&&!nm(t,"body");t=t.parentNode){var n=rN(t);if(vr(n,"ph-sensitive")||vr(n,"ph-no-capture"))return!1}if(vr(rN(e),"ph-include"))return!0;var r=e.type||"";if(pa(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var i=e.name||e.id||"";return!(pa(i)&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(i.replace(/[^a-zA-Z0-9]/g,"")))}function dse(e){return!!(nm(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||nm(e,"select")||nm(e,"textarea")||e.getAttribute("contenteditable")==="true")}var fse="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",Ske=new RegExp("^(?:"+fse+")$"),Eke=new RegExp(fse),hse="\\d{3}-?\\d{2}-?\\d{4}",Cke=new RegExp("^("+hse+")$"),Tke=new RegExp("("+hse+")");function y2(e,t){return t===void 0&&(t=!0),!(Qi(e)||pa(e)&&(e=mj(e),(t?Ske:Eke).test((e||"").replace(/[- ]/g,""))||(t?Cke:Tke).test(e)))}function pse(e){var t=vj(e);return y2(t=(t+" "+mse(e)).trim())?t:""}function mse(e){var t="";return e&&e.childNodes&&e.childNodes.length&&Oi(e.childNodes,(function(n){var r;if(n&&((r=n.tagName)==null?void 0:r.toLowerCase())==="span")try{var i=vj(n);t=(t+" "+i).trim(),n.childNodes&&n.childNodes.length&&(t=(t+" "+mse(n)).trim())}catch(s){on.error("[AutoCapture]",s)}})),t}function Ake(e){return(function(t){var n=t.map((r=>{var i,s,a="";if(r.tag_name&&(a+=r.tag_name),r.attr_class)for(var o of(r.attr_class.sort(),r.attr_class))a+="."+o.replace(/"/g,"");var c=dn({},r.text?{text:r.text}:{},{"nth-child":(i=r.nth_child)!==null&&i!==void 0?i:0,"nth-of-type":(s=r.nth_of_type)!==null&&s!==void 0?s:0},r.href?{href:r.href}:{},r.attr_id?{attr_id:r.attr_id}:{},r.attributes),u={};return ik(c).sort(((d,h)=>{var[p]=d,[g]=h;return p.localeCompare(g)})).forEach((d=>{var[h,p]=d;return u[uG(h.toString())]=uG(p.toString())})),a+=":",a+=ik(u).map((d=>{var[h,p]=d;return h+'="'+p+'"'})).join("")}));return n.join(";")})((function(t){return t.map((n=>{var r,i,s={text:(r=n.$el_text)==null?void 0:r.slice(0,400),tag_name:n.tag_name,href:(i=n.attr__href)==null?void 0:i.slice(0,2048),attr_class:kke(n),attr_id:n.attr__id,nth_child:n.nth_child,nth_of_type:n.nth_of_type,attributes:{}};return ik(n).filter((a=>{var[o]=a;return o.indexOf("attr__")===0}
26)).forEach((a=>{var[o,c]=a;return s.attributes[o]=c})),s}))})(e))}function uG(e){return e.replace(/"|\\"/g,'\\"')}function kke(e){var t=e.attr__class;return t?Mi(t)?t:l9(t):void 0}let gse=class{constructor(){this.clicks=[]}isRageClick(t,n,r){var i=this.clicks[this.clicks.length-1];if(i&&Math.abs(t-i.x)+Math.abs(n-i.y)<30&&r-i.timestamp<1e3){if(this.clicks.push({x:t,y:n,timestamp:r}),this.clicks.length===3)return!0}else this.clicks=[{x:t,y:n,timestamp:r}];return!1}};var hO="$copy_autocapture",qf=(function(e){return e.GZipJS="gzip-js",e.Base64="base64",e})({}),iN=e=>{var t=ln?.createElement("a");return en(t)?null:(t.href=e,t)},Nke=function(e,t){var n,r;t===void 0&&(t="&");var i=[];return Oi(e,(function(s,a){en(s)||en(a)||a==="undefined"||(n=encodeURIComponent((o=>o instanceof File)(s)?s.name:s.toString()),r=encodeURIComponent(a),i[i.length]=r+"="+n)})),i.join(t)},sN=function(e,t){for(var n,r=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),i=0;i<r.length;i++){var s=r[i].split("=");if(s[0]===t){n=s;break}}if(!Mi(n)||n.length<2)return"";var a=n[1];try{a=decodeURIComponent(a)}catch{on.error("Skipping decoding for malformed query param: "+a)}return a.replace(/\+/g," ")},GS=function(e,t,n){if(!e||!t||!t.length)return e;for(var r=e.split("#"),i=r[0]||"",s=r[1],a=i.split("?"),o=a[1],c=a[0],u=(o||"").split("&"),d=[],h=0;h<u.length;h++){var p=u[h].split("=");Mi(p)&&(t.includes(p[0])?d.push(p[0]+"="+n):d.push(u[h]))}var g=c;return o!=null&&(g+="?"+d.join("&")),s!=null&&(g+="#"+s),g},aN=function(e,t){var n=e.match(new RegExp(t+"=([^&]*)"));return n?n[1]:null},dG=Ra("[AutoCapture]");function pO(e,t){return t.length>e?t.slice(0,e)+"...":t}function jke(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!xj(t));return t}function Rke(e,t,n,r){var i=e.tagName.toLowerCase(),s={tag_name:i};c9.indexOf(i)>-1&&!n&&(i.toLowerCase()==="a"||i.toLowerCase()==="button"?s.$el_text=pO(1024,pse(e)):s.$el_text=pO(1024,vj(e)));var a=rN(e);a.length>0&&(s.classes=a.filter((function(d){return d!==""}))),Oi(e.attributes,(function(d){var h;if((!dse(e)||["name","id","class","aria-label"].indexOf(d.name)!==-1)&&(r==null||!r.includes(d.name))&&!t&&y2(d.value)&&(h=d.name,!pa(h)||h.substring(0,10)!=="_ngcontent"&&h.substring(0,7)!=="_nghost")){var p=d.value;d.name==="class"&&(p=l9(p).join(" ")),s["attr__"+d.name]=pO(1024,p)}}));for(var o=1,c=1,u=e;u=jke(u);)o++,u.tagName===e.tagName&&c++;return s.nth_child=o,s.nth_of_type=c,s}function Ike(e,t){for(var n,r,{e:i,maskAllElementAttributes:s,maskAllText:a,elementAttributeIgnoreList:o,elementsC
vendor: 21,796 bytes, line 26
26hainAsString:c}=t,u=[e],d=e;d.parentNode&&!nm(d,"body");)sse(d.parentNode)?(u.push(d.parentNode.host),d=d.parentNode.host):(u.push(d.parentNode),d=d.parentNode);var h,p=[],g={},v=!1,x=!1;if(Oi(u,(T=>{var N=XD(T);T.tagName.toLowerCase()==="a"&&(v=T.getAttribute("href"),v=N&&v&&y2(v)&&v),vr(rN(T),"ph-no-capture")&&(x=!0),p.push(Rke(T,s,a,o));var A=(function(k){if(!XD(k))return{};var j={};return Oi(k.attributes,(function(R){if(R.name&&R.name.indexOf("data-ph-capture-attribute")===0){var P=R.name.replace("data-ph-capture-attribute-",""),V=R.value;P&&V&&y2(V)&&(j[P]=V)}})),j})(T);Ps(g,A)})),x)return{props:{},explicitNoCapture:x};if(a||(e.tagName.toLowerCase()==="a"||e.tagName.toLowerCase()==="button"?p[0].$el_text=pse(e):p[0].$el_text=vj(e)),v){var _,w;p[0].attr__href=v;var S=(_=iN(v))==null?void 0:_.host,E=at==null||(w=at.location)==null?void 0:w.host;S&&E&&S!==E&&(h=v)}return{props:Ps({$event_type:i.type,$ce_version:1},c?{}:{$elements:p},{$elements_chain:Ake(p)},(n=p[0])!=null&&n.$el_text?{$el_text:(r=p[0])==null?void 0:r.$el_text}:{},h&&i.type==="click"?{$external_click_url:h}:{},g)}}let Oke=class{constructor(t){this.C=!1,this.O=null,this.rageclicks=new gse,this.F=!1,this.instance=t,this.M=null}get A(){var t,n,r=fo(this.instance.config.autocapture)?this.instance.config.autocapture:{};return r.url_allowlist=(t=r.url_allowlist)==null?void 0:t.map((i=>new RegExp(i))),r.url_ignorelist=(n=r.url_ignorelist)==null?void 0:n.map((i=>new RegExp(i))),r}j(){if(this.isBrowserSupported()){if(at&&ln){var t=r=>{r=r||at?.event;try{this.D(r)}catch(i){dG.error("Failed to capture event",i)}};if(ma(ln,"submit",t,{capture:!0}),ma(ln,"change",t,{capture:!0}),ma(ln,"click",t,{capture:!0}),this.A.capture_copied_text){var n=r=>{r=r||at?.event,this.D(r,hO)};ma(ln,"copy",n,{capture:!0}),ma(ln,"cut",n,{capture:!0})}}}else dG.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.C&&(this.j(),this.C=!0)}onRemoteConfig(t){t.elementsChainAsString&&(this.F=t.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[nG]:!!t.autocapture_opt_out}),this.O=!!t.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(t){this.M=t}getElementSelectors(t){var n,r=[];return(n=this.M)==null||n.forEach((i=>{var s=ln?.querySelectorAll(i);s?.forEach((a=>{t===a&&r.push(i)}))})),r}get isEnabled(){var t,n,r=(t=this.instance.persistence)==null?void 0:t.props[nG],i=this.O;if(Lh(i)&&!em(r)&&!this.instance.L())return!1;var s=(n=this.O)!==null&&n!==void 0?n:!!r;return!!this.instance.config.autocapture&&!s}D(t,n){if(n===void 0&&(n="$autocapture"),this.isEnabled){var r,i=ose(t);ise(i)&&(i=i.parentNode||null),n==="$autocapture"&&t.type==="click"&&t instanceof MouseEvent&&this.instance.config.rageclick&&(r=this.rageclicks)!=null&&r.isRageClick(t.clientX,t.clientY,new Date().getTime())&&(function(p,g){if(!at||u9(p))return!1;var v,x;if((v=em(g)?!!g&&cG:(x=g?.css_selector_ignorelist)!==null&&x!==void 0?x:cG)===!1)return!1;var{targetElementList:_}=use(p,!1);return!lse(_,v)})(i,this.instance.config.rageclick)&&this.D(t,"$rageclick");var s=n===hO;if(i&&wke(i,t,this.A,s,s?["copy","cut"]:void 0)){var{props:a,explicitNoCapture:o}=Ike(i,{e:t,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.A.element_attribute_ignorelist,elementsChainAsString:this.F});if(o)return!1;var c=this.getElementSelectors(i);if(c&&c.length>0&&(a.$element_selectors=c),n===hO){var u,d=ase(at==null||(u=at.getSelection())==null?void 0:u.toString()),h=t.type||"clipboard";if(!d)return!1;a.$selected_content=d,a.$copy_type=h}return this.instance.capture(n,a),!0}}}isBrowserSupported(){return Jp(ln?.querySelectorAll)}};Math.trunc||(Math.trunc=function(e){return e<0?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return Fd(e)&&isFinite(e)&&Math.floor(e)===e});var fG="0123456789abcdef";let Pke=class QD{constructor(t){if(this.bytes=t,t.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(t,n,r,i){if(!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(r)||!Number.isInteger(i)||t<0||n<0||r<0||i<0||t>0xffffffffffff||n>4095||r>1073741823||i>4294967295)throw new RangeError("invalid field value");var s=new Uint8Array(16);return s[0]=t/Math.pow(2,40),s[1]=t/Math.pow(2,32),s[2]=t/Math.pow(2,24),s[3]=t/Math.pow(2,16),s[4]=t/Math.pow(2,8),s[5]=t,s[6]=112|n>>>8,s[7]=n,s[8]=128|r>>>24,s[9]=r>>>16,s[10]=r>>>8,s[11]=r,s[12]=i>>>24,s[13]=i>>>16,s[14]=i>>>8,s[15]=i,new QD(s)}toString(){for(var t="",n=0;n<this.bytes.length;n++)t=t+fG.charAt(this.bytes[n]>>>4)+fG.charAt(15&this.bytes[n]),n!==3&&n!==5&&n!==7&&n!==9||(t+="-");if(t.length!==36)throw new Error("Invalid UUIDv7 was generated");return t}clone(){return new QD(this.bytes.slice(0))}equals(t){return this.compareTo(t)===0}compareTo(t){for(var n=0;n<16;n++){var r=this.bytes[n]-t.bytes[n];if(r!==0)return Math.sign(r)}return 0}},Mke=class{constructor(){this.N=0,this.U=0,this.H=new Dke}generate(){var t=this.generateOrAbort();if(en(t)){this.N=0;var n=this.generateOrAbort();if(en(n))throw new Error("Could not generate UUID after timestamp reset");return n}return t}generateOrAbort(){var t=Date.now();if(t>this.N)this.N=t,this.B();else{if(!(t+1e4>this.N))return;this.U++,this.U>4398046511103&&(this.N++,this.B())}return Pke.fromFieldsV7(this.N,Math.trunc(this.U/Math.pow(2,30)),this.U&Math.pow(2,30)-1,this.H.nextUint32())}B(){this.U=1024*this.H.nextUint32()+(1023&this.H.nextUint32())}};var hG,xse=e=>{if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var t=0;t<e.length;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};at&&!en(at.crypto)&&crypto.getRandomValues&&(xse=e=>crypto.getRandomValues(e));let Dke=class{constructor(){this.q=new Uint32Array(8),this.W=1/0}nextUint32(){return this.W>=this.q.length&&(xse(this.q),this.W=0),this.q[this.W++]}};var Bp=()=>Fke().toString(),Fke=()=>(hG||(hG=new Mke)).generate(),d_="",Lke=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i;function zke(e,t){if(t){var n=(function(i,s){if(s===void 0&&(s=ln),d_)return d_;if(!s||["localhost","127.0.0.1"].includes(i))return"";for(var a=i.split("."),o=Math.min(a.length,8),c="dmn_chk_"+Bp();!d_&&o--;){var u=a.slice(o).join("."),d=c+"=1;domain=."+u+";path=/";s.cookie=d+";max-age=3",s.cookie.includes(c)&&(s.cookie=d+";max-age=0",d_=u)}return d_})(e);if(!n){var r=(i=>{var s=i.match(Lke);return s?s[0]:""})(e);r!==n&&on.info("Warning: cookie subdomain discovery mismatch",r,n),n=r}return n?"; domain=."+n:""}return""}var Td={G:()=>!!ln,V:function(e){on.error("cookieStore error: "+e)},J:function(e){if(ln){try{for(var t=e+"=",n=ln.cookie.split(";").filter((s=>s.length)),r=0;r<n.length;r++){for(var i=n[r];i.charAt(0)==" ";)i=i.substring(1,i.length);if(i.indexOf(t)===0)return decodeURIComponent(i.substring(t.length,i.length))}}catch{}return null}},K:function(e){var t;try{t=JSON.parse(Td.J(e))||{}}catch{}return t},Y:function(e,t,n,r,i){if(ln)try{var s="",a="",o=zke(ln.location.hostname,r);if(n){var c=new Date;c.setTime(c.getTime()+24*n*60*60*1e3),s="; expires="+c.toUTCString()}i&&(a="; secure");var u=e+"="+encodeURIComponent(JSON.stringify(t))+s+"; SameSite=Lax; path=/"+o+a;return u.length>3686.4&&on.warn("cookieStore warning: large cookie, len="+u.length),ln.cookie=u,u}catch{return}},X:function(e,t){if(ln!=null&&ln.cookie)try{Td.Y(e,"",-1,t)}catch{return}}},mO=null,as={G:function(){if(!Lh(mO))return mO;var e=!0;if(en(at))e=!1;else try{var t="__mplssupport__";as.Y(t,"xyz"),as.J(t)!=='"xyz"'&&(e=!1),as.X(t)}catch{e=!1}return e||on.error("localStorage unsupported; falling back to cookie store"),mO=e,e},V:function(e){on.error("localStorage error: "+e)},J:function(e){try{return at?.localStorage.getItem(e)}catch(t){as.V(t)}return null},K:function(e){try{return JSON.parse(as.J(e))||{}}catch{}return null},Y:function(e,t){try{at?.localStorage.setItem(e,JSON.stringify(t))}catch(n){as.V(n)}},X:function(e){try{at?.localStorage.removeItem(e)}catch(t){as.V(t)}}},$ke=["distinct_id",Jk,nse,nN,tN],RT=dn({},as,{K:function(e){try{var t={};try{t=Td.K(e)||{}}catch{}var n=Ps(t,JSON.parse(as.J(e)||"{}"));return as.Y(e,n),n}catch{}return null},Y:function(e,t,n,r,i,s){try{as.Y(e,t,void 0,void 0,s);var a={};$ke.forEach((o=>{t[o]&&(a[o]=t[o])})),Object.keys(a).length&&Td.Y(e,a,n,r,i,s)}catch(o){as.V(o)}},X:function(e,t){try{at?.localStorage.removeItem(e),Td.X(e,t)}catch(n){as.V(n)}}}),IT={},Bke={G:function(){return!0},V:function(e){on.error("memoryStorage error: "+e)},J:function(e){return IT[e]||null},K:function(e){return IT[e]||null},Y:function(e,t){IT[e]=t},X:function(e){delete IT[e]}},bg=null,Va={G:function(){if(!Lh(bg))return bg;if(bg=!0,en(at))bg=!1;else try{var e="__support__";Va.Y(e,"xyz"),Va.J(e)!=='"xyz"'&&(bg=!1),Va.X(e)}catch{bg=!1}return bg},V:function(e){on.error("sessionStorage error: ",e)},J:function(e){try{return at?.sessionStorage.getItem(e)}catch(t){Va.V(t)}return null},K:function(e){try{return JSON.parse(Va.J(e))||null}catch{}return null},Y:function(e,t){try{at?.sessionStorage.setItem(e,JSON.stringify(t))}catch(n){Va.V(n)}},X:function(e){try{at?.sessionStorage.removeItem(e)}catch(t){Va.V(t)}}},Lf=(function(e){return e[e.PENDING=-1]="PENDING",e[e.DENIED=0]="DENIED",e[e.GRANTED=1]="GRANTED",e})({});let Uke=class{constructor(t){this._instance=t}get A(){return this._instance.config}get consent(){return this.Z()?Lf.DENIED:this.tt}isOptedOut(){return this.A.cookieless_mode==="always"||this.consent===Lf.DENIED||this.consent===Lf.PENDING&&(this.A.opt_out_capturing_by_default||this.A.cookieless_mode==="on_reject")}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===Lf.DENIED}optInOut(t){this.it.Y(this.et,t?1:0,this.A.cookie_expiration,this.A.cross_subdomain_cookie,this.A.secure_cookie)}reset(){this.it.X(this.et,this.A.cross_subdomain_cookie)}get et(){var{token:t,opt_out_capturing_cookie_prefix:n,consent_persistence_name:r}=this._instance.config;return r||(n?n+t:"__ph_opt_in_out_"+t)}get tt(){var t=this.it.J(this.et);return uO(t)?Lf.GRANTED:vr(GAe,t)?Lf.DENIED:Lf.PENDING}get it(){if(!this.rt){var t=this.A.opt_out_capturing_persistence_type;this.rt=t==="localStorage"?as:Td;var n=t==="localStorage"?Td:as;n.J(this.et)&&(this.rt.J(this.et)||this.optInOut(uO(n.J(this.et))),n.X(this.et,this.A.cross_subdomain_cookie))}return this.rt}Z(){return!!this.A.respect_dnt&&!!Jie([Hl?.doNotTrack,Hl?.msDoNotTrack,$n.doNotTrack],(t=>uO(t)))}};var OT=Ra("[Dead Clicks]"),Vke=()=>!0,Hke=e=>{var t,n=!((t=e.instance.persistence)==null||!t.get_property(tse)),r=e.instance.config.capture_dead_clicks;return em(r)?r:n};let vse=class{get lazyLoadedDeadClicksAutocapture(){return this.st}constructor(t,n,r){this.instance=t,this.isEnabled=n,this.onCapture=r,this.startIfEnabled()}onRemoteConfig(t){this.instance.persistence&&this.instance.persistence.register({[tse]:t?.captureDeadClicks}),this.startIfEnabled()}startIfEnabled(){this.isEnabled(this)&&this.nt((()=>{this.ot()}))}nt(t){var n,r;(n=$n.__PosthogExtensions__)!=null&&n.initDeadClicksAutocapture&&t(),(r=$n.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this.instance,"dead-clicks-autocapture",(i=>{i?OT.error("failed to load script",i):t()}))}ot(){var t;if(ln){if(!this.st&&(t=$n.__PosthogExtensions__)!=null&&t.initDeadClicksAutocapture){var n=fo(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};n.__onCapture=this.onCapture,this.st=$n.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,n),this.st.start(ln),OT.info("starting...")}}else OT.error("`document` not found. Cannot start.")}stop(){this.st&&(this.st.stop(),this.st=void 0,OT.info("stopping..."))}};var f_=Ra("[ExceptionAutocapture]");let qke=class{constructor(t){var n,r,i;this.lt=()=>{var s;if(at&&this.isEnabled&&(s=$n.__PosthogExtensions__)!=null&&s.errorWrappingFunctions){var a=$n.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,o=$n.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,c=$n.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.ut&&this.A.capture_unhandled_errors&&(this.ut=a(this.captureException.bind(this))),!this.ht&&this.A.capture_unhandled_rejections&&(this.ht=o(this.captureException.bind(this))),!this.dt&&this.A.capture_console_errors&&(this.dt=c(this.captureException.bind(this)))}catch(u){f_.error("failed to start",u),this.vt()}}},this._instance=t,this.ct=!((n=this._instance.persistence)==null||!n.props[rG]),this.A=this.ft(),this.gt=new KAe({refillRate:(r=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)!==null&&r!==void 0?r:1,bucketSize:(i=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)!==null&&i!==void 0?i:10,refillInterval:1e4,P:f_}),this.startIfEnabled()}ft(){var t=this._instance.config.capture_exceptions,n={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return fo(t)?n=dn({},n,t):(en(t)?this.ct:t)&&(n=dn({},n,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),n}get isEnabled(){return this.A.capture_console_errors||this.A.capture_unhandled_errors||this.A.capture_unhandled_rejections}startIfEnabled(){this.isEnabled&&(f_.info("enabled"),this.nt(this.lt))}nt(t){var n,r;(n=$n.__PosthogExtensions__)!=null&&n.errorWrappingFunctions&&t(),(r=$n.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"exception-autocapture",(i=>{if(i)return f_.error("failed to load script",i);t()}))}vt(){var t,n,r;(t=this.ut)==null||t.call(this),this.ut=void 0,(n=this.ht)==null||n.call(this),this.ht=void 0,(r=this.dt)==null||r.call(this),this.dt=void 0}onRemoteConfig(t){var n=t.autocaptureExceptions;this.ct=!!n||!1,this.A=this.ft(),this._instance.persistence&&this._instance.persistence.register({[rG]:this.ct}),this.startIfEnabled()}captureException(t){var n,r,i=(n=t==null||(r=t.$exception_list)==null||(r=r[0])==null?void 0:r.type)!==null&&n!==void 0?n:"Exception";this.gt.consumeRateLimit(i)?f_.info("Skipping exception capture because of client rate limiting.",{exception:i}):this._instance.exceptions.sendExceptionEvent(t)}};function pG(e,t,n){try{if(!(t in e))return()=>{};var r=e[t],i=n(r);return Jp(i)&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}let Wke=class{constructor(t){var n;this._instance=t,this._t=(at==null||(n=at.location)==null?void 0:n.pathname)||""}get isEnabled(){return this._instance.config.capture_pageview==="history_change"}startIfEnabled(){this.isEnabled&&(on.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.yt&&this.yt(),this.yt=void 0,on.info("History API monitoring stopped")}monitorHistoryChanges(){var t,n;if(at&&at.history){var r=this;(t=at.history.pushState)!=null&&t.__posthog_wrapped__||pG(at.history,"pushState",(i=>function(s,a,o){i.call(this,s,a,o),r.bt("pushState")})),(n=at.history.replaceState)!=null&&n.__posthog_wrapped__||pG(at.history,"replaceState",(i=>function(s,a,o){i.call(this,s,a,o),r.bt("replaceState")})),this.wt()}}bt(t){try{var n,r=at==null||(n=at.location)==null?void 0:n.pathname;if(!r)return;r!==this._t&&this.isEnabled&&this._instance.capture("$pageview",{navigation_type:t}),this._t=r}catch(i){on.error("Error capturing "+t+" pageview",i)}}wt(){if(!this.yt){var t=()=>{this.bt("popstate")};ma(at,"popstate",t),this.yt=()=>{at&&at.removeEventListener("popstate",t)}}}};var gO=Ra("[SegmentIntegration]");function Gke(e,t){var n=e.config.segment;if(!n)return t();(function(r,i){var s=r.config.segment;if(!s)return i();var a=c=>{var u=()=>c.anonymousId()||Bp();r.config.get_device_id=u,c.id()&&(r.register({distinct_id:c.id(),$device_id:u()}),r.persistence.set_property(Ff,"identified")),i()},o=s.user();"then"in o&&Jp(o.then)?o.then((c=>a(c))):a(o)})(e,(()=>{n.register((r=>{Promise&&Promise.resolve||gO.warn("This browser does not have Promise support, and can not use the segment integration");var i=(s,a)=>{if(!a)return s;s.event.userId||s.event.anonymousId===r.get_distinct_id()||(gO.info("No userId set, resetting PostHog"),r.reset()),s.event.userId&&s.event.userId!==r.get_distinct_id()&&(gO.info("UserId set, identifying with PostHog"),r.identify(s.event.userId));var o=r.calculateEventProperties(a,s.event.properties);return s.event.properties=Object.assign({},o,s.event.properties),s};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:s=>i(s,s.event.event),page:s=>i(s,"$pageview"),identify:s=>i(s,"$identify"),screen:s=>i(s,"$screen")}})(e)).then((()=>{t()}))}))}var yse="posthog-js";function bse(e,t){var{organization:n,projectId:r,prefix:i,severityAllowList:s=["error"],sendExceptionsToPostHog:a=!0}=t===void 0?{}:t;return o=>{var c,u,d,h,p;if(!(s==="*"||s.includes(o.level))||!e.__loaded)return o;o.tags||(o.tags={});var g=e.requestRouter.endpointFor("ui","/project/"+e.config.token+"/person/"+e.get_distinct_id());o.tags["PostHog Person URL"]=g,e.sessionRecordingStarted()&&(o.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var v=((c=o.exception)==null?void 0:c.values)||[],x=v.map((w=>dn({},w,{stacktrace:w.stacktrace?dn({},w.stacktrace,{type:"raw",frames:(w.stacktrace.frames||[]).map((S=>dn({},S,{platform:"web:javascript"})))}):void 0}))),_={$exception_message:((u=v[0])==null?void 0:u.value)||o.message,$exception_type:(d=v[0])==null?void 0:d.type,$exception_level:o.level,$exception_list:x,$sentry_event_id:o.event_id,$sentry_exception:o.exception,$sentry_exception_message:((h=v[0])==null?void 0:h.value)||o.message,$sentry_exception_type:(p=v[0])==null?void 0:p.type,$sentry_tags:o.tags};return n&&r&&(_.$sentry_url=(i||"https://sentry.io/organizations/")+n+"/issues/?project="+r+"&query="+o.event_id),a&&e.exceptions.sendExceptionEvent(_),o}}let Kke=class{constructor(t,n,r,i,s,a){this.name=yse,this.setupOnce=function(o){o(bse(t,{organization:n,projectId:r,prefix:i,severityAllowList:s,sendExceptionsToPostHog:a==null||a}))}}};var Yke=at!=null&&at.location?aN(at.location.hash,"__posthog")||aN(location.hash,"state"):null,mG="_postHogToolbarParams",gG=Ra("[Toolbar]"),Ip=(function(e){return e[e.UNINITIALIZED=0]="UNINITIALIZED",e[e.LOADING=1]="LOADING",e[e.LOADED=2]="LOADED",e})(Ip||{});let Xke=class{constructor(t){this.instance=t}xt(t){$n.ph_toolbar_state=t}St(){var t;return(t=$n.ph_toolbar_state)!==null&&t!==void 0?t:Ip.UNINITIALIZED}maybeLoadToolbar(t,n,r){if(t===void 0&&(t=void 0),n===void 0&&(n=void 0),r===void 0&&(r=void 0),!at||!ln)return!1;t=t??at.location,r=r??at.history;try{if(!n){try{at.localStorage.setItem("test","test"),at.localStorage.removeItem("test")}catch{return!1}n=at?.localStorage}var i,s=Yke||aN(t.hash,"__posthog")||aN(t.hash,"state"),a=s?tG((()=>JSON.parse(atob(decodeURIComponent(s)))))||tG((()=>JSON.parse(decodeURIComponent(s)))):null;return a&&a.action==="ph_authorize"?((i=a).source="url",i&&Object.keys(i).length>0&&(a.desiredHash?t.hash=a.desiredHash:r?r.replaceState(r.state,"",t.pathname+t.search):t.hash="")):((i=JSON.parse(n.getItem(mG)||"{}")).source="localstorage",delete i.userIntent),!(!i.token||this.instance.config.token!==i.token)&&(this.loadToolbar(i),!0)}catch{return!1}}Et(t){var n=$n.ph_load_toolbar||$n.ph_load_editor;!Qi(n)&&Jp(n)?n(t,this.instance):gG.warn("No toolbar load function found")}loadToolbar(t){var n=!(ln==null||!ln.getElementById(rse));if(!at||n)return!1;var r=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,i=dn({token:this.instance.config.token},t,{apiURL:this.instance.requestRouter.endpointFor("ui")},r?{instrument:!1}:{});if(at.localStorage.setItem(mG,JSON.stringify(dn({},i,{source:void 0}))),this.St()===Ip.LOADED)this.Et(i);else if(this.St()===Ip.UNINITIALIZED){var s;this.xt(Ip.LOADING),(s=$n.__PosthogExtensions__)==null||s.loadExternalDependency==null||s.loadExternalDependency(this.instance,"toolbar",(a=>{if(a)return gG.error("[Toolbar] Failed to load",a),void this.xt(Ip.UNINITIALIZED);this.xt(Ip.LOADED),this.Et(i)})),ma(at,"turbolinks:load",(()=>{this.xt(Ip.UNINITIALIZED),this.loadToolbar(i)}))}return!0}$t(t){return this.loadToolbar(t)}maybeLoadEditor(t,n,r){return t===void 0&&(t=void 0),n===void 0&&(n=void 0),r===void 0&&(r=void 0),this.maybeLoadToolbar(t,n,r)}};var Qke=Ra("[TracingHeaders]");let Zke=class{constructor(t){this.kt=void 0,this.Pt=void 0,this.lt=()=>{var n,r;en(this.kt)&&((n=$n.__PosthogExtensions__)==null||(n=n.tracingHeadersPatchFns)==null||n._patchXHR(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager)),en(this.Pt)&&((r=$n.__PosthogExtensions__)==null||(r=r.tracingHeadersPatchFns)==null||r._patchFetch(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager))},this._instance=t}nt(t){var n,r;(n=$n.__PosthogExtensions__)!=null&&n.tracingHeadersPatchFns&&t(),(r=$n.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"tracing-headers",(i=>{if(i)return Qke.error("failed to load script",i);t()}))}startIfEnabledOrStop(){var t,n;this._instance.config.__add_tracing_headers?this.nt(this.lt):((t=this.kt)==null||t.call(this),(n=this.Pt)==null||n.call(this),this.kt=void 0,this.Pt=void 0)}};var kc="Mobile",oN="iOS",_d="Android",b2="Tablet",_se=_d+" "+b2,wse="iPad",Sse="Apple",Ese=Sse+" Watch",_2="Safari",G1="BlackBerry",Cse="Samsung",Tse=Cse+"Browser",Ase=Cse+" Internet",y0="Chrome",Jke=y0+" OS",kse=y0+" "+oN,d9="Internet Explorer",Nse=d9+" "+kc,f9="Opera",eNe=f9+" Mini",h9="Edge",jse="Microsoft "+h9,v
vendor: 4,403 bytes, line 26
261="Firefox",Rse=v1+" "+oN,w2="Nintendo",S2="PlayStation",y1="Xbox",Ise=_d+" "+kc,Ose=kc+" "+_2,iw="Windows",ZD=iw+" Phone",xG="Nokia",JD="Ouya",Pse="Generic",tNe=Pse+" "+kc.toLowerCase(),Mse=Pse+" "+b2.toLowerCase(),e6="Konqueror",ko="(\\d+(\\.\\d+)?)",xO=new RegExp("Version/"+ko),nNe=new RegExp(y1,"i"),rNe=new RegExp(S2+" \\w+","i"),iNe=new RegExp(w2+" \\w+","i"),p9=new RegExp(G1+"|PlayBook|BB10","i"),sNe={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},aNe=(e,t)=>t&&vr(t,Sse)||(function(n){return vr(n,_2)&&!vr(n,y0)&&!vr(n,_d)})(e),Dse=function(e,t){return t=t||"",vr(e," OPR/")&&vr(e,"Mini")?eNe:vr(e," OPR/")?f9:p9.test(e)?G1:vr(e,"IE"+kc)||vr(e,"WPDesktop")?Nse:vr(e,Tse)?Ase:vr(e,h9)||vr(e,"Edg/")?jse:vr(e,"FBIOS")?"Facebook "+kc:vr(e,"UCWEB")||vr(e,"UCBrowser")?"UC Browser":vr(e,"CriOS")?kse:vr(e,"CrMo")||vr(e,y0)?y0:vr(e,_d)&&vr(e,_2)?Ise:vr(e,"FxiOS")?Rse:vr(e.toLowerCase(),e6.toLowerCase())?e6:aNe(e,t)?vr(e,kc)?Ose:_2:vr(e,v1)?v1:vr(e,"MSIE")||vr(e,"Trident/")?d9:vr(e,"Gecko")?v1:""},oNe={[Nse]:[new RegExp("rv:"+ko)],[jse]:[new RegExp(h9+"?\\/"+ko)],[y0]:[new RegExp("("+y0+"|CrMo)\\/"+ko)],[kse]:[new RegExp("CriOS\\/"+ko)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+ko)],[_2]:[xO],[Ose]:[xO],[f9]:[new RegExp("(Opera|OPR)\\/"+ko)],[v1]:[new RegExp(v1+"\\/"+ko)],[Rse]:[new RegExp("FxiOS\\/"+ko)],[e6]:[new RegExp("Konqueror[:/]?"+ko,"i")],[G1]:[new RegExp(G1+" "+ko),xO],[Ise]:[new RegExp("android\\s"+ko,"i")],[Ase]:[new RegExp(Tse+"\\/"+ko)],[d9]:[new RegExp("(rv:|MSIE )"+ko)],Mozilla:[new RegExp("rv:"+ko)]},lNe=function(e,t){var n=Dse(e,t),r=oNe[n];if(en(r))return null;for(var i=0;i<r.length;i++){var s=r[i],a=e.match(s);if(a)return parseFloat(a[a.length-2])}return null},vG=[[new RegExp(y1+"; "+y1+" (.*?)[);]","i"),e=>[y1,e&&e[1]||""]],[new RegExp(w2,"i"),[w2,""]],[new RegExp(S2,"i"),[S2,""]],[p9,[G1,""]],[new RegExp(iw,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[ZD,""];if(new RegExp(kc).test(t)&&!/IEMobile\b/.test(t))return[iw+" "+kc,""];var n=/Windows NT ([0-9.]+)/i.exec(t);if(n&&n[1]){var r=n[1],i=sNe[r]||"";return/arm/i.test(t)&&(i="RT"),[iw,i]}return[iw,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>{if(e&&e[3]){var t=[e[3],e[4],e[5]||"0"];return[oN,t.join(".")]}return[oN,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=en(e[2])?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+_d+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+_d+")","i"),e=>{if(e&&e[2]){var t=[e[2],e[3],e[4]||"0"];return[_d,t.join(".")]}return[_d,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var t=["Mac OS X",""];if(e&&e[1]){var n=[e[1],e[2],e[3]||"0"];t[1]=n.join(".")}return t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[Jke,""]],[/Linux|debian/i,["Linux",""]]],yG=function(e){return iNe.test(e)?w2:rNe.test(e)?S2:nNe.test(e)?y1:new RegExp(JD,"i").test(e)?JD:new RegExp("("+ZD+"|WPDesktop)","i").test(e)?ZD:/iPad/.test(e)?wse:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?Ese:p9.test(e)?G1:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(xG,"i").test(e)?xG:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?!new RegExp(kc).test(e)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)?/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?_d:_se:_d:new RegExp("(pda|"+kc+")","i").test(e)?tNe:new RegExp(b2,"i").test(e)&&!new RegExp(b2+" pc","i").test(e)?Mse:""},PT="https?://(.*)",jy=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],cNe=Ny(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],jy),KS="<masked>",uNe=["li_fat_id"];function Fse(e,t,n){if(!ln)return{};var r,i=t?Ny([],jy,n||[]):[],s=Lse(GS(ln.URL,i,KS),e),a=(r={},Oi(uNe,(function(o){var c=Td.J(o);r[o]=c||null})),r);return Ps(a,s)}function Lse(e,t){var n=cNe.concat(t||[]),r={};return Oi(n,(function(i){var s=sN(e,i);r[i]=s||null})),r}function zse(e){var t=(function(s){return s?s.search(PT+"google.([^/?]*)")===0?"google":s.search(PT+"bing.com")===0?"bing":s.search(PT+"yaho
26o.com")===0?"yahoo":s.search(PT+"duckduckgo.com")===0?"duckduckgo":null:null})(e),n=t!="yahoo"?"q":"p",r={};if(!Lh(t)){r.$search_engine=t;var i=ln?sN(ln.referrer,n):"";i.length&&(r.ph_keyword=i)}return r}function bG(){return navigator.language||navigator.userLanguage}function $se(){return ln?.referrer||"$direct"}function Bse(e,t){var n=e?Ny([],jy,t||[]):[],r=al?.href.substring(0,1e3);return{r:$se().substring(0,1e3),u:r?GS(r,n,KS):void 0}}function Use(e){var t,{r:n,u:r}=e,i={$referrer:n,$referring_domain:n==null?void 0:n=="$direct"?"$direct":(t=iN(n))==null?void 0:t.host};if(r){i.$current_url=r;var s=iN(r);i.$host=s?.host,i.$pathname=s?.pathname;var a=Lse(r);Ps(i,a)}if(n){var o=zse(n);Ps(i,o)}return i}function Vse(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function dNe(){try{return new Date().getTimezoneOffset()}catch{return}}function fNe(e,t){if(!rl)return{};var n,r,i,s=e?Ny([],jy,t||[]):[],[a,o]=(function(c){for(var u=0;u<vG.length;u++){var[d,h]=vG[u],p=d.exec(c),g=p&&(Jp(h)?h(p,c):h);if(g)return g}return["",""]})(rl);return Ps(o9({$os:a,$os_version:o,$browser:Dse(rl,navigator.vendor),$device:yG(rl),$device_type:(r=rl,i=yG(r),i===wse||i===_se||i==="Kobo"||i==="Kindle Fire"||i===Mse?b2:i===w2||i===y1||i===S2||i===JD?"Console":i===Ese?"Wearable":i?kc:"Desktop"),$timezone:Vse(),$timezone_offset:dNe()}),{$current_url:GS(al?.href,s,KS),$host:al?.host,$pathname:al?.pathname,$raw_user_agent:rl.length>1e3?rl.substring(0,997)+"...":rl,$browser_version:lNe(rl,navigator.vendor),$browser_language:bG(),$browser_language_prefix:(n=bG(),typeof n=="string"?n.split("-")[0]:void 0),$screen_height:at?.screen.height,$screen_width:at?.screen.width,$viewport_height:at?.innerHe
vendor: 7,261 bytes, line 26
26ight,$viewport_width:at?.innerWidth,$lib:"web",$lib_version:Df.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}var wp=Ra("[Web Vitals]"),_G=9e5;let hNe=class{constructor(t){var n;this.Tt=!1,this.C=!1,this.q={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.It=()=>{clearTimeout(this.Rt),this.q.metrics.length!==0&&(this._instance.capture("$web_vitals",this.q.metrics.reduce(((r,i)=>dn({},r,{["$web_vitals_"+i.name+"_event"]:dn({},i),["$web_vitals_"+i.name+"_value"]:i.value})),{})),this.q={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.Ct=r=>{var i,s=(i=this._instance.sessionManager)==null?void 0:i.checkAndGetSessionAndWindowId(!0);if(en(s))wp.error("Could not read session ID. Dropping metrics!");else{this.q=this.q||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var a=this.Ot();en(a)||(Qi(r?.name)||Qi(r?.value)?wp.error("Invalid metric received",r):this.Ft&&r.value>=this.Ft?wp.error("Ignoring metric with value >= "+this.Ft,r):(this.q.url!==a&&(this.It(),this.Rt=setTimeout(this.It,this.flushToCaptureTimeoutMs)),en(this.q.url)&&(this.q.url=a),this.q.firstMetricTimestamp=en(this.q.firstMetricTimestamp)?Date.now():this.q.firstMetricTimestamp,r.attribution&&r.attribution.interactionTargetElement&&(r.attribution.interactionTargetElement=void 0),this.q.metrics.push(dn({},r,{$current_url:a,$session_id:s.sessionId,$window_id:s.windowId,timestamp:Date.now()})),this.q.metrics.length===this.allowedMetrics.length&&this.It()))}},this.lt=()=>{var r,i,s,a,o=$n.__PosthogExtensions__;en(o)||en(o.postHogWebVitalsCallbacks)||({onLCP:r,onCLS:i,onFCP:s,onINP:a}=o.postHogWebVitalsCallbacks),r&&i&&s&&a?(this.allowedMetrics.indexOf("LCP")>-1&&r(this.Ct.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&i(this.Ct.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&s(this.Ct.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&a(this.Ct.bind(this)),this.C=!0):wp.error("web vitals callbacks not loaded - not starting")},this._instance=t,this.Tt=!((n=this._instance.persistence)==null||!n.props[sG]),this.startIfEnabled()}get allowedMetrics(){var t,n,r=fo(this._instance.config.capture_performance)?(t=this._instance.config.capture_performance)==null?void 0:t.web_vitals_allowed_metrics:void 0;return en(r)?((n=this._instance.persistence)==null?void 0:n.props[aG])||["CLS","FCP","INP","LCP"]:r}get flushToCaptureTimeoutMs(){return(fo(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals_delayed_flush_ms:void 0)||5e3}get Ft(){var t=fo(this._instance.config.capture_performance)&&Fd(this._instance.config.capture_performance.__web_vitals_max_value)?this._instance.config.capture_performance.__web_vitals_max_value:_G;return 0<t&&t<=6e4?_G:t}get isEnabled(){var t=al?.protocol;if(t!=="http:"&&t!=="https:")return wp.info("Web Vitals are disabled on non-http/https protocols"),!1;var n=fo(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals:em(this._instance.config.capture_performance)?this._instance.config.capture_performance:void 0;return em(n)?n:this.Tt}startIfEnabled(){this.isEnabled&&!this.C&&(wp.info("enabled, starting..."),this.nt(this.lt))}onRemoteConfig(t){var n=fo(t.capturePerformance)&&!!t.capturePerformance.web_vitals,r=fo(t.capturePerformance)?t.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[sG]:n}),this._instance.persistence.register({[aG]:r})),this.Tt=n,this.startIfEnabled()}nt(t){var n,r;(n=$n.__PosthogExtensions__)!=null&&n.postHogWebVitalsCallbacks&&t(),(r=$n.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"web-vitals",(i=>{i?wp.error("failed to load script",i):t()}))}Ot(){var t=at?at.location.href:void 0;if(t){var n=this._instance.config.mask_personal_data_properties,r=this._instance.config.custom_personal_data_properties,i=n?Ny([],jy,r||[]):[];return GS(t,i,KS)}wp.error("Could not determine current URL")}};var pNe=Ra("[Heatmaps]");function wG(e){return fo(e)&&"clientX"in e&&"clientY"in e&&Fd(e.clientX)&&Fd(e.clientY)}let mNe=class{constructor(t){var n;this.rageclicks=new gse,this.Tt=!1,this.C=!1,this.Mt=null,this.instance=t,this.Tt=!((n=this.instance.persistence)==null||!n.props[UD])}get flushIntervalMilliseconds(){var t=5e3;return fo(this.instance.config.capture_heatmaps)&&this.instance.config.capture_heatmaps.flush_interval_milliseconds&&(t=this.instance.config.capture_heatmaps.flush_interval_milliseconds),t}get isEnabled(){return en(this.instance.config.capture_heatmaps)?en(this.instance.config.enable_heatmaps)?this.Tt:this.instance.config.enable_heatmaps:this.instance.config.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this.C)return;pNe.info("starting..."),this.At(),this.Mt=setInterval(this.jt.bind(this),this.flushIntervalMilliseconds)}else{var t,n;clearInterval((t=this.Mt)!==null&&t!==void 0?t:void 0),(n=this.Dt)==null||n.stop(),this.getAndClearBuffer()}}onRemoteConfig(t){var n=!!t.heatmaps;this.instance.persistence&&this.instance.persistence.register({[UD]:n}),this.Tt=n,this.startIfEnabled()}getAndClearBuffer(){var t=this.q;return this.q=void 0,t}Lt(t){this.Nt(t.originalEvent,"deadclick")}At(){at&&ln&&(ma(at,"beforeunload",this.jt.bind(this)),ma(ln,"click",(t=>this.Nt(t||at?.event)),{capture:!0}),ma(ln,"mousemove",(t=>this.Ut(t||at?.event)),{capture:!0}),this.Dt=new vse(this.instance,Vke,this.Lt.bind(this)),this.Dt.startIfEnabled(),this.C=!0)}zt(t,n){var r=this.instance.scrollManager.scrollY(),i=this.instance.scrollManager.scrollX(),s=this.instance.scrollManager.scrollElement(),a=(function(o,c,u){for(var d=o;d&&xj(d)&&!nm(d,"body");){if(d===u)return!1;if(vr(c,at?.getComputedStyle(d).position))return!0;d=cse(d)}return!1})(ose(t),["fixed","sticky"],s);return{x:t.clientX+(a?0:i),y:t.clientY+(a?0:r),target_fixed:a,type:n}}Nt(t,n){var r;if(n===void 0&&(n="click"),!oG(t.target)&&wG(t)){var i=this.zt(t,n);(r=this.rageclicks)!=null&&r.isRageClick(t.clientX,t.clientY,new Date().getTime())&&this.Ht(dn({},i,{type:"rageclick"})),this.Ht(i)}}Ut(t){!oG(t.target)&&wG(t)&&(clearTimeout(this.Bt),this.Bt=setTimeout((()=>{this.Ht(this.zt(t,"mousemove"))}),500))}Ht(t){if(at){var n=at.location.href,r=this.instance.config.mask_personal_data_properties,i=this.instance.config.custom_personal_data_properties,s=r?Ny([],jy,i||[]):[],a=GS(n,s,KS);this.q=this.q||{},this.q[a]||(this.q[a]=[]),this.q[a].push(t)}}jt(){this.q&&!e1(this.q)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},gNe=class{constructor(t){this._instance=t}doPageView(t,n){var r,i=this.qt(t,n);return this.Wt={pathname:(r=at?.location.pathname)!==null&&r!==void 0?r:"",pageViewId:n,timestamp:t},this._instance.scrollManager.resetContext(),i}doPageLeave(t){var n;return this.qt(t,(n=this.Wt)==null?void 0:n.pageViewId)}doEvent(){var t;return{$pageview_id:(t=this.Wt)==null?void 0:t.pageViewId}}qt(t,n){var r=this.Wt;if(!r)return{$pageview_id:n};var i={$pageview_id:n,$prev_pageview_id:r.pageViewId},s=this._instance.scrollManager.getContext();if(s&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:a,lastScrollY:o,maxScrollY:c,maxContentHeight:u,last
vendor: 4,318 bytes, line 26
26ContentY:d,maxContentY:h}=s;if(!(en(a)||en(o)||en(c)||en(u)||en(d)||en(h))){a=Math.ceil(a),o=Math.ceil(o),c=Math.ceil(c),u=Math.ceil(u),d=Math.ceil(d),h=Math.ceil(h);var p=a<=1?1:bd(o/a,0,1,on),g=a<=1?1:bd(c/a,0,1,on),v=u<=1?1:bd(d/u,0,1,on),x=u<=1?1:bd(h/u,0,1,on);i=Ps(i,{$prev_pageview_last_scroll:o,$prev_pageview_last_scroll_percentage:p,$prev_pageview_max_scroll:c,$prev_pageview_max_scroll_percentage:g,$prev_pageview_last_content:d,$prev_pageview_last_content_percentage:v,$prev_pageview_max_content:h,$prev_pageview_max_content_percentage:x})}}return r.pathname&&(i.$prev_pageview_pathname=r.pathname),r.timestamp&&(i.$prev_pageview_duration=(t.getTime()-r.timestamp.getTime())/1e3),i}};var Nc=Uint8Array,cl=Uint16Array,K1=Uint32Array,m9=new Nc([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),g9=new Nc([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),SG=new Nc([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Hse=function(e,t){for(var n=new cl(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var i=new K1(n[30]);for(r=1;r<30;++r)for(var s=n[r];s<n[r+1];++s)i[s]=s-n[r]<<5|r;return[n,i]},qse=Hse(m9,2),xNe=qse[0],t6=qse[1];xNe[28]=258,t6[258]=28;for(var EG=Hse(g9,0)[1],Wse=new cl(32768),Vi=0;Vi<32768;++Vi){var _g=(43690&Vi)>>>1|(21845&Vi)<<1;_g=(61680&(_g=(52428&_g)>>>2|(13107&_g)<<2))>>>4|(3855&_g)<<4,Wse[Vi]=((65280&_g)>>>8|(255&_g)<<8)>>>1}var Aw=function(e,t,n){for(var r=e.length,i=0,s=new cl(t);i<r;++i)++s[e[i]-1];var a,o=new cl(t);for(i=0;i<t;++i)o[i]=o[i-1]+s[i-1]<<1;for(a=new cl(r),i=0;i<r;++i)a[i]=Wse[o[e[i]-1]++]>>>15-e[i];return a},b0=new Nc(288);for(Vi=0;Vi<144;++Vi)b0[Vi]=8;for(Vi=144;Vi<256;++Vi)b0[Vi]=9;for(Vi=256;Vi<280;++Vi)b0[Vi]=7;for(Vi=280;Vi<288;++Vi)b0[Vi]=8;var lN=new Nc(32);for(Vi=0;Vi<32;++Vi)lN[Vi]=5;var vNe=Aw(b0,9),yNe=Aw(lN,5),Gse=function(e){return(e/8>>0)+(7&e&&1)},Kse=function(e,t,n){(n==null||n>e.length)&&(n=e.length);var r=new(e instanceof cl?cl:e instanceof K1?K1:Nc)(n-t);return r.set(e.subarray(t,n)),r},Tf=function(e,t,n){n<<=7&t;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8},h_=function(e,t,n){n<<=7&t;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},vO=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,s=n.slice();if(!i)return[new Nc(0),0];if(i==1){var a=new Nc(n[0].s+1);return a[n[0].s]=1,[a,1]}n.sort((function(N,A){return N.f-A.f})),n.push({s:-1,f:25001});var o=n[0],c=n[1],u=0,d=1,h=2;for(n[0]={s:-1,f:o.f+c.f,l:o,r:c};d!=i-1;)o=n[n[u].f<n[h].f?u++:h++],c=n[u!=d&&n[u].f<n[h].f?u++:h++],n[d++]={s:-1,f:o.f+c.f,l:o,r:c};var p=s[0].s;for(r=1;r<i;++r)s[r].s>p&&(p=s[r].s);var g=new cl(p+1),v=n6(n[d-1],g,0);if(v>t){r=0;var x=0,_=v-t,w=1<<_;for(s.sort((function(N,A){return g[A.s]-g[N.s]||N.f-A.f}));r<i;++r){var S=s[r].s;if(!(g[S]>t))break;x+=w-(1<<v-g[S]),g[S]=t}for(x>>>=_;x>0;){var E=s[r].s;g[E]<t?x-=1<<t-g[E]++-1:++r}for(;r>=0&&x;--r){var T=s[r].s;g[T]==t&&(--g[T],++x)}v=t}return[new Nc(g),v]},n6=function(e,t,n){return e.s==-1?Math.max(n6(e.l,t,n+1),n6(e.r,t,n+1)):t[e.s]=n},CG=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new cl(++t),r=0,i=e[0],s=1,a=function(c){n[r++]=c},o=1;o<=t;++o)if(e[o]==i&&o!=t)++s;else{if(!i&&s>2){for(;s>138;s-=138)a(32754);s>2&&(a(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(a(i),--s;s>6;s-=6)a(8304);s>2&&(a(s-3<<5|8208),s=0)}for(;s--;)a(i);s=1,i=e[o]}return[n.subarray(0,r),t]},p_=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},r6=function(e,t,n){var r=n.length,i=Gse(t+2);e[i]=255&r,e[i+1]=r>>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var s=0;s<r;++s)e[i+s+4]=n[s];return 8*(i+4+r)},TG=function(e,t,n,r,i,s,a,o,c,u,d){Tf(t,d++,n),++i[256];for(var h=vO(i,15),p=h[0],g=h[1],v=vO(s,15),x=v[0],_=v[1],w=CG(p),S=w[0],E=w[1],T=CG(x),N=T[0],A=T[1],k=new cl(19),j=0;j<S.length;++j)k[31&S[j]]++;for(j=0;j<N.length;++j)k[31&N[j]]++;for(var R=vO(k,7),P=R[0],V=R[1],U=19;U>4&&!P[SG[U-1]];--U);var G,Q,Z,K,te=u+5<<3,ne=p_(i,b0)+p_(s,lN)+a,se=p_(i,p)+p_(s,x)+a+14+3*U+p_(k,P)+(2*k[16]+3*k[17]+7*k[18]);if(te<=ne&&te<=se)return r6(t,d,e.subarray(c,c+u));if(Tf(t,d,1+(se<ne)),d+=2,se<ne){G=Aw(p,g),Q=p,Z=Aw(x,_),K=x;var H=Aw(P,V);for(Tf(t,d,E-257),Tf(t,d+5,A-1),Tf(t,d+10,U-4),d+=14,j=0;j<U;++j)Tf(t,d+3*j,P[SG[j]]);d+=3*U;for(var O=[S,N],L=0;L<2;++L){var M=O[L];for(j=0;j<M.length;++j){var q=31&M[j];Tf(t,d,H[q]),d+=P[q],q>
vendor: 5,074 bytes, lines 26-28
2615&&(Tf(t,d,M[j]>>>5&127),d+=M[j]>>>12)}}}else G=vNe,Q=b0,Z=yNe,K=lN;for(j=0;j<o;++j)if(r[j]>255){q=r[j]>>>18&31,h_(t,d,G[q+257]),d+=Q[q+257],q>7&&(Tf(t,d,r[j]>>>23&31),d+=m9[q]);var X=31&r[j];h_(t,d,Z[X]),d+=K[X],X>3&&(h_(t,d,r[j]>>>5&8191),d+=g9[X])}else h_(t,d,G[r[j]]),d+=Q[r[j]];return h_(t,d,G[256]),d+Q[256]},bNe=new K1([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),_Ne=(function(){for(var e=new K1(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(1&n&&3988292384)^n>>>1;e[t]=n}return e})(),wNe=function(e,t,n,r,i){return(function(s,a,o,c,u,d){var h=s.length,p=new Nc(c+h+5*(1+Math.floor(h/7e3))+u),g=p.subarray(c,p.length-u),v=0;if(!a||h<8)for(var x=0;x<=h;x+=65535){var _=x+65535;_<h?v=r6(g,v,s.subarray(x,_)):(g[x]=d,v=r6(g,v,s.subarray(x,h)))}else{for(var w=bNe[a-1],S=w>>>13,E=8191&w,T=(1<<o)-1,N=new cl(32768),A=new cl(T+1),k=Math.ceil(o/3),j=2*k,R=function(Se){return(s[Se]^s[Se+1]<<k^s[Se+2]<<j)&T},P=new K1(25e3),V=new cl(288),U=new cl(32),G=0,Q=0,Z=(x=0,0),K=0,te=0;x<h;++x){var ne=R(x),se=32767&x,H=A[ne];if(N[se]=H,A[ne]=se,K<=x){var O=h-x;if((G>7e3||Z>24576)&&O>423){v=TG(s,g,0,P,V,U,Q,Z,te,x-te,v),Z=G=Q=0,te=x;for(var L=0;L<286;++L)V[L]=0;for(L=0;L<30;++L)U[L]=0}var M=2,q=0,X=E,J=se-H&32767;if(O>2&&ne==R(x-J))for(var W=Math.min(S,O)-1,re=Math.min(32767,x),ae=Math.min(258,O);J<=re&&--X&&se!=H;){if(s[x+M]==s[x+M-J]){for(var ce=0;ce<ae&&s[x+ce]==s[x+ce-J];++ce);if(ce>M){if(M=ce,q=J,ce>W)break;var Te=Math.min(J,ce-2),fe=0;for(L=0;L<Te;++L){var xe=x-J+L+32768&32767,ke=xe-N[xe]+32768&32767;ke>fe&&(fe=ke,H=xe)}}}J+=(se=H)-(H=N[se])+32768&32767}if(q){P[Z++]=268435456|t6[M]<<18|EG[q];var Fe=31&t6[M],tt=31&EG[q];Q+=m9[Fe]+g9[tt],++V[257+Fe],++U[tt],K=x+M,++G}else P[Z++]=s[x],++V[s[x]]}}v=TG(s,g,d,P,V,U,Q,Z,te,x-te,v)}return Kse(p,0,c+Gse(v)+u)})(e,t.level==null?6:t.level,t.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,n,r,!0)},yO=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};function SNe(e,t){t===void 0&&(t={});var n=(function(){var o=4294967295;return{p:function(c){for(var u=o,d=0;d<c.length;++d)u=_Ne[255&u^c[d]]^u>>>8;o=u},d:function(){return 4294967295^o}}})(),r=e.length;n.p(e);var i,s=wNe(e,t,10+((i=t).filename&&i.filename.length+1||0),8),a=s.length;return(function(o,c){var u=c.filename;if(o[0]=31,o[1]=139,o[2]=8,o[8]=c.level<2?4:c.level==9?2:0,o[9]=3,c.mtime!=0&&yO(o,4,Math.floor(new Date(c.mtime||Date.now())/1e3)),u){o[3]=8;for(var d=0;d<=u.length;++d)o[d+10]=u.charCodeAt(d)}})(s,t),yO(s,a-8,n.d()),yO(s,a-4,r),s}var ENe=function(e){var t,n,r,i,s="";for(t=n=0,r=(e=(e+"").replace(/\r\n/g,` 27`).replace(/\r/g,` 28`)).length,i=0;i<r;i++){var a=e.charCodeAt(i),o=null;a<128?n++:o=a>127&&a<2048?String.fromCharCode(a>>6|192,63&a|128):String.fromCharCode(a>>12|224,a>>6&63|128,63&a|128),Lh(o)||(n>t&&(s+=e.substring(t,n)),s+=o,t=n=i+1)}return n>t&&(s+=e.substring(t,e.length)),s},CNe=!!FD||!!DD,AG="text/plain",cN=(e,t)=>{var[n,r]=e.split("?"),i=dn({},t);r?.split("&").forEach((a=>{var[o]=a.split("=");delete i[o]}));var s=Nke(i);return n+"?"+(s=s?(r?r+"&":"")+s:r)},sw=(e,t)=>JSON.stringify(e,((n,r)=>typeof r=="bigint"?r.toString():r),t),bO=e=>{var{data:t,compression:n}=e;if(t){if(n===qf.GZipJS){var r=SNe((function(c,u){var d=c.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(c);for(var h=new Nc(c.length+(c.length>>>1)),p=0,g=function(w){h[p++]=w},v=0;v<d;++v){if(p+5>h.length){var x=new Nc(p+8+(d-v<<1));x.set(h),h=x}var _=c.charCodeAt(v);_<128||u?g(_):_<2048?(g(192|_>>>6),g(128|63&_)):_>55295&&_<57344?(g(240|(_=65536+(1047552&_)|1023&c.charCodeAt(++v))>>>18),g(128|_>>>12&63),g(128|_>>>6&63),g(128|63&_)):(g(224|_>>>12),g(128|_>>>6&63),g(128|63&_))}return Kse(h,0,p)})(sw(t)),{mtime:0}),i=new Blob([r],{type:AG});return{contentType:AG,body:i,estimatedSize:i.size}}if(n===qf.Base64){var s=(function(c){var u,d,h,p,g,v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",x=0,_=0,w="",S=[];if(!c)return c;c=ENe(c);do u=(g=c.charCodeAt(x++)<<16|c.charCodeAt(x++)<<8|c.charCodeAt(x++))>>18&63,d=g>>12&63,h=g>>6&63,p=63&g,S[_++]=v.charAt(u)+v.charAt(d)+v.charAt(h)+v.charAt(p);while(x<c.length);switch(w=S.join(""),c.length%3){case 1:w=w.slice(0,-2)+"==";break;case 2:w=w.slice(0,-1)+"="}return w})(sw(t)),a=(c=>"data="+encodeURIComponent(typeof c=="string"?c:sw(c)))(s);return{contentType:"application/x-www-form-urlencoded",body:a,estimatedSize:new Blob([a]).size}}var o=sw(t);return{contentType:"application/json",body:o,estimatedSize:new Blob([o]).size}}},sk=[];DD&&sk.push({transport:"fetch",method:e=>{var t,n,{contentType:r,body:i,estimatedSize:s}=(t=bO(e))!==null&&t!==void 0?t:{},a=new Headers;Oi(e.headers,(function(d,h){a.append(h,d)})),r&&a.append("Content-Type",r);var o=e.url,c=null;if(KW){var u=new KW;c={signal:u.signal,timeout:setTimeout((()=>u.abort()),e.timeout)}}DD(o,dn({method:e?.method||"GET",headers:a,keepalive:e.method==="POST"&&(s||0)<52428.8,body:i,signal:(n=c)==null?void 0:n.signal},e.fetchOptions)).then((d=>d.text().then((h=>{var p={statusCode:d.status,text:h};if(d.status===200)try{p.json=JSON.parse(h)}catch(g){on.error(g)}
28e.callback==null||e.callback(p)})))).catch((d=>{on.error(d),e.callback==null||e.callback({statusCode:0,text:d})})).finally((()=>c?clearTimeout(c.timeout):null))}}),FD&&sk.push({transport:"XHR",method:e=>{var t,n=new FD;n.open(e.method||"GET",e.url,!0);var{contentType:r,body:i}=(t=bO(e))!==null&&t!==void 0?t:{};Oi(e.headers,(function(s,a){n.setRequestHeader(a,s)})),r&&n.setRequestHeader("Content-Type",r),e.timeout&&(n.timeout=e.timeout),e.disableXHRCredentials||(n.withCredentials=!0),n.onreadystatechange=()=>{if(n.readyState===4){var s={statusCode:n.status,text:n.responseText};if(n.status===200)try{s.json=JSON.parse(n.responseText)}catch{}e.callback==null||e.callback(s)}},n.send(i)}}),Hl!=null&&Hl.sendBeacon&&sk.push({transport:"sendBeacon",method:e=>{var t=cN(e.url,{beacon:"1"});try{var n,{contentType:r,body:i}=(n=bO(e))!==null&&n!==void 0?n:{},s=typeof i=="string"?new Blob([i],{type:r}):i;Hl.sendBeacon(t,s)}catch{}}});var Y1=function(e,t){if(!(function(n){try{new RegExp(n)}catch{return!1}return!0})(t))return!1;try{return new RegExp(t).test(e)}catch{return!1}};function kG(e,t,n){return sw({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:n})}var Yse={exact:(e,t)=>t.some((n=>e.some((r=>n===r)))),is_not:(e,t)=>t.every((n=>e.every((r=>n!==r)))),regex:(e,t)=>t.some((n=>e.some((r=>Y1(n,r))))),not_regex:(e,t)=>t.every((n=>e.every((r=>!Y1(n,r))))),icontains:(e,t)=>t.map(MT).some((n=>e.map(MT).some((r=>n.includes(r))))),not_icontains:(e,t)=>t.map(MT).every((n=>e.map(MT).every((r=>!n.includes(r)))))},MT=e=>e.toLowerCase(),NG=Ra("[Error tracking]");let TNe=class{constructor(t){var n,r;this.Gt=[],this.Vt=new ske([new ake,new mke,new lke,new oke,new hke,new fke,new uke,new pke],[eke,rke]),this._instance=t,this.Gt=(n=(r=this._instance.persistence)==null?void 0:r.get_property(VD))!==null&&n!==void 0?n:[]}onRemoteConfig(t){var n,r,i,s=(n=(r=t.errorTracking)==null?void 0:r.suppressionRules)!==null&&n!==void 0?n:[],a=(i=t.errorTracking)==null?void 0:i.captureExtensionExceptions;this.Gt=s,this._instance.persistence&&this._instance.persistence.register({[VD]:this.Gt,[iG]:a})}get Jt(){var t,n=!!this._instance.get_property(iG),r=this._instance.config.error_tracking.captureExtensionExceptions;return(t=r??n)!==null&&t!==void 0&&t}buildProperties(t,n){return this.Vt.buildFromUnknown(t,{syntheticException:n?.syntheticException,mechanism:{handled:n?.handled}})}sendExceptionEvent(t){if(this.Kt(t))NG.info("Skipping exception capture because a suppression rule matched");else{if(this.Jt||!this.Yt(t))return this._instance.capture("$exception",t,{_noTruncate:!0,_batchKey:"exceptionEvent"});NG.info("Skipping exception capture because it was thrown by an extension")}}Kt(t){var n=t.$exception_list;if(!n||!Mi(n)||n.length===0)return!1;var r=n.reduce(((i,s)=>{var{type:a,value:o}=s;return pa(a)&&a.length>0&&i.$exception_types.push(a),pa(o)&&o.length>0&&i.$exception_values.push(o),i}),{$exception_types:[],$exception_values:[]});return this.Gt.some((i=>{var s=i.values.map((a=>{var o,c=Yse[a.operator],u=Mi(a.value)?a.value:[a.value],d=(o=r[a.key])!==null&&o!==void 0?o:[];return u.length>0&&c(u,d)}));return i.type==="OR"?s.some(Boolean):s.every(Boolean)}))}Yt(t){var n=t.$exception_list;return!(!n||!Mi(n))&&n.flatMap((r=>{var i,s;return(i=(s=r.stacktrace)==null?void 0:s.frames)!==null&&i!==void 0?i:[]})).some((r=>r.filename&&r.filename.startsWith("chrome-extension://")))}};var nu=Ra("[FeatureFlags]"),_O="$active_feature_flags",gv="$override_feature_flags",jG="$feature_flag_payloads",m_="$override_feature_flag_payloads",RG="$feature_flag_request_id",IG=e=>{var t={};for(var[n,r]of ik(e||{}))r&&(t[n]=r);return t},ANe=e=>{var t=e.flags;return t?(e.featureFlags=Object.fromEntries(Object.keys(t).map((n=>{var r;return[n,(r=t[n].variant)!==null&&r!==void 0?r:t[n].enabled]}))),e.featureFlagPayloads=Object.fromEntries(Object.keys(t).filter((n=>t[n].enabled)).filter((n=>{var r;return(r=t[n].metadata)==null?void 0:r.payload})).map((n=>{var r;return[n,(r=t[n].metadata)==null?void 0:r.payload]})))):nu.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),e},kNe=(function(e){return e.FeatureFlags="feature_flags",e.Recordings="recordings",e})({});let NNe=class{constructor(t){this.Xt=!1,this.Qt=!1,this.Zt=!1,this.ti=!1,this.ii=!1,this.ei=!1,this.ri=!1,this._instance=t,this.featureFlagEventHandlers=[]}si(){var t=this._instance.config.evaluation_environments;return t!=null&&t.length?t.filter((n=>{var r=n&&typeof n=="string"&&n.trim().length>0;return r||nu.error("Invalid evaluation environment found:",n,"Expected non-empty string"),r})):[]}ni(){return this.si().length>0}flags(){if(this._instance.config.__preview_remote_config)this.ei=!0;else{var t=!this.oi&&(this._instance.config.advanced_disable_feature_flags||this._instance.config.advanced_disable_feature_flags_on_first_load);this.ai({disableFlags:t})}}get hasLoadedFlags(){return this.Qt}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var t=this._instance.get_property(HD),n=this._instance.get_property(gv),r=this._instance.get_property(m_);if(!r&&!n)return t||{};var i=Ps({},t||{}),s=[...new Set([...Object.keys(r||{}),...Object.keys(n||{})])];for(var a of s){var o,c,u=i[a],d=n?.[a],h=en(d)?(o=u?.enabled)!==null&&o!==void 0&&o:!!d,p=en(d)?u.variant:typeof d=="str
28ing"?d:void 0,g=r?.[a],v=dn({},u,{enabled:h,variant:h?p??u?.variant:void 0});h!==u?.enabled&&(v.original_enabled=u?.enabled),p!==u?.variant&&(v.original_variant=u?.variant),g&&(v.metadata=dn({},u?.metadata,{payload:g,original_payload:u==null||(c=u.metadata)==null?void 0:c.payload})),i[a]=v}return this.Xt||(nu.warn(" Overriding feature flag details!",{flagDetails:t,overriddenPayloads:r,finalDetails:i}),this.Xt=!0),i}getFlagVariants(){var t=this._instance.get_property(t1),n=this._instance.get_property(gv);if(!n)return t||{};for(var r=Ps({},t),i=Object.keys(n),s=0;s<i.length;s++)r[i[s]]=n[i[s]];return this.Xt||(nu.warn(" Overriding feature flags!",{enabledFlags:t,overriddenFlags:n,finalFlags:r}),this.Xt=!0),r}getFlagPayloads(){var t=this._instance.get_property(jG),n=this._instance.get_property(m_);if(!n)return t||{};for(var r=Ps({},t||{}),i=Object.keys(n),s=0;s<i.length;s++)r[i[s]]=n[i[s]];return this.Xt||(nu.warn(" Overriding feature flag payloads!",{flagPayloads:t,overriddenPayloads:n,finalPayloads:r}),this.Xt=!0),r}reloadFeatureFlags(){this.ti||this._instance.config.advanced_disable_feature_flags||this.oi||(this.oi=setTimeout((()=>{this.ai()}),5))}li(){clearTimeout(this.oi),this.oi=void 0}ensureFlagsLoaded(){this.Qt||this.Zt||this.oi||this.reloadFeatureFlags()}setAnonymousDistinctId(t){this.$anon_distinct_id=t}setReloadingPaused(t){this.ti=t}ai(t){var n;if(this.li(),!this._instance.L())if(this.Zt)this.ii=!0;else{var r={token:this._instance.config.token,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:dn({},((n=this._instance.persistence)==null?void 0:n.get_initial_props())||{},this._instance.get_property(rw)||{}),group_properties:this._instance.get_property(Dg)};(t!=null&&t.disableFlags||this._instance.config.advanced_disable_feature_flags)&&(r.disable_flags=!0),this.ni()&&(r.evaluation_environments=this.si());var i=this._instance.config.__preview_remote_config,s=i?"/flags/?v=2":"/flags/?v=2&config=true",a=this._instance.config.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":"",o=this._instance.requestRouter.endpointFor("api",s+a);i&&(r.timezone=Vse()),this.Zt=!0,this._instance.ui({method:"POST",url:o,data:r,compression:this._instance.config.disable_compression?void 0:qf.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:c=>{var u,d,h=!0;if(c.statusCode===200&&(this.ii||(this.$anon_distinct_id=void 0),h=!1),this.Zt=!1,this.ei||(this.ei=!0,this._instance.hi((d=c.json)!==null&&d!==void 0?d:{})),!r.disable_flags||this.ii)if(this.ri=!h,c.json&&(u=c.json.quotaLimited)!=null&&u.includes(kNe.FeatureFlags))nu.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset. Please visit https://posthog.com/docs/billing/limits-alerts to learn more.");else{var p;r.disable_flags||this.receivedFeatureFlags((p=c.json)!==null&&p!==void 0?p:{},h),this.ii&&(this.ii=!1,this.ai())}}})}}getFeatureFlag(t,n){if(n===void 0&&(n={}),this.Qt||this.getFlags()&&this.getFlags().length>0){var r=this.getFlagVariants()[t],i=""+r,s=this._instance.get_property(RG)||void 0,a=this._instance.get_property(eN)||{};if((n.send_event||!("send_event"in n))&&(!(t in a)||!a[t].includes(i))){var o,c,u,d,h,p,g,v,x;Mi(a[t])?a[t].push(i):a[t]=[i],(o=this._instance.persistence)==null||o.register({[eN]:a});var _=this.getFeatureFlagDetails(t),w={$feature_flag:t,$feature_flag_response:r,$feature_flag_payload:this.getFeatureFlagPayload(t)||null,$feature_flag_request_id:s,$feature_flag_bootstrapped_response:((c=this._instance.config.bootstrap)==null||(c=c.featureFlags)==null?void 0:c[t])||null,$feature_flag_bootstrapped_payload:((u=this._instance.config.bootstrap)==null||(u=u.featureFlagPayloads)==null?void 0:u[t])||null,$used_bootstrap_value:!this.ri};en(_==null||(d=_.metadata)==null?void 0:d.version)||(w.$feature_flag_version=_.metadata.version);var S,E=(h=_==null||(p=_.reason)==null?void 0:p.description)!==null&&h!==void 0?h:_==null||(g=_.reason)==null?void 0:g.code;E&&(w.$feature_flag_reason=E),_!=null&&(v=_.metadata)!=null&&v.id&&(w.$feature_flag_id=_.metadata.id),en(_?.original_variant)&&en(_?.original_enabled)||(w.$feature_flag_original_response=en(_.original_variant)?_.original_enabled:_.original_variant),_!=null&&(x=_.metadata)!=null&&x.original_payload&&(w.$feature_flag_original_payload=_==null||(S=_.metadata)==null?void 0:S.original_payload),this._instance.capture("$feature_flag_called",w)}return r}nu.warn('getFeatureFlag for key "'+t+`" failed. Feature flags didn't load in time.`)}getFeatureFlagDetails(t){return this.getFlagsWithDetails()[t]}getFeatureFlagPayload(t){return this.getFlagPayloads()[t]}getRemoteConfigPayload(t,n){var r=this._instance.config.token,i={distinct_id:this._instance.get_distinct_id(),token:r};this.ni()&&(i.evaluation_environments=this.si()),this._instance.ui({method:"POST",url:this._instance.requestRouter.endpointFor("api","/flags/?v=2&config=true"),data:i,compression:this._instance.config.disable_compression?void 0:qf.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:s=>{var a,o=(a=s.json)==null?void 0:a.featureFlagPayloads;n(o?.[t]||void 0)}})}isFeatureEnabled(t,n){if(n===void 0&&(n={}),this.Qt||this.getFlags()&&this.getFlags().length>0){var r=this.getFeatureFlag(t,n);return en(r)?void 0:!!r}nu.warn('isFeatureEnabled for key "'+t+`" failed. Feature flags didn't load in time.`)}addFeatureFlagsHandler(t){this.featureFlagEventHandlers.push(t)}removeFeatureFlagsHandler(t){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter((n=>n!==t))}receivedFeatureFlags(t,n){if(this._instance.persistence){this.Qt=!0;var r=this.getFlagVariants(),i=this.getFlagPayloads(),s=this.getFlagsWithDetails();(function(a,o,c,u,d){c===void 0&&(c={}),u===void 0&&(u={}),d===void 0&&(d={});
28var h=ANe(a),p=h.flags,g=h.featureFlags,v=h.featureFlagPayloads;if(g){var x=a.requestId;if(Mi(g)){nu.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var _={};if(g)for(var w=0;w<g.length;w++)_[g[w]]=!0;o&&o.register({[_O]:g,[t1]:_})}else{var S=g,E=v,T=p;a.errorsWhileComputingFlags&&(S=dn({},c,S),E=dn({},u,E),T=dn({},d,T)),o&&o.register(dn({[_O]:Object.keys(IG(S)),[t1]:S||{},[jG]:E||{},[HD]:T||{}},x?{[RG]:x}:{}))}}})(t,this._instance.persistence,r,i,s),this.di(n)}}override(t,n){n===void 0&&(n=!1),nu.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:t,suppressWarning:n})}overrideFeatureFlags(t){if(!this._instance.__loaded||!this._instance.persistence)return nu.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(t===!1)return this._instance.persistence.unregister(gv),this._instance.persistence.unregister(m_),void this.di();if(t&&typeof t=="object"&&("flags"in t||"payloads"in t)){var n,r=t;if(this.Xt=!!((n=r.suppressWarning)!==null&&n!==void 0&&n),"flags"in r){if(r.flags===!1)this._instance.persistence.unregister(gv);else if(r.flags)if(Mi(r.flags)){for(var i={},s=0;s<r.flags.length;s++)i[r.flags[s]]=!0;this._instance.persistence.register({[gv]:i})}else this._instance.persistence.register({[gv]:r.flags})}return"payloads"in r&&(r.payloads===!1?this._instance.persistence.unregister(m_):r.payloads&&this._instance.persistence.register({[m_]:r.payloads})),void this.di()}this.di()}onFeatureFlags(t){if(this.addFeatureFlagsHandler(t),this.Qt){var{flags:n,flagVariants:r}=this.vi();t(n,r)}return()=>this.removeFeatureFlagsHandler(t)}updateEarlyAccessFeatureEnrollment(t,n,r){var i,s=(this._instance.get_property(nw)||[]).find((u=>u.flagKey===t)),a={["$feature_enrollment/"+t]:n},o={$feature_flag:t,$feature_enrollment:n,$set:a};s&&(o.$early_access_feature_name=s.name),r&&(o.$feature_enrollment_stage=r),this._instance.capture("$feature_enrollment_update",o),this.setPersonPropertiesForFlags(a,!1);var c=dn({},this.getFlagVariants(),{[t]:n});(i=this._instance.persistence)==null||i.register({[_O]:Object.keys(IG(c)),[t1]:c}),this.di()}getEarlyAccessFeatures(t,n,r){n===void 0&&(n=!1);var i=this._instance.get_property(nw),s=r?"&"+r.map((a=>"stage="+a)).join("&"):"";if(i&&!n)return t(i);this._instance.ui({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this._instance.config.token+s),method:"GET",callback:a=>{var o,c;if(a.json){var u=a.json.earlyAccessFeatures;return(o=this._instance.persistence)==null||o.unregister(nw),(c=this._instance.persistence)==null||c.register({[nw]:u}),t(u)}}})}vi(){var t=this.getFlags(),n=this.getFlagVariants();return{flags:t.filter((r=>n[r])),flagVariants:Object.keys(n).filter((r=>n[r])).reduce(((r,i)=>(r[i]=n[i],r)),{})}}di(t){var{flags:n,flagVariants:r}=this.vi();this.featureFlagEventHandlers.forEach((i=>i(n,r,{errorsLoading:t})))}setPersonPropertiesForFlags(t,n){n===void 0&&(n=!0);var r=this._instance.get_property(rw)||{};this._instance.register({[rw]:dn({},r,t)}),n&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(rw)}setGroupPropertiesForFlags(t,n){n===void 0&&(n=!0);var r=this._instance.get_property(Dg)||{};Object.keys(r).length!==0&&Object.keys(r).forEach((i=>{r[i]=dn({},r[i],t[i]),delete t[i]})),this._instance.register({[Dg]:dn({},r,t)}),n&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(t){if(t){var n=this._instance.get_property(Dg)||{};this._instance.register({[Dg]:dn({},n,{[t]:{}})})}else this._instance.unregister(Dg)}reset(){this.Qt=!1,this.Zt=!1,this.ti=!1,this.ii=!1,this.ei=!1,this.ri=!1,this.$anon_distinct_id=void 0,this.li(),this.Xt=!1}};var jNe=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];let wO=class{constructor(t,n){this.A=t,this.props={},this.ci=!1,this.fi=(r=>{var i="";return r.token&&(i=r.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),r.persistence_name?"ph_"+r.persistence_name:"ph_"+i+"_posthog"})(t),this.it=this.pi(t),this.load(),t.debug&&on.info("Persistence loaded",t.persistence,dn({},this.props)),this.update_config(t,t,n),this.save()}isDisabled(){return!!this.gi}pi(t){jNe.indexOf(t.persistence.toLowerCase())===-1&&(on.critical("Unknown persistence type "+t.persistence+"; falling back to localStorage+cookie"),t.persistence="localStorage+cookie");var n=t.persistence.toLowerCase();return n==="localstorage"&&as.G()?as:n==="localstorage+cookie"&&RT.G()?RT:n==="sessionstorage"&&Va.G()?Va:n==="memory"?Bke:n==="cookie"?Td:RT.G()?RT:Td}properties(){var t={};return Oi(this.props,(function(n,r){if(r===t1&&fo(n))for(var i=Object.keys(n),s=0;s<i.length;s++)t["$feature/"+i[s]]=n[i[s]];else o=r,c=!1,(Lh(a=_ke)?c:GW&&a.indexOf===GW?a.indexOf(o)!=-1:(Oi(a,(function(u){if(c||(c=u===o))return Zk})),c))||(t[r]=n);var a,o,c})),t}load(){if(!this.gi){var t=this.it.K(this.fi);t&&(this.props=Ps({},t))}}save(){this.gi||this.it.Y(this.fi,this.props,this.mi,this.yi,this.bi,this.A.debug)}remove(){this.it.X(this.fi,!1),this.it.X(this.fi,!0)}clear(){this.remove(),this.props={}}register_once(t,n,r){if(fo(t)){en(n)&&(n="None"),this.mi=en(r)?this.wi:r;var i=!1;if(Oi(t,((s,a)=>{this.props.hasOwnProperty(a)&&this.props[a]!==n||(this.props[a]=s,i=!0)})),i)return this.save(),!0}return!1}register(t,n){if(fo(t)){this.mi=en(n)?this.wi:n;var r=!1;if(Oi(t,((i,s)=>{t.hasOwnProperty(s)&&this.props[s]!==i&&(this.props[s]=i,r=!0)})),r)return this.save(),!0}return!1}unregister(t){t in this.props&&(delete this.props[t],this.save())}update_campaign_params(){if(!this.ci){var t=Fse(this.A.custom_campaign_params,this.A.mask_personal_data_properties,this.A.custom_personal_data_properties);e1(o9(t))||this.register(t),this.ci=!0}}update_search_keyword(){var t;this.register((t=ln?.referrer)?zse(t):{})}update_referrer_info(){var t;this.register_once({$referrer:$se(),$referring_domain:ln!=null&&ln.referrer&&((t=iN(ln.referrer))==null?void 0:t.host)||"$direct"},void 0)}set_initial_person_info(){this.props[KD]||this.props[YD]||this.register_once({[tN]:Bse(this.A.mask_personal_data_properties,this.A.custom_personal_data_properties)},void 0)}get_initial_props(){var t={};Oi([YD,KD],(a=>{var o=this.props[a];o&&Oi(o,(function(c,u){t["$initial_"+LD(u)]=c}))}
28));var n,r,i=this.props[tN];if(i){var s=(n=Use(i),r={},Oi(n,(function(a,o){r["$initial_"+LD(o)]=a})),r);Ps(t,s)}return t}safe_merge(t){return Oi(this.props,(function(n,r){r in t||(t[r]=n)})),t}update_config(t,n,r){if(this.wi=this.mi=t.cookie_expiration,this.set_disabled(t.disable_persistence||!!r),this.set_cross_subdomain(t.cross_subdomain_cookie),this.set_secure(t.secure_cookie),t.persistence!==n.persistence){var i=this.pi(t),s=this.props;this.clear(),this.it=i,this.props=s,this.save()}}set_disabled(t){this.gi=t,this.gi?this.remove():this.save()}set_cross_subdomain(t){t!==this.yi&&(this.yi=t,this.remove(),this.save())}set_secure(t){t!==this.bi&&(this.bi=t,this.remove(),this.save())}set_event_timer(t,n){var r=this.props[tw]||{};r[t]=n,this.props[tw]=r,this.save()}remove_event_timer(t){var n=(this.props[tw]||{})[t];return en(n)||(delete this.props[tw][t],this.save()),n}get_property(t){return this.props[t]}set_property(t,n){this.props[t]=n,this.save()}};(function(e){return e.Button="button",e.Tab="tab",e.Selector="selector",e})({});(function(e){return e.TopLeft="top_left",e.TopRight="top_right",e.TopCenter="top_center",e.MiddleLeft="middle_left",e.MiddleRight="middle_right",e.MiddleCenter="middle_center",e.Left="left",e.Center="center",e.Right="right",e.NextToTrigger="next_to_trigger",e})({});var SO=(function(e){return e.Popover="popover",e.API="api",e.Widget="widget",e.ExternalSurvey="external_survey",e})({});(function(e){return e.Open="open",e.MultipleChoice="multiple_choice",e.SingleChoice="single_choice",e.Rating="rating",e.Link="link",e})({});(function(e){return e.NextQuestion="next_question",e.End="end",e.ResponseBased="response_based",e.SpecificQuestion="specific_question",e})({});(function(e){return e.Once="once",e.Recurring="recurring",e.Always="always",e})({});var ak=(function(e){return e.SHOWN="survey shown",e.DISMISSED="survey dismissed",e.SENT="survey sent",e})({}),OG=(function(e){return e.SURVEY_ID="$survey_id",e.SURVEY_NAME="$survey_name",e.SURVEY_RESPONSE="$survey_response",e.SURVEY_ITERATION="$survey_iteration",e.SURVEY_ITERATION_START_DATE="$survey_iteration_start_date",e.SURVEY_PARTIALLY_COMPLETED="$survey_partially_completed",e.SURVEY_SUBMISSION_ID="$survey_submission_id",e.SURVEY_QUESTIONS="$survey_questions",e.SURVEY_COMPLETED="$survey_completed",e})({}),Xse=(function(e){return e.Popover="popover",e.Inline="inline",e})({});let x9=class{constructor(){this.xi={},this.xi={}}on(t,n){return this.xi[t]||(this.xi[t]=[]),this.xi[t].push(n),()=>{this.xi[t]=this.xi[t].filter((r=>r!==n))}}emit(t,n){for(var r of this.xi[t]||[])r(n);for(var i of this.xi["*"]||[])i(t,n)}},RNe=class Uv{constructor(t){this.Si=new x9,this.Ei=(n,r)=>this.$i(n,r)&&this.ki(n,r)&&this.Pi(n,r),this.$i=(n,r)=>r==null||!r.event||n?.event===r?.event,this._instance=t,this.Ti=new Set,this.Ii=new Set}init(){var t;if(!en((t=this._instance)==null?void 0:t.Ri)){var n;(n=this._instance)==null||n.Ri(((r,i)=>{this.on(r,i)}))}}register(t){var n,r;if(!en((n=this._instance)==null?void 0:n.Ri)&&(t.forEach((a=>{var o,c;(o=this.Ii)==null||o.add(a),(c=a.steps)==null||c.forEach((u=>{var d;(d=this.Ti)==null||d.add(u?.event||"")}))})),(r=this._instance)!=null&&r.autocapture)){var i,s=new Set;t.forEach((a=>{var o;(o=a.steps)==null||o.forEach((c=>{c!=null&&c.selector&&s.add(c?.selector)}))})),(i=this._instance)==null||i.autocapture.setElementSelectors(s)}}on(t,n){var r;n!=null&&t.length!=0&&(this.Ti.has(t)||this.Ti.has(n?.event))&&this.Ii&&((r=this.Ii)==null?void 0:r.size)>0&&this.Ii.forEach((i=>{this.Ci(n,i)&&this.Si.emit("actionCaptured",i.name)}))}Oi(t){this.onAction("actionCaptured",(n=>t(n)))}Ci(t,n){if(n?.steps==null)return!1;for(var r of n.steps)if(this.Ei(t,r))return!0;return!1}onAction(t,n){return this.Si.on(t,n)}ki(t,n){if(n!=null&&n.url){var r,i=t==null||(r=t.properties)==null?void 0:r.$current_url;if(!i||typeof i!="string"||!Uv.Fi(i,n?.url,n?.url_matching||"contains"))return!1}return!0}static Fi(t,n,r){switch(r){case"regex":return!!at&&Y1(t,n);case"exact":return n===t;case"contains":var i=Uv.Mi(n).replace(/_/g,".").replace(/%/g,".*");return Y1(t,i);default:return!1}}static Mi(t){return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}Pi(t,n){if((n!=null&&n.href||n!=null&&n.tag_name||n!=null&&n.text)&&!this.Ai(t).some((s=>!(n!=null&&n.href&&!Uv.Fi(s.href||"",n?.href,n?.href_matching||"exact"))&&(n==null||!n.tag_name||s.tag_name===n?.tag_name)&&!(n!=null&&n.text&&!Uv.Fi(s.text||"",n?.text,n?.text_matching||"exact")&&!Uv.Fi(s.$el_text||"",n?.text,n?.text_matching||"exact")))))return!1;if(n!=null&&n.selector){var r,i=t==null||(r=t.properties)==null?void 0:r.$element_selectors;if(!i||!i.includes(n?.selector))return!1}return!0}Ai(t){return t?.properties.$elements==null?[]:t?.properties.$elements}};var yi=Ra("[Surveys]"),i6="seenSurvey_",INe=(e,t)=>{var n="$survey_"+t+"/"+e.id;return e.current_iteration&&e.current_iteration>0&&(n="$survey_"+t+"/"+e.id+"/"+e.current_iteration),n},PG=e=>{var t=""+i6+e.id;return e.current_iteration&&e.current_iteration>0&&(t=""+i6+e.id+"_"+e.current_iteration),t},ONe=[SO.Popover,SO.Widget,SO.API],PNe={ignoreConditions:!1,ignoreDelay:!1,displayType:Xse.Popover};let MNe=class{constructor(t){this._instance=t,this.ji=new Map,this.Di=new Map}register(t){var n;en((n=this._instance)==null?void 0:n.Ri)||(this.Li(t),this.Ni(t))}Ni(t){var n=t.filter((r=>{var i,s;return((i=r.conditions)==null?void 0:i.actions)&&((s=r.conditions)==null||(s=s.actions)==null||(s=s.values)==null?void 0:s.length)>0}));n.length!==0&&(this.Ui==null&&(this.Ui=new RNe(this._instance),this.Ui.init(),this.Ui.Oi((r=>{this.onAction(r)}
28))),n.forEach((r=>{var i,s,a,o,c;r.conditions&&(i=r.conditions)!=null&&i.actions&&(s=r.conditions)!=null&&(s=s.actions)!=null&&s.values&&((a=r.conditions)==null||(a=a.actions)==null||(a=a.values)==null?void 0:a.length)>0&&((o=this.Ui)==null||o.register(r.conditions.actions.values),(c=r.conditions)==null||(c=c.actions)==null||(c=c.values)==null||c.forEach((u=>{if(u&&u.name){var d=this.Di.get(u.name);d&&d.push(r.id),this.Di.set(u.name,d||[r.id])}})))})))}Li(t){var n;t.filter((r=>{var i,s;return((i=r.conditions)==null?void 0:i.events)&&((s=r.conditions)==null||(s=s.events)==null||(s=s.values)==null?void 0:s.length)>0})).length!==0&&((n=this._instance)==null||n.Ri(((r,i)=>{this.onEvent(r,i)})),t.forEach((r=>{var i;(i=r.conditions)==null||(i=i.events)==null||(i=i.values)==null||i.forEach((s=>{if(s&&s.name){var a=this.ji.get(s.name);a&&a.push(r.id),this.ji.set(s.name,a||[r.id])}}))})))}onEvent(t,n){var r,i,s=((r=this._instance)==null||(r=r.persistence)==null?void 0:r.props[jT])||[];if(ak.SHOWN===t&&n&&s.length>0){var a;yi.info("survey event matched, removing survey from activated surveys",{event:t,eventPayload:n,existingActivatedSurveys:s});var o=n==null||(a=n.properties)==null?void 0:a.$survey_id;if(o){var c=s.indexOf(o);c>=0&&(s.splice(c,1),this.zi(s))}}else if(this.ji.has(t)){yi.info("survey event name matched",{event:t,eventPayload:n,surveys:this.ji.get(t)});var u=[];(i=this._instance)==null||i.getSurveys((h=>{u=h.filter((p=>{var g;return(g=this.ji.get(t))==null?void 0:g.includes(p.id)}))}));var d=u.filter((h=>{var p,g=(p=h.conditions)==null||(p=p.events)==null||(p=p.values)==null?void 0:p.find((v=>v.name===t));return!!g&&(!g.propertyFilters||Object.entries(g.propertyFilters).every((v=>{var x,[_,w]=v,S=n==null||(x=n.properties)==null?void 0:x[_];if(en(S)||Lh(S))return!1;var E=[String(S)],T=Yse[w.operator];return T?T(w.values,E):(yi.warn("Unknown property comparison operator: "+w.operator),!1)})))}));this.zi(s.concat(d.map((h=>h.id))||[]))}}onAction(t){var n,r=((n=this._instance)==null||(n=n.persistence)==null?void 0:n.props[jT])||[];this.Di.has(t)&&this.zi(r.concat(this.Di.get(t)||[]))}zi(t){var n;yi.info("updating activated surveys",{activatedSurveys:t}),(n=this._instance)==null||(n=n.persistence)==null||n.register({[jT]:[...new Set(t)]})}getSurveys(){var t,n=(t=this._instance)==null||(t=t.persistence)==null?void 0:t.props[jT];return n||[]}getEventToSurveys(){return this.ji}Hi(){return this.Ui}},DNe=class{constructor(t){this.Bi=void 0,this._surveyManager=null,this.qi=!1,this.Wi=!1,this.Gi=[],this._instance=t,this._surveyEventReceiver=null}onRemoteConfig(t){if(!this._instance.config.disable_surveys){var n=t.surveys;if(Qi(n))return yi.warn("Flags not loaded yet. Not loading surveys.");var r=Mi(n);this.Bi=r?n.length>0:n,yi.info("flags response received, isSurveysEnabled: "+this.Bi),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var t=[],n=0;n<localStorage.length;n++){var r=localStorage.key(n);(r!=null&&r.startsWith(i6)||r!=null&&r.startsWith("inProgressSurvey_"))&&t.push(r)}t.forEach((i=>localStorage.removeItem(i)))}loadIfEnabled(){if(!this._surveyManager)if(this.Wi)yi.info("Already initializing surveys, skipping...");else if(this._instance.config.disable_surveys)yi.info("Disabled. Not loading surveys.");else if(this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())yi.info("Not loading surveys in cookieless mode without consent.");else{var t=$n?.__PosthogExtensions__;if(t){if(!en(this.Bi)||this._instance.config.advanced_enable_surveys){var n=this.Bi||this._instance.config.advanced_enable_surveys;this.Wi=!0;try{var r=t.generateSurveys;if(r)return void this.Vi(r,n);var i=t.loadExternalDependency;if(!i)return void this.Ji("PostHog loadExternalDependency extension not found.");i(this._instance,"surveys",(s=>{s||!t.generateSurveys?this.Ji("Could not load surveys script",s):this.Vi(t.generateSurveys,n)}))}catch(s){throw this.Ji("Error initializing surveys",s),s}finally{this.Wi=!1}}}else yi.error("PostHog Extensions not found.")}}Vi(t,n){this._surveyManager=t(this._instance,n),this._surveyEventReceiver=new MNe(this._instance),yi.info("Surveys loaded successfully"),this.Ki({isLoaded:!0})}Ji(t,n){yi.error(t,n),this.Ki({isLoaded:!1,error:t})}onSurveysLoaded(t){return this.Gi.push(t),this._surveyManager&&this.Ki({isLoaded:!0}),()=>{this.Gi=this.Gi.filter((n=>n!==t))}}getSurveys(t,n){if(n===void 0&&(n=!1),this._instance.config.disable_surveys)return yi.info("Disabled. Not loading surveys."),t([]);var r=this._instance.get_property(qD);if(r&&!n)return t(r,{isLoaded:!0});if(this.qi)return t([],{isLoaded:!1,error:"Surveys are already being loaded"});try{this.qi=!0,this._instance.ui({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this._instance.config.token),method:"GET",timeout:this._instance.config.surveys_request_timeout_ms,callback:i=>{var s;this.qi=!1;var a=i.statusCode;if(a!==200||!i.json){var o="Surveys API could not be loaded, status: "+a;return yi.error(o),t([],{isLoaded:!1,error:o})}var c,u=i.json.surveys||[],d=u.filter((h=>(function(p){return!(!p.start_date||p.end_date)}
28)(h)&&((function(p){var g;return!((g=p.conditions)==null||(g=g.events)==null||(g=g.values)==null||!g.length)})(h)||(function(p){var g;return!((g=p.conditions)==null||(g=g.actions)==null||(g=g.values)==null||!g.length)})(h))));return d.length>0&&((c=this._surveyEventReceiver)==null||c.register(d)),(s=this._instance.persistence)==null||s.register({[qD]:u}),t(u,{isLoaded:!0})}})}catch(i){throw this.qi=!1,i}}Ki(t){for(var n of this.Gi)try{if(!t.isLoaded)return n([],t);this.getSurveys(n)}catch(r){yi.error("Error in survey callback",r)}}getActiveMatchingSurveys(t,n){if(n===void 0&&(n=!1),!Qi(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(t,n);yi.warn("init was not called")}Yi(t){var n=null;return this.getSurveys((r=>{var i;n=(i=r.find((s=>s.id===t)))!==null&&i!==void 0?i:null})),n}Xi(t){if(Qi(this._surveyManager))return{eligible:!1,reason:"SDK is not enabled or survey functionality is not yet loaded"};var n=typeof t=="string"?this.Yi(t):t;return n?this._surveyManager.checkSurveyEligibility(n):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(t){if(Qi(this._surveyManager))return yi.warn("init was not called"),{visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"};var n=this.Xi(t);return{visible:n.eligible,disabledReason:n.reason}}canRenderSurveyAsync(t,n){return Qi(this._surveyManager)?(yi.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"})):new Promise((r=>{this.getSurveys((i=>{var s,a=(s=i.find((c=>c.id===t)))!==null&&s!==void 0?s:null;if(a){var o=this.Xi(a);r({visible:o.eligible,disabledReason:o.reason})}else r({visible:!1,disabledReason:"Survey not found"})}),n)}))}renderSurvey(t,n){var r;if(Qi(this._surveyManager))yi.warn("init was not called");else{var i=typeof t=="string"?this.Yi(t):t;if(i!=null&&i.id)if(ONe.includes(i.type)){var s=ln?.querySelector(n);if(s)return(r=i.appearance)!=null&&r.surveyPopupDelaySeconds?(yi.info("Rendering survey "+i.id+" with delay of "+i.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout((()=>{var a,o;yi.info("Rendering survey "+i.id+" with delay of "+((a=i.appearance)==null?void 0:a.surveyPopupDelaySeconds)+" seconds"),(o=this._surveyManager)==null||o.renderSurvey(i,s),yi.info("Survey "+i.id+" rendered")}),1e3*i.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(i,s);yi.warn("Survey element not found")}else yi.warn("Surveys of type "+i.type+" cannot be rendered in the app");else yi.warn("Survey not found")}}displaySurvey(t,n){var r;if(Qi(this._surveyManager))yi.warn("init was not called");else{var i=this.Yi(t);if(i){var s=i;if((r=i.appearance)!=null&&r.surveyPopupDelaySeconds&&n.ignoreDelay&&(s=dn({},i,{appearance:dn({},i.appearance,{surveyPopupDelaySeconds:0})})),n.ignoreConditions===!1){var a=this.canRenderSurvey(i);if(!a.visible)return void yi.warn("Survey is not eligible to be displayed: ",a.disabledReason)}n.displayType!==Xse.Inline?this._surveyManager.handlePopoverSurvey(s):this.renderSurvey(s,n.selector)}else yi.warn("Survey not found")}}};var MG=Ra("[RateLimiter]");let FNe=class{constructor(t){var n,r;this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=i=>{var s=i.text;if(s&&s.length)try{(JSON.parse(s).quota_limited||[]).forEach((a=>{MG.info((a||"events")+" is quota limited."),this.serverLimits[a]=new Date().getTime()+6e4}))}catch(a){return void MG.warn('could not rate limit - continuing. Error: "'+a?.message+'"',{text:s})}},this.instance=t,this.captureEventsPerSecond=((n=t.config.rate_limiting)==null?void 0:n.events_per_second)||10,this.captureEventsBurstLimit=Math.max(((r=t.config.rate_limiting)==null?void 0:r.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond),this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}clientRateLimitContext(t){var n,r,i;t===void 0&&(t=!1);var s=new Date().getTime(),a=(n=(r=this.instance.persistence)==null?void 0:r.get_property(GD))!==null&&n!==void 0?n:{tokens:this.captureEventsBurstLimit,last:s};a.tokens+=(s-a.last)/1e3*this.captureEventsPerSecond,a.last=s,a.tokens>this.captureEventsBurstLimit&&(a.tokens=this.captureEventsBurstLimit);var o=a.tokens<1;return o||t||(a.tokens=Math.max(0,a.tokens-1)),!o||this.lastEventRateLimited||t||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+this.captureEventsPerSecond+" events per second and "+this.captureEventsBurstLimit+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=o,(i=this.instance.persistence)==null||i.set_property(GD,a),{isRateLimited:o,remainingTokens:a.tokens}}isServerRateLimited(t){var n=this.serverLimits[t||"events"]||!1;return n!==!1&&new Date().getTime()<n}};var wg=Ra("[RemoteConfig]");let LNe=class{constructor(t){this._instance=t}get remoteConfig(){var t;return(t=$n._POSTHOG_REMOTE_CONFIG)==null||(t=t[this._instance.config.token])==null?void 0:t.config}Qi(t){var n,r;(n=$n.__PosthogExtensions__)!=null&&n.loadExternalDependency?(r=$n.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"remote-config",(()=>t(this.remoteConfig))):(wg.error("PostHog Extensions not found. Cannot load remote config."),t())}Zi(t){this._instance.ui({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback:n=>{t(n.json)}})}load(){try{if(this.remoteConfig)return wg.info("Using preloaded remote config",this.remoteConfig),void this.hi(this.remoteConfig);if(this._instance.L())return void wg.warn("Remote config is disabled. Falling back to local config.");this.Qi((t=>{if(!t)return wg.info("No config found after loading remote JS config. Falling back to JSON."),void this.Zi((n=>{this.hi(n)}));this.hi(t)}))}catch(t){wg.error("Error loading remote config",t)}}hi(t){t?this._instance.config.__preview_remote_config?(this._instance.hi(t),t.hasFeatureFlags!==!1&&this._instance.featureFlags.ensureFlagsLoaded()):wg.info("__preview_remote_config is disabled. Logging config instead",t):wg.error("Failed to fetch remote config from PostHog.")}};var s6=3e3;let zNe=class{constructor(t,n){this.te=!0,this.ie=[],this.ee=bd(n?.flush_interval_ms||s6,250,5e3,on.createLogger("flush interval"),s6),this.re=t}
28enqueue(t){this.ie.push(t),this.se||this.ne()}unload(){this.oe();var t=this.ie.length>0?this.ae():{},n=Object.values(t);[...n.filter((r=>r.url.indexOf("/e")===0)),...n.filter((r=>r.url.indexOf("/e")!==0))].map((r=>{this.re(dn({},r,{transport:"sendBeacon"}))}))}enable(){this.te=!1,this.ne()}ne(){var t=this;this.te||(this.se=setTimeout((()=>{if(this.oe(),this.ie.length>0){var n=this.ae(),r=function(){var s=n[i],a=new Date().getTime();s.data&&Mi(s.data)&&Oi(s.data,(o=>{o.offset=Math.abs(o.timestamp-a),delete o.timestamp})),t.re(s)};for(var i in n)r()}}),this.ee))}oe(){clearTimeout(this.se),this.se=void 0}ae(){var t={};return Oi(this.ie,(n=>{var r,i=n,s=(i?i.batchKey:null)||i.url;en(t[s])&&(t[s]=dn({},i,{data:[]})),(r=t[s].data)==null||r.push(i.data)})),this.ie=[],t}};var $Ne=["retriesPerformedSoFar"];let BNe=class{constructor(t){this.le=!1,this.ue=3e3,this.ie=[],this._instance=t,this.ie=[],this.he=!0,!en(at)&&"onLine"in at.navigator&&(this.he=at.navigator.onLine,ma(at,"online",(()=>{this.he=!0,this.jt()})),ma(at,"offline",(()=>{this.he=!1})))}get length(){return this.ie.length}retriableRequest(t){var{retriesPerformedSoFar:n}=t,r=Wie(t,$Ne);Fd(n)&&n>0&&(r.url=cN(r.url,{retry_count:n})),this._instance.ui(dn({},r,{callback:i=>{i.statusCode!==200&&(i.statusCode<400||i.statusCode>=500)&&(n??0)<10?this.de(dn({retriesPerformedSoFar:n},r)):r.callback==null||r.callback(i)}}))}de(t){var n=t.retriesPerformedSoFar||0;t.retriesPerformedSoFar=n+1;var r=(function(a){var o=3e3*Math.pow(2,a),c=o/2,u=Math.min(18e5,o),d=(Math.random()-.5)*(u-c);return Math.ceil(u+d)})(n),i=Date.now()+r;this.ie.push({retryAt:i,requestOptions:t});var s="Enqueued failed request for retry in "+r;navigator.onLine||(s+=" (Browser is offline)"),on.warn(s),this.le||(this.le=!0,this.ve())}ve(){this.ce&&clearTimeout(this.ce),this.ce=setTimeout((()=>{this.he&&this.ie.length>0&&this.jt(),this.ve()}),this.ue)}jt(){var t=Date.now(),n=[],r=this.ie.filter((s=>s.retryAt<t||(n.push(s),!1)));if(this.ie=n,r.length>0)for(var{requestOptions:i}of r)this.retriableRequest(i)}unload(){for(var{requestOptions:t}of(this.ce&&(clearTimeout(this.ce),this.ce=void 0),this.ie))try{this._instance.ui(dn({},t,{transport:"sendBeacon"}))}catch(n){on.error(n)}this.ie=[]}},UNe=class{constructor(t){this.fe=()=>{var n,r,i,s;this.pe||(this.pe={});var a=this.scrollElement(),o=this.scrollY(),c=a?Math.max(0,a.scrollHeight-a.clientHeight):0,u=o+(a?.clientHeight||0),d=a?.scrollHeight||0;this.pe.lastScrollY=Math.ceil(o),this.pe.maxScrollY=Math.max(o,(n=this.pe.maxScrollY)!==null&&n!==void 0?n:0),this.pe.maxScrollHeight=Math.max(c,(r=this.pe.maxScrollHeight)!==null&&r!==void 0?r:0),this.pe.lastContentY=u,this.pe.maxContentY=Math.max(u,(i=this.pe.maxContentY)!==null&&i!==void 0?i:0),this.pe.maxContentHeight=Math.max(d,(s=this.pe.maxContentHeight)!==null&&s!==void 0?s:0)},this._instance=t}getContext(){return this.pe}resetContext(){var t=this.pe;return setTimeout(this.fe,0),t}startMeasuringScrollPosition(){ma(at,"scroll",this.fe,{capture:!0}),ma(at,"scrollend",this.fe,{capture:!0}),ma(at,"resize",this.fe)}scrollElement(){if(!this._instance.config.scroll_root_selector)return at?.document.documentElement;var t=Mi(this._instance.config.scroll_root_selector)?this._instance.config.scroll_root_selector:[this._instance.config.scroll_root_selector];for(var n of t){var r=at?.document.querySelector(n);if(r)return r}}scrollY(){if(this._instance.config.scroll_root_selector){var t=this.scrollElement();return t&&t.scrollTop||0}return at&&(at.scrollY||at.pageYOffset||at.document.documentElement.scrollTop)||0}scrollX(){if(this._instance.config.scroll_root_selector){var t=this.scrollElement();return t&&t.scrollLeft||0}return at&&(at.scrollX||at.pageXOffset||at.document.documentElement.scrollLeft)||0}};var VNe=e=>Bse(e?.config.mask_personal_data_properties,e?.config.custom_personal_data_properties);let DG=class{constructor(t,n,r,i){this.ge=s=>{var a=this._e();if(!a||a.sessionId!==s){var o={sessionId:s,props:this.me(this._instance)};this.ye.register({[WD]:o})}},this._instance=t,this.be=n,this.ye=r,this.me=i||VNe,this.be.onSessionId(this.ge)}_e(){return this.ye.props[WD]}getSetOnceProps(){var t,n=(t=this._e())==null?void 0:t.props;return n?"r"in n?Use(n):{$referring_domain:n.referringDomain,$pathname:n.initialPathName,utm_source:n.utm_source,utm_campaign:n.utm_campaign,utm_medium:n.utm_medium,utm_content:n.utm_content,utm_term:n.utm_term}:{}}getSessionProps(){var t={};return Oi(o9(this.getSetOnceProps()),((n,r)=>{r==="$current_url"&&(r="url"),t["$session_entry_"+LD(r)]=n})),t}};var EO=Ra("[SessionId]");class FG{on(t,n){return this.we.on(t,n)}constructor(t,n,r){var i;if(this.xe=[],this.Se=void 0,this.we=new x9,this.Ee=(d,h)=>Math.abs(d-h)>
vendor: 44,827 bytes, line 28
28this.sessionTimeoutMs,!t.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(t.config.cookieless_mode==="always")throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.A=t.config,this.ye=t.persistence,this.$e=void 0,this.ke=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.Pe=n||Bp,this.Te=r||Bp;var s=this.A.persistence_name||this.A.token,a=this.A.session_idle_timeout_seconds||1800;if(this._sessionTimeoutMs=1e3*bd(a,60,36e3,EO.createLogger("session_idle_timeout_seconds"),1800),t.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.Ie(),this.Re="ph_"+s+"_window_id",this.Ce="ph_"+s+"_primary_window_exists",this.Oe()){var o=Va.K(this.Re),c=Va.K(this.Ce);o&&!c?this.$e=o:Va.X(this.Re),Va.Y(this.Ce,!0)}if((i=this.A.bootstrap)!=null&&i.sessionID)try{var u=(d=>{var h=d.replace(/-/g,"");if(h.length!==32)throw new Error("Not a valid UUID");if(h[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(h.substring(0,12),16)})(this.A.bootstrap.sessionID);this.Fe(this.A.bootstrap.sessionID,new Date().getTime(),u)}catch(d){EO.error("Invalid sessionID in bootstrap",d)}this.Me()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(t){return en(this.xe)&&(this.xe=[]),this.xe.push(t),this.ke&&t(this.ke,this.$e),()=>{this.xe=this.xe.filter((n=>n!==t))}}Oe(){return this.A.persistence!=="memory"&&!this.ye.gi&&Va.G()}Ae(t){t!==this.$e&&(this.$e=t,this.Oe()&&Va.Y(this.Re,t))}je(){return this.$e?this.$e:this.Oe()?Va.K(this.Re):null}Fe(t,n,r){t===this.ke&&n===this._sessionActivityTimestamp&&r===this._sessionStartTimestamp||(this._sessionStartTimestamp=r,this._sessionActivityTimestamp=n,this.ke=t,this.ye.register({[Jk]:[n,t,r]}))}De(){if(this.ke&&this._sessionActivityTimestamp&&this._sessionStartTimestamp)return[this._sessionActivityTimestamp,this.ke,this._sessionStartTimestamp];var t=this.ye.props[Jk];return Mi(t)&&t.length===2&&t.push(t[0]),t||[0,null,0]}resetSessionId(){this.Fe(null,null,null)}destroy(){clearTimeout(this.Le),this.Le=void 0,this.Se&&at&&(at.removeEventListener("beforeunload",this.Se,{capture:!1}),this.Se=void 0),this.xe=[]}Me(){this.Se=()=>{this.Oe()&&Va.X(this.Ce)},ma(at,"beforeunload",this.Se,{capture:!1})}checkAndGetSessionAndWindowId(t,n){if(t===void 0&&(t=!1),n===void 0&&(n=null),this.A.cookieless_mode==="always")throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var r=n||new Date().getTime(),[i,s,a]=this.De(),o=this.je(),c=Fd(a)&&a>0&&Math.abs(r-a)>864e5,u=!1,d=!s,h=!t&&this.Ee(r,i);d||h||c?(s=this.Pe(),o=this.Te(),EO.info("new session ID generated",{sessionId:s,windowId:o,changeReason:{noSessionId:d,activityTimeout:h,sessionPastMaximumLength:c}}),a=r,u=!0):o||(o=this.Te(),u=!0);var p=i===0||!t||c?r:i,g=a===0?new Date().getTime():a;return this.Ae(o),this.Fe(s,p,g),t||this.Ie(),u&&this.xe.forEach((v=>v(s,o,u?{noSessionId:d,activityTimeout:h,sessionPastMaximumLength:c}:void 0))),{sessionId:s,windowId:o,sessionStartTimestamp:g,changeReason:u?{noSessionId:d,activityTimeout:h,sessionPastMaximumLength:c}:void 0,lastActivityTimestamp:i}}Ie(){clearTimeout(this.Le),this.Le=setTimeout((()=>{var[t]=this.De();if(this.Ee(new Date().getTime(),t)){var n=this.ke;this.resetSessionId(),this.we.emit("forcedIdleReset",{idleSessionId:n})}}),1.1*this.sessionTimeoutMs)}}var HNe=["$set_once","$set"],Sp=Ra("[SiteApps]");let qNe=class{constructor(t){this._instance=t,this.Ne=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}Ue(t,n){if(n){var r=this.globalsForEvent(n);this.Ne.push(r),this.Ne.length>1e3&&(this.Ne=this.Ne.slice(10))}}get siteAppLoaders(){var t;return(t=$n._POSTHOG_REMOTE_CONFIG)==null||(t=t[this._instance.config.token])==null?void 0:t.siteApps}init(){if(this.isEnabled){var t=this._instance.Ri(this.Ue.bind(this));this.ze=()=>{t(),this.Ne=[],this.ze=void 0}}}globalsForEvent(t){var n,r,i,s,a,o,c;if(!t)throw new Error("Event payload is required");var u={},d=this._instance.get_property("$groups")||[],h=this._instance.get_property("$stored_group_properties")||{};for(var[p,g]of Object.entries(h))u[p]={id:d[p],type:p,properties:g};var{$set_once:v,$set:x}=t;return{event:dn({},Wie(t,HNe),{properties:dn({},t.properties,x?{$set:dn({},(n=(r=t.properties)==null?void 0:r.$set)!==null&&n!==void 0?n:{},x)}:{},v?{$set_once:dn({},(i=(s=t.properties)==null?void 0:s.$set_once)!==null&&i!==void 0?i:{},v)}:{}),elements_chain:(a=(o=t.properties)==null?void 0:o.$elements_chain)!==null&&a!==void 0?a:"",distinct_id:(c=t.properties)==null?void 0:c.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:u}}setupSiteApp(t){var n=this.apps[t.id],r=()=>{var o;!n.errored&&this.Ne.length&&(Sp.info("Processing "+this.Ne.length+" events for site app with id "+t.id),this.Ne.forEach((c=>n.processEvent==null?void 0:n.processEvent(c))),n.processedBuffer=!0),Object.values(this.apps).every((c=>c.processedBuffer||c.errored))&&((o=this.ze)==null||o.call(this))},i=!1,s=o=>{n.errored=!o,n.loaded=!0,Sp.info("Site app with id "+t.id+" "+(o?"loaded":"errored")),i&&r()};try{var{processEvent:a}=t.init({posthog:this._instance,callback:o=>{s(o)}});a&&(n.processEvent=a),i=!0}catch(o){Sp.error("Error while initializing PostHog app with config id "+t.id,o),s(!1)}if(i&&n.loaded)try{r()}catch(o){Sp.error("Error while processing buffered events PostHog app with config id "+t.id,o),n.errored=!0}}He(){var t=this.siteAppLoaders||[];for(var n of t)this.apps[n.id]={id:n.id,loaded:!1,errored:!1,processedBuffer:!1};for(var r of t)this.setupSiteApp(r)}Be(t){if(Object.keys(this.apps).length!==0){var n=this.globalsForEvent(t);for(var r of Object.values(this.apps))try{r.processEvent==null||r.processEvent(n)}catch(i){Sp.error("Error while processing event "+t.event+" for site app "+r.id,i)}}}onRemoteConfig(t){var n,r,i,s=this;if((n=this.siteAppLoaders)!=null&&n.length)return this.isEnabled?(this.He(),void this._instance.on("eventCaptured",(u=>this.Be(u)))):void Sp.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((r=this.ze)==null||r.call(this),(i=t.siteApps)!=null&&i.length)if(this.isEnabled){var a=function(u){var d;$n["__$$ph_site_app_"+u]=s._instance,(d=$n.__PosthogExtensions__)==null||d.loadSiteApp==null||d.loadSiteApp(s._instance,c,(h=>{if(h)return Sp.error("Error while initializing PostHog app with config id "+u,h)}))};for(var{id:o,url:c}of t.siteApps)a(o)}else Sp.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}};var WNe=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],LG=function(e,t){if(!e)return!1;var n=e.toLowerCase();return WNe.concat(t||[]).some((r=>{var i=r.toLowerCase();return n.indexOf(i)!==-1}))},Qse=function(e,t){if(!e)return!1;var n=e.userAgent;if(n&&LG(n,t))return!0;try{var r=e?.userAgentData;if(r!=null&&r.brands&&r.brands.some((i=>LG(i?.brand,t))))return!0}catch{}return!!e.webdriver},aw=(function(e){return e.US="us",e.EU="eu",e.CUSTOM="custom",e})({}),zG="i.posthog.com";let GNe=class{constructor(t){this.qe={},this.instance=t}get apiHost(){var t=this.instance.config.api_host.trim().replace(/\/$/,"");return t==="https://app.posthog.com"?"https://us.i.posthog.com":t}get uiHost(){var t,n=(t=this.instance.config.ui_host)==null?void 0:t.replace(/\/$/,"");return n||(n=this.apiHost.replace("."+zG,".posthog.com")),n==="https://app.posthog.com"?"https://us.posthog.com":n}get region(){return this.qe[this.apiHost]||(/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.qe[this.apiHost]=aw.US:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.qe[this.apiHost]=aw.EU:this.qe[this.apiHost]=aw.CUSTOM),this.qe[this.apiHost]}endpointFor(t,n){if(n===void 0&&(n=""),n&&(n=n[0]==="/"?n:"/"+n),t==="ui")return this.uiHost+n;if(this.region===aw.CUSTOM)return this.apiHost+n;var r=zG+n;switch(t){case"assets":return"https://"+this.region+"-assets."+r;case"api":return"https://"+this.region+"."+r}}};var KNe={icontains:(e,t)=>!!at&&t.href.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>!!at&&t.href.toLowerCase().indexOf(e.toLowerCase())===-1,regex:(e,t)=>!!at&&Y1(t.href,e),not_regex:(e,t)=>!!at&&!Y1(t.href,e),exact:(e,t)=>t.href===e,is_not:(e,t)=>t.href!==e};let YNe=class No{constructor(t){var n=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(r){r===void 0&&(r=!1),n.getWebExperiments((i=>{No.We("retrieved web experiments from the server"),n.Ge=new Map,i.forEach((s=>{if(s.feature_flag_key){var a;n.Ge&&(No.We("setting flag key ",s.feature_flag_key," to web experiment ",s),(a=n.Ge)==null||a.set(s.feature_flag_key,s));var o=n._instance.getFeatureFlag(s.feature_flag_key);pa(o)&&s.variants[o]&&n.Ve(s.name,o,s.variants[o].transforms)}else if(s.variants)for(var c in s.variants){var u=s.variants[c];No.Je(u)&&n.Ve(s.name,c,u.transforms)}}))}),r)},this._instance=t,this._instance.onFeatureFlags((r=>{this.onFeatureFlags(r)}))}onFeatureFlags(t){if(this._is_bot())No.We("Refusing to render web experiment since the viewer is a likely bot");else if(!this._instance.config.disable_web_experiments){if(Qi(this.Ge))return this.Ge=new Map,this.loadIfEnabled(),void this.previewWebExperiment();No.We("applying feature flags",t),t.forEach((n=>{var r;if(this.Ge&&(r=this.Ge)!=null&&r.has(n)){var i,s=this._instance.getFeatureFlag(n),a=(i=this.Ge)==null?void 0:i.get(n);s&&a!=null&&a.variants[s]&&this.Ve(a.name,s,a.variants[s].transforms)}}))}}previewWebExperiment(){var t=No.getWindowLocation();if(t!=null&&t.search){var n=sN(t?.search,"__experiment_id"),r=sN(t?.search,"__experiment_variant");n&&r&&(No.We("previewing web experiments "+n+" && "+r),this.getWebExperiments((i=>{this.Ke(parseInt(n),r,i)}),!1,!0))}}loadIfEnabled(){this._instance.config.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(t,n,r){if(this._instance.config.disable_web_experiments&&!r)return t([]);var i=this._instance.get_property("$web_experiments");if(i&&!n)return t(i);this._instance.ui({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this._instance.config.token),method:"GET",callback:s=>{if(s.statusCode!==200||!s.json)return t([]);var a=s.json.experiments||[];return t(a)}})}Ke(t,n,r){var i=r.filter((s=>s.id===t));i&&i.length>0&&(No.We("Previewing web experiment ["+i[0].name+"] with variant ["+n+"]"),this.Ve(i[0].name,n,i[0].variants[n].transforms))}static Je(t){return!Qi(t.conditions)&&No.Ye(t)&&No.Xe(t)}static Ye(t){var n;if(Qi(t.conditions)||Qi((n=t.conditions)==null?void 0:n.url))return!0;var r,i,s,a=No.getWindowLocation();return!!a&&((r=t.conditions)==null||!r.url||KNe[(i=(s=t.conditions)==null?void 0:s.urlMatchType)!==null&&i!==void 0?i:"icontains"](t.conditions.url,a))}static getWindowLocation(){return at?.location}static Xe(t){var n;if(Qi(t.conditions)||Qi((n=t.conditions)==null?void 0:n.utm))return!0;var r=Fse();if(r.utm_source){var i,s,a,o,c,u,d,h,p=(i=t.conditions)==null||(i=i.utm)==null||!i.utm_campaign||((s=t.conditions)==null||(s=s.utm)==null?void 0:s.utm_campaign)==r.utm_campaign,g=(a=t.conditions)==null||(a=a.utm)==null||!a.utm_source||((o=t.conditions)==null||(o=o.utm)==null?void 0:o.utm_source)==r.utm_source,v=(c=t.conditions)==null||(c=c.utm)==null||!c.utm_medium||((u=t.conditions)==null||(u=u.utm)==null?void 0:u.utm_medium)==r.utm_medium,x=(d=t.conditions)==null||(d=d.utm)==null||!d.utm_term||((h=t.conditions)==null||(h=h.utm)==null?void 0:h.utm_term)==r.utm_term;return p&&v&&x&&g}return!1}static We(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];on.info("[WebExperiments] "+t,r)}Ve(t,n,r){this._is_bot()?No.We("Refusing to render web experiment since the viewer is a likely bot"):n!=="control"?r.forEach((i=>{if(i.selector){var s;No.We("applying transform of variant "+n+" for experiment "+t+" ",i);var a=(s=document)==null?void 0:s.querySelectorAll(i.selector);a?.forEach((o=>{var c=o;i.html&&(c.innerHTML=i.html),i.css&&c.setAttribute("style",i.css)}))}})):No.We("Control variants leave the page unmodified.")}_is_bot(){return Hl&&this._instance?Qse(Hl,this._instance.config.custom_blocked_useragents):void 0}};var XNe=Ra("[PostHog ExternalIntegrations]"),QNe={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};let ZNe=class{constructor(t){this._instance=t}nt(t,n){var r;(r=$n.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,t,(i=>{if(i)return XNe.error("failed to load script",i);n()}))}startIfEnabledOrStop(){var t=this,n=function(a){var o,c,u;!i||(o=$n.__PosthogExtensions__)!=null&&(o=o.integrations)!=null&&o[a]||t.nt(QNe[a],(()=>{var d;(d=$n.__PosthogExtensions__)==null||(d=d.integrations)==null||(d=d[a])==null||d.start(t._instance)})),!i&&(c=$n.__PosthogExtensions__)!=null&&(c=c.integrations)!=null&&c[a]&&((u=$n.__PosthogExtensions__)==null||(u=u.integrations)==null||(u=u[a])==null||u.stop())};for(var[r,i]of Object.entries((s=this._instance.config.integrations)!==null&&s!==void 0?s:{})){var s;n(r)}}};var a6="[SessionRecording]",g_=Ra(a6);let $G=class{get started(){var t;return!((t=this.Qe)==null||!t.isStarted)}get status(){return this.Qe?this.Qe.status:this.Ze&&!this.tr?"disabled":"lazy_loading"}constructor(t){if(this._forceAllowLocalhostNetworkCapture=!1,this.Ze=!1,this.ir=void 0,this._instance=t,!this._instance.sessionManager)throw g_.error("started without valid sessionManager"),new Error(a6+" started without valid sessionManager. This is a bug.");if(this._instance.config.cookieless_mode==="always")throw new Error(a6+' cannot be used with cookieless_mode="always"')}get tr(){var t,n=!((t=this._instance.get_property(fO))==null||!t.enabled),r=!this._instance.config.disable_session_recording,i=this._instance.config.disable_session_recording||this._instance.consent.isOptedOut();return at&&n&&r&&!i}startIfEnabledOrStop(t){var n;if(!this.tr||(n=this.Qe)==null||!n.isStarted){var r=!en(Object.assign)&&!en(Array.from);this.tr&&r?(this.er(t),g_.info("starting")):this.stopRecording()}}er(t){var n,r,i;this.tr&&($n!=null&&(n=$n.__PosthogExtensions__)!=null&&(n=n.rrweb)!=null&&n.record&&(r=$n.__PosthogExtensions__)!=null&&r.initSessionRecording?this.rr(t):(i=$n.__PosthogExtensions__)==null||i.loadExternalDependency==null||i.loadExternalDependency(this._instance,this.sr,(s=>{if(s)return g_.error("could not load recorder",s);this.rr(t)})))}stopRecording(){var t,n;(t=this.ir)==null||t.call(this),this.ir=void 0,(n=this.Qe)==null||n.stop()}nr(){var t;(t=this._instance.persistence)==null||t.unregister(nse)}ar(t){if(this._instance.persistence){var n,r,i=this._instance.persistence,s=()=>{var a=t.sessionRecording===!1?void 0:t.sessionRecording,o=a?.sampleRate,c=Qi(o)?null:parseFloat(o);Qi(c)&&this.nr();var u=a?.minimumDurationMilliseconds;i.register({[fO]:dn({enabled:!!a},a,{networkPayloadCapture:dn({capturePerformance:t.capturePerformance},a?.networkPayloadCapture),canvasRecording:{enabled:a?.recordCanvas,fps:a?.canvasFps,quality:a?.canvasQuality},sampleRate:c,minimumDurationMilliseconds:en(u)?null:u,endpoint:a?.endpoint,triggerMatchType:a?.triggerMatchType,masking:a?.masking,urlTriggers:a?.urlTriggers})})};s(),(n=this.ir)==null||n.call(this),this.ir=(r=this._instance.sessionManager)==null?void 0:r.onSessionId(s)}}onRemoteConfig(t){"sessionRecording"in t?t.sessionRecording!==!1?(this.ar(t),this.Ze=!0,this.startIfEnabledOrStop()):this.Ze=!0:g_.info("skipping remote config with no sessionRecording",t)}log(t,n){var r;n===void 0&&(n="log"),(r=this.Qe)!=null&&r.log?this.Qe.log(t,n):g_.warn("log called before recorder was ready")}get sr(){var t,n,r=(t=this._instance)==null||(t=t.persistence)==null?void 0:t.get_property(fO);return(r==null||(n=r.scriptConfig)==null?void 0:n.script)||"lazy-recorder"}rr(t){var n,r;if((n=$n.__PosthogExtensions__)==null||!n.initSessionRecording)throw Error("Called on script loaded before session recording is available");this.Qe||(this.Qe=(r=$n.__PosthogExtensions__)==null?void 0:r.initSessionRecording(this._instance),this.Qe._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),this.Qe.start(t)}onRRwebEmit(t){var n;(n=this.Qe)==null||n.onRRwebEmit==null||n.onRRwebEmit(t)}overrideLinkedFlag(){var t;(t=this.Qe)==null||t.overrideLinkedFlag()}overrideSampling(){var t;(t=this.Qe)==null||t.overrideSampling()}overrideTrigger(t){var n;(n=this.Qe)==null||n.overrideTrigger(t)}get sdkDebugProperties(){var t;return((t=this.Qe)==null?void 0:t.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(t,n){var r;return!((r=this.Qe)==null||!r.tryAddCustomEvent(t,n))}};var kw={},o6=()=>{},Vv="posthog",Zse=!CNe&&rl?.indexOf("MSIE")===-1&&rl?.indexOf("Mozilla")===-1,BG=e=>{var t;return{api_host:"https://us.i.posthog.com",ui_host:null,token:"",autocapture:!0,rageclick:!0,cross_subdomain_cookie:bke(ln?.location),persistence:"localStorage+cookie",persistence_name:"",loaded:o6,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageview:e!=="2025-05-24"||"history_change",capture_pageleave:"if_capture_pageview",defaults:e??"unset",debug:al&&pa(al?.search)&&al.search.indexOf("__posthog_debug=true")!==-1||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:(at==null||(t=at.location)==null?void 0:t.protocol)==="https:",ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,session_recording:{},mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error:n=>{var r="Bad HTTP status: "+n.statusCode+" "+n.text;on.error(r)},get_device_id:n=>n,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:"identified_only",before_send:void 0,request_queue_config:{flush_interval_ms:s6},error_tracking:{},_onCapture:o6,__preview_eager_load_replay:!1}},UG=e=>{var t={};en(e.process_person)||(t.person_profiles=e.process_person),en(e.xhr_headers)||(t.request_headers=e.xhr_headers),en(e.cookie_name)||(t.persistence_name=e.cookie_name),en(e.disable_cookie)||(t.disable_persistence=e.disable_cookie),en(e.store_google)||(t.save_campaign_params=e.store_google),en(e.verbose)||(t.debug=e.verbose);var n=Ps({},t,e);return Mi(e.property_blacklist)&&(en(e.property_denylist)?n.property_denylist=e.property_blacklist:Mi(e.property_denylist)?n.property_denylist=[...e.property_blacklist,...e.property_denylist]:on.error("Invalid value for property_denylist config: "+e.property_denylist)),n};let JNe=class{constructor(){this.__forceAllowLocalhost=!1}get lr(){return this.__forceAllowLocalhost}set lr(t){on.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=t}},Jse=class eae{get decideEndpointWasHit(){var t,n;return(t=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&t!==void 0&&t}get flagsEndpointWasHit(){var t,n;return(t=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&t!==void 0&&t}constructor(){this.webPerformance=new JNe,this.ur=!1,this.version=Df.LIB_VERSION,this.hr=new x9,this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=BG(),this.SentryIntegration=Kke,this.sentryIntegration=t=>(function(n,r){var i=bse(n,r);return{name:yse,processEvent:s=>i(s)}})(this,t),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.dr=!1,this.vr=null,this.cr=null,this.pr=null,this.featureFlags=new NNe(this),this.toolbar=new Xke(this),this.scrollManager=new UNe(this),this.pageViewManager=new gNe(this),this.surveys=new DNe(this),this.experiments=new YNe(this),this.exceptions=new TNe(this),this.rateLimiter=new FNe(this),this.requestRouter=new GNe(this),this.consent=new Uke(this),this.externalIntegrations=new ZNe(this),this.people={set:(t,n,r)=>{var i=pa(t)?{[t]:n}:t;this.setPersonProperties(i),r?.({})},set_once:(t,n,r)=>{var i=pa(t)?{[t]:n}:t;this.setPersonProperties(void 0,i),r?.({})}},this.on("eventCaptured",(t=>on.info('send "'+t?.event+'"',t)))}init(t,n,r){if(r&&r!==Vv){var i,s=(i=kw[r])!==null&&i!==void 0?i:new eae;return s._init(t,n,r),kw[r]=s,kw[Vv][r]=s,s}return this._init(t,n,r)}_init(t,n,r){var i,s;if(n===void 0&&(n={}),en(t)||zD(t))return on.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},n.debug=this.gr(n.debug),this._r=n,this.mr=[],n.person_profiles&&(this.cr=n.person_profiles),this.set_config(Ps({},BG(n.defaults),UG(n),{name:r,token:t})),this.config.on_xhr_error&&on.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=n.disable_compression?void 0:qf.GZipJS;var a=this.yr();this.persistence=new wO(this.config,a),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new wO(dn({},this.config,{persistence:"sessionStorage"}),a);var o=dn({},this.persistence.props),c=dn({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.br=new zNe((E=>this.wr(E)),this.config.request_queue_config),this.Sr=new BNe(this),this.__request_queue=[];var u=this.config.cookieless_mode==="always"||this.config.cookieless_mode==="on_reject"&&this.consent.isExplicitlyOptedOut();if(u||(this.sessionManager=new FG(this),this.sessionPropsManager=new DG(this,this.sessionManager,this.persistence)),new Zke(this).startIfEnabledOrStop(),this.siteApps=new qNe(this),(i=this.siteApps)==null||i.init(),u||(this.sessionRecording=new $G(this),this.sessionRecording.startIfEnabledOrStop()),this.config.disable_scroll_properties||this.scrollManager.startMeasuringScrollPosition(),this.autocapture=new Oke(this),this.autocapture.startIfEnabled(),this.surveys.loadIfEnabled(),this.heatmaps=new mNe(this),this.heatmaps.startIfEnabled(),this.webVitalsAutocapture=new hNe(this),this.exceptionObserver=new qke(this),this.exceptionObserver.startIfEnabled(),this.deadClicksAutocapture=new vse(this,Hke),this.deadClicksAutocapture.startIfEnabled(),this.historyAutocapture=new Wke(this),this.historyAutocapture.startIfEnabled(),Df.DEBUG=Df.DEBUG||this.config.debug,Df.DEBUG&&on.info("Starting in debug mode",{this:this,config:n,thisC:dn({},this.config),p:o,s:c}),((s=n.bootstrap)==null?void 0:s.distinctID)!==void 0){var d,h,p=this.config.get_device_id(Bp()),g=(d=n.bootstrap)!=null&&d.isIdentifiedID?p:n.bootstrap.distinctID;this.persistence.set_property(Ff,(h=n.bootstrap)!=null&&h.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:n.bootstrap.distinctID,$device_id:g})}if(this.Er()){var v,x,_=Object.keys(((v=n.bootstrap)==null?void 0:v.featureFlags)||{}).filter((E=>{var T;return!((T=n.bootstrap)==null||(T=T.featureFlags)==null||!T[E])})).reduce(((E,T)=>{var N;return E[T]=((N=n.bootstrap)==null||(N=N.featureFlags)==null?void 0:N[T])||!1,E}),{}),w=Object.keys(((x=n.bootstrap)==null?void 0:x.featureFlagPayloads)||{}).filter((E=>_[E])).reduce(((E,T)=>{var N,A;return(N=n.bootstrap)!=null&&(N=N.featureFlagPayloads)!=null&&N[T]&&(E[T]=(A=n.bootstrap)==null||(A=A.featureFlagPayloads)==null?void 0:A[T]),E}),{});this.featureFlags.receivedFeatureFlags({featureFlags:_,featureFlagPayloads:w})}if(u)this.register_once({distinct_id:u_,$device_id:null},"");else if(!this.get_distinct_id()){var S=this.config.get_device_id(Bp());this.register_once({distinct_id:S,$device_id:S},""),this.persistence.set_property(Ff,"anonymous")}return ma(at,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),this.toolbar.maybeLoadToolbar(),n.segment?Gke(this,(()=>this.$r())):this.$r(),Jp(this.config._onCapture)&&this.config._onCapture!==o6&&(on.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",(E=>this.config._onCapture(E.event,E)))),this.config.ip&&on.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this}hi(t){var n,r,i,s,a,o,c,u;if(!ln||!ln.body)return on.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((()=>{this.hi(t)}),500);this.compression=void 0,t.supportedCompression&&!this.config.disable_compression&&(this.compression=vr(t.supportedCompression,qf.GZipJS)?qf.GZipJS:vr(t.supportedCompression,qf.Base64)?qf.Base64:void 0),(n=t.analytics)!=null&&n.endpoint&&(this.analyticsDefaultEndpoint=t.analytics.endpoint),this.set_config({person_profiles:this.cr?this.cr:"identified_only"}),(r=this.siteApps)==null||r.onRemoteConfig(t),(i=this.sessionRecording)==null||i.onRemoteConfig(t),(s=this.autocapture)==null||s.onRemoteConfig(t),(a=this.heatmaps)==null||a.onRemoteConfig(t),this.surveys.onRemoteConfig(t),(o=this.webVitalsAutocapture)==null||o.onRemoteConfig(t),(c=this.exceptionObserver)==null||c.onRemoteConfig(t),this.exceptions.onRemoteConfig(t),(u=this.deadClicksAutocapture)==null||u.onRemoteConfig(t)}$r(){try{this.config.loaded(this)}catch(t){on.critical("`loaded` function failed",t)}this.kr(),this.config.capture_pageview&&setTimeout((()=>{(this.consent.isOptedIn()||this.config.cookieless_mode==="always")&&this.Pr()}),1),new LNe(this).load(),this.featureFlags.flags()}kr(){var t;this.is_capturing()&&this.config.request_batching&&((t=this.br)==null||t.enable())}_dom_loaded(){this.is_capturing()&&tm(this.__request_queue,(t=>this.wr(t))),this.__request_queue=[],this.kr()}_handle_unload(){var t,n;this.config.request_batching?(this.Tr()&&this.capture("$pageleave"),(t=this.br)==null||t.unload(),(n=this.Sr)==null||n.unload()):this.Tr()&&this.capture("$pageleave",null,{transport:"sendBeacon"})}ui(t){this.__loaded&&(Zse?this.__request_queue.push(t):this.rateLimiter.isServerRateLimited(t.batchKey)||(t.transport=t.transport||this.config.api_transport,t.url=cN(t.url,{ip:this.config.ip?1:0}),t.headers=dn({},this.config.request_headers),t.compression=t.compression==="best-available"?this.compression:t.compression,t.disableXHRCredentials=this.config.__preview_disable_xhr_credentials,this.config.__preview_disable_beacon&&(t.disableTransport=["sendBeacon"]),t.fetchOptions=t.fetchOptions||this.config.fetch_options,(n=>{var r,i,s,a=dn({},n);a.timeout=a.timeout||6e4,a.url=cN(a.url,{_:new Date().getTime().toString(),ver:Df.LIB_VERSION,compression:a.compression});var o=(r=a.transport)!==null&&r!==void 0?r:"fetch",c=sk.filter((d=>!a.disableTransport||!d.transport||!a.disableTransport.includes(d.transport))),u=(i=(s=Jie(c,(d=>d.transport===o)))==null?void 0:s.method)!==null&&i!==void 0?i:c[0].method;if(!u)throw new Error("No available transport method");u(a)})(dn({},t,{callback:n=>{var r,i;this.rateLimiter.checkForLimiting(n),n.statusCode>=400&&((r=(i=this.config).on_request_error)==null||r.call(i,n)),t.callback==null||t.callback(n)}}))))}wr(t){this.Sr?this.Sr.retriableRequest(t):this.ui(t)}_execute_array(t){var n,r=[],i=[],s=[];tm(t,(o=>{o&&(n=o[0],Mi(n)?s.push(o):Jp(o)?o.call(this):Mi(o)&&n==="alias"?r.push(o):Mi(o)&&n.indexOf("capture")!==-1&&Jp(this[n])?s.push(o):i.push(o))}));var a=function(o,c){tm(o,(function(u){if(Mi(u[0])){var d=c;Oi(u,(function(h){d=d[h[0]].apply(d,h.slice(1))}))}else this[u[0]].apply(this,u.slice(1))}),c)};a(r,this),a(i,this),a(s,this)}Er(){var t,n;return((t=this.config.bootstrap)==null?void 0:t.featureFlags)&&Object.keys((n=this.config.bootstrap)==null?void 0:n.featureFlags).length>0||!1}push(t){this._execute_array([t])}capture(t,n,r){var i;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.br){if(this.is_capturing())if(!en(t)&&pa(t)){if(this.config.opt_out_useragent_filter||!this._is_bot()){var s=r!=null&&r.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(s==null||!s.isRateLimited){n!=null&&n.$current_url&&!pa(n?.$current_url)&&(on.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),n==null||delete n.$current_url),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var a=new Date,o=r?.timestamp||a,c=Bp(),u={uuid:c,event:t,properties:this.calculateEventProperties(t,n||{},o,c)};s&&(u.properties.$lib_rate_limit_remaining_tokens=s.remainingTokens),r?.$set&&(u.$set=r?.$set);var d,h=this.Ir(r?.$set_once);if(h&&(u.$set_once=h),(u=vke(u,r!=null&&r._noTruncate?null:this.config.properties_string_max_length)).timestamp=o,en(r?.timestamp)||(u.properties.$event_time_override_provided=!0,u.properties.$event_time_override_system_time=a),t===ak.DISMISSED||t===ak.SENT){var p=n?.[OG.SURVEY_ID],g=n?.[OG.SURVEY_ITERATION];d={id:p,current_iteration:g},localStorage.getItem(PG(d))||localStorage.setItem(PG(d),"true"),u.$set=dn({},u.$set,{[INe({id:p,current_iteration:g},t===ak.SENT?"responded":"dismissed")]:!0})}var v=dn({},u.properties.$set,u.$set);if(e1(v)||this.setPersonPropertiesForFlags(v),!Qi(this.config.before_send)){var x=this.Rr(u);if(!x)return;u=x}this.hr.emit("eventCaptured",u);var _={method:"POST",url:(i=r?._url)!==null&&i!==void 0?i:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:u,compression:"best-available",batchKey:r?._batchKey};return!this.config.request_batching||r&&(r==null||!r._batchKey)||r!=null&&r.send_instantly?this.wr(_):this.br.enqueue(_),u}on.critical("This capture call is ignored due to client rate limiting.")}}else on.error("No event name provided to posthog.capture")}else on.uninitializedWarning("posthog.capture")}Ri(t){return this.on("eventCaptured",(n=>t(n.event,n)))}calculateEventProperties(t,n,r,i,s){if(r=r||new Date,!this.persistence||!this.sessionPersistence)return n;var a=s?void 0:this.persistence.remove_event_timer(t),o=dn({},n);if(o.token=this.config.token,o.$config_defaults=this.config.defaults,(this.config.cookieless_mode=="always"||this.config.cookieless_mode=="on_reject"&&this.consent.isExplicitlyOptedOut())&&(o.$cookieless_mode=!0),t==="$snapshot"){var c=dn({},this.persistence.properties(),this.sessionPersistence.properties());return o.distinct_id=c.distinct_id,(!pa(o.distinct_id)&&!Fd(o.distinct_id)||zD(o.distinct_id))&&on.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),o}var u,d=fNe(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var{sessionId:h,windowId:p}=this.sessionManager.checkAndGetSessionAndWindowId(s,r.getTime());o.$session_id=h,o.$window_id=p}this.sessionPropsManager&&Ps(o,this.sessionPropsManager.getSessionProps());try{var g;this.sessionRecording&&Ps(o,this.sessionRecording.sdkDebugProperties),o.$sdk_debug_retry_queue_size=(g=this.Sr)==null?void 0:g.length}catch(w){o.$sdk_debug_error_capturing_properties=String(w)}if(this.requestRouter.region===aw.CUSTOM&&(o.$lib_custom_api_host=this.config.api_host),u=t!=="$pageview"||s?t!=="$pageleave"||s?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(r):this.pageViewManager.doPageView(r,i),o=Ps(o,u),t==="$pageview"&&ln&&(o.title=ln.title),!en(a)){var v=r.getTime()-a;o.$duration=parseFloat((v/1e3).toFixed(3))}rl&&this.config.opt_out_useragent_filter&&(o.$browser_type=this._is_bot()?"bot":"browser"),(o=Ps({},d,this.persistence.properties(),this.sessionPersistence.properties(),o)).$is_identified=this._isIdentified(),Mi(this.config.property_denylist)?Oi(this.config.property_denylist,(function(w){delete o[w]})):on.error("Invalid value for property_denylist config: "+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var x=this.config.sanitize_properties;x&&(on.error("sanitize_properties is deprecated. Use before_send instead"),o=x(o,t));var _=this.Cr();return o.$process_person_profile=_,_&&!s&&this.Or("_calculate_event_properties"),o}Ir(t){var n;if(!this.persistence||!this.Cr()||this.ur)return t;var r=this.persistence.get_initial_props(),i=(n=this.sessionPropsManager)==null?void 0:n.getSetOnceProps(),s=Ps({},r,i||{},t||{}),a=this.config.sanitize_properties;return a&&(on.error("sanitize_properties is deprecated. Use before_send instead"),s=a(s,"$set_once")),this.ur=!0,e1(s)?void 0:s}register(t,n){var r;(r=this.persistence)==null||r.register(t,n)}register_once(t,n,r){var i;(i=this.persistence)==null||i.register_once(t,n,r)}register_for_session(t){var n;(n=this.sessionPersistence)==null||n.register(t)}unregister(t){var n;(n=this.persistence)==null||n.unregister(t)}unregister_for_session(t){var n;(n=this.sessionPersistence)==null||n.unregister(t)}Fr(t,n){this.register({[t]:n})}getFeatureFlag(t,n){return this.featureFlags.getFeatureFlag(t,n)}getFeatureFlagPayload(t){var n=this.featureFlags.getFeatureFlagPayload(t);try{return JSON.parse(n)}catch{return n}}isFeatureEnabled(t,n){return this.featureFlags.isFeatureEnabled(t,n)}reloadFeatureFlags(){this.featureFlags.reloadFeatureFlags()}updateEarlyAccessFeatureEnrollment(t,n,r){this.featureFlags.updateEarlyAccessFeatureEnrollment(t,n,r)}getEarlyAccessFeatures(t,n,r){return n===void 0&&(n=!1),this.featureFlags.getEarlyAccessFeatures(t,n,r)}on(t,n){return this.hr.on(t,n)}onFeatureFlags(t){return this.featureFlags.onFeatureFlags(t)}onSurveysLoaded(t){return this.surveys.onSurveysLoaded(t)}onSessionId(t){var n,r;return(n=(r=this.sessionManager)==null?void 0:r.onSessionId(t))!==null&&n!==void 0?n:()=>{}}getSurveys(t,n){n===void 0&&(n=!1),this.surveys.getSurveys(t,n)}getActiveMatchingSurveys(t,n){n===void 0&&(n=!1),this.surveys.getActiveMatchingSurveys(t,n)}renderSurvey(t,n){this.surveys.renderSurvey(t,n)}displaySurvey(t,n){n===void 0&&(n=PNe),this.surveys.displaySurvey(t,n)}canRenderSurvey(t){return this.surveys.canRenderSurvey(t)}canRenderSurveyAsync(t,n){return n===void 0&&(n=!1),this.surveys.canRenderSurveyAsync(t,n)}identify(t,n,r){if(!this.__loaded||!this.persistence)return on.uninitializedWarning("posthog.identify");if(Fd(t)&&(t=t.toString(),on.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),t)if(["distinct_id","distinctid"].includes(t.toLowerCase()))on.critical('The string "'+t+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.');else if(t!==u_){if(this.Or("posthog.identify")){var i=this.get_distinct_id();if(this.register({$user_id:t}),!this.get_property("$device_id")){var s=i;this.register_once({$had_persisted_distinct_id:!0,$device_id:s},"")}t!==i&&t!==this.get_property(ew)&&(this.unregister(ew),this.register({distinct_id:t}));var a=(this.persistence.get_property(Ff)||"anonymous")==="anonymous";t!==i&&a?(this.persistence.set_property(Ff,"identified"),this.setPersonPropertiesForFlags(dn({},r||{},n||{}),!1),this.capture("$identify",{distinct_id:t,$anon_distinct_id:i},{$set:n||{},$set_once:r||{}}),this.pr=kG(t,n,r),this.featureFlags.setAnonymousDistinctId(i)):(n||r)&&this.setPersonProperties(n,r),t!==i&&(this.reloadFeatureFlags(),this.unregister(eN))}}else on.critical('The string "'+u_+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.');else on.error("Unique user id has not been set in posthog.identify")}setPersonProperties(t,n){if((t||n)&&this.Or("posthog.setPersonProperties")){var r=kG(this.get_distinct_id(),t,n);this.pr!==r?(this.setPersonPropertiesForFlags(dn({},n||{},t||{})),this.capture("$set",{$set:t||{},$set_once:n||{}}),this.pr=r):on.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(t,n,r){if(t&&n){if(this.Or("posthog.group")){var i=this.getGroups();i[t]!==n&&this.resetGroupPropertiesForFlags(t),this.register({$groups:dn({},i,{[t]:n})}),r&&(this.capture("$groupidentify",{$group_type:t,$group_key:n,$group_set:r}),this.setGroupPropertiesForFlags({[t]:r})),i[t]===n||r||this.reloadFeatureFlags()}}else on.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(t,n){n===void 0&&(n=!0),this.featureFlags.setPersonPropertiesForFlags(t,n)}resetPersonPropertiesForFlags(){this.featureFlags.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(t,n){n===void 0&&(n=!0),this.Or("posthog.setGroupPropertiesForFlags")&&this.featureFlags.setGroupPropertiesForFlags(t,n)}resetGroupPropertiesForFlags(t){this.featureFlags.resetGroupPropertiesForFlags(t)}reset(t){var n,r,i,s;if(on.info("reset"),!this.__loaded)return on.uninitializedWarning("posthog.reset");var a=this.get_property("$device_id");if(this.consent.reset(),(n=this.persistence)==null||n.clear(),(r=this.sessionPersistence)==null||r.clear(),this.surveys.reset(),this.featureFlags.reset(),(i=this.persistence)==null||i.set_property(Ff,"anonymous"),(s=this.sessionManager)==null||s.resetSessionId(),this.pr=null,this.config.cookieless_mode==="always")this.register_once({distinct_id:u_,$device_id:null},"");else{var o=this.config.get_device_id(Bp());this.register_once({distinct_id:o,$device_id:t?o:a},"")}this.register({$last_posthog_reset:new Date().toISOString()},1)}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var t,n;return(t=(n=this.sessionManager)==null?void 0:n.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&t!==void 0?t:""}get_session_replay_url(t){if(!this.sessionManager)return"";var{sessionId:n,sessionStartTimestamp:r}=this.sessionManager.checkAndGetSessionAndWindowId(!0),i=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+n);if(t!=null&&t.withTimestamp&&r){var s,a=(s=t.timestampLookBack)!==null&&s!==void 0?s:10;if(!r)return i;i+="?t="+Math.max(Math.floor((new Date().getTime()-r)/1e3)-a,0)}return i}alias(t,n){return t===this.get_property(ese)?(on.critical("Attempting to create alias for existing People user - aborting."),-2):this.Or("posthog.alias")?(en(n)&&(n=this.get_distinct_id()),t!==n?(this.Fr(ew,t),this.capture("$create_alias",{alias:t,distinct_id:n})):(on.warn("alias matches current distinct_id - skipping api call."),this.identify(t),-1)):void 0}set_config(t){var n=dn({},this.config);if(fo(t)){var r,i,s,a,o;Ps(this.config,UG(t));var c=this.yr();(r=this.persistence)==null||r.update_config(this.config,n,c),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new wO(dn({},this.config,{persistence:"sessionStorage"}),c);var u=this.gr(this.config.debug);em(u)&&(this.config.debug=u),em(this.config.debug)&&(this.config.debug?(Df.DEBUG=!0,as.G()&&as.Y("ph_debug","true"),on.info("set_config",{config:t,oldConfig:n,newConfig:dn({},this.config)})):(Df.DEBUG=!1,as.G()&&as.X("ph_debug"))),(i=this.sessionRecording)==null||i.startIfEnabledOrStop(),(s=this.autocapture)==null||s.startIfEnabled(),(a=this.heatmaps)==null||a.startIfEnabled(),this.surveys.loadIfEnabled(),this.Mr(),(o=this.externalIntegrations)==null||o.startIfEnabledOrStop()}}startSessionRecording(t){var n=t===!0,r={sampling:n||!(t==null||!t.sampling),linked_flag:n||!(t==null||!t.linked_flag),url_trigger:n||!(t==null||!t.url_trigger),event_trigger:n||!(t==null||!t.event_trigger)};if(Object.values(r).some(Boolean)){var i,s,a,o,c;(i=this.sessionManager)==null||i.checkAndGetSessionAndWindowId(),r.sampling&&((s=this.sessionRecording)==null||s.overrideSampling()),r.linked_flag&&((a=this.sessionRecording)==null||a.overrideLinkedFlag()),r.url_trigger&&((o=this.sessionRecording)==null||o.overrideTrigger("url")),r.event_trigger&&((c=this.sessionRecording)==null||c.overrideTrigger("event"))}this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var t;return!((t=this.sessionRecording)==null||!t.started)}captureException(t,n){var r=new Error("PostHog syntheticException"),i=this.exceptions.buildProperties(t,{handled:!0,syntheticException:r});return this.exceptions.sendExceptionEvent(dn({},i,n))}loadToolbar(t){return this.toolbar.loadToolbar(t)}get_property(t){var n;return(n=this.persistence)==null?void 0:n.props[t]}getSessionProperty(t){var n;return(n=this.sessionPersistence)==null?void 0:n.props[t]}toString(){var t,n=(t=this.config.name)!==null&&t!==void 0?t:Vv;return n!==Vv&&(n=Vv+"."+n),n}_isIdentified(){var t,n;return((t=this.persistence)==null?void 0:t.get_property(Ff))==="identified"||((n=this.sessionPersistence)==null?void 0:n.get_property(Ff))==="identified"}Cr(){var t,n;return!(this.config.person_profiles==="never"||this.config.person_profiles==="identified_only"&&!this._isIdentified()&&e1(this.getGroups())&&((t=this.persistence)==null||(t=t.props)==null||!t[ew])&&((n=this.persistence)==null||(n=n.props)==null||!n[nN]))}Tr(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&(this.config.capture_pageview===!0||this.config.capture_pageview==="history_change")}createPersonProfile(){this.Cr()||this.Or("posthog.createPersonProfile")&&this.setPersonProperties({},{})}Or(t){return this.config.person_profiles==="never"?(on.error(t+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.Fr(nN,!0),!0)}yr(){if(this.config.cookieless_mode==="always")return!0;var t=this.consent.isOptedOut(),n=this.config.opt_out_persistence_by_default||this.config.cookieless_mode==="on_reject";return this.config.disable_persistence||t&&!!n}Mr(){var t,n,r,i,s=this.yr();return((t=this.persistence)==null?void 0:t.gi)!==s&&((r=this.persistence)==null||r.set_disabled(s)),((n=this.sessionPersistence)==null?void 0:n.gi)!==s&&((i=this.sessionPersistence)==null||i.set_disabled(s)),s}opt_in_capturing(t){if(this.config.cookieless_mode!=="always"){var n,r;this.config.cookieless_mode==="on_reject"&&this.consent.isExplicitlyOptedOut()&&(this.reset(!0),(n=this.sessionManager)==null||n.destroy(),this.sessionManager=new FG(this),this.persistence&&(this.sessionPropsManager=new DG(this,this.sessionManager,this.persistence)),this.sessionRecording=new $G(this),this.sessionRecording.startIfEnabledOrStop()),this.consent.optInOut(!0),this.Mr(),this.kr(),this.config.cookieless_mode=="on_reject"&&this.surveys.loadIfEnabled(),(en(t?.captureEventName)||t!=null&&t.captureEventName)&&this.capture((r=t?.captureEventName)!==null&&r!==void 0?r:"$opt_in",t?.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Pr()}
28else on.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')}opt_out_capturing(){var t,n;this.config.cookieless_mode!=="always"?(this.config.cookieless_mode==="on_reject"&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.Mr(),this.config.cookieless_mode==="on_reject"&&(this.register({distinct_id:u_,$device_id:null}),(t=this.sessionManager)==null||t.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,(n=this.sessionRecording)==null||n.stopRecording(),this.sessionRecording=void 0,this.Pr())):on.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var t=this.consent.consent;return t===Lf.GRANTED?"granted":t===Lf.DENIED?"denied":"pending"}is_capturing(){return this.config.cookieless_mode==="always"||(this.config.cookieless_mode==="on_reject"?this.consent.isExplicitlyOptedOut()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.Mr()}_is_bot(){return Hl?Qse(Hl,this.config.custom_blocked_useragents):void 0}Pr(){ln&&(ln.visibilityState==="visible"?this.dr||(this.dr=!0,this.capture("$pageview",{title:ln.title},{send_instantly:!0}),this.vr&&(ln.removeEventListener("visibilitychange",this.vr),this.vr=null)):this.vr||(this.vr=this.Pr.bind(this),ma(ln,"visibilitychange",this.vr)))}debug(t){t===!1?(at?.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(at?.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),this.set_config({debug:!0}))}L(){var t,n,r,i,s,a,o,c=this._r||{};return"advanced_disable_flags"in c?!!c.advanced_disable_flags:this.config.advanced_disable_flags!==!1?!!this.config.advanced_disable_flags:this.config.advanced_disable_decide===!0?(on.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(r="advanced_disable_decide",i=!1,s=on,a=(n="advanced_disable_flags")in(t=c)&&!en(t[n]),o=r in t&&!en(t[r]),a?t[n]:o?(s&&s.warn("Config field '"+r+"' is deprecated. Please use '"+n+"' instead. The old field will be removed in a future major version."),t[r]):i)}Rr(t){if(Qi(this.config.before_send))return t;var n=Mi(this.config.before_send)?this.config.before_send:[this.config.before_send],r=t;for(var i of n){if(r=i(r),Qi(r)){var s="Event '"+t.event+"' was rejected in beforeSend function";return qAe(t.event)?on.warn(s+". This can cause unexpected behavior."):on.info(s),null}r.properties&&!e1(r.properties)||on.warn("Event '"+t.event+"' has no properties after beforeSend function, this is likely an error.")}return r}getPageViewId(){var t;return(t=this.pageViewManager.Wt)==null?void 0:t.pageViewId}captureTraceFeedback(t,n){this.capture("$ai_feedback",{$ai_trace_id:String(t),$ai_feedback_text:n})}captureTraceMetric(t,n,r){this.capture("$ai_metric",{$ai_trace_id:String(t),$ai_metric_name:n,$ai_metric_value:String(r)})}gr(t){var n=em(t)&&!t,r=as.G()&&as.J("ph_debug")==="true";return!n&&(!!r||t)}};(function(e,t){for(var n=0;n<t.length;n++)e.prototype[t[n]]=xke(e.prototype[t[n]])})(Jse,["identify"]);var VG,Ug=(VG=kw[Vv]=new Jse,(function(){function e(){e.done||(e.done=!0,Zse=!1,Oi(kw,(function(t){t._dom_loaded()})))}ln!=null&&ln.addEventListener?ln.readyState==="complete"?e():ma(ln,"DOMContentLoaded",e,{capture:!1}):at&&on.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")})(),VG),v9=b.createContext({client:Ug});function tae(e,t,n){if(n===void 0&&(n=new WeakMap),e===t)return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(n.has(e)&&n.get(e)===t)return!0;n.set(e,t);var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(var s=0,a=r;s<a.length;s++){var o=a[s];if(!i.includes(o)||!tae(e[o],t[o],n))return!1}return!0}function e3e(e){var t=e.children,n=e.client,r=e.apiKey,i=e.options,s=b.useRef(null),a=b.useMemo(function(){return n?(r&&console.warn("[PostHog.js] You have provided both `client` and `apiKey` to `PostHogProvider`. `apiKey` will be ignored in favour of `client`."),i&&console.warn("[PostHog.js] You have provided both `client` and `options` to `PostHogProvider`. `options` will be ignored in favour of `client`."),n):(r||console.warn("[PostHog.js] No `apiKey` or `client` were provided to `PostHogProvider`. Using default global `window.posthog` instance. You must initialize it manually. This is not recommended behavior."),Ug)},[n,r,JSON.stringify(i)]);return b.useEffect(function(){if(!n){var o=s.current;o?(r!==o.apiKey&&console.warn("[PostHog.js] You have provided a different `apiKey` to `PostHogProvider` than the one that was already initialized. This is not supported by our provider and we'll keep using the previous key. If you need to toggle between API Keys you need to control the `client` yourself and pass it in as a prop rather than an `apiKey` prop."),i&&!tae(i,o.options)&&Ug.set_config(i),s.current={apiKey:r,options:i??{}}):(Ug.__loaded&&console.warn("[PostHog.js] `posthog` was already loaded elsewhere. This may cause issues."),Ug.init(r,i),s.current={apiKey:r,options:i??{}})}},[n,r,JSON.stringify(i)]),Y.createElement(v9.Provider,{value:{client:a}},t)}var t3e=function(){var e=b.useContext(v9).client;return e}
vendor: 12,983 bytes, lines 28-52
28,l6=function(e,t){return l6=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},l6(e,t)};function n3e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");l6(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var CO=function(e){return typeof e=="function"},r3e={componentStack:null,exceptionEvent:null,error:null},i3e={INVALID_FALLBACK:"[PostHog.js][PostHogErrorBoundary] Invalid fallback prop, provide a valid React element or a function that returns a valid React element."};(function(e){n3e(t,e);function t(n){var r=e.call(this,n)||this;return r.state=r3e,r}return t.prototype.componentDidCatch=function(n,r){var i=this.props.additionalProperties,s;CO(i)?s=i(n):typeof i=="object"&&(s=i);var a=this.context.client,o=a.captureException(n,s),c=r.componentStack;this.setState({error:n,componentStack:c,exceptionEvent:o})},t.prototype.render=function(){var n=this.props,r=n.children,i=n.fallback,s=this.state;if(s.componentStack==null)return CO(r)?r():r;var a=CO(i)?Y.createElement(i,{error:s.error,componentStack:s.componentStack,exceptionEvent:s.exceptionEvent}):i;return Y.isValidElement(a)?a:(console.warn(i3e.INVALID_FALLBACK),Y.createElement(Y.Fragment,null))},t.contextType=v9,t})(Y.Component);var TO={exports:{}},x_={},AO={exports:{}},kO={};/** 29 * @license React 30 * scheduler.production.js 31 * 32 * Copyright (c) Meta Platforms, Inc. and affiliates. 33 * 34 * This source code is licensed under the MIT license found in the 35 * LICENSE file in the root directory of this source tree. 36 */var HG;function s3e(){return HG||(HG=1,(function(e){function t(K,te){var ne=K.length;K.push(te);e:for(;0<ne;){var se=ne-1>>>1,H=K[se];if(0<i(H,te))K[se]=te,K[ne]=H,ne=se;else break e}}function n(K){return K.length===0?null:K[0]}function r(K){if(K.length===0)return null;var te=K[0],ne=K.pop();if(ne!==te){K[0]=ne;e:for(var se=0,H=K.length,O=H>>>1;se<O;){var L=2*(se+1)-1,M=K[L],q=L+1,X=K[q];if(0>i(M,ne))q<H&&0>i(X,M)?(K[se]=X,K[q]=ne,se=q):(K[se]=M,K[L]=ne,se=L);else if(q<H&&0>i(X,ne))K[se]=X,K[q]=ne,se=q;else break e}}return te}function i(K,te){var ne=K.sortIndex-te.sortIndex;return ne!==0?ne:K.id-te.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,o=a.now();e.unstable_now=function(){return a.now()-o}}var c=[],u=[],d=1,h=null,p=3,g=!1,v=!1,x=!1,_=!1,w=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function T(K){for(var te=n(u);te!==null;){if(te.callback===null)r(u);else if(te.startTime<=K)r(u),te.sortIndex=te.expirationTime,t(c,te);else break;te=n(u)}}function N(K){if(x=!1,T(K),!v)if(n(c)!==null)v=!0,A||(A=!0,U());else{var te=n(u);te!==null&&Z(N,te.startTime-K)}}var A=!1,k=-1,j=5,R=-1;function P(){return _?!0:!(e.unstable_now()-R<j)}function V(){if(_=!1,A){var K=e.unstable_now();R=K;var te=!0;try{e:{v=!1,x&&(x=!1,S(k),k=-1),g=!0;var ne=p;try{t:{for(T(K),h=n(c);h!==null&&!(h.expirationTime>K&&P());){var se=h.callback;if(typeof se=="function"){h.callback=null,p=h.priorityLevel;var H=se(h.expirationTime<=K);if(K=e.unstable_now(),typeof H=="function"){h.callback=H,T(K),te=!0;break t}h===n(c)&&r(c),T(K)}else r(c);h=n(c)}if(h!==null)te=!0;else{var O=n(u);O!==null&&Z(N,O.startTime-K),te=!1}}break e}finally{h=null,p=ne,g=!1}te=void 0}}finally{te?U():A=!1}}}var U;if(typeof E=="function")U=function(){E(V)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,Q=G.port2;G.port1.onmessage=V,U=function(){Q.postMessage(null)}}else U=function(){w(V,0)};function Z(K,te){k=w(function(){K(e.unstable_now())},te)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(K){K.callback=null},e.unstable_forceFrameRate=function(K){0>K||125<K?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<K?Math.floor(1e3/K):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_next=function(K){switch(p){case 1:case 2:case 3:var te=3;break;default:te=p}var ne=p;p=te;try{return K()}finally{p=ne}},e.unstable_requestPaint=function(){_=!0},e.unstable_runWithPriority=function(K,te){switch(K){case 1:case 2:case 3:case 4:case 5:break;default:K=3}var ne=p;p=K;try{return te()}finally{p=ne}},e.unstable_scheduleCallback=function(K,te,ne){var se=e.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?se+ne:se):ne=se,K){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=ne+H,K={id:d++,callback:te,priorityLevel:K,startTime:ne,expirationTime:H,sortIndex:-1},ne>se?(K.sortIndex=ne,t(u,K),n(c)===null&&K===n(u)&&(x?(S(k),k=-1):x=!0,Z(N,ne-se))):(K.sortIndex=H,t(c,K),v||g||(v=!0,A||(A=!0,U()))),K},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(K){var te=p;return function(){var ne=p;p=te;try{return K.apply(this,arguments)}finally{p=ne}}}})(kO)),kO}var qG;function a3e(){return qG||(qG=1,AO.exports=s3e()),AO.exports}var NO={exports:{}},ro={};/** 37 * @license React 38 * react-dom.production.js 39 * 40 * Copyright (c) Meta Platforms, Inc. and affiliates. 41 * 42 * This source code is licensed under the MIT license found in the 43 * LICENSE file in the root directory of this source tree. 44 */var WG;function o3e(){if(WG)return ro;WG=1;var e=WS();function t(c){var u="https://react.dev/errors/"+c;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)u+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+c+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function s(c,u,d){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:h==null?null:""+h,children:c,containerInfo:u,implementation:d}}var a=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function o(c,u){if(c==="font")return"";if(typeof u=="string")return u==="use-credentials"?u:""}return ro.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,ro.createPortal=function(c,u){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11)throw Error(t(299));return s(c,u,null,d)},ro.flushSync=function(c){var u=a.T,d=r.p;try{if(a.T=null,r.p=2,c)return c()}finally{a.T=u,r.p=d,r.d.f()}},ro.preconnect=function(c,u){typeof c=="string"&&(u?(u=u.crossOrigin,u=typeof u=="string"?u==="use-credentials"?u:"":void 0):u=null,r.d.C(c,u))},ro.prefetchDNS=function(c){typeof c=="string"&&r.d.D(c)},ro.preinit=function(c,u){if(typeof c=="string"&&u&&typeof u.as=="string"){var d=u.as,h=o(d,u.crossOrigin),p=typeof u.integrity=="string"?u.integrity:void 0,g=typeof u.fetchPriority=="string"?u.fetchPriority:void 0;d==="style"?r.d.S(c,typeof u.precedence=="string"?u.precedence:void 0,{crossOrigin:h,integrity:p,fetchPriority:g}):d==="script"&&r.d.X(c,{crossOrigin:h,integrity:p,fetchPriority:g,nonce:typeof u.nonce=="string"?u.nonce:void 0})}},ro.preinitModule=function(c,u){if(typeof c=="string")if(typeof u=="object"&&u!==null){if(u.as==null||u.as==="script"){var d=o(u.as,u.crossOrigin);r.d.M(c,{crossOrigin:d,integrity:typeof u.integrity=="string"?u.integrity:void 0,nonce:typeof u.nonce=="string"?u.nonce:void 0})}}else u==null&&r.d.M(c)},ro.preload=function(c,u){if(typeof c=="string"&&typeof u=="object"&&u!==null&&typeof u.as=="string"){var d=u.as,h=o(d,u.crossOrigin);r.d.L(c,d,{crossOrigin:h,integrity:typeof u.integrity=="string"?u.integrity:void 0,nonce:typeof u.nonce=="string"?u.nonce:void 0,type:typeof u.type=="string"?u.type:void 0,fetchPriority:typeof u.fetchPriority=="string"?u.fetchPriority:void 0,referrerPolicy:typeof u.referrerPolicy=="string"?u.referrerPolicy:void 0,imageSrcSet:typeof u.imageSrcSet=="string"?u.imageSrcSet:void 0,imageSizes:typeof u.imageSizes=="string"?u.imageSizes:void 0,media:typeof u.media=="string"?u.media:void 0})}},ro.preloadModule=function(c,u){if(typeof c=="string")if(u){var d=o(u.as,u.crossOrigin);r.d.m(c,{as:typeof u.as=="string"&&u.as!=="script"?u.as:void 0,crossOrigin:d,integrity:typeof u.integrity=="string"?u.integrity:void 0})}else r.d.m(c)},ro.requestFormReset=function(c){r.d.r(c)},ro.unstable_batchedUpdates=function(c,u){return c(u)},ro.useFormState=function(c,u,d){return a.H.useFormState(c,u,d)},ro.useFormStatus=function(){return a.H.useHostTransitionStatus()},ro.version="19.2.0",ro}var GG;function nae(){if(GG)return NO.exports;GG=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),NO.exports=o3e(),NO.exports}/** 45 * @license React 46 * react-dom-client.production.js 47 * 48 * Copyright (c) Meta Platforms, Inc. and affiliates. 49 * 50 * This source code is licensed under the MIT license found in the 51 * LICENSE file in the root directory of this source tree. 52 */var KG;function l3e(){if(KG)return x_;KG=1;var e=a3e(),t=WS(),n=nae();function r(f){var m="https://react.dev/errors/"+f;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)m+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+f+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(f){return!(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)}function s(f){var m=f,y=f;if(f.alternate)for(;m.return;)m=m.return;else{f=m;do m=f,(m.flags&4098)!==0&&(y=m.return),f=m.return;while(f)}return m.tag===3?y:null}function a(f){if(f.tag===13){var m=f.memoizedState;if(m===null&&(f=f.alternate,f!==null&&(m=f.memoizedState)),m!==null)return m.dehydrated}return null}function o(f){if(f.tag===31){var m=f.memoizedState;if(m===null&&(f=f.alternate,f!==null&&(m=f.memoizedState)),m!==null)return m.dehydrated}return null}function c(f){if(s(f)!==f)throw Error(r(188))}function u(f){var m=f.alternate;if(!m){if(m=s(f),m===null)throw Error(r(188));return m!==f?null:f}for(var y=f,C=m;;){var I=y.return;if(I===null)break;var F=I.alternate;if(F===null){if(C=I.return,C!==null){y=C;continue}break}if(I.child===F.child){for(F=I.child;F;){if(F===y)return c(I),f;if(F===C)return c(I),m;F=F.sibling}throw Error(r(188))}if(y.return!==C.return)y=I,C=F;else{for(var ee=!1,de=I.child;de;){if(de===y){ee=!0,y=I,C=F;break}if(de===C){ee=!0,C=I,y=F;break}de=de.sibling}if(!ee){for(de=F.child;de;){if(de===y){ee=!0,y=F,C=I;break}if(de===C){ee=!0,C=F,y=I;break}de=de.sibling}if(!ee)throw Error(r(189))}}if(y.alternate!==C)throw Error(r(190))}if(y.tag!==3)throw Error(r(188));return y.stateNode.current===y?f:m}function d(f){var m=f.tag;if(m===5||m===26||m===27||m===6)return f;for(f=f.child;f!==null;){if(m=d(f),m!==null)return m;f=f.sibling}return null}var h=Object.assign,p=Symbol.for("react.element"),g=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),S=Symbol.for("react.consumer"),E=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),R=Symbol.for("react.activity"),P=Symbol.for("react.memo_cache_sentinel"),V=Symbol.iterator;function U(f){return f===null||typeof f!="object"?null:(f=V&&f[V]||f["@@iterator"],typeof f=="function"?f:null)}var G=Symbol.for("react.client.reference");function Q(f){if(f==null)return null;if(typeof f=="function")return f.$$typeof===G?null:f.displayName||f.name||null;if(typeof f=="string")return f;switch(f){case x:return"Fragment";case w:return"Profiler";case _:return"StrictMode";case N:return"Suspense";case A:return"SuspenseList";case R:return"Activity"}if(typeof f=="object")switch(f.$$typeof){case v:return"Portal";case E:return f.displayName||"Context";case S:return(f._context.displayName||"Context")+".Consumer";case T:var m=f.render;return f=f.displayName,f||(f=m.displayName||m.name||"",f=f!==""?"ForwardRef("+f+")":"ForwardRef"),f;case k:return m=f.displayName||null,m!==null?m:Q(f.type)||"Memo";case j:m=f._payload,f=f._init;try{return Q(f(m))}catch{}}return null}var Z=Array.isArray,K=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pen
vendor: 4,232 bytes, lines 52-59
52ding:!1,data:null,method:null,action:null},se=[],H=-1;function O(f){return{current:f}}function L(f){0>H||(f.current=se[H],se[H]=null,H--)}function M(f,m){H++,se[H]=f.current,f.current=m}var q=O(null),X=O(null),J=O(null),W=O(null);function re(f,m){switch(M(J,m),M(X,f),M(q,null),m.nodeType){case 9:case 11:f=(f=m.documentElement)&&(f=f.namespaceURI)?rW(f):0;break;default:if(f=m.tagName,m=m.namespaceURI)m=rW(m),f=iW(m,f);else switch(f){case"svg":f=1;break;case"math":f=2;break;default:f=0}}L(q),M(q,f)}function ae(){L(q),L(X),L(J)}function ce(f){f.memoizedState!==null&&M(W,f);var m=q.current,y=iW(m,f.type);m!==y&&(M(X,f),M(q,y))}function Te(f){X.current===f&&(L(q),L(X)),W.current===f&&(L(W),i_._currentValue=ne)}var fe,xe;function ke(f){if(fe===void 0)try{throw Error()}catch(y){var m=y.stack.trim().match(/\n( *(at )?)/);fe=m&&m[1]||"",xe=-1<y.stack.indexOf(` 53 at`)?" (<anonymous>)":-1<y.stack.indexOf("@")?"@unknown:0:0":""}return` 54`+fe+f+xe}var Fe=!1;function tt(f,m){if(!f||Fe)return"";Fe=!0;var y=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var C={DetermineComponentFrameRoot:function(){try{if(m){var bt=function(){throw Error()};if(Object.defineProperty(bt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(bt,[])}catch(nt){var Je=nt}Reflect.construct(f,[],bt)}else{try{bt.call()}catch(nt){Je=nt}f.call(bt.prototype)}}else{try{throw Error()}catch(nt){Je=nt}(bt=f())&&typeof bt.catch=="function"&&bt.catch(function(){})}}catch(nt){if(nt&&Je&&typeof nt.stack=="string")return[nt.stack,Je.stack]}return[null,null]}};C.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var I=Object.getOwnPropertyDescriptor(C.DetermineComponentFrameRoot,"name");I&&I.configurable&&Object.defineProperty(C.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var F=C.DetermineComponentFrameRoot(),ee=F[0],de=F[1];if(ee&&de){var Pe=ee.split(` 55`),Ye=de.split(` 56`);for(I=C=0;C<Pe.length&&!Pe[C].includes("DetermineComponentFrameRoot");)C++;for(;I<Ye.length&&!Ye[I].includes("DetermineComponentFrameRoot");)I++;if(C===Pe.length||I===Ye.length)for(C=Pe.length-1,I=Ye.length-1;1<=C&&0<=I&&Pe[C]!==Ye[I];)I--;for(;1<=C&&0<=I;C--,I--)if(Pe[C]!==Ye[I]){if(C!==1||I!==1)do if(C--,I--,0>I||Pe[C]!==Ye[I]){var ht=` 57`+Pe[C].replace(" at new "," at ");return f.displayName&&ht.includes("<anonymous>")&&(ht=ht.replace("<anonymous>",f.displayName)),ht}while(1<=C&&0<=I);break}}}finally{Fe=!1,Error.prepareStackTrace=y}return(y=f?f.displayName||f.name:"")?ke(y):""}function Se(f,m){switch(f.tag){case 26:case 27:case 5:return ke(f.type);case 16:return ke("Lazy");case 13:return f.child!==m&&m!==null?ke("Suspense Fallback"):ke("Suspense");case 19:return ke("SuspenseList");case 0:case 15:return tt(f.type,!1);case 11:return tt(f.type.render,!1);case 1:return tt(f.type,!0);case 31:return ke("Activity");default:return""}}function et(f){try{var m="",y=null;do m+=Se(f,y),y=f,f=f.return;while(f);return m}catch(C){return` 58Error generating stack: `+C.message+` 59`+C.stack}}var pt=Object.prototype.hasOwnProperty,ie=e.unstable_scheduleCallback,ue=e.unstable_cancelCallback,Ne=e.unstable_shouldYield,De=e.unstable_requestPaint,be=e.unstable_now,me=e.unstable_getCurrentPriorityLevel,we=e.unstable_ImmediatePriority,Le=e.unstable_UserBlockingPriority,oe=e.unstable_NormalPriority,St=e.unstable_LowPriority,Ut=e.unstable_IdlePriority,Ht=e.log,Rt=e.unstable_setDisableYieldValue,Ct=null,Wt=null;function Tn(f){if(typeof Ht=="function"&&Rt(f),Wt&&typeof Wt.setStrictMode=="function")try{Wt.setStrictMode(Ct,f)}catch{}}var Ie=Math.clz32?Math.clz32:Mn,dt=Math.log,$t=Math.LN2;function Mn(f){return f>>>=0,f===0?32:31-(dt(f)/$t|0)|0}var Ve=256,ct=262144,Gt=4194304;function Cn(f){var m=f&42;if(m!==0)return m;switch(f&-f){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 f&261888;case 262144:case 524288:case 1048576:case 2097152:return f&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return f&62914560;case 67108864:return 67108864;
vendor: 8,040 bytes, line 59
59case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return f}}function Zr(f,m,y){var C=f.pendingLanes;if(C===0)return 0;var I=0,F=f.suspendedLanes,ee=f.pingedLanes;f=f.warmLanes;var de=C&134217727;return de!==0?(C=de&~F,C!==0?I=Cn(C):(ee&=de,ee!==0?I=Cn(ee):y||(y=de&~f,y!==0&&(I=Cn(y))))):(de=C&~F,de!==0?I=Cn(de):ee!==0?I=Cn(ee):y||(y=C&~f,y!==0&&(I=Cn(y)))),I===0?0:m!==0&&m!==I&&(m&F)===0&&(F=I&-I,y=m&-m,F>=y||F===32&&(y&4194048)!==0)?m:I}function rn(f,m){return(f.pendingLanes&~(f.suspendedLanes&~f.pingedLanes)&m)===0}function _n(f,m){switch(f){case 1:case 2:case 4:case 8:case 64:return m+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 m+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 Hn(){var f=Gt;return Gt<<=1,(Gt&62914560)===0&&(Gt=4194304),f}function Jr(f){for(var m=[],y=0;31>y;y++)m.push(f);return m}function Nr(f,m){f.pendingLanes|=m,m!==268435456&&(f.suspendedLanes=0,f.pingedLanes=0,f.warmLanes=0)}function Ns(f,m,y,C,I,F){var ee=f.pendingLanes;f.pendingLanes=y,f.suspendedLanes=0,f.pingedLanes=0,f.warmLanes=0,f.expiredLanes&=y,f.entangledLanes&=y,f.errorRecoveryDisabledLanes&=y,f.shellSuspendCounter=0;var de=f.entanglements,Pe=f.expirationTimes,Ye=f.hiddenUpdates;for(y=ee&~y;0<y;){var ht=31-Ie(y),bt=1<<ht;de[ht]=0,Pe[ht]=-1;var Je=Ye[ht];if(Je!==null)for(Ye[ht]=null,ht=0;ht<Je.length;ht++){var nt=Je[ht];nt!==null&&(nt.lane&=-536870913)}y&=~bt}C!==0&&Or(f,C,0),F!==0&&I===0&&f.tag!==0&&(f.suspendedLanes|=F&~(ee&~m))}function Or(f,m,y){f.pendingLanes|=m,f.suspendedLanes&=~m;var C=31-Ie(m);f.entangledLanes|=m,f.entanglements[C]=f.entanglements[C]|1073741824|y&261930}function br(f,m){var y=f.entangledLanes|=m;for(f=f.entanglements;y;){var C=31-Ie(y),I=1<<C;I&m|f[C]&m&&(f[C]|=m),y&=~I}}function fi(f,m){var y=m&-m;return y=(y&42)!==0?1:zi(y),(y&(f.suspendedLanes|m))!==0?0:y}function zi(f){switch(f){case 2:f=1;break;case 8:f=4;break;case 32:f=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:f=128;break;case 268435456:f=134217728;break;default:f=0}return f}function Gi(f){return f&=-f,2<f?8<f?(f&134217727)!==0?32:268435456:8:2}function le(){var f=te.p;return f!==0?f:(f=window.event,f===void 0?32:AW(f.type))}function ve(f,m){var y=te.p;try{return te.p=f,m()}finally{te.p=y}}var he=Math.random().toString(36).slice(2),pe="__reactFiber$"+he,ye="__reactProps$"+he,Ee="__reactContainer$"+he,Xe="__reactEvents$"+he,ft="__reactListeners$"+he,He="__reactHandles$"+he,Qe="__reactResources$"+he,Ze="__reactMarker$"+he;function kt(f){delete f[pe],delete f[ye],delete f[Xe],delete f[ft],delete f[He]}function zt(f){var m=f[pe];if(m)return m;for(var y=f.parentNode;y;){if(m=y[Ee]||y[pe]){if(y=m.alternate,m.child!==null||y!==null&&y.child!==null)for(f=dW(f);f!==null;){if(y=f[pe])return y;f=dW(f)}return m}f=y,y=f.parentNode}return null}function Xt(f){if(f=f[pe]||f[Ee]){var m=f.tag;if(m===5||m===6||m===13||m===31||m===26||m===27||m===3)return f}return null}function Ot(f){var m=f.tag;if(m===5||m===26||m===27||m===6)return f.stateNode;throw Error(r(33))}function Kt(f){var m=f[Qe];return m||(m=f[Qe]={hoistableStyles:new Map,hoistableScripts:new Map}),m}function hn(f){f[Ze]=!0}var hi=new Set,pi={};function In(f,m){Ai(f,m),Ai(f+"Capture",m)}function Ai(f,m){for(pi[f]=m,f=0;f<m.length;f++)hi.add(m[f])}var tg=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]*$"),Qh={},td={};function bb(f){return pt.call(td,f)?!0:pt.call(Qh,f)?!1:tg.test(f)?td[f]=!0:(Qh[f]=!0,!1)}function Wo(f,m,y){if(bb(m))if(y===null)f.removeAttribute(m);else{switch(typeof y){case"undefined":case"function":case"symbol":f.removeAttribute(m);return;case"boolean":var C=m.toLowerCase().slice(0,5);if(C!=="data-"&&C!=="aria-"){f.removeAttribute(m);return}}f.setAttribute(m,""+y)}}function gC(f,m,y){if(y===null)f.removeAttribute(m);else{switch(typeof y){case"undefined":case"function":case"symbol":case"boolean":f.removeAttribute(m);return}f.setAttribute(m,""+y)}}function of(f,m,y,C){if(C===null)f.removeAttribute(y);else{switch(typeof C){case"undefined":case"function":case"symbol":case"boolean":f.removeAttribute(y);return}f.setAttributeNS(m,y,""+C)}}function ec(f){switch(typeof f){case"bigint":case"boolean":case"number":case"string":case"undefined":return f;case"object":return f;default:return""}}function YU(f){var m=f.type;return(f=f.nodeName)&&f.toLowerCase()==="input"&&(m==="checkbox"||m==="radio")}function NEe(f,m,y){var C=Object.getOwnPropertyDescriptor(f.constructor.prototype,m);if(!f.hasOwnProperty(m)&&typeof C<"u"&&typeof C.get=="function"&&typeof C.set=="function"){var I=C.get,F=C.set;return Object.defineProperty(f,m,{configurable:!0,get:function(){return I.call(this)},set:function(ee){y=""+ee,F.call(this,ee)}}),Object.defineProperty(f,m,{enumerable:C.enumerable}),{getValue:function(){return y},setValue:function(ee){y=""+ee},stopTracking:function(){f._valueTracker=null,delete f[m]}}}}function Z4(f){if(!f._valueTracker){var m=YU(f)?"checked":"value";f._valueTracker=NEe(f,m,""+f[m])}}function XU(f){if(!f)return!1;var m=f._valueTracker;if(!m)return!0;var y=m.getValue(),C="";return f&&(C=YU(f)?f.checked?"true":"false":f.value),f=C,f!==y?(m.setValue(f),!0):!1}function xC(f){if(f=f||(typeof document<"u"?document:void 0),typeof f>"u")return null;try{return f.activeElement||f.body}catch{return f.body}}var jEe=/[\n"\\]/g;function tc(f){return f.replace(jEe,function(m){return"\\"+m.charCodeAt(0).toString(16)+" "})}function J4(f,m,y,C,I,F,ee,de){f.name="",ee!=null&&typeof ee!="function"&&typeof ee!="symbol"&&typeof ee!="boolean"?f.type=ee:f.removeAttribute("type"),m!=null?ee==="number"?(m===0&&f.value===""||f.value!=m)&&(f.value=""+ec(m)):f.value!==""+ec(m)&&(f.value=""+ec(m)):ee!=="submit"&&ee!=="reset"||f.removeAttribute("value"),m!=null?eR(f,ee,ec(m)):y!=null?eR(f,ee,ec(y)):C!=null&&f.removeAttribute("value"),I==null&&F!=null&&(f.defaultChecked=!!F),I!=null&&(f.checked=I&&typeof I!="function"&&typeof I!="symbol"),de!=null&&typeof de!="function"&&typeof de!="symbol"&&typeof de!="boolean"?f.name=""+ec(de):f.removeAttribute("name")}function QU(f,m,y,C,I,F,ee,de){if(F!=null&&typeof F!="function"&&typeof F!="symbol"&&typeof F!="boolean"&&(f.type=F),m!=null||y!=null){if(!(F!=="submit"&&F!=="reset"||m!=null)){Z4(f);return}y=y!=null?""+ec(y):"",m=m!=null?""+ec(m):y,de||m===f.value||(f.value=m),f.defaultValue=m}C=C??I,C=typeof C!="function"&&typeof C!="symbol"&&!!C,f.checked=de?f.checked:!!C,f.defaultChecked=!!C,ee!=null&&typeof ee!="function"&&typeof ee!="symbol"&&typeof ee!="boolean"&&(f.name=ee),Z4(f)}function eR(f,m,y){m==="number"&&xC(f.ownerDocument)===f||f.defaultValue===""+y||(f.defaultValue=""+y)}function Dx(f,m,y,C){if(f=f.options,m){m={};for(var I=0;I<y.length;I++)m["$"+y[I]]=!0;for(y=0;y<f.length;y++)I=m.hasOwnProperty("$"+f[y].value),f[y].selected!==I&&(f[y].selected=I),I&&C&&(f[y].defaultSelected=!0)}else{for(y=""+ec(y),m=null,I=0;I<f.length;I++){if(f[I].value===y){f[I].selected=!0,C&&(f[I].defaultSelected=!0);return}m!==null||f[I].disabled||(m=f[I])}m!==null&&(m.selected=!0)}}function ZU(f,m,y){if(m!=null&&(m=""+ec(m),m!==f.value&&(f.value=m),y==null)){f.defaultValue!==m&&(f.defaultValue=m);return}f.defaultValue=y!=null?""+ec(y):""}function JU(f,m,y,C){if(m==null){if(C!=null){if(y!=null)throw Error(r(92));
vendor: 4,342 bytes, line 59
59if(Z(C)){if(1<C.length)throw Error(r(93));C=C[0]}y=C}y==null&&(y=""),m=y}y=ec(m),f.defaultValue=y,C=f.textContent,C===y&&C!==""&&C!==null&&(f.value=C),Z4(f)}function Fx(f,m){if(m){var y=f.firstChild;if(y&&y===f.lastChild&&y.nodeType===3){y.nodeValue=m;return}}f.textContent=m}var REe=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 eV(f,m,y){var C=m.indexOf("--")===0;y==null||typeof y=="boolean"||y===""?C?f.setProperty(m,""):m==="float"?f.cssFloat="":f[m]="":C?f.setProperty(m,y):typeof y!="number"||y===0||REe.has(m)?m==="float"?f.cssFloat=y:f[m]=(""+y).trim():f[m]=y+"px"}function tV(f,m,y){if(m!=null&&typeof m!="object")throw Error(r(62));if(f=f.style,y!=null){for(var C in y)!y.hasOwnProperty(C)||m!=null&&m.hasOwnProperty(C)||(C.indexOf("--")===0?f.setProperty(C,""):C==="float"?f.cssFloat="":f[C]="");for(var I in m)C=m[I],m.hasOwnProperty(I)&&y[I]!==C&&eV(f,I,C)}else for(var F in m)m.hasOwnProperty(F)&&eV(f,F,m[F])}function tR(f){if(f.indexOf("-")===-1)return!1;switch(f){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 IEe=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode
59-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"]]),OEe=/^[\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 vC(f){return OEe.test(""+f)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":f}function lf(){}var nR=null;function rR(f){return f=f.target||f.srcElement||window,f.correspondingUseElement&&(f=f.correspondingUseElement),f.nodeType===3?f.parentNode:f}var Lx=null,zx=null;function nV(f){var m=Xt(f);if(m&&(f=m.stateNode)){var y=f[ye]||null;e:switch(f=m.stateNode,m.type){case"input":if(J4(f,y.value,y.defaultValue,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name),m=y.name,y.type==="radio"&&m!=null){for(y=f;y.parentNode;)y=y.parentNode;for(y=y.querySelectorAll('input[name="'+tc(""+m)+'"][type="radio"]'),m=0;m<y.length;m++){var C=y[m];if(C!==f&&C.form===f.form){var I=C[ye]||null;if(!I)throw Error(r(90));J4(C,I.value,I.defaultValue,I.defaultValue,I.checked,I.defaultChecked,I.type,I.name)}}for(m=0;m<y.length;m++)C=y[m],C.form===f.form&&XU(C)}break e;case"textarea":ZU(f,y.value,y.defaultValue);break e;case"select":m=y.value,m!=null&&Dx(f,!!y.multiple,m,!1)}}}var iR=!1;function rV(f,m,y){if(iR)return f(m,y);iR=!0;try{var C=f(m);return C}finally{if(iR=!1,(Lx!==null||zx!==null)&&(sT(),Lx&&(m=Lx,f=zx,zx=Lx=null,nV(m),f)))for(m=0;m<f.length;m++)nV(f[m])}}function _b(f,m){var y=f.stateNode;if(y===null)return null;var C=y[ye]||null;if(C===null)return null;y=C[m];e:switch(m){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(C=!C.disabled)||(f=f.type,C=!(f==="button"||f==="input"||f==="select"||f==="textarea")),f=!C;break e;default:f=!1}if(f)return null;if(y&&typeof y!="function")throw Error(r(231,m,typeof y));return y}var cf=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),sR=!1;if(cf)try{var wb={};Object.defineProperty(wb,"passive",{get:function(){sR=!0}}),window.addEventListener("test",wb,wb),window.removeEventListener("test",wb,wb)}catch{sR=!1}var Zh=null,aR=null,yC=null;function iV(){if(yC)return yC;var f,m=aR,y=m.length,C,I="value"in Zh?Zh.value:Zh.textContent,F=I.length;for(f=0;f<y&&m[f]===I[f];f++);var ee=y-f;for(C=1;C<=ee&&m[y-C]===I[F-C];C++);return yC=I.slice(f,1<C?1-C:void 0)}function bC(f){var m=f.keyCode;return"charCode"in f?(f=f.charCode,f===0&&m===13&&(f=13)):f=m,f===10&&(f=13),32<=f||f===13?f:0}function _C(){return!0}function sV(){return!1}function Go(f){function m(y,C,I,F,ee){this._reactName=y,this._targetInst=I,this.type=C,this.nativeEvent=F,this.target=ee,this.currentTarget=null;for(var de in f)f.hasOwnProperty(de)&&(y=f[de],this[de]=y?y(F):F[de]);return this.isDefaultPrevented=(F.defaultPrevented!=null?F.defaultPrevented:F.returnValue===!1)?_C:sV,this.isPropagationStopped=sV,this}return h(m.prototype,{preventDefault:function(){this.defaultPrevented=!0;var y=this.nativeEvent;y&&(y.preventDefault?y.preventDefault():typeof y.returnValue!="unknown"&&(y.returnValue=!1),this.isDefaultPrevented=_C)},stopPropagation:function(){var y=this.nativeEvent;y&&(y.stopPropagation?y.stopPropagation():typeof y.cancelBubble!="unknown"&&(y.cancelBubble=!0),this.isPropagationStopped=_C)},persist:function(){},isPersistent:_C}),m}var ng={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(f){return f.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wC=Go(ng),Sb=h({},ng,{view:0,detail:0}),PEe=Go(Sb),oR,lR,Eb,SC=h({},Sb,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:uR,button:0,buttons:0,relatedTarget:function(f){return f.relatedTarget===void 0?f.fromElement===f.srcElement?f.toElement:f.fromElement:f.relatedTarget},movementX:function(f){return"movementX"in f?f.movementX:(f!==Eb&&(Eb&&f.type==="mousemove"?(oR=f.screenX-Eb.screenX,lR=f.screenY-Eb.screenY):lR=oR=0,Eb=f),oR)},movementY:function(f){return"movementY"in f?f.movementY:lR}}),aV=Go(SC),MEe=h({},SC,{dataTransfer:0}),DEe=Go(MEe),FEe=h({},Sb,{relatedTarget:0}),cR=Go(FEe),LEe=h({},ng,{animationName:0,elapsedTime:0,pseudoElement:0}),zEe=Go(LEe),$Ee=h({},ng,{clipboardData:function(f){return"clipboardData"in f?f.clipboardData:window.clipboardData}}),BEe=Go($Ee),UEe=h({},ng,{data:0}),oV=Go(UEe),VEe={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},HEe={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"},qEe={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function WEe(f){var m=this.nativeEvent;return m.getModifierState?m.getModifierState(f):(f=qEe[f])?!!m[f]:!1}function uR(){return WEe}var GEe=h({},Sb,{key:function(f){if(f.key){var m=VEe[f.key]||f.key;if(m!=="Unidentified")return m}
vendor: 2,560 bytes, line 59
59return f.type==="keypress"?(f=bC(f),f===13?"Enter":String.fromCharCode(f)):f.type==="keydown"||f.type==="keyup"?HEe[f.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:uR,charCode:function(f){return f.type==="keypress"?bC(f):0},keyCode:function(f){return f.type==="keydown"||f.type==="keyup"?f.keyCode:0},which:function(f){return f.type==="keypress"?bC(f):f.type==="keydown"||f.type==="keyup"?f.keyCode:0}}),KEe=Go(GEe),YEe=h({},SC,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),lV=Go(YEe),XEe=h({},Sb,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:uR}),QEe=Go(XEe),ZEe=h({},ng,{propertyName:0,elapsedTime:0,pseudoElement:0}),JEe=Go(ZEe),eCe=h({},SC,{deltaX:function(f){return"deltaX"in f?f.deltaX:"wheelDeltaX"in f?-f.wheelDeltaX:0},deltaY:function(f){return"deltaY"in f?f.deltaY:"wheelDeltaY"in f?-f.wheelDeltaY:"wheelDelta"in f?-f.wheelDelta:0},deltaZ:0,deltaMode:0}),tCe=Go(eCe),nCe=h({},ng,{newState:0,oldState:0}),rCe=Go(nCe),iCe=[9,13,27,32],dR=cf&&"CompositionEvent"in window,Cb=null;cf&&"documentMode"in document&&(Cb=document.documentMode);var sCe=cf&&"TextEvent"in window&&!Cb,cV=cf&&(!dR||Cb&&8<Cb&&11>=Cb),uV=" ",dV=!1;function fV(f,m){switch(f){case"keyup":return iCe.indexOf(m.keyCode)!==-1;case"keydown":return m.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hV(f){return f=f.detail,typeof f=="object"&&"data"in f?f.data:null}var $x=!1;function aCe(f,m){switch(f){case"compositionend":return hV(m);case"keypress":return m.which!==32?null:(dV=!0,uV);case"textInput":return f=m.data,f===uV&&dV?null:f;default:return null}}function oCe(f,m){if($x)return f==="compositionend"||!dR&&fV(f,m)?(f=iV(),yC=aR=Zh=null,$x=!1,f):null;switch(f){case"paste":return null;case"keypress":if(!(m.ctrlKey||m.altKey||m.metaKey)||m.ctrlKey&&m.altKey){if(m.char&&1<m.char.length)return m.char;if(m.which)return String.fromCharCode(m.which)}return null;case"compositionend":return cV&&m.locale!=="ko"?null:m.data;default:return null}}var lCe={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 pV(f){var m=f&&f.nodeName&&f.nodeName.toLowerCase();return m==="input"?!!lCe[f.type]:m==="textarea"}function mV(f,m,y,C){Lx?zx?zx.push(C):zx=[C]:Lx=C,m=fT(m,"onChange"),0<m.length&&(y=new wC("onChange","change",null,y,C),f.pu
vendor: 6,165 bytes, line 59
59sh({event:y,listeners:m}))}var Tb=null,Ab=null;function cCe(f){Qq(f,0)}function EC(f){var m=Ot(f);if(XU(m))return f}function gV(f,m){if(f==="change")return m}var xV=!1;if(cf){var fR;if(cf){var hR="oninput"in document;if(!hR){var vV=document.createElement("div");vV.setAttribute("oninput","return;"),hR=typeof vV.oninput=="function"}fR=hR}else fR=!1;xV=fR&&(!document.documentMode||9<document.documentMode)}function yV(){Tb&&(Tb.detachEvent("onpropertychange",bV),Ab=Tb=null)}function bV(f){if(f.propertyName==="value"&&EC(Ab)){var m=[];mV(m,Ab,f,rR(f)),rV(cCe,m)}}function uCe(f,m,y){f==="focusin"?(yV(),Tb=m,Ab=y,Tb.attachEvent("onpropertychange",bV)):f==="focusout"&&yV()}function dCe(f){if(f==="selectionchange"||f==="keyup"||f==="keydown")return EC(Ab)}function fCe(f,m){if(f==="click")return EC(m)}function hCe(f,m){if(f==="input"||f==="change")return EC(m)}function pCe(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var wl=typeof Object.is=="function"?Object.is:pCe;function kb(f,m){if(wl(f,m))return!0;if(typeof f!="object"||f===null||typeof m!="object"||m===null)return!1;var y=Object.keys(f),C=Object.keys(m);if(y.length!==C.length)return!1;for(C=0;C<y.length;C++){var I=y[C];if(!pt.call(m,I)||!wl(f[I],m[I]))return!1}return!0}function _V(f){for(;f&&f.firstChild;)f=f.firstChild;return f}function wV(f,m){var y=_V(f);f=0;for(var C;y;){if(y.nodeType===3){if(C=f+y.textContent.length,f<=m&&C>=m)return{node:y,offset:m-f};f=C}e:{for(;y;){if(y.nextSibling){y=y.nextSibling;break e}y=y.parentNode}y=void 0}y=_V(y)}}function SV(f,m){return f&&m?f===m?!0:f&&f.nodeType===3?!1:m&&m.nodeType===3?SV(f,m.parentNode):"contains"in f?f.contains(m):f.compareDocumentPosition?!!(f.compareDocumentPosition(m)&16):!1:!1}function EV(f){f=f!=null&&f.ownerDocument!=null&&f.ownerDocument.defaultView!=null?f.ownerDocument.defaultView:window;for(var m=xC(f.document);m instanceof f.HTMLIFrameElement;){try{var y=typeof m.contentWindow.location.href=="string"}catch{y=!1}if(y)f=m.contentWindow;else break;m=xC(f.document)}return m}function pR(f){var m=f&&f.nodeName&&f.nodeName.toLowerCase();return m&&(m==="input"&&(f.type==="text"||f.type==="search"||f.type==="tel"||f.type==="url"||f.type==="password")||m==="textarea"||f.contentEditable==="true")}var mCe=cf&&"documentMode"in document&&11>=document.documentMode,Bx=null,mR=null,Nb=null,gR=!1;function CV(f,m,y){var C=y.window===y?y.document:y.nodeType===9?y:y.ownerDocument;gR||Bx==null||Bx!==xC(C)||(C=Bx,"selectionStart"in C&&pR(C)?C={start:C.selectionStart,end:C.selectionEnd}:(C=(C.ownerDocument&&C.ownerDocument.defaultView||window).getSelection(),C={anchorNode:C.anchorNode,anchorOffset:C.anchorOffset,focusNode:C.focusNode,focusOffset:C.focusOffset}),Nb&&kb(Nb,C)||(Nb=C,C=fT(mR,"onSelect"),0<C.length&&(m=new wC("onSelect","select",null,m,y),f.push({event:m,listeners:C}),m.target=Bx)))}function rg(f,m){var y={};return y[f.toLowerCase()]=m.toLowerCase(),y["Webkit"+f]="webkit"+m,y["Moz"+f]="moz"+m,y}var Ux={animationend:rg("Animation","AnimationEnd"),animationiteration:rg("Animation","AnimationIteration"),animationstart:rg("Animation","AnimationStart"),transitionrun:rg("Transition","TransitionRun"),transitionstart:rg("Transition","TransitionStart"),transitioncancel:rg("Transition","TransitionCancel"),transitionend:rg("Transition","TransitionEnd")},xR={},TV={};cf&&(TV=document.createElement("div").style,"AnimationEvent"in window||(delete Ux.animationend.animation,delete Ux.animationiteration.animation,delete Ux.animationstart.animation),"TransitionEvent"in window||delete Ux.transitionend.transition);function ig(f){if(xR[f])return xR[f];if(!Ux[f])return f;var m=Ux[f],y;for(y in m)if(m.hasOwnProperty(y)&&y in TV)return xR[f]=m[y];return f}var AV=ig("animationend"),kV=ig("animationiteration"),NV=ig("animationstart"),gCe=ig("transitionrun"),xCe=ig("transitionstart"),vCe=ig("transitioncancel"),jV=ig("transitionend"),RV=new Map,vR="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");vR.push("scrollEnd");function Kc(f,m){RV.set(f,m),In(m,[f])}var CC=typeof reportError=="function"?reportError:function(f){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var m=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof f=="object"&&f!==null&&typeof f.message=="string"?String(f.message):String(f),error:f});if(!window.dispatchEvent(m))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",f);return}console.error(f)},nc=[],Vx=0,yR=0;function TC(){for(var f=Vx,m=yR=Vx=0;m<f;){var y=nc[m];nc[m++]=null;var C=nc[m];nc[m++]=null;var I=nc[m];nc[m++]=null;var F=nc[m];if(nc[m++]=null,C!==null&&I!==null){var ee=C.pending;ee===null?I.next=I:(I.next=ee.next,ee.next=I),C.pending=I}F!==0&&IV(y,I,F)}}function AC(f,m,y,C){nc[Vx++]=f,nc[Vx++]=m,nc[Vx++]=y,nc[Vx++]=C,yR|=C,f.lanes|=C,f=f.alternate,f!==null&&(f.lanes|=C)}function bR(f,m,y,C){return AC(f,m,y,C),kC(f)}function sg(f,m){return AC(f,null,null,m),kC(f)}function IV(f,m,y){f.lanes|=y;var C=f.alternate;C!==null&&(C.lanes|=y);for(var I=!1,F=f.return;F!==null;)F.childLanes|=y,C=F.alternate,C!==null&&(C.childLanes|=y),F.tag===22&&(f=F.stateNode,f===null||f._visibility&1||(I=!0)),f=F,F=F.return;return f.tag===3?(F=f.stateNode,I&&m!==null&&(I=31-Ie(y),f=F.hiddenUpdates,C=f[I],C===null?f[I]=[m]:C.push(m),m.lane=y|536870912),F):null}function kC(f){if(50<Qb)throw Qb=0,NI=null,Error(r(185));for(var m=f.return;m!==null;)f=m,m=f.return;return f.tag===3?f.stateNode:null}var Hx={};function yCe(f,m,y,C){this.tag=f,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.t
vendor: 17,907 bytes, line 59
59ype=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=m,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=C,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Sl(f,m,y,C){return new yCe(f,m,y,C)}function _R(f){return f=f.prototype,!(!f||!f.isReactComponent)}function uf(f,m){var y=f.alternate;return y===null?(y=Sl(f.tag,m,f.key,f.mode),y.elementType=f.elementType,y.type=f.type,y.stateNode=f.stateNode,y.alternate=f,f.alternate=y):(y.pendingProps=m,y.type=f.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=f.flags&65011712,y.childLanes=f.childLanes,y.lanes=f.lanes,y.child=f.child,y.memoizedProps=f.memoizedProps,y.memoizedState=f.memoizedState,y.updateQueue=f.updateQueue,m=f.dependencies,y.dependencies=m===null?null:{lanes:m.lanes,firstContext:m.firstContext},y.sibling=f.sibling,y.index=f.index,y.ref=f.ref,y.refCleanup=f.refCleanup,y}function OV(f,m){f.flags&=65011714;var y=f.alternate;return y===null?(f.childLanes=0,f.lanes=m,f.child=null,f.subtreeFlags=0,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,f.stateNode=null):(f.childLanes=y.childLanes,f.lanes=y.lanes,f.child=y.child,f.subtreeFlags=0,f.deletions=null,f.memoizedProps=y.memoizedProps,f.memoizedState=y.memoizedState,f.updateQueue=y.updateQueue,f.type=y.type,m=y.dependencies,f.dependencies=m===null?null:{lanes:m.lanes,firstContext:m.firstContext}),f}function NC(f,m,y,C,I,F){var ee=0;if(C=f,typeof f=="function")_R(f)&&(ee=1);else if(typeof f=="string")ee=ETe(f,y,q.current)?26:f==="html"||f==="head"||f==="body"?27:5;else e:switch(f){case R:return f=Sl(31,y,m,I),f.elementType=R,f.lanes=F,f;case x:return ag(y.children,I,F,m);case _:ee=8,I|=24;break;case w:return f=Sl(12,y,m,I|2),f.elementType=w,f.lanes=F,f;case N:return f=Sl(13,y,m,I),f.elementType=N,f.lanes=F,f;case A:return f=Sl(19,y,m,I),f.elementType=A,f.lanes=F,f;default:if(typeof f=="object"&&f!==null)switch(f.$$typeof){case E:ee=10;break e;case S:ee=9;break e;case T:ee=11;break e;case k:ee=14;break e;case j:ee=16,C=null;break e}ee=29,y=Error(r(130,f===null?"null":typeof f,"")),C=null}return m=Sl(ee,y,m,I),m.elementType=f,m.type=C,m.lanes=F,m}function ag(f,m,y,C){return f=Sl(7,f,C,m),f.lanes=y,f}function wR(f,m,y){return f=Sl(6,f,null,m),f.lanes=y,f}function PV(f){var m=Sl(18,null,null,0);return m.stateNode=f,m}function SR(f,m,y){return m=Sl(4,f.children!==null?f.children:[],f.key,m),m.lanes=y,m.stateNode={containerInfo:f.containerInfo,pendingChildren:null,implementation:f.implementation},m}var MV=new WeakMap;function rc(f,m){if(typeof f=="object"&&f!==null){var y=MV.get(f);return y!==void 0?y:(m={value:f,source:m,stack:et(m)},MV.set(f,m),m)}return{value:f,source:m,stack:et(m)}}var qx=[],Wx=0,jC=null,jb=0,ic=[],sc=0,Jh=null,nd=1,rd="";function df(f,m){qx[Wx++]=jb,qx[Wx++]=jC,jC=f,jb=m}function DV(f,m,y){ic[sc++]=nd,ic[sc++]=rd,ic[sc++]=Jh,Jh=f;var C=nd;f=rd;var I=32-Ie(C)-1;C&=~(1<<I),y+=1;var F=32-Ie(m)+I;if(30<F){var ee=I-I%5;F=(C&(1<<ee)-1).toString(32),C>>=ee,I-=ee,nd=1<<32-Ie(m)+I|y<<I|C,rd=F+f}else nd=1<<F|y<<I|C,rd=f}function ER(f){f.return!==null&&(df(f,1),DV(f,1,0))}function CR(f){for(;f===jC;)jC=qx[--Wx],qx[Wx]=null,jb=qx[--Wx],qx[Wx]=null;for(;f===Jh;)Jh=ic[--sc],ic[sc]=null,rd=ic[--sc],ic[sc]=null,nd=ic[--sc],ic[sc]=null}function FV(f,m){ic[sc++]=nd,ic[sc++]=rd,ic[sc++]=Jh,nd=m.id,rd=m.overflow,Jh=f}var Oa=null,$i=null,Tr=!1,ep=null,ac=!1,TR=Error(r(519));function tp(f){var m=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Rb(rc(m,f)),TR}function LV(f){var m=f.stateNode,y=f.type,C=f.memoizedProps;switch(m[pe]=f,m[ye]=C,y){case"dialog":gr("cancel",m),gr("close",m);break;case"iframe":case"object":case"embed":gr("load",m);break;case"video":case"audio":for(y=0;y<Jb.length;y++)gr(Jb[y],m);break;case"source":gr("error",m);break;case"img":case"image":case"link":gr("error",m),gr("load",m);break;case"details":gr("toggle",m);break;case"input":gr("invalid",m),QU(m,C.value,C.defaultValue,C.checked,C.defaultChecked,C.type,C.name,!0);break;case"select":gr("invalid",m);break;case"textarea":gr("invalid",m),JU(m,C.value,C.defaultValue,C.children)}y=C.children,typeof y!="string"&&typeof y!="number"&&typeof y!="bigint"||m.textContent===""+y||C.suppressHydrationWarning===!0||tW(m.textContent,y)?(C.popover!=null&&(gr("beforetoggle",m),gr("toggle",m)),C.onScroll!=null&&gr("scroll",m),C.onScrollEnd!=null&&gr("scrollend",m),C.onClick!=null&&(m.onclick=lf),m=!0):m=!1,m||tp(f,!0)}function zV(f){for(Oa=f.return;Oa;)switch(Oa.tag){case 5:case 31:case 13:ac=!1;return;case 27:case 3:ac=!0;return;default:Oa=Oa.return}}function Gx(f){if(f!==Oa)return!1;if(!Tr)return zV(f),Tr=!0,!1;var m=f.tag,y;if((y=m!==3&&m!==27)&&((y=m===5)&&(y=f.type,y=!(y!=="form"&&y!=="button")||HI(f.type,f.memoizedProps)),y=!y),y&&$i&&tp(f),zV(f),m===13){if(f=f.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));$i=uW(f)}else if(m===31){if(f=f.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));$i=uW(f)}else m===27?(m=$i,mp(f.type)?(f=YI,YI=null,$i=f):$i=m):$i=Oa?lc(f.stateNode.nextSibling):null;return!0}function og(){$i=Oa=null,Tr=!1}function AR(){var f=ep;return f!==null&&(Qo===null?Qo=f:Qo.push.apply(Qo,f),ep=null),f}function Rb(f){ep===null?ep=[f]:ep.push(f)}var kR=O(null),lg=null,ff=null;function np(f,m,y){M(kR,m._currentValue),m._currentValue=y}function hf(f){f._currentValue=kR.current,L(kR)}function NR(f,m,y){for(;f!==null;){var C=f.alternate;if((f.childLanes&m)!==m?(f.childLanes|=m,C!==null&&(C.childLanes|=m)):C!==null&&(C.childLanes&m)!==m&&(C.childLanes|=m),f===y)break;f=f.return}}function jR(f,m,y,C){var I=f.child;for(I!==null&&(I.return=f);I!==null;){var F=I.dependencies;if(F!==null){var ee=I.child;F=F.firstContext;e:for(;F!==null;){var de=F;F=I;for(var Pe=0;Pe<m.length;Pe++)if(de.context===m[Pe]){F.lanes|=y,de=F.alternate,de!==null&&(de.lanes|=y),NR(F.return,y,f),C||(ee=null);break e}F=de.next}}else if(I.tag===18){if(ee=I.return,ee===null)throw Error(r(341));ee.lanes|=y,F=ee.alternate,F!==null&&(F.lanes|=y),NR(ee,y,f),ee=null}else ee=I.child;if(ee!==null)ee.return=I;else for(ee=I;ee!==null;){if(ee===f){ee=null;break}if(I=ee.sibling,I!==null){I.return=ee.return,ee=I;break}ee=ee.return}I=ee}}function Kx(f,m,y,C){f=null;for(var I=m,F=!1;I!==null;){if(!F){if((I.flags&524288)!==0)F=!0;else if((I.flags&262144)!==0)break}if(I.tag===10){var ee=I.alternate;if(ee===null)throw Error(r(387));if(ee=ee.memoizedProps,ee!==null){var de=I.type;wl(I.pendingProps.value,ee.value)||(f!==null?f.push(de):f=[de])}}else if(I===W.current){if(ee=I.alternate,ee===null)throw Error(r(387));ee.memoizedState.memoizedState!==I.memoizedState.memoizedState&&(f!==null?f.push(i_):f=[i_])}I=I.return}f!==null&&jR(m,f,y,C),m.flags|=262144}function RC(f){for(f=f.firstContext;f!==null;){if(!wl(f.context._currentValue,f.memoizedValue))return!0;f=f.next}return!1}function cg(f){lg=f,ff=null,f=f.dependencies,f!==null&&(f.firstContext=null)}function Pa(f){return $V(lg,f)}function IC(f,m){return lg===null&&cg(f),$V(f,m)}function $V(f,m){var y=m._currentValue;if(m={context:m,memoizedValue:y,next:null},ff===null){if(f===null)throw Error(r(308));ff=m,f.dependencies={lanes:0,firstContext:m},f.flags|=524288}else ff=ff.next=m;return y}var bCe=typeof AbortController<"u"?AbortController:function(){var f=[],m=this.signal={aborted:!1,addEventListener:function(y,C){f.push(C)}};this.abort=function(){m.aborted=!0,f.forEach(function(y){return y()})}},_Ce=e.unstable_scheduleCallback,wCe=e.unstable_NormalPriority,Us={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function RR(){return{controller:new bCe,data:new Map,refCount:0}}function Ib(f){f.refCount--,f.refCount===0&&_Ce(wCe,function(){f.controller.abort()})}var Ob=null,IR=0,Yx=0,Xx=null;function SCe(f,m){if(Ob===null){var y=Ob=[];IR=0,Yx=MI(),Xx={status:"pending",value:void 0,then:function(C){y.push(C)}}}return IR++,m.then(BV,BV),m}function BV(){if(--IR===0&&Ob!==null){Xx!==null&&(Xx.status="fulfilled");var f=Ob;Ob=null,Yx=0,Xx=null;for(var m=0;m<f.length;m++)(0,f[m])()}}function ECe(f,m){var y=[],C={status:"pending",value:null,reason:null,then:function(I){y.push(I)}};return f.then(function(){C.status="fulfilled",C.value=m;for(var I=0;I<y.length;I++)(0,y[I])(m)},function(I){for(C.status="rejected",C.reason=I,I=0;I<y.length;I++)(0,y[I])(void 0)}),C}var UV=K.S;K.S=function(f,m){Cq=be(),typeof m=="object"&&m!==null&&typeof m.then=="function"&&SCe(f,m),UV!==null&&UV(f,m)};var ug=O(null);function OR(){var f=ug.current;return f!==null?f:Si.pooledCache}function OC(f,m){m===null?M(ug,ug.current):M(ug,m.pool)}function VV(){var f=OR();return f===null?null:{parent:Us._currentValue,pool:f}}var Qx=Error(r(460)),PR=Error(r(474)),PC=Error(r(542)),MC={then:function(){}};function HV(f){return f=f.status,f==="fulfilled"||f==="rejected"}function qV(f,m,y){switch(y=f[y],y===void 0?f.push(m):y!==m&&(m.then(lf,lf),m=y),m.status){case"fulfilled":return m.value;case"rejected":throw f=m.reason,GV(f),f;default:if(typeof m.status=="string")m.then(lf,lf);else{if(f=Si,f!==null&&100<f.shellSuspendCounter)throw Error(r(482));f=m,f.status="pending",f.then(function(C){if(m.status==="pending"){var I=m;I.status="fulfilled",I.value=C}},function(C){if(m.status==="pending"){var I=m;I.status="rejected",I.reason=C}})}switch(m.status){case"fulfilled":return m.value;case"rejected":throw f=m.reason,GV(f),f}throw fg=m,Qx}}function dg(f){try{var m=f._init;return m(f._payload)}catch(y){throw y!==null&&typeof y=="object"&&typeof y.then=="function"?(fg=y,Qx):y}}var fg=null;function WV(){if(fg===null)throw Error(r(459));var f=fg;return fg=null,f}function GV(f){if(f===Qx||f===PC)throw Error(r(483))}var Zx=null,Pb=0;function DC(f){var m=Pb;return Pb+=1,Zx===null&&(Zx=[]),qV(Zx,f,m)}function Mb(f,m){m=m.props.ref,f.ref=m!==void 0?m:null}function FC(f,m){throw m.$$typeof===p?Error(r(525)):(f=Object.prototype.toString.call(m),Error(r(31,f==="[object Object]"?"object with keys {"+Object.keys(m).join(", ")+"}":f)))}function KV(f){function m(Ue,ze){if(f){var Ke=Ue.deletions;Ke===null?(Ue.deletions=[ze],Ue.flags|=16):Ke.push(ze)}}function y(Ue,ze){if(!f)return null;for(;ze!==null;)m(Ue,ze),ze=ze.sibling;return null}function C(Ue){for(var ze=new Map;Ue!==null;)Ue.key!==null?ze.set(Ue.key,Ue):ze.set(Ue.index,Ue),Ue=Ue.sibling;return ze}function I(Ue,ze){return Ue=uf(Ue,ze),Ue.index=0,Ue.sibling=null,Ue}function F(Ue,ze,Ke){return Ue.index=Ke,f?(Ke=Ue.alternate,Ke!==null?(Ke=Ke.index,Ke<ze?(Ue.flags|=67108866,ze):Ke):(Ue.flags|=67108866,ze)):(Ue.flags|=1048576,ze)}function ee(Ue){return f&&Ue.alternate===null&&(Ue.flags|=67108866),Ue}function de(Ue,ze,Ke,vt){return ze===null||ze.tag!==6?(ze=wR(Ke,Ue.mode,vt),ze.return=Ue,ze):(ze=I(ze,Ke),ze.return=Ue,ze)}function Pe(Ue,ze,Ke,vt){var An=Ke.type;return An===x?ht(Ue,ze,Ke.props.children,vt,Ke.key):ze!==null&&(ze.elementType===An||typeof An=="object"&&An!==null&&An.$$typeof===j&&dg(An)===ze.type)?(ze=I(ze,Ke.props),Mb(ze,Ke),ze.return=Ue,ze):(ze=NC(Ke.type,Ke.key,Ke.props,null,Ue.mode,vt),Mb(ze,Ke),ze.return=Ue,ze)}function Ye(Ue,ze,Ke,vt){return ze===null||ze.tag!==4||ze.stateNode.containerInfo!==Ke.containerInfo||ze.stateNode.implementation!==Ke.implementation?(ze=SR(Ke,Ue.mode,vt),ze.return=Ue,ze):(ze=I(ze,Ke.children||[]),ze.return=Ue,ze)}function ht(Ue,ze,Ke,vt,An){return ze===null||ze.tag!==7?(ze=ag(Ke,Ue.mode,vt,An),ze.return=Ue,ze):(ze=I(ze,Ke),ze.return=Ue,ze)}function bt(Ue,ze,Ke){if(typeof ze=="string"&&ze!==""||typeof ze=="number"||typeof ze=="bigint")return ze=wR(""+ze,Ue.mode,Ke),ze.return=Ue,ze;if(typeof ze=="object"&&ze!==null){switch(ze.$$typeof){case g:return Ke=NC(ze.type,ze.key,ze.props,null,Ue.mode,Ke),Mb(Ke,ze),Ke.return=Ue,Ke;case v:return ze=SR(ze,Ue.mode,Ke),ze.return=Ue,ze;case j:return ze=dg(ze),bt(Ue,ze,Ke)}if(Z(ze)||U(ze))return ze=ag(ze,Ue.mode,Ke,null),ze.return=Ue,ze;if(typeof ze.then=="function")return bt(Ue,DC(ze),Ke);if(ze.$$typeof===E)return bt(Ue,IC(Ue,ze),Ke);FC(Ue,ze)}return null}function Je(Ue,ze,Ke,vt){var An=ze!==null?ze.key:null;if(typeof Ke=="string"&&Ke!==""||typeof Ke=="number"||typeof Ke=="bigint")return An!==null?null:de(Ue,ze,""+Ke,vt);if(typeof Ke=="object"&&Ke!==null){switch(Ke.$$typeof){case g:return Ke.key===An?Pe(Ue,ze,Ke,vt):null;case v:return Ke.key===An?Ye(Ue,ze,Ke,vt):null;case j:return Ke=dg(Ke),Je(Ue,ze,Ke,vt)}if(Z(Ke)||U(Ke))return An!==null?null:ht(Ue,ze,Ke,vt,null);if(typeof Ke.then=="function")return Je(Ue,ze,DC(Ke),vt);if(Ke.$$typeof===E)return Je(Ue,ze,IC(Ue,Ke),vt);FC(Ue,Ke)}return null}function nt(Ue,ze,Ke,vt,An){if(typeof vt=="string"&&vt!==""||typeof vt=="number"||typeof vt=="bigint")return Ue=Ue.get(Ke)||null,de(ze,Ue,""+vt,An);if(typeof vt=="object"&&vt!==null){switch(vt.$$typeof){case g:return Ue=Ue.get(vt.key===null?Ke:vt.key)||null,Pe(ze,Ue,vt,An);case v:return Ue=Ue.get(vt.key===null?Ke:vt.key)||null,Ye(ze,Ue,vt,An);case j:return vt=dg(vt),nt(Ue,ze,Ke,vt,An)}if(Z(vt)||U(vt))return Ue=Ue.get(Ke)||null,ht(ze,Ue,vt,An,null);if(typeof vt.then=="function")return nt(Ue,ze,Ke,DC(vt),An);if(vt.$$typeof===E)return nt(Ue,ze,Ke,IC(ze,vt),An);FC(ze,vt)}return null}function un(Ue,ze,Ke,vt){for(var An=null,Dr=null,wn=ze,Xn=ze=0,wr=null;wn!==null&&Xn<Ke.length;Xn++){wn.index>Xn?(wr=wn,wn=null):wr=wn.sibling;var Fr=Je(Ue,wn,Ke[Xn],vt);if(Fr===null){wn===null&&(wn=wr);break}f&&wn&&Fr.alternate===null&&m(Ue,wn),ze=F(Fr,ze,Xn),Dr===null?An=Fr:Dr.sibling=Fr,Dr=Fr,wn=wr}if(Xn===Ke.length)return y(Ue,wn),Tr&&df(Ue,Xn),An;if(wn===null){for(;Xn<Ke.length;Xn++)wn=bt(Ue,Ke[Xn],vt),wn!==null&&(ze=F(wn,ze,Xn),Dr===null?An=wn:Dr.sibling=wn,Dr=wn);return Tr&&df(Ue,Xn),An}for(wn=C(wn);Xn<Ke.length;Xn++)wr=nt(wn,Ue,Xn,Ke[Xn],vt),wr!==null&&(f&&wr.alternate!==null&&wn.delete(wr.key===null?Xn:wr.key),ze=F(wr,ze,Xn),Dr===null?An=wr:Dr.sibling=wr,Dr=wr);return f&&wn.forEach(function(bp){return m(Ue,bp)}),Tr&&df(Ue,Xn),An}function On(Ue,ze,Ke,vt){if(Ke==null)throw Error(r(151));for(var An=null,Dr=null,wn=ze,Xn=ze=0,wr=null,Fr=Ke.next();wn!==null&&!Fr.done;Xn++,Fr=Ke.next()){wn.index>Xn?(wr=wn,wn=null):wr=wn.sibling;var bp=Je(Ue,wn,Fr.value,vt);if(bp===null){wn===null&&(wn=wr);break}f&&wn&&bp.alternate===null&&m(Ue,wn),ze=F(bp,ze,Xn),Dr===null?An=bp:Dr.sibling=bp,Dr=bp,wn=wr}if(Fr.done)return y(Ue,wn),Tr&&df(Ue,Xn),An;if(wn===null){for(;!Fr.done;Xn++,Fr=Ke.next())Fr=bt(Ue,Fr.value,vt),Fr!==null&&(ze=F(Fr,ze,Xn),Dr===null?An=Fr:Dr.sibling=Fr,Dr=Fr);return Tr&&df(Ue,Xn),An}for(wn=C(wn);!Fr.done;Xn++,Fr=Ke.next())Fr=nt(wn,Ue,Xn,Fr.value,vt),Fr!==null&&(f&&Fr.alternate!==null&&wn.delete(Fr.key===null?Xn:Fr.key),ze=F(Fr,ze,Xn),Dr===null?An=Fr:Dr.sibling=Fr,Dr=Fr);return f&&wn.forEach(function(MTe){return m(Ue,MTe)}),Tr&&df(Ue,Xn),An}function xi(Ue,ze,Ke,vt){if(typeof Ke=="object"&&Ke!==null&&Ke.type===x&&Ke.key===null&&(Ke=Ke.props.children),typeof Ke=="object"&&Ke!==null){switch(Ke.$$typeof){case g:e:{for(var An=Ke.key;ze!==null;){if(ze.key===An){if(An=Ke.type,An===x){if(ze.tag===7){y(Ue,ze.sibling),vt=I(ze,Ke.props.children),vt.return=Ue,Ue=vt;break e}}else if(ze.elementType===An||typeof An=="object"&&An!==null&&An.$$typeof===j&&dg(An)===ze.type){y(Ue,ze.sibling),vt=I(ze,Ke.props),Mb(vt,Ke),vt.return=Ue,Ue=vt;break e}y(Ue,ze);break}else m(Ue,ze);ze=ze.sibling}Ke.type===x?(vt=ag(Ke.props.children,Ue.mode,vt,Ke.key),vt.return=Ue,Ue=vt):(vt=NC(Ke.type,Ke.key,Ke.props,null,Ue.mode,vt),Mb(vt,Ke),vt.return=Ue,Ue=vt)}return ee(Ue);case v:e:{for(An=Ke.key;ze!==null;){if(ze.key===An)if(ze.tag===4&&ze.stateNode.containerInfo===Ke.containerInfo&&ze.stateNode.implementation===Ke.implementation){y(Ue,ze.sibling),vt=I(ze,Ke.children||[]),vt.return=Ue,Ue=vt;break e}else{y(Ue,ze);break}else m(Ue,ze);ze=ze.sibling}vt=SR(Ke,Ue.mode,vt),vt.return=Ue,Ue=vt}return ee(Ue);case j:return Ke=dg(Ke),xi(Ue,ze,Ke,vt)}if(Z(Ke))return un(Ue,ze,Ke,vt);if(U(Ke)){if(An=U(Ke),typeof An!="function")throw Error(r(150));return Ke=An.call(Ke),On(Ue,ze,Ke,vt)}if(typeof Ke.then=="function")return xi(Ue,ze,DC(Ke),vt);if(Ke.$$typeof===E)return xi(Ue,ze,IC(Ue,Ke),vt);FC(Ue,Ke)}return typeof Ke=="string"&&Ke!==""||typeof Ke=="number"||typeof Ke=="bigint"?(Ke=""+Ke,ze!==null&&ze.tag===6?(y(Ue,ze.sibling),vt=I(ze,Ke),vt.return=Ue,Ue=vt):(y(Ue,ze),vt=wR(Ke,Ue.mode,vt),vt.return=Ue,Ue=vt),ee(Ue)):y(Ue,ze)}return function(Ue,ze,Ke,vt){try{Pb=0;var An=xi(Ue,ze,Ke,vt);return Zx=null,An}catch(wn){if(wn===Qx||wn===PC)throw wn;var Dr=Sl(29,wn,null,Ue.mode);return Dr.lanes=vt,Dr.return=Ue,Dr}finally{}}}var hg=KV(!0),YV=KV(!1),rp=!1;function MR(f){f.updateQueue={baseState:f.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function DR(f,m){f=f.updateQueue,m.updateQueue===f&&(m.updateQueue={baseState:f.baseState,firstBaseUpdate:f.firstBaseUpdate,lastBaseUpdate:f.lastBaseUpdate,shared:f.shared,callbacks:null})}function ip(f){return{lane:f,tag:0,payload:null,callback:null,next:null}}function sp(f,m,y){var C=f.updateQueue;if(C===null)return null;if(C=C.shared,(Vr&2)!==0){var I=C.pending;return I===null?m.next=m:(m.next=I.next,I.next=m),C.pending=m,m=kC(f),IV(f,null,y),m}return AC(f,C,m,y),kC(f)}function Db(f,m,y){if(m=m.updateQueue,m!==null&&(m=m.shared,(y&4194048)!==0)){var C=m.lanes;C&=f.pendingLanes,y|=C,m.lanes=y,br(f,y)}}function FR(f,m){var y=f.updateQueue,C=f.alternate;if(C!==null&&(C=C.updateQueue,y===C)){var I=null,F=null;if(y=y.firstBaseUpdate,y!==null){do{var ee={lane:y.lane,tag:y.tag,payload:y.payload,callback:null,next:null};F===null?I=F=ee:F=F.next=ee,y=y.next}while(y!==null);F===null?I=F=m:F=F.next=m}else I=F=m;y={baseState:C.baseState,firstBaseUpdate:I,lastBaseUpdate:F,shared:C.shared,callbacks:C.callbacks},f.updateQueue=y;return}f=y.lastBaseUpdate,f===null?y.firstBaseUpdate=m:f.next=m,y.lastBaseUpdate=m}var LR=!1;function Fb(){if(LR){var f=Xx;if(f!==null)throw f}}
vendor: 6,570 bytes, line 59
59function Lb(f,m,y,C){LR=!1;var I=f.updateQueue;rp=!1;var F=I.firstBaseUpdate,ee=I.lastBaseUpdate,de=I.shared.pending;if(de!==null){I.shared.pending=null;var Pe=de,Ye=Pe.next;Pe.next=null,ee===null?F=Ye:ee.next=Ye,ee=Pe;var ht=f.alternate;ht!==null&&(ht=ht.updateQueue,de=ht.lastBaseUpdate,de!==ee&&(de===null?ht.firstBaseUpdate=Ye:de.next=Ye,ht.lastBaseUpdate=Pe))}if(F!==null){var bt=I.baseState;ee=0,ht=Ye=Pe=null,de=F;do{var Je=de.lane&-536870913,nt=Je!==de.lane;if(nt?(_r&Je)===Je:(C&Je)===Je){Je!==0&&Je===Yx&&(LR=!0),ht!==null&&(ht=ht.next={lane:0,tag:de.tag,payload:de.payload,callback:null,next:null});e:{var un=f,On=de;Je=m;var xi=y;switch(On.tag){case 1:if(un=On.payload,typeof un=="function"){bt=un.call(xi,bt,Je);break e}bt=un;break e;case 3:un.flags=un.flags&-65537|128;case 0:if(un=On.payload,Je=typeof un=="function"?un.call(xi,bt,Je):un,Je==null)break e;bt=h({},bt,Je);break e;case 2:rp=!0}}Je=de.callback,Je!==null&&(f.flags|=64,nt&&(f.flags|=8192),nt=I.callbacks,nt===null?I.callbacks=[Je]:nt.push(Je))}else nt={lane:Je,tag:de.tag,payload:de.payload,callback:de.callback,next:null},ht===null?(Ye=ht=nt,Pe=bt):ht=ht.next=nt,ee|=Je;if(de=de.next,de===null){if(de=I.shared.pending,de===null)break;nt=de,de=nt.next,nt.next=null,I.lastBaseUpdate=nt,I.shared.pending=null}}while(!0);ht===null&&(Pe=bt),I.baseState=Pe,I.firstBaseUpdate=Ye,I.lastBaseUpdate=ht,F===null&&(I.shared.lanes=0),up|=ee,f.lanes=ee,f.memoizedState=bt}}function XV(f,m){if(typeof f!="function")throw Error(r(191,f));f.call(m)}function QV(f,m){var y=f.callbacks;if(y!==null)for(f.callbacks=null,f=0;f<y.length;f++)XV(y[f],m)}var Jx=O(null),LC=O(0);function ZV(f,m){f=wf,M(LC,f),M(Jx,m),wf=f|m.baseLanes}function zR(){M(LC,wf),M(Jx,Jx.current)}function $R(){wf=LC.current,L(Jx),L(LC)}var El=O(null),oc=null;function ap(f){var m=f.alternate;M(js,js.current&1),M(El,f),oc===null&&(m===null||Jx.current!==null||m.memoizedState!==null)&&(oc=f)}function BR(f){M(js,js.current),M(El,f),oc===null&&(oc=f)}function JV(f){f.tag===22?(M(js,js.current),M(El,f),oc===null&&(oc=f)):op()}function op(){M(js,js.current),M(El,El.current)}function Cl(f){L(El),oc===f&&(oc=null),L(js)}var js=O(0);function zC(f){for(var m=f;m!==null;){if(m.tag===13){var y=m.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||GI(y)||KI(y)))return m}else if(m.tag===19&&(m.memoizedProps.revealOrder==="forwards"||m.memoizedProps.revealOrder==="backwards"||m.memoizedProps.revealOrder==="unstable_legacy-backwards"||m.memoizedProps.revealOrder==="together")){if((m.flags&128)!==0)return m}else if(m.child!==null){m.child.return=m,m=m.child;continue}if(m===f)break;for(;m.sibling===null;){if(m.return===null||m.return===f)return null;m=m.return}m.sibling.return=m.return,m=m.sibling}return null}var pf=0,Gn=null,mi=null,Vs=null,$C=!1,ev=!1,pg=!1,BC=0,zb=0,tv=null,CCe=0;function xs(){throw Error(r(321))}function UR(f,m){if(m===null)return!1;for(var y=0;y<m.length&&y<f.length;y++)if(!wl(f[y],m[y]))return!1;return!0}function VR(f,m,y,C,I,F){return pf=F,Gn=m,m.memoizedState=null,m.updateQueue=null,m.lanes=0,K.H=f===null||f.memoizedState===null?DH:iI,pg=!1,F=y(C,I),pg=!1,ev&&(F=tH(m,y,C,I)),eH(f),F}function eH(f){K.H=Ub;var m=mi!==null&&mi.next!==null;if(pf=0,Vs=mi=Gn=null,$C=!1,zb=0,tv=null,m)throw Error(r(300));f===null||Hs||(f=f.dependencies,f!==null&&RC(f)&&(Hs=!0))}function tH(f,m,y,C){Gn=f;var I=0;do{if(ev&&(tv=null),zb=0,ev=!1,25<=I)throw Error(r(301));if(I+=1,Vs=mi=null,f.updateQueue!=null){var F=f.updateQueue;F.lastEffect=null,F.events=null,F.stores=null,F.memoCache!=null&&(F.memoCache.index=0)}K.H=FH,F=m(y,C)}while(ev);return F}function TCe(){var f=K.H,m=f.useState()[0];return m=typeof m.then=="function"?$b(m):m,f=f.useState()[0],(mi!==null?mi.memoizedState:null)!==f&&(Gn.flags|=1024),m}function HR(){var f=BC!==0;return BC=0,f}function qR(f,m,y){m.updateQueue=f.updateQueue,m.flags&=-2053,f.lanes&=~y}function WR(f){if($C){for(f=f.memoizedState;f!==null;){var m=f.queue;m!==null&&(m.pending=null),f=f.next}$C=!1}pf=0,Vs=mi=Gn=null,ev=!1,zb=BC=0,tv=null}function Co(){var f={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Vs===null?Gn.memoizedState=Vs=f:Vs=Vs.next=f,Vs}function Rs(){if(mi===null){var f=Gn.alternate;f=f!==null?f.memoizedState:null}else f=mi.next;var m=Vs===null?Gn.memoizedState:Vs.next;if(m!==null)Vs=m,mi=f;else{if(f===null)throw Gn.alternate===null?Error(r(467)):Error(r(310));mi=f,f={memoizedState:mi.memoizedState,baseState:mi.baseState,baseQueue:mi.baseQueue,queue:mi.queue,next:null},Vs===null?Gn.memoizedState=Vs=f:Vs=Vs.next=f}return Vs}function UC(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function $b(f){var m=zb;return zb+=1,tv===null&&(tv=[]),f=qV(tv,f,m),m=Gn,(Vs===null?m.memoizedState:Vs.next)===null&&(m=m.alternate,K.H=m===null||m.memoizedState===null?DH:iI),f}function VC(f){if(f!==null&&typeof f=="object"){if(typeof f.then=="function")return $b(f);if(f.$$typeof===E)return Pa(f)}throw Error(r(438,String(f)))}function GR(f){var m=null,y=Gn.updateQueue;if(y!==null&&(m=y.memoCache),m==null){var C=Gn.alternate;C!==null&&(C=C.updateQueue,C!==null&&(C=C.memoCache,C!=null&&(m={data:C.data.map(function(I){return I.slice()}),index:0})))}if(m==null&&(m={data:[],index:0}),y===null&&(y=UC(),Gn.updateQueue=y),y.memoCache=m,y=m.data[m.index],y===void 0)for(y=m.data[m.index]=Array(f),C=0;C<f;C++)y[C]=P;return m.index++,y}function mf(f,m){return typeof m=="function"?m(f):m}function HC(f){var m=Rs();return KR(m,mi,f)}function KR(f,m,y){var C=f.queue;if(C===null)throw Error(r(311));C.lastRenderedReducer=y;var I=f.baseQueue,F=C.pending;if(F!==null){if(I!==null){var ee=I.next;I.next=F.next,F.next=ee}m.baseQueue=I=F,C.pending=null}if(F=f.baseState,I===null)f.memoizedState=F;else{m=I.next;var de=ee=null,Pe=null,Ye=m,ht=!1;do{var bt=Ye.lane&-536870913;if(bt!==Ye.lane?(_r&bt)===bt:(pf&bt)===bt){var Je=Ye.revertLane;if(Je===0)Pe!==null&&(Pe=Pe.next={lane:0,revertLane:0,gesture:null,action:Ye.action,hasEagerState:Ye.hasEagerState,eagerState:Ye.eagerState,next:null}),bt===Yx&&(ht=!0);else if((pf&Je)===Je){Ye=Ye.next,Je===Yx&&(ht=!0);continue}else bt={lane:0,revertLane:Ye.revertLane,gesture:null,action:Ye.action,hasEagerState:Ye.hasEagerState,eagerState:Ye.eagerState,next:null},Pe===null?(de=Pe=bt,ee=F):Pe=Pe.next=bt,Gn.lanes|=Je,up|=Je;bt=Ye.action,pg&&y(F,bt),F=Ye.hasEagerState?Ye.eagerState:y(F,bt)}else Je={lane:bt,revertLane:Ye.revertLane,gesture:Ye.gesture,action:Ye.action,hasEagerState:Ye.hasEagerState,eagerState:Ye.eagerState,next:null},Pe===null?(de=Pe=Je,ee=F):Pe=Pe.next=Je,Gn.lanes|=bt,up|=bt;
vendor: 15,506 bytes, line 59
59Ye=Ye.next}while(Ye!==null&&Ye!==m);if(Pe===null?ee=F:Pe.next=de,!wl(F,f.memoizedState)&&(Hs=!0,ht&&(y=Xx,y!==null)))throw y;f.memoizedState=F,f.baseState=ee,f.baseQueue=Pe,C.lastRenderedState=F}return I===null&&(C.lanes=0),[f.memoizedState,C.dispatch]}function YR(f){var m=Rs(),y=m.queue;if(y===null)throw Error(r(311));y.lastRenderedReducer=f;var C=y.dispatch,I=y.pending,F=m.memoizedState;if(I!==null){y.pending=null;var ee=I=I.next;do F=f(F,ee.action),ee=ee.next;while(ee!==I);wl(F,m.memoizedState)||(Hs=!0),m.memoizedState=F,m.baseQueue===null&&(m.baseState=F),y.lastRenderedState=F}return[F,C]}function nH(f,m,y){var C=Gn,I=Rs(),F=Tr;if(F){if(y===void 0)throw Error(r(407));y=y()}else y=m();var ee=!wl((mi||I).memoizedState,y);if(ee&&(I.memoizedState=y,Hs=!0),I=I.queue,ZR(sH.bind(null,C,I,f),[f]),I.getSnapshot!==m||ee||Vs!==null&&Vs.memoizedState.tag&1){if(C.flags|=2048,nv(9,{destroy:void 0},iH.bind(null,C,I,y,m),null),Si===null)throw Error(r(349));F||(pf&127)!==0||rH(C,m,y)}return y}function rH(f,m,y){f.flags|=16384,f={getSnapshot:m,value:y},m=Gn.updateQueue,m===null?(m=UC(),Gn.updateQueue=m,m.stores=[f]):(y=m.stores,y===null?m.stores=[f]:y.push(f))}function iH(f,m,y,C){m.value=y,m.getSnapshot=C,aH(m)&&oH(f)}function sH(f,m,y){return y(function(){aH(m)&&oH(f)})}function aH(f){var m=f.getSnapshot;f=f.value;try{var y=m();return!wl(f,y)}catch{return!0}}function oH(f){var m=sg(f,2);m!==null&&Zo(m,f,2)}function XR(f){var m=Co();if(typeof f=="function"){var y=f;if(f=y(),pg){Tn(!0);try{y()}finally{Tn(!1)}}}return m.memoizedState=m.baseState=f,m.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:mf,lastRenderedState:f},m}function lH(f,m,y,C){return f.baseState=y,KR(f,mi,typeof C=="function"?C:mf)}function ACe(f,m,y,C,I){if(GC(f))throw Error(r(485));if(f=m.action,f!==null){var F={payload:I,action:f,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(ee){F.listeners.push(ee)}};K.T!==null?y(!0):F.isTransition=!1,C(F),y=m.pending,y===null?(F.next=m.pending=F,cH(m,F)):(F.next=y.next,m.pending=y.next=F)}}function cH(f,m){var y=m.action,C=m.payload,I=f.state;if(m.isTransition){var F=K.T,ee={};K.T=ee;try{var de=y(I,C),Pe=K.S;Pe!==null&&Pe(ee,de),uH(f,m,de)}catch(Ye){QR(f,m,Ye)}finally{F!==null&&ee.types!==null&&(F.types=ee.types),K.T=F}}else try{F=y(I,C),uH(f,m,F)}catch(Ye){QR(f,m,Ye)}}function uH(f,m,y){y!==null&&typeof y=="object"&&typeof y.then=="function"?y.then(function(C){dH(f,m,C)},function(C){return QR(f,m,C)}):dH(f,m,y)}function dH(f,m,y){m.status="fulfilled",m.value=y,fH(m),f.state=y,m=f.pending,m!==null&&(y=m.next,y===m?f.pending=null:(y=y.next,m.next=y,cH(f,y)))}function QR(f,m,y){var C=f.pending;if(f.pending=null,C!==null){C=C.next;do m.status="rejected",m.reason=y,fH(m),m=m.next;while(m!==C)}f.action=null}function fH(f){f=f.listeners;for(var m=0;m<f.length;m++)(0,f[m])()}function hH(f,m){return m}function pH(f,m){if(Tr){var y=Si.formState;if(y!==null){e:{var C=Gn;if(Tr){if($i){t:{for(var I=$i,F=ac;I.nodeType!==8;){if(!F){I=null;break t}if(I=lc(I.nextSibling),I===null){I=null;break t}}F=I.data,I=F==="F!"||F==="F"?I:null}if(I){$i=lc(I.nextSibling),C=I.data==="F!";break e}}tp(C)}C=!1}C&&(m=y[0])}}return y=Co(),y.memoizedState=y.baseState=m,C={pending:null,lanes:0,dispatch:null,lastRenderedReducer:hH,lastRenderedState:m},y.queue=C,y=OH.bind(null,Gn,C),C.dispatch=y,C=XR(!1),F=rI.bind(null,Gn,!1,C.queue),C=Co(),I={state:m,dispatch:null,action:f,pending:null},C.queue=I,y=ACe.bind(null,Gn,I,F,y),I.dispatch=y,C.memoizedState=f,[m,y,!1]}function mH(f){var m=Rs();return gH(m,mi,f)}function gH(f,m,y){if(m=KR(f,m,hH)[0],f=HC(mf)[0],typeof m=="object"&&m!==null&&typeof m.then=="function")try{var C=$b(m)}catch(ee){throw ee===Qx?PC:ee}else C=m;m=Rs();var I=m.queue,F=I.dispatch;return y!==m.memoizedState&&(Gn.flags|=2048,nv(9,{destroy:void 0},kCe.bind(null,I,y),null)),[C,F,f]}function kCe(f,m){f.action=m}function xH(f){var m=Rs(),y=mi;if(y!==null)return gH(m,y,f);Rs(),m=m.memoizedState,y=Rs();var C=y.queue.dispatch;return y.memoizedState=f,[m,C,!1]}function nv(f,m,y,C){return f={tag:f,create:y,deps:C,inst:m,next:null},m=Gn.updateQueue,m===null&&(m=UC(),Gn.updateQueue=m),y=m.lastEffect,y===null?m.lastEffect=f.next=f:(C=y.next,y.next=f,f.next=C,m.lastEffect=f),f}function vH(){return Rs().memoizedState}function qC(f,m,y,C){var I=Co();Gn.flags|=f,I.memoizedState=nv(1|m,{destroy:void 0},y,C===void 0?null:C)}function WC(f,m,y,C){var I=Rs();C=C===void 0?null:C;var F=I.memoizedState.inst;mi!==null&&C!==null&&UR(C,mi.memoizedState.deps)?I.memoizedState=nv(m,F,y,C):(Gn.flags|=f,I.memoizedState=nv(1|m,F,y,C))}function yH(f,m){qC(8390656,8,f,m)}function ZR(f,m){WC(2048,8,f,m)}function NCe(f){Gn.flags|=4;var m=Gn.updateQueue;if(m===null)m=UC(),Gn.updateQueue=m,m.events=[f];else{var y=m.events;y===null?m.events=[f]:y.push(f)}}function bH(f){var m=Rs().memoizedState;return NCe({ref:m,nextImpl:f}),function(){if((Vr&2)!==0)throw Error(r(440));return m.impl.apply(void 0,arguments)}}function _H(f,m){return WC(4,2,f,m)}function wH(f,m){return WC(4,4,f,m)}function SH(f,m){if(typeof m=="function"){f=f();var y=m(f);return function(){typeof y=="function"?y():m(null)}}if(m!=null)return f=f(),m.current=f,function(){m.current=null}}function EH(f,m,y){y=y!=null?y.concat([f]):null,WC(4,4,SH.bind(null,m,f),y)}function JR(){}function CH(f,m){var y=Rs();m=m===void 0?null:m;var C=y.memoizedState;return m!==null&&UR(m,C[1])?C[0]:(y.memoizedState=[f,m],f)}function TH(f,m){var y=Rs();m=m===void 0?null:m;var C=y.memoizedState;if(m!==null&&UR(m,C[1]))return C[0];if(C=f(),pg){Tn(!0);try{f()}finally{Tn(!1)}}return y.memoizedState=[C,m],C}function eI(f,m,y){return y===void 0||(pf&1073741824)!==0&&(_r&261930)===0?f.memoizedState=m:(f.memoizedState=y,f=Aq(),Gn.lanes|=f,up|=f,y)}function AH(f,m,y,C){return wl(y,m)?y:Jx.current!==null?(f=eI(f,y,C),wl(f,m)||(Hs=!0),f):(pf&42)===0||(pf&1073741824)!==0&&(_r&261930)===0?(Hs=!0,f.memoizedState=y):(f=Aq(),Gn.lanes|=f,up|=f,m)}function kH(f,m,y,C,I){var F=te.p;te.p=F!==0&&8>F?F:8;var ee=K.T,de={};K.T=de,rI(f,!1,m,y);try{var Pe=I(),Ye=K.S;if(Ye!==null&&Ye(de,Pe),Pe!==null&&typeof Pe=="object"&&typeof Pe.then=="function"){var ht=ECe(Pe,C);Bb(f,m,ht,kl(f))}else Bb(f,m,C,kl(f))}catch(bt){Bb(f,m,{then:function(){},status:"rejected",reason:bt},kl())}finally{te.p=F,ee!==null&&de.types!==null&&(ee.types=de.types),K.T=ee}}function jCe(){}function tI(f,m,y,C){if(f.tag!==5)throw Error(r(476));var I=NH(f).queue;kH(f,I,m,ne,y===null?jCe:function(){return jH(f),y(C)})}function NH(f){var m=f.memoizedState;if(m!==null)return m;m={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:mf,lastRenderedState:ne},next:null};var y={};return m.next={memoizedState:y,baseState:y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:mf,lastRenderedState:y},next:null},f.memoizedState=m,f=f.alternate,f!==null&&(f.memoizedState=m),m}function jH(f){var m=NH(f);m.next===null&&(m=f.alternate.memoizedState),Bb(f,m.next.queue,{},kl())}function nI(){return Pa(i_)}function RH(){return Rs().memoizedState}function IH(){return Rs().memoizedState}function RCe(f){for(var m=f.return;m!==null;){switch(m.tag){case 24:case 3:var y=kl();f=ip(y);var C=sp(m,f,y);C!==null&&(Zo(C,m,y),Db(C,m,y)),m={cache:RR()},f.payload=m;return}m=m.return}}function ICe(f,m,y){var C=kl();y={lane:C,revertLane:0,gesture:null,action:y,hasEagerState:!1,eagerState:null,next:null},GC(f)?PH(m,y):(y=bR(f,m,y,C),y!==null&&(Zo(y,f,C),MH(y,m,C)))}function OH(f,m,y){var C=kl();Bb(f,m,y,C)}function Bb(f,m,y,C){var I={lane:C,revertLane:0,gesture:null,action:y,hasEagerState:!1,eagerState:null,next:null};if(GC(f))PH(m,I);else{var F=f.alternate;if(f.lanes===0&&(F===null||F.lanes===0)&&(F=m.lastRenderedReducer,F!==null))try{var ee=m.lastRenderedState,de=F(ee,y);if(I.hasEagerState=!0,I.eagerState=de,wl(de,ee))return AC(f,m,I,0),Si===null&&TC(),!1}catch{}finally{}if(y=bR(f,m,I,C),y!==null)return Zo(y,f,C),MH(y,m,C),!0}return!1}function rI(f,m,y,C){if(C={lane:2,revertLane:MI(),gesture:null,action:C,hasEagerState:!1,eagerState:null,next:null},GC(f)){if(m)throw Error(r(479))}else m=bR(f,y,C,2),m!==null&&Zo(m,f,2)}function GC(f){var m=f.alternate;return f===Gn||m!==null&&m===Gn}function PH(f,m){ev=$C=!0;var y=f.pending;y===null?m.next=m:(m.next=y.next,y.next=m),f.pending=m}function MH(f,m,y){if((y&4194048)!==0){var C=m.lanes;C&=f.pendingLanes,y|=C,m.lanes=y,br(f,y)}}var Ub={readContext:Pa,use:VC,useCallback:xs,useContext:xs,useEffect:xs,useImperativeHandle:xs,useLayoutEffect:xs,useInsertionEffect:xs,useMemo:xs,useReducer:xs,useRef:xs,useState:xs,useDebugValue:xs,useDeferredValue:xs,useTransition:xs,useSyncExternalStore:xs,useId:xs,useHostTransitionStatus:xs,useFormState:xs,useActionState:xs,useOptimistic:xs,useMemoCache:xs,useCacheRefresh:xs};Ub.useEffectEvent=xs;var DH={readContext:Pa,use:VC,useCallback:function(f,m){return Co().memoizedState=[f,m===void 0?null:m],f},useContext:Pa,useEffect:yH,useImperativeHandle:function(f,m,y){y=y!=null?y.concat([f]):null,qC(4194308,4,SH.bind(null,m,f),y)},useLayoutEffect:function(f,m){return qC(4194308,4,f,m)},useInsertionEffect:function(f,m){qC(4,2,f,m)},useMemo:function(f,m){var y=Co();m=m===void 0?null:m;var C=f();if(pg){Tn(!0);try{f()}finally{Tn(!1)}}return y.memoizedState=[C,m],C},useReducer:function(f,m,y){var C=Co();if(y!==void 0){var I=y(m);if(pg){Tn(!0);try{y(m)}finally{Tn(!1)}}}else I=m;return C.memoizedState=C.baseState=I,f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:f,lastRenderedState:I},C.queue=f,f=f.dispatch=ICe.bind(null,Gn,f),[C.memoizedState,f]},useRef:function(f){var m=Co();return f={current:f},m.memoizedState=f},useState:function(f){f=XR(f);var m=f.queue,y=OH.bind(null,Gn,m);return m.dispatch=y,[f.memoizedState,y]},useDebugValue:JR,useDeferredValue:function(f,m){var y=Co();return eI(y,f,m)},useTransition:function(){var f=XR(!1);return f=kH.bind(null,Gn,f.queue,!0,!1),Co().memoizedState=f,[!1,f]},useSyncExternalStore:function(f,m,y){var C=Gn,I=Co();if(Tr){if(y===void 0)throw Error(r(407));y=y()}else{if(y=m(),Si===null)throw Error(r(349));(_r&127)!==0||rH(C,m,y)}I.memoizedState=y;var F={value:y,getSnapshot:m};return I.queue=F,yH(sH.bind(null,C,F,f),[f]),C.flags|=2048,nv(9,{destroy:void 0},iH.bind(null,C,F,y,m),null),y},useId:function(){var f=Co(),m=Si.identifierPrefix;if(Tr){var y=rd,C=nd;y=(C&~(1<<32-Ie(C)-1)).toString(32)+y,m="_"+m+"R_"+y,y=BC++,0<y&&(m+="H"+y.toString(32)),m+="_"}else y=CCe++,m="_"+m+"r_"+y.toString(32)+"_";return f.memoizedState=m},useHostTransitionStatus:nI,useFormState:pH,useActionState:pH,useOptimistic:function(f){var m=Co();m.memoizedState=m.baseState=f;var y={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return m.queue=y,m=rI.bind(null,Gn,!0,y),y.dispatch=m,[f,m]},useMemoCache:GR,useCacheRefresh:function(){return Co().memoizedState=RCe.bind(null,Gn)},useEffectEvent:function(f){var m=Co(),y={impl:f};return m.memoizedState=y,function(){if((Vr&2)!==0)throw Error(r(440));return y.impl.apply(void 0,arguments)}}},iI={readContext:Pa,use:VC,useCallback:CH,useContext:Pa,useEffect:ZR,useImperativeHandle:EH,useInsertionEffect:_H,useLayoutEffect:wH,useMemo:TH,useReducer:HC,useRef:vH,useState:function(){return HC(mf)},useDebugValue:JR,useDeferredValue:function(f,m){var y=Rs();return AH(y,mi.memoizedState,f,m)},useTransition:function(){var f=HC(mf)[0],m=Rs().memoizedState;return[typeof f=="boolean"?f:$b(f),m]},useSyncExternalStore:nH,useId:RH,useHostTransitionStatus:nI,useFormState:mH,useActionState:mH,useOptimistic:function(f,m){var y=Rs();return lH(y,mi,f,m)},useMemoCache:GR,useCacheRefresh:IH};iI.useEffectEvent=bH;var FH={readContext:Pa,use:VC,useCallback:CH,useContext:Pa,useEffect:ZR,useImperativeHandle:EH,useInsertionEffect:_H,useLayoutEffect:wH,useMemo:TH,useReducer:YR,useRef:vH,useState:function(){return YR(mf)},useDebugValue:JR,useDeferredValue:function(f,m){var y=Rs();return mi===null?eI(y,f,m):AH(y,mi.memoizedState,f,m)},useTransition:function(){var f=YR(mf)[0],m=Rs().memoizedState;return[typeof f=="boolean"?f:$b(f),m]},useSyncExternalStore:nH,useId:RH,useHostTransitionStatus:nI,useFormState:xH,useActionState:xH,useOptimistic:function(f,m){var y=Rs();return mi!==null?lH(y,mi,f,m):(y.baseState=f,[f,y.queue.dispatch])},useMemoCache:GR,useCacheRefresh:IH};FH.useEffectEvent=bH;function sI(f,m,y,C){m=f.memoizedState,y=y(C,m),y=y==null?m:h({},m,y),f.memoizedState=y,f.lanes===0&&(f.updateQueue.baseState=y)}var aI={enqueueSetState:function(f,m,y){f=f._reactInternals;var C=kl(),I=ip(C);I.payload=m,y!=null&&(I.callback=y),m=sp(f,I,C),m!==null&&(Zo(m,f,C),Db(m,f,C))},enqueueReplaceState:function(f,m,y){f=f._reactInternals;var C=kl(),I=ip(C);I.tag=1,I.payload=m,y!=null&&(I.callback=y),m=sp(f,I,C),m!==null&&(Zo(m,f,C),Db(m,f,C))},enqueueForceUpdate:function(f,m){f=f._reactInternals;var y=kl(),C=ip(y);C.tag=2,m!=null&&(C.callback=m),m=sp(f,C,y),m!==null&&(Zo(m,f,y),Db(m,f,y))}};function LH(f,m,y,C,I,F,ee){return f=f.stateNode,typeof f.shouldComponentUpdate=="function"?f.shouldComponentUpdate(C,F,ee):m.prototype&&m.prototype.isPureReactComponent?!kb(y,C)||!kb(I,F):!0}function zH(f,m,y,C){f=m.state,typeof m.componentWillReceiveProps=="function"&&m.componentWillReceiveProps(y,C),typeof m.UNSAFE_componentWillReceiveProps=="function"&&m.UNSAFE_componentWillReceiveProps(y,C),m.state!==f&&aI.enqueueReplaceState(m,m.state,null)}function mg(f,m){var y=m;if("ref"in m){y={};for(var C in m)C!=="ref"&&(y[C]=m[C])}if(f=f.defaultProps){y===m&&(y=h({},y));for(var I in f)y[I]===void 0&&(y[I]=f[I])}return y}function $H(f){CC(f)}function BH(f){console.error(f)}function UH(f){CC(f)}function KC(f,m){try{var y=f.onUncaughtError;y(m.value,{componentStack:m.stack})}catch(C){setTimeout(function(){throw C})}}function VH(f,m,y){try{var C=f.onCaughtError;C(y.value,{componentStack:y.stack,errorBoundary:m.tag===1?m.stateNode:null})}catch(I){setTimeout(function(){throw I})}}function oI(f,m,y){return y=ip(y),y.tag=3,y.payload={element:null},y.callback=function(){KC(f,m)},y}function HH(f){return f=ip(f),f.tag=3,f}function qH(f,m,y,C){var I=y.type.getDerivedStateFromError;if(typeof I=="function"){var F=C.value;f.payload=function(){return I(F)},f.callback=function(){VH(m,y,C)}}var ee=y.stateNode;ee!==null&&typeof ee.componentDidCatch=="function"&&(f.callback=function(){VH(m,y,C),typeof I!="function"&&(dp===null?dp=new Set([this]):dp.add(this));var de=C.stack;this.componentDidCatch(C.value,{componentStack:de!==null?de:""})})}function OCe(f,m,y,C,I){if(y.flags|=32768,C!==null&&typeof C=="object"&&typeof C.then=="function"){if(m=y.alternate,m!==null&&Kx(m,y,I,!0),y=El.current,y!==null){switch(y.tag){case 31:case 13:return oc===null?aT():y.alternate===null&&vs===0&&(vs=3),y.flags&=-257,y.flags|=65536,y.lanes=I,C===MC?y.flags|=16384:(m=y.updateQueue,m===null?y.updateQueue=new Set([C]):m.add(C),II(f,C,I)),!1;case 22:return y.flags|=65536,C===MC?y.flags|=16384:(m=y.updateQueue,m===null?(m={transitions:null,markerInstances:null,retryQueue:new Set([C])},y.updateQueue=m):(y=m.retryQueue,y===null?m.retryQueue=new Set([C]):y.add(C)),II(f,C,I)),!1}throw Error(r(435,y.tag))}return II(f,C,I),aT(),!1}if(Tr)return m=El.current,m!==null?((m.flags&65536)===0&&(m.flags|=256),m.flags|=65536,m.lanes=I,C!==TR&&(f=Error(r(422),{cause:C}),Rb(rc(f,y)))):(C!==TR&&(m=Error(r(423),{cause:C}),Rb(rc(m,y))),f=f.current.alternate,f.flags|=65536,I&=-I,f.lanes|=I,C=rc(C,y),I=oI(f.stateNode,C,I),FR(f,I),vs!==4&&(vs=2)),!1;var F=Error(r(520),{cause:C});
vendor: 14,644 bytes, line 59
59if(F=rc(F,y),Xb===null?Xb=[F]:Xb.push(F),vs!==4&&(vs=2),m===null)return!0;C=rc(C,y),y=m;do{switch(y.tag){case 3:return y.flags|=65536,f=I&-I,y.lanes|=f,f=oI(y.stateNode,C,f),FR(y,f),!1;case 1:if(m=y.type,F=y.stateNode,(y.flags&128)===0&&(typeof m.getDerivedStateFromError=="function"||F!==null&&typeof F.componentDidCatch=="function"&&(dp===null||!dp.has(F))))return y.flags|=65536,I&=-I,y.lanes|=I,I=HH(I),qH(I,f,y,C),FR(y,I),!1}y=y.return}while(y!==null);return!1}var lI=Error(r(461)),Hs=!1;function Ma(f,m,y,C){m.child=f===null?YV(m,null,y,C):hg(m,f.child,y,C)}function WH(f,m,y,C,I){y=y.render;var F=m.ref;if("ref"in C){var ee={};for(var de in C)de!=="ref"&&(ee[de]=C[de])}else ee=C;return cg(m),C=VR(f,m,y,ee,F,I),de=HR(),f!==null&&!Hs?(qR(f,m,I),gf(f,m,I)):(Tr&&de&&ER(m),m.flags|=1,Ma(f,m,C,I),m.child)}function GH(f,m,y,C,I){if(f===null){var F=y.type;return typeof F=="function"&&!_R(F)&&F.defaultProps===void 0&&y.compare===null?(m.tag=15,m.type=F,KH(f,m,F,C,I)):(f=NC(y.type,null,C,m,m.mode,I),f.ref=m.ref,f.return=m,m.child=f)}if(F=f.child,!gI(f,I)){var ee=F.memoizedProps;if(y=y.compare,y=y!==null?y:kb,y(ee,C)&&f.ref===m.ref)return gf(f,m,I)}return m.flags|=1,f=uf(F,C),f.ref=m.ref,f.return=m,m.child=f}function KH(f,m,y,C,I){if(f!==null){var F=f.memoizedProps;if(kb(F,C)&&f.ref===m.ref)if(Hs=!1,m.pendingProps=C=F,gI(f,I))(f.flags&131072)!==0&&(Hs=!0);else return m.lanes=f.lanes,gf(f,m,I)}return cI(f,m,y,C,I)}function YH(f,m,y,C){var I=C.children,F=f!==null?f.memoizedState:null;if(f===null&&m.stateNode===null&&(m.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),C.mode==="hidden"){if((m.flags&128)!==0){if(F=F!==null?F.baseLanes|y:y,f!==null){for(C=m.child=f.child,I=0;C!==null;)I=I|C.lanes|C.childLanes,C=C.sibling;C=I&~F}else C=0,m.child=null;return XH(f,m,F,y,C)}if((y&536870912)!==0)m.memoizedState={baseLanes:0,cachePool:null},f!==null&&OC(m,F!==null?F.cachePool:null),F!==null?ZV(m,F):zR(),JV(m);else return C=m.lanes=536870912,XH(f,m,F!==null?F.baseLanes|y:y,y,C)}else F!==null?(OC(m,F.cachePool),ZV(m,F),op(),m.memoizedState=null):(f!==null&&OC(m,null),zR(),op());return Ma(f,m,I,y),m.child}function Vb(f,m){return f!==null&&f.tag===22||m.stateNode!==null||(m.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),m.sibling}function XH(f,m,y,C,I){var F=OR();return F=F===null?null:{parent:Us._currentValue,pool:F},m.memoizedState={baseLanes:y,cachePool:F},f!==null&&OC(m,null),zR(),JV(m),f!==null&&Kx(f,m,C,!0),m.childLanes=I,null}function YC(f,m){return m=QC({mode:m.mode,children:m.children},f.mode),m.ref=f.ref,f.child=m,m.return=f,m}function QH(f,m,y){return hg(m,f.child,null,y),f=YC(m,m.pendingProps),f.flags|=2,Cl(m),m.memoizedState=null,f}function PCe(f,m,y){var C=m.pendingProps,I=(m.flags&128)!==0;if(m.flags&=-129,f===null){if(Tr){if(C.mode==="hidden")return f=YC(m,C),m.lanes=536870912,Vb(null,f);if(BR(m),(f=$i)?(f=cW(f,ac),f=f!==null&&f.data==="&"?f:null,f!==null&&(m.memoizedState={dehydrated:f,treeContext:Jh!==null?{id:nd,overflow:rd}:null,retryLane:536870912,hydrationErrors:null},y=PV(f),y.return=m,m.child=y,Oa=m,$i=null)):f=null,f===null)throw tp(m);return m.lanes=536870912,null}return YC(m,C)}var F=f.memoizedState;if(F!==null){var ee=F.dehydrated;if(BR(m),I)if(m.flags&256)m.flags&=-257,m=QH(f,m,y);else if(m.memoizedState!==null)m.child=f.child,m.flags|=128,m=null;else throw Error(r(558));else if(Hs||Kx(f,m,y,!1),I=(y&f.childLanes)!==0,Hs||I){if(C=Si,C!==null&&(ee=fi(C,y),ee!==0&&ee!==F.retryLane))throw F.retryLane=ee,sg(f,ee),Zo(C,f,ee),lI;aT(),m=QH(f,m,y)}else f=F.treeContext,$i=lc(ee.nextSibling),Oa=m,Tr=!0,ep=null,ac=!1,f!==null&&FV(m,f),m=YC(m,C),m.flags|=4096;return m}return f=uf(f.child,{mode:C.mode,children:C.children}),f.ref=m.ref,m.child=f,f.return=m,f}function XC(f,m){var y=m.ref;if(y===null)f!==null&&f.ref!==null&&(m.flags|=4194816);else{if(typeof y!="function"&&typeof y!="object")throw Error(r(284));(f===null||f.ref!==y)&&(m.flags|=4194816)}}function cI(f,m,y,C,I){return cg(m),y=VR(f,m,y,C,void 0,I),C=HR(),f!==null&&!Hs?(qR(f,m,I),gf(f,m,I)):(Tr&&C&&ER(m),m.flags|=1,Ma(f,m,y,I),m.child)}function ZH(f,m,y,C,I,F){return cg(m),m.updateQueue=null,y=tH(m,C,y,I),eH(f),C=HR(),f!==null&&!Hs?(qR(f,m,F),gf(f,m,F)):(Tr&&C&&ER(m),m.flags|=1,Ma(f,m,y,F),m.child)}function JH(f,m,y,C,I){if(cg(m),m.stateNode===null){var F=Hx,ee=y.contextType;typeof ee=="object"&&ee!==null&&(F=Pa(ee)),F=new y(C,F),m.memoizedState=F.state!==null&&F.state!==void 0?F.state:null,F.updater=aI,m.stateNode=F,F._reactInternals=m,F=m.stateNode,F.props=C,F.state=m.memoizedState,F.refs={},MR(m),ee=y.contextType,F.context=typeof ee=="object"&&ee!==null?Pa(ee):Hx,F.state=m.memoizedState,ee=y.getDerivedStateFromProps,typeof ee=="function"&&(sI(m,y,ee,C),F.state=m.memoizedState),typeof y.getDerivedStateFromProps=="function"||typeof F.getSnapshotBeforeUpdate=="function"||typeof F.UNSAFE_componentWillMount!="function"&&typeof F.componentWillMount!="function"||(ee=F.state,typeof F.componentWillMount=="function"&&F.componentWillMount(),typeof F.UNSAFE_componentWillMount=="function"&&F.UNSAFE_componentWillMount(),ee!==F.state&&aI.enqueueReplaceState(F,F.state,null),Lb(m,C,F,I),Fb(),F.state=m.memoizedState),typeof F.componentDidMount=="function"&&(m.flags|=4194308),C=!0}else if(f===null){F=m.stateNode;var de=m.memoizedProps,Pe=mg(y,de);F.props=Pe;var Ye=F.context,ht=y.contextType;ee=Hx,typeof ht=="object"&&ht!==null&&(ee=Pa(ht));var bt=y.getDerivedStateFromProps;ht=typeof bt=="function"||typeof F.getSnapshotBeforeUpdate=="function",de=m.pendingProps!==de,ht||typeof F.UNSAFE_componentWillReceiveProps!="function"&&typeof F.componentWillReceiveProps!="function"||(de||Ye!==ee)&&zH(m,F,C,ee),rp=!1;var Je=m.memoizedState;F.state=Je,Lb(m,C,F,I),Fb(),Ye=m.memoizedState,de||Je!==Ye||rp?(typeof bt=="function"&&(sI(m,y,bt,C),Ye=m.memoizedState),(Pe=rp||LH(m,y,Pe,C,Je,Ye,ee))?(ht||typeof F.UNSAFE_componentWillMount!="function"&&typeof F.componentWillMount!="function"||(typeof F.componentWillMount=="function"&&F.componentWillMount(),typeof F.UNSAFE_componentWillMount=="function"&&F.UNSAFE_componentWillMount()),typeof F.componentDidMount=="function"&&(m.flags|=4194308)):(typeof F.componentDidMount=="function"&&(m.flags|=4194308),m.memoizedProps=C,m.memoizedState=Ye),F.props=C,F.state=Ye,F.context=ee,C=Pe):(typeof F.componentDidMount=="function"&&(m.flags|=4194308),C=!1)}else{F=m.stateNode,DR(f,m),ee=m.memoizedProps,ht=mg(y,ee),F.props=ht,bt=m.pendingProps,Je=F.context,Ye=y.contextType,Pe=Hx,typeof Ye=="object"&&Ye!==null&&(Pe=Pa(Ye)),de=y.getDerivedStateFromProps,(Ye=typeof de=="function"||typeof F.getSnapshotBeforeUpdate=="function")||typeof F.UNSAFE_componentWillReceiveProps!="function"&&typeof F.componentWillReceiveProps!="function"||(ee!==bt||Je!==Pe)&&zH(m,F,C,Pe),rp=!1,Je=m.memoizedState,F.state=Je,Lb(m,C,F,I),Fb();var nt=m.memoizedState;ee!==bt||Je!==nt||rp||f!==null&&f.dependencies!==null&&RC(f.dependencies)?(typeof de=="function"&&(sI(m,y,de,C),nt=m.memoizedState),(ht=rp||LH(m,y,ht,C,Je,nt,Pe)||f!==null&&f.dependencies!==null&&RC(f.dependencies))?(Ye||typeof F.UNSAFE_componentWillUpdate!="function"&&typeof F.componentWillUpdate!="function"||(typeof F.componentWillUpdate=="function"&&F.componentWillUpdate(C,nt,Pe),typeof F.UNSAFE_componentWillUpdate=="function"&&F.UNSAFE_componentWillUpdate(C,nt,Pe)),typeof F.componentDidUpdate=="function"&&(m.flags|=4),typeof F.getSnapshotBeforeUpdate=="function"&&(m.flags|=1024)):(typeof F.componentDidUpdate!="function"||ee===f.memoizedProps&&Je===f.memoizedState||(m.flags|=4),typeof F.getSnapshotBeforeUpdate!="function"||ee===f.memoizedProps&&Je===f.memoizedState||(m.flags|=1024),m.memoizedProps=C,m.memoizedState=nt),F.props=C,F.state=nt,F.context=Pe,C=ht):(typeof F.componentDidUpdate!="function"||ee===f.memoizedProps&&Je===f.memoizedState||(m.flags|=4),typeof F.getSnapshotBeforeUpdate!="function"||ee===f.memoizedProps&&Je===f.memoizedState||(m.flags|=1024),C=!1)}return F=C,XC(f,m),C=(m.flags&128)!==0,F||C?(F=m.stateNode,y=C&&typeof y.getDerivedStateFromError!="function"?null:F.render(),m.flags|=1,f!==null&&C?(m.child=hg(m,f.child,null,I),m.child=hg(m,null,y,I)):Ma(f,m,y,I),m.memoizedState=F.state,f=m.child):f=gf(f,m,I),f}function eq(f,m,y,C){return og(),m.flags|=256,Ma(f,m,y,C),m.child}var uI={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function dI(f){return{baseLanes:f,cachePool:VV()}}function fI(f,m,y){return f=f!==null?f.childLanes&~y:0,m&&(f|=Al),f}function tq(f,m,y){var C=m.pendingProps,I=!1,F=(m.flags&128)!==0,ee;if((ee=F)||(ee=f!==null&&f.memoizedState===null?!1:(js.current&2)!==0),ee&&(I=!0,m.flags&=-129),ee=(m.flags&32)!==0,m.flags&=-33,f===null){if(Tr){if(I?ap(m):op(),(f=$i)?(f=cW(f,ac),f=f!==null&&f.data!=="&"?f:null,f!==null&&(m.memoizedState={dehydrated:f,treeContext:Jh!==null?{id:nd,overflow:rd}:null,retryLane:536870912,hydrationErrors:null},y=PV(f),y.return=m,m.child=y,Oa=m,$i=null)):f=null,f===null)throw tp(m);return KI(f)?m.lanes=32:m.lanes=536870912,null}var de=C.children;return C=C.fallback,I?(op(),I=m.mode,de=QC({mode:"hidden",children:de},I),C=ag(C,I,y,null),de.return=m,C.return=m,de.sibling=C,m.child=de,C=m.child,C.memoizedState=dI(y),C.childLanes=fI(f,ee,y),m.memoizedState=uI,Vb(null,C)):(ap(m),hI(m,de))}var Pe=f.memoizedState;if(Pe!==null&&(de=Pe.dehydrated,de!==null)){if(F)m.flags&256?(ap(m),m.flags&=-257,m=pI(f,m,y)):m.memoizedState!==null?(op(),m.child=f.child,m.flags|=128,m=null):(op(),de=C.fallback,I=m.mode,C=QC({mode:"visible",children:C.children},I),de=ag(de,I,y,null),de.flags|=2,C.return=m,de.return=m,C.sibling=de,m.child=C,hg(m,f.child,null,y),C=m.child,C.memoizedState=dI(y),C.childLanes=fI(f,ee,y),m.memoizedState=uI,m=Vb(null,C));else if(ap(m),KI(de)){if(ee=de.nextSibling&&de.nextSibling.dataset,ee)var Ye=ee.dgst;ee=Ye,C=Error(r(419)),C.stack="",C.digest=ee,Rb({value:C,source:null,stack:null}),m=pI(f,m,y)}else if(Hs||Kx(f,m,y,!1),ee=(y&f.childLanes)!==0,Hs||ee){if(ee=Si,ee!==null&&(C=fi(ee,y),C!==0&&C!==Pe.retryLane))throw Pe.retryLane=C,sg(f,C),Zo(ee,f,C),lI;GI(de)||aT(),m=pI(f,m,y)}else GI(de)?(m.flags|=192,m.child=f.child,m=null):(f=Pe.treeContext,$i=lc(de.nextSibling),Oa=m,Tr=!0,ep=null,ac=!1,f!==null&&FV(m,f),m=hI(m,C.children),m.flags|=4096);return m}return I?(op(),de=C.fallback,I=m.mode,Pe=f.child,Ye=Pe.sibling,C=uf(Pe,{mode:"hidden",children:C.children}),C.subtreeFlags=Pe.subtreeFlags&65011712,Ye!==null?de=uf(Ye,de):(de=ag(de,I,y,null),de.flags|=2),de.return=m,C.return=m,C.sibling=de,m.child=C,Vb(null,C),C=m.child,de=f.child.memoizedState,de===null?de=dI(y):(I=de.cachePool,I!==null?(Pe=Us._currentValue,I=I.parent!==Pe?{parent:Pe,pool:Pe}:I):I=VV(),de={baseLanes:de.baseLanes|y,cachePool:I}),C.memoizedState=de,C.childLanes=fI(f,ee,y),m.memoizedState=uI,Vb(f.child,C)):(ap(m),y=f.child,f=y.sibling,y=uf(y,{mode:"visible",children:C.children}),y.return=m,y.sibling=null,f!==null&&(ee=m.deletions,ee===null?(m.deletions=[f],m.flags|=16):ee.push(f)),m.child=y,m.memoizedState=null,y)}function hI(f,m){return m=QC({mode:"visible",children:m},f.mode),m.return=f,f.child=m}function QC(f,m){return f=Sl(22,f,null,m),f.lanes=0,f}function pI(f,m,y){return hg(m,f.child,null,y),f=hI(m,m.pendingProps.children),f.flags|=2,m.memoizedState=null,f}function nq(f,m,y){f.lanes|=m;var C=f.alternate;C!==null&&(C.lanes|=m),NR(f.return,m,y)}function mI(f,m,y,C,I,F){var ee=f.memoizedState;ee===null?f.memoizedState={isBackwards:m,rendering:null,renderingStartTime:0,last:C,tail:y,tailMode:I,treeForkCount:F}:(ee.isBackwards=m,ee.rendering=null,ee.renderingStartTime=0,ee.last=C,ee.tail=y,ee.tailMode=I,ee.treeForkCount=F)}function rq(f,m,y){var C=m.pendingProps,I=C.revealOrder,F=C.tail;C=C.children;var ee=js.current,de=(ee&2)!==0;if(de?(ee=ee&1|2,m.flags|=128):ee&=1,M(js,ee),Ma(f,m,C,y),C=Tr?jb:0,!de&&f!==null&&(f.flags&128)!==0)e:for(f=m.child;f!==null;){if(f.tag===13)f.memoizedState!==null&&nq(f,y,m);else if(f.tag===19)nq(f,y,m);else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===m)break e;for(;f.sibling===null;){if(f.return===null||f.return===m)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}switch(I){case"forwards":for(y=m.child,I=null;y!==null;)f=y.alternate,f!==null&&zC(f)===null&&(I=y),y=y.sibling;y=I,y===null?(I=m.child,m.child=null):(I=y.sibling,y.sibling=null),mI(m,!1,I,y,F,C);break;case"backwards":case"unstable_legacy-backwards":for(y=null,I=m.child,m.child=null;I!==null;){if(f=I.alternate,f!==null&&zC(f)===null){m.child=I;break}f=I.sibling,I.sibling=y,y=I,I=f}mI(m,!0,y,null,F,C);break;case"together":mI(m,!1,null,null,void 0,C);break;default:m.memoizedState=null}return m.child}function gf(f,m,y){if(f!==null&&(m.dependencies=f.dependencies),up|=m.lanes,(y&m.childLanes)===0)if(f!==null){if(Kx(f,m,y,!1),(y&m.childLanes)===0)return null}else return null;if(f!==null&&m.child!==f.child)throw Error(r(153));if(m.child!==null){for(f=m.child,y=uf(f,f.pendingProps),m.child=y,y.return=m;f.sibling!==null;)f=f.sibling,y=y.sibling=uf(f,f.pendingProps),y.return=m;y.sibling=null}return m.child}function gI(f,m){return(f.lanes&m)!==0?!0:(f=f.dependencies,!!(f!==null&&RC(f)))}function MCe(f,m,y){switch(m.tag){case 3:re(m,m.stateNode.containerInfo),np(m,Us,f.memoizedState.cache),og();break;case 27:case 5:ce(m);break;case 4:re(m,m.stateNode.containerInfo);break;case 10:np(m,m.type,m.memoizedProps.value);break;case 31:if(m.memoizedState!==null)return m.flags|=128,BR(m),null;break;case 13:var C=m.memoizedState;if(C!==null)return C.dehydrated!==null?(ap(m),m.flags|=128,null):(y&m.child.childLanes)!==0?tq(f,m,y):(ap(m),f=gf(f,m,y),f!==null?f.sibling:null);ap(m);break;case 19:var I=(f.flags&128)!==0;if(C=(y&m.childLanes)!==0,C||(Kx(f,m,y,!1),C=(y&m.childLanes)!==0),I){if(C)return rq(f,m,y);m.flags|=128}if(I=m.memoizedState,I!==null&&(I.rendering=null,I.tail=null,I.lastEffect=null),M(js,js.current),C)break;return null;case 22:return m.lanes=0,YH(f,m,y,m.pendingProps);case 24:np(m,Us,f.memoizedState.cache)}return gf(f,m,y)}function iq(f,m,y){if(f!==null)if(f.memoizedProps!==m.pendingProps)Hs=!0;else{if(!gI(f,y)&&(m.flags&128)===0)return Hs=!1,MCe(f,m,y);Hs=(f.flags&131072)!==0}else Hs=!1,Tr&&(m.flags&1048576)!==0&&DV(m,jb,m.index);switch(m.lanes=0,m.tag){case 16:e:{var C=m.pendingProps;if(f=dg(m.elementType),m.type=f,typeof f=="function")_R(f)?(C=mg(f,C),m.tag=1,m=JH(null,m,f,C,y)):(m.tag=0,m=cI(null,m,f,C,y));else{if(f!=null){var I=f.$$typeof;if(I===T){m.tag=11,m=WH(null,m,f,C,y);break e}else if(I===k){m.tag=14,m=GH(null,m,f,C,y);break e}}throw m=Q(f)||f,Error(r(306,m,""))}}return m;case 0:return cI(f,m,m.type,m.pendingProps,y);case 1:return C=m.type,I=mg(C,m.pendingProps),JH(f,m,C,I,y);
vendor: 2,206 bytes, line 59
59case 3:e:{if(re(m,m.stateNode.containerInfo),f===null)throw Error(r(387));C=m.pendingProps;var F=m.memoizedState;I=F.element,DR(f,m),Lb(m,C,null,y);var ee=m.memoizedState;if(C=ee.cache,np(m,Us,C),C!==F.cache&&jR(m,[Us],y,!0),Fb(),C=ee.element,F.isDehydrated)if(F={element:C,isDehydrated:!1,cache:ee.cache},m.updateQueue.baseState=F,m.memoizedState=F,m.flags&256){m=eq(f,m,C,y);break e}else if(C!==I){I=rc(Error(r(424)),m),Rb(I),m=eq(f,m,C,y);break e}else{switch(f=m.stateNode.containerInfo,f.nodeType){case 9:f=f.body;break;default:f=f.nodeName==="HTML"?f.ownerDocument.body:f}for($i=lc(f.firstChild),Oa=m,Tr=!0,ep=null,ac=!0,y=YV(m,null,C,y),m.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling}else{if(og(),C===I){m=gf(f,m,y);break e}Ma(f,m,C,y)}m=m.child}return m;case 26:return XC(f,m),f===null?(y=mW(m.type,null,m.pendingProps,null))?m.memoizedState=y:Tr||(y=m.type,f=m.pendingProps,C=hT(J.current).createElement(y),C[pe]=m,C[ye]=f,Da(C,y,f),hn(C),m.stateNode=C):m.memoizedState=mW(m.type,f.memoizedProps,m.pendingProps,f.memoizedState),null;case 27:return ce(m),f===null&&Tr&&(C=m.stateNode=fW(m.type,m.pendingProps,J.current),Oa=m,ac=!0,I=$i,mp(m.type)?(YI=I,$i=lc(C.firstChild)):$i=I),Ma(f,m,m.pendingProps.children,y),XC(f,m),f===null&&(m.flags|=4194304),m.child;case 5:return f===null&&Tr&&((I=C=$i)&&(C=dTe(C,m.type,m.pendingProps,ac),C!==null?(m.stateNode=C,Oa=m,$i=lc(C.firstChild),ac=!1,I=!0):I=!1),I||tp(m)),ce(m),I=m.type,F=m.pendingProps,ee=f!==null?f.memoizedProps:null,C=F.children,HI(I,F)?C=null:ee!==null&&HI(I,ee)&&(m.flags|=32),m.memoizedState!==null&&(I=VR(f,m,TCe,null,null,y),i_._currentValue=I),XC(f,m),Ma(f,m,C,y),m.child;case 6:return f===null&&Tr&&((f=y=$i)&&(y=fTe(y,m.pendingProps,ac),y!==null?(m.stateNode=y,Oa=m,$i=null,f=!0):f=!1),f||tp(m)),null;case 13:return tq(f,m,y);case 4:return re(m,m.stateNode.containerInfo),C=m.pendingProps,f===null?m.child=hg(m,null,C,y):Ma(f,m,C,y),m.child;case 11:return WH(f,m,m.type,m.pendingProps,y);case 7:return Ma(f,m,m.pendingProps,y),m.child;case 8:return Ma(f,m,m.pendingProps.children,y),m.child;case 12:return Ma(f,m,m.pendingProps.children,y),m.child;case 10:return C=m.pendingProps,np(m,m.type,C.value),Ma(f,m,C.children,y),m.child;
vendor: 9,865 bytes, line 59
59case 9:return I=m.type._context,C=m.pendingProps.children,cg(m),I=Pa(I),C=C(I),m.flags|=1,Ma(f,m,C,y),m.child;case 14:return GH(f,m,m.type,m.pendingProps,y);case 15:return KH(f,m,m.type,m.pendingProps,y);case 19:return rq(f,m,y);case 31:return PCe(f,m,y);case 22:return YH(f,m,y,m.pendingProps);case 24:return cg(m),C=Pa(Us),f===null?(I=OR(),I===null&&(I=Si,F=RR(),I.pooledCache=F,F.refCount++,F!==null&&(I.pooledCacheLanes|=y),I=F),m.memoizedState={parent:C,cache:I},MR(m),np(m,Us,I)):((f.lanes&y)!==0&&(DR(f,m),Lb(m,null,null,y),Fb()),I=f.memoizedState,F=m.memoizedState,I.parent!==C?(I={parent:C,cache:C},m.memoizedState=I,m.lanes===0&&(m.memoizedState=m.updateQueue.baseState=I),np(m,Us,C)):(C=F.cache,np(m,Us,C),C!==I.cache&&jR(m,[Us],y,!0))),Ma(f,m,m.pendingProps.children,y),m.child;case 29:throw m.pendingProps}throw Error(r(156,m.tag))}function xf(f){f.flags|=4}function xI(f,m,y,C,I){if((m=(f.mode&32)!==0)&&(m=!1),m){if(f.flags|=16777216,(I&335544128)===I)if(f.stateNode.complete)f.flags|=8192;else if(Rq())f.flags|=8192;else throw fg=MC,PR}else f.flags&=-16777217}function sq(f,m){if(m.type!=="stylesheet"||(m.state.loading&4)!==0)f.flags&=-16777217;else if(f.flags|=16777216,!bW(m))if(Rq())f.flags|=8192;else throw fg=MC,PR}function ZC(f,m){m!==null&&(f.flags|=4),f.flags&16384&&(m=f.tag!==22?Hn():536870912,f.lanes|=m,av|=m)}function Hb(f,m){if(!Tr)switch(f.tailMode){case"hidden":m=f.tail;for(var y=null;m!==null;)m.alternate!==null&&(y=m),m=m.sibling;y===null?f.tail=null:y.sibling=null;break;case"collapsed":y=f.tail;for(var C=null;y!==null;)y.alternate!==null&&(C=y),y=y.sibling;C===null?m||f.tail===null?f.tail=null:f.tail.sibling=null:C.sibling=null}}function Bi(f){var m=f.alternate!==null&&f.alternate.child===f.child,y=0,C=0;if(m)for(var I=f.child;I!==null;)y|=I.lanes|I.childLanes,C|=I.subtreeFlags&65011712,C|=I.flags&65011712,I.return=f,I=I.sibling;else for(I=f.child;I!==null;)y|=I.lanes|I.childLanes,C|=I.subtreeFlags,C|=I.flags,I.return=f,I=I.sibling;return f.subtreeFlags|=C,f.childLanes=y,m}function DCe(f,m,y){var C=m.pendingProps;switch(CR(m),m.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Bi(m),null;case 1:return Bi(m),null;case 3:return y=m.stateNode,C=null,f!==null&&(C=f.memoizedState.cache),m.memoizedState.cache!==C&&(m.flags|=2048),hf(Us),ae(),y.pendingContext&&(y.context=y.pendingContext,y.pendingContext=null),(f===null||f.child===null)&&(Gx(m)?xf(m):f===null||f.memoizedState.isDehydrated&&(m.flags&256)===0||(m.flags|=1024,AR())),Bi(m),null;case 26:var I=m.type,F=m.memoizedState;return f===null?(xf(m),F!==null?(Bi(m),sq(m,F)):(Bi(m),xI(m,I,null,C,y))):F?F!==f.memoizedState?(xf(m),Bi(m),sq(m,F)):(Bi(m),m.flags&=-16777217):(f=f.memoizedProps,f!==C&&xf(m),Bi(m),xI(m,I,f,C,y)),null;case 27:if(Te(m),y=J.current,I=m.type,f!==null&&m.stateNode!=null)f.memoizedProps!==C&&xf(m);else{if(!C){if(m.stateNode===null)throw Error(r(166));return Bi(m),null}f=q.current,Gx(m)?LV(m):(f=fW(I,C,y),m.stateNode=f,xf(m))}return Bi(m),null;case 5:if(Te(m),I=m.type,f!==null&&m.stateNode!=null)f.memoizedProps!==C&&xf(m);else{if(!C){if(m.stateNode===null)throw Error(r(166));return Bi(m),null}if(F=q.current,Gx(m))LV(m);else{var ee=hT(J.current);switch(F){case 1:F=ee.createElementNS("http://www.w3.org/2000/svg",I);break;case 2:F=ee.createElementNS("http://www.w3.org/1998/Math/MathML",I);break;default:switch(I){case"svg":F=ee.createElementNS("http://www.w3.org/2000/svg",I);break;case"math":F=ee.createElementNS("http://www.w3.org/1998/Math/MathML",I);break;case"script":F=ee.createElement("div"),F.innerHTML="<script><\/script>",F=F.removeChild(F.firstChild);break;case"select":F=typeof C.is=="string"?ee.createElement("select",{is:C.is}):ee.createElement("select"),C.multiple?F.multiple=!0:C.size&&(F.size=C.size);break;default:F=typeof C.is=="string"?ee.createElement(I,{is:C.is}):ee.createElement(I)}}F[pe]=m,F[ye]=C;e:for(ee=m.child;ee!==null;){if(ee.tag===5||ee.tag===6)F.appendChild(ee.stateNode);else if(ee.tag!==4&&ee.tag!==27&&ee.child!==null){ee.child.return=ee,ee=ee.child;continue}if(ee===m)break e;for(;ee.sibling===null;){if(ee.return===null||ee.return===m)break e;ee=ee.return}ee.sibling.return=ee.return,ee=ee.sibling}m.stateNode=F;e:switch(Da(F,I,C),I){case"button":case"input":case"select":case"textarea":C=!!C.autoFocus;break e;case"img":C=!0;break e;default:C=!1}C&&xf(m)}}return Bi(m),xI(m,m.type,f===null?null:f.memoizedProps,m.pendingProps,y),null;case 6:if(f&&m.stateNode!=null)f.memoizedProps!==C&&xf(m);else{if(typeof C!="string"&&m.stateNode===null)throw Error(r(166));if(f=J.current,Gx(m)){if(f=m.stateNode,y=m.memoizedProps,C=null,I=Oa,I!==null)switch(I.tag){case 27:case 5:C=I.memoizedProps}f[pe]=m,f=!!(f.nodeValue===y||C!==null&&C.suppressHydrationWarning===!0||tW(f.nodeValue,y)),f||tp(m,!0)}else f=hT(f).createTextNode(C),f[pe]=m,m.stateNode=f}return Bi(m),null;case 31:if(y=m.memoizedState,f===null||f.memoizedState!==null){if(C=Gx(m),y!==null){if(f===null){if(!C)throw Error(r(318));if(f=m.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(557));f[pe]=m}else og(),(m.flags&128)===0&&(m.memoizedState=null),m.flags|=4;Bi(m),f=!1}else y=AR(),f!==null&&f.memoizedState!==null&&(f.memoizedState.hydrationErrors=y),f=!0;if(!f)return m.flags&256?(Cl(m),m):(Cl(m),null);if((m.flags&128)!==0)throw Error(r(558))}return Bi(m),null;case 13:if(C=m.memoizedState,f===null||f.memoizedState!==null&&f.memoizedState.dehydrated!==null){if(I=Gx(m),C!==null&&C.dehydrated!==null){if(f===null){if(!I)throw Error(r(318));if(I=m.memoizedState,I=I!==null?I.dehydrated:null,!I)throw Error(r(317));I[pe]=m}else og(),(m.flags&128)===0&&(m.memoizedState=null),m.flags|=4;Bi(m),I=!1}else I=AR(),f!==null&&f.memoizedState!==null&&(f.memoizedState.hydrationErrors=I),I=!0;if(!I)return m.flags&256?(Cl(m),m):(Cl(m),null)}return Cl(m),(m.flags&128)!==0?(m.lanes=y,m):(y=C!==null,f=f!==null&&f.memoizedState!==null,y&&(C=m.child,I=null,C.alternate!==null&&C.alternate.memoizedState!==null&&C.alternate.memoizedState.cachePool!==null&&(I=C.alternate.memoizedState.cachePool.pool),F=null,C.memoizedState!==null&&C.memoizedState.cachePool!==null&&(F=C.memoizedState.cachePool.pool),F!==I&&(C.flags|=2048)),y!==f&&y&&(m.child.flags|=8192),ZC(m,m.updateQueue),Bi(m),null);case 4:return ae(),f===null&&zI(m.stateNode.containerInfo),Bi(m),null;case 10:return hf(m.type),Bi(m),null;case 19:if(L(js),C=m.memoizedState,C===null)return Bi(m),null;if(I=(m.flags&128)!==0,F=C.rendering,F===null)if(I)Hb(C,!1);else{if(vs!==0||f!==null&&(f.flags&128)!==0)for(f=m.child;f!==null;){if(F=zC(f),F!==null){for(m.flags|=128,Hb(C,!1),f=F.updateQueue,m.updateQueue=f,ZC(m,f),m.subtreeFlags=0,f=y,y=m.child;y!==null;)OV(y,f),y=y.sibling;return M(js,js.current&1|2),Tr&&df(m,C.treeForkCount),m.child}f=f.sibling}C.tail!==null&&be()>rT&&(m.flags|=128,I=!0,Hb(C,!1),m.lanes=4194304)}else{if(!I)if(f=zC(F),f!==null){if(m.flags|=128,I=!0,f=f.updateQueue,m.updateQueue=f,ZC(m,f),Hb(C,!0),C.tail===null&&C.tailMode==="hidden"&&!F.alternate&&!Tr)return Bi(m),null}else 2*be()-C.renderingStartTime>rT&&y!==536870912&&(m.flags|=128,I=!0,Hb(C,!1),m.lanes=4194304);C.isBackwards?(F.sibling=m.child,m.child=F):(f=C.last,f!==null?f.sibling=F:m.child=F,C.last=F)}return C.tail!==null?(f=C.tail,C.rendering=f,C.tail=f.sibling,C.renderingStartTime=be(),f.sibling=null,y=js.current,M(js,I?y&1|2:y&1),Tr&&df(m,C.treeForkCount),f):(Bi(m),null);case 22:case 23:return Cl(m),$R(),C=m.memoizedState!==null,f!==null?f.memoizedState!==null!==C&&(m.flags|=8192):C&&(m.flags|=8192),C?(y&536870912)!==0&&(m.flags&128)===0&&(Bi(m),m.subtreeFlags&6&&(m.flags|=8192)):Bi(m),y=m.updateQueue,y!==null&&ZC(m,y.retryQueue),y=null,f!==null&&f.memoizedState!==null&&f.memoizedState.cachePool!==null&&(y=f.memoizedState.cachePool.pool),C=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(C=m.memoizedState.cachePool.pool),C!==y&&(m.flags|=2048),f!==null&&L(ug),null;case 24:return y=null,f!==null&&(y=f.memoizedState.cache),m.memoizedState.cache!==y&&(m.flags|=2048),hf(Us),Bi(m),null;case 25:return null;case 30:return null}throw Error(r(156,m.tag))}function FCe(f,m){switch(CR(m),m.tag){case 1:return f=m.flags,f&65536?(m.flags=f&-65537|128,m):null;case 3:return hf(Us),ae(),f=m.flags,(f&65536)!==0&&(f&128)===0?(m.flags=f&-65537|128,m):null;case 26:case 27:case 5:return Te(m),null;case 31:if(m.memoizedState!==null){if(Cl(m),m.alternate===null)throw Error(r(340));og()}return f=m.flags,f&65536?(m.flags=f&-65537|128,m):null;case 13:if(Cl(m),f=m.memoizedState,f!==null&&f.dehydrated!==null){if(m.alternate===null)throw Error(r(340));og()}return f=m.flags,f&65536?(m.flags=f&-65537|128,m):null;case 19:return L(js),null;case 4:return ae(),null;case 10:return hf(m.type),null;case 22:case 23:return Cl(m),$R(),f!==null&&L(ug),f=m.flags,f&65536?(m.flags=f&-65537|128,m):null;case 24:return hf(Us),null;case 25:return null;default:return null}}function aq(f,m){switch(CR(m),m.tag){case 3:hf(Us),ae();break;case 26:case 27:case 5:Te(m);break;case 4:ae();break;case 31:m.memoizedState!==null&&Cl(m);break;case 13:Cl(m);break;case 19:L(js);break;case 10:hf(m.type);break;case 22:case 23:Cl(m),$R(),f!==null&&L(ug);break;case 24:hf(Us)}}function qb(f,m){try{var y=m.updateQueue,C=y!==null?y.lastEffect:null;if(C!==null){var I=C.next;y=I;do{if((y.tag&f)===f){C=void 0;var F=y.create,ee=y.inst;C=F(),ee.destroy=C}y=y.next}while(y!==I)}}catch(de){ti(m,m.return,de)}}function lp(f,m,y){try{var C=m.updateQueue,I=C!==null?C.lastEffect:null;if(I!==null){var F=I.next;C=F;do{if((C.tag&f)===f){var ee=C.inst,de=ee.destroy;if(de!==void 0){ee.destroy=void 0,I=m;var Pe=y,Ye=de;try{Ye()}catch(ht){ti(I,Pe,ht)}}}C=C.next}while(C!==F)}}catch(ht){ti(m,m.return,ht)}}function oq(f){var m=f.updateQueue;if(m!==null){var y=f.stateNode;try{QV(m,y)}catch(C){ti(f,f.return,C)}}}function lq(f,m,y){y.props=mg(f.type,f.memoizedProps),y.state=f.memoizedState;
vendor: 20,625 bytes, line 59
59try{y.componentWillUnmount()}catch(C){ti(f,m,C)}}function Wb(f,m){try{var y=f.ref;if(y!==null){switch(f.tag){case 26:case 27:case 5:var C=f.stateNode;break;case 30:C=f.stateNode;break;default:C=f.stateNode}typeof y=="function"?f.refCleanup=y(C):y.current=C}}catch(I){ti(f,m,I)}}function id(f,m){var y=f.ref,C=f.refCleanup;if(y!==null)if(typeof C=="function")try{C()}catch(I){ti(f,m,I)}finally{f.refCleanup=null,f=f.alternate,f!=null&&(f.refCleanup=null)}else if(typeof y=="function")try{y(null)}catch(I){ti(f,m,I)}else y.current=null}function cq(f){var m=f.type,y=f.memoizedProps,C=f.stateNode;try{e:switch(m){case"button":case"input":case"select":case"textarea":y.autoFocus&&C.focus();break e;case"img":y.src?C.src=y.src:y.srcSet&&(C.srcset=y.srcSet)}}catch(I){ti(f,f.return,I)}}function vI(f,m,y){try{var C=f.stateNode;sTe(C,f.type,y,m),C[ye]=m}catch(I){ti(f,f.return,I)}}function uq(f){return f.tag===5||f.tag===3||f.tag===26||f.tag===27&&mp(f.type)||f.tag===4}function yI(f){e:for(;;){for(;f.sibling===null;){if(f.return===null||uq(f.return))return null;f=f.return}for(f.sibling.return=f.return,f=f.sibling;f.tag!==5&&f.tag!==6&&f.tag!==18;){if(f.tag===27&&mp(f.type)||f.flags&2||f.child===null||f.tag===4)continue e;f.child.return=f,f=f.child}if(!(f.flags&2))return f.stateNode}}function bI(f,m,y){var C=f.tag;if(C===5||C===6)f=f.stateNode,m?(y.nodeType===9?y.body:y.nodeName==="HTML"?y.ownerDocument.body:y).insertBefore(f,m):(m=y.nodeType===9?y.body:y.nodeName==="HTML"?y.ownerDocument.body:y,m.appendChild(f),y=y._reactRootContainer,y!=null||m.onclick!==null||(m.onclick=lf));else if(C!==4&&(C===27&&mp(f.type)&&(y=f.stateNode,m=null),f=f.child,f!==null))for(bI(f,m,y),f=f.sibling;f!==null;)bI(f,m,y),f=f.sibling}function JC(f,m,y){var C=f.tag;if(C===5||C===6)f=f.stateNode,m?y.insertBefore(f,m):y.appendChild(f);else if(C!==4&&(C===27&&mp(f.type)&&(y=f.stateNode),f=f.child,f!==null))for(JC(f,m,y),f=f.sibling;f!==null;)JC(f,m,y),f=f.sibling}function dq(f){var m=f.stateNode,y=f.memoizedProps;try{for(var C=f.type,I=m.attributes;I.length;)m.removeAttributeNode(I[0]);Da(m,C,y),m[pe]=f,m[ye]=y}catch(F){ti(f,f.return,F)}}var vf=!1,qs=!1,_I=!1,fq=typeof WeakSet=="function"?WeakSet:Set,va=null;function LCe(f,m){if(f=f.containerInfo,UI=bT,f=EV(f),pR(f)){if("selectionStart"in f)var y={start:f.selectionStart,end:f.selectionEnd};else e:{y=(y=f.ownerDocument)&&y.defaultView||window;var C=y.getSelection&&y.getSelection();if(C&&C.rangeCount!==0){y=C.anchorNode;var I=C.anchorOffset,F=C.focusNode;C=C.focusOffset;try{y.nodeType,F.nodeType}catch{y=null;break e}var ee=0,de=-1,Pe=-1,Ye=0,ht=0,bt=f,Je=null;t:for(;;){for(var nt;bt!==y||I!==0&&bt.nodeType!==3||(de=ee+I),bt!==F||C!==0&&bt.nodeType!==3||(Pe=ee+C),bt.nodeType===3&&(ee+=bt.nodeValue.length),(nt=bt.firstChild)!==null;)Je=bt,bt=nt;for(;;){if(bt===f)break t;if(Je===y&&++Ye===I&&(de=ee),Je===F&&++ht===C&&(Pe=ee),(nt=bt.nextSibling)!==null)break;bt=Je,Je=bt.parentNode}bt=nt}y=de===-1||Pe===-1?null:{start:de,end:Pe}}else y=null}y=y||{start:0,end:0}}else y=null;for(VI={focusedElem:f,selectionRange:y},bT=!1,va=m;va!==null;)if(m=va,f=m.child,(m.subtreeFlags&1028)!==0&&f!==null)f.return=m,va=f;else for(;va!==null;){switch(m=va,F=m.alternate,f=m.flags,m.tag){case 0:if((f&4)!==0&&(f=m.updateQueue,f=f!==null?f.events:null,f!==null))for(y=0;y<f.length;y++)I=f[y],I.ref.impl=I.nextImpl;break;case 11:case 15:break;case 1:if((f&1024)!==0&&F!==null){f=void 0,y=m,I=F.memoizedProps,F=F.memoizedState,C=y.stateNode;try{var un=mg(y.type,I);f=C.getSnapshotBeforeUpdate(un,F),C.__reactInternalSnapshotBeforeUpdate=f}catch(On){ti(y,y.return,On)}}break;case 3:if((f&1024)!==0){if(f=m.stateNode.containerInfo,y=f.nodeType,y===9)WI(f);else if(y===1)switch(f.nodeName){case"HEAD":case"HTML":case"BODY":WI(f);break;default:f.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((f&1024)!==0)throw Error(r(163))}if(f=m.sibling,f!==null){f.return=m.return,va=f;break}va=m.return}}function hq(f,m,y){var C=y.flags;switch(y.tag){case 0:case 11:case 15:bf(f,y),C&4&&qb(5,y);break;case 1:if(bf(f,y),C&4)if(f=y.stateNode,m===null)try{f.componentDidMount()}catch(ee){ti(y,y.return,ee)}else{var I=mg(y.type,m.memoizedProps);m=m.memoizedState;try{f.componentDidUpdate(I,m,f.__reactInternalSnapshotBeforeUpdate)}catch(ee){ti(y,y.return,ee)}}C&64&&oq(y),C&512&&Wb(y,y.return);break;case 3:if(bf(f,y),C&64&&(f=y.updateQueue,f!==null)){if(m=null,y.child!==null)switch(y.child.tag){case 27:case 5:m=y.child.stateNode;break;case 1:m=y.child.stateNode}try{QV(f,m)}catch(ee){ti(y,y.return,ee)}}break;case 27:m===null&&C&4&&dq(y);case 26:case 5:bf(f,y),m===null&&C&4&&cq(y),C&512&&Wb(y,y.return);break;case 12:bf(f,y);break;case 31:bf(f,y),C&4&&gq(f,y);break;case 13:bf(f,y),C&4&&xq(f,y),C&64&&(f=y.memoizedState,f!==null&&(f=f.dehydrated,f!==null&&(y=GCe.bind(null,y),hTe(f,y))));break;case 22:if(C=y.memoizedState!==null||vf,!C){m=m!==null&&m.memoizedState!==null||qs,I=vf;var F=qs;vf=C,(qs=m)&&!F?_f(f,y,(y.subtreeFlags&8772)!==0):bf(f,y),vf=I,qs=F}break;case 30:break;default:bf(f,y)}}function pq(f){var m=f.alternate;m!==null&&(f.alternate=null,pq(m)),f.child=null,f.deletions=null,f.sibling=null,f.tag===5&&(m=f.stateNode,m!==null&&kt(m)),f.stateNode=null,f.return=null,f.dependencies=null,f.memoizedProps=null,f.memoizedState=null,f.pendingProps=null,f.stateNode=null,f.updateQueue=null}var Ki=null,Ko=!1;function yf(f,m,y){for(y=y.child;y!==null;)mq(f,m,y),y=y.sibling}function mq(f,m,y){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(Ct,y)}catch{}switch(y.tag){case 26:qs||id(y,m),yf(f,m,y),y.memoizedState?y.memoizedState.count--:y.stateNode&&(y=y.stateNode,y.parentNode.removeChild(y));break;case 27:qs||id(y,m);var C=Ki,I=Ko;mp(y.type)&&(Ki=y.stateNode,Ko=!1),yf(f,m,y),t_(y.stateNode),Ki=C,Ko=I;break;case 5:qs||id(y,m);case 6:if(C=Ki,I=Ko,Ki=null,yf(f,m,y),Ki=C,Ko=I,Ki!==null)if(Ko)try{(Ki.nodeType===9?Ki.body:Ki.nodeName==="HTML"?Ki.ownerDocument.body:Ki).removeChild(y.stateNode)}catch(F){ti(y,m,F)}else try{Ki.removeChild(y.stateNode)}catch(F){ti(y,m,F)}break;case 18:Ki!==null&&(Ko?(f=Ki,oW(f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f,y.stateNode),pv(f)):oW(Ki,y.stateNode));break;case 4:C=Ki,I=Ko,Ki=y.stateNode.containerInfo,Ko=!0,yf(f,m,y),Ki=C,Ko=I;break;case 0:case 11:case 14:case 15:lp(2,y,m),qs||lp(4,y,m),yf(f,m,y);break;case 1:qs||(id(y,m),C=y.stateNode,typeof C.componentWillUnmount=="function"&&lq(y,m,C)),yf(f,m,y);break;case 21:yf(f,m,y);break;case 22:qs=(C=qs)||y.memoizedState!==null,yf(f,m,y),qs=C;break;default:yf(f,m,y)}}function gq(f,m){if(m.memoizedState===null&&(f=m.alternate,f!==null&&(f=f.memoizedState,f!==null))){f=f.dehydrated;try{pv(f)}catch(y){ti(m,m.return,y)}}}function xq(f,m){if(m.memoizedState===null&&(f=m.alternate,f!==null&&(f=f.memoizedState,f!==null&&(f=f.dehydrated,f!==null))))try{pv(f)}catch(y){ti(m,m.return,y)}}function zCe(f){switch(f.tag){case 31:case 13:case 19:var m=f.stateNode;return m===null&&(m=f.stateNode=new fq),m;case 22:return f=f.stateNode,m=f._retryCache,m===null&&(m=f._retryCache=new fq),m;default:throw Error(r(435,f.tag))}}function eT(f,m){var y=zCe(f);m.forEach(function(C){if(!y.has(C)){y.add(C);var I=KCe.bind(null,f,C);C.then(I,I)}})}function Yo(f,m){var y=m.deletions;if(y!==null)for(var C=0;C<y.length;C++){var I=y[C],F=f,ee=m,de=ee;e:for(;de!==null;){switch(de.tag){case 27:if(mp(de.type)){Ki=de.stateNode,Ko=!1;break e}break;case 5:Ki=de.stateNode,Ko=!1;break e;case 3:case 4:Ki=de.stateNode.containerInfo,Ko=!0;break e}de=de.return}if(Ki===null)throw Error(r(160));mq(F,ee,I),Ki=null,Ko=!1,F=I.alternate,F!==null&&(F.return=null),I.return=null}if(m.subtreeFlags&13886)for(m=m.child;m!==null;)vq(m,f),m=m.sibling}var Yc=null;function vq(f,m){var y=f.alternate,C=f.flags;switch(f.tag){case 0:case 11:case 14:case 15:Yo(m,f),Xo(f),C&4&&(lp(3,f,f.return),qb(3,f),lp(5,f,f.return));break;case 1:Yo(m,f),Xo(f),C&512&&(qs||y===null||id(y,y.return)),C&64&&vf&&(f=f.updateQueue,f!==null&&(C=f.callbacks,C!==null&&(y=f.shared.hiddenCallbacks,f.shared.hiddenCallbacks=y===null?C:y.concat(C))));break;case 26:var I=Yc;if(Yo(m,f),Xo(f),C&512&&(qs||y===null||id(y,y.return)),C&4){var F=y!==null?y.memoizedState:null;if(C=f.memoizedState,y===null)if(C===null)if(f.stateNode===null){e:{C=f.type,y=f.memoizedProps,I=I.ownerDocument||I;t:switch(C){case"title":F=I.getElementsByTagName("title")[0],(!F||F[Ze]||F[pe]||F.namespaceURI==="http://www.w3.org/2000/svg"||F.hasAttribute("itemprop"))&&(F=I.createElement(C),I.head.insertBefore(F,I.querySelector("head > title"))),Da(F,C,y),F[pe]=f,hn(F),C=F;break e;case"link":var ee=vW("link","href",I).get(C+(y.href||""));if(ee){for(var de=0;de<ee.length;de++)if(F=ee[de],F.getAttribute("href")===(y.href==null||y.href===""?null:y.href)&&F.getAttribute("rel")===(y.rel==null?null:y.rel)&&F.getAttribute("title")===(y.title==null?null:y.title)&&F.getAttribute("crossorigin")===(y.crossOrigin==null?null:y.crossOrigin)){ee.splice(de,1);break t}}F=I.createElement(C),Da(F,C,y),I.head.appendChild(F);break;case"meta":if(ee=vW("meta","content",I).get(C+(y.content||""))){for(de=0;de<ee.length;de++)if(F=ee[de],F.getAttribute("content")===(y.content==null?null:""+y.content)&&F.getAttribute("name")===(y.name==null?null:y.name)&&F.getAttribute("property")===(y.property==null?null:y.property)&&F.getAttribute("http-equiv")===(y.httpEquiv==null?null:y.httpEquiv)&&F.getAttribute("charset")===(y.charSet==null?null:y.charSet)){ee.splice(de,1);break t}}F=I.createElement(C),Da(F,C,y),I.head.appendChild(F);break;default:throw Error(r(468,C))}F[pe]=f,hn(F),C=F}f.stateNode=C}else yW(I,f.type,f.stateNode);else f.stateNode=xW(I,C,f.memoizedProps);else F!==C?(F===null?y.stateNode!==null&&(y=y.stateNode,y.parentNode.removeChild(y)):F.count--,C===null?yW(I,f.type,f.stateNode):xW(I,C,f.memoizedProps)):C===null&&f.stateNode!==null&&vI(f,f.memoizedProps,y.memoizedProps)}break;case 27:Yo(m,f),Xo(f),C&512&&(qs||y===null||id(y,y.return)),y!==null&&C&4&&vI(f,f.memoizedProps,y.memoizedProps);break;case 5:if(Yo(m,f),Xo(f),C&512&&(qs||y===null||id(y,y.return)),f.flags&32){I=f.stateNode;try{Fx(I,"")}catch(un){ti(f,f.return,un)}}C&4&&f.stateNode!=null&&(I=f.memoizedProps,vI(f,I,y!==null?y.memoizedProps:I)),C&1024&&(_I=!0);break;case 6:if(Yo(m,f),Xo(f),C&4){if(f.stateNode===null)throw Error(r(162));C=f.memoizedProps,y=f.stateNode;try{y.nodeValue=C}catch(un){ti(f,f.return,un)}}break;case 3:if(gT=null,I=Yc,Yc=pT(m.containerInfo),Yo(m,f),Yc=I,Xo(f),C&4&&y!==null&&y.memoizedState.isDehydrated)try{pv(m.containerInfo)}catch(un){ti(f,f.return,un)}_I&&(_I=!1,yq(f));break;case 4:C=Yc,Yc=pT(f.stateNode.containerInfo),Yo(m,f),Xo(f),Yc=C;break;case 12:Yo(m,f),Xo(f);break;case 31:Yo(m,f),Xo(f),C&4&&(C=f.updateQueue,C!==null&&(f.updateQueue=null,eT(f,C)));break;case 13:Yo(m,f),Xo(f),f.child.flags&8192&&f.memoizedState!==null!=(y!==null&&y.memoizedState!==null)&&(nT=be()),C&4&&(C=f.updateQueue,C!==null&&(f.updateQueue=null,eT(f,C)));break;case 22:I=f.memoizedState!==null;var Pe=y!==null&&y.memoizedState!==null,Ye=vf,ht=qs;if(vf=Ye||I,qs=ht||Pe,Yo(m,f),qs=ht,vf=Ye,Xo(f),C&8192)e:for(m=f.stateNode,m._visibility=I?m._visibility&-2:m._visibility|1,I&&(y===null||Pe||vf||qs||gg(f)),y=null,m=f;;){if(m.tag===5||m.tag===26){if(y===null){Pe=y=m;try{if(F=Pe.stateNode,I)ee=F.style,typeof ee.setProperty=="function"?ee.setProperty("display","none","important"):ee.display="none";else{de=Pe.stateNode;var bt=Pe.memoizedProps.style,Je=bt!=null&&bt.hasOwnProperty("display")?bt.display:null;de.style.display=Je==null||typeof Je=="boolean"?"":(""+Je).trim()}}catch(un){ti(Pe,Pe.return,un)}}}else if(m.tag===6){if(y===null){Pe=m;try{Pe.stateNode.nodeValue=I?"":Pe.memoizedProps}catch(un){ti(Pe,Pe.return,un)}}}else if(m.tag===18){if(y===null){Pe=m;try{var nt=Pe.stateNode;I?lW(nt,!0):lW(Pe.stateNode,!1)}catch(un){ti(Pe,Pe.return,un)}}}else if((m.tag!==22&&m.tag!==23||m.memoizedState===null||m===f)&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===f)break e;for(;m.sibling===null;){if(m.return===null||m.return===f)break e;y===m&&(y=null),m=m.return}y===m&&(y=null),m.sibling.return=m.return,m=m.sibling}C&4&&(C=f.updateQueue,C!==null&&(y=C.retryQueue,y!==null&&(C.retryQueue=null,eT(f,y))));break;case 19:Yo(m,f),Xo(f),C&4&&(C=f.updateQueue,C!==null&&(f.updateQueue=null,eT(f,C)));break;case 30:break;case 21:break;default:Yo(m,f),Xo(f)}}function Xo(f){var m=f.flags;if(m&2){try{for(var y,C=f.return;C!==null;){if(uq(C)){y=C;break}C=C.return}if(y==null)throw Error(r(160));switch(y.tag){case 27:var I=y.stateNode,F=yI(f);JC(f,F,I);break;case 5:var ee=y.stateNode;y.flags&32&&(Fx(ee,""),y.flags&=-33);var de=yI(f);JC(f,de,ee);break;case 3:case 4:var Pe=y.stateNode.containerInfo,Ye=yI(f);bI(f,Ye,Pe);break;default:throw Error(r(161))}}catch(ht){ti(f,f.return,ht)}f.flags&=-3}m&4096&&(f.flags&=-4097)}function yq(f){if(f.subtreeFlags&1024)for(f=f.child;f!==null;){var m=f;yq(m),m.tag===5&&m.flags&1024&&m.stateNode.reset(),f=f.sibling}}function bf(f,m){if(m.subtreeFlags&8772)for(m=m.child;m!==null;)hq(f,m.alternate,m),m=m.sibling}function gg(f){for(f=f.child;f!==null;){var m=f;switch(m.tag){case 0:case 11:case 14:case 15:lp(4,m,m.return),gg(m);break;case 1:id(m,m.return);var y=m.stateNode;typeof y.componentWillUnmount=="function"&&lq(m,m.return,y),gg(m);break;case 27:t_(m.stateNode);case 26:case 5:id(m,m.return),gg(m);break;case 22:m.memoizedState===null&&gg(m);break;case 30:gg(m);break;default:gg(m)}f=f.sibling}}function _f(f,m,y){for(y=y&&(m.subtreeFlags&8772)!==0,m=m.child;m!==null;){var C=m.alternate,I=f,F=m,ee=F.flags;switch(F.tag){case 0:case 11:case 15:_f(I,F,y),qb(4,F);break;case 1:if(_f(I,F,y),C=F,I=C.stateNode,typeof I.componentDidMount=="function")try{I.componentDidMount()}catch(Ye){ti(C,C.return,Ye)}if(C=F,I=C.updateQueue,I!==null){var de=C.stateNode;try{var Pe=I.shared.hiddenCallbacks;if(Pe!==null)for(I.shared.hiddenCallbacks=null,I=0;I<Pe.length;I++)XV(Pe[I],de)}catch(Ye){ti(C,C.return,Ye)}}y&&ee&64&&oq(F),Wb(F,F.return);break;case 27:dq(F);case 26:case 5:_f(I,F,y),y&&C===null&&ee&4&&cq(F),Wb(F,F.return);break;case 12:_f(I,F,y);break;case 31:_f(I,F,y),y&&ee&4&&gq(I,F);break;case 13:_f(I,F,y),y&&ee&4&&xq(I,F);break;case 22:F.memoizedState===null&&_f(I,F,y),Wb(F,F.return);break;case 30:break;default:_f(I,F,y)}m=m.sibling}}function wI(f,m){var y=null;f!==null&&f.memoizedState!==null&&f.memoizedState.cachePool!==null&&(y=f.memoizedState.cachePool.pool),f=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(f=m.memoizedState.cachePool.pool),f!==y&&(f!=null&&f.refCount++,y!=null&&Ib(y))}function SI(f,m){f=null,m.alternate!==null&&(f=m.alternate.memoizedState.cache),m=m.memoizedState.cache,m!==f&&(m.refCount++,f!=null&&Ib(f))}function Xc(f,m,y,C){if(m.subtreeFlags&10256)for(m=m.child;m!==null;)bq(f,m,y,C),m=m.sibling}function bq(f,m,y,C){var I=m.flags;switch(m.tag){case 0:case 11:case 15:Xc(f,m,y,C),I&2048&&qb(9,m);break;case 1:Xc(f,m,y,C);break;case 3:Xc(f,m,y,C),I&2048&&(f=null,m.alternate!==null&&(f=m.alternate.memoizedState.cache),m=m.memoizedState.cache,m!==f&&(m.refCount++,f!=null&&Ib(f)));break;case 12:if(I&2048){Xc(f,m,y,C),f=m.stateNode;try{var F=m.memoizedProps,ee=F.id,de=F.onPostCommit;typeof de=="function"&&de(ee,m.alternate===null?"mount":"update",f.passiveEffectDuration,-0)}catch(Pe){ti(m,m.return,Pe)}}else Xc(f,m,y,C);break;case 31:Xc(f,m,y,C);break;case 13:Xc(f,m,y,C);break;case 23:break;case 22:F=m.stateNode,ee=m.alternate,m.memoizedState!==null?F._visibility&2?Xc(f,m,y,C):Gb(f,m):F._visibility&2?Xc(f,m,y,C):(F._visibility|=2,rv(f,m,y,C,(m.subtreeFlags&10256)!==0||!1)),I&2048&&wI(ee,m);break;case 24:Xc(f,m,y,C),I&2048&&SI(m.alternate,m);break;default:Xc(f,m,y,C)}}function rv(f,m,y,C,I){for(I=I&&((m.subtreeFlags&10256)!==0||!1),m=m.child;m!==null;){var F=f,ee=m,de=y,Pe=C,Ye=ee.flags;switch(ee.tag){case 0:case 11:case 15:rv(F,ee,de,Pe,I),qb(8,ee);break;case 23:break;case 22:var ht=ee.stateNode;ee.memoizedState!==null?ht._visibility&2?rv(F,ee,de,Pe,I):Gb(F,ee):(ht._visibility|=2,rv(F,ee,de,Pe,I)),I&&Ye&2048&&wI(ee.alternate,ee);break;case 24:rv(F,ee,de,Pe,I),I&&Ye&2048&&SI(ee.alternate,ee);break;default:rv(F,ee,de,Pe,I)}m=m.sibling}}function Gb(f,m){if(m.subtreeFlags&10256)for(m=m.child;m!==null;){var y=f,C=m,I=C.flags;switch(C.tag){case 22:Gb(y,C),I&2048&&wI(C.alternate,C);break;case 24:Gb(y,C),I&2048&&SI(C.alternate,C);break;default:Gb(y,C)}m=m.sibling}}var Kb=8192;function iv(f,m,y){if(f.subtreeFlags&Kb)for(f=f.child;f!==null;)_q(f,m,y),f=f.sibling}function _q(f,m,y){switch(f.tag){case 26:iv(f,m,y),f.flags&Kb&&f.memoizedState!==null&&CTe(y,Yc,f.memoizedState,f.memoizedProps);break;case 5:iv(f,m,y);break;case 3:case 4:var C=Yc;Yc=pT(f.stateNode.containerInfo),iv(f,m,y),Yc=C;break;case 22:f.memoizedState===null&&(C=f.alternate,C!==null&&C.memoizedState!==null?(C=Kb,Kb=16777216,iv(f,m,y),Kb=C):iv(f,m,y));break;default:iv(f,m,y)}}function wq(f){var m=f.alternate;if(m!==null&&(f=m.child,f!==null)){m.child=null;do m=f.sibling,f.sibling=null,f=m;while(f!==null)}}function Yb(f){var m=f.deletions;if((f.flags&16)!==0){if(m!==null)for(var y=0;y<m.length;y++){var C=m[y];va=C,Eq(C,f)}wq(f)}if(f.subtreeFlags&10256)for(f=f.child;f!==null;)Sq(f),f=f.sibling}function Sq(f){switch(f.tag){case 0:case 11:case 15:Yb(f),f.flags&2048&&lp(9,f,f.return);break;case 3:Yb(f);break;case 12:Yb(f);break;case 22:var m=f.stateNode;f.memoizedState!==null&&m._visibility&2&&(f.return===null||f.return.tag!==13)?(m._visibility&=-3,tT(f)):Yb(f);break;default:Yb(f)}}function tT(f){var m=f.deletions;if((f.flags&16)!==0){if(m!==null)for(var y=0;y<m.length;y++){var C=m[y];va=C,Eq(C,f)}wq(f)}for(f=f.child;f!==null;){switch(m=f,m.tag){case 0:case 11:case 15:lp(8,m,m.return),tT(m);break;case 22:y=m.stateNode,y._visibility&2&&(y._visibility&=-3,tT(m));break;default:tT(m)}f=f.sibling}}function Eq(f,m){for(;va!==null;){var y=va;switch(y.tag){case 0:case 11:case 15:lp(8,y,m);break;case 23:case 22:if(y.memoizedState!==null&&y.memoizedState.cachePool!==null){var C=y.memoizedState.cachePool.pool;C!=null&&C.refCount++}break;case 24:Ib(y.memoizedState.cache)}if(C=y.child,C!==null)C.return=y,va=C;else e:for(y=f;va!==null;){C=va;var I=C.sibling,F=C.return;if(pq(C),C===y){va=null;break e}if(I!==null){I.return=F,va=I;break e}va=F}}}var $Ce={getCacheForType:function(f){var m=Pa(Us),y=m.data.get(f);return y===void 0&&(y=f(),m.data.set(f,y)),y},cacheSignal:function(){return Pa(Us).controller.signal}},BCe=typeof WeakMap=="function"?WeakMap:Map,Vr=0,Si=null,mr=null,_r=0,ei=0,Tl=null,cp=!1,sv=!1,EI=!1,wf=0,vs=0,up=0,xg=0,CI=0,Al=0,av=0,Xb=null,Qo=null,TI=!1,nT=0,Cq=0,rT=1/0,iT=null,dp=null,la=0,fp=null,ov=null,Sf=0,AI=0,kI=null,Tq=null,Qb=0,NI=null;function kl(){return(Vr&2)!==0&&_r!==0?_r&-_r:K.T!==null?MI():le()}function Aq(){if(Al===0)if((_r&536870912)===0||Tr){var f=ct;ct<<=1,(ct&3932160)===0&&(ct=262144),Al=f}else Al=536870912;return f=El.current,f!==null&&(f.flags|=32),Al}function Zo(f,m,y){(f===Si&&(ei===2||ei===9)||f.cancelPendingCommit!==null)&&(lv(f,0),hp(f,_r,Al,!1)),Nr(f,y),((Vr&2)===0||f!==Si)&&(f===Si&&((Vr&2)===0&&(xg|=y),vs===4&&hp(f,_r,Al,!1)),sd(f))}function kq(f,m,y){if((Vr&6)!==0)throw Error(r(327));var C=!y&&(m&127)===0&&(m&f.expiredLanes)===0||rn(f,m),I=C?HCe(f,m):RI(f,m,!0),F=C;do{if(I===0){sv&&!C&&hp(f,m,0,!1);break}else{if(y=f.current.alternate,F&&!UCe(y)){I=RI(f,m,!1),F=!1;continue}if(I===2){if(F=m,f.errorRecoveryDisabledLanes&F)var ee=0;else ee=f.pendingLanes&-536870913,ee=ee!==0?ee:ee&536870912?536870912:0;if(ee!==0){m=ee;e:{var de=f;I=Xb;var Pe=de.current.memoizedState.isDehydrated;if(Pe&&(lv(de,ee).flags|=256),ee=RI(de,ee,!1),ee!==2){if(EI&&!Pe){de.errorRecoveryDisabledLanes|=F,xg|=F,I=4;break e}F=Qo,Qo=I,F!==null&&(Qo===null?Qo=F:Qo.push.apply(Qo,F))}I=ee}if(F=!1,I!==2)continue}}if(I===1){lv(f,0),hp(f,m,0,!0);break}e:{switch(C=f,F=I,F){case 0:case 1:throw Error(r(345));case 4:if((m&4194048)!==m)break;case 6:hp(C,m,Al,!cp);break e;case 2:Qo=null;break;case 3:case 5:break;default:throw Error(r(329))}if((m&62914560)===m&&(I=nT+300-be(),10<I)){if(hp(C,m,Al,!cp),Zr(C,0,!0)!==0)break e;Sf=m,C.timeoutHandle=sW(Nq.bind(null,C,y,Qo,iT,TI,m,Al,xg,av,cp,F,"Throttled",-0,0),I);break e}Nq(C,y,Qo,iT,TI,m,Al,xg,av,cp,F,null,-0,0)}}break}while(!0);sd(f)}function Nq(f,m,y,C,I,F,ee,de,Pe,Ye,ht,bt,Je,nt){if(f.timeoutHandle=-1,bt=m.subtreeFlags,bt&8192||(bt&16785408)===16785408){bt={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:lf},_q(m,F,bt);var un=(F&62914560)===F?nT-be():(F&4194048)===F?Cq-be():0;if(un=TTe(bt,un),un!==null){Sf=F,f.cancelPendingCommit=un(Fq.bind(null,f,m,F,y,C,I,ee,de,Pe,ht,bt,null,Je,
vendor: 20,035 bytes, line 59
59nt)),hp(f,F,ee,!Ye);return}}Fq(f,m,F,y,C,I,ee,de,Pe)}function UCe(f){for(var m=f;;){var y=m.tag;if((y===0||y===11||y===15)&&m.flags&16384&&(y=m.updateQueue,y!==null&&(y=y.stores,y!==null)))for(var C=0;C<y.length;C++){var I=y[C],F=I.getSnapshot;I=I.value;try{if(!wl(F(),I))return!1}catch{return!1}}if(y=m.child,m.subtreeFlags&16384&&y!==null)y.return=m,m=y;else{if(m===f)break;for(;m.sibling===null;){if(m.return===null||m.return===f)return!0;m=m.return}m.sibling.return=m.return,m=m.sibling}}return!0}function hp(f,m,y,C){m&=~CI,m&=~xg,f.suspendedLanes|=m,f.pingedLanes&=~m,C&&(f.warmLanes|=m),C=f.expirationTimes;for(var I=m;0<I;){var F=31-Ie(I),ee=1<<F;C[F]=-1,I&=~ee}y!==0&&Or(f,y,m)}function sT(){return(Vr&6)===0?(Zb(0),!1):!0}function jI(){if(mr!==null){if(ei===0)var f=mr.return;else f=mr,ff=lg=null,WR(f),Zx=null,Pb=0,f=mr;for(;f!==null;)aq(f.alternate,f),f=f.return;mr=null}}function lv(f,m){var y=f.timeoutHandle;y!==-1&&(f.timeoutHandle=-1,lTe(y)),y=f.cancelPendingCommit,y!==null&&(f.cancelPendingCommit=null,y()),Sf=0,jI(),Si=f,mr=y=uf(f.current,null),_r=m,ei=0,Tl=null,cp=!1,sv=rn(f,m),EI=!1,av=Al=CI=xg=up=vs=0,Qo=Xb=null,TI=!1,(m&8)!==0&&(m|=m&32);var C=f.entangledLanes;if(C!==0)for(f=f.entanglements,C&=m;0<C;){var I=31-Ie(C),F=1<<I;m|=f[I],C&=~F}return wf=m,TC(),y}function jq(f,m){Gn=null,K.H=Ub,m===Qx||m===PC?(m=WV(),ei=3):m===PR?(m=WV(),ei=4):ei=m===lI?8:m!==null&&typeof m=="object"&&typeof m.then=="function"?6:1,Tl=m,mr===null&&(vs=1,KC(f,rc(m,f.current)))}function Rq(){var f=El.current;return f===null?!0:(_r&4194048)===_r?oc===null:(_r&62914560)===_r||(_r&536870912)!==0?f===oc:!1}function Iq(){var f=K.H;return K.H=Ub,f===null?Ub:f}function Oq(){var f=K.A;return K.A=$Ce,f}function aT(){vs=4,cp||(_r&4194048)!==_r&&El.current!==null||(sv=!0),(up&134217727)===0&&(xg&134217727)===0||Si===null||hp(Si,_r,Al,!1)}function RI(f,m,y){var C=Vr;Vr|=2;var I=Iq(),F=Oq();(Si!==f||_r!==m)&&(iT=null,lv(f,m)),m=!1;var ee=vs;e:do try{if(ei!==0&&mr!==null){var de=mr,Pe=Tl;switch(ei){case 8:jI(),ee=6;break e;case 3:case 2:case 9:case 6:El.current===null&&(m=!0);var Ye=ei;if(ei=0,Tl=null,cv(f,de,Pe,Ye),y&&sv){ee=0;break e}break;default:Ye=ei,ei=0,Tl=null,cv(f,de,Pe,Ye)}}VCe(),ee=vs;break}catch(ht){jq(f,ht)}while(!0);return m&&f.shellSuspendCounter++,ff=lg=null,Vr=C,K.H=I,K.A=F,mr===null&&(Si=null,_r=0,TC()),ee}function VCe(){for(;mr!==null;)Pq(mr)}function HCe(f,m){var y=Vr;Vr|=2;var C=Iq(),I=Oq();Si!==f||_r!==m?(iT=null,rT=be()+500,lv(f,m)):sv=rn(f,m);e:do try{if(ei!==0&&mr!==null){m=mr;var F=Tl;t:switch(ei){case 1:ei=0,Tl=null,cv(f,m,F,1);break;case 2:case 9:if(HV(F)){ei=0,Tl=null,Mq(m);break}m=function(){ei!==2&&ei!==9||Si!==f||(ei=7),sd(f)},F.then(m,m);break e;case 3:ei=7;break e;case 4:ei=5;break e;case 7:HV(F)?(ei=0,Tl=null,Mq(m)):(ei=0,Tl=null,cv(f,m,F,7));break;case 5:var ee=null;switch(mr.tag){case 26:ee=mr.memoizedState;case 5:case 27:var de=mr;if(ee?bW(ee):de.stateNode.complete){ei=0,Tl=null;var Pe=de.sibling;if(Pe!==null)mr=Pe;else{var Ye=de.return;Ye!==null?(mr=Ye,oT(Ye)):mr=null}break t}}ei=0,Tl=null,cv(f,m,F,5);break;case 6:ei=0,Tl=null,cv(f,m,F,6);break;case 8:jI(),vs=6;break e;default:throw Error(r(462))}}qCe();break}catch(ht){jq(f,ht)}while(!0);return ff=lg=null,K.H=C,K.A=I,Vr=y,mr!==null?0:(Si=null,_r=0,TC(),vs)}function qCe(){for(;mr!==null&&!Ne();)Pq(mr)}function Pq(f){var m=iq(f.alternate,f,wf);f.memoizedProps=f.pendingProps,m===null?oT(f):mr=m}function Mq(f){var m=f,y=m.alternate;switch(m.tag){case 15:case 0:m=ZH(y,m,m.pendingProps,m.type,void 0,_r);break;case 11:m=ZH(y,m,m.pendingProps,m.type.render,m.ref,_r);break;case 5:WR(m);default:aq(y,m),m=mr=OV(m,wf),m=iq(y,m,wf)}f.memoizedProps=f.pendingProps,m===null?oT(f):mr=m}function cv(f,m,y,C){ff=lg=null,WR(m),Zx=null,Pb=0;var I=m.return;try{if(OCe(f,I,m,y,_r)){vs=1,KC(f,rc(y,f.current)),mr=null;return}}catch(F){if(I!==null)throw mr=I,F;vs=1,KC(f,rc(y,f.current)),mr=null;return}m.flags&32768?(Tr||C===1?f=!0:sv||(_r&536870912)!==0?f=!1:(cp=f=!0,(C===2||C===9||C===3||C===6)&&(C=El.current,C!==null&&C.tag===13&&(C.flags|=16384))),Dq(m,f)):oT(m)}function oT(f){var m=f;do{if((m.flags&32768)!==0){Dq(m,cp);return}f=m.return;var y=DCe(m.alternate,m,wf);if(y!==null){mr=y;return}if(m=m.sibling,m!==null){mr=m;return}mr=m=f}while(m!==null);vs===0&&(vs=5)}function Dq(f,m){do{var y=FCe(f.alternate,f);if(y!==null){y.flags&=32767,mr=y;return}if(y=f.return,y!==null&&(y.flags|=32768,y.subtreeFlags=0,y.deletions=null),!m&&(f=f.sibling,f!==null)){mr=f;return}mr=f=y}while(f!==null);vs=6,mr=null}function Fq(f,m,y,C,I,F,ee,de,Pe){f.cancelPendingCommit=null;do lT();while(la!==0);if((Vr&6)!==0)throw Error(r(327));if(m!==null){if(m===f.current)throw Error(r(177));if(F=m.lanes|m.childLanes,F|=yR,Ns(f,y,F,ee,de,Pe),f===Si&&(mr=Si=null,_r=0),ov=m,fp=f,Sf=y,AI=F,kI=I,Tq=C,(m.subtreeFlags&10256)!==0||(m.flags&10256)!==0?(f.callbackNode=null,f.callbackPriority=0,YCe(oe,function(){return Uq(),null})):(f.callbackNode=null,f.callbackPriority=0),C=(m.flags&13878)!==0,(m.subtreeFlags&13878)!==0||C){C=K.T,K.T=null,I=te.p,te.p=2,ee=Vr,Vr|=4;try{LCe(f,m,y)}finally{Vr=ee,te.p=I,K.T=C}}la=1,Lq(),zq(),$q()}}function Lq(){if(la===1){la=0;var f=fp,m=ov,y=(m.flags&13878)!==0;if((m.subtreeFlags&13878)!==0||y){y=K.T,K.T=null;var C=te.p;te.p=2;var I=Vr;Vr|=4;try{vq(m,f);var F=VI,ee=EV(f.containerInfo),de=F.focusedElem,Pe=F.selectionRange;if(ee!==de&&de&&de.ownerDocument&&SV(de.ownerDocument.documentElement,de)){if(Pe!==null&&pR(de)){var Ye=Pe.start,ht=Pe.end;if(ht===void 0&&(ht=Ye),"selectionStart"in de)de.selectionStart=Ye,de.selectionEnd=Math.min(ht,de.value.length);else{var bt=de.ownerDocument||document,Je=bt&&bt.defaultView||window;if(Je.getSelection){var nt=Je.getSelection(),un=de.textContent.length,On=Math.min(Pe.start,un),xi=Pe.end===void 0?On:Math.min(Pe.end,un);!nt.extend&&On>xi&&(ee=xi,xi=On,On=ee);var Ue=wV(de,On),ze=wV(de,xi);if(Ue&&ze&&(nt.rangeCount!==1||nt.anchorNode!==Ue.node||nt.anchorOffset!==Ue.offset||nt.focusNode!==ze.node||nt.focusOffset!==ze.offset)){var Ke=bt.createRange();Ke.setStart(Ue.node,Ue.offset),nt.removeAllRanges(),On>xi?(nt.addRange(Ke),nt.extend(ze.node,ze.offset)):(Ke.setEnd(ze.node,ze.offset),nt.addRange(Ke))}}}}for(bt=[],nt=de;nt=nt.parentNode;)nt.nodeType===1&&bt.push({element:nt,left:nt.scrollLeft,top:nt.scrollTop});for(typeof de.focus=="function"&&de.focus(),de=0;de<bt.length;de++){var vt=bt[de];vt.element.scrollLeft=vt.left,vt.element.scrollTop=vt.top}}bT=!!UI,VI=UI=null}finally{Vr=I,te.p=C,K.T=y}}f.current=m,la=2}}function zq(){if(la===2){la=0;var f=fp,m=ov,y=(m.flags&8772)!==0;if((m.subtreeFlags&8772)!==0||y){y=K.T,K.T=null;var C=te.p;te.p=2;var I=Vr;Vr|=4;try{hq(f,m.alternate,m)}finally{Vr=I,te.p=C,K.T=y}}la=3}}function $q(){if(la===4||la===3){la=0,De();var f=fp,m=ov,y=Sf,C=Tq;(m.subtreeFlags&10256)!==0||(m.flags&10256)!==0?la=5:(la=0,ov=fp=null,Bq(f,f.pendingLanes));var I=f.pendingLanes;if(I===0&&(dp=null),Gi(y),m=m.stateNode,Wt&&typeof Wt.onCommitFiberRoot=="function")try{Wt.onCommitFiberRoot(Ct,m,void 0,(m.current.flags&128)===128)}catch{}if(C!==null){m=K.T,I=te.p,te.p=2,K.T=null;try{for(var F=f.onRecoverableError,ee=0;ee<C.length;ee++){var de=C[ee];F(de.value,{componentStack:de.stack})}}finally{K.T=m,te.p=I}}(Sf&3)!==0&&lT(),sd(f),I=f.pendingLanes,(y&261930)!==0&&(I&42)!==0?f===NI?Qb++:(Qb=0,NI=f):Qb=0,Zb(0)}}function Bq(f,m){(f.pooledCacheLanes&=m)===0&&(m=f.pooledCache,m!=null&&(f.pooledCache=null,Ib(m)))}function lT(){return Lq(),zq(),$q(),Uq()}function Uq(){if(la!==5)return!1;var f=fp,m=AI;AI=0;var y=Gi(Sf),C=K.T,I=te.p;try{te.p=32>y?32:y,K.T=null,y=kI,kI=null;var F=fp,ee=Sf;if(la=0,ov=fp=null,Sf=0,(Vr&6)!==0)throw Error(r(331));var de=Vr;if(Vr|=4,Sq(F.current),bq(F,F.current,ee,y),Vr=de,Zb(0,!1),Wt&&typeof Wt.onPostCommitFiberRoot=="function")try{Wt.onPostCommitFiberRoot(Ct,F)}catch{}return!0}finally{te.p=I,K.T=C,Bq(f,m)}}function Vq(f,m,y){m=rc(y,m),m=oI(f.stateNode,m,2),f=sp(f,m,2),f!==null&&(Nr(f,2),sd(f))}function ti(f,m,y){if(f.tag===3)Vq(f,f,y);else for(;m!==null;){if(m.tag===3){Vq(m,f,y);break}else if(m.tag===1){var C=m.stateNode;if(typeof m.type.getDerivedStateFromError=="function"||typeof C.componentDidCatch=="function"&&(dp===null||!dp.has(C))){f=rc(y,f),y=HH(2),C=sp(m,y,2),C!==null&&(qH(y,C,m,f),Nr(C,2),sd(C));break}}m=m.return}}function II(f,m,y){var C=f.pingCache;if(C===null){C=f.pingCache=new BCe;var I=new Set;C.set(m,I)}else I=C.get(m),I===void 0&&(I=new Set,C.set(m,I));I.has(y)||(EI=!0,I.add(y),f=WCe.bind(null,f,m,y),m.then(f,f))}function WCe(f,m,y){var C=f.pingCache;C!==null&&C.delete(m),f.pingedLanes|=f.suspendedLanes&y,f.warmLanes&=~y,Si===f&&(_r&y)===y&&(vs===4||vs===3&&(_r&62914560)===_r&&300>be()-nT?(Vr&2)===0&&lv(f,0):CI|=y,av===_r&&(av=0)),sd(f)}function Hq(f,m){m===0&&(m=Hn()),f=sg(f,m),f!==null&&(Nr(f,m),sd(f))}function GCe(f){var m=f.memoizedState,y=0;m!==null&&(y=m.retryLane),Hq(f,y)}function KCe(f,m){var y=0;switch(f.tag){case 31:case 13:var C=f.stateNode,I=f.memoizedState;I!==null&&(y=I.retryLane);break;case 19:C=f.stateNode;break;case 22:C=f.stateNode._retryCache;break;default:throw Error(r(314))}C!==null&&C.delete(m),Hq(f,y)}function YCe(f,m){return ie(f,m)}var cT=null,uv=null,OI=!1,uT=!1,PI=!1,pp=0;function sd(f){f!==uv&&f.next===null&&(uv===null?cT=uv=f:uv=uv.next=f),uT=!0,OI||(OI=!0,QCe())}function Zb(f,m){if(!PI&&uT){PI=!0;do for(var y=!1,C=cT;C!==null;){if(f!==0){var I=C.pendingLanes;if(I===0)var F=0;else{var ee=C.suspendedLanes,de=C.pingedLanes;F=(1<<31-Ie(42|f)+1)-1,F&=I&~(ee&~de),F=F&201326741?F&201326741|1:F?F|2:0}F!==0&&(y=!0,Kq(C,F))}else F=_r,F=Zr(C,C===Si?F:0,C.cancelPendingCommit!==null||C.timeoutHandle!==-1),(F&3)===0||rn(C,F)||(y=!0,Kq(C,F));C=C.next}while(y);PI=!1}}function XCe(){qq()}function qq(){uT=OI=!1;var f=0;pp!==0&&oTe()&&(f=pp);for(var m=be(),y=null,C=cT;C!==null;){var I=C.next,F=Wq(C,m);F===0?(C.next=null,y===null?cT=I:y.next=I,I===null&&(uv=y)):(y=C,(f!==0||(F&3)!==0)&&(uT=!0)),C=I}la!==0&&la!==5||Zb(f),pp!==0&&(pp=0)}function Wq(f,m){for(var y=f.suspendedLanes,C=f.pingedLanes,I=f.expirationTimes,F=f.pendingLanes&-62914561;0<F;){var ee=31-Ie(F),de=1<<ee,Pe=I[ee];Pe===-1?((de&y)===0||(de&C)!==0)&&(I[ee]=_n(de,m)):Pe<=m&&(f.expiredLanes|=de),F&=~de}if(m=Si,y=_r,y=Zr(f,f===m?y:0,f.cancelPendingCommit!==null||f.timeoutHandle!==-1),C=f.callbackNode,y===0||f===m&&(ei===2||ei===9)||f.cancelPendingCommit!==null)return C!==null&&C!==null&&ue(C),f.callbackNode=null,f.callbackPriority=0;if((y&3)===0||rn(f,y)){if(m=y&-y,m===f.callbackPriority)return m;switch(C!==null&&ue(C),Gi(y)){case 2:case 8:y=Le;break;case 32:y=oe;break;case 268435456:y=Ut;break;default:y=oe}return C=Gq.bind(null,f),y=ie(y,C),f.callbackPriority=m,f.callbackNode=y,m}return C!==null&&C!==null&&ue(C),f.callbackPriority=2,f.callbackNode=null,2}function Gq(f,m){if(la!==0&&la!==5)return f.callbackNode=null,f.callbackPriority=0,null;var y=f.callbackNode;if(lT()&&f.callbackNode!==y)return null;var C=_r;return C=Zr(f,f===Si?C:0,f.cancelPendingCommit!==null||f.timeoutHandle!==-1),C===0?null:(kq(f,C,m),Wq(f,be()),f.callbackNode!=null&&f.callbackNode===y?Gq.bind(null,f):null)}function Kq(f,m){if(lT())return null;kq(f,m,!0)}function QCe(){cTe(function(){(Vr&6)!==0?ie(we,XCe):qq()})}function MI(){if(pp===0){var f=Yx;f===0&&(f=Ve,Ve<<=1,(Ve&261888)===0&&(Ve=256)),pp=f}return pp}function Yq(f){return f==null||typeof f=="symbol"||typeof f=="boolean"?null:typeof f=="function"?f:vC(""+f)}function Xq(f,m){var y=m.ownerDocument.createElement("input");return y.name=m.name,y.value=m.value,f.id&&y.setAttribute("form",f.id),m.parentNode.insertBefore(y,m),f=new FormData(f),y.parentNode.removeChild(y),f}function ZCe(f,m,y,C,I){if(m==="submit"&&y&&y.stateNode===I){var F=Yq((I[ye]||null).action),ee=C.submitter;ee&&(m=(m=ee[ye]||null)?Yq(m.formAction):ee.getAttribute("formAction"),m!==null&&(F=m,ee=null));var de=new wC("action","action",null,C,I);f.push({event:de,listeners:[{instance:null,listener:function(){if(C.defaultPrevented){if(pp!==0){var Pe=ee?Xq(I,ee):new FormData(I);tI(y,{pending:!0,data:Pe,method:I.method,action:F},null,Pe)}}else typeof F=="function"&&(de.preventDefault(),Pe=ee?Xq(I,ee):new FormData(I),tI(y,{pending:!0,data:Pe,method:I.method,action:F},F,Pe))},currentTarget:I}]})}}for(var DI=0;DI<vR.length;DI++){var FI=vR[DI],JCe=FI.toLowerCase(),eTe=FI[0].toUpperCase()+FI.slice(1);Kc(JCe,"on"+eTe)}Kc(AV,"onAnimationEnd"),Kc(kV,"onAnimationIteration"),Kc(NV,"onAnimationStart"),Kc("dblclick","onDoubleClick"),Kc("focusin","onFocus"),Kc("focusout","onBlur"),Kc(gCe,"onTransitionRun"),Kc(xCe,"onTransitionStart"),Kc(vCe,"onTransitionCancel"),Kc(jV,"onTransitionEnd"),Ai("onMouseEnter",["mouseout","mouseover"]),Ai("onMouseLeave",["mouseout","mouseover"]),Ai("onPointerEnter",["pointerout","pointerover"]),Ai("onPointerLeave",["pointerout","pointerover"]),In("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),In("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),In("onBeforeInput",["compositionend","keypress","textInput","paste"]),In("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),In("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),In("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Jb="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(" "),tTe=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Jb));function Qq(f,m){m=(m&4)!==0;for(var y=0;y<f.length;y++){var C=f[y],I=C.event;C=C.listeners;e:{var F=void 0;if(m)for(var ee=C.length-1;0<=ee;ee--){var de=C[ee],Pe=de.instance,Ye=de.currentTarget;if(de=de.listener,Pe!==F&&I.isPropagationStopped())break e;F=de,I.currentTarget=Ye;try{F(I)}catch(ht){CC(ht)}I.currentTarget=null,F=Pe}else for(ee=0;ee<C.length;ee++){if(de=C[ee],Pe=de.instance,Ye=de.currentTarget,de=de.listener,Pe!==F&&I.isPropagationStopped())break e;F=de,I.currentTarget=Ye;try{F(I)}catch(ht){CC(ht)}I.currentTarget=null,F=Pe}}}}function gr(f,m){var y=m[Xe];y===void 0&&(y=m[Xe]=new Set);var C=f+"__bubble";y.has(C)||(Zq(m,f,2,!1),y.add(C))}function LI(f,m,y){var C=0;m&&(C|=4),Zq(y,f,C,m)}var dT="_reactListening"+Math.random().toString(36).slice(2);function zI(f){if(!f[dT]){f[dT]=!0,hi.forEach(function(y){y!=="selectionchange"&&(tTe.has(y)||LI(y,!1,f),LI(y,!0,f))});var m=f.nodeType===9?f:f.ownerDocument;m===null||m[dT]||(m[dT]=!0,LI("selectionchange",!1,m))}}function Zq(f,m,y,C){switch(AW(m)){case 2:var I=NTe;break;case 8:I=jTe;break;default:I=eO}y=I.bind(null,m,y,f),I=void 0,!sR||m!=="touchstart"&&m!=="touchmove"&&m!=="wheel"||(I=!0),C?I!==void 0?f.addEventListener(m,y,{capture:!0,passive:I}):f.addEventListener(m,y,!0):I!==void 0?f.addEventListener(m,y,{passive:I}):f.addEventListener(m,y,!1)}function $I(f,m,y,C,I){var F=C;if((m&1)===0&&(m&2)===0&&C!==null)e:for(;;){if(C===null)return;var ee=C.tag;if(ee===3||ee===4){var de=C.stateNode.containerInfo;if(de===I)break;if(ee===4)for(ee=C.return;ee!==null;){var Pe=ee.tag;if((Pe===3||Pe===4)&&ee.stateNode.containerInfo===I)return;ee=ee.return}for(;de!==null;){if(ee=zt(de),ee===null)return;if(Pe=ee.tag,Pe===5||Pe===6||Pe===26||Pe===27){C=F=ee;continue e}de=de.parentNode}}C=C.return}rV(function(){var Ye=F,ht=rR(y),bt=[];e:{var Je=RV.get(f);if(Je!==void 0){var nt=wC,un=f;switch(f){case"keypress":if(bC(y)===0)break e;case"keydown":case"keyup":nt=KEe;break;case"focusin":un="focus",nt=cR;break;case"focusout":un="blur",nt=cR;break;case"beforeblur":case"afterblur":nt=cR;break;case"click":if(y.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":nt=aV;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":nt=DEe;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":nt=QEe;break;case AV:case kV:case NV:nt=zEe;break;case jV:nt=JEe;break;case"scroll":case"scrollend":nt=PEe;break;case"wheel":nt=tCe;break;case"copy":case"cut":case"paste":nt=BEe;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":nt=lV;break;case"toggle":case"beforetoggle":nt=rCe}var On=(m&4)!==0,xi=!On&&(f==="scroll"||f==="scrollend"),Ue=On?Je!==null?Je+"Capture":null:Je;On=[];for(var ze=Ye,Ke;ze!==null;){var vt=ze;if(Ke=vt.stateNode,vt=vt.tag,vt!==5&&vt!==26&&vt!==27||Ke===null||Ue===null||(vt=_b(ze,Ue),vt!=null&&On.push(e_(ze,vt,Ke))),xi)break;ze=ze.return}0<On.length&&(Je=new nt(Je,un,null,y,ht),bt.push({event:Je,listeners:On}))}}if((m&7)===0){e:{if(Je=f==="mouseover"||f==="pointerover",nt=f==="mouseout"||f==="pointerout",Je&&y!==nR&&(un=y.relatedTarget||y.fromElement)&&(zt(un)||un[Ee]))break e;if((nt||Je)&&(Je=ht.window===ht?ht:(Je=ht.ownerDocument)?Je.defaultView||Je.parentWindow:window,nt?(un=y.relatedTarget||y.toElement,nt=Ye,un=un?zt(un):null,un!==null&&(xi=s(un),On=un.tag,un!==xi||On!==5&&On!==27&&On!==6)&&(un=null)):(nt=null,un=Ye),nt!==un)){if(On=aV,vt="onMouseLeave",Ue="onMouseEnter",ze="mouse",(f==="pointerout"||f==="pointerover")&&(On=lV,vt="onPointerLeave",Ue="onPointerEnter",ze="pointer"),xi=nt==null?Je:Ot(nt),Ke=un==null?Je:Ot(un),Je=new On(vt,ze+"leave",nt,y,ht),Je.target=xi,Je.relatedTarget=Ke,vt=null,zt(ht)===Ye&&(On=new On(Ue,ze+"enter",un,y,ht),On.target=Ke,On.relatedTarget=xi,vt=On),xi=vt,nt&&un)t:{for(On=nTe,Ue=nt,ze=un,Ke=0,vt=Ue;vt;vt=On(vt))Ke++;vt=0;for(var An=ze;An;An=On(An))vt++;for(;0<Ke-vt;)Ue=On(Ue),Ke--;for(;0<vt-Ke;)ze=On(ze),vt--;for(;Ke--;){if(Ue===ze||ze!==null&&Ue===ze.alternate){On=Ue;break t}Ue=On(Ue),ze=On(ze)}On=null}else On=null;nt!==null&&Jq(bt,Je,nt,On,!1),un!==null&&xi!==null&&Jq(bt,xi,un,On,!0)}}e:{if(Je=Ye?Ot(Ye):window,nt=Je.nodeName&&Je.nodeName.toLowerCase(),nt==="select"||nt==="input"&&Je.type==="file")var Dr=gV;else if(pV(Je))if(xV)Dr=hCe;else{Dr=dCe;var wn=uCe}else nt=Je.nodeName,!nt||nt.toLowerCase()!=="input"||Je.type!=="checkbox"&&Je.type!=="radio"?Ye&&tR(Ye.elementType)&&(Dr=gV):Dr=fCe;if(Dr&&(Dr=Dr(f,Ye))){mV(bt,Dr,y,ht);break e}wn&&wn(f,Je,Ye),f==="focusout"&&Ye&&Je.type==="number"&&Ye.memoizedProps.value!=null&&eR(Je,"number",Je.value)}switch(wn=Ye?Ot(Ye):window,f){case"focusin":(pV(wn)||wn.contentEditable==="true")&&(Bx=wn,mR=Ye,Nb=null);break;case"focusout":Nb=mR=Bx=null;break;case"mousedown":gR=!0;break;case"contextmenu":case"mouseup":case"dragend":gR=!1,CV(bt,y,ht);break;case"selectionchange":if(mCe)break;case"keydown":case"keyup":CV(bt,y,ht)}var Xn;if(dR)e:{switch(f){case"compositionstart":var wr="onCompositionStart";break e;case"compositionend":wr="onCompositionEnd";break e;case"compositionupdate":wr="onCompositionUpdate";break e}wr=void 0}else $x?fV(f,y)&&(wr="onCompositionEnd"):f==="keydown"&&y.keyCode===229&&(wr="onCompositionStart");wr&&(cV&&y.locale!=="ko"&&($x||wr!=="onCompositionStart"?wr==="onCompositionEnd"&&$x&&(Xn=iV()):(Zh=ht,aR="value"in Zh?Zh.value:Zh.textContent,$x=!0)),wn=fT(Ye,wr),0<wn.length&&(wr=new oV(wr,f,null,y,ht),bt.push({event:wr,listeners:wn}),Xn?wr.data=Xn:(Xn=hV(y),Xn!==null&&(wr.data=Xn)))),(Xn=sCe?aCe(f,y):oCe(f,y))&&(wr=fT(Ye,"onBeforeInput"),0<wr.length&&(wn=new oV("onBeforeInput","beforeinput",null,y,ht),bt.push({event:wn,listeners:wr}),wn.data=Xn)),ZCe(bt,f,Ye,y,ht)}Qq(bt,m)})}function e_(f,m,y){return{instance:f,listener:m,currentTarget:y}}function fT(f,m){for(var y=m+"Capture",C=[];f!==null;){var I=f,F=I.stateNode;if(I=I.tag,I!==5&&I!==26&&I!==27||F===null||(I=_b(f,y),I!=null&&C.unshift(e_(f,I,F)),I=_b(f,m),I!=null&&C.push(e_(f,I,F))),f.tag===3)return C;f=f.return}return[]}function nTe(f){if(f===null)return null;do f=f.return;while(f&&f.tag!==5&&f.tag!==27);return f||null}function Jq(f,m,y,C,I){for(var F=m._reactName,ee=[];y!==null&&y!==C;){var de=y,Pe=de.alternate,Ye=de.stateNode;
vendor: 4,217 bytes, lines 59-60
59if(de=de.tag,Pe!==null&&Pe===C)break;de!==5&&de!==26&&de!==27||Ye===null||(Pe=Ye,I?(Ye=_b(y,F),Ye!=null&&ee.unshift(e_(y,Ye,Pe))):I||(Ye=_b(y,F),Ye!=null&&ee.push(e_(y,Ye,Pe)))),y=y.return}ee.length!==0&&f.push({event:m,listeners:ee})}var rTe=/\r\n?/g,iTe=/\u0000|\uFFFD/g;function eW(f){return(typeof f=="string"?f:""+f).replace(rTe,` 60`).replace(iTe,"")}function tW(f,m){return m=eW(m),eW(f)===m}function gi(f,m,y,C,I,F){switch(y){case"children":typeof C=="string"?m==="body"||m==="textarea"&&C===""||Fx(f,C):(typeof C=="number"||typeof C=="bigint")&&m!=="body"&&Fx(f,""+C);break;case"className":gC(f,"class",C);break;case"tabIndex":gC(f,"tabindex",C);break;case"dir":case"role":case"viewBox":case"width":case"height":gC(f,y,C);break;case"style":tV(f,C,F);break;case"data":if(m!=="object"){gC(f,"data",C);break}case"src":case"href":if(C===""&&(m!=="a"||y!=="href")){f.removeAttribute(y);break}if(C==null||typeof C=="function"||typeof C=="symbol"||typeof C=="boolean"){f.removeAttribute(y);break}C=vC(""+C),f.setAttribute(y,C);break;case"action":case"formAction":if(typeof C=="function"){f.setAttribute(y,"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 F=="function"&&(y==="formAction"?(m!=="input"&&gi(f,m,"name",I.name,I,null),gi(f,m,"formEncType",I.formEncType,I,null),gi(f,m,"formMethod",I.formMethod,I,null),gi(f,m,"formTarget",I.formTarget,I,null)):(gi(f,m,"encType",I.encType,I,null),gi(f,m,"method",I.method,I,null),gi(f,m,"target",I.target,I,null)));if(C==null||typeof C=="symbol"||typeof C=="boolean"){f.removeAttribute(y);break}C=vC(""+C),f.setAttribute(y,C);break;case"onClick":C!=null&&(f.onclick=lf);break;case"onScroll":C!=null&&gr("scroll",f);break;case"onScrollEnd":C!=null&&gr("scrollend",f);break;case"dangerouslySetInnerHTML":if(C!=null){if(typeof C!="object"||!("__html"in C))throw Error(r(61));if(y=C.__html,y!=null){if(I.children!=null)throw Error(r(60));f.innerHTML=y}}break;case"multiple":f.multiple=C&&typeof C!="function"&&typeof C!="symbol";break;case"muted":f.muted=C&&typeof C!="function"&&typeof C!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(C==null||typeof C=="function"||typeof C=="boolean"||typeof C=="symbol"){f.removeAttribute("xlink:href");break}y=vC(""+C),f.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",y);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":C!=null&&typeof C!="function"&&typeof C!="symbol"?f.setAttribute(y,""+C):f.removeAttribute(y);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":C&&typeof C!="function"&&typeof C!="symbol"?f.setAttribute(y,""):f.removeAttribute(y);break;case"capture":case"download":C===!0?f.setAttribute(y,""):C!==!1&&C!=null&&typeof C!="function"&&typeof C!="symbol"?f.setAttribute(y,C):f.removeAttribute(y);break;case"cols":case"rows":case"size":case"span":C!=null&&typeof C!="function"&&typeof C!="symbol"&&!isNaN(C)&&1<=C?f.setAttribute(y,C):f.removeAttribute(y);break;case"rowSpan":case"start":C==null||typeof C=="function"||typeof C=="symbol"||isNaN(C)?f.removeAttribute(y):f.setAttribute(y,C);break;case"popover":gr("beforetoggle",f),gr("toggle",f),Wo(f,"popover",C);break;case"xlinkActuate":of(f,"http://www.w3.org/1999/xlink","xlink:actuate",C);break;case"xlinkArcrole":of(f,"http://www.w3.org/1999/xlink","xlink:arcrole",C);break;case"xlinkRole":of(f,"http://www.w3.org/1999/xlink","xlink:role",C);break;case"xlinkShow":of(f,"http://www.w3.org/1999/xlink","xlink:show",C);break;
vendor: 10,548 bytes, line 60
60case"xlinkTitle":of(f,"http://www.w3.org/1999/xlink","xlink:title",C);break;case"xlinkType":of(f,"http://www.w3.org/1999/xlink","xlink:type",C);break;case"xmlBase":of(f,"http://www.w3.org/XML/1998/namespace","xml:base",C);break;case"xmlLang":of(f,"http://www.w3.org/XML/1998/namespace","xml:lang",C);break;case"xmlSpace":of(f,"http://www.w3.org/XML/1998/namespace","xml:space",C);break;case"is":Wo(f,"is",C);break;case"innerText":case"textContent":break;default:(!(2<y.length)||y[0]!=="o"&&y[0]!=="O"||y[1]!=="n"&&y[1]!=="N")&&(y=IEe.get(y)||y,Wo(f,y,C))}}function BI(f,m,y,C,I,F){switch(y){case"style":tV(f,C,F);break;case"dangerouslySetInnerHTML":if(C!=null){if(typeof C!="object"||!("__html"in C))throw Error(r(61));if(y=C.__html,y!=null){if(I.children!=null)throw Error(r(60));f.innerHTML=y}}break;case"children":typeof C=="string"?Fx(f,C):(typeof C=="number"||typeof C=="bigint")&&Fx(f,""+C);break;case"onScroll":C!=null&&gr("scroll",f);break;case"onScrollEnd":C!=null&&gr("scrollend",f);break;case"onClick":C!=null&&(f.onclick=lf);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!pi.hasOwnProperty(y))e:{if(y[0]==="o"&&y[1]==="n"&&(I=y.endsWith("Capture"),m=y.slice(2,I?y.length-7:void 0),F=f[ye]||null,F=F!=null?F[y]:null,typeof F=="function"&&f.removeEventListener(m,F,I),typeof C=="function")){typeof F!="function"&&F!==null&&(y in f?f[y]=null:f.hasAttribute(y)&&f.removeAttribute(y)),f.addEventListener(m,C,I);break e}y in f?f[y]=C:C===!0?f.setAttribute(y,""):Wo(f,y,C)}}}function Da(f,m,y){switch(m){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":gr("error",f),gr("load",f);var C=!1,I=!1,F;for(F in y)if(y.hasOwnProperty(F)){var ee=y[F];if(ee!=null)switch(F){case"src":C=!0;break;case"srcSet":I=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,m));default:gi(f,m,F,ee,y,null)}}I&&gi(f,m,"srcSet",y.srcSet,y,null),C&&gi(f,m,"src",y.src,y,null);return;case"input":gr("invalid",f);var de=F=ee=I=null,Pe=null,Ye=null;for(C in y)if(y.hasOwnProperty(C)){var ht=y[C];if(ht!=null)switch(C){case"name":I=ht;break;case"type":ee=ht;break;case"checked":Pe=ht;break;case"defaultChecked":Ye=ht;break;case"value":F=ht;break;case"defaultValue":de=ht;break;case"children":case"dangerouslySetInnerHTML":if(ht!=null)throw Error(r(137,m));break;default:gi(f,m,C,ht,y,null)}}QU(f,F,de,Pe,Ye,ee,I,!1);return;case"select":gr("invalid",f),C=ee=F=null;for(I in y)if(y.hasOwnProperty(I)&&(de=y[I],de!=null))switch(I){case"value":F=de;break;case"defaultValue":ee=de;break;case"multiple":C=de;default:gi(f,m,I,de,y,null)}m=F,y=ee,f.multiple=!!C,m!=null?Dx(f,!!C,m,!1):y!=null&&Dx(f,!!C,y,!0);return;case"textarea":gr("invalid",f),F=I=C=null;for(ee in y)if(y.hasOwnProperty(ee)&&(de=y[ee],de!=null))switch(ee){case"value":C=de;break;case"defaultValue":I=de;break;case"children":F=de;break;case"dangerouslySetInnerHTML":if(de!=null)throw Error(r(91));break;default:gi(f,m,ee,de,y,null)}JU(f,C,I,F);return;case"option":for(Pe in y)if(y.hasOwnProperty(Pe)&&(C=y[Pe],C!=null))switch(Pe){case"selected":f.selected=C&&typeof C!="function"&&typeof C!="symbol";break;default:gi(f,m,Pe,C,y,null)}return;case"dialog":gr("beforetoggle",f),gr("toggle",f),gr("cancel",f),gr("close",f);break;case"iframe":case"object":gr("load",f);break;case"video":case"audio":for(C=0;C<Jb.length;C++)gr(Jb[C],f);break;case"image":gr("error",f),gr("load",f);break;case"details":gr("toggle",f);break;case"embed":case"source":case"link":gr("error",f),gr("load",f);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Ye in y)if(y.hasOwnProperty(Ye)&&(C=y[Ye],C!=null))switch(Ye){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,m));default:gi(f,m,Ye,C,y,null)}return;default:if(tR(m)){for(ht in y)y.hasOwnProperty(ht)&&(C=y[ht],C!==void 0&&BI(f,m,ht,C,y,void 0));return}}for(de in y)y.hasOwnProperty(de)&&(C=y[de],C!=null&&gi(f,m,de,C,y,null))}function sTe(f,m,y,C){switch(m){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var I=null,F=null,ee=null,de=null,Pe=null,Ye=null,ht=null;for(nt in y){var bt=y[nt];if(y.hasOwnProperty(nt)&&bt!=null)switch(nt){case"checked":break;case"value":break;case"defaultValue":Pe=bt;default:C.hasOwnProperty(nt)||gi(f,m,nt,null,C,bt)}}for(var Je in C){var nt=C[Je];if(bt=y[Je],C.hasOwnProperty(Je)&&(nt!=null||bt!=null))switch(Je){case"type":F=nt;break;case"name":I=nt;break;case"checked":Ye=nt;break;case"defaultChecked":ht=nt;break;case"value":ee=nt;break;case"defaultValue":de=nt;break;case"children":case"dangerouslySetInnerHTML":if(nt!=null)throw Error(r(137,m));break;default:nt!==bt&&gi(f,m,Je,nt,C,bt)}}J4(f,ee,de,Pe,Ye,ht,F,I);return;case"select":nt=ee=de=Je=null;for(F in y)if(Pe=y[F],y.hasOwnProperty(F)&&Pe!=null)switch(F){case"value":break;case"multiple":nt=Pe;default:C.hasOwnProperty(F)||gi(f,m,F,null,C,Pe)}for(I in C)if(F=C[I],Pe=y[I],C.hasOwnProperty(I)&&(F!=null||Pe!=null))switch(I){case"value":Je=F;break;case"defaultValue":de=F;break;case"multiple":ee=F;default:F!==Pe&&gi(f,m,I,F,C,Pe)}m=de,y=ee,C=nt,Je!=null?Dx(f,!!y,Je,!1):!!C!=!!y&&(m!=null?Dx(f,!!y,m,!0):Dx(f,!!y,y?[]:"",!1));return;case"textarea":nt=Je=null;for(de in y)if(I=y[de],y.hasOwnProperty(de)&&I!=null&&!C.hasOwnProperty(de))switch(de){case"value":break;case"children":break;default:gi(f,m,de,null,C,I)}for(ee in C)if(I=C[ee],F=y[ee],C.hasOwnProperty(ee)&&(I!=null||F!=null))switch(ee){case"value":Je=I;break;case"defaultValue":nt=I;break;case"children":break;case"dangerouslySetInnerHTML":if(I!=null)throw Error(r(91));break;default:I!==F&&gi(f,m,ee,I,C,F)}ZU(f,Je,nt);return;case"option":for(var un in y)if(Je=y[un],y.hasOwnProperty(un)&&Je!=null&&!C.hasOwnProperty(un))switch(un){case"selected":f.selected=!1;break;default:gi(f,m,un,null,C,Je)}for(Pe in C)if(Je=C[Pe],nt=y[Pe],C.hasOwnProperty(Pe)&&Je!==nt&&(Je!=null||nt!=null))switch(Pe){case"selected":f.selected=Je&&typeof Je!="function"&&typeof Je!="symbol";break;default:gi(f,m,Pe,Je,C,nt)}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 On in y)Je=y[On],y.hasOwnProperty(On)&&Je!=null&&!C.hasOwnProperty(On)&&gi(f,m,On,null,C,Je);for(Ye in C)if(Je=C[Ye],nt=y[Ye],C.hasOwnProperty(Ye)&&Je!==nt&&(Je!=null||nt!=null))switch(Ye){case"children":case"dangerouslySetInnerHTML":if(Je!=null)throw Error(r(137,m));break;default:gi(f,m,Ye,Je,C,nt)}return;default:if(tR(m)){for(var xi in y)Je=y[xi],y.hasOwnProperty(xi)&&Je!==void 0&&!C.hasOwnProperty(xi)&&BI(f,m,xi,void 0,C,Je);for(ht in C)Je=C[ht],nt=y[ht],!C.hasOwnProperty(ht)||Je===nt||Je===void 0&&nt===void 0||BI(f,m,ht,Je,C,nt);return}}for(var Ue in y)Je=y[Ue],y.hasOwnProperty(Ue)&&Je!=null&&!C.hasOwnProperty(Ue)&&gi(f,m,Ue,null,C,Je);for(bt in C)Je=C[bt],nt=y[bt],!C.hasOwnProperty(bt)||Je===nt||Je==null&&nt==null||gi(f,m,bt,Je,C,nt)}function nW(f){switch(f){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function aTe(){if(typeof performance.getEntriesByType=="function"){for(var f=0,m=0,y=performance.getEntriesByType("resource"),C=0;C<y.length;C++){var I=y[C],F=I.transferSize,ee=I.initiatorType,de=I.duration;if(F&&de&&nW(ee)){for(ee=0,de=I.responseEnd,C+=1;C<y.length;C++){var Pe=y[C],Ye=Pe.startTime;if(Ye>de)break;var ht=Pe.transferSize,bt=Pe.initiatorType;ht&&nW(bt)&&(Pe=Pe.responseEnd,ee+=ht*(Pe<de?1:(de-Ye)/(Pe-Ye)))}if(--C,m+=8*(F+ee)/(I.duration/1e3),f++,10<f)break}}if(0<f)return m/f/1e6}return navigator.connection&&(f=navigator.connection.downlink,typeof f=="number")?f:5}var UI=null,VI=null;function hT(f){return f.nodeType===9?f:f.ownerDocument}function rW(f){switch(f){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function iW(f,m){if(f===0)switch(m){case"svg":return 1;case"math":return 2;default:return 0}return f===1&&m==="foreignObject"?0:f}function HI(f,m){return f==="textarea"||f==="noscript"||typeof m.children=="string"||typeof m.children=="number"||typeof m.children=="bigint"||typeof m.dangerouslySetInnerHTML=="object"&&m.dangerouslySetInnerHTML!==null&&m.dangerouslySetInnerHTML.__html!=null}var qI=null;function oTe(){var f=window.event;return f&&f.type==="popstate"?f===qI?!1:(qI=f,!0):(qI=null,!1)}var sW=typeof setTimeout=="function"?setTimeout:void 0,lTe=typeof clearTimeout=="function"?clearTimeout:void 0,aW=typeof Promise=="function"?Promise:void 0,cTe=typeof queueMicrotask=="function"?queueMicrotask:typeof aW<"u"?function(f){return aW.resolve(null).then(f).catch(uTe)}:sW;function uTe(f){setTimeout(function(){throw f})}function mp(f){return f==="head"}function oW(f,m){var y=m,C=0;do{var I=y.nextSibling;if(f.removeChild(y),I&&I.nodeType===8)if(y=I.data,y==="/$"||y==="/&"){if(C===0){f.removeChild(I),pv(m);return}C--}else if(y==="$"||y==="$?"||y==="$~"||y==="$!"||y==="&")C++;else if(y==="html")t_(f.ownerDocument.documentElement);else if(y==="head"){y=f.ownerDocument.head,t_(y);for(var F=y.firstChild;F;){var ee=F.nextSibling,de=F.nodeName;F[Ze]||de==="SCRIPT"||de==="STYLE"||de==="LINK"&&F.rel.toLowerCase()==="stylesheet"||y.removeChild(F),F=ee}}else y==="body"&&t_(f.ownerDocument.body);y=I}while(y);pv(m)}function lW(f,m){var y=f;f=0;do{var C=y.nextSibling;if(y.nodeType===1?m?(y._stashedDisplay=y.style.display,y.style.display="none"):(y.style.display=y._stashedDisplay||"",y.getAttribute("style")===""&&y.removeAttribute("style")):y.nodeType===3&&(m?(y._stashedText=y.nodeValue,y.nodeValue=""):y.nodeValue=y._stashedText||""),C&&C.nodeType===8)if(y=C.data,y==="/$"){if(f===0)break;f--}else y!=="$"&&y!=="$?"&&y!=="$~"&&y!=="$!"||f++;y=C}while(y)}function WI(f){var m=f.firstChild;for(m&&m.nodeType===10&&(m=m.nextSibling);m;){var y=m;switch(m=m.nextSibling,y.nodeName){case"HTML":case"HEAD":case"BODY":WI(y),kt(y);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(y.rel.toLowerCase()==="stylesheet")continue}f.removeChild(y)}}function dTe(f,m,y,C){for(;f.nodeType===1;){var I=y;if(f.nodeName.toLowerCase()!==m.toLowerCase()){if(!C&&(f.nodeName!=="INPUT"||f.type!=="hidden"))break}else if(C){if(!f[Ze])switch(m){case"meta":if(!f.hasAttribute("itemprop"))break;return f;case"link":if(F=f.getAttribute("rel"),F==="stylesheet"&&f.hasAttribute("data-precedence"))break;if(F!==I.rel||f.getAttribute("href")!==(I.href==null||I.href===""?null:
vendor: 10,510 bytes, line 60
60I.href)||f.getAttribute("crossorigin")!==(I.crossOrigin==null?null:I.crossOrigin)||f.getAttribute("title")!==(I.title==null?null:I.title))break;return f;case"style":if(f.hasAttribute("data-precedence"))break;return f;case"script":if(F=f.getAttribute("src"),(F!==(I.src==null?null:I.src)||f.getAttribute("type")!==(I.type==null?null:I.type)||f.getAttribute("crossorigin")!==(I.crossOrigin==null?null:I.crossOrigin))&&F&&f.hasAttribute("async")&&!f.hasAttribute("itemprop"))break;return f;default:return f}}else if(m==="input"&&f.type==="hidden"){var F=I.name==null?null:""+I.name;if(I.type==="hidden"&&f.getAttribute("name")===F)return f}else return f;if(f=lc(f.nextSibling),f===null)break}return null}function fTe(f,m,y){if(m==="")return null;for(;f.nodeType!==3;)if((f.nodeType!==1||f.nodeName!=="INPUT"||f.type!=="hidden")&&!y||(f=lc(f.nextSibling),f===null))return null;return f}function cW(f,m){for(;f.nodeType!==8;)if((f.nodeType!==1||f.nodeName!=="INPUT"||f.type!=="hidden")&&!m||(f=lc(f.nextSibling),f===null))return null;return f}function GI(f){return f.data==="$?"||f.data==="$~"}function KI(f){return f.data==="$!"||f.data==="$?"&&f.ownerDocument.readyState!=="loading"}function hTe(f,m){var y=f.ownerDocument;if(f.data==="$~")f._reactRetry=m;else if(f.data!=="$?"||y.readyState!=="loading")m();else{var C=function(){m(),y.removeEventListener("DOMContentLoaded",C)};y.addEventListener("DOMContentLoaded",C),f._reactRetry=C}}function lc(f){for(;f!=null;f=f.nextSibling){var m=f.nodeType;if(m===1||m===3)break;if(m===8){if(m=f.data,m==="$"||m==="$!"||m==="$?"||m==="$~"||m==="&"||m==="F!"||m==="F")break;if(m==="/$"||m==="/&")return null}}return f}var YI=null;function uW(f){f=f.nextSibling;for(var m=0;f;){if(f.nodeType===8){var y=f.data;if(y==="/$"||y==="/&"){if(m===0)return lc(f.nextSibling);m--}else y!=="$"&&y!=="$!"&&y!=="$?"&&y!=="$~"&&y!=="&"||m++}f=f.nextSibling}return null}function dW(f){f=f.previousSibling;for(var m=0;f;){if(f.nodeType===8){var y=f.data;if(y==="$"||y==="$!"||y==="$?"||y==="$~"||y==="&"){if(m===0)return f;m--}else y!=="/$"&&y!=="/&"||m++}f=f.previousSibling}return null}function fW(f,m,y){switch(m=hT(y),f){case"html":if(f=m.documentElement,!f)throw Error(r(452));return f;case"head":if(f=m.head,!f)throw Error(r(453));return f;case"body":if(f=m.body,!f)throw Error(r(454));return f;default:throw Error(r(451))}}function t_(f){for(var m=f.attributes;m.length;)f.removeAttributeNode(m[0]);kt(f)}var cc=new Map,hW=new Set;function pT(f){return typeof f.getRootNode=="function"?f.getRootNode():f.nodeType===9?f:f.ownerDocument}var Ef=te.d;te.d={f:pTe,r:mTe,D:gTe,C:xTe,L:vTe,m:yTe,X:_Te,S:bTe,M:wTe};function pTe(){var f=Ef.f(),m=sT();return f||m}function mTe(f){var m=Xt(f);m!==null&&m.tag===5&&m.type==="form"?jH(m):Ef.r(f)}var dv=typeof document>"u"?null:document;function pW(f,m,y){var C=dv;if(C&&typeof m=="string"&&m){var I=tc(m);I='link[rel="'+f+'"][href="'+I+'"]',typeof y=="string"&&(I+='[crossorigin="'+y+'"]'),hW.has(I)||(hW.add(I),f={rel:f,crossOrigin:y,href:m},C.querySelector(I)===null&&(m=C.createElement("link"),Da(m,"link",f),hn(m),C.head.appendChild(m)))}}function gTe(f){Ef.D(f),pW("dns-prefetch",f,null)}function xTe(f,m){Ef.C(f,m),pW("preconnect",f,m)}function vTe(f,m,y){Ef.L(f,m,y);var C=dv;if(C&&f&&m){var I='link[rel="preload"][as="'+tc(m)+'"]';m==="image"&&y&&y.imageSrcSet?(I+='[imagesrcset="'+tc(y.imageSrcSet)+'"]',typeof y.imageSizes=="string"&&(I+='[imagesizes="'+tc(y.imageSizes)+'"]')):I+='[href="'+tc(f)+'"]';var F=I;switch(m){case"style":F=fv(f);break;case"script":F=hv(f)}cc.has(F)||(f=h({rel:"preload",href:m==="image"&&y&&y.imageSrcSet?void 0:f,as:m},y),cc.set(F,f),C.querySelector(I)!==null||m==="style"&&C.querySelector(n_(F))||m==="script"&&C.querySelector(r_(F))||(m=C.createElement("link"),Da(m,"link",f),hn(m),C.head.appendChild(m)))}}function yTe(f,m){Ef.m(f,m);var y=dv;if(y&&f){var C=m&&typeof m.as=="string"?m.as:"script",I='link[rel="modulepreload"][as="'+tc(C)+'"][href="'+tc(f)+'"]',F=I;switch(C){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":F=hv(f)}if(!cc.has(F)&&(f=h({rel:"modulepreload",href:f},m),cc.set(F,f),y.querySelector(I)===null)){switch(C){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(y.querySelector(r_(F)))return}C=y.createElement("link"),Da(C,"link",f),hn(C),y.head.appendChild(C)}}}function bTe(f,m,y){Ef.S(f,m,y);var C=dv;if(C&&f){var I=Kt(C).hoistableStyles,F=fv(f);m=m||"default";var ee=I.get(F);if(!ee){var de={loading:0,preload:null};if(ee=C.querySelector(n_(F)))de.loading=5;else{f=h({rel:"stylesheet",href:f,"data-precedence":m},y),(y=cc.get(F))&&XI(f,y);var Pe=ee=C.createElement("link");hn(Pe),Da(Pe,"link",f),Pe._p=new Promise(function(Ye,ht){Pe.onload=Ye,Pe.onerror=ht}),Pe.addEventListener("load",function(){de.loading|=1}),Pe.addEventListener("error",function(){de.loading|=2}),de.loading|=4,mT(ee,m,C)}ee={type:"stylesheet",instance:ee,count:1,state:de},I.set(F,ee)}}}function _Te(f,m){Ef.X(f,m);var y=dv;if(y&&f){var C=Kt(y).hoistableScripts,I=hv(f),F=C.get(I);F||(F=y.querySelector(r_(I)),F||(f=h({src:f,async:!0},m),(m=cc.get(I))&&QI(f,m),F=y.createElement("script"),hn(F),Da(F,"link",f),y.head.appendChild(F)),F={type:"script",instance:F,count:1,state:null},C.set(I,F))}}function wTe(f,m){Ef.M(f,m);var y=dv;if(y&&f){var C=Kt(y).hoistableScripts,I=hv(f),F=C.get(I);F||(F=y.querySelector(r_(I)),F||(f=h({src:f,async:!0,type:"module"},m),(m=cc.get(I))&&QI(f,m),F=y.createElement("script"),hn(F),Da(F,"link",f),y.head.appendChild(F)),F={type:"script",instance:F,count:1,state:null},C.set(I,F))}}function mW(f,m,y,C){var I=(I=J.current)?pT(I):null;if(!I)throw Error(r(446));switch(f){case"meta":case"title":return null;case"style":return typeof y.precedence=="string"&&typeof y.href=="string"?(m=fv(y.href),y=Kt(I).hoistableStyles,C=y.get(m),C||(C={type:"style",instance:null,count:0,state:null},y.set(m,C)),C):{type:"void",instance:null,count:0,state:null};case"link":if(y.rel==="stylesheet"&&typeof y.href=="string"&&typeof y.precedence=="string"){f=fv(y.href);var F=Kt(I).hoistableStyles,ee=F.get(f);if(ee||(I=I.ownerDocument||I,ee={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},F.set(f,ee),(F=I.querySelector(n_(f)))&&!F._p&&(ee.instance=F,ee.state.loading=5),cc.has(f)||(y={rel:"preload",as:"style",href:y.href,crossOrigin:y.crossOrigin,integrity:y.integrity,media:y.media,hrefLang:y.hrefLang,referrerPolicy:y.referrerPolicy},cc.set(f,y),F||STe(I,f,y,ee.state))),m&&C===null)throw Error(r(528,""));return ee}if(m&&C!==null)throw Error(r(529,""));return null;case"script":return m=y.async,y=y.src,typeof y=="string"&&m&&typeof m!="function"&&typeof m!="symbol"?(m=hv(y),y=Kt(I).hoistableScripts,C=y.get(m),C||(C={type:"script",instance:null,count:0,state:null},y.set(m,C)),C):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,f))}}function fv(f){return'href="'+tc(f)+'"'}function n_(f){return'link[rel="stylesheet"]['+f+"]"}function gW(f){return h({},f,{"data-precedence":f.precedence,precedence:null})}function STe(f,m,y,C){f.querySelector('link[rel="preload"][as="style"]['+m+"]")?C.loading=1:(m=f.createElement("link"),C.preload=m,m.addEventListener("load",function(){return C.loading|=1}),m.addEventListener("error",function(){return C.loading|=2}),Da(m,"link",y),hn(m),f.head.appendChild(m))}function hv(f){return'[src="'+tc(f)+'"]'}function r_(f){return"script[async]"+f}function xW(f,m,y){if(m.count++,m.instance===null)switch(m.type){case"style":var C=f.querySelector('style[data-href~="'+tc(y.href)+'"]');if(C)return m.instance=C,hn(C),C;var I=h({},y,{"data-href":y.href,"data-precedence":y.precedence,href:null,precedence:null});return C=(f.ownerDocument||f).createElement("style"),hn(C),Da(C,"style",I),mT(C,y.precedence,f),m.instance=C;case"stylesheet":I=fv(y.href);var F=f.querySelector(n_(I));if(F)return m.state.loading|=4,m.instance=F,hn(F),F;C=gW(y),(I=cc.get(I))&&XI(C,I),F=(f.ownerDocument||f).createElement("link"),hn(F);var ee=F;return ee._p=new Promise(function(de,Pe){ee.onload=de,ee.onerror=Pe}),Da(F,"link",C),m.state.loading|=4,mT(F,y.precedence,f),m.instance=F;case"script":return F=hv(y.src),(I=f.querySelector(r_(F)))?(m.instance=I,hn(I),I):(C=y,(I=cc.get(F))&&(C=h({},y),QI(C,I)),f=f.ownerDocument||f,I=f.createElement("script"),hn(I),Da(I,"link",C),f.head.appendChild(I),m.instance=I);case"void":return null;default:throw Error(r(443,m.type))}else m.type==="stylesheet"&&(m.state.loading&4)===0&&(C=m.instance,m.state.loading|=4,mT(C,y.precedence,f));return m.instance}function mT(f,m,y){for(var C=y.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),I=C.length?C[C.length-1]:null,F=I,ee=0;ee<C.length;ee++){var de=C[ee];if(de.dataset.precedence===m)F=de;else if(F!==I)break}F?F.parentNode.insertBefore(f,F.nextSibling):(m=y.nodeType===9?y.head:y,m.insertBefore(f,m.firstChild))}function XI(f,m){f.crossOrigin==null&&(f.crossOrigin=m.crossOrigin),f.referrerPolicy==null&&(f.referrerPolicy=m.referrerPolicy),f.title==null&&(f.title=m.title)}function QI(f,m){f.crossOrigin==null&&(f.crossOrigin=m.crossOrigin),f.referrerPolicy==null&&(f.referrerPolicy=m.referrerPolicy),f.integrity==null&&(f.integrity=m.integrity)}var gT=null;function vW(f,m,y){if(gT===null){var C=new Map,I=gT=new Map;I.set(y,C)}else I=gT,C=I.get(y),C||(C=new Map,I.set(y,C));if(C.has(f))return C;for(C.set(f,null),y=y.getElementsByTagName(f),I=0;I<y.length;I++){var F=y[I];if(!(F[Ze]||F[pe]||f==="link"&&F.getAttribute("rel")==="stylesheet")&&F.namespaceURI!=="http://www.w3.org/2000/svg"){var ee=F.getAttribute(m)||"";ee=f+ee;var de=C.get(ee);de?de.push(F):C.set(ee,[F])}}return C}function yW(f,m,y){f=f.ownerDocument||f,f.head.insertBefore(y,m==="title"?f.querySelector("head > title"):null)}function ETe(f,m,y){if(y===1||m.itemProp!=null)return!1;switch(f){case"meta":case"title":return!0;case"style":if(typeof m.precedence!="string"||typeof m.href!="string"||m.href==="")break;return!0;case"link":if(typeof m.rel!="string"||typeof m.href!="string"||m.href===""||m.onLoad||m.onError)break;switch(m.rel){case"stylesheet":return f=m.disabled,typeof m.precedence=="string"&&f==null;default:return!0}case"script":if(m.async&&typeof m.async!="function"&&typeof m.async!="symbol"&&!m.onLoad&&!m.onError&&m.src&&typeof m.src=="string")return!0}return!1}function bW(f){return!(f.type==="stylesheet"&&(f.state.loading&3)===0)}function CTe(f,m,y,C){if(y.type==="stylesheet"&&(typeof C.media!="str
60ing"||matchMedia(C.media).matches!==!1)&&(y.state.loading&4)===0){if(y.instance===null){var I=fv(C.href),F=m.querySelector(n_(I));if(F){m=F._p,m!==null&&typeof m=="object"&&typeof m.then=="function"&&(f.count++,f=xT.bind(f),m.then(f,f)),y.state.loading|=4,y.instance=F,hn(F);return}F=m.ownerDocument||m,C=gW(C),(I=cc.get(I))&&XI(C,I),F=F.createElement("link"),hn(F);var ee=F;ee._p=new Promise(function(de,Pe){ee.onload=de,ee.onerror=Pe}),Da(F,"link",C),y.instance=F}f.stylesheets===null&&(f.stylesheets=new Map),f.stylesheets.set(y,m),(m=y.state.preload)&&(y.state.loading&3)===0&&(f.count++,y=xT.bind(f),m.addEventListener("load",y),m.addEventListener("error",y))}}var ZI=0;function TTe(f,m){return f.stylesheets&&f.count===0&&yT(f,f.stylesheets),0<f.count||0<f.imgCount?function(y){var C=setTimeout(function(){if(f.stylesheets&&yT(f,f.stylesheets),f.unsuspend){var F=f.unsuspend;f.unsuspend=null,F()}},6e4+m);0<f.imgBytes&&ZI===0&&(ZI=62500*aTe());var I=setTimeout(function(){if(f.waitingForImages=!1,f.count===0&&(f.stylesheets&&yT(f,f.stylesheets),f.unsuspend)){var F=f.unsuspend;f.unsuspend=null,F()}},(f.imgBytes>ZI?50:800)+m);return f.unsuspend=y,function(){f.unsuspend=null,clearTimeout(C),clearTimeout(I)}}:null}function xT(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)yT(this,this.stylesheets);else if(this.unsuspend){var f=this.unsuspend;this.unsuspend=null,f()}}}var vT=null;function yT(f,m){f.stylesheets=null,f.unsuspend!==null&&(f.count++,vT=new Map,m.forEach(ATe,f),vT=null,xT.call(f))}function ATe(f,m){if(!(m.state.loading&4)){var y=vT.get(f);if(y)var C=y.get(null);else{y=new Map,vT.set(f,y);for(var I=f.querySelectorAll("link[data-precedence],style[data-precedence]"),F=0;F<I.length;F++){var ee=I[F];(ee.nodeName==="LINK"||ee.getAttribute("media")!=="not all")&&(y.set(ee.dataset.precedence,ee),C=ee)}C&&y.set(null,C)}I=m.instance,ee=I.getAttribute("data-precedence"),F=y.get(ee)||C,F===C&&y.set(null,I),y.set(ee,I),this.count++,C=xT.bind(this),I.addEventListener("load",C),I.addEventListener("error",C),F?F.parentNode.insertBefore(I,F.nextSibling):(f=f.nodeType===9?f.head:f,f.insertBefore(I,f.firstChild)),m.state.loading|=4}}var i_={$$typeof:E,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function kTe(f,m,y,C,I,F,ee,de,Pe){this.tag=1,this.containerInfo=f,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=Jr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jr(0),this.hiddenUpdates=Jr(null),this.identifierPrefix=C,this.onUncaughtError=I,this.onCaughtError=F,this.onRecoverableError=ee,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Pe,this.incompleteTransitions=new Map}function _W(f,m,y,C,I,F,ee,de,Pe,Ye,ht,bt){return f=new kTe(f,m,y,ee,Pe,Ye,ht,bt,de),m=1,F===!0&&(m|=24),F=Sl(3,null,null,m),f.current=F,F.stateNode=f,m=RR(),m.refCount++,f.pooledCache=m,m.refCount++,F.memoizedState={element:C,isDehydrated:y,cache:m},MR(F),f}function wW(f){return f?(f=Hx,f):Hx}function SW(f,m,y,C,I,F){I=wW(I),C.context===null?C.context=I:C.pendingContext=I,C=ip(m),C.payload={element:y},F=F===void 0?null:F,F!==null&&(C.callback=F),y=sp(f,C,m),y!==null&&(Zo(y,f,m),Db(y,f,m))}function EW(f,m){if(f=f.memoizedState,f!==null&&f.dehydrated!==null){var y=f.retryLane;f.retryLane=y!==0&&y<m?y:m}}function JI(f,m){EW(f,m),(f=f.alternate)&&EW(f,m)}function CW(f){if(f.tag===13||f.tag===31){var m=sg(f,67108864);m!==null&&Zo(m,f,67108864),JI(f,67108864)}}function TW(f){if(f.tag===13||f.tag===31){var m=kl();m=zi(m);var y=sg(f,m);y!==null&&Zo(y,f,m),JI(f,m)}}var bT=!0;function NTe(f,m,y,C){var I=K.T;K.T=null;var F=te.p;try{te.p=2,eO(f,m,y,C)}finally{te.p=F,K.T=I}}function jTe(f,m,y,C){var I=K.T;K.T=null;var F=te.p;try{te.p=8,eO(f,m,y,C)}finally{te.p=F,K.T=I}}function eO(f,m,y,C){if(bT){var I=tO(C);
vendor: 7,345 bytes, line 60
60if(I===null)$I(f,m,C,_T,y),kW(f,C);else if(ITe(I,f,m,y,C))C.stopPropagation();else if(kW(f,C),m&4&&-1<RTe.indexOf(f)){for(;I!==null;){var F=Xt(I);if(F!==null)switch(F.tag){case 3:if(F=F.stateNode,F.current.memoizedState.isDehydrated){var ee=Cn(F.pendingLanes);if(ee!==0){var de=F;for(de.pendingLanes|=2,de.entangledLanes|=2;ee;){var Pe=1<<31-Ie(ee);de.entanglements[1]|=Pe,ee&=~Pe}sd(F),(Vr&6)===0&&(rT=be()+500,Zb(0))}}break;case 31:case 13:de=sg(F,2),de!==null&&Zo(de,F,2),sT(),JI(F,2)}if(F=tO(C),F===null&&$I(f,m,C,_T,y),F===I)break;I=F}I!==null&&C.stopPropagation()}else $I(f,m,C,null,y)}}function tO(f){return f=rR(f),nO(f)}var _T=null;function nO(f){if(_T=null,f=zt(f),f!==null){var m=s(f);if(m===null)f=null;else{var y=m.tag;if(y===13){if(f=a(m),f!==null)return f;f=null}else if(y===31){if(f=o(m),f!==null)return f;f=null}else if(y===3){if(m.stateNode.current.memoizedState.isDehydrated)return m.tag===3?m.stateNode.containerInfo:null;f=null}else m!==f&&(f=null)}}return _T=f,null}function AW(f){switch(f){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"resize":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"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"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(me()){case we:return 2;case Le:return 8;case oe:case St:return 32;case Ut:return 268435456;default:return 32}default:return 32}}var rO=!1,gp=null,xp=null,vp=null,s_=new Map,a_=new Map,yp=[],RTe="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 kW(f,m){switch(f){case"focusin":case"focusout":gp=null;break;case"dragenter":case"dragleave":xp=null;break;case"mouseover":case"mouseout":vp=null;break;case"pointerover":case"pointerout":s_.delete(m.pointerId);break;case"gotpointercapture":case"lostpointercapture":a_.delete(m.pointerId)}}function o_(f,m,y,C,I,F){return f===null||f.nativeEvent!==F?(f={blockedOn:m,domEventName:y,eventSystemFlags:C,nativeEvent:F,targetContainers:[I]},m!==null&&(m=Xt(m),m!==null&&CW(m)),f):(f.eventSystemFlags|=C,m=f.targetContainers,I!==null&&m.indexOf(I)===-1&&m.push(I),f)}function ITe(f,m,y,C,I){switch(m){case"focusin":return gp=o_(gp,f,m,y,C,I),!0;case"dragenter":return xp=o_(xp,f,m,y,C,I),!0;case"mouseover":return vp=o_(vp,f,m,y,C,I),!0;case"pointerover":var F=I.pointerId;return s_.set(F,o_(s_.get(F)||null,f,m,y,C,I)),!0;case"gotpointercapture":return F=I.pointerId,a_.set(F,o_(a_.get(F)||null,f,m,y,C,I)),!0}return!1}function NW(f){var m=zt(f.target);if(m!==null){var y=s(m);if(y!==null){if(m=y.tag,m===13){if(m=a(y),m!==null){f.blockedOn=m,ve(f.priority,function(){TW(y)});return}}else if(m===31){if(m=o(y),m!==null){f.blockedOn=m,ve(f.priority,function(){TW(y)});return}}else if(m===3&&y.stateNode.current.memoizedState.isDehydrated){f.blockedOn=y.tag===3?y.stateNode.containerInfo:null;return}}}f.blockedOn=null}function wT(f){if(f.blockedOn!==null)return!1;for(var m=f.targetContainers;0<m.length;){var y=tO(f.nativeEvent);if(y===null){y=f.nativeEvent;var C=new y.constructor(y.type,y);nR=C,y.target.dispatchEvent(C),nR=null}else return m=Xt(y),m!==null&&CW(m),f.blockedOn=y,!1;m.shift()}return!0}function jW(f,m,y){wT(f)&&y.delete(m)}function OTe(){rO=!1,gp!==null&&wT(gp)&&(gp=null),xp!==null&&wT(xp)&&(xp=null),vp!==null&&wT(vp)&&(vp=null),s_.forEach(jW),a_.forEach(jW)}function ST(f,m){f.blockedOn===m&&(f.blockedOn=null,rO||(rO=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,OTe)))}var ET=null;function RW(f){ET!==f&&(ET=f,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){ET===f&&(ET=null);for(var m=0;m<f.length;m+=3){var y=f[m],C=f[m+1],I=f[m+2];if(typeof C!="function"){if(nO(C||y)===null)continue;break}var F=Xt(y);F!==null&&(f.splice(m,3),m-=3,tI(F,{pending:!0,data:I,method:y.method,action:C},C,I))}}))}function pv(f){function m(Pe){return ST(Pe,f)}gp!==null&&ST(gp,f),xp!==null&&ST(xp,f),vp!==null&&ST(vp,f),s_.forEach(m),a_.forEach(m);for(var y=0;y<yp.length;y++){var C=yp[y];C.blockedOn===f&&(C.blockedOn=null)}for(;0<yp.length&&(y=yp[0],y.blockedOn===null);)NW(y),y.blockedOn===null&&yp.shift();if(y=(f.ownerDocument||f).$$reactFormReplay,y!=null)for(C=0;C<y.length;C+=3){var I=y[C],F=y[C+1],ee=I[ye]||null;if(typeof F=="function")ee||RW(y);else if(ee){var de=null;if(F&&F.hasAttribute("formAction")){if(I=F,ee=F[ye]||null)de=ee.formAction;else if(nO(I)!==null)continue}else de=ee.action;typeof de=="function"?y[C+1]=de:(y.splice(C,3),C-=3),RW(y)}}}function IW(){function f(F){F.canIntercept&&F.info==="react-transition"&&F.intercept({handler:function(){return new Promise(function(ee){return I=ee})},focusReset:"manual",scroll:"manual"})}function m(){I!==null&&(I(),I=null),C||setTimeout(y,20)}function y(){if(!C&&!navigation.transition){var F=navigation.currentEntry;F&&F.url!=null&&navigation.navigate(F.url,{state:F.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var C=!1,I=null;return navigation.addEventListener("navigate",f),navigation.addEventListener("navigatesuccess",m),navigation.addEventListener("navigateerror",m),setTimeout(y,100),function(){C=!0,navigation.removeEventListener("navigate",f),navigation.removeEventListener("navigatesuccess",m),navigation.removeEventListener("navigateerror",m),I!==null&&(I(),I=null)}}}function iO(f){this._internalRoot=f}CT.prototype.render=iO.prototype.render=function(f){var m=this._internalRoot;if(m===null)throw Error(r(409));var y=m.current,C=kl();SW(y,C,f,m,null,null)},CT.prototype.unmount=iO.prototype.unmount=function(){var f=this._internalRoot;if(f!==null){this._internalRoot=null;var m=f.containerInfo;SW(f.current,2,null,f,null,null),sT(),m[Ee]=null}};function CT(f){this._internalRoot=f}CT.prototype.unstable_scheduleHydration=function(f){if(f){var m=le();f={blockedOn:null,target:f,priority:m};for(var y=0;y<yp.length&&m!==0&&m<yp[y].priority;y++);yp.splice(y,0,f),y===0&&NW(f)}};var OW=t.version;if(OW!=="19.2.0")throw Error(r(527,OW,"19.2.0"));te.findDOMNode=function(f){var m=f._reactInternals;if(m===void 0)throw typeof f.render=="function"?Error(r(188)):(f=Object.keys(f).join(","),Error(r(268,f)));return f=u(m),f=f!==null?d(f):null,f=f===null?null:f.stateNode,f};var PTe={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:K,reconcilerVersion:"19.2.0"};
vendor: 27,789 bytes, line 60
60if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var TT=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!TT.isDisabled&&TT.supportsFiber)try{Ct=TT.inject(PTe),Wt=TT}catch{}}return x_.createRoot=function(f,m){if(!i(f))throw Error(r(299));var y=!1,C="",I=$H,F=BH,ee=UH;return m!=null&&(m.unstable_strictMode===!0&&(y=!0),m.identifierPrefix!==void 0&&(C=m.identifierPrefix),m.onUncaughtError!==void 0&&(I=m.onUncaughtError),m.onCaughtError!==void 0&&(F=m.onCaughtError),m.onRecoverableError!==void 0&&(ee=m.onRecoverableError)),m=_W(f,1,!1,null,null,y,C,null,I,F,ee,IW),f[Ee]=m.current,zI(f),new iO(m)},x_.hydrateRoot=function(f,m,y){if(!i(f))throw Error(r(299));var C=!1,I="",F=$H,ee=BH,de=UH,Pe=null;return y!=null&&(y.unstable_strictMode===!0&&(C=!0),y.identifierPrefix!==void 0&&(I=y.identifierPrefix),y.onUncaughtError!==void 0&&(F=y.onUncaughtError),y.onCaughtError!==void 0&&(ee=y.onCaughtError),y.onRecoverableError!==void 0&&(de=y.onRecoverableError),y.formState!==void 0&&(Pe=y.formState)),m=_W(f,1,!0,m,y??null,C,I,Pe,F,ee,de,IW),m.context=wW(null),y=m.current,C=kl(),C=zi(C),I=ip(C),I.callback=null,sp(y,I,C),y=C,m.current.lanes=y,Nr(m,y),sd(m),f[Ee]=m.current,zI(f),new CT(m)},x_.version="19.2.0",x_}var YG;function c3e(){if(YG)return TO.exports;YG=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),TO.exports=l3e(),TO.exports}var u3e=c3e();const d3e=$c(u3e);var rx=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},f3e={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},h3e=class{#e=f3e;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},Xg=new h3e;function p3e(e){setTimeout(e,0)}var _0=typeof window>"u"||"Deno"in globalThis;function uo(){}function m3e(e,t){return typeof e=="function"?e(t):e}function c6(e){return typeof e=="number"&&e>=0&&e!==1/0}function rae(e,t){return Math.max(e+(t||0)-Date.now(),0)}function rm(e,t){return typeof e=="function"?e(t):e}function vc(e,t){return typeof e=="function"?e(t):e}function XG(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:a,stale:o}=e;if(a){if(r){if(t.queryHash!==y9(a,t.options))return!1}else if(!E2(t.queryKey,a))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||i&&i!==t.state.fetchStatus||s&&!s(t))}function QG(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(fm(t.options.mutationKey)!==fm(s))return!1}else if(!E2(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function y9(e,t){return(t?.queryKeyHashFn||fm)(e)}function fm(e){return JSON.stringify(e,(t,n)=>u6(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function E2(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>E2(e[n],t[n])):!1}var g3e=Object.prototype.hasOwnProperty;function b9(e,t){if(e===t)return e;const n=ZG(e)&&ZG(t);if(!n&&!(u6(e)&&u6(t)))return t;const i=(n?e:Object.keys(e)).length,s=n?t:Object.keys(t),a=s.length,o=n?new Array(a):{};let c=0;for(let u=0;u<a;u++){const d=n?u:s[u],h=e[d],p=t[d];if(h===p){o[d]=h,(n?u<i:g3e.call(e,d))&&c++;continue}if(h===null||p===null||typeof h!="object"||typeof p!="object"){o[d]=p;continue}const g=b9(h,p);o[d]=g,g===h&&c++}return i===a&&c===i?e:o}function C2(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function ZG(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function u6(e){if(!JG(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!JG(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function JG(e){return Object.prototype.toString.call(e)==="[object Object]"}function x3e(e){return new Promise(t=>{Xg.setTimeout(t,e)})}function d6(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?b9(e,t):t}function iae(e){return e}function v3e(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function y3e(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Bl=Symbol();function sae(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Bl?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function aae(e,t){return typeof e=="function"?e(...t):!!e}var b3e=class extends rx{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!_0&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},_9=new b3e;function f6(){let e,t;const n=new Promise((i,s)=>{e=i,t=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var _3e=p3e;function w3e(){let e=[],t=0,n=o=>{o()},r=o=>{o()},i=_3e;const s=o=>{t?e.push(o):i(()=>{n(o)})},a=()=>{const o=e;e=[],o.length&&i(()=>{r(()=>{o.forEach(c=>{n(c)})})})};return{batch:o=>{let c;t++;try{c=o()}finally{t--,t||a()}return c},batchCalls:o=>(...c)=>{s(()=>{o(...c)})},schedule:s,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{i=o}}}var Ss=w3e(),S3e=class extends rx{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!_0&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},uN=new S3e;function E3e(e){return Math.min(1e3*2**e,3e4)}function oae(e){return(e??"online")==="online"?uN.isOnline():!0}var h6=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function lae(e){let t=!1,n=0,r;const i=f6(),s=()=>i.status!=="pending",a=x=>{if(!s()){const _=new h6(x);p(_),e.onCancel?.(_)}},o=()=>{t=!0},c=()=>{t=!1},u=()=>_9.isFocused()&&(e.networkMode==="always"||uN.isOnline())&&e.canRun(),d=()=>oae(e.networkMode)&&e.canRun(),h=x=>{s()||(r?.(),i.resolve(x))},p=x=>{s()||(r?.(),i.reject(x))},g=()=>new Promise(x=>{r=_=>{(s()||u())&&x(_)},e.onPause?.()}).then(()=>{r=void 0,s()||e.onContinue?.()}),v=()=>{if(s())return;let x;const _=n===0?e.initialPromise:void 0;try{x=_??e.fn()}catch(w){x=Promise.reject(w)}Promise.resolve(x).then(h).catch(w=>{if(s())return;const S=e.retry??(_0?0:3),E=e.retryDelay??E3e,T=typeof E=="function"?E(n,w):E,N=S===!0||typeof S=="number"&&n<S||typeof S=="function"&&S(n,w);if(t||!N){p(w);return}n++,e.onFail?.(n,w),x3e(T).then(()=>u()?void 0:g()).then(()=>{t?p(w):v()})})};return{promise:i,status:()=>i.status,cancel:a,continue:()=>(r?.(),i),cancelRetry:o,continueRetry:c,canStart:d,start:()=>(d()?v():g().then(v),i)}}var cae=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),c6(this.gcTime)&&(this.#e=Xg.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(_0?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Xg.clearTimeout(this.#e),this.#e=void 0)}},C3e=class extends cae{#e;#t;#n;#i;#r;#s;#o;constructor(e){super(),this.#o=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#n=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=eK(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#s,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=eK(this.options);t.data!==void 0&&(this.setData(t.data,{updatedAt:t.dataUpdatedAt,manual:!0}),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=d6(this.state.data,e,this.options);return this.#a({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#a({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(uo).catch(uo):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>vc(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Bl||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>rm(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!rae(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#o?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#a({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const o=this.observers.find(c=>c.options.queryFn);o&&this.setOptions(o.options)}const n=new AbortController,r=o=>{Object.defineProperty(o,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{const o=sae(this.options,t),u=(()=>{const d={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(d),d})();return this.#o=!1,this.options.persister?this.options.persister(o,u,this):o(u)},a=(()=>{const o={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(o),o})();this.options.behavior?.onFetch(a,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#a({type:"fetch",meta:a.fetchOptions?.meta}),this.#r=lae({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:o=>{o instanceof h6&&o.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(o,c)=>{this.#a({type:"failed",failureCount:o,error:c})},onPause:()=>{this.#a({type:"pause"})},onContinue:()=>{this.#a({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{const o=await this.#r.start();if(o===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(o),this.#n.config.onSuccess?.(o,this),this.#n.config.onSettled?.(o,this.state.error,this),o}catch(o){if(o instanceof h6){if(o.silent)return this.#r.promise;if(o.revert){if(this.state.data===void 0)throw o;return this.state.data}}throw this.#a({type:"error",error:o}),this.#n.config.onError?.(o,this),this.#n.config.onSettled?.(this.state.data,o,this),o}finally{this.scheduleGc()}}#a(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...uae(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?r:void 0,r;case"error":const i=e.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Ss.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function uae(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:oae(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function eK(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var YS=class extends rx{constructor(e,t){super(),this.options=t,this.#e=e,this.#a=null,this.#o=f6(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#i=void 0;#r;#s;#o;#a;#h;#d;#f;#c;#u;#l;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),tK(this.#t,this.options)?this.#p():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return p6(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return p6(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#_(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof vc(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),t._defaulted&&!C2(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&nK(this.#t,n,this.options,t)&&this.#p(),this.updateResult(),r&&(this.#t!==n||vc(this.options.enabled,this.#t)!==vc(t.enabled,this.#t)||rm(this.options.staleTime,this.#t)!==rm(t.staleTime,this.#t))&&this.#g();const i=this.#x();r&&(this.#t!==n||vc(this.options.enabled,this.#t)!==vc(t.enabled,this.#t)||i!==this.#l)&&this.#v(i)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return A3e(this,n)&&(this.#i=n,this.#s=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#i}trackResult(e,t){return new Proxy(e,{get:(n,r)=>(this.trackProp(r),t?.(r),r==="promise"&&!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(n,r))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#p({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#p(e){this.#w();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(uo)),t}#g(){this.#b();const e=rm(this.options.staleTime,this.#t);if(_0||this.#i.isStale||!c6(e))return;const n=rae(this.#i.dataUpdatedAt,e)+1;this.#c=Xg.setTimeout(()=>{this.#i.isStale||this.updateResult()},n)}#x(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#_(),this.#l=e,!(_0||vc(this.options.enabled,this.#t)===!1||!c6(this.#l)||this.#l===0)&&(this.#u=Xg.setInterval(()=>{(this.options.refetchIntervalInBackground||_9.isFocused())&&this.#p()},this.#l))}#y(){this.#g(),this.#v(this.#x())}#b(){this.#c&&(Xg.clearTimeout(this.#c),this.#c=void 0)}#_(){this.#u&&(Xg.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,r=this.options,i=this.#i,s=this.#r,a=this.#s,c=e!==n?e.state:this.#n,{state:u}=e;let d={...u},h=!1,p;if(t._optimisticResults){const j=this.hasListeners(),R=!j&&tK(e,t),P=j&&nK(e,n,t,r);(R||P)&&(d={...d,...uae(u.data,e.options)}),t._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:g,errorUpdatedAt:v,status:x}=d;p=d.data;let _=!1;if(t.placeholderData!==void 0&&p===void 0&&x==="pending"){let j;i?.isPlaceholderData&&t.placeholderData===a?.placeholderData?(j=i.data,_=!0):j=typeof t.placeholderData=="function"?t.placeholderData(this.#f?.state.data,this.#f):t.placeholderData,j!==void 0&&(x="success",p=d6(i?.data,j,t),h=!0)}if(t.select&&p!==void 0&&!_)if(i&&p===s?.data&&t.select===this.#h)p=this.#d;else try{this.#h=t.select,p=t.select(p),p=d6(i?.data,p,t),this.#d=p,this.#a=null}catch(j){this.#a=j}this.#a&&(g=this.#a,p=this.#d,v=Date.now(),x="error");const w=d.fetchStatus==="fetching",S=x==="pending",E=x==="error",T=S&&w,N=p!==void 0,k={status:x,fetchStatus:d.fetchStatus,isPending:S,isSuccess:x==="success",isError:E,isInitialLoading:T,isLoading:T,data:p,dataUpdatedAt:d.dataUpdatedAt,error:g,errorUpdatedAt:v,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:w,isRefetching:w&&!S,isLoadingError:E&&!N,isPaused:d.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:E&&N,isStale:w9(e,t),refetch:this.refetch,promise:this.#o,isEnabled:vc(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const j=V=>{k.status==="error"?V.reject(k.error):k.data!==void 0&&V.resolve(k.data)},R=()=>{const V=this.#o=k.promise=f6();j(V)},P=this.#o;switch(P.status){case"pending":e.queryHash===n.queryHash&&j(P);break;case"fulfilled":(k.status==="error"||k.data!==P.value)&&R();break;case"rejected":(k.status!=="error"||k.error!==P.reason)&&R();break}}return k}updateResult(){const e=this.#i,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#s=this.options,this.#r.data!==void 0&&(this.#f=this.#t),C2(t,e))return;this.#i=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,i=typeof r=="function"?r():r;if(i==="all"||!i&&!this.#m.size)return!0;const s=new Set(i??this.#m);return this.options.throwOnError&&s.add("error"),Object.keys(this.#i).some(a=>{const o=a;return this.#i[o]!==e[o]&&s.has(o)})};this.#S({listeners:n()})}#w(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#S(e){Ss.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function T3e(e,t){return vc(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function tK(e,t){return T3e(e,t)||e.state.data!==void 0&&p6(e,t,t.refetchOnMount)}function p6(e,t,n){if(vc(t.enabled,e)!==!1&&rm(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&w9(e,t)}return!1}function nK(e,t,n,r){return(e!==t||vc(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&w9(e,n)}function w9(e,t){return vc(t.enabled,e)!==!1&&e.isStaleByTime(rm(t.staleTime,e))}function A3e(e,t){return!C2(e.getCurrentResult(),t)}function dN(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,s=t.state.data?.pages||[],a=t.state.data?.pageParams||[];let o={pages:[],pageParams:[]},c=0;const u=async()=>{let d=!1;const h=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(t.signal.aborted?d=!0:t.signal.addEventListener("abort",()=>{d=!0}),t.signal)})},p=sae(t.options,t.fetchOptions),g=async(v,x,_)=>{if(d)return Promise.reject();if(x==null&&v.pages.length)return Promise.resolve(v);const S=(()=>{const A={client:t.client,queryKey:t.queryKey,pageParam:x,direction:_?"backward":"forward",meta:t.options.meta};return h(A),A})(),E=await p(S),{maxPages:T}=t.options,N=_?y3e:v3e;return{pages:N(v.pages,E,T),pageParams:N(v.pageParams,x,T)}};if(i&&s.length){const v=i==="backward",x=v?dae:m6,_={pages:s,pageParams:a},w=x(r,_);o=await g(_,w,v)}else{const v=e??s.length;do{const x=c===0?a[0]??r.initialPageParam:m6(r,o);if(c>0&&x==null)break;o=await g(o,x),c++}while(c<v)}return o};t.options.persister?t.fetchFn=()=>t.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=u}}}function m6(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function dae(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function k3e(e,t){return t?m6(e,t)!=null:!1}function N3e(e,t){return!t||!e.getPreviousPageParam?!1:dae(e,t)!=null}var fae=class extends YS{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:dN()})}getOptimisticResult(e){return e.behavior=dN(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:s,isError:a,isRefetchError:o}=r,c=n.fetchMeta?.fetchMore?.direction,u=a&&c==="forward",d=i&&c==="forward",h=a&&c==="backward",p=i&&c==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:k3e(t,n.data),hasPreviousPage:N3e(t,n.data),isFetchNextPageError:u,isFetchingNextPage:d,isFetchPreviousPageError:h,isFetchingPreviousPage:p,isRefetchError:o&&!u&&!h,isRefetching:s&&!d&&!p}}},j3e=class extends cae{#e;#t;#n;#i;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||hae(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=lae({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(s,a)=>{this.#r({type:"failed",failureCount:s,error:a})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",i=!this.#i.canStart();try{if(r)t();else{this.#r({type:"pending",variables:e,isPaused:i}),await this.#n.config.onMutate?.(e,this,n);const a=await this.options.onMutate?.(e,n);a!==this.state.context&&this.#r({type:"pending",context:a,variables:e,isPaused:i})}const s=await this.#i.start();return await this.#n.config.onSuccess?.(s,e,this.state.context,this,n),await this.options.onSuccess?.(s,e,this.state.context,n),await this.#n.config.onSettled?.(s,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(s,null,e,this.state.context,n),this.#r({type:"success",data:s}),s}catch(s){try{throw await this.#n.config.onError?.(s,e,this.state.context,this,n),await this.options.onError?.(s,e,this.state.context,n),await this.#n.config.onSettled?.(void 0,s,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(void 0,s,e,this.state.context,n),s}finally{this.#r({type:"error",error:s})}}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Ss.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function hae(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var pae=class extends rx{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const r=new j3e({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=DT(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=DT(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=DT(e);if(typeof t=="string"){const r=this.#t.get(t)?.find(i=>i.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=DT(e);return typeof t=="string"?this.#t.get(t)?.find(r=>
vendor: 2,024 bytes, line 60
60r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Ss.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>QG(t,n))}findAll(e={}){return this.getAll().filter(t=>QG(e,t))}notify(e){Ss.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Ss.batch(()=>Promise.all(e.map(t=>t.continue().catch(uo))))}};function DT(e){return e.options.scope?.id}var R3e=class extends rx{#e;#t=void 0;#n;#i;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),C2(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&fm(n.mutationKey)!==fm(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#s(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#s()}mutate(t,n){return this.#i=n,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#r(){const t=this.#n?.state??hae();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#s(t){Ss.batch(()=>{if(this.#i&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};t?.type==="success"?(this.#i.onSuccess?.(t.data,n,r,i),this.#i.onSettled?.(t.data,null,
60n,r,i)):t?.type==="error"&&(this.#i.onError?.(t.error,n,r,i),this.#i.onSettled?.(void 0,t.error,n,r,i))}this.listeners.forEach(n=>{n(this.#t)})})}};function rK(e,t){const n=new Set(t);return e.filter(r=>!n.has(r))}function I3e(e,t,n){const r=e.slice(0);return r[t]=n,r}var O3e=class extends rx{#e;#t;#n;#i;#r;#s;#o;#a;#h=[];constructor(e,t,n){super(),this.#e=e,this.#i=n,this.#n=[],this.#r=[],this.#t=[],this.setQueries(t)}onSubscribe(){this.listeners.size===1&&this.#r.forEach(e=>{e.subscribe(t=>{this.#u(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#r.forEach(e=>{e.destroy()})}setQueries(e,t){this.#n=e,this.#i=t,Ss.batch(()=>{const n=this.#r,r=this.#c(this.#n);this.#h=r,r.forEach(d=>d.observer.setOptions(d.defaultedQueryOptions));const i=r.map(d=>d.observer),s=i.map(d=>d.getCurrentResult()),a=n.length!==i.length,o=i.some((d,h)=>d!==n[h]),c=a||o,u=c?!0:s.some((d,h)=>{const p=this.#t[h];return!p||!C2(d,p)});!c&&!u||(c&&(this.#r=i),this.#t=s,this.hasListeners()&&(c&&(rK(n,i).forEach(d=>{d.destroy()}),rK(i,n).forEach(d=>{d.subscribe(h=>{this.#u(d,h)})})),this.#l()))})}getCurrentResult(){return this.#t}getQueries(){return this.#r.map(e=>e.getCurrentQuery())}getObservers(){return this.#r}getOptimisticResult(e,t){const n=this.#c(e),r=n.map(i=>i.observer.getOptimisticResult(i.defaultedQueryOptions));return[r,i=>this.#f(i??r,t),()=>this.#d(r,n)]}#d(e,t){return t.map((n,r)=>{const i=e[r];return n.defaultedQueryOptions.notifyOnChangeProps?i:n.observer.trackResult(i,s=>{t.forEach(a=>{a.observer.trackProp(s)})})})}#f(e,t){return t?((!this.#s||this.#t!==this.#a||t!==this.#o)&&(this.#o=t,this.#a=this.#t,this.#s=b9(this.#s,t(e))),this.#s):e}#c(e){const t=new Map(this.#r.map(r=>[r.options.queryHash,r])),n=[];return e.forEach(r=>{const i=this.#e.defaultQueryOptions(r),s=t.get(i.queryHash);s?n.push({defaultedQueryOptions:i,observer:s}):n.push({defaultedQueryOptions:i,observer:new YS(this.#e,i)})}),n}#u(e,t){const n=this.#r.indexOf(e);n!==-1&&(this.#t=I3e(this.#t,n,t),this.#l())}#l(){if(this.hasListeners()){const e=this.#s,t=this.#d(this.#t,this.#h),n=this.#f(t,this.#i?.combine);e!==n&&Ss.batch(()=>{this.listeners.forEach(r=>{r(this.#t)})})}}},mae=class extends rx{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,i=t.queryHash??y9(r,t);let s=this.get(i);return s||(s=new C3e({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(s)),s}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Ss.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>XG(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>XG(e,n)):t}notify(e){Ss.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Ss.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ss.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},P3e=class{#e;#t;#n;#i;#r;#s;#o;#a;constructor(e={}){this.#e=e.queryCache||new mae,this.#t=e.mutationCache||new pae,this.#n=e.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#o=_9.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=uN.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#o?.(),this.#o=void 0,this.#a?.(),this.#a=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(rm(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=this.#e.get(r.queryHash)?.state.data,a=m3e(t,s);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}
60setQueriesData(e,t,n){return Ss.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Ss.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Ss.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ss.batch(()=>this.#e.findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(uo).catch(uo)}invalidateQueries(e,t={}){return Ss.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ss.batch(()=>this.#e.findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(uo)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(uo)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(rm(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(uo).catch(uo)}fetchInfiniteQuery(e){return e.behavior=dN(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(uo).catch(uo)}ensureInfiniteQueryData(e){return e.behavior=dN(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return uN.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#i.set(fm(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#i.values()],n={};return t.forEach(r=>{E2(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(fm(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{E2(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=y9(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Bl&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},gae=b.createContext(void 0),ix=e=>{const t=b.useContext(gae);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},M3e=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),l.jsx(gae.Provider,{value:e,children:t})),xae=b.createContext(!1),vae=()=>b.useContext(xae);xae.Provider;function D3e(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var F3e=b.createContext(D3e()),yae=()=>b.useContext(F3e),bae=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},_ae=e=>{b.useEffect(()=>{e.clearReset()},[e])},wae=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||aae(n,[e.error,r])),S9=(e,t)=>t.state.data===void 0,Sae=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Eae=(e,t)=>e.isLoading&&e.isFetching&&!t,g6=(e,t)=>e?.suspense&&t.isPending,fN=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Cae({queries:e,...t},n){const r=ix(n),i=vae(),s=yae(),a=b.useMemo(()=>e.map(x=>{const _=r.defaultQueryOptions(x);return _._optimisticResults=i?"isRestoring":"optimistic",_}),[e,r,i]);a.forEach(x=>{Sae(x),bae(x,s)}),_ae(s);const[o]=b.useState(()=>new O3e(r,a,t)),[c,u,d]=o.getOptimisticResult(a,t.combine),h=!i&&t.subscribed!==!1;b.useSyncExternalStore(b.useCallback(x=>h?o.subscribe(Ss.batchCalls(x)):uo,[o,h]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),b.useEffect(()=>{o.setQueries(a,t)},[a,t,o]);const g=c.some((x,_)=>g6(a[_],x))?c.flatMap((x,_)=>{const w=a[_];if(w){const S=new YS(r,w);if(g6(w,x))return fN(w,S,s);Eae(x,i)&&fN(w,S,s)}return[]}):[];if(g.length>0)throw Promise.all(g);const v=c.find((x,_)=>{const w=a[_];return w&&wae({result:x,errorResetBoundary:s,throwOnError:w.throwOnError,query:r.getQueryCache().get(w.queryHash),suspense:w.suspense})});if(v?.error)throw v.error;return u(d())}function yj(e,t,n){const r=vae(),i=yae(),s=ix(n),a=s.defaultQueryOptions(e);s.getDefaultOptions().queries?._experimental_beforeQuery?.(a),a._optimisticResults=r?"isRestoring":"optimistic",Sae(a),bae(a,i),_ae(i);const o=!s.getQueryCache().get(a.queryHash),[c]=b.useState(()=>new t(s,a)),u=c.getOptimisticResult(a),d=!r&&e.subscribed!==!1;if(b.useSyncExternalStore(b.useCallback(h=>{const p=d?c.subscribe(Ss.batchCalls(h)):uo;return c.updateResult(),p},[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),b.useEffect(()=>{c.setOptions(a)},[a,c]),g6(a,u))throw fN(a,c,i);if(wae({result:u,errorResetBoundary:i,throwOnError:a.throwOnError,query:s.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw u.error;return s.getDefaultOptions().queries?._experimental_afterQuery?.(a,u),a.experimental_prefetchInRender&&!_0&&Eae(u,r)&&(o?fN(a,c,i):s.getQueryCache().get(a.queryHash)?.promise)?.catch(uo).finally(()=>{c.updateResult()}),a.notifyOnChangeProps?u:c.trackResult(u)}function E9(e,t){return yj(e,YS,t)}function L3e(e,t){return yj({...e,enabled:!0,suspense:!0,throwOnError:S9,placeholderData:void 0},YS,t)}function z3e(e,t){return yj({...e,enabled:!0,suspense:!0,throwOnError:S9},fae,t)}function $3e(e,t){return Cae({...e,queries:e.queries.map(n=>({...n,suspense:!0,throwOnError:S9,enabled:!0,placeholderData:void 0}))},t)}function B3e(e,t){const n=ix(t);n.getQueryState(e.queryKey)||n.prefetchQuery(e)}function U3e(e,t){const n=ix(t);n.getQueryState(e.queryKey)||n.prefetchInfiniteQuery(e)}function V3e(e,t){const n=ix(t),[r]=b.useState(()=>new R3e(n,e));b.useEffect(()=>{r.setOptions(e)},[r,e]);const i=b.useSyncExternalStore(b.useCallback(a=>r.subscribe(Ss.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=b.useCallback((a,o)=>{r.mutate(a,o).catch(uo)},[r]);if(i.error&&aae(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}function C9(e,t){return yj(e,fae,t)}const b1=new WeakMap,ok=new WeakMap,hN={current:[]};let jO=!1,Nw=0;const ow=new Set,FT=new Map;function Tae(e){const t=Array.from(e).sort((n,r)=>n instanceof _1&&n.options.deps.includes(r)?1:r instanceof _1&&r.options.deps.includes(n)?-1:0);for(const n of t){if(hN.current.includes(n))continue;hN.current.push(n),n.recompute();const r=ok.get(n);if(r)for(const i of r){const s=b1.get(i);s&&Tae(s)}}}function H3e(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function q3e(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function Aae(e){if(Nw>
600&&!FT.has(e)&&FT.set(e,e.prevState),ow.add(e),!(Nw>0)&&!jO)try{for(jO=!0;ow.size>0;){const t=Array.from(ow);ow.clear();for(const n of t){const r=FT.get(n)??n.prevState;n.prevState=r,H3e(n)}for(const n of t){const r=b1.get(n);r&&(hN.current.push(n),Tae(r))}for(const n of t){const r=b1.get(n);if(r)for(const i of r)q3e(i)}}}finally{jO=!1,hN.current=[],FT.clear()}}function jw(e){Nw++;try{e()}finally{if(Nw--,Nw===0){const t=ow.values().next().value;t&&Aae(t)}}}function W3e(e){return typeof e=="function"}class x6{constructor(t,n){this.listeners=new Set,this.subscribe=r=>{var i,s;this.listeners.add(r);const a=(s=(i=this.options)==null?void 0:i.onSubscribe)==null?void 0:s.call(i,r,this);return()=>{this.listeners.delete(r),a?.()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,r,i;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):W3e(t)?this.state=t(this.prevState):this.state=t,(i=(r=this.options)==null?void 0:r.onUpdate)==null||i.call(r),Aae(this)}}class _1{constructor(t){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{const n=this.options.deps.length,r=new Array(n),i=new Array(n);for(let s=0;s<n;s++){const a=this.options.deps[s];r[s]=a.prevState,i[s]=a.state}return this.lastSeenDepValues=i,{prevDepVals:r,currDepVals:i,prevVal:this.prevState??void 0}},this.recompute=()=>{var n,r;this.prevState=this.state;const i=this.getDepVals();this.state=this.options.fn(i),(r=(n=this.options).onUpdate)==null||r.call(n)},this.checkIfRecalculationNeededDeeply=()=>{for(const s of this.options.deps)s instanceof _1&&s.checkIfRecalculationNeededDeeply();let n=!1;const r=this.lastSeenDepValues,{currDepVals:i}=this.getDepVals();for(let s=0;s<i.length;s++)if(i[s]!==r[s]){n=!0;break}n&&this.recompute()},this.mount=()=>(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(const n of this._subscriptions)n()}),this.subscribe=n=>{var r,i;this.listeners.add(n);const s=(i=(r=this.options).onSubscribe)==null?void 0:i.call(r,n,this);return()=>{this.listeners.delete(n),s?.()}},this.options=t,this.state=t.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(t=this.options.deps){for(const n of t)if(n instanceof _1)n.registerOnGraph(),this.registerOnGraph(n.options.deps);else if(n instanceof x6){let r=b1.get(n);r||(r=new Set,b1.set(n,r)),r.add(this);let i=ok.get(this);i||(i=new Set,ok.set(this,i)),i.add(n)}}unregisterFromGraph(t=this.options.deps){for(const n of t)if(n instanceof _1)this.unregisterFromGraph(n.options.deps);else if(n instanceof x6){const r=b1.get(n);r&&r.delete(this);const i=ok.get(this);i&&i.delete(n)}}}const im="__TSR_index",iK="popstate",sK="beforeunload";function G3e(e){let t=e.getLocation();const n=new Set,r=a=>{t=e.getLocation(),n.forEach(o=>o({location:t,action:a}))},i=a=>{e.notifyOnIndexChange??!0?r(a):t=e.getLocation()},s=async({task:a,navigateOpts:o,...c})=>{if(o?.ignoreBlocker??!1){a();return}const d=e.getBlockers?.()??[],h=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&d.length&&h)for(const p of d){const g=pN(c.path,c.state);if(await p.blockerFn({currentLocation:t,nextLocation:g,action:c.type})){e.onBlocked?.();return}}a()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:a=>(n.add(a),()=>{n.delete(a)}),push:(a,o,c)=>{const u=t.state[im];o=aK(u+1,o),s({task:()=>{e.pushState(a,o),r({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:a,state:o})},replace:(a,o,c)=>{const u=t.state[im];o=aK(u,o),s({task:()=>{e.replaceState(a,o),r({type:"REPLACE"})},navigateOpts:c,type:"REPLACE",path:a,state:o})},go:(a,o)=>{s({task:()=>{e.go(a),i({type:"GO",index:a})},navigateOpts:o,type:"GO"})},back:a=>{s({task:()=>{e.back(a?.ignoreBlocker??!1),i({type:"BACK"})},navigateOpts:a,type:"BACK"})},forward:a=>{s({task:()=>{e.forward(a?.ignoreBlocker??!1),i({type:"FORWARD"})},navigateOpts:a,type:"FORWARD"})},canGoBack:()=>t.state[im]!==0,createHref:a=>e.createHref(a),block:a=>{if(!e.setBlockers)return()=>{};const o=e.getBlockers?.()??[];return e.setBlockers([...o,a]),()=>{const c=e.getBlockers?.()??[];e.setBlockers?.(c.filter(u=>
60u!==a))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function aK(e,t){t||(t={});const n=T9();return{...t,key:n,__TSR_key:n,[im]:e}}function K3e(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let i=[];const s=()=>i,a=j=>i=j,o=(j=>j),c=(()=>pN(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const j=T9();t.history.replaceState({[im]:0,key:j,__TSR_key:j},"")}let u=c(),d,h=!1,p=!1,g=!1,v=!1;const x=()=>u;let _,w;const S=()=>{_&&(k._ignoreSubscribers=!0,(_.isPush?t.history.pushState:t.history.replaceState)(_.state,"",_.href),k._ignoreSubscribers=!1,_=void 0,w=void 0,d=void 0)},E=(j,R,P)=>{const V=o(R);w||(d=u),u=pN(R,P),_={href:V,state:P,isPush:_?.isPush||j==="push"},w||(w=Promise.resolve().then(()=>S()))},T=j=>{u=c(),k.notify({type:j})},N=async()=>{if(p){p=!1;return}const j=c(),R=j.state[im]-u.state[im],P=R===1,V=R===-1,U=!P&&!V||h;h=!1;const G=U?"GO":V?"BACK":"FORWARD",Q=U?{type:"GO",index:R}:{type:V?"BACK":"FORWARD"};if(g)g=!1;else{const Z=s();if(typeof document<"u"&&Z.length){for(const K of Z)if(await K.blockerFn({currentLocation:u,nextLocation:j,action:G})){p=!0,t.history.go(1),k.notify(Q);return}}}u=c(),k.notify(Q)},A=j=>{if(v){v=!1;return}let R=!1;const P=s();if(typeof document<"u"&&P.length)for(const V of P){const U=V.enableBeforeUnload??!0;if(U===!0){R=!0;break}if(typeof U=="function"&&U()===!0){R=!0;break}}if(R)return j.preventDefault(),j.returnValue=""},k=G3e({getLocation:x,getLength:()=>t.history.length,pushState:(j,R)=>E("push",j,R),replaceState:(j,R)=>E("replace",j,R),back:j=>(j&&(g=!0),v=!0,t.history.back()),forward:j=>{j&&(g=!0),v=!0,t.history.forward()},go:j=>{h=!0,t.history.go(j)},createHref:j=>o(j),flush:S,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(sK,A,{capture:!0}),t.removeEventListener(iK,N)},onBlocked:()=>{d&&u!==d&&(u=d)},getBlockers:s,setBlockers:a,notifyOnIndexChange:!1});return t.addEventListener(sK,A,{capture:!0}),t.addEventListener(iK,N),t.history.pushState=function(...j){const R=n.apply(t.history,j);return k._ignoreSubscribers||T("PUSH"),R},t.history.replaceState=function(...j){const R=r.apply(t.history,j);return k._ignoreSubscribers||T("REPLACE"),R},k}function pN(e,t){const n=e.indexOf("#"),r=e.indexOf("?"),i=T9();return{href:e,pathname:e.substring(0,n>0?r>0?Math.min(n,r):n:r>0?r:e.length),hash:n>-1?e.substring(n):"",search:r>-1?e.slice(r,n===-1?void 0:n):"",state:t||{[im]:0,key:i,__TSR_key:i}}}function T9(){return(Math.random()+1).toString(36).substring(7)}function v6(e){return e[e.length-1]}function Y3e(e){return typeof e=="function"}function i0(e,t){return Y3e(e)?e(t):e}const X3e=Object.prototype.hasOwnProperty;function pc(e,t){if(e===t)return e;const n=t,r=cK(e)&&cK(n);if(!r&&!(mN(e)&&mN(n)))return n;const i=r?e:oK(e);if(!i)return n;const s=r?n:oK(n);if(!s)return n;const a=i.length,o=s.length,c=r?new Array(o):{};let u=0;for(let d=0;d<o;d++){const h=r?d:s[d],p=e[h],g=n[h];if(p===g){c[h]=p,(r?d<a:X3e.call(e,h))&&u++;continue}if(p===null||g===null||typeof p!="object"||typeof g!="object"){c[h]=g;continue}const v=pc(p,g);c[h]=v,v===p&&u++}return a===o&&u===a?e:c}function oK(e){const t=[],n=Object.getOwnPropertyNames(e);for(const i of n){if(!Object.prototype.propertyIsEnumerable.call(e,i))return!1;t.push(i)}const r=Object.getOwnPropertySymbols(e);for(const i of r){if(!Object.prototype.propertyIsEnumerable.call(e,i))return!1;t.push(i)}return t}function mN(e){if(!lK(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!lK(n)||!n.hasOwnProperty("isPrototypeOf"))}function lK(e){return Object.prototype.toString.call(e)==="[object Object]"}function cK(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function s0(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!s0(e[r],t[r],n))return!1;return!0}if(mN(e)&&mN(t)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const a in t)if((!r||t[a]!==void 0)&&!s0(e[a],t[a],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(const a in e)e[a]!==void 0&&i++;let s=0;for(const a in t)if((!r||t[a]!==void 0)&&(s++,s>i||!s0(e[a],t[a],n)))return!1;return i===s}return!1}function X1(e){let t,n;const r=new Promise((i,s)=>{t=i,n=s});return r.status="pending",r.resolve=i=>{r.status="resolved",r.value=i,t(i),e?.(i)},r.reject=i=>{r.status="rejected",n(i)},r}function sm(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}var Q3e="Invariant failed";function ph(e,t){if(!e)throw new Error(Q3e)}const Ol="__root__",Ad=0,w0=1,Q1=2,Z1=3;function ah(e){return A9(e.filter(t=>t!==void 0).join("/"))}function A9(e){return e.replace(/\/{2,}/g,"/")}function k9(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function am(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function lk(e){return am(k9(e))}function gN(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function Z3e(e,t,n){return gN(e,n)===gN(t,n)}function J3e(e){const{type:t,value:n}=e;if(t===Ad)return n;const{prefixSegment:r,suffixSegment:i}=e;if(t===w0){const s=n.substring(1);if(r&&i)return`${r}{$${s}}${i}`;if(r)return`${r}{$${s}}`;if(i)return`{$${s}}${i}`}if(t===Z1){const s=n.substring(1);return r&&i?`${r}{-$${s}}${i}`:r?`${r}{-$${s}}`:i?`{-$${s}}${i}`:`{-$${s}}`}
60if(t===Q1){if(r&&i)return`${r}{$}${i}`;if(r)return`${r}{$}`;if(i)return`{$}${i}`}return n}function eje({base:e,to:t,trailingSlash:n="never",parseCache:r}){let i=kae(e,r).slice();const s=bj(t,r);i.length>1&&v6(i)?.value==="/"&&i.pop();for(let c=0,u=s.length;c<u;c++){const d=s[c],h=d.value;h==="/"?c?c===u-1&&i.push(d):i=[d]:h===".."?i.pop():h==="."||i.push(d)}i.length>1&&(v6(i).value==="/"?n==="never"&&i.pop():n==="always"&&i.push({type:Ad,value:"/"}));const a=i.map(J3e);return ah(a)}const kae=(e,t)=>Nae(e,t,!0),bj=(e,t)=>Nae(e,t,!1),Nae=(e,t,n)=>{if(!e)return[];const r=t?.get(e);if(r)return r;const i=aje(e,n);return t?.set(e,i),i},tje=/^\$.{1,}$/,nje=/^(.*?)\{(\$[a-zA-Z_$][a-zA-Z0-9_$]*)\}(.*)$/,rje=/^(.*?)\{-(\$[a-zA-Z_$][a-zA-Z0-9_$]*)\}(.*)$/,ije=/^\$$/,sje=/^(.*?)\{\$\}(.*)$/;function aje(e,t){e=A9(e);const n=[];if(e.slice(0,1)==="/"&&(e=e.substring(1),n.push({type:Ad,value:"/"})),!e)return n;const r=e.split("/").filter(Boolean);return n.push(...r.map(i=>{const s=!t&&i!==Ol&&i.slice(-1)==="_"?i.slice(0,-1):i,a=s.match(sje);if(a){const u=a[1],d=a[2];return{type:Q1,value:"$",prefixSegment:u||void 0,suffixSegment:d||void 0}}const o=s.match(rje);if(o){const u=o[1],d=o[2],h=o[3];return{type:Z1,value:d,prefixSegment:u||void 0,suffixSegment:h||void 0}}const c=s.match(nje);if(c){const u=c[1],d=c[2],h=c[3];return{type:w0,value:""+d,prefixSegment:u||void 0,suffixSegment:h||void 0}}if(tje.test(s)){const u=s.substring(1);return{type:w0,value:"$"+u,prefixSegment:void 0,suffixSegment:void 0}}return ije.test(s)?{type:Q1,value:"$",prefixSegment:void 0,suffixSegment:void 0}:{type:Ad,value:s.includes("%25")?s.split("%25").map(u=>decodeURI(u)).join("%25"):decodeURI(s)}})),e.slice(-1)==="/"&&(e=e.substring(1),n.push({type:Ad,value:"/"})),n}function LT({path:e,params:t,leaveWildcards:n,leaveParams:r,decodeCharMap:i,parseCache:s}){const a=bj(e,s);function o(h){const p=t[h],g=typeof p=="string";return h==="*"||h==="_splat"?g?encodeURI(p):p:g?oje(p,i):p}let c=!1;const u={},d=ah(a.map(h=>{if(h.type===Ad)return h.value;if(h.type===Q1){u._splat=t._splat,u["*"]=t._splat;const p=h.prefixSegment||"",g=h.suffixSegment||"";if(!("_splat"in t))return c=!0,n?`${p}${h.value}${g}`:p||g?`${p}${g}`:void 0;const v=o("_splat");return n?`${p}${h.value}${v??""}${g}`:`${p}${v}${g}`}if(h.type===w0){const p=h.value.substring(1);!c&&!(p in t)&&(c=!0),u[p]=t[p];const g=h.prefixSegment||"",v=h.suffixSegment||"";if(r){const x=o(h.value);return`${g}${h.value}${x??""}${v}`}return`${g}${o(p)??"undefined"}${v}`}if(h.type===Z1){const p=h.value.substring(1),g=h.prefixSegment||"",v=h.suffixSegment||"";if(!(p in t)||t[p]==null)return n?`${g}${p}${v}`:g||v?`${g}${v}`:void 0;if(u[p]=t[p],r){const x=o(h.value);return`${g}${h.value}${x??""}${v}`}return n?`${g}${p}${o(p)??""}${v}`:`${g}${o(p)??""}${v}`}return h.value}));return{usedParams:u,interpolatedPath:d,isMissingParams:c}}function oje(e,t){let n=encodeURIComponent(e);if(t)for(const[r,i]of t)n=n.replaceAll(r,i);return n}function y6(e,t,n){const r=lje(e,t,n);if(!(t.to&&!r))return r??{}}function lje(e,{to:t,fuzzy:n,caseSensitive:r},i){const s=t,a=kae(e.startsWith("/")?e:`/${e}`,i),o=bj(s.startsWith("/")?s:`/${s}`,i),c={};
60return cje(a,o,c,n,r)?c:void 0}function cje(e,t,n,r,i){let s=0,a=0;for(;s<e.length||a<t.length;){const o=e[s],c=t[a];if(c){if(c.type===Q1){const u=e.slice(s);let d;if(c.prefixSegment||c.suffixSegment){if(!o)return!1;const h=c.prefixSegment||"",p=c.suffixSegment||"",g=o.value;if("prefixSegment"in c&&!g.startsWith(h)||"suffixSegment"in c&&!e[e.length-1]?.value.endsWith(p))return!1;let v=decodeURI(ah(u.map(x=>x.value)));h&&v.startsWith(h)&&(v=v.slice(h.length)),p&&v.endsWith(p)&&(v=v.slice(0,v.length-p.length)),d=v}else d=decodeURI(ah(u.map(h=>h.value)));return n["*"]=d,n._splat=d,!0}if(c.type===Ad){if(c.value==="/"&&!o?.value){a++;continue}if(o){if(i){if(c.value!==o.value)return!1}else if(c.value.toLowerCase()!==o.value.toLowerCase())return!1;s++,a++;continue}else return!1}if(c.type===w0){if(!o||o.value==="/")return!1;let u="",d=!1;if(c.prefixSegment||c.suffixSegment){const h=c.prefixSegment||"",p=c.suffixSegment||"",g=o.value;if(h&&!g.startsWith(h)||p&&!g.endsWith(p))return!1;let v=g;h&&v.startsWith(h)&&(v=v.slice(h.length)),p&&v.endsWith(p)&&(v=v.slice(0,v.length-p.length)),u=decodeURIComponent(v),d=!0}else u=decodeURIComponent(o.value),d=!0;d&&(n[c.value.substring(1)]=u,s++),a++;continue}if(c.type===Z1){if(!o){a++;continue}if(o.value==="/"){a++;continue}let u="",d=!1;if(c.prefixSegment||c.suffixSegment){const h=c.prefixSegment||"",p=c.suffixSegment||"",g=o.value;if((!h||g.startsWith(h))&&(!p||g.endsWith(p))){let v=g;h&&v.startsWith(h)&&(v=v.slice(h.length)),p&&v.endsWith(p)&&(v=v.slice(0,v.length-p.length)),u=decodeURIComponent(v),d=!0}}else{let h=!0;for(let p=a+1;p<t.length;p++){const g=t[p];if(g?.type===Ad&&g.value===o.value){h=!1;break}if(g?.type===w0||g?.type===Q1){e.length<t.length&&(h=!1);break}}h&&(u=decodeURIComponent(o.value),d=!0)}d&&(n[c.value.substring(1)]=u,s++),a++;continue}}if(s<e.length&&a>=t.length)return n["**"]=ah(e.slice(s).map(u=>u.value)),!!r&&t[t.length-1]?.value!=="/";if(a<t.length&&s>=e.length){for(let u=a;u<t.length;u++)if(t[u]?.type!==Z1)return!1;break}break}return!0}const uje=.75,dje=1,fje=.5,hje=.4,pje=.25,mje=.2,gje=.05,xje=.02,vje=.01,uK=2e-4,dK=1e-4;function fK(e,t){return e.prefixSegment&&e.suffixSegment?t+gje+uK*e.prefixSegment.length+dK*e.suffixSegment.length:e.prefixSegment?t+xje+uK*e.prefixSegment.length:e.suffixSegment?t+vje+dK*e.suffixSegment.length:t}function yje(e){const t=[];return e.forEach((r,i)=>{if(r.isRoot||!r.path)return;const s=k9(r.fullPath);let a=bj(s),o=0;for(;a.length>o+1&&a[o]?.value==="/";)o++;o>0&&(a=a.slice(o));let c=0,u=!1;const d=a.map((h,p)=>{if(h.value==="/")return uje;if(h.type===Ad)return dje;let g;h.type===w0?g=fje:h.type===Z1?(g=hje,c++):g=pje;for(let v=p+1;v<a.length;v++){const x=a[v];if(x.type===Ad&&x.value!=="/")return u=!0,fK(h,g+mje)}return fK(h,g)});t.push({child:r,trimmed:s,parsed:a,index:i,scores:d,optionalParamCount:c,hasStaticAfter:u})}),t.sort((r,i)=>{const s=Math.min(r.scores.length,i.scores.length);for(let a=0;a<s;a++)if(r.scores[a]!==i.scores[a])return i.scores[a]-r.scores[a];if(r.scores.length!==i.scores.length){if(r.optionalParamCount!==i.optionalParamCount){if(r.hasStaticAfter===i.hasStaticAfter)return r.optionalParamCount-i.optionalParamCount;if(r.hasStaticAfter&&!i.hasStaticAfter)return-1;if(!r.hasStaticAfter&&i.hasStaticAfter)return 1}return i.scores.length-r.scores.length}for(let a=0;a<s;a++)if(r.parsed[a].value!==i.parsed[a].value)return r.parsed[a].value>i.parsed[a].value?1:-1;return r.index-i.index}).map((r,i)=>(r.child.rank=i,r.child))}function bje({routeTree:e,initRoute:t}){const n={},r={},i=a=>{a.forEach((o,c)=>{t?.(o,c);const u=n[o.id];if(ph(!u,`Duplicate routes found with id: ${String(o.id)}`),n[o.id]=o,!o.isRoot&&o.path){const h=am(o.fullPath);(!r[h]||o.fullPath.endsWith("/"))&&(r[h]=o)}const d=o.children;d?.length&&i(d)})};i([e]);const s=yje(Object.values(n));return{routesById:n,routesByPath:r,flatRoutes:s}}function Ld(e){return!!e?.isNotFound}function _je(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const xN="tsr-scroll-restoration-v1_3",wje=(e,t)=>{let n;return(...r)=>{n||(n=setTimeout(()=>{e(...r),n=null},t))}};function Sje(){const e=_je();if(!e)return null;const t=e.getItem(xN);let n=t?JSON.parse(t):{};return{state:n,set:r=>(n=i0(r,n)||n,e.setItem(xN,JSON.stringify(n)))}}const zT=Sje(),b6=e=>e.state.__TSR_key||e.href;function Eje(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let vN=!1;function jae({storageKey:e,key:t,behavior:n,shouldScrollRestoration:r,scrollToTopSelectors:i,location:s}){let a;try{a=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(u){console.error(u);return}const o=t||window.history.state?.__TSR_key,c=a[o];vN=!0;e:{if(r&&c&&Object.keys(c).length>0){for(const h in c){const p=c[h];if(h==="window")window.scrollTo({top:p.scrollY,left:p.scrollX,behavior:n});else if(h){const g=document.querySelector(h);g&&(g.scrollLeft=p.scrollX,g.scrollTop=p.scrollY)}}break e}const u=(s??window.location).hash.split("#",2)[1];if(u){const h=window.history.state?.__hashScrollIntoViewOptions??!0;if(h){const p=document.getElementById(u);p&&p.scrollIntoView(h)}break e}const d={top:0,left:0,behavior:n};if(window.scrollTo(d),i)for(const h of i){if(h==="window")continue;const p=typeof h=="function"?h():document.querySelector(h);p&&p.scrollTo(d)}}vN=!1}function Cje(e,t){if(!zT&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!zT))return;e.isScrollRestorationSetup=!0,vN=!1;const r=e.options.getScrollRestorationKey||b6;window.history.scrollRestoration="manual";const i=s=>{if(vN||!e.isScrollRestoring)return;let a="";if(s.target===document||s.target===window)a="window";else{const c=s.target.getAttribute("data-scroll-restoration-id");c?a=`[data-scroll-restoration-id="${c}"]`:a=Eje(s.target)}const o=r(e.state.location);zT.set(c=>{const u=c[o]||={},d=u[a]||={};if(a==="window")d.scrollX=window.scrollX||0,d.scrollY=window.scrollY||0;else if(a){const h=document.querySelector(a);
60h&&(d.scrollX=h.scrollLeft||0,d.scrollY=h.scrollTop||0)}return c})};typeof document<"u"&&document.addEventListener("scroll",wje(i,100),!0),e.subscribe("onRendered",s=>{const a=r(s.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(jae({storageKey:xN,key:a,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&zT.set(o=>(o[a]||={},o)))})}function Tje(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function Aje(e,t=String){const n=new URLSearchParams;for(const r in e){const i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function RO(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function kje(e){const t=new URLSearchParams(e),n={};for(const[r,i]of t.entries()){const s=n[r];s==null?n[r]=RO(i):Array.isArray(s)?s.push(RO(i)):n[r]=[s,RO(i)]}return n}const Nje=Rje(JSON.parse),jje=Ije(JSON.stringify,JSON.parse);function Rje(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=kje(t);for(const r in n){const i=n[r];if(typeof i=="string")try{n[r]=e(i)}catch{}}return n}}function Ije(e,t){const n=typeof t=="function";function r(i){if(typeof i=="object"&&i!==null)try{return e(i)}catch{}else if(n&&typeof i=="string")try{return t(i),e(i)}catch{}return i}return i=>{const s=Aje(i,r);return s?`?${s}`:""}}function N9(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function wd(e){return e instanceof Response&&!!e.options}function Oje(e){const t=new Map;let n,r;const i=s=>{s.next&&(s.prev?(s.prev.next=s.next,s.next.prev=s.prev,s.next=void 0,r&&(r.next=s,s.prev=r)):(s.next.prev=void 0,n=s.next,s.next=void 0,r&&(s.prev=r,r.next=s)),r=s)};return{get(s){const a=t.get(s);if(a)return i(a),a.value},set(s,a){if(t.size>=e&&n){const c=n;t.delete(c.key),c.next&&(n=c.next,c.next.prev=void 0),c===r&&(r=void 0)}const o=t.get(s);if(o)o.value=a,i(o);else{const c={key:s,value:a,prev:r};r&&(r.next=c),r=c,n||(n=c),t.set(s,c)}}}}const ck=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},_j=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),Rae=(e,t)=>{const n=e.router.routesById[t.routeId??""]??e.router.routeTree;!n.options.notFoundComponent&&e.router.options?.defaultNotFoundComponent&&(n.options.notFoundComponent=e.router.options.defaultNotFoundComponent),ph(n.options.notFoundComponent);const r=e.matches.find(i=>i.routeId===n.id);ph(r,"Could not find match for route: "+n.id),e.updateMatch(r.id,i=>({...i,status:"notFound",error:t,isFetching:!1})),t.routerCode==="BEFORE_LOAD"&&n.parentRoute&&(t.routeId=n.parentRoute.id,Rae(e,t))},Up=(e,t,n)=>{if(!(!wd(n)&&!Ld(n))){if(wd(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;const r=wd(n)?"redirected":"notFound";e.updateMatch(t.id,i=>({...i,status:r,isFetching:!1,error:n})),Ld(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw wd(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(Rae(e,n),n)}},Iae=(e,t)=>{const n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},v_=(e,t,n,r)=>{const{id:i,routeId:s}=e.matches[t],a=e.router.looseRoutesById[s];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??=t,Up(e,e.router.getMatch(i),n);try{a.options.onError?.(n)}catch(o){n=o,Up(e,e.router.getMatch(i),n)}e.updateMatch(i,o=>(o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,o._nonReactive.loadPromise?.resolve(),{...o,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},Pje=(e,t,n,r)=>{const i=e.router.getMatch(t),s=e.matches[n-1]?.id,a=s?e.router.getMatch(s):void 0;if(e.router.isShell()){i.ssr=t===Ol;return}if(a?.ssr===!1){i.ssr=!1;return}const o=g=>g===!0&&a?.ssr==="data-only"?"data-only":g,c=e.router.options.defaultSsr??!0;if(r.options.ssr===void 0){i.ssr=o(c);return}if(typeof r.options.ssr!="function"){i.ssr=o(r.options.ssr);return}const{search:u,params:d}=i,h={search:$T(u,i.searchError),params:$T(d,i.paramsError),location:e.location,matches:e.matches.map(g=>({index:g.index,pathname:g.pathname,fullPath:g.fullPath,staticData:g.staticData,id:g.id,routeId:g.routeId,search:$T(g.search,g.searchError),params:$T(g.params,g.paramsError),ssr:g.ssr}))},p=r.options.ssr(h);if(sm(p))return p.then(g=>{i.ssr=o(g??c)});i.ssr=o(p??c)},Oae=(e,t,n,r)=>
60{if(r._nonReactive.pendingTimeout!==void 0)return;const i=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!e.router.isServer&&!_j(e,t)&&(n.options.loader||n.options.beforeLoad||Dae(n))&&typeof i=="number"&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const a=setTimeout(()=>{ck(e)},i);r._nonReactive.pendingTimeout=a}},Mje=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;Oae(e,t,n,r);const i=()=>{const s=e.router.getMatch(t);s.preload&&(s.status==="redirected"||s.status==="notFound")&&Up(e,s,s.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},Dje=(e,t,n,r)=>{const i=e.router.getMatch(t),s=i._nonReactive.loadPromise;i._nonReactive.loadPromise=X1(()=>{s?.resolve()});const{paramsError:a,searchError:o}=i;a&&v_(e,n,a,"PARSE_PARAMS"),o&&v_(e,n,o,"VALIDATE_SEARCH"),Oae(e,t,r,i);const c=new AbortController,u=e.matches[n-1]?.id,p={...(u?e.router.getMatch(u):void 0)?.context??e.router.options.context??void 0,...i.__routeContext};let g=!1;const v=()=>{g||(g=!0,e.updateMatch(t,k=>({...k,isFetching:"beforeLoad",fetchCount:k.fetchCount+1,abortController:c,context:p})))},x=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,k=>({...k,isFetching:!1}))};if(!r.options.beforeLoad){jw(()=>{v(),x()});return}i._nonReactive.beforeLoadPromise=X1();const{search:_,params:w,cause:S}=i,E=_j(e,t),T={search:_,abortController:c,params:w,preload:E,context:p,location:e.location,navigate:k=>e.router.navigate({...k,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:E?"preload":S,matches:e.matches,...e.router.options.additionalContext},N=k=>{if(k===void 0){jw(()=>{v(),x()});return}(wd(k)||Ld(k))&&(v(),v_(e,n,k,"BEFORE_LOAD")),jw(()=>{v(),e.updateMatch(t,j=>({...j,__beforeLoadContext:k,context:{...j.context,...k}})),x()})};let A;try{if(A=r.options.beforeLoad(T),sm(A))return v(),A.catch(k=>{v_(e,n,k,"BEFORE_LOAD")}).then(N)}catch(k){v(),v_(e,n,k,"BEFORE_LOAD")}N(A)},Fje=(e,t)=>{const{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],s=()=>{if(e.router.isServer){const c=Pje(e,n,t,i);if(sm(c))return c.then(o)}return o()},a=()=>Dje(e,n,t,i),o=()=>{if(Iae(e,n))return;const c=Mje(e,n,i);return sm(c)?c.then(a):a()};return s()},Rw=(e,t,n)=>{const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const i={matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(i),n.options.scripts?.(i),n.options.headers?.(i)]).then(([s,a,o])=>{const c=s?.meta,u=s?.links,d=s?.scripts,h=s?.styles;return{meta:c,links:u,headScripts:d,headers:o,scripts:a,styles:h}})},Pae=(e,t,n,r)=>{const i=e.matchPromises[n-1],{params:s,loaderDeps:a,abortController:o,context:c,cause:u}=e.router.getMatch(t),d=_j(e,t);return{params:s,deps:a,preload:!!d,parentMatchPromise:i,abortController:o,context:c,location:e.location,navigate:h=>e.router.navigate({...h,_fromLocation:e.location}),cause:d?"preload":u,route:r,...e.router.options.additionalContext}},hK=async(e,t,n,r)=>{try{const i=e.router.getMatch(t);try{(!e.router.isServer||i.ssr===!0)&&Mae(r);const s=r.options.loader?.(Pae(e,t,n,r)),a=r.options.loader&&sm(s);if(!!(a||r._lazyPromise||r._componentsPromise||r.options.head||r.options.scripts||r.options.headers||i._nonReactive.minPendingPromise)&&e.updateMatch(t,h=>({...h,isFetching:"loader"})),r.options.loader){const h=a?await s:s;Up(e,e.router.getMatch(t),h),h!==void 0&&e.updateMatch(t,p=>({...p,loaderData:h}))}r._lazyPromise&&await r._lazyPromise;const c=Rw(e,t,r),u=c?await c:void 0,d=i._nonReactive.minPendingPromise;d&&await d,r._componentsPromise&&await r._componentsPromise,e.updateMatch(t,h=>({...h,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),...u}))}catch(s){let a=s;const o=i._nonReactive.minPendingPromise;o&&await o,Up(e,e.router.getMatch(t),s);try{r.options.onError?.(s)}catch(d){a=d,Up(e,e.router.getMatch(t),d)}const c=Rw(e,t,r),u=c?await c:void 0;e.updateMatch(t,d=>({...d,error:a,status:"error",isFetching:!1,...u}))}}catch(i){const s=e.router.getMatch(t);if(s){const a=Rw(e,t,r);if(a){const o=await a;e.updateMatch(t,c=>({...c,...o}))}s._nonReactive.loaderPromise=void 0}Up(e,s,i)}},Lje=async(e,t)=>{const{id:n,routeId:r}=e.matches[t];let i=!1,s=!1;const a=e.router.looseRoutesById[r];if(Iae(e,n)){if(e.router.isServer){const u=Rw(e,n,a);if(u){const d=await u;e.updateMatch(n,h=>({...h,...d}))}return e.router.getMatch(n)}}else{const u=e.router.getMatch(n);if(u._nonReactive.loaderPromise){if(u.status==="success"&&!e.sync&&!u.preload)return u;await u._nonReactive.loaderPromise;const d=e.router.getMatch(n);d.error&&Up(e,d,d.error)}else{const d=Date.now()-u.updatedAt,h=_j(e,n),p=h?a.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:a.options.staleTime??e.router.options.defaultStaleTime??0,g=a.options.shouldReload,v=typeof g=="function"?g(Pae(e,n,t,a)):g,x=!!h&&!e.router.state.matches.some(E=>E.id===n),_=e.router.getMatch(n);_._nonReactive.loaderPromise=X1(),x!==_.preload&&e.updateMatch(n,E=>({...E,preload:x}));const{status:w,invalid:S}=_;if(i=w==="success"&&(S||(v??d>p)),!(h&&a.options.preload===!1))if(i&&!e.sync)s=!0,(async()=>{try{await hK(e,n,t,a);const E=e.router.getMatch(n);E._nonReactive.loaderPromise?.resolve(),E._nonReactive.loadPromise?.resolve(),E._nonReactive.loaderPromise=void 0}catch(E){wd(E)&&await e.router.navigate(E.options)}})();else if(w!=="success"||i&&e.sync)await hK(e,n,t,a);else{const E=Rw(e,n,a);if(E){const T=await E;e.updateMatch(n,N=>({...N,...T}))}}}}const o=e.router.getMatch(n);s||(o._nonReactive.loaderPromise?.resolve(),o._nonReactive.loadPromise?.resolve()),clearTimeout(o._nonReactive.pen
60dingTimeout),o._nonReactive.pendingTimeout=void 0,s||(o._nonReactive.loaderPromise=void 0),o._nonReactive.dehydrated=void 0;const c=s?o.isFetching:!1;return c!==o.isFetching||o.invalid!==!1?(e.updateMatch(n,u=>({...u,isFetching:c,invalid:!1})),e.router.getMatch(n)):o};async function pK(e){const t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(n=>n._forcePending)&&ck(t);try{for(let i=0;i<t.matches.length;i++){const s=Fje(t,i);sm(s)&&await s}const n=t.firstBadMatchIndex??t.matches.length;for(let i=0;i<n;i++)t.matchPromises.push(Lje(t,i));await Promise.all(t.matchPromises);const r=ck(t);sm(r)&&await r}catch(n){if(Ld(n)&&!t.preload){const r=ck(t);throw sm(r)&&await r,n}if(wd(n))throw n}return t.matches}async function Mae(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{const n=[];for(const r of Fae){const i=e.options[r]?.preload;i&&n.push(i())}if(n.length)return Promise.all(n).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function $T(e,t){return t?{status:"error",error:t}:{status:"success",value:e}}function Dae(e){for(const t of Fae)if(e.options[t]?.preload)return!0;return!1}const Fae=["component","errorComponent","pendingComponent","notFoundComponent"];function zje(e){return{input:({url:t})=>{for(const n of e)t=Lae(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=zae(e[n],t);return t}}}function $je(e){const t=lk(e.basepath),n=`/${t}`,r=`${n}/`,i=e.caseSensitive?n:n.toLowerCase(),s=e.caseSensitive?r:r.toLowerCase();return{input:({url:a})=>{const o=e.caseSensitive?a.pathname:a.pathname.toLowerCase();return o===i?a.pathname="/":o.startsWith(s)&&(a.pathname=a.pathname.slice(n.length)),a},output:({url:a})=>(a.pathname=ah(["/",t,a.pathname]),a)}}function Lae(e,t){const n=e?.input?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function zae(e,t){const n=e?.output?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function a0(e){const t=e.resolvedLocation,n=e.location,r=t?.pathname!==n.pathname,i=t?.href!==n.href,s=t?.hash!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:r,hrefChanged:i,hashChanged:s}}class Bje{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>
60n(),this.update=n=>{n.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const r=this.options,i=this.basepath??r?.basepath??"/",s=this.basepath===void 0,a=r?.rewrite;this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(p=>[encodeURIComponent(p),p])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=K3e())),this.origin=this.options.origin,this.origin||(this.isServer?this.origin="http://localhost":this.origin=window.origin),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),!this.__store&&this.latestLocation&&(this.__store=new x6(Vje(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(p=>!["redirected"].includes(p.status))}}}),Cje(this));let o=!1;const c=this.options.basepath??"/",u=this.options.rewrite;if(s||i!==c||a!==u){this.basepath=c;const p=[];lk(c)!==""&&p.push($je({basepath:c})),u&&p.push(u),this.rewrite=p.length===0?void 0:p.length===1?p[0]:zje(p),this.history&&this.updateLatestLocation(),o=!0}o&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const{routesById:n,routesByPath:r,flatRoutes:i}=bje({routeTree:this.routeTree,initRoute:(a,o)=>{a.init({originalIndex:o})}});this.routesById=n,this.routesByPath=r,this.flatRoutes=i;const s=this.options.notFoundRoute;s&&(s.init({originalIndex:99999999999}),this.routesById[s.id]=s)},this.subscribe=(n,r)=>{const i={eventType:n,fn:r};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const i=({href:c,state:u})=>{const d=new URL(c,this.origin),h=Lae(this.rewrite,d),p=this.options.parseSearch(h.search),g=this.options.stringifySearch(p);h.search=g;const v=h.href.replace(h.origin,""),{pathname:x,hash:_}=h;return{href:v,publicHref:c,url:h.href,pathname:x,searchStr:g,search:pc(r?.search,p),hash:_.split("#").reverse()[0]??"",state:pc(r?.state,u)}},s=i(n),{__tempLocation:a,__tempKey:o}=s.state;if(a&&(!o||o===this.tempLocationKey)){const c=i(a);return c.state.key=s.state.key,c.state.__TSR_key=s.state.__TSR_key,delete c.state.__tempLocation,{...c,maskedLocation:s}}return s},this.resolvePathWithBase=(n,r)=>eje({base:n,to:A9(r),trailingSlash:this.options.trailingSlash,parseCache:this.parsePathnameCache}),this.matchRoutes=(n,r,i)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},i):this.matchRoutesInternal(n,r),this.parsePathnameCache=Oje(1e3),this.getMatchedRoutes=(n,r)=>Hje({pathname:n,routePathname:r,caseSensitive:this.options.caseSensitive,routesByPath:this.routesByPath,routesById:this.routesById,flatRoutes:this.flatRoutes,parseCache:this.parsePathnameCache}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.state.pendingMatches?.forEach(n=>{this.cancelMatch(n.id)})},this.buildLocation=n=>{const r=(s={})=>{const a=s._fromLocation||this.latestLocation,o=this.matchRoutes(a,{_buildLocation:!0}),c=v6(o);s.from;const u=s.unsafeRelative==="path"?a.pathname:s.from??c.fullPath,d=this.resolvePathWithBase(u,"."),h=c.search,p={...c.params},g=s.to?this.resolvePathWithBase(d,`${s.to}`):this.resolvePathWithBase(d,"."),v=s.params===!1||s.params===null?{}:(s.params??!0)===!0?p:Object.assign(p,i0(s.params,p)),x=LT({path:g,params:v,parseCache:this.parsePathnameCache}).interpolatedPath,_=this.matchRoutes(x,void 0,{_buildLocation:!0}
60).map(P=>this.looseRoutesById[P.routeId]);if(Object.keys(v).length>0)for(const P of _){const V=P.options.params?.stringify??P.options.stringifyParams;V&&Object.assign(v,V(v))}const w=LT({path:g,params:v,leaveWildcards:!1,leaveParams:n.leaveParams,decodeCharMap:this.pathParamsDecodeCharMap,parseCache:this.parsePathnameCache}).interpolatedPath;let S=h;if(n._includeValidateSearch&&this.options.search?.strict){const P={};_.forEach(V=>{if(V.options.validateSearch)try{Object.assign(P,_6(V.options.validateSearch,{...P,...S}))}catch{}}),S=P}S=qje({search:S,dest:s,destRoutes:_,_includeValidateSearch:n._includeValidateSearch}),S=pc(h,S);const E=this.options.stringifySearch(S),T=s.hash===!0?a.hash:s.hash?i0(s.hash,a.hash):void 0,N=T?`#${T}`:"";let A=s.state===!0?a.state:s.state?i0(s.state,a.state):{};A=pc(a.state,A);const k=`${w}${E}${N}`,j=new URL(k,this.origin),R=zae(this.rewrite,j);return{publicHref:R.pathname+R.search+R.hash,href:k,url:R.href,pathname:w,search:S,searchStr:E,state:A,hash:T??"",unmaskOnReload:s.unmaskOnReload}},i=(s={},a)=>{const o=r(s);let c=a?r(a):void 0;if(!c){let u={};const d=this.options.routeMasks?.find(h=>{const p=y6(o.pathname,{to:h.from,caseSensitive:!1,fuzzy:!1},this.parsePathnameCache);return p?(u=p,!0):!1});if(d){const{from:h,...p}=d;a={from:n.from,...p,params:u},c=r(a)}}return c&&(o.maskedLocation=c),o};return n.mask?i(n,{from:n.from,...n.mask}):i(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:r,...i})=>{const s=()=>{const c=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];c.forEach(d=>{i.state[d]=this.latestLocation.state[d]});const u=s0(i.state,this.latestLocation.state);return c.forEach(d=>{delete i.state[d]}),u},a=am(this.latestLocation.href)===am(i.href),o=this.commitLocationPromise;if(this.commitLocationPromise=X1(()=>{o?.resolve()}),a&&s())this.load();else{let{maskedLocation:c,hashScrollIntoView:u,...d}=i;c&&(d={...c,state:{...c.state,__tempKey:void 0,__tempLocation:{...d,search:d.searchStr,state:{...d.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(d.unmaskOnReload??this.options.unmaskOnReload??!1)&&(d.state.__tempKey=this.tempLocationKey)),d.state.__hashScrollIntoViewOptions=u??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[i.replace?"replace":"push"](d.publicHref,d.state,{ignoreBlocker:r})}return this.resetNextScroll=i.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:i,viewTransition:s,ignoreBlocker:a,href:o,...c}={})=>{if(o){const d=this.history.location.state.__TSR_index,h=pN(o,{__TSR_index:n?d:d+1});c.to=h.pathname,c.search=this.options.parseSearch(h.search),c.hash=h.hash.slice(1)}const u=this.buildLocation({...c,_includeValidateSearch:!0});return this.commitLocation({...u,viewTransition:s,replace:n,resetScroll:r,hashScrollIntoView:i,ignoreBlocker:a})},this.navigate=({to:n,reloadDocument:r,href:i,...s})=>{if(!r&&i)try{new URL(`${i}`),r=!0}catch{}return r?(i||(i=this.buildLocation({to:n,...s}).url),s.replace?window.location.replace(i):window.location.href=i,Promise.resolve()):this.buildAndCommitLocation({...s,href:i,to:n,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){const r=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0}),i=s=>{try{return encodeURI(decodeURI(s))}catch{return s}};if(lk(i(this.latestLocation.href))!==lk(i(r.href)))throw N9({href:r.href})}const n=this.matchRoutes(this.latestLocation);this.__store.setState(r=>({...r,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:r.cachedMatches.filter(i=>!n.some(s=>s.id===i.id))}))},this.load=async n=>{let r,i,s;for(s=new Promise(a=>{this.startTransition(async()=>{try{this.beforeLoad();const o=this.latestLocation,c=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...a0({resolvedLocation:c,location:o})}),this.emit({type:"onBeforeLoad",...a0({resolvedLocation:c,location:o})}),await pK({router:this,sync:n?.sync,matches:this.state.pendingMatches,location:o,updateMatch:this.updateMatch,onReady:async()=>{this.startViewTransition(async()=>{let u,d,h;jw(()=>{this.__store.setState(p=>{const g=p.matches,v=p.pendingMatches||p.matches;return u=g.filter(x=>
60!v.some(_=>_.id===x.id)),d=v.filter(x=>!g.some(_=>_.id===x.id)),h=g.filter(x=>v.some(_=>_.id===x.id)),{...p,isLoading:!1,loadedAt:Date.now(),matches:v,pendingMatches:void 0,cachedMatches:[...p.cachedMatches,...u.filter(x=>x.status!=="error")]}}),this.clearExpiredCache()}),[[u,"onLeave"],[d,"onEnter"],[h,"onStay"]].forEach(([p,g])=>{p.forEach(v=>{this.looseRoutesById[v.routeId].options[g]?.(v)})})})}})}catch(o){wd(o)?(r=o,this.isServer||this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):Ld(o)&&(i=o),this.__store.setState(c=>({...c,statusCode:r?r.status:i?404:c.matches.some(u=>u.status==="error")?500:200,redirect:r}))}this.latestLoadPromise===s&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),a()})}),this.latestLoadPromise=s,await s;this.latestLoadPromise&&s!==this.latestLoadPromise;)await this.latestLoadPromise;this.hasNotFoundMatch()&&this.__store.setState(a=>({...a,statusCode:404}))},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let i;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const s=this.latestLocation,a=this.state.resolvedLocation,o=typeof r.types=="function"?r.types(a0({resolvedLocation:a,location:s})):r.types;i={update:n,types:o}}else i=n;document.startViewTransition(i)}else n()},this.updateMatch=(n,r)=>{const i=this.state.pendingMatches?.some(s=>s.id===n)?"pendingMatches":this.state.matches.some(s=>s.id===n)?"matches":this.state.cachedMatches.some(s=>s.id===n)?"cachedMatches":"";i&&this.__store.setState(s=>({...s,[i]:s[i]?.map(a=>a.id===n?r(a):a)}))},this.getMatch=n=>{const r=i=>i.id===n;return this.state.cachedMatches.find(r)??this.state.pendingMatches?.find(r)??this.state.matches.find(r)},this.invalidate=n=>{const r=i=>n?.filter?.(i)??!0?{...i,invalid:!0,...n?.forcePending||i.status==="error"?{status:"pending",error:void 0}:void 0}:i;return this.__store.setState(i=>({...i,matches:i.matches.map(r),cachedMatches:i.cachedMatches.map(r),pendingMatches:i.pendingMatches?.map(r)})),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.resolveRedirect=n=>{if(!n.options.href){const r=this.buildLocation(n.options);let i=r.url;this.origin&&i.startsWith(this.origin)&&(i=i.replace(this.origin,"")||"/"),n.options.href=r.href,n.headers.set("Location",i)}return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n?.filter;r!==void 0?this.__store.setState(i=>({...i,cachedMatches:i.cachedMatches.filter(s=>!r(s))})):this.__store.setState(i=>({...i,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=r=>{const i=this.looseRoutesById[r.routeId];if(!i.options.loader)return!0;const s=(r.preload?i.options.preloadGcTime??this.options.defaultPreloadGcTime:i.options.gcTime??this.options.defaultGcTime)??300*1e3;return r.status==="error"?!0:Date.now()-r.updatedAt>=s};this.clearCache({filter:n})},this.loadRouteChunk=Mae,this.preloadRoute=async n=>{const r=this.buildLocation(n);let i=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const s=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(o=>o.id)),a=new Set([...s,...this.state.cachedMatches.map(o=>o.id)]);jw(()=>{i.forEach(o=>{a.has(o.id)||this.__store.setState(c=>({...c,cachedMatches:[...c.cachedMatches,o]}))})});try{return i=await pK({router:this,matches:i,location:r,preload:!0,updateMatch:(o,c)=>{s.has(o)?i=i.map(u=>u.id===o?c(u):u):this.updateMatch(o,c)}}),i}catch(o){if(wd(o))return o.options.reloadDocument?void 0:await this.preloadRoute({...o.options,_fromLocation:r});Ld(o)||console.error(o);return}},this.matchRoute=(n,r)=>{const i={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},s=this.buildLocation(i);if(r?.pending&&this.state.status!=="pending")return!1;const o=(r?.pending===void 0?!this.state.isLoading:r.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,c=y6(o.pathname,{...r,to:s.pathname},this.parsePathnameCache);return!c||n.params&&!s0(c,n.params,{partial:!0})?!1:c&&(r?.includeSearch??!0)?s0(o.search,s.search,{partial:!0})?c:!1:c},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??jje,parseSearch:t.parseSearch??Nje}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}
60isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,n){const{foundRoute:r,matchedRoutes:i,routeParams:s}=this.getMatchedRoutes(t.pathname,n?.dest?.to);let a=!1;(r?r.path!=="/"&&s["**"]:am(t.pathname))&&(this.options.notFoundRoute?i.push(this.options.notFoundRoute):a=!0);const o=(()=>{if(a){if(this.options.notFoundMode!=="root")for(let d=i.length-1;d>=0;d--){const h=i[d];if(h.children)return h.id}return Ol}})(),c=[],u=d=>d?.id?d.context??this.options.context??void 0:this.options.context??void 0;return i.forEach((d,h)=>{const p=c[h-1],[g,v,x]=(()=>{const U=p?.search??t.search,G=p?._strictSearch??void 0;try{const Q=_6(d.options.validateSearch,{...U})??void 0;return[{...U,...Q},{...G,...Q},void 0]}catch(Q){let Z=Q;if(Q instanceof yN||(Z=new yN(Q.message,{cause:Q})),n?.throwOnError)throw Z;return[U,{},Z]}})(),_=d.options.loaderDeps?.({search:g})??"",w=_?JSON.stringify(_):"",{interpolatedPath:S,usedParams:E}=LT({path:d.fullPath,params:s,decodeCharMap:this.pathParamsDecodeCharMap}),T=LT({path:d.id,params:s,leaveWildcards:!0,decodeCharMap:this.pathParamsDecodeCharMap,parseCache:this.parsePathnameCache}).interpolatedPath+w,N=this.getMatch(T),A=this.state.matches.find(U=>U.routeId===d.id),k=N?._strictParams??E;let j;if(!N){const U=d.options.params?.parse??d.options.parseParams;if(U)try{Object.assign(k,U(k))}catch(G){if(j=new Uje(G.message,{cause:G}),n?.throwOnError)throw j}}Object.assign(s,k);const R=A?"stay":"enter";let P;if(N)P={...N,cause:R,params:A?pc(A.params,s):s,_strictParams:k,search:pc(A?A.search:N.search,g),_strictSearch:v};else{const U=d.options.loader||d.options.beforeLoad||d.lazyFn||Dae(d)?"pending":"success";P={id:T,index:h,routeId:d.id,params:A?pc(A.params,s):s,_strictParams:k,pathname:S,updatedAt:Date.now(),search:A?pc(A.search,g):g,_strictSearch:v,searchError:void 0,status:U,isFetching:!1,error:void 0,paramsError:j,__routeContext:void 0,_nonReactive:{loadPromise:X1()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:R,loaderDeps:A?pc(A.loaderDeps,_):_,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:d.options.staticData||{},fullPath:d.fullPath}}n?.preload||(P.globalNotFound=o===d.id),P.searchError=x;const V=u(p);P.context={...V,...P.__routeContext,...P.__beforeLoadContext},c.push(P)}),c.forEach((d,h)=>{const p=this.looseRoutesById[d.routeId];if(!this.getMatch(d.id)&&n?._buildLocation!==!0){const v=c[h-1],x=u(v);if(p.options.context){const _={deps:d.loaderDeps,params:d.params,context:x??{},location:t,navigate:w=>this.navigate({...w,_fromLocation:t}),buildLocation:this.buildLocation,cause:d.cause,abortController:d.abortController,preload:!!d.preload,matches:c};d.__routeContext=p.options.context(_)??void 0}d.context={...x,...d.__routeContext,...d.__beforeLoadContext}}}),c}}class yN extends Error{}class Uje extends Error{}function Vje(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function _6(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new yN("Async validation not supported");if(n.issues)throw new yN(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function Hje({pathname:e,routePathname:t,caseSensitive:n,routesByPath:r,routesById:i,flatRoutes:s,parseCache:a}){let o={};const c=am(e),u=g=>y6(c,{to:g.fullPath,caseSensitive:g.options?.caseSensitive??n,fuzzy:!0},a);let d=t!==void 0?r[t]:void 0;if(d)o=u(d);else{let g;for(const v of s){const x=u(v);if(x)if(v.path!=="/"&&x["**"])g||(g={foundRoute:v,routeParams:x});else{d=v,o=x;break}}!d&&g&&(d=g.foundRoute,o=g.routeParams)}let h=d||i[Ol];const p=[h];for(;h.parentRoute;)h=h.parentRoute,p.push(h);return p.reverse(),{matchedRoutes:p,routeParams:o,foundRoute:d}}function qje({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){const i=n.reduce((o,c)=>{const u=[];
60if("search"in c.options)c.options.search?.middlewares&&u.push(...c.options.search.middlewares);else if(c.options.preSearchFilters||c.options.postSearchFilters){const d=({search:h,next:p})=>{let g=h;"preSearchFilters"in c.options&&c.options.preSearchFilters&&(g=c.options.preSearchFilters.reduce((x,_)=>_(x),h));const v=p(g);return"postSearchFilters"in c.options&&c.options.postSearchFilters?c.options.postSearchFilters.reduce((x,_)=>_(x),v):v};u.push(d)}if(r&&c.options.validateSearch){const d=({search:h,next:p})=>{const g=p(h);try{return{...g,..._6(c.options.validateSearch,g)??void 0}}catch{return g}};u.push(d)}return o.concat(u)},[])??[],s=({search:o})=>t.search?t.search===!0?o:i0(t.search,o):{};i.push(s);const a=(o,c)=>{if(o>=i.length)return c;const u=i[o];return u({search:c,next:h=>a(o+1,h)})};return a(0,e)}const Wje="Error preloading route! âï¸";class $ae{constructor(t){if(this.init=n=>{this.originalIndex=n.originalIndex;const r=this.options,i=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),i?this._path=Ol:this.parentRoute||ph(!1);let s=i?Ol:r?.path;s&&s!=="/"&&(s=k9(s));const a=r?.id||s;let o=i?Ol:ah([this.parentRoute.id===Ol?"":this.parentRoute.id,a]);s===Ol&&(s="/"),o!==Ol&&(o=ah(["/",o]));const c=o===Ol?"/":ah([this.parentRoute.fullPath,s]);this._path=s,this._id=o,this._fullPath=c,this._to=c},this.clone=n=>{this._path=n._path,this._id=n._id,this._fullPath=n._fullPath,this._to=n._to,this.options.getParentRoute=n.options.getParentRoute,this.children=n.children},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class Gje extends $ae{constructor(t){super(t)}}function j9(e){const t=e.errorComponent??wj;return l.jsx(Kje,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?b.createElement(t,{error:n,reset:r}):e.children})}class Kje extends b.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function wj({error:e}){const[t,n]=b.useState(!1);return l.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[l.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),l.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),l.jsx("div",{style:{height:".25rem"}}),t?l.jsx("div",{children:l.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?l.jsx("code",{children:e.message}):null})}):null]})}function Yje({children:e,fallback:t=null}){return Xje()?l.jsx(Y.Fragment,{children:e}):l.jsx(Y.Fragment,{children:t})}function Xje(){return Y.useSyncExternalStore(Qje,()=>!0,()=>!1)}function Qje(){return()=>{}}var IO={exports:{}},OO={},PO={exports:{}},MO={};/** 61 * @license React 62 * use-sync-external-store-shim.production.js 63 * 64 * Copyright (c) Meta Platforms, Inc. and affiliates. 65 * 66 * This source code is licensed under the MIT license found in the 67 * LICENSE file in the root directory of this source tree. 68 */var mK;function Zje(){if(mK)return MO;mK=1;var e=WS();function t(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,s=e.useLayoutEffect,a=e.useDebugValue;function o(h,p){var g=p(),v=r({inst:{value:g,getSnapshot:p}}),x=v[0].inst,_=v[1];return s(function(){x.value=g,x.getSnapshot=p,c(x)&&_({inst:x})},[h,g,p]),i(function(){return c(x)&&_({inst:x}),h(function(){c(x)&&_({inst:x})})},[h]),a(g),g}function c(h){var p=h.getSnapshot;h=h.value;try{var g=p();return!n(h,g)}catch{return!0}}function u(h,p){return p()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:o;return MO.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,MO}var gK;
68function Bae(){return gK||(gK=1,PO.exports=Zje()),PO.exports}/** 69 * @license React 70 * use-sync-external-store-shim/with-selector.production.js 71 * 72 * Copyright (c) Meta Platforms, Inc. and affiliates. 73 * 74 * This source code is licensed under the MIT license found in the 75 * LICENSE file in the root directory of this source tree. 76 */var xK;function Jje(){if(xK)return OO;xK=1;var e=WS(),t=Bae();function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,s=e.useRef,a=e.useEffect,o=e.useMemo,c=e.useDebugValue;return OO.useSyncExternalStoreWithSelector=function(u,d,h,p,g){var v=s(null);if(v.current===null){var x={hasValue:!1,value:null};v.current=x}else x=v.current;v=o(function(){function w(A){if(!S){if(S=!0,E=A,A=p(A),g!==void 0&&x.hasValue){var k=x.value;if(g(k,A))return T=k}return T=A}if(k=T,r(E,A))return k;var j=p(A);return g!==void 0&&g(k,j)?(E=A,k):(E=A,T=j)}var S=!1,E,T,N=h===void 0?null:h;return[function(){return w(d())},N===null?void 0:function(){return w(N())}]},[d,h,p,g]);var _=i(u,v[0],v[1]);return a(function(){x.hasValue=!0,x.value=_},[_]),c(_),_},OO}var vK;function e5e(){return vK||(vK=1,IO.exports=Jje()),IO.exports}var t5e=e5e();function n5e(e,t=n=>n){return t5e.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,r5e)}function r5e(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,i]of e)if(!t.has(r)||!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=yK(e);if(n.length!==yK(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}function yK(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const DO=b.createContext(null);function Uae(){return typeof document>"u"?DO:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=DO,DO)}function Ho(e){const t=b.useContext(Uae());return e?.warn,t}function mo(e){const t=Ho({warn:e?.router===void 0}),n=e?.router||t,r=b.useRef(void 0);return n5e(n.__store,i=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const s=pc(r.current,e.select(i));return r.current=s,s}return e.select(i)}return i})}const Sj=b.createContext(void 0),i5e=b.createContext(void 0);function zd(e){const t=b.useContext(e.from?i5e:Sj);return mo({select:r=>{const i=r.matches.find(s=>e.from?e.from===s.routeId:s.id===t);if(ph(!((e.shouldThrow??!0)&&!i),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),i!==void 0)return e.select?e.select(i):i},structuralSharing:e.structuralSharing})}function R9(e){return zd({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function I9(e){const{select:t,...n}=e;return zd({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function O9(e){return zd({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function Ej(e){return zd({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function gs(e){const t=Ho();return b.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Cj(e){const t=Ho(),n=gs(),r=b.useRef(null);return b.useEffect(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}var mh=nae();const Vae=$c(mh),BT=typeof window<"u"?b.useLayoutEffect:b.useEffect;function FO(e){const t=b.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function s5e(e,t,n={},r={}){b.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const i=new IntersectionObserver(([s])=>{t(s)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function a5e(e){const t=b.useRef(null);return b.useImperativeHandle(e,()=>t.current,[]),t}function o5e(e,t){const n=Ho(),[r,i]=b.useState(!1),s=b.useRef(!1),a=a5e(t),{activeProps:o,inactiveProps:c,activeOptions:u,to:d,preload:h,preloadDelay:p,hashScrollIntoView:g,replace:v,startTransition:x,resetScroll:_,viewTransition:w,children:S,target:E,disabled:T,style:N,className:A,onClick:k,onFocus:j,onMouseEnter:R,onMouseLeave:P,onTouchStart:V,ignoreBlocker:U,params:G,search:Q,hash:Z,state:K,mask:te,reloadDocument:ne,unsafeRelative:se,from:H,_fromLocation:O,...L}=e,M=mo({select:De=>
76De.location.search,structuralSharing:!0}),q=e.from,X=b.useMemo(()=>({...e,from:q}),[n,M,q,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),J=b.useMemo(()=>n.buildLocation({...X}),[n,X]),W=b.useMemo(()=>{if(T)return;let De=J.maskedLocation?J.maskedLocation.url:J.url,be=!1;return n.origin&&(De.startsWith(n.origin)?De=n.history.createHref(De.replace(n.origin,""))||"/":be=!0),{href:De,external:be}},[T,J.maskedLocation,J.url,n.origin,n.history]),re=b.useMemo(()=>{if(W?.external)return W.href;try{return new URL(d),d}catch{}},[d,W]),ae=e.reloadDocument||re?!1:h??n.options.defaultPreload,ce=p??n.options.defaultPreloadDelay??0,Te=mo({select:De=>{if(re)return!1;if(u?.exact){if(!Z3e(De.location.pathname,J.pathname,n.basepath))return!1}else{const be=gN(De.location.pathname,n.basepath),me=gN(J.pathname,n.basepath);if(!(be.startsWith(me)&&(be.length===me.length||be[me.length]==="/")))return!1}return(u?.includeSearch??!0)&&!s0(De.location.search,J.search,{partial:!u?.exact,ignoreUndefined:!u?.explicitUndefined})?!1:u?.includeHash?De.location.hash===J.hash:!0}}),fe=b.useCallback(()=>{n.preloadRoute({...X}).catch(De=>{console.warn(De),console.warn(Wje)})},[n,X]),xe=b.useCallback(De=>{De?.isIntersecting&&fe()},[fe]);s5e(a,xe,f5e,{disabled:!!T||ae!=="viewport"}),b.useEffect(()=>{s.current||!T&&ae==="render"&&(fe(),s.current=!0)},[T,fe,ae]);const ke=De=>{const be=De.currentTarget.target,me=E!==void 0?E:be;if(!T&&!h5e(De)&&!De.defaultPrevented&&(!me||me==="_self")&&De.button===0){De.preventDefault(),mh.flushSync(()=>{i(!0)});const we=n.subscribe("onResolved",()=>{we(),i(!1)});n.navigate({...X,replace:v,resetScroll:_,hashScrollIntoView:g,startTransition:x,viewTransition:w,ignoreBlocker:U})}};if(re)return{...L,ref:a,href:re,...S&&{children:S},...E&&{target:E},...T&&{disabled:T},...N&&{style:N},...A&&{className:A},...k&&{onClick:k},...j&&{onFocus:j},...R&&{onMouseEnter:R},...P&&{onMouseLeave:P},...V&&{onTouchStart:V}};const Fe=De=>{T||ae&&fe()},tt=Fe,Se=De=>{if(!(T||!ae))if(!ce)fe();else{const be=De.target;if(y_.has(be))return;const me=setTimeout(()=>{y_.delete(be),fe()},ce);y_.set(be,me)}},et=De=>{if(T||!ae||!ce)return;const be=De.target,me=y_.get(be);me&&(clearTimeout(me),y_.delete(be))},pt=Te?i0(o,{})??l5e:LO,ie=Te?LO:i0(c,{})??LO,ue=[A,pt.className,ie.className].filter(Boolean).join(" "),Ne=(N||pt.style||ie.style)&&{...N,...pt.style,...ie.style};return{...L,...pt,...ie,href:W?.href,ref:a,onClick:b_([k,ke]),onFocus:b_([j,Fe]),onMouseEnter:b_([R,Se]),onMouseLeave:b_([P,et]),onTouchStart:b_([V,tt]),disabled:!!T,target:E,...Ne&&{style:Ne},...ue&&{className:ue},...T&&c5e,...Te&&u5e,...r&&d5e}}const LO={},l5e={className:"active"},c5e={role:"link","aria-disabled":!0},u5e={"data-status":"active","aria-current":"page"},d5e={"data-transitioning":"transitioning"},y_=new WeakMap,f5e={rootMargin:"100px"},b_=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}},ar=b.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:i,ref:s,...a}=o5e(r,t),o=typeof r.children=="function"?r.children({isActive:a["data-status"]==="active"}):r.children;return n===void 0&&delete a.disabled,b.createElement(n||"a",{...a,ref:s},o)});function h5e(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}let p5e=class extends $ae{constructor(t){super(t),this.useMatch=n=>zd({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>zd({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Ej({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>O9({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>I9({...n,from:this.id}),this.useLoaderData=n=>R9({...n,from:this.id}),this.useNavigate=()=>gs({from:this.fullPath}),this.Link=Y.forwardRef((n,r)=>l.jsx(ar,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}};function m5e(e){return new p5e(e)}function g5e(){return e=>v5e(e)}class x5e extends Gje{constructor(t){super(t),this.useMatch=n=>zd({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>zd({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Ej({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>O9({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>I9({...n,from:this.id}),this.useLoaderData=n=>R9({...n,from:this.id}),this.useNavigate=()=>gs({from:this.fullPath}),this.Link=Y.forwardRef((n,r)=>l.jsx(ar,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function v5e(e){return new x5e(e)}function nr(e){return typeof e=="object"?new bK(e,{silent:!0}).createRoute(e):new bK(e,{silent:!0}).createRoute}class bK{constructor(t,n){this.path=t,this.createRoute=r=>{this.silent;const i=m5e(r);return i.isRoot=!1,i},this.silent=n?.silent}}class _K{constructor(t){this.useMatch=n=>zd({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>zd({from:this.options.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Ej({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>O9({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>I9({...n,from:this.options.id}),this.useLoaderData=n=>R9({...n,from:this.options.id}),this.useNavigate=()=>{const n=Ho();return gs({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function wK(e){return typeof e=="object"?new _K(e):t=>new _K({id:e,...t})}function y5e(){const e=Ho(),t=b.useRef({router:e,mounted:!1}),[n,r]=b.useState(!1),{hasPendingMatches:i,isLoading:s}=mo({select:h=>({isLoading:h.isLoading,hasPendingMatches:h.matches.some(p=>p.status==="pending")}),structuralSharing:!0}),a=FO(s),o=s||n||i,c=FO(o),u=s||i,d=FO(u);return e.startTransition=h=>{r(!0),b.startTransition(()=>{h(),r(!1)})},b.useEffect(()=>{const h=e.history.subscribe(e.load),p=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return am(e.latestLocation.href)!==am(p.href)&&e.commitLocation({...p,replace:!0}),()=>{h()}},[e,e.history]),BT(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(p){console.error(p)}})()},[e]),BT(()=>{a&&!s&&e.emit({type:"onLoad",...a0(e.state)})}
76,[a,e,s]),BT(()=>{d&&!u&&e.emit({type:"onBeforeRouteMount",...a0(e.state)})},[u,d,e]),BT(()=>{c&&!o&&(e.emit({type:"onResolved",...a0(e.state)}),e.__store.setState(h=>({...h,status:"idle",resolvedLocation:h.location})),Tje(e))},[o,c,e]),null}function b5e(e){const t=mo({select:n=>`not-found-${n.location.pathname}-${n.status}`});return l.jsx(j9,{getResetKey:()=>t,onCatch:(n,r)=>{if(Ld(n))e.onCatch?.(n,r);else throw n},errorComponent:({error:n})=>{if(Ld(n))return e.fallback?.(n);throw n},children:e.children})}function _5e(){return l.jsx("p",{children:"Not Found"})}function Hv(e){return l.jsx(l.Fragment,{children:e.children})}function Hae(e,t,n){return t.options.notFoundComponent?l.jsx(t.options.notFoundComponent,{data:n}):e.options.defaultNotFoundComponent?l.jsx(e.options.defaultNotFoundComponent,{data:n}):l.jsx(_5e,{})}function w5e({children:e}){const t=Ho();return t.isServer?l.jsx("script",{nonce:t.options.ssr?.nonce,className:"$tsr",dangerouslySetInnerHTML:{__html:[e].filter(Boolean).join(` 77`)+";$_TSR.c()"}}):null}function S5e(){const e=Ho();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return null;const n=(e.options.getScrollRestorationKey||b6)(e.latestLocation),r=n!==b6(e.latestLocation)?n:void 0,i={storageKey:xN,shouldScrollRestoration:!0};return r&&(i.key=r),l.jsx(w5e,{children:`(${jae.toString()})(${JSON.stringify(i)})`})}const qae=b.memo(function({matchId:t}){const n=Ho(),r=mo({select:w=>{const S=w.matches.find(E=>E.id===t);return ph(S),{routeId:S.routeId,ssr:S.ssr,_displayPending:S._displayPending}},structuralSharing:!0}),i=n.routesById[r.routeId],s=i.options.pendingComponent??n.options.defaultPendingComponent,a=s?l.jsx(s,{}):null,o=i.options.errorComponent??n.options.defaultErrorComponent,c=i.options.onCatch??n.options.defaultOnCatch,u=i.isRoot?i.options.notFoundComponent??n.options.notFoundRoute?.options.component:i.options.notFoundComponent,d=r.ssr===!1||r.ssr==="data-only",h=(!i.isRoot||i.options.wrapInSuspense||d)&&(i.options.wrapInSuspense??s??(i.options.errorComponent?.preload||d))?b.Suspense:Hv,p=o?j9:Hv,g=u?b5e:Hv,v=mo({select:w=>w.loadedAt}),x=mo({select:w=>{const S=w.matches.findIndex(E=>E.id===t);return w.matches[S-1]?.routeId}}),_=i.isRoot?i.options.shellComponent??Hv:Hv;return l.jsxs(_,{children:[l.jsx(Sj.Provider,{value:t,children:l.jsx(h,{fallback:a,children:l.jsx(p,{getResetKey:()=>v,errorComponent:o||wj,onCatch:(w,S)=>{if(Ld(w))throw w;c?.(w,S)},children:l.jsx(g,{fallback:w=>
77{if(!u||w.routeId&&w.routeId!==r.routeId||!w.routeId&&!i.isRoot)throw w;return b.createElement(u,w)},children:d||r._displayPending?l.jsx(Yje,{fallback:a,children:l.jsx(SK,{matchId:t})}):l.jsx(SK,{matchId:t})})})})}),x===Ol&&n.options.scrollRestoration?l.jsxs(l.Fragment,{children:[l.jsx(E5e,{}),l.jsx(S5e,{})]}):null]})});function E5e(){const e=Ho(),t=b.useRef(void 0);return l.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...a0(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const SK=b.memo(function({matchId:t}){const n=Ho(),{match:r,key:i,routeId:s}=mo({select:c=>{const u=c.matches.find(v=>v.id===t),d=u.routeId,p=(n.routesById[d].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:d,loaderDeps:u.loaderDeps,params:u._strictParams,search:u._strictSearch});return{key:p?JSON.stringify(p):void 0,routeId:d,match:{id:u.id,status:u.status,error:u.error,_forcePending:u._forcePending,_displayPending:u._displayPending}}},structuralSharing:!0}),a=n.routesById[s],o=b.useMemo(()=>{const c=a.options.component??n.options.defaultComponent;return c?l.jsx(c,{},i):l.jsx(XS,{})},[i,a.options.component,n.options.defaultComponent]);if(r._displayPending)throw n.getMatch(r.id)?._nonReactive.displayPendingPromise;if(r._forcePending)throw n.getMatch(r.id)?._nonReactive.minPendingPromise;if(r.status==="pending"){const c=a.options.pendingMinMs??n.options.defaultPendingMinMs;if(c){const u=n.getMatch(r.id);if(u&&!u._nonReactive.minPendingPromise&&!n.isServer){const d=X1();u._nonReactive.minPendingPromise=d,setTimeout(()=>{d.resolve(),u._nonReactive.minPendingPromise=void 0},c)}}throw n.getMatch(r.id)?._nonReactive.loadPromise}if(r.status==="notFound")return ph(Ld(r.error)),Hae(n,a,r.error);if(r.status==="redirected")throw ph(wd(r.error)),n.getMatch(r.id)?._nonReactive.loadPromise;if(r.status==="error"){if(n.isServer){const c=(a.options.errorComponent??n.options.defaultErrorComponent)||wj;return l.jsx(c,{error:r.error,reset:void 0,info:{componentStack:""}})}throw r.error}return o}),XS=b.memo(function(){const t=Ho(),n=b.useContext(Sj),r=mo({select:u=>u.matches.find(d=>d.id===n)?.routeId}),i=t.routesById[r],s=mo({select:u=>{const h=u.matches.find(p=>p.id===n);return ph(h),h.globalNotFound}}),a=mo({select:u=>{const d=u.matches,h=d.findIndex(p=>p.id===n);return d[h+1]?.id}}),o=t.options.defaultPendingComponent?l.jsx(t.options.defaultPendingComponent,{}):null;if(s)return Hae(t,i,void 0);if(!a)return null;const c=l.jsx(qae,{matchId:a});return n===Ol?l.jsx(b.Suspense,{fallback:o,children:c}):c});function C5e(){const e=Ho(),t=e.options.defaultPendingComponent?l.jsx(e.options.defaultPendingComponent,{}):null,n=e.isServer||typeof document<"u"&&e.ssr?Hv:b.Suspense,r=l.jsxs(n,{fallback:t,children:[!e.isServer&&l.jsx(y5e,{}),l.jsx(T5e,{})]});return e.options.InnerWrap?l.jsx(e.options.InnerWrap,{children:r}):r}function T5e(){const e=Ho(),t=mo({select:i=>i.matches[0]?.id}),n=mo({select:i=>i.loadedAt}),r=t?l.jsx(qae,{matchId:t}):null;return l.jsx(Sj.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:l.jsx(j9,{getResetKey:()=>n,errorComponent:wj,onCatch:i=>{i.message||i.toString()},children:r})})}function A5e(e){return mo({select:t=>t.matches,structuralSharing:e?.structuralSharing})}const k5e=e=>new N5e(e);class N5e extends Bje{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=nr,globalThis.createLazyFileRoute=wK):typeof window<"u"&&(window.createFileRoute=nr,window.createLazyFileRoute=wK);function j5e({router:e,children:t,...n}){Object.keys(n).length>
vendor: 4,947 bytes, lines 77-97
770&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=Uae(),i=l.jsx(r.Provider,{value:e,children:t});return e.options.Wrap?l.jsx(e.options.Wrap,{children:i}):i}function R5e({router:e,...t}){return l.jsx(j5e,{router:e,...t,children:l.jsx(C5e,{})})}function I5e(e){return mo({select:t=>t.location})}function Wae(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Wae(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function P9(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Wae(e))&&(r&&(r+=" "),r+=t);return r}function $e(...e){return i9(P9(e))}function EK(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function gh(...e){return t=>{let n=!1;const r=e.map(i=>{const s=EK(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():EK(e[i],null)}}}}function Wn(...e){return b.useCallback(gh(...e),e)}function hm(e){const t=O5e(e),n=b.forwardRef((r,i)=>{const{children:s,...a}=r,o=b.Children.toArray(s),c=o.find(P5e);if(c){const u=c.props.children,d=o.map(h=>h===c?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:h);return l.jsx(t,{...a,ref:i,children:b.isValidElement(u)?b.cloneElement(u,void 0,d):null})}return l.jsx(t,{...a,ref:i,children:s})});return n.displayName=`${e}.Slot`,n}var sx=hm("Slot");function O5e(e){const t=b.forwardRef((n,r)=>{const{children:i,...s}=n;if(b.isValidElement(i)){const a=D5e(i),o=M5e(s,i.props);return i.type!==b.Fragment&&(o.ref=r?gh(r,a):a),b.cloneElement(i,o)}return b.Children.count(i)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Gae=Symbol("radix.slottable");function Kae(e){const t=({children:n})=>l.jsx(l.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Gae,t}function P5e(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Gae}function M5e(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...o)=>{const c=s(...o);return i(...o),c}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function D5e(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var F5e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],nn=F5e.reduce((e,t)=>{const n=hm(`Primitive.${t}`),r=b.forwardRef((i,s)=>{const{asChild:a,...o}=i,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...o,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Yae(e,t){e&&mh.flushSync(()=>e.dispatchEvent(t))}var sa=globalThis?.document?b.useLayoutEffect:()=>{},L5e="Portal",QS=b.forwardRef((e,t)=>{const{container:n,...r}=e,[i,s]=b.useState(!1);sa(()=>s(!0),[]);const a=n||i&&globalThis?.document?.body;return a?Vae.createPortal(l.jsx(nn.div,{...r,ref:t}),a):null});QS.displayName=L5e;/** 78 * @license lucide-react v0.525.0 - ISC 79 * 80 * This source code is licensed under the ISC license. 81 * See the LICENSE file in the root directory of this source tree. 82 */const z5e=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),$5e=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),CK=e=>{const t=$5e(e);return t.charAt(0).toUpperCase()+t.slice(1)},Xae=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),B5e=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/** 83 * @license lucide-react v0.525.0 - ISC 84 * 85 * This source code is licensed under the ISC license. 86 * See the LICENSE file in the root directory of this source tree. 87 */var U5e={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** 88 * @license lucide-react v0.525.0 - ISC 89 * 90 * This source code is licensed under the ISC license. 91 * See the LICENSE file in the root directory of this source tree. 92 */const V5e=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:a,...o},c)=>b.createElement("svg",{ref:c,...U5e,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Xae("lucide",i),...!s&&!B5e(o)&&{"aria-hidden":"true"},...o},[...a.map(([u,d])=>b.createElement(u,d)),...Array.isArray(s)?s:[s]]));/** 93 * @license lucide-react v0.525.0 - ISC 94 * 95 * This source code is licensed under the ISC license. 96 * See the LICENSE file in the root directory of this source tree. 97 */const st=(e,t)=>
97{const n=b.forwardRef(({className:r,...i},s)=>b.createElement(V5e,{ref:s,iconNode:t,className:Xae(`lucide-${z5e(CK(e))}`,`lucide-${e}`,r),...i}));return n.displayName=CK(e),n};/** 98 * @license lucide-react v0.525.0 - ISC 99 * 100 * This source code is licensed under the ISC license. 101 * See the LICENSE file in the root directory of this source tree. 102 */const H5e=[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"M11 4h4",key:"6d7r33"}],["path",{d:"M11 8h7",key:"djye34"}],["path",{d:"M11 12h10",key:"1438ji"}]],q5e=st("arrow-down-narrow-wide",H5e);/** 103 * @license lucide-react v0.525.0 - ISC 104 * 105 * This source code is licensed under the ISC license. 106 * See the LICENSE file in the root directory of this source tree. 107 */const W5e=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Tj=st("arrow-left",W5e);/** 108 * @license lucide-react v0.525.0 - ISC 109 * 110 * This source code is licensed under the ISC license. 111 * See the LICENSE file in the root directory of this source tree. 112 */const G5e=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Qae=st("arrow-right",G5e);/** 113 * @license lucide-react v0.525.0 - ISC 114 * 115 * This source code is licensed under the ISC license. 116 * See the LICENSE file in the root directory of this source tree. 117 */const K5e=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],Y5e=st("arrow-up-down",K5e);/** 118 * @license lucide-react v0.525.0 - ISC 119 * 120 * This source code is licensed under the ISC license. 121 * See the LICENSE file in the root directory of this source tree. 122 */const X5e=[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["path",{d:"M11 12h4",key:"q8tih4"}],["path",{d:"M11 16h7",key:"uosisv"}],["path",{d:"M11 20h10",key:"jvxblo"}]],Q5e=st("arrow-up-narrow-wide",X5e);/** 123 * @license lucide-react v0.525.0 - ISC 124 * 125 * This source code is licensed under the ISC license. 126 * See the LICENSE file in the root directory of this source tree. 127 */const Z5e=[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"M12 7v10",key:"jspqdw"}],["path",{d:"M15.4 10a4 4 0 1 0 0 4",key:"2eqtx8"}]],J5e=st("badge-cent",Z5e);/** 128 * @license lucide-react v0.525.0 - ISC 129 * 130 * This source code is licensed under the ISC license. 131 * See the LICENSE file in the root directory of this source tree. 132 */const e4e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]],w6=st("ban",e4e);/** 133 * @license lucide-react v0.525.0 - ISC 134 * 135 * This source code is licensed under the ISC license. 136 * See the LICENSE file in the root directory of this source tree. 137 */const t4e=[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"2",key:"9lu3g6"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M6 12h.01M18 12h.01",key:"113zkx"}]],Zae=st("banknote",t4e);/** 138 * @license lucide-react v0.525.0 - ISC 139 * 140 * This source code is licensed under the ISC license. 141 * See the LICENSE file in the root directory of this source tree. 142 */const n4e=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}]],r4e=st("bell-ring",n4e);/** 143 * @license lucide-react v0.525.0 - ISC 144 * 145 * This source code is licensed under the ISC license. 146 * See the LICENSE file in the root directory of this source tree. 147 */const i4e=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],s4e=st("bell",i4e);/** 148 * @license lucide-react v0.525.0 - ISC 149 * 150 * This source code is licensed under the ISC license. 151 * See the LICENSE file in the root directory of this source tree. 152 */const a4e=[["path",{d:"M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2",ke
152y:"1ah6g2"}],["rect",{x:"14",y:"2",width:"8",height:"8",rx:"1",key:"88lufb"}]],Jae=st("blocks",a4e);/** 153 * @license lucide-react v0.525.0 - ISC 154 * 155 * This source code is licensed under the ISC license. 156 * See the LICENSE file in the root directory of this source tree. 157 */const o4e=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M16 12h2",key:"7q9ll5"}],["path",{d:"M16 8h2",key:"msurwy"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}],["path",{d:"M6 12h2",key:"32wvfc"}],["path",{d:"M6 8h2",key:"30oboj"}]],l4e=st("book-open-text",o4e);/** 158 * @license lucide-react v0.525.0 - ISC 159 * 160 * This source code is licensed under the ISC license. 161 * See the LICENSE file in the root directory of this source tree. 162 */const c4e=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],TK=st("bot",c4e);/** 163 * @license lucide-react v0.525.0 - ISC 164 * 165 * This source code is licensed under the ISC license. 166 * See the LICENSE file in the root directory of this source tree. 167 */const u4e=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]],d4e=st("brain",u4e);/** 168 * @license lucide-react v0.525.0 - ISC 169 * 170 * This source code is licensed under the ISC license. 171 * See the LICENSE file in the root directory of this source tree. 172 */const f4e=[["path",{d:"M12.765 21.522a.5.5 0 0 1-.765-.424v-8.196a.5.5 0 0 1 .765-.424l5.878 3.674a1 1 0 0 1 0 1.696z",key:"17shqo"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M18 11a4 4 0 0 0-4-4h-4a4 4 0 0 0-4 4v3a6.1 6.1 0 0 0 2 4.5",key:"1tjixy"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}]],eoe=st("bug-play",f4e);/** 173 * @license lucide-react v0.525.0 - ISC 174 * 175 * This source code is licensed under the ISC license. 176 * See the LICENSE file in the root directory of this source tree. 177 */const h4e=[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]],AK=st("building",h4e);/** 178 * @license lucide-react v0.525.0 - ISC 179 * 180 * This source code is licensed under the ISC license. 181 * See the LICENSE file in the root directory of this source tree. 182 */const p4e=[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]],m4e=st("calendar-clock",p4e);/** 183 * @license lucide-react v0.525.0 - ISC 184 * 185 * This source code is licensed under the ISC license. 186 * See the LICENSE file in the root directory of this source tree. 187 */const g4e=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],x4e=st("calendar-days",g4e);/** 188 * @license lucide-react v0.525.0 - ISC 189 * 190 * This source code is licensed under the ISC license. 191 * See the LICENSE file in the root directory of this source tree. 192 */const v4e=[["path",{d:"M16 19h6",key:"xwg31i"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M19 16v6",key:"tddt3s"}],["path",{d:"M21 12.598V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8.5",key:"1glfrc"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 2v4",key:"1cmpym"}]],y4e=st("calendar-plus",v4e);/** 193 * @license lucide-react v0.525.0 - ISC 194 * 195 * This source code is licensed under the ISC license. 196 * See the LICENSE file in the root directory of this source tree. 197 */const b4e=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"m14 14-4 4",key:"rymu2i"}],["path",{d:"m10 14 4 4",key:"3sz06r"}]],_4e=st("calendar-x",b4e);/** 198 * @license lucide-react v0.525.0 - ISC 199 * 200 * This source code is licensed under the ISC license. 201 * See the LICENSE file in the root directory of this source tree. 202 */const w4e=[["line",{x1:"12",x2:"12",y1:"20",y2:"10",key:"1vz5eb"}],["line",{x1:"18",x2:"18",y1:"20",y2:"4",key:"cun8e5"}
202],["line",{x1:"6",x2:"6",y1:"20",y2:"16",key:"hq0ia6"}]],toe=st("chart-no-axes-column-increasing",w4e);/** 203 * @license lucide-react v0.525.0 - ISC 204 * 205 * This source code is licensed under the ISC license. 206 * See the LICENSE file in the root directory of this source tree. 207 */const S4e=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Es=st("check",S4e);/** 208 * @license lucide-react v0.525.0 - ISC 209 * 210 * This source code is licensed under the ISC license. 211 * See the LICENSE file in the root directory of this source tree. 212 */const E4e=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Xd=st("chevron-down",E4e);/** 213 * @license lucide-react v0.525.0 - ISC 214 * 215 * This source code is licensed under the ISC license. 216 * See the LICENSE file in the root directory of this source tree. 217 */const C4e=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Aj=st("chevron-left",C4e);/** 218 * @license lucide-react v0.525.0 - ISC 219 * 220 * This source code is licensed under the ISC license. 221 * See the LICENSE file in the root directory of this source tree. 222 */const T4e=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Qd=st("chevron-right",T4e);/** 223 * @license lucide-react v0.525.0 - ISC 224 * 225 * This source code is licensed under the ISC license. 226 * See the LICENSE file in the root directory of this source tree. 227 */const A4e=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],kj=st("chevron-up",A4e);/** 228 * @license lucide-react v0.525.0 - ISC 229 * 230 * This source code is licensed under the ISC license. 231 * See the LICENSE file in the root directory of this source tree. 232 */const k4e=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Nj=st("chevrons-up-down",k4e);/** 233 * @license lucide-react v0.525.0 - ISC 234 * 235 * This source code is licensed under the ISC license. 236 * See the LICENSE file in the root directory of this source tree. 237 */const N4e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],S0=st("circle-alert",N4e);/** 238 * @license lucide-react v0.525.0 - ISC 239 * 240 * This source code is licensed under the ISC license. 241 * See the LICENSE file in the root directory of this source tree. 242 */const j4e=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],R4e=st("circle-check-big",j4e);/** 243 * @license lucide-react v0.525.0 - ISC 244 * 245 * This source code is licensed under the ISC license. 246 * See the LICENSE file in the root directory of this source tree. 247 */const I4e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],jj=st("circle-check",I4e);/** 248 * @license lucide-react v0.525.0 - ISC 249 * 250 * This source code is licensed under the ISC license. 251 * See the LICENSE file in the root directory of this source tree. 252 */const O4e=[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]],P4e=st("circle-dashed",O4e);/** 253 * @license lucide-react v0.525.0 - ISC 254 * 255 * This source code is licensed under the ISC license. 256 * See the LICENSE file in the root directory of this source tree. 257 */const M4e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],D4e=st("circle-dot",M4e);/** 258 * @license lucide-react v0.525.0 - ISC 259 * 260 * This source code is licensed under the ISC license. 261 * See the LICENSE file in the root directory of this source tree. 262 */const F4e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}]],L4e=st("circle-minus",F4e);/** 263 * @license lucide-react v0.525.0 - ISC 264 * 265 * This source code is licensed under the ISC license. 266 * See the LICENSE file in the root directory of this source tree. 267 */const z4e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]],$4e=st("circle-pause",z4e);/** 268 * @license lucide-react v0.525.0 - ISC 269 * 270 * This source code is licensed under the ISC license. 271 * See the LICENSE file in the root directory of this source tree. 272 */const B4e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],ZS=st("circle-plus",B4e);/** 273 * @license lucide-react v0.525.0 - ISC 274 * 275 * This source code is licensed under the ISC license. 276 * See the LICENSE file in the root directory of this source tree. 277 */const U4e=[["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"}]],ax=st("circle-question-mark",U4e);/** 278 * @license lucide-react v0.525.0 - ISC 279 * 280 * This source code is licensed under the ISC license. 281 * See the LICENSE file in the root directory of this source tree. 282 */const V4e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],E0=st("circle-x",V4e);
282/** 283 * @license lucide-react v0.525.0 - ISC 284 * 285 * This source code is licensed under the ISC license. 286 * See the LICENSE file in the root directory of this source tree. 287 */const H4e=[["path",{d:"M11 14h10",key:"1w8e9d"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v1.344",key:"1e62lh"}],["path",{d:"m17 18 4-4-4-4",key:"z2g111"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113",key:"bjbb7m"}],["rect",{x:"8",y:"2",width:"8",height:"4",rx:"1",key:"ublpy"}]],q4e=st("clipboard-paste",H4e);/** 288 * @license lucide-react v0.525.0 - ISC 289 * 290 * This source code is licensed under the ISC license. 291 * See the LICENSE file in the root directory of this source tree. 292 */const W4e=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],S6=st("clock",W4e);/** 293 * @license lucide-react v0.525.0 - ISC 294 * 295 * This source code is licensed under the ISC license. 296 * See the LICENSE file in the root directory of this source tree. 297 */const G4e=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],M9=st("cloud",G4e);/** 298 * @license lucide-react v0.525.0 - ISC 299 * 300 * This source code is licensed under the ISC license. 301 * See the LICENSE file in the root directory of this source tree. 302 */const K4e=[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Y4e=st("compass",K4e);/** 303 * @license lucide-react v0.525.0 - ISC 304 * 305 * This source code is licensed under the ISC license. 306 * See the LICENSE file in the root directory of this source tree. 307 */const X4e=[["path",{d:"m12 15 2 2 4-4",key:"2c609p"}],["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],noe=st("copy-check",X4e);/** 308 * @license lucide-react v0.525.0 - ISC 309 * 310 * This source code is licensed under the ISC license. 311 * See the LICENSE file in the root directory of this source tree. 312 */const Q4e=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],zh=st("copy",Q4e);/** 313 * @license lucide-react v0.525.0 - ISC 314 * 315 * This source code is licensed under the ISC license. 316 * See the LICENSE file in the root directory of this source tree. 317 */const Z4e=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]],E6=st("corner-down-left",Z4e);/** 318 * @license lucide-react v0.525.0 - ISC 319 * 320 * This source code is licensed under the ISC license. 321 * See the LICENSE file in the root directory of this source tree. 322 */const J4e=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],T2=st("credit-card",J4e);/** 323 * @license lucide-react v0.525.0 - ISC 324 * 325 * This source code is licensed under the ISC license. 326 * See the LICENSE file in the root directory of this source tree. 327 */const eRe=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 12a9 3 0 0 0 5 2.69",key:"1ui2ym"}],["path",{d:"M21 9.3V5",key:"6k6cib"}],["path",{d:"M3 5v14a9 3 0 0 0 6.47 2.88",key:"i62tjy"}],["path",{d:"M12 12v4h4",key:"1bxaet"}],["path",{d:"M13 20a5 5 0 0 0 9-3 4.5 4.5 0 0 0-4.5-4.5c-1.33 0-2.54.54-3.41 1.41L12 16",key:"1f4ei9"}]],JS=st("database-backup",eRe);/** 328 * @license lucide-react v0.525.0 - ISC 329 * 330 * This source code is licensed under the ISC license. 331 * See the LICENSE file in the root directory of this source tree. 332 */const tRe=[["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"}]],nRe=st("download",tRe);/** 333 * @license lucide-react v0.525.0 - ISC 334 * 335 * This source code is licensed under the ISC license. 336 * See the LICENSE file in the root directory of this source tree. 337 */const rRe=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],J1=st("ellipsis",rRe);/** 338 * @license lucide-react v0.525.0 - ISC 339 * 340 * This source code is licensed under the ISC license. 341 * See the LICENSE file in the root directory of this source tree. 342 */const iRe=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],$d=st("external-link",iRe);/** 343 * @license lucide-react v0.525.0 - ISC 344 * 345 * This source code is licensed under the ISC license. 346 * See the LICENSE file in the root directory of this source tree. 347 */const sRe=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],D9=st("eye-off",sRe);/** 348 * @license lucide-react v0.525.0 - ISC 349 * 350 * This source code is licensed under the ISC license. 351 * See the LICENSE file in the root directory of this source tree. 352 */const aRe=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Ry=st("eye",aRe);/** 353 * @license lucide-react v0.525.0 - ISC 354 * 355 * This source code is licensed under the ISC license. 356 * See the LICENSE file in the root directory of this source tree. 357 */const oRe=[["path",{d:"M20 10V7l-5-5H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h4",key:"1rdf37"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M16 14a2 2 0 0 0-2 2",key:"ceaadl"}],["path",{d:"M20 14a2 2 0 0 1 2 2",key:"1ny6zw"}
357],["path",{d:"M20 22a2 2 0 0 0 2-2",key:"1l9q4k"}],["path",{d:"M16 22a2 2 0 0 1-2-2",key:"1wqh5n"}]],roe=st("file-scan",oRe);/** 358 * @license lucide-react v0.525.0 - ISC 359 * 360 * This source code is licensed under the ISC license. 361 * See the LICENSE file in the root directory of this source tree. 362 */const lRe=[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4.268 21a2 2 0 0 0 1.727 1H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"ms7g94"}],["path",{d:"m9 18-1.5-1.5",key:"1j6qii"}],["circle",{cx:"5",cy:"14",r:"3",key:"ufru5t"}]],cRe=st("file-search",lRe);/** 363 * @license lucide-react v0.525.0 - ISC 364 * 365 * This source code is licensed under the ISC license. 366 * See the LICENSE file in the root directory of this source tree. 367 */const uRe=[["path",{d:"m10 18 3-3-3-3",key:"18f6ys"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4 11V4a2 2 0 0 1 2-2h9l5 5v13a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h7",key:"50q2rw"}]],Rj=st("file-symlink",uRe);/** 368 * @license lucide-react v0.525.0 - ISC 369 * 370 * This source code is licensed under the ISC license. 371 * See the LICENSE file in the root directory of this source tree. 372 */const dRe=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],ioe=st("file-text",dRe);/** 373 * @license lucide-react v0.525.0 - ISC 374 * 375 * This source code is licensed under the ISC license. 376 * See the LICENSE file in the root directory of this source tree. 377 */const fRe=[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m8 12.5-5 5",key:"b853mi"}],["path",{d:"m3 12.5 5 5",key:"1qls4r"}]],hRe=st("file-x-2",fRe);/** 378 * @license lucide-react v0.525.0 - ISC 379 * 380 * This source code is licensed under the ISC license. 381 * See the LICENSE file in the root directory of this source tree. 382 */const pRe=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],Ij=st("file",pRe);/** 383 * @license lucide-react v0.525.0 - ISC 384 * 385 * This source code is licensed under the ISC license. 386 * See the LICENSE file in the root directory of this source tree. 387 */const mRe=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],gRe=st("flask-conical",mRe);/** 388 * @license lucide-react v0.525.0 - ISC 389 * 390 * This source code is licensed under the ISC license. 391 * See the LICENSE file in the root directory of this source tree. 392 */const xRe=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],vRe=st("folder-plus",xRe);/** 393 * @license lucide-react v0.525.0 - ISC 394 * 395 * This source code is licensed under the ISC license. 396 * See the LICENSE file in the root directory of this source tree. 397 */const yRe=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],bRe=st("folder",yRe);/** 398 * @license lucide-react v0.525.0 - ISC 399 * 400 * This source code is licensed under the ISC license. 401 * See the LICENSE file in the root directory of this source tree. 402 */const _Re=[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]],F9=st("gift",_Re);/** 403 * @license lucide-react v0.525.0 - ISC 404 * 405 * This source code is licensed under the ISC license. 406 * See the LICENSE file in the root directory of this source tree. 407 */const wRe=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["path",{d:"M11 18H8a2 2 0 0 1-2-2V9",key:"19pyzm"}]],SRe=st("git-compare",wRe);/** 408 * @license lucide-react v0.525.0 - ISC 409 * 410 * This source code is licensed under the ISC license. 411 * See the LICENSE file in the root directory of this source tree. 412 */const ERe=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}
412]],CRe=st("git-merge",ERe);/** 413 * @license lucide-react v0.525.0 - ISC 414 * 415 * This source code is licensed under the ISC license. 416 * See the LICENSE file in the root directory of this source tree. 417 */const TRe=[["path",{d:"M15.686 15A14.5 14.5 0 0 1 12 22a14.5 14.5 0 0 1 0-20 10 10 0 1 0 9.542 13",key:"qkt0x6"}],["path",{d:"M2 12h8.5",key:"ovaggd"}],["path",{d:"M20 6V4a2 2 0 1 0-4 0v2",key:"1of5e8"}],["rect",{width:"8",height:"5",x:"14",y:"6",rx:"1",key:"1fmf51"}]],ARe=st("globe-lock",TRe);/** 418 * @license lucide-react v0.525.0 - ISC 419 * 420 * This source code is licensed under the ISC license. 421 * See the LICENSE file in the root directory of this source tree. 422 */const kRe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Vu=st("globe",kRe);/** 423 * @license lucide-react v0.525.0 - ISC 424 * 425 * This source code is licensed under the ISC license. 426 * See the LICENSE file in the root directory of this source tree. 427 */const NRe=[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]],jRe=st("graduation-cap",NRe);/** 428 * @license lucide-react v0.525.0 - ISC 429 * 430 * This source code is licensed under the ISC license. 431 * See the LICENSE file in the root directory of this source tree. 432 */const RRe=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],IRe=st("grip-vertical",RRe);/** 433 * @license lucide-react v0.525.0 - ISC 434 * 435 * This source code is licensed under the ISC license. 436 * See the LICENSE file in the root directory of this source tree. 437 */const ORe=[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]],soe=st("image-off",ORe);/** 438 * @license lucide-react v0.525.0 - ISC 439 * 440 * This source code is licensed under the ISC license. 441 * See the LICENSE file in the root directory of this source tree. 442 */const PRe=[["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"}]],aoe=st("image",PRe);/** 443 * @license lucide-react v0.525.0 - ISC 444 * 445 * This source code is licensed under the ISC license. 446 * See the LICENSE file in the root directory of this source tree. 447 */const MRe=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],DRe=st("inbox",MRe);/** 448 * @license lucide-react v0.525.0 - ISC 449 * 450 * This source code is licensed under the ISC license. 451 * See the LICENSE file in the root directory of this source tree. 452 */const FRe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],ds=st("info",FRe);/** 453 * @license lucide-react v0.525.0 - ISC 454 * 455 * This source code is licensed under the ISC license. 456 * See the LICENSE file in the root directory of this source tree. 457 */const LRe=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],zRe=st("layers",LRe);/** 458 * @license lucide-react v0.525.0 - ISC 459 * 460 * This source code is licensed under the ISC license. 461 * See the LICENSE file in the root directory of this source tree.
462 */const $Re=[["rect",{width:"8",height:"18",x:"3",y:"3",rx:"1",key:"oynpb5"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M20.4 18.9c.2.5-.1 1.1-.6 1.3l-1.9.7c-.5.2-1.1-.1-1.3-.6L11.1 5.1c-.2-.5.1-1.1.6-1.3l1.9-.7c.5-.2 1.1.1 1.3.6Z",key:"1qboyk"}]],kK=st("library-big",$Re);/** 463 * @license lucide-react v0.525.0 - ISC 464 * 465 * This source code is licensed under the ISC license. 466 * See the LICENSE file in the root directory of this source tree. 467 */const BRe=[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]],URe=st("library",BRe);/** 468 * @license lucide-react v0.525.0 - ISC 469 * 470 * This source code is licensed under the ISC license. 471 * See the LICENSE file in the root directory of this source tree. 472 */const VRe=[["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"}]],ooe=st("link-2",VRe);/** 473 * @license lucide-react v0.525.0 - ISC 474 * 475 * This source code is licensed under the ISC license. 476 * See the LICENSE file in the root directory of this source tree. 477 */const HRe=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],qRe=st("link",HRe);/** 478 * @license lucide-react v0.525.0 - ISC 479 * 480 * This source code is licensed under the ISC license. 481 * See the LICENSE file in the root directory of this source tree. 482 */const WRe=[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]],GRe=st("list-checks",WRe);/** 483 * @license lucide-react v0.525.0 - ISC 484 * 485 * This source code is licensed under the ISC license. 486 * See the LICENSE file in the root directory of this source tree. 487 */const KRe=[["rect",{x:"3",y:"5",width:"6",height:"6",rx:"1",key:"1defrl"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]],YRe=st("list-todo",KRe);/** 488 * @license lucide-react v0.525.0 - ISC 489 * 490 * This source code is licensed under the ISC license. 491 * See the LICENSE file in the root directory of this source tree. 492 */const XRe=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Kr=st("loader-circle",XRe);/** 493 * @license lucide-react v0.525.0 - ISC 494 * 495 * This source code is licensed under the ISC license. 496 * See the LICENSE file in the root directory of this source tree. 497 */const QRe=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],pm=st("lock",QRe);/** 498 * @license lucide-react v0.525.0 - ISC 499 * 500 * This source code is licensed under the ISC license. 501 * See the LICENSE file in the root directory of this source tree. 502 */const ZRe=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],Oj=st("mail",ZRe);/** 503 * @license lucide-react v0.525.0 - ISC 504 * 505 * This source code is licensed under the ISC license. 506 * See the LICENSE file in the root directory of this source tree. 507 */const JRe=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],eIe=st("message-circle-x",JRe);/** 508 * @license lucide-react v0.525.0 - ISC 509 * 510 * This source code is licensed under the ISC license. 511 * See the LICENSE file in the root directory of this source tree. 512 */const tIe=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]],Pj=st("message-circle",tIe);/** 513 * @license lucide-react v0.525.0 - ISC 514 * 515 * This source code is licensed under the ISC license. 516 * See the LICENSE file in the root directory of this source tree. 517 */const nIe=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],rIe=st("moon",nIe);/** 518 * @license lucide-react v0.525.0 - ISC 519 * 520 * This source code is licensed under the ISC license. 521 * See the LICENSE file in the root directory of this source tree. 522 */const iIe=[["path",{d:"m16 16 2 2 4-4",key:"gfu2re"}],["path",{d:"M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}]],loe=st("package-check",iIe);/** 523 * @license lucide-react v0.525.0 - ISC 524 * 525 * This source code is licensed under the ISC license. 526 * See the LICENSE file in the root directory of this source tree. 527 */const sIe=[["path",{d:"M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}],["circle",{cx:"18.5",cy:"15.5",r:"2.5",key:"b5zd12"}],["path",{d:"M20.27 17.27 22 19",key:"1l4muz"}]],aIe=st("package-search",sIe);/** 528 * @license lucide-react v0.525.0 - ISC 529 * 530 * This source code is licensed under the ISC license. 531 * See the LICENSE file in the root directory of this source tree. 532 */const oIe=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],eE=st("package",oIe);/** 533 * @license lucide-react v0.525.0 - ISC 534 * 535 * This source code is licensed under the ISC license. 536 * See the LICENSE file in the root directory of this source tree. 537 */const lIe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],coe=st("panel-left",lIe);/** 538 * @license lucide-react v0.525.0 - ISC 539 * 540 * This source code is licensed under the ISC license. 541 * See the LICENSE file in the root directory of this source tree. 542 */const cIe=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],uIe=st("pause",cIe);/** 543 * @license lucide-react v0.525.0 - ISC 544 * 545 * This source code is licensed under the ISC license. 546 * See the LICENSE file in the root directory of this source tree. 547 */const dIe=[["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"}]],ju=st("pencil",dIe);/** 548 * @license lucide-react v0.525.0 - ISC 549 * 550 * This source code is licensed under the ISC license. 551 * See the LICENSE file in the root directory of this source tree. 552 */const fIe=[["path",{d:"M13 2a9 9 0 0 1 9 9",key:"1itnx2"}],["path",{d:"M13 6a5 5 0 0 1 5 5",key:"11nki7"}],["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2
5520 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],L9=st("phone-call",fIe);/** 553 * @license lucide-react v0.525.0 - ISC 554 * 555 * This source code is licensed under the ISC license. 556 * See the LICENSE file in the root directory of this source tree. 557 */const hIe=[["path",{d:"M10.1 13.9a14 14 0 0 0 3.732 2.668 1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2 18 18 0 0 1-12.728-5.272",key:"1wngk7"}],["path",{d:"M22 2 2 22",key:"y4kqgn"}],["path",{d:"M4.76 13.582A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 .244.473",key:"10hv5p"}]],pIe=st("phone-off",hIe);/** 558 * @license lucide-react v0.525.0 - ISC 559 * 560 * This source code is licensed under the ISC license. 561 * See the LICENSE file in the root directory of this source tree. 562 */const mIe=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],C6=st("phone",mIe);/** 563 * @license lucide-react v0.525.0 - ISC 564 * 565 * This source code is licensed under the ISC license. 566 * See the LICENSE file in the root directory of this source tree. 567 */const gIe=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],z9=st("play",gIe);/** 568 * @license lucide-react v0.525.0 - ISC 569 * 570 * This source code is licensed under the ISC license. 571 * See the LICENSE file in the root directory of this source tree. 572 */const xIe=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]],uoe=st("plug",xIe);/** 573 * @license lucide-react v0.525.0 - ISC 574 * 575 * This source code is licensed under the ISC license. 576 * See the LICENSE file in the root directory of this source tree. 577 */const vIe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Bd=st("plus",vIe);/** 578 * @license lucide-react v0.525.0 - ISC 579 * 580 * This source code is licensed under the ISC license. 581 * See the LICENSE file in the root directory of this source tree. 582 */const yIe=[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]],bIe=st("puzzle",yIe);/** 583 * @license lucide-react v0.525.0 - ISC 584 * 585 * This source code is licensed under the ISC license. 586 * See the LICENSE file in the root directory of this source tree. 587 */const _Ie=[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"2",key:"9lu3g6"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M17 12h.01",key:"1m0b6t"}],["path",{d:"M7 12h.01",key:"eqddd0"}]],wIe=st("rectangle-ellipsis",_Ie);/** 588 * @license lucide-react v0.525.0 - ISC 589 * 590 * This source code is licensed under the ISC license. 591 * See the LICENSE file in the root directory of this source tree. 592 */const SIe=[["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"}]],Lo=st("refresh-cw",SIe);/** 593 * @license lucide-react v0.525.0 - ISC 594 * 595 * This source code is licensed under the ISC license. 596 * See the LICENSE file in the root directory of this source tree. 597 */const EIe=[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]],CIe=st("repeat",EIe);/** 598 * @license lucide-react v0.525.0 - ISC 599 * 600 * This source code is licensed under the ISC license. 601 * See the LICENSE file in the root directory of this source tree. 602 */const TIe=[["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"}]],$9=st("rotate-ccw",TIe);/** 603 * @license lucide-react v0.525.0 - ISC 604 * 605 * This source code is licensed under the ISC license. 606 * See the LICENSE file in the root directory of this source tree. 607 */const AIe=[["path",{d:"M4 11a9 9 0 0 1 9 9",key:"pv89mb"}],["path",{d:"M4 4a16 16 0 0 1 16 16",key:"k0647b"}],["circle",{cx:"5",cy:"19",r:"1",key:"bfqh0e"}]],Mj=st("rss",AIe);/** 608 * @license lucide-react v0.525.0 - ISC 609 * 610 * This source code is licensed under the ISC license. 611 * See the LICENSE file in the root directory of this source tree. 612 */const kIe=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],NIe=st("save",kIe);/** 613 * @license lucide-react v0.525.0 - ISC 614 * 615 * This source code is licensed under the ISC license. 616 * See the LICENSE file in the root directory of this source tree. 617 */const jIe=[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}
617],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]],bN=st("scissors",jIe);/** 618 * @license lucide-react v0.525.0 - ISC 619 * 620 * This source code is licensed under the ISC license. 621 * See the LICENSE file in the root directory of this source tree. 622 */const RIe=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Iy=st("search",RIe);/** 623 * @license lucide-react v0.525.0 - ISC 624 * 625 * This source code is licensed under the ISC license. 626 * See the LICENSE file in the root directory of this source tree. 627 */const IIe=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],OIe=st("send",IIe);/** 628 * @license lucide-react v0.525.0 - ISC 629 * 630 * This source code is licensed under the ISC license. 631 * See the LICENSE file in the root directory of this source tree. 632 */const PIe=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Dj=st("settings",PIe);/** 633 * @license lucide-react v0.525.0 - ISC 634 * 635 * This source code is licensed under the ISC license. 636 * See the LICENSE file in the root directory of this source tree. 637 */const MIe=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],_N=st("shield",MIe);/** 638 * @license lucide-react v0.525.0 - ISC 639 * 640 * This source code is licensed under the ISC license. 641 * See the LICENSE file in the root directory of this source tree. 642 */const DIe=[["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}],["path",{d:"M3.103 6.034h17.794",key:"awc11p"}],["path",{d:"M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z",key:"o988cm"}]],FIe=st("shopping-bag",DIe);/** 643 * @license lucide-react v0.525.0 - ISC 644 * 645 * This source code is licensed under the ISC license. 646 * See the LICENSE file in the root directory of this source tree. 647 */const LIe=[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]],zIe=st("shopping-cart",LIe);/** 648 * @license lucide-react v0.525.0 - ISC 649 * 650 * This source code is licensed under the ISC license. 651 * See the LICENSE file in the root directory of this source tree. 652 */const $Ie=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]],BIe=st("sparkles",$Ie);/** 653 * @license lucide-react v0.525.0 - ISC 654 * 655 * This source code is licensed under the ISC license. 656 * See the LICENSE file in the root directory of this source tree. 657 */const UIe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"m12 8-4 4 4 4",key:"15vm53"}],["path",{d:"M16 12H8",key:"1fr5h0"}]],VIe=st("square-arrow-left",UIe);/** 658 * @license lucide-react v0.525.0 - ISC 659 * 660 * This source code is licensed under the ISC license. 661 * See the LICENSE file in the root directory of this source tree. 662 */const HIe=[["path",{d:"M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6",key:"y09zxi"}
662],["path",{d:"m21 3-9 9",key:"mpx6sq"}],["path",{d:"M15 3h6v6",key:"1q9fwt"}]],qIe=st("square-arrow-out-up-right",HIe);/** 663 * @license lucide-react v0.525.0 - ISC 664 * 665 * This source code is licensed under the ISC license. 666 * See the LICENSE file in the root directory of this source tree. 667 */const WIe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 10h10",key:"1101jm"}],["path",{d:"M7 14h10",key:"1mhdw3"}]],GIe=st("square-equal",WIe);/** 668 * @license lucide-react v0.525.0 - ISC 669 * 670 * This source code is licensed under the ISC license. 671 * See the LICENSE file in the root directory of this source tree. 672 */const KIe=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],YIe=st("square-pen",KIe);/** 673 * @license lucide-react v0.525.0 - ISC 674 * 675 * This source code is licensed under the ISC license. 676 * See the LICENSE file in the root directory of this source tree. 677 */const XIe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],QIe=st("square",XIe);/** 678 * @license lucide-react v0.525.0 - ISC 679 * 680 * This source code is licensed under the ISC license. 681 * See the LICENSE file in the root directory of this source tree. 682 */const ZIe=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],JIe=st("sun",ZIe);/** 683 * @license lucide-react v0.525.0 - ISC 684 * 685 * This source code is licensed under the ISC license. 686 * See the LICENSE file in the root directory of this source tree. 687 */const eOe=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],B9=st("tag",eOe);/** 688 * @license lucide-react v0.525.0 - ISC 689 * 690 * This source code is licensed under the ISC license. 691 * See the LICENSE file in the root directory of this source tree. 692 */const tOe=[["path",{d:"m15 5 6.3 6.3a2.4 2.4 0 0 1 0 3.4L17 19",key:"1cbfv1"}],["path",{d:"M9.586 5.586A2 2 0 0 0 8.172 5H3a1 1 0 0 0-1 1v5.172a2 2 0 0 0 .586 1.414L8.29 18.29a2.426 2.426 0 0 0 3.42 0l3.58-3.58a2.426 2.426 0 0 0 0-3.42z",key:"135mg7"}],["circle",{cx:"6.5",cy:"9.5",r:".5",fill:"currentColor",key:"5pm5xn"}]],doe=st("tags",tOe);/** 693 * @license lucide-react v0.525.0 - ISC 694 * 695 * This source code is licensed under the ISC license. 696 * See the LICENSE file in the root directory of this source tree. 697 */const nOe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],foe=st("target",nOe);/** 698 * @license lucide-react v0.525.0 - ISC 699 * 700 * This source code is licensed under the ISC license. 701 * See the LICENSE file in the root directory of this source tree. 702 */const rOe=[["path",{d:"M21 7 6.82 21.18a2.83 2.83 0 0 1-3.99-.01a2.83 2.83 0 0 1 0-4L17 3",key:"1ub6xw"}],["path",{d:"m16 2 6 6",key:"1gw87d"}],["path",{d:"M12 16H4",key:"1cjfip"}]],iOe=st("test-tube-diagonal",rOe);/** 703 * @license lucide-react v0.525.0 - ISC 704 * 705 * This source code is licensed under the ISC license. 706 * See the LICENSE file in the root directory of this source tree. 707 */const sOe=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],bo=st("trash-2",sOe);/** 708 * @license lucide-react v0.525.0 - ISC 709 * 710 * This source code is licensed under the ISC license. 711 * See the LICENSE file in the root directory of this source tree. 712 */const aOe=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}
712],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]],U9=st("trash",aOe);/** 713 * @license lucide-react v0.525.0 - ISC 714 * 715 * This source code is licensed under the ISC license. 716 * See the LICENSE file in the root directory of this source tree. 717 */const oOe=[["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"}]],tE=st("triangle-alert",oOe);/** 718 * @license lucide-react v0.525.0 - ISC 719 * 720 * This source code is licensed under the ISC license. 721 * See the LICENSE file in the root directory of this source tree. 722 */const lOe=[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]],hoe=st("truck",lOe);/** 723 * @license lucide-react v0.525.0 - ISC 724 * 725 * This source code is licensed under the ISC license. 726 * See the LICENSE file in the root directory of this source tree. 727 */const cOe=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],V9=st("upload",cOe);/** 728 * @license lucide-react v0.525.0 - ISC 729 * 730 * This source code is licensed under the ISC license. 731 * See the LICENSE file in the root directory of this source tree. 732 */const uOe=[["path",{d:"M11.5 15H7a4 4 0 0 0-4 4v2",key:"15lzij"}],["path",{d:"M21.378 16.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1817ys"}],["circle",{cx:"10",cy:"7",r:"4",key:"e45bow"}]],dOe=st("user-pen",uOe);/** 733 * @license lucide-react v0.525.0 - ISC 734 * 735 * This source code is licensed under the ISC license. 736 * See the LICENSE file in the root directory of this source tree. 737 */const fOe=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]],hOe=st("user-x",fOe);/** 738 * @license lucide-react v0.525.0 - ISC 739 * 740 * This source code is licensed under the ISC license. 741 * See the LICENSE file in the root directory of this source tree. 742 */const pOe=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],mOe=st("user",pOe);/** 743 * @license lucide-react v0.525.0 - ISC 744 * 745 * This source code is licensed under the ISC license. 746 * See the LICENSE file in the root directory of this source tree. 747 */const gOe=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],poe=st("users",gOe);/** 748 * @license lucide-react v0.525.0 - ISC 749 * 750 * This source code is licensed under the ISC license. 751 * See the LICENSE file in the root directory of this source tree. 752 */const xOe=[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]],NK=st("wallet",xOe);/** 753 * @license lucide-react v0.525.0 - ISC 754 * 755 * This source code is licensed under the ISC license. 756 * See the LICENSE file in the root directory of this source tree. 757 */const vOe=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],yOe=st("workflow",vOe);/** 758 * @license lucide-react v0.525.0 - ISC 759 * 760 * This source code is licensed under the ISC license. 761 * See the LICENSE file in the root directory of this source tree. 762 */const bOe=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]],A2=st("wrench",bOe);/** 763 * @license lucide-react v0.525.0 - ISC 764 * 765 * This source code is licensed under the ISC license. 766 * See the LICENSE file in the root directory of this source tree. 767 */const _Oe=[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 1,866 bytes, line 767
767],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],pl=st("x",_Oe),jK=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,RK=P9,Zl=(e,t)=>n=>{var r;if(t?.variants==null)return RK(e,n?.class,n?.className);const{variants:i,defaultVariants:s}=t,a=Object.keys(i).map(u=>{const d=n?.[u],h=s?.[u];if(d===null)return null;const p=jK(d)||jK(h);return i[u][p]}),o=n&&Object.entries(n).reduce((u,d)=>{let[h,p]=d;return p===void 0||(u[h]=p),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:h,className:p,...g}=d;return Object.entries(g).every(v=>{let[x,_]=v;return Array.isArray(_)?_.includes({...s,...o}[x]):{...s,...o}[x]===_})?[...u,h,p]:u},[]);return RK(e,a,c,n?.class,n?.className)},kd=qi({ring:"outline-none ring-ring focus:ring-2 focus:ring-offset-2",ringVisible:"outline-none ring-ring focus-visible:ring-2 focus-visible:ring-offset-2"},"global"),T6=qi({button:`${kd.ring} outline-none box-border inline-flex font-semibold items-center justify-center rounded-radius transition-all disabled:opacity-65 disabled:cursor-not-allowed`,plain:"border-none",variants:{variant:{primary:"bg-primary border-primary text-primary-fg hover:bg-primary/80 active:bg-primary/90 ring-primary",secondary:"bg-secondary border-secondary text-secondary-fg hover:bg-secondary/80 active:bg-secondary/90 ring-secondary",muted:"bg-muted border-muted text-muted-fg hover:bg-muted/80 active:bg-muted/90 ring-muted",success:"bg-success border-success text-success-fg hover:bg-success/80 active:bg-success/90 ring-success",danger:"bg-danger border-danger text-danger-fg hover:bg-danger/80 active:bg-danger/90 ring-danger",warning:"bg-warning border-warning text-warning-fg hover:bg-warning/80 active:bg-warning/90 ring-warning",info:"bg-info border-info text-info-fg hover:bg-info/80 active:bg-info/90 ring-info",ghost:"text-foreground border-transparent hover:bg-foreground
767/5 active:bg-foreground/10 ring-foreground",link:"text-foreground hover:text-foreground/70 active:text-foreground/90 underline-offset-4 hover:underline ring-foreground"},size:{xs:"min-h-7 py-1 px-2 text-xs gap-x-1",sm:"min-h-9 py-1 px-3 text-sm gap-x-1",md:"min-h-10 py-1.5 px-4 text-sm gap-x-1",lg:"min-h-11 py-1.5 px-5 text-base gap-x-1.5",xl:"min-h-12 py-2 px-6 text-lg gap-x-2","icon-xs":"size-7","icon-sm":"size-9","icon-md":"size-10","icon-lg":"size-11","icon-xl":"size-12"},outline:{primary:"bg-background border text-primary hover:bg-primary/10 active:bg-primary/15",secondary:"bg-background border text-secondary hover:bg-secondary/10 active:bg-secondary/15",muted:"bg-background border text-default hover:bg-default/10 active:bg-default/15",success:"bg-background border text-success hover:bg-success/10 active:bg-success/15",danger:"bg-background border text-danger hover:bg-danger/10 active:bg-danger/15",warning:"bg-background border text-warning hover:bg-warning/10 active:bg-warning/15",info:"bg-background border text-info hover:bg-info/10 active:bg-info/15",ghost:"bg-background border border-primary/25",link:"bg-background border border-primary"}}},"button"),moe=Zl(T6.button,{variants:T6.variants}),Oe=b.forwardRef(({className:e,children:t,type:n="button",variant:r="primary",size:i="md",outline:s=!1,asChild:a=!1,loading:o=!1,plain:c=!1,...u},d)=>{const h=a?sx:"button",p=o?l.jsx(Kr,{className:"animate-spin",size:i==="lg"?18:16}):u.icon;return l.jsx(h,{type:a?void 0:n,className:$e(moe({variant:r,size:i,outline:(s||c)&&r?r:null}),c&&T6.plain,e),ref:d,...u,children:a?t:l.jsxs(l.Fragment,{children:[p,t]})})}),A6=qi({badge:"rounded-radius text-center font-semibold inline-flex items-center transition-all",plain:"border-none",variants:{variant:{primary:"bg-primary border-primary text-primary-fg",secondary:"bg-secondary border-secondary text-secondary-fg",muted:"bg-muted border-muted text-muted-fg",success:"bg-success border-success text-success-fg",danger:"bg-danger border-danger text-danger-fg",warning:"bg-warning border-warning text-warning-fg",info:"bg-info text-info-fg",ghost:"text-foreground border-transparent",link:"text-foreground border-transparent underline underline-offset-4"},size:{xs:"min-h-5 px-1 gap-1 text-[10px]",sm:"min-h-6 py-[2px] px-1.5 gap-1 text-xs",md:"min-h-7 py-[2px] px-2 gap-1 text-xs",lg:"min-h-9 py-1 px-3 gap-1.5 text-sm",xl:"min-h-10 py-1 px-3 gap-2 text-base"},outline:{primary:"bg-background border text-primary",secondary:"bg-background border text-secondary",muted:"bg-background border text-muted",success:"bg-background border text-success",danger:"bg-background border text-danger",warning:"bg-background border text-warning",info:"bg-background border text-info",ghost:"bg-background border",link:"bg-background border"},disabled:{DEFAULT:"opacity-65 cursor-not-allowed"}}},"badge"),wOe=Zl(A6.badge,{variants:A6.variants}),En=b.memo(function({className:t,variant:n="primary",size:r="md",outline:i=!1,disabled:s=!1,plain:a=!1,...o}){return l.jsx("span",{className:$e(wOe({variant:n,size:r,outline:(i||a)&&n?n:null,disabled:s?"DEFAULT":null,className:t}),a&&A6.plain),...o})});function SOe(e,t){const n=b.createContext(t),r=s=>{const{children:a,...o}=s,c=b.useMemo(()=>o,Object.values(o));return l.jsx(n.Provider,{value:c,children:a})};r.displayName=e+"Provider";function i(s){const a=b.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,i]}function Ia(e,t=[]){let n=[];function r(s,a){const o=b.createContext(a),c=n.length;n=[...n,a];const u=h=>{const{scope:p,children:g,...v}=h,x=p?.[e]?.[c]||o,_=b.useMemo(()=>v,Object.values(v));return l.jsx(x.Provider,{value:_,children:g})};u.displayName=s+"Provider";function d(h,p){const g=p?.[e]?.[c]||o,v=b.useContext(g);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${h}\` must be used within \`${s}\``)}return[u,d]}const i=()=>{const s=n.map(a=>b.createContext(a));return function(o){const c=o?.[e]||s;return b.useMemo(()=>({[`__scope${e}`]:{...o,[e]:c}}),[o,c])}};return i.scopeName=e,[r,EOe(i,...t)]}function EOe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=r.reduce((o,{useScope:c,scopeName:u})=>{const h=c(s)[`__scope${u}`];return{...o,...h}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:a}
767),[a])}};return n.scopeName=t.scopeName,n}function wa(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...n)=>t.current?.(...n),[])}var COe=Bae();function TOe(){return COe.useSyncExternalStore(AOe,()=>!0,()=>!1)}function AOe(){return()=>{}}var H9="Avatar",[kOe]=Ia(H9),[NOe,goe]=kOe(H9),xoe=b.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,s]=b.useState("idle");return l.jsx(NOe,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:s,children:l.jsx(nn.span,{...r,ref:t})})});xoe.displayName=H9;var voe="AvatarImage",yoe=b.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...s}=e,a=goe(voe,n),o=jOe(r,s),c=wa(u=>{i(u),a.onImageLoadingStatusChange(u)});return sa(()=>{o!=="idle"&&c(o)},[o,c]),o==="loaded"?l.jsx(nn.img,{...s,ref:t,src:r}):null});yoe.displayName=voe;var boe="AvatarFallback",_oe=b.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,s=goe(boe,n),[a,o]=b.useState(r===void 0);return b.useEffect(()=>{if(r!==void 0){const c=window.setTimeout(()=>o(!0),r);return()=>window.clearTimeout(c)}},[r]),a&&s.imageLoadingStatus!=="loaded"?l.jsx(nn.span,{...i,ref:t}):null});_oe.displayName=boe;function IK(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function jOe(e,{referrerPolicy:t,crossOrigin:n}){const r=TOe(),i=b.useRef(null),s=r?(i.current||(i.current=new window.Image),i.current):null,[a,o]=b.useState(()=>IK(s,e));return sa(()=>{o(IK(s,e))},[s,e]),sa(()=>{const c=h=>()=>{o(h)};if(!s)return;const u=c("loaded"),d=c("error");return s.addEventListener("load",u),s.addEventListener("error",d),t&&(s.referrerPolicy=t),typeof n=="string"&&(s.crossOrigin=n),()=>{s.removeEventListener("load",u),s.removeEventListener("error",d)}},[s,n,t]),a}var ROe=xoe,IOe=yoe,OOe=_oe;const wN=qi({avatar:"relative bg-muted flex h-10 w-10 shrink-0 overflow-hidden rounded-full",image:"aspect-square h-full w-full duration-300 animate-in fade-in",fallback:"flex h-full w-full items-center justify-center rounded-full bg-muted text-muted-fg",variants:{size:{xs:"h-7 w-7 text-xs",sm:"h-8 w-8 text-xs",md:"h-10 w-10 text-sm",lg:"h-12 w-12 text-lg",xl:"h-14 w-14 text-xl","2xl":"h-16 w-16 text-2xl","3xl":"h-20 w-20 text-3xl","4xl":"h-24 w-24 text-4xl","5xl":"h-28 w-28 text-5xl","6xl":"h-32 w-32 text-6xl","7xl":"h-36 w-36 text-6xl","8xl":"h-40 w-40 text-6xl","9xl":"h-44 w-44 text-7xl"}}},"avatar"),POe=Zl(wN.avatar,{variants:wN.variants}),MOe=b.forwardRef(({className:e,...t},n)=>l.jsx(OOe,{ref:n,className:$e(wN.fallback,e),...t})),DOe=b.forwardRef(({className:e,...t},n)=>l.jsx(IOe,{ref:n,className:$e(wN.image,e),...t})),woe=b.forwardRef(({className:e,fallback:t,delayMs:n,size:r,src:i,alt:s,onLoadingStatusChange:a,...o},c)=>l.jsxs(ROe,{ref:c,className:$e(POe({size:r}),e),...o,children:[l.jsx(DOe,{onLoadingStatusChange:a,src:i,alt:s}),l.jsx(MOe,{delayMs:n,children:t})]}));var FOe="Label",Soe=b.forwardRef((e,t)=>l.jsx(nn.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Soe.displayName=FOe;var LOe=Soe;const OK=qi({label:"cursor-pointer text-foreground font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70",variants:{size:{xs:"text-xs leading-3",sm:"text-xs leading-4",md:"text-sm leading-5",lg:"text-base leading-6",xl:"text-lg leading-7"}}},"label"),zOe=Zl(OK.label,{variants:OK.variants}),ot=b.forwardRef(function({className:t,size:n="md",...r},i){return l.jsx(LOe,{ref:i,className:$e(zOe({size:n}),t),...r})}),Oy=qi({table:"w-full caption-bottom text-sm bg-background",body:"[&_tr:last-child]:border-0",foot:"border-t bg-muted/25 font-medium [&>tr]:last:border-b-0",head:"h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&_tr]:border-b",col:"p-4 align-middle [&:has([role=checkbox])]:pr-0",row:"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",hRow:"text-foreground",hCol:"h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0"},"table"),q9=b.memo(function({className:t,...n}){return l.jsx("div",{className:"rounded-radius border-border relative w-full overflow-auto border",children:l.jsx("table",{className:$e(Oy.table,t),...n})})}),Fj=b.memo(function({className:t,...n}){return l.jsx("tbody",{className:$e(Oy.body,t),...n})}),Ba=b.memo(function({className:t,...n}){return l.jsx("td",{className:$e(Oy.col,t),...n})}),oo=b.memo(function({className:t,children:n,...r}){return l.jsx("th",{className:$e(Oy.hCol,t),...r,children:n})}),Lj=b.memo(function({className:t,...n}){return l.jsx("thead",{className:$e(Oy.head,t),...n})}),oh=b.memo(function({className:t,...n}){return l.jsx("tr",{className:$e(Oy.row,t),...n})}),lo=qi({wrapper:"flex items-center",container:"w-full relative flex items-center",input:`${kd.ring} ring-input-border peer transition-all text-input-fg font-normal flex w-full rounded-radius border placeholder-placeholder bg-input focus:border-input-fg disabled:cursor-not-allowed disabled:opacity-60`,addon:{base:"inline-flex items-center justify-center bg-accent w-fit",before:"rounded-l-radius rounded-r-none border-r-0",after:"rounded-r-radius rounded-l-none border-l-0"},passwordPreview:{button:"absolute top-auto right-3 text-primary hover:text-primary/65 transition-colors",icon:"size-5"},variants:{size:{xs:"h-6 px-2 py-1.5 text-xs",sm:"h-7 px-2 py-1.5 text-xs",md:"h-9 px-3 py-2 text-sm",lg:"h-11 px-3 py-3 text-base"},iconSize:{xs:"size-3",sm:"size-4",md:"size-5",lg:"size-6"},variant:{default:"border-input-border focus:border-input-fg hover:border-input-fg",danger:"border-danger focus:border-danger hover:border-danger/30",success:"border-success focus:border-success hover:border-success/30",warning:"border-warning focus:border-warning hover:border-warning/30",info:"border-info focus:border-info hover:border-info/30"}}},"input"),Qg=Zl(lo.input,{variants:lo.variants}),fn=b.forwardRef(function({className:t,size:n="md",variant:r="default",addonBefore:i,addonAfter:s,passwordPreview:a,type:o,...c},u){const[d,h]=b.useState(!1),p=l.jsxs("div",{className:lo.container,children:[l.jsx("input",{ref:u,type:o==="password"&&d?"text":o,className:$e(Qg({size:n,variant:r}),i&&"rounded-l-none",s&&"rounded-r-none",t),...c}),a&&o==="password"&&l.jsx("button",{type:"button",className:lo.passwordPreview.button,onClick:()=>h(g=>!g),children:d?l.jsx(D9,{className:lo.passwordPreview.icon}):l.jsx(Ry,{className:lo.passwordPreview.icon})})]});return!s&&!i?p:l.jsxs("div",{className:lo.wrapper,children:[i&&l.jsx("span",{className:$e(Qg({size:n}),lo.addon.base,lo.addon.before),children:i}),p,s&&l.jsx("span",{className:$e(Qg({size:n}),lo.addon.base,lo.addon.after),children:s})]})}),xh=b.forwardRef(function({className:t,size:n="md",variant:r="default",addonBefore:i,addonAfter:s,...a},o){return!s&&!i&&l.jsx("textarea",{ref:o,className:$e(Qg({size:n,variant:r}),"h-auto",t),...a}),l.jsxs("div",{className:$e(lo.wrapper,"items-stretch"),children:[i&&l.jsx("span",{className:$e(Qg({size:n}),lo.addon.base,lo.addon.before,"h-auto"),children:i}),l.jsx("textarea",{ref:o,className:$e(Qg({size:n,variant:r}),i&&"rounded-l-none",s&&"rounded-r-none","h-auto",t),...a}),s&&l.jsx("span",{className:$e(Qg({size:n}),lo.addon.base,lo.addon.after,"h-auto"),children:s})]})});function qt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function $Oe(e,t=globalThis?.document){const n=wa(e);b.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}
vendor: 5,633 bytes, line 767
767var BOe="DismissableLayer",k6="dismissableLayer.update",UOe="dismissableLayer.pointerDownOutside",VOe="dismissableLayer.focusOutside",PK,Eoe=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Py=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,onDismiss:o,...c}=e,u=b.useContext(Eoe),[d,h]=b.useState(null),p=d?.ownerDocument??globalThis?.document,[,g]=b.useState({}),v=Wn(t,k=>h(k)),x=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=x.indexOf(_),S=d?x.indexOf(d):-1,E=u.layersWithOutsidePointerEventsDisabled.size>0,T=S>=w,N=WOe(k=>{const j=k.target,R=[...u.branches].some(P=>P.contains(j));!T||R||(i?.(k),a?.(k),k.defaultPrevented||o?.())},p),A=GOe(k=>{const j=k.target;[...u.branches].some(P=>P.contains(j))||(s?.(k),a?.(k),k.defaultPrevented||o?.())},p);return $Oe(k=>{S===u.layers.size-1&&(r?.(k),!k.defaultPrevented&&o&&(k.preventDefault(),o()))},p),b.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(PK=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),MK(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=PK)}},[d,p,n,u]),b.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),MK())},[d,u]),b.useEffect(()=>{const k=()=>g({});return document.addEventListener(k6,k),()=>document.removeEventListener(k6,k)},[]),l.jsx(nn.div,{...c,ref:v,style:{pointerEvents:E?T?"auto":"none":void 0,...e.style},onFocusCapture:qt(e.onFocusCapture,A.onFocusCapture),onBlurCapture:qt(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:qt(e.onPointerDownCapture,N.onPointerDownCapture)})});Py.displayName=BOe;var HOe="DismissableLayerBranch",qOe=b.forwardRef((e,t)=>{const n=b.useContext(Eoe),r=b.useRef(null),i=Wn(t,r);return b.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),l.jsx(nn.div,{...e,ref:i})});qOe.displayName=HOe;function WOe(e,t=globalThis?.document){const n=wa(e),r=b.useRef(!1),i=b.useRef(()=>{});return b.useEffect(()=>{const s=o=>{if(o.target&&!r.current){let c=function(){Coe(UOe,n,u,{discrete:!0})};const u={originalEvent:o};o.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=c,t.addEventListener("click",i.current,{once:!0})):c()}else t.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function GOe(e,t=globalThis?.document){const n=wa(e),r=b.useRef(!1);return b.useEffect(()=>{const i=s=>{s.target&&!r.current&&Coe(VOe,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function MK(){const e=new CustomEvent(k6);document.dispatchEvent(e)}function Coe(e,t,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Yae(i,s):i.dispatchEvent(s)}var KOe=pj[" useId ".trim().toString()]||(()=>{}),YOe=0;function Na(e){const[t,n]=b.useState(KOe());return sa(()=>{n(r=>r??String(YOe++))},[e]),e||(t?`radix-${t}`:"")}const XOe=["top","right","bottom","left"],mm=Math.min,Fl=Math.max,SN=Math.round,UT=Math.floor,Nd=e=>({x:e,y:e}),QOe={left:"right",right:"left",bottom:"top",top:"bottom"},ZOe={start:"end",end:"start"};function N6(e,t,n){return Fl(e,mm(t,n))}function vh(e,t){return typeof e=="function"?e(t):e}function yh(e){return e.split("-")[0]}function My(e){return e.split("-")[1]}function W9(e){return e==="x"?"y":"x"}function G9(e){return e==="y"?"height":"width"}const JOe=new Set(["top","bottom"]);function Sd(e){return JOe.has(yh(e))?"y":"x"}function K9(e){return W9(Sd(e))}function ePe(e,t,n){n===void 0&&(n=!1);const r=My(e),i=K9(e),s=G9(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=EN(a)),[a,EN(a)]}function tPe(e){const t=EN(e);return[j6(e),t,j6(t)]}function j6(e){return e.replace(/start|end/g,t=>ZOe[t])}const DK=["left","right"],FK=["right","left"],nPe=["top","bottom"],rPe=["bottom","top"];function iPe(e,t,n){switch(e){case"top":case"bottom":return n?t?FK:DK:t?DK:FK;case"left":case"right":return t?nPe:rPe;default:return[]}}function sPe(e,t,n,r){const i=My(e);let s=iPe(yh(e),n==="start",r);return i&&(s=s.map(a=>a+"-"+i),t&&(s=s.concat(s.map(j6)))),s}function EN(e){return e.replace(/left|right|bottom|top/g,t=>QOe[t])}function aPe(e){return{top:0,right:0,bottom:0,left:0,...e}}function Toe(e){return typeof e!="number"?aPe(e):{top:e,right:e,bottom:e,left:e}}function CN(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function LK(e,t,n){let{reference:r,floating:i}=e;const s=Sd(t),a=K9(t),o=G9(a),c=yh(t),u=s==="y",d=r.x+r.width/2-i.width/2,h=r.y+r.height/2-i.height/2,p=r[o]/2-i[o]/2;let g;switch(c){case"top":g={x:d,y:r.y-i.height};break;case"bottom":g={x:d,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:h};break;case"left":g={x:r.x-i.width,y:h};break;default:g={x:r.x,y:r.y}}switch(My(t)){case"start":g[a]-=p*(n&&u?-1:1);break;case"end":g[a]+=p*(n&&u?-1:1);break}return g}const oPe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:a}
vendor: 14,114 bytes, line 767
767=n,o=s.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:h}=LK(u,r,c),p=r,g={},v=0;for(let x=0;x<o.length;x++){const{name:_,fn:w}=o[x],{x:S,y:E,data:T,reset:N}=await w({x:d,y:h,initialPlacement:r,placement:p,strategy:i,middlewareData:g,rects:u,platform:a,elements:{reference:e,floating:t}});d=S??d,h=E??h,g={...g,[_]:{...g[_],...T}},N&&v<=50&&(v++,typeof N=="object"&&(N.placement&&(p=N.placement),N.rects&&(u=N.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):N.rects),{x:d,y:h}=LK(u,p,c)),x=-1)}return{x:d,y:h,placement:p,strategy:i,middlewareData:g}};async function k2(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:a,elements:o,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:p=!1,padding:g=0}=vh(t,e),v=Toe(g),_=o[p?h==="floating"?"reference":"floating":h],w=CN(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(_)))==null||n?_:_.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(o.floating)),boundary:u,rootBoundary:d,strategy:c})),S=h==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(o.floating)),T=await(s.isElement==null?void 0:s.isElement(E))?await(s.getScale==null?void 0:s.getScale(E))||{x:1,y:1}:{x:1,y:1},N=CN(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:S,offsetParent:E,strategy:c}):S);return{top:(w.top-N.top+v.top)/T.y,bottom:(N.bottom-w.bottom+v.bottom)/T.y,left:(w.left-N.left+v.left)/T.x,right:(N.right-w.right+v.right)/T.x}}const lPe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:a,elements:o,middlewareData:c}=t,{element:u,padding:d=0}=vh(e,t)||{};if(u==null)return{};const h=Toe(d),p={x:n,y:r},g=K9(i),v=G9(g),x=await a.getDimensions(u),_=g==="y",w=_?"top":"left",S=_?"bottom":"right",E=_?"clientHeight":"clientWidth",T=s.reference[v]+s.reference[g]-p[g]-s.floating[v],N=p[g]-s.reference[g],A=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let k=A?A[E]:0;(!k||!await(a.isElement==null?void 0:a.isElement(A)))&&(k=o.floating[E]||s.floating[v]);const j=T/2-N/2,R=k/2-x[v]/2-1,P=mm(h[w],R),V=mm(h[S],R),U=P,G=k-x[v]-V,Q=k/2-x[v]/2+j,Z=N6(U,Q,G),K=!c.arrow&&My(i)!=null&&Q!==Z&&s.reference[v]/2-(Q<U?P:V)-x[v]/2<0,te=K?Q<U?Q-U:Q-G:0;return{[g]:p[g]+te,data:{[g]:Z,centerOffset:Q-Z-te,...K&&{alignmentOffset:te}},reset:K}}}),cPe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:s,rects:a,initialPlacement:o,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:x=!0,..._}=vh(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const w=yh(i),S=Sd(o),E=yh(o)===o,T=await(c.isRTL==null?void 0:c.isRTL(u.floating)),N=p||(E||!x?[EN(o)]:tPe(o)),A=v!=="none";!p&&A&&N.push(...sPe(o,x,v,T));const k=[o,...N],j=await k2(t,_),R=[];let P=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&R.push(j[w]),h){const Q=ePe(i,a,T);R.push(j[Q[0]],j[Q[1]])}if(P=[...P,{placement:i,overflows:R}],!R.every(Q=>Q<=0)){var V,U;const Q=(((V=s.flip)==null?void 0:V.index)||0)+1,Z=k[Q];if(Z&&(!(h==="alignment"?S!==Sd(Z):!1)||P.every(ne=>Sd(ne.placement)===S?ne.overflows[0]>0:!0)))return{data:{index:Q,overflows:P},reset:{placement:Z}};let K=(U=P.filter(te=>te.overflows[0]<=0).sort((te,ne)=>te.overflows[1]-ne.overflows[1])[0])==null?void 0:U.placement;if(!K)switch(g){case"bestFit":{var G;const te=(G=P.filter(ne=>{if(A){const se=Sd(ne.placement);return se===S||se==="y"}return!0}).map(ne=>[ne.placement,ne.overflows.filter(se=>se>0).reduce((se,H)=>se+H,0)]).sort((ne,se)=>ne[1]-se[1])[0])==null?void 0:G[0];te&&(K=te);break}case"initialPlacement":K=o;break}if(i!==K)return{reset:{placement:K}}}return{}}}};function zK(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function $K(e){return XOe.some(t=>e[t]>=0)}const uPe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=vh(e,t);switch(r){case"referenceHidden":{const s=await k2(t,{...i,elementContext:"reference"}),a=zK(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:$K(a)}}}case"escaped":{const s=await k2(t,{...i,altBoundary:!0}),a=zK(s,n.floating);return{data:{escapedOffsets:a,escaped:$K(a)}}}default:return{}}}}},Aoe=new Set(["left","top"]);async function dPe(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=yh(n),o=My(n),c=Sd(n)==="y",u=Aoe.has(a)?-1:1,d=s&&c?-1:1,h=vh(t,e);let{mainAxis:p,crossAxis:g,alignmentAxis:v}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return o&&typeof v=="number"&&(g=o==="end"?v*-1:v),c?{x:g*d,y:p*u}:{x:p*u,y:g*d}}const fPe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:a,middlewareData:o}=t,c=await dPe(t,e);return a===((n=o.offset)==null?void 0:n.placement)&&(r=o.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:s+c.y,data:{...c,placement:a}}}}},hPe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:o={fn:_=>{let{x:w,y:S}=_;return{x:w,y:S}}},...c}=vh(e,t),u={x:n,y:r},d=await k2(t,c),h=Sd(yh(i)),p=W9(h);let g=u[p],v=u[h];if(s){const _=p==="y"?"top":"left",w=p==="y"?"bottom":"right",S=g+d[_],E=g-d[w];g=N6(S,g,E)}if(a){const _=h==="y"?"top":"left",w=h==="y"?"bottom":"right",S=v+d[_],E=v-d[w];v=N6(S,v,E)}const x=o.fn({...t,[p]:g,[h]:v});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[p]:s,[h]:a}}}}}},pPe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:s,middlewareData:a}=t,{offset:o=0,mainAxis:c=!0,crossAxis:u=!0}=vh(e,t),d={x:n,y:r},h=Sd(i),p=W9(h);let g=d[p],v=d[h];const x=vh(o,t),_=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(c){const E=p==="y"?"height":"width",T=s.reference[p]-s.floating[E]+_.mainAxis,N=s.reference[p]+s.reference[E]-_.mainAxis;g<T?g=T:g>N&&(g=N)}if(u){var w,S;const E=p==="y"?"width":"height",T=Aoe.has(yh(i)),N=s.reference[h]-s.floating[E]+(T&&((w=a.offset)==null?void 0:w[h])||0)+(T?0:_.crossAxis),A=s.reference[h]+s.reference[E]+(T?0:((S=a.offset)==null?void 0:S[h])||0)-(T?_.crossAxis:0);v<N?v=N:v>A&&(v=A)}return{[p]:g,[h]:v}}}},mPe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:s,platform:a,elements:o}=t,{apply:c=()=>{},...u}=vh(e,t),d=await k2(t,u),h=yh(i),p=My(i),g=Sd(i)==="y",{width:v,height:x}=s.floating;let _,w;h==="top"||h==="bottom"?(_=h,w=p===(await(a.isRTL==null?void 0:a.isRTL(o.floating))?"start":"end")?"left":"right"):(w=h,_=p==="end"?"top":"bottom");const S=x-d.top-d.bottom,E=v-d.left-d.right,T=mm(x-d[_],S),N=mm(v-d[w],E),A=!t.middlewareData.shift;let k=T,j=N;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(j=E),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=S),A&&!p){const P=Fl(d.left,0),V=Fl(d.right,0),U=Fl(d.top,0),G=Fl(d.bottom,0);g?j=v-2*(P!==0||V!==0?P+V:Fl(d.left,d.right)):k=x-2*(U!==0||G!==0?U+G:Fl(d.top,d.bottom))}await c({...t,availableWidth:j,availableHeight:k});const R=await a.getDimensions(o.floating);return v!==R.width||x!==R.height?{reset:{rects:!0}}:{}}}};function zj(){return typeof window<"u"}function Dy(e){return koe(e)?(e.nodeName||"").toLowerCase():"#document"}function Gl(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Zd(e){var t;return(t=(koe(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function koe(e){return zj()?e instanceof Node||e instanceof Gl(e).Node:!1}function Ru(e){return zj()?e instanceof Element||e instanceof Gl(e).Element:!1}function Ud(e){return zj()?e instanceof HTMLElement||e instanceof Gl(e).HTMLElement:!1}function BK(e){return!zj()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Gl(e).ShadowRoot}const gPe=new Set(["inline","contents"]);function nE(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Iu(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!gPe.has(i)}const xPe=new Set(["table","td","th"]);function vPe(e){return xPe.has(Dy(e))}const yPe=[":popover-open",":modal"];function $j(e){return yPe.some(t=>{try{return e.matches(t)}catch{return!1}})}const bPe=["transform","translate","scale","rotate","perspective"],_Pe=["transform","translate","scale","rotate","perspective","filter"],wPe=["paint","layout","strict","content"];function Y9(e){const t=X9(),n=Ru(e)?Iu(e):e;return bPe.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||_Pe.some(r=>(n.willChange||"").includes(r))||wPe.some(r=>(n.contain||"").includes(r))}function SPe(e){let t=gm(e);for(;Ud(t)&&!ey(t);){if(Y9(t))return t;if($j(t))return null;t=gm(t)}return null}function X9(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const EPe=new Set(["html","body","#document"]);function ey(e){return EPe.has(Dy(e))}function Iu(e){return Gl(e).getComputedStyle(e)}function Bj(e){return Ru(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function gm(e){if(Dy(e)==="html")return e;const t=e.assignedSlot||e.parentNode||BK(e)&&e.host||Zd(e);return BK(t)?t.host:t}function Noe(e){const t=gm(e);return ey(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ud(t)&&nE(t)?t:Noe(t)}function N2(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Noe(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),a=Gl(i);if(s){const o=R6(a);return t.concat(a,a.visualViewport||[],nE(i)?i:[],o&&n?N2(o):[])}return t.concat(i,N2(i,[],n))}function R6(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function joe(e){const t=Iu(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Ud(e),s=i?e.offsetWidth:n,a=i?e.offsetHeight:r,o=SN(n)!==s||SN(r)!==a;return o&&(n=s,r=a),{width:n,height:r,$:o}}function Q9(e){return Ru(e)?e:e.contextElement}function w1(e){const t=Q9(e);if(!Ud(t))return Nd(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=joe(t);let a=(s?SN(n.width):n.width)/r,o=(s?SN(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}const CPe=Nd(0);function Roe(e){const t=Gl(e);return!X9()||!t.visualViewport?CPe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function TPe(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Gl(e)?!1:t}function C0(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=Q9(e);let a=Nd(1);t&&(r?Ru(r)&&(a=w1(r)):a=w1(e));const o=TPe(s,n,r)?Roe(s):Nd(0);let c=(i.left+o.x)/a.x,u=(i.top+o.y)/a.y,d=i.width/a.x,h=i.height/a.y;if(s){const p=Gl(s),g=r&&Ru(r)?Gl(r):r;let v=p,x=R6(v);for(;x&&r&&g!==v;){const _=w1(x),w=x.getBoundingClientRect(),S=Iu(x),E=w.left+(x.clientLeft+parseFloat(S.paddingLeft))*_.x,T=w.top+(x.clientTop+parseFloat(S.paddingTop))*_.y;c*=_.x,u*=_.y,d*=_.x,h*=_.y,c+=E,u+=T,v=Gl(x),x=R6(v)}}return CN({width:d,height:h,x:c,y:u})}function Uj(e,t){const n=Bj(e).scrollLeft;return t?t.left+n:C0(Zd(e)).left+n}function Ioe(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Uj(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function APe(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",a=Zd(r),o=t?$j(t.floating):!1;if(r===a||o&&s)return n;let c={scrollLeft:0,scrollTop:0},u=Nd(1);const d=Nd(0),h=Ud(r);if((h||!h&&!s)&&((Dy(r)!=="body"||nE(a))&&(c=Bj(r)),Ud(r))){const g=C0(r);u=w1(r),d.x=g.x+r.clientLeft,d.y=g.y+r.clientTop}const p=a&&!h&&!s?Ioe(a,c):Nd(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x+p.x,y:n.y*u.y-c.scrollTop*u.y+d.y+p.y}}function kPe(e){return Array.from(e.getClientRects())}function NPe(e){const t=Zd(e),n=Bj(e),r=e.ownerDocument.body,i=Fl(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Fl(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Uj(e);const o=-n.scrollTop;return Iu(r).direction==="rtl"&&(a+=Fl(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:a,y:o}}const UK=25;function jPe(e,t){const n=Gl(e),r=Zd(e),i=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,o=0,c=0;if(i){s=i.width,a=i.height;const d=X9();(!d||d&&t==="fixed")&&(o=i.offsetLeft,c=i.offsetTop)}const u=Uj(r);if(u<=0){const d=r.ownerDocument,h=d.body,p=getComputedStyle(h),g=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,v=Math.abs(r.clientWidth-h.clientWidth-g);v<=UK&&(s-=v)}else u<=UK&&(s+=u);return{width:s,height:a,x:o,y:c}}const RPe=new Set(["absolute","fixed"]);function IPe(e,t){const n=C0(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=Ud(e)?w1(e):Nd(1),a=e.clientWidth*s.x,o=e.clientHeight*s.y,c=i*s.x,u=r*s.y;return{width:a,height:o,x:c,y:u}}function VK(e,t,n){let r;if(t==="viewport")r=jPe(e,n);else if(t==="document")r=NPe(Zd(e));else if(Ru(t))r=IPe(t,n);else{const i=Roe(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return CN(r)}function Ooe(e,t){const n=gm(e);return n===t||!Ru(n)||ey(n)?!1:Iu(n).position==="fixed"||Ooe(n,t)}function OPe(e,t){const n=t.get(e);if(n)return n;let r=N2(e,[],!1).filter(o=>Ru(o)&&Dy(o)!=="body"),i=null;const s=Iu(e).position==="fixed";let a=s?gm(e):e;for(;Ru(a)&&!ey(a);){const o=Iu(a),c=Y9(a);!c&&o.position==="fixed"&&(i=null),(s?!c&&!i:!c&&o.position==="static"&&!!i&&RPe.has(i.position)||nE(a)&&!c&&Ooe(e,a))?r=r.filter(d=>d!==a):i=o,a=gm(a)}return t.set(e,r),r}function PPe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?$j(t)?[]:OPe(t,this._c):[].concat(n),r],o=a[0],c=a.reduce((u,d)=>{const h=VK(t,d,i);
vendor: 9,213 bytes, line 767
767return u.top=Fl(h.top,u.top),u.right=mm(h.right,u.right),u.bottom=mm(h.bottom,u.bottom),u.left=Fl(h.left,u.left),u},VK(t,o,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function MPe(e){const{width:t,height:n}=joe(e);return{width:t,height:n}}function DPe(e,t,n){const r=Ud(t),i=Zd(t),s=n==="fixed",a=C0(e,!0,s,t);let o={scrollLeft:0,scrollTop:0};const c=Nd(0);function u(){c.x=Uj(i)}if(r||!r&&!s)if((Dy(t)!=="body"||nE(i))&&(o=Bj(t)),r){const g=C0(t,!0,s,t);c.x=g.x+t.clientLeft,c.y=g.y+t.clientTop}else i&&u();s&&!r&&i&&u();const d=i&&!r&&!s?Ioe(i,o):Nd(0),h=a.left+o.scrollLeft-c.x-d.x,p=a.top+o.scrollTop-c.y-d.y;return{x:h,y:p,width:a.width,height:a.height}}function zO(e){return Iu(e).position==="static"}function HK(e,t){if(!Ud(e)||Iu(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Zd(e)===n&&(n=n.ownerDocument.body),n}function Poe(e,t){const n=Gl(e);if($j(e))return n;if(!Ud(e)){let i=gm(e);for(;i&&!ey(i);){if(Ru(i)&&!zO(i))return i;i=gm(i)}return n}let r=HK(e,t);for(;r&&vPe(r)&&zO(r);)r=HK(r,t);return r&&ey(r)&&zO(r)&&!Y9(r)?n:r||SPe(e)||n}const FPe=async function(e){const t=this.getOffsetParent||Poe,n=this.getDimensions,r=await n(e.floating);return{reference:DPe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function LPe(e){return Iu(e).direction==="rtl"}const zPe={convertOffsetParentRelativeRectToViewportRelativeRect:APe,getDocumentElement:Zd,getClippingRect:PPe,getOffsetParent:Poe,getElementRects:FPe,getClientRects:kPe,getDimensions:MPe,getScale:w1,isElement:Ru,isRTL:LPe};function Moe(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $Pe(e,t){let n=null,r;const i=Zd(e);function s(){var o;clearTimeout(r),(o=n)==null||o.disconnect(),n=null}function a(o,c){o===void 0&&(o=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:d,top:h,width:p,height:g}=u;if(o||t(),!p||!g)return;const v=UT(h),x=UT(i.clientWidth-(d+p)),_=UT(i.clientHeight-(h+g)),w=UT(d),E={rootMargin:-v+"px "+-x+"px "+-_+"px "+-w+"px",threshold:Fl(0,mm(1,c))||1};let T=!0;function N(A){const k=A[0].intersectionRatio;if(k!==c){if(!T)return a();k?a(!1,k):r=setTimeout(()=>{a(!1,1e-7)},1e3)}k===1&&!Moe(u,e.getBoundingClientRect())&&a(),T=!1}try{n=new IntersectionObserver(N,{...E,root:i.ownerDocument})}catch{n=new IntersectionObserver(N,E)}n.observe(e)}return a(!0),s}function BPe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=Q9(e),d=i||s?[...u?N2(u):[],...N2(t)]:[];d.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),s&&w.addEventListener("resize",n)});const h=u&&o?$Pe(u,n):null;let p=-1,g=null;a&&(g=new ResizeObserver(w=>{let[S]=w;S&&S.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var E;(E=g)==null||E.observe(t)})),n()}),u&&!c&&g.observe(u),g.observe(t));let v,x=c?C0(e):null;c&&_();function _(){const w=C0(e);x&&!Moe(x,w)&&n(),x=w,v=requestAnimationFrame(_)}return n(),()=>{var w;d.forEach(S=>{i&&S.removeEventListener("scroll",n),s&&S.removeEventListener("resize",n)}),h?.(),(w=g)==null||w.disconnect(),g=null,c&&cancelAnimationFrame(v)}}const UPe=fPe,VPe=hPe,HPe=cPe,qPe=mPe,WPe=uPe,qK=lPe,GPe=pPe,KPe=(e,t,n)=>{const r=new Map,i={platform:zPe,...n},s={...i.platform,_c:r};return oPe(e,t,{...i,platform:s})};var YPe=typeof document<"u",XPe=function(){},uk=YPe?b.useLayoutEffect:XPe;function TN(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!TN(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!(s==="_owner"&&e.$$typeof)&&!TN(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Doe(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function WK(e,t){const n=Doe(e);return Math.round(t*n)/n}function $O(e){const t=b.useRef(e);return uk(()=>{t.current=e}),t}function QPe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:a}={},transform:o=!0,whileElementsMounted:c,open:u}=e,[d,h]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,g]=b.useState(r);TN(p,r)||g(r);const[v,x]=b.useState(null),[_,w]=b.useState(null),S=b.useCallback(ne=>{ne!==A.current&&(A.current=ne,x(ne))},[]),E=b.useCallback(ne=>{ne!==k.current&&(k.current=ne,w(ne))},[]),T=s||v,N=a||_,A=b.useRef(null),k=b.useRef(null),j=b.useRef(d),R=c!=null,P=$O(c),V=$O(i),U=$O(u),G=b.useCallback(()=>{if(!A.current||!k.current)return;const ne={placement:t,strategy:n,middleware:p};V.current&&(ne.platform=V.current),KPe(A.current,k.current,ne).then(se=>{const H={...se,isPositioned:U.current!==!1};Q.current&&!TN(j.current,H)&&(j.current=H,mh.flushSync(()=>{h(H)}))})},[p,t,n,V,U]);uk(()=>{u===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,h(ne=>({...ne,isPositioned:!1})))},[u]);const Q=b.useRef(!1);uk(()=>(Q.current=!0,()=>{Q.current=!1}),[]),uk(()=>{if(T&&(A.current=T),N&&(k.current=N),T&&N){if(P.current)return P.current(T,N,G);G()}},[T,N,G,P,R]);const Z=b.useMemo(()=>({reference:A,floating:k,setReference:S,setFloating:E}),[S,E]),K=b.useMemo(()=>({reference:T,floating:N}),[T,N]),te=b.useMemo(()=>{const ne={position:n,left:0,top:0};if(!K.floating)return ne;const se=WK(K.floating,d.x),H=WK(K.floating,d.y);return o?{...ne,transform:"translate("+se+"px, "+H+"px)",...Doe(K.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:se,top:H}},[n,o,K.floating,d.x,d.y]);return b.useMemo(()=>({...d,update:G,refs:Z,elements:K,floatingStyles:te}),[d,G,Z,K,te])}const ZPe=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?qK({element:r.current,padding:i}).fn(n):{}:r?qK({element:r,padding:i}).fn(n):{}}}},JPe=(e,t)=>({...UPe(e),options:[e,t]}),eMe=(e,t)=>({...VPe(e),options:[e,t]}),tMe=(e,t)=>({...GPe(e),options:[e,t]}),nMe=(e,t)=>({...HPe(e),options:[e,t]}),rMe=(e,t)=>({...qPe(e),options:[e,t]}),iMe=(e,t)=>({...WPe(e),options:[e,t]}),sMe=(e,t)=>({...ZPe(e),options:[e,t]});var aMe="Arrow",Foe=b.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...s}=e;return l.jsx(nn.svg,{...s,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});Foe.displayName=aMe;var oMe=Foe;function Z9(e){const[t,n]=b.useState(void 0);return sa(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let a,o;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,o=u.blockSize}else a=e.offsetWidth,o=e.offsetHeight;n({width:a,height:o})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var J9="Popper",[Loe,Im]=Ia(J9),[lMe,zoe]=Loe(J9),$oe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=b.useState(null);return l.jsx(lMe,{scope:t,anchor:r,onAnchorChange:i,children:n})};$oe.displayName=J9;var Boe="PopperAnchor",Uoe=b.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,s=zoe(Boe,n),a=b.useRef(null),o=Wn(t,a),c=b.useRef(null);return b.useEffect(()=>{const u=c.current;c.current=r?.current||a.current,u!==c.current&&s.onAnchorChange(c.current)}),r?null:l.jsx(nn.div,{...i,ref:o})});Uoe.displayName=Boe;var e7="PopperContent",[cMe,uMe]=Loe(e7),Voe=b.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:a=0,arrowPadding:o=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:h="partial",hideWhenDetached:p=!1,updatePositionStrategy:g="optimized",onPlaced:v,...x}=e,_=zoe(e7,n),[w,S]=b.useState(null),E=Wn(t,W=>S(W)),[T,N]=b.useState(null),A=Z9(T),k=A?.width??0,j=A?.height??0,R=r+(s!=="center"?"-"+s:""),P=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},V=Array.isArray(u)?u:[u],U=V.length>0,G={padding:P,boundary:V.filter(fMe),altBoundary:U},{refs:Q,floatingStyles:Z,placement:K,isPositioned:te,middlewareData:ne}=QPe({strategy:"fixed",placement:R,whileElementsMounted:(...W)=>BPe(...W,{animationFrame:g==="always"}),elements:{reference:_.anchor},middleware:[JPe({mainAxis:i+j,alignmentAxis:a}),c&&eMe({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?tMe():void 0,...G}),c&&nMe({...G}),rMe({...G,apply:({elements:W,rects:re,availableWidth:ae,availableHeight:ce})=>{const{width:Te,height:fe}=re.reference,xe=W.floating.style;xe.setProperty("--radix-popper-available-width",`${ae}px`),xe.setProperty("--radix-popper-available-height",`${ce}px`),xe.setProperty("--radix-popper-anchor-width",`${Te}px`),xe.setProperty("--radix-popper-anchor-height",`${fe}px`)}}),T&&sMe({element:T,padding:o}),hMe({arrowWidth:k,arrowHeight:j}),p&&iMe({strategy:"referenceHidden",...G})]}
vendor: 8,784 bytes, line 767
767),[se,H]=Woe(K),O=wa(v);sa(()=>{te&&O?.()},[te,O]);const L=ne.arrow?.x,M=ne.arrow?.y,q=ne.arrow?.centerOffset!==0,[X,J]=b.useState();return sa(()=>{w&&J(window.getComputedStyle(w).zIndex)},[w]),l.jsx("div",{ref:Q.setFloating,"data-radix-popper-content-wrapper":"",style:{...Z,transform:te?Z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--radix-popper-transform-origin":[ne.transformOrigin?.x,ne.transformOrigin?.y].join(" "),...ne.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(cMe,{scope:n,placedSide:se,onArrowChange:N,arrowX:L,arrowY:M,shouldHideArrow:q,children:l.jsx(nn.div,{"data-side":se,"data-align":H,...x,ref:E,style:{...x.style,animation:te?void 0:"none"}})})})});Voe.displayName=e7;var Hoe="PopperArrow",dMe={top:"bottom",right:"left",bottom:"top",left:"right"},qoe=b.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,s=uMe(Hoe,r),a=dMe[s.placedSide];return l.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:l.jsx(oMe,{...i,ref:n,style:{...i.style,display:"block"}})})});qoe.displayName=Hoe;function fMe(e){return e!==null}var hMe=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[u,d]=Woe(n),h={start:"0%",center:"50%",end:"100%"}[d],p=(i.arrow?.x??0)+o/2,g=(i.arrow?.y??0)+c/2;let v="",x="";return u==="bottom"?(v=a?h:`${p}px`,x=`${-c}px`):u==="top"?(v=a?h:`${p}px`,x=`${r.floating.height+c}px`):u==="right"?(v=`${-c}px`,x=a?h:`${g}px`):u==="left"&&(v=`${r.floating.width+c}px`,x=a?h:`${g}px`),{data:{x:v,y:x}}}});function Woe(e){const[t,n="center"]=e.split("-");return[t,n]}var Vj=$oe,rE=Uoe,Hj=Voe,qj=qoe;function pMe(e,t){return b.useReducer((n,r)=>t[n][r]??n,e)}var to=e=>{const{present:t,children:n}=e,r=mMe(t),i=typeof n=="function"?n({present:r.isPresent}):b.Children.only(n),s=Wn(r.ref,gMe(i));return typeof n=="function"||r.isPresent?b.cloneElement(i,{ref:s}):null};to.displayName="Presence";function mMe(e){const[t,n]=b.useState(),r=b.useRef(null),i=b.useRef(e),s=b.useRef("none"),a=e?"mounted":"unmounted",[o,c]=pMe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const u=VT(r.current);s.current=o==="mounted"?u:"none"},[o]),sa(()=>{const u=r.current,d=i.current;if(d!==e){const p=s.current,g=VT(u);e?c("MOUNT"):g==="none"||u?.display==="none"?c("UNMOUNT"):c(d&&p!==g?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),sa(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,h=g=>{const x=VT(r.current).includes(CSS.escape(g.animationName));if(g.target===t&&x&&(c("ANIMATION_END"),!i.current)){const _=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=_)})}},p=g=>{g.target===t&&(s.current=VT(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:b.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function VT(e){return e?.animationName||"none"}function gMe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var xMe=pj[" useInsertionEffect ".trim().toString()]||sa;function Yl({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,s,a]=vMe({defaultProp:t,onChange:n}),o=e!==void 0,c=o?e:i;{const d=b.useRef(e!==void 0);b.useEffect(()=>{const h=d.current;h!==o&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${o?"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=o},[o,r])}const u=b.useCallback(d=>{if(o){const h=yMe(d)?d(e):d;h!==e&&a.current?.(h)}else s(d)},[o,e,s,a]);return[c,u]}function vMe({defaultProp:e,onChange:t}){const[n,r]=b.useState(e),i=b.useRef(n),s=b.useRef(t);return xMe(()=>{s.current=t},[t]),b.useEffect(()=>{i.current!==n&&(s.current?.(n),i.current=n)},[n,i]),[n,r,s]}function yMe(e){return typeof e=="function"}var Goe=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"}),bMe="VisuallyHidden",Koe=b.forwardRef((e,t)=>l.jsx(nn.span,{...e,ref:t,style:{...Goe,...e.style}}));Koe.displayName=bMe;var _Me=Koe,[Wj]=Ia("Tooltip",[Im]),Gj=Im(),Yoe="TooltipProvider",wMe=700,I6="tooltip.open",[SMe,t7]=Wj(Yoe),Xoe=e=>{const{__scopeTooltip:t,delayDuration:n=wMe,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:s}=e,a=b.useRef(!0),o=b.useRef(!1),c=b.useRef(0);return b.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),l.jsx(SMe,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:b.useCallback(()=>{window.clearTimeout(c.current),a.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:o,onPointerInTransitChange:b.useCallback(u=>{o.current=u},[]),disableHoverableContent:i,children:s})};Xoe.displayName=Yoe;var j2="Tooltip",[EMe,iE]=Wj(j2),Qoe=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:s,disableHoverableContent:a,delayDuration:o}=e,c=t7(j2,e.__scopeTooltip),u=Gj(t),[d,h]=b.useState(null),p=Na(),g=b.useRef(0),v=a??c.disableHoverableContent,x=o??c.delayDuration,_=b.useRef(!1),[w,S]=Yl({prop:r,defaultProp:i??!1,onChange:k=>{k?(c.onOpen(),document.dispatchEvent(new CustomEvent(I6))):c.onClose(),s?.(k)},caller:j2}),E=b.useMemo(()=>w?_.current?"delayed-open":"instant-open":"closed",[w]),T=b.useCallback(()=>{window.clearTimeout(g.current),g.current=0,_.current=!1,S(!0)},[S]),N=b.useCallback(()=>{window.clearTimeout(g.current),g.current=0,S(!1)},[S]),A=b.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{_.current=!0,S(!0),g.current=0},x)},[x,S]);return b.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),l.jsx(Vj,{...u,children:l.jsx(EMe,{scope:t,contentId:p,open:w,stateAttribute:E,trigger:d,onTriggerChange:h,onTriggerEnter:b.useCallback(()=>{c.isOpenDelayedRef.current?A():T()},[c.isOpenDelayedRef,A,T]),onTriggerLeave:b.useCallback(()=>{v?N():(window.clearTimeout(g.current),g.current=0)},[N,v]),onOpen:T,onClose:N,disableHoverableContent:v,children:n})})};Qoe.displayName=j2;var O6="TooltipTrigger",Zoe=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=iE(O6,n),s=t7(O6,n),a=Gj(n),o=b.useRef(null),c=Wn(t,o,i.onTriggerChange),u=b.useRef(!1),d=b.useRef(!1),h=b.useCallback(()=>u.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),l.jsx(rE,{asChild:!0,...a,children:l.jsx(nn.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:c,onPointerMove:qt(e.onPointerMove,p=>{p.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:qt(e.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:qt(e.onPointerDown,()=>{i.open&&i.onClose(),u.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:qt(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:qt(e.onBlur,i.onClose),onClick:qt(e.onClick,i.onClose)})})});Zoe.displayName=O6;var n7="TooltipPortal",[CMe,TMe]=Wj(n7,{forceMount:void 0}),Joe=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,s=iE(n7,t);return l.jsx(CMe,{scope:t,forceMount:n,children:l.jsx(to,{present:n||s.open,children:l.jsx(QS,{asChild:!0,container:i,children:r})})})};Joe.displayName=n7;var ty="TooltipContent",ele=b.forwardRef((e,t)=>{const n=TMe(ty,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...s}=e,a=iE(ty,e.__scopeTooltip);return l.jsx(to,{present:r||a.open,children:a.disableHoverableContent?l.jsx(tle,{side:i,...s,ref:t}):l.jsx(AMe,{side:i,...s,ref:t})})}),AMe=b.forwardRef((e,t)=>
vendor: 4,308 bytes, line 767
767{const n=iE(ty,e.__scopeTooltip),r=t7(ty,e.__scopeTooltip),i=b.useRef(null),s=Wn(t,i),[a,o]=b.useState(null),{trigger:c,onClose:u}=n,d=i.current,{onPointerInTransitChange:h}=r,p=b.useCallback(()=>{o(null),h(!1)},[h]),g=b.useCallback((v,x)=>{const _=v.currentTarget,w={x:v.clientX,y:v.clientY},S=RMe(w,_.getBoundingClientRect()),E=IMe(w,S),T=OMe(x.getBoundingClientRect()),N=MMe([...E,...T]);o(N),h(!0)},[h]);return b.useEffect(()=>()=>p(),[p]),b.useEffect(()=>{if(c&&d){const v=_=>g(_,d),x=_=>g(_,c);return c.addEventListener("pointerleave",v),d.addEventListener("pointerleave",x),()=>{c.removeEventListener("pointerleave",v),d.removeEventListener("pointerleave",x)}}},[c,d,g,p]),b.useEffect(()=>{if(a){const v=x=>{const _=x.target,w={x:x.clientX,y:x.clientY},S=c?.contains(_)||d?.contains(_),E=!PMe(w,a);S?p():E&&(p(),u())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[c,d,a,u,p]),l.jsx(tle,{...e,ref:s})}),[kMe,NMe]=Wj(j2,{isInside:!1}),jMe=Kae("TooltipContent"),tle=b.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:s,onPointerDownOutside:a,...o}=e,c=iE(ty,n),u=Gj(n),{onClose:d}=c;return b.useEffect(()=>(document.addEventListener(I6,d),()=>document.removeEventListener(I6,d)),[d]),b.useEffect(()=>{if(c.trigger){const h=p=>{p.target?.contains(c.trigger)&&d()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,d]),l.jsx(Py,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:h=>h.preventDefault(),onDismiss:d,children:l.jsxs(Hj,{"data-state":c.stateAttribute,...u,...o,ref:t,style:{...o.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[l.jsx(jMe,{children:r}),l.jsx(kMe,{scope:n,isInside:!0,children:l.jsx(_Me,{id:c.contentId,role:"tooltip",children:i||r})})]})})});ele.displayName=ty;var nle="TooltipArrow",rle=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Gj(n);return NMe(nle,n).isInside?null:l.jsx(qj,{...i,...r,ref:t})});rle.displayName=nle;function RMe(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,i,s)){case s:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function IMe(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function OMe(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function PMe(e,t){const{x:n,y:r}=e;let i=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const o=t[s],c=t[a],u=o.x,d=o.y,h=c.x,p=c.y;d>r!=p>r&&n<(h-u)*(r-d)/(p-d)+u&&(i=!i)}return i}function MMe(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),DMe(t)}function DMe(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(i.y-a.y)>=(s.y-a.y)*(i.x-a.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(i.y-a.y)>=(s.y-a.y)*(i.x-a.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var r7=Xoe,i7=Qoe,s7=Zoe,a7=Joe,o7=ele,FMe=rle;const LMe=qi({tooltip:"z-50 overflow-hidden rounded-radius border border-popover-border bg-popover px-3 py-1.5 text-sm text-popover-fg shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
767de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2"},"tooltip"),T0=b.memo(function({className:t,delayDuration:n=500,skipDelayDuration:r=200,disableHoverableContent:i,title:s,children:a,defaultOpen:o,open:c,onOpenChange:u,sideOffset:d=4,...h}){return l.jsx(r7,{delayDuration:n,skipDelayDuration:r,disableHoverableContent:i,children:l.jsxs(i7,{open:c,onOpenChange:u,defaultOpen:o,children:[l.jsx(s7,{asChild:!0,children:a}),l.jsx(a7,{children:l.jsx(o7,{sideOffset:d,className:$e(LMe.tooltip,t),...h,children:s})})]})})});function P6(e,[t,n]){return Math.min(n,Math.max(t,e))}function l7(e){const t=e+"CollectionProvider",[n,r]=Ia(t),[i,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=x=>{const{scope:_,children:w}=x,S=Y.useRef(null),E=Y.useRef(new Map).current;return l.jsx(i,{scope:_,itemMap:E,collectionRef:S,children:w})};a.displayName=t;const o=e+"CollectionSlot",c=hm(o),u=Y.forwardRef((x,_)=>{const{scope:w,children:S}=x,E=s(o,w),T=Wn(_,E.collectionRef);return l.jsx(c,{ref:T,children:S})});u.displayName=o;const d=e+"CollectionItemSlot",h="data-radix-collection-item",p=hm(d),g=Y.forwardRef((x,_)=>{const{scope:w,children:S,...E}=x,T=Y.useRef(null),N=Wn(_,T),A=s(d,w);return Y.useEffect(()=>(A.itemMap.set(T,{ref:T,...E}),()=>void A.itemMap.delete(T))),l.jsx(p,{[h]:"",ref:N,children:S})});g.displayName=d;function v(x){const _=s(e+"CollectionConsumer",x);return Y.useCallback(()=>{const S=_.collectionRef.current;if(!S)return[];const E=Array.from(S.querySelectorAll(`[${h}]`));return Array.from(_.itemMap.values()).sort((A,k)=>E.indexOf(A.ref.current)-E.indexOf(k.ref.current))},[_.collectionRef,_.itemMap])}return[{Provider:a,Slot:u,ItemSlot:g},v,r]}var zMe=b.createContext(void 0);function ox(e){const t=b.useContext(zMe);return e||t||"ltr"}var BO=0;function Kj(){b.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??GK()),document.body.insertAdjacentElement("beforeend",e[1]??GK()),BO++,()=>{BO===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),BO--}},[])}function GK(){const 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}var UO="focusScope.autoFocusOnMount",VO="focusScope.autoFocusOnUnmount",KK={bubbles:!1,cancelable:!0},$Me="FocusScope",sE=b.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...a}=e,[o,c]=b.useState(null),u=wa(i),d=wa(s),h=b.useRef(null),p=Wn(t,x=>c(x)),g=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(r){let x=function(E){if(g.paused||!o)return;const T=E.target;o.contains(T)?h.current=T:Op(h.current,{select:!0})},_=function(E){if(g.paused||!o)return;const T=E.relatedTarget;T!==null&&(o.contains(T)||Op(h.current,{select:!0}))},w=function(E){if(document.activeElement===document.body)for(const N of E)N.removedNodes.length>0&&Op(o)};document.addEventListener("focusin",x),document.addEventListener("focusout",_);const S=new MutationObserver(w);return o&&S.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",_),S.disconnect()}}},[r,o,g.paused]),b.useEffect(()=>{if(o){XK.add(g);const x=document.activeElement;if(!o.contains(x)){const w=new CustomEvent(UO,KK);o.addEventListener(UO,u),o.dispatchEvent(w),w.defaultPrevented||(BMe(WMe(ile(o)),{select:!0}),document.activeElement===x&&Op(o))}return()=>{o.removeEventListener(UO,u),setTimeout(()=>{const w=new CustomEvent(VO,KK);o.addEventListener(VO,d),o.dispatchEvent(w),w.defaultPrevented||Op(x??document.body,{select:!0}),o.removeEventListener(VO,d),XK.remove(g)},0)}}},[o,u,d,g]);const v=b.useCallback(x=>{if(!n&&!r||g.paused)return;const _=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,w=document.activeElement;if(_&&w){const S=x.currentTarget,[E,T]=UMe(S);
vendor: 9,120 bytes, lines 767-782
767E&&T?!x.shiftKey&&w===T?(x.preventDefault(),n&&Op(E,{select:!0})):x.shiftKey&&w===E&&(x.preventDefault(),n&&Op(T,{select:!0})):w===S&&x.preventDefault()}},[n,r,g.paused]);return l.jsx(nn.div,{tabIndex:-1,...a,ref:p,onKeyDown:v})});sE.displayName=$Me;function BMe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Op(r,{select:t}),document.activeElement!==n)return}function UMe(e){const t=ile(e),n=YK(t,e),r=YK(t.reverse(),e);return[n,r]}function ile(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function YK(e,t){for(const n of e)if(!VMe(n,{upTo:t}))return n}function VMe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function HMe(e){return e instanceof HTMLInputElement&&"select"in e}function Op(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&HMe(e)&&t&&e.select()}}var XK=qMe();function qMe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=QK(e,t),e.unshift(t)},remove(t){e=QK(e,t),e[0]?.resume()}}}function QK(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function WMe(e){return e.filter(t=>t.tagName!=="A")}function c7(e){const t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var GMe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},xv=new WeakMap,HT=new WeakMap,qT={},HO=0,sle=function(e){return e&&(e.host||sle(e.parentNode))},KMe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=sle(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},YMe=function(e,t,n,r){var i=KMe(t,Array.isArray(e)?e:[e]);qT[n]||(qT[n]=new WeakMap);var s=qT[n],a=[],o=new Set,c=new Set(i),u=function(h){!h||o.has(h)||(o.add(h),u(h.parentNode))};i.forEach(u);var d=function(h){!h||c.has(h)||Array.prototype.forEach.call(h.children,function(p){if(o.has(p))d(p);else try{var g=p.getAttribute(r),v=g!==null&&g!=="false",x=(xv.get(p)||0)+1,_=(s.get(p)||0)+1;xv.set(p,x),s.set(p,_),a.push(p),x===1&&v&&HT.set(p,!0),_===1&&p.setAttribute(n,"true"),v||p.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",p,w)}})};return d(t),o.clear(),HO++,function(){a.forEach(function(h){var p=xv.get(h)-1,g=s.get(h)-1;xv.set(h,p),s.set(h,g),p||(HT.has(h)||h.removeAttribute(r),HT.delete(h)),g||h.removeAttribute(n)}),HO--,HO||(xv=new WeakMap,xv=new WeakMap,HT=new WeakMap,qT={})}},Yj=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=GMe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),YMe(r,i,n,"aria-hidden")):function(){return null}},Cc=function(){return Cc=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Cc.apply(this,arguments)};function ale(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function lx(e,t,n,r){function i(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function o(d){try{u(r.next(d))}catch(h){a(h)}}function c(d){try{u(r.throw(d))}catch(h){a(h)}}function u(d){d.done?s(d.value):i(d.value).then(o,c)}u((r=r.apply(e,t||[])).next())})}function XMe(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var dk="right-scroll-bar-position",fk="width-before-scroll-bar",QMe="with-scroll-bars-hidden",ZMe="--removed-body-scroll-bar-size";function qO(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function JMe(e,t){var n=b.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var eDe=typeof window<"u"?b.useLayoutEffect:b.useEffect,ZK=new WeakMap;function tDe(e,t){var n=JMe(null,function(r){return e.forEach(function(i){return qO(i,r)})});return eDe(function(){var r=ZK.get(n);if(r){var i=new Set(r),s=new Set(e),a=n.current;i.forEach(function(o){s.has(o)||qO(o,null)}),s.forEach(function(o){i.has(o)||qO(o,a)})}ZK.set(n,e)},[e]),n}function nDe(e){return e}function rDe(e,t){t===void 0&&(t=nDe);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var a=t(s,r);return n.push(a),function(){n=n.filter(function(o){return o!==a})}},assignSyncMedium:function(s){for(r=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(o){return s(o)},filter:function(){return n}}},assignMedium:function(s){r=!0;var a=[];if(n.length){var o=n;n=[],o.forEach(s),a=n}var c=function(){var d=a;a=[],d.forEach(s)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),n}}}};return i}function iDe(e){e===void 0&&(e={});var t=rDe(null);return t.options=Cc({async:!0,ssr:!1},e),t}var ole=function(e){var t=e.sideCar,n=ale(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return b.createElement(r,Cc({},n))};ole.isSideCarExport=!0;function sDe(e,t){return e.useMedium(t),ole}var lle=iDe(),WO=function(){},Xj=b.forwardRef(function(e,t){var n=b.useRef(null),r=b.useState({onScrollCapture:WO,onWheelCapture:WO,onTouchMoveCapture:WO}),i=r[0],s=r[1],a=e.forwardProps,o=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,h=e.shards,p=e.sideCar,g=e.noRelative,v=e.noIsolation,x=e.inert,_=e.allowPinchZoom,w=e.as,S=w===void 0?"div":w,E=e.gapMode,T=ale(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=p,A=tDe([n,t]),k=Cc(Cc({},T),i);return b.createElement(b.Fragment,null,d&&b.createElement(N,{sideCar:lle,removeScrollBar:u,shards:h,noRelative:g,noIsolation:v,inert:x,setCallbacks:s,allowPinchZoom:!!_,lockRef:n,gapMode:E}),a?b.cloneElement(b.Children.only(o),Cc(Cc({},k),{ref:A})):b.createElement(S,Cc({},k,{className:c,ref:A}),o))});Xj.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Xj.classNames={fullWidth:fk,zeroRight:dk};var aDe=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function oDe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=aDe();return t&&e.setAttribute("nonce",t),e}function lDe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function cDe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var uDe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=oDe())&&(lDe(t,n),cDe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},dDe=function(){var e=uDe();return function(t,n){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},cle=function(){var e=dDe(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},fDe={left:0,top:0,right:0,gap:0},GO=function(e){return parseInt(e||"",10)||0},hDe=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[GO(n),GO(r),GO(i)]},pDe=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return fDe;var t=hDe(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},mDe=cle(),S1="data-scroll-locked",gDe=function(e,t,n,r){var i=e.left,s=e.top,a=e.right,o=e.gap;return n===void 0&&(n="margin"),` 768 .`.concat(QMe,` { 769 overflow: hidden `).concat(r,`; 770 padding-right: `).concat(o,"px ").concat(r,`; 771 } 772 body[`).concat(S1,`] { 773 overflow: hidden `).concat(r,`; 774 overscroll-behavior: contain; 775 `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` 776 padding-left: `.concat(i,`px; 777 padding-top: `).concat(s,`px; 778 padding-right: `).concat(a,`px; 779 margin-left:0; 780 margin-top:0; 781 margin-right: `).concat(o,"px ").concat(r,`; 782 `),n==="padding"&&"padding-right: ".concat(o,"px ").concat(r,";
782")].filter(Boolean).join(""),` 783 } 784 785 .`).concat(dk,` { 786 right: `).concat(o,"px ").concat(r,`; 787 } 788 789 .`).concat(fk,` { 790 margin-right: `).concat(o,"px ").concat(r,`; 791 } 792 793 .`).concat(dk," .").concat(dk,` { 794 right: 0 `).concat(r,`; 795 } 796 797 .`).concat(fk," .").concat(fk,` { 798 margin-right: 0 `).concat(r,`; 799 } 800 801 body[`).concat(S1,`] { 802 `).concat(ZMe,": ").concat(o,`px; 803 } 804`)},JK=function(){var e=parseInt(document.body.getAttribute(S1)||"0",10);return isFinite(e)?e:0},xDe=function(){b.useEffect(function(){return document.body.setAttribute(S1,(JK()+1).toString()),function(){var e=JK()-1;e<=0?document.body.removeAttribute(S1):document.body.setAttribute(S1,e.toString())}},[])},vDe=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;xDe();var s=b.useMemo(function(){return pDe(i)},[i]);return b.createElement(mDe,{styles:gDe(s,!t,i,n?"":"!important")})},M6=!1;if(typeof window<"u")try{var WT=Object.defineProperty({},"passive",{get:function(){return M6=!0,!0}});window.addEventListener("test",WT,WT),window.removeEventListener("test",WT,WT)}catch{M6=!1}var vv=M6?{passive:!1}:!1,yDe=function(e){return e.tagName==="TEXTAREA"},ule=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!yDe(e)&&n[t]==="visible")},bDe=function(e){return ule(e,"overflowY")},_De=function(e){return ule(e,"overflowX")},eY=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=dle(e,r);if(i){var s=fle(e,r),a=s[1],o=s[2];if(a>o)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},wDe=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},SDe=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},dle=function(e,t){return e==="v"?bDe(t):_De(t)},fle=function(e,t){return e==="v"?wDe(t):SDe(t)},EDe=function(e,t){return e==="h"&&t==="rtl"?-1:1},CDe=function(e,t,n,r,i){var s=EDe(e,window.getComputedStyle(t).direction),a=s*r,o=n.target,c=t.contains(o),u=!1,d=a>0,h=0,p=0;do{if(!o)break;var g=fle(e,o),v=g[0],x=g[1],_=g[2],w=x-_-s*v;(v||w)&&dle(e,o)&&(h+=w,p+=v);var S=o.parentNode;o=S&&S.nodeType===Node.DOCUMENT_FRAGMENT_NODE?S.host:S}while(!c&&o!==document.body||c&&(t.contains(o)||t===o));return(d&&Math.abs(h)<1||!d&&Math.abs(p)<1)&&(u=!0),u},GT=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},tY=function(e){return[e.deltaX,e.deltaY]},nY=function(e){return e&&"current"in e?e.current:e},TDe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ADe=function(e){return` 805 .block-interactivity-`.concat(e,` {pointer-events: none;} 806 .allow-interactivity-`).concat(e,` {pointer-events: all;} 807`)},kDe=0,yv=[];function NDe(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),i=b.useState(kDe++)[0],s=b.useState(cle)[0],a=b.useRef(e);b.useEffect(function(){a.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var x=XMe([e.lockRef.current],(e.shards||[]).map(nY),!0).filter(Boolean);return x.forEach(function(_){return _.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),x.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var o=b.useCallback(function(x,_){if("touches"in x&&x.touches.length===2||x.type==="wheel"&&x.ctrlKey)return!a.current.allowPinchZoom;var w=GT(x),S=n.current,E="deltaX"in x?x.deltaX:S[0]-w[0],T="deltaY"in x?x.deltaY:S[1]-w[1],N,A=x.target,k=Math.abs(E)>Math.abs(T)?"h":"v";if("touches"in x&&k==="h"&&A.type==="range")return!1;var j=eY(k,A);if(!j)return!0;if(j?N=k:(N=k==="v"?"h":"v",j=eY(k,A)),!j)return!1;if(!r.current&&"changedTouches"in x&&(E||T)&&(r.current=N),!N)return!0;var R=r.current||N;return CDe(R,_,x,R==="h"?E:T)},[]),c=b.useCallback(function(x){var _=x;if(!(!yv.length||yv[yv.length-1]!==s)){var w="deltaY"in _?tY(_):GT(_),S=t.current.filter(function(N){return N.name===_.type&&(N.target===_.target||_.target===N.shadowParent)&&TDe(N.delta,w)})[0];if(S&&S.should){_.cancelable&&_.preventDefault();return}
vendor: 4,256 bytes, line 807
807if(!S){var E=(a.current.shards||[]).map(nY).filter(Boolean).filter(function(N){return N.contains(_.target)}),T=E.length>0?o(_,E[0]):!a.current.noIsolation;T&&_.cancelable&&_.preventDefault()}}},[]),u=b.useCallback(function(x,_,w,S){var E={name:x,delta:_,target:w,should:S,shadowParent:jDe(w)};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(T){return T!==E})},1)},[]),d=b.useCallback(function(x){n.current=GT(x),r.current=void 0},[]),h=b.useCallback(function(x){u(x.type,tY(x),x.target,o(x,e.lockRef.current))},[]),p=b.useCallback(function(x){u(x.type,GT(x),x.target,o(x,e.lockRef.current))},[]);b.useEffect(function(){return yv.push(s),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:p}),document.addEventListener("wheel",c,vv),document.addEventListener("touchmove",c,vv),document.addEventListener("touchstart",d,vv),function(){yv=yv.filter(function(x){return x!==s}),document.removeEventListener("wheel",c,vv),document.removeEventListener("touchmove",c,vv),document.removeEventListener("touchstart",d,vv)}},[]);var g=e.removeScrollBar,v=e.inert;return b.createElement(b.Fragment,null,v?b.createElement(s,{styles:ADe(i)}):null,g?b.createElement(vDe,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function jDe(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const RDe=sDe(lle,NDe);var aE=b.forwardRef(function(e,t){return b.createElement(Xj,Cc({},e,{ref:t,sideCar:RDe}))});aE.classNames=Xj.classNames;var IDe=[" ","Enter","ArrowUp","ArrowDown"],ODe=[" ","Enter"],A0="Select",[Qj,Zj,PDe]=l7(A0),[Fy]=Ia(A0,[PDe,Im]),Jj=Im(),[MDe,Om]=Fy(A0),[DDe,FDe]=Fy(A0),hle=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:s,value:a,defaultValue:o,onValueChange:c,dir:u,name:d,autoComplete:h,disabled:p,required:g,form:v}=e,x=Jj(t),[_,w]=b.useState(null),[S,E]=b.useState(null),[T,N]=b.useState(!1),A=ox(u),[k,j]=Yl({prop:r,defaultProp:i??!1,onChange:s,caller:A0}),[R,P]=Yl({prop:a,defaultProp:o,onChange:c,caller:A0}),V=b.useRef(null),U=_?v||!!_.closest("form"):!0,[G,Q]=b.useState(new Set),Z=Array.from(G).map(K=>K.props.value).join(";");return l.jsx(Vj,{...x,children:l.jsxs(MDe,{required:g,scope:t,trigger:_,onTriggerChange:w,valueNode:S,onValueNodeChange:E,valueNodeHasChildren:T,onValueNodeHasChildrenChange:N,contentId:Na(),value:R,onValueChange:P,open:k,onOpenChange:j,dir:A,triggerPointerDownPosRef:V,disabled:p,children:[l.jsx(Qj.Provider,{scope:t,children:l.jsx(DDe,{scope:e.__scopeSelect,onNativeOptionAdd:b.useCallback(K=>{Q(te=>new Set(te).add(K))},[]),onNativeOptionRemove:b.useCallback(K=>{Q(te=>{const ne=new Set(te);return ne.delete(K),ne})},[]),children:n})}),U?l.jsxs(Dle,{"aria-hidden":!0,required:g,tabIndex:-1,name:d,autoComplete:h,value:R,onChange:K=>P(K.target.value),disabled:p,form:v,children:[R===void 0?l.jsx("option",{value:""}):null,Array.from(G)]},Z):null]})})};hle.displayName=A0;var ple="SelectTrigger",mle=b.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,s=Jj(n),a=Om(ple,n),o=a.disabled||r,c=Wn(t,a.onTriggerChange),u=Zj(n),d=b.useRef("touch"),[h,p,g]=Lle(x=>{const _=u().filter(E=>!E.disabled),w=_.find(E=>E.value===a.value),S=zle(_,x,w);S!==void 0&&a.onValueChange(S.value)}),v=x=>{o||(a.onOpenChange(!0),g()),x&&(a.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)})};return l.jsx(rE,{asChild:!0,...s,children:l.jsx(nn.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:o,"data-disabled":o?"":void 0,"data-placeholder":Fle(a.value)?"":void 0,...i,ref:c,onClick:qt(i.onClick,x=>{x.currentTarget.focus(),d.current!=="mouse"&&v(x)}),onPointerDown:qt(i.onPointerDown,x=>{d.current=x.pointerType;const _=x.target;_.hasPointerCapture(x.pointerId)&&_.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&x.pointerType==="mouse"&&(v(x),x.preventDefault())}),onKeyDown:qt(i.onKeyDown,x=>{const _=h.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&p(x.key),!(_&&x.key===" ")&&IDe.includes(x.key)&&(v(),x.preventDefault())})})})});mle.displayName=ple;var gle="SelectValue",xle=b.forwardRef((e,t)=>
vendor: 13,487 bytes, line 807
807{const{__scopeSelect:n,className:r,style:i,children:s,placeholder:a="",...o}=e,c=Om(gle,n),{onValueNodeHasChildrenChange:u}=c,d=s!==void 0,h=Wn(t,c.onValueNodeChange);return sa(()=>{u(d)},[u,d]),l.jsx(nn.span,{...o,ref:h,style:{pointerEvents:"none"},children:Fle(c.value)?l.jsx(l.Fragment,{children:a}):s})});xle.displayName=gle;var LDe="SelectIcon",vle=b.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return l.jsx(nn.span,{"aria-hidden":!0,...i,ref:t,children:r||"â¼"})});vle.displayName=LDe;var zDe="SelectPortal",yle=e=>l.jsx(QS,{asChild:!0,...e});yle.displayName=zDe;var k0="SelectContent",ble=b.forwardRef((e,t)=>{const n=Om(k0,e.__scopeSelect),[r,i]=b.useState();if(sa(()=>{i(new DocumentFragment)},[]),!n.open){const s=r;return s?mh.createPortal(l.jsx(_le,{scope:e.__scopeSelect,children:l.jsx(Qj.Slot,{scope:e.__scopeSelect,children:l.jsx("div",{children:e.children})})}),s):null}return l.jsx(wle,{...e,ref:t})});ble.displayName=k0;var iu=10,[_le,Pm]=Fy(k0),$De="SelectContentImpl",BDe=hm("SelectContent.RemoveScroll"),wle=b.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:a,side:o,sideOffset:c,align:u,alignOffset:d,arrowPadding:h,collisionBoundary:p,collisionPadding:g,sticky:v,hideWhenDetached:x,avoidCollisions:_,...w}=e,S=Om(k0,n),[E,T]=b.useState(null),[N,A]=b.useState(null),k=Wn(t,W=>T(W)),[j,R]=b.useState(null),[P,V]=b.useState(null),U=Zj(n),[G,Q]=b.useState(!1),Z=b.useRef(!1);b.useEffect(()=>{if(E)return Yj(E)},[E]),Kj();const K=b.useCallback(W=>{const[re,...ae]=U().map(fe=>fe.ref.current),[ce]=ae.slice(-1),Te=document.activeElement;for(const fe of W)if(fe===Te||(fe?.scrollIntoView({block:"nearest"}),fe===re&&N&&(N.scrollTop=0),fe===ce&&N&&(N.scrollTop=N.scrollHeight),fe?.focus(),document.activeElement!==Te))return},[U,N]),te=b.useCallback(()=>K([j,E]),[K,j,E]);b.useEffect(()=>{G&&te()},[G,te]);const{onOpenChange:ne,triggerPointerDownPosRef:se}=S;b.useEffect(()=>{if(E){let W={x:0,y:0};const re=ce=>{W={x:Math.abs(Math.round(ce.pageX)-(se.current?.x??0)),y:Math.abs(Math.round(ce.pageY)-(se.current?.y??0))}},ae=ce=>{W.x<=10&&W.y<=10?ce.preventDefault():E.contains(ce.target)||ne(!1),document.removeEventListener("pointermove",re),se.current=null};return se.current!==null&&(document.addEventListener("pointermove",re),document.addEventListener("pointerup",ae,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",re),document.removeEventListener("pointerup",ae,{capture:!0})}}},[E,ne,se]),b.useEffect(()=>{const W=()=>ne(!1);return window.addEventListener("blur",W),window.addEventListener("resize",W),()=>{window.removeEventListener("blur",W),window.removeEventListener("resize",W)}},[ne]);const[H,O]=Lle(W=>{const re=U().filter(Te=>!Te.disabled),ae=re.find(Te=>Te.ref.current===document.activeElement),ce=zle(re,W,ae);ce&&setTimeout(()=>ce.ref.current.focus())}),L=b.useCallback((W,re,ae)=>{const ce=!Z.current&&!ae;(S.value!==void 0&&S.value===re||ce)&&(R(W),ce&&(Z.current=!0))},[S.value]),M=b.useCallback(()=>E?.focus(),[E]),q=b.useCallback((W,re,ae)=>{const ce=!Z.current&&!ae;(S.value!==void 0&&S.value===re||ce)&&V(W)},[S.value]),X=r==="popper"?D6:Sle,J=X===D6?{side:o,sideOffset:c,align:u,alignOffset:d,arrowPadding:h,collisionBoundary:p,collisionPadding:g,sticky:v,hideWhenDetached:x,avoidCollisions:_}:{};return l.jsx(_le,{scope:n,content:E,viewport:N,onViewportChange:A,itemRefCallback:L,selectedItem:j,onItemLeave:M,itemTextRefCallback:q,focusSelectedItem:te,selectedItemText:P,position:r,isPositioned:G,searchRef:H,children:l.jsx(aE,{as:BDe,allowPinchZoom:!0,children:l.jsx(sE,{asChild:!0,trapped:S.open,onMountAutoFocus:W=>{W.preventDefault()},onUnmountAutoFocus:qt(i,W=>{S.trigger?.focus({preventScroll:!0}),W.preventDefault()}),children:l.jsx(Py,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:W=>W.preventDefault(),onDismiss:()=>S.onOpenChange(!1),children:l.jsx(X,{role:"listbox",id:S.contentId,"data-state":S.open?"open":"closed",dir:S.dir,onContextMenu:W=>W.preventDefault(),...w,...J,onPlaced:()=>Q(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:qt(w.onKeyDown,W=>{const re=W.ctrlKey||W.altKey||W.metaKey;if(W.key==="Tab"&&W.preventDefault(),!re&&W.key.length===1&&O(W.key),["ArrowUp","ArrowDown","Home","End"].includes(W.key)){let ce=U().filter(Te=>!Te.disabled).map(Te=>Te.ref.current);if(["ArrowUp","End"].includes(W.key)&&(ce=ce.slice().reverse()),["ArrowUp","ArrowDown"].includes(W.key)){const Te=W.target,fe=ce.indexOf(Te);ce=ce.slice(fe+1)}setTimeout(()=>K(ce)),W.preventDefault()}})})})})})})});wle.displayName=$De;var UDe="SelectItemAlignedPosition",Sle=b.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,s=Om(k0,n),a=Pm(k0,n),[o,c]=b.useState(null),[u,d]=b.useState(null),h=Wn(t,k=>d(k)),p=Zj(n),g=b.useRef(!1),v=b.useRef(!0),{viewport:x,selectedItem:_,selectedItemText:w,focusSelectedItem:S}=a,E=b.useCallback(()=>{if(s.trigger&&s.valueNode&&o&&u&&x&&_&&w){const k=s.trigger.getBoundingClientRect(),j=u.getBoundingClientRect(),R=s.valueNode.getBoundingClientRect(),P=w.getBoundingClientRect();if(s.dir!=="rtl"){const Te=P.left-j.left,fe=R.left-Te,xe=k.left-fe,ke=k.width+xe,Fe=Math.max(ke,j.width),tt=window.innerWidth-iu,Se=P6(fe,[iu,Math.max(iu,tt-Fe)]);o.style.minWidth=ke+"px",o.style.left=Se+"px"}else{const Te=j.right-P.right,fe=window.innerWidth-R.right-Te,xe=window.innerWidth-k.right-fe,ke=k.width+xe,Fe=Math.max(ke,j.width),tt=window.innerWidth-iu,Se=P6(fe,[iu,Math.max(iu,tt-Fe)]);o.style.minWidth=ke+"px",o.style.right=Se+"px"}const V=p(),U=window.innerHeight-iu*2,G=x.scrollHeight,Q=window.getComputedStyle(u),Z=parseInt(Q.borderTopWidth,10),K=parseInt(Q.paddingTop,10),te=parseInt(Q.borderBottomWidth,10),ne=parseInt(Q.paddingBottom,10),se=Z+K+G+ne+te,H=Math.min(_.offsetHeight*5,se),O=window.getComputedStyle(x),L=parseInt(O.paddingTop,10),M=parseInt(O.paddingBottom,10),q=k.top+k.height/2-iu,X=U-q,J=_.offsetHeight/2,W=_.offsetTop+J,re=Z+K+W,ae=se-re;if(re<=q){const Te=V.length>0&&_===V[V.length-1].ref.current;o.style.bottom="0px";const fe=u.clientHeight-x.offsetTop-x.offsetHeight,xe=Math.max(X,J+(Te?M:0)+fe+te),ke=re+xe;o.style.height=ke+"px"}else{const Te=V.length>0&&_===V[0].ref.current;o.style.top="0px";const xe=Math.max(q,Z+x.offsetTop+(Te?L:0)+J)+ae;o.style.height=xe+"px",x.scrollTop=re-q+x.offsetTop}o.style.margin=`${iu}px 0`,o.style.minHeight=H+"px",o.style.maxHeight=U+"px",r?.(),requestAnimationFrame(()=>g.current=!0)}},[p,s.trigger,s.valueNode,o,u,x,_,w,s.dir,r]);sa(()=>E(),[E]);const[T,N]=b.useState();sa(()=>{u&&N(window.getComputedStyle(u).zIndex)},[u]);const A=b.useCallback(k=>{k&&v.current===!0&&(E(),S?.(),v.current=!1)},[E,S]);return l.jsx(HDe,{scope:n,contentWrapper:o,shouldExpandOnScrollRef:g,onScrollButtonChange:A,children:l.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:T},children:l.jsx(nn.div,{...i,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});Sle.displayName=UDe;var VDe="SelectPopperPosition",D6=b.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=iu,...s}=e,a=Jj(n);return l.jsx(Hj,{...a,...s,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});D6.displayName=VDe;var[HDe,u7]=Fy(k0,{}),F6="SelectViewport",Ele=b.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,s=Pm(F6,n),a=u7(F6,n),o=Wn(t,s.onViewportChange),c=b.useRef(0);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),l.jsx(Qj.Slot,{scope:n,children:l.jsx(nn.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:o,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:qt(i.onScroll,u=>{const d=u.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:p}=a;if(p?.current&&h){const g=Math.abs(c.current-d.scrollTop);if(g>0){const v=window.innerHeight-iu*2,x=parseFloat(h.style.minHeight),_=parseFloat(h.style.height),w=Math.max(x,_);if(w<v){const S=w+g,E=Math.min(v,S),T=S-E;h.style.height=E+"px",h.style.bottom==="0px"&&(d.scrollTop=T>0?T:0,h.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});Ele.displayName=F6;var Cle="SelectGroup",[qDe,WDe]=Fy(Cle),GDe=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Na();return l.jsx(qDe,{scope:n,id:i,children:l.jsx(nn.div,{role:"group","aria-labelledby":i,...r,ref:t})})});GDe.displayName=Cle;var Tle="SelectLabel",KDe=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=WDe(Tle,n);return l.jsx(nn.div,{id:i.id,...r,ref:t})});KDe.displayName=Tle;var AN="SelectItem",[YDe,Ale]=Fy(AN),kle=b.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:s,...a}=e,o=Om(AN,n),c=Pm(AN,n),u=o.value===r,[d,h]=b.useState(s??""),[p,g]=b.useState(!1),v=Wn(t,S=>c.itemRefCallback?.(S,r,i)),x=Na(),_=b.useRef("touch"),w=()=>{i||(o.onValueChange(r),o.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return l.jsx(YDe,{scope:n,value:r,disabled:i,textId:x,isSelected:u,onItemTextChange:b.useCallback(S=>{h(E=>E||(S?.textContent??"").trim())},[]),children:l.jsx(Qj.ItemSlot,{scope:n,value:r,disabled:i,textValue:d,children:l.jsx(nn.div,{role:"option","aria-labelledby":x,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...a,ref:v,onFocus:qt(a.onFocus,()=>g(!0)),onBlur:qt(a.onBlur,()=>g(!1)),onClick:qt(a.onClick,()=>{_.current!=="mouse"&&w()}),onPointerUp:qt(a.onPointerUp,()=>{_.current==="mouse"&&w()}),onPointerDown:qt(a.onPointerDown,S=>{_.current=S.pointerType}),onPointerMove:qt(a.onPointerMove,S=>{_.current=S.pointerType,i?c.onItemLeave?.():_.current==="mouse"&&S.currentTarget.focus({preventScroll:!0})}),onPointerLeave:qt(a.onPointerLeave,S=>{S.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:qt(a.onKeyDown,S=>{c.searchRef?.current!==""&&S.key===" "||(ODe.includes(S.key)&&w(),S.key===" "&&S.preventDefault())})})})})});kle.displayName=AN;var lw="SelectItemText",Nle=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...s}=e,a=Om(lw,n),o=Pm(lw,n),c=Ale(lw,n),u=FDe(lw,n),[d,h]=b.useState(null),p=Wn(t,w=>h(w),c.onItemTextChange,w=>o.itemTextRefCallback?.(w,c.value,c.disabled)),g=d?.textContent,v=b.useMemo(()=>l.jsx("option",{value:c.value,disabled:c.disabled,children:g},c.value),[c.disabled,c.value,g]),{onNativeOptionAdd:x,onNativeOptionRemove:_}=u;return sa(()=>(x(v),()=>_(v)),[x,_,v]),l.jsxs(l.Fragment,{children:[l.jsx(nn.span,{id:c.textId,...s,ref:p}),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?mh.createPortal(s.children,a.valueNode):null]})});Nle.displayName=lw;var jle="SelectItemIndicator",Rle=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Ale(jle,n).isSelected?l.jsx(nn.span,{"aria-hidden":!0,...r,ref:t}):null});Rle.displayName=jle;var L6="SelectScrollUpButton",Ile=b.forwardRef((e,t)=>{const n=Pm(L6,e.__scopeSelect),r=u7(L6,e.__scopeSelect),[i,s]=b.useState(!1),a=Wn(t,r.onScrollButtonChange);return sa(()=>{if(n.viewport&&n.isPositioned){let o=function(){const u=c.scrollTop>0;s(u)};const c=n.viewport;return o(),c.addEventListener("scroll",o),()=>c.removeEventListener("scroll",o)}},[n.viewport,n.isPositioned]),i?l.jsx(Ple,{...e,ref:a,onAutoScroll:()=>{const{viewport:o,selectedItem:c}=n;o&&c&&(o.scrollTop=o.scrollTop-c.offsetHeight)}}):null});Ile.displayName=L6;var z6="SelectScrollDownButton",Ole=b.forwardRef((e,t)=>{const n=Pm(z6,e.__scopeSelect),r=u7(z6,e.__scopeSelect),[i,s]=b.useState(!1),a=Wn(t,r.onScrollButtonChange);return sa(()=>{if(n.viewport&&n.isPositioned){let o=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;s(d)};const c=n.viewport;return o(),c.addEventListener("scroll",o),()=>c.removeEventListener("scroll",o)}},[n.viewport,n.isPositioned]),i?l.jsx(Ple,{...e,ref:a,onAutoScroll:()=>{const{viewport:o,selectedItem:c}=n;o&&c&&(o.scrollTop=o.scrollTop+c.offsetHeight)}}):null});Ole.displayName=z6;var Ple=b.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,s=Pm("SelectScrollButton",n),a=b.useRef(null),o=Zj(n),c=b.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return b.useEffect(()=>()=>c(),[c]),sa(()=>{o().find(d=>d.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[o]),l.jsx(nn.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:qt(i.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:qt(i.onPointerMove,()=>{s.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:qt(i.onPointerLeave,()=>{c()})})}),XDe="SelectSeparator",Mle=b.forwardRef((e,t)=>
807{const{__scopeSelect:n,...r}=e;return l.jsx(nn.div,{"aria-hidden":!0,...r,ref:t})});Mle.displayName=XDe;var $6="SelectArrow",QDe=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Jj(n),s=Om($6,n),a=Pm($6,n);return s.open&&a.position==="popper"?l.jsx(qj,{...i,...r,ref:t}):null});QDe.displayName=$6;var ZDe="SelectBubbleInput",Dle=b.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const i=b.useRef(null),s=Wn(r,i),a=c7(t);return b.useEffect(()=>{const o=i.current;if(!o)return;const c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==t&&d){const h=new Event("change",{bubbles:!0});d.call(o,t),o.dispatchEvent(h)}},[a,t]),l.jsx(nn.select,{...n,style:{...Goe,...n.style},ref:s,defaultValue:t})});Dle.displayName=ZDe;function Fle(e){return e===""||e===void 0}function Lle(e){const t=wa(e),n=b.useRef(""),r=b.useRef(0),i=b.useCallback(a=>{const o=n.current+a;t(o),(function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))})(o)},[t]),s=b.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,s]}function zle(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=JDe(e,Math.max(s,0));i.length===1&&(a=a.filter(u=>u!==n));const c=a.find(u=>u.textValue.toLowerCase().startsWith(i.toLowerCase()));return c!==n?c:void 0}function JDe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var $le=hle,Ble=mle,R2=xle,Ule=vle,Vle=yle,Hle=ble,qle=Ele,Wle=kle,Gle=Nle,e6e=Rle,t6e=Ile,n6e=Ole,r6e=Mle;const Kle=b.createContext(void 0);function Yle(){const e=b.useContext(Kle);if(!e)throw new Error("No SelectContext found when calling useSelectContext.");return e}const kN=b.memo(function({size:t="md",variant:n="default",...r}){const i=b.useMemo(()=>({size:t,variant:n}),[t,n]);return l.jsx(Kle.Provider,{value:i,children:l.jsx($le,{...r})})}),th=qi({item:{base:"transition-all relative cur-pointer flex w-full cursor-pointer select-none items-center rounded-radius text-input-fg outline-none focus:bg-accent focus:text-accent-fg data-[state=checked]:bg-accent data-[disabled]:pointer-events-none data-[disabled]:opacity-50",text:"relative",icon:"absolute right-2 flex size-3.5 items-center justify-center",size:{xs:"h-6 px-2 text-xs leading-4",sm:"h-7 px-2 text-xs leading-4",md:"h-8 px-3 text-sm leading-4",lg:"h-9 px-3 text-base leading-4"}},label:"font-semibold text-foreground",separator:"-mx-1 my-1 h-px bg-separator",trigger:`${kd.ring} text-left bg-input ring-input-border flex w-full transition-colors items-center justify-between rounded-radius border border-input-border hover:border-input-fg px-3 py-2 text-sm text-input-fg data-[placeholder]:text-placeholder focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1`,content:{base:"relative z-50 max-h-[var(--radix-select-content-available-height)] min-w-[var(--radix-popper-anchor-width)] overflow-hidden rounded-radius border border-popover-border bg-popover text-popover-fg shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",popper:"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1"},viewport:{base:"p-1"},variants:{size:{xs:"h-6 px-2 py-1.5 text-xs leading-4",sm:"h-7 px-2 py-1.5 text-xs leading-4",md:"h-9 px-3 py-2 text-sm leading-4",lg:"h-11 px-3 py-3 text-base leading-4"},variant:{default:"border-input-border focus:border-input-fg hover:border-input-fg",danger:"border-danger focus:border-danger hover:border-danger/30",success:"border-success focus:border-success hover:border-success/30",warning:"border-warning focus:border-warning hover:border-warning/30",info:"border-info focus:border-info hover:border-info/30"}}},"select"),i6e=Zl("",{variants:th.variants}),NN=b.forwardRef(({className:e,children:t,position:n="popper",container:r,usePortal:i=!0,...s},a)=>{const o=l.jsxs(Hle,{ref:a,className:$e(th.content.base,n==="popper"&&th.content.popper,e),position:n,...s,children:[l.jsx(t6e,{className:"flex cursor-default items-center justify-center py-1",children:l.jsx(kj,{size:16})}),l.jsx(qle,{className:$e(th.viewport.base),children:t}),l.jsx(n6e,{className:"flex cursor-default items-center justify-center py-1",children:l.jsx(Xd,{size:16})})]});return i?l.jsx(Vle,{container:r,children:o}):o}),Xle=b.forwardRef(({className:e,children:t,asChild:n,size:r="md",variant:i="default",...s},a)=>{const o=n?sx:"button";return l.jsxs(o,{ref:a,className:$e(th.trigger,i6e({size:r,variant:i}),e),...s,children:[t??l.jsx("span",{}),l.jsx(Ule,{asChild:!0,children:l.jsx(Xd,{className:"shrink-0",size:16})})]})}),jN=b.forwardRef(({className:e,...t},n)=>{const{size:r,variant:i}
807=Yle();return l.jsx(Ble,{asChild:!0,children:l.jsx(Xle,{ref:n,size:r,variant:i,...t})})}),Yt=b.forwardRef(({className:e,children:t,...n},r)=>{const{size:i}=Yle();return l.jsxs(Wle,{ref:r,className:$e(th.item.base,i&&th.item.size[i],e),...n,children:[l.jsx("span",{className:th.item.text,children:l.jsx(Gle,{children:t})}),l.jsx(e6e,{className:th.item.icon,children:l.jsx(Es,{size:16})})]})}),tr=b.forwardRef(({children:e,placeholder:t,id:n,onCloseAutoFocus:r,onEscapeKeyDown:i,onPointerDownOutside:s,position:a,side:o,sideOffset:c,align:u,alignOffset:d,avoidCollisions:h,collisionBoundary:p,collisionPadding:g,arrowPadding:v,sticky:x,hideWhenDetached:_,usePortal:w,container:S,...E},T)=>l.jsxs(kN,{...E,children:[l.jsx(jN,{ref:T,id:n,children:l.jsx(R2,{placeholder:t})}),l.jsx(NN,{usePortal:w,container:S,onCloseAutoFocus:r,onEscapeKeyDown:i,onPointerDownOutside:s,position:a,side:o,sideOffset:c,align:u,alignOffset:d,avoidCollisions:h,collisionBoundary:p,collisionPadding:g,arrowPadding:v,sticky:x,hideWhenDetached:_,children:e})]}));var s6e=e=>{switch(e){case"success":return l6e;case"info":return u6e;case"warning":return c6e;case"error":return d6e;default:return null}},a6e=Array(12).fill(0),o6e=({visible:e,className:t})=>Y.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},Y.createElement("div",{className:"sonner-spinner"},a6e.map((n,r)=>Y.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),l6e=Y.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Y.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),c6e=Y.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},Y.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),u6e=Y.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Y.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),d6e=Y.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Y.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),f6e=Y.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},Y.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),Y.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),h6e=()=>{let[e,t]=Y.useState(document.hidden);return Y.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},B6=1,p6e=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;let{message:r,...i}=t,s=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:B6++,a=this.toasts.find(c=>c.id===s),o=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),a?this.toasts=this.toasts.map(c=>c.id===s?(this.publish({...c,...t,id:s,title:r}),{...c,...t,id:s,dismissible:o,title:r}):c):this.addToast({title:r,...i,dismissible:o,id:s}),s},this.dismiss=t=>
807(this.dismissedToasts.add(t),t||this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),this.subscribers.forEach(n=>n({id:t,dismiss:!0})),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));let i=t instanceof Promise?t:t(),s=r!==void 0,a,o=i.then(async u=>{if(a=["resolve",u],Y.isValidElement(u))s=!1,this.create({id:r,type:"default",message:u});else if(g6e(u)&&!u.ok){s=!1;let d=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,h=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description;this.create({id:r,type:"error",message:d,description:h})}else if(n.success!==void 0){s=!1;let d=typeof n.success=="function"?await n.success(u):n.success,h=typeof n.description=="function"?await n.description(u):n.description;this.create({id:r,type:"success",message:d,description:h})}}).catch(async u=>{if(a=["reject",u],n.error!==void 0){s=!1;let d=typeof n.error=="function"?await n.error(u):n.error,h=typeof n.description=="function"?await n.description(u):n.description;this.create({id:r,type:"error",message:d,description:h})}}).finally(()=>{var u;s&&(this.dismiss(r),r=void 0),(u=n.finally)==null||u.call(n)}),c=()=>new Promise((u,d)=>o.then(()=>a[0]==="reject"?d(a[1]):u(a[1])).catch(d));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(t,n)=>{let r=n?.id||B6++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},il=new p6e,m6e=(e,t)=>{let n=t?.id||B6++;return il.addToast({title:e,...t,id:n}),n},g6e=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",x6e=m6e,v6e=()=>il.toasts,y6e=()=>il.getActiveToasts(),Re=Object.assign(x6e,{success:il.success,info:il.info,warning:il.warning,error:il.error,custom:il.custom,message:il.message,promise:il.promise,dismiss:il.dismiss,loading:il.loading},{getHistory:v6e,getToasts:y6e});function b6e(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}b6e(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
807left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
807:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
807--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} 808`);function KT(e){return e.label!==void 0}var _6e=3,w6e="32px",S6e="16px",rY=4e3,E6e=356,C6e=14,T6e=20,A6e=200;function Qc(...e){return e.filter(Boolean).join(" ")}function k6e(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var N6e=e=>{var t,n,r,i,s,a,o,c,u,d,h;let{invert:p,toast:g,unstyled:v,interacting:x,setHeights:_,visibleToasts:w,heights:S,index:E,toasts:T,expanded:N,removeToast:A,defaultRichColors:k,closeButton:j,style:R,cancelButtonStyle:P,actionButtonStyle:V,className:U="",descriptionClassName:G="",duration:Q,position:Z,gap:K,loadingIcon:te,expandByDefault:ne,classNames:se,icons:H,closeButtonAriaLabel:O="Close toast",pauseWhenPageIsHidden:L}=e,[M,q]=Y.useState(null),[X,J]=Y.useState(null),[W,re]=Y.useState(!1),[ae,ce]=Y.useState(!1),[Te,fe]=Y.useState(!1),[xe,ke]=Y.useState(!1),[Fe,tt]=Y.useState(!1),[Se,et]=Y.useState(0),[pt,ie]=Y.useState(0),ue=Y.useRef(g.duration||Q||rY),Ne=Y.useRef(null),De=Y.useRef(null),be=E===0,me=E+1<=w,we=g.type,Le=g.dismissible!==!1,oe=g.className||"",St=g.descriptionClassName||"",Ut=Y.useMemo(()=>S.findIndex(rn=>rn.toastId===g.id)||0,[S,g.id]),Ht=Y.useMemo(()=>{var rn;return(rn=g.closeButton)!=null?rn:j},[g.closeButton,j]),Rt=Y.useMemo(()=>
808g.duration||Q||rY,[g.duration,Q]),Ct=Y.useRef(0),Wt=Y.useRef(0),Tn=Y.useRef(0),Ie=Y.useRef(null),[dt,$t]=Z.split("-"),Mn=Y.useMemo(()=>S.reduce((rn,_n,Hn)=>Hn>=Ut?rn:rn+_n.height,0),[S,Ut]),Ve=h6e(),ct=g.invert||p,Gt=we==="loading";Wt.current=Y.useMemo(()=>Ut*K+Mn,[Ut,Mn]),Y.useEffect(()=>{ue.current=Rt},[Rt]),Y.useEffect(()=>{re(!0)},[]),Y.useEffect(()=>{let rn=De.current;if(rn){let _n=rn.getBoundingClientRect().height;return ie(_n),_(Hn=>[{toastId:g.id,height:_n,position:g.position},...Hn]),()=>_(Hn=>Hn.filter(Jr=>Jr.toastId!==g.id))}},[_,g.id]),Y.useLayoutEffect(()=>{if(!W)return;let rn=De.current,_n=rn.style.height;rn.style.height="auto";let Hn=rn.getBoundingClientRect().height;rn.style.height=_n,ie(Hn),_(Jr=>Jr.find(Nr=>Nr.toastId===g.id)?Jr.map(Nr=>Nr.toastId===g.id?{...Nr,height:Hn}:Nr):[{toastId:g.id,height:Hn,position:g.position},...Jr])},[W,g.title,g.description,_,g.id]);let Cn=Y.useCallback(()=>{ce(!0),et(Wt.current),_(rn=>rn.filter(_n=>_n.toastId!==g.id)),setTimeout(()=>{A(g)},A6e)},[g,A,_,Wt]);Y.useEffect(()=>{if(g.promise&&we==="loading"||g.duration===1/0||g.type==="loading")return;let rn;return N||x||L&&Ve?(()=>{if(Tn.current<Ct.current){let _n=new Date().getTime()-Ct.current;ue.current=ue.current-_n}Tn.current=new Date().getTime()})():ue.current!==1/0&&(Ct.current=new Date().getTime(),rn=setTimeout(()=>{var _n;(_n=g.onAutoClose)==null||_n.call(g,g),Cn()},ue.current)),()=>clearTimeout(rn)},[N,x,g,we,L,Ve,Cn]),Y.useEffect(()=>{g.delete&&Cn()},[Cn,g.delete]);function Zr(){var rn,_n,Hn;return H!=null&&H.loading?Y.createElement("div",{className:Qc(se?.loader,(rn=g?.classNames)==null?void 0:rn.loader,"sonner-loader"),"data-visible":we==="loading"},H.loading):te?Y.createElement("div",{className:Qc(se?.loader,(_n=g?.classNames)==null?void 0:_n.loader,"sonner-loader"),"data-visible":we==="loading"},te):Y.createElement(o6e,{className:Qc(se?.loader,(Hn=g?.classNames)==null?void 0:Hn.loader),visible:we==="loading"})}return Y.createElement("li",{tabIndex:0,ref:De,className:Qc(U,oe,se?.toast,(t=g?.classNames)==null?void 0:t.toast,se?.default,se?.[we],(n=g?.classNames)==null?void 0:n[we]),"data-sonner-toast":"","data-rich-colors":(r=g.richColors)!=null?r:k,"data-styled":!(g.jsx||g.unstyled||v),"data-mounted":W,"data-promise":!!g.promise,"data-swiped":Fe,"data-removed":ae,"data-visible":me,"data-y-position":dt,"data-x-position":$t,"data-index":E,"data-front":be,"data-swiping":Te,"data-dismissible":Le,"data-type":we,"data-invert":ct,"data-swipe-out":xe,"data-swipe-direction":X,"data-expanded":!!(N||ne&&W),style:{"--index":E,"--toasts-before":E,"--z-index":T.length-E,"--offset":`${ae?Se:Wt.current}px`,"--initial-height":ne?"auto":`${pt}px`,...R,...g.style},onDragEnd:()=>{fe(!1),q(null),Ie.current=null},onPointerDown:rn=>{Gt||!Le||(Ne.current=new Date,et(Wt.current),rn.target.setPointerCapture(rn.pointerId),rn.target.tagName!=="BUTTON"&&(fe(!0),Ie.current={x:rn.clientX,y:rn.clientY}))},onPointerUp:()=>{var rn,_n,Hn,Jr;if(xe||!Le)return;Ie.current=null;let Nr=Number(((rn=De.current)==null?void 0:rn.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ns=Number(((_n=De.current)==null?void 0:_n.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Or=new Date().getTime()-((Hn=Ne.current)==null?void 0:Hn.getTime()),br=M==="x"?Nr:Ns,fi=Math.abs(br)/Or;if(Math.abs(br)>=T6e||fi>.11){et(Wt.current),(Jr=g.onDismiss)==null||Jr.call(g,g),J(M==="x"?Nr>0?"right":"left":Ns>0?"down":"up"),Cn(),ke(!0),tt(!1);return}fe(!1),q(null)},onPointerMove:rn=>{var _n,Hn,Jr,Nr;if(!Ie.current||!Le||((_n=window.getSelection())==null?void 0:_n.toString().length)>0)return;let Ns=rn.clientY-Ie.current.y,Or=rn.clientX-Ie.current.x,br=(Hn=e.swipeDirections)!=null?Hn:k6e(Z);!M&&(Math.abs(Or)>1||Math.abs(Ns)>1)&&q(Math.abs(Or)>Math.abs(Ns)?"x":"y");let fi={x:0,y:0};M==="y"?(br.includes("top")||br.includes("bottom"))&&(br.includes("top")&&Ns<0||br.includes("bottom")&&Ns>0)&&(fi.y=Ns):M==="x"&&(br.includes("left")||br.includes("right"))&&(br.includes("left")&&Or<0||br.includes("right")&&Or>0)&&(fi.x=Or),(Math.abs(fi.x)>0||Math.abs(fi.y)>0)&&tt(!0),(Jr=De.current)==null||Jr.style.setProperty("--swipe-amount-x",`${fi.x}px`),(Nr=De.current)==null||Nr.style.setProperty("--swipe-amount-y",`${fi.y}px`)}},Ht&&!g.jsx?Y.createElement("button",{"aria-label":O,"data-disabled":Gt,"data-close-button":!0,onClick:Gt||!Le?()=>{}:()=>{var rn;Cn(),(rn=g.onDismiss)==null||rn.call(g,g)},className:Qc(se?.closeButton,(i=g?.classNames)==null?void 0:i.closeButton)},(s=H?.close)!=null?s:f6e):null,g.jsx||b.isValidElement(g.title)?g.jsx?g.jsx:typeof g.title=="function"?g.title():g.title:Y.createElement(Y.Fragment,null,we||g.icon||g.promise?Y.createElement("div",{"data-icon":"",className:Qc(se?.icon,(a=g?.classNames)==null?void 0:a.icon)},g.promise||g.type==="loading"&&!g.icon?g.icon||Zr():null,g.type!=="loading"?g.icon||H?.[we]||s6e(we):null):null,Y.createElement("div",{"data-content":"",className:Qc(se?.content,(o=g?.classNames)==null?void 0:o.content)},Y.createElement("div",{"data-title":"",className:Qc(se?.title,(c=g?.classNames)==null?void 0:c.title)},typeof g.title=="function"?g.title():g.title),g.description?Y.createElement("div",{"data-description":"",className:Qc(G,St,se?.description,(u=g?.classNames)==null?void 0:u.description)},typeof g.description=="function"?g.description():g.description):null),b.isValidElement(g.cancel)?g.cancel:g.cancel&&KT(g.cancel)?Y.createElement("button",{"data-button":!0,"data-cancel":!0,style:g.cancelButtonStyle||P,onClick:rn=>{var _n,Hn;KT(g.cancel)&&Le&&((Hn=(_n=g.cancel).onClick)==null||Hn.call(_n,rn),Cn())},className:Qc(se?.cancelButton,(d=g?.classNames)==null?void 0:d.cancelButton)},g.cancel.label):null,b.isValidElement(g.action)?g.action:g.action&&KT(g.action)?Y.createElement("button",{"data-button":!0,"data-action":!0,style:g.actionButtonStyle||V,onClick:rn=>{var _n,Hn;KT(g.action)&&((Hn=(_n=g.action).onClick)==null||Hn.call(_n,rn),!rn.defaultPrevented&&Cn())},className:Qc(se?.actionButton,(h=g?.classNames)==null?void 0:h.actionButton)},g.action.label):null))};function iY(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function j6e(e,t){let n={};return[e,t].forEach((r,i)=>{let s=i===1,a=s?"--mobile-offset":"--offset",o=s?S6e:w6e;function c(u){["top","right","bottom","left"].forEach(d=>{n[`${a}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${a}-${u}`]=o:n[`${a}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):c(o)}),n}var R6e=b.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:i=["altKey","KeyT"],expand:s,closeButton:a,className:o,offset:c,mobileOffset:u,theme:d="light",richColors:h,duration:p,style:g,visibleToasts:v=_6e,toastOptions:x,dir:_=iY(),gap:w=C6e,loadingIcon:S,icons:E,containerAriaLabel:T="Notifications",pauseWhenPageIsHidden:N}=e,[A,k]=Y.useState([]),j=Y.useMemo(()=>Array.from(new Set([r].concat(A.filter(L=>L.position).map(L=>L.position)))),[A,r]),[R,P]=Y.useState([]),[V,U]=Y.useState(!1),[G,Q]=Y.useState(!1),[Z,K]=Y.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
808k":"light"),te=Y.useRef(null),ne=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),se=Y.useRef(null),H=Y.useRef(!1),O=Y.useCallback(L=>{k(M=>{var q;return(q=M.find(X=>X.id===L.id))!=null&&q.delete||il.dismiss(L.id),M.filter(({id:X})=>X!==L.id)})},[]);return Y.useEffect(()=>il.subscribe(L=>{if(L.dismiss){k(M=>M.map(q=>q.id===L.id?{...q,delete:!0}:q));return}setTimeout(()=>{Vae.flushSync(()=>{k(M=>{let q=M.findIndex(X=>X.id===L.id);return q!==-1?[...M.slice(0,q),{...M[q],...L},...M.slice(q+1)]:[L,...M]})})})}),[]),Y.useEffect(()=>{if(d!=="system"){K(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?K("dark"):K("light")),typeof window>"u")return;let L=window.matchMedia("(prefers-color-scheme: dark)");try{L.addEventListener("change",({matches:M})=>{K(M?"dark":"light")})}catch{L.addListener(({matches:q})=>{try{K(q?"dark":"light")}catch(X){console.error(X)}})}},[d]),Y.useEffect(()=>{A.length<=1&&U(!1)},[A]),Y.useEffect(()=>{let L=M=>{var q,X;i.every(J=>M[J]||M.code===J)&&(U(!0),(q=te.current)==null||q.focus()),M.code==="Escape"&&(document.activeElement===te.current||(X=te.current)!=null&&X.contains(document.activeElement))&&U(!1)};return document.addEventListener("keydown",L),()=>document.removeEventListener("keydown",L)},[i]),Y.useEffect(()=>{if(te.current)return()=>{se.current&&(se.current.focus({preventScroll:!0}),se.current=null,H.current=!1)}},[te.current]),Y.createElement("section",{ref:t,"aria-label":`${T} ${ne}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},j.map((L,M)=>{var q;let[X,J]=L.split("-");return A.length?Y.createElement("ol",{key:L,dir:_==="auto"?iY():_,tabIndex:-1,ref:te,className:o,"data-sonner-toaster":!0,"data-theme":Z,"data-y-position":X,"data-lifted":V&&A.length>1&&!s,"data-x-position":J,style:{"--front-toast-height":`${((q=R[0])==null?void 0:q.height)||0}px`,"--width":`${E6e}px`,"--gap":`${w}px`,...g,...j6e(c,u)},onBlur:W=>{H.current&&!W.currentTarget.contains(W.relatedTarget)&&(H.current=!1,se.current&&(se.current.focus({preventScroll:!0}),se.current=null))},onFocus:W=>{W.target instanceof HTMLElement&&W.target.dataset.dismissible==="false"||H.current||(H.current=!0,se.current=W.relatedTarget)},onMouseEnter:()=>U(!0),onMouseMove:()=>U(!0),onMouseLeave:()=>{G||U(!1)},onDragEnd:()=>U(!1),onPointerDown:W=>{W.target instanceof HTMLElement&&W.target.dataset.dismissible==="false"||Q(!0)},onPointerUp:()=>Q(!1)},A.filter(W=>!W.position&&M===0||W.position===L).map((W,re)=>{var ae,ce;return Y.createElement(N6e,{key:W.id,icons:E,index:re,toast:W,defaultRichColors:h,duration:(ae=x?.duration)!=null?ae:p,className:x?.className,descriptionClassName:x?.descriptionClassName,invert:n,visibleToasts:v,closeButton:(ce=x?.closeButton)!=null?ce:a,interacting:G,position:L,style:x?.style,unstyled:x?.unstyled,classNames:x?.classNames,cancelButtonStyle:x?.cancelButtonStyle,actionButtonStyle:x?.actionButtonStyle,removeToast:O,toasts:A.filter(Te=>Te.position==W.position),heights:R.filter(Te=>Te.position==W.position),setHeights:P,expandByDefault:s,gap:w,loadingIcon:S,expanded:V,pauseWhenPageIsHidden:N,swipeDirections:e.swipeDirections})})):null}))});const I6e=qi({toast:"[&>[data-icon]]:float-left [&>[data-icon]]:mr-3 [&>[data-icon]]:mt-1 group p-4 rounded-radius toast bg-background shadow-lg border-border text-primary drop-shadow w-full",title:"group-[.toaster]:font-bold group-[.toaster]:text-sm",description:"group-[.toaster]:text-sm",actionButton:`${kd.ring} text-xs font-medium px-2 py-1 float-right rounded-radius group-[.toast]:!ml-2 group-[.toast]:mt-2 group-[.toast]:bg-primary hover:group-[.toast]:opacity-85 active:group-[.toast]:opacity-75 group-[.toast]:text-primary-fg`,cancelButton:`${kd.ring} text-xs font-medium px-2 py-1 float-right rounded-radius group-[.toast]:!ml-2 group-[.toast]:mt-2 group-[.toast]:bg-muted hover:group-[.toast]:opacity-85 active:group-[.toast]:opacity-75 group-[.toast]:text-muted-fg`,closeButton:`${kd.ring} text-xs bg-background`,error:"[&>[data-icon]]:text-danger [&_[data-title]]:text-danger [&>[data-icon]]:mt-0.5 [&>[data-button]]:!bg-danger [&>[data-cancel]]:!bg-danger/15 [&>[data-cancel]]:!text-danger",success:"[&>[data-icon]]:text-success [&_[data-title]]:text-success [&>[data-icon]]:mt-0.5 [&>[data-button]]:!bg-success [&>[data-cancel]]:!bg-success/15 [&>[data-cancel]]:!text-success",warning:"[&>[data-icon]]:text-warning [&_[data-title]]:text-warning [&>[data-icon]]:mt-0.5 [&>[data-button]]:!bg-warning [&>[data-cancel]]:!bg-warning/15 [&>[data-cancel]]:!text-warning",info:"[&>[data-icon]]:text-info [&_[data-title]]:text-info [&>[data-icon]]:mt-0.5 [&>[data-button]]:!bg-info [&>[data-cancel]]:!bg-info/15 [&>[data-cancel]]:!text-info"},"toast");function O6e({className:e,...t}){return l.jsx(R6e,{className:"toaster group",...t,toastOptions:{unstyled:!0,classNames:I6e,...t.toastOptions}})}var d7="Progress",f7=100,[P6e]=Ia(d7),[M6e,D6e]=P6e(d7),Qle=b.forwardRef((e,t)=>
808{const{__scopeProgress:n,value:r=null,max:i,getValueLabel:s=F6e,...a}=e;(i||i===0)&&!sY(i)&&console.error(L6e(`${i}`,"Progress"));const o=sY(i)?i:f7;r!==null&&!aY(r,o)&&console.error(z6e(`${r}`,"Progress"));const c=aY(r,o)?r:null,u=RN(c)?s(c,o):void 0;return l.jsx(M6e,{scope:n,value:c,max:o,children:l.jsx(nn.div,{"aria-valuemax":o,"aria-valuemin":0,"aria-valuenow":RN(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":ece(c,o),"data-value":c??void 0,"data-max":o,...a,ref:t})})});Qle.displayName=d7;var Zle="ProgressIndicator",Jle=b.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,i=D6e(Zle,n);return l.jsx(nn.div,{"data-state":ece(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})});Jle.displayName=Zle;function F6e(e,t){return`${Math.round(e/t*100)}%`}function ece(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function RN(e){return typeof e=="number"}function sY(e){return RN(e)&&!isNaN(e)&&e>0}function aY(e,t){return RN(e)&&!isNaN(e)&&e<=t&&e>=0}function L6e(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${f7}\`.`}function z6e(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be: 809 - a positive number 810 - less than the value passed to \`max\` (or ${f7} if no \`max\` prop is set) 811 - \`null\` or \`undefined\` if the progress is indeterminate. 812 813Defaulting to \`null\`.`}var $6e=Qle,B6e=Jle;const IN=qi({progress:"relative w-full overflow-hidden rounded-radius bg-border",indicator:"h-full w-full flex-1 bg-primary transition-all ease-in-out duration-300",variants:{variant:{primary:"bg-primary ",secondary:"bg-secondary ",muted:"bg-muted ",success:"bg-success ",danger:"bg-danger ",warning:"bg-warning ",info:"bg-info "},size:{xs:"h-2",sm:"h-3",md:"h-4",lg:"h-6",xl:"h-8"},outline:{primary:"bg-background border border-primary",secondary:"bg-background border border-secondary",muted:"bg-background border border-muted",success:"bg-background border border-success",danger:"bg-background border border-danger",warning:"bg-background border border-warning",info:"bg-background border border-info"}}},"progress"),oY=Zl(IN.progress,{variants:IN.variants}),U6=b.memo(function({className:t,value:n,max:r=100,variant:i="primary",size:s="md",outline:a,...o}){const c=(n||0)/r*100;return l.jsx($6e,{className:$e(IN.progress,oY({size:s,outline:a?i:null}),t),...o,children:l.jsx(B6e,{className:$e(IN.indicator,oY({variant:i})),style:{transform:`translateX(-${100-c}%)`}})})});var KO="rovingFocusGroup.onEntryFocus",U6e={bubbles:!1,cancelable:!0},oE="RovingFocusGroup",[V6,tce,V6e]=l7(oE),[H6e,Mm]=Ia(oE,[V6e]),[q6e,W6e]=H6e(oE),nce=b.forwardRef((e,t)=>l.jsx(V6.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(V6.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(G6e,{...e,ref:t})})}));nce.displayName=oE;var G6e=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:o,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...h}=e,p=b.useRef(null),g=Wn(t,p),v=ox(s),[x,_]=Yl({prop:a,defaultProp:o??null,onChange:c,caller:oE}),[w,S]=b.useState(!1),E=wa(u),T=tce(n),N=b.useRef(!1),[A,k]=b.useState(0);return b.useEffect(()=>{const j=p.current;if(j)return j.addEventListener(KO,E),()=>j.removeEventListener(KO,E)},[E]),l.jsx(q6e,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:x,onItemFocus:b.useCallback(j=>_(j),[_]),onItemShiftTab:b.useCallback(()=>S(!0),[]),onFocusableItemAdd:b.useCallback(()=>k(j=>j+1),[]),onFocusableItemRemove:b.useCallback(()=>k(j=>j-1),[]),children:l.jsx(nn.div,{tabIndex:w||A===0?-1:0,"data-orientation":r,...h,ref:g,style:{outline:"none",...e.style},onMouseDown:qt(e.onMouseDown,()=>{N.current=!0}),onFocus:qt(e.onFocus,j=>{const R=!N.current;if(j.target===j.currentTarget&&R&&!w){const P=new CustomEvent(KO,U6e);if(j.currentTarget.dispatchEvent(P),!P.defaultPrevented){const V=T().filter(K=>K.focusable),U=V.find(K=>K.active),G=V.find(K=>
vendor: 4,202 bytes, line 813
813K.id===x),Z=[U,G,...V].filter(Boolean).map(K=>K.ref.current);sce(Z,d)}}N.current=!1}),onBlur:qt(e.onBlur,()=>S(!1))})})}),rce="RovingFocusGroupItem",ice=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:s,children:a,...o}=e,c=Na(),u=s||c,d=W6e(rce,n),h=d.currentTabStopId===u,p=tce(n),{onFocusableItemAdd:g,onFocusableItemRemove:v,currentTabStopId:x}=d;return b.useEffect(()=>{if(r)return g(),()=>v()},[r,g,v]),l.jsx(V6.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:l.jsx(nn.span,{tabIndex:h?0:-1,"data-orientation":d.orientation,...o,ref:t,onMouseDown:qt(e.onMouseDown,_=>{r?d.onItemFocus(u):_.preventDefault()}),onFocus:qt(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:qt(e.onKeyDown,_=>{if(_.key==="Tab"&&_.shiftKey){d.onItemShiftTab();return}if(_.target!==_.currentTarget)return;const w=X6e(_,d.orientation,d.dir);if(w!==void 0){if(_.metaKey||_.ctrlKey||_.altKey||_.shiftKey)return;_.preventDefault();let E=p().filter(T=>T.focusable).map(T=>T.ref.current);if(w==="last")E.reverse();else if(w==="prev"||w==="next"){w==="prev"&&E.reverse();const T=E.indexOf(_.currentTarget);E=d.loop?Q6e(E,T+1):E.slice(T+1)}setTimeout(()=>sce(E))}}),children:typeof a=="function"?a({isCurrentTabStop:h,hasTabStop:x!=null}):a})})});ice.displayName=rce;var K6e={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Y6e(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function X6e(e,t,n){const r=Y6e(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return K6e[r]}function sce(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Q6e(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var e5=nce,lE=ice,H6=["Enter"," "],Z6e=["ArrowDown","PageUp","Home"],ace=["ArrowUp","PageDown","End"],J6e=[...Z6e,...ace],e8e={ltr:[...H6,"ArrowRight"],rtl:[...H6,"ArrowLeft"]},t8e={ltr:["ArrowLeft"],rtl:["ArrowRight"]},cE="Menu",[I2,n8e,r8e]=l7(cE),[cx,oce]=Ia(cE,[r8e,Im,Mm]),t5=Im(),lce=Mm(),[i8e,Ly]=cx(cE),[s8e,uE]=cx(cE),cce=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:s,modal:a=!0}=e,o=t5(t),[c,u]=b.useState(null),d=b.useRef(!1),h=wa(s),p=ox(i);return b.useEffect(()=>{const g=()=>{d.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>d.current=!1;return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),l.jsx(Vj,{...o,children:l.jsx(i8e,{scope:t,open:n,onOpenChange:h,content:c,onContentChange:u,children:l.jsx(s8e,{scope:t,onClose:b.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:d,dir:p,modal:a,children:r})})})};cce.displayName=cE;var a8e="MenuAnchor",h7=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=t5(n);return l.jsx(rE,{...i,...r,ref:t})});h7.displayName=a8e;var o8e="MenuPortal",[VDt,uce]=cx(o8e,{forceMount:void 0}),jc="MenuContent",[l8e,p7]=cx(jc),dce=b.forwardRef((e,t)=>{const n=uce(jc,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,s=Ly(jc,e.__scopeMenu),a=uE(jc,e.__scopeMenu);return l.jsx(I2.Provider,{scope:e.__scopeMenu,children:l.jsx(to,{present:r||s.open,children:l.jsx(I2.Slot,{scope:e.__scopeMenu,children:a.modal?l.jsx(c8e,{...i,ref:t}):l.jsx(u8e,{...i,ref:t})})})})}),c8e=b.forwardRef((e,t)=>{const n=Ly(jc,e.__scopeMenu),r=b.useRef(null),i=Wn(t,r);return b.useEffect(()=>{const s=r.current;if(s)return Yj(s)},[]),l.jsx(m7,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:qt(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),u8e=b.forwardRef((e,t)=>{const n=Ly(jc,e.__scopeMenu);return l.jsx(m7,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),d8e=hm("MenuContent.ScrollLock"),m7=b.forwardRef((e,t)=>
vendor: 14,724 bytes, line 813
813{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:p,onDismiss:g,disableOutsideScroll:v,...x}=e,_=Ly(jc,n),w=uE(jc,n),S=t5(n),E=lce(n),T=n8e(n),[N,A]=b.useState(null),k=b.useRef(null),j=Wn(t,k,_.onContentChange),R=b.useRef(0),P=b.useRef(""),V=b.useRef(0),U=b.useRef(null),G=b.useRef("right"),Q=b.useRef(0),Z=v?aE:b.Fragment,K=v?{as:d8e,allowPinchZoom:!0}:void 0,te=se=>{const H=P.current+se,O=T().filter(W=>!W.disabled),L=document.activeElement,M=O.find(W=>W.ref.current===L)?.textValue,q=O.map(W=>W.textValue),X=S8e(q,H,M),J=O.find(W=>W.textValue===X)?.ref.current;(function W(re){P.current=re,window.clearTimeout(R.current),re!==""&&(R.current=window.setTimeout(()=>W(""),1e3))})(H),J&&setTimeout(()=>J.focus())};b.useEffect(()=>()=>window.clearTimeout(R.current),[]),Kj();const ne=b.useCallback(se=>G.current===U.current?.side&&C8e(se,U.current?.area),[]);return l.jsx(l8e,{scope:n,searchRef:P,onItemEnter:b.useCallback(se=>{ne(se)&&se.preventDefault()},[ne]),onItemLeave:b.useCallback(se=>{ne(se)||(k.current?.focus(),A(null))},[ne]),onTriggerLeave:b.useCallback(se=>{ne(se)&&se.preventDefault()},[ne]),pointerGraceTimerRef:V,onPointerGraceIntentChange:b.useCallback(se=>{U.current=se},[]),children:l.jsx(Z,{...K,children:l.jsx(sE,{asChild:!0,trapped:i,onMountAutoFocus:qt(s,se=>{se.preventDefault(),k.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:l.jsx(Py,{asChild:!0,disableOutsidePointerEvents:o,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:p,onDismiss:g,children:l.jsx(e5,{asChild:!0,...E,dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:N,onCurrentTabStopIdChange:A,onEntryFocus:qt(c,se=>{w.isUsingKeyboardRef.current||se.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(Hj,{role:"menu","aria-orientation":"vertical","data-state":Ace(_.open),"data-radix-menu-content":"",dir:w.dir,...S,...x,ref:j,style:{outline:"none",...x.style},onKeyDown:qt(x.onKeyDown,se=>{const O=se.target.closest("[data-radix-menu-content]")===se.currentTarget,L=se.ctrlKey||se.altKey||se.metaKey,M=se.key.length===1;O&&(se.key==="Tab"&&se.preventDefault(),!L&&M&&te(se.key));const q=k.current;if(se.target!==q||!J6e.includes(se.key))return;se.preventDefault();const J=T().filter(W=>!W.disabled).map(W=>W.ref.current);ace.includes(se.key)&&J.reverse(),_8e(J)}),onBlur:qt(e.onBlur,se=>{se.currentTarget.contains(se.target)||(window.clearTimeout(R.current),P.current="")}),onPointerMove:qt(e.onPointerMove,O2(se=>{const H=se.target,O=Q.current!==se.clientX;if(se.currentTarget.contains(H)&&O){const L=se.clientX>Q.current?"right":"left";G.current=L,Q.current=se.clientX}}))})})})})})})});dce.displayName=jc;var f8e="MenuGroup",g7=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(nn.div,{role:"group",...r,ref:t})});g7.displayName=f8e;var h8e="MenuLabel",fce=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(nn.div,{...r,ref:t})});fce.displayName=h8e;var ON="MenuItem",lY="menu.itemSelect",n5=b.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,s=b.useRef(null),a=uE(ON,e.__scopeMenu),o=p7(ON,e.__scopeMenu),c=Wn(t,s),u=b.useRef(!1),d=()=>{const h=s.current;if(!n&&h){const p=new CustomEvent(lY,{bubbles:!0,cancelable:!0});h.addEventListener(lY,g=>r?.(g),{once:!0}),Yae(h,p),p.defaultPrevented?u.current=!1:a.onClose()}};return l.jsx(hce,{...i,ref:c,disabled:n,onClick:qt(e.onClick,d),onPointerDown:h=>{e.onPointerDown?.(h),u.current=!0},onPointerUp:qt(e.onPointerUp,h=>{u.current||h.currentTarget?.click()}),onKeyDown:qt(e.onKeyDown,h=>{const p=o.searchRef.current!=="";n||p&&h.key===" "||H6.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})});n5.displayName=ON;var hce=b.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...s}=e,a=p7(ON,n),o=lce(n),c=b.useRef(null),u=Wn(t,c),[d,h]=b.useState(!1),[p,g]=b.useState("");return b.useEffect(()=>{const v=c.current;v&&g((v.textContent??"").trim())},[s.children]),l.jsx(I2.ItemSlot,{scope:n,disabled:r,textValue:i??p,children:l.jsx(lE,{asChild:!0,...o,focusable:!r,children:l.jsx(nn.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:u,onPointerMove:qt(e.onPointerMove,O2(v=>{r?a.onItemLeave(v):(a.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:qt(e.onPointerLeave,O2(v=>a.onItemLeave(v))),onFocus:qt(e.onFocus,()=>h(!0)),onBlur:qt(e.onBlur,()=>h(!1))})})})}),p8e="MenuCheckboxItem",pce=b.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return l.jsx(yce,{scope:e.__scopeMenu,checked:n,children:l.jsx(n5,{role:"menuitemcheckbox","aria-checked":PN(n)?"mixed":n,...i,ref:t,"data-state":v7(n),onSelect:qt(i.onSelect,()=>r?.(PN(n)?!0:!n),{checkForDefaultPrevented:!1})})})});pce.displayName=p8e;var mce="MenuRadioGroup",[m8e,g8e]=cx(mce,{value:void 0,onValueChange:()=>{}}),gce=b.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,s=wa(r);return l.jsx(m8e,{scope:e.__scopeMenu,value:n,onValueChange:s,children:l.jsx(g7,{...i,ref:t})})});gce.displayName=mce;var xce="MenuRadioItem",vce=b.forwardRef((e,t)=>{const{value:n,...r}=e,i=g8e(xce,e.__scopeMenu),s=n===i.value;return l.jsx(yce,{scope:e.__scopeMenu,checked:s,children:l.jsx(n5,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":v7(s),onSelect:qt(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});vce.displayName=xce;var x7="MenuItemIndicator",[yce,x8e]=cx(x7,{checked:!1}),bce=b.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,s=x8e(x7,n);return l.jsx(to,{present:r||PN(s.checked)||s.checked===!0,children:l.jsx(nn.span,{...i,ref:t,"data-state":v7(s.checked)})})});bce.displayName=x7;var v8e="MenuSeparator",_ce=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(nn.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});_ce.displayName=v8e;var y8e="MenuArrow",wce=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=t5(n);return l.jsx(qj,{...i,...r,ref:t})});wce.displayName=y8e;var b8e="MenuSub",[HDt,Sce]=cx(b8e),cw="MenuSubTrigger",Ece=b.forwardRef((e,t)=>{const n=Ly(cw,e.__scopeMenu),r=uE(cw,e.__scopeMenu),i=Sce(cw,e.__scopeMenu),s=p7(cw,e.__scopeMenu),a=b.useRef(null),{pointerGraceTimerRef:o,onPointerGraceIntentChange:c}=s,u={__scopeMenu:e.__scopeMenu},d=b.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return b.useEffect(()=>d,[d]),b.useEffect(()=>{const h=o.current;return()=>{window.clearTimeout(h),c(null)}},[o,c]),l.jsx(h7,{asChild:!0,...u,children:l.jsx(hce,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":Ace(n.open),...e,ref:gh(t,i.onTriggerChange),onClick:h=>{e.onClick?.(h),!(e.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:qt(e.onPointerMove,O2(h=>{s.onItemEnter(h),!h.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:qt(e.onPointerLeave,O2(h=>{d();const p=n.content?.getBoundingClientRect();if(p){const g=n.content?.dataset.side,v=g==="right",x=v?-5:5,_=p[v?"left":"right"],w=p[v?"right":"left"];s.onPointerGraceIntentChange({area:[{x:h.clientX+x,y:h.clientY},{x:_,y:p.top},{x:w,y:p.top},{x:w,y:p.bottom},{x:_,y:p.bottom}],side:g}),window.clearTimeout(o.current),o.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(h),h.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:qt(e.onKeyDown,h=>{const p=s.searchRef.current!=="";e.disabled||p&&h.key===" "||e8e[r.dir].includes(h.key)&&(n.onOpenChange(!0),n.content?.focus(),h.preventDefault())})})})});Ece.displayName=cw;var Cce="MenuSubContent",Tce=b.forwardRef((e,t)=>{const n=uce(jc,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,s=Ly(jc,e.__scopeMenu),a=uE(jc,e.__scopeMenu),o=Sce(Cce,e.__scopeMenu),c=b.useRef(null),u=Wn(t,c);return l.jsx(I2.Provider,{scope:e.__scopeMenu,children:l.jsx(to,{present:r||s.open,children:l.jsx(I2.Slot,{scope:e.__scopeMenu,children:l.jsx(m7,{id:o.contentId,"aria-labelledby":o.triggerId,...i,ref:u,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{a.isUsingKeyboardRef.current&&c.current?.focus(),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:qt(e.onFocusOutside,d=>{d.target!==o.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:qt(e.onEscapeKeyDown,d=>{a.onClose(),d.preventDefault()}),onKeyDown:qt(e.onKeyDown,d=>{const h=d.currentTarget.contains(d.target),p=t8e[a.dir].includes(d.key);h&&p&&(s.onOpenChange(!1),o.trigger?.focus(),d.preventDefault())})})})})})});Tce.displayName=Cce;function Ace(e){return e?"open":"closed"}function PN(e){return e==="indeterminate"}function v7(e){return PN(e)?"indeterminate":e?"checked":"unchecked"}function _8e(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function w8e(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function S8e(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=w8e(e,Math.max(s,0));i.length===1&&(a=a.filter(u=>u!==n));const c=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return c!==n?c:void 0}function E8e(e,t){const{x:n,y:r}=e;let i=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const o=t[s],c=t[a],u=o.x,d=o.y,h=c.x,p=c.y;d>r!=p>r&&n<(h-u)*(r-d)/(p-d)+u&&(i=!i)}return i}function C8e(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return E8e(n,t)}function O2(e){return t=>t.pointerType==="mouse"?e(t):void 0}var T8e=cce,A8e=h7,k8e=dce,N8e=g7,j8e=fce,R8e=n5,I8e=pce,O8e=gce,P8e=vce,M8e=bce,D8e=_ce,F8e=wce,L8e=Ece,z8e=Tce,r5="DropdownMenu",[$8e]=Ia(r5,[oce]),yl=oce(),[B8e,kce]=$8e(r5),Nce=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:s,onOpenChange:a,modal:o=!0}=e,c=yl(t),u=b.useRef(null),[d,h]=Yl({prop:i,defaultProp:s??!1,onChange:a,caller:r5});return l.jsx(B8e,{scope:t,triggerId:Na(),triggerRef:u,contentId:Na(),open:d,onOpenChange:h,onOpenToggle:b.useCallback(()=>h(p=>!p),[h]),modal:o,children:l.jsx(T8e,{...c,open:d,onOpenChange:h,dir:r,modal:o,children:n})})};Nce.displayName=r5;var jce="DropdownMenuTrigger",Rce=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,s=kce(jce,n),a=yl(n);return l.jsx(A8e,{asChild:!0,...a,children:l.jsx(nn.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:gh(t,s.triggerRef),onPointerDown:qt(e.onPointerDown,o=>{!r&&o.button===0&&o.ctrlKey===!1&&(s.onOpenToggle(),s.open||o.preventDefault())}),onKeyDown:qt(e.onKeyDown,o=>{r||(["Enter"," "].includes(o.key)&&s.onOpenToggle(),o.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(o.key)&&o.preventDefault())})})})});Rce.displayName=jce;var Ice="DropdownMenuContent",Oce=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=kce(Ice,n),s=yl(n),a=b.useRef(!1);return l.jsx(k8e,{id:i.contentId,"aria-labelledby":i.triggerId,...s,...r,ref:t,onCloseAutoFocus:qt(e.onCloseAutoFocus,o=>{a.current||i.triggerRef.current?.focus(),a.current=!1,o.preventDefault()}),onInteractOutside:qt(e.onInteractOutside,o=>{const c=o.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;(!i.modal||d)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Oce.displayName=Ice;var U8e="DropdownMenuGroup",Pce=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=yl(n);return l.jsx(N8e,{...i,...r,ref:t})});Pce.displayName=U8e;var V8e="DropdownMenuLabel",Mce=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=yl(n);return l.jsx(j8e,{...i,...r,ref:t})});Mce.displayName=V8e;var H8e="DropdownMenuItem",Dce=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=yl(n);return l.jsx(R8e,{...i,...r,ref:t})});Dce.displayName=H8e;var q8e="DropdownMenuCheckboxItem",W8e=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=yl(n);return l.jsx(I8e,{...i,...r,ref:t})});W8e.displayName=q8e;var G8e="DropdownMenuRadioGroup",K8e=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=yl(n);return l.jsx(O8e,{...i,...r,ref:t})});K8e.displayName=G8e;var Y8e="DropdownMenuRadioItem",X8e=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=yl(n);return l.jsx(P8e,{...i,...r,ref:t})});X8e.displayName=Y8e;var Q8e="DropdownMenuItemIndicator",Z8e=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=yl(n);return l.jsx(M8e,{...i,...r,ref:t})});Z8e.displayName=Q8e;var J8e="DropdownMenuSeparator",Fce=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=yl(n);return l.jsx(D8e,{...i,...r,ref:t})});Fce.displayName=J8e;var eFe="DropdownMenuArrow",tFe=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=yl(n);return l.jsx(F8e,{...i,...r,ref:t})});tFe.displayName=eFe;var nFe="DropdownMenuSubTrigger",rFe=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=yl(n);return l.jsx(L8e,{...i,...r,ref:t})});rFe.displayName=nFe;var iFe="DropdownMenuSubContent",sFe=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=yl(n);return l.jsx(z8e,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});sFe.displayName=iFe;var Ou=Nce,Pu=Rce,aFe=Oce,MN=Pce,oFe=Mce,lFe=Dce,cFe=Fce;const i5=qi({content:"z-50 min-w-[8rem] overflow-hidden rounded-radius border border-popover-border bg-popover p-1 text-popover-fg shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
813de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",checkbox:{item:"relative flex cursor-pointer select-none items-center rounded-radius py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",indicator:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",icon:"h-4 w-4"},radio:{item:"relative flex cursor-pointer select-none items-center rounded-radius py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",indicator:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",icon:"h-2 w-2 fill-current"},item:"relative flex cursor-pointer select-none items-center rounded-radius px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",label:"px-2 py-1.5 text-sm font-semibold",separator:"-mx-1 my-1 h-px bg-separator",subContent:"z-50 min-w-[8rem] overflow-hidden rounded-radius border border-popover-border bg-popover p-1 text-popover-fg shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",subTrigger:{trigger:"flex cursor-pointer select-none items-center rounded-radius px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",icon:"ml-auto h-4 w-4"}},"dropdown"),Er=b.forwardRef(({className:e,...t},n)=>l.jsx(lFe,{ref:n,className:$e(i5.item,e),...t})),ny=b.forwardRef(({className:e,...t},n)=>l.jsx(oFe,{ref:n,className:$e(i5.label,e),...t})),bh=b.forwardRef(({className:e,...t},n)=>l.jsx(cFe,{ref:n,className:$e(i5.separator,e),...t})),Mu=b.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(aFe,{ref:r,sideOffset:t,className:$e(i5.content,e),...n}));var s5="Popover",[Lce]=Ia(s5,[Im]),dE=Im(),[uFe,Dm]=Lce(s5),zce=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:s,modal:a=!1}=e,o=dE(t),c=b.useRef(null),[u,d]=b.useState(!1),[h,p]=Yl({prop:r,defaultProp:i??!1,onChange:s,caller:s5});return l.jsx(Vj,{...o,children:l.jsx(uFe,{scope:t,contentId:Na(),triggerRef:c,open:h,onOpenChange:p,onOpenToggle:b.useCallback(()=>p(g=>!g),[p]),hasCustomAnchor:u,onCustomAnchorAdd:b.useCallback(()=>d(!0),[]),onCustomAnchorRemove:b.useCallback(()=>d(!1),[]),modal:a,children:n})})};zce.displayName=s5;var $ce="PopoverAnchor",Bce=b.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Dm($ce,n),s=dE(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:o}=i;return b.useEffect(()=>(a(),()=>o()),[a,o]),l.jsx(rE,{...s,...r,ref:t})});Bce.displayName=$ce;var Uce="PopoverTrigger",a5=b.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Dm(Uce,n),s=dE(n),a=Wn(t,i.triggerRef),o=l.jsx(nn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Gce(i.open
vendor: 4,183 bytes, line 813
813),...r,ref:a,onClick:qt(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?o:l.jsx(rE,{asChild:!0,...s,children:o})});a5.displayName=Uce;var y7="PopoverPortal",[dFe,fFe]=Lce(y7,{forceMount:void 0}),Vce=e=>{const{__scopePopover:t,forceMount:n,children:r,container:i}=e,s=Dm(y7,t);return l.jsx(dFe,{scope:t,forceMount:n,children:l.jsx(to,{present:n||s.open,children:l.jsx(QS,{asChild:!0,container:i,children:r})})})};Vce.displayName=y7;var ry="PopoverContent",o5=b.forwardRef((e,t)=>{const n=fFe(ry,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,s=Dm(ry,e.__scopePopover);return l.jsx(to,{present:r||s.open,children:s.modal?l.jsx(pFe,{...i,ref:t}):l.jsx(mFe,{...i,ref:t})})});o5.displayName=ry;var hFe=hm("PopoverContent.RemoveScroll"),pFe=b.forwardRef((e,t)=>{const n=Dm(ry,e.__scopePopover),r=b.useRef(null),i=Wn(t,r),s=b.useRef(!1);return b.useEffect(()=>{const a=r.current;if(a)return Yj(a)},[]),l.jsx(aE,{as:hFe,allowPinchZoom:!0,children:l.jsx(Hce,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:qt(e.onCloseAutoFocus,a=>{a.preventDefault(),s.current||n.triggerRef.current?.focus()}),onPointerDownOutside:qt(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,c=o.button===0&&o.ctrlKey===!0,u=o.button===2||c;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:qt(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),mFe=b.forwardRef((e,t)=>{const n=Dm(ry,e.__scopePopover),r=b.useRef(!1),i=b.useRef(!1);return l.jsx(Hce,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),Hce=b.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:o,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:d,...h}=e,p=Dm(ry,n),g=dE(n);return Kj(),l.jsx(sE,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:s,children:l.jsx(Py,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:d,onEscapeKeyDown:o,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:l.jsx(Hj,{"data-state":Gce(p.open),role:"dialog",id:p.contentId,...g,...h,ref:t,style:{...h.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)"}})})})}),qce="PopoverClose",gFe=b.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Dm(qce,n);return l.jsx(nn.button,{type:"button",...r,ref:t,onClick:qt(e.onClick,()=>i.onOpenChange(!1))})});gFe.displayName=qce;var xFe="PopoverArrow",Wce=b.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=dE(n);return l.jsx(qj,{...i,...r,ref:t})});Wce.displayName=xFe;function Gce(e){return e?"open":"closed"}var iy=zce,vFe=Bce,q6=a5,b7=Vce,Kce=o5,_7=Wce;const yFe=qi({content:"z-50 w-auto min-w-[var(--radix-popper-anchor-width)] rounded-radius border border-popover-border bg-popover p-4 text-popover-fg shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2"},"popover"),W6=b.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},i)=>l.jsx(Kce,{ref:i,align:t,sideOffset:n,className:$e(yFe.content,e),...r}));var bFe="Separator",cY="horizontal",_Fe=["horizontal","vertical"],Yce=b.forwardRef((e,t)=>
vendor: 22,526 bytes, lines 813-817
813{const{decorative:n,orientation:r=cY,...i}=e,s=wFe(r)?r:cY,o=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return l.jsx(nn.div,{"data-orientation":s,...o,...i,ref:t})});Yce.displayName=bFe;function wFe(e){return _Fe.includes(e)}var Xce=Yce;const YO=qi({separator:"shrink-0 bg-separator",variants:{sizeHorizontal:{xs:"h-[0.5px]",sm:"h-[1px]",md:"h-[2px]",lg:"h-[3px]",xl:"h-[4px]","2xl":"h-[5px]","3xl":"h-[6px]","4xl":"h-[7px]","5xl":"h-[8px]","6xl":"h-[9px]","7xl":"h-[10px]","8xl":"h-[11px]","9xl":"h-[12px]"},sizeVertical:{xs:"w-[0.5px]",sm:"w-[1px]",md:"w-[2px]",lg:"w-[3px]",xl:"w-[4px]","2xl":"w-[5px]","3xl":"w-[6px]","4xl":"w-[7px]","5xl":"w-[8px]","6xl":"w-[9px]","7xl":"w-[10px]","8xl":"w-[11px]","9xl":"w-[12px]"}}},"separator"),_h=b.memo(function({className:t,orientation:n="horizontal",decorative:r=!0,size:i="sm",...s}){return l.jsx(Xce,{decorative:r,orientation:n,className:$e(YO.separator,n==="horizontal"?`${YO.variants.sizeHorizontal[i]} w-full`:`${YO.variants.sizeVertical[i]} h-full`,t),...s})});var l5="Checkbox",[SFe]=Ia(l5),[EFe,w7]=SFe(l5);function CFe(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:s,form:a,name:o,onCheckedChange:c,required:u,value:d="on",internal_do_not_use_render:h}=e,[p,g]=Yl({prop:n,defaultProp:i??!1,onChange:c,caller:l5}),[v,x]=b.useState(null),[_,w]=b.useState(null),S=b.useRef(!1),E=v?!!a||!!v.closest("form"):!0,T={checked:p,disabled:s,setChecked:g,control:v,setControl:x,name:o,form:a,value:d,hasConsumerStoppedPropagationRef:S,required:u,defaultChecked:om(i)?!1:i,isFormControl:E,bubbleInput:_,setBubbleInput:w};return l.jsx(EFe,{scope:t,...T,children:TFe(h)?h(T):r})}var Qce="CheckboxTrigger",Zce=b.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{const{control:s,value:a,disabled:o,checked:c,required:u,setControl:d,setChecked:h,hasConsumerStoppedPropagationRef:p,isFormControl:g,bubbleInput:v}=w7(Qce,e),x=Wn(i,d),_=b.useRef(c);return b.useEffect(()=>{const w=s?.form;if(w){const S=()=>h(_.current);return w.addEventListener("reset",S),()=>w.removeEventListener("reset",S)}},[s,h]),l.jsx(nn.button,{type:"button",role:"checkbox","aria-checked":om(c)?"mixed":c,"aria-required":u,"data-state":iue(c),"data-disabled":o?"":void 0,disabled:o,value:a,...r,ref:x,onKeyDown:qt(t,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:qt(n,w=>{h(S=>om(S)?!0:!S),v&&g&&(p.current=w.isPropagationStopped(),p.current||w.stopPropagation())})})});Zce.displayName=Qce;var Jce=b.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:s,required:a,disabled:o,value:c,onCheckedChange:u,form:d,...h}=e;return l.jsx(CFe,{__scopeCheckbox:n,checked:i,defaultChecked:s,disabled:o,required:a,onCheckedChange:u,name:r,form:d,value:c,internal_do_not_use_render:({isFormControl:p})=>l.jsxs(l.Fragment,{children:[l.jsx(Zce,{...h,ref:t,__scopeCheckbox:n}),p&&l.jsx(rue,{__scopeCheckbox:n})]})})});Jce.displayName=l5;var eue="CheckboxIndicator",tue=b.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,s=w7(eue,n);return l.jsx(to,{present:r||om(s.checked)||s.checked===!0,children:l.jsx(nn.span,{"data-state":iue(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});tue.displayName=eue;var nue="CheckboxBubbleInput",rue=b.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:i,checked:s,defaultChecked:a,required:o,disabled:c,name:u,value:d,form:h,bubbleInput:p,setBubbleInput:g}=w7(nue,e),v=Wn(n,g),x=c7(s),_=Z9(r);b.useEffect(()=>{const S=p;if(!S)return;const E=window.HTMLInputElement.prototype,N=Object.getOwnPropertyDescriptor(E,"checked").set,A=!i.current;if(x!==s&&N){const k=new Event("click",{bubbles:A});S.indeterminate=om(s),N.call(S,om(s)?!1:s),S.dispatchEvent(k)}},[p,x,s,i]);const w=b.useRef(om(s)?!1:s);return l.jsx(nn.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??w.current,required:o,disabled:c,name:u,value:d,form:h,...t,tabIndex:-1,ref:v,style:{...t.style,..._,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});rue.displayName=nue;function TFe(e){return typeof e=="function"}function om(e){return e==="indeterminate"}function iue(e){return om(e)?"indeterminate":e?"checked":"unchecked"}const Iw=qi({checkbox:`${kd.ring} peer transition-all shrink-0 rounded-radius border border-input-border focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 hover:bg-input-border/25`,indicator:"flex items-center justify-center text-current",icon:"",iconSize:{xs:"h-2.5 w-2.5",sm:"h-3 w-3",md:"h-3.5 w-3.5",lg:"h-4 w-4",xl:"h-5 w-5"},variants:{variant:{primary:"hover:data-[state=checked]:bg-primary/80 active:data-[state=checked]:bg-primary/90 data-[state=checked]:bg-primary data-[state=checked]:text-primary-fg data-[state=checked]:border-primary ring-primary",secondary:"hover:data-[state=checked]:bg-secondary/80 active:data-[state=checked]:bg-secondary/90 data-[state=checked]:bg-secondary data-[state=checked]:text-secondary-fg data-[state=checked]:border-secondary ring-secondary",muted:"hover:data-[state=checked]:bg-muted/80 active:data-[state=checked]:bg-muted/90 data-[state=checked]:bg-muted data-[state=checked]:text-muted-fg data-[state=checked]border:text-muted ring-muted",success:"hover:data-[state=checked]:bg-success/80 active:data-[state=checked]:bg-success/90 data-[state=checked]:bg-success data-[state=checked]:text-success-fg data-[state=checked]:border-success ring-success",danger:"hover:data-[state=checked]:bg-danger/80 active:data-[state=checked]:bg-danger/90 data-[state=checked]:bg-danger data-[state=checked]:text-danger-fg data-[state=checked]:border-danger ring-danger",warning:"hover:data-[state=checked]:bg-warning/80 active:data-[state=checked]:bg-warning/90 data-[state=checked]:bg-warning data-[state=checked]:text-warning-fg data-[state=checked]:border-warning ring-warning",info:"hover:data-[state=checked]:bg-info/80 active:data-[state=checked]:bg-info/90 data-[state=checked]:bg-info data-[state=checked]:text-info-fg data-[state=border]:text-info ring-info"},size:{xs:"h-3 w-3",sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5",xl:"h-6 w-6"}}},"checkbox"),AFe=Zl(Iw.checkbox,{variants:Iw.variants}),N0=b.forwardRef(({className:e,variant:t="primary",size:n="md",...r},i)=>l.jsx(Jce,{ref:i,className:$e(AFe({variant:t,size:n}),e),type:"button",...r,children:l.jsx(tue,{className:$e(Iw.indicator),children:l.jsx(Es,{className:$e(Iw.icon,n&&Iw.iconSize[n]),strokeWidth:3})})}));var uY=1,kFe=.9,NFe=.8,jFe=.17,XO=.1,QO=.999,RFe=.9999,IFe=.99,OFe=/[\\\/_+.#"@\[\(\{&]/,PFe=/[\\\/_+.#"@\[\(\{&]/g,MFe=/[\s-]/,sue=/[\s-]/g;function G6(e,t,n,r,i,s,a){if(s===t.length)return i===e.length?uY:IFe;var o=`${i},${s}`;if(a[o]!==void 0)return a[o];for(var c=r.charAt(s),u=n.indexOf(c,i),d=0,h,p,g,v;u>=0;)h=G6(e,t,n,r,u+1,s+1,a),h>d&&(u===i?h*=uY:OFe.test(e.charAt(u-1))?(h*=NFe,g=e.slice(i,u-1).match(PFe),g&&i>0&&(h*=Math.pow(QO,g.length))):MFe.test(e.charAt(u-1))?(h*=kFe,v=e.slice(i,u-1).match(sue),v&&i>0&&(h*=Math.pow(QO,v.length))):(h*=jFe,i>0&&(h*=Math.pow(QO,u-i))),e.charAt(u)!==t.charAt(s)&&(h*=RFe)),(h<XO&&n.charAt(u-1)===r.charAt(s+1)||r.charAt(s+1)===r.charAt(s)&&n.charAt(u-1)!==r.charAt(s))&&(p=G6(e,t,n,r,u+1,s+2,a),p*XO>h&&(h=p*XO)),h>d&&(d=h),u=n.indexOf(c,u+1);return a[o]=d,d}function dY(e){return e.toLowerCase().replace(sue," ")}function DFe(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,G6(e,t,dY(e),dY(t),0,0,{})}var c5="Dialog",[aue,oue]=Ia(c5),[FFe,Hu]=aue(c5),lue=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:s,modal:a=!0}=e,o=b.useRef(null),c=b.useRef(null),[u,d]=Yl({prop:r,defaultProp:i??!1,onChange:s,caller:c5});return l.jsx(FFe,{scope:t,triggerRef:o,contentRef:c,contentId:Na(),titleId:Na(),descriptionId:Na(),open:u,onOpenChange:d,onOpenToggle:b.useCallback(()=>d(h=>!h),[d]),modal:a,children:n})};lue.displayName=c5;var cue="DialogTrigger",uue=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Hu(cue,n),s=Wn(t,i.triggerRef);return l.jsx(nn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":C7(i.open),...r,ref:s,onClick:qt(e.onClick,i.onOpenToggle)})});uue.displayName=cue;var S7="DialogPortal",[LFe,due]=aue(S7,{forceMount:void 0}),fue=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,s=Hu(S7,t);return l.jsx(LFe,{scope:t,forceMount:n,children:b.Children.map(r,a=>l.jsx(to,{present:n||s.open,children:l.jsx(QS,{asChild:!0,container:i,children:a})}))})};fue.displayName=S7;var DN="DialogOverlay",hue=b.forwardRef((e,t)=>{const n=due(DN,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,s=Hu(DN,e.__scopeDialog);return s.modal?l.jsx(to,{present:r||s.open,children:l.jsx($Fe,{...i,ref:t})}):null});hue.displayName=DN;var zFe=hm("DialogOverlay.RemoveScroll"),$Fe=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Hu(DN,n);return l.jsx(aE,{as:zFe,allowPinchZoom:!0,shards:[i.contentRef],children:l.jsx(nn.div,{"data-state":C7(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),j0="DialogContent",pue=b.forwardRef((e,t)=>{const n=due(j0,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,s=Hu(j0,e.__scopeDialog);return l.jsx(to,{present:r||s.open,children:s.modal?l.jsx(BFe,{...i,ref:t}):l.jsx(UFe,{...i,ref:t})})});pue.displayName=j0;var BFe=b.forwardRef((e,t)=>{const n=Hu(j0,e.__scopeDialog),r=b.useRef(null),i=Wn(t,n.contentRef,r);return b.useEffect(()=>{const s=r.current;if(s)return Yj(s)},[]),l.jsx(mue,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:qt(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:qt(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,o=a.button===0&&a.ctrlKey===!0;(a.button===2||o)&&s.preventDefault()}),onFocusOutside:qt(e.onFocusOutside,s=>s.preventDefault())})}),UFe=b.forwardRef((e,t)=>{const n=Hu(j0,e.__scopeDialog),r=b.useRef(!1),i=b.useRef(!1);return l.jsx(mue,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),mue=b.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,...a}=e,o=Hu(j0,n),c=b.useRef(null),u=Wn(t,c);return Kj(),l.jsxs(l.Fragment,{children:[l.jsx(sE,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:s,children:l.jsx(Py,{role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":C7(o.open),...a,ref:u,onDismiss:()=>o.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(HFe,{titleId:o.titleId}),l.jsx(WFe,{contentRef:c,descriptionId:o.descriptionId})]})]})}),E7="DialogTitle",gue=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Hu(E7,n);return l.jsx(nn.h2,{id:i.titleId,...r,ref:t})});gue.displayName=E7;var xue="DialogDescription",vue=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Hu(xue,n);return l.jsx(nn.p,{id:i.descriptionId,...r,ref:t})});vue.displayName=xue;var yue="DialogClose",bue=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Hu(yue,n);return l.jsx(nn.button,{type:"button",...r,ref:t,onClick:qt(e.onClick,()=>i.onOpenChange(!1))})});bue.displayName=yue;function C7(e){return e?"open":"closed"}var _ue="DialogTitleWarning",[VFe,wue]=SOe(_ue,{contentName:j0,titleName:E7,docsSlug:"dialog"}),HFe=({titleId:e})=>{const t=wue(_ue),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 814 815If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 816 817For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return b.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},qFe="DialogDescriptionWarning",WFe=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${wue(qFe).contentName}}.`;return b.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},ui=lue,u5=uue,d5=fue,f5=hue,h5=pue,T7=gue,Sue=vue,Fm=bue,__='[cmdk-group=""]',ZO='[cmdk-group-items=""]',GFe='[cmdk-group-heading=""]',Eue='[cmdk-item=""]',fY=`${Eue}:not([aria-disabled="true"])`,K6="cmdk-item-select",qv="data-value",KFe=(e,t,n)=>DFe(e,t,n),Cue=b.createContext(void 0),fE=()=>b.useContext(Cue),Tue=b.createContext(void 0),A7=()=>b.useContext(Tue),Aue=b.createContext(void 0),kue=b.forwardRef((e,t)=>{let n=Wv(()=>{var L,M;return{search:"",value:(M=(L=e.value)!=null?L:e.defaultValue)!=null?M:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=Wv(()=>new Set),i=Wv(()=>new Map),s=Wv(()=>new Map),a=Wv(()=>new Set),o=Nue(e),{label:c,children:u,value:d,onValueChange:h,filter:p,shouldFilter:g,loop:v,disablePointerSelection:x=!1,vimBindings:_=!0,...w}=e,S=Na(),E=Na(),T=Na(),N=b.useRef(null),A=sLe();R0(()=>{if(d!==void 0){let L=d.trim();n.current.value=L,k.emit()}},[d]),R0(()=>{A(6,G)},[]);let k=b.useMemo(()=>({subscribe:L=>(a.current.add(L),()=>a.current.delete(L)),snapshot:()=>n.current,setState:(L,M,q)=>{var X,J,W,re;if(!Object.is(n.current[L],M)){if(n.current[L]=M,L==="search")U(),P(),A(1,V);else if(L==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ae=document.getElementById(T);ae?ae.focus():(X=document.getElementById(S))==null||X.focus()}if(A(7,()=>{var ae;n.current.selectedItemId=(ae=Q())==null?void 0:ae.id,k.emit()}),q||A(5,G),((J=o.current)==null?void 0:J.value)!==void 0){let ae=M??"";(re=(W=o.current).onValueChange)==null||re.call(W,ae);return}}k.emit()}},emit:()=>{a.current.forEach(L=>L())}}),[]),j=b.useMemo(()=>({value:(L,M,q)=>{var X;M!==((X=s.current.get(L))==null?void 0:X.value)&&(s.current.set(L,{value:M,keywords:q}),n.current.filtered.items.set(L,R(M,q)),A(2,()=>{P(),k.emit()}))},item:(L,M)=>(r.current.add(L),M&&(i.current.has(M)?i.current.get(M).add(L):i.current.set(M,new Set([L]))),A(3,()=>{U(),P(),n.current.value||V(),k.emit()}),()=>{s.current.delete(L),r.current.delete(L),n.current.filtered.items.delete(L);let q=Q();A(4,()=>{U(),q?.getAttribute("id")===L&&V(),k.emit()})}),group:L=>(i.current.has(L)||i.current.set(L,new Set),()=>{s.current.delete(L),i.current.delete(L)}),filter:()=>o.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>o.current.disablePointerSelection,listId:S,inputId:T,labelId:E,listInnerRef:N}),[]);function R(L,M){var q,X;let J=(X=(q=o.current)==null?void 0:q.filter)!=null?X:KFe;return L?J(L,n.current.search,M):0}function P(){if(!n.current.search||o.current.shouldFilter===!1)return;let L=n.current.filtered.items,M=[];n.current.filtered.groups.forEach(X=>{let J=i.current.get(X),W=0;J.forEach(re=>{let ae=L.get(re);W=Math.max(ae,W)}),M.push([X,W])});let q=N.current;Z().sort((X,J)=>{var W,re;let ae=X.getAttribute("id"),ce=J.getAttribute("id");return((W=L.get(ce))!=null?W:0)-((re=L.get(ae))!=null?re:0)}).forEach(X=>{let J=X.closest(ZO);J?J.appendChild(X.parentElement===J?X:X.closest(`${ZO} > *`)):q.appendChild(X.parentElement===q?X:X.closest(`${ZO} > *`))}),M.sort((X,J)=>J[1]-X[1]).forEach(X=>{var J;let W=(J=N.current)==null?void 0:J.querySelector(`${__}[${qv}="${encodeURIComponent(X[0])}"]`);W?.parentElement.appendChild(W)})}function V(){let L=Z().find(q=>q.getAttribute("aria-disabled")!=="true"),M=L?.getAttribute(qv);k.setState("value",M||void 0)}function U(){var L,M,q,X;if(!n.current.search||o.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let J=0;for(let W of r.current){let re=(M=(L=s.current.get(W))==null?void 0:L.value)!=null?M:"",ae=(X=(q=s.current.get(W))==null?void 0:q.keywords)!=null?X:[],ce=R(re,ae);n.current.filtered.items.set(W,ce),ce>0&&J++}for(let[W,re]of i.current)for(let ae of re)if(n.current.filtered.items.get(ae)>0){n.current.filtered.groups.add(W);break}n.current.filtered.count=J}function G(){var L,M,q;let X=Q();X&&(((L=X.parentElement)==null?void 0:L.firstChild)===X&&((q=(M=X.closest(__))==null?void 0:M.querySelector(GFe))==null||q.scrollIntoView({block:"nearest"})),X.scrollIntoView({block:"nearest"}))}function Q(){var L;return(L=N.current)==null?void 0:L.querySelector(`${Eue}[aria-selected="true"]`)}function Z(){var L;return Array.from(((L=N.current)==null?void 0:L.querySelectorAll(fY))||[])}function K(L){let M=Z()[L];M&&k.setState("value",M.getAttribute(qv))}function te(L){var M;let q=Q(),X=Z(),J=X.findIndex(re=>re===q),W=X[J+L];(M=o.current)!=null&&M.loop&&(W=J+L<0?X[X.length-1]:J+L===X.length?X[0]:X[J+L]),W&&k.setState("value",W.getAttribute(qv))}function ne(L){let M=Q(),q=M?.closest(__),X;for(;q&&!X;)q=L>0?rLe(q,__):iLe(q,__),X=q?.querySelector(fY);X?k.setState("value",X.getAttribute(qv)):te(L)}let se=()=>K(Z().length-1),H=L=>{L.preventDefault(),L.metaKey?se():L.altKey?ne(1):te(1)},O=L=>{L.preventDefault(),L.metaKey?K(0):L.altKey?ne(-1):te(-1)};return b.createElement(nn.div,{ref:t,tabIndex:-1,...w,"cmdk-root":"",onKeyDown:L=>{var M;(M=w.onKeyDown)==null||M.call(w,L);let q=L.nativeEvent.isComposing||L.keyCode===229;if(!(L.defaultPrevented||q))switch(L.key){case"n":case"j":{_&&L.ctrlKey&&H(L);break}case"ArrowDown":{H(L);break}case"p":case"k":{_&&L.ctrlKey&&O(L);break}case"ArrowUp":{O(L);break}case"Home":{L.preventDefault(),K(0);break}case"End":{L.preventDefault(),se();break}case"Enter":{L.preventDefault();let X=Q();if(X){let J=new Event(K6);X.dispatchEvent(J)}}}}},b.createElement("label",{"cmdk-label":"",htmlFor:j.inputId,id:j.labelId,style:oLe},c),p5(e,L=>b.createElement(Tue.Provider,{value:k},b.createElement(Cue.Provider,{value:j},L))))}),YFe=b.forwardRef((e,t)=>{var n,r;let i=Na(),s=b.useRef(null),a=b.useContext(Aue),o=fE(),c=Nue(e),u=(r=(n=c.current)==null?void 0:n.forceMount)!=null?r:a?.forceMount;R0(()=>{if(!u)return o.item(i,a?.id)},[u]);let d=jue(i,s,[e.value,e.children,s],e.keywords),h=A7(),p=wh(A=>A.value&&A.value===d.current),g=wh(A=>u||o.filter()===!1?!0:A.search?A.filtered.items.get(i)>0:!0);b.useEffect(()=>{let A=s.current;if(!(!A||e.disabled))return A.addEventListener(K6,v),()=>A.removeEventListener(K6,v)},[g,e.onSelect,e.disabled]);function v(){var A,k;x(),(k=(A=c.current).onSelect)==null||k.call(A,d.current)}function x(){h.setState("value",d.current,!0)}if(!g)return null;let{disabled:_,value:w,onSelect:S,forceMount:E,keywords:T,...N}=e;return b.createElement(nn.div,{ref:gh(s,t),...N,id:i,"cmdk-item":"",role:"option","aria-disabled":!!_,"aria-selected":!!p,"data-disabled":!!_,"data-selected":!!p,onPointerMove:_||o.getDisablePointerSelection()?void 0:x,onClick:_?void 0:v},e.children)}),XFe=b.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...s}=e,a=Na(),o=b.useRef(null),c=b.useRef(null),u=Na(),d=fE(),h=wh(g=>i||d.filter()===!1?!0:g.search?g.filtered.groups.has(a):!0);R0(()=>d.group(a),[]),jue(a,o,[e.value,e.heading,c]);let p=b.useMemo(()=>({id:a,forceMount:i}),[i]);return b.createElement(nn.div,{ref:gh(o,t),...s,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},n&&b.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),p5(e,g=>b.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},b.createElement(Aue.Provider,{value:p},g))))}),QFe=b.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=b.useRef(null),s=wh(a=>!a.search);return!n&&!s?null:b.createElement(nn.div,{ref:gh(i,t),...r,"cmdk-separator":"",role:"separator"})}),ZFe=b.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,s=A7(),a=wh(u=>u.search),o=wh(u=>u.selectedItemId),c=fE();return b.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),b.createElement(nn.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":o,id:c.inputId,type:"text",value:i?e.value:a,onChange:u=>{i||s.setState("search",u.target.value),n?.(u.target.value)}})}),JFe=b.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...i}=e,s=b.useRef(null),a=b.useRef(null),o=wh(u=>u.selectedItemId),c=fE();return b.useEffect(()=>{if(a.current&&s.current){let u=a.current,d=s.current,h,p=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let g=u.offsetHeight;d.style.setProperty("--cmdk-list-height",g.toFixed(1)+"px")})});return p.observe(u),()=>{cancelAnimationFrame(h),p.unobserve(u)}}},[]),b.createElement(nn.div,{ref:gh(s,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":o,"aria-label":r,id:c.listId},p5(e,u=>b.createElement("div",{ref:gh(a,c.listInnerRef),"cmdk-list-sizer":""},u)))}),eLe=b.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:s,container:a,...o}=e;return b.createElement(ui,{open:n,onOpenChange:r},b.createElement(d5,{container:a},b.createElement(f5,{"cmdk-overlay":"",className:i}),b.createElement(h5,{"aria-label":e.label,"cmdk-dialog":"",className:s},b.createElement(kue,{ref:t,...o}))))}),tLe=b.forwardRef((e,t)=>wh(n=>n.filtered.count===0)?b.createElement(nn.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),nLe=b.forwardRef((e,t)=>{let{progress:n,children:r,label:i="Loading...",...s}=e;return b.createElement(nn.div,{ref:t,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},p5(e,a=>b.createElement("div",{"aria-hidden":!0},a)))}),ux=Object.assign(kue,{List:JFe,Item:YFe,Input:ZFe,Group:XFe,Separator:QFe,Dialog:eLe,Empty:tLe,Loading:nLe});function rLe(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function iLe(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Nue(e){let t=b.useRef(e);return R0(()=>{t.current=e}),t}var R0=typeof window>"u"?b.useEffect:b.useLayoutEffect;function Wv(e){let t=b.useRef();return t.current===void 0&&(t.current=e()),t}function wh(e){let t=A7(),n=()=>e(t.snapshot());return b.useSyncExternalStore(t.subscribe,n,n)}function jue(e,t,n,r=[]){let i=b.useRef(),s=fE();return R0(()=>{var a;let o=(()=>{var u;
817for(let d of n){if(typeof d=="string")return d.trim();if(typeof d=="object"&&"current"in d)return d.current?(u=d.current.textContent)==null?void 0:u.trim():i.current}})(),c=r.map(u=>u.trim());s.value(e,o,c),(a=t.current)==null||a.setAttribute(qv,o),i.current=o}),i}var sLe=()=>{let[e,t]=b.useState(),n=Wv(()=>new Map);return R0(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,i)=>{n.current.set(r,i),t({})}};function aLe(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function p5({asChild:e,children:t},n){return e&&b.isValidElement(t)?b.cloneElement(aLe(t),{ref:t.ref},n(t.props.children)):n(t)}var oLe={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Ul=qi({command:"flex h-full w-full flex-col overflow-hidden rounded-radius bg-popover text-popover-fg",dialog:{content:"overflow-hidden p-0",command:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5"},empty:{content:"py-6 text-sm flex items-center justify-center gap-2",icon:"size-5"},group:"overflow-hidden p-1.5 text-fg [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-fg",input:{wrapper:"px-1.5 pt-1.5",container:"flex bg-accent/50 rounded-radius items-center px-3",icon:"mr-2 h-4 w-4 shrink-0",loader:"animate-spin transition-opacity opacity-0 ml-2 size-4 shrink-0",input:"bg-accent flex h-9 w-full rounded-radius bg-transparent py-3 text-sm outline-none placeholder:placeholder disabled:cursor-not-allowed disabled:opacity-50"},item:'transition-all cursor-pointer relative flex select-none items-center rounded-radius px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-fg data-[disabled="true"]:pointer-events-none data-[disabled="true"]:opacity-50',list:"max-h-[300px] overflow-y-auto overflow-x-hidden",separator:"-mx-1 h-px bg-separator"},"command"),Rue=b.forwardRef(({className:e,...t},n)=>l.jsx(ux,{ref:n,className:$e(Ul.command,e),...t})),Iue=b.forwardRef(({className:e,hasIcon:t=!0,loading:n,loadingMessage:r="Loading...",emptyMessage:i="No results found",children:s,...a},o)=>l.jsxs(ux.Empty,{ref:o,className:$e(Ul.empty.content,e),...a,children:[s,!s&&n?l.jsxs(l.Fragment,{children:[t&&l.jsx(Kr,{className:$e(Ul.empty.icon,"animate-spin")}),r]}):l.jsxs(l.Fragment,{children:[t&&l.jsx(aIe,{className:$e(Ul.empty.icon)}),i]})]})),Oue=b.memo(function({className:t,...n}){return l.jsx(ux.Group,{className:$e(Ul.group,t),...n})}),Pue=b.forwardRef(({className:e,loading:t=!1,...n},r)=>l.jsx("div",{className:Ul.input.wrapper,"cmdk-input-wrapper":"",children:l.jsxs("div",{className:Ul.input.container,children:[l.jsx(Iy,{className:Ul.input.icon}),l.jsx(ux.Input,{ref:r,className:$e(Ul.input.input,e),...n}),l.jsx(Kr,{className:$e(Ul.input.loader,t&&"opacity-100")})]})})),Mue=b.forwardRef(({className:e,...t},n)=>l.jsx(ux.Item,{ref:n,className:$e(Ul.item,e),...t})),Due=b.forwardRef(({className:e,...t},n)=>l.jsx(ux.List,{ref:n,className:$e(Ul.list,e),...t})),lLe=b.forwardRef(({className:e,...t},n)=>l.jsx(ux.Separator,{ref:n,className:$e(Ul.separator,e),...t})),lm=qi({description:"text-sm text-muted-fg",footer:"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",header:"flex flex-col space-y-1.5 text-center sm:text-left",overlay:"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",title:"text-lg text-popover-fg font-semibold leading-none tracking-tight",content:{wrapper:"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-popover p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
817nded-radius",close:`${kd.ring} transition-all absolute right-4 top-4 rounded-radius hover:text-muted-fg/80 focus:outline-none disabled:pointer-events-none data-[state=open]:text-muted-fg`,closeIcon:"h-4 w-4"}},"dialog"),cLe=b.forwardRef(({className:e,...t},n)=>l.jsx(f5,{ref:n,className:$e(lm.overlay,e),...t})),Fi=b.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(d5,{children:[l.jsx(cLe,{}),l.jsxs(h5,{ref:r,className:$e(lm.content.wrapper,e),...n,children:[t,l.jsxs(Fm,{className:lm.content.close,children:[l.jsx(pl,{className:lm.content.closeIcon}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]})),no=b.forwardRef(({className:e,...t},n)=>l.jsx(Sue,{ref:n,className:$e(lm.description,e),...t})),wi=b.memo(function({className:t,...n}){return l.jsx("div",{className:$e(lm.footer,t),...n})}),ks=b.memo(function({className:t,...n}){return l.jsx("div",{className:$e(lm.header,t),...n})}),Wi=b.forwardRef(({className:e,...t},n)=>l.jsx(T7,{ref:n,className:$e(lm.title,e),...t}));var Fue="AlertDialog",[uLe]=Ia(Fue,[oue]),$h=oue(),Lue=e=>{const{__scopeAlertDialog:t,...n}=e,r=$h(t);return l.jsx(ui,{...r,...n,modal:!0})};Lue.displayName=Fue;var dLe="AlertDialogTrigger",fLe=b.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=$h(n);return l.jsx(u5,{...i,...r,ref:t})});fLe.displayName=dLe;var hLe="AlertDialogPortal",zue=e=>{const{__scopeAlertDialog:t,...n}=e,r=$h(t);return l.jsx(d5,{...r,...n})};zue.displayName=hLe;var pLe="AlertDialogOverlay",$ue=b.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=$h(n);return l.jsx(f5,{...i,...r,ref:t})});$ue.displayName=pLe;var E1="AlertDialogContent",[mLe,gLe]=uLe(E1),xLe=Kae("AlertDialogContent"),Bue=b.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...i}=e,s=$h(n),a=b.useRef(null),o=Wn(t,a),c=b.useRef(null);return l.jsx(VFe,{contentName:E1,titleName:Uue,docsSlug:"alert-dialog",children:l.jsx(mLe,{scope:n,cancelRef:c,children:l.jsxs(h5,{role:"alertdialog",...s,...i,ref:o,onOpenAutoFocus:qt(i.onOpenAutoFocus,u=>{u.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[l.jsx(xLe,{children:r}),l.jsx(yLe,{contentRef:a})]})})})});Bue.displayName=E1;var Uue="AlertDialogTitle",Vue=b.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=$h(n);return l.jsx(T7,{...i,...r,ref:t})});Vue.displayName=Uue;var Hue="AlertDialogDescription",que=b.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=$h(n);return l.jsx(Sue,{...i,...r,ref:t})});que.displayName=Hue;var vLe="AlertDialogAction",Wue=b.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=$h(n);return l.jsx(Fm,{...i,...r,ref:t})});Wue.displayName=vLe;var Gue="AlertDialogCancel",Kue=b.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=gLe(Gue,n),s=$h(n),a=Wn(t,i);return l.jsx(Fm,{...s,...r,ref:a})});Kue.displayName=Gue;var yLe=({contentRef:e})=>{const t=`\`${E1}\` requires a description for the component to be accessible for screen reader users. 818 819You can add a description to the \`${E1}\` by passing a \`${Hue}\` component as a child, which also benefits sighted users by adding visible context to the dialog. 820 821Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${E1}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. 822 823For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return b.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},bLe=Lue,_Le=zue,wLe=$ue,SLe=Bue,ELe=Wue,CLe=Kue,TLe=Vue,ALe=que;const Lm=qi({title:"text-lg font-semibold",description:"text-sm text-muted-foreground",cancel:"mt-2 sm:mt-0",action:"",content:"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
823nded-lg",header:"flex flex-col space-y-2 text-center sm:text-left",footer:"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",overlay:"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"},"alertDialog"),kLe=b.forwardRef(function({className:t,...n},r){return l.jsx(wLe,{className:$e(Lm.overlay,t),...n,ref:r})}),NLe=b.forwardRef(function({className:t,...n},r){return l.jsx(SLe,{ref:r,className:$e(Lm.content,t),...n})}),jLe=b.forwardRef(function({className:t,...n},r){return l.jsx(ELe,{ref:r,className:$e(Lm.action,t),...n})}),RLe=b.forwardRef(function({className:t,...n},r){return l.jsx(CLe,{ref:r,className:$e(Lm.cancel,t),...n})}),ILe=b.forwardRef(function({className:t,...n},r){return l.jsx(ALe,{ref:r,className:$e(Lm.description,t),...n})});function OLe({className:e,...t}){return l.jsx("div",{className:$e(Lm.footer,e),...t})}function PLe({className:e,...t}){return l.jsx("div",{className:$e(Lm.header,e),...t})}const MLe=b.forwardRef(function({className:t,...n},r){return l.jsx(TLe,{ref:r,className:$e(Lm.title,t),...n})});var m5="Switch",[DLe]=Ia(m5),[FLe,LLe]=DLe(m5),Yue=b.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:s,required:a,disabled:o,value:c="on",onCheckedChange:u,form:d,...h}=e,[p,g]=b.useState(null),v=Wn(t,E=>g(E)),x=b.useRef(!1),_=p?d||!!p.closest("form"):!0,[w,S]=Yl({prop:i,defaultProp:s??!1,onChange:u,caller:m5});return l.jsxs(FLe,{scope:n,checked:w,disabled:o,children:[l.jsx(nn.button,{type:"button",role:"switch","aria-checked":w,"aria-required":a,"data-state":Jue(w),"data-disabled":o?"":void 0,disabled:o,value:c,...h,ref:v,onClick:qt(e.onClick,E=>{S(T=>!T),_&&(x.current=E.isPropagationStopped(),x.current||E.stopPropagation())})}),_&&l.jsx(Zue,{control:p,bubbles:!x.current,name:r,value:c,checked:w,required:a,disabled:o,form:d,style:{transform:"translateX(-100%)"}})]})});Yue.displayName=m5;var Xue="SwitchThumb",Que=b.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,i=LLe(Xue,n);return l.jsx(nn.span,{"data-state":Jue(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t})});Que.displayName=Xue;var zLe="SwitchBubbleInput",Zue=b.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...i},s)=>{const a=b.useRef(null),o=Wn(a,s),c=c7(n),u=Z9(t);return b.useEffect(()=>{const d=a.current;if(!d)return;const h=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(h,"checked").set;if(c!==n&&g){const v=new Event("click",{bubbles:r});g.call(d,n),d.dispatchEvent(v)}},[c,n,r]),l.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:o,style:{...i.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Zue.displayName=zLe;function Jue(e){return e?"checked":"unchecked"}var $Le=Yue,BLe=Que;const FN=qi({switch:"peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus:ring-2 focus:ring-offset-1 ring-input-border disabled:cursor-not-allowed disabled:opacity-65 data-[state=unchecked]:bg-muted hover:data-[state=unchecked]:bg-muted/80",thumb:"pointer-events-none block rounded-full bg-input ring-0 transition-transform data-[state=unchecked]:translate-x-0",thumbSize:{xs:"h-2 w-2 data-[state=checked]:translate-x-3",sm:"h-3 w-3 data-[state=checked]:translate-x-3",md:"h-4 w-4 data-[state=checked]:translate-x-4",lg:"h-5 w-5 data-[state=checked]:translate-x-5"},variants:{variant:{primary:"data-[state=checked]:bg-primary text-primary-fg hover:data-[state=checked]:bg-primary/80 active:data-[state=checked]:bg-primary/90",secondary:"data-[state=checked]:bg-secondary text-secondary-fg hover:data-[state=checked]:bg-secondary/80 active:data-[state=checked]:bg-secondary/90",muted:"data-[state=checked]:bg-default text-default-fg hover:data-[state=checked]:bg-default/80 active:data-[state=checked]:bg-default/90",success:"data-[state=checked]:bg-success text-success-fg hover:data-[state=checked]:bg-success/80 active:data-[state=checked]:bg-success/90",danger:"data-[state=checked]:bg-danger text-danger-fg hover:data-[state=checked]:bg-danger/80 active:data-[state=checked]:bg-danger/90",warning:"data-[state=checked]:bg-warning text-warning-fg hover:data-[state=checked]:bg-warning/80 active:data-[state=checked]:bg-warning/90",info:"data-[state=checked]:bg-info text-info-fg hover:data-[state=checked]:bg-info/80 active:data-[state=checked]:bg-info/90"},size:{xs:"h-3 w-6",sm:"h-4 w-7",md:"h-5 w-9",lg:"h-6 w-11"}}},"switch"),ULe=Zl(FN.switch,{variants:FN.variants}),Di=b.forwardRef(({className:e,variant:t="primary",size:n="md",...r},i)=>l.jsx($Le,{className:$e(ULe({variant:t,size:n}),e),...r,ref:i,children:l.jsx(BLe,{className:$e(n&&FN.thumbSize[n],FN.thumb)})})),g5=qi({breadcrumb:"",ellipsis:{wrapper:`${kd.ringVisible} flex h-9 w-9 items-center justify-center`,icon:"size-4"}
823,item:"inline-flex items-center gap-1.5",link:`${kd.ringVisible} rounded-radius transition-colors hover:text-foreground`,list:"flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-fg sm:gap-2.5",page:"font-normal text-foreground",separator:"[&>svg]:size-3.5"},"breadcrumb"),VLe=b.memo(function({asChild:t,className:n,...r}){const i=t?sx:"a";return l.jsx(i,{className:$e(g5.link,n),...r})}),JO=b.memo(function({className:t,...n}){return l.jsx("li",{className:$e(g5.item,t),...n})}),HLe=b.memo(function({className:t,...n}){return l.jsx("ol",{className:$e(g5.list,t),...n})}),hY=b.memo(function({className:t,children:n,...r}){return l.jsx("li",{role:"presentation","aria-hidden":"true",className:$e(g5.separator,t),...r,children:n??l.jsx(Qd,{})})}),P2=qi({header:"fixed top-0 z-50 w-full bg-menu text-menu-fg flex flex-row items-center",root:"",sidebar:{wrapper:"fixed top-0 left-0 z-40 max-w-full h-screen transition-transform ease-in-out duration-300 -translate-x-full sidebar:translate-x-0",content:"h-full pb-4 overflow-y-auto bg-menu text-menu-fg"},content:{base:"sidebar-hidden:!ml-0",overlay:"fixed z-30 t-0 l-0 h-full w-full bg-menu/75 transition-opacity cursor-pointer pointer-events-none block opacity-0"}},"layout"),k7=b.createContext(void 0);function N7(){const e=b.useContext(k7);if(!e)throw new Error("No LayoutContext found when calling useLayoutContext");return e}function pY(e){return typeof e=="string"?e:`${e}px`}function ede({className:e,hasSidebar:t,hasHeader:n,headerHeight:r,sidebarWidth:i,...s}){const[a,o]=b.useState(!1),c=b.useMemo(()=>({isSidebarOpened:a,setSidebarOpened:o,hasSidebar:!!(t??!0),hasHeader:!!(n??!0),headerHeight:pY(r??64),sidebarWidth:pY(i??256)}),[a,t,n,r,i]);return l.jsx(k7.Provider,{value:c,children:l.jsx("div",{className:$e(P2.root,e),...s})})}const tde=b.memo(function({children:t,className:n,open:r,...i}){const{isSidebarOpened:s}=b.useContext(k7),{hasHeader:a,sidebarWidth:o,headerHeight:c}=N7();return l.jsx("aside",{className:$e(P2.sidebar.wrapper,(r??s)&&"transform-none"),style:{width:o,paddingTop:a?c:"0px"},...i,children:l.jsx("div",{className:$e(P2.sidebar.content,n),children:t})})}),nde=b.memo(function({className:t,...n}){const{hasSidebar:r,hasHeader:i,sidebarWidth:s,headerHeight:a,isSidebarOpened:o,setSidebarOpened:c}=N7();return l.jsxs(l.Fragment,{children:[l.jsx("div",{onClick:()=>c(!1),className:$e(P2.content.overlay,o&&"opacity-1 pointer-events-auto")}),l.jsx("main",{className:$e(P2.content.base,t),style:{marginLeft:r?s:"0px",marginTop:i?a:"0px",height:`calc(100vh - ${a})`},...n})]})}),rde=b.memo(function({className:t,asChild:n,...r}){const{setSidebarOpened:i}=N7(),s=n?sx:"button";return l.jsx(s,{className:$e("sidebar:hidden"),onClick:()=>i(a=>!a),...r})}),qLe=b.memo(function({className:t,...n}){return l.jsx("nav",{className:$e("bg-menu",t),...n})}),Lp=qi({root:"bg-menu",label:"m-1 py-1 px-3 text-xs text-menu-fg/50 font-medium",content:"flex flex-col list-none",item:"",subItem:"",link:{wrapper:"m-1",indent:"pl-12",disabled:"pointer-events-none opacity-50",content:"flex text-base items-center py-2 px-3 transition-colors cursor-pointer hover:bg-menu-accent hover:text-menu-accent-fg w-auto rounded-radius gap-4 text-menu-fg",active:"bg-menu-accent text-menu-accent-fg"},separator:"pt-1 mb-1 border-b border-menu-border",subContent:{wrapper:"bg-menu-submenu",content:"flex flex-col list-none transition-opacity ease-in-out duration-500"},subTrigger:{wrapper:"flex justify-between",content:"w-full",button:"m-1 px-3 transition-colors cursor-pointer text-menu-fg hover:bg-menu-accent hover:text-menu-accent-fg rounded-radius mr-1",icon:"transition-transform size-5"}},"menu"),WLe=b.memo(function({className:t,...n}){return l.jsx("ul",{className:$e(Lp.content,t),...n})}),To=b.memo(function({className:t,...n}){return l.jsx("li",{className:$e(Lp.item,t),...n})}),YT=b.memo(function({className:t,...n}){return l.jsx("li",{role:"presentation",className:$e(Lp.label,t),...n})}),ide=b.memo(function({children:t,className:n,disabled:r,active:i=!1,asChild:s=!1,indent:a=!1,...o}){const c=s?sx:"a";return l.jsx("div",{className:$e(Lp.link.wrapper),children:l.jsx(c,{"aria-disabled":r,tabIndex:r?-1:void 0,className:$e(Lp.link.content,a&&Lp.link.indent,i&&Lp.link.active,r&&Lp.link.disabled,n),...o,children:t})})}),sy=qi({root:"",content:"flex flex-row items-center gap-1",icon:"size-4",ellipsis:{content:"flex h-9 w-9 items-center text-primary justify-center"},item:"",link:"cursor-pointer aria-disabled:opacity-65 aria-disabled:cursor-not-allowed font-normal"},"pagination"),sde=b.createContext(void 0);function GLe(){const e=b.useContext(sde);if(!e)throw new Error("No PaginationContext.Provider found when calling usePaginationContext.");return e}const KLe=b.memo(function({className:t,size:n,...r}){const i=b.useMemo(()=>({size:n}),[n]);return l.jsx(sde.Provider,{value:i,children:l.jsx("nav",{role:"navigation","aria-label":"pagination",className:$e(sy.root,t),...r})})}),YLe=b.memo(function({className:t,...n}
823){return l.jsx("span",{"aria-hidden":!0,className:$e(sy.ellipsis.content,t),...n,children:l.jsx(J1,{className:sy.icon})})}),eP=b.forwardRef(function({className:t,children:n,size:r="md",disabled:i=!1,active:s=!1,asChild:a=!1,...o},c){const{size:u}=GLe(),d=a?sx:"a";return l.jsx(d,{"aria-disabled":i,className:$e(moe({size:u??r,variant:"ghost",outline:s?"ghost":null}),sy.link),ref:c,...o,children:n})}),XLe=b.memo(function({className:t,...n}){return l.jsx("ul",{className:$e(sy.content,t),...n})}),tP=b.memo(function({className:t,...n}){return l.jsx("li",{className:$e(sy.item,t),...n})}),x5=b.createContext(null);x5.displayName="PanelGroupContext";const ws={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},j7=10,o0=b.useLayoutEffect,mY=pj.useId,QLe=typeof mY=="function"?mY:()=>null;let ZLe=0;function R7(e=null){const t=QLe(),n=b.useRef(e||t||null);return n.current===null&&(n.current=""+ZLe++),e??n.current}function ade({children:e,className:t="",collapsedSize:n,collapsible:r,defaultSize:i,forwardedRef:s,id:a,maxSize:o,minSize:c,onCollapse:u,onExpand:d,onResize:h,order:p,style:g,tagName:v="div",...x}){const _=b.useContext(x5);if(_===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:w,expandPanel:S,getPanelSize:E,getPanelStyle:T,groupId:N,isPanelCollapsed:A,reevaluatePanelConstraints:k,registerPanel:j,resizePanel:R,unregisterPanel:P}=_,V=R7(a),U=b.useRef({callbacks:{onCollapse:u,onExpand:d,onResize:h},constraints:{collapsedSize:n,collapsible:r,defaultSize:i,maxSize:o,minSize:c},id:V,idIsFromProps:a!==void 0,order:p});b.useRef({didLogMissingDefaultSizeWarning:!1}),o0(()=>{const{callbacks:Q,constraints:Z}=U.current,K={...Z};U.current.id=V,U.current.idIsFromProps=a!==void 0,U.current.order=p,Q.onCollapse=u,Q.onExpand=d,Q.onResize=h,Z.collapsedSize=n,Z.collapsible=r,Z.defaultSize=i,Z.maxSize=o,Z.minSize=c,(K.collapsedSize!==Z.collapsedSize||K.collapsible!==Z.collapsible||K.maxSize!==Z.maxSize||K.minSize!==Z.minSize)&&k(U.current,K)}),o0(()=>{const Q=U.current;return j(Q),()=>{P(Q)}},[p,V,j,P]),b.useImperativeHandle(s,()=>({collapse:()=>{w(U.current)},expand:Q=>{S(U.current,Q)},getId(){return V},getSize(){return E(U.current)},isCollapsed(){return A(U.current)},isExpanded(){return!A(U.current)},resize:Q=>{R(U.current,Q)}}),[w,S,E,A,V,R]);const G=T(U.current,i);return b.createElement(v,{...x,children:e,className:t,id:V,style:{...G,...g},[ws.groupId]:N,[ws.panel]:"",[ws.panelCollapsible]:r||void 0,[ws.panelId]:V,[ws.panelSize]:parseFloat(""+G.flexGrow).toFixed(1)})}const Y6=b.forwardRef((e,t)=>b.createElement(ade,{...e,forwardedRef:t}));ade.displayName="Panel";Y6.displayName="forwardRef(Panel)";let X6=null,hk=-1,zp=null;function JLe(e,t){if(t){const n=(t&dde)!==0,r=(t&fde)!==0,i=(t&hde)!==0,s=(t&pde)!==0;if(n)return i?"se-resize":s?"ne-resize":"e-resize";if(r)return i?"sw-resize":s?"nw-resize":"w-resize";if(i)return"s-resize";if(s)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function e9e(){zp!==null&&(document.head.removeChild(zp),X6=null,zp=null,hk=-1)}function nP(e,t){var n,r;const i=JLe(e,t);if(X6!==i){if(X6=i,zp===null&&(zp=document.createElement("style"),document.head.appendChild(zp)),hk>=0){var s;(s=zp.sheet)===null||s===void 0||s.removeRule(hk)}hk=(n=(r=zp.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${i} !important;}`))!==null&&n!==void 0?n:-1}}function ode(e){return e.type==="keydown"}function lde(e){return e.type.startsWith("pointer")}function cde(e){return e.type.startsWith("mouse")}function v5(e){if(lde(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(cde(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function t9e(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function n9e(e,t,n){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function r9e(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:vY(e),b:vY(t)};let r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;sr(r,"Stacking order can only be calculated for elements with a common ancestor");const i={a:xY(gY(n.a)),b:xY(gY(n.b))};if(i.a===i.b){const s=r.childNodes,a={a:n.a.at(-1),b:n.b.at(-1)};let o=s.length;for(;o--;){const c=s[o];if(c===a.a)return 1;if(c===a.b)return-1}}return Math.sign(i.a-i.b)}const i9e=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function s9e(e){var t;const n=getComputedStyle((t=ude(e))!==null&&t!==void 0?t:e).display;return n==="flex"||n==="inline-flex"}function a9e(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||s9e
823(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||i9e.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function gY(e){let t=e.length;for(;t--;){const n=e[t];if(sr(n,"Missing node"),a9e(n))return n}return null}function xY(e){return e&&Number(getComputedStyle(e).zIndex)||0}function vY(e){const t=[];for(;e;)t.push(e),e=ude(e);return t}function ude(e){const{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}const dde=1,fde=2,hde=4,pde=8,o9e=t9e()==="coarse";let yu=[],C1=!1,Vg=new Map,y5=new Map;const M2=new Set;function l9e(e,t,n,r,i){var s;const{ownerDocument:a}=t,o={direction:n,element:t,hitAreaMargins:r,setResizeHandlerState:i},c=(s=Vg.get(a))!==null&&s!==void 0?s:0;return Vg.set(a,c+1),M2.add(o),LN(),function(){var d;y5.delete(e),M2.delete(o);const h=(d=Vg.get(a))!==null&&d!==void 0?d:1;if(Vg.set(a,h-1),LN(),h===1&&Vg.delete(a),yu.includes(o)){const p=yu.indexOf(o);p>=0&&yu.splice(p,1),O7(),i("up",!0,null)}}}function c9e(e){const{target:t}=e,{x:n,y:r}=v5(e);C1=!0,I7({target:t,x:n,y:r}),LN(),yu.length>0&&(zN("down",e),e.preventDefault(),mde(t)||e.stopImmediatePropagation())}function rP(e){const{x:t,y:n}=v5(e);if(C1&&e.buttons===0&&(C1=!1,zN("up",e)),!C1){const{target:r}=e;I7({target:r,x:t,y:n})}zN("move",e),O7(),yu.length>0&&e.preventDefault()}function iP(e){const{target:t}=e,{x:n,y:r}=v5(e);y5.clear(),C1=!1,yu.length>0&&(e.preventDefault(),mde(t)||e.stopImmediatePropagation()),zN("up",e),I7({target:t,x:n,y:r}),O7(),LN()}function mde(e){let t=e;for(;t;){if(t.hasAttribute(ws.resizeHandle))return!0;t=t.parentElement}return!1}function I7({target:e,x:t,y:n}){yu.splice(0);let r=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(r=e),M2.forEach(i=>{const{element:s,hitAreaMargins:a}=i,o=s.getBoundingClientRect(),{bottom:c,left:u,right:d,top:h}=o,p=o9e?a.coarse:a.fine;if(t>=u-p&&t<=d+p&&n>=h-p&&n<=c+p){if(r!==null&&document.contains(r)&&s!==r&&!s.contains(r)&&!r.contains(s)&&r9e(r,s)>0){let v=r,x=!1;for(;v&&!v.contains(s);){if(n9e(v.getBoundingClientRect(),o)){x=!0;break}v=v.parentElement}if(x)return}yu.push(i)}})}function sP(e,t){y5.set(e,t)}function O7(){let e=!1,t=!1;yu.forEach(r=>{const{direction:i}=r;i==="horizontal"?e=!0:t=!0});let n=0;y5.forEach(r=>{n|=r}),e&&t?nP("intersection",n):e?nP("horizontal",n):t?nP("vertical",n):e9e()}let aP=new AbortController;function LN(){aP.abort(),aP=new AbortController;const e={capture:!0,signal:aP.signal};M2.size&&(C1?(yu.length>0&&Vg.forEach((t,n)=>{const{body:r}=n;t>0&&(r.addEventListener("contextmenu",iP,e),r.addEventListener("pointerleave",rP,e),r.addEventListener("pointermove",rP,e))}),window.addEventListener("pointerup",iP,e),window.addEventListener("pointercancel",iP,e)):Vg.forEach((t,n)=>{const{body:r}=n;t>0&&(r.addEventListener("pointerdown",c9e,e),r.addEventListener("pointermove",rP,e))}))}function zN(e,t){M2.forEach(n=>{const{setResizeHandlerState:r}=n,i=yu.includes(n);r(e,i,t)})}function u9e(){const[e,t]=b.useState(0);return b.useCallback(()=>t(n=>n+1),[])}function sr(e,t){if(!e)throw console.error(t),Error(t)}function I0(e,t,n=j7){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function Wf(e,t,n=j7){return I0(e,t,n)===0}function Il(e,t,n){return I0(e,t,n)===0}function d9e(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){const i=e[r],s=t[r];if(!Il(i,s,n))return!1}return!0}function n1({panelConstraints:e,panelIndex:t,size:n}){const r=e[t];sr(r!=null,`Panel constraints not found for index ${t}`);let{collapsedSize:i=0,collapsible:s,maxSize:a=100,minSize:o=0}=r;if(I0(n,o)<0)if(s){const c=(i+o)/2;I0(n,c)<0?n=i:n=o}else n=o;return n=Math.min(a,n),n=parseFloat(n.toFixed(j7)),n}function uw({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:s}){if(Il(e,0))return t;const a=[...t],[o,c]=r;sr(o!=null,"Invalid first pivot index"),sr(c!=null,"Invalid second pivot index");let u=0;if(s==="keyboard"){{const h=e<0?c:o,p=n[h];sr(p,`Panel constraints not found for index ${h}`);const{collapsedSize:g=0,collapsible:v,minSize:x=0}=p;if(v){const _=t[h];if(sr(_!=null,`Previous layout not found for panel index ${h}`),Il(_,g)){const w=x-_;I0(w,Math.abs(e))>0&&(e=e<0?0-w:w)}}}{const h=e<0?o:c,p=n[h];
823sr(p,`No panel constraints found for index ${h}`);const{collapsedSize:g=0,collapsible:v,minSize:x=0}=p;if(v){const _=t[h];if(sr(_!=null,`Previous layout not found for panel index ${h}`),Il(_,x)){const w=_-g;I0(w,Math.abs(e))>0&&(e=e<0?0-w:w)}}}}{const h=e<0?1:-1;let p=e<0?c:o,g=0;for(;;){const x=t[p];sr(x!=null,`Previous layout not found for panel index ${p}`);const w=n1({panelConstraints:n,panelIndex:p,size:100})-x;if(g+=w,p+=h,p<0||p>=n.length)break}const v=Math.min(Math.abs(e),Math.abs(g));e=e<0?0-v:v}{let p=e<0?o:c;for(;p>=0&&p<n.length;){const g=Math.abs(e)-Math.abs(u),v=t[p];sr(v!=null,`Previous layout not found for panel index ${p}`);const x=v-g,_=n1({panelConstraints:n,panelIndex:p,size:x});if(!Il(v,_)&&(u+=v-_,a[p]=_,u.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3),void 0,{numeric:!0})>=0))break;e<0?p--:p++}}if(d9e(i,a))return i;{const h=e<0?c:o,p=t[h];sr(p!=null,`Previous layout not found for panel index ${h}`);const g=p+u,v=n1({panelConstraints:n,panelIndex:h,size:g});if(a[h]=v,!Il(v,g)){let x=g-v,w=e<0?c:o;for(;w>=0&&w<n.length;){const S=a[w];sr(S!=null,`Previous layout not found for panel index ${w}`);const E=S+x,T=n1({panelConstraints:n,panelIndex:w,size:E});if(Il(S,T)||(x-=T-S,a[w]=T),Il(x,0))break;e>0?w--:w++}}}const d=a.reduce((h,p)=>p+h,0);return Il(d,100)?a:i}function f9e({layout:e,panelsArray:t,pivotIndices:n}){let r=0,i=100,s=0,a=0;const o=n[0];sr(o!=null,"No pivot index found"),t.forEach((h,p)=>{const{constraints:g}=h,{maxSize:v=100,minSize:x=0}=g;p===o?(r=x,i=v):(s+=x,a+=v)});const c=Math.min(i,100-s),u=Math.max(r,100-a),d=e[o];return{valueMax:c,valueMin:u,valueNow:d}}function D2(e,t=document){return Array.from(t.querySelectorAll(`[${ws.resizeHandleId}][data-panel-group-id="${e}"]`))}function gde(e,t,n=document){const i=D2(e,n).findIndex(s=>s.getAttribute(ws.resizeHandleId)===t);return i??null}function xde(e,t,n){const r=gde(e,t,n);return r!=null?[r,r+1]:[-1,-1]}function vde(e,t=document){var n;if(t instanceof HTMLElement&&(t==null||(n=t.dataset)===null||n===void 0?void 0:n.panelGroupId)==e)return t;
823const r=t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);return r||null}function b5(e,t=document){const n=t.querySelector(`[${ws.resizeHandleId}="${e}"]`);return n||null}function h9e(e,t,n,r=document){var i,s,a,o;const c=b5(t,r),u=D2(e,r),d=c?u.indexOf(c):-1,h=(i=(s=n[d])===null||s===void 0?void 0:s.id)!==null&&i!==void 0?i:null,p=(a=(o=n[d+1])===null||o===void 0?void 0:o.id)!==null&&a!==void 0?a:null;return[h,p]}function p9e({committedValuesRef:e,eagerValuesRef:t,groupId:n,layout:r,panelDataArray:i,panelGroupElement:s,setLayout:a}){b.useRef({didWarnAboutMissingResizeHandle:!1}),o0(()=>{if(!s)return;const o=D2(n,s);for(let c=0;c<i.length-1;c++){const{valueMax:u,valueMin:d,valueNow:h}=f9e({layout:r,panelsArray:i,pivotIndices:[c,c+1]}),p=o[c];if(p!=null){const g=i[c];sr(g,`No panel data found for index "${c}"`),p.setAttribute("aria-controls",g.id),p.setAttribute("aria-valuemax",""+Math.round(u)),p.setAttribute("aria-valuemin",""+Math.round(d)),p.setAttribute("aria-valuenow",h!=null?""+Math.round(h):"")}}return()=>{o.forEach((c,u)=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})}},[n,r,i,s]),b.useEffect(()=>{if(!s)return;const o=t.current;sr(o,"Eager values not found");const{panelDataArray:c}=o,u=vde(n,s);sr(u!=null,`No group found for id "${n}"`);const d=D2(n,s);sr(d,`No resize handles found for group id "${n}"`);const h=d.map(p=>{const g=p.getAttribute(ws.resizeHandleId);sr(g,"Resize handle element has no handle id attribute");const[v,x]=h9e(n,g,c,s);if(v==null||x==null)return()=>{};const _=w=>{if(!w.defaultPrevented)switch(w.key){case"Enter":{w.preventDefault();const S=c.findIndex(E=>E.id===v);if(S>=0){const E=c[S];sr(E,`No panel data found for index ${S}`);const T=r[S],{collapsedSize:N=0,collapsible:A,minSize:k=0}=E.constraints;if(T!=null&&A){const j=uw({delta:Il(T,N)?k-N:N-T,initialLayout:r,panelConstraints:c.map(R=>R.constraints),pivotIndices:xde(n,g,s),prevLayout:r,trigger:"keyboard"});r!==j&&a(j)}}break}}};return p.addEventListener("keydown",_),()=>{p.removeEventListener("keydown",_)}});return()=>{h.forEach(p=>p())}},[s,e,t,n,r,i,a])}function yY(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function yde(e,t){const n=e==="horizontal",{x:r,y:i}=v5(t);return n?r:i}function m9e(e,t,n,r,i){const s=n==="horizontal",a=b5(t,i);sr(a,`No resize handle element found for id "${t}"`);const o=a.getAttribute(ws.groupId);sr(o,"Resize handle element has no group id attribute");let{initialCursorPosition:c}=r;const u=yde(n,e),d=vde(o,i);sr(d,`No group element found for id "${o}"`);const h=d.getBoundingClientRect(),p=s?h.width:h.height;return(u-c)/p*100}function g9e(e,t,n,r,i,s){if(ode(e)){const a=n==="horizontal";let o=0;e.shiftKey?o=100:i!=null?o=i:o=10;let c=0;switch(e.key){case"ArrowDown":c=a?0:o;break;case"ArrowLeft":c=a?-o:0;break;case"ArrowRight":c=a?o:0;break;case"ArrowUp":c=a?0:-o;break;case"End":c=100;break;case"Home":c=-100;break}return c}else return r==null?0:m9e(e,t,n,r,s)}function x9e({panelDataArray:e}){const t=Array(e.length),n=e.map(s=>s.constraints);let r=0,i=100;for(let s=0;s<e.length;s++){const a=n[s];sr(a,`Panel constraints not found for index ${s}`);const{defaultSize:o}=a;o!=null&&(r++,t[s]=o,i-=o)}for(let s=0;s<e.length;s++){const a=n[s];sr(a,`Panel constraints not found for index ${s}`);const{defaultSize:o}=a;if(o!=null)continue;const c=e.length-r,u=i/c;r++,t[s]=u,i-=u}return t}function bv(e,t,n){t.forEach((r,i)=>{const s=e[i];sr(s,`Panel data not found for index ${i}`);const{callbacks:a,constraints:o,id:c}=s,{collapsedSize:u=0,collapsible:d}=o,h=n[c];if(h==null||r!==h){n[c]=r;const{onCollapse:p,onExpand:g,onResize:v}=a;v&&v(r,h),d&&(p||g)&&(g&&(h==null||Wf(h,u))&&!Wf(r,u)&&g(),p&&(h==null||!Wf(h,u))&&Wf(r,u)&&p())}})}function XT(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function v9e({defaultSize:e,dragState:t,layout:n,panelData:r,panelIndex:i,precision:s=3}){const a=n[i];let o;return a==null?o=e!=null?e.toPrecision(s):"1":r.length===1?o="1":o=a.toPrecision(s),{flexBasis:0,flexGrow:o,flexShrink:1,overflow:"hidden",pointerEvents:t!==null?"none":void 0}}function y9e(e,t=10){let n=null;return(...i)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...i)},t)}}function bY(e){try{if(typeof localStorage<"u")e.getItem=t=>
823localStorage.getItem(t),e.setItem=(t,n)=>{localStorage.setItem(t,n)};else throw new Error("localStorage not supported in this environment")}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function bde(e){return`react-resizable-panels:${e}`}function _de(e){return e.map(t=>{const{constraints:n,id:r,idIsFromProps:i,order:s}=t;return i?r:s?`${s}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((t,n)=>t.localeCompare(n)).join(",")}function wde(e,t){try{const n=bde(e),r=t.getItem(n);if(r){const i=JSON.parse(r);if(typeof i=="object"&&i!=null)return i}}catch{}return null}function b9e(e,t,n){var r,i;const s=(r=wde(e,n))!==null&&r!==void 0?r:{},a=_de(t);return(i=s[a])!==null&&i!==void 0?i:null}function _9e(e,t,n,r,i){var s;const a=bde(e),o=_de(t),c=(s=wde(e,i))!==null&&s!==void 0?s:{};c[o]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{i.setItem(a,JSON.stringify(c))}catch(u){console.error(u)}}function _Y({layout:e,panelConstraints:t}){const n=[...e],r=n.reduce((s,a)=>s+a,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(s=>`${s}%`).join(", ")}`);if(!Il(r,100)&&n.length>0)for(let s=0;s<t.length;s++){const a=n[s];sr(a!=null,`No layout data found for index ${s}`);const o=100/r*a;n[s]=o}let i=0;for(let s=0;s<t.length;s++){const a=n[s];sr(a!=null,`No layout data found for index ${s}`);const o=n1({panelConstraints:t,panelIndex:s,size:a});a!=o&&(i+=a-o,n[s]=o)}if(!Il(i,0))for(let s=0;s<t.length;s++){const a=n[s];sr(a!=null,`No layout data found for index ${s}`);const o=a+i,c=n1({panelConstraints:t,panelIndex:s,size:o});if(a!==c&&(i-=c-a,n[s]=c,Il(i,0)))break}return n}const w9e=100,dw={getItem:e=>(bY(dw),dw.getItem(e)),setItem:(e,t)=>{bY(dw),dw.setItem(e,t)}},wY={};function Sde({autoSaveId:e=null,children:t,className:n="",direction:r,forwardedRef:i,id:s=null,onLayout:a=null,keyboardResizeBy:o=null,storage:c=dw,style:u,tagName:d="div",...h}){const p=R7(s),g=b.useRef(null),[v,x]=b.useState(null),[_,w]=b.useState([]),S=u9e(),E=b.useRef({}),T=b.useRef(new Map),N=b.useRef(0),A=b.useRef({autoSaveId:e,direction:r,dragState:v,id:p,keyboardResizeBy:o,onLayout:a,storage:c}),k=b.useRef({layout:_,panelDataArray:[],panelDataArrayChanged:!1});b.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),b.useImperativeHandle(i,()=>({getId:()=>A.current.id,getLayout:()=>{const{layout:M}=k.current;return M},setLayout:M=>{const{onLayout:q}=A.current,{layout:X,panelDataArray:J}=k.current,W=_Y({layout:M,panelConstraints:J.map(re=>re.constraints)});yY(X,W)||(w(W),k.current.layout=W,q&&q(W),bv(J,W,E.current))}}),[]),o0(()=>{A.current.autoSaveId=e,A.current.direction=r,A.current.dragState=v,A.current.id=p,A.current.onLayout=a,A.current.storage=c}),p9e({committedValuesRef:A,eagerValuesRef:k,groupId:p,layout:_,panelDataArray:k.current.panelDataArray,setLayout:w,panelGroupElement:g.current}),b.useEffect(()=>{const{panelDataArray:M}=k.current;if(e){if(_.length===0||_.length!==M.length)return;let q=wY[e];q==null&&(q=y9e(_9e,w9e),wY[e]=q);const X=[...M],J=new Map(T.current);q(e,X,J,_,c)}},[e,_,c]),b.useEffect(()=>{});const j=b.useCallback(M=>{const{onLayout:q}=A.current,{layout:X,panelDataArray:J}=k.current;if(M.constraints.collapsible){const W=J.map(Te=>Te.constraints),{collapsedSize:re=0,panelSize:ae,pivotIndices:ce}=Sg(J,M,X);if(sr(ae!=null,`Panel size not found for panel "${M.id}"`),!Wf(ae,re)){T.current.set(M.id,ae);const fe=Gv(J,M)===J.length-1?ae-re:re-ae,xe=uw({delta:fe,initialLayout:X,panelConstraints:W,pivotIndices:ce,prevLayout:X,trigger:"imperative-api"});XT(X,xe)||(w(xe),k.current.layout=xe,q&&q(xe),bv(J,xe,E.current))}}},[]),R=b.useCallback((M,q)=>{const{onLayout:X}=A.current,{layout:J,panelDataArray:W}=k.current;if(M.constraints.collapsible){const re=W.map(ke=>ke.constraints),{collapsedSize:ae=0,panelSize:ce=0,minSize:Te=0,pivotIndices:fe}=Sg(W,M,J),xe=q??Te;if(Wf(ce,ae)){const ke=T.current.get(M.id),Fe=ke!=null&&ke>=xe?ke:xe,Se=Gv(W,M)===W.length-1?ce-Fe:Fe-ce,et=uw({delta:Se,initialLayout:J,panelConstraints:re,pivotIndices:fe,prevLayout:J,trigger:"imperative-api"});XT(J,et)||(w(et),k.current.layout=et,X&&X(et),bv(W,et,E.current))}}},[]),P=b.useCallback(M=>{const{layout:q,panelDataArray:X}=k.current,{panelSize:J}=Sg(X,M,q);return sr(J!=null,`Panel size not found for panel "${M.id}"`),J},[]),V=b.useCallback((M,q)=>{const{panelDataArray:X}=k.current,J=Gv(X,M);return v9e({defaultSize:q,dragState:v,layout:_,panelData:X,panelIndex:J})},[v,_]),U=b.useCallback(M=>{const{layout:q,panelDataArray:X}=k.current,{collapsedSize:J=0,collapsible:W,panelSize:re}=Sg(X,M,q);return sr(re!=null,`Panel size not found for panel "${M.id}"`),W===!0&&Wf(re,J)},[]),G=b.useCallback(M=>{const{layout:q,panelDataArray:X}=k.current,{collapsedSize:J=0,collapsible:W,panelSize:re}=Sg(X,M,q);return sr(re!=null,`Panel size not found for panel "${M.id}"`),!W||I0(re,J)>0},[]),Q=b.useCallback(M=>{const{panelDataArray:q}=k.current;q.push(M),q.sort((X,J)=>{const W=X.order,re=J.order;return W==null&&re==null?0:W==null?-1:re==null?1:W-re}),k.current.panelDataArrayChanged=!0,S()},[S]);o0(()=>
823{if(k.current.panelDataArrayChanged){k.current.panelDataArrayChanged=!1;const{autoSaveId:M,onLayout:q,storage:X}=A.current,{layout:J,panelDataArray:W}=k.current;let re=null;if(M){const ce=b9e(M,W,X);ce&&(T.current=new Map(Object.entries(ce.expandToSizes)),re=ce.layout)}re==null&&(re=x9e({panelDataArray:W}));const ae=_Y({layout:re,panelConstraints:W.map(ce=>ce.constraints)});yY(J,ae)||(w(ae),k.current.layout=ae,q&&q(ae),bv(W,ae,E.current))}}),o0(()=>{const M=k.current;return()=>{M.layout=[]}},[]);const Z=b.useCallback(M=>{let q=!1;const X=g.current;return X&&window.getComputedStyle(X,null).getPropertyValue("direction")==="rtl"&&(q=!0),function(W){W.preventDefault();const re=g.current;if(!re)return()=>null;const{direction:ae,dragState:ce,id:Te,keyboardResizeBy:fe,onLayout:xe}=A.current,{layout:ke,panelDataArray:Fe}=k.current,{initialLayout:tt}=ce??{},Se=xde(Te,M,re);let et=g9e(W,M,ae,ce,fe,re);const pt=ae==="horizontal";pt&&q&&(et=-et);const ie=Fe.map(De=>De.constraints),ue=uw({delta:et,initialLayout:tt??ke,panelConstraints:ie,pivotIndices:Se,prevLayout:ke,trigger:ode(W)?"keyboard":"mouse-or-touch"}),Ne=!XT(ke,ue);(lde(W)||cde(W))&&N.current!=et&&(N.current=et,!Ne&&et!==0?pt?sP(M,et<0?dde:fde):sP(M,et<0?hde:pde):sP(M,0)),Ne&&(w(ue),k.current.layout=ue,xe&&xe(ue),bv(Fe,ue,E.current))}},[]),K=b.useCallback((M,q)=>{const{onLayout:X}=A.current,{layout:J,panelDataArray:W}=k.current,re=W.map(ke=>ke.constraints),{panelSize:ae,pivotIndices:ce}=Sg(W,M,J);sr(ae!=null,`Panel size not found for panel "${M.id}"`);const fe=Gv(W,M)===W.length-1?ae-q:q-ae,xe=uw({delta:fe,initialLayout:J,panelConstraints:re,pivotIndices:ce,prevLayout:J,trigger:"imperative-api"});XT(J,xe)||(w(xe),k.current.layout=xe,X&&X(xe),bv(W,xe,E.current))},[]),te=b.useCallback((M,q)=>{const{layout:X,panelDataArray:J}=k.current,{collapsedSize:W=0,collapsible:re}=q,{collapsedSize:ae=0,collapsible:ce,maxSize:Te=100,minSize:fe=0}=M.constraints,{panelSize:xe}=Sg(J,M,X);xe!=null&&(re&&ce&&Wf(xe,W)?Wf(W,ae)||K(M,ae):xe<fe?K(M,fe):xe>Te&&K(M,Te))},[K]),ne=b.useCallback((M,q)=>{const{direction:X}=A.current,{layout:J}=k.current;if(!g.current)return;const W=b5(M,g.current);sr(W,`Drag handle element not found for id "${M}"`);const re=yde(X,q);x({dragHandleId:M,dragHandleRect:W.getBoundingClientRect(),initialCursorPosition:re,initialLayout:J})},[]),se=b.useCallback(()=>{x(null)},[]),H=b.useCallback(M=>{const{panelDataArray:q}=k.current,X=Gv(q,M);X>=0&&(q.splice(X,1),delete E.current[M.id],k.current.panelDataArrayChanged=!0,S())},[S]),O=b.useMemo(()=>({collapsePanel:j,direction:r,dragState:v,expandPanel:R,getPanelSize:P,getPanelStyle:V,groupId:p,isPanelCollapsed:U,isPanelExpanded:G,reevaluatePanelConstraints:te,registerPanel:Q,registerResizeHandle:Z,resizePanel:K,startDragging:ne,stopDragging:se,unregisterPanel:H,panelGroupElement:g.current}),[j,v,r,R,P,V,p,U,G,te,Q,Z,K,ne,se,H]),L={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return b.createElement(x5.Provider,{value:O},b.createElement(d,{...h,children:t,className:n,id:s,ref:g,style:{...L,...u},[ws.group]:"",[ws.groupDirection]:r,[ws.groupId]:p}))}const Ede=b.forwardRef((e,t)=>b.createElement(Sde,{...e,forwardedRef:t}));Sde.displayName="PanelGroup";Ede.displayName="forwardRef(PanelGroup)";function Gv(e,t){return e.findIndex(n=>n===t||n.id===t.id)}function Sg(e,t,n){const r=Gv(e,t),s=r===e.length-1?[r-1,r]:[r,r+1],a=n[r];return{...t.constraints,panelSize:a,pivotIndices:s}}function S9e({disabled:e,handleId:t,resizeHandler:n,panelGroupElement:r}){b.useEffect(()=>{if(e||n==null||r==null)return;const i=b5(t,r);if(i==null)return;const s=a=>{if(!a.defaultPrevented)switch(a.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{a.preventDefault(),n(a);break}case"F6":{a.preventDefault();const o=i.getAttribute(ws.groupId);sr(o,`No group element found for id "${o}"`);const c=D2(o,r),u=gde(o,t,r);sr(u!==null,`No resize element found for id "${t}"`);const d=a.shiftKey?u>0?u-1:c.length-1:u+1<c.length?u+1:0;c[d].focus();break}}};return i.addEventListener("keydown",s),()=>{i.removeEventListener("keydown",s)}},[r,e,t,n])}function Cde({children:e=null,className:t="",disabled:n=!1,hitAreaMargins:r,id:i,onBlur:s,onClick:a,onDragging:o,onFocus:c,onPointerDown:u,onPointerUp:d,style:h={},tabIndex:p=0,tagName:g="div",...v}){var x,_;const w=b.useRef(null),S=b.useRef({onClick:a,onDragging:o,onPointerDown:u,onPointerUp:d});b.useEffect(()=>{S.current.onClick=a,S.current.onDragging=o,S.current.onPointerDown=u,S.current.onPointerUp=d});const E=b.useContext(x5);if(E===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:T,groupId:N,registerResizeHandle:A,startDragging:k,stopDragging:j,panelGroupElement:R}=E,P=R7(i),[V,U]=b.useState("inactive"),[G,Q]=b.useState(!1),[Z,K]=b.useState(null),te=b.useRef({state:V});o0(()=>{te.current.state=V}),b.useEffect(()=>{if(n)K(null);else{const O=A(P);K(()=>O)}},[n,P,A]);const ne=(x=r?.coarse)!==null&&x!==void 0?x:15,se=(_=r?.fine)!==null&&_!==void 0?_:5;b.useEffect(()=>{if(n||Z==null)return;const O=w.current;sr(O,"Element ref not attached");let L=!1;return l9e(P,O,T,{coarse:ne,fine:se},(q,X,J)=>{if(!X){U("inactive");return}switch(q){case"down":{U("drag"),L=!1,sr(J,'Expected event to be defined for "down" action'),k(P,J);const{onDragging:W,onPointerDown:re}=S.current;W?.(!0),re?.();break}case"move":{const{state:W}=te.current;L=!0,W!=="drag"&&U("hover"),sr(J,'Expected event to be defined for "move" action'),Z(J);break}case"up":{U("hover"),j();const{onClick:W,onDragging:re,onPointerUp:ae}=S.current;re?.(!1),ae?.(),L||W?.();break}}})},[ne,T,n,se,A,P,Z,k,j]),S9e({disabled:n,handleId:P,resizeHandler:Z,panelGroupElement:R});const H={touchAction:"none",userSelect:"none"};return b.createElement(g,{...v,children:e,className:t,id:i,onBlur:()=>{Q(!1),s?.()},onFocus:()=>{Q(!0),c?.()},ref:w,role:"separator",style:{...H,...h},tabIndex:p,[ws.groupDirection]:T,[ws.groupId]:N,[ws.resizeHandle]:"",[ws.resizeHandleActive]:V==="drag"?"pointer":G?"keyboard":void 0,[ws.resizeHandleEnabled]:!n,[ws.resizeHandleId]:P,[ws.resizeHandleState]:V})}Cde.displayName="PanelResizeHandle";const pk=qi({handle:{handle:"relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",iconWrapper:"z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border",icon:"h-2.5 w-2.5"},panelGroup:"flex h-full w-full data-[panel-group-direction=vertical]:flex-col"},"resizable"),E9e=b.memo(function({className:t,...n}){return l.jsx(Ede,{className:$e(pk.panelGroup,t),...n})}),C9e=b.memo(function({withHandle:t,className:n,classNames:r={},...i}){return l.jsx(Cde,{className:$e(pk.handle.handle,r?.handle,n),...i,children:t&&l.jsx("div",{className:$e(pk.handle.iconWrapper,r?.iconWrapper),children:l.jsx(IRe,{className:$e(pk.handle.icon,r?.icon)})})})});function T9e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,a,o=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=s.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(d){u=!0,i=d}
823finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function SY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function fr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?SY(Object(n),!0).forEach(function(r){A9e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SY(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Sh(e){"@babel/helpers - typeof";return Sh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sh(e)}function Tde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EY(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,kde(r.key),r)}}function Ade(e,t,n){return t&&EY(e.prototype,t),n&&EY(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function A9e(e,t,n){return t=kde(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ya(){return Ya=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ya.apply(this,arguments)}function k9e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function qu(e,t){if(e==null)return{};var n=k9e(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zs(e,t){return j9e(e)||T9e(e,t)||P7(e,t)||O9e()}function Mo(e){return N9e(e)||R9e(e)||P7(e)||I9e()}function N9e(e){if(Array.isArray(e))return Q6(e)}function j9e(e){if(Array.isArray(e))return e}function R9e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function P7(e,t){if(e){if(typeof e=="string")return Q6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Q6(e,t)}}function Q6(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function I9e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 824In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function O9e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 825In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function P9e(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=P7(e))||t){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. 826In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s=!0,a=!1,o;return{s:function(){n=n.call(e)},n:function(){var c=n.next();return s=c.done,c},e:function(c){a=!0,o=c},f:function(){try{!s&&n.return!=null&&n.return()}finally{if(a)throw o}}}}function M9e(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kde(e){var t=M9e(e,"string");return typeof t=="symbol"?t:String(t)}var ay=Y.createContext({}),Nde=Y.createContext({}),jde=Y.createContext({}),D9e=Y.createContext(),Rde=Y.createContext(),Ide=Y.createContext(),Z6=Y.createContext(),CY=Y.createContext(),J6=Y.createContext(),Ode=Y.createContext(),Du=Y.createContext(),F9e=Y.createContext();function Wu(){var e=b.useContext(ay);return e}var L9e=function(t){var n=b.useRef(),r=b.useRef(!1),i=b.useRef(!1),s=b.useState(0),a=zs(s,2);a[0];var o=a[1];r.current&&(i.current=!0),b.useEffect(function(){return r.current||(n.current=t(),r.current=!0),o(function(c){return c+1}),function(){i.current&&n.current&&n.current()}},[])};function F2(e){var t=b.useRef(),n=b.useRef(!0),r=b.useState(e),i=zs(r,2),s=i[0],a=i[1];t.current=s;var o=function(d){t.current=d,n.current&&a(d)},c=function(){return t.current};return L9e(function(){return function(){n.current=!1}}
826),[s,o,c]}var Pde={};function z9e(e,t){for(var n=0,r=0;r<e.length;r++)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t[Math.abs(n)%t.length]}function $9e(e,t){var n=t.namespace;if(t.useColors){var r=t.color,i="\x1B[3"+(r<8?r:"8;5;"+r),s=" ".concat(i,";1m").concat(n," \x1B[0m");e[0]=s+e[0].split(` 827`).join(` 828`+s)}else e[0]=n+" "+e[0]}function B9e(e,t){if(e[0]=(t.useColors?"%c":"")+t.namespace,!!t.useColors){var n="color: "+t.color,r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,function(s){s!=="%%"&&(r++,s==="%c"&&(i=r))}),e.splice(i,0,n)}}var U9e=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function V9e(){var e;try{e=localStorage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=Pde.DEBUG),{namespaces:e||"",colors:U9e,useColors:!0,formatArgs:B9e}}function H9e(){return{namespaces:Pde.DEBUG||"",colors:[6,2,3,4,5,1],useColors:!0,formatArgs:$9e}}function Mde(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e&&r.unshift(e);var s=t.namespaces.split(",").map(function(a){return a[a.length-1]==="*"?new RegExp("^"+a.slice(0,a.length-1)+".*$"):new RegExp("^"+a+"$")});s.some(function(a){return a.test(e)}),z9e(e,t.colors),t.useColors}}function q9e(e){return Mde(e,H9e())}function TY(e){return Mde(e,V9e())}var xa=function(t){return typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?TY(t):typeof window<"u"&&typeof window.navigator<"u"&&window.navigator.product==="ReactNative"&&typeof global<"u"&&__DEV__===!0?(console.log("informed:debug: Detected React Native Environment"),process.type="renderer",(!window.localStorage||!window.localStorage.getItem)&&(window.localStorage={debug:global.DEBUG_INFORMED||"",getItem:function(){return global.DEBUG_INFORMED||""}}),TY(t)):q9e(t)},ya=xa("informed:ObjMap "),mk=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return String.prototype.replace.call(t,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean)},Hg=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=arguments.length>2?arguments[2]:void 0,i=String.prototype.replace.call(n,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce(function(s,a){return s!=null?s[a]:s},t);return i===void 0||i===t?r:i},W9e=function(t,n,r){var i=t[n],s=t[r];t[n]=s,t[r]=i},G9e=function(t,n,r){if(Array.isArray(t)&&n<t.length&&r<t.length){var i=t.splice(n,1)[0];t.splice(r,0,i)}else console.warn("Attempted to move from ".concat(n," to ").concat(r," but the operation is not valid."))},K9e=function(t,n,r){Array.isArray(t)&&n<=t.length?t.splice(n,0,r):console.warn("Attempted to insert at index ".concat(n,", but the operation is not valid."))},Dde=function(t){return".".concat(t).replace(/(.*)[.[].*/,"$1").replace(/\./,"")},Y9e=function(t){return t.replace(Dde(t),"").replace(/\./,"")},X9e=function(t,n){var r=Dde(n),i=Y9e(n),s=r?Hg(t,r):t;return!!(s&&Object.hasOwnProperty.call(s,i.replace(/\[(.*)\]/,"$1")))},AY=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=arguments.length>2?arguments[2]:void 0;String.prototype.replace.call(n,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce(function(i,s,a,o){var c=["__proto__","constructor","prototype"];if(c.includes(s))throw new Error("Dangerous property access blocked: ".concat(s));return a===o.length-1?(i[s]=r,i[s]):Sh(i[s])!=="object"?(Number.isInteger(+o[a+1])?i[s]=[]:i[s]={},i[s]):(Number.isInteger(+o[a+1])&&!Array.isArray(i[s])&&(i[s]=[]),i[s])},t)},Fde=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=!1;return String.prototype.replace.call(n,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(
828Boolean).reduce(function(i,s,a,o){return i===void 0?i:(a===o.length-1&&(delete i[s],r=!0),i[s])},t),r},Q9e=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r;return String.prototype.replace.call(n,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce(function(i,s,a,o){return i===void 0?i:(a===o.length-1&&Array.isArray(i)&&(r=i.splice(s,1)),i[s])},t),r},oP=function(t){var n=mk(t);return Number.isInteger(+n[n.length-1])},xt=(function(){function e(){Tde(this,e)}return Ade(e,null,[{key:"empty",value:function(n){for(var r in n)return!1;return!0}},{key:"get",value:function(n,r){var i=Hg(n,r);return i}},{key:"has",value:function(n,r){return X9e(n,r)}},{key:"set",value:function(n,r,i){if(i!==void 0)ya("Setting",r,i),AY(n,r,i);else if(oP(r)&&e.get(n,r)!==void 0){ya("Special case SETTING",r,"to undefined"),AY(n,r,void 0);var s=mk(r);s=s.slice(0,s.length-1),gk(n,s)}else!oP(r)&&e.get(n,r)!==void 0&&(ya("Special case REMOVING",r,"from object completley"),e.delete(n,r))}},{key:"delete",value:function(n,r){ya("DELETE",r),oP(r)?(ya("ARRAY PATH",r),this.pullOut(n,r)):Fde(n,r);var i=mk(r);i=i.slice(0,i.length-1),gk(n,i),ya("DELETED",r)}},{key:"pullOut",value:function(n,r){var i=mk(r),s=i[i.length-1];i=i.slice(0,i.length-1),ya("Pulling out:",i,"index",s);var a=Hg(n,i);ya("Array Before",JSON.stringify(a)),Array.isArray(a)&&Q9e(a,s),ya("Array After",JSON.stringify(a)),gk(n,i)}},{key:"purge",value:function(n){var r=Array.isArray(n)?[]:{};return Object.keys(n).forEach(function(i){Sh(n[i])==="object"?(r[i]=e.purge(n[i]),Object.keys(r[i]).length===0&&delete r[i]):n[i]!==void 0&&(r[i]=n[i])}),r}},{key:"swap",value:function(n,r,i,s){ya("Swaping out out: ".concat(r,", ").concat(i,", ").concat(s));var a=Hg(n,r);ya("Array",JSON.stringify(a)),Array.isArray(a)&&W9e(a,i,s)}},{key:"move",value:function(n,r,i,s){ya("Moving: ".concat(r,", from index ").concat(i," to ").concat(s));var a=Hg(n,r);ya("Array before move: ".concat(JSON.stringify(a))),G9e(a,i,s),ya("Array after move: ".concat(JSON.stringify(a)))}},{key:"insert",value:function(n,r,i,s){ya("Inserting: ".concat(s," at ").concat(r,", index ").concat(i));var a=Hg(n,r);ya("Array before insert: ".concat(JSON.stringify(a))),Array.isArray(a)?K9e(a,i,s):ya("Path ".concat(r," does not point to an array.")),ya("Array after insert: ".concat(JSON.stringify(a)))}}]),e})();function gk(e,t){if(t.length!==0){var n=Hg(e,t);(Array.isArray(n)?n.every(function(r){return r==null}):JSON.stringify(n)==="{}")&&Fde(e,t),gk(e,t.slice(0,t.length-1))}}var kY=xa("informed:utils "),yc=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=Math.random()*16|0,r=t=="x"?n:n&3|8;return r.toString(16)})};function NY(e){var t=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:300,r={};return function(){for(var i=arguments.length,s=new Array(i),a=0;a<i;a++)s[a]=arguments[a];var o=s[0];clearTimeout(r[o]),r[o]=setTimeout(function(){e.apply(t,s)},n)}}var $N=function(t,n){return n.startsWith("".concat(t,"."))||n.startsWith("".concat(t,"["))},Z9e=function(t){var n=t.fieldType,r=t.setValue,i=t.multiple,s=t.ref,a=function(c){return r(c)};return(n==="text"||n==="textArea"||n==="number")&&(a=function(c){r(c.target.value,c)}),n==="select"&&(a=function(c){var u=Array.from(s.current).filter(function(d){return d.selected}).map(function(d){return d.value});r(i?u:u[0]||"",c)}),n==="checkbox"&&(a=function(c){r(c.target.checked,c)}),function(o){a(o)}},J9e=function(t){var n=t.setTouched;return function(r){n(!0,r)}},e7e=function(t){var n=t.setFocused;return function(r){n(!0,r)}},t7e=function(t){var n=t.fieldType,r=t.maskedValue,i=t.multiple,s=t.value;switch(n){case"text":case"number":return!r&&r!==0?"":r;case"textArea":return r||"";case"select":return s||(i?[]:"");case"checkbox":return!!s;default:return s}},lP=function e(t){return t&&(Object.keys(t).forEach(function(n){return t[n]&&Sh(t[n])==="object"&&e(t[n])||t[n]===void 0&&delete t[n]}),t)},n7e=function(t){var n={};if(t.inner){if(t.inner.length===0){xt.set(n,t.path,t.message);return}var r=P9e(t.inner),i;try{for(r.s();!(i=r.n()).done;){var s=i.value;xt.get(n,s.path)||xt.set(n,s.path,s.message)}}catch(a){r.e(a)}finally{r.f()}}return n},r7e=function(t,n){try{t.validateSync(n,{abortEarly:!1})}catch(i){var r=n7e(i);return r}},i7e=function(t){if(t.inner){if(t.inner.length===0)return;var n=t.inner[0];return n.message}},e8=function(t,n){try{t.validateSync(n,{abortEarly:!1})}catch(r){return i7e(r)}},s7e=function(t,n){t(n);var r={};
828return t.errors&&t.errors.forEach(function(i){var s=i.message,a=i.dataPath,o=i.keyword,c=i.params,u=a;o==="required"&&(u="".concat(u,".").concat(c.missingProperty)),u=u.replace(".",""),xt.set(r,u,s)}),r},a7e=function(t,n,r,i){if(n&&(t==null||t===""||Array.isArray(t)&&t.length==0))return typeof n=="string"?n:r("required")||"This field is required";if(i&&!t)return typeof i=="string"?i:r("noFalsy")||"This field is required"},o7e=function(t,n,r){if(n!=null&&t>n)return r("maximum")||"This field should NOT be more than ".concat(n)},l7e=function(t,n,r){if(n!=null&&t<n)return r("minimum")||"This field should NOT be less than ".concat(n)},c7e=function(t,n,r){if(n!=null&&t?.length>n)return r("maxLength")||"This field should NOT be more than ".concat(n," characters")},u7e=function(t,n,r){if(n!=null&&t?.length<n)return r("minLength")||"This field should NOT be shorter than ".concat(n," characters")},d7e=function(t,n,r){if(n!=null&&!new RegExp(n).test(t)&&t)return r("pattern")||'This field should match pattern "'.concat(n,'";')},f7e=function(t,n,r){var i=r.required,s=r.noFalsy,a=r.minimum,o=r.maximum,c=r.minLength,u=r.maxLength,d=r.pattern,h=r.getErrorMessage,p=r.validateModified,g=r.fieldApi,v=r.formController,x=r.scope,_=r.name;return function(w,S){var E;if(!(p&&g.getModified()===void 0))return(i||s)&&(E=a7e(w,i,h,s),E!==void 0)||a!=null&&(E=l7e(w,a,h),E!==void 0)||o!=null&&(E=o7e(w,o,h),E!==void 0)||c!=null&&(E=u7e(w,c,h),E!==void 0)||u!=null&&(E=c7e(w,u,h),E!==void 0)||d&&(E=d7e(w,d,h),E!==void 0)||n&&(E=e8(n,w),E!==void 0)||t.current&&(E=t.current(w,S,{formState:v.getFormState(),formApi:v.getFormApi(),scope:x,name:_}),E!==void 0),E}},jY=function(t){return t.split("").map(function(n){return n==="#"?/\d/:n==="*"?/[\w]/:n})},h7e=function(t,n,r){if(typeof t=="string")return jY(t);if(typeof t=="function"){var i=t(n,r);return typeof i=="string"?jY(i):i}if(Array.isArray(t))return t;throw new Error("Formatter must be string, array, or function")},p7e=function(t,n){for(var r=0,i=-1,s=!0;s&&r<t.length;)t[r]==n[r]?i=r:s=!1,r=r+1;return i},cP=function(t,n){if(Sh(n)==="object"&&!Array.isArray(n)){var r={};return Object.keys(t).forEach(function(i){if(n[i]){var s=n[i](t[i]);r[i]=s}else r[i]=t[i]}),r}return n(t)},M7=function(t,n,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"ltr";if(Sh(n)==="object"&&!Array.isArray(n)){var s={},a={};return Object.keys(t).forEach(function(o){if(n[o]){var c=RY(t[o],n[o],r?r[t]:void 0,t,i),u=c.value,d=c.offset;s[o]=u,a[o]=d}else s[o]=t[o],a[o]=0}),{value:s,offset:a}}return RY(t,n,r,t,i)},RY=function(t,n,r,i,s){if(kY("Formatting",t),kY("Full Value",i),t==null)return{value:t,offset:0};var a="".concat(t),o=h7e(n,a,i),c=o.findIndex(function(j){return typeof j!="string"}),u=null;typeof o[o.length-1]=="string"&&(u=o.length-Mo(o).reverse().findIndex(function(j){return typeof j!="string"}));var d=[],h=a.split(""),p=0,g=0,v=p7e(o.slice(0,c),h.slice(0,c));v>-1&&(p=v+1,d=d.concat(o.slice(0,v+1)),g=v+1),v<0&&(d=d.concat(o.slice(0,c)),g=c);for(var x=g;x<o.length;x++){var _=o[x];if(p!=h.length){var w=h[p];if(typeof _=="function")d.push(_(w)),p=p+1;else{var S=typeof _=="string"?_===w:_.test(w);S&&typeof _=="string"?(d.push(_),p=p+1):!S&&typeof _=="string"?p!=h.length&&d.push(_):S&&typeof _!="string"?(d.push(w),p=p+1):!S&&typeof _!="string"&&(p=p+1,x=x-1)}}else if(typeof _=="string"&&u&&x>=u)d.push(_);else break}var E=d.join(""),T=a?E.length-a.length:0,N=u&&a&&r&&a.length<r.length&&a.length>=u&&s!="rtl",A=o.slice(u).join(""),k=u&&d.length>u&&(!r||typeof r=="string"&&!r.includes(A));return(N||k)&&(T=0,s=="rtl"&&(T=1),typeof navigator<"u"&&navigator.product==="ReactNative"&&a&&r&&a.length<r.length&&(E=E.slice(0,u))),{value:E,offset:T}},Lde=function(t){var n=t.replace(/\./g,".properties.").replace(/\[\d+\]/g,".items");return n="properties.".concat(n),n},uP=function(t,n,r){var i=n["ui:control"],s=n["ui:props"],a=n["ui:before"],o=n["ui:after"],c=n.oneOf,u=n.items,d=n.enum,h=n.title,p=n.minimum,g=n.maximum,v=n.minLength,x=n.maxLength,_=n.pattern,w=n.required,S=n.type,E=n.properties,T=n.allOf,N=n.propertyOrder,A=n.errorMessage,k=yc();s&&s.id&&(k=s.id);var j={componentType:i??S,name:r?"".concat(r,".").concat(t):t,type:S,uiBefore:a,uiAfter:o,properties:S==="object"?E:void 0,allOf:S==="object"?T:void 0,propertyOrder:S==="object"?N:void 0,items:S==="array"?u:void 0,propertyName:t,required:w,props:fr({label:h,id:k,minimum:p,maximum:g,minLength:v,maxLength:x,pattern:_,errorMessage:A,required:w},s)};if(c){var R=n.oneOf.map(function(U){var G=U["ui:props"],Q=G===void 0?{}:G;return fr({value:U.const,label:U.title},Q)});j.props.options=R}if(d){var P=n.enum.map(function(U){return{value:U,label:U}});j.props.options=P}if(u&&u.oneOf){var V=u.oneOf.map(function(U){var G=U["ui:props"],Q=G===void 0?{}:G;return fr({value:U.const,label:U.title},Q)});j.props.options=V}return j},m7e=function(t,n){if(!t||n)return{properties:[],conditions:[],components:[]};var r=t.properties,i=r===void 0?{}:r,s=t.allOf,a=t.propertyOrder,o=a===void 0?[]:a;if(Object.keys(i).length>0){var c=Object.keys(i).sort(function(h,p){var g=o.indexOf(h),v=o.indexOf(p);return(g>-1?g:o.length+1)-(v>-1?v:o.length+1)}).map(function(h){return h}),u=[],d=[];
828return s&&s.forEach(function(h){if(h.if){var p=fr({},h);p.then=fr(fr({},h.then),{},{properties:{}}),p.thenProps={},Object.keys(h.then.properties).forEach(function(g){c.includes(g)?p.thenProps[g]=h.then.properties[g]:p.then.properties[g]=h.then.properties[g]}),u.push(p)}else d.push(h)}),{properties:c,conditions:u,components:d}}return{properties:[],conditions:[],components:[]}};function zde(e,t){return Object.entries(e).every(function(n){var r=zs(n,2),i=r[0],s=r[1];switch(i){case"const":return Array.isArray(t)&&s?t.sort().toString()==s.sort().toString():t===s;case"minimum":return t>=s;case"exclusiveMinimum":return t>s;case"maximum":return t<=s;case"exclusiveMaximum":return t<s;case"enum":return Array.isArray(s)&&!Array.isArray(t)?s.includes(t):Array.isArray(s)&&Array.isArray(t)?t.every(function(a){return s.includes(a)}):!1;case"oneOf":return Array.isArray(s)&&!Array.isArray(t)?s.includes(t):Array.isArray(s)&&Array.isArray(t)?s.find(function(a){return t.includes(a)}):!1;case"pattern":return new RegExp(s).test(t);case"not":if(Sh(s)==="object"&&s.enum){if(Array.isArray(s.enum)&&!Array.isArray(t))return!s.enum.includes(t);if(Array.isArray(s.enum)&&Array.isArray(t))return!t.every(function(a){return s.enum.includes(a)})}return t!==s;default:return!1}})}function g7e(){var e=b.useContext(Du),t=b.useCallback(function(n){return e===n?n:e&&n?"".concat(e,".").concat(n):n},[e]);return t}var QT=xa("informed:useFieldSubscription "),L2=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,a=g7e(),o=b.useContext(Du),c=typeof n=="function"?[]:n,u=b.useMemo(function(){return typeof n=="function"?n(o):n},[].concat(Mo(c),[a])),d=b.useMemo(function(){return i&&typeof n!="function"?u.map(function(p){return a(p)}):u},[u]),h=Wu();b.useEffect(function(){var p=function(v,x){QT("target: ".concat(v,", triggers: ").concat(x)),(v==="_ALL_"||d.includes(v)||v&&d.some(function(_){return s?$N(v,_):$N(_,v)}))&&(QT("subscription ".concat(t," triggered with target ").concat(v," from trigger ").concat(x," for"),d),r(v,x))};return h.emitter.on(t,p),d.length&&QT("Adding subscription on event ".concat(t,", subscribing to events from ").concat(d)),function(){d.length&&QT("Removing subscription on event ".concat(t,", un-subscribing to events from ").concat(d)),h.emitter.removeListener(t,p)}},Mo(c))},_v=xa("informed:useRelevance "),$de=function(t){var n=t.name,r=t.relevant,i=t.relevanceWhen,s=i===void 0?[]:i,a=t.relevanceDeps,o=a===void 0?[]:a,c=Wu(),u=b.useContext(Du),d=b.useRef(u);d.current=u;var h=b.useRef();h.current=o;var p=F2(function(){return r?(_v("re-evaluated relevance for ".concat(n," for the first inital load")),r({formState:c.getFormState(),formApi:c.getFormApi(),scope:u,relevanceDeps:o})):!0}),g=zs(p,3),v=g[0],x=g[1],_=g[2],w=typeof s=="function"?[]:s,S=b.useMemo(function(){return typeof s=="function"?s(u):s},[].concat(Mo(w),[u]));return L2("field-value",S,function(E){_v("re-evaluating relevance for ".concat(n," because of ").concat(E));var T=r({formState:c.getFormState(),formApi:c.getFormApi(),scope:d.current,relevanceDeps:h.current});_()!=T&&x(T)},typeof s!="function"),b.useEffect(function(){if(r&&typeof s!="function"&&s.length===0){var E=function(N){_v("re-evaluating relevance for ".concat(n," because of ").concat(N));var A=r({formState:c.getFormState(),formApi:c.getFormApi(),scope:d.current,relevanceDeps:h.current});_v("re-evaluated relevance for ".concat(n," because of ").concat(N," and got ").concat(A)),_()!=A&&(_v("updating relevance for ".concat(n," because of ").concat(N," and got ").concat(A)),x(A))};return c.emitter.on("field",E),function(){c.emitter.removeListener("field",E)}}},[]),b.useEffect(function(){r&&(_v("re-evaluated relevance for ".concat(n," because name change or relevanceDeps")),x(r({formState:c.getFormState(),formApi:c.getFormApi(),scope:d.current,relevanceDeps:h.current})))},[n].concat(Mo(o))),v}
828,_5=function(t){var n=t.when,r=t.relevanceWhen,i=t.relevanceDeps,s=t.children,a=Wu(),o=b.useContext(Du),c=b.useContext(J6),u=$de({relevant:n,relevanceWhen:r,relevanceDeps:i}),d=b.useMemo(function(){return{isRelevant:u,relevant:function(){return c&&!c.relevant()?!1:n({formState:a.getFormState(),formApi:a.getFormApi(),scope:o,relevanceDeps:i})}}},[u,o,i]);return Y.createElement(J6.Provider,{value:d},u?s:null)};function Bh(){var e=b.useContext(Nde);return e}function zy(e){var t=b.useContext(Du);return t===e?e:t&&e?"".concat(t,".").concat(e):e||t}var x7e=function(t,n){return{getValue:function(){return t.getValue(n)},setValue:function(i,s,a){return t.setValue(n,i,s,a)},getTouched:function(){return t.getTouched(n)},setTouched:function(i,s){return t.setTouched(n,i,s)},getError:function(){return t.getError(n)},setError:function(i){return t.setError(n,i)},getFocused:function(){return t.getFocused(n)},setFocused:function(i,s){return t.setFocused(n,i,s)},getData:function(){return t.getData(n)},getModified:function(){return t.getModified(n)},reset:function(i){return t.resetField(n,i)},validate:function(){return t.validateField(n)},getDirty:function(){return t.getDirty(n)},getPristine:function(){return t.getPristine(n)},getMaskedValue:function(){return t.getMaskedValue(n)},clearValue:function(){return t.clearValue(n)},setValueQuietly:function(i){return t.setValueQuietly(n,i)},restore:function(i){return t.restore(n,i)},getMemory:function(){return t.getMemory(n)}}};function hE(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=Bh(),r=t?zy(e):e,i=b.useMemo(function(){return x7e(n,r)},[r]);return i}var Eg=xa("informed:useArrayField "),v7e=function(t){var n=t.name,r=t.initialValue,i=t.defaultValue,s=t.arrayFieldApiRef,a=zy(n),o=b.useContext(ay),c=hE(a),u=Bh(),d=b.useRef(!1),h=b.useState(function(){return new Map}),p=zs(h,1),g=p[0],v=F2(function(){return o.getValue(a)?o.getValue(a):r||o.getInitialValue(a)||i||[]}),x=zs(v,3),_=x[0],w=x[1],S=x[2],E=Array.isArray(_)?_.map(function(){return yc()}):[],T=F2(E),N=zs(T,3),A=N[0],k=N[1],j=N[2],R=function(J){var W=j();o.lockRemoval({index:W.length-1,name:a});var re=W.slice(0,J).concat(W.slice(J+1,W.length));k(re);var ae=S(),ce=ae.slice(0,J).concat(ae.slice(J+1,ae.length));w(ce),o.pullOut("".concat(a,"[").concat(J,"]")),u.setDirt(a,[]),o.emitter.emit("field-value-set",a)},P=function(J,W){Eg("Swapping","".concat(a,"[").concat(J,"] and ").concat(a,"[").concat(W,"]")),o.swap(a,J,W);var re=j(),ae=Mo(re);re[J]&&re[W]?(ae[J]=re[W],ae[W]=re[J]):console.warn("Attempted to swap ".concat(J," with ").concat(W," but one of them does not exist :(")),k(ae)},V=function(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,W=j();if(typeof J!="number"||!Number(J)||J<=0)W.push(yc());else for(var re=0;re<J;re++)W.push(yc());k(Mo(W)),u.setPristine(!1),u.setDirt(a,[]),o.emitter.emit("field-value-set",a)},U=function(J){var W=j();W.push(yc()),k(Mo(W));var re=Mo(S());re[W.length-1]=J,w(re)},G=function(J,W){Eg("Inserting at index ".concat(J," in ").concat(a," with value"),W),o.insert(a,J,W);var re=j(),ae=Mo(re);ae.splice(J,0,yc()),k(ae);var ce=S(),Te=Mo(ce);Te.splice(J,0,W),w(Te)},Q=b.useRef();Q.current=r;var Z=b.useRef();Z.current=i;var K=function(){Eg("------------ ".concat(a," Array Field Reset Start ------------")),d.current=!0,o.remove(a);var J=Q.current||o.getInitialValue(a)||Z.current||[];if(w(J),k([]),!g.size&&d.current){d.current=!1,Eg("------------ ".concat(a," Array Field Reset End ------------"));var W=S(),re=W?W.map(function(){return yc()}):[];k(re)}},te=function(){o.remove(a),w([]),k([])},ne={name:a,initialValue:r,fieldApi:fr(fr({},c),{},{reset:K}),arrayField:!0},se=b.useRef(ne);se.current=ne,b.useEffect(function(){return o.register(a,se),function(){o.deregister(a)}},[a]);var H=A.map(function(X,J){var W={remove:function(){return R(J)}},re={initialValue:_&&_[J],key:X,name:"".concat(a,"[").concat(J,"]"),index:J,parent:a};return{arrayFieldItemApi:W,arrayFieldItemState:re}}),O=b.useMemo(function(){return{add:V,remove:R,swap:P,addWithInitialValue:U,insert:G,reset:K,
828clear:te}},[]);s&&(s.current=O);var L={fields:H,name:a},M=b.useMemo(function(){return fr(fr({},o),{},{register:function(J,W){g.set(J,W),o.register(J,W)},deregister:function(J){if(o.deregister(J),g.delete(J),!g.size&&d.current){d.current=!1,Eg("------------ ".concat(a," Array Field Reset End ------------"));var W=S(),re=W?W.map(function(){return yc()}):[];k(re)}},getInitialValue:function(J){var W=J.replace(/(\[[0-9]+\])[^[\]]*$/,"");if(W===a){var re=J.replace(a,""),ae=xt.get(S(),re);return Eg("Getting initial value for ".concat(re," which is ").concat(ae)),ae}return o.getInitialValue(J)}})},[a]);L2("clear",[a],function(X){Eg("clear event triggered for ".concat(a," because of ").concat(X)),te()},!1,!0);var q=function(J){return Y.createElement(ay.Provider,{value:M},Y.createElement(Ide.Provider,{value:O},Y.createElement(Rde.Provider,{value:L},J)))};return{render:q,arrayFieldState:L,arrayFieldApi:O}},y7e=function(){var t=Y.useState(),n=zs(t,2),r=n[1],i=Y.useCallback(function(){return r({})},[]);return i},b7e=xa("informed:useFieldState "),fs=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=n?zy(t):t,i=Wu(),s=y7e();return b.useEffect(function(){var a=function(c){(c==="_ALL_"||c===r||c&&$N(r,c))&&(b7e("Updating",r),s())};return i.emitter.on("field",a),s(),function(){i.emitter.removeListener("field",a)}},[r]),i.getFieldState(r)},_7e=function(t,n){return{getValue:function(i){return n.getValue("".concat(t,".").concat(i))},setValue:function(i,s,a,o){return n.setValue("".concat(t,".").concat(i),s,a,o)},getTouched:function(i){return n.getTouched("".concat(t,".").concat(i))},setTouched:function(i,s){return n.setTouched("".concat(t,".").concat(i),s)},getFocused:function(i){return n.getFocused("".concat(t,".").concat(i))},setFocused:function(i,s){return n.setFocused("".concat(t,".").concat(i),s)},getError:function(i){return n.getError("".concat(t,".").concat(i))},setError:function(i,s){return n.setError("".concat(t,".").concat(i),s)},getData:function(i){return n.getData("".concat(t,".").concat(i))},getModified:function(i){return n.getModified("".concat(t,".").concat(i))},resetField:function(i){return n.resetField("".concat(t,".").concat(i))},validate:function(i){return n.validate("".concat(t,".").concat(i))},getDirty:function(i){return n.getDirty("".concat(t,".").concat(i))},getPristine:function(i){return n.getPristine("".concat(t,".").concat(i))},getMaskedValue:function(i){return n.getMaskedValue("".concat(t,".").concat(i))},clearValue:function(i){return n.clearValue("".concat(t,".").concat(i))},clearError:function(i){return n.clearError("".concat(t,".").concat(i))},restore:function(i){return n.restore("".concat(t,".").concat(i))}}};function w7e(e){var t=Bh(),n=b.useMemo(function(){return _7e(e,t)},[e]);return n}var S7e=["relevant","relevanceWhen","relevanceDeps","name"],E7e=["children"],IY=xa("informed:ArrayField "),z2=function(t){var n=t.relevant,r=t.relevanceWhen,i=t.relevanceDeps,s=t.name,a=qu(t,S7e);return n?Y.createElement(_5,{when:n,relevanceWhen:r,relevanceDeps:i},Y.createElement(OY,Ya({name:s},a))):Y.createElement(OY,Ya({name:s},a))},OY=function(t){var n=t.children,r=qu(t,E7e),i=v7e(r),s=i.render,a=i.arrayFieldState,o=i.arrayFieldApi;return s(typeof n=="function"?n(fr(fr({arrayFieldApi:o,arrayFieldState:a},o),a)):n)},C7e=function(t){var n=t.arrayFieldItemState,r=t.arrayFieldItemApi,i=t.children,s=Wu(),a=b.useState(function(){return new Map}),o=zs(a,1),c=o[0],u=fs(n.name),d=w7e(n.name),h=b.useMemo(function(){return fr(fr({},s),{},{register:function(_,w){c.set(_,w),s.register(_,w)},deregister:function(_,w){c.delete(_),s.deregister(_,w);var S=s.getRemovalLocked();IY("DEREGISTER",_,"SIZE",c.size,"INDEX",n.index,"LOCKEDUNTIL",S),S!=null&&S.index===n.index&&S.name===n.parent&&!Array.from(c.keys()).some(function(E){return E.includes("".concat(n.parent,"[").concat(S.index,"]"))})&&(IY("UNLOCKING"),s.unlockRemoval())}})},[n.index]),p=b.useCallback(function(){c.forEach(function(x){x.current.fieldApi.reset()})},[n.name,n.index]),g=fr(fr({},n),{},{values:u.value,errors:u.error,touched:u.touched}),v=b.useMemo(function(){return fr(fr(fr({},r),d),{},{reset:p})},[n.name,n.index]);return typeof i=="function"?Y.createElement(ay.Provider,{value:h},Y.createElement(Z6.Provider,{value:v},Y.createElement(CY.Provider,{value:g},Y.createElement(Du.Provider,{value:n.name},i(fr(fr({},v),{},{name:n.name,index:n.index})))))):Y.createElement(ay.Provider,{value:h},Y.createElement(Z6.Provider,{value:r},Y.createElement(CY.Provider,{value:n},Y.createElement(Du.Provider,{value:n.name},i))))};z2.Items=function(e){var t=e.children,n=b.useContext(Rde),r=n.fields;return r.map(function(i){var s=i.arrayFieldItemState,a=i.arrayFieldItemApi,o=s.key;return Y.createElement(C7e,{key:o,arrayFieldItemApi:a,arrayFieldItemState:s},t)}
828)};z2.Items.displayName="ArrayField.Items";function T7e(){var e=b.useContext(jde);return e}var t8=function(t){var n=t.scope,r=t.children,i=b.useContext(Du),s;return i?s="".concat(i,".").concat(n):s=n,Y.createElement(Du.Provider,{value:s},r)},gt=xa("informed:FormController "),ZT=function(t,n){var r=n.formatter,i=n.parser,s=n.initialize,a=n.mask;if(t!=null){if(s&&!i)return s(t);if(r&&!i){var o=M7(t,r);return o.value}return a&&!i?a(t):t}},JT=function(t,n){var r=n.formatter,i=n.initialize,s=n.mask;if(i)return i(t);if(r){var a=M7(t,r);return a.value}return s?s(t):t},A7e=(function(){function e(t){var n;Tde(this,e),this.options=t,this.subscriptions=new Map;var r=t.current,i=r.ajv,s=r.schema,a=r.fieldMap,o=r.adapter;this.ajv=i?new i({allErrors:!0}):null,this.ajvValidate=i?this.ajv.compile(s):null,this.fieldMap=o||a,this.emitter=this,this.fieldsMap=new Map,this.validationRequests=new Map,this.dataRequests=new Map,this.removalLocked=void 0,this.state={pristine:!0,dirty:!1,submitted:!1,invalid:!1,valid:!0,submitting:!1,validating:0,gathering:0,values:{},errors:{},touched:{},maskedValues:{},dirt:{},focused:{},modified:{},data:{},initialValues:this.options.current.initialValues||{},disabled:(n=this.options.current.disabled)!==null&&n!==void 0?n:!1,memory:{}},this.getValue=this.getValue.bind(this),this.setValue=this.setValue.bind(this),this.setValueQuietly=this.setValueQuietly.bind(this),this.setValues=this.setValues.bind(this),this.setTheseValues=this.setTheseValues.bind(this),this.resetPath=this.resetPath.bind(this),this.getMaskedValue=this.getMaskedValue.bind(this),this.setMaskedValue=this.setMaskedValue.bind(this),this.setModifiedValue=this.setModifiedValue.bind(this),this.getTouched=this.getTouched.bind(this),this.setTouched=this.setTouched.bind(this),this.getFocused=this.getFocused.bind(this),this.setFocused=this.setFocused.bind(this),this.getError=this.getError.bind(this),this.setError=this.setError.bind(this),this.reset=this.reset.bind(this),this.validate=this.validate.bind(this),this.asyncValidate=this.asyncValidate.bind(this),this.getDirty=this.getDirty.bind(this),this.setDirt=this.setDirt.bind(this),this.getPristine=this.getPristine.bind(this),this.getFormState=this.getFormState.bind(this),this.getFormApi=this.getFormApi.bind(this),this.getFieldState=this.getFieldState.bind(this),this.getValid=this.getValid.bind(this),this.on=this.on.bind(this),this.emit=this.emit.bind(this),this.removeListener=this.removeListener.bind(this),this.remove=this.remove.bind(this),this.swap=this.swap.bind(this),this.insert=this.insert.bind(this),this.pullOut=this.pullOut.bind(this),this.register=this.register.bind(this),this.deregister=this.deregister.bind(this),this.getInitialValue=this.getInitialValue.bind(this),this.initialize=this.initialize.bind(this),this.reformat=this.reformat.bind(this),this.lockRemoval=this.lockRemoval.bind(this),this.unlockRemoval=this.unlockRemoval.bind(this),this.resetField=this.resetField.bind(this),this.getRemovalLocked=this.getRemovalLocked.bind(this),this.isRemovalLocked=this.isRemovalLocked.bind(this),this.submitForm=this.submitForm.bind(this),this.touchAllFields=this.touchAllFields.bind(this),this.keyDown=this.keyDown.bind(this),this.validateAsync=this.validateAsync.bind(this),this.gatherData=this.gatherData.bind(this),this.validated=this.validated.bind(this),this.debouncedValidateAsync=NY(this.validateAsync,this.options.current.debounceError),this.debouncedGatherInfo=NY(this.gatherData,this.options.current.debounceGather),this.getOptions=this.getOptions.bind(this),this.validateField=this.validateField.bind(this),this.getErrorMessage=this.getErrorMessage.bind(this),this.clearValue=this.clearValue.bind(this),this.clearAllValues=this.clearAllValues.bind(this),this.clearError=this.clearError.bind(this),this.clearAllErrors=this.clearAllErrors.bind(this),this.getData=this.getData.bind(this),this.setData=this.setData.bind(this),this.getModified=this.getModified.bind(this),this.updateValid=this.updateValid.bind(this),this.focusFirstError=this.focusFirstError.bind(this),this.scrollToFirstError=this.scrollToFirstError.bind(this),this.setPristine=this.setPristine.bind(this),this.disableForm=this.disableForm.bind(this),this.enableForm=this.enableForm.bind(this),this.getMemory=this.getMemory.bind(this),this.restore=this.restore.bind(this),this.fieldExists=this.fieldExists.bind(this)}return Ade(e,[{key:"getOptions",value:function(){return this.options.current}},{key:"getMemory",value:function(n){return xt.get(this.state.memory,n)}},{key:"getValue",value:function(n){return xt.get(this.state.values,n)}},{key:"getMaskedValue",value:function(n){return xt.get(this.state.maskedValues,n)}},{key:"fieldExists",value:function(n){return!!this.fieldsMap.get(n)}},{key:"setMaskedValue",value:function(n,r){return xt.set(this.state.maskedValues,n,r)}},{key:"setModifiedValue",value:function(n,r){return xt.set(this.state.modified,n,r)}}
828,{key:"updateValid",value:function(){var n=this.state.valid;this.state.valid=xt.empty(this.state.errors),this.state.invalid=!this.state.valid,n&&!this.state.valid&&this.emit("invalid"),!n&&this.state.valid&&this.emit("valid")}},{key:"setValues",value:function(n){this.fieldsMap.forEach(function(r){var i=xt.get(n,r.current.name);r.current.fieldApi.setValue(i)})}},{key:"disableForm",value:function(){this.disabled=!0,this.state.disabled=!0,this.emit("field","_ALL_")}},{key:"enableForm",value:function(){this.disabled=void 0,this.state.disabled=!1,this.emit("field","_ALL_")}},{key:"setTheseValues",value:function(n){this.fieldsMap.forEach(function(r){var i=xt.get(n,r.current.name);i!=null&&r.current.fieldApi.setValue(i)})}},{key:"resetPath",value:function(n){this.fieldsMap.forEach(function(r){$N(n,r.current.name)&&r.current.fieldApi.reset()})}},{key:"restore",value:function(n){this.setValue(n,this.getMemory(n))}},{key:"setValueQuietly",value:function(n,r){this.setValue(n,r,void 0,void 0,!0)}},{key:"setValue",value:function(n,r,i,s,a){var o;gt("setValue ".concat(n),r);var c=i&&Sh(i)==="object"&&i.triggers;if(c&&i.triggers.includes(n)){gt("NOT setting ".concat(n," as it exists in the transitive path ").concat(JSON.stringify(i.triggers,null,2)));return}var u=((o=this.fieldsMap.get(n))===null||o===void 0?void 0:o.current)||{};try{i&&i.target&&i.target.selectionStart&&u.setCursor(i.target.selectionStart,s)}catch(N){if(!(N instanceof TypeError))throw N}var d=this.getValue(n);if(r==="")if(u.allowEmptyString){var h=u?.type==="number"?0:r;u.emptyValue&&(h=u.emptyValue),gt("Setting ".concat(n,"'s value to ").concat(h," because allowEmptyString is set")),xt.set(this.state.values,n,h),u.getInitialValue&&u.getInitialValue()!=h?xt.set(this.state.modified,n,h):(gt("Removing ".concat(n,"'s modified")),xt.delete(this.state.modified,h)),xt.set(this.state.maskedValues,n,r)}else gt("Setting ".concat(n,"'s value to undefiend")),xt.set(this.state.values,n,void 0),xt.set(this.state.modified,n,void 0),xt.set(this.state.maskedValues,n,void 0);else if(u?.type==="number"&&r!==void 0){var p=r,g=r;u.mask&&!u.maskOnBlur&&(g=u.mask(p)),u.parser&&(p=p!=null?cP(p,u.parser):p),gt("Setting ".concat(n,"'s value to ").concat(+p)),xt.set(this.state.values,n,+p),u.getInitialValue&&u.getInitialValue()!=p||u.modifyOnMount?xt.set(this.state.modified,n,+p):(gt("Removing ".concat(n,"'s modified")),xt.set(this.state.modified,n,void 0)),gt("Setting ".concat(n,"'s maskedValue to"),+g),xt.set(this.state.maskedValues,n,+g)}else{var v=r,x=r;if(u.clean&&(v=u.clean(v),x=v),u.formatter){var _=M7(v,u.formatter,this.getMaskedValue(n),u.dir);u.setCursorOffset(_.offset,s),x=_.value,v=x}u.mask&&!u.maskOnBlur&&(v=u.mask(v),x=v),u.parser&&(v=v!=null?cP(v,u.parser):v),gt("Setting ".concat(n,"'s value to"),v),xt.set(this.state.values,n,v),!u.getInitialValue||u.getInitialValue()!=v||u.modifyOnMount?(gt("Setting ".concat(n,"'s modified to"),v),xt.set(this.state.modified,n,v)):(gt("Removing ".concat(n,"'s modified")),xt.set(this.state.modified,n,void 0)),gt("Setting ".concat(n,"'s maskedValue to"),x),xt.set(this.state.maskedValues,n,x)}if(u.validate&&u.validateOn.includes("change")){var w=xt.get(this.state.values,n);gt("Validating after change ".concat(n," ").concat(w)),xt.set(this.state.errors,n,u.validate(w,this.state.values))}if(u.yupSchema&&u.validateOn.includes("change")&&this.getError(n)===void 0){var S=xt.get(this.state.values,n);gt("Validating YUP after change ".concat(n," ").concat(S)),xt.set(this.state.errors,n,e8(u.yupSchema,S))}if(u.asyncValidate&&u.validateOn==="change"&&this.getError(n)===void 0&&this.debouncedValidateAsync(n),a||(this.state.pristine=!1,this.state.dirty=!this.state.pristine,xt.set(this.state.dirt,n,!0)),this.updateValid(),u.onChange){var E=this.getFieldState(n);E.previousValue=d,u.onChange(E,i)}if(i&&u.onNativeChange){var T=this.getFieldState(n);T.previousValue=d,u.onNativeChange(T,i)}c?this.emit("field-native",n,[].concat(Mo(i.triggers),[n])):i&&this.emit("field-native",n,[n]),u.gatherData&&!u.gatherOnBlur&&this.debouncedGatherInfo(n),this.emit("field",n),this.emit
828("field-value",n),this.emit("field-modified",n),this.emit("field-value-set",n)}},{key:"validateField",value:function(n){var r,i=(r=this.fieldsMap.get(n))===null||r===void 0?void 0:r.current;if(i){if(i.validate){var s=xt.get(this.state.values,n);gt("Validating field ".concat(n," via validateField with value ").concat(s)),xt.set(this.state.errors,n,i.validate(s,this.state.values))}if(i.yupSchema&&this.getError(n)===void 0){var a=xt.get(this.state.values,n);gt("Validating YUP field via validateField ".concat(n," ").concat(a)),xt.set(this.state.errors,n,e8(i.yupSchema,a))}this.updateValid(),this.emit("field",n)}}},{key:"getModified",value:function(n){return xt.get(this.state.modified,n)}},{key:"getFocused",value:function(n){return xt.get(this.state.focused,n)}},{key:"setFocused",value:function(n,r,i){var s;gt("Setting ".concat(n,"'s focused to ").concat(r));var a=((s=this.fieldsMap.get(n))===null||s===void 0?void 0:s.current)||{};if(xt.set(this.state.focused,n,r),a.onFocus){var o=this.getFieldState(n);a.onFocus(o,i)}this.emit("field",n)}},{key:"getTouched",value:function(n){return xt.get(this.state.touched,n)}},{key:"setTouched",value:function(n,r,i){var s;gt("Setting ".concat(n,"'s touched to ").concat(r));var a=((s=this.fieldsMap.get(n))===null||s===void 0?void 0:s.current)||{};if(xt.set(this.state.touched,n,r),a.mask&&a.maskOnBlur){var o=xt.get(this.state.values,n),c=o;c=a.mask(o),a.parser&&(o=o!=null?cP(o,a.parser):o),gt("Setting ".concat(n,"'s value to"),c),xt.set(this.state.values,n,c),gt("Setting ".concat(n,"'s maskedValue to"),c),xt.set(this.state.maskedValues,n,c)}if(a.validate&&(a.validateOn.includes("blur")||a.validateOn.includes("change"))){var u=xt.get(this.state.values,n);gt("Validating after blur ".concat(n," ").concat(u)),xt.set(this.state.errors,n,a.validate(u,this.state.values))}if(a.asyncValidate&&(a.validateOn==="blur"||a.validateOn==="change-blur"||a.validateOn==="change")&&this.getError(n)===void 0&&this.validateAsync(n),this.updateValid(),a.gatherData&&a.gatherOnBlur&&this.debouncedGatherInfo(n),a.onBlur){var d=this.getFieldState(n);a.onBlur(d,i)}this.emit("field",n)}},{key:"getData",value:function(n){return xt.get(this.state.data,n)}},{key:"setData",value:function(n,r){gt("Setting ".concat(n,"'s data to ").concat(r)),xt.set(this.state.data,n,r),this.emit("field",n)}},{key:"getError",value:function(n){return xt.get(this.state.errors,n)}},{key:"setError",value:function(n,r){gt("Setting ".concat(n,"'s error to ").concat(r)),xt.set(this.state.errors,n,r),this.state.valid=xt.empty(this.state.errors),this.state.invalid=!this.state.valid,this.emit("field",n)}},{key:"getInitialValue",value:function(n){return xt.get(this.state.initialValues,n)}},{key:"getDirty",value:function(n){return!!xt.get(this.state.dirt,n)}},{key:"setDirt",value:function(n,r){return xt.set(this.state.dirt,n,r)}},{key:"getPristine",value:function(n){return!this.getDirty(n)}},{key:"getValid",value:function(n){return xt.get(this.state.errors,n)===void 0}},{key:"getFormState",value:function(){return this.state}},{key:"clearValue",value:function(n){this.setValue(n,void 0),this.emit("clear",n)}},{key:"clearAllValues",value:function(){var n=this;this.fieldsMap.forEach(function(r){n.clearValue(r.current.name)})}},{key:"clearError",value:function(n){this.setError(n,void 0)}},{key:"clearAllErrors",value:function(){var n=this;this.fieldsMap.forEach(function(r){n.clearError(r.current.name)})}},{key:"setPristine",value:function(n){this.state.pristine=n,this.state.dirty=!this.state.pristine,this.emit("field")}},{key:"getFormApi",value:function(){return{getValue:this.getValue,setValue:this.setValue,setValueQuietly:this.setValueQuietly,getMaskedValue:this.getMaskedValue,setMaskedValue:this.setMaskedValue,setModifiedValue:this.setModifiedValue,getTouched:this.getTouched,setTouched:this.setTouched,getError:this.getError,setError:this.setError,getFocused:this.getFocused,setFocused:this.setFocused,getData:this.getData,setData:this.setData,getModified:this.getModified,resetField:this.resetField,reset:this.reset,getFormState:this.getFormState,getPristine:this.getPristine,getDirty:this.getDirty,setDirt:this.setDirt,validateField:this.validateField,getFieldState:this.getFieldState,getInitialValue:this.getInitialValue,touchAllFields:this.touchAllFields,validate:this.validate,asyncValidate:this.asyncValidate,setValues:this.setValues,setTheseValues:this.setTheseValues,resetPath:this.resetPath,submitForm:this.submitForm,clearValue:this.clearValue,clearAllValues:this.clearAllValues,clearError:this.clearError,clearAllErrors:this.clearAllErrors,focusFirstError:this.focusFirstError,setPristine:this.setPristine,disable:this.disableForm,enable:this.enableForm,restore:this.restore,getMemory:this.getMemory,fieldExists:this.fieldExists}}},{key:"getFieldState",value:function(n){var r,i=((r=this.fieldsMap.get(n))===null||r===void 0?void 0:r.current)||{},s=this.getError(n),a=!!this.getFocused(n),o=!!this.getModified(n),c=this.getDirty(n),u=this.getValid(n),d=!!this.getTouched(n),h=!c,p=!!this.validationRequests.get(n),g=!!this.dataRequests.get(n),v=this.getMemory(n),x=!1;return i&&i.showErrorIfError?x=s!==void 0:i&&i.showErrorIfDirty?x=s!==void 0&&(c||d):i&&i.showErrorIfTouched&&(x=s!==void 0&&d),{value:this.getValue(n),maskedValue:this.getMaskedValue(n),modified:o,touched:d,error:this.getError(n),data:this.getData(n),pristine:h,dirty:c,valid:u,invalid:!u,showError:x,validating:p,gathering:g,focused:a,memory:v}}},{key:"remove",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(gt("Remove",n),this.removalLocked)gt("Removal locked so NOT removing",n);else{var s=r.value,a=s===void 0?!1:s,o=r.error,c=o===void 0?!1:o,u=r.touched,d=u===void 0?!1:u;if(i.remember){var h=this.getValue(n);h!=null&&(gt("Remembering",n,h),xt.set(this.state.memory,n,h))}a||(gt("Delete Value",n),xt.delete(this.state.values,n),gt("Delete Modified",n),xt.delete(this.state.modified,n),gt("Delete Masked",n),xt.delete(this.state.maskedValues,n)),d||(gt("Delete Touched",n),xt.delete(this.state.touched,n)),c||
828(gt("Delete Errors",n),xt.delete(this.state.errors,n)),gt("Delete Dirt",n),xt.delete(this.state.dirt,n),gt("Delete Focused",n),xt.delete(this.state.focused,n),gt("Delete Info",n),xt.delete(this.state.data,n),this.updateValid(),this.emit("field",n),this.emit("field-value",n),this.emit("field-modified",n)}}},{key:"swap",value:function(n,r,i){gt("Swap",n,r,i),gt("Swap Values"),xt.swap(this.state.values,n,r,i),gt("Swap Modified"),xt.swap(this.state.modified,n,r,i),gt("Swap MaskedValues"),xt.swap(this.state.maskedValues,n,r,i),gt("Swap Touched"),xt.swap(this.state.touched,n,r,i),gt("Swap Errors"),xt.swap(this.state.errors,n,r,i),gt("Swap Dirt"),xt.swap(this.state.dirt,n,r,i),gt("Swap Focused"),xt.swap(this.state.focused,n,r,i),gt("Swap Data"),xt.swap(this.state.data,n,r,i),this.state.pristine=!1,this.state.dirty=!this.state.pristine}},{key:"insert",value:function(n,r,i){gt("Insert",n,r,i),gt("Insert into Values"),xt.insert(this.state.values,n,r,i),gt("Insert into Modified"),xt.insert(this.state.modified,n,r,void 0),gt("Insert into MaskedValues"),xt.insert(this.state.maskedValues,n,r,i),gt("Insert into Touched"),xt.insert(this.state.touched,n,r,void 0),gt("Insert into Errors"),xt.insert(this.state.errors,n,r,void 0),gt("Insert into Dirt"),xt.insert(this.state.dirt,n,r,void 0),gt("Insert into Focused"),xt.insert(this.state.focused,n,r,void 0),gt("Insert into Data"),xt.insert(this.state.data,n,r,void 0),this.state.pristine=!1,this.state.dirty=!this.state.pristine}},{key:"pullOut",value:function(n){gt("Pull",n),gt("Pull ".concat(n," from values")),xt.delete(this.state.values,n),gt("Pull ".concat(n," from modified")),xt.delete(this.state.modified,n),gt("Pull ".concat(n," from maskedValues")),xt.delete(this.state.maskedValues,n),gt("Pull ".concat(n," from touched")),xt.delete(this.state.touched,n),gt("Pull ".concat(n," from errors")),xt.delete(this.state.errors,n),gt("Pull ".concat(n," from dirt")),xt.delete(this.state.dirt,n),gt("Pull ".concat(n," from focused")),xt.delete(this.state.focused,n),gt("Pull ".concat(n," from data")),xt.delete(this.state.data,n),this.state.pristine=!1,this.state.dirty=!this.state.pristine}},{key:"register",value:function(n,r){gt("Register",n,r),this.fieldsMap.get(n)||(this.fieldsMap.set(n,r),this.emit("field",n))}},{key:"deregister",value:function(n){this.fieldsMap.get(n)&&(gt("De-Register",n),this.fieldsMap.delete(n),this.emit("field",n))}},{key:"initialize",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(gt("Initialize",n,"emit:",i,"state:",this.state),this.getValue(n)===void 0&&r.current.initialValue!=null&&(!r.current.initializeValueIfPristine||this.state.pristine)){var s=r.current,a=s.formatter,o=s.parser,c=s.initialize,u=s.clean,d=s.mask,h=s.modifyOnMount,p=u?u(r.current.initialValue):r.current.initialValue,g=ZT(p,{formatter:a,parser:o,initialize:c,mask:d}),v=JT(p,{formatter:a,initialize:c,mask:d});gt("Initializing ".concat(n,"'s value to ").concat(g)),xt.set(this.state.values,n,g),gt("Initializing ".concat(n,"'s maskedValue to ").concat(v)),xt.set(this.state.maskedValues,n,v),h&&(gt("Initializing ".concat(n,"'s modified to ").concat(g," because modifyOnMount was passed.")),xt.set(this.state.modified,n,g))}if(r.current.validate&&r.current.validateOnMount){var x=xt.get(this.state.values,n);gt("Validating on mount ".concat(n," ").concat(x),this.state),xt.set(this.state.errors,n,r.current.validate(x,this.state.values))}r.current.asyncValidate&&r.current.validateOnMount===!0&&this.getError(n)===void 0&&this.validateAsync(n),this.state.valid=xt.empty(this.state.errors),this.state.invalid=!this.state.valid,r.current.gatherData&&r.current.gatherOnMount===!0&&this.debouncedGatherInfo(n),i&&this.emit("field",n),i&&this.emit("field-value",n)}},{key:"validated",value:function(n,r){if(gt("Setting ".concat(n,"'s error to ").concat(r," with ").concat(this.state.validating," validations left")),xt.set(this.state.errors,n,r),this.updateValid(),this.validationRequests.delete(n),this.state.validating>0){gt("Still validating ".concat(this.state.validating," others so just update state.")),this.emit
828("field",n);return}this.state.submitting&&(this.valid()?(gt("Submit",this.state),this.emit("field",n),this.emit("submit")):(gt("Fail",this.state),this.options.current.focusOnInvalid&&this.focusFirstError(),this.options.current.scrollOnInvalid&&this.scrollToFirstError(),this.emit("field",n),this.emit("failure")),this.state.submitting=!1),this.done&&(this.valid()&&this.done(),this.done=void 0),this.emit("field",n)}},{key:"gathered",value:function(n,r){gt("Setting ".concat(n,"'s data to ").concat(r," with ").concat(this.state.gathering," gatherers left")),xt.set(this.state.data,n,r),this.dataRequests.delete(n),this.emit("field",n),this.emit("field-value",n)}},{key:"gatheredError",value:function(n,r){gt("Setting ".concat(n,"'s error to ").concat(r," with ").concat(this.state.gathering," gatherers left")),xt.set(this.state.errors,n,r),this.dataRequests.delete(n),this.updateValid(),this.emit("field",n),this.emit("field-value",n)}},{key:"validateAsync",value:function(n){var r,i=this;gt("VALIDATING ASYNC",n);var s=(r=this.fieldsMap.get(n))===null||r===void 0?void 0:r.current,a=this.getValue(n);if(s&&s.asyncValidate){this.state.validating=this.state.validating+1;var o=yc();gt("REQUEST",o),this.validationRequests.set(n,{uuid:o,value:a}),this.emit("field",n),s.asyncValidate(a,this.state.values).then(function(c){i.state.validating=i.state.validating-1;var u=i.validationRequests.get(n).uuid!==o,d=i.validationRequests.get(n).value!==i.getValue(n);!u&&!d?(gt("FINISH",o),i.validated(n,c)):gt("".concat(u?"STALE":"INVALID"," THEN"),o,a,i.getValue(n))}).catch(function(c){i.state.validating=i.state.validating-1;var u=i.validationRequests.get(n).uuid!==o,d=i.validationRequests.get(n).value!==i.getValue(n);!u&&!d?(gt("FINISH",o),i.validated(n,c.message)):gt("".concat(u?"STALE":"INVALID"," THEN"),o,a,i.getValue(n))})}}},{key:"gatherData",value:function(n){var r,i=this;gt("EXECUTING INFO ASYNC",n);var s=(r=this.fieldsMap.get(n))===null||r===void 0?void 0:r.current,a=this.getValue(n);if(s&&s.gatherData){this.state.gathering=this.state.gathering+1;var o=yc();gt("DATA REQUEST",o),this.dataRequests.set(n,{uuid:o,value:a}),this.emit("field",n),s.gatherData(a,this.state).then(function(c){i.state.gathering=i.state.gathering-1;var u=i.dataRequests.get(n).uuid!==o,d=i.dataRequests.get(n).value!==i.getValue(n);!u&&!d?(gt("DATA FINISH",o),i.gathered(n,c)):gt("".concat(u?"STALE":"INVALID"," THEN"),o,a,i.getValue(n))}).catch(function(c){i.state.gathering=i.state.gathering-1;var u=i.dataRequests.get(n).uuid!==o,d=i.dataRequests.get(n).value!==i.getValue(n);!u&&!d?(gt("DATA FINISH",o),i.gatheredError(n,c.message)):gt("".concat(u?"STALE":"INVALID"," THEN"),o,a,i.getValue(n))})}}},{key:"reset",value:function(){var n,r,i,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(gt("----------------------------- Resetting Form -----------------------------"),this.options.current.resetOnlyOnscreen){var a;gt("Resetting only onscreen inputs"),this.state.initialValues=(a=this.options.current.initialValues)!==null&&a!==void 0?a:{},this.fieldsMap.forEach(function(d){d.current.fieldApi.reset({resetValue:u})}),this.emit("reset");return}var o=s.values,c=s.resetValues,u=c===void 0?!0:c;this.state={pristine:!0,dirty:!1,submitted:!1,invalid:!1,valid:!0,submitting:!1,validating:0,gathering:0,values:u?{}:this.state.values,errors:{},touched:{},maskedValues:u?{}:this.state.maskedValues,dirt:{},focused:{},modified:{},data:{},initialValues:(n=o??this.options.current.initialValues)!==null&&n!==void 0?n:{},disabled:(r=(i=this.disabled)!==null&&i!==void 0?i:this.options.current.disabled)!==null&&r!==void 0?r:!1,memory:{}},this.fieldsMap.forEach(function(d){d.current.arrayField&&(gt("Resetting the array field, ".concat(d.current.name)),d.current.fieldApi.reset({resetValue:u}))}),this.fieldsMap.forEach(function(d){d.current.arrayField||(gt("Resetting the field, ".concat(d.current.name)),d.current.fieldApi.reset({resetValue:u}))}),this.fieldsMap.forEach(function(d){d.current.validateOnMount&&(gt("Re-validating the field, ".concat(d.current.name," due to a reset and validateOnMount")),d.current.fieldApi.validate())}),gt("----------------------------- END Resetting Form -----------------------------"),this.emit
828("reset")}},{key:"focusFirstError",value:function(){var n=this;this.options.current.focusOnInvalid&&Array.from(this.fieldsMap.values()).some(function(r){var i=r.current,s=i.fieldRef,a=n.getError(i.name);return a&&s?(typeof s.current.focus=="function"&&(gt("Focusing onto",i.name),s.current.focus()),!0):!1})}},{key:"scrollToFirstError",value:function(){var n=this;this.options.current.scrollOnInvalid&&Array.from(this.fieldsMap.values()).some(function(r){var i=r.current,s=i.fieldRef,a=n.getError(i.name);return a&&s?(typeof s.current.scrollIntoView=="function"&&(gt("Scrolling to",i.name),s.current.scrollIntoView(n.options.current.scrollOnInvalid)),!0):!1})}},{key:"resetField",value:function(n){var r,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};gt("Resetting",n);var s=((r=this.fieldsMap.get(n))===null||r===void 0?void 0:r.current)||{},a=s.formatter,o=s.parser,c=s.initialize,u=s.mask,d=s.modifyOnMount,h=i.value,p=i.resetValue,g=p===void 0?!0:p,v=i.resetError,x=v===void 0?!0:v,_=i.resetTouched,w=_===void 0?!0:_,S=i.resetDirt,E=S===void 0?!0:S,T=i.resetModified,N=T===void 0?!0:T;if(h){var A=ZT(h,{formatter:a,parser:o,initialize:c,mask:u});gt("Resetting ".concat(n,"'s value to ").concat(A)),xt.set(this.state.values,n,A);var k=JT(h,{formatter:a,mask:u});gt("Resetting ".concat(n,"'s maskedValue to ").concat(k)),xt.set(this.state.maskedValues,n,k)}else if(g){var j=ZT(s.getInitialValue&&s.getInitialValue(),{formatter:a,parser:o,initialize:c,mask:u}),R=JT(s.getInitialValue&&s.getInitialValue(),{formatter:a,initialize:c,mask:u});gt("Resetting ".concat(n,"'s value to ").concat(j)),xt.set(this.state.values,n,j),gt("Resetting ".concat(n,"'s maskedValue to ").concat(R)),xt.set(this.state.maskedValues,n,R),d&&N&&(gt("Resetting ".concat(n,"'s modified to ").concat(j," because modifyOnMount was passed.")),xt.set(this.state.modified,n,j))}if(x&&(gt("Resetting ".concat(n,"'s error")),xt.delete(this.state.errors,n)),w&&(gt("Resetting ".concat(n,"'s touched")),xt.delete(this.state.touched,n)),E&&(gt("Resetting ".concat(n,"'s dirt")),xt.delete(this.state.dirt,n)),!d&&N&&(gt("Resetting ".concat(n,"'s modified")),xt.delete(this.state.modified,n)),s.validate&&s.validateOnMount){var P=xt.get(this.state.values,n);gt("Validating on reset because of validateOnMount ".concat(n," ").concat(P),this.state),xt.set(this.state.errors,n,s.validate(P,this.state.values))}this.state.valid=xt.empty(this.state.errors),this.state.invalid=!this.state.valid,s.gatherData&&s.gatherOnMount===!0&&this.debouncedGatherInfo(n),this.emit("field",n),this.emit("field-value",n),this.emit("field-modified",n)}},{key:"reformat",value:function(n){var r;gt("Reformatting",n);var i=(r=this.fieldsMap.get(n))===null||r===void 0?void 0:r.current,s=xt.get(this.state.values,n),a=i.formatter,o=i.parser,c=i.initialize,u=ZT(s,{formatter:a,parser:o,initialize:c}),d=JT(s,{formatter:a});gt("Reformatting ".concat(n,"'s value to ").concat(u)),xt.set(this.state.values,n,u),gt("Reformatting ".concat(n,"'s maskedValue to ").concat(d)),xt.set(this.state.maskedValues,n,d),this.emit("field",n),this.emit("field-value",n),this.emit("field-modified",n)}},{key:"lockRemoval",value:function(n){gt("LOCKREMOVAL",n),this.removalLocked=n}},{key:"unlockRemoval",value:function(){gt("UNLOCK REMOVAL"),this.removalLocked=void 0}},{key:"getRemovalLocked",value:function(){return this.removalLocked}},{key:"isRemovalLocked",value:function(){return this.removalLocked!=null}},{key:"valid",value:function(){var n=this.state.errors;return!!xt.empty(n)}},{key:"keyDown",value:function(n){if(n.keyCode==13&&this.options.current.preventEnter)return n.preventDefault(n),!1}},{key:"validate",value:function(){var n=this;gt("Validating all fields");var r=this.state.values,i=this.options.current.validateModified;i&&(r=this.state.modified);var s={};if(this.options.current.yupSchema){var a=r7e(this.options.current.yupSchema,r);s=fr(fr({},s),a)}if(this.options.current.schema&&this.options.current.ajv){var o=s7e(this.ajvValidate,r);s=fr(fr({},s),o)}if(this.options.current.validateFields){var c=this.options.current.validateFields(r);s=fr(fr({},s),c),s=xt.purge(s)}
828this.fieldsMap.forEach(function(u){var d=u.current,h=n.getValue(d.name),p=d.validate?d.validate(h,r):void 0;p!=null&&xt.set(s,d.name,p)}),this.state.errors=s,this.updateValid(),this.emit("field","_ALL_")}},{key:"asyncValidate",value:function(n){var r=this;gt("Async Validating all fields"),this.done=n,this.fieldsMap.forEach(function(i){var s=i.current.name;r.getError(s)===void 0&&r.validateAsync(s)})}},{key:"getErrorMessage",value:function(n,r){var i;gt("Getting ".concat(n," error message for ").concat(r," Validating all fields"));var s=r;if(this.options.current.schema){for(gt("We have schema so looking in there for error message");s!=="";){gt("Looking for message at ".concat(s));var a=Lde(s);gt("Looking for message at schema path ".concat(a));var o=xt.get(this.options.current.schema,a);if(o&&o.errorMessage){var c=typeof o.errorMessage=="string"?o.errorMessage:o.errorMessage[n];if(c)return c}gt("Did not find message in schema for ".concat(a),o),s=s.substring(0,s.lastIndexOf("."))}var u=this.options.current.schema;if(u.errorMessage){var d=typeof u.errorMessage=="string"?u.errorMessage:u.errorMessage[n];if(d)return d}}var h=(i=this.fieldsMap.get(r))===null||i===void 0?void 0:i.current;if(h&&h.errorMessage){var p=typeof h.errorMessage=="string"?h.errorMessage:h.errorMessage[n];if(p)return p}if(this.options.current.errorMessage){var g=typeof this.options.current.errorMessage=="string"?this.options.current.errorMessage:this.options.current.errorMessage[n];if(g)return g}}},{key:"touchAllFields",value:function(){var n=this;this.fieldsMap.forEach(function(r){r.current.arrayField||(gt("TouchAllFields - setting ".concat(r.current.name,"'s touched to true")),xt.set(n.state.touched,r.current.name,!0))})}},{key:"submitForm",value:function(n){this.state.submitting=!0,!this.options.current.dontPreventDefault&&n&&n.preventDefault(n),this.validate(),this.touchAllFields(),this.emit("field","_ALL_"),this.asyncValidate(),this.valid()&&this.state.validating===0?(gt("Submit",this.state),this.state.submitted=!0,this.emit("submit")):(gt("Fail",this.state),this.options.current.focusOnInvalid&&this.focusFirstError(),this.options.current.scrollOnInvalid&&this.scrollToFirstError(),this.emit("failure")),this.state.validating===0&&(this.state.submitting=!1),this.emit("field")}},{key:"emit",value:function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];var a=this.subscriptions.get(n);a&&a.forEach(function(o){return o.apply(void 0,i)})}},{key:"on",value:function(n,r){this.subscriptions.get(n)||this.subscriptions.set(n,new Set);var i=this.subscriptions.get(n);i.add(r)}},{key:"removeListener",value:function(n,r){var i=this.subscriptions.get(n);i.delete(r)}}]),e})(),T1=function(t,n){var r=b.useRef(!0),i=r.current;b.useEffect(function(){if(i)r.current=!1;else return t()},n)};function k7e(){return b.useContext(F9e)}var N7e=["onSubmit","onReset","onChange","onSubmitFailure","onValueChange","onValueSet","onValid","onInvalid","onValueModified","initialValues","validateFields","autocomplete","showErrorIfError","showErrorIfTouched","showErrorIfDirty","validateOn","validateOnMount","formApiRef","dontPreventDefault","yupSchema","allowEmptyStrings","disabled","preventEnter","validateModified","schema","ajv","ajvErrors","components","errorMessage","fieldMap","adapter","name","keepState","keepStateIfRelevant","focusOnInvalid","scrollOnInvalid","resetOnlyOnscreen","debounceGather","debounceError"],eA=xa("informed:useForm "),j7e=function(t){var n,r=t.onSubmit,i=t.onReset,s=t.onChange,a=t.onSubmitFailure,o=t.onValueChange,c=t.onValueSet,u=t.onValid,d=t.onInvalid,h=t.onValueModified,p=t.initialValues,g=t.validateFields,v=t.autocomplete,x=t.showErrorIfError,_=t.showErrorIfTouched,w=t.showErrorIfDirty,S=t.validateOn,E=t.validateOnMount,T=t.formApiRef,N=t.dontPreventDefault,A=t.yupSchema,k=t.allowEmptyStrings,j=t.disabled,R=t.preventEnter,P=t.validateModified,V=t.schema,U=t.ajv,G=t.ajvErrors,Q=t.components,Z=t.errorMessage,K=t.fieldMap,te=t.adapter,ne=t.name,se=t.keepState,H=t.keepStateIfRelevant,O=t.focusOnInvalid,L=t.scrollOnInvalid,M=t.resetOnlyOnscreen,q=t.debounceGather,X=t.debounceError,J=qu(t,N7e),W=k7e(),re=b.useMemo(function(){if(W&&ne){var Ne;return eA("Checking for saved values",W.getSavedValues(ne)),(Ne=W.getSavedValues(ne))!==null&&Ne!==void 0?Ne:p}return p},[p]);if(typeof window<"u"&&(n=window)!==null&&n!==void 0&&(n=n.informed)!==null&&n!==void 0&&n.properties){var ae,ce=(ae=window)===null||ae===void 0||(ae=ae.informed)===null||ae===void 0?void 0:ae.properties;Object.keys(ce).forEach(function(Ne){V.properties[Ne]&&(V.properties[Ne]["ui:props"]=ce[Ne])})}var Te={initialValues:re,validateFields:g,autocomplete:v,showErrorIfError:x,showErrorIfTouched:_??!0,showErrorIfDirty:w,validateOn:S,validateOnMount:E,dontPreventDefault:N,yupSchema:A,allowEmptyStrings:k,disabled:j,preventEnter:R,schema:V,ajv:U,ajvErrors:G,components:Q,errorMessage:Z,fieldMap:K,adapter:te,keepState:se,keepStateIfRelevant:H,validateModified:P,focusOnInvali
828d:O,scrollOnInvalid:L,resetOnlyOnscreen:M,debounceGather:q,debounceError:X},fe=b.useRef();fe.current=Te;var xe=b.useState(function(){return new A7e(fe)}),ke=zs(xe,1),Fe=ke[0];b.useEffect(function(){var Ne=function(){return s&&s(Fe.getFormState())},De=function(){return i&&i(Fe.getFormState())},be=function(){return r&&r(Fe.getFormState())},me=function(){return a&&a(Fe.getFormState())},we=function(Rt){return o&&o(Fe.getFormState(),Rt)},Le=function(Rt){return h&&h(Fe.getFormState(),Rt)},oe=function(Rt){return c&&c(Fe.getFormState(),Rt)},St=function(){return u&&u(Fe.getFormState())},Ut=function(){return d&&d(Fe.getFormState())};return Fe.on("field",Ne),Fe.on("reset",De),Fe.on("submit",be),Fe.on("failure",me),Fe.on("field-value",we),Fe.on("field-modified",Le),Fe.on("field-value-set",oe),Fe.on("valid",St),Fe.on("invalid",Ut),function(){Fe.removeListener("field",Ne),Fe.removeListener("reset",De),Fe.removeListener("submit",be),Fe.removeListener("failure",me),Fe.removeListener("field-value",we),Fe.removeListener("field-modified",Le)}},[s,i,r,a,o,h]);var tt=b.useState(function(){return Fe.getFormState()}),Se=zs(tt,2),et=Se[0],pt=Se[1];b.useEffect(function(){var Ne=function(be){pt(fr({},Fe.getFormState())),W&&W.inform(ne,be)};return Fe.emitter.on("field",Ne),pt(fr({},Fe.getFormState())),ne&&W&&W.register(ne,Fe),function(){Fe.emitter.removeListener("field",Ne),ne&&W&&W.setSavedValues(ne,Fe.getFormState().values)}},[]);var ie=b.useMemo(function(){return T&&(T.current=Fe.getFormApi()),Fe.getFormApi()},[]);T1(function(){var Ne=ie.getFormState(),De=Ne.pristine;De&&(eA("Resetting entire form as form is pristine and we got new initial values"),ie.reset())},[re]),T1(function(){j?ie.disable():ie.enable()},[j]),b.useEffect(function(){return eA("Mount"),Fe.lockRemoval(!1),function(){Fe.lockRemoval(!0),eA("Un-Mount")}},[]);var ue=function(De){return Y.createElement(ay.Provider,{value:Fe},Y.createElement(Nde.Provider,{value:ie},Y.createElement(jde.Provider,{value:et},De)))};return{formApi:ie,formState:et,formController:Fe,render:ue,userProps:J}},R7e=function(t){var n=t.value,r=t.inputRef,i=t.inputRefs,s=t.maintainCursor,a=s===void 0?!1:s,o=b.useMemo(function(){if(i){var T={};
828Object.keys(i).forEach(function(N){return T[N]=0})}else return 0},[]),c=F2(o),u=zs(c,3),d=u[0],h=u[1],p=u[2],g=F2(o),v=zs(g,3),x=v[0],_=v[1],w=v[2],S=b.useCallback(function(T,N){if(N){var A=fr({},p());A[N]=T,h(A)}else h(T)},[]),E=b.useCallback(function(T,N){if(N){var A=fr({},p());A[N]=T[N],_(A)}else _(T)},[]);return b.useEffect(function(){if(!i&&r.current!=null&&p()){var T=w(),N=p()+T;a&&r.current.setSelectionRange(N,N)}i&&p()&&Object.keys(i).forEach(function(A){var k=w()[A]<0?0:w()[A],j=p()[A]+k;a&&i[A].current.setSelectionRange(j,j)})},[n,d,x]),{setCursorOffset:E,setCursor:S,cursor:d,getCursor:p,cursorOffset:x}},I7e=["id","dir","type","name","onBlur","onChange","onFocus","onNativeChange","onValueChange","validate","asyncValidate","validateModified","gatherData","yupSchema","multiple","field","keep","keepState","keepStateIfRelevant","remember","inputRef","inputRefs","relevant","defaultValue","initialValue","autocomplete","showErrorIfError","showErrorIfTouched","showErrorIfDirty","formatter","parser","clean","mask","maintainCursor","required","noFalsy","minimum","maximum","minLength","maxLength","pattern","allowEmptyString","emptyValue","disabled","gatherOnMount","gatherOnBlur","validateOnMount","modifyOnMount","validateOn","maskOnBlur","validateWhen","formatterDependencies","formController","initialize","errorMessage","initializeValueIfPristine","relevanceWhen","relevanceDeps","validateDeps","evaluate","evaluateWhen"],Zc=xa("informed:useField "),Uh=function(t){var n,r=t.id,i=t.dir,s=t.type,a=t.name,o=t.onBlur,c=t.onChange,u=t.onFocus,d=t.onNativeChange,h=t.onValueChange,p=t.validate,g=t.asyncValidate,v=t.validateModified,x=t.gatherData,_=t.yupSchema,w=t.multiple,S=t.field,E=t.keep,T=t.keepState,N=t.keepStateIfRelevant,A=t.remember,k=t.inputRef,j=t.inputRefs,R=t.relevant,P=t.defaultValue,V=t.initialValue,U=t.autocomplete,G=t.showErrorIfError,Q=t.showErrorIfTouched,Z=t.showErrorIfDirty,K=t.formatter,te=t.parser,ne=t.clean,se=t.mask,H=t.maintainCursor,O=t.required,L=t.noFalsy,M=t.minimum,q=t.maximum,X=t.minLength,J=t.maxLength,W=t.pattern,re=t.allowEmptyString,ae=t.emptyValue,ce=t.disabled,Te=t.gatherOnMount,fe=t.gatherOnBlur,xe=t.validateOnMount,ke=t.modifyOnMount,Fe=t.validateOn,tt=t.maskOnBlur,Se=t.validateWhen,et=Se===void 0?[]:Se,pt=t.formatterDependencies,ie=pt===void 0?[]:pt,ue=t.formController,Ne=t.initialize,De=t.errorMessage,be=t.initializeValueIfPristine,me=t.relevanceWhen,we=me===void 0?[]:me,Le=t.relevanceDeps,oe=Le===void 0?[]:Le,St=t.validateDeps,Ut=St===void 0?[]:St;t.evaluate,t.evaluateWhen;var Ht=qu(t,I7e),Rt=a??S,Ct=zy(Rt),Wt=b.useContext(Du);Ct||console.warn("name is a required prop!!!!");var Tn=H??!!K,Ie=ue??Wu(),dt=U??Ie.options.current.autocomplete,$t=G??Ie.options.current.showErrorIfError,Mn=Q??Ie.options.current.showErrorIfTouched,Ve=Z??Ie.options.current.showErrorIfDirty,ct=xe??Ie.options.current.validateOnMount,Gt=Fe??Ie.options.current.validateOn,Cn=T??Ie.options.current.keepState,Zr=N??Ie.options.current.keepStateIfRelevant,rn=re??Ie.options.current.allowEmptyStrings,_n=v??Ie.options.current.validateModified,Hn=(n=ce??Ie.disabled)!==null&&n!==void 0?n:Ie.options.current.disabled,Jr=function(){var Ai;return(Ai=V??Ie.getInitialValue(Ct))!==null&&Ai!==void 0?Ai:P},Nr=b.useState(function(){return Jr()}),Ns=zs(Nr,1),Or=Ns[0],br=hE(Ct,!1),fi=b.useContext(D9e),zi=$de({name:Ct,relevant:R,relevanceWhen:we,relevanceDeps:oe}),Gi=b.useContext(J6),le=b.useRef(null),ve=Y.useMemo(function(){return k||le},[]),he=b.useState(function(){return r||yc()}),pe=zs(he,1),ye=pe[0],Ee=b.useRef();Ee.current=p;var Xe=b.useMemo(function(){return f7e(Ee,_,{required:O,noFalsy:L,minimum:M,maximum:q,minLength:X,maxLength:J,pattern:W,getErrorMessage:function(Ai){return Ie.getErrorMessage(Ai,Ct)},validateModified:_n,fieldApi:br,formController:Ie,scope:Wt,name:Rt})},[O,M,q,X,J,W,L,Rt]),ft={name:Ct,type:s,dir:i,onBlur:o,onChange:c,onFocus:u,onNativeChange:d,initialValue:Or,keep:E,remember:A,keepState:Cn,keepStateIfRelevant:Zr,initializeValueIfPristine:be,fieldApi:br,getInitialValue:Jr,formatter:K,parser:te,clean:ne,mask:se,validate:Xe,yupSchema:_,validateOn:Gt??"blur",validateOnMount:ct,validateWhen:et,showErrorIfError:$t,showErrorIfTouched:Mn,showErrorIfDirty:Ve,maskOnBlur:tt,asyncValidate:g,gatherData:x,initialize:Ne,errorMessage:De,allowEmptyString:rn,emptyValue:ae,gatherOnMount:Te,gatherOnBlur:fe,fieldRef:ve,modifyOnMount:ke},He=b.useRef(ft);He.current=ft,b.useState(function(){if(zi){var In=He.current;Zc("Initialize",In.name),Ie.initialize(In.name,He,!1)}});var Qe=fs(Ct,!1),Ze=R7e({value:Qe.value,inputRef:ve,maintainCursor:Tn,inputRefs:j}),kt=Ze.setCursor,zt=Ze.setCursorOffset;He.current.setCursorOffset=zt,He.current.setCursor=kt,b.useEffect(function(){return zi&&(Zc("Register",Ct,He.current),Ie.register(Ct,He),Zc("Second Initialize",Ct),Ie.initialize(Ct,He,!1)),function(){Zc("De-Register",Ct,He.current),Ie.deregister(Ct)}},[Ct]),T1(function(){var In=He.current;
828!zi&&!Cn&&(Zc("RELEVANT REMOVING",In.name),Ie.remove(In.name,In.keep,In),Zc("RELEVANT De-Register",In.name),Ie.deregister(In.name)),zi&&(Zc("RELEVANT register",In.name),Ie.register(In.name,He),Zc("RELEVANT Initialize",In.name),Ie.initialize(In.name,He))},[zi]),b.useEffect(function(){return function(){var In=!1,Ai=He.current;Zc("CLEANUP REMOVING",Ai.name),Ai.keepState?In=!0:Gi&&!Gi.relevant()?In=!1:(Zr||fi)&&(In=!0),In||Ie.remove(Ai.name,Ai.keep,Ai)}},[]),T1(function(){Ie.reformat(He.current.name)},Mo(ie)),L2("field-value",[Ct],function(In){h&&h(Ie.getFieldState(In))},!1),L2("field-value",et,function(In){Zc("revalidating for ".concat(He.current.name," because of ").concat(In)),Ie.validateField(He.current.name)}),T1(function(){Zc("revalidating for ".concat(He.current.name," because of deps change")),Ie.validateField(He.current.name)},Ut);var Xt=function(Ai){return zi?Ai:null},Ot=Z9e({fieldType:s,setValue:br.setValue,multiple:w,ref:ve}),Kt=J9e({setTouched:br.setTouched}),hn=e7e({setFocused:br.setFocused}),hi=t7e({fieldType:s,maskedValue:Qe.maskedValue,multiple:Ht.multiple,value:Qe.value}),pi=fr({id:ye,name:Ct,type:s,dir:i,multiple:w,autoComplete:dt,disabled:Hn,required:O,min:M,max:q,minLength:X,maxLength:J,pattern:W},Ht);return{fieldState:Qe,fieldApi:br,userProps:pi,informed:{onChange:Ot,onBlur:Kt,onFocus:hn,value:hi},ref:ve,render:Xt}},O7e=["label","id"],xk=Y.memo(function(e){var t=Uh(e),n=t.render,r=t.userProps,i=t.ref,s=t.fieldState,a=t.fieldApi,o=a.setValue,c=a.setTouched,u=a.setFocused,d=s.maskedValue,h=s.showError,p=s.error,g=r.label,v=r.id,x=qu(r,O7e);return n(Y.createElement(Y.Fragment,null,g?Y.createElement("label",{htmlFor:v},g):null,Y.createElement("input",Ya({ref:i,id:v},x,{value:!d&&d!==0?"":d,onChange:function(w){o(w.target.value,w)},onBlur:function(w){c(!0,w)},onFocus:function(w){u(!0,w)},"aria-invalid":!!h,"aria-describedby":"".concat(v,"-error")})),h?Y.createElement("small",{role:"alert",id:"".concat(v,"-error")},p):null))}),P7e=Y.memo(function(e){var t=Uh(e),n=t.render,r=t.userProps,i=t.ref,s=t.fieldState,a=t.fieldApi,o=a.setValue,c=a.setTouched,u=a.setFocused,d=s.maskedValue,h=s.showError,p=s.error,g=r.label,v=r.id;return n(Y.createElement(Y.Fragment,null,g?Y.createElement("label",{htmlFor:v},g):null,Y.createElement("textarea",Ya({ref:i},r,{value:d||"",onChange:function(_){o(_.target.value,_)},onBlur:function(_){c(!0,_)},onFocus:function(_){u(!0,_)},"aria-invalid":!!h,"aria-describedby":"".concat(v,"-error")})),h?Y.createElement("small",{role:"alert",id:"".concat(v,"-error")},p):null))}),M7e=["id","onBlur","multiple","label","options","children"],PY=function(t){var n=Uh(t),r=n.render,i=n.userProps,s=n.fieldState,a=n.fieldApi,o=n.ref,c=a.setValue,u=a.setTouched,d=s.value,h=s.showError,p=s.error,g=i.id,v=i.onBlur,x=i.multiple,_=i.label,w=i.options,S=i.children,E=qu(i,M7e),T=function(A){var k=Array.from(o.current).filter(function(j){return j.selected}).map(function(j){return j.value});c(x?k:k[0]||"",A)};return r(Y.createElement(Y.Fragment,null,_?Y.createElement("label",{htmlFor:g}," ",_," "):null,Y.createElement("select",Ya({},E,{id:g,multiple:x,ref:o,value:d||(x?[]:""),"aria-invalid":!!h,"aria-describedby":"".concat(g,"-error"),onChange:T,onBlur:function(A){u(!0),v&&v(A)}}),w?w.map(function(N){return Y.createElement("option",{key:N.value,value:N.value,disabled:N.disabled},N.label)}):S),h?Y.createElement("small",{role:"alert",id:"".concat(g,"-error")},p):null))},D7e=["id","label"],MY=function(t){var n=Uh(t),r=n.render,i=n.userProps,s=n.fieldState,a=n.fieldApi,o=a.setValue,c=a.setTouched,u=s.value,d=s.error,h=s.showError,p=i.id,g=i.label,v=qu(i,D7e);return r(Y.createElement(Y.Fragment,null,g?Y.createElement("label",{htmlFor:p},g):null,Y.createElement("input",Ya({},v,{id:p,checked:!!u,"aria-invalid":!!h,"aria-describedby":"".concat(p,"-error"),onChange:function(_){o(_.target.checked,_)},onBlur:function(_){c(!0,_)},type:"checkbox"})),h?Y.createElement("small",{role:"alert",id:"".concat(p,"-error")},d):null))};function F7e(){return b.useContext(Ode)}var L7e=["label","value"],z7e=function(t){var n=t.label,r=t.value,i=qu(t,L7e),s=F7e(),a=s.radioGroupApi,o=s.radioGroupState,c=a.setValue,u=a.setTouched,d=o.value,h=o.showError;return Y.createElement("label",null,n,Y.createElement("input",Ya({},i,{"aria-invalid":!!h,value:r,checked:d===r,onChange:function(g){g.target.checked&&c(r,g)},onBlur:function(g){u(!0,g)},type:"radio"})))},$7e=function(t){var n=Uh(t),r=n.fieldApi,i=n.fieldState,s=n.userProps,a=fr({radioGroupApi:r,radioGroupState:i},t),o=s.label,c=s.id,u=s.options,d=s.children,h=i.showError,p=i.error;return Y.createElement(Ode.Provider,{value:a},Y.createElement("fieldset",{"aria-describedby":"".concat(c,"-error")},o?Y.createElement("legend",null,o):null,u?u.map(function(g){return Y.createElement("label",{key:g.value},g.label," ",Y.createElement(z7e,{value:g.value}))}):d,h?Y.createElement("small",{role:"alert",id:"".concat(c,"-error")},p):null))};function B7e(){return b.useContext(Ide)}var U7e=function(t){var n=t.text,r=B7e(),i=r.add;return Y.createElement("button",{onClick:function(){i()},type:"button"},n||"Add")};function V7e(){return b.useContext(Z6)}var H7e=function(t){var n=t.text,r=V7e(),i=r.remove;return Y.createElement("button",{onClick:function(){i()},type:"button"},n||"Remove")},DY=function(t){var n=t.components,r=Wu(),i=r.fieldMap,s=r.getOptions,a=s();return n?n.map(function(o,c){var u,d=o["ui:control"],h=o["ui:props"],p=(u=i[d])!==null&&u!==void 0?u:a.components?a.components[d]:null;return Y.createElement(p,Ya({key:"ui-comp-".concat(c)},h))}):null},q7e=xa("informed:useConditional "),W7e=function(t){var n=t.name,r=t.evaluate,i=t.evaluateWhen,s=i===void 0?[]:i,a=t.dependsOn,o=a===void 0?[]:a,c=t.native,u=c===void 0?!1:c,d=t.evaluateOnMount,h=d===void 0?!0:d,p=Wu(),g=b.useContext(Du),v=b.useRef(g);v.current=g;var x=b.useState(function(){return r&&h?r({formState:p.getFormState(),formApi:p.getFormApi(),scope:g,dependsOn:o}):{}}),_=zs(x,2),w=_[0],S=_[1],E=typeof s=="function"?[]:s,T=b.useMemo(function(){return typeof s=="function"?s(g):s},[].concat(Mo(E),[g])),N=u?"field-native":"field-value";return L2(N,T,function(A,k){q7e("re-evaluating ".concat(n," because ").concat(A," changed, triggerd by ").concat(JSON.stringify(k,null,2)));var j=r({formState:p.getFormState(),formApi:p.getFormApi(),scope:v.current,dependsOn:o,target:A,triggers:k});S(j)},typeof s!="function"),b.useEffect(function(){r&&h&&S(r({formState:p.getFormState(),formApi:p.getFormApi(),scope:g,dependsOn:o}))},[n].concat(Mo(o))),b.useEffect(function(){var A=function(){r&&h&&S(r({formState:p.getFormState(),formApi:p.getFormApi(),scope:g,dependsOn:o}))};return p.emitter.on("reset",A),function(){p.emitter.removeListener("reset",A)}},[]),w},G7e=["name","schema"],Cg=xa("informed:FormField "),K7e=function(t){var n,r=t.name,i=t.schema,s=qu(t,G7e),a=Wu(),o=a.fieldMap,c=a.getOptions,u=a.emitter,d=zy(r),h=c(),p=hE(r),g=b.useState({}),v=zs(g,2),x=v[0],_=v[1],w=i?r:d,S=i??h.schema,E=Lde(w),T=xt.get(S,E),N;if(!T&&(S.allOf&&S.allOf.forEach(function(O){O.if&&(T=xt.get(O.then,E),N=O.if)}),!T))return null;var A=b.useMemo(function(){return uP(r,T)},[r]),k=A.props,j=A.type,R=A.properties,P=A.items,V=A.componentType,U=A.uiBefore,G=A.uiAfter;b.useEffect(function(){var O=function(q,X){q===r&&(Cg("Updating field props for ".concat(q),uP(r,X)),_(uP(r,X)))},L=function(q){q===r&&_({})};return u.on("update-combine",O),u.on("update-remove",L),function(){u.removeListener("update-combine",O),u.removeListener("update-remove",L)}},[r]);var Q=W7e({name:k.name,evaluate:k.evaluate,evaluateWhen:k.evaluateWhen,dependsOn:k.dependsOn}),Z=b.useMemo(function(){var O=x.props,L=lP(k),M=lP(O),q=lP(Q);(k!=null&&k.required||M!=null&&M.required||q!=null&&q.required)&&(s.required=k?.required||M?.required||q?.required);var X=fr(fr(fr(fr({},L),M),q),s);return Cg("Schema Props for ".concat(r),L),Cg("Cond Props for ".concat(r),M),Cg("Hook Props for ".concat(r),q),Cg("New Props for ".concat(r),X),X},[x,Q]);T1(function(){Z.options&&(Cg("options changed",Z.options),p.reset())},[Z.options]);var K=(n=o[V])!==null&&n!==void 0?n:h.components?h.components[V]:null;if(k.options&&o.withOptions&&!P&&(K=o.withOptions[V]||K),Cg("Rendering Field",r,A),!K&&j==="object"&&R)return Y.createElement(t8,{scope:r},Y.createElement(n8,{schema:A}));if(K&&j==="object"&&R)return Y.createElement(t8,{scope:r},Y.createElement(K,Z,Y.createElement(n8,{schema:A})));if(!K&&j==="array"&&P)return Y.createElement(z2,Ya({name:r,items:P,uiBefore:U,uiAfter:G},Z));if(K&&V==="array"&&P&&j==="array")return Y.createElement(K,Ya({name:r,items:P,uiBefore:U,uiAfter:G},Z));if(!K)return null;if(N){var te=N,ne=te.properties,se=function(L){var M=L.formApi,q=L.scope;return Object.entries(ne).every(function(X){var J=zs(X,2),W=J[0],re=J[1];return zde(re,M.getValue(q?"".concat(q,".").concat(W):W))})},H=function(){return Y.createElement(_5,{when:se},Y.createElement(K,Ya({name:r},Z)))};return Y.createElement(H,null)}return Y.createElement(K,Ya({name:r},Z))},FY=xa("informed:FormField "),Y7e=function(t){var n=t.schema,r=Wu();
828return b.useEffect(function(){return Object.entries(n).forEach(function(i){var s=zs(i,2),a=s[0],o=s[1];FY("update-combine ".concat(a),o),r.emitter.emit("update-combine",a,o)}),function(){Object.entries(n).forEach(function(i){var s=zs(i,1),a=s[0];FY("update-remove ".concat(a)),r.emitter.emit("update-remove",a)})}},[]),null},n8=function e(t){var n=t.schema,r=t.onlyValidateSchema,i=Wu(),s=i.getOptions,a=s(),o=a.components,c=b.useMemo(function(){var u=m7e(n,r),d=u.properties,h=u.conditions,p=u.components,g=d.map(function(w){if(w.includes("ui:")&&w.split(":").length!==3)return{$id:w.split("ui:")[1]};var S=n.required&&n.required.includes(w)?!0:void 0,E=yc(),T=Y.createElement(K7e,{name:w,schema:n,key:"schema-field-".concat(w,"-").concat(E),required:S});return{Component:T}}),v=p.map(function(w){if(w["ui:control"]){var S=o[w["ui:control"]],E=Y.createElement(S,null,Y.createElement(e,{schema:w}));return{Component:E,$id:w.$id}}}),x=h.map(function(w,S){var E=w.then,T=w.$id,N=w.thenProps,A=w.if.properties,k=function(P){var V=P.formApi,U=P.scope;return Object.entries(A).every(function(G){var Q=zs(G,2),Z=Q[0],K=Q[1];return zde(K,V.getValue(U?"".concat(U,".").concat(Z):Z))})},j=Y.createElement(_5,{key:"Conditional-ScheamField-".concat(S),when:k},E?Y.createElement(e,{schema:E}):null,N?Y.createElement(Y7e,{schema:N}):null);return{Component:j,$id:T}}),_=[];return g.forEach(function(w){var S=w.$id,E=w.Component;if(E)_.push(E);else if(S){var T=x.find(function(k){return k.$id===S}),N=v.find(function(k){return k.$id===S});if(T){_.push(T.Component);var A=x.findIndex(function(k){return k.$id===S});x.splice(A,1)}else if(N)_.push(N.Component);else throw console.error("MappedConditionals",x),new Error("Unable to find mapping for ".concat(S))}else throw new Error("Found property with no ID or component...")}),x.forEach(function(w){var S=w.Component;_.push(S)}),_},[n]);return c},X7e=["name","items","uiBefore","uiAfter"],Q7e=function(t){var n=t.name,r=t.items,i=t.uiBefore,s=t.uiAfter,a=qu(t,X7e);return Y.createElement(z2,Ya({name:n},a),Y.createElement(DY,{components:i}),Y.createElement(z2.Items,null,function(){return Y.createElement(Y.Fragment,null,Y.createElement(n8,{schema:r}))}),Y.createElement(DY,{components:s}))};function Z7e(e){var t=Uh(fr({type:"text"},e)),n=t.informed,r=t.render,i=t.userProps,s=t.ref;return r(Y.createElement("input",Ya({},n,i,{ref:s,type:"hidden"})))}var J7e={string:xk,number:xk,boolean:MY,select:PY,input:xk,textarea:P7e,checkbox:MY,radio:$7e,add:U7e,remove:H7e,hidden:Z7e,array:Q7e,withOptions:{string:PY}},eze=["children"],tze=xa("informed:Form "),nze=function(t){var n=t.children,r=qu(t,eze);tze("Render FORM");var i=j7e(fr({adapter:J7e},r)),s=i.formApi,a=i.formController,o=i.formState,c=i.render,u=i.userProps,d=function(){var p={formState:o,formApi:s};return typeof n=="function"?n(p):n};return c(Y.createElement("form",Ya({},u,{noValidate:!0,onReset:a.reset,onSubmit:a.submitForm,onKeyDown:a.keyDown}),d()))};xa("informed:Form ");xa("informed:useMultistepStep ");xa("informed:Informed ");xa("informed:useInformedState ");xa("informed:useInformedField ");const LY=b.memo(b.forwardRef(({className:e,...t},n)=>l.jsx("span",{ref:n,className:$e("text-sm text-placeholder",e),...t}))),rze=b.memo(function({className:t,...n}){return l.jsx("p",{className:$e("text-xs -mt-1 text-danger",t),...n})}),Bde=b.memo(function({description:t,onCheckedChange:n,...r}){return l.jsx(Lu,{...r,type:"checkbox",render:({userProps:i,ref:s,fieldApi:a,fieldState:o})=>l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(N0,{ref:s,value:o.value,checked:o.value,onCheckedChange:c=>{n?.(c),a.setValue(c),a.setTouched(!0),a.setFocused(!0)},variant:o.showError?"danger":"primary",...i,disabled:i.disabled||i.readOnly}),t&&l.jsx(ot,{htmlFor:i.id,className:"text-sm font-normal",children:t})]})})}),zo=b.memo(function({type:t="text",...n}){return l.jsx(Lu,{...n,type:t==="number"?"number":"text",render:({userProps:r,ref:i,informed:s,fieldState:a})=>{var o;return r.readOnly&&t==="hidden"?null:r.readOnly?l.jsx("p",{className:"text-primary",children:(o=a.value)!==null&&o!==void 0?o:"-"}):l.jsx(fn,{ref:i,variant:a.showError?"danger":"default",type:t,...r,...s})}})}),r8=b.memo(function({children:t,onOpenChange:n,onCloseAutoFocus:r,onValueChange:i,renderValue:s,...a}){return l.jsx(Lu,{type:"select",...a,render:({userProps:o,ref:c,fieldApi:u,fieldState:d})=>{const{disabled:h,readOnly:p,...g}=o;return p&&s?l.jsx("p",{className:"text-primary",children:d.value?s(d.value):"â"}):l.jsx(tr,{ref:c,value:d.value,variant:d.showError?"danger":"default",onValueChange:v=>{u.setValue(v),i?.(v)},onCloseAutoFocus:v=>{u.setTouched(!0),r?.(v)},onOpenChange:v=>{u.setFocused(v),n?.(v)},disabled:h||p,...g,children:t})}})});r8.Item=b.memo(Yt);const ize=b.memo(function({rows:t=4,...n}){return l.jsx(Lu,{type:"textArea",...n,render:({userProps:r,ref:i,informed:s,fieldState:a})=>{var o;return r.readOnly?l.jsx("p",{className:"text-primary",children:(o=a.value)!==null&&o!==void 0?o:"-"}):l.jsx(xh,{ref:i,rows:t,variant:a.showError?"danger":"default",...r,...s})}})}),Ude=b.createContext(void 0);function $y(){const e=b.useContext(Ude);if(!e)throw new Error("No FormContext found when calling useFormContext.");return e}const sze={errors:{required:"This field is required"},labels:{optional:"optional"}},Vde=b.createContext(sze);function Hde(){const e=b.useContext(Vde);if(!e)throw new Error("No FormTranslationsContext found when calling useFormTranslationsContext.");return e}var Rr;(function(e){e.assertEqual=i=>{};function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const s={};for(const a of i)s[a]=a;return s},e.getValidEnumValues=i=>{const s=e.objectKeys(i).filter(o=>typeof i[i[o]]!="number"),a={};for(const o of s)a[o]=i[o];return e.objectValues(a)},e.objectValues=i=>e.objectKeys(i).map(function(s){return i[s]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const s=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&s.push(a);return s},e.find=(i,s)=>{for(const a of i)if(s(a))return a}
vendor: 10,617 bytes, line 828
828,e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function r(i,s=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(s)}e.joinValues=r,e.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(Rr||(Rr={}));var i8;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(i8||(i8={}));const an=Rr.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Vf=e=>{switch(typeof e){case"undefined":return an.undefined;case"string":return an.string;case"number":return Number.isNaN(e)?an.nan:an.number;case"boolean":return an.boolean;case"function":return an.function;case"bigint":return an.bigint;case"symbol":return an.symbol;case"object":return Array.isArray(e)?an.array:e===null?an.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?an.promise:typeof Map<"u"&&e instanceof Map?an.map:typeof Set<"u"&&e instanceof Set?an.set:typeof Date<"u"&&e instanceof Date?an.date:an.object;default:return an.unknown}},Tt=Rr.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),aze=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class dl extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(s){return s.message},r={_errors:[]},i=s=>{for(const a of s.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let o=r,c=0;for(;c<a.path.length;){const u=a.path[c];c===a.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(n(a))):o[u]=o[u]||{_errors:[]},o=o[u],c++}}};return i(this),r}static assert(t){if(!(t instanceof dl))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Rr.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)if(i.path.length>0){const s=i.path[0];n[s]=n[s]||[],n[s].push(t(i))}else r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}dl.create=e=>new dl(e);const oy=(e,t)=>{let n;switch(e.code){case Tt.invalid_type:e.received===an.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Tt.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Rr.jsonStringifyReplacer)}`;break;case Tt.unrecognized_keys:n=`Unrecognized key(s) in object: ${Rr.joinValues(e.keys,", ")}`;break;case Tt.invalid_union:n="Invalid input";break;case Tt.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Rr.joinValues(e.options)}`;break;case Tt.invalid_enum_value:n=`Invalid enum value. Expected ${Rr.joinValues(e.options)}, received '${e.received}'`;break;case Tt.invalid_arguments:n="Invalid function arguments";break;case Tt.invalid_return_type:n="Invalid function return type";break;case Tt.invalid_date:n="Invalid date";break;case Tt.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Rr.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Tt.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case Tt.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case Tt.custom:n="Invalid input";break;case Tt.invalid_intersection_types:n="Intersection results could not be merged";break;case Tt.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Tt.not_finite:n="Number must be finite";break;default:n=t.defaultError,Rr.assertNever(e)}return{message:n}};let qde=oy;function oze(e){qde=e}function BN(){return qde}const UN=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,s=[...n,...i.path||[]],a={...i,path:s};if(i.message!==void 0)return{...i,path:s,message:i.message};let o="";const c=r.filter(u=>!!u).slice().reverse();for(const u of c)o=u(a,{data:t,defaultError:o}).message;return{...i,path:s,message:o}},lze=[];function Qt(e,t){const n=BN(),r=UN({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===oy?void 0:oy].filter(i=>!!i)});e.common.issues.push(r)}class _o{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Pn;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const s=await i.key,a=await i.value;r.push({key:s,value:a})}return _o.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:s,value:a}=i;if(s.status==="aborted"||a.status==="aborted")return Pn;s.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(r[s.value]=a.value)}return{status:t.value,value:r}}}const Pn=Object.freeze({status:"aborted"}),r1=e=>({status:"dirty",value:e}),Uo=e=>({status:"valid",value:e}),s8=e=>e.status==="aborted",a8=e=>e.status==="dirty",O0=e=>e.status==="valid",$2=e=>typeof Promise<"u"&&e instanceof Promise;var Sn;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Sn||(Sn={}));class Vd{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const zY=(e,t)=>{if(O0(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new dl(e.common.issues);return this._error=n,this._error}}};function Yn(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(a,o)=>{const{message:c}=e;return a.code==="invalid_enum_value"?{message:c??o.defaultError}:typeof o.data>"u"?{message:c??r??o.defaultError}:a.code!=="invalid_type"?{message:o.defaultError}:{message:c??n??o.defaultError}},description:i}}class lr{get description(){return this._def.description}_getType(t){return Vf(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Vf(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new _o,ctx:{common:t.parent.common,data:t.data,parsedType:Vf(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if($2(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Vf(t)},i=this._parseSync({data:t,path:r.path,parent:r});return zY(r,i)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Vf(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return O0(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(r=>O0(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Vf(t)},i=this._parse({data:t,path:r.path,parent:r}),s=await($2(i)?i:Promise.resolve(i));return zY(r,s)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,s)=>{const a=t(i),o=()=>s.addIssue({code:Tt.custom,...r(i)});
vendor: 4,857 bytes, line 828
828return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(o(),!1)):a?!0:(o(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Fu({schema:this,typeName:Dn.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return bu.create(this,this._def)}nullable(){return Ch.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Rc.create(this)}promise(){return cy.create(this,this._def)}or(t){return H2.create([this,t],this._def)}and(t){return q2.create(this,t,this._def)}transform(t){return new Fu({...Yn(this._def),schema:this,typeName:Dn.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new X2({...Yn(this._def),innerType:this,defaultValue:n,typeName:Dn.ZodDefault})}brand(){return new D7({typeName:Dn.ZodBranded,type:this,...Yn(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Q2({...Yn(this._def),innerType:this,catchValue:n,typeName:Dn.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return pE.create(this,t)}readonly(){return Z2.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const cze=/^c[^\s-]{8,}$/i,uze=/^[0-9a-z]+$/,dze=/^[0-9A-HJKMNP-TV-Z]{26}$/i,fze=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,hze=/^[a-z0-9_-]{21}$/i,pze=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,mze=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,gze=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,xze="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let dP;const vze=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,yze=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,bze=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,_ze=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,wze=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Sze=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}
vendor: 23,206 bytes, line 828
828(=)?))?$/,Wde="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Eze=new RegExp(`^${Wde}$`);function Gde(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function Cze(e){return new RegExp(`^${Gde(e)}$`)}function Kde(e){let t=`${Wde}T${Gde(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function Tze(e,t){return!!((t==="v4"||!t)&&vze.test(e)||(t==="v6"||!t)&&bze.test(e))}function Aze(e,t){if(!pze.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||"typ"in i&&i?.typ!=="JWT"||!i.alg||t&&i.alg!==t)}catch{return!1}}function kze(e,t){return!!((t==="v4"||!t)&&yze.test(e)||(t==="v6"||!t)&&_ze.test(e))}class gu extends lr{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==an.string){const s=this._getOrReturnCtx(t);return Qt(s,{code:Tt.invalid_type,expected:an.string,received:s.parsedType}),Pn}const r=new _o;let i;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(i=this._getOrReturnCtx(t,i),Qt(i,{code:Tt.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")t.data.length>s.value&&(i=this._getOrReturnCtx(t,i),Qt(i,{code:Tt.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const a=t.data.length>s.value,o=t.data.length<s.value;(a||o)&&(i=this._getOrReturnCtx(t,i),a?Qt(i,{code:Tt.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):o&&Qt(i,{code:Tt.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")gze.test(t.data)||(i=this._getOrReturnCtx(t,i),Qt(i,{validation:"email",code:Tt.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")dP||(dP=new RegExp(xze,"u")),dP.test(t.data)||(i=this._getOrReturnCtx(t,i),Qt(i,{validation:"emoji",code:Tt.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")fze.test(t.data)||(i=this._getOrReturnCtx(t,i),Qt(i,{validation:"uuid",code:Tt.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")hze.test(t.data)||(i=this._getOrReturnCtx(t,i),Qt(i,{validation:"nanoid",code:Tt.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")cze.test(t.data)||(i=this._getOrReturnCtx(t,i),Qt(i,{validation:"cuid",code:Tt.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")uze.test(t.data)||(i=this._getOrReturnCtx(t,i),Qt(i,{validation:"cuid2",code:Tt.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")dze.test(t.data)||(i=this._getOrReturnCtx(t,i),Qt(i,{validation:"ulid",code:Tt.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),Qt(i,{validation:"url",code:Tt.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),Qt(i,{validation:"regex",code:Tt.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(t,i),Qt(i,{code:Tt.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(i=this._getOrReturnCtx(t,i),Qt(i,{code:Tt.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(i=this._getOrReturnCtx(t,i),Qt(i,{code:Tt.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?Kde(s).test(t.data)||(i=this._getOrReturnCtx(t,i),Qt(i,{code:Tt.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?Eze.test(t.data)||(i=this._getOrReturnCtx(t,i),Qt(i,{code:Tt.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?Cze(s).test(t.data)||(i=this._getOrReturnCtx(t,i),Qt(i,{code:Tt.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?mze.test(t.data)||(i=this._getOrReturnCtx(t,i),Qt(i,{validation:"duration",code:Tt.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?Tze(t.data,s.version)||(i=this._getOrReturnCtx(t,i),Qt(i,{validation:"ip",code:Tt.invalid_string,message:s.message}),r.dirty()):s.kind==="jwt"?Aze(t.data,s.alg)||(i=this._getOrReturnCtx(t,i),Qt(i,{validation:"jwt",code:Tt.invalid_string,message:s.message}),r.dirty()):s.kind==="cidr"?kze(t.data,s.version)||(i=this._getOrReturnCtx(t,i),Qt(i,{validation:"cidr",code:Tt.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?wze.test(t.data)||(i=this._getOrReturnCtx(t,i),Qt(i,{validation:"base64",code:Tt.invalid_string,message:s.message}),r.dirty()):s.kind==="base64url"?Sze.test(t.data)||(i=this._getOrReturnCtx(t,i),Qt(i,{validation:"base64url",code:Tt.invalid_string,message:s.message}),r.dirty()):Rr.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:Tt.invalid_string,...Sn.errToObj(r)})}_addCheck(t){return new gu({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Sn.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Sn.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Sn.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Sn.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Sn.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Sn.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Sn.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Sn.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Sn.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Sn.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Sn.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Sn.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Sn.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...Sn.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...Sn.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Sn.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Sn.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...Sn.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Sn.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Sn.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Sn.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Sn.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Sn.errToObj(n)})}nonempty(t){return this.min(1,Sn.errToObj(t))}trim(){return new gu({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new gu({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new gu({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}gu.create=e=>new gu({checks:[],typeName:Dn.ZodString,coerce:e?.coerce??!1,...Yn(e)});function Nze(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,s=Number.parseInt(e.toFixed(i).replace(".","")),a=Number.parseInt(t.toFixed(i).replace(".",""));return s%a/10**i}class xm extends lr{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==an.number){const s=this._getOrReturnCtx(t);return Qt(s,{code:Tt.invalid_type,expected:an.number,received:s.parsedType}),Pn}let r;const i=new _o;for(const s of this._def.checks)s.kind==="int"?Rr.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),Qt(r,{code:Tt.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),Qt(r,{code:Tt.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),Qt(r,{code:Tt.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?Nze(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),Qt(r,{code:Tt.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),Qt(r,{code:Tt.not_finite,message:s.message}),i.dirty()):Rr.assertNever(s);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Sn.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Sn.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Sn.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Sn.toString(n))}setLimit(t,n,r,i){return new xm({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Sn.toString(i)}]})}_addCheck(t){return new xm({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Sn.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Sn.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Sn.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Sn.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Sn.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Sn.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Sn.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Sn.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Sn.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Rr.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}xm.create=e=>new xm({checks:[],typeName:Dn.ZodNumber,coerce:e?.coerce||!1,...Yn(e)});class vm extends lr{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==an.bigint)return this._getInvalidInput(t);let r;const i=new _o;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),Qt(r,{code:Tt.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),Qt(r,{code:Tt.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),Qt(r,{code:Tt.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):Rr.assertNever(s);return{status:i.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return Qt(n,{code:Tt.invalid_type,expected:an.bigint,received:n.parsedType}),Pn}gte(t,n){return this.setLimit("min",t,!0,Sn.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Sn.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Sn.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Sn.toString(n))}setLimit(t,n,r,i){return new vm({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Sn.toString(i)}]})}_addCheck(t){return new vm({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Sn.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Sn.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Sn.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Sn.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Sn.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}vm.create=e=>new vm({checks:[],typeName:Dn.ZodBigInt,coerce:e?.coerce??!1,...Yn(e)});class B2 extends lr{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==an.boolean){const r=this._getOrReturnCtx(t);return Qt(r,{code:Tt.invalid_type,expected:an.boolean,received:r.parsedType}),Pn}return Uo(t.data)}}B2.create=e=>new B2({typeName:Dn.ZodBoolean,coerce:e?.coerce||!1,...Yn(e)});class P0 extends lr{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==an.date){const s=this._getOrReturnCtx(t);return Qt(s,{code:Tt.invalid_type,expected:an.date,received:s.parsedType}),Pn}if(Number.isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return Qt(s,{code:Tt.invalid_date}),Pn}const r=new _o;let i;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(i=this._getOrReturnCtx(t,i),Qt(i,{code:Tt.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(i=this._getOrReturnCtx(t,i),Qt(i,{code:Tt.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):Rr.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new P0({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Sn.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Sn.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}P0.create=e=>new P0({checks:[],coerce:e?.coerce||!1,typeName:Dn.ZodDate,...Yn(e)});class VN extends lr{_parse(t){if(this._getType(t)!==an.symbol){const r=this._getOrReturnCtx(t);return Qt(r,{code:Tt.invalid_type,expected:an.symbol,received:r.parsedType}),Pn}return Uo(t.data)}}VN.create=e=>new VN({typeName:Dn.ZodSymbol,...Yn(e)});class U2 extends lr{_parse(t){if(this._getType(t)!==an.undefined){const r=this._getOrReturnCtx(t);return Qt(r,{code:Tt.invalid_type,expected:an.undefined,received:r.parsedType}),Pn}return Uo(t.data)}}U2.create=e=>new U2({typeName:Dn.ZodUndefined,...Yn(e)});class V2 extends lr{_parse(t){if(this._getType(t)!==an.null){const r=this._getOrReturnCtx(t);return Qt(r,{code:Tt.invalid_type,expected:an.null,received:r.parsedType}),Pn}return Uo(t.data)}}V2.create=e=>new V2({typeName:Dn.ZodNull,...Yn(e)});class ly extends lr{constructor(){super(...arguments),this._any=!0}_parse(t){return Uo(t.data)}}ly.create=e=>new ly({typeName:Dn.ZodAny,...Yn(e)});class l0 extends lr{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Uo(t.data)}}l0.create=e=>new l0({typeName:Dn.ZodUnknown,...Yn(e)});class Eh extends lr{_parse(t){const n=this._getOrReturnCtx(t);return Qt(n,{code:Tt.invalid_type,expected:an.never,received:n.parsedType}),Pn}}Eh.create=e=>new Eh({typeName:Dn.ZodNever,...Yn(e)});class HN extends lr{_parse(t){if(this._getType(t)!==an.undefined){const r=this._getOrReturnCtx(t);return Qt(r,{code:Tt.invalid_type,expected:an.void,received:r.parsedType}),Pn}return Uo(t.data)}}HN.create=e=>new HN({typeName:Dn.ZodVoid,...Yn(e)});class Rc extends lr{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==an.array)return Qt(n,{code:Tt.invalid_type,expected:an.array,received:n.parsedType}),Pn;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,o=n.data.length<i.exactLength.value;(a||o)&&(Qt(n,{code:a?Tt.too_big:Tt.too_small,minimum:o?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(Qt(n,{code:Tt.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(Qt(n,{code:Tt.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,o)=>i.type._parseAsync(new Vd(n,a,n.path,o)))).then(a=>_o.mergeArray(r,a));const s=[...n.data].map((a,o)=>i.type._parseSync(new Vd(n,a,n.path,o)));return _o.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new Rc({...this._def,minLength:{value:t,message:Sn.toString(n)}})}max(t,n){return new Rc({...this._def,maxLength:{value:t,message:Sn.toString(n)}})}length(t,n){return new Rc({...this._def,exactLength:{value:t,message:Sn.toString(n)}})}nonempty(t){return this.min(1,t)}}Rc.create=(e,t)=>new Rc({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Dn.ZodArray,...Yn(t)});function Kv(e){if(e instanceof Xi){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=bu.create(Kv(r))}return new Xi({...e._def,shape:()=>t})}else return e instanceof Rc?new Rc({...e._def,type:Kv(e.element)}):e instanceof bu?bu.create(Kv(e.unwrap())):e instanceof Ch?Ch.create(Kv(e.unwrap())):e instanceof Hd?Hd.create(e.items.map(t=>Kv(t))):e}class Xi extends lr{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Rr.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==an.object){const u=this._getOrReturnCtx(t);return Qt(u,{code:Tt.invalid_type,expected:an.object,received:u.parsedType}),Pn}const{status:r,ctx:i}=this._processInputParams(t),{shape:s,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof Eh&&this._def.unknownKeys==="strip"))for(const u in i.data)a.includes(u)||o.push(u);const c=[];for(const u of a){const d=s[u],h=i.data[u];c.push({key:{status:"valid",value:u},value:d._parse(new Vd(i,h,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof Eh){const u=this._def.unknownKeys;if(u==="passthrough")for(const d of o)c.push({key:{status:"valid",value:d},value:{status:"valid",value:i.data[d]}});else if(u==="strict")o.length>0&&(Qt(i,{code:Tt.unrecognized_keys,keys:o}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const d of o){const h=i.data[d];c.push({key:{status:"valid",value:d},value:u._parse(new Vd(i,h,i.path,d)),alwaysSet:d in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const u=[];for(const d of c){const h=await d.key,p=await d.value;u.push({key:h,value:p,alwaysSet:d.alwaysSet})}return u}).then(u=>_o.mergeObjectSync(r,u)):_o.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return Sn.errToObj,new Xi({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{const i=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:Sn.errToObj(t).message??i}:{message:i}}}:{}})}strip(){return new Xi({...this._def,unknownKeys:"strip"})}passthrough(){return new Xi({...this._def,unknownKeys:"passthrough"})}extend(t){return new Xi({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Xi({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Dn.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Xi({...this._def,catchall:t})}pick(t){const n={};for(const r of Rr.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Xi({...this._def,shape:()=>n})}omit(t){const n={};for(const r of Rr.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Xi({...this._def,shape:()=>n})}deepPartial(){return Kv(this)}partial(t){const n={};for(const r of Rr.objectKeys(this.shape)){const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}return new Xi({...this._def,shape:()=>n})}required(t){const n={};for(const r of Rr.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof bu;)s=s._def.innerType;n[r]=s}return new Xi({...this._def,shape:()=>n})}keyof(){return Yde(Rr.objectKeys(this.shape))}}Xi.create=(e,t)=>
vendor: 9,891 bytes, line 828
828new Xi({shape:()=>e,unknownKeys:"strip",catchall:Eh.create(),typeName:Dn.ZodObject,...Yn(t)});Xi.strictCreate=(e,t)=>new Xi({shape:()=>e,unknownKeys:"strict",catchall:Eh.create(),typeName:Dn.ZodObject,...Yn(t)});Xi.lazycreate=(e,t)=>new Xi({shape:e,unknownKeys:"strip",catchall:Eh.create(),typeName:Dn.ZodObject,...Yn(t)});class H2 extends lr{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(s){for(const o of s)if(o.result.status==="valid")return o.result;for(const o of s)if(o.result.status==="dirty")return n.common.issues.push(...o.ctx.common.issues),o.result;const a=s.map(o=>new dl(o.ctx.common.issues));return Qt(n,{code:Tt.invalid_union,unionErrors:a}),Pn}if(n.common.async)return Promise.all(r.map(async s=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(i);{let s;const a=[];for(const c of r){const u={...n,common:{...n.common,issues:[]},parent:null},d=c._parseSync({data:n.data,path:n.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!s&&(s={result:d,ctx:u}),u.common.issues.length&&a.push(u.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(c=>new dl(c));return Qt(n,{code:Tt.invalid_union,unionErrors:o}),Pn}}get options(){return this._def.options}}H2.create=(e,t)=>new H2({options:e,typeName:Dn.ZodUnion,...Yn(t)});const If=e=>e instanceof G2?If(e.schema):e instanceof Fu?If(e.innerType()):e instanceof K2?[e.value]:e instanceof ym?e.options:e instanceof Y2?Rr.objectValues(e.enum):e instanceof X2?If(e._def.innerType):e instanceof U2?[void 0]:e instanceof V2?[null]:e instanceof bu?[void 0,...If(e.unwrap())]:e instanceof Ch?[null,...If(e.unwrap())]:e instanceof D7||e instanceof Z2?If(e.unwrap()):e instanceof Q2?If(e._def.innerType):[];class w5 extends lr{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==an.object)return Qt(n,{code:Tt.invalid_type,expected:an.object,received:n.parsedType}),Pn;const r=this.discriminator,i=n.data[r],s=this.optionsMap.get(i);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(Qt(n,{code:Tt.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Pn)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const s of n){const a=If(s.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const o of a){if(i.has(o))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(o)}`);i.set(o,s)}}return new w5({typeName:Dn.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Yn(r)})}}function o8(e,t){const n=Vf(e),r=Vf(t);if(e===t)return{valid:!0,data:e};if(n===an.object&&r===an.object){const i=Rr.objectKeys(t),s=Rr.objectKeys(e).filter(o=>i.indexOf(o)!==-1),a={...e,...t};for(const o of s){const c=o8(e[o],t[o]);if(!c.valid)return{valid:!1};a[o]=c.data}return{valid:!0,data:a}}else if(n===an.array&&r===an.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let s=0;s<e.length;s++){const a=e[s],o=t[s],c=o8(a,o);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return n===an.date&&r===an.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class q2 extends lr{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(s,a)=>{if(s8(s)||s8(a))return Pn;const o=o8(s.value,a.value);return o.valid?((a8(s)||a8(a))&&n.dirty(),{status:n.value,value:o.data}):(Qt(r,{code:Tt.invalid_intersection_types}),Pn)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,a])=>i(s,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}q2.create=(e,t,n)=>new q2({left:e,right:t,typeName:Dn.ZodIntersection,...Yn(n)});class Hd extends lr{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==an.array)return Qt(r,{code:Tt.invalid_type,expected:an.array,received:r.parsedType}),Pn;if(r.data.length<this._def.items.length)return Qt(r,{code:Tt.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Pn;!this._def.rest&&r.data.length>this._def.items.length&&(Qt(r,{code:Tt.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((a,o)=>{const c=this._def.items[o]||this._def.rest;return c?c._parse(new Vd(r,a,r.path,o)):null}).filter(a=>!!a);return r.common.async?Promise.all(s).then(a=>_o.mergeArray(n,a)):_o.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new Hd({...this._def,rest:t})}}Hd.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Hd({items:e,typeName:Dn.ZodTuple,rest:null,...Yn(t)})};class W2 extends lr{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==an.object)return Qt(r,{code:Tt.invalid_type,expected:an.object,received:r.parsedType}),Pn;const i=[],s=this._def.keyType,a=this._def.valueType;for(const o in r.data)i.push({key:s._parse(new Vd(r,o,r.path,o)),value:a._parse(new Vd(r,r.data[o],r.path,o)),alwaysSet:o in r.data});return r.common.async?_o.mergeObjectAsync(n,i):_o.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof lr?new W2({keyType:t,valueType:n,typeName:Dn.ZodRecord,...Yn(r)}):new W2({keyType:gu.create(),valueType:t,typeName:Dn.ZodRecord,...Yn(n)})}}class qN extends lr{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==an.map)return Qt(r,{code:Tt.invalid_type,expected:an.map,received:r.parsedType}),Pn;const i=this._def.keyType,s=this._def.valueType,a=[...r.data.entries()].map(([o,c],u)=>({key:i._parse(new Vd(r,o,r.path,[u,"key"])),value:s._parse(new Vd(r,c,r.path,[u,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const c of a){const u=await c.key,d=await c.value;if(u.status==="aborted"||d.status==="aborted")return Pn;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),o.set(u.value,d.value)}return{status:n.value,value:o}})}else{const o=new Map;for(const c of a){const u=c.key,d=c.value;if(u.status==="aborted"||d.status==="aborted")return Pn;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),o.set(u.value,d.value)}return{status:n.value,value:o}}}}qN.create=(e,t,n)=>new qN({valueType:t,keyType:e,typeName:Dn.ZodMap,...Yn(n)});class M0 extends lr{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==an.set)return Qt(r,{code:Tt.invalid_type,expected:an.set,received:r.parsedType}),Pn;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(Qt(r,{code:Tt.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(Qt(r,{code:Tt.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const s=this._def.valueType;function a(c){const u=new Set;for(const d of c){if(d.status==="aborted")return Pn;d.status==="dirty"&&n.dirty(),u.add(d.value)}return{status:n.value,value:u}}const o=[...r.data.values()].map((c,u)=>s._parse(new Vd(r,c,r.path,u)));return r.common.async?Promise.all(o).then(c=>a(c)):a(o)}min(t,n){return new M0({...this._def,minSize:{value:t,message:Sn.toString(n)}})}max(t,n){return new M0({...this._def,maxSize:{value:t,message:Sn.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}M0.create=(e,t)=>new M0({valueType:e,minSize:null,maxSize:null,typeName:Dn.ZodSet,...Yn(t)});class A1 extends lr{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==an.function)return Qt(n,{code:Tt.invalid_type,expected:an.function,received:n.parsedType}),Pn;function r(o,c){return UN({data:o,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,BN(),oy].filter(u=>!!u),issueData:{code:Tt.invalid_arguments,argumentsError:c}})}function i(o,c){return UN({data:o,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,BN(),oy].filter(u=>!!u),issueData:{code:Tt.invalid_return_type,returnTypeError:c}})}const s={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof cy){const o=this;return Uo(async function(...c){const u=new dl([]),d=await o._def.args.parseAsync(c,s).catch(g=>{throw u.addIssue(r(c,g)),u}),h=await Reflect.apply(a,this,d);return await o._def.returns._def.type.parseAsync(h,s).catch(g=>{throw u.addIssue(i(h,g)),u})})}else{const o=this;return Uo(function(...c){const u=o._def.args.safeParse(c,s);if(!u.success)throw new dl([r(c,u.error)]);const d=Reflect.apply(a,this,u.data),h=o._def.returns.safeParse(d,s);if(!h.success)throw new dl([i(d,h.error)]);return h.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new A1({...this._def,args:Hd.create(t).rest(l0.create())})}returns(t){return new A1({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new A1({args:t||Hd.create([]).rest(l0.create()),returns:n||l0.create(),typeName:Dn.ZodFunction,...Yn(r)})}}class G2 extends lr{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}G2.create=(e,t)=>
vendor: 4,384 bytes, line 828
828new G2({getter:e,typeName:Dn.ZodLazy,...Yn(t)});class K2 extends lr{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Qt(n,{received:n.data,code:Tt.invalid_literal,expected:this._def.value}),Pn}return{status:"valid",value:t.data}}get value(){return this._def.value}}K2.create=(e,t)=>new K2({value:e,typeName:Dn.ZodLiteral,...Yn(t)});function Yde(e,t){return new ym({values:e,typeName:Dn.ZodEnum,...Yn(t)})}class ym extends lr{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return Qt(n,{expected:Rr.joinValues(r),received:n.parsedType,code:Tt.invalid_type}),Pn}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return Qt(n,{received:n.data,code:Tt.invalid_enum_value,options:r}),Pn}return Uo(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return ym.create(t,{...this._def,...n})}exclude(t,n=this._def){return ym.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}ym.create=Yde;class Y2 extends lr{_parse(t){const n=Rr.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==an.string&&r.parsedType!==an.number){const i=Rr.objectValues(n);return Qt(r,{expected:Rr.joinValues(i),received:r.parsedType,code:Tt.invalid_type}),Pn}if(this._cache||(this._cache=new Set(Rr.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const i=Rr.objectValues(n);return Qt(r,{received:r.data,code:Tt.invalid_enum_value,options:i}),Pn}return Uo(t.data)}get enum(){return this._def.values}}Y2.create=(e,t)=>new Y2({values:e,typeName:Dn.ZodNativeEnum,...Yn(t)});class cy extends lr{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==an.promise&&n.common.async===!1)return Qt(n,{code:Tt.invalid_type,expected:an.promise,received:n.parsedType}),Pn;const r=n.parsedType===an.promise?n.data:Promise.resolve(n.data);return Uo(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}cy.create=(e,t)=>new cy({type:e,typeName:Dn.ZodPromise,...Yn(t)});class Fu extends lr{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Dn.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,s={addIssue:a=>{Qt(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){const a=i.transform(r.data,s);if(r.common.async)return Promise.resolve(a).then(async o=>{if(n.value==="aborted")return Pn;const c=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return c.status==="aborted"?Pn:c.status==="dirty"||n.value==="dirty"?r1(c.value):c});{if(n.value==="aborted")return Pn;const o=this._def.schema._parseSync({data:a,path:r.path,parent:r});return o.status==="aborted"?Pn:o.status==="dirty"||n.value==="dirty"?r1(o.value):o}}if(i.type==="refinement"){const a=o=>{const c=i.refinement(o,s);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Pn:(o.status==="dirty"&&n.dirty(),a(o.value),{status:n.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?Pn:(o.status==="dirty"&&n.dirty(),a(o.value).then(()=>({status:n.value,value:o.value}))))}if(i.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!O0(a))return Pn;const o=i.transform(a.value,s);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>O0(a)?Promise.resolve(i.transform(a.value,s)).then(o=>({status:n.value,value:o})):Pn);Rr.assertNever(i)}}
vendor: 5,663 bytes, line 828
828Fu.create=(e,t,n)=>new Fu({schema:e,typeName:Dn.ZodEffects,effect:t,...Yn(n)});Fu.createWithPreprocess=(e,t,n)=>new Fu({schema:t,effect:{type:"preprocess",transform:e},typeName:Dn.ZodEffects,...Yn(n)});class bu extends lr{_parse(t){return this._getType(t)===an.undefined?Uo(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}bu.create=(e,t)=>new bu({innerType:e,typeName:Dn.ZodOptional,...Yn(t)});class Ch extends lr{_parse(t){return this._getType(t)===an.null?Uo(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ch.create=(e,t)=>new Ch({innerType:e,typeName:Dn.ZodNullable,...Yn(t)});class X2 extends lr{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===an.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}X2.create=(e,t)=>new X2({innerType:e,typeName:Dn.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Yn(t)});class Q2 extends lr{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return $2(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new dl(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new dl(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Q2.create=(e,t)=>new Q2({innerType:e,typeName:Dn.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Yn(t)});class WN extends lr{_parse(t){if(this._getType(t)!==an.nan){const r=this._getOrReturnCtx(t);return Qt(r,{code:Tt.invalid_type,expected:an.nan,received:r.parsedType}),Pn}return{status:"valid",value:t.data}}}WN.create=e=>new WN({typeName:Dn.ZodNaN,...Yn(e)});const jze=Symbol("zod_brand");class D7 extends lr{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class pE extends lr{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Pn:s.status==="dirty"?(n.dirty(),r1(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Pn:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new pE({in:t,out:n,typeName:Dn.ZodPipeline})}}class Z2 extends lr{_parse(t){const n=this._def.innerType._parse(t),r=i=>(O0(i)&&(i.value=Object.freeze(i.value)),i);return $2(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}Z2.create=(e,t)=>new Z2({innerType:e,typeName:Dn.ZodReadonly,...Yn(t)});function $Y(e,t){const n=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof n=="string"?{message:n}:n}function Xde(e,t={},n){return e?ly.create().superRefine((r,i)=>{const s=e(r);if(s instanceof Promise)return s.then(a=>{if(!a){const o=$Y(t,r),c=o.fatal??n??!0;i.addIssue({code:"custom",...o,fatal:c})}});if(!s){const a=$Y(t,r),o=a.fatal??n??!0;i.addIssue({code:"custom",...a,fatal:o})}}):ly.create()}const Rze={object:Xi.lazycreate};var Dn;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Dn||(Dn={}));const Ize=(e,t={message:`Input not instance of ${e.name}`})=>Xde(n=>n instanceof e,t),B=gu.create,Ge=xm.create,Oze=WN.create,Pze=vm.create,mt=B2.create,ql=P0.create,Mze=VN.create,Qde=U2.create,Dze=V2.create,J2=ly.create,$s=l0.create,Fze=Eh.create,Lze=HN.create,lt=Rc.create,_e=Xi.create,zze=Xi.strictCreate,mE=H2.create,zm=w5.create,$ze=q2.create,Bze=Hd.create,ns=W2.create,Uze=qN.create,Vze=M0.create,Hze=A1.create,qze=G2.create,kn=K2.create,Bn=ym.create,Ft=Y2.create,Wze=cy.create,BY=Fu.create,Gze=bu.create,Kze=Ch.create,F7=Fu.createWithPreprocess,Yze=pE.create,Xze=()=>B().optional(),Qze=()=>Ge().optional(),Zze=()=>mt().optional(),co={string:(e=>gu.create({...e,coerce:!0})),number:(e=>xm.create({...e,coerce:!0})),boolean:(e=>B2.create({...e,coerce:!0})),bigint:(e=>vm.create({...e,coerce:!0})),date:(e=>P0.create({...e,coerce:!0}))},Jze=Pn,xu=Object.freeze(Object.defineProperty({__proto__:null,BRAND:jze,DIRTY:r1,EMPTY_PATH:lze,INVALID:Pn,NEVER:Jze,OK:Uo,ParseStatus:_o,Schema:lr,ZodAny:ly,ZodArray:Rc,ZodBigInt:vm,ZodBoolean:B2,ZodBranded:D7,ZodCatch:Q2,ZodDate:P0,ZodDefault:X2,ZodDiscriminatedUnion:w5,ZodEffects:Fu,ZodEnum:ym,ZodError:dl,get ZodFirstPartyTypeKind(){return Dn},ZodFunction:A1,ZodIntersection:q2,ZodIssueCode:Tt,ZodLazy:G2,ZodLiteral:K2,ZodMap:q
828N,ZodNaN:WN,ZodNativeEnum:Y2,ZodNever:Eh,ZodNull:V2,ZodNullable:Ch,ZodNumber:xm,ZodObject:Xi,ZodOptional:bu,ZodParsedType:an,ZodPipeline:pE,ZodPromise:cy,ZodReadonly:Z2,ZodRecord:W2,ZodSchema:lr,ZodSet:M0,ZodString:gu,ZodSymbol:VN,ZodTransformer:Fu,ZodTuple:Hd,ZodType:lr,ZodUndefined:U2,ZodUnion:H2,ZodUnknown:l0,ZodVoid:HN,addIssueToContext:Qt,any:J2,array:lt,bigint:Pze,boolean:mt,coerce:co,custom:Xde,date:ql,datetimeRegex:Kde,defaultErrorMap:oy,discriminatedUnion:zm,effect:BY,enum:Bn,function:Hze,getErrorMap:BN,getParsedType:Vf,instanceof:Ize,intersection:$ze,isAborted:s8,isAsync:$2,isDirty:a8,isValid:O0,late:Rze,lazy:qze,literal:kn,makeIssue:UN,map:Uze,nan:Oze,nativeEnum:Ft,never:Fze,null:Dze,nullable:Kze,number:Ge,object:_e,get objectUtil(){return i8},oboolean:Zze,onumber:Qze,optional:Gze,ostring:Xze,pipeline:Yze,preprocess:F7,promise:Wze,quotelessJson:aze,record:ns,set:Vze,setErrorMap:oze,strictObject:zze,string:B,symbol:Mze,transformer:BY,tuple:Bze,undefined:Qde,union:mE,unknown:$s,get util(){return Rr},void:Lze},Symbol.toStringTag,{value:"Module"}));function e$e(e){return e instanceof dl}function UY(e){if(e)return t=>{try{e.parse(t)}catch(n){if(e$e(n))return n.errors[0].message;throw n}}}function t$e(e,t){if(!t)return;const n=e.split(".");let r=t;for(const i of n){if(r instanceof bu&&(r=r.unwrap()),r instanceof Rc&&(r=r.element),!(r instanceof Xi))return;r=r.shape[i]}return r}const n$e=Zl("relative flex gap-2 transition-all",{variants:{layout:{vertical:"w-full flex-col",horizontal:"w-full flex-row items-center",inline:"w-auto flex-row items-center"}}});function Lu({className:e,layout:t="vertical",children:n,label:r,name:i,type:s="text",position:a="end",required:o,size:c,tooltip:u,showOptional:d,render:h,zodItemSchema:p,...g}){const v=b.useId(),x=Hde(),_=zy(i),{disabled:w,loading:S,readOnly:E,showOptional:T,zodSchema:N}=$y(),A=UY(p||t$e(_,N)),k=Uh({id:v,name:i,type:s,disabled:S||w||g.disabled,readOnly:E||g.readOnly,required:o,validate:A,...g}),{userProps:j,...R}=k,{showError:P,error:V}=k.fieldState,{type:U,...G}=j;return k.render(l.jsxs("div",{className:$e(n$e({layout:t}),P&&"pb-3",e),children:[a==="start"&&h({userProps:G,...R,label:r}),r&&l.jsxs(ot,{className:"inline-flex items-center gap-1",size:c,htmlFor:v,children:[r,u&&l.jsx(T0,{title:u,children:l.jsx(LY,{className:"cursor-help",children:l.jsx(ax,{size:14})})}),(d??T)&&!o&&l.jsxs(LY,{children:["(",x.labels.optional,")"]})]}),a==="end"&&h({userProps:G,...R,label:r}),P&&l.jsx(rze,{className:"animate-in fade-in absolute -bottom-2",children:V})]}))}const r$e=b.memo(function({description:t,type:n="button",onCheckedChange:r,...i}){return l.jsx(Lu,{...i,type:"checkbox",render:({userProps:s,ref:a,fieldApi:o,fieldState:c})=>l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Di,{ref:a,value:c.value,checked:c.value,onCheckedChange:u=>{r?.(u),o.setValue(u),o.setTouched(!0),o.setFocused(!0)},variant:c.showError?"danger":"primary",...s,disabled:s.disabled||s.readOnly,type:"button"}),t&&l.jsx(ot,{htmlFor:s.id,className:"text-sm font-normal",children:t})]})})});function S5({initialValues:e,onSubmit:t,readOnly:n=!1,disabled:r=!1,loading:i=!1,showOptional:s=!1,zodSchema:a,...o}){const[c,u]=b.useState(!1),d=Hde(),h=b.useMemo(()=>({initialValues:e,disabled:r,readOnly:n,loading:i||c,showOptional:s,zodSchema:a}),[e,r,i,n,a,s,c]),p=b.useCallback(async g=>{b.startTransition(()=>{u(!0)});try{await t?.(g)}finally{b.startTransition(()=>{u(!1)})}},[t]);return l.jsx(Ude.Provider,{value:h,children:l.jsx(nze,{className:$e("group/form",n&&"is-read-only",r&&"is-disabled"),initialValues:e,onSubmit:p,errorMessage:{required:d.errors.required},...o})})}function E5({visible:e=!0,className:t}){return e?l.jsx("div",{className:$e("absolute flex size-full items-center justify-center bg-white/75 text-primary z-50",t),children:l.jsx(Kr,{className:"size-10 animate-spin"})}):null}function i$e(){const{i18n:e,_:t}=Me();return b.useMemo(()=>({actions:{success:{title:e._({id:"idD8Ev"}),message:e._({id:"tY5uvA"})},fail:{title:e._({id:"gla9Gg"}),message:e._({id:"R6Doo/"})}},errors:{required:e._({id:"D1TNJL"})},labels:{optional:e._({id:"AWA6XY"})}}),[t])}var s$e=Object.create,Zde=Object.defineProperty,a$e=Object.getOwnPropertyDescriptor,Jde=Object.getOwnPropertyNames,o$e=Object.getPrototypeOf,l$e=Object.prototype.hasOwnProperty,Jd=(e,t)=>function(){return t||(0,e[Jde(e)[0]])((t={exports:{}}).exports,t),t.exports},c$e=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=Jde(t),s=0,a=i.length,o;s<a;s++)o=i[s],!l$e.call(e,o)&&o!==n&&Zde(e,o,{get:(c=>t[c]).bind(null,o),enumerable:!(r=a$e(t,o))||r.enumerable});return e},Bs=(e,t,n)=>(n=e!=null?s$e(o$e(e)):{},c$e(t||!e||!e.__esModule?Zde(n,"default",{value:e,enumerable:!0}):n,e)),efe=Jd({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(e,t){function n(r){"@babel/helpers - typeof";return t.exports=n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i}
828,t.exports.__esModule=!0,t.exports.default=t.exports,n(r)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),u$e=Jd({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(e,t){var n=efe().default;function r(i,s){if(n(i)!="object"||!i)return i;var a=i[Symbol.toPrimitive];if(a!==void 0){var o=a.call(i,s||"default");if(n(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(i)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),d$e=Jd({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(e,t){var n=efe().default,r=u$e();function i(s){var a=r(s,"string");return n(a)=="symbol"?a:a+""}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}}),dx=Jd({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(e,t){var n=d$e();function r(i,s,a){return(s=n(s))in i?Object.defineProperty(i,s,{value:a,enumerable:!0,configurable:!0,writable:!0}):i[s]=a,i}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),Gu=Jd({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(e,t){var n=dx();function r(s,a){var o=Object.keys(s);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(s);a&&(c=c.filter(function(u){return Object.getOwnPropertyDescriptor(s,u).enumerable})),o.push.apply(o,c)}return o}function i(s){for(var a=1;a<arguments.length;a++){var o=arguments[a]!=null?arguments[a]:{};a%2?r(Object(o),!0).forEach(function(c){n(s,c,o[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(o)):r(Object(o)).forEach(function(c){Object.defineProperty(s,c,Object.getOwnPropertyDescriptor(o,c))})}return s}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}});function By(e){const t={subscribe(n){let r=null,i=!1,s=!1,a=!1;function o(){if(r===null){a=!0;return}s||(s=!0,typeof r=="function"?r():r&&r.unsubscribe())}return r=e({next(c){var u;i||(u=n.next)===null||u===void 0||u.call(n,c)},error(c){var u;i||(i=!0,(u=n.error)===null||u===void 0||u.call(n,c),o())},complete(){var c;i||(i=!0,(c=n.complete)===null||c===void 0||c.call(n),o())}}),a&&o(),{unsubscribe:o}},pipe(...n){return n.reduce(f$e,t)}};return t}function f$e(e,t){return t(e)}function h$e(e){const t=new AbortController;return new Promise((r,i)=>{let s=!1;function a(){s||(s=!0,o.unsubscribe())}t.signal.addEventListener("abort",()=>{i(t.signal.reason)});const o=e.subscribe({next(c){s=!0,r(c),a()},error(c){i(c)},complete(){t.abort(),a()}})})}function p$e(e){return t=>{let n=0,r=null;const i=[];function s(){r||(r=t.subscribe({next(o){for(const u of i){var c;(c=u.next)===null||c===void 0||c.call(u,o)}},error(o){for(const u of i){var c;(c=u.error)===null||c===void 0||c.call(u,o)}},complete(){for(const c of i){var o;(o=c.complete)===null||o===void 0||o.call(c)}}}))}function a(){if(n===0&&r){const o=r;r=null,o.unsubscribe()}}return By(o=>(n++,i.push(o),s(),{unsubscribe(){n--,a();const c=i.findIndex(u=>u===o);c>-1&&i.splice(c,1)}}))}}function m$e(e){let t=e;const n=[],r=a=>{t!==void 0&&a.next(t),n.push(a)},i=a=>{n.splice(n.indexOf(a),1)},s=By(a=>(r(a),()=>{i(a)}));return s.next=a=>{if(t!==a){t=a;for(const o of n)o.next(a)}},s.get=()=>t,s}function tfe(e){return By(t=>{function n(i=0,s=e.op){const a=e.links[i];if(!a)throw new Error("No more links to execute - did you forget to add an ending link?");return a({op:s,next(c){return n(i+1,c)}})}return n().subscribe(t)})}function VY(e){return Array.isArray(e)?e:[e]}function g$e(e){return t=>{const n=VY(e.true).map(i=>i(t)),r=VY(e.false).map(i=>i(t));return i=>By(s=>{const a=e.condition(i.op)?n:r;return tfe({op:i.op,links:a}).subscribe(s)})}}function D0(e){return!!e&&!Array.isArray(e)&&typeof e=="object"}const x$e=typeof Symbol=="function"&&!!Symbol.asyncIterator;function nfe(e){return x$e&&D0(e)&&Symbol.asyncIterator in e}const HY=e=>e();var v$e=Object.create,rfe=Object.defineProperty,y$e=Object.getOwnPropertyDescriptor,ife=Object.getOwnPropertyNames,b$e=Object.getPrototypeOf,_$e=Object.prototype.hasOwnProperty,Ku=(e,t)=>function(){return t||(0,e[ife(e)[0]])((t={exports:{}}).exports,t),t.exports},w$e=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=ife(t),s=0,a=i.length,o;s<a;s++)o=i[s],!_$e.call(e,o)&&o!==n&&rfe(e,o,{get:(c=>t[c]).bind(null,o),enumerable:!(r=y$e(t,o))||r.enumerable});return e},Li=(e,t,n)=>(n=e!=null?v$e(b$e(e)):{},w$e(rfe(n,"default",{value:e,enumerable:!0}),e));const sfe=()=>{},qY=e=>{Object.freeze&&Object.freeze(e)};function afe(e,t,n){var r;const i=t.join(".");return(r=n[i])!==null&&r!==void 0||(n[i]=new Proxy(sfe,{get(s,a){if(!(typeof a!="string"||a==="then"))return afe(e,[...t,a],n)},apply(s,a,o){const c=t[t.length-1];let u={args:o,path:t};return c==="call"?u={args:o.length>=2?[o[1]]:[],path:t.slice(0,-1)}:c==="apply"&&(u={args:o.length>=2?o[1]:[],path:t.slice(0,-1)}),qY(u.args),qY(u.path),e(u)}})),n[i]}const C5=e=>afe(e,[],Object.create(null)),L7=e=>new Proxy(sfe,{get(t,n){if(n!=="then")return e(n)}});var ofe=Ku({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(e,t){function n(r){"@babel/helpers - typeof";return t.exports=n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i}
828,t.exports.__esModule=!0,t.exports.default=t.exports,n(r)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),S$e=Ku({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(e,t){var n=ofe().default;function r(i,s){if(n(i)!="object"||!i)return i;var a=i[Symbol.toPrimitive];if(a!==void 0){var o=a.call(i,s||"default");if(n(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(i)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),E$e=Ku({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(e,t){var n=ofe().default,r=S$e();function i(s){var a=r(s,"string");return n(a)=="symbol"?a:a+""}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}}),z7=Ku({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(e,t){var n=E$e();function r(i,s,a){return(s=n(s))in i?Object.defineProperty(i,s,{value:a,enumerable:!0,configurable:!0,writable:!0}):i[s]=a,i}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),gE=Ku({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(e,t){var n=z7();function r(s,a){var o=Object.keys(s);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(s);a&&(c=c.filter(function(u){return Object.getOwnPropertyDescriptor(s,u).enumerable})),o.push.apply(o,c)}return o}function i(s){for(var a=1;a<arguments.length;a++){var o=arguments[a]!=null?arguments[a]:{};a%2?r(Object(o),!0).forEach(function(c){n(s,c,o[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(o)):r(Object(o)).forEach(function(c){Object.defineProperty(s,c,Object.getOwnPropertyDescriptor(o,c))})}return s}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}});Li(gE());Li(z7());var tA=Li(gE());function C$e(e,t){if("error"in e){const r=t.deserialize(e.error);return{ok:!1,error:(0,tA.default)((0,tA.default)({},e),{},{error:r})}}return{ok:!0,result:(0,tA.default)((0,tA.default)({},e.result),(!e.result.type||e.result.type==="data")&&{type:"data",data:t.deserialize(e.result.data)})}}var fP=class extends Error{constructor(){super("Unable to transform response from server")}};function T$e(e,t){let n;try{n=C$e(e,t)}catch{throw new fP}if(!n.ok&&(!D0(n.error.error)||typeof n.error.error.code!="number"))throw new fP;if(n.ok&&!D0(n.result))throw new fP;return n}Li(gE());Li(gE());Li(z7());var WY,GY,KY,YY;(GY=(WY=Symbol).dispose)!==null&&GY!==void 0||(WY.dispose=Symbol());(YY=(KY=Symbol).asyncDispose)!==null&&YY!==void 0||(KY.asyncDispose=Symbol());function A$e(e,t){const n=e,r=n[Symbol.dispose];return n[Symbol.dispose]=()=>{t(),r?.()},n}var xE=Ku({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(e,t){function n(){var r=typeof SuppressedError=="function"?SuppressedError:function(o,c){var u=Error();return u.name="SuppressedError",u.error=o,u.suppressed=c,u},i={},s=[];function a(o,c){if(c!=null){if(Object(c)!==c)throw new TypeError("using declarations can only be used with objects, functions, null, or undefined.");if(o)var u=c[Symbol.asyncDispose||Symbol.for("Symbol.asyncDispose")];if(u===void 0&&(u=c[Symbol.dispose||Symbol.for("Symbol.dispose")],o))var d=u;if(typeof u!="function")throw new TypeError("Object is not disposable.");d&&(u=function(){try{d.call(c)}catch(p){return Promise.reject(p)}}),s.push({v:c,d:u,a:o})}else o&&s.push({d:c,a:o});return c}return{e:i,u:a.bind(null,!1),a:a.bind(null,!0),d:function(){var c,u=this.e,d=0;function h(){for(;c=s.pop();)try{if(!c.a&&d===1)return d=0,s.push(c),Promise.resolve().then(h);if(c.d){var g=c.d.call(c.v);if(c.a)return d|=2,Promise.resolve(g).then(h,p)}else d|=1}catch(v){return p(v)}if(d===1)return u!==i?Promise.reject(u):Promise.resolve();if(u!==i)throw u}function p(g){return u=u!==i?new r(g,u):g,h()}return h()}}}
828t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),$7=Ku({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js"(e,t){function n(r,i){this.v=r,this.k=i}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),vE=Ku({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js"(e,t){var n=$7();function r(i){return new n(i,0)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),Uy=Ku({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js"(e,t){var n=$7();function r(s){return function(){return new i(s.apply(this,arguments))}}function i(s){var a,o;function c(d,h){try{var p=s[d](h),g=p.value,v=g instanceof n;Promise.resolve(v?g.v:g).then(function(x){if(v){var _=d==="return"?"return":"next";if(!g.k||x.done)return c(_,x);x=s[_](x).value}u(p.done?"return":"normal",x)},function(x){c("throw",x)})}catch(x){u("throw",x)}}function u(d,h){switch(d){case"return":a.resolve({value:h,done:!0});break;case"throw":a.reject(h);break;default:a.resolve({value:h,done:!1})}(a=a.next)?c(a.key,a.arg):o=null}this._invoke=function(d,h){return new Promise(function(p,g){var v={key:d,arg:h,resolve:p,reject:g,next:null};o?o=o.next=v:(a=o=v,c(d,h))})},typeof s.return!="function"&&(this.return=void 0)}i.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},i.prototype.next=function(s){return this._invoke("next",s)},i.prototype.throw=function(s){return this._invoke("throw",s)},i.prototype.return=function(s){return this._invoke("return",s)},t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}});Li(xE());Li(vE());Li(Uy());function k$e(){let e,t;return{promise:new Promise((r,i)=>{e=r,t=i}),resolve:e,reject:t}}Li(xE());Li(vE());Li(Uy());Li(xE());Li(vE());Li(Uy());var lfe=Ku({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"(e,t){function n(i){var s,a,o,c=2;for(typeof Symbol<"u"&&(a=Symbol.asyncIterator,o=Symbol.iterator);c--;){if(a&&(s=i[a])!=null)return s.call(i);if(o&&(s=i[o])!=null)return new r(s.call(i));a="@@asyncIterator",o="@@iterator"}throw new TypeError("Object is not async iterable")}function r(i){function s(a){if(Object(a)!==a)return Promise.reject(new TypeError(a+" is not an object."));var o=a.done;return Promise.resolve(a.value).then(function(c){return{value:c,done:o}})}return r=function(o){this.s=o,this.n=o.next},r.prototype={s:null,n:null,next:function(){return s(this.n.apply(this.s,arguments))},return:function(o){var c=this.s.return;return c===void 0?Promise.resolve({value:o,done:!0}):s(c.apply(this.s,arguments))},throw:function(o){var c=this.s.return;return c===void 0?Promise.reject(o):s(c.apply(this.s,arguments))}},new r(i)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),N$e=Li(vE()),j$e=Li(Uy()),XY=Li(xE());Li(lfe());const R$e=0,I$e=1,O$e=0,P$e=1,M$e=0,D$e=1,F$e=2;var QY=class extends Error{constructor(e){super("Received error from server"),this.data=e}};const L$e=e=>({getReader(){return new ReadableStream({start(n){e.on("data",r=>{n.enqueue(r)}),e.on("end",()=>{n.close()}),e.on("error",r=>{n.error(r)})}}).getReader()}});function z$e(e){const t="getReader"in e?e.getReader():L$e(e).getReader();let n="";return new ReadableStream({async pull(r){const{done:i,value:s}=await t.read();i?r.close():r.enqueue(s)},cancel(){return t.cancel()}}).pipeThrough(new TextDecoderStream).pipeThrough(new TransformStream({transform(r,i){var s;n+=r;const a=n.split(` 829`);n=(s=a.pop())!==null&&s!==void 0?s:"";for(const o of a)i.enqueue(o)}}))}function $$e(e){const t=z$e(e);let n=!1;return t.pipeThrough(new TransformStream({transform(r,i){if(n){const s=JSON.parse(r);i.enqueue(s)}else{const s=JSON.parse(r);i.enqueue(s),n=!0}}}))}function B$e(e){const t=new Map;function n(){return Array.from(t.values()).every(a=>a.closed)}function r(){let a;const o=new ReadableStream({start(d){a=d}}),c={enqueue:d=>a.enqueue(d),close:()=>{a.close(),u(),n()&&e.abort()},closed:!1,getReaderResource:()=>{const d=o.getReader();return A$e(d,()=>{c.close(),d.releaseLock()})},error:d=>{a.error(d),u()}};function u(){Object.assign(c,{closed:!0,close:()=>{},enqueue:()=>{},getReaderResource:null,error:()=>{}})}return c}function i(a){let o=t.get(a);return o||(o=r(),t.set(a,o)),o}function s(a){for(const o of t.values())o.error(a)}return{getOrCreate:i,cancelAll:s}}async function U$e(e){const{deserialize:t=c=>c}=e;let n=$$e(e.from);t&&(n=n.pipeThrough(new TransformStream({transform(c,u){u.enqueue(t(c))}})));let r=k$e();const i=B$e(e.abortController);function s(c){const[u,d,h]=c,p=i.getOrCreate(h);switch(d){case R$e:return HY(async()=>{try{var g=(0,XY.default)();const _=g.u(p.getReaderResource()),{value:w}=await _.read(),[S,E,T]=w;switch(E){case O$e:return a(T);case P$e:var v,x;throw(v=(x=e.formatError)===null||x===void 0?void 0:x.call(e,{error:T}))!==null&&v!==void 0?v:new QY(T)}}catch(_){g.e=_}finally{g.d()}});case I$e:return HY((0,j$e.default)(function*(){try{var g=(0,XY.default)();const _=g.u(p.getReaderResource());for(;;){const{value:w}=yield(0,N$e.default)(_.read()),[S,E,T]=w;switch(E){case D$e:yield a(T);break;case M$e:return a(T);case F$e:var v,x;throw(v=(x=e.formatError)===null||x===void 0?void 0:x.call(e,{error:T}))!==null&&v!==void 0?v:new QY(T)}}}catch(_){g.e=_}finally{g.d()}}))}}function a(c){const[[u],...d]=c;for(const h of d){const[p]=h,g=s(h);if(p===null)return g;u[p]=g}return u}const o=c=>{r?.reject(c),i.cancelAll(c)};return n.pipeTo(new WritableStream({write(c){if(r){const p=c;for(const[g,v]of Object.entries(c)){const x=a(v);p[g]=x}
829r.resolve(p),r=null;return}const u=c,[d]=u;i.getOrCreate(d).enqueue(u)},close:o,abort:o})).catch(c=>{var u;(u=e.onError)===null||u===void 0||u.call(e,{error:c}),o(c)}),[await r.promise]}var V$e=Ku({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/asyncGeneratorDelegate.js"(e,t){var n=$7();function r(i){var s={},a=!1;function o(c,u){return a=!0,u=new Promise(function(d){d(i[c](u))}),{done:!1,value:new n(u,1)}}return s[typeof Symbol<"u"&&Symbol.iterator||"@@iterator"]=function(){return this},s.next=function(c){return a?(a=!1,c):o("next",c)},typeof i.throw=="function"&&(s.throw=function(c){if(a)throw a=!1,c;return o("throw",c)}),typeof i.return=="function"&&(s.return=function(c){return a?(a=!1,c):o("return",c)}),s}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}});Li(lfe());Li(vE());Li(Uy());Li(V$e());Li(xE());Li(Uy());Li(gE());var nA=Bs(dx(),1),wv=Bs(Gu(),1);function H$e(e){return e instanceof _u}function q$e(e){return D0(e)&&D0(e.error)&&typeof e.error.code=="number"&&typeof e.error.message=="string"}function W$e(e,t){return typeof e=="string"?e:D0(e)&&typeof e.message=="string"?e.message:t}var _u=class vk extends Error{constructor(t,n){var r,i;const s=n?.cause;super(t,{cause:s}),(0,nA.default)(this,"cause",void 0),(0,nA.default)(this,"shape",void 0),(0,nA.default)(this,"data",void 0),(0,nA.default)(this,"meta",void 0),this.meta=n?.meta,this.cause=s,this.shape=n==null||(r=n.result)===null||r===void 0?void 0:r.error,this.data=n==null||(i=n.result)===null||i===void 0?void 0:i.error.data,this.name="TRPCClientError",Object.setPrototypeOf(this,vk.prototype)}static from(t,n={}){const r=t;return H$e(r)?(n.meta&&(r.meta=(0,wv.default)((0,wv.default)({},r.meta),n.meta)),r):q$e(r)?new vk(r.error.message,(0,wv.default)((0,wv.default)({},n),{},{result:r})):new vk(W$e(r,"Unknown error"),(0,wv.default)((0,wv.default)({},n),{},{cause:r}))}};function G$e(e){const t=e;return t?"input"in t?t:{input:t,output:t}:{input:{serialize:n=>n,deserialize:n=>n},output:{serialize:n=>n,deserialize:n=>n}}}const ZY=e=>typeof e=="function";function K$e(e){if(e)return e;if(typeof window<"u"&&ZY(window.fetch))return window.fetch;if(typeof globalThis<"u"&&ZY(globalThis.fetch))return globalThis.fetch;throw new Error("No fetch implementation found")}var Ow=Bs(Gu());function cfe(e){return{url:e.url.toString(),fetch:e.fetch,transformer:G$e(e.transformer),methodOverride:e.methodOverride}}function Y$e(e){const t={};for(let n=0;n<e.length;n++){const r=e[n];t[n]=r}return t}const X$e={query:"GET",mutation:"POST",subscription:"PATCH"};function ufe(e){return"input"in e?e.transformer.input.serialize(e.input):Y$e(e.inputs.map(t=>e.transformer.input.serialize(t)))}const eS=e=>{const t=e.url.split("?");let r=t[0].replace(/\/$/,"")+"/"+e.path;const i=[];if(t[1]&&i.push(t[1]),"inputs"in e&&i.push("batch=1"),e.type==="query"||e.type==="subscription"){const s=ufe(e);s!==void 0&&e.methodOverride!=="POST"&&i.push(`input=${encodeURIComponent(JSON.stringify(s))}`)}return i.length&&(r+="?"+i.join("&")),r},dfe=e=>{if(e.type==="query"&&e.methodOverride!=="POST")return;const t=ufe(e);return t!==void 0?JSON.stringify(t):void 0},Q$e=e=>l8((0,Ow.default)((0,Ow.default)({},e),{},{contentTypeHeader:"application/json",getUrl:eS,getBody:dfe}));var Z$e=class extends Error{constructor(){const e="AbortError";super(e),this.name=e,this.message=e}};const J$e=e=>{var t;if(e?.aborted)throw(t=e.throwIfAborted)===null||t===void 0||t.call(e),typeof DOMException<"u"?new DOMException("AbortError","AbortError"):new Z$e};async function ffe(e){var t;J$e(e.signal);const n=e.getUrl(e),r=e.getBody(e),i=(t=e.methodOverride)!==null&&t!==void 0?t:X$e[e.type],s=await(async()=>{const o=await e.headers();return Symbol.iterator in o?Object.fromEntries(o):o})(),a=(0,Ow.default)((0,Ow.default)((0,Ow.default)({},e.contentTypeHeader&&i!=="GET"?{"content-type":e.contentTypeHeader}:{}),e.trpcAcceptHeader?{"trpc-accept":e.trpcAcceptHeader}:void 0),s);return K$e(e.fetch)(n,{method:i,signal:e.signal,body:r,headers:a})}async function l8(e){const t={},n=await ffe(e);t.response=n;const r=await n.json();return t.responseJSON=r,{json:r,meta:t}}function eBe(e){return e instanceof Uint8Array||e instanceof Blob}function tBe(e){return e instanceof FormData}var i1=Bs(Gu(),1);const nBe=e=>{if("input"in e){const{input:t}=e;if(tBe(t)){if(e.type!=="mutation"&&e.methodOverride!=="POST")throw new Error("FormData is only supported for mutations");return l8((0,i1.default)((0,i1.default)({},e),{},{contentTypeHeader:void 0,getUrl:eS,getBody:()=>t}))}if(eBe(t)){if(e.type!=="mutation"&&e.methodOverride!=="POST")throw new Error("Octet type input is only supported for mutations");return l8((0,i1.default)((0,i1.default)({},e),{},{contentTypeHeader:"application/octet-stream",getUrl:eS,getBody:()=>t}))}}return Q$e(e)};function rBe(e){const t=cfe(e);return()=>n=>{const{op:r}=n;return By(i=>{const{path:s,input:a,type:o}=r;/* istanbul ignore if -- @preserve */if(o==="subscription")throw new Error("Subscriptions are unsupported by `httpLink` - use `httpSubscriptionLink` or `wsLink`");const c=nBe((0,i1.default)((0,i1.default)({},t),{},{type:o,path:s,input:a,signal:r.signal,headers(){return e.headers?typeof e.headers=="function"?e.headers({op:r}):e.headers:{}}}));let u;return c.then(d=>{u=d.meta;const h=T$e(d.json,t.transformer.output);if(!h.ok){i.error(_u.from(h.error,{meta:u}));return}i.next({context:d.meta,result:h.result}),i.complete()}).catch(d=>{i.error(_u.from(d,{meta:u}))}),()=>{}})}}const JY=()=>{throw new Error("Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new")};function eX(e){let t=null,n=null;const r=()=>{clearTimeout(n),n=null,t=null};function i(o){const c=[[]];let u=0;for(;;){const p=o[u];if(!p)break;const g=c[c.length-1];if(p.aborted){var d;(d=p.reject)===null||d===void 0||d.call(p,new Error("Aborted")),u++;continue}if(e.validate(g.concat(p).map(x=>x.key))){g.push(p),u++;continue}if(g.length===0){var h;(h=p.reject)===null||h===void 0||h.call(p,new Error("Input is too big for a single dispatch")),u++;continue}c.push([])}return c}function s(){const o=i(t);r();for(const c of o){if(!c.length)continue;const u={items:c};
829for(const h of c)h.batch=u;e.fetch(u.items.map(h=>h.key)).then(async h=>{await Promise.all(h.map(async(g,v)=>{const x=u.items[v];try{var _;const S=await Promise.resolve(g);(_=x.resolve)===null||_===void 0||_.call(x,S)}catch(S){var w;(w=x.reject)===null||w===void 0||w.call(x,S)}x.batch=null,x.reject=null,x.resolve=null}));for(const g of u.items){var p;(p=g.reject)===null||p===void 0||p.call(g,new Error("Missing result")),g.batch=null}}).catch(h=>{for(const g of u.items){var p;(p=g.reject)===null||p===void 0||p.call(g,h),g.batch=null}})}}function a(o){var c;const u={aborted:!1,key:o,batch:null,resolve:JY,reject:JY},d=new Promise((h,p)=>{var g;u.reject=p,u.resolve=h,(g=t)!==null&&g!==void 0||(t=[]),t.push(u)});return(c=n)!==null&&c!==void 0||(n=setTimeout(s)),d}return{load:a}}function iBe(...e){const t=new AbortController,n=e.length;let r=0;const i=()=>{++r===n&&t.abort()};for(const s of e)s?.aborted?i():s?.addEventListener("abort",i,{once:!0});return t.signal}function sBe(...e){const t=new AbortController;for(const n of e)n?.aborted?t.abort():n?.addEventListener("abort",()=>t.abort(),{once:!0});return t.signal}Bs(Gu(),1);Bs(Gu(),1);const hfe=(e,...t)=>typeof e=="function"?e(...t):e;Bs(dx(),1);function aBe(){let e,t;return{promise:new Promise((r,i)=>{e=r,t=i}),resolve:e,reject:t}}async function oBe(e){const t=await hfe(e.url);if(!e.connectionParams)return t;const r=`${t.includes("?")?"&":"?"}connectionParams=1`;return t+r}async function lBe(e){const t={method:"connectionParams",data:await hfe(e)};return JSON.stringify(t)}Bs(dx(),1);var Fg=Bs(dx(),1);function cBe(e){const{promise:t,resolve:n,reject:r}=aBe();return e.addEventListener("open",()=>{e.removeEventListener("error",r),n()}),e.addEventListener("error",r),t}function uBe(e,{intervalMs:t,pongTimeoutMs:n}){let r,i;function s(){r=setTimeout(()=>{e.send("PING"),i=setTimeout(()=>{e.close()},n)},t)}function a(){clearTimeout(r),s()}function o(){clearTimeout(i),a()}e.addEventListener("open",s),e.addEventListener("message",({data:c})=>{clearTimeout(r),s(),c==="PONG"&&o()}),e.addEventListener("close",()=>{clearTimeout(r),clearTimeout(i)})}var dBe=class c8{constructor(t){var n;if((0,Fg.default)(this,"id",++c8.connectCount),(0,Fg.default)(this,"WebSocketPonyfill",void 0),(0,Fg.default)(this,"urlOptions",void 0),(0,Fg.default)(this,"keepAliveOpts",void 0),(0,Fg.default)(this,"wsObservable",m$e(null)),(0,Fg.default)(this,"openPromise",null),this.WebSocketPonyfill=(n=t.WebSocketPonyfill)!==null&&n!==void 0?n:WebSocket,!this.WebSocketPonyfill)throw new Error("No WebSocket implementation found - you probably don't want to use this on the server, but if you do you need to pass a `WebSocket`-ponyfill");this.urlOptions=t.urlOptions,this.keepAliveOpts=t.keepAlive}get ws(){return this.wsObservable.get()}set ws(t){this.wsObservable.next(t)}isOpen(){return!!this.ws&&this.ws.readyState===this.WebSocketPonyfill.OPEN&&!this.openPromise}isClosed(){return!!this.ws&&(this.ws.readyState===this.WebSocketPonyfill.CLOSING||this.ws.readyState===this.WebSocketPonyfill.CLOSED)}async open(){var t=this;if(t.openPromise)return t.openPromise;t.id=++c8.connectCount;const n=oBe(t.urlOptions).then(r=>new t.WebSocketPonyfill(r));t.openPromise=n.then(async r=>{t.ws=r,r.addEventListener("message",function({data:i}){i==="PING"&&this.send("PONG")}),t.keepAliveOpts.enabled&&uBe(r,t.keepAliveOpts),r.addEventListener("close",()=>{t.ws===r&&(t.ws=null)}),await cBe(r),t.urlOptions.connectionParams&&r.send(await lBe(t.urlOptions.connectionParams))});try{await t.openPromise}finally{t.openPromise=null}}async close(){var t=this;try{await t.openPromise}finally{var n;(n=t.ws)===null||n===void 0||n.close()}}};(0,Fg.default)(dBe,"connectCount",0);Bs(dx(),1);Bs(Gu(),1);var hP=Bs(dx(),1),tX=Bs(Gu(),1),T5=class{constructor(e){(0,hP.default)(this,"links",void 0),(0,hP.default)(this,"runtime",void 0),(0,hP.default)(this,"requestId",void 0),this.requestId=0,this.runtime={},this.links=e.links.map(t=>t(this.runtime))}$request(e){var t;return tfe({links:this.links,op:(0,tX.default)((0,tX.default)({},e),{},{context:(t=e.context)!==null&&t!==void 0?t:{},id:++this.requestId})}).pipe(p$e())}async requestAsPromise(e){var t=this;try{const n=t.$request(e);return(await h$e(n)).result.data}catch(n){throw _u.from(n)}}query(e,t,n){return this.requestAsPromise({type:"query",path:e,input:t,context:n?.context,signal:n?.signal})}mutation(e,t,n){return this.requestAsPromise({type:"mutation",path:e,input:t,context:n?.context,signal:n?.signal})}subscription(e,t,n){return this.$request({type:"subscription",path:e,input:t,context:n.context,signal:n.signal}).subscribe({next(i){switch(i.result.type){case"state":{var s;(s=n.onConnectionStateChange)===null||s===void 0||s.call(n,i.result);break}case"started":{var a;(a=n.onStarted)===null||a===void 0||a.call(n,{context:i.context});break}case"stopped":{var o;(o=n.onStopped)===null||o===void 0||o.call(n);break}case"data":case void 0:{var c;
829(c=n.onData)===null||c===void 0||c.call(n,i.result.data);break}}},error(i){var s;(s=n.onError)===null||s===void 0||s.call(n,i)},complete(){var i;(i=n.onComplete)===null||i===void 0||i.call(n)}})}};const pfe=Symbol.for("trpc_untypedClient"),fBe={query:"query",mutate:"mutation",subscribe:"subscription"},hBe=e=>fBe[e];function mfe(e){const t=C5(({path:n,args:r})=>{const i=[...n],s=hBe(i.pop()),a=i.join(".");return e[s](a,...r)});return L7(n=>n===pfe?e:t[n])}function gfe(e){const t=new T5(e);return mfe(t)}function B7(e){return e[pfe]}var rA=Bs(Gu(),1);function pBe(e){var t,n;const r=cfe(e),i=(t=e.maxURLLength)!==null&&t!==void 0?t:1/0,s=(n=e.maxItems)!==null&&n!==void 0?n:1/0;return()=>{const a=d=>({validate(h){if(i===1/0&&s===1/0)return!0;if(h.length>s)return!1;const p=h.map(x=>x.path).join(","),g=h.map(x=>x.input);return eS((0,rA.default)((0,rA.default)({},r),{},{type:d,path:p,inputs:g,signal:null})).length<=i},async fetch(h){const p=h.map(T=>T.path).join(","),g=h.map(T=>T.input),v=iBe(...h.map(T=>T.signal)),x=new AbortController,w=await ffe((0,rA.default)((0,rA.default)({},r),{},{signal:sBe(v,x.signal),type:d,contentTypeHeader:"application/json",trpcAcceptHeader:"application/jsonl",getUrl:eS,getBody:dfe,inputs:g,path:p,headers(){return e.headers?typeof e.headers=="function"?e.headers({opList:h}):e.headers:{}}})),[S]=await U$e({from:w.body,deserialize:T=>r.transformer.output.deserialize(T),formatError(T){const N=T.error;return _u.from({error:N})},abortController:x});return Object.keys(h).map(async T=>{let N=await Promise.resolve(S[T]);if("result"in N){const A=await Promise.resolve(N.result);N={result:{data:await Promise.resolve(A.data)}}}return{json:N,meta:{response:w}}})}}),o=eX(a("query")),c=eX(a("mutation")),u={query:o,mutation:c};return({op:d})=>By(h=>{/* istanbul ignore if -- @preserve */if(d.type==="subscription")throw new Error("Subscriptions are unsupported by `httpBatchStreamLink` - use `httpSubscriptionLink` or `wsLink`");const g=u[d.type].load(d);let v;return g.then(x=>{if(v=x,"error"in x.json){h.error(_u.from(x.json,{meta:x.meta}));return}else if("result"in x.json){h.next({context:x.meta,result:x.json.result}),h.complete();return}h.complete()}).catch(x=>{h.error(_u.from(x,{meta:v?.meta}))}),()=>{}})}}Bs(Gu(),1);var mBe=Jd({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"(e,t){function n(i){var s,a,o,c=2;for(typeof Symbol<"u"&&(a=Symbol.asyncIterator,o=Symbol.iterator);c--;){if(a&&(s=i[a])!=null)return s.call(i);if(o&&(s=i[o])!=null)return new r(s.call(i));a="@@asyncIterator",o="@@iterator"}throw new TypeError("Object is not async iterable")}function r(i){function s(a){if(Object(a)!==a)return Promise.reject(new TypeError(a+" is not an object."));var o=a.done;return Promise.resolve(a.value).then(function(c){return{value:c,done:o}})}return r=function(o){this.s=o,this.n=o.next},r.prototype={s:null,n:null,next:function(){return s(this.n.apply(this.s,arguments))},return:function(o){var c=this.s.return;return c===void 0?Promise.resolve({value:o,done:!0}):s(c.apply(this.s,arguments))},throw:function(o){var c=this.s.return;return c===void 0?Promise.reject(o):s(c.apply(this.s,arguments))}},new r(i)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}});Bs(mBe(),1);Bs(Gu(),1);var gBe=Jd({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(e,t){function n(){var r=typeof SuppressedError=="function"?SuppressedError:function(o,c){var u=Error();return u.name="SuppressedError",u.error=o,u.suppressed=c,u},i={},s=[];function a(o,c){if(c!=null){if(Object(c)!==c)throw new TypeError("using declarations can only be used with objects, functions, null, or undefined.");if(o)var u=c[Symbol.asyncDispose||Symbol.for("Symbol.asyncDispose")];if(u===void 0&&(u=c[Symbol.dispose||Symbol.for("Symbol.dispose")],o))var d=u;if(typeof u!="function")throw new TypeError("Object is not disposable.");d&&(u=function(){try{d.call(c)}catch(p){return Promise.reject(p)}}),s.push({v:c,d:u,a:o})}else o&&s.push({d:c,a:o});return c}return{e:i,u:a.bind(null,!1),a:a.bind(null,!0),d:function(){var c,u=this.e,d=0;function h(){for(;c=s.pop();)try{if(!c.a&&d===1)return d=0,s.push(c),Promise.resolve().then(h);if(c.d){var g=c.d.call(c.v);if(c.a)return d|=2,Promise.resolve(g).then(h,p)}else d|=1}catch(v){return p(v)}if(d===1)return u!==i?Promise.reject(u):Promise.resolve();if(u!==i)throw u}function p(g){return u=u!==i?new r(g,u):g,h()}return h()}}}
829t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),xfe=Jd({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js"(e,t){function n(r,i){this.v=r,this.k=i}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),xBe=Jd({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js"(e,t){var n=xfe();function r(i){return new n(i,0)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),vBe=Jd({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js"(e,t){var n=xfe();function r(s){return function(){return new i(s.apply(this,arguments))}}function i(s){var a,o;function c(d,h){try{var p=s[d](h),g=p.value,v=g instanceof n;Promise.resolve(v?g.v:g).then(function(x){if(v){var _=d==="return"?"return":"next";if(!g.k||x.done)return c(_,x);x=s[_](x).value}u(p.done?"return":"normal",x)},function(x){c("throw",x)})}catch(x){u("throw",x)}}function u(d,h){switch(d){case"return":a.resolve({value:h,done:!0});break;case"throw":a.reject(h);break;default:a.resolve({value:h,done:!1})}(a=a.next)?c(a.key,a.arg):o=null}this._invoke=function(d,h){return new Promise(function(p,g){var v={key:d,arg:h,resolve:p,reject:g,next:null};o?o=o.next=v:(a=o=v,c(d,h))})},typeof s.return!="function"&&(this.return=void 0)}i.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},i.prototype.next=function(s){return this._invoke("next",s)},i.prototype.throw=function(s){return this._invoke("throw",s)},i.prototype.return=function(s){return this._invoke("return",s)},t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}});Bs(gBe(),1);Bs(xBe(),1);Bs(vBe(),1);Bs(Gu(),1);function vfe(){return{generic:{title:Be._({id:"SlfejT"}),message:Be._({id:"fWsBTs"})},SUBSCRIPTION_LIMIT_REACHED:{title:Be._({id:"bloymM"}),message:Be._({id:"m3Kxh2"})},USER_DELETE_SELF:{title:Be._({id:"GQ+KxH"}),message:Be._({id:"e/QsaY"})},USER_DELETE_MULTIPLE_ORGANIZATIONS:{title:Be._({id:"GQ+KxH"}),message:Be._({id:"ceCDxw"})},ORGANIZATION_DELETE_SINGLE_USER_ORGANIZATION:{title:Be._({id:"FDiIO/"}),message:Be._({id:"kUqZsK"})},USER_REMOVE_LAST_ORGANIZATION:{title:Be._({id:"QFqxcG"}),message:Be._({id:"SW1egh"})},ORGANIZATION_DELETE_LAST_ORGANIZATION:{title:Be._({id:"FDiIO/"}),message:Be._({id:"jZb2p8"})},400:{title:Be._({id:"Bk1CFb"}),message:Be._({id:"ulJlQl"})},401:{title:Be._({id:"YYI83U"}),message:Be._({id:"zi9PBi"})},403:{title:Be._({id:"TCdDG8"}),message:Be._({id:"k5JVGk"})},404:{title:Be._({id:"pAtylB"}),message:Be._({id:"HlRa9a"})},409:{title:Be._({id:"IInnZo"}),message:Be._({id:"uXGpC9"})},413:{title:Be._({id:"QqMq/r"}),message:Be._({id:"74HPtJ"})},429:{title:Be._({id:"DxlBxS"}),message:Be._({id:"M68C8m"})},500:{title:Be._({id:"iSWuCp"}),message:Be._({id:"a/YZf+"})}}}function nX(e){Re.error(e.title,{description:e.message})}function rX(e){const t=vfe();if(e instanceof _u){const{data:n,message:r}=e,{httpStatus:i,errorIdentifier:s}=n||{},a=!!s&&s in t,o=a&&t[s]||i&&i in t&&t[i]||t.generic;nX({title:o.title,message:!a&&r?r:o.message});return}nX(t.generic)}const F0=new P3e({mutationCache:new pae({onError:(e,t,n,r)=>rX(e)}),queryCache:new mae({onError:(e,t)=>rX(e)}),defaultOptions:{mutations:{},queries:{staleTime:3e4,retry:!1,retryDelay:e=>Math.min(1e3*2**e,3e4)}}}),yfe=6048e5,yBe=864e5,bBe=6e4,_Be=36e5,iX=Symbol.for("constructDateFrom");function Dc(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&iX in e?e[iX](t):e instanceof Date?new e.constructor(t):new Date(t)}function hs(e,t){return Dc(t||e,e)}function wBe(e,t,n){const r=hs(e,n?.in);return isNaN(t)?Dc(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function SBe(e,t,n){const r=hs(e,n?.in);if(isNaN(t))return Dc(e,NaN);if(!t)return r;const i=r.getDate(),s=Dc(e,r.getTime());s.setMonth(r.getMonth()+t+1,0);const a=s.getDate();return i>=a?s:(r.setFullYear(s.getFullYear(),s.getMonth(),i),r)}function w_(e,t,n){const{years:r=0,months:i=0,weeks:s=0,days:a=0,hours:o=0,minutes:c=0,seconds:u=0}
vendor: 6,267 bytes, line 829
829=t,d=hs(e,n?.in),h=i||r?SBe(d,i+r*12):d,p=a||s?wBe(h,a+s*7):h,g=c+o*60,x=(u+g*60)*1e3;return Dc(e,+p+x)}let bfe={};function yE(){return bfe}function EBe(e){bfe=e}function tS(e,t){const n=yE(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=hs(e,t?.in),s=i.getDay(),a=(s<r?7:0)+s-r;return i.setDate(i.getDate()-a),i.setHours(0,0,0,0),i}function GN(e,t){return tS(e,{...t,weekStartsOn:1})}function _fe(e,t){const n=hs(e,t?.in),r=n.getFullYear(),i=Dc(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const s=GN(i),a=Dc(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const o=GN(a);return n.getTime()>=s.getTime()?r+1:n.getTime()>=o.getTime()?r:r-1}function sX(e){const t=hs(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function $m(e,...t){const n=Dc.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function u8(e,t){const n=hs(e,t?.in);return n.setHours(0,0,0,0),n}function wfe(e,t,n){const[r,i]=$m(n?.in,e,t),s=u8(r),a=u8(i),o=+s-sX(s),c=+a-sX(a);return Math.round((o-c)/yBe)}function CBe(e,t){const n=_fe(e,t),r=Dc(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),GN(r)}function Pw(e,t){const n=+hs(e)-+hs(t);return n<0?-1:n>0?1:n}function TBe(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function ABe(e){return!(!TBe(e)&&typeof e!="number"||isNaN(+hs(e)))}function kBe(e,t,n){const[r,i]=$m(n?.in,e,t),s=r.getFullYear()-i.getFullYear(),a=r.getMonth()-i.getMonth();return s*12+a}function NBe(e,t,n){const[r,i]=$m(n?.in,e,t);return r.getFullYear()-i.getFullYear()}function jBe(e,t,n){const[r,i]=$m(n?.in,e,t),s=aX(r,i),a=Math.abs(wfe(r,i));r.setDate(r.getDate()-s*a);const o=+(aX(r,i)===-s),c=s*(a-o);return c===0?0:c}function aX(e,t){const n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function U7(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function RBe(e,t,n){const[r,i]=$m(n?.in,e,t),s=(+r-+i)/_Be;return U7(n?.roundingMethod)(s)}function Sfe(e,t){return+hs(e)-+hs(t)}function IBe(e,t,n){const r=Sfe(e,t)/bBe;return U7(n?.roundingMethod)(r)}function Efe(e,t){const n=hs(e,t?.in);return n.setHours(23,59,59,999),n}function OBe(e,t){const n=hs(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function PBe(e,t){const n=hs(e,t?.in);return+Efe(n,t)==+OBe(n,t)}function MBe(e,t,n){const[r,i,s]=$m(n?.in,e,e,t),a=Pw(i,s),o=Math.abs(kBe(i,s));if(o<1)return 0;i.getMonth()===1&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-a*o);let c=Pw(i,s)===-a;PBe(r)&&o===1&&Pw(r,s)===1&&(c=!1);const u=a*(o-+c);return u===0?0:u}function DBe(e,t,n){const r=Sfe(e,t)/1e3;return U7(n?.roundingMethod)(r)}function FBe(e,t,n){const[r,i]=$m(n?.in,e,t),s=Pw(r,i),a=Math.abs(NBe(r,i));r.setFullYear(1584),i.setFullYear(1584);const o=Pw(r,i)===-s,c=s*(a-+o);return c===0?0:c}function LBe(e,t){const[n,r]=$m(e,t.start,t.end);return{start:n,end:r}}function zBe(e,t){const n=hs(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const $Be={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},BBe=(e,t,n)=>{let r;const i=$Be[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function k1(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const UBe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},VBe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},HBe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},qBe={date:k1({formats:UBe,defaultWidth:"full"}),time:k1({formats:VBe,defaultWidth:"full"}),dateTime:k1({formats:HBe,defaultWidth:"full"})},WBe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},GBe=(e,t,n,r)=>WBe[e];function md(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,o=n?.width?String(n.width):a;i=e.formattingValues[o]||e.formattingValues[a]}else{const a=e.defaultWidth,o=n?.width?String(n.width):e.defaultWidth;i=e.values[o]||e.values[a]}const s=e.argumentCallback?e.argumentCallback(t):t;return i[s]}}const KBe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},YBe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},XBe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},QBe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
829ay","Saturday"]},ZBe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},JBe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},eUe=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},tUe={ordinalNumber:eUe,era:md({values:KBe,defaultWidth:"wide"}),quarter:md({values:YBe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:md({values:XBe,defaultWidth:"wide"}),day:md({values:QBe,defaultWidth:"wide"}),dayPeriod:md({values:ZBe,defaultWidth:"wide",formattingValues:JBe,defaultFormattingWidth:"wide"})};function gd(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(i);if(!s)return null;const a=s[0],o=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(o)?rUe(o,h=>h.test(a)):nUe(o,h=>h.test(a));let u;u=e.valueCallback?e.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const d=t.slice(a.length);return{value:u,rest:d}}}function nUe(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function rUe(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Cfe(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],s=t.match(e.parsePattern);if(!s)return null;let a=e.valueCallback?e.valueCallback(s[0]):s[0];a=n.valueCallback?n.valueCallback(a):a;const o=t.slice(i.length);return{value:a,rest:o}}}const iUe=/^(\d+)(th|st|nd|rd)?/i,sUe=/\d+/i,aUe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},oUe={any:[/^b/i,/^(a|c)/i]},lUe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},cUe={any:[/1/i,/2/i,/3/i,/4/i]},uUe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},dUe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},fUe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},hUe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},pUe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},mUe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},gUe={ordinalNumber:Cfe({matchPattern:iUe,parsePattern:sUe,valueCallback:e=>parseInt(e,10)}),era:gd({matchPatterns:aUe,defaultMatchWidth:"wide",parsePatterns:oUe,defaultParseWidth:"any"}),quarter:gd({matchPatterns:lUe,defaultMatchWidth:"wide",parsePatterns:cUe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:gd({matchPatterns:uUe,defaultMatchWidth:"wide",parsePatterns:dUe,defaultParseWidth:"any"}),day:gd({matchPatterns:fUe,defaultMatchWidth:"wide",parsePatterns:hUe,defaultParseWidth:"any"}),dayPeriod:gd({matchPatterns:pUe,defaultMatchWidth:"any",parsePatterns:mUe,defaultParseWidth:"any"})},xUe={code:"en-US",formatDistance:BBe,formatLong:qBe,formatRelative:GBe,localize:tUe,match:gUe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function vUe(e,t){const n=hs(e,t?.in);return wfe(n,zBe(n))+1}function yUe(e,t){const n=hs(e,t?.in),r=+GN(n)-+CBe(n);return Math.round(r/yfe)+1}function Tfe(e,t){const n=hs(e,t?.in),r=n.getFullYear(),i=yE(),s=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,a=Dc(t?.in||e,0);a.setFullYear(r+1,0,s),a.setHours(0,0,0,0);const o=tS(a,t),c=Dc(t?.in||e,0);c.setFullYear(r,0,s),c.setHours(0,0,0,0);const u=tS(c,t);return+n>=+o?r+1:+n>=+u?r:r-1}function bUe(e,t){const n=yE(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=Tfe(e,t),s=Dc(t?.in||e,0);return s.setFullYear(i,0,r),s.setHours(0,0,0,0),tS(s,t)}function _Ue(e,t){const n=hs(e,t?.in),r=+tS(n,t)-+bUe(n,t);return Math.round(r/yfe)+1}function ii(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Ep={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return ii(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):ii(n+1,2)},d(e,t){return ii(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return ii(e.getHours()%12||12,t.length)},H(e,t){return ii(e.getHours(),t.length)},m(e,t){return ii(e.getMinutes(),t.length)},s(e,t){return ii(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return ii(i,t.length)}},Sv={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},oX={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Ep.y(e,t)}
vendor: 4,317 bytes, line 829
829,Y:function(e,t,n,r){const i=Tfe(e,r),s=i>0?i:1-i;if(t==="YY"){const a=s%100;return ii(a,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):ii(s,t.length)},R:function(e,t){const n=_fe(e);return ii(n,t.length)},u:function(e,t){const n=e.getFullYear();return ii(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return ii(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return ii(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Ep.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return ii(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=_Ue(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):ii(i,t.length)},I:function(e,t,n){const r=yUe(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):ii(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Ep.d(e,t)},D:function(e,t,n){const r=vUe(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):ii(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return ii(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return ii(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return ii(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Sv.noon:r===0?i=Sv.midnight:i=r/12>
vendor: 4,321 bytes, line 829
829=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Sv.evening:r>=12?i=Sv.afternoon:r>=4?i=Sv.morning:i=Sv.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Ep.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Ep.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):ii(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):ii(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ep.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Ep.s(e,t)},S:function(e,t){return Ep.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return cX(r);case"XXXX":case"XX":return Lg(r);case"XXXXX":case"XXX":default:return Lg(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return cX(r);case"xxxx":case"xx":return Lg(r);case"xxxxx":case"xxx":default:return Lg(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+lX(r,":");case"OOOO":default:return"GMT"+Lg(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+lX(r,":");case"zzzz":default:return"GMT"+Lg(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return ii(r,t.length)},T:function(e,t,n){return ii(+e,t.length)}};function lX(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),s=r%60;return s===0?n+String(i):n+String(i)+t+ii(s,2)}function cX(e,t){return e%60===0?(e>0?"-":"+")+ii(Math.abs(e)/60,2):Lg(e,t)}function Lg(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=ii(Math.trunc(r/60),2),s=ii(r%60,2);return n+i+t+s}const uX=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Afe=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},wUe=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return uX(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",uX(r,t)).replace("{{time}}",Afe(i,t))},SUe={p:Afe,P:wUe},EUe=/^D+$/,CUe=/^Y+$/,TUe=["D","DD","YY","YYYY"];function AUe(e){return EUe.test(e)}function kUe(e){return CUe.test(e)}function NUe(e,t,n){const r=jUe(e,t,n);if(console.warn(r),TUe.includes(e))throw new RangeError(r)}function jUe(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const RUe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,IUe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,OUe=/^'([^]*?)'?$/,PUe=/''/g,MUe=/[a-zA-Z]/;function kfe(e,t,n){const r=yE(),i=r.locale??xUe,s=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,o=hs(e,n?.in);if(!ABe(o))throw new RangeError("Invalid time value");let c=t.match(IUe).map(d=>{const h=d[0];if(h==="p"||h==="P"){const p=SUe[h];return p(d,i.formatLong)}return d}).join("").match(RUe).map(d=>{if(d==="''")return{isToken:!1,value:"'"};const h=d[0];if(h==="'")return{isToken:!1,value:DUe(d)};if(oX[h])return{isToken:!0,value:d};
829if(h.match(MUe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+h+"`");return{isToken:!1,value:d}});i.localize.preprocessor&&(c=i.localize.preprocessor(o,c));const u={firstWeekContainsDate:s,weekStartsOn:a,locale:i};return c.map(d=>{if(!d.isToken)return d.value;const h=d.value;(kUe(h)||AUe(h))&&NUe(h,t,String(e));const p=oX[h[0]];return p(o,h,i.localize,u)}).join("")}function DUe(e){const t=e.match(OUe);return t?t[1].replace(PUe,"'"):e}function FUe(e,t){const{start:n,end:r}=LBe(t?.in,e),i={},s=FBe(r,n);s&&(i.years=s);const a=w_(n,{years:i.years}),o=MBe(r,a);o&&(i.months=o);const c=w_(a,{months:i.months}),u=jBe(r,c);u&&(i.days=u);const d=w_(c,{days:i.days}),h=RBe(r,d);h&&(i.hours=h);const p=w_(d,{hours:i.hours}),g=IBe(r,p);g&&(i.minutes=g);const v=w_(p,{minutes:i.minutes}),x=DBe(r,v);return x&&(i.seconds=x),i}function LUe(e,t){return+hs(e)>+hs(t)}function zUe(e){const t={},n=yE();for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(e[r]===void 0?delete t[r]:t[r]=e[r]);EBe(t)}const $Ue={lessThanXSeconds:{one:{regular:"ménÄ než 1 sekunda",past:"pÅed ménÄ než 1 sekundou",future:"za ménÄ než 1 sekundu"},few:{regular:"ménÄ než {{count}} sekundy",past:"pÅed ménÄ než {{count}} sekundami",future:"za ménÄ než {{count}} sekundy"},many:{regular:"ménÄ než {{count}} sekund",past:"pÅed ménÄ než {{count}} sekundami",future:"za ménÄ než {{count}} sekund"}},xSeconds:{one:{regular:"1 sekunda",past:"pÅed 1 sekundou",future:"za 1 sekundu"},few:{regular:"{{count}} sekundy",past:"pÅed {{count}} sekundami",future:"za {{count}} sekundy"},many:{regular:"{{count}} sekund",past:"pÅed {{count}} sekundami",future:"za {{count}} sekund"}},halfAMinute:{type:"other",other:{regular:"půl minuty",past:"pÅed půl minutou",future:"za půl minuty"}},lessThanXMinutes:{one:{regular:"ménÄ než 1 minuta",past:"pÅed ménÄ než 1 minutou",future:"za ménÄ než 1 minutu"},few:{regular:"ménÄ než {{count}} minuty",past:"pÅed ménÄ než {{count}} minutami",future:"za ménÄ než {{count}} minuty"},many:{regular:"ménÄ než {{count}} minut",past:"pÅed ménÄ než {{count}} minutami",future:"za ménÄ než {{count}} minut"}},xMinutes:{one:{regular:"1 minuta",past:"pÅed 1 minutou",future:"za 1 minutu"},few:{regular:"{{count}} minuty",past:"pÅed {{count}} minutami",future:"za {{count}} minuty"},many:{regular:"{{count}} minut",past:"pÅed {{count}} minutami",future:"za {{count}} minut"}},aboutXHours:{one:{regular:"pÅibližnÄ 1 hodina",past:"pÅibližnÄ pÅed 1 hodinou",future:"pÅibližnÄ za 1 hodinu"},few:{regular:"pÅibližnÄ {{count}} hodiny",past:"pÅibližnÄ pÅed {{count}} hodinami",future:"pÅibližnÄ za {{count}} hodiny"},many:{regular:"pÅibližnÄ {{count}} hodin",past:"pÅibližnÄ pÅed {{count}} hodinami",future:"pÅibližnÄ za {{count}} hodin"}},xHours:{one:{regular:"1 hodina",past:"pÅed 1 hodinou",future:"za 1 hodinu"},few:{regular:"{{count}} hodiny",past:"pÅed {{count}} hodinami",future:"za {{count}} hodiny"},many:{regular:"{{count}} hodin",past:"pÅed {{count}} hodinami",future:"za {{count}} hodin"}},xDays:{one:{regular:"1 den",past:"pÅed 1 dnem",future:"za 1 den"},few:{regular:"{{count}} dny",past:"pÅed {{count}} dny",future:"za {{count}} dny"},many:{regular:"{{count}} dnÃ",past:"pÅed {{count}} dny",future:"za {{count}} dnÃ"}},aboutXWeeks:{one:{regular:"pÅibližnÄ 1 týden",past:"pÅibližnÄ pÅed 1 týdnem",future:"pÅibližnÄ za 1 týden"},few:{regular:"pÅibližnÄ {{count}} týdny",past:"pÅibližnÄ pÅed {{count}} týdny",future:"pÅibližnÄ za {{count}} týdny"},many:{regular:"pÅibližnÄ {{count}} týdnů",past:"pÅibližnÄ pÅed {{count}} týdny",future:"pÅibližnÄ za {{count}} týdnů"}},xWeeks:{one:{regular:"1 týden",past:"pÅed 1 týdnem",future:"za 1 týden"},few:{regular:"{{count}} týdny",past:"pÅed {{count}} týdny",future:"za {{count}} týdny"},many:{regular:"{{count}} týdnů",past:"pÅed {{count}} týdny",future:"za {{count}} týdnů"}},aboutXMonths:{one:{regular:"pÅibližnÄ 1 mÄsÃc",past:"pÅibližnÄ pÅed 1 mÄsÃcem",future:"pÅibližnÄ za 1 mÄsÃc"},few:{regular:"pÅibližnÄ {{count}} mÄsÃce",past:"pÅibližnÄ pÅed {{count}} mÄsÃci",future:"pÅibližnÄ za {{count}} mÄsÃce"},many:{regular:"pÅibližnÄ {{count}} mÄsÃců",past:"pÅibližnÄ pÅed {{count}} mÄsÃci",future:"pÅibližnÄ za {{count}} mÄsÃců"}},xMonths:{one:{regular:"1 mÄsÃc",past:"pÅed 1 mÄsÃcem",future:"za 1 mÄsÃc"},few:{regular:"{{count}} mÄsÃce",past:"pÅed {{count}} mÄsÃci",future:"za {{count}} mÄsÃce"},many:{regular:"{{count}} mÄsÃců",past:"pÅed {{count}} mÄsÃci",future:"za {{count}} mÄsÃců"}},aboutXYears:{one:{regular:"pÅibližnÄ 1 rok",past:"pÅibližnÄ pÅed 1 rokem",future:"pÅibližnÄ za 1 rok"},few:{regular:"pÅibližnÄ {{count}} roky",past:"pÅibližnÄ pÅed {{count}} roky",future:"pÅibližnÄ za {{count}} roky"},many:{regular:"pÅibližnÄ {{count}} roků",past:"pÅibližnÄ pÅed {{count}} roky",future:"pÅibližnÄ za {{count}} roků"}},xYears:{one:{regular:"1 rok",past:"pÅed 1 rokem",future:"za 1 rok"},few:{regular:"{{count}} roky",past:"pÅed {{count}} roky",future:"za {{count}} roky"},many:{regular:"{{count}} roků",past:"pÅed {{count}} roky",future:"za {{count}} roků"}},overXYears:{one:{regular:"vÃce než 1 rok",past:"pÅed vÃce než 1 rokem",future:"za vÃce než 1 rok"},few:{regular:"vÃce než {{count}} roky",past:"pÅed vÃce než {{count}} roky",future:"za vÃce než {{count}} roky"},many:{regular:"vÃce než {{count}} roků",past:"pÅed vÃce než {{count}} roky",future:"za vÃce než {{count}} roků"}},almostXYears:{one:{regular:"skoro 1 rok",past:"skoro pÅed 1 rokem",future:"skoro za 1 rok"},few:{regular:"skoro {{count}} roky",past:"skoro pÅed {{count}} roky",future:"skoro za {{count}} roky"},many:{regular:"skoro {{count}} roků",past:"skoro pÅed {{count}} roky",future:"skoro za {{count}} roků"}}},BUe=(e,t,n)=>{let r;const i=$Ue[e];i.type==="other"?r=i.other:t===1?r=i.one:t>1&&t<5?r=i.few:r=i.many;const s=n?.addSuffix===!0,a=n?.comparison;let o;return s&&a===-1?o=r.past:s&&a===1?o=r.future:o=r.regular,o.replace("{{count}}",String(t))},UUe={full:"EEEE, d. MMMM yyyy",long:"d. MMMM yyyy",medium:"d. M. yyyy",short:"dd.MM.yyyy"},VUe={full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},HUe={full:"{{date}} 'v' {{time}}",long:"{{date}} 'v' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},qUe={date:k1({formats:UUe,defaultWidth:"full"}),time:k1({formats:VUe,defaultWidth:"full"}),dateTime:k1({formats:HUe,defaultWidth:"full"})},WUe=["nedÄli","pondÄlÃ","úterý","stÅedu","Ätvrtek","pátek","sobotu"],GUe={lastWeek:"'poslednÃ' eeee 've' p",yesterday:"'vÄera v' p",today:"'dnes v' p",tomorrow:"'zÃtra v' p",nextWeek:e=>{const t=e.getDay();return"'v "+WUe[t]+" o' p"},other:"P"},KUe=(e,t)=>{const n=GUe[e];return typeof n=="function"?n(t):n},YUe={narrow:["pÅ. n. l.","n. l."],abbreviated:["pÅ. n. l.","n. l."],wide:["pÅed naÅ¡Ãm letopoÄtem","naÅ¡eho letopoÄtu"]},XUe={narrow:["1","2","3","4"],abbreviated:["1. ÄtvrtletÃ","2. ÄtvrtletÃ","3. ÄtvrtletÃ","4. ÄtvrtletÃ"],wide:["1. ÄtvrtletÃ","2. ÄtvrtletÃ","3. ÄtvrtletÃ","4. ÄtvrtletÃ"]},QUe={narrow:["L","Ã","B","D","K","Ä","Ä","S","Z","Å","L","P"],abbreviated:["led","úno","bÅe","dub","kvÄ","Ävn","Ävc","srp","záÅ","ÅÃj","lis","pro"],wide:["leden","únor","bÅezen","duben","kvÄten","Äerven","Äervenec","srpe
829n","záÅÃ","ÅÃjen","listopad","prosinec"]},ZUe={narrow:["L","Ã","B","D","K","Ä","Ä","S","Z","Å","L","P"],abbreviated:["led","úno","bÅe","dub","kvÄ","Ävn","Ävc","srp","záÅ","ÅÃj","lis","pro"],wide:["ledna","února","bÅezna","dubna","kvÄtna","Äervna","Äervence","srpna","záÅÃ","ÅÃjna","listopadu","prosince"]},JUe={narrow:["ne","po","út","st","Ät","pá","so"],short:["ne","po","út","st","Ät","pá","so"],abbreviated:["ned","pon","úte","stÅ","Ätv","pát","sob"],wide:["nedÄle","pondÄlÃ","úterý","stÅeda","Ätvrtek","pátek","sobota"]},eVe={narrow:{am:"dop.",pm:"odp.",midnight:"půlnoc",noon:"poledne",morning:"ráno",afternoon:"odpoledne",evening:"veÄer",night:"noc"},abbreviated:{am:"dop.",pm:"odp.",midnight:"půlnoc",noon:"poledne",morning:"ráno",afternoon:"odpoledne",evening:"veÄer",night:"noc"},wide:{am:"dopoledne",pm:"odpoledne",midnight:"půlnoc",noon:"poledne",morning:"ráno",afternoon:"odpoledne",evening:"veÄer",night:"noc"}},tVe={narrow:{am:"dop.",pm:"odp.",midnight:"půlnoc",noon:"poledne",morning:"ráno",afternoon:"odpoledne",evening:"veÄer",night:"noc"},abbreviated:{am:"dop.",pm:"odp.",midnight:"půlnoc",noon:"poledne",morning:"ráno",afternoon:"odpoledne",evening:"veÄer",night:"noc"},wide:{am:"dopoledne",pm:"odpoledne",midnight:"půlnoc",noon:"poledne",morning:"ráno",afternoon:"odpoledne",evening:"veÄer",night:"noc"}},nVe=(e,t)=>Number(e)+".",rVe={ordinalNumber:nVe,era:md({values:YUe,defaultWidth:"wide"}),quarter:md({values:XUe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:md({values:QUe,defaultWidth:"wide",formattingValues:ZUe,defaultFormattingWidth:"wide"}),day:md({values:JUe,defaultWidth:"wide"}),dayPeriod:md({values:eVe,defaultWidth:"wide",formattingValues:tVe,defaultFormattingWidth:"wide"})},iVe=/^(\d+)\.?/i,sVe=/\d+/i,aVe={narrow:/^(p[År](\.|ed) Kr\.|p[År](\.|ed) n\. l\.|po Kr\.|n\. l\.)/i,abbreviated:/^(p[År](\.|ed) Kr\.|p[År](\.|ed) n\. l\.|po Kr\.|n\. l\.)/i,wide:/^(p[År](\.|ed) Kristem|p[År](\.|ed) na[Å¡s][Ãi]m letopo[Äc]tem|po Kristu|na[Å¡s]eho letopo[Äc]tu)/i},oVe={any:[/^p[År]/i,/^(po|n)/i]},lVe={narrow:/^[1234]/i,abbreviated:/^[1234]\. [Äc]tvrtlet[Ãi]/i,wide:/^[1234]\. [Äc]tvrtlet[Ãi]/i},cVe={any:[/1/i,/2/i,/3/i,/4/i]},uVe={narrow:/^[lúubdkÄcszÅrlp]/i,abbreviated:/^(led|[úu]no|b[År]e|dub|kv[Äe]|[Äc]vn|[Äc]vc|srp|z[áa][År]|[År][Ãi]j|lis|pro)/i,wide:/^(leden|ledna|[úu]nora?|b[År]ezen|b[År]ezna|duben|dubna|kv[Äe]ten|kv[Äe]tna|[Äc]erven(ec|ce)?|[Äc]ervna|srpen|srpna|z[áa][År][Ãi]|[År][Ãi]jen|[År][Ãi]jna|listopad(a|u)?|prosinec|prosince)/i},dVe={narrow:[/^l/i,/^[úu]/i,/^b/i,/^d/i,/^k/i,/^[Äc]/i,/^[Äc]/i,/^s/i,/^z/i,/^[År]/i,/^l/i,/^p/i],any:[/^led/i,/^[úu]n/i,/^b[År]e/i,/^dub/i,/^kv[Äe]/i,/^[Äc]vn|[Äc]erven(?!\w)|[Äc]ervna/i,/^[Äc]vc|[Äc]erven(ec|ce)/i,/^srp/i,/^z[áa][År]/i,/^[År][Ãi]j/i,/^lis/i,/^pro/i]},fVe={narrow:/^[npuúsÄps]/i,short:/^(ne|po|[úu]t|st|[Äc]t|p[áa]|so)/i,abbreviated:/^(ned|pon|[úu]te|st[rÅ]|[Äc]tv|p[áa]t|sob)/i,wide:/^(ned[Äe]le|pond[Äe]l[Ãi]|[úu]ter[ýy]|st[År]eda|[Äc]tvrtek|p[áa]tek|sobota)/i}
vendor: 8,020 bytes, line 829
829,hVe={narrow:[/^n/i,/^p/i,/^[úu]/i,/^s/i,/^[Äc]/i,/^p/i,/^s/i],any:[/^ne/i,/^po/i,/^[úu]t/i,/^st/i,/^[Äc]t/i,/^p[áa]/i,/^so/i]},pVe={any:/^dopoledne|dop\.?|odpoledne|odp\.?|p[ůu]lnoc|poledne|r[áa]no|odpoledne|ve[Äc]er|(v )?noci?/i},mVe={any:{am:/^dop/i,pm:/^odp/i,midnight:/^p[ůu]lnoc/i,noon:/^poledne/i,morning:/r[áa]no/i,afternoon:/odpoledne/i,evening:/ve[Äc]er/i,night:/noc/i}},gVe={ordinalNumber:Cfe({matchPattern:iVe,parsePattern:sVe,valueCallback:e=>parseInt(e,10)}),era:gd({matchPatterns:aVe,defaultMatchWidth:"wide",parsePatterns:oVe,defaultParseWidth:"any"}),quarter:gd({matchPatterns:lVe,defaultMatchWidth:"wide",parsePatterns:cVe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:gd({matchPatterns:uVe,defaultMatchWidth:"wide",parsePatterns:dVe,defaultParseWidth:"any"}),day:gd({matchPatterns:fVe,defaultMatchWidth:"wide",parsePatterns:hVe,defaultParseWidth:"any"}),dayPeriod:gd({matchPatterns:pVe,defaultMatchWidth:"any",parsePatterns:mVe,defaultParseWidth:"any"})},xVe={code:"cs",formatDistance:BUe,formatLong:qUe,formatRelative:KUe,localize:rVe,match:gVe,options:{weekStartsOn:1,firstWeekContainsDate:4}};var Wa=(function(e){return e.InStock="in_stock",e.OutOfStock="out_of_stock",e.OnOrder="on_order",e.PreOrder="pre_order",e.Unknown="unknown",e})({}),lh=(function(e){return e.Heureka="heureka",e.Zbozi="zbozi",e.GoogleMerchant="google_merchant",e})({}),Qs=(function(e){return e.Pending="pending",e.Processing="processing",e.Embedding="embedding",e.Done="done",e.Failed="failed",e})({}),bi=(function(e){return e.Pending="pending",e.Embedding="embedding",e.Done="done",e.Failed="failed",e})({}),ou=(function(e){return e.Pending="pending",e.Processing="processing",e.Embedding="embedding",e.Done="done",e.Degraded="degraded",e.Stale="stale",e.Failed="failed",e})({}),Xa=(function(e){return e.Text="text",e.Number="number",e.Boolean="boolean",e.Tag="tag",e})({}),jd=(function(e){return e.Feed="feed",e.Model="model",e.Manual="manual",e})({}),vVe=(function(e){return e.Feed="feed",e.FeedAndPage="feed+page",e})({}),Vn=(function(e){return e.Daily="daily",e.Weekly="weekly",e.BiWeekly="bi_weekly",e.Monthly="monthly",e.Never="never",e})({}),dX=(function(e){return e.Neutral="neutral",e.Positive="positive",e.Negative="negative",e})({}),xd=(function(e){return e.IrrelevantInformation="irrelevantInformation",e.MissingInformation="missingInformation",e.InsufficientDetail="insufficientDetail",e.IncorrectInformation="incorrectInformation",e.Other="other",e})({}),nh=(function(e){return e.User="user",e.Administrator="administrator",e.Assistant="assistant",e.Status="status",e})({}),Zg=(function(e){return e.Completed="completed",e.Stopped="stopped",e.Failed="failed",e.AwaitingUser="awaiting_user",e})({}),Nfe=(function(e){return e.Complete="complete",e.StepLimit="step_limit",e.Guard="guard",e.Drained="drained",e.Failed="failed",e.Aborted="aborted",e.ClientDisconnect="client_disconnect",e.ServerTimeout="server_timeout",e})({}),yVe=(function(e){return e.Aborted="aborted",e.AgentFailed="agent_failed",e.ClientDisconnect="client_disconnect",e.ServerTimeout="server_timeout",e})({}),bVe=(function(e){return e.Auth="auth",e.Cancelled="cancelled",e.Policy="policy",e.Timeout="timeout",e.Tool="tool",e.Transport="transport",e.Validation="validation",e})({}),_Ve=(function(e){return e.DocumentSearchFailed="document_search_failed",e.DuplicateToolCall="duplicate_tool_call",e.ModerationBlocked="moderation_blocked",e.FetchErrorStatus="fetch_error_status",e.FetchTimeout="fetch_timeout",e.FetchTransportError="fetch_transport_error",e.HttpErrorStatus="http_error_status",e.InvalidToolArguments="invalid_tool_arguments",e.InvalidUrl="invalid_url",e.McpAuthRequired="mcp_auth_required",e.McpConnectionBudgetExceeded="mcp_connection_budget_exceeded",e.McpOauthCommitFailed="mcp_oauth_commit_failed",e.McpRunClosed="mcp_run_closed",e.McpToolError="mcp_tool_error",e.ShopCategoriesFailed="shop_categories_failed",e.ShopSearchFailed="shop_search_failed",e.ToolAuthenticationFailed="tool_authentication_failed",e.ToolCancelled="tool_cancelled",e.ToolFailed="tool_failed",e.ToolNotAvailable="tool_not_available",e.ToolTimeout="tool_timeout",e.ToolTransportError="tool_transport_error",e.UnsafeToolUrl="unsafe_tool_url",e.UnsafeUrl="unsafe_url",e.UrlDomainNotAllowed="url_domain_not_allowed",e.WebSearchDisabled="web_search_disabled",e.WebSearchFailed="web_search_failed",e.WebSearchNotConfigured="web_search_not_configured",e})({}),Jt=(function(e){return e.SuperAdmin="superAdmin",e.Admin="admin",e})({}),wVe=(function(e){return e.Admin="admin",e})({}),Fs=(function(e){return e.Conversational="conversational",e.ShopAssistant="shopAssistant",e})({}),_c=(function(e){return e.Gpt61Sol="gpt-6.1-sol",e.Gpt6Luna="gpt-6-luna",e.Gpt56Sol="gpt-5.6-sol",e.Gpt56Terra="gpt-5.6-terra",e.Gpt56Luna="gpt-5.6-luna",e.Gpt55="gpt-5.5",e.Gpt54="gpt-5.4",e.Gpt54Mini="gpt-5.4-mini",e.Gpt54Nano="gpt-5.4-nano",e.Gpt41="gpt-4.1",e.Gpt41Mini="gpt-4.1-mini",e.Gpt41Nano="gpt-4.1-nano",e.Gpt5="gpt-5",e.Gpt5Mini="gpt-5-mini",e.Gpt5Nano="gpt-5-nano",e.GptO3Mini="o3-mini-2025-01-31",e.Grok46="x-ai/grok-4.6",e.Grok45="x-ai/grok-4.5",e.Grok4Fast="x-ai/grok-4-fast",e.Grok41Fast="x-ai/grok-4.1-fast",e.Grok4="x-ai/grok-4",e.Grok420="x-ai/grok-4.20",e.Grok43="x-ai/grok-4.3",e.Gemini2Flash="google/gemini-2.0-flash-001",e.Gemini2FlashLite="google/gemini-2.0-flash-lite-001",e.Gemini25Flash="google/gemini-2.5-flash",e.Gemini25FlashLite="google/gemini-2.5-flash-lite",e.Gemini25Pro="google/gemini-2.5-pro",e.Gemini3FlashPreview="google/gemini-3-flash-preview",e.Gemini31FlashLite="google/gemini-3.1-flash-lite",e.Gemini31FlashLitePreview="google/gemini-3.1-flash-lite-preview",e.Gemini37Flash="google/gemini-3.7-flash",e.Gemini36Flash="google/gemini-3.6-flash",e.Gemini35Flash="google/gemini-3.5-flash",e.Gemini35FlashLite="google/gemini-3.5-flash-lite",e.Gemini31ProPreview="google/gemini-3.1-pro-preview",e.Claude35Sonnet="claude-3-5-sonnet-latest",e.ClaudeSonnet55="anthropic/claude-sonnet-5.5",e.ClaudeSonnet5="anthropic/claude-sonnet-5",e.ClaudeSonnet46="anthropic/claude-sonnet-4.6",e.ClaudeOpus47="anthropic/claude-opus-4.7",e.ClaudeOpus48="anthropic/claude-opus-4.8",e.ClaudeOpus48Fast="anthropic/claude-opus-4.8-fast",e.ClaudeOpus5="anthropic/claude-opus-5",e.ClaudeHaiku45="anthropic/claude-haiku-4.5",e.Glm52="z-ai/glm-5.2",e.DeepSeekV4Pro="deepseek/deepseek-v4-pro",e.DeepSeekV4Flash="deepseek/deepseek-v4-flash",e.DeepSeekV41Flash="deepseek/deepseek-v4.1-flash",e.MiMoV25="xiaomi/mimo-v2.5",e.MiMoV25Pro="xiaomi/mimo-v2.5-pro",e.MiniMaxM3="minimax/minimax-m3",e.Step37Flash="stepfun/step-3.7-flash",e.HunyuanHy3="tencent/hy3",e.Gemini38Flash="google/gemini-3.8-flash",e.MuseSpark13="meta/muse-spark-1.3",e})({}),Mr=(function(e){return e.Website="website",e.Document="document",e.ExternalDocument="externalDocument",e})({}),$r=(function(e){return e.Upload="upload",e.Website="website",e.GoogleDrive="google_drive",e.Rss="rss",e})({}),Bm=(function(e){return e.Text="text",e.Tool="tool",e})({}),qg=(function(e){return e.Friendly="friendly",e.Casual="casual",e.Balanced="balanced",e.Professional="professional",e.Formal="formal",e})({}),Wg=(function(e){return e.VeryShort="very_short",e.Short="short",e.Medium="medium",e.Long="long",e.VeryLong="very_long",e})({}),qn=(function(e){return e.ParsingError="parsingError",e.EmbeddingError="embeddingError",e.Uploading="uploading",e.Ready="ready",e.Parsing="parsing",e.ParsingAsync="parsingAsync",e.Parsed="parsed",e.Embedding="embedding",e.Done="done",e})({}),iA=(function(e){return e.Data="data",e.Agent="agent",e.Other="other",e.RAG="rag",e})({}),fw=(function(e){return e.Llm="llm",e.Embedding="embedding",e.Parsing="parsing",e.Scraping="scraping",e.Rerank="rerank",e.Other="other",e})({}),Vp=(function(e){return e.Tokens="tokens",e.Characters="characters",e.Seconds="seconds",e.Credits="credits",e})({}),wu=(function(e){return e.Human="human",e.AI="ai",e})({}),fd=(function(e){return e.Voice="voice",e.Chat="chat",e})({}),ai=(function(e){return e.Chat="chat",e.Voice="voice",e})({}
829),lu=(function(e){return e.None="none",e.StaticBearer="static_bearer",e.McpOAuth="mcp_oauth",e})({}),s1=(function(e){return e.NotConnected="not_connected",e.Connected="connected",e.Expired="expired",e.Error="error",e})({}),N1=(function(e){return e.Left="left",e.Center="center",e.Right="right",e})({}),nS=(function(e){return e.Widget="widget",e.Immersive="immersive",e})({}),Rd=(function(e){return e.None="none",e.Male="male",e.Female="female",e})({}),KN=(function(e){return e.Light="light",e.Dark="dark",e})({}),Th=(function(e){return e.Simple="simple",e.Academic="academical",e})({}),Ms=(function(e){return e.Pills="inline",e.Structured="structured",e})({}),zg=(function(e){return e.All="all",e.Whitelist="whitelist",e.Blacklist="blacklist",e})({}),Pr=(function(e){return e.Free="Free",e.Starter="Starter",e.Basic="Basic",e.Standard="Standard",e.Premium="Premium",e.Enterprise="Enterprise",e})({}),SVe=(function(e){return e.KbAutoUpdates="kb_auto_updates",e})({}),qr=(function(e){return e.Active="active",e.Canceled="canceled",e.Incomplete="incomplete",e.IncompleteExpired="incomplete_expired",e.PastDue="past_due",e.Trialing="trialing",e.Unpaid="unpaid",e})({}),Ci=(function(e){return e.Month="month",e.Year="year",e})({}),EVe=(function(e){return e.Plan="plan",e.Addon="addon",e})({}),jfe=(function(e){return e.Created="created",e.Manual="manual",e})({});const CVe=Ft(qr),A5=Ft(Pr),bE=Ft(Ci),TVe=Ft(EVe);Ft(jfe);var Ev=(function(e){return e.CallStarted="call_started",e.CallEnded="call_ended",e.AI="ai",e.Log="log",e.Error="error",e.Usage="usage",e.ToolCall="tool_call",e.Interruption="interruption",e.SessionResumption="session_resumption",e.CallTransfer="call_transfer",e})({}),xr=(function(e){return e.Achernar="Achernar",e.Achird="Achird",e.Algenib="Algenib",e.Algieba="Algieba",e.Alnilam="Alnilam",e.Aoede="Aoede",e.Autonoe="Autonoe",e.Callirrhoe="Callirrhoe",e.Charon="Charon",e.Despina="Despina",e.Enceladus="Enceladus",e.Erinome="Erinome",e.Fenrir="Fenrir",e.Gacrux="Gacrux",e.Iapetus="Iapetus",e.Kore="Kore",e.Laomedeia="Laomedeia",e.Leda="Leda",e.Orus="Orus",e.Puck="Puck",e.Pulcherrima="Pulcherrima",e.Rasalgethi="Rasalgethi",e.Sadachbia="Sadachbia",e.Sadaltager="Sadaltager",e.Schedar="Schedar",e.Sulafat="Sulafat",e.Umbriel="Umbriel",e.Vindemiatrix="Vindemiatrix",e.Zephyr="Zephyr",e.Zubenelgenubi="Zubenelgenubi",e})({});const Rfe={Achernar:"female",Achird:"male",Algenib:"male",Algieba:"male",Alnilam:"male",Aoede:"female",Autonoe:"female",Callirrhoe:"female",Charon:"male",Despina:"female",Enceladus:"male",Erinome:"female",Fenrir:"male",Gacrux:"female",Iapetus:"male",Kore:"female",Laomedeia:"female",Leda:"female",Orus:"male",Puck:"male",Pulcherrima:"female",Rasalgethi:"male",Sadachbia:"male",Sadaltager:"male",Schedar:"male",Sulafat:"female",Umbriel:"male",Vindemiatrix:"female",Zephyr:"female",Zubenelgenubi:"male"};var Ife=(function(e){return e.Gemini38Live="gemini-3.8-live",e.Gemini31FlashLivePreview="gemini-3.1-flash-live-preview",e})({});const fX="gemini-3.8-live",AVe=new Set(["gemini-3.1-flash-live-preview"]);function kVe(e){return AVe.has(e)}var Ti=(function(e){return e.USD="usd",e.CZK="czk",e})({}),yk=(function(e){return e.Cs="cs",e.En="en",e})({}),Hr=(function(e){return e.New="new",e.Existing="existing",e.Removed="removed",e.Untracked="untracked",e})({}),Qa=(function(e){return e.Flag="flag",e.Remove="remove",e.Ignore="ignore",e})({});const V7=Object.freeze({[Ti.USD]:1,[Ti.CZK]:23}),NVe=/[\u0300-\u036F]/g;function jVe(e){return e?e.toString().normalize("NFD").replaceAll(NVe,""):""}function RVe(e){return jVe(e).toLowerCase()}function H7(e){if(e)return`%${RVe(e)}%`}function fx(e){let t=e.trim();/^https?:\/\//i.test(t)||(t=`https://${t}`);const n=new URL(t);let r=n.hostname.toLowerCase();r.startsWith("www.")&&(r=r.slice(4));let i=n.pathname;return i=i==="/"?"":i.replace(/\/+$/,""),`https://${r}${i}${n.search}${n.hash}`}const IVe=/^[\d.a-z-]+\.[a-z]{2,}$/i;function hw(e){return typeof e=="string"?e.split(` 830`).map(t=>t.trim()).filter(t=>t!==""):Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function q7(e){const t=OVe(e);if(!t)return!1;try{const n=new URL(t).hostname.toLowerCase();return n==="localhost"?!0:IVe.test(n)}catch{return!1}}function OVe(e){try{return fx(e)}catch{return null}}function pP(e,t){return e/V7[t]}function Of(e,t){const n=e*V7[t],r=Math.round(n);return Math.abs(n-r)<.1?r:Math.round(n*100)/100}zUe({locale:xVe});const PVe=new Intl.NumberFormat("cs-CZ",{style:"currency",currency:"USD",maximumFractionDigits:2,minimumFractionDigits:2}),MVe=new Intl.NumberFormat("cs-CZ",{style:"currency",currency:"CZK",notation:"compact",compactDisplay:"short"}),DVe=new Intl.NumberFormat("cs-CZ",{style:"percent",minimumFractionDigits:2,maximumFractionDigits:2}),FVe=new Intl.NumberFormat("cs-CZ",{style:"decimal",maximumFractionDigits:2});function d8(e){if(e)return e instanceof Date?e:typeof e=="string"||typeof e=="number"?new Date(e):e}function LVe(e,t){const n=d8(e),r=d8(t);if(!n||!r)return"-";const i=r.getTime()-n.getTime(),s=Math.floor(i/(1e3*60*60)),a=Math.floor(i%(1e3*60*60)/(1e3*60)),o=Math.floor(i%(1e3*60)/1e3);return`${s.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`}function zVe(e){if(e<0)return"-";const t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=e%60;return`${t.toString().padStart(2,"0")}:${n.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`}
830const Zn=Object.freeze({Time:"H:mm",InputTime:"HH:mm",PreciseTime:"s.SSS",Date:"d. MMMM yyyy",DateNumeric:"d. M. yyyy",DateTime:"d. MMMM yyyy, H:mm",DateTimeSeconds:"d. MMMM yyyy, H:mm:ss",DateTimeNumeric:"d. M. yyyy, H:mm",DateTimeNumericSeconds:"d. M. yyyy, H:mm:ss",DateTimeNumericPrecise:"d. M. yyyy, H:mm:ss.SSS",DateInput:"yyyy-MM-dd",MonthShort:"LLL",Month:"LLLL",MonthYear:"LLLL yyyy"});function $Ve(e){if(!e)return"";const[t,...n]=e.split(" "),r=n.pop(),i=t.substring(0,1).toUpperCase(),s=r?r.substring(0,1).toUpperCase():"";return`${i}${s}`}function BVe(e,t=Zn.Date){const n=d8(e);return n?kfe(n,t):""}function UVe(e,t=100){return e?e.length<=t?e:`${e.substring(0,t).trim()}...`:""}function VVe(e,t){if(!e)return"";const n=e.split(" ");return n.length>t?n.slice(0,t).join(" ")+"...":e}function HVe(e){return e.charAt(0).toUpperCase()+e.slice(1)}function qVe(e){return e?`${e?.firstName??""} ${e?.lastName??""}`.trim():""}function WVe(e,t){if(e===1e3&&t==="W")return"1 kW";if(e===-1e3&&t==="W")return"-1 kW";if(e===1e6&&t==="W")return"1 ?W";if(e===1e9&&t==="W")return"1 GW";const n=Math.abs(e),r=e<0?"-":"";let i,s;n>=1e9?(i=e/1e9,s="G"):n>=1e6?(i=e/1e6,s="?"):n>=1e3?(i=e/1e3,s="k"):(i=e,s="");const a=Math.abs(i).toFixed(2).replace(/\.?0+$/,"");return`${r}${a} ${s}${t}`}function Ofe(e,t,n){if(e==null||!t)return"N/A";const r=t.toUpperCase(),i=r==="CZK"?"cs-CZ":"en-US",s={style:"currency",currency:r,minimumFractionDigits:2,maximumFractionDigits:2,...n};try{return new Intl.NumberFormat(i,s).format(e)}catch(a){console.error(`Error formatting currency (${e}, ${r}):`,a);const o=e.toFixed(2);return r==="CZK"?`${o} ${r}`:`${r} ${o}`}}function GVe(e,t){const n=Of(e,t);return Ofe(n,t)}function k5(e){if(e<1048576)return`${Math.round(e/1024)} KB`;const r=e/1048576,i=Math.round(r*10)/10;return Number.isInteger(i)?`${i} MB`:`${i.toFixed(1)} MB`}const yt={initials:$Ve,date:BVe,capitalize:HVe,truncate:UVe,truncateByWords:VVe,fullName:qVe,unit:WVe,dateDuration:LVe,duration:zVe,currency:Ofe,currencyDollar:e=>PVe.format(e),currencyShort:e=>MVe.format(e),credits:GVe,fileSize:k5,number:e=>FVe.format(e),percentage:e=>DVe.format(e>10?e/100:e)},hX="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function Hp(e=8){let t="";for(let n=0;n<e;n++)t+=hX[Math.floor(Math.random()*hX.length)];return t}function KVe(e){const t=new URL(e);return`${t.protocol==="https:"?"wss":"ws"}://${t.host}${t.pathname.replace(/\/$/,"")}`}function Pfe(e,t){const n=e.createdAt instanceof Date?e.createdAt:new Date(e.createdAt),r=t.createdAt instanceof Date?t.createdAt:new Date(t.createdAt);return n.getTime()-r.getTime()}function f8(e,t){const n=new Date,r=new Date(e),i=new Date(t);return new Date(n.getFullYear(),n.getMonth(),n.getDate(),r.getHours(),r.getMinutes())<new Date(n.getFullYear(),n.getMonth(),n.getDate(),i.getHours(),i.getMinutes())}function YVe(e){const t=new Uint8Array(e);let n="";for(let r=0;r<t.byteLength;r++)n+=String.fromCodePoint(t[r]);return btoa(n)}const XVe="modulepreload",QVe=function(e){return"/"+e},pX={},pw=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let c=function(u){return Promise.all(u.map(d=>Promise.resolve(d).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),o=a?.nonce||a?.getAttribute("nonce");i=c(n.map(u=>{if(u=QVe(u),u in pX)return;pX[u]=!0;const d=u.endsWith(".css"),h=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${h}`))return;const p=document.createElement("link");if(p.rel=d?"stylesheet":XVe,d||(p.as="script"),p.crossOrigin="",p.href=u,o&&p.setAttribute("nonce",o),document.head.appendChild(p),d)return new Promise((g,v)=>{p.addEventListener("load",g),p.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${u}`)))})}))}function s(a){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a}return i.then(a=>{for(const o of a||[])o.status==="rejected"&&s(o.reason);return t().catch(s)})},h8={light:{preset:KN.Light,primary:"#e4e4e7",primaryFg:"#27272a"},dark:{preset:KN.Dark,primary:"#18181B",primaryFg:"#f4f4f5"}},bk={name:"AI Honza",defaultThemePreset:KN.Light,defaultTheme:h8.light},_k=.5,Mfe=4e4;
830class rS extends Error{data;get type(){return this.data.type}get message(){return this.data.message}constructor(t,n,r){super(n),this.name="SocketError",this.data={name:this.name,message:n,type:t,...r}}static fromError(t){try{if(typeof t=="object"&&t!==null){const{message:n,data:r,type:i}=t;return new rS(i,n,r)}}catch{}return new rS("serverError","Unknown error")}}const Dfe=Ft(Nfe),ZVe=Ft(bVe),Ffe=Ft(_Ve);_e({type:kn("tool_error"),code:Ffe,kind:ZVe,retryable:mt()});const JVe=_e({text:B().max(24e3),hash:B(),capturedAt:B(),truncated:mt()}),eHe=_e({status:Bn(["selected","none","missing","interrupted","legacy"]),method:Bn(["inline","tool"]),answerId:B().optional(),sourceIds:lt(B())}),tHe=_e({type:Ft(Mr),fileName:B(),url:B(),page:B(),documentId:B().optional(),sourceKey:B().optional(),header:B().optional(),article:B().optional(),evidence:JVe.optional(),chunkText:B().optional()}),nHe=_e({type:kn("citation_sources"),sources:ns(tHe)}),rHe=Ft(yVe);Bn(["start","streaming","end","error","interrupted"]);const Lfe=Bn(["ai","human","system"]),Bc=mE([Ge(),B()]),iHe=_e({type:kn("citation"),scope:Bn(["document","passage"]).optional(),id:B().optional(),url:B().optional(),title:B().optional(),source_type:B().optional(),start_index:Ge().optional(),end_index:Ge().optional(),cited_text:B().optional()}),sHe=_e({type:kn("non_standard_annotation"),id:B().optional(),value:ns($s())}),aHe=zm("type",[iHe,sHe]),zfe=_e({type:kn("text"),text:B(),id:B().optional(),index:Bc.optional(),annotations:lt(aHe).optional(),attribution:eHe.optional()}),$fe=_e({type:kn("reasoning"),reasoning:B().optional(),id:B().optional(),index:Bc.optional()}),Bfe=_e({type:kn("tool_call"),id:B().nullable(),name:B(),args:ns($s()),index:Bc.optional()}),oHe=_e({type:kn("tool_call_chunk"),id:B().nullable(),name:B().nullable(),args:B().nullable(),index:Bc.optional()}),Ufe=_e({type:kn("invalid_tool_call"),id:B().nullable(),name:B().nullable(),args:B().nullable(),error:B().nullable(),index:Bc.optional()}),Vfe=_e({type:kn("server_tool_call"),id:B(),name:B(),args:ns($s()),index:Bc.optional()}),Hfe=_e({type:kn("server_tool_result"),tool_call_id:B(),status:Bn(["success","error"]),id:B().optional(),output:$s().optional(),index:Bc.optional()}),lHe=Bn(["card","activity","hidden"]),qfe=_e({type:kn("tool_result"),tool_call_id:B(),name:B().optional(),content:B(),artifact:$s().optional(),is_error:mt().optional(),id:B().optional(),index:Bc.optional(),display:lHe.optional(),kind:B().optional()}),Wfe=_e({type:kn("image"),id:B().optional(),file_id:B().optional(),url:B().optional(),base64:B().optional(),mime_type:B().optional(),index:Bc.optional()}),Gfe=_e({type:kn("audio"),id:B().optional(),file_id:B().optional(),url:B().optional(),base64:B().optional(),mime_type:B().optional(),index:Bc.optional()}),Kfe=_e({type:kn("file"),id:B().optional(),file_id:B().optional(),url:B().optional(),base64:B().optional(),mime_type:B().optional(),index:Bc.optional()}),cHe=_e({kind:kn("product_cards"),toolCallId:B(),name:B(),args:ns($s()),artifact:$s().optional()}),uHe=_e({kind:kn("operator"),toolCallId:B(),name:B(),args:ns($s()),artifact:$s().optional()}),YN=_e({kind:kn("form"),toolCallId:B(),name:B(),artifact:$s()});zm("kind",[cHe,uHe,YN]);const Yfe=_e({type:kn("non_standard"),value:ns($s()),id:B().optional(),index:Bc.optional()}),Xfe=zm("type",[zfe,$fe,Bfe,oHe,Ufe,Vfe,Hfe,qfe,Wfe,Gfe,Kfe,Yfe]),dHe=zm("type",[zfe,$fe,Bfe,Ufe,Vfe,Hfe,qfe,Wfe,Gfe,Kfe,Yfe]),fHe=_e({type:kn("text-delta"),text:B()}),hHe=_e({type:kn("reasoning-delta"),reasoning:B()}),pHe=_e({type:kn("data-delta"),data:B(),encoding:kn("base64").optional()}
830),mHe=_e({type:kn("block-delta"),fields:_e({type:B()}).passthrough()}),gHe=zm("type",[fHe,hHe,pHe,mHe]),Qfe=_e({input_tokens:Ge().optional(),output_tokens:Ge().optional(),total_tokens:Ge().optional()}),Zfe=_e({provider:B().optional(),model:B().optional(),model_type:B().optional(),run_id:B().optional(),thread_id:B().optional()}).passthrough(),xHe=_e({id:B(),role:Lfe,blocks:lt(Xfe),usage:Qfe.optional(),metadata:Zfe.optional()});_e({messages:lt(xHe)});const vHe=_e({type:kn("run.start"),protocol:Ge(),runId:B(),threadId:B(),messageId:B()}),yHe=_e({type:kn("message-start"),messageId:B(),role:Lfe,id:B(),metadata:Zfe.optional()}),bHe=_e({type:kn("content-block-start"),messageId:B(),index:Ge(),content:Xfe}),_He=_e({type:kn("content-block-delta"),messageId:B(),index:Ge(),delta:gHe}),wHe=_e({type:kn("content-block-finish"),messageId:B(),index:Ge(),content:dHe}),SHe=_e({type:kn("message-finish"),messageId:B(),usage:Qfe.optional(),stopReason:Dfe.optional()}),EHe=_e({type:kn("follow-ups"),messageId:B(),questions:lt(B())}),CHe=_e({type:kn("tool-started"),messageId:B(),tool_call_id:B(),tool_name:B(),input:$s().optional(),label:B().optional(),display:Bn(["card","activity","hidden"]).optional(),kind:B().optional()}),THe=_e({type:kn("tool-finished"),messageId:B(),tool_call_id:B(),output:$s(),is_error:mt().optional()}),AHe=_e({type:kn("tool-error"),messageId:B(),tool_call_id:B(),message:B(),code:Ffe}),kHe=_e({type:kn("tool.awaiting_user"),messageId:B(),toolCallId:B(),name:B(),artifact:$s()}),NHe=_e({type:kn("run.end"),runId:B(),stopReason:Dfe.optional()}),jHe=_e({type:kn("run.error"),runId:B(),code:rHe,message:B()}),RHe=zm("type",[vHe,yHe,bHe,_He,wHe,SHe,EHe,CHe,THe,AHe,kHe,NHe,jHe]);new Set(RHe.options.map(e=>e.shape.type.value));const IHe=_e({id:B().uuid()}),Yu=IHe.extend({createdAt:ql(),updatedAt:ql()}),W7=Yu.extend({thread:B().uuid(),feedback:B().uuid().optional(),role:Ft(nh),turnId:B().uuid().nullable().optional(),generationStatus:Ft(Zg).nullable().optional(),stopReason:Ft(Nfe).nullable().optional(),content:B().optional(),user:B().uuid().optional(),metadata:ns(J2()).optional(),toolCalls:lt(J2()).optional()});W7.omit({id:!0,createdAt:!0,updatedAt:!0}).strict();const OHe=_e({role:Bn([nh.User,nh.Assistant]),content:B()}).strict();_e({messages:lt(OHe).min(1)}).strict();W7.partial().required({id:!0}).strict();const Vh=Yu.extend({email:B().email().max(255),password:B().max(255).nullish(),firstName:B().max(50).nullish(),lastName:B().max(50).nullish(),photo:B().optional(),verified:mt(),firstLogin:mt().optional(),role:Ft(Jt).default(Jt.Admin),isActiveOperator:mt().optional(),contactEmail:B().max(320).nullish(),phone:B().max(15).nullish(),operatorSpecialization:B().max(255).nullish(),operatorDisplayText:B().nullish(),organizations:lt(_e({id:B().uuid(),name:B(),url:B().url().nullable()})).optional()}),Jfe=Vh.omit({id:!0,createdAt:!0,updatedAt:!0,verified:!0,organizations:!0}).extend({verified:mt().optional(),role:Ft(Jt)}).strict();Vh.omit({organizations:!0}).extend({organizations:lt(_e({id:B().uuid()})),createdAt:B().datetime(),updatedAt:B().datetime(),password:Qde().optional()});const p8=Vh.partial().required({id:!0}).omit({organizations:!0,email:!0}).extend({password:B().max(255).nullish(),oldPassword:B().max(255).nullish()}).strict(),ehe=Yu.extend({chatUser:B().uuid(),title:B().max(100),chat:B().uuid(),messages:lt(W7).optional()});ehe.omit({id:!0,createdAt:!0,updatedAt:!0,messages:!0}).strict();ehe.partial().required({id:!0}).strict();const PHe=_e({message:B(),createdAt:B().datetime(),user:Vh.pick({id:!0,firstName:!0,lastName:!0,photo:!0})});PHe.extend({threadId:B().uuid()}).omit({createdAt:!0});const MHe=12e3,DHe=_e({kind:Bn(["decision","constraint","topic","open_question"]),text:B().min(1).max(400),messageIds:lt(B().uuid()).min(1).max(6)}).strict(),FHe=lt(DHe).max(24);_e({v:kn(1),revision:B().uuid(),until:B().datetime(),sourceHash:B().regex(/^[\da-f]{64}$/),offset:Ge().int().nonnegative().max(Number.MAX_SAFE_INTEGER),bookmarks:FHe.optional(),targetUntil:B().datetime().optional(),summary:B().min(1).max(MHe)}).strict();const the=_e({voiceBot:mt().optional(),allowSharedData:mt().default(!1).optional(),disableAiInboxUnread:mt().optional(),disableAllInboxUnread:mt().optional()}),Tg=mE([mt(),lt(_e({from:B().datetime(),to:B().datetime()}
830))]),nhe=_e({0:Tg,1:Tg,2:Tg,3:Tg,4:Tg,5:Tg,6:Tg}).partial().nullish(),N5=Yu.extend({id:B().uuid(),name:B().max(150),url:B().url().max(150).or(kn("")).nullish(),monthlyUsageLimit:Ge().min(0).max(99999999999e-2).optional(),tierConfig:the.optional(),stripeCustomerId:B().nullish(),stripeSubscriptionId:B().nullish(),margin:Ge().min(1).max(99999.99).nullish(),currentMonthlyUsage:Ge().min(0).max(99999999999e-2).nullish(),balance:Ge().min(0).max(99999999999e-2).nullish(),workingHours:nhe,collectionName:B().optional(),expiresAt:ql().nullish(),currency:Ft(Ti).optional(),locale:Ft(yk).optional(),isPartnerOrganization:mt().optional(),users:lt(_e({id:B().uuid(),email:B().email(),firstName:B().nullable(),lastName:B().nullable(),role:B()})).optional()}),hx=Yu.extend({organization:N5}),LHe=N5.omit({id:!0,createdAt:!0,updatedAt:!0,users:!0}).strict(),zHe=N5.deepPartial().required({id:!0}).omit({users:!0}).strict();_e({documentUpdateFrequency:Ft(Vn),documentAutoUpdateEnabled:mt(),documentChangeThreshold:Ge().min(0).max(1)});_e({id:B().uuid(),name:B(),url:B().nullish(),currency:Ft(Ti),monthlyUsageLimit:Ge(),currentMonthlyUsage:Ge(),balance:Ge(),tierConfig:the,capabilities:_e({voice:mt()})});const rhe=hx.extend({title:B().max(100),chat:B().uuid(),question:B(),answer:B(),active:mt(),parent:B().uuid().nullish(),clickCount:Ge().int().nonnegative()}),$He=rhe.omit({id:!0,createdAt:!0,updatedAt:!0,clickCount:!0,organization:!0}).extend({active:mt().default(!0)}).strict(),BHe=rhe.partial().required({id:!0}).strict(),ihe=Yu.extend({token:B(),expiresAt:ql(),userId:B().uuid()});ihe.omit({id:!0,createdAt:!0,updatedAt:!0}).strict();ihe.partial().required({id:!0}).strict();const she=["minimal","low","medium","high"],UHe=Bn(she),S_=["low","medium","high"],VHe={[_c.Gemini35Flash]:{efforts:she,defaultEffort:"medium"},[_c.Gemini35FlashLite]:{efforts:S_,defaultEffort:"medium"},[_c.Gemini38Flash]:{efforts:S_,defaultEffort:"medium"},[_c.Gpt56Luna]:{efforts:S_,defaultEffort:"low"},[_c.Gpt6Luna]:{efforts:S_,defaultEffort:"low"},[_c.Gpt61Sol]:{efforts:S_,defaultEffort:"low"}};function HHe(e){return e?VHe[e]:void 0}const qHe={RagResult:"rag_result",RagResultOperator:"rag_result_operator",UsageLimitsError:"usageLimitsError"},WHe=_e({content:B().describe("Main response to the user in the conversation language, formatted in markdown. Must NEVER be empty: when the answer is not found in the documents (or no documents are provided), still write a short, polite message explaining that this information is not available."),sources:lt(_e({type:Ft(Mr).describe("Source document type"),fileName:B().describe("Human-readable source label for UI chips and lists. For uploaded documents: prettify metadata file name (remove underscores, capitalize, drop extensions). For website or external URL sources: include hostname and URL path when the page is not the domain root (e.g. example.com/pricing, example.com/cs/about), not only example.com, so different subpages stay distinguishable. Omit scheme (https). Add path segments, query string, and hash when they matter for disambiguation."),url:B().describe("Document URL from metadata"),page:B().describe("Number of page in the document on which the information was found. The page number is stored in the metadata. Take the number of page as it is and DO NOT modify it."),header:B().describe('Legal Journal Reference Number in the exact format "Ä. {number}/{year} LJ" (e.g. "Ä. 4/2023 LJ") or "Ä. {number}/{year} Sb." (e.g. "Ä. 89/2012 Sb."). Extract only if it matches one of these exact formats.').nullish(),article:B().describe('Article (Älánek) reference in legal documents in the exact format "Äl. {number}" (e.g. "Äl. 5"). This represents a specific section of the legal document. Extract only if it matches this exact format.').nullish(),note:B().optional().describe('Short display-only annotation for this source (e.g. "pricing table"), shown on hover. Never a URL or label.'),documentId:B().optional().describe("Source document id â lets the widget merge citations of the same document across different pages into one entry."),id:B().optional().describe("Inline citation registry id (c1, c2, â¦) for marker rendering"),ids:lt(B()).optional().describe("All citation ids that resolve to this same source (aliases after dedupe). The widget maps every alias to this source and its number.")})).nullish().describe("List of source documents referenced in the response"),answered:mt().describe("Whether the question was answered")}),GHe=_e({content:B().describe("natural conversationally response to the user, use the chat history to form the response"),operator:_e({name:B().nullish().describe("Selected operator's name"),email:B().nullish().describe("Selected operator's email"),phone:B().nullish().describe("Selected operator's phone"),displayText:B().nullish().describe("Selected operator's displayText")}).nullish().describe("Operator contact information")}),KHe=_e({operator:_e({name:B().describe("Operator name").nullable(),email:B().describe("Operator email").nullable(),phone:B().describe("Operator phone").nullable()}).nullable()}),ahe="findDocuments",ohe="getDocumentOverview";_e({query:B().describe('What the documents should be about, in natural language â a topic or area ("employee travel expenses", "admission requirements"), not a specific factual question. Matched against whole-document summaries, so phrase it the way the document would describe itself.')});_e({documentId:B().describe("The exact documentId provided by the user or returned in an earlier tool result. Never guess or construct one.")});B();B();const lhe="documentSearch";_e({searchQuery:B().describe("Self-contained question describing the information needed. This is also the question used to rerank all retrieved passages"),queryVariants:lt(B().trim().min(1).max(1e3)).max(3).nullish().describe("Optional additional search phrasings or focused aspects of the same question (at most 3). The original query is always searched too; all candidates are deduplicated and reranked together against searchQuery. Make variants meaningfully different: use synonyms, alternative keywords, formal terminology or common-language wording, and distinct relevant aspects. Prefer concise keyword phrases: one using likely formal/domain terms, another using different everyday vocabulary or a complementary aspect. Do not merely reorder the same words or add generic words such as information or rules. Preserve entities, numbers, negation, constraints and document scope; do not invent facts or broaden the question. Omit for simple lookups; use separate calls for independent questions"),context:B().nullish().describe("Optional short clarification for an ambiguous query. It influences semantic matching only and is not added to keyword search. Omit it when the query is already self-contained"),searchType:Bn(["keywords","semantic","balanced"]).nullish().describe('Retrieval bias: "keywords" for exact terms, names, codes, or quoted phrases; "semantic" for conceptual/how/why questions; "balanced" (default) otherwise'),documentIds:lt(B()).nullish().describe("Restrict search to these document IDs when the user provides an ID or asks about a document identified in earlier results. Use the exact provided ID or the documentId/<id> returned by a tool; never invent one. Also use this to retrieve more passages from a partially covered document. Preserve the requested document scope when rephrasing.")});B();const che="recordAnswerSources";_e({includeText:mt().default(!0).describe("False returns only source metadata; true reopens missing passage text. No call is needed when the supporting evidence and IDs are already in context."),sourceIds:lt(B().min(1).max(100)).max(5).default([]).describe("Source IDs to reopen. An empty array lists recent available evidence IDs.")});_e({sourceIds:lt(B().min(1).max(100)).max(20).describe("Only evidence IDs supporting this spoken answer; empty explicitly means no retrieved evidence used.")});const uhe="fetchUrl";_e({url:B().url().describe("Absolute http(s) URL to fetch. Use URLs from tool results, the conversation, or the shop instructions â never construct or guess URLs."),mode:Bn(["content","check"]).nullish().describe('"content" (
830default) returns the readable text of the page. "check" only verifies the link resolves (status check without downloading the page) â use it before sharing a link you have not seen in a tool result this conversation.'),pageOffset:co.number().int().min(0).nullish().describe("0-based first page to read for documents (PDF, Word, PowerPoint). Default 0. Use the pageOffset suggested in a previous result when its footer reported hasMore=true."),pageLimit:co.number().int().min(1).max(20).nullish().describe("Pages to read per call for documents. Default 20. Max 20.")});B();const so={GetOperator:"getOperator",GetShopProducts:"getShopProducts",GetSimilarProducts:"getSimilarProducts",RecommendShopProducts:"recommendShopProducts",ShowShopProductDetail:"showShopProductDetail",GetShopProductByProductId:"getShopProductByProductId",GetShopProductByExternalId:"getShopProductByExternalId",GetShopProductByEan:"getShopProductByEan",GetShopProductByIsbn:"getShopProductByIsbn",GetShopCategories:"getShopCategories",GetShopDeliveryOptions:"getShopDeliveryOptions",GetShopProductAvailability:"getShopProductAvailability",GetShopProductGifts:"getShopProductGifts",GetShopProductAccessories:"getShopProductAccessories",CompareShopProducts:"compareShopProducts"},G7=_e({id:B(),name:B(),title:B().nullish(),price:Ge(),currency:B().nullish(),imageUrl:B().nullish(),images:lt(B()).nullish(),url:B(),description:B().nullish()}),YHe=_e({name:B().describe(`Attribute name exactly as it appears in availableFilters or in a candidate's attributes. Display names are accepted too and matching ignores case ("Objem" finds "objem").`),min:Ge().finite().nullish().describe(`Inclusive lower bound, expressed in the attribute's BASE UNIT â the catalog normalizes numeric values to SI-style units (metres for length, litres for volume, kilograms for weight, seconds for time). Pass 0.5 for "at least 500 ml" and 1.2 for "at least 120 cm". Omit for no lower bound.`),max:Ge().finite().nullish().describe('Inclusive upper bound, in the same base unit as `min` (metres / litres / kilograms). Pass 5 for "up to 5 l". Omit for no upper bound.')}).superRefine((e,t)=>{e.min==null&&e.max==null&&t.addIssue({code:Tt.custom,message:"Set at least one of min or max"}),e.min!=null&&e.max!=null&&e.min>e.max&&t.addIssue({code:Tt.custom,message:"min must be less than or equal to max"})});_e({query:B().nullish().describe("Full, unmodified search query from the user. Do not simplify, shorten, or modify the search term as the entire query is used for semantic and keyword search. Prefer this for broad discovery before applying strict filters. For recommendation-style requests, start with query-first search and refine in follow-up calls only if needed."),searchType:Bn(["keywords","semantic","balanced"]).nullish().describe('Retrieval bias for the query. "balanced" (the default when omitted) is a mixed keyword+vector search and is the right choice for most queries. Use "keywords" when the query is a named product, a brand, a code, or a quoted exact phrase. Use "semantic" for use-case, gift, or conceptual queries ("nÄco na bolavá záda", "dárek pro bÄžce", "something for back pain").'),categoryIds:lt(B()).nullish().describe("Nullish array of category IDs to filter by. Use when user explicitly requests categories or when refining broad searches. Caution: category filters can hide relevant semantic matches if applied too early. Best practice: run an initial broad query first, then apply categoryIds in refinement calls."),minPrice:Ge().nullish().describe("Minimum price filter. Only include when user explicitly mentions a price range or minimum price. Format: raw number without currency symbol (e.g., 500 not 500 KÄ)."),maxPrice:Ge().nullish().describe("Maximum price filter. Only include when user explicitly mentions a price range or maximum price. Format: raw number without currency symbol (e.g., 1000 not 1000 KÄ)."),isOnSale:mt().nullish().describe("Filter by products on sale. Set to true only when user explicitly asks for discounted/sale items. Do not set this parameter unless specifically requested."),inStockOnly:mt().nullish().describe("Set to true to return only products currently in stock. Use when the user asks for immediately available products."),brands:lt(B()).nullish().describe("Only return products of these brands (exact brand names as they appear in earlier results). Use when the user asks for specific brands."),excludeBrands:lt(B()).nullish().describe("Exclude products of these brands (exact brand names). Use when the shop instructions or the user forbid certain brands."),externalId:B().nullish().describe("External product ID"),ean:B().nullish().describe("EAN code of the product"),isbn:B().nullish().describe("ISBN code of the product"),sortBy:Bn(["price","name"]).nullish().describe('Sort results by this field. Use "price" for price-sensitive queries ("cheapestâ¦", "most expensiveâ¦"), or "name" for alphabetical listings. Works with or without `query` â with a query, relevant matches are found first and then sorted.'),sortOrder:Bn(["asc","desc"]).nullish().describe('Sort direction. Use "asc" for lowest-to-highest price or A-Z naming. Use "desc" for highest-to-lowest price or Z-A naming.'),attributes:lt(_e({name:B().describe(`Attribute name exactly as it appears in availableFilters or in a candidate's attributes. Display names are accepted too and matching ignores case ("Barva" finds "barva").`),values:lt(B()).min(1).describe("Accepted values for this attribute, spelled exactly as the catalog stores them â copy them from availableFilters rather than translating or reformatting them, because matching is exact. Listing several is an OR: a product qualifies by carrying ANY one of them.")})).nullish().describe('Attribute filters, combined the way a shop facet is: the values inside ONE entry are alternatives (OR), while separate entr
830ies must ALL hold (AND). One entry of name "barva" with values ["modrá", "Äervená"] returns blue or red products; adding a second entry for "objem" returns only those that are also that volume. Repeating a name in two entries means the same as listing both values in one. Use it as a follow-up refinement once a search has reported availableFilters. A name this catalog does not know is reported back to you instead of quietly matching nothing; a value it does not store simply matches nothing, so copy values from availableFilters.'),numericFilters:lt(YHe).max(4).nullish().describe("Numeric range filters over product parameters (volume, length, weight, wattage, â¦). Set at least one of min/max per entry; several entries and the other filters all apply together (AND). Works ONLY for attributes this feed provides as real numbers â a text-only parameter cannot be range-filtered, and the tool tells you which numeric attributes exist (with their base units) if the name does not resolve. Bounds are read in the attribute's base unit, never in the unit printed in a candidate's attribute text."),limit:Ge().nullish().describe("Maximum number of candidate products returned to you for evaluation (default 24, max 50). Increase only when you need a wider pool to choose from.")});B();_e({totalCount:Ge(),hasMore:mt(),products:lt(G7),categories:lt(_e({id:B(),name:B(),displayName:B().nullish()})).nullish(),availableFilters:lt(_e({name:B(),displayName:B().nullish(),values:lt(B())})).nullish()}).nullish();_e({productId:B().uuid().describe("Internal product ID (UUID) of the product to find neighbours for, exactly as returned by an earlier tool result. The product itself is never among the results."),limit:Ge().nullish().describe("How many neighbouring products to return for evaluation (default 8, max 20).")});B();const XHe=_e({products:lt(_e({productId:B().describe("Internal product ID exactly as returned by an earlier tool result in this conversation."),reason:B().nullish().describe("One short sentence, in the user's language, on why this product fits their request (shown to the user under the card).")})).min(1).max(10).describe("Products to show to the user as cards, best matches first. Include every product that genuinely matches the user request and the shop instructions â do not artificially limit the selection when several fit well.")}),QHe=B(),ZHe=_e({products:lt(G7.extend({reason:B().nullish()}))}).nullish();_e({productId:B().describe("Internal product ID (from earlier tool results) of the single product whose full detail card should be shown to the user.")});B();const JHe=_e({productId:B().uuid().describe("The internal product ID (UUID). Use for a known single product detail lookup, not for comparisons. If user asks about 2+ products, collect IDs and use compareShopProducts instead.")}),eqe=_e({externalId:B().describe("The external product ID. Use for a known single product detail lookup, not for comparisons. If user asks about 2+ products, collect IDs and use compareShopProducts instead.")}),tqe=_e({ean:B().describe("The EAN code of the product. Use for a known single product detail lookup, not for comparisons. If user asks about 2+ products, collect IDs and use compareShopProducts instead.")}),nqe=_e({isbn:B().describe("The ISBN code of the product. Use for a known single product detail lookup, not for comparisons. If user asks about 2+ products, collect IDs and use compareShopProducts instead.")}),rqe=B(),dhe=_e({deliveryDateRaw:B().optional(),stockQuantityRaw:ns(B()).optional(),customFields:ns(B()).optional()}).optional(),K7=_e({feedEvidence:dhe,id:B(),name:B(),title:B().nullish(),price:Ge(),currency:B().nullish(),brand:B().nullish(),description:B().nullish(),shortSummary:B().nullish(),url:B(),imageUrl:B().nullish(),images:lt(B()).nullish(),imageAnnotations:lt(B()).nullish(),categories:lt(_e({id:B(),name:B(),displayName:B().nullish()})).nullish(),gifts:lt(B()).nullish(),extendedWarranty:_e({months:Ge(),description:B()}).nullish(),specialServices:lt(B()).nullish(),accessories:lt(_e({id:B(),name:B(),title:B().nullish(),url:B()})).nullish(),attributes:lt(_e({id:B(),value:B(),attribute:_e({id:B(),displayName:B().nullish(),name:B()})}))}),iqe=Bn(["unique","ambiguous","not_found"]);_e({status:iqe,matchCount:Ge().int(),matches:lt(K7)});_e({parentCategoryId:B().nullish().describe("Optional parent category ID to fetch subcategories. Use this to iteratively narrow category browsing.")});const mX=_e({id:B(),name:B(),displayName:B().nullish(),url:B().nullish()});B();_e({categories:lt(mX.merge(_e({children:lt(mX).nullish()})))});_e({productId:B().describe("The product ID to get delivery options for. Call after identifying the specific product.")});B();_e({productId:B(),deliveryDate:B().nullish(),dispatchLeadTimeDays:Ge().int().nonnegative().nullish(),availabilityDate:B().nullish(),deliveryOptions:lt(_e({carrierId:B(),carrier:B().nullish(),price:Ge().nullish(),priceCod:Ge().nullish()})).nullish()});_e({productId:B().describe("The product ID to get stock/availability for. Call after identifying the specific product.")});B();_e({feedEvidence:dhe,productId:B(),stockQuantity:Ge().int().nullish(),dispatchLeadTimeDays:Ge().int().nonnegative().nullish(),availability:Ft(Wa).nullish()});_e({productId:B().describe("The product ID to get gifts for. Call after identifying the specific product.")});B();_e({productId:B(),gifts:lt(B())});_e({productId:B().describe("The product ID to get accessories for. Call after identifying the specific product.")});B();_e({productId:B(),accessories:lt(G7)});B();const sqe=_e({closed:mt(),ranges:lt(_e({from:B(),to:B()})).optional()}),aqe=_e({operator:_e({id:B(),firstName:B().nullish(),lastName:B().nullish(),email:B().nullish(),phone:B().nullish()}).nullish(),available:mt().optional(),todayHours:sqe.nullish()});_e({productIds:lt(B()).min(2).max(5).describe('Array of product IDs to compare. Min 2, max 5 products. Put all requested products into one call; do not split one comparison request across multiple calls. Use this both for explicit comparisons ("compare A vs B") and multi-product info requests ("tell me about A, B, C").'),highlightDifferences:mt().nullish().default(!0).describe("If true, the comparison will focus on highlighting differences between products.")});B();_e({products:lt(K7),comparisonMatrix:lt(_e({attribute:B().describe("Name of the compared attribute"),displayName:B().nullish().describe("Human-readable name of the attribute"),values:lt(_e({productId:B(),value:B().nullish(),isDifferent:mt().nullish()})),isDifferent:mt().nullish()}))});const fhe="transferCall";_e({reason:B().describe("Why the caller needs a human â used for the hand-off log, not spoken to the caller."),operatorId:B().optional().describe("id of the best-fitting operator, taken from the AVAILABLE OPERATORS list in the system prompt. Omit if no operator clearly fits.")});const hhe="endCall";_e({reason:B().describe("Why the call is ending â used for the call log, not spoken to the caller.")});const phe="webSearch";_e({searchQuery:B().describe("Natural-language query for web search on allowed domains"),context:B().nullish().describe("Optional context from conversation to refine search query")});B();const mhe="updateWorkingMemory",oqe=4e3;_e({memory:B().describe(`Store arbitrary useful information and facts aquired during the conversation that should be persisted for future reference. The COMPLETE note to store, as short markdown lines (a few bullets, not prose). This REPLACES the previous note entirely â it is a full rewrite, not a patch, so anything you leave out is forgotten. Carry forward every line that is still true, drop the ones that are not. Keep it under ${oqe} characters. WHAT BELONGS: product or order ids under discussion, constraints the user gave (budget, dimensions, deadline, quantity), facts a tool could not confirm (e.g. "availability unknown for product 12345 â tool returned nothing"), open questions you still owe the user, and durable user preferences. WHAT DOES NOT: a transcript or recap of the conversation, anything already visible in the current turn, and anything you can look up again with a tool. Send an empty string to clear the note.`)});B();const lqe=[{name:che,displayName:"Voice: Record answer sources",description:"Optional voice attribution metadata. Adds a model tool call and may increase response latency; disabled by default."},{name:lhe,displayName:"Document Search",description:"Searches the agent knowledge base (RAG) to answer questions from uploaded documents and synced content."},{name:ahe,displayName:"Find Documents",description:'Answers "what do you have about X" at the level of whole documents â titles, summaries and section outlines, no passages. Worth enabling on a large knowledge base, where the agent can pick the right document first and then search inside it; on a handful of documents it only adds a round-trip.'},{name:ohe,displayName:"Document Overview",description:"Reads one document's full section outline and its long summary, for questions about what a document covers rather than what it says on a point. Requires Document Search alongside it to quote anything specific."},{name:phe,displayName:"Web Search",description:"Searches the web, restricted to the allowed domains configured for the agent, for up-to-date external information."},{name:so.GetOperator,displayName:"Operator Handoff",description:"Escalates the conversation to a human operator when the agent cannot resolve the request."},{name:so.GetShopProducts,displayName:"Shop: Search Products",description:"Searches the product catalog by query to recommend and present matching products."},{name:so.GetSimilarProducts,displayName:"Shop: Similar Products",description:"Finds the products closest to a given one in the catalog â alternatives to browse, or a replacement when the chosen item is unavailable."},{name:so.GetShopProductByProductId,displayName:"Shop: Product by ID",description:"Looks up a single product by its internal product ID."},{name:so.GetShopProductByExternalId,displayName:"Shop: Product by External ID",description:"Looks up a single product by its external (feed) ID."},{name:so.GetShopProductByEan,displayName:"Shop: Product by EAN",description:"Looks up a product by EAN barcode."},{name:so.GetShopProductByIsbn,displayName:"Shop: Product by ISBN",description:"Looks up a product by ISBN."},{name:so.GetShopCategories,displayName:"Shop: Categories",description:"Lists shop categories to help users browse the catalog."},{name:so.GetShopDeliveryOptions,displayName:"Shop: Delivery Options",description:"Returns available delivery and shipping options."},{name:so.GetShopProductAvailability,displayName:"Shop: Product Availability",description:"Checks stock availability for a product."},{name:so.GetShopProductGifts,displayName:"Shop: Product Gifts",description:"Returns gifts associated with a product."},{name:so.GetShopProductAccessories,displayName:"Shop: Product Accessories",description:"Returns accessories and related products for a product."},{name:so.CompareShopProducts,displayName:"Shop: Compare Products",description:"Compares multiple products side by side for the user."},{name:so.RecommendShopProducts,displayName:"Shop: Recommend Products",description:"Presents agent-selected products to the user as product cards. Card data is loaded from the catalog by product ID, so the agent cannot invent products or links."},{name:so.ShowShopProductDetail,displayName:"Shop: Show Product Detail",description:"Presents the full detail card of one product (images, parameters, categories) to the user. Data is loaded from the catalog by product ID."},{name:mhe,displayName:"Working Memory",description:"Lets the agent keep a short per-conversation scratchpad of facts, constraints and open questions, so details established in earlier turns survive instead of being re-invented."},{name:fhe,displayName:"Transfer Call",description:"Hands a live phone call over to a human operator (cold transfer). Voice calls only â the agent drops off once the caller is connected."},{name:hhe,displayName:"End Call",description:"Ends a live phone call once the conversation is genuinely complete, instead of leaving the line open until the caller hangs up."},{name:uhe,displayName:"Fetch URL",description:"Reads the content of a specific web page or online document â PDF, Word, PowerPoint, images and spreadsheets are converted to text (long documents are read in pages) â and verifies that links resolve before sharing them."}],cqe=[{id:"notion",name:"Notion",description:"Search and update Notion pages and databases.",category:"productivity",serverUrl:"https://mcp.notion.com/mcp",scopes:[],oauthProfile:"notion",docsUrl:"https://developers.notion.com/guides/mcp/get-started-with-mcp",status:"available"},{id:"linear",name:"Linear",description:"Create and update Linear issues and projects.",category:"dev",serverUrl:"https://mcp.linear.app/mcp",scopes:[],oauthProfile:"linear",docsUrl:"https://linear.app/docs",status:"available"},{id:"freelo",name:"Freelo",description:"Manage Freelo tasks, projects, and time tracking.",category:"productivity",serverUrl:"https://mcp.freelo.io/mcp",scopes:[],oauthProfile:"freelo",docsUrl:"https://www.freelo.io/en/help/freelo-mcp",status:"available"},{id:"google-drive",name:"Google Drive",description:"Search, read, and create Drive files (app-scoped files only).",category:"workspace",serverUrl:"https://drivemcp.googleapis.com/mcp/v1",scopes:["https://www.googleapis.com/auth/drive.file","https://www.googleapis.com/auth/drive.readonly"],oauthProfile:"google",docsUrl:"https://developers.google.com/workspace/drive/api/guides/configure-mcp-server",status:"on_request"},{id:"microsoft-365",name:"Microsoft 365",description:"Connect Microsoft 365 (requires tenant admin consent).",category:"workspace",serverUrl:"",scopes:[],oauthProfile:"microsoft",docsUrl:"https://learn.microsoft.com/en-us
830/power-pages/configure/mcp-connect-clients",status:"on_request"}];_e({query:B().max(300).optional().describe("Keywords or exact identifier to search in this thread. Omit when opening messageId."),messageId:B().uuid().optional().describe("Open one original message by ID from search results or summary bookmarks."),offset:Ge().int().min(0).max(1e7).default(0).describe("Character offset for opening a message; result offset for search.")});const We={...so,...qHe,DocumentSearch:lhe,FindDocuments:ahe,GetDocumentOverview:ohe,WebSearch:phe,FetchUrl:uhe,UpdateWorkingMemory:mhe,TransferCall:fhe,EndCall:hhe,RecordAnswerSources:che},ghe=[We.DocumentSearch,We.FindDocuments,We.GetDocumentOverview,We.WebSearch,We.FetchUrl,We.GetOperator,We.GetShopProducts,We.GetSimilarProducts,We.RecommendShopProducts,We.ShowShopProductDetail,We.GetShopProductByProductId,We.GetShopProductByExternalId,We.GetShopProductByEan,We.GetShopProductByIsbn,We.GetShopCategories,We.GetShopDeliveryOptions,We.GetShopProductAvailability,We.GetShopProductGifts,We.GetShopProductAccessories,We.CompareShopProducts,We.UpdateWorkingMemory,We.TransferCall,We.EndCall,We.RecordAnswerSources],uqe=Bn(ghe),dqe=new Set([We.WebSearch,We.FindDocuments,We.GetDocumentOverview]),fqe=new Set([We.TransferCall,We.EndCall,We.RecordAnswerSources]);function m8(e){return e===Fs.ShopAssistant?ghe.filter(t=>!dqe.has(t)&&!fqe.has(t)):[We.GetOperator,We.DocumentSearch,We.UpdateWorkingMemory]}const xhe=F7(hw,lt(B().min(1)).optional().superRefine((e,t)=>{e?.some(n=>!q7(n))&&t.addIssue({code:Tt.custom,message:"Invalid domain or URL"})})),vhe=_e({preset:Ft(KN).optional(),primary:B().nullish(),primaryFg:B().nullish(),logo:B().nullish(),logoBubble:B().nullish()}).strict(),hqe=_e({content:Ge().nonnegative(),summary:Ge().nonnegative()}).strict().refine(e=>e.content>0||e.summary>0,{message:"At least one retrieval vector weight must be greater than zero"}),yhe=_e({personalization:B().optional(),systemPrompt:B().optional(),gender:Ft(Rd).optional(),hybridAlpha:Ge().min(0).max(1).optional(),rewriteRetries:Ge().int().nonnegative().optional(),historyLimit:Ge().int().nonnegative().optional(),contextHistoryLimit:Ge().int().nonnegative().optional(),historyTokenBudget:Ge().int().min(4e3).max(2e5).optional(),toolResultHistoryTokenBudget:Ge().int().min(1e3).max(2e5).optional(),retrievalCount:Ge().int().min(1).max(250).optional(),retrievalTokenCap:Ge().int().min(500).max(16e3).optional(),retrievalVectorWeights:hqe.optional(),rerankCount:Ge().int().min(1).max(100).optional(),weightRerankCoefficient:Ge().min(0).max(1).optional(),rerankCoefficient:Ge().min(0).max(1).optional(),rerank:mt().optional(),imageSupport:mt().optional(),showSources:mt().optional(),minScore:Ge().min(0).max(1).optional(),tonePreset:Ft(qg).optional(),responseLengthPreset:Ft(Wg).optional(),hasWebSearch:mt().optional(),webSearchMaxResults:Ge().int().nonnegative().optional(),webSearchUrls:xhe,showToolActivity:mt().optional(),showReasoning:mt().optional(),moderationMode:Bn(["off","parallel","blocking"]).optional(),moderationLlmCheck:mt().optional(),showFollowUpQuestions:mt().optional(),language:B().optional(),fallbackLanguage:B().optional(),reasoningEffort:UHe.nullable().optional(),newRagService:mt().optional(),enabledBuiltinTools:lt(uqe).optional()}).strict(),pqe=yhe.extend({hybridAlpha:Ge().optional(),retrievalCount:Ge().optional(),retrievalTokenCap:Ge().optional(),rerankCount:Ge().optional(),weightRerankCoefficient:Ge().optional(),rerankCoefficient:Ge().optional(),minScore:Ge().optional(),rewriteRetries:Ge().optional(),historyLimit:Ge().optional(),contextHistoryLimit:Ge().optional()}),mqe=_e({keywords:lt(B()).optional(),endpointing:Ge().min(10).optional(),silenceMessages:lt(B()).optional(),silenceTimeout:Ge().min(10).optional(),maxCallSeconds:Ge().min(60).max(3600).optional(),twilio:_e({number:B()}).nullish(),gemini:_e({voice:Ft(xr).optional(),thinkingLevel:Bn(["minimal","low","medium","high"]).optional(),startOfSpeechSensitivity:Bn(["START_SENSITIVITY_LOW","START_SENSITIVITY_HIGH"]).optional(),endOfSpeechSensitivity:Bn(["END_SENSITIVITY_LOW","END_SENSITIVITY_HIGH"]).optional()}).optional(),operatorTransfer:_e({enabled:mt(),mode:Bn(["cold"]),fallbackPhone:B().optional(),farewellMessage:B().optional()}).optional(),provider:Bn(["geminiLive","openaiRealtime"]).optional(),model:Ft(Ife).optional(),recording:_e({enabled:mt(),retentionDays:Ge().int().positive().max(3650).optional()}).optional(),embed:_e({mode:Bn(["onDemand","proactive"]).optional()}).optional()}).strict(),gqe=_e({accessKey:B().nullish(),workspaceId:B().nullish()}).strict(),xqe=_e({mode:Ft(zg).optional(),entries:xhe}).strict(),bhe=_e({systemAvatar:B().optional(),initialMessage:B().optional(),bubbleTitle:B().optional(),bubbleDescription:B().optional(),requireAcknowledgement:mt().optional(),disclaimerContent:B().optional(),showPopup:mt().optional(),showPopupMobile:mt().optional(),openOnLoad:mt().optional(),displayMode:Ft(nS).optional(),showFeedbackButtons:mt().optional(),showCallouts:mt().optional(),sourcesFormat:Ft(Th).optional(),sourcesDisplayMode:Ft(Ms).optional(),inlineCitations:mt().optional(),expandToolActivity:mt().optional(),placement:_e({position:Ft(N1).optional(),offsetX:Ge().int().optional(),offsetY:Ge().int().optional()}).optional(),captchaEnabled:mt().optional(),captchaLimit:Ge().int().positive().optional(),captchaWindowSeconds:Ge().int().positive().optional(),captchaScoreThreshold:Ge().min(0).max(1).optional(),maxUserMessagesEnabled:mt().optional(),maxUserMessagesLimit:Ge().int().positive().nullish(),domainPolicy:xqe.optional()}).optional(),E_={captchaEnabled:!0,captchaLimit:2,captchaWindowSeconds:1800,maxUserMessagesEnabled:!0,maxUserMessagesLimit:20}
830,_he=hx.extend({name:B().max(100),agent:Ft(Fs).optional(),themeConfig:vhe.optional(),agentType:Ft(ai),voiceConfig:mqe.optional(),omnichannelConfig:gqe.optional(),chatbotConfig:bhe,agentConfig:yhe,overrides:mt().optional(),model:Ft(_c).optional(),smallModel:Ft(_c).optional()}),vqe=_he.omit({id:!0,createdAt:!0,updatedAt:!0,organization:!0}).strict(),whe=_he.extend({agentConfig:pqe}).partial().required({id:!0}).omit({organization:!0}).strict();_e({from:B().datetime().optional(),to:B().datetime().optional()});_e({id:B().uuid(),accountSid:B().min(1),authToken:B().min(1)});_e({hasCustomCredentials:mt()});const yqe=_e({type:kn("init"),id:B()}),bqe=_e({type:kn("text"),content:B()}),_qe=_e({type:kn("tool"),id:B(),index:Ge().int().nonnegative(),name:B(),args:B()});mE([yqe,bqe,_qe]);const Vy=xu.string().transform(e=>{try{return new URL(e.includes("://")?e:`https://${e}`).href}catch{return e}}).refine(e=>{try{const t=new URL(e),n=t.protocol==="http:"||t.protocol==="https:",r=/^[\d.a-z-]+\.[a-z]{2,}$/i.test(t.hostname);return n&&r}catch{return!1}},{message:"Invalid URL"}),wqe=Yu.extend({type:Ft(Mr),sourceType:Ft($r).optional(),name:B(),uri:B(),publicUrl:B(),status:Ft(qn),content:B().nullish(),metadata:ns(J2()).nullish(),parsingMetadata:ns(J2()).nullish(),embeddingsCount:Ge().nullish(),scheduledAt:B().datetime().nullish(),startedParsingAt:B().datetime().nullish(),finishedParsingAt:B().datetime().nullish(),startedEmbeddingAt:B().datetime().nullish(),finishedEmbeddingAt:B().datetime().nullish(),availableForAllAgents:mt()}),She=wqe.extend({name:B().optional(),type:Ft(Mr),chats:lt(B().uuid()),folderId:B().uuid().nullable().optional()});She.omit({id:!0,createdAt:!0,updatedAt:!0}).strict();
830_e({urls:lt(B()),chats:lt(B().uuid()),weights:ns(Ge()),availableForAllAgents:mt(),folderId:B().uuid().nullable().optional()}).strict();_e({chats:lt(B().uuid()),fileName:B(),contentType:B(),size:Ge(),availableForAllAgents:mt(),folderId:B().uuid().nullable().optional()});_e({chats:lt(B().uuid()),availableForAllAgents:mt(),uri:B().url(),name:B().optional(),updateFrequency:Ft(Vn).nullable().optional(),folderId:B().uuid().nullable().optional()});She.partial().required({id:!0}).strict();_e({url:B()});_e({url:Vy});const Sqe=Bn(["website","document","rss","google_drive"]);_e({kind:Sqe,url:B()});_e({documentId:B().uuid()});_e({chatId:B().uuid(),statuses:lt(Ft(qn)).optional()});_e({acceptCookiesSelector:B().trim().max(500).nullable().optional(),id:B().uuid(),updateFrequency:Ft(Vn).nullable(),changeThreshold:Ge().min(0).max(1).nullable()});_e({documentIds:lt(B().uuid()).min(1),folderId:B().uuid().nullable()});_e({documentIds:lt(B().uuid()).min(1)});_e({documentIds:lt(B().uuid()).min(1),chatIds:lt(B().uuid()),availableForAllAgents:mt().optional()});_e({documentIds:lt(B().uuid()).min(1),updateFrequency:Ft(Vn).nullable().optional(),changeThreshold:Ge().min(0).max(1).nullable().optional()}).refine(e=>e.updateFrequency!==void 0||e.changeThreshold!==void 0,{message:"At least one field must be provided for update"});_e({documentIds:lt(B().uuid()).min(1)});_e({documentIds:lt(B().uuid()).min(1),weight:Ge().min(0).max(1)});const Ehe=Yu;Ehe.omit({id:!0,createdAt:!0,updatedAt:!0}).strict();Ehe.partial().required({id:!0}).strict();const uy=B().email("Invalid email format").or(kn("")).nullable().optional();Yu.extend({organizationId:B().uuid("Invalid Organization ID"),isCompany:mt().default(!1),companyName:B().nullable().optional(),registrationNumber:B().nullable().optional(),vatId:B().nullable().optional(),addressLine1:B().nullable().optional(),addressLine2:B().nullable().optional(),city:B().nullable().optional(),postalCode:B().nullable().optional(),country:B().nullable().optional(),billingEmail:uy,invoiceCcEmail:uy});const Eqe=_e({organizationId:B().uuid("Organization ID is required"),isCompany:mt().optional().default(!1),companyName:B().min(1,"Company name is required if isCompany is true").nullable().optional(),registrationNumber:B().nullable().optional(),vatId:B().nullable().optional(),addressLine1:B().min(1,"Address line 1 is required").nullable().optional(),addressLine2:B().nullable().optional(),city:B().min(1,"City is required").nullable().optional(),postalCode:B().min(1,"Postal code is required").nullable().optional(),country:B().min(1,"Country is required").nullable().optional(),billingEmail:uy,invoiceCcEmail:uy}).refine(e=>!(e.isCompany&&!e.companyName),{message:"Company name is required when billing to a company.",path:["companyName"]});_e({organizationId:B().uuid("Organization ID is required"),isCompany:mt().optional(),companyName:B().nullable().optional(),registrationNumber:B().nullable().optional(),vatId:B().nullable().optional(),addressLine1:B().nullable().optional(),addressLine2:B().nullable().optional(),city:B().nullable().optional(),postalCode:B().nullable().optional(),country:B().nullable().optional(),billingEmail:uy,invoiceCcEmail:uy});_e({ico:B(),dic:B().optional(),obchodniJmeno:B(),sidlo:_e({textovaAdresa:B().optional(),ulice:B().optional(),cisloDomovni:B().optional(),cisloOrientacni:B().optional(),obec:B().optional(),psc:B().optional(),stat:B().optional()}),pravniForma:B().optional()});_e({isCompany:kn(!0).default(!0),companyName:B().optional(),registrationNumber:B().optional(),vatId:B().optional(),addressLine1:B().optional(),addressLine2:B().optional(),city:B().optional(),postalCode:B().optional(),country:B().optional().default("CZ")});Yu.extend({partnerOrganizationId:B().uuid(),clientOrganizationId:B().uuid(),createdByUserId:B().uuid().nullish(),source:Ft(jfe)});_e({clientOrganizationId:B().uuid(),partnerOrganizationId:B().uuid().nullable(),createdByUserId:B().uuid().nullish()});_e({partnerOrganizationId:B().uuid()});_e({isPartnerCapable:mt(),hubOrganizationIds:lt(B().uuid()),accessibleOrganizationIds:lt(B().uuid()),myClientOrganizationIds:lt(B().uuid())});const Cqe=Vh.pick({email:!0}).extend({password:B().max(255)}).strict(),Tqe=Vh.pick({email:!0}).strict();Vh.pick({email:!0}).extend({token:B(),password:B().max(255)}).strict();Vh.pick({email:!0}).extend({token:B(),password:B().max(255)}).strict();const Aqe=Vh.pick({email:!0}).extend({organization:B().max(255),url:B().max(255)}).strict();_e({isCorrect:mt().describe("Whether the answer is correct."),accuracyPercentage:Ge().describe("The accuracy percentage of the answer."),explanation:B().describe("A brief explanation of the evaluation.")});const kqe=_e({messages:lt(_e({question:B().describe("The question to be answered."),expectedOutput:B().describe("The expected output.")}))}),Nqe=_e({chatId:B().uuid(),testCases:kqe.array()}).strict();_e({documentId:B().uuid(),count:Ge().optional()});const sA=e=>F7(t=>typeof t=="string"?new Date(t):t,e.refine(t=>t===null&&e instanceof Ch?!0:t instanceof Date&&!Number.isNaN(t.getTime()),{message:"Invalid date string or format provided"})),Y7=Yu.extend({tier:A5.optional(),status:CVe,maxDocuments:Ge().min(0).optional(),maxUsers:Ge().min(0).optional(),price:Ge().min(0).optional(),autoRenewal:mt().default(!1),autoRenewalLimit:Ge().nullable(),autoRenewalAmount:Ge().nullable(),startDate:sA(ql()),endDate:sA(ql().nullable()),billingInterval:bE.default(Ci.Month),billingIntervalCount:Ge().int().min(1).default(1),stripeSubscriptionId:B().nullable(),stripePriceId:B().nullable(),stripeProductId:B().nullable(),metadata:ns(B(),B().optional()).nullable(),autoRenewalChargedThisPeriod:Ge().min(0).default(0),autoRenewalPeriodStart:sA(ql().nullable()),autoRenewalThreshold:Ge().positive({message:"Threshold must be positive"}).min(5,{message:"Threshold must be at least $5.00"}).nullable().optional(),syncedAt:sA(ql().nullable()).refine(e=>!e||e<=new Date,{message:"Sync timestamp cannot be in the future"}).optional(),cancelsAtPeriodEnd:mt().nullable().optional()});Y7.omit({id:!0,createdAt:!0,updatedAt:!0}).required({tier:!0,status:!0}).strict();Y7.partial().required({id:!0}).strict();_e({organizationId:B().uuid(),tier:A5,billingInterval:bE.default(Ci.Month),successUrl:B().url(),cancelUrl:B().url()});_e({organizationId:B().uuid(),tier:A5.optional(),billingInterval:bE.optional(),autoRenewal:mt().optional(),maxUsers:Ge().min(1).optional(),maxDocuments:Ge().positive().optional(),autoRenewalAmount:Ge().positive().min(5,{message:"Auto-renewal amount must be at least $5"}).nullable().optional().transform(e=>e??void 0),autoRenewalLimit:Ge().nonnegative().nullable().optional().transform(e=>e??void 0),autoRenewalThreshold:Ge().positive({message:"Threshold must be positive"}).min(5,{message:"Threshold must be at least $5.00"}).nullable().optional().transform(e=>e??void 0)});_e({organizationId:B().uuid()});Y7.extend({organization:N5});
830_e({organizationId:B().uuid(),atPeriodEnd:mt().default(!1)});_e({organizationId:B().uuid()});_e({organizationId:B().uuid(),autoRenewal:mt(),autoRenewalAmount:Ge().positive().nullable().optional(),autoRenewalLimit:Ge().min(0).nullable().optional(),autoRenewalThreshold:Ge().positive().nullable().optional()});_e({organizationId:B().uuid(),returnUrl:B().url().optional()});_e({organizationId:B().uuid(),amount:Ge().min(5),successUrl:B().url(),cancelUrl:B().url()});const jqe=Bn(["card","bank_transfer"]),Rqe=_e({stripePriceId:B().startsWith("price_"),productType:Bn(["plan","addon"]).default("plan"),addonKey:B().optional(),quantity:Ge().int().min(1).default(1)});_e({organizationId:B().uuid(),items:lt(Rqe).min(1),oneTimeFeePriceIds:lt(B().startsWith("price_")).optional(),collectionMethodTarget:jqe,daysUntilDue:Ge().int().min(1).max(60).default(14),duzpDate:B().regex(/^\d{4}-\d{2}-\d{2}$/,"DUZP date must be in YYYY-MM-DD format").optional(),sendNow:mt().default(!1),replaceExisting:mt().default(!1)});_e({subscriptionId:B(),stripeSubscriptionId:B(),invoiceId:B().startsWith("in_"),invoiceStatus:B(),hostedInvoiceUrl:B().url().nullable(),hostedInvoiceUrlExpiresAt:B().nullable(),sent:mt()});_e({invoiceId:B().startsWith("in_")});_e({invoiceId:B().startsWith("in_")});_e({invoiceId:B().startsWith("in_"),duzpDate:B().regex(/^\d{4}-\d{2}-\d{2}$/,"DUZP date must be in YYYY-MM-DD format").optional(),sendNow:mt().default(!1)});_e({invoiceId:B().startsWith("in_")});_e({invoiceId:B().startsWith("in_"),hostedInvoiceUrl:B().url().nullable(),hostedInvoiceUrlExpiresAt:B().nullable()});_e({invoiceId:B().startsWith("in_"),hostedInvoiceUrl:B().url().nullable(),hostedInvoiceUrlExpiresAt:B().nullable(),status:B(),sent:mt()});_e({organizationId:B().uuid(),statuses:lt(Bn(["draft","open","paid","uncollectible","void"])).optional()});_e({invoiceId:B().startsWith("in_"),number:B().nullable(),amountDue:Ge(),amountPaid:Ge(),currency:B(),dueDate:B().nullable(),hostedInvoiceUrl:B().url().nullable(),hostedInvoiceUrlExpiresAt:B().nullable(),status:B(),createdAt:B(),billingReason:B().nullable(),subscriptionId:B().nullable(),isReissue:mt(),duzpDate:B().nullable(),daysOverdue:Ge()});const Che=_e({priceId:B(),interval:bE,intervalCount:Ge().int().min(1),amount:Ge(),currency:B()}),Iqe=_e({tier:A5,productId:B(),productName:B(),isCustomEnterprise:mt(),features:lt(B()),prices:lt(Che)}),Oqe=_e({addonKey:B(),productId:B(),productName:B(),features:lt(B()),prices:lt(Che),oneTimePrices:lt(_e({priceId:B(),amount:Ge(),currency:B()}))});_e({basePlans:lt(Iqe),addons:lt(Oqe)});_e({currency:Ft(Ti),organizationId:B().uuid().optional()});_e({organizationId:B().uuid()});_e({id:B(),stripePriceId:B(),productType:TVe,addonKey:B().nullable(),productName:B(),quantity:Ge().int(),unitAmou
830nt:Ge(),currency:B(),interval:bE,intervalCount:Ge().int(),currentPeriodStart:B().nullable(),currentPeriodEnd:B().nullable()});_e({organizationId:B().uuid("Invalid Organization ID"),targetCurrency:Ft(Ti),targetTier:Ft(Pr),targetBillingInterval:Ft(Ci),targetPriceId:B().startsWith("price_").optional()});_e({organizationId:B().min(1,"Organization ID is required"),amountToAdd:Ge().positive("Amount must be positive").finite().safe(),currency:Ft(Ti),reason:B().optional()});_e({organizationId:B().uuid("Invalid organization ID"),maxUsers:Ge().min(1).step(1).optional(),maxDocuments:Ge().min(0).step(1).optional()});const j5=_e({name:B().min(1).max(100),description:B().max(500).optional(),isActive:mt().default(!0),availableToAllChats:mt().default(!1),chatIds:lt(B().uuid()).optional()}),The=j5.extend({serverUrl:B().url().refine(e=>["http:","https:"].includes(new URL(e).protocol),{message:"MCP server URL must use HTTP or HTTPS"}).refine(e=>!new URL(e).username&&!new URL(e).password,{message:"MCP server URL must not contain credentials"}),authMode:Ft(lu).default(lu.StaticBearer),enabledTools:lt(B()).optional(),connectorId:B().optional()}),Pqe=_e({name:B(),description:B().nullable().optional()}),Mqe=ns(B()),gX=_e({type:kn("object"),properties:ns($s()).optional(),required:lt(B()).optional()}).passthrough();_e({name:B().min(1).max(128),title:B().max(200).optional(),description:B().max(4e3).optional(),inputSchema:gX,outputSchema:gX.optional(),annotations:_e({title:B().max(200).optional(),readOnlyHint:mt().optional(),destructiveHint:mt().optional(),idempotentHint:mt().optional(),openWorldHint:mt().optional()}).passthrough().optional(),execution:_e({taskSupport:Bn(["forbidden","optional","required"]).optional()}).passthrough().optional()});const Dqe=The.extend({apiKey:B().optional(),headers:Mqe.optional()});Dqe.partial().extend({id:B().uuid()});The.extend({id:B().uuid(),connectionStatus:Ft(s1),hasApiKey:mt(),connectedAt:ql().optional(),tokenExpiresAt:ql().optional(),oauthScopes:lt(B()).optional(),lastAuthError:B().optional(),lastSyncedAt:ql().optional(),catalogVersion:B().optional(),catalogSyncError:B().optional(),toolCount:Ge().optional(),discoveredTools:lt(Pqe).optional()});const Fqe=Bn(["GET","POST","PUT","PATCH","DELETE"]),Lqe=Bn(["path","query"]),zqe=Bn(["string","number","integer","boolean"]),$qe=Bn(["llm","static"]),Bqe=_e({name:B().min(1).max(60).regex(/^[A-Za-z]\w*$/,"Must start with a letter; letters, digits and underscores only"),location:Lqe,type:zqe.default("string"),valueType:$qe.default("llm"),description:B().max(300).optional(),required:mt().default(!1),value:B().optional(),enumValues:lt(B()).optional()}).superRefine((e,t)=>{e.valueType==="static"&&(e.value===void 0||e.value==="")&&t.addIssue({code:Tt.custom,path:["value"],message:"A static parameter requires a value"})}),Ahe=j5.extend({name:B().min(1).max(60).regex(/^[a-z][\d_a-z]*$/,"Lowercase letters, digits and underscores; must start with a letter"),description:B().min(10).max(500),url:B().url(),method:Fqe,parameters:lt(Bqe).default([]),bodyExample:B().max(8e3).optional(),bodyInstructions:B().max(2e3).optional(),responseMapping:B().max(300).optional(),timeoutMs:Ge().int().min(1e3).max(3e4).default(1e4)}),Uqe=Ahe.extend({headers:ns(B()).optional()});Uqe.partial().extend({id:B().uuid(),headerPatch:ns(B().regex(/^[\w!#$%&'*+.^`|~-]+$/),B().nullable()).optional()}).refine(e=>e.headers===void 0||e.headerPatch===void 0,{message:"Use either headers replacement or headerPatch, not both",path:["headerPatch"]});Ahe.extend({id:B().uuid(),headerKeys:lt(B()).optional(),lastTestedAt:ql().optional()});const dy=10,Vqe=Bn(["text","email","phone","number","date","select","textarea"]),khe=_e({name:B().min(1).max(60).regex(/^[a-z][\d_a-z]*$/,"Lowercase letters, digits and underscores; must start with a letter"),label:B().min(1).max(120),type:Vqe,required:mt().default(!1),options:lt(B().min(1)).optional(),placeholder:B().max(200).optional(),validation:B().optional()}).superRefine((e,t)=>{e.type==="select"&&(!e.options||e.options.length<2)&&t.addIssue({code:Tt.custom,path:["options"],message:"Select fields require at least two options"})}
830),Nhe=Bn(["inline","overlay"]),R5=_e({type:kn("form"),title:B(),description:B().optional(),fields:lt(khe).min(1).max(dy),submitLabel:B().default("Submit"),presentation:Nhe.default("inline"),disableDismiss:mt().default(!1)});function _E(e){return R5.safeParse(e).success}_e({toolName:B().min(1),toolCallId:B().min(1),data:ns($s())});const jhe="client_side_form";_e({type:kn("tool"),kind:kn(jhe),toolName:B().min(1),artifact:R5});_e({type:kn(jhe),toolName:B().min(1),artifact:R5});const Hqe="User canceled the form without submitting.";function Rhe(e){if(e==null||e==="")return null;if(e===Hqe)return"canceled";if(typeof e=="object"&&!Array.isArray(e))return e;if(typeof e!="string")return null;try{const t=JSON.parse(e);if(typeof t=="object"&&t!==null&&!Array.isArray(t))return t}catch{return null}return null}const Ihe=j5.extend({name:B().min(1).max(60).regex(/^[a-z][\d_a-z]*$/,"Lowercase letters, digits and underscores; must start with a letter"),description:B().min(10).max(1e3),formTitle:B().min(1).max(120),formDescription:B().max(500).optional(),submitLabel:B().max(40).default("Submit"),presentation:Nhe.default("inline"),disableDismiss:mt().default(!1),fields:lt(khe).min(1).max(dy).superRefine((e,t)=>{const n=new Set;for(const[r,i]of e.entries())n.has(i.name)&&t.addIssue({code:Tt.custom,path:[r,"name"],message:"Field names must be unique"}),n.add(i.name)})});Ihe.partial().extend({id:B().uuid()});Ihe.extend({id:B().uuid()});const Ohe=j5.extend({name:B().min(1).max(60).regex(/^[a-z][\d_a-z]*$/,"Lowercase letters, digits and underscores; must start with a letter"),description:B().min(10).max(500),content:B().min(1).max(2e4)});Ohe.partial().extend({id:B().uuid()});Ohe.extend({id:B().uuid()});const qqe=_e({type:B().min(1),data:_e({content:$s(),role:B().optional(),name:B().optional(),tool_call_id:B().optional(),additional_kwargs:ns($s()).optional(),response_metadata:ns($s()).optional(),id:B().optional()}).passthrough()}),Wqe=1;_e({v:kn(Wqe),messages:lt(qqe)});const Gqe=new Set([We.RagResult,We.RagResultOperator]),Kqe={[We.RagResult]:{display:"card",kind:"rag_answer"},[We.RagResultOperator]:{display:"card",kind:"operator_answer"},[We.RecommendShopProducts]:{display:"card",kind:"product_cards"},[We.ShowShopProductDetail]:{display:"card",kind:"product_detail"},[We.GetOperator]:{display:"card",kind:"operator"},[We.UsageLimitsError]:{display:"card",kind:"usage_limits"}};function j1(e){return Kqe[e]??{display:"activity",kind:"builtin"}}function Yqe(e){const t=[];for(const n of e.toolCalls??[]){if(n.type===Bm.Text){n.content&&t.push({type:"text",id:n.id,text:n.content});continue}const r=j1(n.name),i=Gqe.has(n.name)?n.args?.content:void 0,s=typeof i=="string"&&i.trim()?i:void 0;if(t.push({type:"tool_call",id:n.id,name:n.name,args:n.args??{}}),n.status==="pending"&&!s){_E(n.artifact)&&t.push({type:"non_standard",value:{kind:"form",toolCallId:n.id,name:n.name,artifact:n.artifact}});continue}(n.content!==void 0||n.artifact!==void 0||s!==void 0)&&t.push({type:"tool_result",tool_call_id:n.id,name:n.name,content:typeof n.content=="string"&&n.content?n.content:s??"",artifact:n.artifact,is_error:n.status==="error",display:r.display,kind:r.kind})}return e.content&&t.push({type:"text",text:e.content}),t}function fy(e){return e.blocks??Yqe(e)}function Xqe(e){const t=fy(e),n=new Set(t.flatMap(r=>r.type==="tool_result"?[r.tool_call_id]:[]));for(let r=t.length-1;r>=0;r-=1){const i=t[r];if(i.type!=="non_standard")continue;const s=YN.safeParse(i.value);if(s.success&&!n.has(s.data.toolCallId))return s.data}return null}function Qqe(e){const t=Object.values(Mr);return e&&t.includes(e)?e:Mr.Website}function g8(e){const t=new Map,n=[];for(const r of e)if(r.type==="text")for(const i of r.annotations??[]){if(i.type!=="citation"||!i.url)continue;const s=t.get(i.url);if(s){i.id&&!s.ids?.includes(i.id)&&(s.ids=[...s.ids??[],i.id]);continue}t.set(i.url,{type:Qqe(i.source_type),fileName:i.title??"",url:i.url,page:"",...i.id?{id:i.id,ids:[i.id]}:{}}),n.push(i.url)}return n.map(r=>t.get(r))}const Phe=hx.extend({name:B().max(100),url:B().url(),source:Ft(lh),chat:B().uuid(),scheduledAt:co.date().nullish(),content:B().nullish(),updateFrequency:Ft(Vn),status:Ft(Qs).nullish(),importMetadata:_e({totalProducts:Ge().int().nonnegative().optional(),phase:Bn(["downloading","parsing","importing","scraping","enriching","embedding"]).optional(),stageProgress:_e({processed:Ge().nonnegative(),total:Ge().nonnegative(),failed:Ge().nonnegative()}).optional(),retries:Ge().int().positive().nullish(),lastError:B().nullish(),productErrors:lt(_e({externalId:B(),message:B()})).nullish(),parserErrors:lt(_e({externalId:B(),message:B()})).nullish(),failedProductExternalIds:lt(B()).nullish(),productImport:_e({total:Ge().int().nonnegative(),imported:Ge().int().nonnegative(),unchanged:Ge().int().nonnegative(),parserSkipped:Ge().int().nonnegative(),failed:Ge().int().nonnegative()}).nullish()}).nullish(),processingPaused:mt().default(!1),enrichProducts:mt().default(!1),scrapeProductPages:mt().default(!1),annotateImages:mt().default(!1)});Phe.omit({id:!0,createdAt:!0,updatedAt:!0,organization:!0,status:!0,importMetadata:!0,scheduledAt:!0,content:!0,processingPaused:!0}).strict();Phe.partial().required({id:!0}).omit({organization:!0,processingPaused:!0}).strict();_e({feedId:B().uuid().optional(),chatId:B().uuid(),url:B().url(),source:Ft(lh),enrichProducts:mt().default(!1),scrapeProductPages:mt(),annotateImages:mt()});const Cv=_e({low:Ge().nonnegative(),high:Ge().nonnegative()});
830_e({currency:kn("USD"),productCount:Ge().int().nonnegative(),countSource:Bn(["catalog","feed"]),enrichmentBasis:Bn(["history","baseline"]),perProduct:_e({enrichment:Cv,embeddings:Cv,scraping:Cv,images:Cv}),perProductTotal:Cv,total:Cv});const Zqe=_e({carrierId:B(),price:Ge().nullish(),priceCod:Ge().nullish()}),Jqe=_e({code:B(),description:B()}),eWe=_e({months:Ge().int().positive(),description:B().min(1)}),Mhe=hx.extend({feed:B().uuid(),name:B(),title:B().nullish(),description:B().nullish(),active:mt(),externalId:B(),variantGroupId:B().nullish(),url:B(),imageUrl:B().nullish(),images:lt(B()).nullish(),price:Ge(),priceBeforeDiscount:Ge().nullish(),salePrice:Ge().nullish(),vat:Ge().nullish(),currency:B(),availability:Ft(Wa),brand:B().nullish(),type:B().nullish(),ean:B().nullish(),isbn:B().nullish(),gifts:lt(B()).nullish(),salesVouchers:lt(Jqe).nullish(),extendedWarranty:eWe.nullish(),specialServices:lt(B()).nullish(),stockQuantity:Ge().int().nullish(),deliveryDate:co.date().nullish(),dispatchLeadTimeDays:Ge().int().nonnegative().nullish(),availabilityDate:co.date().nullish(),delivery:lt(Zqe).nullish(),sourceMetadata:ns($s()).nullish(),scheduledAt:co.date(),status:Ft(bi),startedEmbeddingAt:co.date().nullish(),finishedEmbeddingAt:co.date().nullish(),lastError:B().nullish(),contentHash:B().nullish(),lastSeenAt:co.date().nullish(),offerHash:B().nullish(),descriptiveHash:B().nullish(),offerUpdatedAt:co.date().nullish(),contentUpdatedAt:co.date().nullish(),pageContent:B().nullish(),contentSource:Ft(vVe).nullish(),shortSummary:B().nullish(),longSummary:B().nullish(),searchTerms:lt(B()).nullish(),imageAnnotations:lt(B()).nullish(),enrichmentContentHash:B().nullish(),enrichedAt:co.date().nullish(),enrichmentSnapshot:_e({key:B(),description:B()}).nullish(),embeddingSnapshot:_e({format:B(),objectId:B(),identity:B(),discovery:B(),description:B()}).nullish()}),Dhe={contentHash:!0,lastSeenAt:!0,offerHash:!0,descriptiveHash:!0,offerUpdatedAt:!0,contentUpdatedAt:!0,pageContent:!0,contentSource:!0,shortSummary:!0,longSummary:!0,searchTerms:!0,imageAnnotations:!0,enrichmentContentHash:!0,enrichedAt:!0,enrichmentSnapshot:!0,embeddingSnapshot:!0};Mhe.omit({id:!0,createdAt:!0,updatedAt:!0,organization:!0,status:!0,startedEmbeddingAt:!0,finishedEmbeddingAt:!0,scheduledAt:!0,lastError:!0,...Dhe}).strict();Mhe.partial().required({id:!0}).omit({organization:!0,feed:!0,externalId:!0,...Dhe}).strict();const Fhe=hx.extend({feed:B().uuid(),name:B().min(1),displayName:B().nullish(),aliases:lt(B()).nullish(),filterable:mt(),active:mt(),dataType:Ft(Xa),unit:B().nullish(),baseUnit:B().nullish()}),tWe={dataType:!0,unit:!0,baseUnit:!0},nWe=Fhe.omit({id:!0,createdAt:!0,updatedAt:!0,organization:!0,feed:!0,aliases:!0,filterable:!0,active:!0}).strict().superRefine((e,t)=>{const n=e.dataType===Xa.Number;n&&!e.baseUnit?.trim()&&t.addIssue({code:Tt.custom,path:["baseUnit"],message:"A number attribute needs the unit its numbers are compared in"}),!n&&(e.unit?.trim()||e.baseUnit?.trim())&&t.addIssue({code:Tt.custom,path:["unit"],message:"Only a number attribute has units"}),e.dataType===Xa.Tag&&t.addIssue({code:Tt.custom,path:["dataType"],message:"Tags are written by the enrichment model, not by hand"})});Fhe.partial().required({id:!0}).omit({organization:!0,feed:!0,...tWe}).strict();const Lhe=hx.extend({product:B().uuid(),attribute:B().uuid(),value:B(),numericValue:Ge().nullish(),normalizedValue:B().nullish(),source:Ft(jd),active:mt()}),zhe={normalizedValue:!0},rWe=Lhe.omit({id:!0,createdAt:!0,updatedAt:!0,organization:!0,source:!0,active:!0,...zhe}).strict();rWe.omit({attribute:!0}).extend({attribute:nWe}).strict();Lhe.partial().required({id:!0}).omit({organization:!0,product:!0,attribute:!0,...zhe}).strict();const iWe=xu.object({relativePath:xu.string().optional()});iWe.extend({fileName:xu.string(),contentType:xu.string()});xu.object({publicUrl:xu.string()});xu.object({path:xu.string(),publicUrl:xu.string(),uploadUrl:xu.string()});const sWe=_e({page:Ge().positive().optional(),pageSize:Ge().positive().optional()}),aWe=Bn(["crawl","crawl_and_refresh"]);
830_e({id:B().uuid(),mode:aWe.default("crawl")});const oWe=_e({sourceType:kn($r.Website)}).strict(),lWe=_e({sourceType:kn($r.GoogleDrive),includeSubfolders:mt()}).strict(),cWe=_e({sourceType:kn($r.Rss),contentMode:Bn(["inline","follow_link"])}).strict(),uWe=zm("sourceType",[oWe,lWe,cWe]);hx.extend({name:B().min(1).max(255),description:B().max(2e3).nullable().optional(),defaultWeight:Ge().min(0).max(1),availableForAllAgents:mt(),parent:B().uuid().nullable().optional(),chats:lt(B().uuid()),effectiveChatIds:lt(B().uuid()).optional(),effectiveAvailableForAllAgents:mt().optional(),sourceType:Ft($r).optional(),sourceUri:B().nullable().optional(),sourceConfig:uWe.nullable().optional(),websitePathPrefix:B().nullable().optional(),updateFrequency:Ft(Vn).nullable().optional(),discoveryFrequency:Ft(Vn).nullable().optional(),changeThreshold:Ge().min(0).max(1).nullable().optional(),autoIncludeNewPages:mt().nullable().optional(),removalBehavior:Ft(Qa).nullable().optional(),lastSyncedAt:co.date().nullable().optional(),nextUpdateAt:co.date().nullable().optional(),lastCheckedAt:co.date().nullable().optional(),lastSyncError:B().nullable().optional()});_e({name:B().min(1).max(255),description:B().max(2e3).optional(),defaultWeight:Ge().min(0).max(1).optional(),parentId:B().uuid().nullable().optional(),availableForAllAgents:mt().optional(),chatIds:lt(B().uuid()).optional()});_e({url:B().min(1).transform(fx).pipe(B().url()),name:B().optional(),parentId:B().uuid().nullable().optional(),updateFrequency:Ft(Vn).nullable().default(null),discoveryFrequency:Ft(Vn).nullable().default(null),autoIncludeNewPages:mt().default(!1),removalBehavior:Ft(Qa).default(Qa.Flag),availableForAllAgents:mt().default(!1),chatIds:lt(B().uuid()).default([]),changeThreshold:Ge().min(0).max(1).optional(),includePageUrls:lt(B().url()).default([]),allDiscoveredUrls:lt(B().url()).default([])});_e({id:B().uuid(),includeSubfolders:mt().optional(),name:B().min(1).max(255).optional(),description:B().max(2e3).nullable().optional(),defaultWeight:Ge().min(0).max(1).optional(),availableForAllAgents:mt().optional(),updateFrequency:Ft(Vn).nullable().optional(),discoveryFrequency:Ft(Vn).nullable().optional(),changeThreshold:Ge().min(0).max(1).nullable().optional(),autoIncludeNewPages:mt().nullable().optional(),removalBehavior:Ft(Qa).nullable().optional()});_e({id:B().uuid(),newParentId:B().uuid().nullable()});_e({folderId:B().uuid(),chatIds:lt(B().uuid()),availableForAllAgents:mt().optional()});_e({folderIds:lt(B().uuid()).min(1),chatIds:lt(B().uuid()),availableForAllAgents:mt()});_e({folderIds:lt(B().uuid()).min(1),updateFrequency:Ft(Vn).nullable().optional(),discoveryFrequency:Ft(Vn).nullable().optional(),changeThreshold:Ge().min(0).max(1).nullable().optional(),autoIncludeNewPages:mt().nullable().optional(),removalBehavior:Ft(Qa).nullable().optional()}).refine(e=>e.updateFrequency!==void 0||e.discoveryFrequency!==void 0||e.changeThreshold!==void 0||e.autoIncludeNewPages!==void 0||e.removalBehavior!==void 0,{message:"At least one field must be provided for update"});_e({folderId:B().uuid(),chatId:B().uuid()});const $he=Bn(["processing","errored","done","parsing","embedding","parsingError","embeddingError"]),XN="tracked",Bhe=Ft($r);_e({folderId:B().uuid().nullable(),status:Ft(Hr).optional(),pageHasDocument:mt().optional(),search:B().optional(),chatId:B().uuid().optional(),documentPipelineFilter:$he.optional(),sourceType:Bhe.optional(),pagination:sWe.optional()});_e({page:Ge(),pageSize:Ge(),pageCount:Ge(),total:Ge(),hasMore:mt()});_e({pageIds:lt(B().uuid()).min(1),chatIds:lt(B().uuid()).optional(),availableForAllAgents:mt().optional()});_e({pageIds:lt(B().uuid()).optional().default([]),documentIds:lt(B().uuid()).optional().default([]),folderIds:lt(B().uuid()).optional().default([])}).refine(e=>e.pageIds.length>0||e.documentIds.length>0||e.folderIds.length>0,{message:"At least one of pageIds, documentIds, or folderIds must be non-empty"});_e({url:B().min(1).transform(fx).pipe(B().url())});_e({url:B().min(1).transform(fx).pipe(B().url())});_e({url:Vy});_e({url:Vy,name:B().optional(),parentId:B().uuid().nullable().optional(),contentMode:Bn(["inline","follow_link"]).optional(),updateFrequency:Ft(Vn).nullable().default(null),availableForAllAgents:mt().default(!1),chatIds:lt(B().uuid()).default([])});_e({shareLink:B().min(1),name:B().optional(),parentId:B().uuid().nullable().optional(),includeSubfolders:mt().default(!1),updateFrequency:Ft(Vn).nullable().default(null),removalBehavior:Ft(Qa
830).default(Qa.Flag),availableForAllAgents:mt().default(!1),chatIds:lt(B().uuid()).default([]),changeThreshold:Ge().min(0).max(1).optional()});_e({shareLink:B().min(1),includeSubfolders:mt().default(!1)});_e({documentIds:lt(B().uuid()).min(1),targetHost:B().min(1),pathPrefix:B().optional().transform(e=>{if(e==null)return"";const t=e.trim();return!t||t==="/"?"":(t.startsWith("/")?t:`/${t}`).replace(/\/+$/,"")||""}),moveAllHostDocuments:mt().default(!1),updateFrequency:Ft(Vn).optional(),discoveryFrequency:Ft(Vn).optional(),autoIncludeNewPages:mt().optional(),removalBehavior:Ft(Qa).optional(),availableForAllAgents:mt().optional(),chatIds:lt(B().uuid()).optional()});_e({agentName:B(),chatbotConfig:bhe.nullish(),themeConfig:vhe.nullish(),workingHours:nhe.nullish(),captchaSiteKey:B().nullish(),showToolActivity:mt().optional(),showReasoning:mt().optional()});_e({allowed:mt()});_e({chatId:B()}),_e({pageUrl:B().min(1)}),_e({chatId:B()}),_e({chatId:B()}),_e({context:_e({currentUrl:B().optional(),browserLanguages:lt(B()).optional(),pageLanguage:B().optional()}).optional()}),_e({messages:lt(B())});const dWe=Bn(["email-sent","already-verified"]);_e({chatId:B()}),_e({email:B().email(),utmParams:ns(B()).optional()}),_e({status:dWe});_e({url:B()});const fWe=_e({id:B().uuid(),name:B(),source:Ft(lh),status:Ft(Qs),productStatusCounters:_e({pending:Ge(),embedding:Ge(),done:Ge(),failed:Ge()}),products:lt(_e({id:B().uuid(),url:B(),name:B(),status:Ft(bi),price:Ge()})),productsCount:Ge()});_e({webUrl:B(),agent:_e({id:B().uuid(),name:B(),agent:Ft(Fs)}),documents:lt(_e({id:B().uuid(),uri:B(),name:B().optional(),publicUrl:B(),status:Ft(qn)})),documentsCount:Ge(),feeds:lt(fWe).nullish()});_e({agentId:B().uuid()}),_e({chatId:B().uuid()}),_e({agent:Ft(Fs)}).strict();function hWe(e,t){const{previousPath:n,currentPath:r}=t;n&&n!==r&&(e.capture("$pageleave",{path:n}),typeof window<"u"&&(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"page_leave",page_path:n}))),e.capture("$pageview",{path:r}),typeof window<"u"&&(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"page_view",page_path:r,page_title:document.title,page_location:window.location.href}))}function pWe(e){switch(e){case Vn.Daily:return new Date(new Date().setDate(new Date().getDate()+1));case Vn.Weekly:return new Date(new Date().setDate(new Date().getDate()+7));case Vn.BiWeekly:return new Date(new Date().setDate(new Date().getDate()+14));case Vn.Monthly:return new Date(new Date().setMonth(new Date().getMonth()+1));default:return null}}function mWe(e){const t=fx(e);return new URL(t).hostname.toLowerCase()}function gWe(e){const t=e.trim();return!t||t==="/"?"":(t.startsWith("/")?t:`/${t}`).replace(/\/+$/,"")||""}function xWe(e,t){if(!t)return!0;try{const n=new URL(fx(e)).pathname.replace(/\/+$/,"");return n===t||n.startsWith(`${t}/`)}catch{return!1}}function vWe(e){if(e.length===0)return"";const t=e.map(s=>yWe(s)),[n,...r]=t;if(!n||n.length===0)return"";const i=[];for(const[s,a]of n.entries())if(r.every(o=>o[s]===a))i.push(a);else break;return i.length>0&&t.every(s=>s.length===i.length)&&i.pop(),i.length>0?`/${i.join("/")}`:""}function yWe(e){const n=new URL(fx(e)).pathname;return n==="/"||n===""?[]:n.split("/").filter(r=>r.length>0)}const $g={bubble:{width:64,height:64},header:{width:150,height:20},avatar:{width:32,height:32}},uc={bubble:{maxFileSize:1024*1024,recommendedSize:"64Ã64 px",recommendedWidth:$g.bubble.width,recommendedHeight:$g.bubble.height},header:{maxFileSize:1024*1024,recommendedSize:"up to 150Ã20 px",recommendedWidth:$g.header.width,recommendedHeight:$g.header.height},avatar:{maxFileSize:512*1024,recommendedSize:"32Ã32 px",recommendedWidth:$g.avatar.width,recommendedHeight:$g.avatar.height}};function bWe(e){const t=[];let n;for(const r of e.matchAll(/^ {0,3}(`{3,}|~{3,})([^\n]*)(?:\n|$)|(`+)/gm)){const i=r[1]??r[3],s=r[1]!==void 0;if(n){(n.fenced?s&&i[0]===n.delimiter[0]&&i.length>=n.delimiter.length&&!r[2]?.trim():i===n.delimiter)&&(t.push({start:n.start,end:r.index+(n.fenced?r[0].length:i.length)}),n=void 0);continue}let a=0;for(let o=r.index-1;o>=0&&e[o]==="\\";o-=1)a+=1;a%2!==1&&(n={start:r.index,delimiter:i,fenced:s})}
830return n&&t.push({start:n.start,end:e.length}),t}const xX=e=>{let t;const n=new Set,r=(u,d)=>{const h=typeof u=="function"?u(t):u;if(!Object.is(h,t)){const p=t;t=d??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(g=>g(t,p))}},i=()=>t,o={setState:r,getState:i,getInitialState:()=>c,subscribe:u=>(n.add(u),()=>n.delete(u))},c=t=e(r,i,o);return o},_We=(e=>e?xX(e):xX),wWe=e=>e;function SWe(e,t=wWe){const n=Y.useSyncExternalStore(e.subscribe,Y.useCallback(()=>t(e.getState()),[e,t]),Y.useCallback(()=>t(e.getInitialState()),[e,t]));return Y.useDebugValue(n),n}const EWe=e=>{const t=_We(e),n=r=>SWe(t,r);return Object.assign(n,t),n},CWe=(e=>EWe),vX={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},iS=new Map,aA=e=>{const t=iS.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,r])=>[n,r.getState()])):{}},TWe=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const r=iS.get(n.name);if(r)return{type:"tracked",store:e,...r};const i={connection:t.connect(n),stores:{}};return iS.set(n.name,i),{type:"tracked",store:e,...i}},AWe=(e,t)=>{if(t===void 0)return;const n=iS.get(e);n&&(delete n.stores[t],Object.keys(n.stores).length===0&&iS.delete(e))},kWe=e=>{var t,n;if(!e)return;const r=e.split(` 831`),i=r.findIndex(a=>a.includes("api.setState"));if(i<0)return;const s=((t=r[i+1])==null?void 0:t.trim())||"";return(n=/.+ (.+) .+/.exec(s))==null?void 0:n[1]},NWe=(e,t={})=>(n,r,i)=>{const{enabled:s,anonymousActionType:a,store:o,...c}=t;let u;
831try{u=(s??(vX?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!u)return e(n,r,i);const{connection:d,...h}=TWe(o,u,c);let p=!0;i.setState=((x,_,w)=>{const S=n(x,_);if(!p)return S;const E=w===void 0?{type:a||kWe(new Error().stack)||"anonymous"}:typeof w=="string"?{type:w}:w;return o===void 0?(d?.send(E,r()),S):(d?.send({...E,type:`${o}/${E.type}`},{...aA(c.name),[o]:i.getState()}),S)}),i.devtools={cleanup:()=>{d&&typeof d.unsubscribe=="function"&&d.unsubscribe(),AWe(c.name,o)}};const g=(...x)=>{const _=p;p=!1,n(...x),p=_},v=e(i.setState,r,i);if(h.type==="untracked"?d?.init(v):(h.stores[h.store]=i,d?.init(Object.fromEntries(Object.entries(h.stores).map(([x,_])=>[x,x===h.store?v:_.getState()])))),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let x=!1;const _=i.dispatch;i.dispatch=(...w)=>{(vX?"production":void 0)!=="production"&&w[0].type==="__setState"&&!x&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),x=!0),_(...w)}}return d.subscribe(x=>{var _;switch(x.type){case"ACTION":if(typeof x.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return mP(x.payload,w=>{if(w.type==="__setState"){if(o===void 0){g(w.state);return}Object.keys(w.state).length!==1&&console.error(` 832 [zustand devtools middleware] Unsupported __setState action format. 833 When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(), 834 and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } } 835 `);const S=w.state[o];if(S==null)return;JSON.stringify(i.getState())!==JSON.stringify(S)&&g(S);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(w)});case"DISPATCH":switch(x.payload.type){case"RESET":return g(v),o===void 0?d?.init(i.getState()):d?.init(aA(c.name));case"COMMIT":if(o===void 0){d?.init(i.getState());return}return d?.init(aA(c.name));case"ROLLBACK":return mP(x.state,w=>{if(o===void 0){g(w),d?.init(i.getState());return}g(w[o]),d?.init(aA(c.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return mP(x.state,w=>{if(o===void 0){g(w);return}JSON.stringify(i.getState())!==JSON.stringify(w[o])&&g(w[o])});case"IMPORT_STATE":{const{nextLiftedState:w}=x.payload,S=(_=w.computedStates.slice(-1)[0])==null?void 0:_.state;if(!S)return;g(o===void 0?S:S[o]),d?.send(null,w);return}case"PAUSE_RECORDING":return p=!p}return}}),v},jWe=NWe,mP=(e,t)=>{let n;try{n=JSON.parse(e)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&t(n)};function Uhe(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var s;const a=c=>c===null?null:JSON.parse(c,void 0),o=(s=n.getItem(i))!=null?s:null;return o instanceof Promise?o.then(a):a(o)},setItem:(i,s)=>n.setItem(i,JSON.stringify(s,void 0)),removeItem:i=>n.removeItem(i)}}const x8=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return x8(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return x8(r)(n)}}}},RWe=(e,t)=>(n,r,i)=>{let s={storage:Uhe(()=>localStorage),partialize:x=>x,version:0,merge:(x,_)=>({..._,...x}),...t},a=!1;const o=new Set,c=new Set;let u=s.storage;if(!u)return e((...x)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),n(...x)},r,i);const d=()=>{const x=s.partialize({...r()});return u.setItem(s.name,{state:x,version:s.version})},h=i.setState;i.setState=(x,_)=>(h(x,_),d());const p=e((...x)=>(n(...x),d()),r,i);i.getInitialState=()=>p;let g;const v=()=>{var x,_;if(!u)return;a=!1,o.forEach(S=>{var E;return S((E=r())!=null?E:p)});const w=((_=s.onRehydrateStorage)==null?void 0:_.call(s,(x=r())!=null?x:p))||void 0;return x8(u.getItem.bind(u))(s.name).then(S=>{if(S)if(typeof S.version=="number"&&S.version!==s.version){if(s.migrate){const E=s.migrate(S.state,S.version);return E instanceof Promise?E.then(T=>[!0,T]):[!0,E]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,S.state];return[!1,void 0]}).then(S=>{var E;const[T,N]=S;if(g=s.merge(N,(E=r())!=null?E:p),n(g,!0),T)return d()}).then(()=>
835{w?.(g,void 0),g=r(),a=!0,c.forEach(S=>S(g))}).catch(S=>{w?.(void 0,S)})};return i.persist={setOptions:x=>{s={...s,...x},x.storage&&(u=x.storage)},clearStorage:()=>{u?.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>v(),hasHydrated:()=>a,onHydrate:x=>(o.add(x),()=>{o.delete(x)}),onFinishHydration:x=>(c.add(x),()=>{c.delete(x)})},s.skipHydration||v(),g||p},IWe=RWe,yX=(e,t,n)=>{const r=e[t];return r?typeof r=="function"?r():Promise.resolve(r):new Promise((i,s)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(s.bind(null,new Error("Unknown variable dynamic import: "+t+(t.split("/").length!==n?". Note that variables only represent file names one level deep.":""))))})},oA="cs",Vhe=["en","cs"];async function OWe(e){try{const{messages:t}=await yX(Object.assign({"./locales/cs.po":()=>pw(()=>import("./cs-BCoAbadb.js"),[]),"./locales/en.po":()=>pw(()=>import("./en-3jlW4Dar.js"),[])}),`./locales/${e}.po`,3);Be.load(e,t),Be.activate(e)}catch(t){if(console.error(`Failed to load locale: ${e}`,t),e!==oA){const{messages:n}=await yX(Object.assign({"./locales/cs.po":()=>pw(()=>import("./cs-BCoAbadb.js"),[]),"./locales/en.po":()=>pw(()=>import("./en-3jlW4Dar.js"),[])}),`./locales/${oA}.po`,3);Be.load(oA,n),Be.activate(oA)}}}const PWe=e=>({language:"cs",setLanguage:t=>{if(!Vhe.includes(t)){console.error(`Unsupported locale: ${t}`);return}e({language:t})}}),MWe=e=>({chat:null,setChat:t=>e({chat:t})}),DWe=e=>({uri:"",setUri:t=>e({uri:t}),externalDocumentUri:void 0,setExternalDocumentUri:t=>e({externalDocumentUri:t}),webUrls:[],setWebUrls:t=>e({webUrls:t})}),FWe=e=>({unreadThreadIds:void 0,setUnreadThreadIds:t=>e({unreadThreadIds:t})}),LWe=(e,t)=>({organizationTransitioning:!1,jwt:null,user:null,activeSubscription:null,setJwt:n=>e({jwt:n}),setUser:n=>e({user:n}),setActiveSubscription:n=>e({activeSubscription:n}),currentOrganizationId:null,setCurrentOrganizationId:n=>e({currentOrganizationId:n}),hasFeature:n=>t().activeSubscription?.features.includes(n.trim())??!1,clearActiveSubscription:()=>e({activeSubscription:null}),logout:()=>{F0.clear(),e({jwt:null,user:null,activeSubscription:null,currentOrganizationId:null})}}),zWe=e=>jWe(IWe(e,{name:"kanbu_admin_store_v2",storage:Uhe(()=>localStorage),partialize:t=>({user:t.user,jwt:t.jwt,currentOrganizationId:t.currentOrganizationId,activeSubscription:t.activeSubscription,chat:t.chat,language:t.language})})),ir=CWe()(zWe((e,t,n)=>({...LWe(e,t),...MWe(e),...PWe(e),...DWe(e),...FWe(e)})));class R1 extends Error{status=403;constructor(t){super(t),this.name="ForbiddenError"}}class $We extends Error{status=404;constructor(t){super(t),this.name="NotFoundError"}}function bX(e){return e?.code==="NOT_FOUND"||e?.httpStatus===404}function Hhe(e){if(e instanceof $We)return!0;if(e instanceof _u){const t=e.data,n="shape"in e?e.shape?.data:void 0;return bX(t)||bX(n)}return e instanceof Error&&e.cause!=null?Hhe(e.cause):!1}function wE(e){return!!e?.organizations?.some(t=>t.isPartnerOrganization===!0)}function BWe(e,t){const{user:n,currentOrganizationId:r}=ir.getState();if(!n)throw new R1("User is not available.");if(!e.includes(n.role))throw new R1("User is not authorized.");if(n.role!==Jt.SuperAdmin&&!wE(n)&&t&&r!==t)throw new R1("User is not authorized.")}function X7(){const{user:e}=ir.getState();if(!e)throw new R1("User is not available.");if(e.role!==Jt.SuperAdmin&&!wE(e))throw new R1("User is not authorized.")}function UWe(){if(ir.getState().jwt===null)throw N9({to:"/login",search:{redirect:`${location.pathname}${location.search}`}})}function VWe(e){return e}function HWe(e){return e.length===0?VWe:e.length===1?e[0]:function(n){return e.reduce((r,i)=>i(r),n)}}function qWe(e){const t={subscribe(n){let r=null,i=!1,s=!1,a=!1;function o(){if(r===null){a=!0;return}s||(s=!0,typeof r=="function"?r():r&&r.unsubscribe())}return r=e({next(c){i||n.next?.(c)},error(c){i||(i=!0,n.error?.(c),o())},complete(){i||(i=!0,n.complete?.(),o())}}),a&&o(),{unsubscribe:o}},pipe(...n){return HWe(n)(t)}};return t}const WWe=e=>{const{getRefreshToken:t,fetchJwtPairByRefreshToken:n,onJwtPairFetched:r,onRefreshFailed:i,onUnauthorized:s}=e;return()=>{const a={promise:null};return({next:o,op:c})=>qWe(u=>{var d;let h=null;function p(){h?.unsubscribe(),h=o(c).subscribe({async error(v){var x;if(((x=v.data)==null?void 0:x.code)==="UNAUTHORIZED"){s?.();const _=await t();if(_){a.promise=(async()=>{try{const w=await n(_);r?.(w)}catch(w){throw i?.(w),w}finally{a.promise=null}})();try{await a.promise,p();return}catch{}}}u.error(v)},next(v){u.next(v)}
835,complete(){u.complete()}})}return((d=a.promise)!=null?d:Promise.resolve()).finally(()=>{p()}),()=>{h?.unsubscribe()}})}};var GWe=Object.create,qhe=Object.defineProperty,KWe=Object.getOwnPropertyDescriptor,Whe=Object.getOwnPropertyNames,YWe=Object.getPrototypeOf,XWe=Object.prototype.hasOwnProperty,Um=(e,t)=>function(){return t||(0,e[Whe(e)[0]])((t={exports:{}}).exports,t),t.exports},QWe=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=Whe(t),s=0,a=i.length,o;s<a;s++)o=i[s],!XWe.call(e,o)&&o!==n&&qhe(e,o,{get:(c=>t[c]).bind(null,o),enumerable:!(r=KWe(t,o))||r.enumerable});return e},px=(e,t,n)=>(n=e!=null?GWe(YWe(e)):{},QWe(t||!e||!e.__esModule?qhe(n,"default",{value:e,enumerable:!0}):n,e)),ZWe=Um({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/objectWithoutPropertiesLoose.js"(e,t){function n(r,i){if(r==null)return{};var s={};for(var a in r)if({}.hasOwnProperty.call(r,a)){if(i.includes(a))continue;s[a]=r[a]}return s}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),JWe=Um({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/objectWithoutProperties.js"(e,t){var n=ZWe();function r(i,s){if(i==null)return{};var a,o,c=n(i,s);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);for(o=0;o<u.length;o++)a=u[o],s.includes(a)||{}.propertyIsEnumerable.call(i,a)&&(c[a]=i[a])}return c}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),Ghe=Um({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(e,t){function n(r){"@babel/helpers - typeof";return t.exports=n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},t.exports.__esModule=!0,t.exports.default=t.exports,n(r)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),eGe=Um({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(e,t){var n=Ghe().default;function r(i,s){if(n(i)!="object"||!i)return i;var a=i[Symbol.toPrimitive];if(a!==void 0){var o=a.call(i,s||"default");if(n(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(i)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),tGe=Um({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(e,t){var n=Ghe().default,r=eGe();function i(s){var a=r(s,"string");return n(a)=="symbol"?a:a+""}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}}),nGe=Um({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(e,t){var n=tGe();function r(i,s,a){return(s=n(s))in i?Object.defineProperty(i,s,{value:a,enumerable:!0,configurable:!0,writable:!0}):i[s]=a,i}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),SE=Um({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(e,t){var n=nGe();function r(s,a){var o=Object.keys(s);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(s);a&&(c=c.filter(function(u){return Object.getOwnPropertyDescriptor(s,u).enumerable})),o.push.apply(o,c)}return o}function i(s){for(var a=1;a<arguments.length;a++){var o=arguments[a]!=null?arguments[a]:{};a%2?r(Object(o),!0).forEach(function(c){n(s,c,o[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(o)):r(Object(o)).forEach(function(c){Object.defineProperty(s,c,Object.getOwnPropertyDescriptor(o,c))})}return s}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}}),rGe=px(JWe(),1),_X=px(SE(),1);const iGe=["cursor","direction"];function cu(e,t,n){const r=e.flatMap(i=>i.split("."));if(!t&&(!n||n==="any"))return r.length?[r]:[];
835if(n==="infinite"&&D0(t)&&("direction"in t||"cursor"in t)){const{cursor:i,direction:s}=t,a=(0,rGe.default)(t,iGe);return[r,{input:a,type:"infinite"}]}return[r,(0,_X.default)((0,_X.default)({},typeof t<"u"&&t!==Bl&&{input:t}),n&&n!=="any"&&{type:n})]}function wk(e){return cu(e,void 0,"any")}function ml(e,...t){const[n,r]=t,i=e._def().path;return cu(i,n,r??"any")}function sGe(e){return C5(({path:t,args:n})=>{var r;const i=[...t],s=i.pop();if(s==="useMutation")return e[s](i,...n);if(s==="_def")return{path:i};const[a,...o]=n,c=(r=o[0])!==null&&r!==void 0?r:{};return e[s](i,a,c)})}var gP;const aGe=["client","ssrContext","ssrState","abortOnUnmount"],oGe=(gP=b.createContext)===null||gP===void 0?void 0:gP.call(pj,null),lGe=e=>{switch(e){case"queryOptions":case"fetch":case"ensureData":case"prefetch":case"getData":case"setData":case"setQueriesData":return"query";case"infiniteQueryOptions":case"fetchInfinite":case"prefetchInfinite":case"getInfiniteData":case"setInfiniteData":return"infinite";case"setMutationDefaults":case"getMutationDefaults":case"isMutating":case"cancel":case"invalidate":case"refetch":case"reset":return"any"}};function Khe(e){return C5(t=>{const n=[...t.path],r=n.pop(),i=[...t.args],s=i.shift(),a=lGe(r),o=cu(n,s,a);return{infiniteQueryOptions:()=>e.infiniteQueryOptions(n,o,i[0]),queryOptions:()=>e.queryOptions(n,o,...i),fetch:()=>e.fetchQuery(o,...i),fetchInfinite:()=>e.fetchInfiniteQuery(o,i[0]),prefetch:()=>e.prefetchQuery(o,...i),prefetchInfinite:()=>e.prefetchInfiniteQuery(o,i[0]),ensureData:()=>e.ensureQueryData(o,...i),invalidate:()=>e.invalidateQueries(o,...i),reset:()=>e.resetQueries(o,...i),refetch:()=>e.refetchQueries(o,...i),cancel:()=>e.cancelQuery(o,...i),setData:()=>{e.setQueryData(o,i[0],i[1])},setQueriesData:()=>e.setQueriesData(o,i[0],i[1],i[2]),setInfiniteData:()=>{e.setInfiniteQueryData(o,i[0],i[1])},getData:()=>e.getQueryData(o),getInfiniteData:()=>e.getInfiniteQueryData(o),setMutationDefaults:()=>e.setMutationDefaults(wk(n),s),getMutationDefaults:()=>e.getMutationDefaults(wk(n)),isMutating:()=>e.isMutating({mutationKey:wk(n)})}[r]()})}function cGe(e){const t=mfe(e.client),n=Khe(e);return L7(r=>{const i=r;return i==="client"?t:aGe.includes(i)?e[i]:n[r]})}function uGe(e){return Khe(e)}var dGe=px(SE(),1);function wX(e){const t=e instanceof T5?e:B7(e);return C5(n=>{const r=n.path,i=r.join("."),[s,a]=n.args;return(0,dGe.default)({queryKey:cu(r,s,"query"),queryFn:()=>t.query(i,s,a?.trpc)},a)})}var xP=px(SE(),1);function Ro(e,t,n){var r;const i=e[0];let s=(r=e[1])===null||r===void 0?void 0:r.input;if(n){var a;s=(0,xP.default)((0,xP.default)((0,xP.default)({},(a=s)!==null&&a!==void 0?a:{}),n.pageParam?{cursor:n.pageParam}:{}),{},{direction:n.direction})}return[i.join("."),s,t?.trpc]}var fGe=Um({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"(e,t){function n(i){var s,a,o,c=2;for(typeof Symbol<"u"&&(a=Symbol.asyncIterator,o=Symbol.iterator);c--;){if(a&&(s=i[a])!=null)return s.call(i);if(o&&(s=i[o])!=null)return new r(s.call(i));a="@@asyncIterator",o="@@iterator"}throw new TypeError("Object is not async iterable")}function r(i){function s(a){if(Object(a)!==a)return Promise.reject(new TypeError(a+" is not an object."));var o=a.done;return Promise.resolve(a.value).then(function(c){return{value:c,done:o}})}return r=function(o){this.s=o,this.n=o.next},r.prototype={s:null,n:null,next:function(){return s(this.n.apply(this.s,arguments))},return:function(o){var c=this.s.return;return c===void 0?Promise.resolve({value:o,done:!0}):s(c.apply(this.s,arguments))},throw:function(o){var c=this.s.return;return c===void 0?Promise.reject(o):s(c.apply(this.s,arguments))}},new r(i)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),hGe=px(fGe(),1);function v8(e){return{path:e.path.join(".")}}function C_(e){const t=v8(e);return b.useMemo(()=>t,[t])}async function Yhe(e,t,n){const i=t.getQueryCache().build(t,{queryKey:n});i.setState({data:[],status:"success"});const s=[];var a=!1,o=!1,c;try{for(var u=(0,hGe.default)(e),d;a=!(d=await u.next()).done;a=!1){const h=d.value;s.push(h),i.setState({data:[...s]})}}catch(h){o=!0,c=h}finally{try{a&&u.return!=null&&await u.return()}finally{if(o)throw c}}return s}var Lr=px(SE(),1);function Xhe(e){const{client:t,queryClient:n}=e,r=t instanceof T5?t:B7(t);return{infiniteQueryOptions:(i,s,a)=>{var o,c;const u=((o=s[1])===null||o===void 0?void 0:o.input)===Bl,d=async h=>{var p;const g=(0,Lr.default)((0,Lr.default)({},a),{},{trpc:(0,Lr.default)((0,Lr.default)({},a?.trpc),!(a==null||(p=a.trpc)===null||p===void 0)&&p.abortOnUnmount?{signal:h.signal}:{signal:null})});return await r.query(...Ro(s,g,{direction:h.direction,pageParam:h.pageParam}))};return Object.assign((0,Lr.default)((0,Lr.default)({},a),{},{initialData:a?.initialData,queryKey:s,queryFn:u?Bl:d,initialPageParam:(c=a?.initialCursor)!==null&&c!==void 0?c:null}),{trpc:v8({path:i})})},queryOptions:(i,s,a)=>{var o;const c=((o=s[1])===null||o===void 0?void 0:o.input)===Bl,u=async d=>{var h;const p=(0,Lr.default)((0,Lr.default)({},a),{},{trpc:(0,Lr.default)((0,Lr.default)({},a?.trpc),!(a==null||(h=a.trpc)===null||h===void 0)&&h.abortOnUnmount?{signal:d.signal}:{signal:null})}),g=await r.query(...Ro(s,p));return nfe(g)?Yhe(g,n,s):g};return Object.assign((0,Lr.default)((0,Lr.default)({},a),{},{initialData:a?.initialData,queryKey:s,queryFn:c?Bl:u}),{trpc:v8({path:i})})},fetchQuery:(i,s)=>n.fetchQuery((0,Lr.default)((0,Lr.default)({},s),{},{queryKey:i,queryFn:()=>r.query(...Ro(i,s))})),fetchInfiniteQuery:(i,s)=>{var a;return n.fetchInfiniteQuery((0,Lr.default)((0,Lr.default)({},s),{},{queryKey:i,queryFn:({pageParam:o,direction:c})=>r.query(...Ro(i,s,{pageParam:o,direction:c})),initialPageParam:(a=s?.initialCursor)!==null&&a!==void 0?a:null}))},prefetchQuery:(i,s)=>n.prefetchQuery((0,Lr.default)((0,Lr.default)({},s),{},{queryKey:i,queryFn:()=>r.query(...Ro(i,s))})),prefetchInfiniteQuery:(i,s)=>{var a;return n.prefetchInfiniteQuery((0,Lr.default)((0,Lr.default)({},s),{},{queryKey:i,queryFn:({pageParam:o,direction:c})=>r.query(...Ro(i,s,{pageParam:o,direction:c})),initialPageParam:(a=s?.initialCursor)!==null&&a!==void 0?a:null}))},ensureQueryData:(i,s)=>n.ensureQueryData((0,Lr.default)((0,Lr.default)({},s),{},{queryKey:i,queryFn:()=>r.query(...Ro(i,s))})),invalidateQueries:(i,s,a)=>n.invalidateQueries((0,Lr.default)((0,Lr.default)({},s),{},{queryKey:i}),a),resetQueries:(i,s,a)=>n.resetQueries((0,Lr.default)((0,Lr.default)({},s),{},{queryKey:i}),a),refetchQueries:(i,s,a)=>n.refetchQueries((0,Lr.default)((0,Lr.default)({},s),{},{queryKey:i}),a),cancelQuery:(i,s)=>n.cancelQueries({queryKey:i},s),setQueryData:(i,s,a)=>n.setQueryData(i,s,a),setQueriesData:(i,s,a,o)=>n.setQueriesData((0,Lr.default)((0,Lr.default)({},s),{},{queryKey:i}),a,o),getQueryData:i=>n.getQueryData(i),setInfiniteQueryData:(i,s,a)=>n.setQueryData(i,s,a),getInfiniteQueryData:i=>n.getQueryData(i),setMutationDefaults:(i,s)=>{const a=i[0],o=c=>r.mutation(...Ro([a,{input:c}],e));return n.setMutationDefaults(i,typeof s=="function"?s({canonicalMutationFn:o}):s)},getMutationDefaults:i=>n.getMutationDefaults(i),isMutating:i=>n.isMutating((0,Lr.default)((0,Lr.default)({},i),{},{exact:!0}))}}var tn=px(SE());const SX=(e,t)=>new Proxy(e,{get(r,i){return t(i),r[i]}});function pGe(e){var t,n;const r=(t=void 0)!==null&&t!==void 0?t:N=>N.originalFn(),i=(n=void 0)!==null&&n!==void 0?n:oGe,s=gfe,a=N=>{var A;const{abortOnUnmount:k=!1,queryClient:j,ssrContext:R}=N,[P,V]=b.useState((A=N.ssrState)!==null&&A!==void 0?A:!1),U=N.client instanceof T5?N.client:B7(N.client),G=b.useMemo(()=>Xhe({client:U,queryClient:j}),[U,j]),Q=b.useMemo(()=>(0,tn.default)({abortOnUnmount:k,queryClient:j,client:U,ssrContext:R??null,ssrState:P},G),[k,U,G,j,R,P]);return b.useEffect(()=>{V(Z=>Z?"mounted":!1)},[]),l.jsx(i.Provider,{value:Q,children:N.children})};function o(){const N=b.useContext(i);if(!N)throw new Error("Unable to find tRPC Context. Did you forget to wrap your Ap
835p inside `withTRPC` HoC?");return N}function c(N,A){var k;const{queryClient:j,ssrState:R}=o();return R&&R!=="mounted"&&((k=j.getQueryCache().find({queryKey:N}))===null||k===void 0?void 0:k.state.status)==="error"?(0,tn.default)({retryOnMount:!1},A):A}function u(N,A,k){var j,R,P,V,U;const G=o(),{abortOnUnmount:Q,client:Z,ssrState:K,queryClient:te,prefetchQuery:ne}=G,se=cu(N,A,"query"),H=te.getQueryDefaults(se),O=A===Bl;typeof window>"u"&&K==="prepass"&&(k==null||(j=k.trpc)===null||j===void 0?void 0:j.ssr)!==!1&&((R=k?.enabled)!==null&&R!==void 0?R:H?.enabled)!==!1&&!O&&!te.getQueryCache().find({queryKey:se})&&ne(se,k);const L=c(se,(0,tn.default)((0,tn.default)({},H),k)),M=(P=(V=k==null||(U=k.trpc)===null||U===void 0?void 0:U.abortOnUnmount)!==null&&V!==void 0?V:void 0)!==null&&P!==void 0?P:Q,q=E9((0,tn.default)((0,tn.default)({},L),{},{queryKey:se,queryFn:O?A:async X=>{const J=(0,tn.default)((0,tn.default)({},L),{},{trpc:(0,tn.default)((0,tn.default)({},L?.trpc),M?{signal:X.signal}:{signal:null})}),W=await Z.query(...Ro(se,J));return nfe(W)?Yhe(W,te,se):W}}),te);return q.trpc=C_({path:N}),q}function d(N,A,k){var j,R,P;const V=o(),U=cu(N,A,"query"),G=A===Bl,Q=(j=(R=k==null||(P=k.trpc)===null||P===void 0?void 0:P.abortOnUnmount)!==null&&R!==void 0?R:void 0)!==null&&j!==void 0?j:V.abortOnUnmount;B3e((0,tn.default)((0,tn.default)({},k),{},{queryKey:U,queryFn:G?A:Z=>{const K={trpc:(0,tn.default)((0,tn.default)({},k?.trpc),Q?{signal:Z.signal}:{})};return V.client.query(...Ro(U,K))}}))}function h(N,A,k){var j,R,P;const V=o(),U=cu(N,A,"query"),G=(j=(R=k==null||(P=k.trpc)===null||P===void 0?void 0:P.abortOnUnmount)!==null&&R!==void 0?R:void 0)!==null&&j!==void 0?j:V.abortOnUnmount,Q=L3e((0,tn.default)((0,tn.default)({},k),{},{queryKey:U,queryFn:Z=>{const K=(0,tn.default)((0,tn.default)({},k),{},{trpc:(0,tn.default)((0,tn.default)({},k?.trpc),G?{signal:Z.signal}:{signal:null})});return V.client.query(...Ro(U,K))}}),V.queryClient);return Q.trpc=C_({path:N}),[Q.data,Q]}function p(N,A){const{client:k,queryClient:j}=o(),R=wk(N),P=j.defaultMutationOptions(j.getMutationDefaults(R)),V=V3e((0,tn.default)((0,tn.default)({},A),{},{mutationKey:R,mutationFn:U=>k.mutation(...Ro([N,{input:U}],A)),onSuccess(...U){var G,Q;return r({originalFn:()=>{var K,te,ne;return(K=A==null||(te=A.onSuccess)===null||te===void 0?void 0:te.call(A,...U))!==null&&K!==void 0?K:P==null||(ne=P.onSuccess)===null||ne===void 0?void 0:ne.call(P,...U)},queryClient:j,meta:(G=(Q=A?.meta)!==null&&Q!==void 0?Q:P?.meta)!==null&&G!==void 0?G:{}})}}),j);return V.trpc=C_({path:N}),V}const g={data:void 0,error:null,status:"idle"},v={data:void 0,error:null,status:"connecting"};/* istanbul ignore next -- @preserve */function x(N,A,k){var j;const R=(j=k?.enabled)!==null&&j!==void 0?j:A!==Bl,P=fm(cu(N,A,"any")),{client:V}=o(),U=b.useRef(k);b.useEffect(()=>{U.current=k});const[G]=b.useState(new Set([])),Q=b.useCallback(O=>{G.add(O)},[G]),Z=b.useRef(null),K=b.useCallback(O=>{const L=ne.current,M=ne.current=O(L);let q=!1;for(const X of G)if(L[X]!==M[X]){q=!0;break}q&&H(SX(M,Q))},[Q,G]),te=b.useCallback(()=>{var O;if((O=Z.current)===null||O===void 0||O.unsubscribe(),!R){K(()=>(0,tn.default)((0,tn.default)({},g),{},{reset:te}));return}K(()=>(0,tn.default)((0,tn.default)({},v),{},{reset:te}));const L=V.subscription(N.join("."),A??void 0,{onStarted:()=>{var M,q;(M=(q=U.current).onStarted)===null||M===void 0||M.call(q),K(X=>(0,tn.default)((0,tn.default)({},X),{},{status:"pending",error:null}))},onData:M=>{var q,X;(q=(X=U.current).onData)===null||q===void 0||q.call(X,M),K(J=>(0,tn.default)((0,tn.default)({},J),{},{status:"pending",data:M,error:null}))},onError:M=>{var q,X;(q=(X=U.current).onError)===null||q===void 0||q.call(X,M),K(J=>(0,tn.default)((0,tn.default)({},J),{},{status:"error",error:M}))},onConnectionStateChange:M=>{K(q=>{switch(M.state){case"idle":return(0,tn.default)((0,tn.default)({},q),{},{status:M.state,error:null,data:void 0});case"connecting":return(0,tn.default)((0,tn.default)({},q),{},{error:M.error,status:M.state});case"pending":return q}})},onComplete:()=>{var M,q;(M=(q=U.current).onComplete)===null||M===void 0||M.call(q),K(X=>(0,tn.default)((0,tn.default)({},X),{},{status:"idle",error:null,data:void 0}))}});Z.current=L},[V,P,R,K]);b.useEffect(()=>
835(te(),()=>{var O;(O=Z.current)===null||O===void 0||O.unsubscribe()}),[te]);const ne=b.useRef(R?(0,tn.default)((0,tn.default)({},v),{},{reset:te}):(0,tn.default)((0,tn.default)({},g),{},{reset:te})),[se,H]=b.useState(SX(ne.current,Q));return se}function _(N,A,k){var j,R,P,V,U;const{client:G,ssrState:Q,prefetchInfiniteQuery:Z,queryClient:K,abortOnUnmount:te}=o(),ne=cu(N,A,"infinite"),se=K.getQueryDefaults(ne),H=A===Bl;typeof window>"u"&&Q==="prepass"&&(k==null||(j=k.trpc)===null||j===void 0?void 0:j.ssr)!==!1&&((R=k?.enabled)!==null&&R!==void 0?R:se?.enabled)!==!1&&!H&&!K.getQueryCache().find({queryKey:ne})&&Z(ne,(0,tn.default)((0,tn.default)({},se),k));const O=c(ne,(0,tn.default)((0,tn.default)({},se),k)),L=(P=k==null||(V=k.trpc)===null||V===void 0?void 0:V.abortOnUnmount)!==null&&P!==void 0?P:te,M=C9((0,tn.default)((0,tn.default)({},O),{},{initialPageParam:(U=k.initialCursor)!==null&&U!==void 0?U:null,persister:k.persister,queryKey:ne,queryFn:H?A:q=>{var X;const J=(0,tn.default)((0,tn.default)({},O),{},{trpc:(0,tn.default)((0,tn.default)({},O?.trpc),L?{signal:q.signal}:{signal:null})});return G.query(...Ro(ne,J,{pageParam:(X=q.pageParam)!==null&&X!==void 0?X:k.initialCursor,direction:q.direction}))}}),K);return M.trpc=C_({path:N}),M}function w(N,A,k){var j,R,P;const V=o(),U=cu(N,A,"infinite"),G=V.queryClient.getQueryDefaults(U),Q=A===Bl,Z=c(U,(0,tn.default)((0,tn.default)({},G),k)),K=(j=k==null||(R=k.trpc)===null||R===void 0?void 0:R.abortOnUnmount)!==null&&j!==void 0?j:V.abortOnUnmount;U3e((0,tn.default)((0,tn.default)({},k),{},{initialPageParam:(P=k.initialCursor)!==null&&P!==void 0?P:null,queryKey:U,queryFn:Q?A:te=>{var ne;const se=(0,tn.default)((0,tn.default)({},Z),{},{trpc:(0,tn.default)((0,tn.default)({},Z?.trpc),K?{signal:te.signal}:{})});return V.client.query(...Ro(U,se,{pageParam:(ne=te.pageParam)!==null&&ne!==void 0?ne:k.initialCursor,direction:te.direction}))}}))}function S(N,A,k){var j,R,P;const V=o(),U=cu(N,A,"infinite"),G=V.queryClient.getQueryDefaults(U),Q=c(U,(0,tn.default)((0,tn.default)({},G),k)),Z=(j=k==null||(R=k.trpc)===null||R===void 0?void 0:R.abortOnUnmount)!==null&&j!==void 0?j:V.abortOnUnmount,K=z3e((0,tn.default)((0,tn.default)({},k),{},{initialPageParam:(P=k.initialCursor)!==null&&P!==void 0?P:null,queryKey:U,queryFn:te=>{var ne;const se=(0,tn.default)((0,tn.default)({},Q),{},{trpc:(0,tn.default)((0,tn.default)({},Q?.trpc),Z?{signal:te.signal}:{})});return V.client.query(...Ro(U,se,{pageParam:(ne=te.pageParam)!==null&&ne!==void 0?ne:k.initialCursor,direction:te.direction}))}}),V.queryClient);return K.trpc=C_({path:N}),[K.data,K]}return{Provider:a,createClient:s,useContext:o,useUtils:o,useQuery:u,usePrefetchQuery:d,useSuspenseQuery:h,useQueries:(N,A)=>{const{ssrState:k,queryClient:j,prefetchQuery:R,client:P}=o(),V=wX(P),U=N(V);if(typeof window>"u"&&k==="prepass")for(const Q of U){var G;const Z=Q;((G=Z.trpc)===null||G===void 0?void 0:G.ssr)!==!1&&!j.getQueryCache().find({queryKey:Z.queryKey})&&R(Z.queryKey,Z)}return Cae({queries:U.map(Q=>(0,tn.default)((0,tn.default)({},Q),{},{queryKey:Q.queryKey})),combine:A?.combine},j)},useSuspenseQueries:N=>{const{queryClient:A,client:k}=o(),j=wX(k),R=N(j),P=$3e({queries:R.map(V=>(0,tn.default)((0,tn.default)({},V),{},{queryFn:V.queryFn,queryKey:V.queryKey}))},A);return[P.map(V=>V.data),P]},useMutation:p,useSubscription:x,useInfiniteQuery:_,usePrefetchInfiniteQuery:w,useSuspenseInfiniteQuery:S}}function mGe(e){const t=sGe(e);return L7(n=>n==="useContext"||n==="useUtils"?()=>{const r=e.useUtils();return b.useMemo(()=>cGe(r),[r])}:e.hasOwnProperty(n)?e[n]:t[n])}function gGe(e){const t=pGe();return mGe(t)}function xGe(e){const t=Xhe(e);return uGe(t)}const Ae=gGe(),vGe=rBe({url:`${os.apiUrl}/trpc`,headers(){return{...ir.getState().jwt?{Authorization:"Bearer "+ir.getState().jwt}:{}}},fetch(e,t){return fetch(e,{...t,credentials:"include"})},transformer:void 0}),yGe=pBe({url:`${os.apiUrl}/trpc`,headers(){return{...ir.getState().jwt?{Authorization:"Bearer "+ir.getState().jwt}:{}}},fetch(e,t){return fetch(e,{...t,credentials:"include"})},transformer:void 0}),EX=()=>{ir.getState().logout(),window.location.pathname!=="/login"&&(window.location.href=window.location.origin+"/login")},Qhe={links:[WWe({getRefreshToken:()=>ir.getState().user?.email,fetchJwtPairByRefreshToken:e=>Promise.reject(),onJwtPairFetched:e=>{ir.getState().setJwt(e.access)},onRefreshFailed:()=>{EX()},onUnauthorized:()=>{EX()}}
835),g$e({condition:e=>e.path.startsWith("evaluation.evaluate"),true:yGe,false:vGe})]},Cs=gfe(Qhe),bGe=Ae.createClient(Qhe),gc=xGe({queryClient:F0,client:Cs});var _Ge=function(){return null};const wGe=function(){return null};function ps(){const e=ir(h=>h.user),t=ir(h=>h.jwt),n=ir(h=>h.currentOrganizationId),r=ir(h=>h.logout),i=ir(h=>h.setUser),s=ir(h=>h.setJwt),a=ir(h=>h.activeSubscription),o=ir(h=>h.setActiveSubscription),c=ir(h=>h.clearActiveSubscription),u=ir(h=>h.hasFeature),d=ir(h=>h.setCurrentOrganizationId);return{user:e,jwt:t,currentOrganizationId:n,logout:r,setUser:i,setJwt:s,activeSubscription:a,setActiveSubscription:o,clearActiveSubscription:c,hasFeature:u,setCurrentOrganizationId:d}}function Uc(){const{user:e}=ps();return{hasAccess:t=>e?.role&&t.includes(e?.role)}}function EE(e){const t=gs();return b.useCallback((n,r)=>{const{to:i,params:s}=e(r);t({to:i,params:s})},[e,t])}const CX=e=>Symbol.iterator in e,TX=e=>"entries"in e,AX=(e,t)=>{const n=e instanceof Map?e:new Map(e.entries()),r=t instanceof Map?t:new Map(t.entries());if(n.size!==r.size)return!1;for(const[i,s]of n)if(!r.has(i)||!Object.is(s,r.get(i)))return!1;return!0},SGe=(e,t)=>{const n=e[Symbol.iterator](),r=t[Symbol.iterator]();let i=n.next(),s=r.next();for(;!i.done&&!s.done;){if(!Object.is(i.value,s.value))return!1;i=n.next(),s=r.next()}return!!i.done&&!!s.done};function EGe(e,t){return Object.is(e,t)?!0:typeof e!="object"||e===null||typeof t!="object"||t===null||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?!1:CX(e)&&CX(t)?TX(e)&&TX(t)?AX(e,t):SGe(e,t):AX({entries:()=>Object.entries(e)},{entries:()=>Object.entries(t)})}function Hh(e){const t=Y.useRef(void 0);return n=>{const r=e(n);return EGe(t.current,r)?t.current:t.current=r}}function Zhe(){const{language:e,setLanguage:t}=ir(Hh(n=>({language:n.language,setLanguage:n.setLanguage})));return{language:e,setLanguage:t}}const CGe=e=>{const[t,n]=b.useState(()=>typeof window<"u"&&window.matchMedia(e).matches);return b.useEffect(()=>{const r=window.matchMedia(e),i=()=>n(r.matches);return i(),r.addEventListener("change",i),()=>r.removeEventListener("change",i)},[e]),t};function TGe(e,t){const n=[];let r=1,i=t;if(t===0)return[1];t>5&&(e<=3?i=5:e+1>=t?r=t-4:(r=e-1,i=e+1));for(let s=r;s<=i;s++)n.push(s);return n[0]!==1&&(n.unshift("..."),n.unshift(1)),n.at(-1)!==t&&n.push("...",t),n}function AGe(e,t){const n=TGe(e,t),r=e<t-1,i=e>0;return{pagination:n,hasNext:r,hasPrevious:i}}function CE(e,t){return b.useCallback(async({page:n,pageSize:r,sort:i,search:s})=>{const{searchable:a=!0,onSuccess:o,...c}=t??{},u=a?{searchable:{$like:H7(s)}}:{},d=await e({...c,pagination:{page:n,pageSize:r},orderBy:i,where:{...u,...c?.where}});return o?.(d.items),{items:d.items,pageCount:d.meta.pageCount}},[e,t])}function Mw(e,t=Mfe*2){return e&&new Date(e).getTime()+t>=Date.now()?"online":"offline"}function Jhe(e,t=Mfe*2){const n=b.useRef(null),[r,i]=b.useState(Mw(e,t));return b.useEffect(()=>{n.current&&(clearTimeout(n.current),n.current=null);const s=Mw(e,t);if(i(s),!e||s==="offline")return;const o=new Date(e).getTime()+t,c=Date.now(),u=o-c+1e3;return u>0?n.current=setTimeout(()=>{i(Mw(e,t))},u):i("offline"),()=>{n.current&&(clearTimeout(n.current),n.current=null)}},[e,t]),r}function epe(){const e=t3e(),t=b.useCallback((i,s)=>{e&&e.identify(i,{...s})},[e]),n=b.useCallback((i,s)=>{e&&e.capture(i,{...s,timestamp:new Date().toISOString()})},[e]),r=b.useCallback((i,s)=>{e&&e.captureException(i,{$exception_fingerprint:`${i.name}-${s?.feature||"unknown"}`,context:s})},[e]);return{identify:t,trackEvent:n,trackError:r,posthog:e}}function kGe(){return{tonePreset:{[qg.Friendly]:Be._({id:"Gq7H1m"}),[qg.Casual]:Be._({id:"pQCwV3"}),[qg.Balanced]:Be._({id:"kJygHz"}),[qg.Professional]:Be._({id:"Oojfbh"}),[qg.Formal]:Be._({id:"BbNHZY"})},threadCategory:{[fd.Voice]:Be._({id:"KAXSwC"}),[fd.Chat]:Be._({id:"AHZflp"})},agentType:{[ai.Chat]:Be._({id:"AHZflp"}),[ai.Voice]:Be._({id:"KAXSwC"})},chatPlacementPosition:{[N1.Left]:Be._({id:"UlKSMd"}),[N1.Center]:Be._({id:"VTRXqB"}),[N1.Right]:Be._({id:"nOPbWJ"})},chatDisplayMode:{[nS.Widget]:Be._({id:"AHXN2z"}),[nS.Immersive]:Be._({id:"i9zh9T"})},recordUnit:{[Vp.Tokens]:Be._({id:"6RDwJM"}),[Vp.Characters]:Be._({id:"wQoVcC"}),[Vp.Seconds]:Be._({id:"V+rJKF"}),[Vp.Credits]:Be._({id:"lDIOek"})},recordCategory:{[iA.Agent]:Be._({id:"iEQQyu"}),[iA.Data]:Be._({id:"HKH+W+"}),[iA.Other]:Be._({id:"/IX/7x"}),[iA.RAG]:Be._({id:"FOGCJ1"})},gender:{[Rd.None]:Be._({id:"EdQY6l"}),[Rd.Male]:Be._({id:"CvCWBI"}),[Rd.Female]:Be._({id:"M9iqFS"})},feedbackCategory:{[xd.InsufficientDetail]:Be._({id:"86/Xxn"}),[xd.IrrelevantInformation]:Be._({id:"18el8P"}),[xd.MissingInformation]:Be._({id:"e9bnmY"}),[xd.IncorrectInformation]:Be._({id:"UZQ7Jv"}),[xd.Other]:Be._({id:"/IX/7x"})},agent:{[Fs.Conversational]:Be._({id:"hzExWo"}),[Fs.ShopAssistant]:Be._({id:"fopMXg"})},contentType:{[Mr.ExternalDocument]:Be._({id:"lFBXq9"}),[Mr.Website]:Be._({id:"1J9wMe"}),[Mr.Document]:Be._({id:"re2nOO"})},sourcesFormat:{[Th.Simple]:Be._({id:"AQK14J"}),[Th.Academic]:Be._({id:"ChasOQ"})},sourcesDisplayMode:{[Ms.Pills]:Be._({id:"OOCfU+"}),[Ms.Structured]:Be._({id:"yn3Cdh"})},responseLengthPreset:{[Wg.VeryShort]:Be._({id:"XHpq+D"}),[Wg.Short]:Be._({id:"RRXpo1"}),[Wg.Medium]:Be._({id:"agPptk"}),[Wg.Long]:Be._({id:"otaTjg"}),[Wg.VeryLong]:Be._({id:"WDMhbu"})},supportedLanguages:{en:Be._({id:"lYGfRP"}),de:Be._({id:"DDcvSo"}),fr:Be._({id:"nLC6tu"}),es:Be._({id:"65A04M"}),it:Be._({id:"Lj7sBL"}),nl:Be._({id:"KIjvtr"}),pl:Be._({id:"trnWaw"}),pt:Be._({id:"MOERNx"}),da:Be._({id:"Fo2vDn"}),fi:Be._({id:"USZ2N6"}),no:Be._({id:"1IipHp"}),sv:Be._({id:"UaISq3"}),is:Be._({id:"rJl8hp"}),ru:Be._({id:"nji0/X"}),uk:Be._({id:"V9+2pH"}),cs:Be._({id:"w9VTXG"}),sk:Be._({id:"paESr6"}),hu:Be._({id:"mkWad2"}),bg:Be._({id:"KhEBDR"}),ro:Be._({id:"uJc01W"}),sr:Be._({id:"9aBtdW"}),hr:Be._({id:"0aMWde"}),mk:Be._({id:"0MMlCU"}),sl:Be._({id:"LSdcWW"}),sq:Be._({id:"pVxf7b"}),lt:Be._({id:"Ot2qtY"}),lv:Be._({id:"/0YsGP"}),et:Be._({id:"l2pzUk"}),el:Be._({id:"CZXzs4"}),tr:Be._({id:"Kz91g/"}
835),he:Be._({id:"3oTCgM"}),ca:Be._({id:"M1RLfx"}),gd:Be._({id:"sJ64dt"}),cy:Be._({id:"4w9b2x"}),ga:Be._({id:"RfanSp"}),bs:Be._({id:"oI7LTM"}),be:Be._({id:"P/1oWj"}),ka:Be._({id:"17Lyf3"}),hy:Be._({id:"AkeObK"})},documentStatus:{[qn.ParsingError]:Be._({id:"TlLxoA"}),[qn.Uploading]:Be._({id:"/eguJc"}),[qn.Ready]:Be._({id:"ckH3fT"}),[qn.Parsing]:Be._({id:"5FFfmM"}),[qn.ParsingAsync]:Be._({id:"v/Ckc4"}),[qn.EmbeddingError]:Be._({id:"TsEzxK"}),[qn.Parsed]:Be._({id:"/LVyw2"}),[qn.Embedding]:Be._({id:"JXYcL6"}),[qn.Done]:Be._({id:"DPfwMq"})},feedSource:{[lh.Heureka]:Be._({id:"U2tAMv"}),[lh.Zbozi]:Be._({id:"T1pHJx"}),[lh.GoogleMerchant]:Be._({id:"ULcS1c"})},feedStatus:{[Qs.Pending]:Be._({id:"UbRKMZ"}),[Qs.Processing]:Be._({id:"vrnnn9"}),[Qs.Embedding]:Be._({id:"JXYcL6"}),[Qs.Done]:Be._({id:"DPfwMq"}),[Qs.Failed]:Be._({id:"7Bj3x9"})},feedHealth:{[ou.Pending]:Be._({id:"UbRKMZ"}),[ou.Processing]:Be._({id:"vrnnn9"}),[ou.Embedding]:Be._({id:"JXYcL6"}),[ou.Done]:Be._({id:"DPfwMq"}),[ou.Degraded]:Be._({id:"3qNoeP"}),[ou.Stale]:Be._({id:"1ba70W"}),[ou.Failed]:Be._({id:"7Bj3x9"})},shopProductStatus:{[bi.Pending]:Be._({id:"UbRKMZ"}),[bi.Embedding]:Be._({id:"JXYcL6"}),[bi.Done]:Be._({id:"DPfwMq"}),[bi.Failed]:Be._({id:"7Bj3x9"})},productAvailabilityStatus:{[Wa.InStock]:Be._({id:"uAVmx6"}),[Wa.OutOfStock]:Be._({id:"dKGg8T"}),[Wa.OnOrder]:Be._({id:"/MB+gl"}),[Wa.PreOrder]:Be._({id:"c3H83f"}),[Wa.Unknown]:Be._({id:"Ef7StM"})},shopAttributeDataType:{[Xa.Text]:Be._({id:"xeiujy"}),[Xa.Number]:Be._({id:"HptUxX"}),[Xa.Boolean]:Be._({id:"KHJJIj"}),[Xa.Tag]:Be._({id:"UL8A9w"})},shopProductAttributeSource:{[jd.Feed]:Be._({id:"YqqQGY"}),[jd.Model]:Be._({id:"2Fh3HJ"}),[jd.Manual]:Be._({id:"Qg0008"})},role:{[Jt.SuperAdmin]:Be._({id:"aF6zFO"}),[Jt.Admin]:Be._({id:"U3pytU"})},roleWOSuperAdmin:{[wVe.Admin]:Be._({id:"U3pytU"})},updateFrequency:{[Vn.Daily]:Be._({id:"U0sC6H"}),[Vn.Weekly]:Be._({id:"4XSc4l"}),[Vn.BiWeekly]:Be._({id:"5/Vkib"}),[Vn.Monthly]:Be._({id:"+8Nek/"}),[Vn.Never]:Be._({id:"qqeAJM"})},websitePageStatus:{[Hr.New]:Be._({id:"isRobC"}),[Hr.Existing]:Be._({id:"EaG6cP"}),[Hr.Removed]:Be._({id:"eps54V"}),[Hr.Untracked]:Be._({id:"C2abof"})},removalBehavior:{[Qa.Flag]:Be._({id:"baOCbm"}),[Qa.Remove]:Be._({id:"t/YqKh"}),[Qa.Ignore]:Be._({id:"gbbkE7"})},voiceThinkingLevel:{minimal:Be._({id:"8GG+Pa"}),low:Be._({id:"nTWWCZ"}),medium:Be._({id:"agPptk"}),high:Be._({id:"yx/fMc"})},voiceStartOfSpeechSensitivity:{START_SENSITIVITY_LOW:Be._({id:"nTWWCZ"}),START_SENSITIVITY_HIGH:Be._({id:"yx/fMc"})},voiceEndOfSpeechSensitivity:{END_SENSITIVITY_LOW:Be._({id:"nTWWCZ"}),END_SENSITIVITY_HIGH:Be._({id:"yx/fMc"})}}}function Ir(){const{i18n:e,_:t}=Me();return b.useMemo(()=>kGe(),[t])}function tpe(){const{i18n:e,_:t}=Me();return b.useMemo(()=>vfe(),[t])}function Vc(){const e=ir(s=>s.jwt),t=ir(s=>s.currentOrganizationId),n=ir(s=>s.organizationTransitioning),r=Ae.organizations.getCurrent.useQuery(void 0,{enabled:!!e&&!!t&&!n}),i=!n&&r.data?.id===t?r.data:void 0;return{...r,data:i,organization:i,isContextMismatch:!n&&!!r.data&&r.data.id!==t}}function Xu(){const{hasFeature:e}=ps(),{organization:t}=Vc(),n=e(SVe.KbAutoUpdates),r=t?{to:"/organizations/$organizationId/plan-management",params:{organizationId:t.id}}:void 0;return{hasFeature:e,canUseKbAutoUpdates:n,isKbAutoUpdatesLocked:!n,upgradePath:r}}function Sk({statusCode:e,title:t,description:n}){const{i18n:r,_:i}=Me();return l.jsx("div",{className:"flex min-h-screen flex-col items-center justify-center",children:l.jsxs("div",{className:"text-center",children:[l.jsx(S0,{className:"mx-auto mb-4 size-12 text-danger"}),l.jsx("h1",{className:"text-4xl font-bold",children:e}),l.jsx("h2",{className:"mt-2 text-xl font-semibold",children:t}),l.jsx("p",{className:"mt-2 text-muted-fg",children:n}),l.jsx(Oe,{"data-cta":"admin-error-back-to-homepage",asChild:!0,className:"mt-6",children:l.jsx(ar,{to:"/",children:r._({id:"z74+Vv"})})})]})})}const NGe=b.memo(function({error:t}){const n=tpe();return t instanceof R1?l.jsx(Sk,{statusCode:403,title:n[403].title,description:n[403].message}
835):Hhe(t)?l.jsx(Sk,{statusCode:404,title:n[404].title,description:n[404].message}):l.jsx(Sk,{statusCode:500,title:n[500].title,description:n[500].message})}),jGe=b.memo(function(){const t=tpe();return l.jsx(Sk,{statusCode:404,title:t[404].title,description:t[404].message})}),I5=g5e()({component:RGe,errorComponent:NGe,notFoundComponent:jGe});function RGe(){return l.jsxs("div",{className:"text-foreground",children:[l.jsx(XS,{}),l.jsx(O6e,{expand:!0,closeButton:!0,position:"top-right"}),os.debug&&l.jsxs(l.Fragment,{children:[l.jsx(b.Suspense,{fallback:null,children:l.jsx("div",{className:"ml-16",children:l.jsx(wGe,{position:"bottom-right"})})}),l.jsx(b.Suspense,{fallback:null,children:l.jsx(_Ge,{buttonPosition:"bottom-right"})})]})]})}const Q7="/assets/logo-black-BQvXwfSn.svg";function npe(){const{setLanguage:e,language:t}=Zhe();return l.jsx("div",{className:"w-20",children:l.jsx(tr,{value:t,onValueChange:n=>{e(n)},children:Vhe.map(n=>l.jsx(Yt,{value:n,children:n.toUpperCase()},n))})})}function y8(e=!1){const{unreadThreadIds:t,setUnreadThreadIds:n}=ir(Hh(c=>({unreadThreadIds:c.unreadThreadIds,setUnreadThreadIds:c.setUnreadThreadIds}))),{data:r,refetch:i}=Ae.threads.getUnreadThreads.useQuery(void 0,{refetchInterval:3e4,enabled:e}),s=b.useRef(r);b.useEffect(()=>{e&&r!==s.current&&(n(r??[]),s.current=r)},[e,n,r]);const a=b.useCallback(c=>!!t?.includes(c),[t]);return{markAsRead:b.useCallback(async c=>{n(t?.filter(u=>u!==c)??[]),await Cs.threads.removeUnreadThread.query({id:c})},[t,n]),isUnread:a,refetchUnread:i,unreadCount:t?.length??0}}async function b8(e){ir.setState({organizationTransitioning:!0}),await F0.cancelQueries(),ir.setState({jwt:e.access,currentOrganizationId:e.organizationId,chat:null,activeSubscription:null}),F0.clear(),window.location.assign(e.destination)}let vP=!1;const rpe=()=>b.useCallback(async e=>{if(!(!e||vP)){vP=!0;try{const t=await Cs.auth.switchOrganization.mutate({id:e});await b8({access:t.access,organizationId:t.user.currentOrganizationId,destination:"/"})}finally{vP=!1}}},[]),IGe=b.memo(()=>{const e=A5e(),t=gs(),{data:n}=Ae.chats.findAll.useQuery(),{setChat:r,chat:i}=ir(Hh(u=>({setChat:u.setChat,chat:u.chat}))),s=n?.items,a=Array.isArray(s)?s:[],o=u=>{r(u);const d=e.at(-1);if(d&&"chatId"in d.params){const h=d.fullPath.split("/"),p=h.indexOf("$chatId"),g=h.slice(0,p+2).join("/");return t({to:g,params:{chatId:u.id}})}},c=a.length>0;return l.jsxs(Ou,{modal:!1,children:[l.jsxs(Pu,{className:"m-1 flex w-full items-center justify-between rounded-radius border border-border px-3 py-2.5 text-sm font-medium transition-all hover:bg-accent",children:[i?.name??l.jsx(D,{id:"nskygk"}),l.jsx(Nj,{className:"size-4"})]}),l.jsxs(Mu,{side:"bottom",align:"end",className:"min-w-52",children:[c&&l.jsxs(l.Fragment,{children:[l.jsx(ny,{children:l.jsx(D,{id:"8Uv5e6"})}),l.jsx(MN,{children:a.map(u=>l.jsx(Er,{className:"flex items-center justify-between",onClick:()=>o(u),children:u.name},u.id))}),l.jsx(bh,{})]}),l.jsx(ny,{children:l.jsx(D,{id:"7JivQy"})}),l.jsx(MN,{children:l.jsx(Er,{asChild:!0,children:l.jsxs(ar,{"data-cta":"admin-chats-switch-add-new-link",to:"/chats/create",children:[l.jsx(ZS,{className:"mr-2 size-4"}),l.jsx(D,{id:"Hkobke"})]})})})]})]})}),dc=b.memo(function({Icon:t,to:n,children:r,disabled:i,params:s,activeProps:a}){return l.jsx(ide,{disabled:i,asChild:!0,children:l.jsxs(ar,{"data-cta":"admin-menu-link","data-route":n,preload:!1,to:n,params:s,activeProps:{className:"bg-primary/30",...a},children:[l.jsx(t,{className:$e("size-4 transition-none")})," ",r]})})}),ja=b.memo(function({roles:t,children:n}){const{user:r}=ps();return!r||!t.includes(r.role)?null:n}),ipe=b.memo(function({}){const[t,n]=b.useState(""),{data:r}=Ae.chats.findAll.useQuery({pagination:{pageSize:1e3}}),{data:i}=Ae.organizations.findAll.useQuery({pagination:{pageSize:1e3}}),{setChat:s,chat:a}=ir(Hh(E=>({setChat:E.setChat,chat:E.chat}))),{user:o}=ps(),c=o?.role===Jt.SuperAdmin,u=wE(o),{unreadCount:d}=y8(!0),h=rpe(),{organization:p}=Vc(),g=p?.name,v=i?.items?.filter(E=>E.name.toLowerCase().includes(t.toLowerCase())),x=r?.items,_=Array.isArray(x)?x:[],w=(i?.items?.length??0)>=6;b.useEffect(()=>{if(_.length!==0&&(a||s(_[0]),a&&!_.some(E=>E.id===a.id)&&s(_[0]),a)){const E=_.find(T=>T.id===a.id);E&&s(E)}},[_,a,s]);const S=a?.id;return l.jsx(qLe,{children:l.jsxs(WLe,{children:[l.jsx(To,{children:l.jsx(dc,{to:"/inbox",Icon:DRe,children:l.jsxs("div",{className:"flex w-full items-center justify-between",children:[l.jsx(D,{id:"Gp4Yi6"}),d>0&&l.jsx(En,{className:"min-w-5 justify-center",size:"xs",variant:"primary",children:d})]})})}),l.jsx(To,{children:l.jsx(dc,{to:"/users",Icon:poe,children:l.jsx("div",{className:"flex w-full items-center justify-between",children:l.jsx(D,{id:"3zE1mx"})})})}),l.jsx(To,{children:l.jsx(dc,{to:"/knowledge-base",Icon:kK,children:l.jsx(D,{id:"yWH3P0"})})}),l.jsx(To,{children:l.jsx(dc,{to:"/agent-tools",Icon:Jae,children:l.jsx(D,{id:"R19Dod"})})}),l.jsx(YT,{className:"mt-6",children:l.jsx(D,{id:"iEQQyu"})}),l.jsx(To,{children:l.jsx(IGe,{})}),S&&l.jsxs(l.Fragment,{children:[l.jsx(To,{children:l.jsx(dc,{to:"/chats/$chatId/documents",params:{chatId:S},Icon:kK,children:l.jsx(D,{id:"yWH3P0"})})}),a?.agent===Fs.ShopAssistant&&l.jsx(To,{children:l.jsx(dc,{to:"/chats/$chatId/feeds",params:{chatId:S},Icon:eE,children:l.jsx(D,{id:"miIIdx"})})}),l.jsx(To,{children:l.jsx(dc,{to:"/chats/$chatId/edit",params:{chatId:S},Icon:YIe,children:l.jsx(D,{id:"iAL9tI"})})}),l.jsx(To,{children:l.jsx(dc,{to:"/chats/$chatId/faqs",Icon:ax,params:{chatId:S},children:l.jsx(D,{id:"aJ4pMe"})})}),(a?.agentType===ai.Chat||a?.agentType===ai.Voice)&&l.jsx(To,{children:l.jsx(ide,{asChild:!0,children:l.jsxs("a",{target:"_blank",href:`${os.playgroundUrl}/${S}`,className:"!text-green-500",rel:"noreferrer",children:[l.jsx(eoe,{className:"size-4 transition-none"}),l.jsx(D,{id:"0LrFTO"})]})})})]}),l.jsx(YT,{className:"mt-6",children:l.jsx(D,{id:"jiE6Vn"})}),l.jsx(To,{children:l.jsxs(Ou,{modal:!1,onOpenChange:E=>{E||n("")},children:[l.jsxs(Pu,{className:"m-1 flex w-full items-center justify-between rounded-radius border border-border px-3 py-2.5 text-sm font-medium transition-all hover:bg-accent",children:[g??l.jsx(D,{id:"L9IlXH"}),l.jsx(Nj,{className:"size-4"})]}),l.jsxs(Mu,{side:"bottom",align:"end",className:"max-h-60 min-w-52 overflow-y-auto",children:[i?.items?.length&&l.jsxs(l.Fragment,{children:[l.jsx(ny,{children:l.jsx(D,{id:"jiE6Vn"})}),w&&l.jsx("div",{className:"px-2 pb-2",children:l.jsx(fn,{"data-cta":"admin-menu-organization-search-input",type:"text",placeholder:Be._({id:"n0cBUB"}),value:t,onChange:E=>{E.preventDefault(),E.stopPropagation(),n(E.target.value)},onKeyDown:E=>
835{E.stopPropagation()},autoFocus:!0,className:"h-8"})}),l.jsx(bh,{}),l.jsx(MN,{children:v&&v.length>0?v.map(E=>l.jsx(Er,{className:"flex items-center justify-between",onClick:()=>h(E.id),children:E.name},E.id)):l.jsx("div",{className:"px-2 py-3 text-center text-sm text-muted-fg",children:l.jsx(D,{id:"12qhwJ"})})}),l.jsx(bh,{})]}),l.jsx(ny,{children:l.jsx(D,{id:"7JivQy"})}),l.jsx(MN,{children:l.jsx(Er,{asChild:!0,children:l.jsxs(ar,{"data-cta":"admin-menu-organizations-add-new-link",to:"/organizations/create",children:[l.jsx(ZS,{className:"mr-2 size-4"}),l.jsx(D,{id:"Hkobke"})]})})})]})]})}),l.jsxs(ja,{roles:[Jt.SuperAdmin],children:[l.jsx(YT,{className:"mt-6 text-amber-600",children:l.jsx(D,{id:"ZcYwvX"})}),l.jsx(To,{children:l.jsx(dc,{to:"/organizations",Icon:AK,activeProps:{className:"bg-amber-500/30"},children:l.jsx(D,{id:"jiE6Vn"})})}),l.jsx(To,{children:l.jsx(dc,{to:"/chats",Icon:TK,activeProps:{className:"bg-amber-500/30"},children:l.jsx(D,{id:"8Q+lLG"})})})]}),!c&&u&&l.jsxs(l.Fragment,{children:[l.jsx(YT,{className:"mt-6",children:l.jsx(D,{id:"71zZ31"})}),l.jsx(To,{children:l.jsx(dc,{to:"/organizations",Icon:AK,children:l.jsx(D,{id:"jiE6Vn"})})}),l.jsx(To,{children:l.jsx(dc,{to:"/chats",Icon:TK,children:l.jsx(D,{id:"8Q+lLG"})})})]})]})})}),OGe="3lMBbo",spe=b.memo(function(){const t=gs(),{i18n:n,_:r}=Me(),{logout:i}=ps(),{user:s,currentOrganizationId:a}=ps(),o=Ae.auth.logout.useMutation({onError:c=>{Re.error(n._({id:"NkgvWN"}),{description:n._({id:"f666Ve"})})},onSettled:()=>{i(),t({to:"/login"})}});return s?(a||t({to:"/login"}),l.jsxs("div",{className:"mt-6 flex w-full flex-col items-center gap-3",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("p",{className:"text-xs font-medium text-menu-fg/50",children:["v",os.version]}),l.jsx(_h,{orientation:"vertical"}),l.jsx("button",{type:"button","data-cta":"admin-user-dropdown-report-error-button",onClick:()=>{try{window.Tally.openPopup(OGe)}catch(c){console.error(c)}},children:l.jsx(D,{id:"IyujRT",components:{0:l.jsx("p",{className:"text-xs font-bold"})}})})]}),l.jsx(_h,{}),l.jsxs(Ou,{modal:!1,children:[l.jsxs(Pu,{"data-testid":"user-dropdown-trigger",className:"group flex w-full items-center justify-between gap-3 rounded-radius p-2 transition-all hover:bg-accent",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(woe,{className:"cursor-pointer",src:s?.photo,fallback:yt.initials(yt.fullName({firstName:s?.firstName||"",lastName:s?.lastName||""}))}),l.jsxs("div",{className:"grow text-left",children:[l.jsx("p",{className:"text-sm font-medium",children:yt.fullName({firstName:s.firstName||s.email,lastName:s.lastName||""})}),l.jsx("p",{className:"text-xs text-foreground/50",children:s.email})]})]}),l.jsx("div",{className:"flex shrink-0 items-center justify-center",children:l.jsx(Nj,{className:"size-4"})})]}),l.jsxs(Mu,{side:"top",align:"end",className:"min-w-52",children:[l.jsx(ny,{children:n._({id:"ucgZ0o"})}),l.jsx(Er,{className:"flex items-center gap-2",asChild:!0,children:l.jsxs(ar,{to:"/organizations/$organizationId/edit",params:{organizationId:a??""},children:[l.jsx(Dj,{className:"size-4"}),n._({id:"Tz0i8g"})]})}),l.jsx(Er,{className:"flex items-center gap-2",asChild:!0,children:l.jsxs(ar,{to:"/organizations/$organizationId/payments",params:{organizationId:a??""},children:[l.jsx(T2,{className:"size-4"}),n._({id:"H0ShEF"})]})}),l.jsx(bh,{}),l.jsx(ny,{children:n._({id:"7PzzBU"})}),l.jsx(Er,{className:"flex items-center gap-2",asChild:!0,children:l.jsxs(ar,{to:"/users/profile",children:[l.jsx(dOe,{className:"size-4"}),n._({id:"vERlcd"})]})}),l.jsxs(Er,{className:"flex items-center gap-2",onClick:()=>o.mutate(),children:[l.jsx(VIe,{className:"size-4"}),n._({id:"nOhz3x"})]})]})]})]})):null});function ape(){const{i18n:e,_:t}=Me(),{organization:n}=Vc();if(!n)return null;const r=n.currentMonthlyUsage>=n.monthlyUsageLimit,i=n.balance<=0;return!r||!i?null:l.jsx("div",{className:"mb-4 rounded-md bg-red-100 p-4",role:"alert","aria-live":"polite",children:l.jsxs("div",{className:"flex items-center justify-between gap-4",children:[l.jsxs("div",{className:"flex-1",children:[l.jsx("h4",{className:"mb-1 text-sm font-semibold text-danger",children:e._({id:"11hFoM"})}),l.jsx("p",{className:"text-sm text-danger/90","aria-describedby":"usage-limit-action",children:e._({id:"/1/xJf"})})]}),l.jsx(Oe,{"data-cta":"admin-usage-limit-banner-increase-limit-button",variant:"danger",asChild:!0,children:l.jsx(ar,{id:"usage-limit-action",to:"/organizations/$organizationId/payments",params:{organizationId:n.id},children:e._({id:"iv98cZ"})})})]})})}function ope(e=15e3*60){const{setUser:t,currentOrganizationId:n,setActiveSubscription:r}=ps(),i=Ae.users.me.useQuery(void 0,{staleTime:e}),s=Ae.subscriptions.getActive.useQuery({organizationId:n??""},{enabled:!!n,staleTime:e});b.useEffect(()=>{i.data&&t(i.data)},[t,i.data]),b.useEffect(()=>{if(!n){r(null);return}if(s.isError){r(null);return}s.data&&r(s.data)},[s.data,s.isError,n,r])}const PGe=nr("/_fullWidthLayout")({beforeLoad:async({context:{authGuard:e}})=>e(),component:MGe});function MGe(){return ope(),l.jsxs(ede,{hasHeader:!1,headerHeight:0,children:[l.jsxs(tde,{className:"flex flex-col justify-between border-r p-3 text-foreground",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"mx-1 my-2 mb-3 flex items-center justify-between",children:[l.jsx(ar,{to:"/",className:"block p-1",children:l.jsx("img",{src:Q7,alt:"Kanbu.ai",className:"h-8 w-auto"})}),l.jsx("div",{children:l.jsx(npe,{})})]}
835),l.jsx(ipe,{})]}),l.jsx(spe,{})]}),l.jsxs(nde,{children:[l.jsx(ape,{}),l.jsx(XS,{})]})]})}const DGe=nr("/_baseLayout")({beforeLoad:async({context:{authGuard:e}})=>e(),component:FGe});function FGe(){const{organization:e,isError:t,isContextMismatch:n,refetch:r}=Vc();return e?l.jsx(LGe,{}):l.jsx("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4",role:"status",children:t||n?l.jsxs(l.Fragment,{children:[l.jsx("p",{children:l.jsx(D,{id:"4dvtEU"})}),l.jsx("button",{type:"button",onClick:()=>void r(),className:"underline",children:l.jsx(D,{id:"KDw4GX"})})]}):l.jsx("p",{children:l.jsx(D,{id:"yuCwWP"})})})}function LGe(){return ope(),l.jsxs(ede,{hasHeader:!1,headerHeight:0,children:[l.jsxs(tde,{className:"flex flex-col justify-between border-r p-3 text-foreground",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"mx-1 my-2 mb-3 flex items-center justify-between",children:[l.jsx(ar,{to:"/",className:"block p-1",children:l.jsx("img",{src:Q7,alt:"Kanbu.ai",className:"h-8 w-auto"})}),l.jsx("div",{children:l.jsx(npe,{})})]}),l.jsx(ipe,{})]}),l.jsx(spe,{})]}),l.jsx(nde,{className:"bg-gray-50 p-6",children:l.jsxs("div",{className:"container mx-auto",children:[l.jsx(ape,{}),l.jsx(XS,{})]})})]})}const zGe="/assets/bg-gradient-BhW4mnPK.webp",$Ge="/assets/login-mockup-h27J30IM.png",BGe=nr("/_authLayout")({component:UGe,beforeLoad:async()=>{if(ir.getState().jwt)throw N9({to:"/inbox"})}});function UGe(){return l.jsxs("div",{className:"flex h-screen flex-col bg-background 2xl:flex-row",children:[l.jsx("div",{className:"absolute z-10 block size-full 2xl:relative 2xl:w-1/2",children:l.jsxs("div",{className:"relative flex h-screen items-center justify-center 2xl:justify-end",children:[l.jsx("img",{src:zGe,alt:"Kanbu",className:"size-full object-cover"}),l.jsx("img",{src:$Ge,alt:"Kanbu",className:"absolute hidden w-full max-w-[560px] px-12 py-6 2xl:mr-44 2xl:block"})]})}),l.jsx("div",{className:"relative z-20 flex min-h-0 flex-1 w-full flex-col items-center overflow-y-auto px-6 py-8 sm:px-12 2xl:w-1/2 2xl:items-start 2xl:justify-center 2xl:bg-slate-100 2xl:pl-44",children:l.jsxs("div",{className:"relative my-auto flex w-full max-w-[520px] flex-col items-center rounded-lg bg-white p-8 shadow-lg sm:p-12 2xl:p-16",children:[l.jsx("div",{className:"mb-8 mt-4",children:l.jsx("img",{src:Q7,alt:"Kanbu logo",className:" h-12"})}),l.jsx(XS,{})]})})]})}const VGe=nr("/_baseLayout/")({component:()=>l.jsx(Cj,{to:"/inbox"})}),HGe=b.memo(function({items:t,title:n,children:r}){return l.jsxs("div",{className:"mb-4 flex w-full flex-col items-start justify-between gap-6 md:flex-row",children:[l.jsxs("div",{className:"flex flex-col gap-2",children:[l.jsxs(HLe,{children:[l.jsx(JO,{className:"flex sidebar:hidden",children:l.jsx(rde,{children:l.jsx(coe,{className:"size-6 text-foreground"})})}),l.jsx(hY,{className:"flex sidebar:hidden",children:l.jsx(_h,{orientation:"vertical",className:"mx-1 h-6"})}),t.map((i,s)=>l.jsxs(b.Fragment,{children:[s>0&&l.jsx(hY,{}),i.type==="more"?l.jsx(JO,{children:"..."}):l.jsx(JO,{children:l.jsx(VLe,{asChild:!0,children:l.jsx(ar,{"data-cta":"admin-bread-crumb-link","data-route":i.to,params:i.params,search:i.search,to:i.to,children:i.label})})})]},s))]}),l.jsx("div",{className:"flex flex-col flex-wrap gap-2",children:n&&l.jsx("h1",{className:"text-3xl font-bold",children:n})})]}),l.jsx("div",{className:"flex shrink-0 grow items-center justify-end gap-2",children:r})]})});function TE({title:e,breadcrumbs:t,actions:n,children:r}){return l.jsxs(l.Fragment,{children:[l.jsx(HGe,{items:t,title:e,children:n}),r]})}function wo({title:e,breadcrumbs:t,children:n,...r}){return l.jsx(TE,{title:e,breadcrumbs:t,...r,children:n})}function lpe(){const{currentOrganizationId:e}=ps(),{i18n:t,_:n}=Me(),r=Ae.organizations.modelCatalog.useQuery({organizationId:e??""},{enabled:!!e,staleTime:6e4}),i=r.data?.organizationId===e?r.data:void 0,s=t.locale.startsWith("cs")?"cs":"en";return{...r,data:i,locale:s,money:o=>new Intl.NumberFormat(s==="cs"?"cs-CZ":"en-US",{style:"currency",currency:i?.currency??"CZK",minimumFractionDigits:2,maximumFractionDigits:o!==0&&Math.abs(o)<.1?4:2}
835).format(o)}}const qGe=nr("/_baseLayout/models")({beforeLoad:async({context:{accessGuard:e}})=>e([Jt.SuperAdmin]),component:WGe});function WGe(){const{i18n:e,_:t}=Me(),{data:n,locale:r,money:i,isError:s,refetch:a}=lpe(),o=[{id:"recommended",title:e._({id:"bvpccw"})},{id:"alternatives",title:e._({id:"dg4Bjx"})},{id:"experimental",title:e._({id:"Rsjgm0"})}];return l.jsx(wo,{title:e._({id:"5VJa7J"}),breadcrumbs:[],children:l.jsxs("div",{className:"space-y-6",children:[l.jsx("p",{className:"max-w-3xl text-muted-fg",children:l.jsx(D,{id:"+sN5xa"})}),!n&&l.jsx("p",{children:s?e._({id:"/09vgN"}):e._({id:"dbsU4F"})}),s&&l.jsx("button",{type:"button",onClick:()=>void a(),children:l.jsx(D,{id:"6gRgw8"})}),o.map(c=>l.jsxs("section",{className:"space-y-3",children:[l.jsx("h2",{className:"text-xl font-semibold",children:c.title}),l.jsx("div",{className:"grid gap-4 lg:grid-cols-2",children:n?.models.filter(u=>u.section===c.id).map(u=>l.jsxs("article",{className:"space-y-3 rounded-xl border border-border bg-white p-5",children:[l.jsx("h3",{className:"text-lg font-semibold",children:u.name}),l.jsx("p",{children:u.summary[r]}),l.jsx("p",{className:"text-sm text-muted-fg",children:u.detail[r]}),l.jsxs("dl",{className:"grid grid-cols-2 gap-3 text-sm",children:[l.jsxs("div",{children:[l.jsx("dt",{className:"text-muted-fg",children:l.jsx(D,{id:"Ss85Yw"})}),l.jsx("dd",{className:"font-semibold",children:u.measurement?.mean==null?e._({id:"Chr2na"}):i(u.measurement.mean)})]}),l.jsxs("div",{children:[l.jsx("dt",{className:"text-muted-fg",children:l.jsx(D,{id:"xJ7oVJ"})}),l.jsx("dd",{children:u.measurement?.low!=null&&u.measurement.high!=null?`${i(u.measurement.low)} â ${i(u.measurement.high)}`:"â"})]}),l.jsxs("div",{children:[l.jsx("dt",{className:"text-muted-fg",children:l.jsx(D,{id:"+EE64t"})}),l.jsx("dd",{children:u.measurement?.currentConfiguration&&u.measurement.startSeconds!=null?`${u.measurement.startSeconds.toFixed(1)} s`:"â"})]}),l.jsxs("div",{children:[l.jsx("dt",{className:"text-muted-fg",children:l.jsx(D,{id:"FppUpZ"})}),l.jsx("dd",{children:u.measurement?.currentConfiguration&&u.measurement.completionSeconds!=null?`${u.measurement.completionSeconds.toFixed(1)} s`:"â"})]})]})]},u.id))})]},c.id)),l.jsxs("details",{className:"rounded-xl border border-border p-4",children:[l.jsx("summary",{className:"cursor-pointer",children:l.jsx(D,{id:"Rg0Abe"})}),l.jsx("p",{className:"my-3 text-sm text-muted-fg",children:l.jsx(D,{id:"ORjDbA"})}),l.jsx("ul",{className:"grid gap-2 text-sm md:grid-cols-3",children:n?.models.filter(c=>c.section==="legacy").map(c=>l.jsx("li",{children:c.name},c.id))})]})]})})}const GGe=b.memo(({className:e})=>l.jsx("div",{className:$e("flex items-center justify-between gap-2 p-3 bg-red-50 border border-red-200 rounded-md",e),children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(S0,{className:"size-5 shrink-0 text-red-500"}),l.jsx("span",{className:"text-sm font-medium text-red-700",children:l.jsx(D,{id:"xVCGWO"})})]})})),yP=Zl("",{variants:{containerSize:{sm:"gap-1",md:"gap-2",lg:"gap-2"},size:{sm:"text-xs",md:"text-sm",lg:"text-base"},sizeValue:{sm:"text-sm",md:"text-base",lg:"text-lg"}}}),jn=b.memo(function({Icon:t,label:n,children:r,size:i="md",className:s,readOnly:a=!0,...o}){return l.jsxs("div",{className:$e(yP({containerSize:i}),"flex flex-col text-foreground",s),...o,children:[l.jsx("div",{className:$e(yP({size:i}),a&&"font-bold"),children:n}),l.jsx("div",{className:$e(yP({sizeValue:i})),children:t?l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(t,{className:"size-5"}),l.jsx("span",{children:r})]}):r})]})}
835),KGe=Zl("flex flex-col gap-4 rounded-lg p-4",{variants:{size:{sm:"gap-3 p-3",md:"gap-4 p-4",lg:"gap-4 p-4"},variant:{plain:"border-none p-0",default:"border border-border bg-white",secondary:"border border-amber-500/50 bg-amber-500/30",danger:"border border-red-500/30 bg-red-500/10"}},defaultVariants:{size:"md",variant:"default"}}),gn=b.memo(function({title:t,children:n,className:r,variant:i,actions:s=[],collapsed:a=!1,loading:o=!1,size:c,collapsible:u=!0,...d}){const[h,p]=b.useState(a);return l.jsxs("div",{className:$e(KGe({size:c,variant:i}),r),...d,children:[t&&l.jsx("div",{className:$e("font-bold text-dark-blue flex items-center justify-between",i!=="plain"&&"border-b pb-2",i==="secondary"&&"border-b pb-2",i==="danger"&&"border-b pb-2 border-red-500/30",{"text-sm":c==="md","text-base":c==="md","text-lg":c==="lg"},h&&"border-none pb-0"),children:l.jsxs("div",{role:u?"button":void 0,className:"flex w-full items-center justify-between",onClick:u?()=>p(g=>!g):void 0,children:[t,l.jsxs("div",{className:"flex items-center gap-1",children:[u&&l.jsx(Xd,{className:$e("size-4 transition-all",{"-scale-y-100":h})}),Array.isArray(s)&&s?.length?l.jsxs(Ou,{modal:!1,children:[l.jsx(Pu,{asChild:!0,children:l.jsx(Oe,{variant:"ghost",size:"icon-xs",icon:l.jsx(J1,{size:18})})}),l.jsx(Mu,{side:"bottom",align:"end",children:s})]}):null]})]})}),l.jsxs("div",{className:$e("flex flex-col gap-3 relative",{hidden:h}),children:[l.jsx(E5,{visible:o}),n]})]})}),AE=b.memo(function({data:t,children:n}){const{i18n:r,_:i}=Me(),{createdAt:s,updatedAt:a}=t??{};return!s||!a?null:l.jsxs(gn,{title:r._({id:"nSkB8g"}),children:[s&&l.jsx(jn,{label:r._({id:"d+F6q9"}),Icon:y4e,children:yt.date(s,Zn.DateTime)}),a&&l.jsx(jn,{label:r._({id:"+b7T3G"}),Icon:m4e,children:yt.date(a,Zn.DateTime)}),n]})}),YGe=()=>{const e=new Map,t=async(n,r)=>{const i=[];if(n.length===0)return[];for(const s of n)if(s.type==="upload"){const a=await Cs.upload.upload.mutate({relativePath:r,fileName:s.file.name.trim(),contentType:s.file.type});if(!(await fetch(a.uploadUrl,{method:"PUT",body:s.file,mode:"cors",headers:{"Content-Type":s.file.type}})).ok)throw new Error("Failed to upload file to storage");i.push(a)}else s.type==="delete"&&(await Cs.upload.delete.mutate({publicUrl:typeof s.file=="string"?s.file:s.file.name}),i.push({publicUrl:""}));return n.length=0,i};return{getAdapter:n=>{e.has(n)||e.set(n,[]);const r=e.get(n);return{upload:async i=>{r.push({type:"upload",file:i})},delete:async i=>{if(typeof i!="string"){const s=r.findIndex(a=>a.type==="upload"&&a.file===i);if(s!==-1){r.splice(s,1);return}}r.push({type:"delete",file:i})},commit:i=>t(r,i)}},commitAll:async n=>{const r={};for(const[i,s]of e.entries())r[i]=await t(s,n?.relativePath);return r}}},XGe=b.memo(function({showDelete:t=!0,loading:n,onDelete:r}){const{i18n:i,_:s}=Me(),a=Ho();return l.jsxs("div",{className:"sticky bottom-6 z-10 mt-12 flex w-full justify-between rounded-xl border bg-white p-2","data-testid":"action-bar",children:[l.jsx(Oe,{"data-cta":"admin-action-bar-discard-changes",variant:"secondary",icon:l.jsx(Tj,{size:18}),onClick:()=>a.history.go(-1),children:l.jsx("span",{className:"hidden sm:inline",children:i._({id:"3EbjfR"})})}),l.jsxs("div",{className:"flex gap-x-3",children:[t&&r&&l.jsx(Oe,{"data-cta":"admin-action-bar-delete",onClick:r,disabled:n,type:"button",variant:"danger",icon:l.jsx(U9,{size:18}),children:l.jsx("span",{className:"hidden sm:inline",children:i._({id:"cnGeoo"})})}),l.jsx(Oe,{"data-cta":"admin-action-bar-save",loading:n,disabled:n,variant:"success",type:"submit",icon:l.jsx(NIe,{size:18}),children:l.jsx("span",{className:"hidden sm:inline",children:i._({id:"tfDRzk"})})})]})]})});function QGe({last:e,className:t,...n}){return l.jsx("div",{className:$e("flex flex-col gap-6",t),...n})}function ZGe({children:e}){return l.jsx("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-[repeat(11,minmax(0,1fr))] lg:[&>*]:col-span-4 lg:[&>:nth-child(3)]:col-span-3",children:e})}function JGe({title:e,description:t,Icon:n,readOnly:r,imgSrc:i,type:s="icon"}){const a=$y(),o=r??a?.readOnly;return!e&&o?"-":e?l.jsxs("div",{className:$e("flex flex-row gap-2 overflow-hidden items-start",o&&"bg-white border-border border rounded-radius px-3 py-2"),children:[s==="icon"&&(i?l.jsx("div",{className:"size-10 shrink-0 rounded-radius border border-border bg-white p-0.5",children:l.jsx("img",{src:i,alt:e,className:"size-full bg-white object-contain"})}):n?l.jsx(n,{className:"size-4"}):null),s==="avatar"&&l.jsx(woe,{src:i,fallback:yt.initials(e)}),l.jsxs("div",{className:"mt-px flex w-full min-w-0 flex-col items-start justify-start gap-0.5",children:[l.jsx("p",{className:"text-sm font-semibold text-foreground",children:e}),t&&l.jsx("p",{className:"w-full overflow-hidden text-ellipsis whitespace-pre text-xs text-muted-fg",children:t})]})]}):null}function Hy(e,t){const[n,r]=b.useState(e);return b.useEffect(()=>{const i=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(i)}},[e,t]),n}function eKe({children:e,totalCount:t}){const{i18n:n,_:r}=Me(),i=wh(a=>a.filtered.count),s=n._({id:"6fMwBn",values:{totalCount:t,0:i>t?t:i}});return l.jsxs(Oue,{heading:s,children:[e," "]})}const cpe=b.createContext(void 0);function tKe(){const e=b.useContext(cpe);
835if(!e)throw new Error("No ComboboxContext found when calling useComboboxContext.");return e}function nKe(e,t){return e.toLowerCase().includes(t.toLowerCase())?1:0}function rKe({id:e,placeholder:t,searchPlaceholder:n,value:r,variant:i,emptyMessage:s,loadingMessage:a,triggerRef:o,initialData:c,searchDebounce:u=500,limit:d=50,showSeparator:h=!1,disabled:p,readOnly:g,Trigger:v,children:x,filter:_=nKe,shouldFilter:w=!0,renderValue:S,dataProviderFactory:E,onValueChange:T,onOpenChange:N,onCloseAutoFocus:A}){const{i18n:k,_:j}=Me(),R=b.useRef(0),[P,V]=b.useState(!1),[U,G]=b.useState(!1),[Q,Z]=b.useState(!0),[K,te]=b.useState(c),[ne,se]=b.useState(""),H=Hy(ne,u),{cacheKeyFactory:O,query:L}=E(),M=E9({queryKey:O({pageSize:d,search:H}),queryFn:async()=>L({pageSize:d,search:H,value:r}),placeholderData:iae,staleTime:60*1e3*1e3,enabled:Q});b.useEffect(()=>{r===void 0&&te(void 0)},[r]),b.useEffect(()=>{const W=M?.data?.total??0;R.current=W},[M.data,d]);const q=b.useCallback(W=>{G(W),N?.(W)},[N]),X=b.useCallback((W,re,ae)=>{te(re),T?.(W,re,ae),q(!1)},[T,q]),J=b.useMemo(()=>({currentValue:r}),[r]);return b.useEffect(()=>{V(M.isFetching)},[H,M.isFetching]),l.jsxs(iy,{open:U,onOpenChange:q,children:[l.jsx(q6,{asChild:!0,children:v?l.jsx(v,{id:e,value:r,ref:o,disabled:p,readOnly:g,placeholder:t,variant:i,item:K}):l.jsx(Xle,{id:e,disabled:p||g,ref:o,variant:i,className:"h-auto gap-1 text-left",children:K&&S?S({value:r,item:K}):r||t})}),l.jsx(W6,{className:"w-auto p-0",onCloseAutoFocus:A,children:l.jsx(Rue,{className:"w-0 min-w-[var(--radix-popper-anchor-width)]",filter:_,shouldFilter:w,children:l.jsxs(cpe.Provider,{value:J,children:[l.jsx(Pue,{"data-testid":"combobox-input",value:ne,loading:Q?P:!1,placeholder:n,onValueChange:W=>{se(W),V(!0)}}),l.jsxs(Due,{className:"max-h-[500px]",children:[l.jsx(Iue,{loading:Q?P:!1,loadingMessage:a??k._({id:"Z3FXyt"}),emptyMessage:s??k._({id:"V9PAEu"})}),l.jsx(eKe,{totalCount:R.current,children:(M?.data?.items??[])?.map((W,re,ae)=>l.jsxs(b.Fragment,{children:[x({item:W,array:ae,index:re,onSelect:X}),h&&ae.length!==re+1&&l.jsx(lLe,{className:"my-1.5"})]},W?.id??re))})]})]})})})]})}function iKe({className:e,children:t,value:n,searchValue:r,item:i,showCheckmark:s=!0,onSelect:a,...o}){const{currentValue:c}=tKe(),u=n===c,d=b.useCallback(()=>{a(n===c?void 0:n,n===c?void 0:i,c)},[n,i,a,c]);return l.jsxs(Mue,{value:r,className:$e("justify-between w-full overflow-hidden",u&&"bg-accent/50 font-semibold"),onSelect:d,...o,children:[l.jsx("div",{className:e,children:t}),s&&l.jsx(Es,{className:$e("size-4",u?"opacity-100":"opacity-0")})]})}const sKe=b.memo(iKe);function aKe({name:e,dataProviderFactory:t,renderDisplayValue:n,renderSearchValue:r,onValueChange:i,children:s,initialData:a,...o}){const{initialValues:c}=$y(),u=e.endsWith(".id")?e.slice(0,-3):e,d=v2(c,u);return l.jsx(Lu,{...o,name:e,type:"text",render:({ref:h,userProps:p,fieldApi:g,fieldState:v})=>{const x=n?.(a??d);return p.readOnly&&x?typeof x=="string"?l.jsx("p",{className:"text-primary",children:x}):x:l.jsx(rKe,{triggerRef:h,initialData:a??d,dataProviderFactory:t,renderValue:({item:_})=>n?.(_),variant:v.showError?"danger":"default",value:v.value,onValueChange:(_,w,S)=>{i?.(_,w,S),g.setTouched(!0),g.setValue(_||null)},onOpenChange:_=>g.setFocused(_),onCloseAutoFocus:()=>g.setTouched(!0),...p,children:({item:_,onSelect:w,...S})=>s?s({item:_,onSelect:w,...S}):l.jsx(sKe,{item:_,value:_.id,onSelect:w,searchValue:r?.(_)??_.id,className:"w-full",children:n?.(_)},_.id)})}})}const upe=b.memo(aKe),oKe=()=>({query:async({pageSize:e,search:t})=>{const n={};t&&(n.searchable={$like:H7(t)});try{const r=await Cs.chats.findAll.query({pagination:{pageSize:e},orderBy:{name:"asc"},where:{...n}});return{items:r.items,total:r.meta.total}}catch(r){console.error(r)}return{items:[],total:0}},cacheKeyFactory:e=>[...ml(Ae.chats.findAll),{orderBy:{name:"asc"}},e]});function lKe({onValueChange:e,...t}){const{i18n:n,_:r}=Me();return l.jsx(upe,{placeholder:n._({id:"0yxhOL"}),dataProviderFactory:oKe,renderSearchValue:i=>`${i.name}`,renderDisplayValue:i=>l.jsx(JGe,{type:"avatar",readOnly:t.readOnly,title:i?.name,description:i?.id}),onValueChange:(i,s,a)=>{e?.(i,s,a)},shouldFilter:!1,...t})}var cKe=Object.defineProperty,uKe=(e,t,n)=>t in e?cKe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pf=(e,t,n)=>uKe(e,typeof t!="symbol"?t+"":t,n);let dKe=class dpe{constructor(t=new Map){this.map=t}clone(){return new dpe(new Map(this.map))}increment(t){const n=this.map.get(t)??0;this.map.set(t,n+1)}
835decrement(t,n){let r=this.map.get(t);r!==void 0&&(r-=1,this.map.set(t,r),r===0&&n())}},lA=class{constructor(){Pf(this,"map",new Map)}getOrCreate(t){let n=this.map.get(t);return n===void 0&&(n=new Set,this.map.set(t,n)),n}get(t){return this.map.get(t)}use(t,n){const r=this.get(t);r!==void 0&&n(r)}delete(t){return this.map.delete(t)}};function I1(e,t){return t(e),e}function Z7(){}const fpe="cell";function kX(e,t){return e===t}const O5=new Map;let fKe=class{constructor(t={}){Pf(this,"subscriptions",new lA),Pf(this,"singletonSubscriptions",new Map),Pf(this,"graph",new lA),Pf(this,"state",new Map),Pf(this,"distinctNodes",new Map),Pf(this,"executionMaps",new Map),Pf(this,"definitionRegistry",new Set),Pf(this,"combinedCells",[]);for(const n of Object.getOwnPropertySymbols(t))this.state.set(n,t[n])}cellInstance(t,n=!0,r=Symbol()){return this.state.has(r)||this.state.set(r,t),n!==!1&&!this.distinctNodes.has(r)&&this.distinctNodes.set(r,n===!0?kX:n),r}signalInstance(t=!0,n=Symbol()){return t!==!1&&this.distinctNodes.set(n,t===!0?kX:t),n}sub(t,n){this.register(t);const r=this.subscriptions.getOrCreate(t);return r.add(n),()=>r.delete(n)}singletonSub(t,n){return this.register(t),n===void 0?this.singletonSubscriptions.delete(t):this.singletonSubscriptions.set(t,n),()=>this.singletonSubscriptions.delete(t)}resetSingletonSubs(){this.singletonSubscriptions.clear()}subMultiple(t,n){const r=this.signalInstance();return this.connect({map:i=>(...s)=>{i(s)},sink:r,sources:t}),this.sub(r,n)}pubIn(t){var n;const r=Reflect.ownKeys(t),i=this.getExecutionMap(r),s=i.refCount.clone(),a=i.participatingNodes.slice(),o=new Map(this.state),c=u=>{this.graph.use(u,d=>{for(const{sources:h,sink:p}of d)h.has(u)&&s.decrement(p,()=>{a.splice(a.indexOf(p),1),c(p)})})};for(;;){const u=a.shift();if(u===void 0)break;const d=u;let h=!1;const p=g=>{const v=this.distinctNodes.get(d);if(v!=null&&v(o.get(d),g)){h=!1;return}h=!0,o.set(d,g),this.state.has(d)&&this.state.set(d,g)};if(Object.prototype.hasOwnProperty.call(t,d)?p(t[d]):i.projections.use(d,g=>{for(const v of g){const x=[...Array.from(v.sources),...Array.from(v.pulls)].map(_=>o.get(_));v.map(p)(...x)}}),h){const g=o.get(d);this.inContext(()=>{this.subscriptions.use(d,v=>{for(const x of v)x(g)})}),(n=this.singletonSubscriptions.get(d))==null||n(g)}else c(d)}}connect({sources:t,pulls:n=[],map:r,sink:i}){const s={map:r,pulls:new Set(n),sink:this.register(i),sources:new Set(t)};for(const a of[...t,...n])this.register(a),this.graph.getOrCreate(a).add(s);this.executionMaps.clear()}pub(t,n){this.pubIn({[t]:n})}pipe(t,...n){return this.combineOperators(...n)(t)}transformer(...t){return n=>I1(this.signalInstance(),r=>(this.link(this.pipe(r,...t),n),r))}link(t,n){this.connect({map:r=>i=>{r(i)},sink:n,sources:[t]})}combine(...t){return I1(this.signalInstance(),n=>{this.connect({map:r=>(...i)=>{r(i)},sink:n,sources:t})})}combineCells(...t){const n=this.combinedCells.find(i=>t.length===i.sources.length&&t.every((s,a)=>s===i.sources[a]));if(n)return n.cell;const r=this.cellInstance(t.map(i=>this.getValue(i)),!0);return this.connect({map:i=>(...s)=>{i(s)},sink:r,sources:t}),this.combinedCells.push({sources:t,cell:r}),r}getValue(t){return this.register(t),this.state.get(t)}getValues(t){return t.map(n=>this.getValue(n))}register(t){const n=O5.get(t);return n===void 0||this.definitionRegistry.has(t)?t:(this.definitionRegistry.add(t),I1(n.type===fpe?this.cellInstance(n.initial,n.distinct,t):this.signalInstance(n.distinct,t),r=>{this.inContext(()=>{n.init(this,r)})}))}inContext(t){return t()}changeWith(t,n,r){this.connect({sources:[n],pulls:[t],sink:t,map:i=>(s,a)=>{i(r(a,s))}})}calculateExecutionMap(t){const n=[],r=new Set,i=new lA,s=new dKe,a=new lA,o=(c,u=0)=>{s.increment(c),!r.has(c)&&(this.register(c),i.use(c,d=>{u=Math.max(...Array.from(d).map(h=>n.indexOf(h)))+1}),this.graph.use(c,d=>{for(const h of d)h.sources.has(c)?(a.getOrCreate(h.sink).add(h),o(h.sink,u)):i.getOrCreate(h.sink).add(c)}),r.add(c),n.splice(u,0,c))};return t.forEach(o),{participatingNodes:n,pendingPulls:i,projections:a,refCount:s}}getExecutionMap(t){let n=t;if(t.length===1){n=t[0];const i=this.executionMaps.get(n);if(i!==void 0)return i}else for(const[i,s]of this.executionMaps.entries())if(Array.isArray(i)&&i.length===t.length&&i.every(a=>t.includes(a)))return s;const r=this.calculateExecutionMap(t);return this.executionMaps.set(n,r),r}combineOperators(...t){return n=>{for(const r of t)n=r(n,this);return n}}};function xn(e,t=Z7,n=!0){return I1(Symbol(),r=>{O5.set(r,{type:fpe,distinct:n,initial:e,init:t})})}function aa(e=Z7,t=!1){return I1(Symbol(),n=>{O5.set(n,{type:"signal",distinct:t,init:e})})}function Vm(e=Z7){return I1(Symbol(),t=>{O5.set(t,{type:"signal",distinct:!1,init:e})})}const hpe=b.createContext(null);function P5(){const e=b.useContext(hpe);if(e===null)throw new Error("useRealm must be used within a RealmContextProvider");return e}function Kl(e){const t=P5();t.register(e);const n=b.useCallback(r=>t.sub(e,r),[t,e]);return b.useSyncExternalStore(n,()=>t.getValue(e),()=>t.getValue(e))}function Hc(...e){const t=P5(),n=b.useMemo(()=>t.combineCells.apply(t,e),[t,...e]);return Kl(n)}function ol(e){const t=P5();return t.register(e),b.useCallback(n=>{t.pub(e,n)},[t,e])}function c0(e){return(t,n)=>{const r=n.signalInstance();return n.connect({map:i=>s=>{i(e(s))},sink:r,sources:[t]}),r}}function us(...e){return(t,n)=>{const r=n.signalInstance();return n.connect({map:i=>(...s)=>{i(s)},pulls:e,sink:r,sources:[t]}),r}}function ppe(e){return(t,n)=>{const r=n.signalInstance();return n.connect({map:i=>()=>{i(e)},sink:r,sources:[t]}),r}}function kE(e){return(t,n)=>{const r=n.signalInstance();return n.connect({map:i=>s=>{e(s)&&i(s)},sink:r,sources:[t]}),r}}function mpe(e,t){return(n,r)=>{const i=r.signalInstance();return r.connect({map:s=>a=>{s(t=e(t,a))},sink:i,sources:[n]}),i}}function hKe(e,t){return t(e),e}function cm(){}function Qu(e){return function(t){return{init:n=>{var r;return(r=e.init)==null?void 0:r.call(e,n,t)},postInit:n=>{var r;return(r=e.postInit)==null?void 0:r.call(e,n,t)},update:n=>{var r;return(r=e.update)==null?void 0:r.call(e,n,t)}}}}function pKe({children:e,plugins:t}){const n=Y.useMemo(()=>hKe(new fKe,r=>{var i,s;for(const a of t)(i=a.init)==null||i.call(a,r);for(const a of t)(s=a.postInit)==null||s.call(a,r)}),[]);return Y.useEffect(()=>{var r;for(const i of t)(r=i.update)==null||r.call(i,n)}),Y.createElement(hpe.Provider,{value:n},e)}const QN=b.createContext(null);function gpe(e,t){let n=null;return e!=null&&(n=e[1]),{getTheme:function(){return t??(n!=null?n.getTheme():null)}}}function So(){const e=b.useContext(QN);
835return e==null&&(function(t,...n){const r=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",t);for(const s of n)i.append("v",s);throw r.search=i.toString(),Error(`Minified Lexical error #${t}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(8),e}function jt(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const Zu=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,mKe=Zu&&"documentMode"in document?document.documentMode:null,hd=Zu&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),L0=Zu&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),ZN=!(!Zu||!("InputEvent"in window)||mKe)&&"getTargetRanges"in new window.InputEvent("input"),sS=Zu&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),hy=Zu&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,gKe=Zu&&/Android/.test(navigator.userAgent),xpe=Zu&&/^(?=.*Chrome).*/i.test(navigator.userAgent),NX=Zu&&gKe&&xpe,JN=Zu&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!xpe;function vpe(...e){const t=[];for(const n of e)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))t.push(r);return t}const xKe=1,vKe=3,yKe=9,bKe=11,z0=0,ype=1,py=2,_Ke=0,wKe=1,SKe=2,e3=4,t3=8,J7=128,EKe=1792|(112|(3|e3|t3)|J7),ez=1,tz=2,nz=3,rz=4,iz=5,sz=6,M5=sS||hy||JN?"Â ":"â",Ah=` 836 837`,CKe=L0?"Â ":M5,$0={bold:1,capitalize:1024,code:16,highlight:J7,italic:2,lowercase:256,strikethrough:e3,subscript:32,superscript:64,underline:t3,uppercase:512},TKe={directionless:1,unmergeable:2},jX={center:tz,end:sz,justify:rz,left:ez,right:nz,start:iz},AKe={[tz]:"center",[sz]:"end",[rz]:"justify",[ez]:"left",[nz]:"right",[iz]:"start"},kKe={normal:0,segmented:2,token:1},NKe={[_Ke]:"normal",[SKe]:"segmented",[wKe]:"token"},RX="$config";function bpe(e,t,n,r,i,s){let a=e.getFirstChild();for(;a!==null;){const o=a.__key;a.__parent===t&&(rt(a)&&bpe(a,o,n,r,i,s),n.has(o)||s.delete(o),i.push(o)),a=a.getNextSibling()}}const jKe=100;let _8=!1,az=0;function RKe(e){az=e.timeStamp}function bP(e,t,n){const r=e.nodeName==="BR",i=t.__lexicalLineBreak;return i&&(e===i||r&&e.previousSibling===i)||r&&X5(e,n)!==void 0}function IKe(e,t,n){const r=$u(Fc(n));let i=null,s=null;r!==null&&r.anchorNode===e&&(i=r.anchorOffset,s=r.focusOffset);const a=e.nodeValue;a!==null&&Iz(t,a,i,s,!1)}function OKe(e,t,n){if(_t(e)){const r=e.anchor.getNode();if(r.is(n)&&e.format!==r.getFormat())return!1}return qh(t)&&n.isAttached()}function PKe(e,t,n,r){for(let i=e;i&&!SYe(i);i=DE(i)){const s=X5(i,t);if(s!==void 0){const a=Zi(s,n);if(a)return Br(a)||!rs(i)?void 0:[i,a]}else if(i===r)return[r,ome(n)]}}function _pe(e,t,n){_8=!0;const r=performance.now()-az>jKe;try{Ll(e,(()=>{const i=Pt()||(function(p){return p.getEditorState().read((()=>{const g=Pt();return g!==null?g.clone():null}))})(e),s=new Map,a=e.getRootElement(),o=e._editorState,c=e._blockCursorElement;let u=!1,d="";for(let p=0;p<t.length;p++){const g=t[p],v=g.type,x=g.target,_=PKe(x,e,o,a);if(!_)continue;const[w,S]=_;if(v==="characterData")r&&Lt(S)&&qh(x)&&OKe(i,x,S)&&IKe(x,S,e);else if(v==="childList"){u=!0;const E=g.addedNodes;for(let A=0;A<E.length;A++){const k=E[A],j=sme(k),R=k.parentNode;if(R!=null&&k!==c&&j===null&&!bP(k,R,e)){if(L0){const P=(rs(k)?k.innerText:null)||k.nodeValue;P&&(d+=P)}R.removeChild(k)}}const T=g.removedNodes,N=T.length;if(N>0){let A=0;for(let k=0;k<N;k++){const j=T[k];(bP(j,x,e)||c===j)&&(x.appendChild(j),A++)}N!==A&&s.set(w,S)}}}if(s.size>0)for(const[p,g]of s)g.reconcileObservedMutation(p,e);const h=n.takeRecords();if(h.length>0){for(let p=0;p<h.length;p++){const g=h[p],v=g.addedNodes,x=g.target;for(let _=0;_<v.length;_++){const w=v[_],S=w.parentNode;S==null||w.nodeName!=="BR"||bP(w,x,e)||S.removeChild(w)}}n.takeRecords()}i!==null&&(u&&As(i),L0&&dme(e)&&i.insertRawText(d))}))}finally{_8=!1}}function wpe(e){const t=e._observer;t!==null&&_pe(e,t.takeRecords(),t)}function Spe(e){(function(t){az===0&&Fc(t).addEventListener("textInput",RKe,!0)})(e),e._observer=new MutationObserver(((t,n)=>{_pe(e,t,n)}))}function w8(e){const t=new Map,n=new Set;for(let r=typeof e=="function"?e:e.replace;r.prototype&&r.prototype.getType!==void 0;r=Object.getPrototypeOf(r)){const{ownNodeConfig:i}=J5(r);if(i&&i.stateConfigs)for(const s of i.stateConfigs){let a;"stateConfig"in s?(a=s.stateConfig,s.flat&&n.add(a.key)):a=s,t.set(a.key,a)}}return{flatKeys:n,sharedConfigMap:t}}let MKe=class Epe{constructor(t,n,r=void 0,i=new Map,s=void 0){this.node=t,this.sharedNodeState=n,this.unknownState=r,this.knownState=i;const{sharedConfigMap:a}=this.sharedNodeState,o=s!==void 0?s:(function(c,u,d){let h=d.size;if(u)for(const p in u){const g=c.get(p);g&&d.has(g)||h++}return h})(a,r,i);this.size=o}getValue(t){const n=this.knownState.get(t);if(n!==void 0)return n;this.sharedNodeState.sharedConfigMap.set(t.key,t);let r=t.defaultValue;if(this.unknownState&&t.key in this.unknownState){const i=this.unknownState[t.key];i!==void 0&&(r=t.parse(i)),this.updateFromKnown(t,r)}return r}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const t={...this.unknownState},n={};for(const[r,i]of this.knownState)r.isEqual(i,r.defaultValue)?delete t[r.key]:t[r.key]=r.unparse(i);for(const r of this.sharedNodeState.flatKeys)r in t&&(n[r]=t[r],delete t[r]);return IX(t)&&(n.$=t),n}getWritable(t){if(this.node===t)return this;const{sharedNodeState:n,unknownState:r}=this,i=new Map(this.knownState);return new Epe(t,n,(function(s,a,o){let c;if(o)for(const[u,d]of Object.entries(o)){const h=s.get(u);h?a.has(h)||a.set(h,h.parse(d)):(c=c||{},c[u]=d)}return c})(n.sharedConfigMap,i,r),i,this.size)}updateFromKnown(t,n){const r=t.key;this.sharedNodeState.sharedConfigMap.set(r,t);const{knownState:i,unknownState:s}=this;i.has(t)||s&&r in s||(s&&(delete s[r],this.unknownState=IX(s)),this.size++),i.set(t,n)}updateFromUnknown(t,n){const r=this.sharedNodeState.sharedConfigMap.get(t);r?this.updateFromKnown(r,r.parse(n)):(this.unknownState=this.unknownState||{},t in this.unknownState||this.size++,this.unknownState[t]=n)}updateFromJSON(t){const{knownState:n}=this;for(const r of n.keys())n.set(r,r.defaultValue);if(this.size=n.size,this.unknownState=void 0,t)for(const[r,i]of Object.entries(t))this.updateFromUnknown(r,i)}};function DKe(e){const t=e.getWritable(),n=t.__state?t.__state.getWritable(t):new MKe(t,Cpe(t));return t.__state=n,n}function Cpe(e){return e.__state?e.__state.sharedNodeState:nme(Z5(),e.getType()).sharedNodeState}function IX(e){if(e)for(const t in e)return e}
837function OX(e,t,n){for(const[r,i]of t.knownState){if(e.has(r.key))continue;e.add(r.key);const s=n?n.getValue(r):r.defaultValue;if(s!==i&&!r.isEqual(s,i))return!0}return!1}function PX(e,t,n){const{unknownState:r}=t,i=n?n.unknownState:void 0;if(r){for(const[s,a]of Object.entries(r))if(!e.has(s)&&(e.add(s),a!==(i?i[s]:void 0)))return!0}return!1}function MX(e,t){const n=e.__state;return n&&n.node===e?n.getWritable(t):n}function DX(e,t){const n=e.__mode,r=e.__format,i=e.__style,s=t.__mode,a=t.__format,o=t.__style,c=e.__state,u=t.__state;return(n===null||n===s)&&(r===null||r===a)&&(i===null||i===o)&&(e.__state===null||c===u||(function(d,h){if(d===h)return!0;if(d&&h&&d.size!==h.size)return!1;const p=new Set;return!(d&&OX(p,d,h)||h&&OX(p,h,d)||d&&PX(p,d,h)||h&&PX(p,h,d))})(c,u))}function FX(e,t){const n=e.mergeWithSibling(t),r=ms()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function LX(e){let t,n,r=e;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(t=r.getPreviousSibling())!==null&&Lt(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(DX(t,r)){r=FX(t,r);break}break}t.remove()}for(;(n=r.getNextSibling())!==null&&Lt(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(n.__text!==""){if(DX(r,n)){r=FX(r,n);break}break}n.remove()}}else r.remove()}function B0(e){return zX(e.anchor),zX(e.focus),e}function zX(e){for(;e.type==="element";){const t=e.getNode(),n=e.offset;let r,i;if(n===t.getChildrenSize()?(r=t.getChildAtIndex(n-1),i=!0):(r=t.getChildAtIndex(n),i=!1),Lt(r)){e.set(r.__key,i?r.getTextContentSize():0,"text",!0);break}if(!rt(r))break;e.set(r.__key,i?r.getChildrenSize():0,"element",!0)}}let U0,go,aS,D5,S8,E8,V0,Su,C8,oS,ha="",cd=null,ud="",Hf="",Yv=!1,n3=!1;function r3(e,t){const n=V0.get(e);if(t!==null){const r=N8(e);r.parentNode===t&&t.removeChild(r)}if(Su.has(e)||go._keyToDOMMap.delete(e),rt(n)){const r=s3(n,V0);T8(r,0,r.length-1,null)}n!==void 0&&Oz(oS,aS,D5,n,"destroyed")}function T8(e,t,n,r){let i=t;for(;i<=n;++i){const s=e[i];s!==void 0&&r3(s,r)}}function Ag(e,t){e.setProperty("text-align",t)}const FKe="40px";function Tpe(e,t){const n=U0.theme.indent;if(typeof n=="string"){const i=e.classList.contains(n);t>0&&!i?e.classList.add(n):t<1&&i&&e.classList.remove(n)}const r=getComputedStyle(e).getPropertyValue("--lexical-indent-base-value")||FKe;e.style.setProperty("padding-inline-start",t===0?"":`calc(${t} * ${r})`)}function Ape(e,t){const n=e.style;t===0?Ag(n,""):t===ez?Ag(n,"left"):t===tz?Ag(n,"center"):t===nz?Ag(n,"right"):t===rz?Ag(n,"justify"):t===iz?Ag(n,"start"):t===sz&&Ag(n,"end")}function A8(e,t){const n=(function(r){const i=r.__dir;if(i!==null)return i;if(Zs(r))return null;const s=r.getParentOrThrow();return Zs(s)&&s.__dir===null?"auto":null})(t);n!==null?e.dir=n:e.removeAttribute("dir")}function i3(e,t){const n=Su.get(e);n===void 0&&jt(60);const r=n.createDOM(U0,go);if((function(i,s,a){const o=a._keyToDOMMap;(function(c,u,d){const h=`__lexicalKey_${u._key}`;c[h]=d})(s,a,i),o.set(i,s)})(e,r,go),Lt(n)?r.setAttribute("data-lexical-text","true"):Br(n)&&r.setAttribute("data-lexical-decorator","true"),rt(n)){const i=n.__indent,s=n.__size;if(A8(r,n),i!==0&&Tpe(r,i),s!==0){const o=s-1;k8(s3(n,Su),n,0,o,n.getDOMSlot(r))}const a=n.__format;a!==0&&Ape(r,a),n.isInline()||kpe(null,n,r),Q5(n)&&(ha+=Ah,Hf+=Ah)}else{const i=n.getTextContent();if(Br(n)){const s=n.decorate(go,U0);s!==null&&Npe(e,s),r.contentEditable="false"}ha+=i,Hf+=i}return t!==null&&t.insertChild(r),Oz(oS,aS,D5,n,"created"),r}function k8(e,t,n,r,i){const s=ha;ha="";let a=n;for(;a<=r;++a){i3(e[a],i);const o=Su.get(e[a]);o!==null&&Lt(o)&&(cd===null&&(cd=o.getFormat()),ud===""&&(ud=o.getStyle()))}Q5(t)&&(ha+=Ah),i.element.__lexicalTextContent=ha,ha=s+ha}function $X(e,t){if(e){const n=e.__last;if(n){const r=t.get(n);if(r)return Eu(r)?"line-break":Br(r)&&r.isInline()?"decorator":null}return"empty"}return null}function kpe(e,t,n){const r=$X(e,V0),i=$X(t,Su);r!==i&&t.getDOMSlot(n).setManagedLineBreak(i)}function LKe(e,t,n){var r;cd=null,ud="",(function(i,s,a){const o=ha,c=i.__size,u=s.__size;ha="";const d=a.element;if(c===1&&u===1){const h=i.__first,p=s.__first;if(h===p)mw(h,d);else{const v=N8(h),x=i3(p,null);try{d.replaceChild(x,v)}catch(_){if(typeof _=="object"&&_!=null){const w=`${_.toString()} Parent: ${d.tagName}, new child: {tag: ${x.tagName} key: ${p}}, old child: {tag: ${v.tagName}, key: ${h}}.`;throw new Error(w)}throw _}r3(h,null)}const g=Su.get(p);Lt(g)&&(cd===null&&(cd=g.getFormat()),ud===""&&(ud=g.getStyle()))}else{const h=s3(i,V0),p=s3(s,Su);
837if(h.length!==c&&jt(227),p.length!==u&&jt(228),c===0)u!==0&&k8(p,s,0,u-1,a);else if(u===0){if(c!==0){const g=a.after==null&&a.before==null&&a.element.__lexicalLineBreak==null;T8(h,0,c-1,g?null:d),g&&(d.textContent="")}}else(function(g,v,x,_,w,S){const E=_-1,T=w-1;let N,A,k=S.getFirstChild(),j=0,R=0;for(;j<=E&&R<=T;){const U=v[j],G=x[R];if(U===G)k=_P(mw(G,S.element)),j++,R++;else{N===void 0&&(N=new Set(v)),A===void 0&&(A=new Set(x));const Z=A.has(U),K=N.has(G);if(Z)if(K){const te=H0(go,G);te===k?k=_P(mw(G,S.element)):(S.withBefore(k).insertChild(te),mw(G,S.element)),j++,R++}else i3(G,S.withBefore(k)),R++;else k=_P(N8(U)),r3(U,S.element),j++}const Q=Su.get(G);Q!==null&&Lt(Q)&&(cd===null&&(cd=Q.getFormat()),ud===""&&(ud=Q.getStyle()))}const P=j>E,V=R>T;if(P&&!V){const U=x[T+1],G=U===void 0?null:go.getElementByKey(U);k8(x,g,R,T,S.withBefore(G))}else V&&!P&&T8(v,j,E,S.element)})(s,h,p,c,u,a)}Q5(s)&&(ha+=Ah),d.__lexicalTextContent=ha,ha=o+ha})(e,t,t.getDOMSlot(n)),r=t,cd==null||cd===r.__textFormat||n3||r.setTextFormat(cd),(function(i){ud===""||ud===i.__textStyle||n3||i.setTextStyle(ud)})(t)}function s3(e,t){const n=[];let r=e.__first;for(;r!==null;){const i=t.get(r);i===void 0&&jt(101),n.push(r),r=i.__next}return n}function mw(e,t){const n=V0.get(e);let r=Su.get(e);n!==void 0&&r!==void 0||jt(61);const i=Yv||E8.has(e)||S8.has(e),s=H0(go,e);if(n===r&&!i){if(rt(n)){const a=s.__lexicalTextContent;a!==void 0&&(ha+=a,Hf+=a)}else{const a=n.getTextContent();Hf+=a,ha+=a}return s}if(n!==r&&i&&Oz(oS,aS,D5,r,"updated"),r.updateDOM(n,s,U0)){const a=i3(e,null);return t===null&&jt(62),t.replaceChild(a,s),r3(e,null),a}if(rt(n)&&rt(r)){const a=r.__indent;(Yv||a!==n.__indent)&&Tpe(s,a);const o=r.__format;if((Yv||o!==n.__format)&&Ape(s,o),i&&(LKe(n,r,s),Zs(r)||r.isInline()||kpe(n,r,s)),Q5(r)&&(ha+=Ah,Hf+=Ah),(Yv||r.__dir!==n.__dir)&&(A8(s,r),Zs(r)&&!Yv))for(const c of r.getChildren())rt(c)&&A8(H0(go,c.getKey()),c)}else{const a=r.getTextContent();if(Br(r)){const o=r.decorate(go,U0);o!==null&&Npe(e,o)}ha+=a,Hf+=a}if(!n3&&Zs(r)&&r.__cachedText!==Hf){const a=r.getWritable();a.__cachedText=Hf,r=a}return s}function Npe(e,t){let n=go._pendingDecorators;const r=go._decorators;if(n===null){if(r[e]===t)return;n=ame(go)}n[e]=t}function _P(e){let t=e.nextSibling;return t!==null&&t===go._blockCursorElement&&(t=t.nextSibling),t}function zKe(e,t,n,r,i,s){ha="",Hf="",Yv=r===py,go=n,U0=n._config,aS=n._nodes,D5=go._listeners.mutation,S8=i,E8=s,V0=e._nodeMap,Su=t._nodeMap,n3=t._readOnly,C8=new Map(n._keyToDOMMap);const a=new Map;return oS=a,mw("root",null),go=void 0,aS=void 0,S8=void 0,E8=void 0,V0=void 0,Su=void 0,U0=void 0,C8=void 0,oS=void 0,a}function N8(e){const t=C8.get(e);return t===void 0&&jt(75,e),t}function Nn(e){return{type:e}}const F5=Nn("SELECTION_CHANGE_COMMAND"),$Ke=Nn("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),L5=Nn("CLICK_COMMAND"),u0=Nn("DELETE_CHARACTER_COMMAND"),O1=Nn("INSERT_LINE_BREAK_COMMAND"),lS=Nn("INSERT_PARAGRAPH_COMMAND"),P1=Nn("CONTROLLED_TEXT_INSERTION_COMMAND"),NE=Nn("PASTE_COMMAND"),j8=Nn("REMOVE_TEXT_COMMAND"),cS=Nn("DELETE_WORD_COMMAND"),uS=Nn("DELETE_LINE_COMMAND"),rh=Nn("FORMAT_TEXT_COMMAND"),oz=Nn("UNDO_COMMAND"),lz=Nn("REDO_COMMAND"),jpe=Nn("KEYDOWN_COMMAND"),Rpe=Nn("KEY_ARROW_RIGHT_COMMAND"),BKe=Nn("MOVE_TO_END"),cz=Nn("KEY_ARROW_LEFT_COMMAND"),UKe=Nn("MOVE_TO_START"),uz=Nn("KEY_ARROW_UP_COMMAND"),dz=Nn("KEY_ARROW_DOWN_COMMAND"),my=Nn("KEY_ENTER_COMMAND"),fz=Nn("KEY_SPACE_COMMAND"),hz=Nn("KEY_BACKSPACE_COMMAND"),jE=Nn("KEY_ESCAPE_COMMAND"),pz=Nn("KEY_DELETE_COMMAND"),z5=Nn("KEY_TAB_COMMAND"),Ipe=Nn("INSERT_TAB_COMMAND"),a3=Nn("INDENT_CONTENT_COMMAND"),R8=Nn("OUTDENT_CONTENT_COMMAND"),mz=Nn("DROP_COMMAND"),VKe=Nn("FORMAT_ELEMENT_COMMAND"),$5=Nn("DRAGSTART_COMMAND"),gz=Nn("DRAGOVER_COMMAND"),HKe=Nn("DRAGEND_COMMAND"),B5=Nn("COPY_COMMAND"),xz=Nn("CUT_COMMAND"),I8=Nn("SELECT_ALL_COMMAND"),qKe=Nn("CLEAR_EDITOR_COMMAND"),WKe=Nn("CLEAR_HISTORY_COMMAND"),cA=Nn("CAN_REDO_COMMAND"),uA=Nn("CAN_UNDO_COMMAND"),vz=Nn("FOCUS_COMMAND"),yz=Nn("BLUR_COMMAND"),Ope=Nn("KEY_MODIFIER_COMMAND"),Af=Object.freeze({}),O8=30,P8=[["keydown",function(e,t){if(Dw=e.timeStamp,Ppe=e.key,!t.isComposing()&&!sn(t,jpe,e)&&e.key!=null){if(wP&&pQ(e))return Ll(t,(()=>{dA(t,SP)})),wP=!1,void(SP="");if((function(n){return ni(n,"ArrowRight",{shiftKey:"any"})})(e))sn(t,Rpe,e);else if((function(n){return ni(n,"ArrowRight",Mf)})(e))sn(t,BKe,e);else if((function(n){return ni(n,"ArrowLeft",{shiftKey:"any"})})(e))sn(t,cz,e);else if((function(n){return ni(n,"ArrowLeft",Mf)})(e))sn(t,UKe,e);else if((function(n){return ni(n,"ArrowUp",{altKey:"any",shiftKey:"any"})})(e))sn(t,uz,e);else if((function(n){return ni(n,"ArrowDown",{altKey:"any",shiftKey:"any"})})(e))sn(t,dz,e);else if((function(n){return ni(n,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})})(e))Fw=!0,sn(t,my,e);else if((function(n){return n.key===" "})(e))sn(t,fz,e);else if((function(n){return hd&&ni(n,"o",{ctrlKey:!0})})(e))e.preventDefault(),Fw=!0,sn(t,O1,!0);else if((function(n){return ni(n,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})})(e))Fw=!1,sn(t,my,e);else if((function(n){return ni(n,"Backspace",{shiftKey:"any"})||hd&&ni(n,"h",{ctrlKey:!0})})(e))pQ(e)?sn(t,hz,e):(e.preventDefault(),sn(t,u0,!0));else if((function(n){return n.key==="Escape"})(e))sn(t,jE,e);else if((function(n){return ni(n,"Delete",{})||hd&&ni(n,"d",{ctrlKey:!0})})(e))(function(n){return n.key==="Delete"})(e)?sn(t,pz,e):(e.preventDefault(),sn(t,u0,!1));else if((function(n){return ni(n,"Backspace",hQ)})(e))e.preventDefault(),sn(t,cS,!0);else if((function(n){return ni(n,"Delete",hQ)})(e))e.preventDefault(),sn(t,cS,!1);else if((function(n){return hd&&ni(n,"Backspace",{metaKey:!0})})(e))e.preventDefault(),sn(t,uS,!0);else if((function(n){return hd&&(ni(n,"Delete",{metaKey:!0})||ni(n,"k",{ctrlKey:!0}))})(e))e.preventDefault(),sn(t,uS,!1);else if((function(n){return ni(n,"b",Mf)})(e))e.preventDefault(),sn(t,rh,"bold");else if((function(n){return ni(n,"u",Mf)})(e))e.preventDefault(),sn(t,rh,"underline");else if((function(n){return ni(n,"i",Mf)})(e))e.preventDefault(),sn(t,rh,"italic");else if((function(n){return ni(n,"Tab",{shiftKey:"any"})})(e))sn(t,z5,e);else if((function(n){return ni(n,"z",Mf)})(e))e.preventDefault(),sn(t,oz,void 0);else if((function(n){return hd?ni(n,"z",{metaKey:!0,shiftKey:!0}):ni(n,"y",{ctrlKey:!0})||ni(n,"z",{ctrlKey:!0,shiftKey:!0})})(e))e.preventDefault(),sn(t,lz,void 0);else{const n=t._editorState._selection;n===null||_t(n)?mQ(e)&&(e.preventDefault(),sn(t,I8,e)):(function(r){return ni(r,"c",Mf)})(e)?(e.preventDefault(),sn(t,B5,e)):(function(r){return ni(r,"x",Mf)})(e)?(e.preventDefault(),sn(t,xz,e)):mQ(e)&&(e.preventDefault(),sn(t,I8,e))}(function(n){return n.ctrlKey||n.shiftKey||n.altKey||n.metaKey})(e)&&sn(t,Ope,e)}}],["pointerdown",function(e,t){const n=e.target,r=e.pointerType;Xy(n)&&r!=="touch"&&r!=="pen"&&e.button===0&&Ll(t,(()=>{uQ(n)||(D8=!0)}))}],["compositionstart",function(e,t){Ll(t,(()=>{const n=Pt();if(_t(n)&&!t.isComposing()){const r=n.anchor,i=n.anchor.getNode();qa(r.key),(e.timeStamp<Dw+O8||r.type==="element"||!n.isCollapsed()||i.getFormat()!==n.format||Lt(i)&&i.getStyle()!==n.style)&&sn(t,P1,CKe)}}))}],["compositionend",function(e,t){L0?T_=!0:hy||!sS&&!JN?Ll(t,(()=>{dA(t,e.data)})):(wP=!0,SP=e.data)}],["input",function(e,t){e.stopPropagation(),Ll(t,(()=>{if(rs(e.target)&&uQ(e.target))return;const n=Pt(),r=e.data,i=zpe(e);if(r!=null&&_t(n)&&Fpe(n,i,r,e.timeStamp,!1)){T_&&(dA(t,r),T_=!1);const s=n.anchor.getNode(),a=$u(Fc(t));if(a===null)return;const o=n.isBackward(),c=o?n.anchor.offset:n.focus.offset,u=o?n.focus.offset:n.anchor.offset;ZN&&!n.isCollapsed()&&Lt(s)&&a.anchorNode!==null&&s.getTextContent().slice(0,c)+r+s.getTextContent().slice(c+u)===ume(a.anchorNode)||sn(t,P1,r);const d=r.length;L0&&d>1&&e.inputType==="insertCompositionText"&&!t.isComposing()&&(n.anchor.offset-=d),sS||hy||JN||!t.isComposing()||(Dw=0,qa(null))}else Rz(!1,t,r!==null?r:void 0),T_&&(dA(t,r||void 0),T_=!1);(function(){Ha();const s=ms();wpe(s)})()}),{event:e}),Xv=null}],["click",function(e,t){Ll(t,(()=>{const n=Pt(),r=$u(Fc(t)),i=gx();if(r){if(_t(n)){const s=n.anchor,a=s.getNode();if(s.type==="element"&&s.offset===0&&n.isCollapsed()&&!Zs(a)&&Qr().getChildrenSize()===1&&a.getTopLevelElementOrThrow().isEmpty()&&i!==null&&n.is(i))r.removeAllRanges(),n.dirty=!0;else if(e.detail===3&&!n.isCollapsed()&&a!==n.focus.getNode()){const o=(function(c,u){let d=c;for(;d!==Qr()&&d!=null;){if(u(d))return d;d=d.getParent()}return null})(a,(c=>rt(c)&&!c.isInline()));rt(o)&&o.select(0)}}else if(e.pointerType==="touch"||e.pointerType==="pen"){const s=r.anchorNode;(rs(s)||qh(s))&&As(wz(i,r,t,e))}}sn(t,L5,e)}))}],["cut",Af],["copy",Af],["dragstart",Af],["dragover",Af],["dragend",Af],["paste",Af],["focus",Af],["blur",Af],["drop",Af]];ZN&&P8.push(["beforeinput",(e,t)=>(function(n,r){const i=n.inputType,s=zpe(n);i==="deleteCompositionText"||L0&&dme(r)||i!=="insertCompositionText"&&Ll(r,(()=>{const a=Pt();if(i==="deleteContentBackward"){if(a===null){const g=gx();if(!_t(g))return;As(g.clone())}if(_t(a)){const g=a.anchor.key===a.focus.key;if(o=n.timeStamp,Ppe==="MediaLast"&&o<Dw+O8&&r.isComposing()&&g){if(qa(null),Dw=0,setTimeout((()=>{Ll(r,(()=>{qa(null)}))}),O8),_t(a)){const v=a.anchor.getNode();
837v.markDirty(),Lt(v)||jt(142),Lpe(a,v)}}else{qa(null),n.preventDefault();const v=a.anchor.getNode(),x=v.getTextContent(),_=v.canInsertTextAfter(),w=a.anchor.offset===0&&a.focus.offset===x.length;let S=NX&&g&&!w&&_;if(S&&a.isCollapsed()&&(S=!Br(B8(a.anchor,!0))),!S){sn(r,u0,!0);const E=Pt();NX&&_t(E)&&E.isCollapsed()&&(Gg=E,setTimeout((()=>Gg=null)))}}return}}var o;if(!_t(a))return;const c=n.data;Xv!==null&&Rz(!1,r,Xv),a.dirty&&Xv===null||!a.isCollapsed()||Zs(a.anchor.getNode())||s===null||a.applyDOMRange(s),Xv=null;const u=a.anchor,d=a.focus,h=u.getNode(),p=d.getNode();if(i!=="insertText"&&i!=="insertTranspose")switch(n.preventDefault(),i){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":sn(r,P1,n);break;case"insertFromComposition":qa(null),sn(r,P1,n);break;case"insertLineBreak":qa(null),sn(r,O1,!1);break;case"insertParagraph":qa(null),Fw&&!hy?(Fw=!1,sn(r,O1,!1)):sn(r,lS,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":sn(r,NE,n);break;case"deleteByComposition":(function(g,v){return g!==v||rt(g)||rt(v)||!d0(g)||!d0(v)})(h,p)&&sn(r,j8,n);break;case"deleteByDrag":case"deleteByCut":sn(r,j8,n);break;case"deleteContent":sn(r,u0,!1);break;case"deleteWordBackward":sn(r,cS,!0);break;
837case"deleteWordForward":sn(r,cS,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":sn(r,uS,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":sn(r,uS,!1);break;case"formatStrikeThrough":sn(r,rh,"strikethrough");break;case"formatBold":sn(r,rh,"bold");break;case"formatItalic":sn(r,rh,"italic");break;case"formatUnderline":sn(r,rh,"underline");break;case"historyUndo":sn(r,oz,void 0);break;case"historyRedo":sn(r,lz,void 0)}else{if(c===` 838`)n.preventDefault(),sn(r,O1,!1);else if(c===Ah)n.preventDefault(),sn(r,lS,void 0);else if(c==null&&n.dataTransfer){const g=n.dataTransfer.getData("text/plain");n.preventDefault(),a.insertRawText(g)}else c!=null&&Fpe(a,s,c,n.timeStamp,!0)?(n.preventDefault(),sn(r,P1,c)):Xv=c;Mpe=n.timeStamp}}))})(e,t)]);let Dw=0,Ppe=null,Mpe=0,Xv=null;const o3=new WeakMap;let M8=!1,D8=!1,Fw=!1,T_=!1,wP=!1,SP="",Gg=null,Dpe=[0,"",0,"root",0];function Fpe(e,t,n,r,i){const s=e.anchor,a=e.focus,o=s.getNode(),c=ms(),u=$u(Fc(c)),d=u!==null?u.anchorNode:null,h=s.key,p=c.getElementByKey(h),g=n.length;return h!==a.key||!Lt(o)||(!i&&(!ZN||Mpe<r+50)||o.isDirty()&&g<2||lme(n))&&s.offset!==a.offset&&!o.isComposing()||zf(o)||o.isDirty()&&g>1||(i||!ZN)&&p!==null&&!o.isComposing()&&d!==gy(p)||u!==null&&t!==null&&(!t.collapsed||t.startContainer!==u.anchorNode||t.startOffset!==u.anchorOffset)||o.getFormat()!==e.format||o.getStyle()!==e.style||(function(v,x){if(x.isSegmented())return!0;if(!v.isCollapsed())return!1;const _=v.anchor.offset,w=x.getParentOrThrow(),S=d0(x);return _===0?!x.canInsertTextBefore()||!w.canInsertTextBefore()&&!x.isComposing()||S||(function(E){const T=E.getPreviousSibling();return(Lt(T)||rt(T)&&T.isInline())&&!T.canInsertTextAfter()})(x):_===x.getTextContentSize()&&(!x.canInsertTextAfter()||!w.canInsertTextAfter()&&!x.isComposing()||S)})(e,o)}function BX(e,t){return qh(e)&&e.nodeValue!==null&&t!==0&&t!==e.nodeValue.length}function UX(e,t,n){const{anchorNode:r,anchorOffset:i,focusNode:s,focusOffset:a}=e;M8&&(M8=!1,BX(r,i)&&BX(s,a)&&!Gg)||Ll(t,(()=>{if(!n)return void As(null);if(!ME(t,r,s))return;let o=Pt();if(Gg&&_t(o)&&o.isCollapsed()){const c=o.anchor,u=Gg.anchor;(c.key===u.key&&c.offset===u.offset+1||c.offset===1&&u.getNode().is(c.getNode().getPreviousSibling()))&&(o=Gg.clone(),As(o))}if(Gg=null,_t(o)){const c=o.anchor,u=c.getNode();if(o.isCollapsed()){e.type==="Range"&&e.anchorNode===e.focusNode&&(o.dirty=!0);const d=Fc(t).event,h=d?d.timeStamp:performance.now(),[p,g,v,x,_]=Dpe,w=Qr(),S=t.isComposing()===!1&&w.getTextContent()==="";if(h<_+200&&c.offset===v&&c.key===x)Ek(o,p,g);else if(c.type==="text")Lt(u)||jt(141),Lpe(o,u);else if(c.type==="element"&&!S){rt(u)||jt(259);const E=c.getNode();E.isEmpty()?(function(T,N){const A=N.getTextFormat(),k=N.getTextStyle();Ek(T,A,k)})(o,E):Ek(o,0,"")}}else{const d=c.key,h=o.focus.key,p=o.getNodes(),g=p.length,v=o.isBackward(),x=v?a:i,_=v?i:a,w=v?h:d,S=v?d:h;let E=EKe,T=!1;for(let N=0;N<g;N++){const A=p[N],k=A.getTextContentSize();if(Lt(A)&&k!==0&&!(N===0&&A.__key===w&&x===k||N===g-1&&A.__key===S&&_===0)&&(T=!0,E&=A.getFormat(),E===0))break}o.format=T?E:0}}sn(t,F5,void 0)}))}function Ek(e,t,n){e.format===t&&e.style===n||(e.format=t,e.style=n,e.dirty=!0)}function Lpe(e,t){Ek(e,t.getFormat(),t.getStyle())}function zpe(e){if(!e.getTargetRanges)return null;const t=e.getTargetRanges();return t.length===0?null:t[0]}function dA(e,t){const n=e._compositionKey;if(qa(null),n!==null&&t!=null){if(t===""){const r=Zi(n),i=gy(e.getElementByKey(n));return void(i!==null&&i.nodeValue!==null&&Lt(r)&&Iz(r,i.nodeValue,null,null,!0))}if(t[t.length-1]===` 839`){const r=Pt();if(_t(r)){const i=r.focus;return r.anchor.set(i.key,i.offset,i.type),void sn(e,my,null)}}}Rz(!0,e,t)}function $pe(e){let t=e.__lexicalEventHandles;return t===void 0&&(t=[],e.__lexicalEventHandles=t),t}const M1=new Map;function Bpe(e){const t=_Ye(e.target);if(t===null)return;const n=Nz(t.anchorNode);if(n===null)return;D8&&(D8=!1,Ll(n,(()=>{const c=gx(),u=t.anchorNode;(rs(u)||qh(u))&&As(wz(c,t,n,e))})));const r=jz(n),i=r[r.length-1],s=i._key,a=M1.get(s),o=a||i;o!==n&&UX(t,o,!1),UX(t,n,!0),n!==i?M1.set(s,n):a&&M1.delete(s)}function VX(e){e._lexicalHandled=!0}function HX(e){return e._lexicalHandled===!0}function GKe(e){const t=e.ownerDocument,n=o3.get(t);if(n===void 0)return;const r=n-1;r>=0||jt(164),o3.set(t,r),r===0&&t.removeEventListener("selectionchange",Bpe);const i=Y5(e);
839kz(i)?((function(a){if(a._parentEditor!==null){const o=jz(a),c=o[o.length-1]._key;M1.get(c)===a&&M1.delete(c)}else M1.delete(a._key)})(i),e.__lexicalEditor=null):i&&jt(198);const s=$pe(e);for(let a=0;a<s.length;a++)s[a]();e.__lexicalEventHandles=[]}function F8(e,t,n){Ha();const r=e.__key,i=e.getParent();if(i===null)return;const s=(function(o){const c=Pt();if(!_t(c)||!rt(o))return c;const{anchor:u,focus:d}=c,h=u.getNode(),p=d.getNode();return U8(h,o)&&u.set(o.__key,0,"element"),U8(p,o)&&d.set(o.__key,0,"element"),c})(e);let a=!1;if(_t(s)&&t){const o=s.anchor,c=s.focus;o.key===r&&(u3(o,e,i,e.getPreviousSibling(),e.getNextSibling()),a=!0),c.key===r&&(u3(c,e,i,e.getPreviousSibling(),e.getNextSibling()),a=!0)}else ss(s)&&t&&e.isSelected()&&e.selectPrevious();if(_t(s)&&t&&!a){const o=e.getIndexWithinParent();f0(e),c3(s,i,o,-1)}else f0(e);n||ea(i)||i.canBeEmpty()||!i.isEmpty()||F8(i,t),t&&s&&Zs(i)&&i.isEmpty()&&i.selectEnd()}class qy{static getType(){const{ownNodeType:t}=J5(this);return t===void 0&&jt(64,this.name),t}static clone(t){jt(65,this.name)}$config(){return{}}config(t,n){const r=n.extends||Object.getPrototypeOf(this.constructor);return Object.assign(n,{extends:r,type:t}),{[t]:n}}afterCloneFrom(t){this.__key===t.__key?(this.__parent=t.__parent,this.__next=t.__next,this.__prev=t.__prev,this.__state=t.__state):t.__state&&(this.__state=t.__state.getWritable(this))}constructor(t){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",{configurable:!0,enumerable:!1,value:void 0,writable:!0}),ime(this,t)}getType(){return this.__type}isInline(){jt(137,this.constructor.name)}isAttached(){let t=this.__key;for(;t!==null;){if(t==="root")return!0;const n=Zi(t);if(n===null)break;t=n.__parent}return!1}isSelected(t){const n=t||Pt();if(n==null)return!1;const r=n.getNodes().some((i=>i.__key===this.__key));if(Lt(this))return r;if(_t(n)&&n.anchor.type==="element"&&n.focus.type==="element"){if(n.isCollapsed())return!1;const i=this.getParent();if(Br(this)&&this.isInline()&&i){const s=n.isBackward()?n.focus:n.anchor;if(i.is(s.getNode())&&s.offset===i.getChildrenSize()&&this.is(i.getLastChild()))return!1}}return r}getKey(){return this.__key}getIndexWithinParent(){const t=this.getParent();if(t===null)return-1;let n=t.getFirstChild(),r=0;for(;n!==null;){if(this.is(n))return r;r++,n=n.getNextSibling()}return-1}getParent(){const t=this.getLatest().__parent;return t===null?null:Zi(t)}getParentOrThrow(){const t=this.getParent();return t===null&&jt(66,this.__key),t}getTopLevelElement(){let t=this;for(;t!==null;){const n=t.getParent();if(ea(n))return rt(t)||t===this&&Br(t)||jt(194),t;t=n}return null}getTopLevelElementOrThrow(){const t=this.getTopLevelElement();return t===null&&jt(67,this.__key),t}getParents(){const t=[];let n=this.getParent();for(;n!==null;)t.push(n),n=n.getParent();return t}getParentKeys(){const t=[];let n=this.getParent();for(;n!==null;)t.push(n.__key),n=n.getParent();return t}getPreviousSibling(){const t=this.getLatest().__prev;return t===null?null:Zi(t)}getPreviousSiblings(){const t=[],n=this.getParent();if(n===null)return t;let r=n.getFirstChild();for(;r!==null&&!r.is(this);)t.push(r),r=r.getNextSibling();return t}getNextSibling(){const t=this.getLatest().__next;return t===null?null:Zi(t)}getNextSiblings(){const t=[];let n=this.getNextSibling();for(;n!==null;)t.push(n),n=n.getNextSibling();return t}getCommonAncestor(t){const n=rt(this)?this:this.getParent(),r=rt(t)?t:t.getParent(),i=n&&r?Ak(n,r):null;return i?i.commonAncestor:null}is(t){return t!=null&&this.__key===t.__key}isBefore(t){const n=Ak(this,t);return n!==null&&(n.type==="descendant"||(n.type==="branch"?xme(n)===-1:(n.type!=="same"&&n.type!=="ancestor"&&jt(279),!1)))}isParentOf(t){const n=Ak(this,t);return n!==null&&n.type==="ancestor"}getNodesBetween(t){const n=this.isBefore(t),r=[],i=new Set;let s=this;for(;s!==null;){const a=s.__key;if(i.has(a)||(i.add(a),r.push(s)),s===t)break;const o=rt(s)?n?s.getFirstChild():s.getLastChild():null;if(o!==null){s=o;continue}const c=n?s.getNextSibling():s.getPreviousSibling();if(c!==null){s=c;continue}const u=s.getParentOrThrow();if(i.has(u.__key)||r.push(u),u===t)break;let d=null,h=u;do{if(h===null&&jt(68),d=n?h.getNextSibling():h.getPreviousSibling(),h=h.getParent(),h===null)break;d!==null||i.has(h.__key)||r.push(h)}while(d===null);s=d}return n||r.reverse(),r}isDirty(){const t=ms()._dirtyLeaves;return t!==null&&t.has(this.__key)}getLatest(){const t=Zi(this.__key);return t===null&&jt(113),t}getWritable(){Ha();const t=Hm(),n=ms(),r=t._nodeMap,i=this.__key,s=this.getLatest(),a=n._cloneNotNeeded,o=Pt();if(o!==null&&o.setCachedNodes(null),a.has(i))return h3(s),s;const c=Mz(s);return a.add(i),h3(c),r.set(i,c),c}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(t,n){jt(70)}updateDOM(t,n,r){jt(71)}exportDOM(t){return{element:this.createDOM(t._config,t)}}exportJSON(){const t=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...t}}static importJSON(t){jt(18,this.name)}updateFromJSON(t){return(function(n,r){const i=n.getWritable(),s=r.$;let a=s;for(const o of Cpe(i).flatKeys)o in r&&(a!==void 0&&a!==s||(a={...s}),a[o]=r[o]);return(i.__state||a)&&DKe(n).updateFromJSON(a),i})(this,t)}static transform(){return null}remove(t){F8(this,!0,t)}replace(t,n){Ha();let r=Pt();r!==null&&(r=r.clone()),NP(this,t);const i=this.getLatest(),s=this.__key,a=t.__key,o=t.getWritable(),c=this.getParentOrThrow().getWritable(),u=c.__size;f0(o);const d=i.getPreviousSibling(),h=i.getNextSibling(),p=i.__prev,g=i.__next,v=i.__parent;if(F8(i,!1,!0),d===null?c.__first=a:d.getWritable().__next=a,o.__prev=p,h===null?c.__last=a:h.getWritable().__prev=a,o.__next=g,o.__parent=v,c.__size=u,n&&(rt(this)&&rt(o)||jt(139),this.getChildren().forEac
839h((x=>{o.append(x)}))),_t(r)){As(r);const x=r.anchor,_=r.focus;x.key===s&&KX(x,o),_.key===s&&KX(_,o)}return qp()===s&&qa(a),o}insertAfter(t,n=!0){Ha(),NP(this,t);const r=this.getWritable(),i=t.getWritable(),s=i.getParent(),a=Pt();let o=!1,c=!1;if(s!==null){const g=t.getIndexWithinParent();if(f0(i),_t(a)){const v=s.__key,x=a.anchor,_=a.focus;o=x.type==="element"&&x.key===v&&x.offset===g+1,c=_.type==="element"&&_.key===v&&_.offset===g+1}}const u=this.getNextSibling(),d=this.getParentOrThrow().getWritable(),h=i.__key,p=r.__next;if(u===null?d.__last=h:u.getWritable().__prev=h,d.__size++,r.__next=h,i.__next=p,i.__prev=r.__key,i.__parent=r.__parent,n&&_t(a)){const g=this.getIndexWithinParent();c3(a,d,g+1);const v=d.__key;o&&a.anchor.set(v,g+2,"element"),c&&a.focus.set(v,g+2,"element")}return t}insertBefore(t,n=!0){Ha(),NP(this,t);const r=this.getWritable(),i=t.getWritable(),s=i.__key;f0(i);const a=this.getPreviousSibling(),o=this.getParentOrThrow().getWritable(),c=r.__prev,u=this.getIndexWithinParent();a===null?o.__first=s:a.getWritable().__next=s,o.__size++,r.__prev=s,i.__prev=c,i.__next=r.__key,i.__parent=r.__parent;const d=Pt();return n&&_t(d)&&c3(d,this.getParentOrThrow(),u),t}isParentRequired(){return!1}createParentElementNode(){return Ur()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(t,n){Ha();const r=this.getPreviousSibling(),i=this.getParentOrThrow();if(r===null)return i.select(0,0);if(rt(r))return r.select();if(!Lt(r)){const s=r.getIndexWithinParent()+1;return i.select(s,s)}return r.select(t,n)}selectNext(t,n){Ha();const r=this.getNextSibling(),i=this.getParentOrThrow();if(r===null)return i.select();if(rt(r))return r.select(0,0);if(!Lt(r)){const s=r.getIndexWithinParent();return i.select(s,s)}return r.select(t,n)}markDirty(){this.getWritable()}reconcileObservedMutation(t,n){this.markDirty()}}class RE extends qy{static getType(){return"linebreak"}static clone(t){return new RE(t.__key)}constructor(t){super(t)}getTextContent(){return` 840`}createDOM(){return document.createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:t=>(function(n){const r=n.parentElement;if(r!==null&&p3(r)){const i=r.firstChild;if(i===n||i.nextSibling===n&&fA(i)){const s=r.lastChild;if(s===n||s.previousSibling===n&&fA(s))return!0}}return!1})(t)||(function(n){const r=n.parentElement;if(r!==null&&p3(r)){const i=r.firstChild;if(i===n||i.nextSibling===n&&fA(i))return!1;const s=r.lastChild;if(s===n||s.previousSibling===n&&fA(s))return!0}return!1})(t)?null:{conversion:KKe,priority:0}}}static importJSON(t){return zu().updateFromJSON(t)}}function KKe(e){return{node:zu()}}function zu(){return Jl(new RE)}function Eu(e){return e instanceof RE}function fA(e){return qh(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}function EP(e,t){return 16&t?"code":t&J7?"mark":32&t?"sub":64&t?"sup":null}function CP(e,t){return 1&t?"strong":2&t?"em":"span"}function Upe(e,t,n,r,i){const s=r.classList;let a=D1(i,"base");a!==void 0&&s.add(...a),a=D1(i,"underlineStrikethrough");let o=!1;const c=t&t3&&t&e3;a!==void 0&&(n&t3&&n&e3?(o=!0,c||s.add(...a)):c&&s.remove(...a));for(const u in $0){const d=$0[u];if(a=D1(i,u),a!==void 0)if(n&d){if(o&&(u==="underline"||u==="strikethrough")){t&d&&s.remove(...a);continue}t&d&&(!c||u!=="underline")&&u!=="strikethrough"||s.add(...a)}else t&d&&s.remove(...a)}}function Vpe(e,t,n){const r=t.firstChild,i=n.isComposing(),s=e+(i?M5:"");if(r==null)t.textContent=s;else{const a=r.nodeValue;if(a!==s)if(i||L0){const[o,c,u]=(function(d,h){const p=d.length,g=h.length;let v=0,x=0;for(;v<p&&v<g&&d[v]===h[v];)v++;for(;x+v<p&&x+v<g&&d[p-x-1]===h[g-x-1];)x++;return[v,p-v-x,h.slice(v,g-x)]})(a,s);c!==0&&r.deleteData(o,c),r.insertData(o,u)}else r.nodeValue=s}}function qX(e,t,n,r,i,s){Vpe(i,e,t);const a=s.theme.text;a!==void 0&&Upe(0,0,r,e,a)}function hA(e,t){const n=document.createElement(t);return n.appendChild(e),n}class ef extends qy{static getType(){return"text"}static clone(t){return new ef(t.__text,t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__text=t.__text,this.__format=t.__format,this.__style=t.__style,this.__mode=t.__mode,this.__detail=t.__detail}constructor(t="",n){super(n),this.__text=t,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const t=this.getLatest();return NKe[t.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===qp()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(t){const n=$0[t];return!!(this.getFormat()&n)}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(t,n){return f3(this.getLatest().__format,t,n)}canHaveFormat(){return!0}isInline(){return!0}createDOM(t,n){const r=this.__format,i=EP(0,r),s=CP(0,r),a=i===null?s:i,o=document.createElement(a);let c=o;
840this.hasFormat("code")&&o.setAttribute("spellcheck","false"),i!==null&&(c=document.createElement(s),o.appendChild(c)),qX(c,this,0,r,this.__text,t);const u=this.__style;return u!==""&&(o.style.cssText=u),o}updateDOM(t,n,r){const i=this.__text,s=t.__format,a=this.__format,o=EP(0,s),c=EP(0,a),u=CP(0,s),d=CP(0,a);if((o===null?u:o)!==(c===null?d:c))return!0;if(o===c&&u!==d){const x=n.firstChild;x==null&&jt(48);const _=document.createElement(d);return qX(_,this,0,a,i,r),n.replaceChild(_,x),!1}let h=n;c!==null&&o!==null&&(h=n.firstChild,h==null&&jt(49)),Vpe(i,h,this);const p=r.theme.text;p!==void 0&&s!==a&&Upe(0,s,a,h,p);const g=t.__style,v=this.__style;return g!==v&&(n.style.cssText=v),!1}static importDOM(){return{"#text":()=>({conversion:ZKe,priority:0}),b:()=>({conversion:XKe,priority:0}),code:()=>({conversion:kf,priority:0}),em:()=>({conversion:kf,priority:0}),i:()=>({conversion:kf,priority:0}),mark:()=>({conversion:kf,priority:0}),s:()=>({conversion:kf,priority:0}),span:()=>({conversion:YKe,priority:0}),strong:()=>({conversion:kf,priority:0}),sub:()=>({conversion:kf,priority:0}),sup:()=>({conversion:kf,priority:0}),u:()=>({conversion:kf,priority:0})}}static importJSON(t){return Ii().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setTextContent(t.text).setFormat(t.format).setDetail(t.detail).setMode(t.mode).setStyle(t.style)}exportDOM(t){let{element:n}=super.exportDOM(t);return rs(n)||jt(132),n.style.whiteSpace="pre-wrap",this.hasFormat("lowercase")?n.style.textTransform="lowercase":this.hasFormat("uppercase")?n.style.textTransform="uppercase":this.hasFormat("capitalize")&&(n.style.textTransform="capitalize"),this.hasFormat("bold")&&(n=hA(n,"b")),this.hasFormat("italic")&&(n=hA(n,"i")),this.hasFormat("strikethrough")&&(n=hA(n,"s")),this.hasFormat("underline")&&(n=hA(n,"u")),{element:n}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(t,n){}setFormat(t){const n=this.getWritable();return n.__format=typeof t=="string"?$0[t]:t,n}setDetail(t){const n=this.getWritable();return n.__detail=typeof t=="string"?TKe[t]:t,n}setStyle(t){const n=this.getWritable();return n.__style=t,n}toggleFormat(t){const n=f3(this.getFormat(),t,null);return this.setFormat(n)}toggleDirectionless(){const t=this.getWritable();return t.__detail^=1,t}toggleUnmergeable(){const t=this.getWritable();return t.__detail^=2,t}setMode(t){const n=kKe[t];if(this.__mode===n)return this;const r=this.getWritable();return r.__mode=n,r}setTextContent(t){if(this.__text===t)return this;const n=this.getWritable();return n.__text=t,n}select(t,n){Ha();let r=t,i=n;const s=Pt(),a=this.getTextContent(),o=this.__key;if(typeof a=="string"){const c=a.length;r===void 0&&(r=c),i===void 0&&(i=c)}else r=0,i=0;if(!_t(s))return Wpe(o,r,o,i,"text","text");{const c=qp();c!==s.anchor.key&&c!==s.focus.key||qa(o),s.setTextNodeRange(this,r,this,i)}return s}selectStart(){return this.select(0,0)}selectEnd(){const t=this.getTextContentSize();return this.select(t,t)}spliceText(t,n,r,i){const s=this.getWritable(),a=s.__text,o=r.length;let c=t;c<0&&(c=o+c,c<0&&(c=0));const u=Pt();if(i&&_t(u)){const h=t+o;u.setTextNodeRange(s,h,s,h)}const d=a.slice(0,c)+r+a.slice(c+n);return s.__text=d,s}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...t){Ha();const n=this.getLatest(),r=n.getTextContent();if(r==="")return[];const i=n.__key,s=qp(),a=r.length;t.sort(((j,R)=>j-R)),t.push(a);const o=[],c=t.length;for(let j=0,R=0;j<a&&R<=c;R++){const P=t[R];P>j&&(o.push(r.slice(j,P)),j=P)}const u=o.length;if(u===1)return[n];const d=o[0],h=n.getParent();let p;const g=n.getFormat(),v=n.getStyle(),x=n.__detail;let _=!1,w=null,S=null;const E=Pt();if(_t(E)){const[j,R]=E.isBackward()?[E.focus,E.anchor]:[E.anchor,E.focus];j.type==="text"&&j.key===i&&(w=j),R.type==="text"&&R.key===i&&(S=R)}n.isSegmented()?(p=Ii(d),p.__format=g,p.__style=v,p.__detail=x,p.__state=MX(n,p),_=!0):p=n.setTextContent(d);const T=[p];for(let j=1;j<u;j++){const R=Ii(o[j]);R.__format=g,R.__style=v,R.__detail=x,R.__state=MX(n,R);const P=R.__key;s===i&&qa(P),T.push(R)}const N=w?w.offset:null,A=S?S.offset:null;let k=0;for(const j of T){if(!w&&!S)break;const R=k+j.getTextContentSize();if(w!==null&&N!==null&&N<=R&&N>=k&&(w.set(j.getKey(),N-k,"text"),N<R&&(w=null)),S!==null&&A!==null&&A<=R&&A>=k){S.set(j.getKey(),A-k,"text");break}k=R}if(h!==null){(function(P){const V=P.getPreviousSibling(),U=P.getNextSibling();V!==null&&h3(V),U!==null&&h3(U)})(this);const j=h.getWritable(),R=this.getIndexWithinParent();_?(j.splice(R,0,T),this.remove()):j.splice(R,1,T),_t(E)&&c3(E,h,R,u-1)}return T}mergeWithSibling(t){const n=t===this.getPreviousSibling();n||t===this.getNextSibling()||jt(50);const r=this.__key,i=t.__key,s=this.__text,a=s.length;qp()===i&&qa(r);const o=Pt();if(_t(o)){const h=o.anchor,p=o.focus;h!==null&&h.key===i&&tQ(h,n,r,t,a),p!==null&&p.key===i&&tQ(p,n,r,t,a)}const c=t.__text,u=n?c+s:s+c;this.setTextContent(u);const d=this.getWritable();return t.remove(),d}isTextEntity(){return!1}}function YKe(e){return{forChild:bz(e.style),node:null}}function XKe(e){const t=e,n=t.style.fontWeight==="normal";return{forChild:bz(t.style,n?void 0:"bold"),node:null}}const WX=new WeakMap;function QKe(e){if(!rs(e))return!1;if(e.nodeName==="PRE")return!0;const t=e.style.whiteSpace;return typeof t=="string"&&t.startsWith("pre")}function ZKe(e){const t=e;e.parentElement===null&&jt(129);let n=t.textContent||"";if((function(r){let i,s=r.parentNode;const a=[r];for(;s!==null&&(i=WX.get(s))===void 0&&!QKe(s);)a.push(s),s=s.parentNode;const o=i===void 0?s:i;for(let c=0;c<a.length;c++)WX.set(a[c],o);return o}
840)(t)!==null){const r=n.split(/(\r?\n|\t)/),i=[],s=r.length;for(let a=0;a<s;a++){const o=r[a];o===` 841`||o===`\r 842`?i.push(zu()):o===" "?i.push(Wy()):o!==""&&i.push(Ii(o))}return{node:i}}if(n=n.replace(/\r/g,"").replace(/[ \t\n]+/g," "),n==="")return{node:null};if(n[0]===" "){let r=t,i=!0;for(;r!==null&&(r=GX(r,!1))!==null;){const s=r.textContent||"";if(s.length>0){/[ \t\n]$/.test(s)&&(n=n.slice(1)),i=!1;break}}i&&(n=n.slice(1))}if(n[n.length-1]===" "){let r=t,i=!0;for(;r!==null&&(r=GX(r,!0))!==null;)if((r.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){i=!1;break}i&&(n=n.slice(0,n.length-1))}return n===""?{node:null}:{node:Ii(n)}}function GX(e,t){let n=e;for(;;){let r;for(;(r=t?n.nextSibling:n.previousSibling)===null;){const s=n.parentElement;if(s===null)return null;n=s}if(n=r,rs(n)){const s=n.style.display;if(s===""&&!q8(n)||s!==""&&!s.startsWith("inline"))return null}let i=n;for(;(i=t?n.firstChild:n.lastChild)!==null;)n=i;if(qh(n))return n;if(n.nodeName==="BR")return null}}const JKe={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function kf(e){const t=JKe[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:bz(e.style,t),node:null}}function Ii(e=""){return Jl(new ef(e))}function Lt(e){return e instanceof ef}function bz(e,t){const n=e.fontWeight,r=e.textDecoration.split(" "),i=n==="700"||n==="bold",s=r.includes("line-through"),a=e.fontStyle==="italic",o=r.includes("underline"),c=e.verticalAlign;return u=>(Lt(u)&&(i&&!u.hasFormat("bold")&&u.toggleFormat("bold"),s&&!u.hasFormat("strikethrough")&&u.toggleFormat("strikethrough"),a&&!u.hasFormat("italic")&&u.toggleFormat("italic"),o&&!u.hasFormat("underline")&&u.toggleFormat("underline"),c!=="sub"||u.hasFormat("subscript")||u.toggleFormat("subscript"),c!=="super"||u.hasFormat("superscript")||u.toggleFormat("superscript"),t&&!u.hasFormat(t)&&u.toggleFormat(t)),u)}class IE extends ef{static getType(){return"tab"}static clone(t){return new IE(t.__key)}constructor(t){super(" ",t),this.__detail=2}static importDOM(){return null}createDOM(t){const n=super.createDOM(t),r=D1(t.theme,"tab");return r!==void 0&&n.classList.add(...r),n}static importJSON(t){return Wy().updateFromJSON(t)}setTextContent(t){return t!==" "&&t!==""&&jt(126),super.setTextContent(" ")}spliceText(t,n,r,i){return r===""&&n===0||r===" "&&n===1||jt(286),this}setDetail(t){return t!==2&&jt(127),this}setMode(t){return t!=="normal"&&jt(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Wy(){return Jl(new IE)}function U5(e){return e instanceof IE}class eYe{constructor(t,n,r){this._selection=null,this.key=t,this.offset=n,this.type=r}is(t){return this.key===t.key&&this.offset===t.offset&&this.type===t.type}isBefore(t){return this.key===t.key?this.offset<t.offset:gme(Wl(Gd(this,"next")),Wl(Gd(t,"next")))<0}getNode(){const t=Zi(this.key);return t===null&&jt(20),t}set(t,n,r,i){const s=this._selection,a=this.key;i&&this.key===t&&this.offset===n&&this.type===r||(this.key=t,this.offset=n,this.type=r,OE()||(qp()===a&&qa(t),s!==null&&(s.setCachedNodes(null),s.dirty=!0)))}}function qd(e,t,n){return new eYe(e,t,n)}function TP(e,t){let n=t.__key,r=e.offset,i="element";if(Lt(t)){i="text";const s=t.getTextContentSize();r>s&&(r=s)}else if(!rt(t)){const s=t.getNextSibling();if(Lt(s))n=s.__key,r=0,i="text";else{const a=t.getParent();a&&(n=a.__key,r=t.getIndexWithinParent()+1)}}e.set(n,r,i)}function KX(e,t){if(rt(t)){const n=t.getLastDescendant();rt(n)||Lt(n)?TP(e,n):TP(e,t)}else TP(e,t)}class V5{constructor(t){this._cachedNodes=null,this._nodes=t,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){if(!ss(t))return!1;const n=this._nodes,r=t._nodes;return n.size===r.size&&Array.from(n).every((i=>r.has(i)))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(t){this.dirty=!0,this._nodes.add(t),this._cachedNodes=null}delete(t){this.dirty=!0,this._nodes.delete(t),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(t){return this._nodes.has(t)}clone(){return new V5(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(t){}insertText(){}insertNodes(t){const n=this.getNodes(),r=n.length,i=n[r-1];let s;if(Lt(i))s=i.select();else{const a=i.getIndexWithinParent()+1;s=i.getParentOrThrow().select(a,a)}s.insertNodes(t);for(let a=0;a<r;a++)n[a].remove()}getNodes(){const t=this._cachedNodes;if(t!==null)return t;const n=this._nodes,r=[];for(const i of n){const s=Zi(i);s!==null&&r.push(s)}return OE()||(this._cachedNodes=r),r}getTextContent(){const t=this.getNodes();let n="";for(let r=0;r<t.length;r++)n+=t[r].getTextContent();return n}deleteNodes(){const t=this.getNodes();if((Pt()||gx())===this&&t[0]){const n=ta(t[0],"next");vme(bm(n,n))}for(const n of t)n.remove()}}function _t(e){return e instanceof mx}class mx{constructor(t,n,r,i){this.anchor=t,this.focus=n,t._selection=this,n._selection=this,this._cachedNodes=null,this.format=r,this.style=i,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){return!!_t(t)&&this.anchor.is(t.anchor)&&this.focus.is(t.focus)&&this.format===t.format&&this.style===t.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const t=this._cachedNodes;if(t!==null)return t;const n=(function(r){const i=[],[s,a]=r.getTextSlices();s&&i.push(s.caret.origin);const o=new Set,c=new Set;for(const u of r)if(Ic(u)){const{origin:d}=u;i.length===0?o.add(d):(c.add(d),i.push(d))}else{const{origin:d}=u;rt(d)&&c.has(d)||i.push(d)}if(a&&i.push(a.caret.origin),xy(r.focus)&&rt(r.focus.origin)&&r.focus.getNodeAtCaret()===null)for(let u=Lc(r.focus.origin,"previous");Ic(u)&&o.has(u.origin)&&!u.origin.isEmpty()&&u.origin.is(i[i.length-1]);u=e4(u))o.delete(u.origin),i.pop();for(;i.length>1;){const u=i[i.length-1];if(!rt(u)||c.has(u)||u.isEmpty()||o.has(u))break;i.pop()}if(i.length===0&&r.isCollapsed()){const u=Wl(r.anchor),d=Wl(r.anchor.getFlipped()),h=g=>
842Id(g)?g.origin:g.getNodeAtCaret(),p=h(u)||h(d)||(r.anchor.getNodeAtCaret()?u.origin:d.origin);i.push(p)}return i})(bme(_Q(this),"next"));return OE()||(this._cachedNodes=n),n}setTextNodeRange(t,n,r,i){this.anchor.set(t.__key,n,"text"),this.focus.set(r.__key,i,"text")}getTextContent(){const t=this.getNodes();if(t.length===0)return"";const n=t[0],r=t[t.length-1],i=this.anchor,s=this.focus,a=i.isBefore(s),[o,c]=L8(this);let u="",d=!0;for(let h=0;h<t.length;h++){const p=t[h];if(rt(p)&&!p.isInline())d||(u+=` 843`),d=!p.isEmpty();else if(d=!1,Lt(p)){let g=p.getTextContent();p===n?p===r?i.type==="element"&&s.type==="element"&&s.offset!==i.offset||(g=o<c?g.slice(o,c):g.slice(c,o)):g=a?g.slice(o):g.slice(c):p===r&&(g=a?g.slice(0,c):g.slice(0,o)),u+=g}else!Br(p)&&!Eu(p)||p===r&&this.isCollapsed()||(u+=p.getTextContent())}return u}applyDOMRange(t){const n=ms(),r=n.getEditorState()._selection,i=qpe(t.startContainer,t.startOffset,t.endContainer,t.endOffset,n,r);if(i===null)return;const[s,a]=i;this.anchor.set(s.key,s.offset,s.type,!0),this.focus.set(a.key,a.offset,a.type,!0),B0(this)}clone(){const t=this.anchor,n=this.focus;return new mx(qd(t.key,t.offset,t.type),qd(n.key,n.offset,n.type),this.format,this.style)}toggleFormat(t){this.format=f3(this.format,t,null),this.dirty=!0}setFormat(t){this.format=t,this.dirty=!0}setStyle(t){this.style=t,this.dirty=!0}hasFormat(t){const n=$0[t];return!!(this.format&n)}insertRawText(t){const n=t.split(/(\r?\n|\t)/),r=[],i=n.length;for(let s=0;s<i;s++){const a=n[s];a===` 844`||a===`\r 845`?r.push(zu()):a===" "?r.push(Wy()):r.push(Ii(a))}this.insertNodes(r)}insertText(t){const n=this.anchor,r=this.focus,i=this.format,s=this.style;let a=n,o=r;!this.isCollapsed()&&r.isBefore(n)&&(a=r,o=n),a.type==="element"&&(function(_,w,S,E){const T=_.getNode(),N=T.getChildAtIndex(_.offset),A=Ii();if(A.setFormat(S),A.setStyle(E),W5(N))N.splice(0,0,[A]);
845else{const k=Zs(T)?Ur().append(A):A;N===null?T.append(k):N.insertBefore(k)}_.is(w)&&w.set(A.__key,0,"text"),_.set(A.__key,0,"text")})(a,o,i,s),o.type==="element"&&K0(o,Wl(Gd(o,"next")));const c=a.offset;let u=o.offset;const d=this.getNodes(),h=d.length;let p=d[0];Lt(p)||jt(26);const g=p.getTextContent().length,v=p.getParentOrThrow();let x=d[h-1];if(h===1&&o.type==="element"&&(u=g,o.set(a.key,u,"text")),this.isCollapsed()&&c===g&&(zf(p)||!p.canInsertTextAfter()||!v.canInsertTextAfter()&&p.getNextSibling()===null)){let _=p.getNextSibling();if(Lt(_)&&_.canInsertTextBefore()&&!zf(_)||(_=Ii(),_.setFormat(i),_.setStyle(s),v.canInsertTextAfter()?p.insertAfter(_):v.insertAfter(_)),_.select(0,0),p=_,t!=="")return void this.insertText(t)}else if(this.isCollapsed()&&c===0&&(zf(p)||!p.canInsertTextBefore()||!v.canInsertTextBefore()&&p.getPreviousSibling()===null)){let _=p.getPreviousSibling();if(Lt(_)&&!zf(_)||(_=Ii(),_.setFormat(i),v.canInsertTextBefore()?p.insertBefore(_):v.insertBefore(_)),_.select(),p=_,t!=="")return void this.insertText(t)}else if(p.isSegmented()&&c!==g){const _=Ii(p.getTextContent());_.setFormat(i),p.replace(_),p=_}else if(!this.isCollapsed()&&t!==""){const _=x.getParent();if(!v.canInsertTextBefore()||!v.canInsertTextAfter()||rt(_)&&(!_.canInsertTextBefore()||!_.canInsertTextAfter()))return this.insertText(""),Hpe(this.anchor,this.focus,null),void this.insertText(t)}if(h===1){if(d0(p)){const E=Ii(t);return E.select(),void p.replace(E)}const _=p.getFormat(),w=p.getStyle();if(c!==u||_===i&&w===s){if(U5(p)){const E=Ii(t);return E.setFormat(i),E.setStyle(s),E.select(),void p.replace(E)}}else{if(p.getTextContent()!==""){const E=Ii(t);if(E.setFormat(i),E.setStyle(s),E.select(),c===0)p.insertBefore(E,!1);else{const[T]=p.splitText(c);T.insertAfter(E,!1)}return void(E.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length))}p.setFormat(i),p.setStyle(s)}const S=u-c;p=p.spliceText(c,S,t,!0),p.getTextContent()===""?p.remove():this.anchor.type==="text"&&(p.isComposing()?this.anchor.offset-=t.length:(this.format=_,this.style=w))}else{const _=new Set([...p.getParentKeys(),...x.getParentKeys()]),w=rt(p)?p:p.getParentOrThrow();let S=rt(x)?x:x.getParentOrThrow(),E=x;if(!w.is(S)&&S.isInline())do E=S,S=S.getParentOrThrow();while(S.isInline());if(o.type==="text"&&(u!==0||x.getTextContent()==="")||o.type==="element"&&x.getIndexWithinParent()<u)if(Lt(x)&&!d0(x)&&u!==x.getTextContentSize()){if(x.isSegmented()){const j=Ii(x.getTextContent());x.replace(j),x=j}Zs(o.getNode())||o.type!=="text"||(x=x.spliceText(0,u,"")),_.add(x.__key)}else{const j=x.getParentOrThrow();j.canBeEmpty()||j.getChildrenSize()!==1?x.remove():j.remove()}else _.add(x.__key);const T=S.getChildren(),N=new Set(d),A=w.is(S),k=w.isInline()&&p.getNextSibling()===null?w:p;for(let j=T.length-1;j>=0;j--){const R=T[j];if(R.is(p)||rt(R)&&R.isParentOf(p))break;R.isAttached()&&(!N.has(R)||R.is(E)?A||k.insertAfter(R,!1):R.remove())}if(!A){let j=S,R=null;for(;j!==null;){const P=j.getChildren(),V=P.length;(V===0||P[V-1].is(R))&&(_.delete(j.__key),R=j),j=j.getParent()}}if(d0(p))if(c===g)p.select();else{const j=Ii(t);j.select(),p.replace(j)}else p=p.spliceText(c,g-c,t,!0),p.getTextContent()===""?p.remove():p.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length);for(let j=1;j<h;j++){const R=d[j],P=R.__key;_.has(P)||R.remove()}}}removeText(){const t=Pt()===this;kk(this,IYe(_Q(this))),t&&Pt()!==this&&As(this)}formatText(t,n=null){if(this.isCollapsed())return this.toggleFormat(t),void qa(null);const r=this.getNodes(),i=[];for(const T of r)Lt(T)&&i.push(T);const s=T=>{r.forEach((N=>{if(rt(N)){const A=N.getFormatFlags(t,T);N.setTextFormat(A)}}))},a=i.length;if(a===0)return this.toggleFormat(t),qa(null),void s(n);const o=this.anchor,c=this.focus,u=this.isBackward(),d=u?c:o,h=u?o:c;let p=0,g=i[0],v=d.type==="element"?0:d.offset;if(d.type==="text"&&v===g.getTextContentSize()&&(p=1,g=i[1],v=0),g==null)return;const x=g.getFormatFlags(t,n);s(x);const _=a-1;let w=i[_];const S=h.type==="text"?h.offset:w.getTextContentSize();if(g.is(w)){if(v===S)return;if(zf(g)||v===0&&S===g.getTextContentSize())g.setFormat(x);else{const T=g.splitText(v,S),N=v===0?T[0]:T[1];N.setFormat(x),d.type==="text"&&d.set(N.__key,0,"text"),h.type==="text"&&h.set(N.__key,S-v,"text")}return void(this.format=x)}v===0||zf(g)||([,g]=g.splitText(v),v=0),g.setFormat(x);const E=w.getFormatFlags(t,x);S>0&&(S===w.getTextContentSize()||zf(w)||([w]=w.splitText(S)),w.setFormat(E));for(let T=p+1;T<_;T++){const N=i[T],A=N.getFormatFlags(t,E);N.setFormat(A)}d.type==="text"&&d.set(g.__key,v,"text"),h.type==="text"&&h.set(w.__key,S,"text"),this.format=x|E}insertNodes(t){if(t.length===0)return;if(this.isCollapsed()||this.removeText(),this.anchor.key==="root"){this.insertParagraph();const v=Pt();
845return _t(v)||jt(134),v.insertNodes(t)}const n=(this.isBackward()?this.focus:this.anchor).getNode(),r=RP(n,Tc),i=t[t.length-1];if(rt(r)&&"__language"in r){if("__language"in t[0])this.insertText(t[0].getTextContent());else{const v=AP(this);r.splice(v,0,t),i.selectEnd()}return}if(!t.some((v=>(rt(v)||Br(v))&&!v.isInline()))){rt(r)||jt(211,n.constructor.name,n.getType());const v=AP(this);return r.splice(v,0,t),void i.selectEnd()}const s=(function(v){const x=Ur();let _=null;for(let w=0;w<v.length;w++){const S=v[w],E=Eu(S);if(E||Br(S)&&S.isInline()||rt(S)&&S.isInline()||Lt(S)||S.isParentRequired()){if(_===null&&(_=S.createParentElementNode(),x.append(_),E))continue;_!==null&&_.append(S)}else x.append(S),_=null}return x})(t),a=s.getLastDescendant(),o=s.getChildren(),c=!rt(r)||!r.isEmpty()?this.insertParagraph():null,u=o[o.length-1];let d=o[0];var h;rt(h=d)&&Tc(h)&&!h.isEmpty()&&rt(r)&&(!r.isEmpty()||r.canMergeWhenEmpty())&&(rt(r)||jt(211,n.constructor.name,n.getType()),r.append(...d.getChildren()),d=o[1]),d&&(r===null&&jt(212,n.constructor.name,n.getType()),(function(v,x,_){const w=x.getParentOrThrow().getLastChild();let S=x;const E=[x];for(;S!==w;)S.getNextSibling()||jt(140),S=S.getNextSibling(),E.push(S);let T=v;for(const N of E)T=T.insertAfter(N)})(r,d));const p=RP(a,Tc);c&&rt(p)&&(c.canMergeWhenEmpty()||Tc(u))&&(p.append(...c.getChildren()),c.remove()),rt(r)&&r.isEmpty()&&r.remove(),a.selectEnd();const g=rt(r)?r.getLastChild():null;Eu(g)&&p!==r&&g.remove()}insertParagraph(){if(this.anchor.key==="root"){const a=Ur();return Qr().splice(this.anchor.offset,0,[a]),a.select(),a}const t=AP(this),n=RP(this.anchor.getNode(),Tc);rt(n)||jt(213);const r=n.getChildAtIndex(t),i=r?[r,...r.getNextSiblings()]:[],s=n.insertNewAfter(this,!1);return s?(s.append(...i),s.selectStart(),s):null}insertLineBreak(t){const n=zu();if(this.insertNodes([n]),t){const r=n.getParentOrThrow(),i=n.getIndexWithinParent();r.select(i,i)}}extract(){const t=this.getNodes(),n=t.length,r=n-1,i=this.anchor,s=this.focus;let a=t[0],o=t[r];const[c,u]=L8(this);if(n===0)return[];if(n===1){if(Lt(a)&&!this.isCollapsed()){const h=c>u?u:c,p=c>u?c:u,g=a.splitText(h,p),v=h===0?g[0]:g[1];return v!=null?[v]:[]}return[a]}const d=i.isBefore(s);if(Lt(a)){const h=d?c:u;h===a.getTextContentSize()?t.shift():h!==0&&([,a]=a.splitText(h),t[0]=a)}if(Lt(o)){const h=o.getTextContent().length,p=d?u:c;p===0?t.pop():p!==h&&([o]=o.splitText(p),t[r]=o)}return t}modify(t,n,r){if(nQ(this,t,n,r))return;const i=t==="move",s=ms(),a=$u(Fc(s));if(!a)return;const o=s._blockCursorElement,c=s._rootElement,u=this.focus.getNode();if(c===null||o===null||!rt(u)||u.isInline()||u.canBeEmpty()||V8(o,s,c),this.dirty){let d=H0(s,this.anchor.key),h=H0(s,this.focus.key);this.anchor.type==="text"&&(d=gy(d)),this.focus.type==="text"&&(h=gy(h)),d&&h&&Gpe(a,d,this.anchor.offset,h,this.focus.offset)}if((function(d,h,p,g){d.modify(h,p,g)})(a,t,n?"backward":"forward",r),a.rangeCount>0){const d=a.getRangeAt(0),h=this.anchor.getNode(),p=Zs(h)?h:vYe(h);if(this.applyDOMRange(d),this.dirty=!0,!i){const g=this.getNodes(),v=[];let x=!1;for(let _=0;_<g.length;_++){const w=g[_];U8(w,p)?v.push(w):x=!0}if(x&&v.length>0)if(n){const _=v[0];rt(_)?_.selectStart():_.getParentOrThrow().selectStart()}else{const _=v[v.length-1];rt(_)?_.selectEnd():_.getParentOrThrow().selectEnd()}a.anchorNode===d.startContainer&&a.anchorOffset===d.startOffset||(function(_){const w=_.focus,S=_.anchor,E=S.key,T=S.offset,N=S.type;S.set(w.key,w.offset,w.type,!0),w.set(E,T,N,!0)})(this)}}r==="lineboundary"&&nQ(this,t,n,r,"decorators")}forwardDeletion(t,n,r){if(!r&&(t.type==="element"&&rt(n)&&t.offset===n.getChildrenSize()||t.type==="text"&&t.offset===n.getTextContentSize())){const i=n.getParent(),s=n.getNextSibling()||(i===null?null:i.getNextSibling());if(rt(s)&&s.isShadowRoot())return!0}return!1}deleteCharacter(t){const n=this.isCollapsed();if(this.isCollapsed()){const r=this.anchor;let i=r.getNode();if(this.forwardDeletion(r,i,t))return;const s=$z(Gd(r,t?"previous":"next"));if(s.getTextSlices().every((o=>o===null||o.distance===0))){let o={type:"initial"};
845for(const c of s.iterNodeCarets("shadowRoot"))if(Ic(c)){if(!c.origin.isInline()){if(c.origin.isShadowRoot()){if(o.type==="merge-block")break;if(rt(s.anchor.origin)&&s.anchor.origin.isEmpty()){const u=Wl(c);kk(this,bm(u,u)),s.anchor.origin.remove()}return}o.type!=="merge-next-block"&&o.type!=="merge-block"||(o={block:o.block,caret:c,type:"merge-block"})}}else{if(o.type==="merge-block")break;if(xy(c)){if(rt(c.origin)){if(c.origin.isInline()){if(!c.origin.isParentOf(s.anchor.origin))break}else o={block:c.origin,type:"merge-next-block"};continue}if(Br(c.origin)){if(!c.origin.isIsolated())if(o.type==="merge-next-block"&&(c.origin.isKeyboardSelectable()||!c.origin.isInline())&&rt(s.anchor.origin)&&s.anchor.origin.isEmpty()){s.anchor.origin.remove();const u=_z();u.add(c.origin.getKey()),As(u)}else c.origin.remove();return}break}}if(o.type==="merge-block"){const{caret:c,block:u}=o;return kk(this,bm(!c.origin.isEmpty()&&u.isEmpty()?FE(ta(u,c.direction)):s.anchor,c)),this.removeText()}}const a=this.focus;if(this.modify("extend",t,"character"),this.isCollapsed()){if(t&&r.offset===0&&XX(this,r.getNode()))return}else{const o=a.type==="text"?a.getNode():null;if(i=r.type==="text"?r.getNode():null,o!==null&&o.isSegmented()){const c=a.offset,u=o.getTextContentSize();if(o.is(i)||t&&c!==u||!t&&c!==0)return void QX(o,t,c)}else if(i!==null&&i.isSegmented()){const c=r.offset,u=i.getTextContentSize();if(i.is(o)||t&&c!==0||!t&&c!==u)return void QX(i,t,c)}(function(c,u){const d=c.anchor,h=c.focus,p=d.getNode(),g=h.getNode();if(p===g&&d.type==="text"&&h.type==="text"){const v=d.offset,x=h.offset,_=v<x,w=_?v:x,S=_?x:v,E=S-1;w!==E&&(function(T){return!(lme(T)||tYe(T))})(p.getTextContent().slice(w,S))&&(u?h.set(h.key,E,h.type):d.set(d.key,E,d.type))}})(this,t)}}if(this.removeText(),t&&!n&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const r=this.anchor.getNode();r.isEmpty()&&Zs(r.getParent())&&r.getPreviousSibling()===null&&XX(this,r)}}deleteLine(t){this.isCollapsed()&&this.modify("extend",t,"lineboundary"),this.isCollapsed()?this.deleteCharacter(t):this.removeText()}deleteWord(t){if(this.isCollapsed()){const n=this.anchor,r=n.getNode();if(this.forwardDeletion(n,r,t))return;this.modify("extend",t,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function ss(e){return e instanceof V5}function YX(e){const t=e.offset;if(e.type==="text")return t;const n=e.getNode();return t===n.getChildrenSize()?n.getTextContent().length:0}function L8(e){const t=e.getStartEndPoints();if(t===null)return[0,0];const[n,r]=t;return n.type==="element"&&r.type==="element"&&n.key===r.key&&n.offset===r.offset?[0,0]:[YX(n),YX(r)]}function XX(e,t){for(let n=t;n;n=n.getParent()){if(rt(n)){if(n.collapseAtStart(e))return!0;if(ea(n))break}if(n.getPreviousSibling())break}return!1}const tYe=(()=>{try{const e=new RegExp("\\p{Emoji}","u"),t=e.test.bind(e);if(t("â¤ï¸")&&t("#ï¸â£")&&t("ð"))return t}catch{}return()=>!1})();function QX(e,t,n){const r=e,i=r.getTextContent().split(/(?=\s)/g),s=i.length;let a=0,o=0;for(let u=0;u<s;u++){const d=u===s-1;if(o=a,a+=i[u].length,t&&a===n||a>n||d){i.splice(u,1),d&&(o=void 0);break}}const c=i.join("").trim();c===""?r.remove():(r.setTextContent(c),r.select(o,o))}function ZX(e,t,n,r){let i,s=t;if(rs(e)){let a=!1;const o=e.childNodes,c=o.length,u=r._blockCursorElement;s===c&&(a=!0,s=c-1);let d=o[s],h=!1;if(d===u)d=o[s+1],h=!0;else if(u!==null){const p=u.parentNode;e===p&&t>Array.prototype.indexOf.call(p.children,u)&&s--}if(i=a1(d),Lt(i))s=Od(i,a?"next":"previous");else{let p=a1(e);if(p===null)return null;if(rt(p)){const g=r.getElementByKey(p.getKey());g===null&&jt(214),[p,s]=p.getDOMSlot(g).resolveChildIndex(p,g,e,t),rt(p)||jt(215),a&&s>=p.getChildrenSize()&&(s=Math.max(0,p.getChildrenSize()-1));let x=p.getChildAtIndex(s);if(rt(x)&&(function(_,w,S){const E=_.getParent();return S===null||E===null||!E.canBeEmpty()||E!==S.getNode()})(x,0,n)){const _=a?x.getLastDescendant():x.getFirstDescendant();_===null?p=x:(x=_,p=rt(x)?x:x.getParentOrThrow()),s=0}Lt(x)?(i=x,p=null,s=Od(x,a?"next":"previous")):x!==p&&a&&!h&&(rt(p)||jt(216),s=Math.min(p.getChildrenSize(),s+1))}else{const g=p.getIndexWithinParent();s=t===0&&Br(p)&&a1(e)===p?g:g+1,p=p.getParentOrThrow()}if(rt(p))return qd(p.__key,s,"element")}}else i=a1(e);return Lt(i)?qd(i.__key,Od(i,s,"clamp"),"text"):null}function JX(e,t,n){const r=e.offset,i=e.getNode();if(r===0){const s=i.getPreviousSibling(),a=i.getParent();if(t){if((n||!t)&&s===null&&rt(a)&&a.isInline()){const o=a.getPreviousSibling();Lt(o)&&e.set(o.__key,o.getTextContent().length,"text")}}else rt(s)&&!n&&s.isInline()?e.set(s.__key,s.getChildrenSize(),"element"):Lt(s)&&e.set(s.__key,s.getTextContent().length,"text")}else if(r===i.getTextContent().length){const s=i.getNextSibling(),a=i.getParent();if(t&&rt(s)&&s.isInline())e.set(s.__key,0,"element");else if((n||t)&&s===null&&rt(a)&&a.isInline()&&!a.canInsertTextAfter()){const o=a.getNextSibling();Lt(o)&&e.set(o.__key,0,"text")}}}function Hpe(e,t,n){if(e.type==="text"&&t.type==="text"){const r=e.isBefore(t),i=e.is(t);
845JX(e,r,i),JX(t,!r,i),i&&t.set(e.key,e.offset,e.type);const s=ms();if(s.isComposing()&&s._compositionKey!==e.key&&_t(n)){const a=n.anchor,o=n.focus;e.set(a.key,a.offset,a.type,!0),t.set(o.key,o.offset,o.type,!0)}}}function qpe(e,t,n,r,i,s){if(e===null||n===null||!ME(i,e,n))return null;const a=ZX(e,t,_t(s)?s.anchor:null,i);if(a===null)return null;const o=ZX(n,r,_t(s)?s.focus:null,i);if(o===null)return null;if(a.type==="element"&&o.type==="element"){const c=a1(e),u=a1(n);if(Br(c)&&Br(u))return null}return Hpe(a,o,s),[a,o]}function l3(e){return rt(e)&&!e.isInline()}function Wpe(e,t,n,r,i,s){const a=Hm(),o=new mx(qd(e,t,i),qd(n,r,s),0,"");return o.dirty=!0,a._selection=o,o}function Gy(){const e=qd("root",0,"element"),t=qd("root",0,"element");return new mx(e,t,0,"")}function _z(){return new V5(new Set)}function wz(e,t,n,r){const i=n._window;if(i===null)return null;const s=r||i.event,a=s?s.type:void 0,o=a==="selectionchange",c=!_8&&(o||a==="beforeinput"||a==="compositionstart"||a==="compositionend"||a==="click"&&s&&s.detail===3||a==="drop"||a===void 0);let u,d,h,p;if(_t(e)&&!c)return e.clone();if(t===null)return null;if(u=t.anchorNode,d=t.focusNode,h=t.anchorOffset,p=t.focusOffset,o&&_t(e)&&!ME(n,u,d))return e.clone();const g=qpe(u,h,d,p,n,e);if(g===null)return null;const[v,x]=g;return new mx(v,x,_t(e)?e.format:0,_t(e)?e.style:"")}function Pt(){return Hm()._selection}function gx(){return ms()._editorState._selection}function c3(e,t,n,r=1){const i=e.anchor,s=e.focus,a=i.getNode(),o=s.getNode();if(!t.is(a)&&!t.is(o))return;const c=t.__key;if(e.isCollapsed()){const u=i.offset;if(n<=u&&r>0||n<u&&r<0){const d=Math.max(0,u+r);i.set(c,d,"element"),s.set(c,d,"element"),eQ(e)}}else{const u=e.isBackward(),d=u?s:i,h=d.getNode(),p=u?i:s,g=p.getNode();if(t.is(h)){const v=d.offset;(n<=v&&r>0||n<v&&r<0)&&d.set(c,Math.max(0,v+r),"element")}if(t.is(g)){const v=p.offset;(n<=v&&r>0||n<v&&r<0)&&p.set(c,Math.max(0,v+r),"element")}}eQ(e)}function eQ(e){const t=e.anchor,n=t.offset,r=e.focus,i=r.offset,s=t.getNode(),a=r.getNode();if(e.isCollapsed()){if(!rt(s))return;const o=s.getChildrenSize(),c=n>=o,u=c?s.getChildAtIndex(o-1):s.getChildAtIndex(n);if(Lt(u)){let d=0;c&&(d=u.getTextContentSize()),t.set(u.__key,d,"text"),r.set(u.__key,d,"text")}}else{if(rt(s)){const o=s.getChildrenSize(),c=n>=o,u=c?s.getChildAtIndex(o-1):s.getChildAtIndex(n);if(Lt(u)){let d=0;c&&(d=u.getTextContentSize()),t.set(u.__key,d,"text")}}if(rt(a)){const o=a.getChildrenSize(),c=i>=o,u=c?a.getChildAtIndex(o-1):a.getChildAtIndex(i);if(Lt(u)){let d=0;c&&(d=u.getTextContentSize()),r.set(u.__key,d,"text")}}}}function u3(e,t,n,r,i){let s=null,a=0,o=null;r!==null?(s=r.__key,Lt(r)?(a=r.getTextContentSize(),o="text"):rt(r)&&(a=r.getChildrenSize(),o="element")):i!==null&&(s=i.__key,Lt(i)?o="text":rt(i)&&(o="element")),s!==null&&o!==null?e.set(s,a,o):(a=t.getIndexWithinParent(),a===-1&&(a=n.getChildrenSize()),e.set(n.__key,a,"element"))}function tQ(e,t,n,r,i){e.type==="text"?e.set(n,e.offset+(t?0:i),"text"):e.offset>r.getIndexWithinParent()&&e.set(e.key,e.offset-1,"element")}function Gpe(e,t,n,r,i){try{e.setBaseAndExtent(t,n,r,i)}catch{}}function nYe(e,t,n,r,i,s,a){const o=r.anchorNode,c=r.focusNode,u=r.anchorOffset,d=r.focusOffset,h=document.activeElement;if(i.has(Jpe)&&h!==s||h!==null&&Az(h))return;if(!_t(t))return void(e!==null&&ME(n,o,c)&&r.removeAllRanges());const p=t.anchor,g=t.focus,v=p.key,x=g.key,_=H0(n,v),w=H0(n,x),S=p.offset,E=g.offset,T=t.format,N=t.style,A=t.isCollapsed();let k=_,j=w,R=!1;if(p.type==="text"){k=gy(_);const Z=p.getNode();R=Z.getFormat()!==T||Z.getStyle()!==N}else _t(e)&&e.anchor.type==="text"&&(R=!0);var P,V,U,G,Q;if(g.type==="text"&&(j=gy(w)),k!==null&&j!==null&&(A&&(e===null||R||_t(e)&&(e.format!==T||e.style!==N))&&(P=T,V=N,U=S,G=v,Q=performance.now(),Dpe=[P,V,U,G,Q]),u!==S||d!==E||o!==k||c!==j||r.type==="Range"&&A||(h!==null&&s.contains(h)||s.focus({preventScroll:!0}),p.type==="element"))){if(Gpe(r,k,S,j,E),!i.has(lYe)&&t.isCollapsed()&&s!==null&&s===document.activeElement){const Z=_t(t)&&t.anchor.type==="element"?k.childNodes[S]||null:r.rangeCount>0?r.getRangeAt(0):null;if(Z!==null){let K;if(Z instanceof Text){const te=document.createRange();te.selectNode(Z),K=te.getBoundingClientRect()}else K=Z.getBoundingClientRect();(function(te,ne,se){const H=fme(se),O=Pz(H);if(H===null||O===null)return;let{top:L,bottom:M}=ne,q=0,X=0,J=se;for(;J!==null;){const W=J===H.body;if(W)q=0,X=Fc(te).innerHeight;else{const ae=J.getBoundingClientRect();q=ae.top,X=ae.bottom}let re=0;if(L<q?re=-(q-L):M>X&&(re=M-X),re!==0)if(W)O.scrollBy(0,re);else{const ae=J.scrollTop;J.scrollTop+=re;const ce=J.scrollTop-ae;L-=ce,M-=ce}if(W)break;J=DE(J)}})(n,K,s)}}M8=!0}}function Ky(e){let t=Pt()||gx();
845t===null&&(t=Qr().selectEnd()),t.insertNodes(e)}function AP(e){let t=e;e.isCollapsed()||t.removeText();const n=Pt();_t(n)&&(t=n),_t(t)||jt(161);const r=t.anchor;let i=r.getNode(),s=r.offset;for(;!Tc(i);){const a=i;if([i,s]=rYe(i,s),a.is(i))break}return s}function rYe(e,t){const n=e.getParent();if(!n){const i=Ur();return Qr().append(i),i.select(),[Qr(),0]}if(Lt(e)){const i=e.splitText(t);if(i.length===0)return[n,e.getIndexWithinParent()];const s=t===0?0:1;return[n,i[0].getIndexWithinParent()+s]}if(!rt(e)||t===0)return[n,e.getIndexWithinParent()];const r=e.getChildAtIndex(t);if(r){const i=new mx(qd(e.__key,t,"element"),qd(e.__key,t,"element"),0,""),s=e.insertNewAfter(i);s&&s.append(r,...r.getNextSiblings())}return[n,e.getIndexWithinParent()+1]}function nQ(e,t,n,r,i="decorators-and-blocks"){if(t==="move"&&r==="character"&&!e.isCollapsed()){const[d,h]=n===e.isBackward()?[e.focus,e.anchor]:[e.anchor,e.focus];return h.set(d.key,d.offset,d.type),!0}const s=Gd(e.focus,n?"previous":"next"),a=r==="lineboundary",o=t==="move";let c=s,u=i==="decorators-and-blocks";if(!yme(c)){for(const d of c){u=!1;const{origin:h}=d;if(!Br(h)||h.isIsolated()||(c=d,!a||!h.isInline()))break}if(u)for(const d of $z(s).iterNodeCarets(t==="extend"?"shadowRoot":"root")){if(Ic(d))d.origin.isInline()||(c=d);else{if(rt(d.origin))continue;Br(d.origin)&&!d.origin.isInline()&&(c=d)}break}}if(c===s)return!1;if(o&&!a&&Br(c.origin)&&c.origin.isKeyboardSelectable()){const d=_z();return d.add(c.origin.getKey()),As(d),!0}return c=Wl(c),o&&K0(e.anchor,c),K0(e.focus,c),u||!a}let Sa=null,Ea=null,fl=!1,kP=!1,Ck=0;const rQ={characterData:!0,childList:!0,subtree:!0};function OE(){return fl||Sa!==null&&Sa._readOnly}function Ha(){fl&&jt(13)}function Kpe(){Ck>99&&jt(14)}function Hm(){return Sa===null&&jt(195,Ype()),Sa}function ms(){return Ea===null&&jt(196,Ype()),Ea}function Ype(){let e=0;const t=new Set,n=G5.version;if(typeof window<"u")for(const i of document.querySelectorAll("[contenteditable]")){const s=Y5(i);if(kz(s))e++;else if(s){let a=String(s.constructor.version||"<0.17.1");a===n&&(a+=" (separately built, likely a bundler configuration issue)"),t.add(a)}}let r=` Detected on the page: ${e} compatible editor(s) with version ${n}`;return t.size&&(r+=` and incompatible editors with versions ${Array.from(t).join(", ")}`),r}function iYe(){return Ea}function iQ(e,t,n){const r=t.__type,i=nme(e,r);let s=n.get(r);s===void 0&&(s=Array.from(i.transforms),n.set(r,s));const a=s.length;for(let o=0;o<a&&(s[o](t),t.isAttached());o++);}function sQ(e,t){return e!==void 0&&e.__key!==t&&e.isAttached()}function Xpe(e,t){if(!t)return;const n=e._updateTags;let r=t;Array.isArray(t)||(r=[t]);for(const i of r)n.add(i)}function sYe(e){return Sz(e,ms()._nodes)}function Sz(e,t){const n=e.type,r=t.get(n);r===void 0&&jt(17,n);const i=r.klass;e.type!==i.getType()&&jt(18,i.name);const s=i.importJSON(e),a=e.children;if(rt(s)&&Array.isArray(a))for(let o=0;o<a.length;o++){const c=Sz(a[o],t);s.append(c)}return s}function aQ(e,t,n){const r=Sa,i=fl,s=Ea;Sa=t,fl=!0,Ea=e;try{return n()}finally{Sa=r,fl=i,Ea=s}}function Gf(e,t){const n=e._pendingEditorState,r=e._rootElement,i=e._headless||r===null;if(n===null)return;const s=e._editorState,a=s._selection,o=n._selection,c=e._dirtyType!==z0,u=Sa,d=fl,h=Ea,p=e._updating,g=e._observer;let v=null;if(e._pendingEditorState=null,e._editorState=n,!i&&c&&g!==null){Ea=e,Sa=n,fl=!1,e._updating=!0;try{const A=e._dirtyType,k=e._dirtyElements,j=e._dirtyLeaves;g.disconnect(),v=zKe(s,n,e,A,k,j)}catch(A){if(A instanceof Error&&e._onError(A),kP)throw A;return eme(e,null,r,n),Spe(e),e._dirtyType=py,kP=!0,Gf(e,s),void(kP=!1)}finally{g.observe(r,rQ),e._updating=p,Sa=u,fl=d,Ea=h}}n._readOnly||(n._readOnly=!0);const x=e._dirtyLeaves,_=e._dirtyElements,w=e._normalizedNodes,S=e._updateTags,E=e._deferred;c&&(e._dirtyType=z0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set,e._updateTags=new Set),(function(A,k){const j=A._decorators;let R=A._pendingDecorators||j;const P=k._nodeMap;let V;for(V in R)P.has(V)||(R===j&&(R=ame(A)),delete R[V])})(e,n);const T=i?null:$u(Fc(e));if(e._editable&&T!==null&&(c||o===null||o.dirty)&&r!==null&&!S.has(cYe)){Ea=e,Sa=n;try{if(g!==null&&g.disconnect(),c||o===null||o.dirty){const A=e._blockCursorElement;A!==null&&V8(A,e,r),nYe(a,o,e,T,S,r)}(function(A,k,j){let R=A._blockCursorElement;if(_t(j)&&j.isCollapsed()&&j.anchor.type==="element"&&k.contains(document.activeElement)){const P=j.anchor,V=P.getNode(),U=P.offset;let G=!1,Q=null;if(U===V.getChildrenSize())jP(V.getChildAtIndex(U-1))&&(G=!0);else{const Z=V.getChildAtIndex(U);if(Z!==null&&jP(Z)){const K=Z.getPreviousSibling();(K===null||jP(K))&&(G=!0,Q=A.getElementByKey(Z.__key))}}if(G){const Z=A.getElementByKey(V.__key);return R===null&&(A._blockCursorElement=R=(function(K){const te=K.theme,ne=document.createElement("div");ne.contentEditable="false",ne.setAttribute("data-lexical-cursor","true");let se=te.blockCursor;if(se!==void 0){if(typeof se=="string"){const H=vpe(se);se=te.blockCursor=H}se!==void 0&&ne.classList.add(...se)}return ne})(A._config)),k.style.caretColor="transparent",void(Q===null?Z.appendChild(R):Z.insertBefore(R,Q))}}R!==null&&V8(R,A,k)})(e,r,o)}finally{g!==null&&g.observe(r,rQ),Ea=h,Sa=u}}v!==null&&(function(A,k,j,R,P){const V=Array.from(A._listeners.mutation),U=V.length;for(let G=0;G<U;G++){const[Q,Z]=V[G];for(const K of Z){const te=k.get(K);te!==void 0&&Q(te,{dirtyLeaves:R,prevEditorState:P,updateTags:j})}}})(e,v,S,x,s),_t(o)||o===null||a!==null&&a.is(o)||e.dispatchCommand(F5,void 0);const N=e._pendingDecorators;N!==null&&(e._decorators=N,e._pendingDecorators=null,Lw("decorator",e,!0,N)),(function(A,k,j){const R=dQ(k),P=dQ(j);R!==P&&Lw("textcontent",A,!0,P)})(e,t||s,n),Lw("update",e,!0,{dirtyElements:_,dirtyLeaves:x,editorState:n,mutatedNodes:v,normalizedNodes:w,prevEditorState:t||s,tags:S}),(function(A,k){if(A._deferred=[],k.length!==0){const j=A._updating;A._updating=!0;try{for(let R=0;R<k.length;R++)k[R]()}finally{A._updating=j}}})(e,E),(function(A){const k=A._updates;if(k.length!==0){const j=k.shift();if(j){const[R,P]=j;H5(A,R,P)}}})(e)}function Lw(e,t,n,...r){const i=t._updating;t._updating=n;try{const s=Array.from(t._listeners[e]);for(let a=0;a<s.length;a++)s[a].apply(null,r)}finally{t._updating=i}}function oQ(e,t){const n=e._updates;let r=t||!1;for(;n.length!==0;){const i=n.shift();if(i){const[s,a]=i,o=e._pendingEditorState;let c;a!==void 0&&(c=a.onUpdate,a.skipTransforms&&(r=!0),a.discrete&&(o===null&&jt(191),o._flushSync=!0),c&&e._deferred.push(c),Xpe(e,a.tag)),o==null?H5(e,s,a):s()}}return r}function H5(e,t,n){const r=e._updateTags;let i,s=!1,a=!1;
845n!==void 0&&(i=n.onUpdate,Xpe(e,n.tag),s=n.skipTransforms||!1,a=n.discrete||!1),i&&e._deferred.push(i);const o=e._editorState;let c=e._pendingEditorState,u=!1;(c===null||c._readOnly)&&(c=e._pendingEditorState=Qpe(c||o),u=!0),c._flushSync=a;const d=Sa,h=fl,p=Ea,g=e._updating;Sa=c,fl=!1,e._updating=!0,Ea=e;const v=e._headless||e.getRootElement()===null;Tz(null);try{u&&(v?o._selection!==null&&(c._selection=o._selection.clone()):c._selection=(function(S,E){const T=S.getEditorState()._selection,N=$u(Fc(S));return _t(T)||T==null?wz(T,N,S,E):T.clone()})(e,n&&n.event||null));const _=e._compositionKey;t(),s=oQ(e,s),(function(S,E){const T=E.getEditorState()._selection,N=S._selection;if(_t(N)){const A=N.anchor,k=N.focus;let j;if(A.type==="text"&&(j=A.getNode(),j.selectionTransform(T,N)),k.type==="text"){const R=k.getNode();j!==R&&R.selectionTransform(T,N)}}})(c,e),e._dirtyType!==z0&&(s?(function(S,E){const T=E._dirtyLeaves,N=S._nodeMap;for(const A of T){const k=N.get(A);Lt(k)&&k.isAttached()&&k.isSimpleText()&&!k.isUnmergeable()&&LX(k)}})(c,e):(function(S,E){const T=E._dirtyLeaves,N=E._dirtyElements,A=S._nodeMap,k=qp(),j=new Map;let R=T,P=R.size,V=N,U=V.size;for(;P>0||U>0;){if(P>0){E._dirtyLeaves=new Set;for(const G of R){const Q=A.get(G);Lt(Q)&&Q.isAttached()&&Q.isSimpleText()&&!Q.isUnmergeable()&&LX(Q),Q!==void 0&&sQ(Q,k)&&iQ(E,Q,j),T.add(G)}if(R=E._dirtyLeaves,P=R.size,P>0){Ck++;continue}}E._dirtyLeaves=new Set,E._dirtyElements=new Map,V.delete("root")&&V.set("root",!0);for(const G of V){const Q=G[0],Z=G[1];if(N.set(Q,Z),!Z)continue;const K=A.get(Q);K!==void 0&&sQ(K,k)&&iQ(E,K,j)}R=E._dirtyLeaves,P=R.size,V=E._dirtyElements,U=V.size,Ck++}E._dirtyLeaves=T,E._dirtyElements=N})(c,e),oQ(e),(function(S,E,T,N){const A=S._nodeMap,k=E._nodeMap,j=[];for(const[R]of N){const P=k.get(R);P!==void 0&&(P.isAttached()||(rt(P)&&bpe(P,R,A,k,j,N),A.has(R)||N.delete(R),j.push(R)))}for(const R of j)k.delete(R);for(const R of T){const P=k.get(R);P===void 0||P.isAttached()||(A.has(R)||T.delete(R),k.delete(R))}})(o,c,e._dirtyLeaves,e._dirtyElements)),_!==e._compositionKey&&(c._flushSync=!0);const w=c._selection;if(_t(w)){const S=c._nodeMap,E=w.anchor.key,T=w.focus.key;S.get(E)!==void 0&&S.get(T)!==void 0||jt(19)}else ss(w)&&w._nodes.size===0&&(c._selection=null)}catch(_){return _ instanceof Error&&e._onError(_),e._pendingEditorState=o,e._dirtyType=py,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void Gf(e)}finally{Sa=d,fl=h,Ea=p,e._updating=g,Ck=0}e._dirtyType!==z0||e._deferred.length>0||(function(_,w){const S=w.getEditorState()._selection,E=_._selection;if(E!==null){if(E.dirty||!E.is(S))return!0}else if(S!==null)return!0;return!1})(c,e)?c._flushSync?(c._flushSync=!1,Gf(e)):u&&fYe((()=>{Gf(e)})):(c._flushSync=!1,u&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function Ll(e,t,n){Ea===e&&n===void 0?t():H5(e,t,n)}class zw{constructor(t,n,r){this.element=t,this.before=n||null,this.after=r||null}withBefore(t){return new zw(this.element,t,this.after)}withAfter(t){return new zw(this.element,this.before,t)}withElement(t){return this.element===t?this:new zw(t,this.before,this.after)}insertChild(t){const n=this.before||this.getManagedLineBreak();return n!==null&&n.parentElement!==this.element&&jt(222),this.element.insertBefore(t,n),this}removeChild(t){return t.parentElement!==this.element&&jt(223),this.element.removeChild(t),this}replaceChild(t,n){return n.parentElement!==this.element&&jt(224),this.element.replaceChild(t,n),this}getFirstChild(){const t=this.after?this.after.nextSibling:this.element.firstChild;return t===this.before||t===this.getManagedLineBreak()?null:t}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(t){if(t===null)this.removeManagedLineBreak();else{const n=t==="decorator"&&(hy||sS);this.insertManagedLineBreak(n)}}removeManagedLineBreak(){const t=this.getManagedLineBreak();if(t){const n=this.element,r=t.nodeName==="IMG"?t.nextSibling:null;r&&n.removeChild(r),n.removeChild(t),n.__lexicalLineBreak=void 0}}insertManagedLineBreak(t){const n=this.getManagedLineBreak();if(n){if(t===(n.nodeName==="IMG"))return;this.removeManagedLineBreak()}
845const r=this.element,i=this.before,s=document.createElement("br");if(r.insertBefore(s,i),t){const a=document.createElement("img");a.setAttribute("data-lexical-linebreak","true"),a.style.cssText="display: inline !important; border: 0px !important; margin: 0px !important;",a.alt="",r.insertBefore(a,s),r.__lexicalLineBreak=a}else r.__lexicalLineBreak=s}getFirstChildOffset(){let t=0;for(let n=this.after;n!==null;n=n.previousSibling)t++;return t}resolveChildIndex(t,n,r,i){if(r===this.element){const c=this.getFirstChildOffset();return[t,Math.min(c+t.getChildrenSize(),Math.max(c,i))]}const s=lQ(n,r);s.push(i);const a=lQ(n,this.element);let o=t.getIndexWithinParent();for(let c=0;c<a.length;c++){const u=s[c],d=a[c];if(u===void 0||u<d)break;if(u>d){o+=1;break}}return[t.getParentOrThrow(),o]}}function lQ(e,t){const n=[];let r=t;for(;r!==e&&r!==null;r=r.parentNode){let i=0;for(let s=r.previousSibling;s!==null;s=s.previousSibling)i++;n.push(i)}return r!==e&&jt(225),n.reverse()}class gl extends qy{constructor(t){super(t),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=""}afterCloneFrom(t){super.afterCloneFrom(t),this.__key===t.__key&&(this.__first=t.__first,this.__last=t.__last,this.__size=t.__size),this.__indent=t.__indent,this.__format=t.__format,this.__style=t.__style,this.__dir=t.__dir,this.__textFormat=t.__textFormat,this.__textStyle=t.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const t=this.getFormat();return AKe[t]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const t=[];let n=this.getFirstChild();for(;n!==null;)t.push(n),n=n.getNextSibling();return t}getChildrenKeys(){const t=[];let n=this.getFirstChild();for(;n!==null;)t.push(n.__key),n=n.getNextSibling();return t}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const t=ms()._dirtyElements;return t!==null&&t.has(this.__key)}isLastChild(){const t=this.getLatest(),n=this.getParentOrThrow().getLastChild();return n!==null&&n.is(t)}getAllTextNodes(){const t=[];let n=this.getFirstChild();for(;n!==null;){if(Lt(n)&&t.push(n),rt(n)){const r=n.getAllTextNodes();t.push(...r)}n=n.getNextSibling()}return t}getFirstDescendant(){let t=this.getFirstChild();for(;rt(t);){const n=t.getFirstChild();if(n===null)break;t=n}return t}getLastDescendant(){let t=this.getLastChild();for(;rt(t);){const n=t.getLastChild();if(n===null)break;t=n}return t}getDescendantByIndex(t){const n=this.getChildren(),r=n.length;if(t>=r){const s=n[r-1];return rt(s)&&s.getLastDescendant()||s||null}const i=n[t];return rt(i)&&i.getFirstDescendant()||i||null}getFirstChild(){const t=this.getLatest().__first;return t===null?null:Zi(t)}getFirstChildOrThrow(){const t=this.getFirstChild();return t===null&&jt(45,this.__key),t}getLastChild(){const t=this.getLatest().__last;return t===null?null:Zi(t)}getLastChildOrThrow(){const t=this.getLastChild();return t===null&&jt(96,this.__key),t}getChildAtIndex(t){const n=this.getChildrenSize();let r,i;if(t<n/2){for(r=this.getFirstChild(),i=0;r!==null&&i<=t;){if(i===t)return r;r=r.getNextSibling(),i++}return null}for(r=this.getLastChild(),i=n-1;r!==null&&i>=t;){if(i===t)return r;r=r.getPreviousSibling(),i--}return null}getTextContent(){let t="";const n=this.getChildren(),r=n.length;for(let i=0;i<r;i++){const s=n[i];t+=s.getTextContent(),rt(s)&&i!==r-1&&!s.isInline()&&(t+=Ah)}return t}getTextContentSize(){let t=0;const n=this.getChildren(),r=n.length;for(let i=0;i<r;i++){const s=n[i];t+=s.getTextContentSize(),rt(s)&&i!==r-1&&!s.isInline()&&(t+=Ah.length)}return t}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(t){if(t!==""){const n=jX[t];return!!(this.getFormat()&n)}return!1}hasTextFormat(t){const n=$0[t];return!!(this.getTextFormat()&n)}getFormatFlags(t,n){return f3(this.getLatest().__textFormat,t,n)}getTextStyle(){return this.getLatest().__textStyle}select(t,n){Ha();const r=Pt();let i=t,s=n;const a=this.getChildrenSize();if(!this.canBeEmpty()){if(t===0&&n===0){const c=this.getFirstChild();if(Lt(c)||rt(c))return c.select(0,0)}else if(!(t!==void 0&&t!==a||n!==void 0&&n!==a)){const c=this.getLastChild();if(Lt(c)||rt(c))return c.select()}}i===void 0&&(i=a),s===void 0&&(s=a);const o=this.__key;return _t(r)?(r.anchor.set(o,i,"element"),r.focus.set(o,s,"element"),r.dirty=!0,r):Wpe(o,i,o,s,"element","element")}selectStart(){const t=this.getFirstDescendant();return t?t.selectStart():this.select()}selectEnd(){const t=this.getLastDescendant();return t?t.selectEnd():this.select()}clear(){const t=this.getWritable();
845return this.getChildren().forEach((n=>n.remove())),t}append(...t){return this.splice(this.getChildrenSize(),0,t)}setDirection(t){const n=this.getWritable();return n.__dir=t,n}setFormat(t){return this.getWritable().__format=t!==""?jX[t]:0,this}setStyle(t){return this.getWritable().__style=t||"",this}setTextFormat(t){const n=this.getWritable();return n.__textFormat=t,n}setTextStyle(t){const n=this.getWritable();return n.__textStyle=t,n}setIndent(t){return this.getWritable().__indent=t,this}splice(t,n,r){const i=r.length,s=this.getChildrenSize(),a=this.getWritable();t+n<=s||jt(226,String(t),String(n),String(s));const o=a.__key,c=[],u=[],d=this.getChildAtIndex(t+n);let h=null,p=s-n+i;if(t!==0)if(t===s)h=this.getLastChild();else{const v=this.getChildAtIndex(t);v!==null&&(h=v.getPreviousSibling())}if(n>0){let v=h===null?this.getFirstChild():h.getNextSibling();for(let x=0;x<n;x++){v===null&&jt(100);const _=v.getNextSibling(),w=v.__key;f0(v.getWritable()),u.push(w),v=_}}let g=h;for(let v=0;v<i;v++){const x=r[v];g!==null&&x.is(g)&&(h=g=g.getPreviousSibling());const _=x.getWritable();_.__parent===o&&p--,f0(_);const w=x.__key;if(g===null)a.__first=w,_.__prev=null;else{const S=g.getWritable();S.__next=w,_.__prev=S.__key}x.__key===o&&jt(76),_.__parent=o,c.push(w),g=x}if(t+n===s)g!==null&&(g.getWritable().__next=null,a.__last=g.__key);else if(d!==null){const v=d.getWritable();if(g!==null){const x=g.getWritable();v.__prev=g.__key,x.__next=d.__key}else v.__prev=null}if(a.__size=p,u.length){const v=Pt();if(_t(v)){const x=new Set(u),_=new Set(c),{anchor:w,focus:S}=v;cQ(w,x,_)&&u3(w,w.getNode(),this,h,d),cQ(S,x,_)&&u3(S,S.getNode(),this,h,d),p!==0||this.canBeEmpty()||ea(this)||this.remove()}}return a}getDOMSlot(t){return new zw(t)}exportDOM(t){const{element:n}=super.exportDOM(t);if(rs(n)){const r=this.getIndent();r>0&&(n.style.paddingInlineStart=40*r+"px");const i=this.getDirection();i&&(n.dir=i)}return{element:n}}exportJSON(){const t={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},n=this.getTextFormat(),r=this.getTextStyle();return n!==0&&(t.textFormat=n),r!==""&&(t.textStyle=r),t}updateFromJSON(t){return super.updateFromJSON(t).setFormat(t.format).setIndent(t.indent).setDirection(t.direction).setTextFormat(t.textFormat||0).setTextStyle(t.textStyle||"")}insertNewAfter(t,n){return null}canIndent(){return!0}collapseAtStart(t){return!1}excludeFromCopy(t){return!1}canReplaceWith(t){return!0}canInsertAfter(t){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(t){return!1}extractWithChild(t,n,r){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(t,n){const r=this.getDOMSlot(t);let i=r.getFirstChild();for(let s=this.getFirstChild();s;s=s.getNextSibling()){const a=n.getElementByKey(s.getKey());a!==null&&(i==null?(r.insertChild(a),i=a):i!==a&&r.replaceChild(a,i),i=i.nextSibling)}}}function rt(e){return e instanceof gl}function cQ(e,t,n){let r=e.getNode();for(;r;){const i=r.__key;if(t.has(i)&&!n.has(i))return!0;r=r.getParent()}return!1}class xx extends qy{decorate(t,n){jt(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Br(e){return e instanceof xx}class PE extends gl{static getType(){return"root"}static clone(){return new PE}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){jt(51)}getTextContent(){const t=this.__cachedText;return!OE()&&ms()._dirtyType!==z0||t===null?super.getTextContent():t}remove(){jt(52)}replace(t){jt(53)}insertBefore(t){jt(54)}insertAfter(t){jt(55)}updateDOM(t,n){return!1}splice(t,n,r){for(const i of r)rt(i)||Br(i)||jt(282);return super.splice(t,n,r)}static importJSON(t){return Qr().updateFromJSON(t)}collapseAtStart(){return!0}}function Zs(e){return e instanceof PE}function Qpe(e){return new q5(new Map(e._nodeMap))}function Ez(){return new q5(new Map([["root",new PE]]))}function Zpe(e){const t=e.exportJSON(),n=e.constructor;if(t.type!==n.getType()&&jt(130,n.name),rt(e)){const r=t.children;Array.isArray(r)||jt(59,n.name);const i=e.getChildren();for(let s=0;s<i.length;s++){const a=Zpe(i[s]);r.push(a)}}return t}class q5{constructor(t,n){this._nodeMap=t,this._selection=n||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(t,n){return aQ(n&&n.editor||null,this,t)}clone(t){const n=new q5(this._nodeMap,t===void 0?this._selection:t);return n._readOnly=!0,n}toJSON(){return aQ(null,this,(()=>({root:Zpe(Qr())})))}}const d3="historic",aYe="history-push",Tk="history-merge",oYe="paste",Jpe="collaboration",lYe="skip-scroll-into-view",cYe="skip-dom-selection";class Cz extends gl{static getType(){return"artificial"}createDOM(t){return document.createElement("div")}}class Yy extends gl{static getType(){return"paragraph"}static clone(t){return new Yy(t.__key)}createDOM(t){const n=document.createElement("p"),r=D1(t.theme,"paragraph");return r!==void 0&&n.classList.add(...r),n}updateDOM(t,n,r){return!1}static importDOM(){return{p:t=>({conversion:uYe,priority:0})}}exportDOM(t){const{element:n}=super.exportDOM(t);if(rs(n)){this.isEmpty()&&n.append(document.createElement("br"));const r=this.getFormatType();r&&(n.style.textAlign=r)}return{element:n}}
845static importJSON(t){return Ur().updateFromJSON(t)}exportJSON(){return{...super.exportJSON(),textFormat:this.getTextFormat(),textStyle:this.getTextStyle()}}insertNewAfter(t,n){const r=Ur();r.setTextFormat(t.format),r.setTextStyle(t.style);const i=this.getDirection();return r.setDirection(i),r.setFormat(this.getFormatType()),r.setStyle(this.getStyle()),this.insertAfter(r,n),r}collapseAtStart(){const t=this.getChildren();if(t.length===0||Lt(t[0])&&t[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function uYe(e){const t=Ur();return e.style&&(t.setFormat(e.style.textAlign),Dz(e,t)),{node:t}}function Ur(){return Jl(new Yy)}function W5(e){return e instanceof Yy}const ur=0,Pi=1,z8=3,kh=4;function eme(e,t,n,r){const i=e._keyToDOMMap;i.clear(),e._editorState=Ez(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=z0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,e._updateTags=new Set,e._updates=[],e._blockCursorElement=null;const s=e._observer;s!==null&&(s.disconnect(),e._observer=null),t!==null&&(t.textContent=""),n!==null&&(n.textContent="",i.set("root",n))}function tme(e){const t=e||{},n=iYe(),r=t.theme||{},i=e===void 0?n:t.parentEditor||null,s=t.disableEvents||!1,a=Ez(),o=t.namespace||(i!==null?i._config.namespace:cme()),c=t.editorState,u=[PE,ef,RE,IE,Yy,Cz,...t.nodes||[]],{onError:d,html:h}=t,p=t.editable===void 0||t.editable;let g;if(e===void 0&&n!==null)g=n._nodes;else{g=new Map;for(let x=0;x<u.length;x++){let _=u[x],w=null,S=null;if(typeof _!="function"){const k=_;_=k.replace,w=k.with,S=k.withKlass||null}const{ownNodeConfig:E}=J5(_),T=_.getType(),N=_.transform(),A=new Set;E&&E.$transform&&A.add(E.$transform),N!==null&&A.add(N),g.set(T,{exportDOM:h&&h.export?h.export.get(_):void 0,klass:_,replace:w,replaceWithKlass:S,sharedNodeState:w8(u[x]),transforms:A})}}const v=new G5(a,i,g,{disableEvents:s,namespace:o,theme:r},d||console.error,(function(x,_){const w=new Map,S=new Set,E=T=>{Object.keys(T).forEach((N=>{let A=w.get(N);A===void 0&&(A=[],w.set(N,A)),A.push(T[N])}))};return x.forEach((T=>{const N=T.klass.importDOM;if(N==null||S.has(N))return;S.add(N);const A=N.call(T.klass);A!==null&&E(A)})),_&&E(_),w})(g,h?h.import:void 0),p,e);return c!==void 0&&(v._pendingEditorState=c,v._dirtyType=py),v}class G5{constructor(t,n,r,i,s,a,o,c){this._createEditorArgs=c,this._parentEditor=n,this._rootElement=null,this._editorState=t,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=i,this._nodes=r,this._decorators={},this._pendingDecorators=null,this._dirtyType=z0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=cme(),this._onError=s,this._htmlConversions=a,this._editable=o,this._headless=n!==null&&n._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(t){const n=this._listeners.update;return n.add(t),()=>{n.delete(t)}}registerEditableListener(t){const n=this._listeners.editable;return n.add(t),()=>{n.delete(t)}}registerDecoratorListener(t){const n=this._listeners.decorator;return n.add(t),()=>{n.delete(t)}}registerTextContentListener(t){const n=this._listeners.textcontent;return n.add(t),()=>{n.delete(t)}}registerRootListener(t){const n=this._listeners.root;return t(this._rootElement,null),n.add(t),()=>{t(null,this._rootElement),n.delete(t)}}registerCommand(t,n,r){r===void 0&&jt(35);const i=this._commands;i.has(t)||i.set(t,[new Set,new Set,new Set,new Set,new Set]);const s=i.get(t);s===void 0&&jt(36,String(t));const a=s[r];return a.add(n),()=>{a.delete(n),s.every((o=>o.size===0))&&i.delete(t)}}registerMutationListener(t,n,r){const i=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(t)).klass,s=this._listeners.mutation;let a=s.get(n);a===void 0&&(a=new Set,s.set(n,a)),a.add(i);const o=r&&r.skipInitialization;return o!==void 0&&o||this.initializeMutationListener(n,i),()=>{a.delete(i),a.size===0&&s.delete(n)}}getRegisteredNode(t){const n=this._nodes.get(t.getType());return n===void 0&&jt(37,t.name),n}resolveRegisteredNodeAfterReplacements(t){for(;t.replaceWithKlass;)t=this.getRegisteredNode(t.replaceWithKlass);return t}initializeMutationListener(t,n){const r=this._editorState,i=vQ(r).get(n.getType());if(!i)return;const s=new Map;for(const a of i.keys())s.set(a,"created");s.size>0&&t(s,{dirtyLeaves:new Set,prevEditorState:r,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(t,n){const r=this.getRegisteredNode(t);return r.transforms.add(n),r}registerNodeTransform(t,n){const r=this.registerNodeTransformToKlass(t,n),i=[r],s=r.replaceWithKlass;if(s!=null){const a=this.registerNodeTransformToKlass(s,n);i.push(a)}return(function(a,o){const c=vQ(a.getEditorState()),u=[];for(const d of o){const h=c.get(d);h&&u.push(h)}u.length!==0&&a.update((()=>{for(const d of u)for(const h of d.keys()){const p=Zi(h);p&&p.markDirty()}}),a._pendingEditorState===null?{tag:Tk}:void 0)})(this,i.map((a=>a.klass.getType()))),()=>
845{i.forEach((a=>a.transforms.delete(n)))}}hasNode(t){return this._nodes.has(t.getType())}hasNodes(t){return t.every(this.hasNode.bind(this))}dispatchCommand(t,n){return sn(this,t,n)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(t){const n=this._rootElement;if(t!==n){const r=D1(this._config.theme,"root"),i=this._pendingEditorState||this._editorState;if(this._rootElement=t,eme(this,n,t,i),n!==null&&(this._config.disableEvents||GKe(n),r!=null&&n.classList.remove(...r)),t!==null){const s=Pz(t),a=t.style;a.userSelect="text",a.whiteSpace="pre-wrap",a.wordBreak="break-word",t.setAttribute("data-lexical-editor","true"),this._window=s,this._dirtyType=py,Spe(this),this._updateTags.add(Tk),Gf(this),this._config.disableEvents||(function(o,c){const u=o.ownerDocument,d=o3.get(u);(d===void 0||d<1)&&u.addEventListener("selectionchange",Bpe),o3.set(u,(d||0)+1),o.__lexicalEditor=c;const h=$pe(o);for(let p=0;p<P8.length;p++){const[g,v]=P8[p],x=typeof v=="function"?_=>{HX(_)||(VX(_),(c.isEditable()||g==="click")&&v(_,c))}:_=>{if(HX(_))return;VX(_);const w=c.isEditable();switch(g){case"cut":return w&&sn(c,xz,_);case"copy":return sn(c,B5,_);case"paste":return w&&sn(c,NE,_);case"dragstart":return w&&sn(c,$5,_);case"dragover":return w&&sn(c,gz,_);case"dragend":return w&&sn(c,HKe,_);case"focus":return w&&sn(c,vz,_);case"blur":return w&&sn(c,yz,_);case"drop":return w&&sn(c,mz,_)}};o.addEventListener(g,x),h.push((()=>{o.removeEventListener(g,x)}))}})(t,this),r!=null&&t.classList.add(...r)}else this._window=null,this._updateTags.add(Tk),Gf(this);Lw("root",this,!1,t,n)}}getElementByKey(t){return this._keyToDOMMap.get(t)||null}getEditorState(){return this._editorState}setEditorState(t,n){t.isEmpty()&&jt(38);let r=t;r._readOnly&&(r=Qpe(t),r._selection=t._selection?t._selection.clone():null),wpe(this);const i=this._pendingEditorState,s=this._updateTags,a=n!==void 0?n.tag:null;i===null||i.isEmpty()||(a!=null&&s.add(a),Gf(this)),this._pendingEditorState=r,this._dirtyType=py,this._dirtyElements.set("root",!1),this._compositionKey=null,a!=null&&s.add(a),this._updating||Gf(this)}parseEditorState(t,n){return(function(r,i,s){const a=Ez(),o=Sa,c=fl,u=Ea,d=i._dirtyElements,h=i._dirtyLeaves,p=i._cloneNotNeeded,g=i._dirtyType;i._dirtyElements=new Map,i._dirtyLeaves=new Set,i._cloneNotNeeded=new Set,i._dirtyType=0,Sa=a,fl=!1,Ea=i,Tz(null);try{const v=i._nodes;Sz(r.root,v),s&&s(),a._readOnly=!0}catch(v){v instanceof Error&&i._onError(v)}finally{i._dirtyElements=d,i._dirtyLeaves=h,i._cloneNotNeeded=p,i._dirtyType=g,Sa=o,fl=c,Ea=u}return a})(typeof t=="string"?JSON.parse(t):t,this,n)}read(t){return Gf(this),this.getEditorState().read(t,{editor:this})}update(t,n){(function(r,i,s){r._updating?r._updates.push([i,s]):H5(r,i,s)})(this,t,n)}focus(t,n={}){const r=this._rootElement;r!==null&&(r.setAttribute("autocapitalize","off"),Ll(this,(()=>{const i=Pt(),s=Qr();i!==null?i.dirty||As(i.clone()):s.getChildrenSize()!==0&&(n.defaultSelection==="rootStart"?s.selectStart():s.selectEnd()),gYe("focus"),xYe((()=>{r.removeAttribute("autocapitalize"),t&&t()}))})),this._pendingEditorState===null&&r.removeAttribute("autocapitalize"))}blur(){const t=this._rootElement;t!==null&&t.blur();const n=$u(this._window);n!==null&&n.removeAllRanges()}isEditable(){return this._editable}setEditable(t){this._editable!==t&&(this._editable=t,Lw("editable",this,!0,t))}toJSON(){return{editorState:this._editorState.toJSON()}}}G5.version="0.35.0+prod.esm";let $8=null;function Tz(e){$8=e}let dYe=1;function nme(e,t){const n=K5(e,t);return n===void 0&&jt(30,t),n}function K5(e,t){return e._nodes.get(t)}const fYe=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e)};function uQ(e){return Br(Wd(e))}function Az(e){const t=document.activeElement;if(!rs(t))return!1;const n=t.nodeName;return Br(Wd(e))&&(n==="INPUT"||n==="TEXTAREA"||t.contentEditable==="true"&&Y5(t)==null)}function ME(e,t,n){const r=e.getRootElement();try{return r!==null&&r.contains(t)&&r.contains(n)&&t!==null&&!Az(t)&&Nz(t)===e}catch{return!1}}function kz(e){return e instanceof G5}function Nz(e){let t=e;for(;t!=null;){const n=Y5(t);if(kz(n))return n;t=DE(t)}return null}function Y5(e){return e?e.__lexicalEditor:null}function d0(e){return U5(e)||e.isToken()}function zf(e){return d0(e)||e.isSegmented()}function qh(e){return Xy(e)&&e.nodeType===vKe}function hYe(e){return Xy(e)&&e.nodeType===yKe}function gy(e){let t=e;for(;t!=null;){if(qh(t))return t;t=t.firstChild}return null}function f3(e,t,n){const r=$0[t];if(n!==null&&(e&r)==(n&r))return e;let i=e^r;return t==="subscript"?i&=-65:t==="superscript"?i&=-33:t==="lowercase"?(i&=-513,i&=-1025):t==="uppercase"?(i&=-257,i&=-1025):t==="capitalize"&&(i&=-257,i&=-513),i}function rme(e){return Lt(e)||Eu(e)||Br(e)}function ime(e,t){const n=(function(){const a=$8;return $8=null,a})();if((t=t||n&&n.__key)!=null)return void(e.__key=t);Ha(),Kpe();const r=ms(),i=Hm(),s=""+dYe++;i._nodeMap.set(s,e),rt(e)?r._dirtyElements.set(s,!0):r._dirtyLeaves.add(s),r._cloneNotNeeded.add(s),r._dirtyType=ype,e.__key=s}function f0(e){const t=e.getParent();if(t!==null){const n=e.getWritable(),r=t.getWritable(),i=e.getPreviousSibling(),s=e.getNextSibling(),a=s!==null?s.__key:null,o=i!==null?i.__key:null,c=i!==null?i.getWritable():null,u=s!==null?s.getWritable():null;i===null&&(r.__first=a),s===null&&(r.__last=o),c!==null&&(c.__next=a),u!==null&&(u.__prev=o),n.__prev=null,n.__next=null,n.__parent=null,r.__size--}}function h3(e){Kpe();const t=e.getLatest(),n=t.__parent,r=Hm(),i=ms(),s=r._nodeMap,a=i._dirtyElements;n!==null&&(function(c,u,d){let h=c;for(;h!==null;){if(d.has(h))return;const p=u.get(h);if(p===void 0)break;d.set(h,!1),h=p.__parent}})(n,s,a);const o=t.__key;i._dirtyType=ype,rt(e)?a.set(o,!0):i._dirtyLeaves.add(o)}function qa(e){Ha();const t=ms(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,n!==null){const r=Zi(n);r!==null&&r.getWritable()}if(e!==null){const r=Zi(e);r!==null&&r.getWritable()}}}function qp(){return OE()?null:ms()._compositionKey}function Zi(e,t){const n=(t||Hm())._nodeMap.get(e);return n===void 0?null:n}function sme(e,t){const n=X5(e,ms());return n!==void 0?Zi(n,t):null}function X5(e,t){return e[`__lexicalKey_${t._key}`]}function Wd(e,t){let n=e;for(;n!=null;){const r=sme(n,t);if(r!==null)return r;n=DE(n)}return null}function ame(e){const t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}function dQ(e){return e.read((()=>Qr().getTextContent()))}function Qr(){return ome(Hm())}function ome(e){return e._nodeMap.get("root")}function As(e){Ha();const t=Hm();
845e!==null&&(e.dirty=!0,e.setCachedNodes(null)),t._selection=e}function a1(e){const t=ms(),n=(function(r,i){let s=r;for(;s!=null;){const a=X5(s,i);if(a!==void 0)return a;s=DE(s)}return null})(e,t);return n===null?e===t.getRootElement()?Zi("root"):null:Zi(n)}function lme(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function jz(e){const t=[];let n=e;for(;n!==null;)t.push(n),n=n._parentEditor;return t}function cme(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function ume(e){return qh(e)?e.nodeValue:null}function Rz(e,t,n){const r=$u(Fc(t));if(r===null)return;const i=r.anchorNode;let{anchorOffset:s,focusOffset:a}=r;if(i!==null){let o=ume(i);const c=Wd(i);if(o!==null&&Lt(c)){if(o===M5&&n){const u=n.length;o=n,s=u,a=u}o!==null&&Iz(c,o,s,a,e)}}}function Iz(e,t,n,r,i){let s=e;if(s.isAttached()&&(i||!s.isDirty())){const a=s.isComposing();let o=t;(a||i)&&t[t.length-1]===M5&&(o=t.slice(0,-1));const c=s.getTextContent();if(i||o!==c){if(o===""){if(qa(null),sS||hy||JN)s.remove();else{const x=ms();setTimeout((()=>{x.update((()=>{s.isAttached()&&s.remove()}))}),20)}return}const u=s.getParent(),d=gx(),h=s.getTextContentSize(),p=qp(),g=s.getKey();if(s.isToken()||p!==null&&g===p&&!a||_t(d)&&(u!==null&&!u.canInsertTextBefore()&&d.anchor.offset===0||d.anchor.key===e.__key&&d.anchor.offset===0&&!s.canInsertTextBefore()&&!a||d.focus.key===e.__key&&d.focus.offset===h&&!s.canInsertTextAfter()&&!a))return void s.markDirty();const v=Pt();if(!_t(v)||n===null||r===null)return void fQ(s,o,v);if(v.setTextNodeRange(s,n,s,r),s.isSegmented()){const x=Ii(s.getTextContent());s.replace(x),s=x}fQ(s,o,v)}}}function fQ(e,t,n){if(e.setTextContent(t),_t(n)){const r=e.getKey();for(const i of["anchor","focus"]){const s=n[i];s.type==="text"&&s.key===r&&(s.offset=Od(e,s.offset,"clamp"))}}}function pA(e,t,n){const r=t[n]||!1;return r==="any"||r===e[n]}function pYe(e,t){return pA(e,t,"altKey")&&pA(e,t,"ctrlKey")&&pA(e,t,"shiftKey")&&pA(e,t,"metaKey")}function ni(e,t,n){return pYe(e,n)&&e.key.toLowerCase()===t.toLowerCase()}const Mf={ctrlKey:!hd,metaKey:hd},hQ={altKey:hd,ctrlKey:!hd};function pQ(e){return e.key==="Backspace"}function mQ(e){return ni(e,"a",Mf)}function mYe(e){const t=Qr();if(_t(e)){const n=e.anchor,r=e.focus,i=n.getNode().getTopLevelElementOrThrow().getParentOrThrow();return n.set(i.getKey(),0,"element"),r.set(i.getKey(),i.getChildrenSize(),"element"),B0(e),e}{const n=t.select(0,t.getChildrenSize());return As(B0(n)),n}}function D1(e,t){e.__lexicalClassNameCache===void 0&&(e.__lexicalClassNameCache={});const n=e.__lexicalClassNameCache,r=n[t];if(r!==void 0)return r;const i=e[t];if(typeof i=="string"){const s=vpe(i);return n[t]=s,s}return i}function Oz(e,t,n,r,i){if(n.size===0)return;const s=r.__type,a=r.__key,o=t.get(s);o===void 0&&jt(33,s);const c=o.klass;let u=e.get(c);u===void 0&&(u=new Map,e.set(c,u));const d=u.get(a),h=d==="destroyed"&&i==="created";(d===void 0||h)&&u.set(a,h?"updated":i)}function gQ(e,t,n){const r=e.getParent();let i=n,s=e;return r!==null&&(t&&n===0?(i=s.getIndexWithinParent(),s=r):t||n!==s.getChildrenSize()||(i=s.getIndexWithinParent()+1,s=r)),s.getChildAtIndex(t?i-1:i)}function B8(e,t){const n=e.offset;if(e.type==="element")return gQ(e.getNode(),t,n);{const r=e.getNode();if(t&&n===0||!t&&n===r.getTextContentSize()){const i=t?r.getPreviousSibling():r.getNextSibling();return i===null?gQ(r.getParentOrThrow(),t,r.getIndexWithinParent()+(t?0:1)):i}}return null}function dme(e){const t=Fc(e).event,n=t&&t.inputType;return n==="insertFromPaste"||n==="insertFromPasteAsQuotation"}function sn(e,t,n){return(function(r,i,s){const a=jz(r);for(let o=4;o>=0;o--)for(let c=0;c<a.length;c++){const u=a[c],d=u._commands.get(i);if(d!==void 0){const h=d[o];if(h!==void 0){const p=Array.from(h),g=p.length;let v=!1;if(Ll(u,(()=>{for(let x=0;x<g;x++)if(p[x](s,r))return void(v=!0)})),v)return v}}}return!1})(e,t,n)}function Q5(e){return!Zs(e)&&!e.isLastChild()&&!e.isInline()}function H0(e,t){const n=e._keyToDOMMap.get(t);return n===void 0&&jt(75,t),n}function DE(e){const t=e.assignedSlot||e.parentElement;return H8(t)?t.host:t}function fme(e){return hYe(e)?e:rs(e)?e.ownerDocument:null}function gYe(e){Ha(),ms()._updateTags.add(e)}function xYe(e){Ha(),ms()._deferred.push(e)}function U8(e,t){let n=e.getParent();for(;n!==null;){if(n.is(t))return!0;n=n.getParent()}return!1}function Pz(e){const t=fme(e);return t?t.defaultView:null}function Fc(e){const t=e._window;return t===null&&jt(78),t}function vYe(e){let t=e.getParentOrThrow();for(;t!==null;){if(ea(t))return t;t=t.getParentOrThrow()}return t}function ea(e){return Zs(e)||rt(e)&&e.isShadowRoot()}function yYe(e){const t=e.constructor.clone(e);return ime(t,null),t.afterCloneFrom(e),t}function Jl(e){const t=ms(),n=e.getType(),r=K5(t,n);r===void 0&&jt(200,e.constructor.name,n);const{replace:i,replaceWithKlass:s}=r;if(i!==null){const a=i(e),o=a.constructor;return s!==null?a instanceof s||jt(201,s.name,s.getType(),o.name,o.getType(),e.constructor.name,n):a instanceof e.constructor&&o!==e.constructor||jt(202,o.name,o.getType(),e.constructor.name,n),a.__key===e.__key&&jt(203,e.constructor.name,n,o.name,o.getType()),a}return e}function NP(e,t){!Zs(e.getParent())||rt(t)||Br(t)||jt(99)}function bYe(e){const t=Zi(e);return t===null&&jt(63,e),t}function jP(e){return(Br(e)||rt(e)&&!e.canBeEmpty())&&!e.isInline()}function V8(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null;const r=e.parentElement;r!==null&&r.removeChild(e)}function $u(e){return Zu?(e||window).getSelection():null}function _Ye(e){const t=Pz(e);return t?t.getSelection():null}function hme(e){return rs(e)&&e.tagName==="A"}function rs(e){return Xy(e)&&e.nodeType===xKe}function Xy(e){return typeof e=="object"&&e!==null&&"nodeType"in e&&typeof e.nodeType=="number"}function H8(e){return Xy(e)&&e.nodeType===bKe}function q8(e){const t=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");
845return e.nodeName.match(t)!==null}function p3(e){const t=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return e.nodeName.match(t)!==null}function Tc(e){if(Br(e)&&!e.isInline())return!0;if(!rt(e)||ea(e))return!1;const t=e.getFirstChild(),n=t===null||Eu(t)||Lt(t)||t.isInline();return!e.isInline()&&e.canBeEmpty()!==!1&&n}function RP(e,t){let n=e;for(;n!==null&&n.getParent()!==null&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}function Z5(){return ms()}const xQ=new WeakMap,wYe=new Map;function vQ(e){if(!e._readOnly&&e.isEmpty())return wYe;e._readOnly||jt(192);let t=xQ.get(e);return t||(t=(function(n){const r=new Map;for(const[i,s]of n._nodeMap){const a=s.__type;let o=r.get(a);o||(o=new Map,r.set(a,o)),o.set(i,s)}return r})(e),xQ.set(e,t)),t}function Mz(e){const t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function Dz(e,t){const n=parseInt(e.style.paddingInlineStart,10)||0,r=Math.round(n/40);t.setIndent(r)}function SYe(e){return e.__lexicalUnmanaged===!0}function A_(e,t){return(function(n,r){return Object.prototype.hasOwnProperty.call(n,r)})(e,t)&&e[t]!==qy[t]}function J5(e){const t=RX in e.prototype?e.prototype[RX]():void 0,n=(function(a){return a===xx||a===gl||a===qy})(e),r=!n&&A_(e,"getType")?e.getType():void 0;let i,s=r;if(t)if(r)i=t[r];else for(const[a,o]of Object.entries(t))s=a,i=o;if(!n&&s&&(A_(e,"getType")||(e.getType=()=>s),A_(e,"clone")||(e.clone=a=>(Tz(a),new e)),A_(e,"importJSON")||(e.importJSON=i&&i.$importJSON||(a=>new e().updateFromJSON(a))),!A_(e,"importDOM")&&i)){const{importDOM:a}=i;a&&(e.importDOM=()=>a)}return{ownNodeConfig:i,ownNodeType:s}}function EYe(e){const t=Z5();return Ha(),new(t.resolveRegisteredNodeAfterReplacements(t.getRegisteredNode(e))).klass}const CYe={next:"previous",previous:"next"};class Fz{constructor(t){this.origin=t}[Symbol.iterator](){return mme({hasNext:xy,initial:this.getAdjacentCaret(),map:t=>t,step:t=>t.getAdjacentCaret()})}getAdjacentCaret(){return ta(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return ta(this.origin,this.direction)}remove(){const t=this.getNodeAtCaret();return t&&t.remove(),this}replaceOrInsert(t,n){const r=this.getNodeAtCaret();return t.is(this.origin)||t.is(r)||(r===null?this.insert(t):r.replace(t,n)),this}splice(t,n,r="next"){const i=r===this.direction?n:Array.from(n).reverse();let s=this;const a=this.getParentAtCaret(),o=new Map;for(let c=s.getAdjacentCaret();c!==null&&o.size<t;c=c.getAdjacentCaret()){const u=c.origin.getWritable();o.set(u.getKey(),u)}for(const c of i){if(o.size>0){const u=s.getNodeAtCaret();if(u){if(o.delete(u.getKey()),o.delete(c.getKey()),!(u.is(c)||s.origin.is(c))){const d=c.getParent();d&&d.is(a)&&c.remove(),u.replace(c)}}else u===null&&jt(263,Array.from(o).join(" "))}else s.insert(c);s=ta(c,this.direction)}for(const c of o.values())c.remove();return this}}class dS extends Fz{type="child";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:Lc(t,this.direction)}getParentCaret(t="root"){return ta(Lz(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=vx(this.direction);return ta(this.getNodeAtCaret(),t)||Lc(this.origin,t)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(t){return t instanceof dS&&this.direction===t.direction&&this.origin.is(t.origin)}isSamePointCaret(t){return this.isSameNodeCaret(t)}}const TYe={root:Zs,shadowRoot:ea};function vx(e){return CYe[e]}function Lz(e,t="root"){return TYe[t](e)?null:e}class q0 extends Fz{type="sibling";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:ta(t,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return rt(this.origin)?Lc(this.origin,this.direction):null}getParentCaret(t="root"){return ta(Lz(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=vx(this.direction);return ta(this.getNodeAtCaret(),t)||Lc(this.origin.getParentOrThrow(),t)}isSamePointCaret(t){return t instanceof q0&&this.direction===t.direction&&this.origin.is(t.origin)}isSameNodeCaret(t){return(t instanceof q0||t instanceof W0)&&this.direction===t.direction&&this.origin.is(t.origin)}}class W0 extends Fz{type="text";constructor(t,n){super(t),this.offset=n}getLatest(){const t=this.origin.getLatest();return t===this.origin?this:G0(t,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(t="root"){return ta(Lz(this.getParentAtCaret(),t),this.direction)}getFlipped(){return G0(this.origin,vx(this.direction),this.offset)}isSamePointCaret(t){return t instanceof W0&&this.direction===t.direction&&this.origin.is(t.origin)&&this.offset===t.offset}isSameNodeCaret(t){return(t instanceof q0||t instanceof W0)&&this.direction===t.direction&&this.origin.is(t.origin)}getSiblingCaret(){return ta(this.origin,this.direction)}}function Id(e){return e instanceof W0}function xy(e){return e instanceof q0}function Ic(e){return e instanceof dS}const AYe={next:class extends W0{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends W0{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},kYe={next:class extends q0{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends q0{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},NYe={next:class extends dS{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(e){return this.origin.splice(0,0,[e]),this}},previous:class extends dS{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(e){return this.origin.splice(this.origin.getChildrenSize(),0,[e]),this}}};function ta(e,t){return e?new kYe[t](e):null}
845function G0(e,t,n){return e?new AYe[t](e,Od(e,n)):null}function Od(e,t,n="error"){const r=e.getTextContentSize();let i=t==="next"?r:t==="previous"?0:t;return(i<0||i>r)&&(n!=="clamp"&&(function(s,...a){const o=new URL("https://lexical.dev/docs/error"),c=new URLSearchParams;c.append("code",s);for(const u of a)c.append("v",u);o.search=c.toString(),console.warn(`Minified Lexical warning #${s}; visit ${o.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(284,String(t),String(r),e.getKey()),i=i<0?0:r),i}function yQ(e,t){return new RYe(e,t)}function Lc(e,t){return rt(e)?new NYe[t](e):null}function jYe(e){return e&&e.getChildCaret()||e}function e4(e){return e&&jYe(e.getAdjacentCaret())}class zz{type="node-caret-range";constructor(t,n,r){this.anchor=t,this.focus=n,this.direction=r}getLatest(){const t=this.anchor.getLatest(),n=this.focus.getLatest();return t===this.anchor&&n===this.focus?this:new zz(t,n,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const t=i=>{const s=this[i].getLatest();return Id(s)?(function(a,o){const{direction:c,origin:u}=a,d=Od(u,o==="focus"?vx(c):c);return yQ(a,d-a.offset)})(s,i):null},n=t("anchor"),r=t("focus");if(n&&r){const{caret:i}=n,{caret:s}=r;if(i.isSameNodeCaret(s))return[yQ(i,s.offset-i.offset),null]}return[n,r]}iterNodeCarets(t="root"){const n=Id(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),r=this.focus.getLatest(),i=Id(r),s=a=>a.isSameNodeCaret(r)?null:e4(a)||a.getParentCaret(t);return mme({hasNext:a=>a!==null&&!(i&&r.isSameNodeCaret(a)),initial:n.isSameNodeCaret(r)?null:s(n),map:a=>a,step:s})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class RYe{type="slice";constructor(t,n){this.caret=t,this.distance=n}getSliceIndices(){const{distance:t,caret:{offset:n}}=this,r=n+t;return r<n?[r,n]:[n,r]}getTextContent(){const[t,n]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(t,n)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){const{caret:{origin:t,direction:n}}=this,[r,i]=this.getSliceIndices(),s=t.getTextContent();return G0(t.setTextContent(s.slice(0,r)+s.slice(i)),n,r)}}function $z(e){return bm(e,ta(Qr(),e.direction))}function pme(e){return bm(e,e)}function bm(e,t){return e.direction!==t.direction&&jt(265),new zz(e,t,e.direction)}function mme(e){const{initial:t,hasNext:n,step:r,map:i}=e;let s=t;return{[Symbol.iterator](){return this},next(){if(!n(s))return{done:!0,value:void 0};const a={done:!1,value:i(s)};return s=r(s),a}}}function gme(e,t){const n=Ak(e.origin,t.origin);switch(n===null&&jt(275,e.origin.getKey(),t.origin.getKey()),n.type){case"same":{const r=e.type==="text",i=t.type==="text";return r&&i?(function(s,a){return Math.sign(s-a)})(e.offset,t.offset):e.type===t.type?0:r?-1:i?1:e.type==="child"?-1:1}case"ancestor":return e.type==="child"?-1:1;case"descendant":return t.type==="child"?1:-1;case"branch":return xme(n)}}function xme(e){const{a:t,b:n}=e,r=t.__key,i=n.__key;let s=t,a=n;for(;s&&a;s=s.getNextSibling(),a=a.getNextSibling()){if(s.__key===i)return-1;if(a.__key===r)return 1}return s===null?1:-1}function mA(e,t){return t.is(e)}function bQ(e){return rt(e)?[e.getLatest(),null]:[e.getParent(),e.getLatest()]}function Ak(e,t){if(e.is(t))return{commonAncestor:e,type:"same"};const n=new Map;for(let[r,i]=bQ(e);r;i=r,r=r.getParent())n.set(r,i);for(let[r,i]=bQ(t);r;i=r,r=r.getParent()){const s=n.get(r);if(s!==void 0)return s===null?(mA(e,r)||jt(276),{commonAncestor:r,type:"ancestor"}):i===null?(mA(t,r)||jt(277),{commonAncestor:r,type:"descendant"}):((rt(s)||mA(e,s))&&(rt(i)||mA(t,i))&&r.is(s.getParent())&&r.is(i.getParent())||jt(278),{a:s,b:i,commonAncestor:r,type:"branch"})}return null}function Gd(e,t){const{type:n,key:r,offset:i}=e,s=bYe(e.key);return n==="text"?(Lt(s)||jt(266,s.getType(),r),G0(s,t,i)):(rt(s)||jt(267,s.getType(),r),OYe(s,e.offset,t))}function K0(e,t){const{origin:n,direction:r}=t,i=r==="next";Id(t)?e.set(n.getKey(),t.offset,"text"):xy(t)?Lt(n)?e.set(n.getKey(),Od(n,r),"text"):e.set(n.getParentOrThrow().getKey(),n.getIndexWithinParent()+(i?1:0),"element"):(Ic(t)&&rt(n)||jt(268),e.set(n.getKey(),i?0:n.getChildrenSize(),"element"))}function vme(e){const t=Pt(),n=_t(t)?t:Gy();return kk(n,e),As(n),n}function kk(e,t){K0(e.anchor,t.anchor),K0(e.focus,t.focus)}function _Q(e){const{anchor:t,focus:n}=e,r=Gd(t,"next"),i=Gd(n,"next"),s=gme(r,i)<=0?"next":"previous";return bm(Nh(r,s),Nh(i,s))}function FE(e){const{direction:t,origin:n}=e,r=ta(n,vx(t)).getNodeAtCaret();return r?ta(r,t):Lc(n.getParentOrThrow(),t)}function wQ(e,t="root"){const n=[e];for(let r=Ic(e)?e.getParentCaret(t):e.getSiblingCaret();r!==null;r=r.getParentCaret(t))n.push(FE(r));return n}function IP(e){return!!e&&e.origin.isAttached()}function IYe(e,t="removeEmptySlices"){if(e.isCollapsed())return e;const n="root",r="next";let i=t;
845const s=bme(e,r),a=wQ(s.anchor,n),o=wQ(s.focus.getFlipped(),n),c=new Set,u=[];for(const v of s.iterNodeCarets(n))if(Ic(v))c.add(v.origin.getKey());else if(xy(v)){const{origin:x}=v;rt(x)&&!c.has(x.getKey())||u.push(x)}for(const v of u)v.remove();for(const v of s.getTextSlices()){if(!v)continue;const{origin:x}=v.caret,_=x.getTextContentSize(),w=FE(ta(x,r)),S=x.getMode();if(Math.abs(v.distance)===_&&i==="removeEmptySlices"||S==="token"&&v.distance!==0)w.remove();else if(v.distance!==0){i="removeEmptySlices";let E=v.removeTextSlice();const T=v.caret.origin;if(S==="segmented"){const N=E.origin,A=Ii(N.getTextContent()).setStyle(N.getStyle()).setFormat(N.getFormat());w.replaceOrInsert(A),E=G0(A,r,E.offset)}T.is(a[0].origin)&&(a[0]=E),T.is(o[0].origin)&&(o[0]=E.getFlipped())}}let d,h;for(const v of a)if(IP(v)){d=Wl(v);break}for(const v of o)if(IP(v)){h=Wl(v);break}const p=(function(v,x,_){if(!v||!x)return null;const w=v.getParentAtCaret(),S=x.getParentAtCaret();if(!w||!S)return null;const E=w.getParents().reverse();E.push(w);const T=S.getParents().reverse();T.push(S);const N=Math.min(E.length,T.length);let A;for(A=0;A<N&&E[A]===T[A];A++);const k=(P,V)=>{let U;for(let G=A;G<P.length;G++){const Q=P[G];if(ea(Q))return;!U&&V(Q)&&(U=Q)}return U},j=k(E,Tc),R=j&&k(T,(P=>_.has(P.getKey())&&Tc(P)));return j&&R?[j,R]:null})(d,h,c);if(p){const[v,x]=p;Lc(v,"previous").splice(0,x.getChildren()),x.remove()}const g=[d,h,...a,...o].find(IP);if(g)return pme(Nh(Wl(g),e.direction));jt(269,JSON.stringify(a.map((v=>v.origin.__key))))}function Wl(e){const t=(function(i){let s=i;for(;Ic(s);){const a=e4(s);if(!Ic(a))break;s=a}return s})(e.getLatest()),{direction:n}=t;if(Lt(t.origin))return Id(t)?t:G0(t.origin,n,n);const r=t.getAdjacentCaret();return xy(r)&&Lt(r.origin)?G0(r.origin,n,vx(n)):t}function yme(e){return Id(e)&&e.offset!==Od(e.origin,e.direction)}function Nh(e,t){return e.direction===t?e:e.getFlipped()}function bme(e,t){return e.direction===t?e:bm(Nh(e.focus,t),Nh(e.anchor,t))}function OYe(e,t,n){let r=Lc(e,"next");for(let i=0;i<t;i++){const s=r.getAdjacentCaret();if(s===null)break;r=s}return Nh(r,n)}function PYe(e){const{origin:t,offset:n,direction:r}=e;if(n===Od(t,r))return e.getSiblingCaret();if(n===Od(t,vx(r)))return FE(e.getSiblingCaret());const[i]=t.splitText(n);return Lt(i)||jt(281),Nh(ta(i,"next"),r)}function MYe(e,t){return!0}function DYe(e,{$copyElementNode:t=yYe,$splitTextPointCaretNext:n=PYe,rootMode:r="shadowRoot",$shouldSplit:i=MYe}={}){if(Id(e))return n(e);const s=e.getParentCaret(r);if(s){const{origin:a}=s;if(Ic(e)&&(!a.canBeEmpty()||!i(a,"first")))return FE(s);const o=(function(c){const u=[];for(let d=c.getAdjacentCaret();d;d=d.getAdjacentCaret())u.push(d.origin);return u})(e);(o.length>0||a.canBeEmpty()&&i(a,"last"))&&s.insert(t(a).splice(0,0,o))}return s}function FYe(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}
845const W8=new Map;function _me(e){const t={};if(!e)return t;const n=e.split(";");for(const r of n)if(r!==""){const[i,s]=r.split(/:([^]+)/);i&&s&&(t[i.trim()]=s.trim())}return t}function SQ(e){let t=W8.get(e);return t===void 0&&(t=_me(e),W8.set(e,t)),t}function wme(e){const t=Z5().getElementByKey(e.getKey());if(t===null)return null;const n=t.ownerDocument.defaultView;return n===null?null:n.getComputedStyle(t)}function Sme(e){return wme(Zs(e)?e:e.getParentOrThrow())}function EQ(e){const t=Sme(e);return t!==null&&t.direction==="rtl"}function Eme(e,t){const n=e.getStartEndPoints();if(t.isSelected(e)&&!zf(t)&&n!==null){const[r,i]=n,s=e.isBackward(),a=r.getNode(),o=i.getNode(),c=t.is(a),u=t.is(o);if(c||u){const[d,h]=L8(e),p=a.is(o),g=t.is(s?o:a),v=t.is(s?a:o);let x,_=0;p?(_=d>h?h:d,x=d>h?d:h):g?(_=s?h:d,x=void 0):v&&(_=0,x=s?d:h),t.__text=t.__text.slice(_,x)}}return t}function CQ(e){if(e.type==="text")return e.offset===e.getNode().getTextContentSize();const t=e.getNode();return rt(t)||FYe(177),e.offset===t.getChildrenSize()}function LYe(e){const t=e.getStyle(),n=_me(t);W8.set(t,n)}function zYe(e,t){const n=e.getFormatType(),r=e.getIndent();n!==t.getFormatType()&&t.setFormat(n),r!==t.getIndent()&&t.setIndent(r)}function $Ye(e,t,n=zYe){if(e===null)return;const r=e.getStartEndPoints(),i=new Map;let s=null;if(r){const[a,o]=r;s=Gy(),s.anchor.set(a.key,a.offset,a.type),s.focus.set(o.key,o.offset,o.type);const c=OP(a.getNode(),Tc),u=OP(o.getNode(),Tc);rt(c)&&i.set(c.getKey(),c),rt(u)&&i.set(u.getKey(),u)}for(const a of e.getNodes())if(rt(a)&&Tc(a))i.set(a.getKey(),a);else if(r===null){const o=OP(a,Tc);rt(o)&&i.set(o.getKey(),o)}for(const[a,o]of i){const c=t();n(o,c),o.replace(c,!0),s&&(a===s.anchor.key&&s.anchor.set(c.getKey(),s.anchor.offset,s.anchor.type),a===s.focus.key&&s.focus.set(c.getKey(),s.focus.offset,s.focus.type))}s&&e.is(Pt())&&As(s)}function Cme(e){const t=Tme(e);return t!==null&&t.writingMode==="vertical-rl"}function Tme(e){const t=e.anchor.getNode();return rt(t)?wme(t):Sme(t)}function TQ(e,t){let n=Cme(e)?!t:t;Ame(e)&&(n=!n);const r=Gd(e.focus,n?"previous":"next");if(yme(r))return!1;for(const i of $z(r)){if(Ic(i))return!i.origin.isInline();if(!rt(i.origin)){if(Br(i.origin))return!0;break}}return!1}function BYe(e,t,n,r){e.modify(t?"extend":"move",n,r)}function Ame(e){const t=Tme(e);return t!==null&&t.direction==="rtl"}function AQ(e,t,n){const r=Ame(e);let i;i=Cme(e)||r?!n:n,BYe(e,t,i,"character")}function OP(e,t){let n=e;for(;n!==null&&n.getParent()!==null&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}function kme(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const t4=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,UYe=t4&&"documentMode"in document?document.documentMode:null,VYe=t4&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);!(!t4||!("InputEvent"in window)||UYe)&&"getTargetRanges"in new window.InputEvent("input");function Nme(...e){const t=[];for(const n of e)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))t.push(r);return t}function bl(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}const HYe=t4,qYe=VYe;function Bu(e,...t){const n=Nme(...t);n.length>0&&e.classList.add(...n)}function n4(e,...t){const n=Nme(...t);n.length>0&&e.classList.remove(...n)}function WYe(e){return e?e.getAdjacentCaret():null}function jme(e,t){let n=e;for(;n!=null;){if(n instanceof t)return n;n=n.getParent()}return null}function G8(e){const t=Cu(e,(n=>rt(n)&&!n.isInline()));return rt(t)||kme(4,e.__key),t}const Cu=(e,t)=>{let n=e;for(;n!==Qr()&&n!=null;){if(t(n))return n;n=n.getParent()}return null};function Rme(e){const t=Pt()||gx();let n;if(_t(t))n=Gd(t.focus,"next");else{if(t!=null){const a=t.getNodes(),o=a[a.length-1];o&&(n=ta(o,"next"))}n=n||Lc(Qr(),"previous").getFlipped().insert(Ur())}const r=GYe(e,n),i=e4(r),s=Ic(i)?Wl(i):r;return vme(pme(s)),e.getLatest()}function GYe(e,t,n){let r=Nh(t,"next");for(let i=r;i;i=DYe(i,n))r=i;return Id(r)&&kme(283),r.insert(e.isInline()?Ur().append(e):e),Nh(ta(e.getLatest(),"next"),t.direction)}function Bz(e,t){const n=t();return e.replace(n),n.append(e),n}function Wp(e,t){return e!==null&&Object.getPrototypeOf(e).constructor.name===t.name}function KYe(e,t){const n=[];for(let r=0;r<e.length;r++){const i=t(e[r]);i!==null&&n.push(i)}return n}let PP=!(qYe||!HYe)&&void 0;function YYe(e){let t=1;if((function(){if(PP===void 0){const n=document.createElement("div");n.style.cssText="position: absolute; opacity: 0; width: 100px; left: -1000px;",document.body.appendChild(n);const r=n.getBoundingClientRect();n.style.setProperty("zoom","2"),PP=n.getBoundingClientRect().width===r.width,document.body.removeChild(n)}return PP})())for(;e;)t*=Number(window.getComputedStyle(e).getPropertyValue("zoom")),e=e.parentElement;return t}const gA=0,K8=1,Y8=2,au=0,XYe=1,kQ=2,QYe=3,ZYe=4;function JYe(e,t,n,r,i){if(e===null||n.size===0&&r.size===0&&!i)return au;const s=t._selection,a=e._selection;if(i)return XYe;if(!(_t(s)&&_t(a)&&a.isCollapsed()&&s.isCollapsed()))return au;const o=(function(w,S,E){const T=w._nodeMap,N=[];for(const A of S){const k=T.get(A);k!==void 0&&N.push(k)}for(const[A,k]of E){if(!k)continue;const j=T.get(A);j===void 0||Zs(j)||N.push(j)}return N})(t,n,r);if(o.length===0)return au;if(o.length>
8451){const w=t._nodeMap,S=w.get(s.anchor.key),E=w.get(a.anchor.key);return S&&E&&!e._nodeMap.has(S.__key)&&Lt(S)&&S.__text.length===1&&s.anchor.offset===1?kQ:au}const c=o[0],u=e._nodeMap.get(c.__key);if(!Lt(u)||!Lt(c)||u.__mode!==c.__mode)return au;const d=u.__text,h=c.__text;if(d===h)return au;const p=s.anchor,g=a.anchor;if(p.key!==g.key||p.type!=="text")return au;const v=p.offset,x=g.offset,_=h.length-d.length;return _===1&&x===v-1?kQ:_===-1&&x===v+1?QYe:_===-1&&x===v?ZYe:au}function eXe(e,t){let n=Date.now(),r=au;return(i,s,a,o,c,u)=>{const d=Date.now();if(u.has(d3))return r=au,n=d,Y8;const h=JYe(i,s,o,c,e.isComposing()),p=(()=>{const g=a===null||a.editor===e,v=u.has(aYe);if(!v&&g&&u.has(Tk))return gA;if(i===null)return K8;const x=s._selection;return o.size>0||c.size>0?v===!1&&h!==au&&h===r&&d<n+t&&g||o.size===1&&(function(_,w,S){const E=w._nodeMap.get(_),T=S._nodeMap.get(_),N=w._selection,A=S._selection;return!(_t(N)&&_t(A)&&N.anchor.type==="element"&&N.focus.type==="element"&&A.anchor.type==="text"&&A.focus.type==="text"||!Lt(E)||!Lt(T)||E.__parent!==T.__parent)&&JSON.stringify(w.read((()=>E.exportJSON())))===JSON.stringify(S.read((()=>T.exportJSON())))})(Array.from(o)[0],i,s)?gA:K8:x!==null?gA:Y8})();return n=d,r=h,p}}function NQ(e){e.undoStack=[],e.redoStack=[],e.current=null}function tXe(e,t,n){const r=eXe(e,n);return bl(e.registerCommand(oz,(()=>((function(s,a){const o=a.redoStack,c=a.undoStack;if(c.length!==0){const u=a.current,d=c.pop();u!==null&&(o.push(u),s.dispatchCommand(cA,!0)),c.length===0&&s.dispatchCommand(uA,!1),a.current=d||null,d&&d.editor.setEditorState(d.editorState,{tag:d3})}})(e,t),!0)),ur),e.registerCommand(lz,(()=>((function(s,a){const o=a.redoStack,c=a.undoStack;if(o.length!==0){const u=a.current;u!==null&&(c.push(u),s.dispatchCommand(uA,!0));const d=o.pop();o.length===0&&s.dispatchCommand(cA,!1),a.current=d||null,d&&d.editor.setEditorState(d.editorState,{tag:d3})}})(e,t),!0)),ur),e.registerCommand(qKe,(()=>(NQ(t),!1)),ur),e.registerCommand(WKe,(()=>(NQ(t),e.dispatchCommand(cA,!1),e.dispatchCommand(uA,!1),!0)),ur),e.registerUpdateListener((({editorState:s,prevEditorState:a,dirtyLeaves:o,dirtyElements:c,tags:u})=>{const d=t.current,h=t.redoStack,p=t.undoStack,g=d===null?null:d.editorState;if(d!==null&&s===g)return;const v=r(a,s,d,o,c,u);if(v===K8)h.length!==0&&(t.redoStack=[],e.dispatchCommand(cA,!1)),d!==null&&(p.push({...d}),e.dispatchCommand(uA,!0));else if(v===Y8)return;t.current={editor:e,editorState:s}})))}function Ime(){return{current:null,redoStack:[],undoStack:[]}}function Ome({delay:e,externalHistoryState:t}){const[n]=So();return(function(r,i,s=1e3){const a=b.useMemo((()=>i||Ime()),[i]);b.useEffect((()=>tXe(r,a,s)),[s,r,a])})(n,t,e),null}function nXe(e,t){const n=t.body?t.body.childNodes:[];let r=[];const i=[];for(let s=0;s<n.length;s++){const a=n[s];if(!Mme.has(a.nodeName)){const o=Dme(a,e,i,!1);o!==null&&(r=r.concat(o))}}return(function(s){for(const a of s)a.getNextSibling()instanceof Cz&&a.insertAfter(zu());for(const a of s){const o=a.getChildren();for(const c of o)a.insertBefore(c);a.remove()}})(i),r}function rXe(e,t){if(typeof document>"u"||typeof window>"u"&&global.window===void 0)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const n=document.createElement("div"),r=Qr().getChildren();for(let i=0;i<r.length;i++)Pme(e,r[i],n,t);return n.innerHTML}function Pme(e,t,n,r=null){let i=r===null||t.isSelected(r);const s=rt(t)&&t.excludeFromCopy("html");let a=t;if(r!==null){let g=Mz(t);g=Lt(g)&&r!==null?Eme(r,g):g,a=g}const o=rt(a)?a.getChildren():[],c=K5(e,a.getType());let u;u=c&&c.exportDOM!==void 0?c.exportDOM(e,a):a.exportDOM(e);const{element:d,after:h}=u;if(!d)return!1;const p=document.createDocumentFragment();for(let g=0;g<o.length;g++){const v=o[g],x=Pme(e,v,p,r);!i&&rt(t)&&x&&t.extractWithChild(v,r,"html")&&(i=!0)}if(i&&!s){if((rs(d)||H8(d))&&d.append(p),n.append(d),h){const g=h.call(a,d);g&&(H8(d)?d.replaceChildren(g):d.replaceWith(g))}}else n.append(p);return i}const Mme=new Set(["STYLE","SCRIPT"]);function Dme(e,t,n,r,i=new Map,s){let a=[];if(Mme.has(e.nodeName))return a;let o=null;const c=(function(v,x){const{nodeName:_}=v,w=x._htmlConversions.get(_.toLowerCase());let S=null;if(w!==void 0)for(const E of w){const T=E(v);T!==null&&(S===null||(S.priority||0)<=(T.priority||0))&&(S=T)}return S!==null?S.conversion:null})(e,t),u=c?c(e):null;let d=null;if(u!==null){d=u.after;const v=u.node;if(o=Array.isArray(v)?v[v.length-1]:v,o!==null){for(const[,x]of i)if(o=x(o,s),!o)break;o&&a.push(...Array.isArray(v)?v:[o])}u.forChild!=null&&i.set(e.nodeName,u.forChild)}const h=e.childNodes;let p=[];const g=(o==null||!ea(o))&&(o!=null&&l3(o)||r);for(let v=0;v<h.length;v++)p.push(...Dme(h[v],t,n,g,new Map(i),o));return d!=null&&(p=d(p)),p3(e)&&(p=iXe(e,p,g?()=>{const v=new Cz;return n.push(v),v}:Ur)),o==null?p.length>0?a=a.concat(p):p3(e)&&(function(v){return v.nextSibling==null||v.previousSibling==null?!1:q8(v.nextSibling)&&q8(v.previousSibling)})(e)&&(a=a.concat(zu())):rt(o)&&o.append(...p),a}function iXe(e,t,n){const r=e.style.textAlign,i=[];let s=[];for(let a=0;a<t.length;a++){const o=t[a];if(l3(o))r&&!o.getFormat()&&o.setFormat(r),i.push(o);else if(s.push(o),a===t.length-1||a<t.length-1&&l3(t[a+1])){const c=n();c.setFormat(r),c.append(...s),i.push(c),s=[]}}return i}function m3(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function sXe(e,t=Pt()){return t==null&&m3(166),_t(t)&&t.isCollapsed()||t.getNodes().length===0?"":rXe(e,t)}function aXe(e,t=Pt()){return t==null&&m3(166),_t(t)&&t.isCollapsed()||t.getNodes().length===0?null:JSON.stringify(oXe(e,t))}
845function jQ(e,t,n){const r=e.getData("application/x-lexical-editor");if(r)try{const o=JSON.parse(r);if(o.namespace===n._config.namespace&&Array.isArray(o.nodes))return RQ(n,lXe(o.nodes),t)}catch{}const i=e.getData("text/html"),s=e.getData("text/plain");if(i&&s!==i)try{const o=new DOMParser().parseFromString((function(c){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:u=>u}).createHTML(c):c})(i),"text/html");return RQ(n,nXe(n,o),t)}catch{}const a=s||e.getData("text/uri-list");if(a!=null)if(_t(t)){const o=a.split(/(\r?\n|\t)/);o[o.length-1]===""&&o.pop();for(let c=0;c<o.length;c++){const u=Pt();if(_t(u)){const d=o[c];d===` 846`||d===`\r 847`?u.insertParagraph():d===" "?u.insertNodes([Wy()]):u.insertText(d)}}}else t.insertRawText(a)}function RQ(e,t,n){e.dispatchCommand($Ke,{nodes:t,selection:n})||(n.insertNodes(t),(function(r){if(_t(r)&&r.isCollapsed()){const i=r.anchor;let s=null;const a=Gd(i,"previous");if(a)if(Id(a))s=a.origin;else{const o=bm(a,Lc(Qr(),"next").getFlipped());for(const c of o){if(Lt(c.origin)){s=c.origin;break}if(rt(c.origin)&&!c.origin.isInline())break}}if(s&&Lt(s)){const o=s.getFormat(),c=s.getStyle();r.format===o&&r.style===c||(r.format=o,r.style=c,r.dirty=!0)}}})(n))}function Fme(e,t,n,r=[]){let i=t===null||n.isSelected(t);const s=rt(n)&&n.excludeFromCopy("html");let a=n;if(t!==null){let u=Mz(n);u=Lt(u)&&t!==null?Eme(t,u):u,a=u}const o=rt(a)?a.getChildren():[],c=(function(u){const d=u.exportJSON(),h=u.constructor;if(d.type!==h.getType()&&m3(58,h.name),rt(u)){const p=d.children;Array.isArray(p)||m3(59,h.name)}return d})(a);if(Lt(a)){const u=a.__text;u.length>0?c.text=u:i=!1}for(let u=0;u<o.length;u++){const d=o[u],h=Fme(e,t,d,c.children);!i&&rt(n)&&h&&n.extractWithChild(d,t,"clone")&&(i=!0)}if(i&&!s)r.push(c);else if(Array.isArray(c.children))for(let u=0;u<c.children.length;u++){const d=c.children[u];r.push(d)}return i}function oXe(e,t){const n=[],r=Qr().getChildren();for(let i=0;i<r.length;i++)Fme(e,t,r[i],n);return{namespace:e._config.namespace,nodes:n}}function lXe(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n],i=sYe(r);Lt(i)&&LYe(i),t.push(i)}return t}let Tv=null;async function IQ(e,t,n){if(Tv!==null)return!1;if(t!==null)return new Promise(((u,d)=>{e.update((()=>{u(OQ(e,t,n))}))}));const r=e.getRootElement(),i=e._window||window,s=window.document,a=$u(i);if(r===null||a===null)return!1;const o=s.createElement("span");o.style.cssText="position: fixed; top: -1000px;",o.append(s.createTextNode("#")),r.append(o);const c=new Range;return c.setStart(o,0),c.setEnd(o,1),a.removeAllRanges(),a.addRange(c),new Promise(((u,d)=>{const h=e.registerCommand(B5,(p=>(Wp(p,ClipboardEvent)&&(h(),Tv!==null&&(window.clearTimeout(Tv),Tv=null),u(OQ(e,p,n))),!0)),kh);Tv=window.setTimeout((()=>{h(),Tv=null,u(!1)}),50),s.execCommand("copy"),o.remove()}))}function OQ(e,t,n){if(n===void 0){const i=$u(e._window);if(!i)return!1;const s=i.anchorNode,a=i.focusNode;if(s!==null&&a!==null&&!ME(e,s,a))return!1;const o=Pt();if(o===null)return!1;n=uXe(o)}t.preventDefault();const r=t.clipboardData;return r!==null&&(dXe(r,n),!0)}const cXe=[["text/html",sXe],["application/x-lexical-editor",aXe]];function uXe(e=Pt()){const t={"text/plain":e?e.getTextContent():""};if(e){const n=Z5();for(const[r,i]of cXe){const s=i(n,e);s!==null&&(t[r]=s)}}return t}function dXe(e,t){for(const n in t){const r=t[n];r!==void 0&&e.setData(n,r)}}function PQ(e,t){if(document.caretRangeFromPoint!==void 0){const n=document.caretRangeFromPoint(e,t);return n===null?null:{node:n.startContainer,offset:n.startOffset}}if(document.caretPositionFromPoint!=="undefined"){const n=document.caretPositionFromPoint(e,t);return n===null?null:{node:n.offsetNode,offset:n.offset}}return null}const Qy=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,fXe=Qy&&"documentMode"in document?document.documentMode:null,hXe=!(!Qy||!("InputEvent"in window)||fXe)&&"getTargetRanges"in new window.InputEvent("input"),pXe=Qy&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),MQ=Qy&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,mXe=Qy&&/^(?=.*Chrome).*/i.test(navigator.userAgent),gXe=Qy&&/AppleWeb
847Kit\/[\d.]+/.test(navigator.userAgent)&&!mXe,DQ=Nn("DRAG_DROP_PASTE_FILE");let r4=class Lme extends gl{static getType(){return"quote"}static clone(t){return new Lme(t.__key)}createDOM(t){const n=document.createElement("blockquote");return Bu(n,t.theme.quote),n}updateDOM(t,n){return!1}static importDOM(){return{blockquote:t=>({conversion:xXe,priority:0})}}exportDOM(t){const{element:n}=super.exportDOM(t);if(rs(n)){this.isEmpty()&&n.append(document.createElement("br"));const r=this.getFormatType();r&&(n.style.textAlign=r);const i=this.getDirection();i&&(n.dir=i)}return{element:n}}static importJSON(t){return LE().updateFromJSON(t)}insertNewAfter(t,n){const r=Ur(),i=this.getDirection();return r.setDirection(i),this.insertAfter(r,n),r}collapseAtStart(){const t=Ur();return this.getChildren().forEach((n=>t.append(n))),this.replace(t),!0}canMergeWhenEmpty(){return!0}};function LE(){return Jl(new r4)}function X8(e){return e instanceof r4}let zE=class zme extends gl{static getType(){return"heading"}static clone(t){return new zme(t.__tag,t.__key)}constructor(t,n){super(n),this.__tag=t}getTag(){return this.__tag}setTag(t){const n=this.getWritable();return this.__tag=t,n}createDOM(t){const n=this.__tag,r=document.createElement(n),i=t.theme.heading;if(i!==void 0){const s=i[n];Bu(r,s)}return r}updateDOM(t,n,r){return t.__tag!==this.__tag}static importDOM(){return{h1:t=>({conversion:Av,priority:0}),h2:t=>({conversion:Av,priority:0}),h3:t=>({conversion:Av,priority:0}),h4:t=>({conversion:Av,priority:0}),h5:t=>({conversion:Av,priority:0}),h6:t=>({conversion:Av,priority:0}),p:t=>{const n=t.firstChild;return n!==null&&FQ(n)?{conversion:()=>({node:null}),priority:3}:null},span:t=>FQ(t)?{conversion:n=>({node:Ed("h1")}),priority:3}:null}}exportDOM(t){const{element:n}=super.exportDOM(t);if(rs(n)){this.isEmpty()&&n.append(document.createElement("br"));const r=this.getFormatType();r&&(n.style.textAlign=r);const i=this.getDirection();i&&(n.dir=i)}return{element:n}}static importJSON(t){return Ed(t.tag).updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setTag(t.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(t,n=!0){const r=t?t.anchor.offset:0,i=this.getLastDescendant(),s=!i||t&&t.anchor.key===i.getKey()&&r===i.getTextContentSize()||!t?Ur():Ed(this.getTag()),a=this.getDirection();if(s.setDirection(a),this.insertAfter(s,n),r===0&&!this.isEmpty()&&t){const o=Ur();o.select(),this.replace(o,!0)}return s}collapseAtStart(){const t=this.isEmpty()?Ur():Ed(this.getTag());
847return this.getChildren().forEach((n=>t.append(n))),this.replace(t),!0}extractWithChild(){return!0}};function FQ(e){return e.nodeName.toLowerCase()==="span"&&e.style.fontSize==="26pt"}function Av(e){const t=e.nodeName.toLowerCase();let n=null;return t!=="h1"&&t!=="h2"&&t!=="h3"&&t!=="h4"&&t!=="h5"&&t!=="h6"||(n=Ed(t),e.style!==null&&(Dz(e,n),n.setFormat(e.style.textAlign))),{node:n}}function xXe(e){const t=LE();return e.style!==null&&(t.setFormat(e.style.textAlign),Dz(e,t)),{node:t}}function Ed(e="h1"){return Jl(new zE(e))}function i4(e){return e instanceof zE}function xA(e){let t=null;if(Wp(e,DragEvent)?t=e.dataTransfer:Wp(e,ClipboardEvent)&&(t=e.clipboardData),t===null)return[!1,[],!1];const n=t.types,r=n.includes("Files"),i=n.includes("text/html")||n.includes("text/plain");return[r,Array.from(t.files),i]}function LQ(e){const t=Pt();if(!_t(t))return!1;const n=new Set,r=t.getNodes();for(let i=0;i<r.length;i++){const s=r[i],a=s.getKey();if(n.has(a))continue;const o=Cu(s,(u=>rt(u)&&!u.isInline()));if(o===null)continue;const c=o.getKey();o.canIndent()&&!n.has(c)&&(n.add(c),e(o))}return n.size>0}function zQ(e){const t=Wd(e);return Br(t)}function MP(e){for(const t of["lowercase","uppercase","capitalize"])e.hasFormat(t)&&e.toggleFormat(t)}function vXe(e){return bl(e.registerCommand(L5,(t=>{const n=Pt();return!!ss(n)&&(n.clear(),!0)}),ur),e.registerCommand(u0,(t=>{const n=Pt();return _t(n)?(n.deleteCharacter(t),!0):!!ss(n)&&(n.deleteNodes(),!0)}),ur),e.registerCommand(cS,(t=>{const n=Pt();return!!_t(n)&&(n.deleteWord(t),!0)}),ur),e.registerCommand(uS,(t=>{const n=Pt();return!!_t(n)&&(n.deleteLine(t),!0)}),ur),e.registerCommand(P1,(t=>{const n=Pt();if(typeof t=="string")n!==null&&n.insertText(t);else{if(n===null)return!1;const r=t.dataTransfer;if(r!=null)jQ(r,n,e);else if(_t(n)){const i=t.data;return i&&n.insertText(i),!0}}return!0}),ur),e.registerCommand(j8,(()=>{const t=Pt();return!!_t(t)&&(t.removeText(),!0)}),ur),e.registerCommand(rh,(t=>{const n=Pt();return!!_t(n)&&(n.formatText(t),!0)}),ur),e.registerCommand(VKe,(t=>{const n=Pt();if(!_t(n)&&!ss(n))return!1;const r=n.getNodes();for(const i of r){const s=Cu(i,(a=>rt(a)&&!a.isInline()));s!==null&&s.setFormat(t)}return!0}),ur),e.registerCommand(O1,(t=>{const n=Pt();return!!_t(n)&&(n.insertLineBreak(t),!0)}),ur),e.registerCommand(lS,(()=>{const t=Pt();return!!_t(t)&&(t.insertParagraph(),!0)}),ur),e.registerCommand(Ipe,(()=>(Ky([Wy()]),!0)),ur),e.registerCommand(a3,(()=>LQ((t=>{const n=t.getIndent();t.setIndent(n+1)}))),ur),e.registerCommand(R8,(()=>LQ((t=>{const n=t.getIndent();n>0&&t.setIndent(Math.max(0,n-1))}))),ur),e.registerCommand(uz,(t=>{const n=Pt();if(ss(n)){const r=n.getNodes();if(r.length>0)return r[0].selectPrevious(),!0}else if(_t(n)){const r=B8(n.focus,!0);if(!t.shiftKey&&Br(r)&&!r.isIsolated()&&!r.isInline())return r.selectPrevious(),t.preventDefault(),!0}return!1}),ur),e.registerCommand(dz,(t=>{const n=Pt();if(ss(n)){const r=n.getNodes();if(r.length>0)return r[0].selectNext(0,0),!0}else if(_t(n)){if((function(i){const s=i.focus;return s.key==="root"&&s.offset===Qr().getChildrenSize()})(n))return t.preventDefault(),!0;const r=B8(n.focus,!1);if(!t.shiftKey&&Br(r)&&!r.isIsolated()&&!r.isInline())return r.selectNext(),t.preventDefault(),!0}return!1}),ur),e.registerCommand(cz,(t=>{const n=Pt();if(ss(n)){const r=n.getNodes();if(r.length>0)return t.preventDefault(),EQ(r[0])?r[0].selectNext(0,0):r[0].selectPrevious(),!0}if(!_t(n))return!1;if(TQ(n,!0)){const r=t.shiftKey;return t.preventDefault(),AQ(n,r,!0),!0}return!1}),ur),e.registerCommand(Rpe,(t=>{const n=Pt();if(ss(n)){const i=n.getNodes();if(i.length>0)return t.preventDefault(),EQ(i[0])?i[0].selectPrevious():i[0].selectNext(0,0),!0}if(!_t(n))return!1;const r=t.shiftKey;return!!TQ(n,!1)&&(t.preventDefault(),AQ(n,r,!1),!0)}),ur),e.registerCommand(hz,(t=>{if(zQ(t.target))return!1;const n=Pt();if(_t(n)){if((function(r){if(!r.isCollapsed())return!1;const{anchor:i}=r;if(i.offset!==0)return!1;const s=i.getNode();if(Zs(s))return!1;const a=G8(s);return a.getIndent()>0&&(a.is(s)||s.is(a.getFirstDescendant()))})(n))return t.preventDefault(),e.dispatchCommand(R8,void 0);if(MQ&&navigator.language==="ko-KR")return!1}else if(!ss(n))return!1;return t.preventDefault(),e.dispatchCommand(u0,!0)}),ur),e.registerCommand(pz,(t=>{if(zQ(t.target))return!1;const n=Pt();return!(!_t(n)&&!ss(n))&&(t.preventDefault(),e.dispatchCommand(u0,!1))}),ur),e.registerCommand(my,(t=>{const n=Pt();if(!_t(n))return!1;if(MP(n),t!==null){if((MQ||pXe||gXe)&&hXe)return!1;if(t.preventDefault(),t.shiftKey)return e.dispatchCommand(O1,!1)}return e.dispatchCommand(lS,void 0)}),ur),e.registerCommand(jE,(()=>{const t=Pt();return!!_t(t)&&(e.blur(),!0)}),ur),e.registerCommand(mz,(t=>{const[,n]=xA(t);if(n.length>0){const i=PQ(t.clientX,t.clientY);if(i!==null){const{offset:s,node:a}=i,o=Wd(a);if(o!==null){const c=Gy();if(Lt(o))c.anchor.set(o.getKey(),s,"text"),c.focus.set(o.getKey(),s,"text");else{const d=o.getParentOrThrow().getKey(),h=o.getIndexWithinParent()+1;c.anchor.set(d,h,"element"),c.focus.set(d,h,"element")}const u=B0(c);As(u)}
847e.dispatchCommand(DQ,n)}return t.preventDefault(),!0}const r=Pt();return!!_t(r)}),ur),e.registerCommand($5,(t=>{const[n]=xA(t),r=Pt();return!(n&&!_t(r))}),ur),e.registerCommand(gz,(t=>{const[n]=xA(t),r=Pt();if(n&&!_t(r))return!1;const i=PQ(t.clientX,t.clientY);if(i!==null){const s=Wd(i.node);Br(s)&&t.preventDefault()}return!0}),ur),e.registerCommand(I8,(()=>(mYe(),!0)),ur),e.registerCommand(B5,(t=>(IQ(e,Wp(t,ClipboardEvent)?t:null),!0)),ur),e.registerCommand(xz,(t=>((async function(n,r){await IQ(r,Wp(n,ClipboardEvent)?n:null),r.update((()=>{const i=Pt();_t(i)?i.removeText():ss(i)&&i.getNodes().forEach((s=>s.remove()))}))})(t,e),!0)),ur),e.registerCommand(NE,(t=>{const[,n,r]=xA(t);return n.length>0&&!r?(e.dispatchCommand(DQ,n),!0):Xy(t.target)&&Az(t.target)?!1:Pt()!==null&&((function(i,s){i.preventDefault(),s.update((()=>{const a=Pt(),o=Wp(i,InputEvent)||Wp(i,KeyboardEvent)?null:i.clipboardData;o!=null&&a!==null&&jQ(o,a,s)}),{tag:oYe})})(t,e),!0)}),ur),e.registerCommand(fz,(t=>{const n=Pt();return _t(n)&&MP(n),!1}),ur),e.registerCommand(z5,(t=>{const n=Pt();return _t(n)&&MP(n),!1}),ur))}function xo(e,t,n,r){const i=e.length;let s=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);s<r.length;)a=r.slice(s,s+1e4),a.unshift(t,0),e.splice(...a),s+=1e4,t+=1e4}function wc(e,t){return e.length>0?(xo(e,e.length,0,t),e):t}const Do=qm(/[A-Za-z]/),ho=qm(/[\dA-Za-z]/),yXe=qm(/[#-'*+\--9=?A-Z^-~]/);function g3(e){return e!==null&&(e<32||e===127)}const Q8=qm(/\d/),bXe=qm(/[\dA-Fa-f]/),_Xe=qm(/[!-/:-@[-`{-~]/);function bn(e){return e!==null&&e<-2}function jr(e){return e!==null&&(e<0||e===32)}function er(e){return e===-2||e===-1||e===32}const s4=qm(new RegExp("\\p{P}|\\p{S}","u")),Io=qm(/\s/);function qm(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function _m(e){if(e===null||jr(e)||Io(e))return 1;if(s4(e))return 2}function $E(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}function $me(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,o){let c=-1;for(;++c<a.length;)if(a[c][0]==="enter"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._close){let u=c;for(;u--;)if(a[u][0]==="exit"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._open&&a[c][1].end.offset-a[c][1].start.offset===a[u][1].end.offset-a[u][1].start.offset){a[c][1].type="strikethroughSequence",a[u][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},a[u][1].start),end:Object.assign({},a[c][1].end)},h={type:"strikethroughText",start:Object.assign({},a[u][1].end),end:Object.assign({},a[c][1].start)},p=[["enter",d,o],["enter",a[u][1],o],["exit",a[u][1],o],["enter",h,o]],g=o.parser.constructs.insideSpan.null;g&&xo(p,p.length,0,$E(g,a.slice(u+1,c),o)),xo(p,p.length,0,[["exit",h,o],["enter",a[c][1],o],["exit",a[c][1],o],["exit",d,o]]),xo(a,u-1,c-u+3,p),c=u+p.length-2;break}}for(c=-1;++c<a.length;)a[c][1].type==="strikethroughSequenceTemporary"&&(a[c][1].type="data");return a}function s(a,o,c){const u=this.previous,d=this.events;let h=0;return p;function p(v){return u===126&&d[d.length-1][1].type!=="characterEscape"?c(v):(a.enter("strikethroughSequenceTemporary"),g(v))}function g(v){const x=_m(u);if(v===126)return h>1?c(v):(a.consume(v),h++,g);if(h<2&&!n)return c(v);const _=a.exit("strikethroughSequenceTemporary"),w=_m(v);return _._open=!w||w===2&&!!x,_._close=!x||x===2&&!!w,o(v)}}}const wXe=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Vme.peek=CXe;function Bme(){return{canContainEols:["delete"],enter:{strikethrough:SXe},exit:{strikethrough:EXe}}}function Ume(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:wXe}],handlers:{delete:Vme}}}function SXe(e){this.enter({type:"delete",children:[]},e)}function EXe(e){this.exit(e)}function Vme(e,t,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),s(),a}function CXe(){return"~"}Hme.peek=RXe;var TXe=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],AXe={canContainEols:["highlight"],enter
847:{highlight:kXe},exit:{highlight:NXe}};function kXe(e){this.enter({type:"highlight",children:[]},e)}function NXe(e){this.exit(e)}var jXe={unsafe:[{character:"=",inConstruct:"phrasing",notInConstruct:TXe}],handlers:{highlight:Hme}};function Hme(e,t,n,r){const s=n.createTracker(r),a=n.enter("highlight");let o=s.move("==");return o+=s.move(n.containerPhrasing(e,{before:o,after:"=",...s.current()})),o+=s.move("=="),a(),o}function RXe(){return"="}function x3(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const IXe=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","
847sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],$Q={0:"�",128:"â¬",130:"â",131:"Æ",132:"â",133:"â¦",134:"â ",135:"â¡",136:"Ë",137:"â°",138:"Å ",139:"â¹",140:"Å",142:"Ž",145:"â",146:"â",147:"â",148:"â",149:"â¢",150:"â",151:"â",152:"Ë",153:"â¢",154:"Å¡",155:"âº",156:"Å",158:"ž",159:"Ÿ"};function qme(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=48&&t<=57}function OXe(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function PXe(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function BQ(e){return PXe(e)||qme(e)}const UQ=document.createElement("i");function fS(e){const t="&"+e+";";UQ.innerHTML=t;const n=UQ.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}const MXe=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function DXe(e,t){const n=t||{},r=typeof n.additional=="string"?n.additional.charCodeAt(0):n.additional,i=[];let s=0,a=-1,o="",c,u;n.position&&("start"in n.position||"indent"in n.position?(u=n.position.indent,c=n.position.start):c=n.position);let d=(c?c.line:0)||1,h=(c?c.column:0)||1,p=v(),g;for(s--;++s<=e.length;)if(g===10&&(h=(u?u[a]:0)||1),g=e.charCodeAt(s),g===38){const w=e.charCodeAt(s+1);if(w===9||w===10||w===12||w===32||w===38||w===60||Number.isNaN(w)||r&&w===r){o+=String.fromCharCode(g),h++;continue}const S=s+1;let E=S,T=S,N;if(w===35){T=++E;const G=e.charCodeAt(T);G===88||G===120?(N="hexadecimal",T=++E):N="decimal"}else N="named";let A="",k="",j="";const R=N==="named"?BQ:N==="decimal"?qme:OXe;for(T--;++T<=e.length;){const G=e.charCodeAt(T);if(!R(G))break;j+=String.fromCharCode(G),N==="named"&&IXe.includes(j)&&(A=j,k=fS(j))}let P=e.charCodeAt(T)===59;if(P){T++;const G=N==="named"?fS(j):!1;G&&(A=j,k=G)}let V=1+T-S,U="";if(!(!P&&n.nonTerminated===!1))if(!j)N!=="named"&&x(4,V);else if(N==="named"){if(P&&!k)x(5,1);else if(A!==j&&(T=E+A.length,V=1+T-E,P=!1),!P){const G=A?1:3;if(n.attribute){const Q=e.charCodeAt(T);Q===61?(x(G,V),k=""):BQ(Q)?k="":x(G,V)}else x(G,V)}U=k}else{P||x(2,V);let G=Number.parseInt(j,N==="hexadecimal"?16:10);if(FXe(G))x(7,V),U="�";else if(G in $Q)x(6,V),U=$Q[G];else{let Q="";LXe(G)&&x(6,V),G>65535&&(G-=65536,Q+=String.fromCharCode(G>>>10|55296),G=56320|G&1023),U=Q+String.fromCharCode(G)}}if(U){_(),p=v(),s=T-1,h+=T-S+1,i.push(U);const G=v();G.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,U,{start:p,end:G},e.slice(S-1,T)),p=G}else j=e.slice(S-1,T),o+=j,h+=j.length,s=T-1}else g===10&&(d++,a++,h=0),Number.isNaN(g)?_():(o+=String.fromCharCode(g),h++);return i.join("");function v(){return{line:d,column:h,offset:s+((c?c.offset:0)||0)}}function x(w,S){let E;n.warning&&(E=v(),E.column+=S,E.offset+=S,n.warning.call(n.warningContext||void 0,MXe[w],E,w))}function _(){o&&(i.push(o),n.text&&n.text.call(n.textContext||void 0,o,{start:p,end:v()}),o="")}}function FXe(e){return e>=55296&&e<=57343||e>1114111}function LXe(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}const zXe=/["&'<>`]/g,$Xe=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,BXe=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,UXe=/[|\\{}()[\]^$+*?.]/g,VQ=new WeakMap;function VXe(e,t){if(e=e.replace(t.subset?HXe(t.subset):zXe,r),t.subset||t.escapeOnly)return e;return e.replace($Xe,n).replace(BXe,r);function n(i,s,a){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,a.charCodeAt(s+2),t)}function r(i,s,a){return t.format(i.charCodeAt(0),a.charCodeAt(s+1),t)}}function HXe(e){let t=VQ.get(e);return t||(t=qXe(e),VQ.set(e,t)),t}function qXe(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(UXe,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}function WXe(e){return"&#x"+e.toString(16).toUpperCase()+";"}function GXe(e,t){return VXe(e,Object.assign({format:WXe},t))}function ih(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?HQ(e.position):"start"in e||"end"in e?HQ(e):"line"in e||"column"in e?Z8(e):""}function Z8(e){return qQ(e&&e.line)+":"+qQ(e&&e.column)}function HQ(e){return Z8(e&&e.start)+"-"+Z8(e&&e.end)}function qQ(e){return e&&typeof e=="number"?e:1}
847class Gr extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},a=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?i=t:!s.cause&&t&&(a=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?s.ruleId=r:(s.source=r.slice(0,c),s.ruleId=r.slice(c+1))}if(!s.place&&s.ancestors&&s.ancestors){const c=s.ancestors[s.ancestors.length-1];c&&(s.place=c.position)}const o=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=o?o.line:void 0,this.name=ih(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=a&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Gr.prototype.file="";Gr.prototype.name="";Gr.prototype.reason="";Gr.prototype.message="";Gr.prototype.stack="";Gr.prototype.column=void 0;Gr.prototype.line=void 0;Gr.prototype.ancestors=void 0;Gr.prototype.cause=void 0;Gr.prototype.fatal=void 0;Gr.prototype.place=void 0;Gr.prototype.ruleId=void 0;Gr.prototype.source=void 0;const Wme=" ";function KXe(){return{canContainEols:["mdxJsxTextElement"],enter:{mdxJsxFlowTag:r,mdxJsxFlowTagClosingMarker:i,mdxJsxFlowTagAttribute:h,mdxJsxFlowTagExpressionAttribute:p,mdxJsxFlowTagAttributeValueLiteral:e,mdxJsxFlowTagAttributeValueExpression:e,mdxJsxFlowTagSelfClosingMarker:a,mdxJsxTextTag:r,mdxJsxTextTagClosingMarker:i,mdxJsxTextTagAttribute:h,mdxJsxTextTagExpressionAttribute:p,mdxJsxTextTagAttributeValueLiteral:e,mdxJsxTextTagAttributeValueExpression:e,mdxJsxTextTagSelfClosingMarker:a},exit:{mdxJsxFlowTagClosingMarker:o,mdxJsxFlowTagNamePrimary:c,mdxJsxFlowTagNameMember:u,mdxJsxFlowTagNameLocal:d,mdxJsxFlowTagExpressionAttribute:g,mdxJsxFlowTagExpressionAttributeValue:n,mdxJsxFlowTagAttributeNamePrimary:v,mdxJsxFlowTagAttributeNameLocal:x,mdxJsxFlowTagAttributeValueLiteral:_,mdxJsxFlowTagAttributeValueLiteralValue:n,mdxJsxFlowTagAttributeValueExpression:w,mdxJsxFlowTagAttributeValueExpressionValue:n,mdxJsxFlowTagSelfClosingMarker:S,mdxJsxFlowTag:E,mdxJsxTextTagClosingMarker:o,mdxJsxTextTagNamePrimary:c,mdxJsxTextTagNameMember:u,mdxJsxTextTagNameLocal:d,mdxJsxTextTagExpressionAttribute:g,mdxJsxTextTagExpressionAttributeValue:n,mdxJsxTextTagAttributeNamePrimary:v,mdxJsxTextTagAttributeNameLocal:x,mdxJsxTextTagAttributeValueLiteral:_,mdxJsxTextTagAttributeValueLiteralValue:n,mdxJsxTextTagAttributeValueExpression:w,mdxJsxTextTagAttributeValueExpressionValue:n,mdxJsxTextTagSelfClosingMarker:S,mdxJsxTextTag:E}};function e(){this.buffer()}function t(k){return{line:k.line,column:k.column,offset:k.offset}}function n(k){this.config.enter.data.call(this,k),this.config.exit.data.call(this,k)}function r(k){const j={name:void 0,attributes:[],close:!1,selfClosing:!1,start:k.start,end:k.end};this.data.mdxJsxTagStack||(this.data.mdxJsxTagStack=[]),this.data.mdxJsxTag=j,this.buffer()}function i(k){if(this.data.mdxJsxTagStack.length===0)throw new Gr("Unexpected closing slash `/` in tag, expected an open tag first",{start:k.start,end:k.end},"mdast-util-mdx-jsx:unexpected-closing-slash")}function s(k){if(this.data.mdxJsxTag.close)throw new Gr("Unexpected attribute in closing tag, expected the end of the tag",{start:k.start,end:k.end},"mdast-util-mdx-jsx:unexpected-attribute")}function a(k){if(this.data.mdxJsxTag.close)throw new Gr("Unexpected self-closing slash `/` in closing tag, expected the end of the tag",{start:k.start,end:k.end},"mdast-util-mdx-jsx:unexpected-self-closing-slash")}function o(){const k=this.data.mdxJsxTag;k.close=!0}function c(k){const j=this.data.mdxJsxTag;j.name=this.sliceSerialize(k)}function u(k){const j=this.data.mdxJsxTag;j.name+="."+this.sliceSerialize(k)}function d(k){const j=this.data.mdxJsxTag;j.name+=":"+this.sliceSerialize(k)}function h(k){const j=this.data.mdxJsxTag;s.call(this,k),j.attributes.push({type:"mdxJsxAttribute",name:"",value:null,position:{start:t(k.start),end:void 0}})}function p(k){const j=this.data.mdxJsxTag;s.call(this,k),j.attributes.push({type:"mdxJsxExpressionAttribute",value:"",position:{start:t(k.start),end:void 0}}),this.buffer()}function g(k){const j=this.data.mdxJsxTag,R=j.attributes[j.attributes.length-1];R.type;const P=k.estree;R.value=this.resume(),R.position,R.position.end=t(k.end),P&&(R.data={estree:P})}function v(k){const j=this.data.mdxJsxTag,R=j.attributes[j.attributes.length-1];R.type,R.name=this.sliceSerialize(k),R.position,R.position.end=t(k.end)}function x(k){const j=this.data.mdxJsxTag,R=j.attributes[j.attributes.length-1];R.type,R.name+=":"+this.sliceSerialize(k),R.position,R.position.end=t(k.end)}function _(k){const j=this.data.mdxJsxTag,R=j.attributes[j.attributes.length-1];R.value=DXe(this.resume(),{nonTerminated:!1}),R.position,R.position.end=t(k.end)}function w(k){const j=this.data.mdxJsxTag,R=j.attributes[j.attributes.length-1];R.type;const P={type:"mdxJsxAttributeValueExpression",value:this.resume()},V=k.estree;V&&(P.data={estree:V}),R.value=P,R.position,R.position.end=t(k.end)}function S(){const k=this.data.mdxJsxTag;k.selfClosing=!0}function E(k){const j=this.data.mdxJsxTag,R=this.data.mdxJsxTagStack,P=R[R.length-1];if(j.close&&P.name!==j.name)throw new Gr("Unexpected closing tag `"+A(j)+"`, expected corresponding closing tag for `"+A(P)+"` ("+ih(P)+")",{start:k.start,end:k.end},"mdast-util-mdx-jsx:end-tag-mismatch");this.resume(),j.close?R.pop():this.enter({type:k.type==="mdxJsxTextTag"?"mdxJsxTextElement":"mdxJsxFlowElement",name:j.name||null,attributes:j.attributes,children:[]},k,T),j.selfClosing||j.close?this.exit(k,N):R.push(j)}function T(k,j){const R=this.data.mdxJsxTagStack,P=R[R.length-1],V=k?" before the end of `"+k.type+"`":"",U=k?{start:k.start,end:k.end}:void 0;throw new Gr("Expected a closing tag for `"+A(P)+"` ("+ih({start:j.start,end:j.end})+")"+V,U,"mdast-util-mdx-jsx:end-tag-mismatch")}function N(k,j){const R=this.data.mdxJsxTag;throw new Gr("Expected the closing tag `"+A(R)+"` either after the end of `"+j.type+"` ("+ih(j.end)+") or another opening tag after the start of `"+j.type+"` ("+ih(j.start)+")",{start:k.start,end:k.end},"mdast-util-mdx-jsx:end-tag-mismatch")}function A(k){return"<"+(k.close?"/":"")+(k.name||"")+">"}}function YXe(e){const t={},n=t.quote||'"',r=t.quoteSmart||!1,i=t.tightSelfClosing||!1,s=t.printWidth||Number.POSITIVE_INFINITY,a=n==='"'?"'":'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize attribute values with `"+n+"` for `options.quote`, expected `\"`, or `'`");return o.peek=QXe,{handlers:{mdxJsxFlowElement:o,mdxJsxTextElement:o},unsafe:[{character:"<",inConstruct:["phrasing"]},{atBreak:!0,character:"<"}],fences:!0,resourceLink:!0}
847;function o(c,u,d,h){const p=c.type==="mdxJsxFlowElement",g=c.name?!c.children||c.children.length===0:!1,v=Gme(d),x=Kme(v),_=d.createTracker(h),w=d.createTracker(h),S=[],E=(p?x:"")+"<"+(c.name||""),T=d.enter(c.type);if(_.move(E),w.move(E),c.attributes&&c.attributes.length>0){if(!c.name)throw new Error("Cannot serialize fragment w/ attributes");let R=-1;for(;++R<c.attributes.length;){const P=c.attributes[R];let V;if(P.type==="mdxJsxExpressionAttribute")V="{"+(P.value||"")+"}";else{if(!P.name)throw new Error("Cannot serialize attribute w/o name");const U=P.value,G=P.name;let Q="";if(U!=null)if(typeof U=="object")Q="{"+(U.value||"")+"}";else{const Z=r&&x3(U,n)>x3(U,a)?a:n;Q=Z+GXe(U,{subset:[Z]})+Z}V=G+(Q?"=":"")+Q}S.push(V)}}let N=!1;const A=S.join(" ");p&&(/\r?\n|\r/.test(A)||_.current().now.column+A.length+(g?i?2:3:1)>s)&&(N=!0);let k=_,j=E;if(N){k=w;let R=-1;for(;++R<S.length;)S[R]=x+Wme+S[R];j+=k.move(` 848`+S.join(` 849`)+` 850`+x)}else A&&(j+=k.move(" "+A));return g&&(j+=k.move((i||N?"":" ")+"/")),j+=k.move(">"),c.children&&c.children.length>0&&(c.type==="mdxJsxTextElement"?j+=k.move(d.containerPhrasing(c,{...k.current(),before:">",after:"<"})):(k.shift(2),j+=k.move(` 851`),j+=k.move(XXe(c,d,k.current())),j+=k.move(` 852`))),g||(j+=k.move((p?x:"")+"</"+(c.name||"")+">")),T(),j}}function XXe(e,t,n){const r=t.indexStack,i=e.children,s=t.createTracker(n),a=Kme(Gme(t)),o=[];let c=-1;for(r.push(-1);++c<i.length;){const u=i[c];r[r.length-1]=c;const d={before:` 853`,after:` 854`,...s.current()},h=t.handle(u,e,t,d),p=u.type==="mdxJsxFlowElement"?h:t.indentLines(h,function(g,v,x){return(x?"":a)+g});o.push(s.move(p)),u.type!=="list"&&(t.bulletLastUsed=void 0),c<i.length-1&&o.push(s.move(` 855 856`))}return r.pop(),o.join("")}function Gme(e){let t=0,n=e.stack.length;for(;--n>-1;){const r=e.stack[n];if(r==="blockquote"||r==="listItem")break;r==="mdxJsxFlowElement"&&t++}return t}function Kme(e){return Wme.repeat(e)}function QXe(){return"<"}var WQ=Object.prototype.hasOwnProperty;function GQ(e,t,n){for(n of e.keys())if($w(n,t))return n}function $w(e,t){var n,r,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&$w(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(i=r,i&&typeof i=="object"&&(i=GQ(t,i),!i)||!t.has(i))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(i=r[0],i&&typeof i=="object"&&(i=GQ(t,i),!i)||!$w(r[1],t.get(i)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(WQ.call(e,n)&&++r&&!WQ.call(t,n)||!(n in t)||!$w(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}var ZXe={};let J8,Yme,Xme,Qme,Zme=!0;typeof process<"u"&&({FORCE_COLOR:J8,NODE_DISABLE_COLORS:Yme,NO_COLOR:Xme,TERM:Qme}=ZXe||{},Zme=process.stdout&&process.stdout.isTTY);const Ar={enabled:!Yme&&Xme==null&&Qme!=="dumb"&&(J8!=null&&J8!=="0"||Zme),reset:ki(0,0),bold:ki(1,22),dim:ki(2,22),italic:ki(3,23),underline:ki(4,24),inverse:ki(7,27),hidden:ki(8,28),strikethrough:ki(9,29),black:ki(30,39),red:ki(31,39),green:ki(32,39),yellow:ki(33,39),blue:ki(34,39),magenta:ki(35,39),cyan:ki(36,39),white:ki(37,39),gray:ki(90,39),grey:ki(90,39),bgBlack:ki(40,49),bgRed:ki(41,49),bgGreen:ki(42,49),bgYellow:ki(43,49),bgBlue:ki(44,49),bgMagenta:ki(45,49),bgCyan:ki(46,49),bgWhite:ki(47,49)};function KQ(e,t){let n=0,r,i="",s="";for(;n<e.length;n++)r=e[n],i+=r.open,s+=r.close,~t.indexOf(r.close)&&(t=t.replace(r.rgx,r.close+r.open));return i+t+s}function JXe(e,t){let n={has:e,keys:t};return n.reset=Ar.reset.bind(n),n.bold=Ar.bold.bind(n),n.dim=Ar.dim.bind(n),n.italic=Ar.italic.bind(n),n.underline=Ar.underline.bind(n),n.inverse=Ar.inverse.bind(n),n.hidden=Ar.hidden.bind(n),n.strikethrough=Ar.strikethrough.bind(n),n.black=Ar.black.bind(n),n.red=Ar.red.bind(n),n.green=Ar.green.bind(n),n.yellow=Ar.yellow.bind(n),n.blue=Ar.blue.bind(n),n.magenta=Ar.magenta.bind(n),n.cyan=Ar.cyan.bind(n),n.white=Ar.white.bind(n),n.gray=Ar.gray.bind(n),n.grey=Ar.grey.bind(n),n.bgBlack=Ar.bgBlack.bind(n),n.bgRed=Ar.bgRed.bind(n),n.bgGreen=Ar.bgGreen.bind(n),n.bgYellow=Ar.bgYellow.bind(n),n.bgBlue=Ar.bgBlue.bind(n),n.bgMagenta=Ar.bgMagenta.bind(n),n.bgCyan=Ar.bgCyan.bind(n),n.bgWhite=Ar.bgWhite.bind(n),n}function ki(e,t){let n={open:`\x1B[${e}m`,close:`\x1B[${t}m`,rgx:new RegExp(`\\x1b\\[${t}m`,"g")};return function(r){return this!==void 0&&this.has!==void 0?(~this.has.indexOf(e)||(this.has.push(e),this.keys.push(n)),r===void 0?this:Ar.enabled?KQ(this.keys,r+""):r+""):r===void 0?JXe([e],[n]):Ar.enabled?KQ([n],r+""):r+""}}function Wm(){}Wm.prototype={diff:function(t,n){var r,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=i.callback;typeof i=="function"&&(s=i,i={}),this.options=i;var a=this;function o(T){return s?(setTimeout(function(){s(void 0,T)},0),!0):T}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var c=n.length,u=t.length,d=1,h=c+u;i.maxEditLength&&(h=Math.min(h,i.maxEditLength));var p=(r=i.timeout)!==null&&r!==void 0?r:1/0,g=Date.now()+p,v=[{oldPos:-1,lastComponent:void 0}],x=this.extractCommon(v[0],n,t,0);if(v[0].oldPos+1>=u&&x+1>=c)return o([{value:this.join(n),count:n.length}]);var _=-1/0,w=1/0;function S(){for(var T=Math.max(_,-d);T<=Math.min(w,d);T+=2){var N=void 0,A=v[T-1],k=v[T+1];A&&(v[T-1]=void 0);var j=!1;if(k){var R=k.oldPos-T;j=k&&0<=R&&R<c}var P=A&&A.oldPos+1<u;if(!j&&!P){v[T]=void 0;continue}if(!P||j&&A.oldPos+1<k.oldPos?N=a.addToPath(k,!0,void 0,0):N=a.addToPath(A,void 0,!0,1),x=a.extractCommon(N,n,t,T),N.oldPos+1>=u&&x+1>=c)return o(eQe(a,N.lastComponent,n,t,a.useLongestToken));v[T]=N,N.oldPos+1>=u&&(w=Math.min(w,T-1)),x+1>=c&&(_=Math.max(_,T+1))}d++}if(s)(function T(){setTimeout(function(){if(d>h||Date.now()>g)return s();S()||T()},0)})();else for(;d<=h&&Date.now()<=g;){var E=S();if(E)return E}},addToPath:function(t,n,r,i){var s=t.lastComponent;return s&&s.added===n&&s.removed===r?{oldPos:t.oldPos+i,lastComponent:{count:s.count+1,added:n,removed:r,previousComponent:s.previousComponent}}:{oldPos:t.oldPos+i,lastComponent:{count:1,added:n,removed:r,previousComponent:s}}},extractCommon:function(t,n,r,i){for(var s=n.length,a=r.length,o=t.oldPos,c=o-i,u=0;c+1<s&&o+1<a&&this.equals(n[c+1],r[o+1]);)c++,o++,u++;return u&&(t.lastComponent={count:u,previousComponent:t.lastComponent}),t.oldPos=o,c},equals:function(t,n){return this.options.comparator?this.options.comparator(t,n):t===n||this.options.ignoreCase&&t.toLowerCase()===n.toLowerCase()},removeEmpty:function(t){for(var n=[],r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function eQe(e,t,n,r,i){for(var s=[],a;t;)s.push(t),a=t.previousComponent,delete t.previousComponent,t=a;s.reverse();for(var o=0,c=s.length,u=0,d=0;o<c;o++){var h=s[o];if(h.removed){if(h.value=e.join(r.slice(d,d+h.count)),d+=h.count,o&&s[o-1].added){var g=s[o-1];s[o-1]=s[o],s[o]=g}}
856else{if(!h.added&&i){var p=n.slice(u,u+h.count);p=p.map(function(x,_){var w=r[d+_];return w.length>x.length?w:x}),h.value=e.join(p)}else h.value=e.join(n.slice(u,u+h.count));u+=h.count,h.added||(d+=h.count)}}var v=s[c-1];return c>1&&typeof v.value=="string"&&(v.added||v.removed)&&e.equals("",v.value)&&(s[c-2].value+=v.value,s.pop()),s}var YQ=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,XQ=/\S/,Jme=new Wm;Jme.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!XQ.test(e)&&!XQ.test(t)};Jme.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&YQ.test(t[n])&&YQ.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var ege=new Wm;ege.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,` 857`));var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var i=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=i:(this.options.ignoreWhitespace&&(i=i.trim()),t.push(i))}return t};var tQe=new Wm;tQe.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var nQe=new Wm;nQe.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Nk(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Nk=function(t){return typeof t}:Nk=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nk(e)}var rQe=Object.prototype.toString,hS=new Wm;hS.useLongestToken=!0;hS.tokenize=ege.tokenize;hS.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,i=r===void 0?function(s,a){return typeof a>"u"?n:a}:r;return typeof e=="string"?e:JSON.stringify(eF(e,null,null,i),i," ")};hS.equals=function(e,t){return Wm.prototype.equals.call(hS,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function eF(e,t,n,r,i){t=t||[],n=n||[],r&&(e=r(i,e));var s;for(s=0;s<t.length;s+=1)if(t[s]===e)return n[s];var a;if(rQe.call(e)==="[object Array]"){for(t.push(e),a=new Array(e.length),n.push(a),s=0;s<e.length;s+=1)a[s]=eF(e[s],t,n,r,i);return t.pop(),n.pop(),a}if(e&&e.toJSON&&(e=e.toJSON()),Nk(e)==="object"&&e!==null){t.push(e),a={},n.push(a);var o=[],c;for(c in e)e.hasOwnProperty(c)&&o.push(c);for(o.sort(),s=0;s<o.length;s+=1)c=o[s],a[c]=eF(e[c],t,n,r,c);t.pop(),n.pop()}else a=e;return a}var tF=new Wm;tF.tokenize=function(e){return e.slice()};tF.join=tF.removeEmpty=function(e){return e};Ar.red,Ar.grey,Ar.green;Ar.dim().italic;Ar.dim("â");Ar.dim("·");Ar.dim("âµ");function v3(e){e=e.replace(/\r?\n/g,` 858`);let t=e.match(/^[ \t]*(?=\S)/gm),n=0,r=1/0,i=(t||[]).length;for(;n<i;n++)r=Math.min(r,t[n].length);return i&&r?e.replace(new RegExp(`^[ \\t]{${r}}`,"gm"),""):e}class iQe extends Error{constructor(t={}
858){super(t.message),this.name="Assertion",this.code="ERR_ASSERTION",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.details=t.details||!1,this.generated=!!t.generated,this.operator=t.operator,this.expects=t.expects,this.actual=t.actual}}function Oc(e,t,n,r,i,s,a){if(e)return;let o=a||s;if(a instanceof Error)throw a;let c=i;throw new iQe({actual:t,expects:n,operator:r,message:o,details:c,generated:!a})}function sQe(e,t){Oc(!!e,!1,!0,"ok",!1,"Expected value to be truthy",t)}function jh(e,t){Oc(!e,!0,!1,"not",!1,"Expected value to be falsey",t)}jh.ok=jh;jh.equal=function(e,t,n){Oc(!$w(e,t),e,t,"not.equal",!1,"Expected values not to be deeply equal",n)};jh.type=function(e,t,n){let r=typeof e;Oc(r!==t,r,t,"not.type",!1,`Expected "${r}" not to be "${t}"`,n)};jh.instance=function(e,t,n){let r="`"+(t.name||t.constructor.name)+"`";Oc(!(e instanceof t),e,t,"not.instance",!1,`Expected value not to be an instance of ${r}`,n)};jh.snapshot=function(e,t,n){e=v3(e),t=v3(t),Oc(e!==t,e,t,"not.snapshot",!1,"Expected value not to match snapshot",n)};jh.fixture=function(e,t,n){e=v3(e),t=v3(t),Oc(e!==t,e,t,"not.fixture",!1,"Expected value not to match fixture",n)};jh.match=function(e,t,n){typeof t=="string"?Oc(!e.includes(t),e,t,"not.match",!1,`Expected value not to include "${t}" substring`,n):Oc(!t.test(e),e,t,"not.match",!1,`Expected value not to match \`${String(t)}\` pattern`,n)};jh.throws=function(e,t,n){!n&&typeof t=="string"&&(n=t,t=null);try{e()}catch(r){typeof t=="function"?Oc(!t(r),!0,!1,"not.throws",!1,"Expected function not to throw matching exception",n):t instanceof RegExp?Oc(!t.test(r.message),!0,!1,"not.throws",!1,`Expected function not to throw exception matching \`${String(t)}\` pattern`,n):t||Oc(!1,!0,!1,"not.throws",!1,"Expected function not to throw",n)}};const ao={eof:null,exclamationMark:33,dash:45,equalsTo:61,greaterThan:62},QQ={attentionSideAfter:2},$f={data:"data",lineEnding:"lineEnding",linePrefix:"linePrefix",characterEscape:"characterEscape"};var k_="highlightSequenceTemporary",ZQ="highlightSequence",aQe="highlight",oQe="highlightText";function lQe(){const e={name:"highlight",tokenize:n,resolveAll:t};return{text:{[ao.equalsTo]:e},insideSpan:{null:[e]},attentionMarkers:{null:[ao.equalsTo]}};function t(r,i){let s=-1;for(;++s<r.length;)if(r[s][0]==="enter"&&r[s][1].type===k_&&r[s][1]._close){let a=s;for(;a--;)if(r[a][0]==="exit"&&r[a][1].type===k_&&r[a][1]._open&&r[s][1].end.offset-r[s][1].start.offset===r[a][1].end.offset-r[a][1].start.offset){r[s][1].type=ZQ,r[a][1].type=ZQ;const o={type:aQe,start:Object.assign({},r[a][1].start),end:Object.assign({},r[s][1].end)},c={type:oQe,start:Object.assign({},r[a][1].end),end:Object.assign({},r[s][1].start)},u=[["enter",o,i],["enter",r[a][1],i],["exit",r[a][1],i],["enter",c,i]],d=i.parser.constructs.insideSpan.null;d&&xo(u,u.length,0,$E(d,r.slice(a+1,s),i)),xo(u,u.length,0,[["exit",c,i],["enter",r[s][1],i],["exit",r[s][1],i],["exit",o,i]]),xo(r,a-1,s-a+3,u),s=a+u.length-2;break}}for(s=-1;++s<r.length;)r[s][1].type===k_&&(r[s][1].type=$f.data);return r}function n(r,i,s){const a=this.previous,o=this.events;let c=0;return u;function u(h){return sQe(h===ao.equalsTo,"expected `=`"),a===ao.equalsTo&&o[o.length-1][1].type!==$f.characterEscape?s(h):(r.enter(k_),d(h))}function d(h){const p=_m(a);if(h===ao.equalsTo)return c>1?s(h):(r.consume(h),c++,d);if(c<2)return s(h);const g=r.exit(k_),v=_m(h);return g._open=!v||v===QQ.attentionSideAfter&&!!p,g._close=!p||p===QQ.attentionSideAfter&&!!v,i(h)}}}const cQe=/[$_\p{ID_Start}]/u,uQe=/[$_\u{200C}\u{200D}\p{ID_Continue}]/u,dQe=/[-$_\u{200C}\u{200D}\p{ID_Continue}]/u,fQe=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,hQe=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,tge={};function Jc(e){return e?cQe.test(String.fromCodePoint(e)):!1}function N_(e,t){const r=(t||tge).jsx?dQe:uQe;return e?r.test(String.fromCodePoint(e)):!1}function JQ(e,t){return(tge.jsx?hQe:fQe).test(e)}function yr(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(c){return er(c)?(e.enter(n),o(c)):t(c)}function o(c){return er(c)&&s++<i?(e.consume(c),o):(e.exit(n),t(c))}}const pQe={}.hasOwnProperty,mQe=Symbol("continue"),DP=Symbol("exit"),gQe=Symbol("skip");function xQe(e,t){let n,r;typeof t=="function"?n=t:t&&typeof t=="object"&&(t.enter&&(n=t.enter),t.leave&&(r=t.leave)),i(e,void 0,void 0,[])();function i(s,a,o,c){return FP(s)&&(u.displayName="node ("+s.type+")"),u;function u(){const d=n?eZ(n(s,a,o,c)):[];if(d[0]===DP)return d;if(d[0]!==gQe){let h;for(h in s)if(pQe.call(s,h)&&s[h]&&typeof s[h]=="object"&&h!=="data"&&h!=="position"){const p=c.concat(s),g=s[h];if(Array.isArray(g)){const v=g;let x=0;for(;x>-1&&x<v.length;){const _=v[x];if(FP(_)){const w=i(_,h,x,p)();if(w[0]===DP)return w;x=typeof w[1]=="number"?w[1]:x+1}else x++}}else if(FP(g)){const v=i(g,h,void 0,p)();if(v[0]===DP)return v}}}return r?eZ(r(s,a,o,c)):d}}}function eZ(e){return Array.isArray(e)?e:typeof e=="number"?[mQe,e]:[e]}function FP(e){return!!(e&&typeof e=="object"&&"type"in e&&typeof e.type=="string"&&e.type.length>0)}function vQe(e,t){const n=t.prefix||"",r=t.suffix||"",i=Object.assign({},t.acornOptions),s=[],a=[],o=i.onComment,c=i.onToken;let u=!1,d,h;const p=Object.assign({},i,{onComment:s,preserveParens:!0});c&&(p.onToken=a);const g=yQe(e,t.tokenTypes),v=g.value,x=n+v+r,_=tZ(v);if(_&&!t.allowEmpty)throw new Gr("Unexpected empty expression",{place:S(0),ruleId:"unex
858pected-empty-expression",source:"micromark-extension-mdx-expression"});try{d=t.expression&&!_?t.acorn.parseExpressionAt(x,0,p):t.acorn.parse(x,p)}catch(E){const T=E,N=S(T.pos);T.message=String(T.message).replace(/ \(\d+:\d+\)$/,""),T.pos=N.offset,T.loc={line:N.line,column:N.column-1},h=T,u=T.raisedAt>=n.length+v.length||T.message==="Unterminated comment"}if(d&&t.expression&&!_)if(tZ(x.slice(d.end,x.length-r.length)))d={type:"Program",start:0,end:n.length+v.length,body:[{type:"ExpressionStatement",expression:d,start:0,end:n.length+v.length}],sourceType:"module",comments:[]};else{const E=S(d.end),T=new Error("Unexpected content after expression");T.pos=E.offset,T.loc={line:E.line,column:E.column-1},h=T,d=void 0}if(d){if(d.comments=s,xQe(d,function(E,T,N,A){let k=A[A.length-1],j=T;E.type==="ParenthesizedExpression"&&k&&j&&(typeof N=="number"&&(k=k[j],j=N),k[j]=E.expression),w(E)}),Array.isArray(o))o.push(...s);else if(typeof o=="function")for(const E of s)o(E.type==="Block",E.value,E.start,E.end,E.loc.start,E.loc.end);for(const E of a)E.end<=n.length||E.start-n.length>=v.length||(w(E),Array.isArray(c)?c.push(E):c(E))}return{estree:d,error:h,swallow:u};function w(E){const T=S(E.start),N=S(E.end);E.start=T.offset,E.end=N.offset,E.loc={start:{line:T.line,column:T.column-1,offset:T.offset},end:{line:N.line,column:N.column-1,offset:N.offset}},E.range=[E.start,E.end]}function S(E){let T=E-n.length;T<0?T=0:T>v.length&&(T=v.length);let N=bQe(g.stops,T);return N||(N={line:t.start.line,column:t.start.column,offset:t.start.offset}),N}}function tZ(e){return/^\s*$/.test(e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/[^\r\n]*(\r\n|\n|\r)/g,""))}function yQe(e,t){const n={value:"",stops:[]};let r=-1;for(;++r<e.length;){const i=e[r];if(i[0]==="enter"){const s=i[1].type;if(s==="lineEnding"||t.includes(s)){const a=i[2].sliceStream(i[1]);for(;a.length>0&&a[0]===-1;)a.shift();const o=_Qe(a);n.stops.push([n.value.length,i[1].start]),n.value+=o,n.stops.push([n.value.length,i[1].end])}}}return n}function bQe(e,t){let n=0;for(;n<e.length&&e[n][0]<=t;)n+=1;if(n===0)return;const[r,i]=e[n-1],s=t-r;return{line:i.line,column:i.column+s,offset:i.offset+s}}function _Qe(e){let t=-1;const n=[];let r;for(;++t<e.length;){const i=e[t];let s;if(typeof i=="string")s=i;else switch(i){case-5:{s="\r";break}case-4:{s=` 859`;break}case-3:{s=`\r 860`;break}case-2:{s=" ";break}case-1:{if(r)continue;s=" ";break}default:s=String.fromCharCode(i)}r=i===-2,n.push(s)}return n.join("")}function LP(e){const t=e||{},n=t.loc||{},r=t.range||[void 0,void 0],i=nZ(n.start,r[0]||t.start),s=nZ(n.end,r[1]||t.end);if(i&&s)return{start:i,end:s}}function nZ(e,t){if(e&&typeof e=="object"){const n="line"in e?zP(e.line):void 0,r="column"in e?zP(e.column):void 0;if(n&&r!==void 0)return{line:n,column:r+1,offset:zP(t)}}}function zP(e){return typeof e=="number"&&e>-1?e:void 0}const wQe=2,o1="https://github.com/micromark/micromark-extension-mdx-expression/tree/main/packages/micromark-extension-mdx-expression",SQe="#unexpected-end-of-file-in-expression-expected-a-corresponding-closing-brace-for-",EQe="#unexpected-lazy-line-in-expression-in-container-expected-line-to-be-prefixed",rZ="#unexpected-type-in-code-expected-an-object-spread-spread",CQe="#unexpected-extra-content-in-spread-only-a-single-spread-is-supported",TQe="#could-not-parse-expression-with-acorn";function iZ(e,t,n,r,i,s,a,o,c,u,d){const h=this,p=this.events.length+3;let g=0,v,x;return _;function _(T){return e.enter(n),e.enter(r),e.consume(T),e.exit(r),v=h.now(),w}function w(T){if(T===null){if(x)throw x;const N=new Gr("Unexpected end of file in expression, expected a corresponding closing brace for `{`",{place:h.now(),ruleId:"unexpected-eof",source:"micromark-extension-mdx-expression"});throw N.url=o1+SQe,N}if(bn(T))return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),E;if(T===125&&g===0){const N=s?AQe.call(h,s,a,i,p,v,u||!1,c||!1):{type:"ok",estree:void 0};if(N.type==="ok"){e.enter(r),e.consume(T),e.exit(r);const A=e.exit(n);return o&&N.estree&&Object.assign(A,{estree:N.estree}),t}return x=N.message,e.enter(i),e.consume(T),S}return e.enter(i),S(T)}function S(T){return T===125&&g===0||T===null||bn(T)?(e.exit(i),w(T)):(T===123&&!s?g+=1:T===125&&(g-=1),e.consume(T),S)}function E(T){const N=h.now();if(N.line!==v.line&&!d&&h.parser.lazy[N.line]){const A=new Gr("Unexpected lazy line in expression in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",{place:h.now(),ruleId:"unex
860pected-lazy",source:"micromark-extension-mdx-expression"});throw A.url=o1+EQe,A}return er(T)?yr(e,w,"linePrefix",wQe+1)(T):w(T)}}function AQe(e,t,n,r,i,s,a){const o=vQe(this.events.slice(r),{acorn:e,tokenTypes:[n],acornOptions:t,start:i,expression:!0,allowEmpty:s,prefix:a?"({":"",suffix:a?"})":""}),c=o.estree;if(a&&c){const u=c.body[0];if(u.type!=="ExpressionStatement"||u.expression.type!=="ObjectExpression"){const d=LP(u),h=new Gr("Unexpected `"+u.type+"` in code: expected an object spread (`{...spread}`)",{place:d.start,ruleId:"non-spread",source:"micromark-extension-mdx-expression"});throw h.url=o1+rZ,h}if(u.expression.properties[1]){const d=LP(u.expression.properties[1]),h=new Gr("Unexpected extra content in spread: only a single spread is supported",{place:d.start,ruleId:"spread-extra",source:"micromark-extension-mdx-expression"});throw h.url=o1+CQe,h}if(u.expression.properties[0]&&u.expression.properties[0].type!=="SpreadElement"){const d=LP(u.expression.properties[0]),h=new Gr("Unexpected `"+u.expression.properties[0].type+"` in code: only spread elements are supported",{place:d.start,ruleId:"non-spread",source:"micromark-extension-mdx-expression"});throw h.url=o1+rZ,h}}if(o.error){const u=new Gr("Could not parse expression with acorn",{cause:o.error,place:{line:o.error.loc.line,column:o.error.loc.column+1,offset:o.error.pos},ruleId:"acorn",source:"micromark-extension-mdx-expression"});return u.url=o1+TQe,{type:"nok",message:u}}return{type:"ok",estree:c}}const sZ="https://github.com/micromark/micromark-extension-mdx-jsx";function nge(e,t,n,r,i,s,a,o,c,u,d,h,p,g,v,x,_,w,S,E,T,N,A,k,j,R,P,V,U,G,Q,Z){const K=this;let te,ne;return se;function se(oe){return e.enter(o),e.enter(c),e.consume(oe),e.exit(c),H}function H(oe){return jr(oe)?n(oe):(te=O,be(oe))}function O(oe){if(oe===47)return e.enter(u),e.consume(oe),e.exit(u),te=L,be;if(oe===62)return De(oe);if(oe!==null&&oe>=0&&Jc(oe))return e.enter(h),e.enter(p),e.consume(oe),M;Le(oe,"before name","a character that can start a name, such as a letter, `$`, or `_`"+(oe===33?" (note: to create a comment in MDX, use `{/* text */}`)":""))}function L(oe){if(oe===62)return De(oe);if(oe!==null&&oe>=0&&Jc(oe))return e.enter(h),e.enter(p),e.consume(oe),M;Le(oe,"before name","a character that can start a name, such as a letter, `$`, or `_`"+(oe===42||oe===47?" (note: JS comments in JSX tags are not supported in MDX)":""))}function M(oe){if(oe!==null&&oe>=0&&N_(oe,{jsx:!0}))return e.consume(oe),M;if(oe===46||oe===47||oe===58||oe===62||oe===123||jr(oe)||Io(oe))return e.exit(p),te=q,be(oe);Le(oe,"in name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(oe===64?" (note: to create a link in MDX, use `[text](url)`)":""))}function q(oe){if(oe===46)return e.enter(g),e.consume(oe),e.exit(g),te=X,be;if(oe===58)return e.enter(x),e.consume(oe),e.exit(x),te=re,be;if(oe===47||oe===62||oe===123||oe!==null&&oe>=0&&Jc(oe))return e.exit(h),Te(oe);Le(oe,"after name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function X(oe){if(oe!==null&&oe>=0&&Jc(oe))return e.enter(v),e.consume(oe),J;Le(oe,"before member name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function J(oe){if(oe!==null&&oe>=0&&N_(oe,{jsx:!0}))return e.consume(oe),J;if(oe===46||oe===47||oe===62||oe===123||jr(oe)||Io(oe))return e.exit(v),te=W,be(oe);Le(oe,"in member name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(oe===64?" (note: to create a link in MDX, use `[text](url)`)":""))}function W(oe){if(oe===46)return e.enter(g),e.consume(oe),e.exit(g),te=X,be;if(oe===47||oe===62||oe===123||oe!==null&&oe>=0&&Jc(oe))return e.exit(h),Te(oe);Le(oe,"after member name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function re(oe){if(oe!==null&&oe>=0&&Jc(oe))return e.enter(_),e.consume(oe),ae;Le(oe,"before local name","a character that can start a name, such as a letter, `$`, or `_`"+(oe===43||oe!==null&&oe>46&&oe<58?" (note: to create a link in MDX, use `[text](url)`)":""))}function ae(oe){if(oe!==null&&oe>=0&&N_(oe,{jsx:!0}))return e.consume(oe),ae;if(oe===47||oe===62||oe===123||jr(oe)||Io(oe))return e.exit(_),te=ce,be(oe);
vendor: 4,483 bytes, line 860
860Le(oe,"in local name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ce(oe){if(oe===47||oe===62||oe===123||oe!==null&&oe>=0&&Jc(oe))return e.exit(h),Te(oe);Le(oe,"after local name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function Te(oe){if(oe===47)return e.enter(d),e.consume(oe),e.exit(d),te=Ne,be;if(oe===62)return De(oe);if(oe===123)return iZ.call(K,e,fe,w,S,E,r,i,s,!0,!1,a)(oe);if(oe!==null&&oe>=0&&Jc(oe))return e.enter(T),e.enter(N),e.enter(A),e.consume(oe),xe;Le(oe,"before attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function fe(oe){return te=Te,be(oe)}function xe(oe){if(oe!==null&&oe>=0&&N_(oe,{jsx:!0}))return e.consume(oe),xe;if(oe===47||oe===58||oe===61||oe===62||oe===123||jr(oe)||Io(oe))return e.exit(A),te=ke,be(oe);Le(oe,"in attribute name","an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function ke(oe){if(oe===58)return e.enter(k),e.consume(oe),e.exit(k),te=Fe,be;if(oe===61)return e.exit(N),e.enter(R),e.consume(oe),e.exit(R),te=et,be;if(oe===47||oe===62||oe===123||jr(oe)||Io(oe)||oe!==null&&oe>=0&&Jc(oe))return e.exit(N),e.exit(T),te=Te,be(oe);Le(oe,"after attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Fe(oe){if(oe!==null&&oe>=0&&Jc(oe))return e.enter(j),e.consume(oe),tt;Le(oe,"before local attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function tt(oe){if(oe!==null&&oe>=0&&N_(oe,{jsx:!0}))return e.consume(oe),tt;if(oe===47||oe===61||oe===62||oe===123||jr(oe)||Io(oe))return e.exit(j),e.exit(N),te=Se,be(oe);Le(oe,"in local attribute name","an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function Se(oe){if(oe===61)return e.enter(R),e.consume(oe),e.exit(R),te=et,be;if(oe===47||oe===62||oe===123||oe!==null&&oe>=0&&Jc(oe))return e.exit(T),Te(oe);Le(oe,"after local attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function et(oe){if(oe===34||oe===39)return e.enter(P),e.enter(V),e.consume(oe),e.exit(V),ne=oe,ie;if(oe===123)return iZ.call(K,e,pt,G,Q,Z,r,i,s,!1,!1,a)(oe);Le(oe,"before attribute value","a character that can start an attribute value, such as `\"`, `'`, or `{`"+(oe===60?" (note: to use an element or fragment as a prop value in MDX, use `{<element />}`)":""))}function pt(oe){return e.exit(T),te=Te,be(oe)}function ie(oe){return oe===null&&Le(oe,"in attribute value","a corresponding closing quote `"+String.fromCodePoint(ne)+"`"),oe===ne?(e.enter(V),e.consume(oe),e.exit(V),e.exit(P),e.exit(T),ne=void 0,te=Te,be):bn(oe)?(te=ie,be(oe)):(e.enter(U),ue(oe))}function ue(oe){return oe===null||oe===ne||bn(oe)?(e.exit(U),ie(oe)):(e.consume(oe),ue)}function Ne(oe){if(oe===62)return De(oe);Le(oe,"after self-closing slash","`>` to end the tag"+(oe===42||oe===47?" (note: JS comments in JSX tags are not supported in MDX)":""))}function De(oe){return e.enter(c),e.consume(oe),e.exit(c),e.exit(o),t}function be(oe){return bn(oe)?(e.enter("lineEnding"),e.consume(oe),e.exit("lineEnding"),we):er(oe)||Io(oe)?(e.enter("esWhitespace"),me(oe)):te(oe)}function me(oe){return bn(oe)?(e.exit("esWhitespace"),be(oe)):er(oe)||Io(oe)?(e.consume(oe),me):(e.exit("esWhitespace"),te(oe))}function we(oe){if(!a&&K.parser.lazy[K.now().line]){const St=new Gr("Unexpected lazy line in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",K.now(),"micromark-extension-mdx-jsx:unexpected-lazy");throw St.url=sZ+"#unexpected-lazy-line-in-container-expected-line-to-be",St}return be(oe)}function Le(oe,St,Ut){const Ht=new Gr("Unexpected "+(oe===null?"end of file":"character `"+(oe===96?"` ` `":String.fromCodePoint(oe))+"` ("+kQe(oe)+")")+" "+St+", expected "+Ut,K.now(),"micromark-extension-mdx-jsx:unexpected-"+(oe===null?"eof":"character"));throw Ht.url=sZ+(oe===null?"#unexpected-end-of-file-at-expected-expect":"#unexpected-character-at-ex
860pected-expect"),Ht}}function kQe(e){return"U+"+e.toString(16).toUpperCase().padStart(4,"0")}function NQe(e,t){return{name:"mdxJsxTextTag",tokenize:n};function n(r,i,s){return nge.call(this,r,i,s,e,t.acornOptions,t.addResult,!0,"mdxJsxTextTag","mdxJsxTextTagMarker","mdxJsxTextTagClosingMarker","mdxJsxTextTagSelfClosingMarker","mdxJsxTextTagName","mdxJsxTextTagNamePrimary","mdxJsxTextTagNameMemberMarker","mdxJsxTextTagNameMember","mdxJsxTextTagNamePrefixMarker","mdxJsxTextTagNameLocal","mdxJsxTextTagExpressionAttribute","mdxJsxTextTagExpressionAttributeMarker","mdxJsxTextTagExpressionAttributeValue","mdxJsxTextTagAttribute","mdxJsxTextTagAttributeName","mdxJsxTextTagAttributeNamePrimary","mdxJsxTextTagAttributeNamePrefixMarker","mdxJsxTextTagAttributeNameLocal","mdxJsxTextTagAttributeInitializerMarker","mdxJsxTextTagAttributeValueLiteral","mdxJsxTextTagAttributeValueLiteralMarker","mdxJsxTextTagAttributeValueLiteralValue","mdxJsxTextTagAttributeValueExpression","mdxJsxTextTagAttributeValueExpressionMarker","mdxJsxTextTagAttributeValueExpressionValue")}}function jQe(e,t){return{concrete:!0,name:"mdxJsxFlowTag",tokenize:n};function n(r,i,s){const a=this;return o;function o(h){return c(h)}function c(h){return nge.call(a,r,u,s,e,t.acornOptions,t.addResult,!1,"mdxJsxFlowTag","mdxJsxFlowTagMarker","mdxJsxFlowTagClosingMarker","mdxJsxFlowTagSelfClosingMarker","mdxJsxFlowTagName","mdxJsxFlowTagNamePrimary","mdxJsxFlowTagNameMemberMarker","mdxJsxFlowTagNameMember","mdxJsxFlowTagNamePrefixMarker","mdxJsxFlowTagNameLocal","mdxJsxFlowTagExpressionAttribute","mdxJsxFlowTagExpressionAttributeMarker","mdxJsxFlowTagExpressionAttributeValue","mdxJsxFlowTagAttribute","mdxJsxFlowTagAttributeName","mdxJsxFlowTagAttributeNamePrimary","mdxJsxFlowTagAttributeNamePrefixMarker","mdxJsxFlowTagAttributeNameLocal","mdxJsxFlowTagAttributeInitializerMarker","mdxJsxFlowTagAttributeValueLiteral","mdxJsxFlowTagAttributeValueLiteralMarker","mdxJsxFlowTagAttributeValueLiteralValue","mdxJsxFlowTagAttributeValueExpression","mdxJsxFlowTagAttributeValueExpressionMarker","mdxJsxFlowTagAttributeValueExpressionValue")(h)}function u(h){return er(h)?yr(r,d,"whitespace")(h):d(h)}function d(h){const p=a.parser.constructs.flow[123],g=Array.isArray(p)?p:p?[p]:[];let v;for(const x of g)if(x.name==="mdxFlowExpression"){v=x;break}return h===60?o(h):h===123&&v?r.attempt(v,d,s)(h):h===null||bn(h)?i(h):s(h)}}}function RQe(e){const t={},n=t.acorn;let r;if(n){if(!n.parse||!n.parseExpressionAt)throw new Error("Expected a proper `acorn` instance passed in as `options.acorn`");r=Object.assign({ecmaVersion:2024,sourceType:"module"},t.acornOptions,{locations:!0})}else if(t.acornOptions||t.addResult)throw new Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{60:jQe(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})},text:{60:NQe(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})}}}function IQe(){return{disable:{null:["autolink","codeIndented","htmlFlow","htmlText"]}}}const aZ={}.hasOwnProperty;function Uz(e,t){const n=t||{};function r(i,...s){let a=r.invalid;const o=r.handlers;if(i&&aZ.call(i,e)){const c=String(i[e]);a=aZ.call(o,c)?o[c]:r.unknown}if(a)return a.call(this,i,...s)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const OQe={}.hasOwnProperty;function rge(e,t){let n=-1,r;if(t.extensions)for(;++n<t.extensions.length;)rge(e,t.extensions[n]);for(r in t)if(OQe.call(t,r))switch(r){case"extensions":break;case"unsafe":{oZ(e[r],t[r]);break}case"join":{oZ(e[r],t[r]);break}case"handlers":{PQe(e[r],t[r]);break}default:e.options[r]=t[r]}return e}function oZ(e,t){t&&e.push(...t)}function PQe(e,t){t&&Object.assign(e,t)}function MQe(e,t,n,r){const i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const a=n.indentLines(n.containerFlow(e,s.current()),DQe);return i(),a}function DQe(e,t,n){return">"+(n?"":" ")+e}function ige(e,t){return lZ(e,t.inConstruct,!0)&&!lZ(e,t.notInConstruct,!1)}function lZ(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function cZ(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===` 861`&&ige(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\ 862`}function FQe(e,t){const n=String(e);let r=n.indexOf(t),i=r,s=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>
vendor: 6,910 bytes, lines 862-871
862a&&(a=s):s=1,i=r+t.length,r=n.indexOf(t,i);return a}function nF(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function LQe(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function zQe(e,t,n,r){const i=LQe(n),s=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(nF(e,n)){const h=n.enter("codeIndented"),p=n.indentLines(s,$Qe);return h(),p}const o=n.createTracker(r),c=i.repeat(Math.max(FQe(s,i)+1,3)),u=n.enter("codeFenced");let d=o.move(c);if(e.lang){const h=n.enter(`codeFencedLang${a}`);d+=o.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...o.current()})),h()}if(e.lang&&e.meta){const h=n.enter(`codeFencedMeta${a}`);d+=o.move(" "),d+=o.move(n.safe(e.meta,{before:d,after:` 863`,encode:["`"],...o.current()})),h()}return d+=o.move(` 864`),s&&(d+=o.move(s+` 865`)),d+=o.move(c),u(),d}function $Qe(e,t,n){return(n?"":" ")+e}function Vz(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function BQe(e,t,n,r){const i=Vz(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("definition");let o=n.enter("label");const c=n.createTracker(r);let u=c.move("[");return u+=c.move(n.safe(n.associationId(e),{before:u,after:"]",...c.current()})),u+=c.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(o=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":` 866`,...c.current()}))),o(),e.title&&(o=n.enter(`title${s}`),u+=c.move(" "+i),u+=c.move(n.safe(e.title,{before:u,after:i,...c.current()})),u+=c.move(i),o()),a(),u}function UQe(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function wm(e){return"&#x"+e.toString(16).toUpperCase()+";"}function y3(e,t,n){const r=_m(e),i=_m(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}sge.peek=VQe;function sge(e,t,n,r){const i=UQe(n),s=n.enter("emphasis"),a=n.createTracker(r),o=a.move(i);let c=a.move(n.containerPhrasing(e,{after:i,before:o,...a.current()}));const u=c.charCodeAt(0),d=y3(r.before.charCodeAt(r.before.length-1),u,i);d.inside&&(c=wm(u)+c.slice(1));const h=c.charCodeAt(c.length-1),p=y3(r.after.charCodeAt(0),h,i);p.inside&&(c=c.slice(0,-1)+wm(h));const g=a.move(i);return s(),n.attentionEncodeSurroundingInfo={after:p.outside,before:d.outside},o+c+g}function VQe(e,t,n){return n.options.emphasis||"*"}const a4=(function(e){if(e==null)return GQe;if(typeof e=="function")return o4(e);if(typeof e=="object")return Array.isArray(e)?HQe(e):qQe(e);if(typeof e=="string")return WQe(e);throw new Error("Expected function, string, or object as test")});function HQe(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=a4(e[n]);return o4(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function qQe(e){const t=e;return o4(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function WQe(e){return o4(t);function t(n){return n&&n.type===e}}function o4(e){return t;function t(n,r,i){return!!(KQe(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function GQe(){return!0}function KQe(e){return e!==null&&typeof e=="object"&&"type"in e}const age=[],YQe=!0,rF=!1,XQe="skip";function oge(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=a4(i),a=r?-1:1;o(e,void 0,[])();function o(c,u,d){const h=c&&typeof c=="object"?c:{};if(typeof h.type=="string"){const g=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(c.type+(g?"<"+g+">":""))+")"})}return p;function p(){let g=age,v,x,_;if((!t||s(c,u,d[d.length-1]||void 0))&&(g=QQe(n(c,d)),g[0]===rF))return g;if("children"in c&&c.children){const w=c;if(w.children&&g[0]!==XQe)for(x=(r?w.children.length:-1)+a,_=d.concat(w);x>-1&&x<w.children.length;){const S=w.children[x];if(v=o(S,x,_)(),v[0]===rF)return v;x=typeof v[1]=="number"?v[1]:x+a}}return g}}}function QQe(e){return Array.isArray(e)?e:typeof e=="number"?[YQe,e]:e==null?age:[e]}function l4(e,t,n,r){let i,s,a;typeof t=="function"&&typeof n!="function"?(s=void 0,a=t,i=n):(s=t,a=n,i=r),oge(e,s,o,i);function o(c,u){const d=u[u.length-1],h=d?d.children.indexOf(c):void 0;return a(c,h,d)}}const ZQe={};function Hz(e,t){const n=ZQe,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return lge(e,r,i)}function lge(e,t,n){if(JQe(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return uZ(e.children,t,n)}return Array.isArray(e)?uZ(e,t,n):""}function uZ(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=lge(e[i],t,n);return r.join("")}function JQe(e){return!!(e&&typeof e=="object")}function cge(e,t){let n=!1;return l4(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,rF}),!!((!e.depth||e.depth<3)&&Hz(e)&&(t.options.setext||n))}function eZe(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(cge(e,n)){const d=n.enter("headingSetext"),h=n.enter("phrasing"),p=n.containerPhrasing(e,{...s.current(),before:` 867`,after:` 868`});return h(),d(),p+` 869`+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(` 870`))+1))}const a="#".repeat(i),o=n.enter("headingAtx"),c=n.enter("phrasing");s.move(a+" ");let u=n.containerPhrasing(e,{before:"# ",after:` 871`,...s.current()});return/^[\t ]/.test(u)&&(u=wm(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,n.options.closeAtx&&(u+=" "+a),c(),o(),u}uge.peek=tZe;function uge(e){return e.value||""}function tZe(){return"<"}dge.peek=nZe;function dge(e,t,n,r){const i=Vz(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let o=n.enter("label");const c=n.createTracker(r);let u=c.move("![");return u+=c.move(n.safe(e.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(o=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),o(),e.title&&(o=n.enter(`title${s}`),u+=c.move(" "+i),u+=c.move(n.safe(e.title,{before:u,after:i,...c.current()})),u+=c.move(i),o()),u+=c.move(")"),a(),u}function nZe(){return"!"}fge.peek=rZe;
vendor: 4,411 bytes, line 871
871function fge(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let a=n.enter("label");const o=n.createTracker(r);let c=o.move("![");const u=n.safe(e.alt,{before:c,after:"]",...o.current()});c+=o.move(u+"]["),a();const d=n.stack;n.stack=[],a=n.enter("reference");const h=n.safe(n.associationId(e),{before:c,after:"]",...o.current()});return a(),n.stack=d,s(),i==="full"||!u||u!==h?c+=o.move(h+"]"):i==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function rZe(){return"!"}hge.peek=iZe;function hge(e,t,n){let r=e.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<n.unsafe.length;){const a=n.unsafe[s],o=n.compilePattern(a);let c;if(a.atBreak)for(;c=o.exec(r);){let u=c.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(c.index+1)}}return i+r+i}function iZe(){return"`"}function pge(e,t){const n=Hz(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}mge.peek=sZe;function mge(e,t,n,r){const i=Vz(n),s=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let o,c;if(pge(e,n)){const d=n.stack;n.stack=[],o=n.enter("autolink");let h=a.move("<");return h+=a.move(n.containerPhrasing(e,{before:h,after:">",...a.current()})),h+=a.move(">"),o(),n.stack=d,h}o=n.enter("link"),c=n.enter("label");let u=a.move("[");return u+=a.move(n.containerPhrasing(e,{before:u,after:"](",...a.current()})),u+=a.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(c=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),c(),e.title&&(c=n.enter(`title${s}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),c()),u+=a.move(")"),o(),u}function sZe(e,t,n){return pge(e,n)?"<":"["}gge.peek=aZe;function gge(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let a=n.enter("label");const o=n.createTracker(r);let c=o.move("[");const u=n.containerPhrasing(e,{before:c,after:"]",...o.current()});c+=o.move(u+"]["),a();const d=n.stack;n.stack=[],a=n.enter("reference");const h=n.safe(n.associationId(e),{before:c,after:"]",...o.current()});return a(),n.stack=d,s(),i==="full"||!u||u!==h?c+=o.move(h+"]"):i==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function aZe(){return"["}function qz(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function oZe(e){const t=qz(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function lZe(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function xge(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function cZe(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let a=e.ordered?lZe(n):qz(n);const o=e.ordered?a==="."?")":".":oZe(n);let c=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&d&&(!d.children||!d.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),xge(n)===a&&d){let h=-1;for(;++h<e.children.length;){const p=e.children[h];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(a=o),n.bulletCurrent=a;const u=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=s,i(),u}function uZe(e){const t=e.options.listItemIndent||"one";
vendor: 6,795 bytes, lines 871-878
871if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function dZe(e,t,n,r){const i=uZe(n);let s=n.bulletCurrent||qz(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let a=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const o=n.createTracker(r);o.move(s+" ".repeat(a-s.length)),o.shift(a);const c=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,o.current()),d);return c(),u;function d(h,p,g){return p?(g?"":" ".repeat(a))+h:(g?s:s+" ".repeat(a-s.length))+h}}function fZe(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),a=n.containerPhrasing(e,r);return s(),i(),a}const hZe=a4(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function pZe(e,t,n,r){return(e.children.some(function(a){return hZe(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function mZe(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}vge.peek=gZe;function vge(e,t,n,r){const i=mZe(n),s=n.enter("strong"),a=n.createTracker(r),o=a.move(i+i);let c=a.move(n.containerPhrasing(e,{after:i,before:o,...a.current()}));const u=c.charCodeAt(0),d=y3(r.before.charCodeAt(r.before.length-1),u,i);d.inside&&(c=wm(u)+c.slice(1));const h=c.charCodeAt(c.length-1),p=y3(r.after.charCodeAt(0),h,i);p.inside&&(c=c.slice(0,-1)+wm(h));const g=a.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:p.outside,before:d.outside},o+c+g}function gZe(e,t,n){return n.options.strong||"*"}function xZe(e,t,n,r){return n.safe(e.value,r)}function vZe(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function yZe(e,t,n){const r=(xge(n)+(n.options.ruleSpaces?" ":"")).repeat(vZe(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Wz={blockquote:MQe,break:cZ,code:zQe,definition:BQe,emphasis:sge,hardBreak:cZ,heading:eZe,html:uge,image:dge,imageReference:fge,inlineCode:hge,link:mge,linkReference:gge,list:cZe,listItem:dZe,paragraph:fZe,root:pZe,strong:vge,text:xZe,thematicBreak:yZe},bZe=[_Ze];function _Ze(e,t,n,r){if(t.type==="code"&&nF(t,r)&&(e.type==="list"||e.type===t.type&&nF(e,r)))return!1;if("spread"in n&&typeof n.spread=="boolean")return e.type==="paragraph"&&(e.type===t.type||t.type==="definition"||t.type==="heading"&&cge(t,r))?void 0:n.spread?1:0}const kg=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],wZe=[{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:` 872`,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:kg},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r 873]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:kg},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r 874*])`},{character:"*",inConstruct:"phrasing",notInConstruct:kg},{atBreak:!0,character:"+",after:`(?:[ \r 875])`},{atBreak:!0,character:"-",after:`(?:[ \r 876-])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r 877]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:kg},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:kg},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:kg},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:kg},{atBreak:!0,character:"~"}];function yge(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}const SZe=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function bge(e){return e.replace(SZe,EZe)}function EZe(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return yge(n.slice(s?2:1),s?16:10)}return fS(n)||e}function CZe(e){return e.label||!e.identifier?e.label||"":bge(e.identifier)}function TZe(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function AZe(e,t,n){const r=t.indexStack,i=e.children||[],s=[];let a=-1,o=n.before,c;r.push(-1);let u=t.createTracker(n);for(;++a<i.length;){const d=i[a];let h;if(r[r.length-1]=a,a+1<i.length){let v=t.handle.handlers[i[a+1].type];v&&v.peek&&(v=v.peek),h=v?v(i[a+1],e,t,{before:"",after:"",...u.current()}).charAt(0):""}else h=n.after;s.length>0&&(o==="\r"||o===` 878`)&&d.type==="html"&&(s[s.length-1]=s[s.length-1].replace(/(\r?\n|\r)$/," "),o=" ",u=t.createTracker(n),u.move(s.join("")));let p=t.handle(d,e,t,{...u.current(),after:h,before:o});c&&c===p.slice(0,1)&&(p=wm(c.charCodeAt(0))+p.slice(1));const g=t.attentionEncodeSurroundingInfo;t.attentionEncodeSurroundingInfo=void 0,c=void 0,g&&(s.length>0&&g.before&&o===s[s.length-1].slice(-1)&&(s[s.length-1]=s[s.length-1].slice(0,-1)+wm(o.charCo
878deAt(0))),g.after&&(c=h)),u.move(p),s.push(p),o=p.slice(-1)}return r.pop(),s.join("")}function kZe(e,t,n){const r=t.indexStack,i=e.children||[],s=t.createTracker(n),a=[];let o=-1;for(r.push(-1);++o<i.length;){const c=i[o];r[r.length-1]=o,a.push(s.move(t.handle(c,e,t,{before:` 879`,after:` 880`,...s.current()}))),c.type!=="list"&&(t.bulletLastUsed=void 0),o<i.length-1&&a.push(s.move(NZe(c,i[o+1],e,t)))}return r.pop(),a.join("")}function NZe(e,t,n,r){let i=r.join.length;for(;i--;){const s=r.join[i](e,t,n,r);if(s===!0||s===1)break;if(typeof s=="number")return` 881`.repeat(1+s);if(s===!1)return` 882 883<!----> 884 885`}return` 886 887`}const jZe=/\r?\n|\r/g;function RZe(e,t){const n=[];let r=0,i=0,s;for(;s=jZe.exec(e);)a(e.slice(r,s.index)),n.push(s[0]),r=s.index+s[0].length,i++;return a(e.slice(r)),n.join("");function a(o){n.push(t(o,i,!o))}}function IZe(e,t,n){const r=(n.before||"")+(t||"")+(n.after||""),i=[],s=[],a={};let o=-1;for(;++o<e.unsafe.length;){const d=e.unsafe[o];if(!ige(e.stack,d))continue;const h=e.compilePattern(d);let p;for(;p=h.exec(r);){const g="before"in d||!!d.atBreak,v="after"in d,x=p.index+(g?p[1].length:0);i.includes(x)?(a[x].before&&!g&&(a[x].before=!1),a[x].after&&!v&&(a[x].after=!1)):(i.push(x),a[x]={before:g,after:v})}}i.sort(OZe);let c=n.before?n.before.length:0;const u=r.length-(n.after?n.after.length:0);for(o=-1;++o<i.length;){const d=i[o];d<c||d>=u||d+1<u&&i[o+1]===d+1&&a[d].after&&!a[d+1].before&&!a[d+1].after||i[o-1]===d-1&&a[d].before&&!a[d-1].before&&!a[d-1].after||(c!==d&&s.push(dZ(r.slice(c,d),"\\")),c=d,/[!-/:-@[-`{-~]/.test(r.charAt(d))&&(!n.encode||!n.encode.includes(r.charAt(d)))?s.push("\\"):(s.push(wm(r.charCodeAt(d))),c++))}return s.push(dZ(r.slice(c,u),n.after)),s.join("")}function OZe(e,t){return e-t}function dZ(e,t){const n=/\\(?=[!-/:-@[-`{-~])/g,r=[],i=[],s=e+t;let a=-1,o=0,c;for(;c=n.exec(s);)r.push(c.index);for(;++a<r.length;)o!==r[a]&&i.push(e.slice(o,r[a])),i.push("\\"),o=r[a];return i.push(e.slice(o)),i.join("")}function PZe(e){const t=e||{},n=t.now||{};let r=t.lineShift||0,i=n.line||1,s=n.column||1;return{move:c,current:a,shift:o};function a(){return{now:{line:i,column:s},lineShift:r}}function o(u){r+=u}function c(u){const d=u||"",h=d.split(/\r?\n|\r/g),p=h[h.length-1];return i+=h.length-1,s=h.length===1?s+p.length:1+p.length+r,d}}function _ge(e,t){const n=t||{},r={associationId:CZe,containerPhrasing:LZe,containerFlow:zZe,createTracker:PZe,compilePattern:TZe,enter:s,handlers:{...Wz},handle:void 0,indentLines:RZe,indexStack:[],join:[...bZe],options:{},safe:$Ze,stack:[],unsafe:[...wZe]};rge(r,n),r.options.tightDefinitions&&r.join.push(FZe),r.handle=Uz("type",{invalid:MZe,unknown:DZe,handlers:r.handlers});let i=r.handle(e,void 0,r,{before:` 888`,after:` 889`,now:{line:1,column:1},lineShift:0});return i&&i.charCodeAt(i.length-1)!==10&&i.charCodeAt(i.length-1)!==13&&(i+=` 890`),i;function s(a){return r.stack.push(a),o;function o(){r.stack.pop()}}}function MZe(e){throw new Error("Cannot handle value `"+e+"`, expected node")}function DZe(e){const t=e;throw new Error("Cannot handle unknown node `"+t.type+"`")}function FZe(e,t){if(e.type==="definition"&&e.type===t.type)return 0}function LZe(e,t){return AZe(e,this,t)}function zZe(e,t){return kZe(e,this,t)}function $Ze(e,t){return IZe(this,e,t)}const BZe=["mdxJsxTextElement","mdxJsxFlowElement"];function wge(e){return BZe.includes(e.type)&&UZe.includes(e.name.toLowerCase())}const UZe=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","input","ins","kbd","label","legend","li","link","main","map","mark","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];function VZe(e,t){const n=fZ(e),r=fZ(t),i={...n,...r};return HZe(i)}function fZ(e){const t={};return e.split(";").filter(r=>r.trim()!=="").forEach(r=>{const[i,s]=r.split(":").map(a=>a.trim());t[i]=s}),t}function HZe(e){return Object.entries(e).map(([t,n])=>`${t}: ${n}`).join("; ")}function qZe(e){return e.children instanceof Array}function Sge({root:e,visitors:t,jsxComponentDescriptors:n,jsxIsAvailable:r,addImportStatements:i=!0}){let s=null;const a=new Set,o=new Map;t=t.sort((w,S)=>(S.priority??0)-(w.priority??0)),h(e,null);function c(w,S){a.add(w),S&&o.set(w,{...S})}function u(w,S){if(s===null)return s=S,s;if(!qZe(w))throw new Error("Attempting to append children to a non-parent");
890const E=w.children,T=E.at(-1);if(T){const N=t.find(A=>{var k;return(k=A.shouldJoin)==null?void 0:k.call(A,T,S)});if(N){const A=N.join(T,S);return E.splice(E.length-1,1,A),A}}return E.push(S),S}function d(w,S){w.getChildren().forEach(E=>{h(E,S)})}function h(w,S,E=null){var T;const N=t.find((A,k)=>{var j;return E?.has(k)?!1:(j=A.testLexicalNode)==null?void 0:j.call(A,w)});if(!N)throw new Error(`no lexical visitor found for ${w.getType()}`,{cause:w});(T=N.visitLexicalNode)==null||T.call(N,{lexicalNode:w,mdastParent:S,actions:{addAndStepInto(A,k={},j=!0){const R={type:A,...k,...j?{children:[]}:{}};u(S,R),rt(w)&&j&&d(w,R)},appendToParent:u,visitChildren:d,visit:h,registerReferredComponent:c,nextVisitor(){h(w,S,(E??new Set).add(t.indexOf(N)))}}})}if(s===null)throw new Error("traversal ended with no root element");const p=new Map,g=new Map;for(const w of a){const S=n.find(E=>E.name===w)??o.get(w)??n.find(E=>E.name==="*");if(!S)throw new Error(`Component ${w} is used but not imported`);if(S.source)if(S.defaultExport)g.set(w,S.source);else{const{source:E}=S,T=p.get(E);T?T.push(w):p.set(E,[w])}}if(!i){for(const[w,S]of p.entries()){const E=S.filter(T=>o.has(T));E.length>0?p.set(w,E):p.delete(w)}for(const w of g.keys())o.has(w)||g.delete(w)}const v=Array.from(p).map(([w,S])=>({type:"mdxjsEsm",value:`import { ${S.join(", ")} } from '${w}'`}));v.push(...Array.from(g).map(([w,S])=>({type:"mdxjsEsm",value:`import ${w} from '${S}'`})));const x=s,_=x.children.find(w=>w.type==="yaml");return _?x.children.splice(x.children.indexOf(_)+1,0,...v):x.children.unshift(...v),jk(x,[]),Ege(x),r||Cge(x),x}function Ege(e){if("children"in e&&e.children.length>0){if(wge(e)&&e.children.length===1){const t=e.children[0];t.type==="mdxJsxTextElement"&&t.name==="span"&&(t.attributes.forEach(n=>{if(n.type==="mdxJsxAttribute"){const r=e.attributes.find(i=>i.type==="mdxJsxAttribute"&&i.name===n.name);if(r)if(n.name==="className"){const i=new Set([...r.value.split(" "),...n.value.split(" ")]);r.value=Array.from(i).join(" ")}else n.name==="style"&&(r.value=VZe(r.value,n.value));else e.attributes.push(n)}}),e.children=t.children)}e.children.forEach(t=>{Ege(t)})}}function Cge(e){if(Object.hasOwn(e,"children")){const t=e,n=[];t.children.forEach(r=>{r.type==="mdxJsxTextElement"&&r.name==="u"?n.push({type:"html",value:"<u>"},...r.children,{type:"html",value:"</u>"}):(n.push(r),Cge(r))}),t.children=n}}const hZ=/\s+$/,pZ=/^\s+/;function jk(e,t){if(e.type==="strong"||e.type==="emphasis"){const n=e.children.at(-1);if(n?.type==="text"){const i=n.value.match(hZ);if(i){n.value=n.value.replace(hZ,"");const s=t.at(-1);s&&(s.children.splice(s.children.indexOf(e)+1,0,{type:"text",value:i[0]}),jk(s,t.slice(0,-1)))}}const r=e.children.at(0);if(r?.type==="text"){const i=r.value.match(pZ);if(i){r.value=r.value.replace(pZ,"");const s=t.at(-1);s&&(s.children.splice(s.children.indexOf(e),0,{type:"text",value:i[0]}),jk(s,t.slice(0,-1)))}}}if("children"in e&&e.children.length>0){const n=e;n.children.forEach(r=>{jk(r,[...t,n])})}}function WZe({root:e,toMarkdownOptions:t,toMarkdownExtensions:n,visitors:r,jsxComponentDescriptors:i,jsxIsAvailable:s}){return _ge(Sge({root:e,visitors:r,jsxComponentDescriptors:i,jsxIsAvailable:s}),{extensions:n,...t})+` 891`}const mZ={}.hasOwnProperty;function Tge(e){const t={};let n=-1;for(;++n<e.length;)GZe(t,e[n]);return t}function GZe(e,t){let n;for(n in t){const i=(mZ.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let a;if(s)for(a in s){mZ.call(i,a)||(i[a]=[]);const o=s[a];KZe(i[a],Array.isArray(o)?o:o?[o]:[])}}}function KZe(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);xo(e,0,0,r)}function Tu(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}function Zy(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let a="";if(s===37&&ho(e.charCodeAt(n+1))&&ho(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(a=String.fromCharCode(s));else if(s>55295&&s<57344){const o=e.charCodeAt(n+1);s<56320&&o>56319&&o<57344?(a=String.fromCharCode(s,o),i=1):a="�"}else a=String.fromCharCode(s);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}const YZe={tokenize:XZe};function XZe(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),yr(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),s(o)}function s(o){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,a(o)}function a(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return bn(o)?(e.consume(o),e.exit("chunkText"),s):(e.consume(o),a)}}const QZe={tokenize:ZZe},gZ={tokenize:JZe};function ZZe(e){const t=this,n=[];let r=0,i,s,a;return o;function o(E){if(r<n.length){const T=n[r];return t.containerState=T[1],e.attempt(T[0].continuation,c,u)(E)}return u(E)}function c(E){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&S();const T=t.events.length;let N=T,A;for(;N--;)if(t.events[N][0]==="exit"&&t.events[N][1].type==="chunkFlow"){A=t.events[N][1].end;break}w(r);let k=T;for(;k<t.events.length;)t.events[k][1].end={...A},k++;return xo(t.events,N+1,0,t.events.slice(T)),t.events.length=k,u(E)}return o(E)}function u(E){if(r===n.length){if(!i)return p(E);if(i.currentConstruct&&i.currentConstruct.concrete)return v(E);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(gZ,d,h)(E)}function d(E){return i&&S(),w(r),p(E)}function h(E){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,v(E)}function p(E){return t.containerState={},e.attempt(gZ,g,v)(E)}function g(E){return r++,n.push([t.currentConstruct,t.containerState]),p(E)}function v(E){if(E===null){i&&S(),w(0),e.consume(E);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),x(E)}function x(E){if(E===null){_(e.exit("chunkFlow"),!0),w(0),e.consume(E);return}return bn(E)?(e.consume(E),_(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(E),x)}function _(E,T){const N=t.sliceStream(E);
vendor: 6,483 bytes, line 891
891if(T&&N.push(null),E.previous=s,s&&(s.next=E),s=E,i.defineSkip(E.start),i.write(N),t.parser.lazy[E.start.line]){let A=i.events.length;for(;A--;)if(i.events[A][1].start.offset<a&&(!i.events[A][1].end||i.events[A][1].end.offset>a))return;const k=t.events.length;let j=k,R,P;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){if(R){P=t.events[j][1].end;break}R=!0}for(w(r),A=k;A<t.events.length;)t.events[A][1].end={...P},A++;xo(t.events,j+1,0,t.events.slice(k)),t.events.length=A}}function w(E){let T=n.length;for(;T-- >E;){const N=n[T];t.containerState=N[1],N[0].exit.call(t,e)}n.length=E}function S(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function JZe(e,t,n){return yr(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const iF={name:"attention",resolveAll:eJe,tokenize:tJe};function eJe(e,t){let n=-1,r,i,s,a,o,c,u,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const h={...e[r][1].end},p={...e[n][1].start};xZ(h,-c),xZ(p,c),a={type:c>1?"strongSequence":"emphasisSequence",start:h,end:{...e[r][1].end}},o={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},s={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?"strong":"emphasis",start:{...a.start},end:{...o.end}},e[r][1].end={...a.start},e[n][1].start={...o.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=wc(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=wc(u,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",s,t]]),u=wc(u,$E(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=wc(u,[["exit",s,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,u=wc(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,xo(e,r-1,n-r+3,u),n=r+u.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function tJe(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=_m(r);let s;return a;function a(c){return s=c,e.enter("attentionSequence"),o(c)}function o(c){if(c===s)return e.consume(c),o;const u=e.exit("attentionSequence"),d=_m(c),h=!d||d===2&&i||n.includes(c),p=!i||i===2&&d||n.includes(r);return u._open=!!(s===42?h:h&&(i||!p)),u._close=!!(s===42?p:p&&(d||!h)),t(c)}}function xZ(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const nJe={name:"autolink",tokenize:rJe};function rJe(e,t,n){let r=0;return i;function i(g){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(g){return Do(g)?(e.consume(g),a):g===64?n(g):u(g)}function a(g){return g===43||g===45||g===46||ho(g)?(r=1,o(g)):u(g)}function o(g){return g===58?(e.consume(g),r=0,c):(g===43||g===45||g===46||ho(g))&&r++<32?(e.consume(g),o):(r=0,u(g))}function c(g){return g===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),t):g===null||g===32||g===60||g3(g)?n(g):(e.consume(g),c)}function u(g){return g===64?(e.consume(g),d):yXe(g)?(e.consume(g),u):n(g)}function d(g){return ho(g)?h(g):n(g)}function h(g){return g===46?(e.consume(g),r=0,d):g===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),t):p(g)}function p(g){if((g===45||ho(g))&&r++<63){const v=g===45?p:h;return e.consume(g),v}return n(g)}}const BE={partial:!0,tokenize:iJe};function iJe(e,t,n){return r;function r(s){return er(s)?yr(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||bn(s)?t(s):n(s)}}const Age={continuation:{tokenize:aJe},exit:oJe,name:"blockQuote",tokenize:sJe};function sJe(e,t,n){const r=this;return i;function i(a){if(a===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),s}return n(a)}function s(a){return er(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function aJe(e,t,n){const r=this;return i;function i(a){return er(a)?yr(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return e.attempt(Age,t,n)(a)}}function oJe(e){e.exit("blockQuote")}const kge={name:"characterEscape",tokenize:lJe};function lJe(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return _Xe(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const Nge={name:"characterReference",tokenize:cJe};function cJe(e,t,n){const r=this;let i=0,s,a;return o;function o(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),c}function c(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),s=31,a=ho,d(h))}function u(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,a=bXe,d):(e.enter("characterReferenceValue"),s=7,a=Q8,d(h))}function d(h){if(h===59&&i){const p=e.exit("characterReferenceValue");return a===ho&&!fS(r.sliceSerialize(p))?n(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(h)&&i++<s?(e.consume(h),d):n(h)}}const vZ={partial:!0,tokenize:dJe},yZ={concrete:!0,name:"codeFenced",tokenize:uJe};function uJe(e,t,n){const r=this,i={partial:!0,tokenize:N};let s=0,a=0,o;return c;function c(A){return u(A)}function u(A){const k=r.events[r.events.length-1];return s=k&&k[1].type==="linePrefix"?k[2].sliceSerialize(k[1],!0).length:0,o=A,e.enter("co
891deFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(A)}function d(A){return A===o?(a++,e.consume(A),d):a<3?n(A):(e.exit("codeFencedFenceSequence"),er(A)?yr(e,h,"whitespace")(A):h(A))}function h(A){return A===null||bn(A)?(e.exit("codeFencedFence"),r.interrupt?t(A):e.check(vZ,x,T)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(A))}function p(A){return A===null||bn(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(A)):er(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),yr(e,g,"whitespace")(A)):A===96&&A===o?n(A):(e.consume(A),p)}function g(A){return A===null||bn(A)?h(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),v(A))}function v(A){return A===null||bn(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(A)):A===96&&A===o?n(A):(e.consume(A),v)}function x(A){return e.attempt(i,T,_)(A)}function _(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),w}function w(A){return s>0&&er(A)?yr(e,S,"linePrefix",s+1)(A):S(A)}function S(A){return A===null||bn(A)?e.check(vZ,x,T)(A):(e.enter("codeFlowValue"),E(A))}function E(A){return A===null||bn(A)?(e.exit("codeFlowValue"),S(A)):(e.consume(A),E)}function T(A){return e.exit("codeFenced"),t(A)}function N(A,k,j){let R=0;return P;function P(Z){return A.enter("lineEnding"),A.consume(Z),A.exit("lineEnding"),V}function V(Z){return A.enter("codeFencedFence"),er(Z)?yr(A,U,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Z):U(Z)}function U(Z){return Z===o?(A.enter("codeFencedFenceSequence"),G(Z)):j(Z)}function G(Z){return Z===o?(R++,A.consume(Z),G):R>=a?(A.exit("codeFencedFenceSequence"),er(Z)?yr(A,Q,"whitespace")(Z):Q(Z)):j(Z)}function Q(Z){return Z===null||bn(Z)?(A.exit("codeFencedFence"),k(Z)):j(Z)}}}function dJe(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const $P={name:"codeIndented",tokenize:hJe},fJe={partial:!0,tokenize:pJe};function hJe(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),yr(e,s,"linePrefix",5)(u)}function s(u){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?a(u):n(u)}function a(u){return u===null?c(u):bn(u)?e.attempt(fJe,a,c)(u):(e.enter("codeFlowValue"),o(u))}function o(u){return u===null||bn(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),o)}function c(u){return e.exit("codeIndented"),t(u)}}function pJe(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):bn(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):yr(e,s,"linePrefix",5)(a)}function s(a){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):bn(a)?i(a):n(a)}}const mJe={name:"codeText",previous:xJe,resolve:gJe,tokenize:vJe};function gJe(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function xJe(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function vJe(e,t,n){let r=0,i,s;return a;function a(h){return e.enter("codeText"),e.enter("codeTextSequence"),o(h)}function o(h){return h===96?(e.consume(h),r++,o):(e.exit("codeTextSequence"),c(h))}function c(h){return h===null?n(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),c):h===96?(s=e.enter("codeTextSequence"),i=0,d(h)):bn(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("codeTextData"),u(h))}function u(h){return h===null||h===32||h===96||bn(h)?(e.exit("codeTextData"),c(h)):(e.consume(h),u)}function d(h){return h===96?(e.consume(h),i++,d):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(s.type="codeTextData",u(h))}}class yJe{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&j_(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),j_(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),j_(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);j_(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);j_(this.left,n.reverse())}}}function j_(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function jge(e){const t={};let n=-1,r,i,s,a,o,c,u;const d=new yJe(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,s=0,s<c.length&&c[s][1].type==="lineEndingBlank"&&(s+=2),s<c.length&&c[s][1].type==="content"))for(;++s<c.length&&c[s][1].type!=="content";)c[s][1].type==="chunkText"&&(c[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,bJe(d,n)),n=t[n],u=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(a=d.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(d.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=s);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...d.get(i)[1].start},o=d.slice(i,n),o.unshift(r),d.splice(i,n-i+1,o))}}return xo(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!u}function bJe(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const o=a.events,c=[],u={};let d,h,p=-1,g=n,v=0,x=0;const _=[x];for(;g;){for(;e.get(++i)[1]!==g;);s.push(i),g._tokenizer||(d=r.sliceStream(g),g.next||d.push(null),h&&a.defineSki
vendor: 18,661 bytes, line 891
891p(g.start),g._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(d),g._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),h=g,g=g.next}for(g=n;++p<o.length;)o[p][0]==="exit"&&o[p-1][0]==="enter"&&o[p][1].type===o[p-1][1].type&&o[p][1].start.line!==o[p][1].end.line&&(x=p+1,_.push(x),g._tokenizer=void 0,g.previous=void 0,g=g.next);for(a.events=[],g?(g._tokenizer=void 0,g.previous=void 0):_.pop(),p=_.length;p--;){const w=o.slice(_[p],_[p+1]),S=s.pop();c.push([S,S+w.length-1]),e.splice(S,2,w)}for(c.reverse(),p=-1;++p<c.length;)u[v+c[p][0]]=v+c[p][1],v+=c[p][1]-c[p][0]-1;return u}const _Je={resolve:SJe,tokenize:EJe},wJe={partial:!0,tokenize:CJe};function SJe(e){return jge(e),e}function EJe(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?s(o):bn(o)?e.check(wJe,a,s)(o):(e.consume(o),i)}function s(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function a(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function CJe(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),yr(e,s,"linePrefix")}function s(a){if(a===null||bn(a))return n(a);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function Rge(e,t,n,r,i,s,a,o,c){const u=c||Number.POSITIVE_INFINITY;let d=0;return h;function h(w){return w===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(w),e.exit(s),p):w===null||w===32||w===41||g3(w)?n(w):(e.enter(r),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),x(w))}function p(w){return w===62?(e.enter(s),e.consume(w),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),g(w))}function g(w){return w===62?(e.exit("chunkString"),e.exit(o),p(w)):w===null||w===60||bn(w)?n(w):(e.consume(w),w===92?v:g)}function v(w){return w===60||w===62||w===92?(e.consume(w),g):g(w)}function x(w){return!d&&(w===null||w===41||jr(w))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(r),t(w)):d<u&&w===40?(e.consume(w),d++,x):w===41?(e.consume(w),d--,x):w===null||w===32||w===40||g3(w)?n(w):(e.consume(w),w===92?_:x)}function _(w){return w===40||w===41||w===92?(e.consume(w),x):x(w)}}function Ige(e,t,n,r,i,s){const a=this;let o=0,c;return u;function u(g){return e.enter(r),e.enter(i),e.consume(g),e.exit(i),e.enter(s),d}function d(g){return o>999||g===null||g===91||g===93&&!c||g===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?n(g):g===93?(e.exit(s),e.enter(i),e.consume(g),e.exit(i),e.exit(r),t):bn(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===null||g===91||g===93||bn(g)||o++>999?(e.exit("chunkString"),d(g)):(e.consume(g),c||(c=!er(g)),g===92?p:h)}function p(g){return g===91||g===92||g===93?(e.consume(g),o++,h):h(g)}}function Oge(e,t,n,r,i,s){let a;return o;function o(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),a=p===40?41:p,c):n(p)}function c(p){return p===a?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(s),u(p))}function u(p){return p===a?(e.exit(s),c(a)):p===null?n(p):bn(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),yr(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===a||p===null||bn(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?h:d)}function h(p){return p===a||p===92?(e.consume(p),d):d(p)}}function Bw(e,t){let n;return r;function r(i){return bn(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):er(i)?yr(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const TJe={name:"definition",tokenize:kJe},AJe={partial:!0,tokenize:NJe};function kJe(e,t,n){const r=this;let i;return s;function s(g){return e.enter("definition"),a(g)}function a(g){return Ige.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function o(g){return i=Tu(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),c):n(g)}function c(g){return jr(g)?Bw(e,u)(g):u(g)}function u(g){return Rge(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function d(g){return e.attempt(AJe,h,h)(g)}function h(g){return er(g)?yr(e,p,"whitespace")(g):p(g)}function p(g){return g===null||bn(g)?(e.exit("definition"),r.parser.defined.push(i),t(g)):n(g)}}function NJe(e,t,n){return r;function r(o){return jr(o)?Bw(e,i)(o):n(o)}function i(o){return Oge(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function s(o){return er(o)?yr(e,a,"whitespace")(o):a(o)}function a(o){return o===null||bn(o)?t(o):n(o)}}const jJe={name:"hardBreakEscape",tokenize:RJe};function RJe(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return bn(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const IJe={name:"headingAtx",resolve:OJe,tokenize:PJe};function OJe(e,t){let n=e.length-2,r=3,i,s;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},xo(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function PJe(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),s(d)}function s(d){return e.enter("atxHeadingSequence"),a(d)}function a(d){return d===35&&r++<6?(e.consume(d),a):d===null||jr(d)?(e.exit("atxHeadingSequence"),o(d)):n(d)}function o(d){return d===35?(e.enter("atxHeadingSequence"),c(d)):d===null||bn(d)?(e.exit("atxHeading"),t(d)):er(d)?yr(e,o,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function c(d){return d===35?(e.consume(d),c):(e.exit("atxHeadingSequence"),o(d))}function u(d){return d===null||d===35||jr(d)?(e.exit("atxHeadingText"),o(d)):(e.consume(d),u)}}const MJe=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],bZ=["pre","script","style","textarea"],DJe={concrete:!0,name:"htmlFlow",resolveTo:zJe,tokenize:$Je},FJe={partial:!0,tokenize:UJe},LJe={partial:!0,tokenize:BJe};function zJe(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function $Je(e,t,n){const r=this;let i,s,a,o,c;return u;function u(M){return d(M)}function d(M){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(M),h}function h(M){return M===33?(e.consume(M),p):M===47?(e.consume(M),s=!0,x):M===63?(e.consume(M),i=3,r.interrupt?t:H):Do(M)?(e.consume(M),a=String.fromCharCode(M),_):n(M)}function p(M){return M===45?(e.consume(M),i=2,g):M===91?(e.consume(M),i=5,o=0,v):Do(M)?(e.consume(M),i=4,r.interrupt?t:H):n(M)}function g(M){return M===45?(e.consume(M),r.interrupt?t:H):n(M)}function v(M){const q="CDATA[";return M===q.charCodeAt(o++)?(e.consume(M),o===q.length?r.interrupt?t:U:v):n(M)}function x(M){return Do(M)?(e.consume(M),a=String.fromCharCode(M),_):n(M)}function _(M){if(M===null||M===47||M===62||jr(M)){const q=M===47,X=a.toLowerCase();return!q&&!s&&bZ.includes(X)?(i=1,r.interrupt?t(M):U(M)):MJe.includes(a.toLowerCase())?(i=6,q?(e.consume(M),w):r.interrupt?t(M):U(M)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(M):s?S(M):E(M))}return M===45||ho(M)?(e.consume(M),a+=String.fromCharCode(M),_):n(M)}function w(M){return M===62?(e.consume(M),r.interrupt?t:U):n(M)}function S(M){return er(M)?(e.consume(M),S):P(M)}function E(M){return M===47?(e.consume(M),P):M===58||M===95||Do(M)?(e.consume(M),T):er(M)?(e.consume(M),E):P(M)}function T(M){return M===45||M===46||M===58||M===95||ho(M)?(e.consume(M),T):N(M)}function N(M){return M===61?(e.consume(M),A):er(M)?(e.consume(M),N):E(M)}function A(M){return M===null||M===60||M===61||M===62||M===96?n(M):M===34||M===39?(e.consume(M),c=M,k):er(M)?(e.consume(M),A):j(M)}function k(M){return M===c?(e.consume(M),c=null,R):M===null||bn(M)?n(M):(e.consume(M),k)}function j(M){return M===null||M===34||M===39||M===47||M===60||M===61||M===62||M===96||jr(M)?N(M):(e.consume(M),j)}function R(M){return M===47||M===62||er(M)?E(M):n(M)}function P(M){return M===62?(e.consume(M),V):n(M)}function V(M){return M===null||bn(M)?U(M):er(M)?(e.consume(M),V):n(M)}function U(M){return M===45&&i===2?(e.consume(M),K):M===60&&i===1?(e.consume(M),te):M===62&&i===4?(e.consume(M),O):M===63&&i===3?(e.consume(M),H):M===93&&i===5?(e.consume(M),se):bn(M)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(FJe,L,G)(M)):M===null||bn(M)?(e.exit("htmlFlowData"),G(M)):(e.consume(M),U)}function G(M){return e.check(LJe,Q,L)(M)}function Q(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),Z}function Z(M){return M===null||bn(M)?G(M):(e.enter("htmlFlowData"),U(M))}function K(M){return M===45?(e.consume(M),H):U(M)}function te(M){return M===47?(e.consume(M),a="",ne):U(M)}function ne(M){if(M===62){const q=a.toLowerCase();return bZ.includes(q)?(e.consume(M),O):U(M)}return Do(M)&&a.length<8?(e.consume(M),a+=String.fromCharCode(M),ne):U(M)}function se(M){return M===93?(e.consume(M),H):U(M)}function H(M){return M===62?(e.consume(M),O):M===45&&i===2?(e.consume(M),H):U(M)}function O(M){return M===null||bn(M)?(e.exit("htmlFlowData"),L(M)):(e.consume(M),O)}function L(M){return e.exit("htmlFlow"),t(M)}}function BJe(e,t,n){const r=this;return i;function i(a){return bn(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):n(a)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function UJe(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(BE,t,n)}}const VJe={name:"htmlText",tokenize:HJe};function HJe(e,t,n){const r=this;let i,s,a;return o;function o(H){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(H),c}function c(H){return H===33?(e.consume(H),u):H===47?(e.consume(H),N):H===63?(e.consume(H),E):Do(H)?(e.consume(H),j):n(H)}function u(H){return H===45?(e.consume(H),d):H===91?(e.consume(H),s=0,v):Do(H)?(e.consume(H),S):n(H)}function d(H){return H===45?(e.consume(H),g):n(H)}function h(H){return H===null?n(H):H===45?(e.consume(H),p):bn(H)?(a=h,te(H)):(e.consume(H),h)}function p(H){return H===45?(e.consume(H),g):h(H)}function g(H){return H===62?K(H):H===45?p(H):h(H)}function v(H){const O="CDATA[";return H===O.charCodeAt(s++)?(e.consume(H),s===O.length?x:v):n(H)}function x(H){return H===null?n(H):H===93?(e.consume(H),_):bn(H)?(a=x,te(H)):(e.consume(H),x)}function _(H){return H===93?(e.consume(H),w):x(H)}function w(H){return H===62?K(H):H===93?(e.consume(H),w):x(H)}function S(H){return H===null||H===62?K(H):bn(H)?(a=S,te(H)):(e.consume(H),S)}function E(H){return H===null?n(H):H===63?(e.consume(H),T):bn(H)?(a=E,te(H)):(e.consume(H),E)}function T(H){return H===62?K(H):E(H)}function N(H){return Do(H)?(e.consume(H),A):n(H)}function A(H){return H===45||ho(H)?(e.consume(H),A):k(H)}function k(H){return bn(H)?(a=k,te(H)):er(H)?(e.consume(H),k):K(H)}function j(H){return H===45||ho(H)?(e.consume(H),j):H===47||H===62||jr(H)?R(H):n(H)}function R(H){return H===47?(e.consume(H),K):H===58||H===95||Do(H)?(e.consume(H),P):bn(H)?(a=R,te(H)):er(H)?(e.consume(H),R):K(H)}function P(H){return H===45||H===46||H===58||H===95||ho(H)?(e.consume(H),P):V(H)}function V(H){return H===61?(e.consume(H),U):bn(H)?(a=V,te(H)):er(H)?(e.consume(H),V):R(H)}function U(H){return H===null||H===60||H===61||H===62||H===96?n(H):H===34||H===39?(e.consume(H),i=H,G):bn(H)?(a=U,te(H)):er(H)?(e.consume(H),U):(e.consume(H),Q)}function G(H){return H===i?(e.consume(H),i=void 0,Z):H===null?n(H):bn(H)?(a=G,te(H)):(e.consume(H),G)}function Q(H){return H===null||H===34||H===39||H===60||H===61||H===96?n(H):H===47||H===62||jr(H)?R(H):(e.consume(H),Q)}function Z(H){return H===47||H===62||jr(H)?R(H):n(H)}function K(H){return H===62?(e.consume(H),e.exit("htmlTextData"),e.exit("htmlText"),t):n(H)}function te(H){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(H),e.exit("lineEnding"),ne}function ne(H){return er(H)?yr(e,se,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):se(H)}function se(H){return e.enter("htmlTextData"),a(H)}}const Gz={name:"labelEnd",resolveAll:KJe,resolveTo:YJe,tokenize:XJe},qJe={tokenize:QJe},WJe={tokenize:ZJe},GJe={tokenize:JJe};function KJe(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&xo(e,0,e.length,n),e}function YJe(e,t){let n=e.length,r=0,i,s,a,o;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const c={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[s][1].start},end:{...e[a][1].end}},d={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[a-2][1].start}};return o=[["enter",c,t],["enter",u,t]],o=wc(o,e.slice(s+1,s+r+3)),o=wc(o,[["enter",d,t]]),o=wc(o,$E(t.parser.constructs.insideSpan.null,e.slice(s+r+4,a-3),t)),o=wc(o,[["exit",d,t],e[a-2],e[a-1],["exit",u,t]]),o=wc(o,e.slice(a+1)),o=wc(o,[["exit",c,t]]),xo(e,s,e.length,o),e}function XJe(e,t,n){const r=this;let i=r.events.length,s,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return o;function o(p){return s?s._inactive?h(p):(a=r.parser.defined.includes(Tu(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),c):n(p)}function c(p){return p===40?e.attempt(qJe,d,a?d:h)(p):p===91?e.attempt(WJe,d,a?u:h)(p):a?d(p):h(p)}function u(p){return e.attempt(GJe,d,h)(p)}function d(p){return t(p)}function h(p){return s._balanced=!0,n(p)}}function QJe(e,t,n){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),i}function i(h){return jr(h)?Bw(e,s)(h):s(h)}function s(h){return h===41?d(h):Rge(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function a(h){return jr(h)?Bw(e,c)(h):d(h)}function o(h){return n(h)}function c(h){return h===34||h===39||h===40?Oge(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):d(h)}function u(h){return jr(h)?Bw(e,d)(h):d(h)}function d(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):n(h)}}function ZJe(e,t,n){const r=this;return i;function i(o){return Ige.call(r,e,s,a,"reference","referenceMarker","referenceString")(o)}function s(o){return r.parser.defined.includes(Tu(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function a(o){return n(o)}}function JJe(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const eet={name:"labelStartImage",resolveAll:Gz.resolveAll,tokenize:tet};function tet(e,t,n){const r=this;return i;function i(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),s}function s(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),a):n(o)}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const net={name:"labelStartLink",resolveAll:Gz.resolveAll,tokenize:ret};function ret(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),s}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const BP={name:"lineEnding",tokenize:iet};function iet(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),yr(e,t,"linePrefix")}}const Rk={name:"thematicBreak",tokenize:set};function set(e,t,n){let r=0,i;return s;function s(u){return e.enter("thematicBreak"),a(u)}function a(u){return i=u,o(u)}function o(u){return u===i?(e.enter("thematicBreakSequence"),c(u)):r>=3&&(u===null||bn(u))?(e.exit("thematicBreak"),t(u)):n(u)}function c(u){return u===i?(e.consume(u),r++,c):(e.exit("thematicBreakSequence"),er(u)?yr(e,o,"whitespace")(u):o(u))}}const el={continuation:{tokenize:uet},exit:fet,name:"list",tokenize:cet},aet={partial:!0,tokenize:het},oet={partial:!0,tokenize:det};function cet(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return o;function o(g){const v=r.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(v==="listUnordered"?!r.containerState.marker||g===r.containerState.marker:Q8(g)){if(r.containerState.type||(r.containerState.type=v,e.enter(v,{_container:!0})),v==="listUnordered")return e.enter("listItemPrefix"),g===42||g===45?e.check(Rk,n,u)(g):u(g);if(!r.interrupt||g===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(g)}return n(g)}function c(g){return Q8(g)&&++a<10?(e.consume(g),c):(!r.interrupt||a<2)&&(r.containerState.marker?g===r.containerState.marker:g===41||g===46)?(e.exit("listItemValue"),u(g)):n(g)}function u(g){return e.enter("listItemMarker"),e.consume(g),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||g,e.check(BE,r.interrupt?n:d,e.attempt(aet,p,h))}
vendor: 5,418 bytes, line 891
891function d(g){return r.containerState.initialBlankLine=!0,s++,p(g)}function h(g){return er(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),p):n(g)}function p(g){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(g)}}function uet(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(BE,i,s);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,yr(e,t,"listItemIndent",r.containerState.size+1)(o)}function s(o){return r.containerState.furtherBlankLines||!er(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(oet,t,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,yr(e,e.attempt(el,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function det(e,t,n){const r=this;return yr(e,i,"listItemIndent",r.containerState.size+1);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(s):n(s)}}function fet(e){e.exit(this.containerState.type)}function het(e,t,n){const r=this;return yr(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const a=r.events[r.events.length-1];return!er(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const _Z={name:"setextUnderline",resolveTo:pet,tokenize:met};function pet(e,t){let n=e.length,r,i,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",a,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function met(e,t,n){const r=this;let i;return s;function s(u){let d=r.events.length,h;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){h=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),i=u,a(u)):n(u)}function a(u){return e.enter("setextHeadingLineSequence"),o(u)}function o(u){return u===i?(e.consume(u),o):(e.exit("setextHeadingLineSequence"),er(u)?yr(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||bn(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const get={tokenize:xet};function xet(e){const t=this,n=e.attempt(BE,r,e.attempt(this.parser.constructs.flowInitial,i,yr(e,e.attempt(this.parser.constructs.flow,i,e.attempt(_Je,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const vet={resolveAll:Mge()},yet=Pge("string"),bet=Pge("text");function Pge(e){return{resolveAll:Mge(e==="text"?_et:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,a,o);return a;function a(d){return u(d)?s(d):o(d)}function o(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),c}function c(d){return u(d)?(n.exit("data"),s(d)):(n.consume(d),c)}function u(d){if(d===null)return!0;const h=i[d];let p=-1;if(h)for(;++p<h.length;){const g=h[p];if(!g.previous||g.previous.call(r,r.previous))return!0}return!1}}}function Mge(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function _et(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let s=i.length,a=-1,o=0,c;for(;s--;){const u=i[s];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)o++,a--;if(a)break;a=-1}else if(u===-2)c=!0,o++;else if(u!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(o=0),o){const u={type:n===e.length||c||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:r.start._bufferIndex+a,_index:r.start._index+s,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const wet={42:el,43:el,45:el,48:el,49:el,50:el,51:el,52:el,53:el,54:el,55:el,56:el,57:el,62:Age},Eet={91:TJe},Cet={[-2]:$P,[-1]:$P,32:$P},Tet={35:IJe,42:Rk,45:[_Z,Rk],60:DJe,61:_Z,95:Rk,96:yZ,126:yZ},Aet={38:Nge,92:kge},ket={[-5]:BP,[-4]:BP,[-3]:BP,33:eet,38:Nge,42:iF,60:[nJe,VJe],91:net,92:[jJe,kge],93:Gz,95:iF,96:mJe},Net={null:[iF,vet]},jet={null:[42,95]},Ret={null:[]},Iet=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:jet,contentInitial:Eet,disable:Ret,document:wet,flow:Tet,flowInitial:Cet,insideSpan:Net,string:Aet,text:ket},Symbol.toStringTag,{value:"Module"}));function Oet(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,c
vendor: 4,168 bytes, lines 891-893
891olumn:n&&n.column||1,offset:n&&n.offset||0};const i={},s=[];let a=[],o=[];const c={attempt:k(N),check:k(A),consume:S,enter:E,exit:T,interrupt:k(A,{interrupt:!0})},u={code:null,containerState:{},defineSkip:x,events:[],now:v,parser:e,previous:null,sliceSerialize:p,sliceStream:g,write:h};let d=t.tokenize.call(u,c);return t.resolveAll&&s.push(t),u;function h(V){return a=wc(a,V),_(),a[a.length-1]!==null?[]:(j(t,0),u.events=$E(s,u.events,u),u.events)}function p(V,U){return Met(g(V),U)}function g(V){return Pet(a,V)}function v(){const{_bufferIndex:V,_index:U,line:G,column:Q,offset:Z}=r;return{_bufferIndex:V,_index:U,line:G,column:Q,offset:Z}}function x(V){i[V.line]=V.column,P()}function _(){let V;for(;r._index<a.length;){const U=a[r._index];if(typeof U=="string")for(V=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===V&&r._bufferIndex<U.length;)w(U.charCodeAt(r._bufferIndex));else w(U)}}function w(V){d=d(V)}function S(V){bn(V)?(r.line++,r.column=1,r.offset+=V===-3?2:1,P()):V!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=V}function E(V,U){const G=U||{};return G.type=V,G.start=v(),u.events.push(["enter",G,u]),o.push(G),G}function T(V){const U=o.pop();return U.end=v(),u.events.push(["exit",U,u]),U}function N(V,U){j(V,U.from)}function A(V,U){U.restore()}function k(V,U){return G;function G(Q,Z,K){let te,ne,se,H;return Array.isArray(Q)?L(Q):"tokenize"in Q?L([Q]):O(Q);function O(J){return W;function W(re){const ae=re!==null&&J[re],ce=re!==null&&J.null,Te=[...Array.isArray(ae)?ae:ae?[ae]:[],...Array.isArray(ce)?ce:ce?[ce]:[]];return L(Te)(re)}}function L(J){return te=J,ne=0,J.length===0?K:M(J[ne])}function M(J){return W;function W(re){return H=R(),se=J,J.partial||(u.currentConstruct=J),J.name&&u.parser.constructs.disable.null.includes(J.name)?X():J.tokenize.call(U?Object.assign(Object.create(u),U):u,c,q,X)(re)}}function q(J){return V(se,H),Z}function X(J){return H.restore(),++ne<te.length?M(te[ne]):K}}}function j(V,U){V.resolveAll&&!s.includes(V)&&s.push(V),V.resolve&&xo(u.events,U,u.events.length-U,V.resolve(u.events.slice(U),u)),V.resolveTo&&(u.events=V.resolveTo(u.events,u))}function R(){const V=v(),U=u.previous,G=u.currentConstruct,Q=u.events.length,Z=Array.from(o);return{from:Q,restore:K};function K(){r=V,u.previous=U,u.currentConstruct=G,u.events.length=Q,o=Z,P()}}function P(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Pet(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,s)];else{if(a=e.slice(n,i),r>-1){const o=a[0];typeof o=="string"?a[0]=o.slice(r):a.shift()}s>0&&a.push(e[i].slice(0,s))}return a}function Met(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let a;if(typeof s=="string")a=s;else switch(s){case-5:{a="\r";break}case-4:{a=` 892`;break}case-3:{a=`\r 893`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(s)}i=s===-2,r.push(a)}return r.join("")}function Det(e){const r={constructs:Tge([Iet,...(e||{}).extensions||[]]),content:i(YZe),defined:[],document:i(QZe),flow:i(get),lazy:{},string:i(yet),text:i(bet)};return r;function i(s){return a;function a(o){return Oet(r,s,o)}}}function Fet(e){for(;!jge(e););return e}const wZ=/[\0\t\n\r]/g;function Let(){let e=1,t="",n=!0,r;return i;function i(s,a,o){const c=[];let u,d,h,p,g;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),h=0,t="",n&&(s.charCodeAt(0)===65279&&h++,n=void 0);h<s.length;){if(wZ.lastIndex=h,u=wZ.exec(s),p=u&&u.index!==void 0?u.index:s.length,g=s.charCodeAt(p),!u){t=s.slice(h);break}if(g===10&&h===p&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),h<p&&(c.push(s.slice(h,p)),e+=p-h),g){case 0:{c.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,c.push(-2);e++<d;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}h=p+1}return o&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const Dge={}.hasOwnProperty;function Fge(e,t,n){return typeof t!="string"&&(n=t,t=void 0),zet(n)(Fet(Det(n).document().write(Let()(e,t,!0))
vendor: 10,391 bytes, line 893
893))}function zet(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(pt),autolinkProtocol:R,autolinkEmail:R,atxHeading:s(Fe),blockQuote:s(ce),characterEscape:R,characterReference:R,codeFenced:s(Te),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(Te,a),codeText:s(fe,a),codeTextData:R,data:R,codeFlowValue:R,definition:s(xe),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(ke),hardBreakEscape:s(tt),hardBreakTrailing:s(tt),htmlFlow:s(Se,a),htmlFlowData:R,htmlText:s(Se,a),htmlTextData:R,image:s(et),label:a,link:s(pt),listItem:s(ue),listItemValue:p,listOrdered:s(ie,h),listUnordered:s(ie),paragraph:s(Ne),reference:M,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(Fe),strong:s(De),thematicBreak:s(me)},exit:{atxHeading:c(),atxHeadingSequence:N,autolink:c(),autolinkEmail:ae,autolinkProtocol:re,blockQuote:c(),characterEscapeValue:P,characterReferenceMarkerHexadecimal:X,characterReferenceMarkerNumeric:X,characterReferenceValue:J,characterReference:W,codeFenced:c(_),codeFencedFence:x,codeFencedFenceInfo:g,codeFencedFenceMeta:v,codeFlowValue:P,codeIndented:c(w),codeText:c(Z),codeTextData:P,data:P,definition:c(),definitionDestinationString:T,definitionLabelString:S,definitionTitleString:E,emphasis:c(),hardBreakEscape:c(U),hardBreakTrailing:c(U),htmlFlow:c(G),htmlFlowData:P,htmlText:c(Q),htmlTextData:P,image:c(te),label:se,labelText:ne,lineEnding:V,link:c(K),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:q,resourceDestinationString:H,resourceTitleString:O,resource:L,setextHeading:c(j),setextHeadingLineSequence:k,setextHeadingText:A,strong:c(),thematicBreak:c()}};Lge(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(we){let Le={type:"root",children:[]};const oe={stack:[Le],tokenStack:[],config:t,enter:o,exit:u,buffer:a,resume:d,data:n},St=[];let Ut=-1;for(;++Ut<we.length;)if(we[Ut][1].type==="listOrdered"||we[Ut][1].type==="listUnordered")if(we[Ut][0]==="enter")St.push(Ut);else{const Ht=St.pop();Ut=i(we,Ht,Ut)}for(Ut=-1;++Ut<we.length;){const Ht=t[we[Ut][0]];Dge.call(Ht,we[Ut][1].type)&&Ht[we[Ut][1].type].call(Object.assign({sliceSerialize:we[Ut][2].sliceSerialize},oe),we[Ut][1])}if(oe.tokenStack.length>0){const Ht=oe.tokenStack[oe.tokenStack.length-1];(Ht[1]||SZ).call(oe,void 0,Ht[0])}for(Le.position={start:Cp(we.length>0?we[0][1].start:{line:1,column:1,offset:0}),end:Cp(we.length>0?we[we.length-2][1].end:{line:1,column:1,offset:0})},Ut=-1;++Ut<t.transforms.length;)Le=t.transforms[Ut](Le)||Le;return Le}function i(we,Le,oe){let St=Le-1,Ut=-1,Ht=!1,Rt,Ct,Wt,Tn;for(;++St<=oe;){const Ie=we[St];switch(Ie[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ie[0]==="enter"?Ut++:Ut--,Tn=void 0;break}case"lineEndingBlank":{Ie[0]==="enter"&&(Rt&&!Tn&&!Ut&&!Wt&&(Wt=St),Tn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Tn=void 0}if(!Ut&&Ie[0]==="enter"&&Ie[1].type==="listItemPrefix"||Ut===-1&&Ie[0]==="exit"&&(Ie[1].type==="listUnordered"||Ie[1].type==="listOrdered")){if(Rt){let dt=St;for(Ct=void 0;dt--;){const $t=we[dt];if($t[1].type==="lineEnding"||$t[1].type==="lineEndingBlank"){if($t[0]==="exit")continue;Ct&&(we[Ct][1].type="lineEndingBlank",Ht=!0),$t[1].type="lineEnding",Ct=dt}else if(!($t[1].type==="linePrefix"||$t[1].type==="blockQuotePrefix"||$t[1].type==="blockQuotePrefixWhitespace"||$t[1].type==="blockQuoteMarker"||$t[1].type==="listItemIndent"))break}Wt&&(!Ct||Wt<Ct)&&(Rt._spread=!0),Rt.end=Object.assign({},Ct?we[Ct][1].start:Ie[1].end),we.splice(Ct||St,0,["exit",Rt,Ie[2]]),St++,oe++}if(Ie[1].type==="listItemPrefix"){const dt={type:"listItem",_spread:!1,start:Object.assign({},Ie[1].start),end:void 0};Rt=dt,we.splice(St,0,["enter",dt,Ie[2]]),St++,oe++,Wt=void 0,Tn=!0}}}return we[Le][1]._spread=Ht,oe}function s(we,Le){return oe;function oe(St){o.call(this,we(St),St),Le&&Le.call(this,St)}}function a(){this.stack.push({type:"fragment",children:[]})}function o(we,Le,oe){this.stack[this.stack.length-1].children.push(we),this.stack.push(we),this.tokenStack.push([Le,oe||void 0]),we.position={start:Cp(Le.start),end:void 0}}function c(we){return Le;function Le(oe){we&&we.call(this,oe),u.call(this,oe)}}function u(we,Le){const oe=this.stack.pop(),St=this.tokenStack.pop();if(St)St[0].type!==we.type&&(Le?Le.call(this,we,St[0]):(St[1]||SZ).call(this,we,St[0]));else throw new Error("Cannot close `"+we.type+"` ("+ih({start:we.start,end:we.end})+"): itâs not open");oe.position.end=Cp(we.end)}function d(){return Hz(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function p(we){if(this.data.expectingFirstListItemValue){const Le=this.stack[this.stack.length-2];Le.start=Number.parseInt(this.sliceSerialize(we),10),this.data.expectingFirstListItemValue=void 0}}function g(){const we=this.resume(),Le=this.stack[this.stack.length-1];Le.lang=we}function v(){const we=this.resume(),Le=this.stack[this.stack.length-1];Le.meta=we}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){const we=this.resume(),Le=this.stack[this.stack.length-1];Le.value=we.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function w(){const we=this.resume(),Le=this.stack[this.stack.length-1];Le.value=we.replace(/(\r?\n|\r)$/g,"")}function S(we){const Le=this.resume(),oe=this.stack[this.stack.length-1];oe.label=Le,oe.identifier=Tu(this.sliceSerialize(we)).toLowerCase()}function E(){const we=this.resume(),Le=this.stack[this.stack.length-1];Le.title=we}function T(){const we=this.resume(),Le=this.stack[this.stack.length-1];Le.url=we}function N(we){const Le=this.stack[this.stack.length-1];if(!Le.depth){const oe=this.sliceSerialize(we).length;Le.depth=oe}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function k(we){const Le=this.stack[this.stack.length-1];Le.depth=this.sliceSerialize(we).codePointAt(0)===61?1:2}function j(){this.data.setextHeadingSlurpLineEnding=void 0}function R(we){const oe=this.stack[this.stack.length-1].children;let St=oe[oe.length-1];(!St||St.type!=="text")&&(St=be(),St.position={start:Cp(we.start),end:void 0},oe.push(St)),this.stack.push(St)}function P(we){const Le=this.stack.pop();Le.value+=this.sliceSerialize(we),Le.position.end=Cp(we.end)}function V(we){const Le=this.stack[this.stack.length-1];if(this.data.atHardBreak){const oe=Le.children[Le.children.length-1];oe.position.end=Cp(we.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Le.type)&&(R.call(this,we),P.call(this,we))}function U(){this.data.atHardBreak=!0}function G(){const we=this.resume(),Le=this.stack[this.stack.length-1];Le.value=we}function Q(){const we=this.resume(),Le=this.stack[this.stack.length-1];Le.value=we}function Z(){const we=this.resume(),Le=this.stack[this.stack.length-1];Le.value=we}function K(){const we=this.stack[this.stack.length-1];if(this.data.inReference){const Le=this.data.referenceType||"shortcut";we.type+="Reference",we.referenceType=Le,delete we.url,delete we.title}else delete we.identifier,delete we.label;this.data.referenceType=void 0}function te(){const we=this.stack[this.stack.length-1];if(this.data.inReference){const Le=this.data.referenceType||"shortcut";we.type+="Reference",we.referenceType=Le,delete we.url,delete we.title}else delete we.identifier,delete we.label;this.data.referenceType=void 0}function ne(we){const Le=this.sliceSerialize(we),oe=this.stack[this.stack.length-2];oe.label=bge(Le),oe.identifier=Tu(Le).toLowerCase()}function se(){const we=this.stack[this.stack.length-1],Le=this.resume(),oe=this.stack[this.stack.length-1];if(this.data.inReference=!0,oe.type==="link"){const St=we.children;oe.children=St}else oe.alt=Le}function H(){const we=this.resume(),Le=this.stack[this.stack.length-1];Le.url=we}function O(){const we=this.resume(),Le=this.stack[this.stack.length-1];Le.title=we}function L(){this.data.inReference=void 0}function M(){this.data.referenceType="collapsed"}function q(we){const Le=this.resume(),oe=this.stack[this.stack.length-1];oe.label=Le,oe.identifier=Tu(this.sliceSerialize(we)).toLowerCase(),this.data.referenceType="full"}function X(we){this.data.characterReferenceType=we.type}function J(we){const Le=this.sliceSerialize(we),oe=this.data.characterReferenceType;let St;oe?(St=yge(Le,oe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):St=fS(Le);const Ut=this.stack[this.stack.length-1];Ut.value+=St}function W(we){const Le=this.stack.pop();Le.position.end=Cp(we.end)}function re(we){P.call(this,we);const Le=this.stack[this.stack.length-1];Le.url=this.sliceSerialize(we)}function ae(we){P.call(this,we);const Le=this.stack[this.stack.length-1];Le.url="mailto:"+this.sliceSerialize(we)}function ce(){return{type:"blockquote",children:[]}}function Te(){return{type:"code",lang:null,meta:null,value:""}}function fe(){return{type:"inlineCode",value:""}}function xe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ke(){return{type:"emphasis",children:[]}}function Fe(){return{type:"heading",depth:0,children:[]}}function tt(){return{type:"break"}}function Se(){return{type:"html",value:""}}function et(){return{type:"image",title:null,url:"",alt:null}}function pt(){return{type:"link",title:null,url:"",children:[]}}function ie(we){return{type:"list",ordered:we.type==="listOrdered",start:null,spread:we._spread,children:[]}}function ue(we){return{type:"listItem",spread:we._spread,checked:null,children:[]}}function Ne(){return{type:"paragraph",children:[]}}function De(){return{type:"strong",children:[]}}function be(){return{type:"text",value:""}}function me(){return{type:"thematicBreak"}}}function Cp(e){return{line:e.line,column:e.column,offset:e.offset}}function Lge(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Lge(e,r):$et(e,r)}}function $et(e,t){let n;for(n in t)if(Dge.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function SZ(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ih({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ih({start:t.start,end:t.end}
893)+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ih({start:t.start,end:t.end})+") is still open")}function R_(e){return e.children instanceof Array}class sF extends Error{constructor(t,n){super(t),this.name="MarkdownParseError",this.cause=n}}class aF extends Error{constructor(t){super(t),this.name="UnrecognizedMarkdownConstructError"}}function Bet(e){const t=new Map;return e.type!=="root"?{importDeclarations:{}}:(e.children.filter(r=>r.type==="mdxjsEsm").filter(r=>r.value.startsWith("import ")).forEach(r=>{var i,s;(((s=(i=r.data)==null?void 0:i.estree)==null?void 0:s.body)??[]).forEach(a=>{a.type==="ImportDeclaration"&&a.specifiers.forEach(o=>{t.set(o.local.name,{source:`${a.source.value}`,defaultExport:o.type==="ImportDefaultSpecifier"})})})}),{importDeclarations:Object.fromEntries(t.entries())})}function Uet({root:e,markdown:t,visitors:n,syntaxExtensions:r,mdastExtensions:i,...s}){var a;let o;try{o=Fge(t,{extensions:r,mdastExtensions:i})}catch(c){throw c instanceof Error?new sF(`Error parsing markdown: ${c.message}`,c):new sF(`Error parsing markdown: ${c}`,c)}o.children.length===0&&o.children.push({type:"paragraph",children:[]}),((a=o.children.at(-1))==null?void 0:a.type)!=="paragraph"&&o.children.push({type:"paragraph",children:[]}),zge({root:e,mdastRoot:o,visitors:n,...s})}function zge({root:e,mdastRoot:t,visitors:n,...r}){const i=new WeakMap,s=new WeakMap,a=Bet(t);n=n.sort((u,d)=>(d.priority??0)-(u.priority??0));function o(u,d){if(!R_(u))throw new Error("Attempting to visit children of a non-parent");u.children.forEach(h=>{c(h,d,u)})}function c(u,d,h,p=null){const g=n.find((v,x)=>p?.has(x)?!1:typeof v.testNode=="string"?v.testNode===u.type:v.testNode(u,r));if(!g)try{throw new aF(`Unsupported markdown syntax: ${_ge(u)}`)}catch{throw new aF(`Parsing of the following markdown structure failed: ${JSON.stringify({type:u.type,name:"name"in u?u.name:"N/A"})}`)}g.visitNode({mdastNode:u,lexicalParent:d,mdastParent:h,descriptors:r,metaData:a,actions:{visitChildren:o,nextVisitor(){c(u,d,h,(p??new Set).add(n.indexOf(g)))},addAndStepInto(v){d.append(v),R_(u)&&o(u,v)},addFormatting(v,x){x||R_(u)&&(x=u),x&&i.set(x,v|(i.get(h)??0))},removeFormatting(v,x){x||R_(u)&&(x=u),x&&i.set(x,v^(i.get(h)??0))},getParentFormatting(){return i.get(h)??0},addStyle(v,x){x||R_(u)&&(x=u),x&&s.set(x,v)},getParentStyle(){return s.get(h)??""}}})}c(t,e,null)}var Vet=Object.defineProperty,Het=(e,t,n)=>t in e?Vet(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}
893):e[t]=n,UP=(e,t,n)=>(Het(e,typeof t!="symbol"?t+"":t,n),n);const EZ="generic-html";class UE extends gl{constructor(t,n,r,i){super(i),UP(this,"__tag"),UP(this,"__nodeType"),UP(this,"__attributes"),this.__tag=t,this.__nodeType=n,this.__attributes=r}static getType(){return EZ}static clone(t){return new UE(t.__tag,t.__nodeType,t.__attributes,t.__key)}getTag(){return this.__tag}getNodeType(){return this.__nodeType}getAttributes(){return this.__attributes}updateAttributes(t){const n=this.getWritable();n.__attributes=t}getStyle(){var t;return(t=this.__attributes.find(n=>n.name==="style"))==null?void 0:t.value}createDOM(){const t=this.__tag,n=document.createElement(t);return this.__attributes.forEach(r=>{n.setAttribute(r.name,r.value)}),n}updateDOM(){return!1}static importDOM(){return{}}exportDOM(t){const{element:n}=super.exportDOM(t);return{element:n}}static importJSON(t){const n=$ge(t.tag,t.mdxType,t.attributes);return n.setFormat(t.format),n.setIndent(t.indent),n.setDirection(t.direction),n}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),attributes:this.__attributes,mdxType:this.__nodeType,type:EZ,version:1}}extractWithChild(){return!0}isInline(){return this.__nodeType==="mdxJsxTextElement"}}function $ge(e,t,n){return Jl(new UE(e,t,n))}function qet(e){return e instanceof UE}const Wet={testLexicalNode:qet,visitLexicalNode({actions:e,lexicalNode:t}){e.addAndStepInto("mdxJsxTextElement",{name:t.getTag(),type:t.getNodeType(),attributes:t.getAttributes()})},priority:-100},Get={testLexicalNode:Eu,visitLexicalNode:({mdastParent:e,actions:t})=>{t.appendToParent(e,{type:"text",value:` 894`})}},Ket={testLexicalNode:W5,visitLexicalNode:({actions:e})=>{e.addAndStepInto("paragraph")}},Yet={testLexicalNode:Zs,visitLexicalNode:({actions:e})=>{e.addAndStepInto("root")}},Uw=1,Vw=2,Ik=4,Hw=8,Kz=16,Ok=32,Pk=64,Mk=128;function CZ(e){return e.type==="text"}const Xet=["u","span","sub","sup"],Qet={shouldJoin:(e,t)=>{if(["text","emphasis","strong","highlight"].includes(e.type))return e.type===t.type;if(e.type==="mdxJsxTextElement"&&t.type==="mdxJsxTextElement"&&Xet.includes(t.name)){const n=t;return e.name===n.name&&JSON.stringify(e.attributes)===JSON.stringify(n.attributes)}return!1},join(e,t){return CZ(e)&&CZ(t)?{type:"text",value:e.value+t.value}:{...e,children:[...e.children,...t.children]}},testLexicalNode:Lt,visitLexicalNode:({lexicalNode:e,mdastParent:t,actions:n})=>{const r=e.getPreviousSibling(),i=Lt(r)?r.getFormat():0,s=e.getTextContent(),a=e.getFormat(),o=e.getStyle();let c=t;if(o&&(c=n.appendToParent(c,{type:"mdxJsxTextElement",name:"span",children:[],attributes:[{type:"mdxJsxAttribute",name:"style",value:o}]})),i&a&Hw&&(c=n.appendToParent(c,{type:"mdxJsxTextElement",name:"u",children:[],attributes:[]})),i&a&Pk&&(c=n.appendToParent(c,{type:"mdxJsxTextElement",name:"sup",children:[],attributes:[]})),i&a&Ok&&(c=n.appendToParent(c,{type:"mdxJsxTextElement",name:"sub",children:[],attributes:[]})),i&a&Vw&&(c=n.appendToParent(c,{type:"emphasis",children:[]})),i&a&Uw&&(c=n.appendToParent(c,{type:"strong",children:[]})),i&a&Ik&&(c=n.appendToParent(c,{type:"delete",children:[]})),i&a&Mk&&(c=n.appendToParent(c,{type:"highlight",children:[]})),a&Hw&&!(i&Hw)&&(c=n.appendToParent(c,{type:"mdxJsxTextElement",name:"u",children:[],attributes:[]})),a&Pk&&!(i&Pk)&&(c=n.appendToParent(c,{type:"mdxJsxTextElement",name:"sup",children:[],attributes:[]})),a&Ok&&!(i&Ok)&&(c=n.appendToParent(c,{type:"mdxJsxTextElement",name:"sub",children:[],attributes:[]})),a&Vw&&!(i&Vw)&&(c=n.appendToParent(c,{type:"emphasis",children:[]})),a&Uw&&!(i&Uw)&&(c=n.appendToParent(c,{type:"strong",children:[]})),a&Ik&&!(i&Ik)&&(c=n.appendToParent(c,{type:"delete",children:[]})),a&Mk&&!(i&Mk)&&(c=n.appendToParent(c,{type:"highlight",children:[]})),a&Kz){n.appendToParent(c,{type:"inlineCode",value:s});return}n.appendToParent(c,{type:"text",value:s})}},Zet={testNode:"break",visitNode:function({lexicalParent:e}){e.append(zu())}};function vA(e,t){return[{testNode:n=>n.type==="mdxJsxTextElement"&&n.name===e,visitNode({actions:n,mdastNode:r,lexicalParent:i}){n.addFormatting(t),n.visitChildren(r,i)}},{testNode:n=>n.type==="html"&&n.value===`<${e}>`,visitNode({actions:n,mdastParent:r}){n.addFormatting(t,r)}},{testNode:n=>n.type==="html"&&n.value===`</${e}>`,visitNode({actions:n,mdastParent:r}){n.removeFormatting(t,r)}}]}const Jet={testNode:"delete",visitNode({mdastNode:e,actions:t,lexicalParent:n}
894){t.addFormatting(Ik),t.visitChildren(e,n)}},ett={testNode:"highlight",visitNode({mdastNode:e,actions:t,lexicalParent:n}){t.addFormatting(Mk),t.visitChildren(e,n)}},ttt={testNode:"inlineCode",visitNode({mdastNode:e,actions:t}){t.addAndStepInto(Ii(e.value).setFormat(t.getParentFormatting()|Kz))}},ntt={testNode:"emphasis",visitNode({mdastNode:e,actions:t,lexicalParent:n}){t.addFormatting(Vw),t.visitChildren(e,n)}},rtt={testNode:"strong",visitNode({mdastNode:e,actions:t,lexicalParent:n}){t.addFormatting(Uw),t.visitChildren(e,n)}},itt=[ntt,rtt,...vA("u",Hw),...vA("code",Kz),ttt,Jet,ett,...vA("sup",Pk),...vA("sub",Ok)],stt={testNode:wge,visitNode:function({mdastNode:e,actions:t,lexicalParent:n}){e.name==="span"&&e.attributes.length===1&&e.attributes[0].type==="mdxJsxAttribute"&&e.attributes[0].name==="style"?(t.addStyle(e.attributes[0].value,e),t.visitChildren(e,n)):t.addAndStepInto($ge(e.name,e.type,e.attributes))},priority:-100},att=["listitem","quote","admonition"],ott={testNode:"paragraph",visitNode:function({mdastNode:e,lexicalParent:t,actions:n}){att.includes(t.getType())?n.visitChildren(e,t):n.addAndStepInto(Ur())}},ltt={testNode:"root",visitNode({actions:e,mdastNode:t,lexicalParent:n}){e.visitChildren(t,n)}},ctt={testNode:"text",visitNode({mdastNode:e,actions:t}){const n=Ii(e.value);n.setFormat(t.getParentFormatting());const r=t.getParentStyle();r!==""&&n.setStyle(r),t.addAndStepInto(n)}},utt=()=>Y.createElement(Ome,{externalHistoryState:Kl(Mtt)});function dtt(e){return{canContainEols:["comment"],enter:{comment(t){this.buffer()}},exit:{comment(t){this.resume()}}}}const TZ=(e,t,n)=>{return r;function r(v){return e.enter("comment"),e.consume(v),i}function i(v){return v===ao.exclamationMark?(e.consume(v),s):n(v)}function s(v){return v===ao.dash?(e.consume(v),a):n(v)}function a(v){return v===ao.dash?(e.consume(v),o):n(v)}function o(v){return v===ao.greaterThan?n(v):bn(v)?d(v):(e.enter($f.data),v===ao.dash?(e.consume(v),c):u(v))}function c(v){return v===ao.greaterThan?n(v):u(v)}function u(v){return v===ao.eof?n(v):v===ao.dash?(e.consume(v),p):bn(v)?(e.exit($f.data),d(v)):(e.consume(v),u)}function d(v){return e.enter($f.lineEnding),e.consume(v),e.exit($f.lineEnding),yr(e,h,$f.linePrefix)}function h(v){return bn(v)?d(v):(e.enter($f.data),u(v))}function p(v){return v===ao.dash?(e.consume(v),g):u(v)}function g(v){return v===ao.greaterThan?(e.exit($f.data),e.enter("commentEnd"),e.consume(v),e.exit("commentEnd"),e.exit("comment"),t(v)):v===ao.dash?(e.consume(v),g):u(v)}},ftt={flow:{60:{tokenize:TZ,concrete:!0}},text:{60:{tokenize:TZ}}},htt="_bold_1tncs_10",ptt="_italic_1tncs_14",mtt="_underline_1tncs_18",gtt="_strikethrough_1tncs_34",xtt="_underlineStrikethrough_1tncs_38",vtt="_subscript_1tncs_42",ytt="_superscript_1tncs_47",btt="_code_1tncs_52",_tt="_nestedListItem_1tncs_59",wtt="_listitem_1tncs_69",Stt="_listItemChecked_1tncs_73",Ett="_listItemUnchecked_1tncs_74",Ctt="_admonitionDanger_1tncs_151",Ttt="_admonitionInfo_1tncs_152",Att="_admonitionNote_1tncs_153",ktt="_admonitionTip_1tncs_154",Ntt="_admonitionCaution_1tncs_155",Fa={bold:htt,italic:ptt,underline:mtt,strikethrough:gtt,underlineStrikethrough:xtt,subscript:vtt,superscript:ytt,code:btt,nestedListItem:_tt,listitem:wtt,listItemChecked:Stt,listItemUnchecked:Ett,admonitionDanger:Ctt,admonitionInfo:Ttt,admonitionNote:Att,admonitionTip:ktt,admonitionCaution:Ntt},c4={text:{bold:Fa.bold,italic:Fa.italic,underline:Fa.underline,code:Fa.code,strikethrough:Fa.strikethrough,subscript:Fa.subscript,superscript:Fa.superscript,underlineStrikethrough:Fa.underlineStrikethrough},list:{listitem:Fa.listitem,listitemChecked:Fa.listItemChecked,listitemUnchecked:Fa.listItemUnchecked,nested:{listitem:Fa.nestedListItem}},admonition:{danger:Fa.admonitionDanger,info:Fa.admonitionInfo,note:Fa.admonitionNote,tip:Fa.admonitionTip,caution:Fa.admonitionCaution}},pS=Nn("NESTED_EDITOR_UPDATED_COMMAND"),Wh=xn(null),na=xn(null),oF=xn(""),lF=xn(!0),Uu=xn(!1,e=>{e.sub(e.pipe(Uu,us(Wh)),([t,n])=>{n?.setEditable(!t)})}),cF=xn(""),AZ=xn(!1),mS=xn(!1),Bge=xn(0),b3=xn(null),uF=aa(e=>{e.link(e.pipe(b3,kE(t=>t!==null)),uF)}),Uge=aa(e=>{e.sub(e.pipe(Uge,us(na)),([t,n])=>{n?.dispatchCommand(rh,t)})}),vy=xn(null,e=>{e.sub(e.pipe(vy,us(na)),([t,n])=>{if(!t||!n)return;const r=t.anchor.getNode();let i=r.getKey()==="root"?r:Cu(r,o=>{const c=o.getParent();return c!==null&&ea(c)});i===null&&(i=r.getTopLevelElementOrThrow());const s=i.getKey();if(n.getElementByKey(s)!==null){const o=i4(i)?i.getTag():i.getType();e.pub(a0e,o)}})}),Vge=xn(""),Y0=xn(""),_3=xn(!1),u4=aa(e=>{e.link(Y0,u4),e.sub(Vge,t=>{e.pubIn({[_3]:!0,[Y0]:t})})}),dF=aa(e=>{e.link(e.pipe(u4,us(hF),kE(([,t])=>!t),c0(([t])=>t)),dF)},!0),Yz=xn([]),Xz=xn([]),Hge=xn([]),qge=xn([]),Qz=xn([]),Wge=xn([]),fF=xn({}),Gge=xn(!1),Zz=xn([]),Kge=xn([]),d4=xn([]),yx=xn(null),jtt=xn(null),Gm=qo(Xz),Rh=qo(Yz),w3=qo(Hge),S3=qo(qge),Km=qo(Qz),Jz=qo(Wge),hF=xn(!1),e$=aa(e=>{e.sub(e.pipe(e$,us(Y0,Wh,mS),kE(([t,n])=>t.trim()!==n.trim())),([t,,n,r])=>{e.pub(hF,!0),n?.update(()=>{Qr().clear(),t$(e,Qr(),t),r?n.focus():As(null)},{onUpdate:()=>{e.pub(hF,!1)}})})}),Yge=aa(e=>{e.sub(e.pipe(Yge,us(na,mS)),([t,n,r])=>{n?.update(()=>{const i=Pt();if(i!==null){const s={children:[],append(a){this.children.push(a)},getType(){return i.getNodes()[0].getType()}};
894t$(e,s,t),Ky(s.children)}r?n.focus():As(null)})})});function Xge(){return mpe((e,[t,n])=>(e.forEach(r=>{if(!r)throw new Error("You have a subscription that does not return a teardown");r()}),n?t.map(r=>r(n)):[]),[])}const Rtt=xn(null),Qge=xn([],e=>{e.pipe(e.combine(Qge,na),Xge())}),Zge=xn([],e=>{e.pipe(e.combine(Zge,Wh),Xge())}),Itt=xn(null,cm,(e,t)=>!!(e&&t&&e.editorRef===t.editorRef)),pF=aa(),tf=xn(e=>{throw new Error(`No icon component for ${e}`)});function qo(e,t){return aa((n,r)=>{n.changeWith(e,r,(i,s)=>{Array.isArray(s)||(s=[s]);let a=i;for(const o of s)i.includes(o)||(a=[...a,o]);return a}),t?.(n,r)})}function Jge(e){const t=Pt();_t(t)&&e.pubIn({[vy]:t,[Bge]:t.format})}const e0e=qo(Zge,(e,t)=>{e.pub(t,[n=>n.registerCommand(F5,(r,i)=>(e.pubIn({[na]:i,[mS]:!0}),i._parentEditor===null&&i.getEditorState().read(()=>{e.pub(Itt,{rootNode:Qr(),editorType:"lexical",editorRef:i})}),Jge(e),!1),kh),n=>n.registerUpdateListener(({dirtyElements:r,dirtyLeaves:i,editorState:s})=>{if(e.getValue(b3)!==null||r.size===0&&i.size===0)return;let o;s.read(()=>{Qr().getLastChild()instanceof xx&&n.update(()=>{Qr().append(Ur())},{discrete:!0}),o=WZe({root:Qr(),visitors:e.getValue(Qz),jsxComponentDescriptors:e.getValue(Zz),toMarkdownExtensions:e.getValue(Wge),toMarkdownOptions:e.getValue(fF),jsxIsAvailable:e.getValue(Gge)})}),e.pub(Y0,o.trim()),e.pub(_3,!1)}),n=>n.registerCommand(vz,()=>(e.pub(mS,!0),!1),kh)])}),gS=qo(Qge,(e,t)=>{e.pub(t,[n=>n.registerUpdateListener(({editorState:r})=>{r.read(()=>{Jge(e)})}),n=>n.registerCommand(yz,r=>{var i;const s=e.getValue(Wh);return s&&!((i=s.getRootElement())!=null&&i.contains(r.relatedTarget))&&e.pubIn({[mS]:!1,[pF]:r}),!1},kh)])});function t$(e,t,n){try{Uet({root:t,visitors:e.getValue(Yz),mdastExtensions:e.getValue(qge),markdown:n,syntaxExtensions:e.getValue(Hge),jsxComponentDescriptors:e.getValue(Zz),directiveDescriptors:e.getValue(Kge),codeBlockEditorDescriptors:e.getValue(d4)}),e.pub(b3,null)}catch(r){if(r instanceof sF||r instanceof aF)e.pubIn({[Y0]:n,[b3]:{error:r.message,source:n}});else throw r}}const t0e=xn([]),bx=qo(t0e),n0e=xn([]),Ott=qo(n0e),r0e=xn([]),Ptt=qo(r0e),i0e=xn([]);qo(i0e);const s0e=xn([]),n$=qo(s0e),Mtt=xn(Ime()),a0e=xn("");aa();const E3=aa(e=>{e.sub(e.pipe(E3,us(na)),([t,n])=>{n?.update(()=>{const r=Pt();_t(r)&&($Ye(r,t),setTimeout(()=>{n.focus()}))})})}),r$=aa(e=>{e.sub(e.pipe(r$,us(na)),([t,n])=>{n?.focus(()=>{n.getEditorState().read(()=>{const r=Pt();_t(r)&&(n.update(()=>{const i=t();i.isInline()?(Ky([i]),ea(i.getParentOrThrow())&&Bz(i,Ur).selectEnd()):Rme(i),setTimeout(()=>{"select"in i&&typeof i.select=="function"&&i.select()})}),setTimeout(()=>{n.dispatchCommand(pS,void 0)}))})},{defaultSelection:"rootEnd"})})}),C3=xn("rich-text",e=>{function t(){return mpe((n,r)=>({current:n.next,next:r}),{current:"rich-text",next:"rich-text"})}e.sub(e.pipe(C3,t(),us(xS)),([{current:n},r])=>{(n==="source"||n==="diff")&&e.pub(e$,r)}),e.sub(e.pipe(C3,t(),kE(n=>n.current==="rich-text"),us(na)),([,n])=>{n?.dispatchCommand(pS,void 0)})}),xS=xn("",e=>{e.link(Y0,xS),e.link(xS,u4)},!0),i$=xn([]),VE=qo(i$),o0e=xn(()=>{throw new Error("No translation function provided")}),kZ=xn(c4),Dtt=Qu({init(e,t){const n=t?.initialMarkdown??"";e.register(e0e),e.register(gS),e.register(u4),e.register(xS),e.pubIn({[Vge]:t?.trim?n.trim():n,[tf]:t?.iconComponentFor,[Rh]:[ltt,ott,ctt,Zet,...itt],[Gm]:[Yy,ef,UE],[Km]:[Yet,Ket,Qet,Get,Wet],[oF]:t?.contentEditableClassName,[lF]:t?.spellCheck,[fF]:t?.toMarkdownOptions,[AZ]:t?.autoFocus,[cF]:t?.placeholder,[Uu]:t?.readOnly,[o0e]:t?.translation,[S3]:[Bme(),AXe],[w3]:[$me(),lQe()],[Jz]:[YXe(),Ume(),jXe],[kZ]:t?.lexicalTheme??c4}),e.singletonSub(uF,t?.onError),e.singletonSub(dF,r=>{t?.onChange(r,e.getValue(_3))}),e.singletonSub(pF,t?.onBlur),t?.suppressHtmlProcessing||e.pubIn({[S3]:[KXe(),dtt()],[w3]:[RQe(),IQe(),ftt],[Rh]:stt}),t?.suppressSharedHistory||e.pub(bx,utt)},postInit(e,t){const n=tme({editable:t?.readOnly!==!0,namespace:t?.lexicalEditorNamespace??"MDXEditor",nodes:[...e.getValue(Xz),...t?.additionalLexicalNodes??[]],onError:r=>{throw r},theme:e.getValue(kZ)});t?.editorState!==null&&n.update(()=>{const r=t?.initialMarkdown.trim()??"";t$(e,Qr(),r);
894const i=t?.autoFocus;if(i){if(i===!0){setTimeout(()=>{n.focus(cm,{defaultSelection:"rootStart"})});return}setTimeout(()=>{n.focus(cm,{defaultSelection:i.defaultSelection??"rootStart"})})}}),e.pub(Wh,n),e.pub(na,n)},update(e,t){e.pubIn({[oF]:t?.contentEditableClassName,[lF]:t?.spellCheck,[fF]:t?.toMarkdownOptions,[AZ]:t?.autoFocus,[cF]:t?.placeholder,[Uu]:t?.readOnly}),e.singletonSub(dF,n=>{t?.onChange(n,e.getValue(_3))}),e.singletonSub(pF,t?.onBlur),e.singletonSub(uF,t?.onError)}});function Ju(){return Kl(o0e)}function Ftt(){return Qr().getTextContent()}function Ltt(e,t=!0){if(e)return!1;let n=Ftt();return t&&(n=n.trim()),n===""}function ztt(e){if(!Ltt(e,!1))return!1;const t=Qr().getChildren(),n=t.length;if(n>1)return!1;for(let r=0;r<n;r++){const i=t[r];if(Br(i))return!1;if(rt(i)){if(!W5(i)||i.__indent!==0)return!1;const s=i.getChildren(),a=s.length;for(let o=0;o<a;o++){const c=s[r];if(!Lt(c))return!1}}}return!0}function l0e(e){return()=>ztt(e)}const c0e=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?b.useLayoutEffect:b.useEffect;function $tt({editor:e,ariaActiveDescendant:t,ariaAutoComplete:n,ariaControls:r,ariaDescribedBy:i,ariaErrorMessage:s,ariaExpanded:a,ariaInvalid:o,ariaLabel:c,ariaLabelledBy:u,ariaMultiline:d,ariaOwns:h,ariaRequired:p,autoCapitalize:g,className:v,id:x,role:_="textbox",spellCheck:w=!0,style:S,tabIndex:E,"data-testid":T,...N},A){const[k,j]=b.useState(e.isEditable()),R=b.useCallback((V=>{V&&V.ownerDocument&&V.ownerDocument.defaultView?e.setRootElement(V):e.setRootElement(null)}),[e]),P=b.useMemo((()=>(function(...V){return U=>
894{V.forEach((G=>{typeof G=="function"?G(U):G!=null&&(G.current=U)}))}})(A,R)),[R,A]);return c0e((()=>(j(e.isEditable()),e.registerEditableListener((V=>{j(V)})))),[e]),l.jsx("div",{"aria-activedescendant":k?t:void 0,"aria-autocomplete":k?n:"none","aria-controls":k?r:void 0,"aria-describedby":i,...s!=null?{"aria-errormessage":s}:{},"aria-expanded":k&&_==="combobox"?!!a:void 0,...o!=null?{"aria-invalid":o}:{},"aria-label":c,"aria-labelledby":u,"aria-multiline":d,"aria-owns":k?h:void 0,"aria-readonly":!k||void 0,"aria-required":p,autoCapitalize:g,className:v,contentEditable:k,"data-testid":T,id:x,ref:P,role:_,spellCheck:w,style:S,tabIndex:E,...N})}const Btt=b.forwardRef($tt);function NZ(e){return e.getEditorState().read(l0e(e.isComposing()))}const u0e=b.forwardRef(Utt);function Utt(e,t){const{placeholder:n,...r}=e,[i]=So();return l.jsxs(l.Fragment,{children:[l.jsx(Btt,{editor:i,...r,ref:t}),n!=null&&l.jsx(Vtt,{editor:i,content:n})]})}function Vtt({content:e,editor:t}){const n=(function(a){const[o,c]=b.useState((()=>NZ(a)));return c0e((()=>{function u(){const d=NZ(a);c(d)}return u(),bl(a.registerUpdateListener((()=>{u()})),a.registerEditableListener((()=>{u()})))}),[a]),o})(t),[r,i]=b.useState(t.isEditable());if(b.useLayoutEffect((()=>(i(t.isEditable()),t.registerEditableListener((a=>{i(a)})))),[t]),!n)return null;let s=null;return typeof e=="function"?s=e(r):e!==null&&(s=e),s===null?null:l.jsx("div",{"aria-hidden":!0,children:s})}function mF(e,t){return mF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},mF(e,t)}var jZ={error:null},Htt=(function(e){var t,n;function r(){for(var s,a=arguments.length,o=new Array(a),c=0;c<a;c++)o[c]=arguments[c];return(s=e.call.apply(e,[this].concat(o))||this).state=jZ,s.resetErrorBoundary=function(){for(var u,d=arguments.length,h=new Array(d),p=0;p<d;p++)h[p]=arguments[p];s.props.onReset==null||(u=s.props).onReset.apply(u,h),s.reset()},s}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,mF(t,n),r.getDerivedStateFromError=function(s){return{error:s}};var i=r.prototype;return i.reset=function(){this.setState(jZ)},i.componentDidCatch=function(s,a){var o,c;(o=(c=this.props).onError)==null||o.call(c,s,a)},i.componentDidUpdate=function(s,a){var o,c,u,d,h=this.state.error,p=this.props.resetKeys;h!==null&&a.error!==null&&((u=s.resetKeys)===void 0&&(u=[]),(d=p)===void 0&&(d=[]),u.length!==d.length||u.some((function(g,v){return!Object.is(g,d[v])})))&&((o=(c=this.props).onResetKeysChange)==null||o.call(c,s.resetKeys,p),this.reset())},i.render=function(){var s=this.state.error,a=this.props,o=a.fallbackRender,c=a.FallbackComponent,u=a.fallback;if(s!==null){var d={error:s,resetErrorBoundary:this.resetErrorBoundary};if(b.isValidElement(u))return u;if(typeof o=="function")return o(d);if(c)return b.createElement(c,d);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},r})(b.Component);function d0e({children:e,onError:t}){return l.jsx(Htt,{fallback:l.jsx("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:t,children:e})}const qtt=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?b.useLayoutEffect:b.useEffect;function Wtt(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}function Gtt(){return(function(e){const[t]=So(),n=b.useMemo((()=>e(t)),[t,e]),[r,i]=b.useState((()=>n.initialValueFn())),s=b.useRef(r);return qtt((()=>{const{initialValueFn:a,subscribe:o}=n,c=a();return s.current!==c&&(s.current=c,i(c)),o((u=>{s.current=u,i(u)}))}),[n,e]),r})(Wtt)}function Ktt(e){const t=window.location.origin,n=r=>{if(r.origin!==t)return;const i=e.getRootElement();if(document.activeElement!==i)return;const s=r.data;if(typeof s=="string"){let a;try{a=JSON.parse(s)}catch{return}if(a&&a.protocol==="nuanria_messaging"&&a.type==="request"){const o=a.payload;if(o&&o.functionId==="makeChanges"){const c=o.args;if(c){const[u,d,h,p,g,v]=c;e.update((()=>{const x=Pt();if(_t(x)){const _=x.anchor;let w=_.getNode(),S=0,E=0;if(Lt(w)&&u>=0&&d>=0&&(S=u,E=u+d,x.setTextNodeRange(w,S,w,E)),S===E&&h===""||(x.insertRawText(h),w=_.getNode()),Lt(w)){S=p,E=p+g;const T=w.getTextContentSize();S=S>T?T:S,E=E>T?T:E,x.setTextNodeRange(w,S,w,E)}r.stopImmediatePropagation()}}))}}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}}const gF=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?b.useLayoutEffect:b.useEffect;function RZ(e){return e.getEditorState().read(l0e(e.isComposing()))}function f0e({contentEditable:e,placeholder:t=null,ErrorBoundary:n}){const[r]=So(),i=(function(s,a){const[o,c]=b.useState((()=>s.getDecorators()));return gF((()=>s.registerDecoratorListener((u=>{mh.flushSync((()=>{c(u)}))}))),[s]),b.useEffect((()=>{c(s.getDecorators())}),[s]),b.useMemo((()=>{const u=[],d=Object.keys(o);for(let h=0;h<d.length;h++){const p=d[h],g=l.jsx(a,{onError:x=>s._onError(x),children:l.jsx(b.Suspense,{fallback:null,children:o[p]})}),v=s.getElementByKey(p);v!==null&&u.push(mh.createPortal(g,v,p))}return u}),[a,o,s])})(r,n);return(function(s){gF((()=>bl(vXe(s),Ktt(s))),[s])})(r),l.jsxs(l.Fragment,{children:[e,l.jsx(Ytt,{content:t}),i]})}function Ytt({content:e}){const[t]=So(),n=(function(i){const[s,a]=b.useState((()=>RZ(i)));return gF((()=>{function o(){const c=RZ(i);a(c)}return o(),bl(i.registerUpdateListener((()=>{o()}
894)),i.registerEditableListener((()=>{o()})))}),[i]),s})(t),r=Gtt();return n?typeof e=="function"?e(r):e:null}var VP={exports:{}};/*! 895 Copyright (c) 2018 Jed Watson. 896 Licensed under the MIT License (MIT), see 897 http://jedwatson.github.io/classnames 898*/var IZ;function Xtt(){return IZ||(IZ=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",a=0;a<arguments.length;a++){var o=arguments[a];o&&(s=i(s,r(o)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var a="";for(var o in s)t.call(s,o)&&s[o]&&(a=i(a,o));return a}function i(s,a){return a?s?s+" "+a:s+a:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(VP)),VP.exports}var Qtt=Xtt();const Xr=$c(Qtt),Ztt={undo:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M7.202 18.5V17H14.3788C15.4224 17 16.3205 16.6554 17.073 15.9663C17.8257 15.2773 18.202 14.4263 18.202 13.4135C18.202 12.4007 17.8257 11.5512 17.073 10.8652C16.3205 10.1794 15.4224 9.8365 14.3788 9.8365H7.35775L10.1402 12.6193L9.0865 13.673L4.5 9.0865L9.0865 4.5L10.1402 5.55375L7.35775 8.3365H14.3788C15.8416 8.3365 17.0945 8.82467 18.1375 9.801C19.1805 10.7773 19.702 11.9815 19.702 13.4135C19.702 14.8455 19.1805 16.0513 18.1375 17.0308C17.0945 18.0103 15.8416 18.5 14.3788 18.5H7.202Z",fill:"currentColor"})),redo:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M9.6211 18.5C8.15827 18.5 6.90535 18.0103 5.86235 17.0308C4.81935 16.0513 4.29785 14.8455 4.29785 13.4135C4.29785 11.9815 4.81935 10.7773 5.86235 9.801C6.90535 8.82467 8.15827 8.3365 9.6211 8.3365H16.6421L13.8596 5.55375L14.9134 4.5L19.4999 9.0865L14.9134 13.673L13.8596 12.6193L16.6421 9.8365H9.6211C8.57744 9.8365 7.67935 10.1794 6.92685 10.8652C6.17418 11.5512 5.79785 12.4007 5.79785 13.4135C5.79785 14.4263 6.17418 15.2773 6.92685 15.9663C7.67935 16.6554 8.57744 17 9.6211 17H16.7979V18.5H9.6211Z",fill:"currentColor"})),format_bold:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M7.33838 18.625V5.375H12.1999C13.219 5.375 14.1405 5.69233 14.9644 6.327C15.788 6.9615 16.1999 7.816 16.1999 8.8905C16.1999 9.63783 16.0194 10.2471 15.6584 10.7182C15.2975 11.1894 14.9088 11.5314 14.4921 11.7442C15.005 11.9211 15.4947 12.2708 15.9614 12.7933C16.428 13.3158 16.6614 14.0193 16.6614 14.9038C16.6614 16.1819 16.1902 17.1217 15.2479 17.723C14.3055 18.3243 13.3562 18.625 12.3999 18.625H7.33838ZM9.48838 16.6328H12.3191C13.1063 16.6328 13.6627 16.4142 13.9884 15.977C14.314 15.5398 14.4769 15.1206 14.4769 14.7192C14.4769 14.3179 14.314 13.8987 13.9884 13.4615C13.6627 13.0243 13.0909 12.8058 12.2729 12.8058H9.48838V16.6328ZM9.48838 10.875H12.0826C12.6903 10.875 13.172 10.7013 13.5279 10.3538C13.8835 10.0064 14.0614 9.59042 14.0614 9.10575C14.0614 8.59042 13.8733 8.16925 13.4971 7.84225C13.1208 7.51542 12.6595 7.352 12.1134 7.352H9.48838V10.875Z",fill:"currentColor"})),format_italic:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M5.39404 18.625V16.8173H9.21129L12.4518 7.18275H8.63454V5.375H17.7883V7.18275H14.2785L11.0383 16.8173H14.5478V18.625H5.39404Z",fill:"currentColor"})),format_underlined:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M5.34619 22.125V20.625H18.6537V22.125H5.34619ZM11.9999 18.5287C10.4448 18.5287 9.23102 18.0566 8.35869 17.1125C7.48619 16.1683 7.04994 14.9032 7.04994 13.3172V5.41345H8.90369V13.4095C8.90369 14.4198 9.17228 15.2295 9.70944 15.8385C10.2466 16.4475 11.0101 16.752 11.9999 16.752C12.9898 16.752 13.7533 16.4475 14.2904 15.8385C14.8276 15.2295 15.0962 14.4198 15.0962 13.4095V5.41345H16.9499V13.3172C16.9499 14.9032 16.5137 16.1683 15.6412 17.1125C14.7689 18.0566 13.5551 18.5287 11.9999 18.5287Z",fill:"currentColor"})),format_highlight:Y.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"},Y.createElement("path",{d:"m9 11-6 6v3h9l3-3"}),Y.createElement("path",{d:"m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4"})),code:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M7.99994 17.6537L2.34619 11.9999L7.99994 6.34619L9.06919 7.41544L4.46919 12.0154L9.05369 16.5999L7.99994 17.6537ZM15.9999 17.6537L14.9307 16.5844L19.5307 11.9844L14.9462 7.39994L15.9999 6.34619L21.6537 11.9999L15.9999 17.6537Z",fill:"currentColor"})),strikeThrough:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M12.15 19.6923C10.9732 19.6923 9.9315 19.359 9.025 18.6923C8.11867 18.0256 7.45525 17.1128 7.03475 15.9538L8.6385 15.2635C8.91667 16.0444 9.3545 16.6867 9.952 17.1905C10.5493 17.6944 11.2923 17.9463 12.1808 17.9463C12.9578 17.9463 13.6744 17.7508 14.3307 17.3598C14.9872 16.9686 15.3155 16.3487 15.3155 15.5C15.3155 15.123 15.2555 14.7968 15.1355 14.5213C15.0157 14.2456 14.8462 13.9885 14.627 13.75H16.677C16.7987 13.9705 16.8932 14.2256 16.9605 14.5153C17.0278 14.8051 17.0615 15.1334 17.0615 15.5C17.0615 16.8372 16.5747 17.8702 15.601 18.599C14.6272 19.3279 13.4768 19.6923 12.15 19.6923ZM2.25 11.75V10.25H21.75V11.75H2.25ZM12.05 4.19629C13.0475 4.19629 13.9123 4.42704 14.6443 4.88854C15.3763 5.35004 15.9673 6.05896 16.4173 7.01529L14.823 7.73079C14.6218 7.26029 14.2978 6.84462 13.851 6.48379C13.4042 6.12279 12.8141 5.94229 12.0808 5.94229C11.2244 5.94229 10.5392 6.16221 10.025 6.60204C9.51083 7.04171 9.264 7.59104 9.2845 8.25004H7.5385C7.50133 7.16421 7.89783 6.21712 8.728 5.40879C9.558 4.60046 10.6653 4.19629 12.05 4.19629Z",fill:"currentColor"})),superscript:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M16.6924 8V6.2115C16.6924 5.95383 16.7786 5.73875 16.9511 5.56625C17.1235 5.39392 17.3385 5.30775 17.5961 5.30775H19.5001V4.38475H16.6924V3.5H19.4809C19.7385 3.5 19.9536 3.58625 20.1261 3.75875C20.2985 3.93108 20.3846 4.14617 20.3846 4.404V5.2885C20.3846 5.54617 20.2985 5.76125 20.1261 5.93375C19.9536 6.10608 19.7385 6.19225 19.4809 6.19225H17.5771V7.1155H20.3846V8H16.6924ZM4.44238 18.5L8.84638 11.6287L4.77713 5.30775H6.74438L9.95963 10.404H10.0214L13.2501 5.30775H15.2329L11.1194
89811.6287L15.5579 18.5H13.5751L10.0214 12.9308H9.95963L6.42513 18.5H4.44238Z",fill:"currentColor"})),subscript:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M16.6924 20.5V18.7115C16.6924 18.4538 16.7786 18.2387 16.9511 18.0662C17.1235 17.8939 17.3385 17.8077 17.5961 17.8077H19.5001V16.8845H16.6924V16H19.4809C19.7385 16 19.9536 16.0863 20.1261 16.2587C20.2985 16.4311 20.3846 16.6461 20.3846 16.9038V17.7885C20.3846 18.0462 20.2985 18.2612 20.1261 18.4337C19.9536 18.6061 19.7385 18.6923 19.4809 18.6923H17.5771V19.6152H20.3846V20.5H16.6924ZM4.44238 18.6923L8.84638 11.8212L4.77713 5.5H6.74438L9.95963 10.5962H10.0214L13.2501 5.5H15.2329L11.1194 11.8212L15.5579 18.6923H13.5751L10.0214 13.123H9.95963L6.42513 18.6923H4.44238Z",fill:"currentColor"})),format_list_bulleted:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M9.30775 18.75V17.25H20.5V18.75H9.30775ZM9.30775 12.75V11.25H20.5V12.75H9.30775ZM9.30775 6.75005V5.25005H20.5V6.75005H9.30775ZM5.1635 19.6635C4.706 19.6635 4.31442 19.5006 3.98875 19.1748C3.66292 18.8491 3.5 18.4575 3.5 18C3.5 17.5425 3.66292 17.151 3.98875 16.8253C4.31442 16.4995 4.706 16.3365 5.1635 16.3365C5.621 16.3365 6.01258 16.4995 6.33825 16.8253C6.66408 17.151 6.827 17.5425 6.827 18C6.827 18.4575 6.66408 18.8491 6.33825 19.1748C6.
89801258 19.5006 5.621 19.6635 5.1635 19.6635ZM5.1635 13.6635C4.706 13.6635 4.31442 13.5006 3.98875 13.1748C3.66292 12.8491 3.5 12.4575 3.5 12C3.5 11.5425 3.66292 11.151 3.98875 10.8253C4.31442 10.4995 4.706 10.3365 5.1635 10.3365C5.621 10.3365 6.01258 10.4995 6.33825 10.8253C6.66408 11.151 6.827 11.5425 6.827 12C6.827 12.4575 6.66408 12.8491 6.33825 13.1748C6.01258 13.5006 5.621 13.6635 5.1635 13.6635ZM5.1635 7.66355C4.706 7.66355 4.31442 7.50063 3.98875 7.1748C3.66292 6.84913 3.5 6.45755 3.5 6.00005C3.5 5.54255 3.66292 5.15096 3.98875 4.8253C4.31442 4.49946 4.706 4.33655 5.1635 4.33655C5.621 4.33655 6.01258 4.49946 6.33825 4.8253C6.66408 5.15096 6.827 5.54255 6.827 6.00005C6.827 6.45755 6.66408 6.84913 6.33825 7.1748C6.01258 7.50063 5.621 7.66355 5.1635 7.66355Z",fill:"currentColor"})),format_list_numbered:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M3.5 21.5V20.3078H6V19.25H4.5V18.0577H6V17H3.5V15.8077H6.34625C6.58592 15.8077 6.78683 15.8888 6.949 16.051C7.11117 16.2132 7.19225 16.4141 7.19225 16.6538V17.8462C7.19225 18.0859 7.11117 18.2868 6.949 18.449C6.78683 18.6112 6.58592 18.6923 6.34625 18.6923C6.58592 18.6923 6.78683 18.7733 6.949 18.9355C7.11117 19.0977 7.19225 19.2987 7.19225 19.5385V20.6538C7.19225 20.8936 7.11117 21.0946 6.949 21.2568C6.78683 21.4189 6.58592 21.5 6.34625 21.5H3.5ZM3.5 14.8463V12.25C3.5 12.0103 3.58108 11.8093 3.74325 11.647C3.90542 11.4848 4.10642 11.4038 4.34625 11.4038H6V10.3462H3.5V9.15375H6.34625C6.58592 9.15375 6.78683 9.23483 6.949 9.397C7.11117 9.55933 7.19225 9.76033 7.19225 10V11.75C7.19225 11.9897 7.11117 12.1907 6.949 12.353C6.78683 12.5152 6.58592 12.5963 6.34625 12.5963H4.69225V13.6538H7.19225V14.8463H3.5ZM5 8.19225V3.69225H3.5V2.5H6.19225V8.19225H5ZM9.30775 18.75V17.25H20.5V18.75H9.30775ZM9.30775 12.75V11.25H20.5V12.75H9.30775ZM9.30775 6.75V5.25H20.5V6.75H9.30775Z",fill:"currentColor"})),format_list_checked:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M5.69425 18.452L2.5 15.2578L3.54425 14.2135L5.66925 16.3385L9.91925 12.0885L10.9635 13.1578L5.69425 18.452ZM5.69425 10.8365L2.5 7.64227L3.54425 6.59802L5.66925 8.72302L9.91925 4.47302L10.9635 5.54227L5.69425 10.8365ZM13.0095 16.5578V15.0578H21.5095V16.5578H13.0095ZM13.0095 8.94227V7.44227H21.5095V8.94227H13.0095Z",fill:"currentColor"})),link:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M10.8077 16.5385H7.0385C5.78283 16.5385 4.7125 16.096 3.8275 15.211C2.9425 14.3262 2.5 13.256 2.5 12.0005C2.5 10.745 2.9425 9.67471 3.8275 8.78955C4.7125 7.90421 5.78283 7.46155 7.0385 7.46155H10.8077V8.96155H7.0385C6.19867 8.96155 5.48233 9.25805 4.8895 9.85105C4.2965 10.444 4 11.1604 4 12C4 12.8397 4.2965 13.556 4.8895 14.149C5.48233 14.742 6.19867 15.0385 7.0385 15.0385H10.8077V16.5385ZM8.25 12.75V11.25H15.75V12.75H8.25ZM13.1923 16.5385V15.0385H16.9615C17.8013 15.0385 18.5177 14.742 19.1105 14.149C19.7035 13.556 20 12.8397 20 12C20 11.1604 19.7035 10.444 19.1105 9.85105C18.5177 9.25805 17.8013 8.96155 16.9615 8.96155H13.1923V7.46155H16.9615C18.2172 7.46155 19.2875 7.90405 20.1725 8.78905C21.0575 9.67388 21.5 10.744 21.5 11.9995C21.5 13.255 21.0575 14.3254 20.1725 15.2105C19.2875 16.0959 18.2172 16.5385 16.9615 16.5385H13.1923Z",fill:"currentColor"})),add_photo:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M5.11537 20.5C4.6182 20.5 4.19262 20.323 3.83862 19.969C3.48462 19.615 3.30762 19.1894 3.30762 18.6922V5.30773C3.30762 4.81056 3.48462 4.38498 3.83862 4.03098C4.19262 3.67698 4.6182 3.49998 5.11537 3.49998H13.8076V4.99998H5.11537C5.02553 4.99998 4.95178 5.02881 4.89412 5.08648C4.83645 5.14415 4.80762 5.2179 4.80762 5.30773V18.6922C4.80762 18.7821 4.83645 18.8558 4.89412 18.9135C4.95178 18.9711 5.02553 19 5.11537 19H18.4999C18.5895 19 18.6633 18.9711 18.7211 18.9135C18.7788 18.8558 18.8076 18.7821 18.8076 18.6922V9.99998H20.3076V18.6922C20.3076 19.1894 20.1306 19.615 19.7766 19.969C19.4226 20.323 18.997 20.5 18.4999 20.5H5.11537ZM17.1921 8.61523V6.61523H15.1921V5.11548H17.1921V3.11548H18.6921V5.11548H20.6921V6.61523H18.6921V8.61523H17.1921ZM6.55762 16.75H17.1344L13.8459 12.3655L11.0384 16.0192L9.03837 13.4615L6.55762 16.75Z",fill:"currentColor"})),table:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M3.5 18.6923V5.30775C3.5 4.81058 3.677 4.385 4.031 4.031C4.385 3.677 4.81058 3.5 5.30775 3.5H18.6923C19.1894 3.5 19.615 3.677 19.969 4.031C20.323 4.385 20.5 4.81058 20.5 5.30775V18.6923C20.5 19.1894 20.323 19.615 19.969 19.969C19.615 20.323 19.1894 20.5 18.6923 20.5H5.30775C4.81058 20.5 4.385 20.323 4.031 19.969C3.677 19.615 3.5 19.1894 3.5 18.6923ZM5 9.077H19V5.30775C19 5.21792 18.9712 5.14417 18.9135 5.0865C18.8558 5.02883 18.7821 5 18.6923 5H5.30775C5.21792 5 5.14417 5.02883 5.0865 5.0865C5.02883 5.14417 5 5.21792 5 5.30775V9.077ZM10.1615 14.0385H13.8385V10.577H10.1615V14.0385ZM10.1615 19H13.8385V15.5385H10.1615V19ZM5 14.0385H8.6615V10.577H5V14.0385ZM15.3385 14.0385H19V10.577H15.3385V14.0385ZM5.30775 19H8.661
8985V15.5385H5V18.6923C5 18.7821 5.02883 18.8558 5.0865 18.9135C5.14417 18.9712 5.21792 19 5.30775 19ZM15.3385 19H18.6923C18.7821 19 18.8558 18.9712 18.9135 18.9135C18.9712 18.8558 19 18.7821 19 18.6923V15.5385H15.3385V19Z",fill:"currentColor"})),horizontal_rule:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M4.5 12.75V11.25H19.5V12.75H4.5Z",fill:"currentColor"})),frontmatter:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M4.5 8.75V7.25H8.5V8.75H4.5Z",fill:"currentColor"}),Y.createElement("path",{d:"M4.5 14.75V13.25H8.5V14.75H4.5Z",fill:"currentColor"}),Y.createElement("path",{d:"M9.5 8.75V7.25H13.5V8.75H9.5Z",fill:"currentColor"}),Y.createElement("path",{d:"M9.5 14.75V13.25H13.5V14.75H9.5Z",fill:"currentColor"}),Y.createElement("path",{d:"M14.5 8.75V7.25H18.5V8.75H14.5Z",fill:"currentColor"}),Y.createElement("path",{d:"M14.5 14.75V13.25H18.5V14.75H14.5Z",fill:"currentColor"})),frame_source:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M8.6 15.2443L5.35575 12L8.6 8.75575L9.64425 9.825L7.46925 12L9.64425 14.175L8.6 15.2443ZM15.4 15.2443L14.3558 14.175L16.5307 12L14.3558 9.825L15.4 8.75575L18.6443 12L15.4 15.2443ZM5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V15H5V18.6923C5 18.7692 5.03208 18.8398 5.09625 18.9038C5.16025 18.9679 5.23075 19 5.30775 19H9V20.5H5.30775ZM15 20.5V19H18.6923C18.7692 19 18.8398 18.9679 18.9038 18.9038C18.9679 18.8398 19 18.7692 19 18.6923V15H20.5V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H15ZM3.5 9V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H9V5H5.30775C5.23075 5 5.16025 5.03208 5.09625 5.09625C5.03208 5.16025 5 5.23075 5 5.30775V9H3.5ZM19 9V5.30775C19 5.23075 18.9679 5.16025 18.9038 5.09625C18.8398 5.03208 18.7692 5 18.6923 5H15V3.5H18.6923C19.1974 3.5 19.625 3.675 19.975 4.025C20.325 4.375 20.5 4.80258 20.5 5.30775V9H19Z",fill:"currentColor"})),arrow_drop_down:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M11.9999 14.6537L7.59619 10.25H16.4037L11.9999 14.6537Z",fill:"currentColor"})),admonition:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M12.0001 21.4C11.7654 21.4 11.5385 21.3548 11.3193 21.2645C11.1002 21.174 10.9002 21.0435 10.7193 20.873L3.1271 13.2807C2.9566 13.0999 2.8261 12.8999 2.7356 12.6807C2.64526 12.4616 2.6001 12.2346 2.6001 12C2.6001 11.7653 2.64526 11.5358 2.7356 11.3115C2.8261 11.0871 2.9566 10.8897 3.1271 10.7192L10.7193 3.12698C10.9002 2.94614 11.1002 2.81314 11.3193 2.72798C11.5385 2.64264 11.7654 2.59998 12.0001 2.59998C12.2348 2.59998 12.4643 2.64264 12.6886 2.72798C12.9129 2.81314 13.1103 2.94614 13.2808 3.12698L20.8731 10.7192C21.0539 10.8897 21.1869 11.0871 21.2721 11.3115C21.3574 11.5358 21.4001 11.7653 21.4001 12C21.4001 12.2346 21.3574 12.4616 21.2721 12.6807C21.1869 12.8999 21.0539 13.0999 20.8731 13.2807L13.2808 20.873C13.1103 21.0435 12.9129 21.174 12.6886 21.2645C12.4643 21.3548 12.2348 21.4 12.0001 21.4ZM12.2213 19.8037L19.8039 12.2212C19.8552 12.1699 19.8808 12.0961 19.8808 12C19.8808 11.9038 19.8552 11.8301 19.8039 11.7787L12.2213 4.19623C12.17 4.14489 12.0963 4.11923 12.0001 4.11923C11.9039 4.11923 11.8302 4.14489 11.7788 4.19623L4.19635 11.7787C4.14501 11.8301 4.11935 11.9038 4.11935 12C4.11935 12.0961 4.14501 12.1699 4.19635 12.2212L11.7788 19.8037C11.8302 19.8551 11.9039 19.8807 12.0001 19.8807C12.0963 19.8807 12.17 19.8551 12.2213 19.8037ZM11.2501 13.0865H12.7501V7.47123H11.2501V13.0865ZM12.0001 15.702C12.2258 15.702 12.4168 15.6237 12.5731 15.4672C12.7296 15.3109 12.8078 15.1199 12.8078 14.8942C12.8078 14.6686 12.7296 14.4776 12.5731 14.3212C12.4168 14.1647 12.2258 14.0865 12.0001 14.0865C11.7744 14.0865 11.5834 14.1647 11.4271 14.3212C11.2706 14.4776 11.1923 14.6686 11.1923 14.8942C11.1923 15.1199 11.2706 15.3109 11.4271 15.4672C11.5834 15.6237 11.7744 15.702 12.0001 15.702Z",fill:"currentColor"})),sandpack:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M12.9999 22.5C12.4947 22.5 12.0671 22.325 11.7171 21.975C11.3671 21.625 11.1921 21.1974 11.1921 20.6922V7.30775C11.1921 6.80258 11.3671 6.375 11.7171 6.025C12.0671 5.675 12.4947 5.5 12.9999 5.5H16.3844C16.8895 5.5 17.3171 5.675 17.6671 6.025C18.0171 6.375 18.1921 6.80258 18.1921 7.30775V20.6922C18.1921 21.1974 18.0171 21.625 17.6671 21.975C17.3171 22.325 16.8895 22.5 16.3844 22.5H12.9999ZM12.6921 7.30775V20.6922C12.6921 20.7692 12.7242 20.8398 12.7884 20.9038C12.8524 20.9679 12.9229 21 12.9999 21H16.3844C16.4614 21 16.5319 20.9679 16.5959 20.9038C16.66 20.8398 16.6921 20.7692 16.6921 20.6922V7.30775C16.6921 7.23075 16.66 7.16025 16.5959 7.09625C16.5319 7.03208 16.4614 7 16.3844 7H12.9999C12.9229 7 12.8524 7.03208 12.7884 7.09625C12.7242 7.16025 12.6921 7.23075 12.6921 7.30775ZM6.61537 18.5C6.1102 18.5 5.
89868262 18.325 5.33262 17.975C4.98262 17.625 4.80762 17.1974 4.80762 16.6923V3.30775C4.80762 2.80258 4.98262 2.375 5.33262 2.025C5.68262 1.675 6.1102 1.5 6.61537 1.5H9.99987C10.505 1.5 10.9326 1.675 11.2826 2.025C11.6326 2.375 11.8076 2.80258 11.8076 3.30775V16.6923C11.8076 17.1974 11.6326 17.625 11.2826 17.975C10.9326 18.325 10.505 18.5 9.99987 18.5H6.61537ZM6.30762 3.30775V16.6923C6.30762 16.7692 6.3397 16.8398 6.40387 16.9038C6.46787 16.9679 6.53837 17 6.61537 17H9.99987C10.0769 17 10.1474 16.9679 10.2114 16.9038C10.2755 16.8398 10.3076 16.7692 10.3076 16.6923V3.30775C10.3076 3.23075 10.2755 3.16025 10.2114 3.09625C10.1474 3.03208 10.0769 3 9.99987 3H6.61537C6.53837 3 6.46787 3.03208 6.40387 3.09625C6.3397 3.16025 6.30762 3.23075 6.30762 3.30775Z",fill:"currentColor"})),rich_text:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H18.6923C19.1974 3.5 19.625 3.675 19.975 4.025C20.325 4.375 20.5 4.80258 20.5 5.30775V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H5.30775ZM5.30775 19H18.6923C18.7692 19 18.8398 18.9679 18.9038 18.9038C18.9679 18.8398 19 18.7692 19 18.6923V5.30775C19 5.23075 18.9679 5.16025 18.9038 5.09625C18.8398 5.03208 18.7692 5 18.6923 5H5.30775C5.23075 5 5.16025 5.03208 5.09625 5.09625C5.03208 5.16025 5 5.23075 5 5.30775V18.6923C5 18.7692 5.03208 18.8398 5.09625 18.9038C5.16025 18.9679 5.23075 19 5.30775 19ZM6.75 17H17.3268L14 12.3655L11.2308 16.0192L9 13.4615L6.75 17Z",fill:"currentColor"}),Y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 12V6.5H9.1925C9.5925 6.5 9.9425 6.65 10.2425 6.95C10.5425 7.25 10.6925 7.6 10.6925 8V8.6925C10.6925 9.03733 10.605 9.32675 10.43 9.56075C10.255 9.79458 10.0168 9.97817 9.7155 10.1115L10.6155 12H9.404L8.504 10.1925H7.1925V12H6ZM9.1925 9H7.1925V7.6925H9.1925C9.26933 7.6925 9.33983 7.7245 9.404 7.7885C9.468 7.85267 9.5 7.92317 9.5 8V8.6925C9.5 8.76933 9.468 8.83983 9.404 8.904C9.33983 8.968 9.26933 9 9.1925 9Z",fill:"currentColor"}),Y.createElement("path",{d:"M12.5 7H17.5V8.25H12.5V7Z",fill:"currentColor"}),Y.createElement("path",{d:"M12.5 9.25H17.5V10.5H12.5V9.25Z",fill:"currentColor"})),difference:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H18.6923C19.1974 3.5 19.625 3.675 19.975 4.025C20.325 4.375 20.5 4.80258 20.5 5.30775V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H5.30775ZM18.6923 19H5.30775C5.23075 19 5.16025 18.9679 5.09625 18.9038C5.03208 18.8398 5 18.7692 5 18.6923V5.30775C5 5.23075 5.03208 5.16025 5.09625 5.09625C5.16025 5.03208 5.23075 5 5.30775 5H18.6923C18.7692 5 18.8398 5.03208 18.9038 5.09625C18.9679 5.16025 19 5.23075 19 5.30775V18.6923C19 18.7692 18.9679 18.8398 18.9038 18.9038C18.8398 18.9679 18.7692 19 18.6923 19Z",fill:"currentColor"}),Y.createElement("rect",{x:"9",y:"10",width:"5.5",height:"1.5",fill:"currentColor"}),Y.createElement("rect",{x:"9",y:"15",width:"5.5",height:"1.5",fill:"currentColor"}),Y.createElement("rect",{x:"11",y:"8",width:"1.5",height:"5.5",fill:"currentColor"})),markdown:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H18.6923C19.1974 3.5 19.625 3.675 19.975 4.025C20.325 4.375 20.5 4.80258 20.5 5.30775V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H5.30775ZM18.6923 19H5.30775C5.23075 19 5.16025 18.9679 5.09625 18.9038C5.03208 18.8398 5 18.7692 5 18.6923V5.30775C5 5.23075 5.03208 5.16025 5.09625 5.09625C5.16025 5.03208 5.23075 5 5.30775 5H18.6923C18.7692 5 18.8398 5.03208 18.9038 5.09625C18.9679 5.16025 19 5.23075 19 5.30775V18.6923C19 18.7692 18.9679 18.8398 18.9038 18.9038C18.8398 18.9679 18.7692 19 18.6923 19Z",fill:"currentColor"}),Y.createElement("path",{d:"M13 15H11.5V11L9.5 14L7.5 11V15H6V8H7.5L9.5 11L11.5 8H13V15Z",fill:"currentColor"}),Y.createElement("path",{d:"M15.9921 15.5833L13.2886 12.8797L14.0546 12.1137L15.4504 13.5016V7.99597L16.5336 7.99993V13.5016L17.9296 12.1137L18.6954 12.8797L15.9921 15.5833Z",fill:"currentColor"})),open_in_new:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H11.6152V5H5.30775C5.23075 5 5.16025 5.03208 5.09625 5.09625C5.03208 5.16025 5 5.23075 5 5.30775V18.6923C5 18.7692 5.03208 18.8398 5.09625 18.9038C5.16025 18.9679 5.23075 19 5.30775 19H18.6923C18.7692 19 18.8398 18.9679 18.9038 18.9038C18.9679 18.8398 19 18.7692 19 18.6923V12.3848H20.5V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H5.30775ZM9.71925 15.3345L8.6655 14.2808L17.9462 5H14V3.5H20.5V10H19V6.05375L9.71925 15.3345Z",fill:"currentColor"})),link_off:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M18.8843 16.1038L17.7498 14.9385C18.4228 14.7552 18.9661 14.3946 19.3796 13.8568C19.7931 13.319 19.9998 12.7 19.9998 12C19.9998 11.1604 19.705 10.444 19.1153 9.85105C18.5255 9.25805 17.8139 8.96155 16.9806 8.96155H13.1728V7.46155H16.9806C18.2293 7.46155 19.2947 7.90422 20.1768 8.78955C21.0588 9.67472 21.4998 10.7449 21.4998 12C21.4998 12.8859 21.262 13.6951 20.7863 14.4278C20.3107 15.1606 19.6767 15.7193 18.8843 16.1038ZM15.5806 12.75L14.0806 11.25H15.7306V12.75H15.5806ZM20.1461 22.2538L1.74609 3.8538L2.79984 2.80005L21.1998 21.2L20.1461 22.2538ZM10.8268 16.5386H7.03834C5.78318 16.5386 4.71301 16.0959 3.82784 15.2105C2.94251 14.3254 2.49984 13.2552 2.49984 12C2.49984 10.8885 2.85784 9.91322 3.57384 9.07405C4.28984 8.23505 5.18826 7.72838 6.26909 7.55405H6.49984L7.90759 8.96155H7.03834C6.19851 8.96155 5.48218 9.25805 4.88934 9.85105C4.29634 10.444 3.99984 11.1604 3.99984 12C3.99984 12.8397 4.29634 13.556 4.88934 14.149C5.48218 14.742 6.19851 15.0385 7.03834 15.0385H10.8268V16.5386ZM8.26909 12.75V11.25H10.2113L11.6863 12.75H8.26909Z",fill:"currentColor"})),edit:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M5 19H6.2615L16.498 8.7635L15.2365 7.502L5 17.7385V19ZM3.5 20.5V17.1155L16.6905 3.93075C16.8417 3.79342 17.0086 3.68733 17.1913 3.6125C17.3741 3.5375 17.5658 3.5 17.7663 3.5C17.9668 3.5 18.1609 3.53558 18.3488 3.60675C18.5367 3.67792 18.7032 3.79108 18.848 3.94625L20.0693 5.
89818275C20.2244 5.32758 20.335 5.49425 20.401 5.68275C20.467 5.87125 20.5 6.05975 20.5 6.24825C20.5 6.44942 20.4657 6.64133 20.397 6.824C20.3283 7.00683 20.2191 7.17383 20.0693 7.325L6.8845 20.5H3.5ZM15.8562 8.14375L15.2365 7.502L16.498 8.7635L15.8562 8.14375Z",fill:"currentColor"})),content_copy:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M9.05775 17.5C8.55258 17.5 8.125 17.325 7.775 16.975C7.425 16.625 7.25 16.1974 7.25 15.6923V4.30775C7.25 3.80258 7.425 3.375 7.775 3.025C8.125 2.675 8.55258 2.5 9.05775 2.5H17.4423C17.9474 2.5 18.375 2.675 18.725 3.025C19.075 3.375 19.25 3.80258 19.25 4.30775V15.6923C19.25 16.1974 19.075 16.625 18.725 16.975C18.375 17.325 17.9474 17.5 17.4423 17.5H9.05775ZM9.05775 16H17.4423C17.5192 16 17.5898 15.9679 17.6538 15.9038C17.7179 15.8398 17.75 15.7692 17.75 15.6923V4.30775C17.75 4.23075 17.7179 4.16025 17.6538 4.09625C17.5898 4.03208 17.5192 4 17.4423 4H9.05775C8.98075 4 8.91025 4.03208 8.84625 4.09625C8.78208 4.16025 8.75 4.23075 8.75 4.30775V15.6923C8.75 15.7692 8.78208 15.8398 8.84625 15.9038C8.91025 15.9679 8.98075 16 9.05775 16ZM5.55775 21C5.05258 21 4.625 20.825 4.275 20.475C3.925 20.125 3.75 19.6974 3.75 19.1923V6.30775H5.25V19.1923C5.25 19.2693 5.28208 19.3398 5.34625 19.4038C5.41025 19.4679 5.48075 19.5 5.55775 19.5H15.4423V21H5.55775Z",fill:"currentColor"})),more_horiz:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M6.23096 13.5C5.81846 13.5 5.46537 13.3531 5.17171 13.0592C4.87787 12.7656 4.73096 12.4125 4.73096 12C4.73096 11.5875 4.87787 11.2344 5.17171 10.9408C5.46537 10.6469 5.81846 10.5 6.23096 10.5C6.64346 10.5 6.99662 10.6469 7.29046 10.9408C7.58412 11.2344 7.73096 11.5875 7.73096 12C7.73096 12.4125 7.58412 12.7656 7.29046 13.0592C6.99662 13.3531 6.64346 13.5 6.23096 13.5ZM12.0002 13.5C11.5877 13.5 11.2346 13.3531 10.941 13.0592C10.6471 12.7656 10.5002 12.4125 10.5002 12C10.5002 11.5875 10.6471 11.2344 10.941 10.9408C11.2346 10.6469 11.5877 10.5 12.0002 10.5C12.4127 10.5 12.7658 10.6469 13.0595 10.9408C13.3533 11.2344 13.5002 11.5875 13.5002 12C13.5002 12.4125 13.3533 12.7656 13.0595 13.0592C12.7658 13.3531 12.4127 13.5 12.0002 13.5ZM17.7695 13.5C17.357 13.5 17.0038 13.3531 16.71 13.0592C16.4163 12.7656 16.2695 12.4125 16.2695 12C16.2695 11.5875 16.4163 11.2344 16.71 10.9408C17.0038 10.6469 17.357 10.5 17.7695 10.5C18.182 10.5 18.535 10.6469 18.8287 10.9408C19.1225 11.2344 19.2695 11.5875 19.2695 12C19.2695 12.4125 19.1225 12.7656 18.8287 13.0592C18.535 13.3531 18.182 13.5 17.7695 13.5Z",fill:"currentColor"})),more_vert:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M12 19.2692C11.5875 19.2692 11.2344 19.1223 10.9408 18.8285C10.6469 18.5348 10.5 18.1817 10.5 17.7692C10.5 17.3567 10.6469 17.0035 10.9408 16.7097C11.2344 16.416 11.5875 16.2692 12 16.2692C12.4125 16.2692 12.7656 16.416 13.0592 16.7097C13.3531 17.0035 13.5 17.3567 13.5 17.7692C13.5 18.1817 13.3531 18.5348 13.0592 18.8285C12.7656 19.1223 12.4125 19.2692 12 19.2692ZM12 13.5C11.5875 13.5 11.2344 13.353 10.9408 13.0592C10.6469 12.7655 10.5 12.4125 10.5 12C10.5 11.5875 10.6469 11.2344 10.9408 10.9407C11.2344 10.6469 11.5875 10.5 12 10.5C12.4125 10.5 12.7656 10.6469 13.0592 10.9407C13.3531 11.2344 13.5 11.5875 13.5 12C13.5 12.4125 13.3531 12.7655 13.0592 13.0592C12.7656 13.353 12.4125 13.5 12 13.5ZM12 7.73071C11.5875 7.73071 11.2344 7.58388 10.9408 7.29021C10.6469 6.99638 10.5 6.64321 10.5 6.23071C10.5 5.81821 10.6469 5.46513 10.9408 5.17146C11.2344 4.87763 11.5875 4.73071 12 4.73071C12.4125 4.73071 12.7656 4.87763 13.0592 5.17146C13.3531 5.46513 13.5 5.81821 13.5 6.23071C13.5 6.64321 13.3531 6.99638 13.0592 7.29021C12.7656 7.58388 12.4125 7.73071 12 7.73071Z",fill:"currentColor"})),close:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M6.39994 18.6538L5.34619 17.6L10.9462 12L5.34619 6.4L6.39994 5.34625L11.9999 10.9463L17.5999 5.34625L18.6537 6.4L13.0537 12L18.6537 17.6L17.5999 18.6538L11.9999 13.0538L6.39994 18.6538Z",fill:"currentColor"})),settings:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M9.69225 21.5L9.3115 18.4538C9.04367 18.3641 8.769 18.2385 8.4875 18.077C8.20617 17.9153 7.95459 17.7422 7.73275 17.5577L4.9115 18.75L2.604 14.75L5.04425 12.9058C5.02125 12.7571 5.00492 12.6077 4.99525 12.4578C4.98559 12.3078 4.98075 12.1583 4.98075 12.0095C4.98075 11.8673 4.98559 11.7228 4.99525 11.576C5.00492 11.4292 5.02125 11.2686 5.04425 11.0943L2.604 9.25L4.9115 5.26925L7.723 6.452C7.96417 6.261 8.22159 6.08633 8.49525 5.928C8.76892 5.76967 9.03784 5.64242 9.302 5.54625L9.69225 2.5H14.3078L14.6885 5.55575C14.9885 5.66475 15.2599 5.792 15.5028 5.9375C15.7458 6.083 15.991 6.2545 16.2385 6.452L19.0885 5.26925L21.396 9.25L18.9173 11.123C18.9531 11.2845 18.9727 11.4355 18.976 11.576C18.9792 11.7163 18.9808 11.8577 18.9808 12C18.9808 12.1358 18.9775 12.274 18.971 12.4145C18.9647 12.5548 18.9417 12.7154 18.902 12.8963L21.3615 14.75L19.0538 18.75L16.2385 17.548C15.99
8981 17.7455 15.7384 17.9202 15.4808 18.072C15.2231 18.224 14.959 18.3481 14.6885 18.4443L14.3078 21.5H9.69225ZM11 20H12.9655L13.325 17.3212C13.8353 17.1879 14.3017 16.9985 14.724 16.753C15.1465 16.5073 15.5539 16.1916 15.9463 15.8057L18.4308 16.85L19.4155 15.15L17.2463 13.5155C17.3296 13.2565 17.3863 13.0026 17.4163 12.7537C17.4464 12.5051 17.4615 12.2538 17.4615 12C17.4615 11.7397 17.4464 11.4884 17.4163 11.2463C17.3863 11.0039 17.3296 10.7564 17.2463 10.5038L19.4345 8.85L18.45 7.15L15.9365 8.2095C15.6018 7.85183 15.2009 7.53583 14.7338 7.2615C14.2664 6.98717 13.7937 6.79292 13.3155 6.67875L13 4H11.0155L10.6845 6.66925C10.1743 6.78975 9.70325 6.97433 9.27125 7.223C8.83909 7.47183 8.42684 7.79233 8.0345 8.1845L5.55 7.15L4.5655 8.85L6.725 10.4595C6.64167 10.6968 6.58334 10.9437 6.55 11.2C6.51667 11.4563 6.5 11.7262 6.5 12.0095C6.5 12.2698 6.51667 12.525 6.55 12.775C6.58334 13.025 6.6385 13.2718 6.7155 13.5155L4.5655 15.15L5.55 16.85L8.025 15.8C8.4045 16.1897 8.81025 16.5089 9.24225 16.7578C9.67442 17.0064 10.152 17.1974 10.675 17.3307L11 20ZM12.0115 15C12.8435 15 13.5515 14.708 14.1355 14.124C14.7195 13.54 15.0115 12.832 15.0115 12C15.0115 11.168 14.7195 10.46 14.1355 9.876C13.5515 9.292 12.8435 9 12.0115 9C11.1692 9 10.4586 9.292 9.87975 9.876C9.30092 10.46 9.0115 11.168 9.0115 12C9.0115 12.832 9.30092 13.54 9.87975 14.124C10.4586 14.708 11.1692 15 12.0115 15Z",fill:"currentColor"})),delete_big:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M7.30775 20.5C6.80908 20.5 6.38308 20.3234 6.02975 19.9702C5.67658 19.6169 5.5 19.1909 5.5 18.6922V5.99998H4.5V4.49998H9V3.61548H15V4.49998H19.5V5.99998H18.5V18.6922C18.5 19.1974 18.325 19.625 17.975 19.975C17.625 20.325 17.1974 20.5 16.6923 20.5H7.30775ZM17 5.99998H7V18.6922C7 18.7821 7.02883 18.8558 7.0865 18.9135C7.14417 18.9711 7.21792 19 7.30775 19H16.6923C16.7692 19 16.8398 18.9679 16.9038 18.9037C16.9679 18.8397 17 18.7692 17 18.6922V5.99998ZM9.404 17H10.9037V7.99998H9.404V17ZM13.0962 17H14.596V7.99998H13.0962V17Z",fill:"currentColor"})),delete_small:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M7.30775 20.5C6.80908 20.5 6.38308 20.3234 6.02975 19.9702C5.67658 19.6169 5.5 19.1909 5.5 18.6922V5.99998H4.5V4.49998H9V3.61548H15V4.49998H19.5V5.99998H18.5V18.6922C18.5 19.1974 18.325 19.625 17.975 19.975C17.625 20.325 17.1974 20.5 16.6923 20.5H7.30775ZM17 5.99998H7V18.6922C7 18.7821 7.02883 18.8558 7.0865 18.9135C7.14417 18.9711 7.21792 19 7.30775 19H16.6923C16.7692 19 16.8398 18.9679 16.9038 18.9037C16.9679 18.8397 17 18.7692 17 18.6922V5.99998ZM9.404 17H10.9037V7.99998H9.404V17ZM13.0962 17H14.596V7.99998H13.0962V17Z",fill:"currentColor"})),format_align_center:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M3.5 20.5V19H20.5V20.5H3.5ZM7.5 16.625V15.125H16.5V16.625H7.5ZM3.5 12.75V11.25H20.5V12.75H3.5ZM7.5 8.875V7.375H16.5V8.875H7.5ZM3.5 5V3.5H20.5V5H3.5Z",fill:"currentColor"})),format_align_left:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M3.5 20.5V19H20.5V20.5H3.5ZM3.5 16.625V15.125H14.5V16.625H3.5ZM3.5 12.75V11.25H20.5V12.75H3.5ZM3.5 8.875V7.375H14.5V8.875H3.5ZM3.5 5V3.5H20.5V5H3.5Z",fill:"currentColor"})),format_align_right:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M3.5 5V3.5H20.5V5H3.5ZM9.5 8.875V7.375H20.5V8.875H9.5ZM3.5 12.75V11.25H20.5V12.75H3.5ZM9.5 16.625V15.125H20.5V16.625H9.5ZM3.5 20.5V19H20.5V20.5H3.5Z",fill:"currentColor"})),add_row:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.025 10.2077C4.375 9.85775 4.80258 9.68275 5.30775 9.68275H6.5V11.1827H5.30775C5.21792 11.1827 5.14417 11.2116 5.0865 11.2693C5.02883 11.3269 5 11.4007 5 11.4905V16.1923C5 16.2821 5.02883 16.3558 5.0865 16.4135C5.14417 16.4712 5.21792 16.5 5.30775 16.5H18.6923C18.7821 16.5 18.8558 16.4712 18.9135 16.4135C18.9712 16.3558 19 16.2821 19 16.1923V11.4905C19 11.4007 18.9712 11.3269 18.9135 11.2693C18.8558 11.2116 18.7821 11.1827 18.6923 11.1827H17.6923V9.68275H18.6923C19.1974 9.68275 19.625 9.85775 19.975 10.2077C20.325 10.5577 20.5 10.9853 20.5 11.4905V16.1923C20.5 16.6974 20.325 17.125 19.975 17.475C19.625 17.825 19.1974 18 18.6923 18H5.30775C4.80258 18 4.375 17.825 4.025 17.475C3.675 17.125 3.5 16.6974 3.5 16.1923V11.4905C3.5 10.9853 3.675 10.5577 4.025 10.2077Z",fill:"currentColor"}),Y.createElement("path",{d:"M11.3848 9.68275V7.5H12.8848V9.68275H15V11.1827H12.8848V13.2307H11.3848V11.1827H9.26925V9.68275H11.3848Z",fill:"currentColor"})),add_column:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.70775 4.025C9.35775 4.375 9.18275 4.80258 9.18275 5.30775V6.5H10.6827V5.30775C10.6827 5.21792 10.7116 5.14417 10.7693 5.0865C10.8269 5.02883 10.9007 5 10.9905 5H15.6923C15.7821 5 15.8558 5.02883 15.9135 5.0865C15.9712 5.14417 16 5.21792 16 5.30775V18.6923C16 18.7821 15.9712 18.8558 15.9135 18.9135C15.8558 18.9712 15.7821 19 15.6923 19H10.9905C10.9007 19 10.8269 18.9712 10.7693 18.9135C10.7116 18.8558 10.6827 18.7821 10.6827 18.6923V17.6923H9.18275V18.6923C9.18275 19.1974 9.35775 19.625 9.70775 19.975C10.0577 20.325 10.4853 20.5 10.9905 20.5H15.6923C16.1974 20.5 16.625 20.325 16.975 19.975C17.325 19.625 17.5 19.1974 17.5 18.6923V5.30775C17.5 4.80258 17.325 4.375 16.975 4.025C16.625 3.675 16.1974 3.5 15.6923 3.5H10.9905C10.4853 3.5 10.0577 3.675 9.70775 4.025Z",fill:"currentColor"}),Y.createElement("path",{d:"M9.18275 11.3848H7V12.8848H9.18275V15H10.6827V12.8848H12.7307V11.3848H10.6827V9.26925H9.18275V11.3848Z",fill:"currentColor"})),insert_col_left:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M13.0001 20.1152H8.67713H8.75388H8.69238H13.0001ZM7.19238 19.8075C7.19238 20.3127 7.36738 20.7402 7.71738 21.0902C8.06738 21.4402 8.49497 21.6152 9.00013 21.6152H12.6924C13.1975 21.6152 13.6251 21.4402 13.9751 21.0902C14.3251 20.7402 14.5001 20.3127 14.5001 19.8075V10.423H13.0001V19.8075C13.0001 19.8973 12.9713 19.9711 12.9136 20.0287C12.856 20.0864 12.7822 20.1152 12.6924 20.1152H9.00013C8.9103 20.1152 8.83655 20.0864 8.77888 20.0287C8.72122 19.9711 8.69238 19.8973 8.69238 19.8075V4.69223C8.26422 4.74357 7.90722 4.93299 7.62138 5.26048C7.33538 5.58798 7.19238 5.97548 7.19238 6.42298V19.8075ZM13.0001 2.49998V4.61523H10.8846V6.11523H13.0001V8.23073H14.5001V6.11523H16.6154V4.61523H14.5001V2.49998H13.0001Z",fill:"currentColor"})),insert_row_above:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M20.1152 9.99987V14.3229V14.2461V14.3076V9.99987ZM19.8075 15.8076C20.3127 15.8076 20.7402 15.6326 21.0902 15.2826C21.4402 14.9326 21.6152 14.505 21.6152 13.9999V10.3076C21.6152 9.80245 21.4402 9.37487 21.0902 9.02487C20.7402 8.67487 20.3127 8.49987 19.8075 8.49987H10.423V9.99987H19.8075C19.8973 9.99987 19.9711 10.0287 20.0287 10.0864C20.0864 10.144 20.1152 10.2178 20.1152 10.3076V13.9999C20.1152 14.0897 20.0864 14.1635 20.0287 14.2211C19.9711 14.2788 19.8973 14.3076 19.8075 14.3076H4.69223C4.74357 14.7358 4.93299 15.0928 5.26048 15.3786C5.58798 15.6646 5.97548 15.8076 6.42298 15.8076H19.8075ZM2.49998 9.99987H4.61523V12.1154H6.11523V9.99987H8.23073V8.49987H6.11523V6.38462H4.61523V8.49987H2.49998V9.99987Z",fill:"currentColor"})),insert_row_below:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M20.1152 14.1924V9.86939V9.94614V9.88464V14.1924ZM19.8075 8.38464C20.3127 8.38464 20.7402 8.55964 21.0902 8.90964C21.4402 9.25964 21.6152 9.68723 21.6152 10.1924V13.8846C21.6152 14.3898 21.4402 14.8174 21.0902 15.1674C20.7402 15.5174 20.3127 15.6924 19.8075 15.6924H10.423V14.1924H19.8075C19.8973 14.1924 19.9711 14.1636 20.0287 14.1059C20.0864 14.0482 20.1152 13.9745 20.1152 13.8846V10.1924C20.1152 10.1026 20.0864 10.0288 20.0287 9.97114C19.9711 9.91348 19.8973 9.88464 19.8075 9.88464H4.69223C4.74357 9.45648 4.93299 9.09948 5.26048 8.81364C5.58798 8.52764 5.97548 8.38464 6.42298 8.38464H19.8075ZM2.49998 14.1924H4.61523V12.0769H6.11523V14.1924H8.23073V15.6924H6.11523V1
8987.8076H4.61523V15.6924H2.49998V14.1924Z",fill:"currentColor"})),insert_col_right:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M10.8075 20.1152H15.1305H15.0537H15.1152H10.8075ZM16.6152 19.8075C16.6152 20.3127 16.4402 20.7402 16.0902 21.0902C15.7402 21.4402 15.3127 21.6152 14.8075 21.6152H11.1152C10.6101 21.6152 10.1825 21.4402 9.83248 21.0902C9.48248 20.7402 9.30748 20.3127 9.30748 19.8075V10.423H10.8075V19.8075C10.8075 19.8973 10.8363 19.9711 10.894 20.0287C10.9517 20.0864 11.0254 20.1152 11.1152 20.1152H14.8075C14.8973 20.1152 14.9711 20.0864 15.0287 20.0287C15.0864 19.9711 15.1152 19.8973 15.1152 19.8075V4.69223C15.5434 4.74357 15.9004 4.93299 16.1862 5.26048C16.4722 5.58798 16.6152 5.97548 16.6152 6.42298V19.8075ZM10.8075 2.49998V4.61523H12.923V6.11523H10.8075V8.23073H9.30748V6.11523H7.19223V4.61523H9.30748V2.49998H10.8075Z",fill:"currentColor"})),check:Y.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Y.createElement("path",{d:"M9.54983 17.6537L4.21533 12.3192L5.28433 11.25L9.54983 15.5155L18.7153 6.34998L19.7843 7.41923L9.54983 17.6537Z",fill:"currentColor"}))},Jtt="_editorRoot_1e2ox_53",ent="_editorWrapper_1e2ox_155",tnt="_toolbarRoot_1e2ox_162",nnt="_readOnlyToolbarRoot_1e2ox_189",rnt="_toolbarToggleItem_1e2ox_208",int="_toolbarGroupOfGroups_1e2ox_219",snt="_toolbarToggleSingleGroup_1e2ox_224",ant="_toolbarButton_1e2ox_239",ont="_selectContainer_1e2ox_288",lnt="_selectItem_1e2ox_301",cnt="_selectTrigger_1e2ox_308",unt="_selectDropdownArrow_1e2ox_374",dnt="_contentEditable_1e2ox_380",fnt="_iconButton_1e2ox_457",hnt="_primaryButton_1e2ox_507",pnt="_secondaryButton_1e2ox_508",mnt="_linkDialogEditForm_1e2ox_541",gnt="_linkDialogAnchor_1e2ox_587",xnt="_linkDialogPopoverContent_1e2ox_601",vnt="_tableColumnEditorPopoverContent_1e2ox_602",ynt="_dialogContent_1e2ox_603",bnt="_popoverArrow_1e2ox_650",_nt="_linkDialogPreviewAnchor_1e2ox_654",wnt="_tooltipTrigger_1e2ox_677",Snt="_tooltipContent_1e2ox_681",Ent="_actionButton_1e2ox_695",Cnt="_tableEditor_1e2ox_714",Tnt="_toolCell_1e2ox_725",Ant="_tableColumnEditorTrigger_1e2ox_744",knt="_addRowButton_1e2ox_746",Nnt="_addColumnButton_1e2ox_747",jnt="_tableColumnEditorToolbar_1e2ox_789",Rnt="_toggleGroupRoot_1e2ox_802",Int="_tableToolsColumn_1e2ox_820",Ont="_leftAlignedCell_1e2ox_829",Pnt="_rightAlignedCell_1e2ox_833",Mnt="_centeredCell_1e2ox_837",Dnt="_dialogOverlay_1e2ox_870",Fnt="_focusedImage_1e2ox_916",Lnt="_imageWrapper_1e2ox_920",znt="_editImageToolbar_1e2ox_933",$nt="_editImageButton_1e2ox_937",Bnt="_imageControlWrapperResizing_1e2ox_1032",Unt="_imageResizer_1e2ox_1036",Vnt="_imageResizerN_1e2ox_1045",Hnt="_imageResizerNe_1e2ox_1051",qnt="_imageResizerE_1e2ox_1057",Wnt="_imageResizerSe_1e2ox_1063",Gnt="_imageResizerS_1e2ox_1063",Knt="_imageResizerSw_1e2ox_1075",Ynt="_imageResizerW_1e2ox_1081",Xnt="_imageResizerNw_1e2ox_1087",Qnt="_imagePlaceholder_1e2ox_1093",Znt="_imageDimensionsContainer_1e2ox_1101",Jnt="_placeholder_1e2ox_1106",ert="_rootContentEditableWrapper_1e2ox_1119",trt="_downshiftInputWrapper_1e2ox_1129",nrt="_downshiftInput_1e2ox_1129",rrt="_downshiftAutocompleteContainer_1e2ox_1160",irt="_textInput_1e2ox_1206",srt="_multiFieldForm_1e2ox_1214",art="_formField_1e2ox_1220",ort="_popupContainer_1e2ox_1240",Nt={editorRoot:Jtt,editorWrapper:ent,toolbarRoot:tnt,readOnlyToolbarRoot:nnt,toolbarToggleItem:rnt,toolbarGroupOfGroups:int,toolbarToggleSingleGroup:snt,toolbarButton:ant,selectContainer:ont,selectItem:lnt,selectTrigger:cnt,selectDropdownArrow:unt,contentEditable:dnt,iconButton:fnt,primaryButton:hnt,secondaryButton:pnt,linkDialogEditForm:mnt,linkDialogAnchor:gnt,linkDialogPopoverContent:xnt,tableColumnEditorPopoverContent:vnt,dialogContent:ynt,popoverArrow:bnt,linkDialogPreviewAnchor:_nt,tooltipTrigger:wnt,tooltipContent:Snt,actionButton:Ent,tableEditor:Cnt,toolCell:Tnt,tableColumnEditorTrigger:Ant,addRowButton:knt,addColumnButton:Nnt,tableColumnEditorToolbar:jnt,toggleGroupRoot:Rnt,tableToolsColumn:Int,leftAlignedCell:Ont,rightAlignedCell:Pnt,centeredCell:Mnt,dialogOverlay:Dnt,focusedImage:Fnt,imageWrapper:Lnt,editImageToolbar:znt,editImageButton:$nt,imageControlWrapperResizing:Bnt,imageResizer:Unt,imageResizerN:Vnt,imageResizerNe:Hnt,imageResizerE:qnt,imageResizerSe:Wnt,imageResizerS:Gnt,imageResizerSw:Knt,imageResizerW
898:Ynt,imageResizerNw:Xnt,imagePlaceholder:Qnt,imageDimensionsContainer:Znt,placeholder:Jnt,rootContentEditableWrapper:ert,downshiftInputWrapper:trt,downshiftInput:nrt,downshiftAutocompleteContainer:rrt,textInput:irt,multiFieldForm:srt,formField:art,popupContainer:ort},lrt=({children:e})=>{const t=Kl(Wh),n=Y.useMemo(()=>[t,gpe(null,c4)],[t]);return Y.createElement(QN.Provider,{value:n},e)},crt=()=>{const e=Ju(),t=ol(jtt),n=ol(Rtt),r=h=>{n(h),t({current:h})},[i,s,a,o,c,u,d]=Hc(oF,lF,t0e,n0e,i0e,cF,r0e);return Y.createElement(Y.Fragment,null,o.map((h,p)=>Y.createElement(h,{key:p})),Y.createElement(h0e,{wrappers:c},Y.createElement("div",{className:Xr(Nt.rootContentEditableWrapper,"mdxeditor-root-contenteditable")},Y.createElement(f0e,{contentEditable:Y.createElement("div",{ref:r},Y.createElement(u0e,{className:Xr(Nt.contentEditable,i),ariaLabel:e("contentArea.editableMarkdown","editable markdown"),spellCheck:s})),placeholder:Y.createElement("div",{className:Xr(Nt.contentEditable,Nt.placeholder,i)},Y.createElement("p",null,u)),ErrorBoundary:d0e}))),a.map((h,p)=>Y.createElement(h,{key:p})),d.map((h,p)=>Y.createElement(h,{key:p})))},urt={listItemIndent:"one"},drt=e=>Ztt[e];function frt(e,t,n={}){let r=t;for(const[i,s]of Object.entries(n))r=r.replaceAll(`{{${i}}}`,String(s));return r}const h0e=({wrappers:e,children:t})=>{if(e.length===0)return Y.createElement(Y.Fragment,null,t);const n=e[0];return Y.createElement(n,null,Y.createElement(h0e,{wrappers:e.slice(1)},t))},hrt=({children:e,className:t,overlayContainer:n})=>{const r=Y.useRef(null),i=ol(yx);return Y.useEffect(()=>{const s=document.createElement("div");return s.classList.add("mdxeditor-popup-container",Nt.editorRoot,Nt.popupContainer,...(t??"").trim().split(" ").filter(Boolean)),(n??document.body).appendChild(s),r.current=s,i(r),()=>{s.remove()}},[t,r,n,i]),Y.createElement("div",{className:Xr("mdxeditor",Nt.editorRoot,Nt.editorWrapper,t)},e)},prt=({mdxRef:e})=>{const t=P5();return Y.useImperativeHandle(e,()=>({getMarkdown:()=>{const n=t.getValue(C3);return n==="source"||n==="diff"?t.getValue(xS):t.getValue(Y0)},setMarkdown:n=>{t.pub(e$,n)},insertMarkdown:n=>{t.pub(Yge,n)},focus:(n,r)=>{var i;(i=t.getValue(Wh))==null||i.focus(n,r)}}),[t]),null},mrt=Y.forwardRef((e,t)=>Y.createElement(pKe,{plugins:[Dtt({contentEditableClassName:e.contentEditableClassName??"",spellCheck:e.spellCheck??!0,initialMarkdown:e.markdown,onChange:e.onChange??cm,onBlur:e.onBlur??cm,toMarkdownOptions:e.toMarkdownOptions??urt,autoFocus:e.autoFocus??!1,placeholder:e.placeholder??"",readOnly:!!e.readOnly,iconComponentFor:e.iconComponentFor??drt,suppressHtmlProcessing:e.suppressHtmlProcessing??!1,onError:e.onError??cm,translation:e.translation??frt,trim:e.trim??!0,lexicalTheme:e.lexicalTheme,..."editorState"in e?{editorState:e.editorState}:{},suppressSharedHistory:e.suppressSharedHistory??!1,additionalLexicalNodes:e.additionalLexicalNodes??[],lexicalEditorNamespace:e.lexicalEditorNamespace??"MDXEditor"}),...e.plugins??[]]},Y.createElement(hrt,{className:e.className,overlayContainer:e.overlayContainer},Y.createElement(lrt,null,Y.createElement(crt,null))),Y.createElement(prt,{mdxRef:t}))),p0e=typeof window<"u"&&typeof window.document.createElement<"u",m0e=p0e&&/Mac|iPod|iPhone|iPad/.test(navigator.platform);function grt(e,t){return m0e?e:t}const xrt={testLexicalNode:i4,visitLexicalNode:({lexicalNode:e,actions:t})=>{const n=parseInt(e.getTag()[1],10);t.addAndStepInto("heading",{depth:n})}},vrt={testNode:"heading",visitNode:function({mdastNode:e,actions:t}){t.addAndStepInto(Ed(`h${e.depth}`))}},yrt=[48,49,50,51,52,53,54],g0e=[1,2,3,4,5,6],brt={49:1,50:2,51:3,52:4,53:5,54:6},f4=xn(g0e,e=>{e.pub(e0e,t=>t.registerCommand(jpe,n=>{const{keyCode:r,ctrlKey:i,metaKey:s,altKey:a}=n;return yrt.includes(r)&&grt(s,i)&&a?(n.preventDefault(),t.update(()=>{if(r===48)e.pub(E3,()=>Ur());else{const o=e.getValue(f4),c=brt[r];o.includes(c)||e.pub(E3,()=>Ed(`h${c}`))}}),!0):!1},Pi))}),_rt=Qu({init(e){e.pubIn({[VE]:"headings",[Rh]:vrt,[Gm]:zE,[Km]:xrt})},update(e,t){e.pub(f4,t?.allowedHeadingLevels??g0e)}});function OZ(e,t){return e.getEditorState().read((()=>{const n=Zi(t);return n!==null&&n.isSelected()}))}function x0e(e){const[t]=So(),[n,r]=b.useState((()=>OZ(t,e)));return b.useEffect((()=>{let i=!0;const s=t.registerUpdateListener((()=>{i&&r(OZ(t,e))}));return()=>{i=!1,s()}}),[t,e]),[n,b.useCallback((i=>{t.update((()=>{let s=Pt();ss(s)||(s=_z(),As(s)),ss(s)&&(i?s.add(e):s.delete(e))}))}),[t,e]),b.useCallback((()=>{t.update((()=>{const i=Pt();ss(i)&&i.clear()}
898))}),[t])]}const v0e=Nn("INSERT_HORIZONTAL_RULE_COMMAND");function wrt({nodeKey:e}){const[t]=So(),[n,r,i]=x0e(e);return b.useEffect((()=>bl(t.registerCommand(L5,(s=>{const a=t.getElementByKey(e);return s.target===a&&(s.shiftKey||i(),r(!n),!0)}),Pi))),[i,t,n,e,r]),b.useEffect((()=>{const s=t.getElementByKey(e),a=t._config.theme.hrSelected??"selected";s!==null&&(n?Bu(s,a):n4(s,a))}),[t,n,e]),null}let HE=class y0e extends xx{static getType(){return"horizontalrule"}static clone(t){return new y0e(t.__key)}static importJSON(t){return Jy().updateFromJSON(t)}static importDOM(){return{hr:()=>({conversion:Srt,priority:0})}}exportDOM(){return{element:document.createElement("hr")}}createDOM(t){const n=document.createElement("hr");return Bu(n,t.theme.hr),n}getTextContent(){return` 899`}isInline(){return!1}updateDOM(){return!1}decorate(){return l.jsx(wrt,{nodeKey:this.__key})}};function Srt(){return{node:Jy()}}function Jy(){return Jl(new HE)}function s$(e){return e instanceof HE}function Ert(){const[e]=So();return b.useEffect((()=>e.registerCommand(v0e,(t=>{const n=Pt();if(!_t(n))return!1;if(n.focus.getNode()!==null){const r=Jy();Rme(r)}return!0}),ur)),[e]),null}const Crt={testLexicalNode:s$,visitLexicalNode({actions:e}){e.addAndStepInto("thematicBreak")}},Trt={testNode:"thematicBreak",visitNode({actions:e}){e.addAndStepInto(Jy())}},Art=Vm(e=>{e.sub(e.pipe(Art,us(na)),([,t])=>{t?.dispatchCommand(v0e,void 0)})}),krt=Qu({init(e){e.pubIn({[VE]:"thematicBreak",[Rh]:Trt,[Gm]:HE,[Km]:Crt,[bx]:Ert})}});function Gp(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function vS(e){let t=1,n=e.getParent();for(;n!=null;){if(Jn(n)){const r=n.getParent();if(Rn(r)){t++,n=r.getParent();continue}Gp(40)}return t}return t}function xF(e){let t=e.getParent();Rn(t)||Gp(40);let n=t;for(;n!==null;)n=n.getParent(),Rn(n)&&(t=n);return t}function b0e(e){let t=[];const n=e.getChildren().filter(Jn);for(let r=0;r<n.length;r++){const i=n[r],s=i.getFirstChild();Rn(s)?t=t.concat(b0e(s)):t.push(i)}return t}function vd(e){return Jn(e)&&Rn(e.getFirstChild())}function PZ(e){return Vo().append(e)}function _0e(e,t){return Jn(e)&&(t.length===0||t.length===1&&e.is(t[0])&&e.getChildrenSize()===0)}function vF(e){const t=Pt();if(t!==null){let n=t.getNodes();if(_t(t)){const i=t.getStartEndPoints();i===null&&Gp(143);const[s]=i,a=s.getNode(),o=a.getParent();if(ea(a)){const c=a.getFirstChild();if(c)n=c.selectStart().getNodes();else{const u=Ur();a.append(u),n=u.select().getNodes()}}else if(_0e(a,n)){const c=$o(e);if(ea(o)){a.replace(c);const u=Vo();rt(a)&&(u.setFormat(a.getFormatType()),u.setIndent(a.getIndent())),c.append(u)}else if(Jn(a)){const u=a.getParentOrThrow();X0(c,u.getChildren()),u.replace(c)}return}}const r=new Set;for(let i=0;i<n.length;i++){const s=n[i];if(rt(s)&&s.isEmpty()&&!Jn(s)&&!r.has(s.getKey())){MZ(s,e);continue}let a=rme(s)?s.getParent():Jn(s)&&s.isEmpty()?s:null;for(;a!=null;){const o=a.getKey();if(Rn(a)){if(!r.has(o)){const c=$o(e);X0(c,a.getChildren()),a.replace(c),r.add(o)}break}{const c=a.getParent();if(ea(c)&&!r.has(o)){r.add(o),MZ(a,e);break}a=c}}}}}function X0(e,t){e.splice(e.getChildrenSize(),0,t)}function MZ(e,t){if(Rn(e))return e;const n=e.getPreviousSibling(),r=e.getNextSibling(),i=Vo();let s;if(X0(i,e.getChildren()),Rn(n)&&t===n.getListType())n.append(i),Rn(r)&&t===r.getListType()&&(X0(n,r.getChildren()),r.remove()),s=n;else if(Rn(r)&&t===r.getListType())r.getFirstChildOrThrow().insertBefore(i),s=r;else{const a=$o(t);a.append(i),e.replace(a),s=a}return i.setFormat(e.getFormatType()),i.setIndent(e.getIndent()),e.remove(),s}function a$(e,t){const n=e.getLastChild(),r=t.getFirstChild();n&&r&&vd(n)&&vd(r)&&(a$(n.getFirstChild(),r.getFirstChild()),r.remove());const i=t.getChildren();i.length>0&&e.append(...i),t.remove()}function Nrt(){const e=Pt();if(_t(e)){const t=new Set,n=e.getNodes(),r=e.anchor.getNode();if(_0e(r,n))t.add(xF(r));else for(let i=0;i<n.length;i++){const s=n[i];if(rme(s)){const a=jme(s,Gh);a!=null&&t.add(xF(a))}}for(const i of t){let s=i;const a=b0e(i);for(const o of a){const c=Ur().setTextStyle(e.style).setTextFormat(e.format);
899X0(c,o.getChildren()),s.insertAfter(c),s=c,o.__key===e.anchor.key&&K0(e.anchor,Wl(Lc(c,"next"))),o.__key===e.focus.key&&K0(e.focus,Wl(Lc(c,"next"))),o.remove()}i.remove()}}}function w0e(e){const t=e.getListType()!=="check";let n=e.getStart();for(const r of e.getChildren())Jn(r)&&(r.getValue()!==n&&r.setValue(n),t&&r.getLatest().__checked!=null&&r.setChecked(void 0),Rn(r.getFirstChild())||n++)}function jrt(e){const t=new Set;if(vd(e)||t.has(e.getKey()))return;const n=e.getParent(),r=e.getNextSibling(),i=e.getPreviousSibling();if(vd(r)&&vd(i)){const s=i.getFirstChild();if(Rn(s)){s.append(e);const a=r.getFirstChild();Rn(a)&&(X0(s,a.getChildren()),r.remove(),t.add(r.getKey()))}}else if(vd(r)){const s=r.getFirstChild();if(Rn(s)){const a=s.getFirstChild();a!==null&&a.insertBefore(e)}}else if(vd(i)){const s=i.getFirstChild();Rn(s)&&s.append(e)}else if(Rn(n)){const s=Vo().setTextFormat(e.getTextFormat()).setTextStyle(e.getTextStyle()),a=$o(n.getListType()).setTextFormat(n.getTextFormat()).setTextStyle(n.getTextStyle());s.append(a),a.append(e),i?i.insertAfter(s):r?r.insertBefore(s):n.append(s)}}function Rrt(e){if(vd(e))return;const t=e.getParent(),n=t?t.getParent():void 0;if(Rn(n?n.getParent():void 0)&&Jn(n)&&Rn(t)){const r=t?t.getFirstChild():void 0,i=t?t.getLastChild():void 0;if(e.is(r))n.insertBefore(e),t.isEmpty()&&n.remove();else if(e.is(i))n.insertAfter(e),t.isEmpty()&&n.remove();else{const s=t.getListType(),a=Vo(),o=$o(s);
899a.append(o),e.getPreviousSiblings().forEach((d=>o.append(d)));const c=Vo(),u=$o(s);c.append(u),X0(u,e.getNextSiblings()),n.insertBefore(a),n.insertAfter(c),n.replace(e)}}}function Irt(){const e=Pt();if(!_t(e)||!e.isCollapsed())return!1;const t=e.anchor.getNode();if(!Jn(t)||t.getChildrenSize()!==0)return!1;const n=xF(t),r=t.getParent();Rn(r)||Gp(40);const i=r.getParent();let s;if(ea(i))s=Ur(),n.insertAfter(s);else{if(!Jn(i))return!1;s=Vo(),i.insertAfter(s)}s.setTextStyle(e.style).setTextFormat(e.format).select();const a=t.getNextSiblings();if(a.length>0){const o=$o(r.getListType());if(Jn(s)){const c=Vo();c.append(o),s.insertAfter(c)}else s.insertAfter(o);o.append(...a)}return(function(o){let c=o;for(;c.getNextSibling()==null&&c.getPreviousSibling()==null;){const u=c.getParent();if(u==null||!Jn(u)&&!Rn(u))break;c=u}c.remove()})(t),!0}function T3(...e){const t=[];for(const n of e)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))t.push(r);return t}let Gh=class extends gl{$config(){return this.config("listitem",{$transform:t=>{if(t.__checked==null)return;const n=t.getParent();Rn(n)&&n.getListType()!=="check"&&t.getChecked()!=null&&t.setChecked(void 0)},extends:gl,importDOM:{li:()=>({conversion:Ort,priority:0})}})}constructor(t=1,n=void 0,r){super(r),this.__value=t===void 0?1:t,this.__checked=n}afterCloneFrom(t){super.afterCloneFrom(t),this.__value=t.__value,this.__checked=t.__checked}createDOM(t){const n=document.createElement("li");return this.updateListItemDOM(null,n,t),n}updateListItemDOM(t,n,r){const i=this.getParent();Rn(i)&&i.getListType()==="check"&&(function(o,c,u,d){Rn(c.getFirstChild())?(o.removeAttribute("role"),o.removeAttribute("tabIndex"),o.removeAttribute("aria-checked")):(o.setAttribute("role","checkbox"),o.setAttribute("tabIndex","-1"),u&&c.__checked===u.__checked||o.setAttribute("aria-checked",c.getChecked()?"true":"false"))})(n,this,t),n.value=this.__value,(function(o,c,u){const d=[],h=[],p=c.list,g=p?p.listitem:void 0;let v;if(p&&p.nested&&(v=p.nested.listitem),g!==void 0&&d.push(...T3(g)),p){const x=u.getParent(),_=Rn(x)&&x.getListType()==="check",w=u.getChecked();_&&!w||h.push(p.listitemUnchecked),_&&w||h.push(p.listitemChecked),_&&d.push(w?p.listitemChecked:p.listitemUnchecked)}if(v!==void 0){const x=T3(v);u.getChildren().some((_=>Rn(_)))?d.push(...x):h.push(...x)}h.length>0&&n4(o,...h),d.length>0&&Bu(o,...d)})(n,r.theme,this);const s=t?t.__style:"",a=this.__style;s!==a&&(a===""?n.removeAttribute("style"):n.style.cssText=a),(function(o,c,u){const d=SQ(c.__textStyle);for(const h in d)o.style.setProperty(`--listitem-marker-${h}`,d[h]);if(u)for(const h in SQ(u.__textStyle))h in d||o.style.removeProperty(`--listitem-marker-${h}`)})(n,this,t)}updateDOM(t,n,r){const i=n;return this.updateListItemDOM(t,i,r),!1}updateFromJSON(t){return super.updateFromJSON(t).setValue(t.value).setChecked(t.checked)}exportDOM(t){const n=this.createDOM(t._config),r=this.getFormatType();r&&(n.style.textAlign=r);const i=this.getDirection();return i&&(n.dir=i),{element:n}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...t){for(let n=0;n<t.length;n++){const r=t[n];if(rt(r)&&this.canMergeWith(r)){const i=r.getChildren();this.append(...i),r.remove()}else super.append(r)}return this}replace(t,n){if(Jn(t))return super.replace(t);this.setIndent(0);const r=this.getParentOrThrow();if(!Rn(r))return t;if(r.__first===this.getKey())r.insertBefore(t);else if(r.__last===this.getKey())r.insertAfter(t);else{const i=$o(r.getListType());let s=this.getNextSibling();for(;s;){const a=s;s=s.getNextSibling(),i.append(a)}r.insertAfter(t),t.insertAfter(i)}
899return n&&(rt(t)||Gp(139),this.getChildren().forEach((i=>{t.append(i)}))),this.remove(),r.getChildrenSize()===0&&r.remove(),t}insertAfter(t,n=!0){const r=this.getParentOrThrow();if(Rn(r)||Gp(39),Jn(t))return super.insertAfter(t,n);const i=this.getNextSiblings();if(r.insertAfter(t,n),i.length!==0){const s=$o(r.getListType());i.forEach((a=>s.append(a))),t.insertAfter(s,n)}return t}remove(t){const n=this.getPreviousSibling(),r=this.getNextSibling();super.remove(t),n&&r&&vd(n)&&vd(r)&&(a$(n.getFirstChild(),r.getFirstChild()),r.remove())}insertNewAfter(t,n=!0){const r=Vo().updateFromJSON(this.exportJSON()).setChecked(!this.getChecked()&&void 0);return this.insertAfter(r,n),r}collapseAtStart(t){const n=Ur();this.getChildren().forEach((a=>n.append(a)));const r=this.getParentOrThrow(),i=r.getParentOrThrow(),s=Jn(i);if(r.getChildrenSize()===1)if(s)r.remove(),i.select();else{r.insertBefore(n),r.remove();const a=t.anchor,o=t.focus,c=n.getKey();a.type==="element"&&a.getNode().is(this)&&a.set(c,a.offset,"element"),o.type==="element"&&o.getNode().is(this)&&o.set(c,o.offset,"element")}else r.insertBefore(n),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(t){const n=this.getWritable();return n.__value=t,n}getChecked(){const t=this.getLatest();let n;const r=this.getParent();return Rn(r)&&(n=r.getListType()),n==="check"?!!t.__checked:void 0}setChecked(t){const n=this.getWritable();return n.__checked=t,n}toggleChecked(){const t=this.getWritable();return t.setChecked(!t.__checked)}getIndent(){const t=this.getParent();if(t===null||!this.isAttached())return this.getLatest().__indent;let n=t.getParentOrThrow(),r=0;for(;Jn(n);)n=n.getParentOrThrow().getParentOrThrow(),r++;return r}setIndent(t){typeof t!="number"&&Gp(117),(t=Math.floor(t))>=0||Gp(199);let n=this.getIndent();for(;n!==t;)n<t?(jrt(this),n++):(Rrt(this),n--);return this}canInsertAfter(t){return Jn(t)}canReplaceWith(t){return Jn(t)}canMergeWith(t){return Jn(t)||W5(t)}extractWithChild(t,n){if(!_t(n))return!1;const r=n.anchor.getNode(),i=n.focus.getNode();return this.isParentOf(r)&&this.isParentOf(i)&&this.getTextContent().length===n.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return $o("bullet")}canMergeWhenEmpty(){return!0}};function Ort(e){if(e.classList.contains("task-list-item")){for(const n of e.children)if(n.tagName==="INPUT")return Prt(n)}const t=e.getAttribute("aria-checked");return{node:Vo(t==="true"||t!=="false"&&void 0)}}function Prt(e){return e.getAttribute("type")!=="checkbox"?{node:null}:{node:Vo(e.hasAttribute("checked"))}}function Vo(e){return Jl(new Gh(void 0,e))}function Jn(e){return e instanceof Gh}let Kh=class extends gl{$config(){return this.config("list",{$transform:t=>{(function(n){const r=n.getNextSibling();Rn(r)&&n.getListType()===r.getListType()&&a$(n,r)})(t),w0e(t)},extends:gl,importDOM:{ol:()=>({conversion:FZ,priority:0}),ul:()=>({conversion:FZ,priority:0})}})}constructor(t="number",n=1,r){super(r);const i=Drt[t]||t;this.__listType=i,this.__tag=i==="number"?"ol":"ul",this.__start=n}afterCloneFrom(t){super.afterCloneFrom(t),this.__listType=t.__listType,this.__tag=t.__tag,this.__start=t.__start}getTag(){return this.getLatest().__tag}setListType(t){const n=this.getWritable();return n.__listType=t,n.__tag=t==="number"?"ol":"ul",n}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(t){const n=this.getWritable();return n.__start=t,n}createDOM(t,n){const r=this.__tag,i=document.createElement(r);return this.__start!==1&&i.setAttribute("start",String(this.__start)),i.__lexicalListType=this.__listType,DZ(i,t.theme,this),i}updateDOM(t,n,r){return t.__tag!==this.__tag||(DZ(n,r.theme,this),!1)}updateFromJSON(t){return super.updateFromJSON(t).setListType(t.listType).setStart(t.start)}exportDOM(t){const n=this.createDOM(t._config,t);return rs(n)&&(this.__start!==1&&n.setAttribute("start",String(this.__start)),this.__listType==="check"&&n.setAttribute("__lexicalListType","check")),{element:n}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}splice(t,n,r){let i=r;for(let s=0;s<r.length;s++){const a=r[s];Jn(a)||(i===r&&(i=[...r]),i[s]=Vo().append(!rt(a)||Rn(a)||a.isInline()?a:Ii(a.getTextContent())))}return super.splice(t,n,i)}extractWithChild(t){return Jn(t)}};function DZ(e,t,n){const r=[],i=[],s=t.list;if(s!==void 0){const a=s[`${n.__tag}Depth`]||[],o=vS(n)-1,c=o%a.length,u=a[c],d=s[n.__tag];let h;const p=s.nested,g=s.checklist;if(p!==void 0&&p.list&&(h=p.list),d!==void 0&&r.push(d),g!==void 0&&n.__listType==="check"&&r.push(g),u!==void 0){r.push(...T3(u));for(let v=0;v<a.length;v++)v!==c&&i.push(n.__tag+v)}if(h!==void 0){const v=T3(h);o>1?r.push(...v):i.push(...v)}}i.length>0&&n4(e,...i),r.length>0&&Bu(e,...r)}function Mrt(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];if(Jn(r)){t.push(r);const i=r.getChildren();i.length>
8991&&i.forEach((s=>{Rn(s)&&t.push(PZ(s))}))}else t.push(PZ(r))}return t}function FZ(e){const t=e.nodeName.toLowerCase();let n=null;return t==="ol"?n=$o("number",e.start):t==="ul"&&(n=(function(r){if(r.getAttribute("__lexicallisttype")==="check"||r.classList.contains("contains-task-list"))return!0;for(const i of r.childNodes)if(rs(i)&&i.hasAttribute("aria-checked"))return!0;return!1})(e)?$o("check"):$o("bullet")),{after:Mrt,node:n}}const Drt={ol:"number",ul:"bullet"};function $o(e="number",t=1){return Jl(new Kh(e,t))}function Rn(e){return e instanceof Kh}const S0e=Nn("INSERT_CHECK_LIST_COMMAND");function Frt(e){return bl(e.registerCommand(S0e,(()=>(vF("check"),!0)),Pi),e.registerCommand(dz,(t=>$Z(t,e,!1)),Pi),e.registerCommand(uz,(t=>$Z(t,e,!0)),Pi),e.registerCommand(jE,(()=>{if(yF()!=null){const t=e.getRootElement();return t?.focus(),!0}return!1}),Pi),e.registerCommand(fz,(t=>{const n=yF();return!(n==null||!e.isEditable())&&(e.update((()=>{const r=Wd(n);Jn(r)&&(t.preventDefault(),r.toggleChecked())})),!0)}),Pi),e.registerCommand(cz,(t=>e.getEditorState().read((()=>{const n=Pt();if(_t(n)&&n.isCollapsed()){const{anchor:r}=n,i=r.type==="element";if(i||r.offset===0){const s=r.getNode(),a=Cu(s,(o=>rt(o)&&!o.isInline()));if(Jn(a)){const o=a.getParent();if(Rn(o)&&o.getListType()==="check"&&(i||a.getFirstDescendant()===s)){const c=e.getElementByKey(a.__key);if(c!=null&&document.activeElement!==c)return c.focus(),t.preventDefault(),!0}}}}return!1}))),Pi),e.registerRootListener(((t,n)=>{t!==null&&(t.addEventListener("click",LZ),t.addEventListener("pointerdown",zZ)),n!==null&&(n.removeEventListener("click",LZ),n.removeEventListener("pointerdown",zZ))})))}function E0e(e,t){const n=e.target;if(!rs(n))return;const r=n.firstChild;if(rs(r)&&(r.tagName==="UL"||r.tagName==="OL"))return;const i=n.parentNode;if(!i||i.__lexicalListType!=="check")return;const s=n.getBoundingClientRect(),a=YYe(n),o=e.clientX/a,c=window.getComputedStyle?window.getComputedStyle(n,"::before"):{width:"0px"},u=parseFloat(c.width),d=e.pointerType==="touch"?32:0;(n.dir==="rtl"?o<s.right+d&&o>s.right-u-d:o>s.left-d&&o<s.left+u+d)&&t()}function LZ(e){E0e(e,(()=>{if(rs(e.target)){const t=e.target,n=Nz(t);n!=null&&n.isEditable()&&n.update((()=>{const r=Wd(t);Jn(r)&&(t.focus(),r.toggleChecked())}))}}))}function zZ(e){E0e(e,(()=>{e.preventDefault()}))}function yF(){const e=document.activeElement;return rs(e)&&e.tagName==="LI"&&e.parentNode!=null&&e.parentNode.__lexicalListType==="check"?e:null}function $Z(e,t,n){const r=yF();return r!=null&&t.update((()=>{const i=Wd(r);if(!Jn(i))return;const s=(function(a,o){let c=o?a.getPreviousSibling():a.getNextSibling(),u=a;for(;c==null&&Jn(u);)u=u.getParentOrThrow().getParent(),u!=null&&(c=o?u.getPreviousSibling():u.getNextSibling());for(;Jn(c);){const d=o?c.getLastChild():c.getFirstChild();if(!Rn(d))return c;c=o?d.getLastChild():d.getFirstChild()}return null})(i,n);if(s!=null){s.selectStart();const a=t.getElementByKey(s.__key);a!=null&&(e.preventDefault(),setTimeout((()=>{a.focus()}),0))}})),!1}const Lrt=Nn("UPDATE_LIST_START_COMMAND"),C0e=Nn("INSERT_UNORDERED_LIST_COMMAND"),T0e=Nn("INSERT_ORDERED_LIST_COMMAND"),A0e=Nn("REMOVE_LIST_COMMAND");function zrt(e){return bl(e.registerCommand(T0e,(()=>(vF("number"),!0)),Pi),e.registerCommand(Lrt,(t=>{const{listNodeKey:n,newStart:r}=t,i=Zi(n);return!!Rn(i)&&(i.getListType()==="number"&&(i.setStart(r),w0e(i)),!0)}),Pi),e.registerCommand(C0e,(()=>(vF("bullet"),!0)),Pi),e.registerCommand(A0e,(()=>(Nrt(),!0)),Pi),e.registerCommand(lS,(()=>Irt()),Pi),e.registerNodeTransform(Gh,(t=>{const n=t.getFirstChild();if(n){if(Lt(n)){const r=n.getStyle(),i=n.getFormat();t.getTextStyle()!==r&&t.setTextStyle(r),t.getTextFormat()!==i&&t.setTextFormat(i)}}else{const r=Pt();_t(r)&&(r.style!==t.getTextStyle()||r.format!==t.getTextFormat())&&r.isCollapsed()&&t.is(r.anchor.getNode())&&t.setTextStyle(r.style).setTextFormat(r.format)}})),e.registerNodeTransform(ef,(t=>{const n=t.getParent();if(Jn(n)&&t.is(n.getFirstChild())){const r=t.getStyle(),i=t.getFormat();r===n.getTextStyle()&&i===n.getTextFormat()||n.setTextStyle(r).setTextFormat(i)}})))}function $rt(e){const t=n=>{const r=n.getParent();if(Rn(n.getFirstChild())||!Rn(r))return;const i=Cu(n,(s=>Jn(s)&&Rn(s.getParent())&&Jn(s.getPreviousSibling())));if(i===null&&n.getIndent()>0)n.setIndent(0);else if(Jn(i)){const s=i.getPreviousSibling();if(Jn(s)){const a=(function(c){let u=c,d=u.getFirstChild();for(;Rn(d);){const h=d.getLastChild();if(!Jn(h))break;u=h,d=u.getFirstChild()}return u})(s),o=a.getParent();if(Rn(o)){const c=vS(o);c+1<vS(r)&&n.setIndent(c)}}}};return e.registerNodeTransform(Kh,(n=>{const r=[n];for(;r.length>0;){const i=r.shift();if(Rn(i)){for(const s of i.getChildren())if(Jn(s)){t(s);const a=s.getFirstChild();Rn(a)&&r.push(a)}}}}))}const Brt={testNode:"list",visitNode:function({mdastNode:e,lexicalParent:t,actions:n}){const r=e.children.some(s=>typeof s.checked=="boolean")?"check":e.ordered?"number":"bullet",i=$o(r);if(Jn(t)){const s=Vo();s.append(i),t.insertAfter(s)}else t.append(i);
899n.visitChildren(e,i)}},Urt={testNode:"listItem",visitNode({mdastNode:e,actions:t,lexicalParent:n}){const r=n.getListType()==="check"?e.checked??!1:void 0;t.addAndStepInto(Vo(r))}},Vrt={testLexicalNode:Rn,visitLexicalNode:({lexicalNode:e,actions:t})=>{t.addAndStepInto("list",{ordered:e.getListType()==="number",spread:!1})}},Hrt={testLexicalNode:Jn,visitLexicalNode:({lexicalNode:e,mdastParent:t,actions:n})=>{const r=e.getChildren(),i=r[0];if(r.length===1&&Rn(i)){const s=t.children.at(-1);s?n.visitChildren(e,s):n.visitChildren(i,t)}else{const s=e.getParent(),a=n.appendToParent(t,{type:"listItem",checked:s.getListType()==="check"?!!e.getChecked():void 0,spread:!1,children:[]});let o=null;for(const c of e.getChildren())Lt(c)||Eu(c)||c.isInline()&&(rt(c)||Br(c))?(o||(o=n.appendToParent(a,{type:"paragraph",children:[]})),n.visit(c,o)):(o=null,n.visit(c,a))}}};function qrt(e,t){return bl(e.registerCommand(z5,(n=>{const r=Pt();if(!_t(r))return!1;n.preventDefault();const i=(function(s){const a=s.getNodes();if(KYe(a,(p=>l3(p)&&p.canIndent()?p:null)).length>0)return!0;const o=s.anchor,c=s.focus,u=c.isBefore(o)?c:o,d=u.getNode(),h=G8(d);if(h.canIndent()){const p=h.getKey();let g=Gy();if(g.anchor.set(p,0,"element"),g.focus.set(p,0,"element"),g=B0(g),g.anchor.is(u))return!0}return!1})(r)?n.shiftKey?R8:a3:Ipe;return e.dispatchCommand(i,void 0)}),ur),e.registerCommand(a3,(()=>{if(t==null)return!1;const n=Pt();if(!_t(n))return!1;const r=n.getNodes().map((i=>G8(i).getIndent()));return Math.max(...r)+1>=t}),kh))}function BZ({maxIndent:e}){const[t]=So();return b.useEffect((()=>qrt(t,e)),[t,e]),null}function UZ(){const[e]=So();return b.useEffect((()=>Frt(e)),[e]),null}function VZ({hasStrictIndent:e=!1}){const[t]=So();return b.useEffect((()=>{if(!t.hasNodes([Kh,Gh]))throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")}),[t]),b.useEffect((()=>{if(e)return $rt(t)}),[t,e]),(function(n){b.useEffect((()=>zrt(n)),[n])})(t),null}const Wrt={name:"tasklistCheck",tokenize:Grt};function k0e(){return{text:{91:Wrt}}}function Grt(e,t,n){const r=this;return i;function i(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),s)}function s(c){return jr(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),a):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),a):n(c)}function a(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(c)}function o(c){return bn(c)?t(c):er(c)?e.check({tokenize:Krt},t,n)(c):n(c)}}function Krt(e,t,n){return yr(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function N0e(){return{exit:{taskListCheckValueChecked:HZ,taskListCheckValueUnchecked:HZ,paragraph:Yrt}}}function j0e(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Xrt}}}function HZ(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Yrt(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let s=-1,a;for(;++s<i.length;){const o=i[s];if(o.type==="paragraph"){a=o;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Xrt(e,t,n,r){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);s&&o.move(a);let c=Wz.listItem(e,t,n,{...r,...o.current()});return s&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),c;function u(d){return d+a}}const Qrt=new Map([["number",T0e],["bullet",C0e],["check",S0e],["",A0e]]),qZ=xn("",e=>{e.sub(e.pipe(vy,us(na)),([t,n])=>{if(!t||!n)return;const r=t.anchor.getNode();let i=r.getKey()==="root"?r:Cu(r,o=>{const c=o.getParent();return c!==null&&ea(c)});i===null&&(i=r.getTopLevelElementOrThrow());const s=i.getKey();if(n.getElementByKey(s)!==null)if(Rn(i)){const o=jme(r,Kh),c=o?o.getListType():i.getListType();e.pub(qZ,c)}else e.pub(qZ,"")})}),Zrt=aa(e=>{e.sub(e.pipe(Zrt,us(na)),([t,n])=>{n?.dispatchCommand(Qrt.get(t),void 0)})}),Jrt=Qu({init(e){var t;(t=e.getValue(Wh))==null||t.registerCommand(a3,()=>!tit(7),kh),e.pubIn({[VE]:"lists",[S3]:N0e(),[w3]:k0e(),[Rh]:[Brt,Urt],[Gm]:[Gh,Kh],[Km]:[Vrt,Hrt],[Jz]:j0e(),[bx]:[BZ,VZ,UZ],[n$]:[BZ,VZ,UZ]})}});function eit(e){const t=e.getNodes();return t.length===0?new Set([e.anchor.getNode().getParentOrThrow(),e.focus.getNode().getParentOrThrow()]):new Set(t.map(n=>rt(n)?n:n.getParentOrThrow()))}function tit(e){const t=Pt();if(!_t(t))return!1;const n=eit(t);let r=0;for(const i of n)if(Rn(i))r=Math.max(vS(i)+1,r);else if(Jn(i)){const s=i.getParent();if(s?.getChildren().length===1){const a=s.getParent();if(Jn(a)&&a.getChildren().length===1)return!1}if(!Rn(s))throw new Error("ListMaxIndentLevelPlugin: A ListItemNode must have a ListNode for a parent.");r=Math.max(vS(s)+1,r)}return r<=e}function nit(e){return e.length}function rit(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||nit,s=[],a=[],o=[],c=[];let u=0,d=-1;for(;++d<e.length;){const x=[],_=[];let w=-1;for(e[d].length>u&&(u=e[d].length);++w<e[d].length;){const S=iit(e[d][w]);if(n.alignDelimiters!==!1){const E=i(S);_[w]=E,(c[w]===void 0||E>c[w])&&(c[w]=E)}x.push(S)}a[d]=x,o[d]=_}let h=-1;if(typeof r=="object"&&"length"in r)for(;
vendor: 6,930 bytes, lines 899-902
899++h<u;)s[h]=WZ(r[h]);else{const x=WZ(r);for(;++h<u;)s[h]=x}h=-1;const p=[],g=[];for(;++h<u;){const x=s[h];let _="",w="";x===99?(_=":",w=":"):x===108?_=":":x===114&&(w=":");let S=n.alignDelimiters===!1?1:Math.max(1,c[h]-_.length-w.length);const E=_+"-".repeat(S)+w;n.alignDelimiters!==!1&&(S=_.length+S+w.length,S>c[h]&&(c[h]=S),g[h]=S),p[h]=E}a.splice(1,0,p),o.splice(1,0,g),d=-1;const v=[];for(;++d<a.length;){const x=a[d],_=o[d];h=-1;const w=[];for(;++h<u;){const S=x[h]||"";let E="",T="";if(n.alignDelimiters!==!1){const N=c[h]-(_[h]||0),A=s[h];A===114?E=" ".repeat(N):A===99?N%2?(E=" ".repeat(N/2+.5),T=" ".repeat(N/2-.5)):(E=" ".repeat(N/2),T=E):T=" ".repeat(N)}n.delimiterStart!==!1&&!h&&w.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&S==="")&&(n.delimiterStart!==!1||h)&&w.push(" "),n.alignDelimiters!==!1&&w.push(E),w.push(S),n.alignDelimiters!==!1&&w.push(T),n.padding!==!1&&w.push(" "),(n.delimiterEnd!==!1||h!==u-1)&&w.push("|")}v.push(n.delimiterEnd===!1?w.join("").replace(/ +$/,""):w.join(""))}return v.join(` 900`)}function iit(e){return e==null?"":String(e)}function WZ(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function R0e(){return{enter:{table:sit,tableData:GZ,tableHeader:GZ,tableRow:oit},exit:{codeText:lit,table:ait,tableData:HP,tableHeader:HP,tableRow:HP}}}function sit(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function ait(e){this.exit(e),this.data.inTable=void 0}function oit(e){this.enter({type:"tableRow",children:[]},e)}function HP(e){this.exit(e)}function GZ(e){this.enter({type:"tableCell",children:[]},e)}function lit(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,cit));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function cit(e,t){return t==="|"?t:e}function I0e(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` 901`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:a,tableCell:c,tableRow:o}};function a(g,v,x,_){return u(d(g,x,_),g.align)}function o(g,v,x,_){const w=h(g,x,_),S=u([w]);return S.slice(0,S.indexOf(` 902`))}function c(g,v,x,_){const w=x.enter("tableCell"),S=x.enter("phrasing"),E=x.containerPhrasing(g,{..._,before:s,after:s});return S(),w(),E}function u(g,v){return rit(g,{align:v,alignDelimiters:r,padding:n,stringLength:i})}function d(g,v,x){const _=g.children;let w=-1;const S=[],E=v.enter("table");for(;++w<_.length;)S[w]=h(_[w],v,x);return E(),S}function h(g,v,x){const _=g.children;let w=-1;const S=[],E=v.enter("tableRow");for(;++w<_.length;)S[w]=c(_[w],g,v,x);return E(),S}function p(g,v,x){let _=Wz.inlineCode(g,v,x);return x.stack.includes("tableCell")&&(_=_.replace(/\|/g,"\\$&")),_}}class uit{constructor(){this.map=[]}add(t,n,r){dit(this,t,n,r)}consume(t){if(this.map.sort(function(s,a){return s[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const s of i)t.push(s);i=r.pop()}this.map.length=0}}function dit(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function fit(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function O0e(){return{flow:{null:{name:"table",tokenize:hit,resolveAll:pit}}}}function hit(e,t,n){const r=this;let i=0,s=0,a;return o;function o(P){let V=r.events.length-1;for(;V>-1;){const Q=r.events[V][1].type;if(Q==="lineEnding"||Q==="linePrefix")V--;else break}const U=V>-1?r.events[V][1].type:null,G=U==="tableHead"||U==="tableRow"?A:c;return G===A&&r.parser.lazy[r.now().line]?n(P):G(P)}function c(P){return e.enter("tableHead"),e.enter("tableRow"),u(P)}function u(P){return P===124||(a=!0,s+=1),d(P)}function d(P){return P===null?n(P):bn(P)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),g):n(P):er(P)?yr(e,d,"whitespace")(P):(s+=1,a&&(a=!1,i+=1),P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),a=!0,d):(e.enter("data"),h(P)))}function h(P){return P===null||P===124||jr(P)?(e.exit("data"),d(P)):(e.consume(P),P===92?p:h)}function p(P){return P===92||P===124?(e.consume(P),h):h(P)}function g(P){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(P):(e.enter("tableDelimiterRow"),a=!1,er(P)?yr(e,v,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):v(P))}function v(P){return P===45||P===58?_(P):P===124?(a=!0,e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),x):N(P)}function x(P){return er(P)?yr(e,_,"whitespace")(P):_(P)}function _(P){return P===58?(s+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),w):P===45?(s+=1,w(P)):P===null||bn(P)?T(P):N(P)}function w(P){return P===45?(e.enter("tableDelimiterFiller"),S(P)):N(P)}function S(P){return P===45?(e.consume(P),S):P===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),E):(e.exit("tableDelimiterFiller"),E(P))}function E(P){return er(P)?yr(e,T,"whitespace")(P):T(P)}function T(P){return P===124?v(P):P===null||bn(P)?!a||i!==s?N(P):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(P)):N(P)}function N(P){return n(P)}function A(P){return e.enter("tableRow"),k(P)}function k(P){return P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),k):P===null||bn(P)?(e.exit("tableRow"),t(P)):er(P)?yr(e,k,"whitespace")(P):(e.enter("data"),j(P))}function j(P){return P===null||P===124||jr(P)?(e.exit("data"),k(P)):(e.consume(P),P===92?R:j)}function R(P){return P===92||P===124?(e.consume(P),j):j(P)}}function pit(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],o=!1,c=0,u,d,h;const p=new uit;for(;++n<e.length;){const g=e[n],v=g[1];g[0]==="enter"?v.type==="tableHead"?(o=!1,c!==0&&(KZ(p,t,c,u,d),d=void 0,c=0),u={type:"table",start:Object.assign({},v.start),end:Object.assign({},v.end)},p.add(n,0,[["enter",u,t]])):v.type==="tableRow"||v.type==="tableDelimiterRow"?(r=!0,h=void 0,s=[0,0,0,0],a=[0,n+1,0,0],o&&(o=!1,d={type:"tableBody",start:Object.assign({},v.start),end:Object.assign({},v.end)}
902,p.add(n,0,[["enter",d,t]])),i=v.type==="tableDelimiterRow"?2:d?3:1):i&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],h=yA(p,t,s,i,void 0,h),s=[0,0,0,0]),a[2]=n)):v.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(a[0]=a[1],h=yA(p,t,s,i,void 0,h)),s=a,a=[s[1],n,0,0])):v.type==="tableHead"?(o=!0,c=n):v.type==="tableRow"||v.type==="tableDelimiterRow"?(c=n,s[1]!==0?(a[0]=a[1],h=yA(p,t,s,i,n,h)):a[1]!==0&&(h=yA(p,t,a,i,n,h)),i=0):i&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")&&(a[3]=n)}for(c!==0&&KZ(p,t,c,u,d),p.consume(t.events),n=-1;++n<t.events.length;){const g=t.events[n];g[0]==="enter"&&g[1].type==="table"&&(g[1]._align=fit(t.events,n))}return e}function yA(e,t,n,r,i,s){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(s.end=Object.assign({},Qv(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const c=Qv(t.events,n[1]);if(s={type:a,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const u=Qv(t.events,n[2]),d=Qv(t.events,n[3]),h={type:o,start:Object.assign({},u),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",h,t]]),r!==2){const p=t.events[n[2]],g=t.events[n[3]];if(p[1].end=Object.assign({},g[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const v=n[2]+1,x=n[3]-n[2]-1;e.add(v,x,[])}}e.add(n[3]+1,0,[["exit",h,t]])}return i!==void 0&&(s.end=Object.assign({},Qv(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function KZ(e,t,n,r,i){const s=[],a=Qv(t.events,n);i&&(i.end=Object.assign({},a),s.push(["exit",i,t])),r.end=Object.assign({},a),s.push(["exit",r,t]),e.add(n+1,0,s)}function Qv(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const YZ=[["Cat","rgb(125, 50, 0)"],["Dog","rgb(100, 0, 0)"],["Rabbit","rgb(150, 0, 0)"],["Frog","rgb(200, 0, 0)"],["Fox","rgb(200, 75, 0)"],["Hedgehog","rgb(0, 75, 0)"],["Pigeon","rgb(0, 125, 0)"],["Squirrel","rgb(75, 100, 0)"],["Bear","rgb(125, 100, 0)"],["Tiger","rgb(0, 0, 150)"],["Leopard","rgb(0, 0, 200)"],["Zebra","rgb(0, 0, 250)"],["Wolf","rgb(0, 100, 150)"],["Owl","rgb(0, 100, 100)"],["Gull","rgb(100, 0, 100)"],["Squid","rgb(150, 0, 150)"]],XZ=YZ[Math.floor(Math.random()*YZ.length)],mit=b.createContext({clientID:0,color:XZ[1],isCollabActive:!1,name:XZ[0],yjsDocMap:new Map});function git(e,t){return b.useContext(mit)}function QZ(e){const t=new Set,{ownNodeConfig:n}=J5(e),r=e.transform();if(n){const i=n.$transform;i&&t.add(i)}return r&&t.add(r),t}function xit({initialEditor:e,children:t,initialNodes:n,initialTheme:r,skipCollabChecks:i,skipEditableListener:s}){const a=b.useRef(!1),o=b.useContext(QN);o==null&&(function(v,...x){const _=new URL("https://lexical.dev/docs/error"),w=new URLSearchParams;w.append("code",v);for(const S of x)w.append("v",S);throw _.search=w.toString(),Error(`Minified Lexical error #${v}; visit ${_.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(9);const[c,{getTheme:u}]=o,d=b.useMemo((()=>{const v=r||u()||void 0,x=gpe(o,v);v!==void 0&&(e._config.theme=v),e._parentEditor=e._parentEditor||c;const _=e._createEditorArgs,w=_&&_.namespace;if(n){w||(e._config.namespace=c._config.namespace);for(let S of n){let E=null,T=null;if(typeof S!="function"){const A=S;S=A.replace,E=A.with,T=A.withKlass||null}const N=K5(e,S.getType());e._nodes.set(S.getType(),{exportDOM:N?N.exportDOM:void 0,klass:S,replace:E,replaceWithKlass:T,sharedNodeState:w8(S),transforms:QZ(S)})}}else if(_&&_.nodes)w||(e._config.namespace=c._config.namespace);else{const S=e._nodes=new Map(c._nodes);w||(e._config.namespace=c._config.namespace);for(const[E,T]of S)e._nodes.set(E,{exportDOM:T.exportDOM,klass:T.klass,replace:T.replace,replaceWithKlass:T.replaceWithKlass,sharedNodeState:w8(T.klass),transforms:QZ(T.klass)})}return[e,x]}),[]),{isCollabActive:h,yjsDocMap:p}=git(),g=i||a.current||p.has(e.getKey());return b.useEffect((()=>{g&&(a.current=!0)}),[g]),b.useEffect((()=>{if(!s){const v=x=>e.setEditable(x);
902return v(c.isEditable()),c.registerEditableListener(v)}}),[e,c,s]),l.jsx(QN.Provider,{value:d,children:!h||g?t:null})}var P0e="Toggle",M0e=b.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:i,...s}=e,[a,o]=Yl({prop:n,onChange:i,defaultProp:r??!1,caller:P0e});return l.jsx(nn.button,{type:"button","aria-pressed":a,"data-state":a?"on":"off","data-disabled":e.disabled?"":void 0,...s,ref:t,onClick:qt(e.onClick,()=>{e.disabled||o(!a)})})});M0e.displayName=P0e;var Ym="ToggleGroup",[D0e,F0e]=Ia(Ym,[Mm]),L0e=Mm(),o$=Y.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const i=r;return l.jsx(vit,{...i,ref:t})}if(n==="multiple"){const i=r;return l.jsx(yit,{...i,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${Ym}\``)});o$.displayName=Ym;var[z0e,$0e]=D0e(Ym),vit=Y.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...s}=e,[a,o]=Yl({prop:n,defaultProp:r??"",onChange:i,caller:Ym});return l.jsx(z0e,{scope:e.__scopeToggleGroup,type:"single",value:Y.useMemo(()=>a?[a]:[],[a]),onItemActivate:o,onItemDeactivate:Y.useCallback(()=>o(""),[o]),children:l.jsx(B0e,{...s,ref:t})})}),yit=Y.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...s}=e,[a,o]=Yl({prop:n,defaultProp:r??[],onChange:i,caller:Ym}),c=Y.useCallback(d=>o((h=[])=>[...h,d]),[o]),u=Y.useCallback(d=>o((h=[])=>h.filter(p=>p!==d)),[o]);return l.jsx(z0e,{scope:e.__scopeToggleGroup,type:"multiple",value:a,onItemActivate:c,onItemDeactivate:u,children:l.jsx(B0e,{...s,ref:t})})});o$.displayName=Ym;var[bit,_it]=D0e(Ym),B0e=Y.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:i=!0,orientation:s,dir:a,loop:o=!0,...c}=e,u=L0e(n),d=ox(a),h={role:"group",dir:d,...c};return l.jsx(bit,{scope:n,rovingFocus:i,disabled:r,children:i?l.jsx(e5,{asChild:!0,...u,orientation:s,dir:d,loop:o,children:l.jsx(nn.div,{...h,ref:t})}):l.jsx(nn.div,{...h,ref:t})})}),A3="ToggleGroupItem",U0e=Y.forwardRef((e,t)=>{const n=$0e(A3,e.__scopeToggleGroup),r=_it(A3,e.__scopeToggleGroup),i=L0e(e.__scopeToggleGroup),s=n.value.includes(e.value),a=r.disabled||e.disabled,o={...e,pressed:s,disabled:a},c=Y.useRef(null);return r.rovingFocus?l.jsx(lE,{asChild:!0,...i,focusable:!a,active:s,ref:c,children:l.jsx(ZZ,{...o,ref:t})}):l.jsx(ZZ,{...o,ref:t})});U0e.displayName=A3;var ZZ=Y.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...i}=e,s=$0e(A3,n),a={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},o=s.type==="single"?a:void 0;return l.jsx(M0e,{...o,...i,ref:t,onPressedChange:c=>{c?s.onItemActivate(r):s.onItemDeactivate(r)}})}),wit=o$,Sit=U0e,l$="Toolbar",[Eit]=Ia(l$,[Mm,F0e]),c$=Mm(),V0e=F0e(),[Cit,H0e]=Eit(l$),q0e=b.forwardRef((e,t)=>{const{__scopeToolbar:n,orientation:r="horizontal",dir:i,loop:s=!0,...a}=e,o=c$(n),c=ox(i);return l.jsx(Cit,{scope:n,orientation:r,dir:c,children:l.jsx(e5,{asChild:!0,...o,orientation:r,dir:c,loop:s,children:l.jsx(nn.div,{role:"toolbar","aria-orientation":r,dir:c,...a,ref:t})})})});q0e.displayName=l$;var W0e="ToolbarSeparator",G0e=b.forwardRef((e,t)=>{const{__scopeToolbar:n,...r}=e,i=H0e(W0e,n);return l.jsx(Xce,{orientation:i.orientation==="horizontal"?"vertical":"horizontal",...r,ref:t})});G0e.displayName=W0e;var Tit="ToolbarButton",u$=b.forwardRef((e,t)=>{const{__scopeToolbar:n,...r}=e,i=c$(n);return l.jsx(lE,{asChild:!0,...i,focusable:!e.disabled,children:l.jsx(nn.button,{type:"button",...r,ref:t})})});u$.displayName=Tit;var Ait="ToolbarLink",kit=b.forwardRef((e,t)=>{const{__scopeToolbar:n,...r}=e,i=c$(n);return l.jsx(lE,{asChild:!0,...i,focusable:!0,children:l.jsx(nn.a,{...r,ref:t,onKeyDown:qt(e.onKeyDown,s=>{s.key===" "&&s.currentTarget.click()})})})});kit.displayName=Ait;var K0e="ToolbarToggleGroup",Y0e=b.forwardRef((e,t)=>{const{__scopeToolbar:n,...r}=e,i=H0e(K0e,n),s=V0e(n);return l.jsx(wit,{"data-orientation":i.orientation,dir:i.dir,...s,...r,ref:t,rovingFocus:!1})});Y0e.displayName=K0e;var Nit="ToolbarToggleItem",X0e=b.forwardRef((e,t)=>{const{__scopeToolbar:n,...r}=e,i=V0e(n),s={__scopeToolbar:e.__scopeToolbar};return l.jsx(u$,{asChild:!0,...s,children:l.jsx(Sit,{...i,...r,ref:t})})});X0e.displayName=Nit;var d$=q0e,jit=G0e,h0=u$,f$=Y0e,Dk=X0e;function Q0e(e,t){return e===null||e===t?!1:e.dataset.editorDialog!==void 0||e.dataset.toolbarItem!==void 0||e.dataset.editorDropdown?!0:Q0e(e.parentElement,t)}function Rit(){const e=[...Array(256).keys()].map(n=>n.toString(16).padStart(2,"0")),t=crypto.getRandomValues(new Uint8Array(16));return t[6]=t[6]&15|64,t[8]=t[8]&63|128,[...t.entries()].map(([n,r])=>[4,6,8,10].includes(n)?`-${e[r]}`:e[r]).join("")}const Z0e=e=>e===0?"th":"td",J0e={center:Nt.centeredCell,left:Nt.leftAlignedCell,right:Nt.rightAlignedCell},Iit=({mdastNode:e,parentEditor:t,lexicalTable:n})=>{const[r,i]=Y.useState(null),[s,a]=Hc(tf,Uu),o=Y.useMemo(()=>x=>(x.__cacheKey||(x.__cacheKey=Rit()),x.__cacheKey),[]),c=Y.useCallback(x=>{const _=n.getColCount();if(x===null){i(null);return}let[w,S]=x;if(w>_-1&&(w=0,S++),w<0&&(w=_-1,S-=1),S>n.getRowCount()-1){i(null),t.update(()=>{if(n.getLatest().getNextSibling())n.getLatest().selectNext();else{const T=Ur();n.insertAfter(T),T.select()}});return}if(S<0){i(null),t.update(()=>{n.getLatest().selectPrevious()});return}i([w,S])},[n,t]);Y.useEffect(()=>{n.focusEmitter.subscribe(c)},[n,c]);const u=Y.useCallback(x=>{x.preventDefault(),t.update(()=>{n.addRowToBottom(),i([0,n.getRowCount()])})},[t,n]),d=Y.useCallback(x=>{x.preventDefault(),t.update(()=>{n.addColumnToRight(),i([n.getColCount(),0])})},[t,n]),[h,p]=Y.useState([-1,-1]),g=Y.useCallback(x=>{let _=x.target;for(;_&&!["TH","TD"].includes(_.tagName);){if(_===x.currentTarget)return;_=_.parentElement}if(_===null)return;const w=_.parentElement,E=w.parentElement.tagName==="TFOOT"?-1:Array.from(w.children).indexOf(_),T=_.tagName==="TH"?-1:Array.from(w.parentElement.children).indexOf(w);p([E,T])},[]),v=Ju();return Y.createElement("table",{className:Nt.tableEditor,onMouseOver:g,onMouseLeave:()=>{p([-1,-1])}},Y.createElement("colgroup",null,a?null:Y.createElement("col",null),Array.from({length:e.children[0].children.length},(x,_)=>{const S=(e.align??[])[_]??"left",E=J0e[S];return Y.createElement("col",{key:_,className:E})}),a?null:Y.createElement("col",null)),a||Y.createElement("thead",null,Y.createElement("tr",null,Y.createElement("th",{className:Nt.tableToolsColumn}),Array.from({length:e.children[0].children.length},(x,_)=>Y.createElement("th",{key:_,"data-tool-cell":!0}
902,Y.createElement(Mit,{setActiveCellWithBoundaries:c,parentEditor:t,colIndex:_,highlightedCoordinates:h,lexicalTable:n,align:(e.align??[])[_]}))),Y.createElement("th",{className:Nt.tableToolsColumn,"data-tool-cell":!0},Y.createElement("button",{className:Nt.iconButton,type:"button",title:v("table.deleteTable","Delete table"),onClick:x=>{x.preventDefault(),t.update(()=>{n.selectNext(),n.remove()})}},s("delete_small"))))),Y.createElement("tbody",null,e.children.map((x,_)=>{const w=Z0e(_);return Y.createElement("tr",{key:_},a||Y.createElement(w,{className:Nt.toolCell,"data-tool-cell":!0},Y.createElement(Dit,{setActiveCellWithBoundaries:c,parentEditor:t,rowIndex:_,highlightedCoordinates:h,lexicalTable:n})),x.children.map((S,E)=>{var T;return Y.createElement(Oit,{align:(T=e.align)==null?void 0:T[E],key:o(S),contents:S.children,setActiveCell:c,rowIndex:_,colIndex:E,lexicalTable:n,parentEditor:t,activeCell:a?[-1,-1]:r})}),a||_===0&&Y.createElement("th",{rowSpan:n.getRowCount(),"data-tool-cell":!0},Y.createElement("button",{type:"button",className:Nt.addColumnButton,onClick:d},s("add_column"))))})),a||Y.createElement("tfoot",null,Y.createElement("tr",null,Y.createElement("th",
902null),Y.createElement("th",{colSpan:n.getColCount()},Y.createElement("button",{type:"button",className:Nt.addRowButton,onClick:u},s("add_row"))),Y.createElement("th",null))))},Oit=({align:e,...t})=>{const{activeCell:n,setActiveCell:r}=t,i=!!(n&&n[0]===t.colIndex&&n[1]===t.rowIndex),s=J0e[e??"left"],a=Z0e(t.rowIndex);return Y.createElement(a,{className:s,"data-active":i,onClick:()=>{r([t.colIndex,t.rowIndex])}},Y.createElement(Pit,{...t,focus:i}))},Pit=({focus:e,setActiveCell:t,parentEditor:n,lexicalTable:r,contents:i,colIndex:s,rowIndex:a})=>{const[o,c,u,d,h,p,g,v,x]=Hc(Yz,Qz,Xz,Zz,Kge,d4,Gge,Wh,s0e),[_]=Y.useState(()=>{const S=tme({nodes:u,theme:c4,namespace:"TableCellEditor"});return S.update(()=>{zge({root:Qr(),mdastRoot:{type:"root",children:[{type:"paragraph",children:i}]},visitors:o,jsxComponentDescriptors:d,directiveDescriptors:h,codeBlockEditorDescriptors:p})}),S}),w=Y.useCallback(S=>{_.getEditorState().read(()=>{const E=Sge({root:Qr(),jsxComponentDescriptors:d,visitors:c,jsxIsAvailable:g});n.update(()=>{r.updateCellContents(s,a,E.children[0].children)},{discrete:!0}),n.dispatchCommand(pS,void 0)}),t(S)},[s,_,c,d,g,r,n,a,t]);return Y.useEffect(()=>bl(_.registerCommand(z5,S=>{S.preventDefault();const E=S.shiftKey?[s-1,a]:[s+1,a];return w(E),!0},kh),_.registerCommand(vz,()=>(t([s,a]),!1),Pi),_.registerCommand(my,S=>{S?.preventDefault();const E=S?.shiftKey?[s,a-1]:[s,a+1];return w(E),!0},kh),_.registerCommand(yz,S=>{const E=S.relatedTarget;return Q0e(E,v.getRootElement())?!1:(w(null),!0)},ur),_.registerCommand(pS,()=>(w(null),!0),ur)),[s,_,v,a,w,t]),Y.useEffect(()=>{e&&_.focus()},[e,_]),Y.createElement(xit,{initialEditor:_},Y.createElement(f0e,{contentEditable:Y.createElement(u0e,null),placeholder:Y.createElement("div",null),ErrorBoundary:d0e}),x.map((S,E)=>Y.createElement(S,{key:E})),Y.createElement(Ome,null))},Mit=({parentEditor:e,highlightedCoordinates:t,align:n,lexicalTable:r,colIndex:i,setActiveCellWithBoundaries:s})=>{const[a,o]=Hc(yx,tf),c=Y.useCallback(p=>{e.update(()=>{r.insertColumnAt(p)}),s([p,0])},[e,r,s]),u=Y.useCallback(p=>{e.update(()=>{r.deleteColumnAt(p)})},[e,r]),d=Y.useCallback((p,g)=>{e.update(()=>{r.setColumnAlign(p,g)})},[e,r]),h=Ju();return Y.createElement(iy,null,Y.createElement(a5,{className:Nt.tableColumnEditorTrigger,"data-active":t[0]===i+1,title:h("table.columnMenu","Column menu")},o("more_horiz")),Y.createElement(b7,{container:a?.current},Y.createElement(o5,{className:Xr(Nt.tableColumnEditorPopoverContent),onOpenAutoFocus:p=>{p.preventDefault()},sideOffset:5,side:"top"},Y.createElement(d$,{className:Nt.tableColumnEditorToolbar},Y.createElement(f$,{className:Nt.toggleGroupRoot,onValueChange:p=>{d(i,p)},value:n??"left",type:"single","aria-label":h("table.textAlignment","Text alignment")},Y.createElement(Dk,{value:"left",title:h("table.alignLeft","Align left")},o("format_align_left")),Y.createElement(Dk,{value:"center",title:h("table.alignCenter","Align center")},o("format_align_center")),Y.createElement(Dk,{value:"right",title:h("table.alignRight","Align right")},o("format_align_right"))),Y.createElement(jit,null),Y.createElement(h0,{onClick:c.bind(null,i),title:h("table.insertColumnLeft","Insert a column to the left of this one")},o("insert_col_left")),Y.createElement(h0,{onClick:c.bind(null,i+1),title:h("table.insertColumnRight","Insert a column to the right of this one")},o("insert_col_right")),Y.createElement(h0,{onClick:u.bind(null,i),title:h("table.deleteColumn","Delete this column")},o("delete_small"))),Y.createElement(_7,{className:Nt.popoverArrow}))))},Dit=({parentEditor:e,highlightedCoordinates:t,lexicalTable:n,rowIndex:r,setActiveCellWithBoundaries:i})=>{const[s,a]=Hc(yx,tf),o=Y.useCallback(d=>{e.update(()=>{n.insertRowAt(d)}),i([0,d])},[e,n,i]),c=Y.useCallback(d=>{e.update(()=>{n.deleteRowAt(d)})},[e,n]),u=Ju();return Y.createElement(iy,null,Y.createElement(a5,{className:Nt.tableColumnEditorTrigger,"data-active":t[1]===r,title:u("table.rowMenu","Row menu")},a("more_horiz")),Y.createElement(b7,{container:s?.current},Y.createElement(o5,{className:Xr(Nt.tableColumnEditorPopoverContent),onOpenAutoFocus:d=>{d.preventDefault()},sideOffset:5,side:"bottom"},Y.createElement(d$,{className:Nt.tableColumnEditorToolbar},Y.createElement(h0,{onClick:o.bind(null,r),title:u("table.insertRowAbove","Insert a row above this one")},a("insert_row_above")),Y.createElement(h0,{onClick:o.bind(null,r+1),title:u("table.insertRowBelow","Insert a row below this one")},a("insert_row_below")),Y.createElement(h0,{onClick:c.bind(null,r),title:u("table.deleteRow","Delete this row")},a("delete_small"))),Y.createElement(_7,{className:Nt.popoverArrow}))))};
902var Fit=Object.defineProperty,Lit=(e,t,n)=>t in e?Fit(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,JZ=(e,t,n)=>(Lit(e,typeof t!="symbol"?t+"":t,n),n);const eJ={type:"tableCell",children:[]};function zit(){let e=cm;return{publish:t=>{e(t)},subscribe:t=>{e=t}}}class eb extends xx{constructor(t,n){super(n),JZ(this,"__mdastNode"),JZ(this,"focusEmitter",zit()),this.__mdastNode=t??{type:"table",children:[]}}static getType(){return"table"}static clone(t){return new eb(structuredClone(t.__mdastNode),t.__key)}static importJSON(t){return h$(t.mdastNode)}static importDOM(){return{table:()=>({conversion:Bit,priority:3})}}exportJSON(){return{mdastNode:structuredClone(this.__mdastNode),type:"table",version:1}}getMdastNode(){return this.__mdastNode}getRowCount(){return this.__mdastNode.children.length}getColCount(){var t;return((t=this.__mdastNode.children[0])==null?void 0:t.children.length)||0}createDOM(){return document.createElement("div")}updateDOM(){return!1}updateCellContents(t,n,r){const s=this.getWritable().__mdastNode,a=s.children[n],o=a.children,c=o[t],u=Array.from(o),d={...c,children:r},h={...a,children:u};u[t]=d,s.children[n]=h}insertColumnAt(t){const r=this.getWritable().__mdastNode;for(let i=0;i<r.children.length;i++){const s=r.children[i],a=s.children,o=Array.from(a),c={...s,children:o};o.splice(t,0,structuredClone(eJ)),r.children[i]=c}r.align&&r.align.length>0&&r.align.splice(t,0,"left")}deleteColumnAt(t){const r=this.getWritable().__mdastNode;for(let i=0;i<r.children.length;i++){const s=r.children[i],a=s.children,o=Array.from(a),c={...s,children:o};o.splice(t,1),r.children[i]=c}}insertRowAt(t){const r=this.getWritable().__mdastNode,i={type:"tableRow",children:Array.from({length:this.getColCount()},()=>structuredClone(eJ))};r.children.splice(t,0,i)}deleteRowAt(t){this.getRowCount()===1?(this.selectNext(),this.remove()):this.getWritable().__mdastNode.children.splice(t,1)}addRowToBottom(){this.insertRowAt(this.getRowCount())}addColumnToRight(){this.insertColumnAt(this.getColCount())}setColumnAlign(t,n){const i=this.getWritable().__mdastNode;i.align==null&&(i.align=[]),i.align[t]=n}decorate(t){return Y.createElement(Iit,{lexicalTable:this,mdastNode:this.__mdastNode,parentEditor:t})}select(t){this.focusEmitter.publish(t??[0,0])}isInline(){return!1}}function $it(e){return e instanceof eb}function h$(e){return new eb(e)}function Bit(e){const t=e.querySelectorAll("tr"),n=Array.from(t).map(r=>({type:"tableRow",children:Array.from(r.querySelectorAll("td, th")).map(i=>({type:"tableCell",children:[{type:"text",value:i.textContent??""}]}))}));return{node:new eb({type:"table",children:n})}}const Uit={testLexicalNode:$it,visitLexicalNode({actions:e,mdastParent:t,lexicalNode:n}){e.appendToParent(t,n.getMdastNode())}},Vit={testNode:"table",visitNode({mdastNode:e,lexicalParent:t}){t.append(h$(e))}};function Hit(e=1,t=1){const n={type:"table",children:[]};for(let r=0;r<e;r++){const i={type:"tableRow",children:[]};for(let s=0;s<t;s++){const a={type:"tableCell",children:[]};i.children.push(a)}n.children.push(i)}return n}const qit=aa(e=>{e.link(e.pipe(qit,c0(({rows:t,columns:n})=>()=>h$(Hit(t,n)))),r$)}),Wit=Qu({init(e,t){e.pubIn({[S3]:R0e(),[w3]:O0e(),[Rh]:Vit,[Gm]:eb,[Km]:Uit,[Jz]:I0e({tableCellPadding:t?.tableCellPadding??!0,tablePipeAlign:t?.tablePipeAlign??!0})})}}),Git=new Set(["http:","https:","mailto:","sms:","tel:"]);let _x=class exe extends gl{static getType(){return"link"}static clone(t){return new exe(t.__url,{rel:t.__rel,target:t.__target,title:t.__title},t.__key)}constructor(t="",n={},r){super(r);const{target:i=null,rel:s=null,title:a=null}=n;this.__url=t,this.__target=i,this.__rel=s,this.__title=a}createDOM(t){const n=document.createElement("a");return this.updateLinkDOM(null,n,t),Bu(n,t.theme.link),n}updateLinkDOM(t,n,r){if(hme(n)){t&&t.__url===this.__url||(n.href=this.sanitizeUrl(this.__url));for(const i of["target","rel","title"]){const s=`__${i}`,a=this[s];t&&t[s]===a||(a?n[i]=a:n.removeAttribute(i))}}}updateDOM(t,n,r){return this.updateLinkDOM(t,n,r),!1}static importDOM(){return{a:t=>({conversion:Kit,priority:1})}}static importJSON(t){return Sm().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setURL(t.url).setRel(t.rel||null).setTarget(t.target||null).setTitle(t.title||null)}sanitizeUrl(t){t=rJ(t);try{const n=new URL(rJ(t));if(!Git.has(n.protocol))return"about:blank"}catch{return t}return t}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(t){const n=this.getWritable();return n.__url=t,n}getTarget(){return this.getLatest().__target}setTarget(t){const n=this.getWritable();return n.__target=t,n}
902getRel(){return this.getLatest().__rel}setRel(t){const n=this.getWritable();return n.__rel=t,n}getTitle(){return this.getLatest().__title}setTitle(t){const n=this.getWritable();return n.__title=t,n}insertNewAfter(t,n=!0){const r=Sm(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(r,n),r}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(t,n,r){if(!_t(n))return!1;const i=n.anchor.getNode(),s=n.focus.getNode();return this.isParentOf(i)&&this.isParentOf(s)&&n.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}};function Kit(e){let t=null;if(hme(e)){const n=e.textContent;(n!==null&&n!==""||e.children.length>0)&&(t=Sm(e.getAttribute("href")||"",{rel:e.getAttribute("rel"),target:e.getAttribute("target"),title:e.getAttribute("title")}))}return{node:t}}function Sm(e="",t){return Jl(new _x(e,t))}function bc(e){return e instanceof _x}let h4=class txe extends _x{constructor(t="",n={},r){super(t,n,r),this.__isUnlinked=n.isUnlinked!==void 0&&n.isUnlinked!==null&&n.isUnlinked}static getType(){return"autolink"}static clone(t){return new txe(t.__url,{isUnlinked:t.__isUnlinked,rel:t.__rel,target:t.__target,title:t.__title},t.__key)}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(t){const n=this.getWritable();return n.__isUnlinked=t,n}createDOM(t){return this.__isUnlinked?document.createElement("span"):super.createDOM(t)}updateDOM(t,n,r){return super.updateDOM(t,n,r)||t.__isUnlinked!==this.__isUnlinked}static importJSON(t){return bF().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setIsUnlinked(t.isUnlinked||!1)}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(t,n=!0){const r=this.getParentOrThrow().insertNewAfter(t,n);if(rt(r)){const i=bF(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return r.append(i),i}return null}};function bF(e="",t){return Jl(new h4(e,t))}function yd(e){return e instanceof h4}const yy=Nn("TOGGLE_LINK_COMMAND");function tJ(e,t){if(e.type==="element"){const n=e.getNode();return rt(n)||(function(r,...i){const s=new URL("https://lexical.dev/docs/error"),a=new URLSearchParams;a.append("code",r);for(const o of i)a.append("v",o);throw s.search=a.toString(),Error(`Minified Lexical error #${r}; visit ${s.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(252),n.getChildren()[e.offset+t]||null}return null}function qP(e,t={}){const{target:n,title:r}=t,i=t.rel===void 0?"noreferrer":t.rel,s=Pt();if(s===null||!_t(s)&&!ss(s))return;if(ss(s)){const u=s.getNodes();return u.length===0?void 0:void u.forEach((d=>{if(e===null){const h=Cu(d,(p=>!yd(p)&&bc(p)));h&&(h.insertBefore(d),h.getChildren().length===0&&h.remove())}else{const h=Cu(d,(p=>!yd(p)&&bc(p)));if(h)h.setURL(e),n!==void 0&&h.setTarget(n),i!==void 0&&h.setRel(i);else{const p=Sm(e,{rel:i,target:n});d.insertBefore(p),p.append(d)}}}))}const a=s.extract();if(e===null)return void a.forEach((u=>{const d=Cu(u,(h=>!yd(h)&&bc(h)));if(d){const h=d.getChildren();for(let p=0;p<h.length;p++)d.insertBefore(h[p]);d.remove()}}));const o=new Set,c=u=>{o.has(u.getKey())||(o.add(u.getKey()),u.setURL(e),n!==void 0&&u.setTarget(n),i!==void 0&&u.setRel(i),r!==void 0&&u.setTitle(r))};if(a.length===1){const u=nJ(a[0],bc);if(u!==null)return c(u)}(function(u){const d=Pt();if(!_t(d))return u();const h=B0(d),p=h.isBackward(),g=tJ(h.anchor,p?-1:0),v=tJ(h.focus,p?0:-1);if(u(),g||v){const x=Pt();if(_t(x)){const _=x.clone();if(g){const w=g.getParent();w&&_.anchor.set(w.getKey(),g.getIndexWithinParent()+(p?1:0),"element")}if(v){const w=v.getParent();w&&_.focus.set(w.getKey(),v.getIndexWithinParent()+(p?0:1),"element")}As(B0(_))}}})((()=>{let u=null;for(const d of a){if(!d.isAttached())continue;const h=nJ(d,bc);if(h){c(h);continue}if(rt(d)){if(!d.isInline())continue;if(bc(d)){if(!(yd(d)||u!==null&&u.getParentOrThrow().isParentOf(d))){c(d),u=d;continue}for(const g of d.getChildren())d.insertBefore(g);d.remove();continue}}const p=d.getPreviousSibling();bc(p)&&p.is(u)?p.append(d):(u=Sm(e,{rel:i,target:n,title:r}),d.insertAfter(u),u.append(d))}}))}function nJ(e,t){let n=e;for(;n!==null&&n.getParent()!==null&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}const Yit=/^\+?[0-9\s()-]{5,}$/;function rJ(e){return e.match(/^[a-z][a-z0-9+.-]*:/i)||e.match(/^[/#.]/)?e:e.includes("@")?`mailto:${e}`:Yit.test(e)?`tel:${e}`:`https://${e}`}const Xit={testNode:"link",visitNode({mdastNode:e,actions:t}){t.addAndStepInto(Sm(e.url,{title:e.title}))}},Qit={testLexicalNode:bc,visitLexicalNode:({lexicalNode:e,actions:t})=>{t.addAndStepInto("link",{url:e.getURL(),title:e.getTitle()})}};function Zit({validateUrl:e,attributes:t}){const[n]=So();return b.useEffect((()=>
902{if(!n.hasNodes([_x]))throw new Error("LinkPlugin: LinkNode not registered on editor");return bl(n.registerCommand(yy,(r=>{if(r===null)return qP(r),!0;if(typeof r=="string")return!(e!==void 0&&!e(r))&&(qP(r,t),!0);{const{url:i,target:s,rel:a,title:o}=r;return qP(i,{...t,rel:a,target:s,title:o}),!0}}),Pi),e!==void 0?n.registerCommand(NE,(r=>{const i=Pt();if(!_t(i)||i.isCollapsed()||!Wp(r,ClipboardEvent)||r.clipboardData===null)return!1;const s=r.clipboardData.getData("text");return!!e(s)&&!i.getNodes().some((a=>rt(a)))&&(n.dispatchCommand(yy,{...t,url:s}),r.preventDefault(),!0)}),Pi):()=>{})}),[n,e,t]),null}function iJ(e,t=(n=>n)){return n=>{const r=e.exec(n);return r===null?null:{index:r.index,length:r[0].length,text:r[0],url:t(r[0])}}}function nxe(e,t){for(let n=0;n<t.length;n++){const r=t[n](e);if(r)return r}return null}const Jit=/[.,;\s]/;function k3(e){return Jit.test(e)}function rxe(e){return k3(e[e.length-1])}function _F(e){return k3(e[0])}function ixe(e){let t=e.getPreviousSibling();return rt(t)&&(t=t.getLastDescendant()),t===null||Eu(t)||Lt(t)&&rxe(t.getTextContent())}function sxe(e){let t=e.getNextSibling();return rt(t)&&(t=t.getFirstDescendant()),t===null||Eu(t)||Lt(t)&&_F(t.getTextContent())}function est(e,t,n,r){return(e>0?k3(n[e-1]):ixe(r[0]))?t<n.length?k3(n[t]):sxe(r[r.length-1]):!1}function tst(e,t,n){const r=[],i=[],s=[];let a=0,o=0;const c=[...e];for(;c.length>0;){const u=c[0],d=u.getTextContent().length,h=o;o+d<=t?(r.push(u),a+=d):h>=n?s.push(u):i.push(u),o+=d,c.shift()}return[a,r,i,s]}function nst(e,t,n,r){const i=bF(r.url,r.attributes);if(e.length===1){let s,a=e[0];t===0?[s,a]=a.splitText(n):[,s,a]=a.splitText(t,n);const o=Ii(r.text);return o.setFormat(s.getFormat()),o.setDetail(s.getDetail()),o.setStyle(s.getStyle()),i.append(o),s.replace(i),a}if(e.length>1){const s=e[0];let a,o=s.getTextContent().length;t===0?a=s:[,a]=s.splitText(t);const c=[];let u;for(let g=1;g<e.length;g++){const v=e[g],x=v.getTextContent().length,_=o;if(_<n)if(o+x<=n)c.push(v);else{const[w,S]=v.splitText(n-_);c.push(w),u=S}o+=x}const d=Pt(),h=d?d.getNodes().find(Lt):void 0,p=Ii(a.getTextContent());return p.setFormat(a.getFormat()),p.setDetail(a.getDetail()),p.setStyle(a.getStyle()),i.append(p,...c),h&&h===a&&(_t(d)?p.select(d.anchor.offset,d.focus.offset):ss(d)&&p.select(0,p.getTextContent().length)),a.replace(i),u}}function WP(e,t,n){const r=e.getChildren(),i=r.length;for(let c=0;c<i;c++){const u=r[c];if(!Lt(u)||!u.isSimpleText())return Fk(e),void n(null,e.getURL())}const s=e.getTextContent(),a=nxe(s,t);if(a===null||a.text!==s||!ixe(e)||!sxe(e))return Fk(e),void n(null,e.getURL());const o=e.getURL();if(o!==a.url&&(e.setURL(a.url),n(a.url,o)),a.attributes){const c=e.getRel();c!==a.attributes.rel&&(e.setRel(a.attributes.rel||null),n(a.attributes.rel||null,c));const u=e.getTarget();u!==a.attributes.target&&(e.setTarget(a.attributes.target||null),n(a.attributes.target||null,u))}}function Fk(e){const t=e.getChildren();for(let n=t.length-1;n>=0;n--)e.insertAfter(t[n]);return e.remove(),t.map((n=>n.getLatest()))}function rst(e,t,n){b.useEffect((()=>{e.hasNodes([h4])||(function(i,...s){const a=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",i);for(const c of s)o.append("v",c);throw a.search=o.toString(),Error(`Minified Lexical error #${i}; visit ${a.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(77);const r=(i,s)=>{n&&n(i,s)};return bl(e.registerNodeTransform(ef,(i=>{const s=i.getParentOrThrow(),a=i.getPreviousSibling();if(yd(s)&&!s.getIsUnlinked())WP(s,t,r);else if(!bc(s)){if(i.isSimpleText()&&(_F(i.getTextContent())||!yd(a))){const o=(function(c){const u=[c];let d=c.getNextSibling();for(;d!==null&&Lt(d)&&d.isSimpleText()&&(u.push(d),!/[\s]/.test(d.getTextContent()));)d=d.getNextSibling();return u})(i);(function(c,u,d){let h=[...c];const p=h.map((_=>_.getTextContent())).join("");let g,v=p,x=0;for(;(g=nxe(v,u))&&g!==null;){const _=g.index,w=_+g.length;if(est(x+_,x+w,p,h)){const[S,,E,T]=tst(h,x+_,x+w),N=nst(E,x+_-S,x+w-S,g);h=N?[N,...T]:T,d(g.url,null),x=0}else x+=w;v=v.substring(w)}})(o,t,r)}(function(o,c,u){const d=o.getPreviousSibling(),h=o.getNextSibling(),p=o.getTextContent();var g;!yd(d)||d.getIsUnlinked()||_F(p)&&(g=p,!(d.isEmailURI()?/^\.[a-zA-Z]{2,}/.test(g):/^\.[a-zA-Z0-9]{1,}/.test(g)))||(d.append(o),WP(d,c,u),u(null,d.getURL())),!yd(h)||h.getIsUnlinked()||rxe(p)||(Fk(h),WP(h,c,u),u(null,h.getURL()))})(i,t,r)}})),e.registerCommand(yy,(i=>{const s=Pt();
902return i!==null||!_t(s)||s.extract().forEach((a=>{const o=a.getParent();yd(o)&&(o.setIsUnlinked(!o.getIsUnlinked()),o.markDirty())})),!1}),Pi))}),[e,t,n])}function ist({matchers:e,onChange:t}){const[n]=So();return rst(n,e,t),null}const sst=/((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/,ast=/(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/,ost=[iJ(sst,e=>e.startsWith("http")?e:`https://${e}`),iJ(ast,e=>`mailto:${e}`)],lst=()=>Y.createElement(ist,{matchers:ost}),cst=xn(!1),ust=Qu({init(e,t){const n=!!t?.disableAutoLink,r=t?.validateUrl?{validateUrl:t.validateUrl}:{},i=()=>Y.createElement(Y.Fragment,null,Y.createElement(Zit,{...r}),n?null:Y.createElement(lst,null));e.pubIn({[VE]:"link",[Rh]:Xit,[Gm]:[_x,h4],[Km]:Qit,[cst]:n,[n$]:i,[bx]:i})}});function dst(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var fst=["color"],hst=b.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=dst(e,fst);return b.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),b.createElement("path",{d:"M2.5 1H12.5C13.3284 1 14 1.67157 14 2.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V2.5C1 1.67157 1.67157 1 2.5 1ZM2.5 2C2.22386 2 2 2.22386 2 2.5V8.3636L3.6818 6.6818C3.76809 6.59551 3.88572 6.54797 4.00774 6.55007C4.12975 6.55216 4.24568 6.60372 4.32895 6.69293L7.87355 10.4901L10.6818 7.6818C10.8575 7.50607 11.1425 7.50607 11.3182 7.6818L13 9.3636V2.5C13 2.22386 12.7761 2 12.5 2H2.5ZM2 12.5V9.6364L3.98887 7.64753L7.5311 11.4421L8.94113 13H2.5C2.22386 13 2 12.7761 2 12.5ZM12.5 13H10.155L8.48336 11.153L11 8.6364L13 10.6364V12.5C13 12.7761 12.7761 13 12.5 13ZM6.64922 5.5C6.64922 5.03013 7.03013 4.64922 7.5 4.64922C7.96987 4.64922 8.35078 5.03013 8.35078 5.5C8.35078 5.96987 7.96987 6.35078 7.5 6.35078C7.03013 6.35078 6.64922 5.96987 6.64922 5.5ZM7.5 3.74922C6.53307 3.74922 5.74922 4.53307 5.74922 5.5C5.74922 6.46693 6.53307 7.25078 7.5 7.25078C8.46693 7.25078 9.25078 6.46693 9.25078 5.5C9.25078 4.53307 8.46693 3.74922 7.5 3.74922Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))});const sJ=()=>Y.createElement("div",{className:Nt.imagePlaceholder},Y.createElement(hst,null));function wF(e){const{nodeKey:t,imageSource:n,initialImagePath:r,title:i,alt:s,width:a,height:o}=e,[c,u,d]=Hc(zxe,tf,Uu),[h]=So(),p=ol(Fxe),g=Ju();return Y.createElement("div",{className:Nt.editImageToolbar},Y.createElement("button",{className:Nt.iconButton,type:"button",title:g("imageEditor.deleteImage","Delete image"),disabled:d,onClick:v=>{v.preventDefault(),h.update(()=>{var x;(x=Zi(t))==null||x.remove()})}},u("delete_small")),!c&&Y.createElement("button",{type:"button",className:Xr(Nt.iconButton,Nt.editImageButton),title:g("imageEditor.editImage","Edit image"),disabled:d,onClick:()=>{p({nodeKey:t,initialValues:{src:r||n,title:i,altText:s,width:by(a),height:by(o)}})}},u("settings")))}var qE=e=>e.type==="checkbox",Jg=e=>e instanceof Date,sl=e=>e==null;const axe=e=>typeof e=="object";var ra=e=>!sl(e)&&!Array.isArray(e)&&axe(e)&&!Jg(e),oxe=e=>ra(e)&&e.target?qE(e.target)?e.target.checked:e.target.value:e,pst=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,lxe=(e,t)=>e.has(pst(t)),mst=e=>{const t=e.constructor&&e.constructor.prototype;return ra(t)&&t.hasOwnProperty("isPrototypeOf")},p$=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function da(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(p$&&(e instanceof Blob||r))&&(n||ra(e)))if(t=n?[]:Object.create(Object.getPrototypeOf(e)),!n&&!mst(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=da(e[i]));else return e;return t}var p4=e=>/^\w*$/.test(e),bs=e=>e===void 0,m$=e=>Array.isArray(e)?e.filter(Boolean):[],g$=e=>m$(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Zt=(e,t,n)=>{if(!t||!ra(e))return n;
902const r=(p4(t)?[t]:g$(t)).reduce((i,s)=>sl(i)?i:i[s],e);return bs(r)||r===e?bs(e[t])?n:e[t]:r},Pl=e=>typeof e=="boolean",Ni=(e,t,n)=>{let r=-1;const i=p4(t)?[t]:g$(t),s=i.length,a=s-1;for(;++r<s;){const o=i[r];let c=n;if(r!==a){const u=e[o];c=ra(u)||Array.isArray(u)?u:isNaN(+i[r+1])?{}:[]}if(o==="__proto__"||o==="constructor"||o==="prototype")return;e[o]=c,e=e[o]}};const N3={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},hu={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Nf={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},cxe=Y.createContext(null);cxe.displayName="HookFormContext";const x$=()=>Y.useContext(cxe);var uxe=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(i,s,{get:()=>{const a=s;return t._proxyFormState[a]!==hu.all&&(t._proxyFormState[a]=!r||hu.all),n&&(n[a]=!0),e[a]}});return i};const v$=typeof window<"u"?Y.useLayoutEffect:Y.useEffect;function gst(e){const t=x$(),{control:n=t.control,disabled:r,name:i,exact:s}=e||{},[a,o]=Y.useState(n._formState),c=Y.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return v$(()=>n._subscribe({name:i,formState:c.current,exact:s,callback:u=>{!r&&o({...n._formState,...u})}}),[i,r,s]),Y.useEffect(()=>{c.current.isValid&&n._setValid(!0)},[n]),Y.useMemo(()=>uxe(a,n,c.current,!1),[a,n])}var Vl=e=>typeof e=="string",dxe=(e,t,n,r,i)=>Vl(e)?(r&&t.watch.add(e),Zt(n,e,i)):Array.isArray(e)?e.map(s=>(r&&t.watch.add(s),Zt(n,s))):(r&&(t.watchAll=!0),n),SF=e=>sl(e)||!axe(e);function Kf(e,t,n=new WeakSet){if(SF(e)||SF(t))return e===t;if(Jg(e)&&Jg(t))return e.getTime()===t.getTime();const r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const s of r){const a=e[s];if(!i.includes(s))return!1;if(s!=="ref"){const o=t[s];if(Jg(a)&&Jg(o)||ra(a)&&ra(o)||Array.isArray(a)&&Array.isArray(o)?!Kf(a,o,n):a!==o)return!1}}return!0}function xst(e){const t=x$(),{control:n=t.control,name:r,defaultValue:i,disabled:s,exact:a,compute:o}=e||{},c=Y.useRef(i),u=Y.useRef(o),d=Y.useRef(void 0);u.current=o;const h=Y.useMemo(()=>n._getWatch(r,c.current),[n,r]),[p,g]=Y.useState(u.current?u.current(h):h);return v$(()=>n._subscribe({name:r,formState:{values:!0},exact:a,callback:v=>{if(!s){const x=dxe(r,n._names,v.values||n._formValues,!1,c.current);if(u.current){const _=u.current(x);Kf(_,d.current)||(g(_),d.current=_)}else g(x)}}}),[n,s,r,a]),Y.useEffect(()=>n._removeUnmounted()),p}function vst(e){const t=x$(),{name:n,disabled:r,control:i=t.control,shouldUnregister:s,defaultValue:a}=e,o=lxe(i._names.array,n),c=Y.useMemo(()=>Zt(i._formValues,n,Zt(i._defaultValues,n,a)),[i,n,a]),u=xst({control:i,name:n,defaultValue:c,exact:!0}),d=gst({control:i,name:n,exact:!0}),h=Y.useRef(e),p=Y.useRef(void 0),g=Y.useRef(i.register(n,{...e.rules,value:u,...Pl(e.disabled)?{disabled:e.disabled}:{}}));h.current=e;const v=Y.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Zt(d.errors,n)},isDirty:{enumerable:!0,get:()=>!!Zt(d.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Zt(d.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Zt(d.validatingFields,n)},error:{enumerable:!0,get:()=>Zt(d.errors,n)}}),[d,n]),x=Y.useCallback(E=>g.current.onChange({target:{value:oxe(E),name:n},type:N3.CHANGE}),[n]),_=Y.useCallback(()=>g.current.onBlur({target:{value:Zt(i._formValues,n),name:n},type:N3.BLUR}),[n,i._formValues]),w=Y.useCallback(E=>{const T=Zt(i._fields,n);T&&E&&(T._f.ref={focus:()=>E.focus&&E.focus(),select:()=>E.select&&E.select(),setCustomValidity:N=>E.setCustomValidity(N),reportValidity:()=>E.reportValidity()})},[i._fields,n]),S=Y.useMemo(()=>({name:n,value:u,...Pl(r)||d.disabled?{disabled:d.disabled||r}:{},onChange:x,onBlur:_,ref:w}),[n,r,d.disabled,x,_,w,u]);return Y.useEffect(()=>{const E=i._options.shouldUnregister||s,T=p.current;T&&T!==n&&!o&&i.unregister(T),i.register(n,{...h.current.rules,...Pl(h.current.disabled)?{disabled:h.current.disabled}:{}});const N=(A,k)=>{const j=Zt(i._fields,A);j&&j._f&&(j._f.mount=k)};if(N(n,!0),E){const A=da(Zt(i._options.defaultValues,n,h.current.defaultValue));Ni(i._defaultValues,n,A),bs(Zt(i._formValues,n))&&Ni(i._formValues,n,A)}return!o&&i.register(n),p.current=n,()=>{(o?E&&!i._state.action:E)?i.unregister(n):N(n,!1)}},[n,i,o,s]),Y.useEffect(()=>{i._setDisabledField({disabled:r,name:n})},[r,n,i]),Y.useMemo(()=>({field:S,formState:d,fieldState:v}),[S,d,v])}const yst=e=>e.render(vst(e));var bst=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},qw=e=>Array.isArray(e)?e:[e],aJ=()=>{let e=[];return{get observers(){return e},next:i=>{for(const s of e)s.next&&s.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(s=>s!==i)}}),unsubscribe:()=>{e=[]}}};function fxe(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const i=e[r],s=t[r];
vendor: 10,518 bytes, line 902
902if(i&&ra(i)&&s){const a=fxe(i,s);ra(a)&&(n[r]=a)}else e[r]&&(n[r]=s)}return n}var nl=e=>ra(e)&&!Object.keys(e).length,y$=e=>e.type==="file",pu=e=>typeof e=="function",j3=e=>{if(!p$)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},hxe=e=>e.type==="select-multiple",b$=e=>e.type==="radio",_st=e=>b$(e)||qE(e),GP=e=>j3(e)&&e.isConnected;function wst(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=bs(e)?r++:e[t[r++]];return e}function Sst(e){for(const t in e)if(e.hasOwnProperty(t)&&!bs(e[t]))return!1;return!0}function Gs(e,t){const n=Array.isArray(t)?t:p4(t)?[t]:g$(t),r=n.length===1?e:wst(e,n),i=n.length-1,s=n[i];return r&&delete r[s],i!==0&&(ra(r)&&nl(r)||Array.isArray(r)&&Sst(r))&&Gs(e,n.slice(0,-1)),e}var Est=e=>{for(const t in e)if(pu(e[t]))return!0;return!1};function pxe(e){return Array.isArray(e)||ra(e)&&!Est(e)}function EF(e,t={}){for(const n in e)pxe(e[n])?(t[n]=Array.isArray(e[n])?[]:{},EF(e[n],t[n])):bs(e[n])||(t[n]=!0);return t}function Zv(e,t,n){n||(n=EF(t));for(const r in e)pxe(e[r])?bs(t)||SF(n[r])?n[r]=EF(e[r],Array.isArray(e[r])?[]:{}):Zv(e[r],sl(t)?{}:t[r],n[r]):n[r]=!Kf(e[r],t[r]);return n}const oJ={value:!1,isValid:!1},lJ={value:!0,isValid:!0};var mxe=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!bs(e[0].attributes.value)?bs(e[0].value)||e[0].value===""?lJ:{value:e[0].value,isValid:!0}:lJ:oJ}return oJ},gxe=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>bs(e)?e:t?e===""?NaN:e&&+e:n&&Vl(e)?new Date(e):r?r(e):e;const cJ={isValid:!1,value:null};var xxe=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,cJ):cJ;function uJ(e){const t=e.ref;return y$(t)?t.files:b$(t)?xxe(e.refs).value:hxe(t)?[...t.selectedOptions].map(({value:n})=>n):qE(t)?mxe(e.refs).value:gxe(bs(t.value)?e.ref.value:t.value,e)}var Cst=(e,t,n,r)=>{const i={};for(const s of e){const a=Zt(t,s);a&&Ni(i,s,a._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},R3=e=>e instanceof RegExp,I_=e=>bs(e)?e:R3(e)?e.source:ra(e)?R3(e.value)?e.value.source:e.value:e,dJ=e=>({isOnSubmit:!e||e===hu.onSubmit,isOnBlur:e===hu.onBlur,isOnChange:e===hu.onChange,isOnAll:e===hu.all,isOnTouch:e===hu.onTouched});const fJ="AsyncFunction";var Tst=e=>!!e&&!!e.validate&&!!(pu(e.validate)&&e.validate.constructor.name===fJ||ra(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===fJ)),Ast=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),hJ=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Ww=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const s=Zt(e,i);if(s){const{_f:a,...o}=s;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],i)&&!r)return!0;if(a.ref&&t(a.ref,a.name)&&!r)return!0;if(Ww(o,t))break}else if(ra(o)&&Ww(o,t))break}}};function pJ(e,t,n){const r=Zt(e,n);if(r||p4(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const s=i.join("."),a=Zt(t,s),o=Zt(e,s);if(a&&!Array.isArray(a)&&n!==s)return{name:n};if(o&&o.type)return{name:s,error:o};if(o&&o.root&&o.root.type)return{name:`${s}.root`,error:o.root};i.pop()}return{name:n}}var kst=(e,t,n,r)=>{n(e);const{name:i,...s}=e;return nl(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(a=>t[a]===(!r||hu.all))},Nst=(e,t,n)=>!e||!t||e===t||qw(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),jst=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,Rst=(e,t)=>!m$(Zt(e,t)).length&&Gs(e,t),Ist=(e,t,n)=>{const r=qw(Zt(e,n));return Ni(r,"root",t[n]),Ni(e,n,r),e};function mJ(e,t,n="validate"){if(Vl(e)||Array.isArray(e)&&e.every(Vl)||Pl(e)&&!e)return{type:n,message:Vl(e)?e:"",ref:t}}var kv=e=>ra(e)&&!R3(e)?e:{value:e,message:""},gJ=async(e,t,n,r,i,s)=>{const{ref:a,refs:o,required:c,maxLength:u,minLength:d,min:h,max:p,pattern:g,validate:v,name:x,valueAsNumber:_,mount:w}=e._f,S=Zt(n,x);if(!w||t.has(x))return{};const E=o?o[0]:a,T=U=>{i&&E.reportValidity&&(E.setCustomValidity(Pl(U)?"":U||""),E.reportValidity())},N={},A=b$(a),k=qE(a),j=A||k,R=(_||y$(a))&&bs(a.value)&&bs(S)||j3(a)&&a.value===""||S===""||Array.isArray(S)&&!S.length,P=bst.bind(null,x,r,N),V=(U,G,Q,Z=Nf.maxLength,K=Nf.minLength)=>{const te=U?G:Q;N[x]={type:U?Z:K,message:te,ref:a,...P(U?Z:K,te)}};if(s?!Array.isArray(S)||!S.length:c&&(!j&&(R||sl(S))||Pl(S)&&!S||k&&!mxe(o).isValid||A&&!xxe(o).isValid)){const{value:U,message:G}=Vl(c)?{value:!!c,message:c}:kv(c);if(U&&(N[x]={type:Nf.required,message:G,ref:E,...P(Nf.required,G)},!r))return T(G),N}if(!R&&(!sl(h)||!sl(p))){let U,G;const Q=kv(p),Z=kv(h);if(!sl(S)&&!isNaN(S)){const K=a.valueAsNumber||S&&+S;sl(Q.value)||(U=K>Q.value),sl(Z.value)||(G=K<Z.value)}else{const K=a.valueAsDate||new Date(S),te=H=>new Date(new Date().toDateString()+" "+H),ne=a.type=="time",se=a.type=="week";Vl(Q.value)&&S&&(U=ne?te(S)>te(Q.value):se?S>Q.value:K>new Date(Q.value)),Vl(Z.value)&&S&&(G=ne?te(S)<te(Z.value):se?S<Z.value:K<new Date(Z.value))}if((U||G)&&(V(!!U,Q.message,Z.message,Nf.max,Nf.min),!r))return T(N[x].message),N}if((u||d)&&!R&&(Vl(S)||s&&Array.isArray(S))){const U=kv(u),G=kv(d),Q=!sl(U.value)&&S.length>+U.value,Z=!sl(G.value)&&S.length<+G.value;if((Q||Z)&&(V(Q,U.message,G.message),!r))return T(N[x].message),N}if(g&&!R&&Vl(S)){const{value:U,message:G}=kv(g);if(R3(U)&&!S.match(U)&&(N[x]={type:Nf.pattern,message:G,ref:a,...P(Nf.pattern,G)},!r))return T(G),N}if(v){if(pu(v)){const U=await v(S,n),G=mJ(U,E);if(G&&(N[x]={...G,...P(Nf.validate,G.message)},!r))return T(G.message),N}else if(ra(v)){let U={};for(const G in v){if(!nl(U)&&!r)break;const Q=mJ(await v[G](S,n),E,G);Q&&(U={...Q,...P(G,Q.message)},T(Q.message),r&&(N[x]=U))}if(!nl(U)&&(N[x]={ref:E,...U},!r))return N}}return T(!0),N};const Ost={mode:hu.onSubmit,reValidateMode:hu.onChange,shouldFocusError:!0};function Pst(e={}){let t={...Ost,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:pu(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},i=ra(t.defaultValues)||ra(t.values)?da(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:da(i),a={action:!1,mount:!1,watch:!1},o={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,u=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let h={...d};const p={array:aJ(),state:aJ()},g=t.criteriaMode===hu.all,v=ie=>ue=>{clearTimeout(u),u=setTimeout(ie,ue)},x=async ie=>{if(!t.disabled&&(d.isValid||h.isValid||ie)){const ue=t.resolver?nl((await k()).errors):await R(r,!0);ue!==n.isValid&&p.state.next({isValid:ue})}},_=(ie,ue)=>{!t.disabled&&(d.isValidating||d.validatingFields||h.isValidating||h.validatingFields)&&((ie||Array.from(o.mount)).forEach(Ne=>{Ne&&(ue?Ni(n.validatingFields,Ne,ue):Gs(n.validatingFields,Ne))}),p.state.next({validatingFields:n.validatingFields,isValidating:!nl(n.validatingFields)}))},w=(ie,ue=[],Ne,De,be=!0,me=!0)=>{if(De&&Ne&&!t.disabled){if(a.action=!0,me&&Array.isArray(Zt(r,ie))){const we=Ne(Zt(r,ie),De.argA,De.argB);be&&Ni(r,ie,we)}if(me&&Array.isArray(Zt(n.errors,ie))){const we=Ne(Zt(n.errors,ie),De.argA,De.argB);be&&Ni(n.errors,ie,we),Rst(n.errors,ie)}if((d.touchedFields||h.touchedFields)&&me&&Array.isArray(Zt(n.touchedFields,ie))){const we=Ne(Zt(n.touchedFields,ie),De.argA,De.argB);be&&Ni(n.touchedFields,ie,we)}(d.dirtyFields||h.dirtyFields)&&(n.dirtyFields=Zv(i,s)),p.state.next({name:ie,isDirty:V(ie,ue),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Ni(s,ie,ue)},S=(ie,ue)=>{Ni(n.errors,ie,ue),p.state.next({errors:n.errors})},E=ie=>{n.errors=ie,p.state.next({errors:n.errors,isValid:!1})},T=(ie,ue,Ne,De)=>{const be=Zt(r,ie);if(be){const me=Zt(s,ie,bs(Ne)?Zt(i,ie):Ne);bs(me)||De&&De.defaultChecked||ue?Ni(s,ie,ue?me:uJ(be._f)):Q(ie,me),a.mount&&x()}},N=(ie,ue,Ne,De,be)=>{let me=!1,we=!1;const Le={name:ie};if(!t.disabled){if(!Ne||De){(d.isDirty||h.isDirty)&&(we=n.isDirty,n.isDirty=Le.isDirty=V(),me=we!==Le.isDirty);const oe=Kf(Zt(i,ie),ue);we=!!Zt(n.dirtyFields,ie),oe?Gs(n.dirtyFields,ie):Ni(n.dirtyFields,ie,!0),Le.dirtyFields=n.dirtyFields,me=me||(d.dirtyFields||h.dirtyFields)&&we!==!oe}if(Ne){const oe=Zt(n.touchedFields,ie);oe||(Ni(n.touchedFields,ie,Ne),Le.touchedFields=n.touchedFields,me=me||(d.touchedFields||h.touchedFields)&&oe!==Ne)}me&&be&&p.state.next(Le)}return me?Le:{}},A=(ie,ue,Ne,De)=>{const be=Zt(n.errors,ie),me=(d.isValid||h.isValid)&&Pl(ue)&&n.isValid!==ue;if(t.delayError&&Ne?(c=v(()=>S(ie,Ne)),c(t.delayError)):(clearTimeout(u),c=null,Ne?Ni(n.errors,ie,Ne):Gs(n.errors,ie)),(Ne?!Kf(be,Ne):be)||!nl(De)||me){const we={...De,...me&&Pl(ue)?{isValid:ue}:{},errors:n.errors,name:ie};n={...n,...we},p.state.next(we)}},k=async ie=>{_(ie,!0);const ue=await t.resolver(s,t.context,Cst(ie||o.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return _(ie),ue},j=async ie=>{const{errors:ue}=await k(ie);if(ie)for(const Ne of ie){const De=Zt(ue,Ne);De?Ni(n.errors,Ne,De):Gs(n.errors,Ne)}else n.errors=ue;return ue},R=async(ie,ue,Ne={valid:!0})=>{for(const De in ie){const be=ie[De];if(be){const{_f:me,...we}=be;if(me){const Le=o.array.has(me.name),oe=be._f&&Tst(be._f);oe&&d.validatingFields&&_([me.name],!0);const St=await gJ(be,o.disabled,s,g,t.shouldUseNativeValidation&&!ue,Le);if(oe&&d.validatingFields&&_([me.name]),St[me.name]&&(Ne.valid=!1,ue))break;!ue&&(Zt(St,me.name)?Le?Ist(n.errors,St,me.name):Ni(n.errors,me.name,St[me.name]):Gs(n.errors,me.name))}!nl(we)&&await R(we,ue,Ne)}}return Ne.valid},P=()=>{for(const ie of o.unMount){const ue=Zt(r,ie);ue&&(ue._f.refs?ue._f.refs.every(Ne=>!GP(Ne)):!GP(ue._f.ref))&&W(ie)}o.unMount=new Set},V=(ie,ue)=>!t.disabled&&(ie&&ue&&Ni(s,ie,ue),!Kf(H(),i)),U=(ie,ue,Ne)=>dxe(ie,o,{...a.mount?s:bs(ue)?i:Vl(ie)?{[ie]:ue}:ue},Ne,ue),G=ie=>m$(Zt(a.mount?s:i,ie,t.shouldUnregister?Zt(i,ie,[]):[])),Q=(ie,ue,Ne={})=>{const De=Zt(r,ie);let be=ue;if(De){const me=De._f;me&&(!me.disabled&&Ni(s,ie,gxe(ue,me)),be=j3(me.ref)&&sl(ue)?"":ue,hxe(me.ref)?[...me.ref.options].forEach(we=>we.selected=be.includes(we.value)):me.refs?qE(me.ref)?me.refs.forEach(we=>{(!we.defaultChecked||!we.disabled)&&(Array.isArray(be)?we.checked=!!be.find(Le=>Le===we.value):we.checked=be===we.value||!!be)}
vendor: 6,602 bytes, line 902
902):me.refs.forEach(we=>we.checked=we.value===be):y$(me.ref)?me.ref.value="":(me.ref.value=be,me.ref.type||p.state.next({name:ie,values:da(s)})))}(Ne.shouldDirty||Ne.shouldTouch)&&N(ie,be,Ne.shouldTouch,Ne.shouldDirty,!0),Ne.shouldValidate&&se(ie)},Z=(ie,ue,Ne)=>{for(const De in ue){if(!ue.hasOwnProperty(De))return;const be=ue[De],me=ie+"."+De,we=Zt(r,me);(o.array.has(ie)||ra(be)||we&&!we._f)&&!Jg(be)?Z(me,be,Ne):Q(me,be,Ne)}},K=(ie,ue,Ne={})=>{const De=Zt(r,ie),be=o.array.has(ie),me=da(ue);Ni(s,ie,me),be?(p.array.next({name:ie,values:da(s)}),(d.isDirty||d.dirtyFields||h.isDirty||h.dirtyFields)&&Ne.shouldDirty&&p.state.next({name:ie,dirtyFields:Zv(i,s),isDirty:V(ie,me)})):De&&!De._f&&!sl(me)?Z(ie,me,Ne):Q(ie,me,Ne),hJ(ie,o)&&p.state.next({...n,name:ie}),p.state.next({name:a.mount?ie:void 0,values:da(s)})},te=async ie=>{a.mount=!0;const ue=ie.target;let Ne=ue.name,De=!0;const be=Zt(r,Ne),me=oe=>{De=Number.isNaN(oe)||Jg(oe)&&isNaN(oe.getTime())||Kf(oe,Zt(s,Ne,oe))},we=dJ(t.mode),Le=dJ(t.reValidateMode);if(be){let oe,St;const Ut=ue.type?uJ(be._f):oxe(ie),Ht=ie.type===N3.BLUR||ie.type===N3.FOCUS_OUT,Rt=!Ast(be._f)&&!t.resolver&&!Zt(n.errors,Ne)&&!be._f.deps||jst(Ht,Zt(n.touchedFields,Ne),n.isSubmitted,Le,we),Ct=hJ(Ne,o,Ht);Ni(s,Ne,Ut),Ht?(!ue||!ue.readOnly)&&(be._f.onBlur&&be._f.onBlur(ie),c&&c(0)):be._f.onChange&&be._f.onChange(ie);const Wt=N(Ne,Ut,Ht),Tn=!nl(Wt)||Ct;if(!Ht&&p.state.next({name:Ne,type:ie.type,values:da(s)}),Rt)return(d.isValid||h.isValid)&&(t.mode==="onBlur"?Ht&&x():Ht||x()),Tn&&p.state.next({name:Ne,...Ct?{}:Wt});if(!Ht&&Ct&&p.state.next({...n}),t.resolver){const{errors:Ie}=await k([Ne]);if(me(Ut),De){const dt=pJ(n.errors,r,Ne),$t=pJ(Ie,r,dt.name||Ne);oe=$t.error,Ne=$t.name,St=nl(Ie)}}else _([Ne],!0),oe=(await gJ(be,o.disabled,s,g,t.shouldUseNativeValidation))[Ne],_([Ne]),me(Ut),De&&(oe?St=!1:(d.isValid||h.isValid)&&(St=await R(r,!0)));De&&(be._f.deps&&(!Array.isArray(be._f.deps)||be._f.deps.length>0)&&se(be._f.deps),A(Ne,St,oe,Wt))}},ne=(ie,ue)=>{if(Zt(n.errors,ue)&&ie.focus)return ie.focus(),1},se=async(ie,ue={})=>{let Ne,De;const be=qw(ie);if(t.resolver){const me=await j(bs(ie)?ie:be);Ne=nl(me),De=ie?!be.some(we=>Zt(me,we)):Ne}else ie?(De=(await Promise.all(be.map(async me=>{const we=Zt(r,me);return await R(we&&we._f?{[me]:we}:we)}))).every(Boolean),!(!De&&!n.isValid)&&x()):De=Ne=await R(r);return p.state.next({...!Vl(ie)||(d.isValid||h.isValid)&&Ne!==n.isValid?{}:{name:ie},...t.resolver||!ie?{isValid:Ne}:{},errors:n.errors}),ue.shouldFocus&&!De&&Ww(r,ne,ie?be:o.mount),De},H=(ie,ue)=>{let Ne={...a.mount?s:i};return ue&&(Ne=fxe(ue.dirtyFields?n.dirtyFields:n.touchedFields,Ne)),bs(ie)?Ne:Vl(ie)?Zt(Ne,ie):ie.map(De=>Zt(Ne,De))},O=(ie,ue)=>({invalid:!!Zt((ue||n).errors,ie),isDirty:!!Zt((ue||n).dirtyFields,ie),error:Zt((ue||n).errors,ie),isValidating:!!Zt(n.validatingFields,ie),isTouched:!!Zt((ue||n).touchedFields,ie)}),L=ie=>{ie&&qw(ie).forEach(ue=>Gs(n.errors,ue)),p.state.next({errors:ie?n.errors:{}})},M=(ie,ue,Ne)=>{const De=(Zt(r,ie,{_f:{}})._f||{}).ref,be=Zt(n.errors,ie)||{},{ref:me,message:we,type:Le,...oe}=be;Ni(n.errors,ie,{...oe,...ue,ref:De}),p.state.next({name:ie,errors:n.errors,isValid:!1}),Ne&&Ne.shouldFocus&&De&&De.focus&&De.focus()},q=(ie,ue)=>pu(ie)?p.state.subscribe({next:Ne=>"values"in Ne&&ie(U(void 0,ue),Ne)}):U(ie,ue,!0),X=ie=>p.state.subscribe({next:ue=>{Nst(ie.name,ue.name,ie.exact)&&kst(ue,ie.formState||d,Se,ie.reRenderRoot)&&ie.callback({values:{...s},...n,...ue,defaultValues:i})}}).unsubscribe,J=ie=>(a.mount=!0,h={...h,...ie.formState},X({...ie,formState:h})),W=(ie,ue={})=>{for(const Ne of ie?qw(ie):o.mount)o.mount.delete(Ne),o.array.delete(Ne),ue.keepValue||(Gs(r,Ne),Gs(s,Ne)),!ue.keepError&&Gs(n.errors,Ne),!ue.keepDirty&&Gs(n.dirtyFields,Ne),!ue.keepTouched&&Gs(n.touchedFields,Ne),!ue.keepIsValidating&&Gs(n.validatingFields,Ne),!t.shouldUnregister&&!ue.keepDefaultValue&&Gs(i,Ne);p.state.next({values:da(s)}),p.state.next({...n,...ue.keepDirty?{isDirty:V()}:{}}),!ue.keepIsValid&&x()},re=({disabled:ie,name:ue})=>{(Pl(ie)&&a.mount||ie||o.disabled.has(ue))&&(ie?o.disabled.add(ue):o.disabled.delete(ue))},ae=(ie,ue={})=>{let Ne=Zt(r,ie);const De=Pl(ue.disabled)||Pl(t.disabled);return Ni(r,ie,{...Ne||{},_f:{...Ne&&Ne._f?Ne._f:{ref:{name:ie}},name:ie,mount:!0,...ue}}),o.mount.add(ie),Ne?re({disabled:Pl(ue.disabled)?ue.disabled:t.disabled,name:ie}):T(ie,!0,ue.value),{...De?{disabled:ue.disabled||t.disabled}:{},...t.progressive?{required:!!ue.required,min:I_(ue.min),max:I_(ue.max),minLength:I_(ue.minLength),maxLength:I_(ue.maxLength),pattern:I_(ue.pattern)}:{},name:ie,onChange:te,onBlur:te,ref:be=>{if(be){ae(ie,ue),Ne=Zt(r,ie);const me=bs(be.value)&&be.querySelectorAll&&be.querySelectorAll("input,select,textarea")[0]||be,we=_st(me),Le=Ne._f.refs||[];if(we?Le.find(oe=>oe===me):me===Ne._f.ref)return;Ni(r,ie,{_f:{...Ne._f,...we?{refs:[...Le.filter(GP),me,...Array.isArray(Zt(i,ie))?[{}]:[]],ref:{type:me.type,name:ie}}:{ref:me}}}),T(ie,!1,void 0,me)}else Ne=Zt(r,ie,{}),Ne._f&&(Ne._f.mount=!1),(t.shouldUnregister||ue.shouldUnregister)&&!(lxe(o.array,ie)&&a.action)&&o.unMount.add(ie)}}},ce=()=>t.shouldFocusError&&Ww(r,ne,o.mount),Te=ie=>{Pl(ie)&&(p.state.next({disabled:ie}),Ww(r,(ue,Ne)=>{const De=Zt(r,Ne);De&&(ue.disabled=De._f.disabled||ie,Array.isArray(De._f.refs)&&De._f.refs.forEach(be=>{be.disabled=De._f.disabled||ie}))},0,!1))},fe=(ie,ue)=>async Ne=>{let De;Ne&&(Ne.preventDefault&&Ne.preventDefault(),Ne.persist&&Ne.persist());let be=da(s);if(p.state.next({isSubmitting:!0}),t.resolver){const{errors:me,values:we}=await k();n.errors=me,be=da(we)}else await R(r);if(o.disabled.size)for(const me of o.disabled)Gs(be,me);if(Gs(n.errors,"root"),nl(n.errors)){p.state.next({errors:{}});try{await ie(be,Ne)}catch(me){De=me}}else ue&&await ue({...n.errors},Ne),ce(),setTimeout(ce);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:nl(n.errors)&&!De,submitCount:n.submitCount+1,errors:n.errors}),De)throw De},xe=(ie,ue={})=>{Zt(r,ie)&&(bs(ue.defaultValue)?K(ie,da(Zt(i,ie))):(K(ie,ue.defaultValue),Ni(i,ie,da(ue.defaultValue))),ue.keepTouched||Gs(n.touchedFields,ie),ue.keepDirty||(Gs(n.dirtyFields,ie),n.isDirty=ue.defaultValue?V(ie,da(Zt(i,ie))):V()),ue.keepError||(Gs(n.errors,ie),d.isValid&&x()),p.state.next({...n}))},ke=(ie,ue={})=>{const Ne=ie?da(ie):i,De=da(Ne),be=nl(ie),me=be?i:De;if(ue.keepDefaultValues||(i=Ne),!ue.keepValues){if(ue.keepDirtyValues){const we=new Set([...o.mount,...Object.keys(Zv(i,s))]);for(const Le of Array.from(we))Zt(n.dirtyFields,Le)?Ni(me,Le,Zt(s,Le)):K(Le,Zt(me,Le))}else{if(p$&&bs(ie))for(const we of o.mount){const Le=Zt(r,we);
902if(Le&&Le._f){const oe=Array.isArray(Le._f.refs)?Le._f.refs[0]:Le._f.ref;if(j3(oe)){const St=oe.closest("form");if(St){St.reset();break}}}}if(ue.keepFieldsRef)for(const we of o.mount)K(we,Zt(me,we));else r={}}s=t.shouldUnregister?ue.keepDefaultValues?da(i):{}:da(me),p.array.next({values:{...me}}),p.state.next({values:{...me}})}o={mount:ue.keepDirtyValues?o.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!d.isValid||!!ue.keepIsValid||!!ue.keepDirtyValues,a.watch=!!t.shouldUnregister,p.state.next({submitCount:ue.keepSubmitCount?n.submitCount:0,isDirty:be?!1:ue.keepDirty?n.isDirty:!!(ue.keepDefaultValues&&!Kf(ie,i)),isSubmitted:ue.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:be?{}:ue.keepDirtyValues?ue.keepDefaultValues&&s?Zv(i,s):n.dirtyFields:ue.keepDefaultValues&&ie?Zv(i,ie):ue.keepDirty?n.dirtyFields:{},touchedFields:ue.keepTouched?n.touchedFields:{},errors:ue.keepErrors?n.errors:{},isSubmitSuccessful:ue.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},Fe=(ie,ue)=>ke(pu(ie)?ie(s):ie,ue),tt=(ie,ue={})=>{const Ne=Zt(r,ie),De=Ne&&Ne._f;if(De){const be=De.refs?De.refs[0]:De.ref;be.focus&&(be.focus(),ue.shouldSelect&&pu(be.select)&&be.select())}},Se=ie=>{n={...n,...ie}},pt={control:{register:ae,unregister:W,getFieldState:O,handleSubmit:fe,setError:M,_subscribe:X,_runSchema:k,_focusError:ce,_getWatch:U,_getDirty:V,_setValid:x,_setFieldArray:w,_setDisabledField:re,_setErrors:E,_getFieldArray:G,_reset:ke,_resetDefaultValues:()=>pu(t.defaultValues)&&t.defaultValues().then(ie=>{Fe(ie,t.resetOptions),p.state.next({isLoading:!1})}),_removeUnmounted:P,_disableForm:Te,_subjects:p,_proxyFormState:d,get _fields(){return r},get _formValues(){return s},get _state(){return a},set _state(ie){a=ie},get _defaultValues(){return i},get _names(){return o},set _names(ie){o=ie},get _formState(){return n},get _options(){return t},set _options(ie){t={...t,...ie}}},subscribe:J,trigger:se,register:ae,handleSubmit:fe,watch:q,setValue:K,getValues:H,reset:Fe,resetField:xe,clearErrors:L,unregister:W,setError:M,setFocus:tt,getFieldState:O};return{...pt,formControl:pt}}function vxe(e={}){const t=Y.useRef(void 0),n=Y.useRef(void 0),[r,i]=Y.useState({isDirty:!1,isValidating:!1,isLoading:pu(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:pu(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!pu(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:a,...o}=Pst(e);t.current={...o,formState:r}}const s=t.current.control;return s._options=e,v$(()=>{const a=s._subscribe({formState:s._proxyFormState,callback:()=>i({...s._formState}),reRenderRoot:!0});return i(o=>({...o,isReady:!0})),s._formState.isReady=!0,a},[s]),Y.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),Y.useEffect(()=>{e.mode&&(s._options.mode=e.mode),e.reValidateMode&&(s._options.reValidateMode=e.reValidateMode)},[s,e.mode,e.reValidateMode]),Y.useEffect(()=>{e.errors&&(s._setErrors(e.errors),s._focusError())},[s,e.errors]),Y.useEffect(()=>{e.shouldUnregister&&s._subjects.state.next({values:s._getWatch()})},[s,e.shouldUnregister]),Y.useEffect(()=>{if(s._proxyFormState.isDirty){const a=s._getDirty();a!==r.isDirty&&s._subjects.state.next({isDirty:a})}},[s,r.isDirty]),Y.useEffect(()=>{e.values&&!Kf(e.values,n.current)?(s._reset(e.values,{keepFieldsRef:!0,...s._options.resetOptions}),n.current=e.values,i(a=>({...a}))):s._resetDefaultValues()},[s,e.values]),Y.useEffect(()=>{s._state.mount||(s._setValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),t.current.formState=uxe(r,s),t.current}function gw(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Ui(){return Ui=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ui.apply(null,arguments)}function xJ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}
vendor: 21,443 bytes, lines 902-909
902function CF(e,t){return CF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},CF(e,t)}function Mst(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,CF(e,t)}var KP={exports:{}},YP,vJ;function Dst(){if(vJ)return YP;vJ=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return YP=e,YP}var XP,yJ;function Fst(){if(yJ)return XP;yJ=1;var e=Dst();function t(){}function n(){}return n.resetWarningCache=t,XP=function(){function r(a,o,c,u,d,h){if(h!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function i(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},XP}var bJ;function Lst(){return bJ||(bJ=1,KP.exports=Fst()()),KP.exports}var zst=Lst();const wt=$c(zst);var QP={exports:{}},vi={};/** @license React v17.0.2 903 * react-is.production.min.js 904 * 905 * Copyright (c) Facebook, Inc. and its affiliates. 906 * 907 * This source code is licensed under the MIT license found in the 908 * LICENSE file in the root directory of this source tree. 909 */var _J;function $st(){if(_J)return vi;_J=1;var e=60103,t=60106,n=60107,r=60108,i=60114,s=60109,a=60110,o=60112,c=60113,u=60120,d=60115,h=60116,p=60121,g=60122,v=60117,x=60129,_=60131;if(typeof Symbol=="function"&&Symbol.for){var w=Symbol.for;e=w("react.element"),t=w("react.portal"),n=w("react.fragment"),r=w("react.strict_mode"),i=w("react.profiler"),s=w("react.provider"),a=w("react.context"),o=w("react.forward_ref"),c=w("react.suspense"),u=w("react.suspense_list"),d=w("react.memo"),h=w("react.lazy"),p=w("react.block"),g=w("react.server.block"),v=w("react.fundamental"),x=w("react.debug_trace_mode"),_=w("react.legacy_hidden")}function S(G){if(typeof G=="object"&&G!==null){var Q=G.$$typeof;switch(Q){case e:switch(G=G.type,G){case n:case i:case r:case c:case u:return G;default:switch(G=G&&G.$$typeof,G){case a:case o:case h:case d:case s:return G;default:return Q}}case t:return Q}}}var E=s,T=e,N=o,A=n,k=h,j=d,R=t,P=i,V=r,U=c;return vi.ContextConsumer=a,vi.ContextProvider=E,vi.Element=T,vi.ForwardRef=N,vi.Fragment=A,vi.Lazy=k,vi.Memo=j,vi.Portal=R,vi.Profiler=P,vi.StrictMode=V,vi.Suspense=U,vi.isAsyncMode=function(){return!1},vi.isConcurrentMode=function(){return!1},vi.isContextConsumer=function(G){return S(G)===a},vi.isContextProvider=function(G){return S(G)===s},vi.isElement=function(G){return typeof G=="object"&&G!==null&&G.$$typeof===e},vi.isForwardRef=function(G){return S(G)===o},vi.isFragment=function(G){return S(G)===n},vi.isLazy=function(G){return S(G)===h},vi.isMemo=function(G){return S(G)===d},vi.isPortal=function(G){return S(G)===t},vi.isProfiler=function(G){return S(G)===i},vi.isStrictMode=function(G){return S(G)===r},vi.isSuspense=function(G){return S(G)===c},vi.isValidElementType=function(G){return typeof G=="string"||typeof G=="function"||G===n||G===i||G===x||G===r||G===c||G===u||G===_||typeof G=="object"&&G!==null&&(G.$$typeof===h||G.$$typeof===d||G.$$typeof===s||G.$$typeof===a||G.$$typeof===o||G.$$typeof===v||G.$$typeof===p||G[0]===g)},vi.typeOf=S,vi}var wJ;function Bst(){return wJ||(wJ=1,QP.exports=$st()),QP.exports}Bst();let SJ=e=>typeof e=="object"&&e!=null&&e.nodeType===1,EJ=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",ZP=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n=getComputedStyle(e,null);return EJ(n.overflowY,t)||EJ(n.overflowX,t)||(r=>{let i=(s=>{if(!s.ownerDocument||!s.ownerDocument.defaultView)return null;try{return s.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!i&&(i.clientHeight<r.scrollHeight||i.clientWidth<r.scrollWidth)})(e)}return!1},bA=(e,t,n,r,i,s,a,o)=>s<e&&a>t||s>e&&a<t?0:s<=e&&o<=n||a>=t&&o>=n?s-e-r:a>t&&o<n||s<e&&o>n?a-t+i:0,Ust=e=>{let t=e.parentElement;return t??(e.getRootNode().host||null)};var Vst=(e,t)=>{var n,r,i,s,a,o;if(typeof document>"u")return[];let{inline:c,boundary:u,skipOverflowHiddenElements:d}=t,h=typeof u=="function"?u:U=>U!==u;if(!SJ(e))throw new TypeError("Invalid target");let p=document.scrollingElement||document.documentElement,g=[],v=e;for(;SJ(v)&&h(v);){if(v=Ust(v),v===p){g.push(v);break}v!=null&&v===document.body&&ZP(v)&&!ZP(document.documentElement)||v!=null&&ZP(v,d)&&g.push(v)}let x=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,_=(s=(i=window.visualViewport)==null?void 0:i.height)!=null?s:innerHeight,w=(a=window.scrollX)!=null?a:pageXOffset,S=(o=window.scrollY)!=null?o:pageYOffset,{height:E,width:T,top:N,right:A,bottom:k,left:j}=e.getBoundingClientRect(),R=N,P=c==="center"?j+T/2:c==="end"?A:j,V=[];for(let U=0;U<g.length;U++){let G=g[U],{height:Q,width:Z,top:K,right:te,bottom:ne,left:se}=G.getBoundingClientRect();if(N>=0&&j>=0&&k<=_&&A<=x&&N>=K&&k<=ne&&j>=se&&A<=te)return V;let H=getComputedStyle(G),O=parseInt(H.borderLeftWidth,10),L=parseInt(H.borderTopWidth,10),M=parseInt(H.borderRightWidth,10),q=parseInt(H.borderBottomWidth,10),X=0,J=0,W="offsetWidth"in G?G.offsetWidth-G.clientWidth-O-M:0,re="offsetHeight"in G?G.offsetHeight-G.clientHeight-L-q:0,ae="offsetWidth"in G?G.offsetWidth===0?0:Z/G.offsetWidth:0,ce="offsetHeight"in G?G.offsetHeight===0?0:Q/G.offsetHeight:0;if(p===G)X=bA(S,S+_,_,L,q,S+R,S+R+E,E),J=c==="start"?P:c==="center"?P-x/2:c==="end"?P-x:bA(w,w+x,x,O,M,w+P,w+P+T,T),X=Math.max(0,X+S),J=Math.max(0,J+w);else{X=bA(K,ne,Q,L,q+re,R,R+E,E),J=c==="start"?P-se-O:c==="center"?P-(se+Z/2)+W/2:c==="end"?P-te+M+W:bA(se,te,Z,O,M+W,P,P+T,T);let{scrollLeft:Te,scrollTop:fe}=G;X=Math.max(0,Math.min(fe+X/ce,G.scrollHeight-Q/ce+re)),J=Math.max(0,Math.min(Te+J/ae,G.scrollWidth-Z/ae+W)),R+=fe-X,P+=Te-J}V.push({el:G,top:X,left:J})}return V},Hst=0;function yxe(){}function qst(e,t){if(e){var n=Vst(e,{boundary:t});n.forEach(function(r){var i=r.el,s=r.top,a=r.left;i.scrollTop=s,i.scrollLeft=a})}}function CJ(e,t,n){var r=e===t||t instanceof n.Node&&e.contains&&e.contains(t);return r}function bxe(e,t){var n;function r(){n&&clearTimeout(n)}function i(){for(var s=arguments.length,a=new Array(s),o=0;o<s;o++)a[o]=arguments[o];r(),n=setTimeout(function(){n=null,e.apply(void 0,a)},t)}return i.cancel=r,i}function jf(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,s=new Array(i>1?i-1:0),a=1;a<i;a++)s[a-1]=arguments[a];return t.some(function(o){return o&&o.apply(void 0,[r].concat(s)),r.preventDownshiftDefault||r.hasOwnProperty("nativeEvent")&&r.nativeEvent.preventDownshiftDefault})}}function _A(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){t.forEach(function(i){typeof i=="function"?i(r):i&&(i.current=r)})}}function Wst(){return String(Hst++)}function Gst(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?n+" result"+(n===1?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":""}function TF(e,t){return Object.keys(e).reduce(function(n,r){return n[r]=_xe(t,r)?t[r]:e[r],n},{})}function _xe(e,t){return e[t]!==void 0}function Kst(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&t.indexOf("Arrow")!==0?"Arrow"+t:t}function wA(e,t,n,r,i){if(i===void 0&&(i=!0),n===0)return-1;var s=n-1;(typeof t!="number"||t<0||t>=n)&&(t=e>0?-1:s+1);var a=t+e;a<0?a=i?s:0:a>s&&(a=i?0:s);var o=yS(e,a,n,r,i);return o===-1?t>=n?-1:t:o}function yS(e,t,n,r,i){var s=r(t);if(!s||!s.hasAttribute("disabled"))return t;if(e>0){for(var a=t+1;a<n;a++)if(!r(a).hasAttribute("disabled"))return a}else for(var o=t-1;o>=0;o--)if(!r(o).hasAttribute("disabled"))return o;return i?e>0?yS(1,0,n,r,!1):yS(-1,n-1,n,r,!1):-1}function TJ(e,t,n,r){return r===void 0&&(r=!0),t.some(function(i){return i&&(CJ(i,e,n)||r&&CJ(i,n.document.activeElement,n))})}var Yst=bxe(function(e){wxe(e).textContent=""},500);function Xst(e,t){var n=wxe(t);e&&(n.textContent=e,Yst(t))}function wxe(e){e===void 0&&(e=document);var t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var Qst=["isInitialMount","highlightedIndex","items","environment"],Sxe={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function Zst(e,t,n){var r=e.props,i=e.type,s={};Object.keys(t).forEach(function(a){Jst(a,e,t,n),n[a]!==t[a]&&(s[a]=n[a])}),r.onStateChange&&Object.keys(s).length&&r.onStateChange(Ui({type:i},s))}function Jst(e,t,n,r){var i=t.props,s=t.type,a="on"+_$(e)+"Change";i[a]&&r[e]!==void 0&&r[e]!==n[e]&&i[a](Ui({type:s},r))}function eat(e,t){return t.changes}function tat(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""}var nat=bxe(function(e,t){Xst(e(),t)},200),rat=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?b.useLayoutEffect:b.useEffect;function iat(e){var t=e.id,n=t===void 0?"downshift-"+Wst():t,r=e.labelId,i=e.menuId,s=e.getItemId,a=e.toggleButtonId,o=e.inputId,c=b.useRef({labelId:r||n+"-label",menuId:i||n+"-menu",getItemId:s||function(u){return n+"-item-"+u},toggleButtonId:a||n+"-toggle-button",inputId:o||n+"-input"});return c.current}function sat(e,t,n,r){var i,s;if(e===void 0){if(t===void 0)throw new Error(r);i=n[t],s=t}else s=t===void 0?n.indexOf(e):t,i=e;return[i,s]}function aat(e){return e?String(e):""}function _$(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function Exe(e){var t=b.useRef(e);return t.current=e,t}function oat(e,t,n){var r=b.useRef(),i=b.useRef(),s=b.useCallback(function(p,g){i.current=g,p=TF(p,g.props);var v=e(p,g),x=g.props.stateReducer(p,Ui({},g,{changes:v}));return x},[e]),a=b.useReducer(s,t),o=a[0],c=a[1],u=Exe(n),d=b.useCallback(function(p){return c(Ui({props:u.current},p))},[u]),h=i.current;return b.useEffect(function(){h&&r.current&&r.current!==o&&Zst(h,TF(r.current,h.props),o),r.current=o},[o,n,h]),[o,d]}var Gw={itemToString:aat,stateReducer:eat,getA11ySelectionMessage:tat,scrollIntoView:qst,environment:typeof window>"u"?{}:window};function Cd(e,t,n){n===void 0&&(n=Sxe);var r=e["default"+_$(t)];return r!==void 0?r:n[t]}function SA(e,t,n){n===void 0&&(n=Sxe);var r=e[t];if(r!==void 0)return r;var i=e["initial"+_$(t)];return i!==void 0?i:Cd(e,t,n)}function lat(e){var t=SA(e,"selectedItem"),n=SA(e,"isOpen"),r=SA(e,"highlightedIndex"),i=SA(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.indexOf(t):r,isOpen:n,selectedItem:t,inputValue:i}}function Kw(e,t,n){var r=e.items,i=e.initialHighlightedIndex,s=e.defaultHighlightedIndex,a=t.selectedItem,o=t.highlightedIndex;return r.length===0?-1:i!==void 0&&o===i?i:s!==void 0?s:a?r.indexOf(a):n===0?-1:n<0?r.length-1:0}function cat(e,t,n,r){var i=b.useRef({isMouseDown:!1,isTouchMove:!1});return b.useEffect(function(){if(n?.addEventListener!=null){var s=function(){i.current.isMouseDown=!0},a=function(h){i.current.isMouseDown=!1,e&&!TJ(h.target,t.map(function(p){return p.current}),n)&&r()},o=function(){i.current.isTouchMove=!1},c=function(){i.current.isTouchMove=!0},u=function(h){e&&!i.current.isTouchMove&&!TJ(h.target,t.map(function(p){return p.current}),n,!1)&&r()};return n.addEventListener("mousedown",s),n.addEventListener("mouseup",a),n.addEventListener("touchstart",o),n.addEventListener("touchmove",c),n.addEventListener("touchend",u),function(){n.removeEventListener("mousedown",s),n.removeEventListener("mouseup",a),n.removeEventListener("touchstart",o),n.removeEventListener("touchmove",c),n.removeEventListener("touchend",u)}}},[e,n]),i}var uat=function(){return yxe};function AJ(e,t,n){var r=n.isInitialMount,i=n.highlightedIndex,s=n.items,a=n.environment,o=gw(n,Qst);b.useEffect(function(){r||nat(function(){return e(Ui({highlightedIndex:i,highlightedItem:s[i],resultCount:s.length},o))},a.document)},t)}function dat(e){var t=e.highlightedIndex,n=e.isOpen,r=e.itemRefs,i=e.getItemNodeFromIndex,s=e.menuElement,a=e.scrollIntoView,o=b.useRef(!0);return rat(function(){t<0||!n||!Object.keys(r.current).length||(o.current===!1?o.current=!0:a(i(t),s))},[t]),o}var fat=yxe;function kJ(e,t,n){var r;n===void 0&&(n=!0);var i=((r=e.items)==null?void 0:r.length)&&t>=0;return Ui({isOpen:!1,highlightedIndex:-1},i&&Ui({selectedItem:e.items[t],isOpen:Cd(e,"isOpen"),highlightedIndex:Cd(e,"highlightedIndex")},n&&{inputValue:e.itemToString(e.items[t])}))}function hat(e,t,n){var r=t.type,i=t.props,s;switch(r){case n.ItemMouseMove:s={highlightedIndex:t.disabled?-1:t.index};break;case n.MenuMouseLeave:s={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:s={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:Kw(i,e,0)};break;case n.FunctionOpenMenu:s={isOpen:!0,highlightedIndex:Kw(i,e,0)};break;case n.FunctionCloseMenu:s={isOpen:!1};break;case n.FunctionSetHighlightedIndex:s={highlightedIndex:t.highlightedIndex};break;case n.FunctionSetInputValue:s={inputValue:t.inputValue};break;case n.FunctionReset:s={highlightedIndex:Cd(i,"highlightedIndex"),isOpen:Cd(i,"isOpen"),selectedItem:Cd(i,"selectedItem"),inputValue:Cd(i,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return Ui({},e,s)}wt.array.isRequired,wt.func,wt.func,wt.func,wt.number,wt.number,wt.number,wt.bool,wt.bool,wt.bool,wt.any,wt.any,wt.any,wt.string,wt.string,wt.string,wt.func,wt.string,wt.func,wt.func,wt.func,wt.func,wt.func,wt.shape({addEventListener:wt.func,removeEventListener:wt.func,document:wt.shape({getElementById:wt.func,activeElement:wt.any,body:wt.any})});function pat(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?"".concat(n," result").concat(n===1?" is":"s are"," available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select."):"":"No results are available.":""}Cc(Cc({},Gw),{getA11yStatusMessage:pat});var w$=0,S$=1,E$=2,C$=3,T$=4,A$=5,k$=6,N$=7,j$=8,I3=9,R$=10,Cxe=11,Txe=12,I$=13,Axe=14,kxe=15,Nxe=16,jxe=17,Rxe=18,O$=19,Ixe=20,Oxe=21,P$=22,Pxe=Object.freeze({__proto__:null,InputKeyDownArrowDown:w$,InputKeyDownArrowUp:S$,InputKeyDownEscape:E$,InputKeyDownHome:C$,InputKeyDownEnd:T$,InputKeyDownPageUp:A$,InputKeyDownPageDown:k$,InputKeyDownEnter:N$,InputChange:j$,InputBlur:I3,InputFocus:R$,MenuMouseLeave:Cxe,ItemMouseMove:Txe,ItemClick:I$,ToggleButtonClick:Axe,FunctionToggleMenu:kxe,FunctionOpenMenu:Nxe,FunctionCloseMenu:jxe,FunctionSetHighlightedIndex:Rxe,FunctionSelectItem:O$,FunctionSetInputValue:Ixe,FunctionReset:Oxe,ControlledPropUpdatedSelectedItem:P$});function mat(e){var t=lat(e),n=t.selectedItem,r=t.inputValue;return r===""&&n&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(r=e.itemToString(n)),Ui({},t,{inputValue:r})}wt.array.isRequired,wt.func,wt.func,wt.func,wt.func,wt.number,wt.number,wt.number,wt.bool,wt.bool,wt.bool,wt.any,wt.any,wt.any,wt.string,wt.string,wt.string,wt.string,wt.string,wt.string,wt.func,wt.string,wt.string,wt.func,wt.func,wt.func,wt.func,wt.func,wt.func,wt.shape({addEventListener:wt.func,removeEventListener:wt.func,document:wt.shape({getElementById:wt.func,activeElement:wt.any,body:wt.any})});function gat(e,t,n){var r=b.useRef(),i=oat(e,t,n),s=i[0],a=i[1];return b.useEffect(function(){_xe(n,"selectedItem")&&(n.selectedItemChanged(r.current,n.selectedItem)&&a({type:P$,inputValue:n.itemToString(n.selectedItem)}),r.current=s.selectedItem===r.current?n.selectedItem:s.selectedItem)},[s.selectedItem,n.selectedItem]),[TF(s,n),a]}var xat=Ui({},Gw,{selectedItemChanged:function(t,n){return t!==n},getA11yStatusMessage:Gst});function vat(e,t){var n,r=t.type,i=t.props,s=t.altKey,a;switch(r){case I$:a={isOpen:Cd(i,"isOpen"),highlightedIndex:Cd(i,"highlightedIndex"),selectedItem:i.items[t.index],inputValue:i.itemToString(i.items[t.index])};break;case w$:e.isOpen?a={highlightedIndex:wA(1,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!0)}:a={highlightedIndex:s&&e.selectedItem==null?-1:Kw(i,e,1,t.getItemNodeFromIndex),isOpen:i.items.length>=0};break;case S$:e.isOpen?s?a=kJ(i,e.highlightedIndex):a={highlightedIndex:wA(-1,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!0)}:a={highlightedIndex:Kw(i,e,-1,t.getItemNodeFromIndex),isOpen:i.items.length>=0};break;case N$:a=kJ(i,e.highlightedIndex);break;case E$:a=Ui({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case A$:a={highlightedIndex:wA(-10,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!1)};break;case k$:a={highlightedIndex:wA(10,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!1)};break;case C$:a={highlightedIndex:yS(1,0,i.items.length,t.getItemNodeFromIndex,!1)};break;case T$:a={highlightedIndex:yS(-1,i.items.length-1,i.items.length,t.getItemNodeFromIndex,!1)};break;case I3:a=Ui({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((n=i.items)==null?void 0:n.length)&&t.selectItem&&{selectedItem:i.items[e.highlightedIndex],inputValue:i.itemToString(i.items[e.highlightedIndex])});break;case j$:a={isOpen:!0,highlightedIndex:Cd(i,"highlightedIndex"),inputValue:t.inputValue};break;case R$:a={isOpen:!0,highlightedIndex:Kw(i,e,0)};break;case O$:a={selectedItem:t.selectedItem,inputValue:i.itemToString(t.selectedItem)};break;case P$:a={inputValue:t.inputValue};break;default:return hat(e,t,Pxe)}return Ui({},e,a)}var yat=["onMouseLeave","refKey","ref"],bat=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],_at=["onClick","onPress","refKey","ref"],wat=["onKeyDown","onChange","onInput","onFocus","onBlur","onChangeText","refKey","ref"];Mxe.stateChangeTypes=Pxe;function Mxe(e){e===void 0&&(e={});var t=Ui({},xat,e),n=t.initialIsOpen,r=t.defaultIsOpen,i=t.items,s=t.scrollIntoView,a=t.environment,o=t.getA11yStatusMessage,c=t.getA11ySelectionMessage,u=t.itemToString,d=mat(t),h=gat(vat,d,t),p=h[0],g=h[1],v=p.isOpen,x=p.highlightedIndex,_=p.selectedItem,w=p.inputValue,S=b.useRef(null),E=b.useRef({}),T=b.useRef(null),N=b.useRef(null),A=b.useRef(!0),k=iat(t),j=b.useRef(),R=Exe({state:p,props:t}),P=b.useCallback(function(W){return E.current[k.getItemId(W)]},[k]);AJ(o,[v,x,w,i],Ui({isInitialMount:A.current,previousResultCount:j.current,items:i,environment:a,itemToString:u},p)),AJ(c,[_],Ui({isInitialMount:A.current,previousResultCount:j.current,items:i,environment:a,itemToString:u},p));var V=dat({menuElement:S.current,highlightedIndex:x,isOpen:v,itemRefs:E,scrollIntoView:s,getItemNodeFromIndex:P});fat({isInitialMount:A.current}),b.useEffect(function(){var W=n||r||v;W&&T.current&&T.current.focus()},[]),b.useEffect(function(){A.current||(j.current=i.length)});var U=cat(v,[T,S,N],a,function(){g({type:I3,selectItem:!1})}),G=uat();b.useEffect(function(){return A.current=!1,function(){A.current=!0}},[]),b.useEffect(function(){var W;if(!v)E.current={};else if(((W=a.document)==null?void 0:W.activeElement)!==T.current){var re;T==null||(re=T.current)==null||re.focus()}},[v,a]);var Q=b.useMemo(function(){return{ArrowDown:function(re){re.preventDefault(),g({type:w$,altKey:re.altKey,getItemNodeFromIndex:P})},ArrowUp:function(re){re.preventDefault(),g({type:S$,altKey:re.altKey,getItemNodeFromIndex:P})},Home:function(re){R.current.state.isOpen&&(re.preventDefault(),g({type:C$,getItemNodeFromIndex:P}))},End:function(re){R.current.state.isOpen&&(re.preventDefault(),g({type:T$,getItemNodeFromIndex:P}))},Escape:function(re){var ae=R.current.state;(ae.isOpen||ae.inputValue||ae.selectedItem||ae.highlightedIndex>-1)&&(re.preventDefault(),g({type:E$}))},Enter:function(re){var ae=R.current.state;!ae.isOpen||re.which===229||(re.preventDefault(),g({type:N$,getItemNodeFromIndex:P}))},PageUp:function(re){R.current.state.isOpen&&(re.preventDefault(),g({type:A$,getItemNodeFromIndex:P}))},PageDown:function(re){R.current.state.isOpen&&(re.preventDefault(),g({type:k$,getItemNodeFromIndex:P}))}}},[g,R,P]),Z=b.useCallback(function(W){return Ui({id:k.labelId,htmlFor:k.inputId},W)},[k]),K=b.useCallback(function(W,re){var ae,ce=W===void 0?{}:W,Te=ce.onMouseLeave,fe=ce.refKey,xe=fe===void 0?"ref":fe,ke=ce.ref,Fe=gw(ce,yat),tt=re===void 0?{}:re;return tt.suppressRefError,Ui((ae={},ae[xe]=_A(ke,function(Se){S.current=Se}),ae.id=k.menuId,ae.role="listbox",ae["aria-labelledby"]=Fe&&Fe["aria-label"]?void 0:""+k.labelId,ae.onMouseLeave=jf(Te,function(){g({type:Cxe})}),ae),Fe)},[g,G,k]),te=b.useCallback(function(W){var re,ae,ce=W===void 0?{}:W,Te=ce.item,fe=ce.index,xe=ce.refKey,ke=xe===void 0?"ref":xe,Fe=ce.ref,tt=ce.onMouseMove,Se=ce.onMouseDown,et=ce.onClick;ce.onPress;var pt=ce.disabled,ie=gw(ce,bat),ue=R.current,Ne=ue.props,De=ue.state,be=sat(Te,fe,Ne.items,"Pass either item or index to getItemProps!"),me=be[1],we="onClick",Le=et,oe=function(){me!==De.highlightedIndex&&(V.current=!1,g({type:Txe,index:me,disabled:pt}))},St=function(){g({type:I$,index:me})},Ut=function(Rt){return Rt.preventDefault()};return Ui((re={},re[ke]=_A(Fe,function(Ht){Ht&&(E.current[k.getItemId(me)]=Ht)}),re.disabled=pt,re.role="option",re["aria-selected"]=""+(me===De.highlightedIndex),re.id=k.getItemId(me),re),!pt&&(ae={}
909,ae[we]=jf(Le,St),ae),{onMouseMove:jf(tt,oe),onMouseDown:jf(Se,Ut)},ie)},[g,R,V,k]),ne=b.useCallback(function(W){var re,ae=W===void 0?{}:W,ce=ae.onClick;ae.onPress;var Te=ae.refKey,fe=Te===void 0?"ref":Te,xe=ae.ref,ke=gw(ae,_at),Fe=R.current.state,tt=function(){g({type:Axe})};return Ui((re={},re[fe]=_A(xe,function(Se){N.current=Se}),re["aria-controls"]=k.menuId,re["aria-expanded"]=Fe.isOpen,re.id=k.toggleButtonId,re.tabIndex=-1,re),!ke.disabled&&Ui({},{onClick:jf(ce,tt)}),ke)},[g,R,k]),se=b.useCallback(function(W,re){var ae,ce=W===void 0?{}:W,Te=ce.onKeyDown,fe=ce.onChange,xe=ce.onInput,ke=ce.onFocus,Fe=ce.onBlur;ce.onChangeText;var tt=ce.refKey,Se=tt===void 0?"ref":tt,et=ce.ref,pt=gw(ce,wat),ie=re===void 0?{}:re;ie.suppressRefError;var ue=R.current.state,Ne=function(Ut){var Ht=Kst(Ut);Ht&&Q[Ht]&&Q[Ht](Ut)},De=function(Ut){g({type:j$,inputValue:Ut.target.value})},be=function(Ut){if(ue.isOpen&&!U.current.isMouseDown){var Ht=Ut.relatedTarget===null&&a.document.activeElement!==a.document.body;g({type:I3,selectItem:!Ht})}},me=function(){ue.isOpen||g({type:R$})},we="onChange",Le={};if(!pt.disabled){var oe;Le=(oe={},oe[we]=jf(fe,xe,De),oe.onKeyDown=jf(Te,Ne),oe.onBlur=jf(Fe,be),oe.onFocus=jf(ke,me),oe)}return Ui((ae={},ae[Se]=_A(et,function(St){T.current=St}),ae["aria-activedescendant"]=ue.isOpen&&ue.highlightedIndex>-1?k.getItemId(ue.highlightedIndex):"",ae["aria-autocomplete"]="list",ae["aria-controls"]=k.menuId,ae["aria-expanded"]=ue.isOpen,ae["aria-labelledby"]=pt&&pt["aria-label"]?void 0:""+k.labelId,ae.autoComplete="off",ae.id=k.inputId,ae.role="combobox",ae.value=ue.inputValue,ae),Le,pt)},[G,R,k,Q,g,U,a]),H=b.useCallback(function(){g({type:kxe})},[g]),O=b.useCallback(function(){g({type:jxe})},[g]),L=b.useCallback(function(){g({type:Nxe})},[g]),M=b.useCallback(function(W){g({type:Rxe,highlightedIndex:W})},[g]),q=b.useCallback(function(W){g({type:O$,selectedItem:W})},[g]),X=b.useCallback(function(W){g({type:Ixe,inputValue:W})},[g]),J=b.useCallback(function(){g({type:Oxe})},[g]);return{getItemProps:te,getLabelProps:Z,getMenuProps:K,getInputProps:se,getToggleButtonProps:ne,toggleMenu:H,openMenu:L,closeMenu:O,setHighlightedIndex:M,setInputValue:X,selectItem:q,reset:J,highlightedIndex:x,isOpen:v,selectedItem:_,inputValue:w}}wt.array,wt.array,wt.array,wt.func,wt.func,wt.func,wt.number,wt.number,wt.number,wt.func,wt.func,wt.string,wt.string,wt.shape({addEventListener:wt.func,removeEventListener:wt.func,document:wt.shape({getElementById:wt.func,activeElement:wt.any,body:wt.any})});Gw.itemToString,Gw.stateReducer,Gw.environment;const NJ=20,Dxe=e=>e.suggestions.length>0?Y.createElement(Sat,{...e}):Y.createElement("input",{className:Nt.textInput,size:40,autoFocus:!0,...e.register(e.inputName)}),Sat=({autofocus:e,suggestions:t,control:n,inputName:r,placeholder:i,initialInputValue:s,setValue:a})=>{const[o,c]=Y.useState(t.slice(0,NJ)),u=Kl(tf),d=t.length>0,{isOpen:h,getToggleButtonProps:p,getMenuProps:g,getInputProps:v,highlightedIndex:x,getItemProps:_,selectedItem:w}=Mxe({initialInputValue:s,onInputValueChange({inputValue:E=""}){a(r,E),E=E.toLowerCase()||"";const T=[];for(const N of t)if(N.toLowerCase().includes(E)&&(T.push(N),T.length>=NJ))break;c(T)},items:o,itemToString(E){return E??""}}),S=h&&o.length>0;return Y.createElement("div",{className:Nt.downshiftAutocompleteContainer},Y.createElement("div",{"data-visible-dropdown":S,className:Nt.downshiftInputWrapper},Y.createElement(yst,{name:r,control:n,render:({field:E})=>{const T=v();return Y.createElement("input",{...T,name:E.name,placeholder:i,className:Nt.downshiftInput,size:30,"data-editor-dialog":!0,autoFocus:e})}}),d&&Y.createElement("button",{"aria-label":"toggle menu",type:"button",...p()},u("arrow_drop_down"))),Y.createElement("div",{className:Nt.downshiftAutocompleteContainer},Y.createElement("ul",{...g(),"data-visible":S},o.map((E,T)=>Y.createElement("li",{"data-selected":w===E,"data-highlighted":x===T,key:`${E}${T}`,..._({item:E,index:T})},E)))))},Eat=()=>{const[e,t,n,r,i]=Hc(AF,p0,yx,Kp,bS),s=ol($xe),a=ol(Lxe),o=Ju(),{register:c,handleSubmit:u,control:d,setValue:h,reset:p}=vxe({values:t.type==="editing"?t.initialValues:{}}),g=()=>{p({src:"",title:"",altText:"",width:void 0,height:void 0})};return t.type==="inactive"?null:Y.createElement(ui,{open:!0,onOpenChange:v=>{v||(a(),g())}},Y.createElement(d5,{container:n?.current},Y.createElement(f5,{className:Nt.dialogOverlay}),Y.createElement(h5,{className:Nt.dialogContent,onOpenAutoFocus:v=>{v.preventDefault()}},Y.createElement(T7,null,o("uploadImage.dialogTitle","Upload an image")),Y.createElement("form",{onSubmit:async v=>{v.preventDefault(),v.stopPropagation(),await u(s)(v),g()},className:Nt.multiFieldForm},r===null?Y.createElement("input",{type:"hidden",accept:"image/*",...c("file")}):Y.createElement("div",{className:Nt.formField}
909,Y.createElement("label",{htmlFor:"file"},o("uploadImage.uploadInstructions","Upload an image from your device:")),Y.createElement("input",{type:"file",accept:"image/*",...c("file")})),Y.createElement("div",{className:Nt.formField},Y.createElement("label",{htmlFor:"src"},r!==null?o("uploadImage.addViaUrlInstructions","Or add an image from an URL:"):o("uploadImage.addViaUrlInstructionsNoUpload","Add an image from an URL:")),Y.createElement(Dxe,{register:c,initialInputValue:t.type==="editing"?t.initialValues.src??"":"",inputName:"src",suggestions:e,setValue:h,control:d,placeholder:o("uploadImage.autoCompletePlaceholder","Select or paste an image src")})),Y.createElement("div",{className:Nt.formField},Y.createElement("label",{htmlFor:"alt"},o("uploadImage.alt","Alt:")),Y.createElement("input",{type:"text",...c("altText"),className:Nt.textInput})),Y.createElement("div",{className:Nt.formField},Y.createElement("label",{htmlFor:"title"},o("uploadImage.title","Title:")),Y.createElement("input",{type:"text",...c("title"),className:Nt.textInput})),i&&Y.createElement("div",{className:Nt.imageDimensionsContainer},Y.createElement("div",{className:Nt.formField},Y.createElement("label",{htmlFor:"width"},o("uploadImage.width","Width:")),Y.createElement("input",{type:"number",min:0,...c("width"),className:Nt.textInput})),Y.createElement("div",{className:Nt.formField},Y.createElement("label",{htmlFor:"height"},o("uploadImage.height","Height:")),Y.createElement("input",{type:"number",min:0,...c("height"),className:Nt.textInput}))),Y.createElement("div",{style:{display:"flex",justifyContent:"flex-end",gap:"var(--spacing-2)"}},Y.createElement("button",{type:"submit",title:o("dialogControls.save","Save"),"aria-label":o("dialogControls.save","Save"),className:Xr(Nt.primaryButton)},o("dialogControls.save","Save")),Y.createElement(Fm,{asChild:!0},Y.createElement("button",{type:"reset",title:o("dialogControls.cancel","Cancel"),"aria-label":o("dialogControls.cancel","Cancel"),className:Xr(Nt.secondaryButton)},o("dialogControls.cancel","Cancel"))))))))};function JP(e,t,n){return Math.min(Math.max(e,t),n)}const Ei={east:1,north:8,south:2,west:4};function Cat({onResizeStart:e,onResizeEnd:t,imageRef:n,maxWidth:r,editor:i}){const s=b.useRef(null),a=b.useRef({priority:"",value:"default"}),o=b.useRef({currentHeight:0,currentWidth:0,direction:0,isResizing:!1,ratio:0,startHeight:0,startWidth:0,startX:0,startY:0}),c=i.getRootElement(),u=r||(c!==null?c.getBoundingClientRect().width-20:100),d=c!==null?c.getBoundingClientRect().height-20:100,h=100,p=100,g=S=>{const E=S===Ei.east||S===Ei.west,T=S===Ei.north||S===Ei.south,N=S&Ei.north&&S&Ei.west||S&Ei.south&&S&Ei.east,A=E?"ew":T?"ns":N?"nwse":"nesw";c!==null&&c.style.setProperty("cursor",`${A}-resize`,"important"),document.body!==null&&(document.body.style.setProperty("cursor",`${A}-resize`,"important"),a.current.value=document.body.style.getPropertyValue("-webkit-user-select"),a.current.priority=document.body.style.getPropertyPriority("-webkit-user-select"),document.body.style.setProperty("-webkit-user-select","none","important"))},v=()=>{c!==null&&c.style.setProperty("cursor","text"),document.body!==null&&(document.body.style.setProperty("cursor","default"),document.body.style.setProperty("-webkit-user-select",a.current.value,a.current.priority))},x=(S,E)=>{if(!i.isEditable())return;const T=n.current,N=s.current;if(T!==null&&N!==null){S.preventDefault();const{width:A,height:k}=T.getBoundingClientRect(),j=o.current;j.startWidth=A,j.startHeight=k,j.ratio=A/k,j.currentWidth=A,j.currentHeight=k,j.startX=S.clientX,j.startY=S.clientY,j.isResizing=!0,j.direction=E,g(E),e(),N.classList.add(Nt.imageControlWrapperResizing),T.style.height=`${k}px`,T.style.width=`${A}px`,document.addEventListener("pointermove",_),document.addEventListener("pointerup",w)}},_=S=>{const E=n.current,T=o.current,N=T.direction&(Ei.east|Ei.west),A=T.direction&(Ei.south|Ei.north);if(E!==null&&T.isResizing)if(N&&A){let k=Math.floor(T.startX-S.clientX);k=T.direction&Ei.east?-k:k;const j=JP(T.startWidth+k,h,u),R=j/T.ratio;E.style.width=`${j}px`,E.style.height=`${R}px`,T.currentHeight=R,T.currentWidth=j}else if(A){let k=Math.floor(T.startY-S.clientY);k=T.direction&Ei.south?-k:k;const j=JP(T.startHeight+k,p,d);E.style.height=`${j}px`,T.currentHeight=j}else{let k=Math.floor(T.startX-S.clientX);k=T.direction&Ei.east?-k:k;const j=JP(T.startWidth+k,h,u);E.style.width=`${j}px`,T.currentWidth=j}},w=()=>{const S=n.current,E=o.current,T=s.current;if(S!==null&&T!==null&&E.isResizing){const N=E.currentWidth,A=E.currentHeight;E.startWidth=0,E.startHeight=0,E.ratio=0,E.startX=0,E.startY=0,E.currentWidth=0,E.currentHeight=0,E.isResizing=!1,T.classList.remove(Nt.imageControlWrapperResizing),v(),t(N,A),document.removeEventListener("pointermove",_),document.removeEventListener("pointerup",w)}};return b.createElement("div",{ref:s},b.createElement("div",{className:Xr(Nt.imageResizer,Nt.imageResizerN),onPointerDown:S=>{x(S,Ei.north)}}),b.createElement("div",{className:Xr(Nt.imageResizer,Nt.imageResizerNe),onPointerDown:S=>{x(S,Ei.north|Ei.east)}}),b.createElement("div",{className:Xr(Nt.imageResizer,Nt.imageResizerE),onPointerDown:S=>{x(S,Ei.east)}}),b.createElement("div",{className:Xr(Nt.imageResizer,Nt.imageResizerSe),onPointerDown:S=>{x(S,Ei.south|Ei.east)}}),b.createElement("div",{className:Xr(Nt.imageResizer,Nt.imageResizerS
909),onPointerDown:S=>{x(S,Ei.south)}}),b.createElement("div",{className:Xr(Nt.imageResizer,Nt.imageResizerSw),onPointerDown:S=>{x(S,Ei.south|Ei.west)}}),b.createElement("div",{className:Xr(Nt.imageResizer,Nt.imageResizerW),onPointerDown:S=>{x(S,Ei.west)}}),b.createElement("div",{className:Xr(Nt.imageResizer,Nt.imageResizerNw),onPointerDown:S=>{x(S,Ei.north|Ei.west)}}))}const Tat="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(` 910 <svg id="imgLoadError" xmlns="http://www.w3.org/2000/svg" width="100" height="100"> 911 <rect x="0" y="0" width="100" height="100" fill="none" stroke="red" stroke-width="4" stroke-dasharray="4" /> 912 <text x="50" y="55" text-anchor="middle" font-size="20" fill="red">â ï¸</text> 913 </svg> 914`),Aat={__cache:{},read(e){if(this.__cache[e]||(this.__cache[e]=new Promise(t=>{const n=new Image;n.onerror=()=>{this.__cache[e]=Tat,t()},n.onload=()=>{this.__cache[e]=e,t()},n.src=e})),this.__cache[e]instanceof Promise)throw this.__cache[e];return this.__cache[e]}};function kat({title:e,alt:t,className:n,imageRef:r,src:i,width:s,height:a}){return Y.createElement("img",{className:n??void 0,alt:t,src:Aat.read(i),title:e,ref:r,draggable:"false",width:s,height:a})}function Nat({src:e,title:t,alt:n,nodeKey:r,width:i,height:s,rest:a}){const[o,c,u,d,h,p]=Hc(jF,kF,bS,NF,Uu,RF),g=Y.useRef(null),v=Y.useRef(null),[x,_,w]=x0e(r),[S]=So(),[E,T]=Y.useState(null),N=Y.useRef(null),[A,k]=Y.useState(!1),[j,R]=Y.useState(null),[P,V]=Y.useState(null),U=Y.useCallback(H=>{if(x&&ss(Pt())){H.preventDefault();const L=Zi(r);O3(L)&&L.remove()}return!1},[x,r]),G=Y.useCallback(H=>{const O=Pt(),L=v.current;return x&&ss(O)&&O.getNodes().length===1&&L!==null&&L!==document.activeElement?(H.preventDefault(),L.focus(),!0):!1},[x]),Q=Y.useCallback(H=>v.current===H.target?(As(null),S.update(()=>{_(!0);const O=S.getRootElement();O!==null&&O.focus()}),!0):!1,[S,_]);Y.useEffect(()=>{d?(async()=>{P||V(e);const O=await d(e);R(O)})().catch(O=>{console.error(O)}):R(e)},[e,d,P]),Y.useEffect(()=>{if(u&&g.current){const{current:H}=g;jJ(H,"width",i),jJ(H,"height",s)}},[u,i,s]),Y.useEffect(()=>{let H=!0;const O=bl(S.registerUpdateListener(({editorState:L})=>{H&&T(L.read(()=>Pt()))}),S.registerCommand(F5,(L,M)=>(N.current=M,!1),Pi),S.registerCommand(L5,L=>{const M=L;return A?!0:M.target===g.current?(M.shiftKey?_(!x):(w(),_(!0)),!0):!1},Pi),S.registerCommand($5,L=>L.target===g.current?(L.preventDefault(),!0):!1,Pi),S.registerCommand(pz,U,Pi),S.registerCommand(hz,U,Pi),S.registerCommand(my,G,Pi),S.registerCommand(jE,Q,Pi));return()=>{H=!1,O()}},[w,S,A,x,r,U,G,Q,_]);const Z=(H,O)=>{setTimeout(()=>{k(!1)},200),S.update(()=>{const L=Zi(r);O3(L)&&L.setWidthAndHeight(H,O)})},K=()=>{k(!0)},te=ss(E),ne=x,se=Y.useMemo(()=>{if(a.length===0)return null;const H=a.find(O=>O.type==="mdxJsxAttribute"&&(O.name==="class"||O.name==="className"));return H?H.value:null},[a]);return j!==null?Y.createElement(Y.Suspense,{fallback:o?Y.createElement(o,null):null},Y.createElement("div",{className:Nt.imageWrapper,"data-editor-block-type":"image"},Y.createElement("div",{draggable:te},Y.createElement(kat,{width:i,height:s,className:Xr({[Nt.focusedImage]:ne},se),src:j,title:t??"",alt:n??"",imageRef:g})),te&&ne&&!c&&Y.createElement(Cat,{editor:S,imageRef:g,onResizeStart:K,onResizeEnd:Z}),h||Y.createElement(p,{nodeKey:r,imageSource:j,initialImagePath:P,title:t??"",alt:n??"",width:i,height:s}))):null}const jJ=(e,t,n)=>{typeof n=="number"?e.style[t]=`${n}px`:e.style.removeProperty(t)};
914var jat=Object.defineProperty,Rat=(e,t,n)=>t in e?jat(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Nv=(e,t,n)=>(Rat(e,typeof t!="symbol"?t+"":t,n),n);function Iat(e){if(e instanceof HTMLImageElement){const{alt:t,src:n,title:r,width:i,height:s}=e;return{node:wx({altText:t,src:n,title:r,width:i,height:s})}}return null}class WE extends xx{constructor(t,n,r,i,s,a,o){super(o),Nv(this,"__src"),Nv(this,"__altText"),Nv(this,"__title"),Nv(this,"__width"),Nv(this,"__height"),Nv(this,"__rest"),this.__src=t,this.__title=r,this.__altText=n,this.__width=i||"inherit",this.__height=s||"inherit",this.__rest=a??[]}static getType(){return"image"}static clone(t){return new WE(t.__src,t.__altText,t.__title,t.__width,t.__height,t.__rest,t.__key)}static importJSON(t){const{altText:n,title:r,src:i,width:s,rest:a,height:o}=t;return wx({altText:n,title:r,src:i,height:o,width:s,rest:a})}exportDOM(){const t=document.createElement("img");return t.setAttribute("src",this.__src),t.setAttribute("alt",this.__altText),this.__title&&t.setAttribute("title",this.__title),this.__width&&t.setAttribute("width",this.__width.toString()),this.__height&&t.setAttribute("height",this.__height.toString()),{element:t}}static importDOM(){return{img:()=>({conversion:Iat,priority:0})}}exportJSON(){return{altText:this.getAltText(),title:this.getTitle(),height:this.__height==="inherit"?0:this.__height,width:this.__width==="inherit"?0:this.__width,src:this.getSrc(),rest:this.__rest,type:"image",version:1}}setWidthAndHeight(t,n){const r=this.getWritable();r.__width=t,r.__height=n}createDOM(t){const n=document.createElement("span"),i=t.theme.image;return i!==void 0&&(n.className=i),n}updateDOM(){return!1}getSrc(){return this.__src}getAltText(){return this.__altText}getTitle(){return this.__title}getHeight(){return this.__height}getWidth(){return this.__width}getRest(){return this.__rest}setTitle(t){this.getWritable().__title=t}setSrc(t){this.getWritable().__src=t}setAltText(t){this.getWritable().__altText=t??""}shouldBeSerializedAsElement(){return this.__width!=="inherit"||this.__height!=="inherit"||this.__rest.length>0}decorate(t){return Y.createElement(Nat,{src:this.getSrc(),title:this.getTitle(),nodeKey:this.getKey(),width:this.__width,height:this.__height,alt:this.__altText,rest:this.__rest})}}function wx(e){const{altText:t,title:n,src:r,key:i,width:s,height:a,rest:o}=e;return new WE(r,t,n,s,a,o,i)}function O3(e){return e instanceof WE}const Oat={testLexicalNode:O3,visitLexicalNode({mdastParent:e,lexicalNode:t,actions:n}){if(t.shouldBeSerializedAsElement()){const r=new Image;t.getHeight()!=="inherit"&&(r.height=t.getHeight()),t.getWidth()!=="inherit"&&(r.width=t.getWidth()),t.getAltText()&&(r.alt=t.getAltText()),t.getTitle()&&(r.title=t.getTitle());for(const i of t.getRest())i.type==="mdxJsxAttribute"&&typeof i.value=="string"&&r.setAttribute(i.name,i.value);n.appendToParent(e,{type:"html",value:r.outerHTML.replace(/>$/,` src="${t.getSrc()}" />`)})}else n.appendToParent(e,{type:"image",url:t.getSrc(),alt:t.getAltText(),title:t.getTitle()})}},Pat={testNode:"image",visitNode({mdastNode:e,actions:t}){t.addAndStepInto(wx({src:e.url,altText:e.alt??"",title:e.title??""}))}},Mat={testNode:e=>e.type==="html"&&e.value.trim().startsWith("<img"),visitNode({mdastNode:e,lexicalParent:t}){const n=document.createElement("div");n.innerHTML=e.value;const r=n.querySelector("img");if(!r)throw new Error("Invalid HTML image");const i=r.src,s=r.alt,a=r.title,o=r.width,c=r.height,u=wx({src:i||"",altText:s,title:a,width:o,height:c});if(t.getType()==="root"){const d=Ur();d.append(u),t.append(d)}else t.append(u)}};function O_(e,t){const n=e.attributes.find(r=>r.type==="mdxJsxAttribute"&&r.name===t);if(n)return n.value}const Dat={testNode:e=>(e.type==="mdxJsxTextElement"||e.type==="mdxJsxFlowElement")&&e.name==="img",visitNode({mdastNode:e,lexicalParent:t}){const n=O_(e,"src");if(!n)return;const r=O_(e,"alt")??"",i=O_(e,"title"),s=O_(e,"height"),a=O_(e,"width"),o=e.attributes.filter(u=>u.type==="mdxJsxAttribute"&&!["src","alt","title","height","width"].includes(u.name)),c=wx({src:n,altText:r,title:i,width:a?parseInt(a,10):void 0,height:s?parseInt(s,10):void 0,rest:o});if(t.getType()==="root"){const u=Ur();u.append(c),t.append(u)}else t.append(c)}}
914,M$=aa(e=>{e.sub(e.pipe(M$,us(na)),([t,n])=>{n?.update(()=>{const r=wx({altText:t.altText??"",src:t.src,title:t.title??"",width:by(t.width),height:by(t.height)});Ky([r]),ea(r.getParentOrThrow())&&Bz(r,Ur).selectEnd()})})}),Fat=aa(e=>{e.sub(e.pipe(Fat,us(Kp)),([t,n])=>{const r=i=>{e.pub(M$,{...t,src:i})};"file"in t?n?.(t.file).then(r).catch(i=>{throw i}):r(t.src)})}),AF=xn([]),kF=xn(!1),Kp=xn(null),NF=xn(null),jF=xn(null),p0=xn({type:"inactive"},e=>{e.sub(e.pipe($xe,us(na,Kp,p0,bS)),([t,n,r,i,s])=>{const a=i.type==="editing"?o=>{n?.update(()=>{const{nodeKey:c}=i,u=Zi(c);if(u.setTitle(t.title),u.setAltText(t.altText),u.setSrc(o),s){const d=by(t.width),h=by(t.height);u.setWidthAndHeight(d??"inherit",h??"inherit")}}),e.pub(p0,{type:"inactive"})}:o=>{e.pub(M$,{...t,src:o}),e.pub(p0,{type:"inactive"})};t.file&&t.file.length>0?r?.(t.file.item(0)).then(a).catch(o=>{throw o}):t.src&&a(t.src)}),e.pub(gS,t=>{const n=e.getValue(Kp);return bl(t.registerCommand(P3,r=>{const i=wx(r);return Ky([i]),ea(i.getParentOrThrow())&&Bz(i,Ur).selectEnd(),!0},ur),t.registerCommand($5,r=>Uat(r),z8),t.registerCommand(gz,r=>Vat(r,!!n),Pi),t.registerCommand(mz,r=>Hat(r,t,e.getValue(Kp)),z8),t.registerCommand(NE,r=>{var i,s;if(!n){let u=Array.from(((i=r.clipboardData)==null?void 0:i.items)??[]);return u=u.filter(d=>d.type.includes("text")),!u.length||u.length===0}const a=Array.from(((s=r.clipboardData)==null?void 0:s.items)??[]);if(a.some(u=>!u.type.includes("image"))||!a.length||a.length===0)return!1;const c=e.getValue(Kp);return Promise.all(a.map(u=>c(u.getAsFile()))).then(u=>{u.forEach(d=>{t.dispatchCommand(P3,{src:d,altText:""})})}).catch(u=>{throw u}),!0},kh))})}),Lat=Vm(e=>{e.link(e.pipe(Lat,ppe({type:"new"})),p0)}),Fxe=aa(e=>{e.link(e.pipe(Fxe,c0(t=>({type:"editing",...t}))),p0)}),Lxe=Vm(e=>{e.link(e.pipe(Lxe,ppe({type:"inactive"})),p0)}),zxe=xn(!1),bS=xn(!1),$xe=aa(),RF=xn(wF),by=e=>{if(typeof e>"u")return;const t=parseInt(String(e),10);return Number.isNaN(t)?void 0:t},zat=Qu({init(e,t){e.pubIn({[Rh]:[Pat,Mat,Dat],[Gm]:WE,[Km]:Oat,[bx]:t?.ImageDialog??Eat,[Kp]:t?.imageUploadHandler??null,[AF]:t?.imageAutocompleteSuggestions??[],[kF]:!!t?.disableImageResize,[zxe]:!!t?.disableImageSettingsButton,[bS]:!!t?.allowSetImageDimensions,[NF]:t?.imagePreviewHandler??null,[RF]:t?.EditImageToolbar??wF,[jF]:t?.imagePlaceholder??sJ})},update(e,t){e.pubIn({[Kp]:t?.imageUploadHandler??null,[AF]:t?.imageAutocompleteSuggestions??[],[kF]:!!t?.disableImageResize,[NF]:t?.imagePreviewHandler??null,[bS]:!!t?.allowSetImageDimensions,[RF]:t?.EditImageToolbar??wF,[jF]:t?.imagePlaceholder??sJ})}}),$at=e=>p0e?(e??window).getSelection():null,P3=Nn("INSERT_IMAGE_COMMAND"),Bat="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";function Uat(e){const t=D$();if(!t)return!1;const n=e.dataTransfer;if(!n)return!1;n.setData("text/plain","_");const r=document.createElement("img");return r.src=Bat,n.setDragImage(r,0,0),n.setData("application/x-lexical-drag",JSON.stringify({data:{altText:t.__altText,title:t.__title,key:t.getKey(),src:t.__src},type:"image"})),!0}function Vat(e,t){var n;if(t){let i=Array.from(((n=e.dataTransfer)==null?void 0:n.items)??[]);if(i=i.filter(s=>s.type.includes("image")),i.length>0)return e.preventDefault(),!0}return D$()?(Bxe(e)||e.preventDefault(),!0):!1}function Hat(e,t,n){var r;let i=Array.from(((r=e.dataTransfer)==null?void 0:r.items)??[]);if(i=i.filter(o=>o.type.includes("image")),i.length>0&&n!==null)return e.preventDefault(),Promise.all(i.map(o=>o.kind==="string"?new Promise(c=>{o.getAsString(c)}):n(o.getAsFile()))).then(o=>{o.forEach(c=>{t.dispatchCommand(P3,{src:c,altText:""})})}).catch(o=>{throw o}),!0;const s=D$();if(!s)return!1;const a=qat(e);if(!a)return!1;if(e.preventDefault(),Bxe(e)){const o=Wat(e);s.remove();const c=Gy();o!=null&&c.applyDOMRange(o),As(c),t.dispatchCommand(P3,a)}return!0}function D$(){const e=Pt();if(!ss(e))return null;const n=e.getNodes()[0];return O3(n)?n:null}function qat(e){var t;const n=(t=e.dataTransfer)==null?void 0:t.getData("application/x-lexical-drag");if(!n)return null;const{type:r,data:i}=JSON.parse(n);return r!=="image"?null:i}function Bxe(e){const t=e.target;return!!(t&&t instanceof HTMLElement&&t.parentElement)}function Wat(e){let t;const n=e.target,r=n==null?null:n.nodeType===9?n.defaultView:n.ownerDocument.defaultView,i=$at(r);if(document.caretRangeFromPoint)t=document.caretRangeFromPoint(e.clientX,e.clientY);
914else if(e.rangeParent&&i!==null)i.collapse(e.rangeParent,e.rangeOffset??0),t=i.getRangeAt(0);else throw Error("Cannot get the selection when dragging");return t}function Uxe(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const Gat={testNode:"blockquote",visitNode({actions:e}){e.addAndStepInto(LE())}},Kat={testLexicalNode:X8,visitLexicalNode:({lexicalNode:e,mdastParent:t,actions:n})=>{const r={type:"paragraph",children:[]};n.appendToParent(t,{type:"blockquote",children:[r]}),n.visitChildren(e,r)}},Yat=Qu({init(e){e.pubIn({[VE]:"quote",[Rh]:Gat,[Gm]:r4,[Km]:Kat})}});function Xat(){let e=cm;return{publish:()=>{e()},subscribe:t=>{e=t}}}var Qat=Object.defineProperty,Zat=(e,t,n)=>t in e?Qat(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Tp=(e,t,n)=>(Zat(e,typeof t!="symbol"?t+"":t,n),n);class m4 extends xx{constructor(t,n,r,i){super(i),Tp(this,"__code"),Tp(this,"__meta"),Tp(this,"__language"),Tp(this,"__focusEmitter",Xat()),Tp(this,"setCode",s=>{s!==this.__code&&(this.getWritable().__code=s)}),Tp(this,"setMeta",s=>{s!==this.__meta&&(this.getWritable().__meta=s)}),Tp(this,"setLanguage",s=>{s!==this.__language&&(this.getWritable().__language=s)}),Tp(this,"select",()=>{this.__focusEmitter.publish()}),this.__code=t,this.__meta=r,this.__language=n}static getType(){return"codeblock"}static clone(t){return new m4(t.__code,t.__language,t.__meta,t.__key)}static importJSON(t){const{code:n,meta:r,language:i}=t;return g4({code:n,language:i,meta:r})}static importDOM(){return{pre:()=>({conversion:not,priority:3})}}exportJSON(){return{code:this.getCode(),language:this.getLanguage(),meta:this.getMeta(),type:"codeblock",version:1}}createDOM(t){return document.createElement("div")}updateDOM(){return!1}getCode(){return this.__code}getMeta(){return this.__meta}getLanguage(){return this.__language}decorate(t){return Y.createElement(tot,{parentEditor:t,code:this.getCode(),meta:this.getMeta(),language:this.getLanguage(),codeBlockNode:this,nodeKey:this.getKey(),focusEmitter:this.__focusEmitter})}isInline(){return!1}}const Jat=Y.createContext(null),eot=({parentEditor:e,lexicalNode:t,children:n})=>{const r=Y.useMemo(()=>({lexicalNode:t,parentEditor:e,setCode:i=>{e.update(()=>{t.setCode(i),setTimeout(()=>{e.dispatchCommand(pS,void 0)},0)})},setLanguage:i=>{e.update(()=>{t.setLanguage(i)})},setMeta:i=>{e.update(()=>{t.setMeta(i)})}}),[t,e]);return Y.createElement(Jat.Provider,{value:r},n)},tot=e=>{const t=Kl(d4),n=Kl(Vxe);let r=t.sort((c,u)=>u.priority-c.priority).find(c=>c.match(e.language||"",e.meta||""));if(r||(r=t.find(c=>c.match(n||"",e.meta||""))),!r)throw new Error(`No CodeBlockEditor registered for language=${e.language} meta=${e.meta}`);const i=r.Editor,{codeBlockNode:s,parentEditor:a,...o}=e;return Y.createElement(eot,{parentEditor:e.parentEditor,lexicalNode:e.codeBlockNode},Y.createElement(i,{...o}))};function g4(e){const{code:t="",language:n="",meta:r=""}=e;return new m4(t,n,r)}function not(e){const t=e,n=t.textContent??"",r=e.getAttribute("class")??"",i=e.getAttribute("data-language")??"",s=r.match(/language-(\w+)/),a=s?s[1]:i,o=t.getAttribute("data-meta")??"";return{node:g4({code:n,language:a,meta:o})}}const Vxe=xn(""),rot=aa(e=>{e.link(e.pipe(rot,us(Vxe),c0(([t,n])=>()=>g4({language:n,...t}))),r$)});qo(d4);const F$=Y.forwardRef(({title:e,children:t},n)=>{const r=Kl(yx);return Y.createElement(r7,{delayDuration:100},Y.createElement(i7,null,Y.createElement(s7,{ref:n,asChild:!0},Y.createElement("span",{className:Nt.tooltipTrigger},t)),Y.createElement(a7,{container:r?.current},Y.createElement(o7,{className:Xr(Nt.tooltipContent),sideOffset:10},e))))}),iot=Y.forwardRef(({children:e,className:t,...n},r)=>Y.createElement(Wle,{...n,ref:r,className:Xr(t,Nt.selectItem)},Y.createElement(Gle,null,e))),sot=({title:e,placeholder:t,className:n})=>{const[r,i]=Hc(Uu,tf);return Y.createElement(F$,{title:e},Y.createElement(Ble,{"aria-label":t,className:Xr(Nt.selectTrigger,n),"data-toolbar-item":!0,disabled:r},Y.createElement(R2,{placeholder:t}),Y.createElement(Ule,{className:Nt.selectDropdownArrow},i("arrow_drop_down"))))},aot=({children:e,className:t=Nt.selectContainer})=>{const n=Kl(yx);return Y.createElement(Vle,{container:n?.current},Y.createElement(Hle,{className:Xr(t,"mdxeditor-select-content"),onCloseAutoFocus:r=>{r.preventDefault()},position:"popper"},Y.createElement(qle,{"data-editor-dropdown":!0},e)))},oot=e=>Y.createElement($le,{value:e.value||"",onValueChange:e.onChange,disabled:e.disabled},Y.createElement(sot,{title:e.triggerTitle,placeholder:e.placeholder}),Y.createElement(aot,null,e.items.map((t,n)=>t==="separator"?Y.createElement(r6e,{key:n}):Y.createElement(iot,{key:n,value:t.value},t.label))));function lot(e){try{const t=e.anchor,n=e.focus,r=e.anchor.getNode(),i=e.focus.getNode();return r===i?r:e.isBackward()?CQ(n)?r:i:CQ(t)?r:i}catch{return null}}function Hxe(e){const t=Pt(),n=window.getSelection(),r=document.activeElement,i=e.getRootElement();if(t!==null&&n!==null&&i!==null&&i.contains(n.anchorNode)&&e.isEditable()){const s=n.getRangeAt(0);let a;if(n.isCollapsed){let o=n.anchorNode;o?.nodeType==3&&(o=o.parentNode),a=o.getBoundingClientRect(),a.width=0}else if(n.anchorNode===i){let o=i;for(;o.firstElementChild!=null;)o=o.firstElementChild;a=o.getBoundingClientRect()}else a=s.getBoundingClientRect();
914return{top:Math.round(a.top),left:Math.round(a.left),width:Math.round(a.width),height:Math.round(a.height)}}else if(!r||r.className!=="link-input")return null;return null}function cot({url:e,title:t,onSubmit:n,onCancel:r,linkAutocompleteSuggestions:i}){const{register:s,handleSubmit:a,control:o,setValue:c,reset:u}=vxe({values:{url:e,title:t}}),d=Ju();return Y.createElement("form",{onSubmit:h=>{a(n)(h),h.stopPropagation(),h.preventDefault()},onReset:h=>{h.stopPropagation(),r()},className:Xr(Nt.multiFieldForm,Nt.linkDialogEditForm)},Y.createElement("div",{className:Nt.formField},Y.createElement("label",{htmlFor:"link-url"},d("createLink.url","URL")),Y.createElement(Dxe,{register:s,initialInputValue:e,inputName:"url",suggestions:i,setValue:c,control:o,placeholder:d("createLink.urlPlaceholder","Select or paste an URL"),autofocus:!0})),Y.createElement("div",{className:Nt.formField},Y.createElement("label",{htmlFor:"link-title"},d("createLink.title","Title")),Y.createElement("input",{id:"link-title",className:Nt.textInput,size:40,...s("title")})),Y.createElement("div",{style:{display:"flex",justifyContent:"flex-end",gap:"var(--spacing-2)"}},Y.createElement("button",{type:"submit",title:d("createLink.saveTooltip","Set URL"),"aria-label":d("createLink.saveTooltip","Set URL"),className:Xr(Nt.primaryButton)},d("dialogControls.save","Save")),Y.createElement("button",{type:"reset",title:d("createLink.cancelTooltip","Cancel change"),"aria-label":d("createLink.cancelTooltip","Cancel change"),className:Xr(Nt.secondaryButton)},d("dialogControls.cancel","Cancel"))))}const uot=()=>{const[e,t,n,r,i,s]=Hc(yx,na,tf,jo,Xxe,Qxe),a=ol(qxe),o=ol(Wxe),c=ol(Gxe),u=ol(Kxe),d=ol(Yxe);Y.useEffect(()=>{const _=()=>{t?.getEditorState().read(()=>{a(!0)})};return window.addEventListener("resize",_),window.addEventListener("scroll",_),()=>{window.removeEventListener("resize",_),window.removeEventListener("scroll",_)}},[t,a]);const[h,p]=Y.useState(!1),g=Ju();if(r.type==="inactive")return null;const v=r.rectangle,x=r.type==="preview"&&r.url.startsWith("http");return Y.createElement(iy,{open:!0},Y.createElement(vFe,{"data-visible":r.type==="edit",className:Nt.linkDialogAnchor,style:{to
914p:`${v.top}px`,left:`${v.left}px`,width:`${v.width}px`,height:`${v.height}px`}}),Y.createElement(b7,{container:e?.current},Y.createElement(Kce,{className:Xr(Nt.linkDialogPopoverContent),sideOffset:5,onOpenAutoFocus:_=>{_.preventDefault()},key:r.linkNodeKey},r.type==="edit"&&Y.createElement(cot,{url:r.url,title:r.title,onSubmit:o,onCancel:c.bind(null),linkAutocompleteSuggestions:i}),r.type==="preview"&&Y.createElement(Y.Fragment,null,Y.createElement("a",{className:Nt.linkDialogPreviewAnchor,href:r.url,...x?{target:"_blank",rel:"noreferrer"}:{},onClick:_=>{s!==null&&(_.preventDefault(),s(r.url))},title:x?g("linkPreview.open","Open {{url}} in new window",{url:r.url}):r.url},Y.createElement("span",null,r.url),x&&n("open_in_new")),Y.createElement(eM,{onClick:()=>{u()},title:g("linkPreview.edit","Edit link URL"),"aria-label":g("linkPreview.edit","Edit link URL")},n("edit")),Y.createElement(r7,null,Y.createElement(i7,{open:h},Y.createElement(s7,{asChild:!0},Y.createElement(eM,{title:g("linkPreview.copyToClipboard","Copy to clipboard"),"aria-label":g("linkPreview.copyToClipboard","Copy to clipboard"),onClick:()=>{window.navigator.clipboard.writeText(r.url).then(()=>{p(!0),setTimeout(()=>{p(!1)},1e3)})}},n(h?"check":"content_copy"))),Y.createElement(a7,{container:e?.current},Y.createElement(o7,{className:Xr(Nt.tooltipContent),sideOffset:5},g("linkPreview.copied","Copied!"),Y.createElement(FMe,null))))),Y.createElement(eM,{title:g("linkPreview.remove","Remove link"),"aria-label":g("linkPreview.remove","Remove link"),onClick:()=>{d()}},n("link_off"))),Y.createElement(_7,{className:Nt.popoverArrow}))))},eM=Y.forwardRef(({className:e,...t},n)=>Y.createElement("button",{className:Xr(Nt.actionButton,e),ref:n,...t}));function IF(e){if(!e)return null;const t=lot(e);if(t===null)return null;const n=t.getParent();return bc(n)?n:bc(t)?t:null}const qxe=aa(),jo=xn({type:"inactive"},e=>{e.pub(gS,t=>t.registerCommand(jE,()=>e.getValue(jo).type==="preview"?(e.pub(jo,{type:"inactive"}),!0):!1,Pi)),e.sub(e.pipe(C3),t=>{t!=="rich-text"&&e.pub(jo,{type:"inactive"})}),e.pub(gS,t=>t.registerCommand(Ope,n=>{if(n.key==="k"&&(m0e?n.metaKey:n.ctrlKey)&&!e.getValue(Uu)){const r=Pt();return _t(r)?(e.pub(L$),n.stopPropagation(),n.preventDefault(),!0):!1}return!1},z8)),e.link(e.pipe(Kxe,us(jo),c0(([,t])=>{if(t.type==="preview")return{type:"edit",initialUrl:t.url,url:t.url,title:t.title,linkNodeKey:t.linkNodeKey,rectangle:t.rectangle};throw new Error("Cannot switch to edit mode when not in preview mode")})),jo),e.sub(e.pipe(Wxe,us(na,jo,vy)),([t,n,r,i])=>{var s,a;const o=((s=t.url)==null?void 0:s.trim())??"",c=((a=t.title)==null?void 0:a.trim())??"";if(o!==""){if(i?.isCollapsed()){const u=c||o;n?.update(()=>{const d=IF(i);if(d)d.setURL(o),d.setTitle(c);else{const h=Sm(o,{title:c});h.append(Ii(u)),Ky([h]),h.select()}},{discrete:!0})}else n?.dispatchCommand(yy,{url:o,title:c});e.pub(jo,{type:"preview",linkNodeKey:r.linkNodeKey,rectangle:r.rectangle,title:c,url:o})}else r.type==="edit"&&r.initialUrl!==""&&n?.dispatchCommand(yy,null),e.pub(jo,{type:"inactive"})}),e.link(e.pipe(Gxe,us(jo,na),c0(([,t,n])=>{if(t.type==="edit")return n?.focus(),t.initialUrl===""?{type:"inactive"}:{type:"preview",url:t.initialUrl,linkNodeKey:t.linkNodeKey,rectangle:t.rectangle};throw new Error("Cannot cancel edit when not in edit mode")})),jo),e.link(e.pipe(e.combine(vy,qxe),us(na,jo,Uu),c0(([[t],n,r,i])=>{if(_t(t)&&n&&!i){const s=IF(t);if(s){const a=Hxe(n);return a?{type:"preview",url:s.getURL(),linkNodeKey:s.getKey(),title:s.getTitle(),rectangle:a}:{type:"inactive"}}else return{type:"inactive"}}else return{type:"inactive"}})),jo)}),Wxe=aa(),Gxe=Vm();Vm();const Kxe=Vm(),Yxe=Vm(e=>{e.sub(e.pipe(Yxe,us(na)),([,t])=>{t?.dispatchCommand(yy,null)})}),L$=Vm(e=>{e.sub(e.pipe(L$,us(vy,na),kE(([,t])=>_t(t))),([,t,n])=>{n?.focus(()=>{setTimeout(()=>{n.getEditorState().read(()=>{const r=IF(t),i=Hxe(n);r?e.pub(jo,{type:"edit",initialUrl:r.getURL(),initialTitle:r.getTitle()??"",url:r.getURL(),title:r.getTitle()??"",linkNodeKey:r.getKey(),rectangle:i}):e.pub(jo,{type:"edit",initialUrl:"",initialTitle:"",title:"",url:"",linkNodeKey:"",rectangle:i})})})})})}),Xxe=xn([]),Qxe=xn(null),Zxe=xn(null,e=>{e.pub(gS,t=>{function n(r){const[i,s]=e.getValues([Uu,Zxe]);!i||s===null||t.update(()=>{const a=Wd(r.target);if(a!==null){const o=Cu(a,c=>c instanceof _x);o!==null&&s(r,o,o.getURL())}})}return t.registerRootListener((r,i)=>{r&&r.addEventListener("click",n),i&&i.removeEventListener("click",n)})})}),dot=Qu({init(e,t){e.pub(bx,t?.LinkDialog??uot),e.pub(Qxe,t?.onClickLinkCallback??null),e.pub(Zxe,t?.onReadOnlyClickLinkCallback??null)},update(e,t={}){e.pub(Xxe,t.linkAutocompleteSuggestions??[])}});function z$(e,t){return Y.forwardRef((n,r)=>{const i=Xr(t.className,n.className);return Y.createElement(e,{...t,...n,className:i,ref:r})})}function fot(e){return({title:t,children:n,...r})=>Y.createElement(e,{...r},Y.createElement(F$,{title:t},n))}const hot=({readOnly:e,children:t,className:n})=>Y.createElement(d$,{className:Xr("mdxeditor-toolbar",Nt.toolbarRoot,{[
914Nt.readOnlyToolbarRoot]:e},n),...e?{tabIndex:-1}:{}},t),pot=z$(h0,{className:Nt.toolbarButton,"data-toolbar-item":!0}),mot=fot(pot),got=z$(Dk,{className:Nt.toolbarToggleItem,"data-toolbar-item":!0});z$(f$,{type:"single",className:Nt.toolbarToggleSingleGroup});const xot=Y.forwardRef(({on:e,title:t,children:n,disabled:r,...i},s)=>Y.createElement(f$,{type:"single",className:Nt.toolbarToggleSingleGroup,...i,value:e?"on":"off",ref:s},Y.createElement(got,{"aria-label":t,value:"on",disabled:r},Y.createElement(F$,{title:t},n)))),tM=xn(()=>null),nM=xn(""),RJ=()=>"This is an empty toolbar. Pass `{toolbarContents: () => { return <>toolbar components</> }}` to the toolbarPlugin to customize it.",vot=Qu({init(e,t){const n=t?.toolbarPosition==="bottom"?Ptt:Ott;e.pubIn({[tM]:t?.toolbarContents??RJ,[nM]:t?.toolbarClassName??"",[n]:()=>{const[r,i,s]=Hc(tM,Uu,nM);return Y.createElement(hot,{className:s,readOnly:i},r())}})},update(e,t){e.pub(tM,t?.toolbarContents??RJ),e.pub(nM,t?.toolbarClassName??"")}});var rM={exports:{}},IJ;function yot(){return IJ||(IJ=1,(function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** 915 * Prism: Lightweight, robust, elegant syntax highlighting 916 * 917 * @license MIT <https://opensource.org/licenses/MIT> 918 * @author Lea Verou <https://lea.verou.me> 919 * @namespace 920 * @public 921 */var n=(function(r){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,s=0,a={},o={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function S(E){return E instanceof c?new c(E.type,S(E.content),E.alias):Array.isArray(E)?E.map(S):E.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(S){return Object.prototype.toString.call(S).slice(8,-1)},objId:function(S){return S.__id||Object.defineProperty(S,"__id",{value:++s}),S.__id},clone:function S(E,T){T=T||{};var N,A;switch(o.util.type(E)){case"Object":if(A=o.util.objId(E),T[A])return T[A];N={},T[A]=N;for(var k in E)E.hasOwnProperty(k)&&(N[k]=S(E[k],T));return N;case"Array":return A=o.util.objId(E),T[A]?T[A]:(N=[],T[A]=N,E.forEach(function(j,R){N[R]=S(j,T)}),N);default:return E}},getLanguage:function(S){for(;S;){var E=i.exec(S.className);if(E)return E[1].toLowerCase();S=S.parentElement}return"none"},setLanguage:function(S,E){S.className=S.className.replace(RegExp(i,"gi"),""),S.classList.add("language-"+E)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(N){var S=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(N.stack)||[])[1];if(S){var E=document.getElementsByTagName("script");for(var T in E)if(E[T].src==S)return E[T]}return null}},isActive:function(S,E,T){for(var N="no-"+E;S;){var A=S.classList;if(A.contains(E))return!0;if(A.contains(N))return!1;S=S.parentElement}return!!T}},languages:{plain:a,plaintext:a,text:a,txt:a,extend:function(S,E){var T=o.util.clone(o.languages[S]);for(var N in E)T[N]=E[N];return T},insertBefore:function(S,E,T,N){N=N||o.languages;var A=N[S],k={};for(var j in A)if(A.hasOwnProperty(j)){if(j==E)for(var R in T)T.hasOwnProperty(R)&&(k[R]=T[R]);T.hasOwnProperty(j)||(k[j]=A[j])}var P=N[S];return N[S]=k,o.languages.DFS(o.languages,function(V,U){U===P&&V!=S&&(this[V]=k)}),k},DFS:function S(E,T,N,A){A=A||{};var k=o.util.objId;for(var j in E)if(E.hasOwnProperty(j)){T.call(E,j,E[j],N||j);var R=E[j],P=o.util.type(R);P==="Object"&&!A[k(R)]?(A[k(R)]=!0,S(R,T,null,A)):P==="Array"&&!A[k(R)]&&(A[k(R)]=!0,S(R,T,j,A))}}},plugins:{},highlightAll:function(S,E){o.highlightAllUnder(document,S,E)},highlightAllUnder:function(S,E,T){var N={callback:T,container:S,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};o.hooks.run("before-highlightall",N),N.elements=Array.prototype.slice.apply(N.container.querySelectorAll(N.selector)),o.hooks.run("before-all-elements-highlight",N);for(var A=0,k;k=N.elements[A++];)o.highlightElement(k,E===!0,N.callback)},highlightElement:function(S,E,T){var N=o.util.getLanguage(S),A=o.languages[N];o.util.setLanguage(S,N);var k=S.parentElement;k&&k.nodeName.toLowerCase()==="pre"&&o.util.setLanguage(k,N);var j=S.textContent,R={element:S,language:N,grammar:A,code:j};function P(U){R.highlightedCode=U,o.hooks.run("before-insert",R),R.element.innerHTML=R.highlightedCode,o.hooks.run("after-highlight",R),o.hooks.run("complete",R),T&&T.call(R.element)}
vendor: 4,133 bytes, line 921
921if(o.hooks.run("before-sanity-check",R),k=R.element.parentElement,k&&k.nodeName.toLowerCase()==="pre"&&!k.hasAttribute("tabindex")&&k.setAttribute("tabindex","0"),!R.code){o.hooks.run("complete",R),T&&T.call(R.element);return}if(o.hooks.run("before-highlight",R),!R.grammar){P(o.util.encode(R.code));return}if(E&&r.Worker){var V=new Worker(o.filename);V.onmessage=function(U){P(U.data)},V.postMessage(JSON.stringify({language:R.language,code:R.code,immediateClose:!0}))}else P(o.highlight(R.code,R.grammar,R.language))},highlight:function(S,E,T){var N={code:S,grammar:E,language:T};if(o.hooks.run("before-tokenize",N),!N.grammar)throw new Error('The language "'+N.language+'" has no grammar.');return N.tokens=o.tokenize(N.code,N.grammar),o.hooks.run("after-tokenize",N),c.stringify(o.util.encode(N.tokens),N.language)},tokenize:function(S,E){var T=E.rest;if(T){for(var N in T)E[N]=T[N];delete E.rest}var A=new h;return p(A,A.head,S),d(S,A,E,A.head,0),v(A)},hooks:{all:{},add:function(S,E){var T=o.hooks.all;T[S]=T[S]||[],T[S].push(E)},run:function(S,E){var T=o.hooks.all[S];if(!(!T||!T.length))for(var N=0,A;A=T[N++];)A(E)}},Token:c};r.Prism=o;function c(S,E,T,N){this.type=S,this.content=E,this.alias=T,this.length=(N||"").length|0}c.stringify=function S(E,T){if(typeof E=="string")return E;if(Array.isArray(E)){var N="";return E.forEach(function(P){N+=S(P,T)}),N}var A={type:E.type,content:S(E.content,T),tag:"span",classes:["token",E.type],attributes:{},language:T},k=E.alias;k&&(Array.isArray(k)?Array.prototype.push.apply(A.classes,k):A.classes.push(k)),o.hooks.run("wrap",A);var j="";for(var R in A.attributes)j+=" "+R+'="'+(A.attributes[R]||"").replace(/"/g,""")+'"';return"<"+A.tag+' class="'+A.classes.join(" ")+'"'+j+">"+A.content+"</"+A.tag+">"};function u(S,E,T,N){S.lastIndex=E;var A=S.exec(T);if(A&&N&&A[1]){var k=A[1].length;A.index+=k,A[0]=A[0].slice(k)}return A}function d(S,E,T,N,A,k){for(var j in T)if(!(!T.hasOwnProperty(j)||!T[j])){var R=T[j];R=Array.isArray(R)?R:[R];for(var P=0;P<R.length;++P){if(k&&k.cause==j+","+P)return;var V=R[P],U=V.inside,G=!!V.lookbehind,Q=!!V.greedy,Z=V.alias;if(Q&&!V.pattern.global){var K=V.pattern.toString().match(/[imsuy]*$/)[0];V.pattern=RegExp(V.pattern.source,K+"g")}for(var te=V.pattern||V,ne=N.next,se=A;ne!==E.tail&&!(k&&se>=k.reach);se+=ne.value.length,ne=ne.next){var H=ne.value;if(E.length>S.length)return;if(!(H instanceof c)){var O=1,L;if(Q){if(L=u(te,se,S,G),!L||L.index>=S.length)break;var J=L.index,M=L.index+L[0].length,q=se;for(q+=ne.value.length;J>=q;)ne=ne.next,q+=ne.value.length;if(q-=ne.value.length,se=q,ne.value instanceof c)continue;for(var X=ne;X!==E.tail&&(q<M||typeof X.value=="string");X=X.next)O++,q+=X.value.length;O--,H=S.slice(se,q),L.index-=se}else if(L=u(te,0,H,G),!L)continue;var J=L.index,W=L[0],re=H.slice(0,J),ae=H.slice(J+W.length),ce=se+H.length;k&&ce>k.reach&&(k.reach=ce);var Te=ne.prev;re&&(Te=p(E,Te,re),se+=re.length),g(E,Te,O);var fe=new c(j,U?o.tokenize(W,U):W,Z,W);if(ne=p(E,Te,fe),ae&&p(E,ne,ae),O>1){var xe={cause:j+","+P,reach:ce};d(S,E,T,ne.prev,se,xe),k&&xe.reach>k.reach&&(k.reach=xe.reach)}}}}}}function h(){var S={value:null,prev:null,next:null},E={value:null,prev:S,next:null};S.next=E,this.head=S,this.tail=E,this.length=0}function p(S,E,T){var N=E.next,A={value:T,prev:E,next:N};return E.next=A,N.prev=A,S.length++,A}function g(S,E,T){for(var N=E.next,A=0;A<T&&N!==S.tail;A++)N=N.next;E.next=N,N.prev=E,S.length-=A}function v(S){for(var E=[],T=S.head.next;T!==S.tail;)E.push(T.value),T=T.next;return E}if(!r.document)return r.addEventListener&&(o.disableWorkerMessageHandler||r.addEventListener("message",function(S){var E=JSON.parse(S.data),T=E.language,N=E.code,A=E.immediateClose;r.postMessage(o.highlight(N,o.languages[T],T)),A&&r.close()},!1)),o;var x=o.util.currentScript();x&&(o.filename=x.src,x.hasAttribute("data-manual")&&(o.manual=!0));function _(){o.manual||o.highlightAll()}if(!o.manual){var w=document.readyState;w==="loading"||w==="interactive"&&x&&x.defer?document.addEventListener("DOMContentLoaded",_):window.requestAnimationFrame?window.requestAnimationFrame(_):window.setTimeout(_,16)}return o}
vendor: 13,445 bytes, lines 921-922
921)(t);e.exports&&(e.exports=n),typeof hr<"u"&&(hr.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(i,s){var a={};a["language-"+s]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[s]},a.cdata=/^<!\[CDATA\[|\]\]>$/i;var o={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:a}};o["language-"+s]={pattern:/[\s\S]+/,inside:n.languages[s]};var c={};c[i]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return i}),"i"),lookbehind:!0,greedy:!0,inside:o},n.languages.insertBefore("markup","cdata",c)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(r,i){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[i,"language-"+i],inside:n.languages[i]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,(function(r){var i=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+i.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+i.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+i.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+i.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:i,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var s=r.languages.markup;s&&(s.tag.addInlined("style","css"),s.tag.addAttribute("style","css"))})(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript,(function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loadingâ¦",i=function(x,_){return"â Error "+x+" while fetching file: "+_},s="â Error: File does not exist or is empty",a={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},o="data-src-status",c="loading",u="loaded",d="failed",h="pre[data-src]:not(["+o+'="'+u+'"]):not(['+o+'="'+c+'"])';function p(x,_,w){var S=new XMLHttpRequest;S.open("GET",x,!0),S.onreadystatechange=function(){S.readyState==4&&(S.status<400&&S.responseText?_(S.responseText):S.status>=400?w(i(S.status,S.statusText)):w(s))},S.send(null)}function g(x){var _=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(x||"");if(_){var w=Number(_[1]),S=_[2],E=_[3];return S?E?[w,Number(E)]:[w,void 0]:[w,w]}}n.hooks.add("before-highlightall",function(x){x.selector+=", "+h}),n.hooks.add("before-sanity-check",function(x){var _=x.element;if(_.matches(h)){x.code="",_.setAttribute(o,c);var w=_.appendChild(document.createElement("CODE"));w.textContent=r;var S=_.getAttribute("data-src"),E=x.language;if(E==="none"){var T=(/\.(\w+)$/.exec(S)||[,"none"])[1];E=a[T]||T}n.util.setLanguage(w,E),n.util.setLanguage(_,E);var N=n.plugins.autoloader;N&&N.loadLanguages(E),p(S,function(A){_.setAttribute(o,u);var k=g(_.getAttribute("data-range"));if(k){var j=A.split(/\r\n?|\n/g),R=k[0],P=k[1]==null?j.length:k[1];R<0&&(R+=j.length),R=Math.max(0,Math.min(R-1,j.length)),P<0&&(P+=j.length),P=Math.max(0,Math.min(P,j.length)),A=j.slice(R,P).join(` 922`),_.hasAttribute("data-start")||_.setAttribute("data-start",String(R+1))}w.textContent=A,n.highlightElement(w)},function(A){_.setAttribute(o,d),w.textContent=A})}}),n.plugins.fileHighlight={highlight:function(_){for(var w=(_||document).querySelectorAll(h),S=0,E;E=w[S++];)n.highlightElement(E)}};var v=!1;n.fileHighlight=function(){v||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),v=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}})()})(rM)),rM.exports}yot();Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?
922:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>
922\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]};Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity;Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup;Prism.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&/,"&"))});Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(t,n){var r={};r["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[n]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};i["language-"+n]={pattern:/[\s\S]+/,inside:Prism.languages[n]};var s={};s[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:i},Prism.languages.insertBefore("markup","cdata",s)}});Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}});Prism.languages.html=Prism.languages.markup;Prism.languages.mathml=Prism.languages.markup;Prism.languages.svg=Prism.languages.markup;Prism.languages.xml=Prism.languages.extend("markup",{});Prism.languages.ssml=Prism.languages.xml;Prism.languages.atom=Prism.languages.xml;Prism.languages.rss=Prism.languages.xml;(function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(d){return d=d.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+d+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),s=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+s+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+s+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+s+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"}
vendor: 5,591 bytes, line 922
922,list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(d){["url","bold","italic","strike","code-snippet"].forEach(function(h){d!==h&&(e.languages.markdown[d].inside.content.inside[h]=e.languages.markdown[h])})}),e.hooks.add("after-tokenize",function(d){if(d.language!=="markdown"&&d.language!=="md")return;function h(p){if(!(!p||typeof p=="string"))for(var g=0,v=p.length;g<v;g++){var x=p[g];if(x.type!=="code"){h(x.content);continue}var _=x.content[1],w=x.content[3];if(_&&w&&_.type==="code-language"&&w.type==="code-block"&&typeof _.content=="string"){var S=_.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");S=(/[a-z][\w-]*/i.exec(S)||[""])[0].toLowerCase();var E="language-"+S;w.alias?typeof w.alias=="string"?w.alias=[w.alias,E]:w.alias.push(E):w.alias=[E]}}}h(d.tokens)}),e.hooks.add("wrap",function(d){if(d.type==="code-block"){for(var h="",p=0,g=d.classes.length;p<g;p++){var v=d.classes[p],x=/language-(.+)/.exec(v);if(x){h=x[1];break}}var _=e.languages[h];if(_)d.content=e.highlight(u(d.content),_,h);else if(h&&h!=="none"&&e.plugins.autoloader){var w="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);d.attributes.id=w,e.plugins.autoloader.loadLanguages(h,function(){var S=document.getElementById(w);S&&(S.innerHTML=e.highlight(S.textContent,e.languages[h],h))})}}});var a=RegExp(e.languages.markup.tag.pattern.source,"gi"),o={amp:"&",lt:"<",gt:">",quot:'"'},c=String.fromCodePoint||String.fromCharCode;function u(d){var h=d.replace(a,"");return h=h.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(p,g){if(g=g.toLowerCase(),g[0]==="#"){var v;return g[1]==="x"?v=parseInt(g.slice(2),16):v=Number(g.slice(1)),c(v)}else{var x=o[g];return x||p}}),h}e.languages.md=e.languages.markdown})(Prism);Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/});Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}});Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}});Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/});delete Prism.languages.c.boolean;(function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]
vendor: 4,957 bytes, line 922
922*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))})(Prism);Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/});delete Prism.languages.objectivec["class-name"];Prism.languages.objc=Prism.languages.objectivec;Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};(function(e){var t=e.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}
vendor: 4,552 bytes, line 922
922],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};t.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:t},boolean:t.boolean,variable:t.variable}})(Prism);var OJ={},PJ;function bot(){return PJ||(PJ=1,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python),OJ}bot();var MJ={},DJ;function _ot(){return DJ||(DJ=1,(function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}
vendor: 6,929 bytes, line 922
922],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string})(Prism)),MJ}_ot();Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/};Prism.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=Prism.languages.swift});var FJ={},LJ;function wot(){return LJ||(LJ=1,(function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript})(Prism)),FJ}wot();var zJ={},$J;function Sot(){return $J||($J=1,(function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;
vendor: 4,566 bytes, line 922
922?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(Prism)),zJ}Sot();var BJ={},UJ;function Eot(){return UJ||(UJ=1,(function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w
922*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])})(Prism)),BJ}Eot();function Jxe(e,t){for(const n of e.childNodes){if(rs(n)&&n.tagName===t)return!0;Jxe(n,t)}return!1}const xw="data-language",P_="data-highlight-language",EA="data-theme";class GE extends gl{static getType(){return"code"}static clone(t){return new GE(t.__language,t.__key)}constructor(t,n){super(n),this.__language=t||void 0,this.__isSyntaxHighlightSupported=!1,this.__theme=void 0}afterCloneFrom(t){super.afterCloneFrom(t),this.__language=t.__language,this.__theme=t.__theme,this.__isSyntaxHighlightSupported=t.__isSyntaxHighlightSupported}createDOM(t){const n=document.createElement("code");Bu(n,t.theme.code),n.setAttribute("spellcheck","false");const r=this.getLanguage();r&&(n.setAttribute(xw,r),this.getIsSyntaxHighlightSupported()&&n.setAttribute(P_,r));const i=this.getTheme();i&&n.setAttribute(EA,i);const s=this.getStyle();return s&&n.setAttribute("style",s),n}updateDOM(t,n,r){const i=this.__language,s=t.__language;i?i!==s&&n.setAttribute(xw,i):s&&n.removeAttribute(xw);const a=this.__isSyntaxHighlightSupported;t.__isSyntaxHighlightSupported&&s?a&&i?i!==s&&n.setAttribute(P_,i):n.removeAttribute(P_):a&&i&&n.setAttribute(P_,i);const o=this.__theme,c=t.__theme;o?o!==c&&n.setAttribute(EA,o):c&&n.removeAttribute(EA);const u=this.__style,d=t.__style;return u?u!==d&&n.setAttribute("style",u):d&&n.removeAttribute("style"),!1}exportDOM(t){const n=document.createElement("pre");Bu(n,t._config.theme.code),n.setAttribute("spellcheck","false");const r=this.getLanguage();r&&(n.setAttribute(xw,r),this.getIsSyntaxHighlightSupported()&&n.setAttribute(P_,r));const i=this.getTheme();i&&n.setAttribute(EA,i);const s=this.getStyle();return s&&n.setAttribute("style",s),{element:n}}static importDOM(){return{code:t=>t.textContent!=null&&(/\r?\n/.test(t.textContent)||Jxe(t,"BR"))?{conversion:VJ,priority:1}:null,div:()=>({conversion:Cot,priority:1}),pre:()=>({conversion:VJ,priority:0}),table:t=>iM(t)?{conversion:Tot,priority:3}:null,td:t=>{const n=t,r=n.closest("table");return n.classList.contains("js-file-line")||r&&iM(r)?{conversion:HJ,priority:3}:null},tr:t=>{const n=t.closest("table");return n&&iM(n)?{conversion:HJ,priority:3}:null}}}static importJSON(t){return sh().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setLanguage(t.language).setTheme(t.theme)}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),theme:this.getTheme()}}insertNewAfter(t,n=!0){const r=this.getChildren(),i=r.length;if(i>=2&&r[i-1].getTextContent()===` 923`&&r[i-2].getTextContent()===` 924`&&t.isCollapsed()&&t.anchor.key===this.__key&&t.anchor.offset===i){r[i-1].remove(),r[i-2].remove();const c=Ur();return this.insertAfter(c,n),c}const{anchor:s,focus:a}=t,o=(s.isBefore(a)?s:a).getNode();if(Lt(o)){let c=kot(o);const u=[];for(;;)if(U5(c))u.push(Wy()),c=c.getNextSibling();else{if(!rve(c))break;{let _=0;const w=c.getTextContent(),S=c.getTextContentSize();for(;_<S&&w[_]===" ";)_++;if(_!==0&&u.push(nve(" ".repeat(_))),_!==S)break;c=c.getNextSibling()}}const d=o.splitText(s.offset)[0],h=s.offset===0?0:1,p=d.getIndexWithinParent()+h,g=o.getParentOrThrow(),v=[zu(),...u];g.splice(p,0,v);const x=u[u.length-1];x?x.select():s.offset===0?d.selectPrevious():d.getNextSibling().selectNext(0,0)}if($$(o)){const{offset:c}=t.anchor;o.splice(c,0,[zu()]),o.select(c+1,c+1)}return null}canIndent(){return!1}collapseAtStart(){const t=Ur();
924return this.getChildren().forEach((n=>t.append(n))),this.replace(t),!0}setLanguage(t){const n=this.getWritable();return n.__language=t||void 0,n}getLanguage(){return this.getLatest().__language}setIsSyntaxHighlightSupported(t){const n=this.getWritable();return n.__isSyntaxHighlightSupported=t,n}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}setTheme(t){const n=this.getWritable();return n.__theme=t||void 0,n}getTheme(){return this.getLatest().__theme}}function sh(e,t){return EYe(GE).setLanguage(e).setTheme(t)}function $$(e){return e instanceof GE}function VJ(e){return{node:sh(e.getAttribute(xw))}}function Cot(e){const t=e,n=qJ(t);return n||(function(r){let i=r.parentElement;for(;i!==null;){if(qJ(i))return!0;i=i.parentElement}return!1})(t)?{node:n?sh():null}:{node:null}}function Tot(){return{node:sh()}}function HJ(){return{node:null}}function qJ(e){return e.style.fontFamily.match("monospace")!==null}function iM(e){return e.classList.contains("js-file-line-container")}let eve=class tve extends ef{constructor(t="",n,r){super(t,r),this.__highlightType=n}static getType(){return"code-highlight"}static clone(t){return new tve(t.__text,t.__highlightType||void 0,t.__key)}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(t){const n=this.getWritable();return n.__highlightType=t||void 0,n}canHaveFormat(){return!1}createDOM(t){const n=super.createDOM(t),r=sM(t.theme,this.__highlightType);return Bu(n,r),n}updateDOM(t,n,r){const i=super.updateDOM(t,n,r),s=sM(r.theme,t.__highlightType),a=sM(r.theme,this.__highlightType);return s!==a&&(s&&n4(n,s),a&&Bu(n,a)),i}static importJSON(t){return nve().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setHighlightType(t.highlightType)}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType()}}setFormat(t){return this}isParentRequired(){return!0}createParentElementNode(){return sh()}};function sM(e,t){return t&&e&&e.codeHighlight&&e.codeHighlight[t]}function nve(e="",t){return Jl(new eve(e,t))}function rve(e){return e instanceof eve}function Aot(e,t){let n=e;for(let r=ta(e,t);r&&(rve(r.origin)||U5(r.origin));r=WYe(r))n=r.origin;return n}function kot(e){return Aot(e,"previous")}(function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach((function(n){var r=t[n],i=[];/^\w+$/.test(n)||i.push(/\w+/.exec(n)[0]),n==="diff"&&i.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+`].*(?:\r 925?| 926|(?![\\s\\S])))+`,"m"),alias:i,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}})),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})})(Prism);function OF(e,t){const n={};for(const r of e){const i=t(r);i&&(n[i]?n[i].push(r):n[i]=[r])}return n}function Not(e){const t=OF(e,(n=>n.type));return{element:t.element||[],multilineElement:t["multiline-element"]||[],textFormat:t["text-format"]||[],textMatch:t["text-match"]||[]}}const WJ=/[!-/:-@[-`{-~\s]/;function jot(e){return Lt(e)&&!e.hasFormat("code")}function Rot(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function GJ(e,t,n){const r=n.length;for(let i=t;i>=r;i--){const s=i-r;if(ive(e,s,n,0,r)&&e[s+r]!==" ")return s}return-1}function ive(e,t,n,r,i){for(let s=0;s<i;s++)if(e[t+s]!==n[r+s])return!1;return!0}function Iot(e,t=vve){const n=Not(t),r=OF(n.textFormat,(({tag:a})=>a[a.length-1])),i=OF(n.textMatch,(({trigger:a})=>a));for(const a of t){const o=a.type;if(o==="element"||o==="text-match"||o==="multiline-element"){const c=a.dependencies;for(const u of c)e.hasNode(u)||Rot(173,u.getType())}}const s=(a,o,c)=>{(function(u,d,h,p){const g=u.getParent();if(!ea(g)||u.getFirstChild()!==d)return!1;const v=d.getTextContent();if(v[h-1]!==" ")return!1;for(const{regExp:x,replace:_}of p){const w=v.match(x);if(w&&w[0].length===(w[0].endsWith(" ")?h:h-1)){const S=d.getNextSiblings(),[E,T]=d.splitText(h);if(_(u,T?[T,...S]:S,w,!1)!==!1)return E.remove(),!0}}return!1})(a,o,c,n.element)||(function(u,d,h,p){const g=u.getParent();if(!ea(g)||u.getFirstChild()!==d)return!1;const v=d.getTextContent();if(v[h-1]!==" ")return!1;for(const{regExpStart:x,replace:_,regExpEnd:w}of p){if(w&&!("optional"in w)||w&&"optional"in w&&!w.optional)continue;const S=v.match(x);if(S&&S[0].length===(S[0].endsWith(" ")?h:h-1)){const E=d.getNextSiblings(),[T,N]=d.splitText(h);if(_(u,N?[N,...E]:E,S,null,null,!1)!==!1)return T.remove(),!0}}return!1})(a,o,c,n.multilineElement)||(function(u,d,h){let p=u.getTextContent();const g=h[p[d-1]];if(g==null)return!1;d<p.length&&(p=p.slice(0,d));for(const v of g){if(!v.replace||!v.regExp)continue;const x=p.match(v.regExp);if(x===null)continue;const _=x.index||0,w=_+x[0].length;let S;return _===0?[S]=u.splitText(w):[,S]=u.splitText(_,w),S.selectNext(0,0),v.replace(S,x),!0}return!1})(o,c,i)||(function(u,d,h){const p=u.getTextContent(),g=d-1,v=p[g],x=h[v];if(!x)return!1;for(const _ of x){const{tag:w}=_,S=w.length,E=g-S+1;if(S>1&&!ive(p,E,w,0,S)||p[E-1]===" ")continue;const T=p[g+1];if(_.intraword===!1&&T&&!WJ.test(T))continue;const N=u;let A=N,k=GJ(p,E,w),j=A;for(;k<0&&(j=j.getPreviousSibling())&&!Eu(j);
926)if(Lt(j)){if(j.hasFormat("code"))continue;const te=j.getTextContent();A=j,k=GJ(te,te.length,w)}if(k<0||A===N&&k+S===E)continue;const R=A.getTextContent();if(k>0&&R[k-1]===v)continue;const P=R[k-1];if(_.intraword===!1&&P&&!WJ.test(P))continue;const V=N.getTextContent(),U=V.slice(0,E)+V.slice(g+1);N.setTextContent(U);const G=A===N?U:R;A.setTextContent(G.slice(0,k)+G.slice(k+S));const Q=Pt(),Z=Gy();As(Z);const K=g-S*(A===N?2:1)+1;Z.anchor.set(A.__key,k,"text"),Z.focus.set(N.__key,K,"text");for(const te of _.format)Z.hasFormat(te)||Z.formatText(te);Z.anchor.set(Z.focus.key,Z.focus.offset,Z.focus.type);for(const te of _.format)Z.hasFormat(te)&&Z.toggleFormat(te);return _t(Q)&&(Z.format=Q.format),!0}})(o,c,r)};return e.registerUpdateListener((({tags:a,dirtyLeaves:o,editorState:c,prevEditorState:u})=>{if(a.has(Jpe)||a.has(d3)||e.isComposing())return;const d=c.read(Pt),h=u.read(Pt);if(!_t(h)||!_t(d)||!d.isCollapsed()||d.is(h))return;const p=d.anchor.key,g=d.anchor.offset,v=c._nodeMap.get(p);!Lt(v)||!o.has(p)||g!==1&&g>h.anchor.offset+1||e.update((()=>{if(!jot(v))return;const x=v.getParent();x===null||$$(x)||s(x,v,d.anchor.offset)}))}))}const Oot=/^(\s*)(\d{1,})\.\s/,Pot=/^(\s*)[-*+]\s/,Mot=/^(\s*)(?:-\s)?\s?(\[(\s|x)?\])\s/i,Dot=/^(#{1,6})\s/,Fot=/^>\s/,Lot=/^[ \t]*```([\w-]+)?/,zot=/[ \t]*```$/,sve=e=>(t,n,r,i)=>{const s=e(r);s.append(...n),t.replace(s),i||s.select(0,0)},B$=e=>(t,n,r,i)=>{const s=t.getPreviousSibling(),a=t.getNextSibling(),o=Vo(e==="check"?r[3]==="x":void 0);if(Rn(a)&&a.getListType()===e){const u=a.getFirstChild();u!==null?u.insertBefore(o):a.append(o),t.remove()}else if(Rn(s)&&s.getListType()===e)s.append(o),t.remove();else{const u=$o(e,e==="number"?Number(r[2]):void 0);u.append(o),t.replace(u)}o.append(...n),i||o.select(0,0);const c=(function(u){const d=u.match(/\t/g),h=u.match(/ /g);let p=0;return d&&(p+=d.length),h&&(p+=Math.floor(h.length/4)),p})(r[1]);c&&o.setIndent(c)},x4=(e,t,n)=>{const r=[],i=e.getChildren();let s=0;for(const a of i)if(Jn(a)){if(a.getChildrenSize()===1){const d=a.getFirstChild();if(Rn(d)){r.push(x4(d,t,n+1));continue}}const o=" ".repeat(4*n),c=e.getListType(),u=c==="number"?`${e.getStart()+s}. `:c==="check"?`- [${a.getChecked()?"x":" "}] `:"- ";r.push(o+u+t(a)),s++}return r.join(` 927`)},$ot={dependencies:[zE],export:(e,t)=>{if(!i4(e))return null;const n=Number(e.getTag().slice(1));return"#".repeat(n)+" "+t(e)},regExp:Dot,replace:sve((e=>{const t="h"+e[1].length;return Ed(t)})),type:"element"},ave={dependencies:[r4],export:(e,t)=>{if(!X8(e))return null;const n=t(e).split(` 928`),r=[];for(const i of n)r.push("> "+i);return r.join(` 929`)},regExp:Fot,replace:(e,t,n,r)=>{if(r){const s=e.getPreviousSibling();if(X8(s))return s.splice(s.getChildrenSize(),0,[zu(),...t]),void e.remove()}const i=LE();i.append(...t),e.replace(i),r||i.select(0,0)},type:"element"},ove={dependencies:[GE],export:e=>{if(!$$(e))return null;const t=e.getTextContent();return"```"+(e.getLanguage()||"")+(t?` 930`+t:"")+"\n```"},regExpEnd:{optional:!0,regExp:zot},regExpStart:Lot,replace:(e,t,n,r,i,s)=>{let a,o;if(!t&&i){if(i.length===1)r?(a=sh(),o=n[1]+i[0]):(a=sh(n[1]),o=i[0].startsWith(" ")?i[0].slice(1):i[0]);else{if(a=sh(n[1]),i[0].trim().length===0)for(;i.length>0&&!i[0].length;)i.shift();else i[0]=i[0].startsWith(" ")?i[0].slice(1):i[0];for(;i.length>0&&!i[i.length-1].length;)i.pop();o=i.join(` 931`)}const c=Ii(o);a.append(c),e.append(a)}else t&&sve((c=>sh(c?c[1]:void 0)))(e,t,n,s)},type:"multiline-element"},lve={dependencies:[Kh,Gh],export:(e,t)=>Rn(e)?x4(e,t,0):null,regExp:Pot,replace:B$("bullet"),type:"element"},Bot={dependencies:[Kh,Gh],export:(e,t)=>Rn(e)?x4(e,t,0):null,regExp:Mot,replace:B$("check"),type:"element"},cve={dependencies:[Kh,Gh],export:(e,t)=>Rn(e)?x4(e,t,0):null,regExp:Oot,replace:B$("number"),type:"element"},uve={format:["code"],tag:"`",type:"text-format"},Uot={format:["highlight"],tag:"==",type:"text-format"},dve={format:["bold","italic"],tag:"***",type:"text-format"},fve={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},hve={format:["bold"],tag:"**",type:"text-format"},pve={format:["bold"],intraword:!1,tag:"__",type:"text-format"},Vot={format:["strikethrough"],tag:"~~",type:"text-format"},mve={format:["italic"],tag:"*",type:"text-format"},gve={format:["italic"],intraword:!1,tag:"_",type:"text-format"},xve={dependencies:[_x],export:(e,t,n)=>{if(!bc(e)||yd(e))return null;const r=e.getTitle(),i=t(e);return r?`[${i}](${e.getURL()} "${r}")`:`[${i}](${e.getURL()})`},importRegExp:/(?:\[(.*?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,regExp:/(?:\[(.*?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,replace:(e,t)=>{const[,n,r,i]=t,s=Sm(r,{title:i}),a=n.split("[").length-1,o=n.split("]").length-1;let c=n,u="";if(a<o)return;if(a>o){const h=n.split("[");u="["+h[0],c=h.slice(1).join("[")}const d=Ii(c);return d.setFormat(e.getFormat()),s.append(d),e.replace(s),u&&s.insertBefore(Ii(u)),d},trigger:")",type:"text-match"},Hot=[$ot,ave,lve,cve],qot=[ove],Wot=[uve,dve,fve,hve,pve,Uot,mve,gve,Vot],Got=[xve],vve=[...Hot,...qot,...Wot,...Got],Kot=[{dependencies:[HE],export:e=>s$(e)?"***":null,regExp:/^(---|\*\*\*|___)\s?$/,replace:(e,t,n,r)=>{const i=Jy();r||e.getNextSibling()!=null?e.replace(i):e.insertBefore(i),i.selectNext()},type:"element"},...vve];function KJ({transformers:e=Kot}){const[t]=So();return b.useEffect((()=>Iot(t,e)),[t,e]),null}const Yot=Qu({init(e){const t=e.getValue(i$),n=t.includes("headings")?e.getValue(f4):[],r=Zot(t,n);e.pubIn({[bx]:()=>Y.createElement(KJ,{transformers:r}),[n$]:()=>Y.createElement(KJ,{transformers:r})})}}),Xot=e=>(t,n,r)=>{const i=e(r);i.append(...n),t.replace(i),i.select(0,0)},Qot={dependencies:[HE],export:e=>s$(e)?"***":null,regExp:/^(---|\*\*\*|___)\s?$/,replace:(e,t,n,r)=>{const i=Jy();r||e.getNextSibling()!=null?e.replace(i):e.insertBefore(i),i.selectNext()},type:"element"};function Zot(e,t){const n=[dve,fve,hve,pve,uve,mve,gve];if(e.includes("headings")){const r=Math.min(...t),i=Math.max(...t),s=new RegExp(`^(#{${r},${i}})\\s`),a={dependencies:[zE],export:(o,c)=>{if(!i4(o))return null;const u=Number(o.getTag().slice(1));return"#".repeat(u)+" "+c(o)},regExp:s,replace:Xot(o=>{const c=`h${o[1].length}`;return Ed(c)}),type:"element"};n.push(a)}if(e.includes("thematicBreak")&&n.push(Qot),e.includes("quote")&&n.push(ave),e.includes("link")&&n.push(xve),e.includes("lists")&&n.push(cve,lve,Bot),e.includes("codeblock")){const r={...ove,dependencies:[m4],replace:(i,s,a)=>{const o=g4({code:"",language:a[1]??"",meta:""});i.selectPrevious(),i.replace(o),setTimeout(()=>{o.select()},80)}};n.push(r)}return n}const Jot=()=>{const e=ol(E3),t=Kl(a0e),n=Kl(i$),r=n.includes("quote"),i=n.includes("headings"),s=Ju();if(!r&&!i)return null;const a=[{label:s("toolbar.blockTypes.paragraph","Paragraph"),value:"paragraph"}];if(r&&a.push({label:s("toolbar.blockTypes.quote","Quote"),value:"quote"}),i){const o=Kl(f4);a.push(...o.map(c=>({label:s("toolbar.blockTypes.heading","Heading {{level}}",{level:c}),value:`h${c}`})))}return Y.createElement(oot,{value:t,onChange:o=>{switch(o){case"quote":e(()=>LE());break;case"paragraph":e(()=>Ur());break;case"":break;default:if(o.startsWith("h"))e(()=>Ed(o));else throw new Error(`Unknown block type: ${o}`)}},triggerTitle:s("toolbar.blockTypeSelect.selectBlockTypeTooltip","Select block type"),placeholder:s("toolbar.blockTypeSelect.placeholder","Block type"),items:a})},aM=({format:e,addTitle:t,removeTitle:n,icon:r,formatName:i})=>{const[s,a]=Hc(Bge,tf),o=ol(Uge),c=(s&e)!==0;return Y.createElement(xot,{title:c?n:t,on:c,onValueChange:()=>{o(i)}},a(r))},elt=({options:e})=>{const t=Ju(),n=typeof e>"u";return Y.createElement("div",{className:Nt.toolbarGroupOfGroups},n||e.includes("Bold")?Y.createElement(aM,{format:Uw,addTitle:t("toolbar.bold","Bold"),removeTitle:t("toolbar.removeBold","Remove bold"),icon:"format_bold",formatName:"bold"}):null,n||e.includes("Italic")?Y.createElement(aM,{format:Vw,addTitle:t("toolbar.italic","Italic"),removeTitle:t("toolbar.removeItalic","Remove italic"),icon:"format_italic",formatName:"italic"}):null,n||e.includes("Underline")?Y.createElement(aM,{format:Hw,addTitle:t("toolbar.underline","Underline"),removeTitle:t("toolbar.removeUnderline","Remove underline"),icon:"format_underlined",formatName:"underline"}):null)},tlt=()=>{const e=ol(L$),t=Kl(tf),n=Ju();return Y.createElement(mot,{"aria-label":n("toolbar.link","Create link"),title:n("toolbar.link","Create link"),onClick:r=>{e()}},t("link"))},cn=b.memo(({...e})=>l.jsx(T0,{...e})),nlt=e=>/^#{1,6}\s/m.test(e)||/^\s*[*+-]\s/m.test(e)||/^\s*\d+\.\s/m.test(e)||/\*\*[^*]+\*\*/.test(e)||/\[[^\]]+]\([^)]+\)/.test(e)||/```[\S\s]*```/.test(e),rlt=e=>{const{name:t,label:n,required:r,placeholder:i,disabled:s,description:a,tooltip:o,showOptional:c,enableMarkdownPasteTransform:u=!1,...d}=e,h=b.useRef(null),{fieldState:p,fieldApi:g,render:v,userProps:x}=Uh({name:t,initialValue:e.initialValue===void 0?void 0:String(e.initialValue),defaultValue:e.defaultValue===void 0?"":String(e.defaultValue),...d});b.useEffect(()=>{h.current&&p.value!==void 0&&typeof p.value=="string"&&p.value!==h.current.getMarkdown()&&h.current.setMarkdown(p.value)},[p.value]);const _=E=>{g.setValue(E),g.setTouched(!0)},w=()=>{h.current&&!s&&h.current.focus()},S=E=>{if(!u||s||!h.current)return;const T=E.clipboardData.getData("text/plain");!T||!nlt(T)||window.setTimeout(()=>{if(!h.current)return;const N=h.current.getMarkdown();g.setValue(N),h.current.setMarkdown(N)},0)};return v(l.jsxs("div",{children:[n&&l.jsxs("label",{className:"mb-2 inline-flex cursor-pointer items-center gap-1 text-sm font-medium",htmlFor:t,onClick:w,children:[n,o&&l.jsx(cn,{title:o,children:l.jsx("span",{className:"cursor-help text-sm text-placeholder",children:l.jsx(ax,{size:14})})}),c&&l.jsx("span",{className:"text-sm text-placeholder",children:"(optional)"})]}),a&&l.jsx("p",{className:"mb-2 text-xs text-gray-500",children:a}),l.jsx("div",{className:"rounded-md border",onPasteCapture:S,children:l.jsx(mrt,{ref:h,markdown:typeof p.value=="string"?p.value:"",onChange:E=>_(E),placeholder:i,readOnly:s,contentEditableClassName:"MDXEditorContent",className:"max-w-full",plugins:[_rt(),Jrt(),Yat(),krt(),Yot(),ust(),dot(),Wit(),zat(),vot({toolbarContents:()=>l.jsxs("div",{className:"flex flex-wrap gap-2 ",children:[l.jsx(elt,{}),l.jsx(tlt,{}),l.jsx(Jot,{})]})})],...x})})]}))};
931function yve({value:e,onChange:t,options:n,placeholder:r,disabled:i,label:s,forcedDefaultValue:a}){const[o,c]=b.useState(!1),u=b.useRef(null),d=p=>{if(e.includes(p)){const g=e.filter(v=>v!==p);g.length===0&&a?n.some(v=>v.value===a)?t([a]):t(e):t(g)}else t([...e,p])};let h=r;return e.length===1?h=n.find(g=>g.value===e[0])?.label||r:e.length>1&&(h=`${n.find(g=>g.value===e[0])?.label||""} + ${e.length-1} dalÅ¡Ã`),l.jsxs(l.Fragment,{children:[s&&l.jsx("label",{className:"mb-1 block cursor-pointer text-sm text-gray-500",onClick:()=>{u.current&&(u.current.focus(),c(!0))},children:s}),l.jsxs(Ou,{open:o,onOpenChange:c,children:[l.jsx(Pu,{asChild:!0,children:l.jsxs("button",{"data-cta":"admin-multiselect-trigger",type:"button",disabled:i,className:["outline-none focus:ring-2 focus:ring-offset-2 ring-input-border peer transition-all text-input-fg font-normal flex justify-between items-center","w-full rounded-radius border placeholder-placeholder bg-input disabled:cursor-not-allowed disabled:opacity-60 h-9 px-3 py-2 text-sm border-input-border focus:border-input-fg hover:border-input-fg"].join(" "),children:[l.jsx("span",{className:"whitespace-nowrap",children:h}),l.jsx(Xd,{className:"ml-2 size-4"})]})}),!i&&l.jsx(Mu,{className:"max-h-60 min-w-48 overflow-y-auto",children:n.map(p=>{const g=e.includes(p.value);return l.jsxs(Er,{onSelect:v=>{v.preventDefault(),d(p.value)},className:"flex cursor-pointer items-center gap-2",children:[l.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:g?l.jsx(Es,{className:"size-4"}):null}),l.jsx("span",{children:p.label})]},p.value)})})]})]})}const Em=b.memo(function({locked:t,children:n,message:r}){const{i18n:i,_:s}=Me();return t?l.jsx(cn,{delayDuration:0,title:r??i._({id:"a721+R"}),children:l.jsx("span",{className:"inline-flex cursor-help",children:n})}):n});function ilt({value:e,onChange:t,options:n,disabled:r,id:i}){return l.jsx("div",{id:i,role:"radiogroup",className:"inline-flex gap-1 rounded-radius border border-input-border bg-input p-1",children:n.map(s=>{const a=s.value===e,o=r||s.disabled,c=l.jsxs("button",{type:"button",role:"radio","aria-checked":a,disabled:o,onClick:()=>{o||t(s.value)},className:$e("flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-medium transition-colors",a?"bg-primary text-primary-fg shadow-sm":"text-placeholder hover:text-input-fg",o?"cursor-not-allowed opacity-50":"cursor-pointer"),children:[s.disabled&&l.jsx(pm,{className:"size-3.5"}),s.label]},s.value);return s.disabled&&s.disabledHint?l.jsx(Em,{locked:!0,message:s.disabledHint,children:c},s.value):c})})}const slt={text:zo,number:zo,textarea:ize,richtext:rlt,checkbox:Bde,switch:r$e,hidden:e=>l.jsx(xk,{...e,type:"hidden"}),chatSelect:lKe,multiselect:e=>{const{options:t,...n}=e,r=Object.entries(t??{}).map(([i,s])=>({value:i,label:s}));return l.jsx(Lu,{...n,type:"text",render:({fieldApi:i,fieldState:s})=>l.jsx(yve,{value:Array.isArray(s.value)?s.value:[],onChange:a=>{i.setTouched(!0),i.setValue(a)},options:r,placeholder:e.placeholder,disabled:e.disabled})})},select:e=>{const{options:t,...n}=e;return l.jsx(r8,{...n,children:Object.entries(t).map(([r,i])=>l.jsx(r8.Item,{value:r,children:i},r))})},segmented:e=>{const{options:t,disabledOptions:n,...r}=e,i=Object.entries(t??{}).map(([s,a])=>({value:s,label:a,disabled:!!n?.[s],disabledHint:n?.[s]}));return l.jsx(Lu,{...r,type:"text",render:({fieldApi:s,fieldState:a})=>l.jsx("div",{className:"flex justify-center",children:l.jsx(ilt,{value:typeof a.value=="string"?a.value:void 0,onChange:o=>{s.setTouched(!0),s.setValue(o)},options:i,disabled:e.disabled})})})}};function PF(e,t){return Object.fromEntries(Object.values(e).map(n=>[n,t?t(n):n]))}const bve={adapter:slt},U$=b.createContext(void 0);function alt(){const e=b.useContext(U$);if(!e)throw new Error("No FormSchemaContext found when calling useFormSchemaContext.");return e}const olt=b.lazy(()=>pw(()=>import("./Devtools-DK_qKf1S.js"),[]).then(e=>({default:e.Devtools})));function _ve(){return os.debug?l.jsx(b.Suspense,{fallback:null,children:l.jsx(olt,{className:"fixed bottom-12 left-2 z-40"})}):null}
931function tb({open:e,onOpenChange:t,onConfirm:n,onCancel:r,title:i,description:s,confirmationText:a,confirmationLabel:o,confirmLabel:c,confirmVariant:u="danger",successTitle:d,successDescription:h}){const{i18n:p,_:g}=Me(),[v,x]=b.useState(!1),[_,w]=b.useState(!1),[S,E]=b.useState("");b.useEffect(()=>{e||E("")},[e]);const T=a?S.trim()===a.trim():!0,N=b.useCallback(async k=>{if(k.preventDefault(),k.stopPropagation(),!!T)try{x(!0),await n?.(),Re.success(d??p._({id:"zzDlyQ"}),{description:h??p._({id:"MxMtqE"})}),t(!1)}finally{x(!1)}},[n,g,t,T,d,h]),A=b.useCallback(async k=>{try{w(!0),await r?.(),t(!1)}finally{w(!1)}},[r,t]);return l.jsx(bLe,{open:e,children:l.jsxs(_Le,{children:[l.jsx(kLe,{}),l.jsxs(NLe,{children:[l.jsxs(PLe,{children:[l.jsx(MLe,{children:i??p._({id:"go7MC4"})}),l.jsx(ILe,{children:s??p._({id:"XtpCjZ"})})]}),a&&l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:o??p._({id:"M0XoVW",values:{confirmationText:a}})}),l.jsx(fn,{value:S,onChange:k=>E(k.target.value),onPaste:k=>k.preventDefault(),placeholder:a,disabled:v||_,autoComplete:"off"})]}),l.jsxs(OLe,{children:[l.jsx(RLe,{asChild:!0,children:l.jsx(Oe,{onClick:A,loading:_,disabled:_||v,variant:"ghost",children:p._({id:"dEgA5A"})})}),l.jsx(jLe,{asChild:!0,children:l.jsx(Oe,{variant:u,onClick:N,loading:v,disabled:_||v||!T,children:c??p._({id:"7VpPHA"})})})]})]})]})})}function V$({onDelete:e,onSubmit:t,children:n,readOnly:r,disabled:i=!1,loading:s=!1,columns:a=!0,initialValues:o,showDelete:c,onSubmitError:u,deleteDescription:d,confirmationText:h,confirmationLabel:p,...g}){const{i18n:v,_:x}=Me(),[_,w]=b.useState(!1),[S,E]=b.useState(!1),T=b.useCallback(async k=>{try{E(!0),await t?.(k),Re.success(v._({id:"idD8Ev"}),{description:v._({id:"qN/pzS"})})}catch(j){console.error(j),u?u(j):os.debug?Re.error(v._({id:"gla9Gg"}),{description:()=>l.jsxs("div",{children:[v._({id:"R6Doo/"}),l.jsx("pre",{className:"mt-2 overflow-auto rounded-radius bg-slate-100 p-2 font-mono text-[11px]",children:JSON.stringify(j,null,2)})]})}):Re.error(v._({id:"gla9Gg"}),{description:v._({id:"R6Doo/"})})}finally{E(!1)}},[t,x,u]),N=b.useCallback(()=>{Re.error(v._({id:"gla9Gg"}),{description:v._({id:"R6Doo/"})})},[x]),A=b.useCallback(()=>{w(!0)},[]);return l.jsx(U$.Provider,{value:bve,children:l.jsxs(S5,{showOptional:!0,initialValues:o,allowEmptyStrings:!0,onSubmit:T,onSubmitFailure:N,readOnly:r,loading:S,...g,children:[a?l.jsx(ZGe,{children:n}):n,!r&&l.jsx(XGe,{loading:S||s,showDelete:!!o&&c,onDelete:A}),l.jsx(tb,{onConfirm:async()=>e?.(),open:_,onOpenChange:w,description:d,confirmationText:h,confirmationLabel:p}),l.jsx(_ve,{})]})})}V$.Col=QGe;function Ls({initialData:e,createSchema:t,updateSchema:n,onCreate:r,onUpdate:i,onRemove:s,basePath:a,idParamName:o,children:c,transformValues:u,deleteDescription:d,customRedirect:h,confirmationText:p,confirmationLabel:g,showDelete:v,...x}){const _=gs(),[w,S]=b.useState(!1),E=b.useCallback(async()=>{e?.id&&s&&(await s({id:e.id}),S(!0))},[e,s]),T=b.useCallback(async N=>{const{values:A}=N;if(A){if(e?.id){let k={...A,id:e.id};u&&(k=u(k,"update")),await i(n.parse(k))}else if(r){const k=await r(t.parse(u?u(A,"create"):A));k&&a&&_({to:`${a}/${k.id}/edit`,params:o?{[o]:k.id}:void 0})}}},[e,r,i,n,u,t,_,a,o]);return w?l.jsx(Cj,{to:h||a}):l.jsx(V$,{initialValues:e,zodSchema:e?.id?n:t,onSubmit:T,onDelete:E,deleteDescription:d,confirmationText:p,confirmationLabel:g,showDelete:v,...x,children:c})}Ls.Col=V$.Col;const llt=()=>{const e=b.useRef(null),t=b.useRef(null),[n,r]=b.useState(null),i=b.useCallback(()=>{t.current=Date.now(),r("00:00:00"),e.current=window.setInterval(()=>{if(t.current){const o=FUe({start:t.current,end:Date.now()}),c=(o.hours??0).toString().padStart(2,"0"),u=(o.minutes??0).toString().padStart(2,"0"),d=(o.seconds??0).toString().padStart(2,"0");r(`${c}:${u}:${d}`)}},500)},[]),s=b.useCallback(()=>{e.current&&(window.clearInterval(e.current),e.current=null)},[]),a=b.useCallback(()=>{r(null)},[]);return b.useEffect(()=>()=>{e.current&&(window.clearInterval(e.current),e.current=null)},[]),{timestamp:n,start:i,stop:s,reset:a}};
vendor: 15,139 bytes, lines 931-999
931var oM={exports:{}},YJ;function clt(){return YJ||(YJ=1,(function(e){/** 932 * {@link https://github.com/muaz-khan/RecordRTC|RecordRTC} is a WebRTC JavaScript library for audio/video as well as screen activity recording. It supports Chrome, Firefox, Opera, Android, and Microsoft Edge. Platforms: Linux, Mac and Windows. 933 * @summary Record audio, video or screen inside the browser. 934 * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} 935 * @author {@link https://MuazKhan.com|Muaz Khan} 936 * @typedef RecordRTC 937 * @class 938 * @example 939 * var recorder = RecordRTC(mediaStream or [arrayOfMediaStream], { 940 * type: 'video', // audio or video or gif or canvas 941 * recorderType: MediaStreamRecorder || CanvasRecorder || StereoAudioRecorder || Etc 942 * }); 943 * recorder.startRecording(); 944 * @see For further information: 945 * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} 946 * @param {MediaStream} mediaStream - Single media-stream object, array of media-streams, html-canvas-element, etc. 947 * @param {object} config - {type:"video", recorderType: MediaStreamRecorder, disableLogs: true, numberOfAudioChannels: 1, bufferSize: 0, sampleRate: 0, desiredSampRate: 16000, video: HTMLVideoElement, etc.} 948 */function t(H,O){if(!H)throw"First parameter is required.";O=O||{type:"video"},O=new n(H,O);var L=this;function M(Se){return O.disableLogs||console.log("RecordRTC version: ",L.version),Se&&(O=new n(H,Se)),O.disableLogs||console.log("started recording "+O.type+" stream."),ke?(ke.clearRecordedData(),ke.record(),Te("recording"),L.recordingDuration&&ce(),L):(q(function(){L.recordingDuration&&ce()}),L)}function q(Se){Se&&(O.initCallback=function(){Se(),Se=O.initCallback=null});var et=new r(H,O);ke=new et(H,O),ke.record(),Te("recording"),O.disableLogs||console.log("Initialized recorderType:",ke.constructor.name,"for output-type:",O.type)}function X(Se){if(Se=Se||function(){},!ke){xe();return}if(L.state==="paused"){L.resumeRecording(),setTimeout(function(){X(Se)},1);return}L.state!=="recording"&&!O.disableLogs&&console.warn('Recording state should be: "recording", however current state is: ',L.state),O.disableLogs||console.log("Stopped recording "+O.type+" stream."),O.type!=="gif"?ke.stop(et):(ke.stop(),et()),Te("stopped");function et(pt){if(!ke){typeof Se.call=="function"?Se.call(L,""):Se("");return}Object.keys(ke).forEach(function(Ne){typeof ke[Ne]!="function"&&(L[Ne]=ke[Ne])});var ie=ke.blob;if(!ie)if(pt)ke.blob=ie=pt;else throw"Recording failed.";if(ie&&!O.disableLogs&&console.log(ie.type,"->",w(ie.size)),Se){var ue;try{ue=d.createObjectURL(ie)}catch{}typeof Se.call=="function"?Se.call(L,ue):Se(ue)}O.autoWriteToDisk&&ae(function(Ne){var De={};De[O.type+"Blob"]=Ne,Q.Store(De)})}}function J(){if(!ke){xe();return}if(L.state!=="recording"){O.disableLogs||console.warn("Unable to pause the recording. Recording state: ",L.state);return}Te("paused"),ke.pause(),O.disableLogs||console.log("Paused recording.")}function W(){if(!ke){xe();return}if(L.state!=="paused"){O.disableLogs||console.warn("Unable to resume the recording. Recording state: ",L.state);return}Te("recording"),ke.resume(),O.disableLogs||console.log("Resumed recording.")}function re(Se){postMessage(new FileReaderSync().readAsDataURL(Se))}function ae(Se,et){if(!Se)throw"Pass a callback function over getDataURL.";var pt=et?et.blob:(ke||{}).blob;if(!pt){O.disableLogs||console.warn("Blob encoder did not finish its job yet."),setTimeout(function(){ae(Se,et)},1e3);return}if(typeof Worker<"u"&&!navigator.mozGetUserMedia){var ie=Ne(re);ie.onmessage=function(De){Se(De.data)},ie.postMessage(pt)}else{var ue=new FileReader;ue.readAsDataURL(pt),ue.onload=function(De){Se(De.target.result)}}function Ne(De){try{var be=d.createObjectURL(new Blob([De.toString(),"this.onmessage = function (eee) {"+De.name+"(eee.data);}"],{type:"application/javascript"})),me=new Worker(be);return d.revokeObjectURL(be),me}catch{}}}function ce(Se){if(Se=Se||0,L.state==="paused"){setTimeout(function(){ce(Se)},1e3);return}if(L.state!=="stopped"){if(Se>=L.recordingDuration){X(L.onRecordingStopped);return}Se+=1e3,setTimeout(function(){ce(Se)},1e3)}}function Te(Se){L&&(L.state=Se,typeof L.onStateChanged.call=="function"?L.onStateChanged.call(L,Se):L.onStateChanged(Se))}var fe='It seems that recorder is destroyed or "startRecording" is not invoked for '+O.type+" recorder.";function xe(){O.disableLogs!==!0&&console.warn(fe)}var ke,Fe={startRecording:M,stopRecording:X,pauseRecording:J,resumeRecording:W,initRecorder:q,setRecordingDuration:function(Se,et){if(typeof Se>"u")throw"recordingDuration is required.";if(typeof Se!="number")throw"recordingDuration must be a number.";return L.recordingDuration=Se,L.onRecordingStopped=et||function(){},{onRecordingStopped:function(pt){L.onRecordingStopped=pt}}},clearRecordedData:function(){if(!ke){xe();return}ke.clearRecordedData(),O.disableLogs||console.log("Cleared old recorded data.")},getBlob:function(){if(!ke){xe();return}return ke.blob},getDataURL:ae,toURL:function(){if(!ke){xe();return}return d.createObjectURL(ke.blob)},getInternalRecorder:function(){return ke},save:function(Se){if(!ke){xe();return}S(ke.blob,Se)},getFromDisk:function(Se){if(!ke){xe();return}t.getFromDisk(O.type,Se)},setAdvertisementArray:function(Se){O.advertisement=[];for(var et=Se.length,pt=0;pt<et;pt++)O.advertisement.push({duration:pt,image:Se[pt]})},blob:null,bufferSize:0,sampleRate:0,buffer:null,reset:function(){L.state==="recording"&&!O.disableLogs&&console.warn("Stop an active recorder."),ke&&typeof ke.clearRecordedData=="function"&&ke.clearRecordedData(),ke=null,Te("inactive"),L.blob=null},onStateChanged:function(Se){O.disableLogs||console.log("Recorder state changed:",Se)},state:"inactive",getState:function(){return L.state},destroy:function(){var Se=O.disableLogs;O={disableLogs:!0},L.reset(),Te("destroyed"),Fe=L=null,k.AudioContextConstructor&&(k.AudioContextConstructor.close(),k.AudioContextConstructor=null),O.disableLogs=Se,O.disableLogs||console.log("RecordRTC is destroyed.")},version:"5.6.2"};if(!this)return L=Fe,Fe;for(var tt in Fe)this[tt]=Fe[tt];return L=this,Fe}t.version="5.6.2",e.exports=t,t.getFromDisk=function(H,O){if(!O)throw"callback is mandatory.";console.log("Getting recorded "+(H==="all"?"blobs":H+" blob ")+" from disk!"),Q.Fetch(function(L,M){H!=="all"&&M===H+"Blob"&&O&&O(L),H==="all"&&O&&O(L,M.replace("Blob",""))})},t.writeToDisk=function(H){console.log("Writing recorded blob(s) to disk!"),H=H||{},H.audio&&H.video&&H.gif?H.audio.getDataURL(function(O){H.video.getDataURL(function(L){H.gif.getDataURL(function(M){Q.Store({audioBlob:O,videoBlob:L,gifBlob:M})})})}):H.audio&&H.video?H.audio.getDataURL(function(O){H.video.getDataURL(function(L){Q.Store({audioBlob:O,videoBlob:L})})}):H.audio&&H.gif?H.audio.getDataURL(function(O){H.gif.getDataURL(function(L){Q.Store({audioBlob:O,gifBlob:L})})}):H.video&&H.gif?H.video.getDataURL(function(O){H.gif.getDataURL(function(L){Q.Store({videoBlob:O,gifBlob:L})})}):H.audio?H.audio.getDataURL(function(O){Q.Store({audioBlob:O})}):H.video?H.video.getDataURL(function(O){Q.Store({videoBlob:O})}):H.gif&&H.gif.getDataURL(function(O){Q.Store({gifBlob:O})})};/** 949 * {@link RecordRTCConfiguration} is an inner/private helper for {@link RecordRTC}. 950 * @summary It configures the 2nd parameter passed over {@link RecordRTC} and returns a valid "config" object. 951 * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} 952 * @author {@link https://MuazKhan.com|Muaz Khan} 953 * @typedef RecordRTCConfiguration 954 * @class 955 * @example 956 * var options = RecordRTCConfiguration(mediaStream, options); 957 * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} 958 * @param {MediaStream} mediaStream - MediaStream object fetched using getUserMedia API or generated using captureStreamUntilEnded or WebAudio API. 959 * @param {object} config - {type:"video", disableLogs: true, numberOfAudioChannels: 1, bufferSize: 0, sampleRate: 0, video: HTMLVideoElement, getNativeBlob:true, etc.} 960 */function n(H,O){return!O.recorderType&&!O.type&&(O.audio&&O.video?O.type="video":O.audio&&!O.video&&(O.type="audio")),O.recorderType&&!O.type&&(O.recorderType===U||O.recorderType===V||typeof se<"u"&&O.recorderType===se?O.type="video":O.recorderType===Z?O.type="gif":O.recorderType===P?O.type="audio":O.recorderType===R&&(T(H,"audio").length&&T(H,"video").length||!T(H,"audio").length&&T(H,"video").length?O.type="video":T(H,"audio").length&&!T(H,"video").length&&(O.type="audio"))),typeof R<"u"&&typeof MediaRecorder<"u"&&"requestData"in MediaRecorder.prototype&&(O.mimeType||(O.mimeType="video/webm"),O.type||(O.type=O.mimeType.split("/")[0]),O.bitsPerSecond),O.type||(O.mimeType&&(O.type=O.mimeType.split("/")[0]),O.type||(O.type="audio")),O}/** 961 * {@link GetRecorderType} is an inner/private helper for {@link RecordRTC}. 962 * @summary It returns best recorder-type available for your browser. 963 * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} 964 * @author {@link https://MuazKhan.com|Muaz Khan} 965 * @typedef GetRecorderType 966 * @class 967 * @example 968 * var RecorderType = GetRecorderType(options); 969 * var recorder = new RecorderType(options); 970 * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} 971 * @param {MediaStream} mediaStream - MediaStream object fetched using getUserMedia API or generated using captureStreamUntilEnded or WebAudio API. 972 * @param {object} config - {type:"video", disableLogs: true, numberOfAudioChannels: 1, bufferSize: 0, sampleRate: 0, video: HTMLVideoElement, etc.} 973 */function r(H,O){var L;return(v||h||p)&&(L=P),typeof MediaRecorder<"u"&&"requestData"in MediaRecorder.prototype&&!v&&(L=R),O.type==="video"&&(v||p)&&(L=U,typeof se<"u"&&typeof ReadableStream<"u"&&(L=se)),O.type==="gif"&&(L=Z),O.type==="canvas"&&(L=V),j()&&L!==V&&L!==Z&&typeof MediaRecorder<"u"&&"requestData"in MediaRecorder.prototype&&(T(H,"video").length||T(H,"audio").length)&&(O.type==="audio"?typeof MediaRecorder.isTypeSupported=="function"&&MediaRecorder.isTypeSupported("audio/webm")&&(L=R):typeof MediaRecorder.isTypeSupported=="function"&&MediaRecorder.isTypeSupported("video/webm")&&(L=R)),H instanceof Array&&H.length&&(L=te),O.recorderType&&(L=O.recorderType),!O.disableLogs&&L&&L.name&&console.log("Using recorderType:",L.name||L.constructor.name),!L&&x&&(L=R),L}/** 974 * MRecordRTC runs on top of {@link RecordRTC} to bring multiple recordings in a single place, by providing simple API. 975 * @summary MRecordRTC stands for "Multiple-RecordRTC". 976 * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} 977 * @author {@link https://MuazKhan.com|Muaz Khan} 978 * @typedef MRecordRTC 979 * @class 980 * @example 981 * var recorder = new MRecordRTC(); 982 * recorder.addStream(MediaStream); 983 * recorder.mediaType = { 984 * audio: true, // or StereoAudioRecorder or MediaStreamRecorder 985 * video: true, // or WhammyRecorder or MediaStreamRecorder or WebAssemblyRecorder or CanvasRecorder 986 * gif: true // or GifRecorder 987 * }; 988 * // mimeType is optional and should be set only in advance cases. 989 * recorder.mimeType = { 990 * audio: 'audio/wav', 991 * video: 'video/webm', 992 * gif: 'image/gif' 993 * }; 994 * recorder.startRecording(); 995 * @see For further information: 996 * @see {@link https://github.com/muaz-khan/RecordRTC/tree/master/MRecordRTC|MRecordRTC Source Code} 997 * @param {MediaStream} mediaStream - MediaStream object fetched using getUserMedia API or generated using captureStreamUntilEnded or WebAudio API. 998 * @requires {@link RecordRTC} 999 */function i(H){this.addStream=function(O){O&&(H=O)},this.mediaType={audio:!0,video:!0},this.startRecording=function(){var O=this.mediaType,L,M=this.mimeType||{audio:null,video:null,gif:null};if(typeof O.audio!="function"&&j()&&!T(H,"audio").length&&(O.audio=!1),typeof O.video!="function"&&j()&&!T(H,"video").length&&(O.video=!1),typeof O.gif!="function"&&j()&&!T(H,"video").length&&(O.gif=!1),!O.audio&&!O.video&&!O.gif)throw"MediaStream must have either audio or video tracks.";if(O.audio&&(L=null,typeof O.audio=="function"&&(L=O.audio),this.audioRecorder=new t(H,{type:"audio",bufferSize:this.bufferSize,sampleRate:this.sampleRate,numberOfAudioChannels:this.numberOfAudioChannels||2,disableLogs:this.disableLogs,recorderType:L,mimeType:M.audio,timeSlice:this.timeSlice,onTimeStamp:this.onTimeStamp}),O.video||this.audioRecorder.startRecording()),O.video){L=null,typeof O.video=="function"&&(L=O.video);var q=H;if(j()&&O.audio&&typeof O.audio=="function"){var X=T(H,"video")[0];g?(q=new _,q.addTrack(X),L&&L===U&&(L=R)):(q=new _,q.addTrack(X))}this.videoRecorder=new t(q,{type:"video",video:this.video,canvas:this.canvas,frameInterval:this.frameInterval||10,disableLogs:this.disableLogs,recorderType:L,mimeType:M.video,timeSlice:this.timeSlice,onTimeStamp:this.onTimeStamp,workerPath:this.workerPath,webAssemblyPath:this.webAssemblyPath,frameRate:this.frameRate,bitrate:this.bitrate}),O.audio||this.videoRecorder.startRecording()}if(O.audio&&O.video){var J=this,W=j()===!0;(O.audio instanceof P&&O.video||O.audio!==!0&&O.video!==!0&&O.audio!==O.video)&&(W=!1),W===!0?(J.audioRecorder=null,J.videoRecorder.startRecording()):J.videoRecorder.initRecorder(function(){J.audioRecorder.initRecorder(function(){J.videoRecorder.startRecording(),J.audioRecorder.startRecording()})})}O.gif&&(L=null,typeof O.gif=="function"&&(L=O.gif),this.gifRecorder=new t(H,{type:"gif",frameRate:this.frameRate||200,quality:this.quality||10,disableLogs:this.disableLogs,recorderType:L,mimeType:M.gif}),this.gifRecorder.startRecording())},this.stopRecording=function(O){O=O||function(){},this.audioRecorder&&this.audioRecorder.stopRecording(function(L){O(L,"audio")}),this.videoRecorder&&this.videoRecorder.stopRecording(function(L){O(L,"video")}),this.gifRecorder&&this.gifRecorder.stopRecording(function(L){O(L,"gif")})},this.pauseRecording=function(){this.audioRecorder&&this.audioRecorder.pauseRecording(),this.videoRecorder&&this.videoRecorder.pauseRecording(),this.gifRecorder&&this.gifRecorder.pauseRecording()},this.resumeRecording=function(){this.audioRecorder&&this.audioRecorder.resumeRecording(),this.videoRecorder&&this.videoRecorder.resumeRecording(),this.gifRecorder&&this.gifRecorder.resumeRecording()},this.getBlob=function(O){var L={};return this.audioRecorder&&(L.audio=this.audioRecorder.getBlob()),this.videoRecorder&&(L.video=this.videoRecorder.getBlob()),this.gifRecorder&&(L.gif=this.gifRecorder.getBlob()),O&&O(L),L},this.destroy=function(){this.audioRecorder&&(this.audioRecorder.destroy(),this.audioRecorder=null),this.videoRecorder&&(this.videoRecorder.destroy(),this.videoRecorder=null),this.gifRecorder&&(this.gifRecorder.destroy(),this.gifRecorder=null)},this.getDataURL=function(O){this.getBlob(function(q){q.audio&&q.video?L(q.audio,function(X){L(q.video,function(J){O({audio:X,video:J})})}):q.audio?L(q.audio,function(X){O({audio:X})}):q.video&&L(q.video,function(X){O({video:X})})});function L(q,X){if(typeof Worker<"u"){var J=M(function(ae){postMessage(new FileReaderSync().readAsDataURL(ae))});J.onmessage=function(re){X(re.data)},J.postMessage(q)}else{var W=new FileReader;
999W.readAsDataURL(q),W.onload=function(re){X(re.target.result)}}}function M(q){var X=d.createObjectURL(new Blob([q.toString(),"this.onmessage = function (eee) {"+q.name+"(eee.data);}"],{type:"application/javascript"})),J=new Worker(X),W;if(typeof d<"u")W=d;else if(typeof webkitURL<"u")W=webkitURL;else throw"Neither URL nor webkitURL detected.";return W.revokeObjectURL(X),J}},this.writeToDisk=function(){t.writeToDisk({audio:this.audioRecorder,video:this.videoRecorder,gif:this.gifRecorder})},this.save=function(O){O=O||{audio:!0,video:!0,gif:!0},O.audio&&this.audioRecorder&&this.audioRecorder.save(typeof O.audio=="string"?O.audio:""),O.video&&this.videoRecorder&&this.videoRecorder.save(typeof O.video=="string"?O.video:""),O.gif&&this.gifRecorder&&this.gifRecorder.save(typeof O.gif=="string"?O.gif:"")}}i.getFromDisk=t.getFromDisk,i.writeToDisk=t.writeToDisk,typeof t<"u"&&(t.MRecordRTC=i);var s="Fake/5.0 (FakeOS) AppleWebKit/123 (KHTML, like Gecko) Fake/12.3.4567.89 Fake/123.45";(function(H){H&&(typeof window<"u"||typeof hr>"u"||(hr.navigator={userAgent:s,getUserMedia:function(){}},hr.console||(hr.console={}),(typeof hr.console.log>"u"||typeof hr.console.error>"u")&&(hr.console.error=hr.console.log=hr.console.log||function(){console.log(arguments)}),typeof document>"u"&&(H.document={documentElement:{appendChild:function(){return""}}},document.createElement=document.captureStream=document.mozCaptureStream=function(){var O={getContext:function(){return O},play:function(){},pause:function(){},drawImage:function(){},toDataURL:function(){return""},style:{}};return O},H.HTMLVideoElement=function(){}),typeof location>"u"&&(H.location={protocol:"file:",href:"",hash:""}),typeof screen>"u"&&(H.screen={width:0,height:0}),typeof d>"u"&&(H.URL={createObjectURL:function(){return""},revokeObjectURL:function(){return""}}),H.window=hr))})(typeof hr<"u"?hr:null);var a=window.requestAnimationFrame;if(typeof a>"u"){if(typeof webkitRequestAnimationFrame<"u")a=webkitRequestAnimationFrame;else if(typeof mozRequestAnimationFrame<"u")a=mozRequestAnimationFrame;else if(typeof msRequestAnimationFrame<"u")a=msRequestAnimationFrame;else if(typeof a>"u"){var o=0;a=function(H,O){var L=new Date().getTime(),M=Math.max(0,16-(L-o)),q=setTimeout(function(){H(L+M)},M);return o=L+M,q}}}var c=window.cancelAnimationFrame;typeof c>"u"&&(typeof webkitCancelAnimationFrame<"u"?c=webkitCancelAnimationFrame:typeof mozCancelAnimationFrame<"u"?c=mozCancelAnimationFrame:typeof msCancelAnimationFrame<"u"?c=msCancelAnimationFrame:typeof c>"u"&&(c=function(H){clearTimeout(H)}));var u=window.AudioContext;typeof u>"u"&&(typeof webkitAudioContext<"u"&&(u=webkitAudioContext),typeof mozAudioContext<"u"&&(u=mozAudioContext));var d=window.URL;typeof d>"u"&&typeof webkitURL<"u"&&(d=webkitURL),typeof navigator<"u"&&typeof navigator.getUserMedia>"u"&&(typeof navigator.webkitGetUserMedia<"u"&&(navigator.getUserMedia=navigator.webkitGetUserMedia),typeof navigator.mozGetUserMedia<"u"&&(navigator.getUserMedia=navigator.mozGetUserMedia));var h=navigator.userAgent.indexOf("Edge")!==-1&&(!!navigator.msSaveBlob||!!navigator.msSaveOrOpenBlob),p=!!window.opera||navigator.userAgent.indexOf("OPR/")!==-1,g=navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&"netscape"in window&&/ rv:/.test(navigator.userAgent),v=!p&&!h&&!!navigator.webkitGetUserMedia||E()||navigator.userAgent.toLowerCase().indexOf("chrome/")!==-1,x=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);x&&!v&&navigator.userAgent.indexOf("CriOS")!==-1&&(x=!1,v=!0);var _=window.MediaStream;typeof _>"u"&&typeof webkitMediaStream<"u"&&(_=webkitMediaStream),typeof _<"u"&&typeof _.prototype.stop>"u"&&(_.prototype.stop=function(){this.getTracks().forEach(function(H){H.stop()})});function w(H){var O=1e3,L=["Bytes","KB","MB","GB","TB"];if(H===0)return"0 Bytes";var M=parseInt(Math.floor(Math.log(H)/Math.log(O)),10);return(H/Math.pow(O,M)).toPrecision(3)+" "+L[M]}function S(H,O){if(!H)throw"Blob object is required.";if(!H.type)try{H.type="video/webm"}catch{}var L=(H.type||"video/webm").split("/")[1];if(L.indexOf(";")!==-1&&(L=L.split(";")[0]),O&&O.indexOf(".")!==-1){var M=O.split(".");O=M[0],L=M[1]}var q=(O||Math.round(Math.random()*9999999999)+888888888)+"."+L;
vendor: 34,180 bytes, lines 999-1138
999if(typeof navigator.msSaveOrOpenBlob<"u")return navigator.msSaveOrOpenBlob(H,q);if(typeof navigator.msSaveBlob<"u")return navigator.msSaveBlob(H,q);var X=document.createElement("a");X.href=d.createObjectURL(H),X.download=q,X.style="display:none;opacity:0;color:transparent;",(document.body||document.documentElement).appendChild(X),typeof X.click=="function"?X.click():(X.target="_blank",X.dispatchEvent(new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0}))),d.revokeObjectURL(X.href)}function E(){return!!(typeof window<"u"&&typeof window.process=="object"&&window.process.type==="renderer"||typeof process<"u"&&typeof process.versions=="object"&&process.versions.electron||typeof navigator=="object"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Electron")>=0)}function T(H,O){return!H||!H.getTracks?[]:H.getTracks().filter(function(L){return L.kind===(O||"audio")})}function N(H,O){"srcObject"in O?O.srcObject=H:"mozSrcObject"in O?O.mozSrcObject=H:O.srcObject=H}function A(H,O){if(typeof EBML>"u")throw new Error("Please link: https://www.webrtc-experiment.com/EBML.js");var L=new EBML.Reader,M=new EBML.Decoder,q=EBML.tools,X=new FileReader;X.onload=function(J){var W=M.decode(this.result);W.forEach(function(Te){L.read(Te)}),L.stop();var re=q.makeMetadataSeekable(L.metadatas,L.duration,L.cues),ae=this.result.slice(L.metadataSize),ce=new Blob([re,ae],{type:"video/webm"});O(ce)},X.readAsArrayBuffer(H)}typeof t<"u"&&(t.invokeSaveAsDialog=S,t.getTracks=T,t.getSeekableBlob=A,t.bytesToSize=w,t.isElectron=E);/** 1000 * Storage is a standalone object used by {@link RecordRTC} to store reusable objects e.g. "new AudioContext". 1001 * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} 1002 * @author {@link https://MuazKhan.com|Muaz Khan} 1003 * @example 1004 * Storage.AudioContext === webkitAudioContext 1005 * @property {webkitAudioContext} AudioContext - Keeps a reference to AudioContext object. 1006 * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} 1007 */var k={};typeof u<"u"?k.AudioContext=u:typeof webkitAudioContext<"u"&&(k.AudioContext=webkitAudioContext),typeof t<"u"&&(t.Storage=k);function j(){if(g||x||h)return!0;var H=navigator.userAgent,O=""+parseFloat(navigator.appVersion),L=parseInt(navigator.appVersion,10),M,q;return(v||p)&&(M=H.indexOf("Chrome"),O=H.substring(M+7)),(q=O.indexOf(";"))!==-1&&(O=O.substring(0,q)),(q=O.indexOf(" "))!==-1&&(O=O.substring(0,q)),L=parseInt(""+O,10),isNaN(L)&&(O=""+parseFloat(navigator.appVersion),L=parseInt(navigator.appVersion,10)),L>=49}/** 1008 * MediaStreamRecorder is an abstraction layer for {@link https://w3c.github.io/mediacapture-record/MediaRecorder.html|MediaRecorder API}. It is used by {@link RecordRTC} to record MediaStream(s) in both Chrome and Firefox. 1009 * @summary Runs top over {@link https://w3c.github.io/mediacapture-record/MediaRecorder.html|MediaRecorder API}. 1010 * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} 1011 * @author {@link https://github.com/muaz-khan|Muaz Khan} 1012 * @typedef MediaStreamRecorder 1013 * @class 1014 * @example 1015 * var config = { 1016 * mimeType: 'video/webm', // vp8, vp9, h264, mkv, opus/vorbis 1017 * audioBitsPerSecond : 256 * 8 * 1024, 1018 * videoBitsPerSecond : 256 * 8 * 1024, 1019 * bitsPerSecond: 256 * 8 * 1024, // if this is provided, skip above two 1020 * checkForInactiveTracks: true, 1021 * timeSlice: 1000, // concatenate intervals based blobs 1022 * ondataavailable: function() {} // get intervals based blobs 1023 * } 1024 * var recorder = new MediaStreamRecorder(mediaStream, config); 1025 * recorder.record(); 1026 * recorder.stop(function(blob) { 1027 * video.src = URL.createObjectURL(blob); 1028 * 1029 * // or 1030 * var blob = recorder.blob; 1031 * }); 1032 * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} 1033 * @param {MediaStream} mediaStream - MediaStream object fetched using getUserMedia API or generated using captureStreamUntilEnded or WebAudio API. 1034 * @param {object} config - {disableLogs:true, initCallback: function, mimeType: "video/webm", timeSlice: 1000} 1035 * @throws Will throw an error if first argument "MediaStream" is missing. Also throws error if "MediaRecorder API" are not supported by the browser. 1036 */function R(H,O){var ce=this;if(typeof H>"u")throw'First argument "MediaStream" is required.';if(typeof MediaRecorder>"u")throw"Your browser does not support the Media Recorder API. Please try other modules e.g. WhammyRecorder or StereoAudioRecorder.";if(O=O||{mimeType:"video/webm"},O.type==="audio"){if(T(H,"video").length&&T(H,"audio").length){var L;navigator.mozGetUserMedia?(L=new _,L.addTrack(T(H,"audio")[0])):L=new _(T(H,"audio")),H=L}(!O.mimeType||O.mimeType.toString().toLowerCase().indexOf("audio")===-1)&&(O.mimeType=v?"audio/webm":"audio/ogg"),O.mimeType&&O.mimeType.toString().toLowerCase()!=="audio/ogg"&&navigator.mozGetUserMedia&&(O.mimeType="audio/ogg")}var M=[];this.getArrayOfBlobs=function(){return M},this.record=function(){ce.blob=null,ce.clearRecordedData(),ce.timestamps=[],ae=[],M=[];var Te=O;O.disableLogs||console.log("Passing following config over MediaRecorder API.",Te),W&&(W=null),v&&!j()&&(Te="video/vp8"),typeof MediaRecorder.isTypeSupported=="function"&&Te.mimeType&&(MediaRecorder.isTypeSupported(Te.mimeType)||(O.disableLogs||console.warn("MediaRecorder API seems unable to record mimeType:",Te.mimeType),Te.mimeType=O.type==="audio"?"audio/webm":"video/webm"));try{W=new MediaRecorder(H,Te),O.mimeType=Te.mimeType}catch{W=new MediaRecorder(H)}Te.mimeType&&!MediaRecorder.isTypeSupported&&"canRecordMimeType"in W&&W.canRecordMimeType(Te.mimeType)===!1&&(O.disableLogs||console.warn("MediaRecorder API seems unable to record mimeType:",Te.mimeType)),W.ondataavailable=function(fe){if(fe.data&&ae.push("ondataavailable: "+w(fe.data.size)),typeof O.timeSlice=="number"){if(fe.data&&fe.data.size&&(M.push(fe.data),q(),typeof O.ondataavailable=="function")){var xe=O.getNativeBlob?fe.data:new Blob([fe.data],{type:X(Te)});O.ondataavailable(xe)}return}if(!fe.data||!fe.data.size||fe.data.size<100||ce.blob){ce.recordingCallback&&(ce.recordingCallback(new Blob([],{type:X(Te)})),ce.recordingCallback=null);return}ce.blob=O.getNativeBlob?fe.data:new Blob([fe.data],{type:X(Te)}),ce.recordingCallback&&(ce.recordingCallback(ce.blob),ce.recordingCallback=null)},W.onstart=function(){ae.push("started")},W.onpause=function(){ae.push("paused")},W.onresume=function(){ae.push("resumed")},W.onstop=function(){ae.push("stopped")},W.onerror=function(fe){fe&&(fe.name||(fe.name="UnknownError"),ae.push("error: "+fe),O.disableLogs||(fe.name.toString().toLowerCase().indexOf("invalidstate")!==-1?console.error("The MediaRecorder is not in a state in which the proposed operation is allowed to be executed.",fe):fe.name.toString().toLowerCase().indexOf("notsupported")!==-1?console.error("MIME type (",Te.mimeType,") is not supported.",fe):fe.name.toString().toLowerCase().indexOf("security")!==-1?console.error("MediaRecorder security error",fe):fe.name==="OutOfMemory"?console.error("The UA has exhaused the available memory. User agents SHOULD provide as much additional information as possible in the message attribute.",fe):fe.name==="IllegalStreamModification"?console.error("A modification to the stream has occurred that makes it impossible to continue recording. An example would be the addition of a Track while recording is occurring. User agents SHOULD provide as much additional information as possible in the message attribute.",fe):fe.name==="OtherRecordingError"?console.error("Used for an fatal error other than those listed above. User agents SHOULD provide as much additional information as possible in the message attribute.",fe):fe.name==="GenericError"?console.error("The UA cannot provide the codec or recording option that has been requested.",fe):console.error("MediaRecorder Error",fe)),(function(xe){if(!ce.manuallyStopped&&W&&W.state==="inactive"){delete O.timeslice,W.start(600*1e3);return}setTimeout(xe,1e3)})(),W.state!=="inactive"&&W.state!=="stopped"&&W.stop())},typeof O.timeSlice=="number"?(q(),W.start(O.timeSlice)):W.start(36e5),O.initCallback&&O.initCallback()},this.timestamps=[];function q(){ce.timestamps.push(new Date().getTime()),typeof O.onTimeStamp=="function"&&O.onTimeStamp(ce.timestamps[ce.timestamps.length-1],ce.timestamps)}function X(Te){return W&&W.mimeType?W.mimeType:Te.mimeType||"video/webm"}this.stop=function(Te){Te=Te||function(){},ce.manuallyStopped=!0,W&&(this.recordingCallback=Te,W.state==="recording"&&W.stop(),typeof O.timeSlice=="number"&&setTimeout(function(){ce.blob=new Blob(M,{type:X(O)}),ce.recordingCallback(ce.blob)},100))},this.pause=function(){W&&W.state==="recording"&&W.pause()},this.resume=function(){W&&W.state==="paused"&&W.resume()},this.clearRecordedData=function(){W&&W.state==="recording"&&ce.stop(J),J()};function J(){M=[],W=null,ce.timestamps=[]}var W;this.getInternalRecorder=function(){return W};function re(){if("active"in H){if(!H.active)return!1}else if("ended"in H&&H.ended)return!1;return!0}this.blob=null,this.getState=function(){return W&&W.state||"inactive"};var ae=[];this.getAllStates=function(){return ae},typeof O.checkForInactiveTracks>"u"&&(O.checkForInactiveTracks=!1);var ce=this;(function Te(){if(!(!W||O.checkForInactiveTracks===!1)){if(re()===!1){O.disableLogs||console.log("MediaStream seems stopped."),ce.stop();return}setTimeout(Te,1e3)}})(),this.name="MediaStreamRecorder",this.toString=function(){return this.name}}typeof t<"u"&&(t.MediaStreamRecorder=R);/** 1037 * StereoAudioRecorder is a standalone class used by {@link RecordRTC} to bring "stereo" audio-recording in chrome. 1038 * @summary JavaScript standalone object for stereo audio recording. 1039 * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} 1040 * @author {@link https://MuazKhan.com|Muaz Khan} 1041 * @typedef StereoAudioRecorder 1042 * @class 1043 * @example 1044 * var recorder = new StereoAudioRecorder(MediaStream, { 1045 * sampleRate: 44100, 1046 * bufferSize: 4096 1047 * }); 1048 * recorder.record(); 1049 * recorder.stop(function(blob) { 1050 * video.src = URL.createObjectURL(blob); 1051 * }); 1052 * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} 1053 * @param {MediaStream} mediaStream - MediaStream object fetched using getUserMedia API or generated using captureStreamUntilEnded or WebAudio API. 1054 * @param {object} config - {sampleRate: 44100, bufferSize: 4096, numberOfAudioChannels: 1, etc.} 1055 */function P(H,O){if(!T(H,"audio").length)throw"Your stream has no audio tracks.";O=O||{};var L=this,M=[],q=[],X=!1,J=0,W,re=2,ae=O.desiredSampRate;O.leftChannel===!0&&(re=1),O.numberOfAudioChannels===1&&(re=1),(!re||re<1)&&(re=2),O.disableLogs||console.log("StereoAudioRecorder is set to record number of channels: "+re),typeof O.checkForInactiveTracks>"u"&&(O.checkForInactiveTracks=!0);function ce(){if(O.checkForInactiveTracks===!1)return!0;if("active"in H){if(!H.active)return!1}else if("ended"in H&&H.ended)return!1;return!0}this.record=function(){if(ce()===!1)throw"Please make sure MediaStream is active.";pt(),ue=et=!1,X=!0,typeof O.timeSlice<"u"&&be()};function Te(me,we){function Le(St,Ut){var Ht=St.numberOfAudioChannels,Rt=St.leftBuffers.slice(0),Ct=St.rightBuffers.slice(0),Wt=St.sampleRate,Tn=St.internalInterleavedLength,Ie=St.desiredSampRate;Ht===2&&(Rt=Mn(Rt,Tn),Ct=Mn(Ct,Tn),Ie&&(Rt=dt(Rt,Ie,Wt),Ct=dt(Ct,Ie,Wt))),Ht===1&&(Rt=Mn(Rt,Tn),Ie&&(Rt=dt(Rt,Ie,Wt))),Ie&&(Wt=Ie);function dt(Or,br,fi){var zi=Math.round(Or.length*(br/fi)),Gi=[],le=Number((Or.length-1)/(zi-1));Gi[0]=Or[0];for(var ve=1;ve<zi-1;ve++){var he=ve*le,pe=Number(Math.floor(he)).toFixed(),ye=Number(Math.ceil(he)).toFixed(),Ee=he-pe;Gi[ve]=$t(Or[pe],Or[ye],Ee)}return Gi[zi-1]=Or[Or.length-1],Gi}function $t(Or,br,fi){return Or+(br-Or)*fi}function Mn(Or,br){for(var fi=new Float64Array(br),zi=0,Gi=Or.length,le=0;le<Gi;le++){var ve=Or[le];fi.set(ve,zi),zi+=ve.length}return fi}function Ve(Or,br){for(var fi=Or.length+br.length,zi=new Float64Array(fi),Gi=0,le=0;le<fi;)zi[le++]=Or[Gi],zi[le++]=br[Gi],Gi++;return zi}function ct(Or,br,fi){for(var zi=fi.length,Gi=0;Gi<zi;Gi++)Or.setUint8(br+Gi,fi.charCodeAt(Gi))}var Gt;Ht===2&&(Gt=Ve(Rt,Ct)),Ht===1&&(Gt=Rt);var Cn=Gt.length,Zr=44+Cn*2,rn=new ArrayBuffer(Zr),_n=new DataView(rn);ct(_n,0,"RIFF"),_n.setUint32(4,36+Cn*2,!0),ct(_n,8,"WAVE"),ct(_n,12,"fmt "),_n.setUint32(16,16,!0),_n.setUint16(20,1,!0),_n.setUint16(22,Ht,!0),_n.setUint32(24,Wt,!0),_n.setUint32(28,Wt*Ht*2,!0),_n.setUint16(32,Ht*2,!0),_n.setUint16(34,16,!0),ct(_n,36,"data"),_n.setUint32(40,Cn*2,!0);for(var Hn=Cn,Jr=44,Nr=1,Ns=0;Ns<Hn;Ns++)_n.setInt16(Jr,Gt[Ns]*(32767*Nr),!0),Jr+=2;if(Ut)return Ut({buffer:rn,view:_n});postMessage({buffer:rn,view:_n})}if(me.noWorker){Le(me,function(St){we(St.buffer,St.view)});return}var oe=fe(Le);oe.onmessage=function(St){we(St.data.buffer,St.data.view),d.revokeObjectURL(oe.workerURL),oe.terminate()},oe.postMessage(me)}function fe(me){var we=d.createObjectURL(new Blob([me.toString(),";this.onmessage = function (eee) {"+me.name+"(eee.data);}"],{type:"application/javascript"})),Le=new Worker(we);return Le.workerURL=we,Le}this.stop=function(me){me=me||function(){},X=!1,Te({desiredSampRate:ae,sampleRate:Se,numberOfAudioChannels:re,internalInterleavedLength:J,leftBuffers:M,rightBuffers:re===1?[]:q,noWorker:O.noWorker},function(we,Le){L.blob=new Blob([Le],{type:"audio/wav"}),L.buffer=new ArrayBuffer(Le.buffer.byteLength),L.view=Le,L.sampleRate=ae||Se,L.bufferSize=tt,L.length=J,ue=!1,me&&me(L.blob)})},typeof t.Storage>"u"&&(t.Storage={AudioContextConstructor:null,AudioContext:window.AudioContext||window.webkitAudioContext}),(!t.Storage.AudioContextConstructor||t.Storage.AudioContextConstructor.state==="closed")&&(t.Storage.AudioContextConstructor=new t.Storage.AudioContext);var xe=t.Storage.AudioContextConstructor,ke=xe.createMediaStreamSource(H),Fe=[0,256,512,1024,2048,4096,8192,16384],tt=typeof O.bufferSize>"u"?4096:O.bufferSize;if(Fe.indexOf(tt)===-1&&(O.disableLogs||console.log("Legal values for buffer-size are "+JSON.stringify(Fe,null," "))),xe.createJavaScriptNode)W=xe.createJavaScriptNode(tt,re,re);else if(xe.createScriptProcessor)W=xe.createScriptProcessor(tt,re,re);else throw"WebAudio API has no support on this browser.";ke.connect(W),O.bufferSize||(tt=W.bufferSize);var Se=typeof O.sampleRate<"u"?O.sampleRate:xe.sampleRate||44100;(Se<22050||Se>96e3)&&(O.disableLogs||console.log("sample-rate must be under range 22050 and 96000.")),O.disableLogs||O.desiredSampRate&&console.log("Desired sample-rate: "+O.desiredSampRate);var et=!1;this.pause=function(){et=!0},this.resume=function(){if(ce()===!1)throw"Please make sure MediaStream is active.";if(!X){O.disableLogs||console.log("Seems recording has been restarted."),this.record();return}et=!1},this.clearRecordedData=function(){O.checkForInactiveTracks=!1,X&&this.stop(ie),ie()};function pt(){M=[],q=[],J=0,ue=!1,X=!1,et=!1,xe=null,L.leftchannel=M,L.rightchannel=q,L.numberOfAudioChannels=re,L.desiredSampRate=ae,L.sampleRate=Se,L.recordingLength=J,De={left:[],right:[],recordingLength:0}}function ie(){W&&(W.onaudioprocess=null,W.disconnect(),W=null),ke&&(ke.disconnect(),ke=null),pt()}this.name="StereoAudioRecorder",this.toString=function(){return this.name};var ue=!1;function Ne(me){if(!et){if(ce()===!1&&(O.disableLogs||console.log("MediaStream seems stopped."),W.disconnect(),X=!1),!X){ke&&(ke.disconnect(),ke=null);return}ue||(ue=!0,O.onAudioProcessStarted&&O.onAudioProcessStarted(),O.initCallback&&O.initCallback());var we=me.inputBuffer.getChannelData(0),Le=new Float32Array(we);if(M.push(Le),re===2){var oe=me.inputBuffer.getChannelData(1),St=new Float32Array(oe);q.push(St)}J+=tt,L.recordingLength=J,typeof O.timeSlice<"u"&&(De.recordingLength+=tt,De.left.push(Le),re===2&&De.right.push(St))}}W.onaudioprocess=Ne,xe.createMediaStreamDestination?W.connect(xe.createMediaStreamDestination()):W.connect(xe.destination),this.leftchannel=M,this.rightchannel=q,this.numberOfAudioChannels=re,this.desiredSampRate=ae,this.sampleRate=Se,L.recordingLength=J;var De={left:[],right:[],recordingLength:0};function be(){!X||typeof O.ondataavailable!="function"||typeof O.timeSlice>"u"||(De.left.length?(Te({desiredSampRate:ae,sampleRate:Se,numberOfAudioChannels:re,internalInterleavedLength:De.recordingLength,leftBuffers:De.left,rightBuffers:re===1?[]:De.right},function(me,we){var Le=new Blob([we],{type:"audio/wav"});O.ondataavailable(Le),setTimeout(be,O.timeSlice)}),De={left:[],right:[],recordingLength:0}):setTimeout(be,O.timeSlice))}}typeof t<"u"&&(t.StereoAudioRecorder=P);/** 1056 * CanvasRecorder is a standalone class used by {@link RecordRTC} to bring HTML5-Canvas recording into video WebM. It uses HTML2Canvas library and runs top over {@link Whammy}. 1057 * @summary HTML2Canvas recording into video WebM. 1058 * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} 1059 * @author {@link https://MuazKhan.com|Muaz Khan} 1060 * @typedef CanvasRecorder 1061 * @class 1062 * @example 1063 * var recorder = new CanvasRecorder(htmlElement, { disableLogs: true, useWhammyRecorder: true }); 1064 * recorder.record(); 1065 * recorder.stop(function(blob) { 1066 * video.src = URL.createObjectURL(blob); 1067 * }); 1068 * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} 1069 * @param {HTMLElement} htmlElement - querySelector/getElementById/getElementsByTagName[0]/etc. 1070 * @param {object} config - {disableLogs:true, initCallback: function} 1071 */function V(H,O){if(typeof html2canvas>"u")throw"Please link: https://www.webrtc-experiment.com/screenshot.js";O=O||{},O.frameInterval||(O.frameInterval=10);var L=!1;["captureStream","mozCaptureStream","webkitCaptureStream"].forEach(function(Fe){Fe in document.createElement("canvas")&&(L=!0)});var M=(!!window.webkitRTCPeerConnection||!!window.webkitGetUserMedia)&&!!window.chrome,q=50,X=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);M&&X&&X[2]&&(q=parseInt(X[2],10)),M&&q<52&&(L=!1),O.useWhammyRecorder&&(L=!1);var J,W;if(L)if(O.disableLogs||console.log("Your browser supports both MediRecorder API and canvas.captureStream!"),H instanceof HTMLCanvasElement)J=H;else if(H instanceof CanvasRenderingContext2D)J=H.canvas;else throw"Please pass either HTMLCanvasElement or CanvasRenderingContext2D.";else navigator.mozGetUserMedia&&(O.disableLogs||console.error("Canvas recording is NOT supported in Firefox."));var re;this.record=function(){if(re=!0,L&&!O.useWhammyRecorder){var Fe;"captureStream"in J?Fe=J.captureStream(25):"mozCaptureStream"in J?Fe=J.mozCaptureStream(25):"webkitCaptureStream"in J&&(Fe=J.webkitCaptureStream(25));try{var tt=new _;tt.addTrack(T(Fe,"video")[0]),Fe=tt}catch{}if(!Fe)throw"captureStream API are NOT available.";W=new R(Fe,{mimeType:O.mimeType||"video/webm"}),W.record()}else ke.frames=[],xe=new Date().getTime(),fe();O.initCallback&&O.initCallback()},this.getWebPImages=function(Fe){if(H.nodeName.toLowerCase()!=="canvas"){Fe();return}var tt=ke.frames.length;ke.frames.forEach(function(Se,et){var pt=tt-et;O.disableLogs||console.log(pt+"/"+tt+" frames remaining"),O.onEncodingCallback&&O.onEncodingCallback(pt,tt);var ie=Se.image.toDataURL("image/webp",1);ke.frames[et].image=ie}),O.disableLogs||console.log("Generating WebM"),Fe()},this.stop=function(Fe){re=!1;var tt=this;if(L&&W){W.stop(Fe);return}this.getWebPImages(function(){ke.compile(function(Se){O.disableLogs||console.log("Recording finished!"),tt.blob=Se,tt.blob.forEach&&(tt.blob=new Blob([],{type:"video/webm"})),Fe&&Fe(tt.blob),ke.frames=[]})})};var ae=!1;this.pause=function(){if(ae=!0,W instanceof R){W.pause();return}},this.resume=function(){if(ae=!1,W instanceof R){W.resume();return}re||this.record()},this.clearRecordedData=function(){re&&this.stop(ce),ce()};function ce(){ke.frames=[],re=!1,ae=!1}this.name="CanvasRecorder",this.toString=function(){return this.name};function Te(){var Fe=document.createElement("canvas"),tt=Fe.getContext("2d");return Fe.width=H.width,Fe.height=H.height,tt.drawImage(H,0,0),Fe}function fe(){if(ae)return xe=new Date().getTime(),setTimeout(fe,500);if(H.nodeName.toLowerCase()==="canvas"){var Fe=new Date().getTime()-xe;xe=new Date().getTime(),ke.frames.push({image:Te(),duration:Fe}),re&&setTimeout(fe,O.frameInterval);return}html2canvas(H,{grabMouse:typeof O.showMousePointer>"u"||O.showMousePointer,onrendered:function(tt){var Se=new Date().getTime()-xe;if(!Se)return setTimeout(fe,O.frameInterval);xe=new Date().getTime(),ke.frames.push({image:tt.toDataURL("image/webp",1),duration:Se}),re&&setTimeout(fe,O.frameInterval)}})}var xe=new Date().getTime(),ke=new G.Video(100)}typeof t<"u"&&(t.CanvasRecorder=V);/** 1072 * WhammyRecorder is a standalone class used by {@link RecordRTC} to bring video recording in Chrome. It runs top over {@link Whammy}. 1073 * @summary Video recording feature in Chrome. 1074 * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} 1075 * @author {@link https://MuazKhan.com|Muaz Khan} 1076 * @typedef WhammyRecorder 1077 * @class 1078 * @example 1079 * var recorder = new WhammyRecorder(mediaStream); 1080 * recorder.record(); 1081 * recorder.stop(function(blob) { 1082 * video.src = URL.createObjectURL(blob); 1083 * }); 1084 * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} 1085 * @param {MediaStream} mediaStream - MediaStream object fetched using getUserMedia API or generated using captureStreamUntilEnded or WebAudio API. 1086 * @param {object} config - {disableLogs: true, initCallback: function, video: HTMLVideoElement, etc.} 1087 */function U(H,O){O=O||{},O.frameInterval||(O.frameInterval=10),O.disableLogs||console.log("Using frames-interval:",O.frameInterval),this.record=function(){O.width||(O.width=320),O.height||(O.height=240),O.video||(O.video={width:O.width,height:O.height}),O.canvas||(O.canvas={width:O.width,height:O.height}),re.width=O.canvas.width||320,re.height=O.canvas.height||240,ae=re.getContext("2d"),O.video&&O.video instanceof HTMLVideoElement?(ce=O.video.cloneNode(),O.initCallback&&O.initCallback()):(ce=document.createElement("video"),N(H,ce),ce.onloadedmetadata=function(){O.initCallback&&O.initCallback()},ce.width=O.video.width,ce.height=O.video.height),ce.muted=!0,ce.play(),Te=new Date().getTime(),fe=new G.Video,O.disableLogs||(console.log("canvas resolutions",re.width,"*",re.height),console.log("video width/height",ce.width||re.width,"*",ce.height||re.height)),L(O.frameInterval)};function L(xe){xe=typeof xe<"u"?xe:10;var ke=new Date().getTime()-Te;if(!ke)return setTimeout(L,xe,xe);if(J)return Te=new Date().getTime(),setTimeout(L,100);Te=new Date().getTime(),ce.paused&&ce.play(),ae.drawImage(ce,0,0,re.width,re.height),fe.frames.push({duration:ke,image:re.toDataURL("image/webp")}),X||setTimeout(L,xe,xe)}function M(xe){var ke=-1,Fe=xe.length;(function tt(){if(ke++,ke===Fe){xe.callback();return}setTimeout(function(){xe.functionToLoop(tt,ke)},1)})()}function q(xe,ke,Fe,tt,Se){var et=document.createElement("canvas");et.width=re.width,et.height=re.height;var pt=et.getContext("2d"),ie=[],ue=xe.length,Ne={r:0,g:0,b:0},De=Math.sqrt(Math.pow(255,2)+Math.pow(255,2)+Math.pow(255,2)),be=0,me=0,we=!1;M({length:ue,functionToLoop:function(Le,oe){var St,Ut,Ht,Rt=function(){!we&&Ht-St<=Ht*me||(we=!0,ie.push(xe[oe])),Le()};if(we)Rt();else{var Ct=new Image;Ct.onload=function(){pt.drawImage(Ct,0,0,re.width,re.height);var Wt=pt.getImageData(0,0,re.width,re.height);St=0,Ut=Wt.data.length,Ht=Wt.data.length/4;for(var Tn=0;Tn<Ut;Tn+=4){var Ie={r:Wt.data[Tn],g:Wt.data[Tn+1],b:Wt.data[Tn+2]},dt=Math.sqrt(Math.pow(Ie.r-Ne.r,2)+Math.pow(Ie.g-Ne.g,2)+Math.pow(Ie.b-Ne.b,2));dt<=De*be&&St++}Rt()},Ct.src=xe[oe].image}},callback:function(){ie=ie.concat(xe.slice(ue)),ie.length<=0&&ie.push(xe[xe.length-1]),Se(ie)}})}var X=!1;this.stop=function(xe){xe=xe||function(){},X=!0;var ke=this;setTimeout(function(){q(fe.frames,-1,null,null,function(Fe){fe.frames=Fe,O.advertisement&&O.advertisement.length&&(fe.frames=O.advertisement.concat(fe.frames)),fe.compile(function(tt){ke.blob=tt,ke.blob.forEach&&(ke.blob=new Blob([],{type:"video/webm"})),xe&&xe(ke.blob)})})},10)};var J=!1;this.pause=function(){J=!0},this.resume=function(){J=!1,X&&this.record()},this.clearRecordedData=function(){X||this.stop(W),W()};function W(){fe.frames=[],X=!0,J=!1}this.name="WhammyRecorder",this.toString=function(){return this.name};var re=document.createElement("canvas"),ae=re.getContext("2d"),ce,Te,fe}typeof t<"u"&&(t.WhammyRecorder=U);/** 1088 * Whammy is a standalone class used by {@link RecordRTC} to bring video recording in Chrome. It is written by {@link https://github.com/antimatter15|antimatter15} 1089 * @summary A real time javascript webm encoder based on a canvas hack. 1090 * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} 1091 * @author {@link https://MuazKhan.com|Muaz Khan} 1092 * @typedef Whammy 1093 * @class 1094 * @example 1095 * var recorder = new Whammy().Video(15); 1096 * recorder.add(context || canvas || dataURL); 1097 * var output = recorder.compile(); 1098 * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} 1099 */var G=(function(){function H(M){this.frames=[],this.duration=M||1,this.quality=.8}H.prototype.add=function(M,q){if("canvas"in M&&(M=M.canvas),"toDataURL"in M&&(M=M.toDataURL("image/webp",this.quality)),!/^data:image\/webp;base64,/ig.test(M))throw"Input must be formatted properly as a base64 encoded DataURI of type image/webp";this.frames.push({image:M,duration:q||this.duration})};function O(M){var q=d.createObjectURL(new Blob([M.toString(),"this.onmessage = function (eee) {"+M.name+"(eee.data);}"],{type:"application/javascript"})),X=new Worker(q);return d.revokeObjectURL(q),X}function L(M){function q(Se){var et=J(Se);if(!et)return[];for(var pt=3e4,ie=[{id:440786851,data:[{data:1,id:17030},{data:1,id:17143},{data:4,id:17138},{data:8,id:17139},{data:"webm",id:17026},{data:2,id:17031},{data:2,id:17029}]},{id:408125543,data:[{id:357149030,data:[{data:1e6,id:2807729},{data:"whammy",id:19840},{data:"whammy",id:22337},{data:Fe(et.duration),id:17545}]},{id:374648427,data:[{id:174,data:[{data:1,id:215},{data:1,id:29637},{data:0,id:156},{data:"und",id:2274716},{data:"V_VP8",id:134},{data:"VP8",id:2459272},{data:1,id:131},{id:224,data:[{data:et.width,id:176},{data:et.height,id:186}]}]}]}]}],ue=0,Ne=0;ue<Se.length;){var De=[],be=0;do De.push(Se[ue]),be+=Se[ue].duration,ue++;while(ue<Se.length&&be<pt);var me=0,we={id:524531317,data:X(Ne,me,De)};ie[1].data.push(we),Ne+=be}return ce(ie)}function X(Se,et,pt){return[{data:Se,id:231}].concat(pt.map(function(ie){var ue=Te({frame:ie.data.slice(4),trackNum:1,timecode:Math.round(et)});return et+=ie.duration,{data:ue,id:163}}))}function J(Se){if(!Se[0]){postMessage({error:"Something went wrong. Maybe WebP format is not supported in the current browser."});return}for(var et=Se[0].width,pt=Se[0].height,ie=Se[0].duration,ue=1;ue<Se.length;ue++)ie+=Se[ue].duration;return{duration:ie,width:et,height:pt}}function W(Se){for(var et=[];Se>0;)et.push(Se&255),Se=Se>>8;return new Uint8Array(et.reverse())}function re(Se){return new Uint8Array(Se.split("").map(function(et){return et.charCodeAt(0)}))}function ae(Se){var et=[],pt=Se.length%8?new Array(9-Se.length%8).join("0"):"";Se=pt+Se;for(var ie=0;ie<Se.length;ie+=8)et.push(parseInt(Se.substr(ie,8),2));return new Uint8Array(et)}function ce(Se){for(var et=[],pt=0;pt<Se.length;pt++){var ie=Se[pt].data;typeof ie=="object"&&(ie=ce(ie)),typeof ie=="number"&&(ie=ae(ie.toString(2))),typeof ie=="string"&&(ie=re(ie));var ue=ie.size||ie.byteLength||ie.length,Ne=Math.ceil(Math.ceil(Math.log(ue)/Math.log(2))/8),De=ue.toString(2),be=new Array(Ne*7+7+1-De.length).join("0")+De,me=new Array(Ne).join("0")+"1"+be;et.push(W(Se[pt].id)),et.push(ae(me)),et.push(ie)}return new Blob(et,{type:"video/webm"})}function Te(Se){var et=0;et|=128;var pt=[Se.trackNum|128,Se.timecode>>8,Se.timecode&255,et].map(function(ie){return String.fromCharCode(ie)}).join("")+Se.frame;return pt}function fe(Se){for(var et=Se.RIFF[0].WEBP[0],pt=et.indexOf("�*"),ie=0,ue=[];ie<4;ie++)ue[ie]=et.charCodeAt(pt+3+ie);var Ne,De,be;return be=ue[1]<<8|ue[0],Ne=be&16383,be=ue[3]<<8|ue[2],De=be&16383,{width:Ne,height:De,data:et,riff:Se}}function xe(Se,et){return parseInt(Se.substr(et+4,4).split("").map(function(pt){var ie=pt.charCodeAt(0).toString(2);return new Array(8-ie.length+1).join("0")+ie}).join(""),2)}function ke(Se){for(var et=0,pt={};et<Se.length;){var ie=Se.substr(et,4),ue=xe(Se,et),Ne=Se.substr(et+4+4,ue);et+=8+ue,pt[ie]=pt[ie]||[],ie==="RIFF"||ie==="LIST"?pt[ie].push(ke(Ne)):pt[ie].push(Ne)}return pt}function Fe(Se){return[].slice.call(new Uint8Array(new Float64Array([Se]).buffer),0).map(function(et){return String.fromCharCode(et)}).reverse().join("")}var tt=new q(M.map(function(Se){var et=fe(ke(atob(Se.image.slice(23))));return et.duration=Se.duration,et}));postMessage(tt)}return H.prototype.compile=function(M){var q=O(L);q.onmessage=function(X){if(X.data.error){console.error(X.data.error);return}M(X.data)},q.postMessage(this.frames)},{Video:H}})();typeof t<"u"&&(t.Whammy=G);/** 1100 * DiskStorage is a standalone object used by {@link RecordRTC} to store recorded blobs in IndexedDB storage. 1101 * @summary Writing blobs into IndexedDB. 1102 * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} 1103 * @author {@link https://MuazKhan.com|Muaz Khan} 1104 * @example 1105 * DiskStorage.Store({ 1106 * audioBlob: yourAudioBlob, 1107 * videoBlob: yourVideoBlob, 1108 * gifBlob : yourGifBlob 1109 * }); 1110 * DiskStorage.Fetch(function(dataURL, type) { 1111 * if(type === 'audioBlob') { } 1112 * if(type === 'videoBlob') { } 1113 * if(type === 'gifBlob') { } 1114 * }); 1115 * // DiskStorage.dataStoreName = 'recordRTC'; 1116 * // DiskStorage.onError = function(error) { }; 1117 * @property {function} init - This method must be called once to initialize IndexedDB ObjectStore. Though, it is auto-used internally. 1118 * @property {function} Fetch - This method fetches stored blobs from IndexedDB. 1119 * @property {function} Store - This method stores blobs in IndexedDB. 1120 * @property {function} onError - This function is invoked for any known/unknown error. 1121 * @property {string} dataStoreName - Name of the ObjectStore created in IndexedDB storage. 1122 * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} 1123 */var Q={init:function(){var H=this;if(typeof indexedDB>"u"||typeof indexedDB.open>"u"){console.error("IndexedDB API are not available in this browser.");return}var O=1,L=this.dbName||location.href.replace(/\/|:|#|%|\.|\[|\]/g,""),M,q=indexedDB.open(L,O);function X(W){W.createObjectStore(H.dataStoreName)}function J(){var W=M.transaction([H.dataStoreName],"readwrite");H.videoBlob&&W.objectStore(H.dataStoreName).put(H.videoBlob,"videoBlob"),H.gifBlob&&W.objectStore(H.dataStoreName).put(H.gifBlob,"gifBlob"),H.audioBlob&&W.objectStore(H.dataStoreName).put(H.audioBlob,"audioBlob");function re(ae){W.objectStore(H.dataStoreName).get(ae).onsuccess=function(ce){H.callback&&H.callback(ce.target.result,ae)}}re("audioBlob"),re("videoBlob"),re("gifBlob")}q.onerror=H.onError,q.onsuccess=function(){if(M=q.result,M.onerror=H.onError,M.setVersion)if(M.version!==O){var W=M.setVersion(O);W.onsuccess=function(){X(M),J()}}else J();else J()},q.onupgradeneeded=function(W){X(W.target.result)}},Fetch:function(H){return this.callback=H,this.init(),this},Store:function(H){return this.audioBlob=H.audioBlob,this.videoBlob=H.videoBlob,this.gifBlob=H.gifBlob,this.init(),this},onError:function(H){console.error(JSON.stringify(H,null," "))},dataStoreName:"recordRTC",dbName:null};typeof t<"u"&&(t.DiskStorage=Q);/** 1124 * GifRecorder is standalone calss used by {@link RecordRTC} to record video or canvas into animated gif. 1125 * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} 1126 * @author {@link https://MuazKhan.com|Muaz Khan} 1127 * @typedef GifRecorder 1128 * @class 1129 * @example 1130 * var recorder = new GifRecorder(mediaStream || canvas || context, { onGifPreview: function, onGifRecordingStarted: function, width: 1280, height: 720, frameRate: 200, quality: 10 }); 1131 * recorder.record(); 1132 * recorder.stop(function(blob) { 1133 * img.src = URL.createObjectURL(blob); 1134 * }); 1135 * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} 1136 * @param {MediaStream} mediaStream - MediaStream object or HTMLCanvasElement or CanvasRenderingContext2D. 1137 * @param {object} config - {disableLogs:true, initCallback: function, width: 320, height: 240, frameRate: 200, quality: 10} 1138 */function Z(H,O){if(typeof GIFEncoder>"u"){var L=document.createElement("script");L.src="https://www.webrtc-experiment.com/gif-recorder.js",(document.body||document.documentElement).appendChild(L)}O=O||{};var M=H instanceof CanvasRenderingContext2D||H instanceof HTMLCanvasElement;this.record=function(){if(typeof GIFEncoder>"u"){setTimeout(xe.record,1e3);return}if(!re){setTimeout(xe.record,1e3);return}M||(O.width||(O.width=ae.offsetWidth||320),O.height||(O.height=ae.offsetHeight||240),O.video||(O.video={width:O.width,height:O.height}),O.canvas||(O.canvas={width:O.width,height:O.height}),J.width=O.canvas.width||320,J.height=O.canvas.height||240,ae.width=O.video.width||320,ae.height=O.video.height||240),fe=new GIFEncoder,fe.setRepeat(0),fe.setDelay(O.frameRate||200),fe.setQuality(O.quality||10),fe.start(),typeof O.onGifRecordingStarted=="function"&&O.onGifRecordingStarted();function ke(Fe){if(xe.clearedRecordedData!==!0){if(q)return setTimeout(function(){ke(Fe)},100);ce=a(ke),typeof Te===void 0&&(Te=Fe),!(Fe-Te<90)&&(!M&&ae.paused&&ae.play(),M||W.drawImage(ae,0,0,J.width,J.height),O.onGifPreview&&O.onGifPreview(J.toDataURL("image/png")),fe.addFrame(W),Te=Fe)}}ce=a(ke),O.initCallback&&O.initCallback()},this.stop=function(ke){ke=ke||function(){},ce&&c(ce),this.blob=new Blob([new Uint8Array(fe.stream().bin)],{type:"image/gif"}),ke(this.blob),fe.stream().bin=[]};var q=!1;this.pause=function(){q=!0},this.resume=function(){q=!1},this.clearRecordedData=function(){xe.clearedRecordedData=!0,X()};function X(){fe&&(fe.stream().bin=[])}this.name="GifRecorder",this.toString=function(){return this.name};var J=document.createElement("canvas"),W=J.getContext("2d");M&&(H instanceof CanvasRenderingContext2D?(W=H,J=W.canvas):H instanceof HTMLCanvasElement&&(W=H.getContext("2d"),J=H));var re=!0;if(!M){var ae=document.createElement("video");
1138ae.muted=!0,ae.autoplay=!0,ae.playsInline=!0,re=!1,ae.onloadedmetadata=function(){re=!0},N(H,ae),ae.play()}var ce=null,Te,fe,xe=this}typeof t<"u"&&(t.GifRecorder=Z);function K(H,O){var L="Fake/5.0 (FakeOS) AppleWebKit/123 (KHTML, like Gecko) Fake/12.3.4567.89 Fake/123.45";(function(ie){typeof t<"u"||ie&&(typeof window<"u"||typeof hr>"u"||(hr.navigator={userAgent:L,getUserMedia:function(){}},hr.console||(hr.console={}),(typeof hr.console.log>"u"||typeof hr.console.error>"u")&&(hr.console.error=hr.console.log=hr.console.log||function(){console.log(arguments)}),typeof document>"u"&&(ie.document={documentElement:{appendChild:function(){return""}}},document.createElement=document.captureStream=document.mozCaptureStream=function(){var ue={getContext:function(){return ue},play:function(){},pause:function(){},drawImage:function(){},toDataURL:function(){return""},style:{}};return ue},ie.HTMLVideoElement=function(){}),typeof location>"u"&&(ie.location={protocol:"file:",href:"",hash:""}),typeof screen>"u"&&(ie.screen={width:0,height:0}),typeof ae>"u"&&(ie.URL={createObjectURL:function(){return""},revokeObjectURL:function(){return""}}),ie.window=hr))})(typeof hr<"u"?hr:null),O=O||"multi-streams-mixer";var M=[],q=!1,X=document.createElement("canvas"),J=X.getContext("2d");X.style.opacity=0,X.style.position="absolute",X.style.zIndex=-1,X.style.top="-1000em",X.style.left="-1000em",X.className=O,(document.body||document.documentElement).appendChild(X),this.disableLogs=!1,this.frameInterval=10,this.width=360,this.height=240,this.useGainNode=!0;var W=this,re=window.AudioContext;typeof re>"u"&&(typeof webkitAudioContext<"u"&&(re=webkitAudioContext),typeof mozAudioContext<"u"&&(re=mozAudioContext));var ae=window.URL;typeof ae>"u"&&typeof webkitURL<"u"&&(ae=webkitURL),typeof navigator<"u"&&typeof navigator.getUserMedia>"u"&&(typeof navigator.webkitGetUserMedia<"u"&&(navigator.getUserMedia=navigator.webkitGetUserMedia),typeof navigator.mozGetUserMedia<"u"&&(navigator.getUserMedia=navigator.mozGetUserMedia));var ce=window.MediaStream;typeof ce>"u"&&typeof webkitMediaStream<"u"&&(ce=webkitMediaStream),typeof ce<"u"&&typeof ce.prototype.stop>"u"&&(ce.prototype.stop=function(){this.getTracks().forEach(function(ie){ie.stop()})});var Te={};typeof re<"u"?Te.AudioContext=re:typeof webkitAudioContext<"u"&&(Te.AudioContext=webkitAudioContext);function fe(ie,ue){"srcObject"in ue?ue.srcObject=ie:"mozSrcObject"in ue?ue.mozSrcObject=ie:ue.srcObject=ie}this.startDrawingFrames=function(){xe()};function xe(){if(!q){var ie=M.length,ue=!1,Ne=[];if(M.forEach(function(be){be.stream||(be.stream={}),be.stream.fullcanvas?ue=be:Ne.push(be)}),ue)X.width=ue.stream.width,X.height=ue.stream.height;else if(Ne.length){X.width=ie>1?Ne[0].width*2:Ne[0].width;var De=1;(ie===3||ie===4)&&(De=2),(ie===5||ie===6)&&(De=3),(ie===7||ie===8)&&(De=4),(ie===9||ie===10)&&(De=5),X.height=Ne[0].height*De}else X.width=W.width||360,X.height=W.height||240;ue&&ue instanceof HTMLVideoElement&&ke(ue),Ne.forEach(function(be,me){ke(be,me)}),setTimeout(xe,W.frameInterval)}}function ke(ie,ue){if(!q){var Ne=0,De=0,be=ie.width,me=ie.height;ue===1&&(Ne=ie.width),ue===2&&(De=ie.height),ue===3&&(Ne=ie.width,De=ie.height),ue===4&&(De=ie.height*2),ue===5&&(Ne=ie.width,De=ie.height*2),ue===6&&(De=ie.height*3),ue===7&&(Ne=ie.width,De=ie.height*3),typeof ie.stream.left<"u"&&(Ne=ie.stream.left),typeof ie.stream.top<"u"&&(De=ie.stream.top),typeof ie.stream.width<"u"&&(be=ie.stream.width),typeof ie.stream.height<"u"&&(me=ie.stream.height),J.drawImage(ie,Ne,De,be,me),typeof ie.stream.onRender=="function"&&ie.stream.onRender(J,Ne,De,be,me,ue)}}function Fe(){q=!1;var ie=tt(),ue=Se();return ue&&ue.getTracks().filter(function(Ne){return Ne.kind==="audio"}).forEach(function(Ne){ie.addTrack(Ne)}),H.forEach(function(Ne){Ne.fullcanvas}),ie}function tt(){pt();var ie;"captureStream"in X?ie=X.captureStream():"mozCaptureStream"in X?ie=X.mozCaptureStream():W.disableLogs||console.error("Upgrade to latest Chrome or otherwise enable this flag: chrome://flags/#enable-experimental-web-platform-features");var ue=new ce;return ie.getTracks().filter(function(Ne){return Ne.kind==="video"}
vendor: 5,504 bytes, lines 1138-1176
1138).forEach(function(Ne){ue.addTrack(Ne)}),X.stream=ue,ue}function Se(){Te.AudioContextConstructor||(Te.AudioContextConstructor=new Te.AudioContext),W.audioContext=Te.AudioContextConstructor,W.audioSources=[],W.useGainNode===!0&&(W.gainNode=W.audioContext.createGain(),W.gainNode.connect(W.audioContext.destination),W.gainNode.gain.value=0);var ie=0;if(H.forEach(function(ue){if(ue.getTracks().filter(function(De){return De.kind==="audio"}).length){ie++;var Ne=W.audioContext.createMediaStreamSource(ue);W.useGainNode===!0&&Ne.connect(W.gainNode),W.audioSources.push(Ne)}}),!!ie)return W.audioDestination=W.audioContext.createMediaStreamDestination(),W.audioSources.forEach(function(ue){ue.connect(W.audioDestination)}),W.audioDestination.stream}function et(ie){var ue=document.createElement("video");return fe(ie,ue),ue.className=O,ue.muted=!0,ue.volume=0,ue.width=ie.width||W.width||360,ue.height=ie.height||W.height||240,ue.play(),ue}this.appendStreams=function(ie){if(!ie)throw"First parameter is required.";ie instanceof Array||(ie=[ie]),ie.forEach(function(ue){var Ne=new ce;if(ue.getTracks().filter(function(me){return me.kind==="video"}).length){var De=et(ue);De.stream=ue,M.push(De),Ne.addTrack(ue.getTracks().filter(function(me){return me.kind==="video"})[0])}if(ue.getTracks().filter(function(me){return me.kind==="audio"}).length){var be=W.audioContext.createMediaStreamSource(ue);W.audioDestination=W.audioContext.createMediaStreamDestination(),be.connect(W.audioDestination),Ne.addTrack(W.audioDestination.stream.getTracks().filter(function(me){return me.kind==="audio"})[0])}H.push(Ne)})},this.releaseStreams=function(){M=[],q=!0,W.gainNode&&(W.gainNode.disconnect(),W.gainNode=null),W.audioSources.length&&(W.audioSources.forEach(function(ie){ie.disconnect()}),W.audioSources=[]),W.audioDestination&&(W.audioDestination.disconnect(),W.audioDestination=null),W.audioContext&&W.audioContext.close(),W.audioContext=null,J.clearRect(0,0,X.width,X.height),X.stream&&(X.stream.stop(),X.stream=null)},this.resetVideoStreams=function(ie){ie&&!(ie instanceof Array)&&(ie=[ie]),pt(ie)};function pt(ie){M=[],ie=ie||H,ie.forEach(function(ue){if(ue.getTracks().filter(function(De){return De.kind==="video"}).length){var Ne=et(ue);Ne.stream=ue,M.push(Ne)}})}this.name="MultiStreamsMixer",this.toString=function(){return this.name},this.getMixedStream=Fe}typeof t>"u"&&(e.exports=K);/** 1139 * MultiStreamRecorder can record multiple videos in single container. 1140 * @summary Multi-videos recorder. 1141 * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} 1142 * @author {@link https://MuazKhan.com|Muaz Khan} 1143 * @typedef MultiStreamRecorder 1144 * @class 1145 * @example 1146 * var options = { 1147 * mimeType: 'video/webm' 1148 * } 1149 * var recorder = new MultiStreamRecorder(ArrayOfMediaStreams, options); 1150 * recorder.record(); 1151 * recorder.stop(function(blob) { 1152 * video.src = URL.createObjectURL(blob); 1153 * 1154 * // or 1155 * var blob = recorder.blob; 1156 * }); 1157 * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} 1158 * @param {MediaStreams} mediaStreams - Array of MediaStreams. 1159 * @param {object} config - {disableLogs:true, frameInterval: 1, mimeType: "video/webm"} 1160 */function te(H,O){H=H||[];var L=this,M,q;O=O||{elementClass:"multi-streams-mixer",mimeType:"video/webm",video:{width:360,height:240}},O.frameInterval||(O.frameInterval=10),O.video||(O.video={}),O.video.width||(O.video.width=360),O.video.height||(O.video.height=240),this.record=function(){M=new K(H,O.elementClass||"multi-streams-mixer"),X().length&&(M.frameInterval=O.frameInterval||10,M.width=O.video.width||360,M.height=O.video.height||240,M.startDrawingFrames()),O.previewStream&&typeof O.previewStream=="function"&&O.previewStream(M.getMixedStream()),q=new R(M.getMixedStream(),O),q.record()};function X(){var J=[];return H.forEach(function(W){T(W,"video").forEach(function(re){J.push(re)})}),J}this.stop=function(J){q&&q.stop(function(W){L.blob=W,J(W),L.clearRecordedData()})},this.pause=function(){q&&q.pause()},this.resume=function(){q&&q.resume()},this.clearRecordedData=function(){q&&(q.clearRecordedData(),q=null),M&&(M.releaseStreams(),M=null)},this.addStreams=function(J){if(!J)throw"First parameter is required.";J instanceof Array||(J=[J]),H.concat(J),!(!q||!M)&&(M.appendStreams(J),O.previewStream&&typeof O.previewStream=="function"&&O.previewStream(M.getMixedStream()))},this.resetVideoStreams=function(J){M&&(J&&!(J instanceof Array)&&(J=[J]),M.resetVideoStreams(J))},this.getMixer=function(){return M},this.name="MultiStreamRecorder",this.toString=function(){return this.name}}typeof t<"u"&&(t.MultiStreamRecorder=te);/** 1161 * RecordRTCPromisesHandler adds promises support in {@link RecordRTC}. Try a {@link https://github.com/muaz-khan/RecordRTC/blob/master/simple-demos/RecordRTCPromisesHandler.html|demo here} 1162 * @summary Promises for {@link RecordRTC} 1163 * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} 1164 * @author {@link https://MuazKhan.com|Muaz Khan} 1165 * @typedef RecordRTCPromisesHandler 1166 * @class 1167 * @example 1168 * var recorder = new RecordRTCPromisesHandler(mediaStream, options); 1169 * recorder.startRecording() 1170 * .then(successCB) 1171 * .catch(errorCB); 1172 * // Note: You can access all RecordRTC API using "recorder.recordRTC" e.g. 1173 * recorder.recordRTC.onStateChanged = function(state) {}; 1174 * recorder.recordRTC.setRecordingDuration(5000); 1175 * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} 1176 * @param {MediaStream}
1176 mediaStream - Single media-stream object, array of media-streams, html-canvas-element, etc. 1177 * @param {object} config - {type:"video", recorderType: MediaStreamRecorder, disableLogs: true, numberOfAudioChannels: 1, bufferSize: 0, sampleRate: 0, video: HTMLVideoElement, etc.} 1178 * @throws Will throw an error if "new" keyword is not used to initiate "RecordRTCPromisesHandler". Also throws error if first argument "MediaStream" is missing. 1179 * @requires {@link RecordRTC} 1180 */function ne(H,O){if(!this)throw'Use "new RecordRTCPromisesHandler()"';if(typeof H>"u")throw'First argument "MediaStream" is required.';var L=this;L.recordRTC=new t(H,O),this.startRecording=function(){return new Promise(function(M,q){try{L.recordRTC.startRecording(),M()}catch(X){q(X)}})},this.stopRecording=function(){return new Promise(function(M,q){try{L.recordRTC.stopRecording(function(X){if(L.blob=L.recordRTC.getBlob(),!L.blob||!L.blob.size){q("Empty blob.",L.blob);return}M(X)})}catch(X){q(X)}})},this.pauseRecording=function(){return new Promise(function(M,q){try{L.recordRTC.pauseRecording(),M()}catch(X){q(X)}})},this.resumeRecording=function(){return new Promise(function(M,q){try{L.recordRTC.resumeRecording(),M()}catch(X){q(X)}})},this.getDataURL=function(M){return new Promise(function(q,X){try{L.recordRTC.getDataURL(function(J){q(J)})}catch(J){X(J)}})},this.getBlob=function(){return new Promise(function(M,q){try{M(L.recordRTC.getBlob())}catch(X){q(X)}})},this.getInternalRecorder=function(){return new Promise(function(M,q){try{M(L.recordRTC.getInternalRecorder())}catch(X){q(X)}})},this.reset=function(){return new Promise(function(M,q){try{M(L.recordRTC.reset())}catch(X){q(X)}})},this.destroy=function(){return new Promise(function(M,q){try{M(L.recordRTC.destroy())}catch(X){q(X)}})},this.getState=function(){return new Promise(function(M,q){try{M(L.recordRTC.getState())}catch(X){q(X)}})},this.blob=null,this.version="5.6.2"}typeof t<"u"&&(t.RecordRTCPromisesHandler=ne);/** 1181 * WebAssemblyRecorder lets you create webm videos in JavaScript via WebAssembly. The library consumes raw RGBA32 buffers (4 bytes per pixel) and turns them into a webm video with the given framerate and quality. This makes it compatible out-of-the-box with ImageData from a CANVAS. With realtime mode you can also use webm-wasm for streaming webm videos. 1182 * @summary Video recording feature in Chrome, Firefox and maybe Edge. 1183 * @license {@link https://github.com/muaz-khan/RecordRTC/blob/master/LICENSE|MIT} 1184 * @author {@link https://MuazKhan.com|Muaz Khan} 1185 * @typedef WebAssemblyRecorder 1186 * @class 1187 * @example 1188 * var recorder = new WebAssemblyRecorder(mediaStream); 1189 * recorder.record(); 1190 * recorder.stop(function(blob) { 1191 * video.src = URL.createObjectURL(blob); 1192 * }); 1193 * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code} 1194 * @param {MediaStream} mediaStream - MediaStream object fetched using getUserMedia API or generated using captureStreamUntilEnded or WebAudio API. 1195 * @param {object} config - {webAssemblyPath:'webm-wasm.wasm',workerPath: 'webm-worker.js', frameRate: 30, width: 1920, height: 1080, bitrate: 1024, realtime: true} 1196 */function se(H,O){(typeof ReadableStream>"u"||typeof WritableStream>"u")&&console.error("Following polyfill is strongly recommended: https://unpkg.com/@mattiasbuelens/web-streams-polyfill/dist/polyfill.min.js"),O=O||{},O.width=O.width||640,O.height=O.height||480,O.frameRate=O.frameRate||30,O.bitrate=O.bitrate||1200,O.realtime=O.realtime||!0;var L;function M(){return new ReadableStream({start:function(ae){var ce=document.createElement("canvas"),Te=document.createElement("video"),fe=!0;Te.srcObject=H,Te.muted=!0,Te.height=O.height,Te.width=O.width,Te.volume=0,Te.onplaying=function(){ce.width=O.width,ce.height=O.height;var xe=ce.getContext("2d"),ke=1e3/O.frameRate,Fe=setInterval(function(){if(L&&(clearInterval(Fe),ae.close()),fe&&(fe=!1,O.onVideoProcessStarted&&O.onVideoProcessStarted()),xe.drawImage(Te,0,0),ae._controlledReadableStream.state!=="closed")try{ae.enqueue(xe.getImageData(0,0,O.width,O.height))}catch{}},ke)},Te.play()}})}var q;function X(ae,ce){if(!O.workerPath&&!ce){L=!1,fetch("https://unpkg.com/webm-wasm@latest/dist/webm-worker.js").then(function(fe){fe.arrayBuffer().then(function(xe){X(ae,xe)})});return}if(!O.workerPath&&ce instanceof ArrayBuffer){var Te=new Blob([ce],{type:"text/javascript"});O.workerPath=d.createObjectURL(Te)}O.workerPath||console.error("workerPath parameter is missing."),q=new Worker(O.workerPath),q.postMessage(O.webAssemblyPath||"https://unpkg.com/webm-wasm@latest/dist/webm-wasm.wasm"),q.addEventListener("message",function(fe){fe.data==="READY"?(q.postMessage({width:O.width,height:O.height,bitrate:O.bitrate||1200,timebaseDen:O.frameRate||30,realtime:O.realtime}),M().pipeTo(new WritableStream({write:function(xe){if(L){console.error("Got image, but recorder is finished!");return}q.postMessage(xe.data.buffer,[xe.data.buffer])}}))):fe.data&&(J||re.push(fe.data))})}this.record=function(){re=[],J=!1,this.blob=null,X(H),typeof O.initCallback=="function"&&O.initCallback()};var J;this.pause=function(){J=!0},this.resume=function(){J=!1};function W(ae){if(!q){ae&&ae();return}q.addEventListener("message",function(ce){ce.data===null&&(q.terminate(),q=null,ae&&ae())}),q.postMessage(null)}var re=[];this.stop=function(ae){L=!0;var ce=this;W(function(){ce.blob=new Blob(re,{type:"video/webm"}),ae(ce.blob)})},this.name="WebAssemblyRecorder",this.toString=function(){return this.name},this.clearRecordedData=function(){re=[],J=!1,this.blob=null},this.blob=null}typeof t<"u"&&(t.WebAssemblyRecorder=se)})(oM)),oM.exports}var wve=clt();const ult=$c(wve),dlt=({onAudioCaptured:e,onStartRecording:t,onStopRecording:n,onError:r,timeSlice:i=100,sampleRate:s=48e3,channelCount:a=1})=>{const[o,c]=b.useState(!1),u=b.useRef(o),d=b.useRef(null),h=b.useRef(null),p=b.useRef(null),g=b.useRef(e);g.current=e;const v=b.useRef(0),x=b.useRef(!0),_=b.useCallback(()=>{v.current+=1;const N=d.current,A=h.current,k=p.current;d.current=null,h.current=null,p.current=null,N?.getTracks().forEac
1196h(j=>j.stop()),A&&A.close().catch(()=>{}),k?.stopRecording()},[]),w=b.useCallback(async()=>{_();const N=v.current,A=()=>x.current&&N===v.current;try{const k=await navigator.mediaDevices.getUserMedia({audio:{sampleRate:s,channelCount:a,noiseSuppression:!0,echoCancellation:!0}});if(!A())return k.getTracks().forEach(R=>R.stop()),!1;d.current=k,u.current=!1,c(!1);const j=new AudioContext;return h.current=j,p.current=new ult(d.current,{type:"audio",mimeType:"audio/wav",recorderType:wve.StereoAudioRecorder,numberOfAudioChannels:a,sampleRate:s,desiredSampRate:s,timeSlice:i,ondataavailable:async R=>{try{if(!A()||u.current)return;const P=await R.arrayBuffer();A()&&!u.current&&g.current?.(P)}catch(P){console.error("Error processing RecordRTC audio chunk",P),r(`Error processing audio: ${P instanceof Error?P.message:String(P)}`)}}}),p.current.startRecording(),t?.(),!0}catch(k){if(!A())return!1;_();const j=k instanceof Error?k.message:"Unknown error";return r(`Error starting microphone: ${j}`),console.error(k),!1}},[s,a,i,t,r,_]),S=b.useCallback(()=>{try{_(),u.current=!1,n?.(),c(!1)}catch(N){const A=N instanceof Error?N.message:"Unknown error";r(`Error stopping microphone: ${A}`),console.error(N)}},[r,n,_]),E=b.useCallback(()=>{d.current?.getTracks().forEach(N=>{N.enabled=!1}),u.current=!0,c(!0)},[d]),T=b.useCallback(()=>{d.current?.getTracks().forEach(N=>{N.enabled=!0}),u.current=!1,c(!1)},[d]);return b.useEffect(()=>(x.current=!0,()=>{x.current=!1,_()}),[_]),b.useMemo(()=>({start:w,stop:S,mute:E,unmute:T,isMuted:o}),[w,S,E,T,o])};function flt(e,t){const n=window.atob(e),r=new Uint8Array(n.length);for(let i=0;i<n.length;i++)r[i]=n.charCodeAt(i);return new Blob([r],{type:t})}const hlt=e=>{const[t,n]=b.useState(!1),[r,i]=b.useState(!1),s=b.useRef(null),a=b.useRef(null),o=b.useRef(!1),c=b.useRef(0),u=b.useRef(new Set),d=b.useRef([]),[h,p]=b.useState(0),g=b.useRef(0),v=b.useRef(0),x=b.useRef(new Set),_=b.useRef(0),w=b.useRef(e.onPlayAudio);w.current=e.onPlayAudio;const S=b.useRef(e.onStopAudio);S.current=e.onStopAudio;const E=b.useRef(e.onError);E.current=e.onError;const T=b.useRef(!1),N=b.useCallback(G=>{const Q=s.current,Z=a.current;if(!Q||!Z){E.current("Audio environment is not initialized");return}const K=Q.createBufferSource();K.buffer=G.buffer,K.connect(Z);const te=Math.max(Q.currentTime,_.current);K.start(te),_.current=te+G.buffer.duration,x.current.add(K),n(!0),T.current||(T.current=!0,console.log("First decoded audio clip scheduled",G.id)),w.current(G.id),K.addEventListener("ended",()=>{K.disconnect(),x.current.delete(K)&&(S.current(G.id),x.current.size===0&&n(!1))})},[]),A=b.useCallback(()=>{for(d.current.sort((G,Q)=>G.sequence-Q.sequence);;){if(u.current.delete(v.current)){v.current+=1;continue}if(d.current[0]?.sequence!==v.current)break;const G=d.current.shift();v.current+=1,G&&N(G)}p(d.current.length)},[N]),k=b.useCallback(()=>{if(o.current)return;c.current+=1,v.current=g.current,u.current.clear();const G=new AudioContext;s.current=G;const Q=G.createGain();Q.connect(G.destination),a.current=Q,o.current=!0,T.current=!1,_.current=0},[]),j=b.useCallback(async G=>{if(!o.current||!s.current){E.current("Audio player has not been initialized");return}const Q=s.current,Z=c.current,K=g.current;g.current+=1;try{const ne=await flt(G.data,"audio/wav").arrayBuffer();if(Z!==c.current)return;const se=await Q.decodeAudioData(ne);if(Z!==c.current)return;d.current.push({sequence:K,id:G.id,buffer:se}),A()}catch(te){if(Z!==c.current)return;u.current.add(K),A();const ne=te instanceof Error?te.message:"Unknown error";E.current(`Failed to add clip to queue: ${ne}`)}},[A]),R=b.useCallback(()=>{c.current+=1,u.current.clear(),v.current=g.current,o.current=!1,n(!1),i(!1);for(const Q of x.current)Q.stop(),Q.disconnect();x.current.clear(),_.current=0,a.current&&(a.current.disconnect(),a.current=null);const G=s.current;s.current=null,G?.close().catch(()=>{}),d.current=[],p(0)},[]),P=b.useCallback(()=>{c.current+=1,u.current.clear();for(const G of x.current)G.stop(),G.disconnect();x.current.clear(),_.current=0,d.current=[],v.current=g.current,p(0),n(!1)},[]),V=b.useCallback(()=>{a.current&&s.current&&(a.current.gain.setValueAtTime(0,s.current.currentTime),i(!0))},[]),U=b.useCallback(()=>{a.current&&s.current&&(a.current.gain.setValueAtTime(1,s.current.currentTime),i(!1))},[]);return b.useMemo(()=>({addToQueue:j,initPlayer:k,isPlaying:t,isAudioMuted:r,muteAudio:V,unmuteAudio:U,stopAll:R,clearQueue:P,queueLength:h}),[j,k,t,r,V,U,R,P,h])},Sve=b.createContext(null),plt=()=>{const e=b.useContext(Sve);if(!e)throw new Error("useVoice must be used within a VoiceProvider");return e},Ap=()=>{};function mlt(e){const t=`kanbu_voice_chat_user_${e}`,n=localStorage.getItem(t);if(n)return n;const r=crypto.randomUUID();return localStorage.setItem(t,r),r}const glt=1e4;function xlt({children:e,chatId:t,...n}){const{timestamp:r,start:i,stop:s}=llt(),[a,o]=b.useState({value:"disconnected"}),[c,u]=b.useState(null),d=c!==null,h=c?.type==="micError",p=c?.type==="socketError",g=c?.type==="audioError",v=b.useRef(n.onError??Ap);v.current=n.onError??Ap;const x=b.useRef(n.onAudioReceived??Ap);x.current=n.onAudioReceived??Ap;const _=b.useRef(n.onAudioStart??Ap);_.current=n.onAudioStart??Ap;const w=b.useRef(n.onAudioEnd??Ap);w.current=n.onAudioEnd??Ap;const S=b.useRef(null),E=b.useRef(0),T=b.useRef(null),N=b.useRef(null),A=b.useCallback(()=>{N.current&&(clearTimeout(N.current),N.current=null)},[]),k=b.useRef(!1),j=b.useRef(null),R=b.useRef(!1),P=b.useCallback(K=>{u(K),K!==null&&v.current?.(K)},[]),V=hlt({onError:K=>{P({type:"audioError",message:K})},onPlayAudio:K=>{_.current(K)},onStopAudio:K=>{w.current(K)}}),U=dlt({sampleRate:48e3,onAudioCaptured:b.useCallback(async K=>{try{if(S.current?.readyState!==WebSocket.OPEN){console.warn("WebSocket is not open, skipping audio capture");return}const te=JSON.stringify({type:"audio",payload:{chunk:YVe(K),timestamp:Date.now()}});S.current.send(te)}catch(te){const ne=te instanceof Error?te.message:"Unknown error";P({type:"socketError",message:ne}),console.error("Error sending audio data:",te)}},[P]),onError:b.useCallback(K=>{console.error(K),P({type:"micError",message:K})},[P])}),G=b.useCallback(()=>
1196{if(E.current+=1,T.current?.abort(),T.current=null,s(),A(),S.current){const K=S.current;S.current=null,K.close()}V.stopAll(),U.stop(),a.value!=="error"&&o({value:"disconnected"})},[s,A,V.stopAll,U.stop,a.value]),Q=b.useCallback(async()=>{(S.current||T.current)&&G();const K=++E.current,te=()=>K===E.current,ne=new AbortController;T.current=ne,P(null),o({value:"connecting"}),k.current=!1,j.current=null,R.current=!1,A(),N.current=setTimeout(()=>{te()&&(P({type:"socketError",message:"Timed out waiting for the voice service to respond."}),G())},glt);try{const se=await U.start();if(!te())return;if(!se){A(),o({value:"error",reason:"Microphone unavailable"});return}const H=mlt(t),O=await fetch(`${os.voiceApiUrl}/calls/chats/${t}/web/ticket`,{method:"POST",signal:ne.signal,headers:{"Content-Type":"application/json",Authorization:`Bearer ${ir.getState().jwt}`},body:JSON.stringify({chatUserId:H})});if(!te())return;if(!O.ok)throw new Error(`Voice service refused to start the call (${O.status}).`);const{ticket:L}=await O.json();if(!te())return;const M=KVe(os.voiceApiUrl),q=new WebSocket(`${M}/calls/chats/${t}/web?ticket=${encodeURIComponent(L)}`);S.current=q;const X=()=>te()&&S.current===q;q.addEventListener("message",J=>{if(X())try{if(typeof J.data!="string"){console.warn("Received non-string message, expected JSON",J.data);return}const W=JSON.parse(J.data);switch(W.type){case"audio":const re={id:`audio-${Date.now()}`,data:W.payload.chunk};R.current||(R.current=!0,console.log("First audio chunk received from server",j.current?`${Date.now()-j.current}ms since ready`:"(ready timestamp missing)")),V.addToQueue(re),x.current(re);break;case"clear":V.clearQueue();break;case"ready":A(),o({value:"connected"}),k.current||(k.current=!0,j.current=Date.now(),i());break;case"error":P({type:"callError",message:W.payload.message});break}}catch(W){console.error("Error processing JSON message:",W)}}),q.addEventListener("open",()=>{X()&&(console.log("WebSocket connection opened"),V.initPlayer())}),q.addEventListener("error",J=>{X()&&(console.error("WebSocket error:",J),P({type:"socketError",message:"WebSocket connection error",error:J instanceof Error?J:new Error("WebSocket error")}),G())}),q.addEventListener("close",()=>{X()&&G()})}catch(se){if(!te())return;const H=se instanceof Error?se.message:"Unknown error";U.stop(),V.stopAll(),A(),P({type:"socketError",message:H}),o({value:"error",reason:H})}},[P,t,V,i,U,G,A]);b.useEffect(()=>()=>{E.current+=1,T.current?.abort(),A();const K=S.current;S.current=null,K?.close()},[A]);const Z=b.useMemo(()=>({connect:Q,disconnect:G,isMuted:U.isMuted,isAudioMuted:V.isAudioMuted,isPlaying:V.isPlaying,mute:U.mute,muteAudio:V.muteAudio,unmute:U.unmute,unmuteAudio:V.unmuteAudio,status:a,error:c,isAudioError:g,isError:d,isMicrophoneError:h,isSocketError:p,callDurationTimestamp:r,playerQueueLength:V.queueLength}),[Q,G,V.isAudioMuted,V.isPlaying,V.muteAudio,V.unmuteAudio,V.queueLength,U.isMuted,U.mute,U.unmute,a,c,g,d,h,p,r]);return l.jsx(Sve.Provider,{value:Z,children:e})}const vlt=b.memo(function({beforeConnect:t}){const{i18n:n,_:r}=Me(),{status:i,connect:s,disconnect:a,callDurationTimestamp:o}=plt(),c=i.value==="connected",u=i.value==="connecting",d=b.useRef(!0);b.useEffect(()=>(d.current=!0,()=>{d.current=!1}),[]);const[h,p]=b.useState(!1),g=async()=>{if(c||u)a();else{if(h)return;p(!0);try{await t?.(),d.current&&s()}catch{Re.error(n._({id:"gla9Gg"}),{description:n._({id:"ZCmCNk"})})}finally{p(!1)}}},v=b.useRef(a);v.current=a;const x=b.useRef(i.value);return x.current=i.value,b.useEffect(()=>()=>{x.current!=="disconnected"&&v.current()},[]),l.jsx(Oe,{type:"button","data-cta":"admin-voice-button",variant:c?"danger":"success",size:"lg",onClick:g,loading:u||h,className:`shrink-0 ${c?"animate-pulse":""}`,title:c?n._({id:"pJ/IRc"}):u?n._({id:"JrFTcr"}):n._({id:"IJaotC"}),children:c?l.jsxs(l.Fragment,{children:[l.jsx(pIe,{className:"size-5"}),l.jsx(D,{id:"WC0jnW"})," ",o]}):u?l.jsxs(l.Fragment,{children:[l.jsx(C6,{className:"size-5"}),l.jsx(D,{id:"JrFTcr"})]}):l.jsxs(l.Fragment,{children:[l.jsx(C6,{className:"size-5"}),t?l.jsx(D,{id:"Ue8tpM"}):l.jsx(D,{id:"jok5td"})]})})});function Yr({schema:e}){const{adapter:t}=alt();return e?.$fields?e.$fields.map((n,r)=>{if("$scope"in n&&n.$scope)return l.jsx(t8,{scope:n.$scope.$scopeName,children:l.jsx(Yr,{schema:n.$scope})},`scope-${r.toString()}`);if("$relevant"in n&&n.$relevant)return l.jsx(_5,{when:n.$relevant.$when,children:l.jsx(Yr,{schema:n.$relevant})},`relevant-${r.toString()}`);if("visible"in n&&n.visible===!1)return null;if("name"in n&&n.name){const{type:i="text",uiProps:s,uiControl:a,visible:o,...c}=n,u=`field-${n.name}-${r.toString()}`,d=t[a??i];return l.jsx(d,{type:i,...c,...s},u)}return console.error("Invalid schema field:",n),null}):null}function oi(e,t=[]){return{schema:b.useMemo(()=>({$fields:e}),t)}}
1196function ylt({value:e,onChange:t,auxiliary:n,id:r,disabled:i}){const{i18n:s,_:a}=Me(),{data:o,locale:c,money:u,isError:d,refetch:h}=lpe(),[p,g]=b.useState(!1),[v,x]=b.useState(""),[_,w]=b.useState(!1),S=o?.models.find(A=>A.id===e),E=n?[{id:"auxiliary",title:s._({id:"5GfQu/"}),items:o?.auxiliaryOrder.flatMap(A=>o.models.filter(k=>k.id===A))??[]}]:[{id:"recommended",title:s._({id:"bvpccw"}),items:o?.models.filter(A=>A.section==="recommended")??[]},{id:"alternatives",title:s._({id:"dg4Bjx"}),items:o?.models.filter(A=>A.section==="alternatives")??[]},{id:"experimental",title:s._({id:"Rsjgm0"}),items:o?.models.filter(A=>A.section==="experimental")??[]},{id:"legacy",title:s._({id:"Rg0Abe"}),items:o?.models.filter(A=>A.section==="legacy")??[]}],T=A=>A.measurement?.mean==null?s._({id:"Chr2na"}):s._({id:"Eyiusy",values:{0:u(A.measurement.mean)}}),N=n?s._({id:"cCf+rP"}):s._({id:"MQZXog"});return l.jsxs("div",{className:"space-y-2",children:[l.jsxs(iy,{open:p,onOpenChange:g,children:[l.jsx(q6,{asChild:!0,children:l.jsxs("button",{type:"button",id:r,disabled:i||!o,"aria-label":n?s._({id:"wnhWKg"}):s._({id:"scu3wk"}),"aria-expanded":p,className:"flex w-full items-center justify-between rounded-radius border border-border bg-white px-3 py-2 text-left disabled:opacity-60",children:[l.jsxs("span",{children:[l.jsx("span",{className:"block font-medium",children:S?.name??e??s._({id:"h6C+Bw"})}),S&&!n&&l.jsx("span",{className:"block text-xs text-muted-fg",children:T(S)})]}),l.jsx(Nj,{className:"size-4 shrink-0"})]})}),l.jsx(W6,{className:"w-[28rem] max-w-[calc(100vw-2rem)] p-0",children:l.jsxs(Rue,{children:[l.jsx(Pue,{value:v,onValueChange:x,placeholder:s._({id:"mDonhS"})}),l.jsxs(Due,{className:"max-h-[min(24rem,calc(var(--radix-popover-content-available-height)_-_6rem))]",children:[l.jsx(Iue,{children:s._({id:"1xVZkL"})}),E.filter(A=>A.id!=="legacy"||_||v.length>0).map(A=>l.jsx(Oue,{heading:A.title,children:A.items.map(k=>l.jsxs(Mue,{value:`${k.name} ${k.id}`,onSelect:()=>
1196{t(k.id),g(!1)},className:`flex items-start gap-2 border-l-4 py-3 ${e===k.id?"border-purple-600 bg-purple-50 ring-1 ring-inset ring-purple-200 data-[selected=true]:bg-purple-100":"border-transparent"}`,children:[l.jsxs("span",{className:"min-w-0 flex-1",children:[l.jsxs("span",{className:"block font-medium",children:[k.name,k.id===(n?_c.Gemini25FlashLite:_c.Gpt6Luna)&&l.jsx("span",{className:"ml-2 rounded bg-purple-100 px-1.5 py-0.5 text-xs text-purple-800",children:s._({id:"WEYdDv"})})]}),l.jsx("span",{className:"block text-xs text-muted-fg",children:n?k.auxiliarySummary[c]:k.summary[c]}),!n&&l.jsxs("span",{className:"mt-1 block text-xs",children:[T(k),k.measurement?.currentConfiguration&&k.measurement.completionSeconds!=null&&` · ${s._({id:"5UFnBS",values:{0:k.measurement.completionSeconds.toFixed(0)}})}`]})]}),l.jsxs(iy,{children:[l.jsx(cn,{title:n?`${k.auxiliarySummary[c]} ${N}`:k.detail[c],children:l.jsx(q6,{asChild:!0,children:l.jsx("button",{type:"button","aria-label":k.name,onClick:j=>j.stopPropagation(),onPointerDown:j=>j.stopPropagation(),onKeyDown:j=>j.stopPropagation(),className:"rounded p-1 text-muted-fg hover:bg-purple-100 focus-visible:ring-2 focus-visible:ring-purple-500",children:l.jsx(ds,{className:"size-4"})})})}),l.jsx(W6,{side:"left",className:"z-50 max-w-[min(20rem,calc(100vw-2rem))] p-3 text-sm",onClick:j=>j.stopPropagation(),children:n?`${k.auxiliarySummary[c]} ${N}`:k.detail[c]})]}),e===k.id&&l.jsx(Es,{className:"mt-1 size-5 shrink-0 rounded-full bg-purple-600 p-0.5 text-white"})]},k.id))},A.id))]}),!v&&!n&&l.jsx("button",{type:"button",className:"w-full border-t border-border p-2 text-left text-xs text-muted-fg",onClick:()=>w(!_),"aria-expanded":_,children:_?s._({id:"L4tEWs"}):s._({id:"60VVrV"})})]})})]}),d&&l.jsx("button",{type:"button",onClick:()=>void h(),className:"text-xs text-red-700",children:s._({id:"eNmD6K"})})]})}function XJ({auxiliary:e=!1}){const{i18n:t,_:n}=Me();return l.jsx(Lu,{name:e?"smallModel":"model",label:e?t._({id:"wnhWKg"}):t._({id:"scu3wk"}),type:"text",keepState:!0,render:({userProps:r,fieldApi:i,fieldState:s})=>l.jsx(ylt,{id:r.id,auxiliary:e,value:String(s.value??""),disabled:r.readOnly||r.disabled,onChange:a=>{i.setTouched(!0),i.setValue(a)}})})}const lM="default";function blt(){const{i18n:e,_:t}=Me(),n=Bh(),r=fs("model").value,i=b.useRef(r),s=HHe(r);if(b.useEffect(()=>{if(i.current===r)return;const c=i.current!==void 0;i.current=r,c&&n.setValue("agentConfig.reasoningEffort",null)},[n,r]),!s)return null;const a={minimal:e._({id:"XTrzEY"}),low:e._({id:"iuocz0"}),medium:e._({id:"uKA28O"}),high:e._({id:"NUTdJP"})},o=a[s.defaultEffort];return l.jsx(Lu,{name:"agentConfig.reasoningEffort",label:e._({id:"d8bVuK"}),type:"select",keepState:!0,showOptional:!1,tooltip:e._({id:"b/qqdA"}),render:({userProps:c,ref:u,fieldApi:d,fieldState:h})=>{const{disabled:p,readOnly:g,id:v}=c,x=s.efforts.find(_=>_===h.value);return l.jsxs(tr,{ref:u,id:v,value:x??lM,disabled:p||g,onValueChange:_=>{d.setTouched(!0),d.setValue(_===lM?null:_)},children:[l.jsx(Yt,{value:lM,children:e._({id:"/CLINl",values:{defaultLabel:o}})}),s.efforts.map(_=>l.jsx(Yt,{value:_,children:a[_]},_))]})}})}function _lt(){const{i18n:e,_:t}=Me(),n=Ir(),{schema:r}=oi([{name:"voiceConfig.model",label:e._({id:"scu3wk"}),type:"select",options:PF(Ife),defaultValue:fX,showOptional:!1},{$relevant:{$when:({formState:i})=>kVe(i.values?.voiceConfig?.model??fX),$fields:[{name:"voiceConfig.gemini.thinkingLevel",label:e._({id:"TBEboO"}),type:"select",options:n.voiceThinkingLevel,defaultValue:"minimal",tooltip:e._({id:"lwWmC3"}),showOptional:!1,keepState:!0}]}}],[t,n]);return l.jsx(Yr,{schema:r})}function wlt(){const{i18n:e,_:t}=Me(),n=Ir(),r=fs("agentType"),i=b.useCallback(o=>{if(!hw(o).every(u=>q7(u)))return e._({id:"ER+Br0"})},[t]),{schema:s}=oi([{name:"chatbotConfig.requireAcknowledgement",label:e._({id:"KnyCEV"}),tooltip:e._({id:"Xqqkqv"}),type:"checkbox",uiControl:"switch",defaultValue:!1,showOptional:!1},{$relevant:{$when:({formState:o})=>!!o.values?.chatbotConfig?.requireAcknowledgement,$fields:[{name:"chatbotConfig.disclaimerContent",label:e._({id:"7f72JY"}),type:"richtext",required:!1,showOptional:!0}]}}],[t]),{schema:a}=oi([{$relevant:{$when:({formState:o})=>{const c=o.values?.agent;return c===Fs.Conversational||c===Fs.ShopAssistant},$fields:[{name:"agentConfig.hasWebSearch",label:e._({id:"AD2cb3"}),type:"checkbox",uiControl:"switch",defaultValue:!1}]}},{$relevant:{$when:({formState:o})=>o.values?.agentType===ai.Chat,$fields:[{name:"agentConfig.showToolActivity",label:e._({id:"Ywrk5N"}),tooltip:e._({id:"q5EDvC"}),type:"checkbox",uiControl:"switch",defaultValue:!1,showOptional:!1}]}},{$relevant:{$when:({formState:o})=>o.values?.agentType===ai.Chat,$fields:[{name:"agentConfig.showReasoning",label:e._({id:"7qPtNp"}),tooltip:e._({id:"UT75Vl"}),type:"checkbox",uiControl:"switch",defaultValue:!1,showOptional:!1}]}},{$relevant:{$when:({formState:o})=>!!o.values?.agentConfig?.showToolActivity,$fields:[{name:"chatbotConfig.expandToolActivity",label:e._({id:"HnH3zQ"}),tooltip:e._({id:"guGQJU"}),type:"checkbox",uiControl:"switch",defaultValue:!1,showOptional:!1}]}},{$relevant:{$when:({formState:o})=>!!o.values?.agentConfig?.hasWebSearch,$fields:[{name:"agentConfig.webSearchUrls",label:e._({id:"2pcugm"}),type:"text",uiProps:{rows:5,placeholder:`example.com 1197example.com/blog 1198https://docs.example.com/help`},uiControl:"textarea",tooltip:e._({id:"L5ypod"}),description:e._({id:"oSit/J"}),parser:hw,clean:hw,mask:o=>hw(o).join(` 1199`),validate:i,validateOn:"blur-submit",showErrorIfTouched:!0}]}},{$relevant:{$when:({formState:o})=>o.values?.agentType!==ai.Voice&&!!o.values?.agentConfig?.showSources,$fields:[{name:"chatbotConfig.sourcesDisplayMode",label:e._({id:"4xPob7"}),type:"select",options:n.sourcesDisplayMode,defaultValue:Ms.Pills,tooltip:e._({id:"1Q1hyP"}),keepState:!0},{name:"chatbotConfig.inlineCitations",label:e._({id:"TSjsC9"}),type:"checkbox",uiControl:"switch",defaultValue:!1,showOptional:!1,tooltip:e._({id:"6aZb4n"}
1199),keepState:!0}]}},{$relevant:{$when:({formState:o})=>o.values?.agentType!==ai.Voice&&!!o.values?.agentConfig?.showSources&&(o.values?.chatbotConfig?.sourcesDisplayMode??Ms.Pills)===Ms.Structured,$fields:[{name:"chatbotConfig.sourcesFormat",label:e._({id:"jEXzji"}),type:"select",options:n.sourcesFormat,defaultValue:Th.Simple,tooltip:e._({id:"RhohXz"}),keepState:!0}]}}],[t,n,i]);return l.jsxs(gn,{title:e._({id:"ubM+Tc"}),children:[l.jsx(Yr,{schema:s}),r.value===ai.Voice?l.jsx(_lt,{}):l.jsxs(l.Fragment,{children:[l.jsx(XJ,{}),l.jsx(blt,{})]}),l.jsx(XJ,{auxiliary:!0}),r.value===ai.Chat&&l.jsx(ar,{to:"/models",className:"mb-4 inline-block text-xs text-blue-600 hover:underline",target:"_blank",children:e._({id:"bXw8uR"})}),l.jsx(Yr,{schema:a})]})}const Slt=Zl("inline-flex shrink-0 items-center justify-center rounded-lg",{variants:{size:{xs:"size-7 text-xs",sm:"size-8 text-xs",md:"size-10 text-sm",lg:"size-12 text-lg",xl:"size-14 text-xl","2xl":"size-16 text-2xl","3xl":"size-20 text-3xl","4xl":"size-24 text-4xl","5xl":"size-28 text-5xl","6xl":"size-32 text-6xl","7xl":"size-36 text-6xl","8xl":"size-40 text-6xl","9xl":"size-44 text-7xl"},variant:{default:"border border-border"}},defaultVariants:{size:"md",variant:"default"}}),Elt={xs:16,sm:20,md:22,lg:24,xl:28,"2xl":32,"3xl":38,"4xl":42,"5xl":44,"6xl":48,"7xl":52,"8xl":58,"9xl":64},_S=b.memo(function({size:t="md",className:n,Icon:r,variant:i,rounded:s,...a}){return l.jsx("span",{...a,className:$e(Slt({size:t,variant:i}),s&&"rounded-full",n),children:l.jsx(r,{size:Elt[t??"md"]})})});function Clt({name:e,...t}){const{initialValues:n}=$y(),r=e.endsWith(".id")?e.slice(0,-3):e,s=v2(n,r)??Fs.Conversational;return l.jsx(Lu,{...t,name:e,type:"text",defaultValue:s,render:({ref:a,userProps:o,fieldApi:c,fieldState:u})=>{const d=u.value??s;return l.jsxs(kN,{variant:u.showError?"danger":"default",value:d,onValueChange:h=>{c.setTouched(!0),c.setValue(h||null)},children:[l.jsx("div",{className:"[&>button]:!h-auto [&>button]:!p-1",children:l.jsx(jN,{id:o.id,children:l.jsx(R2,{})})}),l.jsxs(NN,{ref:a,className:"max-w-sm [&_*[role=option]>span]:end-2 [&_*[role=option]>span]:start-auto [&_*[role=option]]:pe-8 [&_*[role=option]]:ps-2",children:[l.jsx(Yt,{value:Fs.Conversational,className:"h-auto",children:l.jsxs("span",{className:"flex items-start gap-2 p-1",children:[l.jsx(_S,{Icon:d4e,className:"bg-emerald-500 text-white"}),l.jsxs("div",{children:[l.jsx("span",{className:"block font-bold",children:l.jsx(D,{id:"3wfZhO"})}),l.jsx("span",{className:"mt-0.5 block text-xs",children:l.jsx(D,{id:"1PZ6BA",components:{0:l.jsx("strong",{})}})})]})]})}),l.jsx(Yt,{value:Fs.ShopAssistant,className:"mt-1 h-auto",children:l.jsxs("span",{className:"flex items-start gap-2 p-1",children:[l.jsx(_S,{Icon:zIe,className:"bg-blue-500 text-white"}),l.jsxs("div",{children:[l.jsx("span",{className:"block font-bold",children:l.jsx(D,{id:"0qSXKH"})}),l.jsx("span",{className:"mt-0.5 block text-xs",children:l.jsx(D,{id:"BqS4+x",components:{0:l.jsx("strong",{})}})})]})]})})]})]})}})}function QJ({formState:e}){return e.values?.agentType!==ai.Voice}function Tlt(){const{hasAccess:e}=Uc(),{i18n:t,_:n}=Me(),{initialValues:r}=$y(),i=Ir(),{organization:s}=Vc(),a=s?.capabilities.voice,{schema:o}=oi([{name:"agentType",label:t._({id:"DkpeSy"}),type:"segmented",options:{[ai.Chat]:l.jsxs("span",{className:"flex items-center gap-1.5",children:[l.jsx(Pj,{className:"size-4"}),i.agentType.chat]}),[ai.Voice]:l.jsxs("span",{className:"flex items-center gap-1.5",children:[l.jsx(L9,{className:"size-4"}),i.agentType.voice]})},disabledOptions:a?void 0:{[ai.Voice]:t._({id:"GDW3nc"})},defaultValue:ai.Chat,required:!0}],[n,e,r,a]),{schema:c}=oi([{name:"name",label:t._({id:"6YtxFj"}),defaultValue:bk.name,required:!0}],[n,e,r]),{schema:u}=oi([{name:"agentConfig.personalization",label:t._({id:"+0C8tE"}),type:"richtext",uiProps:{enableMarkdownPasteTransform:!0},required:!0,defaultValue:t._({id:"trFL4o"}),tooltip:t._({id:"oH8X3F"})}],[n,e,r]),{schema:d}=oi([{name:"agentConfig.tonePreset",label:t._({id:"uAQyzk"}),type:"select",options:i.tonePreset,defaultValue:qg.Casual,showOptional:!1},{$relevant:{$when:QJ,$fields:[{name:"agentConfig.responseLengthPreset",label:t._({id:"tQasu3"}),type:"select",options:i.responseLengthPreset,defaultValue:Wg.Short,showOptional:!1,keepState:!0}]}},{name:"agentConfig.language",label:t._({id:"vXIe7J"}),type:"select",options:{automatic:t._({id:"Dnn2XG"}),...i.supportedLanguages},defaultValue:"cs",showOptional:!1},{$relevant:{$when:({formState:h})=>h?.values?.agentConfig?.language==="automatic",$fields:[{name:"agentConfig.fallbackLanguage",label:t._({id:"Qd/4oB"}),type:"select",options:i.supportedLanguages,defaultValue:"cs",showOptional:!1,tooltip:t._({i
1199d:"nsYT1W"})}]}},{name:"agentConfig.gender",label:t._({id:"5iyJje"}),type:"select",options:i.gender,defaultValue:Rd.None,showOptional:!1},{$relevant:{$when:QJ,$fields:[{name:"agentConfig.showSources",label:t._({id:"kdVWX0"}),type:"checkbox",uiControl:"switch",defaultValue:!0,required:!0,keepState:!0},{name:"agentConfig.showFollowUpQuestions",label:t._({id:"VBXQIU"}),type:"checkbox",uiControl:"switch",tooltip:t._({id:"l6tDzS"}),defaultValue:!0,required:!0,keepState:!0},{name:"agentConfig.imageSupport",label:t._({id:"OiofzP"}),type:"checkbox",uiControl:"switch",defaultValue:!0,showOptional:!1,keepState:!0}]}}],[n,e,r,a]);return l.jsxs(gn,{title:t._({id:"3dSIQs"}),children:[l.jsx(Yr,{schema:o}),l.jsx("div",{className:"mt-2",children:l.jsx(Clt,{name:"agent",required:!0,label:t._({id:"iEQQyu"})})}),l.jsx("div",{className:"mt-2",children:l.jsx(Yr,{schema:c})}),l.jsx("div",{className:"mt-2",children:l.jsx(Yr,{schema:u})}),l.jsxs("details",{className:"mt-2 rounded-md border border-border p-3",children:[l.jsx("summary",{className:"cursor-pointer text-sm font-medium",children:t._({id:"VNgKZz"})}),l.jsx("p",{className:"mt-2 text-xs text-placeholder",children:t._({id:"3eAN3k"})}),l.jsx("div",{className:"mt-3 flex flex-col gap-3",children:l.jsx(Yr,{schema:d})})]})]})}const ZJ=e=>{e.stopPropagation()},du=b.memo(function({icon:t,label:n,onClick:r,disabled:i=!1,disabledTooltip:s,hint:a,className:o}){const c=$e("flex items-center justify-start gap-2",o),u=l.jsxs(Er,{className:$e(c,i&&"opacity-50"),disabled:i,onClick:d=>{d.stopPropagation(),i||r?.()},children:[l.jsx(t,{className:"size-4 shrink-0"}),n,a&&l.jsx(cn,{title:a,children:l.jsx("span",{className:"inline-flex shrink-0",onClick:ZJ,onPointerDown:ZJ,children:l.jsx(ds,{className:"size-3.5 cursor-help text-muted-fg"})})})]});return i&&s?l.jsx(cn,{title:s,children:l.jsx("span",{className:"block",children:u})}):u}),Eve=b.memo(function({paused:t,className:n}){const{i18n:r,_:i}=Me();return t?l.jsx(Em,{locked:!0,message:r._({id:"zqQ4wF"}),children:l.jsxs(En,{variant:"warning",size:"sm",outline:!0,className:$e("gap-1",n),children:[l.jsx($4e,{className:"size-3"}),l.jsx(D,{id:"/tZBW8"})]})}):null}),ch=b.memo(function({locked:t,className:n,message:r}){return t?l.jsx(Em,{locked:!0,message:r,children:l.jsx("span",{className:"inline-flex",children:l.jsx(pm,{className:$e("size-3 shrink-0 text-muted-fg",n),"aria-hidden":!0})})}):null}),v4=b.memo(function({locked:t,children:n,message:r}){return l.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[n,t&&l.jsx(Em,{locked:!0,message:r,children:l.jsx("span",{className:"inline-flex",children:l.jsx(pm,{className:"size-3.5 shrink-0 opacity-60","aria-hidden":!0})})})]})}),Alt=b.memo(function({data:t}){const{i18n:n,_:r}=Me(),[i,s]=b.useState(!1),a=fs("agentType"),o=`<script async src="https://loader.kanbu.ai/v0/embed.js" data-kanbu-agent-id="${t?.id}" data-kanbu-load="idle"><\/script>`,c=b.useCallback(u=>{u.preventDefault(),u.stopPropagation(),navigator.clipboard.writeText(o).then(()=>{s(!0),setTimeout(()=>s(!1),2e3)})},[o]);return!t||a.value===ai.Voice?null:l.jsx(gn,{title:l.jsxs("span",{className:"flex items-center gap-2",children:[l.jsx("span",{children:n._({id:"Zi7dyz"})}),l.jsx(cn,{title:n._({id:"he3ygx"}),delayDuration:0,children:l.jsx(Oe,{"data-cta":"admin-chatbot-script-copy-button",onClick:c,variant:"primary",size:"icon-xs",children:i?l.jsx(noe,{className:"size-4"}):l.jsx(zh,{className:"size-4"})})})]}),children:l.jsx("div",{className:"relative",children:l.jsx("pre",{className:"mb-4 whitespace-pre-wrap font-mono text-xs",children:o})})})}),klt=b.memo(function(){const{i18n:t,_:n}=Me(),r=fs("agentType"),i=Ir(),{schema:s}=oi([{name:"chatbotConfig.displayMode",label:t._({id:"fZ2U+F"}),type:"select",options:PF(nS,a=>i.chatDisplayMode[a]),defaultValue:nS.Widget,showOptional:!1,uiProps:{tooltip:l.jsxs("div",{className:"flex max-w-80 flex-col gap-2",children:[l.jsx("h4",{className:"text-base font-bold",children:t._({id:"fZ2U+F"})}),l.jsx("p",{className:"text-sm",children:l.jsx(D,{id:"9CcJIz"})})]})}},{name:"chatbotConfig.placement.position",label:t._({id:"p/78dY"}),type:"select",options:PF(N1,a=>
vendor: 45,913 bytes, lines 1199-1207
1199i.chatPlacementPosition[a]),defaultValue:N1.Right,showOptional:!1},{name:"chatbotConfig.placement.offsetX",type:"number",label:t._({id:"D3DEh2"}),defaultValue:0,showOptional:!1,uiProps:{addonAfter:"px"}},{name:"chatbotConfig.placement.offsetY",type:"number",label:t._({id:"OdoruH"}),defaultValue:0,showOptional:!1,uiProps:{addonAfter:"px"}}],[n,i.chatDisplayMode,i.chatPlacementPosition]);return r.value!==ai.Chat?null:l.jsx(gn,{title:t._({id:"MFTZK8"}),children:l.jsx(Yr,{schema:s})})}),H$=b.createContext({});function q$(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const W$=typeof window<"u",Cve=W$?b.useLayoutEffect:b.useEffect,y4=b.createContext(null);function G$(e,t){e.indexOf(t)===-1&&e.push(t)}function K$(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Ih=(e,t,n)=>n>t?t:n<e?e:n;let Y$=()=>{};const Oh={},Tve=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Ave(e){return typeof e=="object"&&e!==null}const kve=e=>/^0[^.\s]+$/u.test(e);function X$(e){let t;return()=>(t===void 0&&(t=e()),t)}const Pc=e=>e,Nlt=(e,t)=>n=>t(e(n)),KE=(...e)=>e.reduce(Nlt),wS=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};let Q$=class{constructor(){this.subscriptions=[]}add(t){return G$(this.subscriptions,t),()=>K$(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let s=0;s<i;s++){const a=this.subscriptions[s];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};const Pd=e=>e*1e3,Ac=e=>e/1e3;function Nve(e,t){return t?e*(1e3/t):0}const jve=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,jlt=1e-7,Rlt=12;function Ilt(e,t,n,r,i){let s,a,o=0;do a=t+(n-t)/2,s=jve(a,r,i)-e,s>0?n=a:t=a;while(Math.abs(s)>jlt&&++o<Rlt);return a}function YE(e,t,n,r){if(e===t&&n===r)return Pc;const i=s=>Ilt(s,0,1,e,n);return s=>s===0||s===1?s:jve(i(s),t,r)}const Rve=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Ive=e=>t=>1-e(1-t),Ove=YE(.33,1.53,.69,.99),Z$=Ive(Ove),Pve=Rve(Z$),Mve=e=>(e*=2)<1?.5*Z$(e):.5*(2-Math.pow(2,-10*(e-1))),J$=e=>1-Math.sin(Math.acos(e)),Dve=Ive(J$),Fve=Rve(J$),Olt=YE(.42,0,1,1),Plt=YE(0,0,.58,1),Lve=YE(.42,0,.58,1),Mlt=e=>Array.isArray(e)&&typeof e[0]!="number",zve=e=>Array.isArray(e)&&typeof e[0]=="number",Dlt={linear:Pc,easeIn:Olt,easeInOut:Lve,easeOut:Plt,circIn:J$,circInOut:Fve,circOut:Dve,backIn:Z$,backInOut:Pve,backOut:Ove,anticipate:Mve},Flt=e=>typeof e=="string",JJ=e=>{if(zve(e)){Y$(e.length===4);const[t,n,r,i]=e;return YE(t,n,r,i)}else if(Flt(e))return Dlt[e];return e},CA=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Llt(e,t){let n=new Set,r=new Set,i=!1,s=!1;const a=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function c(d){a.has(d)&&(u.schedule(d),e()),d(o)}const u={schedule:(d,h=!1,p=!1)=>{const v=p&&i?n:r;return h&&a.add(d),v.has(d)||v.add(d),d},cancel:d=>{r.delete(d),a.delete(d)},process:d=>{if(o=d,i){s=!0;return}i=!0,[n,r]=[r,n],n.forEach(c),n.clear(),i=!1,s&&(s=!1,u.process(d))}};return u}const zlt=40;function $ve(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,a=CA.reduce((E,T)=>(E[T]=Llt(s),E),{}),{setup:o,read:c,resolveKeyframes:u,preUpdate:d,update:h,preRender:p,render:g,postRender:v}=a,x=()=>{const E=Oh.useManualTiming?i.timestamp:performance.now();n=!1,Oh.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(E-i.timestamp,zlt),1)),i.timestamp=E,i.isProcessing=!0,o.process(i),c.process(i),u.process(i),d.process(i),h.process(i),p.process(i),g.process(i),v.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(x))},_=()=>{n=!0,r=!0,i.isProcessing||e(x)};return{schedule:CA.reduce((E,T)=>{const N=a[T];return E[T]=(A,k=!1,j=!1)=>(n||_(),N.schedule(A,k,j)),E},{}),cancel:E=>{for(let T=0;T<CA.length;T++)a[CA[T]].cancel(E)},state:i,steps:a}}const{schedule:ts,cancel:Cm,state:$a,steps:cM}=$ve(typeof requestAnimationFrame<"u"?requestAnimationFrame:Pc,!0);let Lk;function $lt(){Lk=void 0}const ul={now:()=>(Lk===void 0&&ul.set($a.isProcessing||Oh.useManualTiming?$a.timestamp:performance.now()),Lk),set:e=>{Lk=e,queueMicrotask($lt)}},Bve=e=>t=>typeof t=="string"&&t.startsWith(e),eB=Bve("--"),Blt=Bve("var(--"),tB=e=>Blt(e)?Ult.test(e.split("/*")[0].trim()):!1,Ult=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,nb={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},SS={...nb,transform:e=>Ih(0,1,e)},TA={...nb,default:1},Yw=e=>Math.round(e*1e5)/1e5,nB=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Vlt(e){return e==null}const Hlt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,rB=(e,t)=>n=>!!(typeof n=="string"&&Hlt.test(n)&&n.startsWith(e)||t&&!Vlt(n)&&Object.prototype.hasOwnProperty.call(n,t)),Uve=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,a,o]=r.match(nB);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(a),alpha:o!==void 0?parseFloat(o):1}},qlt=e=>Ih(0,255,e),uM={...nb,transform:e=>Math.round(qlt(e))},e0={test:rB("rgb","red"),parse:Uve("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+uM.transform(e)+", "+uM.transform(t)+", "+uM.transform(n)+", "+Yw(SS.transform(r))+")"};function Wlt(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const MF={test:rB("#"),parse:Wlt,transform:e0.transform},XE=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Pp=XE("deg"),Md=XE("%"),Fn=XE("px"),Glt=XE("vh"),Klt=XE("vw"),eee={...Md,parse:e=>Md.parse(e)/100,transform:e=>Md.transform(e*100)},l1={test:rB("hsl","hue"),parse:Uve("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Md.transform(Yw(t))+", "+Md.transform(Yw(n))+", "+Yw(SS.transform(r))+")"},Xs={test:e=>e0.test(e)||MF.test(e)||l1.test(e),parse:e=>e0.test(e)?e0.parse(e):l1.test(e)?l1.parse(e):MF.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?e0.transform(e):l1.transform(e),getAnimatableNone:e=>{const t=Xs.parse(e);return t.alpha=0,Xs.transform(t)}},Ylt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Xlt(e){return isNaN(e)&&typeof e=="string"&&(e.match(nB)?.length||0)+(e.match(Ylt)?.length||0)>0}const Vve="number",Hve="color",Qlt="var",Zlt="var(",tee="${}",Jlt=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ES(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const o=t.replace(Jlt,c=>(Xs.test(c)?(r.color.push(s),i.push(Hve),n.push(Xs.parse(c))):c.startsWith(Zlt)?(r.var.push(s),i.push(Qlt),n.push(c)):(r.number.push(s),i.push(Vve),n.push(parseFloat(c))),++s,tee)).split(tee);return{values:n,split:o,indexes:r,types:i}}function qve(e){return ES(e).values}function Wve(e){const{split:t,types:n}=ES(e),r=t.length;return i=>{let s="";for(let a=0;a<r;a++)if(s+=t[a],i[a]!==void 0){const o=n[a];o===Vve?s+=Yw(i[a]):o===Hve?s+=Xs.transform(i[a]):s+=i[a]}return s}}const ect=e=>typeof e=="number"?0:Xs.test(e)?Xs.getAnimatableNone(e):e;function tct(e){const t=qve(e);return Wve(e)(t.map(ect))}const Tm={test:Xlt,parse:qve,createTransformer:Wve,getAnimatableNone:tct};function dM(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function nct({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,a=0;if(!t)i=s=a=n;else{const o=n<.5?n*(1+t):n+t-n*t,c=2*n-o;i=dM(c,o,e+1/3),s=dM(c,o,e),a=dM(c,o,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(a*255),alpha:r}}function M3(e,t){return n=>n>0?t:e}const ls=(e,t,n)=>e+(t-e)*n,fM=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},rct=[MF,e0,l1],ict=e=>rct.find(t=>t.test(e));function nee(e){const t=ict(e);if(!t)return!1;let n=t.parse(e);return t===l1&&(n=nct(n)),n}const ree=(e,t)=>{const n=nee(e),r=nee(t);if(!n||!r)return M3(e,t);const i={...n};return s=>(i.red=fM(n.red,r.red,s),i.green=fM(n.green,r.green,s),i.blue=fM(n.blue,r.blue,s),i.alpha=ls(n.alpha,r.alpha,s),e0.transform(i))},DF=new Set(["none","hidden"]);function sct(e,t){return DF.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function act(e,t){return n=>ls(e,t,n)}function iB(e){return typeof e=="number"?act:typeof e=="string"?tB(e)?M3:Xs.test(e)?ree:cct:Array.isArray(e)?Gve:typeof e=="object"?Xs.test(e)?ree:oct:M3}function Gve(e,t){const n=[...e],r=n.length,i=e.map((s,a)=>iB(s)(s,t[a]));return s=>{for(let a=0;a<r;a++)n[a]=i[a](s);return n}}function oct(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=iB(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function lct(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],a=e.indexes[s][r[s]],o=e.values[a]??0;n[i]=o,r[s]++}return n}const cct=(e,t)=>{const n=Tm.createTransformer(t),r=ES(e),i=ES(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?DF.has(e)&&!i.values.length||DF.has(t)&&!r.values.length?sct(e,t):KE(Gve(lct(r,i),i.values),n):M3(e,t)};function Kve(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ls(e,t,n):iB(e)(e,t)}const uct=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ts.update(t,n),stop:()=>Cm(t),now:()=>$a.isProcessing?$a.timestamp:ul.now()}},Yve=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let s=0;s<i;s++)r+=Math.round(e(s/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},D3=2e4;function sB(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<D3;)t+=n,r=e.next(t);return t>=D3?1/0:t}function dct(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(sB(r),D3);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:Ac(i)}}const fct=5;function Xve(e,t,n){const r=Math.max(t-fct,0);return Nve(n-e(r),t-r)}const ys={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},hM=.001;function hct({duration:e=ys.duration,bounce:t=ys.bounce,velocity:n=ys.velocity,mass:r=ys.mass}){let i,s,a=1-t;a=Ih(ys.minDamping,ys.maxDamping,a),e=Ih(ys.minDuration,ys.maxDuration,Ac(e)),a<1?(i=u=>{const d=u*a,h=d*e,p=d-n,g=FF(u,a),v=Math.exp(-h);return hM-p/g*v},s=u=>{const h=u*a*e,p=h*n+n,g=Math.pow(a,2)*Math.pow(u,2)*e,v=Math.exp(-h),x=FF(Math.pow(u,2),a);return(-i(u)+hM>0?-1:1)*((p-g)*v)/x}):(i=u=>{const d=Math.exp(-u*e),h=(u-n)*e+1;return-hM+d*h},s=u=>{const d=Math.exp(-u*e),h=(n-u)*(e*e);return d*h});const o=5/e,c=mct(i,s,o);if(e=Pd(e),isNaN(c))return{stiffness:ys.stiffness,damping:ys.damping,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const pct=12;function mct(e,t,n){let r=n;for(let i=1;i<pct;i++)r=r-e(r)/t(r);return r}function FF(e,t){return e*Math.sqrt(1-t*t)}const gct=["duration","bounce"],xct=["stiffness","damping","mass"];function iee(e,t){return t.some(n=>e[n]!==void 0)}function vct(e){let t={velocity:ys.velocity,stiffness:ys.stiffness,damping:ys.damping,mass:ys.mass,isResolvedFromDuration:!1,...e};if(!iee(e,xct)&&iee(e,gct))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*Ih(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:ys.mass,stiffness:i,damping:s}}else{const n=hct(e);t={...t,...n,mass:ys.mass},t.isResolvedFromDuration=!0}return t}function F3(e=ys.visualDuration,t=ys.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],o={done:!1,value:s},{stiffness:c,damping:u,mass:d,duration:h,velocity:p,isResolvedFromDuration:g}=vct({...n,velocity:-Ac(n.velocity||0)}),v=p||0,x=u/(2*Math.sqrt(c*d)),_=a-s,w=Ac(Math.sqrt(c/d)),S=Math.abs(_)<5;r||(r=S?ys.restSpeed.granular:ys.restSpeed.default),i||(i=S?ys.restDelta.granular:ys.restDelta.default);let E;if(x<1){const N=FF(w,x);E=A=>{const k=Math.exp(-x*w*A);return a-k*((v+x*w*_)/N*Math.sin(N*A)+_*Math.cos(N*A))}}else if(x===1)E=N=>a-Math.exp(-w*N)*(_+(v+w*_)*N);else{const N=w*Math.sqrt(x*x-1);E=A=>{const k=Math.exp(-x*w*A),j=Math.min(N*A,300);return a-k*((v+x*w*_)*Math.sinh(j)+N*_*Math.cosh(j))/N}}const T={calculatedDuration:g&&h||null,next:N=>{const A=E(N);if(g)o.done=N>=h;else{let k=N===0?v:0;x<1&&(k=N===0?Pd(v):Xve(E,N,A));const j=Math.abs(k)<=r,R=Math.abs(a-A)<=i;o.done=j&&R}return o.value=o.done?a:A,o},toString:()=>{const N=Math.min(sB(T),D3),A=Yve(k=>T.next(N*k).value,N,30);return N+"ms "+A},toTransition:()=>{}};return T}F3.applyToOptions=e=>{const t=dct(e,100,F3);return e.ease=t.ease,e.duration=Pd(t.duration),e.type="keyframes",e};function LF({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:a,min:o,max:c,restDelta:u=.5,restSpeed:d}){const h=e[0],p={done:!1,value:h},g=j=>o!==void 0&&j<o||c!==void 0&&j>c,v=j=>o===void 0?c:c===void 0||Math.abs(o-j)<Math.abs(c-j)?o:c;let x=n*t;const _=h+x,w=a===void 0?_:a(_);w!==_&&(x=w-h);const S=j=>-x*Math.exp(-j/r),E=j=>w+S(j),T=j=>{const R=S(j),P=E(j);p.done=Math.abs(R)<=u,p.value=p.done?w:P};let N,A;const k=j=>{g(p.value)&&(N=j,A=F3({keyframes:[p.value,v(p.value)],velocity:Xve(E,j,p.value),damping:i,stiffness:s,restDelta:u,restSpeed:d}))};return k(0),{calculatedDuration:null,next:j=>{let R=!1;return!A&&N===void 0&&(R=!0,T(j),k(j)),N!==void 0&&j>=N?A.next(j-N):(!R&&T(j),p)}}}function yct(e,t,n){const r=[],i=n||Oh.mix||Kve,s=e.length-1;for(let a=0;a<s;a++){let o=i(e[a],e[a+1]);if(t){const c=Array.isArray(t)?t[a]||Pc:t;o=KE(c,o)}r.push(o)}return r}function bct(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(Y$(s===t.length),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=yct(t,r,i),c=o.length,u=d=>{if(a&&d<e[0])return t[0];let h=0;if(c>1)for(;h<e.length-2&&!(d<e[h+1]);h++);const p=wS(e[h],e[h+1],d);return o[h](p)};return n?d=>u(Ih(e[0],e[s-1],d)):u}function _ct(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=wS(0,t,r);e.push(ls(n,1,i))}}function wct(e){const t=[0];return _ct(t,e.length-1),t}function Sct(e,t){return e.map(n=>n*t)}function Ect(e,t){return e.map(()=>t||Lve).splice(0,e.length-1)}function Xw({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=Mlt(r)?r.map(JJ):JJ(r),s={done:!1,value:t[0]},a=Sct(n&&n.length===t.length?n:wct(t),e),o=bct(a,t,{ease:Array.isArray(i)?i:Ect(t,i)});return{calculatedDuration:e,next:c=>(s.value=o(c),s.done=c>=e,s)}}const Cct=e=>e!==null;function aB(e,{repeat:t,repeatType:n="loop"},r,i=1){const s=e.filter(Cct),o=i<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!o||r===void 0?s[o]:r}const Tct={decay:LF,inertia:LF,tween:Xw,keyframes:Xw,spring:F3};function Qve(e){typeof e.type=="string"&&(e.type=Tct[e.type])}class oB{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const Act=e=>e/100;class lB extends oB{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==ul.now()&&this.tick(ul.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Qve(t);const{type:n=Xw,repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:a=0}=t;let{keyframes:o}=t;const c=n||Xw;c!==Xw&&typeof o[0]!="number"&&(this.mixKeyframes=KE(Act,Kve(o[0],o[1])),o=[0,100]);const u=c({...t,keyframes:o});s==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...o].reverse(),velocity:-a})),u.calculatedDuration===null&&(u.calculatedDuration=sB(u));const{calculatedDuration:d}=u;this.calculatedDuration=d,this.resolvedDuration=d+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:s,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:d,repeat:h,repeatType:p,repeatDelay:g,type:v,onUpdate:x,finalKeyframe:_}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const w=this.currentTime-u*(this.playbackSpeed>=0?1:-1),S=this.playbackSpeed>=0?w<0:w>i;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let E=this.currentTime,T=r;if(h){const j=Math.min(this.currentTime,i)/o;let R=Math.floor(j),P=j%1;!P&&j>=1&&(P=1),P===1&&R--,R=Math.min(R,h+1),!!(R%2)&&(p==="reverse"?(P=1-P,g&&(P-=g/o)):p==="mirror"&&(T=a)),E=Ih(0,1,P)*o}const N=S?{done:!1,value:d[0]}:T.next(E);s&&(N.value=s(N.value));let{done:A}=N;!S&&c!==null&&(A=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&A);return k&&v!==LF&&(N.value=aB(d,this.options,_,this.speed)),x&&x(N.value),k&&this.finish(),N}then(t,n){return this.finished.then(t,n)}get duration(){return Ac(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ac(t)}get time(){return Ac(this.currentTime)}set time(t){t=Pd(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(ul.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ac(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=uct,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ul.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function kct(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const t0=e=>e*180/Math.PI,zF=e=>{const t=t0(Math.atan2(e[1],e[0]));return $F(t)},Nct={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:zF,rotateZ:zF,skewX:e=>t0(Math.atan(e[1])),skewY:e=>t0(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},$F=e=>(e=e%360,e<0&&(e+=360),e),see=zF,aee=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),oee=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),jct={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:aee,scaleY:oee,scale:e=>(aee(e)+oee(e))/2,rotateX:e=>$F(t0(Math.atan2(e[6],e[5]))),rotateY:e=>$F(t0(Math.atan2(-e[2],e[0]))),rotateZ:see,rotate:see,skewX:e=>t0(Math.atan(e[4])),skewY:e=>t0(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function BF(e){return e.includes("scale")?1:0}function UF(e,t){if(!e||e==="none")return BF(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=jct,i=n;else{const o=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Nct,i=o}if(!i)return BF(t);const s=r[t],a=i[1].split(",").map(Ict);return typeof s=="function"?s(a):a[s]}const Rct=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return UF(n,t)};function Ict(e){return parseFloat(e.trim())}const rb=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ib=new Set(rb),lee=e=>e===nb||e===Fn,Oct=new Set(["x","y","z"]),Pct=rb.filter(e=>!Oct.has(e));function Mct(e){const t=[];return Pct.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const m0={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>UF(t,"x"),y:(e,{transform:t})=>UF(t,"y")};m0.translateX=m0.x;m0.translateY=m0.y;const g0=new Set;let VF=!1,HF=!1,qF=!1;function Zve(){if(HF){const e=Array.from(g0).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=Mct(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,a])=>{r.getValue(s)?.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}HF=!1,VF=!1,g0.forEach(e=>e.complete(qF)),g0.clear()}function Jve(){g0.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(HF=!0)})}function Dct(){qF=!0,Jve(),Zve(),qF=!1}class cB{constructor(t,n,r,i,s,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(g0.add(this),VF||(VF=!0,ts.read(Jve),ts.resolveKeyframes(Zve))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const s=i?.get(),a=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const o=r.readValue(n,a);o!=null&&(t[0]=o)}t[0]===void 0&&(t[0]=a),i&&s===void 0&&i.set(t[0])}kct(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),g0.delete(this)}cancel(){this.state==="scheduled"&&(g0.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Fct=e=>e.startsWith("--");function Lct(e,t,n){Fct(t)?e.style.setProperty(t,n):e.style[t]=n}const zct=X$(()=>window.ScrollTimeline!==void 0),$ct={};function Bct(e,t){const n=X$(e);return()=>$ct[t]??n()}const e1e=Bct(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),vw=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,cee={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:vw([0,.65,.55,1]),circOut:vw([.55,0,1,.45]),backIn:vw([.31,.01,.66,-.59]),backOut:vw([.33,1.53,.69,.99])};function t1e(e,t){if(e)return typeof e=="function"?e1e()?Yve(e,t):"ease-out":zve(e)?vw(e):Array.isArray(e)?e.map(n=>t1e(n,t)||cee.easeOut):cee[e]}function Uct(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:a="loop",ease:o="easeOut",times:c}={},u=void 0){const d={[t]:n};c&&(d.offset=c);const h=t1e(o,i);Array.isArray(h)&&(d.easing=h);const p={delay:r,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:s+1,direction:a==="reverse"?"alternate":"normal"};return u&&(p.pseudoElement=u),e.animate(d,p)}function n1e(e){return typeof e=="function"&&"applyToOptions"in e}function Vct({type:e,...t}){return n1e(e)&&e1e()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Hct extends oB{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:s,allowFlatten:a=!1,finalKeyframe:o,onComplete:c}=t;this.isPseudoElement=!!s,this.allowFlatten=a,this.options=t,Y$(typeof t.type!="string");const u=Vct(t);this.animation=Uct(n,r,i,u,s),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const d=aB(i,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(d):Lct(n,r,d),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return Ac(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ac(t)}get time(){return Ac(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Pd(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&zct()?(this.animation.timeline=t,Pc):n(this)}}const r1e={anticipate:Mve,backInOut:Pve,circInOut:Fve};function qct(e){return e in r1e}function Wct(e){typeof e.ease=="string"&&qct(e.ease)&&(e.ease=r1e[e.ease])}const uee=10;class Gct extends Hct{constructor(t){Wct(t),Qve(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:s,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const o=new lB({...a,autoplay:!1}),c=Pd(this.finishedTime??this.time);n.setWithVelocity(o.sample(c-uee).value,o.sample(c).value,uee),o.stop()}}const dee=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Tm.test(e)||e==="0")&&!e.startsWith("url("));function Kct(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Yct(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],a=dee(i,t),o=dee(s,t);return!a||!o?!1:Kct(e)||(n==="spring"||n1e(n))&&r}function WF(e){e.duration=0,e.type="keyframes"}const Xct=new Set(["opacity","clipPath","filter","transform"]),Qct=X$(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Zct(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:s,type:a}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=t.owner.getProps();return Qct()&&n&&Xct.has(n)&&(n!=="transform"||!u)&&!c&&!r&&i!=="mirror"&&s!==0&&a!=="inertia"}const Jct=40;class eut extends oB{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:a="loop",keyframes:o,name:c,motionValue:u,element:d,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=ul.now();const p={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:a,name:c,motionValue:u,element:d,...h},g=d?.KeyframeResolver||cB;this.keyframeResolver=new g(o,(v,x,_)=>this.onKeyframesResolved(v,x,p,!_),c,u,d),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,i){this.keyframeResolver=void 0;const{name:s,type:a,velocity:o,delay:c,isHandoff:u,onUpdate:d}=r;this.resolvedAt=ul.now(),Yct(t,s,a,o)||((Oh.instantAnimations||!c)&&d?.(aB(t,r,n)),t[0]=t[t.length-1],WF(r),r.repeat=0);const p={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Jct?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},g=!u&&Zct(p)?new Gct({...p,element:p.motionValue.owner.current}):new lB(p);g.finished.then(()=>this.notifyFinished()).catch(Pc),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Dct()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const tut=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function nut(e){const t=tut.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function i1e(e,t,n=1){const[r,i]=nut(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const a=s.trim();return Tve(a)?parseFloat(a):a}return tB(i)?i1e(i,t,n+1):i}function uB(e,t){return e?.[t]??e?.default??e}const s1e=new Set(["width","height","top","left","right","bottom",...rb]),rut={test:e=>e==="auto",parse:e=>e},a1e=e=>t=>t.test(e),o1e=[nb,Fn,Md,Pp,Klt,Glt,rut],fee=e=>o1e.find(a1e(e));function iut(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||kve(e):!0}const sut=new Set(["brightness","contrast","saturate","opacity"]);function aut(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(nB)||[];if(!r)return e;const i=n.replace(r,"");let s=sut.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const out=/\b([a-z-]*)\(.*?\)/gu,GF={...Tm,getAnimatableNone:e=>{const t=e.match(out);return t?t.map(aut).join(" "):e}},hee={...nb,transform:Math.round},lut={rotate:Pp,rotateX:Pp,rotateY:Pp,rotateZ:Pp,scale:TA,scaleX:TA,scaleY:TA,scaleZ:TA,skew:Pp,skewX:Pp,skewY:Pp,distance:Fn,translateX:Fn,translateY:Fn,translateZ:Fn,x:Fn,y:Fn,z:Fn,perspective:Fn,transformPerspective:Fn,opacity:SS,originX:eee,originY:eee,originZ:Fn},dB={borderWidth:Fn,borderTopWidth:Fn,borderRightWidth:Fn,borderBottomWidth:Fn,borderLeftWidth:Fn,borderRadius:Fn,radius:Fn,borderTopLeftRadius:Fn,borderTopRightRadius:Fn,borderBottomRightRadius:Fn,borderBottomLeftRadius:Fn,width:Fn,maxWidth:Fn,height:Fn,maxHeight:Fn,top:Fn,right:Fn,bottom:Fn,left:Fn,padding:Fn,paddingTop:Fn,paddingRight:Fn,paddingBottom:Fn,paddingLeft:Fn,margin:Fn,marginTop:Fn,marginRight:Fn,marginBottom:Fn,marginLeft:Fn,backgroundPositionX:Fn,backgroundPositionY:Fn,...lut,zIndex:hee,fillOpacity:SS,strokeOpacity:SS,numOctaves:hee},cut={...dB,color:Xs,backgroundColor:Xs,outlineColor:Xs,fill:Xs,stroke:Xs,borderColor:Xs,borderTopColor:Xs,borderRightColor:Xs,borderBottomColor:Xs,borderLeftColor:Xs,filter:GF,WebkitFilter:GF},l1e=e=>cut[e];function c1e(e,t){let n=l1e(e);return n!==GF&&(n=Tm),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const uut=new Set(["auto","none","0"]);function dut(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!uut.has(s)&&ES(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=c1e(n,i)}class fut extends cB{constructor(t,n,r,i,s){super(t,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),tB(u))){const d=i1e(u,n.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!s1e.has(r)||t.length!==2)return;const[i,s]=t,a=fee(i),o=fee(s);if(a!==o)if(lee(a)&&lee(o))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else m0[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||iut(t[i]))&&r.push(i);r.length&&dut(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=m0[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const s=r.length-1,a=r[s];r[s]=m0[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([o,c])=>{t.getValue(o).set(c)}),this.resolveNoneKeyframes()}}function hut(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const u1e=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function d1e(e){return Ave(e)&&"offsetHeight"in e}const pee=30,put=e=>!isNaN(parseFloat(e));class mut{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const i=ul.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=ul.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=put(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Q$);const r=this.events[t].add(n);return t==="change"?()=>{r(),ts.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=ul.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>pee)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,pee);return Nve(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function _y(e,t){return new mut(e,t)}const{schedule:fB}=$ve(queueMicrotask,!1),su={x:!1,y:!1};function f1e(){return su.x||su.y}function gut(e){return e==="x"||e==="y"?su[e]?null:(su[e]=!0,()=>{su[e]=!1}):su.x||su.y?null:(su.x=su.y=!0,()=>{su.x=su.y=!1})}function h1e(e,t){const n=hut(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function mee(e){return!(e.pointerType==="touch"||f1e())}function xut(e,t,n={}){const[r,i,s]=h1e(e,n),a=o=>{if(!mee(o))return;const{target:c}=o,u=t(c,o);if(typeof u!="function"||!c)return;const d=h=>{mee(h)&&(u(h),c.removeEventListener("pointerleave",d))};c.addEventListener("pointerleave",d,i)};return r.forEach(o=>{o.addEventListener("pointerenter",a,i)}),s}const p1e=(e,t)=>t?e===t?!0:p1e(e,t.parentElement):!1,hB=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,vut=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function yut(e){return vut.has(e.tagName)||e.tabIndex!==-1}const zk=new WeakSet;function gee(e){return t=>{t.key==="Enter"&&e(t)}}function pM(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const but=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=gee(()=>{if(zk.has(n))return;pM(n,"down");const i=gee(()=>{pM(n,"up")}),s=()=>pM(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function xee(e){return hB(e)&&!f1e()}function _ut(e,t,n={}){const[r,i,s]=h1e(e,n),a=o=>{const c=o.currentTarget;if(!xee(o))return;zk.add(c);const u=t(c,o),d=(g,v)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",p),zk.has(c)&&zk.delete(c),xee(g)&&typeof u=="function"&&u(g,{success:v})},h=g=>{d(g,c===window||c===document||n.useGlobalTarget||p1e(c,g.target))},p=g=>{d(g,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",p,i)};return r.forEach(o=>{(n.useGlobalTarget?window:o).addEventListener("pointerdown",a,i),d1e(o)&&(o.addEventListener("focus",u=>but(u,i)),!yut(o)&&!o.hasAttribute("tabindex")&&(o.tabIndex=0))}),s}function m1e(e){return Ave(e)&&"ownerSVGElement"in e}function wut(e){return m1e(e)&&e.tagName==="svg"}const po=e=>!!(e&&e.getVelocity),Sut=[...o1e,Xs,Tm],Eut=e=>Sut.find(a1e(e)),pB=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function vee(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Cut(...e){return t=>{let n=!1;const r=e.map(i=>{const s=vee(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():vee(e[i],null)}}}}function Tut(...e){return b.useCallback(Cut(...e),e)}class Aut extends b.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,i=d1e(r)&&r.offsetWidth||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=i-s.width-s.left}return null}componentDidUpdate(){}render(){return this.props.children}}function kut({children:e,isPresent:t,anchorX:n,root:r}){const i=b.useId(),s=b.useRef(null),a=b.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:o}=b.useContext(pB),c=Tut(s,e?.ref);return b.useInsertionEffect(()=>{const{width:u,height:d,top:h,left:p,right:g}=a.current;if(t||!s.current||!u||!d)return;const v=n==="left"?`left: ${p}`:`right: ${g}`;s.current.dataset.motionPopId=i;const x=document.createElement("style");o&&(x.nonce=o);const _=r??document.head;return _.appendChild(x),x.sheet&&x.sheet.insertRule(` 1200 [data-motion-pop-id="${i}"] { 1201 position: absolute !important; 1202 width: ${u}px !important; 1203 height: ${d}px !important; 1204 ${v}px !important; 1205 top: ${h}px !important; 1206 } 1207 `),()=>{_.contains(x)&&_.removeChild(x)}},[t]),l.jsx(Aut,{isPresent:t,childRef:s,sizeRef:a,children:b.cloneElement(e,{ref:c})})}const Nut=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:a,anchorX:o,root:c})=>{const u=q$(jut),d=b.useId();let h=!0,p=b.useMemo(()=>(h=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:g=>{u.set(g,!0);for(const v of u.values())if(!v)return;r&&r()},register:g=>(u.set(g,!1),()=>u.delete(g))}),[n,u,r]);return s&&h&&(p={...p}),b.useMemo(()=>{u.forEach((g,v)=>u.set(v,!1))},[n]),b.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),a==="popLayout"&&(e=l.jsx(kut,{isPresent:n,anchorX:o,root:c,children:e})),l.jsx(y4.Provider,{value:p,children:e})};function jut(){return new Map}function g1e(e=!0){const t=b.useContext(y4);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=b.useId();b.useEffect(()=>{if(e)return i(s)},[e]);const a=b.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,a]:[!0]}const AA=e=>e.key||"";function yee(e){const t=[];return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const CS=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:a=!1,anchorX:o="left",root:c})=>{const[u,d]=g1e(a),h=b.useMemo(()=>yee(e),[e]),p=a&&!u?[]:h.map(AA),g=b.useRef(!0),v=b.useRef(h),x=q$(()=>new Map),[_,w]=b.useState(h),[S,E]=b.useState(h);Cve(()=>{g.current=!1,v.current=h;for(let A=0;A<S.length;A++){const k=AA(S[A]);p.includes(k)?x.delete(k):x.get(k)!==!0&&x.set(k,!1)}},[S,p.length,p.join("-")]);const T=[];if(h!==_){let A=[...h];for(let k=0;k<S.length;k++){const j=S[k],R=AA(j);p.includes(R)||(A.splice(k,0,j),T.push(j))}return s==="wait"&&T.length&&(A=T),E(yee(A)),w(h),null}const{forceRender:N}=b.useContext(H$);return l.jsx(l.Fragment,{children:S.map(A=>{const k=AA(A),j=a&&!u?!1:h===S||p.includes(k),R=()=>{if(x.has(k))x.set(k,!0);else return;let P=!0;x.forEach(V=>{V||(P=!1)}),P&&(N?.(),E(v.current),a&&d?.(),r&&r())};return l.jsx(Nut,{isPresent:j,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,root:c,onExitComplete:j?void 0:R,anchorX:o,children:A},k)})})},x1e=b.createContext({strict:!1}),bee={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},wy={};for(const e in bee)wy[e]={isEnabled:t=>bee[e].some(n=>!!t[n])};function Rut(e){for(const t in e)wy[t]={...wy[t],...e[t]}}const Iut=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function L3(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Iut.has(e)}let v1e=e=>!L3(e);function Out(e){typeof e=="function"&&(v1e=t=>t.startsWith("on")?!L3(t):e(t))}try{Out(require("@emotion/is-prop-valid").default)}catch{}function Put(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(v1e(i)||n===!0&&L3(i)||!t&&!L3(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const b4=b.createContext({});function _4(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function TS(e){return typeof e=="string"||Array.isArray(e)}const mB=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],gB=["initial",...mB];function w4(e){return _4(e.animate)||gB.some(t=>TS(e[t]))}function y1e(e){return!!(w4(e)||e.variants)}function Mut(e,t){if(w4(e)){const{initial:n,animate:r}=e;return{initial:n===!1||TS(n)?n:void 0,animate:TS(r)?r:void 0}}return e.inherit!==!1?t:{}}function Dut(e){const{initial:t,animate:n}=Mut(e,b.useContext(b4));return b.useMemo(()=>({initial:t,animate:n}),[_ee(t),_ee(n)])}function _ee(e){return Array.isArray(e)?e.join(" "):e}const AS={};function Fut(e){for(const t in e)AS[t]=e[t],eB(t)&&(AS[t].isCSSVariable=!0)}function b1e(e,{layout:t,layoutId:n}){return ib.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!AS[e]||e==="opacity")}const Lut={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},zut=rb.length;function $ut(e,t,n){let r="",i=!0;for(let s=0;s<zut;s++){const a=rb[s],o=e[a];if(o===void 0)continue;let c=!0;if(typeof o=="number"?c=o===(a.startsWith("scale")?1:0):c=parseFloat(o)===0,!c||n){const u=u1e(o,dB[a]);if(!c){i=!1;const d=Lut[a]||a;r+=`${d}(${u}) `}n&&(t[a]=u)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}
vendor: 5,151 bytes, line 1207
1207function xB(e,t,n){const{style:r,vars:i,transformOrigin:s}=e;let a=!1,o=!1;for(const c in t){const u=t[c];if(ib.has(c)){a=!0;continue}else if(eB(c)){i[c]=u;continue}else{const d=u1e(u,dB[c]);c.startsWith("origin")?(o=!0,s[c]=d):r[c]=d}}if(t.transform||(a||n?r.transform=$ut(t,e.transform,n):r.transform&&(r.transform="none")),o){const{originX:c="50%",originY:u="50%",originZ:d=0}=s;r.transformOrigin=`${c} ${u} ${d}`}}const vB=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function _1e(e,t,n){for(const r in t)!po(t[r])&&!b1e(r,n)&&(e[r]=t[r])}function But({transformTemplate:e},t){return b.useMemo(()=>{const n=vB();return xB(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Uut(e,t){const n=e.style||{},r={};return _1e(r,n,e),Object.assign(r,But(e,t)),r}function Vut(e,t){const n={},r=Uut(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const Hut={offset:"stroke-dashoffset",array:"stroke-dasharray"},qut={offset:"strokeDashoffset",array:"strokeDasharray"};function Wut(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?Hut:qut;e[s.offset]=Fn.transform(-r);const a=Fn.transform(t),o=Fn.transform(n);e[s.array]=`${a} ${o}`}function w1e(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:s=1,pathOffset:a=0,...o},c,u,d){if(xB(e,o,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:p}=e;h.transform&&(p.transform=h.transform,delete h.transform),(p.transform||h.transformOrigin)&&(p.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),p.transform&&(p.transformBox=d?.transformBox??"fill-box",delete h.transformBox),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),i!==void 0&&Wut(h,i,s,a,!1)}const S1e=()=>({...vB(),attrs:{}}),E1e=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Gut(e,t,n,r){const i=b.useMemo(()=>{const s=S1e();return w1e(s,t,E1e(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};_1e(s,e.style,e),i.style={...s,...i.style}}return i}const Kut=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function yB(e){return typeof e!="string"||e.includes("-")?!1:!!(Kut.indexOf(e)>-1||/[A-Z]/u.test(e))}function Yut(e,t,n,{latestValues:r},i,s=!1){const o=(yB(e)?Gut:Vut)(t,r,i,e),c=Put(t,typeof e=="string",s),u=e!==b.Fragment?{...c,...o,ref:n}:{},{children:d}=t,h=b.useMemo(()=>po(d)?d.get():d,[d]);return b.createElement(e,{...u,children:h})}function wee(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function bB(e,t,n,r){if(typeof t=="function"){const[i,s]=wee(r);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=wee(r);t=t(n!==void 0?n:e.custom,i,s)}return t}function $k(e){return po(e)?e.get():e}function Xut({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Qut(n,r,i,e),renderState:t()}}function Qut(e,t,n,r){const i={},s=r(e,{});for(const p in s)i[p]=$k(s[p]);let{initial:a,animate:o}=e;const c=w4(e),u=y1e(e);t&&u&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),o===void 0&&(o=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const h=d?o:a;if(h&&typeof h!="boolean"&&!_4(h)){const p=Array.isArray(h)?h:[h];for(let g=0;g<p.length;g++){const v=bB(e,p[g]);if(v){const{transitionEnd:x,transition:_,...w}=v;for(const S in w){let E=w[S];if(Array.isArray(E)){const T=d?E.length-1:0;E=E[T]}E!==null&&(i[S]=E)}for(const S in x)i[S]=x[S]}}}return i}const C1e=e=>(t,n)=>{const r=b.useContext(b4),i=b.useContext(y4),s=()=>Xut(e,t,r,i);return n?s():q$(s)};function _B(e,t,n){const{style:r}=e,i={};for(const s in r)(po(r[s])||t.style&&po(t.style[s])||b1e(s,e)||n?.getValue(s)?.liveStyle!==void 0)&&(i[s]=r[s]);return i}const Zut=C1e({scrapeMotionValuesFromProps:_B,createRenderState:vB});function T1e(e,t,n){const r=_B(e,t,n);for(const i in e)if(po(e[i])||po(t[i])){const s=rb.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}const Jut=C1e({scrapeMotionValuesFromProps:T1e,createRenderState:S1e}),edt=Symbol.for("motionComponentSymbol");function c1(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function tdt(e,t,n){return b.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):c1(n)&&(n.current=r))},[t])}const wB=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ndt="framerAppearId",A1e="data-"+wB(ndt),k1e=b.createContext({});function rdt(e,t,n,r,i){const{visualElement:s}=b.useContext(b4),a=b.useContext(x1e),o=b.useContext(y4),c=b.useContext(pB).reducedMotion,u=b.useRef(null);r=r||a.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:s,props:n,presenceContext:o,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:c}
vendor: 29,742 bytes, line 1207
1207));const d=u.current,h=b.useContext(k1e);d&&!d.projection&&i&&(d.type==="html"||d.type==="svg")&&idt(u.current,n,i,h);const p=b.useRef(!1);b.useInsertionEffect(()=>{d&&p.current&&d.update(n,o)});const g=n[A1e],v=b.useRef(!!g&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));return Cve(()=>{d&&(p.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),v.current&&d.animationState&&d.animationState.animateChanges())}),b.useEffect(()=>{d&&(!v.current&&d.animationState&&d.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(g)}),v.current=!1),d.enteringChildren=void 0)}),d}function idt(e,t,n,r){const{layoutId:i,layout:s,drag:a,dragConstraints:o,layoutScroll:c,layoutRoot:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:N1e(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!a||o&&c1(o),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:u})}function N1e(e){if(e)return e.options.allowProjection!==!1?e.projection:N1e(e.parent)}function mM(e,{forwardMotionProps:t=!1}={},n,r){n&&Rut(n);const i=yB(e)?Jut:Zut;function s(o,c){let u;const d={...b.useContext(pB),...o,layoutId:sdt(o)},{isStatic:h}=d,p=Dut(o),g=i(o,h);if(!h&&W$){adt();const v=odt(d);u=v.MeasureLayout,p.visualElement=rdt(e,g,d,r,v.ProjectionNode)}return l.jsxs(b4.Provider,{value:p,children:[u&&p.visualElement?l.jsx(u,{visualElement:p.visualElement,...d}):null,Yut(e,o,tdt(g,p.visualElement,c),g,h,t)]})}s.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const a=b.forwardRef(s);return a[edt]=e,a}function sdt({layoutId:e}){const t=b.useContext(H$).id;return t&&e!==void 0?t+"-"+e:e}function adt(e,t){b.useContext(x1e).strict}function odt(e){const{drag:t,layout:n}=wy;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function ldt(e,t){if(typeof Proxy>"u")return mM;const n=new Map,r=(s,a)=>mM(s,a,e,t),i=(s,a)=>r(s,a);return new Proxy(i,{get:(s,a)=>a==="create"?r:(n.has(a)||n.set(a,mM(a,void 0,e,t)),n.get(a))})}function j1e({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function cdt({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function udt(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function gM(e){return e===void 0||e===1}function KF({scale:e,scaleX:t,scaleY:n}){return!gM(e)||!gM(t)||!gM(n)}function Bg(e){return KF(e)||R1e(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function R1e(e){return See(e.x)||See(e.y)}function See(e){return e&&e!=="0%"}function z3(e,t,n){const r=e-n,i=t*r;return n+i}function Eee(e,t,n,r,i){return i!==void 0&&(e=z3(e,i,r)),z3(e,n,r)+t}function YF(e,t=0,n=1,r,i){e.min=Eee(e.min,t,n,r,i),e.max=Eee(e.max,t,n,r,i)}function I1e(e,{x:t,y:n}){YF(e.x,t.translate,t.scale,t.originPoint),YF(e.y,n.translate,n.scale,n.originPoint)}const Cee=.999999999999,Tee=1.0000000000001;function ddt(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,a;for(let o=0;o<i;o++){s=n[o],a=s.projectionDelta;const{visualElement:c}=s.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&d1(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,I1e(e,a)),r&&Bg(s.latestValues)&&d1(e,s.latestValues))}t.x<Tee&&t.x>Cee&&(t.x=1),t.y<Tee&&t.y>Cee&&(t.y=1)}function u1(e,t){e.min=e.min+t,e.max=e.max+t}function Aee(e,t,n,r,i=.5){const s=ls(e.min,e.max,i);YF(e,t,n,s,r)}function d1(e,t){Aee(e.x,t.x,t.scaleX,t.scale,t.originX),Aee(e.y,t.y,t.scaleY,t.scale,t.originY)}function O1e(e,t){return j1e(udt(e.getBoundingClientRect(),t))}function fdt(e,t,n){const r=O1e(e,n),{scroll:i}=t;return i&&(u1(r.x,i.offset.x),u1(r.y,i.offset.y)),r}const kee=()=>({translate:0,scale:1,origin:0,originPoint:0}),f1=()=>({x:kee(),y:kee()}),Nee=()=>({min:0,max:0}),Os=()=>({x:Nee(),y:Nee()}),XF={current:null},P1e={current:!1};function hdt(){if(P1e.current=!0,!!W$)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>XF.current=e.matches;e.addEventListener("change",t),t()}else XF.current=!1}const pdt=new WeakMap;function mdt(e,t,n){for(const r in t){const i=t[r],s=n[r];if(po(i))e.addValue(r,i);else if(po(s))e.addValue(r,_y(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(i):a.hasAnimated||a.set(i)}else{const a=e.getStaticValue(r);e.addValue(r,_y(a!==void 0?a:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const jee=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class gdt{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:a},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=cB,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=ul.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,ts.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=o,this.blockInitialAnimation=!!s,this.isControllingVariants=w4(n),this.isVariantNode=y1e(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in h){const g=h[p];c[p]!==void 0&&po(g)&&g.set(c[p])}}mount(t){this.current=t,pdt.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),P1e.current||hdt(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:XF.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Cm(this.notifyUpdate),Cm(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=ib.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&ts.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s&&s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in wy){const n=wy[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Os()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<jee.length;r++){const i=jee[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,a=t[s];a&&(this.propEventSubscriptions[i]=this.on(i,a))}this.prevMotionValues=mdt(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=_y(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Tve(r)||kve(r))?r=parseFloat(r):!Eut(r)&&Tm.test(n)&&(r=c1e(t,n)),this.setBaseTarget(t,po(r)?r.get():r)),po(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const s=bB(this.props,n,this.presenceContext?.custom);s&&(r=s[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!po(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Q$),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){fB.render(this.render)}}class M1e extends gdt{constructor(){super(...arguments),this.KeyframeResolver=fut}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;po(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function D1e(e,{style:t,vars:n},r,i){const s=e.style;let a;for(a in t)s[a]=t[a];i?.applyProjectionStyles(s,r);for(a in n)s.setProperty(a,n[a])}function xdt(e){return window.getComputedStyle(e)}class vdt extends M1e{constructor(){super(...arguments),this.type="html",this.renderInstance=D1e}readValueFromInstance(t,n){if(ib.has(n))return this.projection?.isProjecting?BF(n):Rct(t,n);{const r=xdt(t),i=(eB(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return O1e(t,n)}build(t,n,r){xB(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return _B(t,n,r)}}const F1e=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function ydt(e,t,n,r){D1e(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(F1e.has(i)?i:wB(i),t.attrs[i])}class bdt extends M1e{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Os}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ib.has(n)){const r=l1e(n);return r&&r.default||0}return n=F1e.has(n)?n:wB(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return T1e(t,n,r)}build(t,n,r){w1e(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){ydt(t,n,r,i)}mount(t){this.isSVGTag=E1e(t.tagName),super.mount(t)}}const _dt=(e,t)=>yB(e)?new bdt(t):new vdt(t,{allowProjection:e!==b.Fragment});function F1(e,t,n){const r=e.getProps();return bB(r,t,n!==void 0?n:r.custom,e)}const QF=e=>Array.isArray(e);function wdt(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,_y(n))}function Sdt(e){return QF(e)?e[e.length-1]||0:e}function Edt(e,t){const n=F1(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const a in s){const o=Sdt(s[a]);wdt(e,a,o)}}function Cdt(e){return!!(po(e)&&e.add)}function ZF(e,t){const n=e.getValue("willChange");if(Cdt(n))return n.add(t);if(!n&&Oh.WillChange){const r=new Oh.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function L1e(e){return e.props[A1e]}const Tdt=e=>e!==null;function Adt(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(Tdt),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[s]}const kdt={type:"spring",stiffness:500,damping:25,restSpeed:10},Ndt=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),jdt={type:"keyframes",duration:.8},Rdt={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Idt=(e,{keyframes:t})=>t.length>2?jdt:ib.has(e)?e.startsWith("scale")?Ndt(t[1]):kdt:Rdt;function Odt({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:a,repeatDelay:o,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const SB=(e,t,n,r={},i,s)=>a=>{const o=uB(r,e)||{},c=o.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Pd(c);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...o,delay:-u,onUpdate:p=>{t.set(p),o.onUpdate&&o.onUpdate(p)},onComplete:()=>{a(),o.onComplete&&o.onComplete()},name:e,motionValue:t,element:s?void 0:i};Odt(o)||Object.assign(d,Idt(e,d)),d.duration&&(d.duration=Pd(d.duration)),d.repeatDelay&&(d.repeatDelay=Pd(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let h=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(WF(d),d.delay===0&&(h=!0)),(Oh.instantAnimations||Oh.skipAnimations)&&(h=!0,WF(d),d.delay=0),d.allowFlatten=!o.type&&!o.ease,h&&!s&&t.get()!==void 0){const p=Adt(d.keyframes,o);if(p!==void 0){ts.update(()=>{d.onUpdate(p),d.onComplete()});return}}return o.isSync?new lB(d):new eut(d)};function Pdt({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function z1e(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:a,...o}=t;r&&(s=r);const c=[],u=i&&e.animationState&&e.animationState.getState()[i];for(const d in o){const h=e.getValue(d,e.latestValues[d]??null),p=o[d];if(p===void 0||u&&Pdt(u,d))continue;const g={delay:n,...uB(s||{},d)},v=h.get();if(v!==void 0&&!h.isAnimating&&!Array.isArray(p)&&p===v&&!g.velocity)continue;let x=!1;if(window.MotionHandoffAnimation){const w=L1e(e);if(w){const S=window.MotionHandoffAnimation(w,d,ts);S!==null&&(g.startTime=S,x=!0)}}ZF(e,d),h.start(SB(d,h,p,e.shouldReduceMotion&&s1e.has(d)?{type:!1}:g,e,x));const _=h.animation;_&&c.push(_)}return a&&Promise.all(c).then(()=>{ts.update(()=>{a&&Edt(e,a)})}),c}function $1e(e,t,n,r=0,i=1){const s=Array.from(e).sort((u,d)=>u.sortNodePosition(d)).indexOf(t),a=e.size,o=(a-1)*r;return typeof n=="function"?n(s,a):i===1?s*r:o-s*r}function JF(e,t,n={}){const r=F1(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>Promise.all(z1e(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:h}=i;return Mdt(e,t,c,u,d,h,n)}:()=>Promise.resolve(),{when:o}=i;if(o){const[c,u]=o==="beforeChildren"?[s,a]:[a,s];return c().then(()=>u())}else return Promise.all([s(),a(n.delay)])}function Mdt(e,t,n=0,r=0,i=0,s=1,a){const o=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),o.push(JF(c,t,{...a,delay:n+(typeof r=="function"?0:r)+$1e(e.variantChildren,c,r,i,s)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(o)}function Ddt(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>JF(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=JF(e,t,n);else{const i=typeof t=="function"?F1(e,t,n.custom):t;r=Promise.all(z1e(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function B1e(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const Fdt=gB.length;function U1e(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?U1e(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Fdt;n++){const r=gB[n],i=e.props[r];(TS(i)||i===!1)&&(t[r]=i)}return t}const Ldt=[...mB].reverse(),zdt=mB.length;function $dt(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Ddt(e,n,r)))}function Bdt(e){let t=$dt(e),n=Ree(),r=!0;const i=c=>(u,d)=>{const h=F1(e,d,c==="exit"?e.presenceContext?.custom:void 0);if(h){const{transition:p,transitionEnd:g,...v}=h;u={...u,...v,...g}}return u};function s(c){t=c(e)}function a(c){const{props:u}=e,d=U1e(e.parent)||{},h=[],p=new Set;let g={},v=1/0;for(let _=0;_<zdt;_++){const w=Ldt[_],S=n[w],E=u[w]!==void 0?u[w]:d[w],T=TS(E),N=w===c?S.isActive:null;N===!1&&(v=_);let A=E===d[w]&&E!==u[w]&&T;if(A&&r&&e.manuallyAnimateOnMount&&(A=!1),S.protectedKeys={...g},!S.isActive&&N===null||!E&&!S.prevProp||_4(E)||typeof E=="boolean")continue;const k=Udt(S.prevProp,E);let j=k||w===c&&S.isActive&&!A&&T||_>v&&T,R=!1;const P=Array.isArray(E)?E:[E];let V=P.reduce(i(w),{});N===!1&&(V={});const{prevResolvedValues:U={}}=S,G={...U,...V},Q=te=>{j=!0,p.has(te)&&(R=!0,p.delete(te)),S.needsAnimating[te]=!0;const ne=e.getValue(te);ne&&(ne.liveStyle=!1)};for(const te in G){const ne=V[te],se=U[te];if(g.hasOwnProperty(te))continue;let H=!1;QF(ne)&&QF(se)?H=!B1e(ne,se):H=ne!==se,H?ne!=null?Q(te):p.add(te):ne!==void 0&&p.has(te)?Q(te):S.protectedKeys[te]=!0}S.prevProp=E,S.prevResolvedValues=V,S.isActive&&(g={...g,...V}),r&&e.blockInitialAnimation&&(j=!1);const Z=A&&k;j&&(!Z||R)&&h.push(...P.map(te=>{const ne={type:w};if(typeof te=="string"&&r&&!Z&&e.manuallyAnimateOnMount&&e.parent){const{parent:se}=e,H=F1(se,te);if(se.enteringChildren&&H){const{delayChildren:O}=H.transition||{};ne.delay=$1e(se.enteringChildren,e,O)}}return{animation:te,options:ne}}))}if(p.size){const _={};if(typeof u.initial!="boolean"){const w=F1(e,Array.isArray(u.initial)?u.initial[0]:u.initial);w&&w.transition&&(_.transition=w.transition)}p.forEach(w=>{const S=e.getBaseTarget(w),E=e.getValue(w);E&&(E.liveStyle=!0),_[w]=S??null}),h.push({animation:_})}let x=!!h.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(x=!1),r=!1,x?t(h):Promise.resolve()}function o(c,u){if(n[c].isActive===u)return Promise.resolve();e.variantChildren?.forEach(h=>h.animationState?.setActive(c,u)),n[c].isActive=u;const d=a(c);for(const h in n)n[h].protectedKeys={};return d}return{animateChanges:a,setActive:o,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Ree()}}}function Udt(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!B1e(t,e):!1}function Ng(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ree(){return{animate:Ng(!0),whileInView:Ng(),whileHover:Ng(),whileTap:Ng(),whileDrag:Ng(),whileFocus:Ng(),exit:Ng()}}class Xm{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Vdt extends Xm{constructor(t){super(t),t.animationState||(t.animationState=Bdt(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();_4(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let Hdt=0;class qdt extends Xm{constructor(){super(...arguments),this.id=Hdt++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Wdt={animation:{Feature:Vdt},exit:{Feature:qdt}};function kS(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function QE(e){return{point:{x:e.pageX,y:e.pageY}}}const Gdt=e=>t=>hB(t)&&e(t,QE(t));function Qw(e,t,n,r){return kS(e,t,Gdt(n),r)}const V1e=1e-4,Kdt=1-V1e,Ydt=1+V1e,H1e=.01,Xdt=0-H1e,Qdt=0+H1e;function Fo(e){return e.max-e.min}function Zdt(e,t,n){return Math.abs(e-t)<=n}function Iee(e,t,n,r=.5){e.origin=r,e.originPoint=ls(t.min,t.max,e.origin),e.scale=Fo(n)/Fo(t),e.translate=ls(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Kdt&&e.scale<=Ydt||isNaN(e.scale))&&(e.scale=1),(e.translate>=Xdt&&e.translate<=Qdt||isNaN(e.translate))&&(e.translate=0)}function Zw(e,t,n,r){Iee(e.x,t.x,n.x,r?r.originX:void 0),Iee(e.y,t.y,n.y,r?r.originY:void 0)}function Oee(e,t,n){e.min=n.min+t.min,e.max=e.min+Fo(t)}function Jdt(e,t,n){Oee(e.x,t.x,n.x),Oee(e.y,t.y,n.y)}function Pee(e,t,n){e.min=t.min-n.min,e.max=e.min+Fo(t)}function Jw(e,t,n){Pee(e.x,t.x,n.x),Pee(e.y,t.y,n.y)}function mc(e){return[e("x"),e("y")]}const q1e=({current:e})=>e?e.ownerDocument.defaultView:null,Mee=(e,t)=>Math.abs(e-t);function eft(e,t){const n=Mee(e.x,t.x),r=Mee(e.y,t.y);return Math.sqrt(n**2+r**2)}class W1e{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:s=!1,distanceThreshold:a=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=vM(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,v=eft(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!v)return;const{point:x}=p,{timestamp:_}=$a;this.history.push({...x,timestamp:_});const{onStart:w,onMove:S}=this.handlers;g||(w&&w(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,p)},this.handlePointerMove=(p,g)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=xM(g,this.transformPagePoint),ts.update(this.updatePoint,!0)},this.handlePointerUp=(p,g)=>{this.end();const{onEnd:v,onSessionEnd:x,resumeAnimation:_}=this.handlers;if(this.dragSnapToOrigin&&_&&_(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=vM(p.type==="pointercancel"?this.lastMoveEventInfo:xM(g,this.transformPagePoint),this.history);this.startEvent&&v&&v(p,w),x&&x(p,w)},!hB(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=i||window;const o=QE(t),c=xM(o,this.transformPagePoint),{point:u}=c,{timestamp:d}=$a;this.history=[{...u,timestamp:d}];const{onSessionStart:h}=n;h&&h(t,vM(c,this.history)),this.removeListeners=KE(Qw(this.contextWindow,"pointermove",this.handlePointerMove),Qw(this.contextWindow,"pointerup",this.handlePointerUp),Qw(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Cm(this.updatePoint)}}function xM(e,t){return t?{point:t(e.point)}:e}function Dee(e,t){return{x:e.x-t.x,y:e.y-t.y}}function vM({point:e},t){return{point:e,delta:Dee(e,G1e(t)),offset:Dee(e,tft(t)),velocity:nft(t,.1)}}function tft(e){return e[0]}function G1e(e){return e[e.length-1]}function nft(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=G1e(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Pd(t)));)n--;if(!r)return{x:0,y:0};const s=Ac(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const a={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function rft(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ls(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ls(n,e,r.max):Math.min(e,n)),e}function Fee(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function ift(e,{top:t,left:n,bottom:r,right:i}){return{x:Fee(e.x,n,i),y:Fee(e.y,t,r)}}function Lee(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function sft(e,t){return{x:Lee(e.x,t.x),y:Lee(e.y,t.y)}}function aft(e,t){let n=.5;const r=Fo(e),i=Fo(t);return i>r?n=wS(t.min,t.max-r,e.min):r>i&&(n=wS(e.min,e.max-i,t.min)),Ih(0,1,n)}function oft(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const eL=.35;function lft(e=eL){return e===!1?e=0:e===!0&&(e=eL),{x:zee(e,"left","right"),y:zee(e,"top","bottom")}}function zee(e,t,n){return{min:$ee(e,t),max:$ee(e,n)}}function $ee(e,t){return typeof e=="number"?e:e[t]||0}const cft=new WeakMap;class uft{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Os(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const s=h=>{const{dragSnapToOrigin:p}=this.getProps();p?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(QE(h).point)},a=(h,p)=>{const{drag:g,dragPropagation:v,onDragStart:x}=this.getProps();if(g&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=gut(g),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=p,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),mc(w=>{let S=this.getAxisMotionValue(w).get()||0;if(Md.test(S)){const{projection:E}=this.visualElement;if(E&&E.layout){const T=E.layout.layoutBox[w];T&&(S=Fo(T)*(parseFloat(S)/100))}}this.originPoint[w]=S}),x&&ts.postRender(()=>x(h,p)),ZF(this.visualElement,"transform");const{animationState:_}=this.visualElement;_&&_.setActive("whileDrag",!0)},o=(h,p)=>{this.latestPointerEvent=h,this.latestPanInfo=p;const{dragPropagation:g,dragDirectionLock:v,onDirectionLock:x,onDrag:_}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:w}=p;if(v&&this.currentDirection===null){this.currentDirection=dft(w),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",p.point,w),this.updateAxis("y",p.point,w),this.visualElement.render(),_&&_(h,p)},c=(h,p)=>{this.latestPointerEvent=h,this.latestPanInfo=p,this.stop(h,p),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>mc(h=>this.getAnimationState(h)==="paused"&&this.getAxisMotionValue(h).animation?.play()),{dragSnapToOrigin:d}=this.getProps();this.panSession=new W1e(t,{onSessionStart:s,onStart:a,onMove:o,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:r,contextWindow:q1e(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!i||!r)return;const{velocity:a}=i;this.startAnimation(a);const{onDragEnd:o}=this.getProps();o&&ts.postRender(()=>o(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!kA(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=rft(a,this.constraints[t],this.elastic[t])),s.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&c1(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=ift(r.layoutBox,t):this.constraints=!1,this.elastic=lft(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&mc(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=oft(r.layoutBox[s],this.constraints[s])
vendor: 9,901 bytes, line 1207
1207)})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!c1(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=fdt(r,i.root,this.visualElement.getTransformPagePoint());let a=sft(i.layout.layoutBox,s);if(n){const o=n(cdt(a));this.hasMutatedConstraints=!!o,o&&(a=j1e(o))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),c=this.constraints||{},u=mc(d=>{if(!kA(d,n,this.currentDirection))return;let h=c&&c[d]||{};a&&(h={min:0,max:0});const p=i?200:1e6,g=i?40:1e7,v={type:"inertia",velocity:r?t[d]:0,bounceStiffness:p,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...s,...h};return this.startAxisValueAnimation(d,v)});return Promise.all(u).then(o)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return ZF(this.visualElement,t),r.start(SB(t,r,0,n,this.visualElement,!1))}stopAnimation(){mc(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){mc(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){mc(n=>{const{drag:r}=this.getProps();if(!kA(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:o}=i.layout.layoutBox[n];s.set(t[n]-ls(a,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!c1(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};mc(a=>{const o=this.getAxisMotionValue(a);if(o&&this.constraints!==!1){const c=o.get();i[a]=aft({min:c,max:c},this.constraints[a])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),mc(a=>{if(!kA(a,t,null))return;const o=this.getAxisMotionValue(a),{min:c,max:u}=this.constraints[a];o.set(ls(c,u,i[a]))})}addListeners(){if(!this.visualElement.current)return;cft.set(this.visualElement,this);const t=this.visualElement.current,n=Qw(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();c1(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ts.read(r);const a=kS(window,"resize",()=>this.scalePositionWithinConstraints()),o=i.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(mc(d=>{const h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=c[d].translate,h.set(h.get()+c[d].translate))}),this.visualElement.render())}));return()=>{a(),n(),s(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:a=eL,dragMomentum:o=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:a,dragMomentum:o}}}function kA(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function dft(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class fft extends Xm{constructor(t){super(t),this.removeGroupControls=Pc,this.removeListeners=Pc,this.controls=new uft(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Pc}unmount(){this.removeGroupControls(),this.removeListeners()}}const Bee=e=>(t,n)=>{e&&ts.postRender(()=>e(t,n))};class hft extends Xm{constructor(){super(...arguments),this.removePointerDownListener=Pc}onPointerDown(t){this.session=new W1e(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:q1e(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Bee(t),onStart:Bee(n),onMove:r,onEnd:(s,a)=>{delete this.session,i&&ts.postRender(()=>i(s,a))}}}mount(){this.removePointerDownListener=Qw(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Bk={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Uee(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const M_={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Fn.test(e))e=parseFloat(e);else return e;const n=Uee(e,t.target.x),r=Uee(e,t.target.y);return`${n}% ${r}%`}},pft={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Tm.parse(e);if(i.length>5)return r;const s=Tm.createTransformer(e),a=typeof i[0]!="number"?1:0,o=n.x.scale*t.x,c=n.y.scale*t.y;i[0+a]/=o,i[1+a]/=c;const u=ls(o,c,.5);return typeof i[2+a]=="number"&&(i[2+a]/=u),typeof i[3+a]=="number"&&(i[3+a]/=u),s(i)}};let yM=!1;class mft extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;Fut(gft),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),yM&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Bk.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,{projection:a}=r;return a&&(a.isPresent=s,yM=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?a.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?a.promote():a.relegate()||ts.postRender(()=>{const o=a.getStack();(!o||!o.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),fB.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;yM=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function K1e(e){const[t,n]=g1e(),r=b.useContext(H$);return l.jsx(mft,{...e,layoutGroup:r,switchLayoutGroup:b.useContext(k1e),isPresent:t,safeToRemove:n})}const gft={borderRadius:{...M_,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:M_,borderTopRightRadius:M_,borderBottomLeftRadius:M_,borderBottomRightRadius:M_,boxShadow:pft};function xft(e,t,n){const r=po(e)?e:_y(e);return r.start(SB("",r,t,n)),r.animation}const vft=(e,t)=>e.depth-t.depth;class yft{constructor(){this.children=[],this.isDirty=!1}add(t){G$(this.children,t),this.isDirty=!0}remove(t){K$(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(vft),this.isDirty=!1,this.children.forEach(t)}}function bft(e,t){const n=ul.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(Cm(r),e(s-t))};return ts.setup(r,!0),()=>Cm(r)}const Y1e=["TopLeft","TopRight","BottomLeft","BottomRight"],_ft=Y1e.length,Vee=e=>typeof e=="string"?parseFloat(e):e,Hee=e=>typeof e=="number"||Fn.test(e);function wft(e,t,n,r,i,s){i?(e.opacity=ls(0,n.opacity??1,Sft(r)),e.opacityExit=ls(t.opacity??1,0,Eft(r))):s&&(e.opacity=ls(t.opacity??1,n.opacity??1,r));for(let a=0;a<_ft;a++){const o=`border${Y1e[a]}Radius`;let c=qee(t,o),u=qee(n,o);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||Hee(c)===Hee(u)?(e[o]=Math.max(ls(Vee(c),Vee(u),r),0),(Md.test(u)||Md.test(c))&&(e[o]+="%")):e[o]=u}(t.rotate||n.rotate)&&(e.rotate=ls(t.rotate||0,n.rotate||0,r))}function qee(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Sft=X1e(0,.5,Dve),Eft=X1e(.5,.95,Pc);function X1e(e,t,n){return r=>r<e?0:r>t?1:n(wS(e,t,r))}function Wee(e,t){e.min=t.min,e.max=t.max}function fc(e,t){Wee(e.x,t.x),Wee(e.y,t.y)}function Gee(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Kee(e,t,n,r,i){return e-=t,e=z3(e,1/n,r),i!==void 0&&(e=z3(e,1/i,r)),e}function Cft(e,t=0,n=1,r=.5,i,s=e,a=e){if(Md.test(t)&&(t=parseFloat(t),t=ls(a.min,a.max,t/100)-a.min),typeof t!="number")return;let o=ls(s.min,s.max,r);e===s&&(o-=t),e.min=Kee(e.min,t,n,o,i),e.max=Kee(e.max,t,n,o,i)}function Yee(e,t,[n,r,i],s,a){Cft(e,t[n],t[r],t[i],t.scale,s,a)}const Tft=["x","scaleX","originX"],Aft=["y","scaleY","originY"];function Xee(e,t,n,r){Yee(e.x,t,Tft,n?n.x:void 0,r?r.x:void 0),Yee(e.y,t,Aft,n?n.y:void 0,r?r.y:void 0)}function Qee(e){return e.translate===0&&e.scale===1}function Q1e(e){return Qee(e.x)&&Qee(e.y)}function Zee(e,t){return e.min===t.min&&e.max===t.max}function kft(e,t){return Zee(e.x,t.x)&&Zee(e.y,t.y)}function Jee(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Z1e(e,t){return Jee(e.x,t.x)&&Jee(e.y,t.y)}function ete(e){return Fo(e.x)/Fo(e.y)}function tte(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Nft{constructor(){this.members=[]}add(t){G$(this.members,t),t.scheduleRender()}remove(t){if(K$(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,
vendor: 9,263 bytes, line 1207
1207n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function jft(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,a=n?.z||0;if((i||s||a)&&(r=`translate3d(${i}px, ${s}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:h,rotateY:p,skewX:g,skewY:v}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),h&&(r+=`rotateX(${h}deg) `),p&&(r+=`rotateY(${p}deg) `),g&&(r+=`skewX(${g}deg) `),v&&(r+=`skewY(${v}deg) `)}const o=e.x.scale*t.x,c=e.y.scale*t.y;return(o!==1||c!==1)&&(r+=`scale(${o}, ${c})`),r||"none"}const bM=["","X","Y","Z"],Rft=1e3;let Ift=0;function _M(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function J1e(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=L1e(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ts,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&J1e(r)}function eye({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a={},o=t?.()){this.id=Ift++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Mft),this.nodes.forEach(zft),this.nodes.forEach($ft),this.nodes.forEach(Dft)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new yft)}addEventListener(a,o){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Q$),this.eventHandlers.get(a).add(o)}notifyListeners(a,...o){const c=this.eventHandlers.get(a);c&&c.notify(...o)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=m1e(a)&&!wut(a),this.instance=a;const{layoutId:o,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||o)&&(this.isLayoutDirty=!0),e){let d,h=0;const p=()=>this.root.updateBlockedByResize=!1;ts.read(()=>{h=window.innerWidth}),e(a,()=>{const g=window.innerWidth;g!==h&&(h=g,this.root.updateBlockedByResize=!0,d&&d(),d=bft(p,250),Bk.hasAnimatedSinceResize&&(Bk.hasAnimatedSinceResize=!1,this.nodes.forEach(ite)))})}o&&this.root.registerSharedNode(o,this),this.options.animate!==!1&&u&&(o||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeLayoutChanged:p,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||u.getDefaultTransition()||qft,{onLayoutAnimationStart:x,onLayoutAnimationComplete:_}=u.getProps(),w=!this.targetLayout||!Z1e(this.targetLayout,g),S=!h&&p;if(this.options.layoutRoot||this.resumeFrom||S||h&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const E={...uB(v,"layout"),onPlay:x,onComplete:_};(u.shouldReduceMotion||this.options.layoutRoot)&&(E.delay=0,E.type=!1),this.startAnimation(E),this.setAnimationOrigin(d,S)}else h||ite(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Cm(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Bft),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&J1e(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const h=this.path[d];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:o,layout:c}=this.options;if(o===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(nte);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(rte);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Lft),this.nodes.forEach(Oft),this.nodes.forEach(Pft)):this.nodes.forEach(rte),this.clearAllSnapshots();const o=ul.now();$a.delta=Ih(0,1e3/60,o-$a.timestamp),$a.timestamp=o,$a.isProcessing=!0,cM.update.process($a),cM.preRender.process($a),cM.render.process($a),$a.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,fB.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Fft),this.sharedNodes.forEach(Uft)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ts.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ts.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Fo(this.snapshot.measuredBox.x)&&!Fo(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Os(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:o}=this.options;o&&o.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let o=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(o=!1),o&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,o=this.projectionDelta&&!Q1e(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;a&&this.instance&&(o||Bg(this.latestValues)||d)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const o=this.measurePageBox();let c=this.removeElementScroll(o);return a&&(c=this.removeTransform(c)),Wft(c),{animationId:this.root.animationId,measuredBox:o,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return Os();const o=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Gft))){const{scroll:u}=this.root;u&&(u1(o.x,u.offset.x),u1(o.y,u.offset.y))}return o}removeElementScroll(a){const o=Os();if(fc(o,a),this.scroll?.wasRoot)return o;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:h}=u;u!==this.root&&d&&h.layoutScroll&&(d.wasRoot&&fc(o,a),u1(o.x,d.offset.x),u1(o.y,d.offset.y))}return o}
vendor: 4,711 bytes, line 1207
1207applyTransform(a,o=!1){const c=Os();fc(c,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];!o&&d.options.layoutScroll&&d.scroll&&d!==d.root&&d1(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Bg(d.latestValues)&&d1(c,d.latestValues)}return Bg(this.latestValues)&&d1(c,this.latestValues),c}removeTransform(a){const o=Os();fc(o,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!Bg(u.latestValues))continue;KF(u.latestValues)&&u.updateSnapshot();const d=Os(),h=u.measurePageBox();fc(d,h),Xee(o,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return Bg(this.latestValues)&&Xee(o,this.latestValues),o}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==$a.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){const o=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=o.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=o.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=o.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==o;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:h}=this.options;if(!(!this.layout||!(d||h))){if(this.resolvedRelativeTargetAt=$a.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Os(),this.relativeTargetOrigin=Os(),Jw(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),fc(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Os(),this.targetWithTransforms=Os()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Jdt(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):fc(this.target,this.layout.layoutBox),I1e(this.target,this.targetDelta)):fc(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Os(),this.relativeTargetOrigin=Os(),Jw(this.relativeTargetOrigin,this.target,p.target),fc(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||KF(this.parent.latestValues)||R1e(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const a=this.getLead(),o=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),o&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===$a.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;fc(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,p=this.treeScale.y;ddt(this.layoutCorrected,this.treeScale,this.path,o),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Os());const{target:g}=a;if(!g){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Gee(this.prevProjectionDelta.x,this.projectionDelta.x),Gee(this.prevProjectionDelta.y,this.projectionDelta.y)),Zw(this.projectionDelta,this.layoutCorrected,g,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==
vendor: 8,227 bytes, line 1207
1207p||!tte(this.projectionDelta.x,this.prevProjectionDelta.x)||!tte(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.visualElement?.scheduleRender(),a){const o=this.getStack();o&&o.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=f1(),this.projectionDelta=f1(),this.projectionDeltaWithTransform=f1()}setAnimationOrigin(a,o=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},h=f1();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!o;const p=Os(),g=c?c.source:void 0,v=this.layout?this.layout.source:void 0,x=g!==v,_=this.getStack(),w=!_||_.members.length<=1,S=!!(x&&!w&&this.options.crossfade===!0&&!this.path.some(Hft));this.animationProgress=0;let E;this.mixTargetDelta=T=>{const N=T/1e3;ste(h.x,a.x,N),ste(h.y,a.y,N),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Jw(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Vft(this.relativeTarget,this.relativeTargetOrigin,p,N),E&&kft(this.relativeTarget,E)&&(this.isProjectionDirty=!1),E||(E=Os()),fc(E,this.relativeTarget)),x&&(this.animationValues=d,wft(d,u,this.latestValues,N,S,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=N},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Cm(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ts.update(()=>{Bk.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=_y(0)),this.currentAnimation=xft(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:o=>{this.mixTargetDelta(o),a.onUpdate&&a.onUpdate(o)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Rft),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:o,target:c,layout:u,latestValues:d}=a;if(!(!o||!c||!u)){if(this!==a&&this.layout&&u&&tye(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||Os();const h=Fo(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+h;const p=Fo(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+p}fc(o,c),d1(o,d),Zw(this.projectionDeltaWithTransform,this.layoutCorrected,o,d)}}registerSharedNode(a,o){this.sharedNodes.has(a)||this.sharedNodes.set(a,new Nft),this.sharedNodes.get(a).add(o);const u=o.options.initialPromotionConfig;o.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(o):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){const{layoutId:a}=this.options;return a?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:a}=this.options;return a?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:o,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let o=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(o=!0),!o)return;const u={};c.z&&_M("z",a,u,this.animationValues);for(let d=0;d<bM.length;d++)_M(`rotate${bM[d]}`,a,u,this.animationValues),_M(`skew${bM[d]}`,a,u,this.animationValues);a.render();for(const d in u)a.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);a.scheduleRender()}applyProjectionStyles(a,o){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=$k(o?.pointerEvents)||"",a.transform=c?c(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=$k(o?.pointerEvents)||""),this.hasProjected&&!Bg(this.latestValues)&&(a.transform=c?c({},""):"none",this.hasProjected=!1);return}a.visibility="";const d=u.animationValues||u.latestValues;this.applyTransformsToTarget();let h=jft(this.projectionDeltaWithTransform,this.treeScale,d);c&&(h=c(d,h)),a.transform=h;const{x:p,y:g}=this.projectionDelta;a.transformOrigin=`${p.origin*100}% ${g.origin*100}% 0`,u.animationValues?a.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:a.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const v in AS){if(d[v]===void 0)continue;const{correct:x,applyTo:_,isCSSVariable:w}=AS[v],S=h==="none"?d[v]:x(d[v],u);if(_){const E=_.length;for(let T=0;T<E;T++)a[_[T]]=S}else w?this.options.visualElement.renderState.vars[v]=S:a[v]=S}this.options.layoutId&&(a.pointerEvents=u===this?$k(o?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(nte),this.root.sharedNodes.clear()}}}function Oft(e){e.updateLayout()}function Pft(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,s=t.source!==e.layout.source;i==="size"?mc(d=>{const h=s?t.measuredBox[d]:t.layoutBox[d],p=Fo(h);h.min=n[d].min,h.max=h.min+p}):tye(i,t.layoutBox,n)&&mc(d=>{const h=s?t.measuredBox[d]:t.layoutBox[d],p=Fo(n[d]);h.max=h.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const a=f1();Zw(a,n,t.layoutBox);const o=f1();s?Zw(o,e.applyTransform(r,!0),t.measuredBox):Zw(o,n,t.layoutBox);const c=!Q1e(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:h,layout:p}=d;if(h&&p){const g=Os();Jw(g,t.layoutBox,h.layoutBox);const v=Os();Jw(v,n,p.layoutBox),Z1e(g,v)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=g,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:o,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function Mft(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Dft(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Fft(e){e.clearSnapshot()}function nte(e){e.clearMeasurements()}function rte(e){e.isLayoutDirty=!1}function Lft(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function ite(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function zft(e){e.resolveTargetDelta()}function $ft(e){e.calcProjection()}
vendor: 4,309 bytes, line 1207
1207function Bft(e){e.resetSkewAndRotation()}function Uft(e){e.removeLeadSnapshot()}function ste(e,t,n){e.translate=ls(t.translate,0,n),e.scale=ls(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ate(e,t,n,r){e.min=ls(t.min,n.min,r),e.max=ls(t.max,n.max,r)}function Vft(e,t,n,r){ate(e.x,t.x,n.x,r),ate(e.y,t.y,n.y,r)}function Hft(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const qft={duration:.45,ease:[.4,0,.1,1]},ote=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),lte=ote("applewebkit/")&&!ote("chrome/")?Math.round:Pc;function cte(e){e.min=lte(e.min),e.max=lte(e.max)}function Wft(e){cte(e.x),cte(e.y)}function tye(e,t,n){return e==="position"||e==="preserve-aspect"&&!Zdt(ete(t),ete(n),.2)}function Gft(e){return e!==e.root&&e.scroll?.wasRoot}const Kft=eye({attachResizeListener:(e,t)=>kS(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),wM={current:void 0},nye=eye({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!wM.current){const e=new Kft({});e.mount(window),e.setOptions({layoutScroll:!0}),wM.current=e}return wM.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Yft={pan:{Feature:hft},drag:{Feature:fft,ProjectionNode:nye,MeasureLayout:K1e}};function ute(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&ts.postRender(()=>s(t,QE(t)))}class Xft extends Xm{mount(){const{current:t}=this.node;t&&(this.unmount=xut(t,(n,r)=>(ute(this.node,r,"Start"),i=>ute(this.node,i,"End"))))}unmount(){}}class Qft extends Xm{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=KE(kS(this.node.current,"focus",()=>this.onFocus()),kS(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function dte(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&ts.postRender(()=>s(t,QE(t)))}class Zft extends Xm{mount(){const{current:t}=this.node;t&&(this.unmount=_ut(t,(n,r)=>(dte(this.node,r,"Start"),(i,{success:s})=>dte(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const tL=new WeakMap,SM=new WeakMap,Jft=e=>{const t=tL.get(e.target);t&&t(e)},eht=e=>{e.forEach(Jft)};function tht({root:e,...t}){const n=e||document;SM.has(n)||SM.set(n,{});const r=SM.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(eht,{root:e,...t})),r[i]}function nht(e,t,n){const r=tht(t);return tL.set(e,n),r.observe(e),()=>{tL.delete(e),r.unobserve(e)}}const rht={some:0,all:1};class iht extends Xm{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:rht[i]},o=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:h}=this.node.getProps(),p=u?d:h;p&&p(c)};return nht(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(sht(t,n))&&this.startObserver()}unmount(){}}function sht({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const aht={inView:{Feature:iht},tap:{Feature:Zft},focus:{Feature:Qft},hover:{Feature:Xft}},oht={layout:{ProjectionNode:nye,MeasureLayout:K1e}},lht={...Wdt,...aht,...Yft,...oht},Ja=ldt(lht,_dt),cht
vendor: 41,169 bytes, line 1207
1207=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function S
vendor: 14,250 bytes, lines 1207-1211
1207y(e,t,n){const r=uht(e),{webkitRelativePath:i}=e,s=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof r.path!="string"&&fte(r,"path",s),fte(r,"relativePath",s),r}function uht(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),i=cht.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function fte(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const dht=[".DS_Store","Thumbs.db"];function fht(e){return lx(this,void 0,void 0,function*(){return $3(e)&&hht(e.dataTransfer)?xht(e.dataTransfer,e.type):pht(e)?mht(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?ght(e):[]})}function hht(e){return $3(e)}function pht(e){return $3(e)&&$3(e.target)}function $3(e){return typeof e=="object"&&e!==null}function mht(e){return nL(e.target.files).map(t=>Sy(t))}function ght(e){return lx(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>Sy(n))})}function xht(e,t){return lx(this,void 0,void 0,function*(){if(e.items){const n=nL(e.items).filter(i=>i.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(vht));return hte(rye(r))}return hte(nL(e.files).map(n=>Sy(n)))})}function hte(e){return e.filter(t=>dht.indexOf(t.name)===-1)}function nL(e){if(e===null)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function vht(e){if(typeof e.webkitGetAsEntry!="function")return pte(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?iye(t):pte(e,t)}function rye(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?rye(n):[n]],[])}function pte(e,t){return lx(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const s=yield e.getAsFileSystemHandle();if(s===null)throw new Error(`${e} is not a File`);if(s!==void 0){const a=yield s.getFile();return a.handle=s,Sy(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return Sy(r,(n=t?.fullPath)!==null&&n!==void 0?n:void 0)})}function yht(e){return lx(this,void 0,void 0,function*(){return e.isDirectory?iye(e):bht(e)})}function iye(e){const t=e.createReader();return new Promise((n,r)=>{const i=[];function s(){t.readEntries(a=>lx(this,void 0,void 0,function*(){if(a.length){const o=Promise.all(a.map(yht));i.push(o),s()}else try{const o=yield Promise.all(i);n(o)}catch(o){r(o)}}),a=>{r(a)})}s()})}function bht(e){return lx(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const i=Sy(r,e.fullPath);t(i)},r=>{n(r)})})})}var NA={},mte;function _ht(){return mte||(mte=1,NA.__esModule=!0,NA.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",i=(e.type||"").toLowerCase(),s=i.replace(/\/.*$/,"");return n.some(function(a){var o=a.trim().toLowerCase();return o.charAt(0)==="."?r.toLowerCase().endsWith(o):o.endsWith("/*")?s===o.replace(/\/.*$/,""):i===o})}return!0}),NA}var wht=_ht();const EM=$c(wht);function gte(e){return Cht(e)||Eht(e)||aye(e)||Sht()}function Sht(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 1208In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Eht(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Cht(e){if(Array.isArray(e))return rL(e)}function xte(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function vte(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xte(Object(n),!0).forEach(function(r){sye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xte(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sye(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NS(e,t){return kht(e)||Aht(e,t)||aye(e,t)||Tht()}function Tht(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 1209In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aye(e,t){if(e){if(typeof e=="string")return rL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rL(e,t)}}function rL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Aht(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,a,o;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(c){s=!0,o=c}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw o}}return r}}function kht(e){if(Array.isArray(e))return e}var Nht=typeof EM=="function"?EM:EM.default,jht="file-invalid-type",Rht="file-too-large",Iht="file-too-small",Oht="too-many-files",Pht=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=t.split(","),r=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:jht,message:"File type must be ".concat(r)}},yte=function(t){return{code:Rht,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},bte=function(t){return{code:Iht,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},Mht={code:Oht,message:"Too many files"};function oye(e,t){var n=e.type==="application/x-moz-file"||Nht(e,t);return[n,n?null:Pht(t)]}function lye(e,t,n){if(Kg(e.size))if(Kg(t)&&Kg(n)){if(e.size>n)return[!1,yte(n)];if(e.size<t)return[!1,bte(t)]}else{if(Kg(t)&&e.size<t)return[!1,bte(t)];if(Kg(n)&&e.size>n)return[!1,yte(n)]}return[!0,null]}function Kg(e){return e!=null}function Dht(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,s=e.multiple,a=e.maxFiles,o=e.validator;return!s&&t.length>1||s&&a>=1&&t.length>a?!1:t.every(function(c){var u=oye(c,n),d=NS(u,1),h=d[0],p=lye(c,r,i),g=NS(p,1),v=g[0],x=o?o(c):null;return h&&v&&!x})}function B3(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function jA(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function _te(e){e.preventDefault()}function Fht(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Lht(e){return e.indexOf("Edge/")!==-1}function zht(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Fht(e)||Lht(e)}function ad(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,s=new Array(i>1?i-1:0),a=1;a<i;a++)s[a-1]=arguments[a];return t.some(function(o){return!B3(r)&&o&&o.apply(void 0,[r].concat(s)),B3(r)})}}function $ht(){return"showOpenFilePicker"in window}function Bht(e){if(Kg(e)){var t=Object.entries(e).filter(function(n){var r=NS(n,2),i=r[0],s=r[1],a=!0;return cye(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),a=!1),(!Array.isArray(s)||!s.every(uye))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var i=NS(r,2),s=i[0],a=i[1];return vte(vte({},n),{},sye({},s,a))},{});return[{description:"Files",accept:t}]}return e}function Uht(e){if(Kg(e))return Object.entries(e).reduce(function(t,n){var r=NS(n,2),i=r[0],s=r[1];return[].concat(gte(t),[i],gte(s))},[]).filter(function(t){return cye(t)||uye(t)}).join(",")}function Vht(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function Hht(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function cye(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function uye(e){return/^.*\.[\w]+$/.test(e)}var qht=["children"],Wht=["open"],Ght=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Kht=["refKey","onChange","onClick"];function Yht(e){return Zht(e)||Qht(e)||dye(e)||Xht()}function Xht(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 1210In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qht(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Zht(e){if(Array.isArray(e))return iL(e)}function CM(e,t){return tpt(e)||ept(e,t)||dye(e,t)||Jht()}function Jht(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 1211In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dye(e,t){if(e){if(typeof e=="string")return iL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return iL(e,t)}}function iL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ept(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,a,o;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(c){s=!0,o=c}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw o}}return r}}function tpt(e){if(Array.isArray(e))return e}function wte(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function is(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wte(Object(n),!0).forEach(function(r){sL(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wte(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sL(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function U3(e,t){if(e==null)return{};var n=npt(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function npt(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var EB=b.forwardRef(function(e,t){var n=e.children,r=U3(e,qht),i=CB(r),s=i.open,a=U3(i,Wht);return b.useImperativeHandle(t,function(){return{open:s}},[s]),Y.createElement(b.Fragment,null,n(is(is({},a),{},{open:s})))});EB.displayName="Dropzone";var fye={disabled:!1,getFilesFromEvent:fht,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};EB.defaultProps=fye;EB.propTypes={children:wt.func,accept:wt.objectOf(wt.arrayOf(wt.string)),multiple:wt.bool,preventDropOnDocument:wt.bool,noClick:wt.bool,noKeyboard:wt.bool,noDrag:wt.bool,noDragEventsBubbling:wt.bool,minSize:wt.number,maxSize:wt.number,maxFiles:wt.number,disabled:wt.bool,getFilesFromEvent:wt.func,onFileDialogCancel:wt.func,onFileDialogOpen:wt.func,useFsAccessApi:wt.bool,autoFocus:wt.bool,onDragEnter:wt.func,onDragLeave:wt.func,onDragOver:wt.func,onDrop:wt.func,onDropAccepted:wt.func,onDropRejected:wt.func,onError:wt.func,validator:wt.func};var aL={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function CB(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=is(is({},fye),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,s=t.maxSize,a=t.minSize,o=t.multiple,c=t.maxFiles,u=t.onDragEnter,d=t.onDragLeave,h=t.onDragOver,p=t.onDrop,g=t.onDropAccepted,v=t.onDropRejected,x=t.onFileDialogCancel,_=t.onFileDialogOpen,w=t.useFsAccessApi,S=t.autoFocus,E=t.preventDropOnDocument,T=t.noClick,N=t.noKeyboard,A=t.noDrag,k=t.noDragEventsBubbling,j=t.onError,R=t.validator,P=b.useMemo(function(){return Uht(n)},[n]),V=b.useMemo(function(){return Bht(n)},[n]),U=b.useMemo(function(){return typeof _=="function"?_:Ste},[_]),G=b.useMemo(function(){return typeof x=="function"?x:Ste},[x]),Q=b.useRef(null),Z=b.useRef(null),K=b.useReducer(rpt,aL),te=CM(K,2),ne=te[0],se=te[1],H=ne.isFocused,O=ne.isFileDialogActive,L=b.useRef(typeof window<"u"&&window.isSecureContext&&w&&$ht()),M=function(){!L.current&&O&&setTimeout(function(){if(Z.current){var me=Z.current.files;me.length||(se({type:"closeDialog"}),G())}},300)};b.useEffect(function(){return window.addEventListener("focus",M,!1),function(){window.removeEventListener("focus",M,!1)}},[Z,O,G,L]);var q=b.useRef([]),X=function(me){Q.current&&Q.current.contains(me.target)||(me.preventDefault(),q.current=[])};b.useEffect(function(){return E&&(document.addEventListener("dragover",_te,!1),document.addEventListener("drop",X,!1)),function(){E&&(document.removeEventListener("dragover",_te),document.removeEventListener("drop",X))}},[Q,E]),b.useEffect(function(){return!r&&S&&Q.current&&Q.current.focus(),function(){}},[Q,S,r]);var J=b.useCallback(function(be){j?j(be):console.error(be)},[j]),W=b.useCallback(function(be){be.preventDefault(),be.persist(),ie(be),q.current=[].concat(Yht(q.current),[be.target]),jA(be)&&Promise.resolve(i(be)).then(function(me){if(!(B3(be)&&!k)){var we=me.length,Le=we>0&&Dht({files:me,accept:P,minSize:a,maxSize:s,multiple:o,maxFiles:c,validator:R}),oe=we>0&&!Le;se({isDragAccept:Le,isDragReject:oe,isDragActive:!0,type:"setDraggedFiles"}),u&&u(be)}}).catch(function(me){return J(me)}
1211)},[i,u,J,k,P,a,s,o,c,R]),re=b.useCallback(function(be){be.preventDefault(),be.persist(),ie(be);var me=jA(be);if(me&&be.dataTransfer)try{be.dataTransfer.dropEffect="copy"}catch{}return me&&h&&h(be),!1},[h,k]),ae=b.useCallback(function(be){be.preventDefault(),be.persist(),ie(be);var me=q.current.filter(function(Le){return Q.current&&Q.current.contains(Le)}),we=me.indexOf(be.target);we!==-1&&me.splice(we,1),q.current=me,!(me.length>0)&&(se({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),jA(be)&&d&&d(be))},[Q,d,k]),ce=b.useCallback(function(be,me){var we=[],Le=[];be.forEach(function(oe){var St=oye(oe,P),Ut=CM(St,2),Ht=Ut[0],Rt=Ut[1],Ct=lye(oe,a,s),Wt=CM(Ct,2),Tn=Wt[0],Ie=Wt[1],dt=R?R(oe):null;if(Ht&&Tn&&!dt)we.push(oe);else{var $t=[Rt,Ie];dt&&($t=$t.concat(dt)),Le.push({file:oe,errors:$t.filter(function(Mn){return Mn})})}}),(!o&&we.length>1||o&&c>=1&&we.length>c)&&(we.forEach(function(oe){Le.push({file:oe,errors:[Mht]})}),we.splice(0)),se({acceptedFiles:we,fileRejections:Le,isDragReject:Le.length>0,type:"setFiles"}),p&&p(we,Le,me),Le.length>0&&v&&v(Le,me),we.length>0&&g&&g(we,me)},[se,o,P,a,s,c,p,g,v,R]),Te=b.useCallback(function(be){be.preventDefault(),be.persist(),ie(be),q.current=[],jA(be)&&Promise.resolve(i(be)).then(function(me){B3(be)&&!k||ce(me,be)}).catch(function(me){return J(me)}),se({type:"reset"})},[i,ce,J,k]),fe=b.useCallback(function(){if(L.current){se({type:"openDialog"}),U();var be={multiple:o,types:V};window.showOpenFilePicker(be).then(function(me){return i(me)}).then(function(me){ce(me,null),se({type:"closeDialog"})}).catch(function(me){Vht(me)?(G(me),se({type:"closeDialog"})):Hht(me)?(L.current=!1,Z.current?(Z.current.value=null,Z.current.click()):J(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):J(me)});return}Z.current&&(se({type:"openDialog"}),U(),Z.current.value=null,Z.current.click())},[se,U,G,w,ce,J,V,o]),xe=b.useCallback(function(be){!Q.current||!Q.current.isEqualNode(be.target)||(be.key===" "||be.key==="Enter"||be.keyCode===32||be.keyCode===13)&&(be.preventDefault(),fe())},[Q,fe]),ke=b.useCallback(function(){se({type:"focus"})},[]),Fe=b.useCallback(function(){se({type:"blur"})},[]),tt=b.useCallback(function(){T||(zht()?setTimeout(fe,0):fe())},[T,fe]),Se=function(me){return r?null:me},et=function(me){return N?null:Se(me)},pt=function(me){return A?null:Se(me)},ie=function(me){k&&me.stopPropagation()},ue=b.useMemo(function(){return function(){var be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},me=be.refKey,we=me===void 0?"ref":me,Le=be.role,oe=be.onKeyDown,St=be.onFocus,Ut=be.onBlur,Ht=be.onClick,Rt=be.onDragEnter,Ct=be.onDragOver,Wt=be.onDragLeave,Tn=be.onDrop,Ie=U3(be,Ght);return is(is(sL({onKeyDown:et(ad(oe,xe)),onFocus:et(ad(St,ke)),onBlur:et(ad(Ut,Fe)),onClick:Se(ad(Ht,tt)),onDragEnter:pt(ad(Rt,W)),onDragOver:pt(ad(Ct,re)),onDragLeave:pt(ad(Wt,ae)),onDrop:pt(ad(Tn,Te)),role:typeof Le=="string"&&Le!==""?Le:"presentation"},we,Q),!r&&!N?{tabIndex:0}:{}),Ie)}},[Q,xe,ke,Fe,tt,W,re,ae,Te,N,A,r]),Ne=b.useCallback(function(be){be.stopPropagation()},[]),De=b.useMemo(function(){return function(){var be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},me=be.refKey,we=me===void 0?"ref":me,Le=be.onChange,oe=be.onClick,St=U3(be,Kht),Ut=sL({accept:P,multiple:o,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:Se(ad(Le,Te)),onClick:Se(ad(oe,Ne)),tabIndex:-1},we,Z);return is(is({},Ut),St)}},[Z,n,o,Te,r]);return is(is({},ne),{},{isFocused:H&&!r,getRootProps:ue,getInputProps:De,rootRef:Q,inputRef:Z,open:Se(fe)})}function rpt(e,t){switch(t.type){case"focus":return is(is({},e),{},{isFocused:!0});case"blur":return is(is({},e),{},{isFocused:!1});case"openDialog":return is(is({},aL),{},{isFileDialogActive:!0});case"closeDialog":return is(is({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return is(is({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return is(is({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return is({},aL);default:return e}}function Ste(){}async function ipt(e){const t=await createImageBitmap(e);return{width:t.width,height:t.height}}function hye({dropzone:e,maxSize:t}){const{i18n:n,_:r}=Me();return e.isDragAccept?l.jsx("div",{className:"text-sm font-medium",children:n._({id:"ArGx9a"})}):l.jsxs("div",{className:"flex flex-col items-center gap-1.5",children:[l.jsxs("div",{className:"flex flex-row items-center gap-0.5 text-sm font-medium",children:[l.jsx(V9,{className:"mr-2 size-4"}),n._({id:"sCtyHQ"})]}),t&&l.jsx("div",{className:"text-xs font-medium text-gray-400",children:n._({id:"n/UWJQ",values:{0:k5(t)}})})]})}function spt(e){if(typeof e=="string")return e;if(e)return URL.createObjectURL(e)}const apt=b.memo(function({file:t,onDelete:n,onClose:r,autoCloseMs:i,preview:s}){const{i18n:a,_:o}=Me();b.useEffect(()=>{if(i&&r&&t.status==="completed"){const h=setTimeout(()=>{r?.()},i);return()=>clearTimeout(h)}},[i,t.status,r]);const c=spt(s??t?.publicUrl??t?.file),u=t.file?.type.split("/").pop(),[d]=t.file?.name.split(".")??[];return l.jsxs("div",{className:"flex h-16 w-full flex-row items-center justify-between rounded-lg border border-solid border-border bg-white px-4 hover:bg-gray-50",children:[l.jsxs("div",{className:"flex h-full min-w-0 flex-row items-center gap-4",children:[c?l.jsx("img",{className:"size-10 shrink-0 object-contain",src:c}):l.jsx(aoe,{className:"size-10 shrink-0 text-rose-700"}),l.jsxs("div",{className:"flex min-w-0 flex-col",children:[l.jsx("div",{className:"truncate text-[0.85rem] font-medium leading-snug",children:d}),l.jsxs("div",{className:"flex items-center gap-1 text-[0.7rem] leading-tight text-muted-fg",children:[l.jsxs("span",{className:"shrink-0",children:[".",u?.toLowerCase()]}),t.file?.size?l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"shrink-0",children:"â¢"}),l.jsx("span",{className:"shrink-0",children:k5(t.file.size)})]}):void 0,t.status==="uploading"&&l.jsxs("span",{className:"flex shrink-0 items-center gap-1",children:[l.jsx("span",{children:"â¢"}),l.jsx(Kr,{className:"size-3 animate-spin"}),l.jsx("span",{children:a._({id:"GxkJXS"})})]}),t.status==="completed"&&l.jsxs("span",{className:"flex shrink-0 items-center gap-1",children:[l.jsx("span",{children:"â¢"}),l.jsx(jj,{className:"size-3 text-green-600"}),l.jsx("span",{children:a._({id:"3wG7HI"})})]}),t.status==="error"&&l.jsxs("span",{className:"shrink-0 text-red-500",children:[a._({id:"SlfejT"})," ",t.errorMessage]})]})]})]}),l.jsx("div",{className:"flex items-center gap-2",children:(t.status==="completed"||t.status==="initial")&&n&&l.jsx(Oe,{type:"button",variant:"ghost",outline:!0,className:"text-danger",size:"icon-sm",onClick:n,"aria-label":a._({id:"cnGeoo"}),children:l.jsx(U9,{className:"size-4"})})})]})}),opt={"image/jpeg":[".jpg",".jpeg"],"image/png":[".png"],"image/gif":[".gif"],"image/bmp":[".bmp"],"image/svg":[".svg"]};function lpt(e){const n=decodeURIComponent(new URL(e).pathname).split("/").pop();if(!n)throw new Error("Invalid URL: no file name found");const[r,i]=n.split(/\.(?=[^.]+$)/),s=r?.split("-").slice(0,-1).join("--");return{id:Hp(),file:{name:s,type:i},publicUrl:e,status:"initial"}}function TM({name:e,containerClassName:t,dropZoneClassName:n,children:r,showErrorMessage:i=!0,uploadAdapter:s,label:a,tooltip:o,showOptional:c,maxFiles:u=1,maxSize:d=5*1024*1024,accept:h=opt,autoCloseFileMs:p=0,previewClassName:g,recommendedImageWidth:v,recommendedImageHeight:x,..._}){const{i18n:w,_:S}=Me(),{initialValues:E}=$y(),T=v2(E,e),[N,A]=b.useState(),[k,j]=b.useState(),[R,P]=b.useState();b.useEffect(()=>{if(T){const K=lpt(T);A({id:K.id,file:{name:K.file?.name??"",size:K.file?.size||0,type:K.file?.type??""},status:K.status,publicUrl:K.publicUrl})}},[T]);const V=async K=>{if(!K.file)throw new Error("File cannot be uploaded as it seems to be corrupted");try{await s.upload(K.file),A({file:K.file,id:Hp(),status:"completed"})}catch(te){console.error(te),A({id:Hp(),file:void 0,status:"error",errorMessage:te instanceof Error?te.message:"Upload failed"})}},U=async(K,te,ne)=>{if(_.onDrop)_.onDrop(K,te,ne);else{if(K.length>1)throw new Error("Trying to upload multiple files in SingleFileUpload");const se=K.map(O=>({id:Hp(),file:O,status:"uploading",progress:0}));if(te.length>0){let O=w._({id:"Rx+SYv",values:{0:te[0].file.name}});te.length>1&&(O=O+w._({id:"bEdUOW",values:{0:te.length-1}})),j(O),P(void 0);return}j("");const H=K[0];if(v&&x&&H.type!=="image/svg+xml"){const{width:O,height:L}=await ipt(H);O>v||L>x?P(w._({id:"NkaYey",values:{width:O,height:L,recommendedImageWidth:v,recommendedImageHeight:x}})):P(void 0)}else P(void 0);await V(se[0])}},G=()=>{A(void 0),P(void 0)},Q=async()=>
1211{if(s.delete){try{N?.publicUrl?await s.delete(N.publicUrl):N?.file&&await s.delete(N.file)}catch(K){console.error("Failed to delete file:",K);return}G()}},Z=CB({..._,multiple:!1,onDrop:U,maxSize:d,accept:h});return l.jsxs("div",{className:$e("flex flex-col h-full max-h-[300px] md:max-h-[500px]",t),children:[a&&l.jsxs("label",{className:"mb-2 inline-flex cursor-pointer items-center gap-1 text-sm font-medium",htmlFor:Z.getInputProps().name,children:[a,o&&l.jsx(cn,{title:o,children:l.jsx("span",{className:"cursor-help text-sm text-placeholder",children:l.jsx(ax,{size:14})})}),c&&l.jsx("span",{className:"text-sm text-placeholder",children:"(optional)"})]}),N?l.jsx(Ja.div,{className:$e("flex w-full flex-col overflow-y-auto",g),initial:{opacity:0},animate:{opacity:1},children:l.jsxs(Ja.div,{layout:!0,initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},children:[l.jsx(apt,{preview:N.publicUrl,file:N,onDelete:s.delete&&Q,onClose:G,autoCloseMs:p}),R&&l.jsx("p",{className:"mt-1 text-xs text-amber-600",children:R})]},N.id)}):l.jsxs("div",{...Z.getRootProps(),className:$e("flex flex-col justify-center py-6 items-center w-full border-dashed border border-gray-200 rounded-lg hover:bg-accent hover:text-accent-foreground transition-all select-none cursor-pointer h-16 mt-0",n),children:[l.jsx("input",{...Z.getInputProps()}),r?r(Z):l.jsx(hye,{dropzone:Z,maxSize:d}),i&&k&&l.jsx("span",{className:"text-xs text-red-600",children:k})]})]})}const cpt=b.memo(function({avatarUploadAdapter:t,bubbleUploadAdapter:n,logoUploadAdapter:r}){const{i18n:i,_:s}=Me(),{setValue:a}=Bh(),o=fs("agentType"),{schema:c}=oi([{name:"themeConfig.preset",uiControl:"hidden",defaultValue:bk.defaultThemePreset},{name:"themeConfig.primary",label:i._({id:"SvifBM"}),showOptional:!1,uiProps:{type:"color"},defaultValue:bk.defaultTheme.primary},{name:"themeConfig.primaryFg",label:i._({id:"RldzJs"}),showOptional:!1,uiProps:{type:"color"},defaultValue:bk.defaultTheme.primaryFg}],[s]),u=d=>{if(d in h8){const h=h8[d];a("themeConfig.primary",h.primary),a("themeConfig.primaryFg",h.primaryFg),a("themeConfig.preset",d)}};return o.value!==ai.Chat?null:l.jsxs(gn,{title:i._({id:"GCsEjX"}),children:[l.jsxs("div",{className:"flex flex-col gap-y-2",children:[l.jsx(ot,{children:i._({id:"1CalO6"})}),l.jsxs("div",{className:"flex gap-x-2",children:[l.jsx(cn,{delayDuration:0,title:i._({id:"pvnfJD"}),children:l.jsx(Oe,{"data-cta":"admin-chat-theme-dark-button",variant:"ghost",outline:!0,onClick:()=>u("dark"),children:l.jsx(rIe,{})})}),l.jsx(cn,{delayDuration:0,title:i._({id:"1njn7W"}),children:l.jsx(Oe,{"data-cta":"admin-chat-theme-light-button",variant:"ghost",outline:!0,onClick:()=>u("light"),children:l.jsx(JIe,{})})})]})]}),l.jsx(Yr,{schema:c}),l.jsx(TM,{name:"chatbotConfig.systemAvatar",label:i._({id:"G6Ikmc"}),tooltip:i._({id:"Mu6m81",values:{0:uc.avatar.recommendedSize}}),maxSize:uc.avatar.maxFileSize,recommendedImageWidth:uc.avatar.recommendedWidth,recommendedImageHeight:uc.avatar.recommendedHeight,uploadAdapter:t}),l.jsx(TM,{name:"themeConfig.logo",label:i._({id:"RFjn2v"}),tooltip:i._({id:"EwOUff",values:{0:uc.header.recommendedSize}}),maxSize:uc.header.maxFileSize,recommendedImageWidth:uc.header.recommendedWidth,recommendedImageHeight:uc.header.recommendedHeight,uploadAdapter:r}),l.jsx(TM,{name:"themeConfig.logoBubble",label:i._({id:"0qVKza"}),tooltip:i._({id:"PIqnhp",values:{0:uc.bubble.recommendedSize}}),maxSize:uc.bubble.maxFileSize,recommendedImageWidth:uc.bubble.recommendedWidth,recommendedImageHeight:uc.bubble.recommendedHeight,uploadAdapter:n})]})});function upt(){const{i18n:e,_:t}=Me(),n=fs("agentType"),r=b.useCallback(s=>{if(!(Array.isArray(s)?s.filter(o=>typeof o=="string"):typeof s=="string"?s.split(` 1212`).map(o=>o.trim()).filter(o=>o!==""):[]).every(o=>q7(o)))return e._({id:"ER+Br0"})},[t]),{schema:i}=oi([{name:"chatbotConfig.domainPolicy.mode",label:e._({id:"myFJN3"}),tooltip:e._({id:"UX8/t7"}),type:"select",options:{[zg.All]:e._({id:"WBF0g1"}),[zg.Whitelist]:e._({id:"6gMkTi"}),[zg.Blacklist]:e._({id:"SF0N31"})},defaultValue:zg.All,showOptional:!1},{$relevant:{$when:({formState:s})=>{const a=s.values?.chatbotConfig?.domainPolicy?.mode;return a===zg.Whitelist||a===zg.Blacklist},$fields:[{name:"chatbotConfig.domainPolicy.entries",label:e._({id:"JrW1fW"}),tooltip:e._({id:"ld62MH"}),type:"text",uiControl:"textarea",uiProps:{rows:6,placeholder:`example.com 1213shop.example.com 1214https://example.com/blog`},parser:s=>typeof s=="string"?s.split(` 1215`).map(a=>a.trim()).filter(a=>a!==""):s,mask:s=>Array.isArray(s)?s.join(` 1216`):s??"",validate:r,validateOn:"blur-submit",showErrorIfTouched:!0}]}}],[t,r]);return n.value===ai.Voice?null:l.jsx(gn,{title:e._({id:"JWEJBC"}),children:l.jsx(Yr,{schema:i})})}function Ete(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function dpt(e){if(Array.isArray(e))return e}function fpt(e,t,n){return(t=ypt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hpt(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,a,o=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(c=(r=s.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(d){u=!0,i=d}
1216finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function ppt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 1217In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cte(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Tte(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Cte(Object(n),!0).forEach(function(r){fpt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cte(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mpt(e,t){if(e==null)return{};var n,r,i=gpt(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function gpt(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function xpt(e,t){return dpt(e)||hpt(e,t)||bpt(e,t)||ppt()}function vpt(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ypt(e){var t=vpt(e,"string");return typeof t=="symbol"?t:t+""}function bpt(e,t){if(e){if(typeof e=="string")return Ete(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ete(e,t):void 0}}function _pt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ate(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function kte(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ate(Object(n),!0).forEach(function(r){_pt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ate(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wpt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return t.reduceRight(function(i,s){return s(i)},r)}}function yw(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return i.length>=e.length?e.apply(this,i):function(){for(var a=arguments.length,o=new Array(a),c=0;c<a;c++)o[c]=arguments[c];return t.apply(n,[].concat(i,o))}}}function V3(e){return{}.toString.call(e).includes("Object")}function Spt(e){return!Object.keys(e).length}function jS(e){return typeof e=="function"}function Ept(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Cpt(e,t){return V3(t)||um("changeType"),Object.keys(t).some(function(n){return!Ept(e,n)})&&um("changeField"),t}function Tpt(e){jS(e)||um("selectorType")}function Apt(e){jS(e)||V3(e)||um("handlerType"),V3(e)&&Object.values(e).some(function(t){return!jS(t)})&&um("handlersType")}function kpt(e){e||um("initialIsRequired"),V3(e)||um("initialType"),Spt(e)&&um("initialContent")}function Npt(e,t){throw new Error(e[t]||e.default)}var jpt={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},um=yw(Npt)(jpt),RA={changes:Cpt,selector:Tpt,handler:Apt,initial:kpt};function Rpt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};RA.initial(e),RA.handler(t);var n={current:e},r=yw(Ppt)(n,t),i=yw(Opt)(n),s=yw(RA.changes)(e),a=yw(Ipt)(n);function o(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(d){return d};return RA.selector(u),u(n.current)}function c(u){wpt(r,i,s,a)(u)}return[o,c]}function Ipt(e,t){return jS(t)?t(e.current):t}function Opt(e,t){return e.current=kte(kte({},e.current),t),t}function Ppt(e,t,n){return jS(t)?t(e.current):Object.keys(n).forEac
1217h(function(r){var i;return(i=t[r])===null||i===void 0?void 0:i.call(t,e.current[r])}),n}var Mpt={create:Rpt},Dpt={paths:{vs:"https://cdn.jsdelivr.net/npm/[email protected]/min/vs"}};function Fpt(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return i.length>=e.length?e.apply(this,i):function(){for(var a=arguments.length,o=new Array(a),c=0;c<a;c++)o[c]=arguments[c];return t.apply(n,[].concat(i,o))}}}function Lpt(e){return{}.toString.call(e).includes("Object")}function zpt(e){return e||Nte("configIsRequired"),Lpt(e)||Nte("configType"),e.urls?($pt(),{paths:{vs:e.urls.monacoBase}}):e}function $pt(){console.warn(pye.deprecation)}function Bpt(e,t){throw new Error(e[t]||e.default)}var pye={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning! 1218 You are using deprecated way of configuration. 1219 1220 Instead of using 1221 monaco.config({ urls: { monacoBase: '...' } }) 1222 use 1223 monaco.config({ paths: { vs: '...' } }) 1224 1225 For more please check the link https://github.com/suren-atoyan/monaco-loader#config 1226 `},Nte=Fpt(Bpt)(pye),Upt={config:zpt},Vpt=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(i){return n.reduceRight(function(s,a){return a(s)},i)}};function mye(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],mye(e[n],t[n]))}),Tte(Tte({},e),t)}var Hpt={type:"cancelation",msg:"operation is manually canceled"};function AM(e){var t=!1,n=new Promise(function(r,i){e.then(function(s){return t?i(Hpt):r(s)}),e.catch(i)});return n.cancel=function(){return t=!0},n}var qpt=["monaco"],Wpt=Mpt.create({config:Dpt,isInitialized:!1,resolve:null,reject:null,monaco:null}),gye=xpt(Wpt,2),ZE=gye[0],S4=gye[1];function Gpt(e){var t=Upt.config(e),n=t.monaco,r=mpt(t,qpt);S4(function(i){return{config:mye(i.config,r),monaco:n}})}function Kpt(){var e=ZE(function(t){var n=t.monaco,r=t.isInitialized,i=t.resolve;return{monaco:n,isInitialized:r,resolve:i}});if(!e.isInitialized){if(S4({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),AM(kM);if(window.monaco&&window.monaco.editor)return xye(window.monaco),e.resolve(window.monaco),AM(kM);Vpt(Ypt,Qpt)(Zpt)}return AM(kM)}function Ypt(e){return document.body.appendChild(e)}function Xpt(e){var t=document.createElement("script");return e&&(t.src=e),t}function Qpt(e){var t=ZE(function(r){var i=r.config,s=r.reject;return{config:i,reject:s}}),n=Xpt("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function Zpt(){var e=ZE(function(n){var r=n.config,i=n.resolve,s=n.reject;return{config:r,resolve:i,reject:s}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){var r=n.m;xye(r),e.resolve(r)},function(n){e.reject(n)})}function xye(e){ZE().monaco||S4({monaco:e})}function Jpt(){return ZE(function(e){var t=e.monaco;return t})}var kM=new Promise(function(e,t){return S4({resolve:e,reject:t})}),vye={config:Gpt,init:Kpt,__getMonacoInstance:Jpt},emt={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},NM=emt,tmt={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},nmt=tmt;function rmt({children:e}){return Y.createElement("div",{style:nmt.container},e)}var imt=rmt,smt=imt;function amt({width:e,height:t,isEditorReady:n,loading:r,_ref:i,className:s,wrapperProps:a}){return Y.createElement("section",{style:{...NM.wrapper,width:e,height:t},...a},!n&&Y.createElement(smt,null,r),Y.createElement("div",{ref:i,style:{...NM.fullWidth,...!n&&NM.hide},className:s}))}var omt=amt,yye=b.memo(omt);function lmt(e){b.useEffect(e,[])}var bye=lmt;function cmt(e,t,n=!0){let r=b.useRef(!0);b.useEffect(r.current||!n?()=>{r.current=!1}:e,t)}var Ml=cmt;function e2(){}function h1(e,t,n,r){return umt(e,r)||dmt(e,t,n,r)}function umt(e,t){return e.editor.getModel(_ye(e,t))}function dmt(e,t,n,r){return e.editor.createModel(t,n,r?_ye(e,r):void 0)}function _ye(e,t){return e.Uri.parse(t)}function fmt({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:i,originalModelPath:s,modifiedModelPath:a,keepCurrentOriginalModel:o=!1,keepCurrentModifiedModel:c=!1,theme:u="light",loading:d="Loading...",options:h={},height:p="100%",width:g="100%",className:v,wrapperProps:x={},beforeMount:_=e2,onMount:w=e2}){let[S,E]=b.useState(!1),[T,N]=b.useState(!0),A=b.useRef(null),k=b.useRef(null),j=b.useRef(null),R=b.useRef(w),P=b.useRef(_),V=b.useRef(!1);bye(()=>{let Z=vye.init();return Z.then(K=>(k.current=K)&&N(!1)).catch(K=>K?.type!=="cancelation"&&console.error("Monaco initialization: error:",K)),()=>A.current?Q():Z.cancel()}),Ml(()=>{if(A.current&&k.current){let Z=A.current.getOriginalEditor(),K=h1(k.current,e||"",r||n||"text",s||"");K!==Z.getModel()&&Z.setModel(K)}},[s],S),Ml(()=>{if(A.current&&k.current){let Z=A.current.getModifiedEditor(),K=h1(k.current,t||"",i||n||"text",a||"");K!==Z.getModel()&&Z.setModel(K)}},[a],S),Ml(()=>{let Z=A.current.getModifiedEditor();Z.getOption(k.current.editor.EditorOption.readOnly)?Z.setValue(t||""):t!==Z.getValue()&&(Z.executeEdits("",[{range:Z.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),Z.pushUndoStop())},[t],S),Ml(()=>{A.current?.getModel()?.original.setValue(e||"")},[e],S),Ml(()=>{let{original:Z,modified:K}=A.current.getModel();k.current.editor.setModelLanguage(Z,r||n||"text"),k.current.editor.setModelLanguage(K,i||n||"text")},[n,r,i],S),Ml(()=>{k.current?.editor.setTheme(u)},[u],S),Ml(()=>{A.current?.updateOptions(h)},[h],S);let U=b.useCallback(()=>
1226{if(!k.current)return;P.current(k.current);let Z=h1(k.current,e||"",r||n||"text",s||""),K=h1(k.current,t||"",i||n||"text",a||"");A.current?.setModel({original:Z,modified:K})},[n,t,i,e,r,s,a]),G=b.useCallback(()=>{!V.current&&j.current&&(A.current=k.current.editor.createDiffEditor(j.current,{automaticLayout:!0,...h}),U(),k.current?.editor.setTheme(u),E(!0),V.current=!0)},[h,u,U]);b.useEffect(()=>{S&&R.current(A.current,k.current)},[S]),b.useEffect(()=>{!T&&!S&&G()},[T,S,G]);function Q(){let Z=A.current?.getModel();o||Z?.original?.dispose(),c||Z?.modified?.dispose(),A.current?.dispose()}return Y.createElement(yye,{width:g,height:p,isEditorReady:S,loading:d,_ref:j,className:v,wrapperProps:x})}var hmt=fmt;b.memo(hmt);function pmt(e){let t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current}var mmt=pmt,IA=new Map;function gmt({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:i,path:s,theme:a="light",line:o,loading:c="Loading...",options:u={},overrideServices:d={},saveViewState:h=!0,keepCurrentModel:p=!1,width:g="100%",height:v="100%",className:x,wrapperProps:_={},beforeMount:w=e2,onMount:S=e2,onChange:E,onValidate:T=e2}){let[N,A]=b.useState(!1),[k,j]=b.useState(!0),R=b.useRef(null),P=b.useRef(null),V=b.useRef(null),U=b.useRef(S),G=b.useRef(w),Q=b.useRef(),Z=b.useRef(r),K=mmt(s),te=b.useRef(!1),ne=b.useRef(!1);bye(()=>{let O=vye.init();return O.then(L=>(R.current=L)&&j(!1)).catch(L=>L?.type!=="cancelation"&&console.error("Monaco initialization: error:",L)),()=>P.current?H():O.cancel()}),Ml(()=>{let O=h1(R.current,e||r||"",t||i||"",s||n||"");O!==P.current?.getModel()&&(h&&IA.set(K,P.current?.saveViewState()),P.current?.setModel(O),h&&P.current?.restoreViewState(IA.get(s)))},[s],N),Ml(()=>{P.current?.updateOptions(u)},[u],N),Ml(()=>{!P.current||r===void 0||(P.current.getOption(R.current.editor.EditorOption.readOnly)?P.current.setValue(r):r!==P.current.getValue()&&(ne.current=!0,P.current.executeEdits("",[{range:P.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),P.current.pushUndoStop(),ne.current=!1))},[r],N),Ml(()=>{let O=P.current?.getModel();O&&i&&R.current?.editor.setModelLanguage(O,i)},[i],N),Ml(()=>{o!==void 0&&P.current?.revealLine(o)},[o],N),Ml(()=>{R.current?.editor.setTheme(a)},[a],N);let se=b.useCallback(()=>{if(!(!V.current||!R.current)&&!te.current){G.current(R.current);let O=s||n,L=h1(R.current,r||e||"",t||i||"",O||"");P.current=R.current?.editor.create(V.current,{model:L,automaticLayout:!0,...u},d),h&&P.current.restoreViewState(IA.get(O)),R.current.editor.setTheme(a),o!==void 0&&P.current.revealLine(o),A(!0),te.current=!0}},[e,t,n,r,i,s,u,d,h,a,o]);b.useEffect(()=>{N&&U.current(P.current,R.current)},[N]),b.useEffect(()=>{!k&&!N&&se()},[k,N,se]),Z.current=r,b.useEffect(()=>{N&&E&&(Q.current?.dispose(),Q.current=P.current?.onDidChangeModelContent(O=>{ne.current||E(P.current.getValue(),O)}))},[N,E]),b.useEffect(()=>{if(N){let O=R.current.editor.onDidChangeMarkers(L=>{let M=P.current.getModel()?.uri;if(M&&L.find(q=>q.path===M.path)){let q=R.current.editor.getModelMarkers({resource:M});T?.(q)}});return()=>{O?.dispose()}}return()=>{}},[N,T]);function H(){Q.current?.dispose(),p?h&&IA.set(s,P.current.saveViewState()):P.current.getModel()?.dispose(),P.current.dispose()}return Y.createElement(yye,{width:g,height:v,isEditorReady:N,loading:c,_ref:V,className:x,wrapperProps:_})}var xmt=gmt,vmt=b.memo(xmt),wye=vmt;const ymt={type:"array",items:{type:"object",properties:{messages:{type:"array",items:{type:"object",properties:{question:{type:"string"},expectedOutput:{type:"string"}},required:["question","expectedOutput"]}}},required:["messages"]}},bmt=`[ 1227 { 1228 "messages": [ 1229 { 1230 "expectedOutput": "Ostravská poboÄka má rozlohu 1130 m²", 1231 "question": "Jakou rozlohu má Ostravská poboÄka?" 1232 }, 1233 { 1234 "question": "Jakou má adresu?", 1235 "expectedOutput": "AVION SHOPPING PARK, Rudná 3114, Ostrava â ZábÅeh." 1236 } 1237 ] 1238 }, 1239 { 1240 "messages": [ 1241 { 1242 "question": "Kde máte poboÄky?", 1243 "expectedOutput": "Máme poboÄky v Praze (17 poboÄek), BrnÄ (3 poboÄky) a OstravÄ (1 poboÄka)." 1244 } 1245 ] 1246 } 1247]`;function _mt({onChange:e}){const t=b.useCallback(r=>{r&&e(r)},[e]),n=b.useCallback((r,i)=>{i.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0,schemas:[{uri:"http://myserver/test-case-schema.json",fileMatch:["*"],schema:ymt}]})},[]);return l.jsx(wye,{height:"100%",defaultLanguage:"json",defaultValue:bmt,onChange:t,onMount:n,options:{minimap:{enabled:!1},fontSize:12,formatOnPaste:!0,formatOnType:!0}})}function or(...e){return i9(P9(e))}const La=[];for(let e=0;e<256;++e)La.push((e+256).toString(16).slice(1));
1247function wmt(e,t=0){return(La[e[t+0]]+La[e[t+1]]+La[e[t+2]]+La[e[t+3]]+"-"+La[e[t+4]]+La[e[t+5]]+"-"+La[e[t+6]]+La[e[t+7]]+"-"+La[e[t+8]]+La[e[t+9]]+"-"+La[e[t+10]]+La[e[t+11]]+La[e[t+12]]+La[e[t+13]]+La[e[t+14]]+La[e[t+15]]).toLowerCase()}let jM;const Smt=new Uint8Array(16);function Emt(){if(!jM){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");jM=crypto.getRandomValues.bind(crypto)}return jM(Smt)}const RM={};function TB(e,t,n){let r;{const i=Date.now(),s=Emt();Cmt(RM,i,s),r=Tmt(s,RM.msecs,RM.seq,t,n)}return t??wmt(r)}function Cmt(e,t,n){return e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=n[6]<<23|n[7]<<16|n[8]<<8|n[9],e.msecs=t):(e.seq=e.seq+1|0,e.seq===0&&e.msecs++),e}function Tmt(e,t,n,r,i=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(!r)r=new Uint8Array(16),i=0;else if(i<0||i+16>r.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);return t??=Date.now(),n??=e[6]*127<<24|e[7]<<16|e[8]<<8|e[9],r[i++]=t/1099511627776&255,r[i++]=t/4294967296&255,r[i++]=t/16777216&255,r[i++]=t/65536&255,r[i++]=t/256&255,r[i++]=t&255,r[i++]=112|n>>>28&15,r[i++]=n>>>20&255,r[i++]=128|n>>>14&63,r[i++]=n>>>6&255,r[i++]=n<<2&255|e[10]&3,r[i++]=e[11],r[i++]=e[12],r[i++]=e[13],r[i++]=e[14],r[i++]=e[15],r}function Amt(e){return typeof e.message=="string"?{role:e.role,content:e.message,user:e.user,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),id:TB(),isInitial:e.isInitial??!1}:{...e.message,role:e.message?.role??e.role,user:e.message?.user??e.user,isInitial:e.isInitial??!1}}function AB(e,t=6e4){const{i18n:n,_:r}=Me(),[i,s]=b.useState(new Date);if(b.useEffect(()=>{const c=setInterval(()=>{s(new Date)},t);return()=>clearInterval(c)},[t]),!e)return n._({id:"nJ6NCb"});const a=Math.floor((Number(i)-Number(new Date(e)))/1e3);if(a<60)return n._({id:"nJ6NCb"});let o="";if(a<3600){const c=Math.floor(a/60);o=n._({id:"Pfatg8",values:{minutes:c}})}else if(a<86400){const c=Math.floor(a/3600);o=n._({id:"tkDYSE",values:{hours:c}})}else{const c=Math.floor(a/86400);o=n._({id:"nSW2Lv",values:{days:c}})}return n._({id:"08y+Zv",values:{time:o}})}function OA(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function PA({label:e,value:t}){return t?l.jsxs("div",{className:"flex flex-col gap-1",children:[l.jsx("span",{className:"text-xs font-medium text-chat-muted-foreground",children:e}),l.jsx("pre",{className:"max-h-64 overflow-auto whitespace-pre-wrap break-words rounded border border-chat-border bg-chat-background/50 p-2 text-xs text-chat-foreground",children:t})]}):null}function kmt({toolName:e,args:t,content:n,artifact:r,state:i,error:s}){const[a,o]=b.useState(!1),c=i==="call"||i==="call-partial",u=i==="error";return l.jsxs(Ja.div,{className:"w-full overflow-hidden rounded-3xl border border-chat-border bg-chat-background-secondary",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.3},children:[l.jsxs("button",{type:"button",onClick:()=>o(d=>!d),className:"flex w-full items-center gap-2 p-3 text-left",children:[l.jsx("span",{className:"flex size-6 shrink-0 items-center justify-center rounded-md border border-chat-border bg-chat-background text-chat-foreground [&>svg]:size-3.5",children:c?l.jsx(Kr,{className:"animate-spin"}):l.jsx(A2,{})}),l.jsxs("span",{className:"flex min-w-0 flex-col",children:[l.jsx("span",{className:"truncate text-sm font-medium text-chat-foreground",children:e}),l.jsx("span",{className:"text-xs text-chat-muted-foreground",children:u?l.jsx(D,{id:"oegfSO"}):c?l.jsx(D,{id:"lziBgy"}):l.jsx(D,{id:"EvIJVD"})})]}),l.jsx(Qd,{className:`ml-auto size-4 shrink-0 text-chat-muted-foreground transition-transform ${a?"rotate-90":""}`})]}),a&&l.jsxs("div",{className:"flex flex-col gap-3 border-t border-chat-border p-3",children:[l.jsx(PA,{label:l.jsx(D,{id:"OgB1k4"}),value:OA(t)}),l.jsx(PA,{label:l.jsx(D,{id:"RD6AE9"}),value:OA(n)}),l.jsx(PA,{label:l.jsx(D,{id:"xdkqLV"}),value:OA(r)}),s&&l.jsx(PA,{label:l.jsx(D,{id:"SlfejT"}),value:OA(s)})]})]})}const Nmt={CZK:"KÄ",EUR:"â¬",USD:"$",GBP:"£",PLN:"zÅ",HUF:"Ft",RON:"lei",BGN:"лв"};function E4(e,t){if(e==null)return null;const n=t?.trim().toUpperCase(),r=n?Nmt[n]??n:"KÄ";return`${e} ${r}`}function Am({children:e}){return l.jsx("div",{className:"flex flex-wrap items-center gap-1 pl-6 text-xs text-chat-foreground",children:e})}function fu({icon:e,children:t}){return l.jsxs("span",{className:"inline-flex max-w-full items-center gap-1 whitespace-nowrap rounded-full border border-chat-border bg-chat-background-secondary px-1.5 py-0.5 [&_svg]:size-3 [&_svg]:shrink-0",children:[e,l.jsx("span",{className:"min-w-0 truncate",children:t})]})}function Sye({href:e,icon:t,children:n}){return l.jsxs("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"inline-flex max-w-full items-center gap-1 rounded-full border border-chat-border bg-chat-background-secondary px-1.5 py-0.5 hover:underline [&_svg]:size-3 [&_svg]:shrink-0",children:[t,l.jsx("span",{className:"min-w-0 truncate",children:n}),l.jsx($d,{className:"opacity-60"})]})}function jmt({toolCall:e}){switch(e.name){case We.DocumentSearch:case We.WebSearch:{const t=e.args?.searchQuery;return t?.trim()?l.jsx(Am,{children:l.jsx(fu,{icon:l.jsx(Iy,{}),children:t.trim()})}):null}case We.FetchUrl:{const t=e.args?.url;return t?.trim()?l.jsx(Am,{children:l.jsx(Sye,{href:t,icon:l.jsx(ooe,{}),children:t})}):null}default:return null}}const Rmt=new Set([We.GetShopProductByProductId,We.GetShopProductByExternalId,We.GetShopProductByEan,We.GetShopProductByIsbn]);function Eye({product:e}){const t=E4(e.price,e.currency);return l.jsxs("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"flex max-w-full items-center gap-2 rounded-lg border border-chat-border bg-chat-background-secondary px-2 py-1 hover:bg-chat-surface",children:[e.imageUrl?l.jsx("img",{src:e.imageUrl,alt:"",className:"size-8 shrink-0 rounded object-cover"}
1247):null,l.jsx("span",{className:"min-w-0 flex-1 truncate text-chat-foreground",children:e.title||e.name}),t?l.jsx("span",{className:"shrink-0 font-semibold text-chat-foreground",children:t}):null]})}function Imt({toolCall:e}){const t=e.artifact;return t?.name?l.jsx("div",{className:"pl-6",children:l.jsx(Eye,{product:{id:t.id,name:t.name,title:t.title,price:t.price,currency:t.currency,imageUrl:t.imageUrl,url:t.url}})}):null}function Omt({toolCall:e}){const{i18n:t,_:n}=Me(),r=e.args,i=e.artifact;if(!i)return null;const s=Pmt(n,r);return!(r.query||s||r.minPrice||r.maxPrice||r.isOnSale||i.categories?.length)?null:l.jsxs(Am,{children:[r.query?l.jsx(fu,{icon:l.jsx(Iy,{}),children:t._({id:"wZPUJx",values:{0:r.query}})}):null,s?l.jsx(fu,{icon:l.jsx(Y5e,{}),children:s}):null,r.minPrice?l.jsx(fu,{icon:l.jsx(NK,{}),children:t._({id:"njJzzW",values:{0:r.minPrice}})}):null,r.maxPrice?l.jsx(fu,{icon:l.jsx(NK,{}),children:t._({id:"OuNGtv",values:{0:r.maxPrice}})}):null,r.isOnSale?l.jsx(fu,{icon:l.jsx(J5e,{}),children:t._({id:"2NPDz1"})}):null,i.categories?.map(o=>l.jsx(fu,{icon:l.jsx(B9,{}),children:o.displayName??o.name},o.id))]})}function Pmt(e,t){return t.sortBy==="price"?t.sortOrder==="desc"?e`Highest price`:e`Lowest price`:t.sortBy==="name"?t.sortOrder==="desc"?e`Name (Z-A)`:e`Name (A-Z)`:null}function Cye(e){const t=e?.categories??[],n=t.flatMap(r=>r.children??[]);return n.length>0?n:t}function Mmt({toolCall:e}){const t=Cye(e.artifact);return t.length===0?null:l.jsx(Am,{children:t.slice(0,12).map(n=>l.jsx(fu,{icon:l.jsx(B9,{}),children:n.displayName??n.name},n.id))})}function Dmt({toolCall:e}){const n=e.artifact?.accessories??[];return n.length===0?null:l.jsx("div",{className:"flex flex-col gap-1 pl-6",children:n.slice(0,5).map(r=>l.jsx(Eye,{product:r},r.id))})}function Fmt({toolCall:e}){const{i18n:t,_:n}=Me(),i=e.artifact?.deliveryOptions??[];return i.length===0?null:l.jsx(Am,{children:i.map((s,a)=>{const o=E4(s.price);return l.jsxs(fu,{icon:l.jsx(hoe,{}),children:[s.carrier??t._({id:"HYIQSw"}),o?` · ${o}`:""]},s.carrierId??a)})})}function Tye(e,t){switch(t){case Wa.InStock:return e`In stock`;case Wa.OutOfStock:return e`Out of stock`;case Wa.OnOrder:return e`On order`;case Wa.PreOrder:return e`Pre-order`;default:return e`Availability unknown`}}function Lmt({toolCall:e}){const{i18n:t,_:n}=Me(),r=e.artifact;if(!r)return null;const i=r.stockQuantity!==null&&r.stockQuantity!==void 0;return l.jsx(Am,{children:l.jsxs(fu,{icon:l.jsx(loe,{}),children:[Tye(n,r.availability),i?` · ${r.stockQuantity} ${t._({id:"or/E/Y"})}`:""]})})}function zmt({toolCall:e}){const n=e.artifact?.gifts??[];return n.length===0?null:l.jsx(Am,{children:n.map(r=>l.jsx(fu,{icon:l.jsx(F9,{}),children:r},r))})}function $mt({toolCall:e}){const n=e.artifact?.products??[];return n.length===0?null:l.jsx(Am,{children:n.map(r=>l.jsx(Sye,{href:r.url,children:r.title||r.name},r.id))})}function Bmt({toolCall:e}){switch(e.name){case We.GetShopProducts:return l.jsx(Omt,{toolCall:e});case We.GetShopCategories:return l.jsx(Mmt,{toolCall:e});case We.GetShopProductAccessories:return l.jsx(Dmt,{toolCall:e});case We.GetShopDeliveryOptions:return l.jsx(Fmt,{toolCall:e});case We.GetShopProductAvailability:return l.jsx(Lmt,{toolCall:e});case We.GetShopProductGifts:return l.jsx(zmt,{toolCall:e});case We.CompareShopProducts:return l.jsx($mt,{toolCall:e});default:return Rmt.has(e.name)?l.jsx(Imt,{toolCall:e}):null}}function D_(e){return Array.isArray(e)?e.length:0}function Umt(){const{i18n:e,_:t}=Me();return b.useCallback(n=>{const r=n.artifact;if(!r)return null;switch(n.name){case We.GetShopProducts:{const i=r,s=i?.totalCount??D_(i?.products);
1247return i?.hasMore?e._({id:"HZU3QH",values:{count:s}}):e._({id:"moZy2g",values:{count:s}})}case We.GetShopCategories:return e._({id:"2/zJsr",values:{0:Cye(r).length}});case We.GetShopProductAccessories:{const i=D_(r.accessories);return e._({id:"Svz5Ez",values:{count:i}})}case We.GetShopProductGifts:{const i=D_(r.gifts);return i>0?e._({id:"Iab3kz",values:{count:i}}):null}case We.GetShopDeliveryOptions:{const i=D_(r.deliveryOptions);return i>0?e._({id:"UTF6B4",values:{count:i}}):null}case We.GetShopProductAvailability:return Tye(t,r.availability);case We.CompareShopProducts:return e._({id:"yN+boa",values:{0:D_(r.products)}});default:return null}},[t])}const Aye=new Set([We.GetShopProductByProductId,We.GetShopProductByExternalId,We.GetShopProductByEan,We.GetShopProductByIsbn]);function kye(e){switch(e){case We.DocumentSearch:return cRe;case We.FindDocuments:return URe;case We.GetDocumentOverview:return l4e;case We.WebSearch:return Vu;case We.FetchUrl:return ooe;case We.GetShopProducts:return FIe;case We.GetSimilarProducts:return zRe;case We.GetShopCategories:return doe;case We.GetShopProductAccessories:return bIe;case We.GetShopDeliveryOptions:return hoe;case We.GetShopProductAvailability:return loe;case We.GetShopProductGifts:return F9;case We.CompareShopProducts:return SRe;default:return Aye.has(e)?eE:A2}}function Nye(){const{i18n:e,_:t}=Me();return b.useCallback(n=>{let r,i;switch(n.name){case We.DocumentSearch:r=e._({id:"eAeQK1"}),i=e._({id:"oElnAA"});break;case We.FindDocuments:r=e._({id:"1hsvAg"}),i=e._({id:"PG0qew"});break;case We.GetDocumentOverview:r=e._({id:"VCR+Cq"}),i=e._({id:"vsiYy6"});break;case We.WebSearch:r=e._({id:"IQEc57"}),i=e._({id:"iOkPjn"});break;case We.FetchUrl:r=e._({id:"ZdDUWU"}),i=e._({id:"rIr+6+"});break;case We.GetShopProducts:r=e._({id:"yX+W+r"}),i=e._({id:"kHIXvF"});break;case We.GetSimilarProducts:r=e._({id:"R4AFVl"}),i=e._({id:"UFws/+"});break;case We.GetShopCategories:r=e._({id:"u97lbj"}),i=e._({id:"VE4t+E"});break;case We.GetShopProductAccessories:r=e._({id:"f6dCa6"}),i=e._({id:"nbtYyu"});break;case We.GetShopDeliveryOptions:r=e._({id:"UNdjp0"}),i=e._({id:"ntShuD"});break;case We.GetShopProductAvailability:r=e._({id:"03OoKp"}),i=e._({id:"BWLVTW"});break;case We.GetShopProductGifts:r=e._({id:"P7nhJM"}),i=e._({id:"2NrzlN"});break;case We.CompareShopProducts:r=e._({id:"g6GNhk"}),i=e._({id:"gyPsbM"});break;default:Aye.has(n.name)?(r=e._({id:"EmHKaE"}),i=e._({id:"vyRe0v"})):(r=e._({id:"XklovM"}),i=e._({id:"uE1pN9"}))}return{running:n.label?.trim()||r,past:i}},[t])}function jye(e){return e==="start"||e==="streaming"}function Vmt(e,t){return e.status==="completed"||e.status==="error"||!jye(t)?!1:e.status==="pending"?!0:!e.content}function Hmt({toolCall:e}){return l.jsxs(l.Fragment,{children:[l.jsx(Bmt,{toolCall:e}),l.jsx(jmt,{toolCall:e})]})}function qmt({toolCall:e,status:t,renderStepInspector:n}){const r=Nye(),i=Umt(),s=Vmt(e,t),a=e.status==="error",o=kye(e.name),c=r(e),u=s?null:i(e);return l.jsxs(Ja.div,{className:"flex flex-col gap-1 py-1",initial:{opacity:0,y:4},animate:{opacity:1,y:0},children:[l.jsxs("div",{className:"flex items-center gap-2 text-xs text-chat-muted-foreground",children:[l.jsx(o,{className:or("size-3.5 shrink-0 opacity-70",a&&"text-destructive opacity-100")}),l.jsx("span",{className:or("min-w-0 flex-1 truncate",a&&"text-destructive"),children:s?c.running:c.past}),u?l.jsx("span",{className:"shrink-0 font-medium text-chat-foreground",children:u}):null,s?l.jsx(Kr,{className:"size-3 shrink-0 animate-spin"}):a?l.jsx(pl,{className:"size-3 shrink-0 text-destructive"}):l.jsx(Es,{className:"size-3 shrink-0 opacity-60"})]}),!s&&!a&&l.jsx(Hmt,{toolCall:e}),n?l.jsx("div",{className:"pl-6",children:n(e)}):null]})}const Wmt=b.memo(({toolCalls:e,status:t,hasAnswerContent:n,defaultExpanded:r=!1,renderStepInspector:i})=>{const{i18n:s,_:a}=Me(),o=Nye(),c=b.useMemo(()=>e.filter(S=>S.type===Bm.Tool),[e]),u=n||!jye(t),[d,h]=b.useState(r),p=b.useRef(!1);b.useEffect(()=>{p.current||h(r)},[r]);const g=()=>{p.current=!0,h(S=>!S)},v=c.at(-1),x=c.filter(S=>S.status==="error").length,_=b.useMemo(()=>v?u?x>
12470?s._({id:"r+SQRa",values:{failedCount:x,0:c.length}}):c.length===1?o(c[0]).past:s._({id:"OKDuWF",values:{0:c.length}}):o(v).running:"",[u,c,v,x,a,o]);if(c.length===0||!v)return null;const w=u?x>0?tE:Es:kye(v.name);return l.jsxs(Ja.div,{className:"mb-2 w-full max-w-full rounded-2xl bg-chat-surface/50",initial:{opacity:0,y:4},animate:{opacity:1,y:0},children:[l.jsxs("button",{type:"button","aria-expanded":d,onClick:g,className:or("flex w-full items-center gap-2 rounded-2xl px-3 py-1.5 text-left","text-xs text-chat-muted-foreground transition-colors hover:bg-chat-surface"),children:[l.jsx(w,{className:or("size-3.5 shrink-0",u?"opacity-60":"opacity-70",u&&x>0&&"text-destructive opacity-100")}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:_}),!u&&l.jsx(Kr,{className:"size-3 shrink-0 animate-spin opacity-70"}),d?l.jsx(Xd,{className:"size-3 shrink-0 opacity-70"}):l.jsx(Qd,{className:"size-3 shrink-0 opacity-70"})]}),l.jsx(CS,{initial:!1,children:d&&l.jsx(Ja.div,{className:"overflow-hidden px-3 pb-1.5",initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},children:c.map(S=>l.jsx(qmt,{toolCall:S,status:t,renderStepInspector:i},S.id))})})]})});function Gmt({label:e,state:t}){const n=t==="call"||t==="call-partial";return l.jsxs(Ja.div,{className:"flex items-center gap-1.5 px-1 py-0.5 text-xs text-chat-muted-foreground",initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.2},children:[n?l.jsx(Kr,{className:"size-3 shrink-0 animate-spin"}):l.jsx(Es,{className:"size-3 shrink-0"}),l.jsx("span",{className:"min-w-0 truncate",children:e})]})}function C4({message:e,error:t}){return l.jsx(Ja.div,{className:"w-full border border-chat-destructive/20 bg-chat-destructive/5 rounded-3xl overflow-hidden",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.3},children:l.jsxs("div",{className:"flex flex-col p-3 gap-2",children:[l.jsxs("div",{className:"flex text-sm items-center gap-2 text-chat-destructive",children:[l.jsx(S0,{className:"size-5 shrink-0"}),l.jsx("span",{className:"font-medium",children:e||l.jsx(D,{id:"Pzs2H2"})})]}),t&&l.jsx("div",{className:"text-xs text-muted-foreground bg-chat-background/50 p-2 rounded border border-chat-border",children:t})]})})}function Q0({icon:e,children:t,loading:n}){return l.jsxs(Ja.div,{className:"flex items-center gap-2 text-sm",initial:{opacity:0,y:5},animate:{opacity:1,y:0},exit:{opacity:0},transition:{duration:.3},children:[l.jsx("span",{className:"flex items-center justify-center h-6 w-6 rounded-md border border-chat-border bg-chat-background-secondary text-chat-foreground [&>svg]:size-3.5",children:n?l.jsx(Kr,{className:"animate-spin"}):e}),l.jsx("span",{className:"font-medium text-sm",children:t})]})}function Kmt(e,t){return b.useReducer((n,r)=>t[n][r]??n,e)}var kB="ScrollArea",[Rye]=Ia(kB),[Ymt,qc]=Rye(kB),Iye=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:s=600,...a}=e,[o,c]=b.useState(null),[u,d]=b.useState(null),[h,p]=b.useState(null),[g,v]=b.useState(null),[x,_]=b.useState(null),[w,S]=b.useState(0),[E,T]=b.useState(0),[N,A]=b.useState(!1),[k,j]=b.useState(!1),R=Wn(t,V=>c(V)),P=ox(i);return l.jsx(Ymt,{scope:n,type:r,dir:P,scrollHideDelay:s,scrollArea:o,viewport:u,onViewportChange:d,content:h,onContentChange:p,scrollbarX:g,onScrollbarXChange:v,scrollbarXEnabled:N,onScrollbarXEnabledChange:A,scrollbarY:x,onScrollbarYChange:_,scrollbarYEnabled:k,onScrollbarYEnabledChange:j,onCornerWidthChange:S,onCornerHeightChange:T,children:l.jsx(nn.div,{dir:P,...a,ref:R,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":E+"px",...e.style}})})});Iye.displayName=kB;var Oye="ScrollAreaViewport",Pye=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:i,...s}=e,a=qc(Oye,n),o=b.useRef(null),c=Wn(t,o,a.onViewportChange);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),l.jsx(nn.div,{"data-radix-scroll-area-viewport":"",...s,ref:c,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:l.jsx("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});
vendor: 10,154 bytes, line 1247
1247Pye.displayName=Oye;var nf="ScrollAreaScrollbar",Mye=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=qc(nf,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:a}=i,o=e.orientation==="horizontal";return b.useEffect(()=>(o?s(!0):a(!0),()=>{o?s(!1):a(!1)}),[o,s,a]),i.type==="hover"?l.jsx(Xmt,{...r,ref:t,forceMount:n}):i.type==="scroll"?l.jsx(Qmt,{...r,ref:t,forceMount:n}):i.type==="auto"?l.jsx(Dye,{...r,ref:t,forceMount:n}):i.type==="always"?l.jsx(NB,{...r,ref:t}):null});Mye.displayName=nf;var Xmt=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=qc(nf,e.__scopeScrollArea),[s,a]=b.useState(!1);return b.useEffect(()=>{const o=i.scrollArea;let c=0;if(o){const u=()=>{window.clearTimeout(c),a(!0)},d=()=>{c=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return o.addEventListener("pointerenter",u),o.addEventListener("pointerleave",d),()=>{window.clearTimeout(c),o.removeEventListener("pointerenter",u),o.removeEventListener("pointerleave",d)}}},[i.scrollArea,i.scrollHideDelay]),l.jsx(to,{present:n||s,children:l.jsx(Dye,{"data-state":s?"visible":"hidden",...r,ref:t})})}),Qmt=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=qc(nf,e.__scopeScrollArea),s=e.orientation==="horizontal",a=A4(()=>c("SCROLL_END"),100),[o,c]=Kmt("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return b.useEffect(()=>{if(o==="idle"){const u=window.setTimeout(()=>c("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(u)}},[o,i.scrollHideDelay,c]),b.useEffect(()=>{const u=i.viewport,d=s?"scrollLeft":"scrollTop";if(u){let h=u[d];const p=()=>{const g=u[d];h!==g&&(c("SCROLL"),a()),h=g};return u.addEventListener("scroll",p),()=>u.removeEventListener("scroll",p)}},[i.viewport,s,c,a]),l.jsx(to,{present:n||o!=="hidden",children:l.jsx(NB,{"data-state":o==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:qt(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:qt(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),Dye=b.forwardRef((e,t)=>{const n=qc(nf,e.__scopeScrollArea),{forceMount:r,...i}=e,[s,a]=b.useState(!1),o=e.orientation==="horizontal",c=A4(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;a(o?u:d)}},10);return Ey(n.viewport,c),Ey(n.content,c),l.jsx(to,{present:r||s,children:l.jsx(NB,{"data-state":s?"visible":"hidden",...i,ref:t})})}),NB=b.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,i=qc(nf,e.__scopeScrollArea),s=b.useRef(null),a=b.useRef(0),[o,c]=b.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=$ye(o.viewport,o.content),d={...r,sizes:o,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:p=>s.current=p,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:p=>a.current=p};function h(p,g){return igt(p,a.current,o,g)}return n==="horizontal"?l.jsx(Zmt,{...d,ref:t,onThumbPositionChange:()=>{if(i.viewport&&s.current){const p=i.viewport.scrollLeft,g=jte(p,o,i.dir);s.current.style.transform=`translate3d(${g}px, 0, 0)`}},onWheelScroll:p=>{i.viewport&&(i.viewport.scrollLeft=p)},onDragScroll:p=>{i.viewport&&(i.viewport.scrollLeft=h(p,i.dir))}}):n==="vertical"?l.jsx(Jmt,{...d,ref:t,onThumbPositionChange:()=>{if(i.viewport&&s.current){const p=i.viewport.scrollTop,g=jte(p,o);s.current.style.transform=`translate3d(0, ${g}px, 0)`}},onWheelScroll:p=>{i.viewport&&(i.viewport.scrollTop=p)},onDragScroll:p=>{i.viewport&&(i.viewport.scrollTop=h(p))}}):null}),Zmt=b.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,s=qc(nf,e.__scopeScrollArea),[a,o]=b.useState(),c=b.useRef(null),u=Wn(t,c,s.onScrollbarXChange);return b.useEffect(()=>{c.current&&o(getComputedStyle(c.current))},[c]),l.jsx(Lye,{"data-orientation":"horizontal",...i,ref:u,sizes:n,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":T4(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,h)=>{if(s.viewport){const p=s.viewport.scrollLeft+d.deltaX;e.onWheelScroll(p),Uye(p,h)&&d.preventDefault()}},onResize:()=>{c.current&&s.viewport&&a&&r({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:q3(a.paddingLeft),paddingEnd:q3(a.paddingRight)}})}})}),Jmt=b.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,s=qc(nf,e.__scopeScrollArea),[a,o]=b.useState(),c=b.useRef(null),u=Wn(t,c,s.onScrollbarYChange);return b.useEffect(()=>{c.current&&o(getComputedStyle(c.current))},[c]),l.jsx(Lye,{"data-orientation":"vertical",...i,ref:u,sizes:n,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":T4(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,h)=>{if(s.viewport){const p=s.viewport.scrollTop+d.deltaY;e.onWheelScroll(p),Uye(p,h)&&d.preventDefault()}},onResize:()=>{c.current&&s.viewport&&a&&r({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:q3(a.paddingTop),paddingEnd:q3(a.paddingBottom)}})}})}),[egt,Fye]=Rye(nf),Lye=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:s,onThumbPointerUp:a,onThumbPointerDown:o,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:h,...p}=e,g=qc(nf,n),[v,x]=b.useState(null),_=Wn(t,R=>x(R)),w=b.useRef(null),S=b.useRef(""),E=g.viewport,T=r.content-r.viewport,N=wa(d),A=wa(c),k=A4(h,10);function j(R){if(w.current){const P=R.clientX-w.current.left,V=R.clientY-w.current.top;u({x:P,y:V})}}return b.useEffect(()=>{const R=P=>{const V=P.target;v?.contains(V)&&N(P,T)};return document.addEventListener("wheel",R,{passive:!1}),()=>document.removeEventListener("wheel",R,{passive:!1})},[E,v,T,N]),b.useEffect(A,[r,A]),Ey(v,k),Ey(g.content,k),l.jsx(egt,{scope:n,scrollbar:v,hasThumb:i,onThumbChange:wa(s),onThumbPointerUp:wa(a),onThumbPositionChange:A,onThumbPointerDown:wa(o),children:l.jsx(nn.div,{...p,ref:_,style:{position:"absolute",...p.style},onPointerDown:qt(e.onPointerDown,R=>{R.button===0&&(R.target.setPointerCapture(R.pointerId),w.current=v.getBoundingClientRect(),S.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",g.viewport&&(g.viewport.style.scrollBehavior="auto"),j(R))}),onPointerMove:qt(e.onPointerMove,j),onPointerUp:qt(e.onPointerUp,R=>{const P=R.target;P.hasPointerCapture(R.pointerId)&&P.releasePointerCapture(R.pointerId),document.body.style.webkitUserSelect=S.current,g.viewport&&(g.viewport.style.scrollBehavior=""),w.current=null})})})}),H3="ScrollAreaThumb",zye=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Fye(H3,e.__scopeScrollArea);return l.jsx(to,{present:n||i.hasThumb,children:l.jsx(tgt,{ref:t,...r})})}),tgt=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...i}=e,s=qc(H3,n),a=Fye(H3,n),{onThumbPositionChange:o}=a,c=Wn(t,h=>a.onThumbChange(h)),u=b.useRef(void 0),d=A4(()=>{u.current&&(u.current(),u.current=void 0)},100);return b.useEffect(()=>{const h=s.viewport;if(h){const p=()=>{if(d(),!u.current){const g=sgt(h,o);u.current=g,o()}};return o(),h.addEventListener("scroll",p),()=>h.removeEventListener("scroll",p)}},[s.viewport,d,o]),l.jsx(nn.div,{"data-state":a.hasThumb?"visible":"hidden",...i,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:qt(e.onPointerDownCapture,h=>{const g=h.target.getBoundingClientRect(),v=h.clientX-g.left,x=h.clientY-g.top;a.onThumbPointerDown({x:v,y:x})}),onPointerUp:qt(e.onPointerUp,a.onThumbPointerUp)})});zye.displayName=H3;var jB="ScrollAreaCorner",ngt=b.forwardRef((e,t)=>{const n=qc(jB,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?l.jsx(rgt,{...e,ref:t}):null});ngt.displayName=jB;var rgt=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,i=qc(jB,n),[s,a]=b.useState(0),[o,c]=b.useState(0),u=!!(s&&o);return Ey(i.scrollbarX,()=>{const d=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(d),c(d)}),Ey(i.scrollbarY,()=>{const d=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(d),a(d)}),u?l.jsx(nn.div,{...r,ref:t,style:{width:s,height:o,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function q3(e){return e?parseInt(e,10):0}function $ye(e,t){const n=e/t;return isNaN(n)?0:n}function T4(e){const t=$ye(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function igt(e,t,n,r="ltr"){const i=T4(n),s=i/2,a=t||s,o=i-a,c=n.scrollbar.paddingStart+a,u=n.scrollbar.size-n.scrollbar.paddingEnd-o,d=n.content-n.viewport,h=r==="ltr"?[0,d]:[d*-1,0];return Bye([c,u],h)(e)}function jte(e,t,n="ltr"){const r=T4(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-i,a=t.content-t.viewport,o=s-r,c=n==="ltr"?[0,a]:[a*-1,0],u=P6(e,c);return Bye([0,a],[0,o])(u)}function Bye(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Uye(e,t){return e>0&&e<t}var sgt=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){const s={left:e.scrollLeft,top:e.scrollTop},a=n.left!==s.left,o=n.top!==s.top;(a||o)&&t(),n=s,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)};function A4(e,t){const n=wa(e),r=b.useRef(0);return b.useEffect(()=>()=>window.clearTimeout(r.current),[]),b.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Ey(e,t){const n=wa(t);sa(()=>{let r=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(e),()=>{window.cancelAnimationFrame(r),i.unobserve(e)}}},[e,n])}var Yf=Iye,Xf=Pye,Qf=Mye,Zf=zye,k4="Tabs",[agt]=Ia(k4,[Mm]),Vye=Mm(),[ogt,RB]=agt(k4),Hye=b.forwardRef((e,t)=>
vendor: 7,451 bytes, line 1247
1247{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:s,orientation:a="horizontal",dir:o,activationMode:c="automatic",...u}=e,d=ox(o),[h,p]=Yl({prop:r,onChange:i,defaultProp:s??"",caller:k4});return l.jsx(ogt,{scope:n,baseId:Na(),value:h,onValueChange:p,orientation:a,dir:d,activationMode:c,children:l.jsx(nn.div,{dir:d,"data-orientation":a,...u,ref:t})})});Hye.displayName=k4;var qye="TabsList",Wye=b.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,s=RB(qye,n),a=Vye(n);return l.jsx(e5,{asChild:!0,...a,orientation:s.orientation,dir:s.dir,loop:r,children:l.jsx(nn.div,{role:"tablist","aria-orientation":s.orientation,...i,ref:t})})});Wye.displayName=qye;var Gye="TabsTrigger",Kye=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...s}=e,a=RB(Gye,n),o=Vye(n),c=Qye(a.baseId,r),u=Zye(a.baseId,r),d=r===a.value;return l.jsx(lE,{asChild:!0,...o,focusable:!i,active:d,children:l.jsx(nn.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:c,...s,ref:t,onMouseDown:qt(e.onMouseDown,h=>{!i&&h.button===0&&h.ctrlKey===!1?a.onValueChange(r):h.preventDefault()}),onKeyDown:qt(e.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&a.onValueChange(r)}),onFocus:qt(e.onFocus,()=>{const h=a.activationMode!=="manual";!d&&!i&&h&&a.onValueChange(r)})})})});Kye.displayName=Gye;var Yye="TabsContent",Xye=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:s,...a}=e,o=RB(Yye,n),c=Qye(o.baseId,r),u=Zye(o.baseId,r),d=r===o.value,h=b.useRef(d);return b.useEffect(()=>{const p=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(p)},[]),l.jsx(to,{present:i||d,children:({present:p})=>l.jsx(nn.div,{"data-state":d?"active":"inactive","data-orientation":o.orientation,role:"tabpanel","aria-labelledby":c,hidden:!p,id:u,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:h.current?"0s":void 0},children:p&&s})})});Xye.displayName=Yye;function Qye(e,t){return`${e}-trigger-${t}`}function Zye(e,t){return`${e}-content-${t}`}var Sx=Hye,Ex=Wye,Ji=Kye,es=Xye,Rte=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,tl=e=>!e||typeof e!="object"||Object.keys(e).length===0,lgt=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function Jye(e,t){e.forEach(function(n){Array.isArray(n)?Jye(n,t):t.push(n)})}function ebe(e){let t=[];return Jye(e,t),t}var tbe=(...e)=>ebe(e).filter(Boolean),nbe=(e,t)=>{let n={},r=Object.keys(e),i=Object.keys(t);for(let s of r)if(i.includes(s)){let a=e[s],o=t[s];Array.isArray(a)||Array.isArray(o)?n[s]=tbe(o,a):typeof a=="object"&&typeof o=="object"?n[s]=nbe(a,o):n[s]=o+" "+a}else n[s]=e[s];for(let s of i)r.includes(s)||(n[s]=t[s]);return n},Ite=e=>!e||typeof e!="string"?e:e.replace(/\s+/g," ").trim();const IB="-",cgt=e=>{const t=dgt(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const o=a.split(IB);return o[0]===""&&o.length!==1&&o.shift(),rbe(o,t)||ugt(a)},getConflictingClassGroupIds:(a,o)=>{const c=n[a]||[];return o&&r[a]?[...c,...r[a]]:c}}},rbe=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?rbe(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(IB);return t.validators.find(({validator:a})=>a(s))?.classGroupId},Ote=/^\[(.+)\]$/,ugt=e=>{if(Ote.test(e)){const t=Ote.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},dgt=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const i in n)oL(n[i],r,i,t);return r},oL=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:Pte(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(fgt(i)){oL(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,a])=>{oL(a,Pte(t,s),n,r)})})},Pte=(e,t)=>{let n=e;return t.split(IB).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},fgt=e=>e.isThemeGetter,hgt=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,a)=>{n.set(s,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let a=n.get(s);if(a!==void 0)return a;if((a=r.get(s))!==void 0)return i(s,a),a},set(s,a){n.has(s)?n.set(s,a):i(s,a)}}},lL="!",cL=":",pgt=cL.length,mgt=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const s=[];let a=0,o=0,c=0,u;for(let v=0;v<i.length;v++){let x=i[v];if(a===0&&o===0){if(x===cL){s.push(i.slice(c,v)),c=v+pgt;continue}if(x==="/"){u=v;continue}}x==="["?a++:x==="]"?a--:x==="("?o++:x===")"&&o--}const d=s.length===0?i:i.substring(c),h=ggt(d),p=h!==d,g=u&&u>c?u-c:void 0;return{modifiers:s,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:g}};if(t){const i=t+cL,s=r;r=a=>a.startsWith(i)?s(a.substring(i.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(n){const i=r;r=s=>n({className:s,parseClassName:i})}return r},ggt=e=>e.endsWith(lL)?e.substring(0,e.length-1):e.startsWith(lL)?e.substring(1):e,xgt=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const i=[];let s=[];return r.forEach(a=>{a[0]==="["||t[a]?(i.push(...s.sort(),a),s=[]):s.push(a)}),i.push(...s.sort()),i}},vgt=e=>({cache:hgt(e.cacheSize),parseClassName:mgt(e),sortModifiers:xgt(e),...cgt(e)}),ygt=/\s+/,bgt=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:s}=t,a=[],o=e.trim().split(ygt);let c="";for(let u=o.length-1;u>=0;u-=1){const d=o[u],{isExternal:h,modifiers:p,hasImportantModifier:g,baseClassName:v,maybePostfixModifierPosition:x}=n(d);if(h){c=d+(c.length>0?" "+c:c);continue}let _=!!x,w=r(_?v.substring(0,x):v);if(!w){if(!_){c=d+(c.length>0?" "+c:c);continue}if(w=r(v),!w){c=d+(c.length>0?" "+c:c);continue}_=!1}const S=s(p).join(":"),E=g?S+lL:S,T=E+w;if(a.includes(T))continue;a.push(T);const N=i(w,_);for(let A=0;A<N.length;++A){const k=N[A];a.push(E+k)}c=d+(c.length>0?" "+c:c)}return c};function _gt(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=ibe(t))&&(r&&(r+=" "),r+=n);return r}const ibe=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ibe(e[r]))&&(n&&(n+=" "),n+=t);return n};function uL(e,...t){let n,r,i,s=a;function a(c){const u=t.reduce((d,h)=>h(d),e());return n=vgt(u),r=n.cache.get,i=n.cache.set,s=o,o(c)}function o(c){const u=r(c);if(u)return u;const d=bgt(c,n);return i(c,d),d}return function(){return s(_gt.apply(null,arguments))}}const ba=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},sbe=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,abe=/^\((?:(\w[\w-]*):)?(.+)\)$/i,wgt=/^\d+\/\d+$/,Sgt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Egt=/\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$/,Cgt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Tgt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Agt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,jv=e=>wgt.test(e),Sr=e=>!!e&&!Number.isNaN(Number(e)),jg=e=>!!e&&Number.isInteger(Number(e)),Mte=e=>e.endsWith("%")&&Sr(e.slice(0,-1)),kp=e=>Sgt.test(e),kgt=()=>!0,Ngt=e=>Egt.test(e)&&!Cgt.test(e),OB=()=>!1,jgt=e=>Tgt.test(e),Rgt=e=>Agt.test(e),Igt=e=>!vn(e)&&!yn(e),Ogt=e=>sb(e,cbe,OB),vn=e=>sbe.test(e),Rg=e=>sb(e,ube,Ngt),IM=e=>sb(e,Hgt,Sr),Pgt=e=>sb(e,obe,OB),Mgt=e=>sb(e,lbe,Rgt),Dgt=e=>sb(e,OB,jgt),yn=e=>
vendor: 9,137 bytes, line 1247
1247abe.test(e),MA=e=>ab(e,ube),Fgt=e=>ab(e,qgt),Lgt=e=>ab(e,obe),zgt=e=>ab(e,cbe),$gt=e=>ab(e,lbe),Bgt=e=>ab(e,Wgt,!0),sb=(e,t,n)=>{const r=sbe.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ab=(e,t,n=!1)=>{const r=abe.exec(e);return r?r[1]?t(r[1]):n:!1},obe=e=>e==="position",Ugt=new Set(["image","url"]),lbe=e=>Ugt.has(e),Vgt=new Set(["length","size","percentage"]),cbe=e=>Vgt.has(e),ube=e=>e==="length",Hgt=e=>e==="number",qgt=e=>e==="family-name",Wgt=e=>e==="shadow",dL=()=>{const e=ba("color"),t=ba("font"),n=ba("text"),r=ba("font-weight"),i=ba("tracking"),s=ba("leading"),a=ba("breakpoint"),o=ba("container"),c=ba("spacing"),u=ba("radius"),d=ba("shadow"),h=ba("inset-shadow"),p=ba("drop-shadow"),g=ba("blur"),v=ba("perspective"),x=ba("aspect"),_=ba("ease"),w=ba("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],T=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],A=()=>[yn,vn,c],k=()=>[jv,"full","auto",...A()],j=()=>[jg,"none","subgrid",yn,vn],R=()=>["auto",{span:["full",jg,yn,vn]},yn,vn],P=()=>[jg,"auto",yn,vn],V=()=>["auto","min","max","fr",yn,vn],U=()=>["start","end","center","between","around","evenly","stretch","baseline"],G=()=>["start","end","center","stretch"],Q=()=>["auto",...A()],Z=()=>[jv,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...A()],K=()=>[e,yn,vn],te=()=>[Mte,Rg],ne=()=>["","none","full",u,yn,vn],se=()=>["",Sr,MA,Rg],H=()=>["solid","dashed","dotted","double"],O=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],L=()=>["","none",g,yn,vn],M=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",yn,vn],q=()=>["none",Sr,yn,vn],X=()=>["none",Sr,yn,vn],J=()=>[Sr,yn,vn],W=()=>[jv,"full",...A()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[kp],breakpoint:[kp],color:[kgt],container:[kp],"drop-shadow":[kp],ease:["in","out","in-out"],font:[Igt],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[kp],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[kp],shadow:[kp],spacing:["px",Sr],text:[kp],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",jv,vn,yn,x]}],container:["container"],columns:[{columns:[Sr,vn,yn,o]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"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:[...E(),vn,yn]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:k()}],"inset-x":[{"inset-x":k()}],"inset-y":[{"inset-y":k()}],start:[{start:k()}],end:[{end:k()}],top:[{top:k()}],right:[{right:k()}],bottom:[{bottom:k()}],left:[{left:k()}],visibility:["visible","invisible","collapse"],z:[{z:[jg,"auto",yn,vn]}],basis:[{basis:[jv,"full","auto",o,...A()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Sr,jv,"auto","initial","none",vn]}],grow:[{grow:["",Sr,yn,vn]}],shrink:[{shrink:["",Sr,yn,vn]}],order:[{order:[jg,"first","last","none",yn,vn]}],"grid-cols":[{"grid-cols":j()}],"col-start-end":[{col:R()}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":j()}],"row-start-end":[{row:R()}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":V()}],"auto-rows":[{"auto-rows":V()}],gap:[{gap:A()}],"gap-x":[{"gap-x":A()}],"gap-y":[{"gap-y":A()}],"justify-content":[{justify:[...U(),"normal"]}],"justify-items":[{"justify-items":[...G(),"normal"]}],"justify-self":[{"justify-self":["auto",...G()]}],"align-content":[{content:["normal",...U()]}],"align-items":[{items:[...G(),"baseline"]}],"align-self":[{self:["auto",...G(),"baseline"]}],"place-content":[{"place-content":U()}],"place-items":[{"place-items":[...G(),"baseline"]}],"place-self":[{"place-self":["auto",...G()]}],p:[{p:A()}],px:[{px:A()}],py:[{py:A()}],ps:[{ps:A()}],pe:[{pe:A()}],pt:[{pt:A()}],pr:[{pr:A()}],pb:[{pb:A()}],pl:[{pl:A()}],m:[{m:Q()}],mx:[{mx:Q()}],my:[{my:Q()}],ms:[{ms:Q()}],me:[{me:Q()}],mt:[{mt:Q()}],mr:[{mr:Q()}],mb:[{mb:Q()}],ml:[{ml:Q()}],"space-x":[{"space-x":A()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":A()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],w:[{w:[o,"screen",...Z()]}],"min-w":[{"min-w":[o,"screen","none",...Z()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[a]},...Z()]}],h:[{h:["screen",...Z()]}],"min-h":[{"min-h":["screen","none",...Z()]}],"max-h":[{"max-h":["screen",...Z()]}],"font-size":[{text:["base",n,MA,Rg]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,yn,IM]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Mte,vn]}],"font-family":[{font:[Fgt,vn,t]}],"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:[i,yn,vn]}],"line-clamp":[{"line-clamp":[Sr,"none",yn,IM]}],leading:[{leading:[s,...A()]}],"list-image":[{"list-image":["none",yn,vn]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",yn,vn]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:K()}],"text-color":[{text:K()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:[Sr,"from-font","auto",yn,Rg]}],"text-decoration-color":[{decoration:K()}],"underline-offset":[{"underline-offset":[Sr,"auto",yn,vn]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",yn,vn]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",yn,vn]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...E(),Lgt,Pgt]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",zgt,Ogt]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},jg,yn,vn],radial:["",yn,vn],conic:[jg,yn,vn]},$gt,Mgt]}],"bg-color":[{bg:K()}],"gradient-from-pos":[{from:te()}],"gradient-via-pos":[{via:te()}],"gradient-to-pos":[{to:te()}],"gradient-from":[{from:K()}],"gradient-via":[{via:K()}],"gradient-to":[{to:K()}],rounded:[{rounded:ne()}],"rounded-s":[{"rounded-s":ne()}],"rounded-e":[{"rounded-e":ne()}],"rounded-t":[{"rounded-t":ne()}],"rounded-r":[{"rounded-r":ne()}],"rounded-b":[{"rounded-b":ne()}],"rounded-l":[{"rounded-l":ne()}],"rounded-ss":[{"rounded-ss":ne()}],"rounded-se":[{"rounded-se":ne()}],"rounded-ee":[{"rounded-ee":ne()}],"rounded-es":[{"rounded-es":ne()}],"rounded-tl":[{"rounded-tl":ne()}],"rounded-tr":[{"rounded-tr":ne()}],"rounded-br":[{"rounded-br":ne()}],"rounded-bl":[{"rounded-bl":ne()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}
vendor: 4,182 bytes, line 1247
1247],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...H(),"hidden","none"]}],"divide-style":[{divide:[...H(),"hidden","none"]}],"border-color":[{border:K()}],"border-color-x":[{"border-x":K()}],"border-color-y":[{"border-y":K()}],"border-color-s":[{"border-s":K()}],"border-color-e":[{"border-e":K()}],"border-color-t":[{"border-t":K()}],"border-color-r":[{"border-r":K()}],"border-color-b":[{"border-b":K()}],"border-color-l":[{"border-l":K()}],"divide-color":[{divide:K()}],"outline-style":[{outline:[...H(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Sr,yn,vn]}],"outline-w":[{outline:["",Sr,MA,Rg]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",d,Bgt,Dgt]}],"shadow-color":[{shadow:K()}],"inset-shadow":[{"inset-shadow":["none",yn,vn,h]}],"inset-shadow-color":[{"inset-shadow":K()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:K()}],"ring-offset-w":[{"ring-offset":[Sr,Rg]}],"ring-offset-color":[{"ring-offset":K()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":K()}],opacity:[{opacity:[Sr,yn,vn]}],"mix-blend":[{"mix-blend":[...O(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":O()}],filter:[{filter:["","none",yn,vn]}],blur:[{blur:L()}],brightness:[{brightness:[Sr,yn,vn]}],contrast:[{contrast:[Sr,yn,vn]}],"drop-shadow":[{"drop-shadow":["","none",p,yn,vn]}],grayscale:[{grayscale:["",Sr,yn,vn]}],"hue-rotate":[{"hue-rotate":[Sr,yn,vn]}],invert:[{invert:["",Sr,yn,vn]}],saturate:[{saturate:[Sr,yn,vn]}],sepia:[{sepia:["",Sr,yn,vn]}],"backdrop-filter":[{"backdrop-filter":["","none",yn,vn]}],"backdrop-blur":[{"backdrop-blur":L()}],"backdrop-brightness":[{"backdrop-brightness":[Sr,yn,vn]}],"backdrop-contrast":[{"backdrop-contrast":[Sr,yn,vn]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Sr,yn,vn]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Sr,yn,vn]}],"backdrop-invert":[{"backdrop-invert":["",Sr,yn,vn]}],"backdrop-opacity":[{"backdrop-opacity":[Sr,yn,vn]}],"backdrop-saturate":[{"backdrop-saturate":[Sr,yn,vn]}],"backdrop-sepia":[{"backdrop-sepia":["",Sr,yn,vn]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":A()}],"border-spacing-x":[{"border-spacing-x":A()}],"border-spacing-y":[{"border-spacing-y":A()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",yn,vn]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Sr,"initial",yn,vn]}],ease:[{ease:["linear","initial",_,yn,vn]}],delay:[{delay:[Sr,yn,vn]}],animate:[{animate:["none",w,yn,vn]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,yn,vn]}],"perspective-origin":[{"perspective-origin":M()}],rotate:[{rotate:q()}],"rotate-x":[{"rotate-x":q()}],"rotate-y":[{"rotate-y":q()}],"rotate-z":[{"rotate-z":q()}],scale:[{scale:X()}],"scale-x":[{"scale-x":X()}],"scale-y":[{"scale-y":X()}],"scale-z":[{"scale-z":X()}],"scale-3d":["scale-3d"],skew:[{skew:J()}],"skew-x":[{"skew-x":J()}],"skew-y":[{"skew-y":J()}],transform:[{transform:[yn,vn,"","none","gpu","cpu"]}],"transform-origin":[{origin:M()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:W()}],"translate-x":[{"translate-x":W()}],"translate-y":[{"translate-y":W()}],"translate-z":[{"translate-z":W()}],"translate-none":["translate-none"],accent:[{accent:K()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:K()}],"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",yn,vn]}],"field-sizing":[{"field-sizing":["fixed","content"]}
vendor: 4,448 bytes, line 1247
1247],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"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",yn,vn]}],fill:[{fill:["none",...K()]}],"stroke-w":[{stroke:[Sr,MA,Rg,IM]}],stroke:[{stroke:["none",...K()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],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-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}},Ggt=(e,{cacheSize:t,prefix:n,experimentalParseClassName:r,extend:i={},override:s={}})=>(bw(e,"cacheSize",t),bw(e,"prefix",n),bw(e,"experimentalParseClassName",r),DA(e.theme,s.theme),DA(e.classGroups,s.classGroups),DA(e.conflictingClassGroups,s.conflictingClassGroups),DA(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),bw(e,"orderSensitiveModifiers",s.orderSensitiveModifiers),FA(e.theme,i.theme),FA(e.classGroups,i.classGroups),FA(e.conflictingClassGroups,i.conflictingClassGroups),FA(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),dbe(e,i,"orderSensitiveModifiers"),e),bw=(e,t,n)=>{n!==void 0&&(e[t]=n)},DA=(e,t)=>
1247{if(t)for(const n in t)bw(e,n,t[n])},FA=(e,t)=>{if(t)for(const n in t)dbe(e,t,n)},dbe=(e,t,n)=>{const r=t[n];r!==void 0&&(e[n]=e[n]?e[n].concat(r):r)},Kgt=(e,...t)=>typeof e=="function"?uL(dL,e,...t):uL(()=>Ggt(dL(),e),...t),Ygt=uL(dL);var Xgt={twMerge:!0,twMergeConfig:{},responsiveVariants:!1},fbe=e=>e||void 0,RS=(...e)=>fbe(ebe(e).filter(Boolean).join(" ")),OM=null,Bf={},fL=!1,F_=(...e)=>t=>t.twMerge?((!OM||fL)&&(fL=!1,OM=tl(Bf)?Ygt:Kgt({...Bf,extend:{theme:Bf.theme,classGroups:Bf.classGroups,conflictingClassGroupModifiers:Bf.conflictingClassGroupModifiers,conflictingClassGroups:Bf.conflictingClassGroups,...Bf.extend}})),fbe(OM(RS(e)))):RS(e),Dte=(e,t)=>{for(let n in t)e.hasOwnProperty(n)?e[n]=RS(e[n],t[n]):e[n]=t[n];return e},Qgt=(e,t)=>{let{extend:n=null,slots:r={},variants:i={},compoundVariants:s=[],compoundSlots:a=[],defaultVariants:o={}}=e,c={...Xgt,...t},u=n!=null&&n.base?RS(n.base,e?.base):e?.base,d=n!=null&&n.variants&&!tl(n.variants)?nbe(i,n.variants):i,h=n!=null&&n.defaultVariants&&!tl(n.defaultVariants)?{...n.defaultVariants,...o}:o;!tl(c.twMergeConfig)&&!lgt(c.twMergeConfig,Bf)&&(fL=!0,Bf=c.twMergeConfig);let p=tl(n?.slots),g=tl(r)?{}:{base:RS(e?.base,p&&n?.base),...r},v=p?g:Dte({...n?.slots},tl(g)?{base:e?.base}:g),x=tl(n?.compoundVariants)?s:tbe(n?.compoundVariants,s),_=S=>{if(tl(d)&&tl(r)&&p)return F_(u,S?.class,S?.className)(c);if(x&&!Array.isArray(x))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof x}`);if(a&&!Array.isArray(a))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof a}`);let E=(U,G,Q=[],Z)=>{let K=Q;if(typeof G=="string")K=K.concat(Ite(G).split(" ").map(te=>`${U}:${te}`));else if(Array.isArray(G))K=K.concat(G.reduce((te,ne)=>te.concat(`${U}:${ne}`),[]));else if(typeof G=="object"&&typeof Z=="string"){for(let te in G)if(G.hasOwnProperty(te)&&te===Z){let ne=G[te];if(ne&&typeof ne=="string"){let se=Ite(ne);K[Z]?K[Z]=K[Z].concat(se.split(" ").map(H=>`${U}:${H}`)):K[Z]=se.split(" ").map(H=>`${U}:${H}`)}else Array.isArray(ne)&&ne.length>0&&(K[Z]=ne.reduce((se,H)=>se.concat(`${U}:${H}`),[]))}}return K},T=(U,G=d,Q=null,Z=null)=>{var K;let te=G[U];if(!te||tl(te))return null;let ne=(K=Z?.[U])!=null?K:S?.[U];if(ne===null)return null;let se=Rte(ne),H=Array.isArray(c.responsiveVariants)&&c.responsiveVariants.length>0||c.responsiveVariants===!0,O=h?.[U],L=[];if(typeof se=="object"&&H)for(let[X,J]of Object.entries(se)){let W=te[J];if(X==="initial"){O=J;continue}Array.isArray(c.responsiveVariants)&&!c.responsiveVariants.includes(X)||(L=E(X,W,L,Q))}let M=se!=null&&typeof se!="object"?se:Rte(O),q=te[M||"false"];return typeof L=="object"&&typeof Q=="string"&&L[Q]?Dte(L,q):L.length>0?(L.push(q),Q==="base"?L.join(" "):L):q},N=()=>d?Object.keys(d).map(U=>T(U,d)):null,A=(U,G)=>{if(!d||typeof d!="object")return null;let Q=new Array;for(let Z in d){let K=T(Z,d,U,G),te=U==="base"&&typeof K=="string"?K:K&&K[U];te&&(Q[Q.length]=te)}return Q},k={};for(let U in S)S[U]!==void 0&&(k[U]=S[U]);let j=(U,G)=>{var Q;let Z=typeof S?.[U]=="object"?{[U]:(Q=S[U])==null?void 0:Q.initial}:{};return{...h,...k,...Z,...G}},R=(U=[],G)=>{let Q=[];for(let{class:Z,className:K,...te}of U){let ne=!0;for(let[se,H]of Object.entries(te)){let O=j(se,G)[se];if(Array.isArray(H)){if(!H.includes(O)){ne=!1;break}}else{let L=M=>M==null||M===!1;if(L(H)&&L(O))continue;if(O!==H){ne=!1;break}}}ne&&(Z&&Q.push(Z),K&&Q.push(K))}return Q},P=U=>{let G=R(x,U);if(!Array.isArray(G))return G;let Q={};for(let Z of G)if(typeof Z=="string"&&(Q.base=F_(Q.base,Z)(c)),typeof Z=="object")for(let[K,te]of Object.entries(Z))Q[K]=F_(Q[K],te)(c);return Q},V=U=>{if(a.length<1)return null;let G={};for(let{slots:Q=[],class:Z,className:K,...te}of a){if(!tl(te)){let ne=!0;for(let se of Object.keys(te)){let H=j(se,U)[se];if(H===void 0||(Array.isArray(te[se])?!te[se].includes(H):te[se]!==H)){ne=!1;break}}if(!ne)continue}for(let ne of Q)G[ne]=G[ne]||[],G[ne].push([Z,K])}return G};if(!tl(r)||!p){let U={};if(typeof v=="object"&&!tl(v))for(let G of Object.keys(v))U[G]=Q=>{var Z,K;return F_(v[G],A(G,Q),((Z=P(Q))!=null?Z:[])[G],((K=V(Q))!=null?K:[])[G],Q?.class,Q?.className)(c)};return U}return F_(u,N(),R(x),S?.class,S?.className)(c)},w=()=>
1247{if(!(!d||typeof d!="object"))return Object.keys(d)};return _.variantKeys=w(),_.extend=n,_.base=u,_.slots=v,_.variants=d,_.defaultVariants=h,_.compoundSlots=a,_.compoundVariants=x,_};const Zgt=Qgt({base:"focus-visible:ring-ring inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium shadow-black/5 transition-all focus-visible:outline-none focus-visible:ring-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:scale-105 active:scale-100 text-chat-foreground",variants:{variant:{primary:"bg-chat-primary text-chat-primary-foreground hover:bg-chat-primary/80 active:bg-chat-primary/50 shadow-sm",secondary:"bg-chat-secondary text-chat-secondary-foreground hover:bg-chat-secondary/80 active:bg-chat-secondary/50 shadow-sm",destructive:"bg-chat-destructive text-chat-destructive-foreground hover:bg-chat-destructive/80 active:bg-chat-destructive/50 shadow-sm",outline:"border-chat-input-border bg-chat-background hover:bg-chat-accent active:bg-chat-accent/50 border shadow-sm text-chat-foreground",ghost:""},size:{xs:"h-7 gap-1.5 px-3 text-xs [&_svg]:size-3.5",sm:"h-8 gap-1.5 px-3.5 text-xs [&_svg]:size-4",md:"h-9 px-4 py-2 [&_svg]:size-5",lg:"[&_svg]:size-6 h-10 rounded-lg px-4",xl:"h-11 rounded-lg px-5 text-base [&_svg]:size-7"}},defaultVariants:{variant:"primary",size:"md"}}),zc=b.memo(b.forwardRef(({className:e,children:t,type:n="button",variant:r,size:i,asChild:s=!1,loading:a=!1,circle:o=!1,...c},u)=>{const d=s?sx:"button",h=a?l.jsxs(l.Fragment,{children:[l.jsx(Kr,{"data-uui-button-loader":!0,className:"animate-spin"}),t]}):t;return l.jsx(d,{type:s?void 0:n,className:or(Zgt({variant:r,size:i}),o&&"rounded-full",e),disabled:a,ref:u,...c,children:h})})),PM="flex h-10 w-full rounded-xl bg-chat-background px-3.5 text-sm text-chat-foreground shadow-sm ring-1 ring-chat-border/60 transition-shadow placeholder:text-muted-fg focus:outline-none focus:ring-2 focus:ring-chat-primary/40 disabled:opacity-60";function Jgt(e){switch(e){case"email":return"email";case"phone":return"tel";case"number":return"number";case"date":return"date";default:return"text"}}function hbe({artifact:e,onSubmit:t,previewMode:n=!1,disabled:r=!1,className:i,onSubmitFailed:s}){const{i18n:a,_:o}=Me(),[c,u]=b.useState(()=>Object.fromEntries(e.fields.map(E=>[E.name,""]))),[d,h]=b.useState({}),[p,g]=b.useState(!1),[v,x]=b.useState(!1),_=(E,T)=>{u(N=>({...N,[E]:T})),h(N=>{const A={...N};return delete A[E],A})},w=()=>{const E={};for(const T of e.fields){const N=c[T.name]?.trim()??"";if(T.required&&!N){E[T.name]=a._({id:"TMLAx2"});continue}if(N){if(T.type==="email"&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(N)){E[T.name]=a._({id:"B2Tpo0"});continue}if(T.validation)try{new RegExp(T.validation).test(N)||(E[T.name]=a._({id:"XI1+wb"}))}catch{}}}return E},S=async E=>{E.preventDefault();const T=w();if(h(T),Object.keys(T).length>0)return;const N=Object.fromEntries(e.fields.map(A=>[A.name,c[A.name]??""]));if(!(n||!t)){g(!0),x(!1);try{await t(N)}catch{x(!0),s?.()}finally{g(!1)}}};return l.jsxs("form",{className:or("flex flex-col gap-5 rounded-2xl bg-chat-background-secondary p-5 shadow-md",i),onSubmit:S,children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("h3",{className:"text-lg font-semibold text-chat-foreground",children:e.title}),e.description?l.jsx("p",{className:"text-sm leading-relaxed text-muted-fg",children:e.description}):null]}),l.jsx("div",{className:"flex flex-col gap-4",children:e.fields.map(E=>{const T=d[E.name],N=`form-field-${E.name}`;return l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs("label",{htmlFor:N,className:"text-sm font-medium text-chat-foreground",children:[E.label,E.required?l.jsx("span",{className:"text-danger",children:" *"}):null]}),E.type==="textarea"?l.jsx("textarea",{id:N,className:or(PM,"min-h-24 py-2.5"),value:c[E.name]??"",disabled:r||p,placeholder:E.placeholder,rows:3,onChange:A=>_(E.name,A.target.value)}):E.type==="select"?l.jsxs("select",{id:N,className:PM,value:c[E.name]??"",disabled:r||p,onChange:A=>_(E.name,A.target.value),children:[l.jsx("option",{value:"",children:a._({id:"v5FyiB"})}),(E.options??[]).map(A=>l.jsx("option",{value:A,children:A},A))]}):l.jsx("input",{id:N,className:PM,type:Jgt(E.type),value:c[E.name]??"",disabled:r||p,placeholder:E.placeholder,onChange:A=>_(E.name,A.target.value)}),T?l.jsx("p",{className:"text-xs text-danger",children:T}):null]},E.name)})}),v?l.jsx("p",{className:"text-xs text-danger",children:l.jsx(D,{id:"S0/3dd"})}
1247):null,l.jsx(zc,{type:"submit",disabled:r||p||n,loading:p,className:"w-full rounded-full",children:e.submitLabel||a._({id:"hQRttt"})}),n?l.jsx("p",{className:"text-xs text-muted-fg",children:l.jsx(D,{id:"ewh5E9"})}):null]})}function e0t(e){if(e.type!==Bm.Tool||!_E(e.artifact))return null;if(e.status==="pending")return"pending";const t=Rhe(e.content);return t==="canceled"?"canceled":t!==null?"submitted":e.status==="completed"?"canceled":null}function t0t(e){const t=Rhe(e.content);return t===null||t==="canceled"?null:t}function n0t(e){return e==null||e===""?"â":String(e)}function r0t({artifact:e,data:t,className:n}){return l.jsxs("div",{className:or("flex flex-col gap-4 rounded-2xl bg-chat-background-secondary p-5 shadow-md",n),children:[l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-full bg-chat-primary/15 text-chat-primary",children:l.jsx(Es,{className:"size-4",strokeWidth:2.5})}),l.jsxs("div",{className:"min-w-0 space-y-0.5",children:[l.jsx("p",{className:"font-semibold text-chat-foreground",children:e.title}),l.jsx("p",{className:"text-sm text-muted-fg",children:l.jsx(D,{id:"ZU3JQG"})})]})]}),l.jsx("dl",{className:"grid gap-3",children:e.fields.map(r=>l.jsxs("div",{className:"space-y-0.5",children:[l.jsx("dt",{className:"text-xs font-medium text-muted-fg",children:r.label}),l.jsx("dd",{className:"text-sm text-chat-foreground",children:n0t(t[r.name])})]},r.name))})]})}function i0t({artifact:e,className:t}){return l.jsxs("div",{className:or("flex items-start gap-3 rounded-2xl bg-chat-background-secondary p-5 shadow-md",t),children:[l.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-full bg-chat-muted/30 text-muted-fg",children:l.jsx(pl,{className:"size-4",strokeWidth:2.5})}),l.jsxs("div",{className:"min-w-0 space-y-0.5",children:[l.jsx("p",{className:"font-semibold text-chat-foreground",children:e.title}),l.jsx("p",{className:"text-sm text-muted-fg",children:l.jsx(D,{id:"GGWsTU"})})]})]})}function s0t({artifact:e,toolCall:t,state:n,error:r,onSubmit:i}){const s=e0t({...t,type:Bm.Tool,artifact:e});if(s==="canceled")return l.jsx(i0t,{artifact:e});if(s==="submitted"){const a=t0t({...t});return l.jsx(r0t,{artifact:e,data:a??{}})}return n==="error"?l.jsx(C4,{message:l.jsx(D,{id:"Jp2HtU"}),error:r}):n==="call"||n==="call-partial"?l.jsx(Q0,{loading:!0,children:l.jsx(D,{id:"SZaCjJ"})}):s!=="pending"||e.presentation==="overlay"?null:l.jsx(hbe,{artifact:e,onSubmit:async a=>{await i?.({toolName:t.name,toolCallId:t.id,data:a})}})}function Cx(e,t){const{validate:n=!0,onParseError:r,schema:i,position:s="before"}=e;return{component:t,schema:i,validate:n,onParseError:r,position:s}}const a0t=_e({}),o0t=Cx({schema:{args:a0t,artifact:R5},validate:!0},e=>!e.artifact||!_E(e.artifact)?null:l.jsx(s0t,{artifact:e.artifact,toolCall:e.toolCall,state:e.state,error:e.error,onSubmit:e.onSubmit}));function l0t(e){return _E(e)}function c0t(e){if(e.kind!=="form"&&!_E(e.artifact))return null;const t=o0t.component;return l.jsx(t,{toolCall:{id:e.toolCallId,name:e.toolName,type:Bm.Tool,args:{},index:0,content:e.content,artifact:e.artifact,status:e.toolCallStatus},state:e.state,artifact:e.artifact,error:e.error,onSubmit:e.onSubmit})}const Qm=b.createContext({variant:"primary",position:"left"}),u0t=b.memo(function({}){return l.jsxs("div",{className:"flex items-center justify-center gap-2","data-testid":"typing-indicator",children:[l.jsx("span",{className:"sr-only",children:l.jsx(D,{id:"Z3FXyt"})}),l.jsx("div",{className:"size-2.5 animate-bounce rounded-full bg-chat-foreground [animation-delay:-0.3s]"}),l.jsx("div",{className:"size-2.5 animate-bounce rounded-full bg-chat-foreground [animation-delay:-0.15s]"}),l.jsx("div",{className:"size-2.5 animate-bounce rounded-full bg-chat-foreground"})]})});function d0t({variant:e="primary",position:t="left",children:n,className:r}){const i=b.useMemo(()=>({variant:e,position:t}),[e,t]);return l.jsx(Qm.Provider,{value:i,children:l.jsx("div",{className:or("flex flex-col gap-1",t==="right"?"items-end":"items-start",r),children:n})})}function f0t({children:e,className:t}){const{position:n}=b.useContext(Qm);return l.jsx("div",{className:or("text-sm font-medium",n==="right"?"text-right":"text-left",t),"data-testid":"message-header",children:e})}function h0t({children:e,className:t}){const{position:n}=b.useContext(Qm);return l.jsx("div",{className:or("flex items-start gap-2 max-w-[90%]",n==="right"?"flex-row-reverse":"flex-row",t),children:e})}function p0t({children:e,className:t}){const{position:n}=b.useContext(Qm);return l.jsx("div",{className:or("flex items-end gap-2",n==="right"?"flex-row-reverse":"flex-row",t),children:e})}function m0t({children:e,className:t}){const{position:n}=b.useContext(Qm);return l.jsx("div",{className:or("flex min-w-0 flex-col gap-2 max-w-full",{"items-end":n==="right","items-start":n==="left"},t),children:e})}const pbe=b.memo(({children:e,className:t})=>{const{variant:n,position:r}=b.useContext(Qm);return l.jsx("div",{className:or("min-h-11 min-w-0 max-w-full text-[15px] px-3.5 py-3 [overflow-wrap:anywhere] [&>*:last-child]:mb-0 [&>*:first-child]:mt-0 text-chat-foreground",{"bg-chat-primary text-chat-primary-foreground":n==="primary","bg-chat-background-secondary":n==="secondary","bg-chat-background-secondary border-chat-primary border":n==="tertiary"},"rounded-3xl",r==="right"?"[&:not(:first-child)]:rounded-tr-md [&:not(:last-child)]:rounded-br-md rounded-bl-3xl":"[&:not(:first-child)]:rounded-tl-md [&:not(:last-child)]:rounded-bl-md rounded-br-3xl",t),"data-testid":"message",children:e})});function g0t({children:e,className:t}){const{position:n}=b.useContext(Qm);return l.jsx("div",{className:or("flex flex-col gap-0.5",n==="right"?"items-end":"items-start",t),children:e})}function x0t({children:e,className:t}){return l.jsx("div",{className:or("shrink-0",t),children:e})}function v0t({children:e,className:t}){const{position:n}=b.useContext(Qm);return l.jsx("div",{className:or("text-xs text-chat-muted-foreground mt-1",n==="right"?"text-right":"text-left",t),"data-testid":"message-footer",children:e})}function y0t({className:e}){return l.jsx(pbe,{className:or("min-h-12 flex items-center",e),children:l.jsx(u0t,{})})}const Cr={Root:d0t,Header:f0t,Sidebar:p0t,Content:m0t,Wrapper:h0t,Bubble:pbe,BubbleGroup:g0t,Avatar:x0t,Footer:v0t,Typing:y0t},Fte=$g.avatar,mbe=b.memo(function({className:t,src:n,alt:r,fallback:i}){return l.jsx("div",{className:or("size-8 overflow-hidden rounded-full bg-transparent object-cover flex items-center justify-center",t),children:n?l.jsx("img",{alt:r??"",src:n,width:Fte.width,height:Fte.height,className:"size-full object-cover","data-testid":"message-avatar"}):i?l.jsx("div",{className:"flex size-full items-center justify-center bg-chat-background-secondary text-foreground",children:l.jsx("span",{className:"text-xs font-medium",children:i})}):l.jsxs("svg",{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("circle",{cx:"16",cy:"16",r:"16",fill:"#ccc"}),l.jsx("circle",{cx:"16",cy:"10",r:"6",fill:"#242424"}),l.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.379 26.998C5.712 21.823 10.409 18 16 18c5.59 0 10.288 3.823 11.621 8.998A15.955 15.955 0 0 1 16 32a15.955 15.955 0 0 1-11.621-5.002z",fill:"#242424"})]})})}),b0t=b.memo(({group:e,position:t="left",variant:n="tertiary"})=>{const{messages:r,createdAt:i}=e,s=AB(i),{user:a}=r.at(-1)??{};if(!a)return null;const o=yt.fullName(a);return l.jsxs(Cr.Root,{variant:n,position:t,children:[l.jsx(Cr.Header,{children:o}),l.jsxs(Cr.Wrapper,{children:[l.jsx(Cr.Sidebar,{children:l.jsx(Cr.Avatar,{children:l.jsx(mbe,{fallback:yt.initials(o)})})}),l.jsx(Cr.Content,{children:l.jsx(Cr.BubbleGroup,{children:r.map(c=>l.jsx(Cr.Bubble,{children:c.content},c.id))})})]}),l.jsx(Cr.Footer,{children:s})]})}),gbe=or("flex max-w-full items-center gap-1.5 text-left text-xs leading-snug text-chat-muted-foreground"),_0t=or(gbe,"cursor-pointer transition-colors hover:text-chat-foreground hover:underline"),w0t=b.memo(({questions:e,onSelect:t})=>e.length===0?null:l.jsx("div",{className:"mt-2.5 flex flex-col items-start gap-1 border-t border-chat-border/40 pt-2.5",children:e.map(n=>t?l.jsxs("button",{type:"button",className:_0t,onClick:()=>t(n),children:[l.jsx(E6,{className:"size-3 shrink-0 opacity-60"}),l.jsx("span",{children:n})]},n):l.jsxs("span",{className:gbe,children:[l.jsx(E6,{className:"size-3 shrink-0 opacity-60"}),l.jsx("span",{children:n})]},n))})),S0t=b.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:or("rounded-xl border bg-card text-card-foreground shadow",e),...t})),E0t=b.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:or("font-semibold leading-none tracking-tight",e),...t})),C0t=b.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:or("p-4 pt-0",e),...t})),L1={Root:S0t,Title:E0t,Content:C0t};function T0t(e){return Object.prototype.toString.call(e)==="[object Object]"}function Lte(e){return T0t(e)||Array.isArray(e)}function A0t(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function PB(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const i=JSON.stringify(Object.keys(e.breakpoints||{})),s=JSON.stringify(Object.keys(t.breakpoints||{}));return i!==s?!1:n.every(a=>{const o=e[a],c=t[a];return typeof o=="function"?`${o}`==`${c}`:!Lte(o)||!Lte(c)?o===c:PB(o,c)})}function zte(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function k0t(e,t){if(e.length!==t.length)return!1;const n=zte(e),r=zte(t);return n.every((i,s)=>{const a=r[s];return PB(i,a)})}function MB(e){return typeof e=="number"}function hL(e){return typeof e=="string"}function N4(e){return typeof e=="boolean"}function $te(e){return Object.prototype.toString.call(e)==="[object Object]"}function cs(e){return Math.abs(e)}function DB(e){return Math.sign(e)}function t2(e,t){return cs(e-t)}function N0t(e,t){if(e===0||t===0||cs(e)<=cs(t))return 0;const n=t2(cs(e),cs(t));return cs(n/e)}function j0t(e){return Math.round(e*100)/100}function IS(e){return OS(e).map(Number)}function Au(e){return e[JE(e)]}function JE(e){return Math.max(0,e.length-1)}function FB(e,t){return t===JE(e)}function Bte(e,t=0){return Array.from(Array(e),(n,r)=>t+r)}function OS(e){return Object.keys(e)}function xbe(e,t){return[e,t].reduce((n,r)=>(OS(r).forEach(i=>
vendor: 18,051 bytes, line 1247
1247{const s=n[i],a=r[i],o=$te(s)&&$te(a);n[i]=o?xbe(s,a):a}),n),{})}function pL(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function R0t(e,t){const n={start:r,center:i,end:s};function r(){return 0}function i(c){return s(c)/2}function s(c){return t-c}function a(c,u){return hL(e)?n[e](c):e(t,c,u)}return{measure:a}}function PS(){let e=[];function t(i,s,a,o={passive:!0}){let c;if("addEventListener"in i)i.addEventListener(s,a,o),c=()=>i.removeEventListener(s,a,o);else{const u=i;u.addListener(a),c=()=>u.removeListener(a)}return e.push(c),r}function n(){e=e.filter(i=>i())}const r={add:t,clear:n};return r}function I0t(e,t,n,r){const i=PS(),s=1e3/60;let a=null,o=0,c=0;function u(){i.add(e,"visibilitychange",()=>{e.hidden&&v()})}function d(){g(),i.clear()}function h(_){if(!c)return;a||(a=_,n(),n());const w=_-a;for(a=_,o+=w;o>=s;)n(),o-=s;const S=o/s;r(S),c&&(c=t.requestAnimationFrame(h))}function p(){c||(c=t.requestAnimationFrame(h))}function g(){t.cancelAnimationFrame(c),a=null,o=0,c=0}function v(){a=null,o=0}return{init:u,destroy:d,start:p,stop:g,update:n,render:r}}function O0t(e,t){const n=t==="rtl",r=e==="y",i=r?"y":"x",s=r?"x":"y",a=!r&&n?-1:1,o=d(),c=h();function u(v){const{height:x,width:_}=v;return r?x:_}function d(){return r?"top":n?"right":"left"}function h(){return r?"bottom":n?"left":"right"}function p(v){return v*a}return{scroll:i,cross:s,startEdge:o,endEdge:c,measureSize:u,direction:p}}function Z0(e=0,t=0){const n=cs(e-t);function r(u){return u<e}function i(u){return u>t}function s(u){return r(u)||i(u)}function a(u){return s(u)?r(u)?e:t:u}function o(u){return n?u-n*Math.ceil((u-t)/n):u}return{length:n,max:t,min:e,constrain:a,reachedAny:s,reachedMax:i,reachedMin:r,removeOffset:o}}function vbe(e,t,n){const{constrain:r}=Z0(0,e),i=e+1;let s=a(t);function a(p){return n?cs((i+p)%i):r(p)}function o(){return s}function c(p){return s=a(p),h}function u(p){return d().set(o()+p)}function d(){return vbe(e,o(),n)}const h={get:o,set:c,add:u,clone:d};return h}function P0t(e,t,n,r,i,s,a,o,c,u,d,h,p,g,v,x,_,w,S){const{cross:E,direction:T}=e,N=["INPUT","SELECT","TEXTAREA"],A={passive:!1},k=PS(),j=PS(),R=Z0(50,225).constrain(g.measure(20)),P={mouse:300,touch:400},V={mouse:500,touch:600},U=v?43:25;let G=!1,Q=0,Z=0,K=!1,te=!1,ne=!1,se=!1;function H(fe){if(!S)return;function xe(Fe){(N4(S)||S(fe,Fe))&&J(Fe)}const ke=t;k.add(ke,"dragstart",Fe=>Fe.preventDefault(),A).add(ke,"touchmove",()=>{},A).add(ke,"touchend",()=>{}).add(ke,"touchstart",xe).add(ke,"mousedown",xe).add(ke,"touchcancel",re).add(ke,"contextmenu",re).add(ke,"click",ae,!0)}function O(){k.clear(),j.clear()}function L(){const fe=se?n:t;j.add(fe,"touchmove",W,A).add(fe,"touchend",re).add(fe,"mousemove",W,A).add(fe,"mouseup",re)}function M(fe){const xe=fe.nodeName||"";return N.includes(xe)}function q(){return(v?V:P)[se?"mouse":"touch"]}function X(fe,xe){const ke=h.add(DB(fe)*-1),Fe=d.byDistance(fe,!v).distance;return v||cs(fe)<R?Fe:_&&xe?Fe*.5:d.byIndex(ke.get(),0).distance}function J(fe){const xe=pL(fe,r);se=xe,ne=v&&xe&&!fe.buttons&&G,G=t2(i.get(),a.get())>=2,!(xe&&fe.button!==0)&&(M(fe.target)||(K=!0,s.pointerDown(fe),u.useFriction(0).useDuration(0),i.set(a),L(),Q=s.readPoint(fe),Z=s.readPoint(fe,E),p.emit("pointerDown")))}function W(fe){if(!pL(fe,r)&&fe.touches.length>=2)return re(fe);const ke=s.readPoint(fe),Fe=s.readPoint(fe,E),tt=t2(ke,Q),Se=t2(Fe,Z);if(!te&&!se&&(!fe.cancelable||(te=tt>Se,!te)))return re(fe);const et=s.pointerMove(fe);tt>x&&(ne=!0),u.useFriction(.3).useDuration(.75),o.start(),i.add(T(et)),fe.preventDefault()}function re(fe){const ke=d.byDistance(0,!1).index!==h.get(),Fe=s.pointerUp(fe)*q(),tt=X(T(Fe),ke),Se=N0t(Fe,tt),et=U-10*Se,pt=w+Se/50;te=!1,K=!1,j.clear(),u.useDuration(et).useFriction(pt),c.distance(tt,!v),se=!1,p.emit("pointerUp")}function ae(fe){ne&&(fe.stopPropagation(),fe.preventDefault(),ne=!1)}function ce(){return K}return{init:H,destroy:O,pointerDown:ce}}function M0t(e,t){let r,i;function s(h){return h.timeStamp}function a(h,p){const v=`client${(p||e.scroll)==="x"?"X":"Y"}`;return(pL(h,t)?h:h.touches[0])[v]}function o(h){return r=h,i=h,a(h)}function c(h){const p=a(h)-a(i),g=s(h)-s(r)>170;return i=h,g&&(r=h),p}function u(h){if(!r||!i)return 0;const p=a(i)-a(r),g=s(h)-s(r),v=s(h)-s(i)>170,x=p/g;return g&&!v&&cs(x)>.1?x:0}return{pointerDown:o,pointerMove:c,pointerUp:u,readPoint:a}}function D0t(){function e(n){const{offsetTop:r,offsetLeft:i,offsetWidth:s,offsetHeight:a}=n;return{top:r,right:i+s,bottom:r+a,left:i,width:s,height:a}}return{measure:e}}function F0t(e){function t(r){return e*(r/100)}return{measure:t}}function L0t(e,t,n,r,i,s,a){const o=[e].concat(r);let c,u,d=[],h=!1;function p(_){return i.measureSize(a.measure(_))}function g(_){if(!s)return;u=p(e),d=r.map(p);function w(S){for(const E of S){if(h)return;const T=E.target===e,N=r.indexOf(E.target),A=T?u:d[N],k=p(T?e:r[N]);if(cs(k-A)>=.5){_.reInit(),t.emit("resize");break}}}c=new ResizeObserver(S=>{(N4(s)||s(_,S))&&w(S)}),n.requestAnimationFrame(()=>{o.forEach(S=>c.observe(S))})}function v(){h=!0,c&&c.disconnect()}return{init:g,destroy:v}}function z0t(e,t,n,r,i,s){let a=0,o=0,c=i,u=s,d=e.get(),h=0;function p(){const A=r.get()-e.get(),k=!c;let j=0;return k?(a=0,n.set(r),e.set(r),j=A):(n.set(e),a+=A/c,a*=u,d+=a,e.add(a),j=d-h),o=DB(j),h=d,N}function g(){const A=r.get()-t.get();return cs(A)<.001}function v(){return c}function x(){return o}function _(){return a}function w(){return E(i)}function S(){return T(s)}function E(A){return c=A,N}function T(A){return u=A,N}const N={direction:x,duration:v,velocity:_,seek:p,settled:g,useBaseFriction:S,useBaseDuration:w,useFriction:T,useDuration:E};return N}function $0t(e,t,n,r,i){const s=i.measure(10),a=i.measure(50),o=Z0(.1,.99);let c=!1;function u(){return!(c||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function d(g){if(!u())return;const v=e.reachedMin(t.get())?"min":"max",x=cs(e[v]-t.get()),_=n.get()-t.get(),w=o.constrain(x/a);n.subtract(_*w),!g&&cs(_)<s&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function h(g){c=!g}return{shouldConstrain:u,constrain:d,toggleActive:h}}function B0t(e,t,n,r,i){const s=Z0(-t+e,0),a=h(),o=d(),c=p();function u(v,x){return t2(v,x)<=1}function d(){const v=a[0],x=Au(a),_=a.lastIndexOf(v),w=a.indexOf(x)+1;return Z0(_,w)}function h(){return n.map((v,x)=>{const{min:_,max:w}=s,S=s.constrain(v),E=!x,T=FB(n,x);return E?w:T||u(_,S)?_:u(w,S)?w:S}).map(v=>parseFloat(v.toFixed(3)))}function p(){if(t<=e+i)return[s.max];if(r==="keepSnaps")return a;const{min:v,max:x}=o;return a.slice(v,x)}return{snapsContained:c,scrollContainLimit:o}}function U0t(e,t,n){const r=t[0],i=n?r-e:Au(t);return{limit:Z0(i,r)}}function V0t(e,t,n,r){const s=t.min+.1,a=t.max+.1,{reachedMin:o,reachedMax:c}=Z0(s,a);function u(p){return p===1?c(n.get()):p===-1?o(n.get()):!1}function d(p){if(!u(p))return;const g=e*(p*-1);r.forEach(v=>v.add(g))}return{loop:d}}function H0t(e){const{max:t,length:n}=e;function r(s){const a=s-t;return n?a/-n:0}return{get:r}}function q0t(e,t,n,r,i){const{startEdge:s,endEdge:a}=e,{groupSlides:o}=i,c=h().map(t.measure),u=p(),d=g();function h(){return o(r).map(x=>Au(x)[a]-x[0][s]).map(cs)}function p(){return r.map(x=>n[s]-x[s]).map(x=>-cs(x))}function g(){return o(u).map(x=>x[0]).map((x,_)=>x+c[_])}return{snaps:u,snapsAligned:d}}function W0t(e,t,n,r,i,s){const{groupSlides:a}=i,{min:o,max:c}=r,u=d();function d(){const p=a(s),g=!e||t==="keepSnaps";return n.length===1?[s]:g?p:p.slice(o,c).map((v,x,_)=>{const w=!x,S=FB(_,x);if(w){const E=Au(_[0])+1;return Bte(E)}if(S){const E=JE(s)-Au(_)[0]+1;return Bte(E,Au(_)[0])}return v})}return{slideRegistry:u}}function G0t(e,t,n,r,i){const{reachedAny:s,removeOffset:a,constrain:o}=r;function c(v){return v.concat().sort((x,_)=>cs(x)-cs(_))[0]}function u(v){const x=e?a(v):o(v),_=t.map((S,E)=>({diff:d(S-x,0),index:E})).sort((S,E)=>cs(S.diff)-cs(E.diff)),{index:w}=_[0];return{index:w,distance:x}}function d(v,x){const _=[v,v+n,v-n];if(!e)return v;if(!x)return c(_);const w=_.filter(S=>DB(S)===x);return w.length?c(w):Au(_)-n}function h(v,x){const _=t[v]-i.get(),w=d(_,x);return{index:v,distance:w}}function p(v,x){const _=i.get()+v,{index:w,distance:S}=u(_),E=!e&&s(_);if(!x||E)return{index:w,distance:v};const T=t[w]-S,N=v+d(T,0);return{index:w,distance:N}}return{byDistance:p,byIndex:h,shortcut:d}}function K0t(e,t,n,r,i,s,a){function o(h){const p=h.distance,g=h.index!==t.get();s.add(p),p&&(r.duration()?e.start():(e.update(),e.render(1),e.update())),g&&(n.set(t.get()),t.set(h.index),a.emit("select"))}function c(h,p){const g=i.byDistance(h,p);o(g)}function u(h,p){const g=t.clone().set(h),v=i.byIndex(g.get(),p);o(v)}return{distance:c,index:u}}function Y0t(e,t,n,r,i,s,a,o){const c={passive:!0,capture:!0};let u=0;function d(g){if(!o)return;function v(x){if(new Date().getTime()-u>10)return;a.emit("slideFocusStart"),e.scrollLeft=0;const S=n.findIndex(E=>E.includes(x));MB(S)&&(i.useDuration(0),r.index(S,0),a.emit("slideFocus"))}s.add(document,"keydown",h,!1),t.forEach((x,_)=>{s.add(x,"focus",w=>{(N4(o)||o(g,w))&&v(_)},c)})}function h(g){g.code==="Tab"&&(u=new Date().getTime())}return{init:d}}function _w(e){let t=e;function n(){return t}function r(c){t=a(c)}function i(c){t+=a(c)}function s(c){t-=a(c)}function a(c){return MB(c)?c:c.get()}return{get:n,set:r,add:i,subtract:s}}function ybe(e,t){const n=e.scroll==="x"?a:o,r=t.style;let i=null,s=!1;function a(p){return`translate3d(${p}px,0px,0px)`}function o(p){return`translate3d(0px,${p}px,0px)`}function c(p){if(s)return;const g=j0t(e.direction(p));g!==i&&(r.transform=n(g),i=g)}function u(p){s=!p}function d(){s||(r.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:d,to:c,toggleActive:u}}function X0t(e,t,n,r,i,s,a,o,c){const d=IS(i),h=IS(i).reverse(),p=w().concat(S());function g(k,j){return k.reduce((R,P)=>R-i[P],j)}function v(k,j){return k.reduce((R,P)=>g(R,j)>0?R.concat([P]):R,[])}function x(k){return s.map((j,R)=>({start:j-r[R]+.5+k,end:j+t-.5+k}))}function _(k,j,R){const P=x(j);return k.map(V=>{const U=R?0:-n,G=R?n:0,Q=R?"end":"start",Z=P[V][Q];return{index:V,loopPoint:Z,slideLocation:_w(-1),translate:ybe(e,c[V]),target:()=>o.get()>Z?U:G}})}function w(){const k=a[0],j=v(h,k);return _(j,n,!1)}function S(){const k=t-a[0]-1,j=v(d,k);return _(j,-n,!0)}function E(){return p.every(({index:k})=>{const j=d.filter(R=>R!==k);return g(j,t)<=.1})}function T(){p.forEach(k=>{const{target:j,translate:R,slideLocation:P}=k,V=j();V!==P.get()&&(R.to(V),P.set(V))})}function N(){p.forEach(k=>k.translate.clear())}return{canLoop:E,clear:N,loop:T,loopPoints:p}}function Q0t(e,t,n){let r,i=!1;function s(c){if(!n)return;function u(d){for(const h of d)if(h.type==="childList"){c.reInit(),t.emit("slidesChanged");break}}r=new MutationObserver(d=>{i||(N4(n)||n(c,d))&&u(d)}),r.observe(e,{childList:!0})}function a(){r&&r.disconnect(),i=!0}return{init:s,destroy:a}}function Z0t(e,t,n,r){const i={};let s=null,a=null,o,c=!1;function u(){o=new IntersectionObserver(v=>{c||(v.forEach(x=>{const _=t.indexOf(x.target);i[_]=x}),s=null,a=null,n.emit("slidesInView"))},{root:e.parentElement,threshold:r}),t.forEach(v=>o.observe(v))}function d(){o&&o.disconnect(),c=!0}function h(v){return OS(i).reduce((x,_)=>{const w=parseInt(_),{isIntersecting:S}=i[w];return(v&&S||!v&&!S)&&x.push(w),x},[])}function p(v=!0){if(v&&s)return s;if(!v&&a)return a;const x=h(v);return v&&(s=x),v||(a=x),x}return{init:u,destroy:d,get:p}}function J0t(e,t,n,r,i,s){const{measureSize:a,startEdge:o,endEdge:c}=e,u=n[0]&&i,d=v(),h=x(),p=n.map(a),g=_();function v(){if(!u)return 0;const S=n[0];return cs(t[o]-S[o])}function x(){if(!u)return 0;const S=s.getComputedStyle(Au(r));return parseFloat(S.getPropertyValue(`margin-${c}`))}function _(){return n.map((S,E,T)=>{const N=!E,A=FB(T,E);return N?p[E]+d:A?p[E]+h:T[E+1][o]-S[o]}).map(cs)}return{slideSizes:p,slideSizesWithGaps:g,startGap:d,endGap:h}}function ext(e,t,n,r,i,s,a,o,c){const{startEdge:u,endEdge:d,direction:h}=e,p=MB(n);function g(w,S){return IS(w).filter(E=>E%S===0).map(E=>w.slice(E,E+S))}function v(w){return w.length?IS(w).reduce((S,E,T)=>{const N=Au(S)||0,A=N===0,k=E===JE(w),j=i[u]-s[N][u],R=i[u]-s[E][d],P=!r&&A?h(a):0,V=!r&&k?h(o):0,U=cs(R-V-(j+P));return T&&U>t+c&&S.push(E),k&&S.push(w.length),S},[]).map((S,E,T)=>{const N=Math.max(T[E-1]||0);return w.slice(N,S)}):[]}function x(w){return p?g(w,n):v(w)}return{groupSlides:x}}function txt(e,t,n,r,i,s,a){const{align:o,axis:c,direction:u,startIndex:d,loop:h,duration:p,dragFree:g,dragThreshold:v,inViewThreshold:x,slidesToScroll:_,skipSnaps:w,containScroll:S,watchResize:E,watchSlides:T,watchDrag:N,watchFocus:A}=s,k=2,j=D0t(),R=j.measure(t),P=n.map(j.measure),V=O0t(c,u),U=V.measureSize(R),G=F0t(U),Q=R0t(o,U),Z=!h&&!!S,K=h||!!S,{slideSizes:te,slideSizesWithGaps:ne,startGap:se,endGap:H}=J0t(V,R,P,n,K,i),O=ext(V,U,_,h,R,P,se,H,k),{snaps:L,snapsAligned:M}=q0t(V,Q,R,P,O),q=-Au(L)+Au(ne),{snapsContained:X,scrollContainLimit:J}=B0t(U,q,M,S,k),W=Z?X:M,{limit:re}=U0t(q,W,h),ae=vbe(JE(W),d,h),ce=ae.clone(),Te=IS(n),fe=({dragHandler:Ut,scrollBody:Ht,scrollBounds:Rt,options:{loop:Ct}})=>{Ct||Rt.constrain(Ut.pointerDown()),Ht.seek()},xe=({scrollBody:Ut,translate:Ht,location:Rt,offsetLocation:Ct,previousLocation:Wt,scrollLooper:Tn,slideLooper:Ie,dragHandler:dt,animation:$t,eventHandler:Mn,scrollBounds:Ve,options:{loop:ct}},Gt)=>{const Cn=Ut.settled(),Zr=!Ve.shouldConstrain(),rn=ct?Cn:Cn&&Zr,_n=rn&&!dt.pointerDown();_n&&$t.stop();const Hn=Rt.get()*Gt+Wt.get()*(1-Gt);Ct.set(Hn),ct&&(Tn.loop(Ut.direction()),Ie.loop()),Ht.to(Ct.get()),_n&&Mn.emit("settle"),rn||Mn.emit("scroll")},ke=I0t(r,i,()=>fe(St),Ut=>xe(St,Ut)),Fe=.68,tt=W[ae.get()],Se=_w(tt),et=_w(tt),pt=_w(tt),ie=_w(tt),ue=z0t(Se,pt,et,ie,p,Fe),Ne=G0t(h,W,q,re,ie),De=K0t(ke,ae,ce,ue,Ne,ie,a),be=H0t(re),me=PS(),we=Z0t(t,n,a,x),{slideRegistry:Le}=W0t(Z,S,W,J,O,Te),oe=Y0t(e,n,Le,De,ue,me,a,A),St={ownerDocument:r,ownerWindow:i,eventHandler:a,containerRect:R,slideRects:P,animation:ke,axis:V,dragHandler:P0t(V,e,r,i,ie,M0t(V,i),Se,ke,De,ue,Ne,ae,a,G,g,v,w,Fe,N),eventStore:me,percentOfView:G,index:ae,indexPrevious:ce,limit:re,location:Se,offsetLocation:pt,previousLocation:et,options:s,resizeHandler:L0t(t,a,i,n,V,E,j),scrollBody:ue,scrollBounds:$0t(re,pt,ie,ue,G),scrollLooper:V0t(q,re,pt,[Se,pt,et,ie]),scrollProgress:be,scrollSnapList:W.map(be.get),scrollSnaps:W,scrollTarget:Ne,scrollTo:De,slideLooper:X0t(V,U,q,te,ne,L,W,pt,n),slideFocus:oe,slidesHandler:Q0t(t,a,T),slidesInView:we,slideIndexes:Te,slideRegistry:Le,slidesToScroll:O,target:ie,translate:ybe(V,t)};return St}function nxt(){let e={},t;function n(u){t=u}function r(u){return e[u]||[]}function i(u){return r(u).forEach(d=>d(t,u)),c}function s(u,d){return e[u]=r(u).concat([d]),c}function a(u,d){return e[u]=r(u).filter(h=>h!==d),c}function o(){e={}}const c={init:n,emit:i,off:a,on:s,clear:o};return c}const rxt={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function ixt(e){function t(s,a){return xbe(s,a||{})}function n(s){const a=s.breakpoints||{},o=OS(a).filter(c=>e.matchMedia(c).matches).map(c=>a[c]).reduce((c,u)=>t(c,u),{});return t(s,o)}function r(s){return s.map(a=>OS(a.breakpoints||{})).reduce((a,o)=>a.concat(o),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function sxt(e){let t=[];function n(s,a){return t=a.filter(({options:o})=>e.optionsAtMedia(o).active!==!1),t.forEach(o=>o.init(s,e)),a.reduce((o,c)=>Object.assign(o,{[c.name]:c}),{})}function r(){t=t.filter(s=>s.destroy())}return{init:n,destroy:r}}function W3(e,t,n){const r=e.ownerDocument,i=r.defaultView,s=ixt(i),a=sxt(s),o=PS(),c=nxt(),{mergeOptions:u,optionsAtMedia:d,optionsMediaQueries:h}=s,{on:p,off:g,emit:v}=c,x=V;let _=!1,w,S=u(rxt,W3.globalOptions),E=u(S),T=[],N,A,k;function j(){const{container:Te,slides:fe}=E;A=(hL(Te)?e.querySelector(Te):Te)||e.children[0];const ke=hL(fe)?A.querySelectorAll(fe):fe;k=[].slice.call(ke||A.children)}function R(Te){const fe=txt(e,A,k,r,i,Te,c);if(Te.loop&&!fe.slideLooper.canLoop()){const xe=Object.assign({},Te,{loop:!1});return R(xe)}return fe}function P(Te,fe){_||(S=u(S,Te),E=d(S),T=fe||T,j(),w=R(E),h([S,...T.map(({options:xe})=>xe)]).forEach(xe=>o.add(xe,"change",V)),E.active&&(w.translate.to(w.location.get()),w.animation.init(),w.slidesInView.init(),w.slideFocus.init(ce),w.eventHandler.init(ce),w.resizeHandler.init(ce),w.slidesHandler.init(ce),w.options.loop&&w.slideLooper.loop(),A.offsetParent&&k.length&&w.dragHandler.init(ce),N=a.init(ce,T)))}function V(Te,fe){const xe=O();U(),P(u({startIndex:xe},Te),fe),c.emit("reInit")}function U(){w.dragHandler.destroy(),w.eventStore.clear(),w.translate.clear(),w.slideLooper.clear(),w.resizeHandler.destroy(),w.slidesHandler.destroy(),w.slidesInView.destroy(),w.animation.destroy(),a.destroy(),o.clear()}function G(){_||(_=!0,o.clear(),U(),c.emit("destroy"),c.clear())}function Q(Te,fe,xe){!E.active||_||(w.scrollBody.useBaseFriction().useDuration(fe===!0?0:E.duration),w.scrollTo.index(Te,xe||0))}function Z(Te){const fe=w.index.add(1).get();Q(fe,Te,-1)}function K(Te){const fe=w.index.add(-1).get();Q(fe,Te,1)}function te(){return w.index.add(1).get()!==O()}function ne(){return w.index.add(-1).get()!==O()}function se(){return w.scrollSnapList}function H(){return w.scrollProgress.get(w.offsetLocation.get())}function O(){return w.index.get()}function L(){return w.indexPrevious.get()}function M(){return w.slidesInView.get()}function q(){return w.slidesInView.get(!1)}function X(){return N}function J(){return w}function W(){return e}function re(){return A}function ae(){return k}const ce={canScrollNext:te,canScrollPrev:ne,containerNode:re,internalEngine:J,destroy:G,off:g,on:p,emit:v,plugins:X,previousScrollSnap:L,reInit:x,rootNode:W,scrollNext:Z,scrollPrev:K,scrollProgress:H,scrollSnapList:se,scrollTo:Q,selectedScrollSnap:O,slideNodes:ae,slidesInView:M,slidesNotInView:q};return P(t,n),setTimeout(()=>
1247c.emit("init"),0),ce}W3.globalOptions=void 0;function LB(e={},t=[]){const n=b.useRef(e),r=b.useRef(t),[i,s]=b.useState(),[a,o]=b.useState(),c=b.useCallback(()=>{i&&i.reInit(n.current,r.current)},[i]);return b.useEffect(()=>{PB(n.current,e)||(n.current=e,c())},[e,c]),b.useEffect(()=>{k0t(r.current,t)||(r.current=t,c())},[t,c]),b.useEffect(()=>{if(A0t()&&a){W3.globalOptions=LB.globalOptions;const u=W3(a,n.current,r.current);return s(u),()=>u.destroy()}else s(void 0)},[a,s]),[o,i]}LB.globalOptions=void 0;const bbe=b.createContext(null);function j4(){const e=b.useContext(bbe);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}const axt=b.forwardRef(({orientation:e="horizontal",opts:t,setApi:n,plugins:r,className:i,children:s,...a},o)=>{const[c,u]=LB({...t,axis:e==="horizontal"?"x":"y"},r),[d,h]=b.useState(!1),[p,g]=b.useState(!1),v=b.useCallback(E=>{E&&(h(E.canScrollPrev()),g(E.canScrollNext()))},[]),x=b.useCallback(()=>{u?.scrollPrev()},[u]),_=b.useCallback(()=>{u?.scrollNext()},[u]),w=b.useCallback(E=>{E.key==="ArrowLeft"?(E.preventDefault(),x()):E.key==="ArrowRight"&&(E.preventDefault(),_())},[x,_]);b.useEffect(()=>{!u||!n||n(u)},[u,n]),b.useEffect(()=>{if(u)return v(u),u.on("reInit",v),u.on("select",v),()=>{u?.off("select",v)}},[u,v]);const S=b.useMemo(()=>({carouselRef:c,api:u,opts:t,orientation:e||(t?.axis==="y"?"vertical":"horizontal"),scrollPrev:x,scrollNext:_,canScrollPrev:d,canScrollNext:p}),[c,u,t,e,x,_,d,p]);return l.jsx(bbe.Provider,{value:S,children:l.jsx("div",{ref:o,onKeyDownCapture:w,className:or("relative",i),role:"region","aria-roledescription":"carousel",...a,children:s})})}),oxt=b.forwardRef(({className:e,...t},n)=>{const{carouselRef:r,orientation:i}=j4();return l.jsx("div",{ref:r,className:"w-full overflow-hidden",children:l.jsx("div",{ref:n,className:or("flex",i==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})}),lxt=b.forwardRef(({className:e,...t},n)=>{const{orientation:r}=j4();return l.jsx("div",{ref:n,role:"group","aria-roledescription":"slide",className:or("min-w-0 shrink-0 grow-0 basis-full",r==="horizontal"?"pl-4":"pt-4",e),...t})}),cxt=b.forwardRef(({className:e,variant:t="outline",size:n="xs",...r},i)=>{const{orientation:s,scrollPrev:a,canScrollPrev:o}=j4();return l.jsxs(zc,{ref:i,variant:t,size:n,className:or("absolute h-8 w-8 rounded-full",s==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!o,onClick:a,...r,children:[l.jsx(Tj,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Previous slide"})]})}),uxt=b.forwardRef(({className:e,variant:t="outline",size:n="xs",...r},i)=>{const{orientation:s,scrollNext:a,canScrollNext:o}=j4();return l.jsxs(zc,{ref:i,variant:t,size:n,className:or("absolute h-8 w-8 rounded-full",s==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!o,onClick:a,...r,children:[l.jsx(Qae,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Next slide"})]})}),Rv={Root:axt,Content:oxt,Item:lxt,Previous:cxt,Next:uxt};function Ute(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,s=!1;for(;!s;){r===-1&&(r=n.length,s=!0);const a=n.slice(i,r).trim();(a||!s)&&t.push(a),i=r+1,r=n.indexOf(",",i)}return t}function _be(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const dxt=/[ \t\n\f\r]/g;function fxt(e){return typeof e=="object"?e.type==="text"?Vte(e.value):!1:Vte(e)}function Vte(e){return e.replace(dxt,"")===""}let eC=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};eC.prototype.normal={};eC.prototype.property={};eC.prototype.space=void 0;function wbe(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new eC(n,r,t)}function MS(e){return e.toLowerCase()}let _l=class{constructor(t,n){this.attribute=n,this.property=t}};_l.prototype.attribute="";_l.prototype.booleanish=!1;_l.prototype.boolean=!1;_l.prototype.commaOrSpaceSeparated=!1;_l.prototype.commaSeparated=!1;_l.prototype.defined=!1;_l.prototype.mustUseProperty=!1;_l.prototype.number=!1;_l.prototype.overloadedBoolean=!1;_l.prototype.property="";_l.prototype.spaceSeparated=!1;_l.prototype.space=void 0;let hxt=0;const Qn=Tx(),Ks=Tx(),mL=Tx(),Mt=Tx(),ji=Tx(),z1=Tx(),Nl=Tx();function Tx(){return 2**++hxt}const gL=Object.freeze(Object.defineProperty({__proto__:null,boolean:Qn,booleanish:Ks,commaOrSpaceSeparated:Nl,commaSeparated:z1,number:Mt,overloadedBoolean:mL,spaceSeparated:ji},Symbol.toStringTag,{value:"Module"})),MM=Object.keys(gL);let zB=class extends _l{constructor(t,n,r,i){let s=-1;if(super(t,n),Hte(this,"space",i),typeof r=="number")for(;++s<MM.length;){const a=MM[s];Hte(this,MM[s],(r&gL[a])===gL[a])}}};zB.prototype.defined=!0;function Hte(e,t,n){n&&(e[t]=n)}function ob(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new zB(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[MS(r)]=r,n[MS(s.attribute)]=r}return new eC(t,n,e.space)}const Sbe=ob({properties:{ariaActiveDescendant:null,ariaAtomic:Ks,ariaAutoComplete:null,ariaBusy:Ks,ariaChecked:Ks,ariaColCount:Mt,ariaColIndex:Mt,ariaColSpan:Mt,ariaControl
vendor: 5,440 bytes, line 1247
1247s:ji,ariaCurrent:null,ariaDescribedBy:ji,ariaDetails:null,ariaDisabled:Ks,ariaDropEffect:ji,ariaErrorMessage:null,ariaExpanded:Ks,ariaFlowTo:ji,ariaGrabbed:Ks,ariaHasPopup:null,ariaHidden:Ks,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ji,ariaLevel:Mt,ariaLive:null,ariaModal:Ks,ariaMultiLine:Ks,ariaMultiSelectable:Ks,ariaOrientation:null,ariaOwns:ji,ariaPlaceholder:null,ariaPosInSet:Mt,ariaPressed:Ks,ariaReadOnly:Ks,ariaRelevant:null,ariaRequired:Ks,ariaRoleDescription:ji,ariaRowCount:Mt,ariaRowIndex:Mt,ariaRowSpan:Mt,ariaSelected:Ks,ariaSetSize:Mt,ariaSort:null,ariaValueMax:Mt,ariaValueMin:Mt,ariaValueNow:Mt,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Ebe(e,t){return t in e?e[t]:t}function Cbe(e,t){return Ebe(e,t.toLowerCase())}const pxt=ob({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:z1,acceptCharset:ji,accessKey:ji,action:null,allow:null,allowFullScreen:Qn,allowPaymentRequest:Qn,allowUserMedia:Qn,alt:null,as:null,async:Qn,autoCapitalize:null,autoComplete:ji,autoFocus:Qn,autoPlay:Qn,blocking:ji,capture:null,charSet:null,checked:Qn,cite:null,className:ji,cols:Mt,colSpan:null,content:null,contentEditable:Ks,controls:Qn,controlsList:ji,coords:Mt|z1,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Qn,defer:Qn,dir:null,dirName:null,disabled:Qn,download:mL,draggable:Ks,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Qn,formTarget:null,headers:ji,height:Mt,hidden:mL,high:Mt,href:null,hrefLang:null,htmlFor:ji,httpEquiv:ji,id:null,imageSizes:null,imageSrcSet:null,inert:Qn,inputMode:null,integrity:null,is:null,isMap:Qn,itemId:null,itemProp:ji,itemRef:ji,itemScope:Qn,itemType:ji,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Qn,low:Mt,manifest:null,max:null,maxLength:Mt,media:null,method:null,min:null,minLength:Mt,multiple:Qn,muted:Qn,name:null,nonce:null,noModule:Qn,noValidate:Qn,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Qn,optimum:Mt,pattern:null,ping:ji,placeholder:null,playsInline:Qn,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Qn,referrerPolicy:null,rel:ji,required:Qn,reversed:Qn,rows:Mt,rowSpan:Mt,sandbox:ji,scope:null,scoped:Qn,seamless:Qn,selected:Qn,shadowRootClonable:Qn,shadowRootDelegatesFocus:Qn,shadowRootMode:null,shape:null,size:Mt,sizes:null,slot:null,span:Mt,spellCheck:Ks,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Mt,step:null,style:null,tabIndex:Mt,target:null,title:null,translate:null,type:null,typeMustMatch:Qn,useMap:null,value:Ks,width:Mt,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ji,axis:null,background:null,bgColor:null,border:Mt,borderColor:null,bottomMargin:Mt,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Qn,declare:Qn,event:null,face:null,frame:null,frameBorder:null,hSpace:Mt,leftMargin:Mt,link:null,longDesc:null,lowSrc:null,marginHeight:Mt,marginWidth:Mt,noResize:Qn,noHref:Qn,noShade:Qn,noWrap:Qn,object:null,profile:null,prompt:null,rev:null,rightMargin:Mt,rules:null,scheme:null,scrolling:Ks,standby:null,summary:null,text:null,topMargin:Mt,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Mt,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Qn,disableRemotePlayback:Qn,prefix:null,property:null,results:Mt,security:null,unselectable:null},space:"html",transform:Cbe}),mxt=ob({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRen
1247dering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",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",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Nl,accentHeight:Mt,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Mt,amplitude:Mt,arabicForm:null,ascent:Mt,attributeName:null,attributeType:null,azimuth:Mt,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Mt,by:null,calcMode:null,capHeight:Mt,className:ji,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRen
1247dering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Mt,diffuseConstant:Mt,direction:null,display:null,dur:null,divisor:Mt,dominantBaseline:null,download:Qn,dx:null,dy:null,edgeMode:null,editable:null,elevation:Mt,enableBackground:null,end:null,event:null,exponent:Mt,externalResourcesRequired:null,fill:null,fillOpacity:Mt,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:z1,g2:z1,glyphName:z1,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Mt,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Mt,horizOriginX:Mt,horizOriginY:Mt,id:null,ideographic:Mt,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Mt,k:Mt,k1:Mt,k2:Mt,k3:Mt,k4:Mt,kernelMatrix:Nl,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Mt,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Mt,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Mt,overlineThickness:Mt,paintOrder:null,panose1:null,path:null,pathLength:Mt,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ji,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Mt,pointsAtY:Mt,pointsAtZ:Mt,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Nl,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Nl,rev:Nl,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Nl,requiredFeatures:Nl,requiredFonts:Nl,requiredFormats:Nl,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Mt,specularExponent:Mt,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Mt,strikethroughThickness:Mt,string:null,stroke:null,strokeDashArray:Nl,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Mt,strokeOpacity:Mt,strokeWidth:null,style:null,surfaceScale:Mt,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Nl,tabIndex:Mt,tableValues:null,target:null,targetX:Mt,targetY:Mt,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Nl,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Mt,underlineThickness:Mt,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Mt,values:null,vAlphabetic:Mt,vMathematical:Mt,vectorEffect:null,vHanging:Mt,vIdeographic:Mt,ver
vendor: 4,358 bytes, lines 1247-1248
1247sion:null,vertAdvY:Mt,vertOriginX:Mt,vertOriginY:Mt,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Mt,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ebe}),Tbe=ob({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Abe=ob({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Cbe}),kbe=ob({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),gxt={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},xxt=/[A-Z]/g,qte=/-[a-z]/g,vxt=/^data[-\w.:]+$/i;function $B(e,t){const n=MS(t);let r=t,i=_l;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&vxt.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(qte,bxt);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!qte.test(s)){let a=s.replace(xxt,yxt);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=zB}return new i(r,t)}function yxt(e){return"-"+e.toLowerCase()}function bxt(e){return e.charAt(1).toUpperCase()}const R4=wbe([Sbe,pxt,Tbe,Abe,kbe],"html"),lb=wbe([Sbe,mxt,Tbe,Abe,kbe],"svg");function Wte(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Nbe(e){return e.join(" ").trim()}var Iv={},DM,Gte;function _xt(){if(Gte)return DM;Gte=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,o=/^\s+|\s+$/g,c=` 1248`,u="/",d="*",h="",p="comment",g="declaration";DM=function(x,_){if(typeof x!="string")throw new TypeError("First argument must be a string");if(!x)return[];_=_||{};var w=1,S=1;function E(G){var Q=G.match(t);Q&&(w+=Q.length);var Z=G.lastIndexOf(c);S=~Z?G.length-Z:S+G.length}function T(){var G={line:w,column:S};return function(Q){return Q.position=new N(G),j(),Q}}function N(G){this.start=G,this.end={line:w,column:S},this.source=_.source}N.prototype.content=x;function A(G){var Q=new Error(_.source+":"+w+":"+S+": "+G);if(Q.reason=G,Q.filename=_.source,Q.line=w,Q.column=S,Q.source=x,!_.silent)throw Q}function k(G){var Q=G.exec(x);if(Q){var Z=Q[0];return E(Z),x=x.slice(Z.length),Q}}function j(){k(n)}function R(G){var Q;for(G=G||[];Q=P();)Q!==!1&&G.push(Q);return G}function P(){var G=T();if(!(u!=x.charAt(0)||d!=x.charAt(1))){for(var Q=2;h!=x.charAt(Q)&&(d!=x.charAt(Q)||u!=x.charAt(Q+1));)++Q;if(Q+=2,h===x.charAt(Q-1))return A("End of comment missing");var Z=x.slice(2,Q-2);return S+=2,E(Z),x=x.slice(Q),S+=2,G({type:p,comment:Z})}}function V(){var G=T(),Q=k(r);if(Q){if(P(),!k(i))return A("property missing ':'");var Z=k(s),K=G({type:g,property:v(Q[0].replace(e,h)),value:Z?v(Z[0].replace(e,h)):h});return k(a),K}}function U(){var G=[];R(G);for(var Q;Q=V();)Q!==!1&&(G.push(Q),R(G));return G}return j(),U()};function v(x){return x?x.replace(o,h):h}return DM}var Kte;function wxt(){if(Kte)return Iv;Kte=1;var e=Iv&&Iv.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Iv,"__esModule",{value:!0}),Iv.default=n;const t=e(_xt());function n(r,i){let s=null;if(!r||typeof r!="string")return s;const a=(0,t.default)(r),o=typeof i=="function";return a.forEach(c=>{if(c.type!=="declaration")return;const{property:u,value:d}=c;o?i(u,d,c):d&&(s=s||{},s[u]=d)}),s}return Iv}var L_={},Yte;function Sxt(){if(Yte)return L_;Yte=1,Object.defineProperty(L_,"__esModule",{value:!0}),L_.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,s=function(u){return!u||n.test(u)||e.test(u)},a=function(u,d){return d.toUpperCase()},o=function(u,d){return"".concat(d,"-")},c=function(u,d){return d===void 0&&(d={}
vendor: 1,361 bytes, line 1248
1248),s(u)?u:(u=u.toLowerCase(),d.reactCompat?u=u.replace(i,o):u=u.replace(r,o),u.replace(t,a))};return L_.camelCase=c,L_}var z_,Xte;function Ext(){if(Xte)return z_;Xte=1;var e=z_&&z_.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(wxt()),n=Sxt();function r(i,s){var a={};return!i||typeof i!="string"||(0,t.default)(i,function(o,c){o&&c&&(a[(0,n.camelCase)(o,s)]=c)}),a}return r.default=r,z_=r,z_}var Cxt=Ext();const Txt=$c(Cxt),I4=jbe("end"),rf=jbe("start");function jbe(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Rbe(e){const t=rf(e),n=I4(e);if(t&&n)return{start:t,end:n}}const BB={}.hasOwnProperty,Axt=new Map,kxt=/[A-Z]/g,Nxt=new Set(["table","tbody","thead","tfoot","tr"]),jxt=new Set(["td","th"]),Ibe="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Rxt(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=zxt(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");
vendor: 6,804 bytes, lines 1248-1250
1248if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Lxt(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?lb:R4,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=Obe(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function Obe(e,t,n){if(t.type==="element")return Ixt(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Oxt(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Mxt(e,t,n);if(t.type==="mdxjsEsm")return Pxt(e,t);if(t.type==="root")return Dxt(e,t,n);if(t.type==="text")return Fxt(e,t)}function Ixt(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=lb,e.schema=i),e.ancestors.push(t);const s=Mbe(e,t.tagName,!1),a=$xt(e,t);let o=VB(e,t);return Nxt.has(t.tagName)&&(o=o.filter(function(c){return typeof c=="string"?!fxt(c):!0})),Pbe(e,a,s,t),UB(a,o),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function Oxt(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}DS(e,t.position)}function Pxt(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);DS(e,t.position)}function Mxt(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=lb,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:Mbe(e,t.name,!0),a=Bxt(e,t),o=VB(e,t);return Pbe(e,a,s,t),UB(a,o),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function Dxt(e,t,n){const r={};return UB(r,VB(e,t)),e.create(t,e.Fragment,r,n)}function Fxt(e,t){return t.value}function Pbe(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function UB(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Lxt(e,t,n){return r;function r(i,s,a,o){const u=Array.isArray(a.children)?n:t;return o?u(s,a,o):u(s,a)}}function zxt(e,t){return n;function n(r,i,s,a){const o=Array.isArray(s.children),c=rf(r);return t(i,s,a,o,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function $xt(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&BB.call(t.properties,i)){const s=Uxt(e,i,t.properties[i]);if(s){const[a,o]=s;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&jxt.has(t.tagName)?r=o:n[a]=o}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Bxt(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const a=s.expression;a.type;const o=a.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else DS(e,t.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,s=e.evaluater.evaluateExpression(o.expression)}else DS(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function VB(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Axt;for(;++r<t.children.length;){const s=t.children[r];let a;if(e.passKeys){const c=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(c){const u=i.get(c)||0;a=c+"-"+u,i.set(c,u+1)}}const o=Obe(e,s,a);o!==void 0&&n.push(o)}return n}function Uxt(e,t,n){const r=$B(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?_be(n):Nbe(n)),r.property==="style"){let i=typeof n=="object"?n:Vxt(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Hxt(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?gxt[r.property]||r.property:r.attribute,n]}}function Vxt(e,t){try{return Txt(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Gr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Ibe+"#cannot-parse-style-attribute",i}}function Mbe(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,a;for(;++s<i.length;){const o=JQ(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};a=a?{type:"MemberExpression",object:a,property:o,computed:!!(s&&o.type==="Literal"),optional:!1}:o}r=a}else r=JQ(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return BB.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);DS(e)}function DS(e,t){const n=new Gr("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Ibe+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Hxt(e){const t={};let n;for(n in e)BB.call(e,n)&&(t[qxt(n)]=e[n]);return t}function qxt(e){let t=e.replace(kxt,Wxt);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Wxt(e){return"-"+e.toLowerCase()}const FM={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]};function Gxt(e){const t=this;t.parser=n;function n(r){return Fge(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Kxt(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Yxt(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:` 1249`}]}function Xxt(e,t){const n=t.value?t.value+` 1250`:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function Qxt(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Zxt(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}
vendor: 4,776 bytes, lines 1250-1252
1250function Jxt(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Zy(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let a,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=s+1,o+=1,e.footnoteCounts.set(r,o);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,c);const u={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,u),e.applyData(t,u)}function evt(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function tvt(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Dbe(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function nvt(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Dbe(e,t);const i={src:Zy(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function rvt(e,t){const n={src:Zy(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function ivt(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function svt(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Dbe(e,t);const i={href:Zy(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function avt(e,t){const n={href:Zy(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function ovt(e,t,n){const r=e.all(t),i=n?lvt(n):Fbe(t),s={},a=[];if(typeof t.checked=="boolean"){const d=r[0];let h;d&&d.type==="element"&&d.tagName==="p"?h=d:(h={type:"element",tagName:"p",properties:{},children:[]},r.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const d=r[o];(i||o!==0||d.type!=="element"||d.tagName!=="p")&&a.push({type:"text",value:` 1251`}),d.type==="element"&&d.tagName==="p"&&!i?a.push(...d.children):a.push(d)}const c=r[r.length-1];c&&(i||c.type!=="element"||c.tagName!=="p")&&a.push({type:"text",value:` 1252`});const u={type:"element",tagName:"li",properties:s,children:a};return e.patch(t,u),e.applyData(t,u)}function lvt(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Fbe(n[r])}return t}function Fbe(e){const t=e.spread;return t??e.children.length>1}function cvt(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const a=r[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function uvt(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dvt(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function fvt(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hvt(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=rf(t.children[1]),c=I4(t.children[t.children.length-1]);o&&c&&(a.position={start:o,end:c}),i.push(a)}const s={type:"element",tagName:"table",properties:{}
vendor: 4,709 bytes, line 1252
1252,children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function pvt(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,o=a?a.length:t.children.length;let c=-1;const u=[];for(;++c<o;){const h=t.children[c],p={},g=a?a[c]:void 0;g&&(p.align=g);let v={type:"element",tagName:s,properties:p,children:[]};h&&(v.children=e.all(h),e.patch(h,v),v=e.applyData(h,v)),u.push(v)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,d),e.applyData(t,d)}function mvt(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Qte=9,Zte=32;function gvt(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(Jte(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(Jte(t.slice(i),i>0,!1)),s.join("")}function Jte(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===Qte||s===Zte;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===Qte||s===Zte;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function xvt(e,t){const n={type:"text",value:gvt(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function vvt(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const yvt={blockquote:Kxt,break:Yxt,code:Xxt,delete:Qxt,emphasis:Zxt,footnoteReference:Jxt,heading:evt,html:tvt,imageReference:nvt,image:rvt,inlineCode:ivt,linkReference:svt,link:avt,listItem:ovt,list:cvt,paragraph:uvt,root:dvt,strong:fvt,table:hvt,tableCell:mvt,tableRow:pvt,text:xvt,thematicBreak:vvt,toml:LA,yaml:LA,definition:LA,footnoteDefinition:LA};function LA(){}const Lbe=-1,O4=0,n2=1,G3=2,HB=3,qB=4,WB=5,GB=6,zbe=7,$be=8,ene=typeof self=="object"?self:globalThis,bvt=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,a]=t[i];switch(s){case O4:case Lbe:return n(a,i);case n2:{const o=n([],i);for(const c of a)o.push(r(c));return o}case G3:{const o=n({},i);for(const[c,u]of a)o[r(c)]=r(u);return o}case HB:return n(new Date(a),i);case qB:{const{source:o,flags:c}=a;return n(new RegExp(o,c),i)}case WB:{const o=n(new Map,i);for(const[c,u]of a)o.set(r(c),r(u));return o}case GB:{const o=n(new Set,i);for(const c of a)o.add(r(c));return o}case zbe:{const{name:o,message:c}=a;return n(new ene[o](c),i)}case $be:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:o}=new Uint8Array(a);return n(new DataView(o),a)}}return n(new ene[s](a),i)};return r},tne=e=>bvt(new Map,e)(0),Ov="",{toString:_vt}={},{keys:wvt}=Object,$_=e=>{const t=typeof e;if(t!=="object"||!e)return[O4,t];const n=_vt.call(e).slice(8,-1);switch(n){case"Array":return[n2,Ov];case"Object":return[G3,Ov];case"Date":return[HB,Ov];case"RegExp":return[qB,Ov];case"Map":return[WB,Ov];case"Set":return[GB,Ov];case"DataView":return[n2,n]}return n.includes("Array")?[n2,n]:n.includes("Error")?[zbe,n]:[G3,n]},zA=([e,t])=>e===O4&&(t==="function"||t==="symbol"),Svt=(e,t,n,r)=>{const i=(a,o)=>{const c=r.push(a)-1;return n.set(o,c),c},s=a=>{if(n.has(a))return n.get(a);let[o,c]=$_(a);switch(o){case O4:{let d=a;switch(c){case"bigint":o=$be,d=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);d=null;break;case"undefined":return i([Lbe],a)}return i([o,d],a)}case n2:{if(c){let p=a;return c==="DataView"?p=new Uint8Array(a.buffer):c==="ArrayBuffer"&&(p=new Uint8Array(a)),i([c,[...p]],a)}const d=[],h=i([o,d],a);for(const p of a)d.push(s(p));return h}case G3:{if(c)switch(c){case"BigInt":return i([c,a.toString()],a);case"Boolean":case"Number":case"String":return i([c,a.valueOf()],a)}if(t&&"toJSON"in a)return s(a.toJSON());const d=[],h=i([o,d],a);for(const p of wvt(a))(e||!zA($_(a[p])))&&d.push([s(p),s(a[p])]);return h}case HB:return i([o,a.toISOString()],a);case qB:{const{source:d,flags:h}=a;return i([o,{source:d,flags:h}],a)}case WB:{const d=[],h=i([o,d],a);for(const[p,g]of a)(e||!(zA($_(p))||zA($_(g))))&&d.push([s(p),s(g)]);return h}case GB:{const d=[],h=i([o,d],a);for(const p of a)(e||!zA($_(p)))&&d.push(s(p));return h}}const{message:u}=a;return i([o,{name:c,message:u}],a)};return s},nne=(e,{json:t,lossy:n}={})=>{const r=[];return Svt(!(t||n),!!t,new Map,r)(e),r},J0=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?tne(nne(e,t)):structuredClone(e):(e,t)=>tne(nne(e,t));function Evt(e,t){const n=[{type:"text",value:"â©"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Cvt(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}
vendor: 1,551 bytes, lines 1252-1253
1252function Tvt(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Evt,r=e.options.footnoteBackLabel||Cvt,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let c=-1;for(;++c<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[c]);if(!u)continue;const d=e.all(u),h=String(u.identifier).toUpperCase(),p=Zy(h.toLowerCase());let g=0;const v=[],x=e.footnoteCounts.get(h);for(;x!==void 0&&++g<=x;){v.length>0&&v.push({type:"text",value:" "});let S=typeof n=="string"?n:n(c,g);typeof S=="string"&&(S={type:"text",value:S}),v.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(g>1?"-"+g:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,g),className:["data-footnote-backref"]},children:Array.isArray(S)?S:[S]})}const _=d[d.length-1];if(_&&_.type==="element"&&_.tagName==="p"){const S=_.children[_.children.length-1];S&&S.type==="text"?S.value+=" ":_.children.push({type:"text",value:" "}),_.children.push(...v)}else d.push(...v);const w={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(d,!0)};e.patch(u,w),o.push(w)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...J0(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:` 1253`},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)}
vendor: 5,631 bytes, lines 1253-1258
1253,{type:"text",value:` 1254`}]}}const xL={}.hasOwnProperty,Avt={};function kvt(e,t){const n=t||Avt,r=new Map,i=new Map,s=new Map,a={...yvt,...n.handlers},o={all:u,applyData:jvt,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:a,one:c,options:n,patch:Nvt,wrap:Ivt};return l4(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const h=d.type==="definition"?r:i,p=String(d.identifier).toUpperCase();h.has(p)||h.set(p,d)}}),o;function c(d,h){const p=d.type,g=o.handlers[p];if(xL.call(o.handlers,p)&&g)return g(o,d,h);if(o.options.passThrough&&o.options.passThrough.includes(p)){if("children"in d){const{children:x,..._}=d,w=J0(_);return w.children=o.all(d),w}return J0(d)}return(o.options.unknownHandler||Rvt)(o,d,h)}function u(d){const h=[];if("children"in d){const p=d.children;let g=-1;for(;++g<p.length;){const v=o.one(p[g],d);if(v){if(g&&p[g-1].type==="break"&&(!Array.isArray(v)&&v.type==="text"&&(v.value=rne(v.value)),!Array.isArray(v)&&v.type==="element")){const x=v.children[0];x&&x.type==="text"&&(x.value=rne(x.value))}Array.isArray(v)?h.push(...v):h.push(v)}}}return h}}function Nvt(e,t){e.position&&(t.position=Rbe(e))}function jvt(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&s&&Object.assign(n.properties,J0(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Rvt(e,t){const n=t.data||{},r="value"in t&&!(xL.call(n,"hProperties")||xL.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Ivt(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:` 1255`});++r<e.length;)r&&n.push({type:"text",value:` 1256`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:` 1257`}),n}function rne(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function ine(e,t){const n=kvt(e,t),r=n.one(e,void 0),i=Tvt(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:` 1258`},i),s}function Ovt(e,t){return e&&"run"in e?async function(n,r){const i=ine(n,{file:r,...t});await e.run(i,r)}:function(n,r){return ine(n,{file:r,...e||t})}}function sne(e){if(e)throw e}var LM,ane;function Pvt(){if(ane)return LM;ane=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},s=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var d=e.call(u,"constructor"),h=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!d&&!h)return!1;var p;for(p in u);return typeof p>"u"||e.call(u,p)},a=function(u,d){n&&d.name==="__proto__"?n(u,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):u[d.name]=d.newValue},o=function(u,d){if(d==="__proto__")if(e.call(u,d)){if(r)return r(u,d).value}else return;return u[d]};return LM=function c(){var u,d,h,p,g,v,x=arguments[0],_=1,w=arguments.length,S=!1;for(typeof x=="boolean"&&(S=x,x=arguments[1]||{},_=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});_<w;++_)if(u=arguments[_],u!=null)for(d in u)h=o(x,d),p=o(u,d),x!==p&&(S&&p&&(s(p)||(g=i(p)))?(g?(g=!1,v=h&&i(h)?h:[]):v=h&&s(h)?h:{},a(x,{name:d,newValue:c(S,v,p)})):typeof p<"u"&&a(x,{name:d,newValue:p}));return x},LM}var Mvt=Pvt();const zM=$c(Mvt);function vL(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Dvt(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);o(null,...i);function o(c,...u){const d=e[++s];let h=-1;if(c){a(c);return}for(;++h<i.length;)(u[h]===null||u[h]===void 0)&&(u[h]=i[h]);i=u,d?Fvt(d,o)(...u):a(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Fvt(e,t){let n;return r;function r(...a){const o=e.length>a.length;let c;o&&a.push(i);try{c=e.apply(this,a)}catch(u){const d=u;if(o&&n)throw d;return i(d)}o||(c&&c.then&&typeof c.then=="function"?c.then(s,i):c instanceof Error?i(c):s(c))}function i(a,...o){n||(n=!0,t(a,...o))}function s(a){i(null,a)}}const dd={basename:Lvt,dirname:zvt,extname:$vt,join:Bvt,sep:"/"};function Lvt(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');tC(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else a<0&&(s=!0,a=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(r=i):(o=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function zvt(e){if(tC(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function $vt(e){tC(e);let t=e.length,n=-1,r=0,i=-1,s=0,a;for(;t--;){const o=e.codePointAt(t);if(o===47){if(a){r=t+1;break}continue}
vendor: 7,631 bytes, line 1258
1258n<0&&(a=!0,n=t+1),o===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Bvt(...e){let t=-1,n;for(;++t<e.length;)tC(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Uvt(n)}function Uvt(e){tC(e);const t=e.codePointAt(0)===47;let n=Vvt(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Vvt(e,t){let n="",r=0,i=-1,s=0,a=-1,o,c;for(;++a<=e.length;){if(a<e.length)o=e.codePointAt(a);else{if(o===47)break;o=47}if(o===47){if(!(i===a-1||s===1))if(i!==a-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),i=a,s=0;continue}}else if(n.length>0){n="",r=0,i=a,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,s=0}else o===46&&s>-1?s++:s=-1}return n}function tC(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Hvt={cwd:qvt};function qvt(){return"/"}function yL(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Wvt(e){if(typeof e=="string")e=new URL(e);else if(!yL(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Gvt(e)}function Gvt(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const $M=["history","path","basename","stem","extname","dirname"];class Bbe{constructor(t){let n;t?yL(t)?n={path:t}:typeof t=="string"||Kvt(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Hvt.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<$M.length;){const s=$M[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)$M.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?dd.basename(this.path):void 0}set basename(t){UM(t,"basename"),BM(t,"basename"),this.path=dd.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?dd.dirname(this.path):void 0}set dirname(t){one(this.basename,"dirname"),this.path=dd.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?dd.extname(this.path):void 0}set extname(t){if(BM(t,"extname"),one(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=dd.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){yL(t)&&(t=Wvt(t)),UM(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?dd.basename(this.path,this.extname):void 0}set stem(t){UM(t,"stem"),BM(t,"stem"),this.path=dd.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Gr(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function BM(e,t){if(e&&e.includes(dd.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+dd.sep+"`")}function UM(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function one(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Kvt(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Yvt=(function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s}),Xvt={}.hasOwnProperty;class KB extends Yvt{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Dvt()}copy(){const t=new KB;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(zM(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(qM("data",this.frozen),this.namespace[t]=n,this):Xvt.call(this.namespace,t)&&this.namespace[t]||void 0:t?(qM("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=$A(t),r=this.parser||this.Parser;return VM("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),VM("process",this.parser||this.Parser),HM("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,a){const o=$A(t),c=r.parse(o);r.run(c,o,function(d,h,p){if(d||!h||!p)return u(d);const g=h,v=r.stringify(g,p);Jvt(v)?p.value=v:p.result=v,u(d,p)});function u(d,h){d||!h?a(d):s?s(h):n(void 0,h)}}}processSync(t){let n=!1,r;return this.freeze(),VM("processSync",this.parser||this.Parser),HM("processSync",this.compiler||this.Compiler),this.process(t,i),cne("processSync","process",n),r;function i(s,a){n=!0,sne(s),r=a}}run(t,n,r){lne(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(a,o){const c=$A(n);i.run(t,c,u);function u(d,h,p){const g=h||t;d?o(d):a?a(g):r(void 0,g,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),cne("runSync","run",r),i;function s(a,o){sne(a),i=o,r=!0}}stringify(t,n){this.freeze();const r=$A(n),i=this.compiler||this.Compiler;return HM("stringify",i),lne(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(qM("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(u){if(typeof u=="function")c(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[d,...h]=u;c(d,h)}else a(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function a(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(u.plugins),u.settings&&(i.settings=zM(!0,i.settings,u.settings))}function o(u){let d=-1;if(u!=null)if(Array.isArray(u))for(;++d<u.length;){const h=u[d];s(h)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function c(u,d){let h=-1,p=-1;for(;++h<r.length;)if(r[h][0]===u){p=h;break}if(p===-1)r.push([u,...d]);else if(d.length>0){let[g,...v]=d;const x=r[p][1];vL(x)&&vL(g)&&(g=zM(!0,x,g)),r[p]=[u,g,...v]}}}}const Qvt=new KB().freeze();
vendor: 8,553 bytes, lines 1258-1259
1258function VM(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function HM(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function qM(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function lne(e){if(!vL(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function cne(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function $A(e){return Zvt(e)?e:new Bbe(e)}function Zvt(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Jvt(e){return typeof e=="string"||e1t(e)}function e1t(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const t1t="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",une=[],dne={allowDangerousHtml:!0},n1t=/^(https?|ircs?|mailto|xmpp)$/i,r1t=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function i1t(e){const t=s1t(e),n=a1t(e);return o1t(t.runSync(t.parse(n),n),e)}function s1t(e){const t=e.rehypePlugins||une,n=e.remarkPlugins||une,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...dne}:dne;return Qvt().use(Gxt).use(n).use(Ovt,r).use(t)}function a1t(e){const t=e.children||"",n=new Bbe;return typeof t=="string"&&(n.value=t),n}function o1t(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,a=t.skipHtml,o=t.unwrapDisallowed,c=t.urlTransform||l1t;for(const d of r1t)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+t1t+d.id,void 0);return l4(e,u),Rxt(e,{Fragment:l.Fragment,components:i,ignoreInvalidStyle:!0,jsx:l.jsx,jsxs:l.jsxs,passKeys:!0,passNode:!0});function u(d,h,p){if(d.type==="raw"&&p&&typeof h=="number")return a?p.children.splice(h,1):p.children[h]={type:"text",value:d.value},h;if(d.type==="element"){let g;for(g in FM)if(Object.hasOwn(FM,g)&&Object.hasOwn(d.properties,g)){const v=d.properties[g],x=FM[g];(x===null||x.includes(d.tagName))&&(d.properties[g]=c(String(v||""),g,d))}}if(d.type==="element"){let g=n?!n.includes(d.tagName):s?s.includes(d.tagName):!1;if(!g&&r&&typeof h=="number"&&(g=!r(d,h,p)),g&&p&&typeof h=="number")return o&&d.children?p.children.splice(h,1,...d.children):p.children.splice(h,1),h}}}function l1t(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||n1t.test(e.slice(0,t))?e:""}const fne=/[#.]/g;function c1t(e,t){const n=e||"",r={};let i=0,s,a;for(;i<n.length;){fne.lastIndex=i;const o=fne.exec(n),c=n.slice(i,o?o.index:n.length);c&&(s?s==="#"?r.id=c:Array.isArray(r.className)?r.className.push(c):r.className=[c]:a=c,i+=c.length),o&&(s=o[0],i++)}return{type:"element",tagName:a||t||"div",properties:r,children:[]}}function Ube(e,t,n){const r=n?h1t(n):void 0;function i(s,a,...o){let c;if(s==null){c={type:"root",children:[]};const u=a;o.unshift(u)}else{c=c1t(s,t);const u=c.tagName.toLowerCase(),d=r?r.get(u):void 0;if(c.tagName=d||u,u1t(a))o.unshift(a);else for(const[h,p]of Object.entries(a))d1t(e,c.properties,h,p)}for(const u of o)bL(c.children,u);return c.type==="element"&&c.tagName==="template"&&(c.content={type:"root",children:c.children},c.children=[]),c}return i}function u1t(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const s=i;for(const a of s)if(typeof a!="number"&&typeof a!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function d1t(e,t,n,r){const i=$B(e,n);let s;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;s=r}else typeof r=="boolean"?s=r:typeof r=="string"?i.spaceSeparated?s=Wte(r):i.commaSeparated?s=Ute(r):i.commaOrSpaceSeparated?s=Wte(Ute(r).join(" ")):s=hne(i,i.property,r):Array.isArray(r)?s=[...r]:s=i.property==="style"?f1t(r):String(r);if(Array.isArray(s)){const a=[];for(const o of s)a.push(hne(i,i.property,o));s=a}i.property==="className"&&Array.isArray(t.className)&&(s=t.className.concat(s)),t[i.property]=s}}function bL(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)bL(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?bL(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function hne(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||MS(n)===MS(t)))return!0}return n}function f1t(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function h1t(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const p1t=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","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","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],m1t=Ube(R4,"div"),g1t=Ube(lb,"g",p1t);function x1t(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(s){if(typeof s=="number"&&s>-1&&s<=t.length){let a=0;for(;;){let o=n[a];if(o===void 0){const c=pne(t,n[a-1]);o=c===-1?t.length+1:c+1,n[a]=o}if(o>s)return{line:a+1,column:s-(a>0?n[a-1]:0)+1,offset:s};a++}}}function i(s){if(s&&typeof s.line=="number"&&typeof s.column=="number"&&!Number.isNaN(s.line)&&!Number.isNaN(s.column)){for(;n.length<s.line;){const o=n[n.length-1],c=pne(t,o),u=c===-1?t.length+1:c+1;if(o===u)break;n.push(u)}const a=(s.line>1?n[s.line-2]:0)+s.column-1;if(a<n[s.line-1])return a}}}function pne(e,t){const n=e.indexOf("\r",t),r=e.indexOf(` 1259`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const n0={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Vbe={}.hasOwnProperty,v1t=Object.prototype;function y1t(e,t){const n=t||{};return YB({file:n.file||void 0,location:!1,schema:n.space==="svg"?lb:R4,verbose:n.verbose||!1},e)}function YB(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Uk(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:Hbe(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const s=String(e.file),a=x1t(s),o=a.toPoint(0),c=a.toPoint(s.length);n.position={start:o,end:c}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Uk(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Uk(e,r,n),n}default:return n=b1t(e,t),n}}function Hbe(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=YB(e,t[n]);r.push(i)}return r}function b1t(e,t){const n=e.schema;e.schema=t.namespaceURI===n0.svg?lb:R4;let r=-1;const i={};for(;++r<t.attrs.length;){const o=t.attrs[r],c=(o.prefix?o.prefix+":":"")+o.name;Vbe.call(v1t,c)||(i[c]=o.value)}
vendor: 2,923 bytes, line 1259
1259const a=(e.schema.space==="svg"?g1t:m1t)(t.tagName,i,Hbe(e,t.childNodes));if(Uk(e,t,a),a.tagName==="template"){const o=t,c=o.sourceCodeLocation,u=c&&c.startTag&&p1(c.startTag),d=c&&c.endTag&&p1(c.endTag),h=YB(e,o.content);u&&d&&e.file&&(h.position={start:u.end,end:d.start}),a.content=h}return e.schema=n,a}function Uk(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=_1t(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function _1t(e,t,n){const r=p1(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const s={};let a;if(n.attrs)for(a in n.attrs)Vbe.call(n.attrs,a)&&(s[$B(e.schema,a).property]=p1(n.attrs[a]));n.startTag;const o=p1(n.startTag),c=n.endTag?p1(n.endTag):void 0,u={opening:o};c&&(u.closing=c),u.properties=s,t.data={position:u}}}return r}function p1(e){const t=mne({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=mne({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function mne(e){return e.line&&e.column?e:void 0}class nC{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}nC.prototype.property={};nC.prototype.normal={};nC.prototype.space=null;function qbe(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new nC(n,r,t)}function _L(e){return e.toLowerCase()}class Wc{constructor(t,n){this.property=t,this.attribute=n}}Wc.prototype.space=null;Wc.prototype.boolean=!1;Wc.prototype.booleanish=!1;Wc.prototype.overloadedBoolean=!1;Wc.prototype.number=!1;Wc.prototype.commaSeparated=!1;Wc.prototype.spaceSeparated=!1;Wc.prototype.commaOrSpaceSeparated=!1;Wc.prototype.mustUseProperty=!1;Wc.prototype.defined=!1;let w1t=0;const Kn=Ax(),Ys=Ax(),Wbe=Ax(),Dt=Ax(),Ri=Ax(),$1=Ax(),jl=Ax();function Ax(){return 2**++w1t}const wL=Object.freeze(Object.defineProperty({__proto__:null,boolean:Kn,booleanish:Ys,commaOrSpaceSeparated:jl,commaSeparated:$1,number:Dt,overloadedBoolean:Wbe,spaceSeparated:Ri},Symbol.toStringTag,{value:"Module"})),WM=Object.keys(wL);class XB extends Wc{constructor(t,n,r,i){let s=-1;if(super(t,n),gne(this,"space",i),typeof r=="number")for(;++s<WM.length;){const a=WM[s];gne(this,WM[s],(r&wL[a])===wL[a])}}}XB.prototype.defined=!0;function gne(e,t,n){n&&(e[t]=n)}const S1t={}.hasOwnProperty;function cb(e){const t={},n={};let r;for(r in e.properties)if(S1t.call(e.properties,r)){const i=e.properties[r],s=new XB(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[_L(r)]=r,n[_L(s.attribute)]=r}return new nC(t,n,e.space)}const Gbe=cb({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}
vendor: 1,247 bytes, line 1259
1259),Kbe=cb({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Ybe(e,t){return t in e?e[t]:t}function Xbe(e,t){return Ybe(e,t.toLowerCase())}const Qbe=cb({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Xbe,properties:{xmlns:null,xmlnsXLink:null}}),Zbe=cb({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Ys,ariaAutoComplete:null,ariaBusy:Ys,ariaChecked:Ys,ariaColCount:Dt,ariaColIndex:Dt,ariaColSpan:Dt,ariaControls:Ri,ariaCurrent:null,ariaDescribedBy:Ri,ariaDetails:null,ariaDisabled:Ys,ariaDropEffect:Ri,ariaErrorMessage:null,ariaExpanded:Ys,ariaFlowTo:Ri,ariaGrabbed:Ys,ariaHasPopup:null,ariaHidden:Ys,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ri,ariaLevel:Dt,ariaLive:null,ariaModal:Ys,ariaMultiLine:Ys,ariaMultiSelectable:Ys,ariaOrientation:null,ariaOwns:Ri,ariaPlaceholder:null,ariaPosInSet:Dt,ariaPressed:Ys,ariaReadOnly:Ys,ariaRelevant:null,ariaRequired:Ys,ariaRoleDescription:Ri,ariaRowCount:Dt,ariaRowIndex:Dt,ariaRowSpan:Dt,ariaSelected:Ys,ariaSetSize:Dt,ariaSort:null,ariaValueMax:Dt,ariaValueMin:Dt,ariaValueNow:Dt,ariaValueText:null,role:null}}
1259),E1t=cb({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Xbe,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:$1,acceptCharset:Ri,accessKey:Ri,action:null,allow:null,allowFullScreen:Kn,allowPaymentRequest:Kn,allowUserMedia:Kn,alt:null,as:null,async:Kn,autoCapitalize:null,autoComplete:Ri,autoFocus:Kn,autoPlay:Kn,blocking:Ri,capture:null,charSet:null,checked:Kn,cite:null,className:Ri,cols:Dt,colSpan:null,content:null,contentEditable:Ys,controls:Kn,controlsList:Ri,coords:Dt|$1,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Kn,defer:Kn,dir:null,dirName:null,disabled:Kn,download:Wbe,draggable:Ys,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Kn,formTarget:null,headers:Ri,height:Dt,hidden:Kn,high:Dt,href:null,hrefLang:null,htmlFor:Ri,httpEquiv:Ri,id:null,imageSizes:null,imageSrcSet:null,inert:Kn,inputMode:null,integrity:null,is:null,isMap:Kn,itemId:null,itemProp:Ri,itemRef:Ri,itemScope:Kn,itemType:Ri,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Kn,low:Dt,manifest:null,max:null,maxLength:Dt,media:null,method:null,min:null,minLength:Dt,multiple:Kn,muted:Kn,name:null,nonce:null,noModule:Kn,noValidate:Kn,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Kn,optimum:Dt,pattern:null,ping:Ri,placeholder:null,playsInline:Kn,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Kn,referrerPolicy:null,rel:Ri,required:Kn,reversed:Kn,rows:Dt,rowSpan:Dt,sandbox:Ri,scope:null,scoped:Kn,seamless:Kn,selected:Kn,shadowRootClonable:Kn,shadowRootDelegatesFocus:Kn,shadowRootMode:null,shape:null,size:Dt,sizes:null,slot:null,span:Dt,spellCheck:Ys,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Dt,step:null,style:null,tabIndex:Dt,target:null,title:null,translate:null,type:null,typeMustMatch:Kn,useMap:null,value:Ys,width:Dt,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ri,axis:null,background:null,bgColor:null,border:Dt,borderColor:null,bottomMargin:Dt,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Kn,declare:Kn,event:null,face:null,frame:null,frameBorder:null,hSpace:Dt,leftMargin:Dt,link:null,longDesc:null,lowSrc:null,marginHeight:Dt,marginWidth:Dt,noResize:Kn,noHref:Kn,noShade:Kn,noWrap:Kn,object:null,profile:null,prompt:null,rev:null,rightMargin:Dt,rules:null,scheme:null,scrolling:Ys,standby:null,summary:null,text:null,topMargin:Dt,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Dt,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Kn,disableRemotePlayback:Kn,prefix:null,property:null,results:Dt,security:null,unselectable:null}}
1259),C1t=cb({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav
1259-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",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",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:Ybe,properties:{about:jl,accentHeight:Dt,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Dt,amplitude:Dt,arabicForm:null,ascent:Dt,attributeName:null,attributeType:null,azimuth:Dt,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Dt,by:null,calcMode:null,capHeight:Dt,className:Ri,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Dt,diffuseConstant:Dt,direction:null,display:null,dur:null,divisor:Dt,dominantBaseline:null,download:Kn,dx:null,dy:null,edgeMode:null,editable:null,elevation:Dt,enableBackground:null,end:null,event:null,exponent:Dt,externalResourcesRequired:null,fill:null,fillOpacity:Dt,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:$1,g2:$1,glyphName:$1,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Dt,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Dt,horizOriginX:Dt,horizOriginY:Dt,id:null,ideographic:Dt,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Dt,k:Dt,k1:Dt,k2:Dt,k3:Dt,k4:Dt,kernelMatrix:jl,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Dt,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Dt,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,on
vendor: 4,392 bytes, line 1259
1259Zoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Dt,overlineThickness:Dt,paintOrder:null,panose1:null,path:null,pathLength:Dt,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ri,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Dt,pointsAtY:Dt,pointsAtZ:Dt,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:jl,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:jl,rev:jl,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:jl,requiredFeatures:jl,requiredFonts:jl,requiredFormats:jl,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Dt,specularExponent:Dt,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Dt,strikethroughThickness:Dt,string:null,stroke:null,strokeDashArray:jl,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Dt,strokeOpacity:Dt,strokeWidth:null,style:null,surfaceScale:Dt,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:jl,tabIndex:Dt,tableValues:null,target:null,targetX:Dt,targetY:Dt,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:jl,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Dt,underlineThickness:Dt,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Dt,values:null,vAlphabetic:Dt,vMathematical:Dt,vectorEffect:null,vHanging:Dt,vIdeographic:Dt,version:null,vertAdvY:Dt,vertOriginX:Dt,vertOriginY:Dt,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Dt,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),T1t=/^data[-\w.:]+$/i,xne=/-[a-z]/g,A1t=/[A-Z]/g;function k1t(e,t){const n=_L(t);let r=t,i=Wc;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&T1t.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(xne,j1t);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!xne.test(s)){let a=s.replace(A1t,N1t);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=XB}return new i(r,t)}function N1t(e){return"-"+e.toLowerCase()}function j1t(e){return e.charAt(1).toUpperCase()}const R1t=qbe([Kbe,Gbe,Qbe,Zbe,E1t],"html"),Jbe=qbe([Kbe,Gbe,Qbe,Zbe,C1t],"svg"),I1t={},O1t={}.hasOwnProperty,e_e=Uz("type",{handlers:{root:M1t,element:$1t,text:L1t,comment:z1t,doctype:F1t}});function P1t(e,t){const r=(t||I1t).space;return e_e(e,r==="svg"?Jbe:R1t)}function M1t(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=QB(e.children,n,t),ub(e,n),n}function D1t(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=QB(e.children,n,t),ub(e,n),n}function F1t(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return ub(e,t),t}function L1t(e){const t={nodeName:"#text",value:e.value,parentNode:null};return ub(e,t),t}function z1t(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return ub(e,t),t}function $1t(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Jbe);const i=[];let s;if(e.properties){for(s in e.properties)if(s!=="children"&&O1t.call(e.properties,s)){const c=B1t(r,s,e.properties[s]);c&&i.push(c)}}const a=r.space,o={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:n0[a],childNodes:[],parentNode:null};return o.childNodes=QB(e.children,o,r),ub(e,o),e.tagName==="template"&&e.content&&(o.content=D1t(e.content,r)),o}function B1t(e,t,n){const r=k1t(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?_be(n):Nbe(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const s=i.name.indexOf(":");s<0?i.prefix="":(i.name=i.name.slice(s+1),i.prefix=r.attribute.slice(0,s)),i.namespace=n0[r.space]}return i}
vendor: 9,412 bytes, line 1259
1259function QB(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const s=e_e(e[r],n);s.parentNode=t,i.push(s)}return i}function ub(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const U1t=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],V1t=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Yi="�";var ge;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(ge||(ge={}));const Jo={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function t_e(e){return e>=55296&&e<=57343}function H1t(e){return e>=56320&&e<=57343}function q1t(e,t){return(e-55296)*1024+9216+t}function n_e(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function r_e(e){return e>=64976&&e<=65007||V1t.has(e)}var it;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(it||(it={}));const W1t=65536;class G1t{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=W1t,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:i,offset:s}=this,a=i+n,o=s+n;return{code:t,startLine:r,endLine:r,startCol:a,endCol:a,startOffset:o,endOffset:o}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(H1t(n))return this.pos++,this._addGap(),q1t(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,ge.EOF;return this._err(it.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,ge.EOF;const r=this.html.charCodeAt(n);return r===ge.CARRIAGE_RETURN?ge.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,ge.EOF;let t=this.html.charCodeAt(this.pos);return t===ge.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,ge.LINE_FEED):t===ge.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,t_e(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===ge.LINE_FEED||t===ge.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){n_e(t)?this._err(it.controlCharacterInInputStream):r_e(t)&&this._err(it.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var pr;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(pr||(pr={}));function i_e(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const K1t=new Uint16Array('
vendor: 16,129 bytes, line 1259
1259áµ<ÃıÊÒÕ»×ÙµÛÞ¢ßà à©àªà¶¡à¹à¼à¼¦áá¨á¡ááááá¥\0\0\0\0\0\0á«áá¦á°á·á½¾â â°âââ»ââ ¤â¤â´â¹â¿ããºã¹ã¬ã£¾ã¨¨ã©±ã« 㬮à EMabcfglmnoprstu\\bfms�¦³¹ÃÃligè»ÃäPè»&ä¦cuteè»Ãäreve;äÄiyx}rcè»Ãä;är;ìðraveè»Ãäpha;äacr;äd;æ©Ägp¡on;äf;ìð¸plyFunction;æ¡ingè»Ã
ä
Äcs¾Ãr;ìðign;æildeè»Ãämlè»ÃäÐaceforsuåûþÄÄĢħĪÄcrêòkslash;æÅ¶Ã¶Ã¸;æ«§ed;æy;äÆcrtÄ
ÄÄause;æµnoullis;æ¬a;är;ìð
pf;ìð¹eve;äcòÄmpeq;æÜHOacdefhilorsuÅÅÅÆÆÆ¢ÆµÆ·ÆºÇÈɳɸɾcy;ä§PYè»Â©ä©ÆcpyÅŢźute;äÄ;iŧŨætalDifferentialD;æ
leys;æÈaeioÆÆÆÆron;ädilè»Ãärc;änint;æ°ot;äÄdnƧÆilla;ä¸terDot;ä·Ã²Å¿i;ä§rcleÈDMPTÇÇÇÇot;æinus;ælus;æimes;æoÄcsǢǸkwiseContourIntegral;æ²eCurlyÄDQÈÈoubleQuote;æuote;æÈlnpuÈȨÉÉonÄ;eȥȦæ·;æ©´ÆgitȯȶȺruent;æ¡nt;æ¯ourIntegral;æ®ÄfrÉÉ;æoduct;ænterClockwiseContourIntegral;æ³oss;樯cr;ìðpÄ;CÊÊ
æap;æÖDJSZacefiosÊ Ê¬Ê°Ê´Ê¸ËËˡ˦̳ÒÄ;oŹʥtrahd;æ¤cy;äcy;ä
cy;äÆgrsÊ¿ËËger;æ¡r;æ¡hv;櫤ÄayËËron;ä;älÄ;tËËæa;är;ìðÄaf˫̧Äcm˰̢riticalÈADGTÌÌÌÌcute;ä´oÅ´ÌÌ;äbleAcute;ärave;ä ilde;äond;æferentialD;æ
Ѱ̽\0\0\0ÍÍ\0Ð
f;ìð»Æ;DEÍÍÍä¨ot;æqual;æbleÌCDLRUVͣͲÎÏϢϸontourIntegraìȹoɴ͹\0\0ͻ»ÍnArrow;æÄeoÎΤftÆARTÎÎΡrrow;æightArrow;æeÃ¥ËngÄLRΫÏeftÄARγιrrow;æ¸ightArrow;æºightArrow;æ¹ightÄATÏÏrrow;æee;æ¨pÉÏ©\0\0ϯrrow;æownArrow;æerticalBar;æ¥nÌABLRTaÐЪаÑѿͼrrowÆ;BUÐÐТæar;æ¤pArrow;æµreve;äeftËк\0Ñ\0ÑightVector;æ¥eeVector;æ¥ectorÄ;BÑÑæ½ar;æ¥ightÇѧ\0ѱeeVector;æ¥ectorÄ;BѺѻæar;æ¥eeÄ;AÒÒæ¤rrow;æ§ÄctÒÒr;ìðrok;äà NTacdfglmopqstuxÒ½ÓÓÓÓÓ¢Ó§Ó®ÓµÔ¡Ô¯Ô¶ÕÕÕ Õ¥G;ä
Hè»Ãäcuteè»ÃäÆaiyÓÓÓron;ärcè»Ãä;äot;är;ìðraveè»Ãäement;æÄapÓºÓ¾cr;ätyÉÔ\0\0ÔmallSquare;æ»erySmallSquare;æ«ÄgpÔ¦Ôªon;äf;ìð¼silon;äuÄaiÔ¼ÕlÄ;TÕÕæ©µilde;ælibrium;æÄciÕÕr;æ°m;橳a;ämlè»ÃäÄipÕªÕ¯sts;æonentialE;æ
ÊcfiosÖ
ÖÖÖ²×y;ä¤r;ìðlledÉÖ\0\0Ö£mallSquare;æ¼erySmallSquare;æªÍ°Öº\0Ö¿\0\0×f;ìð½All;æriertrf;æ±cÃ²×ØJTabcdfgorst×¨×¬×¯×ºØØØØØØ£Ù¬Ù²cy;äè»>ä¾mmaÄ;d׷׸ä;äreve;äÆeiyØØØdil;ä¢rc;ä;äot;ä r;ìð;æpf;ìð¾eaterÌEFGLSTصÙÙÙÙÙ¦qualÄ;Lؾؿæ¥ess;æullEqual;æ§reater;檢ess;æ·lantEqual;橾ilde;æ³cr;ìð¢;æ«ÐAacfiosuÚ
ÚÚÚÚÚªÚ¾ÛRDcy;äªÄctÚÚek;ä;äirc;ä¤r;ælbertSpace;æÇ°Ú¯\0Ú²f;æizontalLine;æÄctÛÛ
òکrok;ä¦mpÅÛÛownHumðįqual;æÜEJOacdfgmnostuÛºÛ¾ÜÜÜÜÜܡܨÝݸÞÞÞcy;älig;ä²cy;äcuteè»ÃäÄiyÜÜrcè»Ãä;äot;ä°r;æraveè»ÃäÆ;apÜ Ü¯Ü¿ÄcgÜ´Ü·r;äªinaryI;æ
lieóÏÇ´Ý\0Ý¢Ä;eÝÝæ¬ÄgrÝÝral;æ«section;æisibleÄCTݬݲomma;æ£imes;æ¢ÆgptÝ¿ÞÞon;ä®f;ìða;äcr;æilde;ä¨Ç«Þ\0Þcy;älè»ÃäÊcfosuÞ¬Þ·Þ¼ßßÄiyÞ±Þµrc;ä´;är;ìðpf;ìðÇ£ß\0ßr;ìð¥rcy;äkcy;äÎHJacfosߤߨ߽߬߱à à cy;ä¥cy;äppa;äÄeyß¶ß»dil;ä¶;är;ìðpf;ìðcr;ìð¦ÖJTaceflmostà ¥à ©à ¬à¡à¡£à¦³à¦¸à§à§à¨·à©cy;äè»<ä¼Êcmnprà ·à ¼à¡à¡à¡ute;ä¹bda;äg;æªlacetrf;ær;æÆaeyà¡à¡à¡¡ron;ä½dil;ä»;äÄfsࡨ॰tÔACDFRTUVarࡾࢩࢱࣦ࣠ࣼयà¥Î४Änrà¢à¢gleBracket;æ¨rowÆ;BRà¢à¢à¢æar;æ¤ightArrow;æeiling;æoǵࢷ\0à£bleBracket;æ¦nÇà£\0à£eeVector;楡ectorÄ;Bà£à£æar;æ¥loor;æightÄAV࣯ࣵrrow;æector;æ¥Äerà¤à¤eÆ;AVà¤à¤à¤æ£rrow;æ¤ector;æ¥iangleÆ;BEतथऩæ²ar;æ§qual;æ´pÆDTVषà¥à¥ownVector;æ¥eeVector;æ¥ ectorÄ;Bà¥à¥æ¿ar;æ¥ectorÄ;B॥०æ¼ar;æ¥ightáÎsÌEFGLSTॾà¦à¦à¦à¦¢à¦qualGreater;æullEqual;æ¦reater;æ¶ess;檡lantEqual;橽ilde;æ²r;ìðÄ;eঽাæftarrow;æidot;ä¿Ænpwà§à¨à¨gÈLRlrà§à§·à¨à¨eftÄAR০৬rrow;æµightArrow;æ·ightArrow;æ¶eftÄarγà¨ightáοightáÏf;ìðerÄLRਢਬeftArrow;æightArrow;æÆchtਾà©à©Ã²à¡;æ°rok;ä
;æªÐacefiosuà©à©à© ੷੼àª
àªàªp;æ¤
y;äÄdl੥੯iumSpace;ælintrf;æ³r;ìðnusPlus;æpf;ìðcò੶;äÒJacefostuણધàªà«à¬à¬à¶à¶à¶cy;äcute;ä
Æaey઴હાron;ä
dil;ä
;äÆgswà«à«°à¬ativeÆMTVà«à«à«¨ediumSpace;æhiÄcn૦à«Ã«à«eryThiîà«tedÄGL૸à¬reaterGreateòٳessLesóà©Line;är;ìðÈBnptଢନଷ଺reak;æ BreakingSpace;ä f;æÚ;CDEGHLNPRSTVàààªà¼à®¡à¯«à°à±à²à²¦à³àµ¡à¶
櫬Äouàà¤ngruent;æ¢pCap;æoubleVerticalBar;æ¦Ælqxà®à®à®ement;æualÄ;Tà®à®æ ilde;ìâ̸ists;æreaterÎ;EFGLSTஶஷ஽à¯à¯à¯à¯¥æ¯qual;æ±ullEqual;ìâ§Ì¸reater;ìâ«Ì¸ess;æ¹lantEqual;ì⩾̸ilde;æµumpÅ௲௽ownHump;ìâ̸qual;ìâ̸eÄfsà°à°§tTriangleÆ;BEà°à°à°¡æªar;ìâ§Ì¸qual;æ¬sÌ;EGLSTవశ఼à±à±à±æ®qual;æ°reater;æ¸ess;ìâªÌ¸lantEqual;ì⩽̸ilde;æ´estedÄGL౨౹reaterGreater;ì⪢̸essLess;ì⪡̸recedesÆ;ESà²à²à²æqual;ì⪯̸lantEqual;æ ÄeiಫಹverseElement;æghtTriangleÆ;BEà³à³à³æ«ar;ìâ§Ì¸qual;æÄquà³à´uareSuÄbp೨೹setÄ;Eà³°à³³ìâ̸qual;æ¢ersetÄ;Eà´à´ìâ̸qual;æ£Æbcpà´à´¤àµsetÄ;Eà´à´ìââqual;æceedsÈ;ESTà´²à´³à´»àµæqual;ì⪰̸lantEqual;æ¡ilde;ìâ¿Ì¸ersetÄ;Eàµàµìââqual;æildeÈ;EFT൮൯൵ൿæqual;æullEqual;æilde;æerticalBar;æ¤cr;ìð©ildeè»Ãä;äÜEacdfgmoprstuvà¶½à·à·à·à·à· à·§à·¼à¸à¸ ยา฿à¹lig;ä
cuteè»ÃäÄiyà·à·rcè»Ãä;äblac;ä
r;ìðraveè»ÃäÆaei෮ෲ෶cr;ä
ga;ä©cron;äpf;ìðenCurlyÄDQà¸à¸oubleQuote;æuote;æ;æ©Äclวฬr;ìðªashè»ÃäiŬื฼deè»Ãäes;樷mlè»ÃäerÄBPà¹à¹ Äarà¹à¹r;æ¾acÄekà¹à¹;æet;æ´arenthesis;æÒacfhilors๿àºàºàºàºàºàºàº°à»¼rtialD;æy;är;ìði;ä¦;ä usMinus;ä±ÄipຢàºncareplanÃ¥Úf;æÈ;eio຺ູ໠໤檻cedesÈ;ESTà»à»à»à»æºqual;檯lantEqual;æ¼ilde;æ¾me;æ³Ädp໩໮uct;æortionÄ;aȥ໹l;æÄcià¼à¼r;ìð«;ä¨ÈUfosà¼à¼à¼à¼OTè»"ä¢r;ìðpf;æcr;ìð¬ØBEacefhiorsu༾à½à½à½ ཱིྦྷྪà¾áá©á´á¾arr;æ¤Gè»Â®ä®Æcnrà½à½à½ute;ä
g;æ«rÄ;tà½à½æ l;æ¤Æaeyཧཬཱron;ä
dil;ä
;ä Ä;vླྀཹæerseÄEUà¾à¾Älqà¾à¾ement;æuilibrium;æpEquilibrium;楯r»ཹo;ä¡ghtÐACDFTUVaà¿à¿«à¿³á¢á¨ááÏÄnrà¿à¿gleBracket;æ©rowÆ;BLà¿à¿à¿¡æar;æ¥eftArrow;æeiling;æoǵ࿹\0á
bleBracket;æ§nÇá\0áeeVector;æ¥ectorÄ;Bááæar;æ¥loor;æÄerááeÆ;AVáµá¶á¼æ¢rrow;æ¦ector;æ¥iangleÆ;BEáááæ³ar;æ§qual;æµpÆDTVá£á®á¸ownVector;æ¥eeVector;æ¥ectorÄ;Bááæ¾ar;æ¥ectorÄ;Bááæar;æ¥Äpuááf;ændImplies;楰ightarrow;æÄchá¹á¼r;æ;æ±leDelayed;æ§´ÚHOacfhimoqstuá¤á±á·á½ááá
á
á
¡á
§áµá»á¿ÄCcá©á®Hcy;ä©y;ä¨FTcy;ä¬cute;ä
Ê;aeiyáááááæª¼ron;ä
dil;ä
rc;ä
;ä¡r;ìðortÈDLRUáªá´á¾á
ownArrow»ÐeftArrow»à¢ightArrow»à¿pArrow;ægma;ä£allCircle;æpf;ìðɲá
\0\0á
°t;æareÈ;ISUá
ȇ
¼áá¯æ¡ntersection;æuÄbpáásetÄ;Eááæqual;æersetÄ;Eá¨á©æqual;ænion;æcr;ìð®ar;æÈbcmpááááÄ;sááæetÄ;Eááqual;æÄchá á
eedsÈ;ESTáá®á´á¿æ»qual;檰lantEqual;æ½ilde;æ¿Tháà¾;æÆ;esááá£ærsetÄ;Eááæqual;æet»áÖHRSacfhiorsá¾ááááá±á¶ááááORNè»ÃäADE;æ¢ÄHcáácy;äy;ä¦Äbuáá;ä;䤯aeyá¥áªá¯ron;ä
¤dil;ä
¢;ä¢r;ìðÄeiá»áDzá\0áefore;æ´a;äÄcnáákSpace;ìââSpace;ældeÈ;EFTá«á¬á²á¼æ¼qual;æullEqual;æ
ilde;æpf;ìðipleDot;æÄctáár;ìð¯rok;ä
¦à«¡á·ááá¦\0á¬á±\0\0\0\0\0á¸á½á·á
\0á¿áááÄcrá»áuteè»ÃärÄ;oááæcir;æ¥rÇ£á\0áy;äve;ä
¬Äiyáá£rcè»Ãä;ä£blac;ä
°r;ìðraveè»Ãäacr;ä
ªÄdiáá©erÄBPááÄaráár;äacÄekáá;æet;æµarenthesis;æonÄ;Pá°á±ælus;æÄgpá»á¿on;ä
²f;ìðÐADETadpsáá®á¸áϨááá³rrowÆ;BDá
á á¤ar;æ¤ownArrow;æ
ownArrow;æquilibrium;楮eeÄ;Aááæ¥rrow;æ¥ownáϳerÄLRáá¨eftArrow;æightArrow;æiÄ;lá¹áºäon;ä¥ing;ä
®cr;ìð°ilde;ä
¨mlè»ÃäÒDbcdefosvá§á¬á°á³á¾á
áááash;æ«ar;æ««y;äashÄ;lá»á¼æ©;櫦Äeráá
;æÆbtyáááºar;æÄ;iáácalÈBLSTá¡á¥áªá´ar;æ£ine;ä¼eparator;æilde;æThinSpace;ær;ìðpf;ìðcr;ìð±dash;æªÊcefosá§á¬á±á¶á¼irc;ä
´dge;ær;ìðpf;ìðcr;ìð²Èfiosáááár;ìð;äpf;ìðcr;ìð³ÒAIUacfosuá±áµá¹á½ááááá cy;ä¯cy;äcy;ä®cuteè»ÃäÄiyáárc;ä
¶;ä«r;ìðpf;ìðcr;ìð´ml;ä
¸ÐHacdefosáµá¹á¿áááá á¤cy;äcute;ä
¹Äayááron;ä
½;äot;ä
»Ç²á\0áoWidtèà«a;är;æ¨pf;æ¤cr;ìðµà¯¡ááá\0á°á¶á¿\0\0\0\0ááá«áá\0ááá²á¹\0á¾cuteè»Ã¡ä¡reve;äÌ;Ediuyááá¡á£á¨áæ¾;ìâ¾Ì³;æ¿rcè»Ã¢ä¢teè»Â´Ì;ä°ligè»Ã¦ä¦Ä;r²áº;ìðraveè»Ã ä ÄepááÄfpáásym;æµÃ¨áha;ä±ÄapácÄclá¤á§r;äg;樿ɤá°\0\0áÊ;adsváºá»á¿ááæ§nd;æ©;æ©lope;æ©;æ©Î;elmrszááááá¿ááæ ;榤e»ásdÄ;aá¥á¦æ¡Ñ¡á°á²á´á¶á¸áºá¼á¾;榨;榩;榪;榫;榬;æ¦;榮;榯tÄ;vá
áæbÄ;dááæ¾;æ¦Äptááh;æ¢Â»Â¹arr;æ¼Ägpá£á§on;ä
f;ìðÎ;Eaeiopáá»á½áááá;æ©°cir;橯;æd;æs;ä§roxÄ;eááñáingè»Ã¥ä¥Æctyá¡á¦á¨r;ìð¶;äªmpÄ;eáá¯Ã±Êildeè»Ã£ä£mlè»Ã¤ä¤Äciááoninôɲnt;æ¨à Nabcdefiklnoprsuáá±á°á¼ááá¸á½á á¦á ¹á¡á᤽á¥á¥°ot;æ«Äcrá¶ákÈcepsáá
ááong;æpsilon;ä¶rime;æµimÄ;eááæ½q;æÅ¶á¢á¦ee;æ½edÄ;gá¬áæ
e»árkÄ;táá·brk;æ¶Äoyáá;ä±quo;æÊcmprtááá¡á¤á¨ausÄ;eÄÄptyv;榰séánoÃµÄÆahwá¯á±á³;ä²;æ¶een;æ¬r;ìðgÎcostuvwááá³ááááÆaiuáááÃ°Ý rc;æ¯pÂ»á±Ædptá¤á¨áot;æ¨lus;æ¨imes;æ¨É±á¹\0\0á¾cup;æ¨ar;æ
riangleÄduááown;æ½p;æ³plus;æ¨eÃ¥áÃ¥áarow;æ¤Æakoáá ¦á µÄcná²á £kÆlstáºÖ«á ozenge;æ§«riangleÈ;dlrá á á á æ´own;æ¾eft;æight;æ¸k;æ£Æ±á «\0á ³Æ²á ¯\0á ±;æ;æ4;æck;æÄeoá ¾á¡Ä;qá¡á¡ì=â¥uiv;ìâ¡â¥t;æÈptwxá¡á¡á¡§á¡¬f;ìðÄ;táá¡£om»átie;æØDHUVbdhmptuvá¢
á¢á¢ªá¢»á£á£á£¬á£¿á¤
á¤á¤á¤¡ÈLRlrá¢á¢á¢á¢;æ;æ;æ;æÊ;DUduᢡᢢᢤᢦᢨæ;æ¦;æ©;æ¤;æ§ÈLRlrᢳᢵᢷᢹ;æ;æ;æ;æÎ;HLRhlrá£á£á£á£á£á£á£æ;æ¬;æ£;æ ;æ«;æ¢;æox;æ§ÈLRlrᣤᣦᣨᣪ;æ;æ;æ;æÊ;DUduڽ᣷᣹᣻᣽;æ¥;æ¨;æ¬;æ´inus;ælus;æimes;æ ÈLRlrá¤á¤á¤á¤;æ;æ;æ;æÎ;HLRhlrᤰᤱᤳᤵᤷ᤻᤹æ;æª;æ¡;æ;æ¼;æ¤;æÄevÄ£á¥barè»Â¦ä¦Èceioá¥á¥á¥á¥ r;ìð·mi;æmÄ;eáálÆ;bhᥨᥩᥫä;æ§
sub;æÅ¬á¥´á¥¾lÄ;e᥹᥺æ¢t»᥺pÆ;Eeįá¦
á¦;檮Ä;qÛÛೡᦧ\0᧨á¨á¨á¨²\0ᨷá©\0\0᪴\0\0á«\0\0ᬡᬮáá\0᯽\0á°Æcprá¦á¦²á§ute;äÌ;abcdsᦿá§á§á§á§á§æ©nd;æ©rcup;æ©Äauá§á§p;æ©p;æ©ot;æ©;ìâ©ï¸Äeo᧢᧥t;æÃ®ÚÈaeiuá§°á§»á¨á¨
ǰ᧵\0᧸s;æ©on;ädilè»Ã§ä§rc;äpsÄ;sá¨á¨æ©m;æ©ot;äÆdmná¨á¨ ᨦilè»Â¸Æptyv;榲tè¢;eá¨á¨®ä¢räƲr;ìð Æceiᨽá©á©y;äckÄ;má©á©æark»á©;ärÎ;Ecefmsá©á© ᩢᩫ᪤᪪᪮æ;æ§Æ;elᩩᩪá©äq;æeɡᩴ\0\0áªrrowÄlr᩼áªeft;æºight;æ»ÊRSacdáªáªáªáªáªÂ»à½;æst;æirc;æash;ænint;æ¨id;櫯cir;æ§ubsÄ;u᪻᪼æ£it»᪼ˬá«á«á«º\0á¬onÄ;eá«á«äºÄ;qÃÃÉá«\0\0á«¢aÄ;tá«á«ä¬;äÆ;fl᫨᫩᫫æÃ®á
eÄmx᫱᫶ent»᫩eóÉǧ᫾\0á¬Ä;dá»á¬ot;æ©nÃ´ÉÆfryá¬á¬á¬;ìðoäÉè©;sÅá¬r;æÄaoᬥᬩrr;æµss;æÄcuᬲᬷr;ìð¸ÄbpᬼáÄ;eááæ«;æ«Ä;eááæ«;æ«dot;æ¯Îdelprvwá á¬á·á®á®¬á¯á¯¹arrÄlrá¨áª;椸;椵ɰá²\0\0áµr;æc;æarrÄ;pá¿á®æ¶;椽Ì;bcdosá®á®á®á®¡á®¥á®¨æªrcap;æ©Äauá®á®p;æ©p;æ©ot;ær;æ©
;ìâªï¸Èalrv᮵ᮿá¯á¯£rrÄ;mᮼᮽæ·;椼yÆevwá¯á¯á¯qɰá¯\0\0á¯reãá³uãáµee;æedge;æenè»Â¤ä¤earrowÄlrᯮ᯳eft»á®ight»ᮽeäá¯Äciá°á°oninôǷnt;æ±lcty;æà¦AHabcdefhijlorstuwz᰸᰻᰿á±á±©á±µá²á²á²¬á²·á³»á³¿á´áµ»á¶á¶«á¶»á·á·ròÎar;楥Èglrsá±á±á±á±ger;æ eth;æ¸Ã²á³hÄ;vá±á±æÂ»à¤Å«á±¡á±§arow;æ¤aãÌÄayᱮᱳron;ä;ä´Æ;ao̲ᱼá²ÄgrÊ¿á²r;ætseq;æ©·Æglmá²á²á²è»Â°ä°ta;ä´ptyv;榱ÄirᲣᲨsht;楿;ìð¡arÄlrᲳᲵ»à£Â»áÊaegsvá³Í¸á³á³á³ mÆ;oșá³á³ndÄ;șá³uit;æ¦amma;äin;æ²Æ;io᳧᳨᳸ä·deè÷;oá³§á³°ntimes;ænø᳷cy;äcɯá´\0\0á´rn;æop;æÊlptuwá´á´á´¢áµáµlar;ä¤f;ìðÊ;empsÌá´á´·á´½áµqÄ;dÍá´³ot;æinus;æ¸lus;æquare;æ¡blebarwedgåúnÆadhá®áµáµ§ownarrowóá²arpoonÄlrᵲᵶefôᲴighôᲶŢᵿá¶
karo÷à½É¯á¶\0\0á¶rn;æop;æÆcotá¶á¶£á¶¦Äryá¶á¶¡;ìð¹;äl;æ§¶rok;äÄdrá¶°á¶´ot;æ±iÄ;fá¶ºá æ¿Äahá·á·ròЩaòྦangle;榦Äciá·á·y;ägrarr;æ¿à¤Dacdefglmnopqrstuxá¸á¸á¸á¸¸Õ¸á¸¼á¹á¹¡á¹¾áº¥áº¯áº½á»¡á¼ªá¼·á½á½á½ÄDoá¸á´´oôá²Äcsá¸á¸uteè»Ã©ä©ter;æ©®ÈaioyḢḧḱḶron;ärÄ;cá¸á¸®æè»Ãªäªlon;æ;äot;äÄDrá¹á¹
ot;æ;ìð¢Æ;rsá¹á¹á¹æªaveè»Ã¨ä¨Ä;dá¹á¹æªot;æªÈ;ilsṪṫṲṴæªnters;æ§;æÄ;dṹṺæªot;æªÆapsáº
áºáºcr;ätyÆ;sváºáºáºæ
et»áºpÄ1;áºáº¤Ä³áº¡áº£;æ;æ
æÄgsẪẬ;ä
p;æÄgpẴẸon;äf;ìðÆalsá»á»á»rÄ;sá»á»æl;æ§£us;橱iÆ;lvá»á»á»äµon»á»;äµÈcsuvỪỳá¼á¼£Äioữḱrc»Ḯɩỹ\0\0á»»ÃÕantÄglá¼á¼tr»á¹ess»ṺÆaeiá¼á¼á¼ls;ä½st;ævÄ;DȵἠD;橸parsl;æ§¥ÄDaἯἳot;ærr;楱Æcdiá¼¾á½á»¸r;æ¯oôÍÄahá½á½;ä·è»Ã°ä°Ämrá½á½lè»Ã«ä«o;æ¬Æcipὡὤὧl;ä¡sôծÄeoὬὴctatioîÕnentialåչৡá¾\0á¾\0ᾡᾧ\0\0á¿á¿\0á¿\0ῦῪâ\0ââllingdotseñá¹y;ämale;æÆilrá¾á¾³á¿lig;èï¬É©á¾¹\0\0á¾½g;èï¬ig;èï¬;ìð£lig;èï¬lig;ìfjÆaltá¿á¿á¿¡t;æig;èï¬ns;æ±of;äǰ΅\0ῳf;ìðÄakÖ¿á¿·Ä;vῼ´æ;æ«artint;æ¨ÄaoââÄcsââαââ°â¸â
â\0âβâ¢â¥â§âªâ¬\0â®è»Â½ä½;æ
è»Â¼ä¼;æ
;æ
;æ
Ƴâ´\0â¶;æ
;æ
Ê´â¾â\0\0âè»Â¾ä¾;æ
;æ
5;æ
ƶâ\0â;æ
;æ
8;æ
l;æwn;æ¢cr;ìð»à¢Eabcdefgijlnorstvââââ¥â°â´â°âµâºâ¿âââ¸Ìâ¾â
âÄ;lÙâ;æªÆcmpâââute;äµmaÄ;dâá³ä³;æªreve;äÄiyâªâ®rc;ä;ä³ot;ä¡È;lqsؾÙâ½âÆ;qsؾÙâlanô٥È;cdlÙ¥âââ¥c;檩otÄ;oââæªÄ;lâ¢â£æª;æªÄ;eâªâìâï¸s;æªr;ìð¤Ä;gÙ³Ømel;æ·cy;äÈ;EajÙâââ;æª;檥;檤ÈEaesâââ©â´;æ©pÄ;pâ£â¤æªrox»â¤Ä;qâ®â¯æªÄ;qâ®âim;æ§pf;ìðÄciâ
â
r;æmÆ;elÙ«â
â
;æª;æªè>;cdlqr×®â
â
ªâ
®â
³â
¹Äciâ
¥â
§;檧r;橺ot;æPar;æ¦uest;橼Êadelsââ
ªâÙâǰâ\0âproøâr;楸qÄlqØ¿âlesóâiÃÙ«Äenâ£ârtneqq;ìâ©ï¸Ã
âªÔAabcefkosyâââ±âµâºâââ¯â¨â½ròΠÈilmrâââârsðáf»â¤ilôکÄdrâ â¤cy;äÆ;cwࣴâ«â¯ir;æ¥;æar;æirc;䥯alrââârtsÄ;uââæ¥it»âlip;æ¦con;æ¹r;ìð¥sÄewâ£â©arow;椥arow;椦Êamoprâºâ¾âââ£rr;æ¿tht;æ»kÄlrââeftarrow;æ©ightarrow;æªf;ìðbar;æÆcltâ¯â´â¸r;ìð½asèâ´rok;ä§Äbpââull;æhen»á±à«¡â£\0âª\0â¸â
â\0ââ³\0\0â¸â¢â§â¢â¿\0ââªâ´cuteè»ÃäÆ;iyݱâ°âµrcè»Ã®ä®;ä¸Äcxâ¼â¿y;äµclè»Â¡ä¡ÄfrÎâ;ìð¦raveè»Ã¬ä¬È;inoܾââ©â®Äinâ¢â¦nt;æ¨t;æfin;æ§ta;æ©lig;䳯aopâ¾ââÆcgtâ
ââr;䫯elpÜââinÃ¥ÞarÃ´Ü h;ä±f;æ·ed;äµÊ;cfotÓ´â¬â±â½âare;æ
inÄ;tâ¸â¹æie;æ§doôâÊ;celpÝââââ¡al;æºÄgrââeróá£Ã£âarhk;æ¨rod;樼Ècgptâ¯â²â¶â»y;äon;ä¯f;ìða;ä¹uestè»Â¿ä¿Äciââr;ìð¾nÊ;EdsvÓ´âââ¡Ó³;æ¹ot;æµÄ;vâ¦â§æ´;æ³Ä;iÝ·â®lde;ä©Ç«â¸\0â¼cy;älè»Ã¯ä¯Ìcfmosuââââ¡â§âµÄiyâârc;äµ;ä¹r;ìð§ath;ä·pf;ìðÇ£â¬\0â±r;ìð¿rcy;äkcy;äÐacfghjosâââ¢â§ââ±âµâ»ppaÄ;vââäº;ä°Äeyââ dil;ä·;äºr;ìð¨reen;ä¸cy;ä
cy;äpf;ìðcr;ìðà®ABEHabcdefghjlmnoprstuvâ°ââââââ½âââââ¥â¹â½ââ²âââ¨âââ â Æartâ·âºâ¼ròà§Ã²Îail;æ¤arr;æ¤Ä;gà¦â;æªar;楢ॣâ¥\0âª\0â±\0\0\0\0\0âµâº\0âââ\0â¹ute;äºmptyv;榴raîà¡bda;ä»gÆ;dlà¢ââ;æ¦Ã¥à¢;æª
uoè»Â«ä«rÐ;bfhlpstà¢ââ¦â©â«â®â±âµÄ;fà¢â£s;æ¤s;æ¤Ã«âp;æ«l;椹im;楳l;æ¢Æ;aeâ¿ââæª«il;æ¤Ä;sââæª;ìâªï¸Æabrââârr;æ¤rk;æ²Äakâ¢â¬cÄekâ¨âª;ä»;äÄesâ±â³;æ¦lÄduâ¹â»;æ¦;æ¦Èaeuyââââron;ä¾Ädiââil;ä¼Ã¬à¢°Ã¢â©;
vendor: 4,294 bytes, line 1259
1259ä»Ècqrsâ£â¦ââ½a;椶uoÄ;rà¸áÄduâ²â·har;楧shar;æ¥h;æ²Ê;fgqsââà¦â³â¿æ¤tÊahlrtââ¤â·ââ¨rrowÄ;tà¢â¡aéâ¶arpoonÄduâ¯â´own»Ñp»०eftarrows;æightÆahsââârrowÄ;sࣴࢧarpoonóà¾quigarro÷â°hreetimes;æÆ;qsâà¦âºlanôবÊ;cdgsবââââ¨c;檨otÄ;oââæ©¿Ä;rââæª;æªÄ;eâ¢â¥ìâï¸s;æªÊadegsâ³â¹â½ââpproøâot;æqÄgqââ
ôà¦gtòâôà¦iÃলÆilrâ࣡âsht;楼;ìð©Ä;Eà¦â£;æªÅ¡â©â¶rÄduâ²â®Ä;l॥â³;楪lk;æcy;äÊ;achtà©ââââròâorneòá´ard;楫ri;æºÄioââ¤dot;ä
ustÄ;aâ¬âæ°che»âÈEaesâ»â½ââ;æ¨pÄ;pââæªrox»âÄ;qââæªÄ;qââ»im;æ¦Ðabnoptwzâ©â´â·ââ¯âââÄnrâ®â±g;æ¬r;æ½rëà£gÆlmrâ¿ââeftÄar০âightá৲apsto;æ¼ightá৽parrowÄlrâ¥â©efôâight;æ¬Æaflâ¶â¹â½r;æ¦
;ìðus;æ¨imes;樴šââst;æÃ¡áÆ;efââá ænge»âarÄ;lâ¤â¥ä¨t;æ¦Êachmtâ³â¶â¼â
âròࢨorneòá¶arÄ;dà¾â;æ¥;æri;æ¿Ìachiqtââà©â¢â®â»quo;æ¹r;ìðmÆ;egলâªâ¬;æª;æªÄbuâªâ³oÄ;rà¸â¹;ærok;ä
è<;cdhilqrà «ââ¹ââ â¥âªâ°Äciââ;檦r;橹reÃ¥â²mes;æarr;楶uest;æ©»ÄPiâµâ¹ar;æ¦Æ;efâ à¤á ærÄduâ â shar;æ¥har;楦Äenâ â ¡rtneqq;ìâ¨ï¸Ã
â ÜDacdefhilnopsuâ¡â¡
â¢â¢â¢â¢ ⢥⢨â£â£¢â£¤àªâ£³â¤Dot;æºÈclprâ¡â¡â¡£â¡½rè»Â¯ä¯Äetâ¡â¡;æÄ;eâ¡â¡æ se»â¡Ä;sá»â¡¨toÈ;dluá»â¡³â¡·â¡»owîÒefôà¤Ã°áker;æ®Äoyâ¢â¢mma;権;ä¼ash;æasuredangle»á¦r;ìðªo;æ§Æcdn⢯⢴â£roè»ÂµäµÈ;acdá¤â¢½â£â£sôá§ir;æ«°otè»Â·ÆµusÆ;bdâ£á¤â£æÄ;uá´¼â£;横ţâ£â£¡p;æ«Ã²âðàªÄdp⣩⣮els;æ§f;ìðÄct⣸⣽r;ìðpos»áÆ;lmâ¤â¤â¤ä¼timap;æ¸à°GLRVabcdefghijlmoprstuvwâ¥â¥â¥¾â¦â¦â§â§©â¨â¨â©â©âªâªâª¤âª¨â¬â¬ââ¿â®®â°´â±§â±¼â³©Ägtâ¥â¥;ìâ̸Ä;vâ¥à¯ìâ«âÆeltâ¥â¥²â¥¶ftÄar⥡⥧rrow;æightarrow;æ;ìâ̸Ä;v⥻à±ìâªâightarrow;æÄDdâ¦â¦ash;æ¯ash;æ®Êbcnpt⦣⦧⦬⦱â§la»Ëute;ä
g;ìâ âÊ;Eiopà¶â¦¼â§â§
â§;ì⩰̸d;ìâ̸s;ä
roøà¶urÄ;aâ§â§æ®lÄ;sâ§à¬¸Ç³â§\0â§£pè»Â ଷmpÄ;e௹à°Êaeouyâ§´â§¾â¨â¨â¨Ç°â§¹\0â§»;æ©on;ä
dil;ä
ngÄ;dൾâ¨ot;ìâ©Ì¸p;æ©;ä½ash;æÎ;Aadqsxà®â¨©â¨â¨»â©â©
â©rr;ærÄhr⨳⨶k;椤Ä;oá²á°ot;ìâ̸uiöà£Äeiâ©â©ar;椨Ãà®istÄ;sà® à®r;ìð«ÈEestà¯
⩦⩹⩼Æ;qs஼â©à¯¡Æ;qs஼à¯
â©´lanô௢iÃ௪Ä;rà®¶âªÂ»à®·ÆAapâªâªâªrò⥱rr;æ®ar;櫲Æ;svà¾âªà¾Ä;d⪡⪢æ¼;æºcy;äÎAEadest⪷⪺⪾â«â«
⫶⫹rò⥦;ìâ¦Ì¸rr;ær;æ¥È;fqsà°»â«â«£â«¯tÄarâ«â«rro÷â«ightarroÃ·âªÆ;qs఻⪺⫪lanôà±Ä;sà±â«´Â»à°¶iÃà±Ä;rవ⫾iÄ;eà°à°¥iäà¶Äptâ¬â¬f;ìðè¬;inâ¬â¬â¬¶ä¬nÈ;Edvà®â¬¤â¬¨â¬®;ìâ¹Ì¸ot;ìâµÌ¸Ç¡à®â¬³â¬µ;æ·;æ¶iÄ;vಸ⬼ǡಸââ;æ¾;æ½Æaorââ£â©rÈ;astà»âââlleìà»l;ì⫽â¥;ìâ̸lint;æ¨Æ;ceà²â°â³uåಥÄ;cà²â¸Ä;eà²â½Ã±à²ÈAaitâ®â®â®â®§ròâ¦rrÆ;cwâ®â®â®æ;ì⤳̸;ìâ̸ghtarrow»â®riÄ;eà³à³Îchimpqu⮽â¯â¯â¬à¸â¯¤â¯¯È;cerà´²â¯à´·â¯uÃ¥àµ
;ìðortÉâ¬
\0\0â¯aráâmÄ;e൮â¯Ä;q൴൳suÄbp⯫â¯Ã¥à³¸Ã¥à´Æbcp⯶â°â°È;Ees⯿â°à´¢â°æ;ìâ«
̸etÄ;eà´â°qÄ;qà´£â°cÄ;eà´²â°Ã±à´¸È;EesⰢⰣàµâ°§æ
;ìâ«Ì¸etÄ;eàµâ°®qÄ;qൠⰣÈgilrⰽⰿâ±
â±Ã¬à¯ldeè»Ã±ä±Ã§à±iangleÄlrâ±â±eftÄ;eà°â±Ã±à°¦ightÄ;eà³â±¥Ã±à³Ä;mⱬâ±ä½Æ;esⱴⱵⱹä£ro;æp;æÒDHadgilrsâ²â²â²â²â²£â²°â²¶â³â³£ash;æarr;æ¤p;ìââash;æ¬ÄetⲨⲬ;ìâ¥â;ì>ânfin;æ§ÆAetâ²½â³â³
rr;æ¤;ìâ¤âÄ;râ³â³ì<âie;ìâ´âÄAtâ³â³rr;æ¤rie;ìâµâim;ìâ¼âÆAanâ³°â³´â´rr;ærÄhr⳺⳽k;椣Ä;oá§á¥ear;椧ááª\0\0\0\0\0\0\0\0\0\0\0\0\0â´\0â´¸âµâµ ⵥ⵲â¶á¬\0\0â¶â¶«\0â·â·\0â·â¸â¸«â¸¾â¹Äcsâ´±áªuteè»Ã³ä³Äiyâ´¼âµ
rÄ;cáªâµè»Ã´ä´;ä¾Êabios᪠âµâµÇâµlac;ä
v;樸old;榼lig;ä
Äcr⵩âµir;榿;ìð¬Í¯âµ¹\0\0âµ¼\0â¶n;äaveè»Ã²ä²;æ§Äbmâ¶à·´ar;榵Èacitâ¶â¶â¶¥â¶¨ròáªÄirâ¶â¶ r;榾oss;榻nÃ¥à¹;æ§Æaeiⶱⶵⶹcr;ä
ga;äÆcdnâ·â·
Çron;ä¿;榶pf;ìð Æaelâ·â·Çr;榷rp;榹Î;adiosvⷪⷫⷮâ¸â¸â¸â¸æ¨ròáªÈ;efmâ··â·¸â¸â¸
æ©rÄ;oⷾⷿæ´f»ⷿè»Âªäªè»Âºäºgof;æ¶r;æ©lope;æ©;æ©Æcloâ¸â¸¡â¸§Ã²â¸ashè»Ã¸ä¸l;æiŬⸯ⸴deè»ÃµäµesÄ;aÇ⸺s;樶mlè»Ã¶ä¶bar;æ½à«¡â¹\0â¹½\0âºâº\0⺢⺹\0\0â»àº\0â¼\0\0⼫⾼\0â¿rÈ;
vendor: 6,210 bytes, line 1259
1259astÐâ¹§â¹²àº
è¶;lâ¹â¹®ä¶leìÐɩ⹸\0\0â¹»m;櫳;櫽y;ä¿rÊcimptâºâºâºá¡¥âºnt;ä¥od;ä®il;æ°enk;æ±r;ìðÆimo⺨⺰⺴Ä;vâºâº®ä;ämaô੶ne;æÆ;tv⺿â»â»ächfork»´;äÄauâ»â»nÄckâ»â»kÄ;hâ´â»;æÃ¶â´sÒ;abcdemst⻳⻴á¤â»¹â»½â¼â¼â¼â¼ä«cir;樣ir;樢Äouáµâ¼;樥;橲nè»Â±àºim;樦wo;樧Æipuâ¼â¼ â¼¥ntint;æ¨f;ìð¡ndè»Â£ä£Ô;Eaceinosuà»â¼¿â½â½â½â¾â¾â¾â½¾â¾¶;檳p;檷uÃ¥à»Ä;cà»â½Ì;acensà»â½â½â½¦â½¨â½¾pproøâ½urlyeñà»Ã±à»Æaes⽯⽶⽺pprox;檹qq;檵im;æ¨iÃà»meÄ;sâ¾àº®æ²ÆEas⽸â¾â½ºÃ°â½µÆdfp໬â¾â¾¯Æals⾠⾥⾪lar;æ®ine;æurf;æÄ;t໻⾴ï໻rel;æ°Äciâ¿â¿
r;ìð
;äncsp;æÌfiopsuâ¿â¢â¿â¿¥â¿«â¿±r;ìð®pf;ìð¢rime;æcr;ìðÆaeo⿸ããtÄei⿾ã
rnionóڰnt;æ¨stÄ;eããä¿Ã±á¼Ã´à¼àªABHabcdefhilmnoprstuxããããã ãã«ã
ã
¢ã
²ãããã¤ã©ãã®ã²ãã°ã·Æartãããròá³Ã²Ïail;æ¤aròᱥar;楤Îcdenqrtã¨ãµã¸ã¿ãããÄeuãã±;ìâ½Ì±te;ä
iãá
®mptyv;榳gÈ;delà¿ããã;æ¦;榥åà¿uoè»Â»ä»rÖ;abcfhlpstwà¿ã¬ã¯ã·ã¹ã¼ã¾ããããp;極Ä;fà¿ ã´s;æ¤ ;椳s;æ¤Ã«âðâ®l;æ¥
im;楴l;æ£;æÄaiããil;æ¤oÄ;nããæ¶alÃ³à¼Æabrã§ãªã®ròá¥rk;æ³Äakã³ã½cÄekã¹ã»;ä½;äÄesãã;æ¦lÄduãã;æ¦;æ¦Èaeuyããã§ã©ron;ä
Ädiã¡ã¥il;ä
ì࿲âãº;äÈclqsã´ã·ã½ã
a;椷dhar;楩uoÄ;rÈÈh;æ³Æacgã
ã
à½lÈ;ipsླྀã
ã
ánÃ¥á»arôྩt;æÆilrã
©á£ã
®sht;楽;ìð¯Äaoã
·ãrÄduã
½ã
¿Â»Ñ»Ä;láã;楬Ä;vããä;䱯gnsãã¹ã¼htÌahlrstã¤ã°ããã¤ã®rrowÄ;tà¿ãaéãarpoonÄduã»ã¿owîã
¾p»áeftÄahããrrowó࿪arpoonóÕightarrows;æquigarro÷ãhreetimes;æg;äingdotseñἲÆahmãããrò࿪aòÕ;æoustÄ;aããæ±che»ãmid;æ«®Èabptã²ã½ããÄnrã·ãºg;ær;æ¾rëáÆaflãããr;æ¦;ìð£us;樮imes;樵Äapãã§rÄ;gã£ã¤ä©t;æ¦olint;æ¨aròã£Èachqã»ãá¼ã
quo;æºr;ìðÄbuã»ãoÄ;rÈÈÆhirããã reÃ¥ã¸mes;æiÈ;eflãªáá ¡ã«æ¹tri;æ§luhar;楨;æàµ¡ãããã¬ã¸ã±\0ãºã¤\0\0ã¬ã°\0ã¨ãããã±ãã±\0ã\0\0ã³cute;ä
quïâºÔ;Eaceinpsyáã³ãµã¿ããããã¦ã©;檴ǰãº\0ã¼;檸on;ä
¡uÃ¥á¾Ä;dá³ãil;ä
rc;ä
ÆEasããã;檶p;檺im;æ©olint;æ¨iÃá;äotÆ;beã´áµãµæ
;橦ÎAacmstxãããããã£ãrr;ærÄhrããëâ¨Ä;oਸ਼਴tè»Â§ä§i;ä»war;椩mÄinã©Ã°nuóñt;æ¶rÄ;oã¶âìð°Èacoyãããã rp;æ¯Ähyããcy;ä;ärtÉã\0\0ãiäá¤araì⹯è»ÂäÄgmã¨ã´maÆ;fvã±ã²ã²ä;äÐ;deglnprá«ã
ããããã¡ã¦ot;橪Ä;qá±á°Ä;Eããæª;æª Ä;Eããæª;æªe;ælus;樤arr;楲aròá½Èaeitã¸ãããÄlsã½ãlsetméãªhp;樳parsl;槤Ädlá£ãe;æ£Ä;eããæªªÄ;sã¢ã£æª¬;ìâª¬ï¸Æflpã®ã³ãtcy;äÄ;bã¸ã¹ä¯Ä;aã¾ã¿æ§r;æ¿f;ìð¤aÄdrãÐesÄ;uããæ it»ãÆcsuã ã¹ãÄauã¥ã¯pÄ;sáã«;ìâï¸pÄ;sá´ãµ;ìâï¸uÄbpã¿ãÆ;esááãetÄ;eáãñáÆ;esá¨áãetÄ;eá¨ãÃ±á®Æ;afá
»ã¦Ö°rÅ¥ã«Ö±Â»á
¼aròá
Ècemtã¹ã¾ãã
r;ìðtmîñiìãaræá¾ÄarããrÄ;fãá¿æÄanããightÄepã£ãªpsiloîỠhé⺯s»â¡Êbcmnpã»ãáããÒ;Edemnprsãããããã£ã¬ã±ã¶æ;æ«
ot;檽Ä;dáãot;æ«ult;æ«ÄEeã¨ãª;æ«;ælus;檿arr;楹Æeiuã½ããtÆ;enãã
ãqÄ;qáãeqÄ;qã«ã¨m;æ«Äbpãã;æ«;æ«cÌ;acensáã¬ã²ã¹ã»ã¦pproøãºurlyeñá¾Ã±á³Æaesãããpproøãqñãg;æªÚ123;Edehlmnpsã©ã¬ã¯áã²ã´ãããããã¨ãè»Â¹ä¹è»Â²ä²è»Â³ä³;æ«Äosã¹ã¼t;檾ub;æ«Ä;dá¢ã
ot;æ«sÄouããl;æb;æ«arr;楻ult;æ«ÄEeã¤ã¦;æ«;ælus;æ«Æeiuã´ããtÆ;enáã¼ãqÄ;qá¢ã²eqÄ;qã§ã¤m;æ«Äbpãã;æ«;æ«ÆAanãã ãrr;ærÄhrã¦ã¨Ã«â®Ä;oਫ਩war;椪ligè»Ãä௡ããã áã³ã¹\0ã¾ã\0\0\0\0\0ãã\0ãã¬\0\0\0ãɲã\0\0ãget;æ;ärÃ«à¹Æaeyã¦ã«ã°ron;ä
¥dil;ä
£;älrec;ær;ìð±Èeikoãããµã¼Ç²ã\0ãeÄ4fááaÆ;svãããä¸ym;äÄcnã¢ã²kÄasã¨ã®pproøáim»á¬sðáÄasãºã®Ã°árnè»Ã¾ä¾Ç¬Ìãâ§esèÃ;bdãããäÄ;aá¤ãr;樱;樰Æepsã¡ã£ãáâ©È;bcfÒã¬ã°ã´ot;æ¶ir;櫱Ä;oã¹ã¼ìð¥rk;æ«Ã¡ã¢rime;æ´Æaipããã¤dÃ¥áÎadempstã¡ããããããngleÊ;dlqrã°ã±ã¶ããæµown»ᶻeftÄ;eâ ã¾Ã±à¤®;æightÄ;eãªãñáot;æ¬inus;樺lus;樹b;æ§ime;樻ezium;æ¢Æchtã²ã½ãÄryã·ã»;ìð;äcy;ärok;ä
§Äioããxôá·headÄlrãã eftarro÷à¡ightarrow»à½à¤AHabcdfghlmoprstuwãããã¤ã°ã¼ã ã 㠣㠴ã¡ã¡ã¡«ã¢©ã£ã£ã£ªã£¶ròÏar;楣Äcrãã¢uteè»ÃºäºÃ²á
rÇ£ãª\0ãy;äve;ä
Äiyãµãºrcè»Ã»ä»;äÆabhã ã ã ròálac;ä
±aòáÄirã ã sht;楾;ìð²raveè»Ã¹ä¹Å¡ã §ã ±rÄlr㠬㠮»à¥Â»álk;æÄctã ¹ã¡É¯ã ¿\0\0ã¡rnÄ;eã¡
ã¡ær»ã¡op;æri;æ¸Äalã¡ã¡cr;ä
«è»Â¨ÍÄgp㡢㡦on;ä
³f;ìð¦Ìadhlsuá
㡸㡽á²ã¢ã¢ ownáá³arpoonÄlrã¢ã¢efôã ighô㠯iÆ;hlã¢ã¢ã¢ä
»áºon»ã¢parrows;æÆcit㢰ã£ã£É¯ã¢¶\0\0ã£rnÄ;e㢼㢽ær»㢽op;æng;ä
¯ri;æ¹cr;ìðÆdirã£ã£ã£¢ot;æ°lde;ä
©iÄ;fã°ã£¨Â»á Äam㣯㣲rò㢨lè»Ã¼ä¼angle;榧ÞABDacdeflnoprszã¤ã¤ã¤©ã¤ã¦µã¦¸ã¦½ã§ã§¤ã§¨ã§³ã§¹ã§½ã¨ã¨ ròϷarÄ;v㤦㤧櫨;æ«©asèϡÄnr㤲㤷grt;æ¦Îeknprstã£ã¥ã¥ã¥ã¥ã¥¤ã¦appáâothinÃ§áºÆhirã«â»ã¥opô⾵Ä;há·ã¥¢Ã¯ãÄiu㥩ã¥gmáã³Äbp㥲ã¦setneqÄ;q㥽ã¦ìâï¸;ìâ«ï¸setneqÄ;qã¦ã¦ìâï¸;ìâ«ï¸Ährã¦ã¦etáãiangleÄlr㦪㦯eft»थight»áy;ä²ashÂ»á¶Æelrã§ã§ã§Æ;beâ·ªã§ã§ar;æ»q;ælip;æ®Äbtã§á¨aòá©r;ìð³tré㦮suÄbp㧯㧱»à´Â»àµpf;ìð§roð໻tré㦴Äcuã¨ã¨r;ìðÄbpã¨ã¨nÄEeã¦ã¨Â»ã¥¾nÄEeã¦ã¨Â»ã¦igzag;æ¦Îcefoprs㨶㨻ã©ã©ã©ã©¡ã©ªirc;ä
µÄdiã©ã©Äbgã©
ã©ar;æ©eÄ;qáºã©;æerp;ær;ìð´pf;ìð¨Ä;eá¹ã©¦atèá¹cr;ìðà«£áãª\0ãª\0ãªãª\0\0ãªãª¨ãª«ãª¯\0\0ã«ã«\0ã«áátréár;ìðµÄAaãªãªròÏrò৶;ä¾ÄAa㪡㪤ròθrò৫aðâis;æ»Ædptá¤ãªµãª¾Äfl㪺á©;ìð©imÃ¥á²ÄAaã«ã«ròÏròà¨Äcqã«á¸r;ìðÄptáã«réáÐacefiosu㫰㫽ã¬ã¬ã¬ã¬ã¬ã¬¡cÄuyã«¶ã«»teè»Ã½ä½;äÄiyã¬ã¬rc;ä
·;änè»Â¥ä¥r;ìð¶cy;äpf;ìðªcr;ìðÄcm㬦㬩y;älè»Ã¿ä¿Ôacdefhioswããããã¤ã©ãã´ãºã®cute;ä
ºÄayããron;ä
¾;ä·ot;ä
¼Äetãã¡træáa;ä¶r;ìð·cy;ä¶grarr;æpf;ìð«cr;ìðÄjnã®
ã®;æj;æ
1259'.split("").map(e=>e.charCodeAt(0))),Y1t=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function X1t(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Y1t.get(e))!==null&&t!==void 0?t:e}var Ca;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Ca||(Ca={}));const Q1t=32;var Yp;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Yp||(Yp={}));function SL(e){return e>=Ca.ZERO&&e<=Ca.NINE}function Z1t(e){return e>=Ca.UPPER_A&&e<=Ca.UPPER_F||e>=Ca.LOWER_A&&e<=Ca.LOWER_F}function J1t(e){return e>=Ca.UPPER_A&&e<=Ca.UPPER_Z||e>=Ca.LOWER_A&&e<=Ca.LOWER_Z||SL(e)}function eyt(e){return e===Ca.EQUALS||J1t(e)}var _a;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(_a||(_a={}));var Jf;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Jf||(Jf={}));class tyt{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=_a.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Jf.Strict}startEntity(t){this.decodeMode=t,this.state=_a.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case _a.EntityStart:return t.charCodeAt(n)===Ca.NUM?(this.state=_a.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=_a.NamedEntity,this.stateNamedEntity(t,n));case _a.NumericStart:return this.stateNumericStart(t,n);case _a.NumericDecimal:return this.stateNumericDecimal(t,n);case _a.NumericHex:return this.stateNumericHex(t,n);case _a.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|Q1t)===Ca.LOWER_X?(this.state=_a.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=_a.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const s=r-n;this.result=this.result*Math.pow(i,s)+Number.parseInt(t.substr(n,s),i),this.consumed+=s}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(SL(i)||Z1t(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(SL(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Ca.SEMI)this.consumed+=1;else if(this.decodeMode===Jf.Strict)return 0;return this.emitCodePoint(X1t(this.result),this.consumed),this.errors&&(t!==Ca.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],s=(i&Yp.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const a=t.charCodeAt(n);if(this.treeIndex=nyt(r,i,this.treeIndex+Math.max(1,s),a),this.treeIndex<0)return this.result===0||this.decodeMode===Jf.Attribute&&(s===0||eyt(a))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],s=(i&Yp.VALUE_LENGTH)>>14,s!==0){if(a===Ca.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==Jf.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&Yp.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~Yp.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case _a.NamedEntity:return this.result!==0&&(this.decodeMode!==Jf.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case _a.NumericDecimal:return this.emitNumericEntity(0,2);case _a.NumericHex:return this.emitNumericEntity(0,3);case _a.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case _a.EntityStart:return 0}}}function nyt(e,t,n,r){const i=(t&Yp.BRANCH_LENGTH)>>7,s=t&Yp.JUMP_TABLE;if(i===0)return s!==0&&r===s?n:-1;if(s){const c=r-s;return c<0||c>=i?-1:e[n+c]-1}let a=n,o=a+i-1;for(;a<=o;){const c=a+o>>>1,u=e[c];if(u<r)a=c+1;else if(u>r)o=c-1;else return e[c+i]}return-1}var At;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(At||(At={}));var x0;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(x0||(x0={}));var Sc;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Sc||(Sc={}));var qe;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="str
1259ike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(qe||(qe={}));var z;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(z||(z={}));const ryt=new Map([[qe.A,z.A],[qe.ADDRESS,z.ADDRESS],[qe.ANNOTATION_XML,z.ANNOTATION_XML],[qe.APPLET,z.APPLET],[qe.AREA,z.AREA],[qe.ARTICLE,z.ARTICLE],[qe.ASIDE,z.ASIDE],[qe.B,z.B],[qe.BASE,z.BASE],[qe.BASEFONT,z.BASEFONT],[qe.BGSOUND,z.BGSOUND],[qe.BIG,z.BIG],[qe.BLOCKQUOTE,z.BLOCKQUOTE],[qe.BODY,z.BODY],[qe.BR,z.BR],[qe.BUTTON,z.BUTTON],[qe.CAPTION,z.CAPTION],[qe.CENTER,z.CENTER],[qe.CODE,z.CODE],[qe.COL,z.COL],[qe.COLGROUP,z.COLGROUP],[qe.DD,z.DD],[qe.DESC,z.DESC],[qe.DETAILS,z.DETAILS],[qe.DIALOG,z.DIALOG],[qe.DIR,z.DIR],[qe.DIV,z.DIV],[qe.DL,z.DL],[qe.DT,z.DT],[qe.EM,z.EM],[qe.EMBED,z.EMBED],[qe.FIELDSET,z.FIELDSET],[qe.FIGCAPTION,z.FIGCAPTION],[qe.FIGURE,z.FIGURE],[qe.FONT,z.FONT],[qe.FOOTER,z.FOOTER],[qe.FOREIGN_OBJECT,z.FOREIGN_OBJECT],[qe.FORM,z.FORM],[qe.FRAME,z.FRAME],[qe.FRAMESET,z.FRAMESET],[qe.H1,z.H1],[qe.H2,z.H2],[qe.H3,z.H3],[qe.H4,z.H4],[qe.H5,z.H5],[qe.H6,z.H6],[qe.HEAD,z.HEAD],[qe.HEADER,z.HEADER],[qe.HGROUP,z.HGROUP],[qe.HR,z.HR],[qe.HTML,z.HTML],[qe.I,z.I],[qe.IMG,z.IMG],[qe.IMAGE,z.IMAGE],[qe.INPUT,z.INPUT],[qe.IFRAME,z.IFRAME],[qe.KEYGEN,z.KEYGEN],[qe.LABEL,z.LABEL],[qe.LI,z.LI],[qe.LINK,z.LINK],[qe.LISTING,z.LISTING],[qe.MAIN,z.MAIN],[qe.MALIGNMARK,z.MALIGNMARK],[qe.MARQUEE,z.MARQUEE],[qe.MATH,z.MATH],[qe.MENU,z.MENU],[qe.META,z.META],[qe.MGLYPH,z.MGLYPH],[qe.MI,z.MI],[qe.MO,z.MO],[qe.MN,z.MN],[qe.MS,z.MS],[qe.MTEXT,z.MTEXT],[qe.NAV,z.NAV],[qe.NOBR,z.NOBR],[qe.NOFRAMES,z.NOFRAMES],[qe.NOEMBED,z.NOEMBED],[qe.NOSCRIPT,z.NOSCRIPT],[qe.OBJECT,z.OBJECT],[qe.OL,z.OL],[qe.OPTGROUP,z.OPTGROUP],[qe.OPTION,z.OPTION],[qe.P,z.P],[qe.PARAM,z.PARAM],[qe.PLAINTEXT,z.PLAINTEXT],[qe.PRE,z.PRE],[qe.RB,z.RB],[qe.RP,z.RP],[qe.RT,z.RT],[qe.RTC,z.RTC],[qe.RUBY,z.RUBY],[qe.S,z.S],[qe.SCRIPT,z.SCRIPT],[qe.SEARCH,z.SEARCH],[qe.SECTION,z.SECTION],[qe.SELECT,z.SELECT],[qe.SOURCE,z.SOURCE],[qe.SMALL,z.SMALL],[qe.SPAN,z.SPAN],[qe.STRIKE,z.STRIKE],[qe.STRONG,z.STRONG],[qe.STYLE,z.STYLE],[qe.SUB,z.SUB],[qe.SUMMARY,z.SUMMARY],[qe.SUP,z.SUP],[qe.TABLE,z.TABLE],[qe.TBODY,z.TBODY],[qe.TEMPLATE,z.TEMPLATE],[qe.TEXTAREA,z.TEXTAREA],[qe.TFOOT,z.TFOOT],[qe.TD,z.TD],[qe.TH,z.TH],[qe.THEAD,z.THEAD],[qe.TITLE,z.TITLE],[qe.TR,z.TR],[qe.TRACK,z.TRACK],[qe.TT,z.TT],[qe.U,z.U],[qe.UL,z.UL],[qe.SVG,z.SVG],[qe.VAR,z.VAR],[qe.WBR,z.WBR],[qe.XMP,z.XMP]]);function db(e){var t;return(t=ryt.get(e))!==null&&t!==void 0?t:z.UNKNOWN}const It=z,iyt={[At.HTML]:new Set([It.ADDRESS,It.APPLET,It.AREA,It.ARTICLE,It.ASIDE,It.BASE,It.BASEFONT,It.BGSOUND,It.BLOCKQUOTE,It.BODY,It.BR,It.BUTTON,It.CAPTION,It.CENTER,It.COL,It.COLGROUP,It.DD,It.DETAILS,It.DIR,It.DIV,It.DL,It.DT,It.EMBED,It.FIELDSET,It.FIGCAPTION,It.FIGURE,It.FOOTER,It.FORM,It.FRAME,It.FRAMESET,It.H1,It.H2,It.H3,It.H4,It.H5,It.H6,It.HEAD,It.HEADER,It.HGROUP,It.HR,It.HTML,It.IFRAME,It.IMG,It.INPUT,It.LI,It.LINK,It.LISTING,It.MAIN,It.MARQUEE,It.MENU,It.META,It.NAV,It.NOEMBED,It.NOFRAMES,It.NOSCRIPT,It.OBJECT,It.OL,It.P,It.PARAM,It.PLAINTEXT,It.PRE,It.SCRIPT,It.SECTION,It.SELECT,It.SOURCE,It.STYLE,It.SUMMARY,It.TABLE,It.TBODY,It.TD,It.TEMPLATE,It.TEXTAREA,It.TFOOT,It.TH,It.THEAD,It.TITLE,It.TR,It.TRACK,It.UL,It.WBR,It.XMP]),[At.MATHML]:new Set([It.MI,It.MO,It.MN,It.MS,It.MTEXT,It.ANNOTATION_XML]),[At.SVG]:new Set([It.TITLE,It.FOREIGN_OBJECT,It.DESC]),[At.XLINK]:new Set,[At.XML]:new Set,[At.XMLNS]:new Set},EL=new Set([It.H1,It.H2,It.H3,It.H4,It.H5,It.H6]);qe.STYLE,qe.SCRIPT,qe.XMP,qe.IFRAME,qe.NOEMBED,qe.NOFRAMES,qe.PLAINTEXT;var Ce;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(Ce||(Ce={}));const Ds={DATA:Ce.DATA,RCDATA:Ce.RCDATA,RAWTEXT:Ce.RAWTEXT,SCRIPT_DATA:Ce.SCRIPT_DATA,PLAINTEXT:Ce.PLAINTEXT,CDATA_SECTION:Ce.CDATA_SECTION};function syt(e){return e>=ge.DIGIT_0&&e<=ge.DIGIT_9}function ww(e){return e>=ge.LATIN_CAPITAL_A&&e<=ge.LATIN_CAPITAL_Z}function ayt(e){return e>=ge.LATIN_SMALL_A&&e<=ge.LATIN_SMALL_Z}function Mp(e){return ayt(e)||ww(e)}function vne(e){return Mp(e)||syt(e)}function BA(e){return e+32}function s_e(e){return e===ge.SPACE||e===ge.LINE_FEED||e===ge.TABULATION||e===ge.FORM_FEED}function yne(e){return s_e(e)||e===ge.SOLIDUS||e===ge.GREATER_THAN_SIGN}function oyt(e){return e===ge.NULL?it.nullCharacterReference:e>1114111?it.characterReferenceOutsideUnicodeRange:t_e(e)?it.surrogateCharacterReference:r_e(e)?it.noncharacterCharacterReference:n_e(e)||e===ge.CARRIAGE_RETURN?
vendor: 122,617 bytes, lines 1259-1260
1259it.controlCharacterReference:null}class lyt{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=Ce.DATA,this.returnState=Ce.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new G1t(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new tyt(K1t,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(it.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(it.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=oyt(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:pr.START_TAG,tagName:"",tagID:z.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:pr.END_TAG,tagName:"",tagID:z.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:pr.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:pr.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(i_e(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(it.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=db(t.tagName),t.type===pr.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(it.endTagWithAttributes),t.selfClosing&&this._err(it.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case pr.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case pr.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case pr.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:pr.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=s_e(t)?pr.WHITESPACE_CHARACTER:t===ge.NULL?pr.NULL_CHARACTER:pr.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(pr.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=Ce.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Jf.Attribute:Jf.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===Ce.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===Ce.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===Ce.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case Ce.DATA:{this._stateData(t);break}case Ce.RCDATA:{this._stateRcdata(t);break}case Ce.RAWTEXT:{this._stateRawtext(t);break}case Ce.SCRIPT_DATA:{this._stateScriptData(t);break}case Ce.PLAINTEXT:{this._statePlaintext(t);break}case Ce.TAG_OPEN:{this._stateTagOpen(t);break}case Ce.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case Ce.TAG_NAME:{this._stateTagName(t);break}case Ce.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case Ce.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case Ce.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case Ce.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case Ce.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case Ce.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case Ce.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case Ce.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case Ce.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case Ce.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case Ce.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case Ce.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case Ce.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case Ce.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case Ce.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case Ce.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case Ce.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case Ce.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case Ce.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case Ce.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case Ce.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case Ce.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case Ce.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case Ce.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case Ce.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case Ce.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case Ce.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case Ce.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case Ce.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case Ce.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case Ce.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case Ce.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case Ce.BOGUS_COMMENT:{this._stateBogusComment(t);break}case Ce.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case Ce.COMMENT_START:{this._stateCommentStart(t);break}case Ce.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case Ce.COMMENT:{this._stateComment(t);break}case Ce.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case Ce.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case Ce.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case Ce.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case Ce.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case Ce.COMMENT_END:{this._stateCommentEnd(t);break}case Ce.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case Ce.DOCTYPE:{this._stateDoctype(t);break}case Ce.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case Ce.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case Ce.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case Ce.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case Ce.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case Ce.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case Ce.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case Ce.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case Ce.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case Ce.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case Ce.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case Ce.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case Ce.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case Ce.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case Ce.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case Ce.CDATA_SECTION:{this._stateCdataSection(t);break}case Ce.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case Ce.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case Ce.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case Ce.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case ge.LESS_THAN_SIGN:{this.state=Ce.TAG_OPEN;break}case ge.AMPERSAND:{this._startCharacterReference();break}case ge.NULL:{this._err(it.unexpectedNullCharacter),this._emitCodePoint(t);break}case ge.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case ge.AMPERSAND:{this._startCharacterReference();break}case ge.LESS_THAN_SIGN:{this.state=Ce.RCDATA_LESS_THAN_SIGN;break}case ge.NULL:{this._err(it.unexpectedNullCharacter),this._emitChars(Yi);break}case ge.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case ge.LESS_THAN_SIGN:{this.state=Ce.RAWTEXT_LESS_THAN_SIGN;break}case ge.NULL:{this._err(it.unexpectedNullCharacter),this._emitChars(Yi);break}case ge.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case ge.LESS_THAN_SIGN:{this.state=Ce.SCRIPT_DATA_LESS_THAN_SIGN;break}case ge.NULL:{this._err(it.unexpectedNullCharacter),this._emitChars(Yi);break}case ge.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case ge.NULL:{this._err(it.unexpectedNullCharacter),this._emitChars(Yi);break}case ge.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Mp(t))this._createStartTagToken(),this.state=Ce.TAG_NAME,this._stateTagName(t);else switch(t){case ge.EXCLAMATION_MARK:{this.state=Ce.MARKUP_DECLARATION_OPEN;break}case ge.SOLIDUS:{this.state=Ce.END_TAG_OPEN;break}case ge.QUESTION_MARK:{this._err(it.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=Ce.BOGUS_COMMENT,this._stateBogusComment(t);break}case ge.EOF:{this._err(it.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(it.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=Ce.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Mp(t))this._createEndTagToken(),this.state=Ce.TAG_NAME,this._stateTagName(t);else switch(t){case ge.GREATER_THAN_SIGN:{this._err(it.missingEndTagName),this.state=Ce.DATA;break}case ge.EOF:{this._err(it.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(it.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=Ce.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:{this.state=Ce.BEFORE_ATTRIBUTE_NAME;break}case ge.SOLIDUS:{this.state=Ce.SELF_CLOSING_START_TAG;break}case ge.GREATER_THAN_SIGN:{this.state=Ce.DATA,this.emitCurrentTagToken();break}case ge.NULL:{this._err(it.unexpectedNullCharacter),n.tagName+=Yi;break}case ge.EOF:{this._err(it.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(ww(t)?BA(t):t)}}_stateRcdataLessThanSign(t){t===ge.SOLIDUS?this.state=Ce.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=Ce.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Mp(t)?(this.state=Ce.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=Ce.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=Ce.BEFORE_ATTRIBUTE_NAME,!1;case ge.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=Ce.SELF_CLOSING_START_TAG,!1;case ge.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=Ce.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=Ce.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===ge.SOLIDUS?this.state=Ce.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=Ce.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Mp(t)?(this.state=Ce.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=Ce.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=Ce.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case ge.SOLIDUS:{this.state=Ce.SCRIPT_DATA_END_TAG_OPEN;break}case ge.EXCLAMATION_MARK:{this.state=Ce.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=Ce.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Mp(t)?(this.state=Ce.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=Ce.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=Ce.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===ge.HYPHEN_MINUS?(this.state=Ce.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=Ce.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===ge.HYPHEN_MINUS?(this.state=Ce.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=Ce.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case ge.HYPHEN_MINUS:{this.state=Ce.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case ge.LESS_THAN_SIGN:{this.state=Ce.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case ge.NULL:{this._err(it.unexpectedNullCharacter),this._emitChars(Yi);break}case ge.EOF:{this._err(it.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case ge.HYPHEN_MINUS:{this.state=Ce.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case ge.LESS_THAN_SIGN:{this.state=Ce.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case ge.NULL:{this._err(it.unexpectedNullCharacter),this.state=Ce.SCRIPT_DATA_ESCAPED,this._emitChars(Yi);break}case ge.EOF:{this._err(it.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=Ce.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case ge.HYPHEN_MINUS:{this._emitChars("-");break}case ge.LESS_THAN_SIGN:{this.state=Ce.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case ge.GREATER_THAN_SIGN:{this.state=Ce.SCRIPT_DATA,this._emitChars(">");break}case ge.NULL:{this._err(it.unexpectedNullCharacter),this.state=Ce.SCRIPT_DATA_ESCAPED,this._emitChars(Yi);break}case ge.EOF:{this._err(it.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=Ce.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===ge.SOLIDUS?this.state=Ce.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Mp(t)?(this._emitChars("<"),this.state=Ce.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=Ce.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Mp(t)?(this.state=Ce.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=Ce.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=Ce.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Jo.SCRIPT,!1)&&yne(this.preprocessor.peek(Jo.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Jo.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=Ce.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=Ce.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case ge.HYPHEN_MINUS:{this.state=Ce.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case ge.LESS_THAN_SIGN:{this.state=Ce.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case ge.NULL:{this._err(it.unexpectedNullCharacter),this._emitChars(Yi);break}case ge.EOF:{this._err(it.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case ge.HYPHEN_MINUS:{this.state=Ce.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case ge.LESS_THAN_SIGN:{this.state=Ce.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case ge.NULL:{this._err(it.unexpectedNullCharacter),this.state=Ce.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Yi);break}case ge.EOF:{this._err(it.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=Ce.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case ge.HYPHEN_MINUS:{this._emitChars("-");break}case ge.LESS_THAN_SIGN:{this.state=Ce.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case ge.GREATER_THAN_SIGN:{this.state=Ce.SCRIPT_DATA,this._emitChars(">");break}case ge.NULL:{this._err(it.unexpectedNullCharacter),this.state=Ce.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Yi);break}case ge.EOF:{this._err(it.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=Ce.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===ge.SOLIDUS?(this.state=Ce.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=Ce.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Jo.SCRIPT,!1)&&yne(this.preprocessor.peek(Jo.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Jo.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=Ce.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=Ce.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:break;case ge.SOLIDUS:case ge.GREATER_THAN_SIGN:case ge.EOF:{this.state=Ce.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case ge.EQUALS_SIGN:{this._err(it.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=Ce.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=Ce.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:case ge.SOLIDUS:case ge.GREATER_THAN_SIGN:case ge.EOF:{this._leaveAttrName(),this.state=Ce.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case ge.EQUALS_SIGN:{this._leaveAttrName(),this.state=Ce.BEFORE_ATTRIBUTE_VALUE;break}case ge.QUOTATION_MARK:case ge.APOSTROPHE:case ge.LESS_THAN_SIGN:{this._err(it.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case ge.NULL:{this._err(it.unexpectedNullCharacter),this.currentAttr.name+=Yi;break}default:this.currentAttr.name+=String.fromCodePoint(ww(t)?BA(t):t)}}_stateAfterAttributeName(t){switch(t){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:break;case ge.SOLIDUS:{this.state=Ce.SELF_CLOSING_START_TAG;break}case ge.EQUALS_SIGN:{this.state=Ce.BEFORE_ATTRIBUTE_VALUE;break}case ge.GREATER_THAN_SIGN:{this.state=Ce.DATA,this.emitCurrentTagToken();break}case ge.EOF:{this._err(it.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=Ce.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:break;case ge.QUOTATION_MARK:{this.state=Ce.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case ge.APOSTROPHE:{this.state=Ce.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case ge.GREATER_THAN_SIGN:{this._err(it.missingAttributeValue),this.state=Ce.DATA,this.emitCurrentTagToken();break}default:this.state=Ce.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case ge.QUOTATION_MARK:{this.state=Ce.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case ge.AMPERSAND:{this._startCharacterReference();break}case ge.NULL:{this._err(it.unexpectedNullCharacter),this.currentAttr.value+=Yi;break}case ge.EOF:{this._err(it.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case ge.APOSTROPHE:{this.state=Ce.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case ge.AMPERSAND:{this._startCharacterReference();break}case ge.NULL:{this._err(it.unexpectedNullCharacter),this.currentAttr.value+=Yi;break}case ge.EOF:{this._err(it.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:{this._leaveAttrValue(),this.state=Ce.BEFORE_ATTRIBUTE_NAME;break}case ge.AMPERSAND:{this._startCharacterReference();break}case ge.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=Ce.DATA,this.emitCurrentTagToken();break}case ge.NULL:{this._err(it.unexpectedNullCharacter),this.currentAttr.value+=Yi;break}case ge.QUOTATION_MARK:case ge.APOSTROPHE:case ge.LESS_THAN_SIGN:case ge.EQUALS_SIGN:case ge.GRAVE_ACCENT:{this._err(it.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case ge.EOF:{this._err(it.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:{this._leaveAttrValue(),this.state=Ce.BEFORE_ATTRIBUTE_NAME;break}case ge.SOLIDUS:{this._leaveAttrValue(),this.state=Ce.SELF_CLOSING_START_TAG;break}case ge.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=Ce.DATA,this.emitCurrentTagToken();break}case ge.EOF:{this._err(it.eofInTag),this._emitEOFToken();break}default:this._err(it.missingWhitespaceBetweenAttributes),this.state=Ce.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case ge.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=Ce.DATA,this.emitCurrentTagToken();break}case ge.EOF:{this._err(it.eofInTag),this._emitEOFToken();break}default:this._err(it.unexpectedSolidusInTag),this.state=Ce.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case ge.GREATER_THAN_SIGN:{this.state=Ce.DATA,this.emitCurrentComment(n);break}case ge.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case ge.NULL:{this._err(it.unexpectedNullCharacter),n.data+=Yi;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Jo.DASH_DASH,!0)?(this._createCommentToken(Jo.DASH_DASH.length+1),this.state=Ce.COMMENT_START):this._consumeSequenceIfMatch(Jo.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Jo.DOCTYPE.length+1),this.state=Ce.DOCTYPE):this._consumeSequenceIfMatch(Jo.CDATA_START,!0)?this.inForeignNode?this.state=Ce.CDATA_SECTION:(this._err(it.cdataInHtmlContent),this._createCommentToken(Jo.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=Ce.BOGUS_COMMENT):this._ensureHibernation()||(this._err(it.incorrectlyOpenedComment),this._createCommentToken(2),this.state=Ce.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case ge.HYPHEN_MINUS:{this.state=Ce.COMMENT_START_DASH;break}case ge.GREATER_THAN_SIGN:{this._err(it.abruptClosingOfEmptyComment),this.state=Ce.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=Ce.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case ge.HYPHEN_MINUS:{this.state=Ce.COMMENT_END;break}case ge.GREATER_THAN_SIGN:{this._err(it.abruptClosingOfEmptyComment),this.state=Ce.DATA,this.emitCurrentComment(n);break}case ge.EOF:{this._err(it.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=Ce.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case ge.HYPHEN_MINUS:{this.state=Ce.COMMENT_END_DASH;break}case ge.LESS_THAN_SIGN:{n.data+="<",this.state=Ce.COMMENT_LESS_THAN_SIGN;break}case ge.NULL:{this._err(it.unexpectedNullCharacter),n.data+=Yi;break}case ge.EOF:{this._err(it.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case ge.EXCLAMATION_MARK:{n.data+="!",this.state=Ce.COMMENT_LESS_THAN_SIGN_BANG;break}case ge.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=Ce.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===ge.HYPHEN_MINUS?this.state=Ce.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=Ce.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===ge.HYPHEN_MINUS?this.state=Ce.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=Ce.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==ge.GREATER_THAN_SIGN&&t!==ge.EOF&&this._err(it.nestedComment),this.state=Ce.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case ge.HYPHEN_MINUS:{this.state=Ce.COMMENT_END;break}case ge.EOF:{this._err(it.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=Ce.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case ge.GREATER_THAN_SIGN:{this.state=Ce.DATA,this.emitCurrentComment(n);break}case ge.EXCLAMATION_MARK:{this.state=Ce.COMMENT_END_BANG;break}case ge.HYPHEN_MINUS:{n.data+="-";break}case ge.EOF:{this._err(it.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=Ce.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case ge.HYPHEN_MINUS:{n.data+="--!",this.state=Ce.COMMENT_END_DASH;break}case ge.GREATER_THAN_SIGN:{this._err(it.incorrectlyClosedComment),this.state=Ce.DATA,this.emitCurrentComment(n);break}case ge.EOF:{this._err(it.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=Ce.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:{this.state=Ce.BEFORE_DOCTYPE_NAME;break}case ge.GREATER_THAN_SIGN:{this.state=Ce.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case ge.EOF:{this._err(it.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(it.missingWhitespaceBeforeDoctypeName),this.state=Ce.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(ww(t))this._createDoctypeToken(String.fromCharCode(BA(t))),this.state=Ce.DOCTYPE_NAME;else switch(t){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:break;case ge.NULL:{this._err(it.unexpectedNullCharacter),this._createDoctypeToken(Yi),this.state=Ce.DOCTYPE_NAME;break}case ge.GREATER_THAN_SIGN:{this._err(it.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=Ce.DATA;break}case ge.EOF:{this._err(it.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=Ce.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:{this.state=Ce.AFTER_DOCTYPE_NAME;break}case ge.GREATER_THAN_SIGN:{this.state=Ce.DATA,this.emitCurrentDoctype(n);break}case ge.NULL:{this._err(it.unexpectedNullCharacter),n.name+=Yi;break}case ge.EOF:{this._err(it.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(ww(t)?BA(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:break;case ge.GREATER_THAN_SIGN:{this.state=Ce.DATA,this.emitCurrentDoctype(n);break}case ge.EOF:{this._err(it.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Jo.PUBLIC,!1)?this.state=Ce.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Jo.SYSTEM,!1)?this.state=Ce.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(it.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=Ce.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:{this.state=Ce.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case ge.QUOTATION_MARK:{this._err(it.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=Ce.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case ge.APOSTROPHE:{this._err(it.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=Ce.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case ge.GREATER_THAN_SIGN:{this._err(it.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=Ce.DATA,this.emitCurrentDoctype(n);break}case ge.EOF:{this._err(it.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(it.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=Ce.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:break;case ge.QUOTATION_MARK:{n.publicId="",this.state=Ce.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case ge.APOSTROPHE:{n.publicId="",this.state=Ce.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case ge.GREATER_THAN_SIGN:{this._err(it.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=Ce.DATA,this.emitCurrentDoctype(n);break}case ge.EOF:{this._err(it.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(it.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=Ce.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case ge.QUOTATION_MARK:{this.state=Ce.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case ge.NULL:{this._err(it.unexpectedNullCharacter),n.publicId+=Yi;break}case ge.GREATER_THAN_SIGN:{this._err(it.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=Ce.DATA;break}case ge.EOF:{this._err(it.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case ge.APOSTROPHE:{this.state=Ce.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case ge.NULL:{this._err(it.unexpectedNullCharacter),n.publicId+=Yi;break}case ge.GREATER_THAN_SIGN:{this._err(it.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=Ce.DATA;break}case ge.EOF:{this._err(it.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:{this.state=Ce.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case ge.GREATER_THAN_SIGN:{this.state=Ce.DATA,this.emitCurrentDoctype(n);break}case ge.QUOTATION_MARK:{this._err(it.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=Ce.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case ge.APOSTROPHE:{this._err(it.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=Ce.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case ge.EOF:{this._err(it.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(it.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=Ce.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:break;case ge.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=Ce.DATA;break}case ge.QUOTATION_MARK:{n.systemId="",this.state=Ce.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case ge.APOSTROPHE:{n.systemId="",this.state=Ce.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case ge.EOF:{this._err(it.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(it.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=Ce.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:{this.state=Ce.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case ge.QUOTATION_MARK:{this._err(it.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=Ce.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case ge.APOSTROPHE:{this._err(it.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=Ce.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case ge.GREATER_THAN_SIGN:{this._err(it.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=Ce.DATA,this.emitCurrentDoctype(n);break}case ge.EOF:{this._err(it.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(it.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=Ce.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:break;case ge.QUOTATION_MARK:{n.systemId="",this.state=Ce.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case ge.APOSTROPHE:{n.systemId="",this.state=Ce.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case ge.GREATER_THAN_SIGN:{this._err(it.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=Ce.DATA,this.emitCurrentDoctype(n);break}case ge.EOF:{this._err(it.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(it.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=Ce.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case ge.QUOTATION_MARK:{this.state=Ce.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case ge.NULL:{this._err(it.unexpectedNullCharacter),n.systemId+=Yi;break}case ge.GREATER_THAN_SIGN:{this._err(it.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=Ce.DATA;break}case ge.EOF:{this._err(it.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case ge.APOSTROPHE:{this.state=Ce.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case ge.NULL:{this._err(it.unexpectedNullCharacter),n.systemId+=Yi;break}case ge.GREATER_THAN_SIGN:{this._err(it.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=Ce.DATA;break}case ge.EOF:{this._err(it.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case ge.SPACE:case ge.LINE_FEED:case ge.TABULATION:case ge.FORM_FEED:break;case ge.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=Ce.DATA;break}case ge.EOF:{this._err(it.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(it.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=Ce.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case ge.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=Ce.DATA;break}case ge.NULL:{this._err(it.unexpectedNullCharacter);break}case ge.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case ge.RIGHT_SQUARE_BRACKET:{this.state=Ce.CDATA_SECTION_BRACKET;break}case ge.EOF:{this._err(it.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===ge.RIGHT_SQUARE_BRACKET?this.state=Ce.CDATA_SECTION_END:(this._emitChars("]"),this.state=Ce.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case ge.GREATER_THAN_SIGN:{this.state=Ce.DATA;break}case ge.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=Ce.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(ge.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&vne(this.preprocessor.peek(1))?Ce.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){vne(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===ge.SEMICOLON&&this._err(it.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const a_e=new Set([z.DD,z.DT,z.LI,z.OPTGROUP,z.OPTION,z.P,z.RB,z.RP,z.RT,z.RTC]),bne=new Set([...a_e,z.CAPTION,z.COLGROUP,z.TBODY,z.TD,z.TFOOT,z.TH,z.THEAD,z.TR]),K3=new Set([z.APPLET,z.CAPTION,z.HTML,z.MARQUEE,z.OBJECT,z.TABLE,z.TD,z.TEMPLATE,z.TH]),cyt=new Set([...K3,z.OL,z.UL]),uyt=new Set([...K3,z.BUTTON]),_ne=new Set([z.ANNOTATION_XML,z.MI,z.MN,z.MO,z.MS,z.MTEXT]),wne=new Set([z.DESC,z.FOREIGN_OBJECT,z.TITLE]),dyt=new Set([z.TR,z.TEMPLATE,z.HTML]),fyt=new Set([z.TBODY,z.TFOOT,z.THEAD,z.TEMPLATE,z.HTML]),hyt=new Set([z.TABLE,z.TEMPLATE,z.HTML]),pyt=new Set([z.TD,z.TH]);class myt{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=z.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===z.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===At.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==At.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(EL,At.HTML)}popUntilTableCellPopped(){this.popUntilPopped(pyt,At.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(hyt,At.HTML)}clearBackToTableBodyContext(){this.clearBackTo(fyt,At.HTML)}clearBackToTableRowContext(){this.clearBackTo(dyt,At.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===z.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===z.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case At.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case At.SVG:{if(wne.has(i))return!1;break}case At.MATHML:{if(_ne.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,K3)}hasInListItemScope(t){return this.hasInDynamicScope(t,cyt)}hasInButtonScope(t){return this.hasInDynamicScope(t,uyt)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case At.HTML:{if(EL.has(n))return!0;if(K3.has(n))return!1;break}case At.SVG:{if(wne.has(n))return!1;break}case At.MATHML:{if(_ne.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===At.HTML)switch(this.tagIDs[n]){case t:return!0;case z.TABLE:case z.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===At.HTML)switch(this.tagIDs[t]){case z.TBODY:case z.THEAD:case z.TFOOT:return!0;case z.TABLE:case z.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===At.HTML)switch(this.tagIDs[n]){case t:return!0;case z.OPTION:case z.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&a_e.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&bne.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&bne.has(this.currentTagId);)this.pop()}}const GM=3;var pd;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(pd||(pd={}));const Sne={type:pd.Marker};class gyt{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,s=this.treeAdapter.getTagName(t),a=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const c=this.entries[o];if(c.type===pd.Marker)break;const{element:u}=c;if(this.treeAdapter.getTagName(u)===s&&this.treeAdapter.getNamespaceURI(u)===a){const d=this.treeAdapter.getAttrList(u);d.length===i&&r.push({idx:o,attrs:d})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<GM)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<GM)return;const i=new Map(n.map(a=>[a.name,a.value]));let s=0;for(let a=0;a<r.length;a++){const o=r[a];o.attrs.every(c=>i.get(c.name)===c.value)&&(s+=1,s>=GM&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(Sne)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:pd.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:pd.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(Sne);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===pd.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===pd.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===pd.Element&&n.element===t)}}const Dp={createDocument(){return{nodeName:"#document",mode:Sc.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const i=e.childNodes.find(s=>s.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const s={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Dp.appendChild(e,s)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(Dp.isTextNode(n)){n.value+=t;return}}Dp.appendChild(e,Dp.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Dp.isTextNode(r)?r.value+=t:Dp.insertBefore(e,Dp.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},o_e="html",xyt="about:legacy-compat",vyt="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",l_e=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],yyt=[...l_e,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],byt=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),c_e=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],_yt=[...c_e,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Ene(e,t){return t.some(n=>e.startsWith(n))}function wyt(e){return e.name===o_e&&e.publicId===null&&(e.systemId===null||e.systemId===xyt)}function Syt(e){if(e.name!==o_e)return Sc.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===vyt)return Sc.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),byt.has(n))return Sc.QUIRKS;let r=t===null?yyt:l_e;if(Ene(n,r))return Sc.QUIRKS;if(r=t===null?c_e:_yt,Ene(n,r))return Sc.LIMITED_QUIRKS}return Sc.NO_QUIRKS}const Cne={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Eyt="definitionurl",Cyt="definitionURL",Tyt=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),Ayt=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:At.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:At.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:At.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:At.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:At.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:At.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:At.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:At.XML}],["xml:space",{prefix:"xml",name:"space",namespace:At.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:At.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:At.XMLNS}]]),kyt=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),Nyt=new Set([z.B,z.BIG,z.BLOCKQUOTE,z.BODY,z.BR,z.CENTER,z.CODE,z.DD,z.DIV,z.DL,z.DT,z.EM,z.EMBED,z.H1,z.H2,z.H3,z.H4,z.H5,z.H6,z.HEAD,z.HR,z.I,z.IMG,z.LI,z.LISTING,z.MENU,z.META,z.NOBR,z.OL,z.P,z.PRE,z.RUBY,z.S,z.SMALL,z.SPAN,z.STRONG,z.STRIKE,z.SUB,z.SUP,z.TABLE,z.TT,z.U,z.UL,z.VAR]);function jyt(e){const t=e.tagID;return t===z.FONT&&e.attrs.some(({name:r})=>r===x0.COLOR||r===x0.SIZE||r===x0.FACE)||Nyt.has(t)}function u_e(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Eyt){e.attrs[t].name=Cyt;break}}function d_e(e){for(let t=0;t<e.attrs.length;t++){const n=Tyt.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function ZB(e){for(let t=0;t<e.attrs.length;t++){const n=Ayt.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function Ryt(e){const t=kyt.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=db(e.tagName))}function Iyt(e,t){return t===At.MATHML&&(e===z.MI||e===z.MO||e===z.MN||e===z.MS||e===z.MTEXT)}function Oyt(e,t,n){if(t===At.MATHML&&e===z.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===x0.ENCODING){const i=n[r].value.toLowerCase();return i===Cne.TEXT_HTML||i===Cne.APPLICATION_XML}}return t===At.SVG&&(e===z.FOREIGN_OBJECT||e===z.DESC||e===z.TITLE)}function Pyt(e,t,n,r){return(!r||r===At.HTML)&&Oyt(e,t,n)||(!r||r===At.MATHML)&&Iyt(e,t)}const Myt="hidden",Dyt=8,Fyt=3;var je;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(je||(je={}));const Lyt={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},f_e=new Set([z.TABLE,z.TBODY,z.TFOOT,z.THEAD,z.TR]),Tne={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Dp,onParseError:null};class Ane{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=je.INITIAL,this.originalInsertionMode=je.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...Tne,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new lyt(this.options,this),this.activeFormattingElements=new gyt(this.treeAdapter),this.fragmentContextID=r?db(this.treeAdapter.getTagName(r)):z.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new myt(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...Tne,...n};t??(t=r.treeAdapter.createElement(qe.TEMPLATE,At.HTML,[]));const i=r.treeAdapter.createElement("documentmock",At.HTML,[]),s=new this(r,i,t);return s.fragmentContextID===z.TEMPLATE&&s.tmplInsertionModeStack.unshift(je.IN_TEMPLATE),s._initTokenizerForFragmentParsing(),s._insertFakeRootElement(),s._resetInsertionMode(),s._findFormInFragmentContext(),s}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const s=(i=t.location)!==null&&i!==void 0?i:Lyt,a={code:n,startLine:s.startLine,startCol:s.startCol,startOffset:s.startOffset,endLine:r?s.startLine:s.endLine,endCol:r?s.startCol:s.endCol,endOffset:r?s.startOffset:s.endOffset};this.onParseError(a)}onItemPush(t,n,r){var i,s;(s=(i=this.treeAdapter).onItemPush)===null||s===void 0||s.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let s,a;this.openElements.stackTop===0&&this.fragmentContext?(s=this.fragmentContext,a=this.fragmentContextID):{current:s,currentTagId:a}=this.openElements,this._setContextModes(s,a)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===At.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,At.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=je.TEXT}switchToPlaintextParsing(){this.insertionMode=je.TEXT,this.originalInsertionMode=je.IN_BODY,this.tokenizer.state=Ds.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===qe.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==At.HTML))switch(this.fragmentContextID){case z.TITLE:case z.TEXTAREA:{this.tokenizer.state=Ds.RCDATA;break}case z.STYLE:case z.XMP:case z.IFRAME:case z.NOEMBED:case z.NOFRAMES:case z.NOSCRIPT:{this.tokenizer.state=Ds.RAWTEXT;break}case z.SCRIPT:{this.tokenizer.state=Ds.SCRIPT_DATA;break}case z.PLAINTEXT:{this.tokenizer.state=Ds.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const a=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));a&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,At.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,At.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(qe.HTML,At.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,z.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(n),s=r?i.lastIndexOf(r):i.length,a=i[s-1];if(this.treeAdapter.getNodeSourceCodeLocation(a)){const{endLine:c,endCol:u,endOffset:d}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:c,endCol:u,endOffset:d})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,i=this.treeAdapter.getTagName(t),s=n.type===pr.END_TAG&&i===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,s)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===z.SVG&&this.treeAdapter.getTagName(n)===qe.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===At.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===z.MGLYPH||t.tagID===z.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,At.HTML)}_processToken(t){switch(t.type){case pr.CHARACTER:{this.onCharacter(t);break}case pr.NULL_CHARACTER:{this.onNullCharacter(t);break}case pr.COMMENT:{this.onComment(t);break}case pr.DOCTYPE:{this.onDoctype(t);break}case pr.START_TAG:{this._processStartTag(t);break}case pr.END_TAG:{this.onEndTag(t);break}case pr.EOF:{this.onEof(t);break}case pr.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),s=this.treeAdapter.getAttrList(n);return Pyt(t,i,s,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===pd.Marker||this.openElements.contains(i.element)),r=n===-1?t-1:n-1;for(let i=r;i>=0;i--){const s=this.activeFormattingElements.entries[i];this._insertElement(s.token,this.treeAdapter.getNamespaceURI(s.element)),s.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=je.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(z.P),this.openElements.popUntilTagNamePopped(z.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case z.TR:{this.insertionMode=je.IN_ROW;return}case z.TBODY:case z.THEAD:case z.TFOOT:{this.insertionMode=je.IN_TABLE_BODY;return}case z.CAPTION:{this.insertionMode=je.IN_CAPTION;return}case z.COLGROUP:{this.insertionMode=je.IN_COLUMN_GROUP;return}case z.TABLE:{this.insertionMode=je.IN_TABLE;return}case z.BODY:{this.insertionMode=je.IN_BODY;return}case z.FRAMESET:{this.insertionMode=je.IN_FRAMESET;return}case z.SELECT:{this._resetInsertionModeForSelect(t);return}case z.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case z.HTML:{this.insertionMode=this.headElement?je.AFTER_HEAD:je.BEFORE_HEAD;return}case z.TD:case z.TH:{if(t>0){this.insertionMode=je.IN_CELL;return}break}case z.HEAD:{if(t>0){this.insertionMode=je.IN_HEAD;return}break}}this.insertionMode=je.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===z.TEMPLATE)break;if(r===z.TABLE){this.insertionMode=je.IN_SELECT_IN_TABLE;return}}this.insertionMode=je.IN_SELECT}_isElementCausesFosterParenting(t){return f_e.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case z.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===At.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case z.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return iyt[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){p_t(this,t);return}switch(this.insertionMode){case je.INITIAL:{B_(this,t);break}case je.BEFORE_HTML:{r2(this,t);break}case je.BEFORE_HEAD:{i2(this,t);break}case je.IN_HEAD:{s2(this,t);break}case je.IN_HEAD_NO_SCRIPT:{a2(this,t);break}case je.AFTER_HEAD:{o2(this,t);break}case je.IN_BODY:case je.IN_CAPTION:case je.IN_CELL:case je.IN_TEMPLATE:{p_e(this,t);break}case je.TEXT:case je.IN_SELECT:case je.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case je.IN_TABLE:case je.IN_TABLE_BODY:case je.IN_ROW:{KM(this,t);break}case je.IN_TABLE_TEXT:{b_e(this,t);break}case je.IN_COLUMN_GROUP:{Y3(this,t);break}case je.AFTER_BODY:{X3(this,t);break}case je.AFTER_AFTER_BODY:{Vk(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){h_t(this,t);return}switch(this.insertionMode){case je.INITIAL:{B_(this,t);break}case je.BEFORE_HTML:{r2(this,t);break}case je.BEFORE_HEAD:{i2(this,t);break}case je.IN_HEAD:{s2(this,t);break}case je.IN_HEAD_NO_SCRIPT:{a2(this,t);break}case je.AFTER_HEAD:{o2(this,t);break}case je.TEXT:{this._insertCharacters(t);break}case je.IN_TABLE:case je.IN_TABLE_BODY:case je.IN_ROW:{KM(this,t);break}case je.IN_COLUMN_GROUP:{Y3(this,t);break}case je.AFTER_BODY:{X3(this,t);break}case je.AFTER_AFTER_BODY:{Vk(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){CL(this,t);return}switch(this.insertionMode){case je.INITIAL:case je.BEFORE_HTML:case je.BEFORE_HEAD:case je.IN_HEAD:case je.IN_HEAD_NO_SCRIPT:case je.AFTER_HEAD:case je.IN_BODY:case je.IN_TABLE:case je.IN_CAPTION:case je.IN_COLUMN_GROUP:case je.IN_TABLE_BODY:case je.IN_ROW:case je.IN_CELL:case je.IN_SELECT:case je.IN_SELECT_IN_TABLE:case je.IN_TEMPLATE:case je.IN_FRAMESET:case je.AFTER_FRAMESET:{CL(this,t);break}case je.IN_TABLE_TEXT:{U_(this,t);break}case je.AFTER_BODY:{qyt(this,t);break}case je.AFTER_AFTER_BODY:case je.AFTER_AFTER_FRAMESET:{Wyt(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case je.INITIAL:{Gyt(this,t);break}case je.BEFORE_HEAD:case je.IN_HEAD:case je.IN_HEAD_NO_SCRIPT:case je.AFTER_HEAD:{this._err(t,it.misplacedDoctype);break}case je.IN_TABLE_TEXT:{U_(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,it.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?m_t(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case je.INITIAL:{B_(this,t);break}case je.BEFORE_HTML:{Kyt(this,t);break}case je.BEFORE_HEAD:{Xyt(this,t);break}case je.IN_HEAD:{ed(this,t);break}case je.IN_HEAD_NO_SCRIPT:{Jyt(this,t);break}case je.AFTER_HEAD:{tbt(this,t);break}case je.IN_BODY:{Eo(this,t);break}case je.IN_TABLE:{Cy(this,t);break}case je.IN_TABLE_TEXT:{U_(this,t);break}case je.IN_CAPTION:{Qbt(this,t);break}case je.IN_COLUMN_GROUP:{tU(this,t);break}case je.IN_TABLE_BODY:{D4(this,t);break}case je.IN_ROW:{F4(this,t);break}case je.IN_CELL:{e_t(this,t);break}case je.IN_SELECT:{S_e(this,t);break}case je.IN_SELECT_IN_TABLE:{n_t(this,t);break}case je.IN_TEMPLATE:{i_t(this,t);break}case je.AFTER_BODY:{a_t(this,t);break}case je.IN_FRAMESET:{o_t(this,t);break}case je.AFTER_FRAMESET:{c_t(this,t);break}case je.AFTER_AFTER_BODY:{d_t(this,t);break}case je.AFTER_AFTER_FRAMESET:{f_t(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?g_t(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case je.INITIAL:{B_(this,t);break}case je.BEFORE_HTML:{Yyt(this,t);break}case je.BEFORE_HEAD:{Qyt(this,t);break}case je.IN_HEAD:{Zyt(this,t);break}case je.IN_HEAD_NO_SCRIPT:{ebt(this,t);break}case je.AFTER_HEAD:{nbt(this,t);break}case je.IN_BODY:{M4(this,t);break}case je.TEXT:{Bbt(this,t);break}case je.IN_TABLE:{FS(this,t);break}case je.IN_TABLE_TEXT:{U_(this,t);break}case je.IN_CAPTION:{Zbt(this,t);break}case je.IN_COLUMN_GROUP:{Jbt(this,t);break}case je.IN_TABLE_BODY:{TL(this,t);break}case je.IN_ROW:{w_e(this,t);break}case je.IN_CELL:{t_t(this,t);break}case je.IN_SELECT:{E_e(this,t);break}case je.IN_SELECT_IN_TABLE:{r_t(this,t);break}case je.IN_TEMPLATE:{s_t(this,t);break}case je.AFTER_BODY:{T_e(this,t);break}case je.IN_FRAMESET:{l_t(this,t);break}case je.AFTER_FRAMESET:{u_t(this,t);break}case je.AFTER_AFTER_BODY:{Vk(this,t);break}}}onEof(t){switch(this.insertionMode){case je.INITIAL:{B_(this,t);break}case je.BEFORE_HTML:{r2(this,t);break}case je.BEFORE_HEAD:{i2(this,t);break}case je.IN_HEAD:{s2(this,t);break}case je.IN_HEAD_NO_SCRIPT:{a2(this,t);break}case je.AFTER_HEAD:{o2(this,t);break}case je.IN_BODY:case je.IN_TABLE:case je.IN_CAPTION:case je.IN_COLUMN_GROUP:case je.IN_TABLE_BODY:case je.IN_ROW:case je.IN_CELL:case je.IN_SELECT:case je.IN_SELECT_IN_TABLE:{v_e(this,t);break}case je.TEXT:{Ubt(this,t);break}case je.IN_TABLE_TEXT:{U_(this,t);break}case je.IN_TEMPLATE:{C_e(this,t);break}case je.AFTER_BODY:case je.IN_FRAMESET:case je.AFTER_FRAMESET:case je.AFTER_AFTER_BODY:case je.AFTER_AFTER_FRAMESET:{eU(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===ge.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case je.IN_HEAD:case je.IN_HEAD_NO_SCRIPT:case je.AFTER_HEAD:case je.TEXT:case je.IN_COLUMN_GROUP:case je.IN_SELECT:case je.IN_SELECT_IN_TABLE:case je.IN_FRAMESET:case je.AFTER_FRAMESET:{this._insertCharacters(t);break}case je.IN_BODY:case je.IN_CAPTION:case je.IN_CELL:case je.IN_TEMPLATE:case je.AFTER_BODY:case je.AFTER_AFTER_BODY:case je.AFTER_AFTER_FRAMESET:{h_e(this,t);break}case je.IN_TABLE:case je.IN_TABLE_BODY:case je.IN_ROW:{KM(this,t);break}case je.IN_TABLE_TEXT:{y_e(this,t);break}}}}function zyt(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):x_e(e,t),n}function $yt(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function Byt(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let s=0,a=i;a!==n;s++,a=i){i=e.openElements.getCommonAncestor(a);const o=e.activeFormattingElements.getElementEntry(a),c=o&&s>=Fyt;!o||c?(c&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(a)):(a=Uyt(e,o),r===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function Uyt(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function Vyt(e,t,n){const r=e.treeAdapter.getTagName(t),i=db(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const s=e.treeAdapter.getNamespaceURI(t);i===z.TEMPLATE&&s===At.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Hyt(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,s=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,s),e.treeAdapter.appendChild(t,s),e.activeFormattingElements.insertElementAfterBookmark(s,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,s,i.tagID)}function JB(e,t){for(let n=0;n<Dyt;n++){const r=zyt(e,t);if(!r)break;const i=$yt(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const s=Byt(e,i,r.element),a=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(s),a&&Vyt(e,a,s),Hyt(e,i,r)}}function CL(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function qyt(e,t){e._appendCommentNode(t,e.openElements.items[0])}function Wyt(e,t){e._appendCommentNode(t,e.document)}function eU(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const s=e.openElements.items[1],a=e.treeAdapter.getNodeSourceCodeLocation(s);a&&!a.endTag&&e._setEndLocation(s,t)}}}}function Gyt(e,t){e._setDocumentType(t);const n=t.forceQuirks?Sc.QUIRKS:Syt(t);wyt(t)||e._err(t,it.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=je.BEFORE_HTML}function B_(e,t){e._err(t,it.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Sc.QUIRKS),e.insertionMode=je.BEFORE_HTML,e._processToken(t)}function Kyt(e,t){t.tagID===z.HTML?(e._insertElement(t,At.HTML),e.insertionMode=je.BEFORE_HEAD):r2(e,t)}function Yyt(e,t){const n=t.tagID;(n===z.HTML||n===z.HEAD||n===z.BODY||n===z.BR)&&r2(e,t)}function r2(e,t){e._insertFakeRootElement(),e.insertionMode=je.BEFORE_HEAD,e._processToken(t)}function Xyt(e,t){switch(t.tagID){case z.HTML:{Eo(e,t);break}case z.HEAD:{e._insertElement(t,At.HTML),e.headElement=e.openElements.current,e.insertionMode=je.IN_HEAD;break}default:i2(e,t)}}function Qyt(e,t){const n=t.tagID;n===z.HEAD||n===z.BODY||n===z.HTML||n===z.BR?i2(e,t):e._err(t,it.endTagWithoutMatchingOpenElement)}function i2(e,t){e._insertFakeElement(qe.HEAD,z.HEAD),e.headElement=e.openElements.current,e.insertionMode=je.IN_HEAD,e._processToken(t)}function ed(e,t){switch(t.tagID){case z.HTML:{Eo(e,t);break}case z.BASE:case z.BASEFONT:case z.BGSOUND:case z.LINK:case z.META:{e._appendElement(t,At.HTML),t.ackSelfClosing=!0;break}case z.TITLE:{e._switchToTextParsing(t,Ds.RCDATA);break}case z.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Ds.RAWTEXT):(e._insertElement(t,At.HTML),e.insertionMode=je.IN_HEAD_NO_SCRIPT);break}case z.NOFRAMES:case z.STYLE:{e._switchToTextParsing(t,Ds.RAWTEXT);break}case z.SCRIPT:{e._switchToTextParsing(t,Ds.SCRIPT_DATA);break}case z.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=je.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(je.IN_TEMPLATE);break}case z.HEAD:{e._err(t,it.misplacedStartTagForHeadElement);break}default:s2(e,t)}}function Zyt(e,t){switch(t.tagID){case z.HEAD:{e.openElements.pop(),e.insertionMode=je.AFTER_HEAD;break}case z.BODY:case z.BR:case z.HTML:{s2(e,t);break}case z.TEMPLATE:{kx(e,t);break}default:e._err(t,it.endTagWithoutMatchingOpenElement)}}function kx(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==z.TEMPLATE&&e._err(t,it.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(z.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,it.endTagWithoutMatchingOpenElement)}function s2(e,t){e.openElements.pop(),e.insertionMode=je.AFTER_HEAD,e._processToken(t)}function Jyt(e,t){switch(t.tagID){case z.HTML:{Eo(e,t);break}case z.BASEFONT:case z.BGSOUND:case z.HEAD:case z.LINK:case z.META:case z.NOFRAMES:case z.STYLE:{ed(e,t);break}case z.NOSCRIPT:{e._err(t,it.nestedNoscriptInHead);break}default:a2(e,t)}}function ebt(e,t){switch(t.tagID){case z.NOSCRIPT:{e.openElements.pop(),e.insertionMode=je.IN_HEAD;break}case z.BR:{a2(e,t);break}default:e._err(t,it.endTagWithoutMatchingOpenElement)}}function a2(e,t){const n=t.type===pr.EOF?it.openElementsLeftAfterEof:it.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=je.IN_HEAD,e._processToken(t)}function tbt(e,t){switch(t.tagID){case z.HTML:{Eo(e,t);break}case z.BODY:{e._insertElement(t,At.HTML),e.framesetOk=!1,e.insertionMode=je.IN_BODY;break}case z.FRAMESET:{e._insertElement(t,At.HTML),e.insertionMode=je.IN_FRAMESET;break}case z.BASE:case z.BASEFONT:case z.BGSOUND:case z.LINK:case z.META:case z.NOFRAMES:case z.SCRIPT:case z.STYLE:case z.TEMPLATE:case z.TITLE:{e._err(t,it.abandonedHeadElementChild),e.openElements.push(e.headElement,z.HEAD),ed(e,t),e.openElements.remove(e.headElement);break}case z.HEAD:{e._err(t,it.misplacedStartTagForHeadElement);break}default:o2(e,t)}}function nbt(e,t){switch(t.tagID){case z.BODY:case z.HTML:case z.BR:{o2(e,t);break}case z.TEMPLATE:{kx(e,t);break}default:e._err(t,it.endTagWithoutMatchingOpenElement)}}function o2(e,t){e._insertFakeElement(qe.BODY,z.BODY),e.insertionMode=je.IN_BODY,P4(e,t)}function P4(e,t){switch(t.type){case pr.CHARACTER:{p_e(e,t);break}case pr.WHITESPACE_CHARACTER:{h_e(e,t);break}case pr.COMMENT:{CL(e,t);break}case pr.START_TAG:{Eo(e,t);break}case pr.END_TAG:{M4(e,t);break}case pr.EOF:{v_e(e,t);break}}}function h_e(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function p_e(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function rbt(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function ibt(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function sbt(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,At.HTML),e.insertionMode=je.IN_FRAMESET)}function abt(e,t){e.openElements.hasInButtonScope(z.P)&&e._closePElement(),e._insertElement(t,At.HTML)}function obt(e,t){e.openElements.hasInButtonScope(z.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&EL.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,At.HTML)}function lbt(e,t){e.openElements.hasInButtonScope(z.P)&&e._closePElement(),e._insertElement(t,At.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function cbt(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(z.P)&&e._closePElement(),e._insertElement(t,At.HTML),n||(e.formElement=e.openElements.current))}function ubt(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===z.LI&&i===z.LI||(n===z.DD||n===z.DT)&&(i===z.DD||i===z.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==z.ADDRESS&&i!==z.DIV&&i!==z.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(z.P)&&e._closePElement(),e._insertElement(t,At.HTML)}function dbt(e,t){e.openElements.hasInButtonScope(z.P)&&e._closePElement(),e._insertElement(t,At.HTML),e.tokenizer.state=Ds.PLAINTEXT}function fbt(e,t){e.openElements.hasInScope(z.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(z.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,At.HTML),e.framesetOk=!1}function hbt(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(qe.A);n&&(JB(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,At.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function pbt(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,At.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function mbt(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(z.NOBR)&&(JB(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,At.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function gbt(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,At.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function xbt(e,t){e.treeAdapter.getDocumentMode(e.document)!==Sc.QUIRKS&&e.openElements.hasInButtonScope(z.P)&&e._closePElement(),e._insertElement(t,At.HTML),e.framesetOk=!1,e.insertionMode=je.IN_TABLE}function m_e(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,At.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function g_e(e){const t=i_e(e,x0.TYPE);return t!=null&&t.toLowerCase()===Myt}function vbt(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,At.HTML),g_e(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function ybt(e,t){e._appendElement(t,At.HTML),t.ackSelfClosing=!0}function bbt(e,t){e.openElements.hasInButtonScope(z.P)&&e._closePElement(),e._appendElement(t,At.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function _bt(e,t){t.tagName=qe.IMG,t.tagID=z.IMG,m_e(e,t)}function wbt(e,t){e._insertElement(t,At.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ds.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=je.TEXT}function Sbt(e,t){e.openElements.hasInButtonScope(z.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ds.RAWTEXT)}function Ebt(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ds.RAWTEXT)}function kne(e,t){e._switchToTextParsing(t,Ds.RAWTEXT)}function Cbt(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,At.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===je.IN_TABLE||e.insertionMode===je.IN_CAPTION||e.insertionMode===je.IN_TABLE_BODY||e.insertionMode===je.IN_ROW||e.insertionMode===je.IN_CELL?je.IN_SELECT_IN_TABLE:je.IN_SELECT}function Tbt(e,t){e.openElements.currentTagId===z.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,At.HTML)}function Abt(e,t){e.openElements.hasInScope(z.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,At.HTML)}function kbt(e,t){e.openElements.hasInScope(z.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(z.RTC),e._insertElement(t,At.HTML)}function Nbt(e,t){e._reconstructActiveFormattingElements(),u_e(t),ZB(t),t.selfClosing?e._appendElement(t,At.MATHML):e._insertElement(t,At.MATHML),t.ackSelfClosing=!0}function jbt(e,t){e._reconstructActiveFormattingElements(),d_e(t),ZB(t),t.selfClosing?e._appendElement(t,At.SVG):e._insertElement(t,At.SVG),t.ackSelfClosing=!0}function Nne(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,At.HTML)}function Eo(e,t){switch(t.tagID){case z.I:case z.S:case z.B:case z.U:case z.EM:case z.TT:case z.BIG:case z.CODE:case z.FONT:case z.SMALL:case z.STRIKE:case z.STRONG:{pbt(e,t);break}case z.A:{hbt(e,t);break}case z.H1:case z.H2:case z.H3:case z.H4:case z.H5:case z.H6:{obt(e,t);break}case z.P:case z.DL:case z.OL:case z.UL:case z.DIV:case z.DIR:case z.NAV:case z.MAIN:case z.MENU:case z.ASIDE:case z.CENTER:case z.FIGURE:case z.FOOTER:case z.HEADER:case z.HGROUP:case z.DIALOG:case z.DETAILS:case z.ADDRESS:case z.ARTICLE:case z.SEARCH:case z.SECTION:case z.SUMMARY:case z.FIELDSET:case z.BLOCKQUOTE:case z.FIGCAPTION:{abt(e,t);break}case z.LI:case z.DD:case z.DT:{ubt(e,t);break}case z.BR:case z.IMG:case z.WBR:case z.AREA:case z.EMBED:case z.KEYGEN:{m_e(e,t);break}case z.HR:{bbt(e,t);break}case z.RB:case z.RTC:{Abt(e,t);break}case z.RT:case z.RP:{kbt(e,t);break}case z.PRE:case z.LISTING:{lbt(e,t);break}case z.XMP:{Sbt(e,t);break}case z.SVG:{jbt(e,t);break}case z.HTML:{rbt(e,t);break}case z.BASE:case z.LINK:case z.META:case z.STYLE:case z.TITLE:case z.SCRIPT:case z.BGSOUND:case z.BASEFONT:case z.TEMPLATE:{ed(e,t);break}case z.BODY:{ibt(e,t);break}case z.FORM:{cbt(e,t);break}case z.NOBR:{mbt(e,t);break}case z.MATH:{Nbt(e,t);break}case z.TABLE:{xbt(e,t);break}case z.INPUT:{vbt(e,t);break}case z.PARAM:case z.TRACK:case z.SOURCE:{ybt(e,t);break}case z.IMAGE:{_bt(e,t);break}case z.BUTTON:{fbt(e,t);break}case z.APPLET:case z.OBJECT:case z.MARQUEE:{gbt(e,t);break}case z.IFRAME:{Ebt(e,t);break}case z.SELECT:{Cbt(e,t);break}case z.OPTION:case z.OPTGROUP:{Tbt(e,t);break}case z.NOEMBED:case z.NOFRAMES:{kne(e,t);break}case z.FRAMESET:{sbt(e,t);break}case z.TEXTAREA:{wbt(e,t);break}case z.NOSCRIPT:{e.options.scriptingEnabled?kne(e,t):Nne(e,t);break}case z.PLAINTEXT:{dbt(e,t);break}case z.COL:case z.TH:case z.TD:case z.TR:case z.HEAD:case z.FRAME:case z.TBODY:case z.TFOOT:case z.THEAD:case z.CAPTION:case z.COLGROUP:break;default:Nne(e,t)}}function Rbt(e,t){if(e.openElements.hasInScope(z.BODY)&&(e.insertionMode=je.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function Ibt(e,t){e.openElements.hasInScope(z.BODY)&&(e.insertionMode=je.AFTER_BODY,T_e(e,t))}function Obt(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function Pbt(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(z.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(z.FORM):n&&e.openElements.remove(n))}function Mbt(e){e.openElements.hasInButtonScope(z.P)||e._insertFakeElement(qe.P,z.P),e._closePElement()}function Dbt(e){e.openElements.hasInListItemScope(z.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(z.LI),e.openElements.popUntilTagNamePopped(z.LI))}function Fbt(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function Lbt(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function zbt(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function $bt(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(qe.BR,z.BR),e.openElements.pop(),e.framesetOk=!1}function x_e(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const s=e.openElements.items[i],a=e.openElements.tagIDs[i];if(r===a&&(r!==z.UNKNOWN||e.treeAdapter.getTagName(s)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(s,a))break}}function M4(e,t){switch(t.tagID){case z.A:case z.B:case z.I:case z.S:case z.U:case z.EM:case z.TT:case z.BIG:case z.CODE:case z.FONT:case z.NOBR:case z.SMALL:case z.STRIKE:case z.STRONG:{JB(e,t);break}case z.P:{Mbt(e);break}case z.DL:case z.UL:case z.OL:case z.DIR:case z.DIV:case z.NAV:case z.PRE:case z.MAIN:case z.MENU:case z.ASIDE:case z.BUTTON:case z.CENTER:case z.FIGURE:case z.FOOTER:case z.HEADER:case z.HGROUP:case z.DIALOG:case z.ADDRESS:case z.ARTICLE:case z.DETAILS:case z.SEARCH:case z.SECTION:case z.SUMMARY:case z.LISTING:case z.FIELDSET:case z.BLOCKQUOTE:case z.FIGCAPTION:{Obt(e,t);break}case z.LI:{Dbt(e);break}case z.DD:case z.DT:{Fbt(e,t);break}case z.H1:case z.H2:case z.H3:case z.H4:case z.H5:case z.H6:{Lbt(e);break}case z.BR:{$bt(e);break}case z.BODY:{Rbt(e,t);break}case z.HTML:{Ibt(e,t);break}case z.FORM:{Pbt(e);break}case z.APPLET:case z.OBJECT:case z.MARQUEE:{zbt(e,t);break}case z.TEMPLATE:{kx(e,t);break}default:x_e(e,t)}}function v_e(e,t){e.tmplInsertionModeStack.length>0?C_e(e,t):eU(e,t)}function Bbt(e,t){var n;t.tagID===z.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Ubt(e,t){e._err(t,it.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function KM(e,t){if(e.openElements.currentTagId!==void 0&&f_e.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=je.IN_TABLE_TEXT,t.type){case pr.CHARACTER:{b_e(e,t);break}case pr.WHITESPACE_CHARACTER:{y_e(e,t);break}}else rC(e,t)}function Vbt(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,At.HTML),e.insertionMode=je.IN_CAPTION}function Hbt(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,At.HTML),e.insertionMode=je.IN_COLUMN_GROUP}function qbt(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(qe.COLGROUP,z.COLGROUP),e.insertionMode=je.IN_COLUMN_GROUP,tU(e,t)}function Wbt(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,At.HTML),e.insertionMode=je.IN_TABLE_BODY}function Gbt(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(qe.TBODY,z.TBODY),e.insertionMode=je.IN_TABLE_BODY,D4(e,t)}function Kbt(e,t){e.openElements.hasInTableScope(z.TABLE)&&(e.openElements.popUntilTagNamePopped(z.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Ybt(e,t){g_e(t)?e._appendElement(t,At.HTML):rC(e,t),t.ackSelfClosing=!0}function Xbt(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,At.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Cy(e,t){switch(t.tagID){case z.TD:case z.TH:case z.TR:{Gbt(e,t);break}case z.STYLE:case z.SCRIPT:case z.TEMPLATE:{ed(e,t);break}case z.COL:{qbt(e,t);break}case z.FORM:{Xbt(e,t);break}case z.TABLE:{Kbt(e,t);break}case z.TBODY:case z.TFOOT:case z.THEAD:{Wbt(e,t);break}case z.INPUT:{Ybt(e,t);break}case z.CAPTION:{Vbt(e,t);break}case z.COLGROUP:{Hbt(e,t);break}default:rC(e,t)}}function FS(e,t){switch(t.tagID){case z.TABLE:{e.openElements.hasInTableScope(z.TABLE)&&(e.openElements.popUntilTagNamePopped(z.TABLE),e._resetInsertionMode());break}case z.TEMPLATE:{kx(e,t);break}case z.BODY:case z.CAPTION:case z.COL:case z.COLGROUP:case z.HTML:case z.TBODY:case z.TD:case z.TFOOT:case z.TH:case z.THEAD:case z.TR:break;default:rC(e,t)}}function rC(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,P4(e,t),e.fosterParentingEnabled=n}function y_e(e,t){e.pendingCharacterTokens.push(t)}function b_e(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function U_(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)rC(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const __e=new Set([z.CAPTION,z.COL,z.COLGROUP,z.TBODY,z.TD,z.TFOOT,z.TH,z.THEAD,z.TR]);function Qbt(e,t){const n=t.tagID;__e.has(n)?e.openElements.hasInTableScope(z.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(z.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=je.IN_TABLE,Cy(e,t)):Eo(e,t)}function Zbt(e,t){const n=t.tagID;switch(n){case z.CAPTION:case z.TABLE:{e.openElements.hasInTableScope(z.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(z.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=je.IN_TABLE,n===z.TABLE&&FS(e,t));break}case z.BODY:case z.COL:case z.COLGROUP:case z.HTML:case z.TBODY:case z.TD:case z.TFOOT:case z.TH:case z.THEAD:case z.TR:break;default:M4(e,t)}}function tU(e,t){switch(t.tagID){case z.HTML:{Eo(e,t);break}case z.COL:{e._appendElement(t,At.HTML),t.ackSelfClosing=!0;break}case z.TEMPLATE:{ed(e,t);break}default:Y3(e,t)}}function Jbt(e,t){switch(t.tagID){case z.COLGROUP:{e.openElements.currentTagId===z.COLGROUP&&(e.openElements.pop(),e.insertionMode=je.IN_TABLE);break}case z.TEMPLATE:{kx(e,t);break}case z.COL:break;default:Y3(e,t)}}function Y3(e,t){e.openElements.currentTagId===z.COLGROUP&&(e.openElements.pop(),e.insertionMode=je.IN_TABLE,e._processToken(t))}function D4(e,t){switch(t.tagID){case z.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,At.HTML),e.insertionMode=je.IN_ROW;break}case z.TH:case z.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(qe.TR,z.TR),e.insertionMode=je.IN_ROW,F4(e,t);break}case z.CAPTION:case z.COL:case z.COLGROUP:case z.TBODY:case z.TFOOT:case z.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=je.IN_TABLE,Cy(e,t));break}default:Cy(e,t)}}function TL(e,t){const n=t.tagID;switch(t.tagID){case z.TBODY:case z.TFOOT:case z.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=je.IN_TABLE);break}case z.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=je.IN_TABLE,FS(e,t));break}case z.BODY:case z.CAPTION:case z.COL:case z.COLGROUP:case z.HTML:case z.TD:case z.TH:case z.TR:break;default:FS(e,t)}}function F4(e,t){switch(t.tagID){case z.TH:case z.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,At.HTML),e.insertionMode=je.IN_CELL,e.activeFormattingElements.insertMarker();break}case z.CAPTION:case z.COL:case z.COLGROUP:case z.TBODY:case z.TFOOT:case z.THEAD:case z.TR:{e.openElements.hasInTableScope(z.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=je.IN_TABLE_BODY,D4(e,t));break}default:Cy(e,t)}}function w_e(e,t){switch(t.tagID){case z.TR:{e.openElements.hasInTableScope(z.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=je.IN_TABLE_BODY);break}case z.TABLE:{e.openElements.hasInTableScope(z.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=je.IN_TABLE_BODY,TL(e,t));break}case z.TBODY:case z.TFOOT:case z.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(z.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=je.IN_TABLE_BODY,TL(e,t));break}case z.BODY:case z.CAPTION:case z.COL:case z.COLGROUP:case z.HTML:case z.TD:case z.TH:break;default:FS(e,t)}}function e_t(e,t){const n=t.tagID;__e.has(n)?(e.openElements.hasInTableScope(z.TD)||e.openElements.hasInTableScope(z.TH))&&(e._closeTableCell(),F4(e,t)):Eo(e,t)}function t_t(e,t){const n=t.tagID;switch(n){case z.TD:case z.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=je.IN_ROW);break}case z.TABLE:case z.TBODY:case z.TFOOT:case z.THEAD:case z.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),w_e(e,t));break}case z.BODY:case z.CAPTION:case z.COL:case z.COLGROUP:case z.HTML:break;default:M4(e,t)}}function S_e(e,t){switch(t.tagID){case z.HTML:{Eo(e,t);break}case z.OPTION:{e.openElements.currentTagId===z.OPTION&&e.openElements.pop(),e._insertElement(t,At.HTML);break}case z.OPTGROUP:{e.openElements.currentTagId===z.OPTION&&e.openElements.pop(),e.openElements.currentTagId===z.OPTGROUP&&e.openElements.pop(),e._insertElement(t,At.HTML);break}case z.HR:{e.openElements.currentTagId===z.OPTION&&e.openElements.pop(),e.openElements.currentTagId===z.OPTGROUP&&e.openElements.pop(),e._appendElement(t,At.HTML),t.ackSelfClosing=!0;break}case z.INPUT:case z.KEYGEN:case z.TEXTAREA:case z.SELECT:{e.openElements.hasInSelectScope(z.SELECT)&&(e.openElements.popUntilTagNamePopped(z.SELECT),e._resetInsertionMode(),t.tagID!==z.SELECT&&e._processStartTag(t));break}case z.SCRIPT:case z.TEMPLATE:{ed(e,t);break}}}function E_e(e,t){switch(t.tagID){case z.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===z.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===z.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===z.OPTGROUP&&e.openElements.pop();break}case z.OPTION:{e.openElements.currentTagId===z.OPTION&&e.openElements.pop();break}case z.SELECT:{e.openElements.hasInSelectScope(z.SELECT)&&(e.openElements.popUntilTagNamePopped(z.SELECT),e._resetInsertionMode());break}case z.TEMPLATE:{kx(e,t);break}}}function n_t(e,t){const n=t.tagID;n===z.CAPTION||n===z.TABLE||n===z.TBODY||n===z.TFOOT||n===z.THEAD||n===z.TR||n===z.TD||n===z.TH?(e.openElements.popUntilTagNamePopped(z.SELECT),e._resetInsertionMode(),e._processStartTag(t)):S_e(e,t)}function r_t(e,t){const n=t.tagID;n===z.CAPTION||n===z.TABLE||n===z.TBODY||n===z.TFOOT||n===z.THEAD||n===z.TR||n===z.TD||n===z.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(z.SELECT),e._resetInsertionMode(),e.onEndTag(t)):E_e(e,t)}function i_t(e,t){switch(t.tagID){case z.BASE:case z.BASEFONT:case z.BGSOUND:case z.LINK:case z.META:case z.NOFRAMES:case z.SCRIPT:case z.STYLE:case z.TEMPLATE:case z.TITLE:{ed(e,t);break}case z.CAPTION:case z.COLGROUP:case z.TBODY:case z.TFOOT:case z.THEAD:{e.tmplInsertionModeStack[0]=je.IN_TABLE,e.insertionMode=je.IN_TABLE,Cy(e,t);break}case z.COL:{e.tmplInsertionModeStack[0]=je.IN_COLUMN_GROUP,e.insertionMode=je.IN_COLUMN_GROUP,tU(e,t);break}case z.TR:{e.tmplInsertionModeStack[0]=je.IN_TABLE_BODY,e.insertionMode=je.IN_TABLE_BODY,D4(e,t);break}case z.TD:case z.TH:{e.tmplInsertionModeStack[0]=je.IN_ROW,e.insertionMode=je.IN_ROW,F4(e,t);break}default:e.tmplInsertionModeStack[0]=je.IN_BODY,e.insertionMode=je.IN_BODY,Eo(e,t)}}function s_t(e,t){t.tagID===z.TEMPLATE&&kx(e,t)}function C_e(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(z.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):eU(e,t)}function a_t(e,t){t.tagID===z.HTML?Eo(e,t):X3(e,t)}function T_e(e,t){var n;if(t.tagID===z.HTML){if(e.fragmentContext||(e.insertionMode=je.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===z.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else X3(e,t)}function X3(e,t){e.insertionMode=je.IN_BODY,P4(e,t)}function o_t(e,t){switch(t.tagID){case z.HTML:{Eo(e,t);break}case z.FRAMESET:{e._insertElement(t,At.HTML);break}case z.FRAME:{e._appendElement(t,At.HTML),t.ackSelfClosing=!0;break}case z.NOFRAMES:{ed(e,t);break}}}function l_t(e,t){t.tagID===z.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==z.FRAMESET&&(e.insertionMode=je.AFTER_FRAMESET))}function c_t(e,t){switch(t.tagID){case z.HTML:{Eo(e,t);break}case z.NOFRAMES:{ed(e,t);break}}}function u_t(e,t){t.tagID===z.HTML&&(e.insertionMode=je.AFTER_AFTER_FRAMESET)}function d_t(e,t){t.tagID===z.HTML?Eo(e,t):Vk(e,t)}function Vk(e,t){e.insertionMode=je.IN_BODY,P4(e,t)}function f_t(e,t){switch(t.tagID){case z.HTML:{Eo(e,t);break}case z.NOFRAMES:{ed(e,t);break}}}function h_t(e,t){t.chars=Yi,e._insertCharacters(t)}function p_t(e,t){e._insertCharacters(t),e.framesetOk=!1}function A_e(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==At.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function m_t(e,t){if(jyt(t))A_e(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===At.MATHML?u_e(t):r===At.SVG&&(Ryt(t),d_e(t)),ZB(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function g_t(e,t){if(t.tagID===z.P||t.tagID===z.BR){A_e(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===At.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}qe.AREA,qe.BASE,qe.BASEFONT,qe.BGSOUND,qe.BR,qe.COL,qe.EMBED,qe.FRAME,qe.HR,qe.IMG,qe.INPUT,qe.KEYGEN,qe.LINK,qe.META,qe.PARAM,qe.SOURCE,qe.TRACK,qe.WBR;const x_t=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,v_t=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),jne={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function k_e(e,t){const n=k_t(e),r=Uz("type",{handlers:{root:y_t,element:b_t,text:__t,comment:j_e,doctype:w_t,raw:E_t},unknown:C_t}),i={parser:n?new Ane(jne):Ane.getFragmentParser(void 0,jne),handle(o){r(o,i)},stitches:!1,options:t||{}};r(e,i),fb(i,rf());const s=n?i.parser.document:i.parser.getFragment(),a=y1t(s,{file:i.options.file});return i.stitches&&l4(a,"comment",function(o,c,u){const d=o;if(d.value.stitch&&u&&c!==void 0){const h=u.children;return h[c]=d.value.stitch,c}}),a.type==="root"&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function N_e(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function y_t(e,t){N_e(e.children,t)}function b_t(e,t){T_t(e,t),N_e(e.children,t),A_t(e,t)}function __t(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:pr.CHARACTER,chars:e.value,location:iC(e)};fb(t,rf(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function w_t(e,t){const n={type:pr.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:iC(e)};fb(t,rf(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function S_t(e,t){t.stitches=!0;const n=N_t(e);if("children"in e&&"children"in n){const r=k_e({type:"root",children:e.children},t.options);n.children=r.children}j_e({type:"comment",value:{stitch:n}},t)}function j_e(e,t){const n=e.value,r={type:pr.COMMENT,data:n,location:iC(e)};fb(t,rf(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function E_t(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,R_e(t,rf(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(x_t,"<$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function C_t(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))S_t(n,t);else{let r="";throw v_t.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function fb(e,t){R_e(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Ds.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function R_e(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function T_t(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Ds.PLAINTEXT)return;fb(t,rf(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:n0.html;i===n0.html&&n==="svg"&&(i=n0.svg);const s=P1t({...e,children:[]},{space:i===n0.svg?"svg":"html"}),a={type:pr.START_TAG,tagName:n,tagID:db(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in s?s.attrs:[],location:iC(e)};t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function A_t(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&U1t.includes(n)||t.parser.tokenizer.state===Ds.PLAINTEXT)return;fb(t,I4(e));const r={type:pr.END_TAG,tagName:n,tagID:db(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:iC(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Ds.RCDATA||t.parser.tokenizer.state===Ds.RAWTEXT||t.parser.tokenizer.state===Ds.SCRIPT_DATA)&&(t.parser.tokenizer.state=Ds.DATA)}function k_t(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function iC(e){const t=rf(e)||{line:void 0,column:void 0,offset:void 0},n=I4(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function N_t(e){return"children"in e?J0({...e,children:[]}):J0(e)}function j_t(e){return function(t,n){return k_e(t,{...e,file:n})}}const Ig=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],m1={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Ig,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Ig],h2:[["className","sr-only"]],img:[...Ig,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Ig,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Ig],table:[...Ig],ul:[...Ig,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},Fp={}.hasOwnProperty;function R_t(e,t){let n={type:"root",children:[]};const r={schema:t?{...m1,...t}:m1,stack:[]},i=I_e(r,e);return i&&(Array.isArray(i)?i.length===1?n=i[0]:n.children=i:n=i),n}function I_e(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return I_t(e,n);case"doctype":return O_t(e,n);case"element":return P_t(e,n);case"root":return M_t(e,n);case"text":return D_t(e,n)}}}function I_t(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),s={type:"comment",value:r<0?n:n.slice(0,r)};return sC(s,t),s}}function O_t(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return sC(n,t),n}}function P_t(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=O_e(e,t.children),i=F_t(e,t.properties);e.stack.pop();let s=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(s=!0,e.schema.ancestors&&Fp.call(e.schema.ancestors,n))){const o=e.schema.ancestors[n];let c=-1;for(s=!1;++c<o.length;)e.stack.includes(o[c])&&(s=!0)}if(!s)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const a={type:"element",tagName:n,properties:i,children:r};return sC(a,t),a}function M_t(e,t){const r={type:"root",children:O_e(e,t.children)};return sC(r,t),r}function D_t(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return sC(r,t),r}function O_e(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const s=I_e(e,r[i]);s&&(Array.isArray(s)?n.push(...s):n.push(s))}}return n}function F_t(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,s=r&&Fp.call(r,n)?r[n]:void 0,a=r&&Fp.call(r,"*")?r["*"]:void 0,o=t&&typeof t=="object"?t:{},c={};let u;for(u in o)if(Fp.call(o,u)){const d=o[u];let h=Rne(e,Ine(s,u),u,d);h==null&&(h=Rne(e,Ine(a,u),u,d)),h!=null&&(c[u]=h)}if(i&&Fp.call(i,n)){const d=i[n];for(u in d)Fp.call(d,u)&&!Fp.call(c,u)&&(c[u]=d[u])}return c}function Rne(e,t,n,r){return t?Array.isArray(r)?L_t(e,t,n,r):P_e(e,t,n,r):void 0}function L_t(e,t,n,r){let i=-1;const s=[];for(;++i<r.length;){const a=P_e(e,t,n,r[i]);(typeof a=="number"||typeof a=="string")&&s.push(a)}return s}function P_e(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&z_t(e,n,r)){if(typeof t=="object"&&t.length>1){let i=!1,s=0;for(;++s<t.length;){const a=t[s];if(a&&typeof a=="object"&&"flags"in a){if(a.test(String(r))){i=!0;break}}else if(a===r){i=!0;break}}if(!i)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function z_t(e,t,n){const r=e.schema.protocols&&Fp.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const i=String(n),s=i.indexOf(":"),a=i.indexOf("?"),o=i.indexOf("#"),c=i.indexOf("/");if(s<0||c>-1&&s>c||a>-1&&s>a||o>-1&&s>o)return!0;let u=-1;for(;++u<r.length;){const d=r[u];if(s===d.length&&i.slice(0,d.length)===d)return!0}return!1}function sC(e,t){const n=Rbe(t);t.data&&(e.data=J0(t.data)),n&&(e.position=n)}function Ine(e,t){let n,r=-1;if(e)for(;++r<e.length;){const i=e[r],s=typeof i=="string"?i:i[0];if(s===t)return i;s==="data*"&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function $_t(e){return function(t){return R_t(t,e)}}function B_t(e,t,n){const i=a4((n||{}).ignore||[]),s=U_t(t);let a=-1;for(;++a<s.length;)oge(e,"text",o);function o(u,d){let h=-1,p;for(;++h<d.length;){const g=d[h],v=p?p.children:void 0;if(i(g,v?v.indexOf(g):void 0,p))return;p=g}if(p)return c(u,d)}function c(u,d){const h=d[d.length-1],p=s[a][0],g=s[a][1];let v=0;const _=h.children.indexOf(u);let w=!1,S=[];p.lastIndex=0;let E=p.exec(u.value);for(;E;){const T=E.index,N={index:E.index,input:E.input,stack:[...d,u]};let A=g(...E,N);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?p.lastIndex=T+1:(v!==T&&S.push({type:"text",value:u.value.slice(v,T)}),Array.isArray(A)?S.push(...A):A&&S.push(A),v=T+E[0].length,w=!0),!p.global)break;E=p.exec(u.value)}return w?(v<u.value.length&&S.push({type:"text",value:u.value.slice(v)}),h.children.splice(_,1,...S)):S=[u],_+S.length}}function U_t(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([V_t(i[0]),H_t(i[1])])}return t}function V_t(e){return typeof e=="string"?new RegExp(Uxe(e),"g"):e}function H_t(e){return typeof e=="function"?e:function(){return e}}const YM="phrasing",XM=["autolink","link","image","label"];function q_t(){return{transforms:[Z_t],enter:{literalAutolink:G_t,literalAutolinkEmail:QM,literalAutolinkHttp:QM,literalAutolinkWww:QM},exit:{literalAutolink:Q_t,literalAutolinkEmail:X_t,literalAutolinkHttp:K_t,literalAutolinkWww:Y_t}}}function W_t(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:YM,notInConstruct:XM},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:YM,notInConstruct:XM},{character:":",before:"[ps]",after:"\\/",inConstruct:YM,notInConstruct:XM}]}}function G_t(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function QM(e){this.config.enter.autolinkProtocol.call(this,e)}function K_t(e){this.config.exit.autolinkProtocol.call(this,e)}function Y_t(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function X_t(e){this.config.exit.autolinkEmail.call(this,e)}function Q_t(e){this.exit(e)}function Z_t(e){B_t(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,J_t],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),ewt]],{ignore:["link","linkReference"]})}function J_t(e,t,n,r,i){let s="";if(!M_e(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!twt(n)))return!1;const a=nwt(n+r);if(!a[0])return!1;const o={type:"link",title:null,url:s+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[o,{type:"text",value:a[1]}]:o}function ewt(e,t,n,r){return!M_e(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function twt(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function nwt(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=x3(e,"(");let s=x3(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function M_e(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Io(n)||s4(n))&&(!t||n!==47)}D_e.peek=dwt;function rwt(){this.buffer()}function iwt(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function swt(){this.buffer()}function awt(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function owt(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Tu(this.sliceSerialize(e)).toLowerCase(),n.label=t}function lwt(e){this.exit(e)}function cwt(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Tu(this.sliceSerialize(e)).toLowerCase(),n.label=t}function uwt(e){this.exit(e)}function dwt(){return"["}function D_e(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const a=n.enter("footnoteReference"),o=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),o(),a(),s+=i.move("]"),s}function fwt(){return{enter:{gfmFootnoteCallString:rwt,gfmFootnoteCall:iwt,gfmFootnoteDefinitionLabelString:swt,gfmFootnoteDefinition:awt},exit:{gfmFootnoteCallString:owt,gfmFootnoteCall:lwt,gfmFootnoteDefinitionLabelString:cwt,gfmFootnoteDefinition:uwt}}}function hwt(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:D_e},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,a){const o=s.createTracker(a);let c=o.move("[^");const u=s.enter("footnoteDefinition"),d=s.enter("label");return c+=o.move(s.safe(s.associationId(r),{before:c,after:"]"})),d(),c+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),c+=o.move((t?` 1260`:" ")+s.indentLines(s.containerFlow(r,o.current()),t?F_e:pwt))),u(),c}}function pwt(e,t,n){return t===0?e:F_e(e,t,n)}function F_e(e,t,n){return(n?"":" ")+e}function mwt(){return[q_t(),fwt(),Bme(),R0e(),N0e()]}function gwt(e){return{extensions:[W_t(),hwt(e),Ume(),I0e(e),j0e()]}}const xwt={tokenize:Swt,partial:!0},L_e={tokenize:Ewt,partial:!0},z_e={tokenize:Cwt,partial:!0},$_e={tokenize:Twt,partial:!0},vwt={tokenize:Awt,partial:!0},B_e={name:"wwwAutolink",tokenize:_wt,previous:V_e},U_e={name:"protocolAutolink",tokenize:wwt,previous:H_e},Yh={name:"emailAutolink",tokenize:bwt,previous:q_e},sf={};function ywt(){return{text:sf}}let Og=48;for(;Og<123;)sf[Og]=Yh,Og++,Og===58?Og=65:Og===91&&(Og=97);sf[43]=Yh;sf[45]=Yh;sf[46]=Yh;sf[95]=Yh;sf[72]=[Yh,U_e];sf[104]=[Yh,U_e];sf[87]=[Yh,B_e];sf[119]=[Yh,B_e];function bwt(e,t,n){const r=this;let i,s;return a;function a(h){return!AL(h)||!q_e.call(r,r.previous)||nU(r.events)?n(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(h))}function o(h){return AL(h)?(e.consume(h),o):h===64?(e.consume(h),c):n(h)}function c(h){return h===46?e.check(vwt,d,u)(h):h===45||h===95||ho(h)?(s=!0,e.consume(h),c):d(h)}function u(h){return e.consume(h),i=!0,c}function d(h){return s&&i&&Do(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(h)):n(h)}}function _wt(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!V_e.call(r,r.previous)||nU(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(xwt,e.attempt(L_e,e.attempt(z_e,s),n),n)(a))}function s(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function wwt(e,t,n){const r=this;let i="",s=!1;return a;
1260function a(h){return(h===72||h===104)&&H_e.call(r,r.previous)&&!nU(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(h),e.consume(h),o):n(h)}function o(h){if(Do(h)&&i.length<5)return i+=String.fromCodePoint(h),e.consume(h),o;if(h===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(h),c}return n(h)}function c(h){return h===47?(e.consume(h),s?u:(s=!0,c)):n(h)}function u(h){return h===null||g3(h)||jr(h)||Io(h)||s4(h)?n(h):e.attempt(L_e,e.attempt(z_e,d),n)(h)}function d(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(h)}}function Swt(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),s):n(a)}function s(a){return a===null?n(a):t(a)}}function Ewt(e,t,n){let r,i,s;return a;function a(u){return u===46||u===95?e.check($_e,c,o)(u):u===null||jr(u)||Io(u)||u!==45&&s4(u)?c(u):(s=!0,e.consume(u),a)}function o(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),a}function c(u){return i||r||!s?n(u):t(u)}}function Cwt(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?s(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check($_e,t,s)(a):a===null||jr(a)||Io(a)?t(a):(e.consume(a),i)}function s(a){return a===41&&r++,e.consume(a),i}}function Twt(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),s):o===93?(e.consume(o),i):o===60||o===null||jr(o)||Io(o)?t(o):n(o)}function i(o){return o===null||o===40||o===91||jr(o)||Io(o)?t(o):r(o)}function s(o){return Do(o)?a(o):n(o)}function a(o){return o===59?(e.consume(o),r):Do(o)?(e.consume(o),a):n(o)}}function Awt(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return ho(s)?n(s):t(s)}}function V_e(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||jr(e)}function H_e(e){return!Do(e)}function q_e(e){return!(e===47||AL(e))}function AL(e){return e===43||e===45||e===46||e===95||ho(e)}function nU(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const kwt={tokenize:Dwt,partial:!0};function Nwt(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Owt,continuation:{tokenize:Pwt},exit:Mwt}},text:{91:{name:"gfmFootnoteCall",tokenize:Iwt},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:jwt,resolveTo:Rwt}}}}function jwt(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const c=r.events[i][1];if(c.type==="labelImage"){a=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return o;function o(c){if(!a||!a._balanced)return n(c);const u=Tu(r.sliceSerialize({start:a.end,end:r.now()}));return u.codePointAt(0)!==94||!s.includes(u.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function Rwt(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function Iwt(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,a;return o;function o(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),c}function c(h){return h!==94?n(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(h){if(s>999||h===93&&!a||h===null||h===91||jr(h))return n(h);if(h===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(Tu(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(h)}return jr(h)||(a=!0),s++,e.consume(h),h===92?d:u}function d(h){return h===91||h===92||h===93?(e.consume(h),s++,u):u(h)}}function Owt(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,a=0,o;return c;function c(v){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(v){return v===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(v)}function d(v){if(a>999||v===93&&!o||v===null||v===91||jr(v))return n(v);if(v===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return s=Tu(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return jr(v)||(o=!0),a++,e.consume(v),v===92?h:d}function h(v){return v===91||v===92||v===93?(e.consume(v),a++,d):d(v)}function p(v){return v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),i.includes(s)||i.push(s),yr(e,g,"gfmFootnoteDefinitionWhitespace")):n(v)}function g(v){return t(v)}}function Pwt(e,t,n){return e.check(BE,t,e.attempt(kwt,t,n))}function Mwt(e){e.exit("gfmFootnoteDefinition")}function Dwt(e,t,n){const r=this;return yr(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(s):n(s)}}function Fwt(e){return Tge([ywt(),Nwt(),$me(e),O0e(),k0e()])}const Lwt={};function zwt(e){const t=this,n=e||Lwt,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Fwt(n)),s.push(mwt()),a.push(gwt(n))}const $wt=/^\[[^\n\]]*(?:](?:\([^\n)]*)?)?$/;function Bwt(e){return(e.match(/```/g)?.length??0)%2===1?!0:(e.slice(e.lastIndexOf(` 1261`)+1).match(/`/g)?.length??0)%2===1}function Uwt(e){const t=e.lastIndexOf("[");if(t===-1)return e;const n=e[t-1]==="!"?t-1:t,r=e.slice(0,n);return $wt.test(e.slice(t))?Bwt(r)?e:r:e}function kL(e,t){if(!e||!t)return e;try{const n=new URL(e),[r]=t.split(",");return n.pathname.toLowerCase().endsWith(".pdf")?`${n}#page=${r}`:e}catch{return e}}function One(e,t){const n=(e??"").trim().toLowerCase();if(!n)return!0;const r=t.toLowerCase(),i=r.replace(/^www\./,""),s=n.replace(/^www\./,"");return n===r||n===i||s===i||s===r}function Vwt(e,t){const n=new URL(e),r=n.pathname.replace(/\/$/,"")||"",i=r&&r!=="/"?r:"",s=`${n.hostname}${i}${n.search}${n.hash}`,a=(t??"").trim(),o=a.includes("/"),c=i&&(!a||One(a,n.hostname)||!o),u=!i&&One(a,n.hostname);return c||u?s:a||s}function NL(e){const{type:t,url:n,fileName:r}=e;if(t!==Mr.Website&&t!==Mr.ExternalDocument||!n)return r??"Untitled";try{return Vwt(n,r)}catch{return r??"Untitled"}}function Pne(e,t){return`${e.url||e.fileName}#${e.page??""}#${t}`}function jL(e){if(!e)return[];const t=e.split(",").map(n=>Number.parseInt(n.trim(),10)).filter(n=>Number.isFinite(n));return[...new Set(t)].sort((n,r)=>n-r)}function Hwt(e){if(e.length===0)return"";const t=[];let n=e[0],r=e[0];for(const i of e.slice(1)){if(i===r+1){r=i;continue}t.push(n===r?`${n}`:`${n}â${r}`),n=i,r=i}return t.push(n===r?`${n}`:`${n}â${r}`),t.join(", ")}function qwt(e,t){return[...new Set([...jL(e),...jL(t)])].sort((n,r)=>n-r).join(",")}function W_e(e,t){return t===Mr.Website?"":Hwt(jL(e))}function G_e(e){if(!e?.length)return[];const t=new Map,n=[];for(const r of e){const i=r.documentId||r.url||r.fileName||"",s=r.ids?.length?r.ids:r.i
1261d?[r.id]:[],a=t.get(i);if(!a){t.set(i,{...r,ids:[...s]}),n.push(i);continue}a.page=qwt(a.page,r.page),a.ids??=[];for(const o of s)a.ids.includes(o)||a.ids.push(o)}return n.map(r=>t.get(r))}const rU=/\[(c\d+(?:\s*,\s*c\d+)*)]/gi;function K_e(e){return e.split(",").map(t=>t.trim()).filter(t=>/^c\d+$/.test(t))}function iU(e,t){let n="",r=0;for(const i of bWe(e))n+=t(e.slice(r,i.start))+e.slice(i.start,i.end),r=i.end;return n+t(e.slice(r))}function Wwt(e){return iU(e,t=>t.replaceAll(rU,(n,r)=>K_e(r).map(i=>`<sup data-cite="${i}"></sup>`).join("")))}function Gwt(e){return iU(e,t=>t.replaceAll(rU,"").replaceAll(/ +([!,.:;?])/g,"$1").replaceAll(/[\t ]{2,}/g," "))}function Kwt(e){const t=[];return iU(e,n=>{for(const r of n.matchAll(rU))t.push(...K_e(r[1]??""));return n}),t}function Ywt(e,t){const n=new Map,r=G_e(t);r.forEach((s,a)=>{const o=s.ids?.length?s.ids:s.id?[s.id]:[];for(const c of o)n.set(c.trim(),{number:a+1,source:s})});let i=r.length+1;for(const s of Kwt(e))n.has(s)||(n.set(s,{number:i}),i+=1);return n}const Mne=or("inline-block rounded-full bg-chat-surface px-2 py-1","text-[0.65rem] font-medium leading-none text-chat-surface-foreground no-underline","transition-colors hover:bg-chat-primary hover:text-chat-primary-foreground"),Xwt=or("inline-flex min-w-[1rem] items-center justify-center align-super","text-[0.6rem] font-semibold leading-none tabular-nums","rounded-full bg-chat-surface px-1 py-0.5 mx-px","text-chat-surface-foreground no-underline","transition-colors hover:bg-chat-primary hover:text-chat-primary-foreground");function Qwt({type:e}){return e===Mr.Document?l.jsx(Ij,{className:"size-3 shrink-0"}):e===Mr.Website?l.jsx(Vu,{className:"size-3 shrink-0"}):e===Mr.ExternalDocument?l.jsx(Rj,{className:"size-3 shrink-0"}):null}const Y_e=b.memo(({source:e,number:t,variant:n="inline",className:r})=>{if(n==="superscript"){const c=e?NL(e):void 0,u=e?.url?kL(e.url,e.page):void 0,d=or(Xwt,r);return u?l.jsx("a",{className:d,href:u,target:"_blank",rel:"noreferrer",title:c,children:t}):l.jsx("span",{className:or(d,"cursor-default"),title:c,children:t})}if(!e)return null;const i=NL(e),s=W_e(e.page,e.type),a=e.url?kL(e.url,e.page):void 0,o=or(Mne,"cursor-pointer",r);return a?l.jsxs("a",{className:o,href:a,target:"_blank",rel:"noreferrer",children:[i,s&&l.jsxs("span",{className:"opacity-70",children:[" · p. ",s]})]}):l.jsxs("span",{className:or(Mne,"cursor-default inline-flex items-center gap-1",r),children:[l.jsx(Qwt,{type:e.type}),l.jsx("span",{className:"truncate max-w-[12rem]",children:i}),s&&l.jsxs("span",{className:"opacity-70",children:["· p. ",s]})]})}),X_e={pre:({children:e})=>l.jsx("pre",{className:"bg-muted text-xs bg-chat-background border overflow-auto whitespace-break-spaces w-full p-2 rounded-lg [overflow-wrap:anywhere]",children:e}),img:({node:e,children:t,...n})=>l.jsx("img",{className:"w-full border border-chat-border rounded-md my-3",...n}),p:({node:e,children:t,...n})=>l.jsx("p",{className:"my-1",...n,children:t}),ol:({node:e,children:t,...n})=>l.jsx("ol",{className:"list-decimal my-1 list-outside ml-8 [&_ul]:ml-3 [&_ol]:ml-3",...n,children:t}),li:({node:e,children:t,...n})=>l.jsx("li",{className:"py-0.5",...n,children:t}),ul:({node:e,children:t,...n})=>l.jsx("ul",{className:"list-decimal my-1 list-outside ml-8 [&_ul]:ml-3 [&_ol]:ml-3",...n,children:t}),strong:({node:e,children:t,...n})=>l.jsx("span",{className:"font-semibold",...n,children:t}),a:({node:e,children:t,...n})=>l.jsx("a",{className:"underline",target:"_blank",rel:"noreferrer",...n,children:t}),h1:({node:e,children:t,...n})=>l.jsx("h1",{className:"text-3xl font-bold mt-4 mb-2",...n,children:t}),h2:({node:e,children:t,...n})=>l.jsx("h2",{className:"text-2xl font-semibold mt-4 mb-2",...n,children:t}),h3:({node:e,children:t,...n})=>l.jsx("h3",{className:"text-xl font-semibold mt-4 mb-2",...n,children:t}),h4:({node:e,children:t,...n})=>l.jsx("h4",{className:"text-lg font-semibold mt-4 mb-2",...n,children:t}),h5:({node:e,children:t,...n})=>l.jsx("h5",{className:"text-base font-semibold mt-4 mb-2",...n,children:t}),h6:({node:e,children:t,...n})=>l.jsx("h6",{className:"text-sm font-semibold mt-4 mb-2",...n,children:t}),table:({node:e,children:t,...n})=>l.jsx("div",{className:"overflow-x-auto my-4 max-w-[300px] [overflow-wrap:normal]",children:l.jsx("table",{className:"w-full border-collapse border border-chat-border rounded-md",...n,children:t})}),thead:({node:e,children:t,...n})=>l.jsx("thead",{className:"bg-muted",...n,children:t}),tbody:({node:e,children:t,...n})=>l.jsx("tbody",{className:"divide-y divide-border",...n,children:t}),tr:({node:e,children:t,...n})=>l.jsx("tr",{className:"hover:bg-muted/50",...n,children:t}),th:({node:e,children:t,...n})=>l.jsx("th",{className:"px-4 py-2 text-left font-semibold border-b border-chat-border",...n,children:t}),td:({node:e,children:t,...n})=>l.jsx("td",{className:"px-4 py-2 border-r last:border-r-0 border-chat-border",...n,children:t}),u:({node:e,children:t,...n})=>l.jsx("span",{className:"underline",...n,children:t})};function Zwt(e){return{...X_e,sup:({node:t,children:n,...r})=>{const i=t?.properties?.["data-cite"]??r["data-cite"];if(!i)return l.jsx("sup",{...r,children:n});const s=e.get(i.trim());return s?l.jsx(Y_e,{source:s.source,number:s.number,variant:"superscript"}):null}}}const Jwt={...m1,tagNames:[...m1.tagNames??[],"u"],attributes:{...m1.attributes,sup:[...m1.attributes?.sup??[],"dataCite"]}},e2t=[zwt],t2t=[j_t,[$_t,Jwt]];function n2t({children:e,citations:t,inlineCitations:n=!1,streaming:r=!1}){const i=b.useMemo(()=>n?Ywt(e,t):null,[e,t,n]),s=b.useMemo(()=>{const o=r?Uwt(e):e;return n?i&&i.size>0?Wwt(o):o:r2t.test(o)?Gwt(o):o},[e,i,n,r]),a=b.useMemo(()=>i?Zwt(i):X_e,[i]);return l.jsx(i1t,{remarkPlugins:e2t,rehypePlugins:t2t,components:a,children:s})}const r2t=/\[c\d+/i,Ph=b.memo(n2t,(e,t)=>e.children===t.children&&e.citations===t.citations&&e.inlineCitations===t.inlineCitations&&e.streaming===t.streaming),i2t=b.memo(({reasoning:e})=>{const{i18n:t,_:n}=Me(),[r,i]=b.useState(!1);return e.trim()?l.jsxs("div",{className:"mb-1 w-full max-w-full rounded-2xl border border-chat-border/40 bg-chat-surface/30",children:[l.jsxs("button",{type:"button","aria-expanded":r,onClick:()=>i(s=>!s),className:or("flex w-full items-center gap-2 rounded-2xl px-3 py-1.5 text-left","text-xs text-chat-muted-foreground transition-colors hover:bg-chat-surface/60"),children:[r?l.jsx(Xd,{className:"size-3.5 shrink-0 opacity-70"}):l.jsx(Qd,{className:"size-3.5 shrink-0 opacity-70"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:t._({i
1261d:"AUV+TY"})})]}),r?l.jsx("div",{className:"px-3 pb-2 text-xs text-chat-muted-foreground [overflow-wrap:anywhere]",children:l.jsx(Ph,{children:e})}):null]}):null}),s2t="mt-2 flex flex-wrap gap-1.5",a2t=3;function o2t({source:e,format:t}){const n=e.url?kL(e.url,e.page):void 0,r=NL(e),i=W_e(e.page,e.type);return l.jsxs("li",{className:"grid min-w-0 grid-cols-[minmax(0,1fr)_auto] items-center gap-1 text-xs",children:[n?l.jsxs("a",{className:"flex min-w-0 items-center hover:underline",href:n,target:"_blank",rel:"noreferrer",title:[r,e.header,e.article,i,e.note].filter(Boolean).join(" | "),children:[l.jsx(Dne,{type:e.type}),l.jsx("span",{className:"min-w-0 truncate",children:t===Th.Simple?r:l.jsxs(l.Fragment,{children:[r,e.header&&l.jsxs(l.Fragment,{children:[" ","| ",l.jsx("strong",{children:e.header})]}),e.article&&` | ${e.article}`,i&&l.jsxs(l.Fragment,{children:[" ","| ",l.jsx(D,{id:"rQNuNw"}),". ",i]})]})})]}):l.jsxs("span",{className:"flex min-w-0 items-center",title:[r,e.header,e.article,i,e.note].filter(Boolean).join(" | "),children:[l.jsx(Dne,{type:e.type}),l.jsx("span",{className:"min-w-0 truncate",children:r})]}),n?l.jsx(Qd,{className:"size-3.5 shrink-0"}):null]})}function Dne({type:e}){return e===Mr.Document?l.jsx(Ij,{className:"mr-1.5 size-3.5 shrink-0"}):e===Mr.Website?l.jsx(Vu,{className:"mr-1.5 size-3.5 shrink-0"}):e===Mr.ExternalDocument?l.jsx(Rj,{className:"mr-1.5 size-3.5 shrink-0"}):null}const LS=b.memo(({sources:e,sourcesFormat:t=Th.Simple,sourcesDisplayMode:n=Ms.Pills,maxVisible:r=a2t})=>{const i=b.useMemo(()=>G_e(e),[e]),[s,a]=b.useState(!1);if(i.length===0)return null;const o=Math.max(0,i.length-r),c=s?i:i.slice(0,r);return n===Ms.Pills?l.jsxs("div",{className:s2t,children:[c.map((u,d)=>l.jsx(Y_e,{source:u},Pne(u,d))),!s&&o>0&&l.jsxs("button",{type:"button",className:or("inline-block cursor-pointer rounded-full bg-chat-surface px-2 py-1","text-[0.65rem] font-medium leading-none"),onClick:()=>a(!0),children:["+",o]}),s&&o>0&&l.jsx("button",{type:"button",className:or("inline-block cursor-pointer rounded-full bg-chat-surface px-2 py-1","text-[0.65rem] font-medium leading-none"),onClick:()=>a(!1),children:l.jsx(D,{id:"6lGV3K"})})]}):l.jsxs(l.Fragment,{children:[l.jsx("h4",{className:"text-xs font-semibold mb-2",children:l.jsx(D,{id:"sBJ5MF"})}),l.jsx("ul",{className:"flex flex-col gap-1",children:c.map((u,d)=>l.jsx(o2t,{source:u,format:t},Pne(u,d)))}),!s&&o>0&&l.jsxs("button",{type:"button",className:"mt-2 text-xs underline",onClick:()=>a(!0),children:["+",o," ",l.jsx(D,{id:"OQcReo"})]}),s&&o>0&&l.jsx("button",{type:"button",className:"mt-2 text-xs underline",onClick:()=>a(!1),children:l.jsx(D,{id:"D28Eoi"})})]})});function l2t(e){const t=new Map;for(const n of e.toolCalls??[])n.type===Bm.Tool&&t.set(n.id,n);return t}function c2t(e){const{name:t,fromCall:n,fromResult:r}=e;return n?.display?{display:n.display,kind:n.kind??j1(t).kind}:r?.display?{display:r.display,kind:r.kind??j1(t).kind}:j1(t)}function Q_e(e){return e?e.is_error?"error":"completed":"pending"}function Z_e(e){return e!=="start"&&e!=="streaming"}function u2t(e){return e.presentation.display==="card"&&e.presentation.kind!=="form"&&e.status!=="completed"&&e.status!=="error"&&!e.content&&e.artifact===void 0}function d2t(e,t,n,r){const i=l2t(e).get(t),s=i?.name??n?.name??r?.name??"";if(!s&&!i)return null;const a=c2t({name:s,fromCall:i,fromResult:r});return{id:t,name:s,args:i?.args??n?.args??{},content:typeof i?.content=="string"?i.content:r?.content,artifact:i?.artifact??r?.artifact,status:i?.status??Q_e(r),label:i?.label,index:i?.index??0,presentation:a}}function f2t(e,t={}){const{showReasoning:n,showToolActivity:r,debugToolCalls:i=!1}=t;if(e.sources?.length)return!0;const{reasoning:s,process:a,answer:o}=ewe({message:e,blocks:fy(e),debugToolCalls:i});return o.length>0||n&&s.trim()?!0:!!((r||i)&&a.length>0)}function J_e(e){return fy(e).some(t=>t.type==="text"&&!!t.text?.trim())}function h2t(e){const{tool:t,message:n,toolRegistry:r,renderUnknownTool:i,debugToolCalls:s}=e;return t.presentation.display==="hidden"?null:t.presentation.kind==="form"?i?.({toolName:t.name,toolCallId:t.id,args:t.args,content:t.content,artifact:t.artifact,toolCallStatus:t.status,kind:t.presentation.kind,state:t.status==="pending"?"call-complete":"result"}):s||r?.[t.name]?l.jsx($2t,{status:n.status,args:t.args,toolName:t.name,index:t.index,content:t.content,artifact:t.artifact,toolCallStatus:t.status,toolCallId:t.id,toolRegistry:r??{},renderFallback:i,label:t.label}):i?.({toolName:t.name,toolCallId:t.id,args:t.args,content:t.content,artifact:t.artifact,toolCallStatus:t.status,state:t.status==="error"?"error":"result"})}function p2t({tools:e,message:t,expandToolActivity:n,renderTrailStepInspector:r}){const i=e.map(s=>({id:s.id,type:Bm.Tool,name:s.name,args:s.args,index:s.index,content:s.content,artifact:s.artifact,status:s.status,label:s.label,display:s.presentation.display,kind:s.presentation.kind}));return l.jsx(Wmt,{toolCalls:i,status:t.status,hasAnswerContent:J_e(t),defaultExpanded:n,renderStepInspector:r})}function ewe(e){const{message:t,blocks:n,debugToolCalls:r}=e,i=new Map,s=new Set;for(const w of n){if(w.type==="tool_result"){i.set(w.tool_call_id,w);continue}if(w.type==="non_standard"){const S=YN.safeParse(w.value);S.success&&s.add(S.data.toolCallId)}}const a=[],o=[],c=[],u=new Set(s),d=new Set;let h="",p=!1;const g=w=>{h&&p&&(h+=` 1262 1263`),h+=w,p=!1},v=w=>{if(w.presentation.display!=="hidden"){if(w.presentation.display==="activity"&&!r){o.push(w);return}Z_e(t.status)&&u2t(w)||(c.push({kind:"card",tool:w}),p=!0)}};for(const[w,S]of n.entries())switch(S.type){case"text":if(!S.text?.trim())break;h||c.push({kind:"text"}),g(S.text);break;case"reasoning":S.reasoning?.trim()&&a.push(S.reasoning);break;
1263case"tool_call":case"tool_result":{const E=S.type==="tool_call"?S.id:S.tool_call_id;if(!E||u.has(E))break;u.add(E);const T=d2t(t,E,S.type==="tool_call"?S:void 0,i.get(E));T&&v(T);break}case"tool_call_chunk":{const E=S.id??`chunk-${w}`;if(u.has(E))break;u.add(E),o.push(m2t(E,S.name??""));break}case"invalid_tool_call":{const E=S.id??`invalid-${w}`;if(u.has(E))break;u.add(E),o.push(g2t(E,S.name??"",S.error??""));break}case"non_standard":{const E=YN.safeParse(S.value);if(!E.success||d.has(E.data.toolCallId))break;d.add(E.data.toolCallId),c.push({kind:"form",value:E.data,result:i.get(E.data.toolCallId)}),p=!0;break}}const x=[],_=[];for(const w of c)w.kind==="card"&&w.tool.presentation.kind==="operator"?x.push(w):_.push(w);return{reasoning:a.join(` 1264 1265`),process:o,answer:[..._,...x],text:h}}function m2t(e,t){return{id:e,name:t,args:{},status:"pending",index:0,presentation:j1(t)}}function g2t(e,t,n){return{id:e,name:t,args:{},content:n,status:"error",index:0,presentation:j1(t)}}const x2t=b.memo(e=>{const{message:t,toolRegistry:n,renderUnknownTool:r,showToolActivity:i=!1,expandToolActivity:s=!1,debugToolCalls:a=!1,renderTrailStepInspector:o,showReasoning:c=!1,renderSources:u,sourcesFormat:d,sourcesDisplayMode:h=Ms.Pills,inlineCitations:p=!1,answerFooter:g}=e,{reasoning:v,process:x,answer:_,text:w}=b.useMemo(()=>ewe({message:t,blocks:fy(t),debugToolCalls:a}),[t,a]),S=b.useMemo(()=>{const T=t.sources;return T?.length?T:g8(fy(t))},[t]),E=x.length>0&&(i||a);return l.jsxs("div",{className:"flex w-full min-w-0 flex-col gap-1",children:[c&&v?l.jsx(i2t,{reasoning:v}):null,E?l.jsx(p2t,{tools:x,message:t,expandToolActivity:s,renderTrailStepInspector:o}):null,_.map(T=>{if(T.kind==="text")return l.jsxs(Cr.BubbleGroup,{children:[l.jsxs(Cr.Bubble,{children:[l.jsx(Ph,{citations:S,inlineCitations:p,streaming:!Z_e(t.status),children:w}),!u&&h===Ms.Pills&&S?l.jsx(LS,{sources:S,sourcesFormat:d,sourcesDisplayMode:Ms.Pills}):null]}),g]},"answer-text");if(T.kind==="form"){const{value:N,result:A}=T;return l.jsx(b.Fragment,{children:r?.({toolName:N.name,toolCallId:N.toolCallId,args:{},content:A?.content,artifact:N.artifact,toolCallStatus:Q_e(A),kind:"form",state:A?"result":"call-complete"})},`form-${N.toolCallId}`)}return l.jsx(b.Fragment,{children:h2t({tool:T.tool,message:t,toolRegistry:n,renderUnknownTool:r,debugToolCalls:a})},`tool-${T.tool.id}`)}),_.some(T=>T.kind==="text")?null:g,u?.(t),!u&&h===Ms.Structured&&S&&S.length>0?l.jsx(Cr.BubbleGroup,{children:l.jsx(Cr.Bubble,{children:l.jsx(LS,{sources:S,sourcesFormat:d,sourcesDisplayMode:Ms.Structured})})},"answer-sources"):null]})}),ZM=b.memo(({mode:e="stopped",onRetry:t})=>{const{i18n:n,_:r}=Me(),i=e==="failed"?n._({id:"KdMvsJ"}):n._({id:"zo+Xj8"});return t?l.jsxs("div",{className:"mt-1 flex items-center gap-2 text-xs text-chat-muted-foreground",children:[l.jsx("span",{children:i}),l.jsx("button",{type:"button",onClick:t,className:"font-medium text-chat-foreground underline-offset-2 hover:underline",children:e==="failed"?n._({id:"KDw4GX"}):n._({id:"xGVfLh"})})]}):l.jsx("p",{className:"mt-1 text-xs text-chat-muted-foreground",children:i})}),hb=b.createContext(null);function v2t({insert:e,append:t,retry:n,isFetching:r,children:i}){const s=b.useMemo(()=>({insert:e,append:t,retry:n,isFetching:r}),[e,t,n,r]);return l.jsx(hb.Provider,{value:s,children:i})}const y2t=b.memo(({group:e,name:t,avatar:n,toolRegistry:r,renderUnknownTool:i,showToolActivity:s=!1,expandToolActivity:a=!1,showReasoning:o=!1,debugToolCalls:c=!1,renderTrailStepInspector:u,renderSources:d,sourcesFormat:h=Th.Simple,sourcesDisplayMode:p=Ms.Pills,inlineCitations:g=!1,FeedbackComponent:v,shouldRenderFeedback:x,isFetching:_,isActive:w,onRetry:S,position:E="left",variant:T="secondary"})=>{const{messages:N,createdAt:A,isLast:k,isInitial:j}=e,R=AB(A),P=N.at(-1),V=b.useMemo(()=>e.messages.some(H=>f2t(H,{showReasoning:o,showToolActivity:s,debugToolCalls:c})),[e.messages,o,s,c]),U=b.useContext(hb)?.append,G=N.at(-1),Q=N.findLast(J_e)??G,Z=l.jsx(CS,{mode:"wait",children:v&&P&&!(_&&k)&&(x?.(e)??!0)&&l.jsx(Ja.div,{className:"w-full",initial:!_&&!j&&k?{opacity:0,y:2}
1265:!1,animate:{opacity:1,y:0},transition:{delay:.2,duration:.2},children:l.jsx(v,{message:P})})}),K=G?.followUpQuestions??[],te=e.messages.some(H=>Xqe(H)!==null),ne=e.messages.some(H=>H.generationStatus===Zg.Stopped||H.generationStatus===Zg.Failed),se=k&&!_&&K.length>0&&G?.answered!==!1&&!te&&!ne;return l.jsxs(Cr.Root,{variant:T,position:E,children:[l.jsxs(Cr.Header,{className:"flex items-center gap-2",children:[l.jsx(Cr.Avatar,{children:l.jsx(mbe,{src:n,fallback:yt.initials(t)})}),l.jsx("span",{children:t}),l.jsx(CS,{children:w&&l.jsx(Ja.span,{className:"text-xs text-gray-500",initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.3},children:l.jsx(Kr,{className:"animate-spin size-3",strokeWidth:3})})})]}),l.jsx(Cr.Wrapper,{className:"max-w-full",children:l.jsxs(Cr.Content,{children:[V?N.map(H=>{const O=k&&H.id===G?.id?S:void 0;return l.jsxs("div",{className:"flex w-full min-w-0 flex-col gap-1",children:[l.jsx(x2t,{message:H,toolRegistry:r,renderUnknownTool:i,showToolActivity:s,expandToolActivity:a,showReasoning:o,debugToolCalls:c,renderTrailStepInspector:u,renderSources:d,sourcesFormat:h,sourcesDisplayMode:p,inlineCitations:g,answerFooter:H.id===Q?.id?Z:void 0}),H.generationStatus===Zg.Stopped?l.jsx(ZM,{mode:"stopped",onRetry:O}):H.generationStatus===Zg.Failed?l.jsx(ZM,{mode:"failed",onRetry:O}):H.status==="interrupted"?l.jsx(ZM,{mode:"stopped",onRetry:O}):null]}
1265,H.id)}):l.jsx(Cr.BubbleGroup,{children:l.jsx(Cr.Typing,{})}),l.jsx(Cr.Footer,{children:R}),se&&l.jsx(w0t,{questions:K,onSelect:U})]})})]})}),b2t=b.memo(({group:e})=>{const{messages:t,isLast:n}=e,r=b.useContext(hb),i=t.some(a=>a.retryable===!0),s=!!(n&&i&&r?.retry);return l.jsxs("div",{className:"my-2 flex flex-col items-center gap-2 px-4",children:[t.map(a=>a.content?l.jsx("p",{className:"text-center text-sm font-medium text-chat-muted-foreground",children:a.content},a.id):null),s&&l.jsx(zc,{type:"button",variant:"outline",size:"xs",disabled:r?.isFetching,onClick:()=>{r?.retry?.()},children:l.jsx(D,{id:"6gRgw8"})})]})}),_2t=b.memo(({group:e,position:t="right",variant:n="primary"})=>{const{messages:r,createdAt:i}=e,s=AB(i);return l.jsxs(Cr.Root,{variant:n,position:t,children:[l.jsx(Cr.Wrapper,{children:l.jsx(Cr.Content,{children:l.jsx(Cr.BubbleGroup,{children:r.map(a=>l.jsx(Cr.Bubble,{children:l.jsx(Ph,{children:a.content??""})},a.id))})})}),l.jsx(Cr.Footer,{children:s})]})}),w2t=b.memo(({className:e="",messages:t,agentName:n,agentAvatar:r,toolRegistry:i,renderUnknownTool:s,rolesConfig:a,isFetching:o,FeedbackComponent:c,messageGroupingThreshold:u=900*1e3,children:d,renderAfterGroup:h,shouldRenderFeedback:p,showToolActivity:g,expandToolActivity:v,debugToolCalls:x,renderTrailStepInspector:_,renderSources:w,sourcesFormat:S,sourcesDisplayMode:E,inlineCitations:T,showReasoning:N,onRetry:A})=>{const k=b.useMemo(()=>{const j=t.slice().sort(Pfe),R=j.reduce((P,V,U)=>{const G=j[U-1],Q=P.at(-1);return!G||G.role!==V.role||Math.abs(new Date(V.createdAt).getTime()-new Date(G.createdAt).getTime())>u?P.push({id:V.id,messages:[V],role:V.role,createdAt:new Date(V.createdAt),isInitial:V.isInitial,isLast:!1}):Q?.messages.push(V),P},[]);return R.length>0&&(R.at(-1).isLast=!0),R},[t,u]);return l.jsx("div",{className:`flex grow flex-col gap-3 [&>*:first-child]:mt-auto ${e}`,children:l.jsxs(CS,{mode:"sync",children:[k.map((j,R)=>l.jsxs(b.Fragment,{children:[l.jsx(Ja.div,{initial:{y:10,opacity:0},animate:{opacity:1,y:0},children:j.role===nh.User?l.jsx(_2t,{group:j,...a?.[j.role]}):j.role===nh.Assistant?l.jsx(y2t,{group:j,name:n,avatar:r,toolRegistry:i,renderUnknownTool:s,showToolActivity:g,expandToolActivity:v,debugToolCalls:x,renderTrailStepInspector:_,renderSources:w,sourcesFormat:S,sourcesDisplayMode:E,inlineCitations:T,showReasoning:N,onRetry:A,isFetching:o,isActive:o&&R===k.length-1,shouldRenderFeedback:p,FeedbackComponent:c,...a?.[j.role]}):j.role===nh.Administrator?l.jsx(b0t,{group:j,...a?.[j.role]}):j.role===nh.Status?l.jsx(b2t,{group:j}):null}),h?.(j,R)]},j.id)),d]})})});function JM(e){return e!=null&&e!=="null"&&e!=="undefined"&&!!e}function sU({operator:e}){return!e?.name&&!e?.email&&!e?.phone?null:l.jsxs(Cr.Bubble,{children:[l.jsx("h4",{className:"text-sm font-bold mb-2",children:l.jsx(D,{id:"usAuqG"})}),l.jsxs("ul",{className:"flex flex-col gap-1",children:[JM(e?.name)&&l.jsx("li",{className:"grid grid-cols-[1fr_auto] items-center gap-1",children:l.jsxs("div",{className:"inline-flex items-center gap-2 font-semibold",children:[l.jsx(mOe,{className:"relative top-0.5 size-4 shrink-0"}),l.jsx("span",{className:"break-all",children:e.name})]})}),JM(e?.email)&&l.jsx("li",{className:"grid grid-cols-[1fr_auto] items-center gap-1",children:l.jsxs("div",{className:"inline-flex items-center gap-2",children:[l.jsx(Oj,{className:"relative top-0.5 size-4 shrink-0"}),l.jsx("a",{href:`mailto:${e.email}`,className:"break-all underline hover:no-underline",children:e.email})]})}),JM(e?.phone)&&l.jsx("li",{className:"grid grid-cols-[1fr_auto] items-center gap-1",children:l.jsxs("div",{className:"inline-flex items-center gap-2",children:[l.jsx(C6,{className:"relative top-0.5 size-4 shrink-0"}),l.jsx("a",{href:`tel:${e.phone}`,className:"break-all underline hover:no-underline",children:e.phone})]})})]})]})}const S2t=Cx({schema:{artifact:aqe},validate:!1,position:"after"},({state:e,error:t,artifact:n,mode:r,onTakeover:i})=>{const{operator:s,available:a=!0}=n??{},[o,c]=b.useState(!1),u=async d=>{try{if(!i)return;c(!0),await i(d)}catch(h){console.error(h)}finally{c(!1)}};switch(e){case"call":return l.jsx(Q0,{loading:!0,children:l.jsx(D,{id:"Du+zn+"})});case"call-partial":case"call-complete":return l.jsx(Q0,{loading:!0,children:l.jsx(D,{id:"0ByTou"})});case"error":return l.jsx(C4,{message:l.jsx(D,{id:"29VNqC"}),error:t});case"result":{const d=s?.firstName&&s?.lastName,h=a&&!!i;return l.jsxs("div",{className:"flex w-full flex-col items-start gap-2",children:[d?l.jsx(sU,{operator:{name:yt.fullName(s),email:s.email,phone:s.phone}}):null,h?l.jsx(zc,{loading:o,disabled:o,variant:r===wu.Human?"outline":"primary",onClick:()=>u(r===wu.AI),className:"!rounded-full",children:r===wu.Human?l.jsx(D,{id:"stPC8k"}):l.jsx(D,{id:"iX9HQC"})}):null]})}default:return null}}),E2t=e=>{if(!e)return!1;const t=e.trim().toLowerCase();return!!t&&t.length>0&&t!=="null"&&t!=="undefined"},C2t=Cx({schema:{args:GHe}},({toolCall:e,onTakeover:t,mode:n})=>{const{operator:r,content:i}=e.args,[s,a]=b.useState(!1),o=b.useCallback(async()=>{try{if(!t)return;a(!0),await t(n===wu.AI)}catch(c){console.error(c)}finally{a(!1)}},[n,t]);return l.jsxs(l.Fragment,{children:[l.jsxs(Cr.BubbleGroup,{children:[l.jsx(Cr.Bubble,{children:l.jsx(Ph,{children:i??""})}),l.jsx(sU,{operator:r}),E2t(r?.displayText)&&l.jsx(Cr.Bubble,{children:l.jsx(Ph,{children:r.displayText})})]}),t&&l.jsx("div",{className:"flex justify-start gap-1",children:l.jsx(zc,{loading:s,disabled:s,size:"lg",variant:n===wu.Human?"outline":"primary",onClick:o,className:"rounded-full",children:n===wu.Human?l.jsx(D,{id:"stPC8k"}):l.jsx(D,{id:"iX9HQC"})})})]})}),T2t=Cx({schema:{args:KHe}},({toolCall:e})=>{const{operator:t}=e.args||{},n=t?.name&&(t?.email||t?.phone);return l.jsxs(Cr.BubbleGroup,{children:[l.jsx(Cr.Bubble,{children:l.jsx(D,{id:"N5to1I",values:{0:n?l.jsx(D,{id:"xz65Dx"}):"."}})}),n&&l.jsx(sU,{operator:{name:t?.name??"",email:t?.email??"",phone:t?.phone??"",displayText:""}}
1265)]})});function A2t(e){if(!Array.isArray(e))return[];const t=new Set;return e.filter(n=>!n?.url||t.has(n.url)?!1:(t.add(n.url),!0))}function k2t(e,t){const n=typeof e=="string"?e:"";return n.trim()||!t.isComplete?n:t.emptyFallback}const N2t=Cx({schema:{args:WHe}},({toolCall:e,state:t,sourcesFormat:n=Th.Simple,sourcesDisplayMode:r=Ms.Pills})=>{const{i18n:i,_:s}=Me(),{content:a,sources:o=[]}=e.args,u=k2t(a,{isComplete:t==="call-complete"||t==="result",emptyFallback:i._({id:"GKiwnt"})}),d=A2t(o);return l.jsxs(Cr.BubbleGroup,{children:[l.jsxs(Cr.Bubble,{children:[l.jsx(Ph,{citations:d,children:u}),r===Ms.Pills&&l.jsx(LS,{sources:d,sourcesFormat:n,sourcesDisplayMode:Ms.Pills})]}),r===Ms.Structured&&d.length>0&&l.jsx(Cr.Bubble,{children:l.jsx(LS,{sources:d,sourcesFormat:n,sourcesDisplayMode:Ms.Structured})})]})});function j2t({item:e,galleryEnabled:t}){const n=b.useContext(hb),{i18n:r,_:i}=Me(),[s,a]=b.useState(!1),[o,c]=b.useState(0),u=[...new Set([e.imageUrl,...e.images??[]].flatMap(h=>h?[h]:[]))],d=o%(u.length||1);return l.jsxs(L1.Root,{className:"flex h-full w-full min-w-0 flex-col overflow-hidden border-chat-border shadow-none",children:[u.length>0?l.jsxs("div",{className:"group/gallery relative aspect-[4/3] w-full shrink-0 overflow-hidden bg-chat-background-secondary",children:[l.jsx("img",{src:u[d],alt:e.title||e.name,loading:"lazy",draggable:!1,className:"absolute inset-0 size-full object-cover"}),t&&u.length>1?l.jsxs("div",{className:"absolute inset-0 opacity-0 transition-opacity group-hover/gallery:opacity-100 [&:has(:focus-visible)]:opacity-100 [@media(hover:none)]:opacity-100",children:[l.jsx("button",{type:"button","aria-label":r._({id:"MHk+7g"}),onClick:()=>c((d+u.length-1)%u.length),className:"absolute left-1 top-1/2 -translate-y-1/2 rounded-full bg-chat-background/90 p-1 text-chat-foreground",children:l.jsx(Aj,{className:"size-4"})}),l.jsx("button",{type:"button","aria-label":r._({id:"EatZYJ"}),onClick:()=>c((d+1)%u.length),className:"absolute right-1 top-1/2 -translate-y-1/2 rounded-full bg-chat-background/90 p-1 text-chat-foreground",children:l.jsx(Qd,{className:"size-4"})})]}):null]}):null,l.jsxs(L1.Content,{className:"flex min-w-0 flex-1 flex-col p-2.5 select-none",children:[l.jsxs("div",{className:"mb-1 flex items-start justify-between gap-1",children:[l.jsx("h3",{className:"min-w-0 text-sm font-semibold leading-snug line-clamp-2",children:e.title||e.name}),e.reason?l.jsx("button",{type:"button",title:e.reason,"aria-label":r._({id:"tvNHne"}),"aria-pressed":s,onClick:()=>a(h=>!h),className:or("mt-0.5 shrink-0 text-muted-foreground/70 transition-colors hover:text-chat-foreground",s&&"text-chat-foreground"),children:l.jsx(ax,{className:"size-3.5"})}):null]}),s&&e.reason?l.jsxs("p",{className:"mb-2 line-clamp-4 text-xs italic text-muted-foreground",children:[l.jsx("span",{className:"font-medium not-italic",children:l.jsx(D,{id:"tvNHne"})})," ",e.reason]}):l.jsx("p",{className:"mb-2 line-clamp-3 text-xs text-muted-foreground",children:e.description}),l.jsxs("div",{className:"mt-auto flex items-center justify-between gap-2",children:[l.jsx("span",{className:"shrink-0 whitespace-nowrap text-sm font-bold text-chat-foreground",children:E4(e.price,e.currency)}),l.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[l.jsx(zc,{type:"button",size:"xs",variant:"ghost",className:"h-6 px-2 text-muted-foreground hover:bg-chat-accent hover:text-chat-foreground",disabled:!n?.append||n.isFetching,onClick:()=>n?.append?.(r._({id:"CMq8HV",values:{0:e.name,1:e.url}})),children:l.jsx(D,{id:"5naT0I"})}),l.jsx(zc,{asChild:!0,size:"xs",variant:"secondary",className:"h-6 shrink-0",children:l.jsx("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",children:l.jsx(D,{id:"URmyfc"})})})]})]})]})]})}function R2t({viewport:e,cards:t}){return t.flatMap((n,r)=>n.left>=e.left-1&&n.right<=e.right+1?[r]:[])}function I2t({items:e}){const{i18n:t,_:n}=Me(),r=b.useContext(hb),[i,s]=b.useState(),[a,o]=b.useState([0]);return b.useEffect(()=>{if(!i)return;const c=()=>{const u=i.rootNode().getBoundingClientRect();if(u.width===0)return;
1265const d=i.slideNodes().map(p=>(p.firstElementChild??p).getBoundingClientRect()),h=R2t({viewport:u,cards:d});o(p=>p.length===h.length&&p.every((g,v)=>g===h[v])?p:h)};return c(),i.on("scroll",c),i.on("settle",c),i.on("reInit",c),()=>{i.off("scroll",c),i.off("settle",c),i.off("reInit",c)}},[i]),!Array.isArray(e)||e.length===0?null:l.jsxs(Rv.Root,{setApi:s,opts:{align:"center"},className:"mt-2 w-full min-w-0 [&>div:first-child]:overflow-visible",children:[l.jsxs(Rv.Content,{children:[l.jsx(CS,{children:e.map((c,u)=>l.jsx(Rv.Item,{className:"min-w-0 basis-[min(80%,20rem)]",children:l.jsx(Ja.div,{className:"h-full min-w-0",initial:{opacity:0,y:5},animate:{opacity:1,y:0},transition:{duration:.3,delay:.1+u*.05,ease:"easeOut"},children:l.jsx(j2t,{item:c,galleryEnabled:a.includes(u)})})},c.id))}),l.jsx(Rv.Item,{className:"min-w-0 basis-[min(80%,20rem)]",children:l.jsx(L1.Root,{className:"flex h-full min-h-48 items-center justify-center border-chat-border p-4 shadow-none",children:l.jsxs(zc,{type:"button",variant:"secondary",disabled:!r?.append||r.isFetching,onClick:()=>r?.append?.(t._({id:"CxyyhK"})),children:[l.jsx(Bd,{className:"mr-1 size-4"}),l.jsx(D,{id:"fMPkxb"})]})})})]}),l.jsx(Rv.Previous,{type:"button","aria-label":t._({id:"9A73Gj"}),className:"left-2 z-10 size-10 border-chat-border bg-chat-background/95 p-0 shadow-md disabled:hidden [&_svg]:size-5"}
1265),l.jsx(Rv.Next,{type:"button","aria-label":t._({id:"tve87L"}),className:"right-2 z-10 size-10 border-chat-border bg-chat-background/95 p-0 shadow-md disabled:hidden [&_svg]:size-5"})]})}const O2t=Cx({schema:{args:XHe,artifact:ZHe,content:QHe},validate:!1},({state:e,artifact:t,error:n})=>{const r=t?.products?.filter(i=>i.price&&i.name&&i.url);switch(e){case"call":case"call-partial":case"call-complete":return l.jsx(Q0,{loading:!0,children:l.jsx(D,{id:"I8o1M8"})});case"error":return l.jsx(C4,{message:l.jsx(D,{id:"olL1tc"}),error:n});case"result":return!r||r.length===0?null:l.jsxs(Ja.div,{className:"w-full",initial:{opacity:0},animate:{opacity:1},transition:{duration:.3},children:[l.jsx(Q0,{icon:l.jsx(BIe,{}),children:Be._({id:"W+pUT/",values:{0:r.length}})}),l.jsx(I2t,{items:r})]});default:return null}});function P2t(e){const t=new Map;for(const n of e){const r=n.attribute.id,i=t.get(r);if(i){i.values.push(n.value);continue}t.set(r,{attributeId:r,label:n.attribute.displayName||n.attribute.name,values:[n.value]})}return[...t.values()]}function M2t({images:e,alt:t}){const{i18n:n,_:r}=Me(),[i,s]=b.useState(0),a=i%(e.length||1);return e.length===0?null:l.jsxs("div",{className:"group/gallery relative aspect-[4/3] w-full shrink-0 overflow-hidden bg-chat-background-secondary",children:[l.jsx("img",{src:e[a],alt:t,loading:"lazy",draggable:!1,className:"absolute inset-0 size-full object-cover"}),e.length>1?l.jsxs("div",{className:"absolute inset-0 opacity-0 transition-opacity group-hover/gallery:opacity-100 [&:has(:focus-visible)]:opacity-100 [@media(hover:none)]:opacity-100",children:[l.jsx("button",{type:"button","aria-label":n._({id:"MHk+7g"}),onClick:()=>s((a+e.length-1)%e.length),className:"absolute left-2 top-1/2 -translate-y-1/2 rounded-full bg-chat-background/90 p-1.5 text-chat-foreground",children:l.jsx(Aj,{className:"size-5"})}),l.jsx("button",{type:"button","aria-label":n._({id:"EatZYJ"}),onClick:()=>s((a+1)%e.length),className:"absolute right-2 top-1/2 -translate-y-1/2 rounded-full bg-chat-background/90 p-1.5 text-chat-foreground",children:l.jsx(Qd,{className:"size-5"})})]}):null]})}function D2t({children:e}){const[t,n]=b.useState(!1);return t?e:l.jsxs("div",{className:"space-y-2 max-h-32px relative",children:[l.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-transparent to-black/50"}),l.jsx("div",{className:"overflow-hidden h-32",children:e}),l.jsx("div",{className:"absolute left-1/2 -translate-x-1/2 bottom-2",children:l.jsx(zc,{variant:"secondary",size:"xs",onClick:()=>n(!t),children:l.jsx(D,{id:"fMPkxb"})})})]})}const F2t=Cx({validate:!1,schema:{args:mE([JHe,eqe,tqe,nqe]),artifact:K7,content:rqe}},({state:e,artifact:t,error:n,toolCall:r})=>{const i=b.useContext(hb),{i18n:s,_:a}=Me();switch(e){case"call":return l.jsx(Q0,{loading:!0,children:l.jsx(D,{id:"OGXWHu"})});case"call-partial":case"call-complete":return l.jsx(Q0,{loading:!0,children:l.jsx(D,{id:"5IaW6k"})});case"error":return l.jsx(C4,{message:l.jsx(D,{id:"+hWNEf"}),error:n});case"result":{const o=[...new Set([t?.imageUrl,...t?.images??[]].flatMap(d=>
1265d?[d]:[]))],c=t?.shortSummary||t?.description,u=!!(t?.attributes&&t.attributes.length>0||t?.gifts&&t.gifts.length>0||t?.accessories&&t.accessories.length>0);return l.jsx(Ja.div,{className:"w-full max-w-full overflow-hidden",initial:{opacity:0},animate:{opacity:1},transition:{duration:.3},children:l.jsxs(L1.Root,{className:"overflow-hidden border border-chat-border shadow-none",children:[l.jsx(M2t,{images:o,alt:t?.title||t?.name||""}),l.jsxs(L1.Content,{className:"space-y-3 p-4",children:[l.jsx(L1.Title,{className:"text-lg leading-snug",children:t?.title||t?.name}),c?l.jsx("p",{className:"line-clamp-6 text-sm text-muted-foreground",children:c}):null,l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsx("span",{className:"shrink-0 whitespace-nowrap text-base font-bold text-chat-foreground",children:E4(t?.price,t?.currency)}),l.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[l.jsx(zc,{type:"button",size:"xs",variant:"ghost",className:"h-6 px-2 text-muted-foreground hover:bg-chat-accent hover:text-chat-foreground",disabled:!i?.append||i.isFetching,onClick:()=>t&&i?.append?.(s._({id:"CMq8HV",values:{0:t.name,1:t.url}})),children:l.jsx(D,{id:"5naT0I"})}),l.jsx(zc,{asChild:!0,size:"xs",variant:"secondary",className:"h-6 shrink-0",children:l.jsx("a",{href:t?.url,target:"_blank",rel:"noopener noreferrer",children:l.jsx(D,{id:"URmyfc"})})})]})]}),u&&t?l.jsx(D2t,{children:l.jsxs("div",{className:"space-y-2",children:[t.attributes&&t.attributes.length>0&&l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"flex items-center gap-2 text-chat-foreground font-semibold",children:[l.jsx(B9,{size:16}),l.jsx("h3",{children:l.jsx(D,{id:"9qRlt8"})})]}),l.jsx("div",{className:"flex flex-col gap-y-2 text-sm",children:P2t(t.attributes).map(d=>l.jsxs("div",{className:"flex justify-between gap-1",children:[l.jsxs("span",{className:"text-muted-foreground font-semibold",children:[d.label,":"]}),l.jsx("span",{className:"font-medium text-right",children:d.values.join(", ")})]},d.attributeId))})]}),t.gifts&&t.gifts.length>0&&l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"flex items-center gap-2 text-chat-foreground font-semibold",children:[l.jsx(F9,{size:16}),l.jsx("h3",{children:l.jsx(D,{id:"Y9IU5X"})})]}),l.jsx("div",{className:"space-y-1 ml-2",children:t.gifts.map(d=>l.jsx("div",{className:"flex items-center gap-2",children:l.jsx("span",{className:"px-2 py-1 bg-chat-background-secondary",children:d})},d))})]}),t.accessories&&t.accessories.length>0&&l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"flex items-center gap-2 text-chat-foreground font-semibold",children:[l.jsx(eE,{size:16}),l.jsx("h3",{children:l.jsx(D,{id:"slSlmR"})})]}),l.jsx("ul",{className:"list list-disc text-sm ml-4",children:t.accessories.map(d=>l.jsx("li",{children:l.jsx("a",{href:d.url,className:"hover:underline cursor-pointer",children:d.name})},d.id))})]})]})}):null]})]})})}default:return null}});function L2t(e,t){return e!=null&&e!==""?!0:t!=null}function z2t(e,t,n,r,i){if(n||r==="error")return"error";if(L2t(t,i)||r==="completed")return"result";if(r==="pending")return"call-complete";switch(e){case"start":return"call";case"streaming":return"call-partial";case"end":case"interrupted":return"call-complete";case"error":return"error";default:return"call-complete"}}function eD(e,t){if(!t||e===void 0)return{data:e};try{const n=t.safeParse(e);return n.success?{data:n.data}:(console.error("Schema parsing error:",n.error),{data:e,error:n.error})}catch(n){return console.error("Schema parsing error:",n),{data:e}}}function $2t({toolName:e,toolCallId:t,args:n,content:r,artifact:i,error:s,status:a,toolCallStatus:o,toolRegistry:c,index:u=0,renderFallback:d,label:h}){const p=c[e]??{},{validate:g,schema:v,onParseError:x}=p,_=b.useMemo(()=>g?eD(n,v?.args):{data:n},[n,v?.args,g]),w=b.useMemo(()=>g?eD(r,v?.content):{data:r},[r,v?.content,g]),S=b.useMemo(()=>g?eD(i,v?.artifact):{data:i},[i,v?.artifact,g]),E=b.useMemo(()=>{if(!g)return;
1265const R=[_.error,w.error,S.error].filter(Boolean);if(R.length!==0)return x?R.map(P=>x(P)).join(` 1266`):"Failed to parse tool response data"},[g,_.error,w.error,S.error,x]),T=b.useMemo(()=>({id:t,type:Bm.Tool,name:e,args:_.data,index:u,content:w.data,artifact:S.data,status:o}),[t,e,_.data,u,w.data,S.data,o]),A=z2t(a,r,!!(s||E),o,i),k=s||E;if(!Object.keys(p).length){const R=d?.({toolName:e,toolCallId:t,args:n,content:r,artifact:i,toolCallStatus:o,state:A,error:k});return R!=null&&R!==!1?R:h?l.jsx(Gmt,{label:h,state:A}):null}const{component:j}=p;return l.jsx(j,{toolCall:T,state:A,content:w.data,artifact:S.data,error:k,parseError:_.error||w.error||S.error})}function RL(e){return`hsl(${(e*120).toString()}, 85%, 75%)`}function B2t({result:e}){const[t,n]=b.useState(!1),{i18n:r,_:i}=Me(),s=e.messages.reduce((c,u)=>c+u.results.accuracyPercentage,0)/e.messages.length/100,a=e.messages.filter(c=>!c.results.isCorrect).length,o=e.messages.reduce((c,u)=>c+u.latency,0);return l.jsxs("div",{className:"mb-2 rounded-md border",children:[l.jsxs("button",{className:"flex w-full items-center justify-between p-2 text-left transition-all hover:bg-slate-100",onClick:()=>n(!t),children:[l.jsxs("span",{className:"flex items-center gap-2",children:[l.jsx(En,{style:{color:"black",backgroundColor:RL(s)},size:"xs",children:yt.percentage(s)}),l.jsxs(En,{variant:"info",size:"xs",outline:!0,children:[l.jsx(Pj,{className:"size-3"})," ",e.messages.length]}),l.jsxs(En,{variant:"info",size:"xs",outline:!0,className:"text-slate-800",children:[l.jsx(S6,{className:"size-3"}),"Â ",yt.date(new Date(o),Zn.PreciseTime)," s"]}),a>0&&l.jsxs(En,{variant:"danger",size:"xs",outline:!0,children:[l.jsx(eIe,{className:"size-3"})," ",a]}),l.jsx("span",{className:"overflow-hidden truncate text-sm font-semibold",children:yt.truncate(e.messages[0].question,50)})]}),t?l.jsx(kj,{size:20}):l.jsx(Xd,{size:20})]}),t&&l.jsx("div",{className:"space-y-4 p-4",children:e.messages.map((c,u)=>l.jsxs("div",{className:"relative rounded-md border bg-white p-4 shadow-sm",children:[l.jsx("span",{className:"absolute right-2 top-2",children:l.jsxs(En,{variant:"info",size:"sm",className:"text-slate-800",outline:!0,children:[l.jsx(S6,{className:"size-3"}),yt.date(new Date(c.latency),Zn.PreciseTime),"Â s"]})}),l.jsxs("div",{className:"mb-2",children:[l.jsxs("span",{className:"font-semibold",children:[r._({id:"bfgr/e"}),":"]}),l.jsx("p",{className:"mt-1 text-gray-600",children:c.question})]}),l.jsxs("div",{className:"mb-2",children:[l.jsxs("span",{className:"font-semibold",children:[r._({id:"4xBHUg"}),":"]}),l.jsx("div",{children:l.jsx(Ph,{children:c.answer})})]}),l.jsxs("div",{className:"mb-2",children:[l.jsxs("span",{className:"font-semibold",children:[r._({id:"Gy1dXa"}),":"]}),l.jsx("p",{className:"mt-1 text-gray-600",children:c.expectedOutput})]}),l.jsx(_h,{className:"my-3"}),l.jsx("div",{children:l.jsxs("ul",{className:"mt-2 space-y-2",children:[l.jsxs("li",{className:"flex items-center gap-2",children:[l.jsxs("span",{className:$e("flex items-center gap-2 rounded-md bg-slate-100 px-2 py-1 text-xs",c.results.isCorrect?"bg-green-300":"bg-red-300"),children:[l.jsx(iOe,{className:"size-4"}),l.jsx("span",{className:"font-bold",children:c.results.isCorrect?r._({id:"t2rBZB"}):r._({id:"Sewdux"})})]}),l.jsxs("span",{className:"flex items-center gap-2 rounded-md bg-slate-100 px-2 py-1 text-xs",style:{backgroundColor:RL(c.results.accuracyPercentage/100)},children:[l.jsx(foe,{className:"size-4"}),l.jsxs("span",{children:[r._({id:"XmVUbU"}),":"]}),l.jsx("span",{className:"font-bold",children:yt.percentage(c.results.accuracyPercentage)})]})]}),l.jsx("li",{children:l.jsx("p",{className:$e("mt-1 text-sm",c.results.isCorrect&&"text-green-700",!c.results.isCorrect&&"text-red-800"),children:c.results.explanation})})]})})]},u))})]})}const U2t=b.memo(function({chat:t,data:n,totalMessages:r,loading:i=!1}){const{i18n:s,_:a}=Me(),o=n.filter(v=>v.messages.length>0&&v.messages[0]?.results);let c=o.reduce((v,x)=>v+x.messages[0].results.accuracyPercentage,0);c=c>0?c/n.length:0;const u=o.reduce((v,x)=>v+x.messages.length,0),d=o.reduce((v,x)=>v+x.messages.filter(_=>_.results.isCorrect).length,0),h=u-d,p=h/u,g=d/u;return l.jsxs("div",{children:[l.jsxs("div",{className:"flex w-full flex-col gap-2 text-sm font-medium",children:[l.jsxs("div",{className:"grid w-full grid-cols-2 gap-2",children:[l.jsxs("span",{className:"flex items-center gap-2 rounded-md bg-slate-100 p-3",style:{backgroundColor:RL(c/100)},children:[l.jsx(foe,{className:"size-5"}),l.jsxs("span",{children:[s._({id:"XmVUbU"}),":"]}),l.jsx("span",{className:"font-bold",children:yt.percentage(c||0)})]}),l.jsxs("span",{className:$e("flex items-center justify-between gap-2 rounded-md bg-slate-200 p-3",r<=0&&"bg-red-300"),children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Pj,{className:"size-5"}),l.jsxs("span",{children:[s._({id:"X4STYl"}),":"]}),l.jsxs("span",{className:"font-bold",children:[u,"/",r]})]}),i&&l.jsx(Kr,{className:"size-5 animate-spin"})]})]}),l.jsxs("div",{className:"grid w-full grid-cols-2 gap-2",children:[l.jsxs("span",{className:"flex items-center gap-2 rounded-md bg-green-100 p-3 text-green-700",children:[l.jsx(Es,{className:"size-5"}),l.jsxs("span",{children:[s._({id:"DSQooA"}),":"]}),l.jsxs("span",{className:"font-bold",children:[d,"/",u," (",yt.percentage(g||0),")"]})]}),l.jsxs("span",{className:"flex items-center gap-2 rounded-md bg-red-100 p-3 text-red-800",children:[l.jsx(pl,{className:"size-5"}),l.jsxs("span",{children:[s._({id:"+CqmSn"}),":"]}),l.jsxs("span",{className:"font-bold",children:[h,"/",u," (",yt.percentage(p||0),")"]})]})]})]}),l.jsx(_h,{className:"my-3"}),l.jsx("div",{className:"flex flex-wrap gap-2 font-mono",children:[...Object.entries(t?.agentConfig??{}),["agent",t?.agent],["model",t?.model]].filter(([v])=>!v||!["systemPrompt","tone"].includes(v.toString())).map(([v,x])=>l.jsxs(En,{variant:"info",outline:!0,size:"xs",children:[l.jsxs("span",{className:"font-normal text-slate-800",children:[v,":"]}
1266),l.jsx("span",{className:"font-bold text-black",children:x?.toString()})]},v))}),l.jsx(_h,{className:"my-3"}),o?.map((v,x)=>l.jsx(B2t,{result:v},x))]})});/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */var Q3={};Q3.version="0.18.5";var twe=1252,V2t=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],nwe=function(e){V2t.indexOf(e)!=-1&&(twe=e)};function H2t(){nwe(1252)}var zS=function(e){nwe(e)};function q2t(){zS(1200),H2t()}var UA=function(t){return String.fromCharCode(t)},Fne=function(t){return String.fromCharCode(t)},Z3,Xp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function $S(e){for(var t="",n=0,r=0,i=0,s=0,a=0,o=0,c=0,u=0;u<e.length;)n=e.charCodeAt(u++),s=n>>2,r=e.charCodeAt(u++),a=(n&3)<<4|r>>4,i=e.charCodeAt(u++),o=(r&15)<<2|i>>6,c=i&63,isNaN(r)?o=c=64:isNaN(i)&&(c=64),t+=Xp.charAt(s)+Xp.charAt(a)+Xp.charAt(o)+Xp.charAt(c);return t}function Mh(e){var t="",n=0,r=0,i=0,s=0,a=0,o=0,c=0;e=e.replace(/[^\w\+\/\=]/g,"");for(var u=0;u<e.length;)s=Xp.indexOf(e.charAt(u++)),a=Xp.indexOf(e.charAt(u++)),n=s<<2|a>>4,t+=String.fromCharCode(n),o=Xp.indexOf(e.charAt(u++)),r=(a&15)<<4|o>>2,o!==64&&(t+=String.fromCharCode(r)),c=Xp.indexOf(e.charAt(u++)),i=(o&3)<<6|c,c!==64&&(t+=String.fromCharCode(i));return t}var Wr=(function(){return typeof Buffer<"u"&&typeof process<"u"&&typeof process.versions<"u"&&!!process.versions.node})(),Xh=(function(){if(typeof Buffer<"u"){var e=!Buffer.from;if(!e)try{Buffer.from("foo","utf8")}catch{e=!0}return e?function(t,n){return n?new Buffer(t,n):new Buffer(t)}:Buffer.from.bind(Buffer)}return function(){}})();function ex(e){return Wr?Buffer.alloc?Buffer.alloc(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}function Lne(e){return Wr?Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}var mu=function(t){return Wr?Xh(t,"binary"):t.split("").map(function(n){return n.charCodeAt(0)&255})};function L4(e){if(typeof ArrayBuffer>"u")return mu(e);for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),r=0;r!=e.length;++r)n[r]=e.charCodeAt(r)&255;return t}function aC(e){if(Array.isArray(e))return e.map(function(r){return String.fromCharCode(r)}).join("");for(var t=[],n=0;n<e.length;++n)t[n]=String.fromCharCode(e[n]);return t.join("")}function W2t(e){if(typeof Uint8Array>"u")throw new Error("Unsupported");return new Uint8Array(e)}var Ga=Wr?function(e){return Buffer.concat(e.map(function(t){return Buffer.isBuffer(t)?t:Xh(t)}))}:function(e){if(typeof Uint8Array<"u"){var t=0,n=0;for(t=0;t<e.length;++t)n+=e[t].length;var r=new Uint8Array(n),i=0;for(t=0,n=0;t<e.length;n+=i,++t)if(i=e[t].length,e[t]instanceof Uint8Array)r.set(e[t],n);else{if(typeof e[t]=="string")throw"wtf";r.set(new Uint8Array(e[t]),n)}return r}return[].concat.apply([],e.map(function(s){return Array.isArray(s)?s:[].slice.call(s)}))};function G2t(e){for(var t=[],n=0,r=e.length+250,i=ex(e.length+255),s=0;s<e.length;++s){var a=e.charCodeAt(s);if(a<128)i[n++]=a;else if(a<2048)i[n++]=192|a>>6&31,i[n++]=128|a&63;else if(a>=55296&&a<57344){a=(a&1023)+64;var o=e.charCodeAt(++s)&1023;i[n++]=240|a>>8&7,i[n++]=128|a>>2&63,i[n++]=128|o>>6&15|(a&3)<<4,i[n++]=128|o&63}else i[n++]=224|a>>12&15,i[n++]=128|a>>6&63,i[n++]=128|a&63;n>r&&(t.push(i.slice(0,n)),n=0,i=ex(65535),r=65530)}return t.push(i.slice(0,n)),Ga(t)}var l2=/\u0000/g,VA=/[\u0001-\u0006]/g;function B1(e){for(var t="",n=e.length-1;n>=0;)t+=e.charAt(n--);return t}function vu(e,t){var n=""+e;return n.length>=t?n:_s("0",t-n.length)+n}function aU(e,t){var n=""+e;return n.length>=t?n:_s(" ",t-n.length)+n}function J3(e,t){var n=""+e;return n.length>=t?n:n+_s(" ",t-n.length)}function K2t(e,t){var n=""+Math.round(e);return n.length>=t?n:_s("0",t-n.length)+n}function Y2t(e,t){var n=""+e;return n.length>=t?n:_s("0",t-n.length)+n}var zne=Math.pow(2,32);function Pv(e,t){if(e>zne||e<-zne)return K2t(e,t);var n=Math.round(e);return Y2t(n,t)}function ej(e,t){return t=t||0,e.length>=7+t&&(e.charCodeAt(t)|32)===103&&(e.charCodeAt(t+1)|32)===101&&(e.charCodeAt(t+2)|32)===110&&(e.charCodeAt(t+3)|32)===101&&(e.charCodeAt(t+4)|32)===114&&(e.charCodeAt(t+5)|32)===97&&(e.charCodeAt(t+6)|32)===108}var $ne=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],tD=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];function X2t(e){return e||(e={}),e[0]="General",e[1]="0",e[2]="0.00",e[3]="#,##0",e[4]="#,##0.00",e[9]="0%",e[10]="0.00%",e[11
vendor: 5,904 bytes, line 1266
1266]="0.00E+00",e[12]="# ?/?",e[13]="# ??/??",e[14]="m/d/yy",e[15]="d-mmm-yy",e[16]="d-mmm",e[17]="mmm-yy",e[18]="h:mm AM/PM",e[19]="h:mm:ss AM/PM",e[20]="h:mm",e[21]="h:mm:ss",e[22]="m/d/yy h:mm",e[37]="#,##0 ;(#,##0)",e[38]="#,##0 ;[Red](#,##0)",e[39]="#,##0.00;(#,##0.00)",e[40]="#,##0.00;[Red](#,##0.00)",e[45]="mm:ss",e[46]="[h]:mm:ss",e[47]="mmss.0",e[48]="##0.0E+0",e[49]="@",e[56]='"ä¸å/ä¸å "hh"æ"mm"å"ss"ç§ "',e}var Ts={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"ä¸å/ä¸å "hh"æ"mm"å"ss"ç§ "'},Bne={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},Q2t={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function tj(e,t,n){for(var r=e<0?-1:1,i=e*r,s=0,a=1,o=0,c=1,u=0,d=0,h=Math.floor(i);u<t&&(h=Math.floor(i),o=h*a+s,d=h*u+c,!(i-h<5e-8));)i=1/(i-h),s=a,a=o,c=u,u=d;if(d>t&&(u>t?(d=c,o=s):(d=u,o=a)),!n)return[0,r*o,d];var p=Math.floor(r*o/d);return[p,r*o-p*d,d]}function HA(e,t,n){if(e>2958465||e<0)return null;var r=e|0,i=Math.floor(86400*(e-r)),s=0,a=[],o={D:r,T:i,u:86400*(e-r)-i,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(o.u)<1e-6&&(o.u=0),t&&t.date1904&&(r+=1462),o.u>.9999&&(o.u=0,++i==86400&&(o.T=i=0,++r,++o.D)),r===60)a=n?[1317,10,29]:[1900,2,29],s=3;else if(r===0)a=n?[1317,8,29]:[1900,1,0],s=6;else{r>60&&--r;var c=new Date(1900,0,1);c.setDate(c.getDate()+r-1),a=[c.getFullYear(),c.getMonth()+1,c.getDate()],s=c.getDay(),r<60&&(s=(s+6)%7),n&&(s=iSt(c,a))}return o.y=a[0],o.m=a[1],o.d=a[2],o.S=i%60,i=Math.floor(i/60),o.M=i%60,i=Math.floor(i/60),o.H=i,o.q=s,o}var rwe=new Date(1899,11,31,0,0,0),Z2t=rwe.getTime(),J2t=new Date(1900,2,1,0,0,0);function iwe(e,t){var n=e.getTime();return t?n-=1461*24*60*60*1e3:e>=J2t&&(n+=1440*60*1e3),(n-(Z2t+(e.getTimezoneOffset()-rwe.getTimezoneOffset())*6e4))/(1440*60*1e3)}function oU(e){return e.indexOf(".")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function eSt(e){return e.indexOf("E")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}function tSt(e){var t=e<0?12:11,n=oU(e.toFixed(12));return n.length<=t||(n=e.toPrecision(10),n.length<=t)?n:e.toExponential(5)}function nSt(e){var t=oU(e.toFixed(11));return t.length>(e<0?12:11)||t==="0"||t==="-0"?e.toPrecision(6):t}function rSt(e){var t=Math.floor(Math.log(Math.abs(e))*Math.LOG10E),n;return t>=-4&&t<=-1?n=e.toPrecision(10+t):Math.abs(t)<=9?n=tSt(e):t===10?n=e.toFixed(10).substr(0,12):n=nSt(e),oU(eSt(n.toUpperCase()))}function IL(e,t){switch(typeof e){case"string":return e;case"boolean":return e?"TRUE":"FALSE";case"number":return(e|0)===e?e.toString(10):rSt(e);case"undefined":return"";case"object":if(e==null)return"";if(e instanceof Date)return km(14,iwe(e,t&&t.date1904),t)}throw new Error("unsupported value in General format: "+e)}function iSt(e,t){t[0]-=581;var n=e.getDay();return e<60&&(n=(n+6)%7),n}function sSt(e,t,n,r){var i="",s=0,a=0,o=n.y,c,u=0;switch(e){case 98:o=n.y+543;case 121:switch(t.length){case 1:case 2:c=o%100,u=2;break;default:c=o%1e4,u=4;break}break;case 109:switch(t.length){case 1:case 2:c=n.m,u=t.length;break;case 3:return tD[n.m-1][1];case 5:return tD[n.m-1][0];default:return tD[n.m-1][2]}break;case 100:switch(t.length){case 1:case 2:c=n.d,u=t.length;break;case 3:return $ne[n.q][0];default:return $ne[n.q][1]}break;case 104:switch(t.length){case 1:case 2:c=1+(n.H+11)%12,u=t.length;break;default:throw"bad hour format: "+t}break;case 72:switch(t.length){case 1:case 2:c=n.H,u=t.length;break;default:throw"bad hour format: "+t}break;case 77:switch(t.length){case 1:case 2:c=n.M,u=t.length;break;default:throw"bad minute format: "+t}break;case 115:if(t!="s"&&t!="ss"&&t!=".0"&&t!=".00"&&t!=".000")throw"bad second format: "+t;return n.u===0&&(t=="s"||t=="ss")?vu(n.S,t.length):(r>=2?a=r===3?1e3:100:a=r===1?10:1,s=Math.round(a*(n.S+n.u)),s>=60*a&&(s=0),t==="s"?s===0?"0":""+s/a:(i=vu(s,2+r),t==="ss"?i.substr(0,2):"."+i.substr(2,t.length-1)));case 90:switch(t){case"[h]":case"[hh]":c=n.D*24+n.H;break;case"[m]":case"[mm]":c=(n.D*24+n.H)*60+n.M;break;case"[s]":case"[ss]":c=((n.D*24+n.H)*60+n.M)*60+Math.round(n.S+n.u);break;default:throw"bad abstime format: "+t}u=t.length===3?1:2;break;case 101:c=o,u=1;break}var d=u>0?vu(c,u):"";return d}function Qp(e){var t=3;if(e.length<=t)return e;for(var n=e.length%t,r=e.substr(0,n);n!=e.length;n+=t)r+=(r.length>0?",":"")+e.substr(n,t);return r}var swe=/%/g;function aSt(e,t,n){var r=t.replace(swe,""),i=t.length-r.length;return uh(e,r,n*Math.pow(10,2*i))+_s("%",i)}function oSt(e,t,n){for(var r=t.length-1;t.charCodeAt(r-1)===44;)--r;return uh(e,t.substr(0,r),n/Math.pow(10,3*(t.length-r)))}function awe(e,t){var n,r=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(t==0)return"0.0E+0";if(t<0)return"-"+awe(e,-t);var i=e.indexOf(".");i===-1&&(i=e.indexOf("E"));var s=Math.floor(Math.log(t)*Math.LOG10E)%i;if(s<0&&(s+=i),n=(t/Math.pow(10,s)).toPrecision(r+1+(i+s)%i),n.indexOf("e")===-1){var a=Math.floor(Math.log(t)*Math.LOG10E);
vendor: 5,055 bytes, line 1266
1266for(n.indexOf(".")===-1?n=n.charAt(0)+"."+n.substr(1)+"E+"+(a-n.length+s):n+="E+"+(a-s);n.substr(0,2)==="0.";)n=n.charAt(0)+n.substr(2,i)+"."+n.substr(2+i),n=n.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");n=n.replace(/\+-/,"-")}n=n.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(o,c,u,d){return c+u+d.substr(0,(i+s)%i)+"."+d.substr(s)+"E"})}else n=t.toExponential(r);return e.match(/E\+00$/)&&n.match(/e[+-]\d$/)&&(n=n.substr(0,n.length-1)+"0"+n.charAt(n.length-1)),e.match(/E\-/)&&n.match(/e\+/)&&(n=n.replace(/e\+/,"e")),n.replace("e","E")}var owe=/# (\?+)( ?)\/( ?)(\d+)/;function lSt(e,t,n){var r=parseInt(e[4],10),i=Math.round(t*r),s=Math.floor(i/r),a=i-s*r,o=r;return n+(s===0?"":""+s)+" "+(a===0?_s(" ",e[1].length+1+e[4].length):aU(a,e[1].length)+e[2]+"/"+e[3]+vu(o,e[4].length))}function cSt(e,t,n){return n+(t===0?"":""+t)+_s(" ",e[1].length+2+e[4].length)}var lwe=/^#*0*\.([0#]+)/,cwe=/\).*[0#]/,uwe=/\(###\) ###\\?-####/;function Oo(e){for(var t="",n,r=0;r!=e.length;++r)switch(n=e.charCodeAt(r)){case 35:break;case 63:t+=" ";break;case 48:t+="0";break;default:t+=String.fromCharCode(n)}return t}function Une(e,t){var n=Math.pow(10,t);return""+Math.round(e*n)/n}function Vne(e,t){var n=e-Math.floor(e),r=Math.pow(10,t);return t<(""+Math.round(n*r)).length?0:Math.round(n*r)}function uSt(e,t){return t<(""+Math.round((e-Math.floor(e))*Math.pow(10,t))).length?1:0}function dSt(e){return e<2147483647&&e>-2147483648?""+(e>=0?e|0:e-1|0):""+Math.floor(e)}function hc(e,t,n){if(e.charCodeAt(0)===40&&!t.match(cwe)){var r=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return n>=0?hc("n",r,n):"("+hc("n",r,-n)+")"}if(t.charCodeAt(t.length-1)===44)return oSt(e,t,n);if(t.indexOf("%")!==-1)return aSt(e,t,n);if(t.indexOf("E")!==-1)return awe(t,n);if(t.charCodeAt(0)===36)return"$"+hc(e,t.substr(t.charAt(1)==" "?2:1),n);var i,s,a,o,c=Math.abs(n),u=n<0?"-":"";if(t.match(/^00+$/))return u+Pv(c,t.length);if(t.match(/^[#?]+$/))return i=Pv(n,0),i==="0"&&(i=""),i.length>t.length?i:Oo(t.substr(0,t.length-i.length))+i;if(s=t.match(owe))return lSt(s,c,u);if(t.match(/^#+0+$/))return u+Pv(c,t.length-t.indexOf("0"));if(s=t.match(lwe))return i=Une(n,s[1].length).replace(/^([^\.]+)$/,"$1."+Oo(s[1])).replace(/\.$/,"."+Oo(s[1])).replace(/\.(\d*)$/,function(v,x){return"."+x+_s("0",Oo(s[1]).length-x.length)}),t.indexOf("0.")!==-1?i:i.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),s=t.match(/^(0*)\.(#*)$/))return u+Une(c,s[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,s[1].length?"0.":".");if(s=t.match(/^#{1,3},##0(\.?)$/))return u+Qp(Pv(c,0));if(s=t.match(/^#,##0\.([#0]*0)$/))return n<0?"-"+hc(e,t,-n):Qp(""+(Math.floor(n)+uSt(n,s[1].length)))+"."+vu(Vne(n,s[1].length),s[1].length);if(s=t.match(/^#,#*,#0/))return hc(e,t.replace(/^#,#*,/,""),n);if(s=t.match(/^([0#]+)(\\?-([0#]+))+$/))return i=B1(hc(e,t.replace(/[\\-]/g,""),n)),a=0,B1(B1(t.replace(/\\/g,"")).replace(/[0#]/g,function(v){return a<i.length?i.charAt(a++):v==="0"?"0":""}));if(t.match(uwe))return i=hc(e,"##########",n),"("+i.substr(0,3)+") "+i.substr(3,3)+"-"+i.substr(6);var d="";if(s=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return a=Math.min(s[4].length,7),o=tj(c,Math.pow(10,a)-1,!1),i=""+u,d=uh("n",s[1],o[1]),d.charAt(d.length-1)==" "&&(d=d.substr(0,d.length-1)+"0"),i+=d+s[2]+"/"+s[3],d=J3(o[2],a),d.length<s[4].length&&(d=Oo(s[4].substr(s[4].length-d.length))+d),i+=d,i;if(s=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return a=Math.min(Math.max(s[1].length,s[4].length),7),o=tj(c,Math.pow(10,a)-1,!0),u+(o[0]||(o[1]?"":"0"))+" "+(o[1]?aU(o[1],a)+s[2]+"/"+s[3]+J3(o[2],a):_s(" ",2*a+1+s[2].length+s[3].length));if(s=t.match(/^[#0?]+$/))return i=Pv(n,0),t.length<=i.length?i:Oo(t.substr(0,t.length-i.length))+i;if(s=t.match(/^([#0?]+)\.([#0]+)$/)){i=""+n.toFixed(Math.min(s[2].length,10)).replace(/([^0])0+$/,"$1"),a=i.indexOf(".");var h=t.indexOf(".")-a,p=t.length-i.length-h;return Oo(t.substr(0,h)+i+t.substr(t.length-p))}if(s=t.match(/^00,000\.([#0]*0)$/))return a=Vne(n,s[1].length),n<0?"-"+hc(e,t,-n):Qp(dSt(n)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(v){return"00,"+(v.length<3?vu(0,3-v.length):"")+v})+"."+vu(a,s[1].length);switch(t){case"###,##0.00":return hc(e,"#,##0.00",n);case"###,###":case"##,###":case"#,###":var g=Qp(Pv(c,0));return g!=="0"?u+g:"";case"###,###.00":return hc(e,"###,##0.00",n).replace(/^0\./,".");case"#,###.00":return hc(e,"#,##0.00",n).replace(/^0\./,".")}throw new Error("unsupported format |"+t+"|")}function fSt(e,t,n){for(var r=t.length-1;t.charCodeAt(r-1)===44;)--r;return uh(e,t.substr(0,r),n/Math.pow(10,3*(t.length-r)))}function hSt(e,t,n){var r=t.replace(swe,""),i=t.length-r.length;return uh(e,r,n*Math.pow(10,2*i))+_s("%",i)}function dwe(e,t){var n,r=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(t==0)return"0.0E+0";if(t<0)return"-"+dwe(e,-t);var i=e.indexOf(".");i===-1&&(i=e.indexOf("E"));var s=Math.floor(Math.log(t)*Math.LOG10E)%i;if(s<0&&(s+=i),n=(t/Math.pow(10,s)).toPrecision(r+1+(i+s)%i),!n.match(/[Ee]/)){var a=Math.floor(Math.log(t)*Math.LOG10E);
vendor: 4,761 bytes, line 1266
1266n.indexOf(".")===-1?n=n.charAt(0)+"."+n.substr(1)+"E+"+(a-n.length+s):n+="E+"+(a-s),n=n.replace(/\+-/,"-")}n=n.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(o,c,u,d){return c+u+d.substr(0,(i+s)%i)+"."+d.substr(s)+"E"})}else n=t.toExponential(r);return e.match(/E\+00$/)&&n.match(/e[+-]\d$/)&&(n=n.substr(0,n.length-1)+"0"+n.charAt(n.length-1)),e.match(/E\-/)&&n.match(/e\+/)&&(n=n.replace(/e\+/,"e")),n.replace("e","E")}function od(e,t,n){if(e.charCodeAt(0)===40&&!t.match(cwe)){var r=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return n>=0?od("n",r,n):"("+od("n",r,-n)+")"}if(t.charCodeAt(t.length-1)===44)return fSt(e,t,n);if(t.indexOf("%")!==-1)return hSt(e,t,n);if(t.indexOf("E")!==-1)return dwe(t,n);if(t.charCodeAt(0)===36)return"$"+od(e,t.substr(t.charAt(1)==" "?2:1),n);var i,s,a,o,c=Math.abs(n),u=n<0?"-":"";if(t.match(/^00+$/))return u+vu(c,t.length);if(t.match(/^[#?]+$/))return i=""+n,n===0&&(i=""),i.length>t.length?i:Oo(t.substr(0,t.length-i.length))+i;if(s=t.match(owe))return cSt(s,c,u);if(t.match(/^#+0+$/))return u+vu(c,t.length-t.indexOf("0"));if(s=t.match(lwe))return i=(""+n).replace(/^([^\.]+)$/,"$1."+Oo(s[1])).replace(/\.$/,"."+Oo(s[1])),i=i.replace(/\.(\d*)$/,function(v,x){return"."+x+_s("0",Oo(s[1]).length-x.length)}),t.indexOf("0.")!==-1?i:i.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),s=t.match(/^(0*)\.(#*)$/))return u+(""+c).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,s[1].length?"0.":".");if(s=t.match(/^#{1,3},##0(\.?)$/))return u+Qp(""+c);if(s=t.match(/^#,##0\.([#0]*0)$/))return n<0?"-"+od(e,t,-n):Qp(""+n)+"."+_s("0",s[1].length);if(s=t.match(/^#,#*,#0/))return od(e,t.replace(/^#,#*,/,""),n);if(s=t.match(/^([0#]+)(\\?-([0#]+))+$/))return i=B1(od(e,t.replace(/[\\-]/g,""),n)),a=0,B1(B1(t.replace(/\\/g,"")).replace(/[0#]/g,function(v){return a<i.length?i.charAt(a++):v==="0"?"0":""}));if(t.match(uwe))return i=od(e,"##########",n),"("+i.substr(0,3)+") "+i.substr(3,3)+"-"+i.substr(6);var d="";if(s=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return a=Math.min(s[4].length,7),o=tj(c,Math.pow(10,a)-1,!1),i=""+u,d=uh("n",s[1],o[1]),d.charAt(d.length-1)==" "&&(d=d.substr(0,d.length-1)+"0"),i+=d+s[2]+"/"+s[3],d=J3(o[2],a),d.length<s[4].length&&(d=Oo(s[4].substr(s[4].length-d.length))+d),i+=d,i;if(s=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return a=Math.min(Math.max(s[1].length,s[4].length),7),o=tj(c,Math.pow(10,a)-1,!0),u+(o[0]||(o[1]?"":"0"))+" "+(o[1]?aU(o[1],a)+s[2]+"/"+s[3]+J3(o[2],a):_s(" ",2*a+1+s[2].length+s[3].length));if(s=t.match(/^[#0?]+$/))return i=""+n,t.length<=i.length?i:Oo(t.substr(0,t.length-i.length))+i;if(s=t.match(/^([#0]+)\.([#0]+)$/)){i=""+n.toFixed(Math.min(s[2].length,10)).replace(/([^0])0+$/,"$1"),a=i.indexOf(".");var h=t.indexOf(".")-a,p=t.length-i.length-h;return Oo(t.substr(0,h)+i+t.substr(t.length-p))}if(s=t.match(/^00,000\.([#0]*0)$/))return n<0?"-"+od(e,t,-n):Qp(""+n).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(v){return"00,"+(v.length<3?vu(0,3-v.length):"")+v})+"."+vu(0,s[1].length);switch(t){case"###,###":case"##,###":case"#,###":var g=Qp(""+c);return g!=="0"?u+g:"";default:if(t.match(/\.[0#?]*$/))return od(e,t.slice(0,t.lastIndexOf(".")),n)+Oo(t.slice(t.lastIndexOf(".")))}throw new Error("unsupported format |"+t+"|")}function uh(e,t,n){return(n|0)===n?od(e,t,n):hc(e,t,n)}function pSt(e){for(var t=[],n=!1,r=0,i=0;r<e.length;++r)switch(e.charCodeAt(r)){case 34:n=!n;break;case 95:case 42:case 92:++r;break;case 59:t[t.length]=e.substr(i,r-i),i=r+1}if(t[t.length]=e.substr(i),n===!0)throw new Error("Format |"+e+"| unterminated string ");return t}var fwe=/\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;function hwe(e){for(var t=0,n="",r="";t<e.length;)switch(n=e.charAt(t)){case"G":ej(e,t)&&(t+=6),t++;break;case'"':for(;e.charCodeAt(++t)!==34&&t<e.length;);++t;break;case"\\":t+=2;break;case"_":t+=2;break;case"@":++t;break;case"B":case"b":if(e.charAt(t+1)==="1"||e.charAt(t+1)==="2")return!0;case"M":case"D":case"Y":case"H":case"S":case"E":case"m":case"d":case"y":case"h":case"s":case"e":case"g":return!0;case"A":case"a":case"ä¸":if(e.substr(t,3).toUpperCase()==="A/P"||e.substr(t,5).toUpperCase()==="AM/PM"||e.substr(t,5).toUpperCase()==="ä¸å/ä¸å")return!0;++t;break;case"[":for(r=n;e.charAt(t++)!=="]"&&t<e.length;)r+=e.charAt(t);if(r.match(fwe))return!0;break;case".":case"0":case"#":for(;t<e.length&&("0#?.,E+-%".indexOf(n=e.charAt(++t))>-1||n=="\\"&&e.charAt(t+1)=="-"&&"0#".indexOf(e.charAt(t+2))>-1););break;case"?":for(;e.charAt(++t)===n;);break;case"*":++t,(e.charAt(t)==" "||e.charAt(t)=="*")&&++t;break;case"(":case")":++t;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;t<e.length&&"0123456789".indexOf(e.charAt(++t))>-1;);break;case" ":++t;break;default:++t;break}return!1}
vendor: 6,839 bytes, line 1266
1266function mSt(e,t,n,r){for(var i=[],s="",a=0,o="",c="t",u,d,h,p="H";a<e.length;)switch(o=e.charAt(a)){case"G":if(!ej(e,a))throw new Error("unrecognized character "+o+" in "+e);i[i.length]={t:"G",v:"General"},a+=7;break;case'"':for(s="";(h=e.charCodeAt(++a))!==34&&a<e.length;)s+=String.fromCharCode(h);i[i.length]={t:"t",v:s},++a;break;case"\\":var g=e.charAt(++a),v=g==="("||g===")"?g:"t";i[i.length]={t:v,v:g},++a;break;case"_":i[i.length]={t:"t",v:" "},a+=2;break;case"@":i[i.length]={t:"T",v:t},++a;break;case"B":case"b":if(e.charAt(a+1)==="1"||e.charAt(a+1)==="2"){if(u==null&&(u=HA(t,n,e.charAt(a+1)==="2"),u==null))return"";i[i.length]={t:"X",v:e.substr(a,2)},c=o,a+=2;break}case"M":case"D":case"Y":case"H":case"S":case"E":o=o.toLowerCase();case"m":case"d":case"y":case"h":case"s":case"e":case"g":if(t<0||u==null&&(u=HA(t,n),u==null))return"";for(s=o;++a<e.length&&e.charAt(a).toLowerCase()===o;)s+=o;o==="m"&&c.toLowerCase()==="h"&&(o="M"),o==="h"&&(o=p),i[i.length]={t:o,v:s},c=o;break;case"A":case"a":case"ä¸":var x={t:o,v:o};if(u==null&&(u=HA(t,n)),e.substr(a,3).toUpperCase()==="A/P"?(u!=null&&(x.v=u.H>=12?"P":"A"),x.t="T",p="h",a+=3):e.substr(a,5).toUpperCase()==="AM/PM"?(u!=null&&(x.v=u.H>=12?"PM":"AM"),x.t="T",a+=5,p="h"):e.substr(a,5).toUpperCase()==="ä¸å/ä¸å"?(u!=null&&(x.v=u.H>=12?"ä¸å":"ä¸å"),x.t="T",a+=5,p="h"):(x.t="t",++a),u==null&&x.t==="T")return"";i[i.length]=x,c=o;break;case"[":for(s=o;e.charAt(a++)!=="]"&&a<e.length;)s+=e.charAt(a);if(s.slice(-1)!=="]")throw'unterminated "[" block: |'+s+"|";if(s.match(fwe)){if(u==null&&(u=HA(t,n),u==null))return"";i[i.length]={t:"Z",v:s.toLowerCase()},c=s.charAt(1)}else s.indexOf("$")>-1&&(s=(s.match(/\$([^-\[\]]*)/)||[])[1]||"$",hwe(e)||(i[i.length]={t:"t",v:s}));break;case".":if(u!=null){for(s=o;++a<e.length&&(o=e.charAt(a))==="0";)s+=o;i[i.length]={t:"s",v:s};break}case"0":case"#":for(s=o;++a<e.length&&"0#?.,E+-%".indexOf(o=e.charAt(a))>-1;)s+=o;i[i.length]={t:"n",v:s};break;case"?":for(s=o;e.charAt(++a)===o;)s+=o;i[i.length]={t:o,v:s},c=o;break;case"*":++a,(e.charAt(a)==" "||e.charAt(a)=="*")&&++a;break;case"(":case")":i[i.length]={t:r===1?"t":o,v:o},++a;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(s=o;a<e.length&&"0123456789".indexOf(e.charAt(++a))>-1;)s+=e.charAt(a);i[i.length]={t:"D",v:s};break;case" ":i[i.length]={t:o,v:o},++a;break;case"$":i[i.length]={t:"t",v:"$"},++a;break;default:if(",$-+/():!^&'~{}<>=â¬acfijklopqrtuvwxzP".indexOf(o)===-1)throw new Error("unrecognized character "+o+" in "+e);i[i.length]={t:"t",v:o},++a;break}var _=0,w=0,S;for(a=i.length-1,c="t";a>=0;--a)switch(i[a].t){case"h":case"H":i[a].t=p,c="h",_<1&&(_=1);break;case"s":(S=i[a].v.match(/\.0+$/))&&(w=Math.max(w,S[0].length-1)),_<3&&(_=3);case"d":case"y":case"M":case"e":c=i[a].t;break;case"m":c==="s"&&(i[a].t="M",_<2&&(_=2));break;case"X":break;case"Z":_<1&&i[a].v.match(/[Hh]/)&&(_=1),_<2&&i[a].v.match(/[Mm]/)&&(_=2),_<3&&i[a].v.match(/[Ss]/)&&(_=3)}switch(_){case 0:break;case 1:u.u>=.5&&(u.u=0,++u.S),u.S>=60&&(u.S=0,++u.M),u.M>=60&&(u.M=0,++u.H);break;case 2:u.u>=.5&&(u.u=0,++u.S),u.S>=60&&(u.S=0,++u.M);break}var E="",T;for(a=0;a<i.length;++a)switch(i[a].t){case"t":case"T":case" ":case"D":break;case"X":i[a].v="",i[a].t=";";break;case"d":case"m":case"y":case"h":case"H":case"M":case"s":case"e":case"b":case"Z":i[a].v=sSt(i[a].t.charCodeAt(0),i[a].v,u,w),i[a].t="t";break;case"n":case"?":for(T=a+1;i[T]!=null&&((o=i[T].t)==="?"||o==="D"||(o===" "||o==="t")&&i[T+1]!=null&&(i[T+1].t==="?"||i[T+1].t==="t"&&i[T+1].v==="/")||i[a].t==="("&&(o===" "||o==="n"||o===")")||o==="t"&&(i[T].v==="/"||i[T].v===" "&&i[T+1]!=null&&i[T+1].t=="?"));)i[a].v+=i[T].v,i[T]={v:"",t:";"},++T;E+=i[a].v,a=T-1;break;case"G":i[a].t="t",i[a].v=IL(t,n);break}var N="",A,k;if(E.length>0){E.charCodeAt(0)==40?(A=t<0&&E.charCodeAt(0)===45?-t:t,k=uh("n",E,A)):(A=t<0&&r>1?-t:t,k=uh("n",E,A),A<0&&i[0]&&i[0].t=="t"&&(k=k.substr(1),i[0].v="-"+i[0].v)),T=k.length-1;var j=i.length;for(a=0;a<i.length;++a)if(i[a]!=null&&i[a].t!="t"&&i[a].v.indexOf(".")>-1){j=a;break}var R=i.length;if(j===i.length&&k.indexOf("E")===-1){for(a=i.length-1;a>=0;--a)i[a]==null||"n?".indexOf(i[a].t)===-1||(T>=i[a].v.length-1?(T-=i[a].v.length,i[a].v=k.substr(T+1,i[a].v.length)):T<0?i[a].v="":(i[a].v=k.substr(0,T+1),T=-1),i[a].t="t",R=a);T>=0&&R<i.length&&(i[R].v=k.substr(0,T+1)+i[R].v)}else if(j!==i.length&&k.indexOf("E")===-1){for(T=k.indexOf(".")-1,a=j;a>=0;--a)if(!(i[a]==null||"n?".indexOf(i[a].t)===-1)){for(d=i[a].v.indexOf(".")>-1&&a===j?i[a].v.indexOf(".")-1:i[a].v.length-1,N=i[a].v.substr(d+1);d>=0;--d)T>=0&&(i[a].v.charAt(d)==="0"||i[a].v.charAt(d)==="#")&&(N=k.charAt(T--)+N);i[a].v=N,i[a].t="t",R=a}for(T>=0&&R<i.length&&(i[R].v=k.substr(0,T+1)+i[R].v),T=k.indexOf(".")+1,a=j;a<i.length;++a)if(!(i[a]==null||"n?(".indexOf(i[a].t)===-1&&a!==j)){for(d=i[a].v.indexOf(".")>-1&&a===j?i[a].v.indexOf(".")+1:0,N=i[a].v.substr(0,d);d<i[a].v.length;++d)T<k.length&&(N+=k.charAt(T++));i[a].v=N,i[a].t="t",R=a}}}for(a=0;a<i.length;++a)i[a]!=null&&"n?".indexOf(i[a].t)>-1&&(A=r>1&&t<0&&a>0&&i[a-1].v==="-"?-t:t,i[a].v=uh(i[a].t,i[a].v,A),i[a].t="t");var P="";for(a=0;a!==i.length;++a)i[a]!=null&&(P+=i[a].v);return P}var Hne=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function qne(e,t){if(t==null)return!1;var n=parseFloat(t[2]);switch(t[1]){case"=":if(e==n)return!0;break;case">":if(e>n)return!0;break;case"<":if(e<n)return!0;break;case"<>":if(e!=n)return!0;break;case">=":if(e>=n)return!0;break;case"<=":if(e<=n)return!0;break}return!1}function gSt(e,t){var n=pSt(e),r=n.length,i=n[r-1].indexOf("@");if(r<4&&i>-1&&--r,n.length>4)throw new Error("cannot find right format for |"+n.join("|")+"|");if(typeof t!="number")return[4,n.length===4||i>-1?n[n.length-1]:"@"];switch(n.length){case 1:n=i>-1?["General","General","General",n[0]]:[n[0],n[0],n[0],"@"];break;case 2:n=i>-1?[n[0],n[0],n[0],n[1]]:[n[0],n[1],n[0],"@"];break;case 3:n=i>-1?[n[0],n[1],n[0],n[2]]:[n[0],n[1],n[2],"@"];break}var s=t>0?n[0]:t<0?n[1]:n[2];if(n[0].indexOf("[")===-1&&n[1].indexOf("[")===-1)return[r,s];if(n[0].match(/\[[=<>]/)!=null||n[1].match(/\[[=<>]/)!=null){var a=n[0].match(Hne),o=n[1].match(Hne);return qne(t,a)?[r,n[0]]:qne(t,o)?[r,n[1]]:[r,n[a!=null&&o!=null?2:1]]}return[r,s]}function km(e,t,n){n==null&&(n={});var r="";switch(typeof e){case"string":e=="m/d/yy"&&n.dateNF?r=n.dateNF:r=e;break;case"number":e==14&&n.dateNF?r=n.dateNF:r=(n.table!=null?n.table:Ts)[e],r==null&&(r=n.table&&n.table[Bne[e]]||Ts[Bne[e]]),r==null&&(r=Q2t[e]||"General");break}if(ej(r,0))return IL(t,n);t instanceof Date&&(t=iwe(t,n.date1904));var i=gSt(r,t);if(ej(i[1]))return IL(t,n);if(t===!0)t="TRUE";else if(t===!1)t="FALSE";else if(t===""||t==null)return"";return mSt(i[1],t,n,i[0])}function pwe(e,t){if(typeof t!="number"){t=+t||-1;for(var n=0;n<392;++n){if(Ts[n]==null){t<0&&(t=n);continue}
vendor: 4,361 bytes, line 1266
1266if(Ts[n]==e){t=n;break}}t<0&&(t=391)}return Ts[t]=e,t}function z4(e){for(var t=0;t!=392;++t)e[t]!==void 0&&pwe(e[t],t)}function $4(){Ts=X2t()}var mwe=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;function xSt(e){var t=typeof e=="number"?Ts[e]:e;return t=t.replace(mwe,"(\\d+)"),new RegExp("^"+t+"$")}function vSt(e,t,n){var r=-1,i=-1,s=-1,a=-1,o=-1,c=-1;(t.match(mwe)||[]).forEach(function(h,p){var g=parseInt(n[p+1],10);switch(h.toLowerCase().charAt(0)){case"y":r=g;break;case"d":s=g;break;case"h":a=g;break;case"s":c=g;break;case"m":a>=0?o=g:i=g;break}}),c>=0&&o==-1&&i>=0&&(o=i,i=-1);var u=(""+(r>=0?r:new Date().getFullYear())).slice(-4)+"-"+("00"+(i>=1?i:1)).slice(-2)+"-"+("00"+(s>=1?s:1)).slice(-2);u.length==7&&(u="0"+u),u.length==8&&(u="20"+u);var d=("00"+(a>=0?a:0)).slice(-2)+":"+("00"+(o>=0?o:0)).slice(-2)+":"+("00"+(c>=0?c:0)).slice(-2);return a==-1&&o==-1&&c==-1?u:r==-1&&i==-1&&s==-1?d:u+"T"+d}var ySt=(function(){var e={};e.version="1.2.0";function t(){for(var k=0,j=new Array(256),R=0;R!=256;++R)k=R,k=k&1?-306674912^k>>>1:k>>>1,k=k&1?-306674912^k>>>1:k>>>1,k=k&1?-306674912^k>>>1:k>>>1,k=k&1?-306674912^k>>>1:k>>>1,k=k&1?-306674912^k>>>1:k>>>1,k=k&1?-306674912^k>>>1:k>>>1,k=k&1?-306674912^k>>>1:k>>>1,k=k&1?-306674912^k>>>1:k>>>1,j[R]=k;return typeof Int32Array<"u"?new Int32Array(j):j}var n=t();function r(k){var j=0,R=0,P=0,V=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(P=0;P!=256;++P)V[P]=k[P];for(P=0;P!=256;++P)for(R=k[P],j=256+P;j<4096;j+=256)R=V[j]=R>>>8^k[R&255];var U=[];for(P=1;P!=16;++P)U[P-1]=typeof Int32Array<"u"?V.subarray(P*256,P*256+256):V.slice(P*256,P*256+256);return U}var i=r(n),s=i[0],a=i[1],o=i[2],c=i[3],u=i[4],d=i[5],h=i[6],p=i[7],g=i[8],v=i[9],x=i[10],_=i[11],w=i[12],S=i[13],E=i[14];function T(k,j){for(var R=j^-1,P=0,V=k.length;P<V;)R=R>>>8^n[(R^k.charCodeAt(P++))&255];return~R}function N(k,j){for(var R=j^-1,P=k.length-15,V=0;V<P;)R=E[k[V++]^R&255]^S[k[V++]^R>>8&255]^w[k[V++]^R>>16&255]^_[k[V++]^R>>>24]^x[k[V++]]^v[k[V++]]^g[k[V++]]^p[k[V++]]^h[k[V++]]^d[k[V++]]^u[k[V++]]^c[k[V++]]^o[k[V++]]^a[k[V++]]^s[k[V++]]^n[k[V++]];for(P+=15;V<P;)R=R>>>8^n[(R^k[V++])&255];return~R}function A(k,j){for(var R=j^-1,P=0,V=k.length,U=0,G=0;P<V;)U=k.charCodeAt(P++),U<128?R=R>>>8^n[(R^U)&255]:U<2048?(R=R>>>8^n[(R^(192|U>>6&31))&255],R=R>>>8^n[(R^(128|U&63))&255]):U>=55296&&U<57344?(U=(U&1023)+64,G=k.charCodeAt(P++)&1023,R=R>>>8^n[(R^(240|U>>8&7))&255],R=R>>>8^n[(R^(128|U>>2&63))&255],R=R>>>8^n[(R^(128|G>>6&15|(U&3)<<4))&255],R=R>>>8^n[(R^(128|G&63))&255]):(R=R>>>8^n[(R^(224|U>>12&15))&255],R=R>>>8^n[(R^(128|U>>6&63))&255],R=R>>>8^n[(R^(128|U&63))&255]);return~R}return e.table=n,e.bstr=T,e.buf=N,e.str=A,e})(),_i=(function(){var t={};t.version="1.2.1";function n(le,ve){for(var he=le.split("/"),pe=ve.split("/"),ye=0,Ee=0,Xe=Math.min(he.length,pe.length);ye<Xe;++ye){if(Ee=he[ye].length-pe[ye].length)return Ee;if(he[ye]!=pe[ye])return he[ye]<pe[ye]?-1:1}return he.length-pe.length}function r(le){if(le.charAt(le.length-1)=="/")return le.slice(0,-1).indexOf("/")===-1?le:r(le.slice(0,-1));var ve=le.lastIndexOf("/");return ve===-1?le:le.slice(0,ve+1)}function i(le){if(le.charAt(le.length-1)=="/")return i(le.slice(0,-1));var ve=le.lastIndexOf("/");return ve===-1?le:le.slice(ve+1)}function s(le,ve){typeof ve=="string"&&(ve=new Date(ve));var he=ve.getHours();he=he<<6|ve.getMinutes(),he=he<<5|ve.getSeconds()>>>1,le.write_shift(2,he);var pe=ve.getFullYear()-1980;pe=pe<<4|ve.getMonth()+1,pe=pe<<5|ve.getDate(),le.write_shift(2,pe)}function a(le){var ve=le.read_shift(2)&65535,he=le.read_shift(2)&65535,pe=new Date,ye=he&31;he>>>=5;var Ee=he&15;he>>>=4,pe.setMilliseconds(0),pe.setFullYear(he+1980),pe.setMonth(Ee-1),pe.setDate(ye);var Xe=ve&31;ve>>>=5;var ft=ve&63;return ve>>>=6,pe.setHours(ve),pe.setMinutes(ft),pe.setSeconds(Xe<<1),pe}function o(le){Dl(le,0);for(var ve={},he=0;le.l<=le.length-4;){var pe=le.read_shift(2),ye=le.read_shift(2),Ee=le.l+ye,Xe={};switch(pe){case 21589:he=le.read_shift(1),he&1&&(Xe.mtime=le.read_shift(4)),ye>5&&(he&2&&(Xe.atime=le.read_shift(4)),he&4&&(Xe.ctime=le.read_shift(4))),Xe.mtime&&(Xe.mt=new Date(Xe.mtime*1e3));break}le.l=Ee,ve[pe]=Xe}return ve}var c;function u(){return c||(c={})}function d(le,ve){if(le[0]==80&&le[1]==75)return Ve(le,ve);if((le[0]|32)==109&&(le[1]|32)==105)return Nr(le,ve);if(le.length<512)throw new Error("CFB file size "+le.length+" < 512");
vendor: 7,298 bytes, line 1266
1266var he=3,pe=512,ye=0,Ee=0,Xe=0,ft=0,He=0,Qe=[],Ze=le.slice(0,512);Dl(Ze,0);var kt=h(Ze);switch(he=kt[0],he){case 3:pe=512;break;case 4:pe=4096;break;case 0:if(kt[1]==0)return Ve(le,ve);default:throw new Error("Major Version: Expected 3 or 4 saw "+he)}pe!==512&&(Ze=le.slice(0,pe),Dl(Ze,28));var zt=le.slice(0,pe);p(Ze,he);var Xt=Ze.read_shift(4,"i");if(he===3&&Xt!==0)throw new Error("# Directory Sectors: Expected 0 saw "+Xt);Ze.l+=4,Xe=Ze.read_shift(4,"i"),Ze.l+=4,Ze.chk("00100000","Mini Stream Cutoff Size: "),ft=Ze.read_shift(4,"i"),ye=Ze.read_shift(4,"i"),He=Ze.read_shift(4,"i"),Ee=Ze.read_shift(4,"i");for(var Ot=-1,Kt=0;Kt<109&&(Ot=Ze.read_shift(4,"i"),!(Ot<0));++Kt)Qe[Kt]=Ot;var hn=g(le,pe);_(He,Ee,hn,pe,Qe);var hi=S(hn,Xe,Qe,pe);hi[Xe].name="!Directory",ye>0&&ft!==G&&(hi[ft].name="!MiniFAT"),hi[Qe[0]].name="!FAT",hi.fat_addrs=Qe,hi.ssz=pe;var pi={},In=[],Ai=[],tg=[];E(Xe,hi,hn,In,ye,pi,Ai,ft),v(Ai,tg,In),In.shift();var Qh={FileIndex:Ai,FullPaths:tg};return ve&&ve.raw&&(Qh.raw={header:zt,sectors:hn}),Qh}function h(le){if(le[le.l]==80&&le[le.l+1]==75)return[0,0];le.chk(Q,"Header Signature: "),le.l+=16;var ve=le.read_shift(2,"u");return[le.read_shift(2,"u"),ve]}function p(le,ve){var he=9;switch(le.l+=2,he=le.read_shift(2)){case 9:if(ve!=3)throw new Error("Sector Shift: Expected 9 saw "+he);break;case 12:if(ve!=4)throw new Error("Sector Shift: Expected 12 saw "+he);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+he)}le.chk("0600","Mini Sector Shift: "),le.chk("000000000000","Reserved: ")}function g(le,ve){for(var he=Math.ceil(le.length/ve)-1,pe=[],ye=1;ye<he;++ye)pe[ye-1]=le.slice(ye*ve,(ye+1)*ve);return pe[he-1]=le.slice(he*ve),pe}function v(le,ve,he){for(var pe=0,ye=0,Ee=0,Xe=0,ft=0,He=he.length,Qe=[],Ze=[];pe<He;++pe)Qe[pe]=Ze[pe]=pe,ve[pe]=he[pe];for(;ft<Ze.length;++ft)pe=Ze[ft],ye=le[pe].L,Ee=le[pe].R,Xe=le[pe].C,Qe[pe]===pe&&(ye!==-1&&Qe[ye]!==ye&&(Qe[pe]=Qe[ye]),Ee!==-1&&Qe[Ee]!==Ee&&(Qe[pe]=Qe[Ee])),Xe!==-1&&(Qe[Xe]=pe),ye!==-1&&pe!=Qe[pe]&&(Qe[ye]=Qe[pe],Ze.lastIndexOf(ye)<ft&&Ze.push(ye)),Ee!==-1&&pe!=Qe[pe]&&(Qe[Ee]=Qe[pe],Ze.lastIndexOf(Ee)<ft&&Ze.push(Ee));for(pe=1;pe<He;++pe)Qe[pe]===pe&&(Ee!==-1&&Qe[Ee]!==Ee?Qe[pe]=Qe[Ee]:ye!==-1&&Qe[ye]!==ye&&(Qe[pe]=Qe[ye]));for(pe=1;pe<He;++pe)if(le[pe].type!==0){if(ft=pe,ft!=Qe[ft])do ft=Qe[ft],ve[pe]=ve[ft]+"/"+ve[pe];while(ft!==0&&Qe[ft]!==-1&&ft!=Qe[ft]);Qe[pe]=-1}for(ve[0]+="/",pe=1;pe<He;++pe)le[pe].type!==2&&(ve[pe]+="/")}function x(le,ve,he){for(var pe=le.start,ye=le.size,Ee=[],Xe=pe;he&&ye>0&&Xe>=0;)Ee.push(ve.slice(Xe*U,Xe*U+U)),ye-=U,Xe=Yg(he,Xe*4);return Ee.length===0?ut(0):Ga(Ee).slice(0,le.size)}function _(le,ve,he,pe,ye){var Ee=G;if(le===G){if(ve!==0)throw new Error("DIFAT chain shorter than expected")}else if(le!==-1){var Xe=he[le],ft=(pe>>>2)-1;if(!Xe)return;for(var He=0;He<ft&&(Ee=Yg(Xe,He*4))!==G;++He)ye.push(Ee);_(Yg(Xe,pe-4),ve-1,he,pe,ye)}}function w(le,ve,he,pe,ye){var Ee=[],Xe=[];ye||(ye=[]);var ft=pe-1,He=0,Qe=0;for(He=ve;He>=0;){ye[He]=!0,Ee[Ee.length]=He,Xe.push(le[He]);var Ze=he[Math.floor(He*4/pe)];if(Qe=He*4&ft,pe<4+Qe)throw new Error("FAT boundary crossed: "+He+" 4 "+pe);if(!le[Ze])break;He=Yg(le[Ze],Qe)}return{nodes:Ee,data:Jne([Xe])}}function S(le,ve,he,pe){var ye=le.length,Ee=[],Xe=[],ft=[],He=[],Qe=pe-1,Ze=0,kt=0,zt=0,Xt=0;for(Ze=0;Ze<ye;++Ze)if(ft=[],zt=Ze+ve,zt>=ye&&(zt-=ye),!Xe[zt]){He=[];var Ot=[];for(kt=zt;kt>=0;){Ot[kt]=!0,Xe[kt]=!0,ft[ft.length]=kt,He.push(le[kt]);var Kt=he[Math.floor(kt*4/pe)];if(Xt=kt*4&Qe,pe<4+Xt)throw new Error("FAT boundary crossed: "+kt+" 4 "+pe);if(!le[Kt]||(kt=Yg(le[Kt],Xt),Ot[kt]))break}Ee[zt]={nodes:ft,data:Jne([He])}}return Ee}function E(le,ve,he,pe,ye,Ee,Xe,ft){for(var He=0,Qe=pe.length?2:0,Ze=ve[le].data,kt=0,zt=0,Xt;kt<Ze.length;kt+=128){var Ot=Ze.slice(kt,kt+128);Dl(Ot,64),zt=Ot.read_shift(2),Xt=fU(Ot,0,zt-Qe),pe.push(Xt);var Kt={name:Xt,type:Ot.read_shift(1),color:Ot.read_shift(1),L:Ot.read_shift(4,"i"),R:Ot.read_shift(4,"i"),C:Ot.read_shift(4,"i"),clsid:Ot.read_shift(16),state:Ot.read_shift(4,"i"),start:0,size:0},hn=Ot.read_shift(2)+Ot.read_shift(2)+Ot.read_shift(2)+Ot.read_shift(2);hn!==0&&(Kt.ct=T(Ot,Ot.l-8));var hi=Ot.read_shift(2)+Ot.read_shift(2)+Ot.read_shift(2)+Ot.read_shift(2);hi!==0&&(Kt.mt=T(Ot,Ot.l-8)),Kt.start=Ot.read_shift(4,"i"),Kt.size=Ot.read_shift(4,"i"),Kt.size<0&&Kt.start<0&&(Kt.size=Kt.type=0,Kt.start=G,Kt.name=""),Kt.type===5?(He=Kt.start,ye>0&&He!==G&&(ve[He].name="!StreamData")):Kt.size>=4096?(Kt.storage="fat",ve[Kt.start]===void 0&&(ve[Kt.start]=w(he,Kt.start,ve.fat_addrs,ve.ssz)),ve[Kt.start].name=Kt.name,Kt.content=ve[Kt.start].data.slice(0,Kt.size)):(Kt.storage="minifat",Kt.size<0?Kt.size=0:He!==G&&Kt.start!==G&&ve[He]&&(Kt.content=x(Kt,ve[He].data,(ve[ft]||{}).data))),Kt.content&&Dl(Kt.content,0),Ee[Xt]=Kt,Xe.push(Kt)}}function T(le,ve){return new Date(($l(le,ve+4)/1e7*Math.pow(2,32)+$l(le,ve)/1e7-11644473600)*1e3)}function N(le,ve){return u(),d(c.readFileSync(le),ve)}function A(le,ve){var he=ve&&ve.type;switch(he||Wr&&Buffer.isBuffer(le)&&(he="buffer"),he||"base64"){case"file":return N(le,ve);case"base64":return d(mu(Mh(le)),ve);case"binary":return d(mu(le),ve)}return d(le,ve)}function k(le,ve){var he=ve||{},pe=he.root||"Root Entry";if(le.FullPaths||(le.FullPaths=[]),le.FileIndex||(le.FileIndex=[]),le.FullPaths.length!==le.FileIndex.length)throw new Error("inconsistent CFB structure");le.FullPaths.length===0&&(le.FullPaths[0]=pe+"/",le.FileIndex[0]={name:pe,type:5}),he.CLSID&&(le.FileIndex[0].clsid=he.CLSID),j(le)}function j(le){var ve="�Sh33tJ5";if(!_i.find(le,"/"+ve)){var he=ut(4);he[0]=55,he[1]=he[3]=50,he[2]=54,le.FileIndex.push({name:ve,type:2,content:he,size:4,L:69,R:69,C:69}),le.FullPaths.push(le.FullPaths[0]+ve),R(le)}}function R(le,ve){k(le);for(var he=!1,pe=!1,ye=le.FullPaths.length-1;ye>=0;--ye){var Ee=le.FileIndex[ye];switch(Ee.type){case 0:pe?he=!0:(le.FileIndex.pop(),le.FullPaths.pop());break;case 1:case 2:case 5:pe=!0,isNaN(Ee.R*Ee.L*Ee.C)&&(he=!0),Ee.R>-1&&Ee.L>-1&&Ee.R==Ee.L&&(he=!0);break;default:he=!0;break}}if(!(!he&&!ve)){var Xe=new Date(1987,1,19),ft=0,He=Object.create?Object.create(null):{},Qe=[];for(ye=0;ye<le.FullPaths.length;++ye)He[le.FullPaths[ye]]=!0,le.FileIndex[ye].type!==0&&Qe.push([le.FullPaths[ye],le.FileIndex[ye]]);for(ye=0;ye<Qe.length;++ye){var Ze=r(Qe[ye][0]);pe=He[Ze],pe||(Qe.push([Ze,{name:i(Ze).replace("/",""),type:1,clsid:K,ct:Xe,mt:Xe,content:null}]),He[Ze]=!0)}for(Qe.sort(function(Xt,Ot){return n(Xt[0],Ot[0])}),le.FullPaths=[],le.FileIndex=[],ye=0;ye<Qe.length;++ye)le.FullPaths[ye]=Qe[ye][0],le.FileIndex[ye]=Qe[ye][1];for(ye=0;ye<Qe.length;++ye){var kt=le.FileIndex[ye],zt=le.FullPaths[ye];if(kt.name=i(zt).replace("/",""),kt.L=kt.R=kt.C=-(kt.color=1),kt.size=kt.content?kt.content.length:0,kt.start=0,kt.clsid=kt.clsid||K,ye===0)kt.C=Qe.length>1?1:-1,kt.size=0,kt.type=5;else if(zt.slice(-1)=="/"){for(ft=ye+1;ft<Qe.length&&r(le.FullPaths[ft])!=zt;++ft);for(kt.C=ft>=Qe.length?-1:ft,ft=ye+1;ft<Qe.length&&r(le.FullPaths[ft])!=r(zt);++ft);kt.R=ft>=Qe.length?-1:ft,kt.type=1}else r(le.FullPaths[ye+1]||"")==r(zt)&&(kt.R=ye+1),kt.type=2}}}function P(le,ve){var he=ve||{};if(he.fileType=="mad")return Ns(le,he);switch(R(le),he.fileType){case"zip":return Gt(le,he)}var pe=(function(Xt){for(var Ot=0,Kt=0,hn=0;hn<Xt.FileIndex.length;++hn){var hi=Xt.FileIndex[hn];
vendor: 11,267 bytes, line 1266
1266if(hi.content){var pi=hi.content.length;pi>0&&(pi<4096?Ot+=pi+63>>6:Kt+=pi+511>>9)}}for(var In=Xt.FullPaths.length+3>>2,Ai=Ot+7>>3,tg=Ot+127>>7,Qh=Ai+Kt+In+tg,td=Qh+127>>7,bb=td<=109?0:Math.ceil((td-109)/127);Qh+td+bb+127>>7>td;)bb=++td<=109?0:Math.ceil((td-109)/127);var Wo=[1,bb,td,tg,In,Kt,Ot,0];return Xt.FileIndex[0].size=Ot<<6,Wo[7]=(Xt.FileIndex[0].start=Wo[0]+Wo[1]+Wo[2]+Wo[3]+Wo[4]+Wo[5])+(Wo[6]+7>>3),Wo})(le),ye=ut(pe[7]<<9),Ee=0,Xe=0;{for(Ee=0;Ee<8;++Ee)ye.write_shift(1,Z[Ee]);for(Ee=0;Ee<8;++Ee)ye.write_shift(2,0);for(ye.write_shift(2,62),ye.write_shift(2,3),ye.write_shift(2,65534),ye.write_shift(2,9),ye.write_shift(2,6),Ee=0;Ee<3;++Ee)ye.write_shift(2,0);for(ye.write_shift(4,0),ye.write_shift(4,pe[2]),ye.write_shift(4,pe[0]+pe[1]+pe[2]+pe[3]-1),ye.write_shift(4,0),ye.write_shift(4,4096),ye.write_shift(4,pe[3]?pe[0]+pe[1]+pe[2]-1:G),ye.write_shift(4,pe[3]),ye.write_shift(-4,pe[1]?pe[0]-1:G),ye.write_shift(4,pe[1]),Ee=0;Ee<109;++Ee)ye.write_shift(-4,Ee<pe[2]?pe[1]+Ee:-1)}if(pe[1])for(Xe=0;Xe<pe[1];++Xe){for(;Ee<236+Xe*127;++Ee)ye.write_shift(-4,Ee<pe[2]?pe[1]+Ee:-1);ye.write_shift(-4,Xe===pe[1]-1?G:Xe+1)}var ft=function(Xt){for(Xe+=Xt;Ee<Xe-1;++Ee)ye.write_shift(-4,Ee+1);Xt&&(++Ee,ye.write_shift(-4,G))};for(Xe=Ee=0,Xe+=pe[1];Ee<Xe;++Ee)ye.write_shift(-4,te.DIFSECT);for(Xe+=pe[2];Ee<Xe;++Ee)ye.write_shift(-4,te.FATSECT);ft(pe[3]),ft(pe[4]);for(var He=0,Qe=0,Ze=le.FileIndex[0];He<le.FileIndex.length;++He)Ze=le.FileIndex[He],Ze.content&&(Qe=Ze.content.length,!(Qe<4096)&&(Ze.start=Xe,ft(Qe+511>>9)));for(ft(pe[6]+7>>3);ye.l&511;)ye.write_shift(-4,te.ENDOFCHAIN);for(Xe=Ee=0,He=0;He<le.FileIndex.length;++He)Ze=le.FileIndex[He],Ze.content&&(Qe=Ze.content.length,!(!Qe||Qe>=4096)&&(Ze.start=Xe,ft(Qe+63>>6)));for(;ye.l&511;)ye.write_shift(-4,te.ENDOFCHAIN);for(Ee=0;Ee<pe[4]<<2;++Ee){var kt=le.FullPaths[Ee];if(!kt||kt.length===0){for(He=0;He<17;++He)ye.write_shift(4,0);for(He=0;He<3;++He)ye.write_shift(4,-1);for(He=0;He<12;++He)ye.write_shift(4,0);continue}Ze=le.FileIndex[Ee],Ee===0&&(Ze.start=Ze.size?Ze.start-1:G);var zt=Ee===0&&he.root||Ze.name;if(Qe=2*(zt.length+1),ye.write_shift(64,zt,"utf16le"),ye.write_shift(2,Qe),ye.write_shift(1,Ze.type),ye.write_shift(1,Ze.color),ye.write_shift(-4,Ze.L),ye.write_shift(-4,Ze.R),ye.write_shift(-4,Ze.C),Ze.clsid)ye.write_shift(16,Ze.clsid,"hex");else for(He=0;He<4;++He)ye.write_shift(4,0);ye.write_shift(4,Ze.state||0),ye.write_shift(4,0),ye.write_shift(4,0),ye.write_shift(4,0),ye.write_shift(4,0),ye.write_shift(4,Ze.start),ye.write_shift(4,Ze.size),ye.write_shift(4,0)}for(Ee=1;Ee<le.FileIndex.length;++Ee)if(Ze=le.FileIndex[Ee],Ze.size>=4096)if(ye.l=Ze.start+1<<9,Wr&&Buffer.isBuffer(Ze.content))Ze.content.copy(ye,ye.l,0,Ze.size),ye.l+=Ze.size+511&-512;else{for(He=0;He<Ze.size;++He)ye.write_shift(1,Ze.content[He]);for(;He&511;++He)ye.write_shift(1,0)}for(Ee=1;Ee<le.FileIndex.length;++Ee)if(Ze=le.FileIndex[Ee],Ze.size>0&&Ze.size<4096)if(Wr&&Buffer.isBuffer(Ze.content))Ze.content.copy(ye,ye.l,0,Ze.size),ye.l+=Ze.size+63&-64;else{for(He=0;He<Ze.size;++He)ye.write_shift(1,Ze.content[He]);for(;He&63;++He)ye.write_shift(1,0)}if(Wr)ye.l=ye.length;else for(;ye.l<ye.length;)ye.write_shift(1,0);return ye}function V(le,ve){var he=le.FullPaths.map(function(He){return He.toUpperCase()}),pe=he.map(function(He){var Qe=He.split("/");return Qe[Qe.length-(He.slice(-1)=="/"?2:1)]}),ye=!1;ve.charCodeAt(0)===47?(ye=!0,ve=he[0].slice(0,-1)+ve):ye=ve.indexOf("/")!==-1;var Ee=ve.toUpperCase(),Xe=ye===!0?he.indexOf(Ee):pe.indexOf(Ee);if(Xe!==-1)return le.FileIndex[Xe];var ft=!Ee.match(VA);for(Ee=Ee.replace(l2,""),ft&&(Ee=Ee.replace(VA,"!")),Xe=0;Xe<he.length;++Xe)if((ft?he[Xe].replace(VA,"!"):he[Xe]).replace(l2,"")==Ee||(ft?pe[Xe].replace(VA,"!"):pe[Xe]).replace(l2,"")==Ee)return le.FileIndex[Xe];return null}var U=64,G=-2,Q="d0cf11e0a1b11ae1",Z=[208,207,17,224,161,177,26,225],K="00000000000000000000000000000000",te={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:G,FREESECT:-1,HEADER_SIGNATURE:Q,HEADER_MINOR_VERSION:"3e00",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:K,EntryTypes:["unknown","storage","stream","lockbytes","property","root"]};function ne(le,ve,he){u();var pe=P(le,he);c.writeFileSync(ve,pe)}function se(le){for(var ve=new Array(le.length),he=0;he<le.length;++he)ve[he]=String.fromCharCode(le[he]);return ve.join("")}function H(le,ve){var he=P(le,ve);switch(ve&&ve.type||"buffer"){case"file":return u(),c.writeFileSync(ve.filename,he),he;case"binary":return typeof he=="string"?he:se(he);case"base64":return $S(typeof he=="string"?he:se(he));case"buffer":if(Wr)return Buffer.isBuffer(he)?he:Xh(he);case"array":return typeof he=="string"?mu(he):he}return he}var O;function L(le){try{var ve=le.InflateRaw,he=new ve;if(he._processChunk(new Uint8Array([3,0]),he._finishFlushFlag),he.bytesRead)O=le;else throw new Error("zlib does not expose bytesRead")}catch(pe){console.error("cannot use native zlib: "+(pe.message||pe))}}function M(le,ve){if(!O)return $t(le,ve);var he=O.InflateRaw,pe=new he,ye=pe._processChunk(le.slice(le.l),pe._finishFlushFlag);return le.l+=pe.bytesRead,ye}function q(le){return O?O.deflateRawSync(le):Ut(le)}var X=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],J=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],W=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];function re(le){var ve=(le<<1|le<<11)&139536|(le<<5|le<<15)&558144;return(ve>>16|ve>>8|ve)&255}for(var ae=typeof Uint8Array<"u",ce=ae?new Uint8Array(256):[],Te=0;Te<256;++Te)ce[Te]=re(Te);function fe(le,ve){var he=ce[le&255];return ve<=8?he>>>8-ve:(he=he<<8|ce[le>>8&255],ve<=16?he>>>16-ve:(he=he<<8|ce[le>>16&255],he>>>24-ve))}function xe(le,ve){var he=ve&7,pe=ve>>>3;return(le[pe]|(he<=6?0:le[pe+1]<<8))>>>he&3}function ke(le,ve){var he=ve&7,pe=ve>>>3;return(le[pe]|(he<=5?0:le[pe+1]<<8))>>>he&7}function Fe(le,ve){var he=ve&7,pe=ve>>>3;return(le[pe]|(he<=4?0:le[pe+1]<<8))>>>he&15}function tt(le,ve){var he=ve&7,pe=ve>>>3;return(le[pe]|(he<=3?0:le[pe+1]<<8))>>>he&31}function Se(le,ve){var he=ve&7,pe=ve>>>3;return(le[pe]|(he<=1?0:le[pe+1]<<8))>>>he&127}function et(le,ve,he){var pe=ve&7,ye=ve>>>3,Ee=(1<<he)-1,Xe=le[ye]>>>pe;return he<8-pe||(Xe|=le[ye+1]<<8-pe,he<16-pe)||(Xe|=le[ye+2]<<16-pe,he<24-pe)||(Xe|=le[ye+3]<<24-pe),Xe&Ee}function pt(le,ve,he){var pe=ve&7,ye=ve>>>3;return pe<=5?le[ye]|=(he&7)<<pe:(le[ye]|=he<<pe&255,le[ye+1]=(he&7)>>8-pe),ve+3}function ie(le,ve,he){var pe=ve&7,ye=ve>>>3;return he=(he&1)<<pe,le[ye]|=he,ve+1}function ue(le,ve,he){var pe=ve&7,ye=ve>>>3;return he<<=pe,le[ye]|=he&255,he>>>=8,le[ye+1]=he,ve+8}function Ne(le,ve,he){var pe=ve&7,ye=ve>>>3;return he<<=pe,le[ye]|=he&255,he>>>=8,le[ye+1]=he&255,le[ye+2]=he>>>8,ve+16}function De(le,ve){var he=le.length,pe=2*he>ve?2*he:ve+5,ye=0;if(he>=ve)return le;if(Wr){var Ee=Lne(pe);if(le.copy)le.copy(Ee);else for(;ye<le.length;++ye)Ee[ye]=le[ye];return Ee}else if(ae){var Xe=new Uint8Array(pe);if(Xe.set)Xe.set(le);else for(;ye<he;++ye)Xe[ye]=le[ye];return Xe}return le.length=pe,le}function be(le){for(var ve=new Array(le),he=0;he<le;++he)ve[he]=0;return ve}function me(le,ve,he){var pe=1,ye=0,Ee=0,Xe=0,ft=0,He=le.length,Qe=ae?new Uint16Array(32):be(32);for(Ee=0;Ee<32;++Ee)Qe[Ee]=0;for(Ee=He;Ee<he;++Ee)le[Ee]=0;He=le.length;var Ze=ae?new Uint16Array(He):be(He);for(Ee=0;Ee<He;++Ee)Qe[ye=le[Ee]]++,pe<ye&&(pe=ye),Ze[Ee]=0;for(Qe[0]=0,Ee=1;Ee<=pe;++Ee)Qe[Ee+16]=ft=ft+Qe[Ee-1]<<1;for(Ee=0;Ee<He;++Ee)ft=le[Ee],ft!=0&&(Ze[Ee]=Qe[ft+16]++);var kt=0;for(Ee=0;Ee<He;++Ee)if(kt=le[Ee],kt!=0)for(ft=fe(Ze[Ee],pe)>>pe-kt,Xe=(1<<pe+4-kt)-1;Xe>=0;--Xe)ve[ft|Xe<<kt]=kt&15|Ee<<4;return pe}var we=ae?new Uint16Array(512):be(512),Le=ae?new Uint16Array(32):be(32);if(!ae){for(var oe=0;oe<512;++oe)we[oe]=0;for(oe=0;oe<32;++oe)Le[oe]=0}(function(){for(var le=[],ve=0;ve<32;ve++)le.push(5);me(le,Le,32);var he=[];for(ve=0;ve<=143;ve++)he.push(8);for(;ve<=255;ve++)he.push(9);for(;ve<=279;ve++)he.push(7);for(;ve<=287;ve++)he.push(8);me(he,we,288)})();var St=(function(){for(var ve=ae?new Uint8Array(32768):[],he=0,pe=0;he<W.length-1;++he)for(;pe<W[he+1];++pe)ve[pe]=he;for(;pe<32768;++pe)ve[pe]=29;var ye=ae?new Uint8Array(259):[];for(he=0,pe=0;he<J.length-1;++he)for(;pe<J[he+1];++pe)ye[pe]=he;function Ee(ft,He){for(var Qe=0;Qe<ft.length;){var Ze=Math.min(65535,ft.length-Qe),kt=Qe+Ze==ft.length;for(He.write_shift(1,+kt),He.write_shift(2,Ze),He.write_shift(2,~Ze&65535);Ze-- >0;)He[He.l++]=ft[Qe++]}return He.l}function Xe(ft,He){for(var Qe=0,Ze=0,kt=ae?new Uint16Array(32768):[];Ze<ft.length;){var zt=Math.min(65535,ft.length-Ze);if(zt<10){for(Qe=pt(He,Qe,+(Ze+zt==ft.length)),Qe&7&&(Qe+=8-(Qe&7)),He.l=Qe/8|0,He.write_shift(2,zt),He.write_shift(2,~zt&65535);zt-- >0;)He[He.l++]=ft[Ze++];Qe=He.l*8;continue}Qe=pt(He,Qe,+(Ze+zt==ft.length)+2);for(var Xt=0;zt-- >0;){var Ot=ft[Ze];Xt=(Xt<<5^Ot)&32767;var Kt=-1,hn=0;if((Kt=kt[Xt])&&(Kt|=Ze&-32768,Kt>Ze&&(Kt-=32768),Kt<Ze))for(;ft[Kt+hn]==ft[Ze+hn]&&hn<250;)++hn;if(hn>2){Ot=ye[hn],Ot<=22?Qe=ue(He,Qe,ce[Ot+1]>>1)-1:(ue(He,Qe,3),Qe+=5,ue(He,Qe,ce[Ot-23]>>5),Qe+=3);var hi=Ot<8?0:Ot-4>>2;hi>0&&(Ne(He,Qe,hn-J[Ot]),Qe+=hi),Ot=ve[Ze-Kt],Qe=ue(He,Qe,ce[Ot]>>3),Qe-=3;var pi=Ot<4?0:Ot-2>>1;pi>0&&(Ne(He,Qe,Ze-Kt-W[Ot]),Qe+=pi);for(var In=0;In<hn;++In)kt[Xt]=Ze&32767,Xt=(Xt<<5^ft[Ze])&32767,++Ze;zt-=hn-1}else Ot<=143?Ot=Ot+48:Qe=ie(He,Qe,1),Qe=ue(He,Qe,ce[Ot]),kt[Xt]=Ze&32767,++Ze}Qe=ue(He,Qe,0)-1}return He.l=(Qe+7)/8|0,He.l}return function(He,Qe){return He.length<8?Ee(He,Qe):Xe(He,Qe)}})();function Ut(le){var ve=ut(50+Math.floor(le.length*1.1)),he=St(le,ve);return ve.slice(0,he)}var Ht=ae?new Uint16Array(32768):be(32768),Rt=ae?new Uint16Array(32768):be(32768),Ct=ae?new Uint16Array(128):be(128),Wt=1,Tn=1;function Ie(le,ve){var he=tt(le,ve)+257;ve+=5;var pe=tt(le,ve)+1;ve+=5;var ye=Fe(le,ve)+4;ve+=4;for(var Ee=0,Xe=ae?new Uint8Array(19):be(19),ft=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],He=1,Qe=ae?new Uint8Array(8):be(8),Ze=ae?new Uint8Array(8):be(8),kt=Xe.length,zt=0;zt<ye;++zt)Xe[X[zt]]=Ee=ke(le,ve),He<Ee&&(He=Ee),Qe[Ee]++,ve+=3;var Xt=0;for(Qe[0]=0,zt=1;zt<=He;++zt)Ze[zt]=Xt=Xt+Qe[zt-1]<<1;for(zt=0;zt<kt;++zt)(Xt=Xe[zt])!=0&&(ft[zt]=Ze[Xt]++);var Ot=0;for(zt=0;zt<kt;++zt)if(Ot=Xe[zt],Ot!=0){Xt=ce[ft[zt]]>>8-Ot;for(var Kt=(1<<7-Ot)-1;Kt>=0;--Kt)Ct[Xt|Kt<<Ot]=Ot&7|zt<<3}var hn=[];for(He=1;hn.length<he+pe;)switch(Xt=Ct[Se(le,ve)],ve+=Xt&7,Xt>>>=3){case 16:for(Ee=3+xe(le,ve),ve+=2,Xt=hn[hn.length-1];Ee-- >0;)hn.push(Xt);break;case 17:for(Ee=3+ke(le,ve),ve+=3;Ee-- >0;)hn.push(0);break;case 18:for(Ee=11+Se(le,ve),ve+=7;Ee-- >0;)hn.push(0);break;default:hn.push(Xt),He<Xt&&(He=Xt);break}var hi=hn.slice(0,he),pi=hn.slice(he);for(zt=he;zt<286;++zt)hi[zt]=0;for(zt=pe;zt<30;++zt)pi[zt]=0;return Wt=me(hi,Ht,286),Tn=me(pi,Rt,30),ve}function dt(le,ve){if(le[0]==3&&!(le[1]&3))return[ex(ve),2];for(var he=0,pe=0,ye=Lne(ve||1<<18),Ee=0,Xe=ye.length>>>0,ft=0,He=0;(pe&1)==0;){if(pe=ke(le,he),he+=3,pe>>>1)pe>>1==1?(ft=9,He=5):(he=Ie(le,he),ft=Wt,He=Tn);else{he&7&&(he+=8-(he&7));var Qe=le[he>>>3]|le[(he>>>3)+1]<<8;if(he+=32,Qe>0)for(!ve&&Xe<Ee+Qe&&(ye=De(ye,Ee+Qe),Xe=ye.length);Qe-- >0;)ye[Ee++]=le[he>>>3],he+=8;continue}for(;;){!ve&&Xe<Ee+32767&&(ye=De(ye,Ee+32767),Xe=ye.length);var Ze=et(le,he,ft),kt=pe>>>1==1?we[Ze]:Ht[Ze];if(he+=kt&15,kt>>>=4,(kt>>>
vendor: 7,286 bytes, lines 1266-1274
12668&255)===0)ye[Ee++]=kt;else{if(kt==256)break;kt-=257;var zt=kt<8?0:kt-4>>2;zt>5&&(zt=0);var Xt=Ee+J[kt];zt>0&&(Xt+=et(le,he,zt),he+=zt),Ze=et(le,he,He),kt=pe>>>1==1?Le[Ze]:Rt[Ze],he+=kt&15,kt>>>=4;var Ot=kt<4?0:kt-2>>1,Kt=W[kt];for(Ot>0&&(Kt+=et(le,he,Ot),he+=Ot),!ve&&Xe<Xt&&(ye=De(ye,Xt+100),Xe=ye.length);Ee<Xt;)ye[Ee]=ye[Ee-Kt],++Ee}}}return ve?[ye,he+7>>>3]:[ye.slice(0,Ee),he+7>>>3]}function $t(le,ve){var he=le.slice(le.l||0),pe=dt(he,ve);return le.l+=pe[1],pe[0]}function Mn(le,ve){if(le)typeof console<"u"&&console.error(ve);else throw new Error(ve)}function Ve(le,ve){var he=le;Dl(he,0);var pe=[],ye=[],Ee={FileIndex:pe,FullPaths:ye};k(Ee,{root:ve.root});for(var Xe=he.length-4;(he[Xe]!=80||he[Xe+1]!=75||he[Xe+2]!=5||he[Xe+3]!=6)&&Xe>=0;)--Xe;he.l=Xe+4,he.l+=4;var ft=he.read_shift(2);he.l+=6;var He=he.read_shift(4);for(he.l=He,Xe=0;Xe<ft;++Xe){he.l+=20;var Qe=he.read_shift(4),Ze=he.read_shift(4),kt=he.read_shift(2),zt=he.read_shift(2),Xt=he.read_shift(2);he.l+=8;var Ot=he.read_shift(4),Kt=o(he.slice(he.l+kt,he.l+kt+zt));he.l+=kt+zt+Xt;var hn=he.l;he.l=Ot+4,ct(he,Qe,Ze,Ee,Kt),he.l=hn}return Ee}function ct(le,ve,he,pe,ye){le.l+=2;var Ee=le.read_shift(2),Xe=le.read_shift(2),ft=a(le);if(Ee&8257)throw new Error("Unsupported ZIP encryption");for(var He=le.read_shift(4),Qe=le.read_shift(4),Ze=le.read_shift(4),kt=le.read_shift(2),zt=le.read_shift(2),Xt="",Ot=0;Ot<kt;++Ot)Xt+=String.fromCharCode(le[le.l++]);if(zt){var Kt=o(le.slice(le.l,le.l+zt));(Kt[21589]||{}).mt&&(ft=Kt[21589].mt),((ye||{})[21589]||{}).mt&&(ft=ye[21589].mt)}le.l+=zt;var hn=le.slice(le.l,le.l+Qe);switch(Xe){case 8:hn=M(le,Ze);break;case 0:break;default:throw new Error("Unsupported ZIP Compression method "+Xe)}var hi=!1;Ee&8&&(He=le.read_shift(4),He==134695760&&(He=le.read_shift(4),hi=!0),Qe=le.read_shift(4),Ze=le.read_shift(4)),Qe!=ve&&Mn(hi,"Bad compressed size: "+ve+" != "+Qe),Ze!=he&&Mn(hi,"Bad uncompressed size: "+he+" != "+Ze),br(pe,Xt,hn,{unsafe:!0,mt:ft})}function Gt(le,ve){var he=ve||{},pe=[],ye=[],Ee=ut(1),Xe=he.compression?8:0,ft=0,He=0,Qe=0,Ze=0,kt=0,zt=le.FullPaths[0],Xt=zt,Ot=le.FileIndex[0],Kt=[],hn=0;for(He=1;He<le.FullPaths.length;++He)if(Xt=le.FullPaths[He].slice(zt.length),Ot=le.FileIndex[He],!(!Ot.size||!Ot.content||Xt=="�Sh33tJ5")){var hi=Ze,pi=ut(Xt.length);for(Qe=0;Qe<Xt.length;++Qe)pi.write_shift(1,Xt.charCodeAt(Qe)&127);pi=pi.slice(0,pi.l),Kt[kt]=ySt.buf(Ot.content,0);var In=Ot.content;Xe==8&&(In=q(In)),Ee=ut(30),Ee.write_shift(4,67324752),Ee.write_shift(2,20),Ee.write_shift(2,ft),Ee.write_shift(2,Xe),Ot.mt?s(Ee,Ot.mt):Ee.write_shift(4,0),Ee.write_shift(-4,Kt[kt]),Ee.write_shift(4,In.length),Ee.write_shift(4,Ot.content.length),Ee.write_shift(2,pi.length),Ee.write_shift(2,0),Ze+=Ee.length,pe.push(Ee),Ze+=pi.length,pe.push(pi),Ze+=In.length,pe.push(In),Ee=ut(46),Ee.write_shift(4,33639248),Ee.write_shift(2,0),Ee.write_shift(2,20),Ee.write_shift(2,ft),Ee.write_shift(2,Xe),Ee.write_shift(4,0),Ee.write_shift(-4,Kt[kt]),Ee.write_shift(4,In.length),Ee.write_shift(4,Ot.content.length),Ee.write_shift(2,pi.length),Ee.write_shift(2,0),Ee.write_shift(2,0),Ee.write_shift(2,0),Ee.write_shift(2,0),Ee.write_shift(4,0),Ee.write_shift(4,hi),hn+=Ee.l,ye.push(Ee),hn+=pi.length,ye.push(pi),++kt}return Ee=ut(22),Ee.write_shift(4,101010256),Ee.write_shift(2,0),Ee.write_shift(2,0),Ee.write_shift(2,kt),Ee.write_shift(2,kt),Ee.write_shift(4,hn),Ee.write_shift(4,Ze),Ee.write_shift(2,0),Ga([Ga(pe),Ga(ye),Ee])}var Cn={htm:"text/html",xml:"text/xml",gif:"image/gif",jpg:"image/jpeg",png:"image/png",mso:"application/x-mso",thmx:"application/vnd.ms-officetheme",sh33tj5:"application/octet-stream"};function Zr(le,ve){if(le.ctype)return le.ctype;var he=le.name||"",pe=he.match(/\.([^\.]+)$/);return pe&&Cn[pe[1]]||ve&&(pe=(he=ve).match(/[\.\\]([^\.\\])+$/),pe&&Cn[pe[1]])?Cn[pe[1]]:"application/octet-stream"}function rn(le){for(var ve=$S(le),he=[],pe=0;pe<ve.length;pe+=76)he.push(ve.slice(pe,pe+76));return he.join(`\r 1267`)+`\r 1268`}function _n(le){var ve=le.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF=]/g,function(Qe){var Ze=Qe.charCodeAt(0).toString(16).toUpperCase();return"="+(Ze.length==1?"0"+Ze:Ze)});ve=ve.replace(/ $/mg,"=20").replace(/\t$/mg,"=09"),ve.charAt(0)==` 1269`&&(ve="=0D"+ve.slice(1)),ve=ve.replace(/\r(?!\n)/mg,"=0D").replace(/\n\n/mg,` 1270=0A`).replace(/([^\r\n])\n/mg,"$1=0A");for(var he=[],pe=ve.split(`\r 1271`),ye=0;ye<pe.length;++ye){var Ee=pe[ye];if(Ee.length==0){he.push("");continue}for(var Xe=0;Xe<Ee.length;){var ft=76,He=Ee.slice(Xe,Xe+ft);He.charAt(ft-1)=="="?ft--:He.charAt(ft-2)=="="?ft-=2:He.charAt(ft-3)=="="&&(ft-=3),He=Ee.slice(Xe,Xe+ft),Xe+=ft,Xe<Ee.length&&(He+="="),he.push(He)}}return he.join(`\r 1272`)}function Hn(le){for(var ve=[],he=0;he<le.length;++he){for(var pe=le[he];he<=le.length&&pe.charAt(pe.length-1)=="=";)pe=pe.slice(0,pe.length-1)+le[++he];ve.push(pe)}for(var ye=0;ye<ve.length;++ye)ve[ye]=ve[ye].replace(/[=][0-9A-Fa-f]{2}/g,function(Ee){return String.fromCharCode(parseInt(Ee.slice(1),16))});return mu(ve.join(`\r 1273`))}function Jr(le,ve,he){for(var pe="",ye="",Ee="",Xe,ft=0;ft<10;++ft){var He=ve[ft];if(!He||He.match(/^\s*$/))break;var Qe=He.match(/^(.*?):\s*([^\s].*)$/);if(Qe)switch(Qe[1].toLowerCase()){case"content-location":pe=Qe[2].trim();break;case"content-type":Ee=Qe[2].trim();break;case"content-transfer-encoding":ye=Qe[2].trim();break}}switch(++ft,ye.toLowerCase()){case"base64":Xe=mu(Mh(ve.slice(ft).join("")));break;case"quoted-printable":Xe=Hn(ve.slice(ft));break;default:throw new Error("Unsupported Content-Transfer-Encoding "+ye)}var Ze=br(le,pe.slice(he.length),Xe,{unsafe:!0});Ee&&(Ze.ctype=Ee)}function Nr(le,ve){if(se(le.slice(0,13)).toLowerCase()!="mime-version:")throw new Error("Unsupported MAD header");var he=ve&&ve.root||"",pe=(Wr&&Buffer.isBuffer(le)?le.toString("binary"):se(le)).split(`\r 1274`),ye=0,Ee="";for(ye=0;ye<pe.length;++ye)if(Ee=pe[ye],!!/^Content-Location:/i.test(Ee)&&(Ee=Ee.slice(Ee.indexOf("file")),he||(he=Ee.slice(0,Ee.lastIndexOf("/")+1)),Ee.slice(0,he.length)!=he))for(;he.length>0&&(he=he.slice(0,he.length-1),he=he.slice(0,he.lastIndexOf("/")+1),Ee.slice(0,he.length)!=he););var Xe=(pe[1]||"").match(/boundary="(.*?)"/);if(!Xe)throw new Error("MAD cannot find boundary");var ft="--"+(Xe[1]||""),He=[],Qe=[],Ze={FileIndex:He,FullPaths:Qe};k(Ze);var kt,zt=0;for(ye=0;ye<pe.length;++ye){var Xt=pe[ye];Xt!==ft&&Xt!==ft+"--"||(zt++&&Jr(Ze,pe.slice(kt,ye),he),kt=ye)}return Ze}function Ns(le,ve){var he=ve||{},pe=he.boundary||"SheetJS";pe="------="+pe;for(var ye=["MIME-Version: 1.0",'Content-Type: multipart/related; boundary="'+pe.slice(2)+'"',"","",""],Ee=le.FullPaths[0],Xe=Ee,ft=le.FileIndex[0],He=1;He<le.FullPaths.length;++He)if(Xe=le.FullPaths[He].slice(Ee.length),ft=le.FileIndex[He],!(!ft.size||!ft.content||Xe=="�Sh33tJ5")){Xe=Xe.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF]/g,function(hn){return"_x"+hn.charCodeAt(0).toString(16)+"_"}).replace(/[\u0080-\uFFFF]/g,function(hn){return"_u"+hn.charCodeAt(0).toString(16)+"_"});for(var Qe=ft.content,Ze=Wr&&Buffer.isBuffer(Qe)?Qe.toString("binary"):se(Qe),kt=0,zt=Math.min(1024,Ze.length),Xt=0,Ot=0;Ot<=zt;++Ot)(Xt=Ze.charCodeAt(Ot))>=32&&Xt<128&&++kt;var Kt=kt>=zt*4/5;ye.push(pe),ye.push("Content-Location: "+(he.root||"file:///C:/SheetJS/")+Xe),ye.push("Content-Transfer-Encoding: "+(Kt?"quoted-printable":"base64")),ye.pu
1274sh("Content-Type: "+Zr(ft,Xe)),ye.push(""),ye.push(Kt?_n(Ze):rn(Ze))}return ye.push(pe+`--\r 1275`),ye.join(`\r 1276`)}function Or(le){var ve={};return k(ve,le),ve}function br(le,ve,he,pe){var ye=pe&&pe.unsafe;ye||k(le);var Ee=!ye&&_i.find(le,ve);if(!Ee){var Xe=le.FullPaths[0];ve.slice(0,Xe.length)==Xe?Xe=ve:(Xe.slice(-1)!="/"&&(Xe+="/"),Xe=(Xe+ve).replace("//","/")),Ee={name:i(ve),type:2},le.FileIndex.push(Ee),le.FullPaths.push(Xe),ye||_i.utils.cfb_gc(le)}return Ee.content=he,Ee.size=he?he.length:0,pe&&(pe.CLSID&&(Ee.clsid=pe.CLSID),pe.mt&&(Ee.mt=pe.mt),pe.ct&&(Ee.ct=pe.ct)),Ee}function fi(le,ve){k(le);var he=_i.find(le,ve);if(he){for(var pe=0;pe<le.FileIndex.length;++pe)if(le.FileIndex[pe]==he)return le.FileIndex.splice(pe,1),le.FullPaths.splice(pe,1),!0}return!1}function zi(le,ve,he){k(le);var pe=_i.find(le,ve);if(pe){for(var ye=0;ye<le.FileIndex.length;++ye)if(le.FileIndex[ye]==pe)return le.FileIndex[ye].name=i(he),le.FullPaths[ye]=he,!0}return!1}function Gi(le){R(le,!0)}return t.find=V,t.read=A,t.parse=d,t.write=H,t.writeFile=ne,t.utils={cfb_new:Or,cfb_add:br,cfb_del:fi,cfb_mov:zi,cfb_gc:Gi,ReadShift:u2,CheckField:Owe,prep_blob:Dl,bconcat:Ga,use_zlib:L,_deflateRaw:Ut,_inflateRaw:$t,consts:te},t})();function bSt(e){return typeof e=="string"?L4(e):Array.isArray(e)?W2t(e):e}function oC(e,t,n){if(typeof Deno<"u"){if(n&&typeof t=="string")switch(n){case"utf8":t=new TextEncoder(n).encode(t);break;case"binary":t=L4(t);break;default:throw new Error("Unsupported encoding "+n)}return Deno.writeFileSync(e,t)}var r=n=="utf8"?US(t):t;if(typeof IE_SaveFile<"u")return IE_SaveFile(r,e);if(typeof Blob<"u"){var i=new Blob([bSt(r)],{type:"application/octet-stream"});if(typeof navigator<"u"&&navigator.msSaveBlob)return navigator.msSaveBlob(i,e);if(typeof saveAs<"u")return saveAs(i,e);if(typeof URL<"u"&&typeof document<"u"&&document.createElement&&URL.createObjectURL){var s=URL.createObjectURL(i);if(typeof chrome=="object"&&typeof(chrome.downloads||{}).download=="function")return URL.revokeObjectURL&&typeof setTimeout<"u"&&setTimeout(function(){URL.revokeObjectURL(s)},6e4),chrome.downloads.download({url:s,filename:e,saveAs:!0});var a=document.createElement("a");if(a.download!=null)return a.download=e,a.href=s,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL&&typeof setTimeout<"u"&&setTimeout(function(){URL.revokeObjectURL(s)},6e4),s}}if(typeof $<"u"&&typeof File<"u"&&typeof Folder<"u")try{var o=File(e);return o.open("w"),o.encoding="binary",Array.isArray(t)&&(t=aC(t)),o.write(t),o.close(),t}catch(c){if(!c.message||!c.message.match(/onstruct/))throw c}throw new Error("cannot save file "+e)}function eo(e){for(var t=Object.keys(e),n=[],r=0;r<t.length;++r)Object.prototype.hasOwnProperty.call(e,t[r])&&n.push(t[r]);return n}function Wne(e,t){for(var n=[],r=eo(e),i=0;i!==r.length;++i)n[e[r[i]][t]]==null&&(n[e[r[i]][t]]=r[i]);return n}function lU(e){for(var t=[],n=eo(e),r=0;r!==n.length;++r)t[e[n[r]]]=n[r];return t}function B4(e){for(var t=[],n=eo(e),r=0;r!==n.length;++r)t[e[n[r]]]=parseInt(n[r],10);return t}function _St(e){for(var t=[],n=eo(e),r=0;r!==n.length;++r)t[e[n[r]]]==null&&(t[e[n[r]]]=[]),t[e[n[r]]].push(n[r]);return t}var nj=new Date(1899,11,30,0,0,0);function xl(e,t){var n=e.getTime(),r=nj.getTime()+(e.getTimezoneOffset()-nj.getTimezoneOffset())*6e4;return(n-r)/(1440*60*1e3)}var gwe=new Date,wSt=nj.getTime()+(gwe.getTimezoneOffset()-nj.getTimezoneOffset())*6e4,Gne=gwe.getTimezoneOffset();function xwe(e){var t=new Date;return t.setTime(e*24*60*60*1e3+wSt),t.getTimezoneOffset()!==Gne&&t.setTime(t.getTime()+(t.getTimezoneOffset()-Gne)*6e4),t}var Kne=new Date("2017-02-19T19:06:09.000Z"),vwe=isNaN(Kne.getFullYear())?new Date("2/19/17"):Kne,SSt=vwe.getFullYear()==2017;function Bo(e,t){var n=new Date(e);if(SSt)return t>0?n.setTime(n.getTime()+n.getTimezoneOffset()*60*1e3):t<0&&n.setTime(n.getTime()-n.getTimezoneOffset()*60*1e3),n;if(e instanceof Date)return e;if(vwe.getFullYear()==1917&&!isNaN(n.getFullYear())){var r=n.getFullYear();return e.indexOf(""+r)>-1||n.setFullYear(n.getFullYear()+100),n}var i=e.match(/\d+/g)||["2017","2","19","0","0","0"],s=new Date(+i[0],+i[1]-1,+i[2],+i[3]||0,+i[4]||0,+i[5]||0);return e.indexOf("Z")>-1&&(s=new Date(s.getTime()-s.getTimezoneOffset()*60*1e3)),s}function U4(e,t){if(Wr&&Buffer.isBuffer(e))return e.toString("binary");if(typeof TextDecoder<"u")try{var n={"â¬":"Â","â":"Â",Æ:"Â","â":"Â","â¦":" ","â ":"Â","â¡":"Â","Ë":"Â","â°":"Â",Å :"Â","â¹":"Â",Å:"Â",Ž:"Â","â":"Â","â":"Â","â":"Â","â":"Â","â¢":"Â","â":"Â","â":"Â","Ë":"Â","â¢":"Â",Å¡:"Â","âº":"Â",Å:"Â",ž:"Â",Ÿ:"Â"};return Array.isArray(e)&&(e=new Uint8Array(e)),new TextDecoder("latin1").decode(e).replace(/[â¬âÆââ¦â â¡Ëâ°Å â¹ÅŽâââââ¢ââËâ¢Å¡âºÅžŸ]/g,function(s){return n[s]||s})}catch{}for(var r=[],i=0;i!=e.length;++i)r.push(String.fromCharCode(e[i]));return r.join("")}function vl(e){if(typeof JSON<"u"&&!Array.isArray(e))return JSON.parse(JSON.stringify(e));if(typeof e!="object"||e==null)return e;if(e instanceof Date)return new Date(e.getTime());var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=vl(e[n]));return t}function _s(e,t){for(var n="";n.length<t;)n+=e;return n}function dh(e){var t=Number(e);if(!isNaN(t))return isFinite(t)?t:NaN;if(!/\d/.test(e))return t;var n=1,r=e.replace(/([\d]),([\d])/g,"$1$2").replace(/[$]/g,"").replace(/[%]/g,function(){return n*=100,""});return!isNaN(t=Number(r))||(r=r.replace(/[(](.*)[)]/,function(i,s){return n=-n,s}),!isNaN(t=Number(r)))?t/n:t}var ESt=["january","february","march","april","may","june","july","august","september","october","november","december"];function BS(e){var t=new Date(e),n=new Date(NaN),r=t.getYear(),i=t.getMonth(),s=t.getDate();if(isNaN(s))return n;var a=e.toLowerCase();if(a.match(/jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec/)){if(a=a.replace(/[^a-z]/g,"").replace(/([^a-z]|^)[ap]m?([^a-z]|$)/,""),a.length>3&&ESt.indexOf(a)==-1)return n}else if(a.match(/[a-z]/))return n;return r<0||r>8099?n:(i>0||s>1)&&r!=101?t:e.match(/[^-0-9:,\/\\]/)?n:t}function rr(e,t,n){if(e.FullPaths){if(typeof n=="string"){var r;return Wr?r=Xh(n):r=G2t(n),_i.utils.cfb_add(e,t,r)}_i.utils.cfb_add(e,t,n)}else e.file(t,n)}function cU(){return _i.utils.cfb_new()}var oa=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r 1277`,CSt={""":'"',"'":"'",">":">","<":"<","&":"&"},uU=lU(CSt),dU=/[&<>'"]/g,TSt=/[\u0000-\u0008\u000b-\u001f]/g;function li(e){var t=e+"";return t.replace(dU,function(n){return uU[n]}).replace(TSt,function(n){return"_x"+("000"+n.charCodeAt(0).toString(16)).slice(-4)+"_"})}function Yne(e){return li(e).replace(/ /g,"_x0020_")}var ywe=/[\u0000-\u001f]/g;function ASt(e){var t=e+"";return t.replace(dU,function(n){return uU[n]}).replace(/\n/g,"<br/>").replace(ywe,function(n){return"&#x"+("000"+n.charCodeAt(0).toString(16)).slice(-4)+";"})}function kSt(e){var t=e+"";return t.replace(dU,function(n){return uU[n]}).replace(ywe,function(n){return"&#x"+n.charCodeAt(0).toString(16).toUpperCase()+";"})}function NSt(e){return e.replace(/(\r\n|[\r\n])/g," ")}function jSt(e){switch(e){case 1:case!0:case"1":case"true":case"TRUE":return!0;default:return!1}}function nD(e){for(var t="",n=0,r=0,i=0,s=0,a=0,o=0;n<e.length;){if(r=e.charCodeAt(n++),r<128){t+=String.fromCharCode(r);continue}if(i=e.charCodeAt(n++),r>
vendor: 14,646 bytes, lines 1277-1278
1277191&&r<224){a=(r&31)<<6,a|=i&63,t+=String.fromCharCode(a);continue}if(s=e.charCodeAt(n++),r<240){t+=String.fromCharCode((r&15)<<12|(i&63)<<6|s&63);continue}a=e.charCodeAt(n++),o=((r&7)<<18|(i&63)<<12|(s&63)<<6|a&63)-65536,t+=String.fromCharCode(55296+(o>>>10&1023)),t+=String.fromCharCode(56320+(o&1023))}return t}function Xne(e){var t=ex(2*e.length),n,r,i=1,s=0,a=0,o;for(r=0;r<e.length;r+=i)i=1,(o=e.charCodeAt(r))<128?n=o:o<224?(n=(o&31)*64+(e.charCodeAt(r+1)&63),i=2):o<240?(n=(o&15)*4096+(e.charCodeAt(r+1)&63)*64+(e.charCodeAt(r+2)&63),i=3):(i=4,n=(o&7)*262144+(e.charCodeAt(r+1)&63)*4096+(e.charCodeAt(r+2)&63)*64+(e.charCodeAt(r+3)&63),n-=65536,a=55296+(n>>>10&1023),n=56320+(n&1023)),a!==0&&(t[s++]=a&255,t[s++]=a>>>8,a=0),t[s++]=n%256,t[s++]=n>>>8;return t.slice(0,s).toString("ucs2")}function Qne(e){return Xh(e,"binary").toString("utf8")}var qA="foo bar bazâÂÂð£",c2=Wr&&(Qne(qA)==nD(qA)&&Qne||Xne(qA)==nD(qA)&&Xne)||nD,US=Wr?function(e){return Xh(e,"utf8").toString("binary")}:function(e){for(var t=[],n=0,r=0,i=0;n<e.length;)switch(r=e.charCodeAt(n++),!0){case r<128:t.push(String.fromCharCode(r));break;case r<2048:t.push(String.fromCharCode(192+(r>>6))),t.push(String.fromCharCode(128+(r&63)));break;case(r>=55296&&r<57344):r-=55296,i=e.charCodeAt(n++)-56320+(r<<10),t.push(String.fromCharCode(240+(i>>18&7))),t.push(String.fromCharCode(144+(i>>12&63))),t.push(String.fromCharCode(128+(i>>6&63))),t.push(String.fromCharCode(128+(i&63)));break;default:t.push(String.fromCharCode(224+(r>>12))),t.push(String.fromCharCode(128+(r>>6&63))),t.push(String.fromCharCode(128+(r&63)))}return t.join("")},RSt=(function(){var e=[["nbsp"," "],["middot","·"],["quot",'"'],["apos","'"],["gt",">"],["lt","<"],["amp","&"]].map(function(t){return[new RegExp("&"+t[0]+";","ig"),t[1]]});return function(n){for(var r=n.replace(/^[\t\n\r ]+/,"").replace(/[\t\n\r ]+$/,"").replace(/>\s+/g,">").replace(/\s+</g,"<").replace(/[\t\n\r ]+/g," ").replace(/<\s*[bB][rR]\s*\/?>/g,` 1278`).replace(/<[^>]*>/g,""),i=0;i<e.length;++i)r=r.replace(e[i][0],e[i][1]);return r}})(),bwe=/(^\s|\s$|\n)/;function Ka(e,t){return"<"+e+(t.match(bwe)?' xml:space="preserve"':"")+">"+t+"</"+e+">"}function VS(e){return eo(e).map(function(t){return" "+t+'="'+e[t]+'"'}).join("")}function Bt(e,t,n){return"<"+e+(n!=null?VS(n):"")+(t!=null?(t.match(bwe)?' xml:space="preserve"':"")+">"+t+"</"+e:"/")+">"}function OL(e,t){try{return e.toISOString().replace(/\.\d*/,"")}catch(n){if(t)throw n}return""}function ISt(e,t){switch(typeof e){case"string":var n=Bt("vt:lpwstr",li(e));return n=n.replace(/"/g,"_x0022_"),n;case"number":return Bt((e|0)==e?"vt:i4":"vt:r8",li(String(e)));case"boolean":return Bt("vt:bool",e?"true":"false")}if(e instanceof Date)return Bt("vt:filetime",OL(e));throw new Error("Unable to serialize "+e)}var Ta={CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",CT:"http://schemas.openxmlformats.org/package/2006/content-types",RELS:"http://schemas.openxmlformats.org/package/2006/relationships",TCMNT:"http://schemas.microsoft.com/office/spreadsheetml/2018/threadedcomments",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes",xsi:"http://www.w3.org/2001/XMLSchema-instance",xsd:"http://www.w3.org/2001/XMLSchema"},pb=["http://schemas.openxmlformats.org/spreadsheetml/2006/main","http://purl.oclc.org/ooxml/spreadsheetml/main","http://schemas.microsoft.com/office/excel/2006/main","http://schemas.microsoft.com/office/excel/2006/2"],zl={o:"urn:schemas-microsoft-com:office:office",x:"urn:schemas-microsoft-com:office:excel",ss:"urn:schemas-microsoft-com:office:spreadsheet",dt:"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882",mv:"http://macVmlSchemaUri",v:"urn:schemas-microsoft-com:vml",html:"http://www.w3.org/TR/REC-html40"};function OSt(e,t){for(var n=1-2*(e[t+7]>>>7),r=((e[t+7]&127)<<4)+(e[t+6]>>>4&15),i=e[t+6]&15,s=5;s>=0;--s)i=i*256+e[t+s];return r==2047?i==0?n*(1/0):NaN:(r==0?r=-1022:(r-=1023,i+=Math.pow(2,52)),n*Math.pow(2,r-52)*i)}function PSt(e,t,n){var r=(t<0||1/t==-1/0?1:0)<<7,i=0,s=0,a=r?-t:t;isFinite(a)?a==0?i=s=0:(i=Math.floor(Math.log(a)/Math.LN2),s=a*Math.pow(2,52-i),i<=-1023&&(!isFinite(s)||s<Math.pow(2,52))?i=-1022:(s-=Math.pow(2,52),i+=1023)):(i=2047,s=isNaN(t)?26985:0);for(var o=0;o<=5;++o,s/=256)e[n+o]=s&255;e[n+6]=(i&15)<<4|s&15,e[n+7]=i>>4|r}var Zne=function(e){for(var t=[],n=10240,r=0;r<e[0].length;++r)if(e[0][r])for(var i=0,s=e[0][r].length;i<s;i+=n)t.push.apply(t,e[0][r].slice(i,i+n));return t},Jne=Wr?function(e){return e[0].length>0&&Buffer.isBuffer(e[0][0])?Buffer.concat(e[0].map(function(t){return Buffer.isBuffer(t)?t:Xh(t)})):Zne(e)}:Zne,ere=function(e,t,n){for(var r=[],i=t;i<n;i+=2)r.push(String.fromCharCode(Sw(e,i)));return r.join("").replace(l2,"")},fU=Wr?function(e,t,n){return Buffer.isBuffer(e)?e.toString("utf16le",t,n).replace(l2,""):ere(e,t,n)}:ere,tre=function(e,t,n){for(var r=[],i=t;i<t+n;++i)r.push(("0"+e[i].toString(16)).slice(-2));return r.join("")},_we=Wr?function(e,t,n){return Buffer.isBuffer(e)?e.toString("hex",t,t+n):tre(e,t,n)}:tre,nre=function(e,t,n){for(var r=[],i=t;i<n;i++)r.push(String.fromCharCode(Jv(e,i)));return r.join("")},lC=Wr?function(t,n,r){return Buffer.isBuffer(t)?t.toString("utf8",n,r):nre(t,n,r)}:nre,wwe=function(e,t){var n=$l(e,t);return n>0?lC(e,t+4,t+4+n-1):""},Swe=wwe,Ewe=function(e,t){var n=$l(e,t);return n>0?lC(e,t+4,t+4+n-1):""},Cwe=Ewe,Twe=function(e,t){var n=2*$l(e,t);return n>0?lC(e,t+4,t+4+n-1):""},Awe=Twe,kwe=function(t,n){var r=$l(t,n);return r>0?fU(t,n+4,n+4+r):""},Nwe=kwe,jwe=function(e,t){var n=$l(e,t);return n>0?lC(e,t+4,t+4+n):""},Rwe=jwe,Iwe=function(e,t){return OSt(e,t)},rj=Iwe,hU=function(t){return Array.isArray(t)||typeof Uint8Array<"u"&&t instanceof Uint8Array};Wr&&(Swe=function(t,n){if(!Buffer.isBuffer(t))return wwe(t,n);var r=t.readUInt32LE(n);return r>0?t.toString("utf8",n+4,n+4+r-1):""},Cwe=function(t,n){if(!Buffer.isBuffer(t))return Ewe(t,n);var r=t.readUInt32LE(n);return r>0?t.toString("utf8",n+4,n+4+r-1):""},Awe=function(t,n){if(!Buffer.isBuffer(t))return Twe(t,n);var r=2*t.readUInt32LE(n);return t.toString("utf16le",n+4,n+4+r-1)},Nwe=function(t,n){if(!Buffer.isBuffer(t))return kwe(t,n);var r=t.readUInt32LE(n);return t.toString("utf16le",n+4,n+4+r)},Rwe=function(t,n){if(!Buffer.isBuffer(t))return jwe(t,n);var r=t.readUInt32LE(n);return t.toString("utf8",n+4,n+4+r)},rj=function(t,n){return Buffer.isBuffer(t)?t.readDoubleLE(n):Iwe(t,n)},hU=function(t){return Buffer.isBuffer(t)||Array.isArray(t)||typeof Uint8Array<"u"&&t instanceof Uint8Array});var Jv=function(e,t){return e[t]},Sw=function(e,t){return e[t+1]*256+e[t]},MSt=function(e,t){var n=e[t+1]*256+e[t];return n<32768?n:(65535-n+1)*-1},$l=function(e,t){return e[t+3]*(1<<24)+(e[t+2]<<16)+(e[t+1]<<8)+e[t]},Yg=function(e,t){return e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]},DSt=function(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]};function u2(e,t){var n="",r,i,s=[],a,o,c,u;switch(t){case"dbcs":if(u=this.l,Wr&&Buffer.isBuffer(this))n=this.slice(this.l,this.l+2*e).toString("utf16le");else for(c=0;c<e;++c)n+=String.fromCharCode(Sw(this,u)),u+=2;e*=2;break;case"utf8":n=lC(this,this.l,this.l+e);break;case"utf16le":e*=2,n=fU(this,this.l,this.l+e);break;case"wstr":return u2.call(this,e,"dbcs");case"lpstr-ansi":n=Swe(this,this.l),e=4+$l(this,this.l);break;case"lpstr-cp":n=Cwe(this,this.l),e=4+$l(this,this.l);break;case"lpwstr":n=Awe(this,this.l),e=4+2*$l(this,this.l);break;case"lpp4":e=4+$l(this,this.l),n=Nwe(this,this.l),e&2&&(e+=2);break;case"8lpp4":e=4+$l(this,this.l),n=Rwe(this,this.l),e&3&&(e+=4-(e&3));break;case"cstr":for(e=0,n="";(a=Jv(this,this.l+e++))!==0;)s.push(UA(a));n=s.join("");break;case"_wstr":for(e=0,n="";(a=Sw(this,this.l+e))!==0;)s.push(UA(a)),e+=2;e+=2,n=s.join("");break;case"dbcs-cont":for(n="",u=this.l,c=0;c<e;++c){if(this.lens&&this.lens.indexOf(u)!==-1)return a=Jv(this,u),this.l=u+1,o=u2.call(this,e-c,a?"dbcs-cont":"sbcs-cont"),s.join("")+o;s.push(UA(Sw(this,u))),u+=2}n=s.join(""),e*=2;break;case"cpstr":case"sbcs-cont":for(n="",u=this.l,c=0;c!=e;++c){if(this.lens&&this.lens.indexOf(u)!==-1)return a=Jv(this,u),this.l=u+1,o=u2.call(this,e-c,a?"dbcs-cont":"sbcs-cont"),s.join("")+o;s.push(UA(Jv(this,u))),u+=1}n=s.join("");break;default:switch(e){case 1:return r=Jv(this,this.l),this.l++,r;case 2:return r=(t==="i"?MSt:Sw)(this,this.l),this.l+=2,r;case 4:case-4:return t==="i"||(this[this.l+3]&128)===0?(r=(e>0?Yg:DSt)(this,this.l),this.l+=4,r):(i=$l(this,this.l),this.l+=4,i);case 8:case-8:if(t==="f")return e==8?i=rj(this,this.l):i=rj([this[this.l+7],this[this.l+6],this[this.l+5],this[this.l+4],this[this.l+3],this[this.l+2],this[this.l+1],this[this.l+0]],0),this.l+=8,i;e=8;case 16:n=_we(this,this.l,e);break}}return this.l+=e,n}var FSt=function(e,t,n){e[n]=t&255,e[n+1]=t>>>8&255,e[n+2]=t>>>16&255,e[n+3]=t>>>24&255},LSt=function(e,t,n){e[n]=t&255,e[n+1]=t>>8&255,e[n+2]=t>>16&255,e[n+3]=t>>24&255},zSt=function(e,t,n){e[n]=t&255,e[n+1]=t>>>8&255};function $St(e,t,n){var r=0,i=0;if(n==="dbcs"){for(i=0;i!=t.length;++i)zSt(this,t.charCodeAt(i),this.l+2*i);r=2*t.length}else if(n==="sbcs"){for(t=t.replace(/[^\x00-\x7F]/g,"_"),i=0;i!=t.length;++i)this[this.l+i]=t.charCodeAt(i)&255;r=t.length}else if(n==="hex"){for(;i<e;++i)this[this.l++]=parseInt(t.slice(2*i,2*i+2),16)||0;return this}else if(n==="utf16le"){var s=Math.min(this.l+e,this.length);for(i=0;i<Math.min(t.length,e);++i){var a=t.charCodeAt(i);this[this.l++]=a&255,this[this.l++]=a>>8}for(;this.l<s;)this[this.l++]=0;return this}else switch(e){case 1:r=1,this[this.l]=t&255;break;case 2:r=2,this[this.l]=t&255,t>>>=8,this[this.l+1]=t&255;break;case 3:r=3,this[this.l]=t&255,t>>>=8,this[this.l+1]=t&255,t>>>=8,this[this.l+2]=t&255;break;case 4:r=4,FSt(this,t,this.l);break;case 8:if(r=8,n==="f"){PSt(this,t,this.l);break}case 16:break;case-4:r=4,LSt(this,t,this.l);break}return this.l+=r,this}function Owe(e,t){var n=_we(this,this.l,e.length>>1);if(n!==e)throw new Error(t+"Expected "+e+" saw "+n);this.l+=e.length>>1}function Dl(e,t){e.l=t,e.read_shift=u2,e.chk=Owe,e.write_shift=$St}function Kd(e,t){e.l+=t}function ut(e){var t=ex(e);return Dl(t,0),t}function hl(){var e=[],t=Wr?256:2048,n=function(u){var d=ut(u);return Dl(d,0),d},r=n(t),i=function(){r&&(r.length>r.l&&(r=r.slice(0,r.l),r.l=r.length),r.length>0&&e.push(r),r=null)},s=function(u){return r&&u<r.length-r.l?r:(i(),r=n(Math.max(u+1,t)))},a=function(){return i(),Ga(e)},o=function(u){i(),r=u,r.l==null&&(r.l=r.length),s(t)};return{next:s,push:o,end:a,_bufs:e}}function Et(e,t,n,r){var i=+t,s;if(!isNaN(i)){r||(r=ONt[i].p||(n||[]).length||0),s=1+(i>=128?1:0)+1,r>=128&&++s,r>=16384&&++s,r>=2097152&&++s;var a=e.next(s);i<=127?a.write_shift(1,i):(a.write_shift(1,(i&127)+128),a.write_shift(1,i>>7));for(var o=0;o!=4;++o)if(r>=128)a.write_shift(1,(r&127)+128),r>>=7;else{a.write_shift(1,r);break}r>0&&hU(n)&&e.push(n)}}function d2(e,t,n){var r=vl(e);if(t.s?(r.cRel&&(r.c+=t.s.c),r.rRel&&(r.r+=t.s.r)):(r.cRel&&(r.c+=t.c),r.rRel&&(r.r+=t.r)),!n||n.biff<12){for(;r.c>=256;)r.c-=256;for(;r.r>=65536;)r.r-=65536}return r}function rre(e,t,n){var r=vl(e);return r.s=d2(r.s,t.s,n),r.e=d2(r.e,t.s,n),r}function f2(e,t){if(e.cRel&&e.c<0)for(e=vl(e);e.c<0;)e.c+=t>8?16384:256;if(e.rRel&&e.r<0)for(e=vl(e);e.r<0;)e.r+=t>8?1048576:t>5?65536:16384;var n=ci(e);return!e.cRel&&e.cRel!=null&&(n=VSt(n)),!e.rRel&&e.rRel!=null&&(n=BSt(n)),n}function rD(e,t){return e.s.r==0&&!e.s.rRel&&e.e.r==(t.biff>=12?1048575:t.biff>=8?65536:16384)&&!e.e.rRel?(e.s.cRel?"":"$")+vo(e.s.c)+":"+(e.e.cRel?"":"$")+vo(e.e.c):e.s.c==0&&!e.s.cRel&&e.e.c==(t.biff>=12?16383:255)&&!e.e.cRel?(e.s.rRel?"":"$")+Za(e.s.r)+":"+(e.e.rRel?"":"$")+Za(e.e.r):f2(e.s,t.biff)+":"+f2(e.e,t.biff)}function pU(e){return parseInt(USt(e),10)-1}function Za(e){return""+(e+1)}function BSt(e){return e.replace(/([A-Z]|^)(\d+)$/,"$1$$$2")}function USt(e){return e.replace(/\$(\d+)$/,"$1")}function mU(e){for(var t=HSt(e),n=0,r=0;r!==t.length;++r)n=26*n+t.charCodeAt(r)-64;return n-1}function vo(e){if(e<0)throw new Error("invalid column "+e);var t="";for(++e;e;e=Math.floor((e-1)/26))t=String.fromCharCode((e-1)%26+65)+t;return t}function VSt(e){return e.replace(/^([A-Z])/,"$$$1")}function HSt(e){return e.replace(/^\$([A-Z])/,"$1")}function qSt(e){return e.replace(/(\$?[A-Z]*)(\$?\d*)/,"$1,$2").split(",")}function Aa(e){for(var t=0,n=0,r=0;r<e.length;++r){var i=e.charCodeAt(r);i>=48&&i<=57?t=10*t+(i-48):i>=65&&i<=90&&(n=26*n+(i-64))}return{c:n-1,r:t-1}}function ci(e){for(var t=e.c+1,n="";t;t=(t-1)/26|0)n=String.fromCharCode((t-1)%26+65)+n;return n+(e.r+1)}function Xl(e){var t=e.indexOf(":");return t==-1?{s:Aa(e),e:Aa(e)}:{s:Aa(e.slice(0,t)),e:Aa(e.slice(t+1))}}function ia(e,t){return typeof t>"u"||typeof t=="number"?ia(e.s,e.e):(typeof e!="string"&&(e=ci(e)),typeof t!="string"&&(t=ci(t)),e==t?e:e+":"+t)}function Hi(e){var t={s:{c:0,r:0},e:{c:0,r:0}},n=0,r=0,i=0,s=e.length;for(n=0;r<s&&!((i=e.charCodeAt(r)-64)<1||i>26);++r)n=26*n+i;for(t.s.c=--n,n=0;r<s&&!((i=e.charCodeAt(r)-48)<0||i>9);++r)n=10*n+i;if(t.s.r=--n,r===s||i!=10)return t.e.c=t.s.c,t.e.r=t.s.r,t;for(++r,n=0;r!=s&&!((i=e.charCodeAt(r)-64)<1||i>26);++r)n=26*n+i;for(t.e.c=--n,n=0;r!=s&&!((i=e.charCodeAt(r)-48)<0||i>9);++r)n=10*n+i;return t.e.r=--n,t}function ire(e,t){var n=e.t=="d"&&t instanceof Date;if(e.z!=null)try{return e.w=km(e.z,n?xl(t):t)}catch{}try{return e.w=km((e.XF||{}).numFmtId||(n?14:0),n?xl(t):t)}catch{return""+t}}function Dh(e,t,n){return e==null||e.t==null||e.t=="z"?"":e.w!==void 0?e.w:(e.t=="d"&&!e.z&&n&&n.dateNF&&(e.z=n.dateNF),e.t=="e"?cC[e.v]||e.v:t==null?ire(e,e.v):ire(e,t))}function Nx(e,t){var n=t&&t.sheet?t.sheet:"Sheet1",r={};return r[n]=e,{SheetNames:[n],Sheets:r}}function Pwe(e,t,n){var r=n||{},i=e?Array.isArray(e):r.dense,s=e||(i?[]:{}),a=0,o=0;if(s&&r.origin!=null){if(typeof r.origin=="number")a=r.origin;else{var c=typeof r.origin=="string"?Aa(r.origin):r.origin;a=c.r,o=c.c}s["!ref"]||(s["!ref"]="A1:A1")}var u={s:{c:1e7,r:1e7},e:{c:0,r:0}};if(s["!ref"]){var d=Hi(s["!ref"]);u.s.c=d.s.c,u.s.r=d.s.r,u.e.c=Math.max(u.e.c,d.e.c),u.e.r=Math.max(u.e.r,d.e.r),a==-1&&(u.e.r=a=d.e.r+1)}for(var h=0;h!=t.length;++h)if(t[h]){if(!Array.isArray(t[h]))throw new Error("aoa_to_sheet expects an array of arrays");for(var p=0;p!=t[h].length;++p)if(!(typeof t[h][p]>"u")){var g={v:t[h][p]},v=a+h,x=o+p;if(u.s.r>v&&(u.s.r=v),u.s.c>
vendor: 4,493 bytes, line 1278
1278x&&(u.s.c=x),u.e.r<v&&(u.e.r=v),u.e.c<x&&(u.e.c=x),t[h][p]&&typeof t[h][p]=="object"&&!Array.isArray(t[h][p])&&!(t[h][p]instanceof Date))g=t[h][p];else if(Array.isArray(g.v)&&(g.f=t[h][p][1],g.v=g.v[0]),g.v===null)if(g.f)g.t="n";else if(r.nullError)g.t="e",g.v=0;else if(r.sheetStubs)g.t="z";else continue;else typeof g.v=="number"?g.t="n":typeof g.v=="boolean"?g.t="b":g.v instanceof Date?(g.z=r.dateNF||Ts[14],r.cellDates?(g.t="d",g.w=km(g.z,xl(g.v))):(g.t="n",g.v=xl(g.v),g.w=km(g.z,g.v))):g.t="s";if(i)s[v]||(s[v]=[]),s[v][x]&&s[v][x].z&&(g.z=s[v][x].z),s[v][x]=g;else{var _=ci({c:x,r:v});s[_]&&s[_].z&&(g.z=s[_].z),s[_]=g}}}return u.s.c<1e7&&(s["!ref"]=ia(u)),s}function mb(e,t){return Pwe(null,e,t)}function WSt(e){return e.read_shift(4,"i")}function ku(e,t){return t||(t=ut(4)),t.write_shift(4,e),t}function yo(e){var t=e.read_shift(4);return t===0?"":e.read_shift(t,"dbcs")}function ka(e,t){var n=!1;return t==null&&(n=!0,t=ut(4+2*e.length)),t.write_shift(4,e.length),e.length>0&&t.write_shift(0,e,"dbcs"),n?t.slice(0,t.l):t}function GSt(e){return{ich:e.read_shift(2),ifnt:e.read_shift(2)}}function KSt(e,t){return t||(t=ut(4)),t.write_shift(2,0),t.write_shift(2,0),t}function gU(e,t){var n=e.l,r=e.read_shift(1),i=yo(e),s=[],a={t:i,h:i};if((r&1)!==0){for(var o=e.read_shift(4),c=0;c!=o;++c)s.push(GSt(e));a.r=s}else a.r=[{ich:0,ifnt:0}];return e.l=n+t,a}function YSt(e,t){var n=!1;return t==null&&(n=!0,t=ut(15+4*e.t.length)),t.write_shift(1,0),ka(e.t,t),n?t.slice(0,t.l):t}var XSt=gU;function QSt(e,t){var n=!1;return t==null&&(n=!0,t=ut(23+4*e.t.length)),t.write_shift(1,1),ka(e.t,t),t.write_shift(4,1),KSt({},t),n?t.slice(0,t.l):t}function Gc(e){var t=e.read_shift(4),n=e.read_shift(2);return n+=e.read_shift(1)<<16,e.l++,{c:t,iStyleRef:n}}function jx(e,t){return t==null&&(t=ut(8)),t.write_shift(-4,e.c),t.write_shift(3,e.iStyleRef||e.s),t.write_shift(1,0),t}function Rx(e){var t=e.read_shift(2);return t+=e.read_shift(1)<<16,e.l++,{c:-1,iStyleRef:t}}function Ix(e,t){return t==null&&(t=ut(4)),t.write_shift(3,e.iStyleRef||e.s),t.write_shift(1,0),t}var ZSt=yo,Mwe=ka;function xU(e){var t=e.read_shift(4);return t===0||t===4294967295?"":e.read_shift(t,"dbcs")}function ij(e,t){var n=!1;return t==null&&(n=!0,t=ut(127)),t.write_shift(4,e.length>0?e.length:4294967295),e.length>0&&t.write_shift(0,e,"dbcs"),n?t.slice(0,t.l):t}var JSt=yo,PL=xU,vU=ij;function Dwe(e){var t=e.slice(e.l,e.l+4),n=t[0]&1,r=t[0]&2;e.l+=4;var i=r===0?rj([0,0,0,0,t[0]&252,t[1],t[2],t[3]],0):Yg(t,0)>>2;return n?i/100:i}function Fwe(e,t){t==null&&(t=ut(4));var n=0,r=0,i=e*100;if(e==(e|0)&&e>=-536870912&&e<1<<29?r=1:i==(i|0)&&i>=-536870912&&i<1<<29&&(r=1,n=1),r)t.write_shift(-4,((n?i:e)<<2)+(n+2));else throw new Error("unsupported RkNumber "+e)}function Lwe(e){var t={s:{},e:{}};return t.s.r=e.read_shift(4),t.e.r=e.read_shift(4),t.s.c=e.read_shift(4),t.e.c=e.read_shift(4),t}function eEt(e,t){return t||(t=ut(16)),t.write_shift(4,e.s.r),t.write_shift(4,e.e.r),t.write_shift(4,e.s.c),t.write_shift(4,e.e.c),t}var Ox=Lwe,gb=eEt;function xb(e){if(e.length-e.l<8)throw"XLS Xnum Buffer underflow";return e.read_shift(8,"f")}function tx(e,t){return(t||ut(8)).write_shift(8,e,"f")}function tEt(e){var t={},n=e.read_shift(1),r=n>>>1,i=e.read_shift(1),s=e.read_shift(2,"i"),a=e.read_shift(1),o=e.read_shift(1),c=e.read_shift(1);switch(e.l++,r){case 0:t.auto=1;break;case 1:t.index=i;var u=uEt[i];u&&(t.rgb=mre(u));break;case 2:t.rgb=mre([a,o,c]);break;case 3:t.theme=i;break}return s!=0&&(t.tint=s>0?s/32767:s/32768),t}function sj(e,t){if(t||(t=ut(8)),!e||e.auto)return t.write_shift(4,0),t.write_shift(4,0),t;e.index!=null?(t.write_shift(1,2),t.write_shift(1,e.index)):e.theme!=null?(t.write_shift(1,6),t.write_shift(1,e.theme)):(t.write_shift(1,5),t.write_shift(1,0));var n=e.tint||0;if(n>0?n*=32767:n<0&&(n*=32768),t.write_shift(2,n),!e.rgb||e.theme!=null)t.write_shift(2,0),t.write_shift(1,0),t.write_shift(1,0);else{var r=e.rgb||"FFFFFF";typeof r=="number"&&(r=("000000"+r.toString(16)).slice(-6)),t.write_shift(1,parseInt(r.slice(0,2),16)),t.write_shift(1,parseInt(r.slice(2,4),16)),t.write_shift(1,parseInt(r.slice(4,6),16)),t.write_shift(1,255)}return t}function nEt(e){var t=e.read_shift(1);e.l++;var n={fBold:t&1,fItalic:t&2,fUnderline:t&4,fStrikeout:t&8,fOutline:t&16,fShadow:t&32,fCondense:t&64,fExtend:t&128};return n}function rEt(e,t){t||(t=ut(2));var n=(e.italic?2:0)|(e.strike?8:0)|(e.outline?16:0)|(e.shadow?32:0)|(e.condense?64:0)|(e.extend?128:0);return t.write_shift(1,n),t.write_shift(1,0),t}
vendor: 8,331 bytes, line 1278
1278var zwe=2,Rl=3,WA=11,aj=19,GA=64,iEt=65,sEt=71,aEt=4108,oEt=4126,Ua=80,sre={1:{n:"CodePage",t:zwe},2:{n:"Category",t:Ua},3:{n:"PresentationFormat",t:Ua},4:{n:"ByteCount",t:Rl},5:{n:"LineCount",t:Rl},6:{n:"ParagraphCount",t:Rl},7:{n:"SlideCount",t:Rl},8:{n:"NoteCount",t:Rl},9:{n:"HiddenCount",t:Rl},10:{n:"MultimediaClipCount",t:Rl},11:{n:"ScaleCrop",t:WA},12:{n:"HeadingPairs",t:aEt},13:{n:"TitlesOfParts",t:oEt},14:{n:"Manager",t:Ua},15:{n:"Company",t:Ua},16:{n:"LinksUpToDate",t:WA},17:{n:"CharacterCount",t:Rl},19:{n:"SharedDoc",t:WA},22:{n:"HyperlinksChanged",t:WA},23:{n:"AppVersion",t:Rl,p:"version"},24:{n:"DigSig",t:iEt},26:{n:"ContentType",t:Ua},27:{n:"ContentStatus",t:Ua},28:{n:"Language",t:Ua},29:{n:"Version",t:Ua},255:{},2147483648:{n:"Locale",t:aj},2147483651:{n:"Behavior",t:aj},1919054434:{}},are={1:{n:"CodePage",t:zwe},2:{n:"Title",t:Ua},3:{n:"Subject",t:Ua},4:{n:"Author",t:Ua},5:{n:"Keywords",t:Ua},6:{n:"Comments",t:Ua},7:{n:"Template",t:Ua},8:{n:"LastAuthor",t:Ua},9:{n:"RevNumber",t:Ua},10:{n:"EditTime",t:GA},11:{n:"LastPrinted",t:GA},12:{n:"CreatedDate",t:GA},13:{n:"ModifiedDate",t:GA},14:{n:"PageCount",t:Rl},15:{n:"WordCount",t:Rl},16:{n:"CharCount",t:Rl},17:{n:"Thumbnail",t:sEt},18:{n:"Application",t:Ua},19:{n:"DocSecurity",t:Rl},255:{},2147483648:{n:"Locale",t:aj},2147483651:{n:"Behavior",t:aj},1919054434:{}};function lEt(e){return e.map(function(t){return[t>>16&255,t>>8&255,t&255]})}var cEt=lEt([0,16777215,16711680,65280,255,16776960,16711935,65535,0,16777215,16711680,65280,255,16776960,16711935,65535,8388608,32768,128,8421376,8388736,32896,12632256,8421504,10066431,10040166,16777164,13434879,6684774,16744576,26316,13421823,128,16711935,16776960,65535,8388736,8388608,32896,255,52479,13434879,13434828,16777113,10079487,16751052,13408767,16764057,3368703,3394764,10079232,16763904,16750848,16737792,6710937,9868950,13158,3381606,13056,3355392,10040064,10040166,3355545,3355443,16777215,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),uEt=vl(cEt),cC={0:"#NULL!",7:"#DIV/0!",15:"#VALUE!",23:"#REF!",29:"#NAME?",36:"#NUM!",42:"#N/A",43:"#GETTING_DATA",255:"#WTF?"},dEt={"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":"workbooks","application/vnd.ms-excel.sheet.macroEnabled.main+xml":"workbooks","application/vnd.ms-excel.sheet.binary.macroEnabled.main":"workbooks","application/vnd.ms-excel.addin.macroEnabled.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":"sheets","application/vnd.ms-excel.worksheet":"sheets","application/vnd.ms-excel.binIndexWs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":"charts","application/vnd.ms-excel.chartsheet":"charts","application/vnd.ms-excel.macrosheet+xml":"macros","application/vnd.ms-excel.macrosheet":"macros","application/vnd.ms-excel.intlmacrosheet":"TODO","application/vnd.ms-excel.binIndexMs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":"dialogs","application/vnd.ms-excel.dialogsheet":"dialogs","application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml":"strs","application/vnd.ms-excel.sharedStrings":"strs","application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":"styles","application/vnd.ms-excel.styles":"styles","application/vnd.openxmlformats-package.core-properties+xml":"coreprops","application/vnd.openxmlformats-officedocument.custom-properties+xml":"custprops","application/vnd.openxmlformats-officedocument.extended-properties+xml":"extprops","application/vnd.openxmlformats-officedocument.customXmlProperties+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.customProperty":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":"comments","application/vnd.ms-excel.comments":"comments","application/vnd.ms-excel.threadedcomments+xml":"threadedcomments","application/vnd.ms-excel.person+xml":"people","application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml":"metadata","application/vnd.ms-excel.sheetMetadata":"metadata","application/vnd.ms-excel.pivotTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.chart+xml":"TODO","application/vnd.ms-office.chartcolorstyle+xml":"TODO","application/vnd.ms-office.chartstyle+xml":"TODO","application/vnd.ms-office.chartex+xml":"TODO","application/vnd.ms-excel.calcChain":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings":"TODO","application/vnd.ms-office.activeX":"TODO","application/vnd.ms-office.activeX+xml":"TODO","application/vnd.ms-excel.attachedToolbars":"TODO","application/vnd.ms-excel.connections":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":"TODO","application/vnd.ms-excel.externalLink":"links","application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml":"links","application/vnd.ms-excel.pivotCacheDefinition":"TODO","application/vnd.ms-excel.pivotCacheRecords":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml":"TODO","application/vnd.ms-excel.queryTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml":"TODO","application/vnd.ms-excel.userNames":"TODO","application/vnd.ms-excel.revisionHeaders":"TODO","application/vnd.ms-excel.revisionLog":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml":"TODO","application/vnd.ms-excel.tableSingleCells":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml":"TODO","application/vnd.ms-excel.slicer":"TODO","application/vnd.ms-excel.slicerCache":"TODO","application/vnd.ms-excel.slicer+xml":"TODO","application/vnd.ms-excel.slicerCache+xml":"TODO","application/vnd.ms-excel.wsSortMap":"TODO","application/vnd.ms-excel.table":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":"TODO","application/vnd.openxmlformats-officedocument.theme+xml":"themes","application/vnd.openxmlformats-officedocument.themeOverride+xml":"TODO","application/vnd.ms-excel.Timeline+xml":"TODO","application/vnd.ms-excel.TimelineCache+xml":"TODO","application/vnd.ms-office.vbaProject":"vba","application/vnd.ms-office.vbaProjectSignature":"TODO","application/vnd.ms-office.volatileDependencies":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml":"TODO","application/vnd.ms-excel.controlproperties+xml":"TODO","application/vnd.openxmlformats-officedocument.model+data":"TODO","application/vnd.ms-excel.Survey+xml":"TODO","application/vnd.openxmlformats-officedocument.drawing+xml":"drawings","application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml":"TODO","application/vnd.openxmlformats-officedocument.vmlDrawing":"TODO","application/vnd.openxmlformats-package.relationships+xml":"rels","application/vnd.openxmlformats-officedocument.oleObject":"TODO","image/png":"TODO",sheet:"js"},KA={workbooks:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",xlsm:"application/vnd.ms-excel.sheet.macroEnabled.main+xml",xlsb:"application/vnd.ms-excel.sheet.binary.macroEnabled.main",xlam:"application/vnd.ms-excel.addin.macroEnabled.main+xml",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml"},strs:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",xlsb:"application/vnd.ms-excel.sharedStrings"}
1278,comments:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml",xlsb:"application/vnd.ms-excel.comments"},sheets:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",xlsb:"application/vnd.ms-excel.worksheet"},charts:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml",xlsb:"application/vnd.ms-excel.chartsheet"},dialogs:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml",xlsb:"application/vnd.ms-excel.dialogsheet"},macros:{xlsx:"application/vnd.ms-excel.macrosheet+xml",xlsb:"application/vnd.ms-excel.macrosheet"},metadata:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml",xlsb:"application/vnd.ms-excel.sheetMetadata"},styles:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",xlsb:"application/vnd.ms-excel.styles"}};function $we(){return{workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],rels:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],calcchains:[],vba:[],drawings:[],metadata:[],people:[],TODO:[],xmlns:""}}function Bwe(e,t){var n=_St(dEt),r=[],i;r[r.length]=oa,r[r.length]=Bt("Types",null,{xmlns:Ta.CT,"xmlns:xsd":Ta.xsd,"xmlns:xsi":Ta.xsi}),r=r.concat([["xml","application/xml"],["bin","application/vnd.ms-excel.sheet.binary.macroEnabled.main"],["vml","application/vnd.openxmlformats-officedocument.vmlDrawing"],["data","application/vnd.openxmlformats-officedocument.model+data"],["bmp","image/bmp"],["png","image/png"],["gif","image/gif"],["emf","image/x-emf"],["wmf","image/x-wmf"],["jpg","image/jpeg"],["jpeg","image/jpeg"],["t
1278if","image/tiff"],["tiff","image/tiff"],["pdf","application/pdf"],["rels","application/vnd.openxmlformats-package.relationships+xml"]].map(function(c){return Bt("Default",null,{Extension:c[0],ContentType:c[1]})}));var s=function(c){e[c]&&e[c].length>0&&(i=e[c][0],r[r.length]=Bt("Override",null,{PartName:(i[0]=="/"?"":"/")+i,ContentType:KA[c][t.bookType]||KA[c].xlsx}))},a=function(c){(e[c]||[]).forEach(function(u){r[r.length]=Bt("Override",null,{PartName:(u[0]=="/"?"":"/")+u,ContentType:KA[c][t.bookType]||KA[c].xlsx})})},o=function(c){(e[c]||[]).forEach(function(u){r[r.length]=Bt("Override",null,{PartName:(u[0]=="/"?"":"/")+u,ContentType:n[c][0]})})};return s("workbooks"),a("sheets"),a("charts"),o("themes"),["strs","styles"].forEach(s),["coreprops","extprops","custprops"].forEach(o),o("vba"),o("comments"),o("threadedcomments"),o("drawings"),a("metadata"),o("people"),r.length>2&&(r[r.length]="</Types>",r[1]=r[1].replace("/>",">")),r.join("")}var zr={WB:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",HLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",VML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",XPATH:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath",XMISS:"http://schemas.microsoft.com/office/2006/relationships/xlExternalLinkPath/xlPathMissing",CMNT:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",CORE_PROP
vendor: 5,629 bytes, lines 1278-1288
1278S:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties",SST:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",STY:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",THEME:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",WS:["http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet","http://purl.oclc.org/ooxml/officeDocument/relationships/worksheet"],DRAW:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",XLMETA:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata",TCMNT:"http://schemas.microsoft.com/office/2017/10/relationships/threadedComment",PEOPLE:"http://schemas.microsoft.com/office/2017/10/relationships/person",VBA:"http://schemas.microsoft.com/office/2006/relationships/vbaProject"};function Uwe(e){var t=e.lastIndexOf("/");return e.slice(0,t+1)+"_rels/"+e.slice(t+1)+".rels"}function U1(e){var t=[oa,Bt("Relationships",null,{xmlns:Ta.RELS})];return eo(e["!id"]).forEach(function(n){t[t.length]=Bt("Relationship",null,e["!id"][n])}),t.length>2&&(t[t.length]="</Relationships>",t[1]=t[1].replace("/>",">")),t.join("")}function si(e,t,n,r,i,s){if(i||(i={}),e["!id"]||(e["!id"]={}),e["!idx"]||(e["!idx"]=1),t<0)for(t=e["!idx"];e["!id"]["rId"+t];++t);if(e["!idx"]=t+1,i.Id="rId"+t,i.Type=r,i.Target=n,[zr.HLINK,zr.XPATH,zr.XMISS].indexOf(i.Type)>-1&&(i.TargetMode="External"),e["!id"][i.Id])throw new Error("Cannot rewrite rId "+t);return e["!id"][i.Id]=i,e[("/"+i.Target).replace("//","/")]=i,t}function fEt(e){var t=[oa];t.push(`<manifest:manifest xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0" manifest:version="1.2"> 1279`),t.push(` <manifest:file-entry manifest:full-path="/" manifest:version="1.2" manifest:media-type="application/vnd.oasis.opendocument.spreadsheet"/> 1280`);for(var n=0;n<e.length;++n)t.push(' <manifest:file-entry manifest:full-path="'+e[n][0]+'" manifest:media-type="'+e[n][1]+`"/> 1281`);return t.push("</manifest:manifest>"),t.join("")}function ore(e,t,n){return[' <rdf:Description rdf:about="'+e+`"> 1282`,' <rdf:type rdf:resource="http://docs.oasis-open.org/ns/office/1.2/meta/'+(n||"odf")+"#"+t+`"/> 1283`,` </rdf:Description> 1284`].join("")}function hEt(e,t){return[' <rdf:Description rdf:about="'+e+`"> 1285`,' <ns0:hasPart xmlns:ns0="http://docs.oasis-open.org/ns/office/1.2/meta/pkg#" rdf:resource="'+t+`"/> 1286`,` </rdf:Description> 1287`].join("")}function pEt(e){var t=[oa];t.push(`<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> 1288`);for(var n=0;n!=e.length;++n)t.push(ore(e[n][0],e[n][1])),t.push(hEt("",e[n][0]));return t.push(ore("","Document","pkg")),t.push("</rdf:RDF>"),t.join("")}function Vwe(){return'<office:document-meta xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xlink="http://www.w3.org/1999/xlink" office:version="1.2"><office:meta><meta:generator>SheetJS '+Q3.version+"</meta:generator></office:meta></office:document-meta>"}var v0=[["cp:category","Category"],["cp:contentStatus","ContentStatus"],["cp:keywords","Keywords"],["cp:lastModifiedBy","LastAuthor"],["cp:lastPrinted","LastPrinted"],["cp:revision","RevNumber"],["cp:version","Version"],["dc:creator","Author"],["dc:description","Comments"],["dc:identifier","Identifier"],["dc:language","Language"],["dc:subject","Subject"],["dc:title","Title"],["dcterms:created","CreatedDate","date"],["dcterms:modified","ModifiedDate","date"]];function iD(e,t,n,r,i){i[e]!=null||t==null||t===""||(i[e]=t,t=li(t),r[r.length]=n?Bt(e,t,n):Ka(e,t))}function Hwe(e,t){var n=t||{},r=[oa,Bt("cp:coreProperties",null,{"xmlns:cp":Ta.CORE_PROPS,"xmlns:dc":Ta.dc,"xmlns:dcterms":Ta.dcterms,"xmlns:dcmitype":Ta.dcmitype,"xmlns:xsi":Ta.xsi})],i={};if(!e&&!n.Props)return r.join("");e&&(e.CreatedDate!=null&&iD("dcterms:created",typeof e.CreatedDate=="string"?e.CreatedDate:OL(e.CreatedDate,n.WTF),{"xsi:type":"dcterms:W3CDTF"},r,i),e.ModifiedDate!=null&&iD("dcterms:modified",typeof e.ModifiedDate=="string"?e.ModifiedDate:OL(e.ModifiedDate,n.WTF),{"xsi:type":"dcterms:W3CDTF"},r,i));for(var s=0;s!=v0.length;++s){var a=v0[s],o=n.Props&&n.Props[a[1]]!=null?n.Props[a[1]]:e?e[a[1]]:null;o===!0?o="1":o===!1?o="0":typeof o=="number"&&(o=String(o)),o!=null&&iD(a[0],o,null,r,i)}return r.length>2&&(r[r.length]="</cp:coreProperties>",r[1]=r[1].replace("/>",">")),r.join("")}var V1=[["Application","Application","string"],["AppVersion","AppVersion","string"],["Company","Company","string"],["DocSecurity","DocSecurity","string"],["Manager","Manager","string"],["HyperlinksChanged","HyperlinksChanged","bool"],["SharedDoc","SharedDoc","bool"],["LinksUpToDate","LinksUpToDate","bool"],["ScaleCrop","ScaleCrop","bool"],["HeadingPairs","HeadingPairs","raw"],["TitlesOfParts","TitlesOfParts","raw"]],qwe=["Worksheets","SheetNames","NamedRanges","DefinedNames","Chartsheets","ChartNames"];function Wwe(e){var t=[],n=Bt;return e||(e={}),e.Application="SheetJS",t[t.length]=oa,t[t.length]=Bt("Properties",null,{xmlns:Ta.EXT_PROPS,"xmlns:vt":Ta.vt}),V1.forEach(function(r){if(e[r[1]]!==void 0){var i;switch(r[2]){case"string":i=li(String(e[r[1]]));break;case"bool":i=e[r[1]]?"true":"false";break}i!==void 0&&(t[t.length]=n(r[0],i))}}),t[t.length]=n("HeadingPairs",n("vt:vector",n("vt:variant","<vt:lpstr>
1288Worksheets</vt:lpstr>")+n("vt:variant",n("vt:i4",String(e.Worksheets))),{size:2,baseType:"variant"})),t[t.length]=n("TitlesOfParts",n("vt:vector",e.SheetNames.map(function(r){return"<vt:lpstr>"+li(r)+"</vt:lpstr>"}).join(""),{size:e.Worksheets,baseType:"lpstr"})),t.length>2&&(t[t.length]="</Properties>",t[1]=t[1].replace("/>",">")),t.join("")}function Gwe(e){var t=[oa,Bt("Properties",null,{xmlns:Ta.CUST_PROPS,"xmlns:vt":Ta.vt})];if(!e)return t.join("");var n=1;return eo(e).forEach(function(i){++n,t[t.length]=Bt("property",ISt(e[i]),{fmtid:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:n,name:li(i)})}),t.length>2&&(t[t.length]="</Properties>",t[1]=t[1].replace("/>",">")),t.join("")}var lre={Title:"Title",Subject:"Subject",Author:"Author",Keywords:"Keywords",Comments:"Description",LastAuthor:"LastAuthor",RevNumber:"Revision",Application:"AppName",LastPrinted:"LastPrinted",CreatedDate:"Created",ModifiedDate:"LastSaved",Category:"Category",Manager:"Manager",Company:"Company",AppVersion:"Version",ContentStatus:"ContentStatus",Identifier:"Identifier",Language:"Language"};function mEt(e,t){var n=[];return eo(lre).map(function(r){for(var i=0;i<v0.length;++i)if(v0[i][1]==r)return v0[i];for(i=0;i<V1.length;++i)if(V1[i][1]==r)return V1[i];throw r}).forEach(function(r){if(e[r[1]]!=null){var i=t&&t.Props&&t.Props[r[1]]!=null?t.Props[r[1]]:e[r[1]];switch(r[2]){case"date":i=new Date(i).toISOString().replace(/\.\d*Z/,"Z");break}typeof i=="number"?i=String(i):i===!0||i===!1?i=i?"1":"0":i instanceof Date&&(i=new Date(i).toISOString().replace(/\.\d*Z/,"")),n.push(Ka(lre[r[1]]||r[1],i))}}),Bt("DocumentProperties",n.join(""),{xmlns:zl.o})}function gEt(e,t){var n=["Worksheets","SheetNames"],r="CustomDocumentProperties",i=[];return e&&eo(e).forEach(function(s){if(Object.prototype.hasOwnProperty.call(e,s)){for(var a=0;a<v0.length;++a)if(s==v0[a][1])return;for(a=0;a<V1.length;++a)if(s==V1[a][1])return;for(a=0;a<n.length;++a)if(s==n[a])return;var o=e[s],c="string";typeof o=="number"?(c="float",o=String(o)):o===!0||o===!1?(c="boolean",o=o?"1":"0"):o=String(o),i.push(Bt(Yne(s),o,{"dt:dt":c}))}}),t&&eo(t).forEach(function(s){if(Object.prototype.hasOwnProperty.call(t,s)&&!(e&&Object.prototype.hasOwnProperty.call(e,s))){var a=t[s],o="string";typeof a=="number"?(o="float",a=String(a)):a===!0||a===!1?(o="boolean",a=a?"1":"0"):a instanceof Date?(o="dateTime.tz",a=a.toISOString()):a=String(a),i.push(Bt(Yne(s),a,{"dt:dt":o}))}}),"<"+r+' xmlns="'+zl.o+'">'+i.join("")+"</"+r+">"}function xEt(e){var t=typeof e=="string"?new Date(Date.parse(e)):e,n=t.getTime()/1e3+11644473600,r=n%Math.pow(2,32),i=(n-r)/Math.pow(2,32);r*=1e7,i*=1e7;var s=r/Math.pow(2,32)|0;s>0&&(r=r%Math.pow(2,32),i+=s);var a=ut(8);return a.write_shift(4,r),a.write_shift(4,i),a}function cre(e,t){var n=ut(4),r=ut(4);switch(n.write_shift(4,e==80?31:e),e){case 3:r.write_shift(-4,t);break;case 5:r=ut(8),r.write_shift(8,t,"f");break;case 11:r.write_shift(4,t?1:0);break;case 64:r=xEt(t);break;case 31:case 80:for(r=ut(4+2*(t.length+1)+(t.length%2?0:2)),r.write_shift(4,t.length+1),r.write_shift(0,t,"dbcs");r.l!=r.length;)r.write_shift(1,0);break;default:throw new Error("TypedPropertyValue unrecognized type "+e+" "+t)}return Ga([n,r])}var Kwe=["CodePage","Thumbnail","_PID_LINKBASE","_PID_HLINKS","SystemIdentifier","FMTID"];function vEt(e){switch(typeof e){case"boolean":return 11;case"number":return(e|0)==e?3:5;case"string":return 31;case"object":if(e instanceof Date)return 64;break}return-1}function ure(e,t,n){var r=ut(8),i=[],s=[],a=8,o=0,c=ut(8),u=ut(8);if(c.write_shift(4,2),c.write_shift(4,1200),u.write_shift(4,1),s.push(c),i.push(u),a+=8+c.length,!t){u=ut(8),u.write_shift(4,0),i.unshift(u);var d=[ut(4)];for(d[0].write_shift(4,e.length),o=0;o<e.length;++o){var h=e[o][0];for(c=ut(8+2*(h.length+1)+(h.length%2?0:2)),c.write_shift(4,o+2),c.write_shift(4,h.length+1),c.write_shift(0,h,"dbcs");c.l!=c.length;)c.write_shift(1,0);d.push(c)}c=Ga(d),s.unshift(c),a+=8+c.length}for(o=0;o<e.length;++o)if(!(t&&!t[e[o][0]])&&!(Kwe.indexOf(e[o][0])>-1||qwe.indexOf(e[o][0])>-1)&&e[o][1]!=null){var p=e[o][1],g=0;if(t){g=+t[e[o][0]];var v=n[g];
vendor: 9,567 bytes, line 1288
1288if(v.p=="version"&&typeof p=="string"){var x=p.split(".");p=(+x[0]<<16)+(+x[1]||0)}c=cre(v.t,p)}else{var _=vEt(p);_==-1&&(_=31,p=String(p)),c=cre(_,p)}s.push(c),u=ut(8),u.write_shift(4,t?g:2+o),i.push(u),a+=8+c.length}var w=8*(s.length+1);for(o=0;o<s.length;++o)i[o].write_shift(4,w),w+=s[o].length;return r.write_shift(4,a),r.write_shift(4,s.length),Ga([r].concat(i).concat(s))}function dre(e,t,n,r,i,s){var a=ut(i?68:48),o=[a];a.write_shift(2,65534),a.write_shift(2,0),a.write_shift(4,842412599),a.write_shift(16,_i.utils.consts.HEADER_CLSID,"hex"),a.write_shift(4,i?2:1),a.write_shift(16,t,"hex"),a.write_shift(4,i?68:48);var c=ure(e,n,r);if(o.push(c),i){var u=ure(i,null,null);a.write_shift(16,s,"hex"),a.write_shift(4,68+c.length),o.push(u)}return Ga(o)}function yEt(e,t){t||(t=ut(e));for(var n=0;n<e;++n)t.write_shift(1,0);return t}function bEt(e,t){return e.read_shift(t)===1}function Po(e,t){return t||(t=ut(2)),t.write_shift(2,+!!e),t}function Ywe(e){return e.read_shift(2,"u")}function xc(e,t){return t||(t=ut(2)),t.write_shift(2,e),t}function Xwe(e,t,n){return n||(n=ut(2)),n.write_shift(1,t=="e"?+e:+!!e),n.write_shift(1,t=="e"?1:0),n}function Qwe(e,t,n){var r=e.read_shift(n&&n.biff>=12?2:1),i="sbcs-cont";if(n&&n.biff>=8,!n||n.biff==8){var s=e.read_shift(1);s&&(i="dbcs-cont")}else n.biff==12&&(i="wstr");n.biff>=2&&n.biff<=5&&(i="cpstr");var a=r?e.read_shift(r,i):"";return a}function _Et(e){var t=e.t||"",n=ut(3);n.write_shift(2,t.length),n.write_shift(1,1);var r=ut(2*t.length);r.write_shift(2*t.length,t,"utf16le");var i=[n,r];return Ga(i)}function wEt(e,t,n){var r;if(n){if(n.biff>=2&&n.biff<=5)return e.read_shift(t,"cpstr");if(n.biff>=12)return e.read_shift(t,"dbcs-cont")}var i=e.read_shift(1);return i===0?r=e.read_shift(t,"sbcs-cont"):r=e.read_shift(t,"dbcs-cont"),r}function SEt(e,t,n){var r=e.read_shift(n&&n.biff==2?1:2);return r===0?(e.l++,""):wEt(e,r,n)}function EEt(e,t,n){if(n.biff>5)return SEt(e,t,n);var r=e.read_shift(1);return r===0?(e.l++,""):e.read_shift(r,n.biff<=4||!e.lens?"cpstr":"sbcs-cont")}function Zwe(e,t,n){return n||(n=ut(3+2*e.length)),n.write_shift(2,e.length),n.write_shift(1,1),n.write_shift(31,e,"utf16le"),n}function fre(e,t){t||(t=ut(6+e.length*2)),t.write_shift(4,1+e.length);for(var n=0;n<e.length;++n)t.write_shift(2,e.charCodeAt(n));return t.write_shift(2,0),t}function CEt(e){var t=ut(512),n=0,r=e.Target;r.slice(0,7)=="file://"&&(r=r.slice(7));var i=r.indexOf("#"),s=i>-1?31:23;switch(r.charAt(0)){case"#":s=28;break;case".":s&=-3;break}t.write_shift(4,2),t.write_shift(4,s);var a=[8,6815827,6619237,4849780,83];for(n=0;n<a.length;++n)t.write_shift(4,a[n]);if(s==28)r=r.slice(1),fre(r,t);else if(s&2){for(a="e0 c9 ea 79 f9 ba ce 11 8c 82 00 aa 00 4b a9 0b".split(" "),n=0;n<a.length;++n)t.write_shift(1,parseInt(a[n],16));var o=i>-1?r.slice(0,i):r;for(t.write_shift(4,2*(o.length+1)),n=0;n<o.length;++n)t.write_shift(2,o.charCodeAt(n));t.write_shift(2,0),s&8&&fre(i>-1?r.slice(i+1):"",t)}else{for(a="03 03 00 00 00 00 00 00 c0 00 00 00 00 00 00 46".split(" "),n=0;n<a.length;++n)t.write_shift(1,parseInt(a[n],16));for(var c=0;r.slice(c*3,c*3+3)=="../"||r.slice(c*3,c*3+3)=="..\\";)++c;for(t.write_shift(2,c),t.write_shift(4,r.length-3*c+1),n=0;n<r.length-3*c;++n)t.write_shift(1,r.charCodeAt(n+3*c)&255);for(t.write_shift(1,0),t.write_shift(2,65535),t.write_shift(2,57005),n=0;n<6;++n)t.write_shift(4,0)}return t.slice(0,t.l)}function nx(e,t,n,r){return r||(r=ut(6)),r.write_shift(2,e),r.write_shift(2,t),r.write_shift(2,n||0),r}function TEt(e,t,n){var r=n.biff>8?4:2,i=e.read_shift(r),s=e.read_shift(r,"i"),a=e.read_shift(r,"i");return[i,s,a]}function AEt(e){var t=e.read_shift(2),n=e.read_shift(2),r=e.read_shift(2),i=e.read_shift(2);return{s:{c:r,r:t},e:{c:i,r:n}}}function Jwe(e,t){return t||(t=ut(8)),t.write_shift(2,e.s.r),t.write_shift(2,e.e.r),t.write_shift(2,e.s.c),t.write_shift(2,e.e.c),t}function yU(e,t,n){var r=1536,i=16;switch(n.bookType){case"biff8":break;case"biff5":r=1280,i=8;break;case"biff4":r=4,i=6;break;case"biff3":r=3,i=6;break;case"biff2":r=2,i=4;break;case"xla":break;default:throw new Error("unsupported BIFF version")}var s=ut(i);return s.write_shift(2,r),s.write_shift(2,t),i>4&&s.write_shift(2,29282),i>6&&s.write_shift(2,1997),i>8&&(s.write_shift(2,49161),s.write_shift(2,1),s.write_shift(2,1798),s.write_shift(2,0)),s}function kEt(e,t){var n=!t||t.biff==8,r=ut(n?112:54);for(r.write_shift(t.biff==8?2:1,7),n&&r.write_shift(1,0),r.write_shift(4,859007059),r.write_shift(4,5458548|(n?0:536870912));r.l<r.length;)r.write_shift(1,n?0:32);return r}function NEt(e,t){var n=!t||t.biff>=8?2:1,r=ut(8+n*e.name.length);r.write_shift(4,e.pos),r.write_shift(1,e.hs||0),r.write_shift(1,e.dt),r.write_shift(1,e.name.length),t.biff>=8&&r.write_shift(1,1),r.write_shift(n*e.name.length,e.name,t.biff<8?"sbcs":"utf16le");var i=r.slice(0,r.l);return i.l=r.l,i}function jEt(e,t){var n=ut(8);n.write_shift(4,e.Count),n.write_shift(4,e.Unique);for(var r=[],i=0;i<e.length;++i)r[i]=_Et(e[i]);var s=Ga([n].concat(r));return s.parts=[n.length].concat(r.map(function(a){return a.length})),s}function REt(){var e=ut(18);return e.write_shift(2,0),e.write_shift(2,0),e.write_shift(2,29280),e.write_shift(2,17600),e.write_shift(2,56),e.write_shift(2,0),e.write_shift(2,0),e.write_shift(2,1),e.write_shift(2,500),e}function IEt(e){var t=ut(18),n=1718;return e&&e.RTL&&(n|=64),t.write_shift(2,n),t.write_shift(4,0),t.write_shift(4,64),t.write_shift(4,0),t.write_shift(4,0),t}function OEt(e,t){var n=e.name||"Arial",r=t&&t.biff==5,i=r?15+n.length:16+2*n.length,s=ut(i);return s.write_shift(2,e.sz*20),s.write_shift(4,0),s.write_shift(2,400),s.write_shift(4,0),s.write_shift(2,0),s.write_shift(1,n.length),r||s.write_shift(1,1),s.write_shift((r?1:2)*n.length,n,r?"sbcs":"utf16le"),s}function PEt(e,t,n,r){var i=ut(10);return nx(e,t,r,i),i.write_shift(4,n),i}function MEt(e,t,n,r,i){var s=!i||i.biff==8,a=ut(8+ +s+(1+s)*n.length);return nx(e,t,r,a),a.write_shift(2,n.length),s&&a.write_shift(1,1),a.write_shift((1+s)*n.length,n,s?"utf16le":"sbcs"),a}function DEt(e,t,n,r){var i=n&&n.biff==5;r||(r=ut(i?3+t.length:5+2*t.length)),r.write_shift(2,e),r.write_shift(i?1:2,t.length),i||r.write_shift(1,1),r.write_shift((i?1:2)*t.length,t,i?"sbcs":"utf16le");var s=r.length>r.l?r.slice(0,r.l):r;return s.l==null&&(s.l=s.length),s}function FEt(e,t){var n=t.biff==8||!t.biff?4:2,r=ut(2*n+6);return r.write_shift(n,e.s.r),r.write_shift(n,e.e.r+1),r.write_shift(2,e.s.c),r.write_shift(2,e.e.c+1),r.write_shift(2,0),r}function hre(e,t,n,r){var i=n&&n.biff==5;r||(r=ut(i?16:20)),r.write_shift(2,0),e.style?(r.write_shift(2,e.numFmtId||0),r.write_shift(2,65524)):(r.write_shift(2,e.numFmtId||0),r.write_shift(2,t<<4));var s=0;return e.numFmtId>0&&i&&(s|=1024),r.write_shift(4,s),r.write_shift(4,0),i||r.write_shift(4,0),r.write_shift(2,0),r}function LEt(e){var t=ut(8);return t.write_shift(4,0),t.write_shift(2,0),t.write_shift(2,0),t}function zEt(e,t,n,r,i,s){var a=ut(8);return nx(e,t,r,a),Xwe(n,s,a),a}function $Et(e,t,n,r){var i=ut(14);return nx(e,t,r,i),tx(n,i),i}function BEt(e,t,n){if(n.biff<8)return UEt(e,t,n);for(var r=[],i=e.l+t,s=e.read_shift(n.biff>8?4:2);s--!==0;)r.push(TEt(e,n.biff>8?12:6,n));if(e.l!=i)throw new Error("Bad ExternSheet: "+e.l+" != "+i);return r}function UEt(e,t,n){e[e.l+1]==3&&e[e.l]++;var r=Qwe(e,t,n);return r.charCodeAt(0)==3?r.slice(1):r}function VEt(e){var t=ut(2+e.length*8);t.write_shift(2,e.length);for(var n=0;n<e.length;++n)Jwe(e[n],t);return t}function HEt(e){var t=ut(24),n=Aa(e[0]);t.write_shift(2,n.r),t.write_shift(2,n.r),t.write_shift(2,n.c),t.write_shift(2,n.c);for(var r="d0 c9 ea 79 f9 ba ce 11 8c 82 00 aa 00 4b a9 0b".split(" "),i=0;i<16;++i)t.write_shift(1,parseInt(r[i],16));return Ga([t,CEt(e[1])])}function qEt(e){var t=e[1].Tooltip,n=ut(10+2*(t.length+1));n.write_shift(2,2048);var r=Aa(e[0]);n.write_shift(2,r.r),n.write_shift(2,r.r),n.write_shift(2,r.c),n.write_shift(2,r.c);for(var i=0;i<t.length;++i)n.write_shift(2,t.charCodeAt(i));return n.write_shift(2,0),n}function WEt(e){return e||(e=ut(4)),e.write_shift(2,1),e.write_shift(2,1),e}function GEt(e,t,n){if(!n.cellStyles)return Kd(e,t);var r=n&&n.biff>=12?4:2,i=e.read_shift(r),s=e.read_shift(r),a=e.read_shift(r),o=e.read_shift(r),c=e.read_shift(2);r==2&&(e.l+=2);var u={s:i,e:s,w:a,ixfe:o,flags:c};return(n.biff>=5||!n.biff)&&(u.level=c>>8&7),u}function KEt(e,t){var n=ut(12);n.write_shift(2,t),n.write_shift(2,t),n.write_shift(2,e.width*256),n.write_shift(2,0);var r=0;return e.hidden&&(r|=1),n.write_shift(1,r),r=e.level||0,n.write_shift(1,r),n.write_shift(2,0),n}function YEt(e){for(var t=ut(2*e),n=0;n<e;++n)t.write_shift(2,n+1);return t}function XEt(e,t,n){var r=ut(15);return dC(r,e,t),r.write_shift(8,n,"f"),r}function QEt(e,t,n){var r=ut(9);return dC(r,e,t),r.write_shift(2,n),r}var ZEt=(function(){var e={1:437,2:850,3:1252,4:1e4,100:852,101:866,102:865,103:861,104:895,105:620,106:737,107:857,120:950,121:949,122:936,123:932,124:874,125:1255,126:1256,150:10007,151:10029,152:10006,200:1250,201:1251,202:1254,203:1253,0:20127,8:865,9:437,10:850,11:437,13:437,14:850,15:437,16:850,17:437,18:850,19:932,20:850,21:437,22:850,23:865,24:437,25:437,26:850,27:437,28:863,29:850,31:852,34:852,35:852,36:860,37:850,38:866,55:850,64:852,77:936,78:949,79:950,80:874,87:1252,88:1252,89:1252,108:863,134:737,135:852,136:857,204:1257,255:16969},t=lU({1:437,2:850,3:1252,4:1e4,100:852,101:866,102:865,103:861,104:895,105:620,106:737,107:857,120:950,121:949,122:936,123:932,124:874,125:1255,126:1256,150:10007,151:10029,152:10006,200:1250,201:1251,202:1254,203:1253,0:20127});function n(o,c){var u=[],d=ex(1);
vendor: 5,348 bytes, line 1288
1288switch(c.type){case"base64":d=mu(Mh(o));break;case"binary":d=mu(o);break;case"buffer":case"array":d=o;break}Dl(d,0);var h=d.read_shift(1),p=!!(h&136),g=!1,v=!1;switch(h){case 2:break;case 3:break;case 48:g=!0,p=!0;break;case 49:g=!0,p=!0;break;case 131:break;case 139:break;case 140:v=!0;break;case 245:break;default:throw new Error("DBF Unsupported Version: "+h.toString(16))}var x=0,_=521;h==2&&(x=d.read_shift(2)),d.l+=3,h!=2&&(x=d.read_shift(4)),x>1048576&&(x=1e6),h!=2&&(_=d.read_shift(2));var w=d.read_shift(2),S=c.codepage||1252;h!=2&&(d.l+=16,d.read_shift(1),d[d.l]!==0&&(S=e[d[d.l]]),d.l+=1,d.l+=2),v&&(d.l+=36);for(var E=[],T={},N=Math.min(d.length,h==2?521:_-10-(g?264:0)),A=v?32:11;d.l<N&&d[d.l]!=13;)switch(T={},T.name=Z3.utils.decode(S,d.slice(d.l,d.l+A)).replace(/[\u0000\r\n].*$/g,""),d.l+=A,T.type=String.fromCharCode(d.read_shift(1)),h!=2&&!v&&(T.offset=d.read_shift(4)),T.len=d.read_shift(1),h==2&&(T.offset=d.read_shift(2)),T.dec=d.read_shift(1),T.name.length&&E.push(T),h!=2&&(d.l+=v?13:14),T.type){case"B":(!g||T.len!=8)&&c.WTF&&console.log("Skipping "+T.name+":"+T.type);break;case"G":case"P":c.WTF&&console.log("Skipping "+T.name+":"+T.type);break;case"+":case"0":case"@":case"C":case"D":case"F":case"I":case"L":case"M":case"N":case"O":case"T":case"Y":break;default:throw new Error("Unknown Field Type: "+T.type)}if(d[d.l]!==13&&(d.l=_-1),d.read_shift(1)!==13)throw new Error("DBF Terminator not found "+d.l+" "+d[d.l]);d.l=_;var k=0,j=0;for(u[0]=[],j=0;j!=E.length;++j)u[0][j]=E[j].name;for(;x-- >0;){if(d[d.l]===42){d.l+=w;continue}for(++d.l,u[++k]=[],j=0,j=0;j!=E.length;++j){var R=d.slice(d.l,d.l+E[j].len);d.l+=E[j].len,Dl(R,0);var P=Z3.utils.decode(S,R);switch(E[j].type){case"C":P.trim().length&&(u[k][j]=P.replace(/\s+$/,""));break;case"D":P.length===8?u[k][j]=new Date(+P.slice(0,4),+P.slice(4,6)-1,+P.slice(6,8)):u[k][j]=P;break;case"F":u[k][j]=parseFloat(P.trim());break;case"+":case"I":u[k][j]=v?R.read_shift(-4,"i")^2147483648:R.read_shift(4,"i");break;case"L":switch(P.trim().toUpperCase()){case"Y":case"T":u[k][j]=!0;break;case"N":case"F":u[k][j]=!1;break;case"":case"?":break;default:throw new Error("DBF Unrecognized L:|"+P+"|")}break;case"M":if(!p)throw new Error("DBF Unexpected MEMO for type "+h.toString(16));u[k][j]="##MEMO##"+(v?parseInt(P.trim(),10):R.read_shift(4));break;case"N":P=P.replace(/\u0000/g,"").trim(),P&&P!="."&&(u[k][j]=+P||0);break;case"@":u[k][j]=new Date(R.read_shift(-8,"f")-621356832e5);break;case"T":u[k][j]=new Date((R.read_shift(4)-2440588)*864e5+R.read_shift(4));break;case"Y":u[k][j]=R.read_shift(4,"i")/1e4+R.read_shift(4,"i")/1e4*Math.pow(2,32);break;case"O":u[k][j]=-R.read_shift(-8,"f");break;case"B":if(g&&E[j].len==8){u[k][j]=R.read_shift(8,"f");break}case"G":case"P":R.l+=E[j].len;break;case"0":if(E[j].name==="_NullFlags")break;default:throw new Error("DBF Unsupported data type "+E[j].type)}}}if(h!=2&&d.l<d.length&&d[d.l++]!=26)throw new Error("DBF EOF Marker missing "+(d.l-1)+" of "+d.length+" "+d[d.l-1].toString(16));return c&&c.sheetRows&&(u=u.slice(0,c.sheetRows)),c.DBF=E,u}function r(o,c){var u=c||{};u.dateNF||(u.dateNF="yyyymmdd");var d=mb(n(o,u),u);return d["!cols"]=u.DBF.map(function(h){return{wch:h.len,DBF:h}}),delete u.DBF,d}function i(o,c){try{return Nx(r(o,c),c)}catch(u){if(c&&c.WTF)throw u}return{SheetNames:[],Sheets:{}}}var s={B:8,C:250,L:1,D:8,"?":0,"":0};function a(o,c){var u=c||{};if(+u.codepage>=0&&zS(+u.codepage),u.type=="string")throw new Error("Cannot write DBF to JS string");var d=hl(),h=dj(o,{header:1,raw:!0,cellDates:!0}),p=h[0],g=h.slice(1),v=o["!cols"]||[],x=0,_=0,w=0,S=1;for(x=0;x<p.length;++x){if(((v[x]||{}).DBF||{}).name){p[x]=v[x].DBF.name,++w;continue}if(p[x]!=null){if(++w,typeof p[x]=="number"&&(p[x]=p[x].toString(10)),typeof p[x]!="string")throw new Error("DBF Invalid column name "+p[x]+" |"+typeof p[x]+"|");if(p.indexOf(p[x])!==x){for(_=0;_<1024;++_)if(p.indexOf(p[x]+"_"+_)==-1){p[x]+="_"+_;break}}}}var E=Hi(o["!ref"]),T=[],N=[],A=[];for(x=0;x<=E.e.c-E.s.c;++x){var k="",j="",R=0,P=[];for(_=0;_<g.length;++_)g[_][x]!=null&&P.push(g[_][x]);if(P.length==0||p[x]==null){T[x]="?";continue}for(_=0;_<P.length;++_){switch(typeof P[_]){case"number":j="B";break;case"string":j="C";break;case"boolean":j="L";break;case"object":j=P[_]instanceof Date?"D":"C";break;default:j="C"}R=Math.max(R,String(P[_]).length),k=k&&k!=j?"C":j}R>250&&(R=250),j=((v[x]||{}).DBF||{}).type,j=="C"&&v[x].DBF.len>R&&(R=v[x].DBF.len),k=="B"&&j=="N"&&(k="N",A[x]=v[x].DBF.dec,R=v[x].DBF.len),N[x]=k=="C"||j=="N"?R:s[k]||0,S+=N[x],T[x]=k}var V=d.next(32);for(V.write_shift(4,318902576),V.write_shift(4,g.length),V.write_shift(2,296+32*w),V.write_shift(2,S),x=0;x<4;++x)V.write_shift(4,0);for(V.write_shift(4,0|(+t[twe]||3)<<8),x=0,_=0;x<p.length;++x)if(p[x]!=null){var U=d.next(32),G=(p[x].slice(-10)+"\0\0\0\0\0\0\0\0\0\0\0").slice(0,11);U.write_shift(1,G,"sbcs"),U.write_shift(1,T[x]=="?"?"C":T[x],"sbcs"),U.write_shift(4,_),U.write_shift(1,N[x]||s[T[x]]||0),U.write_shift(1,A[x]||0),U.write_shift(1,2),U.write_shift(4,0),U.write_shift(1,0),U.write_shift(4,0),U.write_shift(4,0),_+=N[x]||s[T[x]]||0}var Q=d.next(264);for(Q.write_shift(4,13),x=0;x<65;++x)Q.write_shift(4,0);for(x=0;x<g.length;++x){var Z=d.next(S);for(Z.write_shift(1,0),_=0;_<p.length;++_)if(p[_]!=null)switch(T[_]){case"L":Z.write_shift(1,g[x][_]==null?63:g[x][_]?84:70);break;
1288case"B":Z.write_shift(8,g[x][_]||0,"f");break;case"N":var K="0";for(typeof g[x][_]=="number"&&(K=g[x][_].toFixed(A[_]||0)),w=0;w<N[_]-K.length;++w)Z.write_shift(1,32);Z.write_shift(1,K,"sbcs");break;case"D":g[x][_]?(Z.write_shift(4,("0000"+g[x][_].getFullYear()).slice(-4),"sbcs"),Z.write_shift(2,("00"+(g[x][_].getMonth()+1)).slice(-2),"sbcs"),Z.write_shift(2,("00"+g[x][_].getDate()).slice(-2),"sbcs")):Z.write_shift(8,"00000000","sbcs");break;case"C":var te=String(g[x][_]!=null?g[x][_]:"").slice(0,N[_]);for(Z.write_shift(1,te,"sbcs"),w=0;w<N[_]-te.length;++w)Z.write_shift(1,32);break}}return d.next(1).write_shift(1,26),d.end()}return{to_workbook:i,to_sheet:r,from_sheet:a}})(),JEt=(function(){var e={AA:"Ã",BA:"Ã",CA:"Ã",DA:195,HA:"Ã",JA:197,AE:"Ã",BE:"Ã",CE:"Ã",HE:"Ã",AI:"Ã",BI:"Ã",CI:"Ã",HI:"Ã",AO:"Ã",BO:"Ã",CO:"Ã",DO:213,HO:"Ã",AU:"Ã",BU:"Ã",CU:"Ã",HU:"Ã",Aa:"à ",Ba:"á",Ca:"â",Da:227,Ha:"ä",Ja:229,Ae:"è",Be:"é",Ce:"ê",He:"ë",Ai:"ì",Bi:"Ã",Ci:"î",Hi:"ï",Ao:"ò",Bo:"ó",Co:"ô",Do:245,Ho:"ö",Au:"ù",Bu:"ú",Cu:"û",Hu:"ü",KC:"Ã",Kc:"ç",q:"æ",z:"Å",a:"Ã",j:"Å",DN:209,Dn:241,Hy:255,S:169,c:170,R:174,"B ":180,0:176,1:177,2:178,3:179,5:181,6:182,7:183,Q:185,k:186,b:208,i:216,l:222,s:240,y:248,"!":161,'"':162,"#":163,"(":164,"%":165,"'":167,"H ":168,"+":171,";":187,"<":188,"=":189,">":190,"?":191,"{":223},t=new RegExp("\x1BN("+eo(e).join("|").replace(/\|\|\|/,"|\\||").replace(/([?()+])/g,"\\$1")+"|\\|)","gm"),n=function(p,g){var v=e[g];return typeof v=="number"?Fne(v):v},r=function(p,g,v){var x=g.charCodeAt(0)-32<<4|v.charCodeAt(0)-48;return x==59?p:Fne(x)};e["|"]=254;function i(p,g){switch(g.type){case"base64":return s(Mh(p),g);case"binary":return s(p,g);case"buffer":return s(Wr&&Buffer.isBuffer(p)?p.toString("binary"):aC(p),g);case"array":return s(U4(p),g)}throw new Error("Unrecognized type "+g.type)}function s(p,g){var v=p.split(/[\n\r]+/),x=-1,_=-1,w=0,S=0,E=[],T=[],N=null,A={},k=[],j=[],R=[],P=0,V;for(+g.codepage>=0&&zS(+g.codepage);w!==v.length;++w){P=0;
vendor: 4,399 bytes, lines 1288-1291
1288var U=v[w].trim().replace(/\x1B([\x20-\x2F])([\x30-\x3F])/g,r).replace(t,n),G=U.replace(/;;/g,"\0").split(";").map(function(X){return X.replace(/\u0000/g,";")}),Q=G[0],Z;if(U.length>0)switch(Q){case"ID":break;case"E":break;case"B":break;case"O":break;case"W":break;case"P":G[1].charAt(0)=="P"&&T.push(U.slice(3).replace(/;;/g,";"));break;case"C":var K=!1,te=!1,ne=!1,se=!1,H=-1,O=-1;for(S=1;S<G.length;++S)switch(G[S].charAt(0)){case"A":break;case"X":_=parseInt(G[S].slice(1))-1,te=!0;break;case"Y":for(x=parseInt(G[S].slice(1))-1,te||(_=0),V=E.length;V<=x;++V)E[V]=[];break;case"K":Z=G[S].slice(1),Z.charAt(0)==='"'?Z=Z.slice(1,Z.length-1):Z==="TRUE"?Z=!0:Z==="FALSE"?Z=!1:isNaN(dh(Z))?isNaN(BS(Z).getDate())||(Z=Bo(Z)):(Z=dh(Z),N!==null&&hwe(N)&&(Z=xwe(Z))),K=!0;break;case"E":se=!0;var L=QCt(G[S].slice(1),{r:x,c:_});E[x][_]=[E[x][_],L];break;case"S":ne=!0,E[x][_]=[E[x][_],"S5S"];break;case"G":break;case"R":H=parseInt(G[S].slice(1))-1;break;case"C":O=parseInt(G[S].slice(1))-1;break;default:if(g&&g.WTF)throw new Error("SYLK bad record "+U)}if(K&&(E[x][_]&&E[x][_].length==2?E[x][_][0]=Z:E[x][_]=Z,N=null),ne){if(se)throw new Error("SYLK shared formula cannot have own formula");var M=H>-1&&E[H][O];if(!M||!M[1])throw new Error("SYLK shared formula cannot find base");E[x][_][1]=ZCt(M[1],{r:x-H,c:_-O})}break;case"F":var q=0;for(S=1;S<G.length;++S)switch(G[S].charAt(0)){case"X":_=parseInt(G[S].slice(1))-1,++q;break;case"Y":for(x=parseInt(G[S].slice(1))-1,V=E.length;V<=x;++V)E[V]=[];break;case"M":P=parseInt(G[S].slice(1))/20;break;case"F":break;case"G":break;case"P":N=T[parseInt(G[S].slice(1))];break;case"S":break;case"D":break;case"N":break;case"W":for(R=G[S].slice(1).split(" "),V=parseInt(R[0],10);V<=parseInt(R[1],10);++V)P=parseInt(R[2],10),j[V-1]=P===0?{hidden:!0}:{wch:P},bU(j[V-1]);break;case"C":_=parseInt(G[S].slice(1))-1,j[_]||(j[_]={});break;case"R":x=parseInt(G[S].slice(1))-1,k[x]||(k[x]={}),P>0?(k[x].hpt=P,k[x].hpx=i2e(P)):P===0&&(k[x].hidden=!0);break;default:if(g&&g.WTF)throw new Error("SYLK bad record "+U)}q<1&&(N=null);break;default:if(g&&g.WTF)throw new Error("SYLK bad record "+U)}}return k.length>0&&(A["!rows"]=k),j.length>0&&(A["!cols"]=j),g&&g.sheetRows&&(E=E.slice(0,g.sheetRows)),[E,A]}function a(p,g){var v=i(p,g),x=v[0],_=v[1],w=mb(x,g);return eo(_).forEach(function(S){w[S]=_[S]}),w}function o(p,g){return Nx(a(p,g),g)}function c(p,g,v,x){var _="C;Y"+(v+1)+";X"+(x+1)+";K";switch(p.t){case"n":_+=p.v||0,p.f&&!p.F&&(_+=";E"+wU(p.f,{r:v,c:x}));break;case"b":_+=p.v?"TRUE":"FALSE";break;case"e":_+=p.w||p.v;break;case"d":_+='"'+(p.w||p.v)+'"';break;case"s":_+='"'+p.v.replace(/"/g,"").replace(/;/g,";;")+'"';break}return _}function u(p,g){g.forEach(function(v,x){var _="F;W"+(x+1)+" "+(x+1)+" ";v.hidden?_+="0":(typeof v.width=="number"&&!v.wpx&&(v.wpx=oj(v.width)),typeof v.wpx=="number"&&!v.wch&&(v.wch=lj(v.wpx)),typeof v.wch=="number"&&(_+=Math.round(v.wch))),_.charAt(_.length-1)!=" "&&p.push(_)})}function d(p,g){g.forEach(function(v,x){var _="F;";v.hidden?_+="M0;":v.hpt?_+="M"+20*v.hpt+";":v.hpx&&(_+="M"+20*cj(v.hpx)+";"),_.length>2&&p.push(_+"R"+(x+1))})}function h(p,g){var v=["ID;PWXL;N;E"],x=[],_=Hi(p["!ref"]),w,S=Array.isArray(p),E=`\r 1289`;v.push("P;PGeneral"),v.push("F;P0;DG0G8;M255"),p["!cols"]&&u(v,p["!cols"]),p["!rows"]&&d(v,p["!rows"]),v.push("B;Y"+(_.e.r-_.s.r+1)+";X"+(_.e.c-_.s.c+1)+";D"+[_.s.c,_.s.r,_.e.c,_.e.r].join(" "));for(var T=_.s.r;T<=_.e.r;++T)for(var N=_.s.c;N<=_.e.c;++N){var A=ci({r:T,c:N});w=S?(p[T]||[])[N]:p[A],!(!w||w.v==null&&(!w.f||w.F))&&x.push(c(w,p,T,N))}return v.join(E)+E+x.join(E)+E+"E"+E}return{to_workbook:o,to_sheet:a,from_sheet:h}})(),eCt=(function(){function e(s,a){switch(a.type){case"base64":return t(Mh(s),a);case"binary":return t(s,a);case"buffer":return t(Wr&&Buffer.isBuffer(s)?s.toString("binary"):aC(s),a);case"array":return t(U4(s),a)}throw new Error("Unrecognized type "+a.type)}function t(s,a){for(var o=s.split(` 1290`),c=-1,u=-1,d=0,h=[];d!==o.length;++d){if(o[d].trim()==="BOT"){h[++c]=[],u=0;continue}if(!(c<0)){var p=o[d].trim().split(","),g=p[0],v=p[1];++d;for(var x=o[d]||"";(x.match(/["]/g)||[]).length&1&&d<o.length-1;)x+=` 1291`+o[++d];switch(x=x.trim(),+g){case-1:if(x==="BOT"){h[++c]=[],u=0;continue}else if(x!=="EOD")throw new Error("Unrecognized DIF special command "+x);break;case 0:x==="TRUE"?h[c][u]=!0:x==="FALSE"?h[c][u]=!1:isNaN(dh(v))?isNaN(BS(v).getDate())?h[c][u]=v:h[c][u]=Bo(v):
1291h[c][u]=dh(v),++u;break;case 1:x=x.slice(1,x.length-1),x=x.replace(/""/g,'"'),x&&x.match(/^=".*"$/)&&(x=x.slice(2,-1)),h[c][u++]=x!==""?x:null;break}if(x==="EOD")break}}return a&&a.sheetRows&&(h=h.slice(0,a.sheetRows)),h}function n(s,a){return mb(e(s,a),a)}function r(s,a){return Nx(n(s,a),a)}var i=(function(){var s=function(c,u,d,h,p){c.push(u),c.push(d+","+h),c.push('"'+p.replace(/"/g,'""')+'"')},a=function(c,u,d,h){c.push(u+","+d),c.push(u==1?'"'+h.replace(/"/g,'""')+'"':h)};return function(c){var u=[],d=Hi(c["!ref"]),h,p=Array.isArray(c);s(u,"TABLE",0,1,"sheetjs"),s(u,"VECTORS",0,d.e.r-d.s.r+1,""),s(u,"TUPLES",0,d.e.c-d.s.c+1,""),s(u,"DATA",0,0,"");for(var g=d.s.r;g<=d.e.r;++g){a(u,-1,0,"BOT");for(var v=d.s.c;v<=d.e.c;++v){var x=ci({r:g,c:v});if(h=p?(c[g]||[])[v]:c[x],!h){a(u,1,0,"");continue}switch(h.t){case"n":var _=h.w;!_&&h.v!=null&&(_=h.v),_==null?h.f&&!h.F?a(u,1,0,"="+h.f):a(u,1,0,""):a(u,0,_,"V");break;case"b":a(u,0,h.v?1:0,h.v?"TRUE":"FALSE");break;case"s":a(u,1,0,isNaN(h.v)?h.v:'="'+h.v+'"');break;
vendor: 4,355 bytes, lines 1291-1301
1291case"d":h.w||(h.w=km(h.z||Ts[14],xl(Bo(h.v)))),a(u,0,h.w,"V");break;default:a(u,1,0,"")}}}a(u,-1,0,"EOD");var w=`\r 1292`,S=u.join(w);return S}})();return{to_workbook:r,to_sheet:n,from_sheet:i}})(),e2e=(function(){function e(h){return h.replace(/\\b/g,"\\").replace(/\\c/g,":").replace(/\\n/g,` 1293`)}function t(h){return h.replace(/\\/g,"\\b").replace(/:/g,"\\c").replace(/\n/g,"\\n")}function n(h,p){for(var g=h.split(` 1294`),v=-1,x=-1,_=0,w=[];_!==g.length;++_){var S=g[_].trim().split(":");if(S[0]==="cell"){var E=Aa(S[1]);if(w.length<=E.r)for(v=w.length;v<=E.r;++v)w[v]||(w[v]=[]);switch(v=E.r,x=E.c,S[2]){case"t":w[v][x]=e(S[3]);break;case"v":w[v][x]=+S[3];break;case"vtf":var T=S[S.length-1];case"vtc":switch(S[3]){case"nl":w[v][x]=!!+S[4];break;default:w[v][x]=+S[4];break}S[2]=="vtf"&&(w[v][x]=[w[v][x],T])}}}return p&&p.sheetRows&&(w=w.slice(0,p.sheetRows)),w}function r(h,p){return mb(n(h,p),p)}function i(h,p){return Nx(r(h,p),p)}var s=["socialcalc:version:1.5","MIME-Version: 1.0","Content-Type: multipart/mixed; boundary=SocialCalcSpreadsheetControlSave"].join(` 1295`),a=["--SocialCalcSpreadsheetControlSave","Content-type: text/plain; charset=UTF-8"].join(` 1296`)+` 1297`,o=["# SocialCalc Spreadsheet Control Save","part:sheet"].join(` 1298`),c="--SocialCalcSpreadsheetControlSave--";function u(h){if(!h||!h["!ref"])return"";for(var p=[],g=[],v,x="",_=Xl(h["!ref"]),w=Array.isArray(h),S=_.s.r;S<=_.e.r;++S)for(var E=_.s.c;E<=_.e.c;++E)if(x=ci({r:S,c:E}),v=w?(h[S]||[])[E]:h[x],!(!v||v.v==null||v.t==="z")){switch(g=["cell",x,"t"],v.t){case"s":case"str":g.push(t(v.v));break;case"n":v.f?(g[2]="vtf",g[3]="n",g[4]=v.v,g[5]=t(v.f)):(g[2]="v",g[3]=v.v);break;case"b":g[2]="vt"+(v.f?"f":"c"),g[3]="nl",g[4]=v.v?"1":"0",g[5]=t(v.f||(v.v?"TRUE":"FALSE"));break;case"d":var T=xl(Bo(v.v));g[2]="vtc",g[3]="nd",g[4]=""+T,g[5]=v.w||km(v.z||Ts[14],T);break;case"e":continue}p.push(g.join(":"))}return p.push("sheet:c:"+(_.e.c-_.s.c+1)+":r:"+(_.e.r-_.s.r+1)+":tvf:1"),p.push("valueformat:1:text-wiki"),p.join(` 1299`)}function d(h){return[s,a,o,a,u(h),c].join(` 1300`)}return{to_workbook:i,to_sheet:r,from_sheet:d}})(),tCt=(function(){function e(d,h,p,g,v){v.raw?h[p][g]=d:d===""||(d==="TRUE"?h[p][g]=!0:d==="FALSE"?h[p][g]=!1:isNaN(dh(d))?isNaN(BS(d).getDate())?h[p][g]=d:h[p][g]=Bo(d):h[p][g]=dh(d))}function t(d,h){var p=h||{},g=[];if(!d||d.length===0)return g;for(var v=d.split(/[\r\n]/),x=v.length-1;x>=0&&v[x].length===0;)--x;for(var _=10,w=0,S=0;S<=x;++S)w=v[S].indexOf(" "),w==-1?w=v[S].length:w++,_=Math.max(_,w);for(S=0;S<=x;++S){g[S]=[];var E=0;for(e(v[S].slice(0,_).trim(),g,S,E,p),E=1;E<=(v[S].length-_)/10+1;++E)e(v[S].slice(_+(E-1)*10,_+E*10).trim(),g,S,E,p)}return p.sheetRows&&(g=g.slice(0,p.sheetRows)),g}var n={44:",",9:" ",59:";",124:"|"},r={44:3,9:2,59:1,124:0};function i(d){for(var h={},p=!1,g=0,v=0;g<d.length;++g)(v=d.charCodeAt(g))==34?p=!p:!p&&v in n&&(h[v]=(h[v]||0)+1);v=[];for(g in h)Object.prototype.hasOwnProperty.call(h,g)&&v.push([h[g],g]);if(!v.length){h=r;for(g in h)Object.prototype.hasOwnProperty.call(h,g)&&v.push([h[g],g])}return v.sort(function(x,_){return x[0]-_[0]||r[x[1]]-r[_[1]]}),n[v.pop()[1]]||44}function s(d,h){var p=h||{},g="",v=p.dense?[]:{},x={s:{c:0,r:0},e:{c:0,r:0}};d.slice(0,4)=="sep="?d.charCodeAt(5)==13&&d.charCodeAt(6)==10?(g=d.charAt(4),d=d.slice(7)):d.charCodeAt(5)==13||d.charCodeAt(5)==10?(g=d.charAt(4),d=d.slice(6)):g=i(d.slice(0,1024)):p&&p.FS?g=p.FS:g=i(d.slice(0,1024));var _=0,w=0,S=0,E=0,T=0,N=g.charCodeAt(0),A=!1,k=0,j=d.charCodeAt(0);d=d.replace(/\r\n/mg,` 1301`);var R=p.dateNF!=null?xSt(p.dateNF):null;function P(){var V=d.slice(E,T),U={};if(V.charAt(0)=='"'&&V.charAt(V.length-1)=='"'&&(V=V.slice(1,-1).replace(/""/g,'"')),V.length===0)U.t="z";else if(p.raw)U.t="s",U.v=V;else if(V.trim().length===0)U.t="s",U.v=V;else if(V.charCodeAt(0)==61)V.charCodeAt(1)==34&&V.charCodeAt(V.length-1)==34?(U.t="s",U.v=V.slice(2,-1).replace(/""/g,'"')):JCt(V)?(U.t="n",U.f=V.slice(1)):(U.t="s",U.v=V);else if(V=="TRUE")U.t="b",U.v=!0;else if(V=="FALSE")U.t="b",U.v=!1;else if(!isNaN(S=dh(V)))U.t="n",p.cellText!==!1&&(U.w=V),U.v=S;else if(!isNaN(BS(V).getDate())||R&&V.match(R)){U.z=p.dateNF||Ts[14];var G=0;R&&V.match(R)&&(V=vSt(V,p.dateNF,V.match(R)||[]),G=1),p.cellDates?(U.t="d",U.v=Bo(V,G)):(U.t="n",U.v=xl(Bo(V,G))),p.cellText!==!1&&(U.w=km(U.z,U.v instanceof Date?xl(U.v):U.v)),p.cellNF||delete U.z}else U.t="s",U.v=V;
vendor: 4,233 bytes, lines 1301-1302
1301if(U.t=="z"||(p.dense?(v[_]||(v[_]=[]),v[_][w]=U):v[ci({c:w,r:_})]=U),E=T+1,j=d.charCodeAt(E),x.e.c<w&&(x.e.c=w),x.e.r<_&&(x.e.r=_),k==N)++w;else if(w=0,++_,p.sheetRows&&p.sheetRows<=_)return!0}e:for(;T<d.length;++T)switch(k=d.charCodeAt(T)){case 34:j===34&&(A=!A);break;case N:case 10:case 13:if(!A&&P())break e;break}return T-E>0&&P(),v["!ref"]=ia(x),v}function a(d,h){return!(h&&h.PRN)||h.FS||d.slice(0,4)=="sep="||d.indexOf(" ")>=0||d.indexOf(",")>=0||d.indexOf(";")>=0?s(d,h):mb(t(d,h),h)}function o(d,h){var p="",g=h.type=="string"?[0,0,0,0]:h3t(d,h);switch(h.type){case"base64":p=Mh(d);break;case"binary":p=d;break;case"buffer":h.codepage==65001?p=d.toString("utf8"):h.codepage&&typeof Z3<"u"||(p=Wr&&Buffer.isBuffer(d)?d.toString("binary"):aC(d));break;case"array":p=U4(d);break;case"string":p=d;break;default:throw new Error("Unrecognized type "+h.type)}return g[0]==239&&g[1]==187&&g[2]==191?p=c2(p.slice(3)):h.type!="string"&&h.type!="buffer"&&h.codepage==65001?p=c2(p):h.type=="binary"&&typeof Z3<"u",p.slice(0,19)=="socialcalc:version:"?e2e.to_sheet(h.type=="string"?p:c2(p),h):a(p,h)}function c(d,h){return Nx(o(d,h),h)}function u(d){for(var h=[],p=Hi(d["!ref"]),g,v=Array.isArray(d),x=p.s.r;x<=p.e.r;++x){for(var _=[],w=p.s.c;w<=p.e.c;++w){var S=ci({r:x,c:w});if(g=v?(d[x]||[])[w]:d[S],!g||g.v==null){_.push(" ");continue}for(var E=(g.w||(Dh(g),g.w)||"").slice(0,10);E.length<10;)E+=" ";_.push(E+(w===0?" ":""))}h.push(_.join(""))}return h.join(` 1302`)}return{to_workbook:c,to_sheet:o,from_sheet:u}})(),pre=(function(){function e(L,M,q){if(L){Dl(L,L.l||0);for(var X=q.Enum||H;L.l<L.length;){var J=L.read_shift(2),W=X[J]||X[65535],re=L.read_shift(2),ae=L.l+re,ce=W.f&&W.f(L,re,q);if(L.l=ae,M(ce,W,J))return}}}function t(L,M){switch(M.type){case"base64":return n(mu(Mh(L)),M);case"binary":return n(mu(L),M);case"buffer":case"array":return n(L,M)}throw"Unsupported type "+M.type}function n(L,M){if(!L)return L;var q=M||{},X=q.dense?[]:{},J="Sheet1",W="",re=0,ae={},ce=[],Te=[],fe={s:{r:0,c:0},e:{r:0,c:0}},xe=q.sheetRows||0;if(L[2]==0&&(L[3]==8||L[3]==9)&&L.length>=16&&L[14]==5&&L[15]===108)throw new Error("Unsupported Works 3 for Mac file");if(L[2]==2)q.Enum=H,e(L,function(Se,et,pt){switch(pt){case 0:q.vers=Se,Se>=4096&&(q.qpro=!0);break;case 6:fe=Se;break;case 204:Se&&(W=Se);break;case 222:W=Se;break;case 15:case 51:q.qpro||(Se[1].v=Se[1].v.slice(1));case 13:case 14:case 16:pt==14&&(Se[2]&112)==112&&(Se[2]&15)>1&&(Se[2]&15)<15&&(Se[1].z=q.dateNF||Ts[14],q.cellDates&&(Se[1].t="d",Se[1].v=xwe(Se[1].v))),q.qpro&&Se[3]>re&&(X["!ref"]=ia(fe),ae[J]=X,ce.push(J),X=q.dense?[]:{},fe={s:{r:0,c:0},e:{r:0,c:0}},re=Se[3],J=W||"Sheet"+(re+1),W="");var ie=q.dense?(X[Se[0].r]||[])[Se[0].c]:X[ci(Se[0])];if(ie){ie.t=Se[1].t,ie.v=Se[1].v,Se[1].z!=null&&(ie.z=Se[1].z),Se[1].f!=null&&(ie.f=Se[1].f);break}q.dense?(X[Se[0].r]||(X[Se[0].r]=[]),X[Se[0].r][Se[0].c]=Se[1]):X[ci(Se[0])]=Se[1];break}},q);else if(L[2]==26||L[2]==14)q.Enum=O,L[2]==14&&(q.qpro=!0,L.l=0),e(L,function(Se,et,pt){switch(pt){case 204:J=Se;break;case 22:Se[1].v=Se[1].v.slice(1);case 23:case 24:case 25:case 37:case 39:case 40:if(Se[3]>re&&(X["!ref"]=ia(fe),ae[J]=X,ce.push(J),X=q.dense?[]:{},fe={s:{r:0,c:0},e:{r:0,c:0}},re=Se[3],J="Sheet"+(re+1)),xe>0&&Se[0].r>=xe)break;q.dense?(X[Se[0].r]||(X[Se[0].r]=[]),X[Se[0].r][Se[0].c]=Se[1]):X[ci(Se[0])]=Se[1],fe.e.c<Se[0].c&&(fe.e.c=Se[0].c),fe.e.r<Se[0].r&&(fe.e.r=Se[0].r);break;case 27:Se[14e3]&&(Te[Se[14e3][0]]=Se[14e3][1]);break;case 1537:Te[Se[0]]=Se[1],Se[0]==re&&(J=Se[1]);break}},q);else throw new Error("Unrecognized LOTUS BOF "+L[2]);if(X["!ref"]=ia(fe),ae[W||J]=X,ce.push(W||J),!Te.length)return{SheetNames:ce,Sheets:ae};for(var ke={},Fe=[],tt=0;tt<Te.length;++tt)ae[ce[tt]]?(Fe.push(Te[tt]||ce[tt]),ke[Te[tt]]=ae[Te[tt]]||ae[ce[tt]]):(Fe.push(Te[tt]),ke[Te[tt]]={"!ref":"A1"});return{SheetNames:Fe,Sheets:ke}}function r(L,M){var q=M||{};if(+q.codepage>=0&&zS(+q.codepage),q.type=="string")throw new Error("Cannot write WK1 to JS string");var X=hl(),J=Hi(L["!ref"]),W=Array.isArray(L),re=[];Vt(X,0,s(1030)),Vt(X,6,c(J));for(var ae=Math.min(J.e.r,8191),ce=J.s.r;ce<=ae;++ce)for(var Te=Za(ce),fe=J.s.c;fe<=J.e.c;++fe){ce===J.s.r&&(re[fe]=vo(fe));var xe=re[fe]+Te,ke=W?(L[ce]||[])[fe]:L[xe];
vendor: 1,167 bytes, line 1302
1302if(!(!ke||ke.t=="z"))if(ke.t=="n")(ke.v|0)==ke.v&&ke.v>=-32768&&ke.v<=32767?Vt(X,13,g(ce,fe,ke.v)):Vt(X,14,x(ce,fe,ke.v));else{var Fe=Dh(ke);Vt(X,15,h(ce,fe,Fe.slice(0,239)))}}return Vt(X,1),X.end()}function i(L,M){var q=M||{};if(+q.codepage>=0&&zS(+q.codepage),q.type=="string")throw new Error("Cannot write WK3 to JS string");var X=hl();Vt(X,0,a(L));for(var J=0,W=0;J<L.SheetNames.length;++J)(L.Sheets[L.SheetNames[J]]||{})["!ref"]&&Vt(X,27,se(L.SheetNames[J],W++));var re=0;for(J=0;J<L.SheetNames.length;++J){var ae=L.Sheets[L.SheetNames[J]];if(!(!ae||!ae["!ref"])){for(var ce=Hi(ae["!ref"]),Te=Array.isArray(ae),fe=[],xe=Math.min(ce.e.r,8191),ke=ce.s.r;ke<=xe;++ke)for(var Fe=Za(ke),tt=ce.s.c;tt<=ce.e.c;++tt){ke===ce.s.r&&(fe[tt]=vo(tt));var Se=fe[tt]+Fe,et=Te?(ae[ke]||[])[tt]:ae[Se];if(!(!et||et.t=="z"))if(et.t=="n")Vt(X,23,P(ke,tt,re,et.v));else{var pt=Dh(et);Vt(X,22,k(ke,tt,re,pt.slice(0,239)))}}++re}}return Vt(X,1),X.end()}function s(L){var M=ut(2);return M.write_shift(2,L),M}function a(L){var M=ut(26);M.write_shift(2,4096),M.write_shift(2,4),M.write_shift(4,0);for(var q=0,X=0,J=0,W=0;W<L.SheetNames.length;++W){var re=L.SheetNames[W],ae=L.Sheets[re];
vendor: 10,565 bytes, line 1302
1302if(!(!ae||!ae["!ref"])){++J;var ce=Xl(ae["!ref"]);q<ce.e.r&&(q=ce.e.r),X<ce.e.c&&(X=ce.e.c)}}return q>8191&&(q=8191),M.write_shift(2,q),M.write_shift(1,J),M.write_shift(1,X),M.write_shift(2,0),M.write_shift(2,0),M.write_shift(1,1),M.write_shift(1,2),M.write_shift(4,0),M.write_shift(4,0),M}function o(L,M,q){var X={s:{c:0,r:0},e:{c:0,r:0}};return M==8&&q.qpro?(X.s.c=L.read_shift(1),L.l++,X.s.r=L.read_shift(2),X.e.c=L.read_shift(1),L.l++,X.e.r=L.read_shift(2),X):(X.s.c=L.read_shift(2),X.s.r=L.read_shift(2),M==12&&q.qpro&&(L.l+=2),X.e.c=L.read_shift(2),X.e.r=L.read_shift(2),M==12&&q.qpro&&(L.l+=2),X.s.c==65535&&(X.s.c=X.e.c=X.s.r=X.e.r=0),X)}function c(L){var M=ut(8);return M.write_shift(2,L.s.c),M.write_shift(2,L.s.r),M.write_shift(2,L.e.c),M.write_shift(2,L.e.r),M}function u(L,M,q){var X=[{c:0,r:0},{t:"n",v:0},0,0];return q.qpro&&q.vers!=20768?(X[0].c=L.read_shift(1),X[3]=L.read_shift(1),X[0].r=L.read_shift(2),L.l+=2):(X[2]=L.read_shift(1),X[0].c=L.read_shift(2),X[0].r=L.read_shift(2)),X}function d(L,M,q){var X=L.l+M,J=u(L,M,q);if(J[1].t="s",q.vers==20768){L.l++;var W=L.read_shift(1);return J[1].v=L.read_shift(W,"utf8"),J}return q.qpro&&L.l++,J[1].v=L.read_shift(X-L.l,"cstr"),J}function h(L,M,q){var X=ut(7+q.length);X.write_shift(1,255),X.write_shift(2,M),X.write_shift(2,L),X.write_shift(1,39);for(var J=0;J<X.length;++J){var W=q.charCodeAt(J);X.write_shift(1,W>=128?95:W)}return X.write_shift(1,0),X}function p(L,M,q){var X=u(L,M,q);return X[1].v=L.read_shift(2,"i"),X}function g(L,M,q){var X=ut(7);return X.write_shift(1,255),X.write_shift(2,M),X.write_shift(2,L),X.write_shift(2,q,"i"),X}function v(L,M,q){var X=u(L,M,q);return X[1].v=L.read_shift(8,"f"),X}function x(L,M,q){var X=ut(13);return X.write_shift(1,255),X.write_shift(2,M),X.write_shift(2,L),X.write_shift(8,q,"f"),X}function _(L,M,q){var X=L.l+M,J=u(L,M,q);if(J[1].v=L.read_shift(8,"f"),q.qpro)L.l=X;else{var W=L.read_shift(2);T(L.slice(L.l,L.l+W),J),L.l+=W}return J}function w(L,M,q){var X=M&32768;return M&=-32769,M=(X?L:0)+(M>=8192?M-16384:M),(X?"":"$")+(q?vo(M):Za(M))}var S={51:["FALSE",0],52:["TRUE",0],70:["LEN",1],80:["SUM",69],81:["AVERAGEA",69],82:["COUNTA",69],83:["MINA",69],84:["MAXA",69],111:["T",1]},E=["","","","","","","","","","+","-","*","/","^","=","<>","<=",">=","<",">","","","","","&","","","","","","",""];function T(L,M){Dl(L,0);for(var q=[],X=0,J="",W="",re="",ae="";L.l<L.length;){var ce=L[L.l++];switch(ce){case 0:q.push(L.read_shift(8,"f"));break;case 1:W=w(M[0].c,L.read_shift(2),!0),J=w(M[0].r,L.read_shift(2),!1),q.push(W+J);break;case 2:{var Te=w(M[0].c,L.read_shift(2),!0),fe=w(M[0].r,L.read_shift(2),!1);W=w(M[0].c,L.read_shift(2),!0),J=w(M[0].r,L.read_shift(2),!1),q.push(Te+fe+":"+W+J)}break;case 3:if(L.l<L.length){console.error("WK1 premature formula end");return}break;case 4:q.push("("+q.pop()+")");break;case 5:q.push(L.read_shift(2));break;case 6:{for(var xe="";ce=L[L.l++];)xe+=String.fromCharCode(ce);q.push('"'+xe.replace(/"/g,'""')+'"')}break;case 8:q.push("-"+q.pop());break;case 23:q.push("+"+q.pop());break;case 22:q.push("NOT("+q.pop()+")");break;case 20:case 21:ae=q.pop(),re=q.pop(),q.push(["AND","OR"][ce-20]+"("+re+","+ae+")");break;default:if(ce<32&&E[ce])ae=q.pop(),re=q.pop(),q.push(re+E[ce]+ae);else if(S[ce]){if(X=S[ce][1],X==69&&(X=L[L.l++]),X>q.length){console.error("WK1 bad formula parse 0x"+ce.toString(16)+":|"+q.join("|")+"|");return}var ke=q.slice(-X);q.length-=X,q.push(S[ce][0]+"("+ke.join(",")+")")}else return ce<=7?console.error("WK1 invalid opcode "+ce.toString(16)):ce<=24?console.error("WK1 unsupported op "+ce.toString(16)):ce<=30?console.error("WK1 invalid opcode "+ce.toString(16)):ce<=115?console.error("WK1 unsupported function opcode "+ce.toString(16)):console.error("WK1 unrecognized opcode "+ce.toString(16))}}q.length==1?M[1].f=""+q[0]:console.error("WK1 bad formula parse |"+q.join("|")+"|")}function N(L){var M=[{c:0,r:0},{t:"n",v:0},0];return M[0].r=L.read_shift(2),M[3]=L[L.l++],M[0].c=L[L.l++],M}function A(L,M){var q=N(L);return q[1].t="s",q[1].v=L.read_shift(M-4,"cstr"),q}function k(L,M,q,X){var J=ut(6+X.length);J.write_shift(2,L),J.write_shift(1,q),J.write_shift(1,M),J.write_shift(1,39);for(var W=0;W<X.length;++W){var re=X.charCodeAt(W);J.write_shift(1,re>=128?95:re)}return J.write_shift(1,0),J}function j(L,M){var q=N(L);q[1].v=L.read_shift(2);var X=q[1].v>>1;if(q[1].v&1)switch(X&7){case 0:X=(X>>3)*5e3;break;case 1:X=(X>>3)*500;break;case 2:X=(X>>3)/20;break;case 3:X=(X>>3)/200;break;case 4:X=(X>>3)/2e3;break;case 5:X=(X>>3)/2e4;break;case 6:X=(X>>3)/16;break;case 7:X=(X>>3)/64;break}return q[1].v=X,q}function R(L,M){var q=N(L),X=L.read_shift(4),J=L.read_shift(4),W=L.read_shift(2);if(W==65535)return X===0&&J===3221225472?(q[1].t="e",q[1].v=15):X===0&&J===3489660928?(q[1].t="e",q[1].v=42):q[1].v=0,q;var re=W&32768;return W=(W&32767)-16446,q[1].v=(1-re*2)*(J*Math.pow(2,W+32)+X*Math.pow(2,W)),q}function P(L,M,q,X){var J=ut(14);if(J.write_shift(2,L),J.write_shift(1,q),J.write_shift(1,M),X==0)return J.write_shift(4,0),J.write_shift(4,0),J.write_shift(2,65535),J;var W=0,re=0,ae=0,ce=0;return X<0&&(W=1,X=-X),re=Math.log2(X)|0,X/=Math.pow(2,re-31),ce=X>>>0,(ce&2147483648)==0&&(X/=2,++re,ce=X>>>0),X-=ce,ce|=2147483648,ce>>>=0,X*=Math.pow(2,32),ae=X>>>0,J.write_shift(4,ae),J.write_shift(4,ce),re+=16383+(W?32768:0),J.write_shift(2,re),J}function V(L,M){var q=R(L);return L.l+=M-14,q}function U(L,M){var q=N(L),X=L.read_shift(4);return q[1].v=X>>6,q}function G(L,M){var q=N(L),X=L.read_shift(8,"f");return q[1].v=X,q}function Q(L,M){var q=G(L);return L.l+=M-10,q}function Z(L,M){return L[L.l+M-1]==0?L.read_shift(M,"cstr"):""}function K(L,M){var q=L[L.l++];q>M-1&&(q=M-1);for(var X="";X.length<q;)X+=String.fromCharCode(L[L.l++]);return X}function te(L,M,q){if(!(!q.qpro||M<21)){var X=L.read_shift(1);L.l+=17,L.l+=1,L.l+=2;var J=L.read_shift(M-21,"cstr");return[X,J]}}function ne(L,M){for(var q={},X=L.l+M;L.l<X;){var J=L.read_shift(2);if(J==14e3){for(q[J]=[0,""],q[J][0]=L.read_shift(2);L[L.l];)q[J][1]+=String.fromCharCode(L[L.l]),L.l++;L.l++}}return q}function se(L,M){var q=ut(5+L.length);q.write_shift(2,14e3),q.write_shift(2,M);for(var X=0;X<L.length;++X){var J=L.charCodeAt(X);q[q.l++]=J>127?95:J}return q[q.l++]=0,q}var H={0:{n:"BOF",f:Ywe},1:{n:"EOF"},2:{n:"CALCMODE"},3:{n:"CALCORDER"},4:{n:"SPLIT"},5:{n:"SYNC"},6:{n:"RANGE",f:o},7:{n:"WINDOW1"},8:{n:"COLW1"},9:{n:"WINTWO"},10:{n:"COLW2"},11:{n:"NAME"},12:{n:"BLANK"},13:{n:"INTEGER",f:p},14:{n:"NUMBER",f:v},15:{n:"LABEL",f:d},16:{n:"FORMULA",f:_},24:{n:"TABLE"},25:{n:"ORANGE"},26:{n:"PRANGE"},27:{n:"SRANGE"},28:{n:"FRANGE"},29:{n:"KRANGE1"},32:{n:"HRANGE"},35:{n:"KRANGE2"},36:{n:"PROTEC"},37:{n:"FOOTER"},38:{n:"HEADER"},39:{n:"SETUP"},40:{n:"MARGINS"},41:{n:"LABELFMT"},42:{n:"TITLES"},43:{n:"SHEETJS"},45:{n:"GRAPH"},46:{n:"NGRAPH"},47:{n:"CALCCOUNT"},48:{n:"UNFORMATTED"},49:{n:"CURSORW12"},50:{n:"WINDOW"},51:{n:"STRING",f:d},55:{n:"PASSWORD"},56:{n:"LOCKED"},60:{n:"QUERY"},61:{n:"QUERYNAME"},62:{n:"PRINT"},63:{n:"PRINTNAME"},64:{n:"GRAPH2"},65:{n:"GRAPHNAME"},66:{n:"ZOOM"},67:{n:"SYMSPLIT"},68:{n:"NSROWS"},69:{n:"NSCOLS"},70:{n:"RULER"},71:{n:"NNAME"},72:{n:"ACOMM"},73:{n:"AMACRO"},74:{n:"PARSE"},102:{n:"PRANGES??"},103:{n:"RRANGES??"},104:{n:"FNAME??"},105:{n:"MRANGES??"},204:{n:"SHEETNAMECS",f:Z},222:{n:"SHEETNAMELP",f:K},65535:{n:""}},O={0:{n:"BOF"},1:{n:"EOF"},2:{n:"PASSWORD"},3:{n:"CALCSET"},4:{n:"WINDOWSET"},5:{n:"SHEETCELLPTR"},6:{n:"SHEETLAYOUT"},7:{n:"COLUMNWIDTH"},8:{n:"HIDDENCOLUMN"},9:{n:"USERRANGE"},10:{n:"SYSTEMRANGE"},11:{n:"ZEROFORCE"},12:{n:"SORTKEYDIR"},13:{n:"FILESEAL"},14:{n:"DATAFILLNUMS"},15:{n:"PRINTMAIN"},16:{n:"PRINTSTRING"},17:{n:"GRAPHMAIN"},18:{n:"GRAPHSTRING"},19:{n:"??"},20:{n:"ERRCELL"},21:{n:"NACELL"},22:{n:"LABEL16",f:A},23:{n:"NUMBER17",f:R},24:{n:"NUMBER18",f:j},25:{n:"FORMULA19",f:V},26:{n:"FORMULA1A"},27:{n:"XFORMAT",f:ne},28:{n:"DTLABELMISC"},29:{n:"DTLABELCELL"},30:{n:"GRAPHWINDOW"},31:{n:"CPA"},32:{n:"LPLAUTO"},33:{n:"QUERY"},34:{n:"HIDDENSHEET"},35:{n:"??"},37:{n:"NUMBER25",f:U},38:{n:"??"},39:{n:"NUMBER27",f:G},40:{n:"FORMULA28",f:Q},142:{n:"??"},147:{n:"??"},150:{n:"??"},151:{n:"??"},152:{n:"??"},153:{n:"??"},154:{n:"??"},155:{n:"??"},156:{n:"??"},163:{n:"??"},174:{n:"??"},175:{n:"??"},176:{n:"??"},177:{n:"??"},184:{n:"??"},185:{n:"??"},186:{n:"??"},187:{n:"??"},188:{n:"??"},195:{n:"??"},201:{n:"??"},204:{n:"SHEETNAMECS",f:Z},205:{n:"??"},206:{n:"??"},207:{n:"??"},208:{n:"??"},256:{n:"??"},259:{n:"??"},260:{n:"??"},261:{n:"??"},262:{n:"??"},263:{n:"??"},265:{n:"??"},266:{n:"??"},267:{n:"??"},268:{n:"??"},270:{n:"??"},271:{n:"??"},384:{n:"??"},389:{n:"??"},390:{n:"??"},393:{n:"??"},396:{n:"??"},512:{n:"??"},514:{n:"??"},513:{n:"??"},516:{n:"??"},517:{n:"??"},640:{n:"??"},641:{n:"??"},642:{n:"??"},643:{n:"??"},644:{n:"??"},645:{n:"??"},646:{n:"??"},647:{n:"??"},648:{n:"??"},658:{n:"??"},659:{n:"??"},660:{n:"??"},661:{n:"??"},662:{n:"??"},665:{n:"??"},666:{n:"??"},768:{n:"??"},772:{n:"??"},1537:{n:"SHEETINFOQP",f:te},1600:{n:"??"},1602:{n:"??"},1793:{n:"??"},1794:{n:"??"},1795:{n:"??"},1796:{n:"??"},1920:{n:"??"},2048:{n:"??"},2049:{n:"??"},2052:{n:"??"},2688:{n:"??"},10998:{n:"??"},12849:{n:"??"},28233:{n:"??"},28484:{n:"??"},65535:{n:""}};return{sheet_to_wk1:r,book_to_wk3:i,to_workbook:t}})(),nCt=/^\s|\s$|[\t\n\r]/;function t2e(e,t){if(!t.bookSST)return"";var n=[oa];n[n.length]=Bt("sst",null,{xmlns:pb[0],count:e.Count,uniqueCount:e.Unique});for(var r=0;r!=e.length;++r)if(e[r]!=null){var i=e[r],s="<si>";i.r?s+=i.r:(s+="<t",i.t||(i.t=""),i.t.match(nCt)&&(s+=' xml:space="preserve"'),s+=">"+li(i.t)+"</t>"),s+="</si>",n[n.length]=s}return n.length>2&&(n[n.length]="</sst>",n[1]=n[1].replace("/>",">")),n.join("")}function rCt(e){return[e.read_shift(4),e.read_shift(4)]}function iCt(e,t){return t||(t=ut(8)),t.write_shift(4,e.Count),t.write_shift(4,e.Unique),t}var sCt=YSt;function aCt(e){var t=hl();Et(t,159,iCt(e));for(var n=0;n<e.length;++n)Et(t,19,sCt(e[n]));return Et(t,160),t.end()}function oCt(e){for(var t=[],n=e.split(""),r=0;r<n.length;++r)t[r]=n[r].charCodeAt(0);return t}function n2e(e){var t=0,n,r=oCt(e),i=r.length+1,s,a,o,c,u;for(n=ex(i),n[0]=r.length,s=1;s!=i;++s)n[s]=r[s-1];for(s=i-1;s>=0;--s)a=n[s],o=(t&16384)===0?0:1,c=t<<1&32767,u=o|c,t=u^a;return t^52811}var lCt=(function(){function e(i,s){switch(s.type){case"base64":return t(Mh(i),s);case"binary":return t(i,s);case"buffer":return t(Wr&&Buffer.isBuffer(i)?i.toString("binary"):aC(i),s);case"array":return t(U4(i),s)}throw new Error("Unrecognized type "+s.type)}function t(i,s){var a=s||{},o=a.dense?[]:{},c=i.match(/\\trowd.*?\\row\b/g);
1302if(!c.length)throw new Error("RTF missing table");var u={s:{c:0,r:0},e:{c:0,r:c.length-1}};return c.forEach(function(d,h){Array.isArray(o)&&(o[h]=[]);for(var p=/\\\w+\b/g,g=0,v,x=-1;v=p.exec(d);){switch(v[0]){case"\\cell":var _=d.slice(g,p.lastIndex-v[0].length);if(_[0]==" "&&(_=_.slice(1)),++x,_.length){var w={v:_,t:"s"};Array.isArray(o)?o[h][x]=w:o[ci({r:h,c:x})]=w}break}g=p.lastIndex}x>u.e.c&&(u.e.c=x)}),o["!ref"]=ia(u),o}function n(i,s){return Nx(e(i,s),s)}function r(i){for(var s=["{\\rtf1\\ansi"],a=Hi(i["!ref"]),o,c=Array.isArray(i),u=a.s.r;u<=a.e.r;++u){s.push("\\trowd\\trautofit1");for(var d=a.s.c;d<=a.e.c;++d)s.push("\\cellx"+(d+1));for(s.push("\\pard\\intbl"),d=a.s.c;d<=a.e.c;++d){var h=ci({r:u,c:d});o=c?(i[u]||[])[d]:i[h],!(!o||o.v==null&&(!o.f||o.F))&&(s.push(" "+(o.w||(Dh(o),o.w))),s.push("\\cell"))}s.push("\\pard\\intbl\\row")}return s.join("")+"}"}return{to_workbook:n,to_sheet:e,from_sheet:r}})();function mre(e){for(var t=0,n=1;t!=3;++t)n=n*256+(e[t]>255?255:e[t]<0?0:e[t]);return n.toString(16).toUpperCase().slice(1)}var cCt=6,fh=cCt;function oj(e){return Math.floor((e+Math.round(128/fh)/256)*fh)}function lj(e){return Math.floor((e-5)/fh*100+.5)/100}function ML(e){return Math.round((e*fh+5)/fh*256)/256}function bU(e){e.width?(e.wpx=oj(e.width),e.wch=lj(e.wpx),e.MDW=fh):e.wpx?(e.wch=lj(e.wpx),e.width=ML(e.wch),e.MDW=fh):typeof e.wch=="number"&&(e.width=ML(e.wch),e.wpx=oj(e.width),e.MDW=fh),e.customWidth&&delete e.customWidth}var uCt=96,r2e=uCt;function cj(e){return e*96/r2e}function i2e(e){return e*r2e/96}function dCt(e){var t=["<numFmts>"];return[[5,8],[23,26],[41,44],[50,392]].forEach(function(n){for(var r=n[0];r<=n[1];++r)e[r]!=null&&(t[t.length]=Bt("numFmt",null,{numFmtId:r,formatCode:li(e[r])}))}),t.length===1?"":(t[t.length]="</numFmts>",t[0]=Bt("numFmts",null,{count:t.length-2}).replace("/>",">"),t.join(""))}function fCt(e){var t=[];return t[t.length]=Bt("cellXfs",null),e.forEach(function(n){t[t.length]=Bt("xf",null,n)}),t[t.length]="</cellXfs>",t.length===2?"":(t[0]=Bt("cellXfs",null,{count:t.length-2}).replace("/>",">"),t.join(""))}function s2e(e,t){var n=[oa,Bt("styleSheet",null,{xmlns:pb[0],"xmlns:vt":Ta.vt})],r;return e.SSF&&(r=dCt(e.SSF))!=null&&(n[n.length]=r),n[n.length]='<fonts count="1"><font><sz val="12"/><color theme="1"/><name val="Calibri"/><family val="2"/><scheme val="minor"/></font></fonts>',n[n.length]='<fills count="2"><fill><patternFill patternType="none"/></fill><fill><patternFill patternType="gray125"/></fill></fills>',n[n.length]='<borders count="1"><border><left/><right/><top/><bottom/><diagonal/></border></borders>',n[n.length]='<cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs>',(r=fCt(t.cellXfs))&&(n[n.length]=r),n[n.length]='<cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles>',n[n.length]='<dxfs count="0"/>',n[n.length]='<tableStyles count="0" defaultTableStyle="TableStyleMedium9" defaultPivotStyle="PivotStyleMedium4"/>',n.length>2&&(n[n.length]="</styleSheet>",n[1]=n[1].replace("/>",">")),n.join("")}function hCt(e,t){var n=e.read_shift(2),r=yo(e);return[n,r]}function pCt(e,t,n){n||(n=ut(6+4*t.length)),n.write_shift(2,e),ka(t,n);var r=n.length>n.l?n.slice(0,n.l):n;return n.l==null&&(n.l=n.length),r}function mCt(e,t,n){var r={};r.sz=e.read_shift(2)/20;var i=nEt(e);i.fItalic&&(r.italic=1),i.fCondense&&(r.condense=1),i.fExtend&&(r.extend=1),i.fShadow&&(r.shadow=1),i.fOutline&&(r.outline=1),i.fStrikeout&&(r.strike=1);var s=e.read_shift(2);switch(s===700&&(r.bold=1),e.read_shift(2)){case 1:r.vertAlign="superscript";break;case 2:r.vertAlign="subscript";break}var a=e.read_shift(1);a!=0&&(r.underline=a);var o=e.read_shift(1);o>0&&(r.family=o);var c=e.read_shift(1);switch(c>0&&(r.charset=c),e.l++,r.color=tEt(e),e.read_shift(1)){case 1:r.scheme="major";break;case 2:r.scheme="minor";break}return r.name=yo(e),r}function gCt(e,t){t||(t=ut(153)),t.write_shift(2,e.sz*20),rEt(e,t),t.write_shift(2,e.bold?700:400);var n=0;e.vertAlign=="superscript"?n=1:e.vertAlign=="subscript"&&(n=2),t.write_shift(2,n),t.write_shift(1,e.underline||0),t.write_shift(1,e.family||0),t.write_shift(1,e.charset||0),t.write_shift(1,0),sj(e.color,t);var r=0;return r=2,t.write_shift(1,r),ka(e.name,t),t.length>t.l?t.slice(0,t.l):t}var xCt=["none","solid","mediumGray","darkGray","lightGray","darkHorizontal","dar
1302kVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","gray125","gray0625"],sD,vCt=Kd;function gre(e,t){t||(t=ut(84)),sD||(sD=lU(xCt));var n=sD[e.patternType];n==null&&(n=40),t.write_shift(4,n);var r=0;if(n!=40)for(sj({auto:1},t),sj({auto:1},t);r<12;++r)t.write_shift(4,0);else{for(;r<4;++r)t.write_shift(4,0);for(;r<12;++r)t.write_shift(4,0)}return t.length>t.l?t.slice(0,t.l):t}function yCt(e,t){var n=e.l+t,r=e.read_shift(2),i=e.read_shift(2);return e.l=n,{ixfe:r,numFmtId:i}}function a2e(e,t,n){n||(n=ut(16)),n.write_shift(2,t||0),n.write_shift(2,e.numFmtId||0),n.write_shift(2,0),n.write_shift(2,0),n.write_shift(2,0),n.write_shift(1,0),n.write_shift(1,0);var r=0;return n.write_shift(1,r),n.write_shift(1,0),n.write_shift(1,0),n.write_shift(1,0),n}function V_(e,t){return t||(t=ut(10)),t.write_shift(1,0),t.write_shift(1,0),t.write_shift(4,0),t.write_shift(4,0),t}var bCt=Kd;function _Ct(e,t){return t||(t=ut(51)),t.write_shift(1,0),V_(null,t),V_(null,t),V_(null,t),V_(null,t),V_(null,t),t.length>t.l?t.slice(0,t.l):t}function wCt(e,t){return t||(t=ut(52)),t.write_shift(4,e.xfId),t.write_shift(2,1),t.write_shift(1,0),t.write_shift(1,0),ij(e.name||"",t),t.length>t.l?t.slice(0,t.l):t}function SCt(e,t,n){var r=ut(2052);return r.write_shift(4,e),ij(t,r),ij(n,r),r.length>r.l?r.slice(0,r.l):r}function ECt(e,t){if(t){var n=0;[[5,8],[23,26],[41,44],[50,392]].forEach(function(r){for(var i=r[0];i<=r[1];++i)t[i]!=null&&++n}),n!=0&&(Et(e,615,ku(n)),[[5,8],[23,26],[41,44],[50,392]].forEach(function(r){for(var i=r[0];i<=r[1];++i)t[i]!=null&&Et(e,44,pCt(i,t[i]))}),Et(e,616))}}function CCt(e){var t=1;Et(e,611,ku(t)),Et(e,43,gCt({sz:12,color:{theme:1},name:"Calibri",family:2})),Et(e,612)}function TCt(e){var t=2;Et(e,603,ku(t)),Et(e,45,gre({patternType:"none"})),Et(e,45,gre({patternType:"gray125"})),Et(e,604)}function ACt(e){var t=1;Et(e,613,ku(t)),Et(e,46,_Ct()),Et(e,614)}function kCt(e){var t=1;Et(e,626,ku(t)),Et(e,47,a2e({numFmtId:0},65535)),Et(e,627)}function NCt(e,t){Et(e,617,ku(t.length)),t.forEach(function(n){Et(e,47,a2e(n,0))}),Et(e,618)}function jCt(e){var t=1;Et(e,619,ku(t)),Et(e,48,wCt({xfId:0,name:"Normal"})),Et(e,620)}function RCt(e){var t=0;Et(e,505,ku(t)),Et(e,506)}function ICt(e){var t=0;Et(e,508,SCt(t,"TableStyleMedium9","PivotStyleMedium4")),Et(e,509)}function OCt(e,t){var n=hl();return Et(n,278),ECt(n,e.SSF),CCt(n),TCt(n),ACt(n),kCt(n),NCt(n,t.cellXfs),jCt(n),RCt(n),ICt(n),Et(n,279),n.end()}function o2e(e,t){if(t&&t.themeXLSX)return t.themeXLSX;if(e&&typeof e.raw=="string")return e.raw;var n=[oa];return n[n.length]='<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme">',n[n.length]="<a:themeElements>",n[n.length]='<a:clrScheme name="Office">',n[n.length]='<a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1>',n[n.length]='<a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1>',n[n.length]='<a:dk2><a:srgbClr val="1F497D"/></a:dk2>',n[n.length]='<a:lt2><a:srgbClr val="EEECE1"/></a:lt2>',n[n.length]='<a:accent1><a:srgbClr val="4F81BD"/></a:accent1>',n[n.length]='<a:accent2><a:srgbClr val="C0504D"/></a:accent2>',n[n.length]='<a:accent3><a:srgbClr val="9BBB59"/></a:accent3>',n[n.length]='<a:accent4><a:srgbClr val="8064A2"/></a:accent4>',n[n.length]='<a:accent5><a:srgbClr val="4BACC6"/></a:accent5>',n[n.length]='<a:accent6><a:srgbClr val="F79646"/></a:accent6>',n[n.length]='<a:hlink><a:srgbClr val="0000FF"/></a:hlink>',n[n.length]='<a:folHlink><a:srgbClr val="800080"/></a:folHlink>',n[n.length]="</a:clrScheme>",n[n.length]='<a:fontScheme name="Office">',n[n.length]="<a:majorFont>",n[n.length]='<a:latin typeface="Cambria"/>',n[n.length]='<a:ea typeface=""/>',n[n.length]='<a:cs typeface=""/>',n[n.length]='<a:font script="Jpan" typeface="ï¼ï¼³ ï¼°ã´ã·ãã¯"/>',n[n.length]='<a:font script="Hang" typeface="ë§ì ê³ ë"/>',n[n.length]='<a:font script="Hans" typeface="å®ä½"/>',n[n.length]='<a:font script="Hant" typeface="æ°ç´°æé«"/>',n[n.length]='<a:font script="Arab" typeface="Times New Roman"/>
1302',n[n.length]='<a:font script="Hebr" typeface="Times New Roman"/>',n[n.length]='<a:font script="Thai" typeface="Tahoma"/>',n[n.length]='<a:font script="Ethi" typeface="Nyala"/>',n[n.length]='<a:font script="Beng" typeface="Vrinda"/>',n[n.length]='<a:font script="Gujr" typeface="Shruti"/>',n[n.length]='<a:font script="Khmr" typeface="MoolBoran"/>',n[n.length]='<a:font script="Knda" typeface="Tunga"/>',n[n.length]='<a:font script="Guru" typeface="Raavi"/>',n[n.length]='<a:font script="Cans" typeface="Euphemia"/>',n[n.length]='<a:font script="Cher" typeface="Plantagenet Cherokee"/>',n[n.length]='<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>',n[n.length]='<a:font script="Tibt" typeface="Microsoft Himalaya"/>',n[n.length]='<a:font script="Thaa" typeface="MV Boli"/>',n[n.length]='<a:font script="Deva" typeface="Mangal"/>',n[n.length]='<a:font script="Telu" typeface="Gautami"/>',n[n.length]='<a:font script="Taml" typeface="Latha"/>',n[n.length]='<a:font script="Syrc" typeface="Estrangelo Edessa"/>',n[n.length]='<a:font script="Orya" typeface="Kalinga"/>',n[n.length]='<a:font script="Mlym" typeface="Kartika"/>',n[n.length]='<a:font script="Laoo" typeface="DokChampa"/>',n[n.length]='<a:font script="Sinh" typeface="Iskoola Pota"/>',n[n.length]='<a:font script="Mong" typeface="Mongolian Baiti"/>',n[n.length]='<a:font script="Viet" typeface="Times New Roman"/>',n[n.length]='<a:font script="Uigh" typeface="Microsoft Uighur"/>',n[n.length]='<a:font script="Geor" typeface="Sylfaen"/>',n[n.length]="</a:majorFont>",n[n.length]="<a:minorFont>",n[n.length]='<a:latin typeface="Calibri"/>',n[n.length]='<a:ea typeface=""/>',n[n.length]='<a:cs typeface=""/>',n[n.length]='<a:font script="Jpan" typeface="ï¼ï¼³ ï¼°ã´ã·ãã¯"/>',n[n.length]='<a:font script="Hang" typeface="ë§ì ê³ ë"/>',n[n.length]='<a:font script="Hans" typeface="å®ä½"/>',n[n.length]='<a:font script="Hant" typeface="æ°ç´°æé«"/>',n[n.length]='<a:font script="Arab" typeface="Arial"/>',n[n.length]='<a:font script="Hebr" typeface="Arial"/>',n[n.length]='<a:font script="Thai" typeface="Tahoma"/>',n[n.length]='<a:font script="Ethi" typeface="Nyala"/>',n[n.length]='<a:font script="Beng" typeface="Vrinda"/>',n[n.length]='<a:font script="Gujr" typeface="Shruti"/>',n[n.length]='<a:font script="Khmr" typeface="DaunPenh"/>',n[n.length]='<a:font script="Knda" typeface="Tunga"/>',n[n.length]='<a:font script="Guru" typeface="Raavi"/>',n[n.length]='<a:font script="Cans" typeface="Euphemia"/>',n[n.length]='<a:font script="Cher" typeface="Plantagenet Cherokee"/>',n[n.length]='<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>',n[n.length]='<a:font script="Tibt" typeface="Microsoft Himalaya"/>',n[n.length]='<a:font script="Thaa" typeface="MV Boli"/>',n[n.length]='<a:font script="Deva" typeface="Mangal"/>',n[n.length]='<a:font script="Telu" typeface="Gautami"/>',n[n.length]='<a:font script="Taml" typeface="Latha"/>',n[n.length]='<a:font script="Syrc" typeface="Estrangelo Edessa"/>',n[n.length]='<a:font script="Orya" typeface="Kalinga"/>',n[n.length]='<a:font script="Mlym" typeface="Kartika"/>',n[n.length]='<a:font script="Laoo" typeface="DokChampa"/>',n[n.length]='<a:font script="Sinh" typeface="Iskoola Pota"/>',n[n.length]='<a:font script="Mong" typeface="Mongolian Baiti"/>',n[n.length]='<a:font script="Viet" typeface="Arial"/>',n[n.length]='<a:font script="Uigh" typeface="Microsoft Uighur"/>',n[n.length]='<a:font script="Geor" typeface="Sylfaen"/>',n[n.length]="</a:minorFont>",n[n.length]="</a:fontScheme>",n[n.length]='<a:fmtScheme name="Office">',n[n.length]="<a:fillStyleLst>",n[n.length]='<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>',n[n.length]='<a:gradFill rotWithShape="1">',n[n.length]="<a:gsLst>",n[n.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="50000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',n[n.length]='<a:gs pos="35000"><a:schemeClr val="phClr"><a:tint val="37000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',n[n.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="15000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',n[n.length]="</a:gsLst>
1302",n[n.length]='<a:lin ang="16200000" scaled="1"/>',n[n.length]="</a:gradFill>",n[n.length]='<a:gradFill rotWithShape="1">',n[n.length]="<a:gsLst>",n[n.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="100000"/><a:shade val="100000"/><a:satMod val="130000"/></a:schemeClr></a:gs>',n[n.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="50000"/><a:shade val="100000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',n[n.length]="</a:gsLst>",n[n.length]='<a:lin ang="16200000" scaled="0"/>',n[n.length]="</a:gradFill>",n[n.length]="</a:fillStyleLst>",n[n.length]="<a:lnStyleLst>",n[n.length]='<a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"><a:shade val="95000"/><a:satMod val="105000"/></a:schemeClr></a:solidFill><a:prstDash val="solid"/></a:ln>',n[n.length]='<a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln>',n[n.length]='<a:ln w="38100" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln>',n[n.length]="</a:lnStyleLst>",n[n.length]="<a:effectStyleLst>",n[n.length]="<a:effectStyle>",n[n.length]="<a:effectLst>",n[n.length]='<a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="38000"/></a:srgbClr></a:outerShdw>',n[n.length]="</a:effectLst>",n[n.length]="</a:effectStyle>",n[n.length]="<a:effectStyle>",n[n.length]="<a:effectLst>",n[n.length]='<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>',n[n.length]="</a:effectLst>",n[n.length]="</a:effectStyle>",n[n.length]="<a:effectStyle>",n[n.length]="<a:effectLst>",n[n.length]='<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>',n[n.length]="</a:effectLst>",n[n.length]='<a:scene3d><a:camera prst="orthographicFront"><a:rot lat="0" lon="0" rev="0"/></a:camera><a:lightRig rig="threePt" dir="t"><a:rot lat="0" lon="0" rev="1200000"/></a:lightRig></a:scene3d>',n[n.length]='<a:sp3d><a:bevelT w="63500" h="25400"/></a:sp3d>',n[n.length]="</a:effectStyle>",n[n.length]="</a:effectStyleLst>",n[n.length]="<a:bgFillStyleLst>",n[n.length]='<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>',n[n.length]='<a:gradFill rotWithShape="1">',n[n.length]="<a:gsLst>",n[n.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="40000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',n[n.length]='<a:gs pos="40000"><a:schemeClr val="phClr"><a:tint val="45000"/><a:shade val="99000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',n[n.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="20000"/><a:satMod val="255000"/></a:schemeClr></a:gs>',n[n.length]="</a:gsLst>",n[n.length]='<a:path path="circle"><a:fillToRect l="50000" t="-80000" r="50000" b="180000"/></a:path>',n[n.length]="</a:gradFill>",n[n.length]='<a:gradFill rotWithShape="1">',n[n.length]="<a:gsLst>",n[n.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="80000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',n[n.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="30000"/><a:satMod val="200000"/></a:schemeClr></a:gs>',n[n.length]="</a:gsLst>",n[n.length]='<a:path path="circle"><a:fillToRect l="50000" t="50000" r="50000" b="50000"/></a:path>',n[n.length]="</a:gradFill>",n[n.length]="</a:bgFillStyleLst>",n[n.length]="</a:fmtScheme>",n[n.length]="</a:themeElements>",n[n.length]="<a:objectDefaults>",n[n.length]="<a:spDef>",n[n.length]='<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="1"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="3"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="2"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="lt1"/></a:fontRef></a:style>',n[n.length]="</a:spDef>",n[n.length]="<a:lnDef>",n[n.length]='<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="2"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="0"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="1"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="tx1"/></a:fontRef></a:style>',n[n.length]="</a:lnDef>",n[n.length]="</a:objectDefaults>",n[n.length]="<a:extraClrSchemeLst/>",n[n.length]="</a:theme>",n.join("")}function PCt(e,t){return{flags:e.read_shift(4),version:e.read_shift(4),name:yo(e)}}function MCt(e){var t=ut(12+2*e.name.length);return t.write_shift(4,e.flags),t.write_shift(4,e.version),ka(e.name,t),t.slice(0,t.l)}function DCt(e){for(var t=[],n=e.read_shift(4);n-- >0;)t.push([e.read_shift(4),e.read_shift(4)]);return t}function FCt(e){var t=ut(4+8*e.length);t.write_shift(4,e.length);for(var n=0;n<e.length;++n)t.write_shift(4,e[n][0]),t.write_shift(4,e[n][1]);return t}function LCt(e,t){var n=ut(8+2*t.length);return n.write_shift(4,e),ka(t,n),n.slice(0,n.l)}function zCt(e){return e.l+=4,e.read_shift(4)!=0}function $Ct(e,t){var n=ut(8);return n.write_shift(4,e),n.write_shift(4,1),n}function BCt(){var e=hl();return Et(e,332),Et(e,334,ku(1)),Et(e,335,MCt({name:"XLDAPR",version:12e4,flags:3496657072})),Et(e,336),Et(e,339,LCt(1,"XLDAPR")),Et(e,52),Et(e,35,ku(514)),Et(e,4096,ku(0)),Et(e,4097,xc(1)),Et(e,36),Et(e,53),Et(e,340),Et(e,337,$Ct(1)),Et(e,51,FCt([[1,0]])
vendor: 1,842 bytes, lines 1302-1320
1302),Et(e,338),Et(e,333),e.end()}function l2e(){var e=[oa];return e.push(`<metadata xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:xlrd="http://schemas.microsoft.com/office/spreadsheetml/2017/richdata" xmlns:xda="http://schemas.microsoft.com/office/spreadsheetml/2017/dynamicarray"> 1303 <metadataTypes count="1"> 1304 <metadataType name="XLDAPR" minSupportedVersion="120000" copy="1" pasteAll="1" pasteValues="1" merge="1" splitFirst="1" rowColShift="1" clearFormats="1" clearComments="1" assign="1" coerce="1" cellMeta="1"/> 1305 </metadataTypes> 1306 <futureMetadata name="XLDAPR" count="1"> 1307 <bk> 1308 <extLst> 1309 <ext uri="{bdbb8cdc-fa1e-496e-a857-3c3f30c029c3}"> 1310 <xda:dynamicArrayProperties fDynamic="1" fCollapsed="0"/> 1311 </ext> 1312 </extLst> 1313 </bk> 1314 </futureMetadata> 1315 <cellMetadata count="1"> 1316 <bk> 1317 <rc t="1" v="0"/> 1318 </bk> 1319 </cellMetadata> 1320</metadata>`),e.join("")}function UCt(e){var t={};t.i=e.read_shift(4);var n={};n.r=e.read_shift(4),n.c=e.read_shift(4),t.r=ci(n);var r=e.read_shift(1);return r&2&&(t.l="1"),r&8&&(t.a="1"),t}var g1=1024;function c2e(e,t){for(var n=[21600,21600],r=["m0,0l0",n[1],n[0],n[1],n[0],"0xe"].join(","),i=[Bt("xml",null,{"xmlns:v":zl.v,"xmlns:o":zl.o,"xmlns:x":zl.x,"xmlns:mv":zl.mv}).replace(/\/>/,">"),Bt("o:shapelayout",Bt("o:idmap",null,{"v:ext":"edit",data:e}),{"v:ext":"edit"}),Bt("v:shapetype",[Bt("v:stroke",null,{joinstyle:"miter"}),Bt("v:path",null,{gradientshapeok:"t","o:connecttype":"rect"})].join(""),{id:"_x0000_t202","o:spt":202,coordsize:n.join(","),path:r})];g1<e*1e3;)g1+=1e3;return t.forEach(function(s){var a=Aa(s[0]),o={color2:"#BEFF82",type:"gradient"};o.type=="gradient"&&(o.angle="-180");var c=o.type=="gradient"?Bt("o:fill",null,{type:"gradientUnscaled","v:ext":"view"}):null,u=Bt("v:fill",c,o),d={on:"t",obscured:"t"};
vendor: 1,226 bytes, line 1320
1320++g1,i=i.concat(["<v:shape"+VS({id:"_x0000_s"+g1,type:"#_x0000_t202",style:"position:absolute; margin-left:80pt;margin-top:5pt;width:104pt;height:64pt;z-index:10"+(s[1].hidden?";visibility:hidden":""),fillcolor:"#ECFAD4",strokecolor:"#edeaa1"})+">",u,Bt("v:shadow",null,d),Bt("v:path",null,{"o:connecttype":"none"}),'<v:textbox><div style="text-align:left"></div></v:textbox>','<x:ClientData ObjectType="Note">',"<x:MoveWithCells/>","<x:SizeWithCells/>",Ka("x:Anchor",[a.c+1,0,a.r+1,0,a.c+3,20,a.r+5,20].join(",")),Ka("x:AutoFill","False"),Ka("x:Row",String(a.r)),Ka("x:Column",String(a.c)),s[1].hidden?"":"<x:Visible/>","</x:ClientData>","</v:shape>"])}),i.push("</xml>"),i.join("")}function u2e(e){var t=[oa,Bt("comments",null,{xmlns:pb[0]})],n=[];return t.push("<authors>"),e.forEach(function(r){r[1].forEach(function(i){var s=li(i.a);n.indexOf(s)==-1&&(n.push(s),t.push("<author>"+s+"</author>")),i.T&&i.ID&&n.indexOf("tc="+i.ID)==-1&&(n.push("tc="+i.ID),t.push("<author>tc="+i.ID+"</author>"))})}),n.length==0&&(n.push("SheetJ5"),t.push("<author>SheetJ5</author>")),t.push("</authors>"),t.push("<commentList>"),e.forEach(function(r){var i=0,s=[];if(r[1][0]&&r[1][0].T&&r[1][0].ID?i=n.indexOf("tc="+r[1][0].ID):r[1].forEac
vendor: 6,208 bytes, lines 1320-1324
1320h(function(c){c.a&&(i=n.indexOf(li(c.a))),s.push(c.t||"")}),t.push('<comment ref="'+r[0]+'" authorId="'+i+'"><text>'),s.length<=1)t.push(Ka("t",li(s[0]||"")));else{for(var a=`Comment: 1321 `+s[0]+` 1322`,o=1;o<s.length;++o)a+=`Reply: 1323 `+s[o]+` 1324`;t.push(Ka("t",li(a)))}t.push("</text></comment>")}),t.push("</commentList>"),t.length>2&&(t[t.length]="</comments>",t[1]=t[1].replace("/>",">")),t.join("")}function VCt(e,t,n){var r=[oa,Bt("ThreadedComments",null,{xmlns:Ta.TCMNT}).replace(/[\/]>/,">")];return e.forEach(function(i){var s="";(i[1]||[]).forEach(function(a,o){if(!a.T){delete a.ID;return}a.a&&t.indexOf(a.a)==-1&&t.push(a.a);var c={ref:i[0],id:"{54EE7951-7262-4200-6969-"+("000000000000"+n.tcid++).slice(-12)+"}"};o==0?s=c.id:c.parentId=s,a.ID=c.id,a.a&&(c.personId="{54EE7950-7262-4200-6969-"+("000000000000"+t.indexOf(a.a)).slice(-12)+"}"),r.push(Bt("threadedComment",Ka("text",a.t||""),c))})}),r.push("</ThreadedComments>"),r.join("")}function HCt(e){var t=[oa,Bt("personList",null,{xmlns:Ta.TCMNT,"xmlns:x":pb[0]}).replace(/[\/]>/,">")];return e.forEach(function(n,r){t.push(Bt("person",null,{displayName:n,id:"{54EE7950-7262-4200-6969-"+("000000000000"+r).slice(-12)+"}",userId:n,providerId:"None"}))}),t.push("</personList>"),t.join("")}function qCt(e){var t={};t.iauthor=e.read_shift(4);var n=Ox(e);return t.rfx=n.s,t.ref=ci(n.s),e.l+=16,t}function WCt(e,t){return t==null&&(t=ut(36)),t.write_shift(4,e[1].iauthor),gb(e[0],t),t.write_shift(4,0),t.write_shift(4,0),t.write_shift(4,0),t.write_shift(4,0),t}var GCt=yo;function KCt(e){return ka(e.slice(0,54))}function YCt(e){var t=hl(),n=[];return Et(t,628),Et(t,630),e.forEach(function(r){r[1].forEach(function(i){n.indexOf(i.a)>-1||(n.push(i.a.slice(0,54)),Et(t,632,KCt(i.a)))})}),Et(t,631),Et(t,633),e.forEach(function(r){r[1].forEach(function(i){i.iauthor=n.indexOf(i.a);var s={s:Aa(r[0]),e:Aa(r[0])};Et(t,635,WCt([s,i])),i.t&&i.t.length>0&&Et(t,637,QSt(i)),Et(t,636),delete i.iauthor})}),Et(t,634),Et(t,629),t.end()}function XCt(e,t){t.FullPaths.forEach(function(n,r){if(r!=0){var i=n.replace(/[^\/]*[\/]/,"/_VBA_PROJECT_CUR/");i.slice(-1)!=="/"&&_i.utils.cfb_add(e,i,t.FileIndex[r].content)}})}var d2e=["xlsb","xlsm","xlam","biff8","xla"],QCt=(function(){var e=/(^|[^A-Za-z_])R(\[?-?\d+\]|[1-9]\d*|)C(\[?-?\d+\]|[1-9]\d*|)(?![A-Za-z0-9_])/g,t={r:0,c:0};function n(r,i,s,a){var o=!1,c=!1;s.length==0?c=!0:s.charAt(0)=="["&&(c=!0,s=s.slice(1,-1)),a.length==0?o=!0:a.charAt(0)=="["&&(o=!0,a=a.slice(1,-1));var u=s.length>0?parseInt(s,10)|0:0,d=a.length>0?parseInt(a,10)|0:0;return o?d+=t.c:--d,c?u+=t.r:--u,i+(o?"":"$")+vo(d)+(c?"":"$")+Za(u)}return function(i,s){return t=s,i.replace(e,n)}})(),_U=/(^|[^._A-Z0-9])([$]?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])([$]?)(10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})(?![_.\(A-Za-z0-9])/g,wU=(function(){return function(t,n){return t.replace(_U,function(r,i,s,a,o,c){var u=mU(a)-(s?0:n.c),d=pU(c)-(o?0:n.r),h=d==0?"":o?d+1:"["+d+"]",p=u==0?"":s?u+1:"["+u+"]";return i+"R"+h+"C"+p})}})();function ZCt(e,t){return e.replace(_U,function(n,r,i,s,a,o){return r+(i=="$"?i+s:vo(mU(s)+t.c))+(a=="$"?a+o:Za(pU(o)+t.r))})}function JCt(e){return e.length!=1}function Ws(e){e.l+=1}function Nm(e,t){var n=e.read_shift(2);return[n&16383,n>>14&1,n>>15&1]}function f2e(e,t,n){var r=2;if(n){if(n.biff>=2&&n.biff<=5)return h2e(e);n.biff==12&&(r=4)}var i=e.read_shift(r),s=e.read_shift(r),a=Nm(e),o=Nm(e);return{s:{r:i,c:a[0],cRel:a[1],rRel:a[2]},e:{r:s,c:o[0],cRel:o[1],rRel:o[2]}}}function h2e(e){var t=Nm(e),n=Nm(e),r=e.read_shift(1),i=e.read_shift(1);return{s:{r:t[0],c:r,cRel:t[1],rRel:t[2]},e:{r:n[0],c:i,cRel:n[1],rRel:n[2]}}}function eTt(e,t,n){if(n.biff<8)return h2e(e);var r=e.read_shift(n.biff==12?4:2),i=e.read_shift(n.biff==12?4:2),s=Nm(e),a=Nm(e);return{s:{r,c:s[0],cRel:s[1],rRel:s[2]},e:{r:i,c:a[0],cRel:a[1],rRel:a[2]}}}function p2e(e,t,n){if(n&&n.biff>=2&&n.biff<=5)return tTt(e);var r=e.read_shift(n&&n.biff==12?4:2),i=Nm(e);return{r,c:i[0],cRel:i[1],rRel:i[2]}}function tTt(e){var t=Nm(e),n=e.read_shift(1);return{r:t[0],c:n,cRel:t[1],rRel:t[2]}}function nTt(e){var t=e.read_shift(2),n=e.read_shift(2);return{r:t,c:n&255,fQuoted:!!(n&16384),cRel:n>>15,rRel:n>>15}}function rTt(e,t,n){var r=n&&n.biff?n.biff:8;if(r>=2&&r<=5)return iTt(e);var i=e.read_shift(r>=12?4:2),s=e.read_shift(2),a=(s&16384)>>14,o=(s&32768)>>15;if(s&=16383,o==1)for(;i>524287;)i-=1048576;if(a==1)for(;s>8191;)s=s-16384;return{r:i,c:s,cRel:a,rRel:o}}function iTt(e){var t=e.read_shift(2),n=e.read_shift(1),r=(t&32768)>>15,i=(t&16384)>>14;return t&=16383,r==1&&t>=8192&&(t=t-16384),i==1&&n>=128&&(n=n-256),{r:t,c:n,cRel:i,rRel:r}}function sTt(e,t,n){var r=(e[e.l++]&96)>>5,i=f2e(e,n.biff>=2&&n.biff<=5?6:8,n);return[r,i]}function aTt(e,t,n){var r=(e[e.l++]&96)>>5,i=e.read_shift(2,"i"),s=8;if(n)switch(n.biff){case 5:e.l+=12,s=6;break;case 12:s=12;break}var a=f2e(e,s,n);return[r,i,a]}function oTt(e,t,n){var r=(e[e.l++]&96)>>5;return e.l+=n&&n.biff>8?12:n.biff<8?6:8,[r]}function lTt(e,t,n){var r=(e[e.l++]&96)>>5,i=e.read_shift(2),s=8;if(n)switch(n.biff){case 5:e.l+=12,s=6;break;case 12:s=12;break}return e.l+=s,[r,i]}function cTt(e,t,n){var r=(e[e.l++]&96)>>5,i=eTt(e,t-1,n);return[r,i]}function uTt(e,t,n){var r=(e[e.l++]&96)>>5;return e.l+=n.biff==2?6:n.biff==12?14:7,[r]}function xre(e){var t=e[e.l+1]&1,n=1;return e.l+=4,[t,n]}function dTt(e,t,n){e.l+=2;for(var r=e.read_shift(n&&n.biff==2?1:2),i=[],s=0;s<=r;++s)i.push(e.read_shift(n&&n.biff==2?1:2));return i}function fTt(e,t,n){var r=e[e.l+1]&255?1:0;return e.l+=2,[r,e.read_shift(n&&n.biff==2?1:2)]}function hTt(e,t,n){var r=e[e.l+1]&255?1:0;return e.l+=2,[r,e.read_shift(n&&n.biff==2?1:2)]}function pTt(e){var t=e[e.l+1]&255?1:0;return e.l+=2,[t,e.read_shift(2)]}function mTt(e,t,n){var r=e[e.l+1]&255?1:0;return e.l+=n&&n.biff==2?3:4,[r]}function m2e(e){var t=e.read_shift(1),n=e.read_shift(1);return[t,n]}function gTt(e){return e.read_shift(2),m2e(e)}function xTt(e){return e.read_shift(2),m2e(e)}function vTt(e,t,n){var r=(e[e.l]&96)>>5;e.l+=1;var i=p2e(e,0,n);return[r,i]}function yTt(e,t,n){var r=(e[e.l]&96)>>5;e.l+=1;var i=rTt(e,0,n);return[r,i]}function bTt(e,t,n){var r=(e[e.l]&96)>>5;e.l+=1;var i=e.read_shift(2);
1324n&&n.biff==5&&(e.l+=12);var s=p2e(e,0,n);return[r,i,s]}function _Tt(e,t,n){var r=(e[e.l]&96)>>5;e.l+=1;var i=e.read_shift(n&&n.biff<=3?1:2);return[_At[i],v2e[i],r]}function wTt(e,t,n){var r=e[e.l++],i=e.read_shift(1),s=n&&n.biff<=3?[r==88?-1:0,e.read_shift(1)]:STt(e);return[i,(s[0]===0?v2e:bAt)[s[1]]]}function STt(e){return[e[e.l+1]>>7,e.read_shift(2)&32767]}function ETt(e,t,n){e.l+=n&&n.biff==2?3:4}function CTt(e,t,n){if(e.l++,n&&n.biff==12)return[e.read_shift(4,"i"),0];var r=e.read_shift(2),i=e.read_shift(n&&n.biff==2?1:2);return[r,i]}function TTt(e){return e.l++,cC[e.read_shift(1)]}function ATt(e){return e.l++,e.read_shift(2)}function kTt(e){return e.l++,e.read_shift(1)!==0}function NTt(e){return e.l++,xb(e)}function jTt(e,t,n){return e.l++,Qwe(e,t-1,n)}function RTt(e,t){var n=[e.read_shift(1)];if(t==12)switch(n[0]){case 2:n[0]=4;break;case 4:n[0]=16;break;case 0:n[0]=1;break;case 1:n[0]=2;break}switch(n[0]){case 4:n[1]=bEt(e,1)?"TRUE":"FALSE",t!=12&&(e.l+=7);break;case 37:case 16:n[1]=cC[e[e.l]],e.l+=t==12?4:8;break;case 0:e.l+=8;break;case 1:n[1]=xb(e);break;case 2:n[1]=EEt(e,0,{biff:t>0&&t<8?2:t});break;default:throw new Error("Bad SerAr: "+n[0])}return n}function ITt(e,t,n){for(var r=e.read_shift(n.biff==12?4:2),i=[],s=0;s!=r;++s)i.push((n.biff==12?Ox:AEt)(e));return i}function OTt(e,t,n){var r=0,i=0;n.biff==12?(r=e.read_shift(4),i=e.read_shift(4)):(i=1+e.read_shift(1),r=1+e.read_shift(2)),n.biff>=2&&n.biff<8&&(--r,--i==0&&(i=256));for(var s=0,a=[];s!=r&&(a[s]=[]);++s)for(var o=0;o!=i;++o)a[s][o]=RTt(e,n.biff);return a}function PTt(e,t,n){var r=e.read_shift(1)>>>5&3,i=!n||n.biff>=8?4:2,s=e.read_shift(i);switch(n.biff){case 2:e.l+=5;break;case 3:case 4:e.l+=8;break;case 5:e.l+=12;break}return[r,0,s]}function MTt(e,t,n){if(n.biff==5)return DTt(e);var r=e.read_shift(1)>>>5&3,i=e.read_shift(2),s=e.read_shift(4);return[r,i,s]}function DTt(e){var t=e.read_shift(1)>>>5&3,n=e.read_shift(2,"i");e.l+=8;var r=e.read_shift(2);return e.l+=12,[t,n,r]}function FTt(e,t,n){var r=e.read_shift(1)>>>5&3;e.l+=n&&n.biff==2?3:4;var i=e.read_shift(n&&n.biff==2?1:2);return[r,i]}function LTt(e,t,n){var r=e.read_shift(1)>>>5&3,i=e.read_shift(n&&n.biff==2?1:2);return[r,i]}function zTt(e,t,n){var r=e.read_shift(1)>>>5&3;return e.l+=4,n.biff<8&&e.l--,n.biff==12&&(e.l+=2),[r]}function $Tt(e,t,n){var r=(e[e.l++]&96)>>5,i=e.read_shift(2),s=4;if(n)switch(n.biff){case 5:s=15;break;case 12:s=6;break}return e.l+=s,[r,i]}var BTt=Kd,UTt=Kd,VTt=Kd;function uC(e,t,n){return e.l+=2,[nTt(e)]}function SU(e){return e.l+=6,[]}var HTt=uC,qTt=SU,WTt=SU,GTt=uC;function g2e(e){return e.l+=2,[Ywe(e),e.read_shift(2)&1]}var KTt=uC,YTt=g2e,XTt=SU,QTt=uC,ZTt=uC,JTt=["Data","All","Headers","??","?Data2","??","?DataHeaders","??","Totals","??","??","??","?DataTotals","??","??","??","?Current"];function eAt(e){e.l+=2;var t=e.read_shift(2),n=e.read_shift(2),r=e.read_shift(4),i=e.read_shift(2),s=e.read_shift(2),a=JTt[n>>2&31];return{ixti:t,coltype:n&3,rt:a,idx:r,c:i,C:s}}function tAt(e){return e.l+=2,[e.read_shift(4)]}function nAt(e,t,n){return e.l+=5,e.l+=2,e.l+=n.biff==2?1:4,["PTGSHEET"]}function rAt(e,t,n){return e.l+=n.biff==2?4:5,["PTGENDSHEET"]}function iAt(e){var t=e.read_shift(1)>>>5&3,n=e.read_shift(2);return[t,n]}function sAt(e){var t=e.read_shift(1)>>>5&3,n=e.read_shift(2);return[t,n]}function aAt(e){return e.l+=4,[0,0]}var vre={1:{n:"PtgExp",f:CTt},2:{n:"PtgTbl",f:VTt},3:{n:"PtgAdd",f:Ws},4:{n:"PtgSub",f:Ws},5:{n:"PtgMul",f:Ws},6:{n:"PtgDiv",f:Ws},7:{n:"PtgPower",f:Ws},8:{n:"PtgConcat",f:Ws},9:{n:"PtgLt",f:Ws},10:{n:"PtgLe",f:Ws},11:{n:"PtgEq",f:Ws},12:{n:"PtgGe",f:Ws},13:{n:"PtgGt",f:Ws},14:{n:"PtgNe",f:Ws},15:{n:"PtgIsect",f:Ws},16:{n:"PtgUnion",f:Ws},17:{n:"PtgRange",f:Ws},18:{n:"PtgUplus",f:Ws},19:{n:"PtgUminus",f:Ws},20:{n:"PtgPercent",f:Ws},21:{n:"PtgParen",f:Ws},22:{n:"PtgMissArg",f:Ws},23:{n:"PtgStr",f:jTt},26:{n:"PtgSheet",f:nAt},27:{n:"PtgEndSheet",f:rAt},28:{n:"PtgErr",f:TTt},29:{n:"PtgBool",f:kTt},30:{n:"PtgInt",f:ATt},31:{n:"PtgNum",f:NTt},32:{n:"PtgArray",f:uTt},33:{n:"PtgFunc",f:_Tt},34:{n:"PtgFuncVar",f:wTt},35:{n:"PtgName",f:PTt},36:{n:"PtgRef",f:vTt},37:{n:"PtgArea",f:sTt},38:{n:"PtgMemArea",f:FTt},39:{n:"PtgMemErr",f:BTt},40:{n:"PtgMemNoMem",f:UTt},41:{n:"PtgMemFunc",f:LTt},42:{n:"PtgRefErr",f:zTt},43:{n:"PtgAreaErr",f:oTt},44:{n:"PtgRefN",f:yTt},45:{n:"PtgAreaN",f:cTt},46:{n:"PtgMemAreaN",f:iAt},47:{n:"PtgMemNoMemN",f:sAt},57:{n:"PtgNameX",f:MTt},58:{n:"PtgRef3d",f:bTt}
vendor: 5,165 bytes, line 1324
1324,59:{n:"PtgArea3d",f:aTt},60:{n:"PtgRefErr3d",f:$Tt},61:{n:"PtgAreaErr3d",f:lTt},255:{}},oAt={64:32,96:32,65:33,97:33,66:34,98:34,67:35,99:35,68:36,100:36,69:37,101:37,70:38,102:38,71:39,103:39,72:40,104:40,73:41,105:41,74:42,106:42,75:43,107:43,76:44,108:44,77:45,109:45,78:46,110:46,79:47,111:47,88:34,120:34,89:57,121:57,90:58,122:58,91:59,123:59,92:60,124:60,93:61,125:61},lAt={1:{n:"PtgElfLel",f:g2e},2:{n:"PtgElfRw",f:QTt},3:{n:"PtgElfCol",f:HTt},6:{n:"PtgElfRwV",f:ZTt},7:{n:"PtgElfColV",f:GTt},10:{n:"PtgElfRadical",f:KTt},11:{n:"PtgElfRadicalS",f:XTt},13:{n:"PtgElfColS",f:qTt},15:{n:"PtgElfColSV",f:WTt},16:{n:"PtgElfRadicalLel",f:YTt},25:{n:"PtgList",f:eAt},29:{n:"PtgSxName",f:tAt},255:{}},cAt={0:{n:"PtgAttrNoop",f:aAt},1:{n:"PtgAttrSemi",f:mTt},2:{n:"PtgAttrIf",f:hTt},4:{n:"PtgAttrChoose",f:dTt},8:{n:"PtgAttrGoto",f:fTt},16:{n:"PtgAttrSum",f:ETt},32:{n:"PtgAttrBaxcel",f:xre},33:{n:"PtgAttrBaxcel",f:xre},64:{n:"PtgAttrSpace",f:gTt},65:{n:"PtgAttrSpaceSemi",f:xTt},128:{n:"PtgAttrIfError",f:pTt},255:{}};function uAt(e,t,n,r){if(r.biff<8)return Kd(e,t);for(var i=e.l+t,s=[],a=0;a!==n.length;++a)switch(n[a][0]){case"PtgArray":n[a][1]=OTt(e,0,r),s.push(n[a][1]);break;case"PtgMemArea":n[a][2]=ITt(e,n[a][1],r),s.push(n[a][2]);break;case"PtgExp":r&&r.biff==12&&(n[a][1][1]=e.read_shift(4),s.push(n[a][1]));break;case"PtgList":case"PtgElfRadicalS":case"PtgElfColS":case"PtgElfColSV":throw"Unsupported "+n[a][0]}return t=i-e.l,t!==0&&s.push(Kd(e,t)),s}function dAt(e,t,n){for(var r=e.l+t,i,s,a=[];r!=e.l;)t=r-e.l,s=e[e.l],i=vre[s]||vre[oAt[s]],(s===24||s===25)&&(i=(s===24?lAt:cAt)[e[e.l+1]]),!i||!i.f?Kd(e,t):a.push([i.n,i.f(e,t,n)]);return a}function fAt(e){for(var t=[],n=0;n<e.length;++n){for(var r=e[n],i=[],s=0;s<r.length;++s){var a=r[s];if(a)switch(a[0]){case 2:i.push('"'+a[1].replace(/"/g,'""')+'"');break;default:i.push(a[1])}else i.push("")}t.push(i.join(","))}return t.join(";")}var hAt={PtgAdd:"+",PtgConcat:"&",PtgDiv:"/",PtgEq:"=",PtgGe:">=",PtgGt:">",PtgLe:"<=",PtgLt:"<",PtgMul:"*",PtgNe:"<>",PtgPower:"^",PtgSub:"-"};function pAt(e,t){if(!e&&!(t&&t.biff<=5&&t.biff>=2))throw new Error("empty sheet name");return/[^\w\u4E00-\u9FFF\u3040-\u30FF]/.test(e)?"'"+e+"'":e}function x2e(e,t,n){if(!e)return"SH33TJSERR0";if(n.biff>8&&(!e.XTI||!e.XTI[t]))return e.SheetNames[t];if(!e.XTI)return"SH33TJSERR6";var r=e.XTI[t];if(n.biff<8)return t>1e4&&(t-=65536),t<0&&(t=-t),t==0?"":e.XTI[t-1];if(!r)return"SH33TJSERR1";var i="";if(n.biff>8)switch(e[r[0]][0]){case 357:return i=r[1]==-1?"#REF":e.SheetNames[r[1]],r[1]==r[2]?i:i+":"+e.SheetNames[r[2]];case 358:return n.SID!=null?e.SheetNames[n.SID]:"SH33TJSSAME"+e[r[0]][0];case 355:default:return"SH33TJSSRC"+e[r[0]][0]}switch(e[r[0]][0][0]){case 1025:return i=r[1]==-1?"#REF":e.SheetNames[r[1]]||"SH33TJSERR3",r[1]==r[2]?i:i+":"+e.SheetNames[r[2]];case 14849:return e[r[0]].slice(1).map(function(s){return s.Name}).join(";;");default:return e[r[0]][0][3]?(i=r[1]==-1?"#REF":e[r[0]][0][3][r[1]]||"SH33TJSERR4",r[1]==r[2]?i:i+":"+e[r[0]][0][3][r[2]]):"SH33TJSERR2"}}function yre(e,t,n){var r=x2e(e,t,n);return r=="#REF"?r:pAt(r,n)}function Ty(e,t,n,r,i){var s=i&&i.biff||8,a={s:{c:0,r:0}},o=[],c,u,d,h=0,p=0,g,v="";if(!e[0]||!e[0][0])return"";for(var x=-1,_="",w=0,S=e[0].length;w<S;++w){var E=e[0][w];switch(E[0]){case"PtgUminus":o.push("-"+o.pop());break;case"PtgUplus":o.push("+"+o.pop());break;case"PtgPercent":o.push(o.pop()+"%");break;case"PtgAdd":case"PtgConcat":case"PtgDiv":case"PtgEq":case"PtgGe":case"PtgGt":case"PtgLe":case"PtgLt":case"PtgMul":case"PtgNe":case"PtgPower":case"PtgSub":if(c=o.pop(),u=o.pop(),x>=0){switch(e[0][x][1][0]){case 0:_=_s(" ",e[0][x][1][1]);break;case 1:_=_s("\r",e[0][x][1][1]);break;default:if(_="",i.WTF)throw new Error("Unexpected PtgAttrSpaceType "+e[0][x][1][0])}u=u+_,x=-1}o.push(u+hAt[E[0]]+c);break;case"PtgIsect":c=o.pop(),u=o.pop(),o.push(u+" "+c);break;case"PtgUnion":c=o.pop(),u=o.pop(),o.push(u+","+c);break;case"PtgRange":c=o.pop(),u=o.pop(),o.push(u+":"+c);break;case"PtgAttrChoose":break;case"PtgAttrGoto":break;case"PtgAttrIf":break;case"PtgAttrIfError":break;case"PtgRef":d=d2(E[1][1],a,i),o.push(f2(d,s));break;case"PtgRefN":d=n?d2(E[1][1],n,i):E[1][1],o.push(f2(d,s));break;case"PtgRef3d":h=E[1][1],d=d2(E[1][2],a,i),v=yre(r,h,i),o.push(v+"!"+f2(d,s));break;case"PtgFunc":case"PtgFuncVar":var T=E[1][0],N=E[1][1];T||(T=0),T&=127;var A=T==0?[]:o.slice(-T);o.length-=T,N==="User"&&(N=A.shift()),o.push(N+"("+A.join(",")+")");break;case"PtgBool":o.push(E[1]?"TRUE":"FALSE");break;case"PtgInt":o.push(E[1]);break;case"PtgNum":o.push(String(E[1]));break;case"PtgStr":o.push('"'+E[1].replace(/"/g,'""')+'"');break;case"PtgErr":o.push(E[1]);break;case"PtgAreaN":g=rre(E[1][1],n?{s:n}:a,i),o.push(rD(g,i));break;case"PtgArea":g=rre(E[1][1],a,i),o.push(rD(g,i));break;case"PtgArea3d":h=E[1][1],g=E[1][2],v=yre(r,h,i),o.push(v+"!"+rD(g,i));break;case"PtgAttrSum":o.push("SUM("+o.pop()+")");break;case"PtgAttrBaxcel":case"PtgAttrSemi":break;case"PtgName":p=E[1][2];var k=(r.names||[])[p-1]||(r[0]||[])[p],j=k?k.Name:"SH33TJSNAME"+String(p);j&&j.slice(0,6)=="_xlfn."&&!i.xlfn&&(j=j.slice(6)),o.push(j);break;case"PtgNameX":var R=E[1][1];p=E[1][2];var P;
1324if(i.biff<=5)R<0&&(R=-R),r[R]&&(P=r[R][p]);else{var V="";if(((r[R]||[])[0]||[])[0]==14849||(((r[R]||[])[0]||[])[0]==1025?r[R][p]&&r[R][p].itab>0&&(V=r.SheetNames[r[R][p].itab-1]+"!"):V=r.SheetNames[p-1]+"!"),r[R]&&r[R][p])V+=r[R][p].Name;else if(r[0]&&r[0][p])V+=r[0][p].Name;else{var U=(x2e(r,R,i)||"").split(";;");U[p-1]?V=U[p-1]:V+="SH33TJSERRX"}o.push(V);break}P||(P={Name:"SH33TJSERRY"}),o.push(P.Name);break;case"PtgParen":var G="(",Q=")";if(x>=0){switch(_="",e[0][x][1][0]){case 2:G=_s(" ",e[0][x][1][1])+G;break;case 3:G=_s("\r",e[0][x][1][1])+G;break;case 4:Q=_s(" ",e[0][x][1][1])+Q;break;case 5:Q=_s("\r",e[0][x][1][1])+Q;break;default:if(i.WTF)throw new Error("Unexpected PtgAttrSpaceType "+e[0][x][1][0])}x=-1}o.push(G+o.pop()+Q);break;case"PtgRefErr":o.push("#REF!");break;case"PtgRefErr3d":o.push("#REF!");break;case"PtgExp":d={c:E[1][1],r:E[1][0]};var Z={c:n.c,r:n.r};if(r.sharedf[ci(d)]){var K=r.sharedf[ci(d)];o.push(Ty(K,a,Z,r,i))}else{var te=!1;for(c=0;c!=r.arrayf.length;++c)if(u=r.arrayf[c],!(d.c<u[0].s.c||d.c>u[0].e.c)&&!(d.r<u[0].s.r||d.r>u[0].e.r)){o.push(Ty(u[1],a,Z,r,i)),te=!0;break}te||o.push(E[1])}break;case"PtgArray":o.push("{"+fAt(E[1])+"}");break;case"PtgMemArea":break;case"PtgAttrSpace":case"PtgAttrSpaceSemi":x=w;break;case"PtgTbl":break;case"PtgMemErr":break;case"PtgMissArg":o.push("");break;case"PtgAreaErr":o.push("#REF!");break;case"PtgAreaErr3d":o.push("#REF!");break;case"PtgList":o.push("Table"+E[1].idx+"[#"+E[1].rt+"]");break;case"PtgMemAreaN":case"PtgMemNoMemN":case"PtgAttrNoop":case"PtgSheet":case"PtgEndSheet":break;case"PtgMemFunc":break;case"PtgMemNoMem":break;case"PtgElfCol":case"PtgElfColS":case"PtgElfColSV":case"PtgElfColV":case"PtgElfLel":case"PtgElfRadical":case"PtgElfRadicalLel":case"PtgElfRadicalS":case"PtgElfRw":case"PtgElfRwV":throw new Error("Unsupported ELFs");case"PtgSxName":throw new Error("Unrecognized Formula Token: "+String(E));default:throw new Error("Unrecognized Formula Token: "+String(E))}var ne=["PtgAttrSpace","PtgAttrSpaceSemi","PtgAttrGoto"];if(i.biff!=3&&x>=0&&ne.indexOf(e[0][w][0])==-1){E=e[0][x];var se=!0;switch(E[1][0]){case 4:se=!1;case 0:_=_s(" ",E[1][1]);break;case 5:se=!1;case 1:_=_s("\r",E[1][1]);break;default:if(_="",i.WTF)throw new Error("Unexpected PtgAttrSpaceType "+E[1][0])}o.push((se?_:"")+o.pop()+(se?"":_)),x=-1}}if(o.length>1&&i.WTF)throw new Error("bad formula stack");return o[0]}function mAt(e){if(e==null){var t=ut(8);return t.write_shift(1,3),t.write_shift(1,0),t.write_shift(2,0),t.write_shift(2,0),t.write_shift(2,65535),t}else if(typeof e=="number")return tx(e);return tx(0)}function gAt(e,t,n,r,i){var s=nx(t,n,i),a=mAt(e.v),o=ut(6),c=33;o.write_shift(2,c),o.write_shift(4,0);for(var u=ut(e.bf.length),d=0;d<e.bf.length;++d)u[d]=e.bf[d];var h=Ga([s,a,o,u]);return h}function V4(e,t,n){var r=e.read_shift(4),i=dAt(e,r,n),s=e.read_shift(4),a=s>0?uAt(e,s,i,n):null;return[i,a]}var xAt=V4,H4=V4,vAt=V4,yAt=V4,bAt
vendor: 7,370 bytes, line 1324
1324={0:"BEEP",1:"OPEN",2:"OPEN.LINKS",3:"CLOSE.ALL",4:"SAVE",5:"SAVE.AS",6:"FILE.DELETE",7:"PAGE.SETUP",8:"PRINT",9:"PRINTER.SETUP",10:"QUIT",11:"NEW.WINDOW",12:"ARRANGE.ALL",13:"WINDOW.SIZE",14:"WINDOW.MOVE",15:"FULL",16:"CLOSE",17:"RUN",22:"SET.PRINT.AREA",23:"SET.PRINT.TITLES",24:"SET.PAGE.BREAK",25:"REMOVE.PAGE.BREAK",26:"FONT",27:"DISPLAY",28:"PROTECT.DOCUMENT",29:"PRECISION",30:"A1.R1C1",31:"CALCULATE.NOW",32:"CALCULATION",34:"DATA.FIND",35:"EXTRACT",36:"DATA.DELETE",37:"SET.DATABASE",38:"SET.CRITERIA",39:"SORT",40:"DATA.SERIES",41:"TABLE",42:"FORMAT.NUMBER",43:"ALIGNMENT",44:"STYLE",45:"BORDER",46:"CELL.PROTECTION",47:"COLUMN.WIDTH",48:"UNDO",49:"CUT",50:"COPY",51:"PASTE",52:"CLEAR",53:"PASTE.SPECIAL",54:"EDIT.DELETE",55:"INSERT",56:"FILL.RIGHT",57:"FILL.DOWN",61:"DEFINE.NAME",62:"CREATE.NAMES",63:"FORMULA.GOTO",64:"FORMULA.FIND",65:"SELECT.LAST.CELL",66:"SHOW.ACTIVE.CELL",67:"GALLERY.AREA",68:"GALLERY.BAR",69:"GALLERY.COLUMN",70:"GALLERY.LINE",71:"GALLERY.PIE",72:"GALLERY.SCATTER",73:"COMBINATION",74:"PREFERRED",75:"ADD.OVERLAY",76:"GRIDLINES",77:"SET.PREFERRED",78:"AXES",79:"LEGEND",80:"ATTACH.TEXT",81:"ADD.ARROW",82:"SELECT.CHART",83:"SELECT.PLOT.AREA",84:"PATTERNS",85:"MAIN.CHART",86:"OVERLAY",87:"SCALE",88:"FORMAT.LEGEND",89:"FORMAT.TEXT",90:"EDIT.REPEAT",91:"PARSE",92:"JUSTIFY",93:"HIDE",94:"UNHIDE",95:"WORKSPACE",96:"FORMULA",97:"FORMULA.FILL",98:"FORMULA.ARRAY",99:"DATA.FIND.NEXT",100:"DATA.FIND.PREV",101:"FORMULA.FIND.NEXT",102:"FORMULA.FIND.PREV",103:"ACTIVATE",104:"ACTIVATE.NEXT",105:"ACTIVATE.PREV",106:"UNLOCKED.NEXT",107:"UNLOCKED.PREV",108:"COPY.PICTURE",109:"SELECT",110:"DELETE.NAME",111:"DELETE.FORMAT",112:"VLINE",113:"HLINE",114:"VPAGE",115:"HPAGE",116:"VSCROLL",117:"HSCROLL",118:"ALERT",119:"NEW",120:"CANCEL.COPY",121:"SHOW.CLIPBOARD",122:"MESSAGE",124:"PASTE.LINK",125:"APP.ACTIVATE",126:"DELETE.ARROW",127:"ROW.HEIGHT",128:"FORMAT.MOVE",129:"FORMAT.SIZE",130:"FORMULA.REPLACE",131:"SEND.KEYS",132:"SELECT.SPECIAL",133:"APPLY.NAMES",134:"REPLACE.FONT",135:"FREEZE.PANES",136:"SHOW.INFO",137:"SPLIT",138:"ON.WINDOW",139:"ON.DATA",140:"DISABLE.INPUT",142:"OUTLINE",143:"LIST.NAMES",144:"FILE.CLOSE",145:"SAVE.WORKBOOK",146:"DATA.FORM",147:"COPY.CHART",148:"ON.TIME",149:"WAIT",150:"FORMAT.FONT",151:"FILL.UP",152:"FILL.LEFT",153:"DELETE.OVERLAY",155:"SHORT.MENUS",159:"SET.UPDATE.STATUS",161:"COLOR.PALETTE",162:"DELETE.STYLE",163:"WINDOW.RESTORE",164:"WINDOW.MAXIMIZE",166:"CHANGE.LINK",167:"CALCULATE.DOCUMENT",168:"ON.KEY",169:"APP.RESTORE",170:"APP.MOVE",171:"APP.SIZE",172:"APP.MINIMIZE",173:"APP.MAXIMIZE",174:"BRING.TO.FRONT",175:"SEND.TO.BACK",185:"MAIN.CHART.TYPE",186:"OVERLAY.CHART.TYPE",187:"SELECT.END",188:"OPEN.MAIL",189:"SEND.MAIL",190:"STANDARD.FONT",191:"CONSOLIDATE",192:"SORT.SPECIAL",193:"GALLERY.3D.AREA",194:"GALLERY.3D.COLUMN",195:"GALLERY.3D.LINE",196:"GALLERY.3D.PIE",197:"VIEW.3D",198:"GOAL.SEEK",199:"WORKGROUP",200:"FILL.GROUP",201:"UPDATE.LINK",202:"PROMOTE",203:"DEMOTE",204:"SHOW.DETAIL",206:"UNGROUP",207:"OBJECT.PROPERTIES",208:"SAVE.NEW.OBJECT",209:"SHARE",210:"SHARE.NAME",211:"DUPLICATE",212:"APPLY.STYLE",213:"ASSIGN.TO.OBJECT",214:"OBJECT.PROTECTION",215:"HIDE.OBJECT",216:"SET.EXTRACT",217:"CREATE.PUBLISHER",218:"SUBSCRIBE.TO",219:"ATTRIBUTES",220:"SHOW.TOOLBAR",222:"PRINT.PREVIEW",223:"EDIT.COLOR",224:"SHOW.LEVELS",225:"FORMAT.MAIN",226:"FORMAT.OVERLAY",227:"ON.RECALC",228:"EDIT.SERIES",229:"DEFINE.STYLE",240:"LINE.PRINT",243:"ENTER.DATA",249:"GALLERY.RADAR",250:"MERGE.STYLES",251:"EDITION.OPTIONS",252:"PASTE.PICTURE",253:"PASTE.PICTURE.LINK",254:"SPELLING",256:"ZOOM",259:"INSERT.OBJECT",260:"WINDOW.MINIMIZE",265:"SOUND.NOTE",266:"SOUND.PLAY",267:"FORMAT.SHAPE",268:"EXTEND.POLYGON",269:"FORMAT.AUTO",272:"GALLERY.3D.BAR",273:"GALLERY.3D.SURFACE",274:"FILL.AUTO",276:"CUSTOMIZE.TOOLBAR",277:"ADD.TOOL",278:"EDIT.OBJECT",279:"ON.DOUBLECLICK",280:"ON.ENTRY",281:"WORKBOOK.ADD",282:"WORKBOOK.MOVE",283:"WORKBOOK.COPY",284:"WORKBOOK.OPTIONS",285:"SAVE.WORKSPACE",288:"CHART.WIZARD",289:"DELETE.TOOL",290:"MOVE.TOOL",291:"WORKBOOK.SELECT",292:"WORKBOOK.ACTIVATE",293:"ASSIGN.TO.TOOL",295:"COPY.TOOL",296:"RESET.TOOL",297:"CONSTRAIN.NUMERIC",298:"PASTE.TOOL",302:"WORKBOOK.NEW",305:"SCENARIO.CELLS",306:"SCENARIO.DELETE",307:"SCENARIO.ADD",308:"SCENARIO.EDIT",309:"SCENARIO.SHOW",310:"SCENARIO.SHOW.NEXT",311:"SCENARIO.SUMMARY",312:"PIVOT.TABLE.WIZARD",313:"PIVOT.FIELD.PROPERTIES",314:"PIVOT.FIELD",315:"PIVOT.ITEM",316:"PIVOT.ADD.FIELDS",318:"OPTIONS.CALCULATION",319:"OPTIONS.EDIT",320:"OPTIONS.VIEW",321:"ADDIN.MANAGER",322:"MENU.EDITOR",323:"ATTACH.TOOLBARS",324:"VBAActivate",325:"OPTIONS.CHART",328:"VBA.INSERT.FILE",330:"VBA.PROCEDURE.DEFINITION",336:"ROUTING.SLIP",338:"ROUTE.DOCUMENT",339:"MAIL.LOGON",342:"INSERT.PICTURE",343:"EDIT.TOOL",344:"GALLERY.DOUGHNUT",350:"CHART.TREND",352:"PIVOT.ITEM.PROPERTIES",354:"WORKBOOK.INSERT",355:"OPTIONS.TRANSITION",356:"OPTIONS.GENERAL",370:"FILTER.ADVANCED",373:"MAIL.ADD.MAILER",374:"MAIL.DELETE.MAILER",375:"MAIL.REPLY",376:"MAIL.REPLY.ALL",377:"MAIL.FORWARD",378:"MAIL.NEXT.LETTER",379:"DATA.LABEL",380:"INSERT.TITLE",381:"FONT.PROPERTIES",382:"MACRO.OPTIONS",383:"WORKBOOK.HIDE",384:"WORKBOOK.UNHIDE",385:"WORKBOOK.DELETE",386:"WORKBOOK.NAME",388:"GALLERY.CUSTOM",390:"ADD.CHART.AUTOFORMAT",391:"DELETE.CHART.AUTOFORMAT",392:"CHART.ADD.DATA",393:"AUTO.OUTLINE",394:"TAB.ORDER",395:"SHOW.DIALOG",396:"SELECT.ALL",397:"UNGROUP.SHEETS",398:"SUBTOTAL.CREATE",399:"SUBTOTAL.REMOVE",400:"RENAME.OBJECT",412:"WORKBOOK.SCROLL",413:"WORKBOOK.NEXT",414:"WORKBOOK.PREV",415:"WORKBOOK.TAB.SPLIT",416:"FULL.SCREEN",417:"WORKBOOK.PROTECT",420:"SCROLLBAR.PROPERTIES",421:"PIVOT.SHOW.PAGES",422:"TEXT.TO.COLUMNS",423:"FORMAT.CHARTTYPE",424:"LINK.FORMAT",425:"TRACER.DISPLAY",430:"TRACER.NAVIGATE",431:"TRACER.CLEAR",432:"TRACER.ERROR",433:"PIVOT.FIELD.GROUP",434:"PIVOT.FIELD.UNGROUP",435:"CHECKBOX.PROPERTIES",436:"LABEL.PROPERTIES",437:"LISTBOX.PROPERTIES",438:"EDITBOX.PROPERTIES",439:"PIVOT.REFRESH",440:"LINK.COMBO",441:"OPEN.TEXT",442:"HIDE.DIALOG",443:"SET.DIALOG.FOCUS",444:"ENABLE.OBJECT",445:"PUSHBUTTON.PROPERTIES",446:"SET.DIALOG.DEFAULT",447:"FILTER",448:"FILTER.SHOW.ALL",449:"CLEAR.OUTLINE",450:"FUNCTION.WIZARD",451:"ADD.LIST.ITEM",452:"SET.LIST.ITEM",453:"REMOVE.LIST.ITEM",454:"SELECT.LIST.ITEM",455:"SET.CONTROL.VALUE",456:"SAVE.COPY.AS",458:"OPTIONS.LISTS.ADD",459:"OPTIONS.LISTS.DELETE",460:"SERIES.AXES",461:"SERIES.X",462:"SERIES.Y",463:"ERRORBAR.X",464:"ERRORBAR.Y",465:"FORMAT.CHART",466:"SERIES.ORDER",467:"MAIL.LOGOFF",468:"CLEAR.ROUTING.SLIP",469:"APP.ACTIVATE.MICROSOFT",470:"MAIL.EDIT.MAILER",471:"ON.SHEET",472:"STANDARD.WIDTH",473:"SCENARIO.MERGE",474:"SUMMARY.INFO",475:"FIND.FILE",476:"ACTIVE.CELL.FONT",477:"ENABLE.TIPWIZARD",478:"VBA.MAKE.ADDIN",480:"INSERTDATATABLE",481:"WORKGROUP.OPTIONS",482:"MAIL.SEND.MAILER",485:"AUTOCORRECT",489:"POST.DOCUMENT",491:"PICKLIST",493:"VIEW.SHOW",494:"VIEW.DEFINE",495:"VIEW.DELETE",509:"SHEET.BACKGROUND",510:"INSERT.MAP.OBJECT",511:"OPTIONS.MENONO",517:"MSOCHECKS",518:"NORMAL",519:"LAYOUT",520:"RM.PRINT.AREA",521:"CLEAR.PRINT.AREA",522:"ADD.PRINT.AREA",523:"MOVE.BRK",545:"HIDECURR.NOTE",546:"HIDEALL.NOTES",547:"DELETE.NOTE",548:"TRAVERSE.NOTES",549:"ACTIVATE.NOTES",620:"PROTECT.REVISIONS",621:"UNPROTECT.REVISIONS",647:"OPTIONS.ME",653:"WEB.PUBLISH",667:"NEWWEBQUERY",673:"PIVOT.TABLE.CHART",753:"OPTIONS.SAVE",755:"OPTIONS.SPELL",808:"HIDEALL.INKANNOTS"},
1324v2e={0:"COUNT",1:"IF",2:"ISNA",3:"ISERROR",4:"SUM",5:"AVERAGE",6:"MIN",7:"MAX",8:"ROW",9:"COLUMN",10:"NA",11:"NPV",12:"STDEV",13:"DOLLAR",14:"FIXED",15:"SIN",16:"COS",17:"TAN",18:"ATAN",19:"PI",20:"SQRT",21:"EXP",22:"LN",23:"LOG10",24:"ABS",25:"INT",26:"SIGN",27:"ROUND",28:"LOOKUP",29:"INDEX",30:"REPT",31:"MID",32:"LEN",33:"VALUE",34:"TRUE",35:"FALSE",36:"AND",37:"OR",38:"NOT",39:"MOD",40:"DCOUNT",41:"DSUM",42:"DAVERAGE",43:"DMIN",44:"DMAX",45:"DSTDEV",46:"VAR",47:"DVAR",48:"TEXT",49:"LINEST",50:"TREND",51:"LOGEST",52:"GROWTH",53:"GOTO",54:"HALT",55:"RETURN",56:"PV",57:"FV",58:"NPER",59:"PMT",60:"RATE",61:"MIRR",62:"IRR",63:"RAND",64:"MATCH",65:"DATE",66:"TIME",67:"DAY",68:"MONTH",69:"YEAR",70:"WEEKDAY",71:"HOUR",72:"MINUTE",73:"SECOND",74:"NOW",75:"AREAS",76:"ROWS",77:"COLUMNS",78:"OFFSET",79:"ABSREF",80:"RELREF",81:"ARGUMENT",82:"SEARCH",83:"TRANSPOSE",84:"ERROR",85:"STEP",86:"TYPE",87:"ECHO",88:"SET.NAME",89:"CALLER",90:"DEREF",91:"WINDOWS",92:"SERIES",93:"DOCUMENTS",94:"ACTIVE.CELL",95:"SELECTION",96:"RESULT",97:"ATAN2",98:"ASIN",99:"ACOS",100:"CHOOSE",101:"HLOOKUP",102:"VLOOKUP",103:"LINKS",104:"INPUT",105:"ISREF",106:"GET.FORMULA",107:"GET.NAME",108:"SET.VALUE",109:"LOG",110:"EXEC",111:"CHAR",112:"LOWER",113:"UPPER",114:"PROPER",115:"LEFT",116:"RIGHT",117:"EXACT",118:"TRIM",119:"REPLACE",120:"SUBSTITUTE",121:"CODE",122:"NAMES",123:"DIRECTORY",124:"FIND",125:"CELL",126:"ISERR",127:"ISTEXT",128:"ISNUMBER",129:"ISBLANK",130:"T",131:"N",132:"FOPEN",133:"FCLOSE",134:"FSIZE",135:"FREADLN",136:"FREAD",137:"FWRITELN",138:"FWRITE",139:"FPOS",140:"DATEVALUE",141:"TIMEVALUE",142:"SLN",143:"SYD",144:"DDB",145:"GET.DEF",146:"REFTEXT",147:"TEXTREF",148:"INDIRECT",149:"REGISTER",150:"CALL",151:"ADD.BAR",152:"ADD.MENU",153:"ADD.COMMAND",154:"ENABLE.COMMAND",155:"CHECK.COMMAND",156:"RENAME.COMMAND",157:"SHOW.BAR",158:"DELETE.MENU",159:"DELETE.COMMAND",160:"GET.CHART.ITEM",161:"DIALOG.BOX",162:"CLEAN",163:"MDETERM",164:"MINVERSE",165:"MMULT",166:"FILES",167:"IPMT",168:"PPMT",169:"COUNTA",170:"CANCEL.KEY",171:"FOR",172:"WHILE",173:"BREAK",174:"NEXT",175:"INITIATE",176:"REQUEST",177:"POKE",178:"EXECUTE",179:"TERMINATE",180:"RESTART",181:"HELP",182:"GET.BAR",183:"PRODUCT",184:"FACT",185:"GET.CELL",186:"GET.WORKSPACE",187:"GET.WINDOW",188:"GET.DOCUMENT",189:"DPRODUCT",190:"ISNONTEXT",191:"GET.NOTE",192:"NOTE",193:"STDEVP",194:"VARP",195:"DSTDEVP",196:"DVARP",197:"TRUNC",198:"ISLOGICAL",199:"DCOUNTA",200:"DELETE.BAR",201:"UNREGISTER",204:"USDOLLAR",205:"FINDB",206:"SEARCHB",207:"REPLACEB",208:"LEFTB",209:"RIGHTB",210:"MIDB",211:"LENB",212:"ROUNDUP",213:"ROUNDDOWN",214:"ASC",215:"DBCS",216:"RANK",219:"ADDRESS",220:"DAYS360",221:"TODAY",222:"VDB",223:"ELSE",224:"ELSE.IF",225:"END.IF",226:"FOR.CELL",227:"MEDIAN",228:"SUMPRODUCT",229:"SINH",230:"COSH",231:"TANH",232:"ASINH",233:"ACOSH",234:"ATANH",235:"DGET",236:"CREATE.OBJECT",237:"VOLATILE",238:"LAST.ERROR",239:"CUSTOM.UNDO",240:"CUSTOM.REPEAT",241:"FORMULA.CONVERT",242:"GET.LINK.INFO",243:"TEXT.BOX",244:"INFO",245:"GROUP",246:"GET.OBJECT",247:"DB",248:"PAUSE",251:"RESUME",252:"FREQUENCY",253:"ADD.TOOLBAR",254:"DELETE.TOOLBAR",255:"User",256:"RESET.TOOLBAR",257:"EVALUATE",258:"GET.TOOLBAR",259:"GET.TOOL",260:"SPELLING.CHECK",261:"ERROR.TYPE",262:"APP.TITLE",263:"WINDOW.TITLE",264:"SAVE.TOOLBAR",265:"ENABLE.TOOL",266:"PRESS.TOOL",267:"REGISTER.ID",268:"GET.WORKBOOK",269:"AVEDEV",270:"BETADIST",271:"GAMMALN",272:"BETAINV",273:"BINOMDIST",274:"CHIDIST",275:"CHIINV",276:"COMBIN",277:"CONFIDENCE",278:"CRITBINOM",279:"EVEN",280:"EXPONDIST",281:"FDIST",282:"FINV",283:"FISHER",284
vendor: 6,120 bytes, line 1324
1324:"FISHERINV",285:"FLOOR",286:"GAMMADIST",287:"GAMMAINV",288:"CEILING",289:"HYPGEOMDIST",290:"LOGNORMDIST",291:"LOGINV",292:"NEGBINOMDIST",293:"NORMDIST",294:"NORMSDIST",295:"NORMINV",296:"NORMSINV",297:"STANDARDIZE",298:"ODD",299:"PERMUT",300:"POISSON",301:"TDIST",302:"WEIBULL",303:"SUMXMY2",304:"SUMX2MY2",305:"SUMX2PY2",306:"CHITEST",307:"CORREL",308:"COVAR",309:"FORECAST",310:"FTEST",311:"INTERCEPT",312:"PEARSON",313:"RSQ",314:"STEYX",315:"SLOPE",316:"TTEST",317:"PROB",318:"DEVSQ",319:"GEOMEAN",320:"HARMEAN",321:"SUMSQ",322:"KURT",323:"SKEW",324:"ZTEST",325:"LARGE",326:"SMALL",327:"QUARTILE",328:"PERCENTILE",329:"PERCENTRANK",330:"MODE",331:"TRIMMEAN",332:"TINV",334:"MOVIE.COMMAND",335:"GET.MOVIE",336:"CONCATENATE",337:"POWER",338:"PIVOT.ADD.DATA",339:"GET.PIVOT.TABLE",340:"GET.PIVOT.FIELD",341:"GET.PIVOT.ITEM",342:"RADIANS",343:"DEGREES",344:"SUBTOTAL",345:"SUMIF",346:"COUNTIF",347:"COUNTBLANK",348:"SCENARIO.GET",349:"OPTIONS.LISTS.GET",350:"ISPMT",351:"DATEDIF",352:"DATESTRING",353:"NUMBERSTRING",354:"ROMAN",355:"OPEN.DIALOG",356:"SAVE.DIALOG",357:"VIEW.GET",358:"GETPIVOTDATA",359:"HYPERLINK",360:"PHONETIC",361:"AVERAGEA",362:"MAXA",363:"MINA",364:"STDEVPA",365:"VARPA",366:"STDEVA",367:"VARA",368:"BAHTTEXT",369:"THAIDAYOFWEEK",370:"THAIDIGIT",371:"THAIMONTHOFYEAR",372:"THAINUMSOUND",373:"THAINUMSTRING",374:"THAISTRINGLENGTH",375:"ISTHAIDIGIT",376:"ROUNDBAHTDOWN",377:"ROUNDBAHTUP",378:"THAIYEAR",379:"RTD",380:"CUBEVALUE",381:"CUBEMEMBER",382:"CUBEMEMBERPROPERTY",383:"CUBERANKEDMEMBER",384:"HEX2BIN",385:"HEX2DEC",386:"HEX2OCT",387:"DEC2BIN",388:"DEC2HEX",389:"DEC2OCT",390:"OCT2BIN",391:"OCT2HEX",392:"OCT2DEC",393:"BIN2DEC",394:"BIN2OCT",395:"BIN2HEX",396:"IMSUB",397:"IMDIV",398:"IMPOWER",399:"IMABS",400:"IMSQRT",401:"IMLN",402:"IMLOG2",403:"IMLOG10",404:"IMSIN",405:"IMCOS",406:"IMEXP",407:"IMARGUMENT",408:"IMCONJUGATE",409:"IMAGINARY",410:"IMREAL",411:"COMPLEX",412:"IMSUM",413:"IMPRODUCT",414:"SERIESSUM",415:"FACTDOUBLE",416:"SQRTPI",417:"QUOTIENT",418:"DELTA",419:"GESTEP",420:"ISEVEN",421:"ISODD",422:"MROUND",423:"ERF",424:"ERFC",425:"BESSELJ",426:"BESSELK",427:"BESSELY",428:"BESSELI",429:"XIRR",430:"XNPV",431:"PRICEMAT",432:"YIELDMAT",433:"INTRATE",434:"RECEIVED",435:"DISC",436:"PRICEDISC",437:"YIELDDISC",438:"TBILLEQ",439:"TBILLPRICE",440:"TBILLYIELD",441:"PRICE",442:"YIELD",443:"DOLLARDE",444:"DOLLARFR",445:"NOMINAL",446:"EFFECT",447:"CUMPRINC",448:"CUMIPMT",449:"EDATE",450:"EOMONTH",451:"YEARFRAC",452:"COUPDAYBS",453:"COUPDAYS",454:"COUPDAYSNC",455:"COUPNCD",456:"COUPNUM",457:"COUPPCD",458:"DURATION",459:"MDURATION",460:"ODDLPRICE",461:"ODDLYIELD",462:"ODDFPRICE",463:"ODDFYIELD",464:"RANDBETWEEN",465:"WEEKNUM",466:"AMORDEGRC",467:"AMORLINC",468:"CONVERT",724:"SHEETJS",469:"ACCRINT",470:"ACCRINTM",471:"WORKDAY",472:"NETWORKDAYS",473:"GCD",474:"MULTINOMIAL",475:"LCM",476:"FVSCHEDULE",477:"CUBEKPIMEMBER",478:"CUBESET",479:"CUBESETCOUNT",480:"IFERROR",481:"COUNTIFS",482:"SUMIFS",483:"AVERAGEIF",484:"AVERAGEIFS"},_At={2:1,3:1,10:0,15:1,16:1,17:1,18:1,19:0,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:2,30:2,31:3,32:1,33:1,34:0,35:0,38:1,39:2,40:3,41:3,42:3,43:3,44:3,45:3,47:3,48:2,53:1,61:3,63:0,65:3,66:3,67:1,68:1,69:1,70:1,71:1,72:1,73:1,74:0,75:1,76:1,77:1,79:2,80:2,83:1,85:0,86:1,89:0,90:1,94:0,95:0,97:2,98:1,99:1,101:3,102:3,105:1,106:1,108:2,111:1,112:1,113:1,114:1,117:2,118:1,119:4,121:1,126:1,127:1,128:1,129:1,130:1,131:1,133:1,134:1,135:1,136:2,137:2,138:2,140:1,141:1,142:3,143:4,144:4,161:1,162:1,163:1,164:1,165:2,172:1,175:2,176:2,177:3,178:2,179:1,184:1,186:1,189:3,190:1,195:3,196:3,197:1,198:1,199:3,201:1,207:4,210:3,211:1,212:2,213:2,214:1,215:1,225:0,229:1,230:1,231:1,232:1,233:1,234:1,235:3,244:1,247:4,252:2,257:1,261:1,271:1,273:4,274:2,275:2,276:2,277:3,278:3,279:1,280:3,281:3,282:3,283:1,284:1,285:2,286:4,287:3,288:2,289:4,290:3,291:3,292:3,293:4,294:1,295:3,296:1,297:3,298:1,299:2,300:3,301:3,302:4,303:2,304:2,305:2,306:2,307:2,308:2,309:3,310:2,311:2,312:2,313:2,314:2,315:2,316:4,325:2,326:2,327:2,328:2,331:2,332:2,337:2,342:1,343:1,346:2,347:1,350:4,351:3,352:1,353:2,360:1,368:1,369:1,370:1,371:1,372:1,373:1,374:1,375:1,376:1,377:1,378:1,382:3,385:1,392:1,393:1,396:2,397:2,398:2,399:1,400:1,401:1,402:1,403:1,404:1,405:1,406:1,407:1,408:1,409:1,410:1,414:4,415:1,416:1,417:2,420:1,421:1,422:2,424:1,425:2,426:2,427:2,428:2,430:3,438:3,439:3,440:3,443:2,444:2,445:2,446:2,447:6,448:6,449:2,450:2,464:2,468:3,476:2,479:1,480:2,65535:0};function wAt(e){var t="of:="+e.replace(_U,"$1[.$2$3$4$5]").replace(/\]:\[/g,":");return t.replace(/;/g,"|").replace(/,/g,";")}function SAt(e){return e.replace(/\./,"!")}var h2=typeof Map<"u";function EU(e,t,n){var r=0,i=e.length;if(n){if(h2?n.has(t):Object.prototype.hasOwnProperty.call(n,t)){for(var s=h2?n.get(t):n[t];r<s.length;++r)if(e[s[r]].t===t)return e.Count++,s[r]}}else for(;r<i;++r)if(e[r].t===t)return e.Count++,r;return e[i]={t},e.Count++,e.Unique++,n&&(h2?(n.has(t)||n.set(t,[]),n.get(t).push(i)):(Object.prototype.hasOwnProperty.call(n,t)||(n[t]=[]),n[t].push(i))),i}function q4(e,t){var n={min:e+1,max:e+1},r=-1;return t.MDW&&(fh=t.MDW),t.width!=null?n.customWidth=1:t.wpx!=null?r=lj(t.wpx):t.wch!=null&&(r=t.wch),r>-1?(n.width=ML(r),n.customWidth=1):t.width!=null&&(n.width=t.width),t.hidden&&(n.hidden=!0),t.level!=null&&(n.outlineLevel=n.level=t.level),n}function y2e(e,t){if(e){var n=[.7,.7,.75,.75,.3,.3];e.left==null&&(e.left=n[0]),e.right==null&&(e.right=n[1]),e.top==null&&(e.top=n[2]),e.bottom==null&&(e.bottom=n[3]),e.header==null&&(e.header=n[4]),e.footer==null&&(e.footer=n[5])}}function Zm(e,t,n){var r=n.revssf[t.z!=null?t.z:"General"],i=60,s=e.length;if(r==null&&n.ssf){for(;i<392;++i)if(n.ssf[i]==null){pwe(t.z,i),n.ssf[i]=t.z,n.revssf[t.z]=r=i;break}}for(i=0;i!=s;++i)if(e[i].numFmtId===r)return i;return e[s]={numFmtId:r,fontId:0,fillId:0,borderId:0,xfId:0,applyNumberFormat:1},s}function EAt(e,t,n){if(e&&e["!ref"]){var r=Hi(e["!ref"]);if(r.e.c<r.s.c||r.e.r<r.s.r)throw new Error("Bad range ("+n+"): "+e["!ref"])}}function CAt(e){if(e.length===0)return"";for(var t='<mergeCells count="'+e.length+'">',n=0;n!=e.length;++n)t+='<mergeCell ref="'+ia(e[n])+'"/>';
vendor: 7,258 bytes, line 1324
1324return t+"</mergeCells>"}function TAt(e,t,n,r,i){var s=!1,a={},o=null;if(r.bookType!=="xlsx"&&t.vbaraw){var c=t.SheetNames[n];try{t.Workbook&&(c=t.Workbook.Sheets[n].CodeName||c)}catch{}s=!0,a.codeName=US(li(c))}if(e&&e["!outline"]){var u={summaryBelow:1,summaryRight:1};e["!outline"].above&&(u.summaryBelow=0),e["!outline"].left&&(u.summaryRight=0),o=(o||"")+Bt("outlinePr",null,u)}!s&&!o||(i[i.length]=Bt("sheetPr",o,a))}var AAt=["objects","scenarios","selectLockedCells","selectUnlockedCells"],kAt=["formatColumns","formatRows","formatCells","insertColumns","insertRows","insertHyperlinks","deleteColumns","deleteRows","sort","autoFilter","pivotTables"];function NAt(e){var t={sheet:1};return AAt.forEach(function(n){e[n]!=null&&e[n]&&(t[n]="1")}),kAt.forEach(function(n){e[n]!=null&&!e[n]&&(t[n]="0")}),e.password&&(t.password=n2e(e.password).toString(16).toUpperCase()),Bt("sheetProtection",null,t)}function jAt(e){return y2e(e),Bt("pageMargins",null,e)}function RAt(e,t){for(var n=["<cols>"],r,i=0;i!=t.length;++i)(r=t[i])&&(n[n.length]=Bt("col",null,q4(i,r)));return n[n.length]="</cols>",n.join("")}function IAt(e,t,n,r){var i=typeof e.ref=="string"?e.ref:ia(e.ref);n.Workbook||(n.Workbook={Sheets:[]}),n.Workbook.Names||(n.Workbook.Names=[]);var s=n.Workbook.Names,a=Xl(i);a.s.r==a.e.r&&(a.e.r=Xl(t["!ref"]).e.r,i=ia(a));for(var o=0;o<s.length;++o){var c=s[o];if(c.Name=="_xlnm._FilterDatabase"&&c.Sheet==r){c.Ref="'"+n.SheetNames[r]+"'!"+i;break}}return o==s.length&&s.push({Name:"_xlnm._FilterDatabase",Sheet:r,Ref:"'"+n.SheetNames[r]+"'!"+i}),Bt("autoFilter",null,{ref:i})}function OAt(e,t,n,r){var i={workbookViewId:"0"};return(((r||{}).Workbook||{}).Views||[])[0]&&(i.rightToLeft=r.Workbook.Views[0].RTL?"1":"0"),Bt("sheetViews",Bt("sheetView",null,i),{})}function PAt(e,t,n,r){if(e.c&&n["!comments"].push([t,e.c]),e.v===void 0&&typeof e.f!="string"||e.t==="z"&&!e.f)return"";var i="",s=e.t,a=e.v;if(e.t!=="z")switch(e.t){case"b":i=e.v?"1":"0";break;case"n":i=""+e.v;break;case"e":i=cC[e.v];break;case"d":r&&r.cellDates?i=Bo(e.v,-1).toISOString():(e=vl(e),e.t="n",i=""+(e.v=xl(Bo(e.v)))),typeof e.z>"u"&&(e.z=Ts[14]);break;default:i=e.v;break}var o=Ka("v",li(i)),c={r:t},u=Zm(r.cellXfs,e,r);switch(u!==0&&(c.s=u),e.t){case"n":break;case"d":c.t="d";break;case"b":c.t="b";break;case"e":c.t="e";break;case"z":break;default:if(e.v==null){delete e.t;break}if(e.v.length>32767)throw new Error("Text length must not exceed 32767 characters");if(r&&r.bookSST){o=Ka("v",""+EU(r.Strings,e.v,r.revStrings)),c.t="s";break}c.t="str";break}if(e.t!=s&&(e.t=s,e.v=a),typeof e.f=="string"&&e.f){var d=e.F&&e.F.slice(0,t.length)==t?{t:"array",ref:e.F}:null;o=Bt("f",li(e.f),d)+(e.v!=null?o:"")}return e.l&&n["!links"].push([t,e.l]),e.D&&(c.cm=1),Bt("c",o,c)}function MAt(e,t,n,r){var i=[],s=[],a=Hi(e["!ref"]),o="",c,u="",d=[],h=0,p=0,g=e["!rows"],v=Array.isArray(e),x={r:u},_,w=-1;for(p=a.s.c;p<=a.e.c;++p)d[p]=vo(p);for(h=a.s.r;h<=a.e.r;++h){for(s=[],u=Za(h),p=a.s.c;p<=a.e.c;++p){c=d[p]+u;var S=v?(e[h]||[])[p]:e[c];S!==void 0&&(o=PAt(S,c,e,t))!=null&&s.push(o)}(s.length>0||g&&g[h])&&(x={r:u},g&&g[h]&&(_=g[h],_.hidden&&(x.hidden=1),w=-1,_.hpx?w=cj(_.hpx):_.hpt&&(w=_.hpt),w>-1&&(x.ht=w,x.customHeight=1),_.level&&(x.outlineLevel=_.level)),i[i.length]=Bt("row",s.join(""),x))}if(g)for(;h<g.length;++h)g&&g[h]&&(x={r:h+1},_=g[h],_.hidden&&(x.hidden=1),w=-1,_.hpx?w=cj(_.hpx):_.hpt&&(w=_.hpt),w>-1&&(x.ht=w,x.customHeight=1),_.level&&(x.outlineLevel=_.level),i[i.length]=Bt("row","",x));return i.join("")}function b2e(e,t,n,r){var i=[oa,Bt("worksheet",null,{xmlns:pb[0],"xmlns:r":Ta.r})],s=n.SheetNames[e],a=0,o="",c=n.Sheets[s];c==null&&(c={});var u=c["!ref"]||"A1",d=Hi(u);if(d.e.c>16383||d.e.r>1048575){if(t.WTF)throw new Error("Range "+u+" exceeds format limit A1:XFD1048576");d.e.c=Math.min(d.e.c,16383),d.e.r=Math.min(d.e.c,1048575),u=ia(d)}r||(r={}),c["!comments"]=[];var h=[];TAt(c,n,e,t,i),i[i.length]=Bt("dimension",null,{ref:u}),i[i.length]=OAt(c,t,e,n),t.sheetFormat&&(i[i.length]=Bt("sheetFormatPr",null,{defaultRowHeight:t.sheetFormat.defaultRowHeight||"16",baseColWidth:t.sheetFormat.baseColWidth||"10",outlineLevelRow:t.sheetFormat.outlineLevelRow||"7"})),c["!cols"]!=null&&c["!cols"].length>0&&(i[i.length]=RAt(c,c["!cols"])),i[a=i.length]="<sheetData/>",c["!links"]=[],c["!ref"]!=null&&(o=MAt(c,t),o.length>0&&(i[i.length]=o)),i.length>a+1&&(i[i.length]="</sheetData>",i[a]=i[a].replace("/>",">")),c["!protect"]&&(i[i.length]=NAt(c["!protect"])),c["!autofilter"]!=null&&(i[i.length]=IAt(c["!autofilter"],c,n,e)),c["!merges"]!=null&&c["!merges"].length>0&&(i[i.length]=CAt(c["!merges"]));var p=-1,g,v=-1;return c["!links"].length>0&&(i[i.length]="<hyperlinks>",c["!links"].forEach(function(x){x[1].Target&&(g={ref:x[0]},x[1].Target.charAt(0)!="#"&&(v=si(r,-1,li(x[1].Target).replace(/#.*$/,""),zr.HLINK),g["r:id"]="rId"+v),(p=x[1].Target.indexOf("#"))>-1&&(g.location=li(x[1].Target.slice(p+1))),x[1].Tooltip&&(g.tooltip=li(x[1].Tooltip)),i[i.length]=Bt("hyperlink",null,g))}),i[i.length]="</hyperlinks>"),delete c["!links"],c["!margins"]!=null&&(i[i.length]=jAt(c["!margins"])),(!t||t.ignoreEC||t.ignoreEC==null)&&(i[i.length]=Ka("ignoredErrors",Bt("ignoredError",null,{numberStoredAsText:1,sqref:u}))),h.length>0&&(v=si(r,-1,"../drawings/drawing"+(e+1)+".xml",zr.DRAW),i[i.length]=Bt("drawing",null,{"r:id":"rId"+v}),c["!drawing"]=h),c["!comments"].length>0&&(v=si(r,-1,"../drawings/vmlDrawing"+(e+1)+".vml",zr.VML),i[i.length]=Bt("legacyDrawing",null,{"r:id":"rId"+v}),c["!legacy"]=v),i.length>1&&(i[i.length]="</worksheet>",i[1]=i[1].replace("/>",">")),i.join("")}function DAt(e,t){var n={},r=e.l+t;n.r=e.read_shift(4),e.l+=4;var i=e.read_shift(2);e.l+=1;var s=e.read_shift(1);return e.l=r,s&7&&(n.level=s&7),s&16&&(n.hidden=!0),s&32&&(n.hpt=i/20),n}function FAt(e,t,n){var r=ut(145),i=(n["!rows"]||[])[e]||{};r.write_shift(4,e),r.write_shift(4,0);var s=320;i.hpx?s=cj(i.hpx)*20:i.hpt&&(s=i.hpt*20),r.write_shift(2,s),r.write_shift(1,0);var a=0;i.level&&(a|=i.level),i.hidden&&(a|=16),(i.hpx||i.hpt)&&(a|=32),r.write_shift(1,a),r.write_shift(1,0);var o=0,c=r.l;r.l+=4;for(var u={r:e,c:0},d=0;d<16;++d)if(!(t.s.c>d+1<<10||t.e.c<d<<10)){for(var h=-1,p=-1,g=d<<10;g<d+1<<10;++g){u.c=g;var v=Array.isArray(n)?(n[u.r]||[])[u.c]:n[ci(u)];v&&(h<0&&(h=g),p=g)}h<0||(++o,r.write_shift(4,h),r.write_shift(4,p))}var x=r.l;return r.l=c,r.write_shift(4,o),r.l=x,r.length>r.l?r.slice(0,r.l):r}function LAt(e,t,n,r){var i=FAt(r,n,t);(i.length>17||(t["!rows"]||[])[r])&&Et(e,0,i)}var zAt=Ox,$At=gb;function BAt(){}function UAt(e,t){var n={},r=e[e.l];return++e.l,n.above=!(r&64),n.left=!(r&128),e.l+=18,n.name=ZSt(e),n}function VAt(e,t,n){n==null&&(n=ut(84+4*e.length));var r=192;t&&(t.above&&(r&=-65),t.left&&(r&=-129)),n.write_shift(1,r);for(var i=1;i<3;++i)n.write_shift(1,0);return sj({auto:1},n),n.write_shift(-4,-1),n.write_shift(-4,-1),Mwe(e,n),n.slice(0,n.l)}function HAt(e){var t=Gc(e);return[t]}function qAt(e,t,n){return n==null&&(n=ut(8)),jx(t,n)}function WAt(e){var t=Rx(e);return[t]}function GAt(e,t,n){return n==null&&(n=ut(4)),Ix(t,n)}function KAt(e){var t=Gc(e),n=e.read_shift(1);return[t,n,"b"]}function YAt(e,t,n){return n==null&&(n=ut(9)),jx(t,n),n.write_shift(1,e.v?1:0),n}function XAt(e){var t=Rx(e),n=e.read_shift(1);return[t,n,"b"]}
1324function QAt(e,t,n){return n==null&&(n=ut(5)),Ix(t,n),n.write_shift(1,e.v?1:0),n}function ZAt(e){var t=Gc(e),n=e.read_shift(1);return[t,n,"e"]}function JAt(e,t,n){return n==null&&(n=ut(9)),jx(t,n),n.write_shift(1,e.v),n}function ekt(e){var t=Rx(e),n=e.read_shift(1);return[t,n,"e"]}function tkt(e,t,n){return n==null&&(n=ut(8)),Ix(t,n),n.write_shift(1,e.v),n.write_shift(2,0),n.write_shift(1,0),n}function nkt(e){var t=Gc(e),n=e.read_shift(4);return[t,n,"s"]}function rkt(e,t,n){return n==null&&(n=ut(12)),jx(t,n),n.write_shift(4,t.v),n}function ikt(e){var t=Rx(e),n=e.read_shift(4);return[t,n,"s"]}function skt(e,t,n){return n==null&&(n=ut(8)),Ix(t,n),n.write_shift(4,t.v),n}function akt(e){var t=Gc(e),n=xb(e);return[t,n,"n"]}function okt(e,t,n){return n==null&&(n=ut(16)),jx(t,n),tx(e.v,n),n}function lkt(e){var t=Rx(e),n=xb(e);return[t,n,"n"]}function ckt(e,t,n){return n==null&&(n=ut(12)),Ix(t,n),tx(e.v,n),n}function ukt(e){var t=Gc(e),n=Dwe(e);return[t,n,"n"]}function dkt(e,t,n){return n==null&&(n=ut(12)),jx(t,n),Fwe(e.v,n),n}function fkt(e){var t=Rx(e),n=Dwe(e);return[t,n,"n"]}function hkt(e,t,n){return n==null&&(n=ut(8)),Ix(t,n),Fwe(e.v,n),n}function pkt(e){var t=Gc(e),n=gU(e);return[t,n,"is"]}function mkt(e){var t=Gc(e),n=yo(e);return[t,n,"str"]}function gkt(e,t,n){return n==null&&(n=ut(12+4*e.v.length)),jx(t,n),ka(e.v,n),n.length>n.l?n.slice(0,n.l):n}function xkt(e){var t=Rx(e),n=yo(e);return[t,n,"str"]}function vkt(e,t,n){return n==null&&(n=ut(8+4*e.v.length)),Ix(t,n),ka(e.v,n),n.length>n.l?n.slice(0,n.l):n}function ykt(e,t,n){var r=e.l+t,i=Gc(e);i.r=n["!row"];var s=e.read_shift(1),a=[i,s,"b"];if(n.cellFormula){e.l+=2;var o=H4(e,r-e.l,n);a[3]=Ty(o,null,i,n.supbooks,n)}else e.l=r;return a}function bkt(e,t,n){var r=e.l+t,i=Gc(e);i.r=n["!row"];var s=e.read_shift(1),a=[i,s,"e"];if(n.cellFormula){e.l+=2;var o=H4(e,r-e.l,n);a[3]=Ty(o,null,i,n.supbooks,n)}else e.l=r;return a}function _kt(e,t,n){var r=e.l+t,i=Gc(e);i.r=n["!row"];var s=xb(e),a=[i,s,"n"];if(n.cellFormula){e.l+=2;var o=H4(e,r-e.l,n);a[3]=Ty(o,null,i,n.supbooks,n)}else e.l=r;return a}function wkt(e,t,n){var r=e.l+t,i=Gc(e);i.r=n["!row"];var s=yo(e),a=[i,s,"str"];if(n.cellFormula){e.l+=2;var o=H4(e,r-e.l,n);a[3]=Ty(o,null,i,n.supbooks,n)}else e.l=r;return a}var Skt=Ox,Ekt=gb;function Ckt(e,t){return t==null&&(t=ut(4)),t.write_shift(4,e),t}function Tkt(e,t){var n=e.l+t,r=Ox(e),i=xU(e),s=yo(e),a=yo(e),o=yo(e);e.l=n;var c={rfx:r,relId:i,loc:s,display:o};return a&&(c.Tooltip=a),c}function Akt(e,t){var n=ut(50+4*(e[1].Target.length+(e[1].Tooltip||"").length));gb({s:Aa(e[0]),e:Aa(e[0])},n),vU("rId"+t,n);var r=e[1].Target.indexOf("#"),i=r==-1?"":e[1].Target.slice(r+1);return ka(i||"",n),ka(e[1].Tooltip||"",n),ka("",n),n.slice(0,n.l)}function kkt(){}function Nkt(e,t,n){var r=e.l+t,i=Lwe(e),s=e.read_shift(1),a=[i];if(a[2]=s,n.cellFormula){var o=xAt(e,r-e.l,n);a[1]=o}else e.l=r;return a}function jkt(e,t,n){var r=e.l+t,i=Ox(e),s=[i];if(n.cellFormula){var a=yAt(e,r-e.l,n);s[1]=a,e.l=r}else e.l=r;return s}function Rkt(e,t,n){n==null&&(n=ut(18));var r=q4(e,t);n.write_shift(-4,e),n.write_shift(-4,e),n.write_shift(4,(r.width||10)*256),n.write_shift(4,0);var i=0;return t.hidden&&(i|=1),typeof r.width=="number"&&(i|=2),t.level&&(i|=t.level<<8),n.write_shift(2,i),n}var _2e=["left","right","top","bottom","header","footer"];function Ikt(e){var t={};return _2e.forEach(function(n){t[n]=xb(e)}),t}function Okt(e,t){return t==null&&(t=ut(48)),y2e(e),_2e.forEach(function(n){tx(e[n],t)}),t}function Pkt(e){var t=e.read_shift(2);return e.l+=28,{RTL:t&32}}function Mkt(e,t,n){n==null&&(n=ut(30));var r=924;return(((t||{}).Views||[])[0]||{}).RTL&&(r|=32),n.write_shift(2,r),n.write_shift(4,0),n.write_shift(4,0),n.write_shift(4,0),n.write_shift(1,0),n.write_shift(1,0),n.write_shift(2,0),n.write_shift(2,100),n.write_shift(2,0),n.write_shift(2,0),n.write_shift(2,0),n.write_shift(4,0),n}function Dkt(e){var t=ut(24);return t.write_shift(4,4),t.write_shift(4,1),gb(e,t),t}function Fkt(e,t){return t==null&&(t=ut(66)),t.write_shift(2,e.password?n2e(e.password):0),t.write_shift(4,1),[["objects",!1],["scenarios",!1],["formatCells",!0],["formatColumns",!0],["formatRows",!0],["insertColumns",!0],["insertRows",!0],["insertHyperlinks",!0],["deleteColumns",!0],["deleteRows",!0],["selectLockedCells",!1],["sort",!0],["autoFilter",!0],["pivotTables",!0],["selectUnlockedCells",!1]].forEac
vendor: 4,398 bytes, line 1324
1324h(function(n){n[1]?t.write_shift(4,e[n[0]]!=null&&!e[n[0]]?1:0):t.write_shift(4,e[n[0]]!=null&&e[n[0]]?0:1)}),t}function Lkt(){}function zkt(){}function $kt(e,t,n,r,i,s,a){if(t.v===void 0)return!1;var o="";switch(t.t){case"b":o=t.v?"1":"0";break;case"d":t=vl(t),t.z=t.z||Ts[14],t.v=xl(Bo(t.v)),t.t="n";break;case"n":case"e":o=""+t.v;break;default:o=t.v;break}var c={r:n,c:r};switch(c.s=Zm(i.cellXfs,t,i),t.l&&s["!links"].push([ci(c),t.l]),t.c&&s["!comments"].push([ci(c),t.c]),t.t){case"s":case"str":return i.bookSST?(o=EU(i.Strings,t.v,i.revStrings),c.t="s",c.v=o,a?Et(e,18,skt(t,c)):Et(e,7,rkt(t,c))):(c.t="str",a?Et(e,17,vkt(t,c)):Et(e,6,gkt(t,c))),!0;case"n":return t.v==(t.v|0)&&t.v>-1e3&&t.v<1e3?a?Et(e,13,hkt(t,c)):Et(e,2,dkt(t,c)):a?Et(e,16,ckt(t,c)):Et(e,5,okt(t,c)),!0;case"b":return c.t="b",a?Et(e,15,QAt(t,c)):Et(e,4,YAt(t,c)),!0;case"e":return c.t="e",a?Et(e,14,tkt(t,c)):Et(e,3,JAt(t,c)),!0}return a?Et(e,12,GAt(t,c)):Et(e,1,qAt(t,c)),!0}function Bkt(e,t,n,r){var i=Hi(t["!ref"]||"A1"),s,a="",o=[];Et(e,145);var c=Array.isArray(t),u=i.e.r;t["!rows"]&&(u=Math.max(i.e.r,t["!rows"].length-1));for(var d=i.s.r;d<=u;++d){a=Za(d),LAt(e,t,i,d);var h=!1;if(d<=i.e.r)for(var p=i.s.c;p<=i.e.c;++p){d===i.s.r&&(o[p]=vo(p)),s=o[p]+a;var g=c?(t[d]||[])[p]:t[s];if(!g){h=!1;continue}h=$kt(e,g,d,p,r,t,h)}}Et(e,146)}function Ukt(e,t){!t||!t["!merges"]||(Et(e,177,Ckt(t["!merges"].length)),t["!merges"].forEach(function(n){Et(e,176,Ekt(n))}),Et(e,178))}function Vkt(e,t){!t||!t["!cols"]||(Et(e,390),t["!cols"].forEach(function(n,r){n&&Et(e,60,Rkt(r,n))}),Et(e,391))}function Hkt(e,t){!t||!t["!ref"]||(Et(e,648),Et(e,649,Dkt(Hi(t["!ref"]))),Et(e,650))}function qkt(e,t,n){t["!links"].forEach(function(r){if(r[1].Target){var i=si(n,-1,r[1].Target.replace(/#.*$/,""),zr.HLINK);Et(e,494,Akt(r,i))}}),delete t["!links"]}function Wkt(e,t,n,r){if(t["!comments"].length>0){var i=si(r,-1,"../drawings/vmlDrawing"+(n+1)+".vml",zr.VML);Et(e,551,vU("rId"+i)),t["!legacy"]=i}}function Gkt(e,t,n,r){if(t["!autofilter"]){var i=t["!autofilter"],s=typeof i.ref=="string"?i.ref:ia(i.ref);n.Workbook||(n.Workbook={Sheets:[]}),n.Workbook.Names||(n.Workbook.Names=[]);var a=n.Workbook.Names,o=Xl(s);o.s.r==o.e.r&&(o.e.r=Xl(t["!ref"]).e.r,s=ia(o));for(var c=0;c<a.length;++c){var u=a[c];if(u.Name=="_xlnm._FilterDatabase"&&u.Sheet==r){u.Ref="'"+n.SheetNames[r]+"'!"+s;break}}c==a.length&&a.push({Name:"_xlnm._FilterDatabase",Sheet:r,Ref:"'"+n.SheetNames[r]+"'!"+s}),Et(e,161,gb(Hi(s))),Et(e,162)}}function Kkt(e,t,n){Et(e,133),Et(e,137,Mkt(t,n)),Et(e,138),Et(e,134)}function Ykt(e,t){t["!protect"]&&Et(e,535,Fkt(t["!protect"]))}function Xkt(e,t,n,r){var i=hl(),s=n.SheetNames[e],a=n.Sheets[s]||{},o=s;try{n&&n.Workbook&&(o=n.Workbook.Sheets[e].CodeName||o)}catch{}var c=Hi(a["!ref"]||"A1");if(c.e.c>16383||c.e.r>1048575){if(t.WTF)throw new Error("Range "+(a["!ref"]||"A1")+" exceeds format limit A1:XFD1048576");c.e.c=Math.min(c.e.c,16383),c.e.r=Math.min(c.e.c,1048575)}return a["!links"]=[],a["!comments"]=[],Et(i,129),(n.vbaraw||a["!outline"])&&Et(i,147,VAt(o,a["!outline"])),Et(i,148,$At(c)),Kkt(i,a,n.Workbook),Vkt(i,a),Bkt(i,a,e,t),Ykt(i,a),Gkt(i,a,n,e),Ukt(i,a),qkt(i,a,r),a["!margins"]&&Et(i,476,Okt(a["!margins"])),(!t||t.ignoreEC||t.ignoreEC==null)&&Hkt(i,a),Wkt(i,a,e,r),Et(i,130),i.end()}function Qkt(e,t){e.l+=10;var n=yo(e);return{name:n}}var Zkt=[["allowRefreshQuery",!1,"bool"],["autoCompressPictures",!0,"bool"],["backupFile",!1,"bool"],["checkCompatibility",!1,"bool"],["CodeName",""],["date1904",!1,"bool"],["defaultThemeVersion",0,"int"],["filterPrivacy",!1,"bool"],["hidePivotFieldList",!1,"bool"],["promptedSolutions",!1,"bool"],["publishItems",!1,"bool"],["refreshAllConnections",!1,"bool"],["saveExternalLinkValues",!0,"bool"],["showBorderUnselectedTables",!0,"bool"],["showInkAnnotation",!0,"bool"],["showObjects","all"],["showPivotChartFilter",!1,"bool"],["updateLinks","userSet"]];function Jkt(e){return!e.Workbook||!e.Workbook.WBProps?"false":jSt(e.Workbook.WBProps.date1904)?"true":"false"}var eNt="][*?/\\".split("");function w2e(e,t){if(e.length>31)throw new Error("Sheet names cannot exceed 31 chars");var n=!0;return eNt.forEach(function(r){if(e.indexOf(r)!=-1)throw new Error("Sheet name cannot contain : \\ / ? * [ ]")}),n}function tNt(e,t,n){e.forEach(function(r,i){w2e(r);for(var s=0;s<i;++s)if(r==e[s])throw new Error("Duplicate Sheet Name: "+r);if(n){var a=t&&t[i]&&t[i].CodeName||r;
vendor: 4,699 bytes, line 1324
1324if(a.charCodeAt(0)==95&&a.length>22)throw new Error("Bad Code Name: Worksheet"+a)}})}function nNt(e){if(!e||!e.SheetNames||!e.Sheets)throw new Error("Invalid Workbook");if(!e.SheetNames.length)throw new Error("Workbook is empty");var t=e.Workbook&&e.Workbook.Sheets||[];tNt(e.SheetNames,t,!!e.vbaraw);for(var n=0;n<e.SheetNames.length;++n)EAt(e.Sheets[e.SheetNames[n]],e.SheetNames[n],n)}function S2e(e){var t=[oa];t[t.length]=Bt("workbook",null,{xmlns:pb[0],"xmlns:r":Ta.r});var n=e.Workbook&&(e.Workbook.Names||[]).length>0,r={codeName:"ThisWorkbook"};e.Workbook&&e.Workbook.WBProps&&(Zkt.forEach(function(o){e.Workbook.WBProps[o[0]]!=null&&e.Workbook.WBProps[o[0]]!=o[1]&&(r[o[0]]=e.Workbook.WBProps[o[0]])}),e.Workbook.WBProps.CodeName&&(r.codeName=e.Workbook.WBProps.CodeName,delete r.CodeName)),t[t.length]=Bt("workbookPr",null,r);var i=e.Workbook&&e.Workbook.Sheets||[],s=0;if(i&&i[0]&&i[0].Hidden){for(t[t.length]="<bookViews>",s=0;s!=e.SheetNames.length&&!(!i[s]||!i[s].Hidden);++s);s==e.SheetNames.length&&(s=0),t[t.length]='<workbookView firstSheet="'+s+'" activeTab="'+s+'"/>',t[t.length]="</bookViews>"}for(t[t.length]="<sheets>",s=0;s!=e.SheetNames.length;++s){var a={name:li(e.SheetNames[s].slice(0,31))};if(a.sheetId=""+(s+1),a["r:id"]="rId"+(s+1),i[s])switch(i[s].Hidden){case 1:a.state="hidden";break;case 2:a.state="veryHidden";break}t[t.length]=Bt("sheet",null,a)}return t[t.length]="</sheets>",n&&(t[t.length]="<definedNames>",e.Workbook&&e.Workbook.Names&&e.Workbook.Names.forEach(function(o){var c={name:o.Name};o.Comment&&(c.comment=o.Comment),o.Sheet!=null&&(c.localSheetId=""+o.Sheet),o.Hidden&&(c.hidden="1"),o.Ref&&(t[t.length]=Bt("definedName",li(o.Ref),c))}),t[t.length]="</definedNames>"),t.length>2&&(t[t.length]="</workbook>",t[1]=t[1].replace("/>",">")),t.join("")}function rNt(e,t){var n={};return n.Hidden=e.read_shift(4),n.iTabID=e.read_shift(4),n.strRelID=PL(e),n.name=yo(e),n}function iNt(e,t){return t||(t=ut(127)),t.write_shift(4,e.Hidden),t.write_shift(4,e.iTabID),vU(e.strRelID,t),ka(e.name.slice(0,31),t),t.length>t.l?t.slice(0,t.l):t}function sNt(e,t){var n={},r=e.read_shift(4);n.defaultThemeVersion=e.read_shift(4);var i=t>8?yo(e):"";return i.length>0&&(n.CodeName=i),n.autoCompressPictures=!!(r&65536),n.backupFile=!!(r&64),n.checkCompatibility=!!(r&4096),n.date1904=!!(r&1),n.filterPrivacy=!!(r&8),n.hidePivotFieldList=!!(r&1024),n.promptedSolutions=!!(r&16),n.publishItems=!!(r&2048),n.refreshAllConnections=!!(r&262144),n.saveExternalLinkValues=!!(r&128),n.showBorderUnselectedTables=!!(r&4),n.showInkAnnotation=!!(r&32),n.showObjects=["all","placeholders","none"][r>>13&3],n.showPivotChartFilter=!!(r&32768),n.updateLinks=["userSet","never","always"][r>>8&3],n}function aNt(e,t){t||(t=ut(72));var n=0;return e&&e.filterPrivacy&&(n|=8),t.write_shift(4,n),t.write_shift(4,0),Mwe(e&&e.CodeName||"ThisWorkbook",t),t.slice(0,t.l)}function oNt(e,t,n){var r=e.l+t;e.l+=4,e.l+=1;var i=e.read_shift(4),s=JSt(e),a=vAt(e,0,n),o=xU(e);e.l=r;var c={Name:s,Ptg:a};return i<268435455&&(c.Sheet=i),o&&(c.Comment=o),c}function lNt(e,t){Et(e,143);for(var n=0;n!=t.SheetNames.length;++n){var r=t.Workbook&&t.Workbook.Sheets&&t.Workbook.Sheets[n]&&t.Workbook.Sheets[n].Hidden||0,i={Hidden:r,iTabID:n+1,strRelID:"rId"+(n+1),name:t.SheetNames[n]};Et(e,156,iNt(i))}Et(e,144)}function cNt(e,t){t||(t=ut(127));for(var n=0;n!=4;++n)t.write_shift(4,0);return ka("SheetJS",t),ka(Q3.version,t),ka(Q3.version,t),ka("7262",t),t.length>t.l?t.slice(0,t.l):t}function uNt(e,t){t||(t=ut(29)),t.write_shift(-4,0),t.write_shift(-4,460),t.write_shift(4,28800),t.write_shift(4,17600),t.write_shift(4,500),t.write_shift(4,e),t.write_shift(4,e);var n=120;return t.write_shift(1,n),t.length>t.l?t.slice(0,t.l):t}function dNt(e,t){if(!(!t.Workbook||!t.Workbook.Sheets)){for(var n=t.Workbook.Sheets,r=0,i=-1,s=-1;r<n.length;++r)!n[r]||!n[r].Hidden&&i==-1?i=r:n[r].Hidden==1&&s==-1&&(s=r);s>i||(Et(e,135),Et(e,158,uNt(i)),Et(e,136))}}function fNt(e,t){var n=hl();return Et(n,131),Et(n,128,cNt()),Et(n,153,aNt(e.Workbook&&e.Workbook.WBProps||null)),dNt(n,e),lNt(n,e),Et(n,132),n.end()}function hNt(e,t,n){return(t.slice(-4)===".bin"?fNt:S2e)(e)}function pNt(e,t,n,r,i){return(t.slice(-4)===".bin"?Xkt:b2e)(e,n,r,i)}function mNt(e,t,n){return(t.slice(-4)===".bin"?OCt:s2e)(e,n)}function gNt(e,t,n){return(t.slice(-4)===".bin"?aCt:t2e)(e,n)}function xNt(e,t,n){return(t.slice(-4)===".bin"?YCt:u2e)(e)}function vNt(e){return(e.slice(-4)===".bin"?BCt:l2e)()}function yNt(e,t){var n=[];return e.Props&&n.push(mEt(e.Props,t)),e.Custprops&&n.push(gEt(e.Props,e.Custprops)),n.join("")}function bNt(){return""}function _Nt(e,t){var n=['<Style ss:ID="Default" ss:Name="Normal"><NumberFormat/></Style>'];
vendor: 4,513 bytes, line 1324
1324return t.cellXfs.forEach(function(r,i){var s=[];s.push(Bt("NumberFormat",null,{"ss:Format":li(Ts[r.numFmtId])}));var a={"ss:ID":"s"+(21+i)};n.push(Bt("Style",s.join(""),a))}),Bt("Styles",n.join(""))}function E2e(e){return Bt("NamedRange",null,{"ss:Name":e.Name,"ss:RefersTo":"="+wU(e.Ref,{r:0,c:0})})}function wNt(e){if(!((e||{}).Workbook||{}).Names)return"";for(var t=e.Workbook.Names,n=[],r=0;r<t.length;++r){var i=t[r];i.Sheet==null&&(i.Name.match(/^_xlfn\./)||n.push(E2e(i)))}return Bt("Names",n.join(""))}function SNt(e,t,n,r){if(!e||!((r||{}).Workbook||{}).Names)return"";for(var i=r.Workbook.Names,s=[],a=0;a<i.length;++a){var o=i[a];o.Sheet==n&&(o.Name.match(/^_xlfn\./)||s.push(E2e(o)))}return s.join("")}function ENt(e,t,n,r){if(!e)return"";var i=[];if(e["!margins"]&&(i.push("<PageSetup>"),e["!margins"].header&&i.push(Bt("Header",null,{"x:Margin":e["!margins"].header})),e["!margins"].footer&&i.push(Bt("Footer",null,{"x:Margin":e["!margins"].footer})),i.push(Bt("PageMargins",null,{"x:Bottom":e["!margins"].bottom||"0.75","x:Left":e["!margins"].left||"0.7","x:Right":e["!margins"].right||"0.7","x:Top":e["!margins"].top||"0.75"})),i.push("</PageSetup>")),r&&r.Workbook&&r.Workbook.Sheets&&r.Workbook.Sheets[n])if(r.Workbook.Sheets[n].Hidden)i.push(Bt("Visible",r.Workbook.Sheets[n].Hidden==1?"SheetHidden":"SheetVeryHidden",{}));else{for(var s=0;s<n&&!(r.Workbook.Sheets[s]&&!r.Workbook.Sheets[s].Hidden);++s);s==n&&i.push("<Selected/>")}return((((r||{}).Workbook||{}).Views||[])[0]||{}).RTL&&i.push("<DisplayRightToLeft/>"),e["!protect"]&&(i.push(Ka("ProtectContents","True")),e["!protect"].objects&&i.push(Ka("ProtectObjects","True")),e["!protect"].scenarios&&i.push(Ka("ProtectScenarios","True")),e["!protect"].selectLockedCells!=null&&!e["!protect"].selectLockedCells?i.push(Ka("EnableSelection","NoSelection")):e["!protect"].selectUnlockedCells!=null&&!e["!protect"].selectUnlockedCells&&i.push(Ka("EnableSelection","UnlockedCells")),[["formatCells","AllowFormatCells"],["formatColumns","AllowSizeCols"],["formatRows","AllowSizeRows"],["insertColumns","AllowInsertCols"],["insertRows","AllowInsertRows"],["insertHyperlinks","AllowInsertHyperlinks"],["deleteColumns","AllowDeleteCols"],["deleteRows","AllowDeleteRows"],["sort","AllowSort"],["autoFilter","AllowFilter"],["pivotTables","AllowUsePivotTables"]].forEach(function(a){e["!protect"][a[0]]&&i.push("<"+a[1]+"/>")})),i.length==0?"":Bt("WorksheetOptions",i.join(""),{xmlns:zl.x})}function CNt(e){return e.map(function(t){var n=NSt(t.t||""),r=Bt("ss:Data",n,{xmlns:"http://www.w3.org/TR/REC-html40"});return Bt("Comment",r,{"ss:Author":t.a})}).join("")}function TNt(e,t,n,r,i,s,a){if(!e||e.v==null&&e.f==null)return"";var o={};if(e.f&&(o["ss:Formula"]="="+li(wU(e.f,a))),e.F&&e.F.slice(0,t.length)==t){var c=Aa(e.F.slice(t.length+1));o["ss:ArrayRange"]="RC:R"+(c.r==a.r?"":"["+(c.r-a.r)+"]")+"C"+(c.c==a.c?"":"["+(c.c-a.c)+"]")}if(e.l&&e.l.Target&&(o["ss:HRef"]=li(e.l.Target),e.l.Tooltip&&(o["x:HRefScreenTip"]=li(e.l.Tooltip))),n["!merges"])for(var u=n["!merges"],d=0;d!=u.length;++d)u[d].s.c!=a.c||u[d].s.r!=a.r||(u[d].e.c>u[d].s.c&&(o["ss:MergeAcross"]=u[d].e.c-u[d].s.c),u[d].e.r>u[d].s.r&&(o["ss:MergeDown"]=u[d].e.r-u[d].s.r));var h="",p="";switch(e.t){case"z":if(!r.sheetStubs)return"";break;case"n":h="Number",p=String(e.v);break;case"b":h="Boolean",p=e.v?"1":"0";break;case"e":h="Error",p=cC[e.v];break;case"d":h="DateTime",p=new Date(e.v).toISOString(),e.z==null&&(e.z=e.z||Ts[14]);break;case"s":h="String",p=kSt(e.v||"");break}var g=Zm(r.cellXfs,e,r);o["ss:StyleID"]="s"+(21+g),o["ss:Index"]=a.c+1;var v=e.v!=null?p:"",x=e.t=="z"?"":'<Data ss:Type="'+h+'">'+v+"</Data>";return(e.c||[]).length>0&&(x+=CNt(e.c)),Bt("Cell",x,o)}function ANt(e,t){var n='<Row ss:Index="'+(e+1)+'"';return t&&(t.hpt&&!t.hpx&&(t.hpx=i2e(t.hpt)),t.hpx&&(n+=' ss:AutoFitHeight="0" ss:Height="'+t.hpx+'"'),t.hidden&&(n+=' ss:Hidden="1"')),n+">"}function kNt(e,t,n,r){if(!e["!ref"])return"";var i=Hi(e["!ref"]),s=e["!merges"]||[],a=0,o=[];e["!cols"]&&e["!cols"].forEach(function(_,w){bU(_);var S=!!_.width,E=q4(w,_),T={"ss:Index":w+1};S&&(T["ss:Width"]=oj(E.width)),_.hidden&&(T["ss:Hidden"]="1"),o.push(Bt("Column",null,T))});for(var c=Array.isArray(e),u=i.s.r;u<=i.e.r;++u){for(var d=[ANt(u,(e["!rows"]||[])[u])],h=i.s.c;h<=i.e.c;++h){var p=!1;for(a=0;a!=s.length;++a)if(!(s[a].s.c>h)&&!(s[a].s.r>u)&&!(s[a].e.c<h)&&!(s[a].e.r<u)){(s[a].s.c!=h||s[a].s.r!=u)&&(p=!0);break}if(!p){var g={r:u,c:h},v=ci(g),x=c?(e[u]||[])[h]:e[v];d.push(TNt(x,v,e,t,n,r,g))}}
vendor: 4,821 bytes, line 1324
1324d.push("</Row>"),d.length>2&&o.push(d.join(""))}return o.join("")}function NNt(e,t,n){var r=[],i=n.SheetNames[e],s=n.Sheets[i],a=s?SNt(s,t,e,n):"";return a.length>0&&r.push("<Names>"+a+"</Names>"),a=s?kNt(s,t,e,n):"",a.length>0&&r.push("<Table>"+a+"</Table>"),r.push(ENt(s,t,e,n)),r.join("")}function jNt(e,t){t||(t={}),e.SSF||(e.SSF=vl(Ts)),e.SSF&&($4(),z4(e.SSF),t.revssf=B4(e.SSF),t.revssf[e.SSF[65535]]=0,t.ssf=e.SSF,t.cellXfs=[],Zm(t.cellXfs,{},{revssf:{General:0}}));var n=[];n.push(yNt(e,t)),n.push(bNt()),n.push(""),n.push("");for(var r=0;r<e.SheetNames.length;++r)n.push(Bt("Worksheet",NNt(r,t,e),{"ss:Name":li(e.SheetNames[r])}));return n[2]=_Nt(e,t),n[3]=wNt(e),oa+Bt("Workbook",n.join(""),{xmlns:zl.ss,"xmlns:o":zl.o,"xmlns:x":zl.x,"xmlns:ss":zl.ss,"xmlns:dt":zl.dt,"xmlns:html":zl.html})}var aD={SI:"e0859ff2f94f6810ab9108002b27b3d9",DSI:"02d5cdd59c2e1b10939708002b2cf9ae",UDI:"05d5cdd59c2e1b10939708002b2cf9ae"};function RNt(e,t){var n=[],r=[],i=[],s=0,a,o=Wne(sre,"n"),c=Wne(are,"n");if(e.Props)for(a=eo(e.Props),s=0;s<a.length;++s)(Object.prototype.hasOwnProperty.call(o,a[s])?n:Object.prototype.hasOwnProperty.call(c,a[s])?r:i).push([a[s],e.Props[a[s]]]);if(e.Custprops)for(a=eo(e.Custprops),s=0;s<a.length;++s)Object.prototype.hasOwnProperty.call(e.Props||{},a[s])||(Object.prototype.hasOwnProperty.call(o,a[s])?n:Object.prototype.hasOwnProperty.call(c,a[s])?r:i).push([a[s],e.Custprops[a[s]]]);var u=[];for(s=0;s<i.length;++s)Kwe.indexOf(i[s][0])>-1||qwe.indexOf(i[s][0])>-1||i[s][1]!=null&&u.push(i[s]);r.length&&_i.utils.cfb_add(t,"/�SummaryInformation",dre(r,aD.SI,c,are)),(n.length||u.length)&&_i.utils.cfb_add(t,"/�DocumentSummaryInformation",dre(n,aD.DSI,o,sre,u.length?u:null,aD.UDI))}function INt(e,t){var n=t||{},r=_i.utils.cfb_new({root:"R"}),i="/Workbook";switch(n.bookType||"xls"){case"xls":n.bookType="biff8";case"xla":n.bookType||(n.bookType="xla");case"biff8":i="/Workbook",n.biff=8;break;case"biff5":i="/Book",n.biff=5;break;default:throw new Error("invalid type "+n.bookType+" for XLS CFB")}return _i.utils.cfb_add(r,i,C2e(e,n)),n.biff==8&&(e.Props||e.Custprops)&&RNt(e,r),n.biff==8&&e.vbaraw&&XCt(r,_i.read(e.vbaraw,{type:typeof e.vbaraw=="string"?"binary":"buffer"})),r}var ONt={0:{f:DAt},1:{f:HAt},2:{f:ukt},3:{f:ZAt},4:{f:KAt},5:{f:akt},6:{f:mkt},7:{f:nkt},8:{f:wkt},9:{f:_kt},10:{f:ykt},11:{f:bkt},12:{f:WAt},13:{f:fkt},14:{f:ekt},15:{f:XAt},16:{f:lkt},17:{f:xkt},18:{f:ikt},19:{f:gU},20:{},21:{},22:{},23:{},24:{},25:{},26:{},27:{},28:{},29:{},30:{},31:{},32:{},33:{},34:{},35:{T:1},36:{T:-1},37:{T:1},38:{T:-1},39:{f:oNt},40:{},42:{},43:{f:mCt},44:{f:hCt},45:{f:vCt},46:{f:bCt},47:{f:yCt},48:{},49:{f:WSt},50:{},51:{f:DCt},52:{T:1},53:{T:-1},54:{T:1},55:{T:-1},56:{T:1},57:{T:-1},58:{},59:{},60:{f:GEt},62:{f:pkt},63:{f:UCt},64:{f:Lkt},65:{},66:{},67:{},68:{},69:{},70:{},128:{},129:{T:1},130:{T:-1},131:{T:1,f:Kd,p:0},132:{T:-1},133:{T:1},134:{T:-1},135:{T:1},136:{T:-1},137:{T:1,f:Pkt},138:{T:-1},139:{T:1},140:{T:-1},141:{T:1},142:{T:-1},143:{T:1},144:{T:-1},145:{T:1},146:{T:-1},147:{f:UAt},148:{f:zAt,p:16},151:{f:kkt},152:{},153:{f:sNt},154:{},155:{},156:{f:rNt},157:{},158:{},159:{T:1,f:rCt},160:{T:-1},161:{T:1,f:Ox},162:{T:-1},163:{T:1},164:{T:-1},165:{T:1},166:{T:-1},167:{},168:{},169:{},170:{},171:{},172:{T:1},173:{T:-1},174:{},175:{},176:{f:Skt},177:{T:1},178:{T:-1},179:{T:1},180:{T:-1},181:{T:1},182:{T:-1},183:{T:1},184:{T:-1},185:{T:1},186:{T:-1},187:{T:1},188:{T:-1},189:{T:1},190:{T:-1},191:{T:1},192:{T:-1},193:{T:1},194:{T:-1},195:{T:1},196:{T:-1},197:{T:1},198:{T:-1},199:{T:1},200:{T:-1},201:{T:1},202:{T:-1},203:{T:1},204:{T:-1},205:{T:1},206:{T:-1},207:{T:1},208:{T:-1},209:{T:1},210:{T:-1},211:{T:1},212:{T:-1},213:{T:1},214:{T:-1},215:{T:1},216:{T:-1},217:{T:1},218:{T:-1},219:{T:1},220:{T:-1},221:{T:1},222:{T:-1},223:{T:1},224:{T:-1},225:{T:1},226:{T:-1},227:{T:1},228:{T:-1},229:{T:1},230:{T:-1},231:{T:1},232:{T:-1},233:{T:1},234:{T:-1},235:{T:1},236:{T:-1},237:{T:1},238:{T:-1},239:{T:1},240:{T:-1},241:{T:1},242:{T:-1},243:{T:1},244:{T:-1},245:{T:1},246:{T:-1},247:{T:1},248:{T:-1},249:{T:1},250:{T:-1},251:{T:1},252:{T:-1},253:{T:1},254:{T:-1},255:{T:1},256:{T:-1},257:{T:1},258:{T:-1},259:{T:1},260:{T:-1},261:{T:1},262:{T:-1},263:{T:1},264:{T:-1},265:{T:1},266:{T:-1},267:{T:1},268:{T:-1},269:{T:1},270:{T:-1},271:{T:1},272:{T:-1},273:{T:1},274:{T:-1},275:{T:1},276:{T:-1},277:{},278:{T:1},279:{T:-1},280:{T:1},281:{T:-1},282:{T:1},283:{T:1},284:{T:-1},285:{T:1},286:{T:-1},287:{T:1},288:{T:-1},289:{T:1},290:{T:-1},291:{T:1},292:{T:-1},293:{T:1},294:{T:-1},295:{T:1},296:{T:-1},297:{T:1},298:{T:-1},299:{T:1},300:{T:-1},301:{T:1},302:{T:-1},303:{T:1},304:{T:-1},305:{T:1},306:{T:-1},307:{T:1},308:{T:-1},309:{T:1},310:{T:-1},311:{T:1},312:{T:-1},313:{T:-1},314:{T:1},315:{T:-1},316:{T:1},317:{T:-1},318:{T:1},319:{T:-1},320:{T:1},321:{T:-1}
vendor: 7,884 bytes, line 1324
1324,322:{T:1},323:{T:-1},324:{T:1},325:{T:-1},326:{T:1},327:{T:-1},328:{T:1},329:{T:-1},330:{T:1},331:{T:-1},332:{T:1},333:{T:-1},334:{T:1},335:{f:PCt},336:{T:-1},337:{f:zCt,T:1},338:{T:-1},339:{T:1},340:{T:-1},341:{T:1},342:{T:-1},343:{T:1},344:{T:-1},345:{T:1},346:{T:-1},347:{T:1},348:{T:-1},349:{T:1},350:{T:-1},351:{},352:{},353:{T:1},354:{T:-1},355:{f:PL},357:{},358:{},359:{},360:{T:1},361:{},362:{f:BEt},363:{},364:{},366:{},367:{},368:{},369:{},370:{},371:{},372:{T:1},373:{T:-1},374:{T:1},375:{T:-1},376:{T:1},377:{T:-1},378:{T:1},379:{T:-1},380:{T:1},381:{T:-1},382:{T:1},383:{T:-1},384:{T:1},385:{T:-1},386:{T:1},387:{T:-1},388:{T:1},389:{T:-1},390:{T:1},391:{T:-1},392:{T:1},393:{T:-1},394:{T:1},395:{T:-1},396:{},397:{},398:{},399:{},400:{},401:{T:1},403:{},404:{},405:{},406:{},407:{},408:{},409:{},410:{},411:{},412:{},413:{},414:{},415:{},416:{},417:{},418:{},419:{},420:{},421:{},422:{T:1},423:{T:1},424:{T:-1},425:{T:-1},426:{f:Nkt},427:{f:jkt},428:{},429:{T:1},430:{T:-1},431:{T:1},432:{T:-1},433:{T:1},434:{T:-1},435:{T:1},436:{T:-1},437:{T:1},438:{T:-1},439:{T:1},440:{T:-1},441:{T:1},442:{T:-1},443:{T:1},444:{T:-1},445:{T:1},446:{T:-1},447:{T:1},448:{T:-1},449:{T:1},450:{T:-1},451:{T:1},452:{T:-1},453:{T:1},454:{T:-1},455:{T:1},456:{T:-1},457:{T:1},458:{T:-1},459:{T:1},460:{T:-1},461:{T:1},462:{T:-1},463:{T:1},464:{T:-1},465:{T:1},466:{T:-1},467:{T:1},468:{T:-1},469:{T:1},470:{T:-1},471:{},472:{},473:{T:1},474:{T:-1},475:{},476:{f:Ikt},477:{},478:{},479:{T:1},480:{T:-1},481:{T:1},482:{T:-1},483:{T:1},484:{T:-1},485:{f:BAt},486:{T:1},487:{T:-1},488:{T:1},489:{T:-1},490:{T:1},491:{T:-1},492:{T:1},493:{T:-1},494:{f:Tkt},495:{T:1},496:{T:-1},497:{T:1},498:{T:-1},499:{},500:{T:1},501:{T:-1},502:{T:1},503:{T:-1},504:{},505:{T:1},506:{T:-1},507:{},508:{T:1},509:{T:-1},510:{T:1},511:{T:-1},512:{},513:{},514:{T:1},515:{T:-1},516:{T:1},517:{T:-1},518:{T:1},519:{T:-1},520:{T:1},521:{T:-1},522:{},523:{},524:{},525:{},526:{},527:{},528:{T:1},529:{T:-1},530:{T:1},531:{T:-1},532:{T:1},533:{T:-1},534:{},535:{},536:{},537:{},538:{T:1},539:{T:-1},540:{T:1},541:{T:-1},542:{T:1},548:{},549:{},550:{f:PL},551:{},552:{},553:{},554:{T:1},555:{T:-1},556:{T:1},557:{T:-1},558:{T:1},559:{T:-1},560:{T:1},561:{T:-1},562:{},564:{},565:{T:1},566:{T:-1},569:{T:1},570:{T:-1},572:{},573:{T:1},574:{T:-1},577:{},578:{},579:{},580:{},581:{},582:{},583:{},584:{},585:{},586:{},587:{},588:{T:-1},589:{},590:{T:1},591:{T:-1},592:{T:1},593:{T:-1},594:{T:1},595:{T:-1},596:{},597:{T:1},598:{T:-1},599:{T:1},600:{T:-1},601:{T:1},602:{T:-1},603:{T:1},604:{T:-1},605:{T:1},606:{T:-1},607:{},608:{T:1},609:{T:-1},610:{},611:{T:1},612:{T:-1},613:{T:1},614:{T:-1},615:{T:1},616:{T:-1},617:{T:1},618:{T:-1},619:{T:1},620:{T:-1},625:{},626:{T:1},627:{T:-1},628:{T:1},629:{T:-1},630:{T:1},631:{T:-1},632:{f:GCt},633:{T:1},634:{T:-1},635:{T:1,f:qCt},636:{T:-1},637:{f:XSt},638:{T:1},639:{},640:{T:-1},641:{T:1},642:{T:-1},643:{T:1},644:{},645:{T:-1},646:{T:1},648:{T:1},649:{},650:{T:-1},651:{f:Qkt},652:{},653:{T:1},654:{T:-1},655:{T:1},656:{T:-1},657:{T:1},658:{T:-1},659:{},660:{T:1},661:{},662:{T:-1},663:{},664:{T:1},665:{},666:{T:-1},667:{},668:{},669:{},671:{T:1},672:{T:-1},673:{T:1},674:{T:-1},675:{},676:{},677:{},678:{},679:{},680:{},681:{},1024:{},1025:{},1026:{T:1},1027:{T:-1},1028:{T:1},1029:{T:-1},1030:{},1031:{T:1},1032:{T:-1},1033:{T:1},1034:{T:-1},1035:{},1036:{},1037:{},1038:{T:1},1039:{T:-1},1040:{},1041:{T:1},1042:{T:-1},1043:{},1044:{},1045:{},1046:{T:1},1047:{T:-1},1048:{T:1},1049:{T:-1},1050:{},1051:{T:1},1052:{T:1},1053:{f:zkt},1054:{T:1},1055:{},1056:{T:1},1057:{T:-1},1058:{T:1},1059:{T:-1},1061:{},1062:{T:1},1063:{T:-1},1064:{T:1},1065:{T:-1},1066:{T:1},1067:{T:-1},1068:{T:1},1069:{T:-1},1070:{T:1},1071:{T:-1},1072:{T:1},1073:{T:-1},1075:{T:1},1076:{T:-1},1077:{T:1},1078:{T:-1},1079:{T:1},1080:{T:-1},1081:{T:1},1082:{T:-1},1083:{T:1},1084:{T:-1},1085:{},1086:{T:1},1087:{T:-1},1088:{T:1},1089:{T:-1},1090:{T:1},1091:{T:-1},1092:{T:1},1093:{T:-1},1094:{T:1},1095:{T:-1},1096:{},1097:{T:1},1098:{},1099:{T:-1},1100:{T:1},1101:{T:-1},1102:{},1103:{},1104:{},1105:{},1111:{},1112:{},1113:{T:1},1114:{T:-1},1115:{T:1},1116:{T:-1},1117:{},1118:{T:1},1119:{T:-1},1120:{T:1},1121:{T:-1},1122:{T:1},1123:{T:-1},1124:{T:1},1125:{T:-1},1126:{},1128:{T:1},1129:{T:-1},1130:{},1131:{T:1},1132:{T:-1},1133:{T:1},1134:{T:-1},1135:{T:1},1136:{T:-1},1137:{T:1},1138:{T:-1},1139:{T:1},1140:{T:-1},1141:{},1142:{T:1},1143:{T:-1},1144:{T:1},1145:{T:-1},1146:{},1147:{T:1},1148:{T:-1},1149:{T:1},1150:{T:-1},1152:{T:1},1153:{T:-1},1154:{T:-1},1155:{T:-1},1156:{T:-1},1157:{T:1},1158:{T:-1},1159:{T:1},1160:{T:-1},1161:{T:1},1162:{T:-1},1163:{T:1},1164:{T:-1},1165:{T:1},1166:{T:-1},1167:{T:1},1168:{T:-1},1169:{T:1},1170:{T:-1},1171:{},1172:{T:1},1173:{T:-1},1177:{},1178:{T:1},1180:{},1181:{},1182:{},2048:{T:1},2049:{T:-1},2050:{},2051:{T:1},2052:{T:-1},2053:{},2054:{},2055:{T:1},2056:{T:-1},2057:{T:1},2058:{T:-1},2060:{},2067:{},2068:{T:1},2069:{T:-1},2070:{},2071:{},2072:{T:1},2073:{T:-1},2075:{},2076:{},2077:{T:1},2078:{T:-1},2079:{},2080:{T:1},2081:{T:-1},2082:{},2083:{T:1},2084:{T:-1},2085:{T:1},2086:{T:-1},2087:{T:1},2088:{T:-1},2089:{T:1},2090:{T:-1},2091:{},2092:{},2093:{T:1},2094:{T:-1},2095:{},2096:{T:1},2097:{T:-1},2098:{T:1},2099:{T:-1},2100:{T:1},2101:{T:-1},2102:{},2103:{T:1},2104:{T:-1},2105:{},2106:{T:1},2107:{T:-1},2108:{},2109:{T:1},2110:{T:-1},2111:{T:1},2112:{T:-1},2113:{T:1},2114:{T:-1},2115:{},2116:{},2117:{},2118:{T:1},2119:{T:-1},2120:{},2121:{T:1},2122:{T:-1},2123:{T:1},2124:{T:-1},2125:{},2126:{T:1},2127:{T:-1},2128:{},2129:{T:1},2130:{T:-1},2131:{T:1},2132:{T:-1},2133:{T:1},2134:{},2135:{},2136:{},2137:{T:1},2138:{T:-1},2139:{T:1},2140:{T:-1},2141:{},3072:{},3073:{},4096:{T:1},4097:{T:-1},5002:{T:1},5003:{T:-1},5081:{T:1},5082:{T:-1},5083:{},5084:{T:1},5085:{T:-1},5086:{T:1},5087:{T:-1},5088:{},5089:{},5090:{},5092:{T:1},5093:{T:-1},5094:{},5095:{T:1},5096:{T:-1},5097:{},5099:{},65535:{n:""}};function Vt(e,t,n,r){var i=t;if(!isNaN(i)){var s=r||(n||[]).length||0,a=e.next(4);a.write_shift(2,i),a.write_shift(2,s),s>0&&hU(n)&&e.push(n)}}function PNt(e,t,n,r){var i=(n||[]).length||0;if(i<=8224)return Vt(e,t,n,i);var s=t;if(!isNaN(s)){for(var a=n.parts||[],o=0,c=0,u=0;u+(a[o]||8224)<=8224;)u+=a[o]||8224,o++;var d=e.next(4);for(d.write_shift(2,s),d.write_shift(2,u),e.push(n.slice(c,c+u)),c+=u;c<i;){for(d=e.next(4),d.write_shift(2,60),u=0;u+(a[o]||8224)<=8224;)u+=a[o]||8224,o++;d.write_shift(2,u),e.push(n.slice(c,c+u)),c+=u}}}function dC(e,t,n){return e||(e=ut(7)),e.write_shift(2,t),e.write_shift(2,n),e.write_shift(2,0),e.write_shift(1,0),e}function MNt(e,t,n,r){var i=ut(9);return dC(i,e,t),Xwe(n,r||"b",i),i}function DNt(e,t,n){var r=ut(8+2*n.length);return dC(r,e,t),r.write_shift(1,n.length),r.write_shift(n.length,n,"sbcs"),r.l<r.length?r.slice(0,r.l):r}function FNt(e,t,n,r){if(t.v!=null)switch(t.t){case"d":case"n":var i=t.t=="d"?xl(Bo(t.v)):t.v;i==(i|0)&&i>=0&&i<65536?Vt(e,2,QEt(n,r,i)):Vt(e,3,XEt(n,r,i));return;case"b":case"e":Vt(e,5,MNt(n,r,t.v,t.t));return;case"s":case"str":Vt(e,4,DNt(n,r,(t.v||"").slice(0,255)));return}Vt(e,1,dC(null,n,r))}function LNt(e,t,n,r){var i=Array.isArray(t),s=Hi(t["!ref"]||"A1"),a,o="",c=[];if(s.e.c>255||s.e.r>16383){if(r.WTF)throw new Error("Range "+(t["!ref"]||"A1")+" exceeds format limit A1:IV16384");s.e.c=Math.min(s.e.c,255),s.e.r=Math.min(s.e.c,16383),a=ia(s)}for(var u=s.s.r;u<=s.e.r;++u){o=Za(u);for(var d=s.s.c;d<=s.e.c;++d){u===s.s.r&&(c[d]=vo(d)),a=c[d]+o;var h=i?(t[u]||[])[d]:t[a];h&&FNt(e,h,u,d)}}}function zNt(e,t){for(var n=t||{},r=hl(),i=0,s=0;s<e.SheetNames.length;++s)e.SheetNames[s]==n.sheet&&(i=s);if(i==0&&n.sheet&&e.SheetNames[0]!=n.sheet)throw new Error("Sheet not found: "+n.sheet);return Vt(r,n.biff==4?1033:n.biff==3?521:9,yU(e,16,n)),LNt(r,e.Sheets[e.SheetNames[i]],i,n),Vt(r,10),r.end()}function $Nt(e,t,n){Vt(e,49,OEt({sz:12,name:"Arial"},n))}
vendor: 2,194 bytes, line 1324
1324function BNt(e,t,n){t&&[[5,8],[23,26],[41,44],[50,392]].forEach(function(r){for(var i=r[0];i<=r[1];++i)t[i]!=null&&Vt(e,1054,DEt(i,t[i],n))})}function UNt(e,t){var n=ut(19);n.write_shift(4,2151),n.write_shift(4,0),n.write_shift(4,0),n.write_shift(2,3),n.write_shift(1,1),n.write_shift(4,0),Vt(e,2151,n),n=ut(39),n.write_shift(4,2152),n.write_shift(4,0),n.write_shift(4,0),n.write_shift(2,3),n.write_shift(1,0),n.write_shift(4,0),n.write_shift(2,1),n.write_shift(4,4),n.write_shift(2,0),Jwe(Hi(t["!ref"]||"A1"),n),n.write_shift(4,4),Vt(e,2152,n)}function VNt(e,t){for(var n=0;n<16;++n)Vt(e,224,hre({numFmtId:0,style:!0},0,t));t.cellXfs.forEach(function(r){Vt(e,224,hre(r,0,t))})}function HNt(e,t){for(var n=0;n<t["!links"].length;++n){var r=t["!links"][n];Vt(e,440,HEt(r)),r[1].Tooltip&&Vt(e,2048,qEt(r))}delete t["!links"]}function qNt(e,t){if(t){var n=0;t.forEach(function(r,i){++n<=256&&r&&Vt(e,125,KEt(q4(i,r),i))})}}function WNt(e,t,n,r,i){var s=16+Zm(i.cellXfs,t,i);if(t.v==null&&!t.bf){Vt(e,513,nx(n,r,s));return}if(t.bf)Vt(e,6,gAt(t,n,r,i,s));else switch(t.t){case"d":case"n":var a=t.t=="d"?xl(Bo(t.v)):t.v;Vt(e,515,$Et(n,r,a,s));break;case"b":case"e":Vt(e,517,zEt(n,r,t.v,s,i,t.t));break;case"s":case"str":if(i.bookSST){var o=EU(i.Strings,t.v,i.revStrings);Vt(e,253,PEt(n,r,o,s))}else Vt(e,516,MEt(n,r,(t.v||"").slice(0,255),s,i));break;default:Vt(e,513,nx(n,r,s))}}function GNt(e,t,n){var r=hl(),i=n.SheetNames[e],s=n.Sheets[i]||{},a=(n||{}).Workbook||{},o=(a.Sheets||[])[e]||{},c=Array.isArray(s),u=t.biff==8,d,h="",p=[],g=Hi(s["!ref"]||"A1"),v=u?65536:16384;if(g.e.c>255||g.e.r>=v){if(t.WTF)throw new Error("Range "+(s["!ref"]||"A1")+" exceeds format limit A1:IV16384");g.e.c=Math.min(g.e.c,255),g.e.r=Math.min(g.e.c,v-1)}Vt(r,2057,yU(n,16,t)),Vt(r,13,xc(1)),Vt(r,12,xc(100)),Vt(r,15,Po(!0)),Vt(r,17,Po(!1)),Vt(r,16,tx(.001)),Vt(r,95,Po(!0)),Vt(r,42,Po(!1)),Vt(r,43,Po(!1)),Vt(r,130,xc(1)),Vt(r,128,LEt()),Vt(r,131,Po(!1)),Vt(r,132,Po(!1)),u&&qNt(r,s["!cols"]),Vt(r,512,FEt(g,t)),u&&(s["!links"]=[]);for(var x=g.s.r;x<=g.e.r;++x){h=Za(x);for(var _=g.s.c;_<=g.e.c;++_){x===g.s.r&&(p[_]=vo(_)),d=p[_]+h;var w=c?(s[x]||[])[_]:s[d];w&&(WNt(r,w,x,_,t),u&&w.l&&s["!links"].push([d,w.l]))}}
vendor: 9,636 bytes, lines 1324-1341
1324var S=o.CodeName||o.name||i;return u&&Vt(r,574,IEt((a.Views||[])[0])),u&&(s["!merges"]||[]).length&&Vt(r,229,VEt(s["!merges"])),u&&HNt(r,s),Vt(r,442,Zwe(S)),u&&UNt(r,s),Vt(r,10),r.end()}function KNt(e,t,n){var r=hl(),i=(e||{}).Workbook||{},s=i.Sheets||[],a=i.WBProps||{},o=n.biff==8,c=n.biff==5;if(Vt(r,2057,yU(e,5,n)),n.bookType=="xla"&&Vt(r,135),Vt(r,225,o?xc(1200):null),Vt(r,193,yEt(2)),c&&Vt(r,191),c&&Vt(r,192),Vt(r,226),Vt(r,92,kEt("SheetJS",n)),Vt(r,66,xc(o?1200:1252)),o&&Vt(r,353,xc(0)),o&&Vt(r,448),Vt(r,317,YEt(e.SheetNames.length)),o&&e.vbaraw&&Vt(r,211),o&&e.vbaraw){var u=a.CodeName||"ThisWorkbook";Vt(r,442,Zwe(u))}Vt(r,156,xc(17)),Vt(r,25,Po(!1)),Vt(r,18,Po(!1)),Vt(r,19,xc(0)),o&&Vt(r,431,Po(!1)),o&&Vt(r,444,xc(0)),Vt(r,61,REt()),Vt(r,64,Po(!1)),Vt(r,141,xc(0)),Vt(r,34,Po(Jkt(e)=="true")),Vt(r,14,Po(!0)),o&&Vt(r,439,Po(!1)),Vt(r,218,xc(0)),$Nt(r,e,n),BNt(r,e.SSF,n),VNt(r,n),o&&Vt(r,352,Po(!1));var d=r.end(),h=hl();o&&Vt(h,140,WEt()),o&&n.Strings&&PNt(h,252,jEt(n.Strings)),Vt(h,10);var p=h.end(),g=hl(),v=0,x=0;for(x=0;x<e.SheetNames.length;++x)v+=(o?12:11)+(o?2:1)*e.SheetNames[x].length;var _=d.length+v+p.length;for(x=0;x<e.SheetNames.length;++x){var w=s[x]||{};Vt(g,133,NEt({pos:_,hs:w.Hidden||0,dt:0,name:e.SheetNames[x]},n)),_+=t[x].length}var S=g.end();if(v!=S.length)throw new Error("BS8 "+v+" != "+S.length);var E=[];return d.length&&E.push(d),S.length&&E.push(S),p.length&&E.push(p),Ga(E)}function YNt(e,t){var n=t||{},r=[];e&&!e.SSF&&(e.SSF=vl(Ts)),e&&e.SSF&&($4(),z4(e.SSF),n.revssf=B4(e.SSF),n.revssf[e.SSF[65535]]=0,n.ssf=e.SSF),n.Strings=[],n.Strings.Count=0,n.Strings.Unique=0,CU(n),n.cellXfs=[],Zm(n.cellXfs,{},{revssf:{General:0}}),e.Props||(e.Props={});for(var i=0;i<e.SheetNames.length;++i)r[r.length]=GNt(i,n,e);return r.unshift(KNt(e,r,n)),Ga(r)}function C2e(e,t){for(var n=0;n<=e.SheetNames.length;++n){var r=e.Sheets[e.SheetNames[n]];if(!(!r||!r["!ref"])){var i=Xl(r["!ref"]);i.e.c>255&&typeof console<"u"&&console.error&&console.error("Worksheet '"+e.SheetNames[n]+"' extends beyond column IV (255). Data may be lost.")}}var s=t||{};switch(s.biff||2){case 8:case 5:return YNt(e,t);case 4:case 3:case 2:return zNt(e,t)}throw new Error("invalid type "+s.bookType+" for BIFF")}function XNt(e,t,n,r){for(var i=e["!merges"]||[],s=[],a=t.s.c;a<=t.e.c;++a){for(var o=0,c=0,u=0;u<i.length;++u)if(!(i[u].s.r>n||i[u].s.c>a)&&!(i[u].e.r<n||i[u].e.c<a)){if(i[u].s.r<n||i[u].s.c<a){o=-1;break}o=i[u].e.r-i[u].s.r+1,c=i[u].e.c-i[u].s.c+1;break}if(!(o<0)){var d=ci({r:n,c:a}),h=r.dense?(e[n]||[])[a]:e[d],p=h&&h.v!=null&&(h.h||ASt(h.w||(Dh(h),h.w)||""))||"",g={};o>1&&(g.rowspan=o),c>1&&(g.colspan=c),r.editable?p='<span contenteditable="true">'+p+"</span>":h&&(g["data-t"]=h&&h.t||"z",h.v!=null&&(g["data-v"]=h.v),h.z!=null&&(g["data-z"]=h.z),h.l&&(h.l.Target||"#").charAt(0)!="#"&&(p='<a href="'+h.l.Target+'">'+p+"</a>")),g.id=(r.id||"sjs")+"-"+d,s.push(Bt("td",p,g))}}var v="<tr>";return v+s.join("")+"</tr>"}var QNt='<html><head><meta charset="utf-8"/><title>SheetJS Table Export</title></head><body>',ZNt="</body></html>";function JNt(e,t,n){var r=[];return r.join("")+"<table"+(n&&n.id?' id="'+n.id+'"':"")+">"}function T2e(e,t){var n=t||{},r=n.header!=null?n.header:QNt,i=n.footer!=null?n.footer:ZNt,s=[r],a=Xl(e["!ref"]);n.dense=Array.isArray(e),s.push(JNt(e,a,n));for(var o=a.s.r;o<=a.e.r;++o)s.push(XNt(e,a,o,n));return s.push("</table>"+i),s.join("")}function A2e(e,t,n){var r=n||{},i=0,s=0;if(r.origin!=null)if(typeof r.origin=="number")i=r.origin;else{var a=typeof r.origin=="string"?Aa(r.origin):r.origin;i=a.r,s=a.c}var o=t.getElementsByTagName("tr"),c=Math.min(r.sheetRows||1e7,o.length),u={s:{r:0,c:0},e:{r:i,c:s}};if(e["!ref"]){var d=Xl(e["!ref"]);u.s.r=Math.min(u.s.r,d.s.r),u.s.c=Math.min(u.s.c,d.s.c),u.e.r=Math.max(u.e.r,d.e.r),u.e.c=Math.max(u.e.c,d.e.c),i==-1&&(u.e.r=i=d.e.r+1)}var h=[],p=0,g=e["!rows"]||(e["!rows"]=[]),v=0,x=0,_=0,w=0,S=0,E=0;for(e["!cols"]||(e["!cols"]=[]);v<o.length&&x<c;++v){var T=o[v];if(bre(T)){if(r.display)continue;g[x]={hidden:!0}}var N=T.children;for(_=w=0;_<N.length;++_){var A=N[_];if(!(r.display&&bre(A))){var k=A.hasAttribute("data-v")?A.getAttribute("data-v"):A.hasAttribute("v")?A.getAttribute("v"):RSt(A.innerHTML),j=A.getAttribute("data-z")||A.getAttribute("z");for(p=0;p<h.length;++p){var R=h[p];R.s.c==w+s&&R.s.r<x+i&&x+i<=R.e.r&&(w=R.e.c+1-s,p=-1)}E=+A.getAttribute("colspan")||1,((S=+A.getAttribute("rowspan")||1)>1||E>1)&&h.push({s:{r:x+i,c:w+s},e:{r:x+i+(S||1)-1,c:w+s+(E||1)-1}});var P={t:"s",v:k},V=A.getAttribute("data-t")||A.getAttribute("t")||"";k!=null&&(k.length==0?P.t=V||"z":r.raw||k.trim().length==0||V=="s"||(k==="TRUE"?P={t:"b",v:!0}:k==="FALSE"?P={t:"b",v:!1}:isNaN(dh(k))?isNaN(BS(k).getDate())||(P={t:"d",v:Bo(k)},r.cellDates||(P={t:"n",v:xl(P.v)}),P.z=r.dateNF||Ts[14]):P={t:"n",v:dh(k)})),P.z===void 0&&j!=null&&(P.z=j);var U="",G=A.getElementsByTagName("A");if(G&&G.length)for(var Q=0;Q<G.length&&!(G[Q].hasAttribute("href")&&(U=G[Q].getAttribute("href"),U.charAt(0)!="#"));++Q);U&&U.charAt(0)!="#"&&(P.l={Target:U}),r.dense?(e[x+i]||(e[x+i]=[]),e[x+i][w+s]=P):e[ci({c:w+s,r:x+i})]=P,u.e.c<w+s&&(u.e.c=w+s),w+=E}}++x}return h.length&&(e["!merges"]=(e["!merges"]||[]).concat(h)),u.e.r=Math.max(u.e.r,x-1+i),e["!ref"]=ia(u),x>=c&&(e["!fullref"]=ia((u.e.r=o.length-v+x-1+i,u))),e}function k2e(e,t){var n=t||{},r=n.dense?[]:{};return A2e(r,e,t)}function e3t(e,t){return Nx(k2e(e,t),t)}function bre(e){var t="",n=t3t(e);return n&&(t=n(e).getPropertyValue("display")),t||(t=e.style&&e.style.display),t==="none"}function t3t(e){return e.ownerDocument.defaultView&&typeof e.ownerDocument.defaultView.getComputedStyle=="function"?e.ownerDocument.defaultView.getComputedStyle:typeof getComputedStyle=="function"?getComputedStyle:null}var n3t=(function(){var e=["<office:master-styles>",'<style:master-page style:name="mp1" style:page-layout-name="mp1">',"<style:header/>",'<style:header-left style:display="false"/>',"<style:footer/>",'<style:footer-left style:display="false"/>',"</style:master-page>","</office:master-styles>"].join(""),t="<office:document-styles "+VS({"xmlns:office":"urn:oasis:names:tc:opendocument:xmlns:office:1.0","xmlns:table":"urn:oasis:names:tc:opendocument:xmlns:table:1.0","xmlns:style":"urn:oasis:names:tc:opendocument:xmlns:style:1.0","xmlns:text":"urn:oasis:names:tc:opendocument:xmlns:text:1.0","xmlns:draw":"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0","xmlns:fo":"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0","xmlns:xlink":"http://www.w3.org/1999/xlink","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:number":"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0","xmlns:svg":"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0","xmlns:of":"urn:oasis:names:tc:opendocument:xmlns:of:1.2","office:version":"1.2"})+">"+e+"</office:document-styles>";return function(){return oa+t}})(),_re=(function(){var e=function(s){return li(s).replace(/ +/g,function(a){return'<text:s text:c="'+a.length+'"/>'}).replace(/\t/g,"<text:tab/>").replace(/\n/g,"</text:p><text:p>").replace(/^ /,"<text:s/>").replace(/ $/,"<text:s/>")},t=` <table:table-cell /> 1325`,n=` <table:covered-table-cell/> 1326`,r=function(s,a,o){var c=[];c.push(' <table:table table:name="'+li(a.SheetNames[o])+`" table:style-name="ta1"> 1327`);var u=0,d=0,h=Xl(s["!ref"]||"A1"),p=s["!merges"]||[],g=0,v=Array.isArray(s);if(s["!cols"])for(d=0;d<=h.e.c;++d)c.push(" <table:table-column"+(s["!cols"][d]?' table:style-name="co'+s["!cols"][d].ods+'"':"")+`></table:table-column> 1328`);var x="",_=s["!rows"]||[];for(u=0;u<h.s.r;++u)x=_[u]?' table:style-name="ro'+_[u].ods+'"':"",c.push(" <table:table-row"+x+`></table:table-row> 1329`);for(;u<=h.e.r;++u){for(x=_[u]?' table:style-name="ro'+_[u].ods+'"':"",c.push(" <table:table-row"+x+`> 1330`),d=0;d<h.s.c;++d)c.push(t);for(;d<=h.e.c;++d){var w=!1,S={},E="";for(g=0;g!=p.length;++g)if(!(p[g].s.c>d)&&!(p[g].s.r>u)&&!(p[g].e.c<d)&&!(p[g].e.r<u)){(p[g].s.c!=d||p[g].s.r!=u)&&(w=!0),S["table:number-columns-spanned"]=p[g].e.c-p[g].s.c+1,S["table:number-rows-spanned"]=p[g].e.r-p[g].s.r+1;break}if(w){c.push(n);continue}var T=ci({r:u,c:d}),N=v?(s[u]||[])[d]:s[T];if(N&&N.f&&(S["table:formula"]=li(wAt(N.f)),N.F&&N.F.slice(0,T.length)==T)){var A=Xl(N.F);S["table:number-matrix-columns-spanned"]=A.e.c-A.s.c+1,S["table:number-matrix-rows-spanned"]=A.e.r-A.s.r+1}if(!N){c.push(t);continue}switch(N.t){case"b":E=N.v?"TRUE":"FALSE",S["office:value-type"]="boolean",S["office:boolean-value"]=N.v?"true":"false";break;case"n":E=N.w||String(N.v||0),S["office:value-type"]="float",S["office:value"]=N.v||0;break;case"s":case"str":E=N.v==null?"":N.v,S["office:value-type"]="string";break;case"d":E=N.w||Bo(N.v).toISOString(),S["office:value-type"]="date",S["office:date-value"]=Bo(N.v).toISOString(),S["table:style-name"]="ce1";break;default:c.push(t);continue}var k=e(E);if(N.l&&N.l.Target){var j=N.l.Target;j=j.charAt(0)=="#"?"#"+SAt(j.slice(1)):j,j.charAt(0)!="#"&&!j.match(/^\w+:/)&&(j="../"+j),k=Bt("text:a",k,{"xlink:href":j.replace(/&/g,"&")})}c.push(" "+Bt("table:table-cell",Bt("text:p",k,{}),S)+` 1331`)}c.push(` </table:table-row> 1332`)}return c.push(` </table:table> 1333`),c.join("")},i=function(s,a){s.push(` <office:automatic-styles> 1334`),s.push(` <number:date-style style:name="N37" number:automatic-order="true"> 1335`),s.push(` <number:month number:style="long"/> 1336`),s.push(` <number:text>/</number:text> 1337`),s.push(` <number:day number:style="long"/> 1338`),s.push(` <number:text>/</number:text> 1339`),s.push(` <number:year/> 1340`),s.push(` </number:date-style> 1341`);var o=0;a.SheetNames.map(function(u){return a.Sheets[u]}
vendor: 11,080 bytes, lines 1341-1358
1341).forEach(function(u){if(u&&u["!cols"]){for(var d=0;d<u["!cols"].length;++d)if(u["!cols"][d]){var h=u["!cols"][d];if(h.width==null&&h.wpx==null&&h.wch==null)continue;bU(h),h.ods=o;var p=u["!cols"][d].wpx+"px";s.push(' <style:style style:name="co'+o+`" style:family="table-column"> 1342`),s.push(' <style:table-column-properties fo:break-before="auto" style:column-width="'+p+`"/> 1343`),s.push(` </style:style> 1344`),++o}}});var c=0;a.SheetNames.map(function(u){return a.Sheets[u]}).forEach(function(u){if(u&&u["!rows"]){for(var d=0;d<u["!rows"].length;++d)if(u["!rows"][d]){u["!rows"][d].ods=c;var h=u["!rows"][d].hpx+"px";s.push(' <style:style style:name="ro'+c+`" style:family="table-row"> 1345`),s.push(' <style:table-row-properties fo:break-before="auto" style:row-height="'+h+`"/> 1346`),s.push(` </style:style> 1347`),++c}}}),s.push(` <style:style style:name="ta1" style:family="table" style:master-page-name="mp1"> 1348`),s.push(` <style:table-properties table:display="true" style:writing-mode="lr-tb"/> 1349`),s.push(` </style:style> 1350`),s.push(` <style:style style:name="ce1" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="N37"/> 1351`),s.push(` </office:automatic-styles> 1352`)};return function(a,o){var c=[oa],u=VS({"xmlns:office":"urn:oasis:names:tc:opendocument:xmlns:office:1.0","xmlns:table":"urn:oasis:names:tc:opendocument:xmlns:table:1.0","xmlns:style":"urn:oasis:names:tc:opendocument:xmlns:style:1.0","xmlns:text":"urn:oasis:names:tc:opendocument:xmlns:text:1.0","xmlns:draw":"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0","xmlns:fo":"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0","xmlns:xlink":"http://www.w3.org/1999/xlink","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:meta":"urn:oasis:names:tc:opendocument:xmlns:meta:1.0","xmlns:number":"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0","xmlns:presentation":"urn:oasis:names:tc:opendocument:xmlns:presentation:1.0","xmlns:svg":"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0","xmlns:chart":"urn:oasis:names:tc:opendocument:xmlns:chart:1.0","xmlns:dr3d":"urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0","xmlns:math":"http://www.w3.org/1998/Math/MathML","xmlns:form":"urn:oasis:names:tc:opendocument:xmlns:form:1.0","xmlns:script":"urn:oasis:names:tc:opendocument:xmlns:script:1.0","xmlns:ooo":"http://openoffice.org/2004/office","xmlns:ooow":"http://openoffice.org/2004/writer","xmlns:oooc":"http://openoffice.org/2004/calc","xmlns:dom":"http://www.w3.org/2001/xml-events","xmlns:xforms":"http://www.w3.org/2002/xforms","xmlns:xsd":"http://www.w3.org/2001/XMLSchema","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","xmlns:sheet":"urn:oasis:names:tc:opendocument:sh33tjs:1.0","xmlns:rpt":"http://openoffice.org/2005/report","xmlns:of":"urn:oasis:names:tc:opendocument:xmlns:of:1.2","xmlns:xhtml":"http://www.w3.org/1999/xhtml","xmlns:grddl":"http://www.w3.org/2003/g/data-view#","xmlns:tableooo":"http://openoffice.org/2009/table","xmlns:drawooo":"http://openoffice.org/2010/draw","xmlns:calcext":"urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0","xmlns:loext":"urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0","xmlns:field":"urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0","xmlns:formx":"urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0","xmlns:css3t":"http://www.w3.org/TR/css3-text/","office:version":"1.2"}),d=VS({"xmlns:config":"urn:oasis:names:tc:opendocument:xmlns:config:1.0","office:mimetype":"application/vnd.oasis.opendocument.spreadsheet"});o.bookType=="fods"?(c.push("<office:document"+u+d+`> 1353`),c.push(Vwe().replace(/office:document-meta/g,"office:meta"))):c.push("<office:document-content"+u+`> 1354`),i(c,a),c.push(` <office:body> 1355`),c.push(` <office:spreadsheet> 1356`);for(var h=0;h!=a.SheetNames.length;++h)c.push(r(a.Sheets[a.SheetNames[h]],a,h));return c.push(` </office:spreadsheet> 1357`),c.push(` </office:body> 1358`),o.bookType=="fods"?c.push("</office:document>"):c.push("</office:document-content>"),c.join("")}})();function N2e(e,t){if(t.bookType=="fods")return _re(e,t);var n=cU(),r="",i=[],s=[];return r="mimetype",rr(n,r,"application/vnd.oasis.opendocument.spreadsheet"),r="content.xml",rr(n,r,_re(e,t)),i.push([r,"text/xml"]),s.push([r,"ContentFile"]),r="styles.xml",rr(n,r,n3t(e,t)),i.push([r,"text/xml"]),s.push([r,"StylesFile"]),r="meta.xml",rr(n,r,oa+Vwe()),i.push([r,"text/xml"]),s.push([r,"MetadataFile"]),r="manifest.rdf",rr(n,r,pEt(s)),i.push([r,"application/rdf+xml"]),r="META-INF/manifest.xml",rr(n,r,fEt(i)),n}/*! sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */function uj(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function r3t(e){return typeof TextEncoder<"u"?new TextEncoder().encode(e):mu(US(e))}function i3t(e,t){e:for(var n=0;n<=e.length-t.length;++n){for(var r=0;r<t.length;++r)if(e[n+r]!=t[r])continue e;return!0}return!1}function jm(e){var t=e.reduce(function(i,s){return i+s.length},0),n=new Uint8Array(t),r=0;return e.forEach(function(i){n.set(i,r),r+=i.length}),n}function s3t(e,t,n){var r=Math.floor(n==0?0:Math.LOG10E*Math.log(Math.abs(n)))+6176-20,i=n/Math.pow(10,r-6176);e[t+15]|=r>>7,e[t+14]|=(r&127)<<1;for(var s=0;i>=1;++s,i/=256)e[t+s]=i&255;e[t+15]|=n>=0?0:128}function HS(e,t){var n=t?t[0]:0,r=e[n]&127;e:if(e[n++]>=128&&(r|=(e[n]&127)<<7,e[n++]<128||(r|=(e[n]&127)<<14,e[n++]<128)||(r|=(e[n]&127)<<21,e[n++]<128)||(r+=(e[n]&127)*Math.pow(2,28),++n,e[n++]<128)||(r+=(e[n]&127)*Math.pow(2,35),++n,e[n++]<128)||(r+=(e[n]&127)*Math.pow(2,42),++n,e[n++]<128)))break e;return t&&(t[0]=n),r}function ri(e){var t=new Uint8Array(7);t[0]=e&127;var n=1;e:if(e>127){if(t[n-1]|=128,t[n]=e>>7&127,++n,e<=16383||(t[n-1]|=128,t[n]=e>>14&127,++n,e<=2097151)||(t[n-1]|=128,t[n]=e>>21&127,++n,e<=268435455)||(t[n-1]|=128,t[n]=e/256>>>21&127,++n,e<=34359738367)||(t[n-1]|=128,t[n]=e/65536>>>21&127,++n,e<=4398046511103))break e;t[n-1]|=128,t[n]=e/16777216>>>21&127,++n}return t.slice(0,n)}function H1(e){var t=0,n=e[t]&127;e:if(e[t++]>=128){if(n|=(e[t]&127)<<7,e[t++]<128||(n|=(e[t]&127)<<14,e[t++]<128)||(n|=(e[t]&127)<<21,e[t++]<128))break e;n|=(e[t]&127)<<28}return n}function fa(e){for(var t=[],n=[0];n[0]<e.length;){var r=n[0],i=HS(e,n),s=i&7;i=Math.floor(i/8);var a=0,o;if(i==0)break;switch(s){case 0:{for(var c=n[0];e[n[0]++]>=128;);o=e.slice(c,n[0])}break;case 5:a=4,o=e.slice(n[0],n[0]+a),n[0]+=a;break;case 1:a=8,o=e.slice(n[0],n[0]+a),n[0]+=a;break;case 2:a=HS(e,n),o=e.slice(n[0],n[0]+a),n[0]+=a;break;case 3:case 4:default:throw new Error("PB Type ".concat(s," for Field ").concat(i," at offset ").concat(r))}var u={data:o,type:s};t[i]==null?t[i]=[u]:t[i].push(u)}return t}function za(e){var t=[];return e.forEach(function(n,r){n.forEach(function(i){i.data&&(t.push(ri(r*8+i.type)),i.type==2&&t.push(ri(i.data.length)),t.push(i.data))})}),jm(t)}function eu(e){for(var t,n=[],r=[0];r[0]<e.length;){var i=HS(e,r),s=fa(e.slice(r[0],r[0]+i));r[0]+=i;var a={id:H1(s[1][0].data),messages:[]};s[2].forEach(function(o){var c=fa(o.data),u=H1(c[3][0].data);a.messages.push({meta:c,data:e.slice(r[0],r[0]+u)}),r[0]+=u}),(t=s[3])!=null&&t[0]&&(a.merge=H1(s[3][0].data)>>>0>0),n.push(a)}return n}function Mv(e){var t=[];return e.forEach(function(n){var r=[];r[1]=[{data:ri(n.id),type:0}],r[2]=[],n.merge!=null&&(r[3]=[{data:ri(+!!n.merge),type:0}]);var i=[];n.messages.forEach(function(a){i.push(a.data),a.meta[3]=[{type:0,data:ri(a.data.length)}],r[2].push({data:za(a.meta),type:2})});var s=za(r);t.push(ri(s.length)),t.push(s),i.forEach(function(a){return t.push(a)})}),jm(t)}function a3t(e,t){if(e!=0)throw new Error("Unexpected Snappy chunk type ".concat(e));for(var n=[0],r=HS(t,n),i=[];n[0]<t.length;){var s=t[n[0]]&3;if(s==0){var a=t[n[0]++]>>2;if(a<60)++a;else{var o=a-59;a=t[n[0]],o>1&&(a|=t[n[0]+1]<<8),o>2&&(a|=t[n[0]+2]<<16),o>3&&(a|=t[n[0]+3]<<24),a>>>=0,a++,n[0]+=o}i.push(t.slice(n[0],n[0]+a)),n[0]+=a;continue}else{var c=0,u=0;if(s==1?(u=(t[n[0]]>>2&7)+4,c=(t[n[0]++]&224)<<3,c|=t[n[0]++]):(u=(t[n[0]++]>>2)+1,s==2?(c=t[n[0]]|t[n[0]+1]<<8,n[0]+=2):(c=(t[n[0]]|t[n[0]+1]<<8|t[n[0]+2]<<16|t[n[0]+3]<<24)>>>0,n[0]+=4)),i=[jm(i)],c==0)throw new Error("Invalid offset 0");if(c>i[0].length)throw new Error("Invalid offset beyond length");if(u>=c)for(i.push(i[0].slice(-c)),u-=c;u>=i[i.length-1].length;)i.push(i[i.length-1]),u-=i[i.length-1].length;i.push(i[0].slice(-c,-c+u))}}var d=jm(i);if(d.length!=r)throw new Error("Unexpected length: ".concat(d.length," != ").concat(r));return d}function tu(e){for(var t=[],n=0;n<e.length;){var r=e[n++],i=e[n]|e[n+1]<<8|e[n+2]<<16;n+=3,t.push(a3t(r,e.slice(n,n+i))),n+=i}if(n!==e.length)throw new Error("data is not a valid framed stream!");return jm(t)}function Dv(e){for(var t=[],n=0;n<e.length;){var r=Math.min(e.length-n,268435455),i=new Uint8Array(4);t.push(i);var s=ri(r),a=s.length;t.push(s),r<=60?(a++,t.push(new Uint8Array([r-1<<2]))):r<=256?(a+=2,t.push(new Uint8Array([240,r-1&255]))):r<=65536?(a+=3,t.push(new Uint8Array([244,r-1&255,r-1>>8&255]))):r<=16777216?(a+=4,t.push(new Uint8Array([248,r-1&255,r-1>>8&255,r-1>>16&255]))):r<=4294967296&&(a+=5,t.push(new Uint8Array([252,r-1&255,r-1>>8&255,r-1>>16&255,r-1>>>24&255]))),t.push(e.slice(n,n+r)),a+=r,i[0]=0,i[1]=a&255,i[2]=a>>8&255,i[3]=a>>16&255,n+=r}return jm(t)}function oD(e,t){var n=new Uint8Array(32),r=uj(n),i=12,s=0;switch(n[0]=5,e.t){case"n":n[1]=2,s3t(n,i,e.v),s|=1,i+=16;break;case"b":n[1]=6,r.setFloat64(i,e.v?1:0,!0),s|=2,i+=8;break;case"s":if(t.indexOf(e.v)==-1)throw new Error("Value ".concat(e.v," missing from SST!"));n[1]=3,r.setUint32(i,t.indexOf(e.v),!0),s|=8,i+=4;break;default:throw"unsupported cell type "+e.t}return r.setUint32(8,s,!0),n.slice(0,i)}function lD(e,t){var n=new Uint8Array(32),r=uj(n),i=12,s=0;switch(n[0]=3,e.t){case"n":n[2]=2,r.setFloat64(i,e.v,!0),s|=32,i+=8;break;case"b":n[2]=6,r.setFloat64(i,e.v?1:0,!0),s|=32,i+=8;break;case"s":if(t.indexOf(e.v)==-1)throw new Error("Value ".concat(e.v," missing from SST!"));n[2]=3,r.setUint32(i,t.indexOf(e.v),!0),s|=16,i+=4;break;default:throw"unsupported cell type "+e.t}return r.setUint32(4,s,!0),n.slice(0,i)}function Np(e){var t=fa(e);return HS(t[1][0].data)}function o3t(e,t,n){var r,i,s,a;if(!((r=e[6])!=null&&r[0])||!((i=e[7])!=null&&i[0]))throw"Mutation only works on post-BNC storages!";var o=((a=(s=e[8])==null?void 0:s[0])==null?void 0:a.data)&&H1(e[8][0].data)>0||!1;if(o)throw"Math only works with normal offsets";for(var c=0,u=uj(e[7][0].data),d=0,h=[],p=uj(e[4][0].data),g=0,v=[],x=0;x<t.length;++x){if(t[x]==null){u.setUint16(x*2,65535,!0),p.setUint16(x*2,65535);continue}u.setUint16(x*2,d,!0),p.setUint16(x*2,g,!0);var _,w;switch(typeof t[x]){case"string":_=oD({t:"s",v:t[x]},n),w=lD({t:"s",v:t[x]},n);break;case"number":_=oD({t:"n",v:t[x]},n),w=lD({t:"n",v:t[x]},n);break;case"boolean":_=oD({t:"b",v:t[x]},n),w=lD({t:"b",v:t[x]},n);break;default:throw new Error("Unsupported value "+t[x])}h.push(_),d+=_.length,v.push(w),g+=w.length,++c}for(e[2][0].data=ri(c);x<e[7][0].data.length/2;++x)u.setUint16(x*2,65535,!0),p.setUint16(x*2,65535,!0);return e[6][0].data=jm(h),e[3][0].data=jm(v),c}
1358function l3t(e,t){if(!t||!t.numbers)throw new Error("Must pass a `numbers` option -- check the README");var n=e.Sheets[e.SheetNames[0]];e.SheetNames.length>1&&console.error("The Numbers writer currently writes only the first table");var r=Xl(n["!ref"]);r.s.r=r.s.c=0;var i=!1;r.e.c>9&&(i=!0,r.e.c=9),r.e.r>49&&(i=!0,r.e.r=49),i&&console.error("The Numbers writer is currently limited to ".concat(ia(r)));var s=dj(n,{range:r,header:1}),a=["~Sh33tJ5~"];s.forEach(function(M){return M.forEach(function(q){typeof q=="string"&&a.push(q)})});var o={},c=[],u=_i.read(t.numbers,{type:"base64"});u.FileIndex.map(function(M,q){return[M,u.FullPaths[q]]}).forEach(function(M){var q=M[0],X=M[1];if(q.type==2&&q.name.match(/\.iwa/)){var J=q.content,W=tu(J),re=eu(W);re.forEach(function(ae){c.push(ae.id),o[ae.id]={deps:[],location:X,type:H1(ae.messages[0].meta[1][0].data)}})}}),c.sort(function(M,q){return M-q});var d=c.filter(function(M){return M>1}).map(function(M){return[M,ri(M)]});u.FileIndex.map(function(M,q){return[M,u.FullPaths[q]]}).forEach(function(M){var q=M[0];if(M[1],!!q.name.match(/\.iwa/)){var X=eu(tu(q.content));X.forEach(function(J){J.messages.forEach(function(W){d.forEach(function(re){J.messages.some(function(ae){return H1(ae.meta[1][0].data)!=11006&&i3t(ae.data,re[1])})&&o[re[0]].deps.push(J.id)})})})}});for(var h=_i.find(u,o[1].location),p=eu(tu(h.content)),g,v=0;v<p.length;++v){var x=p[v];x.id==1&&(g=x)}var _=Np(fa(g.messages[0].data)[1][0].data);for(h=_i.find(u,o[_].location),p=eu(tu(h.content)),v=0;v<p.length;++v)x=p[v],x.id==_&&(g=x);for(_=Np(fa(g.messages[0].data)[2][0].data),h=_i.find(u,o[_].location),p=eu(tu(h.content)),v=0;v<p.length;++v)x=p[v],x.id==_&&(g=x);for(_=Np(fa(g.messages[0].data)[2][0].data),h=_i.find(u,o[_].location),p=eu(tu(h.content)),v=0;v<p.length;++v)x=p[v],x.id==_&&(g=x);var w=fa(g.messages[0].data);{w[6][0].data=ri(r.e.r+1),w[7][0].data=ri(r.e.c+1);var S=Np(w[46][0].data),E=_i.find(u,o[S].location),T=eu(tu(E.content));{for(var N=0;N<T.length&&T[N].id!=S;++N);if(T[N].id!=S)throw"Bad ColumnRowUIDMapArchive";var A=fa(T[N].messages[0].data);A[1]=[],A[2]=[],A[3]=[];for(var k=0;k<=r.e.c;++k){var j=[];j[1]=j[2]=[{type:0,data:ri(k+420690)}],A[1].push({type:2,data:za(j)}),A[2].push({type:0,data:ri(k)}),A[3].push({type:0,data:ri(k)})}A[4]=[],A[5]=[],A[6]=[];for(var R=0;R<=r.e.r;++R)j=[],j[1]=j[2]=[{type:0,data:ri(R+726270)}],A[4].push({type:2,data:za(j)}),A[5].push({type:0,data:ri(R)}),A[6].push({type:0,data:ri(R)});T[N].messages[0].data=za(A)}E.content=Dv(Mv(T)),E.size=E.content.length,delete w[46];var P=fa(w[4][0].data);{P[7][0].data=ri(r.e.r+1);var V=fa(P[1][0].data),U=Np(V[2][0].data);E=_i.find(u,o[U].location),T=eu(tu(E.content));{if(T[0].id!=U)throw"Bad HeaderStorageBucket";var G=fa(T[0].messages[0].data);for(R=0;R<s.length;++R){var Q=fa(G[2][0].data);Q[1][0].data=ri(R),Q[4][0].data=ri(s[R].length),G[2][R]={type:G[2][0].type,data:za(Q)}}T[0].messages[0].data=za(G)}E.content=Dv(Mv(T)),E.size=E.content.length;var Z=Np(P[2][0].data);E=_i.find(u,o[Z].location),T=eu(tu(E.content));{if(T[0].id!=Z)throw"Bad HeaderStorageBucket";for(G=fa(T[0].messages[0].data),k=0;k<=r.e.c;++k)Q=fa(G[2][0].data),Q[1][0].data=ri(k),Q[4][0].data=ri(r.e.r+1),G[2][k]={type:G[2][0].type,data:za(Q)};T[0].messages[0].data=za(G)}E.content=Dv(Mv(T)),E.size=E.content.length;var K=Np(P[4][0].data);(function(){for(var M=_i.find(u,o[K].location),q=eu(tu(M.content)),X,J=0;J<q.length;++J){var W=q[J];W.id==K&&(X=W)}var re=fa(X.messages[0].data);{re[3]=[];var ae=[];a.forEach(function(fe,xe){ae[1]=[{type:0,data:ri(xe)}],ae[2]=[{type:0,data:ri(1)}],ae[3]=[{type:2,data:r3t(fe)}],re[3].push({type:2,data:za(ae)})})}X.messages[0].data=za(re);var ce=Mv(q),Te=Dv(ce);M.content=Te,M.size=M.content.length})();var te=fa(P[3][0].data);{var ne=te[1][0];delete te[2];var se=fa(ne.data);{var H=Np(se[2][0].data);(function(){for(var M=_i.find(u,o[H].location),q=eu(tu(M.content)),X,J=0;J<q.length;++J){var W=q[J];W.id==H&&(X=W)}var re=fa(X.messages[0].data);{delete re[6],delete te[7];var ae=new Uint8Array(re[5][0].data);re[5]=[];for(var ce=0,Te=0;Te<=r.e.r;++Te){var fe=fa(ae);ce+=o3t(fe,s[Te],a),fe[1][0].data=ri(Te),re[5].push({data:za(fe),type:2})}re[1]=[{type:0,data:ri(r.e.c+1)}],re[2]=[{type:0,data:ri(r.e.r+1)}],re[3]=[{type:0,data:ri(ce)}],re[4]=[{type:0,data:ri(r.e.r+1)}]}X.messages[0].data=za(re);var xe=Mv(q),ke=Dv(xe);M.content=ke,M.size=M.content.length})()}ne.data=za(se)}P[3][0].data=za(te)}w[4][0].data=za(P)}g.messages[0].data=za(w);var O=Mv(p),L=Dv(O);return h.content=L,h.size=h.content.length,u}function c3t(e){return function(n){for(var r=0;r!=e.length;++r){var i=e[r];n[i[0]]===void 0&&(n[i[0]]=i[1]),i[2]==="n"&&(n[i[0]]=Number(n[i[0]]))}}}function CU(e){c3t([["cellDates",!1],["bookSST",!1],["bookType","xlsx"],["compression",!1],["WTF",!1]])(e)}function u3t(e,t){return t.bookType=="ods"?N2e(e,t):t.bookType=="numbers"?l3t(e,t):t.bookType=="xlsb"?d3t(e,t):f3t(e,t)}
vendor: 5,548 bytes, line 1358
1358function d3t(e,t){g1=1024,e&&!e.SSF&&(e.SSF=vl(Ts)),e&&e.SSF&&($4(),z4(e.SSF),t.revssf=B4(e.SSF),t.revssf[e.SSF[65535]]=0,t.ssf=e.SSF),t.rels={},t.wbrels={},t.Strings=[],t.Strings.Count=0,t.Strings.Unique=0,h2?t.revStrings=new Map:(t.revStrings={},t.revStrings.foo=[],delete t.revStrings.foo);var n=t.bookType=="xlsb"?"bin":"xml",r=d2e.indexOf(t.bookType)>-1,i=$we();CU(t=t||{});var s=cU(),a="",o=0;if(t.cellXfs=[],Zm(t.cellXfs,{},{revssf:{General:0}}),e.Props||(e.Props={}),a="docProps/core.xml",rr(s,a,Hwe(e.Props,t)),i.coreprops.push(a),si(t.rels,2,a,zr.CORE_PROPS),a="docProps/app.xml",!(e.Props&&e.Props.SheetNames))if(!e.Workbook||!e.Workbook.Sheets)e.Props.SheetNames=e.SheetNames;else{for(var c=[],u=0;u<e.SheetNames.length;++u)(e.Workbook.Sheets[u]||{}).Hidden!=2&&c.push(e.SheetNames[u]);e.Props.SheetNames=c}for(e.Props.Worksheets=e.Props.SheetNames.length,rr(s,a,Wwe(e.Props)),i.extprops.push(a),si(t.rels,3,a,zr.EXT_PROPS),e.Custprops!==e.Props&&eo(e.Custprops||{}).length>0&&(a="docProps/custom.xml",rr(s,a,Gwe(e.Custprops)),i.custprops.push(a),si(t.rels,4,a,zr.CUST_PROPS)),o=1;o<=e.SheetNames.length;++o){var d={"!id":{}},h=e.Sheets[e.SheetNames[o-1]],p=(h||{})["!type"]||"sheet";switch(p){case"chart":default:a="xl/worksheets/sheet"+o+"."+n,rr(s,a,pNt(o-1,a,t,e,d)),i.sheets.push(a),si(t.wbrels,-1,"worksheets/sheet"+o+"."+n,zr.WS[0])}if(h){var g=h["!comments"],v=!1,x="";g&&g.length>0&&(x="xl/comments"+o+"."+n,rr(s,x,xNt(g,x)),i.comments.push(x),si(d,-1,"../comments"+o+"."+n,zr.CMNT),v=!0),h["!legacy"]&&v&&rr(s,"xl/drawings/vmlDrawing"+o+".vml",c2e(o,h["!comments"])),delete h["!comments"],delete h["!legacy"]}d["!id"].rId1&&rr(s,Uwe(a),U1(d))}return t.Strings!=null&&t.Strings.length>0&&(a="xl/sharedStrings."+n,rr(s,a,gNt(t.Strings,a,t)),i.strs.push(a),si(t.wbrels,-1,"sharedStrings."+n,zr.SST)),a="xl/workbook."+n,rr(s,a,hNt(e,a)),i.workbooks.push(a),si(t.rels,1,a,zr.WB),a="xl/theme/theme1.xml",rr(s,a,o2e(e.Themes,t)),i.themes.push(a),si(t.wbrels,-1,"theme/theme1.xml",zr.THEME),a="xl/styles."+n,rr(s,a,mNt(e,a,t)),i.styles.push(a),si(t.wbrels,-1,"styles."+n,zr.STY),e.vbaraw&&r&&(a="xl/vbaProject.bin",rr(s,a,e.vbaraw),i.vba.push(a),si(t.wbrels,-1,"vbaProject.bin",zr.VBA)),a="xl/metadata."+n,rr(s,a,vNt(a)),i.metadata.push(a),si(t.wbrels,-1,"metadata."+n,zr.XLMETA),rr(s,"[Content_Types].xml",Bwe(i,t)),rr(s,"_rels/.rels",U1(t.rels)),rr(s,"xl/_rels/workbook."+n+".rels",U1(t.wbrels)),delete t.revssf,delete t.ssf,s}function f3t(e,t){g1=1024,e&&!e.SSF&&(e.SSF=vl(Ts)),e&&e.SSF&&($4(),z4(e.SSF),t.revssf=B4(e.SSF),t.revssf[e.SSF[65535]]=0,t.ssf=e.SSF),t.rels={},t.wbrels={},t.Strings=[],t.Strings.Count=0,t.Strings.Unique=0,h2?t.revStrings=new Map:(t.revStrings={},t.revStrings.foo=[],delete t.revStrings.foo);var n="xml",r=d2e.indexOf(t.bookType)>-1,i=$we();CU(t=t||{});var s=cU(),a="",o=0;if(t.cellXfs=[],Zm(t.cellXfs,{},{revssf:{General:0}}),e.Props||(e.Props={}),a="docProps/core.xml",rr(s,a,Hwe(e.Props,t)),i.coreprops.push(a),si(t.rels,2,a,zr.CORE_PROPS),a="docProps/app.xml",!(e.Props&&e.Props.SheetNames))if(!e.Workbook||!e.Workbook.Sheets)e.Props.SheetNames=e.SheetNames;else{for(var c=[],u=0;u<e.SheetNames.length;++u)(e.Workbook.Sheets[u]||{}).Hidden!=2&&c.push(e.SheetNames[u]);e.Props.SheetNames=c}e.Props.Worksheets=e.Props.SheetNames.length,rr(s,a,Wwe(e.Props)),i.extprops.push(a),si(t.rels,3,a,zr.EXT_PROPS),e.Custprops!==e.Props&&eo(e.Custprops||{}).length>0&&(a="docProps/custom.xml",rr(s,a,Gwe(e.Custprops)),i.custprops.push(a),si(t.rels,4,a,zr.CUST_PROPS));var d=["SheetJ5"];for(t.tcid=0,o=1;o<=e.SheetNames.length;++o){var h={"!id":{}},p=e.Sheets[e.SheetNames[o-1]],g=(p||{})["!type"]||"sheet";switch(g){case"chart":default:a="xl/worksheets/sheet"+o+"."+n,rr(s,a,b2e(o-1,t,e,h)),i.sheets.push(a),si(t.wbrels,-1,"worksheets/sheet"+o+"."+n,zr.WS[0])}if(p){var v=p["!comments"],x=!1,_="";if(v&&v.length>0){var w=!1;v.forEach(function(S){S[1].forEach(function(E){E.T==!0&&(w=!0)})}),w&&(_="xl/threadedComments/threadedComment"+o+"."+n,rr(s,_,VCt(v,d,t)),i.threadedcomments.push(_),si(h,-1,"../threadedComments/threadedComment"+o+"."+n,zr.TCMNT)),_="xl/comments"+o+"."+n,rr(s,_,u2e(v)),i.comments.push(_),si(h,-1,"../comments"+o+"."+n,zr.CMNT),x=!0}p["!legacy"]&&x&&rr(s,"xl/drawings/vmlDrawing"+o+".vml",c2e(o,p["!comments"])),delete p["!comments"],delete p["!legacy"]}h["!id"].rId1&&rr(s,Uwe(a),U1(h))}return t.Strings!=null&&t.Strings.length>0&&(a="xl/sharedStrings."+n,rr(s,a,t2e(t.Strings,t)),i.strs.push(a),si(t.wbrels,-1,"sharedStrings."+n,zr.SST)),a="xl/workbook."+n,rr(s,a,S2e(e)),i.workbooks.push(a),si(t.rels,1,a,zr.WB),a="xl/theme/theme1.xml",rr(s,a,o2e(e.Themes,t)),i.themes.push(a),si(t.wbrels,-1,"theme/theme1.xml",zr.THEME),a="xl/styles."+n,rr(s,a,s2e(e,t)),i.styles.push(a),si(t.wbrels,-1,"styles."+n,zr.STY),e.vbaraw&&r&&(a="xl/vbaProject.bin",rr(s,a,e.vbaraw),i.vba.push(a),si(t.wbrels,-1,"vbaProject.bin",zr.VBA)),a="xl/metadata."+n,rr(s,a,l2e()),i.metadata.push(a),si(t.wbrels,-1,"metadata."+n,zr.XLMETA),d.length>1&&(a="xl/persons/person.xml",rr(s,a,HCt(d)),i.people.push(a),si(t.wbrels,-1,"persons/person.xml",zr.PEOPLE)),rr(s,"[Content_Types].xml",Bwe(i,t)),rr(s,"_rels/.rels",U1(t.rels)),rr(s,"xl/_rels/workbook."+n+".rels",U1(t.wbrels)),delete t.revssf,delete t.ssf,s}function h3t(e,t){var n="";switch((t||{}).type||"base64"){case"buffer":return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];case"base64":n=Mh(e.slice(0,12));break;case"binary":n=e;break;case"array":return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];default:throw new Error("Unrecognized type "+(t&&t.type||"undefined"))}
vendor: 6,116 bytes, line 1358
1358return[n.charCodeAt(0),n.charCodeAt(1),n.charCodeAt(2),n.charCodeAt(3),n.charCodeAt(4),n.charCodeAt(5),n.charCodeAt(6),n.charCodeAt(7)]}function j2e(e,t){switch(t.type){case"base64":case"binary":break;case"buffer":case"array":t.type="";break;case"file":return oC(t.file,_i.write(e,{type:Wr?"buffer":""}));case"string":throw new Error("'string' output type invalid for '"+t.bookType+"' files");default:throw new Error("Unrecognized type "+t.type)}return _i.write(e,t)}function p3t(e,t){var n=vl(t||{}),r=u3t(e,n);return m3t(r,n)}function m3t(e,t){var n={},r=Wr?"nodebuffer":typeof Uint8Array<"u"?"array":"string";if(t.compression&&(n.compression="DEFLATE"),t.password)n.type=r;else switch(t.type){case"base64":n.type="base64";break;case"binary":n.type="string";break;case"string":throw new Error("'string' output type invalid for '"+t.bookType+"' files");case"buffer":case"file":n.type=r;break;default:throw new Error("Unrecognized type "+t.type)}var i=e.FullPaths?_i.write(e,{fileType:"zip",type:{nodebuffer:"buffer",string:"binary"}[n.type]||n.type,compression:!!t.compression}):e.generate(n);if(typeof Deno<"u"&&typeof i=="string"){if(t.type=="binary"||t.type=="base64")return i;i=new Uint8Array(L4(i))}return t.password&&typeof encrypt_agile<"u"?j2e(encrypt_agile(i,t.password),t):t.type==="file"?oC(t.file,i):t.type=="string"?c2(i):i}function g3t(e,t){var n=t||{},r=INt(e,n);return j2e(r,n)}function ld(e,t,n){n||(n="");var r=n+e;switch(t.type){case"base64":return $S(US(r));case"binary":return US(r);case"string":return e;case"file":return oC(t.file,r,"utf8");case"buffer":return Wr?Xh(r,"utf8"):typeof TextEncoder<"u"?new TextEncoder().encode(r):ld(r,{type:"binary"}).split("").map(function(i){return i.charCodeAt(0)})}throw new Error("Unrecognized type "+t.type)}function x3t(e,t){switch(t.type){case"base64":return $S(e);case"binary":return e;case"string":return e;case"file":return oC(t.file,e,"binary");case"buffer":return Wr?Xh(e,"binary"):e.split("").map(function(n){return n.charCodeAt(0)})}throw new Error("Unrecognized type "+t.type)}function YA(e,t){switch(t.type){case"string":case"base64":case"binary":for(var n="",r=0;r<e.length;++r)n+=String.fromCharCode(e[r]);return t.type=="base64"?$S(n):t.type=="string"?c2(n):n;case"file":return oC(t.file,e);case"buffer":return e;default:throw new Error("Unrecognized type "+t.type)}}function R2e(e,t){q2t(),nNt(e);var n=vl(t||{});if(n.cellStyles&&(n.cellNF=!0,n.sheetStubs=!0),n.type=="array"){n.type="binary";var r=R2e(e,n);return n.type="array",L4(r)}var i=0;if(n.sheet&&(typeof n.sheet=="number"?i=n.sheet:i=e.SheetNames.indexOf(n.sheet),!e.SheetNames[i]))throw new Error("Sheet not found: "+n.sheet+" : "+typeof n.sheet);switch(n.bookType||"xlsb"){case"xml":case"xlml":return ld(jNt(e,n),n);case"slk":case"sylk":return ld(JEt.from_sheet(e.Sheets[e.SheetNames[i]],n),n);case"htm":case"html":return ld(T2e(e.Sheets[e.SheetNames[i]],n),n);case"txt":return x3t(I2e(e.Sheets[e.SheetNames[i]],n),n);case"csv":return ld(TU(e.Sheets[e.SheetNames[i]],n),n,"\uFEFF");case"dif":return ld(eCt.from_sheet(e.Sheets[e.SheetNames[i]],n),n);case"dbf":return YA(ZEt.from_sheet(e.Sheets[e.SheetNames[i]],n),n);case"prn":return ld(tCt.from_sheet(e.Sheets[e.SheetNames[i]],n),n);case"rtf":return ld(lCt.from_sheet(e.Sheets[e.SheetNames[i]],n),n);case"eth":return ld(e2e.from_sheet(e.Sheets[e.SheetNames[i]],n),n);case"fods":return ld(N2e(e,n),n);case"wk1":return YA(pre.sheet_to_wk1(e.Sheets[e.SheetNames[i]],n),n);case"wk3":return YA(pre.book_to_wk3(e,n),n);case"biff2":n.biff||(n.biff=2);case"biff3":n.biff||(n.biff=3);case"biff4":return n.biff||(n.biff=4),YA(C2e(e,n),n);case"biff5":n.biff||(n.biff=5);case"biff8":case"xla":case"xls":return n.biff||(n.biff=8),g3t(e,n);case"xlsx":case"xlsm":case"xlam":case"xlsb":case"numbers":case"ods":return p3t(e,n);default:throw new Error("Unrecognized bookType |"+n.bookType+"|")}}function v3t(e){if(!e.bookType){var t={xls:"biff8",htm:"html",slk:"sylk",socialcalc:"eth",Sh33tJS:"WTF"},n=e.file.slice(e.file.lastIndexOf(".")).toLowerCase();n.match(/^\.[a-z]+$/)&&(e.bookType=n.slice(1)),e.bookType=t[e.bookType]||e.bookType}}function y3t(e,t,n){var r={};return r.type="file",r.file=t,v3t(r),R2e(e,r)}function b3t(e,t,n,r,i,s,a,o){var c=Za(n),u=o.defval,d=o.raw||!Object.prototype.hasOwnProperty.call(o,"raw"),h=!0,p=i===1?[]:{};if(i!==1)if(Object.defineProperty)try{Object.defineProperty(p,"__rowNum__",{value:n,enumerable:!1})}catch{p.__rowNum__=n}else p.__rowNum__=n;if(!a||e[n])for(var g=t.s.c;g<=t.e.c;++g){var v=a?e[n][g]:e[r[g]+c];if(v===void 0||v.t===void 0){if(u===void 0)continue;s[g]!=null&&(p[s[g]]=u);continue}var x=v.v;switch(v.t){case"z":if(x==null)break;continue;case"e":x=x==0?null:void 0;break;case"s":case"d":case"b":case"n":break;default:throw new Error("unrecognized type "+v.t)}if(s[g]!=null){if(x==null)if(v.t=="e"&&x===null)p[s[g]]=null;else if(u!==void 0)p[s[g]]=u;else if(d&&x===null)p[s[g]]=null;else continue;else p[s[g]]=d&&(v.t!=="n"||v.t==="n"&&o.rawNumbers!==!1)?x:Dh(v,x,o);x!=null&&(h=!1)}}return{row:p,isempty:h}}function dj(e,t){if(e==null||e["!ref"]==null)return[];var n={t:"n",v:0},r=0,i=1,s=[],a=0,o="",c={s:{r:0,c:0},e:{r:0,c:0}},u=t||{},d=u.range!=null?u.range:e["!ref"];switch(u.header===1?r=1:u.header==="A"?r=2:Array.isArray(u.header)?r=3:u.header==null&&(r=0),typeof d){case"string":c=Hi(d);break;case"number":c=Hi(e["!ref"]),c.s.r=d;break;default:c=d}r>0&&(i=0);var h=Za(c.s.r),p=[],g=[],v=0,x=0,_=Array.isArray(e),w=c.s.r,S=0,E={};_&&!e[w]&&(e[w]=[]);var T=u.skipHidden&&e["!cols"]||[],N=u.skipHidden&&e["!rows"]||[];for(S=c.s.c;S<=c.e.c;++S)if(!(T[S]||{}).hidden)switch(p[S]=vo(S),n=_?e[w][S]:e[p[S]+h],r){case 1:s[S]=S-c.s.c;break;case 2:s[S]=p[S];break;case 3:s[S]=u.header[S-c.s.c];break;default:if(n==null&&(n={w:"__EMPTY",t:"s"}),o=a=Dh(n,null,u),x=E[a]||0,!x)E[a]=1;else{do o=a+"_"+x++;while(E[o]);E[a]=x,E[o]=1}s[S]=o}for(w=c.s.r+i;w<=c.e.r;++w)if(!(N[w]||{}).hidden){var A=b3t(e,c,w,p,r,s,_,u);(A.isempty===!1||(r===1?u.blankrows!==!1:u.blankrows))&&(g[v++]=A.row)}return g.length=v,g}var wre=/"/g;function _3t(e,t,n,r,i,s,a,o){for(var c=!0,u=[],d="",h=Za(n),p=t.s.c;p<=t.e.c;
vendor: 3,860 bytes, lines 1358-1360
1358++p)if(r[p]){var g=o.dense?(e[n]||[])[p]:e[r[p]+h];if(g==null)d="";else if(g.v!=null){c=!1,d=""+(o.rawNumbers&&g.t=="n"?g.v:Dh(g,null,o));for(var v=0,x=0;v!==d.length;++v)if((x=d.charCodeAt(v))===i||x===s||x===34||o.forceQuotes){d='"'+d.replace(wre,'""')+'"';break}d=="ID"&&(d='"ID"')}else g.f!=null&&!g.F?(c=!1,d="="+g.f,d.indexOf(",")>=0&&(d='"'+d.replace(wre,'""')+'"')):d="";u.push(d)}return o.blankrows===!1&&c?null:u.join(a)}function TU(e,t){var n=[],r=t??{};if(e==null||e["!ref"]==null)return"";var i=Hi(e["!ref"]),s=r.FS!==void 0?r.FS:",",a=s.charCodeAt(0),o=r.RS!==void 0?r.RS:` 1359`,c=o.charCodeAt(0),u=new RegExp((s=="|"?"\\|":s)+"+$"),d="",h=[];r.dense=Array.isArray(e);for(var p=r.skipHidden&&e["!cols"]||[],g=r.skipHidden&&e["!rows"]||[],v=i.s.c;v<=i.e.c;++v)(p[v]||{}).hidden||(h[v]=vo(v));for(var x=0,_=i.s.r;_<=i.e.r;++_)(g[_]||{}).hidden||(d=_3t(e,i,_,h,a,c,s,r),d!=null&&(r.strip&&(d=d.replace(u,"")),(d||r.blankrows!==!1)&&n.push((x++?o:"")+d)));return delete r.dense,n.join("")}function I2e(e,t){t||(t={}),t.FS=" ",t.RS=` 1360`;var n=TU(e,t);return n}function w3t(e){var t="",n,r="";if(e==null||e["!ref"]==null)return[];var i=Hi(e["!ref"]),s="",a=[],o,c=[],u=Array.isArray(e);for(o=i.s.c;o<=i.e.c;++o)a[o]=vo(o);for(var d=i.s.r;d<=i.e.r;++d)for(s=Za(d),o=i.s.c;o<=i.e.c;++o)if(t=a[o]+s,n=u?(e[d]||[])[o]:e[t],r="",n!==void 0){if(n.F!=null){if(t=n.F,!n.f)continue;r=n.f,t.indexOf(":")==-1&&(t=t+":"+t)}if(n.f!=null)r=n.f;else{if(n.t=="z")continue;if(n.t=="n"&&n.v!=null)r=""+n.v;else if(n.t=="b")r=n.v?"TRUE":"FALSE";else if(n.w!==void 0)r="'"+n.w;else{if(n.v===void 0)continue;n.t=="s"?r="'"+n.v:r=""+n.v}}c[c.length]=t+"="+r}return c}function O2e(e,t,n){var r=n||{},i=+!r.skipHeader,s=e||{},a=0,o=0;if(s&&r.origin!=null)if(typeof r.origin=="number")a=r.origin;else{var c=typeof r.origin=="string"?Aa(r.origin):r.origin;a=c.r,o=c.c}var u,d={s:{c:0,r:0},e:{c:o,r:a+t.length-1+i}};if(s["!ref"]){var h=Hi(s["!ref"]);d.e.c=Math.max(d.e.c,h.e.c),d.e.r=Math.max(d.e.r,h.e.r),a==-1&&(a=h.e.r+1,d.e.r=a+t.length-1+i)}else a==-1&&(a=0,d.e.r=t.length-1+i);var p=r.header||[],g=0;t.forEach(function(x,_){eo(x).forEach(function(w){(g=p.indexOf(w))==-1&&(p[g=p.length]=w);var S=x[w],E="z",T="",N=ci({c:o+g,r:a+_+i});u=qS(s,N),S&&typeof S=="object"&&!(S instanceof Date)?s[N]=S:(typeof S=="number"?E="n":typeof S=="boolean"?E="b":typeof S=="string"?E="s":S instanceof Date?(E="d",r.cellDates||(E="n",S=xl(S)),T=r.dateNF||Ts[14]):S===null&&r.nullError&&(E="e",S=0),u?(u.t=E,u.v=S,delete u.w,delete u.R,T&&(u.z=T)):s[N]=u={t:E,v:S},T&&(u.z=T))})}),d.e.c=Math.max(d.e.c,o+p.length-1);var v=Za(a);if(i)for(g=0;g<p.length;++g)s[vo(g+o)+v]={t:"s",v:p[g]};return s["!ref"]=ia(d),s}function S3t(e,t){return O2e(null,e,t)}function qS(e,t,n){if(typeof t=="string"){if(Array.isArray(e)){var r=Aa(t);return e[r.r]||(e[r.r]=[]),e[r.r][r.c]||(e[r.r][r.c]={t:"z"})}return e[t]||(e[t]={t:"z"})}return typeof t!="number"?qS(e,ci(t)):qS(e,ci({r:t,c:n||0}))}function E3t(e,t){if(typeof t=="number"){if(t>=0&&e.SheetNames.length>t)return t;throw new Error("Cannot find sheet # "+t)}else if(typeof t=="string"){var n=e.SheetNames.indexOf(t);if(n>-1)return n;throw new Error("Cannot find sheet name |"+t+"|")}else throw new Error("Cannot find sheet |"+t+"|")}function C3t(){return{SheetNames:[],Sheets:{}}}function T3t(e,t,n,r){var i=1;if(!n)for(;i<=65535&&e.SheetNames.indexOf(n="Sheet"+i)!=-1;++i,n=void 0);if(!n||e.SheetNames.length>=65535)throw new Error("Too many worksheets");if(r&&e.SheetNames.indexOf(n)>=0){var s=n.match(/(^.*?)(\d+)$/);i=s&&+s[2]||0;var a=s&&s[1]||n;for(++i;i<=65535&&e.SheetNames.indexOf(n=a+i)!=-1;++i);}if(w2e(n),e.SheetNames.indexOf(n)>=0)throw new Error("Worksheet with name |"+n+"| already exists!");return e.SheetNames.push(n),e.Sheets[n]=t,n}function A3t(e,t,n){e.Workbook||(e.Workbook={}),e.Workbook.Sheets||(e.Workbook.Sheets=[]);var r=E3t(e,t);
1360switch(e.Workbook.Sheets[r]||(e.Workbook.Sheets[r]={}),n){case 0:case 1:case 2:break;default:throw new Error("Bad sheet visibility setting "+n)}e.Workbook.Sheets[r].Hidden=n}function k3t(e,t){return e.z=t,e}function P2e(e,t,n){return t?(e.l={Target:t},n&&(e.l.Tooltip=n)):delete e.l,e}function N3t(e,t,n){return P2e(e,"#"+t,n)}function j3t(e,t,n){e.c||(e.c=[]),e.c.push({t,a:n||"SheetJS"})}function R3t(e,t,n,r){for(var i=typeof t!="string"?t:Hi(t),s=typeof t=="string"?t:ia(t),a=i.s.r;a<=i.e.r;++a)for(var o=i.s.c;o<=i.e.c;++o){var c=qS(e,a,o);c.t="n",c.F=s,delete c.v,a==i.s.r&&o==i.s.c&&(c.f=n,r&&(c.D=!0))}return e}var H_={encode_col:vo,encode_row:Za,encode_cell:ci,encode_range:ia,decode_col:mU,decode_row:pU,split_cell:qSt,decode_cell:Aa,decode_range:Xl,format_cell:Dh,sheet_add_aoa:Pwe,sheet_add_json:O2e,sheet_add_dom:A2e,aoa_to_sheet:mb,json_to_sheet:S3t,table_to_sheet:k2e,table_to_book:e3t,sheet_to_csv:TU,sheet_to_txt:I2e,sheet_to_json:dj,sheet_to_html:T2e,sheet_to_formulae:w3t,sheet_to_row_object_array:dj,sheet_get_cell:qS,book_new:C3t,book_append_sheet:T3t,book_set_sheet_visibility:A3t,cell_set_number_format:k3t,cell_set_hyperlink:P2e,cell_set_internal_link:N3t,cell_add_comment:j3t,sheet_set_array_formula:R3t,consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};function I3t(){const{i18n:e,_:t}=Me(),n=b.useMemo(()=>[e._({id:"cIrPO7"}),e._({id:"/t6o5Z"}),e._({id:"bfgr/e"}),e._({id:"4xBHUg"}),e._({id:"omfJNi"}),e._({id:"t2rBZB"}),e._({id:"XmVUbU"}),e._({id:"Zf6u+6"}),e._({id:"8vQkDt"})],[t]),r=b.useCallback((s,a)=>{const o=H_.book_new(),c=s.filter(_=>_.messages.length>0&&_.messages[0]?.results),u=c.reduce((_,w)=>_+w.messages.length,0),d=c.reduce((_,w)=>_+w.messages.filter(S=>S.results.isCorrect).length,0);let h=c.reduce((_,w)=>_+w.messages[0].results.accuracyPercentage,0);h=h>0?h/s.length:0;const p=[["Evaluation Summary"],["Date",new Date().toLocaleString()],["Total Messages",u],["Correct Answers",d],["Incorrect Answers",u-d],["Median Accuracy",yt.percentage(h)]];a&&p.push([""],["Chat Configuration"],["Chat ID",a.id],["Chat Name",a.name],["Agent",a.agent],["Model",a.model],...Object.entries(a.agentConfig||{}).filter(([_])=>!["systemPrompt","tone"].includes(_)).map(([_,w])=>[_,w]));const g=H_.aoa_to_sheet(p),v=s.flatMap((_,w)=>_.messages.map((S,E)=>[`Thread ${w+1}`,E+1,S.question,S.answer,S.expectedOutput,S.results.isCorrect?e._({id:"l75CjT"}):e._({id:"1UzENP"}),yt.percentage(S.results.accuracyPercentage),S.results.explanation,`${S.latency}ms`])),x=H_.aoa_to_sheet([n,...v]);return H_.book_append_sheet(o,g,"Summary"),H_.book_append_sheet(o,x,"Details"),g["!cols"]=[{wch:15},{wch:50}],x["!cols"]=n.map(()=>({wch:20})),o},[n,t]),i=b.useCallback((s,a,o)=>{const c=r(s,o);y3t(c,`${yt.date(new Date,Zn.DateInput)}_${e._({id:"Da3e0s"})}_${a}_${o?.agent}_${o?.name}.xlsx`)},[r,t]);return{generateWorkbook:r,downloadXls:i}}function O3t({data:e}){const{i18n:t,_:n}=Me(),[r,i]=b.useState(""),[s,a]=b.useState(0),{downloadXls:o}=I3t(),[c,u]=b.useState([]),{isPending:d,mutate:h}=Ae.evaluation.evaluate.useMutation({onSuccess:async x=>{for await(const _ of x)u(w=>[...w,_])}}),p=b.useCallback(x=>{i(x);try{const _=JSON.parse(x);a(_.reduce((w,S)=>w+S.messages.length,0))}catch(_){console.error(_),a(0)}},[]),g=b.useCallback(()=>{try{if(e?.id){const x=Nqe.parse({chatId:e.id,testCases:JSON.parse(r)});h(x),u([])}}catch(x){console.error(x),Re.error(t._({id:"WocQsS"}),{description:t._({id:"rq0w8B"})})}},[e?.id,h,n,r]),v=b.useCallback(()=>{e&&o(c,e.id,e)},[e,o,c]);return e?.id?l.jsx(gn,{title:t._({id:"JlfFwS"}),children:l.jsxs(ui,{children:[l.jsx(u5,{asChild:!0,children:l.jsxs(Oe,{variant:"success",children:[l.jsx(GIe,{className:"mr-1 size-4"}),"Â ",t._({id:"UKdZ7G"})]})}),l.jsxs(Fi,{className:"flex size-full max-h-[95%] max-w-[1680px] flex-col",children:[l.jsx(Wi,{className:"grow-0",children:t._({id:"kRX+iM"})}),l.jsx(no,{className:"grow-0",children:t._({id:"eEAHXz"})}),l.jsxs(E9e,{direction:"horizontal",children:[l.jsx(Y6,{children:l.jsx("div",{className:"size-full pr-3",children:l.jsx(_mt,{onChange:p})})}),l.jsx(C9e,{withHandle:!0}),l.jsx(Y6,{children:l.jsx("div",{className:"size-full grow overflow-y-auto pl-3",children:l.jsx(U2t,{chat:e,data:c,loading:d,totalMessages:s})})})]}),l.jsxs(wi,{children:[l.jsxs(Oe,{onClick:v,disabled:d||c.length===0,className:"flex items-center gap-2",children:[l.jsx(nRe,{className:"size-4"}),t._({id:"+5M0M0"})]}),l.jsx(_h,{orientation:"vertical"}),l.jsx(Oe,{type:"button",variant:"success",onClick:g,loading:d,disabled:d,children:t._({i
1360d:"UKdZ7G"})}),l.jsx(Fm,{asChild:!0,children:l.jsx(Oe,{variant:"ghost",outline:!0,children:t._({id:"yz7wBu"})})})]})]})]})}):null}const P3t=b.memo(function({}){const{i18n:t,_:n}=Me(),{hasAccess:r}=Uc(),{schema:i}=oi([{name:"overrides",label:"Enable overrides",type:"checkbox",uiControl:"switch",defaultValue:!1,visible:r([Jt.SuperAdmin])},{$relevant:{$when:({formState:s})=>!!s.values?.overrides,$fields:[{name:"agentConfig.historyTokenBudget",label:t._({id:"cTnBH6"}),type:"number",visible:r([Jt.SuperAdmin]),tooltip:t._({id:"xTPnfB"})},{name:"agentConfig.toolResultHistoryTokenBudget",label:t._({id:"ff8ylG"}),type:"number",visible:r([Jt.SuperAdmin]),tooltip:t._({id:"kUGYFB"})},{name:"agentConfig.hybridAlpha",visible:r([Jt.SuperAdmin]),label:"hybridAlpha",tooltip:"An alpha of 1 is a pure vector search. An alpha of 0 is a pure keyword search.",type:"number",defaultValue:.7,uiProps:{min:0,max:1,step:.1}},{name:"agentConfig.retrievalCount",visible:r([Jt.SuperAdmin]),label:"retrievalCount",type:"number",defaultValue:50,uiProps:{min:1,max:250,step:1}},{name:"agentConfig.retrievalTokenCap",visible:r([Jt.SuperAdmin]),label:"retrievalTokenCap",tooltip:"Max tokens of a single documentSearch result fed back to the model. Higher = the model sees more chunks in the live turn (better recall) but each search costs more replayed context on later turns. Leave empty for the runtime default (12000).",type:"number",uiProps:{min:500,max:16e3,step:500}},{name:"agentConfig.rerank",visible:r([Jt.SuperAdmin]),label:"rerank",type:"checkbox",uiControl:"switch",defaultValue:!0},{$relevant:{$when:({formState:s})=>!!s.values?.agentConfig?.rerank,$fields:[{name:"agentConfig.rerankCount",visible:r([Jt.SuperAdmin]),label:"rerankCount",type:"number",defaultValue:10,uiProps:{min:1,max:100,step:1}},{name:"agentConfig.rerankCoefficient",visible:r([Jt.SuperAdmin]),label:"rerankCoefficient",type:"number",defaultValue:.7,tooltip:"The coefficient that determines the influence of the reranked documents on the final result.",uiProps:{min:0,max:1,step:.1}}]}},{name:"agentConfig.weightRerankCoefficient",visible:r([Jt.SuperAdmin]),label:"weightRerankCoefficient",type:"number",defaultValue:.3,tooltip:"Final ranking influence of document priority. At 0.3, relevance contributes 70% and the configured document weight contributes 30%. Applied before the top-result cut, including when reranking is off or unavailable.",uiProps:{min:0,max:1,step:.1}},{name:"agentConfig.minScore",visible:r([Jt.SuperAdmin]),label:"minScore",tooltip:"Absolute relevance floor before document-priority boosting (0-1); 0 or empty disables it. Use cautiously: when the reranker is unavailable, fallback hybrid scores use a different scale, so the same floor can remove a different share of results.",type:"number",uiProps:{min:0,max:1,step:.05}}]}}],[n,r]);return l.jsx(gn,{title:"Overrides",variant:"secondary",children:l.jsx(Yr,{schema:i})})}),M3t="/assets/show-callouts-tooltip-DT_KSLYd.webp",D3t=b.memo(()=>{const{i18n:e,_:t}=Me(),n=fs("agentType"),{schema:r}=oi([{name:"chatbotConfig.initialMessage",label:e._({id:"c/+R+g"}),type:"richtext",defaultValue:e._({id:"ZzTxlM"}),showOptional:!1},{name:"chatbotConfig.showPopup",label:e._({id:"mu538r"}),type:"checkbox",uiControl:"switch",defaultValue:!0,showOptional:!1},{$relevant:{$when:({formState:i})=>i?.values?.chatbotConfig?.showPopup,$fields:[{name:"chatbotConfig.bubbleTitle",label:e._({id:"2NSrbp"}),type:"text",defaultValue:e._({id:"3Z2HmF"}),showOptional:!1},{name:"chatbotConfig.bubbleDescription",label:e._({id:"F9TVxD"}),type:"text",defaultValue:e._({id:"vkUaVC"}),showOptional:!1},{name:"chatbotConfig.showPopupMobile",label:e._({id:"k/86Nf"}),type:"checkbox",uiControl:"switch",defaultValue:!1,showOptional:!1}]}},{name:"chatbotConfig.openOnLoad",label:e._({id:"l7D8Gk"}),type:"checkbox",uiControl:"switch",defaultValue:!1,showOptional:!1,uiProps:{tooltip:l.jsxs("div",{className:"flex max-w-80 flex-col gap-2",children:[l.jsx("h4",{className:"text-base font-bold",children:e._({id:"l7D8Gk"})}),l.jsx("p",{className:"text-sm",children:l.jsx(D,{id:"70BU8u"})})]})}},{name:"chatbotConfig.showFeedbackButtons",label:e._({id:"Z/xYo2"}),type:"checkbox",uiControl:"switch",defaultValue:!0,showOptional:!1},{name:"chatbotConfig.showCallouts",label:e._({id:"Ug0MGf"}),type:"checkbox",uiControl:"switch",uiProps:{tooltip:l.jsxs("div",{className:"flex max-w-80 flex-col gap-2",children:[l.jsx("h4",{className:"text-base font-bold",children:e._({id:"3rmLmt"})}),l.jsx("p",{className:"text-sm",children:l.jsx(D,{id:"hVpPmX"})}),l.jsx("img",{className:"mx-auto rounded-lg border border-border text-sm shadow-md",src:M3t,alt:"Show callouts"}),l.jsx("p",{children:l.jsx(D,{id:"WtgibV",components:{0:l.jsx("strong",{})}})})]})},defaultValue:!0,showOptional:!1}],[t]);return n.value!==ai.Chat?null:l.jsx(gn,{title:e._({id:"VrNltZ"}),children:l.jsx(Yr,{schema:r})})});function F3t(){const{i18n:e,_:t}=Me(),{schema:n}=oi([{name:"agentConfig.moderationMode",label:e._({id:"VAX55M"}),tooltip:e._({id:"0hmwxR"}),type:"select",options:{parallel:e._({id:"vkHwKs"}),blocking:e._({id:"aDhxAO"}),off:e._({id:"az8lvo"})},defaultValue:"parallel"},{$relevant:{$when:({formState:r})=>r.values?.agentType!==ai.Voice,$fields:[{name:"chatbotConfig.maxUserMessagesEnabled",label:e._({id:"bd++2O"}),tooltip:e._({id:"hC8iAM"}),type:"checkbox",uiControl:"switch",defaultValue:E_.maxUserMessagesEnabled,showOptional:!1},{$relevant:{$when:({formState:r})=>!!r.values?.chatbotConfig?.maxUserMessagesEnabled,$fields:[{name:"chatbotConfig.maxUserMessagesLimit",label:e._({id:"99eOo9"}),tooltip:e._({id:"ZFrqvc"}),type:"number",defaultValue:E_.maxUserMessagesLimit,parser:r=>{if(r===""||r===null||r===void 0)return null;const i=Number(r);return Number.isFinite(i)?i:null},mask:r=>r==null?"":String(r),uiProps:{min:1,step:1}}]}},{name:"chatbotConfig.captchaEnabled",label:e._({id:"anj5f+"}),tooltip:e._({id:"1yk5iq"}),type:"checkbox",uiControl:"switch",defaultValue:E_.captchaEnabled,showOptional:!1},{$relevant:{$when:({formState:r})=>!!r.values?.chatbotConfig?.captchaEnabled,$fields:[{name:"chatbotConfig.captchaLimit",label:e._({id:"hLScCQ"}),tooltip:e._({id:"5zN6JM"}),type:"number",defaultValue:E_.captchaLimit},{name:"chatbotConfig.captchaWindowSeconds",label:e._({id:"5J9kaF"}),tooltip:e._({id:"SpQAn3"}),type:"number",defaultValue:E_.captchaWindowSeconds},{name:"chatbotConfig.captchaScoreThreshold",label:e._({id:"N6Bs0t"}),tooltip:e._({id:"u0GvM6"}
1360),type:"number",defaultValue:.5,uiProps:{min:0,max:1,step:.1}}]}}]}}],[t]);return l.jsx(gn,{title:e._({id:"Po0xFB"}),collapsed:!0,children:l.jsx(Yr,{schema:n})})}const L3t=[We.DocumentSearch,We.FindDocuments,We.GetDocumentOverview,We.FetchUrl,We.GetOperator,We.UpdateWorkingMemory],z3t=[We.GetShopProducts,We.GetSimilarProducts,We.GetShopProductByProductId,We.GetShopProductByExternalId,We.GetShopProductByEan,We.GetShopProductByIsbn,We.GetShopCategories,We.GetShopDeliveryOptions,We.GetShopProductAvailability,We.GetShopProductGifts,We.GetShopProductAccessories,We.CompareShopProducts],$3t=[We.RecordAnswerSources];function B3t(e,t){return[...L3t,...t===ai.Voice?$3t:[],...e===Fs.ShopAssistant?z3t:[]]}const U3t=b.memo(function({}){const{i18n:t,_:n}=Me(),{hasAccess:r}=Uc(),i=fs("agent"),s=fs("agentType"),a=i.value,o={[We.RecordAnswerSources]:t._({id:"D0Phou"}),[We.DocumentSearch]:t._({id:"2L38I3"}),[We.FindDocuments]:t._({id:"4tYcbV"}),[We.GetDocumentOverview]:t._({id:"wT7PQ1"}),[We.FetchUrl]:t._({id:"t88D8/"}),[We.GetOperator]:t._({id:"VP4a5W"}),[We.UpdateWorkingMemory]:t._({id:"QTX90n"}),[We.GetShopProducts]:t._({id:"7ruRjD"}),[We.GetSimilarProducts]:t._({id:"9KLkqm"}),[We.GetShopProductByProductId]:t._({id:"l5goZs"}),[We.GetShopProductByExternalId]:t._({id:"MrwmSm"}),[We.GetShopProductByEan]:t._({id:"WPw3oL"}
1360),[We.GetShopProductByIsbn]:t._({id:"q5R00t"}),[We.GetShopCategories]:t._({id:"BaIgYd"}),[We.GetShopDeliveryOptions]:t._({id:"HEAsfZ"}),[We.GetShopProductAvailability]:t._({id:"WtOHME"}),[We.GetShopProductGifts]:t._({id:"4XgvXi"}),[We.GetShopProductAccessories]:t._({id:"5HCuUn"}),[We.CompareShopProducts]:t._({id:"7Wm5n+"})},c=Object.fromEntries(B3t(a,s.value).map(d=>[d,o[d]])),{schema:u}=oi([{name:"agentConfig.systemPrompt",visible:r([Jt.SuperAdmin]),label:t._({id:"pv7eL0"}),type:"text",uiProps:{rows:10},uiControl:"textarea"},{$relevant:{$when:({formState:d})=>{const h=d.values?.agent;return h===Fs.Conversational||h===Fs.ShopAssistant},$fields:[{name:"agentConfig.enabledBuiltinTools",label:t._({id:"aUMiD6"}),type:"multiselect",visible:r([Jt.SuperAdmin]),options:c,tooltip:t._({id:"rATtfq"}),showOptional:!1}]}}],[n,r,a,c]);return l.jsx(gn,{title:t._({id:"2rG7su"}),variant:"secondary",children:l.jsx(Yr,{schema:u})})});function V3t({chatId:e}){const{i18n:t,_:n}=Me(),{data:r,refetch:i}=Ae.chats.getTwilioCredentialsStatus.useQuery({id:e}),[s,a]=b.useState(""),[o,c]=b.useState(""),u=Ae.chats.setTwilioCredentials.useMutation({onSuccess:async()=>{Re.success(t._({id:"c8DNco"})),a(""),c(""),await i()},onError:g=>Re.error(g.message)}),d=Ae.chats.clearTwilioCredentials.useMutation({onSuccess:async()=>{Re.success(t._({id:"IVfD8I"})),await i()},onError:g=>Re.error(g.message)}),h=r?.hasCustomCredentials??!1,p=s.trim().length>0&&o.trim().length>0;return l.jsxs(gn,{title:t._({id:"sxkWRg"}),collapsed:!0,size:"sm",children:[l.jsx("p",{className:"text-xs text-muted-fg",children:h?t._({id:"g3U30P"}):t._({id:"SArmsH"})}),h&&l.jsx(Oe,{type:"button",variant:"secondary",size:"sm",loading:d.isPending,onClick:()=>d.mutate({id:e}),children:t._({id:"5XIHmp"})}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{children:t._({id:"zmu4+P"})}),l.jsx(fn,{value:s,onChange:g=>a(g.target.value),placeholder:"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{children:t._({id:"ROlbOM"})}),l.jsx(fn,{type:"password",value:o,onChange:g=>c(g.target.value),placeholder:h?t._({id:"9LTsMR"}):""})]}),l.jsx("p",{className:"text-xs text-muted-fg",children:t._({id:"PVFapG"})}),l.jsx(Oe,{type:"button",loading:u.isPending,disabled:!p,onClick:()=>u.mutate({id:e,accountSid:s,authToken:o}),children:t._({id:"m6SRBp"})})]})}function H3t({data:e}){const{hasAccess:t}=Uc(),{i18n:n,_:r}=Me(),{schema:i}=oi([{name:"voiceConfig.twilio.number",label:n._({id:"ZuLy43"}),placeholder:"+420123456789",tooltip:n._({id:"DbZ9JY"})}],[r,t]);return fs("agentType").value!==ai.Voice?null:l.jsxs(gn,{title:n._({id:"ZuLy43"}),children:[l.jsx(Yr,{schema:i}),e?.id&&l.jsx(V3t,{chatId:e.id})]})}const q3t=b.memo(function({name:t,type:n,onChange:r,onRemove:i,disableRemove:s,initialValue:a,removeButtonTitle:o}){const[c,u]=b.useState(a||"");return l.jsxs("div",{className:"flex flex-row items-center justify-center gap-2",children:[l.jsx(fn,{name:t,type:n,value:c,onChange:({currentTarget:d})=>{u(d.value),r?.(d.value)}}),l.jsx(Oe,{variant:"ghost",outline:!0,size:"icon-sm","data-cta":"admin-list-input-remove-item-button",className:"shrink-0",type:"button",title:o,disabled:s,onClick:()=>i(t),children:l.jsx(E0,{className:`size-5 ${s?"text-gray-500":"text-red-500"}`})})]})}),W3t=b.memo(function({name:t,type:n,label:r,onChange:i,containerClassName:s,minLines:a=0,startItemsAmount:o=0,trimValues:c=!1,submitEmptyLines:u=!1,addItemLabel:d,addItemTitle:h,defaultValue:p=[],removeItemTitle:g}){const{fieldApi:v,fieldState:x}=Uh({name:t,defaultValue:p}),{setValue:_,setTouched:w,setFocused:S}=v,[E,T]=b.useState(()=>!x.value||!Array.isArray(x.value)?[]:x.value.map(R=>({id:Hp(),value:R}))),N=b.useCallback(R=>{let P=R.map(V=>c?V.value.trim():V.value);u||(P=P.filter(V=>V!=="")),_(P),w(!0),i?.(P)},[u,_,w,i,c]),A=(R,P)=>{const V=[...E];V[R]={...V[R],value:P},T(()=>V),N(V)},k=R=>{const P=E.filter((V,U)=>U!==R);T(()=>P),N(P)},j=()=>{const R=[...E,{id:Hp(),value:""}];T(()=>R),N(R)};return b.useEffect(()=>{if(a<=E.length)return;const R=Array.from({length:a},(P,V)=>E[V]?E[V]:{id:Hp(),value:""});T(()=>R),N(R)},[E,a,N]),b.useEffect(()=>{if(o<=E.length)return;const R=Array.from({length:o},(P,V)=>E[V]?E[V]:{id:Hp(),value:""});T(()=>R),N(R)},[]),l.jsxs("div",{className:$e("flex","flex-col","gap-2",s),onFocus:()=>S(!0),children:[l.jsx(ot,{children:r}),E.map((R,P)=>l.jsx(q3t,{disableRemove:E.length<=a,name:`${t}_${R.id}`,type:n,initialValue:R.value,onChange:V=>A(P,V),onRemove:()=>k(P),removeButtonTitle:g||Be._({id:"t/YqKh"})},R.id)),l.jsx(Oe,{"data-cta":"admin-list-input-add-item-button",title:h,type:"button",onClick:j,children:d||Be._({id:"AWmm5l"})})]})}),G3t={[xr.Achernar]:{id:"bgjaGb"},[xr.Achird]:{id:"Gq7H1m"},[xr.Algenib]:{id:"gzBcgB"},[xr.Algieba]:{id:"atVdgX"},[xr.Alnilam]:{id:"RtEHo7"},[xr.Aoede]:{id:"VrOMuD"},[xr.Autonoe]:{id:"jEvJsi"},[xr.Callirrhoe]:{id:"VHgvXU"},[xr.Charon]:{id:"xazJTP"},[xr.Despina]:{id:"atVdgX"},[xr.Enceladus]:{id:"jVv0Kh"},[xr.Erinome]:{id:"xCJdfg"},[xr.Fenrir]:{id:"yuy18c"},[xr.Gacrux]:{id:"Dngaxv"},[xr.Iapetus]:{id:"xCJdfg"},[xr.Kore]:{id:"RtEHo7"},[xr.Laomedeia]:{id:"Eta8YL"},[xr.Leda]:{id:"NTFxgA"},[xr.Orus]:{id:"RtEHo7"},[xr.Puck]:{id:"Eta8YL"},[xr.Pulcherrima]:{id:"rxWGWX"},[xr.Rasalgethi]:{id:"xazJTP"},[xr.Sadachbia]:{id:"wt2We+"},[xr.Sadaltager]:{id:"AHOA2X"},[xr.Schedar]:{id:"NmfVuZ"},[xr.Sulafat]:{id:"Wtu1aS"},[xr.Umbriel]:{id:"VHgvXU"},[xr.Vindemiatrix]:{id:"kTCfD3"},[xr.Zephyr]:{id:"jEvJsi"},[xr.Zubenelgenubi]:{id:"pQCwV3"}};function Sre(e){return Object.values(xr).filter(t=>e!==Rd.Male&&e!==Rd.Female?!0:Rfe[t]===e)}function K3t(){const{i18n:e,_:t}=Me(),n=fs("voiceConfig.gemini.voice"),r=b.useRef(null),[i,s]=b.useState(!1),[a,o]=b.useState(!1);b.useEffect(()=>{const u=new Audio;return u.addEventListener("ended",()=>s(!1)),u.addEventListener("pause",()=>s(!1)),u.addEventListener("error",()=>{s(!1),o(!0)}),r.current=u,()=>{u.pause(),r.current=null}},[]),b.useEffect(()=>{r.current?.pause(),o(!1)},[n.value]);const c=async()=>{const u=r.current;if(!u)return;if(i){u.pause();return}const d=typeof n.value=="string"?n.value:xr.Puck;u.src=`/voice-samples/${d.toLowerCase()}.wav`,o(!1);try{await u.play(),s(!0)}catch{o(!0),s(!1)}};return l.jsxs(Oe,{type:"button",variant:"secondary",size:"sm",onClick:c,className:"mt-2",children:[i?l.jsx(QIe,{className:"size-4"}):l.jsx(z9,{className:"size-4"}),a?e._({id:"QJ7iTQ"}):i?e._({id:"QaQc0P"}):e._({id:"ZuBYCT"})]})}function Y3t(){const{hasAccess:e}=Uc(),{i18n:t,i18n:n,_:r}=Me(),i=fs("agentConfig.gender").value,s=fs("voiceConfig.gemini.voice").value,a=Bh(),o=Sre(i);b.useEffect(()=>{typeof s=="string"&&!Sre(i).includes(s)&&a.setValue("voiceConfig.gemini.voice",i===Rd.Female?xr.Kore:xr.Puck)},[i,s,a]);const c=Ir(),{schema:u}=oi([{name:"voiceConfig.gemini.voice",label:t._({id:"KAXSwC"}),type:"select",options:Object.fromEntries(o.map(p=>[p,`${p} â ${Rfe[p]===Rd.Female?t._({id:"M9iqFS"}
1360):t._({id:"CvCWBI"})}, ${n._(G3t[p])}`])),defaultValue:i===Rd.Female?xr.Kore:xr.Puck,showOptional:!1}],[r,n,i]),{schema:d}=oi([{name:"voiceConfig.gemini.startOfSpeechSensitivity",label:t._({id:"dUf3+t"}),type:"select",options:c.voiceStartOfSpeechSensitivity,defaultValue:"START_SENSITIVITY_LOW",tooltip:t._({id:"4ld94W"}),showOptional:!1},{name:"voiceConfig.gemini.endOfSpeechSensitivity",label:t._({id:"uJwTZu"}),type:"select",options:c.voiceEndOfSpeechSensitivity,defaultValue:"END_SENSITIVITY_LOW",tooltip:t._({id:"+hyVgE"}),showOptional:!1},{name:"chatbotConfig.initialMessage",label:t._({id:"c/+R+g"}),type:"text",uiControl:"textarea",defaultValue:t._({id:"t/9W+1"}),showOptional:!1},{name:"voiceConfig.keywords",label:t._({id:"GnA+Gd"}),placeholder:t._({id:"ekbU0l"}),type:"text",uiControl:"textarea",tooltip:t._({id:"6VS2X7"}),showOptional:!1,parser:p=>(p??"").split(",").map(g=>g.trim()),initialize:p=>(p??[]).join(", ")},{name:"voiceConfig.endpointing",label:t._({id:"eOCEYG"}),type:"number",showOptional:!1,defaultValue:400,tooltip:t._({id:"wHUP6C"}),uiProps:{addonAfter:"ms"}},{name:"voiceConfig.maxCallSeconds",label:t._({id:"0Xo3On"}),type:"number",showOptional:!1,defaultValue:600,tooltip:t._({id:"wiQHbS"}),uiProps:{addonAfter:"s"}}],[r,e,c]);return fs("agentType").value!==ai.Voice?null:l.jsxs(gn,{title:t._({id:"ayQJZC"}),children:[l.jsx(Yr,{schema:u}),l.jsx(K3t,{}),l.jsx(Yr,{schema:d})]})}function X3t(){const{hasAccess:e}=Uc(),{i18n:t,_:n}=Me(),{schema:r}=oi([{name:"voiceConfig.operatorTransfer.enabled",label:t._({id:"6GKudo"}),tooltip:t._({id:"3aJFkZ"}),type:"checkbox",uiControl:"switch",defaultValue:!1,showOptional:!1},{name:"voiceConfig.operatorTransfer.mode",type:"hidden",defaultValue:"cold"},{$relevant:{$when:({formState:a})=>!!a.values?.voiceConfig?.operatorTransfer?.enabled,$fields:[{name:"voiceConfig.operatorTransfer.fallbackPhone",label:t._({id:"Z7xdFC"}),type:"text",placeholder:"+14155552671",tooltip:t._({id:"zoBX81"}),showOptional:!0},{name:"voiceConfig.operatorTransfer.farewellMessage",label:t._({id:"QkIxs5"}),type:"text",uiControl:"textarea",tooltip:t._({id:"GhktYZ"}),defaultValue:t._({id:"wPlyyI"}),showOptional:!0}]}}],[n]),{schema:i}=oi([{name:"voiceConfig.recording.enabled",label:t._({id:"dd/UES"}),type:"checkbox",uiControl:"switch",defaultValue:!1,showOptional:!1,tooltip:t._({id:"AxhQO3"})},{$relevant:{$when:({formState:a})=>!!e([Jt.SuperAdmin])&&!!a.values?.voiceConfig?.recording?.enabled,$fields:[{name:"voiceConfig.recording.retentionDays",label:t._({id:"PEkTgq"}),type:"number",defaultValue:30,showOptional:!1,tooltip:t._({id:"N2KYJi"})}]}}],[n,e]);return fs("agentType").value!==ai.Voice?null:l.jsxs(l.Fragment,{children:[l.jsx(gn,{title:t._({id:"jgq7SG"}),children:l.jsx(Yr,{schema:r})}),l.jsx(gn,{title:t._({id:"frXUwC"}),children:l.jsx(Yr,{schema:i})}),l.jsxs(gn,{title:t._({id:"CfTNIp"}),children:[l.jsx(zo,{name:"voiceConfig.silenceTimeout",type:"number",label:t._({id:"vylzhX"}),tooltip:t._({id:"ULtTJg"}),addonAfter:"ms",showOptional:!1,defaultValue:15e3}),l.jsx(W3t,{label:t._({id:"7A50b4"}),name:"voiceConfig.silenceMessages",type:"text",trimValues:!0,addItemLabel:t._({id:"VEqAdS"}),minLines:1,defaultValue:[t._({id:"2CSxbz"})]})]})]})}function Q3t(){const e=fs("agent"),t=Bh(),n=b.useRef(void 0),r=b.useRef(!1),i=e.value,s=i===Fs.Conversational||i===Fs.ShopAssistant;b.useEffect(()=>{if(!s||i===void 0)return;const a=m8(i),o=t.getValue("agentConfig.enabledBuiltinTools"),c=n.current,u=c!==void 0&&c!==i;if(n.current=i,u){t.setValue("agentConfig.enabledBuiltinTools",a),r.current=!0;return}!r.current&&!Array.isArray(o)&&(t.setValue("agentConfig.enabledBuiltinTools",a),r.current=!0)},[s,i,t]),b.useEffect(()=>{const a=t.getValue("agentConfig.enabledBuiltinTools");!Array.isArray(a)||!a.includes(We.WebSearch)||t.setValue("agentConfig.enabledBuiltinTools",a.filter(o=>o!==We.WebSearch))},[t,i])}function dr(){return Promise.all([gc.documentFolders.findAll.invalidate(),gc.documentFolders.findContents.invalidate(),gc.documentFolders.getBreadcrumbs.invalidate(),gc.documentFolders.findOne.invalidate(),gc.documents.findAll.invali
1360date(),gc.documents.findOne.invalidate(),gc.documents.getStats.invalidate(),gc.chats.findAll.invalidate(),gc.chats.findOne.invalidate()])}function AU(){const e=Ae.useUtils(),t=Ae.chats.create.useMutation({onSuccess:async()=>Promise.all([e.chats.findAll.invalidate(),e.chats.findAllAccessible.invalidate()])}),n=Ae.chats.duplicate.useMutation({onSuccess:async()=>Promise.all([e.chats.findAllAccessible.invalidate(),dr()])}),r=Ae.chats.update.useMutation({onSuccess:async(a,{id:o})=>{await Promise.all([e.chats.findAll.invalidate(),e.chats.findAllAccessible.invalidate(),e.chats.findOne.invalidate({id:o})])}}),i=Ae.chats.delete.useMutation({onSuccess:async()=>Promise.all([e.chats.findAllAccessible.invalidate(),dr()])}),s=Ae.chats.exportToXls.useMutation({});return{duplicate:n,create:t,update:r,remove:i,exportToXls:s}}function Z3t(){return Q3t(),null}function J3t({chatId:e,target:t,onSave:n}){const{i18n:r,_:i}=Me(),s=fs("agentType").value,a=Bh();return s!==ai.Voice?null:mh.createPortal(l.jsx(xlt,{chatId:e,onError:o=>Re.error(r._({id:"+Pwym2"}),{description:o.message}),children:l.jsx(vlt,{beforeConnect:async()=>{if(a.validate(),Object.keys(a.getFormState().errors).length)throw new Error("Invalid configuration");await n(whe.parse({...a.getFormState().values,id:e}))}})}),t)}const M2e=b.memo(function({data:t,actionsTarget:n}){const{i18n:r,_:i}=Me(),{setChat:s}=ir(Hh(v=>({setChat:v.setChat}))),a=b.useRef(YGe()),o=b.useMemo(()=>({avatar:a.current.getAdapter("avatar"),logo:a.current.getAdapter("logo"),bubble:a.current.getAdapter("bubble")}),[]),{create:{mutateAsync:c},remove:{mutateAsync:u},update:{mutateAsync:d}}=AU(),h=b.useMemo(()=>{if(!t){const _=Fs.Conversational;return{agent:_,agentType:ai.Chat,model:_c.Gpt6Luna,smallModel:_c.Gemini25FlashLite,agentConfig:{enabledBuiltinTools:m8(_)}}}const v=t.agent??Fs.Conversational;if(v!==Fs.Conversational&&v!==Fs.ShopAssistant)return t;const x=t.agentConfig?.enabledBuiltinTools;return Array.isArray(x)?t:{...t,agentConfig:{...t.agentConfig,enabledBuiltinTools:m8(v)}}},[t]),p=b.useCallback(async v=>{const x=await a.current.commitAll(),_=x.avatar?.at(-1),w=x.logo?.at(-1),S=x.bubble?.at(-1);return _&&(v.chatbotConfig={...v?.chatbotConfig,systemAvatar:_.publicUrl??void 0}),w&&(v.themeConfig={...v?.themeConfig,logo:w.publicUrl??void 0}),S&&(v.themeConfig={...v?.themeConfig,logoBubble:S.publicUrl??void 0}),v},[]),g=async v=>{const x=await p(v);return d(x)};return l.jsxs(Ls,{keepState:!0,initialData:h,createSchema:vqe,updateSchema:whe,onCreate:async v=>{const x=await p(v),_=await c(x);return s(_),_},onUpdate:g,onRemove:u,basePath:"/chats",idParamName:"chatId",children:[l.jsx(Z3t,{}),t?.id&&n&&l.jsx(J3t,{chatId:t.id,target:n,onSave:g}),l.jsxs(Ls.Col,{children:[l.jsx(Tlt,{}),l.jsx(F3t,{})]}),l.jsxs(Ls.Col,{children:[l.jsx(H3t,{data:t}),l.jsx(D3t,{}),l.jsx(cpt,{logoUploadAdapter:o.logo,avatarUploadAdapter:o.avatar,bubbleUploadAdapter:o.bubble,data:t}),l.jsx(klt,{}),l.jsx(Y3t,{}),l.jsx(X3t,{})]}),l.jsxs(Ls.Col,{children:[l.jsx(AE,{data:t,children:l.jsxs(ja,{roles:[Jt.SuperAdmin],children:[l.jsx(jn,{label:r._({id:"rNREmr"}),Icon:Ij,children:t?.documentsCount??"0"}),l.jsx(jn,{label:r._({id:"p2valM"}),Icon:roe,children:t?.embeddingsCount??"0"})]})}),l.jsx(upt,{}),l.jsx(Alt,{data:t}),l.jsx(wlt,{}),l.jsxs(ja,{roles:[Jt.SuperAdmin],children:[l.jsx(O3t,{data:t}),l.jsx(U3t,{}),l.jsx(P3t,{})]})]})]},t?.id)});/** 1361 * table-core 1362 * 1363 * Copyright (c) TanStack 1364 * 1365 * This source code is licensed under the MIT license found in the 1366 * LICENSE.md file in the root directory of this source tree. 1367 * 1368 * @license MIT 1369 */function Jm(){return{accessor:(e,t)=>typeof e=="function"?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function Zp(e,t){return typeof e=="function"?e(t):e}function Ql(e,t){return n=>{t.setState(r=>({...r,[e]:Zp(n,r[e])}))}}function W4(e){return e instanceof Function}function ejt(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function tjt(e,t){const n=[],r=i=>{i.forEach(s=>{n.push(s);const a=t(s);a!=null&&a.length&&r(a)})};return r(e),n}function Ln(e,t,n){let r=[],i;return s=>{let a;n.key&&n.debug&&(a=Date.now());const o=e(s);if(!(o.length!==r.length||o.some((d,h)=>
vendor: 45,094 bytes, lines 1369-1372
1369r[h]!==d)))return i;r=o;let u;if(n.key&&n.debug&&(u=Date.now()),i=t(...o),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const d=Math.round((Date.now()-a)*100)/100,h=Math.round((Date.now()-u)*100)/100,p=h/16,g=(v,x)=>{for(v=String(v);v.length<x;)v=" "+v;return v};console.info(`%câ± ${g(h,5)} /${g(d,5)} ms`,` 1370 font-size: .6rem; 1371 font-weight: bold; 1372 color: hsl(${Math.max(0,Math.min(120-120*p,120))}deg 100% 31%);`,n?.key)}return i}}function zn(e,t,n,r){return{debug:()=>{var i;return(i=e?.debugAll)!=null?i:e[t]},key:!1,onChange:r}}function njt(e,t,n,r){const i=()=>{var a;return(a=s.getValue())!=null?a:e.options.renderFallbackValue},s={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:i,getContext:Ln(()=>[e,n,t,s],(a,o,c,u)=>({table:a,column:o,row:c,cell:u,getValue:u.getValue,renderValue:u.renderValue}),zn(e.options,"debugCells"))};return e._features.forEach(a=>{a.createCell==null||a.createCell(s,n,t,e)},{}),s}function rjt(e,t,n,r){var i,s;const o={...e._getDefaultColumnDef(),...t},c=o.accessorKey;let u=(i=(s=o.id)!=null?s:c?typeof String.prototype.replaceAll=="function"?c.replaceAll(".","_"):c.replace(/\./g,"_"):void 0)!=null?i:typeof o.header=="string"?o.header:void 0,d;if(o.accessorFn?d=o.accessorFn:c&&(c.includes(".")?d=p=>{let g=p;for(const x of c.split(".")){var v;g=(v=g)==null?void 0:v[x]}return g}:d=p=>p[o.accessorKey]),!u)throw new Error;let h={id:`${String(u)}`,accessorFn:d,parent:r,depth:n,columnDef:o,columns:[],getFlatColumns:Ln(()=>[!0],()=>{var p;return[h,...(p=h.columns)==null?void 0:p.flatMap(g=>g.getFlatColumns())]},zn(e.options,"debugColumns")),getLeafColumns:Ln(()=>[e._getOrderColumnsFn()],p=>{var g;if((g=h.columns)!=null&&g.length){let v=h.columns.flatMap(x=>x.getLeafColumns());return p(v)}return[h]},zn(e.options,"debugColumns"))};for(const p of e._features)p.createColumn==null||p.createColumn(h,e);return h}const io="debugHeaders";function Ere(e,t,n){var r;let s={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const a=[],o=c=>{c.subHeaders&&c.subHeaders.length&&c.subHeaders.map(o),a.push(c)};return o(s),a},getContext:()=>({table:e,header:s,column:t})};return e._features.forEach(a=>{a.createHeader==null||a.createHeader(s,e)}),s}const ijt={createTable:e=>{e.getHeaderGroups=Ln(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{var s,a;const o=(s=r?.map(h=>n.find(p=>p.id===h)).filter(Boolean))!=null?s:[],c=(a=i?.map(h=>n.find(p=>p.id===h)).filter(Boolean))!=null?a:[],u=n.filter(h=>!(r!=null&&r.includes(h.id))&&!(i!=null&&i.includes(h.id)));return XA(t,[...o,...u,...c],e)},zn(e.options,io)),e.getCenterHeaderGroups=Ln(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>(n=n.filter(s=>!(r!=null&&r.includes(s.id))&&!(i!=null&&i.includes(s.id))),XA(t,n,e,"center")),zn(e.options,io)),e.getLeftHeaderGroups=Ln(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var i;const s=(i=r?.map(a=>n.find(o=>o.id===a)).filter(Boolean))!=null?i:[];return XA(t,s,e,"left")},zn(e.options,io)),e.getRightHeaderGroups=Ln(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var i;const s=(i=r?.map(a=>n.find(o=>o.id===a)).filter(Boolean))!=null?i:[];return XA(t,s,e,"right")},zn(e.options,io)),e.getFooterGroups=Ln(()=>[e.getHeaderGroups()],t=>[...t].reverse(),zn(e.options,io)),e.getLeftFooterGroups=Ln(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),zn(e.options,io)),e.getCenterFooterGroups=Ln(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),zn(e.options,io)),e.getRightFooterGroups=Ln(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),zn(e.options,io)),e.getFlatHeaders=Ln(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),zn(e.options,io)),e.getLeftFlatHeaders=Ln(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),zn(e.options,io)),e.getCenterFlatHeaders=Ln(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),zn(e.options,io)),e.getRightFlatHeaders=Ln(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),zn(e.options,io)),e.getCenterLeafHeaders=Ln(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),zn(e.options,io)),e.getLeftLeafHeaders=Ln(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),zn(e.options,io)),e.getRightLeafHeaders=Ln(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),zn(e.options,io)),e.getLeafHeaders=Ln(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var i,s,a,o,c,u;return[...(i=(s=t[0])==null?void 0:s.headers)!=null?i:[],...(a=(o=n[0])==null?void 0:o.headers)!=null?a:[],...(c=(u=r[0])==null?void 0:u.headers)!=null?c:[]].map(d=>d.getLeafHeaders()).flat()},zn(e.options,io))}};function XA(e,t,n,r){var i,s;let a=0;const o=function(p,g){g===void 0&&(g=1),a=Math.max(a,g),p.filter(v=>v.getIsVisible()).forEach(v=>{var x;(x=v.columns)!=null&&x.length&&o(v.columns,g+1)},0)};o(e);let c=[];const u=(p,g)=>{const v={depth:g,id:[r,`${g}`].filter(Boolean).join("_"),headers:[]},x=[];p.forEach(_=>{const w=[...x].reverse()[0],S=_.column.depth===v.depth;let E,T=!1;if(S&&_.column.parent?E=_.column.parent:(E=_.column,T=!0),w&&w?.column===E)w.subHeaders.push(_);else{const N=Ere(n,E,{id:[r,g,E.id,_?.id].filter(Boolean).join("_"),isPlaceholder:T,placeholderId:T?`${x.filter(A=>A.column===E).length}`:void 0,depth:g,index:x.length});N.subHeaders.push(_),x.push(N)}v.headers.push(_),_.headerGroup=v}),c.push(v),g>0&&u(x,g-1)},d=t.map((p,g)=>Ere(n,p,{depth:a,index:g}));u(d,a-1),c.reverse();const h=p=>p.filter(v=>v.column.getIsVisible()).map(v=>{let x=0,_=0,w=[0];v.subHeaders&&v.subHeaders.length?(w=[],h(v.subHeaders).forEach(E=>{let{colSpan:T,rowSpan:N}=E;x+=T,w.push(N)})):x=1;const S=Math.min(...w);return _=_+S,v.colSpan=x,v.rowSpan=_,{colSpan:x,rowSpan:_}});return h((i=(s=c[0])==null?void 0:s.headers)!=null?i:[]),c}const sjt=(e,t,n,r,i,s,a)=>{let o={id:t,index:r,original:n,depth:i,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:c=>{if(o._valuesCache.hasOwnProperty(c))return o._valuesCache[c];const u=e.getColumn(c);if(u!=null&&u.accessorFn)return o._valuesCache[c]=u.accessorFn(o.original,r),o._valuesCache[c]},getUniqueValues:c=>{if(o._uniqueValuesCache.hasOwnProperty(c))return o._uniqueValuesCache[c];const u=e.getColumn(c);if(u!=null&&u.accessorFn)return u.columnDef.getUniqueValues?(o._uniqueValuesCache[c]=u.columnDef.getUniqueValues(o.original,r),o._uniqueValuesCache[c]):(o._uniqueValuesCache[c]=[o.getValue(c)],o._uniqueValuesCache[c])},renderValue:c=>{var u;return(u=o.getValue(c))!=null?u:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>tjt(o.subRows,c=>c.subRows),getParentRow:()=>o.parentId?e.getRow(o.parentId,!0):void 0,getParentRows:()=>{let c=[],u=o;for(;;){const d=u.getParentRow();if(!d)break;c.push(d),u=d}return c.reverse()},getAllCells:Ln(()=>[e.getAllLeafColumns()],c=>c.map(u=>njt(e,o,u,u.id)),zn(e.options,"debugRows")),_getAllCellsByColumnId:Ln(()=>[o.getAllCells()],c=>c.reduce((u,d)=>(u[d.column.id]=d,u),{}),zn(e.options,"debugRows"))};for(let c=0;c<e._features.length;c++){const u=e._features[c];u==null||u.createRow==null||u.createRow(o,e)}return o},ajt={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},D2e=(e,t,n)=>{var r,i;const s=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((i=e.getValue(t))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(s))};D2e.autoRemove=e=>Nu(e);const F2e=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};F2e.autoRemove=e=>Nu(e);const L2e=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===n?.toLowerCase()};L2e.autoRemove=e=>Nu(e);const z2e=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};z2e.autoRemove=e=>Nu(e);const $2e=(e,t,n)=>!n.some(r=>{var i;return!((i=e.getValue(t))!=null&&i.includes(r))});$2e.autoRemove=e=>Nu(e)||!(e!=null&&e.length);const B2e=(e,t,n)=>n.some(r=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(r)});B2e.autoRemove=e=>Nu(e)||!(e!=null&&e.length);const U2e=(e,t,n)=>e.getValue(t)===n;U2e.autoRemove=e=>Nu(e);const V2e=(e,t,n)=>e.getValue(t)==n;V2e.autoRemove=e=>Nu(e);const kU=(e,t,n)=>{let[r,i]=n;const s=e.getValue(t);return s>=r&&s<=i};kU.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,i=typeof n!="number"?parseFloat(n):n,s=t===null||Number.isNaN(r)?-1/0:r,a=n===null||Number.isNaN(i)?1/0:i;if(s>a){const o=s;s=a,a=o}return[s,a]};kU.autoRemove=e=>Nu(e)||Nu(e[0])&&Nu(e[1]);const Uf={includesString:D2e,includesStringSensitive:F2e,equalsString:L2e,arrIncludes:z2e,arrIncludesAll:$2e,arrIncludesSome:B2e,equals:U2e,weakEquals:V2e,inNumberRange:kU};function Nu(e){return e==null||e===""}const ojt={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Ql("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);return typeof r=="string"?Uf.includesString:typeof r=="number"?Uf.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Uf.equals:Array.isArray(r)?Uf.arrIncludes:Uf.weakEquals},e.getFilterFn=()=>{var n,r;return W4(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:Uf[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,i;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const i=e.getFilterFn(),s=r?.find(d=>d.id===e.id),a=Zp(n,s?s.value:void 0);if(Cre(i,a,e)){var o;return(o=r?.filter(d=>d.id!==e.id))!=null?o:[]}const c={id:e.id,value:a};if(s){var u;return(u=r?.map(d=>d.id===e.id?c:d))!=null?u:[]}return r!=null&&r.length?[...r,c]:[c]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=i=>{var s;return(s=Zp(t,i))==null?void 0:s.filter(a=>{const o=n.find(c=>c.id===a.id);if(o){const c=o.getFilterFn();if(Cre(c,a.value,o))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function Cre(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const ljt=(e,t,n)=>n.reduce((r,i)=>{const s=i.getValue(e);return r+(typeof s=="number"?s:0)},0),cjt=(e,t,n)=>{let r;return n.forEach(i=>{const s=i.getValue(e);s!=null&&(r>s||r===void 0&&s>=s)&&(r=s)}),r},ujt=(e,t,n)=>{let r;return n.forEach(i=>{const s=i.getValue(e);s!=null&&(r<s||r===void 0&&s>=s)&&(r=s)}),r},djt=(e,t,n)=>{let r,i;return n.forEach(s=>{const a=s.getValue(e);a!=null&&(r===void 0?a>=a&&(r=i=a):(r>a&&(r=a),i<a&&(i=a)))}),[r,i]},fjt=(e,t)=>{let n=0,r=0;if(t.forEach(i=>{let s=i.getValue(e);s!=null&&(s=+s)>=s&&(++n,r+=s)}),n)return r/n},hjt=(e,t)=>{if(!t.length)return;const n=t.map(s=>s.getValue(e));if(!ejt(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),i=n.sort((s,a)=>s-a);return n.length%2!==0?i[r]:(i[r-1]+i[r])/2},pjt=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),mjt=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,gjt=(e,t)=>t.length,cD={sum:ljt,min:cjt,max:ujt,extent:djt,mean:fjt,median:hjt,unique:pjt,uniqueCount:mjt,count:gjt},xjt={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Ql("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);if(typeof r=="number")return cD.sum;if(Object.prototype.toString.call(r)==="[object Date]")return cD.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return W4(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:cD[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var i;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function vjt(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(s=>!t.includes(s.id));return n==="remove"?r:[...t.map(s=>e.find(a=>a.id===s)).filter(Boolean),...r]}const yjt={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Ql("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=Ln(n=>[p2(t,n)],n=>n.findIndex(r=>r.id===e.id),zn(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return((r=p2(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const i=p2(t,n);return((r=i[i.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=Ln(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>i=>{let s=[];if(!(t!=null&&t.length))s=i;else{const a=[...t],o=[...i];for(;o.length&&a.length;){const c=a.shift(),u=o.findIndex(d=>d.id===c);u>-1&&s.push(o.splice(u,1)[0])}s=[...s,...o]}return vjt(s,n,r)},zn(e.options,"debugTable"))}},uD=()=>({left:[],right:[]}),bjt={getInitialState:e=>({columnPinning:uD(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Ql("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(i=>i.id).filter(Boolean);t.setColumnPinning(i=>{var s,a;if(n==="right"){var o,c;return{left:((o=i?.left)!=null?o:[]).filter(h=>!(r!=null&&r.includes(h))),right:[...((c=i?.right)!=null?c:[]).filter(h=>!(r!=null&&r.includes(h))),...r]}}if(n==="left"){var u,d;return{left:[...((u=i?.left)!=null?u:[]).filter(h=>!(r!=null&&r.includes(h))),...r],right:((d=i?.right)!=null?d:[]).filter(h=>!(r!=null&&r.includes(h)))}}return{left:((s=i?.left)!=null?s:[]).filter(h=>!(r!=null&&r.includes(h))),right:((a=i?.right)!=null?a:[]).filter(h=>!(r!=null&&r.includes(h)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var i,s,a;return((i=r.columnDef.enablePinning)!=null?i:!0)&&((s=(a=t.options.enableColumnPinning)!=null?a:t.options.enablePinning)!=null?s:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(o=>o.id),{left:r,right:i}=t.getState().columnPinning,s=n.some(o=>r?.includes(o)),a=n.some(o=>i?.includes(o));return s?"left":a?"right":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();return i?(n=(r=t.getState().columnPinning)==null||(r=r[i])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=Ln(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,i)=>{const s=[...r??[],...i??[]];return n.filter(a=>!s.includes(a.column.id))},zn(t.options,"debugRows")),e.getLeftVisibleCells=Ln(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(s=>n.find(a=>a.column.id===s)).filter(Boolean).map(s=>({...s,position:"left"})),zn(t.options,"debugRows")),e.getRightVisibleCells=Ln(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(s=>n.find(a=>a.column.id===s)).filter(Boolean).map(s=>({...s,position:"right"})),zn(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?uD():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:uD())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var i,s;return!!((i=r.left)!=null&&i.length||(s=r.right)!=null&&s.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=Ln(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),zn(e.options,"debugColumns")),e.getRightLeafColumns=Ln(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),zn(e.options,"debugColumns")),e.getCenterLeafColumns=Ln(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const i=[...n??[],...r??[]];return t.filter(s=>!i.includes(s.id))},zn(e.options,"debugColumns"))}};function _jt(e){return e||(typeof document<"u"?document:null)}const QA={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},dD=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),wjt={getDefaultColumnDef:()=>QA,getInitialState:e=>({columnSizing:{},columnSizingInfo:dD(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Ql("columnSizing",e),onColumnSizingInfoChange:Ql("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,i;const s=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:QA.minSize,(r=s??e.columnDef.size)!=null?r:QA.size),(i=e.columnDef.maxSize)!=null?i:QA.maxSize)},e.getStart=Ln(n=>[n,p2(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((i,s)=>i+s.getSize(),0),zn(t.options,"debugColumns")),e.getAfter=Ln(n=>[n,p2(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((i,s)=>i+s.getSize(),0),zn(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...i}=n;return i})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=i=>{if(i.subHeaders.length)i.subHeaders.forEach(r);else{var s;n+=(s=i.column.getSize())!=null?s:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),i=r?.getCanResize();return s=>{if(!r||!i||(s.persist==null||s.persist(),fD(s)&&s.touches&&s.touches.length>1))return;const a=e.getSize(),o=e?e.getLeafHeaders().map(w=>[w.column.id,w.column.getSize()]):[[r.id,r.getSize()]],c=fD(s)?Math.round(s.touches[0].clientX):s.clientX,u={},d=(w,S)=>{typeof S=="number"&&(t.setColumnSizingInfo(E=>{var T,N;const A=t.options.columnResizeDirection==="rtl"?-1:1,k=(S-((T=E?.startOffset)!=null?T:0))*A,j=Math.max(k/((N=E?.startSize)!=null?N:0),-.999999);return E.columnSizingStart.forEach(R=>{let[P,V]=R;u[P]=Math.round(Math.max(V+V*j,0)*100)/100}),{...E,deltaOffset:k,deltaPercentage:j}}),(t.options.columnResizeMode==="onChange"||w==="end")&&t.setColumnSizing(E=>({...E,...u})))},h=w=>d("move",w),p=w=>{d("end",w),t.setColumnSizingInfo(S=>({...S,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},g=_jt(n),v={moveHandler:w=>h(w.clientX),upHandler:w=>{g?.removeEventListener("mousemove",v.moveHandler),g?.removeEventListener("mouseup",v.upHandler),p(w.clientX)}},x={moveHandler:w=>(w.cancelable&&(w.preventDefault(),w.stopPropagation()),h(w.touches[0].clientX),!1),upHandler:w=>{var S;g?.removeEventListener("touchmove",x.moveHandler),g?.removeEventListener("touchend",x.upHandler),w.cancelable&&(w.preventDefault(),w.stopPropagation()),p((S=w.touches[0])==null?void 0:S.clientX)}},_=Sjt()?{passive:!1}:!1;fD(s)?(g?.addEventListener("touchmove",x.moveHandler,_),g?.addEventListener("touchend",x.upHandler,_)):(g?.addEventListener("mousemove",v.moveHandler,_),g?.addEventListener("mouseup",v.upHandler,_)),t.setColumnSizingInfo(w=>({...w,startOffset:c,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:o,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?dD():(n=e.initialState.columnSizingInfo)!=null?n:dD())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0}}};let ZA=null;function Sjt(){if(typeof ZA=="boolean")return ZA;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return ZA=e,ZA}function fD(e){return e.type==="touchstart"}const Ejt={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Ql("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const i=e.columns;return(n=i.length?i.some(s=>s.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=Ln(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),zn(t.options,"debugRows")),e.getVisibleCells=Ln(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,i)=>[...n,...r,...i],zn(t.options,"debugRows"))},createTable:e=>{const t=(n,r)=>Ln(()=>[r(),r().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(s=>s.getIsVisible==null?void 0:s.getIsVisible()),zn(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((i,s)=>({...i,[s.id]:n||!(s.getCanHide!=null&&s.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function p2(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const Cjt={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},Tjt={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Ql("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,i,s;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&((s=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?s:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Uf.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return W4(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:Uf[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},Ajt={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Ql("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var i,s;e.setExpanded(r?{}:(i=(s=e.initialState)==null?void 0:s.expanded)!=null?i:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(s=>{const a=s.split(".");r=Math.max(r,a.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var i;const s=r===!0?!0:!!(r!=null&&r[e.id]);let a={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(o=>{a[o]=!0}):a=r,n=(i=n)!=null?i:!s,!s&&n)return{...a,[e.id]:!0};if(s&&!n){const{[e.id]:o,...c}=a;return c}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r?.[e.id])},e.getCanExpand=()=>{var n,r,i;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((i=e.subRows)!=null&&i.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},DL=0,FL=10,hD=()=>({pageIndex:DL,pageSize:FL}),kjt={getInitialState:e=>({...e,pagination:{...hD(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:Ql("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const i=s=>Zp(r,s);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(i)},e.resetPagination=r=>{var i;e.setPagination(r?hD():(i=e.initialState.pagination)!=null?i:hD())},e.setPageIndex=r=>{e.setPagination(i=>{let s=Zp(r,i.pageIndex);const a=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return s=Math.max(0,Math.min(s,a)),{...i,pageIndex:s}})},e.resetPageIndex=r=>{var i,s;e.setPageIndex(r?DL:(i=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageIndex)!=null?i:DL)},e.resetPageSize=r=>{var i,s;e.setPageSize(r?FL:(i=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageSize)!=null?i:FL)},e.setPageSize=r=>{e.setPagination(i=>{const s=Math.max(1,Zp(r,i.pageSize)),a=i.pageSize*i.pageIndex,o=Math.floor(a/s);return{...i,pageIndex:o,pageSize:s}})},e.setPageCount=r=>e.setPagination(i=>{var s;let a=Zp(r,(s=e.options.pageCount)!=null?s:-1);return typeof a=="number"&&(a=Math.max(-1,a)),{...i,pageCount:a}}),e.getPageOptions=Ln(()=>[e.getPageCount()],r=>{let i=[];return r&&r>0&&(i=[...new Array(r)].fill(null).map((s,a)=>a)),i},zn(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,i=e.getPageCount();return i===-1?!0:i===0?!1:r<i-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},pD=()=>({top:[],bottom:[]}),Njt={getInitialState:e=>({rowPinning:pD(),...e}),getDefaultOptions:e=>({onRowPinningChange:Ql("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{const s=r?e.getLeafRows().map(c=>{let{id:u}=c;return u}):[],a=i?e.getParentRows().map(c=>{let{id:u}=c;return u}):[],o=new Set([...a,e.id,...s]);t.setRowPinning(c=>{var u,d;if(n==="bottom"){var h,p;return{top:((h=c?.top)!=null?h:[]).filter(x=>!(o!=null&&o.has(x))),bottom:[...((p=c?.bottom)!=null?p:[]).filter(x=>!(o!=null&&o.has(x))),...Array.from(o)]}}if(n==="top"){var g,v;return{top:[...((g=c?.top)!=null?g:[]).filter(x=>!(o!=null&&o.has(x))),...Array.from(o)],bottom:((v=c?.bottom)!=null?v:[]).filter(x=>!(o!=null&&o.has(x)))}}return{top:((u=c?.top)!=null?u:[]).filter(x=>!(o!=null&&o.has(x))),bottom:((d=c?.bottom)!=null?d:[]).filter(x=>!(o!=null&&o.has(x)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:i}=t.options;return typeof r=="function"?r(e):(n=r??i)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:i}=t.getState().rowPinning,s=n.some(o=>r?.includes(o)),a=n.some(o=>i?.includes(o));return s?"top":a?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();if(!i)return-1;const s=(n=i==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(a=>{let{id:o}=a;return o});return(r=s?.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?pD():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:pD())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var i,s;return!!((i=r.top)!=null&&i.length||(s=r.bottom)!=null&&s.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var i;return((i=e.options.keepPinnedRows)==null||i?(n??[]).map(a=>{const o=e.getRow(a,!0);return o.getIsAllParentsExpanded()?o:null}):(n??[]).map(a=>t.find(o=>o.id===a))).filter(Boolean).map(a=>({...a,position:r}))},e.getTopRows=Ln(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),zn(e.options,"debugRows")),e.getBottomRows=Ln(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),zn(e.options,"debugRows")),e.getCenterRows=Ln(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const i=new Set([...n??[],...r??[]]);return t.filter(s=>!i.has(s.id))},zn(e.options,"debugRows"))}},jjt={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Ql("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(s=>{s.getCanSelect()&&(r[s.id]=!0)}):i.forEach(s=>{delete r[s.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(s=>{LL(i,s.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=Ln(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?mD(e,n):{rows:[],flatRows:[],rowsById:{}},zn(e.options,"debugTable")),e.getFilteredSelectedRowModel=Ln(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?mD(e,n):{rows:[],flatRows:[],rowsById:{}},zn(e.options,"debugTable")),e.getGroupedSelectedRowModel=Ln(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?mD(e,n):{rows:[],flatRows:[],rowsById:{}},zn(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(i=>i.getCanSelect()&&!n[i.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(i=>!n[i.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const i=e.getIsSelected();t.setRowSelection(s=>{var a;if(n=typeof n<"u"?n:!i,e.getCanSelect()&&i===n)return s;const o={...s};return LL(o,e.id,n,(a=r?.selectChildren)!=null?a:!0,t),o})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return NU(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return zL(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return zL(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var i;n&&e.toggleSelected((i=r.target)==null?void 0:i.checked)}}}},LL=(e,t,n,r,i)=>{var s;const a=i.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach(o=>delete e[o]),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(s=a.subRows)!=null&&s.length&&a.getCanSelectSubRows()&&a.subRows.forEach(o=>LL(e,o.id,n,r,i))};function mD(e,t){const n=e.getState().rowSelection,r=[],i={},s=function(a,o){return a.map(c=>{var u;const d=NU(c,n);if(d&&(r.push(c),i[c.id]=c),(u=c.subRows)!=null&&u.length&&(c={...c,subRows:s(c.subRows)}),d)return c}).filter(Boolean)};return{rows:s(t.rows),flatRows:r,rowsById:i}}function NU(e,t){var n;return(n=t[e.id])!=null?n:!1}function zL(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let i=!0,s=!1;return e.subRows.forEach(a=>{if(!(s&&!i)&&(a.getCanSelect()&&(NU(a,t)?s=!0:i=!1),a.subRows&&a.subRows.length)){const o=zL(a,t);o==="all"?s=!0:(o==="some"&&(s=!0),i=!1)}}),i?"all":s?"some":!1}const $L=/([0-9]+)/gm,Rjt=(e,t,n)=>H2e(Rm(e.getValue(n)).toLowerCase(),Rm(t.getValue(n)).toLowerCase()),Ijt=(e,t,n)=>H2e(Rm(e.getValue(n)),Rm(t.getValue(n))),Ojt=(e,t,n)=>jU(Rm(e.getValue(n)).toLowerCase(),Rm(t.getValue(n)).toLowerCase()),Pjt=(e,t,n)=>jU(Rm(e.getValue(n)),Rm(t.getValue(n))),Mjt=(e,t,n)=>{const r=e.getValue(n),i=t.getValue(n);return r>i?1:r<i?-1:0},Djt=(e,t,n)=>jU(e.getValue(n),t.getValue(n));function jU(e,t){return e===t?0:e>t?1:-1}function Rm(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function H2e(e,t){const n=e.split($L).filter(Boolean),r=t.split($L).filter(Boolean);for(;n.length&&r.length;){const i=n.shift(),s=r.shift(),a=parseInt(i,10),o=parseInt(s,10),c=[a,o].sort();if(isNaN(c[0])){if(i>s)return 1;if(s>i)return-1;continue}if(isNaN(c[1]))return isNaN(a)?-1:1;if(a>o)return 1;if(o>a)return-1}return n.length-r.length}const q_={alphanumeric:Rjt,alphanumericCaseSensitive:Ijt,text:Ojt,textCaseSensitive:Pjt,datetime:Mjt,basic:Djt},Fjt={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Ql("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const i of n){const s=i?.getValue(e.id);if(Object.prototype.toString.call(s)==="[object Date]")return q_.datetime;if(typeof s=="string"&&(r=!0,s.split($L).length>1))return q_.alphanumeric}return r?q_.text:q_.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return W4(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:q_[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const i=e.getNextSortingOrder(),s=typeof n<"u"&&n!==null;t.setSorting(a=>{const o=a?.find(g=>g.id===e.id),c=a?.findIndex(g=>g.id===e.id);let u=[],d,h=s?n:i==="desc";if(a!=null&&a.length&&e.getCanMultiSort()&&r?o?d="toggle":d="add":a!=null&&a.length&&c!==a.length-1?d="replace":o?d="toggle":d="replace",d==="toggle"&&(s||i||(d="remove")),d==="add"){var p;u=[...a,{id:e.id,desc:h}],u.splice(0,u.length-((p=t.options.maxMultiSortColCount)!=null?p:Number.MAX_SAFE_INTEGER))}else d==="toggle"?u=a.map(g=>g.id===e.id?{...g,desc:h}:g):d==="remove"?u=a.filter(g=>g.id!==e.id):u=[{id:e.id,desc:h}];return u})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,i;const s=e.getFirstSortDir(),a=e.getIsSorted();return a?a!==s&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(i=t.options.enableMultiRemove)!=null)||i)?!1:a==="desc"?"asc":"desc":s},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(i=>i.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},Ljt=[ijt,Ejt,yjt,bjt,ajt,ojt,Cjt,Tjt,Fjt,xjt,Ajt,kjt,Njt,jjt,wjt];function zjt(e){var t,n;const r=[...Ljt,...(t=e._features)!=null?t:[]];let i={_features:r};const s=i._features.reduce((p,g)=>Object.assign(p,g.getDefaultOptions==null?void 0:g.getDefaultOptions(i)),{}),a=p=>i.options.mergeOptions?i.options.mergeOptions(s,p):{...s,...p};let c={...{},...(n=e.initialState)!=null?n:{}};
1372i._features.forEach(p=>{var g;c=(g=p.getInitialState==null?void 0:p.getInitialState(c))!=null?g:c});const u=[];let d=!1;const h={_features:r,options:{...s,...e},initialState:c,_queue:p=>{u.push(p),d||(d=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();d=!1}).catch(g=>setTimeout(()=>{throw g})))},reset:()=>{i.setState(i.initialState)},setOptions:p=>{const g=Zp(p,i.options);i.options=a(g)},getState:()=>i.options.state,setState:p=>{i.options.onStateChange==null||i.options.onStateChange(p)},_getRowId:(p,g,v)=>{var x;return(x=i.options.getRowId==null?void 0:i.options.getRowId(p,g,v))!=null?x:`${v?[v.id,g].join("."):g}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(p,g)=>{let v=(g?i.getPrePaginationRowModel():i.getRowModel()).rowsById[p];if(!v&&(v=i.getCoreRowModel().rowsById[p],!v))throw new Error;return v},_getDefaultColumnDef:Ln(()=>[i.options.defaultColumn],p=>{var g;return p=(g=p)!=null?g:{},{header:v=>{const x=v.header.column.columnDef;return x.accessorKey?x.accessorKey:x.accessorFn?x.id:null},cell:v=>{var x,_;return(x=(_=v.renderValue())==null||_.toString==null?void 0:_.toString())!=null?x:null},...i._features.reduce((v,x)=>Object.assign(v,x.getDefaultColumnDef==null?void 0:x.getDefaultColumnDef()),{}),...p}},zn(e,"debugColumns")),_getColumnDefs:()=>i.options.columns,getAllColumns:Ln(()=>[i._getColumnDefs()],p=>{const g=function(v,x,_){return _===void 0&&(_=0),v.map(w=>{const S=rjt(i,w,_,x),E=w;return S.columns=E.columns?g(E.columns,S,_+1):[],S})};return g(p)},zn(e,"debugColumns")),getAllFlatColumns:Ln(()=>[i.getAllColumns()],p=>p.flatMap(g=>g.getFlatColumns()),zn(e,"debugColumns")),_getAllFlatColumnsById:Ln(()=>[i.getAllFlatColumns()],p=>p.reduce((g,v)=>(g[v.id]=v,g),{}),zn(e,"debugColumns")),getAllLeafColumns:Ln(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(p,g)=>{let v=p.flatMap(x=>x.getLeafColumns());return g(v)},zn(e,"debugColumns")),getColumn:p=>i._getAllFlatColumnsById()[p]};Object.assign(i,h);for(let p=0;p<i._features.length;p++){const g=i._features[p];g==null||g.createTable==null||g.createTable(i)}return i}function $jt(){return e=>Ln(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(i,s,a){s===void 0&&(s=0);const o=[];for(let u=0;u<i.length;u++){const d=sjt(e,e._getRowId(i[u],u,a),i[u],u,s,void 0,a?.id);if(n.flatRows.push(d),n.rowsById[d.id]=d,o.push(d),e.options.getSubRows){var c;d.originalSubRows=e.options.getSubRows(i[u],u),(c=d.originalSubRows)!=null&&c.length&&(d.subRows=r(d.originalSubRows,s+1,d))}}return o};return n.rows=r(t),n},zn(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}/** 1373 * react-table 1374 * 1375 * Copyright (c) TanStack 1376 * 1377 * This source code is licensed under the MIT license found in the 1378 * LICENSE.md file in the root directory of this source tree. 1379 * 1380 * @license MIT 1381 */function Tre(e,t){return e?Bjt(e)?b.createElement(e,t):e:null}function Bjt(e){return Ujt(e)||typeof e=="function"||Vjt(e)}function Ujt(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function Vjt(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Hjt(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=b.useState(()=>({current:zjt(t)})),[r,i]=b.useState(()=>n.current.initialState);return n.current.setOptions(s=>({...s,...e,state:{...r,...e.state},onStateChange:a=>{i(a),e.onStateChange==null||e.onStateChange(a)}})),n.current}const RU=b.memo(function({children:t}){return l.jsx("div",{className:"inline-flex items-center gap-2","data-table":"prevent",children:t})}),fC=b.memo(function({children:t,onDelete:n,deleteDescription:r,confirmationText:i,confirmationLabel:s}){const{i18n:a,_:o}=Me(),[c,u]=b.useState(!1);return l.jsxs(l.Fragment,{children:[l.jsx(tb,{open:c,onConfirm:n,onOpenChange:d=>u(d),description:r,confirmationText:i,confirmationLabel:s}),l.jsxs(RU,{children:[t,n&&l.jsx(cn,{title:a._({id:"cnGeoo"}),children:l.jsx(Oe,{size:"icon-xs",variant:"ghost",className:"text-danger",outline:!0,onClick:()=>u(!0),children:l.jsx(bo,{className:"size-4"})})})]})]})}),Rf=Jm();function qjt(){const{i18n:e,_:t}=Me(),{hasAccess:n}=Uc(),{remove:{mutateAsync:r},duplicate:{mutateAsync:i}}=AU();return b.useMemo(()=>[Rf.accessor(s=>s.id,{id:"id",header:e._({id:"dFb5Nt"}),meta:{sortable:"id"}}),Rf.accessor(s=>s.name,{id:"name",header:e._({id:"6YtxFj"}),meta:{sortable:"name"}}),Rf.accessor(s=>s.organization?.name,{id:"organization",header:e._({id:"ucgZ0o"}),meta:{sortable:"organization.name"}}),...n([Jt.SuperAdmin])?[Rf.accessor(s=>s.agent,{id:"agent",header:e._({id:"iEQQyu"}),cell:s=>l.jsx("span",{className:"whitespace-nowrap font-mono",children:s.getValue()}),meta:{sortable:"agent"}}),Rf.accessor(s=>s.model,{id:"model",header:e._({id:"scu3wk"}),cell:s=>l.jsx("span",{className:"whitespace-nowrap font-mono",children:s.getValue()}),meta:{sortable:"model"}}
1381)]:[],Rf.accessor(s=>s.documentsCount,{id:"documentsCount",header:e._({id:"rNREmr"}),meta:{align:"right",sortable:"documentsCount"}}),Rf.accessor(s=>s.embeddingsCount,{id:"embeddingsCount",header:e._({id:"p2valM"}),cell:s=>s.getValue()??"0",meta:{align:"right",sortable:"embeddingsCount"}}),Rf.accessor(s=>s.updatedAt,{id:"updatedAt",header:e._({id:"+b7T3G"}),cell:s=>yt.date(s.getValue(),Zn.DateTime),meta:{sortable:"updatedAt"}}),Rf.display({id:"actions",header:e._({id:"7L01XJ"}),cell:({row:s})=>l.jsxs(fC,{onDelete:()=>r({id:s.original.id}),children:[l.jsx(ja,{roles:[Jt.SuperAdmin],children:l.jsx(cn,{title:e._({id:"euc6Ns"}),children:l.jsx(Oe,{"data-cta":"admin-chats-duplicate-button",variant:"ghost",size:"icon-xs",className:"text-info",onClick:()=>i({id:s.original.id}),outline:!0,children:l.jsx(zh,{className:"size-4"})})})}),l.jsx(cn,{title:e._({id:"hIpMlq"}),children:l.jsx(Oe,{"data-cta":"admin-chats-duplicate-button",variant:"ghost",size:"icon-xs",className:"text-emerald-500",outline:!0,asChild:!0,children:l.jsx("a",{target:"_blank",href:`${os.playgroundUrl}/${s.original.id}`,rel:"noreferrer",children:l.jsx(eoe,{className:"size-4"})})})}),l.jsx(cn,{title:e._({id:"yWH3P0"}),children:l.jsx(Oe,{"data-cta":"admin-chats-documents-button",variant:"ghost",size:"icon-xs",outline:!0,asChild:!0,children:l.jsx(ar,{to:"/chats/$chatId/documents",params:{chatId:s.original.id},children:l.jsx(roe,{className:"size-4"})})})})]}),meta:{align:"center"}})],[n,r,i,t])}const Wjt=b.memo(function({isOpen:t,onCloseClick:n}){const{i18n:r,_:i}=Me(),[s,a]=b.useState(void 0),[o,c]=b.useState(!1),{exportToXls:u}=AU(),d=b.useCallback(()=>{o||(a(void 0),n({isExporting:o}))},[o,n]),h=async({values:p})=>{if(a(void 0),p?.from&&p?.to&&LUe(p.from,p.to)){a(r._({id:"JfFx5W"}));return}c(!0);try{const g=await u.mutateAsync({from:p?.from?u8(p.from).toISOString():void 0,to:p?.to?Efe(p.to).toISOString():void 0}),v=new Blob([Uint8Array.from(atob(g),w=>w.codePointAt(0))],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),x=window.URL.createObjectURL(v),_=document.createElement("a");_.setAttribute("href",x),_.setAttribute("target","_self"),_.setAttribute("download","kanbu-export.xlsx"),document.body.append(_),_.click(),_.remove(),n({isExporting:o})}catch(g){const v=g instanceof Error?g.message:r._({id:"+W8whJ"});a(v)}finally{c(!1),a(void 0)}};return l.jsx(ui,{open:t,onOpenChange:d,children:l.jsx(Fi,{children:l.jsxs(S5,{name:"XlsxExportForm",onSubmit:h,className:"flex flex-col gap-4",children:[l.jsx(ks,{className:"flex gap-5",children:l.jsx(Wi,{children:l.jsx(D,{id:"OHjxoz"})})}),l.jsxs("div",{className:"flex flex-col gap-2",children:[l.jsxs("div",{className:"flex gap-2",children:[l.jsx(zo,{label:r._({id:"ejVYRQ"}),type:"date",name:"from"}),l.jsx(zo,{label:r._({id:"/jQctM"}),type:"date",name:"to"})]}),s&&l.jsx("p",{className:"text-danger",children:s})]}),l.jsxs(wi,{className:"mt-2",children:[l.jsx(Oe,{"data-cta":"admin-export-modal-cancel",variant:"secondary",disabled:o,onClick:d,children:l.jsx(D,{id:"dEgA5A"})}),l.jsx(Oe,{"data-cta":"admin-export-modal-export",disabled:o,variant:"primary",type:"submit",children:o?l.jsx(D,{id:"eJOEBy"}):l.jsx(D,{id:"GS+Mus"})})]})]})})})}),Gjt="/assets/avatar-4VZ2yiKA.webp";/** 1382 * @license @tabler/icons-react v3.17.0 - MIT 1383 * 1384 * This source code is licensed under the MIT license. 1385 * See the LICENSE file in the root directory of this source tree. 1386 */var Kjt={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/** 1387 * @license @tabler/icons-react v3.17.0 - MIT 1388 * 1389 * This source code is licensed under the MIT license. 1390 * See the LICENSE file in the root directory of this source tree. 1391 */const q2e=(e,t,n,r)=>{const i=b.forwardRef(({color:s="currentColor",size:a=24,stroke:o=2,title:c,className:u,children:d,...h},p)=>b.createElement("svg",{ref:p,...Kjt[e],width:a,height:a,className:["tabler-icon",`tabler-icon-${t}`,u].join(" "),fill:s,...h},[c&&b.createElement("title",{key:"svg-title"},c),...r.map(([g,v])=>b.createElement(g,v)),...Array.isArray(d)?d:[d]]));return i.displayName=`${n}`,i};/** 1392 * @license @tabler/icons-react v3.17.0 - MIT 1393 * 1394 * This source code is licensed under the MIT license. 1395 * See the LICENSE file in the root directory of this source tree. 1396 */var Yjt=q2e("filled","thumb-down-filled","IconThumbDownFilled",[["path",{d:"M13 21.008a3 3 0 0 0 2.995 -2.823l.005 -.177v-4h2a3 3 0 0 0 2.98 -2.65l.015
1396-.173l.005 -.177l-.02 -.196l-1.006 -5.032c-.381 -1.625 -1.502 -2.796 -2.81 -2.78l-.164 .008h-8a1 1 0 0 0 -.993 .884l-.007 .116l.001 9.536a1 1 0 0 0 .5 .866a2.998 2.998 0 0 1 1.492 2.396l.007 .202v1a3 3 0 0 0 3 3z",key:"svg-0"}],["path",{d:"M5 14.008a1 1 0 0 0 .993 -.883l.007 -.117v-9a1 1 0 0 0 -.883 -.993l-.117 -.007h-1a2 2 0 0 0 -1.995 1.852l-.005 .15v7a2 2 0 0 0 1.85 1.994l.15 .005h1z",key:"svg-1"}]]);/** 1397 * @license @tabler/icons-react v3.17.0 - MIT 1398 * 1399 * This source code is licensed under the MIT license. 1400 * See the LICENSE file in the root directory of this source tree. 1401 */var Xjt=q2e("filled","thumb-up-filled","IconThumbUpFilled",[["path",{d:"M13 3a3 3 0 0 1 2.995 2.824l.005 .176v4h2a3 3 0 0 1 2.98 2.65l.015 .174l.005 .176l-.02 .196l-1.006 5.032c-.381 1.626 -1.502 2.796 -2.81 2.78l-.164 -.008h-8a1 1 0 0 1 -.993 -.883l-.007 -.117l.001 -9.536a1 1 0 0 1 .5 -.865a2.998 2.998 0 0 0 1.492 -2.397l.007 -.202v-1a3 3 0 0 1 3 -3z",key:"svg-0"}],["path",{d:"M5 10a1 1 0 0 1 .993 .883l.007 .117v9a1 1 0 0 1 -.883 .993l-.117 .007h-1a2 2 0 0 1 -1.995 -1.85l-.005 -.15v-7a2 2 0 0 1 1.85 -1.995l.15 -.005h1z",key:"svg-1"}]]);const Qjt=b.memo(function({message:t}){const n=t.feedback,{feedbackCategory:r}=Ir();if(!n)return null;const i=s=>s&&{[xd.InsufficientDetail]:r.insufficientDetail,[xd.IrrelevantInformation]:r.irrelevantInformation,[xd.MissingInformation]:r.missingInformation,[xd.IncorrectInformation]:r.incorrectInformation,[xd.Other]:r.other}[s]||"";return l.jsxs("div",{className:"flex flex-row items-start gap-1",children:[l.jsxs("div",{className:"mb-1 shrink-0 rounded-full bg-zinc-900 p-2 text-white",children:[n.rating===dX.Negative&&l.jsx(Yjt,{className:"size-4"}),n.rating===dX.Positive&&l.jsx(Xjt,{className:"size-4"})]}),(n.category||n.note)&&l.jsxs("div",{className:"w-max max-w-[85%] rounded-lg bg-zinc-900 px-3 py-2",children:[n.category&&l.jsx("div",{className:"text-xs font-medium text-zinc-200",children:i(n.category)}),n.note&&l.jsx("div",{className:"whitespace-pre-wrap text-xs text-zinc-400",children:n.note})]})]})});function Zjt(e,t){const n=fy(e),r=n.filter(u=>u.type==="text"),i=r.find(u=>u.attribution?.status==="selected")?.attribution??r.findLast(u=>u.attribution)?.attribution,s=t&&!i,a=[];for(const u of n){if(u.type!=="tool_result")continue;const d=u.artifact,h=d&&typeof d=="object"&&"citationSources"in d?d.citationSources:d,p=nHe.safeParse(h);if(p.success)for(const[g,v]of Object.entries(p.data.sources))a.push({type:"citation",id:g,url:v.url,title:v.fileName,source_type:v.type})}const o=e.sources?.length?e.sources:g8(n),c=g8([{type:"text",text:"",annotations:a}])??[];return{status:s?"legacy":i?.status??(o?.length?"selected":"missing"),selected:s||i&&i.status!=="selected"?[]:o,retrieved:c.length?c:s?o??[]:[],hasAnswer:r.some(u=>u.text.trim())}}function Jjt(e){const{message:t,isVoice:n,sourcesFormat:r}=e,{selected:i,hasAnswer:s}=Zjt(t,n);return!s||!i?.length?null:l.jsx(LS,{sources:i,sourcesFormat:r,sourcesDisplayMode:Ms.Pills})}function JA(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function ek({label:e,value:t}){return t?l.jsxs("div",{className:"flex flex-col gap-1",children:[l.jsx("span",{className:"text-muted-foreground text-xs font-medium",children:e}),l.jsx("pre",{className:"max-h-64 overflow-auto whitespace-pre-wrap break-words rounded border border-border bg-background/50 p-2 text-xs",children:t})]}):null}function W2e({toolCall:e,content:t,artifact:n,error:r}){const[i,s]=b.useState(!1);return l.jsxs("div",{className:"w-full text-left",children:[l.jsxs("button",{type:"button",onClick:()=>s(a=>!a),className:"text-muted-foreground inline-flex items-center gap-1 text-xs transition-colors hover:text-foreground",children:[l.jsx(Qd,{className:`size-3 transition-transform ${i?"rotate-90":""}`}),l.jsx("span",{className:"font-mono",children:e.name}),l.jsx(D,{id:"LrvzH8"})]}),i&&l.jsxs("div",{className:"mt-1 flex flex-col gap-2 rounded border border-border p-2",children:[l.jsx(ek,{label:l.jsx(D,{id:"OgB1k4"}),value:JA(e.args)}),l.jsx(ek,{label:l.jsx(D,{id:"RD6AE9"}),value:JA(t??e.content)}),l.jsx(ek,{label:l.jsx(D,{id:"xdkqLV"}),value:JA(n??e.artifact)}),r&&l.jsx(ek,{label:l.jsx(D,{id:"SlfejT"}),value:JA(r)})]})]})}function e5t(e){const t=new Map,n=new Map,r=s=>{let a=n.get(s);return a||(a=[...s.blocks??[]],n.set(s,a)),a};return e.filter(s=>s.role===nh.Assistant).sort(Pfe).forEach(s=>{for(const a of s.blocks??[])a.type==="tool_call"&&a.id&&t.set(a.id,s);for(const a of s.blocks??[]){if(a.type!=="tool_result")continue;const o=t.get(a.tool_call_id);if(!o||o===s)continue;const c=r(o),u=c.findIndex(h=>h.type==="tool_call"&&h.id===a.tool_call_id);c.splice(u+1,0,a);const d=r(s);d.splice(d.indexOf(a),1)}}),e.flatMap(s=>{const a=n.get(s);return a?.length===0&&s.generationStatus!==Zg.Stopped&&s.generationStatus!==Zg.Failed?[]:[a?{...s,blocks:a}:s]})}function t5t(e){const t=e.component;return{...e,component:n=>l.jsxs("div",{className:"flex w-full flex-col gap-1",children:[l.jsx(t,{...n}),l.jsx(W2e,{...n})]})}}function n5t({messages:e,agentName:t,agentAvatar:n,chatbotConfig:r,debug:i=!1,isVoice:s=!1}){const a=r?.sourcesFormat??Th.Simple,o=r?.sourcesDisplayMode??Ms.Pills,c=r?.inlineCitations??!1,u=b.useMemo(()=>e5t(e),[e]),d=b.useMemo(()=>{const h={[We.RagResult]:N2t,[We.RagResultOperator]:C2t,[We.RecommendShopProducts]:O2t,[We.ShowShopProductDetail]:F2t,[We.UsageLimitsError]:T2t,[We.GetOperator]:S2t};return i?Object.fromEntries(Object.entries(h).map(([p,g])=>[p,g&&t5t(g)])):h},[i]);return l.jsx(v2t,{children:l.jsx(w2t,{messages:u,toolRegistry:d,showToolActivity:!0,showReasoning:!0,expandToolActivity:i?!0:r?.expandToolActivity,renderTrailStepInspector:i?h=>l.jsx(W2e,{toolCall:h,state:"result",content:h.content,artifact:h.artifact}):void 0,renderSources:h=>l.jsx(Jjt,{message:h,isVoice:s,sourcesFormat:a}),sourcesFormat:a,sourcesDisplayMode:o,inlineCitations:c,debugToolCalls:i,renderUnknownTool:h=>h.kind==="form"||l0t(h.artifact)?c0t(h):l.jsx(kmt,{...h}),FeedbackComponent:Qjt,agentName:t,agentAvatar:n})})}const r5t=b.memo(({agentName:e,agentAvatar:t,chatbotConfig:n,messages:r,debug:i,isVoice:s})=>!Array.isArray(r)||r.length===0?l.jsx("div",{className:"flex h-full flex-col items-center justify-start pt-12",children:l.jsx("p",{className:"text-sm text-muted-fg",children:l.jsx(D,{id:"LU6cPE"})})}):l.jsx("div",{className:"flex flex-col gap-4 p-4",children:l.jsx("div",{className:"flex grow flex-col gap-6 [&>*:first-child]:mt-auto",children:l.jsx(n5t,{messages:r,agentName:e,agentAvatar:t,chatbotConfig:n,debug:i,isVoice:s})})})),i5t=b.memo(({onSubmit:e,className:t,placeholder:n,disabled:r=!0})=>{const[i,s]=b.useState(""),a=b.useRef(null);b.useEffect(()=>{const d=a.current;if(!d)return;const h=()=>{d.style.height="auto",d.style.height=`${d.scrollHeight}px`};h();const p=new ResizeObserver(h);p.observe(d);const g=()=>{h()};return d.addEventListener("input",g),()=>{p.disconnect(),d.removeEventListener("input",g)}},[]);const o=d=>{d.preventDefault(),!(!i.trim()||!r)&&(e(i),s(""))},c=d=>{r&&s(d.target.value)},u=d=>
1401{r&&d.key==="Enter"&&!d.shiftKey&&(d.preventDefault(),o(d))};return l.jsx("form",{onSubmit:o,className:$e(t,"absolute inset-x-0 bottom-0 p-4"),children:l.jsxs("div",{className:$e("grid cursor-text gap-2 overflow-hidden rounded-3xl border border-border bg-gray-50 p-2 relative",!r&&"opacity-70"),onClick:()=>r&&a.current?.focus(),children:[l.jsx("textarea",{ref:a,value:i,onChange:c,onKeyDown:u,placeholder:n,rows:1,disabled:!r,className:"max-h-[150px] flex-1 resize-none overflow-y-auto border-none bg-transparent px-2 pt-2 outline-none disabled:cursor-not-allowed"}),l.jsx("div",{className:"flex justify-end",children:l.jsxs(Oe,{type:"submit","data-cta":"admin-inbox-message-composer-send-button",variant:"primary",className:"self-end !rounded-full",disabled:!r||!i.trim(),children:[l.jsx(D,{id:"JlFcis"}),l.jsx(E6,{className:"size-4"})]})})]})})}),s5t=b.memo(({status:e,withText:t=!0,className:n})=>l.jsxs("div",{className:$e("flex items-center gap-1",t&&"py-0.5 px-2 rounded-full",t&&{"bg-green-100 text-green-800":e==="online","bg-red-100 text-red-800":e==="offline"},n),children:[l.jsxs("span",{className:"relative size-2 rounded-full",children:[e==="online"&&l.jsx("span",{className:$e("absolute top-0 inline-block size-2 rounded-full shrink-0 bg-green-500 animate-ping")}),l.jsx("span",{className:$e("absolute top-0 inline-block size-2 rounded-full shrink-0",e==="online"&&"bg-green-500",e==="offline"&&"bg-red-500")})]}),t&&l.jsxs("span",{className:"text-xs",children:[e==="online"&&l.jsx(D,{id:"oXOSPE"}),e==="offline"&&l.jsx(D,{id:"6Aih4U"})]})]})),G2e=b.memo(({lastActiveAt:e,withText:t=!0,showWhenOffline:n=!0})=>{const r=Jhe(e);return!n&&r==="offline"?null:l.jsx(s5t,{status:r,withText:t})}),a5t=b.memo(({onRequestTakeover:e,hasPendingRequest:t,isLoading:n,onCancel:r,className:i})=>{const{i18n:s,_:a}=Me(),[o,c]=b.useState(s._({id:"SqgjqX"})),u=async d=>{d.preventDefault(),!(!o.trim()||n)&&await e(o)};return t?l.jsx("div",{className:$e(i),children:l.jsx("div",{className:"border-t border-border bg-amber-50 p-4",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(S0,{className:"size-8 shrink-0 text-amber-500"}),l.jsxs("div",{className:"flex-1",children:[l.jsx("h3",{className:"mb-1 font-medium",children:l.jsx(D,{id:"t02FmO"})}),l.jsx("p",{className:"text-sm text-gray-600",children:l.jsx(D,{id:"XlaD9r"})})]}),n?l.jsx(Kr,{className:"size-5 animate-spin text-primary"}):l.jsx(Oe,{"data-cta":"admin-inbox-takeover-request-cancel-button",variant:"danger",size:"sm",onClick:r,children:l.jsx(D,{id:"dEgA5A"})})]})})}):l.jsx("div",{className:$e(i),children:l.jsxs("div",{className:"border-t border-border bg-gray-50 p-4",children:[l.jsxs("div",{className:"mb-3 flex items-start gap-3",children:[l.jsx(S0,{className:"mt-0.5 size-6 shrink-0 text-amber-500"}),l.jsxs("div",{children:[l.jsx("h3",{className:"mb-1 font-medium",children:l.jsx(D,{id:"FlI9mN"})}),l.jsx("p",{className:"text-sm text-gray-600",children:l.jsx(D,{id:"v1G8t7"})})]})]}),l.jsxs("form",{onSubmit:u,className:"mt-4 space-y-3",children:[l.jsx("textarea",{value:o,onChange:d=>c(d.target.value),placeholder:s._({id:"PqLcKH"}),className:"min-h-[80px] w-full resize-none rounded-md border border-gray-300 p-3 text-sm focus:border-transparent focus:ring-2 focus:ring-primary"}),l.jsx("div",{className:"flex justify-end",children:l.jsxs(Oe,{type:"submit","data-cta":"admin-inbox-takeover-request-submit-button",variant:"primary",size:"sm",disabled:n,children:[n&&l.jsx(Kr,{className:"mr-2 size-4 animate-spin"}),l.jsx(D,{id:"TU5/ft"})]})})]})]})})});function o5t(e,t=6e4){const{user:n}=ps(),r=Ae.useUtils(),[i,s]=b.useState(!1),a=Ae.threads.getPendingTakeoverRequest.useQuery({id:e},{enabled:!!e,notifyOnChangeProps:"all",refetchOnMount:"always",refetchOnWindowFocus:"always",refetchInterval:t}),o=Ae.threads.createTakeoverRequest.useMutation({onSuccess:()=>{e&&r.threads.getPendingTakeoverRequest.invalidate({id:e})}}),c=Ae.threads.cancelTakeoverRequest.useMutation({onSuccess:()=>{e&&r.threads.getPendingTakeoverRequest.invalidate({id:e})}});return{isTakeoverLoading:i,pendingTakeover:a,requestTakeover:async h=>{if(e)try{s(!0),await o.mutateAsync({threadId:e,message:h,user:{id:n?.id??"",firstName:n?.firstName??"",lastName:n?.lastName??"",photo:n?.photo??""}})}catch(p){console.error("Failed to create takeover request:",p)}finally{s(!1)}},cancelTakeover:async()=>
1401{if(e)try{s(!0),await c.mutateAsync({id:e})}catch(h){console.error("Failed to cancel takeover request:",h)}finally{s(!1)}}}}const l5t=b.memo(({thread:e,isLoading:t,onSubmit:n,onToggleMetadata:r,onBack:i})=>{const{i18n:s,_:a}=Me(),o=e?.chat?.chatbotConfig?.systemAvatar||Gjt,[c,u]=b.useState(!1),d=Jhe(e?.lastActiveAt),{pendingTakeover:h,requestTakeover:p,cancelTakeover:g,isTakeoverLoading:v}=o5t(e?.id),x=b.useRef(null),_=b.useMemo(()=>e?.messages?.at(-1)?.id,[e?.messages]),w=b.useRef(_);if(b.useEffect(()=>{x.current&&_&&_!==w.current&&(x.current.scrollTop=x.current.scrollHeight,w.current=_)},[_]),t)return l.jsx("div",{className:"flex h-full flex-col items-center justify-start pt-12",children:l.jsx(Kr,{className:"size-10 animate-spin text-primary"})});if(!e)return l.jsx("div",{className:"flex h-full items-center justify-center text-muted-fg",children:l.jsx(D,{id:"3fR0/O"})});const S=d==="online",E=S&&e.mode===wu.AI,T=E;return l.jsxs("div",{className:"relative flex h-full flex-col",children:[l.jsx("div",{className:"border-b border-gray-200 p-4",children:l.jsxs("div",{className:"flex items-center gap-2",children:[i&&l.jsx(Oe,{"data-cta":"admin-inbox-conversation-back",variant:"ghost",size:"icon-sm",onClick:i,className:"shrink-0 md:hidden",children:l.jsx(Tj,{className:"size-5"})}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx(T0,{title:e.title||l.jsx(D,{id:"wja8aL"}),children:l.jsx("h2",{className:"truncate text-lg font-semibold",children:e.title||l.jsx(D,{id:"wja8aL"})})}),l.jsxs("div",{className:"mt-1 flex items-center gap-2",children:[l.jsx(G2e,{lastActiveAt:e.lastActiveAt}),E&&l.jsx("div",{className:"flex items-center gap-1 text-xs text-amber-600",children:l.jsx(D,{id:"FlI9mN"})})]})]}),l.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[l.jsx(T0,{title:s._({id:"ssKQEP"}),children:l.jsx(Oe,{"data-cta":"admin-inbox-conversation-toggle-debug",variant:c?"primary":"ghost",size:"icon-sm",onClick:()=>u(N=>!N),"aria-pressed":c,className:"flex items-center gap-1",children:l.jsx(A2,{className:"size-5"})})}),l.jsx(Oe,{"data-cta":"admin-inbox-conversation-toggle-metadata",variant:"ghost",size:"icon-sm",onClick:r,className:"hidden items-center gap-1 md:flex",children:l.jsx(ds,{className:"size-5"})})]})]})}),l.jsx("div",{ref:x,className:$e("flex-1 overflow-y-auto overflow-x-hidden",{"pb-32":!T}),children:l.jsx(r5t,{messages:e.messages,agentName:e.chat?.name,agentAvatar:o,chatbotConfig:e.chat?.chatbotConfig,debug:c,isVoice:e.chat?.agentType===ai.Voice})}),T?l.jsx(a5t,{onRequestTakeover:p,hasPendingRequest:!!h.data,isLoading:v,onCancel:g}):l.jsx(i5t,{onSubmit:n,disabled:!S||S&&e.mode===wu.Human,placeholder:s._({id:"U8mz2Y"})})]})}),c5t=b.memo(({onClick:e,active:t,thread:n,isUnread:r})=>l.jsxs("button",{"data-cta":"admin-inbox-thread-item",className:$e("w-full cursor-pointer p-4 text-left hover:bg-primary/15 transition-colors",t&&"bg-primary/30",r&&"font-bold bg-primary/10"),onClick:e,children:[l.jsxs("div",{className:"flex flex-col-reverse justify-between md:flex-row md:items-center md:gap-2",children:[l.jsxs("span",{className:$e("inline-flex min-w-0 items-center gap-2 text-gray-900 font-medium",r&&"font-bold"),children:[l.jsx(G2e,{showWhenOffline:!1,withText:!1,lastActiveAt:n.lastActiveAt}),n.category===fd.Voice&&l.jsx(L9,{className:"size-3.5 shrink-0 text-green-500"}),l.jsx(T0,{title:n.title||l.jsx(D,{id:"wja8aL"}),children:l.jsx("span",{className:"truncate",children:n.title||l.jsx(D,{id:"wja8aL"})})})]}),l.jsx("span",{className:"shrink-0 grow-0 text-xs text-muted-fg",children:yt.date(n.lastUserMessageAt??n.createdAt,Zn.DateTimeNumeric)})]}),l.jsx("p",{className:"mt-1 hidden truncate text-xs text-gray-600 md:block",children:n.chatUser})]})),u5t=b.memo(({threads:e,isLoading:t,selectedThreadId:n,isFetchingNextPage:r,onFetchNextPage:i,onSelectThread:s,hasNextPage:a,isUnread:o})=>t?l.jsx("div",{className:"flex h-full flex-col items-center justify-start pt-12",children:l.jsx(Kr,{className:"size-10 animate-spin text-primary"})}):e.length?l.jsxs("div",{children:[l.jsx("div",{className:"divide-y divide-gray-200",children:e.map(c=>l.jsx(c5t,{onClick:()=>s(c.id),active:n===c.id,thread:c,isUnread:o?.(c.id)},c.id))}),l.jsx("div",{className:"flex justify-center border-t border-gray-200 p-6",children:a&&l.jsx(Oe,{"data-cta":"admin-inbox-thread-list-load-more-button",variant:"ghost",outline:!0,disabled:r,loading:r,onClick:i,children:l.jsx(D,{id:"yQ2kGp"})})})]}):l.jsx("div",{className:"flex h-full flex-col items-center justify-start pt-12",children:l.jsx("p",{className:"text-sm text-muted-fg",children:l.jsx(D,{id:"3n3r8B"})})})),d5t=b.memo(({threads:e,isLoading:t,onSelectThread:n,activeThreadI
1401d:r,isFetchingNextPage:i,onFetchNextPage:s,hasNextPage:a,isUnread:o,onExportClick:c})=>l.jsxs("div",{className:"flex h-full flex-col",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2 border-b border-gray-200 p-4",children:[l.jsx(rde,{children:l.jsx(coe,{className:"size-6 text-foreground"})}),l.jsx("h2",{className:"text-lg font-semibold",children:l.jsx(D,{id:"Gp4Yi6"})}),l.jsx(Oe,{"data-cta":"admin-inbox-sidebar-export-button",variant:"secondary",onClick:()=>c?.(),type:"button",size:"sm",children:"Export"})]}),l.jsx("div",{className:"flex-1 overflow-auto",children:l.jsx(u5t,{onSelectThread:u=>{n?.(u)},selectedThreadId:r,threads:e,isLoading:t,isFetchingNextPage:i,onFetchNextPage:s,hasNextPage:a,isUnread:o})})]}));function f5t(e,t){if(!(e instanceof Date)||!(t instanceof Date)||Number.isNaN(e.getTime())||Number.isNaN(t.getTime()))return"";const n=t.getTime()-e.getTime();return n<0?"+0.0s":`+${(n/1e3).toFixed(1)}s`}function h5t(e){switch(e){case Ev.Error:return"text-red-500";case Ev.CallStarted:case Ev.CallEnded:return"text-purple-500";case Ev.AI:return"text-green-500";case Ev.Log:return"text-gray-500";case Ev.Usage:return"text-amber-500";default:return"text-gray-500"}}function p5t({logs:e=[]}){const[t,n]=b.useState(null);if(!e||e.length===0)return l.jsx("div",{className:"p-4 text-center",children:l.jsx(D,{id:"0zxJ87"})});const r=e.map(s=>({...s,timestamp:new Date(s.timestamp)})).filter(s=>!Number.isNaN(s.timestamp.getTime())).sort((s,a)=>s.timestamp.getTime()-a.timestamp.getTime()),i=r[0]?.timestamp;return i?l.jsx("div",{className:"w-full overflow-auto rounded-md border bg-background p-2 text-xs text-foreground",children:r.map(s=>l.jsxs("div",{role:"button",className:"relative grid grid-cols-[60px_55px_100px_1fr] items-start gap-2 rounded border-b border-border py-1 hover:bg-muted/30",onClick:()=>n(a=>a===s.id?null:s.id),children:[l.jsx("span",{className:"pt-px",children:kfe(s.timestamp,"HH:mm:ss.SSS")}),l.jsx("span",{className:"pt-px text-right text-blue-500",children:f5t(i,s.timestamp)}),l.jsxs("span",{className:$e("font-semibold pt-px",h5t(s.event)),children:["[",s.event.toUpperCase(),"]"]}),l.jsxs("span",{className:"flex items-center gap-1 whitespace-pre-wrap break-words pt-px",children:[s.message,!!s.payload&&l.jsx("span",{className:"cursor-pointer text-gray-400 hover:text-gray-600",children:l.jsx(ds,{size:12})})]}),!!s.payload&&t===s.id&&l.jsx("div",{className:"col-span-4 w-full whitespace-pre-wrap break-words rounded-radius bg-gray-100 p-1 font-mono",children:JSON.stringify(s.payload,null,2)})]},s.id))}):l.jsx("div",{className:"p-4 text-center text-sm",children:"Could not determine call start time."})}function Are({title:e,emptyMessage:t,content:n}){return l.jsxs("section",{className:"space-y-2",children:[l.jsx("h4",{className:"text-sm font-semibold text-foreground",children:e}),n?.trim()?l.jsx("div",{className:"rounded-md border border-border bg-muted/30 p-3 text-sm",children:l.jsx(Ph,{children:n})}):l.jsx("p",{className:"text-sm text-muted-foreground",children:t})]})}function m5t({thread:e,className:t}){const{i18n:n,_:r}=Me();return l.jsxs("div",{className:$e("space-y-6",t),children:[e.summarizedUntil?l.jsx("p",{className:"text-xs text-muted-foreground",children:n._({id:"UwmLff",values:{0:yt.date(e.summarizedUntil,Zn.DateTimeNumericSeconds)}})}):null,l.jsx(Are,{title:n._({id:"B7CTvi"}),emptyMessage:n._({id:"WLCD7O"}),content:e.summary}),l.jsx(Are,{title:n._({id:"QTX90n"}),emptyMessage:n._({id:"20Ishb"}),content:e.workingMemory})]})}function g5t({threadId:e,currency:t}){const{i18n:n,_:r}=Me(),{recordUnit:i}=Ir(),{data:s,isLoading:a}=Ae.threads.getThreadCosts.useQuery({id:e}),o=s?.reduce((u,d)=>u+d.totalCost,0)||0,c=(u,d)=>{switch(d){case Vp.Tokens:case Vp.Characters:return yt.number(u);case Vp.Seconds:return yt.duration(u);case Vp.Credits:return yt.number(u);default:return yt.number(u)}};return l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"flex flex-col gap-0.5",children:[l.jsx("h4",{className:"text-sm font-semibold leading-none tracking-tight",children:l.jsx(D,{id:"QDjNdu"})}),l.jsx("p",{className:"text-xs text-muted-fg",children:l.jsx(D,{id:"IGvxFo"})})]}),a?l.jsx("div",{className:"text-sm",children:l.jsx(D,{id:"yQE2r9"})}):!s||s.length===0?l.jsx("p",{className:"text-sm text-muted-foreground",children:l.jsx(D,{id:"+9Od1F"})}):l.jsxs(l.Fragment,{children:[l.jsxs(q9,{children:[l.jsx(Lj,{children:l.jsxs(oh,{className:"[&>th]:py-1.5",children:[l.jsx(oo,{children:l.jsx(D,{id:"+zy2Nq"})}),l.jsx(oo,{className:"text-right",children:l.jsx(D,{id:"7FaY4u"})}),l.jsx(oo,{className:"text-right",children:l.jsx(D,{id:"I99Miw"})})]})}),l.jsx(Fj,{children:s.map((u,d)=>{const h=u.type===fw.Llm,p=i[u.unitType].toLowerCase();return l.jsxs(oh,{className:"[&>td]:py-1.5",children:[l.jsx(Ba,{className:"align-top text-sm font-medium",children:u.type}),l.jsx(Ba,{className:"align-top text-right text-sm tabular-nums",children:h?l.jsxs("div",{className:"flex flex-col items-end leading-tight",children:[l.jsxs("span",{children:[yt.number(u.inputTokens??0)," ",l.jsx("span",{className:"text-xs text-muted-fg",children:n._({id:"JxhWxU"})})]}),l.jsxs("span",{children:[yt.number(u.outputTokens??0)," ",l.jsx("span",{className:"text-xs text-muted-fg",children:n._({id:"sQDgWl"})})]})]}):l.jsxs("span",{children:[c(u.totalUnits,u.unitType)," ",l.jsxs("span",{className:"text-xs text-muted-fg",children:["(",p,")"]})]})}),l.jsx(Ba,{className:"align-top text-right text-sm font-medium tabular-nums",children:h?l.jsxs("div",{className:"flex flex-col items-end leading-tight",children:[l.jsx("span",{children:yt.credits(u.totalCost,t)}),l.jsxs("span",{className:"text-xs font-normal text-muted-fg",children:[yt.credits(u.inputCost??0,t)," ",n._({id:"JxhWxU"})]}),l.jsxs("span",{className:"text-xs font-normal text-muted-fg",children:[yt.credits(u.outputCost??0,t)," ",n._({id:"sQDgWl"})]})]}):yt.credits(u.totalCost,t)})]},`${u.type}-${u.unitType}-${d}`)}
1401)})]}),l.jsxs("div",{className:"flex justify-end text-sm font-semibold",children:[l.jsxs("span",{className:"mr-2 text-muted-fg",children:[n._({id:"72c5Qo"}),":"]}),l.jsx("span",{children:yt.credits(o,t)})]})]})]})}function x5t({recordingId:e}){const{i18n:t,_:n}=Me(),[r,i]=b.useState(!1),s=Ae.threads.getCallRecordingPlayback.useQuery({id:e},{enabled:r,staleTime:0,refetchOnWindowFocus:!1,retry:!1});return!r||s.isError?l.jsxs("div",{className:"space-y-2",children:[s.isError&&l.jsx("p",{className:"text-sm text-destructive",children:l.jsx(D,{id:"F4D6XI"})}),l.jsx(Oe,{onClick:()=>{i(!0),r&&s.refetch()},children:l.jsx(D,{id:"a80HFV"})})]}):s.data?l.jsxs("div",{className:"space-y-2",children:[l.jsx("audio",{controls:!0,preload:"metadata",src:s.data.url,className:"w-full","aria-label":t._({id:"frXUwC"}),children:l.jsx("track",{kind:"captions"})}),l.jsx(Oe,{size:"sm",variant:"ghost",onClick:()=>void s.refetch(),children:l.jsx(D,{id:"dWlfZz"})})]}):l.jsx("p",{className:"text-sm text-muted-foreground",children:l.jsx(D,{id:"vyeniC"})})}function v5t({threadId:e}){const{i18n:t,_:n}=Me(),r=Ae.threads.getCallRecordings.useQuery({id:e},{refetchInterval:15e3}),i={recording:t._({id:"uw8JpK"}),processing:t._({id:"SDYm/b"}),ready:t._({id:"ODFvgl"}),failed:t._({id:"Qbg5QU"}),absent:t._({id:"j3BN4M"}),expired:t._({id:"0etPhl"})};return l.jsxs("section",{className:"space-y-3 rounded-md border p-3",children:[l.jsx("h4",{className:"text-sm font-semibold",children:l.jsx(D,{id:"wYLT8I"})}),r.isError?l.jsx("p",{className:"text-sm text-destructive",children:l.jsx(D,{id:"01v9Bh"})}):r.isLoading?l.jsx("p",{className:"text-sm text-muted-foreground",children:l.jsx(D,{id:"vyeniC"})}):r.data?.length?r.data.map(s=>l.jsxs("div",{className:"space-y-2",children:[l.jsx("p",{className:"text-sm",children:i[s.status]}),s.durationSeconds!==void 0&&l.jsx("p",{className:"text-xs text-muted-foreground",children:t._({id:"KkMA8O",values:{0:Math.floor(s.durationSeconds/60),1:s.durationSeconds%60}})}),s.status==="ready"&&l.jsx(x5t,{recordingId:s.id})]},s.id)):l.jsx("p",{className:"text-sm text-muted-foreground",children:l.jsx(D,{id:"R1Khee"})})]})}function y5t({thread:e,className:t,onClose:n}){const{i18n:r,_:i}=Me(),{threadCategory:s}=Ir(),{organization:a}=Vc(),o=a?.currency??Ti.USD;return l.jsxs("div",{className:$e("w-[500px] md:block hidden border-l border-gray-200 bg-white p-4 h-full overflow-auto",t),children:[l.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[l.jsx("h3",{className:"text-lg font-semibold",children:l.jsx(D,{id:"Qh8mSK"})}),l.jsx(Oe,{"data-cta":"admin-inbox-thread-details-close-button",variant:"ghost",size:"icon-sm",className:"size-8 p-0",onClick:n,children:l.jsx(pl,{className:"size-4"})})]}),e.category===fd.Voice&&l.jsx("div",{className:"mb-4",children:l.jsx(v5t,{threadId:e.id},e.id)}),l.jsxs(Sx,{className:"flex min-h-0 flex-1 flex-col",defaultValue:"metadata",children:[l.jsxs(Ex,{className:"mb-4 border-b border-border",children:[l.jsx(Ji,{value:"metadata",className:"px-4 py-2 text-sm font-medium data-[state=active]:border-b-2 data-[state=active]:border-primary",children:l.jsx(D,{id:"6GBt0m"})}),e.category===fd.Chat&&l.jsx(Ji,{value:"context",className:"px-4 py-2 text-sm font-medium data-[state=active]:border-b-2 data-[state=active]:border-primary",children:l.jsx(D,{id:"M73whl"})}),l.jsx(Ji,{value:"logs",className:"px-4 py-2 text-sm font-medium data-[state=active]:border-b-2 data-[state=active]:border-primary",children:l.jsx(D,{id:"w/bY7R"})}),l.jsx(Ji,{value:"costs",className:"px-4 py-2 text-sm font-medium data-[state=active]:border-b-2 data-[state=active]:border-primary",children:l.jsx(D,{id:"yd3m3Q"})})]}),l.jsxs("div",{className:"min-h-0 flex-1",children:[l.jsx(es,{value:"metadata",className:"h-full",children:l.jsxs("div",{className:"space-y-4",children:[l.jsx(jn,{label:r._({id:"cIrPO7"}),className:"text-sm",children:e.id}),l.jsx(jn,{label:r._({id:"K7tIrx"}),className:"text-sm",children:l.jsxs(En,{className:"inline-flex items-center gap-2",variant:e.category===fd.Voice?"success":"primary",children:[e.category===fd.Voice?l.jsx(L9,{className:"size-3.5"}):l.jsx(Pj,{className:"size-3.5"})," ",s[e.category]]})}
1401),l.jsx(jn,{label:r._({id:"d+F6q9"}),className:"text-sm",children:yt.date(e.createdAt,Zn.DateTimeNumericSeconds)}),l.jsx(jn,{label:r._({id:"+b7T3G"}),className:"text-sm",children:yt.date(e.updatedAt,Zn.DateTimeNumericSeconds)}),l.jsx(jn,{label:r._({id:"HMYVoW"}),className:"text-sm",children:e.lastUserMessageAt?yt.date(e.lastUserMessageAt,Zn.DateTimeNumericSeconds):"-"}),l.jsx(jn,{label:r._({id:"mJn6Bl"}),className:"text-sm",children:e.lastActiveAt?yt.date(e.lastActiveAt,Zn.DateTimeNumericSeconds):"-"}),e.category===fd.Voice&&l.jsxs(l.Fragment,{children:[l.jsx(jn,{label:r._({id:"ZuLy43"}),className:"text-sm",children:e.chatUser?.phone||"-"}),l.jsx(jn,{label:r._({id:"pSHzXt"}),className:"text-sm",children:e.callStartedAt?yt.date(e.callStartedAt,Zn.DateTimeNumericSeconds):"-"}),l.jsx(jn,{label:r._({id:"f8vZT3"}),className:"text-sm",children:e.callEndedAt?yt.date(e.callEndedAt,Zn.DateTimeNumericSeconds):"-"}),e.callEndedAt&&e.callStartedAt&&l.jsx(jn,{label:r._({id:"jzTrTs"}),className:"text-sm",children:l.jsx(En,{variant:"primary",outline:!0,size:"sm",children:yt.dateDuration(e.callStartedAt,e.callEndedAt)})})]}),e.category===fd.Chat&&l.jsx(jn,{label:r._({id:"mC2V0B"}),className:"text-sm",children:l.jsx(En,{size:"sm",variant:e.mode===wu.AI?"secondary":"primary",children:e.mode===wu.AI?"AI":"Human"})}),l.jsx(jn,{label:r._({id:"J8ndts"}),className:"text-sm",children:e.messages?.length||0})]})}),e.category===fd.Chat&&l.jsx(es,{value:"context",className:"h-full",children:l.jsx(m5t,{thread:e})}),l.jsx(es,{value:"logs",className:"h-full",children:l.jsx(p5t,{logs:e.callLogs})}),l.jsx(es,{value:"costs",className:"h-full",children:l.jsx(g5t,{threadId:e.id,currency:o})})]})]})]})}const Yd=Object.create(null);Yd.open="0";Yd.close="1";Yd.ping="2";Yd.pong="3";Yd.message="4";Yd.upgrade="5";Yd.noop="6";const Hk=Object.create(null);
vendor: 39,996 bytes, line 1401
1401Object.keys(Yd).forEach(e=>{Hk[Yd[e]]=e});const BL={type:"error",data:"parser error"},K2e=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Y2e=typeof ArrayBuffer=="function",X2e=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,IU=({type:e,data:t},n,r)=>K2e&&t instanceof Blob?n?r(t):kre(t,r):Y2e&&(t instanceof ArrayBuffer||X2e(t))?n?r(t):kre(new Blob([t]),r):r(Yd[e]+(t||"")),kre=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Nre(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let gD;function b5t(e,t){if(K2e&&e.data instanceof Blob)return e.data.arrayBuffer().then(Nre).then(t);if(Y2e&&(e.data instanceof ArrayBuffer||X2e(e.data)))return t(Nre(e.data));IU(e,!1,n=>{gD||(gD=new TextEncoder),t(gD.encode(n))})}const jre="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ew=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<jre.length;e++)Ew[jre.charCodeAt(e)]=e;const _5t=e=>{let t=e.length*.75,n=e.length,r,i=0,s,a,o,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),d=new Uint8Array(u);for(r=0;r<n;r+=4)s=Ew[e.charCodeAt(r)],a=Ew[e.charCodeAt(r+1)],o=Ew[e.charCodeAt(r+2)],c=Ew[e.charCodeAt(r+3)],d[i++]=s<<2|a>>4,d[i++]=(a&15)<<4|o>>2,d[i++]=(o&3)<<6|c&63;return u},w5t=typeof ArrayBuffer=="function",OU=(e,t)=>{if(typeof e!="string")return{type:"message",data:Q2e(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:S5t(e.substring(1),t)}:Hk[n]?e.length>1?{type:Hk[n],data:e.substring(1)}:{type:Hk[n]}:BL},S5t=(e,t)=>{if(w5t){const n=_5t(e);return Q2e(n,t)}else return{base64:!0,data:e}},Q2e=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Z2e="�",E5t=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((s,a)=>{IU(s,!1,o=>{r[a]=o,++i===n&&t(r.join(Z2e))})})},C5t=(e,t)=>{const n=e.split(Z2e),r=[];for(let i=0;i<n.length;i++){const s=OU(n[i],t);if(r.push(s),s.type==="error")break}return r};function T5t(){return new TransformStream({transform(e,t){b5t(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const s=new DataView(i.buffer);s.setUint8(0,126),s.setUint16(1,r)}else{i=new Uint8Array(9);const s=new DataView(i.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let xD;function tk(e){return e.reduce((t,n)=>t+n.length,0)}function nk(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function A5t(e,t){xD||(xD=new TextDecoder);const n=[];let r=0,i=-1,s=!1;return new TransformStream({transform(a,o){for(n.push(a);;){if(r===0){if(tk(n)<1)break;const c=nk(n,1);s=(c[0]&128)===128,i=c[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(tk(n)<2)break;const c=nk(n,2);i=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),r=3}else if(r===2){if(tk(n)<8)break;const c=nk(n,8),u=new DataView(c.buffer,c.byteOffset,c.length),d=u.getUint32(0);if(d>Math.pow(2,21)-1){o.enqueue(BL);break}i=d*Math.pow(2,32)+u.getUint32(4),r=3}else{if(tk(n)<i)break;const c=nk(n,i);o.enqueue(OU(s?c:xD.decode(c),t)),r=0}if(i===0||i>e){o.enqueue(BL);break}}}})}const J2e=4;function Js(e){if(e)return k5t(e)}function k5t(e){for(var t in Js.prototype)e[t]=Js.prototype[t];return e}Js.prototype.on=Js.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Js.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Js.prototype.off=Js.prototype.removeListener=Js.prototype.removeAllListeners=Js.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};Js.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};Js.prototype.emitReserved=Js.prototype.emit;Js.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Js.prototype.hasListeners=function(e){return!!this.listeners(e).length};const G4=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Ec=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),N5t="arraybuffer";function eSe(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const j5t=Ec.setTimeout,R5t=Ec.clearTimeout;function K4(e,t){t.useNativeTimers?(e.setTimeoutFn=j5t.bind(Ec),e.clearTimeoutFn=R5t.bind(Ec)):(e.setTimeoutFn=Ec.setTimeout.bind(Ec),e.clearTimeoutFn=Ec.clearTimeout.bind(Ec))}const I5t=1.33;function O5t(e){return typeof e=="string"?P5t(e):Math.ceil((e.byteLength||e.size)*I5t)}function P5t(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function tSe(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function M5t(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function D5t(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let s=n[r].split("=");t[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return t}class F5t extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class PU extends Js{constructor(t){super(),this.writable=!1,K4(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new F5t(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=OU(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=M5t(t);return n.length?"?"+n:""}}class L5t extends PU{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};C5t(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,E5t(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=tSe()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let nSe=!1;try{nSe=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const z5t=nSe;function $5t(){}class B5t extends L5t{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,s)=>{this.onError("xhr post error",i,s)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Dd extends Js{constructor(t,n,r){super(),this.createRequest=t,K4(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=eSe(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=Dd.requestsCount++,Dd.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=$5t,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Dd.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Dd.requestsCount=0;Dd.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Rre);else if(typeof addEventListener=="function"){const e="onpagehide"in Ec?"pagehide":"unload";addEventListener(e,Rre,!1)}}function Rre(){for(let e in Dd.requests)Dd.requests.hasOwnProperty(e)&&Dd.requests[e].abort()}const U5t=(function(){const e=rSe({xdomain:!1});return e&&e.responseType!==null})();class V5t extends B5t{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=U5t&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Dd(rSe,this.uri(),t)}}function rSe(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||z5t))return new XMLHttpRequest}catch{}if(!t)try{return new Ec[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const iSe=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class H5t extends PU{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=iSe?{}:eSe(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;IU(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch{}i&&G4(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=tSe()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const vD=Ec.WebSocket||Ec.MozWebSocket;class q5t extends H5t{createSocket(t,n,r){return iSe?new vD(t,n,r):n?new vD(t,n):new vD(t)}doWrite(t,n){this.ws.send(n)}}class W5t extends PU{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=A5t(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=T5t();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const s=()=>{r.read().then(({done:o,value:c})=>{o||(this.onPacket(c),s())}).catch(o=>{})};s();const a={type:"open"};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this._writer.write(a).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;this._writer.write(r).then(()=>{i&&G4(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const G5t={websocket:q5t,webtransport:W5t,polling:V5t},K5t=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Y5t=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function UL(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=K5t.exec(e||""),s={},a=14;for(;a--;)s[Y5t[a]]=i[a]||"";return n!=-1&&r!=-1&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=X5t(s,s.path),s.queryKey=Q5t(s,s.query),s}function X5t(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Q5t(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}const VL=typeof addEventListener=="function"&&typeof removeEventListener=="function",qk=[];VL&&addEventListener("offline",()=>{qk.forEach(e=>e())},!1);class dm extends Js{constructor(t,n){if(super(),this.binaryType=N5t,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=UL(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=UL(n.host).host);K4(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=D5t(this.opts.query)),VL&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},qk.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=J2e,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&dm.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",dm.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=O5t(i)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,G4(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const s={type:t,data:n,options:r};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(dm.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),VL&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=qk.indexOf(this._offlineEventListener);r!==-1&&qk.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}dm.protocol=J2e;class Z5t extends dm{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;dm.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",h=>{if(!r)if(h.type==="pong"&&h.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;dm.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(d(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const p=new Error("probe error");p.transport=n.name,this.emitReserved("upgradeError",p)}}))};function s(){r||(r=!0,d(),n.close(),n=null)}const a=h=>{const p=new Error("probe error: "+h);p.transport=n.name,s(),this.emitReserved("upgradeError",p)};function o(){a("transport closed")}function c(){a("socket closed")}function u(h){n&&h.name!==n.name&&s()}const d=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",o),this.off("close",c),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",o),this.once("close",c),this.once("upgrading",u),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let J5t=class extends Z5t{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(i=>G5t[i]).filter(i=>!!i)),super(t,r)}};function e4t(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=UL(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const s=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+t,r.href=r.protocol+"://"+s+(n&&n.port===r.port?"":":"+r.port),r}const t4t=typeof ArrayBuffer=="function",n4t=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,sSe=Object.prototype.toString,r4t=typeof Blob=="function"||typeof Blob<"u"&&sSe.call(Blob)==="[object BlobConstructor]",i4t=typeof File=="function"||typeof File<"u"&&sSe.call(File)==="[object FileConstructor]";function MU(e){return t4t&&(e instanceof ArrayBuffer||n4t(e))||r4t&&e instanceof Blob||i4t&&e instanceof File}function Wk(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Wk(e[n]))return!0;return!1}if(MU(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Wk(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Wk(e[n]))return!0;return!1}function s4t(e){const t=[],n=e.data,r=e;return r.data=HL(n,t),r.attachments=t.length,{packet:r,buffers:t}}function HL(e,t){if(!e)return e;if(MU(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=HL(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=HL(e[r],t));return n}return e}function a4t(e,t){return e.data=qL(e.data,t),delete e.attachments,e}function qL(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=qL(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=qL(e[n],t));return e}const o4t=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],l4t=5;var kr;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(kr||(kr={}));class c4t{constructor(t){this.replacer=t}encode(t){return(t.type===kr.EVENT||t.type===kr.ACK)&&Wk(t)?this.encodeAsBinary({type:t.type===kr.EVENT?kr.BINARY_EVENT:kr.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===kr.BINARY_EVENT||t.type===kr.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=s4t(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function Ire(e){return Object.prototype.toString.call(e)==="[object Object]"}class DU extends Js{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===kr.BINARY_EVENT;r||n.type===kr.BINARY_ACK?(n.type=r?kr.EVENT:kr.ACK,this.reconstructor=new u4t(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(MU(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(kr[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===kr.BINARY_EVENT||r.type===kr.BINARY_ACK){const s=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const a=t.substring(s,n);if(a!=Number(a)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(a)}if(t.charAt(n+1)==="/"){const s=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(s,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const s=n+1;for(;++n;){const a=t.charAt(n);if(a==null||Number(a)!=a){--n;break}if(n===t.length)break}r.id=Number(t.substring(s,n+1))}if(t.charAt(++n)){const s=this.tryParse(t.substr(n));if(DU.isPayloadValid(r.type,s))r.data=s;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case kr.CONNECT:return Ire(n);case kr.DISCONNECT:return n===void 0;case kr.CONNECT_ERROR:return typeof n=="string"||Ire(n);case kr.EVENT:case kr.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&o4t.indexOf(n[0])===-1);case kr.ACK:case kr.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class u4t{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=a4t(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const d4t=Object.freeze(Object.defineProperty({__proto__:null,Decoder:DU,Encoder:c4t,get PacketType(){return kr},protocol:l4t},Symbol.toStringTag,{value:"Module"}));function uu(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const f4t=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class aSe extends Js{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[uu(t,"open",this.onopen.bind(this)),uu(t,"packet",this.onpacket.bind(this)),uu(t,"error",this.onerror.bind(this)),uu(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,i,s;if(f4t.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const a={type:kr.EVENT,data:n};if(a.options={},a.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const d=this.ids++,h=n.pop();this._registerAckCallback(d,h),a.id=d}const o=(i=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||i===void 0?void 0:i.writable,c=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!o||(c?(this.notifyOutgoingListeners(a),this.packet(a)):this.sendBuffer.push(a)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const s=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o<this.sendBuffer.length;o++)this.sendBuffer[o].id===t&&this.sendBuffer.splice(o,1);n.call(this,new Error("operation has timed out"))},i),a=(...o)=>{this.io.clearTimeoutFn(s),n.apply(this,o)};a.withError=!0,this.acks[t]=a}emitWithAck(t,...n){return new Promise((r,i)=>{const s=(a,o)=>a?i(a):r(o);s.withError=!0,n.push(s),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...s)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...s)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:kr.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case kr.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case kr.EVENT:case kr.BINARY_EVENT:this.onevent(t);break;case kr.ACK:case kr.BINARY_ACK:this.onack(t);break;case kr.DISCONNECT:this.ondisconnect();break;case kr.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:kr.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:kr.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function vb(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}vb.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};vb.prototype.reset=function(){this.attempts=0};vb.prototype.setMin=function(e){this.ms=e};vb.prototype.setMax=function(e){this.max=e};vb.prototype.setJitter=function(e){this.jitter=e};class WL extends Js{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,K4(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new vb({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||d4t;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new J5t(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=uu(n,"open",function(){r.onopen(),t&&t()}),s=o=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",o),t?t(o):this.maybeReconnectOnOpen()},a=uu(n,"error",s);if(this._timeout!==!1){const o=this._timeout,c=this.setTimeoutFn(()=>{i(),s(new Error("timeout")),n.close()},o);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(i),this.subs.push(a),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(uu(t,"ping",this.onping.bind(this)),uu(t,"data",this.ondata.bind(this)),uu(t,"error",this.onerror.bind(this)),uu(t,"close",this.onclose.bind(this)),uu(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){G4(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new aSe(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}
1401cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const W_={};function m2(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=e4t(e,t.path||"/socket.io"),r=n.source,i=n.id,s=n.path,a=W_[i]&&s in W_[i].nsps,o=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let c;return o?c=new WL(r,t):(W_[i]||(W_[i]=new WL(r,t)),c=W_[i]),n.query&&!t.query&&(t.query=n.queryKey),c.socket(n.path,t)}Object.assign(m2,{Manager:WL,Socket:aSe,io:m2,connect:m2});const h4t=`${new URL(os.coreAiUrl).origin}/chat/admin`,Is=m2(h4t,{transports:["websocket"],reconnection:!0,reconnectionAttempts:3,timeout:1e4,autoConnect:!1});function p4t(){const{i18n:e,_:t}=Me(),n=ix(),[r,i]=b.useState(!1),[s,a]=b.useState(!1),{user:o,jwt:c}=ps(),u=Ae.useUtils(),d=b.useCallback(g=>{n.setQueryData(ml(Ae.threads.findAll),v=>{const x=v,{pages:_}=x,[w,...S]=_;return w.items.some(T=>T.id===g.id)?v:{...x,pages:[{...w,items:[g,...w.items]},...S]}})},[n]),h=b.useCallback(async g=>{await u.threads.findOne.invalidate({id:g.threadId}),n.setQueryData(ml(Ae.threads.findAll),v=>{const{threadId:x,data:_}=g;if(v&&typeof v=="object"&&"pages"in v){const S=v.pages.map(E=>({...E,items:E.items.map(T=>T.id===x?{...T,..._}:T)}));return{...v,pages:S}}return v})},[u.threads.findOne,n]),p=b.useCallback(async g=>{await Promise.all([u.threads.getPendingTakeoverRequest.invalidate({id:g}),u.threads.findOne.invalidate({id:g})])},[u.threads.getPendingTakeoverRequest,u.threads.findOne]);return b.useEffect(()=>(c&&(Is.auth={adminToken:c},Is.connect(),i(!0)),()=>{Is.connected&&Is.disconnect(),i(!1)}),[c]),b.useEffect(()=>{if(r)return Is.emit("joinAdminRoom"),()=>{Is.emit("leaveAdminRoom")}},[r]),b.useEffect(()=>{if(!o||!r)return;const g=()=>{a(!1)},v=()=>{a(!1)},x=w=>{console.error("Socket connection error:",w),a(!0)},_=w=>{rS.fromError(w).type==="unauthorized"?Re.error(e._({id:"E85OXd"})):Re.error(e._({id:"rPcf4r"})),console.error("Socket connection error:",w)};return Is.on("connect",g),Is.on("disconnect",v),Is.on("connect_error",x),Is.on("error",_),Is.on("threadUpdated",h),Is.on("newThread",d),Is.on("takeoverResolved",p),()=>{Is.off("connect",g),Is.off("disconnect",v),Is.off("connect_error",x),Is.off("error",_),Is.off("threadUpdated",h),Is.off("newThread",d),Is.off("takeoverResolved",p)}},[d,p,h,r,t,o]),{socket:Is,isConnected:r,hasConnectionFailed:s}}const m4t=`${new URL(os.coreAiUrl).origin}/chat`,ua=m2(m4t,{transports:["websocket"],reconnection:!0,reconnectionAttempts:3,timeout:1e4,autoConnect:!1}),Ore=["messages","messages.user","messages.feedback","chat.chatbotConfig","chatUser","callLogs","summary","workingMemory"],Pre=["*","chat.name","chat.chatbotConfig","messages.*","messages.metadata","messages.user","messages.feedback","callLogs.*","chatUser","summary","workingMemory","summarizedUntil"];function g4t(e,t=6e4){const{i18n:n,_:r}=Me(),{jwt:i,user:s}=ps(),[a,o]=b.useState(!1),c=ix(),[u,d]=b.useState(!1),h=b.useMemo(()=>ml(Ae.threads.findOne,{id:e,populate:Ore,fields:Pre}),[e]),p=Ae.threads.findOne.useQuery({id:e,populate:Ore,fields:Pre},{enabled:!!e,notifyOnChangeProps:"all",refetchOnMount:"always",refetchOnWindowFocus:"always",refetchInterval:t}),g=b.useCallback(async x=>{if(!ua.connected||!e)return;if(Mw(p?.data?.lastActiveAt)==="offline"){const{data:w}=await p.refetch();if(Mw(w?.lastActiveAt)==="online"&&w?.mode===wu.AI){console.warn("User is online and in AI mode, skipping message submission.");return}}const _=Amt({message:x,role:nh.Administrator,user:s??void 0});c.setQueryData(h,w=>({...w??[],messages:[...w?.messages??[],_]})),ua.emit("message",_)},[e,p,s,c,h]);return b.useEffect(()=>(i&&(ua.auth={adminToken:i},ua.connect(),o(!0)),()=>{o(!1),ua.connected&&ua.disconnect()}),[i]),b.useEffect(()=>{if(a)return ua.emit("leaveThread"),e&&p.data?.id===e&&ua.emit("joinThread",e),()=>{ua.emit("leaveThread")}},[e,a,p.data?.id]),b.useEffect(()=>{if(!e||!a)return;const x=()=>{d(!1)},_=()=>{d(!1)},w=T=>{console.error("Socket connection error:",T),d(!0)},S=T=>{const N=rS.fromError(T);N.message.toLowerCase().includes("thread not found")||N.message.toLowerCase().includes("not found")||(N.type==="unauthorized"?Re.error(n._({id:"E85OXd"})):Re.error(n._({id:"rPcf4r"})),console.error("Socket connection error:",T))},E=T=>{c.setQueryData(h,N=>({...N??[],messages:[...N?.messages??[],T]}))};return ua.on("connect",x),ua.on("disconnect",_),ua.on("error",S),ua.on("connect_error",w),ua.on("message",E),()=>
1401{ua.off("connect",x),ua.off("disconnect",_),ua.off("error",S),ua.off("connect_error",w),ua.off("message",E)}},[c,h,r,e,a]),{thread:b.useMemo(()=>{if(p.data)return{...p.data,messages:p.data.messages.sort((x,_)=>x.id.localeCompare(_.id))}},[p.data]),isLoading:p.isLoading,isError:p.isError,hasConnectionFailed:u,handleSubmit:g}}function x4t({initialPage:e=1,pageSize:t=50}={}){const{data:n,fetchNextPage:r,hasNextPage:i,isLoading:s,isFetchingNextPage:a}=C9({queryKey:ml(Ae.threads.findAll),queryFn:({pageParam:c=1})=>Cs.threads.findAll.query({orderBy:{lastUserMessageAt:"desc"},pagination:{page:c,pageSize:t},populate:["chatMessageCount"]}),getNextPageParam:c=>c.meta.page+1>c.meta.pageCount?void 0:c.meta.page+1,initialPageParam:e});return{threads:b.useMemo(()=>n?.pages.flatMap(c=>c.items)??[],[n]),hasNextPage:i,fetchNextPage:r,isLoading:s,isFetchingNextPage:a}}const v4t=b.memo(({initialThreadId:e})=>{const t=gs(),[n,r]=b.useState(e??null),{markAsRead:i,isUnread:s}=y8(),[a,o]=b.useState(!1),[c,u]=b.useState(!1),d=CGe("(min-width: 768px)"),{threads:h,isLoading:p,isFetchingNextPage:g,fetchNextPage:v,hasNextPage:x}=x4t(),_=b.useRef(h),{thread:w,handleSubmit:S,hasConnectionFailed:E,isLoading:T,isError:N}=g4t(n),{refetchUnread:A}=y8(!0),{hasConnectionFailed:k}=p4t();b.useEffect(()=>{e&&r(e)},[e]),b.useEffect(()=>{if(!n||!N)return;const P=h[0]?.id??null;r(P),t({to:"/inbox",search:P?{threadId:P}:{},replace:!0})},[N,n,h,t]),b.useEffect(()=>{h.length&&!n&&d&&r(h[0].id)},[h,n,d]);const j=b.useCallback(P=>{r(P),t({to:"/inbox",search:{threadId:P},replace:!0})},[t]),R=b.useCallback(()=>{r(null),t({to:"/inbox",search:{},replace:!0})},[t]);return b.useEffect(()=>{n&&s(n)&&i(n)},[n,i,s]),b.useEffect(()=>{_.current!==h&&(A(),_.current=h)},[_,A,h]),l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex h-screen flex-col overflow-hidden bg-white",children:[(E||k)&&l.jsx(GGe,{className:"mx-4 mt-4 shrink-0 shadow"}),l.jsxs("div",{className:"flex min-h-0 flex-1 overflow-hidden",children:[l.jsx("div",{className:$e("w-full border-r border-gray-200 md:block md:w-[180px] lg:w-[300px] xl:w-[360px]",n?"hidden md:block":"block"),children:l.jsx(d5t,{threads:h,isLoading:p,isFetchingNextPage:g,onFetchNextPage:v,activeThreadId:n,onSelectThread:j,hasNextPage:x,isUnread:s,onExportClick:()=>u(()=>!0)})}),l.jsx("div",{className:$e("w-full flex-1 overflow-hidden",n?"block":"hidden md:block"),children:l.jsx(l5t,{onSubmit:S,thread:w,isLoading:T,onToggleMetadata:()=>o(P=>!P),onBack:R})}),a&&w&&l.jsx(y5t,{thread:w,onClose:()=>o(!1)})]})]}),l.jsx(Wjt,{isOpen:c,onCloseClick:()=>u(()=>!1)})]})}),y4t=_e({threadId:B().uuid().optional()}),oSe=nr("/_fullWidthLayout/inbox/")({component:b4t,validateSearch:e=>{const t=y4t.safeParse(e);return t.success?t.data:{}}});function b4t(){const{threadId:e}=oSe.useSearch();return l.jsx(v4t,{initialThreadId:e})}const _4t={danger:{icon:E0,styles:"bg-red-50 border-red-300 text-red-800",iconStyles:"text-red-500"},warning:{icon:tE,styles:"bg-yellow-50 border-yellow-300 text-yellow-800",iconStyles:"text-yellow-500"},info:{icon:ds,styles:"bg-blue-50 border-blue-300 text-blue-800",iconStyles:"text-blue-500"},success:{icon:R4e,styles:"bg-green-50 border-green-300 text-green-800",iconStyles:"text-green-500"}};function ga({variant:e,title:t,description:n,actions:r,className:i="",children:s}){const a=_4t[e],o=a.icon;return l.jsx("div",{className:`rounded-md border p-4 ${a.styles} ${i}`,role:"alert",children:l.jsxs("div",{className:"flex items-start",children:[l.jsx(o,{className:`mr-3 size-5 shrink-0 ${a.iconStyles}`,"aria-hidden":"true"}),l.jsxs("div",{className:"flex-1",children:[l.jsx("div",{className:"font-semibold",children:t}),n&&l.jsx("div",{className:"mt-1 text-sm",children:n}),s&&l.jsx("div",{className:`mt-2 text-sm ${n?"pt-1":""}`,children:s}),r&&l.jsx("div",{className:"mt-4 flex justify-end gap-2",children:r})]})]})})}const w4t=b.memo(function({to:t,params:n,children:r,className:i,disabled:s,...a}){return l.jsx(Oe,{asChild:!0,"data-cta":"admin-action-add-new-button",variant:"primary",disabled:s,className:$e(s&&"opacity-50 cursor-not-allowed",i),...a,children:l.jsxs(ar,{to:t,params:n,children:[l.jsx(ZS,{className:"size-4"})," ",r]})})});var yD,Mre;function S4t(){if(Mre)return yD;Mre=1;var e="Expected a function",t="__lodash_hash_undefined__",n=9007199254740991,r="[object Function]",i="[object GeneratorFunction]",s="[object Symbol]",a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/,c=/^\./,u=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,d=/[\\^$.*+?()[\]{}|]/g,h=/\\(\\)?/g,p=/^\[object .+?Constructor\]$/,g=/^(?:0|[1-9]\d*)$/,v=typeof hr=="object"&&hr&&hr.Object===Object&&hr,x=typeof self=="object"&&self&&self.Object===Object&&self,_=v||x||Function("return this")();function w(Ve,ct){return Ve?.[ct]}function S(Ve){var ct=!1;if(Ve!=null&&typeof Ve.toString!="function")try{ct=!!(Ve+"")}catch{}return ct}var E=Array.prototype,T=Function.prototype,N=Object.prototype,A=_["__core-js_shared__"],k=(function(){var Ve=/[^.]+$/.exec(A&&A.keys&&A.keys.IE_PROTO||"");
1401return Ve?"Symbol(src)_1."+Ve:""})(),j=T.toString,R=N.hasOwnProperty,P=N.toString,V=RegExp("^"+j.call(R).replace(d,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),U=_.Symbol,G=E.splice,Q=De(_,"Map"),Z=De(Object,"create"),K=U?U.prototype:void 0,te=K?K.toString:void 0;function ne(Ve){var ct=-1,Gt=Ve?Ve.length:0;for(this.clear();++ct<Gt;){var Cn=Ve[ct];this.set(Cn[0],Cn[1])}}function se(){this.__data__=Z?Z(null):{}}function H(Ve){return this.has(Ve)&&delete this.__data__[Ve]}function O(Ve){var ct=this.__data__;if(Z){var Gt=ct[Ve];return Gt===t?void 0:Gt}return R.call(ct,Ve)?ct[Ve]:void 0}function L(Ve){var ct=this.__data__;return Z?ct[Ve]!==void 0:R.call(ct,Ve)}function M(Ve,ct){var Gt=this.__data__;return Gt[Ve]=Z&&ct===void 0?t:ct,this}ne.prototype.clear=se,ne.prototype.delete=H,ne.prototype.get=O,ne.prototype.has=L,ne.prototype.set=M;function q(Ve){var ct=-1,Gt=Ve?Ve.length:0;for(this.clear();++ct<Gt;){var Cn=Ve[ct];this.set(Cn[0],Cn[1])}}function X(){this.__data__=[]}function J(Ve){var ct=this.__data__,Gt=Se(ct,Ve);if(Gt<0)return!1;var Cn=ct.length-1;return Gt==Cn?ct.pop():G.call(ct,Gt,1),!0}function W(Ve){var ct=this.__data__,Gt=Se(ct,Ve);return Gt<0?void 0:ct[Gt][1]}function re(Ve){return Se(this.__data__,Ve)>-1}function ae(Ve,ct){var Gt=this.__data__,Cn=Se(Gt,Ve);return Cn<0?Gt.push([Ve,ct]):Gt[Cn][1]=ct,this}q.prototype.clear=X,q.prototype.delete=J,q.prototype.get=W,q.prototype.has=re,q.prototype.set=ae;function ce(Ve){var ct=-1,Gt=Ve?Ve.length:0;for(this.clear();++ct<Gt;){var Cn=Ve[ct];this.set(Cn[0],Cn[1])}}function Te(){this.__data__={hash:new ne,map:new(Q||q),string:new ne}}function fe(Ve){return Ne(this,Ve).delete(Ve)}function xe(Ve){return Ne(this,Ve).get(Ve)}function ke(Ve){return Ne(this,Ve).has(Ve)}function Fe(Ve,ct){return Ne(this,Ve).set(Ve,ct),this}ce.prototype.clear=Te,ce.prototype.delete=fe,ce.prototype.get=xe,ce.prototype.has=ke,ce.prototype.set=Fe;function tt(Ve,ct,Gt){var Cn=Ve[ct];(!(R.call(Ve,ct)&&Rt(Cn,Gt))||Gt===void 0&&!(ct in Ve))&&(Ve[ct]=Gt)}function Se(Ve,ct){for(var Gt=Ve.length;Gt--;)if(Rt(Ve[Gt][0],ct))return Gt;return-1}function et(Ve){if(!Tn(Ve)||Le(Ve))return!1;var ct=Wt(Ve)||S(Ve)?V:p;return ct.test(Ut(Ve))}function pt(Ve,ct,Gt,Cn){if(!Tn(Ve))return Ve;ct=me(ct,Ve)?[ct]:ue(ct);for(var Zr=-1,rn=ct.length,_n=rn-1,Hn=Ve;Hn!=null&&++Zr<rn;){var Jr=St(ct[Zr]),Nr=Gt;if(Zr!=_n){var Ns=Hn[Jr];Nr=void 0,Nr===void 0&&(Nr=Tn(Ns)?Ns:be(ct[Zr+1])?[]:{})}tt(Hn,Jr,Nr),Hn=Hn[Jr]}return Ve}function ie(Ve){if(typeof Ve=="string")return Ve;if(dt(Ve))return te?te.call(Ve):"";var ct=Ve+"";return ct=="0"&&1/Ve==-1/0?"-0":ct}function ue(Ve){return Ct(Ve)?Ve:oe(Ve)}function Ne(Ve,ct){var Gt=Ve.__data__;return we(ct)?Gt[typeof ct=="string"?"string":"hash"]:Gt.map}function De(Ve,ct){var Gt=w(Ve,ct);return et(Gt)?Gt:void 0}function be(Ve,ct){return ct=ct??n,!!ct&&(typeof Ve=="number"||g.test(Ve))&&Ve>-1&&Ve%1==0&&Ve<ct}function me(Ve,ct){if(Ct(Ve))return!1;var Gt=typeof Ve;return Gt=="number"||Gt=="symbol"||Gt=="boolean"||Ve==null||dt(Ve)?!0:o.test(Ve)||!a.test(Ve)||ct!=null&&Ve in Object(ct)}function we(Ve){var ct=typeof Ve;return ct=="string"||ct=="number"||ct=="symbol"||ct=="boolean"?Ve!=="__proto__":Ve===null}function Le(Ve){return!!k&&k in Ve}var oe=Ht(function(Ve){Ve=$t(Ve);var ct=[];return c.test(Ve)&&ct.push(""),Ve.replace(u,function(Gt,Cn,Zr,rn){ct.push(Zr?rn.replace(h,"$1"):Cn||Gt)}),ct});function St(Ve){if(typeof Ve=="string"||dt(Ve))return Ve;var ct=Ve+"";return ct=="0"&&1/Ve==-1/0?"-0":ct}function Ut(Ve){if(Ve!=null){try{return j.call(Ve)}catch{}try{return Ve+""}catch{}}return""}function Ht(Ve,ct){if(typeof Ve!="function"||ct&&typeof ct!="function")throw new TypeError(e);var Gt=function(){var Cn=arguments,Zr=ct?ct.apply(this,Cn):Cn[0],rn=Gt.cache;if(rn.has(Zr))return rn.get(Zr);var _n=Ve.apply(this,Cn);return Gt.cache=rn.set(Zr,_n),_n};return Gt.cache=new(Ht.Cache||ce),Gt}Ht.Cache=ce;function Rt(Ve,ct){return Ve===ct||Ve!==Ve&&ct!==ct}var Ct=Array.isArray;function Wt(Ve){var ct=Tn(Ve)?P.call(Ve):"";return ct==r||ct==i}function Tn(Ve){var ct=typeof Ve;return!!Ve&&(ct=="object"||ct=="function")}function Ie(Ve){return!!Ve&&typeof Ve=="object"}function dt(Ve){return typeof Ve=="symbol"||Ie(Ve)&&P.call(Ve)==s}function $t(Ve){return Ve==null?"":ie(Ve)}function Mn(Ve,ct,Gt){return Ve==null?Ve:pt(Ve,ct,Gt)}return yD=Mn,yD}var E4t=S4t();const C4t=$c(E4t);function Dre(e){return $e({"text-center":e==="center","text-left":e==="left","text-right":e==="right"})}function T4t(e,t){const[n]=t.split(":");if(!e)return`${n}:desc`;const[r,i]=e.split(":");return r!==n?`${n}:desc`:i==="desc"?`${n}:asc`:`${n}:desc`}function A4t({table:e,loading:t,onRow:n,onDoubleClick:r}){const i=b.useCallback((o,c)=>{if(o.stopPropagation(),o.target instanceof Element){let u=o.target;do{if(u?.getAttribute("data-table")==="prevent")break;if(u?.getAttribute("data-table")==="row"){n?.(o,c);break}u=u.parentElement}while(u)}},[n]),s=b.useCallback((o,c)=>{if(o.stopPropagation(),o.target instanceof Element){let u=o.target;do{if(u?.getAttribute("data-table")==="prevent")break;if(u?.getAttribute("data-table")==="row"){r?.(o,c);break}u=u.parentElement}while(u)}}
1401,[r]),{sort:a}=e.getState();return l.jsxs("div",{className:"relative",children:[l.jsx(E5,{visible:t}),l.jsxs(q9,{children:[l.jsx(Lj,{children:e.getHeaderGroups().map(o=>l.jsx(oh,{children:o.headers.map(c=>{const{columnDef:u}=c.column,{size:d,align:h,sortable:p}=u.meta??{},[g,v]=a?.split(":")??[],x=p&&p==g,_=c.isPlaceholder?null:Tre(u.header,c.getContext());return l.jsx(oo,{className:Dre(h),style:{maxWidth:d?`${d}px`:void 0},children:p?l.jsxs(ar,{"data-cta":"admin-data-table-sort-link","data-sorttable-key":p,className:"group:[sort-hover] hover:text-light-blue3 focus-visible:text-light-blue3 active:text-light-blue4 inline-flex items-center gap-2 rounded-radius underline outline-none ring-ring transition-all focus-visible:ring-2 focus-visible:ring-offset-2",preload:!1,search:w=>({...w,sort:T4t(a,p)}),children:[_,p&&l.jsx("span",{className:$e("text-muted-fg/50",x&&"text-primary"),children:x&&v==="desc"?l.jsx(q5e,{className:"size-4"}):l.jsx(Q5e,{className:"size-4"})})]}):_},c.id)})},o.id))}),l.jsx(Fj,{children:e.getRowModel().rows.map(o=>l.jsx(oh,{onClick:c=>i(c,o),onDoubleClick:r?c=>s(c,o):void 0,className:$e({"cursor-pointer":!o.original.deletedAt,"opacity-50":o.original.deletedAt}),"data-table":"row","data-testid":"data-table-row",children:o.getVisibleCells().map(c=>{const{align:u}=c.column.columnDef.meta??{};return l.jsx(Ba,{className:Dre(u),children:Tre(c.column.columnDef.cell,c.getContext())},c.id)})},o.id))})]})]})}function k4t({table:e}){const t=gs(),{i18n:n,_:r}=Me(),{pageSize:i,pageIndex:s}=e.getState().pagination,{pagination:a,hasNext:o,hasPrevious:c}=AGe(s,e.getPageCount());return l.jsxs("div",{className:"mt-5 flex flex-col items-end justify-between gap-4 sm:flex-row sm:items-center",children:[l.jsx(KLe,{size:"sm",className:"mx-0 w-auto",children:l.jsxs(XLe,{className:"flex-wrap",children:[l.jsx(tP,{children:l.jsx(eP,{asChild:!0,disabled:!c,children:l.jsxs(ar,{"data-cta":"admin-data-table-pagination-previous-link",disabled:!c,className:"flex items-center gap-1",preload:!1,search:u=>({...u,page:s,pageSize:i}),children:[l.jsx(Aj,{className:"size-4"}),n._({id:"DHhJ7s"})]})})}),a.map((u,d)=>l.jsx(tP,{children:u==="..."?l.jsx(YLe,{}):l.jsx(eP,{active:u===s+1,asChild:!0,children:l.jsx(ar,{"data-cta":"admin-data-table-pagination-page-link","data-page":u,preload:!1,search:h=>({...h,page:u,pageSize:i}),children:u})})},`${u}${d}`)),l.jsx(tP,{children:l.jsx(eP,{asChild:!0,disabled:!o,children:l.jsxs(ar,{"data-cta":"admin-data-table-pagination-next-link",disabled:!o,className:"flex items-center gap-1",preload:!1,search:u=>({...u,page:s+2,pageSize:i}),children:[n._({id:"hXzOVo"}),l.jsx(Qd,{className:"size-4"})]})})})]})}),l.jsx("div",{className:"flex items-center gap-2 text-sm text-primary",children:l.jsx("div",{className:"w-32",children:l.jsx(tr,{"data-cta":"admin-data-table-pagination-select",value:i.toString(),onValueChange:u=>{t({search:d=>({...d,page:1,pageSize:Number(u)})})},children:[10,25,50].map(u=>l.jsxs(Yt,{value:u.toString(),children:[u," ",n._({id:"BzfzPK"})]},u))})})})]})}const N4t=b.memo(function({search:t,showSearch:n,onSearchChange:r,filters:i}){const{i18n:s,_:a}=Me(),[o,c]=b.useState(t),u=Hy(o,500);b.useEffect(()=>{r?.(u)},[u,r]);const d=b.useCallback(p=>{c(p.target.value)},[]),h=b.useCallback(()=>{c(""),r?.("")},[r]);return l.jsx("div",{className:"mb-3 flex w-full flex-col justify-between gap-4 sm:flex-row sm:items-center",children:l.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:gap-4",children:[n&&l.jsxs("div",{className:"relative sm:w-72",children:[l.jsx("span",{className:"absolute left-2 top-2 z-10",children:l.jsx(Iy,{size:18})}),l.jsx(fn,{className:"pl-8",type:"text",name:"search",value:o??"",placeholder:s._({id:"A1taO8"}),onChange:d}),o&&l.jsx("button",{type:"button",onClick:h,className:"absolute right-2 top-2 z-10 transition-all hover:text-primary",children:l.jsx(pl,{size:18})})]}),i]})})}),j4t=[];function R4t(e){if(!e)return{};const[t,n]=e.split(":");return C4t({},t,n)}function I4t({columns:e,options:t,queryKey:n,onQueryFn:r,showSearch:i,refetchInterval:s,filters:a,onRow:o,onDoubleClick:c}){const u=gs(),{page:d=1,pageSize:h=10,sort:p,search:g}=Ej({strict:!1}),v=b.useCallback(E=>{typeof E=="string"&&u({search:T=>({...T,search:E===""?void 0:E,page:1})})},[u]),{data:x,isLoading:_,isFetching:w}=E9({queryKey:[...n,{pageSize:h,page:d,search:g,sort:p}],queryFn:()=>r({page:d,pageSize:h,search:g,sort:R4t(p)}),placeholderData:iae,refetchInterval:s}),S=Hjt({columns:e,data:x?.items??j4t,pageCount:x?.pageCount??0,getCoreRowModel:$jt(),manualPagination:!0,state:{sort:p,pagination:{pageIndex:d-1,pageSize:h}},...t});return l.jsxs(l.Fragment,{children:[l.jsx(N4t,{showSearch:i,search:g,onSearchChange:v,filters:a}),l.jsx(A4t,{loading:_||w,table:S,onRow:o,onDoubleClick:c}),l.jsx(k4t,{table:S})]})}const O4t=b.memo(I4t);function Px({title:e,breadcrumbs:t,createButton:n,showSearch:r=!0,actions:i,children:s,...a}){return l.jsxs(TE,{title:e,breadcrumbs:t,actions:l.jsxs(l.Fragment,{children:[i,n&&l.jsx(w4t,{to:n.to,params:n.params,children:n.label})]}),children:[s,l.jsx(O4t,{...a,showSearch:r})]})}function P4t({userId:e,organizationId:t,onRemove:n,disabled:r}){const{i18n:i,_:s}=Me(),[a,o]=b.useState(!1);return l.jsxs(l.Fragment,{children:[l.jsx(tb,{open:a,onConfirm:()=>n({userId:e,organizationId:t}),onOpenChange:o,description:i._({id:"yqvuxr"})}),l.jsx(cn,{title:i._({id:"fTXWdC"}),children:l.jsx(Oe,{"data-cta":"admin-remove-user-dialog-button",onClick:()=>o(!0),disabled:r,variant:"ghost",size:"icon-xs",outline:!0,icon:l.jsx(hOe,{className:"size-4 text-danger"})})})]})}function M4t(e){switch(e){case Jt.SuperAdmin:return"danger";case Jt.Admin:return"info";default:return"info"}}const D4t=b.memo(function({role:t}){const n=Ir();return l.jsx(En,{className:"inline-flex",variant:M4t(t),size:"sm",outline:!0,children:n.role[t]})}),F4t=b.memo(function({verified:t}){const{i18n:n,_:r}=Me();return t?l.jsx(En,{variant:"success",size:"sm",children:n._({id:"QDEWii"})}):l.jsx(En,{variant:"danger",size:"sm",children:n._({id:"tyeRsh"})})});function FU(){const{i18n:e,_:t}=Me(),{user:n}=ps(),r=Ae.useUtils(),i=Ae.users.create.useMutation({onSuccess:async()=>
1401r.users.findAll.invalidate()}),s=Ae.users.update.useMutation({onSuccess:async(c,{id:u})=>{await Promise.all([r.users.findAll.invalidate(),r.users.findOne.invalidate({id:u}),n?.id===u?r.users.me.invalidate():null])}}),a=Ae.users.delete.useMutation({onSuccess:async(c,{id:u})=>{await r.users.findAll.invalidate()}}),o=Ae.users.removeFromOrganization.useMutation({onSuccess:async(c,{userId:u,organizationId:d})=>{await r.users.findAll.invalidate(),Re.success(e._({id:"p1byWk"}),{description:e._({id:"L+iIrE"})})},onError:()=>{Re.error(e._({id:"p7QaNK"}),{description:e._({id:"kUfg4P"})})}});return{create:i,update:s,remove:a,removeFromOrganization:o}}const Pg=Jm();function L4t(e){const{i18n:t,_:n}=Me(),[r,i]=b.useState({}),{currentOrganizationId:s,user:a}=ps(),{remove:{mutateAsync:o},removeFromOrganization:{mutateAsync:c}}=FU(),{mutateAsync:u}=Ae.users.resendEmail.useMutation({onSettled:(g,v,x)=>{i(_=>({..._,[x.id]:!1}))},onSuccess:()=>{Re.success(t._({id:"h69WC6"}),{description:t._({id:"gD0XwN"})})},onError:()=>{Re.error(t._({id:"mCk5iK"}),{description:t._({id:"2IXhXR"})})}}),d=b.useCallback(g=>{i(v=>({...v,[g]:!0})),u({id:g})},[u]),h=Ae.useUtils(),p=b.useCallback(async g=>{i(v=>({...v,[g]:!0}));try{const{url:v}=await h.users.getActivationLink.fetch({id:g});await navigator.clipboard.writeText(v),Re.success(t._({id:"6V3Ea3"}),{description:t._({id:"8ztTuu"})})}catch{Re.error(t._({id:"9sj0G8"}),{description:t._({id:"YfSEar"})})}finally{i(v=>({...v,[g]:!1}))}},[h,n]);return b.useMemo(()=>[Pg.accessor(g=>g.id,{id:"id",header:t._({id:"S0kLOH"}),meta:{sortable:"id"}}),Pg.accessor(g=>yt.fullName({firstName:g.firstName||"",lastName:g.lastName||""}),{id:"name",header:t._({id:"6YtxFj"}),meta:{sortable:"name"}}),Pg.accessor(g=>g.email,{id:"email",header:t._({id:"O3oNi5"}),meta:{sortable:"email"}}),Pg.accessor(g=>g.createdAt,{id:"createdAt",header:t._({id:"d+F6q9"}),cell:g=>yt.date(g.getValue(),Zn.DateTime),meta:{sortable:"createdAt"}}),Pg.accessor(g=>g.role,{id:"role",header:t._({id:"GDvlUT"}),cell:({getValue:g,row:v})=>l.jsxs("div",{className:"flex flex-row flex-wrap gap-2 [&>*]:mb-2",children:[l.jsx(D4t,{role:g()}),v.original.isActiveOperator&&l.jsx(En,{color:"primary",size:"sm",outline:!0,children:t._({id:"Q9ghWj"})}),e===v.original.id&&l.jsx(En,{color:"warning",size:"sm",outline:!0,children:t._({id:"71zZ31"})})]}),meta:{sortable:"role"}}),Pg.accessor(g=>g.verified,{id:"verified",header:t._({id:"uAQUqI"}),cell:({getValue:g})=>l.jsx(F4t,{verified:g()}),meta:{sortable:"verified"}}),Pg.display({id:"actions",header:t._({id:"7L01XJ"}),cell:({row:g})=>l.jsxs(fC,{onDelete:a?.id===g.original.id?void 0:()=>o({id:g.original.id}),children:[!g.original.verified&&l.jsxs(l.Fragment,{children:[l.jsx(cn,{title:t._({id:"q2UEcW"}),children:l.jsx(Oe,{"data-cta":"admin-users-resend-activation-email-button",onClick:()=>d(g.original.id),loading:r[g.original.id],disabled:r[g.original.id],variant:"ghost",size:"icon-xs",outline:!0,icon:l.jsx(OIe,{className:"size-4"})})}),l.jsx(cn,{title:t._({id:"yluQAB"}),children:l.jsx(Oe,{"data-cta":"admin-users-copy-activation-link-button",onClick:()=>p(g.original.id),loading:r[g.original.id],disabled:r[g.original.id],variant:"ghost",size:"icon-xs",outline:!0,icon:l.jsx(zh,{className:"size-4"})})})]}),a?.id!==g.original.id&&l.jsx(P4t,{userId:g.original.id,organizationId:s??"",onRemove:c,disabled:r[g.original.id]})]}),meta:{align:"center"}})],[n,r,a?.id,o,d,p,c,s,e])}function z4t(e){const[t,n]=b.useState(!1),[r,i]=b.useState(null),[s,a]=b.useState(!0),{data:o,isLoading:c}=Ae.subscriptions.getActive.useQuery({organizationId:e},{enabled:!!e,refetchOnWindowFocus:!1,staleTime:300*1e3}),{data:u,isLoading:d}=Ae.users.findAll.useQuery({where:{organizations:{id:e}},pagination:{page:1,pageSize:1}},{enabled:!!e,refetchOnWindowFocus:!1,staleTime:300*1e3});return b.useEffect(()=>{if(!e||c||d){a(!0);return}const h=o,p=u?.meta.total??0;let g=null,v=!1;!h||h.tier===Pr.Free?(g=h?.maxUsers??3,v=p<g):(g=h.maxUsers??null,v=g===null?!0:p<g),i(g),n(v),a(!1)},[e,o,u,c,d]),{canAddUser:t,maxUsers:r,isLoading:s||!e}}const $4t=nr("/_baseLayout/users/")({component:B4t});function B4t(){const{i18n:e,_:t}=Me(),{user:n}=ps(),{organization:r}=Vc(),i=r?.id,{data:s}=Ae.partnerLinks.getClientRep.useQuery({organizationId:i??""},{enabled:!!i}),a=L4t(s?.attributedRepUserId),{canAddUser:o,maxUsers:c,isLoading:u}=z4t(i),d=CE(Cs.users.findAll.query),h=EE(g=>({to:"/users/$userId/edit",params:{userId:g.original.id}})),p=n?.role===Jt.SuperAdmin||o;
1401return l.jsxs(l.Fragment,{children:[!u&&!o&&l.jsxs("div",{className:"mb-4",children:[l.jsx(ja,{roles:[Jt.SuperAdmin],children:l.jsx(ga,{variant:"warning",title:e._({id:"qakKk+"}),children:l.jsx(D,{id:"8r0u2P",values:{0:c??"N/A"}})})}),l.jsx(ja,{roles:[Jt.Admin],children:l.jsx(ga,{variant:"danger",title:e._({id:"qakKk+"}),children:l.jsx(D,{id:"7mQeUv",values:{0:c??"N/A"}})})})]}),l.jsx(Px,{title:e._({id:"Sxm8rQ"}),breadcrumbs:[{label:e._({id:"Sxm8rQ"}),to:"/users"}],createButton:p?{to:"/users/create",label:e._({id:"ph79Bz"})}:void 0,columns:a,queryKey:ml(Ae.users.findAll),onQueryFn:d,onRow:h})]})}function lSe({value:e,onChange:t}){return l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Di,{id:"mine-only-toggle","data-cta":"admin-partner-mine-only-toggle",size:"sm",checked:e,onCheckedChange:t}),l.jsx(ot,{htmlFor:"mine-only-toggle",className:"cursor-pointer text-sm font-normal text-muted-fg",children:l.jsx(D,{id:"CcjKIB"})})]})}const U4t=b.memo(({billingInfo:e})=>l.jsxs("div",{className:"space-y-2 text-sm",children:[e.isCompany&&l.jsxs("div",{className:"space-y-1",children:[l.jsx("div",{className:"font-semibold",children:e.companyName}),l.jsxs("div",{children:[l.jsx(D,{id:"wzM9zi"})," ",e.registrationNumber]}),l.jsxs("div",{children:[l.jsx(D,{id:"LBj9S+"})," ",e.vatId]})]}),l.jsxs("div",{className:"space-y-1",children:[e.addressLine1&&l.jsx("div",{children:e.addressLine1}),e.addressLine2&&l.jsx("div",{children:e.addressLine2}),l.jsxs("div",{children:[e.city&&l.jsx("span",{children:e.city}),e.city&&e.postalCode&&l.jsx("span",{children:", "}),e.postalCode&&l.jsx("span",{children:e.postalCode})]})]}),e.billingEmail&&l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"font-semibold",children:l.jsx(D,{id:"TUQn8D"})}),l.jsx("p",{children:e.billingEmail})]}),e.invoiceCcEmail&&l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"font-semibold",children:l.jsx(D,{id:"5BrEEO"})}),l.jsx("p",{children:e.invoiceCcEmail})]})]})),V4t=b.memo(function(){const{i18n:t,_:n}=Me(),{user:r}=ps(),{value:i}=fs("tierConfig.disableAllInboxUnread"),{setValueQuietly:s}=hE("tierConfig.disableAiInboxUnread"),{schema:a}=oi([{name:"name",label:t._({id:"6YtxFj"}),required:!0},{name:"url",label:t._({id:"IagCbF"}),uiProps:{placeholder:t._({id:"jLXxGK"})}},{$relevant:{$when:()=>r?.role===Jt.SuperAdmin,$fields:[{name:"tierConfig.voiceBot",label:t._({id:"Clj+A0"}),type:"checkbox",uiControl:"switch",defaultValue:!1}]}},{name:"tierConfig.disableAiInboxUnread",label:t._({id:"tKR2UH"}),tooltip:t._({id:"m+x068"}),type:"checkbox",uiControl:"switch",defaultValue:!1,uiProps:{readOnly:i}},{name:"tierConfig.disableAllInboxUnread",label:t._({id:"m5cray"}),tooltip:t._({id:"/BU0Id"}),type:"checkbox",uiControl:"switch",defaultValue:!1,uiProps:{onCheckedChange:()=>{s(!i)}}},{name:"tierConfig.allowSharedData",label:t._({id:"dyBUzO"}),type:"checkbox",uiControl:"switch",defaultValue:!1}],[n,i]);return l.jsx(gn,{title:t._({id:"3dSIQs"}),children:l.jsx(Yr,{schema:a})})}),H4t=b.memo(function({label:t,day:n,workingHoursDay:r,onChange:i}){const{i18n:s,_:a}=Me(),o=!!r,c=b.useCallback(p=>{const g=new Date;g.setMinutes(0),i({[n]:p?[{from:new Date(g.setHours(9)).toISOString(),to:new Date(g.setHours(17)).toISOString()}]:!1})},[n,i]),u=b.useCallback(()=>{if(!o||!Array.isArray(r))return;const p=new Date;p.setMinutes(0),i({[n]:[...r,{from:new Date(p.setHours(9)).toISOString(),to:new Date(p.setHours(17)).toISOString()}]})},[n,o,i,r]),d=b.useCallback(p=>{if(!o||!Array.isArray(r))return;const g=Number.parseInt(p.currentTarget.dataset.index),v=[...r];v.splice(g,1),i({[n]:v.length>0?v:!1})},[n,o,i,r]),h=b.useCallback(p=>{if(!o||!Array.isArray(r))return;const g=Number.parseInt(p.currentTarget.dataset.index),[v,x]=p.currentTarget.value.split(":"),_=new Date;_.setHours(Number.parseInt(v)),_.setMinutes(Number.parseInt(x));const w=[...r];w[g]={...w[g],[p.currentTarget.name]:_.toISOString()},i({[n]:w})},[n,o,i,r]);return l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"flex h-7 min-w-0 items-center",children:l.jsx("span",{className:"truncate",children:t})}),l.jsx("div",{className:"flex h-7 items-center",children:l.jsx(Di,{checked:o,onCheckedChange:c,size:"sm"})}),l.jsxs("div",{className:"flex min-h-7 grow flex-col items-center gap-2",children:[l.jsxs("div",{className:"flex h-7 w-full items-center justify-between",children:[l.jsx("span",{children:o?s._({id:"1TNIig"}):s._({id:"D87pha"})}),o&&l.jsx(Oe,{"data-cta":"admin-working-hours-add-button",size:"icon-xs",variant:"primary",outline:!0,onClick:u,children:l.jsx(ZS,{className:"size-4"})})]}),o&&Array.isArray(r)&&r.map((p,g)=>l.jsxs("div",{className:"flex w-full items-center justify-between gap-2",children:[l.jsxs("div",{className:"flex grow flex-wrap gap-2",children:[l.jsx("div",{className:"min-w-20 grow",children:l.jsx(fn,{name:"from",type:"time",value:yt.date(p.from,Zn.InputTime),size:"sm","data-index":g,onChange:h,variant:f8(p.from,p.to)?"default":"danger"})}),l.jsx("div",{className:"min-w-20 grow",children:l.jsx(fn,{name:"to",type:"time",value:yt.date(p.to,Zn.InputTime),size:"sm","data-index":g,onChange:h,variant:f8(p.from,p.to)?"default":"danger"})})]}),l.jsx(Oe,{"data-cta":"admin-working-hours-remove-button",className:"shrink-0",size:"icon-xs",variant:"danger",outline:!0,"data-index":g,onClick:d,children:l.jsx(L4e,{className:"size-4"})})]},`${p.from}-${p.to}`))]})]})}),q4t=b.memo(function({name:t}){const{i18n:n,_:r}=Me(),{setValueQuietly:i}=hE(t),s=fs(t).value,a=b.useMemo(()=>[{day:"1",label:n._({id:"hty0d5"})},{day:"2",label:n._({id:"G3myU+"})},{day:"3",label:n._({id:"VAcXNz"})},{day:"4",label:n._({id:"kkDQ8m"})},{day:"5",label:n._({id:"39y5bn"})},{day:"6",label:n._({id:"+5kO8P"})},{day:"0",label:n._({id:"DBC3t5"})}],[r]),o=b.useCallback(u=>{i({...s,...u})},[i,s]),c=b.useCallback(u=>{const d=u;if(d){for(const h of Object.values(d))if(Array.isArray(h)){for(const p of h)if(!f8(p.from,p.to))return n._({id:"zTmRc/"})}}},[r]);return l.jsxs(gn,{title:n._({id:"zBOlTP"}),children:[l.jsx("p",{className:"text-sm",children:l.jsx(D,{id:"CeL0A1"})}),l.jsx(_h,{}),l.jsx("div",{className:"grid grid-cols-[auto_max-content_1fr] items-start gap-2",children:a.map(({day:u,label:d})=>l.jsx(H4t,{label:d,day:u,workingHoursDay:s?.[u],onChange:o},u))}),l.jsx(zo,{name:t,type:"hidden",validate:c})]})});function cSe(){const e=Ae.useUtils(),t=Ae.organizations.create.useMutation({onSuccess:async i=>{await b8({access:i.access,organizationId:i.user.currentOrganizationId,destination:`/organizations/${i.organization.id}/edit`})}}),n=Ae.organizations.update.useMutation({onSuccess:async(i,{id:s})=>{await Promise.all([...s===ir.getState().currentOrganizationId?[e.organizations.getCurrent.invali
1401date()]:[],e.organizations.findAll.invalidate(),e.organizations.findOne.invalidate({id:s}),e.chats.findOne.invalidate()])}}),r=Ae.organizations.delete.useMutation({onSuccess:async i=>{await b8({access:i.access,organizationId:i.user.currentOrganizationId,destination:"/organizations"})}});return{create:t,update:n,remove:r}}const uSe=b.memo(function({data:t}){const{i18n:n,_:r}=Me(),i=t?.currency??Ti.USD,{user:s,currentOrganizationId:a}=ps(),{create:{mutateAsync:o},remove:{mutateAsync:c},update:{mutateAsync:u}}=cSe(),{schema:d}=oi([{name:"margin",label:n._({id:"lkcAoj"}),type:"number",uiProps:{step:"0.01",min:"1"},defaultValue:5,tooltip:n._({id:"WOMbG+"}),required:!0},{name:"currency",label:n._({id:"XZGbhV"}),type:"select",defaultValue:t?.currency??Ti.CZK,options:{[Ti.USD]:"USD ($)",[Ti.CZK]:"CZK (KÄ)"},required:!0,tooltip:n._({id:"hGc7hz"})}],[r,t?.currency]),{schema:h}=oi([{name:"locale",label:n._({id:"nt2HLw"}),type:"select",defaultValue:t?.locale??yk.Cs,options:{[yk.Cs]:"ÄeÅ¡tina",[yk.En]:"English"},required:!0,tooltip:n._({id:"nQy7Gn"})}],[r,t?.locale]);if(!a)throw new Error("No current organization id");const p=t?.currentMonthlyUsage??0,g=t?.monthlyUsageLimit??0,v=t?.subscriptions.find(x=>x.status===qr.Active);return l.jsxs(Ls,{initialData:t,createSchema:LHe,updateSchema:zHe,onCreate:async x=>(await o(x)).organization,onUpdate:async x=>{const _=s?.role===Jt.SuperAdmin&&x.margin!==void 0?{margin:x.margin}:{},w={...x,..._};return u(w)},onRemove:async({id:x})=>{await c({id:x})},basePath:"/organizations",idParamName:"organizationId",deleteDescription:n._({id:"YNVkW6"}),customRedirect:"/inbox",confirmationText:t?.name,confirmationLabel:n._({id:"8faEqS"}),children:[l.jsxs(Ls.Col,{children:[l.jsx(V4t,{}),l.jsx(gn,{title:n._({id:"hZotg6"}),className:"mt-4 space-y-1",children:l.jsx(Yr,{schema:h})}),l.jsx(ja,{roles:[Jt.SuperAdmin],children:l.jsx(gn,{title:n._({id:"/xC/im"}),className:"mt-4 space-y-1",children:l.jsx(Yr,{schema:d})})})]}),l.jsx(Ls.Col,{children:l.jsx(q4t,{name:"workingHours"})}),l.jsx(Ls.Col,{children:l.jsxs(AE,{data:t,children:[l.jsx(jn,{label:n._({id:"jxSHp4"}),children:l.jsxs("span",{className:$e("inline-flex gap-1 items-baseline",p>g?"text-red-600":"text-green-600"),children:[l.jsx("span",{className:"font-semibold",children:yt.credits(p,i)}),"/",l.jsx("span",{className:"text-xs font-semibold",children:yt.credits(g,i)})]})}),l.jsx(jn,{label:n._({id:"aYs8Bs"}),children:l.jsx("span",{className:$e("font-semibold text-green-600",(t?.balance??0)>0?"text-green-600":""),children:l.jsx("span",{className:"font-semibold",children:yt.credits(t?.balance??0,i)})})}),l.jsx(jn,{label:n._({id:"/0uVkv"}),children:l.jsxs("div",{className:"flex flex-row gap-2",children:[l.jsx(poe,{}),l.jsx("span",{children:v?.maxUsers})]})}),l.jsx(jn,{label:n._({id:"NLRp7N"}),children:l.jsxs("div",{className:"flex flex-row gap-2",children:[l.jsx(Ij,{}),l.jsx("span",{children:v?.maxDocuments})]})}),l.jsx(jn,{label:n._({id:"ErhgkI"}),children:l.jsxs("div",{className:"flex flex-col items-start gap-2",children:[t?.billingInfo&&l.jsx(U4t,{billingInfo:t.billingInfo}),l.jsx(Oe,{"data-cta":"admin-organization-form-billing-info-button",variant:"secondary",size:"sm",asChild:!0,icon:l.jsx(ju,{size:16}),children:l.jsx(ar,{to:"/organizations/$organizationId/billing",params:{organizationId:a},children:t?.billingInfo?n._({id:"MXcFDc"}):n._({id:"W52TR9"})})})]})})]})})]})});function Fre({label:e,hint:t}){return l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx("h3",{className:"text-sm font-semibold",children:e}),l.jsx(cn,{title:t,delayDuration:200,children:l.jsx("button",{type:"button",className:"inline-flex text-muted-foreground hover:text-foreground","aria-label":"More information",children:l.jsx(ax,{className:"size-3.5"})})})]})}const W4t=b.memo(function({clientOrganizationId:t}){const{i18n:n,_:r}=Me(),i=Ae.useUtils(),{data:s}=Ae.organizations.findOne.useQuery({id:t}),{data:a}=Ae.partnerLinks.getForClient.useQuery({clientOrganizationId:t}),{data:o}=Ae.organizations.findAll.useQuery({pagination:{pageSize:1e3}}),[c,u]=b.useState(""),[d,h]=b.useState("");b.useEffect(()=>{u(a?.partnerOrganizationId??""),h(a?.createdByUserId??"")},[a?.partnerOrganizationId,a?.createdByUserId]);const{data:p}=Ae.partnerLinks.listHubAdmins.useQuery({partnerOrganizationId:c},{enabled:!!c}),g=Ae.organizations.update.useMutation({onSuccess:async()=>{Re.success(n._({id:"hJ9IRL"})),await i.organizations.findOne.invalidate({id:t}
1401),await i.organizations.findAll.invalidate()},onError:R=>{Re.error(n._({id:"qVomJP",values:{0:R.message}}))}}),v=Ae.partnerLinks.setClientPartner.useMutation({onSuccess:async()=>{Re.success(n._({id:"D8dh7I"})),await i.partnerLinks.getForClient.invalidate({clientOrganizationId:t})},onError:R=>{Re.error(n._({id:"FmFpGv",values:{0:R.message}}))}}),x=s?.isPartnerOrganization??!1,_=!!a?.partnerOrganizationId,w=!_||x,S=!x||_,E=(o?.items??[]).filter(R=>R.isPartnerOrganization&&R.id!==t),T=R=>{R&&_||g.mutate({id:t,isPartnerOrganization:R})},N=()=>{if(x&&c){Re.error(n._({id:"w1gUrr"}));return}v.mutate({clientOrganizationId:t,partnerOrganizationId:c||null,createdByUserId:d||null})},A=R=>{const P=[R.firstName,R.lastName].filter(Boolean).join(" ");return P&&R.email?`${P} (${R.email})`:P||R.email||n._({id:"jiFxYd"})},k=()=>{v.mutate({clientOrganizationId:t,partnerOrganizationId:null})},j=(a?.partnerOrganizationId??"")!==c||(a?.createdByUserId??"")!==d;return l.jsx(gn,{title:l.jsx(D,{id:"71zZ31"}),children:l.jsxs("div",{className:"flex flex-col gap-6",children:[w&&l.jsxs("section",{className:"flex flex-col gap-3",children:[l.jsx(Fre,{label:l.jsx(D,{id:"ob20th"}),hint:n._({id:"n0hRjh"})}),l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx(Di,{id:"partner-hub-switch",checked:x,onCheckedChange:T,disabled:g.isPending||_}),l.jsx(ot,{htmlFor:"partner-hub-switch",className:"text-sm text-muted-fg",children:l.jsx(D,{id:"X4LIyH"})})]})]}),S&&l.jsxs("section",{className:`flex flex-col gap-3 ${w?"border-t pt-6":""}`,children:[l.jsx(Fre,{label:l.jsx(D,{id:"RcnYBV"}),hint:n._({id:"2ZSqPt"})}),l.jsx("p",{className:"text-sm text-muted-fg",children:l.jsx(D,{id:"ecp+I0"})}),l.jsxs("div",{className:"flex flex-col gap-1",children:[l.jsx(ot,{className:"text-sm font-medium",children:l.jsx(D,{id:"ob20th"})}),l.jsxs("select",{"data-cta":"admin-organization-managed-by-partner-select",className:"h-9 max-w-xs rounded-radius border border-border bg-background px-3 text-sm",value:c,onChange:R=>{u(R.target.value),h("")},disabled:v.isPending,children:[l.jsx("option",{value:"",children:n._({id:"dIvRNA"})}),E.map(R=>l.jsx("option",{value:R.id,children:R.name},R.id))]})]}),c&&l.jsxs("div",{className:"flex flex-col gap-1",children:[l.jsx(ot,{className:"text-sm font-medium",children:l.jsx(D,{id:"m82THv"})}),l.jsxs("select",{"data-cta":"admin-organization-attributed-rep-select",className:"h-9 max-w-xs rounded-radius border border-border bg-background px-3 text-sm",value:d,onChange:R=>h(R.target.value),disabled:v.isPending,children:[l.jsx("option",{value:"",children:n._({id:"rZKqKn"})}),(p??[]).map(R=>l.jsx("option",{value:R.id,children:A(R)},R.id))]}),l.jsx("p",{className:"text-xs text-muted-fg",children:l.jsx(D,{id:"ggLeho"})})]}),l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx(Oe,{variant:"primary",size:"sm",onClick:N,disabled:!j||v.isPending,children:l.jsx(D,{id:"tfDRzk"})}),a&&l.jsx(Oe,{variant:"secondary",size:"sm",onClick:k,disabled:v.isPending,children:l.jsx(D,{id:"484LKL"})})]})]})]})})}),Fv=Jm();function G4t({organizationId:e}){const{i18n:t,_:n}=Me(),{data:r}=Ae.subscriptions.listInvoices.useQuery({organizationId:e,statuses:["open","draft"]},{staleTime:6e4,refetchOnWindowFocus:!1,retry:1});return(r?.length??0)>0?l.jsx(T0,{title:t._({id:"no9ON0"}),children:l.jsx("span",{className:"inline-flex text-amber-500",children:l.jsx(S0,{className:"size-3.5","aria-hidden":"true"})})}):null}function K4t(){const{i18n:e,_:t}=Me(),{user:n}=ps(),{remove:{mutateAsync:r}}=cSe(),i=rpe(),s=n?.role===Jt.SuperAdmin,a=wE(n);return b.useMemo(()=>[Fv.accessor(o=>o.id,{id:"id",header:e._({id:"S0kLOH"})}),Fv.accessor(o=>o.name,{id:"name",header:e._({id:"6YtxFj"}),meta:{sortable:"createdAt"}}),Fv.accessor(o=>o.createdAt,{id:"createdAt",header:e._({id:"d+F6q9"}),cell:o=>yt.date(o.getValue(),Zn.DateTime),meta:{sortable:"createdAt"}}),Fv.accessor(o=>o.monthlyUsageLimit,{id:"monthlyUsage",header:e._({id:"YGR4dd"}),cell:({row:o})=>{const c=o.original.currentMonthlyUsage??0,u=o.original.monthlyUsageLimit??0,d=o.original.currency??Ti.USD;return u?l.jsxs("span",{className:$e("inline-flex gap-1 items-baseline",c>u?"text-red-600":"text-green-600"),children:[l.jsx("span",{className:"font-semibold",children:yt.credits(c,d)}),"/",l.jsx("span",{className:"text-xs font-semibold",children:yt.credits(u,d)})]}):l.jsx("span",{className:"font-semibold",children:yt.credits(c,d)})},meta:{align:"right",sortable:"currentMonthlyUsage"}}),Fv.accessor(o=>o.balance,{id:"balance",header:e._({id:"aYs8Bs"}),cell:({row:o})=>{const c=o.original.balance??0,u=o.original.currency??Ti.USD,d=s||a&&!o.original.isPartnerOrganization;return l.jsxs("span",{className:"inline-flex items-center gap-1",children:[l.jsx("span",{className:$e("font-semibold",c>0?"text-green-600":""),children:yt.credits(c,u)}),d&&l.jsx(G4t,{organizationId:o.original.id})]})},meta:{align:"right",sortable:"balance"}}),Fv.display({id:"actions",header:e._({id:"7L01XJ"}),cell:({row:o})=>l.jsx(fC,{onDelete:()=>r({id:o.original.id}),deleteDescription:e._({id:"YNVkW6"}
1401),confirmationText:o.original.name,confirmationLabel:e._({id:"8faEqS"}),children:l.jsx(T0,{title:e._({id:"vM8qti"}),children:l.jsx(Oe,{"data-cta":"admin-organizations-switch-to-organization-button",size:"icon-xs",variant:"ghost",className:"text-blue-500",outline:!0,onClick:()=>i(o.original.id),children:l.jsx(CIe,{className:"size-4"})})})}),meta:{align:"center"}})],[r,i,t,s,a])}function Fh(e){return e===ir.getState().currentOrganizationId?gc.organizations.getCurrent.invalidate():Promise.resolve()}function Lv(e){return t=>{const n=t.message??"Unknown error";Re.error(`${e}: ${n}`)}}function Y4(e){const t=Ae.useUtils(),{i18n:n,_:r}=Me(),i=Lv(n._({id:"MmQOlJ"})),s=Lv(n._({id:"7O1OBC"})),a=Lv(n._({id:"SdgAIW"})),o=Lv(n._({id:"L3CxdS"})),c=Lv(n._({id:"Louz/n"})),u=Lv(n._({id:"PMl4Qr"})),d=Ae.subscriptions.createCheckout.useMutation({onError:i}),h=Ae.subscriptions.update.useMutation({onSuccess:async k=>{k.billingPortalUrl?(Re.info(n._({id:"ciTbaE"}),{description:n._({id:"7bAANT"}),duration:5e3}),window.location.href=k.billingPortalUrl):(Re.success(n._({id:"CBy2BW"})),await t.subscriptions.getActive.invalidate({organizationId:e}),await t.organizations.findOne.invalidate({id:e}),await Fh(e))},onError:s}),p=Ae.subscriptions.cancel.useMutation({onSuccess:async()=>{Re.success(n._({id:"MGmtfg"})),await t.subscriptions.getActive.invalidate({organizationId:e})},onError:a}),g=Ae.subscriptions.createBillingPortal.useMutation({onError:o}),v=Ae.subscriptions.topUpBalance.useMutation({onError:c}),x=Ae.subscriptions.changeCurrencyAndPlan.useMutation({onSuccess:async()=>{Re.success(n._({id:"bibVUm"})),await t.organizations.findOne.invalidate({id:e}),await Fh(e),await t.subscriptions.getActive.invalidate({organizationId:e}),await t.subscriptions.getTierDetails.invalidate()},onError:u});return{isLoading:[d,h,p,g,v,x].some(k=>k.isPending),subscribe:async k=>await d.mutateAsync({organizationId:e,...k})||{url:null},updateSubscription:async k=>h.mutateAsync({organizationId:e,...k}),createBillingPortal:async k=>g.mutateAsync({organizationId:e,...k}),cancelSubscription:async()=>p.mutateAsync({organizationId:e,atPeriodEnd:!0}),topUpBalance:async k=>{const j=window.location.href,R=window.location.href;return await v.mutateAsync({organizationId:e,amount:k,successUrl:j,cancelUrl:R})||{url:void 0}},changeBillingCurrencyForFreeTier:async k=>x.mutateAsync({organizationId:e,targetCurrency:k,targetTier:Pr.Free,targetBillingInterval:Ci.Month})}}function Y4t({isOpen:e,onClose:t,organizationId:n,currentCurrency:r,currentTier:i,currentInterval:s,onSuccess:a}){const{i18n:o,_:c}=Me(),u=Ae.useUtils(),[d,h]=b.useState(()=>r===Ti.USD?Ti.CZK:Ti.USD),[p,g]=b.useState(i||""),[v,x]=b.useState(s||Ci.Month),[_,w]=b.useState(!1),{data:S,isLoading:E}=Ae.subscriptions.getActive.useQuery({organizationId:n},{enabled:e,staleTime:300*1e3,refetchOnWindowFocus:!0}),T=S?.tier??i??Pr.Free,N=S?.billingInterval??s??Ci.Month,{data:A,isLoading:k}=Ae.subscriptions.getTierDetails.useQuery(void 0,{enabled:e}),j=Ae.subscriptions.changeCurrencyAndPlan.useMutation({onSuccess:()=>{Re.success(o._({id:"/4A9lF",values:{0:_?" and plan":""}})),u.organizations.findOne.invalidate({id:n}),Fh(n),u.subscriptions.getActive.invalidate({organizationId:n}),u.subscriptions.getTierDetails.invalidate(),a(),t()},onError:V=>{Re.error(o._({id:"CTT1mf",values:{0:_?" and plan":"",1:V.message}})),console.error("Super Admin Change Currency/Plan Error:",V)}});b.useEffect(()=>{!_&&S?(g(S.tier??Pr.Free),x(S.billingInterval||Ci.Month)):_&&g(""),!e&&!_&&(g(i||""),x(s||Ci.Month))},[S,_,e,i,s]);const R=()=>{if(!d){Re.warning(o._({id:"hWxHtj"}));return}if(_&&!p){Re.warning(o._({id:"9qX2iK"}));return}let V,U;_&&p?(V=p,U=v):(V=S?.tier??Pr.Free,U=S?.billingInterval||Ci.Month),j.mutate({organizationId:n,targetCurrency:d,targetTier:V,targetBillingInterval:U})},P=A?.filter(V=>V.id!==Pr.Enterprise)||[];return l.jsx(ui,{open:e,onOpenChange:t,children:l.jsxs(Fi,{className:"md:max-w-lg",children:[l.jsxs(ks,{children:[l.jsx(Wi,{children:l.jsx(D,{id:"OrFyn8"})}),l.jsx(no,{className:"mt-2",children:l.jsx(D,{id:"vuLIx6",values:{effectiveCurrentTier:T,effectiveCurrentInterval:N,0:r.toUpperCase()},components:{0:l.jsx("br",{}),1:l.jsx("strong",{}),2:l.jsx("br",{}),3:l.jsx("strong",{})}})})]}),l.jsxs("div",{className:"space-y-4 py-4",children:[l.jsxs("div",{children:[l.jsx(ot,{htmlFor:"target-currency",children:l.jsx(D,{id:"sZaLKJ"})}),l.jsx(tr,{id:"target-currency",value:d,onValueChange:V=>h(V),placeholder:o._({id:"gFaUmm"}),children:Object.values(Ti).map(V=>l.jsx(Yt,{value:V,disabled:V===r,children:V.toUpperCase()},V))})]}),l.jsxs("div",{className:"flex items-center space-x-2 pt-2",children:[l.jsx("input",{type:"checkbox",id:"change-plan-too",checked:_,onChange:V=>w(V.target.checked),className:"size-4 rounded border-gray-300 text-primary focus:ring-primary"}),l.jsx("label",{htmlFor:"change-plan-too",className:"text-sm",children:l.jsx(D,{id:"URH9uI"})})]}),!_&&S&&l.jsx("p",{className:"text-xs text-gray-500",children:l.jsx(D,{id:"6/qJqe",values:{0:S.tier,1:S.billingInterval||Ci.Month,2:d||"the new currency"},components:{0:l.jsx("strong",{}),1:l.jsx("strong",{})}})}),_&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{children:[l.jsx(ot,{htmlFor:"target-tier",children:l.jsx(D,{id:"9m+Hdg"})}),l.jsx(tr,{id:"target-tier",value:p,onValueChange:V=>g(V),placeholder:o._({id:"t8LvV3"}),disabled:E||k||!_,children:k||E?l.jsx(Yt,{value:"loading",disabled:!0,children:o._({id:"7KFdSi"})}):P.map(V=>l.jsx(Yt,{value:V.id,disabled:V.id===Pr.Free&&T!==Pr.Free||!_,children:V.name},V.id))})]}),p&&p!==Pr.Free&&l.jsxs("div",{children:[l.jsx(ot,{htmlFor:"target-interval",children:l.jsx(D,{id:"ECi8cu"})}),l.jsx(tr,{id:"target-interval",value:v,onValueChange:V=>x(V),placeholder:o._({id:"ldTIRN"}),disabled:E||!_,children:l.jsx(Yt,{value:Ci.Month,children:o._({id:"+8Nek/"})})})]})]}),l.jsx("p",{className:"pt-2 text-xs text-gray-500",children:l.jsx(D,{id:"vVaMSE",values:{0:_&&p?` The organization will be moved to ${p} and billed in ${d||"new currency"}.`:""},components:{0:l.jsx("strong",{})}})})]}),l.jsxs(wi,{children:[l.jsx(Oe,{"data-cta":"admin-change-currency-and-plan-cancel-button",variant:"ghost",onClick:t,disabled:j.isPending,children:l.jsx(D,{id:"dEgA5A"})}),l.jsx(Oe,{"data-cta":"admin-change-currency-and-plan-confirm-button",onClick:R,disabled:j.isPending||!d||_&&!p||E,loading:j.isPending||E,children:l.jsx(D,{id:"0iRzZy"})})]})]})})}function X4t({isOpen:e,onClose:t,currentTier:n,selectedTier:r,organizationId:i,onSubscriptionUpdate:s,selectedInterval:a}){const{i18n:o,_:c}=Me(),u=gs(),d=Ae.useUtils(),{isLoading:h,updateSubscription:p,cancelSubscription:g,subscribe:v}=Y4(i),[x,_]=b.useState(!1),[w,S]=b.useState("idle"),E=async()=>
1401{if(r){if(r!==Pr.Free)try{_(!0),S("processing");const A=await d.billingInfo.getBillingInfo.fetch({organizationId:i});let k=!1;if(A&&(A.isCompany?A.companyName&&A.addressLine1&&(k=!0):A.addressLine1&&(k=!0)),!k){Re.info(o._({id:"eZVDCw"})),u({to:"/organizations/$organizationId/billing",params:{organizationId:i},search:{redirect:window.location.pathname+window.location.search,tier:r,interval:a}}),t(),_(!1),S("idle");return}}catch(A){console.error("Failed to fetch billing information:",A),Re.error(o._({id:"IwRmAf"})),_(!1),S("idle"),t();return}try{if(r===Pr.Free)await g(),Re.success(o._({id:"4uSVUb"})),s(),t();else if(n===Pr.Free){_(!0),S("processing");const A=`${window.location.origin}${window.location.pathname}?success=true`,k=`${window.location.origin}${window.location.pathname}?canceled=true`,j=await v({tier:r,billingInterval:a,successUrl:A,cancelUrl:k});j.url?(S("redirecting"),window.location.href=j.url):(Re.error(o._({id:"z8a29T"})),_(!1),S("idle"),t())}else _(!0),S("processing"),(await p({tier:r,billingInterval:a})).billingPortalUrl?S("redirecting"):(Re.success(o._({id:"CBy2BW"})),s(),t())}catch(A){console.error("Failed to change subscription:",A);const k=typeof A=="object"&&A!==null&&"message"in A?String(A.message):"";Re.error(k||o._({id:"jZmOYT"})),_(!1),S("idle"),!k.includes("checkout")&&!k.includes("StripePaymentAuthenticationRequiredError")&&t()}}};if(!r)return null;const T=r===Pr.Free,N=h||x;return l.jsx(ui,{open:e,onOpenChange:A=>{!A&&w==="idle"&&t()},children:l.jsxs(Fi,{children:[l.jsxs(ks,{children:[l.jsx(Wi,{children:T?l.jsx(D,{id:"CyN0x0"}):l.jsx(D,{id:"gKI9jH"})}),l.jsx(no,{children:w==="redirecting"?l.jsx(D,{id:"/oYfEG"}):w==="processing"?l.jsx(D,{id:"qe+esI"}):T?l.jsx(D,{id:"yUeJXy",values:{currentTier:n}}):l.jsx(D,{id:"Jtr29Q",values:{currentTier:n,selectedTier:r},components:{0:l.jsx("br",{}),1:l.jsx("strong",{}),2:l.jsx("br",{}),3:l.jsx("strong",{}),4:l.jsx("br",{}),5:l.jsx("strong",{}),6:l.jsx("br",{})}})})]}),l.jsxs(wi,{children:[l.jsx(Oe,{"data-cta":"admin-change-plan-cancel-button",variant:"secondary",onClick:t,disabled:N,className:w==="idle"?"":"hidden",children:l.jsx(D,{id:"dEgA5A"})}),l.jsxs(Oe,{"data-cta":"admin-change-plan-confirm-button",onClick:E,disabled:N,className:w==="idle"?"":"hidden",children:[N&&w==="processing"&&l.jsx(Kr,{className:"mr-2 size-4 animate-spin"}),T?l.jsx(D,{id:"dOaDse"}):l.jsx(D,{id:"q8upsf"})]}),w!=="idle"&&l.jsxs("div",{className:"flex w-full items-center justify-center",children:[l.jsx(Kr,{className:"mr-2 size-6 animate-spin"}),l.jsx("span",{children:w==="redirecting"?l.jsx(D,{id:"paZIUv"}):l.jsx(D,{id:"k1ifdL"})})]})]})]})})}function Q4t({organization:e,activeSubscription:t,onUpdate:n}){const{i18n:r,_:i}=Me(),s=e.currency??Ti.USD,[a,o]=b.useState(s),[c,u]=b.useState(!1),[d,h]=b.useState(!1),[p,g]=b.useState(null),[v,x]=b.useState(Ci.Month),{data:_,isLoading:w,isError:S,error:E}=Ae.subscriptions.getTierDetails.useQuery(void 0,{staleTime:1/0}),{isLoading:T}=Y4(e.id);b.useEffect(()=>{o(s)},[s]),b.useEffect(()=>{x(t&&t.billingInterval||Ci.Month)},[t]),b.useEffect(()=>{S&&E&&(console.error("Failed to load tier details:",E),Re.error(r._({id:"Dn29IZ"})))},[S,E,i]);const N=_,A=j=>{g(j);const R=_?.find(P=>P.id===j);if(R){const P=R.prices.some(U=>U.interval===Ci.Month&&U.currency===s),V=R.prices.some(U=>U.interval===Ci.Year&&U.currency===s);P&&!V?x(Ci.Month):!P&&V&&x(Ci.Year)}u(!0)};if(w||T)return l.jsx("div",{className:"p-4 text-center",children:l.jsx(D,{id:"1G1pbp"})});const k=!t||t.tier===Pr.Free;return l.jsxs("div",{className:"space-y-6 pb-8",children:[l.jsxs("div",{className:"space-y-4",children:[l.jsx("h3",{className:"text-xl font-semibold",children:l.jsx(D,{id:"qnLghL"})}),w?l.jsx("div",{className:"p-4 text-center",children:l.jsx(D,{id:"7KFdSi"})}):l.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 xl:grid-cols-3",children:[N?.filter(j=>j.id!==Pr.Enterprise).map(j=>{const R=t?.tier||Pr.Free;if(j.id===Pr.Free&&R!==Pr.Free)return null;const P=j.id===R,V=k?a:s,U=j.prices.find(Q=>Q.interval===Ci.Month&&Q.currency===V),G=j.prices.find(Q=>Q.interval===Ci.Year&&Q.currency===V);
1401return l.jsxs(gn,{title:j.name,collapsible:!1,className:`flex h-full flex-col ${P?"border-primary ring-2 ring-primary":""}`,children:[l.jsxs("div",{className:"min-h-[230px] grow",children:[l.jsxs("div",{className:"mb-4 flex items-baseline gap-1",children:[l.jsx("span",{className:"text-3xl font-bold",children:j.id===Pr.Free?r._({id:"2POOFK"}):U?yt.currency(U.amount,V):r._({id:"fj5byd"})}),j.id!==Pr.Free&&U&&l.jsxs("span",{className:"text-sm text-gray-500",children:["/ ",r._({id:"pTc/Cy"})]})]}),j.id!==Pr.Free&&G&&l.jsxs("div",{className:"-mt-3 mb-4 text-sm text-gray-500",children:[U?r._({id:"9vT1i8"}):"",yt.currency(G.amount,V)," ","/ ",r._({id:"crrqaX"})]}),l.jsxs("div",{className:"mb-6 space-y-2",children:[j.id!==Pr.Free&&j.colleaguesSubstitute!=null&&j.colleaguesSubstitute!==0&&l.jsxs("p",{className:"flex items-center text-sm",children:[l.jsx(Es,{className:"mr-2 size-4 shrink-0 text-primary"}),l.jsx("span",{children:typeof j.colleaguesSubstitute=="number"?l.jsxs(l.Fragment,{children:[l.jsx(D,{id:"SnIvHU",values:{0:j.colleaguesSubstitute}})," ",l.jsxs("span",{className:"text-gray-500",children:["(",j.colleaguesSubstitute<1?r._({id:"mB0jR9"}):r._({id:"BLtIb8"}),")"]})]}):l.jsx(D,{id:"Fu4SJL",values:{0:j.colleaguesSubstitute}})})]},"colleagues-substitute"),j.id!==Pr.Free&&typeof j.maxConversations=="number"&&j.maxConversations>0&&l.jsxs(l.Fragment,{children:[l.jsxs("p",{className:"flex items-center text-sm",children:[l.jsx(Es,{className:"mr-2 size-4 shrink-0 text-primary"}),l.jsx("span",{children:l.jsx(D,{id:"L8dhPy",values:{0:j.maxConversations}})})]},"max-conversations"),l.jsxs("p",{className:"flex items-center text-sm",children:[l.jsx(Es,{className:"mr-2 size-4 shrink-0 text-primary"}),l.jsx("span",{children:l.jsx(D,{id:"I4X53I",values:{0:j.maxConversations*3}})})]},"ai-messages")]}),j.id!==Pr.Free&&typeof j.maxDocuments=="number"&&j.maxDocuments>0&&l.jsxs("p",{className:"flex items-center text-sm",children:[l.jsx(Es,{className:"mr-2 size-4 shrink-0 text-primary"}),l.jsx("span",{children:l.jsx(D,{id:"o2PbW5",values:{0:j.maxDocuments}})})]},"max-docs"),j.id!==Pr.Free&&j.maxPages!=null&&j.maxPages!==0&&l.jsxs("p",{className:"flex items-center text-sm",children:[l.jsx(Es,{className:"mr-2 size-4 shrink-0 text-primary"}),l.jsx("span",{children:l.jsx(D,{id:"RUOC0j",values:{0:j.maxPages}})})]},"max-pages"),j.features?.map(Q=>l.jsxs("p",{className:"flex items-center text-sm",children:[l.jsx(Es,{className:"mr-2 size-4 shrink-0 text-primary"}),l.jsx("span",{children:Q})]},Q))]})]}),l.jsx("div",{className:"mt-auto",children:P?l.jsx("p",{className:"text-center text-lg text-primary",children:l.jsx(D,{id:"wciURf"})}):l.jsx(Oe,{"data-cta":"admin-subscription-manager-change-plan-button",className:"mt-auto w-full",variant:P?"secondary":"primary",onClick:()=>{P||A(j.id)},disabled:P||w,icon:P?void 0:l.jsx(Qae,{className:"ml-2 size-4"}),children:l.jsx(D,{id:"wRtBJP"})})})]},j.id)}),l.jsx(gn,{title:l.jsx(D,{id:"GpB8YV"}),collapsible:!1,className:"relative flex h-full flex-col",children:l.jsxs("div",{className:"justify-between",children:[l.jsxs("div",{children:[l.jsx("p",{className:"mb-4 text-sm",children:l.jsx(D,{id:"Ogl5g9"})}),l.jsxs("ul",{className:"mb-6 list-inside list-disc space-y-1 text-sm",children:[l.jsx("li",{children:l.jsx(D,{id:"PCHnJJ"})}),l.jsx("li",{children:l.jsx(D,{id:"ezcS5k"})}),l.jsx("li",{children:l.jsx(D,{id:"pNxCXv"})}),l.jsx("li",{children:l.jsx(D,{id:"OsSNz6"})})]})]}),l.jsx(Oe,{"data-cta":"admin-subscription-manager-contact-us-button",className:"mt-auto w-full",variant:"secondary",onClick:()=>{window.open("https://app.reclaim.ai/m/kanbu-team/demo-kanbu","_blank")},children:l.jsx(D,{id:"LUN4Zq"})})]})},"enterprise-static")]})]}),p&&l.jsx(X4t,{isOpen:c,onClose:()=>u(!1),currentTier:t?.tier||Pr.Free,selectedTier:p,organizationId:e.id,onSubscriptionUpdate:()=>{u(!1),n&&n()},selectedInterval:v}),l.jsx(ja,{roles:[Jt.SuperAdmin],children:t&&l.jsx(Y4t,{isOpen:d,onClose:()=>h(!1),organizationId:e.id,currentCurrency:s,currentTier:t.tier??void 0,currentInterval:t.billingInterval??void 0,onSuccess:()=>{h(!1),n&&n()}})})]})}const Z4t=b.memo(function({organizationId:t,currentSubscription:n}){const{i18n:r,_:i}=Me(),s=n?.tier!==Pr.Free,a=Ae.subscriptions.updateSubscriptionLimits.useMutation({onSuccess:()=>{Re.success(r._({id:"zzDlyQ"}),{description:r._({id:"0IPAdU"})}),gc.organizations.findOne.invalidate({id:t})},onError:c=>{Re.error(r._({id:"SlfejT"}),{description:c.message||r._({id:"uNPWEA"})})}}),o=({values:c})=>a.mutate({organizationId:t,...c});return l.jsxs(gn,{title:l.jsx(D,{id:"7+4OHB"}),children:[s&&l.jsxs("div",{className:"flex flex-row gap-3 rounded-md border-2 border-secondary bg-slate-100 p-5",children:[l.jsx(S0,{className:"text-secondary"}),l.jsx("span",{className:"text-sm text-muted-fg",children:l.jsx(D,{id:"7edEgH",values:{0:n.tier}})})]}),l.jsx("p",{className:"text-sm text-muted-fg",children:l.jsx(D,{id:"4lOoQH"})}),l.jsx(S5,{onSubmit:o,initialValues:n,children:l.jsxs("div",{className:"flex flex-col gap-4",children:[l.jsx(zo,{disabled:s,type:"number",label:r._({i
1401d:"bIUV28"}),min:1,name:"maxUsers"}),l.jsx(zo,{disabled:s,type:"number",label:r._({id:"gSpo5S"}),min:0,name:"maxDocuments"}),l.jsx(Oe,{"data-cta":"admin-override-limits-submit-button",disabled:s,type:"submit",variant:"danger",children:l.jsx(D,{id:"7+4OHB"})})]})})]})});function J4t({organizationId:e,currency:t}){const{i18n:n,_:r}=Me(),i=Ir(),{data:s,isLoading:a,error:o}=Ae.organizations.usageReport.useQuery({id:e});return a?l.jsx("div",{className:"mt-4 p-4",children:"Loading usage report..."}):o?l.jsxs("div",{className:"mt-4 p-4 text-danger",children:["Failed to load usage report: ",o.message]}):s?l.jsxs(ja,{roles:[Jt.SuperAdmin],children:[s.unpricedCount>0&&l.jsx("div",{className:"mb-4 rounded-lg border border-amber-500/40 bg-amber-500/10 p-3 text-sm text-amber-800 dark:text-amber-200",children:n._({id:"8WSRyv",values:{0:s.unpricedCount}})}),s.months.map(c=>l.jsx(gn,{className:"mb-4",children:l.jsxs("div",{className:"p-2",children:[l.jsxs("h3",{className:"mb-4 flex items-center justify-between",children:[l.jsx("span",{className:"text-xl font-bold text-foreground",children:new Date(c.month).toLocaleDateString("en-US",{year:"numeric",month:"long"})}),l.jsx("span",{className:"text-xl font-bold text-emerald-600",children:yt.credits(c.totalCost,t)})]}),c.byCategory.map(u=>l.jsxs("div",{className:"mb-4 last:mb-0",children:[l.jsxs("h4",{className:"mb-3 flex items-center justify-between",children:[l.jsx("span",{className:"text-lg font-semibold text-foreground/90",children:i.recordCategory[u.category]}),l.jsx("span",{className:"text-base font-semibold text-emerald-600/90",children:yt.credits(u.totalCost,t)})]}),u.byType.map(d=>l.jsxs("div",{className:"mb-3 last:mb-2",children:[l.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[l.jsx("span",{className:"text-sm font-medium text-foreground/80",children:d.type}),l.jsx("span",{className:"text-sm font-medium text-emerald-600/80",children:yt.credits(d.totalCost,t)})]}),l.jsx("div",{className:"rounded-lg backdrop-blur-sm",children:l.jsxs(q9,{children:[l.jsx(Lj,{children:l.jsxs(oh,{className:"border-b border-border/50 hover:bg-transparent",children:[l.jsx(oo,{className:"w-[140px] text-xs font-medium text-muted-fg",children:n._({id:"aemBRq"})}),l.jsx(oo,{className:"w-[140px] text-xs font-medium text-muted-fg",children:n._({id:"scu3wk"})}),l.jsx(oo,{className:"text-right text-xs font-medium text-muted-fg",children:n._({id:"B1MDds"})}),d.type===fw.Llm&&l.jsxs(l.Fragment,{children:[l.jsx(oo,{className:"text-right text-xs font-medium text-muted-fg",children:n._({id:"cjbZw+"})}),l.jsx(oo,{className:"text-right text-xs font-medium text-muted-fg",children:n._({id:"i1+tKD"})}),l.jsx(oo,{className:"text-right text-xs font-medium text-muted-fg",children:n._({id:"roD6jG"})}),l.jsx(oo,{className:"text-right text-xs font-medium text-muted-fg",children:n._({id:"aNp2eQ"})}),l.jsx(oo,{className:"text-right text-xs font-medium text-muted-fg",children:n._({id:"J7aOlM"})})]}),d.type!==fw.Llm&&l.jsx(oo,{className:"text-right text-xs font-medium text-muted-fg",children:n._({id:"QrhaVg"})}),l.jsx(oo,{className:"w-[120px] text-right text-xs font-medium text-muted-fg",children:n._({id:"hg5QeV"})})]})}),l.jsx(Fj,{children:d.byModel.map((h,p)=>l.jsxs(oh,{className:"transition-colors hover:bg-muted/30",children:[l.jsx(Ba,{className:"text-sm font-medium text-foreground/90",children:h.provider}),l.jsx(Ba,{className:"font-mono text-xs text-foreground/80",children:h.model}),l.jsx(Ba,{className:"text-right text-sm tabular-nums text-foreground/80",children:yt.number(h.count)}
1401),d.type===fw.Llm&&l.jsxs(l.Fragment,{children:[l.jsx(Ba,{className:"text-right text-sm tabular-nums text-foreground/80",children:yt.number(h.inputTokens||0)}),l.jsx(Ba,{className:"text-right text-sm tabular-nums text-foreground/80",children:yt.number(h.outputTokens||0)}),l.jsx(Ba,{className:"text-right text-sm tabular-nums text-foreground/80",children:yt.number((h.inputTokens||0)+(h.outputTokens||0))}),l.jsx(Ba,{className:"text-right text-sm tabular-nums text-emerald-600/80 dark:text-emerald-400/80",children:yt.credits(h.inputCost||0,t)}),l.jsx(Ba,{className:"text-right text-sm tabular-nums text-emerald-600/80 dark:text-emerald-400/80",children:yt.credits(h.outputCost||0,t)})]}),d.type!==fw.Llm&&l.jsx(Ba,{className:"text-right text-sm tabular-nums text-foreground/80",children:yt.number(h.totalUnits)}),l.jsx(Ba,{className:"text-right text-sm font-semibold tabular-nums text-emerald-600 dark:text-emerald-400",children:yt.credits(h.totalCost,t)})]},`${h.provider}-${h.model}-${p}`))})]})})]},d.type))]},u.category)),l.jsxs("div",{className:"mt-4 flex items-center justify-end gap-2 text-xs",children:[l.jsxs("span",{className:"font-medium text-muted-fg",children:[n._({id:"PdOOn4"}),":"]}),l.jsx("span",{className:"font-bold tabular-nums text-foreground",children:yt.number(c.count)})]})]})},c.month))]}):null}function eRt({organizationId:e}){const{i18n:t,_:n}=Me(),r=Ae.useUtils(),i=Ae.organizations.resetMonthlyUsage.useMutation({onSuccess:(a,{id:o})=>{Re.success(t._({id:"EO0s4Y"})),r.organizations.findOne.invalidate({id:o}),Fh(o)},onError:a=>{Re.error(t._({id:"xEhIaQ",values:{0:a.message}})),console.error(a)}}),s=Ae.organizations.resetBalance.useMutation({onSuccess:(a,{id:o})=>{Re.success(t._({id:"fnTK8P"})),r.organizations.findOne.invalidate({id:o}),Fh(o)},onError:a=>{Re.error(t._({id:"ipG+N1",values:{0:a.message}})),console.error(a)}});return e?l.jsx(ja,{roles:[Jt.SuperAdmin],children:l.jsxs(gn,{title:t._({id:"47JdAj"}),children:[l.jsx(jn,{label:t._({id:"AxsH5K"}),children:l.jsxs("div",{className:"flex flex-col gap-2",children:[l.jsx("p",{className:"text-sm text-muted-fg",children:l.jsx(D,{id:"kx08km"})}),l.jsx(Oe,{variant:"danger",disabled:i.isPending,loading:i.isPending,onClick:()=>i.mutate({id:e}),children:l.jsx(D,{id:"AxsH5K"})})]})}),l.jsx(jn,{label:t._({id:"zX2UMK"}),children:l.jsxs("div",{className:"flex flex-col gap-2",children:[l.jsx("p",{className:"text-sm text-muted-fg",children:l.jsx(D,{id:"gxAQyq"})}),l.jsx(Oe,{variant:"danger",disabled:s.isPending,loading:s.isPending,onClick:()=>s.mutate({id:e}),children:l.jsx(D,{id:"zX2UMK"})})]})})]})}):null}const tRt=nr("/_baseLayout/organizations/")({component:nRt,beforeLoad:async()=>X7()});function nRt(){const{i18n:e,_:t}=Me(),n=K4t(),[r,i]=b.useState(!1),{data:s}=Ae.partnerLinks.myContext.useQuery(),a=b.useMemo(()=>r?{id:{$in:s?.myClientOrganizationIds??[]}}:void 0,[r,s?.myClientOrganizationIds]),o=CE(Cs.organizations.findAll.query,{where:a}),c=EE(u=>({to:"/organizations/$organizationId/edit",params:{organizationId:u.original.id}}));return l.jsx(Px,{title:e._({id:"jiE6Vn"}),breadcrumbs:[{label:e._({id:"jiE6Vn"}),to:"/organizations"}],createButton:{to:"/organizations/create",label:e._({id:"l7cyO1"})},filters:s?.isPartnerCapable?l.jsx(lSe,{value:r,onChange:i}):void 0,columns:n,queryKey:[...ml(Ae.organizations.findAll),{mineOnly:r}],onQueryFn:o,onRow:c})}const af=Object.values(Vn),bD="__inherit__",rRt=b.memo(b.forwardRef(function({chatIds:t,availableForAllAgents:n,setOpen:r,defaultUrl:i,limitReached:s,folderId:a,embedded:o=!1,onSubmittingChange:c},u){const{i18n:d,_:h}=Me(),p=Ir(),{isKbAutoUpdatesLocked:g}=Xu(),[v,x]=b.useState(i??"");b.useEffect(()=>{i&&x(i)},[i]);const[_,w]=b.useState(!1),[S,E]=b.useState(null),[T,N]=b.useState(Qa.Flag),A=Ae.documentFolders.createDriveFolder.useMutation({onSuccess:async j=>{if(await dr(),!j.initialSync.ok){Re.warning(d._({id:"Zq9JGw"})),r(!1);return}const{filesCreated:R,filesSkipped:P=0,filesFailed:V=0}=j.initialSync.payload,U=d._({id:"nhn+7s",values:{filesCreated:R,filesSkipped:P,filesFailed:V}});V>0||P>0?Re.warning(U):Re.success(U),r(!1)},onError:j=>{Re.error(j.message)}}),k=b.useCallback(()=>{v.trim()&&A.mutate({shareLink:v.trim(),includeSubfolders:_,updateFrequency:S,removalBehavior:T,availableForAllAgents:n,chatIds:t,parentId:a??null})},[v,_,S,T,n,t,a,A]);return b.useImperativeHandle(u,()=>({submit:k}),[k]),b.useEffect(()=>{c?.(A.isPending)},[A.isPending,c]),l.jsxs(l.Fragment,{children:[s&&l.jsx(ga,{variant:"warning",title:d._({id:"03Wqo6"}),className:"mb-4",children:l.jsx(D,{id:"FpZZwa"})}),l.jsxs("div",{className:"flex h-full max-h-[500px] min-h-0 grow flex-col space-y-4",children:[!
1401o&&l.jsxs("div",{className:"space-y-1",children:[l.jsx(ot,{htmlFor:"drive-share-link",children:l.jsx(D,{id:"oOwUJO"})}),l.jsx(fn,{id:"drive-share-link","data-cta":"admin-add-drive-folder-link-input",placeholder:"https://drive.google.com/drive/folders/...",value:v,onChange:j=>x(j.target.value)})]}),l.jsxs("div",{className:"grid grid-cols-1 gap-2 md:grid-cols-3",children:[l.jsxs("div",{className:"flex flex-col justify-between gap-2 rounded-lg border border-border px-2.5 py-2",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(ot,{className:"text-xs font-medium",children:l.jsx(D,{id:"DOVPsz"})}),l.jsx(cn,{delayDuration:0,title:d._({id:"nM48D9"}),children:l.jsx(ds,{className:"size-3 shrink-0 cursor-help text-muted-fg"})})]}),l.jsx(Di,{"aria-label":d._({id:"DOVPsz"}),checked:_,onCheckedChange:w})]}),l.jsxs("div",{className:$e("rounded-lg border border-border px-2.5 py-2",g&&"opacity-50"),children:[l.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[l.jsx(Lo,{className:"size-3.5 shrink-0 text-muted-fg"}),l.jsx(ot,{className:"text-xs font-medium",children:l.jsx(D,{id:"v+RR+W"})}),l.jsx(ch,{locked:g}),l.jsx(cn,{title:d._({id:"ofsgj1"}),children:l.jsx(ds,{className:"size-3 shrink-0 cursor-help text-muted-fg"})})]}),l.jsx("div",{className:$e(g&&"pointer-events-none"),children:l.jsxs(tr,{value:S??bD,disabled:g,onValueChange:j=>E(j===bD?null:j),children:[l.jsx(Yt,{value:bD,children:l.jsx(D,{id:"exUN1j"})}),af.map(j=>l.jsx(Yt,{value:j,children:p.updateFrequency[j]},j))]})})]}),l.jsxs("div",{className:$e("rounded-lg border border-border px-2.5 py-2",g&&"opacity-50"),children:[l.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[l.jsx(bo,{className:"size-3.5 shrink-0 text-muted-fg"}),l.jsx(ot,{className:"text-xs font-medium",children:l.jsx(D,{id:"iDPr94"})}),l.jsx(ch,{locked:g}),l.jsx(cn,{title:d._({id:"SjeznZ"}),children:l.jsx(ds,{className:"size-3 shrink-0 cursor-help text-muted-fg"})})]}),l.jsx("div",{className:$e(g&&"pointer-events-none"),children:l.jsx(tr,{value:T,disabled:g,onValueChange:j=>N(j),children:Object.values(Qa).map(j=>l.jsx(Yt,{value:j,children:p.removalBehavior[j]},j))})})]})]})]}),!o&&l.jsx(wi,{className:"z-50 flex flex-row justify-end gap-2 md:flex-row",children:l.jsx(Oe,{"data-cta":"admin-add-drive-folder-create-button",disabled:!v.trim()||s||A.isPending,loading:A.isPending,onClick:k,children:l.jsx(D,{id:"5J6L3u"})})})]})}));function Mx({children:e,readOnly:t,initialValues:n,...r}){return l.jsx(U$.Provider,{value:bve,children:l.jsxs(S5,{showOptional:!0,allowEmptyStrings:!0,initialValues:n,readOnly:t,...r,children:[e,l.jsx(_ve,{})]})})}function yb(){const e=Ae.documents.create.useMutation({onSuccess:dr}),t=Ae.documents.createExternalDocument.useMutation({onSuccess:dr}),n=Ae.documents.update.useMutation({onSuccess:dr}),r=Ae.documents.refresh.useMutation({onSuccess:dr}),i=Ae.documents.resetEmbedding.useMutation({onSuccess:dr}),s=Ae.documents.resetAllEmbeddings.useMutation({onSuccess:dr}),a=Ae.documents.refreshAll.useMutation({onSuccess:dr}),o=Ae.documents.deleteFromChat.useMutation({onSuccess:dr}),c=Ae.documents.updateDocumentAgents.useMutation({onSuccess:dr}),u=Ae.documents.updateAutoUpdate.useMutation({onSuccess:dr}),d=Ae.documents.checkDocumentUpdatesNow.useMutation({onSuccess:dr}),h=Ae.documents.refreshAllByOrg.useMutation({onSuccess:dr}),p=Ae.documents.resetAllEmbeddingsByOrg.useMutation({onSuccess:dr});return{createDocument:e,createExternalDocument:t,update:n,remove:o,refresh:r,refreshAll:a,resetEmbedding:i,resetAllEmbeddings:s,updateAgentAccess:c,updateAutoUpdate:u,checkDocumentUpdatesNow:d,refreshAllByOrg:h,resetAllEmbeddingsByOrg:p}}const Lre={check:.015,update:.09};function zre(e,t){const n=Math.round(e*V7[t]*100)/100;return yt.currency(n,t)}function hC(e){const t=e??Ti.CZK;return{check:zre(Lre.check,t),update:zre(Lre.update,t)}}const _D="__inherit__",iRt=b.memo(b.forwardRef(function({chatIds:t,availableForAllAgents:n,setOpen:r,defaultUrl:i,limitReached:s,projectedLimitReached:a,onPendingCountChange:o,folderId:c,embedded:u=!1,onSubmittingChange:d},h){const{i18n:p,_:g}=Me(),v=Ir(),{organization:x}=Vc(),{check:_,update:w}
1401=hC(x?.currency),{isKbAutoUpdatesLocked:S}=Xu(),{createExternalDocument:E}=yb(),T=b.useRef(null),[N,A]=b.useState(null),{externalDocumentUri:k,setExternalDocumentUri:j}=ir(Hh(U=>({externalDocumentUri:U.externalDocumentUri,setExternalDocumentUri:U.setExternalDocumentUri}))),R=b.useCallback(()=>{T.current?.submitForm(),j(void 0)},[j]);b.useImperativeHandle(h,()=>({submit:R}),[R]),b.useEffect(()=>{i&&!k&&(j(i),o(1))},[]),b.useEffect(()=>{d?.(E.isPending)},[E.isPending,d]);const P=async({values:U})=>{const G=u?k??i??"":U.uri;await E.mutateAsync({chats:t,availableForAllAgents:n,name:G,updateFrequency:S?null:N,uri:G,folderId:c??null}),r(!1)},V=b.useCallback(U=>{const G=U.value;j(G);const Q=B().url().safeParse(G).success;o(Q?1:0)},[j,o]);return l.jsxs(l.Fragment,{children:[s&&l.jsx(ga,{variant:"warning",title:p._({id:"03Wqo6"}),className:"mb-4",children:l.jsx(D,{id:"FpZZwa"})}),l.jsxs(Mx,{formApiRef:T,onSubmit:P,className:"h-full max-h-[500px] min-h-0 grow space-y-4",children:[!u&&l.jsx(zo,{name:"uri",label:p._({id:"IagCbF"}),zodItemSchema:B().url(),placeholder:"https://example.com/document.pdf",required:!0,onChange:V,defaultValue:k??i}),l.jsxs("div",{className:$e("grid grid-cols-2 gap-3",S&&"opacity-50"),children:[l.jsxs("div",{className:"rounded-lg border border-border px-3 py-2.5",children:[l.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[l.jsx(Lo,{className:"size-3.5 shrink-0 text-muted-fg"}),l.jsx(ot,{className:"text-xs font-medium",children:l.jsx(D,{id:"v+RR+W"})}),l.jsx(ch,{locked:S}),l.jsx(cn,{delayDuration:0,title:p._({id:"X0bNt1",values:{checkCost:_,updateCost:w}}),children:l.jsx(ds,{className:"size-3 shrink-0 cursor-help text-muted-fg"})})]}),l.jsx("div",{className:$e(S&&"pointer-events-none"),children:l.jsxs(tr,{value:N??_D,disabled:S,onValueChange:U=>A(U===_D?null:U),children:[l.jsx(Yt,{value:_D,children:l.jsx(D,{id:"exUN1j"})}),af.map(U=>l.jsx(Yt,{value:U,children:v.updateFrequency[U]},U))]})})]}),l.jsxs("div",{className:"rounded-lg border border-border px-3 py-2.5",children:[l.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[l.jsx(bo,{className:"size-3.5 shrink-0 text-muted-fg"}),l.jsx(ot,{className:"text-xs font-medium",children:l.jsx(D,{id:"iDPr94"})}),l.jsx(ch,{locked:S}),l.jsx(cn,{delayDuration:0,title:p._({id:"iNnwP6"}),children:l.jsx(ds,{className:"size-3 shrink-0 cursor-help text-muted-fg"})})]}),l.jsx("div",{className:$e(S&&"pointer-events-none"),children:l.jsx("p",{className:"text-sm",children:c?l.jsx(D,{id:"xxjCJE"}):v.removalBehavior[Qa.Flag]})})]})]})]}),!u&&l.jsx(wi,{className:"z-50 flex flex-row justify-end gap-2 md:flex-row",children:l.jsx(Oe,{"data-cta":"admin-add-external-document-add-button",disabled:E.isPending||s||a,loading:E.isPending,onClick:R,children:l.jsx(D,{id:"m16xKo"})})})]})})),wD="__auto__",SD="__inherit__",sRt=b.memo(b.forwardRef(function({chatIds:t,availableForAllAgents:n,setOpen:r,defaultUrl:i,limitReached:s,projectedLimitReached:a,folderId:o,embedded:c=!1,onSubmittingChange:u},d){const{i18n:h,_:p}=Me(),g=Ir(),{isKbAutoUpdatesLocked:v}=Xu(),[x,_]=b.useState(i??""),[w,S]=b.useState(wD),[E,T]=b.useState(null),{mutateAsync:N,isPending:A}=Ae.documentFolders.createRss.useMutation({onSuccess:dr});b.useEffect(()=>{i&&_(i)},[i]);const k=Vy.safeParse(x).success,j=b.useCallback(async()=>{if(!k){Re.error(h._({id:"ui0Qjk"}));return}if(s||a){Re.error(h._({id:"Xh1YLA"}));return}try{await N({url:x,parentId:o??null,chatIds:t,availableForAllAgents:n,...w===wD?{}:{contentMode:w},...E==null?{}:{updateFrequency:E}}),Re.success(h._({id:"j9hT5u"})),r(!1)}catch(R){Re.error(R instanceof Error?R.message:h._({id:"vZf+CE"}))}},[n,t,w,N,o,k,s,a,r,p,E,x]);return b.useImperativeHandle(d,()=>({submit:j}),[j]),b.useEffect(()=>{u?.(A)},[A,u]),l.jsxs(l.Fragment,{children:[s&&l.jsx(ga,{variant:"warning",title:h._({id:"03Wqo6"}),className:"mb-4",children:l.jsx(D,{id:"FpZZwa"})}),l.jsxs("div",{className:"space-y-4",children:[!c&&l.jsxs("div",{className:"flex w-full flex-col gap-2",children:[l.jsxs(ot,{htmlFor:"rss-url",children:[h._({id:"PKG6me"}),":"]}),l.jsx(fn,{id:"rss-url",name:"rss-url","data-cta":"admin-add-rss-url-input",placeholder:"https://example.com/rss",value:x,onChange:R=>_(R.target.value),required:!0})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[l.jsxs("div",{className:"rounded-lg border border-border px-2.5 py-2",children:[l.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[l.jsxs(ot,{className:"text-xs font-medium",children:[h._({id:"dK6KTQ"}),":"]}),l.jsx(cn,{title:h._({id:"98isgn"}),children:l.jsx(ds,{className:"size-3 shrink-0 cursor-help text-muted-fg"})})]}),l.jsxs(tr,{value:w,onValueChange:R=>S(R),children:[l.jsx(Yt,{value:wD,children:l.jsx(D,{id:"pEb1UY"})}
1401),l.jsx(Yt,{value:"inline",children:l.jsx(D,{id:"hm+z1Z"})}),l.jsx(Yt,{value:"follow_link",children:l.jsx(D,{id:"mVKb8T"})})]})]}),l.jsxs("div",{className:$e("rounded-lg border border-border px-2.5 py-2",v&&"opacity-50"),children:[l.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[l.jsx(Lo,{className:"size-3.5 shrink-0 text-muted-fg"}),l.jsx(ot,{className:"text-xs font-medium",children:l.jsx(D,{id:"v+RR+W"})}),l.jsx(ch,{locked:v}),l.jsx(cn,{title:h._({id:"h4sQHC"}),children:l.jsx(ds,{className:"size-3 shrink-0 cursor-help text-muted-fg"})})]}),l.jsx("div",{className:$e(v&&"pointer-events-none"),children:l.jsxs(tr,{value:E??SD,disabled:v,onValueChange:R=>T(R===SD?null:R),children:[l.jsx(Yt,{value:SD,children:l.jsx(D,{id:"exUN1j"})}),af.map(R=>l.jsx(Yt,{value:R,children:g.updateFrequency[R]},R))]})})]})]})]}),!c&&l.jsx(wi,{className:"z-50 flex flex-row justify-end gap-2 md:flex-row",children:l.jsx(Oe,{"data-cta":"admin-add-rss-create-button",disabled:A||!k||s||a,loading:A,onClick:j,icon:l.jsx(Mj,{className:$e("size-4")}),children:l.jsx(D,{id:"a5wIDt"})})})]})}));let Mc;typeof window<"u"?Mc=window:typeof self<"u"?Mc=self:Mc=global;let GL=null,KL=null;const $re=20,ED=Mc.clearTimeout,Bre=Mc.setTimeout,CD=Mc.cancelAnimationFrame||Mc.mozCancelAnimationFrame||Mc.webkitCancelAnimationFrame,Ure=Mc.requestAnimationFrame||Mc.mozRequestAnimationFrame||Mc.webkitRequestAnimationFrame;CD==null||Ure==null?(GL=ED,KL=function(t){return Bre(t,$re)}):(GL=function([t,n]){CD(t),ED(n)},KL=function(t){const n=Ure(function(){ED(r),t()}),r=Bre(function(){CD(n),t()},$re);return[n,r]});function aRt(e){let t,n,r,i,s,a,o;const c=typeof document<"u"&&document.attachEvent;if(!c){a=function(w){const S=w.__resizeTriggers__,E=S.firstElementChild,T=S.lastElementChild,N=E.firstElementChild;T.scrollLeft=T.scrollWidth,T.scrollTop=T.scrollHeight,N.style.width=E.offsetWidth+1+"px",N.style.height=E.offsetHeight+1+"px",E.scrollLeft=E.scrollWidth,E.scrollTop=E.scrollHeight},s=function(w){return w.offsetWidth!==w.__resizeLast__.width||w.offsetHeight!==w.__resizeLast__.height},o=function(w){if(w.target.className&&typeof w.target.className.indexOf=="function"&&w.target.className.indexOf("contract-trigger")<0&&w.target.className.indexOf("expand-trigger")<0)return;const S=this;a(this),this.__resizeRAF__&&GL(this.__resizeRAF__),this.__resizeRAF__=KL(function(){s(S)&&(S.__resizeLast__.width=S.offsetWidth,S.__resizeLast__.height=S.offsetHeight,S.__resizeListeners__.forEach(function(N){N.call(S,w)}))})};let p=!1,g="";r="animationstart";const v="Webkit Moz O ms".split(" ");let x="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),_="";{const w=document.createElement("fakeelement");if(w.style.animationName!==void 0&&(p=!0),p===!1){for(let S=0;S<v.length;S++)if(w.style[v[S]+"AnimationName"]!==void 0){_=v[S],g="-"+_.toLowerCase()+"-",r=x[S],p=!0;break}}}n="resizeanim",t="@"+g+"keyframes "+n+" { from { opacity: 0; } to { opacity: 0; } } ",i=g+"animation: 1ms "+n+"; "}const u=function(p){if(!p.getElementById("detectElementResize")){const g=(t||"")+".resize-triggers { "+(i||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',v=p.head||p.getElementsByTagName("head")[0],x=p.createElement("style");x.id="detectElementResize",x.type="text/css",e!=null&&x.setAttribute("nonce",e),x.styleSheet?x.styleSheet.cssText=g:x.appendChild(p.createTextNode(g)),v.appendChild(x)}};return{addResizeListener:function(p,g){if(c)p.attachEvent("onresize",g);else{if(!p.__resizeTriggers__){const v=p.ownerDocument,x=Mc.getComputedStyle(p);x&&x.position==="static"&&(p.style.position="relative"),u(v),p.__resizeLast__={},p.__resizeListeners__=[],(p.__resizeTriggers__=v.createElement("div")).className="resize-triggers";const _=v.createElement("div");_.className="expand-trigger",_.appendChild(v.createElement("div"));const w=v.createElement("div");
1401w.className="contract-trigger",p.__resizeTriggers__.appendChild(_),p.__resizeTriggers__.appendChild(w),p.appendChild(p.__resizeTriggers__),a(p),p.addEventListener("scroll",o,!0),r&&(p.__resizeTriggers__.__animationListener__=function(E){E.animationName===n&&a(p)},p.__resizeTriggers__.addEventListener(r,p.__resizeTriggers__.__animationListener__))}p.__resizeListeners__.push(g)}},removeResizeListener:function(p,g){if(c)p.detachEvent("onresize",g);else if(p.__resizeListeners__.splice(p.__resizeListeners__.indexOf(g),1),!p.__resizeListeners__.length){p.removeEventListener("scroll",o,!0),p.__resizeTriggers__.__animationListener__&&(p.__resizeTriggers__.removeEventListener(r,p.__resizeTriggers__.__animationListener__),p.__resizeTriggers__.__animationListener__=null);try{p.__resizeTriggers__=!p.removeChild(p.__resizeTriggers__)}catch{}}}}}class oRt extends b.Component{constructor(...t){super(...t),this.state={height:this.props.defaultHeight||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._didLogDeprecationWarning=!1,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;const{disableHeight:n,disableWidth:r,onResize:i}=this.props;if(this._parentNode){const s=window.getComputedStyle(this._parentNode)||{},a=parseFloat(s.paddingLeft||"0"),o=parseFloat(s.paddingRight||"0"),c=parseFloat(s.paddingTop||"0"),u=parseFloat(s.paddingBottom||"0"),d=this._parentNode.getBoundingClientRect(),h=d.height-c-u,p=d.width-a-o;if(!n&&this.state.height!==h||!r&&this.state.width!==p){this.setState({height:h,width:p});const g=()=>{this._didLogDeprecationWarning||(this._didLogDeprecationWarning=!0,console.warn("scaledWidth and scaledHeight parameters have been deprecated; use width and height instead"))};typeof i=="function"&&i({height:h,width:p,get scaledHeight(){return g(),h},get scaledWidth(){return g(),p}})}}},this._setRef=n=>{this._autoSizer=n}}componentDidMount(){const{nonce:t}=this.props,n=this._autoSizer?this._autoSizer.parentNode:null;if(n!=null&&n.ownerDocument&&n.ownerDocument.defaultView&&n instanceof n.ownerDocument.defaultView.HTMLElement){this._parentNode=n;const r=n.ownerDocument.defaultView.ResizeObserver;r!=null?(this._resizeObserver=new r(()=>{this._timeoutId=setTimeout(this._onResize,0)}),this._resizeObserver.observe(n)):(this._detectElementResize=aRt(t),this._detectElementResize.addResizeListener(n,this._onResize)),this._onResize()}}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),this._timeoutId!==null&&clearTimeout(this._timeoutId),this._resizeObserver&&this._resizeObserver.disconnect())}render(){const{children:t,defaultHeight:n,defaultWidth:r,disableHeight:i=!1,disableWidth:s=!1,doNotBailOutOnEmptyChildren:a=!1,nonce:o,onResize:c,style:u={},tagName:d="div",...h}=this.props,{height:p,width:g}=this.state,v={overflow:"visible"},x={};let _=!1;return i||(p===0&&(_=!0),v.height=0,x.height=p,x.scaledHeight=p),s||(g===0&&(_=!0),v.width=0,x.width=g,x.scaledWidth=g),a&&(_=!1),b.createElement(d,{ref:this._setRef,style:{...v,...u},...h},!_&&t(x))}}var Vre=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function lRt(e,t){return!!(e===t||Vre(e)&&Vre(t))}function cRt(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!lRt(e[n],t[n]))return!1;return!0}function TD(e,t){t===void 0&&(t=cRt);var n,r=[],i,s=!1;function a(){for(var o=[],c=0;c<arguments.length;c++)o[c]=arguments[c];return s&&n===this&&t(o,r)||(i=e.apply(this,o),s=!0,n=this,r=o),i}return a}var uRt=typeof performance=="object"&&typeof performance.now=="function",Hre=uRt?function(){return performance.now()}:function(){return Date.now()};function qre(e){cancelAnimationFrame(e.id)}function dRt(e,t){var n=Hre();function r(){Hre()-n>=t?e.call(null):i.id=requestAnimationFrame(r)}var i={id:requestAnimationFrame(r)};return i}var AD=-1;function Wre(e){if(e===void 0&&(e=!1),AD===-1||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),AD=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return AD}var zv=null;function Gre(e){if(e===void 0&&(e=!1),zv===null||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),i=r.style;return i.width="100px",i.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?zv="positive-descending":(t.scrollLeft=1,t.scrollLeft===0?zv="negative":zv="positive-ascending"),document.body.removeChild(t),zv}return zv}var fRt=150,hRt=function(t,n){return t};function pRt(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,i=e.getItemSize,s=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,o=e.getStopIndexForStartIndex,c=e.initInstanceProps,u=e.shouldResetStyleCacheOnItemSizeChange,d=e.validateProps;return t=(function(h){Mst(p,h);function p(v){var x;return x=h.call(this,v)||this,x._instanceProps=c(x.props,xJ(x)),x._outerRef=void 0,x._resetIsScrollingTimeoutId=null,x.state={instance:xJ(x),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof x.props.initialScrollOffset=="number"?x.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},x._callOnItemsRendered=void 0,x._callOnItemsRendered=TD(function(_,w,S,E){return x.props.onItemsRendered({overscanStartIndex:_,overscanStopIndex:w,visibleStartIndex:S,visibleStopIndex:E})}),x._callOnScroll=void 0,x._callOnScroll=TD(function(_,w,S){return x.props.onScroll({scrollDirection:_,scrollOffset:w,scrollUpdateWasRequested:S})}),x._getItemStyle=void 0,x._getItemStyle=function(_){var w=x.props,S=w.direction,E=w.itemSize,T=w.layout,N=x._getItemStyleCache(u&&E,u&&T,u&&S),A;if(N.hasOwnProperty(_))A=N[_];else{var k=n(x.props,_,x._instanceProps),j=i(x.props,_,x._instanceProps),R=S==="horizontal"||T==="horizontal",P=S==="rtl",V=R?k:0;N[_]=A={position:"absolute",left:P?void 0:V,right:P?V:void 0,top:R?0:k,height:R?"100%":j,width:R?j:"100%"}}return A},x._getItemStyleCache=void 0,x._getItemStyleCache=TD(function(_,w,S){return{}}),x._onScrollHorizontal=function(_){var w=_.currentTarget,S=w.clientWidth,E=w.scrollLeft,T=w.scrollWidth;x.setState(function(N){if(N.scrollOffset===E)return null;var A=x.props.direction,k=E;if(A==="rtl")switch(Gre()){case"negative":k=-E;break;case"positive-descending":k=T-S-E;break}return k=Math.max(0,Math.min(k,T-S)),{isScrolling:!0,scrollDirection:N.scrollOffset<k?"forward":"backward",scrollOffset:k,scrollUpdateWasRequested:!1}},x._resetIsScrollingDebounced)},x._onScrollVertical=function(_){var w=_.currentTarget,S=w.clientHeight,E=w.scrollHeight,T=w.scrollTop;x.setState(function(N){if(N.scrollOffset===T)return null;var A=Math.max(0,Math.min(T,E-S));return{isScrolling:!0,scrollDirection:N.scrollOffset<A?"forward":"backward",scrollOffset:A,scrollUpdateWasRequested:!1}},x._resetIsScrollingDebounced)},x._outerRefSetter=function(_){var w=x.props.outerRef;x._outerRef=_,typeof w=="function"?w(_):w!=null&&typeof w=="object"&&w.hasOwnProperty("current")&&(w.current=_)},x._resetIsScrollingDebounced=function(){x._resetIsScrollingTimeoutId!==null&&qre(x._resetIsScrollingTimeoutId),x._resetIsScrollingTimeoutId=dRt(x._resetIsScrolling,fRt)},x._resetIsScrolling=function(){x._resetIsScrollingTimeoutId=null,x.setState({isScrolling:!1},function(){x._getItemStyleCache(-1,null)})},x}p.getDerivedStateFromProps=function(x,_){return mRt(x,_),d(x),null};var g=p.prototype;return g.scrollTo=function(x){x=Math.max(0,x),this.setState(function(_){return _.scrollOffset===x?null:{scrollDirection:_.scrollOffset<x?"forward":"backward",scrollOffset:x,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},g.scrollToItem=function(x,_){_===void 0&&(_="auto");var w=this.props,S=w.itemCount,E=w.layout,T=this.state.scrollOffset;x=Math.max(0,Math.min(x,S-1));var N=0;if(this._outerRef){var A=this._outerRef;E==="vertical"?N=A.scrollWidth>A.clientWidth?Wre():0:N=A.scrollHeight>A.clientHeight?Wre():0}this.scrollTo(s(this.props,x,_,T,this._instanceProps,N))},g.componentDidMount=function(){var x=this.props,_=x.direction,w=x.initialScrollOffset,S=x.layout;if(typeof w=="number"&&this._outerRef!=null){var E=this._outerRef;_==="horizontal"||S==="horizontal"?E.scrollLeft=w:E.scrollTop=w}this._callPropsCallbacks()},g.componentDidUpdate=function(){var x=this.props,_=x.direction,w=x.layout,S=this.state,E=S.scrollOffset,T=S.scrollUpdateWasRequested;if(T&&this._outerRef!=null){var N=this._outerRef;if(_==="horizontal"||w==="horizontal")if(_==="rtl")switch(Gre()){case"negative":N.scrollLeft=-E;break;case"positive-ascending":N.scrollLeft=E;break;default:var A=N.clientWidth,k=N.scrollWidth;N.scrollLeft=k-A-E;break}else N.scrollLeft=E;else N.scrollTop=E}this._callPropsCallbacks()},g.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&qre(this._resetIsScrollingTimeoutId)},g.render=function(){var x=this.props,_=x.children,w=x.className,S=x.direction,E=x.height,T=x.innerRef,N=x.innerElementType,A=x.innerTagName,k=x.itemCount,j=x.itemData,R=x.itemKey,P=R===void 0?hRt:R,V=x.layout,U=x.outerElementType,G=x.outerTagName,Q=x.style,Z=x.useIsScrolling,K=x.width,te=this.state.isScrolling,ne=S==="horizontal"||V==="horizontal",se=ne?this._onScrollHorizontal:this._onScrollVertical,H=this._getRangeToRender(),O=H[0],L=H[1],M=[];if(k>0)for(var q=O;q<=L;q++)M.push(b.createElement(_,{data:j,key:P(q,j),index:q,isScrolling:Z?te:void 0,style:this._getItemStyle(q)}));var X=r(this.props,this._instanceProps);return b.createElement(U||G||"div",{className:w,onScroll:se,ref:this._outerRefSetter,style:Ui({position:"relative",height:E,width:K,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:S},Q)},b.createElement(N||A||"div",{children:M,ref:T,style:{height:ne?"100%":X,pointerEvents:te?"n
1401one":void 0,width:ne?X:"100%"}}))},g._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var x=this.props.itemCount;if(x>0){var _=this._getRangeToRender(),w=_[0],S=_[1],E=_[2],T=_[3];this._callOnItemsRendered(w,S,E,T)}}if(typeof this.props.onScroll=="function"){var N=this.state,A=N.scrollDirection,k=N.scrollOffset,j=N.scrollUpdateWasRequested;this._callOnScroll(A,k,j)}},g._getRangeToRender=function(){var x=this.props,_=x.itemCount,w=x.overscanCount,S=this.state,E=S.isScrolling,T=S.scrollDirection,N=S.scrollOffset;if(_===0)return[0,0,0,0];var A=a(this.props,N,this._instanceProps),k=o(this.props,A,N,this._instanceProps),j=!E||T==="backward"?Math.max(1,w):1,R=!E||T==="forward"?Math.max(1,w):1;return[Math.max(0,A-j),Math.max(0,Math.min(_-1,k+R)),A,k]},p})(b.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var mRt=function(t,n){t.children,t.direction,t.height,t.layout,t.innerTagName,t.outerTagName,t.width,n.instance},gRt=pRt({getItemOffset:function(t,n){var r=t.itemSize;return n*r},getItemSize:function(t,n){var r=t.itemSize;return r},getEstimatedTotalSize:function(t){var n=t.itemCount,r=t.itemSize;return r*n},getOffsetForIndexAndAlignment:function(t,n,r,i,s,a){var o=t.direction,c=t.height,u=t.itemCount,d=t.itemSize,h=t.layout,p=t.width,g=o==="horizontal"||h==="horizontal",v=g?p:c,x=Math.max(0,u*d-v),_=Math.min(x,n*d),w=Math.max(0,n*d-v+d+a);switch(r==="smart"&&(i>=w-v&&i<=_+v?r="auto":r="center"),r){case"start":return _;case"end":return w;case"center":{var S=Math.round(w+(_-w)/2);return S<Math.ceil(v/2)?0:S>x+Math.floor(v/2)?x:S}case"auto":default:return i>=w&&i<=_?i:i<w?w:_}}
1401,getStartIndexForOffset:function(t,n){var r=t.itemCount,i=t.itemSize;return Math.max(0,Math.min(r-1,Math.floor(n/i)))},getStopIndexForStartIndex:function(t,n,r){var i=t.direction,s=t.height,a=t.itemCount,o=t.itemSize,c=t.layout,u=t.width,d=i==="horizontal"||c==="horizontal",h=n*o,p=d?u:s,g=Math.ceil((p+r-h)/o);return Math.max(0,Math.min(a-1,n+g-1))},initInstanceProps:function(t){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(t){t.itemSize}});const xRt=b.memo(({value:e=_k,onChange:t,segments:n=5,min:r=0,max:i=1,showLabels:s=!0,disabled:a=!1})=>{const o=(i-r)/2+r,c=e??o,[u,d]=b.useState(null),[h,p]=b.useState(!1),g=Array.from({length:n},(S,E)=>Number((r+E/(n-1)*(i-r)).toFixed(3))),v=async S=>{p(!0),await t(S),p(!1)},x=["bg-green-300","bg-green-500","bg-yellow-500","bg-orange-500","bg-red-500"],_=["bg-green-100 hover:bg-green-100 text-green-200","bg-green-200 hover:bg-green-200 text-white","bg-yellow-200 hover:bg-yellow-200 text-black","bg-orange-200 hover:bg-orange-200 text-white","bg-red-200 hover:bg-red-200 text-white"],w=a||h;return l.jsxs("div",{className:"relative flex w-full","data-table":"prevent",children:[h&&l.jsx("span",{className:"absolute left-0 top-0 flex size-full items-center justify-center",children:l.jsx(Kr,{className:"size-3 animate-spin text-muted-fg"})}),g.map((S,E)=>{const T=Number(c)>=S,N=u!==null&&S<=u,A=T,k=u!==null&&u>=c&&N&&!T;return l.jsxs("div",{onClick:()=>!w&&v(S),onMouseEnter:()=>!w&&d(S),onMouseLeave:()=>!w&&d(null),className:$e("h-4 min-w-10 flex-1 border-y border-gray-200","flex items-center justify-center transition-colors",[_[E]],{"bg-gray-300":w,[x[E]]:!w&&A,"bg-gray-100":!w&&!A&&!k,"cursor-pointer":!w,"rounded-l-full border-r-0 border-l":E===0,"rounded-r-full border-l-0 border-r":E===n-1}),children:[s&&E===0&&l.jsx("span",{className:$e("pl-1 text-xs font-medium",{"text-gray-500":A&&w,"text-gray-400":!A}),children:l.jsx(D,{id:"nTWWCZ"})}),s&&E===n-1&&l.jsx("span",{className:$e("pr-3 text-xs font-medium",{"text-gray-500":A&&w,"text-gray-400":!A}),children:l.jsx(D,{id:"yx/fMc"})})]},S)})]})}),vRt=b.memo(({id:e,description:t,onRecordChange:n,weight:r,style:i,checked:s})=>l.jsxs("div",{className:"mb-2 flex h-7 w-full items-center justify-between px-1",style:i,"data-cta":"admin-website-records-record","data-record-id":e,children:[l.jsxs(ot,{htmlFor:`url.${e}`,className:"flex min-w-0 grow items-center gap-2 font-normal",children:[l.jsx(N0,{size:"sm",id:`url.${e}`,name:`url.${e}`,checked:s,onCheckedChange:a=>{n(e,{selected:a})}}),l.jsx("span",{title:t,className:"truncate",children:t})]}),l.jsx("div",{className:"flex shrink-0",children:l.jsx(xRt,{value:r,onChange:a=>{n(e,{weight:a})}})})]}));function Kre(e,t){return e.toLowerCase().includes(t.toLowerCase())}const yRt=b.memo(({search:e,setSearch:t})=>{const{i18n:n,_:r}=Me(),{webUrls:i,setWebUrls:s}=ir(Hh(d=>({webUrls:d.webUrls,setWebUrls:d.setWebUrls}))),a=b.useCallback(d=>{s(i.map(h=>Kre(h.url,e)?{...h,selected:d}:h))},[e,s,i]),o=b.useCallback((d,h)=>{s(i.map(p=>p.id===d?{...p,...h}:p))},[i,s]),c=b.useMemo(()=>i.filter(d=>Kre(d.url,e)),[i,e]),u=b.useMemo(()=>i.filter(d=>d.selected).length,[i]);return l.jsxs("div",{className:"flex max-h-[400px] min-h-0 grow flex-col space-y-2 overflow-hidden rounded-radius border border-border bg-gray-50 p-4 md:max-h-[500px]",children:[l.jsx("div",{className:"flex-none text-sm font-bold text-gray-600",children:l.jsx(D,{id:"9TWOdo"})}),l.jsx("div",{className:"flex-none",children:l.jsx(fn,{name:"search",placeholder:n._({id:"o7J4JM"}),value:e,onChange:d=>t(d.target.value),addonBefore:l.jsx(Iy,{className:"size-4"})})}),l.jsx("div",{className:"min-h-0 grow overflow-hidden rounded-lg border border-border bg-white",children:l.jsxs("div",{className:"flex size-full flex-col text-xs",children:[l.jsxs("div",{className:"flex w-full items-center justify-between border-b border-border px-3 py-2 font-bold text-gray-600",children:[l.jsx("div",{children:l.jsx(D,{id:"QkLf4H"})}),l.jsx("div",{children:l.jsx(D,{id:"qSvBMh"})})]}),l.jsx("div",{className:"h-[200px] w-full md:h-[300px]",children:l.jsx(oRt,{children:({height:d,width:h})=>l.jsx(gRt,{height:d,width:h,itemCount:c.length,itemSize:28,className:"overflow-x-hidden",children:({index:p,style:g})=>l.jsx(vRt,{id:c[p].id,description:c[p].url,weight:c[p].weight,checked:c[p].selected,style:g,onRecordChange:o},c[p].id)})})})]})}),l.jsxs("div",{className:"flex items-start justify-between pt-1",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs(Oe,{outline:!0,variant:"ghost","data-cta":"admin-website-records-select-all",size:"xs",onClick:()=>a(!0),children:[l.jsx(GRe,{className:"size-4"}),l.jsx(D,{id:"wgNoIs"})]}),l.jsxs(Oe,{outline:!0,variant:"ghost","data-cta":"admin-website-records-deselect-all",size:"xs",onClick:()=>a(!1),children:[l.jsx(YRe,{className:"size-4"}),l.jsx(D,{id:"U+R4tW"})]})]}),l.jsxs("div",{className:"text-sm font-bold text-gray-600",children:[u,"/",i.length]})]})]})}),Ao="__keep_unchanged__",r0="__discover_off__",bRt=[{value:.01,label:"1%"},{value:.05,label:"5%"},{value:.1,label:"10%"},{value:.2,label:"20%"}],_Rt=af.filter(e=>e!==Vn.Never);function G_({htmlFor:e,tooltip:t,children:n}){return l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx(ot,{htmlFor:e,children:n}),l.jsx(cn,{title:t,children:l.jsx(ds,{className:"size-3.5 shrink-0 cursor-help text-muted-fg"})})]})}const LU=b.memo(function({mode:t,showUpdateFrequency:n=!0,showChangeThreshold:r=!1,showDiscoveryFrequency:i=!1,showWebsiteFields:s,showAutoIncludeNewPages:a,showAutoIncludeRootScanHint:o=!1,updateFrequency:c,discoveryFrequency:u,changeThreshold:d,autoIncludeNewPages:h,removalBehavior:p,onUpdateFrequencyChange:g,onDiscoveryFrequencyChange:v,onCh
1401angeThresholdChange:x,onAutoIncludeNewPagesChange:_,onRemovalBehaviorChange:w}){const{i18n:S,_:E}=Me(),{organization:T}=Vc(),{check:N,update:A}=hC(T?.currency),k=Ir(),j=t==="bulk",R=j&&c===void 0?Ao:c??"inherit",P=j&&u===void 0?Ao:u==null||u===Vn.Never?r0:u,V=j&&d===void 0?Ao:d==null?"inherit":String(d),U=j&&h===void 0?Ao:h==null?"inherit":h?"enabled":"disabled",G=j&&p===void 0?Ao:p??"inherit",Q=s&&(a??!0);return l.jsxs("div",{className:"space-y-4",children:[i&&l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(G_,{htmlFor:"discoveryFrequency",tooltip:S._({id:"94fGX5",values:{checkCost:N}}),children:l.jsx(D,{id:"fmYfOs"})}),l.jsxs(tr,{id:"discoveryFrequency",value:P,onValueChange:Z=>{if(v){if(j&&Z===Ao){v(void 0);return}if(Z===r0){v(null);return}v(Z)}},children:[j&&l.jsx(Yt,{value:Ao,children:l.jsx(D,{id:"x2PCFh"})}),l.jsx(Yt,{value:r0,children:l.jsx(D,{id:"az8lvo"})}),_Rt.map(Z=>l.jsx(Yt,{value:Z,children:k.updateFrequency[Z]},Z))]})]}),Q&&l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(G_,{htmlFor:"autoIncludeNewPages",tooltip:S._({id:"F6KlUw"}),children:l.jsx(D,{id:"50ZEST"})}),l.jsxs(tr,{id:"autoIncludeNewPages",value:U,onValueChange:Z=>{if(_){if(j&&Z===Ao){_(void 0);return}if(Z==="inherit"){_(null);return}_(Z==="enabled")}},children:[j&&l.jsx(Yt,{value:Ao,children:l.jsx(D,{id:"x2PCFh"})}),l.jsx(Yt,{value:"inherit",children:l.jsx(D,{id:"exUN1j"})}),l.jsx(Yt,{value:"enabled",children:l.jsx(D,{id:"RxzN1M"})}),l.jsx(Yt,{value:"disabled",children:l.jsx(D,{id:"E/QGRL"})})]}),o&&l.jsx("p",{className:"text-xs text-muted-fg",children:l.jsx(D,{id:"lbxDGs"})})]}),n&&l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(G_,{htmlFor:"autoUpdateFrequency",tooltip:S._({id:"oQeT4k",values:{checkCost:N,updateCost:A}}),children:l.jsx(D,{id:"8rueUI"})}),l.jsxs(tr,{id:"autoUpdateFrequency",value:R,onValueChange:Z=>{if(j&&Z===Ao){g(void 0);return}if(Z==="inherit"){g(null);return}g(Z)},children:[j&&l.jsx(Yt,{value:Ao,children:l.jsx(D,{id:"x2PCFh"})}),l.jsx(Yt,{value:"inherit",children:l.jsx(D,{id:"ELoHSp"})}),af.map(Z=>l.jsx(Yt,{value:Z,children:k.updateFrequency[Z]},Z))]})]}),s&&l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(G_,{htmlFor:"removalBehavior",tooltip:S._({id:"zD4aLt"}),children:l.jsx(D,{id:"Rtd6a/"})}),l.jsxs(tr,{id:"removalBehavior",value:G,onValueChange:Z=>{if(w){if(j&&Z===Ao){w(void 0);return}if(Z==="inherit"){w(null);return}w(Z)}},children:[j&&l.jsx(Yt,{value:Ao,children:l.jsx(D,{id:"x2PCFh"})}),l.jsx(Yt,{value:"inherit",children:l.jsx(D,{id:"exUN1j"})}),Object.values(Qa).map(Z=>l.jsx(Yt,{value:Z,children:k.removalBehavior[Z]},Z))]})]}),r&&l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(G_,{htmlFor:"autoUpdateThreshold",tooltip:S._({id:"DVR1sG"}),children:l.jsx(D,{id:"ZO04uo"})}),l.jsxs(tr,{id:"autoUpdateThreshold",value:V,onValueChange:Z=>{if(j&&Z===Ao){x(void 0);return}if(Z==="inherit"){x(null);return}x(Number(Z))},children:[j&&l.jsx(Yt,{value:Ao,children:l.jsx(D,{id:"x2PCFh"})}),l.jsx(Yt,{value:"inherit",children:l.jsx(D,{id:"ELoHSp"})}),bRt.map(Z=>l.jsx(Yt,{value:String(Z.value),children:Z.label},Z.value))]})]})]})});function dSe({overlappingRoots:e}){const{i18n:t,_:n}=Me();return e.length===0?null:l.jsx(ga,{variant:"warning",title:t._({id:"PgeM5X"}),description:t._({id:"R5P+tL",values:{0:e.map(r=>r.websiteUrl).join(", ")}})})}const kD="__inherit__",wRt=af.filter(e=>e!==Vn.Never),SRt=b.memo(b.forwardRef(function({chatIds:t,availableForAllAgents:n,setOpen:r,defaultUrl:i,limitReached:s,projectedLimitReached:a,onPendingCountChange:o,folderId:c,embedded:u=!1,onSubmittingChange:d},h){const{i18n:p,_:g}=Me(),v=Ir(),{isKbAutoUpdatesLocked:x}=Xu(),[_,w]=b.useState(!1),[S,E]=b.useState(!0),[T,N]=b.useState(""),[A,k]=b.useState(null),[j,R]=b.useState(null),[P,V]=b.useState(!1),[U,G]=b.useState(Qa.Flag),Q=j!=null,{uri:Z,setUri:K,webUrls:te,setWebUrls:ne}=ir(Hh(ue=>({uri:ue.uri,setUri:ue.setUri,webUrls:ue.webUrls,setWebUrls:ue.setWebUrls,user:ue.user}))),{mutateAsync:se,isPending:H,reset:O}=Ae.documents.mapUrl.useMutation(),{mutateAsync:L,isPending:M}=Ae.documents.createWebsite.useMutation({onSuccess:dr}),{mutateAsync:q,isPending:X}=Ae.documentFolders.createWebsite.useMutation({onSuccess:dr}),J=te.filter(ue=>ue.selected),{currentOrganizationId:W}=ps(),{organization:re}=Vc(),ae=re?.url??"",{check:ce,update:Te}=hC(re?.currency),fe=b.useRef(!1),xe=Hy(Z,400),ke=Q&&!x&&B().url().safeParse(xe).success,{data:Fe}=Ae.documentFolders.checkWebsiteRootOverlap.useQuery({url:xe},{enabled:ke});b.useEffect(()=>{u&&i&&K(i)},[u,i]);const tt=b.useCallback(()=>{const ue=Vy.safeParse(Z);return E(ue.success),ue.success&&K(ue.data),ue.success},[K,Z]),Se=b.useCallback(ue=>{K(ue.target.value),E(!0)},[K]),et=b.useCallback(async()=>
1401{if(tt()&&Z){w(!0),ne([]),N("");try{const ue=await se({url:Z});ne(ue?.map(Ne=>({id:TB(),url:Ne,selected:!0,weight:_k}))??[])}catch{Re.error(p._({id:"4oLsIB"}))}w(!1)}},[se,ne,Z,tt,g]);b.useEffect(()=>{u&&Z&&!fe.current&&(fe.current=!0,et())},[u,Z,et]);const pt=b.useCallback(()=>{K(""),N(""),ne([])},[K,N,ne]),ie=b.useCallback(async()=>{if(a&&!s){Re.error(p._({id:"ReHKQA"}));return}if(s){Re.error(p._({id:"zyxkNB"}));return}if(Q&&x){Re.error(p._({id:"iM1W0w"}));return}if(Q&&Fe?.exactMatch){Re.error(p._({id:"BnzbFp"}));return}if(Z&&!J.length&&!tt())return;if(!W){Re.error(p._({id:"6AZxj1"}));return}let Ne=[],De={};Z&&!J.length?(Ne=[Z],De={[Z]:_k}):(Ne=Array.from(new Set(J.map(me=>me.url))),De=J.reduce((me,we)=>(me[we.url]=typeof we.weight=="number"?we.weight:_k,me),{})),Q?await q({url:Z,includePageUrls:Ne,allDiscoveredUrls:te.map(me=>me.url),parentId:c??null,chatIds:t,availableForAllAgents:n,...A==null?{}:{updateFrequency:A},...j==null?{}:{discoveryFrequency:j},autoIncludeNewPages:P,removalBehavior:U}):await L({urls:Ne,chats:t,availableForAllAgents:n,weights:De,folderId:c??null});const be=new URL(window.location.href);be.searchParams.delete("open"),window.history.replaceState(null,"",be.toString()),O(),pt(),r(!1)},[a,s,Z,J,te,tt,Q,q,c,L,t,n,A,j,P,U,O,pt,r,g,W,x,Fe?.exactMatch]);return b.useImperativeHandle(h,()=>({submit:ie}),[ie]),b.useEffect(()=>{x&&j!=null&&(R(null),V(!1))},[x,j]),b.useEffect(()=>{let ue=0;const Ne=B().url().safeParse(Z).success;te.length>0?ue=te.filter(De=>De.selected).length:Z&&Ne&&(ue=1),o(ue)},[Z,te,o]),b.useEffect(()=>{d?.(M||X)},[M,X,d]),l.jsxs(l.Fragment,{children:[s&&l.jsx(ga,{variant:"warning",title:p._({id:"03Wqo6"}),className:"mb-4",children:l.jsx(D,{id:"FpZZwa"})}),l.jsxs("div",{children:[l.jsxs("div",{className:"mb-3 flex flex-col gap-2",children:[!u&&l.jsxs("div",{className:"flex w-full items-end gap-2",children:[l.jsxs("div",{className:"flex w-full flex-col gap-2",children:[l.jsxs(ot,{htmlFor:"uri",children:[p._({id:"IagCbF"}),":"]}),l.jsx(fn,{name:"uri","data-cta":"admin-add-websites-uri-input",placeholder:"https://www.yourwebsite.com",onChange:Se,value:Z||i||ae,required:!0})]}),l.jsx(Oe,{"data-cta":"admin-add-websites-map-button",size:"sm",disabled:H||_||!Z,className:"whitespace-nowrap",loading:H||_,onClick:et,icon:l.jsx(Vu,{className:"size-4"}),children:l.jsx(D,{id:"x6tZRl"})})]}),u&&(H||_)&&l.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-fg",children:[l.jsx(Kr,{className:"size-4 animate-spin"}),l.jsx(D,{id:"y/vdiI"})]}),!u&&!S&&l.jsx("span",{className:"text-sm text-red-500",children:p._({id:"Z0L7pi"})}),l.jsxs("div",{className:$e("grid grid-cols-3 gap-3",x&&"opacity-50"),children:[l.jsxs("div",{className:"rounded-lg border border-border px-2.5 py-2",children:[l.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[l.jsx(Ry,{className:"size-3.5 shrink-0 text-muted-fg"}),l.jsx(ot,{htmlFor:"discoveryFrequency",className:"text-xs font-medium",children:l.jsx(D,{id:"fmYfOs"})}),l.jsx(ch,{locked:x}),l.jsx(cn,{title:p._({id:"Nw66ds",values:{checkCost:ce}}),children:l.jsx(ds,{className:"size-3 shrink-0 cursor-help text-muted-fg"})})]}),l.jsxs("div",{className:$e("space-y-2",x&&"pointer-events-none"),children:[l.jsxs(tr,{id:"discoveryFrequency",value:j??r0,disabled:x,onValueChange:ue=>{if(ue===r0){R(null),V(!1);return}R(ue)},children:[l.jsx(Yt,{value:r0,children:l.jsx(D,{id:"az8lvo"})}),wRt.map(ue=>l.jsx(Yt,{value:ue,children:v.updateFrequency[ue]},ue))]}),Q&&l.jsxs("div",{className:"space-y-2 border-t border-border pt-2",children:[Fe?.exactMatch?l.jsx(ga,{variant:"danger",title:p._({id:"e+b9hs"}),description:p._({id:"OBcj0f",values:{0:Fe.exactMatch.websiteUrl}})}):null,Fe&&!Fe.exactMatch?l.jsx(dSe,{overlappingRoots:Fe.overlappingRoots}):null,l.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l.jsx("span",{className:"text-xs text-muted-fg",children:l.jsx(D,{id:"Qf2DX5"})}),l.jsx(Di,{id:"autoIncludeNewPages",checked:P,disabled:x,onCheckedChange:V})]})]})]})]}),l.jsxs("div",{className:"rounded-lg border border-border px-2.5 py-2",children:[l.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[l.jsx(Lo,{className:"size-3.5 shrink-0 text-muted-fg"}),l.jsx(ot,{className:"text-xs font-medium",children:l.jsx(D,{id:"v+RR+W"})}),l.jsx(ch,{locked:x}),l.jsx(cn,{title:p._({id:"X0bNt1",values:{checkCost:ce,updateCost:Te}}),children:l.jsx(ds,{className:"size-3 shrink-0 cursor-help text-muted-fg"})})]}),l.jsx("div",{className:$e(x&&"pointer-events-none"),children:l.jsxs(tr,{value:A??kD,disabled:x,onValueChange:ue=>k(ue===kD?null:ue),children:[l.jsx(Yt,{value:kD,children:l.jsx(D,{id:"exUN1j"})}),af.map(ue=>l.jsx(Yt,{value:ue,children:v.updateFrequency[ue]},ue))]})})]}),l.jsxs("div",{className:"rounded-lg border border-border px-2.5 py-2",children:[l.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[l.jsx(bo,{className:"size-3.5 shrink-0 text-muted-fg"}),l.jsx(ot,{className:"text-xs font-medium",children:l.jsx(D,{id:"iDPr94"})}),l.jsx(ch,{locked:x}),l.jsx(cn,{title:p._({id:"iNnwP6"}),children:l.jsx(ds,{className:"size-3 shrink-0 cursor-help text-muted-fg"})})]}),l.jsx("div",{className:$e(x&&"pointer-events-none"),children:l.jsx(tr,{value:U,disabled:x,onValueChange:ue=>G(ue),children:Object.values(Qa).map(ue=>l.jsx(Yt,{value:ue,children:v.removalBehavior[ue]},ue))})})]})]})]}),l.jsx(yRt,{search:T,setSearch:N})]}),!u&&l.jsx(wi,{className:"z-50 flex flex-row justify-end gap-2 md:flex-row",children:l.jsx(Oe,{"data-cta":"admin-add-websites-add-button",disabled:M||X||s||a||!J.length&&!Z,loading:M||X,onClick:ie,children:Q?l.jsx(D,{id:"ht+6YP"}):l.jsx(D,{id:"m16xKo"})})})]})})),ERt=b.memo(function({chatIds:t,availableForAllAgents:n,setOpen:r,defaultUrl:i,limitReached:s,projectedLimitReached:a,onPendingCountChange:o,folderId:c}){const{i18n:u,_:d}=Me(),h=[{value:"website",label:u._({id:"On0aF2"}),icon:Vu},{value:"document",label:u._({id:"7Zdnlq"}),icon:Rj},{value:"rss",label:u._({id:"fD+f7T"}),icon:Mj},{value:"google_drive",label:u._({id:"Z4k6WI"}),icon:M9}],[p,g]=b.useState(i??""),[v,x]=b.useState(null),[_,w]=b.useState(null),[S,E]=b.useState(!1),[T,N]=b.useState(1);b.useEffect(()=>()=>o(0),[o]);const A=b.useRef(null),{refetch:k,isFetching:j}=Ae.documents.classifyUrl.useQuery({url:p},{enabled:!1,retry:!1}),R=Vy.safeParse(p).success,P=b.useCallback(async()=>
1401{if(!R)return;w(null);const{data:K,error:te}=await k();K?x(K.kind):(x("website"),w(te?.message??u._({id:"7dtCRY"})))},[R,k,d]),V=b.useCallback(async()=>{if(v===null){await P();return}await A.current?.submit()},[v,P]),U=K=>{g(K.target.value),v!==null&&(x(null),w(null))},G=b.useCallback(K=>{N(K),o(K)},[o]);b.useEffect(()=>{E(!1),N(1)},[v]);const Q=v===null,Z=Q?!R||j:S||s||a||T===0;return l.jsxs("div",{className:"flex flex-col gap-4",children:[l.jsxs("div",{className:"flex w-full items-end gap-2",children:[l.jsxs("div",{className:"flex w-full flex-col gap-2",children:[l.jsx(ot,{htmlFor:"online-source-url",children:l.jsx(D,{id:"tTqIfC"})}),l.jsx(fn,{id:"online-source-url",name:"online-source-url","data-cta":"admin-add-online-source-url-input",placeholder:"https://example.com",value:p,onChange:U})]}),v!==null&&l.jsxs("div",{className:"flex w-56 flex-col gap-2",children:[l.jsx(ot,{htmlFor:"online-source-kind",className:"text-xs font-medium text-muted-fg",children:l.jsx(D,{id:"+zy2Nq"})}),l.jsx(tr,{value:v,onValueChange:K=>x(K),children:h.map(K=>{const te=K.icon;return l.jsx(Yt,{value:K.value,children:l.jsxs("span",{className:"flex items-center gap-2",children:[l.jsx(te,{className:"size-4"}),K.label]})},K.value)})})]}),l.jsx(Oe,{"data-cta":"admin-add-online-source-action-button",size:"sm",variant:Q?"secondary":"primary",disabled:Z,loading:Q?j:S,onClick:V,icon:Q?l.jsx(Iy,{className:"size-4"}):void 0,className:"whitespace-nowrap",children:Q?l.jsx(D,{id:"A1taO8"}):l.jsx(D,{id:"m16xKo"})})]}),v!==null&&l.jsxs("div",{className:"flex flex-col gap-3",children:[_&&l.jsxs(ga,{variant:"warning",title:u._({id:"fXb8+p"}),children:[_," ",l.jsx(D,{id:"tOSx9H"})]}),l.jsxs("div",{className:"min-h-0",children:[v==="website"&&l.jsx(SRt,{ref:A,embedded:!0,chatIds:t,availableForAllAgents:n,setOpen:r,defaultUrl:p,limitReached:s,projectedLimitReached:a,onPendingCountChange:G,onSubmittingChange:E,folderId:c}),v==="document"&&l.jsx(iRt,{ref:A,embedded:!0,chatIds:t,availableForAllAgents:n,setOpen:r,defaultUrl:p,limitReached:s,projectedLimitReached:a,onPendingCountChange:G,onSubmittingChange:E,folderId:c}),v==="rss"&&l.jsx(sRt,{ref:A,embedded:!0,chatIds:t,availableForAllAgents:n,setOpen:r,defaultUrl:p,limitReached:s,projectedLimitReached:a,onSubmittingChange:E,folderId:c}),v==="google_drive"&&l.jsx(rRt,{ref:A,embedded:!0,chatIds:t,availableForAllAgents:n,setOpen:r,defaultUrl:p,limitReached:s,onSubmittingChange:E,folderId:c})]})]})]})});let CRt=class{value;next;constructor(t){this.value=t}};class TRt{#e;#t;#n;constructor(){this.clear()}enqueue(t){const n=new CRt(t);this.#e?(this.#t.next=n,this.#t=n):(this.#e=n,this.#t=n),this.#n++}dequeue(){const t=this.#e;if(t)return this.#e=this.#e.next,this.#n--,t.value}peek(){if(this.#e)return this.#e.value}clear(){this.#e=void 0,this.#t=void 0,this.#n=0}get size(){return this.#n}*[Symbol.iterator](){let t=this.#e;for(;t;)yield t.value,t=t.next}*drain(){for(;this.#e;)yield this.dequeue()}}function ARt(e){Yre(e);const t=new TRt;let n=0;const r=()=>{n<e&&t.size>0&&(t.dequeue()(),n++)},i=()=>{n--,r()},s=async(c,u,d)=>{const h=(async()=>c(...d))();u(h);try{await h}catch{}i()},a=(c,u,d)=>{new Promise(h=>{t.enqueue(h)}).then(s.bind(void 0,c,u,d)),(async()=>(await Promise.resolve(),n<e&&r()))()},o=(c,...u)=>new Promise(d=>{a(c,d,u)});return Object.defineProperties(o,{activeCount:{get:()=>n},pendingCount:{get:()=>t.size},clearQueue:{value(){t.clear()}},concurrency:{get:()=>e,set(c){Yre(c),e=c,queueMicrotask(()=>{for(;n<e&&t.size>0;)r()})}}}),o}function Yre(e){if(!((Number.isInteger(e)||e===Number.POSITIVE_INFINITY)&&e>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up")}const kRt=b.memo(function({file:t,onDelete:n,onClose:r,autoCloseMs:i}){const{i18n:s,_:a}=Me(),c=t.file.name.split(".").pop();return b.useEffect(()=>{if(i&&r&&t.status==="completed"){const u=setTimeout(()=>{r?.()},i);return()=>clearTimeout(u)}},[i,t.status,r]),l.jsxs("div",{className:"mt-2 flex h-16 w-full flex-row items-center justify-between gap-2 rounded-lg border border-solid border-border bg-white px-4 hover:bg-gray-50",children:[l.jsxs("div",{className:"flex h-full min-w-0 flex-row items-center gap-4",children:[t.file.type==="application/pdf"?l.jsx(ioe,{className:"size-6 shrink-0 text-rose-700"}):l.jsx(aoe,{className:"size-6 shrink-0 text-rose-700"}),l.jsxs("div",{className:"flex min-w-0 flex-col",children:[l.jsx("div",{className:"truncate text-[0.85rem] font-medium leading-snug",children:t.file.name}),l.jsxs("div",{className:"flex items-center gap-1 text-[0.7rem] leading-tight text-muted-fg",children:[l.jsxs("span",{className:"shrink-0",children:[".",c]}),l.jsx("span",{className:"shrink-0",children:"â¢"}),l.jsx("span",{className:"shrink-0",children:k5(t.file.size)}),t.status==="uploading"&&l.jsxs("span",{className:"flex shrink-0 items-center gap-1",children:[l.jsx("span",{children:"â¢"}),l.jsx(Kr,{className:"size-3 animate-spin"}),l.jsx("span",{children:s._({id:"GxkJXS"})})]}),t.status==="completed"&&l.jsxs("span",{className:"flex shrink-0 items-center gap-1",children:[l.jsx("span",{children:"â¢"}),l.jsx(jj,{className:"size-3 text-green-600"}),l.jsx("span",{children:s._({id:"3wG7HI"})})]}),t.status==="error"&&l.jsxs("span",{className:"shrink-0 text-red-500",children:[s._({id:"SlfejT"})," ",t.errorMessage]})]})]})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[t.status==="completed"&&n&&l.jsx(Oe,{type:"button",variant:"ghost",outline:!0,className:"text-danger",size:"icon-sm",onClick:n,"aria-label":s._({id:"cnGeoo"}),children:l.jsx(U9,{className:"size-4"})}),t.status!=="uploading"&&r&&l.jsx(Oe,{type:"button",variant:"ghost",outline:!0,size:"icon-sm",onClick:r,"aria-label":s._({id:"yz7wBu"}),children:l.jsx(pl,{className:"size-4"})})]})]})}),NRt=b.forwardRef(function({containerClassName:t,dropZoneClassName:n,children:r,showFilesList:i=!0,showErrorMessage:s=!0,uploadAdapter:a,maxConcurrentUploads:o=5,...c},u){const[d,h]=b.useState([]),[p,g]=b.useState(),v=b.useMemo(()=>ARt(o),[o]),x=async(N,A)=>{try{await v(()=>a.upload(N)),h(k=>k.map((j,R)=>R===A?{...j,status:"completed",progress:100}:j))}catch(k){console.error("Failed to upload file:",k),h(j=>j.map((R,P)=>P===A?{...R,status:"error",errorMessage:k instanceof Error?k.message:"Upload failed"}:R))}},_=N=>{const A=N.map(k=>({id:TB(),file:k,status:"uploading",progress:0}));h(k=>[...A,...k]),A.forEach((k,j)=>{x(N[j],j)})};b.useImperativeHandle(u,()=>({acceptFiles:_}));const w=async(N,A,k)=>{if(c.onDrop)c.onDrop(N,A,k);else if(_(N),A.length>0){let j=`Could not upload ${A[0].file.name}`;A.length>1&&(j=j+`, and ${A.length-1} other files.`);for(const R of A)console.error(R.errors);g(j)}else g("")},S=N=>{h(A=>[...A.slice(0,N),...A.slice(N+1)])},E=async N=>{const A=d[N];if(a.delete)try{await a.delete(A.file)}catch(k){console.error("Failed to delete file:",k);return}S(N)},T=CB({...c,onDrop:w});return l.jsxs("div",{className:$e("flex flex-col gap-2 h-full max-h-[300px] md:max-h-[500px]",t),children:[l.jsxs("div",{...T.getRootProps(),className:$e("flex justify-center py-6 items-center w-full h-44 border-dashed border border-gray-200 rounded-lg hover:bg-accent hover:text-accent-foreground transition-all select-none cursor-pointer",n),children:[l.jsx("input",{...T.getIn
1401putProps()}),r?r(T):l.jsx(hye,{dropzone:T,maxSize:c.maxSize})]}),s&&p&&l.jsx("span",{className:"mt-3 text-xs text-red-600",children:p}),i&&l.jsx(Ja.div,{className:$e("flex w-full flex-col gap-2 overflow-y-auto h-full"),initial:{opacity:0},animate:{opacity:1},children:d.map((N,A)=>l.jsx(Ja.div,{layout:!0,initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},children:l.jsx(kRt,{file:N,onDelete:a.delete&&(()=>E(A)),onClose:()=>S(A),autoCloseMs:2e3})},N.id))})]})});var ND,Xre;function jRt(){if(Xre)return ND;Xre=1;var e="Expected a function",t=NaN,n="[object Symbol]",r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,a=/^0o[0-7]+$/i,o=parseInt,c=typeof hr=="object"&&hr&&hr.Object===Object&&hr,u=typeof self=="object"&&self&&self.Object===Object&&self,d=c||u||Function("return this")(),h=Object.prototype,p=h.toString,g=Math.max,v=Math.min,x=function(){return d.Date.now()};function _(A,k,j){var R,P,V,U,G,Q,Z=0,K=!1,te=!1,ne=!0;if(typeof A!="function")throw new TypeError(e);k=N(k)||0,S(j)&&(K=!!j.leading,te="maxWait"in j,V=te?g(N(j.maxWait)||0,k):V,ne="trailing"in j?!!j.trailing:ne);function se(re){var ae=R,ce=P;return R=P=void 0,Z=re,U=A.apply(ce,ae),U}function H(re){return Z=re,G=setTimeout(M,k),K?se(re):U}function O(re){var ae=re-Q,ce=re-Z,Te=k-ae;return te?v(Te,V-ce):Te}function L(re){var ae=re-Q,ce=re-Z;return Q===void 0||ae>=k||ae<0||te&&ce>=V}function M(){var re=x();if(L(re))return q(re);G=setTimeout(M,O(re))}function q(re){return G=void 0,ne&&R?se(re):(R=P=void 0,U)}function X(){G!==void 0&&clearTimeout(G),Z=0,R=Q=P=G=void 0}function J(){return G===void 0?U:q(x())}function W(){var re=x(),ae=L(re);if(R=arguments,P=this,Q=re,ae){if(G===void 0)return H(Q);if(te)return G=setTimeout(M,k),se(Q)}return G===void 0&&(G=setTimeout(M,k)),U}return W.cancel=X,W.flush=J,W}function w(A,k,j){var R=!0,P=!0;if(typeof A!="function")throw new TypeError(e);return S(j)&&(R="leading"in j?!!j.leading:R,P="trailing"in j?!!j.trailing:P),_(A,k,{leading:R,maxWait:k,trailing:P})}function S(A){var k=typeof A;return!!A&&(k=="object"||k=="function")}function E(A){return!!A&&typeof A=="object"}function T(A){return typeof A=="symbol"||E(A)&&p.call(A)==n}function N(A){if(typeof A=="number")return A;if(T(A))return t;if(S(A)){var k=typeof A.valueOf=="function"?A.valueOf():A;A=S(k)?k+"":k}if(typeof A!="string")return A===0?A:+A;A=A.replace(r,"");var j=s.test(A);return j||a.test(A)?o(A.slice(2),j?2:8):i.test(A)?t:+A}return ND=w,ND}var RRt=jRt();const IRt=$c(RRt),ORt=IRt(dr,3e3),PRt=(e,t=!1,n,r)=>({upload:async i=>{try{const s=await Cs.documents.createDocument.mutate({fileName:i.name,contentType:i.type,size:i.size,chats:e,availableForAllAgents:t,folderId:n??null});if(!(await fetch(s.uploadUrl,{method:"PUT",body:i,mode:"cors",headers:{"Content-Type":i.type}})).ok)throw new Error("Failed to upload file to storage");await Cs.documents.update.mutate({id:s.document.id,status:qn.Ready}),ORt(),r?.()}catch(s){throw typeof s=="object"&&s&&"message"in s&&typeof s.message=="string"&&s.message.startsWith("Adding this document would exceed")?new Error(s.message):new Error(`Upload failed: ${s instanceof Error?s.message:"Unknown error"}`)}}}),MRt={"application/pdf":[".pdf"],"application/msword":[".doc",".dot"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[".docx"],"application/vnd.ms-word.document.macroEnabled.12":[".docm"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":[".dotx"],"application/vnd.ms-word.template.macroEnabled.12":[".dotm"],"application/rtf":[".rtf"],"application/vnd.ms-works":[".wps"],"application/x-wpd":[".wpd"],"application/vnd.sun.xml.writer":[".sxw"],"application/vnd.sun.xml.writer.template":[".stw"],"application/vnd.sun.xml.writer.global":[".sxg"],"application/x-iwork-pages-sffpages":[".pages"],"application/x-macwrite":[".mw",".mcw"],"application/uoml+xml":[".uot"],"application/uof":[".uof",".uos",".uop"],"application/vnd.ms-powerpoint":[".ppt",".pot"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":[".pptx"],"application/vnd.ms-powerpoint.presentation.macroEnabled.12":[".pptm"],"application/vnd.openxmlformats-officedocument.presentationml.template":[".potx"],"application/vnd.ms-powerpoint.template.macroEnabled.12":[".potm"],"application/x-iwork-keynote-sffkey":[".key"],"application/vnd.oasis.opendocument.presentation":[".odp"],"application/vnd.oasis.opendocument.graphics":[".odg"],"application/vnd.oasis.opendocument.presentation-template":[".otp"],"application/vnd.fdf":[".fopd"],"application/vnd.sun.xml.impress":[".sxi"],"application/vnd.sun.xml.impress.template":[".sti"],"application/epub+zip":[".epub"],"image/jpeg":[".jpg",".jpeg"],"image/png":[".png"],"image/gif":[".gif"],"image/bmp":[".bmp"],"image/svg+xml":[".svg"],"image/tiff":[".tiff"],"image/webp":[".webp"],"text/html":[".html",".htm"],"text/markdown":[".md",".markdown"],"application/vnd.ms-excel":[".xls",".xlw",".et",".xlr"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":[".xlsx"],"application/vnd.ms-excel.sheet.macroEnabled.12":[".xlsm"],"application/vnd.ms-excel.sheet.binary.macroEnabled.12":[".xlsb"],"text/csv":[".csv"],"text/plain":[".dif",".sylk",".slk",".prn"],"application/x-iwork-numbers-sffnumbers":[".numbers"],"application/vnd.oasis.opendocument.spreadsheet":[".ods"],"application/vnd.oasis.opendocument.spreadsheet-template":[".fods"],"application/x-dbf":[".dbf"],"application/x-123":[".wk1",".wk2",".wk3",".wk4",".wks"],"application/x-quattropro":[".wq1",".wq2",".qpw"],"application/x-lotus-1-2-3":[".wb1",".wb2",".wb3"],"application/octet-stream":[".eth"],"text/tab-separated-values":[".tsv"]};function DRt({chatIds:e,availableForAllAgents:t,limitReached:n,projectedLimitReached:r,folderId:i}){const{i18n:s,_:a}=Me(),o=PRt(e,t,i);return l.jsxs("div",{className:"flex h-full flex-col justify-between gap-2",children:[n&&l.jsx(ga,{variant:"warning",title:s._({id:"03Wqo6"}),className:"mb-4",children:l.jsx(D,{id:"EjgmYk"})}),l.jsx(ot,{className:"text-xs font-medium text-muted-fg",children:l.jsx(D,{id:"7WsMsZ"})}),l.jsx("div",{className:"grow",children:l.jsx(NRt,{uploadAdapter:o,accept:MRt,maxSize:50*1024*1024,disabled:n||r})})]})}const pC=b.memo(function({availableForAllAgents:t,setAvailableForAllAgents:n,selectedChatIds:r,setSelectedChatIds:i,availableAgents:s,currentChatId:a,inheritedChatIds:o=[],...c}){const{i18n:u,_:d}=Me(),h=g=>{n(g),i(g?[]:v=>v.length?v:a?[a]:[])},p=(g,v)=>{if(!g?.length)return[];let x=null;const _=[];for(const w of g){const S={value:w.id,label:w.name};v&&w.id===v?x=S:_.push(S)}return x&&_.unshift(x),_};return l.jsxs("div",{...c,children:[l.jsx("div",{className:"mb-2 text-sm",children:l.jsx(D,{id:"ZyJT/n"})}),l.jsxs("div",{className:"grid grid-cols-2 items-center gap-4",children:[l.jsxs("div",{className:"flex flex-row items-center gap-2",children:[l.jsx(Di,{id:"allAgentsSwitch",checked:t,onCheckedChange:h}),l.jsx(ot,{htmlFor:"allAgentsSwitch",className:"text-sm font-normal text-muted-fg",children:l.jsx(D,{id:"08gXZ9"})})]}),l.jsx(yve,{value:r,forcedDefaultValue:t?void 0:a,onChange:i,options:p(s,a),disabled:t,placeholder:u._({id:"2VrqGM"})})]}),o.length>0&&!t&&l.jsxs("div",{className:"mt-3 space-y-2",children:[l.jsx("p",{className:"text-xs text-muted-fg",children:l.jsx(D,{id:"muPFAY"})}),l.jsx("div",{className:"flex flex-wrap gap-1.5",children:o.map(g=>{const v=s.find(x=>x.id===g);return l.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md border border-dashed border-border bg-muted/50 px-2 py-0.5 text-xs text-muted-fg",children:[l.jsx(pm,{className:"size-3"}),v?.name??g]},g)})})]})]})});function FRt({isLoading:e,totalProjectedCount:t,limit:n,projectedLimitReached:r}){return l.jsx("div",{className:$e("text-sm font-medium",r&&n!==1/0?"text-red-600 font-medium":"text-gray-600"),children:e?l.jsx(D,{id:"SCM7VW"}):r&&n!==1/0?l.jsx(D,{id:"J0lT44",values:{totalProjectedCount:t,limit:n}}):l.jsx(D,{id:"Lx7XVT",values:{totalProjectedCount:t,0:n===1/0?"Unlimited":n}})})}const Qre="flex items-center gap-2 px-4 py-2 text-sm font-medium data-[state=active]:border-b-2 data-[state=active]:border-primary",fSe=b.memo(function({chatId:t,allChats:n,folderId:r,defaultOpen:i=!1,defaultUrl:s,externalOpen:a,onExternalOpenChange:o}){const c=a!==void 0,[u,d]=b.useState(i),h=c?a:u,p=c?O=>o?.(O):d,[g,v]=b.useState("online"),{currentOrganizationId:x}=ps(),[_,w]=b.useState(t?[t]:[]),[S,E]=b.useState(!1),[T,N]=b.useState(0),{data:A,isLoading:k}=Ae.chats.findOne.useQuery({id:t,populate:["documentsCount","organization.tierConfig"]},{enabled:!!t}),j=A?.organization?.id??x,{data:R,isLoading:P}=Ae.subscriptions.getActive.useQuery({organizationId:j},{enabled:!!j}),V=Number(t?A?.documentsCount??0:R?.currentDocumentCount??0),U=V+T,G=R?.maxDocuments??1/0,Q=V>G,Z=U>G,K=t?!!A?.organization.tierConfig?.allowSharedData:n.length>0,te=b.useRef(null),ne=b.useRef(null),se={online:te,upload:ne};b.useEffect(()=>{s&&v("online")},[s]);const H=O=>{O.preventDefault(),se[g]?.current?.focus()};return l.jsxs(ui,{defaultOpen:c?void 0:i,open:h,onOpenChange:O=>{p(O),O&&(E(!1),w(t?[t]:[]),v("online"))},children:[!c&&l.jsx(u5,{asChild:!0,children:l.jsx(Oe,{"data-cta":"admin-add-documents-modal-trigger",children:l.jsx(D,{id:"oUl76x"})})}),l.jsxs(Fi,{className:"flex max-h-full min-h-[400px] w-[1000px] max-w-full flex-col overflow-auto",onOpenAutoFocus:H,children:[l.jsxs(ks,{children:[l.jsx(Wi,{children:l.jsx(D,{id:"oUl76x"})}),l.jsx(no,{children:l.jsx(D,{id:"vxExMN"})})]}),l.jsx(FRt,{isLoading:k||P,totalProjectedCount:U,limit:G,projectedLimitReached:Z}),K&&l.jsx("div",{className:"my-2",children:l.jsx(pC,{availableForAllAgents:S,setAvailableForAllAgents:E,selectedChatIds:_,setSelectedChatIds:w,availableAgents:n,currentChatId:t})}),l.jsxs(Sx,{value:g,onValueChange:O=>{(O==="online"||O==="upload")&&v(O)},className:"flex min-h-0 flex-1 flex-col",children:[l.jsx(Ex,{className:"border-b border-border",children:l.jsxs("div",{className:"flex gap-2",children:[l.jsxs(Ji,{value:"online",ref:te,"data-cta":"admin-add-documents-modal-online-tab",className:Qre,children:[l.jsx(Vu,{className:"size-4"}),l.jsx(D,{id:"QAMCKT"})]}),l.jsxs(Ji,{value:"upload",ref:ne,"data-cta":"admin-add-documents-modal-upload-tab",className:Qre,children:[l.jsx(V9,{className:"size-4"}),l.jsx(D,{id:"F6m23G"})]})]})}),l.jsx(es,{value:"online",className:"flex min-h-0 flex-1 flex-col gap-4 py-4",children:l.jsx(ERt,{chatIds:_,availableForAllAgents:S,setOpen:p,defaultUrl:s,limitReached:Q,projectedLimitReached:Z,onPendingCountChange:N,folderId:r})}),l.jsx(es,{value:"upload",className:"flex min-h-0 flex-1 flex-col py-4",children:l.jsx(DRt,{chatIds:_,availableForAllAgents:S,limitReached:Q,projectedLimitReached:Z,folderId:r})})]})]})]})}),LRt=[{value:"0.01",label:"1%"},{value:"0.05",label:"5%"},{value:"0.1",label:"10%"},{value:"0.2",label:"20%"}],zRt=b.memo(function(){const{i18n:t,_:n}=Me(),r=Ir(),{hasAccess:i}=Uc(),{organization:s}=Vc(),{check:a,update:o}
1401=hC(s?.currency),{isKbAutoUpdatesLocked:c}=Xu(),u=i([Jt.SuperAdmin]),[d,h]=b.useState(!1),[p,g]=b.useState("auto-update"),{data:v,isLoading:x}=Ae.organizations.getAutoUpdateSettings.useQuery(void 0,{enabled:d}),_=Ae.useUtils(),w=Ae.organizations.updateAutoUpdateSettings.useMutation({onSuccess:()=>{_.organizations.getAutoUpdateSettings.invalidate()}}),S=yb(),[E,T]=b.useState(!1),[N,A]=b.useState(Vn.Never),[k,j]=b.useState("0.01"),[R,P]=b.useState("");b.useEffect(()=>{v&&(T(v.documentAutoUpdateEnabled),A(v.documentUpdateFrequency),j(String(v.documentChangeThreshold)))},[v]),b.useEffect(()=>{d||(P(""),g("auto-update"))},[d]);const V=async()=>{c||(await w.mutateAsync({documentAutoUpdateEnabled:E,documentUpdateFrequency:N,documentChangeThreshold:u?Number(k):v?.documentChangeThreshold??.01}),h(!1))},U=async()=>{try{await S.resetAllEmbeddingsByOrg.mutateAsync(),Re.success(t._({id:"u8Rm7Z"})),P("")}catch{Re.error(t._({id:"s04wy0"}))}},G=af,Q="px-4 py-2 text-sm font-medium data-[state=active]:border-b-2 data-[state=active]:border-primary";return l.jsxs(ui,{open:d,onOpenChange:h,children:[l.jsx(u5,{asChild:!0,children:l.jsx(Oe,{variant:"ghost",outline:!0,size:"icon-sm",title:t._({id:"Kqx1M7"}),children:l.jsx(Dj,{className:"size-4"})})}),l.jsxs(Fi,{className:"w-full max-w-md",children:[l.jsx(Wi,{children:l.jsx(D,{id:"aQ/R4+"})}),l.jsxs(Sx,{value:p,onValueChange:g,className:"flex min-h-0 flex-col",children:[l.jsx(Ex,{className:"border-b border-border",children:l.jsxs("div",{className:"flex gap-2",children:[l.jsx(Ji,{value:"auto-update",className:Q,children:l.jsx(v4,{locked:c,children:l.jsx(D,{id:"xes1fn"})})}),u&&l.jsx(Ji,{value:"maintenance",className:Q,children:l.jsx(D,{id:"6Dd2PM"})})]})}),l.jsxs(es,{value:"auto-update",className:"py-4",children:[l.jsx(no,{className:"mb-4",children:l.jsx(D,{id:"/F1Xao"})}),l.jsx(Eve,{paused:c&&N!==Vn.Never,className:"mb-4"}),x?l.jsx("div",{className:"py-8 text-center text-sm text-gray-500",children:l.jsx(D,{id:"Z3FXyt"})}):l.jsxs("div",{className:$e("flex flex-col gap-5",c&&"opacity-50"),children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx(ot,{htmlFor:"autoUpdateEnabled",children:l.jsx(D,{id:"ldXYx6"})}),l.jsx(Di,{id:"autoUpdateEnabled",checked:E,disabled:c,onCheckedChange:T})]}),l.jsxs("div",{className:"flex flex-col gap-2",children:[l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx(ot,{htmlFor:"updateFrequency",children:l.jsx(D,{id:"8rueUI"})}),l.jsx(cn,{title:t._({id:"oQeT4k",values:{checkCost:a,updateCost:o}}),children:l.jsx(ds,{className:"size-3.5 shrink-0 cursor-help text-muted-fg"})})]}),l.jsx(tr,{id:"updateFrequency",value:N,onValueChange:Z=>A(Z),disabled:!E||c,children:G.map(Z=>l.jsx(Yt,{value:Z,children:r.updateFrequency[Z]},Z))})]}),u&&l.jsxs("div",{className:"flex flex-col gap-2",children:[l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx(ot,{htmlFor:"changeThreshold",children:l.jsx(D,{id:"ZO04uo"})}),l.jsx(cn,{title:t._({id:"Y6L3sr"}),children:l.jsx(ds,{className:"size-3.5 shrink-0 cursor-help text-muted-fg"})})]}),l.jsx(tr,{id:"changeThreshold",value:k,onValueChange:j,disabled:!E||c,children:LRt.map(Z=>l.jsx(Yt,{value:Z.value,children:Z.label},Z.value))})]})]}),l.jsxs(wi,{className:"mt-4",children:[l.jsx(Oe,{variant:"ghost",outline:!0,onClick:()=>h(!1),disabled:w.isPending,children:l.jsx(D,{id:"dEgA5A"})}),l.jsx(Oe,{onClick:V,loading:w.isPending,disabled:x||c,children:l.jsx(D,{id:"tfDRzk"})})]})]}),u&&l.jsx(es,{value:"maintenance",className:"py-4",children:l.jsx("div",{className:"flex flex-col gap-4",children:l.jsxs("div",{className:"rounded-lg border border-danger/30 bg-danger/5 p-4",children:[l.jsx("h4",{className:"mb-2 font-medium text-danger",children:l.jsx(D,{id:"GhAQ2f"})}),l.jsx("p",{className:"mb-4 text-sm text-muted-fg",children:l.jsx(D,{id:"TyrSEe"})}),l.jsxs("div",{className:"flex flex-col gap-3",children:[l.jsxs("div",{className:"flex flex-col gap-1.5",children:[l.jsx(ot,{htmlFor:"confirmReset",className:"text-sm",children:l.jsx(D,{id:"V1QF+i",components:{0:l.jsx("strong",{})}})}),l.jsx(fn,{id:"confirmReset",value:R,onChange:Z=>P(Z.target.value),placeholder:"RESET"})]}),l.jsx(Oe,{variant:"danger",onClick:U,loading:S.resetAllEmbeddingsByOrg.isPending,disabled:R!=="RESET"||S.resetAllEmbeddingsByOrg.isPending,children:l.jsx(D,{id:"GhAQ2f"})})]})]})})})]})]})]})});function $Rt(e){if(e.rowType==="document"){const t=e.data,n=Array.isArray(t.chats)?t.chats.map(i=>typeof i=="string"?i:typeof i=="object"&&i&&"id"in i?String(i.id):null).filter(i=>i!==null):[],r=Array.isArray(t.effectiveChatIds)?t.effectiveChatIds.filter(i=>typeof i=="string"):[];return{chatIds:n.length>0?n:r,availableForAllAgents:!!t.availableForAllAgents}}if(e.rowType==="folder"){const t=e.data;return{chatIds:Array.isArray(t.chats)?t.chats.map(r=>typeof r=="string"?r:typeof r=="object"&&r&&"id"in r?String(r.id):null).filter(r=>r!==null):[],availableForAllAgents:!!t.availableForAllAgents}}return null}const hSe=b.memo(function({open:t,onOpenChange:n,selectedRows:r,mutations:i}){const{i18n:s,_:a}=Me(),[o,c]=b.useState(!1),[u,d]=b.useState([]),h=b.useMemo(()=>r.filter(T=>T.rowType==="document"||T.rowType==="folder"),[r]),p=b.useMemo(()=>h.filter(T=>T.rowType==="document").map(T=>T.id),[h]),g=b.useMemo(()=>h.filter(T=>T.rowType==="folder").map(T=>T.id),[h]),{data:v}=Ae.chats.findAll.useQuery({pagination:{pageSize:100},fields:["id","name"]},{enabled:t}),x=b.useMemo(()=>{const T=h.map($Rt).filter(R=>R!==null);if(T.length===0)return{sharedChatIds:[],partialChatIds:[],availableForAllCount:0,totalItems:0};const N=new Map;for(const R of T){const P=new Set(R.chatIds);for(const V of P)N.set(V,(N.get(V)??0)+1)}
1401const A=T.length,k=[...N.entries()].filter(([,R])=>R===A).map(([R])=>R),j=[...N.entries()].filter(([,R])=>R>0&&R<A).map(([R])=>R);return{sharedChatIds:k,partialChatIds:j,availableForAllCount:T.filter(R=>R.availableForAllAgents).length,totalItems:A}},[h]),_=b.useMemo(()=>new Map((v?.items??[]).map(T=>[T.id,T.name])),[v?.items]),w=T=>T.map(N=>_.get(N)??N).join(", ");b.useEffect(()=>{t||(c(!1),d([]))},[t]);const S=async()=>{try{await Promise.all([p.length>0?i.bulkAssign.mutateAsync({documentIds:p,chatIds:o?[]:u,availableForAllAgents:o}):Promise.resolve(),g.length>0?i.bulkAssignFoldersToChats.mutateAsync({folderIds:g,chatIds:o?[]:u,availableForAllAgents:o}):Promise.resolve()]),Re.success(s._({id:"eLES6k"})),n(!1)}catch{Re.error(s._({id:"+HX3tc"}))}},E=i.bulkAssign.isPending||i.bulkAssignFoldersToChats.isPending;return l.jsx(ui,{open:t,onOpenChange:n,children:l.jsxs(Fi,{className:"w-full max-w-[680px]",children:[l.jsxs(ks,{children:[l.jsx(Wi,{children:l.jsx(D,{id:"AtiynM"})}),l.jsx(no,{children:l.jsx(D,{id:"DTW4tA"})})]}),l.jsxs("div",{className:"space-y-4 py-2",children:[l.jsx("div",{className:"rounded-md border border-border bg-muted/40 p-3 text-sm text-muted-fg",children:x.totalItems===0?l.jsx("p",{children:l.jsx(D,{id:"lTfqie"})}):l.jsxs("div",{className:"space-y-1.5",children:[x.sharedChatIds.length>0&&l.jsxs("p",{children:[l.jsx(D,{id:"rsUIjT"})," ",w(x.sharedChatIds)]}),x.partialChatIds.length>0&&l.jsxs("p",{children:[l.jsx(D,{id:"OB+PbI"})," ",w(x.partialChatIds)]}),x.sharedChatIds.length===0&&x.partialChatIds.length===0&&l.jsx("p",{children:l.jsx(D,{id:"8dD4GX"})}),l.jsx("p",{children:l.jsx(D,{id:"VeovXB",values:{0:x.availableForAllCount,1:x.totalItems}})})]})}),l.jsx("div",{className:"rounded-md border border-warning/40 bg-warning/10 p-3 text-sm text-warning-fg",children:l.jsx(D,{id:"rRjcnz"})}),l.jsx(pC,{availableForAllAgents:o,setAvailableForAllAgents:c,selectedChatIds:u,setSelectedChatIds:d,availableAgents:v?.items??[]})]}),l.jsxs(wi,{children:[l.jsx(Oe,{variant:"ghost",outline:!0,onClick:()=>n(!1),children:l.jsx(D,{id:"dEgA5A"})}),l.jsx(Oe,{onClick:S,loading:E,children:l.jsx(D,{id:"tfDRzk"})})]})]})})});function zU(e){return!!e&&!!e.sourceType&&e.sourceType!==$r.Upload}function pSe(e){return!!e&&e.sourceUri!=null}function YL(e){return!!e&&e.sourceType===$r.Website&&pSe(e)}function K_(e){if(e.length===0)return;const t=e[0];return e.every(n=>n===t)?t:void 0}const mSe=b.memo(function({open:t,onOpenChange:n,selectedRows:r,mutations:i}){const{i18n:s,_:a}=Me(),{hasAccess:o}=Uc(),c=o([Jt.SuperAdmin]),[u,d]=b.useState(void 0),[h,p]=b.useState(void 0),[g,v]=b.useState(void 0),[x,_]=b.useState(void 0),[w,S]=b.useState(void 0),E=b.useMemo(()=>r.filter(Q=>Q.rowType==="document"),[r]),T=b.useMemo(()=>E.filter(Q=>Q.data.type!==Mr.Document),[E]),N=b.useMemo(()=>r.filter(Q=>Q.rowType==="folder"),[r]),A=E.length-T.length,k=b.useMemo(()=>T.map(Q=>Q.id),[T]),j=b.useMemo(()=>N.map(Q=>Q.id),[N]),R=b.useMemo(()=>N.some(Q=>{const Z=Q.data;return!!Z.sourceUri||!!Z.websitePathPrefix}),[N]),P=b.useMemo(()=>N.some(Q=>YL(Q.data)),[N]),V=b.useMemo(()=>{const Q=E.map(K=>{const te=K.data;return{updateFrequency:te.updateFrequency??null,changeThreshold:typeof te.changeThreshold=="number"?te.changeThreshold:null}}),Z=N.map(K=>{const te=K.data,ne=zU(te),se=YL(te);return{updateFrequency:te.updateFrequency??null,discoveryFrequency:se?te.discoveryFrequency??null:void 0,changeThreshold:typeof te.changeThreshold=="number"?te.changeThreshold:null,autoIncludeNewPages:ne?te.autoIncludeNewPages??null:void 0,removalBehavior:ne?te.removalBehavior??null:void 0}});return{docs:Q,folders:Z}},[E,N]);b.useEffect(()=>{if(!t){d(void 0),p(void 0),v(void 0),_(void 0),S(void 0);return}const Q=[...V.docs,...V.folders];if(d(K_(Q.map(Z=>Z.updateFrequency))),v(K_(Q.map(Z=>Z.changeThreshold))),R){const Z=V.folders.filter(K=>K.autoIncludeNewPages!==void 0&&K.removalBehavior!==void 0);_(K_(Z.map(K=>K.autoIncludeNewPages??null))),S(K_(Z.map(K=>K.removalBehavior??null)))}else _(void 0),S(void 0);if(P){const Z=V.folders.filter(K=>K.discoveryFrequency!==void 0);p(K_(Z.map(K=>K.discoveryFrequency??null)))}else p(void 0)},[t,R,P,V]);const U=async()=>{const Q=c?g:void 0,Z=k.length>0&&(u!==void 0||Q!==void 0),K=j.length>0&&(u!==void 0||h!==void 0||Q!==void 0||x!==void 0||w!==void 0);if(!Z&&!K){Re.error(s._({id:"ixz+C0"}));return}try{await Promise.all([Z?i.bulkUpdateDocumentsAutoUpdate.mutateAsync({documentIds:k,updateFrequency:u,changeThreshold:Q}):Promise.resolve(),K?i.bulkUpdateFoldersAutoUpdate.mutateAsync({folderIds:j,updateFrequency:u,discoveryFrequency:h,changeThreshold:Q,autoIncludeNewPages:x,removalBehavior:w}):Promise.resolve()]),Re.success(s._({id:"Hoy/rC"})),n(!1)}catch{Re.error(s._({id:"KOsH5A"}))}},G=i.bulkUpdateDocumentsAutoUpdate.isPending||i.bulkUpdateFoldersAutoUpdate.isPending;return l.jsx(ui,{open:t,onOpenChange:n,children:l.jsxs(Fi,{className:"w-full max-w-[680px]",children:[l.jsxs(ks,{children:[l.jsx(Wi,{children:l.jsx(D,{id:"Kqx1M7"})}),l.jsx(no,{children:l.jsx(D,{id:"uxHK7w"})})]}),l.jsxs("div",{className:"space-y-4 py-2",children:[l.jsx("div",{className:"rounded-md border border-border bg-muted/40 p-3 text-sm text-muted-fg",children:l.jsx(D,{id:"rvI074",values:{0:E.length,1:j.length}})}),A>0&&l.jsx("div",{className:"rounded-md border border-border bg-muted/40 p-3 text-sm text-muted-fg",children:l.jsx(D,{id:"o0aYbK",values:{skippedManualDocumentsCount:A}})}),R&&l.jsx("div",{className:"rounded-md border border-border bg-muted/40 p-3 text-sm text-muted-fg",children:l.jsx(D,{id:"6FsA
1401je"})}),l.jsx(LU,{mode:"bulk",showChangeThreshold:c,showDiscoveryFrequency:P,showWebsiteFields:R,showAutoIncludeRootScanHint:R&&!P,updateFrequency:u,discoveryFrequency:h,changeThreshold:g,autoIncludeNewPages:x,removalBehavior:w,onUpdateFrequencyChange:d,onDiscoveryFrequencyChange:p,onChangeThresholdChange:v,onAutoIncludeNewPagesChange:_,onRemovalBehaviorChange:S})]}),l.jsxs(wi,{children:[l.jsx(Oe,{variant:"ghost",outline:!0,onClick:()=>n(!1),children:l.jsx(D,{id:"dEgA5A"})}),l.jsx(Oe,{onClick:U,loading:G,children:l.jsx(D,{id:"tfDRzk"})})]})]})})});function BRt(){const{i18n:e,_:t}=Me();return b.useMemo(()=>({1:e._({id:"nTWWCZ"}),2:e._({id:"b/KwEM"}),3:e._({id:"CsekCi"}),4:e._({id:"eVteFO"}),5:e._({id:"yx/fMc"})}),[t])}const gSe=[1,2,3,4,5];function $U(e){return Math.min(5,Math.max(1,Math.round(e*4)+1))}function URt(e){return(Number(e)-1)/4}const xSe={1:"0",2:"0.25",3:"0.5",4:"0.75",5:"1"},VRt=[4,6,8,10,12],HRt=b.memo(function({scale:t,variant:n="default",className:r}){const i=n==="muted";return l.jsx("div",{className:$e("flex items-end gap-0.5",r),children:VRt.map((s,a)=>{const o=a+1,c=t>=o;return l.jsx("span",{className:$e("w-1 rounded-sm",c?i?"bg-muted-fg/50":"bg-primary":"bg-muted-fg/20"),style:{height:`${s}px`}},o)})})}),q1=b.memo(function({weight:t=.5,scale:n,variant:r="default",showLabel:i=!0}){const s=BRt(),a=n??$U(t),o=s[a],c=r==="muted";return l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{"aria-label":o,title:o,children:l.jsx(HRt,{scale:a,variant:r})}),i&&l.jsx("span",{className:$e("text-xs font-medium",c?"text-muted-fg":"text-foreground"),children:o})]})}),Cw="__keep_unchanged__",BU=b.memo(function({value:t,onValueChange:n,includeKeepUnchanged:r=!1,placeholder:i,id:s}){return l.jsxs(tr,{id:s,value:t,onValueChange:n,placeholder:i,children:[r&&l.jsx(Yt,{value:Cw,children:l.jsx(D,{id:"x2PCFh"})}),gSe.map(a=>l.jsx(Yt,{value:xSe[a],children:l.jsx(q1,{scale:a})},a))]})});function qRt(e){if(e.length===0)return;const t=e[0];return e.every(n=>n===t)?t:void 0}const vSe=b.memo(function({open:t,onOpenChange:n,selectedRows:r,mutations:i}){const{i18n:s,_:a}=Me(),[o,c]=b.useState(Cw),[u,d]=b.useState(!1),h=b.useMemo(()=>r.filter(_=>_.rowType==="document"),[r]),p=b.useMemo(()=>r.filter(_=>_.rowType==="folder"),[r]),g=b.useMemo(()=>h.map(_=>_.id),[h]),v=b.useMemo(()=>p.map(_=>_.id),[p]);b.useEffect(()=>{if(!t){c(Cw);return}const _=[...h.map(S=>S.data.weight).filter(S=>typeof S=="number"),...p.map(S=>S.data.defaultWeight).filter(S=>typeof S=="number")],w=qRt(_);c(w===void 0?Cw:xSe[$U(w)])},[h,p,t]);const x=async()=>{if(g.length===0&&v.length===0){Re.error(s._({id:"9S7yX2"}));return}if(o===Cw){Re.error(s._({id:"fCCglu"}));return}const _=Number.parseFloat(o);d(!0);try{const w=[];g.length>0&&w.push(i.bulkWeight.mutateAsync({documentIds:g,weight:_})),v.length>0&&w.push(...v.map(S=>i.updateFolder.mutateAsync({id:S,defaultWeight:_}))),await Promise.all(w),Re.success(s._({id:"RfCLxd"})),n(!1)}catch{Re.error(s._({id:"IduvKA"}))}finally{d(!1)}};return l.jsx(ui,{open:t,onOpenChange:n,children:l.jsxs(Fi,{className:"w-full max-w-[560px]",children:[l.jsxs(ks,{children:[l.jsx(Wi,{children:l.jsx(D,{id:"6IlsEP"})}),l.jsx(no,{children:l.jsx(D,{id:"17cvhe"})})]}),l.jsxs("div",{className:"space-y-4 py-2",children:[g.length>0&&l.jsx("div",{className:"rounded-md border border-border bg-muted/40 p-3 text-sm text-muted-fg",children:l.jsx(D,{id:"ZZPHEw",values:{0:g.length}})}),v.length>0&&l.jsx("div",{className:"rounded-md border border-border bg-muted/40 p-3 text-sm text-muted-fg",children:l.jsx(D,{id:"zTuWGI",values:{0:v.length}})}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("p",{className:"text-sm font-medium",children:l.jsx(D,{id:"1hKEom"})}),l.jsx(BU,{value:o,onValueChange:c,includeKeepUnchanged:!0})]})]}),l.jsxs(wi,{children:[l.jsx(Oe,{variant:"ghost",outline:!0,onClick:()=>n(!1),children:l.jsx(D,{id:"dEgA5A"})}),l.jsx(Oe,{onClick:x,loading:u,children:l.jsx(D,{id:"tfDRzk"})})]})]})})});function ySe(){return l.jsx("p",{className:"text-xs text-muted-fg",children:l.jsx(D,{id:"OGEb5X"})})}function bSe(){const{i18n:e,_:t}=Me();return e._({id:"0corCQ"})}function WRt(){const{i18n:e,_:t}=Me();return e._({id:"/xBTXT"})}const ru="__inherit__",GRt=[{value:ru,label:"Inherit"},{value:"0.01",label:"1%"},{value:"0.05",label:"5%"},{value:"0.1",label:"10%"},{value:"0.2",label:"20%"}],KRt=b.memo(function({open:t,onOpenChange:n,parentId:r,mutations:i,chatId:s}){const{i18n:a,_:o}=Me(),c=Ir(),{organization:u}=Vc(),{check:d,update:h}=hC(u?.currency),{hasAccess:p}
1401=Uc(),g=p([Jt.SuperAdmin]),{canUseKbAutoUpdates:v,isKbAutoUpdatesLocked:x}=Xu(),[_,w]=b.useState("general"),[S,E]=b.useState(""),[T,N]=b.useState(""),[A,k]=b.useState("1"),[j,R]=b.useState(ru),[P,V]=b.useState(ru),[U,G]=b.useState(!1),[Q,Z]=b.useState(s?[s]:[]),{data:K}=Ae.chats.findAll.useQuery({pagination:{pageSize:100},fields:["id","name"]},{enabled:t}),te=()=>{E(""),N(""),k("1"),R(ru),V(ru),G(!1),Z(s?[s]:[]),w("general")},ne=async()=>{if(S.trim())try{const H=await i.createFolder.mutateAsync({name:S.trim(),description:T.trim()||void 0,parentId:r,defaultWeight:Number.parseFloat(A),availableForAllAgents:U,chatIds:U?[]:Q});v&&(j!==ru||g&&P!==ru)&&await i.updateFolder.mutateAsync({id:H.id,updateFrequency:j===ru?null:j||null,changeThreshold:g&&P!==ru&&Number.parseFloat(P)||null}),te(),n(!1),Re.success(a._({id:"M5h+11"}))}catch{Re.error(a._({id:"K1ckLX"}))}},se="px-4 py-2 text-sm font-medium data-[state=active]:border-b-2 data-[state=active]:border-primary";return l.jsx(ui,{open:t,onOpenChange:H=>{H&&te(),n(H)},children:l.jsxs(Fi,{className:"w-[600px]",children:[l.jsxs(ks,{children:[l.jsx(Wi,{children:l.jsx(D,{id:"boJ+Y1"})}),l.jsx(no,{children:l.jsx(D,{id:"av5J9V"})})]}),l.jsxs(Sx,{value:_,onValueChange:w,className:"flex min-h-0 flex-col",children:[l.jsx(Ex,{className:"border-b border-border",children:l.jsxs("div",{className:"flex gap-2",children:[l.jsx(Ji,{value:"general",className:se,children:l.jsx(D,{id:"Weq9zb"})}),l.jsx(Ji,{value:"auto-update",className:se,children:l.jsx(v4,{locked:x,children:l.jsx(D,{id:"xes1fn"})})}),l.jsx(Ji,{value:"agents",className:se,children:l.jsx(D,{id:"ExckNx"})})]})}),l.jsxs(es,{value:"general",className:"space-y-4 py-4",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{htmlFor:"folderName",children:l.jsx(D,{id:"6YtxFj"})}),l.jsx(fn,{id:"folderName",value:S,onChange:H=>E(H.target.value),placeholder:a._({id:"cqQyPB"}),autoFocus:!0,onKeyDown:H=>{H.key==="Enter"&&ne()}})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{htmlFor:"folderDescription",children:l.jsx(D,{id:"Nu4oKW"})}),l.jsx(fn,{id:"folderDescription",value:T,onChange:H=>N(H.target.value),placeholder:a._({id:"pbzA+s"})})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{htmlFor:"defaultWeight",children:l.jsx(D,{id:"RgMFX7"})}),l.jsx(BU,{id:"defaultWeight",value:A,onValueChange:k}),l.jsx(ySe,{})]})]}),l.jsx(es,{value:"auto-update",className:"space-y-4 py-4",children:l.jsxs("fieldset",{disabled:x,className:"space-y-4 disabled:pointer-events-none disabled:opacity-50",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx(ot,{children:l.jsx(D,{id:"8rueUI"})}),l.jsx(cn,{title:a._({id:"oQeT4k",values:{checkCost:d,updateCost:h}}),children:l.jsx(ds,{className:"size-3.5 shrink-0 cursor-help text-muted-fg"})})]}),l.jsxs(tr,{value:j,onValueChange:R,children:[l.jsx(Yt,{value:ru,children:l.jsx(D,{id:"exUN1j"})}),af.map(H=>l.jsx(Yt,{value:H,children:c.updateFrequency[H]},H))]})]}),g&&l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx(ot,{children:l.jsx(D,{id:"OKGhpQ"})}),l.jsx(cn,{title:a._({id:"DVR1sG"}),children:l.jsx(ds,{className:"size-3.5 shrink-0 cursor-help text-muted-fg"})})]}),l.jsx(tr,{value:P,onValueChange:V,children:GRt.map(H=>l.jsx(Yt,{value:H.value,children:H.value===ru?a._({id:"exUN1j"}):H.label},H.value))})]})]})}),l.jsxs(es,{value:"agents",className:"space-y-4 py-4",children:[l.jsx("p",{className:"text-sm text-muted-fg",children:l.jsx(D,{id:"kd2HWU"})}),K?.items&&l.jsx(pC,{availableForAllAgents:U,setAvailableForAllAgents:G,selectedChatIds:Q,setSelectedChatIds:Z,availableAgents:K.items,currentChatId:s})]})]}),l.jsxs(wi,{children:[l.jsx(Oe,{variant:"ghost",outline:!0,onClick:()=>n(!1),children:l.jsx(D,{id:"dEgA5A"})}),l.jsx(Oe,{onClick:ne,loading:i.createFolder.isPending||i.updateFolder.isPending,disabled:!S.trim(),children:l.jsx(D,{id:"hYgDIe"})})]})]})})}),_Se=b.memo(function({open:t,onOpenChange:n,folders:r,mutations:i,onDeleted:s}){const{i18n:a,_:o}=Me(),c=r.length>1,u=r.length===1?r[0]:void 0,d=async()=>{try{for(const h of r)await i.deleteFolder.mutateAsync({id:h.id,strategy:"cascade"});n(!1),s?.(),c?Re.success(a._({id:"xj1sr0"})):Re.success(a._({id:"AgTsvS"}))}catch{Re.error(a._({id:"6qBHCH"}))}};return l.jsx(ui,{open:t,onOpenChange:n,children:l.jsxs(Fi,{className:"w-[500px]",children:[l.jsxs(ks,{children:[l.jsxs(Wi,{className:"flex items-center gap-2 text-danger",children:[l.jsx(tE,{className:"size-5"}),c?l.jsx(D,{id:"HS1sSv"}):l.jsx(D,{id:"97QUV6"})]}),l.jsx(no,{children:c?l.jsx(D,{id:"w9sKN+",values:{0:r.length}}):l.jsx(D,{id:"t4Lhzz",values:{0:u?.name}})})]}),l.jsxs(wi,{children:[l.jsx(Oe,{variant:"ghost",outline:!0,onClick:()=>n(!1),children:l.jsx(D,{id:"dEgA5A"})}),l.jsx(Oe,{variant:"danger",onClick:d,loading:i.deleteFolder.isPending,children:l.jsx(D,{id:"cnGeoo"})})]})]})})}),YRt=b.memo(function({open:t,onOpenChange:n,folderId:r,defaultTab:i="general",mutations:s}){const{i18n:a,_:o}=Me(),{hasAccess:c}
1401=Uc(),u=c([Jt.SuperAdmin]),{canUseKbAutoUpdates:d,isKbAutoUpdatesLocked:h}=Xu(),[p,g]=b.useState("general");b.useEffect(()=>{t&&g(i)},[i,t]),b.useEffect(()=>{t||g("general")},[t]);const{data:v}=Ae.documentFolders.findOne.useQuery({id:r},{enabled:t}),{data:x}=Ae.chats.findAll.useQuery({where:{organization:v?.organization?.id},pagination:{pageSize:100},fields:["id","name"]},{enabled:t&&!!v?.organization?.id}),[_,w]=b.useState(!1),[S,E]=b.useState(""),[T,N]=b.useState(""),[A,k]=b.useState("1"),[j,R]=b.useState(null),[P,V]=b.useState(null),[U,G]=b.useState(null),[Q,Z]=b.useState(null),[K,te]=b.useState(null),[ne,se]=b.useState(!1),[H,O]=b.useState([]),L=zU(v),M=v?.sourceType===$r.GoogleDrive,q=M||v?.sourceType===$r.Rss,X=q&&!v?.sourceUri,J=YL(v),W=!!v?.websitePathPrefix,re=P!=null&&P!==Vn.Never,ae=b.useMemo(()=>{if(!v)return[];const fe=new Set(v.chats?.map(ke=>typeof ke=="object"?ke.id:ke)??[]);return(v.effectiveChatIds??[]).filter(ke=>!fe.has(ke))},[v]);b.useEffect(()=>{v&&(w(v.sourceConfig?.sourceType===$r.GoogleDrive&&v.sourceConfig.includeSubfolders),E(v.name),N(v.description??""),k(String(v.defaultWeight??1)),R(v.updateFrequency??null),V(v.discoveryFrequency??null),G(v.changeThreshold??null),Z(v.autoIncludeNewPages??null),te(v.removalBehavior??null),se(v.availableForAllAgents??!1),O(v.chats?.map(fe=>fe.id)??[]))},[v]);const ce=async()=>{try{await s.updateFolder.mutateAsync({id:r,...M&&v?.sourceUri&&{includeSubfolders:_},name:S.trim(),description:T.trim()||null,defaultWeight:Number.parseFloat(A),...d&&{...!X&&{updateFrequency:j??null},...!q&&{discoveryFrequency:J?P??null:null,changeThreshold:u?U??null:v?.changeThreshold??null},...!q&&{autoIncludeNewPages:L?Q:null},removalBehavior:L?K??null:null}}),await s.assignToChats.mutateAsync({folderId:r,chatIds:ne?[]:H,availableForAllAgents:ne}),Re.success(a._({id:"mmxs2o"})),n(!1)}catch{Re.error(a._({id:"o8wSWT"}))}},Te="px-4 py-2 text-sm font-medium data-[state=active]:border-b-2 data-[state=active]:border-primary";return l.jsx(ui,{open:t,onOpenChange:n,children:l.jsxs(Fi,{className:"w-[600px]",children:[l.jsx(ks,{children:l.jsx(Wi,{children:l.jsx(D,{id:"NnOQnB"})})}),l.jsxs(Sx,{value:p,onValueChange:fe=>{(fe==="general"||fe==="auto-update"||fe==="agents")&&g(fe)},className:"flex min-h-0 flex-col",children:[l.jsx(Ex,{className:"border-b border-border",children:l.jsxs("div",{className:"flex gap-2",children:[l.jsx(Ji,{value:"general",className:Te,children:l.jsx(D,{id:"Weq9zb"})}),l.jsx(Ji,{value:"agents",className:Te,children:l.jsx(D,{id:"ExckNx"})}),l.jsx(Ji,{value:"auto-update",className:Te,children:l.jsx(v4,{locked:h,children:l.jsx(D,{id:"K/wnfu"})})})]})}),l.jsxs(es,{value:"general",className:"space-y-4 py-4",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{htmlFor:"folderName",children:l.jsx(D,{id:"6YtxFj"})}),l.jsx(fn,{id:"folderName",value:S,onChange:fe=>E(fe.target.value),disabled:L}),L&&l.jsx("p",{className:"text-xs text-muted-fg",children:l.jsx(D,{id:"hTi5C1"})})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{htmlFor:"folderDescription",children:l.jsx(D,{id:"Nu4oKW"})}),l.jsx(fn,{id:"folderDescription",value:T,onChange:fe=>N(fe.target.value)})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{htmlFor:"defaultWeight",children:l.jsx(D,{id:"RgMFX7"})}),l.jsx(BU,{id:"defaultWeight",value:A,onValueChange:k}),l.jsx(ySe,{})]})]}),l.jsxs(es,{value:"agents",className:"space-y-4 py-4",children:[l.jsx("p",{className:"text-sm text-muted-fg",children:l.jsx(D,{id:"PPejCB"})}),x?.items&&l.jsx(pC,{availableForAllAgents:ne,setAvailableForAllAgents:se,selectedChatIds:H,setSelectedChatIds:O,availableAgents:x.items,inheritedChatIds:ae})]}),l.jsxs(es,{value:"auto-update",className:"space-y-4 py-4",children:[M&&v?.sourceUri&&l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsx(ot,{htmlFor:"folderIncludeSubfolders",children:l.jsx(D,{id:"DOVPsz"})}),l.jsx(Di,{id:"folderIncludeSubfolders",checked:_,onCheckedChange:w})]}),l.jsx("p",{className:"text-xs text-muted-fg",children:l.jsx(D,{id:"AoCj1c"})})]}),q&&l.jsx("p",{className:"text-sm text-muted-fg",children:l.jsx(D,{id:"yvFCsF"})}),l.jsx("fieldset",{disabled:h,className:"space-y-4 disabled:pointer-events-none disabled:opacity-50",children:l.jsx(LU,{mode:"single",showU
1401pdateFrequency:!X,showChangeThreshold:u&&!q,showDiscoveryFrequency:J,showWebsiteFields:L,showAutoIncludeNewPages:!q&&L&&(!J||re),showAutoIncludeRootScanHint:W,updateFrequency:j,discoveryFrequency:P,changeThreshold:U,autoIncludeNewPages:Q,removalBehavior:K,onUpdateFrequencyChange:R,onDiscoveryFrequencyChange:V,onChangeThresholdChange:G,onAutoIncludeNewPagesChange:fe=>Z(!!fe),onRemovalBehaviorChange:te})})]})]}),l.jsxs(wi,{children:[l.jsx(Oe,{variant:"ghost",outline:!0,onClick:()=>n(!1),children:l.jsx(D,{id:"dEgA5A"})}),l.jsx(Oe,{onClick:ce,loading:s.updateFolder.isPending||s.assignToChats.isPending,disabled:!S.trim(),children:l.jsx(D,{id:"tfDRzk"})})]})]})})}),XRt=52,wSe=b.memo(function({toolbar:t,children:n}){return l.jsxs("div",{style:{"--kb-toolbar-height":`${XRt}px`},children:[l.jsx("div",{className:"sticky top-0 z-30 bg-gray-50 pb-2",children:l.jsx("div",{className:"min-h-11",children:t})}),n]})}),Zre=40,Jre=3;function eie(e){return e.split(/(\s+)/).filter(Boolean)}function QRt(e,t){const n=Array.from({length:e.length+1},()=>Array.from({length:t.length+1}).fill(0));for(let r=1;r<=e.length;r++)for(let i=1;i<=t.length;i++)n[r][i]=e[r-1]===t[i-1]?n[r-1][i-1]+1:Math.max(n[r-1][i],n[r][i-1]);return n}function ZRt(e,t){const n=eie(e),r=eie(t),i=QRt(n,r),s=[],a=[];let o=n.length,c=r.length;for(;o>0||c>0;)o>0&&c>0&&n[o-1]===r[c-1]?(s.unshift({text:n[o-1],changed:!1}),a.unshift({text:r[c-1],changed:!1}),o--,c--):c>0&&(o===0||i[o][c-1]>=i[o-1][c])?(a.unshift({text:r[c-1],changed:!0}),c--):o>0&&(s.unshift({text:n[o-1],changed:!0}),o--);return{removed:s,added:a}}function JRt(e,t){const n=e.split(` 1402`),r=t.split(` 1403`),i=[];let s=0,a=0,o=1,c=1;for(;s<n.length||a<r.length;){const u=n[s],d=r[a];if(u!==void 0&&d!==void 0&&u===d){i.push({type:"context",oldLineNo:o,newLineNo:c,text:u}),s++,a++,o++,c++;continue}let h=-1;if(u!==void 0){for(let g=1;g<=Zre&&a+g<r.length;g++)if(r[a+g]===u){h=a+g;break}}let p=-1;if(d!==void 0){for(let g=1;g<=Zre&&s+g<n.length;g++)if(n[s+g]===d){p=s+g;break}}if(h!==-1&&(p===-1||h-a<=p-s)){for(;a<h;)i.push({type:"add",newLineNo:c,text:r[a]??""}),a++,c++;continue}if(p!==-1){for(;s<p;)i.push({type:"del",oldLineNo:o,text:n[s]??""}),s++,o++;continue}u!==void 0&&(i.push({type:"del",oldLineNo:o,text:u}),s++,o++),d!==void 0&&(i.push({type:"add",newLineNo:c,text:d}),a++,c++)}return i}function eIt(e){const t=e.map((r,i)=>({line:r,index:i})).filter(({line:r})=>r.type!=="context").map(({index:r})=>r);if(t.length===0)return[];const n=[];for(const r of t){const i=Math.max(0,r-Jre),s=Math.min(e.length-1,r+Jre),a=n.at(-1);!a||i>a.end+1?n.push({start:i,end:s}):a.end=Math.max(a.end,s)}return n.map(({start:r,end:i})=>{const s=e.slice(r,i+1),a=s.map(c=>c.oldLineNo).filter(c=>c!==void 0),o=s.map(c=>c.newLineNo).filter(c=>c!==void 0);return{oldStart:a[0]??0,oldCount:a.length,newStart:o[0]??0,newCount:o.length,lines:s}})}function tie(e,t){return e.map((n,r)=>l.jsx("span",{className:n.changed?t:void 0,children:n.text},`${n.text}-${r}`))}function tIt({open:e,onOpenChange:t,previousContent:n,currentContent:r,rawComparison:i=!1}){const[s,a]=b.useState("git"),o=b.useMemo(()=>{const c=JRt(n,r);return eIt(c)},[r,n]);return l.jsx(ui,{open:e,onOpenChange:t,children:l.jsxs(Fi,{className:"flex h-[85vh] w-full max-w-[1200px] flex-col overflow-hidden",children:[l.jsxs(ks,{children:[l.jsx(Wi,{children:l.jsx(D,{id:"5g7GJx"})}),l.jsx(no,{children:i?l.jsx(D,{id:"wNEUUZ"}):l.jsx(D,{id:"QgXGBN"})})]}),l.jsxs("div",{className:"mb-2 flex items-center justify-end gap-2",children:[l.jsx(Oe,{variant:s==="git"?"secondary":"ghost",outline:!0,size:"sm",onClick:()=>a("git"),children:l.jsx(D,{id:"N/ysso"})}),l.jsx(Oe,{variant:s==="raw"?"secondary":"ghost",outline:!0,size:"sm",onClick:()=>a("raw"),children:l.jsx(D,{id:"g58Z1I"})})]}),s==="git"?l.jsxs(Yf,{className:"min-h-0 flex-1",children:[l.jsx(Xf,{className:"size-full py-2",children:l.jsx("div",{className:"space-y-4",children:o.length===0?l.jsx("div",{className:"rounded-md border border-border bg-muted/40 p-3 text-sm text-muted-fg",children:l.jsx(D,{id:"tPeGLR"})}):o.map((c,u)=>l.jsxs("div",{className:"overflow-hidden rounded-md border border-border",children:[l.jsxs("div",{className:"border-b border-border bg-muted/40 px-3 py-2 font-mono text-xs text-muted-fg",children:["@@ -",c.oldStart,",",c.oldCount," +",c.newStart,",",c.newCount," @@"]}),l.jsx("div",{className:"font-mono text-xs leading-5",children:c.lines.map((d,h)=>{if(d.type==="del"&&c.lines[h+1]?.type==="add"){const x=c.lines[h+1],_=ZRt(d.text,x.text);return l.jsxs("div",{children:[l.jsxs("div",{className:"grid grid-cols-[64px_64px_20px_1fr] bg-danger/10",children:[l.jsx("span",{className:"px-2 text-right text-danger/70",children:d.oldLineNo}),l.jsx("span",{className:"px-2 text-right text-muted-fg/50",children:"Â "}),l.jsx("span",{className:"text-danger",children:"-"}),l.jsx("span",{className:"whitespace-pre-wrap pr-2 text-danger",children:tie(_.removed,"rounded bg-danger/30")})]}),l.jsxs("div",{className:"grid grid-cols-[64px_64px_20px_1fr] bg-success/10",children:[l.jsx("span",{className:"px-2 text-right text-muted-fg/50",children:"Â "}),l.jsx("span",{className:"px-2 text-right text-success/70",children:x.newLineNo}),l.jsx("span",{className:"text-success",children:"+"}),l.jsx("span",{className:"whitespace-pre-wrap pr-2 text-success",children:tie(_.added,"rounded bg-success/30")})]})]},`${u}-${h}`)}if(d.type==="add"&&c.lines[h-1]?.type==="del")return null;const p=d.type==="add"?"+":d.type==="del"?"-":" ",g=d.type==="add"?"bg-success/10":d.type==="del"?"bg-danger/10":"bg-transparent",v=d.type==="add"?"text-success":d.type==="del"?"text-danger":"text-foreground";return l.jsxs("div",{className:`grid grid-cols-[64px_64px_20px_1fr] ${g}`,children:[l.jsx("span",{className:"px-2 text-right text-muted-fg/70",children:d.oldLineNo??""}),l.jsx("span",{className:"px-2 text-right text-muted-fg/70",children:d.newLineNo??""}),l.jsx("span",{className:d.type==="add"?"text-success":d.type==="del"?"text-danger":"text-muted-fg",children:p}),l.jsx("span",{className:`whitespace-pre-wrap pr-2 ${v}`,children:d.text})]},`${u}-${h}`)})})]},`${c.oldStart}-${c.newStart}-${u}`))})}),l.jsx(Qf,{className:"flex touch-none select-none bg-gray-300 p-1 transition-colors hover:bg-gray-500",orientation:"vertical",children:l.jsx(Zf,{className:"relative flex-1 rounded-full bg-gray-400"})})]}):l.jsxs("div",{className:"grid min-h-0 flex-1 grid-cols-2 gap-4 py-2",children:[l.jsxs("div",{className:"min-h-0 rounded-md border border-border",children:[l.jsx("div",{className:"border-b border-border px-3 py-2 text-sm font-medium",children:l.jsx(D,{id:"N+Y6v8"})}),l.jsxs(Yf,{className:"h-full",children:[l.jsx(Xf,{className:"size-full p-3",children:l.jsx("pre",{className:"whitespace-pre-wrap text-xs leading-5",children:n})}),l.jsx(Qf,{className:"flex touch-none select-none bg-gray-300 p-1 transition-colors hover:bg-gray-500",orientation:"vertical",children:l.jsx(Zf,{className:"relative flex-1 rounded-full bg-gray-400"})})]})]}),l.jsxs("div",{className:"min-h-0 rounded-md border border-border",children:[l.jsx("div",{className:"border-b border-border px-3 py-2 text-sm font-medium",children:l.jsx(D,{id:"Hd06oy"})}),l.jsxs(Yf,{className:"h-full",children:[l.jsx(Xf,{className:"size-full p-3",children:l.jsx("pre",{className:"whitespace-pre-wrap text-xs leading-5",children:r})}),l.jsx(Qf,{className:"flex touch-none select-none bg-gray-300 p-1 transition-colors hover:bg-gray-500",orientation:"vertical",children:l.jsx(Zf,{className:"relative flex-1 rounded-full bg-gray-400"})})]})]})]}),l.jsx(wi,{children:l.jsx(Oe,{variant:"secondary",onClick:()=>t(!1),children:l.jsx(D,{id:"yz7wBu"})})})]})})}const nIt=b.memo(function({documentId:t,onClose:n,currentChatId:r,defaultTab:i}){const{i18n:s,_:a}=Me(),{hasAccess:o}
1403=Uc(),c=o([Jt.SuperAdmin]),{isKbAutoUpdatesLocked:u}=Xu(),[d,h]=b.useState("content");b.useEffect(()=>{if(!t){h("content");return}h(i??"content")},[i,t]);const{data:p,isLoading:g}=Ae.documents.findOne.useQuery({id:t,populate:["content","previousContent","metadata","parsingMetadata","summary","shortSummary","chats","organization.id"]},{enabled:!!t}),{data:v}=Ae.documents.findAllEmbeddings.useQuery({documentId:t},{enabled:!!t}),{data:x}=Ae.chats.findAll.useQuery({where:{organization:p?.organization.id},pagination:{pageSize:100},fields:["id","name"]}),_=p?.type===Mr.Website||p?.type===Mr.ExternalDocument,[w,S]=b.useState(!1),[E,T]=b.useState([]),{updateAgentAccess:N,updateAutoUpdate:A,checkDocumentUpdatesNow:k}=yb(),[j,R]=b.useState(null),[P,V]=b.useState(null),[U,G]=b.useState(!1),[Q,Z]=b.useState(null),K=b.useMemo(()=>{if(!p)return[];const W=new Set(p.chats?p.chats.map(ae=>typeof ae=="object"?ae.id:ae):[]);return(p.effectiveChatIds??[]).filter(ae=>!W.has(ae))},[p]);b.useEffect(()=>{if(p){S(!!p.availableForAllAgents);const W=p.chats?p.chats.map(re=>typeof re=="object"?re.id:re):[];T(W),R(p.updateFrequency??null),V(p.changeThreshold??null)}},[p]);const te=async()=>{!t||u||await A.mutateAsync({id:t,updateFrequency:j??null,changeThreshold:c?P??null:p?.changeThreshold??null})},ne=async()=>{t&&await N.mutateAsync({documentId:t,chatIds:E,availableForAllAgents:w})},se=async()=>{if(t)try{const W=await k.mutateAsync({documentId:t});Z(W),Re.success(s._({id:"lS/8FI"}))}catch{Re.error(s._({id:"/HSJTf"}))}},H=p?.content?.pages.map(W=>W.markdown).join(` 1404 1405`),O=p?.metadata,L=p?.type===Mr.Website?O?.lastRawDiff:void 0,M=(L?.before??(O?.compareFormat==="fc-raw-v1"?void 0:p?.previousContent))?.pages.map(W=>W.markdown).join(` 1406 1407`),q=L?.after.pages.map(W=>W.markdown).join(` 1408 1409`)??H,X=!!M?.trim(),J=!!q?.trim();return l.jsxs(ui,{open:!!t,onOpenChange:n,children:[l.jsxs(Fi,{className:"flex h-[95vh] w-full max-w-[1200px] flex-col overflow-hidden",children:[l.jsx(ks,{children:l.jsx(Wi,{children:p?.name})}),g?l.jsx("div",{className:"flex min-h-40 items-center justify-center text-primary",children:l.jsx(Kr,{className:"size-10 animate-spin"})}):l.jsxs(Sx,{value:d,onValueChange:h,className:"flex min-h-0 flex-1 flex-col",children:[l.jsx(Ex,{className:"border-b border-border",children:l.jsxs("div",{className:"flex gap-2 px-4",children:[l.jsx(Ji,{value:"content",className:"px-4 py-2 text-sm font-medium data-[state=active]:border-b-2 data-[state=active]:border-primary",children:l.jsx(D,{id:"4b3oEV"})}),l.jsxs(ja,{roles:[Jt.SuperAdmin],children:[l.jsx(Ji,{value:"metadata",className:"px-4 py-2 text-sm font-medium data-[state=active]:border-b-2 data-[state=active]:border-primary",children:l.jsx(D,{id:"6GBt0m"})}),l.jsx(Ji,{value:"embeddings",className:"px-4 py-2 text-sm font-medium data-[state=active]:border-b-2 data-[state=active]:border-primary",children:l.jsx(D,{id:"tNK+dN"})})]}),l.jsx(Ji,{value:"agents",className:"px-4 py-2 text-sm font-medium data-[state=active]:border-b-2 data-[state=active]:border-primary",children:l.jsx(D,{id:"aryXqX"})}),_&&l.jsx(Ji,{value:"auto-update",className:"px-4 py-2 text-sm font-medium data-[state=active]:border-b-2 data-[state=active]:border-primary",children:l.jsx(v4,{locked:u,children:l.jsx(D,{id:"CAFucN"})})})]})}),l.jsxs("div",{className:"min-h-0 flex-1",children:[l.jsx(es,{value:"content",className:"h-full",children:l.jsxs(Yf,{className:"h-full",children:[l.jsx(Xf,{className:"size-full p-4",children:l.jsx("div",{className:"whitespace-pre-wrap",children:H?l.jsx(Ph,{children:H}):l.jsx(D,{id:"tpsu/3"})})}),l.jsx(Qf,{className:"flex touch-none select-none bg-gray-300 p-1 transition-colors hover:bg-gray-500",orientation:"vertical",children:l.jsx(Zf,{className:"relative flex-1 rounded-full bg-gray-400"})})]})}),l.jsx(es,{value:"metadata",className:"h-full",children:l.jsxs(Yf,{className:"h-full",children:[l.jsxs(Xf,{className:"size-full p-4",children:[l.jsx(gn,{title:"Metadata",className:"mb-6 rounded-lg border border-border p-4",children:l.jsxs("div",{className:"space-y-4",children:[Object.entries(p?.parsingMetadata||{}).map(([W,re])=>l.jsx(jn,{label:W,size:"sm",children:typeof re=="string"?re:l.jsx("pre",{className:"rounded-lg bg-slate-100 p-2 text-xs",children:JSON.stringify(re,null,2)})},W)),Object.entries(p?.metadata||{}).map(([W,re])=>l.jsx(jn,{label:W,size:"sm",children:typeof re=="string"?re:l.jsx("pre",{className:"rounded-lg bg-slate-100 p-2 text-xs",children:JSON.stringify(re,null,2)})},W)),l.jsx(jn,{label:"publicUrl",size:"sm",children:p?.publicUrl}),l.jsx(jn,{label:"id",size:"sm",children:p?.id}),l.jsx(jn,{label:"uri",size:"sm",children:p?.uri}),l.jsx(jn,{label:"scheduledAt",size:"sm",children:yt.date(p?.scheduledAt,Zn.DateTimeNumericPrecise)}),l.jsx(jn,{label:"startedParsingAt",size:"sm",children:yt.date(p?.startedParsingAt,Zn.DateTimeNumericPrecise)}),l.jsx(jn,{label:"finishedParsingAt",size:"sm",children:yt.date(p?.finishedParsingAt,Zn.DateTimeNumericPrecise)}),l.jsx(jn,{label:"startedEmbeddingAt",size:"sm",children:yt.date(p?.startedEmbeddingAt,Zn.DateTimeNumericPrecise)}),l.jsx(jn,{label:"finishedEmbeddingAt",size:"sm",children:yt.date(p?.finishedEmbeddingAt,Zn.DateTimeNumericPrecise)}),l.jsx(jn,{label:"summary",size:"sm",children:p?.summary}),l.jsx(jn,{label:"shortSummary",size:"sm",children:p?.shortSummary})]})}),l.jsx(gn,{title:"Content",children:l.jsx("div",{className:"w-full whitespace-pre-wrap rounded-lg font-sans text-sm leading-5",children:H})})]}),l.jsx(Qf,{className:"flex touch-none select-none bg-gray-300 p-1 transition-colors hover:bg-gray-500",orientation:"vertical",children:l.jsx(Zf,{className:"relative flex-1 rounded-full bg-gray-400"})})]})}),l.jsx(es,{value:"embeddings",className:"h-full",children:l.jsxs(Yf,{className:"h-full",children:[l.jsx(Xf,{className:"size-full p-4",children:l.jsx("div",{className:"rounded-lg border border-border p-4",children:l.jsx("div",{className:"space-y-4",children:v?.map((W,re)=>l.jsxs(gn,{title:`Chunk ${re+1} (${W.uuid})`,children:[l.jsx("pre",{className:"w-full whitespace-pre-wrap rounded-lg bg-slate-100 p-3 text-xs leading-5",children:JSON.stringify(JSON.parse(W.properties.metadata||"{}"),null,2)}),l.jsx(gn,{title:"keywordsContent",className:"w-full whitespace-pre-wrap rounded-lg font-sans text-sm leading-5",children:W.properties?.keywordsContent}),l.jsx(gn,{title:"embeddingContent",className:"w-full whitespace-pre-wrap rounded-lg font-sans text-sm leading-5",children:W.properties?.embeddingContent}),l.jsx(gn,{title:"content",className:"w-full whitespace-pre-wrap rounded-lg font-sans text-sm leading-5",children:W.properties?.content})]},W.uuid))})})}),l.jsx(Qf,{className:"flex touch-none select-none bg-gray-300 p-1 transition-colors hover:bg-gray-500",orientation:"vertical",children:l.jsx(Zf,{className:"relative flex-1 rounded-full bg-gray-400"})})]})}),l.jsx(es,{value:"agents",className:"h-full",children:l.jsxs(Yf,{className:"h-full",children:[l.jsx(Xf,{className:"size-full p-4",children:l.jsx(gn,{title:s._({id:"ie1C8N"}),className:"mb-6 rounded-lg border border-border p-4",children:l.jsxs("div",{className:"space-y-6",children:[l.jsx("p",{className:"text-sm text-gray-600",children:l.jsx(D,{id:"Z6H8lZ"})}),!!p?.propagationPending&&l.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-800",children:[l.jsx(S6,{className:"size-4 shrink-0"}),l.jsx(D,{id:"PrYbTk"})]}),l.jsx("div",{className:"md:w-1/3",children:l.jsx(pC,{availableForAllAgents:w,setAvailableForAllAgents:S,selectedChatIds:E,setSelectedChatIds:T,availableAgents:x?.items??[],currentChatId:r,inheritedChatIds:K})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Oe,{"data-cta":"admin-document-content-modal-save-access-button",onClick:ne,disabled:N.isPending,children:N.isPending?l.jsxs(l.Fragment,{children:[l.jsx(Kr,{className:"mr-2 size-4 animate-spin"}),l.jsx(D,{id:"XvjC4F"})]}):l.jsx(D,{id:"AAj+CL"})})})]})})}),l.jsx(Qf,{className:"flex touch-none select-none bg-gray-300 p-1 transition-colors hover:bg-gray-500",orientation:"vertical",children:l.jsx(Zf,{className:"relative flex-1 rounded-full bg-gray-400"})})]})}),_&&l.jsx(es,{value:"auto-update",className:"h-full",children:l.jsxs(Yf,{className:"h-full",children:[l.jsx(Xf,{className:"size-full p-4",children:l.jsx("div",{className:"space-y-6",children:l.jsxs("fieldset",{disabled:u,className:"space-y-6 disabled:pointer-events-none disabled:opacity-50",children:[l.jsx(gn,{title:s._({id:"Kqx1M7"}),className:"rounded-lg border border-border p-4",children:l.jsxs("div",{className:"space-y-6",children:[l.jsx("p",{className:"text-sm text-muted-fg",children:l.jsx(D,{id:"ojcODI"})}),l.jsx("div",{className:"md:w-1/2",children:l.jsx(LU,{mode:"single",showChangeThreshold:c,showWebsiteFields:!1,updateFrequency:j,changeThreshold:P,onUpdateFrequencyChange:R,onChangeThresholdChange:V})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Oe,{onClick:te,disabled:A.isPending||u,children:A.isPending?l.jsxs(l.Fragment,{children:[l.jsx(Kr,{className:"mr-2 size-4 animate-spin"}),l.jsx(D,{id:"XvjC4F"})]}):l.jsx(D,{id:"etRkTu"})})})]})}),l.jsx(gn,{title:s._({id:"uANcbm"}),className:"rounded-lg border border-border p-4",children:l.jsxs("div",{className:"space-y-6",children:[l.jsx("p",{className:"text-sm text-muted-fg",children:l.jsx(D,{id:"zPHRtG"})}),l.jsxs("div",{className:"grid gap-3 sm:grid-cols-3",children:[l.jsxs("div",{className:"rounded-md border border-border bg-muted/30 p-3",children:[l.jsx("p",{className:"text-xs font-medium uppercase tracking-wide text-muted-fg",children:l.jsx(D,{id:"2z2kFo"})}),l.jsx("p",{className:"mt-1 text-sm",children:p?.lastCheckedAt?yt.date(p.lastCheckedAt,Zn.DateTimeNumericPrecise):s._({id:"PUE9dX"})})]}),l.jsxs("div",{className:"rounded-md border border-border bg-muted/30 p-3",children:[l.jsx("p",{className:"text-xs font-medium uppercase tracking-wide text-muted-fg",children:l.jsx(D,{id:"414kHg"})}),l.jsx("p",{className:"mt-1 text-sm",children:p?.contentUpdatedAt?yt.date(p.contentUpdatedAt,Zn.DateTimeNumericPrecise):s._({id:"0Ca79B"})})]}),l.jsxs("div",{className:"rounded-md border border-border bg-muted/30 p-3",children:[l.jsx("p",{className:"text-xs font-medium uppercase tracking-wide text-muted-fg",children:l.jsx(D,{id:"2lXkaN"})}),l.jsx("p",{className:"mt-1 text-sm",children:p?.nextUpdateAt?yt.date(p.nextUpdateAt,Zn.DateTimeNumericPrecise):s._({id:"vaVAp0"})})]})]}),l.jsxs("div",{className:"rounded-md border border-border bg-muted/40 p-3 text-sm text-muted-fg",children:[p?.last
1409CheckedAt?X?l.jsx(D,{id:"r4oGHU"}):l.jsx(D,{id:"vsqI6h"}):l.jsx(D,{id:"Q1qyXQ"}),Q?.reason==="baseline_initialized"?l.jsx("p",{className:"mt-2",children:l.jsx(D,{id:"LZlJa0"})}):Q?.reason==="recently_checked"?l.jsx("p",{className:"mt-2",children:l.jsx(D,{id:"zDuhsd"})}):Q?.changePercent!==void 0&&l.jsx("p",{className:"mt-2",children:l.jsx(D,{id:"r/ZnY+",values:{0:Q.changePercent,1:Q.thresholdPercent??0}})})]}),l.jsxs("div",{className:"flex justify-end gap-2",children:[X&&J&&l.jsx(Oe,{variant:"ghost",outline:!0,onClick:()=>G(!0),children:l.jsx(D,{id:"Y4FF5v"})}),l.jsx(Oe,{variant:"ghost",outline:!0,onClick:se,disabled:k.isPending,children:k.isPending?l.jsxs(l.Fragment,{children:[l.jsx(Kr,{className:"mr-2 size-4 animate-spin"}),l.jsx(D,{id:"pWT04I"})]}):l.jsx(D,{id:"F4SXHy"})})]})]})})]})})}),l.jsx(Qf,{className:"flex touch-none select-none bg-gray-300 p-1 transition-colors hover:bg-gray-500",orientation:"vertical",children:l.jsx(Zf,{className:"relative flex-1 rounded-full bg-gray-400"})})]})})]})]}),l.jsx(wi,{children:l.jsx(Fm,{asChild:!0,children:l.jsx(Oe,{"data-cta":"admin-document-content-modal-close-button",variant:"secondary",children:l.jsx(D,{id:"yz7wBu"})})})})]}),X&&J&&l.jsx(tIt,{open:U,onOpenChange:G,previousContent:M??"",currentContent:q??"",rawComparison:!!L})]})});function X4(){const{i18n:e,_:t}=Me();return b.useMemo(()=>({addToTrackedPagesLabel:e._({id:"3ht9GU"}),removeFromTrackedPagesLabel:e._({id:"MvgK2r"}),removeFromTrackedPagesDisclaimer:e._({id:"TBn7PC"}),promoteToWebsiteHierarchyHint:e._({id:"7pKnGQ"}),webHierarchyCutDisabledTooltip:e._({id:"TwqSc3"}),globalKbCutDisabledTooltip:e._({id:"nGObRn"})}),[t])}function nie(e){if(!e)return"â";const t=new Date(e);return Number.isNaN(t.getTime())?"â":yt.date(t,Zn.DateTimeNumeric)}function rIt({contentUpdatedAt:e,lastCheckedAt:t}){const{i18n:n,_:r}=Me(),i=nie(t);return l.jsx("span",{className:"text-sm text-muted-fg",title:t?n._({id:"r/NljR",values:{checked:i}}):void 0,children:nie(e)})}const rie=b.memo(function({weight:t,variant:n="default",onChange:r,disabled:i=!1}){const{i18n:s,_:a}=Me(),o=bSe(),[c,u]=b.useState(!1),d=$U(t),h=async p=>{const g=URt(p);if(g!==t){u(!0);try{await r(g)}catch{Re.error(s._({id:"IduvKA"}))}finally{u(!1)}}};return l.jsxs(Ou,{modal:!1,children:[l.jsx(Pu,{asChild:!0,disabled:i||c,children:l.jsx("button",{type:"button","data-table":"prevent",className:$e("rounded-md px-1 py-0.5 transition-colors","hover:bg-muted/80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",(i||c)&&"pointer-events-none opacity-50"),onClick:p=>p.stopPropagation(),onPointerDown:p=>p.stopPropagation(),children:n==="muted"?l.jsx(cn,{title:o,children:l.jsx("span",{className:"inline-flex",children:l.jsx(q1,{weight:t,variant:n})})}):l.jsx(q1,{weight:t,variant:n})})}),l.jsx(Mu,{side:"bottom",align:"start",className:"min-w-[168px]",onClick:p=>p.stopPropagation(),children:gSe.map(p=>l.jsx(Er,{className:$e("flex items-center p-2",p===d&&"bg-muted/60"),onClick:g=>{g.stopPropagation(),h(p)},children:l.jsx(q1,{scale:p,variant:n})},p))})]})});function iIt(e){return!!e.sourceUri&&!e.websitePathPrefix}function sIt(e){return!!e.websitePathPrefix}function UU(e){return(!e.sourceType||e.sourceType===$r.Upload)&&!e.sourceUri&&!e.websitePathPrefix}function aIt(e){const t=e.folder;return!t||typeof t=="string"?null:t}function SSe(e,t){if(t.isManagedSource)return!0;const n=aIt(e);return!!(n&&!UU(n))}function oIt(e,t){return t.isManagedSource?!0:!UU(e)}function ESe(e){return iIt(e)||UU(e)?"delete":sIt(e)?"exclude":null}function lIt(e,t){return e.type===Mr.Document?"delete":e.type!==Mr.Website&&e.type!==Mr.ExternalDocument?null:SSe(e,t)?"exclude":"delete"}function mC(e,t){return e.rowType==="page"?e.data.status===Hr.Existing?"exclude":null:e.rowType==="folder"?ESe(e.data):lIt(e.data,t)}function cIt(e){return ESe(e)}function CSe(e,t){return e.isChatMode?{enabled:!1,disabledTooltip:t.globalKbCutDisabledTooltip}:e.isManagedSource?{enabled:!1,disabledTooltip:t.webHierarchyCutDisabledTooltip}:{enabled:!0}}function TSe(e,t,n){const r=CSe(t,n);return r.enabled?e.rowType==="page"?{enabled:!1}:e.rowType==="document"&&SSe(e.data,t)||e.rowType==="folder"&&oIt(e.data,t)?{enabled:!1,disabledTooltip:n.webHierarchyCutDisabledTooltip}:{enabled:!0}:r}function ASe(e,t,n,r){const i=CSe(n,r);if(!i.enabled)return i;for(const s of t){const a=e.find(c=>c.id===s);if(!a)continue;const o=TSe(a,n,r);if(!o.enabled)return o}return{enabled:!0}}function uIt(e,t,n){for(const r of t){const i=e.find(s=>
1409s.id===r);if(i&&mC(i,n)==="exclude")return!0}return!1}function dIt(e,t,n){for(const r of t){const i=e.find(s=>s.id===r);if(i&&mC(i,n)==="delete")return!0}return!1}function fIt(e,t,n){const r=[],i=[],s=[];for(const a of t){const o=e.find(c=>c.id===a);if(!(!o||mC(o,n)!=="exclude"))switch(o.rowType){case"page":r.push(a);break;case"document":i.push(a);break;case"folder":s.push(a);break}}return{pageIds:r,documentIds:i,folderIds:s}}function hIt(e,t,n){const r=[],i=[];for(const s of t){const a=e.find(o=>o.id===s);!a||mC(a,n)!=="delete"||(a.rowType==="document"?r.push(s):a.rowType==="folder"&&i.push(s))}return{documentIds:r,folderIds:i}}function pIt(e){return e.sourceType===$r.Rss?Mj:e.sourceType===$r.GoogleDrive?M9:e.sourceUri?e.websitePathPrefix?Vu:ARe:bRe}function mIt(e){return e===Mr.Document?ioe:e===Mr.Website?Vu:Rj}function gIt(e){return e===Mr.Document?"text-danger":e===Mr.Website?"text-primary":"text-amber-500"}function xIt(e){return e===Hr.New?"text-amber-500":e===Hr.Removed?"text-danger":e===Hr.Untracked?"text-gray-400":"text-success"}const Mg=Jm();function vIt(e,t,n={}){const{canUseAutoUpdate:r=!0,isManagedSource:i=!1,isChatMode:s=!1}=n,{i18n:a,_:o}=Me(),c=Ir(),u=bSe(),d=WRt(),h=X4();return b.useMemo(()=>[Mg.display({id:"type",header:"",meta:{size:48,align:"center"},cell:({row:p})=>{const g=p.original;if(g.rowType==="folder"){const v=g.data,x=!!v.sourceUri;return l.jsx(_S,{size:"xs",className:x?"text-primary":"text-amber-600",Icon:pIt(v)})}if(g.rowType==="document"){const v=String(g.data.type);return l.jsx(_S,{size:"xs",className:gIt(v),Icon:mIt(v)})}return l.jsx(D4e,{className:$e("size-5",xIt(String(g.data.status)))})}}),Mg.display({id:"name",header:a._({id:"6YtxFj"}),meta:{sortable:"name"},cell:({row:p})=>{const g=p.original;if(g.rowType==="folder"){const v=g.data,x=t?.[v.id],_=v.parent&&typeof v.parent=="object"?v.parent.id:v.parent,w=v.sourceType===$r.Rss&&!!v.sourceUri,S=w?v.sourceUri:v.name,E=w&&v.name!==v.sourceUri?v.name:void 0;return l.jsxs("div",{className:"flex min-w-48 flex-col gap-0.5",children:[l.jsx("p",{className:"truncate font-medium",title:S??void 0,children:S}),E&&l.jsx("p",{className:"truncate text-xs text-muted-fg",title:E,children:E}),x?l.jsxs("button",{type:"button",className:"w-fit text-left text-xs text-muted-fg hover:text-primary hover:underline",onClick:T=>{T.stopPropagation(),_&&e?.onNavigateToFolder&&e.onNavigateToFolder(_)},children:["ð ",x]}):v.description&&l.jsx("p",{className:"text-xs text-muted-fg",children:v.description.length>80?v.description.substring(0,80)+"...":v.description})]})}if(g.rowType==="document"){const v=g.data,x=v.description||v.shortSummary,_=!!t,w=v.folder&&typeof v.folder=="object"?v.folder.id:void 0,S=w?t?.[w]:void 0,E=_&&!S&&v.folder&&typeof v.folder=="object"?v.folder.name:void 0;return l.jsxs("div",{className:"flex min-w-48 flex-col gap-0.5",children:[l.jsx("p",{className:"break-all font-medium leading-tight",children:v.name}),_&&(S||E)&&l.jsxs("button",{type:"button",className:"w-fit text-left text-xs text-muted-fg hover:text-primary hover:underline",onClick:T=>{T.stopPropagation(),w&&e?.onNavigateToFolder&&e.onNavigateToFolder(w)},children:["ð ",S??E]}),!S&&!E&&x&&l.jsx("p",{className:"text-xs text-muted-fg",children:x.length>80?x.substring(0,80)+"...":x})]})}{const v=g.data.folder&&typeof g.data.folder=="object"?g.data.folder.id:void 0,x=v?t?.[v]:void 0;return l.jsxs("div",{className:"flex min-w-48 flex-col gap-0.5",children:[l.jsx("p",{className:"break-all font-medium leading-tight",children:g.data.url}),x&&l.jsxs("button",{type:"button",className:"w-fit text-left text-xs text-muted-fg hover:text-primary hover:underline",onClick:_=>{_.stopPropagation(),v&&e?.onNavigateToFolder&&e.onNavigateToFolder(v)},children:["ð ",x]})]})}}}),Mg.display({id:"status",header:a._({id:"uAQUqI"}),cell:({row:p})=>{const g=p.original;if(g.rowType==="folder")return null;if(g.rowType==="document"){const x=g.data;return l.jsx(En,{size:"sm",variant:x.status===qn.ParsingError||x.status===qn.EmbeddingError?"danger":x.status===qn.Done?"success":x.status===qn.Uploading||x.status===qn.Ready?"warning":"info",outline:!0,children:c.documentStatus[x.status]})}const v=g.data.status;return l.jsx(En,{size:"sm",variant:v===Hr.New?"warning":v===Hr.Removed?"danger":v===Hr.
1409Existing?"success":"secondary",outline:!0,children:c.websitePageStatus[v]})}}),Mg.display({id:"updated",header:a._({id:"8ndFO2"}),cell:({row:p})=>{const g=p.original,v=g.rowType==="document"?g.data:void 0;return l.jsx(rIt,{contentUpdatedAt:v?.contentUpdatedAt,lastCheckedAt:v?.lastCheckedAt})}}),Mg.display({id:"priority",header:a._({id:"1hKEom"}),meta:{align:"left",size:160,headerTooltip:d},cell:({row:p})=>{const g=p.original;if(g.rowType==="page")return"â";const x=(g.rowType==="folder"?g.data.defaultWeight:g.data.weight)??.5;return g.rowType==="folder"&&e?.onUpdateFolderPriority?l.jsx(rie,{weight:x,variant:"muted",onChange:_=>e.onUpdateFolderPriority(g.id,_)}):g.rowType==="document"&&e?.onUpdateDocumentPriority?l.jsx(rie,{weight:x,onChange:_=>e.onUpdateDocumentPriority(g.id,_)}):g.rowType==="folder"?l.jsx(cn,{title:u,children:l.jsx("span",{className:"inline-flex",children:l.jsx(q1,{weight:x,variant:"muted"})})}):l.jsx(q1,{weight:x})}}),Mg.display({id:"agents",header:a._({id:"8Uv5e6"}),meta:{size:150},cell:({row:p})=>{const g=p.original;if(g.rowType==="page")return null;if(g.rowType==="folder"){const E=g.data;if(E.availableForAllAgents)return l.jsx(En,{size:"xs",variant:"success",outline:!0,children:"All"});const T=E.chats;return!T||Array.isArray(T)&&T.length===0?l.jsx("span",{className:"text-xs text-muted-fg",children:"â"}):l.jsx("span",{className:"text-xs text-muted-fg",children:Array.isArray(T)?T.length:0})}const v=g.data;if(v.effectiveAvailableForAllAgents??v.availableForAllAgents)return l.jsx(En,{size:"xs",variant:"success",outline:!0,children:"All"});const x=v.effectiveChatIds?.length??0,w=v.chats?.length??0,S=x>w;return x===0&&w===0?l.jsx("span",{className:"text-xs text-muted-fg",children:"â"}):l.jsxs("span",{className:"text-xs text-muted-fg",title:S?a._({id:"NQDLD+",values:{directCount:w,0:x-w}}):void 0,children:[x>0?x:w,S&&l.jsx("span",{className:"ml-0.5 text-primary/60",children:"â"})]})}}),...e?[Mg.display({id:"actions",header:"",meta:{size:48,align:"center"},cell:({row:p})=>{const g=p.original,v=P=>{P.stopPropagation()},x={"data-kb-row-action":!0,onClick:v,onDoubleClick:v,onPointerDown:v};if(g.rowType==="page")return null;const _=g.rowType==="document",w=g.rowType==="folder",S=_&&g.data.type===Mr.Website,E={isChatMode:s,isManagedSource:i},T=TSe(g,E,h),N=mC(g,E),A=_&&!!e.onCutItem,k=w&&!!e.onCutItem,j=h.removeFromTrackedPagesLabel,R=h.removeFromTrackedPagesDisclaimer;return l.jsxs("div",{...x,className:"flex items-center justify-center gap-1",children:[_&&e.onViewDetails&&l.jsx(cn,{title:a._({id:"2Eoi/a"}),children:l.jsx(Oe,{variant:"ghost",size:"icon-xs",icon:l.jsx(Ry,{size:16}),onClick:()=>e.onViewDetails(g.id)})}),l.jsxs(Ou,{modal:!1,children:[l.jsx(Pu,{asChild:!0,children:l.jsx(Oe,{variant:"ghost",size:"icon-xs",icon:l.jsx(J1,{size:16})})}),l.jsxs(Mu,{side:"bottom",align:"end",children:[A&&l.jsx(du,{icon:bN,label:l.jsx(D,{id:"cCd8Bs"}),disabled:!T.enabled,disabledTooltip:T.disabledTooltip,onClick:T.enabled?()=>e.onCutItem?.(g.id,"document"):void 0}),_&&l.jsxs(Er,{className:"flex items-center gap-2",onClick:P=>{P.stopPropagation(),e.onOpenDocumentTab(g.id,"agents")},children:[l.jsx(_N,{className:"size-4"}),l.jsx(D,{id:"2VYBbc"})]}),_&&S&&l.jsx(Em,{locked:!r,children:l.jsxs(Er,{className:"flex items-center gap-2",onClick:P=>{P.stopPropagation(),e.onOpenDocumentTab(g.id,"auto-update")},children:[r?l.jsx(Lo,{className:"size-4"}):l.jsx(pm,{className:"size-4"}),l.jsx(D,{id:"CAFucN"})]})}),_&&l.jsxs(Er,{className:"flex items-center gap-2",onClick:P=>{P.stopPropagation(),e.onRefreshDocument(g.id)},title:g.data.sourceType===$r.Rss?a._({id:"BCBjWA"}):void 0,children:[l.jsx(JS,{className:"size-4"}),l.jsx(D,{id:"8RYNR1"})]}),l.jsx(ja,{roles:[Jt.SuperAdmin],children:_&&l.jsxs(Er,{className:"flex items-center gap-2",onClick:P=>{P.stopPropagation(),e.onResetEmbedding(g.id)},children:[l.jsx(hRe,{className:"size-4"}),l.jsx(D,{id:"7AZOYW"})]})}),_&&g.data.publicUrl&&l.jsx(Er,{className:"flex items-center gap-2",asChild:!0,children:l.jsxs("a",{href:g.data.publicUrl,target:"_blank",rel:"noreferrer",onClick:P=>P.stopPropagation(),children:[l.jsx(qRe,{className:"size-4"}),l.jsx(D,{id:"guA9ot"})]})}),l.jsx(ja,{roles:[Jt.SuperAdmin],children:_&&l.jsxs(Er,{className:"flex items-center gap-2",onClick:P=>{P.stopPropagation(),e.onGenerateTestCases(g.id)},children:[l.jsx(gRe,{className:"size-4"}),l.jsx(D,{id:"t85f4C"})]})}),_&&N&&l.jsx(bh,{}),_&&N==="exclude"&&!!e.onExcludeFromKB&&l.jsx(du,{icon:E0,label:j,hint:R,onClick:()=>e.onExcludeFromKB?.({documentIds:[g.id]})}),_&&N==="delete"&&l.jsx(du,{icon:bo,className:"text-danger",label:l.jsx(D,{id:"cnGeoo"}),onClick:()=>
1409e.onDeleteDocument(g.id)}),w&&l.jsxs(l.Fragment,{children:[l.jsxs(Er,{className:"flex items-center gap-2",onClick:P=>{P.stopPropagation(),e.onFolderSettings(g.id,"general")},children:[l.jsx(ju,{className:"size-4"}),l.jsx(D,{id:"ePK91l"})]}),k&&l.jsx(du,{icon:bN,label:l.jsx(D,{id:"cCd8Bs"}),disabled:!T.enabled,disabledTooltip:T.disabledTooltip,onClick:T.enabled?()=>e.onCutItem?.(g.id,"folder"):void 0}),l.jsxs(Er,{className:"flex items-center gap-2",onClick:P=>{P.stopPropagation(),e.onFolderSettings(g.id,"agents")},children:[l.jsx(_N,{className:"size-4"}),l.jsx(D,{id:"2VYBbc"})]}),w&&l.jsx(Em,{locked:!r,children:l.jsxs(Er,{className:"flex items-center gap-2",onClick:P=>{P.stopPropagation(),r&&e.onFolderSettings(g.id,"auto-update")},disabled:!r,children:[r?l.jsx(Lo,{className:"size-4"}):l.jsx(pm,{className:"size-4"}),l.jsx(D,{id:"CAFucN"})]})}),l.jsxs(Er,{className:"flex items-center gap-2",onClick:P=>{P.stopPropagation(),e.onFolderSettings(g.id,"general")},children:[l.jsx(toe,{className:"size-4"}),l.jsx(D,{id:"1hKEom"})]}),N&&l.jsx(bh,{}),N==="exclude"&&!!e.onExcludeFromKB&&l.jsx(du,{icon:E0,label:j,hint:R,onClick:()=>e.onExcludeFromKB?.({folderIds:[g.id]})}),N==="delete"&&l.jsx(du,{icon:bo,className:"text-danger",label:l.jsx(D,{id:"cnGeoo"}),onClick:()=>e.onRequestDeleteFolder(g.id)})]})]})]})]})}})]:[]],[o,c,e,t,u,d,r,i,s,h])}const iie="border-muted-fg/60 hover:border-muted-fg/80 data-[state=unchecked]:bg-background",yIt="relative w-full rounded-radius border border-border",bIt="w-full caption-bottom bg-background text-sm",sie="sticky top-[var(--kb-toolbar-height,0px)] z-20 bg-background shadow-[inset_0_-1px_0_0_hsl(var(--border))]";function _It(e){const t=[],n=[...e.folders].sort((o,c)=>o.name.localeCompare(c.name));for(const o of n)t.push({rowType:"folder",id:o.id,data:o});const r={parsingError:0,embeddingError:1,uploading:2,ready:3,parsing:4,parsingAsync:5,parsed:6,embedding:7,done:8},i=[...e.documents].sort((o,c)=>(r[o.status]??99)-(r[c.status]??99)||o.name.localeCompare(c.name));for(const o of i)t.push({rowType:"document",id:o.id,data:o});const s={[Hr.New]:0,[Hr.Removed]:1,[Hr.Untracked]:2,[Hr.Existing]:3},a=[...e.discoveredPages].sort((o,c)=>(s[o.status]??99)-(s[c.status]??99)||o.url.localeCompare(c.url));for(const o of a)t.push({rowType:"page",id:o.id,data:o});return t}const kSe=b.memo(function({rows:t,folderId:n,loading:r,selection:i,selectedDocumentId:s,onSelectDocument:a,currentChatId:o,defaultTab:c,columnActions:u,folderPaths:d,onNavigateToFolder:h,onSearchReset:p,canUseAutoUpdate:g=!0,isManagedSource:v=!1,hasMore:x,isLoadingMore:_,onLoadMore:w}){const S=gs(),E=b.useMemo(()=>u?{...u,onCutItem:(ne,se)=>{i.startCut(n,new Map([[ne,se]]))}}:void 0,[u,n,i]),T=vIt(E,d,{canUseAutoUpdate:g,isManagedSource:v,isChatMode:!!o}),N=X4(),A=b.useRef(null),k=b.useRef(!1),j=b.useMemo(()=>t.map(ne=>({id:ne.id,type:ne.rowType})),[t]),R=b.useMemo(()=>t.filter(ne=>i.selectedItems.has(ne.id)).length,[t,i.selectedItems]),P=t.length>0&&R===t.length,V=R>0&&!P,U=P?!0:V?"indeterminate":!1,G={isChatMode:!!o,isManagedSource:v},Q=b.useCallback((ne,se,H)=>{if(ne.target.closest("[data-kb-row-action]"))return;const O=ne.metaKey||ne.ctrlKey,L=ne.shiftKey;if(L&&(ne.preventDefault(),window.getSelection()?.removeAllRanges()),L&&A.current!=null){const M=Math.min(A.current,H),q=Math.max(A.current,H),X=t.slice(M,q+1).map(J=>({id:J.id,type:J.rowType}));i.selectRange(X)}else i.toggleItem(se.id,se.rowType,O),A.current=H},[t,i]),Z=b.useCallback(ne=>{ne.shiftKey&&(ne.preventDefault(),window.getSelection()?.removeAllRanges())},[]),K=b.useCallback((ne,se)=>{ne.target.closest("[data-kb-row-action]")||(se.rowType==="folder"?(i.clearSelection(),p?.(),h?h(se.id):S({to:"/knowledge-base",search:{folderId:se.id}})):se.rowType==="document"?a(se.id):window.open(se.data.url,"_blank","noopener,noreferrer"))},[S,i,a,h,p]),te=b.useCallback(ne=>{if((ne.metaKey||ne.ctrlKey)&&ne.key==="a"&&(ne.preventDefault(),i.selectAll(t.map(se=>({id:se.id,type:se.rowType})))),ne.key==="Escape"&&(i.cutItems?i.cancelCut():i.clearSelection()),(ne.metaKey||ne.ctrlKey)&&ne.key==="x"&&i.selectedItems.size>0){if(!ASe(t,i.selectedItems.keys(),G,N).enabled)return;ne.preventDefault(),i.startCut(n)}},[t,i,n,G,N]);return l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"relative outline-none",onKeyDown:te,tabIndex:0,role:"grid",children:[l.jsx(E5,{visible:!!r}),l.jsx("div",{className:yIt,children:l.jsxs("table",{className:bIt,children:[l.jsx(Lj,{children:l.jsxs(oh,{children:[l.jsx(oo,{className:$e("w-10 text-center",sie),onClick:ne=>ne.stopPropagation(),onPointerDown:ne=>ne.stopPropagation(),children:l.jsx("div",{"data-table":"prevent",children:l.jsx(N0,{size:"sm","aria-label":"Select all rows",checked:U,disabled:t.length===0,onCheckedChange:()=>i.toggleSelectAll(j),className:iie})})}),T.map(ne=>l.jsx(oo,{className:$e(sie,ne.meta?.align==="center"&&"text-center",ne.meta?.align==="right"&&"text-right"),style:ne.meta?.size?{maxWidth:`${ne.meta.size}px`}:void 0,children:typeof ne.header=="string"&&ne.meta?.headerTooltip?l.jsx(cn,{title:ne.meta.headerTooltip,children:l.jsx("span",{className:"cursor-help border-b border-dotted border-muted-fg/50",children:ne.header})}):typeof ne.header=="string"?ne.header:""},ne.id))]})}),l.jsx(Fj,{children:t.length===0&&!r?l.jsx(oh,{children:l.jsx(Ba,{colSpan:T.length+1,className:"py-12 text-center text-muted-fg",children:l.jsxs("div",{className:"flex flex-col items-center gap-2",children:[l.jsx("p",{children:l.jsx(D,{id:"M7DL
1409Q3"})}),l.jsx("p",{className:"text-xs",children:l.jsx(D,{id:"Yh0czh"})})]})})}):t.map((ne,se)=>{const H=i.selectedItems.has(ne.id),O=i.cutItems?.has(ne.id)??!1;return l.jsxs(oh,{className:$e("cursor-pointer transition-colors hover:bg-muted/30",H&&"bg-primary/10",O&&"opacity-50",ne.rowType==="page"&&"opacity-60"),onPointerDown:Z,onClick:L=>Q(L,ne,se),onDoubleClick:L=>K(L,ne),"data-table":"row",children:[l.jsx(Ba,{className:"w-10 text-center",onPointerDown:L=>{L.shiftKey&&(k.current=!0,L.preventDefault(),window.getSelection()?.removeAllRanges()),L.stopPropagation()},onClick:L=>{L.stopPropagation(),L.shiftKey&&(L.preventDefault(),Q(L,ne,se))},children:l.jsx("div",{"data-table":"prevent",children:l.jsx(N0,{size:"sm","aria-label":"Select row",checked:H,className:iie,onCheckedChange:L=>{if(k.current){k.current=!1;return}i.setItemSelected(ne.id,ne.rowType,L),A.current=se}})})}),T.map(L=>l.jsx(Ba,{className:$e(L.meta?.align==="center"&&"text-center",L.meta?.align==="right"&&"text-right"),style:L.meta?.size?{maxWidth:`${L.meta.size}px`}:void 0,children:L.cell?L.cell({row:{original:ne,index:se}}):null},L.id))]},ne.id)})})]})}),x&&w&&l.jsx("div",{className:"flex justify-center border-t border-border p-4",children:l.jsx(Oe,{variant:"ghost",outline:!0,disabled:_,loading:_,onClick:w,children:l.jsx(D,{id:"yQ2kGp"})})})]}),l.jsx(nIt,{currentChatId:o,documentId:s??void 0,onClose:()=>a(null),defaultTab:c})]})});function NSe({icon:e,label:t,progressValue:n,progressMax:r,completePercent:i,isFullyComplete:s,summary:a,children:o}){const{i18n:c,_:u}=Me(),[d,h]=b.useState(!1);return l.jsxs("div",{className:"mb-4 w-full overflow-hidden rounded-radius border border-border bg-white",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-x-6 gap-y-3 p-3",children:[l.jsxs("div",{className:"flex shrink-0 items-center gap-2.5",children:[l.jsx(e,{className:"size-4 shrink-0 text-muted-fg"}),l.jsx("span",{className:"text-sm font-bold",children:t})]}),l.jsxs("div",{className:"flex min-w-40 flex-1 basis-48 items-center gap-3",children:[l.jsx(U6,{value:n,max:r,variant:"success",size:"xs",className:"min-w-0 flex-1"}),l.jsxs("span",{className:"shrink-0 text-xs tabular-nums text-muted-fg",children:[i,"%"]}),s&&l.jsx(jj,{className:"size-4 shrink-0 text-success"})]}),l.jsx("div",{className:"flex flex-wrap items-center gap-3",children:a}),l.jsx("button",{type:"button",className:"ml-auto shrink-0 rounded p-1.5 hover:bg-muted/50 lg:ml-2","aria-expanded":d,"aria-label":d?c._({id:"VMlRqi"}):c._({id:"BowKyI"}),onClick:()=>h(p=>!p),children:d?l.jsx(kj,{className:"size-4"}):l.jsx(Xd,{className:"size-4"})})]}),d&&l.jsx("div",{className:"border-t border-border px-3 py-1.5",children:o})]})}function g2({title:e,description:t,count:n,highlight:r="none",isError:i=!1,isTotal:s=!1,isInactive:a=!1,onClick:o}){return l.jsxs("div",{className:$e("flex items-start justify-between gap-2 rounded-radius px-1 py-0.5",o&&!a&&"cursor-pointer hover:bg-muted/50",r==="solid"&&"bg-accent ring-1 ring-primary",r==="soft"&&"bg-muted/30",s&&"mb-0.5 border-b border-border pb-1",a&&"opacity-50"),onClick:a?void 0:o,onKeyDown:o?c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),o())}:void 0,role:o&&!a?"button":void 0,tabIndex:o&&!a?0:void 0,children:[l.jsxs("div",{className:"min-w-0 flex-1 leading-tight",children:[l.jsx("span",{className:$e("text-xs font-medium",s&&"text-sm",a&&"text-muted-fg"),children:e}),t&&l.jsx("p",{className:$e("text-[10px] leading-tight text-muted-fg",a&&"text-muted-fg/80"),children:t})]}),l.jsx("strong",{className:$e("shrink-0 text-xs tabular-nums",s&&"text-sm font-semibold",a&&"font-normal text-muted-fg",i&&n>0&&!a&&"text-danger"),children:n})]})}function jSe(e){return e===XN}function wIt(e){if(e===XN)return XN;if(e!==void 0&&Object.values(Hr).includes(e))return e}function SIt(e){return e===void 0?{}:jSe(e)?{pageHasDocument:!0}:{status:e}}function EIt(){const{i18n:e,_:t}=Me(),n=Ir();return b.useMemo(()=>{const r=[{id:qn.Done,title:n.documentStatus[qn.Done],description:e._({id:"cgD3IN"}),pipelineFilter:"done",getCount:s=>s.done},{id:qn.Uploading,title:n.documentStatus[qn.Uploading],description:e._({id:"GoeTqL"}),pipelineFilter:"processing",getCount:s=>s.uploading},{id:qn.Ready,title:n.documentStatus[qn.Ready],description:e._({id:"ouHvaX"}),pipelineFilter:"processing",getCount:s=>s.ready},{id:qn.Parsing,title:n.documentStatus[qn.Parsing],description:e._({id:"QOlf6+"}),pipelineFilter:"parsing",getCount:s=>s.parsing+s.parsingAsync},{id:qn.Parsed,title:n.documentStatus[qn.Parsed],description:e._({id:"U/zK8z"}),pipelineFilter:"processing",getCount:s=>s.parsed},{id:qn.Embedding,title:n.documentStatus[qn.Embedding],description:e._({id:"dwch/v"}),pipelineFilter:"embedding",getCount:s=>s.embedding},{id:qn.ParsingError,title:n.documentStatus[qn.ParsingError],description:e._({id:"aN6Lnw"}),pipelineFilter:"parsingError",isError:!0,getCount:s=>s.parsingError},{id:qn.EmbeddingError,title:n.documentStatus[qn.EmbeddingError],description:e._({id:"yLsD/0"}),pipelineFilter:"embeddingError",isError:!0,getCount:s=>s.embeddingError}],i=[{id:"discovered",title:e._({id:"YNsU8g"}),description:e._({id:"NIvei2"}),isTotal:!0,getCount:s=>s.totalPages},{id:"tracked",title:e._({id:"EaG6cP"}),description:e._({id:"vnnLQq"}),statusFilter:XN,getCount:s=>s.pagesWithDocument},{id:Hr.New,title:n.websitePageStatus[Hr.New],description:e._({id:"seQ42c"}),statusFilter:Hr.New,getCount:s=>s.newPages},{id:Hr.Removed,title:n.websitePageStatus[Hr.Removed],description:e._({id:"BHljKm"}),statusFilter:Hr.Removed,getCount:s=>s.removedPages},{id:Hr.Untracked,title:n.websitePageStatus[Hr.Untracked],description:e._({id:"/+Fium"}),statusFilter:Hr.Untracked,getCount:s=>s.untrackedPages}];return{readinessStats:r,websiteStats:i}},[n,t])}function CIt(){const{i18n:e,_:t}=Me(),n=Ir();return b.useMemo(()=>({processing:e._({id:"vrnnn9"}),errored:e._({id:"7Bj3x9"}),done:n.documentStatus[qn.Done],parsing:n.documentStatus[qn.Parsing],embedding:n.documentStatus[qn.Embedding],parsingError:n.documentStatus[qn.ParsingError],embeddingError:n.documentStatus[qn.EmbeddingError]}),[n,t])}function TIt(e,t){return!e||!t?"none":e===t?"solid":e==="processing"&&(t==="processing"||t==="parsing"||t==="embedding")||e==="errored"&&(t==="parsingError"||t==="embeddingError")||t==="processing"&&(e==="parsing"||e==="embedding")?"soft":"none"}function AIt({stat:e,stats:t,activeDocumentPipelineFilter:n,onDocumentPipelineFilterChange:r}){const i=e.getCount(t),s=i===0,a=s?"none":TIt(n,e.pipelineFilter);
1409return l.jsx(g2,{title:e.title,description:e.description,count:i,highlight:a,isError:e.isError,isInactive:s,onClick:!s&&e.pipelineFilter&&r?()=>r(e.pipelineFilter):void 0})}function kIt({stat:e,stats:t,activeStatusFilter:n,onStatusFilterChange:r}){const i=e.getCount(t),s=i===0,a=e.statusFilter!==void 0,o=!s&&a&&n===e.statusFilter;return l.jsx(g2,{title:e.title,description:e.description,count:i,highlight:o?"solid":"none",isTotal:e.isTotal,isInactive:s,onClick:!s&&a&&r?()=>r(e.statusFilter):void 0})}const RSe=b.memo(function({stats:t,onStatusFilterChange:n,onDocumentPipelineFilterChange:r,activeDocumentPipelineFilter:i,activeStatusFilter:s}){const{i18n:a,_:o}=Me(),{readinessStats:c,websiteStats:u}=EIt(),d=t.parsingError+t.embeddingError,h=t.uploading+t.ready+t.parsing+t.parsingAsync+t.parsed+t.embedding,p=t.total>0?Math.round(t.done/t.total*100):0,g=t.total>0&&t.done===t.total&&d===0,v=t.totalPages>0,x=b.useMemo(()=>[{key:"new",label:a._({id:"isRobC"}),count:t.newPages,status:Hr.New,variant:"warning"},{key:"removed",label:a._({id:"eps54V"}),count:t.removedPages,status:Hr.Removed,variant:"danger"}].filter(E=>E.count>0),[t.newPages,t.removedPages,o]),_=i==="errored"||i==="parsingError"||i==="embeddingError",w=i==="done",S=l.jsxs(l.Fragment,{children:[l.jsxs("button",{type:"button",className:$e("text-sm tabular-nums",r&&"curs
1409or-pointer rounded px-1 hover:bg-muted/50",w&&"bg-accent font-medium ring-1 ring-primary"),onClick:r?()=>r("done"):void 0,children:[l.jsx("span",{children:a._({id:"DPfwMq"})})," ",l.jsxs("strong",{children:[t.done,"/",t.total]})]}),d>0&&l.jsxs(En,{variant:"danger",size:"sm",className:$e("cursor-pointer",_&&"ring-2 ring-danger"),onClick:r?()=>r("errored"):void 0,children:[d," ",a._({id:"7l15X4"})]}),h>0&&!g&&l.jsx("button",{type:"button",className:$e("text-xs text-muted-fg",r&&"cursor-pointer rounded px-1 hover:bg-muted/50",i==="processing"&&"bg-accent font-medium"),onClick:r?()=>r("processing"):void 0,children:a._({id:"m7S0mW",values:{inProgress:h}})}),v&&x.map(E=>{const T=s===E.status;return l.jsxs(En,{variant:E.variant,size:"sm",className:$e("cursor-pointer",T&&"ring-2 ring-primary"),onClick:n?()=>n(E.status):void 0,children:[E.label," ",E.count]},E.key)})]});return l.jsx(NSe,{icon:yOe,label:a._({id:"R2iWi6"}),progressValue:t.done,progressMax:t.total>0?t.total:100,completePercent:p,isFullyComplete:g,summary:S,children:l.jsxs("div",{className:$e("grid grid-cols-1 gap-3",v&&"lg:grid-cols-2 lg:gap-5"),children:[l.jsxs("section",{children:[l.jsx("p",{className:"mb-0.5 text-[10px] font-semibold uppercase tracking-wide text-muted-fg",children:a._({id:"kRXcWA"})}),l.jsx("div",{className:"flex flex-col",children:c.map(E=>l.jsx(AIt,{stat:E,stats:t,activeDocumentPipelineFilter:i,onDocumentPipelineFilterChange:r},E.id))})]}),v&&l.jsxs("section",{children:[l.jsx("p",{className:"mb-0.5 text-[10px] font-semibold uppercase tracking-wide text-muted-fg",children:a._({id:"e+yom8"})}),l.jsx("div",{className:"flex flex-col",children:u.map(E=>l.jsx(kIt,{stat:E,stats:t,activeStatusFilter:s,onStatusFilterChange:n},E.id))})]})]})})});function ISe(){const{i18n:e,_:t}=Me();return b.useMemo(()=>({[$r.Upload]:{label:e._({id:"ONWvwQ"}),icon:V9},[$r.Website]:{label:e._({id:"On0aF2"}),icon:Vu},[$r.GoogleDrive]:{label:e._({id:"w9Xmw/"}),icon:M9},[$r.Rss]:{label:e._({id:"fD+f7T"}),icon:Mj}}),[t])}const OSe=b.memo(function({mode:t="org",folderId:n,currentFolder:r,rows:i,selection:s,mutations:a,search:o,onSearchChange:c,onCreateFolder:u,onAddDocuments:d,onDeleteFolder:h,onFolderSettings:p,statusFilter:g,onStatusFilterChange:v,documentPipelineFilter:x,onDocumentPipelineFilterChange:_,sourceTypeFilter:w,onSourceTypeFilterChange:S,isManagedSource:E,onBulkAgentAccess:T,onBulkAutoUpdate:N,isBulkAutoUpdateLocked:A=!1,onBulkWeight:k,onPromoteToTrackedWebsite:j,onExcludeFromKB:R,onRequestDeleteFolders:P,onViewDocument:V}){const{i18n:U,_:G}=Me(),Q=Ir(),Z=CIt(),K=ISe(),te=t==="chat",ne=X4(),se=b.useMemo(()=>[{value:void 0,label:U._({id:"N40H+G"})},{value:$r.Upload,label:U._({id:"TJhjLh"}),icon:K[$r.Upload].icon},{value:$r.Website,label:U._({id:"1J9wMe"}),icon:K[$r.Website].icon},{value:$r.GoogleDrive,label:U._({id:"XLMJ7O"}),icon:K[$r.GoogleDrive].icon},{value:$r.Rss,label:U._({id:"2DoBvq"}),icon:K[$r.Rss].icon}],[G,K]),H=b.useRef(null),[O,L]=b.useState();b.useLayoutEffect(()=>{const Rt=()=>{const Ct=H.current;Ct&&L(Ct.getBoundingClientRect().height)};return Rt(),window.addEventListener("resize",Rt),()=>window.removeEventListener("resize",Rt)});const M="flex min-h-11 items-center justify-between gap-2 rounded-lg border py-1.5 px-2",q={minHeight:O},X=!te&&!!n&&!!r,J={isChatMode:te,isManagedSource:!!E},W=r?cIt(r):null,re=!!g||!!x,ae=s.selectedItems.size>0,ce=!!s.cutItems,Te=new Set;for(const[Rt,Ct]of s.selectedItems)Te.add(Ct);const fe=Te.has("document"),xe=Te.has("folder"),ke=Te.has("page"),Fe=s.selectedItems.size===1,tt=ke&&!fe&&!xe,Se=!ke&&(fe||xe),et=xe&&!fe&&!ke&&Fe,ie=fe&&!xe&&!ke&&Fe?s.selectedItems.keys().next().value:void 0,ue=fe||xe,Ne=new Set,De=[];let be=!1,me=!1;for(const[Rt]of s.selectedItems){const Ct=i.find(Wt=>Wt.id===Rt);Ct?.rowType==="document"&&Ct.data.sourceType===$r.Rss&&(me=!0),Ct?.rowType==="page"&&Ne.add(Ct.data.status),Ct?.rowType==="document"&&Ct.data.type===Mr.Website?De.push(Ct.id):Ct?.rowType==="document"&&Ct.data.type===Mr.Document&&(be=!0)}const we=async()=>{if(!s.cutItems||s.cutItems.size===0)return;const Rt=[],Ct=[];for(const[Wt,Tn]of s.cutItems)Tn==="folder"?Rt.push(Wt):Tn==="document"&&Ct.push(Wt);try{for(const Wt of Rt)await a.moveFolder.mutateAsync({id:Wt,newParentId:n});Ct.length>0&&await a.bulkMove.mutateAsync({documentIds:Ct,folderId:n}),s.completePaste(),Re.success(U._({id:"wovn8C"}))}catch{Re.error(U._({id:"Lpv2GM"}))}},Le=async()=>{const{documentIds:Rt,folderIds:Ct}=hIt(i,s.selectedItems.keys(),J);if(!(Rt.length===0&&Ct.length===0)){if(Rt.length>0)try{await a.bulkDelete.mutateAsync({documentIds:Rt}),Re.success(Rt.length===1?U._({id:"ZlIPM3"}):U._({id:"CDoY5+"}))}catch{Re.error(U._({id:"a+bVaM"}));return}s.clearSelection(),Ct.length>0&&P?.(Ct)}},oe=async()=>{const Rt=[];for(const[Ct,Wt]of s.selectedItems)Wt==="document"&&Rt.push(Ct);
1409if(Rt.length!==0)try{await a.bulkRefresh.mutateAsync({documentIds:Rt}),s.clearSelection(),Re.success(U._({id:"q0Cwak"}))}catch{Re.error(U._({id:"mc6HHG"}))}},St=async()=>{const Rt=[];for(const[Ct,Wt]of s.selectedItems)Wt==="page"&&Rt.push(Ct);if(Rt.length!==0)try{await a.includePages.mutateAsync({pageIds:Rt}),s.clearSelection(),Re.success(U._({id:"yNEVs8"}))}catch{Re.error(U._({id:"MlHDei"}))}},Ut=async()=>{const Rt=[];for(const[Ct,Wt]of s.selectedItems)Wt==="page"&&Rt.push(Ct);if(Rt.length!==0)try{await a.dismissPages.mutateAsync({pageIds:Rt}),s.clearSelection(),Re.success(U._({id:"nybP/6"}))}catch{Re.error(U._({id:"N/r+Ve"}))}},Ht=async()=>{const{pageIds:Rt,documentIds:Ct,folderIds:Wt}=fIt(i,s.selectedItems.keys(),J);if(Rt.length===0&&Ct.length===0&&Wt.length===0)return;const Tn=[...s.selectedItems.keys()].filter(Ie=>{const dt=i.find($t=>$t.id===Ie);return dt?.rowType==="document"&&dt.data.type===Mr.Document}).length;try{await a.excludePages.mutateAsync({pageIds:Rt,documentIds:Ct,folderIds:Wt}),s.clearSelection(),Re.success(U._({id:"XOAUw3"})),Tn>0&&Re.info(U._({id:"Oe2x+q",values:{skippedManualCount:Tn}}))}catch{Re.error(U._({id:"rpidtn"}))}};if(ce)return l.jsxs("div",{className:`${M} border border-dashed border-primary/40 bg-primary/5`,style:q,children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[l.jsx(bN,{className:"size-4 text-primary"}),l.jsx(D,{id:"aPRF6H",values:{0:s.cutItems.size}})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Oe,{variant:"ghost",size:"sm",outline:!0,onClick:()=>s.cancelCut(),children:l.jsx(D,{id:"dEgA5A"})}),l.jsx(Oe,{size:"sm",disabled:!s.canPasteHere(n)||E||te,onClick:we,icon:l.jsx(q4e,{className:"size-4"}),children:l.jsx(D,{id:"Cin03m"})})]})]});if(ae){const Rt=uIt(i,s.selectedItems.keys(),J),Ct=dIt(i,s.selectedItems.keys(),J),Wt=ASe(i,s.selectedItems.keys(),J,ne),Tn=Se&&Wt.enabled,Ie=Se&&!Wt.enabled,dt=fe,$t=et,Mn=Se,Ve=ue&&!!T,ct=ue&&!!N,Gt=Se&&!!k,Cn=fe&&!xe&&!ke&&!be&&De.length>0&&!E&&!!j,Zr=Se&&Ct,rn=!tt&&(Mn||Ve||ct||Gt||Cn||Zr),_n=l.jsxs(l.Fragment,{children:[Mn&&l.jsx(du,{icon:bN,label:l.jsx(D,{id:"cCd8Bs"}),disabled:Ie,disabledTooltip:Ie?Wt.disabledTooltip:void 0,onClick:Tn?()=>s.startCut(n):void 0}),Ve&&l.jsxs(Er,{className:"flex items-center gap-2",onClick:T,children:[l.jsx(_N,{className:"size-4"}),l.jsx(D,{id:"2VYBbc"})]}),ct&&l.jsx(l.Fragment,{children:A?l.jsx(Em,{locked:!0,children:l.jsxs(Er,{className:"flex items-center gap-2 opacity-50",disabled:!0,children:[l.jsx(pm,{className:"size-4"}),l.jsx(D,{id:"CAFucN"})]})}):be?l.jsx(cn,{title:U._({id:"LOrJXB"}),children:l.jsx("span",{className:"block",children:l.jsxs(Er,{className:"flex items-center gap-2 opacity-50",disabled:!0,children:[l.jsx(Lo,{className:"size-4"}),l.jsx(D,{id:"CAFucN"})]})})}):l.jsxs(Er,{className:"flex items-center gap-2",onClick:N,children:[l.jsx(Lo,{className:"size-4"}),l.jsx(D,{id:"CAFucN"})]})}),Gt&&l.jsxs(Er,{className:"flex items-center gap-2",onClick:k,children:[l.jsx(toe,{className:"size-4"}),l.jsx(D,{id:"1hKEom"})]}),Cn&&l.jsx(du,{icon:Vu,label:l.jsx(D,{id:"Z8AIpA"}),hint:ne.promoteToWebsiteHierarchyHint,onClick:j}),Zr&&l.jsxs(l.Fragment,{children:[l.jsx(bh,{}),l.jsx(du,{icon:bo,className:"text-danger",label:l.jsx(D,{id:"cnGeoo"}),disabled:a.bulkDelete.isPending||a.deleteFolder.isPending,onClick:Le})]})]}),Hn=tt&&(Ne.has(Hr.New)||Ne.has(Hr.Untracked)),Jr=tt&&Ne.has(Hr.New);return l.jsxs("div",{className:`${M} border border-primary/20 bg-primary/5`,style:q,children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("span",{className:"text-sm font-medium",children:l.jsx(D,{id:"fvImQM",values:{0:s.selectedItems.size}})}),l.jsx("button",{className:"text-xs text-primary underline",onClick:()=>s.selectAll(i.map(Nr=>({id:Nr.id,type:Nr.rowType}))),children:l.jsx(D,{id:"wgNoIs"})}),l.jsx("button",{className:"text-xs text-muted-fg underline",onClick:()=>s.clearSelection(),children:l.jsx(D,{id:"HlKgQk"})})]}),l.jsxs("div",{className:"flex items-center gap-1",children:[Hn&&l.jsx(Oe,{variant:"secondary",size:"sm",onClick:St,loading:a.includePages.isPending,icon:l.jsx(Bd,{className:"size-4"}),children:ne.addToTrackedPagesLabel}),Jr&&l.jsx(Oe,{variant:"ghost",size:"sm",outline:!0,onClick:Ut,loading:a.dismissPages.isPending,children:l.jsx(D,{id:"gbbkE7"})}),Rt&&l.jsx(Oe,{variant:"ghost",size:"sm",outline:!0,onClick:Ht,loading:a.excludePages.isPending,icon:l.jsx(E0,{className:"size-4"}),children:ne.removeFromTrackedPagesLabel}),$t&&l.jsx(Oe,{variant:"ghost",size:"sm",outline:!0,onClick:()=>{const Nr=s.selectedItems.keys().next().value;Nr&&p(Nr)},icon:l.jsx(ju,{className:"size-4"}),children:l.jsx(D,{id:"ePK91l"})}),dt&&l.jsx(Oe,{variant:"ghost",size:"sm",outline:!0,onClick:oe,loading:a.bulkRefresh.isPending,title:me?U._({id:"BCBjWA"}):void 0,icon:l.jsx(JS,{className:"size-4"}),children:l.jsx(D,{id:"Y+SGin"})}),ie&&V&&l.jsx(cn,{title:U._({id:"2Eoi/a"}),children:l.jsx(Oe,{variant:"ghost",size:"sm",outline:!0,onClick:()=>V(ie),icon:l.jsx(Ry,{className:"size-4"}),"aria-label":U._({id:"2Eoi/a"})})}),rn&&l.jsxs(Ou,{modal:!1,children:[l.jsx(Pu,{asChild:!0,children:l.jsx(Oe,{variant:"ghost",size:"sm",outline:!0,icon:l.jsx(J1,{className:"size-4"}),"aria-label":U._({id:"JcD7qf"})})}),l.jsx(Mu,{side:"bottom",align:"end",children:_n})]})]})]})}return l.jsxs("div",{ref:H,className:`${M} border-transparent`,style:q,children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx("div",{className:"w-48 shrink-0",children:l.jsx(fn,{type:"search",placeholder:U._({id:"YIix5Y"}),value:o,onChange:Rt=>c(Rt.target.value),className:"h-8"})}),S&&l.jsx("div",{className:"flex flex-wrap items-center gap-1",children:se.map(Rt=>{const Ct=w===Rt.value,Wt=Rt.icon;return l.jsxs(En,{variant:Ct?"primary":"secondary",outline:!Ct,size:"sm",className:"cursor-pointer gap-1",onClick:()=>S(Rt.value),children:[Wt&&l.jsx(Wt,{className:"size-3"}),Rt.label]},Rt.value??"all")})}),re&&l.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[g&&l.jsxs(En,{variant:"secondary",size:"sm",className:"gap-1 pr-1",children:[jSe(g)?U._({id:"EaG6cP"}):Q.websitePageStatus[g],l.jsx("button",{type:"button",className:"rounded p-0.5 hover:bg-muted","aria-label":U._({id:"Q2mGA7"}),onClick:()=>v(void 0),children:l.jsx(pl,{className:"size-3"})})]}),x&&_&&l.jsxs(En,{variant:"secondary",size:"sm",className:"gap-1 pr-1",children:[Z[x],l.jsx("button",{type:"button",className:"rounded p-0.5 hover:bg-muted","aria-label":U._({id:"Q2mGA7"}),onClick:()=>_(void 0),children:l.jsx(pl,{className:"size-3"})})]})]})]}),l.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[!te&&!E&&l.jsx(Oe,{variant:"ghost",size:"sm",outline:!0,onClick:u,icon:l.jsx(vRe,{className:"size-4"}),children:l.jsx(D,{id:"tX5yOZ"})}),(!E||te)&&l.jsx(Oe,{size:"sm",onClick:d,icon:l.jsx(Bd,{className:"size-4"}),children:l.jsx(D,{id:"tMtZro"})}),X&&l.jsxs(Ou,{modal:!1,children:[l.jsx(Pu,{asChild:!0,children:l.jsx(Oe,{variant:"ghost",size:"sm",outline:!0,icon:l.jsx(J1,{className:"size-4"}),"aria-label":U._({id:"oQ/KtC"})})}),l.jsxs(Mu,{side:"bottom",align:"end",children:[l.jsxs(Er,{className:"flex items-center gap-2",onClick:()=>p(),children:[l.jsx(ju,{className:"size-4"}),l.jsx(D,{id:"ePK91l"})]}),l.jsxs(Er,{className:"flex items-center gap-2",onClick:()=>p(void 0,"agents"),children:[l.jsx(_N,{className:"size-4"}),l.jsx(D,{id:"2VYBbc"})]}),N&&l.jsx(l.Fragment,{children:A?l.jsx(Em,{locked:!0,children:l.jsxs(Er,{className:"flex items-center gap-2 opacity-50",disabled:!0,children:[l.jsx(pm,{className:"size-4"}),l.jsx(D,{id:"CAFucN"})]})}):l.jsxs(Er,{className:"flex items-center gap-2",onClick:()=>p(void 0,"auto-update"),children:[l.jsx(Lo,{className:"size-4"}),l.jsx(D,{id:"CAFucN"})]})}),W&&l.jsxs(l.Fragment,{children:[l.jsx(bh,{}),W==="exclude"&&R&&l.jsx(du,{icon:E0,label:ne.removeFromTrackedPagesLabel,hint:ne.removeFromTrackedPagesDisclaimer,onClick:()=>R({folderIds:[r.id]})}),W==="delete"&&l.jsx(du,{icon:bo,className:"text-danger",label:l.jsx(D,{id:"97QUV6"}),onClick:h})]})]})]})]})]})});function VU(e){return e.uri??e.publicUrl??null}function NIt(e){const t=VU(e);if(!t)return null;try{return mWe(t)}catch{return null}}function aie(e){const t=e.map(VU).filter(n=>!!n);return vWe(t)}function jIt({open:e,onOpenChange:t,documents:n,mutations:r,onFinished:i}){const{i18n:s,_:a}
1409=Me(),o=Ir(),{isKbAutoUpdatesLocked:c}=Xu(),u=X4(),d=b.useMemo(()=>{const V=new Map;for(const U of n){const G=NIt(U);if(!G)continue;const Q=V.get(G)??[];Q.push(U),V.set(G,Q)}return[...V.entries()].map(([U,G])=>({host:U,docs:G}))},[n]),[h,p]=b.useState(""),[g,v]=b.useState(""),[x,_]=b.useState(!1),[w,S]=b.useState(Vn.Never),E=b.useRef(!1);b.useEffect(()=>{if(!e){E.current=!1;return}E.current||d.length===0||(E.current=!0,p(d[0]?.host??""),v(d[0]?aie(d[0].docs):""),_(!1),S(Vn.Never))},[e,d]),b.useEffect(()=>{c&&S(Vn.Never)},[c]);const T=d.find(V=>V.host===h)??null,N=gWe(g),A=b.useMemo(()=>T?T.docs.filter(V=>{const U=VU(V);return!!U&&xWe(U,N)}):[],[T,N]),k=T?`https://${T.host}${N}`:"",{data:j}=Ae.documentFolders.checkWebsiteRootOverlap.useQuery({url:k},{enabled:e&&!!k}),R=V=>{p(V);const U=d.find(G=>G.host===V);v(U?aie(U.docs):"")},P=async()=>{if(!(!T||A.length===0))try{const V=await r.promoteToTrackedWebsite.mutateAsync({documentIds:A.map(U=>U.id),targetHost:T.host,pathPrefix:N,moveAllHostDocuments:x,...!j?.exactMatch&&{discoveryFrequency:c?Vn.Never:w}});Re.success(s._({id:"MAhW3w",values:{0:V.moved}})),t(!1),i?.()}catch{Re.error(s._({id:"SdniO1"}))}};return l.jsx(ui,{open:e,onOpenChange:t,children:l.jsxs(Fi,{className:"w-[560px]",children:[l.jsxs(ks,{children:[l.jsx(Wi,{children:l.jsx(D,{id:"Z8AIpA"})}),l.jsx(no,{children:u.promoteToWebsiteHierarchyHint})]}),l.jsxs("div",{className:"space-y-4 py-4",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("p",{className:"text-sm font-medium",children:l.jsx(D,{id:"Ai2U7L"})}),l.jsx(tr,{value:h,onValueChange:R,children:d.map(V=>l.jsxs(Yt,{value:V.host,children:[V.host," (",V.docs.length,")"]},V.host))})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("p",{className:"text-sm font-medium",children:l.jsx(D,{id:"211FXM"})}),l.jsx(fn,{value:g,onChange:V=>v(V.target.value),placeholder:s._({id:"DlU/uB"})}),k?l.jsxs("p",{className:"text-muted-foreground text-xs",children:[l.jsx(D,{id:"hdtbpf"})," ",k,T&&A.length!==T.docs.length?l.jsxs(l.Fragment,{children:[" · ",l.jsx(D,{id:"f2zTzl",values:{0:A.length,1:T.docs.length}})]}):null]}):null]}),j?.exactMatch?l.jsx(ga,{variant:"info",title:s._({id:"GXtJ/r"}),description:s._({id:"r/q941",values:{0:j.exactMatch.websiteUrl}})}):l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(ot,{htmlFor:"promoteDiscoveryFrequency",children:l.jsx(D,{id:"fmYfOs"})}),l.jsx(ch,{locked:c})]}),l.jsxs(tr,{id:"promoteDiscoveryFrequency",value:w,disabled:c,onValueChange:V=>S(V),children:[l.jsx(Yt,{value:Vn.Never,children:l.jsx(D,{id:"az8lvo"})}),af.filter(V=>V!==Vn.Never).map(V=>l.jsx(Yt,{value:V,children:o.updateFrequency[V]},V))]})]}),j?l.jsx(dSe,{overlappingRoots:j.overlappingRoots}):null,l.jsxs("label",{className:"flex items-start gap-2 text-sm",children:[l.jsx(N0,{checked:x,onCheckedChange:V=>_(!!V),className:"mt-0.5"}),l.jsx("span",{children:N?l.jsx(D,{id:"lJ7GT5"}):l.jsx(D,{id:"NlHVVj"})})]})]}),l.jsxs(wi,{children:[l.jsx(Oe,{variant:"ghost",outline:!0,onClick:()=>t(!1),children:l.jsx(D,{id:"dEgA5A"})}),l.jsx(Oe,{onClick:P,disabled:!T||A.length===0,loading:r.promoteToTrackedWebsite.isPending,children:l.jsx(D,{id:"+z9xdk"})})]})]})})}function oie(e){if(!e)return null;const t=e instanceof Date?e:new Date(e);return Number.isNaN(t.getTime())?null:t}function RIt(e){if(!e||typeof e!="object")return!1;const t=e;return typeof t.filesCreated=="number"&&typeof t.filesSkipped=="number"&&typeof t.filesFailed=="number"}const IIt=b.memo(function({folder:t,mutations:n}){const{i18n:r,_:i}=Me(),s=ISe(),{isKbAutoUpdatesLocked:a}=Xu();if(!t||!pSe(t))return null;const o=t.sourceType??$r.Upload,c=o===$r.Website,u=s[o]??s[$r.Upload],d=u.icon,h=t.sourceUri??null,p=t.lastSyncError,g=oie(t.lastSyncedAt),v=oie(t.nextUpdateAt),x=a&&!!v,_=async(w="crawl")=>{try{const S=await n.triggerCrawl.mutateAsync({id:t.id,...c?{mode:w}:{}});if(RIt(S)){const{filesCreated:E,filesSkipped:T,filesFailed:N}=S,A=r._({id:"FAo7Hs",values:{filesCreated:E,filesSkipped:T,filesFailed:N}});N>0||T>0?Re.warning(A,{duration:6e3}):Re.success(A,{duration:6e3});return}Re.success(c?w==="crawl_and_refresh"?r._({id:"QDnQho"}):r._({id:"gH2ojz"}):r._({id:"lzdco+"}),{duration:6e3})}catch(S){Re.error(S instanceof Error?S.message:c?r._({id:"QimqJd"}):r._({id:"+zs7X3"}))}};return l.jsxs("div",{className:"mb-2 flex flex-wrap items-center justify-between gap-2 rounded-lg border bg-white px-3 py-2",children:[l.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1",children:[l.jsxs(En,{variant:"secondary",size:"sm",className:"gap-1",children:[l.jsx(d,{className:"size-3"}),u.label]}),h&&l.jsx("span",{className:"truncate text-sm text-muted-fg",title:h,children:h}),g&&l.jsx("span",{className:"text-xs text-muted-fg",children:c?l.jsx(D,{id:"HYeW4C",values:{0:yt.date(g,Zn.DateTimeNumeric)}}):l.jsx(D,{id:"nVVTqj",values:{0:yt.date(g,Zn.DateTimeNumeric)}})}),v&&!p&&!x&&l.jsx("span",{className:"text-xs text-muted-fg",children:c?l.jsx(D,{id:"It1wUK",values:{0:yt.date(v,Zn.DateTimeNumeric)}}):l.jsx(D,{id:"JGvtvW",values:{0:yt.date(v,Zn.DateTimeNumeric)}})}),l.jsx(Eve,{paused:x}),p&&l.jsx(cn,{title:p,children:l.jsxs(En,{variant:"danger",size:"sm",className:"gap-1",children:[l.jsx(tE,{className:"size-3"}),c?l.jsx(D,{id:"kTEOWP"}):l.jsx(D,{id:"5TRY4+"})]})})]}),c?l.jsxs(Ou,{modal:!1,children:[l.jsx(Pu,{asChild:!0,children:l.jsxs(Oe,{variant:"ghost",size:"sm",outline:!0,loading:n.triggerCrawl.isPending,disabled:n.triggerCrawl.isPending,icon:l.jsx(Lo,{className:"size-4"}),children:[l.jsx(D,{id:"98K2Lu"}),l.jsx(Xd,{className:"ml-1 size-3"})]})}),l.jsxs(Mu,{side:"bottom",align:"end",children:[l.jsx(cn,{title:r._({i
1409d:"I8m82s"}),children:l.jsx(Er,{onClick:()=>_("crawl"),children:l.jsx(D,{id:"98K2Lu"})})}),l.jsx(cn,{title:r._({id:"sgv/ms"}),children:l.jsx(Er,{onClick:()=>_("crawl_and_refresh"),children:l.jsx(D,{id:"Bn1fKr"})})})]})]}):l.jsx(Oe,{variant:"ghost",size:"sm",outline:!0,onClick:()=>_(),loading:n.triggerCrawl.isPending,disabled:n.triggerCrawl.isPending,icon:l.jsx(Lo,{className:"size-4"}),children:l.jsx(D,{id:"lb/UU4"})})]})}),OIt=50;function PSe({folderId:e,chatId:t,search:n,statusFilter:r,documentPipelineFilter:i,sourceTypeFilter:s,selection:a,mutations:o,onFolderSettings:c}){const{i18n:u,_:d}=Me(),h=gs(),p=Ae.useUtils(),[g,v]=b.useState(null),[x,_]=b.useState(),[w,S]=b.useState(!1),[E,T]=b.useState(!1),[N,A]=b.useState(!1),[k,j]=b.useState(null),R=SIt(r),P=b.useMemo(()=>({folderId:e,search:n||void 0,status:R.status,pageHasDocument:R.pageHasDocument,chatId:t,documentPipelineFilter:i,sourceType:s}),[e,n,R.status,R.pageHasDocument,t,i,s]),{data:V,isLoading:U,fetchNextPage:G,hasNextPage:Q,isFetchingNextPage:Z}=C9({queryKey:[...ml(Ae.documentFolders.findContents,P),"infinite"],queryFn:({pageParam:me=1})=>Cs.documentFolders.findContents.query({...P,pagination:{page:me,pageSize:OIt}}),getNextPageParam:me=>me.meta?.hasMore?me.meta.page+1:void 0,initialPageParam:1,refetchOnMount:"always"}),K=b.useMemo(()=>V?.pages.length?V.pages.flatMap(me=>_It(me)):[],[V]),te=b.useCallback(me=>{const we=K.find(Le=>Le.rowType==="folder"&&Le.id===me);return{id:me,name:we?.rowType==="folder"?we.data.name:me}},[K]),ne=b.useCallback((me,we)=>{j({mode:"single",folder:te(me),onDeleted:we?.onDeleted??(()=>p.documentFolders.findContents.invalidate({folderId:e,chatId:t}))})},[te,p,e,t]),se=b.useCallback(me=>{if(me.length!==0){if(me.length===1){ne(me[0]);return}j({mode:"bulk",folders:me.map(we=>te(we)),onDeleted:()=>p.documentFolders.findContents.invalidate({folderId:e,chatId:t})})}},[ne,te,p,e,t]),H=b.useCallback(()=>{j(null)},[]),O=V?.pages[0],L=b.useMemo(()=>{const me=O?.pageStatusCounts;return me?{new:me.New??0,removed:me.Removed??0,existing:me.Existing??0,untracked:me.Untracked??0}:null},[O]),M=b.useCallback((me,we)=>{_(we),v(me)},[]),q=b.useCallback(async me=>{if(me.length!==0)try{await o.bulkDelete.mutateAsync({documentIds:me}),Re.success(me.length===1?u._({id:"ZlIPM3"}):u._({id:"CDoY5+"}))}catch{Re.error(u._({id:"a+bVaM"}))}},[o.bulkDelete,d]),X=b.useCallback(async me=>{await q([me])},[q]),J=b.useCallback(async me=>{try{await o.excludePages.mutateAsync({pageIds:me.pageIds??[],documentIds:me.documentIds??[],folderIds:me.folderIds??[]}),Re.success(u._({id:"XOAUw3"}))}catch{Re.error(u._({id:"rpidtn"}))}},[o.excludePages,d]),W=b.useCallback(async me=>{try{await o.dismissPages.mutateAsync({pageIds:[me]}),Re.success(u._({id:"nybP/6"}))}catch{Re.error(u._({id:"N/r+Ve"}))}},[o.dismissPages,d]),re=b.useCallback(async me=>{try{await o.includePages.mutateAsync({pageIds:[me]}),Re.success(u._({id:"yNEVs8"}))}catch{Re.error(u._({id:"MlHDei"}))}},[o.includePages,d]),ae=b.useCallback(me=>{me===null&&_(void 0),v(me)},[]),ce=b.useMemo(()=>K.filter(me=>a.selectedItems.has(me.id)&&(me.rowType==="document"||me.rowType==="folder")),[K,a.selectedItems]),Te=b.useCallback(()=>{if(a.selectedItems.size===1){const me=a.selectedItems.entries().next().value;if(me?.[1]==="document"){M(me[0],"agents");return}if(me?.[1]==="folder"){c?.(me[0],"agents");return}}S(!0)},[M,c,a.selectedItems]),fe=b.useCallback(()=>{if(a.selectedItems.size===1){const me=a.selectedItems.entries().next().value;if(me?.[1]==="document"){M(me[0],"auto-update");return}if(me?.[1]==="folder"){c?.(me[0],"auto-update");return}}T(!0)},[M,c,a.selectedItems]),xe=b.useCallback(()=>{A(!0)},[]),ke=b.useCallback(async(me,we)=>{await o.bulkWeight.mutateAsync({documentIds:[me],weight:we}),Re.success(u._({id:"RfCLxd"}))},[o.bulkWeight,d]),Fe=b.useCallback(async(me,we)=>{await o.updateFolder.mutateAsync({id:me,defaultWeight:we}),Re.success(u._({id:"RfCLxd"}))},[o.updateFolder,d]),tt=yb(),Se=b.useCallback(async me=>{try{await tt.refresh.mutateAsync({id:me}),Re.success(u._({id:"3STKJx"}))}catch{Re.error(u._({id:"M89ivQ"}))}},[tt.refresh,d]),et=b.useCallback(async me=>{try{await tt.resetEmbedding.mutateAsync({id:me}),Re.success(u._({id:"VwkzQo"}))}catch{Re.error(u._({id:"s04wy0"}))}},[tt.resetEmbedding,d]),[pt,ie]=b.useState(null),ue=b.useCallback(me=>{ie(me)},[]),Ne=b.useCallback(me=>{h({to:"/knowledge-base",search:{folderId:me}})},[h]),De=b.useMemo(()=>({onOpenDocumentTab:M,onViewDetails:ae,onDeleteDocument:X,onRequestDeleteFolder:ne,onExcludeFromKB:J,onFolderSettings:c??(()=>{}),onDismissPage:W,onIncludePage:re,onRefreshDocument:Se,onResetEmbedding:et,onGenerateTestCases:ue,onNavigateToFolder:Ne,onUpdateDocumentPriority:ke,onUpdateFolderPriority:Fe}),[M,ae,X,ne,J,c,W,re,Se,et,ue,Ne,ke,Fe]),be=b.useMemo(()=>
1409{if(!V?.pages.length)return null;const me={};for(const we of V.pages)we.folderPaths&&Object.assign(me,we.folderPaths);return Object.keys(me).length>0?me:null},[V]);return{rows:K,pageCounts:L,folderPaths:be,isLoading:U,contentsData:O,fetchNextPage:G,hasNextPage:!!Q,isFetchingNextPage:Z,selectedDocumentId:g,setSelectedDocumentId:v,defaultTab:x,setDefaultTab:_,selectedSettingRows:ce,isBulkAgentAccessOpen:w,setIsBulkAgentAccessOpen:S,isBulkAutoUpdateOpen:E,setIsBulkAutoUpdateOpen:T,isBulkWeightOpen:N,setIsBulkWeightOpen:A,handleOpenDocumentTab:M,handleDeleteDocuments:q,handleDeleteDocument:X,handleExcludeFromKB:J,folderDeletePrompt:k,clearFolderDeletePrompt:H,requestDeleteFolder:ne,requestDeleteFolders:se,handleSelectDocument:ae,handleBulkAgentAccess:Te,handleBulkAutoUpdate:fe,handleBulkWeight:xe,columnActions:De,testCasesDocumentId:pt,setTestCasesDocumentId:ie}}function MSe(){const e=Ae.useUtils(),t=async()=>{await Promise.all([e.documentFolders.findAll.invalidate(),e.documents.getStats.invalidate(),e.chats.findAll.invali
1409date(),e.chats.findOne.invalidate()])},n=Ae.documentFolders.create.useMutation({onSuccess:dr}),r=Ae.documentFolders.update.useMutation({onSuccess:dr}),i=Ae.documentFolders.delete.useMutation({onSuccess:t}),s=Ae.documentFolders.move.useMutation({onSuccess:dr}),a=Ae.documentFolders.assignToChats.useMutation({onSuccess:dr}),o=Ae.documentFolders.removeFromChat.useMutation({onSuccess:dr}),c=Ae.documentFolders.createWebsite.useMutation({onSuccess:dr}),u=Ae.documentFolders.previewWebsiteCrawl.useMutation(),d=Ae.documentFolders.triggerCrawl.useMutation({onSuccess:dr}),h=Ae.documentFolders.promoteToTrackedWebsite.useMutation({onSuccess:dr}),p=Ae.documentFolders.includePages.useMutation({onSuccess:dr}),g=Ae.documentFolders.dismissPages.useMutation({onSuccess:dr}),v=Ae.documentFolders.excludePages.useMutation({onSuccess:dr}),x=Ae.documents.bulkMoveToFolder.useMutation({onSuccess:dr}),_=Ae.documents.bulkDelete.useMutation({onSuccess:dr}),w=Ae.documents.bulkAssignToChats.useMutation({onSuccess:dr}),S=Ae.documentFolders.bulkAssignToChats.useMutation({onSuccess:dr}),E=Ae.documents.bulkUpdateAutoUpdate.useMutation({onSuccess:dr}),T=Ae.documentFolders.bulkUpdateAutoUpdate.useMutation({onSuccess:dr}),N=Ae.documents.bulkRefresh.useMutation({onSuccess:dr}),A=Ae.documents.bulkUpdateWeight.useMutation({onSuccess:dr});return{createFolder:n,updateFolder:r,deleteFolder:i,moveFolder:s,assignToChats:a,removeFromChat:o,createWebsite:c,previewCrawl:u,triggerCrawl:d,promoteToTrackedWebsite:h,includePages:p,dismissPages:g,excludePages:v,bulkMove:x,bulkDelete:_,bulkAssign:w,bulkAssignFoldersToChats:S,bulkUpdateDocumentsAutoUpdate:E,bulkUpdateFoldersAutoUpdate:T,bulkRefresh:N,bulkWeight:A}}function DSe(){const[e,t]=b.useState(new Map),[n,r]=b.useState(null),[i,s]=b.useState(null),a=(()=>{if(e.size===0)return null;const w=new Set(e.values());return w.size>1?"mixed":w.values().next().value??null})(),o=b.useCallback((w,S,E)=>{t(T=>{if(!E&&T.size===1&&T.has(w))return new Map;const N=E?new Map(T):new Map;return N.has(w)?N.delete(w):N.set(w,S),N})},[]),c=b.useCallback((w,S,E)=>{t(T=>{const N=new Map(T);return E?N.set(w,S):N.delete(w),N})},[]),u=b.useCallback(w=>{t(S=>{const E=new Map(S);for(const T of w)E.set(T.id,T.type);return E})},[]),d=b.useCallback(w=>{const S=new Map;for(const E of w)S.set(E.id,E.type);t(S)},[]),h=b.useCallback(()=>{t(new Map)},[]),p=b.useCallback(w=>{t(S=>{if(w.length===0)return new Map;if(w.every(N=>S.has(N.id)))return new Map;const T=new Map;for(const N of w)T.set(N.id,N.type);return T})},[]),g=b.useCallback((w,S)=>{r(new Map(S??e)),s(w)},[e]),v=b.useCallback(()=>{r(null),s(null)},[]),x=b.useCallback(w=>n!=null&&n.size>0&&w!==i,[n,i]),_=b.useCallback(()=>{r(null),s(null),t(new Map)},[]);return{selectedItems:e,selectionType:a,toggleItem:o,setItemSelected:c,selectRange:u,selectAll:d,toggleSelectAll:p,clearSelection:h,cutItems:n,cutSourceFolderId:i,startCut:g,cancelCut:v,canPasteHere:x,completePaste:_}}const FSe=nr("/_baseLayout/knowledge-base/")({component:PIt,validateSearch:e=>({folderId:e?.folderId,status:wIt(e?.status),documentPipelineFilter:(()=>{const t=$he.safeParse(e?.documentPipelineFilter);return t.success?t.data:void 0})(),sourceType:(()=>{const t=Bhe.safeParse(e?.sourceType);return t.success?t.data:void 0})()})});function PIt(){const{i18n:e,_:t}=Me(),n=gs(),r=Ae.useUtils(),{folderId:i,status:s,documentPipelineFilter:a,sourceType:o}=FSe.useSearch(),c=DSe(),u=MSe(),{canUseKbAutoUpdates:d,isKbAutoUpdatesLocked:h}=Xu();b.useEffect(()=>{c.clearSelection()},[i]);const[p,g]=b.useState(""),v=b.useCallback(J=>{n({to:"/knowledge-base",search:{folderId:i,status:J!==void 0&&J===s?void 0:J,documentPipelineFilter:void 0,sourceType:o}})},[i,n,o,s]),x=b.useCallback(J=>{n({to:"/knowledge-base",search:{folderId:i,status:void 0,documentPipelineFilter:J!==void 0&&J===a?void 0:J,sourceType:o}})},[a,i,n,o]),_=b.useCallback(J=>{n({to:"/knowledge-base",search:{folderId:i,status:s,documentPipelineFilter:a,sourceType:J!==void 0&&J===o?void 0:J}})},[a,i,n,o,s]),[w,S]=b.useState(!1),[E,T]=b.useState(!1),[N,A]=b.useState(!1),[k,j]=b.useState(null),[R,P]=b.useState("general"),V=b.useCallback((J,W="general")=>{const re=J??i;re&&(P(W),j(re))},[i]),U=PSe({folderId:i??null,search:p,statusFilter:s,documentPipelineFilter:a,sourceTypeFilter:o,selection:c,mutations:u,onFolderSettings:V}),{data:G,isError:Q}=Ae.documentFolders.findOne.useQuery({id:i},{enabled:!!i,retry:!1,throwOnError:!1,refetchOnMount:"always"});b.useEffect(()=>{Q&&n({to:"/knowledge-base",search:{}}
1409)},[Q,n]);const{data:Z}=Ae.documentFolders.getBreadcrumbs.useQuery({folderId:i},{enabled:!!i,retry:!1,throwOnError:!1}),{data:K}=Ae.documents.getStats.useQuery(void 0,{refetchOnMount:"always"}),te=yb(),{data:ne}=Ae.chats.findAll.useQuery({pagination:{pageSize:100},fields:["id","name"]}),se=b.useMemo(()=>{const J=[{label:e._({id:"yWH3P0"}),to:"/knowledge-base"}];if(Z)for(const W of Z)J.push({label:W.name,to:"/knowledge-base",search:{folderId:W.id}});return J},[Z,t]),H=b.useCallback(()=>{i&&U.requestDeleteFolder(i,{onDeleted:async()=>{const J=Z&&Z.length>1?Z.at(-2)?.id:void 0;n({to:"/knowledge-base",search:J?{folderId:J}:{}}),await r.documentFolders.findContents.invalidate({folderId:J??null})}})},[Z,U.requestDeleteFolder,i,n,r]),O=b.useCallback(async()=>{await te.refreshAllByOrg.mutateAsync({statuses:[qn.EmbeddingError,qn.ParsingError]})},[te]),L=(K?.parsingError??0)+(K?.embeddingError??0)>0,M=b.useMemo(()=>{const J=new Set(c.selectedItems.keys());return U.rows.filter(W=>W.rowType==="document"&&J.has(W.id)&&W.data.type==="website").map(W=>W.data)},[U.rows,c.selectedItems]),q=G?.name??e._({id:"yWH3P0"}),X=zU(G);return l.jsxs(TE,{title:q,breadcrumbs:se,actions:i?void 0:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(zRt,{}),L&&l.jsx(cn,{title:e._({id:"utzBmu"}),children:l.jsx(Oe,{size:"sm",variant:"danger",loading:te.refreshAllByOrg.isPending,disabled:te.refreshAllByOrg.isPending,onClick:O,children:l.jsx(D,{id:"mAuVsA"})})})]}),children:[K&&l.jsx(RSe,{stats:K,onStatusFilterChange:v,onDocumentPipelineFilterChange:x,activeDocumentPipelineFilter:a,activeStatusFilter:s}),l.jsx(IIt,{folder:G??null,mutations:u}),l.jsx(wSe,{toolbar:l.jsx(OSe,{folderId:i??null,currentFolder:G??null,rows:U.rows,selection:c,mutations:u,search:p,onSearchChange:g,onCreateFolder:()=>S(!0),onAddDocuments:()=>T(!0),onDeleteFolder:H,onFolderSettings:V,statusFilter:s,onStatusFilterChange:v,documentPipelineFilter:a,onDocumentPipelineFilterChange:x,sourceTypeFilter:o,onSourceTypeFilterChange:_,isManagedSource:X,onBulkAgentAccess:U.handleBulkAgentAccess,onBulkAutoUpdate:U.handleBulkAutoUpdate,isBulkAutoUpdateLocked:h,onBulkWeight:U.handleBulkWeight,onPromoteToTrackedWebsite:()=>A(!0),onExcludeFromKB:U.handleExcludeFromKB,onRequestDeleteFolders:U.requestDeleteFolders,onViewDocument:U.handleSelectDocument}),children:l.jsx(kSe,{rows:U.rows,folderId:i??null,loading:U.isLoading,selection:c,selectedDocumentId:U.selectedDocumentId,onSelectDocument:U.handleSelectDocument,defaultTab:U.defaultTab,columnActions:U.columnActions,folderPaths:U.folderPaths,isManagedSource:X,onSearchReset:()=>{g(""),v(void 0),x(void 0),_(void 0)},canUseAutoUpdate:d,hasMore:U.hasNextPage,isLoadingMore:U.isFetchingNextPage,onLoadMore:()=>U.fetchNextPage()})}),l.jsx(KRt,{open:w,onOpenChange:S,parentId:i??null,mutations:u}),U.folderDeletePrompt&&l.jsx(_Se,{open:!0,onOpenChange:J=>{J||U.clearFolderDeletePrompt()},folders:U.folderDeletePrompt.mode==="single"?[U.folderDeletePrompt.folder]:U.folderDeletePrompt.folders,mutations:u,onDeleted:async()=>{const J=U.folderDeletePrompt?.onDeleted;U.clearFolderDeletePrompt(),c.clearSelection(),await J?.()}}),k&&l.jsx(YRt,{open:!!k,onOpenChange:J=>{J||(j(null),P("general"))},folderId:k,defaultTab:R,mutations:u}),l.jsx(fSe,{allChats:ne?.items??[],folderId:i,externalOpen:E,onExternalOpenChange:T}),l.jsx(jIt,{open:N,onOpenChange:A,documents:M,mutations:u,onFinished:()=>c.clearSelection()}),l.jsx(hSe,{open:U.isBulkAgentAccessOpen,onOpenChange:U.setIsBulkAgentAccessOpen,selectedRows:U.selectedSettingRows,mutations:u}),l.jsx(mSe,{open:U.isBulkAutoUpdateOpen,onOpenChange:U.setIsBulkAutoUpdateOpen,selectedRows:U.selectedSettingRows,mutations:u}),l.jsx(vSe,{open:U.isBulkWeightOpen,onOpenChange:U.setIsBulkWeightOpen,selectedRows:U.selectedSettingRows,mutations:u})]})}const MIt=nr("/_baseLayout/chats/")({beforeLoad:async()=>X7(),component:DIt});function DIt(){const{i18n:e,_:t}=Me(),n=qjt(),[r,i]=b.useState(!1),{data:s}=Ae.partnerLinks.myContext.useQuery(),a=b.useMemo(()=>r?{organization:{id:{$in:s?.myClientOrganizationIds??[]}}}:void 0,[r,s?.myClientOrganizationIds]),o=CE(Cs.chats.findAllAccessible.query,{populate:["documentsCount","embeddingsCount","organization"],where:a}),c=EE(u=>({to:"/chats/$chatId/edit",params:{chatId:u.original.id}}));return l.jsx(Px,{title:e._({id:"8Q+lLG"}),breadcrumbs:[{label:e._({id:"8Q+lLG"}),to:"/chats"}],createButton:{to:"/chats/create",label:e._({id:"c15Qqv"})},actions:s?.isPartnerCapable?l.jsx(lSe,{value:r,onChange:i}):void 0,columns:n,queryKey:[...ml(Ae.chats.findAllAccessible),{mineOnly:r}],onQueryFn:o,onRow:c})}function LSe(e){return(e.toLowerCase().trim().replaceAll(/[^\da-z]+/g,"_").replaceAll(/^_+|_+$/g,"").replace(/^(\d)/,"field_$1")||"field").slice(0,60)}function XL(e){const t=e?.label??"";return{name:e?.name??(t?LSe(t):"field"),label:t,type:e?.type??"text",required:e?.required??!1,placeholder:e?.placeholder,options:e?.options,validation:e?.validation}}function x2(e){return{name:e?.name??"",description:e?.description??"",formTitle:e?.formTitle??"",formDescription:e?.formDescription??"",submitLabel:e?.submitLabel??"Submit",presentation:e?.presentation??"inline",disableDismiss:e?.disableDismiss??!1,fields:e?.fields??[XL({label:"",type:"text"})],availableToAllChats:e?.availableToAllChats??!1,chatIds:e?.chatIds??[],isActive:e?.isActive??!0}}function FIt(e){return{type:"form",title:e.formTitle||"Form",description:e.formDescription||void 0,fields:e.fields.filter(t=>t.label.trim()),submitLabel:e.submitLabel||"Submit",presentation:e.presentation,disableDismiss:e.disableDismiss}}const LIt=["text","email","phone","number","date","select","textarea"],zSe=[{id:"blank",label:"Blank form",description:"Start with a single empty field.",defaults:x2()},{id:"contact",label:"Contact form",description:"Collect name, email, phone, and a message.",defaults:{name:"collect_contact_details",description:"Use when the user wants to be contacted or needs to leave their contact information.",formTitle:"Contact details",submitLabel:"Send",fields:[{name:"full_name",label:"Full name",type:"text",required:!0},{name:"email",label:"Email",type:"email",required:!0},{name:"phone",label:"Phone",type:"phone",required:!1},{name:"message",label:"Message",type:"textarea",required:!1}]}}];function zIt(e){return zSe.find(t=>
1409t.id===e)}function $Se({onSelect:e}){return l.jsx("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:zSe.map(t=>l.jsxs("button",{type:"button",className:"rounded-radius border border-border p-4 text-left transition hover:border-primary hover:bg-muted/30",onClick:()=>e(t),children:[l.jsx("div",{className:"font-medium",children:t.label}),l.jsx("p",{className:"mt-1 text-sm text-muted-fg",children:t.description})]},t.id))})}function $It({onSelect:e}){return l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"text-sm font-medium",children:l.jsx(D,{id:"wmrpz4"})}),l.jsx("p",{className:"text-sm text-muted-fg",children:l.jsx(D,{id:"zZoDH8"})})]}),l.jsx($Se,{onSelect:e})]})}function BSe(){const e=Ae.useUtils(),t=async()=>{await e.clientSideFormTools.findAll.invalidate()},n=Ae.clientSideFormTools.create.useMutation({onSuccess:t}),r=Ae.clientSideFormTools.update.useMutation({onSuccess:async(s,a)=>{await Promise.all([t(),e.clientSideFormTools.findOne.invalidate({id:a.id})])}}),i=Ae.clientSideFormTools.delete.useMutation({onSuccess:t});return{create:n,update:r,remove:i}}function BIt(){const{i18n:e,_:t}=Me(),{data:n,isLoading:r}=Ae.clientSideFormTools.findAll.useQuery(),{create:i,remove:s}=BSe(),a=async u=>{try{await i.mutateAsync({name:`${u.name}_copy`.slice(0,60),description:u.description,formTitle:u.formTitle,formDescription:u.formDescription,submitLabel:u.submitLabel,fields:u.fields,availableToAllChats:u.availableToAllChats,chatIds:u.chatIds??[],isActive:!1}),Re.success(e._({id:"hyd8Fa"}))}catch(d){Re.error(d instanceof Error?d.message:e._({id:"Cao8RU"}))}},o=async u=>{window.confirm(e._({id:"lULlqC",values:{0:u.name}}))&&(await s.mutateAsync({id:u.id}),Re.success(e._({id:"OF5GMo"})))},c=n??[];return l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-sm font-medium",children:l.jsx(D,{id:"47HorT"})}),l.jsx(Oe,{size:"sm",asChild:!0,children:l.jsxs(ar,{to:"/agent-tools/client-side/new",search:{template:void 0},children:[l.jsx(Bd,{className:"size-4"}),l.jsx(D,{id:"1yc4Pd"})]})})]}),r&&l.jsx("p",{className:"text-sm text-muted-fg",children:l.jsx(D,{id:"Pwqkdw"})}),!r&&c.length===0&&l.jsxs("div",{className:"space-y-6 rounded-radius border border-dashed border-border p-8",children:[l.jsx("div",{className:"text-center text-sm text-muted-fg",children:l.jsx(D,{id:"1GeQQM"})}),l.jsx($Se,{onSelect:async u=>{try{const d=u.defaults,h=await i.mutateAsync({name:d.name??"new_form_tool",description:d.description??"Use when you need to collect structured information from the user.",formTitle:d.formTitle??"Form",formDescription:d.formDescription,submitLabel:d.submitLabel??"Submit",fields:d.fields??[],availableToAllChats:d.availableToAllChats??!1,chatIds:d.chatIds??[],isActive:!1});window.location.href=`/agent-tools/client-side/${h.id}/edit`}catch(d){Re.error(d instanceof Error?d.message:e._({id:"a1ZOXz"}))}}})]}),c.length>0&&l.jsx("div",{className:"overflow-hidden rounded-radius border border-border",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{className:"bg-muted/40 text-left text-muted-fg",children:l.jsxs("tr",{children:[l.jsx("th",{className:"p-3 font-medium",children:l.jsx(D,{id:"6YtxFj"})}),l.jsx("th",{className:"p-3 font-medium",children:l.jsx(D,{id:"t68C3p"})}),l.jsx("th",{className:"p-3 font-medium",children:l.jsx(D,{id:"vF68cg"})}),l.jsx("th",{className:"p-3 font-medium",children:l.jsx(D,{id:"aBgwis"})}),l.jsx("th",{className:"p-3 text-right font-medium",children:l.jsx(D,{id:"7L01XJ"})})]})}),l.jsx("tbody",{children:c.map(u=>l.jsxs("tr",{className:"border-t border-border",children:[l.jsxs("td",{className:"p-3",children:[l.jsx("div",{className:"font-medium",children:u.name}),!u.isActive&&l.jsx(En,{variant:"muted",size:"xs",children:l.jsx(D,{id:"NoNwIX"})})]}),l.jsx("td",{className:"p-3",children:u.formTitle}),l.jsx("td",{className:"p-3",children:l.jsxs(En,{variant:"muted",size:"xs",children:[u.fields.length,"/10"]})}),l.jsx("td",{className:"p-3",children:u.availableToAllChats?l.jsx(D,{id:"7wD/Vn"}):l.jsx(D,{id:"oh35JR",values:{0:u.chatIds?.length??0}})}),l.jsx("td",{className:"p-3",children:l.jsxs("div",{className:"flex justify-end gap-1",children:[l.jsx(Oe,{size:"sm",variant:"ghost",asChild:!0,title:e._({id:"ePK91l"}),children:l.jsx(ar,{to:"/agent-tools/client-side/$formToolId/edit",params:{formToolId:u.id},children:l.jsx(ju,{className:"size-4"})})}),l.jsx(Oe,{size:"sm",variant:"ghost",title:e._({id:"euc6Ns"}),onClick:()=>a(u),children:l.jsx(zh,{className:"size-4"})}),l.jsx(Oe,{size:"sm",variant:"ghost",title:e._({id:"cnGeoo"}),onClick:()=>o(u),children:l.jsx(bo,{className:"size-4 text-danger"})})]})})]},u.id))})]})})]})}function UIt(){const{i18n:e,_:t}=Me(),n={[We.RecordAnswerSources]:{displayName:e._({id:"Vu//jA"}),description:e._({id:"nE+tvd"})},[We.DocumentSearch]:{displayName:e._({id:"08+yKb"}),description:e._({id:"e2mQl8"})},[We.FindDocuments]:{displayName:e._({id:"8Rv8D0"}),description:e._({id:"EF6o48"})},[We.GetDocumentOverview]:{displayName:e._({id:"/AGDSc"}),description:e._({id:"QvDsKR"})},[We.WebSearch]:{displayName:e._({id:"LnnVIT"}),description:e._({id:"SFtWin"})},[We.FetchUrl]:{displayName:e._({id:"t88D8/"}),description:e._({id:"bJnm5q"})},[We.GetOperator]:{displayName:e._({id:"qPvjBQ"}),description:e._({id:"I53sWb"})},[We.GetShopProducts]:{displayName:e._({id:"qKNiFx"}),description:e._({id:"byRmUC"})},[We.GetSimilarProducts]:{displayName:e._({id:"ypPVRc"}),description:e._({id:"SifhmV"})},[We.GetShopProductByProductId]:{displayName:e._({id:"uKOquS"}),description:e._({id:"juvDdQ"})},[We.GetShopProductByExternalId]:{displayName:e._({id:"ORT/Mg"}),description:e._({id:"fWKz6a"})}
1409,[We.GetShopProductByEan]:{displayName:e._({id:"WPw3oL"}),description:e._({id:"jY4KR+"})},[We.GetShopProductByIsbn]:{displayName:e._({id:"q5R00t"}),description:e._({id:"XxW0K5"})},[We.GetShopCategories]:{displayName:e._({id:"BaIgYd"}),description:e._({id:"afG6W3"})},[We.GetShopDeliveryOptions]:{displayName:e._({id:"NHPNqC"}),description:e._({id:"aREsci"})},[We.GetShopProductAvailability]:{displayName:e._({id:"12vRUn"}),description:e._({id:"xrgCfo"})},[We.GetShopProductGifts]:{displayName:e._({id:"g/QO/4"}),description:e._({id:"3Li3uX"})},[We.GetShopProductAccessories]:{displayName:e._({id:"HBUKNR"}),description:e._({id:"1CmIFI"})},[We.CompareShopProducts]:{displayName:e._({id:"oJhqUS"}),description:e._({id:"jr0bh8"})},[We.RecommendShopProducts]:{displayName:e._({id:"yCF0q2"}),description:e._({id:"qVaq1/"})},[We.ShowShopProductDetail]:{displayName:e._({id:"djrS1z"}),description:e._({id:"jNn3zp"})},[We.UpdateWorkingMemory]:{displayName:e._({id:"MGVw3W"}),description:e._({id:"OLGFJf"})},[We.TransferCall]:{displayName:e._({id:"BD6DfP"}),description:e._({id:"DDN6DB"})},[We.EndCall]:{displayName:e._({id:"b41QzP"}),description:e._({id:"lgn6VG"})}};return l.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:lqe.map(r=>{const i=n[r.name];return l.jsxs("div",{className:"bg-card flex flex-col rounded-radius border border-border p-4",children:[l.jsx("h3",{className:"text-sm font-medium",children:i.displayName}),l.jsx("p",{className:"mt-1 flex-1 text-sm text-muted-fg",children:i.description})]},r.name)})})}const VIt=`{ 1410 // static value â always sent as-is 1411 "channel": "support", 1412 // comments tell the model how to fill each value 1413 "subject": "<short summary of the issue>", 1414 "priority": "low | medium | high based on urgency" 1415}`;function HIt({example:e,instructions:t,onExampleChange:n,onInstructionsChange:r}){const{i18n:i,_:s}=Me(),a=b.useCallback((o,c)=>{c.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0,allowComments:!0})},[]);return l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{children:l.jsx(D,{id:"oya3nJ"})}),l.jsx(xh,{value:t,onChange:o=>r(o.target.value),rows:2,placeholder:i._({id:"rVun2k"})})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{children:l.jsx(D,{id:"1/HoLn"})}),l.jsx("div",{className:"overflow-hidden rounded-radius border border-border",children:l.jsx(wye,{height:"220px",defaultLanguage:"json",value:e,onChange:o=>n(o??""),onMount:a,options:{minimap:{enabled:!1},lineNumbers:"off",folding:!1,scrollBeyondLastLine:!1,fontSize:13}})}),l.jsx("p",{className:"text-xs text-muted-fg",children:l.jsx(D,{id:"DIXwMb"})}),!e.trim()&&l.jsx("button",{type:"button",className:"text-xs text-primary underline",onClick:()=>n(VIt),children:l.jsx(D,{id:"E5Zfpx"})})]})]})}function qIt({rows:e,onChange:t,existingKeys:n,removedKeys:r=[],onToggleRemoval:i}){const{i18n:s,_:a}=Me(),o=(d,h)=>t(e.map((p,g)=>g===d?{...p,...h}:p)),c=d=>t(e.filter((h,p)=>p!==d)),u=()=>t([...e,{id:crypto.randomUUID(),key:"",value:""}]);return l.jsxs("div",{className:"space-y-3",children:[n&&n.length>0&&l.jsxs("div",{className:"space-y-2",children:[l.jsx("p",{className:"text-xs text-muted-fg",children:l.jsx(D,{id:"sMi9p6"})}),n.map(d=>l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsx("span",{className:r.includes(d)?"text-muted-fg line-through":"text-sm",children:d}),l.jsx(Oe,{size:"sm",variant:"ghost",onClick:()=>i?.(d),children:r.includes(d)?l.jsx(D,{id:"FVQEjf"}):l.jsx(D,{id:"+21g2G"})})]},d))]}),e.map((d,h)=>l.jsxs("div",{className:"flex items-end gap-2",children:[l.jsxs("div",{className:"flex-1 space-y-1.5",children:[l.jsx(ot,{children:l.jsx(D,{id:"udPwLB"})}),l.jsx(fn,{value:d.key,onChange:p=>o(h,{key:p.target.value}),placeholder:s._({id:"7L8e2S"})})]}),l.jsxs("div",{className:"flex-1 space-y-1.5",children:[l.jsx(ot,{children:l.jsx(D,{id:"wMHvYH"})}),l.jsx(fn,{type:"password",value:d.value,onChange:p=>o(h,{value:p.target.value}),placeholder:s._({id:"kn3Mw3"})})]}),l.jsx(Oe,{size:"sm",variant:"ghost",title:s._({id:"t/YqKh"}),onClick:()=>c(h),children:l.jsx(bo,{className:"size-4 text-danger"})})]},d.id)),l.jsxs(Oe,{size:"sm",variant:"secondary",onClick:u,children:[l.jsx(Bd,{className:"size-4"}),l.jsx(D,{id:"IFU7Nm"})]})]})}const WIt=["string","number","integer","boolean"];function lie({location:e,params:t,onChange:n}){const{i18n:r,_:i}=Me(),s=(c,u)=>n(t.map((d,h)=>h===c?{...d,...u}
1415:d)),a=c=>n(t.filter((u,d)=>d!==c)),o=()=>n([...t,{name:"",location:e,type:"string",valueType:"llm",required:!1}]);return l.jsxs("div",{className:"space-y-3",children:[t.map((c,u)=>l.jsxs("div",{className:"space-y-2 rounded-radius border border-border p-3",children:[l.jsxs("div",{className:"flex items-start gap-2",children:[l.jsxs("div",{className:"flex-1 space-y-1.5",children:[l.jsx(ot,{children:l.jsx(D,{id:"sJGljQ"})}),l.jsx(fn,{value:c.name,onChange:d=>s(u,{name:d.target.value}),placeholder:r._({id:"DBUP4N"})})]}),l.jsxs("div",{className:"w-32 space-y-1.5",children:[l.jsx(ot,{children:l.jsx(D,{id:"r+cVRP"})}),l.jsx(tr,{value:c.type,onValueChange:d=>s(u,{type:d}),children:WIt.map(d=>l.jsx(Yt,{value:d,children:d},d))})]}),l.jsxs("div",{className:"w-32 space-y-1.5",children:[l.jsx(ot,{children:l.jsx(D,{id:"wMHvYH"})}),l.jsxs(tr,{value:c.valueType,onValueChange:d=>s(u,{valueType:d}),children:[l.jsx(Yt,{value:"llm",children:r._({id:"iZju4/"})}),l.jsx(Yt,{value:"static",children:r._({id:"k0YhIn"})})]})]}),l.jsx(Oe,{size:"sm",variant:"ghost",className:"mt-6",title:r._({id:"t/YqKh"}),onClick:()=>a(u),children:l.jsx(bo,{className:"size-4 text-danger"})})]}),c.valueType==="static"?l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{children:l.jsx(D,{id:"ntU8IX"})}),l.jsx(fn,{value:c.value??"",onChange:d=>s(u,{value:d.target.value}),placeholder:r._({id:"7EKi01"})})]}):l.jsxs(l.Fragment,{children:[l.jsxs("label",{className:"flex cursor-pointer items-center gap-2 text-sm",children:[l.jsx("input",{type:"checkbox",checked:c.required??!1,onChange:d=>s(u,{required:d.target.checked})}),l.jsx(D,{id:"TMLAx2"})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{children:l.jsx(D,{id:"Nu4oKW"})}),l.jsx(xh,{value:c.description??"",onChange:d=>s(u,{description:d.target.value}),rows:2,placeholder:r._({id:"BirX1j"})})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{children:l.jsx(D,{id:"+Y4YKF"})}),l.jsx(fn,{value:(c.enumValues??[]).join(", "),onChange:d=>s(u,{enumValues:d.target.value.split(",").map(h=>h.trim()).filter(Boolean)}),placeholder:r._({id:"gY+kZi"})})]})]})]},u)),l.jsxs(Oe,{size:"sm",variant:"secondary",onClick:o,children:[l.jsx(Bd,{className:"size-4"}),l.jsx(D,{id:"Kt8aht"})]})]})}function USe(){const e=Ae.useUtils(),t=async()=>e.httpTools.findAll.invalidate(),n=Ae.httpTools.create.useMutation({onSuccess:t}),r=Ae.httpTools.update.useMutation({onSuccess:t}),i=Ae.httpTools.delete.useMutation({onSuccess:t}),s=Ae.httpTools.testConnection.useMutation();return{create:n,update:r,remove:i,testConnection:s}}const GIt=["GET","POST","PUT","PATCH","DELETE"],cie=new Set(["POST","PUT","PATCH"]);function uie(e){const t=e?.parameters??[];return{name:e?.name??"",description:e?.description??"",url:e?.url??"",method:e?.method??"GET",pathParams:t.filter(n=>n.location==="path"),queryParams:t.filter(n=>n.location==="query"),headerRows:[],removedHeaderKeys:[],bodyExample:e?.bodyExample??"",bodyInstructions:e?.bodyInstructions??"",responseMapping:e?.responseMapping??"",timeoutMs:e?.timeoutMs??1e4,availableToAllChats:e?.availableToAllChats??!1,chatIds:e?.chatIds??[],isActive:e?.isActive??!0}}function KIt(e){const t=e.filter(n=>n.key.trim()&&n.value!=="").map(n=>[n.key.trim(),n.value]);return t.length>0?Object.fromEntries(t):void 0}function YIt({open:e,onOpenChange:t,httpTool:n}){const{i18n:r,_:i}=Me(),{create:s,update:a}=USe(),[o,c]=b.useState(uie(n)),u=!!n;b.useEffect(()=>{e&&c(uie(n))},[e,n]);const{data:d}=Ae.chats.findAll.useQuery({pagination:{pageSize:1e3},fields:["id","name"]}),h=(w,S)=>c(E=>({...E,[w]:S})),p=w=>c(S=>({...S,chatIds:S.chatIds.includes(w)?S.chatIds.filter(E=>E!==w):[...S.chatIds,w]})),g=async()=>{if(!o.name.trim()||!o.url.trim()){Re.error(r._({id:"arOHZq"}));return}if(o.description.trim().length<10){Re.error(r._({id:"uJICp3"}));return}const w=cie.has(o.method),S=KIt(o.headerRows),E={...Object.fromEntries(o.removedHeaderKeys.map(N=>[N,null])),...S},T={name:o.name.trim(),description:o.description.trim(),url:o.url.trim(),method:o.method,parameters:[...o.pathParams,...o.queryParams],bodyExample:w?o.bodyExample.trim():"",bodyInstructions:w?o.bodyInstructions.trim():"",responseMapping:o.responseMapping.trim(),timeoutMs:o.timeoutMs,availableToAllChats:o.availableToAllChats,chatIds:o.availableToAllChats?[]:o.chatIds,isActive:o.isActive,...n?Object.keys(E).length>0?{headerPatch:E}:{}:S?{headers:S}:{}};try{await(n?a.mutateAsync({id:n.id,...T}):s.mutateAsync(T)),Re.success(r._({id:"hq97DL"})),t(!1)}
1415catch(N){Re.error(N instanceof Error?N.message:r._({id:"JBBTPH"}))}},v=d?.items??[],x=s.isPending||a.isPending,_=cie.has(o.method);return l.jsx(ui,{open:e,onOpenChange:t,children:l.jsxs(Fi,{className:"w-[720px] max-w-[95vw]",children:[l.jsx(ks,{children:l.jsx(Wi,{children:u?l.jsx(D,{id:"+dZ2M2"}):l.jsx(D,{id:"J6oMWc"})})}),l.jsxs("div",{className:"max-h-[72vh] space-y-5 overflow-y-auto py-2",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{htmlFor:"http-name",children:l.jsx(D,{id:"6YtxFj"})}),l.jsx(fn,{id:"http-name",value:o.name,onChange:w=>h("name",w.target.value),placeholder:r._({id:"Ify/tF"})}),l.jsx("p",{className:"text-xs text-muted-fg",children:l.jsx(D,{id:"lyck5T"})})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{htmlFor:"http-description",children:l.jsx(D,{id:"Nu4oKW"})}),l.jsx(xh,{id:"http-description",value:o.description,onChange:w=>h("description",w.target.value),rows:2,placeholder:r._({id:"sUrz6l"})})]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsxs("div",{className:"w-36 space-y-1.5",children:[l.jsx(ot,{htmlFor:"http-method",children:l.jsx(D,{id:"fiPesM"})}),l.jsx(tr,{id:"http-method",value:o.method,onValueChange:w=>h("method",w),children:GIt.map(w=>l.jsx(Yt,{value:w,children:w},w))})]}),l.jsxs("div",{className:"flex-1 space-y-1.5",children:[l.jsx(ot,{htmlFor:"http-url",children:l.jsx(D,{id:"IagCbF"})}),l.jsx(fn,{id:"http-url",value:o.url,onChange:w=>h("url",w.target.value),placeholder:"https://api.example.com/tickets/{id}"})]})]}),l.jsxs("section",{className:"space-y-2",children:[l.jsxs("div",{children:[l.jsx("h4",{className:"text-sm font-semibold",children:l.jsx(D,{id:"ZIgY2y"})}),l.jsx("p",{className:"text-xs text-muted-fg",children:l.jsx(D,{id:"o3r2NL"})})]}),l.jsx(qIt,{rows:o.headerRows,onChange:w=>h("headerRows",w),existingKeys:n?.headerKeys,removedKeys:o.removedHeaderKeys,onToggleRemoval:w=>h("removedHeaderKeys",o.removedHeaderKeys.includes(w)?o.removedHeaderKeys.filter(S=>S!==w):[...o.removedHeaderKeys,w])})]}),l.jsxs("section",{className:"space-y-2",children:[l.jsxs("div",{children:[l.jsx("h4",{className:"text-sm font-semibold",children:l.jsx(D,{id:"5QZhQ3"})}),l.jsx("p",{className:"text-xs text-muted-fg",children:l.jsx(D,{id:"XMzOK3"})})]}),l.jsx(lie,{location:"path",params:o.pathParams,onChange:w=>h("pathParams",w)})]}),l.jsxs("section",{className:"space-y-2",children:[l.jsxs("div",{children:[l.jsx("h4",{className:"text-sm font-semibold",children:l.jsx(D,{id:"HvIYrR"})}),l.jsx("p",{className:"text-xs text-muted-fg",children:l.jsx(D,{id:"8LsJLI"})})]}),l.jsx(lie,{location:"query",params:o.queryParams,onChange:w=>h("queryParams",w)})]}),_&&l.jsxs("section",{className:"space-y-2",children:[l.jsx("div",{children:l.jsx("h4",{className:"text-sm font-semibold",children:l.jsx(D,{id:"K5qrFS"})})}),l.jsx(HIt,{example:o.bodyExample,instructions:o.bodyInstructions,onExampleChange:w=>h("bodyExample",w),onInstructionsChange:w=>h("bodyInstructions",w)})]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsxs("div",{className:"flex-1 space-y-1.5",children:[l.jsx(ot,{htmlFor:"http-mapping",children:l.jsx(D,{id:"pj2vt0"})}),l.jsx(fn,{id:"http-mapping",value:o.responseMapping,onChange:w=>h("responseMapping",w.target.value),placeholder:"data.items"})]}),l.jsxs("div",{className:"w-40 space-y-1.5",children:[l.jsx(ot,{htmlFor:"http-timeout",children:l.jsx(D,{id:"pZpIpT"})}),l.jsx(fn,{id:"http-timeout",type:"number",value:o.timeoutMs,onChange:w=>h("timeoutMs",Number(w.target.value)||1e4)})]})]}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx(ot,{htmlFor:"http-all-chats",children:l.jsx(D,{id:"XZ0GCe"})}),l.jsx(Di,{id:"http-all-chats",checked:o.availableToAllChats,onCheckedChange:w=>h("availableToAllChats",w)})]}),!o.availableToAllChats&&l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{children:l.jsx(D,{id:"ugsxzE"})}),l.jsxs("div",{className:"max-h-40 space-y-1 overflow-y-auto rounded-radius border border-border p-2",children:[v.length===0&&l.jsx("p",{className:"text-sm text-muted-fg",children:l.jsx(D,{id:"WRzqx9"})}),v.map(w=>l.jsxs("label",{className:"flex cursor-pointer items-center gap-2 text-sm",children:[l.jsx("input",{type:"checkbox",checked:o.chatIds.includes(w.id),onChange:()=>p(w.id)}),w.name]},w.id))]})]}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx(ot,{htmlFor:"http-active",children:l.jsx(D,{id:"F6pfE9"})}),l.jsx(Di,{id:"http-active",checked:o.isActive,onCheckedChange:w=>h("isActive",w)})]})]}),l.jsxs(wi,{children:[l.jsx(Oe,{variant:"ghost",onClick:()=>t(!1),children:l.jsx(D,{id:"dEgA5A"})}),l.jsx(Oe,{loading:x,onClick:g,children:l.jsx(D,{id:"tfDRzk"})})]})]})})}function XIt(){const{i18n:e,_:t}=Me(),{data:n,isLoading:r}=Ae.httpTools.findAll.useQuery(),{create:i,remove:s,testConnection:a}=USe(),[o,c]=b.useState(!1),[u,d]=b.useState(),h=()=>{d(void 0),c(!0)},p=w=>{d(w),c(!0)},g=async w=>{try{const S=await a.mutateAsync({id:w.id});"httpStatus"in S?S.status==="ok"?Re.success(e._({id:"X3kFwy",values:{0:S.httpStatus}})):Re.warning(e._({id:"gwpjiq",values:{0:S.httpStatus}})):Re.error(S.message)}catch(S){Re.error(S instanceof Error?S.message:e._({id:"12HYjo"}))}},v=async w=>{try{await i.mutateAsync({name:`${w.name}_copy`.slice(0,60),description:w.description,url:w.url,method:w.method,parameters:w.parameters,bodyExample:w.bodyExample,bodyInstructions:w.bodyInstructions,responseMapping:w.responseMapping,timeoutMs:w.timeoutMs,availableToAllChats:w.availableToAllChats,chatIds:w.chatIds??[],isActive:!1}),Re.success(e._({id:"+fothR"}))}catch(S){Re.error(S instanceof Error?S.message:e._({id:"O1fqhO"}))}},x=async w=>{if(window.confirm(e._({id:"QFA/5w",values:{0:w.name}})))try{await s.mutateAsync({id:w.id}),Re.success(e._({id:"pypKx1"}))}catch(S){Re.error(S instanceof Error?S.message:e._({id:"Qp/lSM"}))}},_=n??[];return l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-sm font-medium",children:l.jsx(D,{id:"Rx0BPA"})}),l.jsxs(Oe,{size:"sm",onClick:h,children:[l.jsx(Bd,{className:"size-4"}),l.jsx(D,{id:"NV7iU/"})]})]}),r&&l.jsx("p",{className:"text-sm text-muted-fg",children:l.jsx(D,{id:"Pwqkdw"})}),!r&&_.length===0&&l.jsx("div",{className:"rounded-radius border border-dashed border-border p-8 text-center text-sm text-muted-fg",children:l.jsx(D,{id:"3oSZmO"})}),_.length>0&&l.jsx("div",{className:"overflow-hidden rounded-radius border border-border",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{className:"bg-muted/40 text-left text-muted-fg",children:l.jsxs("tr",{children:[l.jsx("th",{className:"p-3 font-medium",children:l.jsx(D,{id:"6YtxFj"})}),l.jsx("th",{className:"p-3 font-medium",children:l.jsx(D,{id:"fiPesM"})}),l.jsx("th",{className:"p-3 font-medium",children:l.jsx(D,{id:"IagCbF"})}),l.jsx("th",{className:"p-3 font-medium",children:l.jsx(D,{id:"aBgwis"})}),l.jsx("th",{className:"p-3 text-right font-medium",children:l.jsx(D,{id:"7L01XJ"})})]})}),l.jsx("tbody",{children:_.map(w=>l.jsxs("tr",{className:"border-t border-border",children:[l.jsxs("td",{className:"p-3",children:[l.jsx("div",{className:"font-medium",children:w.name}),!w.isActive&&l.jsx(En,{variant:"muted",size:"xs",children:l.jsx(D,{id:"NoNwIX"})})]}),l.jsx("td",{className:"p-3",children:l.jsx(En,{variant:"muted",size:"xs",children:w.method})}),l.jsx("td",{className:"max-w-72 truncate p-3 text-muted-fg",children:w.url}),l.jsx("td",{className:"p-3",children:w.availableToAllChats?l.jsx(D,{id:"7wD/Vn"}):l.jsx(D,{id:"oh35JR",values:{0:w.chatIds?.length??0}})}),l.jsx("td",{className:"p-3",children:l.jsxs("div",{className:"flex justify-end gap-1",children:[l.jsx(Oe,{size:"sm",variant:"ghost",title:e._({id:"NnH3pK"}),loading:a.isPending&&a.variables?.id===w.id,onClick:()=>g(w),children:l.jsx(z9,{className:"size-4"})}),l.jsx(Oe,{size:"sm",variant:"ghost",title:e._({id:"euc6Ns"}),onClick:()=>v(w),children:l.jsx(zh,{className:"size-4"})}),l.jsx(Oe,{size:"sm",variant:"ghost",title:e._({id:"ePK91l"}),onClick:()=>p(w),children:l.jsx(ju,{className:"size-4"})}),l.jsx(Oe,{size:"sm",variant:"ghost",title:e._({id:"cnGeoo"}),onClick:()=>x(w),children:l.jsx(bo,{className:"size-4 text-danger"})})]})})]},w.id))})]})}),l.jsx(YIt,{open:o,onOpenChange:c,httpTool:u})]})}const QIt={notion:{color:"#000000",path:"M4.459 4.208c.746.606 1.026.56 2.428.466l13.215-.793c.28 0 .047-.28-.046-.326L17.86 1.968c-.42-.326-.981-.7-2.055-.607L3.01 2.295c-.466.046-.56.28-.374.466zm.793 3.08v
141513.904c0 .747.373 1.027 1.214.98l14.523-.84c.841-.046.935-.56.935-1.167V6.354c0-.606-.233-.933-.748-.887l-15.177.887c-.56.047-.747.327-.747.933zm14.337.745c.093.42 0 .84-.42.888l-.7.14v10.264c-.608.327-1.168.514-1.635.514-.748 0-.935-.234-1.495-.933l-4.577-7.186v6.952L12.21 19s0 .84-1.168.84l-3.222.186c-.093-.186 0-.653.327-.746l.84-.233V9.854L7.822 9.76c-.094-.42.14-1.026.793-1.073l3.456-.233 4.764 7.279v-6.44l-1.215-.139c-.093-.514.28-.887.747-.933zM1.936 1.035l13.31-.98c1.634-.14 2.055-.047 3.082.7l4.249 2.986c.7.513.934.653.934 1.213v16.378c0 1.026-.373 1.634-1.68 1.726l-15.458.934c-.98.047-1.448-.093-1.962-.747l-3.129-4.06c-.56-.747-.793-1.306-.793-1.96V2.667c0-.839.374-1.54 1.447-1.632z"},linear:{color:"#5E6AD2",path:"M2.886 4.18A11.982 11.982 0 0 1 11.99 0C18.624 0 24 5.376 24 12.009c0 3.64-1.62 6.903-4.18 9.105L2.887 4.18ZM1.817 5.626l16.556 16.556c-.524.33-1.075.62-1.65.866L.951 7.277c.247-.575.537-1.126.866-1.65ZM.322 9.163l14.515 14.515c-.71.172-1.443.282-2.195.322L0 11.358a12 12 0 0 1 .322-2.195Zm-.17 4.862 9.823 9.824a12.02 12.02 0 0 1-9.824-9.824Z"},"google-drive":{color:"#4285F4",path:"M12.01 1.485c-2.082 0-3.754.02-3.743.047.01.02 1.708 3.001 3.774 6.62l3.76 6.574h3.76c2.081 0 3.753-.02 3.742-.047-.005-.02-1.708-3.001-3.775-6.62l-3.76-6.574zm-4.76 1.73a789.828 789.861 0 0 0-3.63 6.319L0 15.868l1.89 3.298 1.885 3.297 3.62-6.335 3.618-6.33-1.88-3.287C8.1 4.704 7.255 3.22 7.25 3.214zm2.259 12.653-.203.348c-.114.198-.96 1.672-1.88 3.287a423.93 423.948 0 0 1-1.698 2.97c-.01.026 3.24.042 7.222.042h7.244l1.796-3.157c.992-1.734 1.85-3.23 1.906-3.323l.104-.167h-7.249z"}};function ZIt({label:e,className:t}){return l.jsx("span",{className:`flex items-center justify-center rounded bg-muted text-[10px] font-semibold text-muted-fg ${t??""}`,"aria-hidden":!0,children:e})}function JIt({connectorId:e,name:t,className:n}){const r=QIt[e];return r?.path?l.jsx("svg",{viewBox:"0 0 24 24",fill:r.color,className:n,"aria-hidden":!0,children:l.jsx("path",{d:r.path})}):l.jsx(ZIt,{label:t.slice(0,1).toUpperCase(),className:n})}const eOt="https://mcpservers.org/";function tOt({onSelect:e}){return l.jsxs("div",{className:"space-y-2",children:[l.jsx("p",{className:"text-sm text-muted-fg",children:l.jsx(D,{id:"pPLGOA"})}),l.jsxs("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:[cqe.map(t=>{const n=t.status==="planned"||t.status==="on_request";return l.jsxs("button",{type:"button",disabled:n,onClick:()=>e(t),className:"bg-card flex flex-col rounded-radius border border-border p-3 text-left transition-colors hover:border-primary disabled:cursor-not-allowed disabled:opacity-60 disabled:hover:border-border",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsxs("span",{className:"flex items-center gap-2 font-medium",children:[l.jsx(JIt,{connectorId:t.id,name:t.name,className:"size-4 shrink-0"}),t.name]}),t.status!=="available"&&l.jsxs(En,{variant:t.status==="beta"?"warning":"muted",size:"xs",children:[t.status==="beta"&&l.jsx(D,{id:"YBt9YP"}),t.status==="planned"&&l.jsx(D,{id:"yHwG3y"}),t.status==="on_request"&&l.jsx(D,{id:"garb8k"})]})]}),l.jsx("span",{className:"mt-1 flex-1 text-xs text-muted-fg",children:t.description}),t.docsUrl&&l.jsxs("a",{href:t.docsUrl,target:"_blank",rel:"noreferrer",onClick:r=>r.stopPropagation(),className:"mt-2 inline-flex items-center gap-1 text-xs text-primary hover:underline",children:[l.jsx(D,{id:"TbjyhA"}),l.jsx($d,{className:"size-3"})]})]},t.id)}),l.jsxs("a",{href:eOt,target:"_blank",rel:"noreferrer",className:"bg-card flex flex-col rounded-radius border border-dashed border-border p-3 text-left transition-colors hover:border-primary",children:[l.jsxs("div",{className:"flex items-center gap-2 font-medium",children:[l.jsx(Y4e,{className:"size-4 shrink-0 text-muted-fg"}),l.jsx(D,{id:"mWlb1Z"})]}),l.jsx("span",{className:"mt-1 flex-1 text-xs text-muted-fg",children:l.jsx(D,{id:"oHhIKZ"})}),l.jsxs("span",{className:"mt-2 inline-flex items-center gap-1 text-xs text-primary hover:underline",children:[l.jsx(D,{id:"6nGRNr"}),l.jsx($d,{className:"size-3"})]})]})]})]})}function HU(){const{i18n:e,_:t}=Me(),n=Ae.useUtils(),r=Ae.mcpIntegrations.startOAuth.useMutation(),i=()=>
1415Promise.all([n.mcpIntegrations.findAll.invalidate(),n.mcpIntegrations.getOAuthStatus.invalidate()]);return{connect:async(a,o)=>{try{const c=await r.mutateAsync({id:a,returnPath:o??`/agent-tools?tab=mcp&edit=${a}`});if(c.status==="authorized"){Re.success(e._({id:"fg9mXr"})),await i();return}const u=window.open(c.authorizationUrl,"mcp-oauth","width=600,height=700,menubar=no,toolbar=no"),d=window.setInterval(()=>{(!u||u.closed)&&(window.clearInterval(d),i())},1e3)}catch(c){Re.error(c instanceof Error?c.message:e._({id:"tfml+v"}))}},isConnecting:r.isPending}}function nOt({integrationId:e,initialStatus:t}){const{i18n:n,_:r}=Me(),i=Ae.useUtils(),{data:s,refetch:a}=Ae.mcpIntegrations.getOAuthStatus.useQuery({id:e}),{connect:o,isConnecting:c}=HU(),u=Ae.mcpIntegrations.disconnectOAuth.useMutation({onSuccess:async()=>{await Promise.all([a(),i.mcpIntegrations.findAll.invalidate()])}}),d=s?.connectionStatus??t,h=d===s1.Connected,p=()=>Promise.all([a(),i.mcpIntegrations.findAll.invalidate()]);return b.useEffect(()=>{const g=v=>{v.origin!==window.location.origin||v.data?.type!=="mcp-oauth"||(v.data.oauth==="success"?Re.success(n._({id:"fg9mXr"})):Re.error(v.data.message||n._({id:"tfml+v"})),p())};return window.addEventListener("message",g),()=>window.removeEventListener("message",g)},[]),l.jsxs("div",{className:"space-y-2 rounded-radius border border-border p-3",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-sm font-medium",children:l.jsx(D,{id:"hFiVCL"})}),l.jsx(En,{variant:h?"success":"muted",size:"xs",children:d})]}),h?l.jsx(Oe,{size:"sm",variant:"ghost",loading:u.isPending,onClick:()=>u.mutate({id:e}),children:l.jsx(D,{id:"+K0AvT"})}):l.jsx(Oe,{size:"sm",loading:c,onClick:()=>o(e),children:l.jsx(D,{id:"iSLIjg"})})]}),s?.oauthScopes&&s.oauthScopes.length>0&&l.jsxs("p",{className:"text-xs text-muted-fg",children:[l.jsx(D,{id:"N/rFzD"}),": ",s.oauthScopes.join(", ")]}),s?.lastAuthError&&l.jsx("p",{className:"text-xs text-danger",children:s.lastAuthError}),!h&&l.jsx("p",{className:"text-xs text-muted-fg",children:l.jsx(D,{id:"iwwvSE"})})]})}function VSe(){const e=Ae.useUtils(),t=async()=>e.mcpIntegrations.findAll.invalidate(),n=Ae.mcpIntegrations.create.useMutation({onSuccess:t}),r=Ae.mcpIntegrations.update.useMutation({onSuccess:t}),i=Ae.mcpIntegrations.delete.useMutation({onSuccess:t}),s=Ae.mcpIntegrations.testConnection.useMutation(),a=Ae.mcpIntegrations.syncTools.useMutation({onSuccess:t});return{create:n,update:r,remove:i,testConnection:s,syncTools:a}}function die(e,t){return{name:e?.name??t?.name??"",description:e?.description??"",serverUrl:e?.serverUrl??t?.serverUrl??"",authMode:e?.authMode??t?.authMode??lu.StaticBearer,apiKey:"",availableToAllChats:e?.availableToAllChats??!1,chatIds:e?.chatIds??[],isActive:e?.isActive??!0,connectorId:e?.connectorId??t?.connectorId,enabledTools:e?.enabledTools??void 0}}function rOt({open:e,onOpenChange:t,integration:n,prefill:r}){const{i18n:i,_:s}=Me(),{create:a,update:o}=VSe(),{connect:c}=HU(),[u,d]=b.useState(die(n,r)),h=!!n;b.useEffect(()=>{e&&d(die(n,r))},[e,n,r]);const{data:p}=Ae.chats.findAll.useQuery({pagination:{pageSize:1e3},fields:["id","name"]}),g=(N,A)=>d(k=>({...k,[N]:A})),v=N=>d(A=>({...A,chatIds:A.chatIds.includes(N)?A.chatIds.filter(k=>k!==N):[...A.chatIds,N]})),x=n?.discoveredTools??[],_=N=>!u.enabledTools||u.enabledTools.includes(N),w=N=>d(A=>{const k=A.enabledTools??x.map(R=>R.name),j=k.includes(N)?k.filter(R=>R!==N):[...k,N];return{...A,enabledTools:j}}),S=async()=>{if(!u.name.trim()||!u.serverUrl.trim()){Re.error(i._({id:"rUTmK1"}));return}const N={name:u.name.trim(),description:u.description.trim()||void 0,serverUrl:u.serverUrl.trim(),authMode:u.authMode,availableToAllChats:u.availableToAllChats,chatIds:u.availableToAllChats?[]:u.chatIds,isActive:u.isActive,...u.connectorId?{connectorId:u.connectorId}:{},...u.enabledTools?{enabledTools:u.enabledTools}:{},...u.authMode===lu.StaticBearer&&u.apiKey?{apiKey:u.apiKey}:{}};try{const A=await(n?o.mutateAsync({id:n.id,...N}):a.mutateAsync(N));Re.success(i._({id:"0QItdZ"})),t(!1),!n&&u.authMode===lu.McpOAuth&&c(A.id,`/agent-tools?tab=mcp&edit=${A.id}`)}catch(A){Re.error(A instanceof Error?A.message:i._({id:"xQXVpP"}))}},E=p?.items??[],T=a.isPending||o.isPending;return l.jsx(ui,{open:e,onOpenChange:t,children:l.jsxs(Fi,{className:"w-[640px] max-w-[95vw]",children:[l.jsx(ks,{children:l.jsx(Wi,{children:h?l.jsx(D,{id:"PyGAvg"}):l.jsx(D,{id:"lts8I7"})})}),l.jsxs("div",{className:"max-h-[70vh] space-y-4 overflow-y-auto py-2",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{htmlFor:"mcp-name",children:l.jsx(D,{id:"6YtxFj"})}),l.jsx(fn,{id:"mcp-name",value:u.name,onChange:N=>g("name",N.target.value),placeholder:i._({id:"7UnlTE"})})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{htmlFor:"mcp-description",children:l.jsx(D,{id:"Nu4oKW"})}),l.jsx(xh,{id:"mcp-description",value:u.description,onChange:N=>g("description",N.target.value),rows:2})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{htmlFor:"mcp-url",children:l.jsx(D,{id:"9rG25a"})}),l.jsx(fn,{id:"mcp-url",value:u.serverUrl,onChange:N=>g("serverUrl",N.target.value),placeholder:"https://mcp.example.com"})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{htmlFor:"mcp-auth",children:l.jsx(D,{id:"P8fBlG"})}),l.jsxs(tr,{id:"mcp-auth",value:u.authMode,onValueChange:N=>g("authMode",N),children:[l.jsx(Yt,{value:lu.None,children:i._({id:"TL52aU"})}),l.jsx(Yt,{value:lu.StaticBearer,children:i._({id:"x3U7mA"})}),l.jsx(Yt,{value:lu.McpOAuth,children:i._({id:"xY7yeK"})})]})]}),u.authMode===lu.StaticBearer&&l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{htmlFor:"mcp-key",children:l.jsx(D,{id:"iq3W+B"})}),l.jsx(fn,{id:"mcp-key",type:"password",value:u.apiKey,onChange:N=>g("apiKey",N.target.value),placeholder:n?.hasApiKey?i._({id:"8tgBo7"}):i._({id:"vYWQ4A"})})]}),u.authMode===lu.McpOAuth&&(n?l.jsx(nOt,{integrationId:n.id,initialStatus:n.connectionStatus}):l.jsx("p",{className:"rounded-radius bg-muted/40 p-3 text-sm text-muted-fg",children:l.jsx(D,{id:"mGL2Ji"})})),x.length>0&&l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{children:l.jsx(D,{id:"aUMiD6"})}),l.jsx("div",{className:"max-h-44 space-y-1 overflow-y-auto rounded-radius border border-border p-2",children:x.map(N=>l.jsxs("label",{className:"flex cursor-pointer items-start gap-2 text-sm",title:N.description??void 0,children:[l.jsx("input",{type:"checkbox",className:"mt-1",checked:_(N.name),onChange:()=>w(N.name)}),l.jsx("span",{className:"font-mono text-xs",children:N.name})]},N.name))})]}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx(ot,{htmlFor:"mcp-all-chats",children:l.jsx(D,{id:"XZ0GCe"})}),l.jsx(Di,{id:"mcp-all-chats",checked:u.availableToAllChats,onCheckedChange:N=>g("availableToAllChats",N)})]}),!u.availableToAllChats&&l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{children:l.jsx(D,{id:"ugsxzE"})}),l.jsxs("div",{className:"max-h-40 space-y-1 overflow-y-auto rounded-radius border border-border p-2",children:[E.length===0&&l.jsx("p",{className:"text-sm text-muted-fg",children:l.jsx(D,{id:"WRzqx9"})}),E.map(N=>l.jsxs("label",{className:"flex cursor-pointer items-center gap-2 text-sm",children:[l.jsx("input",{type:"checkbox",checked:u.chatIds.includes(N.id),onChange:()=>v(N.id)}),N.name]},N.id))]})]}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx(ot,{htmlFor:"mcp-active",children:l.jsx(D,{id:"F6pfE9"})}),l.jsx(Di,{id:"mcp-active",checked:u.isActive,onCheckedChange:N=>g("isActive",N)})]})]}),l.jsxs(wi,{children:[l.jsx(Oe,{variant:"ghost",onClick:()=>t(!1),children:l.jsx(D,{id:"dEgA5A"})}),l.jsx(Oe,{loading:T,onClick:S,children:l.jsx(D,{id:"tfDRzk"})})]})]})})}const iOt={[s1.Connected]:"success",[s1.NotConnected]:"muted",[s1.Expired]:"warning",[s1.Error]:"danger"};function sOt(){const{i18n:e,_:t}=Me(),{data:n,isLoading:r}=Ae.mcpIntegrations.findAll.useQuery(),{remove:i,testConnection:s,syncTools:a}=VSe(),{connect:o}=HU(),[c,u]=b.useState(!1),[d,h]=b.useState(),[p,g]=b.useState(),v=()=>{h(void 0),g(void 0),u(!0)},x=N=>{h(N),g(void 0),u(!0)},_=N=>{h(void 0),g({name:N.name,serverUrl:N.serverUrl,authMode:lu.McpOAuth,connectorId:N.id}),u(!0)},w=async N=>{try{const A=await s.mutateAsync({id:N.id});A.status==="connected"?Re.success(e._({id:"4YjmAJ",values:{0:A.tools.length}})):A.status==="auth_required"?(Re.info(e._({id:"NbKVOy"}
1415)),await o(N.id)):Re.error(A.message)}catch(A){Re.error(A instanceof Error?A.message:e._({id:"12HYjo"}))}},S=async N=>{try{const A=await a.mutateAsync({id:N.id});A.status==="synced"?Re.success(e._({id:"gCK2ve",values:{0:A.toolCount}})):A.status==="auth_required"?(Re.info(e._({id:"NbKVOy"})),await o(N.id)):Re.error(A.message)}catch(A){Re.error(A instanceof Error?A.message:e._({id:"UEugrw"}))}},E=async N=>{window.confirm(e._({id:"lsmRSg",values:{0:N.name}}))&&(await i.mutateAsync({id:N.id}),Re.success(e._({id:"94JcYf"})))},T=n??[];return l.jsxs("div",{className:"space-y-4",children:[l.jsx(tOt,{onSelect:_}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-sm font-medium",children:l.jsx(D,{id:"YrGEeX"})}),l.jsxs(Oe,{size:"sm",onClick:v,children:[l.jsx(Bd,{className:"size-4"}),l.jsx(D,{id:"GxKz2K"})]})]}),r&&l.jsx("p",{className:"text-sm text-muted-fg",children:l.jsx(D,{id:"Pwqkdw"})}),!r&&T.length===0&&l.jsx("div",{className:"rounded-radius border border-dashed border-border p-8 text-center text-sm text-muted-fg",children:l.jsx(D,{id:"r2d1cW"})}),T.length>0&&l.jsx("div",{className:"overflow-hidden rounded-radius border border-border",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{className:"bg-muted/40 text-left text-muted-fg",children:l.jsxs("tr",{children:[l.jsx("th",{className:"p-3 font-medium",children:l.jsx(D,{id:"6YtxFj"})}),l.jsx("th",{className:"p-3 font-medium",children:l.jsx(D,{id:"sGH11W"})}),l.jsx("th",{className:"p-3 font-medium",children:l.jsx(D,{id:"uAQUqI"})}),l.jsx("th",{className:"p-3 font-medium",children:l.jsx(D,{id:"xdA/+p"})}),l.jsx("th",{className:"p-3 font-medium",children:l.jsx(D,{id:"aBgwis"})}),l.jsx("th",{className:"p-3 text-right font-medium",children:l.jsx(D,{id:"7L01XJ"})})]})}),l.jsx("tbody",{children:T.map(N=>l.jsxs("tr",{className:"border-t border-border",children:[l.jsxs("td",{className:"p-3",children:[l.jsx("div",{className:"font-medium",children:N.name}),!N.isActive&&l.jsx(En,{variant:"muted",size:"xs",children:l.jsx(D,{id:"NoNwIX"})})]}),l.jsx("td",{className:"max-w-56 truncate p-3 text-muted-fg",children:N.serverUrl}),l.jsx("td",{className:"p-3",children:l.jsx(En,{variant:iOt[N.connectionStatus],size:"xs",children:N.connectionStatus})}),l.jsx("td",{className:"p-3",children:N.toolCount??"â"}),l.jsx("td",{className:"p-3",children:N.availableToAllChats?l.jsx(D,{id:"7wD/Vn"}):l.jsx(D,{id:"oh35JR",values:{0:N.chatIds?.length??0}})}),l.jsx("td",{className:"p-3",children:l.jsxs("div",{className:"flex justify-end gap-1",children:[l.jsx(Oe,{size:"sm",variant:"ghost",title:e._({id:"e2zZ3E"}),loading:s.isPending&&s.variables?.id===N.id,onClick:()=>w(N),children:l.jsx(uoe,{className:"size-4"})}),l.jsx(Oe,{size:"sm",variant:"ghost",title:e._({id:"cxRmVd"}),loading:a.isPending&&a.variables?.id===N.id,onClick:()=>S(N),children:l.jsx(Lo,{className:"size-4"})}),l.jsx(Oe,{size:"sm",variant:"ghost",title:e._({id:"ePK91l"}),onClick:()=>x(N),children:l.jsx(ju,{className:"size-4"})}),l.jsx(Oe,{size:"sm",variant:"ghost",title:e._({id:"cnGeoo"}),onClick:()=>E(N),children:l.jsx(bo,{className:"size-4 text-danger"})})]})})]},N.id))})]})}),l.jsx(rOt,{open:c,onOpenChange:u,integration:d,prefill:p})]})}function HSe(){const e=Ae.useUtils(),t=async()=>e.skills.findAll.invalidate(),n=Ae.skills.create.useMutation({onSuccess:t}),r=Ae.skills.update.useMutation({onSuccess:t}),i=Ae.skills.delete.useMutation({onSuccess:t});return{create:n,update:r,remove:i}}function fie(e){return{name:e?.name??"",description:e?.description??"",content:e?.content??"",availableToAllChats:e?.availableToAllChats??!1,chatIds:e?.chatIds??[],isActive:e?.isActive??!0}}function aOt({open:e,onOpenChange:t,skill:n}){const{i18n:r,_:i}=Me(),{create:s,update:a}=HSe(),[o,c]=b.useState(fie(n)),u=!!n;b.useEffect(()=>{e&&c(fie(n))},[e,n]);const{data:d}=Ae.chats.findAll.useQuery({pagination:{pageSize:1e3},fields:["id","name"]}),h=(_,w)=>c(S=>({...S,[_]:w})),p=_=>c(w=>({...w,chatIds:w.chatIds.includes(_)?w.chatIds.filter(S=>S!==_):[...w.chatIds,_]})),g=async()=>{if(!o.name.trim()||!o.content.trim()){Re.error(r._({id:"hG3oLV"}));return}if(o.description.trim().length<10){Re.error(r._({id:"uJICp3"}));return}const _={name:o.name.trim(),description:o.description.trim(),content:o.content.trim(),availableToAllChats:o.availableToAllChats,chatIds:o.availableToAllChats?[]:o.chatIds,isActive:o.isActive};try{await(n?a.mutateAsync({id:n.id,..._}):s.mutateAsync(_)),Re.success(r._({id:"tW7nIs"})),t(!1)}
1415catch(w){Re.error(w instanceof Error?w.message:r._({id:"lnx4jT"}))}},v=d?.items??[],x=s.isPending||a.isPending;return l.jsx(ui,{open:e,onOpenChange:t,children:l.jsxs(Fi,{className:"w-[680px] max-w-[95vw]",children:[l.jsx(ks,{children:l.jsx(Wi,{children:u?l.jsx(D,{id:"X0eIts"}):l.jsx(D,{id:"nSFqtm"})})}),l.jsxs("div",{className:"max-h-[72vh] space-y-5 overflow-y-auto py-2",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{htmlFor:"skill-name",children:l.jsx(D,{id:"6YtxFj"})}),l.jsx(fn,{id:"skill-name",value:o.name,onChange:_=>h("name",_.target.value),placeholder:r._({id:"mJYyxi"})}),l.jsx("p",{className:"text-xs text-muted-fg",children:l.jsx(D,{id:"lyck5T"})})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{htmlFor:"skill-description",children:l.jsx(D,{id:"Nu4oKW"})}),l.jsx(xh,{id:"skill-description",value:o.description,onChange:_=>h("description",_.target.value),rows:2,placeholder:r._({id:"xPk3hD"})})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{htmlFor:"skill-content",children:l.jsx(D,{id:"NxHkkp"})}),l.jsx(xh,{id:"skill-content",value:o.content,onChange:_=>h("content",_.target.value),rows:12,placeholder:r._({id:"KzTIWe"})})]}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx(ot,{htmlFor:"skill-active",children:l.jsx(D,{id:"F6pfE9"})}),l.jsx(Di,{id:"skill-active",checked:o.isActive,onCheckedChange:_=>h("isActive",_)})]}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx(ot,{htmlFor:"skill-all-chats",children:l.jsx(D,{id:"XZ0GCe"})}),l.jsx(Di,{id:"skill-all-chats",checked:o.availableToAllChats,onCheckedChange:_=>h("availableToAllChats",_)})]}),!o.availableToAllChats&&l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{children:l.jsx(D,{id:"ugsxzE"})}),l.jsxs("div",{className:"max-h-44 space-y-1 overflow-y-auto rounded-radius border border-border p-2",children:[v.map(_=>l.jsxs("label",{className:"flex cursor-pointer items-center gap-2 text-sm",children:[l.jsx("input",{type:"checkbox",checked:o.chatIds.includes(_.id),onChange:()=>p(_.id)}),_.name]},_.id)),v.length===0&&l.jsx("p",{className:"text-xs text-muted-fg",children:l.jsx(D,{id:"LTsmhs"})})]})]})]}),l.jsxs(wi,{children:[l.jsx(Oe,{variant:"ghost",onClick:()=>t(!1),children:l.jsx(D,{id:"dEgA5A"})}),l.jsx(Oe,{onClick:g,loading:x,children:l.jsx(D,{id:"tfDRzk"})})]})]})})}function oOt(){const{i18n:e,_:t}=Me(),{data:n,isLoading:r}=Ae.skills.findAll.useQuery(),{remove:i}=HSe(),[s,a]=b.useState(!1),[o,c]=b.useState(),u=()=>{c(void 0),a(!0)},d=g=>{c(g),a(!0)},h=async g=>{window.confirm(e._({id:"FNLaC0",values:{0:g.name}}))&&(await i.mutateAsync({id:g.id}),Re.success(e._({id:"Qx8jKC"})))},p=n??[];return l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-sm font-medium",children:l.jsx(D,{id:"vD68LO"})}),l.jsxs(Oe,{size:"sm",onClick:u,children:[l.jsx(Bd,{className:"size-4"}),l.jsx(D,{id:"GBQjiV"})]})]}),r&&l.jsx("p",{className:"text-sm text-muted-fg",children:l.jsx(D,{id:"Pwqkdw"})}),!r&&p.length===0&&l.jsx("div",{className:"rounded-radius border border-dashed border-border p-8 text-center text-sm text-muted-fg",children:l.jsx(D,{id:"0CXlCC"})}),p.length>0&&l.jsx("div",{className:"overflow-hidden rounded-radius border border-border",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{className:"bg-muted/40 text-left text-muted-fg",children:l.jsxs("tr",{children:[l.jsx("th",{className:"p-3 font-medium",children:l.jsx(D,{id:"6YtxFj"})}),l.jsx("th",{className:"p-3 font-medium",children:l.jsx(D,{id:"Nu4oKW"})}),l.jsx("th",{className:"p-3 font-medium",children:l.jsx(D,{id:"aBgwis"})}),l.jsx("th",{className:"p-3 text-right font-medium",children:l.jsx(D,{id:"7L01XJ"})})]})}),l.jsx("tbody",{children:p.map(g=>l.jsxs("tr",{className:"border-t border-border",children:[l.jsxs("td",{className:"p-3",children:[l.jsx("div",{className:"font-medium",children:g.name}),!g.isActive&&l.jsx(En,{variant:"muted",size:"xs",children:l.jsx(D,{id:"NoNwIX"})})]}),l.jsx("td",{className:"max-w-96 truncate p-3 text-muted-fg",children:g.description}),l.jsx("td",{className:"p-3",children:g.availableToAllChats?l.jsx(D,{id:"7wD/Vn"}):l.jsx(D,{id:"oh35JR",values:{0:g.chatIds?.length??0}})}),l.jsx("td",{className:"p-3",children:l.jsxs("div",{className:"flex justify-end gap-1",children:[l.jsx(Oe,{size:"sm",variant:"ghost",title:e._({id:"ePK91l"}),onClick:()=>d(g),children:l.jsx(ju,{className:"size-4"})}),l.jsx(Oe,{size:"sm",variant:"ghost",title:e._({id:"cnGeoo"}),onClick:()=>h(g),children:l.jsx(bo,{className:"size-4 text-danger"})})]})})]},g.id))})]})}),l.jsx(aOt,{open:s,onOpenChange:a,skill:o})]})}const Y_="flex items-center gap-2 px-4 py-2 text-sm font-medium text-muted-fg data-[state=active]:border-b-2 data-[state=active]:border-primary data-[state=active]:text-fg";function lOt({tab:e,onTabChange:t}){const{i18n:n,_:r}=Me();return l.jsx(TE,{title:n._({id:"R19Dod"}),breadcrumbs:[{label:n._({id:"R19Dod"}),to:"/agent-tools"}],children:l.jsxs(Sx,{value:e,onValueChange:i=>t(i),className:"flex min-h-0 flex-col",children:[l.jsxs(Ex,{className:"mb-4 flex gap-2 border-b border-border",children:[l.jsxs(Ji,{value:"builtin",className:Y_,children:[l.jsx(Jae,{className:"size-4"}),l.jsx(D,{id:"+7fBMP"})]}),l.jsxs(Ji,{value:"mcp",className:Y_,children:[l.jsx(uoe,{className:"size-4"}),l.jsx(D,{id:"ch5rDN"})]}),l.jsxs(Ji,{value:"http",className:Y_,children:[l.jsx(Vu,{className:"size-4"}),l.jsx(D,{id:"hQJr/K"})]}),l.jsxs(Ji,{value:"client-side",className:Y_,children:[l.jsx(wIe,{className:"size-4"}),l.jsx(D,{id:"47HorT"})]}),l.jsxs(Ji,{value:"skills",className:Y_,children:[l.jsx(jRe,{className:"size-4"}),l.jsx(D,{id:"PCSkw2"})]})]}),l.jsx(es,{value:"builtin",children:l.jsx(UIt,{})}),l.jsx(es,{value:"mcp",children:l.jsx(sOt,{})}),l.jsx(es,{value:"http",children:l.jsx(XIt,{})}),l.jsx(es,{value:"client-side",children:l.jsx(BIt,{})}),l.jsx(es,{value:"skills",children:l.jsx(oOt,{})})]})})}const cOt=["builtin","mcp","http","client-side","skills"],uOt="builtin";function dOt(e){return cOt.includes(e)}const QL=nr("/_baseLayout/agent-tools/")({component:fOt,validateSearch:e=>({tab:dOt(e?.tab)?e.tab:uOt,chatId:e?.chatId})});function fOt(){const{tab:e,chatId:t}=QL.useSearch(),n=QL.useNavigate();return b.useEffect(()=>
1415{const r=new URLSearchParams(window.location.search),i=r.get("oauth");i&&window.opener&&(window.opener.postMessage({type:"mcp-oauth",oauth:i,message:r.get("message")??void 0},window.location.origin),window.close())},[]),l.jsx(lOt,{tab:e,onTabChange:r=>n({to:"/agent-tools",search:{tab:r,chatId:t}})})}class Tw extends Error{}Tw.prototype.name="InvalidTokenError";function hOt(e){return decodeURIComponent(atob(e).replace(/(.)/g,(t,n)=>{let r=n.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}function pOt(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return hOt(t)}catch{return atob(t)}}function qSe(e,t){if(typeof e!="string")throw new Tw("Invalid token specified: must be a string");t||(t={});const n=t.header===!0?0:1,r=e.split(".")[n];if(typeof r!="string")throw new Tw(`Invalid token specified: missing part #${n+1}`);let i;try{i=pOt(r)}catch(s){throw new Tw(`Invalid token specified: invalid base64 for part #${n+1} (${s.message})`)}try{return JSON.parse(i)}catch(s){throw new Tw(`Invalid token specified: invalid json for part #${n+1} (${s.message})`)}}const WSe="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",fj=6;var eh=(function(e){return e.LENGTH="length",e.MATCH="match",e.NUMBER="number",e.SPECIAL="special",e.UPPERCASE="uppercase",e})({});const hie=/\d/,pie=/[A-Z]/,mie=new RegExp(`[${Uxe(WSe)}]`);function GSe(e,t){if(!e||!t)return;const n=[];return(e.length<fj||t.length<fj)&&n.push("length"),e!==t&&n.push("match"),(!hie.test(e)||!hie.test(t))&&n.push("number"),(!pie.test(e)||!pie.test(t))&&n.push("uppercase"),(!mie.test(e)||!mie.test(t))&&n.push("special"),n}const rk=b.memo(function({className:e,validationErrors:t,targetValidationError:n}){const r=$e("size-4 shrink-0",e);return t?t.includes(n)?l.jsx(E0,{className:$e(r,"text-danger")}):l.jsx(jj,{className:$e(r,"text-success")}):l.jsx(P4e,{className:$e(r,"text-foreground")})}),mOt=b.memo(function({className:e}){const{i18n:t,_:n}=Me(),{value:r}=fs("password"),{value:i}=fs("confirmPassword"),s=GSe(r,i),a="inline-flex items-center gap-1 text-xs leading-tight text-muted-fg";return l.jsxs("div",{className:$e("flex flex-col gap-1.5 border-t border-border pt-3",e),children:[l.jsx("p",{className:"text-xs font-medium text-muted-fg",children:t._({id:"pd1M8W"})}),l.jsxs("div",{className:"grid grid-cols-1 gap-1 sm:grid-cols-2",children:[l.jsxs(ot,{className:a,children:[l.jsx(rk,{className:"size-3",validationErrors:s,targetValidationError:eh.LENGTH}),t._({id:"oH+A6x",values:{MIN_LENGTH:fj}})]}),l.jsxs(ot,{className:a,children:[l.jsx(rk,{className:"size-3",validationErrors:s,targetValidationError:eh.UPPERCASE}),t._({id:"N/+EbA"})]}),l.jsxs(ot,{className:a,children:[l.jsx(rk,{className:"size-3",validationErrors:s,targetValidationError:eh.NUMBER}),t._({id:"P+Cd4s"})]}),l.jsxs(ot,{className:a,children:[l.jsx(rk,{className:"size-3",validationErrors:s,targetValidationError:eh.SPECIAL}),t._({id:"GGawAi",values:{0:WSe.split("").slice(0,4).join(",")}})]})]})]})});function qU({hasOldPassword:e=!0,title:t}){const{i18n:n,_:r}=Me(),{values:i}=T7e(),s=b.useCallback((o,c)=>{const u=GSe(c.password,c.confirmPassword);if(u?.includes(eh.LENGTH))return n._({id:"oH+A6x",values:{MIN_LENGTH:fj}});if(u?.includes(eh.MATCH))return n._({id:"lpIMne"});if(u?.includes(eh.NUMBER))return n._({id:"P+Cd4s"});if(u?.includes(eh.SPECIAL))return n._({id:"X1Pedn"});if(u?.includes(eh.UPPERCASE))return n._({id:"N/+EbA"})},[r]),a=!!(e&&i.oldPassword||i.password||i.confirmPassword);return l.jsxs(gn,{title:t??n._({id:"hV+Dg7"}),children:[e&&l.jsx(zo,{type:"password",required:a,name:"oldPassword",label:n._({id:"8ZsakT"}),showOptional:!1,passwordPreview:!0,showErrorIfError:!0}),l.jsx(zo,{type:"password",required:a,name:"password",label:n._({id:"/nT6AE"}),validate:s,validateOn:"change",showOptional:!1,passwordPreview:!0,showErrorIfError:!0,validateWhen:["confirmPassword"]}),l.jsx(zo,{type:"password",required:a,name:"confirmPassword",label:n._({id:"xnWESi"}),validate:s,validateOn:"change",showOptional:!1,passwordPreview:!0,showErrorIfError:!0,validateWhen:["password"]}),l.jsx(mOt,{})]})}const KSe=nr("/_authLayout/verify/")({component:gOt,validateSearch:e=>({token:e.token||""})});function gOt(){const{i18n:e,_:t}=Me(),n=gs(),r=Ae.auth.verify.useMutation(),{token:i}=KSe.useSearch();let s=0;const a={email:"",password:"",confirmPassword:"",consentWithToC:!1};try{const c=qSe(i);a.email=c.email,s=c.exp}catch(c){console.error(c)}if(!i||!a.email||s<Date.now()/1e3)return l.jsxs("div",{className:"flex flex-col items-center gap-6",children:[l.jsx("h1",{className:"text-center text-2xl font-bold",children:l.jsx(D,{id:"yHrk88"})}),l.jsx("div",{className:"text-center text-sm",children:l.jsx(D,{id:"0rCCyp"})})]});const o=c=>{r.mutate({token:i,email:c.values.email,password:c.values.password},{onError:u=>{console.error(u),Re.error(e._({id:"JT2kuK"}),{description:e._({id:"f4liFv"})})},onSuccess:u=>{Re.success(e._({id:"q8nrKL"}),{description:e._({id:"LwxCUf"})}),n({to:"/login"})}})};return l.jsxs(Mx,{onSubmit:o,className:"flex w-full flex-col gap-6",zodSchema:_e({email:B().email(),password:B().min(6),confirmPassword:B().min(6),consentWithToC:mt().refine(c=>c===!0,{message:e._({id:"X/xrcm"})})}),initialValues:a,children:[l.jsx("h1",{className:"text-center text-2xl font-bold",children:l.jsx(D,{id:"yHrk88"})}),l.jsx(zo,{name:"email",type:"email","data-cta":"admin-verify-email-input",disabled:!0,required:!0}),l.jsx(qU,{title:e._({id:"1ZI98r"}),hasOldPassword:!1}),l.jsx("div",{className:"flex items-center justify-start",children:l.jsx("div",{className:"mr-2 w-full",children:l.jsx(Bde,{size:"sm",name:"consentWithToC",description:l.jsxs(l.Fragment,{children:[l.jsx(D,{id:"mUegGd"}),l.jsx("a",{href:e._({id:"MZDZ1B"}),target:"_blank",rel:"noreferrer",className:"ml-1 underline",children:l.jsx(D,{id:"mvP/25"})})]}),required:!0})})}),l.jsx(Oe,{"data-cta":"admin-verify-submit-button",variant:"primary",type:"submit",children:l.jsx(D,{id:"fgLNSM"})})]})}const YSe=nr("/_authLayout/reset-password/")({component:xOt,validateSearch:e=>({token:e.token||""})});function xOt(){const{i18n:e,_:t}=Me(),n=gs(),{token:r}=YSe.useSearch(),i=Ae.auth.changePassword.useMutation(),s={email:"",password:"",confirmPassword:""};let a=0;try{const c=qSe(r);s.email=c.email,a=c.exp}catch(c){console.error(c)}const o=c=>{i.mutate({token:r,email:c.values.email,password:c.values.password},{onError:u=>{console.error(u),Re.error(e._({id:"aCiJY1"}),{description:e._({id:"J47swM"})})},onSuccess:()=>{Re.success(e._({id:"aCiJY1"}),{description:e._({id:"k9i5sh"})}),n({to:"/login"})}})};return!r||!s.email||a<Date.now()/1e3?l.jsxs("div",{className:"flex flex-col items-center gap-6",children:[l.jsx("h1",{className:"text-center text-2xl font-bold",children:l.jsx(D,{id:"GptGxg"})}),l.jsx("div",{className:"text-center text-sm",children:l.jsx(D,{id:"12bV+W"})}),l.jsx("div",{className:"flex justify-center",children:l.jsx(Oe,{"data-cta":"admin-reset-password-back-to-login-button",variant:"ghost",outline:!0,type:"submit",asChild:!0,children:l.jsx(ar,{to:"/login",className:"text-sm",children:l.jsx(D,{id:"VCoEm+"})})})})]}):l.jsxs(Mx,{initialValues:s,onSubmit:o,className:"flex w-full flex-col gap-6",children:[l.jsx("h1",{className:"text-center text-2xl font-bold",children:l.jsx(D,{id:"GptGxg"})}),l.jsx(zo,{name:"email",type:"email",label:e._({id:"O3oNi5"}),"data-cta":"admin-reset-password-email-input",disabled:!0,required:!0}),l.jsx(qU,{title:e._({id:"f7sXvi"}),hasOldPassword:!1}),l.jsxs("div",{className:"flex justify-between gap-4",children:[l.jsx(Oe,{"data-cta":"admin-reset-password-back-to-login-button",variant:"muted",outline:!0,asChild:!0,children:l.jsx(ar,{to:"/login",children:l.jsx(D,{id:"VCoEm+"})})}),l.jsx(Oe,{"data-cta":"admin-reset-password-submit-button",variant:"primary",type:"submit",children:l.jsx(D,{id:"GptGxg"})})]})]})}const XSe=nr("/_authLayout/register/")({component:()=>l.jsx(vOt,{}),validateSearch:e=>({organization:e.organization??"",email:e.email??"",url:e.url??""})});function vOt(){const{i18n:e,_:t}=Me(),n=gs(),{organization:r,email:i,url:s}=XSe.useSearch(),{trackEvent:a}=epe(),o=Ae.auth.register.useMutation(),[c,u]=b.useState(!1),d=p=>(u(!0),o.mutate({...p.values,url:s},{onError:async g=>{if(g instanceof _u){const{data:v}=g;v.code==="CONFLICT"&&Re.error(e._({id:"GkcfmO"}),{description:e._({id:"kQXy9B"})})}},onSuccess:async()=>{a("userRegistered",{email:p.values.email,organization:p.values.organization}),n({to:"/register/sent",search:{email:p.values.email}})},onSettled:()=>{u(!1)}})),{schema:h}=oi([{name:"organization",label:e._({id:"hn//ZK"}),required:!0,initialValue:r,uiProps:{"data-cta":"admin-register-organization-input"}},{name:"email",label:e._({id:"O3oNi5"}),required:!0,initialValue:i,uiProps:{type:"email","data-cta":"admin-register-email-input"}}],[t]);return l.jsxs(Mx,{onSubmit:d,zodSchema:Aqe,className:"flex w-full flex-col gap-6",children:[l.jsx("h1",{className:"text-center text-2xl font-bold",children:l.jsx(D,{id:"cpE88+"})}),l.jsx(Yr,{schema:h}),l.jsx(Oe,{variant:"primary",size:"lg",type:"submit","data-cta":"admin-register-submit-button",disabled:c,loading:c,children:l.jsx(D,{id:"cpE88+"})}),l.jsx("div",{className:"flex flex-col items-center justify-center gap-3",children:l.jsx(ar,{to:"/login","data-cta":"admin-register-login-link",className:"text-sm hover:text-primary hover:underline",children:l.jsx(D,{id:"3xHmj+"})})})]})}const QSe=nr("/_authLayout/login/")({component:bOt,validateSearch:e=>({redirect:e.redirect})}),yOt={email:"",password:""};function bOt(){const{i18n:e,_:t}=Me(),n=gs(),{identify:r}
1415=epe(),{setJwt:i,setUser:s,setCurrentOrganizationId:a,setActiveSubscription:o,logout:c}=ps(),u=Ae.auth.login.useMutation(),d=QSe.useSearch(),[h,p]=b.useState(!1),g=async()=>{if(d.redirect){const _=new URL(d.redirect,window.location.origin);await n({to:`${_.pathname}${_.search}`,replace:!0})}else await n({to:"/"})},v=_=>(p(!0),u.mutate(_.values,{onError:w=>{c();try{if(w instanceof _u){const{data:S,message:E}=w;S.code==="UNAUTHORIZED"&&(E.includes("Account requires verification")?Re.error(e._({id:"z5pEEf"}),{description:e._({id:"Peb0ou"})}):Re.error(e._({id:"Vw8l6h"}),{description:e._({id:"jLr8VJ"})})),S.code==="NOT_FOUND"&&Re.error(e._({id:"eW9fDd"}),{description:e._({id:"PUWqK/"})})}else Re.error(e._({id:"Vw8l6h"}),{description:e._({id:"UjSmmW"})})}catch{p(!1),Re.error(e._({id:"Vw8l6h"}),{description:e._({id:"UjSmmW"})})}},onSuccess:async w=>{i(w.access);const S=await Cs.users.me.query();s(S);const E=await Cs.organizations.findOne.query({id:w.user.currentOrganizationId});if(!E)return Re.error(e._({id:"0RpYrZ"}),{description:e._({id:"wO29qX"})}),g();a(E?.id);try{const T=await Cs.subscriptions.getActive.query({organizationId:E.id});o(T)}catch{o(null)}if(r(S.id,{email:S.email,name:yt.fullName(S),organization:E.name,organizationId:E.id,firstLogin:S.firstLogin,lastLogin:new Date().toISOString(),role:S.role}),S.firstLogin)try{const[T]=await Promise.all([Cs.chats.findAll.query({where:{organization:w.user.currentOrganizationId},pagination:{pageSize:1}}),Cs.users.update.mutate({id:S.id,firstLogin:!1})]),[N]=T.items;if(!N?.id)return g();n({to:"/chats/$chatId/documents",params:{chatId:N.id},search:{open:E.url}})}catch(T){return console.error("Failed to fetch chats:",T),g()}else return g()},onSettled:()=>{p(!1)}})),{schema:x}=oi([{name:"email",label:e._({id:"O3oNi5"}),required:!0,uiProps:{type:"email","data-cta":"admin-login-email-input"}},{name:"password",label:e._({id:"8ZsakT"}),required:!0,uiProps:{type:"password",passwordPreview:!0,"data-cta":"admin-login-password-input"}}],[t]);return l.jsxs(Mx,{onSubmit:v,initialValues:yOt,zodSchema:Cqe,className:"flex w-full flex-col gap-6",children:[l.jsx("h1",{className:"text-center text-2xl font-bold",children:e._({id:"z0t9bb"})}),l.jsx(Yr,{schema:x}),l.jsx(Oe,{"data-cta":"admin-login-submit-button",variant:"primary",size:"lg",type:"submit",disabled:h,loading:h,children:e._({id:"z0t9bb"})}),l.jsxs("div",{className:"flex flex-row items-center justify-center gap-3",children:[l.jsx(ar,{"data-cta":"admin-login-forgotten-password-link",to:"/forgotten-password",className:"text-sm hover:text-primary hover:underline",children:e._({id:"UNMVei"})}),l.jsx(_h,{orientation:"vertical",className:"h-4"}),l.jsx(ar,{to:"/register","data-cta":"admin-login-register-link",className:"text-sm font-semibold hover:text-primary hover:underline",children:e._({id:"fgLNSM"})})]})]})}const _Ot=nr("/_authLayout/forgotten-password/")({component:SOt}),wOt={email:""};function SOt(){const{i18n:e,_:t}=Me(),n=gs(),r=Ae.auth.forgottenPassword.useMutation(),i=s=>{r.mutate(s.values,{onError:a=>{console.error(a),typeof a=="object"&&a&&"data"in a&&typeof a.data=="object"&&a.data&&"code"in a.data&&a.data.code==="UNAUTHORIZED"?Re.error(e._({id:"ZPcs/s"}),{description:e._({id:"8Uciqu"})}):Re.error(e._({id:"Vw8l6h"}),{description:e._({id:"R2mAIu"})})},onSuccess:()=>{n({to:"/forgotten-password/sent",search:{email:s.values.email}})}})};return l.jsxs(Mx,{initialValues:wOt,onSubmit:i,zodSchema:Tqe,className:"flex w-full flex-col gap-6",children:[l.jsx("h1",{className:"text-center text-2xl font-bold",children:e._({id:"UNMVei"})}),l.jsx("div",{className:"text-center text-sm",children:e._({id:"/zoHyt"})}),l.jsx(zo,{name:"email",type:"email","data-cta":"admin-forgotten-password-email-input",label:e._({id:"O3oNi5"}),placeholder:e._({id:"O3oNi5"}),required:!0}),l.jsxs("div",{className:"flex justify-between gap-4",children:[l.jsx(Oe,{"data-cta":"admin-forgotten-password-back-to-login-button",variant:"muted",outline:!0,asChild:!0,children:l.jsx(ar,{to:"/login",children:e._({id:"VCoEm+"})})}),l.jsx(Oe,{"data-cta":"admin-forgotten-password-send-button",variant:"primary",type:"submit",children:e._({id:"JlFcis"})})]})]})}const ZSe=b.memo(function({data:t}){const{i18n:n,_:r}=Me(),{user:i,currentOrganizationId:s}=ps(),a=Ir(),{create:{mutateAsync:o},remove:{mutateAsync:c},update:{mutateAsync:u}}=FU(),d=s,{data:h,isLoading:p}=Ae.subscriptions.getActive.useQuery({organizationId:d},{enabled:!!d}),{data:g,isLoading:v}=Ae.users.findAll.useQuery({where:{organizations:{id:d}}},{enabled:!!d}),x=g?.meta.total??0,_=h?.maxUsers===0?Number.MAX_SAFE_INTEGER:h?.maxUsers??3,w=x>=_,S=i?.role===Jt.SuperAdmin,{schema:E}=oi([{name:"email",label:n._({id:"O3oNi5"}),required:!0,disabled:!!t,parser:N=>typeof N=="string"?N.toLowerCase():N},{name:"firstName",label:n._({id:"V1EGGU"})},{name:"lastName",label:n._({id:"1ZaQUH"})},{name:"role",type:"select",uiControl:"hidden",defaultValue:Jt.Admin}],[r,i?.role,a.role,a.roleWOSuperAdmin]),{schema:T}=oi([{name:"isActiveOperator",label:n._({id:"NV6lac"}),tooltip:n._({id:"oltKRp"}),type:"checkbox",showOptional:!1},{$relevant:{$when:({formState:N})=>N?.values?.isActiveOperator,$fields:[{name:"contactEmail",label:n._({id:"i3p844"}),tooltip:n._({id:"epD7BU"}),showOptional:!1},{name:"phone",label:n._({id:"zmwvG2"}),type:"text",showOptional:!1},{name:"operatorSpecialization",label:n._({id:"Capllm"}),type:"text",tooltip:n._({id:"huDbyc"}),showOptional:!1,uiControl:"textarea"},{name:"operatorDisplayText",label:n._({id:"yYR6za"}),tooltip:n._({id:"W5FuY/"}),type:"richtext",showOptional:!1}]}}],[r]);return l.jsxs(Ls,{initialData:t,createSchema:Jfe,updateSchema:p8.extend({email:B().email().max(255)}),onCreate:o,onSubmitError:N=>{if(typeof N=="object"&&N&&"data"in N&&typeof N.data=="object"&&N.data&&"code"in N.data&&N.data.code==="CONFLICT"){Re.error(n._({id:"GkcfmO"}),{description:n._({id:"eHz21e"})});return}if(typeof N=="object"&&N&&"message"in N&&typeof N.message=="string"&&N.message.startsWith("User limit")){Re.error(n._({id:"qakKk+"}),{description:N.message});return}Re.error(n._({id:"4e2iI4"}),{description:N instanceof Error?N.message:n._({id:"W5A0Ly"})})},onUpdate:N=>{const{email:A,...k}=N;return u(k)},onRemove:c,basePath:"/users",idParamName:"userId",children:[l.jsx(Ls.Col,{children:l.jsx(gn,{title:n._({id:"zsPSmY"}),children:l.jsx(Yr,{schema:E})})}),l.jsx(Ls.Col,{children:l.jsx(gn,{title:n._({id:"Q58gSm"}),children:l.jsx(Yr,{schema:T})})}),!t&&w&&S&&!p&&!v&&l.jsx(ga,{variant:"warning",title:n._({id:"qakKk+"}
1415),className:"mb-4 self-start",children:l.jsx(D,{id:"tIOj8n",values:{maxUsersLimit:_}})}),l.jsx(Ls.Col,{children:l.jsx(AE,{data:t})})]})}),EOt=nr("/_baseLayout/users/create")({component:COt});function COt(){const{i18n:e,_:t}=Me();return l.jsx(wo,{title:e._({id:"ph79Bz"}),breadcrumbs:[{label:e._({id:"Sxm8rQ"}),to:"/users"},{label:e._({id:"ph79Bz"}),to:"/users/create"}],children:l.jsx(ZSe,{})})}const hj=[{key:"month",interval:Ci.Month,intervalCount:1,months:1},{key:"quarter",interval:Ci.Month,intervalCount:3,months:3},{key:"half_year",interval:Ci.Month,intervalCount:6,months:6},{key:"year",interval:Ci.Year,intervalCount:1,months:12}];function ZL(e){return hj.find(t=>t.key===e)??hj[0]}function gie(e,t){return e.interval===t.interval&&e.intervalCount===t.intervalCount}function TOt(e){if(e.length<=1)return{valid:!0};const t=e.map(i=>ZL(i).months),n=Math.min(...t);return{valid:t.every(i=>i%n===0),shortestMonths:n}}function x1({htmlFor:e,label:t,hint:n}){return l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx("label",{htmlFor:e,className:"text-sm font-medium",children:t}),l.jsx(cn,{title:n,delayDuration:200,children:l.jsx("button",{type:"button",className:"inline-flex text-muted-foreground hover:text-foreground","aria-label":"More information",children:l.jsx(ax,{className:"size-3.5"})})})]})}const AOt="flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
1415ing-offset-background placeholder:text-slate-400 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",xie="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2";function kOt({organizationId:e,orgCurrency:t,catalog:n,billingInfo:r,daysUntilDue:i,duzpDate:s,disabled:a,isAssigning:o,onAssign:c}){const{i18n:u,_:d}=Me(),[h,p]=b.useState(""),[g,v]=b.useState("month"),[x,_]=b.useState({}),[w,S]=b.useState([]),[E,T]=b.useState([]),[N,A]=b.useState("bank_transfer"),k=r?.registrationNumber?.trim(),j=r?.vatId?.trim(),V=!!r?.billingEmail?.trim()&&(N!=="bank_transfer"||!!(k||j)),U=b.useMemo(()=>({month:u._({id:"+8Nek/"}),quarter:u._({id:"kCxe8K"}),half_year:u._({id:"IejteQ"}),year:u._({id:"zkWmBh"})}),[d]),G=b.useMemo(()=>({month:u._({id:"pTc/Cy"}),quarter:u._({id:"YvnzEp"}),half_year:u._({id:"Jvng9X"}),year:u._({id:"crrqaX"})}),[d]),Q=ZL(g),Z=b.useMemo(()=>n?n.basePlans.flatMap(xe=>xe.prices.filter(Fe=>gie(Fe,Q)).map(Fe=>({priceId:Fe.priceId,label:xe.isCustomEnterprise?`${xe.productName} (Enterprise)`:xe.productName,tier:xe.tier,amount:Fe.amount,isCustomEnterprise:xe.isCustomEnterprise}))):[],[n,Q]),K=Z.length>0,te=b.useMemo(()=>n?.addons.filter(xe=>xe.prices.length>0)??[],[n]),ne=b.useMemo(()=>n?.addons.filter(xe=>xe.oneTimePrices.length>0)??[],[n]),se=Z.find(xe=>xe.priceId===h),H=(xe,ke)=>{const Fe=ZL(ke);return xe.prices.find(tt=>gie(tt,Fe))},O=te.filter(xe=>w.includes(xe.addonKey)),L=b.useMemo(()=>{const xe=[g];for(const ke of O)xe.push(x[ke.addonKey]??g);return xe},[x,g,O]),M=b.useMemo(()=>TOt(L),[L]),q=O.reduce((xe,ke)=>{const Fe=H(ke,x[ke.addonKey]??g);return xe+(Fe?.amount??0)},0),J=ne.flatMap(xe=>xe.oneTimePrices.filter(ke=>E.includes(ke.priceId))).reduce((xe,ke)=>xe+ke.amount,0),W=(se?.amount??0)+q+J,re=O.some(xe=>(x[xe.addonKey]??g)!==g),ae=(xe,ke)=>{_(Fe=>({...Fe,[xe]:ke}))},ce=xe=>{S(ke=>ke.includes(xe)?ke.filter(Fe=>Fe!==xe):(_(Fe=>({...Fe,[xe]:g})),[...ke,xe]))},Te=xe=>{T(ke=>ke.includes(xe)?ke.filter(Fe=>Fe!==xe):[...ke,xe])},fe=async()=>{if(!se){Re.warning(u._({id:"fdwzF+"}));return}if(!M.valid){Re.error(u._({id:"TDsmCn"}));return}if(N==="bank_transfer"&&!k&&!j){Re.error(u._({id:"KYpouD"}));return}const xe=[{stripePriceId:se.priceId,productType:"plan",quantity:1}];for(const ke of O){const Fe=x[ke.addonKey]??g,tt=H(ke,Fe);if(!tt){Re.error(u._({id:"++gYxi",values:{0:ke.productName,1:U[Fe]}}));return}xe.push({stripePriceId:tt.priceId,productType:"addon",addonKey:ke.addonKey,quantity:1})}await c({items:xe,oneTimeFeePriceIds:E.length?E:void 0,collectionMethodTarget:N,daysUntilDue:i,duzpDate:s||void 0,sendNow:!0,replaceExisting:!1})};return l.jsx(gn,{title:u._({id:"9Jxliv"}),className:"mb-6",children:l.jsxs("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2",children:[l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx(x1,{htmlFor:"billing-period-select",label:l.jsx(D,{id:"A2rIh2"}),hint:l.jsx(D,{id:"Zy6DJm"})}),l.jsxs(kN,{value:g,onValueChange:xe=>{v(xe),p("")},disabled:a,children:[l.jsx(jN,{id:"billing-period-select",className:"w-full",children:l.jsx(R2,{placeholder:u._({id:"zGg2Es"})})}),l.jsx(NN,{children:hj.map(xe=>l.jsx(Yt,{value:xe.key,children:U[xe.key]},xe.key))})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{htmlFor:"assign-plan-select",className:"text-sm font-medium",children:l.jsx(D,{id:"HjBd5B"})}),!K&&l.jsx("p",{className:"text-muted-foreground text-sm",children:l.jsx(D,{id:"IOQ5Gk"})}),l.jsxs("select",{id:"assign-plan-select",value:h,onChange:xe=>p(xe.target.value),className:AOt,disabled:a||!K,children:[l.jsx("option",{value:"",children:u._({id:"YMFt7E"})}),Z.map(xe=>l.jsx("option",{value:xe.priceId,children:`${xe.label} â ${yt.currency(xe.amount,t)} / ${G[g]}`},xe.priceId))]})]}),te.length>0&&l.jsxs("div",{className:"space-y-2",children:[l.jsx(x1,{label:l.jsx(D,{id:"Y2K3rp"}),hint:l.jsx(D,{id:"o6yADx"})}),l.jsx("div",{className:"space-y-2 rounded-md border p-3",children:te.map(xe=>{const ke=w.includes(xe.addonKey),Fe=x[xe.addonKey]??g,tt=H(xe,Fe);return l.jsxs("div",{className:"space-y-2 rounded-md border border-transparent p-2 has-[:checked]:border-muted has-[:checked]:bg-muted/20",children:[l.jsxs("label",{className:"flex cursor-pointer items-start gap-2 text-sm",children:[l.jsx("input",{type:"checkbox",checked:ke,onChange:()=>ce(xe.addonKey),disabled:a,className:"mt-0.5"}),l.jsxs("span",{className:"flex-1",children:[l.jsx("span",{className:"font-medium",children:xe.productName}),tt?l.jsxs("span",{className:"text-muted-foreground",children:[" ","â"," ",yt.currency(tt.amount,t)," ","/ ",G[Fe]]}):l.jsxs("span",{className:"text-amber-600",children:[" ","â ",u._({id:"duCI40"})]})]})]}),ke&&l.jsxs("div",{className:"ml-6 space-y-1",children:[l.jsx("label",{htmlFor:`add
1415on-period-${xe.addonKey}`,className:"text-muted-foreground text-xs font-medium",children:l.jsx(D,{id:"o+/RQ/"})}),l.jsxs(kN,{value:Fe,onValueChange:Se=>ae(xe.addonKey,Se),disabled:a,children:[l.jsx(jN,{id:`addon-period-${xe.addonKey}`,className:"w-full",children:l.jsx(R2,{})}),l.jsx(NN,{children:hj.map(Se=>l.jsx(Yt,{value:Se.key,children:U[Se.key]},Se.key))})]})]})]},xe.addonKey)})}),!M.valid&&l.jsx("p",{className:"text-sm text-red-600",children:l.jsx(D,{id:"ZaofNs"})})]}),ne.length>0&&l.jsxs("div",{className:"space-y-2",children:[l.jsx(x1,{label:l.jsx(D,{id:"bPbzJN"}),hint:l.jsx(D,{id:"MbsAMr"})}),l.jsx("div",{className:"space-y-1 rounded-md border p-3",children:ne.flatMap(xe=>xe.oneTimePrices.map(ke=>l.jsxs("label",{className:"flex cursor-pointer items-center gap-2 text-sm",children:[l.jsx("input",{type:"checkbox",checked:E.includes(ke.priceId),onChange:()=>Te(ke.priceId),disabled:a}),l.jsxs("span",{children:[xe.productName," â"," ",yt.currency(ke.amount,t)," (",u._({id:"cm1lBI"}),")"]})]},ke.priceId)))})]})]}),l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx(x1,{label:l.jsx(D,{id:"ENEPLY"}),hint:l.jsx(D,{id:"zeo6/h"})}),l.jsxs("div",{className:"flex gap-2",children:[l.jsxs("label",{className:"flex flex-1 cursor-pointer items-center gap-2 rounded-md border p-3 text-sm has-[:checked]:border-primary has-[:checked]:bg-muted/30",children:[l.jsx("input",{type:"radio",name:"collection-target",checked:N==="bank_transfer",onChange:()=>A("bank_transfer")}),l.jsx(Zae,{className:"size-4 shrink-0"}),l.jsx("span",{className:"font-medium",children:l.jsx(D,{id:"LrLE2V"})})]}),l.jsxs("label",{className:"flex flex-1 cursor-pointer items-center gap-2 rounded-md border p-3 text-sm has-[:checked]:border-primary has-[:checked]:bg-muted/30",children:[l.jsx("input",{type:"radio",name:"collection-target",checked:N==="card",onChange:()=>A("card")}),l.jsx(T2,{className:"size-4 shrink-0"}),l.jsx("span",{className:"font-medium",children:l.jsx(D,{id:"kryGs+"})})]})]})]}),l.jsx(NOt,{organizationId:e,billingInfo:r,collectionTarget:N}),se&&l.jsxs("div",{className:"space-y-2 rounded-md bg-muted/40 p-3 text-sm",children:[l.jsx("p",{className:"font-medium",children:l.jsx(D,{id:"ToBLNG"})}),l.jsx("p",{className:"text-lg font-semibold",children:yt.currency(W,t)}),l.jsxs("ul",{className:"text-muted-foreground space-y-1",children:[l.jsxs("li",{children:[se.label," â"," ",yt.currency(se.amount,t)," /"," ",G[g]]}),O.map(xe=>{const ke=x[xe.addonKey]??g,Fe=H(xe,ke);return l.jsxs("li",{children:[xe.productName," â"," ",Fe?`${yt.currency(Fe.amount,t)} / ${G[ke]}`:u._({id:"iS59zI"})]},xe.addonKey)}),J>0&&l.jsxs("li",{children:[l.jsx(D,{id:"L8gBVm"})," â"," ",yt.currency(J,t)]})]}),re&&M.valid&&l.jsx("p",{className:"text-muted-foreground",children:l.jsx(D,{id:"ZkLxOM"})})]}),l.jsx(Oe,{onClick:fe,loading:o,disabled:a||!se||!M.valid||!V,className:"w-full sm:w-auto",children:l.jsx(D,{id:"R8mpsc"})})]})]})})}function NOt({organizationId:e,billingInfo:t,collectionTarget:n}){const{i18n:r,_:i}=Me(),s=I5e(),a=t?.companyName?.trim(),o=t?.registrationNumber?.trim(),c=t?.vatId?.trim(),u=t?.addressLine1?.trim(),d=t?.addressLine2?.trim(),h=t?.city?.trim(),p=t?.postalCode?.trim(),g=t?.country?.trim(),v=t?.billingEmail?.trim(),x=t?.invoiceCcEmail?.trim(),_=[p,h].filter(Boolean).join(" "),w=!!(o||c),E=!!a&&w&&!!(u||_),T=[{id:"company",label:r._({id:"7i8j3G"}),value:a},{id:"ico",label:r._({id:"5vwAk0"}),value:o},{id:"dic",label:r._({id:"K8cpk2"}),value:c},{id:"addr1",label:r._({id:"Du6bPw"}),value:u},{id:"addr2",label:"",value:d},{id:"city",label:"",value:_||void 0},{id:"country",label:r._({id:"JNCzPW"}),value:g},{id:"email",label:r._({id:"wbnXNt"}),value:v},{id:"cc",label:r._({id:"o5YDDA"}),value:x}];return l.jsxs("div",{className:"space-y-2 rounded-md border border-dashed p-3 text-sm",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"font-medium",children:l.jsx(D,{id:"17Ox+q"})}),!E&&l.jsx("span",{className:"inline-flex items-center gap-1 rounded-full bg-amber-100 px-2 py-0.5 text-xs font-medium text-amber-700 dark:bg-amber-900/40 dark:text-amber-300",children:l.jsx(D,{id:"mtGDyy"})})]}),t?l.jsx("dl",{className:"space-y-0.5",children:T.filter(N=>N.value).map(N=>l.jsxs("div",{className:"flex gap-2",children:[l.jsx("dt",{className:"text-muted-foreground w-32 shrink-0",children:N.label}),l.jsx("dd",{children:N.value})]},N.id))}):l.jsx("p",{className:"text-amber-600",children:l.jsx(D,{id:"/RdLMF"})}),n==="bank_transfer"&&!w&&l.jsx("p",{className:"text-amber-600",children:l.jsx(D,{id:"KSU5EM"})}),l.jsxs("div",{className:"text-muted-foreground flex items-start gap-2 border-t pt-2",children:[l.jsx(Oj,{className:"mt-0.5 size-4 shrink-0"}),l.jsx("p",{children:v?l.jsx(D,{id:"VSpEXY",values:{billingEmail:v},components:{0:l.jsx("span",{className:"font-medium text-foreground"})}}):l.jsx("span",{className:"text-amber-600",children:l.jsx(D,{id:"jlMp7r"})})})]}),l.jsxs(ar,{to:"/organizations/$organizationId/billing",params:{organizationId:e},search:{redirect:s.href},className:"inline-flex items-center gap-1 font-medium text-primary hover:underline",children:[l.jsx(D,{id:"bsEu/L"}),l.jsx(qIe,{className:"size-3.5"})]})]})}const jOt=5,ROt=Object.freeze({[Ti.USD]:"$",[Ti.CZK]:"KÄ"});function JSe({subscription:e,currency:t,onSave:n,isSaving:r,onUpdate:i}){const{i18n:s,_:a}=Me(),o=ROt[t],c=Of(jOt,t),u=r,[d,h]=b.useState(e.autoRenewal??!1),[p,g]=b.useState((e.autoRenewalAmount&&Of(e.autoRenewalAmount,t))??null),[v,x]=b.useState((e.autoRenewalLimit&&Of(e.autoRenewalLimit,t))??null),[_,w]=b.useState(e.autoRenewalLimit!==null),[S,E]=b.useState((e.autoRenewalThreshold&&Of(e.autoRenewalThreshold,t))??c),[T,N]=b.useState(!1),[A,k]=b.useState(S!==null&&S<c);b.useEffect(()=>{const Q=Of(5,t),Z=(e.autoRenewalThreshold&&Of(e.autoRenewalThreshold,t))??Q;h(e.autoRenewal??!1),g((e.autoRenewalAmount&&Of(e.autoRenewalAmount,t))??null),x((e.autoRenewalLimit&&Of(e.autoRenewalLimit,t))??null),w(e.autoRenewalLimit!==null),E(Z),k(Z<Q),N(!1)},[e,t]);const j=Q=>{h(Q),Q&&((!p||p<c)&&g(c),(!S||S<c)&&(E(c),k(!1))),N(!0)},R=Q=>{const Z=Number.parseFloat(Q);g(Number.isNaN(Z)?null:Z),N(!0)},P=Q=>{const Z=Number.parseFloat(Q);x(Number.isNaN(Z)||Z<0?null:Z),N(!0)},V=Q=>{w(Q),Q||x(null),N(!0)},U=Q=>{const Z=Number.parseFloat(Q),K=!Number.isNaN(Z),te=K&&Z>=c;E(K?Z:null),k(K&&!te),N(!0)},G=async()=>
1415{if(d&&A){Re.error(s._({id:"dLWiBK",values:{0:yt.currency(c,t)}}));return}if(d&&(!S||S<c)){Re.error(s._({id:"dLWiBK",values:{0:yt.currency(c,t)}}));return}if(d&&(!p||p<c)){Re.error(s._({id:"SSzOPN",values:{0:yt.currency(c,t)}}));return}if(d&&_&&(v===null||v<0)){Re.error(s._({id:"jQG16y",values:{currencySymbol:o}}));return}try{await n({autoRenewal:d,autoRenewalAmount:d&&p?pP(p,t):void 0,autoRenewalLimit:d&&_&&v?pP(v,t):void 0,autoRenewalThreshold:d&&S?pP(S,t):void 0}),N(!1),k(!1),Re.success(s._({id:"qzMzK4"})),i&&i()}catch(Q){console.error("Failed to update auto-renewal settings:",Q),Re.error(s._({id:"4CP+OV"}))}};return l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-start justify-between",children:[l.jsxs(ot,{htmlFor:"auto-renewal-switch",className:"flex flex-col space-y-1",children:[l.jsx("span",{children:l.jsx(D,{id:"ANti3v"})}),l.jsx("span",{className:"text-xs text-gray-500",children:l.jsx(D,{id:"aMvc4p"})})]}),l.jsx(Di,{id:"auto-renewal-switch",checked:d,onCheckedChange:j,disabled:u})]}),d&&l.jsxs("div",{className:"space-y-3 border-t pt-4",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx(ot,{htmlFor:"renewal-threshold",children:l.jsx(D,{id:"jA5FSk",values:{currencySymbol:o}})}),l.jsx(fn,{id:"renewal-threshold",type:"number",step:"0.01",min:c,value:S??"",onChange:Q=>U(Q.target.value),placeholder:s._({id:"s3J1NT",values:{currencyMinAmount:c}}),disabled:u,className:A?"border-red-500":""}),A&&l.jsx("p",{className:"text-xs text-red-500",children:l.jsx(D,{id:"lOGu5l",values:{0:yt.currency(c,t)}})}),l.jsx("p",{className:"text-xs text-gray-500",children:l.jsx(D,{id:"6/eGa5",values:{0:yt.currency(c,t)}})})]}),l.jsxs("div",{className:"space-y-1",children:[l.jsx(ot,{htmlFor:"renewal-amount",children:l.jsx(D,{id:"WcVDlg",values:{currencySymbol:o}})}),l.jsx(fn,{id:"renewal-amount",type:"number",min:c,step:"0.01",value:p??"",onChange:Q=>R(Q.target.value),placeholder:s._({id:"hdNQkj",values:{0:c*4}}),disabled:u}),l.jsx("p",{className:"text-xs text-gray-500",children:l.jsx(D,{id:"MeJO98",values:{0:yt.currency(c,t)}})})]}),l.jsxs("div",{className:"flex items-start justify-between pt-2",children:[l.jsxs(ot,{htmlFor:"limit-monthly-switch",className:"flex flex-col space-y-1",children:[l.jsx("span",{children:l.jsx(D,{id:"hAeKrU"})}),l.jsx("span",{className:"text-xs text-gray-500",children:l.jsx(D,{id:"Jtmml9"})})]}),l.jsx(Di,{id:"limit-monthly-switch",checked:_,onCheckedChange:V,disabled:u})]}),_&&l.jsxs("div",{className:"space-y-1",children:[l.jsx(ot,{htmlFor:"renewal-limit",children:l.jsx(D,{id:"IhXiZT",values:{currencySymbol:o}})}),l.jsx(fn,{id:"renewal-limit",type:"number",min:"0",step:"0.01",value:v??"",onChange:Q=>P(Q.target.value),placeholder:s._({id:"cL/vgk"}),disabled:u}),e?.autoRenewalPeriodStart&&l.jsx("div",{className:"mt-1 space-y-0.5 text-xs text-gray-500",children:l.jsxs("p",{children:[l.jsx(D,{id:"rfFRWI"})," ",new Date(e.autoRenewalPeriodStart).toLocaleDateString()]})})]})]}),T&&l.jsx("div",{className:"flex justify-end border-t pt-4",children:l.jsxs(Oe,{"data-cta":"admin-auto-renewal-settings-save-button",onClick:G,disabled:u,children:[u?l.jsx(Kr,{className:"mr-2 size-4 animate-spin"}):null,l.jsx(D,{id:"kP+e/z"})]})})]})}function eEe({organization:e,subscription:t}){const{i18n:n,_:r}=Me(),i=e.currency,s=e.currentMonthlyUsage??0,a=e.monthlyUsageLimit??0,o=Math.min(s,a),c=a>0?o/a*100:0,u=e.balance??0,d=t?.autoRenewal&&typeof t.autoRenewalLimit=="number"&&t.autoRenewalLimit>=0,h=t?.autoRenewalChargedThisPeriod??0,p=t?.autoRenewalLimit??0,g=d&&p>0?h/p*100:0;return l.jsxs("section",{className:"flex flex-col gap-4 text-sm",children:[t?.status===qr.Active&&l.jsxs("div",{children:[l.jsxs("div",{className:"mb-1 flex justify-between",children:[l.jsx("span",{className:"text-gray-700",children:l.jsx(D,{id:"dgn4lD"})}),l.jsxs("span",{className:"font-medium",children:[yt.credits(o,i)," /"," ",yt.credits(a,i)]})]}),l.jsx(U6,{value:c,className:"h-2","aria-label":n._({id:"5DaoIG",values:{0:c.toFixed(0)}})})]}),l.jsx("div",{children:l.jsxs("div",{className:"flex justify-between",children:[l.jsx("span",{className:"text-gray-700",children:l.jsx(D,{id:"8iX6Cj"})}),l.jsx("span",{className:$e("font-medium",u<0&&"text-red-500"),children:yt.credits(u,i)})]})}),d&&l.jsxs("div",{className:"mt-3 border-t",children:[l.jsxs("div",{className:"mb-1 flex justify-between",children:[l.jsx("span",{className:"text-gray-700",children:l.jsx(D,{id:"3KMJT8"})}),l.jsx("span",{className:"text-xs text-gray-500",children:l.jsx(D,{id:"G+YL/N"})})]}),l.jsx(U6,{value:g,className:"h-2","aria-label":n._({id:"AlMrVb",values:{0:g.toFixed(0)}})}),l.jsx("div",{className:"mt-1 text-right text-xs text-gray-500",children:l.jsx(D,{id:"IXXD5i",values:{0:yt.credits(h,i),1:yt.credits(p,i)}})})]}),l.jsxs("div",{className:"flex items-center text-xs text-gray-500",children:[l.jsx(ds,{size:14,className:"mr-1.5 shrink-0"}),l.jsx("span",{children:l.jsx(D,{id:"9YoPz7"})})]})]})}function IOt({organizationId:e,organization:t,subscription:n,canManualCredit:r,onUpdated:i}){const{i18n:s,_:a}=Me(),o=t.currency??Ti.CZK,c=!!(n&&n.tier!==Pr.Free),{data:u}
1415=Ae.subscriptions.hasDefaultPaymentMethod.useQuery({organizationId:e},{enabled:c}),d=u?.hasDefaultPaymentMethod??!1,h=Ae.subscriptions.updateAutoRenewal.useMutation({onSuccess:()=>{Re.success(s._({id:"UZ7BG7"})),i()},onError:S=>{Re.error(s._({id:"r1IPm1"}),{description:S.message})}}),[p,g]=b.useState(""),[v,x]=b.useState(""),_=Ae.subscriptions.addManualBalance.useMutation({onSuccess:()=>{Re.success(s._({id:"7yojXD"})),g(""),x(""),i()},onError:S=>{Re.error(s._({id:"+GVF8+"}),{description:S.message})}}),w=()=>{const S=Number.parseFloat(p);if(Number.isNaN(S)||S<=0){Re.error(s._({id:"7kwE+1"}));return}_.mutate({organizationId:e,amountToAdd:S,currency:o,reason:v.trim()||void 0})};return l.jsx(gn,{title:s._({id:"2+80Pd"}),className:"h-full",children:l.jsxs("div",{className:"space-y-6",children:[l.jsx(eEe,{organization:t,subscription:n}),c&&n?l.jsxs("section",{className:"space-y-3 border-t pt-4",children:[l.jsx("h3",{className:"text-sm font-medium",children:l.jsx(D,{id:"vUbP+p"})}),!d&&l.jsx(ga,{variant:"warning",title:l.jsx(D,{id:"JyYEzG"}),description:l.jsx(D,{id:"MoqxBb"})}),l.jsx(JSe,{subscription:n,currency:o,isSaving:h.isPending,onSave:async S=>{await OOt(h,{organizationId:e,values:S})},onUpdate:i})]}):l.jsx("p",{className:"text-muted-foreground border-t pt-4 text-sm",children:l.jsx(D,{id:"h3S+at"})}),r&&l.jsxs("section",{className:"space-y-3 border-t pt-4",children:[l.jsx("h3",{className:"text-sm font-medium",children:l.jsx(D,{id:"fb+uss"})}),l.jsx("p",{className:"text-muted-foreground text-xs",children:l.jsx(D,{id:"fFrxvY"})}),l.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx(ot,{htmlFor:"manual-credit-amount",children:l.jsx(D,{id:"C05tXv",values:{0:o.toUpperCase()}})}),l.jsx(fn,{id:"manual-credit-amount",type:"number",min:"0",step:"0.01",value:p,onChange:S=>g(S.target.value),disabled:_.isPending})]}),l.jsxs("div",{className:"space-y-1",children:[l.jsx(ot,{htmlFor:"manual-credit-reason",children:l.jsx(D,{id:"jPSk57"})}),l.jsx(fn,{id:"manual-credit-reason",type:"text",value:v,onChange:S=>x(S.target.value),disabled:_.isPending})]})]}),l.jsx(Oe,{size:"sm",className:"self-start",loading:_.isPending,onClick:w,children:l.jsx(D,{id:"3hkXRB"})})]})]})})}async function OOt(e,t){await e.mutateAsync({organizationId:t.organizationId,...t.values})}const POt={default:"bg-muted text-foreground",success:"bg-green-100 text-green-800 dark:bg-green-900/40 dark:text-green-300",warning:"bg-yellow-100 text-yellow-900 dark:bg-yellow-900/40 dark:text-yellow-200",danger:"bg-red-100 text-red-800 dark:bg-red-900/40 dark:text-red-300",info:"bg-blue-100 text-blue-800 dark:bg-blue-900/40 dark:text-blue-300"},MOt={sm:"px-2.5 py-0.5 text-xs",md:"px-3 py-1 text-sm font-semibold"};function hh({label:e,tone:t="default",size:n="sm"}){return l.jsx("span",{className:$e("inline-flex items-center rounded-full font-medium",POt[t],MOt[n]),children:e})}function X_(e){return e?new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}):"â"}function DOt(e){return e===qr.Active?"success":e===qr.PastDue?"warning":e===qr.Canceled||e===qr.Unpaid?"danger":"default"}function FOt(e,t){return e===Ci.Year?"year":t===3?"quarter":t===6?"half_year":"month"}function jD({icon:e,label:t,children:n,hint:r}){return l.jsxs("div",{className:"space-y-1",children:[l.jsxs("p",{className:"text-muted-foreground flex items-center gap-1.5 text-xs font-medium uppercase tracking-wide",children:[e,t]}),l.jsx("div",{className:"text-sm",children:n}),r&&l.jsx("p",{className:"text-muted-foreground text-xs",children:r})]})}function LOt({tierName:e,status:t,billingInterval:n,periodStart:r,periodEnd:i,paymentMethod:s,items:a,isLoading:o,cancelsAtPeriodEnd:c,onCancelAtPeriodEnd:u,onResume:d,isCancelActionPending:h}){const{i18n:p,_:g}=Me(),v=b.useMemo(()=>{switch(t){case qr.Active:return p._({id:"F6pfE9"});case qr.Canceled:return p._({id:"GGWsTU"});case qr.PastDue:return p._({id:"BFjW8X"});case qr.Unpaid:return p._({id:"7yiFvZ"});case qr.Incomplete:return p._({id:"mtGDyy"});case qr.IncompleteExpired:return p._({id:"aHdZwP"});case qr.Trialing:return p._({id:"nDGpcY"});default:return t?String(t):p._({id:"Ef7StM"})}},[t,g]),x=b.useMemo(()=>({month:p._({id:"+8Nek/"}),quarter:p._({id:"kCxe8K"}),half_year:p._({id:"IejteQ"}),year:p._({id:"zkWmBh"})}),[g]),_=b.useMemo(()=>({month:p._({id:"pTc/Cy"}),quarter:p._({id:"YvnzEp"}),half_year:p._({id:"Jvng9X"}),year:p._({id:"crrqaX"})}),[g]),w=new Set(a.map(T=>`${T.interval}:${T.intervalCount}`)).size>1,S=b.useMemo(()=>w?p._({id:"h6vXih"}):n?n===Ci.Year?p._({id:"zkWmBh"}):p._({id:"+8Nek/"}):"â",[n,w,g]),E=!!e;return l.jsxs(gn,{title:p._({id:"buCMvy"}),className:"h-full",children:[o&&l.jsx("p",{className:"text-muted-foreground text-sm",children:l.jsx(D,{id:"ahp8rN"})}),!o&&!E&&l.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-2",children:[l.jsx(hh,{label:p._({id:"xY
1415SDvt"}),tone:"default"}),l.jsx("span",{className:"text-muted-foreground text-sm",children:l.jsx(D,{id:"n+zeHF"})})]}),!o&&E&&l.jsxs("div",{className:"space-y-5",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-2",children:[e&&l.jsx("span",{className:"text-lg font-semibold leading-none",children:e}),l.jsx(hh,{label:v,tone:DOt(t)}),l.jsx("span",{className:"text-muted-foreground rounded-full bg-muted px-2.5 py-0.5 text-xs font-medium",children:S})]}),l.jsxs("div",{className:"grid grid-cols-1 gap-x-6 gap-y-4 sm:grid-cols-3",children:[l.jsx(jD,{icon:l.jsx(x4e,{className:"size-3.5"}),label:p._({id:"nSK0mT"}),children:r||i?`${X_(r)} â ${X_(i)}`:"â"}),l.jsx(jD,{icon:l.jsx(Lo,{className:"size-3.5"}),label:p._({id:"0odIKy"}),children:l.jsx("span",{className:"font-medium",children:X_(i)})}),l.jsx(jD,{icon:s==="bank_transfer"?l.jsx(Zae,{className:"size-3.5"}):l.jsx(T2,{className:"size-3.5"}),label:p._({id:"ENEPLY"}),children:s==="bank_transfer"?l.jsx(D,{id:"LrLE2V"}):s==="card"?l.jsx(D,{id:"kryGs+"}):l.jsx("span",{className:"text-muted-foreground",children:"â"})})]}),a.length>0&&l.jsx("div",{className:"overflow-x-auto rounded-md border",children:l.jsxs("table",{className:"w-full text-left text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"text-muted-foreground border-b bg-muted/40 text-xs uppercase tracking-wide",children:[l.jsx("th",{className:"px-3 py-2 font-medium",children:l.jsx(D,{id:"HX5SVx"})}),l.jsx("th",{className:"px-3 py-2 font-medium",children:l.jsx(D,{id:"+zy2Nq"})}),l.jsx("th",{className:"px-3 py-2 font-medium",children:l.jsx(D,{id:"NtQvjo"})}),l.jsx("th",{className:"px-3 py-2 text-right font-medium",children:l.jsx(D,{id:"a7u1N9"})})]})}),l.jsx("tbody",{children:a.map(T=>{const N=FOt(T.interval,T.intervalCount);return l.jsxs("tr",{className:"border-b last:border-b-0",children:[l.jsx("td",{className:"px-3 py-2 font-medium",children:T.productName}),l.jsx("td",{className:"px-3 py-2",children:l.jsx(hh,{label:T.productType==="addon"?p._({id:"iJ0kpe"}):p._({id:"GdgCoi"}),tone:T.productType==="addon"?"info":"default"})}),l.jsx("td",{className:"text-muted-foreground px-3 py-2",children:x[N]}),l.jsxs("td",{className:"px-3 py-2 text-right tabular-nums",children:[yt.currency(T.unitAmount,T.currency)," ",l.jsxs("span",{className:"text-muted-foreground",children:["/ ",_[N]]})]})]},T.id)})})]})}),l.jsxs("div",{className:"text-muted-foreground flex items-start gap-2 border-t pt-3 text-xs",children:[l.jsx(ds,{className:"mt-0.5 size-3.5 shrink-0"}),l.jsxs("span",{children:[w&&l.jsxs(l.Fragment,{children:[l.jsx(D,{id:"NyFPS2"})," "]}),l.jsx(D,{id:"HUvFgW"})]})]}),l.jsxs("div",{className:"space-y-3 rounded-md border border-red-500/30 bg-red-500/10 p-4",children:[l.jsx("h3",{className:"text-sm font-medium",children:l.jsx(D,{id:"fHXMPy"})}),c?l.jsxs("div",{className:"space-y-4",children:[l.jsx(ga,{variant:"warning",title:l.jsx(D,{id:"VB9J22"}),description:l.jsx(D,{id:"pCwG7/",values:{0:X_(i)}})}),l.jsxs(Oe,{variant:"secondary",size:"sm",className:"self-start",loading:h,onClick:d,children:[l.jsx($9,{className:"mr-1.5 size-4"}),l.jsx(D,{id:"H2UzKT"})]})]}):l.jsxs("div",{className:"space-y-3",children:[l.jsx("p",{className:"text-muted-foreground text-sm",children:l.jsx(D,{id:"Mtjc3V",values:{0:X_(i)}})}),l.jsxs(Oe,{variant:"ghost",size:"sm",className:"self-start text-red-600 hover:bg-red-50 hover:text-red-700",loading:h,onClick:u,children:[l.jsx(_4e,{className:"mr-1.5 size-4"}),l.jsx(D,{id:"glpqqJ"})]})]})]})]})]})}function zOt({result:e,onDismiss:t}){const{i18n:n,_:r}=Me();if(!e)return null;const{hostedInvoiceUrl:i}=e,s=async()=>{if(i)try{await navigator.clipboard.writeText(i),Re.success(n._({id:"uD//E9"}))}catch{Re.error(n._({id:"X5qfN2"}))}};return l.jsx(ga,{variant:"success",title:l.jsx(D,{id:"F9VGk2"}),className:"mb-6",description:l.jsxs("div",{className:"space-y-2 text-sm",children:[l.jsx("p",{children:l.jsx(D,{id:"5EhbpK"})}),l.jsxs("p",{children:[l.jsx("span",{className:"font-medium",children:l.jsx(D,{id:"U1j7lD"})})," ",e.invoiceId," ·"," ",l.jsx(hh,{label:e.collectionMethodTarget==="card"?n._({id:"RSOE1O"}):n._({id:"LrLE2V"}),tone:"info"})," ",e.sent?l.jsx(hh,{label:n._({id:"cPAWbl"}),tone:"success"}):l.jsx(hh,{label:n._({id:"BHqBOT"}),tone:"default"})]}),i?l.jsx("p",{className:"break-all font-mono text-xs",children:i}):l.jsx("p",{className:"text-muted-foreground",children:l.jsx(D,{id:"hD3Zv4"})}),e.hostedInvoiceUrlExpiresAt&&l.jsx("p",{className:"text-muted-foreground",children:l.jsx(D,{id:"RZL362",values:{0:new Date(e.hostedInvoiceUrlExpiresAt).toLocaleDateString()}})})]}),actions:l.jsxs("div",{className:"flex flex-wrap gap-2",children:[i&&l.jsxs(l.Fragment,{children:[l.jsxs(Oe,{size:"sm",onClick:s,children:[l.jsx(zh,{className:"mr-1.5 size-4"}),l.jsx(D,{id:"YGakGJ"})]}),l.jsxs(Oe,{size:"sm",variant:"secondary",onClick:()=>window.open(i,"_blank","noopener,noreferrer"),children:[l.jsx($d,{className:"mr-1.5 size-4"}),l.jsx(D,{id:"tPGCic"})]})]}),l.jsxs(Oe,{size:"sm",variant:"ghost",onClick:t,children:[l.jsx(pl,{className:"mr-1.5 size-4"}),l.jsx(D,{id:"1QfxQT"})]})]})})}function vie(){return new Date().toISOString().slice(0,10)}function $Ot({invoice:e,isOpen:t,isPending:n,onClose:r,onConfirm:i}){const[s,a]=b.useState(vie());return b.useEffect(()=>{t&&a(e?.duzpDate??vie())},[t,e?.duzpDate]),l.jsx(ui,{open:t,onOpenChange:o=>{!o&&!n&&r()},children:l.jsxs(Fi,{children:[l.jsxs(ks,{children:[l.jsx(Wi,{children:l.jsx(D,{id:"uFSiaW"})}),l.jsx(no,{children:l.jsx(D,{id:"aaC+XJ"})})]}),l.jsxs("div",{className:"space-y-4 py-2",children:[l.jsxs("div",{className:"text-muted-foreground flex items-start gap-2 rounded-md bg-muted/50 p-3 text-xs",children:[l.jsx(ds,{className:"mt-0.5 size-3.5 shrink-0"}),l.jsx("span",{children:l.jsx(D,{id:"wioX+Z",components:{0:l.jsx("strong",{})}})})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{htmlFor:"reissue-duzp",children:l.jsx(D,{id:"WCzwFd"})}),l.jsx(fn,{id:"reissue-duzp",type:"date",value:s,onChange:o=>a(o.target.value)}),l.jsx("p",{className:"text-muted-foreground text-xs",children:l.jsx(D,{id:"huWr5Z"})})]})]}),l.jsxs(wi,{children:[l.jsx(Oe,{variant:"secondary",onClick:r,disabled:n,children:l.jsx(D,{id:"dEgA5A"})}),l.jsxs(Oe,{onClick:()=>i(s),disabled:n||!s,children:[n&&l.jsx(Kr,{className:"mr-2 size-4 animate-spin"}),l.jsx(D,{id:"bXYFFa"})]})]})]})})}function BOt(e){switch(e){case"paid":return"success";case"open":return"warning";case"void":case"uncollectible":return"danger";default:return"default"}}function UOt(e,t){return e!=="open"?{label:"â",tone:"default"}:t===0?{label:"On time",tone:"success"}:t<=6?{label:`+${t}d reminder`,tone:"warning"}:t<=13?{label:`+${t}d escalation`,tone:"warning"}:{label:`+${t}d cancel due`,tone:"danger"}}function VOt({invoices:e,isLoading:t,onMarkPaid:n,isMarkingPaid:r,markingInvoiceId:i,onVoid:s,onVoidAndReissue:a,onRefreshLink:o,pendingInvoiceId:c,canManageInvoices:u=!0}){const{i18n:d,_:h}=Me(),[p,g]=b.useState(null),v=async x=>{try{await navigator.clipboard.writeText(x),Re.success(d._({id:"+o4jPp"}))}catch{Re.error(d._({id:"X5qfN2"}))}};return l.jsxs(gn,{title:d._({id:"F7nA5/"}),className:"mb-6",children:[t&&l.jsx("p",{className:"text-muted-foreground text-sm",children:l.jsx(D,{id:"OadiZr"})}),!t&&(!e||e.length===0)&&l.jsx("p",{className:"text-muted-foreground text-sm",children:l.jsx(D,{id:"1xU9bC"})}),!t&&!!e?.length&&l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full min-w-[720px] text-left text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"border-b",children:[l.jsx("th",{className:"py-2 pr-2",children:l.jsx(D,{id:"IuMGvq"})}),l.jsx("th",{className:"py-2 pr-2",children:l.jsx(D,{id:"hehnjM"})}),l.jsx("th",{className:"py-2 pr-2",children:l.jsx(D,{id:"Gpfctt"})}),l.jsx("th",{className:"py-2 pr-2",children:l.jsx(D,{id:"uAQUqI"})}),l.jsx("th",{className:"py-2 pr-2",children:l.jsx(D,{id:"AxkEtS"})}),l.jsx("th",{className:"py-2",children:l.jsx(D,{id:"7L01XJ"})})]})}),l.jsx("tbody",{children:e.map(x=>{const _=UOt(x.status,x.daysOverdue),w=c===x.invoiceId;return l.jsxs("tr",{className:`border-b last:border-b-0 ${x.status==="void"?"text-muted-foreground line-through":""}`,children:[l.jsx("td",{className:"py-2 pr-2",children:l.jsxs("span",{className:"flex items-center gap-1",children:[x.number||x.invoiceId,x.isReissue&&l.jsx(hh,{label:d._({id:"gcOJbx"}),tone:"info"})]})}),l.jsx("td",{className:"py-2 pr-2",children:yt.currency(x.status==="paid"?x.amountPaid:x.amountDue,x.currency)}),l.jsx("td",{className:"py-2 pr-2",children:x.dueDate?new Date(x.dueDate).toLocaleDateString():"â"}
1415),l.jsx("td",{className:"py-2 pr-2",children:l.jsx(hh,{label:x.status,tone:BOt(x.status)})}),l.jsx("td",{className:"py-2 pr-2",children:l.jsx(hh,{label:_.label,tone:_.tone})}),l.jsxs("td",{className:"py-2",children:[l.jsxs("div",{className:"flex items-center gap-1",children:[x.hostedInvoiceUrl&&l.jsxs(Oe,{size:"xs",variant:"ghost",onClick:()=>{x.hostedInvoiceUrl&&window.open(x.hostedInvoiceUrl,"_blank","noopener,noreferrer")},children:[l.jsx($d,{className:"mr-1 size-3.5"}),l.jsx(D,{id:"jpctdh"})]}),u&&n&&x.status==="open"&&l.jsxs(Oe,{size:"xs",variant:"ghost",className:"text-emerald-600 hover:bg-emerald-50 hover:text-emerald-700",loading:r&&i===x.invoiceId,onClick:()=>n(x.invoiceId),children:[l.jsx(Es,{className:"mr-1 size-3.5"}),l.jsx(D,{id:"f+klvT"})]}),(x.hostedInvoiceUrl||(u||o)&&x.status==="open")&&l.jsxs(Ou,{children:[l.jsx(Pu,{asChild:!0,children:l.jsx(Oe,{size:"icon-xs",variant:"ghost","aria-label":d._({id:"JcD7qf"}),loading:w,children:l.jsx(J1,{className:"size-4"})})}),l.jsxs(Mu,{align:"end",className:"min-w-44",children:[x.hostedInvoiceUrl&&l.jsxs(Er,{className:"flex items-center gap-2",onClick:()=>v(x.hostedInvoiceUrl??""),children:[l.jsx(zh,{className:"size-4"}),l.jsx(D,{id:"y1eoq1"})]}),o&&x.status==="open"&&l.jsxs(Er,{className:"flex items-center gap-2",onClick:()=>o(x.invoiceId),children:[l.jsx(Lo,{className:"size-4"}),l.jsx(D,{id:"C9P3Q9"})]}),u&&x.status==="open"&&l.jsxs(l.Fragment,{children:[a&&l.jsxs(Er,{className:"flex items-center gap-2",onClick:()=>g(x),children:[l.jsx($9,{className:"size-4"}),l.jsx(D,{id:"bXYFFa"})]}),s&&l.jsxs(l.Fragment,{children:[l.jsx(bh,{}),l.jsxs(Er,{className:"flex items-center gap-2 text-red-600",onClick:()=>s(x.invoiceId),children:[l.jsx(w6,{className:"size-4"}),l.jsx(D,{id:"ILtd3V"})]})]})]})]})]})]}),x.hostedInvoiceUrlExpiresAt&&l.jsx("p",{className:"text-muted-foreground mt-1 text-xs",children:l.jsx(D,{id:"C4C2FY",values:{0:new Date(x.hostedInvoiceUrlExpiresAt).toLocaleDateString()}})})]})]},x.invoiceId)})})]})}),l.jsx($Ot,{invoice:p,isOpen:p!==null,isPending:!!p&&c===p.invoiceId,onClose:()=>g(null),onConfirm:x=>{p&&(a?.(p.invoiceId,x),g(null))}})]})}function HOt({organizationId:e,currentValue:t,onUpdate:n}){const{i18n:r,_:i}=Me(),[s,a]=b.useState(!1),[o,c]=b.useState(t??""),u=Ae.organizations.linkStripeCustomer.useMutation({onSuccess:p=>{Re.success(p.reconciled?r._({id:"JgoMw+"}):r._({id:"XQzC/C"})),a(!1),c(p.stripeCustomerId??""),n()},onError:p=>{Re.error(r._({id:"ejgmbF",values:{0:p.message}}))}}),d=()=>{const p=o.trim();if(p&&!p.startsWith("cus_")){Re.error(r._({id:"wOVFIB"}));return}if(!p&&t){if(!window.confirm(r._({id:"IVWI5a"})))return;u.mutate({id:e,stripeCustomerId:null,confirmUnlink:!0});return}u.mutate({id:e,stripeCustomerId:p||null,confirmUnlink:!1})},h=()=>{c(t??""),a(!1)};return s?l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-sm font-medium",children:l.jsx(D,{id:"L0KIwZ"})}),l.jsx(fn,{value:o,onChange:p=>c(p.target.value),placeholder:"cus_...",className:"max-w-xs",disabled:u.isPending}),l.jsx(Oe,{variant:"ghost",size:"sm",onClick:d,disabled:u.isPending,"aria-label":r._({id:"tfDRzk"}),children:l.jsx(Es,{className:"size-4"})}),l.jsx(Oe,{variant:"ghost",size:"sm",onClick:h,disabled:u.isPending,"aria-label":r._({id:"dEgA5A"}),children:l.jsx(pl,{className:"size-4"})})]}):l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-sm font-medium",children:l.jsx(D,{id:"L0KIwZ"})}),t?l.jsx("code",{className:"rounded bg-muted px-2 py-0.5 font-mono text-xs",children:t}):l.jsx("span",{className:"text-sm font-medium text-amber-600",children:l.jsx(D,{id:"yG0zSJ"})}),l.jsx(Oe,{variant:"ghost",size:"icon-xs","aria-label":r._({id:"/cnuGU"}),onClick:()=>a(!0),children:l.jsx(ju,{className:"size-3.5"})})]})}function qOt({organizationId:e,canLinkStripe:t,stripeCustomerId:n,onStripeUpdate:r,daysUntilDue:i,onDaysUntilDueChange:s,duzpDate:a,onDuzpDateChange:o,hasOpenOverdueInvoice:c,canForceCancel:u,onForceCancel:d,isCancelling:h,disabled:p}){const{i18n:g,_:v}=Me();return l.jsx(gn,{title:g._({id:"Vwy3He"}),className:"mb-6",children:l.jsxs("div",{className:"space-y-6",children:[t&&l.jsxs("section",{className:"space-y-2",children:[l.jsx("h3",{className:"text-sm font-medium",children:l.jsx(D,{id:"zHJ27S"})}),l.jsx(HOt,{organizationId:e,currentValue:n,onUpdate:r})]}),l.jsxs("section",{className:"space-y-2",children:[l.jsx("h3",{className:"text-sm font-medium",children:l.jsx(D,{id:"8AOp8L"})}),l.jsx("p",{className:"text-muted-foreground text-xs",children:l.jsx(D,{id:"fB28iW"})}),l.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx(x1,{htmlFor:"days-until-due",label:l.jsx(D,{id:"Oth0KP"}),hint:l.jsx(D,{id:"jtnT7W"})}),l.jsx("input",{id:"days-until-due",type:"number",min:1,max:60,value:i,onChange:x=>s(Number.parseInt(x.target.value||"14",10)),className:xie,disabled:p})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(x1,{htmlFor:"duzp-date",label:l.jsx(D,{id:"Nmw2mr"}),hint:l.jsx(D,{id:"dz6UA6"})}),l.jsx("input",{id:"duzp-date",type:"date",value:a,onChange:x=>o(x.target.value),className:xie,disabled:p})]})]})]}),l.jsxs("section",{className:"space-y-4",children:[l.jsx("h3",{className:"text-sm font-medium",children:l.jsx(D,{id:"RRV6Ob"})}),l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsxs("span",{className:"text-muted-foreground inline-flex items-center gap-1.5 rounded-full bg-muted px-2.5 py-1 text-xs font-medium",children:[l.jsx(s4e,{className:"size-3.5"}),l.jsx(D,{id:"5pybIz"})]}),l.jsxs("span",{className:"text-muted-foreground inline-flex items-center gap-1.5 rounded-full bg-muted px-2.5 py-1 text-xs font-medium",children:[l.jsx(r4e,{className:"size-3.5"}),l.jsx(D,{id:"WMBGas"})]}),l.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-red-100 px-2.5 py-1 text-xs font-medium text-red-700 dark:bg-red-900/40 dark:text-red-300",children:[l.jsx(w6,{className:"size-3.5"}),l.jsx(D,{id:"2tvmlN"})]})]}),l.jsx("p",{className:"text-muted-foreground text-xs",children:l.jsx(D,{id:"AwRPVE"})}),c&&l.jsx(ga,{variant:"warning",title:l.jsx(D,{id:"cokk1h"}),description:l.jsx(D,{id:"SrTGE7"})}),l.jsxs(Oe,{variant:"ghost",size:"sm",className:"self-start text-red-600 hover:bg-red-50 hover:text-red-700",disabled:!u,loading:h,onClick:d,children:[l.jsx(w6,{className:"mr-1.5 size-4"}),l.jsx(D,{id:"FkMH4N"})]})]})]})})}function tEe({organizationId:e,capabilities:t}){const{i18n:n,_:r}=Me(),i=Ae.useUtils(),[s]=Ae.organizations.findOne.useSuspenseQuery({id:e}),a=s.currency??Ti.CZK,[o,c]=b.useState(null),[u,d]=b.useState(14),[h,p]=b.useState(""),{data:g,isLoading:v}=Ae.organizations.hasUsers.useQuery({id:e},{enabled:t.canLinkStripe}),{data:x}=Ae.billingInfo.getBillingInfo.useQuery({organizationId:e}),{data:_,isLoading:w}=Ae.subscriptions.getActive.useQuery({organizationId:e}),{data:S}=Ae.subscriptions.getPlanCatalog.useQuery({currency:a,organizationId:e}),{data:E}=Ae.subscriptions.listSubscriptionItems.useQuery({organizationId:e}),{data:T,isLoading:N,refetch:A}=Ae.subscriptions.listInvoices.useQuery({organizationId:e}),k=()=>
1415{A(),i.subscriptions.getActive.invalidate({organizationId:e}),i.subscriptions.listSubscriptionItems.invalidate({organizationId:e}),i.organizations.findOne.invalidate({id:e}),Fh(e)},j=Ae.subscriptions.assignPlan.useMutation(),R=Ae.subscriptions.markInvoicePaid.useMutation({onSuccess:()=>{Re.success(n._({id:"N8d1XD"})),k()},onError:fe=>{Re.error(n._({id:"azdOE1"}),{description:fe.message})}}),P=Ae.subscriptions.voidInvoice.useMutation({onSuccess:()=>{Re.success(n._({id:"bhUbqf"})),k()},onError:fe=>{Re.error(n._({id:"NRhTX1"}),{description:fe.message})}}),V=Ae.subscriptions.voidAndReissueInvoice.useMutation({onSuccess:fe=>{Re.success(n._({id:"1Immpn"}),{description:fe.sent?n._({id:"Ri9NRp"}):void 0}),k()},onError:fe=>{Re.error(n._({id:"a98+Zw"}),{description:fe.message})}}),U=Ae.subscriptions.refreshInvoiceUrl.useMutation({onSuccess:()=>{Re.success(n._({id:"vN8Csn"})),A()},onError:fe=>{Re.error(n._({id:"lNGk1H"}),{description:fe.message})}}),G=Ae.subscriptions.cancel.useMutation({onSuccess:()=>{Re.success(n._({id:"gjljdh"})),k()},onError:fe=>{Re.error(n._({id:"BAqxT3"}),{description:fe.message})}}),Q=Ae.subscriptions.cancel.useMutation({onSuccess:()=>{Re.success(n._({id:"HVDMoj"})),k()},onError:fe=>{Re.error(n._({id:"OuiY0T"}),{description:fe.message})}}),Z=Ae.subscriptions.resumeSubscription.useMutation({onSuccess:()=>{Re.success(n._({id:"Gw6v0j"})),k()},onError:fe=>{Re.error(n._({id:"Q6YDc5"}),{description:fe.message})}}),K=b.useMemo(()=>!!T?.some(fe=>fe.daysOverdue>0),[T]),te=t.canLinkStripe&&(v||!g)||j.isPending,ne=async(fe,xe)=>{const ke=await j.mutateAsync({organizationId:e,...fe,replaceExisting:xe});c({invoiceId:ke.invoiceId,invoiceStatus:ke.invoiceStatus,hostedInvoiceUrl:ke.hostedInvoiceUrl,hostedInvoiceUrlExpiresAt:ke.hostedInvoiceUrlExpiresAt,collectionMethodTarget:fe.collectionMethodTarget,sent:ke.sent}),Re.success(n._({id:"OcqqQI"})),k()},se=async fe=>{const xe=!!_?.stripeSubscriptionId;if(!(xe&&!window.confirm(n._({id:"Hlkq9k"}))))try{await ne(fe,xe)}catch{}},H=fe=>{window.confirm(n._({id:"ooaNWn"}))&&R.mutate({invoiceId:fe})},O=fe=>{window.confirm(n._({id:"KWrHfA"}))&&P.mutate({invoiceId:fe})},L=(fe,xe)=>{V.mutate({invoiceId:fe,duzpDate:xe,sendNow:!0})},M=fe=>{U.mutate({invoiceId:fe})},q=()=>{window.confirm(n._({id:"kFwp6+"}))&&G.mutate({organizationId:e,atPeriodEnd:!1})},X=()=>{window.confirm(n._({id:"mXI8oD"}))&&Q.mutate({organizationId:e,atPeriodEnd:!0})},J=()=>{Z.mutate({organizationId:e})},W=!!_?.cancelsAtPeriodEnd,re=P.isPending?P.variables?.invoiceId:V.isPending?V.variables?.invoiceId:U.isPending?U.variables?.invoiceId:void 0,ae=t.canForceCancel&&!!_?.tier&&_.tier!=="Free",ce=_?.metadata?.collectionMethodTarget,Te=o?.collectionMethodTarget??(ce==="card"||ce==="bank_transfer"?ce:null);return l.jsxs(l.Fragment,{children:[t.canLinkStripe&&!v&&g===!1&&!s.stripeCustomerId&&l.jsx(ga,{variant:"warning",title:l.jsx(D,{id:"oShGa5"}),className:"mb-6",description:l.jsx(D,{id:"4pJDYF"})}),l.jsxs("div",{className:"mb-6 grid grid-cols-1 gap-6 lg:grid-cols-2",children:[l.jsx(LOt,{tierName:_?.tier&&_.tier!=="Free"?_.tier:void 0,status:_?.status,billingInterval:_?.billingInterval??null,periodStart:_?.startDate??null,periodEnd:_?.endDate??null,paymentMethod:Te,items:E??[],isLoading:w,cancelsAtPeriodEnd:W,onCancelAtPeriodEnd:X,onResume:J,isCancelActionPending:Q.isPending||Z.isPending}),l.jsx(IOt,{organizationId:e,organization:s,subscription:_??null,canManualCredit:t.canManageInvoices,onUpdated:k})]}),l.jsx(kOt,{organizationId:e,orgCurrency:a,catalog:S,billingInfo:x,daysUntilDue:u,duzpDate:h,disabled:te,isAssigning:j.isPending,onAssign:se}),l.jsx(zOt,{result:o,onDismiss:()=>c(null)}),l.jsx(VOt,{invoices:T,isLoading:N,canManageInvoices:t.canManageInvoices,onMarkPaid:t.canManageInvoices?H:void 0,isMarkingPaid:R.isPending,markingInvoiceId:R.variables?.invoiceId,onVoid:t.canManageInvoices?O:void 0,onVoidAndReissue:t.canManageInvoices?L:void 0,onRefreshLink:M,pendingInvoiceId:re}),t.canManageInvoices&&l.jsx(qOt,{organizationId:e,canLinkStripe:t.canLinkStripe,stripeCustomerId:s.stripeCustomerId??null,onStripeUpdate:()=>{i.organizations.findOne.invalidate({id:e}),Fh(e)},daysUntilDue:u,onDaysUntilDueChange:d,duzpDate:h,onDuzpDateChange:p,hasOpenOverdueInvoice:K,can
1415ForceCancel:ae,onForceCancel:q,isCancelling:G.isPending,disabled:j.isPending})]})}const nEe=nr("/_baseLayout/partner-billing/$organizationId")({component:WOt,beforeLoad:async()=>X7(),loader:async({context:{trpcUtils:e},params:{organizationId:t}})=>e.organizations.findOne.ensureData({id:t})});function WOt(){const{organizationId:e}=nEe.useParams(),{i18n:t,_:n}=Me(),[r]=Ae.organizations.findOne.useSuspenseQuery({id:e});return l.jsx(wo,{title:`${t._({id:"R+w/Va"})} â ${r.name}`,breadcrumbs:[{label:t._({id:"jiE6Vn"}),to:"/organizations"},{label:r.name,to:"/organizations/$organizationId/edit",params:{organizationId:e}},{label:t._({id:"R+w/Va"}),to:"/partner-billing/$organizationId",params:{organizationId:e}}],children:l.jsx(tEe,{organizationId:e,capabilities:{canLinkStripe:!1,canManageInvoices:!1,canForceCancel:!1}})})}const GOt=nr("/_baseLayout/organizations/create")({component:KOt,beforeLoad:async({context:{accessGuard:e}})=>e([Jt.SuperAdmin,Jt.Admin])});function KOt(){const{i18n:e,_:t}=Me();return l.jsx(wo,{title:e._({id:"l7cyO1"}),breadcrumbs:[{label:e._({id:"jiE6Vn"}),to:"/organizations"},{label:e._({id:"l7cyO1"}),to:"/organizations/create"}],children:l.jsx(uSe,{})})}const YOt=nr("/_baseLayout/chats/create")({component:XOt,beforeLoad:async({context:{accessGuard:e}})=>e([Jt.SuperAdmin,Jt.Admin])});function XOt(){const{i18n:e,_:t}=Me();return l.jsx(wo,{title:e._({id:"c15Qqv"}),breadcrumbs:[{label:e._({id:"8Q+lLG"})},{label:e._({id:"c15Qqv"}),to:"/chats/create"}],children:l.jsx(M2e,{})})}const QOt=b.memo(function({data:t}){const{i18n:n,_:r}=Me(),{update:{mutateAsync:i},remove:{mutateAsync:s}}=FU(),{schema:a}=oi([{name:"firstName",label:n._({id:"V1EGGU"})},{name:"lastName",label:n._({id:"1ZaQUH"})},{name:"email",label:n._({id:"O3oNi5"}),required:!0,disabled:!0}],[r]);return l.jsxs(Ls,{initialData:t,createSchema:Jfe,updateSchema:p8.extend({email:B().email().max(255),confirmPassword:B().max(255).optional()}),onUpdate:async o=>{const{confirmPassword:c,email:u,...d}=o;return i(p8.parse({...d,id:t.id}))},onRemove:async({id:o})=>{await s({id:o})},showDelete:!1,children:[l.jsx(Ls.Col,{children:l.jsx(gn,{title:n._({id:"3dSIQs"}),children:l.jsx(Yr,{schema:a})})}),l.jsx(Ls.Col,{children:l.jsx(qU,{})}),l.jsx(Ls.Col,{children:l.jsx(AE,{data:t})})]})}),ZOt=nr("/_baseLayout/users/profile/")({component:JOt,loader:async({context:{trpcUtils:e}})=>e.users.findOne.ensureData({id:ir.getState().user.id})});function JOt(){const{i18n:e,_:t}=Me(),{user:n}=ps(),[r]=Ae.users.findOne.useSuspenseQuery({id:n.id});return l.jsx(wo,{title:`${e._({id:"vERlcd"})}`,breadcrumbs:[{label:e._({id:"vERlcd"}),to:"/users/profile"}],children:l.jsx(QOt,{data:r})})}const rEe=nr("/_authLayout/register/sent/")({component:()=>ePt(),validateSearch:e=>({email:e.email||""})});function ePt(){const{i18n:e,_:t}=Me(),{email:n}=rEe.useSearch();return n?l.jsxs("div",{className:"flex flex-col items-center gap-6",children:[l.jsx("h1",{className:"text-center text-2xl font-bold",children:e._({id:"v4fiSg"})}),l.jsxs("div",{className:"relative rounded-radius bg-primary/15 px-4 py-3",children:[l.jsx(Oj,{className:"size-[42px] text-primary"}),l.jsx("div",{className:"absolute -right-2 -top-2",children:l.jsx("div",{className:"flex size-6 items-center justify-center rounded-full bg-success",children:l.jsx(Es,{className:"size-4 text-white",strokeWidth:3})})})]}),l.jsx("div",{className:"text-center text-sm",children:e._({id:"O/CS7u"})}),l.jsx(Oe,{"data-cta":"admin-register-sent-back-to-login-button",variant:"primary",asChild:!0,children:l.jsx(ar,{to:"/login",className:"w-full",children:e._({id:"VCoEm+"})})})]}):l.jsx(Cj,{to:"/login"})}const iEe=nr("/_authLayout/forgotten-password/sent/")({component:tPt,validateSearch:e=>({email:e.email||""})});function tPt(){const{i18n:e,_:t}=Me(),{email:n}=iEe.useSearch();return n?l.jsxs("div",{className:"flex flex-col items-center gap-6",children:[l.jsx("h1",{className:"text-center text-2xl font-bold",children:e._({id:"v4fiSg"})}),l.jsxs("div",{className:"relative rounded-radius bg-primary/15 px-4 py-3",children:[l.jsx(Oj,{className:"size-[42px] text-primary"}),l.jsx("div",{className:"absolute -right-2 -top-2",children:l.jsx("div",{className:"flex size-6 items-center justify-center rounded-full bg-success",children:l.jsx(Es,{className:"size-4 text-white",strokeWidth:3})})})]}),l.jsx("div",{className:"text-center text-sm",children:e._({id:"1u+Ict"})}),l.jsx(Oe,{"data-cta":"admin-forgotten-password-sent-back-to-login-button",variant:"primary",asChild:!0,children:l.jsx(ar,{to:"/login",className:"w-full",children:e._({id:"VCoEm+"})})})]}):l.jsx(Cj,{to:"/login"})}const sEe=nr("/_baseLayout/users/$userId/edit")({component:nPt,loader:async({context:{trpcUtils:e},params:{userId:t}})=>e.users.findOne.ensureData({id:t})});function nPt(){const{userId:e}=sEe.useParams(),{i18n:t,_:n}=Me(),[r]=Ae.users.findOne.useSuspenseQuery({id:e});return l.jsx(wo,{title:`${t._({id:"ePK91l"})} - ${yt.fullName({firstName:r.firstName||r.email,lastName:r.lastName||""})}`,breadcrumbs:[{label:t._({id:"Sxm8rQ"}),to:"/users"},{label:yt.fullName({firstName:r.firstName||"",lastName:r.lastName||""}),to:"/users/$userId/edit",params:{userId:e}}],children:l.jsx(ZSe,{data:r})})}
1415const JL=nr("/_baseLayout/organizations/$organizationId/subscriptions")({component:rPt,beforeLoad:async({context:{accessGuard:e},params:{organizationId:t}})=>e([Jt.SuperAdmin,Jt.Admin],t),loader:async({context:{trpcUtils:e},params:{organizationId:t}})=>e.organizations.findOne.ensureData({id:t})});function rPt(){const{organizationId:e}=JL.useParams(),{i18n:t,_:n}=Me(),r=Ae.useUtils(),[i,s]=b.useState(new Date),a=JL.useLoaderData(),{data:o,isLoading:c,isError:u}=Ae.subscriptions.getActive.useQuery({organizationId:e},{refetchOnWindowFocus:!0,refetchInterval:!1}),d=b.useCallback(()=>{r.organizations.findOne.invalidate({id:e}),Fh(e),r.subscriptions.getActive.invalidate({organizationId:e}),s(new Date)},[e,r]),h=b.useCallback(()=>{Re.info(t._({id:"vQoOK4"})),d()},[d,n]);return b.useEffect(()=>{const p=new URLSearchParams(window.location.search),g=p.get("success"),v=p.get("canceled");g==="true"?(Re.success(l.jsx(D,{id:"ZypONr"}),{description:l.jsx(D,{id:"Q5vPLD"})}),window.history.replaceState({},document.title,window.location.pathname)):v==="true"&&(Re.info(l.jsx(D,{id:"yBUFWt"}),{description:l.jsx(D,{id:"AwKzss"})}),window.history.replaceState({},document.title,window.location.pathname))},[]),c?l.jsx("div",{className:"p-4 text-center",children:"Loading subscription..."}):u?l.jsx("div",{className:"text-destructive p-4 text-center",children:"Error loading subscription details."}):l.jsx(wo,{title:`${t._({id:"WVzGc2"})} - ${a.name}`,breadcrumbs:[{label:a.name,to:"/organizations/$organizationId/payments",params:{organizationId:e}},{label:t._({id:"WVzGc2"}),to:"/organizations/$organizationId/subscriptions",params:{organizationId:e}}],children:l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-end gap-2 text-xs text-gray-500",children:[l.jsx(D,{id:"IEsdiH",values:{0:i.toLocaleTimeString()}}),l.jsx(Oe,{"data-cta":"admin-organizations-subscriptions-refresh-button",variant:"ghost",size:"icon-sm",onClick:h,title:t._({id:"Y+SGin"}),children:l.jsx(Lo,{className:"size-3"})})]}),o&&l.jsx(Q4t,{organization:a,activeSubscription:o,onUpdate:d})]})})}function iPt({organizationId:e}){const{i18n:t,_:n}=Me(),[r]=Ae.organizations.findOne.useSuspenseQuery({id:e}),i=r.currency??Ti.USD,s=i===Ti.CZK?100:5,a=i===Ti.CZK?"KÄ":"$",[o,c]=b.useState(s*2),[u,d]=b.useState(!1),h=Ae.subscriptions.topUpBalance.useMutation({onSuccess:g=>{d(!1),g?.url?window.location.href=g.url:(console.error("No checkout URL returned from server"),Re.error(t._({id:"SlfejT"}),{description:t._({id:"O9Ttt4"})}))},onError:g=>{console.error("Error creating balance top-up checkout:",g),d(!1),Re.error(t._({id:"SlfejT"}),{description:g.message})}}),p=()=>{if(o<s){Re.error(t._({id:"SlfejT"}),{description:t._({id:"YjQVi6",values:{minAmount:s,currencySymbol:a}})});return}d(!0);const g=window.location.origin,v=window.location.pathname,x=`${g}${v}?topup=success`,_=`${g}${v}?topup=cancelled`;h.mutate({organizationId:e,amount:o,successUrl:x,cancelUrl:_})};return l.jsxs("div",{className:"space-y-4",children:[l.jsx("p",{className:"text-sm text-gray-500",children:l.jsx(D,{id:"AGzcna"})}),l.jsx("div",{className:"flex flex-col gap-4",children:l.jsxs("div",{children:[l.jsx("label",{htmlFor:"fundAmount",className:"mb-1 block text-sm font-medium",children:l.jsx(D,{id:"Wnh4TY",values:{currencySymbol:a}})}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(fn,{id:"fundAmount",type:"number",min:s,value:o,onChange:g=>c(Number(g.target.value)),className:"w-32"}),l.jsx(Oe,{"data-cta":"admin-balance-top-up-proceed-button",onClick:p,disabled:u||o<s,loading:u,children:l.jsx(D,{id:"d4emKr"})})]})]})})]})}const yie=(e,t,n,r)=>{if(e===qr.Active&&t){const i=n?new Date(n).toLocaleDateString(r):"the end of the period";return{label:"Active (Cancels Soon)",variant:"warning",description:l.jsx(D,{id:"F0vQg7",values:{formattedEndDate:i}})}}switch(e){case qr.Active:return{label:"Active",variant:"success",description:l.jsx(D,{id:"hIT2WM"})};case qr.PastDue:return{label:"Payment Failed",variant:"danger",description:l.jsx(D,{id:"gVcK1c"})};case qr.Canceled:return{label:"Canceled",variant:"warning",description:l.jsx(D,{id:"qg56Ux"})};case qr.Incomplete:return{label:"Payment Pending",variant:"info",description:l.jsx(D,{id:"FUpVdo"})};case qr.IncompleteExpired:return{label:"Payment Required",variant:"danger",description:l.jsx(D,{id:"wAdQYb"})};case qr.Trialing:return{label:"Trial",variant:"info",description:l.jsx(D,{id:"kiWJp8"})};case qr.Unpaid:return{label:"Unpaid",variant:"danger",description:l.jsx(D,{id:"qQqVWS"})};default:return{label:"Free",variant:"muted",description:l.jsx(D,{id:"PYSlYo"})}}};function sPt({subscription:e,organization:t}){const{i18n:n,i18n:r,_:i}=Me(),s=t.id,a=!e||e.tier===Pr.Free,o=a?n._({id:"2POOFK"}):e?.tier,c=a?yie(null,null,null,r.locale):yie(e?.status,e?.cancelsAtPeriodEnd,e?.endDate,r.locale),{createBillingPortal:u,isLoading:d}=Y4(s??""),h=async()=>
1415{if(s)try{const{url:v}=await u({});v?window.open(v,"_blank"):Re.error(n._({id:"QkuWUR"}))}catch(v){console.error("Error opening billing portal:",v),Re.error(n._({id:"Ya8afW"}))}},p=!a&&t.stripeCustomerId&&!e?.cancelsAtPeriodEnd&&(e?.status===qr.PastDue||e?.status===qr.Unpaid||e?.status===qr.Incomplete||e?.status===qr.IncompleteExpired),g=!a&&t.stripeCustomerId&&e?.status===qr.Active&&e?.cancelsAtPeriodEnd;return l.jsxs("div",{className:"rounded-md border bg-gray-50 p-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm text-gray-600",children:l.jsx(D,{id:"ujb7Qp"})}),l.jsx("div",{className:"text-lg font-semibold",children:o})]}),l.jsx(En,{variant:c.variant,children:c.label})]}),l.jsx("div",{className:"mt-2 text-sm text-gray-600",children:c.description}),p&&l.jsx("div",{className:"mt-2 text-right",children:l.jsxs(Oe,{size:"sm",variant:c.variant==="info"?"secondary":"danger",onClick:h,disabled:!s||d,children:[l.jsx($d,{className:"mr-1.5 size-4"}),l.jsx(D,{id:"Tr9VMu"})]})}),g&&l.jsx("div",{className:"mt-2 text-right",children:l.jsxs(Oe,{"data-cta":"admin-subscription-status-display-resume-button",size:"sm",variant:"secondary",onClick:h,disabled:!s||d,children:[l.jsx($d,{className:"mr-1.5 size-4"}),l.jsx(D,{id:"NS8Iir"})]})})]})}const aEe=nr("/_baseLayout/organizations/$organizationId/payments")({component:aPt,beforeLoad:async({context:{accessGuard:e},params:{organizationId:t}})=>e([Jt.SuperAdmin,Jt.Admin],t),loader:async({context:{trpcUtils:e},params:{organizationId:t}})=>{await Promise.all([e.subscriptions.getActive.ensureData({organizationId:t}),e.organizations.findOne.ensureData({id:t})])}});function aPt(){const{organizationId:e}=aEe.useParams(),{i18n:t,_:n}=Me(),r=Ae.useUtils(),[i]=Ae.subscriptions.getActive.useSuspenseQuery({organizationId:e}),[s]=Ae.organizations.findOne.useSuspenseQuery({id:e}),{isLoading:a,createBillingPortal:o,updateSubscription:c}=Y4(e),u=()=>{r.subscriptions.getActive.invalidate({organizationId:e}),r.organizations.findOne.invalidate({id:e}),Fh(e)},d=async()=>{if(!s.stripeCustomerId){Re.error(t._({id:"a2gI8M"}));return}try{const h=await o({returnUrl:window.location.href});h.url?window.location.href=h.url:Re.error(t._({id:"uOxMNJ"}))}catch(h){console.error("Error calling createBillingPortal:",h),Re.error(t._({id:"8lLYnZ",values:{0:h instanceof Error?h.message:"Unknown error"}}))}};return l.jsx(ja,{roles:[Jt.SuperAdmin,Jt.Admin],children:l.jsxs("div",{className:"space-y-6 pb-8",children:[l.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[l.jsx("h2",{className:"text-2xl font-semibold",children:l.jsx(D,{id:"Up66Pp"})}),s.stripeCustomerId&&l.jsx(Oe,{"data-cta":"admin-organizations-payments-manage-billing-button",variant:"secondary",onClick:d,disabled:a||!s.stripeCustomerId,icon:a?l.jsx(Kr,{className:"mr-2 size-4 animate-spin"}):l.jsx($d,{className:"mr-2 size-4"}),children:l.jsx(D,{id:"7hYaha"})})]}),i?.status===qr.Canceled&&l.jsx(ga,{variant:"info",title:t._({id:"wEuxV2"}),className:"mb-6",children:l.jsx(D,{id:"sjThkS"})}),i&&(i.status===qr.PastDue||i.status===qr.Unpaid)&&l.jsx(ga,{variant:"danger",title:t._({id:"sALJh0"}),className:"mb-6",children:l.jsx(D,{id:"0V4cX1"})}),l.jsxs("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2",children:[l.jsxs("div",{className:"space-y-6",children:[l.jsxs(gn,{title:t._({id:"ujb7Qp"}),children:[l.jsx(sPt,{organization:s,subscription:i}),l.jsx("div",{className:"mt-4",children:l.jsx(Oe,{"data-cta":"admin-organizations-payments-change-plan-button",variant:"secondary",size:"sm",asChild:!0,children:l.jsx(ar,{to:"/organizations/$organizationId/subscriptions",params:{organizationId:e},children:l.jsx(D,{id:"wRtBJP"})})})})]}),l.jsx(gn,{title:t._({id:"Ts/FQo"}),children:l.jsx(eEe,{organization:s,subscription:i})})]}),l.jsxs("div",{className:"space-y-6",children:[i&&i.tier!==Pr.Free&&l.jsxs(gn,{title:t._({id:"xzrzQH"}),children:[l.jsx("div",{children:l.jsx(iPt,{organizationId:e,onBalanceAdded:u})}),l.jsx("p",{className:"mt-3 text-xs text-gray-500",children:l.jsx(D,{id:"fm5uSW"})})]}),i&&i.tier!==Pr.Free&&l.jsx(gn,{title:t._({id:"+qc6XG"}),children:l.jsx(JSe,{subscription:i,currency:s.currency,isSaving:a,onSave:async h=>{await c(h)},onUpdate:u})})]})]})]})})}const oEe=["billingInfo","workingHours","subscriptions","tierConfig"],lEe=nr("/_baseLayout/organizations/$organizationId/edit")({component:oPt,beforeLoad:async({context:{accessGuard:e},params:{organizationId:t}}
1415)=>e([Jt.SuperAdmin,Jt.Admin],t),loader:async({context:{trpcUtils:e},params:{organizationId:t}})=>{await Promise.all([e.organizations.findOne.ensureData({id:t,populate:oEe}),e.subscriptions.getActive.ensureData({organizationId:t})])}});function oPt(){const{organizationId:e}=lEe.useParams(),{i18n:t,_:n}=Me(),{user:r,currentOrganizationId:i}=ps(),s=r?.role===Jt.SuperAdmin,a=wE(r),o=e===i,[c]=Ae.organizations.findOne.useSuspenseQuery({id:e,populate:oEe}),u=c.subscriptions.find(d=>d.status===qr.Active);return l.jsxs(wo,{title:`${t._({id:"KzQFvE"})} - ${c.name}`,breadcrumbs:[{label:t._({id:"jiE6Vn"}),to:"/organizations"},{label:c.name,to:"/organizations/$organizationId/edit",params:{organizationId:e}}],actions:l.jsxs(l.Fragment,{children:[!s&&o&&l.jsx(Oe,{"data-cta":"admin-organizations-edit-self-serve-payments-button",variant:"secondary",asChild:!0,children:l.jsxs(ar,{to:"/organizations/$organizationId/payments",params:{organizationId:e},children:[l.jsx(T2,{className:"size-4"}),l.jsx(D,{id:"H0ShEF"})]})}),!s&&a&&!c.isPartnerOrganization&&l.jsx(Oe,{"data-cta":"admin-organizations-edit-partner-billing-button",variant:"primary",asChild:!0,children:l.jsxs(ar,{to:"/partner-billing/$organizationId",params:{organizationId:e},children:[l.jsx(A2,{className:"size-4"}),l.jsx(D,{id:"b1xdQC"})]})}),l.jsxs(ja,{roles:[Jt.SuperAdmin],children:[l.jsx(Oe,{"data-cta":"admin-organizations-edit-manage-custom-plan-button",variant:"primary",asChild:!0,children:l.jsxs(ar,{to:"/organizations/$organizationId/plan-management",params:{organizationId:e},children:[l.jsx(A2,{className:"size-4"}),l.jsx(D,{id:"b1xdQC"})]})}),l.jsx(Oe,{"data-cta":"admin-organizations-edit-manage-payments-button",variant:"secondary",asChild:!0,icon:!0,children:l.jsxs(ar,{to:"/organizations/$organizationId/payments",params:{organizationId:e},children:[l.jsx(T2,{className:"size-4"}),l.jsx(D,{id:"znjfWV"})]})})]})]}),children:[l.jsx(uSe,{organizationId:e,data:c}),c&&l.jsx(ja,{roles:[Jt.SuperAdmin],children:l.jsxs(gn,{title:t._({id:"q7LTEN"}),variant:"danger",className:"mt-6",children:[l.jsxs("div",{className:"grid grow grid-cols-1 gap-6 xl:grid-cols-3",children:[u&&l.jsx(Z4t,{organizationId:c.id,currentSubscription:u}),l.jsx(eRt,{organizationId:c?.id})]}),l.jsx(W4t,{clientOrganizationId:e}),l.jsx(J4t,{organizationId:e,currency:c.currency})]})})]})}const Q_=3,lPt=500;function cPt({onLookupSuccess:e,label:t,placeholder:n}){const{i18n:r,_:i}=Me(),s=Bh(),[a,o]=b.useState(""),c=Hy(a,lPt),[u,d]=b.useState([]),[h,p]=b.useState(!1),[g,v]=b.useState(!1),[x,_]=b.useState(-1),[w,S]=b.useState(null),E=b.useRef(null),T=Ae.billingInfo.lookupCzechCompany.useMutation(),N=K=>/^(\d *){8}$/.test(K.replaceAll(/\s/g,"")),A=K=>K.replaceAll(/\s/g,""),k=b.useCallback(async K=>{if(K===w){u.length>0&&v(!0);return}p(!0),v(!0);try{const te=await T.mutateAsync({query:K}),ne=te&&te.length>0?te:null;d(ne||[]),ne===null&&K.length>=Q_,S(K)}catch(te){Re.error(r._({id:"vL8/CD",values:{0:te.message}})),d([])}finally{p(!1)}},[T,i,w,u.length]);b.useEffect(()=>{if(c.length===0)return;const K=A(c);N(K)?K!==w?k(K):u.length>0&&v(!0):c.trim().length>=Q_?c.trim()!==w?k(c.trim()):u.length>0&&v(!0):(d([]),v(!1),w!==null&&S(null))},[c,w,u.length]);const j=K=>{s.setValue("isCompany",!0),setTimeout(()=>{const te=s.getFormState().values,ne={...te,isCompany:!0,companyName:K.companyName||"",registrationNumber:K.registrationNumber||(N(a)?A(a):""),vatId:K.vatId||"",addressLine1:K.addressLine1||"",addressLine2:K.addressLine2||te.addressLine2||"",city:K.city||"",postalCode:K.postalCode||"",country:K.country||"CZ"};console.log("Attempting to prefill (step 2) with:",ne),s.setValues(ne),o(K.companyName||""),d([]),v(!1),_(-1),S(K.companyName||""),e&&e(K),Re.success(r._({id:"V1Ug4a",values:{0:K.companyName}}))},0)},R=K=>{const te=K.target.value;o(te),te.length===0&&(d([]),v(!1),S(null))},P=K=>{j(K)},V=()=>{setTimeout(()=>{E.current?.contains(document.activeElement)||v(!1),_(-1)},150)},U=()=>{(a.trim().length>=Q_||N(A(a)))&&(u.length>0||w===a.trim()&&u.length>0?v(!0):a.trim())},G=K=>{if(!(!g||u.length===0))switch(K.key){case"ArrowDown":K.preventDefault(),_(te=>te<u.length-1?te+1:te);break;case"ArrowUp":K.preventDefault(),_(te=>te>0?te-1:0);break;case"Enter":x>=0&&x<u.length?(K.preventDefault(),j(u[x])):u.length===1&&(a.length>=Q_||N(A(a)))&&(K.preventDefault(),j(u[0]));break;case"Escape":K.preventDefault(),v(!1),_(-1);break}},[Q,Z]=b.useState("");return l.jsxs("div",{className:"mb-6 space-y-3 rounded-md border border-input bg-background/5",children:[l.jsx(ot,{htmlFor:"ares-universal-lookup",className:"text-base font-semibold text-foreground",children:t||l.jsx(D,{id:"r8hKlY"})}),l.jsx("div",{className:"flex items-start gap-x-3",children:l.jsxs("div",{className:"relative grow space-y-1",children:[l.jsx("input",{id:"ares-universal-lookup",type:"text",value:a,onChange:R,onBlur:V,onFocus:U,onKeyDown:G,placeholder:n||r._({id:"CMY4Du"}),className:"border- w-full rounded-md border bg-input px-3 py-2 text-sm r
1415ing-offset-background placeholder:text-slate-400 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",autoComplete:"off","aria-expanded":g,"aria-controls":"ares-suggestions-list",ref:E,"aria-activedescendant":x>=0?`suggestion-${x}`:void 0}),g&&l.jsxs("ul",{id:"ares-suggestions-list",className:"absolute z-20 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm",role:"listbox",children:[h&&l.jsx("li",{className:"cursor-default select-none px-4 py-2 text-gray-700",children:l.jsx(D,{id:"5Uelbu"})}),!h&&u.length===0&&(a.length>=Q_||N(A(a)))&&w&&l.jsx("li",{className:"cursor-default select-none px-4 py-2 text-gray-700",children:l.jsx(D,{id:"/Jz9f7"})}),!h&&u.map((K,te)=>l.jsxs("li",{id:`suggestion-${te}`,onClick:()=>P(K),onMouseDown:ne=>ne.preventDefault(),className:`relative cursor-pointer select-none py-2 pl-3 pr-9 text-gray-900 ${x===te?"bg-primary/10 text-primary":"hover:bg-accent"}`,role:"option","aria-selected":x===te,children:[K.companyName," (",K.registrationNumber,")",l.jsx("span",{className:"text-muted-foreground block text-xs",children:K.addressLine1})]},K.registrationNumber||`suggestion-${te}-${K.companyName}`))]})]})}),g&&u.length>0&&l.jsx("div",{className:"sr-only","aria-live":"polite",children:r._({id:"Es1rMZ",values:{0:u.length}})}),l.jsx("div",{className:"ml-2 pt-1 text-xs text-gray-500",children:l.jsx(D,{id:"/N9vHq"})})]})}const uPt=[{name:"Czech Republic",code:"CZ"},{name:"Slovakia",code:"SK"}];function dPt(e){const{i18n:t,_:n}=Me(),r=e?.initialIsCompany??!1,{schema:i}=oi([{name:"isCompany",label:t._({id:"C720G1"}),type:"checkbox",uiControl:"switch",defaultValue:r},{$relevant:{$when:({formState:s})=>!!s?.values?.isCompany,$fields:[{name:"companyName",label:t._({id:"zGbOVS"}),type:"text"},{name:"registrationNumber",label:t._({id:"6EsylU"}),type:"text"},{name:"vatId",label:t._({id:"K8cpk2"}),type:"text"}]}},{name:"addressLine1",label:t._({id:"POdIrN"}),type:"text",required:!0},{name:"addressLine2",label:t._({id:"ud6xUW"}),type:"text"},{name:"city",label:t._({id:"3wV73y"}),type:"text",required:!0},{name:"postalCode",label:t._({id:"dJW40d"}),type:"text",required:!0},{name:"country",label:t._({id:"JNCzPW"}),type:"select",required:!0,options:uPt.reduce((s,{name:a,code:o})=>(s[o]=a,s),{})},{name:"billingEmail",type:"text",label:t._({id:"dcbSIc"}),description:t._({id:"Ad6VFK"}),tooltip:t._({id:"Ad6VFK"}),uiProps:{type:"email"}},{name:"invoiceCcEmail",type:"text",label:t._({id:"5dgEcV"}),description:t._({id:"BD6z4Z"}),tooltip:t._({id:"BD6z4Z"}),uiProps:{type:"email"}}],[n,r]);return{billingFormSchema:i}}const fPt=_e({redirect:B().optional(),tier:B().optional(),interval:B().optional()}),hPt=Eqe._def.schema.omit({organizationId:!0}),pPt=hPt.refine(e=>e.isCompany?!!e.companyName&&e.companyName.trim().length>0:!0,{message:"Company name is required when billing to a company.",path:["companyName"]}),Gk=nr("/_baseLayout/organizations/$organizationId/billing")({validateSearch:fPt,component:mPt,beforeLoad:async({context:{accessGuard:e},params:{organizationId:t}})=>e([Jt.SuperAdmin,Jt.Admin],t),loader:async({context:{trpcUtils:e},params:{organizationId:t}})=>{const n=await e.organizations.findOne.ensureData({id:t}),r=await e.billingInfo.getBillingInfo.ensureData({organizationId:t}),i=await e.partnerLinks.getClientRep.ensureData({organizationId:t});return{organizationData:n,initialBillingInfo:r,attributedRepEmail:i.attributedRepEmail}}});function mPt(){const{organizationId:e}=Gk.useParams(),t=Gk.useSearch(),{i18n:n,_:r}=Me(),i=gs(),s=Ae.useUtils(),{organizationData:a,initialBillingInfo:o,attributedRepEmail:c}=Gk.useLoaderData(),{billingFormSchema:u}=dPt({initialIsCompany:o?.isCompany??!1}),d=b.useMemo(()=>({isCompany:o?.isCompany??!1,companyName:o?.companyName??"",registrationNumber:o?.registrationNumber??"",vatId:o?.vatId??"",addressLine1:o?.addressLine1??"",addressLine2:o?.addressLine2??"",city:o?.city??"",postalCode:o?.postalCode??"",country:o?.country??"",billingEmail:o?.billingEmail??null,invoiceCcEmail:o?o.invoiceCcEmail??null:c}),[o,c]),h=Ae.billingInfo.createOrUpdateBillingInfo.useMutation({onSuccess:async()=>
1415{if(Re.success(l.jsx(D,{id:"53/ste"})),await s.billingInfo.getBillingInfo.invalidate({organizationId:e}),await s.organizations.findOne.invalidate({id:e}),t.redirect){const _=new URL(t.redirect,window.location.origin);t.tier&&_.searchParams.set("tier",t.tier),t.interval&&_.searchParams.set("interval",t.interval),i({to:_.pathname+_.search})}else i({to:"/organizations/$organizationId/edit",params:{organizationId:e}})},onError:_=>{Re.error(l.jsx(D,{id:"upHozQ",values:{0:_.message}}))}}),p=b.useCallback(_=>{console.log("ARES data selected, prefill handled by AresLookup component:",_)},[]),g=_=>{const w=_.values,S=pPt.safeParse(w);if(!S.success){const T=S.error.errors.map(N=>`${N.path.join(".")}: ${N.message}`).join(` 1416`);Re.error(T);return}const E={...S.data,organizationId:e,companyName:S.data.isCompany?S.data.companyName:null,registrationNumber:S.data.isCompany?S.data.registrationNumber:null,vatId:S.data.isCompany?S.data.vatId:null,addressLine2:S.data.addressLine2||null,billingEmail:S.data.billingEmail||null};h.mutate(E)},v=()=>{if(t.redirect){const _=new URL(t.redirect,window.location.origin);i({to:_.pathname+_.search})}else i({to:"/organizations/$organizationId/edit",params:{organizationId:e}})},x=t.redirect?n._({id:"ZKd2SR"}):n._({id:"hZcs1m"});return l.jsx(wo,{title:`${n._({id:"ErhgkI"})} - ${a?.name||"Organization"}`,breadcrumbs:[{label:a?.name||n._({id:"ucgZ0o"}),to:"/organizations/$organizationId/edit",params:{organizationId:e}},{label:n._({id:"ErhgkI"}),to:"/organizations/$organizationId/billing",params:{organizationId:e}}],children:l.jsx(ja,{roles:[Jt.SuperAdmin,Jt.Admin],children:l.jsxs(Mx,{onSubmit:g,className:"space-y-6",initialValues:d,children:[l.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2",children:[l.jsx("div",{className:"md:col-span-1",children:l.jsx(gn,{children:l.jsx(cPt,{onLookupSuccess:p})})}),l.jsx("div",{className:"space-y-4 md:col-span-1",children:l.jsx(gn,{children:l.jsx(Yr,{schema:u})})})]}),l.jsxs("div",{className:"mt-6 flex justify-between space-x-3",children:[l.jsx(Oe,{"data-cta":"admin-organization-billing-cancel-button",type:"button",variant:"secondary",icon:l.jsx(Tj,{size:18}),onClick:v,disabled:h.isPending,children:l.jsx(D,{id:"dEgA5A"})}),l.jsx(Oe,{"data-cta":"admin-organization-billing-submit-button",type:"submit",variant:"success",loading:h.isPending,children:x})]})]})})})}async function gPt(e){if(!navigator.clipboard){const t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.left="-99999px",document.body.append(t),t.select();try{document.execCommand("copy")}finally{t.remove()}return}await navigator.clipboard.writeText(e)}const cEe=["documentsCount","embeddingsCount","voiceConfig","omnichannelConfig"],uEe=nr("/_baseLayout/chats/$chatId/edit")({component:xPt,beforeLoad:async({context:{accessGuard:e}})=>e([Jt.SuperAdmin,Jt.Admin]),loader:async({context:{trpcUtils:e},params:{chatId:t}})=>e.chats.findOne.ensureData({id:t,populate:cEe})});function xPt(){const{chatId:e}=uEe.useParams(),[t,n]=b.useState(null),{i18n:r,_:i}=Me(),[s]=Ae.chats.findOne.useSuspenseQuery({id:e,populate:cEe});return l.jsx(wo,{title:`${r._({id:"ywFj2D"})} - ${s.name}`,actions:l.jsxs(l.Fragment,{children:[l.jsx(Oe,{"data-cta":"admin-chats-edit-share-button",onClick:()=>{gPt(`${os.playgroundUrl}/${e}`).then(()=>{Re.success(r._({id:"y1eoq1"}),{description:r._({id:"ieI0cO"})})})},children:r._({id:"Z8lGw6"})}),l.jsx("div",{ref:n})]}),breadcrumbs:[{label:r._({id:"iEQQyu"})},{label:s.name,to:"/chats/$chatId/edit",params:{chatId:e}}],children:l.jsx(M2e,{data:s,actionsTarget:t})})}function vPt({field:e,fieldKeyLocked:t=!1,index:n,total:r,onChange:i,onRemove:s,onDuplicate:a,onMoveUp:o,onMoveDown:c}){const{i18n:u,_:d}=Me(),[h,p]=b.useState(!t&&!e.label),[g,v]=b.useState(!1),x=w=>{const S={...e,...w};h&&!t&&w.label!==void 0&&w.name===void 0&&(S.name=LSe(w.label)),w.type&&w.type!=="select"&&(S.options=void 0),i(S)},_=(e.options??[]).join(", ");return l.jsxs("div",{className:"rounded-radius border border-border p-4",children:[l.jsxs("div",{className:"mb-3 flex items-center justify-between gap-2",children:[l.jsx("span",{className:"text-sm font-medium text-muted-fg",children:l.jsx(D,{id:"n43FLi",values:{0:n+1}})}),l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx(Oe,{size:"sm",variant:"ghost",disabled:n===0,onClick:o,title:u._({id:"QyioBP"}),children:l.jsx(kj,{className:"size-4"})}),l.jsx(Oe,{size:"sm",variant:"ghost",disabled:n>=r-1,onClick:c,title:u._({id:"3Ib6FN"}),children:l.jsx(Xd,{className:"size-4"})}),l.jsx(Oe,{size:"sm",variant:"ghost",onClick:a,title:u._({id:"euc6Ns"}),children:l.jsx(zh,{className:"size-4"})}),l.jsx(Oe,{size:"sm",variant:"ghost",onClick:s,title:u._({id:"t/YqKh"}),children:l.jsx(bo,{className:"size-4 text-danger"})})]})]}),l.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{children:l.jsx(D,{id:"87a/t/"})}),l.jsx(fn,{value:e.label,onChange:w=>x({label:w.target.value}),placeholder:u._({id:"0mrUwt"})})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{children:l.jsx(D,{id:"pS4vWt"})}),l.jsx(fn,{value:e.name,readOnly:t,onChange:w=>{t||(p(!1),x({name:w.target.value}))},placeholder:u._({id:"eUtKF9"})})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{children:l.jsx(D,{id:"+zy2Nq"})}),l.jsx(tr,{value:e.type,onValueChange:w=>x({type:w}),children:LIt.map(w=>l.jsx(Yt,{value:w,children:w}
1416,w))})]}),l.jsxs("div",{className:"flex items-end gap-2 pb-1",children:[l.jsx(Di,{checked:e.required,onCheckedChange:w=>x({required:w})}),l.jsx(ot,{children:l.jsx(D,{id:"TMLAx2"})})]}),l.jsxs("div",{className:"space-y-1.5 md:col-span-2",children:[l.jsx(ot,{children:l.jsx(D,{id:"hx1ePY"})}),l.jsx(fn,{value:e.placeholder??"",onChange:w=>x({placeholder:w.target.value||void 0})})]}),e.type==="select"?l.jsxs("div",{className:"space-y-1.5 md:col-span-2",children:[l.jsx(ot,{children:l.jsx(D,{id:"8GGZWV"})}),l.jsx(fn,{value:_,onChange:w=>x({options:w.target.value.split(",").map(S=>S.trim()).filter(Boolean)}),placeholder:u._({id:"wK8A8I"})})]}):null]}),l.jsx("button",{type:"button",className:"mt-3 text-xs text-primary hover:underline",onClick:()=>v(w=>!w),children:g?l.jsx(D,{id:"9PQysm"}):l.jsx(D,{id:"go8EIs"})}),g?l.jsxs("div",{className:"mt-2 space-y-1.5",children:[l.jsx(ot,{children:l.jsx(D,{id:"QX9rZJ"})}),l.jsx(fn,{value:e.validation??"",onChange:w=>x({validation:w.target.value||void 0}),placeholder:u._({id:"HubEXk"})})]}):null]})}function yPt({fields:e,savedKeys:t=[],onChange:n}){const r=b.useRef(new WeakMap),i=d=>{let h=r.current.get(d);return h||(h={id:crypto.randomUUID(),locked:t.includes(d.name)},r.current.set(d,h)),h},s=e.length>=dy,a=(d,h)=>{r.current.set(h,i(e[d])),n(e.map((p,g)=>g===d?h:p))},o=d=>{n(e.filter((h,p)=>p!==d))},c=d=>{if(s)return;const h=e[d],p=XL({...h,name:`${h.name}_copy`.slice(0,60),label:`${h.label} (copy)`});n([...e.slice(0,d+1),p,...e.slice(d+1)])},u=(d,h)=>{const p=d+h;if(p<0||p>=e.length)return;const g=[...e];[g[d],g[p]]=[g[p],g[d]],n(g)};return l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("span",{className:"text-sm font-medium",children:[l.jsx(D,{id:"vF68cg"})," ",l.jsxs("span",{className:"text-muted-fg",children:["(",e.length,"/",dy,")"]})]}),l.jsx(Oe,{size:"sm",variant:"secondary",disabled:s,onClick:()=>n([...e,XL()]),children:l.jsx(D,{id:"Va3xJe"})})]}),e.map((d,h)=>l.jsx(vPt,{fieldKeyLocked:i(d).locked,field:d,index:h,total:e.length,onChange:p=>a(h,p),onRemove:()=>o(h),onDuplicate:()=>c(h),onMoveUp:()=>u(h,-1),onMoveDown:()=>u(h,1)},i(d).id))]})}function bPt({artifact:e}){return l.jsx("div",{className:"sticky top-4",children:l.jsx(hbe,{artifact:e,previewMode:!0})})}function _Pt(e){if(!e.name.trim())return"Name is required.";if(e.description.trim().length<10)return"Description must be at least 10 characters.";if(!e.formTitle.trim())return"Form title is required.";if(e.fields.length===0)return"Add at least one field.";if(e.fields.length>dy)return`Maximum ${dy} fields allowed.`;const t=new Set;for(const n of e.fields){if(!n.label.trim())return"Every field needs a label.";if(!n.name.trim())return"Every field needs a name.";if(t.has(n.name))return`Duplicate field name "${n.name}".`;if(t.add(n.name),n.type==="select"&&(!n.options||n.options.length<2))return`Select field "${n.label}" needs at least two options.`}return null}function wPt(e){return x2({name:e.name,description:e.description,formTitle:e.formTitle,formDescription:e.formDescription??"",submitLabel:e.submitLabel,presentation:e.presentation,disableDismiss:e.disableDismiss,fields:e.fields,availableToAllChats:e.availableToAllChats,chatIds:e.chatIds??[],isActive:e.isActive})}function dEe({formToolId:e,initialTemplateId:t}){const{i18n:n,_:r}=Me(),i=gs(),s=!!e,{create:a,update:o}=BSe(),{data:c,isLoading:u}=Ae.clientSideFormTools.findOne.useQuery({id:e},{enabled:s}),{data:d}=Ae.chats.findAll.useQuery({pagination:{pageSize:1e3},fields:["id","name"]}),[h,p]=b.useState(x2()),[g,v]=b.useState(!1);b.useEffect(()=>{s&&c&&!g&&(p(wPt(c)),v(!0))},[c,g,s]),b.useEffect(()=>{if(!s&&t&&!g){const A=zIt(t);A&&p(x2(A.defaults)),v(!0)}},[t,g,s]);const x=(A,k)=>p(j=>({...j,[A]:k})),_=A=>p(k=>({...k,chatIds:k.chatIds.includes(A)?k.chatIds.filter(j=>j!==A):[...k.chatIds,A]})),w=b.useMemo(()=>FIt(h),[h]),S=async()=>{const A=_Pt(h);if(A){Re.error(A);return}const k={name:h.name.trim(),description:h.description.trim(),formTitle:h.formTitle.trim(),formDescription:h.formDescription.trim()||void 0,submitLabel:h.submitLabel.trim()||"Submit",presentation:h.presentation,disableDismiss:h.disableDismiss,fields:h.fields,availableToAllChats:h.availableToAllChats,chatIds:h.availableToAllChats?[]:h.chatIds,isActive:h.isActive};try{if(s&&e)await o.mutateAsync({id:e,...k}),Re.success(n._({id:"+mpFDg"}));else{const j=await a.mutateAsync(k);Re.success(n._({id:"/vYfNi"})),await i({to:"/agent-tools/client-side/$formToolId/edit",params:{formToolId:j.id}})}}catch(j){Re.error(j instanceof Error?j.message:n._({id:"bWMIUv"}))}},E=A=>{p(x2(A.defaults))},T=d?.items??[],N=a.isPending||o.isPending;return s&&u?l.jsx(wo,{title:n._({id:"9FqQD7"}),breadcrumbs:[{label:n._({id:"R19Dod"}),to:"/agent-tools",search:{tab:"client-side"}},{label:n._({id:"9FqQD7"})}],children:l.jsx("p",{className:"text-sm text-muted-fg",children:l.jsx(D,{id:"Pwqkdw"})})}):l.jsxs(wo,{title:s?n._({id:"9FqQD7"}):n._({id:"1yc4Pd"}),breadcrumbs:[{label:n._({id:"R19Dod"}),to:"/agent-tools",search:{tab:"client-side"}},{label:s?n._({id:"9FqQD7"}):n._({id:"1yc4Pd"})}],actions:l.jsxs("div",{className:"flex gap-2",children:[l.jsx(Oe,{variant:"secondary",onClick:()=>i({to:"/agent-tools",search:{tab:"client-side"}}),children:l.jsx(D,{id:"dEgA5A"})}),l.jsx(Oe,{loading:N,onClick:S,children:l.jsx(D,{id:"tfDRzk"})})]}),children:[s?null:l.jsx("div",{className:"mb-8",children:l.jsx($It,{onSelect:E})}),l.jsxs("div",{className:"grid gap-8 xl:grid-cols-[minmax(0,1fr)_360px]",children:[l.jsxs("div",{className:"space-y-8",children:[l.jsxs("section",{className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx("h2",{className:"text-base font-semibold",children:l.jsx(D,{id:"OnZjEm"})}),l.jsx("p",{className:"text-sm text-muted-fg",children:l.jsx(D,{id:"P5YdAm"})})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{htmlFor:"tool-name",children:l.jsx(D,{id:"S/vw4z"})}),l.jsx(fn,{id:"tool-name",value:h.name,onChange:A=>x("name",A.target.value),placeholder:n._({id:"mwe+xZ"})})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{htmlFor:"tool-description",children:l.jsx(D,{id:"Nu4oKW"})}),l.jsx(xh,{id:"tool-description",value:h.description,onChange:A=>x("description",A.target.value),rows:4,placeholder:n._({id:"alR9PB"})}),l.jsx("p",{className:"text-xs text-muted-fg",children:l.jsx(D,{id:"o7rsBW"})})]}),l.jsxs("div",{className:"flex flex-wrap items-center gap-6",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Di,{checked:h.isActive,onCheckedChange:A=>x("isActive",A)}),l.jsx(ot,{children:l.jsx(D,{id:"F6pfE9"})})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Di,{checked:h.availableToAllChats,onCheckedChange:A=>x("availableToAllChats",A)}
1416),l.jsx(ot,{children:l.jsx(D,{id:"XZ0GCe"})})]})]}),h.availableToAllChats?null:l.jsxs("div",{className:"space-y-2 rounded-radius border border-border p-3",children:[l.jsx(ot,{children:l.jsx(D,{id:"ugsxzE"})}),l.jsx("div",{className:"max-h-40 space-y-2 overflow-y-auto",children:T.map(A=>l.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[l.jsx("input",{type:"checkbox",checked:h.chatIds.includes(A.id),onChange:()=>_(A.id)}),A.name]},A.id))})]})]}),l.jsxs("section",{className:"space-y-4",children:[l.jsx("div",{children:l.jsx("h2",{className:"text-base font-semibold",children:l.jsx(D,{id:"XpkWQN"})})}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{htmlFor:"form-title",children:l.jsx(D,{id:"t68C3p"})}),l.jsx(fn,{id:"form-title",value:h.formTitle,onChange:A=>x("formTitle",A.target.value)})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{htmlFor:"form-description",children:l.jsx(D,{id:"5UB+jt"})}),l.jsx(xh,{id:"form-description",value:h.formDescription,onChange:A=>x("formDescription",A.target.value),rows:2})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{htmlFor:"submit-label",children:l.jsx(D,{id:"lOPchq"})}),l.jsx(fn,{id:"submit-label",value:h.submitLabel,onChange:A=>x("submitLabel",A.target.value)})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(ot,{children:l.jsx(D,{id:"FOoDGS"})}),l.jsx("div",{className:"flex flex-wrap gap-4",children:["inline","overlay"].map(A=>l.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[l.jsx("input",{type:"radio",name:"presentation",checked:h.presentation===A,onChange:()=>x("presentation",A)}),A==="inline"?l.jsx(D,{id:"b4c98c"}):l.jsx(D,{id:"Fjc6wH"})]},A))})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Di,{checked:h.disableDismiss,onCheckedChange:A=>x("disableDismiss",A)}),l.jsx(ot,{children:l.jsx(D,{id:"jxVAb+"})})]}),l.jsx(yPt,{fields:h.fields,savedKeys:c?.fields.map(A=>A.name),onChange:A=>x("fields",A)})]})]}),l.jsx(bPt,{artifact:w})]})]})}const fEe=nr("/_baseLayout/agent-tools/client-side/new")({component:SPt,validateSearch:e=>({template:typeof e.template=="string"?e.template:void 0})});function SPt(){const{template:e}=fEe.useSearch();return l.jsx(dEe,{initialTemplateId:e})}const hEe=nr("/_baseLayout/organizations/$organizationId/plan-management/")({component:EPt,beforeLoad:async({context:{accessGuard:e}})=>e([Jt.SuperAdmin]),loader:async({context:{trpcUtils:e},params:{organizationId:t}})=>e.organizations.findOne.ensureData({id:t})});function EPt(){const{organizationId:e}=hEe.useParams(),{i18n:t,_:n}=Me(),[r]=Ae.organizations.findOne.useSuspenseQuery({id:e});return l.jsx(wo,{title:`${t._({id:"sgWEw1"})} â ${r.name}`,breadcrumbs:[{label:t._({id:"jiE6Vn"}),to:"/organizations"},{label:r.name,to:"/organizations/$organizationId/edit",params:{organizationId:e}},{label:t._({id:"sgWEw1"}),to:"/organizations/$organizationId/plan-management",params:{organizationId:e}}],children:l.jsx(tEe,{organizationId:e,capabilities:{canLinkStripe:!0,canManageInvoices:!0,canForceCancel:!0}})})}function WU(){const e=Ae.useUtils(),t=Ae.feeds.create.useMutation({onSuccess:async()=>e.feeds.findAll.invalidate()}),n=Ae.feeds.update.useMutation({onSuccess:async(s,{id:a})=>{await Promise.all([e.feeds.findAll.invalidate(),e.feeds.findOne.invalidate({id:a})])}}),r=Ae.feeds.delete.useMutation({onSuccess:async(s,{id:a})=>e.feeds.findAll.invalidate()});return{setProcessingPaused:Ae.feeds.setProcessingPaused.useMutation({onSuccess:async(s,{id:a})=>{await Promise.all([e.feeds.findAll.invalidate(),e.feeds.findOne.invalidate({id:a})])}}),create:t,update:n,remove:r}}const $v=(e,t=2)=>`${e.low.toFixed(t)}â${e.high.toFixed(t)} USD`,pEe=b.memo(function({open:t,onOpenChange:n,chatId:r,feedId:i}){const{i18n:s,_:a}=Me(),o=Ir(),{create:{mutateAsync:c,isPending:u},update:{mutateAsync:d,isPending:h},remove:{mutateAsync:p}}=WU(),g=!!i,{data:v}=Ae.feeds.findOne.useQuery({id:i},{enabled:t&&g}),[x,_]=b.useState(""),[w,S]=b.useState(""),[E,T]=b.useState(lh.Heureka),[N,A]=b.useState(Vn.Monthly),[k,j]=b.useState(!1),[R,P]=b.useState(!1),[V,U]=b.useState(!1),[G,Q]=b.useState(!1),[Z,K]=b.useState(),te=Ae.feeds.estimateCost.useMutation(),[ne,se]=b.useState(),H=JSON.stringify([i,r,w.trim(),E,k,R,V]),O=ne?.key===H?ne.value:void 0,L=async()=>{try{const W=await te.mutateAsync({feedId:i,chatId:r,url:w.trim(),source:E,enrichProducts:k,scrapeProductPages:R,annotateImages:V});se({key:H,value:W})}catch{Re.error(s._({id:"SbMgbQ"}))}};b.useEffect(()=>{Q(!1),se(void 0)},[t,i]),b.useEffect(()=>{t&&(g&&v&&v.id===i?(_(v.name),S(v.url),T(v.source),A(v.updateFrequency??Vn.Monthly),j(v.enrichProducts),P(v.scrapeProductPages),U(v.annotateImages),K(i)):(_(""),S(""),T(lh.Heureka),A(Vn.Monthly),j(!1),P(!1),U(!1),K(void 0)))},[t,g,v,i]);const M=!g||v?.id===i&&Z===i,q=M&&x.trim().length>0&&w.trim().length>0,X=async()=>
1416{if(!q||u||h)return;const W={name:x.trim(),url:w.trim(),source:E,updateFrequency:N,enrichProducts:k,scrapeProductPages:R,annotateImages:V};try{g?(await d({id:i,...W,scheduledAt:pWe(N)}),Re.success(s._({id:"0XGrfA"}))):(await c({...W,chat:r}),Re.success(s._({id:"luzp+d"}))),n(!1)}catch{Re.error(g?s._({id:"jJtLLI"}):s._({id:"jNVcq6"}))}},J=async()=>{if(!(!g||!M))try{await p({id:i}),n(!1)}catch{Re.error(s._({id:"w3qmTg"}))}};return l.jsxs(l.Fragment,{children:[l.jsx(ui,{open:t,onOpenChange:n,children:l.jsxs(Fi,{className:"max-h-[90vh] w-[600px] overflow-y-auto",children:[l.jsx(ks,{children:l.jsx(Wi,{children:g?l.jsx(D,{id:"rFyn8K"}):l.jsx(D,{id:"fnt/wy"})})}),l.jsxs("div",{className:"space-y-4 py-4",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{htmlFor:"feedName",children:l.jsx(D,{id:"6YtxFj"})}),l.jsx(fn,{id:"feedName",value:x,onChange:W=>_(W.target.value)})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{htmlFor:"feedUrl",children:l.jsx(D,{id:"PKG6me"})}),l.jsx(fn,{id:"feedUrl",value:w,onChange:W=>S(W.target.value)})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{htmlFor:"feedSource",children:l.jsx(D,{id:"+lyh9H"})}),l.jsx(tr,{value:E,onValueChange:W=>T(W),children:Object.values(lh).map(W=>l.jsx(Yt,{value:W,children:o.feedSource[W]},W))})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ot,{htmlFor:"feedUpdateFrequency",children:l.jsx(D,{id:"PZPjEW"})}),l.jsx(tr,{value:N,onValueChange:W=>A(W),children:Object.values(Vn).map(W=>l.jsx(Yt,{value:W,children:o.updateFrequency[W]},W))})]}),l.jsxs("div",{className:"space-y-3 rounded-md border border-border p-3",children:[l.jsxs("div",{className:"flex items-center justify-between gap-4",children:[l.jsxs("div",{className:"space-y-0.5",children:[l.jsx(ot,{htmlFor:"feedEnrichProducts",children:l.jsx(D,{id:"UokusV"})}),l.jsx("p",{className:"text-xs text-gray-500",children:l.jsx(D,{id:"8LPxrs"})})]}),l.jsx(Di,{id:"feedEnrichProducts",checked:k,onCheckedChange:j})]}),l.jsxs("div",{className:"flex items-center justify-between gap-4",children:[l.jsxs("div",{className:"space-y-0.5",children:[l.jsx(ot,{htmlFor:"feedScrapeProductPages",children:l.jsx(D,{id:"Whaag3"})}),l.jsx("p",{className:"text-xs text-gray-500",children:l.jsx(D,{id:"ACgR9p"})})]}),l.jsx(Di,{id:"feedScrapeProductPages",disabled:!k,checked:R,onCheckedChange:P})]}),l.jsxs("div",{className:"flex items-center justify-between gap-4",children:[l.jsxs("div",{className:"space-y-0.5",children:[l.jsx(ot,{htmlFor:"feedAnnotateImages",children:l.jsx(D,{id:"kGtIFa"})}),l.jsx("p",{className:"text-xs text-gray-500",children:l.jsx(D,{id:"Q1Io63"})})]}),l.jsx(Di,{id:"feedAnnotateImages",disabled:!k,checked:V,onCheckedChange:U})]}),l.jsx("p",{className:"text-xs text-gray-500",children:l.jsx(D,{id:"5hBJ6T"})})]}),l.jsxs("div",{className:"space-y-2 rounded-md border border-border p-3",children:[l.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l.jsx(ot,{children:l.jsx(D,{id:"DCtHnq"})}),l.jsx(Oe,{variant:"ghost",outline:!0,onClick:L,loading:te.isPending,disabled:!M||!w.trim()||te.isPending,children:l.jsx(D,{id:"qfYhx3"})})]}),l.jsx("p",{className:"text-xs text-gray-500",children:l.jsx(D,{id:"HLHT4F"})}),O&&l.jsxs("div",{className:"space-y-1 text-sm","aria-live":"polite",children:[l.jsxs("p",{children:[l.jsx(D,{id:"N3MNAj"})," ",O.productCount]}),l.jsxs("p",{children:[l.jsx(D,{id:"deFDqb"})," ",$v(O.perProduct.enrichment,4)]}),l.jsxs("p",{children:[l.jsx(D,{id:"TNzIxH"})," ",$v(O.perProduct.embeddings,4)]}),l.jsxs("p",{children:[l.jsx(D,{id:"/QVujg"})," ",$v(O.perProduct.scraping,4)]}),l.jsxs("p",{children:[l.jsx(D,{id:"jRQbf7"})," ",$v(O.perProduct.images,4)]}),l.jsxs("p",{children:[l.jsx(D,{id:"fUWUpf"})," ",$v(O.perProductTotal,4)]}),l.jsxs("p",{className:"font-semibold",children:[l.jsx(D,{id:"cw9din"})," ",$v(O.total)]}),l.jsx("p",{className:"text-xs text-gray-500",children:O.enrichmentBasis==="history"?l.jsx(D,{id:"t15kiK"}):l.jsx(D,{id:"nNsHrs"})}),l.jsx("p",{className:"text-xs text-gray-500",children:l.jsx(D,{id:"LUGwBP"})})]})]})]}),l.jsxs(wi,{children:[g&&l.jsx(Oe,{variant:"danger",outline:!0,className:"mr-auto",disabled:!M,onClick:()=>Q(!0),children:l.jsx(D,{id:"cnGeoo"})}),l.jsx(Oe,{variant:"ghost",outline:!0,onClick:()=>n(!1),children:l.jsx(D,{id:"dEgA5A"})}),l.jsx(Oe,{onClick:X,loading:u||h,disabled:!q,children:l.jsx(D,{id:"tfDRzk"})})]})]})}),l.jsx(tb,{open:G&&M,onOpenChange:Q,onConfirm:J,description:s._({id:"TET/eb"})})]})});function mEe(e){const t=e.importMetadata?.totalProducts,n=e.status===Qs.Processing||e.status===Qs.Pending,r=e.importMetadata?.productImport?.total??0;return{found:t,awaiting:n&&t!==void 0?Math.max(0,t-r):0}}function gEe({feed:e,showCounts:t=!0}){const{i18n:n,_:r}=Me(),i=Ir(),s=e.importMetadata,{found:a,awaiting:o}=mEe(e),c=e.status===Qs.Processing||e.status===Qs.Pending,u=e.status===Qs.Embedding,d=s?.productImport?.parserSkipped??0,h=s?.productImport?.failed??0,p=s?.phase,g={downloading:n._({id:"qJKVbD"}),parsing:n._({id:"Wk8qCm"}),importing:n._({id:"lSY1vz"}),scraping:n._({id:"FaiHdE"}),enriching:n._({id:"RcGTtf"}),embedding:n._({id:"O0i7ti"})};let v=i.feedHealth[e.health]??i.feedStatus[e.status];e.status===Qs.Done&&(d>0||h>0)&&(v=n._({id:"RUmHqh"})),e.status===Qs.Pending&&(v=n._({id:"Q5cEPL"})),e.status===Qs.Processing&&(v=p?g[p]:n._({id:"tJ7l5H"})),u&&(v=g.embedding),e.processingPaused&&p&&(v=g[p]);const x=e.processingPaused&&(e.status===Qs.Processing||Number(e.embeddingProductsCount)>0),_=!e.processingPaused&&(c||u);return l.jsxs("div",{className:"flex flex-col gap-1 py-1 text-xs",role:"status",children:[l.jsxs("span",{className:"flex items-center gap-1.5 font-medium",children:[(_||x)&&l.jsx(Kr,{className:"size-3 animate-spin","aria-hidden":!0}),e.processingPaused?x?n._({id:"zRuEdv"}):n._({id:"URAE3q"}):v]}),e.processingPaused&&l.jsx("span",{className:"text-gray-500",children:v}),x&&l.jsx("span",{className:"text-gray-500",children:n._({id:"I5z/JV"})}),d>0&&l.jsxs("div",{className:"text-amber-700",children:[l.jsxs("span",{children:[n._({id:"YvfECf"}),": ",d]}),l.jsx("p",{children:n._({id:"2KfExD"})}),!!s?.parserErrors?.length&&l.jsxs("details",{children:[l.jsx("summary",{children:n._({id:"E0krP4"})}),l.jsx("ul",{children:s.parserErrors.map((w,S)=>l.jsxs("li",{children:[w.externalId,": ",w.message]},`${w.externalId}-${S}`))})]})]}),h>0&&l.jsxs("span",{className:"text-amber-700",children:[n._({id:"du4Pdb"}),": ",h]}),t&&a!==void 0&&l.jsxs("span",{className:"text-gray-500",children:[n._({id:"gxYz5c"}),": ",a]}),t&&o>0&&l.jsxs("span",{className:"text-gray-500",children:[n._({id:"oqAAjH"}),": ",o]})]})}const Z_=Jm();function CPt({feed:e,chatId:t,onOpenSettings:n,onDelete:r,onRefresh:i}){const{i18n:s,_:a}=Me(),{setProcessingPaused:o}=WU(),c=[Qs.Pending,Qs.Processing,Qs.Embedding].includes(e.status),[u,d]=b.useState(!1);return l.jsxs(fC,{onDelete:r,children:[(c||e.processingPaused)&&l.jsx(cn,{title:e.processingPaused?s._({id:"HfEYNj"}):s._({id:"0dYPYI"}),children:l.jsx(Oe,{variant:"ghost",outline:!0,size:"icon-xs","aria-label":e.processingPaused?s._({id:"HfEYNj"}):s._({id:"4fPvr7"}),disabled:o.isPending,onClick:()=>o.mutate({id:e.id,paused:!e.processingPaused}),children:e.processingPaused?l.jsx(z9,{className:"size-4"}):l.jsx(uIe,{className:"size-4"})})}),l.jsx(tb,{open:u,onOpenChange:d,onConfirm:i,title:s._({id:"Yju0mk"}),description:s._({id:"6mV8Mc",values:{0:e.name}}),confirmLabel:s._({id:"lCF0wC"}),confirmVariant:"primary",successTitle:s._({id:"d4i/+U"}),successDescription:s._({id:"x+wr/M"})}),l.jsx(cn,{title:s._({id:"mSjQYg"}),children:l.jsx(Oe,{"data-cta":"admin-feed-attributes-button",variant:"ghost",outline:!0,size:"icon-xs",asChild:!0,children:l.jsx(ar,{to:"/chats/$chatId/feeds/$feedId/attributes",params:{chatId:t,feedId:e.id},"aria-label":s._({id:"mSjQYg"}),children:l.jsx(doe,{className:"size-4"})})})}),l.jsx(cn,{title:s._({id:"Tz0i8g"}),children:l.jsx(Oe,{"data-cta":"admin-feed-settings-button",variant:"ghost",outline:!0,size:"icon-xs",onClick:()=>n(e.id),children:l.jsx(Dj,{className:"size-4"})})}),l.jsx(cn,{title:s._({id:"8RYNR1"}),children:l.jsx(Oe,{"data-cta":"admin-feed-refresh-data-button",disabled:c||e.processingPaused,variant:"ghost",className:"text-info",outline:!0,size:"icon-xs",onClick:()=>d(!0),children:l.jsx(JS,{className:"size-4"})})})]})}function TPt({chatId:e,onOpenSettings:t}){const{i18n:n,_:r}=Me(),{remove:{mutateAsync:i},update:{mutateAsync:s}}=WU(),a=Ir();return b.useMemo(()=>[Z_.accessor(o=>o.name,{id:"name",header:n._({id:"6YtxFj"}),cell:({row:o})=>{const c=o.original;return l.jsxs("div",{className:"flex min-w-64 items-center gap-3",children:[l.jsx(_S,{size:"sm",className:"text-danger",Icon:eE}),l.jsxs("div",{className:"flex flex-col gap-0.5",children:[l.jsx("p",{className:"break-all font-medium leading-tight",children:c.name}),c.url&&l.jsx("p",{className:"hidden text-xs text-gray-600 md:block",children:c.url}),(c.health===ou.Failed||c.health===ou.Stale||c.health===ou.Degraded)&&l.jsx(cn,{title:c.importMetadata?.productErrors?.map(u=>`${u.externalId}: ${u.message}`).join(` 1417`),children:l.jsx("span",{className:c.health===ou.Failed?"text-xs text-danger":"text-xs text-amber-600",children:c.importMetadata?.lastError})})]})]})},meta:{sortable:"name"}}),Z_.accessor(o=>o.source,{id:"source",header:n._({id:"wdxz7K"}),cell:({row:o})=>l.jsx(En,{variant:"primary",outline:!0,size:"sm",children:a.feedSource[o.original.source]}),meta:{sortable:"source"}}),Z_.accessor(o=>o.finishedImportAt,{id:"finishedImportAt",header:n._({id:"NJBmGw"}),cell:o=>o.getValue()?yt.date(o.getValue(),Zn.DateTime):"-",meta:{sortable:"finishedImportAt"}}),Z_.display({id:"productsStatus",header:n._({id:"uAQUqI"}),cell:({row:o})=>{const c=o.original.id,u=[{key:"pending",status:bi.Pending,color:"bg-yellow-400",count:o.original.pendingProductsCount,label:n._({id:"UbRKMZ"})},{key:"embedding",status:bi.Embedding,color:"bg-blue-400",count:o.original.embeddingProductsCount,label:n._({id:"JXYcL6"})},{key:"done",status:bi.Done,color:"bg-green-400",count:o.original.doneProductsCount,label:n._({id:"DPfwMq"})},{key:"failed",status:bi.Failed,color:"bg-red-400",count:o.original.failedProductsCount,label:n._({id:"7Bj3x9"})}];return l.jsxs("div",{"data-table":"prevent",className:"flex flex-col gap-1 rounded-md border bg-gray-50 px-3 py-1.5",children:[l.jsx(gEe,{feed:o.original}),u.map(d=>l.jsxs(ar,{"data-cta":`admin-feed-products-${d.key}-link`,to:"/chats/$chatId/feeds/$feedId/products",params:{chatId:e,feedId:c},search:{status:d.status},className:"flex items-center gap-1.5 text-xs hover:underline",children:[l.jsx("div",{className:`size-2 roun
1417ded-full ${d.color}`}),l.jsx("span",{className:"font-medium",children:d.count}),l.jsx("span",{className:"text-gray-500",children:d.label})]},d.key))]})},meta:{align:"center"}}),Z_.display({id:"actions",header:n._({id:"7L01XJ"}),cell:({row:o})=>l.jsx(CPt,{feed:o.original,chatId:e,onOpenSettings:t,onDelete:()=>i({id:o.original.id}),onRefresh:()=>s({id:o.original.id,status:Qs.Pending,importMetadata:null,content:null,scheduledAt:new Date})}),meta:{align:"center"}})],[r,e,a.feedSource,i,s,t])}const xEe=b.memo(function({foundCount:t,awaitingImportCount:n=0,pendingCount:r,embeddingCount:i,doneCount:s,failedCount:a,activeStatusFilter:o,onStatusFilterChange:c}){const{i18n:u,_:d}=Me(),h=Ir(),p=r+i+s+a,g=p>0?Math.round(s/p*100):0,v=p>0&&s===p&&a===0,x=!!c,_=N=>c?.(o===N?void 0:N),w=o===bi.Done,S=o===bi.Failed,E=b.useMemo(()=>[{id:bi.Done,title:h.shopProductStatus[bi.Done],count:s,isError:!1},{id:bi.Embedding,title:h.shopProductStatus[bi.Embedding],count:i,isError:!1},{id:bi.Pending,title:h.shopProductStatus[bi.Pending],count:r,isError:!1},{id:bi.Failed,title:h.shopProductStatus[bi.Failed],count:a,isError:!0}],[h,s,i,r,a]),T=l.jsxs(l.Fragment,{children:[t!==void 0&&l.jsxs("span",{className:"text-xs tabular-nums text-muted-fg",children:[u._({id:"gxYz5c"}),": ",l.jsx("strong",{children:t})]}),l.jsxs("button",{type:"button",disabled:!x,className:$e("text-sm tabular-nums","rounded px-1",x&&"cursor-pointer hover:bg-muted/50",w&&"bg-accent font-medium ring-1 ring-primary"),onClick:x?()=>_(bi.Done):void 0,children:[l.jsx("span",{children:u._({id:"DPfwMq"})})," ",l.jsxs("strong",{children:[s,"/",p]})]}),a>0&&l.jsxs(En,{variant:"danger",size:"sm",className:$e(x&&"cursor-pointer",S&&"ring-2 ring-danger"),onClick:x?()=>_(bi.Failed):void 0,children:[a," ",u._({id:"7l15X4"})]}),r>0&&l.jsxs("span",{className:"text-xs text-muted-fg",children:[u._({id:"UbRKMZ"}),": ",r]}),i>0&&l.jsxs("span",{className:"text-xs text-muted-fg",children:[h.shopProductStatus[bi.Embedding],":"," ",i]})]});return l.jsx(NSe,{icon:eE,label:u._({id:"MELaPC"}),progressValue:s,progressMax:p>0?p:100,completePercent:g,isFullyComplete:v,summary:T,children:l.jsxs("section",{children:[l.jsx("p",{className:"mb-0.5 text-[10px] font-semibold uppercase tracking-wide text-muted-fg",children:u._({id:"kRXcWA"})}),l.jsxs("div",{className:"flex flex-col",children:[t!==void 0&&l.jsx(g2,{title:u._({id:"gxYz5c"}),count:t,isTotal:!0}),n>0&&l.jsx(g2,{title:u._({id:"oqAAjH"}),count:n}),E.map(N=>{const A=N.count===0,k=!A&&o===N.id;return l.jsx(g2,{title:N.title,count:N.count,highlight:k?"solid":"none",isError:N.isError,isInactive:A,onClick:A||!x?void 0:()=>_(N.id)},N.id)})]})]})})}),APt=100,vEe=nr("/_baseLayout/chats/$chatId/feeds/")({component:kPt,loader:async({context:{trpcUtils:e},params:{chatId:t}})=>e.chats.findOne.ensureData({id:t})});function kPt(){const{chatId:e}=vEe.useParams(),{i18n:t,_:n}=Me(),[r]=Ae.chats.findOne.useSuspenseQuery({id:e}),{data:i}=Ae.feeds.findAll.useQuery({where:{chat:e},populate:["pendingProductsCount","embeddingProductsCount","doneProductsCount","failedProductsCount"],pagination:{pageSize:APt}},{refetchInterval:5e3}),s=b.useMemo(()=>(i?.items??[]).reduce((_,w)=>({pendingCount:_.pendingCount+Number(w.pendingProductsCount),embeddingCount:_.embeddingCount+Number(w.embeddingProductsCount),doneCount:_.doneCount+Number(w.doneProductsCount),failedCount:_.failedCount+Number(w.failedProductsCount)}),{pendingCount:0,embeddingCount:0,doneCount:0,failedCount:0}),[i]),[a,o]=b.useState(!1),[c,u]=b.useState(),d=b.useCallback(x=>{u(x),o(!0)},[]),h=b.useCallback(()=>{u(void 0),o(!0)},[]),p=TPt({chatId:e,onOpenSettings:d}),g=CE(Cs.feeds.findAll.query,{where:{chat:e},populate:["productsCount","pendingProductsCount","embeddingProductsCount","doneProductsCount","failedProductsCount","health"]}),v=EE(x=>({to:"/chats/$chatId/feeds/$feedId/products",params:{chatId:e,feedId:x.original.id}}));return l.jsxs(l.Fragment,{children:[l.jsx(Px,{title:t._({id:"miIIdx"}),breadcrumbs:[{label:r.name,to:"/chats/$chatId/edit",params:{chatId:e}},{label:t._({id:"miIIdx"}),to:"/chats/$chatId/feeds",params:{chatId:e}}],actions:l.jsxs(Oe,{"data-cta":"admin-feed-create-button",variant:"primary",onClick:h,children:[l.jsx(ZS,{className:"size-4"})," ",t._({id:"wxWEbM"})]}),refetchInterval:5e3,columns:p,queryKey:[...ml(Ae.feeds.findAll),{chatId:e}],onQueryFn:g,onRow:v,children:l.jsx(xEe,{pendingCount:s.pendingCount,embeddingCount:s.embeddingCount,doneCount:s.doneCount,failedCount:s.failedCount})}),l.jsx(pEe,{open:a,onOpenChange:o,chatId:e,feedId:c})]})}function yEe(){const e=Ae.useUtils(),t=Ae.faqs.create.useMutation({onSuccess:async()=>
1417e.faqs.findAll.invalidate()}),n=Ae.faqs.update.useMutation({onSuccess:async(i,{id:s})=>{await Promise.all([e.faqs.findAll.invalidate(),e.faqs.findOne.invalidate({id:s})])}}),r=Ae.faqs.delete.useMutation({onSuccess:async(i,{id:s})=>e.faqs.findAll.invalidate()});return{create:t,update:n,remove:r}}const jp=Jm();function NPt(){const{i18n:e,_:t}=Me(),{remove:{mutateAsync:n},update:{mutateAsync:r}}=yEe();return b.useMemo(()=>[jp.accessor(i=>i.title,{id:"title",header:e._({id:"6YtxFj"}),meta:{sortable:"title"}}),jp.accessor(i=>i.parent?.title,{id:"parent.title",header:e._({id:"sujToP"}),meta:{sortable:"parent.title"}}),jp.accessor(i=>i.question,{id:"question",header:e._({id:"bfgr/e"}),meta:{sortable:"question"}}),jp.accessor(i=>i.answer,{id:"answer",header:e._({id:"4xBHUg"}),meta:{sortable:"answer"}}),jp.accessor(i=>i.clickCount,{id:"clickCount",header:e._({id:"zjDu8r"}),meta:{sortable:"clickCount"}}),jp.accessor(i=>i.updatedAt,{id:"updatedAt",header:e._({id:"+b7T3G"}),cell:i=>yt.date(i.getValue(),Zn.DateTime),meta:{sortable:"updatedAt"}}),jp.accessor(i=>i.active,{id:"active",header:e._({id:"F6pfE9"}),cell:i=>l.jsx(Di,{"data-table":"prevent",onClick:()=>r({id:i.row.original.id,active:!i.getValue()}),checked:i.getValue()}),meta:{sortable:"active"}}),jp.display({id:"actions",header:e._({id:"7L01XJ"}),cell:({row:i})=>l.jsx(fC,{onDelete:()=>n({id:i.original.id})}),meta:{align:"center"}})],[n,r,t])}const bEe=nr("/_baseLayout/chats/$chatId/faqs/")({component:jPt,loader:async({context:{trpcUtils:e},params:{chatId:t}})=>e.chats.findOne.ensureData({id:t})});function jPt(){const{chatId:e}=bEe.useParams(),{i18n:t,_:n}=Me(),r=NPt(),[i]=Ae.chats.findOne.useSuspenseQuery({id:e}),s=CE(Cs.faqs.findAll.query,{populate:["parent"],where:{chat:e}}),a=EE(o=>({to:"/chats/$chatId/faqs/$faqId/edit",params:{chatId:e,faqId:o.original.id}}));return l.jsx(Px,{title:t._({id:"aJ4pMe"}),breadcrumbs:[{label:i.name,to:"/chats/$chatId/edit",params:{chatId:e}},{label:t._({id:"aJ4pMe"}),to:"/chats/$chatId/faqs",params:{chatId:e}}],createButton:{to:"/chats/$chatId/faqs/create",params:{chatId:e},label:t._({id:"ksD+lF"})},columns:r,queryKey:[...ml(Ae.faqs.findAll),{chatId:e}],onQueryFn:s,onRow:a})}function RPt({document:e}){const{i18n:t,_:n}=Me(),[r,i]=b.useState(!1),[s,a]=b.useState([]),o=Ae.evaluation.generate.useMutation({onSuccess:d=>{a(d.testCases)}}),c=()=>{e&&o.mutate({documentId:e.id})},u=b.useCallback(()=>{navigator.clipboard.writeText(JSON.stringify(s,null,2)).then(()=>{i(!0),setTimeout(()=>i(!1),2e3)})},[s]);return l.jsxs(Fi,{className:"flex max-h-[95%] w-full max-w-[1200px] flex-col",children:[l.jsx(Wi,{children:l.jsx(D,{id:"t85f4C"})}),l.jsx(no,{children:l.jsx(D,{id:"DhRP3i"})}),s.length>0&&l.jsxs("div",{className:"relative size-full overflow-auto",children:[l.jsx("div",{className:"fixed bottom-24 right-12",children:l.jsx(cn,{title:t._({id:"/4gGIX"}),delayDuration:0,children:l.jsx(Oe,{onClick:u,variant:"primary",size:"icon-xs",children:r?l.jsx(noe,{className:"size-4"}):l.jsx(zh,{className:"size-4"})})})}),l.jsx("pre",{className:"overflow-auto whitespace-pre-wrap font-mono text-xs",children:JSON.stringify(s,null,2)})]}),l.jsxs(wi,{children:[l.jsx(Oe,{onClick:c,disabled:o.isPending||!e,loading:o.isPending,children:l.jsx(D,{id:"ziAjHi"})}),l.jsx(Fm,{asChild:!0,children:l.jsx(Oe,{variant:"ghost",outline:!0,children:l.jsx(D,{id:"yz7wBu"})})})]})]})}const IPt=b.memo(function({chat:t}){const{refreshAll:n}=yb(),r=async()=>{await n.mutateAsync({chatId:t.id,statuses:[qn.EmbeddingError,qn.ParsingError]})};return Number(t.parsingErrorDocumentsCount)===0&&Number(t.embeddingErrorDocumentsCount)===0?null:l.jsx(cn,{title:Be._({id:"w7+iI6"}),children:l.jsx(Oe,{"data-cta":"admin-retry-failed-button",size:"sm",variant:"danger",loading:n.isPending,disabled:n.isPending,onClick:r,children:l.jsx(D,{id:"mAuVsA"})})})}),_Ee=["organization.id"],e9=nr("/_baseLayout/chats/$chatId/documents/")({component:OPt,loader:async({context:{trpcUtils:e},params:{chatId:t}})=>e.chats.findOne.ensureData({id:t,populate:_Ee}),validateSearch:e=>({...e?.open?{open:e.open}:{}})});function OPt(){const{chatId:e}=e9.useParams(),t=e9.useSearch(),{i18n:n,_:r}=Me(),i=gs(),s=DSe(),a=MSe(),[o]=Ae.chats.findOne.useSuspenseQuery({id:e,populate:_Ee});b.useEffect(()=>{new URLSearchParams(globalThis.location.search).has("folderId")&&i({to:"/chats/$chatId/documents",params:{chatId:e}
1417,search:t?.open?{open:t.open}:{},replace:!0})},[e,i,t?.open]);const[c,u]=b.useState(""),[d,h]=b.useState(),[p,g]=b.useState(),[v,x]=b.useState(),[_,w]=b.useState(!!t?.open),S=b.useCallback(R=>{g(void 0),h(P=>R!==void 0&&R===P?void 0:R)},[]),E=b.useCallback(R=>{h(void 0),g(P=>R!==void 0&&R===P?void 0:R)},[]),T=b.useCallback(R=>{x(P=>R!==void 0&&R===P?void 0:R)},[]),N=PSe({folderId:null,chatId:e,search:c,statusFilter:d,documentPipelineFilter:p,sourceTypeFilter:v,selection:s,mutations:a}),{data:A}=Ae.documents.getStats.useQuery({chatId:e},{refetchOnMount:"always"}),[k]=Ae.chats.findAll.useSuspenseQuery({where:{organization:o.organization.id},pagination:{pageSize:100},fields:["id","name"]}),j=b.useMemo(()=>[{label:o.name,to:"/chats/$chatId/edit",params:{chatId:e}},{label:n._({id:"yWH3P0"}),to:"/chats/$chatId/documents",params:{chatId:e}}],[o.name,e,r]);return l.jsxs(TE,{title:n._({id:"yWH3P0"}),breadcrumbs:j,actions:l.jsx("div",{className:"flex items-center gap-2",children:l.jsx(ja,{roles:[Jt.SuperAdmin],children:l.jsx(IPt,{chat:{id:e,parsingErrorDocumentsCount:A?.parsingError??0,embeddingErrorDocumentsCount:A?.embeddingError??0}})})}),children:[A&&l.jsx(RSe,{stats:A,onStatusFilterChange:S,onDocumentPipelineFilterChange:E,activeDocumentPipelineFilter:p,activeStatusFilter:d}),l.jsx(wSe,{toolbar:l.jsx(OSe,{mode:"chat",folderId:null,rows:N.rows,selection:s,mutations:a,search:c,onSearchChange:u,onCreateFolder:()=>{},onAddDocuments:()=>w(!0),onDeleteFolder:()=>{},onFolderSettings:()=>{},statusFilter:d,onStatusFilterChange:S,documentPipelineFilter:p,onDocumentPipelineFilterChange:E,sourceTypeFilter:v,onSourceTypeFilterChange:T,onBulkAgentAccess:N.handleBulkAgentAccess,onBulkAutoUpdate:N.handleBulkAutoUpdate,onBulkWeight:N.handleBulkWeight,onExcludeFromKB:N.handleExcludeFromKB,onRequestDeleteFolders:N.requestDeleteFolders,onViewDocument:N.handleSelectDocument}),children:l.jsx(kSe,{rows:N.rows,folderId:null,loading:N.isLoading,selection:s,selectedDocumentId:N.selectedDocumentId,onSelectDocument:N.handleSelectDocument,currentChatId:e,defaultTab:N.defaultTab,columnActions:N.columnActions,folderPaths:N.folderPaths,onSearchReset:()=>{u(""),S(void 0),E(void 0),T(void 0)},hasMore:N.hasNextPage,isLoadingMore:N.isFetchingNextPage,onLoadMore:()=>N.fetchNextPage()})}),l.jsx(fSe,{chatId:e,allChats:k?.items??[],externalOpen:_,onExternalOpenChange:w,defaultOpen:t&&"open"in t,defaultUrl:t?.open}),l.jsx(ui,{open:!!N.testCasesDocumentId,onOpenChange:R=>{R||N.setTestCasesDocumentId(null)},children:l.jsx(RPt,{document:N.testCasesDocumentId?{id:N.testCasesDocumentId}:null})}),l.jsx(hSe,{open:N.isBulkAgentAccessOpen,onOpenChange:N.setIsBulkAgentAccessOpen,selectedRows:N.selectedSettingRows,mutations:a}),l.jsx(mSe,{open:N.isBulkAutoUpdateOpen,onOpenChange:N.setIsBulkAutoUpdateOpen,selectedRows:N.selectedSettingRows,mutations:a}),l.jsx(vSe,{open:N.isBulkWeightOpen,onOpenChange:N.setIsBulkWeightOpen,selectedRows:N.selectedSettingRows,mutations:a}),N.folderDeletePrompt&&l.jsx(_Se,{open:!0,onOpenChange:R=>{R||N.clearFolderDeletePrompt()},folders:N.folderDeletePrompt.mode==="single"?[N.folderDeletePrompt.folder]:N.folderDeletePrompt.folders,mutations:a,onDeleted:async()=>{const R=N.folderDeletePrompt?.onDeleted;N.clearFolderDeletePrompt(),s.clearSelection(),await R?.()}})]})}const wEe=b.memo(function({data:t,chatId:n}){const{i18n:r,_:i}=Me(),{create:{mutateAsync:s},remove:{mutateAsync:a},update:{mutateAsync:o}}=yEe(),{chat:c}=ir(Hh(h=>({chat:h.chat}))),{schema:u}=oi([{name:"title",label:r._({id:"6YtxFj"}),required:!0},{name:"question",label:r._({id:"bfgr/e"}),required:!0},{name:"answer",label:r._({id:"4xBHUg"}),required:!0}],[i]),d=({excludeIds:h,currentChatId:p})=>({query:async({pageSize:v,search:x})=>{const _={id:{$nin:h||void 0},searchable:{$like:x?H7(x):void 0},chat_id:p||void 0},w=await Cs.faqs.findAll.query({pagination:{pageSize:v},orderBy:{title:"asc"},where:_});return{items:w.items,total:w.meta.total}},cacheKeyFactory:v=>[...ml(Ae.faqs.findAll),{orderBy:{name:"asc"}},v,t?.id]});return l.jsxs(Ls,{initialData:t,createSchema:$He.omit({chat:!0}),updateSchema:BHe.omit({chat:!0}),onCreate:h=>s({...h,chat:n}),onUpdate:o,onRemove:a,basePath:`/chats/${n}/faqs`,idParamName:"faqId",children:[l.jsx(Ls.Col,{children:l.jsxs(gn,{title:r._({i
1417d:"3dSIQs"}),children:[l.jsx(upe,{name:"parent",label:r._({id:"sujToP"}),initialValue:t?.parent?.id,renderDisplayValue:h=>h?.title,shouldFilter:!1,renderSearchValue:h=>h?.title,dataProviderFactory:()=>d({excludeIds:t?.id?[t.id]:[],currentChatId:c?.id})}),l.jsx(Yr,{schema:u})]})}),l.jsx(Ls.Col,{}),l.jsx(Ls.Col,{children:l.jsx(AE,{data:t})})]})}),SEe=nr("/_baseLayout/chats/$chatId/faqs/create")({component:PPt,loader:async({context:{trpcUtils:e},params:{chatId:t}})=>e.chats.findOne.ensureData({id:t})});function PPt(){const{chatId:e}=SEe.useParams(),[t]=Ae.chats.findOne.useSuspenseQuery({id:e}),{i18n:n,_:r}=Me();return l.jsx(wo,{title:n._({id:"ksD+lF"}),breadcrumbs:[{label:t.name,to:"/chats/$chatId/edit",params:{chatId:e}},{label:n._({id:"aJ4pMe"}),to:"/chats/$chatId/faqs",params:{chatId:e}},{label:n._({id:"ksD+lF"})}],children:l.jsx(wEe,{chatId:e})})}const EEe=nr("/_baseLayout/agent-tools/client-side/$formToolId/edit")({component:MPt});function MPt(){const{formToolId:e}=EEe.useParams();return l.jsx(dEe,{formToolId:e})}function DPt({images:e,annotations:t,index:n,alt:r,onIndexChange:i,onClose:s}){const{i18n:a,_:o}=Me(),c=e.length>1,u=t?.[n],d=()=>i((n-1+e.length)%e.length),h=()=>i((n+1)%e.length);return l.jsx(ui,{open:!0,onOpenChange:p=>!p&&s(),children:l.jsxs(Fi,{className:"flex w-full max-w-3xl flex-col gap-3 overflow-hidden p-4",children:[l.jsxs("div",{className:"relative flex items-center justify-center",children:[c&&l.jsx(Oe,{variant:"ghost",outline:!0,size:"icon-sm",className:"absolute left-1 z-10",onClick:d,"aria-label":a._({id:"MHk+7g"}),children:l.jsx(Aj,{className:"size-5"})}),l.jsx("img",{src:e[n],alt:r,className:"max-h-[65vh] w-auto max-w-full rounded-md object-contain"}),c&&l.jsx(Oe,{variant:"ghost",outline:!0,size:"icon-sm",className:"absolute right-1 z-10",onClick:h,"aria-label":a._({id:"EatZYJ"}),children:l.jsx(Qd,{className:"size-5"})})]}),l.jsx("span",{className:"text-center text-xs text-muted-fg",children:a._({id:"R0UH07",values:{0:n+1,1:e.length}})}),u&&l.jsx("p",{className:"whitespace-pre-wrap text-center text-sm text-muted-fg",children:u})]})})}function Q4(){const e=Ae.useUtils(),t=b.useCallback(async()=>{await Promise.all([e.shopProductAttributes.listByFeed.invalidate(),e.shopProducts.findOne.invalidate()])},[e]),n=Ae.shopProductAttributes.update.useMutation({onSuccess:t}),r=Ae.shopProductAttributes.merge.useMutation({onSuccess:t}),{mutateAsync:i}=n,s=b.useCallback(({id:o,name:c,displayName:u})=>i({id:o,name:c,displayName:u}),[i]),a=b.useCallback(({id:o,active:c})=>i({id:o,active:c}),[i]);return{update:n,merge:r,rename:s,setActive:a}}function bie(e){return e.normalize("NFD").replaceAll(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase().replaceAll(/[^\p{Letter}\p{Number}]+/gu,"_").replaceAll(/^_+|_+$/g,"")}function GU(e){const t=e.trim();if(!t)return{isValid:!0,value:null};const n=Number(t.replace(",","."));return Number.isNaN(n)?{isValid:!1,value:null}:{isValid:!0,value:n}}function FPt({name:e,attributes:t}){const n=bie(e);if(n)return t.find(r=>r.name===n)??t.find(r=>(r.aliases??[]).some(i=>bie(i)===n))}function LPt({match:e,takenAttributeIds:t}){return e?e.dataType===Xa.Tag?"tag":t.has(e.id)?"taken":e.active?"reuse":"inactive":"none"}function zPt({target:e,draftDataType:t,draftBaseUnit:n}){return e?{isNumeric:e.dataType===Xa.Number,unitLabel:e.baseUnit??e.unit??""}:{isNumeric:t===Xa.Number,unitLabel:n.trim()}}function $Pt({mode:e,hasSelectedAttribute:t,matchState:n,draftName:r,draftBaseUnit:i,isNumeric:s,value:a,numericValue:o}){return!a.trim()||s&&!GU(o).isValid?!1:e==="existing"?t:n==="reuse"?!0:n!=="none"?!1:!!r.trim()&&(!s||!!i.trim())}function CEe(){const e=Ae.useUtils(),t=b.useCallback(async()=>Promise.all([e.shopProducts.findOne.invalidate(),e.shopProductAttributes.listByFeed.invalidate()]),[e]),n=Ae.shopProductAttributes.updateValue.useMutation({onSuccess:t}),r=Ae.shopProductAttributes.createValue.useMutation({onSuccess:t}),i=Ae.shopProductAttributes.createWithValue.useMutation({onSuccess:t}),{mutateAsync:s}=n,a=b.useCallback(({id:u,value:d,numericValue:h})=>s({id:u,value:d,...h===void 0?{}:{numericValue:h},source:jd.Manual}),[s]),o=b.useCallback(({id:u})=>s({id:u,active:!1,source:jd.Manual}),[s]),c=b.useCallback(({id:u})=>s({id:u,active:!0,source:jd.Manual}),[s]);return{updateValue:n,createValue:r,createWithValue:i,correctValue:a,removeValue:o,restoreValue:c}}const _ie={name:"",displayName:"",dataType:Xa.Text,unit:"",baseUnit:""},BPt=[Xa.Text,Xa.Number,Xa.Boolean],UPt=b.memo(function({state:t,label:n,isReactivating:r,onReactivate:i}){const{i18n:s,_:a}=Me();return l.jsxs("div",{className:"flex flex-col gap-2 rounded-md border border-dashed border-border p-3",children:[t==="reuse"&&l.jsx("span",{className:"text-xs text-muted-fg",children:s._({id:"8Fkvtv",values:{label:n}})}),t==="taken"&&l.jsx("span",{className:"text-xs text-warning",children:s._({id:"+ybns6",values:{label:n}})}),t==="tag"&&l.jsx("span",{className:"text-xs text-warning",children:s._({id:"Msmpem",values:{label:n}})}),t==="inactive"&&l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"text-xs text-warning",children:s._({id:"GuRR5C",values:{label:n}})}),l.jsx(Oe,{"data-cta":"admin-product-attribute-reactivate-button",variant:"ghost",outline:!0,size:"sm",className:"w-fit",loading:r,onClick:i,children:l.jsx(D,{id:"XkzHRX"})})]})]})}),VPt=b.memo(function({draft:t,matchState:n,matchLabel:r,isNumeric:i,isPending:s,isReactivating:a,onChange:o,onReactivate:c}){const{i18n:u,_:d}=Me(),h=Ir();return l.jsxs("div",{className:"flex flex-col gap-4",children:[l.jsx("p",{className:"text-xs text-muted-fg",children:l.jsx(D,{id:"gmfUT5"})}),l.jsxs("div",{className:"flex flex-col gap-1.5",children:[l.jsx(ot,{htmlFor:"attribute-add-display-name",children:l.jsx(D,{id:"pfa8F0"})}),l.jsx(fn,{id:"attribute-add-display-name",value:t.displayName,placeholder:u._({id:"c0lJJE"}),disabled:s,onChange:p=>o({displayName:p.target.value})})]}),l.jsxs("div",{className:"flex flex-col gap-1.5",children:[l.jsx(ot,{htmlFor:"attribute-add-name",children:l.jsx(D,{id:"LwHzgM"})}),l.jsx(fn,{id:"attribute-add-name",value:t.name,disabled:s,onChange:p=>o({name:p.target.value})}),l.jsx("span",{className:"text-xs text-muted-fg",children:l.jsx(D,{id:"ixGqoO"})})]}),n==="none"?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex flex-col gap-1.5",children:[l.jsx(ot,{htmlFor:"attribute-add-data-type",children:l.jsx(D,{id:"+zy2Nq"})}),l.jsx(tr,{id:"attribute-add-data-type",value:t.dataType,onValueChange:p=>o({dataType:p}),children:BPt.map(p=>l.jsx(Yt,{value:p,children:h.shopAttributeDataType[p]},p))})]}),i&&l.jsxs("div",{className:"flex flex-wrap items-start gap-3",children:[l.jsxs("div",{className:"flex w-40 flex-col gap-1.5",children:[l.jsx(ot,{htmlFor:"attribute-add-u
1417nit",children:l.jsx(D,{id:"aSwfbR"})}),l.jsx(fn,{id:"attribute-add-unit",value:t.unit,disabled:s,onChange:p=>o({unit:p.target.value})}),l.jsx("span",{className:"text-xs text-muted-fg",children:l.jsx(D,{id:"DGG6jf"})})]}),l.jsxs("div",{className:"flex w-40 flex-col gap-1.5",children:[l.jsx(ot,{htmlFor:"attribute-add-base-unit",children:l.jsx(D,{id:"mLs58/"})}),l.jsx(fn,{id:"attribute-add-base-unit",value:t.baseUnit,disabled:s,onChange:p=>o({baseUnit:p.target.value})}),l.jsx("span",{className:"text-xs text-muted-fg",children:l.jsx(D,{id:"McdHMC"})})]})]})]}):l.jsx(UPt,{state:n,label:r,isReactivating:a,onReactivate:c})]})}),HPt=b.memo(function({value:t,numericValue:n,isNumeric:r,isPending:i,unitLabel:s,dataTypeLabel:a,onValueChange:o,onNumericValueChange:c}){return l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex flex-col gap-1.5",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[l.jsx(ot,{htmlFor:"attribute-add-value",children:l.jsx(D,{id:"hoe61t"})}),a&&l.jsx(En,{size:"xs",outline:!0,variant:"muted",children:a})]}),l.jsx(fn,{id:"attribute-add-value",value:t,disabled:i,onChange:u=>o(u.target.value)})]}),r&&l.jsxs("div",{className:"flex flex-col gap-1.5",children:[l.jsx(ot,{htmlFor:"attribute-add-numeric-value",children:l.jsx(D,{id:"m3BR+i"})}),l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx(fn,{id:"attribute-add-numeric-value",className:"w-40",inputMode:"decimal",value:n,disabled:i,onChange:u=>c(u.target.value)}),s&&l.jsxs("span",{className:"shrink-0 text-sm font-medium text-muted-fg",children:["(",s,")"]})]}),l.jsx("span",{className:"text-xs text-muted-fg",children:l.jsx(D,{id:"e/V6xv"})})]})]})}),qPt=b.memo(function({open:t,productId:n,feedId:r,takenAttributeIds:i,onClose:s}){const{i18n:a,_:o}=Me(),c=Ir(),{createValue:u,createWithValue:d}=CEe(),{setActive:h,update:p}=Q4(),{data:g}=Ae.shopProductAttributes.listByFeed.useQuery({feedId:r},{enabled:t}),[v,x]=b.useState("existing"),[_,w]=b.useState(""),[S,E]=b.useState(_ie),[T,N]=b.useState(""),[A,k]=b.useState("");b.useEffect(()=>{x("existing"),w(""),E(_ie),N(""),k("")},[t,n]);const j=b.useCallback(M=>E(q=>({...q,...M})),[]),R=b.useMemo(()=>new Set(i),[i]),P=b.useMemo(()=>(g??[]).filter(M=>M.active&&M.dataType!==Xa.Tag&&!R.has(M.id)),[g,R]),V=b.useMemo(()=>P.find(M=>M.id===_),[P,_]),U=b.useMemo(()=>(g??[]).some(M=>!M.active&&M.dataType!==Xa.Tag&&!R.has(M.id)),[g,R]),G=b.useMemo(()=>v==="new"?FPt({name:S.name,attributes:g??[]}):void 0,[v,S.name,g]),Q=b.useMemo(()=>LPt({match:G,takenAttributeIds:R}),[G,R]),Z=v==="existing"?V:G,K=Z?Z.displayName??Z.name:"",{isNumeric:te,unitLabel:ne}=zPt({target:Z,draftDataType:S.dataType,draftBaseUnit:S.baseUnit}),se=GU(A),H=u.isPending||d.isPending,O=$Pt({mode:v,hasSelectedAttribute:!!V,matchState:Q,draftName:S.name,draftBaseUnit:S.baseUnit,isNumeric:te,value:T,numericValue:A})&&!H&&!p.isPending,L=async()=>{if(!O)return;const M=v==="existing"?_:G?.id,q=te?{numericValue:se.value}:void 0;await(M?u.mutateAsync({product:n,attribute:M,value:T.trim(),...q}):d.mutateAsync({product:n,value:T.trim(),...q,attribute:{name:S.name.trim(),displayName:S.displayName.trim()||null,dataType:S.dataType,...te?{unit:S.unit.trim()||null,baseUnit:S.baseUnit.trim()}:{}}})),s()};return l.jsx(ui,{open:t,onOpenChange:s,children:l.jsxs(Fi,{className:"w-full max-w-[560px]",children:[l.jsxs(ks,{children:[l.jsx(Wi,{children:l.jsx(D,{id:"4C+f6a"})}),l.jsx(no,{children:l.jsx(D,{id:"TMxSfu"})})]}),l.jsxs("div",{className:"flex flex-col gap-4 py-2",children:[l.jsxs("div",{className:"flex gap-1 rounded-md border border-border p-1",children:[l.jsx(Oe,{size:"sm",className:"flex-1",variant:v==="existing"?"primary":"ghost","aria-pressed":v==="existing",onClick:()=>x("existing"),children:l.jsx(D,{id:"XVl0XF"})}),l.jsx(Oe,{size:"sm",className:"flex-1",variant:v==="new"?"primary":"ghost","aria-pressed":v==="new",onClick:()=>x("new"),children:l.jsx(D,{id:"TO3yhT"})})]}),v==="existing"?l.jsxs("div",{className:"flex flex-col gap-1.5",children:[l.jsx(ot,{htmlFor:"attribute-add-target",children:l.jsx(D,{id:"kBMV/o"})}),l.jsx(tr,{id:"attribute-add-target",value:_,onValueChange:w,placeholder:a._({id:"eHcoef"}),children:P.map(M=>l.jsx(Yt,{value:M.id,children:M.displayName??M.name},M.id))}),P.length===0&&l.jsx("span",{className:"text-xs text-muted-fg",children:g?.length?l.jsx(D,{id:"d+nUyQ"}):l.jsx(D,{id:"u0tf68"})}),U&&l.jsx("span",{className:"text-xs text-muted-fg",children:l.jsx(D,{id:"ToN/FR"})})]}):l.jsx(VPt,{draft:S,matchState:Q,matchLabel:K,isNumeric:te,isPending:H,isReactivating:p.isPending,onChange:j,onReactivate:()=>G&&h({id:G.id,active:!0})}),l.jsx(HPt,{value:T,numericValue:A,isNumeric:te,isPending:H,unitLabel:ne,dataTypeLabel:Z?c.shopAttributeDataType[Z.dataType]:void 0,onValueChange:N,onNumericValueChange:k})]}),l.jsxs(wi,{children:[l.jsx(Oe,{variant:"secondary",onClick:s,children:l.jsx(D,{id:"dEgA5A"})}),l.jsx(Oe,{"data-cta":"admin-product-attribute-add-submit-button",variant:"primary",loading:H,disabled:!O,onClick:L,children:l.jsx(D,{id:"m16xKo"})})]})]})})}
1417),WPt={[jd.Feed]:"info",[jd.Model]:"secondary",[jd.Manual]:"success"},GPt=b.memo(function({productId:t,attributes:n,chatId:r,feedId:i}){const{i18n:s,_:a}=Me(),o=Ir(),{updateValue:c,correctValue:u,removeValue:d,restoreValue:h}=CEe(),[p,g]=b.useState(null),[v,x]=b.useState(!1),[_,w]=b.useState(""),[S,E]=b.useState(""),T=c.isPending?c.variables?.id:void 0,N=b.useCallback(({id:R,value:P,numericValue:V})=>{g(R),w(P),E(V==null?"":String(V))},[]),A=b.useCallback(()=>{g(null),w(""),E("")},[]),k=b.useCallback(async({id:R,isNumeric:P})=>{const V=_.trim();if(!V)return;const U=GU(S);P&&!U.isValid||(await u({id:R,value:V,...P?{numericValue:U.value}:{}}),A())},[u,_,S,A]),j=b.useMemo(()=>n.map(({attribute:R})=>R.id),[n]);return l.jsxs(l.Fragment,{children:[l.jsxs(gn,{title:s._({id:"mSjQYg"}),children:[l.jsx("p",{className:"text-xs text-muted-fg",children:r&&i?l.jsx(D,{id:"rKSAUX",components:{0:l.jsx(ar,{to:"/chats/$chatId/feeds/$feedId/attributes",params:{chatId:r,feedId:i},className:"text-primary underline"})}}):l.jsx(D,{id:"sAeI7A"})}),i&&l.jsxs(Oe,{"data-cta":"admin-product-attribute-add-button",variant:"ghost",outline:!0,size:"sm",className:"w-fit",onClick:()=>x(!0),children:[l.jsx(Bd,{className:"size-4"}),l.jsx(D,{id:"GJUbc4"})]}),n.length===0?l.jsx("p",{className:"text-sm text-muted-fg",children:l.jsx(D,{id:"nEWZjH"})}):l.jsx("ul",{className:"flex flex-col gap-2",children:n.map(({id:R,value:P,numericValue:V,active:U,source:G,attribute:Q})=>{const Z=p===R,K=Q.dataType===Xa.Number,te=Q.baseUnit??Q.unit??"",ne=T===R,se=V==null?"":[V,te].filter(Boolean).join(" "),H=O=>{O.key==="Enter"&&k({id:R,isNumeric:K}),O.key==="Escape"&&A()};return l.jsxs("li",{className:$e("flex flex-col gap-2 rounded-md border border-border p-3 md:flex-row md:items-start md:justify-between",!U&&"border-dashed bg-muted/20"),children:[l.jsxs("div",{className:"flex min-w-0 flex-col gap-1.5",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[l.jsx("span",{className:"text-sm font-bold",children:Q.displayName??Q.name}),l.jsx(En,{size:"xs",outline:!0,variant:"muted",children:o.shopAttributeDataType[Q.dataType]}),l.jsx(En,{size:"xs",outline:!0,variant:WPt[G],children:o.shopProductAttributeSource[G]}),Q.unit&&l.jsx(En,{size:"xs",outline:!0,variant:"ghost",children:Q.unit}),Q.baseUnit&&Q.baseUnit!==Q.unit&&l.jsx(En,{size:"xs",outline:!0,variant:"ghost",children:s._({id:"fifR4q",values:{0:Q.baseUnit}})}),!U&&l.jsx(En,{size:"xs",variant:"danger",children:l.jsx(D,{id:"FeGd9Y"})}),!Q.active&&l.jsx(En,{size:"xs",variant:"warning",children:l.jsx(D,{id:"boUQwa"})})]}),Z?l.jsxs("div",{className:"flex flex-col gap-1.5",children:[l.jsxs("div",{className:"flex flex-wrap items-end gap-3",children:[l.jsxs("div",{className:"flex min-w-48 flex-1 flex-col gap-1",children:[l.jsx("span",{className:"text-xs text-muted-fg",children:l.jsx(D,{id:"hoe61t"})}),l.jsx(fn,{size:"sm",autoFocus:!0,value:_,disabled:c.isPending,onChange:O=>w(O.target.value),onKeyDown:H,"aria-label":s._({id:"SiagiB"})})]}),K&&l.jsxs("div",{className:"flex w-40 flex-col gap-1",children:[l.jsx("span",{className:"text-xs text-muted-fg",children:l.jsx(D,{id:"m3BR+i"})}),l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx(fn,{size:"sm",inputMode:"decimal",value:S,disabled:c.isPending,onChange:O=>E(O.target.value),onKeyDown:H,"aria-label":s._({id:"cmxldX"})}),te&&l.jsxs("span",{className:"shrink-0 text-sm font-medium text-muted-fg",children:["(",te,")"]})]})]})]}),K&&l.jsx("span",{className:"text-xs text-muted-fg",children:l.jsx(D,{id:"e/V6xv"})})]}):l.jsxs("div",{className:"flex flex-col gap-0.5",children:[l.jsx("span",{className:$e("break-words text-sm",!U&&"text-muted-fg line-through decoration-danger"),children:P}),K&&l.jsx("span",{className:"text-xs text-muted-fg",children:se?s._({id:"MIv410",values:{comparableLabel:se}}):s._({id:"tWGVyq"})})]})]}),l.jsx("div",{className:"flex shrink-0 items-center gap-1",children:Z?l.jsxs(l.Fragment,{children:[l.jsx(cn,{title:s._({id:"tfDRzk"}),children:l.jsx(Oe,{variant:"ghost",outline:!0,size:"icon-xs",className:"text-success",loading:ne,onClick:()=>k({id:R,isNumeric:K}),"aria-label":s._({id:"tfDRzk"}),children:l.jsx(Es,{className:"size-4"})})}),l.jsx(cn,{title:s._({id:"dEgA5A"}),children:l.jsx(Oe,{variant:"ghost",outline:!0,size:"icon-xs",disabled:c.isPending,onClick:A,"aria-label":s._({id:"dEgA5A"}),children:l.jsx(pl,{className:"size-4"})})})]}):l.jsxs(l.Fragment,{children:[l.jsx(cn,{title:s._({id:"Tl3I+W"}),children:l.jsx(Oe,{variant:"ghost",outline:!0,size:"icon-xs",disabled:c.isPending,onClick:()=>N({id:R,value:P,numericValue:V}),"aria-label":s._({id:"Tl3I+W"}),children:l.jsx(ju,{className:"size-4"})})}),U?l.jsx(cn,{title:s._({id:"r7O32x"}),children:l.jsx(Oe,{variant:"ghost",outline:!0,size:"icon-xs",className:"text-danger",loading:ne,onClick:()=>d({id:R}),"aria-label":s._({id:"r7O32x"}),children:l.jsx(bo,{className:"size-4"})})}):l.jsx(cn,{title:s._({id:"0CzVNc"}),children:l.jsx(Oe,{variant:"ghost",outline:!0,size:"icon-xs",className:"text-success",loading:ne,onClick:()=>h({id:R}),"aria-label":s._({id:"0CzVNc"}),children:l.jsx($9,{className:"size-4"})})})]})})]},R)})})]}),i&&l.jsx(qPt,{open:v,productId:t,feedId:i,takenAttributeIds:j,onClose:()=>x(!1)})]})});function KU(){const e=Ae.useUtils(),t=Ae.shopProducts.update.useMutation({onSuccess:async(r,{id:i})=>
1417{await Promise.all([e.shopProducts.findAll.invalidate(),e.shopProducts.findOne.invalidate({id:i}),e.feeds.findOne.invalidate(),e.feeds.findAll.invalidate()])}}),n=Ae.shopProducts.reEmbed.useMutation({onSuccess:async(r,{id:i})=>{await Promise.all([e.shopProducts.findAll.invalidate(),e.shopProducts.findOne.invalidate({id:i}),e.feeds.findOne.invalidate(),e.feeds.findAll.invalidate()])}});return{update:t,reEmbed:n}}const KPt=b.memo(function({productId:t,onClose:n,chatId:r,feedId:i}){const{i18n:s,_:a}=Me(),o=Ir(),{update:{mutateAsync:c,isPending:u}}=KU(),[d,h]=b.useState(null),{data:p,isLoading:g}=Ae.shopProducts.findOne.useQuery({id:t,populate:["categories","attributes.attribute"]},{enabled:!!t}),v=[...p?.imageUrl?[p.imageUrl]:[],...p?.images??[]].filter((x,_,w)=>w.indexOf(x)===_);return l.jsxs(l.Fragment,{children:[l.jsx(ui,{open:!!t,onOpenChange:n,children:l.jsxs(Fi,{className:"flex h-[90vh] w-full max-w-[900px] flex-col overflow-hidden",children:[l.jsx(ks,{children:l.jsx(Wi,{children:p?.name})}),g?l.jsx("div",{className:"flex min-h-40 items-center justify-center text-primary",children:l.jsx(Kr,{className:"size-10 animate-spin"})}):l.jsxs(Yf,{className:"min-h-0 flex-1",children:[l.jsx(Xf,{className:"size-full p-4",children:l.jsxs("div",{className:"flex flex-col gap-4",children:[p?.status===bi.Failed&&p.lastError&&l.jsx(gn,{variant:"danger",title:l.jsxs("span",{className:"flex items-center gap-2 text-danger",children:[l.jsx(tE,{className:"size-4"}),l.jsx(D,{id:"YekT1N"})]}),children:l.jsx("p",{className:"whitespace-pre-wrap text-sm text-danger",children:p.lastError})}),v.length>0&&l.jsx(gn,{title:s._({id:"an5hVd"}),children:l.jsx("div",{className:"flex flex-wrap gap-3",children:v.map((x,_)=>l.jsx("button",{type:"button",onClick:()=>h(_),"aria-label":s._({id:"XCjghq"}),children:l.jsx("img",{src:x,alt:p?.name,className:"size-24 cursor-zoom-in rounded-md border border-border object-cover transition-opacity hover:opacity-80"})},x))})}),v.length===0&&l.jsx(gn,{title:s._({id:"an5hVd"}),children:l.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-fg",children:[l.jsx(soe,{className:"size-4"}),l.jsx(D,{id:"PYx623"})]})}),l.jsxs(gn,{title:s._({id:"URmyfc"}),children:[l.jsxs("div",{className:"grid grid-cols-2 gap-4 md:grid-cols-3",children:[l.jsx(jn,{label:s._({id:"a7u1N9"}),size:"sm",children:p&&yt.currency(Number(p.price),p.currency)}),l.jsx(jn,{label:s._({id:"lXkUEV"}),size:"sm",children:p&&l.jsx(En,{size:"sm",outline:!0,children:o.productAvailabilityStatus[p.availability]})}),l.jsx(jn,{label:s._({id:"0YL8zX"}),size:"sm",children:p&&l.jsx(En,{size:"sm",outline:!0,children:o.shopProductStatus[p.status]})}),l.jsx(jn,{label:s._({id:"peaanf"}),size:"sm",children:p?.brand??"-"}),l.jsx(jn,{label:s._({id:"+zy2Nq"}),size:"sm",children:p?.type??"-"}),l.jsx(jn,{label:s._({id:"WUiO2i"}),size:"sm",children:p?.ean??"-"}),l.jsx(jn,{label:s._({id:"aG2xqM"}),size:"sm",children:p?.isbn??"-"}),l.jsx(jn,{label:s._({id:"5KfWxA"}),size:"sm",children:p?.externalId??"-"}),l.jsx(jn,{label:s._({id:"E60CQU"}
1417),size:"sm",children:p?.dispatchLeadTimeDays??"-"}),l.jsx(jn,{label:s._({id:"jq5e1b"}),size:"sm",children:p?.availabilityDate?new Date(p.availabilityDate).toLocaleString():"-"}),l.jsx(jn,{label:s._({id:"ZSfIAK"}),size:"sm",children:p?.deliveryDate?new Date(p.deliveryDate).toLocaleString():"-"}),l.jsx(jn,{label:s._({id:"EI3OZt"}),size:"sm",children:p?.stockQuantity??"-"})]}),p?.url&&l.jsxs("a",{href:p.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex w-fit items-center gap-1 text-sm text-primary underline",children:[s._({id:"uvW067"}),l.jsx($d,{className:"size-3.5"})]}),l.jsxs("div",{className:"flex items-center gap-2 pt-2",children:[l.jsx(Di,{id:"product-active-switch",checked:!!p?.active,disabled:!p||u,onCheckedChange:x=>p&&c({id:p.id,active:x})}),l.jsx(ot,{htmlFor:"product-active-switch",children:l.jsx(D,{id:"F5PVFv"})})]})]}),p?.shortSummary&&l.jsx(gn,{title:s._({id:"lzMEae"}),children:l.jsx("p",{className:"whitespace-pre-wrap text-sm",children:p.shortSummary})}),p?.description&&l.jsx(gn,{title:s._({id:"Nu4oKW"}),children:l.jsx("p",{className:"whitespace-pre-wrap text-sm",children:p.description})}),!!p?.categories?.length&&l.jsx(gn,{title:s._({id:"NUrY9o"}),children:l.jsx("div",{className:"flex flex-wrap gap-2",children:p.categories.map(x=>l.jsx(En,{size:"sm",outline:!0,children:x.displayName??x.name},x.id))})}),p&&l.jsx(GPt,{productId:p.id,attributes:p.attributes??[],chatId:r,feedId:i}),l.jsx(gn,{title:s._({id:"9isz8N"}),children:l.jsxs("div",{className:"grid grid-cols-2 gap-4 md:grid-cols-4",children:[l.jsx(jn,{label:s._({id:"Uf5bq9"}),size:"sm",children:p?.lastSeenAt?yt.date(p.lastSeenAt,Zn.DateTimeNumericPrecise):"-"}),l.jsx(jn,{label:s._({id:"BsSS9f"}),size:"sm",children:p?.offerUpdatedAt?yt.date(p.offerUpdatedAt,Zn.DateTimeNumericPrecise):"-"}),l.jsx(jn,{label:s._({id:"kcMIUo"}),size:"sm",children:p?.contentUpdatedAt?yt.date(p.contentUpdatedAt,Zn.DateTimeNumericPrecise):"-"}),l.jsx(jn,{label:s._({id:"z6+ktG"}),size:"sm",children:p?.enrichedAt?yt.date(p.enrichedAt,Zn.DateTimeNumericPrecise):"-"})]})}),l.jsx(gn,{title:s._({id:"wSRWlj"}),children:l.jsxs("div",{className:"grid grid-cols-2 gap-4 md:grid-cols-3",children:[l.jsx(jn,{label:s._({id:"JizhXE"}),size:"sm",children:yt.date(p?.scheduledAt,Zn.DateTimeNumericPrecise)}),l.jsx(jn,{label:s._({id:"6Qfdfy"}),size:"sm",children:p?.startedEmbeddingAt?yt.date(p.startedEmbeddingAt,Zn.DateTimeNumericPrecise):"-"}),l.jsx(jn,{label:s._({id:"ODpaXk"}),size:"sm",children:p?.finishedEmbeddingAt?yt.date(p.finishedEmbeddingAt,Zn.DateTimeNumericPrecise):"-"})]})})]})}),l.jsx(Qf,{className:"flex touch-none select-none bg-gray-300 p-1 transition-colors hover:bg-gray-500",orientation:"vertical",children:l.jsx(Zf,{className:"relative flex-1 rounded-full bg-gray-400"})})]}),l.jsx(wi,{children:l.jsx(Fm,{asChild:!0,children:l.jsx(Oe,{"data-cta":"admin-product-detail-modal-close-button",variant:"secondary",children:l.jsx(D,{id:"yz7wBu"})})})})]})}),d!==null&&l.jsx(DPt,{images:v,annotations:v.map(x=>p?.imageCaptionByUrl?.[x]??""),index:d,alt:p?.name,onIndexChange:h,onClose:()=>h(null)})]})}),Rp=Jm(),wie="border-muted-fg/60 bg-background hover:border-muted-fg/80 data-[state=unchecked]:bg-background",YPt={[Wa.InStock]:"success",[Wa.OnOrder]:"info",[Wa.PreOrder]:"info",[Wa.OutOfStock]:"warning",[Wa.Unknown]:"danger"},XPt={[bi.Pending]:"info",[bi.Embedding]:"info",[bi.Done]:"success",[bi.Failed]:"danger"};function QPt({onOpenDetail:e}){const{i18n:t,_:n}=Me(),r=Ir(),{update:{mutateAsync:i},reEmbed:{mutateAsync:s}}=KU();return b.useMemo(()=>[Rp.display({id:"select",header:({table:a})=>{const{selectedIds:o,onToggleAll:c}=a.options.meta??{},d=a.getRowModel().rows.map(v=>v.original.id),h=o?d.filter(v=>o.has(v)).length:0,p=d.length>0&&h===d.length,g=h>0&&!p;return l.jsx("div",{"data-table":"prevent",children:l.jsx(N0,{size:"sm","aria-label":t._({id:"/fhMKz"}),checked:p?!0:g?"indeterminate":!1,disabled:d.length===0,onCheckedChange:v=>c?.(d,!!v),className:wie})})},cell:({row:a,table:o})=>{const{selectedIds:c,onToggleOne:u}=o.options.meta??{};return l.jsx("div",{"data-table":"prevent",children:l.jsx(N0,{size:"sm","aria-label":t._({id:"9c44h0"}),checked:c?.has(a.original.id)??!1,onCheckedChange:d=>u?.(a.original.id,!!d),className:wie})})},meta:{align:"center"}}),Rp.accessor(a=>a.imageUrl,{id:"imageUrl",header:t._({id:"hG89Ed"}),cell:({row:a})=>a.original.imageUrl?l.jsx("img",{src:a.original.imageUrl,alt:a.original.n
1417ame,className:"size-12 rounded-md border border-border object-cover"}):l.jsx("div",{className:"flex size-12 items-center justify-center rounded-md border border-border bg-muted/30 text-muted-fg",children:l.jsx(soe,{className:"size-5"})}),meta:{align:"center"}}),Rp.accessor(a=>a.name,{id:"name",header:t._({id:"6YtxFj"}),cell:({row:a})=>{const o=a.original.title&&a.original.title!==a.original.name;return l.jsxs("div",{className:"flex min-w-56 max-w-72 flex-col gap-0.5",children:[l.jsx("p",{className:"break-all font-medium leading-tight",children:a.original.name}),o?l.jsx("p",{className:"text-xs text-gray-600",children:a.original.title}):a.original.description&&l.jsx("p",{className:"line-clamp-2 text-xs text-gray-600",children:a.original.description})]})},meta:{sortable:"name"}}),Rp.accessor(a=>a.price,{id:"price",header:t._({id:"a7u1N9"}),cell:({row:a})=>yt.currency(Number(a.original.price),a.original.currency),meta:{sortable:"price",align:"right"}}),Rp.accessor(a=>a.availability,{id:"availability",header:t._({id:"lXkUEV"}),cell:({row:a})=>l.jsxs("div",{className:"flex flex-col items-start gap-1",children:[l.jsx(En,{size:"sm",variant:YPt[a.original.availability],outline:!0,children:r.productAvailabilityStatus[a.original.availability]}),l.jsx(cn,{title:a.original.active?t._({id:"5y3O+A"}):t._({id:"FQBaXG"}),children:l.jsxs("button",{type:"button","data-cta":"admin-product-toggle-active-inline","data-table":"prevent",className:a.original.active?"inline-flex items-center gap-1 text-xs text-success":"inline-flex items-center gap-1 text-xs text-danger",onClick:()=>i({id:a.original.id,active:!a.original.active}),children:[a.original.active?l.jsx(Es,{className:"size-3.5"}):l.jsx(pl,{className:"size-3.5"}),a.original.active?t._({id:"F6pfE9"}):t._({id:"NoNwIX"})]})})]}),meta:{sortable:"availability"}}),Rp.accessor(a=>a.status,{id:"status",header:t._({id:"uAQUqI"}),cell:({row:a})=>l.jsx(En,{size:"sm",variant:XPt[a.original.status],outline:!0,children:r.shopProductStatus[a.original.status]}),meta:{sortable:"status"}}),Rp.accessor(a=>a.brand,{id:"brand",header:t._({id:"K23JG1"}),cell:({row:a})=>{const o=a.original.categories??[],c=o.slice(0,2),u=o.slice(2);return l.jsxs("div",{className:"flex flex-col gap-1 text-xs",children:[a.original.brand&&l.jsx("span",{className:"font-medium text-gray-800",children:a.original.brand}),o.length>0&&l.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[c.map(d=>l.jsx(En,{size:"sm",variant:"muted",outline:!0,className:"text-gray-800",children:d.displayName??d.name},d.id)),u.length>0&&l.jsx(cn,{title:u.map(d=>d.displayName??d.name).join(", "),children:l.jsx(En,{size:"sm",variant:"muted",outline:!0,className:"text-gray-800",children:t._({id:"xvxne3",values:{0:u.length}})})})]})]})},meta:{sortable:"brand"}}),Rp.display({id:"actions",header:t._({id:"7L01XJ"}),cell:({row:a})=>{const o=a.original;return l.jsxs(RU,{children:[l.jsx(cn,{title:t._({id:"uvW067"}),children:l.jsx(Oe,{"data-cta":"admin-product-open-source-button",variant:"ghost",outline:!0,size:"icon-xs",onClick:()=>window.open(o.url,"_blank","noopener,noreferrer"),children:l.jsx($d,{className:"size-4"})})}),l.jsx(cn,{title:t._({id:"2Eoi/a"}),children:l.jsx(Oe,{"data-cta":"admin-product-view-details-button",variant:"ghost",outline:!0,size:"icon-xs",onClick:()=>e(o.id),children:l.jsx(Ry,{className:"size-4"})})}),l.jsx(cn,{title:t._({id:"EH95v4"}),children:l.jsx(Oe,{"data-cta":"admin-product-reembed-button",variant:"ghost",className:"text-info",outline:!0,size:"icon-xs",onClick:()=>s({id:o.id}),children:l.jsx(JS,{className:"size-4"})})})]})},meta:{align:"center"}})],[n,r.productAvailabilityStatus,r.shopProductStatus,e,i,s])}const Bv="__all__",Sie="mb-4 flex min-h-11 items-center justify-between gap-2 rounded-lg border py-1.5 px-2",TEe=["pendingProductsCount","embeddingProductsCount","doneProductsCount","failedProductsCount"],Kk=nr("/_baseLayout/chats/$chatId/feeds/$feedId/products")({component:ZPt,loader:async({context:{trpcUtils:e},params:{feedId:t,chatId:n}})=>Promise.all([e.feeds.findOne.ensureData({id:t,populate:[...TEe]}),e.chats.findOne.ensureData({id:n})]),validateSearch:e=>({...e?.status?{status:e.status}:{},...e?.page===void 0?{}:{page:e.page},...e?.pageSize===void 0?{}:{pageSize:e.pageSize},...e?.sort?{sort:e.sort}:{},...e?.search?{search:e.search}:{}})});function ZPt(){const{chatId:e,feedId:t}=Kk.useParams(),n=Kk.useSearch(),r=Kk.useNavigate(),{i18n:i,_:s}=Me(),a=Ir(),[o]=Ae.chats.findOne.useSuspenseQuery({id:e}),[c]=Ae.feeds.findOne.useSuspenseQuery({id:t,populate:[...TEe]},{refetchInterval:5e3}),u=n?.status,d=b.useCallback(re=>{r({search:ae=>({...ae,status:re,page:1})})},[r]),[h,p]=b.useState(),[g,v]=b.useState(),[x,_]=b.useState(""),[w,S]=b.useState(""),E=Hy(w,500),[T,N]=b.useState(new Set),A=T.size>0,[k,j]=b.useState(null),[R,P]=b.useState(!1),[V,U]=b.useState(!1),{reEmbed:G,update:Q}=KU(),{found:Z,awaiting:K}=mEe(c),te=Number(c.pendingProductsCount),ne=Number(c.embeddingProductsCount),se=Number(c.doneProductsCount),H=Number(c.failedProductsCount),O=b.useCallback((re,ae)=>{N(ce=>{const Te=new Set(ce);return ae?Te.add(re):Te.delete(re),Te})},[]),L=b.useCallback((re,ae)=>{N(ce=>{const Te=new Set(ce);for(const fe of re)ae?Te.add(fe):Te.delete(fe);return Te})},[]),M=QPt({onOpenDetail:j}),q=b.useMemo(()=>({selectedIds:T,onToggleOne:O,onToggleAll:L}),[T,O,L]),X=b.useCallback(async({page:re,pageSize:ae,sort:ce})=>{const Te={feed:t};E&&(Te.name={$ilike:`%${E}%`}),u&&(Te.status=u),h&&(Te.availability=h),g!==void 0&&(Te.active=g),x&&(Te.$or=[{brand:{$ilike:`%${x}%`}},{categories:{name:{$ilike:`%${x}%`}}}
1417,{categories:{displayName:{$ilike:`%${x}%`}}}]);const fe=await Cs.shopProducts.findAll.query({where:Te,pagination:{page:re,pageSize:ae},orderBy:ce,populate:["categories"]});return{items:fe.items,pageCount:fe.meta.pageCount}},[t,E,u,h,g,x]),J=b.useCallback(async()=>{await Promise.all([...T].map(re=>G.mutateAsync({id:re}))),N(new Set)},[T,G]),W=b.useCallback(async()=>{await Promise.all([...T].map(re=>Q.mutateAsync({id:re,active:!1}))),N(new Set)},[T,Q]);return l.jsxs(l.Fragment,{children:[l.jsxs(Px,{refetchInterval:5e3,title:c.name,breadcrumbs:[{label:o.name,to:"/chats/$chatId/edit",params:{chatId:e}},{label:i._({id:"miIIdx"}),to:"/chats/$chatId/feeds",params:{chatId:e}},{label:c.name,to:"/chats/$chatId/feeds/$feedId/products",params:{chatId:e,feedId:t}}],columns:M,showSearch:!1,options:{meta:q},queryKey:[...ml(Ae.shopProducts.findAll),{feedId:t,debouncedSearch:E,statusFilter:u,availabilityFilter:h,activeFilter:g,brandFilter:x}],onQueryFn:X,onRow:(re,ae)=>O(ae.original.id,!T.has(ae.original.id)),onDoubleClick:(re,ae)=>j(ae.original.id),children:[l.jsx(gEe,{feed:c,showCounts:!1}),l.jsx(xEe,{foundCount:Z,awaitingImportCount:K,pendingCount:te,embeddingCount:ne,doneCount:se,failedCount:H,activeStatusFilter:u,onStatusFilterChange:d}),l.jsx("div",{className:A?`${Sie} border border-primary/20 bg-primary/5`:`${Sie} border-transparent`,children:A?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("span",{className:"text-sm font-medium",children:i._({id:"fvImQM",values:{0:T.size}})}),l.jsx("button",{className:"text-xs text-muted-fg underline",onClick:()=>N(new Set),children:i._({id:"HlKgQk"})})]}),l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx(cn,{title:i._({id:"T3FYpg"}),children:l.jsx(Oe,{variant:"ghost",outline:!0,size:"icon-xs",onClick:()=>U(!0),"aria-label":i._({id:"T3FYpg"}),children:l.jsx(JS,{className:"size-4"})})}),l.jsx(cn,{title:i._({id:"iO6Nqm"}),children:l.jsx(Oe,{variant:"ghost",outline:!0,size:"icon-xs",className:"text-danger",loading:Q.isPending,onClick:W,"aria-label":i._({id:"iO6Nqm"}),children:l.jsx(D9,{className:"size-4"})})})]})]}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx("div",{className:"w-48 shrink-0",children:l.jsx(fn,{type:"search",value:w,onChange:re=>S(re.target.value),placeholder:i._({id:"A1taO8"}),className:"h-8"})}),l.jsx("div",{className:"w-44 shrink-0",children:l.jsxs(tr,{size:"sm",value:h??Bv,onValueChange:re=>p(re===Bv?void 0:re),placeholder:i._({id:"lXkUEV"}),children:[l.jsx(Yt,{value:Bv,children:i._({id:"jAuEWp"})}),Object.values(Wa).map(re=>l.jsx(Yt,{value:re,children:a.productAvailabilityStatus[re]},re))]})}),l.jsx("div",{className:"w-44 shrink-0",children:l.jsxs(tr,{size:"sm",value:g===void 0?Bv:String(g),onValueChange:re=>v(re===Bv?void 0:re==="true"),placeholder:i._({id:"F6pfE9"}),children:[l.jsx(Yt,{value:Bv,children:i._({id:"VEopOI"})}),l.jsx(Yt,{value:"true",children:i._({id:"xysWtw"})}),l.jsx(Yt,{value:"false",children:i._({id:"iZk9es"})})]})}),l.jsx("div",{className:"w-40 shrink-0",children:l.jsx(fn,{size:"sm",value:x,onChange:re=>_(re.target.value),placeholder:i._({id:"X7yhDD"})})}),u&&l.jsxs(En,{variant:"secondary",size:"sm",className:"gap-1 pr-1",children:[i._({id:"76ITvt",values:{0:a.shopProductStatus[u]}}),l.jsx("button",{type:"button",className:"rounded p-0.5 hover:bg-muted","aria-label":i._({id:"Q2mGA7"}),onClick:()=>d(void 0),children:l.jsx(pl,{className:"size-3"})})]})]}),l.jsxs(Oe,{"data-cta":"admin-feed-settings-button",variant:"ghost",outline:!0,size:"sm",className:"shrink-0",onClick:()=>P(!0),children:[l.jsx(Dj,{className:"size-4"})," ",i._({id:"Tz0i8g"})]})]})})]}),l.jsx(tb,{open:V,onOpenChange:U,onConfirm:J,title:i._({id:"AIGC9s",values:{0:T.size}}),description:i._({id:"Zt0GIo"}),confirmLabel:i._({id:"EH95v4"}),confirmVariant:"primary",successTitle:i._({id:"OVtCu+"}),successDescription:i._({id:"5gxC4X"})}),l.jsx(KPt,{productId:k,onClose:()=>j(null),chatId:e,feedId:t}),l.jsx(pEe,{open:R,onOpenChange:P,chatId:e,feedId:t})]})}const JPt=b.memo(function({attribute:t,attributes:n,onClose:r}){const{i18n:i,_:s}=Me(),{merge:a}=Q4(),[o,c]=b.useState("");b.useEffect(()=>{c("")},[t]);const u=b.useMemo(()=>n.filter(_=>
1417_.active&&_.id!==t?.id),[n,t]),d=b.useMemo(()=>u.find(_=>_.id===o),[u,o]),h=t?.baseUnit??"",p=d?.baseUnit??"",g=!!(h&&p&&h!==p),v=async()=>{!t||!o||(await a.mutateAsync({sourceId:t.id,targetId:o}),r())},x=t?.displayName??t?.name??"";return l.jsx(ui,{open:!!t,onOpenChange:r,children:l.jsxs(Fi,{className:"w-full max-w-[520px]",children:[l.jsxs(ks,{children:[l.jsx(Wi,{children:l.jsx(D,{id:"/tFb94"})}),l.jsx(no,{children:i._({id:"DEQqVs",values:{sourceLabel:x}})})]}),l.jsxs("div",{className:"flex flex-col gap-1.5 py-2",children:[l.jsx(ot,{htmlFor:"attribute-merge-target",children:l.jsx(D,{id:"fj4oAG"})}),l.jsx(tr,{id:"attribute-merge-target",value:o,onValueChange:c,placeholder:i._({id:"eHcoef"}),children:u.map(_=>l.jsx(Yt,{value:_.id,children:_.displayName??_.name},_.id))}),g&&l.jsx("span",{className:"text-xs text-warning",children:i._({id:"lrOtgg",values:{sourceBaseUnit:h,targetBaseUnit:p}})}),u.length===0&&l.jsx("span",{className:"text-xs text-muted-fg",children:l.jsx(D,{id:"ewflp8"})})]}),l.jsxs(wi,{children:[l.jsx(Oe,{variant:"secondary",onClick:r,children:l.jsx(D,{id:"dEgA5A"})}),l.jsx(Oe,{"data-cta":"admin-feed-attribute-merge-submit-button",variant:"primary",loading:a.isPending,disabled:!o,onClick:v,children:l.jsx(D,{id:"UODtG8"})})]})]})})}),eMt=b.memo(function({attribute:t,onClose:n}){const{i18n:r,_:i}=Me(),{rename:s,update:a}=Q4(),[o,c]=b.useState(""),[u,d]=b.useState("");b.useEffect(()=>{c(t?.name??""),d(t?.displayName??"")},[t]);const h=async()=>{!t||!o.trim()||(await s({id:t.id,name:o.trim(),displayName:u.trim()||null}),n())};return l.jsx(ui,{open:!!t,onOpenChange:n,children:l.jsxs(Fi,{className:"w-full max-w-[520px]",children:[l.jsxs(ks,{children:[l.jsx(Wi,{children:l.jsx(D,{id:"37Dy77"})}),l.jsx(no,{children:l.jsx(D,{id:"wnN3b1"})})]}),l.jsxs("div",{className:"flex flex-col gap-4 py-2",children:[l.jsxs("div",{className:"flex flex-col gap-1.5",children:[l.jsx(ot,{htmlFor:"attribute-display-name",children:l.jsx(D,{id:"pfa8F0"})}),l.jsx(fn,{id:"attribute-display-name",value:u,placeholder:r._({id:"c0lJJE"}),disabled:a.isPending,onChange:p=>d(p.target.value)})]}),l.jsxs("div",{className:"flex flex-col gap-1.5",children:[l.jsx(ot,{htmlFor:"attribute-name",children:l.jsx(D,{id:"LwHzgM"})}),l.jsx(fn,{id:"attribute-name",value:o,disabled:a.isPending,onChange:p=>c(p.target.value)}),l.jsx("span",{className:"text-xs text-muted-fg",children:l.jsx(D,{id:"ixGqoO"})})]})]}),l.jsxs(wi,{children:[l.jsx(Oe,{variant:"secondary",onClick:n,children:l.jsx(D,{id:"dEgA5A"})}),l.jsx(Oe,{"data-cta":"admin-feed-attribute-rename-submit-button",variant:"primary",loading:a.isPending,disabled:!o.trim(),onClick:h,children:l.jsx(D,{id:"tfDRzk"})})]})]})})}),J_=Jm();function tMt({onRename:e,onMerge:t}){const{i18n:n,_:r}=Me(),i=Ir(),{setActive:s,update:a}=Q4();return b.useMemo(()=>[J_.accessor(o=>o.displayName??o.name,{id:"name",header:n._({id:"kBMV/o"}),cell:({row:o})=>{const c=o.original;return l.jsxs("div",{className:"flex min-w-56 flex-col gap-1",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[l.jsx("span",{className:"font-medium leading-tight",children:c.displayName??c.name}),!c.active&&l.jsx(En,{size:"xs",variant:"warning",children:l.jsx(D,{id:"ZH3Y0f"})}),c.active&&c.activeValuesCount===0&&l.jsx(En,{size:"xs",outline:!0,variant:"danger",children:l.jsx(D,{id:"6ClNQ1"})}),!c.filterable&&l.jsx(En,{size:"xs",outline:!0,variant:"muted",children:l.jsx(D,{id:"Hx79kB"})})]}),l.jsx("span",{className:"text-xs text-gray-600",children:c.name}),!!c.aliases?.length&&l.jsx("span",{className:"text-xs text-gray-500",children:n._({id:"7Gwk86",values:{0:c.aliases.join(", ")}})})]})},meta:{sortable:"name"}}),J_.display({id:"dataType",header:n._({id:"+zy2Nq"}),cell:({row:o})=>{const c=o.original;return l.jsxs("div",{className:"flex flex-col gap-1",children:[l.jsx(En,{size:"sm",outline:!0,variant:"primary",children:i.shopAttributeDataType[c.dataType]}),c.unit&&l.jsx("span",{className:"text-xs text-gray-600",children:c.unit}),c.baseUnit&&c.baseUnit!==c.unit&&l.jsx("span",{className:"text-xs text-gray-500",children:n._({id:"fifR4q",values:{0:c.baseUnit}})})]})}}),J_.display({id:"usage",header:n._({id:"7FaY4u"}),cell:({row:o})=>{const c=o.original;return l.jsxs("div",{className:"flex flex-col gap-0.5 text-xs",children:[l.jsx("span",{className:"font-medium",children:n._({id:"qzcray",values:{0:c.productsCount}})}),l.jsx("span",{className:"text-gray-600",children:n._({id:"Fx8Yp4",values:{0:c.activeValuesCount}})}),c.inactiveValuesCount>0&&l.jsx("span",{className:"text-gray-500",children:n._({id:"RxfpUF",values:{0:c.inactiveValuesCount}})})]})},meta:{sortable:"productsCount"}}),J_.display({id:"categories",header:n._({id:"NUrY9o"}),cell:({row:o})=>{const{categories:c}=o.original;return c.length===0?l.jsx("span",{className:"text-xs text-gray-500",children:l.jsx(D,{id:"v7bDOp"})}):l.jsx("div",{className:"flex max-w-72 flex-wrap gap-1",children:c.map(u=>l.jsx(En,{size:"xs",outline:!0,variant:"ghost",children:u.label},u.id))})}}),J_.display({id:"actions",header:n._({id:"7L01XJ"}),cell:({row:o})=>{const c=o.original;return l.jsxs(RU,{children:[l.jsx(cn,{title:n._({id:"2wxgft"}),children:l.jsx(Oe,{"data-cta":"admin-feed-attribute-rename-button",variant:"ghost",outline:!0,size:"icon-xs",onClick:()=>e(c),"aria-label":n._({id:"2wxgft"}),children:l.jsx(ju,{className:"size-4"})})}
1417),l.jsx(cn,{title:n._({id:"MNplvC"}),children:l.jsx(Oe,{"data-cta":"admin-feed-attribute-merge-button",variant:"ghost",outline:!0,size:"icon-xs",onClick:()=>t(c),"aria-label":n._({id:"MNplvC"}),children:l.jsx(CRe,{className:"size-4"})})}),c.active?l.jsx(cn,{title:n._({id:"f5WlEH"}),children:l.jsx(Oe,{"data-cta":"admin-feed-attribute-deactivate-button",variant:"ghost",outline:!0,size:"icon-xs",className:"text-danger",loading:a.isPending&&a.variables?.id===c.id,onClick:()=>s({id:c.id,active:!1}),"aria-label":n._({id:"f5WlEH"}),children:l.jsx(D9,{className:"size-4"})})}):l.jsx(cn,{title:n._({id:"XkzHRX"}),children:l.jsx(Oe,{"data-cta":"admin-feed-attribute-activate-button",variant:"ghost",outline:!0,size:"icon-xs",className:"text-success",loading:a.isPending&&a.variables?.id===c.id,onClick:()=>s({id:c.id,active:!0}),"aria-label":n._({id:"XkzHRX"}),children:l.jsx(Ry,{className:"size-4"})})})]})},meta:{align:"center"}})],[r,i.shopAttributeDataType,e,t,s,a.isPending,a.variables?.id])}const RD="__all__",nMt="mb-4 flex min-h-11 flex-wrap items-center gap-2 rounded-lg border border-transparent py-1.5 px-2",t9=nr("/_baseLayout/chats/$chatId/feeds/$feedId/attributes")({component:rMt,loader:async({context:{trpcUtils:e},params:{feedId:t,chatId:n}})=>Promise.all([e.feeds.findOne.ensureData({id:t}),e.chats.findOne.ensureData({id:n})]),validateSearch:e=>({...e?.page===void 0?{}:{page:e.page},...e?.pageSize===void 0?{}:{pageSize:e.pageSize},...e?.sort?{sort:e.sort}:{},...e?.search?{search:e.search}:{}})});function rMt(){const{chatId:e,feedId:t}=t9.useParams(),n=t9.useSearch(),{i18n:r,_:i}=Me(),[s]=Ae.chats.findOne.useSuspenseQuery({id:e}),[a]=Ae.feeds.findOne.useSuspenseQuery({id:t}),{data:o,dataUpdatedAt:c}=Ae.shopProductAttributes.listByFeed.useQuery({feedId:t}),[u,d]=b.useState(),[h,p]=b.useState(""),g=Hy(h,500),[v,x]=b.useState(null),[_,w]=b.useState(null),S=tMt({onRename:x,onMerge:w}),E=n?.sort,T=b.useCallback(async({page:N,pageSize:A})=>{const k=o??[],j=g.trim().toLowerCase(),R=k.filter(Z=>u==="active"&&!Z.active||u==="inactive"&&Z.active||u==="unused"&&Z.activeValuesCount>0?!1:j?[Z.name,Z.displayName??"",...Z.aliases??[]].some(K=>K.toLowerCase().includes(j)):!0),[P,V]=(E??"name:asc").split(":"),U=V==="desc"?-1:1,G=[...R].sort((Z,K)=>P==="productsCount"?(Z.productsCount-K.productsCount)*U:(Z.displayName??Z.name).localeCompare(K.displayName??K.name)*U),Q=(N-1)*A;return{items:G.slice(Q,Q+A),pageCount:Math.max(1,Math.ceil(G.length/A))}},[o,g,E,u]);return l.jsxs(l.Fragment,{children:[l.jsxs(Px,{title:r._({id:"Zy+dE7"}),breadcrumbs:[{label:s.name,to:"/chats/$chatId/edit",params:{chatId:e}},{label:r._({id:"miIIdx"}),to:"/chats/$chatId/feeds",params:{chatId:e}},{label:a.name,to:"/chats/$chatId/feeds/$feedId/products",params:{chatId:e,feedId:t}},{label:r._({id:"mSjQYg"}),to:"/chats/$chatId/feeds/$feedId/attributes",params:{chatId:e,feedId:t}}],columns:S,showSearch:!1,queryKey:[...ml(Ae.shopProductAttributes.listByFeed),{feedId:t,debouncedSearch:g,statusFilter:u,sortValue:E,dataUpdatedAt:c}],onQueryFn:T,children:[l.jsx("p",{className:"mb-3 text-sm text-muted-fg",children:r._({id:"EgCtB8"})}),l.jsxs("div",{className:nMt,children:[l.jsx("div",{className:"w-56 shrink-0",children:l.jsx(fn,{type:"search",value:h,onChange:N=>p(N.target.value),placeholder:r._({id:"XhIi/G"}),className:"h-8"})}),l.jsx("div",{className:"w-56 shrink-0",children:l.jsxs(tr,{size:"sm",value:u??RD,onValueChange:N=>d(N===RD?void 0:N),placeholder:r._({id:"uAQUqI"}),children:[l.jsx(Yt,{value:RD,children:r._({id:"2oWizi"})}),l.jsx(Yt,{value:"active",children:r._({id:"IOBUqP"})}),l.jsx(Yt,{value:"inactive",children:r._({id:"WUoN/g"})}),l.jsx(Yt,{value:"unused",children:r._({id:"6ClNQ1"})})]})})]})]}),l.jsx(eMt,{attribute:v,onClose:()=>x(null)}),l.jsx(JPt,{attribute:_,attributes:o??[],onClose:()=>w(null)})]})}const AEe=nr("/_baseLayout/chats/$chatId/faqs/$faqId/edit")({component:iMt,loader:async({context:{trpcUtils:e},params:{faqId:t,chatId:n}})=>Promise.all([e.faqs.findOne.ensureData({id:t,populate:["parent"]}),e.chats.findOne.ensureData({id:n})])});function iMt(){const{faqId:e,chatId:t}=AEe.useParams(),[n]=Ae.chats.findOne.useSuspenseQuery({id:t}),{i18n:r,_:i}=Me(),[s]=Ae.faqs.findOne.useSuspenseQuery({id:e,populate:["parent"]});return l.jsx(wo,{title:`${r._({id:"ePK91l"})} - ${s.title}`,breadcrumbs:[{label:n.name,to:"/chats/$chatId/edit",params:{chatId:t}}
1417,{label:r._({id:"aJ4pMe"}),to:"/chats/$chatId/faqs",params:{chatId:t}},{label:s.title,to:"/faqs/$faqId/edit",params:{faqId:e}}],children:l.jsx(wEe,{data:s,chatId:t})})}const kEe=PGe.update({id:"/_fullWidthLayout",getParentRoute:()=>I5}),di=DGe.update({id:"/_baseLayout",getParentRoute:()=>I5}),eg=BGe.update({id:"/_authLayout",getParentRoute:()=>I5}),sMt=VGe.update({id:"/",path:"/",getParentRoute:()=>di}),aMt=qGe.update({id:"/models",path:"/models",getParentRoute:()=>di}),oMt=oSe.update({id:"/inbox/",path:"/inbox/",getParentRoute:()=>kEe}),lMt=$4t.update({id:"/users/",path:"/users/",getParentRoute:()=>di}),cMt=tRt.update({id:"/organizations/",path:"/organizations/",getParentRoute:()=>di}),uMt=FSe.update({id:"/knowledge-base/",path:"/knowledge-base/",getParentRoute:()=>di}),dMt=MIt.update({id:"/chats/",path:"/chats/",getParentRoute:()=>di}),fMt=QL.update({id:"/agent-tools/",path:"/agent-tools/",getParentRoute:()=>di}),hMt=KSe.update({id:"/verify/",path:"/verify/",getParentRoute:()=>eg}),pMt=YSe.update({id:"/reset-password/",path:"/reset-password/",getParentRoute:()=>eg}),mMt=XSe.update({id:"/register/",path:"/register/",getParentRoute:()=>eg}),gMt=QSe.update({id:"/login/",path:"/login/",getParentRoute:()=>eg}),xMt=_Ot.update({id:"/forgotten-password/",path:"/forgotten-password/",getParentRoute:()=>eg}),vMt=EOt.update({id:"/users/create",path:"/users/create",getParentRoute:()=>di}),yMt=nEe.update({id:"/partner-billing/$organizationId",path:"/partner-billing/$organizationId",getParentRoute:()=>di}),bMt=GOt.update({id:"/organizations/create",path:"/organizations/create",getParentRoute:()=>di}),_Mt=YOt.update({id:"/chats/create",path:"/chats/create",getParentRoute:()=>di}),wMt=ZOt.update({id:"/users/profile/",path:"/users/profile/",getParentRoute:()=>di}),SMt=rEe.update({id:"/register/sent/",path:"/register/sent/",getParentRoute:()=>eg}),EMt=iEe.update({id:"/forgotten-password/sent/",path:"/forgotten-password/sent/",getParentRoute:()=>eg}),CMt=sEe.update({id:"/users/$userId/edit",path:"/users/$userId/edit",getParentRoute:()=>di}),TMt=JL.update({id:"/organizations/$organizationId/subscriptions",path:"/organizations/$organizationId/subscriptions",getParentRoute:()=>di}),AMt=aEe.update({id:"/organizations/$organizationId/payments",path:"/organizations/$organizationId/payments",getParentRoute:()=>di}),kMt=lEe.update({id:"/organizations/$organizationId/edit",path:"/organizations/$organizationId/edit",getParentRoute:()=>di}),NMt=Gk.update({id:"/organizations/$organizationId/billing",path:"/organizations/$organizationId/billing",getParentRoute:()=>di}),jMt=uEe.update({id:"/chats/$chatId/edit",path:"/chats/$chatId/edit",getParentRoute:()=>di}),RMt=fEe.update({id:"/agent-tools/client-side/new",path:"/agent-tools/client-side/new",getParentRoute:()=>di}),IMt=hEe.update({id:"/organizations/$organizationId/plan-management/",path:"/organizations/$organizationId/plan-management/",getParentRoute:()=>di}),OMt=vEe.update({id:"/chats/$chatId/feeds/",path:"/chats/$chatId/feeds/",getParentRoute:()=>di}),PMt=bEe.update({id:"/chats/$chatId/faqs/",path:"/chats/$chatId/faqs/",getParentRoute:()=>di}),MMt=e9.update({id:"/chats/$chatId/documents/",path:"/chats/$chatId/documents/",getParentRoute:()=>di}),DMt=SEe.update({id:"/chats/$chatId/faqs/create",path:"/chats/$chatId/faqs/create",getParentRoute:()=>di}),FMt=EEe.update({id:"/agent-tools/client-side/$formToolId/edit",path:"/agent-tools/client-side/$formToolId/edit",getParentRoute:()=>di}),LMt=Kk.update({id:"/chats/$chatId/feeds/$feedId/products",path:"/chats/$chatId/feeds/$feedId/products",getParentRoute:()=>di}),zMt=t9.update({id:"/chats/$chatId/feeds/$feedId/attributes",path:"/chats/$chatId/feeds/$feedId/attributes",getParentRoute:()=>di}),$Mt=AEe.update({id:"/chats/$chatId/faqs/$faqId/edit",path:"/chats/$chatId/faqs/$faqId/edit",getParentRoute:()=>di}),BMt={AuthLayoutForgottenPasswordIndexRoute:xMt,AuthLayoutLoginIndexRoute:gMt,AuthLayoutRegisterIndexRoute:mMt,AuthLayoutResetPasswordIndexRoute:pMt,AuthLayoutVerifyIndexRoute:hMt,AuthLayoutForgottenPasswordSentIndexRoute:EMt,AuthLayoutRegisterSentIndexRoute:SMt},UMt=eg._addFileChildren(BMt),VMt={BaseLayoutModelsRoute:aMt,BaseLayoutIndexRoute:sMt,BaseLayoutChatsCreateRoute:_Mt,BaseLayoutOrganizationsCreateRoute:bMt,BaseLayoutPartnerBillingOrganizationIdRoute:yMt,BaseLayoutUsersCreateRoute:vMt,BaseLayoutAgentToolsIndexRoute:fMt,BaseLayoutChatsIndexRoute:dMt,BaseLayoutKnowledgeBaseIndexRoute:uMt,BaseLayoutOrganizationsIndexRoute:cMt,BaseLayoutUsersIndexRoute:lMt,BaseLayoutAgentToolsClientSideNewRoute:RMt,BaseLayoutChatsChatIdEditRoute:jMt,BaseLayoutOrganizationsOrganizationIdBillingRoute:NMt,BaseLayoutOrganizationsOrganizationIdEditRoute:kMt,BaseLayoutOrganizationsOrganizationIdPaymentsRoute:AMt,BaseLayoutOrganizationsOrganizationIdSubscriptionsRoute:TMt,BaseLayoutUsersUserIdEditRoute:CMt,BaseLayoutUsersProfileIndexRoute:wMt,BaseLayoutAgentToolsClientSideFormToolIdEditRoute:FMt,BaseLayoutChatsChatIdFaqsCreateRoute:DMt,BaseLayoutChatsChatIdDocumentsIndexRoute:MMt,BaseLayoutChatsChatIdFaqsIndexRoute:PMt,BaseLayoutChatsChatIdFeedsIndexRoute:OMt,BaseLayoutOrganizationsOrganizationIdPlanManagementIndexRoute:IMt,BaseLayoutChatsChatIdFaqsFaqIdEditRoute:$Mt,BaseLayoutChatsChatIdFeedsFeedIdAttributesRoute:zMt,BaseLayoutChatsChatIdFeedsFeedIdProductsRoute:LMt},HMt=di._addFileChildren(VMt),qMt={FullWidthLayoutInboxIndexRoute:oMt},WMt=kEe._addFileChildren(qMt),GMt={AuthLayoutRoute:UMt,BaseLayoutRoute:HMt,FullWidthLayoutRoute:WMt},KMt=I5._addFileChildren(GMt)._addFileTypes(),n9=k5e({routeTree:KMt,context:{accessGuard:BWe,authGuard:UWe,queryClient:F0,trpcUtils:gc}});let Eie=null;n9.history.subscribe(()=>{const e=n9.history.location.pathname;os.env==="production"&&hWe(Ug,{previousPath:Eie,currentPath:e}),Eie=e});function YMt(){const e=i$e();return l.jsx(b.Suspense,{fallback:l.jsx(E5,{}),children:l.jsx(Ae.Provider,{client:bGe,queryClient:F0,children:l.jsx(M3e,{client:F0,children:l.jsx(Vde.Provider,{value:e,children:l.jsx(R5e,{router:n9})})})})})}function XMt(e,t){typeof window<"u"&&window.posthog&&window.posthog.captureException(e,{$exception_fingerprint:`${e.name}-${t?.feature||"unknown"}`,context:t,app_version:os.version||"unknown",environment:os.env||"unknown"})}class QMt extends b.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}
1417componentDidCatch(t,n){XMt(t,n),os.debug&&console.error("Error caught by boundary:",t,n)}render(){return this.state.hasError?this.props.fallback||l.jsx("div",{className:"mx-auto flex h-screen max-w-screen-xl items-center justify-center px-4 py-8 lg:px-6 lg:py-16",children:l.jsxs("div",{className:"mx-auto max-w-screen-sm text-center",children:[l.jsx("h1",{className:"mb-4 text-7xl font-extrabold tracking-tight text-secondary lg:text-9xl",children:"Error"}),l.jsx("p",{className:"mb-4 text-3xl font-bold tracking-tight",children:"We are sorry"}),l.jsx("p",{className:"mb-4 text-lg font-light",children:"Something went wrong."}),l.jsx(Oe,{"data-cta":"admin-error-boundary-back-to-homepage",variant:"primary",asChild:!0,children:l.jsx("a",{href:"/",children:"Back to home"})})]})}):this.props.children}}function ZMt(){const{language:e}=Zhe();return b.useEffect(()=>{OWe(e)},[e]),l.jsx(BAe,{i18n:Be,children:l.jsx(YMt,{})})}d3e.createRoot(document.getElementById("root")).render(l.jsx(b.StrictMode,{children:l.jsx(e3e,{apiKey:os.postHog.apiKey,options:{api_host:os.postHog.host,capture_exceptions:!0,secure_cookie:os.env==="production",cross_subdomain_cookie:!0,session_recording:{maskAllInputs:!0,maskTextSelector:"[data-ph-mask]",blockSelector:"[data-ph-no-capture]"},loaded:e=>{e.register({app_version:os.version||"unknown",environment:os.env})}},children:l.jsx(QMt,{children:l.jsx(ZMt,{})})})}));export{Xd as C,QS as P,Y as R,E9e as a,Y6 as b,$e as c,C9e as d,$c as g,l as j,b as r,T7e as u}; 1418//# sourceMappingURL=index-DXXtCVdd.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.