PageSourceSearch

https://hissab.io/assets/react-vendor-C1qj4cTc.js

js hissab.io collected 2026-10-04 11:07:04 UTC 1,037,866 bytes, 111 lines download raw bytes

1import{a as e,t}from"./rolldown-runtime-B0Z9INg1.js";var n=`u`>typeof window?window:void 0,r=`u`>typeof globalThis?globalThis:n,i=r?.navigator,a=r?.document,o=r?.location,s=r?.fetch,c=r?.XMLHttpRequest&&`withCredentials`in new r.XMLHttpRequest?r.XMLHttpRequest:void 0,l=r?.AbortController,u=r?.CompressionStream,d=i?.userAgent;function f(){return!(!n||!1===n.navigator.onLine)}var p=typeof globalThis<`u`?globalThis:n;p&&typeof self>`u`&&(p.self=p),p&&typeof File>`u`&&(p.File=function(){});var m=n??{},h=`0.8.3`,g={DEBUG:!1,LIB_VERSION:h,LIB_NAME:`browser-common`,JS_SDK_VERSION:h},_=function(e){return e.AnonymousId=`anonymous_id`,e.DistinctId=`distinct_id`,e.Props=`props`,e.EnablePersonProcessing=`enable_person_processing`,e.PersonMode=`person_mode`,e.FeatureFlagDetails=`feature_flag_details`,e.FeatureFlags=`feature_flags`,e.FeatureFlagPayloads=`feature_flag_payloads`,e.BootstrapFeatureFlagDetails=`bootstrap_feature_flag_details`,e.BootstrapFeatureFlags=`bootstrap_feature_flags`,e.BootstrapFeatureFlagPayloads=`bootstrap_feature_flag_payloads`,e.OverrideFeatureFlags=`override_feature_flags`,e.Queue=`queue`,e.AiQueue=`ai_queue`,e.AiCaptureQueue=`ai_capture_queue`,e.LogsQueue=`logs_queue`,e.OptedOut=`opted_out`,e.SessionId=`session_id`,e.SessionStartTimestamp=`session_start_timestamp`,e.SessionLastTimestamp=`session_timestamp`,e.PersonProperties=`person_properties`,e.GroupProperties=`group_properties`,e.InstalledAppBuild=`installed_app_build`,e.InstalledAppVersion=`installed_app_version`,e.SessionReplay=`session_replay`,e.PushRegistered=`push_registered`,e.SessionReplayEventTriggerActivatedSession=`session_replay_event_trigger_activated_session`,e.SurveyLastSeenDate=`survey_last_seen_date`,e.SurveysSeen=`surveys_seen`,e.Surveys=`surveys`,e.RemoteConfig=`remote_config`,e.FlagsEndpointWasHit=`flags_endpoint_was_hit`,e.DeviceId=`device_id`,e}({}),v=function(e){return e.GZipJS=`gzip-js`,e.Base64=`base64`,e}({}),y=[`$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`],b=[`token`];function x(e,t){return e.indexOf(t)!==-1}var S=function(e){return e.trim()},C=function(e){return e.replace(/^\$/,``)};function w(e){let t=[];return JSON.stringify(e,function(e,n){if(typeof n==`bigint`)return n.toString();if(typeof n!=`function`&&typeof n!=`symbol`){if(n instanceof Error)return{name:n.name,message:n.message,stack:n.stack};if(n&&typeof n==`object`){for(;t.length>0&&t[t.length-1]!==this;)t.pop();if(t.includes(n))return`[Circular]`;t.push(n)}return n}})??`null`}var T=Object.prototype,E=T.hasOwnProperty,ee=T.toString,D=Array.isArray||function(e){return ee.call(e)===`[object Array]`},O=e=>typeof e==`function`,k=e=>e===Object(e)&&!D(e),A=e=>{if(k(e)){for(let t in e)if(E.call(e,t))return!1;return!0}return!1},j=e=>e===void 0,M=e=>ee.call(e)==`[object String]`,N=e=>M(e)&&e.trim().length===0,P=e=>e===null,F=e=>j(e)||P(e),I=e=>ee.call(e)==`[object Number]`&&e==e,te=e=>I(e)&&e>0,ne=e=>ee.call(e)===`[object Boolean]`,re=e=>x(y,e),ie=e=>x(b,e);function ae(e){return typeof e!=`object`||!e}function oe(e,t){return{}.toString.call(e)===`[object ${t}]`}function L(e){switch({}.toString.call(e)){case`[object Error]`:case`[object Exception]`:case`[object DOMException]`:case`[object DOMError]`:case`[object WebAssembly.Exception]`:return!0;default:return ce(e,Error)}}function se(e){return`u`>typeof Event&&ce(e,Event)}function ce(e,t){try{return e instanceof t}catch{return!1}}var le=[!0,`true`,1,`1`,`yes`],ue=e=>x(le,e),de=[!1,`false`,0,`0`,`no`];function fe(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function pe(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){fe(a,r,i,o,s,`next`,e)}function s(e){fe(a,r,i,o,s,`throw`,e)}o(void 0)})}}var me=`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,pinterestbot,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`.split(`,`),he=function(e,t=[]){if(!e)return!1;let n=e.toLowerCase();return me.concat(t).some(e=>{let t=e.toLowerCase();return n.indexOf(t)!==-1})};function ge(e,t,n,r,i){return t>n&&(r.warn(`min cannot be greater than max.`),t=n),I(e)?e>n?(r.warn(` cannot be  greater than max: `+n+`. Using max value instead.`),n):t>e?(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),ge(i??n,t,n,r))}var _e=class{constructor(e){this.C={},this.I=e.I,this.R=ge(e.bucketSize,0,100,e.$),this.A=ge(e.refillRate,0,this.R,e.$),this.O=ge(e.refillInterval,0,864e5,e.$)}F(e,t){let n=Math.floor((t-e.lastAccess)/this.O);n>0&&(e.tokens=Math.min(e.tokens+n*this.A,this.R),e.lastAccess+=n*this.O)}consumeRateLimit(e){var t;let n=Date.now(),r=String(e),i=this.C[r];return i?this.F(i,n):(i={tokens:this.R,lastAccess:n},this.C[r]=i),i.tokens===0||(i.tokens--,i.tokens===0&&((t=this.I)==null||t.call(this,e)),i.tokens===0)}stop(){this.C={}}},ve=`Mobile`,ye=`Android`,be=`Tablet`,xe=`Android Tablet`,Se=`iPad`,Ce=`Apple Watch`,we=`Safari`,Te=`BlackBerry`,Ee=`Samsung Internet`,De=`Chrome`,Oe=`Chrome iOS`,ke=`Internet Explorer`,Ae=`Internet Explorer Mobile`,je=`Opera`,Me=`Microsoft Edge`,Ne=`Firefox`,Pe=`Firefox iOS`,Fe=`Nintendo`,Ie=`PlayStation`,Le=`Xbox`,Re=`Android Mobile`,ze=`Mobile Safari`,Be=`Windows`,Ve=`Windows Phone`,He=`
1Nokia`,Ue=`Ouya`,We=`Generic `+ve.toLowerCase(),Ge=`Generic `+be.toLowerCase(),Ke=`Konqueror`,qe=`Oculus Browser`,Je=`Vivaldi`,Ye=`Yandex`,Xe=`Whale`,Ze=`DuckDuckGo`,Qe=`Pale Moon`,$e=`Waterfox`,et=`Brave`,tt=`Claude`,nt=`Codex`,rt=`ChatGPT`,it=`Google Search App`,at=RegExp(`Version/(\\d+(\\.\\d+)?)`),ot=RegExp(`(Claude|Codex|ChatGPT)\\/(\\d+(\\.\\d+)?)`),st=new RegExp(Le,`i`),ct=RegExp(`PlayStation \\w+`,`i`),lt=RegExp(`Nintendo \\w+`,`i`),ut=RegExp(`BlackBerry|PlayBook|BB10`,`i`),dt={"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`},ft=function(e,t,n,r){return t||=``,function(e){return e?.brave?et:null}(n)||(r?.detectGoogleSearchApp&&x(e,`GSA/`)?it:x(e,` OPR/`)&&x(e,`Mini`)?`Opera Mini`:x(e,` OPR/`)?je:ut.test(e)?Te:x(e,`IEMobile`)||x(e,`WPDesktop`)?Ae:x(e,`OculusBrowser`)?qe:x(e,`SamsungBrowser`)?Ee:x(e,`Edge`)||x(e,`Edg/`)?Me:x(e,`Vivaldi/`)?Je:x(e,`YaBrowser/`)?Ye:x(e,`Whale/`)?Xe:x(e,`DuckDuckGo/`)||x(e,`Ddg/`)?Ze:x(e,`Claude/`)?tt:x(e,`Codex/`)?nt:x(e,`ChatGPT/`)?rt:x(e,`FBIOS`)?`Facebook Mobile`:x(e,`UCWEB`)||x(e,`UCBrowser`)?`UC Browser`:x(e,`CriOS`)?Oe:x(e,`CrMo`)||x(e,De)?De:x(e,ye)&&x(e,we)?Re:x(e,`FxiOS`)?Pe:x(e.toLowerCase(),Ke.toLowerCase())?Ke:x(e,`Brave/`)?et:((e,t)=>t&&x(t,`Apple`)||function(e){return x(e,we)&&!x(e,De)&&!x(e,ye)}(e))(e,t)?x(e,ve)?ze:we:x(e,`PaleMoon/`)?Qe:x(e,`Waterfox/`)?$e:x(e,Ne)?Ne:x(e,`MSIE`)||x(e,`Trident/`)?ke:x(e,`Gecko`)?Ne:``)},pt={[Ae]:[RegExp(`rv:(\\d+(\\.\\d+)?)`)],[Me]:[RegExp(`Edge?\\/(\\d+(\\.\\d+)?)`)],[De]:[RegExp(`(Chrome|CrMo)\\/(\\d+(\\.\\d+)?)`)],[Oe]:[RegExp(`CriOS\\/(\\d+(\\.\\d+)?)`)],"UC Browser":[RegExp(`(UCBrowser|UCWEB)\\/(\\d+(\\.\\d+)?)`)],[we]:[at],[ze]:[at],[je]:[RegExp(`(Opera|OPR)\\/(\\d+(\\.\\d+)?)`)],[Ne]:[RegExp(`Firefox\\/(\\d+(\\.\\d+)?)`)],[Pe]:[RegExp(`FxiOS\\/(\\d+(\\.\\d+)?)`)],[Ke]:[RegExp(`Konqueror[:/]?(\\d+(\\.\\d+)?)`,`i`)],[Te]:[RegExp(`BlackBerry (\\d+(\\.\\d+)?)`),at],[Re]:[RegExp(`android\\s(\\d+(\\.\\d+)?)`,`i`)],[Ee]:[RegExp(`SamsungBrowser\\/(\\d+(\\.\\d+)?)`)],[qe]:[RegExp(`OculusBrowser\\/(\\d+(\\.\\d+)?)`)],[Je]:[RegExp(`Vivaldi\\/(\\d+(\\.\\d+)?)`)],[Ye]:[RegExp(`YaBrowser\\/(\\d+(\\.\\d+)?)`)],[Xe]:[RegExp(`Whale\\/(\\d+(\\.\\d+)?)`)],[et]:[RegExp(`Brave\\/(\\d+(\\.\\d+)?)`)],[tt]:[ot],[nt]:[ot],[rt]:[ot],[Ze]:[RegExp(`(DuckDuckGo|Ddg)\\/(\\d+(\\.\\d+)?)`)],[Qe]:[RegExp(`PaleMoon\\/(\\d+(\\.\\d+)?)`)],[$e]:[RegExp(`Waterfox\\/(\\d+(\\.\\d+)?)`)],[it]:[RegExp(`GSA\\/(\\d+(\\.\\d+)?)`)],[ke]:[RegExp(`(rv:|MSIE )(\\d+(\\.\\d+)?)`)],Mozilla:[RegExp(`rv:(\\d+(\\.\\d+)?)`)]},mt=function(e,t,n,r){let i=pt[ft(e,t,n,r)];if(j(i))return null;for(let t=0;i.length>t;t++){let n=e.match(i[t]);if(n)return parseFloat(n[n.length-2])}return null},ht=[[RegExp(`Xbox; Xbox (.*?)[);]`,`i`),e=>[Le,e&&e[1]||``]],[new RegExp(Fe,`i`),[Fe,``]],[new RegExp(Ie,`i`),[Ie,``]],[ut,[Te,``]],[new RegExp(Be,`i`),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[Ve,``];if(new RegExp(ve).test(t)&&!/IEMobile\b/.test(t))return[`Windows Mobile`,``];let n=/Windows NT ([0-9.]+)/i.exec(t);if(n&&n[1]){let e=dt[n[1]]||``;return/arm/i.test(t)&&(e=`RT`),[Be,e]}return[Be,``]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>e&&e[3]?[`iOS`,[e[3],e[4],e[5]||`0`].join(`.`)]:[`iOS`,``]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{let t=``;return e&&e.length>=3&&(t=j(e[2])?e[3]:e[2]),[`watchOS`,t]}],[RegExp(`(Android (\\d+)\\.(\\d+)\\.?(\\d+)?|Android)`,`i`),e=>e&&e[2]?[ye,[e[2],e[3],e[4]||`0`].join(`.`)]:[ye,``]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{let t=[`Mac OS X`,``];return e&&e[1]&&(t[1]=[e[1],e[2],e[3]||`0`].join(`.`)),t}],[/Mac/i,[`Mac OS X`,``]],[/CrOS/,[`Chrome OS`,``]],[/Linux|debian/i,[`Linux`,``]]],gt=function(e){for(let t=0;ht.length>t;t++){let[n,r]=ht[t],i=n.exec(e),a=i&&(O(r)?r(i,e):r);if(a)return a}return[``,``]},_t=function(e){return lt.test(e)?Fe:ct.test(e)?Ie:st.test(e)?Le:new RegExp(Ue,`i`).test(e)?Ue:RegExp(`(Windows Phone|WPDesktop)`,`i`).test(e)?Ve:/iPad/.test(e)?Se:/iPod/.test(e)?`iPod Touch`:/iPhone/.test(e)?`iPhone`:/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?Ce:ut.test(e)?Te:/(kobo)\s(ereader|touch)/i.test(e)?`Kobo`:new RegExp(He,`i`).test(e)?He:/(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(ve).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)?ye:xe:RegExp(`(pda|Mobile)`,`i`).test(e)?We:new RegExp(be,`i`).test(e)&&!RegExp(`Tablet pc`,`i`).test(e)?Ge:``},vt=function(e,t){let n=_t(e);return n===Se||n===xe||n===`Kobo`||n===`Kindle Fire`||n===Ge?be:n===Fe||n===Le||n===Ie||n===Ue?`Console`:n===Ce?`Wearable`:n?ve:t?.userAgentDataPlatform===`Android`&&(t?.maxTouchPoints??0)>0?600>Math.min((r=t?.screenWidth)??0,(i=t?.screenHeight)??0)/((a=t?.devicePixelRatio)??1)?ve:be:`Desktop`;var r,i,a},yt=/\bFBAV\/(\d+(?:\.\d+)*)/i,bt=[[/\bInstagram(?:[ /](\d+(?:\.\d+)*))?\b/i,`Instagram`],[/\bBarcelona[ /](\d+(?:\.\d+)*)?/i,`Threads`],[/\b(?:MessengerForiOS|(?:FBAN|FB_IAB)\/Orca-Android)\b/i,`Messenger`,yt],[/\bFBAN\/EMA\b/i,`Facebook Lite`,yt],[/\b(?:FBIOS|(?:FBAN|FB_IAB)\/(?:FB4A|FBIOS))\b/i,`Facebook`,yt],[/\bLinkedInApp(?:\]?\/(\d+(?:\.\d+)*))?\b/i,`LinkedIn`],[/\bTwitter(?:Android| for (?:iPhone|iPad|Android))(?
1:\/(\d+(?:\.\d+)*))?\b/i,`Twitter`],[/\b(?:musical_ly|trill)(?:[_/](\d+\.\d+(?:\.\d+)*))?(?=\b|_)/i,`TikTok`,/\bapp_version\/(\d+(?:\.\d+)*)/i],[/\b(?:MicroMessenger|WeChat)\/(\d+(?:\.\d+)*)?/i,`WeChat`],[/\bLine\/(\d+(?:\.\d+)*)?/i,`Line`],[/\bGSA\/(\d+(?:\.\d+)*)?/i,`Google`],[/\[Pinterest\/(?:iOS|Android)\b|\bPinterest(?: for (?:Android(?: Tablet)?|iOS))?\/(\d+(?:\.\d+)*)/i,`Pinterest`],[/\b(?:WA4A|WAiOS)\/(\d+(?:\.\d+)*)?/i,`WhatsApp`],[/\bSnapchat[ /](\d+(?:\.\d+)*)?/i,`Snapchat`],[/\bBing(?:Web|Sapphire)\/(\d+(?:\.\d+)*)?/i,`Bing`],[/\bNAVER\(inapp; search;/i,`Naver`,/\bNAVER\(inapp; search;[^;)]*; (\d+(?:\.\d+)*)/i],[/\bKAKAOTALK[ /](\d+\.\d+(?:\.\d+)*)?/i,`KakaoTalk`]],xt=`[Truncated]`,St=`[Unserializable]`;function Ct(e){let t=``;for(let n=0;e.length>n;n++){let r=e.charCodeAt(n);if(55296>r||r>56319)t+=56320>r||r>57343?e[n]:`�`;else{let r=e.charCodeAt(n+1);56320>r||r>57343?t+=`�`:(t+=e[n]+e[n+1],n++)}}return t}function wt(e,t){if(!t)return e;let n=[];try{n=Object.keys(t)}catch{n=[]}for(let r of n){let n;try{n=t[r]}catch{n=St}Object.defineProperty(e,r,{value:n,enumerable:!0,writable:!0,configurable:!0})}return e}var Tt=3e5,Et=class{record(e){if(e.kind===`too-large`)return;if(e.kind!==`retry-later`)return void this.reset();if(!e.retryAfterMs)return;let t=this.isOpen(),n=Date.now(),r=Math.min(e.retryAfterMs,Tt);if(!t)return this.ts=n,void(this.es=n+r);this.es=Math.max(this.es,Math.min(n+r,this.ts+Tt))}remainingMs(){let e=Date.now();if(this.ts-5e3>e)return this.reset(),0;let t=Math.min(Tt,Math.max(0,this.es-e));return t===0&&this.reset(),t}isOpen(){return this.remainingMs()>0}reset(){this.es=0,this.ts=0}constructor(){this.es=0,this.ts=0}},Dt=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Ot(e,t){return typeof(n=e)==`string`&&Dt.test(n)?e:t();var n}function kt(e,t){let n=Error(t);try{Object.defineProperty(n,"name",{value:e,writable:!0,enumerable:!0,configurable:!0})}catch{}return n}function At(e){return e&&e.split(`#`)[0]}function jt(e){try{return e()}catch{return}}function Mt(e,t){let n=setTimeout(e,t);return n!=null&&n.unref&&n?.unref(),n}function Nt(e,t,n){return Pt.apply(this,arguments)}function Pt(){return(Pt=pe(function*(e,t,n){let r;try{return yield Promise.race([e,new Promise((e,i)=>{r=Mt(()=>{try{n?.(),e()}catch(e){i(e)}},t)})])}finally{clearTimeout(r)}})).apply(this,arguments)}var Ft,It,Lt;function Rt(e){let t=globalThis._posthogChunkIds;if(!t)return;let n=Object.keys(t);return Lt&&n.length===It||(It=n.length,Lt=n.reduce((n,r)=>{Ft||={};let i=Ft[r];if(i)n[i[0]]=i[1];else{let i=e(r);for(let e=i.length-1;e>=0;e--){let a=i[e]?.filename,o=t[r];if(a&&o){n[a]=o,Ft[r]=[a,o];break}}}return n},{})),Lt}function zt(e){return zt=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},zt(e)}function Bt(e,t,n){return(t=function(e){var t=function(e){if(zt(e)!=`object`||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,`string`);if(zt(n)!=`object`)return n;throw TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}(e);return zt(t)==`symbol`?t:t+``}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function R(e){for(var t=1;arguments.length>t;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Vt(Object(n),!0).forEach(function(t){Bt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Ht=class{constructor(e,t,n=[]){this.coercers=e,this.stackParser=t,this.modifiers=n}buildFromUnknown(e,t={}){let n=t&&t.mechanism||{handled:!0,type:`generic`},r=this.buildCoercingContext(n,t,0).apply(e),i=this.buildParsingContext(t),a=this.parseStacktrace(r,i);return{$exception_list:this.convertToExceptionList(a,n),$exception_level:`error`}}modifyFrames(e){var t=this;return pe(function*(){for(let n of e)n.stacktrace&&n.stacktrace.frames&&D(n.stacktrace.frames)&&(n.stacktrace.frames=yield t.applyModifiers(n.stacktrace.frames));return e})()}coerceFallback(e){return{type:`Error`,value:`Unknown error`,stack:e.syntheticException?.stack,synthetic:!0}}parseStacktrace(e,t){let n,r;if(e.cause!=null&&(n=this.parseStacktrace(e.cause,t)),e.stack!=``&&e.stack!=null)try{r=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?t.ski
1pFirstLines:0),t.chunkIdMap)}catch{}return R(R({},e),{},{cause:n,stack:r,errors:e.errors?.map(e=>this.parseStacktrace(e,t))})}applyChunkIds(e,t){return e.map(e=>(e.filename&&t&&(e.chunk_id=t[e.filename]),e))}applyCoercers(e,t){for(let n of this.coercers)if(n.match(e))return n.coerce(e,t);return this.coerceFallback(t)}applyModifiers(e){var t=this;return pe(function*(){let n=e;for(let e of t.modifiers)n=yield e(n);return n})()}convertToExceptionList(e,t){let n=[],r=(e,i,a)=>{let o=n.length,s=i===void 0?R(R({type:typeof t.type==`string`&&t.type.length>0?t.type:`generic`},typeof t.handled==`boolean`?{handled:t.handled}:t.handled===void 0?{handled:!0}:{}),{},{synthetic:typeof t.synthetic==`boolean`?t.synthetic:e.synthetic,exception_id:o}):{type:`chained`,source:a,synthetic:e.synthetic,exception_id:o,parent_id:i},c={type:e.type,value:e.value,mechanism:s};e.stack&&(c.stacktrace={type:`raw`,frames:e.stack}),n.push(c),e.cause&&r(e.cause,o,`cause`);for(let t of e.errors??[])r(t,o,`member`)};return r(e),n}buildParsingContext(e){return{chunkIdMap:Rt(this.stackParser),skipFirstLines:e.skipFirstLines??1}}getAggregateErrors(e){try{if(L(e)){let t=Object.getPrototypeOf(e);for(let n=0;t&&100>n;n++){let n=Object.getOwnPropertyDescriptor(t,`constructor`)?.value;if(typeof n==`function`&&n.name===`AggregateError`){let t=e.errors;return D(t)?t:void 0}t=Object.getPrototypeOf(t)}}}catch{}}buildCoercingContext(e,t,n=0){let r=0,i=0,a=!1,o=new Set,s=[],c={},l=(e,t,n=0)=>{let l=u(t,n),d=l.apply;if(l.apply=t=>{s.push(e);try{return d(t)}finally{s.pop()}},n>4||n>0&&s.indexOf(e)!==-1)return this.coerceFallback(l);let f=typeof e==`object`&&!!e||typeof e==`function`;if(n===0&&r>=50||f&&o.has(e))return;f&&o.add(e),n===0&&r++;let p=this.getAggregateErrors(e),m,h;a||=!!p;try{if(m=this.applyCoercers(e,l),!m)throw c}catch(e){if(e===c)return void(n===0&&r--);if(!a)throw e;m=this.coerceFallback(l)}if(!p||r>=50)return m;try{h=p.length}catch{return m}if(!Number.isInteger(h)||0>h||h>4294967295)return m;let g=[];for(let e=0;50>r&&1e3>i&&h>e;e++){let n;i++;try{n=l.next(p[e])}catch{r++,n=this.coerceFallback(u(t+1))}n&&g.push(n)}return R(R({},m),{},{errors:g})},u=(n,r=0)=>R(R({},t),{},{syntheticException:n==0?t.syntheticException:void 0,mechanism:n==0?e:{},apply(e){let t=l(e,n,r+1);if(!t)throw c;return t},next:e=>l(e,n+1)}),d=u(n);return R(R({},d),{},{apply:e=>l(e,n)??this.coerceFallback(d)})}},Ut=/^([a-z][a-z0-9.+-]+):/i,Wt=[`http`,`https`,`file`,`blob`,`app`,`capacitor`,`ionic`,`webpack`,`webpack-internal`,`ng`];function Gt(e){if(!e||e===`<anonymous>`)return!1;let t=Ut.exec(e);return!t||Wt.includes(t[1].toLowerCase())}function Kt(e,t,n,r,i){let a={platform:e,filename:t,function:n===`<anonymous>`?`?`:n,in_app:Gt(t)};return j(r)||(a.lineno=r),j(i)||(a.colno=i),a}var qt=(e,t)=>{let n=e.indexOf(`safari-extension`)!==-1,r=e.indexOf(`safari-web-extension`)!==-1;return n||r?[e.indexOf(`@`)===-1?`?`:e.split(`@`)[0],n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Jt=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Yt=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Xt=/\((\S*)(?::(\d+))(?::(\d+))\)/,Zt=(e,t)=>{let n=Jt.exec(e);if(n){let[,e,r,i]=n;return Kt(t,e,`?`,+r,+i)}let r=Yt.exec(e);if(r){if(r[2]&&r[2].indexOf(`eval`)===0){let e=Xt.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}let[e,n]=qt(r[1]||`?`,r[2]);return Kt(t,n,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},Qt=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,$t=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,en=(e,t)=>{let n=Qt.exec(e);if(n){if(n[3]&&n[3].indexOf(` > eval`)>-1){let e=$t.exec(n[3]);e&&(n[1]=n[1]||`eval`,n[3]=e[1],n[4]=e[2],n[5]=``)}let e=n[3],r=n[1]||`?`;return[r,e]=qt(r,e),Kt(t,e,r,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},tn=/\(error: (.*)\)/;function nn(e,t){return e.filename===t.filename&&e.function===t.function&&e.module===t.module&&e.lineno===t.lineno&&e.colno===t.colno}function rn(e){for(let t=1;10>=t;t++){let n=e.length-2*t;if(0>n)break;let r=!0;for(let i=0;t>i;i++)if(!nn(e[n+i],e[n+t+i])){r=!1;break}if(r){for(let r=0;t>r;r++)e[n+r]=e[n+t+r];return e.length=n+t,{start:n,length:t}}}}function an(e,t){let n=t.start+t.length,r=sn(e,t);r&&e.splice(n+r===e.length?n:t.start,r)}function on(e,t){let n=t.start;for(;n>0&&nn(e[n-1],e[n-1+t.length]);)n--;return t.start-n}function sn(e,t){let n=t.start+t.length,r=n;for(;e.length>r&&nn(e[r],e[r-t.length]);)r++;return r-n}function cn(e,t){let n=t[0],r=e.length-(n?on(e,n):0);for(let n of t)r-=sn(e,n);return r}
1function ln(e,t,n){for(let r=0;e.length>r;r++){let i=e[(t+r)%e.length],a=e[(n+r)%e.length];if(i!==a)return a>i}return!1}var un=class{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,t){let n=M(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:n?e.stack:void 0,cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?`DOMError`:`DOMException`}getValue(e){let t=e.name||(this.isDOMError(e)?`DOMError`:`DOMException`);return e.message?`${t}: ${e.message}`:t}isDOMException(e){return oe(e,`DOMException`)}isDOMError(e){return oe(e,`DOMError`)}},dn=class{match(e){return L(e)}coerce(e,t){let n=this.getStack(e),r=n===void 0?t.syntheticException?.stack:void 0,i=!!r;return{type:this.getType(e),value:this.getMessage(e,t),stack:n??r,cause:e.cause?t.next(e.cause):void 0,synthetic:i}}getType(e){return e.name||e.constructor.name}getMessage(e,t){let n=e.message;return String(n.error&&typeof n.error.message==`string`?n.error.message:n)}getStack(e){try{let t=e.stacktrace;if(typeof t==`string`&&t.length>0)return t;let n=e.stack;return typeof n==`string`&&n.length>0?n:void 0}catch{return}}},fn=class{match(e){return!!oe(e,`ErrorEvent`)&&(e.error!=null||this.ur(e))}coerce(e,t){if(e.error!=null)return t.apply(e.error);let n=t.apply(e.message);return R(R({},n),{},{stack:this.cr(e)??n.stack,synthetic:!0})}ur(e){return M(e.message)&&e.message.length>0}cr(e){let t=e,n=t.lineno??0,r=t.colno??0;if(M(t.filename)&&t.filename.length!==0&&n!==0)return`Error\n    at ${t.filename}:${n}:${r}`}},pn=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,mn=class{match(e){return typeof e==`string`}coerce(e,t){let[n,r]=this.getInfos(e);return{type:n??`Error`,value:r??e,stack:t.syntheticException?.stack,synthetic:!0}}getInfos(e){let t=`Error`,n=e,r=e.match(pn);return r&&(t=r[1],n=r[2]),[t,n]}},hn=[`fatal`,`error`,`warning`,`log`,`info`,`debug`];function gn(e,t=40){let n=Object.keys(e);if(n.sort(),!n.length)return`[object has no keys]`;for(let e=n.length;e>0;e--){let r=n.slice(0,e).join(`, `);if(t>=r.length)return e===n.length?r:r.length>t?`${r.slice(0,t)}...`:r}return``}var _n=class{match(e){return typeof e==`object`&&!!e}coerce(e,t){let n=this.getErrorPropertyFromObject(e);return n?t.apply(n):{type:this.getType(e),value:this.getValue(e),stack:this.getStack(e)??t.syntheticException?.stack,level:this.isSeverityLevel(e.level)?e.level:`error`,synthetic:!0}}getType(e){if(se(e))return e.constructor.name;let t=`name`in e?e.name:void 0;return M(t)&&!N(t)?t:`Error`}getValue(e){if(`name`in e&&typeof e.name==`string`){let t=`'${e.name}' captured as exception`;return`message`in e&&typeof e.message==`string`&&(t+=` with message: '${e.message}'`),t}if(`message`in e&&typeof e.message==`string`)return e.message;let t=this.getObjectClassName(e);return`${t&&t!==`Object`?`'${t}'`:`Object`} captured as exception with keys: ${gn(e)}`}isSeverityLevel(e){return M(e)&&!N(e)&&hn.indexOf(e)>=0}getStack(e){try{return M(e.stacktrace)&&e.stacktrace.length>0?e.stacktrace:M(e.stack)&&e.stack.length>0?e.stack:void 0}catch{return}}getErrorPropertyFromObject(e){for(let t in e)if({}.hasOwnProperty.call(e,t)){let n=e[t];if(L(n))return n}}getObjectClassName(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{return}}},vn=class{match(e){return se(e)}coerce(e,t){let n=e.constructor.name;return{type:n,value:`${n} captured as exception with keys: ${gn(e)}`,stack:t.syntheticException?.stack,synthetic:!0}}},yn=class{match(e){return ae(e)}coerce(e,t){return{type:`Error`,value:`Primitive value captured as exception: ${String(e)}`,stack:t.syntheticException?.stack,synthetic:!0}}},bn=class{match(e){return oe(e,`PromiseRejectionEvent`)||this.isCustomEventWrappingRejection(e)}isCustomEventWrappingRejection(e){if(!se(e))return!1;try{let t=e.detail;return typeof t==`object`&&!!t&&`reason`in t}catch{return!1}}coerce(e,t){let n=this.getUnhandledRejectionReason(e);return ae(n)?{type:`UnhandledRejection`,value:`Non-Error promise rejection captured with value: ${String(n)}`,stack:t.syntheticException?.stack,synthetic:!0}:t.apply(n)}getUnhandledRejectionReason(e){try{if(`reason`in e)return e.reason;if(`detail`in e&&e.detail!=null&&typeof e.detail==`object`&&`reason`in e.detail)return e.detail.reason}catch{}return e}},xn=`$message`,Sn=`$timestamp`,Cn=new Set([xn,Sn]),wn={enabled:!0,max_bytes:32768};function Tn(e){return e?{enabled:e.enabled??wn.enabled,max_bytes:Dn(e.max_bytes,wn.max_bytes)}:R({},wn)}var En=class{constructor(e){this.ns=[],this.ss=0,this.Ir=Tn(e)}setConfig(e){this.Ir=Tn(e),this.rs()}add(e){let t=function(e){let t;try{t=w(e)}catch{return}try{let e=JSON.parse(t);if(!k(e))return;let n=e,r=n[xn],i=n[Sn];return!M(r)||r.trim().length===0||!M(i)&&!I(i)?void 0:{step:n,json:t}}catch{return}}(e);if(!t)return;let n=function(e){if(`u`>typeof TextEncoder)return new TextEncoder().encode(e).length;let t=encodeURIComponent(e),n=0;for(let e=0;t.length>e;e++)t[e]===`%`?(n+=1,e+=2):n+=1;return n}(t.json);n>this.Ir.max_bytes||(this.ns.push({step:t.step,bytes:n}),this.ss+=n,this.rs())}getAttachable(){return this.ns.map(e=>e.step)}clear(){this.ns=[],this.ss=0}size(){return this.ns.length}rs(){for(;this.ss>this.Ir.max_bytes&&this.ns.length>0;){let e=this.ns.shift();e&&(this.ss-=e.bytes)}}};function Dn(e,t){if(!I(e)||1/0===e||-1/0===e)return t;let n=Math.floor(e);return 0>n?t:n}var On=e=>{if(typeof e!=`string`)return e;try{return JSON.parse(e)}catch{return e}};function kn(e){return typeof e==`string`||e}function An(e){return typeof e==`string`?e:void 0}var jn=`$feature_flag.$feature_flag_response.$feature_flag_has_experiment.$feature_flag_id.$feature_flag_version.$feature_flag_reason.$feature_flag_request_id.$feature_flag_evaluated_at.$feature_flag_error.locally_evaluated.$groups.$process_person_profile.$geoip_disable.$current_url.$pathname.$referring_domain.utm_source.utm_medium.utm_campaign.utm_content.utm_term.gad_source.mc_cid.gclid.gclsrc.dclid.gbraid.wbraid.fbclid.msclkid.twclid.li_fat_id.igshid.ttclid.rdt_cid.epik.qclid.sccid.irclid._kx.$session_id.$window_id.$lib.$lib_version.$device_id.$is_server`.split(`.`),Mn=`NativeGzipValidationError`,Nn=e=>e.length>=2&&e[0]===31&&e[1]===139,Pn=(e,t)=>e===v.GZipJS||t===v.GZipJS||t===`gzip`,Fn=e=>!(!e||typeof e!=`object`)&&(`name`in e?String(e.name):``)===`NotReadableError`,In,Ln=e=>
1{throw kt(Mn,`Native gzip produced invalid output: ${e}`)},Rn=(zn=pe(function*(e,t){18>e.size&&Ln(`too-short`);let n=new Uint8Array(yield e.slice(0,10).arrayBuffer());Nn(n)&&n[2]===8||Ln(`invalid-header`);let r=new DataView(yield e.slice(e.size-8).arrayBuffer());r.getUint32(0,!0)!==(e=>{let t=(()=>{if(In)return In;In=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)t=1&t?3988292384^t>>>1:t>>>1;In[e]=t>>>0}return In})(),n=4294967295;for(let r=0;e.length>r;r++)n=t[255&(n^e[r])]^n>>>8;return(4294967295^n)>>>0})(t)&&Ln(`invalid-crc`);let i=t.length>>>0;r.getUint32(4,!0)!==i&&Ln(`invalid-size`)}),function(e,t){return zn.apply(this,arguments)}),zn;function Bn(){return Bn=pe(function*(e,t=!0,n){try{let t=new TextEncoder().encode(e),n=new globalThis.CompressionStream(`gzip`),i=n.writable.getWriter(),a=i.write(t).then(()=>i.close()).catch((r=pe(function*(e){try{yield i.abort(e)}catch{}throw e}),function(e){return r.apply(this,arguments)})),o=new Response(n.readable).blob(),[s]=yield Promise.all([o,a]);return yield Rn(s,t),s}catch(e){if(n?.rethrow)throw e;return t&&console.error(`Failed to gzip compress data`,e),null}var r}),Bn.apply(this,arguments)}function Vn(e,t){if(e==null)return{};var n,r,i=function(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;a.length>r;r++)t.includes(n=a[r])||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Hn={}.propertyIsEnumerable;function Un(e,t){try{return Kn(e,t,{ancestors:new WeakSet,remainingNodes:1e4},0)}catch{return[]}}function Wn(e,t,n,r){if(0>=n.remainingNodes)return{stringValue:xt};if(n.remainingNodes--,ne(e))return{boolValue:e};if(typeof e==`bigint`)return function(e,t){let n=e.toString(),r=BigInt(`9223372036854775808`);return e>=r||-r>e?(t?.debug(`Attribute ${n} is outside the int64 range; encoding it as a string`),{stringValue:n}):{intValue:n}}(e,t);if(typeof e==`number`){if(!Number.isFinite(e))return{stringValue:String(e)};if(Number.isInteger(e)){if(Number.isSafeInteger(e))return{intValue:String(e)};if(typeof BigInt>`u`)return{stringValue:String(e)};let n=BigInt(e).toString();return e>=0x8000000000000000||-0x8000000000000000>e?(t?.debug(`Attribute ${n} is outside the int64 range; encoding it as a string`),{stringValue:n}):{intValue:n}}return{doubleValue:e}}if(typeof e==`string`)return{stringValue:Ct(e)};if(typeof e==`function`)return{stringValue:`[Function]`};if(typeof e==`symbol`)return{stringValue:String(e)};if(typeof e==`object`&&e){if(n.ancestors.has(e))return{stringValue:`[Circular]`};if(r>=20)return{stringValue:xt};if(e instanceof Date){let t=e.getTime(),n=Number.isFinite(t)?e.toISOString():String(e);return{stringValue:typeof n==`string`?Ct(n):String(n)}}n.ancestors.add(e);try{try{let i=e.toJSON;if(typeof i==`function`)return Wn(i.call(e),t,n,r+1)}catch{}return D(e)?{arrayValue:{values:Gn(e,t,n,r+1)}}:{kvlistValue:{values:Kn(e,t,n,r+1)}}}finally{n.ancestors.delete(e)}}return{stringValue:Ct(String(e))}}function Gn(e,t,n,r){let i=[],a=Math.min(e.length,1e3),o=0;for(;a>o&&n.remainingNodes>0;o++)try{let a=o in e?e[o]:void 0;if(F(a))continue;i.push(Wn(a,t,n,r))}catch{i.push({stringValue:St})}return e.length>o&&i.push({stringValue:xt}),i}function Kn(e,t,n,r){let i=[];for(let a in e)if(Hn.call(e,a)){if(!a){t?.debug(`Dropping an attribute with an empty key`);continue}if(i.length>=1e3||0>=n.remainingNodes){t?.debug(`Attributes truncated: the value exceeds the OTLP encoder budget`);break}try{let o=e[a];if(P(o)||j(o))continue;i.push({key:Ct(a),value:Wn(o,t,n,r)})}catch{i.push({key:Ct(a),value:{stringValue:St}})}}return i}function qn(e,t,n){return R(R(R(R({},wt({},e.resourceAttributes)),{},{"service.name":e.serviceName||`unknown_service`},e.environment&&{"deployment.environment":e.environment}),e.serviceVersion&&{"service.version":e.serviceVersion}),{},{"telemetry.sdk.name":t,"telemetry.sdk.version":n})}var Jn=[`service.name`,`deployment.environment`,`service.version`,`telemetry.sdk.name`,`telemetry.sdk.version`];function Yn(e,t){let n=wt({},e),r={};for(let e of Jn)({}).hasOwnProperty.call(n,e)&&(r[e]=n[e],delete n[e]);return[...Un(n,t),...Un(r,t)]}var Xn={darwin:`macOS`,win32:`Windows`,cygwin:`Windows`,linux:`Linux`,android:`Android`,freebsd:`FreeBSD`,openbsd:`OpenBSD`,netbsd:`NetBSD`,sunos:`SunOS`,aix:`AIX`,haiku:`Haiku`,"Mac OS X":`macOS`},Zn={trace:{text:`TRACE`,number:1},debug:{text:`DEBUG`,number:5},info:{text:`INFO`,number:9},warn:{text:`WARN`,number:13},error:{text:`ERROR`,number:17},fatal:{text:`FATAL`,number:21}},Qn=Zn.info;function $n(e){try{return Ct(String(e))}catch{return St}}function er(e,t,n,r){let{text:i,number:a}=Zn[e.level||`info`]||Qn,o=function(e=Date.now()){return String(e)+`000000`}(I(r)?r:void 0),s={};t.distinctId&&(s.posthogDistinctId=t.distinctId),t.sessionId&&(s.sessionId=t.sessionId),t.windowId&&(s[`window.id`]=t.windowId),F(t.sessionStartTimestamp)||(s.sessionStartTimestamp=String(t.sessionStartTimestamp)),F(t.lastActivityTimestamp)||(s.lastActivityTimestamp=String(t.lastActivityTimestamp)),t.currentUrl&&(s[`url.full`]=t.currentUrl),t.screenName&&(s[`screen.name`]=t.screenName),t.appState&&(s[`app.state`]=t.appState),t.activeFeatureFlags&&t.activeFeatureFlags.length>0&&(s.feature_flags=t.activeFeatureFlags);let c=R({},s),l=e.attributes;if(l){let e=[];try{e=Object.keys(l)}catch{e=[]}for(let t of e){let e;try{e=l[t]}catch{e=St}Object.defineProperty(c,t,{value:e,enumerable:!0,writable:!0,configurable:!0})}}
1let u={timeUnixNano:o,observedTimeUnixNano:o,severityNumber:a,severityText:i,body:{stringValue:$n(e.body)},attributes:Un(c,n)};return e.trace_id&&(u.traceId=e.trace_id),e.span_id&&(u.spanId=e.span_id),j(e.trace_flags)||(u.flags=e.trace_flags),u}function tr(e,t,n){return qn(e,t,n)}function nr(e,t,n,r){return{resourceLogs:[{resource:{attributes:Yn(t)},scopeLogs:[{scope:{name:n,version:r},logRecords:e}]}]}}var rr=class{constructor(e){this.ls=e,this.us=0}get pending(){return!!this.hs}arm(e){this.clear(),this.us=Date.now()+e,this.hs=Mt(()=>{this.hs=void 0,this.ls()},e)}armNoEarlierThan(e){this.hs&&Date.now()+e<=this.us||this.arm(e)}clear(){this.hs&&=(clearTimeout(this.hs),void 0)}};function ir(){return .75+.5*Math.random()}function ar(e,t,n,r){let i=e*2**Math.min(Math.max(0,t-1),6);return Math.round((r===void 0?i:Math.min(i,Math.max(r,e)))*n)}var or=class{constructor(e,t,n,r,i,a=()=>Promise.resolve(),o){this._instance=e,this.Ir=t,this.$=n,this.cs=r,this.ds=i,this.vs=a,this.fs=o,this.ps=new rr(()=>this.gs()),this.ys=null,this.bs=0,this._s=0,this.ws=new Et,this.ks=0,this.Ss=1,this.xs=0,this.Cs=0,this.$s=!1,this.Is=t.maxBufferSize,this.Ts=Math.max(t.maxQueueSize??t.maxBufferSize,t.maxBufferSize),this.Ms=t.flushIntervalMs,this.Es=t.maxBatchRecordsPerPost,this.Ps=t.rateCapWindowMs,this.Rs=t.maxLogsPerInterval}clearQueue(){this._s++,this._instance.setPersistedProperty(_.LogsQueue,[])}reset(){this.ps.clear(),this.xs=0,this.Cs=0,this.$s=!1,this.ks=0,this.Ss=1,this.ws.reset(),this.Es=this.Ir.maxBatchRecordsPerPost}onReconnect(){this.ks=0,this.Ss=1,this.ws.isOpen()?this.As()&&this.Fs():this.gs()}captureLog(e,t){if(this._instance.isDisabled||this._instance.optedOut||!e?.body)return;let n=this.Os(e);if(n===null)return;if(!n.body)return void this.$.info(`Log was rejected in beforeSend function`);if(!this.Ds())return;let r={record:er(n,t?.context??this.cs(),this.$,t?.occurredAtMs)};this.ds(()=>this.Ls(r))}Os(e){let t=this.Ir.beforeSend;if(!t)return e;let n=D(t)?t:[t],r=e;for(let e of n)try{let t=e(r);if(!t)return this.$.info(`Log was rejected in beforeSend function`),null;r=t}catch(e){return this.$.error(`Error in beforeSend function for log:`,e),null}return r}Ds(){if(this.Rs===void 0)return!0;let e=Date.now(),t=e-this.xs;return this.Ps>t&&t>=0||(this.xs=e,this.Cs=0,this.$s=!1),this.Rs>this.Cs?(this.Cs++,!0):(this.$s||=(this.$.warn(`captureLog dropping logs: exceeded ${this.Rs} logs per ${this.Ps}ms`),!0),!1)}flush(){var e=this;return pe(function*(){if(!e._instance.isDisabled)return e.ys||=e.Ns().finally(()=>{e.ys=null}),e.ys})()}Ns(){var e=this;return pe(function*(){e.ps.clear();let t=e._instance.getPersistedProperty(_.LogsQueue)??[];if(t.length===0)return;let n=t.length,r=0;for(;t.length>0&&n>r;){let n=e._s;e.bs=0;let i=Math.min(t.length,e.Es),a=t.slice(0,i),o=nr(a.map(e=>e.record),e.qs(),e.fs??e._instance.getLibraryId(),e._instance.getLibraryVersion()),s=yield e._instance.js(o);if(e._s!==n)return;if(s.kind===`too-large`&&a.length>1)e.Es=Math.max(1,Math.floor(a.length/2)),e.$.warn(`Logs batch of size ${a.length} was too large for the ingestion endpoint, reducing batch size to ${e.Es}`);else if(e.ws.record(s),e.ps.pending&&e.ps.arm(Math.max(e.Ms,e.ws.remainingMs())),s.kind===`retry-later`||(s.kind===`too-large`?e.$.warn(`Dropping a single log record with batch size 1 — the record is larger than the server cap and cannot be split further.`):s.kind===`ok`&&e.Ir.maxBatchRecordsPerPost>e.Es&&(e.Es=Math.min(e.Ir.maxBatchRecordsPerPost,e.Es+1)),yield e.Bs(a.length),t=e._instance.getPersistedProperty(_.LogsQueue)??[],r+=a.length,s.kind===`fatal`))throw s.error}})()}Bs(e){var t=this;return pe(function*(){let n=Math.max(0,e-t.bs),r=t._instance.getPersistedProperty(_.LogsQueue)??[];t._instance.setPersistedProperty(_.LogsQueue,r.slice(n)),yield t.vs()})()}qs(){return tr(this.Ir,this._instance.getLibraryId(),this._instance.getLibraryVersion())}Ls(e){if(this._instance.optedOut)return;let t=this._instance.getPersistedProperty(_.LogsQueue)??[];this.Ts>t.length||(t.shift(),this.bs++,this.$.info(`Logs queue is full, dropping oldest record.`)),t.push(e),this._instance.setPersistedProperty(_.LogsQueue,t),this.Is>t.length||this.ws.isOpen()?this.Fs():this.gs()}Fs(){this.ps.pending||this.ps.arm(Math.max(this.Ms,this.ws.remainingMs()))}Hs(){return Math.max(ar(this.Ms,this.ks,this.Ss,3e4),this.ws.remainingMs())}As(){let e=this._instance.getPersistedProperty(_.LogsQueue);return!!e&&e.length>0}shutdown(e){var t=this;return pe(function*(){t.ps.clear();let n=t.flush().catch(()=>{});e===void 0?yield n:yield Nt(n,e)})()}flushWithTimeout(e){var t=this;return pe(function*(){let n=t.flush();yield Nt(n,e,()=>{n.catch(()=>{})})})()}gs(){this.flush().then(()=>{this.ks=0,this.Ss=1},e=>{this.ks++,this.Ss=ir(),this.$.error(`PostHog logs flush failed:`,e)}).finally(()=>{!this._instance.isDisabled&&this.As()&&this.ps.armNoEarlierThan(this.Hs())})}},sr=[0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4];function cr(e){return String(e)+`000000`}function lr(e,t,n,r){let i=``;return r&&(i=Object.keys(r).sort().map(e=>`${JSON.stringify(e)}:${JSON.stringify(r[e])}`).join(`,`)),`${e}\0${t}\0${n??``}\0${i}`}var ur=class{constructor(e,t,n){this._instance=e,this.Ir=t,this.$=n,this.zs=new Map,this.ps=new rr(()=>this.flush().catch(e=>{this.$.error(`Metrics flush failed:`,e)})),this.ys=null,this.Us=!1,this.Ws=new Map,this.Vs=new Set,this.ws=new Et,this.ks=0,this.Ss=1,this.Gs=0}count(e,t=1,n){this.Zs({name:e,type:`count`,value:t,unit:n?.unit,attributes:n?.attributes})}
1gauge(e,t,n){this.Zs({name:e,type:`gauge`,value:t,unit:n?.unit,attributes:n?.attributes})}histogram(e,t,n){this.Zs({name:e,type:`histogram`,value:t,unit:n?.unit,attributes:n?.attributes})}flush(){var e=this;let t=this.ys,n=function(){var n=pe(function*(){t&&(yield t.catch(()=>{})),yield e.Qs()});return function(){return n.apply(this,arguments)}}()().finally(()=>{this.ys===n&&(this.ys=null)});return this.ys=n,n}drainWindow(){if(this.zs.size===0)return null;let e=this.zs;return this.zs=new Map,this.Us=!1,this.Ws=new Map,this.Vs=new Set,this.Js(e)}reset(){this.Gs++,this.ws.reset(),this.ks=0,this.Ss=1,this.ps.clear(),this.zs=new Map,this.ys=null,this.Us=!1,this.Ws=new Map,this.Vs=new Set}Zs(e){if(this._instance.isDisabled||this._instance.optedOut)return;let t=this.Os(e);if(t===null)return;if(!t.name||typeof t.name!=`string`)return void this.$.warn(`Dropping metric with empty name`);if(typeof t.value!=`number`||!Number.isFinite(t.value))return void this.$.warn(`Dropping metric '${t.name}': value must be a finite number`);if(t.type===`count`&&0>t.value)return void this.$.warn(`Dropping count '${t.name}': counters are monotonic, value must be >= 0`);let n,r;try{n=t.attributes?R({},t.attributes):void 0,r=lr(t.type,t.name,t.unit,n)}catch(e){this.$.warn(`Dropping metric '${t.name}': attributes could not be serialized`,e);return}let i=this.zs.get(r);if(!i){if(!this.Ks())return;i={name:t.name,type:t.type,unit:t.unit,attributes:n,windowStartMs:Date.now()},this.zs.set(r,i)}let a=this.Ws.get(t.name);a===void 0?this.Ws.set(t.name,t.type):a===t.type||this.Vs.has(t.name)||(this.Vs.add(t.name),this.$.warn(`Metric name '${t.name}' is already used as a ${a}; recording it as a ${t.type} too will blend both series in charts. Use a distinct name.`)),this.Xs(i,t.value),this.Fs()}Ks(){return this.Ir.maxSeriesPerFlush>this.zs.size||(this.Us||(this.Us=!0,this.$.warn(`Metric series cap reached (${this.Ir.maxSeriesPerFlush} per flush window); dropping new series until the next flush. Reduce attribute cardinality.`)),!1)}Xs(e,t){switch(e.type){case`count`:e.total=(e.total??0)+t;break;case`gauge`:e.last=t;break;case`histogram`:{e.hist||={count:0,sum:0,min:t,max:t,bucketCounts:Array(sr.length+1).fill(0)};let n=e.hist;n.count+=1,n.sum+=t,n.min=Math.min(n.min,t),n.max=Math.max(n.max,t),n.bucketCounts[function(e,t){for(let n=0;t.length>n;n++)if(t[n]>=e)return n;return t.length}(t,sr)]+=1;break}}}Os(e){let t=this.Ir.beforeSend;if(!t)return e;let n=D(t)?t:[t],r=e;for(let e of n)try{let t=e(r);if(!t)return this.$.info(`Metric was rejected in beforeSend function`),null;r=t}catch(e){return this.$.error(`Error in beforeSend function for metric:`,e),null}return r}Fs(){this.ps.pending||this.ps.arm(this.Hs())}Hs(){return Math.max(ar(this.Ir.flushIntervalMs,this.ks,this.Ss,3e4),this.ws.remainingMs())}Qs(){var e=this;return pe(function*(){if(e.ps.clear(),e.zs.size===0)return;let t=e.zs;e.zs=new Map,e.Us=!1,e.Ws=new Map,e.Vs=new Set;let n=e.Gs,r=yield e._instance.Ys(e.Js(t));if(n===e.Gs)switch(e.ws.record(r),r.kind===`retry-later`?(e.ks++,e.Ss=ir()):(e.ks=0,e.Ss=1),e.ps.pending&&e.ps.arm(e.Hs()),r.kind){case`ok`:return;case`retry-later`:e.lo(t),e.ps.armNoEarlierThan(e.Hs());return;case`too-large`:e.$.warn(`Metrics batch exceeded the server size limit and was dropped`);return;case`fatal`:e.$.error(`Failed to send metrics batch:`,r.error);return}})()}Js(e){return t=this.uo(e),n=function(e,t,n){return qn(e,t,n)}(this.Ir,this._instance.getLibraryId(),this._instance.getLibraryVersion()),r=this._instance.getLibraryId(),i=this._instance.getLibraryVersion(),{resourceMetrics:[{resource:{attributes:Yn(n)},scopeMetrics:[{scope:{name:r,version:i},metrics:t}]}]};var t,n,r,i}uo(e){let t=cr(Date.now()),n=new Map;for(let r of e.values()){let e=lr(r.type,r.name,r.unit,void 0),i=n.get(e);i||(i=R({name:r.name},r.unit&&{unit:r.unit}),r.type===`count`?i.sum={aggregationTemporality:1,isMonotonic:!0,dataPoints:[]}:r.type===`gauge`?i.gauge={dataPoints:[]}:i.histogram={aggregationTemporality:1,dataPoints:[]},n.set(e,i));let a=Un(r.attributes??{},this.$),o=cr(r.windowStartMs);if(r.type===`count`){let e={attributes:a,startTimeUnixNano:o,timeUnixNano:t,asDouble:r.total??0};i.sum.dataPoints.push(e)}else if(r.type===`gauge`){let e={attributes:a,timeUnixNano:t,asDouble:r.last??0};i.gauge.dataPoints.push(e)}else r.hist&&i.histogram.dataPoints.push({attributes:a,startTimeUnixNano:o,timeUnixNano:t,count:r.hist.count,sum:r.hist.sum,min:r.hist.min,max:r.hist.max,bucketCounts:r.hist.bucketCounts,explicitBounds:sr})}return Array.from(n.values())}lo(e){for(let[t,n]of e){let e=this.zs.get(t);if(e)switch(e.windowStartMs=Math.min(e.windowStartMs,n.windowStartMs),e.type){case`count`:e.total=(e.total??0)+(n.total??0);break;case`gauge`:break;case`histogram`:if(n.hist){if(e.hist){e.hist.count+=n.hist.count,e.hist.sum+=n.hist.sum,e.hist.min=Math.min(e.hist.min,n.hist.min),e.hist.max=Math.max(e.hist.max,n.hist.max);for(let t=0;e.hist.bucketCounts.length>t;t++)e.hist.bucketCounts[t]+=n.hist.bucketCounts[t]}else e.hist=n.hist}}else this.Ks()&&this.zs.set(t,n)}}},dr=(e,{debugEnabled:t}={})=>{let r={N(r,...i){n&&(g.DEBUG||n.POSTHOG_DEBUG||t)&&!j(n.console)&&n.c
1onsole&&(`__rrweb_original__`in n.console[r]?n.console[r].__rrweb_original__:n.console[r])(e,...i)},debug(...e){r.N(`debug`,...e)},info(...e){r.N(`log`,...e)},warn(...e){r.N(`warn`,...e)},error(...e){r.N(`error`,...e)},critical(...t){console.error(e,...t)},uninitializedWarning(e){r.error(`You must initialize PostHog before calling ${e}`)},createLogger:(t,n)=>dr(`${e} ${t}`,n)};return r},z=dr(`[PostHog.js]`),fr=z.createLogger,pr=fr(`[ExternalScriptsLoader]`),mr=e=>{let t=a?.querySelectorAll(`script`);if(t){for(let n=0;t.length>n;n++)if(t[n].src===e||t[n].getAttribute(`src`)===e)return t[n]}},hr=(e,t,n)=>{if(e.config.disable_external_dependency_loading)return pr.warn(`${t} was requested but loading of external scripts is disabled.`),n(`Loading of external scripts is disabled`);let r=mr(t);if(r){if(r.__posthog_loading_callback_fired)return n();let e=r.__posthog_loading_error;return e?n(e):(r.addEventListener(`load`,e=>{r.__posthog_loading_callback_fired=!0,n(void 0,e)}),void r.addEventListener(`error`,e=>{r.__posthog_loading_error=e,n(e)}))}let i=()=>{if(!a)return n(`document not found`);if(mr(t))return hr(e,t,n);let r=a.createElement(`script`);if(r.type=`text/javascript`,r.crossOrigin=`anonymous`,r.src=t,r.onload=e=>{r.__posthog_loading_callback_fired=!0,n(void 0,e)},r.onerror=e=>{r.__posthog_loading_error=e,n(e)},e.config.prepare_external_dependency_script&&(r=e.config.prepare_external_dependency_script(r)),!r)return n(`prepare_external_dependency_script returned null`);if(e.config.external_scripts_inject_target===`head`)a.head.appendChild(r);else{let e=a.querySelectorAll(`body > script`);var i;e.length>0?(i=e[0].parentNode)==null||i.insertBefore(r,e[0]):a.body.appendChild(r)}};a?.body?i():a?.addEventListener(`DOMContentLoaded`,i)},gr={},_r=(e,t)=>{let n=`/static/${t}.js?v=${e.version}`;if(t===`toolbar`){let e=3e5;n=`${n}&t=${Math.floor(Date.now()/e)*e}`}return e.requestRouter.endpointFor(`assets`,n)};m.__PosthogExtensions__=m.__PosthogExtensions__||{},m.__PosthogExtensions__.loadExternalDependency=(e,t,n)=>{if(t===`remote-config`){hr(e,e.requestRouter.endpointFor(`assets`,`/array/${e.config.token}/config.js`),n);return}let r=e.config.strict_script_versioning;if(r){let i=e.requestRouter.endpointFor(`assets`,`/static/${e.version}/${t}.js`),a=gr[i];if(r===`fallback`&&a){if(mr(a))return void hr(e,a,n);delete gr[i]}hr(e,i,r===`fallback`?(r,a)=>{if(r){if(typeof r==`string`)n(r);else{var o;let r=_r(e,t);gr[i]=r;let a=mr(i);a==null||(o=a.parentNode)==null||o.removeChild(a),hr(e,r,n)}}else n(void 0,a)}:n);return}hr(e,_r(e,t),n)},m.__PosthogExtensions__.loadSiteApp=(e,t,n)=>{hr(e,e.requestRouter.endpointFor(`api`,t),n)},g.DEBUG=!1,g.LIB_VERSION=`1.433.5`,g.LIB_NAME=`web`;var vr=g,yr=`$people_distinct_id`,br=`distinct_id`,xr=`$device_id`,Sr=`$device_model`,Cr=`__alias`,wr=`__cmpns`,Tr=`$fbc`,Er=`$fbc_persistence`,Dr=`$fbp`,Or=`$fbp_persistence`,kr=`__timers`,Ar=`$autocapture_disabled_server_side`,jr=`$heatmaps_enabled_server_side`,Mr=`$exception_capture_enabled_server_side`,Nr=`$error_tracking_suppression_rules`,Pr=`$error_tracking_capture_extension_exceptions`,Fr=`$web_vitals_enabled_server_side`,Ir=`$dead_clicks_enabled_server_side`,Lr=`$product_tours_enabled_server_side`,Rr=`$logs_capture_enabled_server_side`,zr=`$web_vitals_allowed_metrics`,Br=`$session_recording_remote_config`,Vr=`$session_recording_enabled_server_side`,Hr=`$replay_sample_rate`,Ur=`$replay_override_sampling`,Wr=`$replay_override_linked_flag`,Gr=`$replay_override_url_trigger`,Kr=`$replay_override_event_trigger`,qr=`$sesid`,Jr=`$session_is_sampled`,Yr=`$session_past_minimum_duration`,Xr=`$session_recording_url_trigger_activated_session`,Zr=`$session_recording_event_trigger_activated_session`,Qr=`$debug_first_full_snapshot_timestamp`,$r=`$sess_rec_flush_size`,ei=`$enabled_feature_flags`,ti=`$active_feature_flags`,ni=`$early_access_features`,ri=`$feature_flag_details`,ii=`$feature_flag_payloads`,ai=`$feature_flag_request_id`,oi=`$minimal_flag_called_events`,si=`$override_feature_flags`,ci=`$override_feature_flag_payloads`,li=`$stored_person_properties`,ui=`$stored_group_properties`,di=`$groups`,fi=`$surveys`,pi=`$surveys_loaded_at`,mi=`$surveys_activated`,hi=`$surveys_activated_session`,gi=`$surveys_activated_timestamps`,_i=`ph_product_tours`,vi=`$product_tours_activated`,yi=`$product_tours_activated_session`,bi=`$conversations_widget_session_id`,xi=`$conversations_ticket_id`,Si=`$conversations_widget_state`,Ci=`$conversations_user_traits`,wi=`$flag_call_reported`,Ti=`$flag_call_reported_session_id`,Ei=`$feature_flag_errors`,Di=`$feature_flag_evaluated_at`,Oi=`$user_state`,ki=`$client_session_props`,Ai=`$capture_rate_limit`,ji=`$initial_campaign_params`,Mi=`$initial_referrer_info`,Ni=`$initial_person_info`,Pi=`$epp`,Fi=`$posthog_cookieless`,Ii=`$cookieless_mode`,Li=`$sdk_debug_extensions_init_method`,Ri=`$s
1dk_debug_extensions_init_time_ms`,zi=`$sdk_debug_recording_script_not_loaded`,Bi=`$sdk_debug_replay_event_trigger_status`,Vi=`$sdk_debug_replay_linked_flag_trigger_status`,Hi=`$sdk_debug_replay_matched_recording_trigger_groups`,Ui=`$sdk_debug_replay_pending_trigger_conditions`,Wi=`$sdk_debug_replay_remote_trigger_matching_config`,Gi=`$sdk_debug_replay_trigger_groups_count`,Ki=`$sdk_debug_replay_url_trigger_status`,qi=`$session_recording_start_reason`,Ji=`PostHog loadExternalDependency extension not found.`,Yi=`anonymous`,Xi=`identified`,Zi=`identified_only`,Qi=`visibilitychange`,$i=`beforeunload`,ea=`$pageview`,ta=`$pageleave`,na=`$identify`,ra=`$groupidentify`;function ia(e,t){D(e)&&e.forEach(t)}function aa(e,t){if(!F(e)){if(D(e))e.forEach(t);else if((e=>e instanceof FormData)(e))e.forEach((e,n)=>t(e,n));else for(let n in e)E.call(e,n)&&t(e[n],n)}}var oa=function(e,...t){for(let n of t)for(let t in n)n[t]!==void 0&&(e[t]=n[t]);return e};function sa(e){let t=Object.keys(e),n=t.length,r=Array(n);for(;n--;)r[n]=[t[n],e[t[n]]];return r}var ca=function(e){return function(...t){try{return e.apply(this,t)}catch(e){z.critical(`Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A.`),z.critical(e)}}},la=function(e){let t={};return aa(e,function(e,n){(M(e)&&e.length>0||I(e))&&(t[n]=e)}),t};function ua(e){let t=R({},e);for(let n of[`name`,`message`,`stack`,`cause`,`errors`])try{n in e&&(t[n]=e[n])}catch{}return t}var da=[`herokuapp.com`,`vercel.app`,`netlify.app`];function fa(e){let t=e?.hostname;if(!M(t))return!1;let n=t.split(`.`).slice(-2).join(`.`);for(let e of da)if(n===e)return!1;return!0}function pa(e,t,n,r){let{capture:i=!1,passive:a=!0}=r??{};e?.addEventListener(t,n,{capture:i,passive:a})}function ma(e){return e.name===`ph_toolbar_internal`}var ha=e=>{if(a){try{let t=e+`=`,n=a.cookie.split(`;`).filter(e=>e.length);for(let e=0;n.length>e;e++){let r=n[e];for(;r.charAt(0)==` `;)r=r.substring(1,r.length);if(r.indexOf(t)===0)return decodeURIComponent(r.substring(t.length,r.length))}}catch{}return null}};Math.trunc||(Math.trunc=function(e){return 0>e?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return I(e)&&isFinite(e)&&Math.floor(e)===e});var ga=class e{constructor(e){if(this.bytes=e,e.length!==16)throw TypeError(`not 128-bit length`)}static fromFieldsV7(t,n,r,i){if(!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(r)||!Number.isInteger(i)||0>t||0>n||0>r||0>i||t>0xffffffffffff||n>4095||r>1073741823||i>4294967295)throw RangeError(`invalid field value`);let a=new Uint8Array(16);return a[0]=t/2**40,a[1]=t/2**32,a[2]=t/2**24,a[3]=t/2**16,a[4]=t/256,a[5]=t,a[6]=112|n>>>8,a[7]=n,a[8]=128|r>>>24,a[9]=r>>>16,a[10]=r>>>8,a[11]=r,a[12]=i>>>24,a[13]=i>>>16,a[14]=i>>>8,a[15]=i,new e(a)}toString(){let e=``;for(let t=0;this.bytes.length>t;t++)e=e+(this.bytes[t]>>>4).toString(16)+(15&this.bytes[t]).toString(16),t!==3&&t!==5&&t!==7&&t!==9||(e+=`-`);if(e.length!==36)throw Error(`Invalid UUIDv7 was generated`);return e}clone(){return new e(this.bytes.slice(0))}equals(e){return this.compareTo(e)===0}compareTo(e){for(let t=0;16>t;t++){let n=this.bytes[t]-e.bytes[t];if(n!==0)return Math.sign(n)}return 0}},_a=class{generate(){let e=this.generateOrAbort();if(!j(e))return e;{this.Ct=0;let e=this.generateOrAbort();if(j(e))throw Error(`Could not generate UUID after timestamp reset`);return e}}generateOrAbort(){let e=(()=>{let e=Date.now();return I(e)&&isFinite(e)?Math.min(Math.max(Math.floor(e),0),0xffffffffffff):0})();if(e>this.Ct)this.Ct=e,this.Mt();else{if(this.Ct>=e+1e4)return;this.It++,this.It>4398046511103&&(this.Ct++,this.Mt())}return ga.fromFieldsV7(this.Ct,Math.trunc(this.It/2**30),this.It&2**30-1,this.Tt.nextUint32())}Mt(){this.It=1024*this.Tt.nextUint32()+(1023&this.Tt.nextUint32())}constructor(){this.Ct=0,this.It=0,this.Tt=new ya}},va=e=>{if(`u`>typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw Error(`no cryptographically strong RNG available`);for(let t=0;e.length>t;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};n&&!j(n.crypto)&&crypto.getRandomValues&&(va=e=>crypto.getRandomValues(e));var ya=class{nextUint32(){return this.Rt.length>this.$t||(va(this.Rt),this.$t=0),this.Rt[this.$t++]}constructor(){this.Rt=new Uint32Array(8),this.$t=1/0}},ba,xa=()=>Sa().toString(),Sa=()=>(ba||=new _a).generate(),Ca=``,wa=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,Ta=null,Ea={Et(){if(!P(Ta))return Ta;if(Ta=!1,a)try{let e=`__ph_cookie_support_${xa()}`;Ea.At(e,`xyz`),Ta=ha(e)===`"xyz"`,Ea.Lt(e)}catch{Ta=!1}return Ta},Pt(e){z.error(`cookieStore error: `+e)},Ot:ha,Dt(e){let t;try{t=JSON.parse(Ea.Ot(e))||{}}catch{}return t},At(e,t,n,r,i){if(!a)return!1;try{let o=``,s=``,c=function(e,t){if(t){let t=function(e,t=a){if(Ca)return Ca;if(!t||[`localhost`,`127.0.0.1`].includes(e))return``;let n=e.split(`.`),r=Math.min(n.length,8),i=`dmn_chk_`+xa();for(;!Ca&&r--;){let e=n.slice(r).join(`.`),a=i+`=1;domain=.`+e+`;path=/`;
1t.cookie=a+`;max-age=3`,t.cookie.includes(i)&&(t.cookie=a+`;max-age=0`,Ca=e)}return Ca}(e);if(!t){let n=(e=>{let t=e.match(wa);return t?t[0]:``})(e);n!==t&&z.info(`Warning: cookie subdomain discovery mismatch`,n,t),t=n}return t?`; domain=.`+t:``}return``}(a.location.hostname,r);if(n){let e=new Date;e.setTime(e.getTime()+864e5*n),o=`; expires=`+e.toUTCString()}i&&(s=`; secure`);let l=e+`=`+encodeURIComponent(JSON.stringify(t))+o+`; SameSite=Lax; path=/`+c+s;return l.length>3686.4&&z.warn(`cookieStore warning: large cookie, len=`+l.length),a.cookie=l,!0}catch{return!1}},Lt(e,t){if(a?.cookie)try{Ea.At(e,``,-1,t)}catch{return}}},Da=null,Oa={Et(){if(!P(Da))return Da;let e=!0;if(j(n))e=!1;else try{let t=`__mplssupport__`;Oa.At(t,`xyz`),Oa.Ot(t)!==`"xyz"`&&(e=!1),Oa.Lt(t)}catch{e=!1}return e||z.error(`localStorage unsupported; falling back to cookie store`),Da=e,e},Pt(e){z.error(`localStorage error: `+e)},Ot(e){try{return n?.localStorage.getItem(e)}catch(e){Oa.Pt(e)}return null},Dt(e){try{return JSON.parse(Oa.Ot(e))||{}}catch{}return null},At(e,t){try{return n?.localStorage.setItem(e,JSON.stringify(t)),!0}catch(e){Oa.Pt(e)}return!1},Lt(e){try{n?.localStorage.removeItem(e)}catch(e){Oa.Pt(e)}}},ka=[li,ti,ei,ri,ii,ai,Di,Ei,wi],Aa=[xr,br,qr,Jr,Pi,Ni,Er,Oi],ja=e=>e+`_cpm`,Ma=[`__proto__`,`constructor`,`prototype`],Na=e=>{if(!k(e))return{};let t={};return Object.keys(e).forEach(n=>{Ma.indexOf(n)===-1&&(t[n]=e[n])}),t},Pa=(e,t=[])=>{let n={};return[...Aa,...t].forEach(t=>{let r=e[t];j(r)||P(r)||r===``||(n[t]=r)}),n},Fa=e=>{let t=5381,n=2166136261;for(let r=0;e.length>r;r++){let i=e.charCodeAt(r);t=33*t^i,n=Math.imul(n^i,16777619)}return e.length.toString(36)+`.`+(t>>>0).toString(36)+`.`+(n>>>0).toString(36)},Ia=(e,t)=>({p:t,f:Fa(JSON.stringify(e))}),La=(e,t)=>{if(!t)return{properties:[],isValid:!1};try{let n=Ea.Dt(ja(e)),r=n?.f===Fa(t)&&D(n.p);return{properties:r?n.p:[],isValid:r}}catch{return{properties:[],isValid:!1}}},Ra=(e,t)=>t+`|`+(Ea.Ot(ja(e))||``),za={},Ba={Et:()=>!0,Pt(e){z.error(`memoryStorage error: `+e)},Ot:e=>e in za?za[e]:null,Dt:e=>e in za?za[e]:null,At:(e,t)=>(za[e]=t,!0),Lt(e){delete za[e]}},Va=null,Ha={Et(){if(!P(Va))return Va;if(Va=!0,j(n))Va=!1;else try{let e=`__support__`;Ha.At(e,`xyz`),Ha.Ot(e)!==`"xyz"`&&(Va=!1),Ha.Lt(e)}catch{Va=!1}return Va},Pt(e){z.error(`sessionStorage error: `,e)},Ot(e){try{return n?.sessionStorage.getItem(e)}catch(e){Ha.Pt(e)}return null},Dt(e){try{return JSON.parse(Ha.Ot(e))||null}catch{}return null},At(e,t){try{return n?.sessionStorage.setItem(e,JSON.stringify(t)),!0}catch(e){Ha.Pt(e)}return!1},Lt(e){try{n?.sessionStorage.removeItem(e)}catch(e){Ha.Pt(e)}}},Ua=class{constructor(e){this._instance=e}get Ir(){return this._instance.config}get consent(){return this.Ao()?0:this.Fo}isOptedOut(){return this.Ir.cookieless_mode===`always`||this.isRejected()||this.consent===-1&&this.Ir.cookieless_mode===`on_reject`}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===0}isRejected(){return this.consent===0||this.consent===-1&&this.Ir.opt_out_capturing_by_default}optInOut(e){this.Oo.At(this.Do,+!!e,this.Ir.cookie_expiration,this.Ir.cross_subdomain_cookie,this.Ir.secure_cookie)}reset(){this.Oo.Lt(this.Do,this.Ir.cross_subdomain_cookie)}get Do(){let{token:e,opt_out_capturing_cookie_prefix:t,consent_persistence_name:n}=this._instance.config;return n||(t?t+e:`__ph_opt_in_out_`+e)}get Fo(){let e=this.Oo.Ot(this.Do);return ue(e)?1:x(de,e)?0:-1}get Oo(){let e=this.Ir.opt_out_capturing_persistence_type,t=e===`localStorage`?Oa:Ea,n=t.Et()?t:Ba;if(!this.Lo||this.Lo!==n){this.Lo=n;let t=e===`localStorage`?Ea:Oa;t.Ot(this.Do)&&(this.Lo.Ot(this.Do)||this.optInOut(ue(t.Ot(this.Do))),t.Lt(this.Do,this.Ir.cross_subdomain_cookie))}return this.Lo}Ao(){return!!this.Ir.respect_dnt&&[i?.doNotTrack,i?.msDoNotTrack,m.doNotTrack,i?.globalPrivacyControl].some(e=>ue(e))}};function Wa(e,t){var n;let r=e==null||(n=e.config)==null?void 0:n.get_current_url;if(!O(r))return t;try{let e=r(t);return M(e)&&e?e:t}catch(e){return z.error(`Error in get_current_url, falling back to window.location.href`,e),t}}function Ga(e){return e instanceof Element&&(e.id===`__POSTHOG_TOOLBAR__`||!!e.closest?.call(e,`.toolbar-global-fade-container`))}function Ka(e){return!!e&&e.nodeType===1}function qa(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function Ja(e){return!!e&&e.nodeType===3}function Ya(e){return!!e&&e.nodeType===11&&Ka(e.host)}function Xa(e){return e?S(e).split(/\s+/):[]}function Za(e,t){let r=function(e){var t;let r=n==null||(t=n.location)==null?void 0:t.href;return j(r)?void 0:Wa(e,r)}(t);return!!(r&&e&&e.some(e=>r.match(e)))}function Qa(e){let 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 Xa(t)}function $a(e){return F(e)?null:S(e).split(/(\s+)/).filter(e=>To(e)).join(``).replace(/[\r\n]/g,` `).replace(/[ ]+/g,` `).substring(0,255)}function eo(e){let t=``;return go(e)&&!_o(e)&&e.childNodes&&e.childNodes.length&&aa(e.childNodes,function(e){Ja(e)&&e.textContent&&(t+=$a(e.textContent)??``)}),S(t)}function to(e){return j(e.target)?e.srcElement||null:e.target?.shadowRoot?e.composedPath()[0]||null:e.target||null}var no=[`a`,`button`,`form`,`input`,`select`,`textarea`,`label`];function ro(e,t){let n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector;try{return!!n&&n.call(e,t)}catch{return!1}}function io(e,t){if(j(t))return!0;for(let n of e)if(t.some(e=>ro(n,e)))return!0;return!1}function ao(e){let t=e.parentNode;return!(!t||!Ka(t))&&t}var oo=[`.ph-no-autocapture`,`[data-ph-no-autocapture]`],so=[`next`,`previous`,`prev`,`>`,`<`],co=[...so,`+`,`-`,`−`,`–`],lo=(e,t)=>/[a-z0-9]/i.test(t)?e.includes(t):e===t,uo=[`.ph-no-rageclick`,`.ph-no-capture`],fo=[``,`text`,`search`,`email`,`password`,`url`,`tel`,`number`];function po(e,t){if(!n||mo(e))return!1;let r,i,a;var o;if(ne(t)?(r=!!t&&uo,i=void 0,a=!1):(r=t?.css_selector_ignorelist??uo,i=t?.content_ignorelist,a=(o=t?.ignore_text_selection)!=null&&o),!1===r||a&&function(e){return!(!e||!Ka(e))&&(!!qa(e,`textarea`)||(qa(e,`input`)?x(fo,(e.getAttribute(`type`)||``).toLowerCase()):function(e){if(e.isContentEditable)return!0;let t=e.getAttribute?.call(e,`contenteditable`);return t===`true`||t===``}(e)))}(e))return!1;let{targetElementList:s}=ho(e,!1);return!function(e,t){if(!1===e||j(e))return!1;let n;if(!0===e)n=so;else{if(!D(e))return!1;if(e.length>10)return z.error(`[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching.`),!1;n=e.map(e=>e.toLowerCase())}return t.some(({safeText:e,ariaLabel:t})=>n.some(n=>lo(e,n)||lo(t,n)))}(i,s.map(e=>({safeText:eo(e).toLowerCase(),ariaLabel:e.getAttribute(`aria-label`)?.toLowerCase().trim()||``})))&&!io(s,r)}var mo=e=>!e||qa(e,`html`)||!Ka(e),ho=(e,t)=>{if(!n||mo(e))return{parentIsUsefulElement:!1,targetElementList:[]};let r=!1,i=[e],a=e;for(;a.parentNode&&!qa(a,`body`);){if(Ya(a.parentNode)){i.push(a.parentNode.host),a=a.parentNode.host;continue}let e=ao(a);if(!e)break;if(t||no.indexOf(e.tagName.toLowerCase())>-1)r=!0;else try{let t=n.getComputedStyle(e);t&&t.getPropertyValue(`cursor`)===`pointer`&&(r=!0)}catch{}i.push(e),a=e}return{parentIsUsefulElement:r,targetElementList:i}};function go(e){let t=new Set,n=0;for(let r=e;r.parentNode&&!qa(r,`body`);r=r.parentNode){if(n++>=1e3||t.has(r))return!1;t.add(r);let e=Qa(r);if(x(e,`ph-sensitive`)||x(e,`ph-no-capture`))return!1}if(x(Qa(e),`ph-include`))return!0;let r=e.type||``;if(M(r))switch(r.toLowerCase()){case`hidden`:case`password`:return!1}
1let i=e.name||e.id||``;return!M(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 _o(e){return!!(qa(e,`input`)&&![`button`,`checkbox`,`submit`,`reset`].includes(e.type)||qa(e,`select`)||qa(e,`textarea`)||e.getAttribute(`contenteditable`)===`true`)}var vo=RegExp(`^(?:(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}))$`),yo=/(^|[^0-9A-Za-z_])([0-9][0-9 -]*[0-9])(?=$|[^0-9A-Za-z_])/g,bo=[16,15,14,13],xo=RegExp(`^(\\d{3}-?\\d{2}-?\\d{4})$`),So=RegExp(`(^|[^0-9])((?!000|666)[0-9]{3}-?(?!00)[0-9]{2}-?(?!0000)[0-9]{4})(?=$|([^0-9]))`,`g`),Co=/[0-9A-Za-z_]/;function wo(e){let t=0,n=!1;for(let r=e.length-1;r>=0;r--){let i=e.charCodeAt(r)-48;n&&(i*=2,i>9&&(i-=9)),t+=i,n=!n}return t%10==0}function To(e,t=!0){return!(F(e)||M(e)&&(e=S(e),(t?vo.test((e||``).replace(/[- ]/g,``)):function(e){let t;for(yo.lastIndex=0;t=yo.exec(e);){let e=t[2];if(!e)continue;let n=e.replace(/[- ]/g,``);for(let e=0;n.length>e;e++)for(let t of bo){let r=e+t;if(n.length>=r){let t=n.slice(e,r);if(vo.test(t)&&wo(t))return!0}}}return!1}(e))||(t?xo.test(e):function(e){let t;for(So.lastIndex=0;t=So.exec(e);){let e=t[1],n=t[3];if(!(e&&n&&Co.test(e)&&Co.test(n)))return!0}return!1}(e))))}function Eo(e){let t=eo(e);return t=`${t} ${Do(e)}`.trim(),To(t)?t:``}function Do(e){let t=``;return e&&e.childNodes&&e.childNodes.length&&aa(e.childNodes,function(e){if(e&&e.tagName?.toLowerCase()===`span`)try{let n=eo(e);t=`${t} ${n}`.trim(),e.childNodes&&e.childNodes.length&&(t=`${t} ${Do(e)}`.trim())}catch(e){z.error(`[AutoCapture]`,e)}}),t}function Oo(e){return e.replace(/"|\\"/g,`\\"`)}function ko(e){let t=e.attr__class;if(t)return D(t)?t:Xa(t)}var Ao=fr(`[Dead Clicks]`),jo=()=>!0,Mo=e=>{let t=!!e.instance.persistence?.get_property(Ir),n=e.instance.config.capture_dead_clicks;return ne(n)?n:!!k(n)||t},No=class{get lazyLoadedDeadClicksAutocapture(){return this.No}constructor(e,t,n){this.instance=e,this.isEnabled=t,this.onCapture=n,this.startIfEnabledOrStop()}onRemoteConfig(e){if(!e.ok)return;let t=e.config;`captureDeadClicks`in t&&(this.instance.persistence&&this.instance.persistence.register({[Ir]:t.captureDeadClicks}),this.startIfEnabledOrStop())}startIfEnabledOrStop(){this.isEnabled(this)?this.qo(()=>{this.jo()}):this.stop()}qo(e){var t,n;m.__PosthogExtensions__?.initDeadClicksAutocapture?e():(t=m.__PosthogExtensions__)==null||(n=t.loadExternalDependency)==null||n.call(t,this.instance,`dead-clicks-autocapture`,t=>{t?Ao.error(`failed to load script`,t):e()})}jo(){if(a){if(!this.No&&m.__PosthogExtensions__?.initDeadClicksAutocapture){let e=k(this.instance.config.capture_dead_clicks)?R({},this.instance.config.capture_dead_clicks):{};e.__onCapture=this.onCapture,this.onCapture&&(e.capture_dead_swipes=!1),this.No=m.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,e),this.No.start(a),Ao.info(`starting...`)}}else Ao.error("`document` not found. Cannot start.")}stop(){this.No&&(this.No.stop(),this.No=void 0,Ao.info(`stopping...`))}},Po=fr(`[SegmentIntegration]`);function Fo(e,t,n=!0){let r=e.config.segment;if(!r)return t();let{analytics:i,filterProperties:a}=(e=>O(e.register))(o=r)?{analytics:o}:o;var o;(function(e,t,n,r){let i=t=>{let i=()=>t.anonymousId()||xa();e.config.get_device_id=i,r&&t.id()&&(e.register({distinct_id:t.id(),$device_id:i()}),e.persistence.set_property(Oi,Xi)),n(r?void 0:t.anonymousId()||void 0)},a=t.user();`then`in a&&O(a.then)?a.then(i):i(a)})(e,i,n=>{i.register(((e,t,{filterProperties:n}={})=>{typeof Promise<`u`&&Promise.resolve||Po.warn(`This browser does not have Promise support, and can not use the segment integration`);let r=(r,i)=>{if(!i)return r;let a=!!t&&r.event.anonymousId===t&&!r.event.userId;a||r.event.userId||r.event.anonymousId===e.get_distinct_id()||(Po.info(`No userId set, resetting PostHog`),e.reset()),a||(t=void 0),r.event.userId&&r.event.userId!==e.get_distinct_id()&&(Po.info(`UserId set, identifying with PostHog`),e.identify(r.event.userId)
1);let o=e.calculateEventProperties(i,r.event.properties);if(!F(n)){let e=r.event.properties||{},t={};for(let n of Object.keys(o))E.call(e,n)||(t[n]=o[n]);let i=((e,t)=>{let n=D(e)?e:[e],r=R({},t);for(let e of n)try{if(r=e(r),F(r))return null}catch(e){return Po.error(`Error in Segment filterProperties:`,e),null}return r})(n,t);if(F(i))return r;o=i}return r.event.properties=Object.assign({},o,r.event.properties),r};return{name:`PostHog JS`,type:`enrichment`,version:`1.0.0`,isLoaded(){return!0},load(){return Promise.resolve()},track(e){return r(e,e.event.event)},page(e){return r(e,ea)},identify(e){return r(e,na)},screen(e){return r(e,`$screen`)}}})(e,n,{filterProperties:a})).then(()=>{t()},e=>{Po.error(`Failed to register the Segment integration`,e),t()})},n)}var Io=`posthog-js`;function Lo(e,{organization:t,projectId:n,prefix:r,severityAllowList:i=[`error`],sendExceptionsToPostHog:a=!0}={}){return o=>{if(i!==`*`&&!i.includes(o.level)||!e.__loaded)return o;o.tags||={};let s=e.requestRouter.endpointFor(`ui`,`/project/${e.config.token}/person/${e.get_distinct_id()}`);o.tags[`PostHog Person URL`]=s,e.sessionRecordingStarted()&&(o.tags[`PostHog Recording URL`]=e.get_session_replay_url({withTimestamp:!0}));let c=o.exception?.values||[],l=c.map(e=>R(R({},e),{},{stacktrace:e.stacktrace?R(R({},e.stacktrace),{},{type:`raw`,frames:(e.stacktrace.frames||[]).map(e=>R(R({},e),{},{platform:`web:javascript`}))}):void 0})),u={$exception_message:c[0]?.value||o.message,$exception_type:c[0]?.type,$exception_level:o.level,$exception_list:l,$sentry_event_id:o.event_id,$sentry_exception:o.exception,$sentry_exception_message:c[0]?.value||o.message,$sentry_exception_type:c[0]?.type,$sentry_tags:o.tags};var d;return t&&n&&(u.$sentry_url=(r||`https://sentry.io/organizations/`)+t+`/issues/?project=`+n+`&query=`+o.event_id),a&&((d=e.exceptions)==null||d.sendExceptionEvent(u)),o}}var Ro=class{constructor(e,t,n,r,i,a){this.name=Io,this.setupOnce=function(o){o(Lo(e,{organization:t,projectId:n,prefix:r,severityAllowList:i,sendExceptionsToPostHog:a==null||a}))}}},zo=class{constructor(e){this.Bo=(e,t,n)=>{n&&(n.noSessionId||n.activityTimeout||n.sessionPastMaximumLength||n.crossTabAdoption)&&(z.info(`[PageViewManager] Session rotated, clearing pageview state`,{sessionId:e,changeReason:n}),this.Ho=void 0,this._instance.scrollManager.resetContext())},this._instance=e,this.zo()}zo(){this.Uo=this._instance.sessionManager?.onSessionId(this.Bo)}destroy(){var e;(e=this.Uo)==null||e.call(this),this.Uo=void 0}doPageView(e,t){let r=this.Wo(e,t);return this.Ho={pathname:n?.location.pathname??``,pageViewId:t,timestamp:e},this._instance.scrollManager.resetContext(),r}doPageLeave(e){return this.Wo(e,this.Ho?.pageViewId)}doEvent(){return{$pageview_id:this.Ho?.pageViewId}}Wo(e,t){let n=this.Ho;if(!n)return{$pageview_id:t};let r={$pageview_id:t,$prev_pageview_id:n.pageViewId},i=this._instance.scrollManager.getContext();if(i&&!this._instance.config.disable_scroll_properties){let{maxScrollHeight:e,lastScrollY:t,maxScrollY:n,maxContentHeight:a,lastContentY:o,maxContentY:s}=i;if(!(j(e)||j(t)||j(n)||j(a)||j(o)||j(s))){e=Math.ceil(e),t=Math.ceil(t),n=Math.ceil(n),a=Math.ceil(a),o=Math.ceil(o),s=Math.ceil(s);let i=e>1?ge(t/e,0,1,z):1,c=e>1?ge(n/e,0,1,z):1,l=a>1?ge(o/a,0,1,z):1,u=a>1?ge(s/a,0,1,z):1;r=oa(r,{$prev_pageview_last_scroll:t,$prev_pageview_last_scroll_percentage:i,$prev_pageview_max_scroll:n,$prev_pageview_max_scroll_percentage:c,$prev_pageview_last_content:o,$prev_pageview_last_content_percentage:l,$prev_pageview_max_content:s,$prev_pageview_max_content_percentage:u})}}return n.pathname&&(r.$prev_pageview_pathname=n.pathname),n.timestamp&&(r.$prev_pageview_duration=(e.getTime()-n.timestamp.getTime())/1e3),r}},Bo=[`flags`,`surveys`],Vo={[yr]:{exposure:`hidden`},[Cr]:{exposure:`hidden`},[wr]:{exposure:`hidden`},[kr]:{exposure:`hidden`},[Er]:{exposure:`hidden`},[Or]:{exposure:`hidden`},[Ar]:{exposure:`event`},[jr]:{exposure:`hidden`},[Rr]:{exposure:`hidden`},[Mr]:{exposure:`event`},[Nr]:{exposure:`hidden`},[Pr]:{exposure:`event`},[Fr]:{exposure:`event`},[Ir]:{exposure:`event`},[Lr]:{exposure:`hidden`},[zr]:{exposure:`event`},[Br]:{exposure:`hidden`},[Vr]:{exposure:`hidden`},[qr]:{exposure:`hidden`},[Jr]:{exposure:`event`},[Hr]:{exposure:`event`,shouldSkipFromEventProperties:e=>P(e)},[Yr]:{exposure:`event`},[Xr]:{exposure:`event`},[Zr]:{exposure:`event`},[Qr]:{exposure:`event`},[$r]:{exposure:`hidden`}
1,[ei]:{exposure:`hidden`,storageGroup:`flags`},[ti]:{exposure:`hidden`,storageGroup:`flags`},[ni]:{exposure:`hidden`},[ri]:{exposure:`hidden`,storageGroup:`flags`},[ii]:{exposure:`hidden`,storageGroup:`flags`},[ai]:{exposure:`hidden`,storageGroup:`flags`,volatile:!0},[oi]:{exposure:`hidden`,storageGroup:`flags`},[si]:{exposure:`hidden`},[ci]:{exposure:`hidden`},[li]:{exposure:`hidden`},[ui]:{exposure:`hidden`},[fi]:{exposure:`hidden`,storageGroup:`surveys`},[pi]:{exposure:`hidden`,storageGroup:`surveys`,volatile:!0},[mi]:{exposure:`event`},[hi]:{exposure:`hidden`},[gi]:{exposure:`hidden`},[_i]:{exposure:`hidden`},[vi]:{exposure:`hidden`},[yi]:{exposure:`hidden`},[bi]:{exposure:`event`},[xi]:{exposure:`event`},[Si]:{exposure:`event`},[Ci]:{exposure:`event`},[wi]:{exposure:`hidden`},[Ti]:{exposure:`hidden`},[di]:{exposure:`event`},[Ei]:{exposure:`hidden`},[Di]:{exposure:`hidden`,storageGroup:`flags`,volatile:!0},[Oi]:{exposure:`hidden`},[ki]:{exposure:`hidden`},[Ai]:{exposure:`hidden`},[ji]:{exposure:`hidden`},[Mi]:{exposure:`hidden`},[Ni]:{exposure:`hidden`},[Pi]:{exposure:`hidden`},[Ur]:{exposure:`event`},[Wr]:{exposure:`event`},[Gr]:{exposure:`event`},[Kr]:{exposure:`event`},[Li]:{exposure:`event`},[Ri]:{exposure:`event`},[zi]:{exposure:`event`},[Bi]:{exposure:`event`},[Vi]:{exposure:`event`},[Hi]:{exposure:`event`},[Ui]:{exposure:`event`},[Wi]:{exposure:`event`},[Gi]:{exposure:`event`},[Ki]:{exposure:`event`},[qi]:{exposure:`event`}},Ho=[[`$posthog_sr_group_event_trigger_`,{exposure:`hidden`}],[`$posthog_sr_group_url_trigger_`,{exposure:`hidden`}],[`$posthog_sr_group_sampling_`,{exposure:`hidden`}]],Uo=e=>{let t=Vo[e];if(t)return t;for(let[t,n]of Ho)if(e.indexOf(t)===0)return n},Wo=(e,t)=>{try{let n;return JSON.stringify(e,(e,t)=>L(t)?(n??=new WeakMap,n.has(t)||n.set(t,ua(t)),n.get(t)):typeof t==`bigint`?t.toString():t,t)}catch{return w(e)}},Go=e=>{let t=a?.createElement(`a`);return j(t)?null:(t.href=e,t)},Ko=function(e,t){let n=((e.split(`#`)[0]||``).split(/\?(.*)/)[1]||``).replace(/^\?+/g,``).split(`&`),r;for(let e=0;n.length>e;e++){let i=n[e].split(`=`);
1if(i[0]===t){r=i;break}}if(!D(r)||2>r.length)return``;{let e=r[1];try{e=decodeURIComponent(e)}catch{z.error(`Skipping decoding for malformed query param: `+e)}return e.replace(/\+/g,` `)}},qo=function(e,t,n){if(!e||!t||!t.length)return e;let r=e.split(`#`),i=r[1],a=(r[0]||``).split(`?`),o=a[1],s=a[0],c=(o||``).split(`&`),l=[];for(let e=0;c.length>e;e++){let r=c[e].split(`=`);D(r)&&(t.includes(r[0])?l.push(r[0]+`=`+n):l.push(c[e]))}let u=s;return o!=null&&(u+=`?`+l.join(`&`)),i!=null&&(u+=`#`+i),u},Jo=function(e,t){let n=e.match(RegExp(t+`=([^&]*)`));return n?n[1]:null},Yo=(e,t)=>e>=t&&f(),Xo=(e,t,n,r)=>{if(e===0){if(f()){let e=t+1;return e===n&&r(),e}return t}return 0},Zo=[`gclid`,`gclsrc`,`dclid`,`gbraid`,`wbraid`,`fbclid`,`msclkid`,`twclid`,`li_fat_id`,`igshid`,`ttclid`,`rdt_cid`,`epik`,`qclid`,`sccid`,`irclid`,`_kx`],Qo=[`utm_source`,`utm_medium`,`utm_campaign`,`utm_content`,`utm_term`,`gad_source`,`mc_cid`,...Zo],$o=`<masked>`,es=[`li_fat_id`];function ts(e,t,n){if(!a)return{};let r=t?[...Zo,...n||[]]:[],i=ns(qo(a.URL,r,$o),e);return oa(function(){let e={};return aa(es,function(t){let n=ha(t);e[t]=n||null}),e}(),i)}function ns(e,t){let n=Qo.concat(t||[]),r={};return aa(n,function(t){let n=Ko(e,t);r[t]=n||null}),r}function rs(e){let t=function(e){return e?e.search(`https?://(.*)google.([^/?]*)`)===0?`google`:e.search(`https?://(.*)bing.com`)===0?`bing`:e.search(`https?://(.*)yahoo.com`)===0?`yahoo`:e.search(`https?://(.*)duckduckgo.com`)===0?`duckduckgo`:null:null}(e),n=t==`yahoo`?`p`:`q`,r={};if(!P(t)){r.$search_engine=t;let e=a?Ko(a.referrer,n):``;e.length&&(r.ph_keyword=e)}return r}function is(){return navigator.language||navigator.userLanguage}function as(){let e=is();return typeof e==`string`?e.split(`-`)[0]:void 0}var os=`$direct`;function ss(){return a?.referrer||os}function cs(e,t,n=!1){let r=e?[...Zo,...t||[]]:[],i=(n?At(o?.href):o?.href)?.substring(0,1e3);return{r:ss().substring(0,1e3),u:i?qo(i,r,$o):void 0}}function ls(e,t=!1){let{r:n,u:r}=e,i=t?At(r):r,a={$referrer:n,$referring_domain:n==null?void 0:n==os?os:Go(n)?.host};if(i){a.$current_url=i;let e=Go(i);a.$host=e?.host,a.$pathname=e?.pathname,oa(a,ns(i))}return n&&oa(a,rs(n)),a}function us(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function ds(){try{return new Date().getTimezoneOffset()}catch{return}}var fs={flags:Di,surveys:pi},ps=[`cookie`,`localstorage`,`localstorage+cookie`,`sessionstorage`,`memory`],ms=e=>`${e}_cookie_identity_change_pending`,hs=e=>{let t=``,n=0;for(let r of e){let e=encodeURIComponent(JSON.stringify(r).slice(1,-1)).length;if(n+e>1e3)break;t+=r,n+=e}return t},gs=`main`,_s=[ei,ti,ri,ii,ai,Di,oi,li],vs=e=>_s.indexOf(e)!==-1,ys=[Er,Or],bs=e=>ys.indexOf(e)!==-1,xs=(e,t)=>{try{return JSON.stringify(e)===JSON.stringify(t)}catch{return e===t}},Ss=e=>{if(!e)return{};let t=JSON.parse(e);return k(t)?t:{}},Cs=(e,t)=>{aa(e,(n,r)=>{let i=Uo(r);i&&i.exposure!==`event`||{}.hasOwnProperty.call(t,r)||delete e[r]})},ws=class{constructor(e,t,r=!0){if(this.Vo={},this.Go=!1,this.Zo=!1,this.Qo=!1,this.Jo=!1,this.Ko=!1,this.Xo=new Map,this.Yo=!1,this.tl=!1,this.el=!1,this.il=new Set,this.nl=new Set,this.Ir=e,this.sl=r,this.props={},this.rl=void 0,this.ol=(e=>{let t=``;return e.token&&(t=e.token.replace(/\+/g,`PL`).replace(/\//g,`SL`).replace(/=/g,`EQ`)),e.persistence_name?`ph_`+e.persistence_name:`ph_`+t+`_posthog`})(e),this.Oo=this.ll(e),this.Qo=this.al(e),this.load(),this.ul(),e.debug&&z.info(`Persistence loaded`,e.persistence,R({},this.props)),this.update_config(e,e,t),this.save(),n){let e=()=>this.flush();pa(n,`beforeunload`,e,{capture:!1}),pa(n,`pagehide`,e,{capture:!1}),this.hl=e=>{if(this.Go&&(!e.storageArea||e.storageArea===n?.localStorage)&&e.key){if(e.key!==this.ol){if(this.Qo){let t=Bo.find(t=>e.key===this.cl(t));t&&this.dl(e.key,t)}}else this.dl(e.key,gs)}},pa(n,`storage`,this.hl)}}markCrossTabFeatureFlagChanges(e){Object.entries(e).forEach(([e,t])=>{let n=this.Xo.get(e);if(!vs(e)||!0===n)return;if(!0===t)return void this.vl(e,!0);let r=new Set(n||[]);t.forEach(e=>r.add(e)),r.size&&this.vl(e,r)})}onCrossTabFeatureFlagChange(e){return this.nl.add(e),()=>this.nl.delete(e)}destroy(){this.hl&&n&&(n.removeEventListener(`storage`,this.hl),this.hl=void 0),this.nl.clear()}dl(e,t,n=!0){if(this.mi)return!1;let r,i;try{if(i=Oa.Ot(e),P(i)){let e=this.fl(t);return e.storageValue=null,t!==gs&&(e.persisted=!1),!1}r=Ss(i)}catch{return!1}let a=t===gs?r:Oa.Dt(this.ol);if(a&&this.pl(a))return!1;let o=this.gl(r,t,n);return t===gs&&this.Qo&&!xs(this.ml().main,r)||this.yl(r,t,!0,i),o}pl(e){let t=this.props[br],n=e[br];return!j(t)&&!j(n)&&t!==n}yl(e,t,n,r){let i=this.fl(t);i.storageValue=r,t!==gs&&(i.persisted=n);try{i.fingerprint=this.bl(e,t)}catch{i.fingerprint=void 0}}gl(e,t,n){let r=!1;
1return _s.forEach(n=>{let i=Uo(n)?.storageGroup;if(t===gs&&this.Qo&&i||t!==gs&&i!==t)return;let a=n in e,o=this._l(n,a?e[n]:void 0),s=this.Xo.has(n)?n in this.props:a;s===n in this.props&&xs(o,this.props[n])||(s?this.wl(n,o,!1):this.kl(n,!1),r=!0)}),r&&n&&this.nl.forEach(e=>e()),r}Sl(){if(!this.Go)return!1;try{this.el=!1;let e=Oa.Ot(this.ol),t=this.fl(gs),n,r=!1,i=!1;if(e!==t.storageValue){if(P(e))t.storageValue=null;else{if(n=Ss(e),this.el=!this.tl&&this.pl(n),this.el)return!1;i=this.gl(n,gs,!1),!this.Qo||xs(this.ml().main,n)?this.yl(n,gs,!0,e):t.storageValue=e,r=!0}}return this.Qo&&Bo.forEach(e=>{let t=Oa.Ot(this.cl(e)),a=this.fl(e),o=n||{},s=r&&_s.some(t=>Uo(t)?.storageGroup===e&&t in o);if(t===a.storageValue&&!s)return;if(P(t))return a.storageValue=null,a.persisted=!1,void(s&&(i=this.gl(o,e,!1)||i));let c=Ss(t);i=this.gl(c,e,!1)||i,this.yl(c,e,!0,t)}),i}catch{return!1}}vl(e,t){this.Xo.set(e,t);let n=Uo(e);n!=null&&n.volatile||(this.fl((this.Qo?n?.storageGroup:void 0)||gs).fingerprint=void 0,this.xl(e))}Cl(){_s.forEach(e=>this.Xo.set(e,!0))}ul(){if(this.Go)try{let e=Oa.Ot(this.ol),t=Ss(e);this.fl(gs).storageValue=e,_s.forEach(e=>{let n=this.Qo?Uo(e)?.storageGroup:void 0,r=n?Oa.Ot(this.cl(n)):null;if(n){let e=this.fl(n);e.storageValue=r,e.persisted=!P(r)}let i=n&&!P(r)?Ss(r):t;e in this.props?this.$l(e,i[e],this.props[e]):e in i&&this.vl(e,!0)})}catch{}}_l(e,t){let n=this.Xo.get(e);if(!n)return t;if(!0===n)return this.props[e];if(e===`$active_feature_flags`){let r=new Set(D(t)?t:[]),i=new Set(D(this.props[e])?this.props[e]:[]);return n.forEach(e=>i.has(e)?r.add(e):r.delete(e)),Array.from(r)}let r=k(t)?R({},t):{},i=k(this.props[e])?this.props[e]:{};return n.forEach(e=>{e in i?r[e]=i[e]:delete r[e]}),r}$l(e,t,n){if(!vs(e))return;let r=this.Xo.get(e);if(!0===r)return;let i=t;if(this.Go)try{let t=this.Qo?Uo(e)?.storageGroup:void 0,n=t?this.cl(t):this.ol;i=Ss(Oa.Ot(n))[e]}catch{}let a=new Set(r||[]);if(e===`$active_feature_flags`){if(!j(t)&&!D(t)||!j(i)&&!D(i)||!D(n))return void this.vl(e,!0);let r=new Set(t||[]),o=new Set(i||[]),s=new Set(n);new Set([...r,...s]).forEach(e=>{r.has(e)!==s.has(e)&&a.add(e)}),a.forEach(e=>{o.has(e)===s.has(e)&&a.delete(e)})}else{if(!k(n))return void(xs(i,n)?this.Xo.delete(e):this.vl(e,!0));{if(!j(t)&&!k(t)||j(t)&&A(n)&&j(i))return void this.vl(e,!0);let r=k(t)?t:{},o=k(i)?i:{};new Set([...Object.keys(r),...Object.keys(n)]).forEach(e=>{e in r==e in n&&xs(r[e],n[e])||a.add(e)}),a.forEach(e=>{e in o==e in n&&xs(o[e],n[e])&&a.delete(e)})}}a.size?this.vl(e,a):this.Xo.delete(e)}Il(){let e=this.Ir?.persistence_save_debounce_ms;return I(e)&&e>0?e:0}Tl(e){if(this.Ir.cookieWinsOnConflict&&this.Ir.persistence.toLowerCase()===`localstorage+cookie`){if(e)try{let t=Pa(e,this.Ir.cookie_persisted_properties||[]),n=Ia(t,this.Ir.cookie_persisted_properties||[]),r=JSON.stringify(t)+`|`+JSON.stringify(n),i=Ea.Ot(this.ol)||void 0;i&&Ra(this.ol,i)===r&&(this.Ml=r,this.El=i)}catch{}else try{let e=Ea.Ot(this.ol)||void 0;this.Ml=e?Ra(this.ol,e):void 0,this.El=e}catch{}}}syncCookieProperties(){return this.Pl(this.Ir)}Pl(e,t=!1){if(this.mi&&!t||this.Ko||!e.cookieWinsOnConflict||e.persistence.toLowerCase()!==`localstorage+cookie`)return!1;let n;try{n=Ea.Ot(this.ol)||void 0}catch{}if(!n||n===this.El)return!1;let r=Ra(this.ol,n),i;try{i=Na(JSON.parse(n))}catch{return!1}if((Ea.Ot(this.ol)||void 0)!==n)return!1;this.Ml=r,this.El=n;let a=La(this.ol,n),o=[...Aa,...a.properties],s={};
1if(Object.keys(i).forEach(e=>{let t=i[e];(j(t)||P(t)||t===``||e===`$user_state`&&t!==`anonymous`&&t!==`identified`)&&(s[e]=!0,delete i[e])}),A(i))return!1;let c=`distinct_id`in i||i.$user_state===`anonymous`||i.$user_state===`identified`,l=this.props,u=l[br],d=l[Oi],f=oa({},l);[...Aa,...e.cookie_persisted_properties||[]].forEach(e=>{if(o.indexOf(e)!==-1&&!(e in i)&&!s[e]&&(c||e!==`distinct_id`&&e!==`$user_state`)){let t=f[e];(a.isValid||Aa.indexOf(e)===-1||!1!==t&&t!==0)&&delete f[e]}}),this.props=oa(f,i),_s.forEach(e=>{let t=e in this.props;e in l===t&&xs(l[e],this.props[e])||(t?this.$l(e,l[e],this.props[e]):this.vl(e,!0))}),!c||`$user_state`in i||`$user_state`in this.props||this.wl(Oi,Yi);let p=this.props[br],m=this.props[Oi];return!c||p===u&&m===d||(this.tl=!0,this.Jo=!0,Ha.At(ms(this.ol),!0),this.kl(li),this.kl(ti),this.kl(ei),this.kl(ri),this.kl(ii),this.kl(ai),this.kl(Di),this.kl(Ei),this.kl(wi),m!==`anonymous`||d!==`identified`&&i.$user_state!==`anonymous`&&(j(u)||p===u)||(Cs(this.props,i),this.kl(ui)),m===`identified`?this.props.$user_id=p:delete this.props.$user_id,this.kl(Cr)),!0}
1consumeCookieIdentityChange(){let e=ms(this.ol),t=this.Jo||!!Ha.Ot(e);return this.Jo=!1,t&&Ha.Lt(e),t}Rl(e=!1){return!(this.Ko||this.mi&&!e||!this.Ir.cookieWinsOnConflict||this.Ir.persistence.toLowerCase()!==`localstorage+cookie`||(this.Ko=!0,0))}Al(){this.Ko&&(j(this.Fl)||(clearTimeout(this.Fl),this.Fl=void 0),delete this.Vo[gs],this.Ol(!0))}Dl(e=!0){if(this.Ko)try{e?this.Al():j(this.Fl)||(clearTimeout(this.Fl),this.Fl=void 0)}finally{this.Ko=!1}}isDisabled(){return!!this.mi}ll(e){ps.indexOf(e.persistence.toLowerCase())===-1&&(z.critical(`Unknown persistence type `+e.persistence+`; falling back to localStorage+cookie`),e.persistence=`localStorage+cookie`);let t=((e=[],t=!1)=>{let r=[...Aa,...e];return R(R({},Oa),{},{Dt(e){try{let n,i={};try{n=Ea.Ot(e)||void 0,i=n?Na(JSON.parse(n)):{}}catch{}let a=JSON.parse(Oa.Ot(e)||`{}`),o;if(t){let t=La(e,n),s=[...Aa,...t.properties],c={};Object.keys(i).forEach(e=>{let t=i[e];P(t)||t===``||e===`$user_state`&&t!==`anonymous`&&t!==`identified`||(c[e]=t)});let l=`distinct_id`in c||c.$user_state===`anonymous`||c.$user_state===`identified`;if(Object.keys(c).length>0){let e=a[br],n=a.$user_state??Yi;r.forEach(e=>{if(s.indexOf(e)!==-1&&!(e in i)&&(l||e!==`distinct_id`&&e!==`$user_state`)){let n=a[e];(t.isValid||Aa.indexOf(e)===-1||!1!==n&&n!==0)&&delete a[e]}}),!l||`$user_state`in i||`$user_state`in a||(a[Oi]=Yi),!l||(`distinct_id`in c?c[br]:a[br])===e&&(`$user_state`in c?c[Oi]:a[Oi])===n||(ka.forEach(e=>delete a[e]),c.$user_state===`identified`&&`distinct_id`in c?a.$user_id=c[br]:delete a.$user_id,c.$user_state!==`identified`&&(delete a[di],delete a[ui]),delete a.__alias)}o=oa(a,c)}else o=oa(i,a);return Oa.At(e,o),o}catch{}return null},At(n,r,i,a,o,s){let c=Oa.At(n,r,void 0,void 0,s);try{let l=Pa(r,e);if(Object.keys(l).length){if(t){let t=ja(n),u=Ia(l,e);if(Ea.At(t,u,i,a,o,s),Ea.Ot(t)!==JSON.stringify(u)){Ea.Lt(t,a);let e=Pa(r);return Ea.At(n,e,i,a,o,s),c}}Ea.At(n,l,i,a,o,s)}}catch(e){Oa.Pt(e)}return c},Lt(e,t){try{n?.localStorage.removeItem(e),Ea.Lt(e,t),Ea.Lt(ja(e),t)}catch(e){Oa.Pt(e)}}})})(e.cookie_persisted_properties||[],e.cookieWinsOnConflict),r,i=!1,a=!1,o=e.persistence.toLowerCase();return o===`localstorage`&&Oa.Et()?(r=Oa,a=!0):o===`localstorage+cookie`&&t.Et()?(r=t,a=!0,i=!0):o===`sessionstorage`&&Ha.Et()?r=Ha:o===`memory`?r=Ba:o===`cookie`&&Ea.Et()?(r=Ea,i=!0):t.Et()?(r=t,a=!0,i=!0):Ea.Et()?(r=Ea,i=!0):r=Ba,this.Go=a,this.Zo=i,r}cl(e){return`${this.ol}__${e}`}al(e){return this.Go&&!!e.split_storage}properties(){let e={};return aa(this.props,(t,n)=>{let r=Uo(n);if(!r||r.exposure===`event`){var i;if(r!=null&&(i=r.shouldSkipFromEventProperties)!=null&&i.call(r,t))return;e[n]=t}}),e}load(e=!1){if(this.mi&&!e)return;let t=this.Ir.cookieWinsOnConflict&&this.Ir.persistence.toLowerCase()===`localstorage+cookie`,n=t?Oa.Dt(this.ol):null,r={};if(t)try{r=Na(Ea.Dt(this.ol)),aa(r,(e,t)=>{(j(e)||P(e)||e===``)&&delete r[t]})}catch{}let i=this.Oo.Dt(this.ol);if(i&&(this.props=oa({},i)),this.Qo&&this.Ll(),t&&i){let e=n?.[br],t=n?.$user_state??Yi,a=i[br],o=i.$user_state??Yi;if(a!==e||o!==t){this.Jo=!0,Ha.At(ms(this.ol),!0);let n=oa({},this.props);ka.forEach(e=>delete n[e]),o!==`anonymous`||t!==`identified`&&r.$user_state!==`anonymous`&&(j(e)||a===e)||(Cs(n,r),delete n[ui]),this.props=n;let i=new Set;ka.forEach(e=>{let t=Uo(e)?.storageGroup;t&&i.add(t)}),i.forEach(e=>{let t={};aa(this.props,(n,r)=>{Uo(r)?.storageGroup===e&&(t[r]=n)}),A(t)?(Oa.Lt(this.cl(e)),this.Vo[e]={}):Oa.At(this.cl(e),t)&&(this.Vo[e]={persisted:!0,fingerprint:this.bl(t,e)})})}}Ha.Ot(ms(this.ol))&&(this.Jo=!0)}Ll(){for(let e of Bo){let t=Oa.Dt(this.cl(e));if(t&&!A(t)){let n=this.fl(e);n.persisted=!0,this.Nl(e)||(n.fingerprint=this.bl(t,e)),this.ql(e,t)||oa(this.props,t)}}}Nl(e){return Object.keys(this.props).some(t=>Uo(t)?.storageGroup===e)}ql(e,t){let n=fs[e];if(!n)return!1;let r=t[n],i=this.props[n];return I(r)&&I(i)&&i>r}refreshKey(e){if(this.mi||this.il.has(e))return;let t=this.Qo?Uo(e)?.storageGroup:void 0,n=t?Oa.Dt(this.cl(t)):this.Oo.Dt(this.ol);if(n&&e in n)this.wl(e,n[e],!1);else{if(t){let t=this.Oo.Dt(this.ol);if(t&&e in t)return void this.wl(e,t[e],!1)}this.kl(e,!1)}}save(){if(this.mi)return;let e=this.Il();e>0?j(this.Fl)&&(this.Fl=setTimeout(()=>{this.Fl=void 0,this.Ol()},e)):this.Ol()}flush(){j(this.Fl)||(clearTimeout(this.Fl),this.Fl=void 0,this.Ol())}Ol(e=!1){if(this.mi||this.Ko&&!e)return;e||(this.syncCookieProperties(),this.Ir.cookieWinsOnConflict&&this.Ir.persistence.toLowerCase()===`localstorage+cookie`||ys.forEach(e
1=>this.refreshKey(e)));let t=!e&&!this.Yo;t||(this.el=!1);let n=!!t&&this.Sl();if(this.el)return void(this.Ir.debug&&z.warn(`skipping persistence write because storage belongs to a different distinct ID`));if(this.Qo)return this.jl(),void(n&&this.nl.forEach(e=>e()));let r=this.Bl(this.Oo,this.ol,this.props,gs);r===`written`&&this.Tl(this.props),r!==`failed`&&(this.Xo.clear(),this.tl=!1,this.il.clear()),n&&this.nl.forEach(e=>e())}jl(){let{main:e,groups:t}=this.ml(),n=this.Bl(this.Oo,this.ol,e,gs);n===`written`&&this.Tl(e),n!==`failed`&&(this.tl=!1,this.il.clear(),_s.forEach(e=>{var t;(t=Uo(e))!=null&&t.storageGroup||this.Xo.delete(e)}));for(let e of Bo){let n=t[e];if(A(n)&&!this.Vo[e]?.persisted){_s.forEach(t=>{Uo(t)?.storageGroup===e&&this.Xo.delete(t)});continue}let r=this.Bl(Oa,this.cl(e),n,e);r!==`failed`&&_s.forEach(t=>{let n=Uo(t);n?.storageGroup!==e||r!==`written`&&n.volatile||this.Xo.delete(t)})}}ml(){let e={},t={flags:{},surveys:{}};return aa(this.props,(n,r)=>{let i=Uo(r)?.storageGroup;i?t[i][r]=n:e[r]=n}),{main:e,groups:t}}bl(e,t){if(t===gs)return JSON.stringify(e)+`|`+this.Hl+`|`+this.zl+`|`+this.Ul;let n={};return aa(e,(e,t)=>{n[t]=Uo(t)?.volatile?`__volatile__`:e}),JSON.stringify(n)}Bl(e,t,n,r){let i=this.fl(r);if(r!==gs&&!i.dirty&&!j(i.fingerprint))return`skipped`;let a;try{if(a=this.bl(n,r),a===i.fingerprint)return i.dirty=!1,`skipped`}catch{a=void 0}return e.At(t,n,this.Hl,this.zl,this.Ul,this.Ir.debug)?(i.dirty=!1,r!==gs&&(i.persisted=!0),j(a)||(i.fingerprint=a),this.Go&&(i.storageValue=Oa.Ot(t)),`written`):(this.Ir.debug&&z.warn(`failed to persist storage entry "${t}"; will retry on next save`),`failed`)}remove({keepGroupEntries:e=!1}={}){if(this.Cl(),j(this.Fl)||(clearTimeout(this.Fl),this.Fl=void 0),this.Oo.Lt(this.ol,!1),this.Oo.Lt(this.ol,!0),!e&&this.sl)for(let e of Bo)Oa.Lt(this.cl(e));e?delete this.Vo[gs]:this.Vo={},this.Ml=void 0,this.El=void 0}clear(){this.remove(),this.props={}}register_once(e,t,n){if(k(e)){this.syncCookieProperties(),j(t)&&(t=`None`),this.Hl=j(n)?this.Wl:n;let r=!1;if(aa(e,(e,n)=>{this.props.hasOwnProperty(n)&&this.props[n]!==t||(this.wl(n,e),r=!0)}),r)return this.save(),!0}return!1}register(e,t){if(k(e)){this.syncCookieProperties(),this.Hl=j(t)?this.Wl:t;let n=!1;if(aa(e,(t,r)=>{e.hasOwnProperty(r)&&(this.props[r]!==t||k(t)||D(t))&&(this.wl(r,t),n=!0)}),n)return this.save(),!0}return!1}unregister(e){this.syncCookieProperties();let t=typeof e==`string`?[e]:e,n=!1;for(let e of t)e in this.props&&(this.kl(e),n=!0);n&&this.save()}update_campaign_params(){let e=a?.URL;if(e===this.rl)return;let t=ts(this.Ir.custom_campaign_params,this.Ir.mask_personal_data_properties,this.Ir.custom_personal_data_properties),n=!A(la(t));return n&&this.register(t),this.rl=e,n?t:void 0}update_search_keyword(){this.register(function(){let e=a?.referrer;return e?rs(e):{}}())}update_referrer_info(){this.register_once({$referrer:ss(),$referring_domain:a?.referrer&&Go(a.referrer)?.host||os},void 0)}set_initial_person_info(){if(this.props.$initial_campaign_params||this.props.$initial_referrer_info)return;let e=cs(this.Ir.mask_personal_data_properties,this.Ir.custom_personal_data_properties,this.Ir.disable_capture_url_hashes);this.register_once({[Ni]:this.Zo?{r:hs(e.r),u:e.u?hs(e.u):void 0}:e},void 0)}get_initial_props(){let e={};aa([Mi,ji],t=>{let n=this.props[t];n&&aa(n,function(t,n){e[`$initial_`+C(n)]=t})});let t=this.props[Ni];return t&&oa(e,function(e,t=!1){let n=ls(e,t),r={};return aa(n,function(e,t){r[`$initial_${C(t)}`]=e}),r}(t,this.Ir.disable_capture_url_hashes)),e}safe_merge(e){return aa(this.props,function(t,n){n in e||(e[n]=t)}),e}update_config(e,t,n){let r=e.persistence!==t.persistence,i=!((e,t)=>{if(e.length!==t.length)return!1;let n=[...e].sort(),r=[...t].sort();return n.every((e,t)=>e===r[t])})(e.cookie_persisted_properties||[],t.cookie_persisted_properties||[]),a=r||i,o=e.cookieWinsOnConflict!==t.cookieWinsOnConflict,s=e.disable_persistence||!!n,c=!!this.mi&&!s;s||this.Pl(t,c),this.Ir=e,!s&&(r||i||o)&&(this.Ml=void 0,this.El=void 0,this.Pl(R(R({},e),{},{cookie_persisted_properties:t.cookie_persisted_properties}),c));let l=a||o?this.ll(e):this.Oo;this.Vl();let u=this.al(e),d=a||u!==this.Qo,f=!s&&(d||e.cross_subdomain_cookie!==this.zl||e.secure_cookie!==this.Ul)&&this.Rl(c);this.Yo=d;try{if(this.Wl=this.Hl=e.cookie_expiration,this.set_disabled(s),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie),d){let e=this.props;this.clear(),this.Oo=l,this.Qo=u,this.props=e,this.save()}else o&&(this.Oo=l,s||(delete this.Vo[gs],this.Ol()))}finally{this.Yo=!1,f&&this.Dl()}}Vl(){let e=this.props[Ni];if(!this.Zo||!k(e)||typeof e.r!=`string`)return;let t=hs(e.r),n=typeof e.u==`string`?hs(e.u):e.u;t===e.r&&n===e.u||this.wl(Ni,R(R({},e),{},{r:t,u:n}))}set_disabled(e){this.mi=e,this.mi?this.remove():this.save()}set_cross_subdomain(e){e!==this.zl&&(this.zl=e,this.remove({keepGroupEntries:!0}),this.save())}set_secure(e){e!==this.Ul&&(this.Ul=e,this.remove({keepGroupEntries:!0}),this.save())}set_event_timer(e,t){let n=this.props.__timers||{};n[e]=t,this.wl(kr,n),this.save()}remove_event_timer(e){let t=this.props.__timers||{},n=t[e];return j(n)||(delete t[e],this.wl(kr,t),this.save()),n}get_property(e){return this.props[e]}set_property(e,t){this.wl(e,t),this.save()}wl(e,t,n=!0){var r;let i=this.props[e];this.props[e]=t,n&&(e!==`distinct_id`&&e!==`$user_state`||i===t||(this.tl=!0),bs(e)&&!xs(i,t)&&this.il.add(e),this.$l(e,i,t),(r=Uo(e))!=null&&r.volatile||this.xl(e))}kl(e,t=!0){delete this.props[e],t&&(vs(e)&&this.vl(e,!0),bs(e)&&this.il.add(e),this.xl(e))}xl(e){let t=Uo(e)?.storageGroup;t&&(this.fl(t).dirty=!0)}fl(e){return this.Vo[e]||(this.Vo[e]={})}},Ts={GZipJS:`gzip-js`,Base64:`base64`},Es={Activation:`events`,Cancellation:`cancelEvents`},Ds={Popover:`popover`,API:`api`,Widget:`widget`,ExternalSurvey:`external_survey`},Os={SHOWN:`survey shown`,DISMISSED:`survey dismissed`,SENT:`survey sent`,ABANDONED:`survey abandoned`},ks={SURVEY_ID:`$survey_id`,SURVEY_NAME:`$survey_name`,SURVEY_RESPONSE:`$survey_response`,SURVEY_ITERATION:`$survey_iteration`,SURVEY_ITERATION_
1START_DATE:`$survey_iteration_start_date`,SURVEY_PARTIALLY_COMPLETED:`$survey_partially_completed`,SURVEY_SUBMISSION_ID:`$survey_submission_id`,SURVEY_QUESTIONS:`$survey_questions`,SURVEY_COMPLETED:`$survey_completed`,PRODUCT_TOUR_ID:`$product_tour_id`,SURVEY_LAST_SEEN_DATE:`$survey_last_seen_date`,SURVEY_LANGUAGE:`$survey_language`},As={Popover:`popover`,Inline:`inline`};function js(e){let t=!0;return{dispose(){if(t){t=!1;let n=e();n&&O(n.then)&&n.then(void 0,()=>{})}}}}var Ms={SHOWN:`product tour shown`,DISMISSED:`product tour dismissed`,COMPLETED:`product tour completed`,STEP_SHOWN:`product tour step shown`,STEP_COMPLETED:`product tour step completed`,BUTTON_CLICKED:`product tour button clicked`,STEP_SELECTOR_FAILED:`product tour step selector failed`,BANNER_CONTAINER_SELECTOR_FAILED:`product tour banner container selector failed`,BANNER_ACTION_CLICKED:`product tour banner action clicked`},Ns={TOUR_ID:`$product_tour_id`,TOUR_NAME:`$product_tour_name`,TOUR_ITERATION:`$product_tour_iteration`,TOUR_RENDER_REASON:`$product_tour_render_reason`,TOUR_STEP_ID:`$product_tour_step_id`,TOUR_STEP_ORDER:`$product_tour_step_order`,TOUR_STEP_TYPE:`$product_tour_step_type`,TOUR_DISMISS_REASON:`$product_tour_dismiss_reason`,TOUR_BUTTON_TEXT:`$product_tour_button_text`,TOUR_BUTTON_ACTION:`$product_tour_button_action`,TOUR_BUTTON_LINK:`$product_tour_button_link`,TOUR_BUTTON_TOUR_ID:`$product_tour_button_tour_id`,TOUR_STEPS_COUNT:`$product_tour_steps_count`,TOUR_STEP_SELECTOR:`$product_tour_step_selector`,TOUR_STEP_SELECTOR_FOUND:`$product_tour_step_selector_found`,TOUR_STEP_ELEMENT_TAG:`$product_tour_step_element_tag`,TOUR_STEP_ELEMENT_ID:`$product_tour_step_element_id`,TOUR_STEP_ELEMENT_CLASSES:`$product_tour_step_element_classes`,TOUR_STEP_ELEMENT_TEXT:`$product_tour_step_element_text`,TOUR_ERROR:`$product_tour_error`,TOUR_MATCHES_COUNT:`$product_tour_matches_count`,TOUR_FAILURE_PHASE:`$product_tour_failure_phase`,TOUR_WAITED_FOR_ELEMENT:`$product_tour_waited_for_element`,TOUR_WAIT_DURATION_MS:`$product_tour_wait_duration_ms`,TOUR_BANNER_SELECTOR:`$product_tour_banner_selector`,TOUR_LINKED_SURVEY_ID:`$product_tour_linked_survey_id`,USE_MANUAL_SELECTOR:`$use_manual_selector`,INFERENCE_DATA_PRESENT:`$inference_data_present`,TOUR_LAST_SEEN_DATE:`$product_tour_last_seen_date`,TOUR_TYPE:`$product_tour_type`},Ps=fr(`[RateLimiter]`),Fs=class{constructor(e){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=e=>{let t=e.text;if(t&&t.length)try{(JSON.parse(t).quota_limited||[]).forEach(e=>{Ps.info(`${e||`events`} is quota limited.`),this.serverLimits[e]=new Date().getTime()+6e4})}catch(e){Ps.warn(`could not rate limit - continuing. Error: "${e?.message}"`,{text:t});return}},this.instance=e,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){return this.instance.config.rate_limiting?.events_per_second||10}get captureEventsBurstLimit(){return Math.max(this.instance.config.rate_limiting?.events_burst_limit||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(e=!1){var t;let{captureEventsBurstLimit:n,captureEventsPerSecond:r}=this,i=new Date().getTime(),a=this.instance.persistence?.get_property(`$capture_rate_limit`)??{tokens:n,last:i};a.tokens+=(i-a.last)/1e3*r,a.last=i,a.tokens>n&&(a.tokens=n);let o=1>a.tokens;if(o||e||(a.tokens=Math.max(0,a.tokens-1)),o&&!e){let e=(I(a.dropped)?a.dropped:0)+1;a.dropped=e,!this.lastEventRateLimited&&this.Gl(e)&&(a.dropped=0)}return this.lastEventRateLimited=o,(t=this.instance.persistence)==null||t.set_property(`$capture_rate_limit`,a),{isRateLimited:o,remainingTokens:a.tokens}}Zl(e){let t=this.instance.config.property_denylist;return!D(t)||!t.includes(e)}Ql(){if(this.Zl(`$current_url`)&&this.Zl(`$pathname`)&&o?.pathname)return`${o.origin??``}${o.pathname}`}Gl(e){var t;let{captureEventsBurstLimit:n,captureEventsPerSecond:r}=this,i=this.Ql(),a=this.Zl(`$session_id`)?(t=this.instance).get_session_id?.call(t):void 0,o=[`${e} event(s) dropped since the last warning`,i?`triggered on ${i}`:void 0,a?`session ${a}
1`:void 0].filter(Boolean).join(`, `);return!!this.instance.capture(`$$client_ingestion_warning`,{$$client_ingestion_warning_message:`posthog-js client rate limited: ${o}. Config is set to ${r} events per second and ${n} events burst limit.`},{skip_client_rate_limiting:!0})}isServerRateLimited(e){let t=this.serverLimits[e||`events`]||!1;return!1!==t&&new Date().getTime()<t}},Is=fr(`[RemoteConfig]`),Ls=class{constructor(e){this._instance=e}get remoteConfig(){var e;return(e=m._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.config}Jl(e){var t,n;m.__PosthogExtensions__?.loadExternalDependency?(t=m.__PosthogExtensions__)==null||(n=t.loadExternalDependency)==null||n.call(t,this._instance,`remote-config`,()=>e(this.remoteConfig)):e()}Kl(e){this._instance._send_request({method:`GET`,url:this._instance.requestRouter.endpointFor(`assets`,`/array/${this._instance.config.token}/config`),callback:e})}load(){try{if(this.remoteConfig)return Is.info(`Using preloaded remote config`,this.remoteConfig),void this.Xl(this.remoteConfig);if(this._instance.Yl())return void Is.warn(`Remote config is disabled. Falling back to local config.`);this.Jl(e=>{if(!e)return Is.info(`No config found after loading remote JS config. Falling back to JSON.`),void this.Kl(e=>{this.Xl(e.json,e)});this.Xl(e)})}catch(e){Is.error(`Error loading remote config`,e),this.Xl()}}Xl(e,t){!e&&t&&(t.statusCode===0?t.error||Is.warn(`Failed to fetch remote config from PostHog.`):Is.error(`Failed to fetch remote config from PostHog.`));try{this._instance.Xl(e?{ok:!0,config:e}:{ok:!1})}catch(e){Is.error(`Error applying remote config`,e)}if(!1!==e?.hasFeatureFlags&&!this._instance.config.advanced_disable_feature_flags_on_first_load)try{var n;(n=this._instance.featureFlags)==null||n.ensureFlagsLoaded()}catch(e){Is.error(`Error loading feature flags`,e)}}},Rs=Uint8Array,zs=Uint16Array,Bs=Uint32Array,Vs=new Rs([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]),Hs=new Rs([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]),Us=new Rs([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Ws=function(e,t){for(var n=new zs(31),r=0;31>r;++r)n[r]=t+=1<<e[r-1];var i=new Bs(n[30]);for(r=1;30>r;++r)for(var a=n[r];n[r+1]>a;++a)i[a]=a-n[r]<<5|r;return[n,i]},Gs=Ws(Vs,2),Ks=Gs[1];Gs[0][28]=258,Ks[258]=28;for(var qs=Ws(Hs,0)[1],Js=new zs(32768),Ys=0;32768>Ys;++Ys){var Xs=(43690&Ys)>>>1|(21845&Ys)<<1;Js[Ys]=((65280&(Xs=(61680&(Xs=(52428&Xs)>>>2|(13107&Xs)<<2))>>>4|(3855&Xs)<<4))>>>8|(255&Xs)<<8)>>>1}var Zs=function(e,t,n){for(var r=e.length,i=0,a=new zs(t);r>i;++i)++a[e[i]-1];var o,s=new zs(t);for(i=0;t>i;++i)s[i]=s[i-1]+a[i-1]<<1;if(n){o=new zs(1<<t);var c=15-t;for(i=0;r>i;++i)if(e[i])for(var l=i<<4|e[i],u=t-e[i],d=s[e[i]-1]++<<u,f=d|(1<<u)-1;f>=d;++d)o[Js[d]>>>c]=l}else for(o=new zs(r),i=0;r>i;++i)o[i]=Js[s[e[i]-1]++]>>>15-e[i];return o},Qs=new Rs(288);for(Ys=0;144>Ys;
vendor: 4,390 bytes, line 1
1++Ys)Qs[Ys]=8;for(Ys=144;256>Ys;++Ys)Qs[Ys]=9;for(Ys=256;280>Ys;++Ys)Qs[Ys]=7;for(Ys=280;288>Ys;++Ys)Qs[Ys]=8;var $s=new Rs(32);for(Ys=0;32>Ys;++Ys)$s[Ys]=5;var ec=Zs(Qs,9,0),tc=Zs($s,5,0),nc=function(e){return(e/8|0)+(7&e&&1)},rc=function(e,t,n){(t==null||0>t)&&(t=0),(n==null||n>e.length)&&(n=e.length);var r=new(e instanceof zs?zs:e instanceof Bs?Bs:Rs)(n-t);return r.set(e.subarray(t,n)),r},ic=function(e,t,n){var r=t/8|0;e[r]|=n<<=7&t,e[r+1]|=n>>>8},ac=function(e,t,n){var r=t/8|0;e[r]|=n<<=7&t,e[r+1]|=n>>>8,e[r+2]|=n>>>16},oc=function(e,t){for(var n=[],r=0;e.length>r;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,a=n.slice();if(!i)return[new Rs(0),0];if(i==1){var o=new Rs(n[0].s+1);return o[n[0].s]=1,[o,1]}n.sort(function(e,t){return e.f-t.f}),n.push({s:-1,f:25001});var s=n[0],c=n[1],l=0,u=1,d=2;for(n[0]={s:-1,f:s.f+c.f,l:s,r:c};u!=i-1;)s=n[n[d].f>n[l].f?l++:d++],c=n[l!=u&&n[d].f>n[l].f?l++:d++],n[u++]={s:-1,f:s.f+c.f,l:s,r:c};var f=a[0].s;for(r=1;i>r;++r)a[r].s>f&&(f=a[r].s);var p=new zs(f+1),m=sc(n[u-1],p,0);if(m>t){r=0;var h=0,g=m-t,_=1<<g;for(a.sort(function(e,t){return p[t.s]-p[e.s]||e.f-t.f});i>r;++r){var v=a[r].s;if(t>=p[v])break;h+=_-(1<<m-p[v]),p[v]=t}for(h>>>=g;h>0;){var y=a[r].s;t>p[y]?h-=1<<t-p[y]++-1:++r}for(;r>=0&&h;--r){var b=a[r].s;p[b]==t&&(--p[b],++h)}m=t}return[new Rs(p),m]},sc=function(e,t,n){return e.s==-1?Math.max(sc(e.l,t,n+1),sc(e.r,t,n+1)):t[e.s]=n},cc=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new zs(++t),r=0,i=e[0],a=1,o=function(e){n[r++]=e},s=1;t>=s;++s)if(e[s]==i&&s!=t)++a;else{if(!i&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(i),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(i);a=1,i=e[s]}return[n.subarray(0,r),t]},lc=function(e,t){for(var n=0,r=0;t.length>r;++r)n+=e[r]*t[r];return n},uc=function(e,t,n){var r=n.length,i=nc(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 a=0;r>a;++a)e[i+a+4]=n[a];return 8*(i+4+r)},dc=function(e,t,n,r,i,a,o,s,c,l,u){ic(t,u++,n),++i[256];for(var d=oc(i,15),f=d[0],p=d[1],m=oc(a,15),h=m[0],g=m[1],_=cc(f),v=_[0],y=_[1],b=cc(h),x=b[0],S=b[1],C=new zs(19),w=0;v.length>w;++w)C[31&v[w]]++;for(w=0;x.length>w;++w)C[31&x[w]]++;for(var T=oc(C,7),E=T[0],ee=T[1],D=19;D>4&&!E[Us[D-1]];--D);var O,k,A,j,M=l+5<<3,N=lc(i,Qs)+lc(a,$s)+o,P=lc(i,f)+lc(a,h)+o+14+3*D+lc(C,E)+(2*C[16]+3*C[17]+7*C[18]);if(N>=M&&P>=M)return uc(t,u,e.subarray(c,c+l));if(ic(t,u,1+(N>P)),u+=2,N>P){O=Zs(f,p,0),k=f,A=Zs(h,g,0),j=h;var F=Zs(E,ee,0);for(ic(t,u,y-257),ic(t,u+5,S-1),ic(t,u+10,D-4),u+=14,w=0;D>w;++w)ic(t,u+3*w,E[Us[w]]);u+=3*D;for(var I=[v,x],te=0;2>te;++te){var ne=I[te];for(w=0;ne.length>w;++w)ic(t,u,F[re=31&ne[w]]),u+=E[re],re>15&&(ic(t,u,ne[w]>>>5&127),u+=ne[w]>>>12)}}else O=ec,k=Qs,A=tc,j=$s;for(w=0;s>w;++w)if(r[w]>255){var re;ac(t,u,O[257+(re=r[w]>>>18&31)]),u+=k[re+257],re>7&&(ic(t,u,r[w]>>>23&31),u+=Vs[re]);var ie=31&r[w];ac(t,u,A[ie]),u+=j[ie],ie>3&&(ac(t,u,r[w]>>>5&8191),u+=Hs[ie])}else ac(t,u,O[r[w]]),u+=k[r[w]];return ac(t,u,O[256]),u+k[256]},fc=new Bs([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),pc=new Rs(0),mc=function(){for(var e=new Bs(256),t=0;256>t;++t){for(var n=t,r=9;--r;)n=(1&n&&3988292384)^n>>>1;e[t]=n}return e}(),hc=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};function gc(e,t){t===void 0&&(t={});var n=function(){var e=4294967295;return{p(t){for(var n=e,r=0;t.length>r;++r)n=mc[255&n^t[r]]^n>>>8;e=n},d(){return 4294967295^e}}}(),r=e.length;n.p(e);var i,a,o,s,c,l,u=(s=10+((i=t).filename&&i.filename.length+1||0),c=8,function(e,t,n,r,i,a){var o=e.length,s=new Rs(r+o+5*(1+Math.floor(o/7e3))+i),c=s.subarray(r,s.length-i),l=0;if(!t||8>o)for(var u=0;o>=u;u+=65535){var d=u+65535;o>d?l=uc(c,l,e.subarray(u,d)):(c[u]=a,l=uc(c,l,e.subarray(u,o)))}else{for(var f=fc[t-1],p=f>>>13,m=8191&f,h=(1<<n)-1,g=new zs(32768),_=new zs(h+1),v=Math.ceil(n/3),y=2*v,b=function(t){return(e[t]^e[t+1]<<v^e[t+2]<<y)&h},x=new Bs(25e3),S=new zs(288),C=new zs(32),w=0,T=0,E=(u=0,0),ee=0,D=0;o>u;++u){var O=b(u),k=32767&u,A=_[O];if(g[k]=A,_[O]=k,u>=ee){var j=o-u;if((w>7e3||E>24576)&&j>423){l=dc(e,c,0,x,S,C,T,E,D,u-D,l),E=w=T=0,D=u;for(var M=0;286>M;++M)S[M]=0;for(M=0;30>M;++M)C[M]=0}var N=2,P=0,F=m,I=k-A&32767;if(j>2&&O==b(u-I))for(var te=Math.min(p,j)-1,ne=Math.min(32767,u),re=Math.min(258,j);ne>=I&&--F&&k!=A;){if(e[u+N]==e[u+N-I]){for(var ie=0;re>ie&&e[u+ie]==e[u+ie-I];++ie);if(ie>
1N){if(N=ie,P=I,ie>te)break;var ae=Math.min(I,ie-2),oe=0;for(M=0;ae>M;++M){var L=u-I+M+32768&32767,se=L-g[L]+32768&32767;se>oe&&(oe=se,A=L)}}}I+=(k=A)-(A=g[k])+32768&32767}if(P){x[E++]=268435456|Ks[N]<<18|qs[P];var ce=31&Ks[N],le=31&qs[P];T+=Vs[ce]+Hs[le],++S[257+ce],++C[le],ee=u+N,++w}else x[E++]=e[u],++S[e[u]]}}l=dc(e,c,a,x,S,C,T,E,D,u-D,l),a||(l=uc(c,l,pc))}return rc(s,0,r+nc(l)+i)}(a=e,(o=t).level==null?6:o.level,o.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+o.mem,s,c,!l)),d=u.length;return function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=2>t.level?4:t.level==9?2:0,e[9]=3,t.mtime!=0&&hc(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;n.length>=r;++r)e[r+10]=n.charCodeAt(r)}}(u,t),hc(u,d-8,n.d()),hc(u,d-4,r),u}var _c=!!c||!!s,vc=new WeakMap,yc=`text/plain`,bc=0,xc=!1,Sc=(e,t)=>{let[n,r]=e.split(`#`),[i,a]=n.split(`?`);if(!a)return e;let o=a.split(`&`).filter(e=>e.split(`=`)[0]!==t).join(`&`);return`${i}${o?`?${o}`:``}${r?`#${r}`:``}`},Cc=(e,t,n=!0)=>{let[r,i]=e.split(`?`),a=R({},t),o=i?.split(`&`).map(e=>{var t;let[r,i]=e.split(`=`),o=n&&(t=a[r])!=null?t:i;return delete a[r],`${r}=${o}`})??[],s=function(e,t=`&`){let n,r,i=[];return aa(e,function(e,t){j(e)||j(t)||t===`undefined`||(n=encodeURIComponent((e=>e instanceof File)(e)?e.name:e.toString()),r=encodeURIComponent(t),i[i.length]=r+`=`+n)}),i.join(t)}(a);return s&&o.push(s),o.length>0?`${r}?${o.join(`&`)}`:r},wc=e=>{if(e.ta)return e.ta;let{data:t,compression:n}=e;if(!t)return;if(n===Ts.GZipJS){let e=gc(function(e){var t=e.length;if(typeof TextEncoder<`u`)return new TextEncoder().encode(e);for(var n=new Rs(e.length+(e.length>>>1)),r=0,i=function(e){n[r++]=e},a=0;t>a;++a){if(r+5>n.length){var o=new Rs(r+8+(t-a<<1));o.set(n),n=o}var s=e.charCodeAt(a);128>s?i(s):2048>s?(i(192|s>>>6),i(128|63&s)):s>55295&&57344>s?(i(240|(s=65536+(1047552&s)|1023&e.charCodeAt(++a))>>>18),i(128|s>>>12&63),i(128|s>>>6&63),i(128|63&s)):(i(224|s>>>12),i(128|s>>>6&63),i(128|63&s))}return rc(n,0,r)}(Wo(t)),{mtime:0});return{contentType:yc,body:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),estimatedSize:e.byteLength}}if(n===Ts.Base64){let e=(e=>`data=`+encodeURIComponent(typeof e==`string`?e:Wo(e)))(function(e){return e&&btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(e,t)=>String.fromCharCode(parseInt(t,16))))}(Wo(t)));return{contentType:`application/x-www-form-urlencoded`,body:e,estimatedSize:new Blob([e]).size}}let r=Wo(t);return{contentType:`application/json`,body:r,estimatedSize:new Blob([r]).size}},Tc=e=>{let t=()=>e.transport===`sendBeacon`?{url:Cc(e.url,{compression:Ts.Base64}),encodedBody:wc(R(R({},e),{},{compression:Ts.Base64,ta:void 0}))}:{url:Sc(e.url,`compression`),encodedBody:wc(R(R({},e),{},{compression:void 0,ta:void 0}))},n;try{n=wc(e)}catch(n){if(Pn(e.compression,Ko(e.url,`compression`)))return z.error(`Failed to gzip request body, sending uncompressed payload`,n),t();throw n}return n&&Pn(e.compression,Ko(e.url,`compression`))&&!((r=n.body)instanceof ArrayBuffer?Nn(new Uint8Array(r)):ArrayBuffer.isView(r)&&Nn(new Uint8Array(r.buffer,r.byteOffset,r.byteLength)))?(xc=!0,t()):{url:e.url,encodedBody:n};var r},Ec=e=>{try{return Tc(e)}catch(n){var t;z.error(n),(t=e.callback)==null||t.call(e,{statusCode:0,error:n});return}},Dc=function(){var e=pe(function*(e){let t=yield function(e){return Bn.apply(this,arguments)}(Wo(e.data),vr.DEBUG,{rethrow:!0});if(!t)return e;let n=yield t.arrayBuffer();return R(R({},e),{},{ta:{contentType:yc,body:n,estimatedSize:n.byteLength}})});return function(t){return e.apply(this,arguments)}}(),Oc=/Failed to fetch|NetworkError|Load failed/i,kc=e=>e?.name===`TypeError`&&Oc.test(e?.message||``),Ac=e=>{try{let t=function(e,t=Date.now()){if(typeof e!=`string`||!e)return;let n=e.trim(),r=/^\d+\s*,/.test(n)?n.slice(0,n.indexOf(`,`)).trim():n;if(/^\d+$/.test(r)){let e=1e3*Math.min(Number(r),300);return e>0?e:void 0}if(!/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun)[a-z]*[ ,]/.test(r))return;let i=/^\w{3} \w{3} /.test(r)?r+` GMT`:r,a=Date.parse(i)-t;return Number.isFinite(a)&&a>0?Math.min(a,Tt):void 0}(e());return j(t)?void 0:Math.min(t,3e4)}catch{return}},jc=e=>{let t=Ec(e);if(!t)return;let n=new c;vc.set(n,!0);let{url:r,encodedBody:i}=t;n.open(e.method||`GET`,r,!0);
1let{contentType:a,body:o}=i??{};aa(e.headers,function(e,t){n.setRequestHeader(t,e)}),a&&n.setRequestHeader(`Content-Type`,a),e.timeout&&(n.timeout=e.timeout),n.onreadystatechange=()=>{if(n.readyState===4){var t;let r={statusCode:n.status,text:n.responseText};if(n.status===200)try{r.json=JSON.parse(n.responseText)}catch{}(t=e.callback)==null||t.call(e,r,Ac(()=>n.getResponseHeader(`Retry-After`)))}},n.send(o)},Mc=e=>{let t=Ec(e);if(!t)return;let{url:n,encodedBody:r}=t,{contentType:i,body:a,estimatedSize:o}=r??{},c=new Headers;aa(e.headers,function(e,t){c.append(t,e)}),i&&c.append(`Content-Type`,i);let u=null,d=!1;if(l){let t=new l;u={signal:t.signal,timeout:setTimeout(()=>{d=!0;try{t.abort(kt(`AbortError`,`PostHog request timed out`+((n=e.timeout)?` after ${n}ms`:``)))}catch(e){p(e)}var n},e.timeout)}}let f=!1,p=t=>{var n;f||(f=!0,d&&t?.name===`AbortError`||kc(t)?z.warn(t):z.error(t),(n=e.callback)==null||n.call(e,{statusCode:0,error:t}))},m=0,h=()=>{bc-=m,m=0,u&&clearTimeout(u.timeout)};try{let t=R({method:e?.method||`GET`,headers:c,referrerPolicy:`strict-origin`,body:a,signal:u?.signal},e.fetchOptions),r=o??(j(a)?0:void 0);t.keepalive=t.method===`POST`&&!e.ea&&!1!==t.keepalive&&t.body===a&&!j(r)&&r>=0&&52428.8>bc+r,t.keepalive&&(m=r,bc+=m),s(n,t).then(t=>t.text().then(n=>{var r;if(f)return;let i={statusCode:t.status,text:n};if(t.status===200)try{i.json=JSON.parse(n)}catch(e){z.error(e)}f=!0,h(),(r=e.callback)==null||r.call(e,i,Ac(()=>t.headers.get(`Retry-After`)))})).catch(e=>{h(),p(e)}).finally(h)}catch(e){h(),p(e)}},Nc=e=>{try{let{url:t,encodedBody:n}=Tc(e),{contentType:r,body:a,estimatedSize:o}=n??{};if(!a)return;let c=a instanceof Blob?a:new Blob([a],{type:r});if(i.sendBeacon(t,c))return;let l=D(e.data)?e.data:e.data?.batch;if(D(l)&&l.length>1&&(o??0)>16384){let t=Math.ceil(l.length/2),n=t=>D(e.data)?t:R(R({},e.data),{},{batch:t});Nc(R(R({},e),{},{data:n(l.slice(0,t))})),Nc(R(R({},e),{},{data:n(l.slice(t))}));return}z.warn(`Beacon of ~${o??0} bytes was rejected by the browser, falling back to ${s?`fetch`:`XHR`}`),s?Mc(R(R({},e),{},{ea:!0})):jc(e)}catch(e){z.warn(`Beacon send failed`,e)}},Pc=(e,t,n,r)=>{let i=r===`query`?t===`POST`?`sent_at`:`_`:void 0;return Cc(n===Ts.GZipJS?Sc(e,`compression`):e,R(R({},i?{[i]:Date.now().toString()}:{}),n===Ts.GZipJS?{}:{compression:n}))},Fc=(()=>{let e=[];return s&&e.push({transport:`fetch`,method:Mc}),c&&e.push({transport:`XHR`,method:jc}),i!=null&&i.sendBeacon&&e.push({transport:`sendBeacon`,method:Nc}),e})(),Ic=!_c&&d?.indexOf(`MSIE`)===-1&&d?.indexOf(`Mozilla`)===-1;function Lc(e,t,n){var r,i;n&&(t=R(R({},t),{},{callback:e=>n(e)})),e.__loaded?Ic?e.__request_queue.push(t):e.rateLimiter.isServerRateLimited(t.batchKey)?t.fireCallbackOnDrop&&((r=t.callback)==null||r.call(t,{statusCode:429})):(t.transport=t.transport||e.config.api_transport,t.headers=R(R({},e.config.request_headers),t.headers),t.compression=t.compression===`best-available`?e.compression??t.compressionFallback:t.compression,(j(e.config.disable_beacon)?e.config.__preview_disable_beacon:e.config.disable_beacon)&&(t.disableTransport=[`sendBeacon`]),t.fetchOptions=t.fetchOptions||e.config.fetch_options,((e,t)=>{let n=R(R({},e),{},{callback:t??(t=>e.callback?.call(e,t))});n.timeout=n.timeout||6e4;let r=n.transport??`fetch`;r===`sendBeacon`&&j(n.compression)&&n.data&&(n.compression=Ts.Base64),n.method===`POST`&&n.data&&(n.timestampMode===`capture-body`?n.data=(e=>{var t;let n=(D(e)?e:[e]).map(e=>R(R({},e),e.timestamp instanceof Date&&!isNaN(e.timestamp.getTime())?{timestamp:e.timestamp.toISOString()}:{})),r=n[0];return{api_key:(r==null||(t=r.properties)==null?void 0:t.token)??r?.token,batch:n,sent_at:new Date().toISOString()}})(n.data):n.timestampMode===`body`&&(n.data=((e,t=new Date().toISOString())=>D(e)?e.map(e=>R(R({},e),{},{sent_at:t})):R(R({},e),{},{sent_at:t}))(n.data))),n.url=Pc(n.url,n.method,n.compression,n.timestampMode);let i=Fc.filter(e=>!n.disableTransport||!e.transport||!n.disableTransport.includes(e.transport)),a=function(e,t){for(let n=0;e.length>n;n++)if(t(e[n]))return e[n]}(i,e=>e.transport===r)?.method??i[0].method;if(!a)throw Error(`No available transport method`);let o=e=>{try{a(e)}catch(e){var t;kc(e)?z.warn(e):z.error(e),(t=n.callback)==null||t.call(n,{statusCode:0,error:e})}};
1r!==`sendBeacon`&&n.data&&n.compression===Ts.GZipJS&&u&&typeof Promise<`u`&&!xc?Dc(n).then(e=>{o(e)}).catch(t=>{if(Fn(t))return xc=!0,void o(R(R({},n),{},{compression:void 0,url:Pc(e.url,e.method,void 0,e.timestampMode)}));(e=>{if(!e||typeof e!=`object`)return!1;let t=`name`in e?String(e.name):``;return Fn(e)||t===Mn})(t)&&(xc=!0),o(n)}):a(n)})(t,(r,i)=>{var a,o,s;e.rateLimiter.checkForLimiting(r),400>r.statusCode||(a=(o=e.config).on_request_error)==null||a.call(o,r),n?n(r,i):(s=t.callback)==null||s.call(t,r)})):t.fireCallbackOnDrop&&((i=t.callback)==null||i.call(t,{statusCode:0}))}var Rc=class{constructor(e,t){this.ia=!0,this.na=[],this.sa=ge(t?.flush_interval_ms||3e3,250,5e3,z.createLogger(`flush interval`),3e3),this.ra=e}enqueue(e){this.na.push(e),this.oa||this.la()}unload(){this.aa();let e=this.na.length>0?this.ua():{},t=Object.values(e);[...t.filter(e=>e.url.indexOf(`/e`)===0),...t.filter(e=>e.url.indexOf(`/e`)!==0)].map(e=>{this.ha(e,`sendBeacon`)})}enable(){this.ia=!1,this.la()}la(){this.ia||(this.oa=setTimeout(()=>{if(this.aa(),this.na.length>0){let e=this.ua();for(let t in e)this.ha(e[t])}},this.sa))}ha(e,t){try{this.ra(e,t)}catch(e){z.error(e)}}aa(){clearTimeout(this.oa),this.oa=void 0}ua(){let e={};return aa(this.na,t=>{var n;let r=t,i=((r?r.batchKey:null)||r.url)+(r.batchGroup?`:${r.batchGroup}`:``);j(e[i])&&(e[i]=R(R({},r),{},{data:[]})),(n=e[i].data)==null||n.push(r.data)}),this.na=[],e}},zc=[`retriesPerformedSoFar`],Bc=class{constructor(e){this._instance=e,this.ca=!1,this.da=3e3,this.na=[],this.na=[],this.va=!0,this.resume()}resume(){if(!j(n)&&`onLine`in n.navigator){if(this.va=n.navigator.onLine,this.fa)return;this.fa=()=>{this.va=!0,this.pa()},this.ga=()=>{this.va=!1},pa(n,`online`,this.fa),pa(n,`offline`,this.ga)}}get length(){return this.na.length}retriableRequest(e,t){let{retriesPerformedSoFar:n}=e,r=Vn(e,zc);te(n)&&(r.url=Cc(r.url,{retry_count:n})),Lc(this._instance,t?R(R({},r),{},{transport:t}):r,(e,t)=>{var i;if(e.statusCode!==200&&(400>e.statusCode||e.statusCode>=500)){if((e.statusCode===0?3:10)>(n??0))return void this.Ls(R({retriesPerformedSoFar:n},r),t);e.statusCode===0&&z.warn(`Request failed before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped retrying after ${n??0} retries.`)}(i=r.callback)==null||i.call(r,e)})}Ls(e,t){let n=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=n+1;let r=Math.max(function(e){let t=3e3*2**e,n=t/2,r=Math.min(18e5,t),i=(Math.random()-.5)*(r-n);return Math.ceil(r+i)}(n),t??0),i=Date.now()+r;this.na.push({retryAt:i,requestOptions:e});let a=`Enqueued failed request for retry in ${r}`;navigator.onLine||(a+=` (Browser is offline)`),z.warn(a),this.ca||(this.ca=!0,this.ma())}ma(){if(this.ya&&clearTimeout(this.ya),this.na.length===0)return this.ca=!1,void(this.ya=void 0);this.ya=setTimeout(()=>{this.va&&this.na.length>0&&this.pa(),this.ma()},this.da)}pa(){let e=Date.now(),t=[],n=this.na.filter(n=>e>n.retryAt||(t.push(n),!1));if(this.na=t,n.length>0)for(let{requestOptions:e}of n)this.retriableRequest(e)}unload(){this.ya&&=(clearTimeout(this.ya),void 0),this.ca=!1,j(n)||(this.fa&&=(n.removeEventListener(`online`,this.fa),void 0),this.ga&&=(n.removeEventListener(`offline`,this.ga),void 0));for(let{requestOptions:e}of this.na)try{this._instance._send_request(R(R({},e),{},{transport:`sendBeacon`}))}catch(e){z.error(e)}this.na=[]}},Vc=class{constructor(e){this._instance=e,this.ba=()=>{this._a||={};let e=this.scrollElement(),t=this.scrollY(),n=e?Math.max(0,e.scrollHeight-e.clientHeight):0,r=t+(e?.clientHeight||0),i=e?.scrollHeight||0;this._a.lastScrollY=Math.ceil(t),this._a.maxScrollY=Math.max(t,this._a.maxScrollY??0),this._a.maxScrollHeight=Math.max(n,this._a.maxScrollHeight??0),this._a.lastContentY=r,this._a.maxContentY=Math.max(r,this._a.maxContentY??0),this._a.maxContentHeight=Math.max(i,this._a.maxContentHeight??0)}}get wa(){return this._instance.config.scroll_root_selector}getContext(){return this._a}resetContext(){let e=this._a;return this._a=void 0,setTimeout(this.ba,0),e}startMeasuringScrollPosition(){pa(n,`scroll`,this.ba,{capture:!0}),pa(n,`scrollend`,this.ba,{capture:!0}),pa(n,`resize`,this.ba)}scrollElement(){if(this.wa){let t=D(this.wa)?this.wa:[this.wa];for(let r of t){var e;let t=n==null||(e=n.document)==null?void 0:e.querySelector(r);if(t)return t}return}var t;return n==null||(t=n.document)==null?void 0:t.documentElement}ka(e){var t,r;let i=e===`y`?`scrollTop`:`scrollLeft`;if(this.wa){let e=this.scrollElement();return e&&e[i]||0}return n?e===`y`?n.scrollY||n.pageYOffset||((t=n.document)==null||(t=t.documentElement)==null?void 0:t.scrollTop)||0:n.scrollX||n.pageXOffset||((r=n.document)==null||(r=r.documentElement)==null?void 0:r.scrollLeft)||0:0}scrollY(){return this.ka(`y`)}scrollX(){return this.ka(`x`)}},Hc=e=>cs(e?.config.mask_personal_data_properties,e?.config.custom_personal_data_properties,e?.config.disable_capture_url_hashes
1),Uc=class{constructor(e,t,n,r){this.Be=e=>{let t=this.Sa();if(t&&t.sessionId===e)return;let n={sessionId:e,props:this.xa(this._instance)};this.Ca.register({[ki]:n})},this._instance=e,this.$a=t,this.Ca=n,this.xa=r||Hc,this.$a.onSessionId(this.Be)}Sa(){return this.Ca.props[ki]}getSetOnceProps(){let e=this.Sa()?.props;return e?`r`in e?ls(e,this._instance.config.disable_capture_url_hashes):{$referring_domain:e.referringDomain,$pathname:e.initialPathName,utm_source:e.utm_source,utm_campaign:e.utm_campaign,utm_medium:e.utm_medium,utm_content:e.utm_content,utm_term:e.utm_term}:{}}getSessionProps(){let e={};return aa(la(this.getSetOnceProps()),(t,n)=>{n===`$current_url`&&(n=`url`),e[`$session_entry_${C(n)}`]=t}),e}},Wc=class{on(e,t){return this.Ia[e]||(this.Ia[e]=[]),this.Ia[e].push(t),()=>{this.Ia[e]=this.Ia[e].filter(e=>e!==t)}}emit(e,t){for(let n of this.Ia[e]||[])n(t);for(let n of this.Ia[`*`]||[])n(e,t)}constructor(){this.Ia={}}},Gc=fr(`[SessionId]`),Kc=864e5,qc=class{on(e,t){return this.Ta.on(e,t)}constructor(e,t,n){var r;if(this.Ma=null,this.Ea=null,this.Pa=[],this.Ra=void 0,this.Aa=!1,this.Ta=new Wc,this.Fa=(e,t)=>!(!te(e)||!te(t))&&Math.abs(e-t)>this.sessionTimeoutMs,!e.persistence)throw Error(`SessionIdManager requires a PostHogPersistence instance`);if(e.config.cookieless_mode===`always`)throw Error(`SessionIdManager cannot be used with cookieless_mode="always"`);this.Ir=e.config,this.Ca=e.persistence,this.He=void 0,this.Xt=void 0,this._sessionStartTimestamp=null,this.Oa=void 0,this._sessionActivityTimestamp=null,this.Da=t||xa,this.La=n||xa;let i=this.Ir.persistence_name||this.Ir.token;if(this._sessionTimeoutMs=1e3*ge(this.Ir.session_idle_timeout_seconds||1800,60,36e3,Gc.createLogger(`session_idle_timeout_seconds`),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.Na(),this.qa=`ph_`+i+`_window_id`,this.ja=`ph_`+i+`_primary_window_exists`,this.Ba()){let e=Ha.Dt(this.qa),t=Ha.Dt(this.ja);e&&!t?this.He=e:Ha.Lt(this.qa),Ha.At(this.ja,!0)}(r=this.Ir.bootstrap)!=null&&r.sessionID&&this.setBootstrapSessionId(this.Ir.bootstrap.sessionID),this.Ha()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return j(this.Pa)&&(this.Pa=[]),this.Pa.push(e),this.Xt&&e(this.Xt,this.He),()=>{this.Pa=this.Pa.filter(t=>t!==e)}}Ba(){return this.Ir.persistence!==`memory`&&!this.Ca.mi&&Ha.Et()}za(e){e!==this.He&&(this.He=e,this.Ba()&&Ha.At(this.qa,e))}Ua(){return this.He?this.He:this.Ba()?Ha.Dt(this.qa):null}Wa(e){let t=this.Ma;return!P(t)&&!P(e)&&5e3>Math.abs(e-t)}Va(e,t,n){let r=t!==this._sessionActivityTimestamp,i=e===this.Xt&&n===this._sessionStartTimestamp;this._sessionStartTimestamp=n,this._sessionActivityTimestamp=t,this.Xt=e,i&&!r||i&&this.Wa(t)||(this.Ma=t,this.Ca.register({[qr]:[t,e,n]}))}Ga(){let e=this.Ir?.persistence_save_debounce_ms;return te(e)&&e>0}Za(){this.Ga()?this.Ca.refreshKey(qr):(this.Ca.flush(),this.Ca.load())}Qa(){if(P(this._sessionActivityTimestamp)||this._sessionActivityTimestamp===this.Ma)return;this.Za();let[,e,t]=this.Ja();e===this.Xt&&t===this._sessionStartTimestamp&&(this.Ma=this._sessionActivityTimestamp,this.Ca.register({[qr]:[this._sessionActivityTimestamp,this.Xt??null,this._sessionStartTimestamp]}),this.Ca.flush())}Ka(){let[e]=this.Ja(),t=te(e)?e:0,n=te(this._sessionActivityTimestamp)?this._sessionActivityTimestamp:0;return Math.max(t,n)}Xa(e){return this.Za(),this.Fa(e,this.Ka())}Ja(){let e=this.Ca.props[qr];return D(e)&&e.length===2&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.Ma=null,this.Oa=void 0,clearTimeout(this.Ya),this.Ya=void 0,this.Va(null,null,null)}setBootstrapSessionId(e,t=!1){let n=((e,t=new Date().getTime())=>{try{let n=(e=>{let t=e.replace(/-/g,``);if(t.length!==32)throw Error(`Not a valid UUID`);if(t[12]!==`7`)throw Error(`Not a UUIDv7`);return parseInt(t.substring(0,12),16)})(e);return n>t+6e4?void Gc.error(`Bootstrap sessionID cannot be in the future`):n}catch(e){Gc.error(`Invalid sessionID in bootstrap`,e);return}})(e);return!j(n)&&(t?this.Oa={sessionId:e,sessionStartTimestamp:n}:this.Va(e,new Date().getTime(),n),!0)}destroy(){this.Aa=!0,this.Qa(),clearTimeout(this.Ya),this.Ya=void 0,this.Ra&&n&&(n.removeEventListener($i,this.Ra,{capture:!1}),this.Ra=void 0),this.Pa=[]}Ha(){this.Ra=()=>{this.Qa(),this.Ba()&&Ha.Lt(this.ja)},pa(n,$i,this.Ra,{capture:!1})}
1checkAndGetSessionAndWindowId(e=!1,t=null,n=!1){if(this.Ir.cookieless_mode===`always`)throw Error(`checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"`);let r=t||new Date().getTime(),i=this.Xt;if(n)this.Ea=r;else if(P(this.Ea)||this.Ea>r||r-this.Ea>=1e3){var a,o;(a=(o=this.Ca).syncCookieProperties)==null||a.call(o),this.Ea=r}let[,s,c]=this.Ja(),l=!j(i)&&s!==i,u=this.Ka(),d=this.Ua(),f=this.Oa,p=!!f&&(f.sessionStartTimestamp>r+6e4||r-f.sessionStartTimestamp>Kc),m=f?p:te(c)&&Math.abs(r-c)>Kc,h=!1,g=l,_=!s||!!f,v=s,y=!_&&!e&&this.Fa(r,u);if(y&&(y=this.Xa(r),y||Gc.info(`cross-tab refresh kept the session alive`,{sessionId:s}),[,s,c]=this.Ja()),_||y||m){g=!1;let e=f&&!p;s=e?f.sessionId:this.Da(),d=this.La(),Gc.info(`new session ID assigned`,{sessionId:s,windowId:d,bootstrapped:!!e,changeReason:{noSessionId:_,activityTimeout:y,sessionPastMaximumLength:m}}),c=e?f.sessionStartTimestamp:r,this.Oa=void 0,h=!0}else d||(d=this.La(),h=!0),g||=s!==v,g&&(Gc.info(`adopted cross-tab session id`,{sessionId:s,windowId:d}),h=!0);let b=te(u)&&e&&!m?u:r,x=te(c)?c:new Date().getTime();this.za(d),this.Va(s,b,x),e||this.Na();let S={noSessionId:_,activityTimeout:y,sessionPastMaximumLength:m,crossTabAdoption:g};return h&&this.Pa.forEach(e=>e(s,d,S)),{sessionId:s,windowId:d,sessionStartTimestamp:x,changeReason:h?S:void 0,lastActivityTimestamp:u}}Na(){this.Aa||(clearTimeout(this.Ya),this.Ya=setTimeout(()=>{if(!this.Aa){if(this.Xa(new Date().getTime())){let e=this.Xt;this.resetSessionId(),this.Ta.emit(`forcedIdleReset`,{idleSessionId:e})}else this.Na()}},1.1*this.sessionTimeoutMs))}},Jc=function(e,t){if(!e)return!1;let n=e.userAgent;if(n&&he(n,t))return!0;try{let n=e?.userAgentData;if(n?.brands&&n.brands.some(e=>he(e?.brand,t)))return!0}catch{}return!!e.webdriver};function Yc(){return(Yc=pe(function*(){let e=i?.userAgentData;if(e?.getHighEntropyValues)try{let t=(yield e.getHighEntropyValues([`model`]))?.model;return M(t)&&t.length>0?t:void 0}catch(e){z.info(`Unable to resolve $device_model from userAgentData.getHighEntropyValues`,e);return}})).apply(this,arguments)}function Xc(e,t){let n=`$survey_${t}/${e.id}`;return e.current_iteration&&e.current_iteration>0&&(n=`$survey_${t}/${e.id}/${e.current_iteration}`),n}function Zc(e){var t;return!!((t=e.conditions)!=null&&(t=t.events)!=null&&(t=t.values)!=null&&t.length)}var Qc=(e,t)=>{if(!(e=>{try{new RegExp(e)}catch{return!1}return!0})(t))return!1;try{return new RegExp(t).test(e)}catch{return!1}},$c=e=>e.toLowerCase(),el={exact:(e,t)=>t.some(t=>e.some(e=>t===e)),is_not:(e,t)=>t.every(t=>e.every(e=>t!==e)),regex:(e,t)=>t.some(t=>e.some(e=>Qc(t,e))),not_regex:(e,t)=>t.every(t=>e.every(e=>!Qc(t,e))),icontains:(e,t)=>t.map($c).some(t=>e.map($c).some(e=>t.includes(e))),not_icontains:(e,t)=>t.map($c).every(t=>e.map($c).every(e=>!t.includes(e))),gt:(e,t)=>t.some(t=>{let n=parseFloat(t);return!isNaN(n)&&e.some(e=>n>parseFloat(e))}),lt:(e,t)=>t.some(t=>{let n=parseFloat(t);return!isNaN(n)&&e.some(e=>n<parseFloat(e))})};function tl(e,t){return!e||Object.entries(e).every(([e,n])=>{let r=t?.[e];if(r==null)return!1;let i=el[n.operator];return!!i&&i(n.values,[String(r)])})}function nl(e,t,n){return Wo({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:n})}var rl=`custom`,il=`i.posthog.com`,al=/^\/static\//,ol=[`/s/`,`/e/`,`/i/`],sl=class{constructor(e){this.tu={},this.instance=e}get apiHost(){let e=this.instance.config.api_host.trim().replace(/\/$/,``);return e===`https://app.posthog.com`?`https://us.i.posthog.com`:e}get flagsApiHost(){let e=this.instance.config.flags_api_host;return e?e.trim().replace(/\/$/,``):this.apiHost}get uiHost(){let e=this.instance.config.ui_host?.replace(/\/$/,``);return e||=this.apiHost.replace(`.${il}`,`.posthog.com`),e===`https://app.posthog.com`?`https://us.posthog.com`:e}get region(){return this.tu[this.apiHost]||(this.tu[this.apiHost]=/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?`us`:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?`eu`:rl),this.tu[this.apiHost]}eu(e){if(!al.test(e))return;let t=this.instance.config.asset_host;return typeof t==`string`&&t.trim().replace(/\/$/,``)||void 0}iu(e){let t=Go(e);return t?t.protocol+`//`+t.host+t.pathname:void 0}nu(e,t,n){if(e===`ui`)return n;let r=n,i=this.instance.config.rewriteRequestPath;if(i){let e=Go(n)?.href||n;r=i(new URL(e)).toString()}if(i&&e===`api`&&ol.some(e=>t.indexOf(e)===0)){let e=this.iu(r);if(e){let t=this.apiHost,n=this.su;n?.apiHost===t&&n.rewriteRequestPath===i||(n={apiHost:t,rewriteRequestPath:i,urls:new Set},this.su=n),n.urls.add(e)}}return r}isIngestionEndpoint(e){let t=this.su,n=this.iu(e);return t?.apiHost===this.apiHost&&t.rewriteRequestPath===this.instance.config.rewriteRequestPath&&!!n&&t.urls.has(n)}endpointFor(e,t=``){if(t&&=t[0]===`/`?t:`/${t}`,e===`ui`)return this.nu(e,t,this.uiHost+t);if(e===`flags`)return this.nu(e,t,this.flagsApiHost+t);if(e===`assets`){let n=this.eu(t);if(n)return this.nu(e,t,`${n}${t}`)}if(this.region===rl)return this.nu(e,t,this.apiHost+t);let n=il+t;switch(e){case`assets`:return this.nu(e,t,`https://${this.region}-assets.${n}`);case`api`:return this.nu(e,t,`https://${this.region}.${n}`)}}},cl=fr(`[Surveys]`),ll=e=>{try{let t=(e=>((e,t)=>`seenSurvey_${function(e){return e.current_iteration&&e.current_iteration>0?`${e.id}_${e.current_iteration}`:e.id}(t)}`)(0,e))(e);if(localStorage.getItem(t))return;localStorage.setItem(t,`true`)}catch(e){cl.error(`Failed to persist survey seen state`,e)}},ul=[Ds.Popover,Ds.Widget,Ds.API],dl={ignoreConditions:!1,ignoreDelay:!1,displayType:As.Popover}
1,fl=fr(`[PostHog ExternalIntegrations]`),pl={intercom:`intercom-integration`,crispChat:`crisp-chat-integration`},ml=class{constructor(e){this._instance=e}qo(e,t){var n,r;(n=m.__PosthogExtensions__)==null||(r=n.loadExternalDependency)==null||r.call(n,this._instance,e,e=>{if(e)return fl.error(`failed to load script`,e);t()})}startIfEnabledOrStop(){for(let[r,i]of Object.entries(this._instance.config.integrations??{})){var e,t,n;i&&!((e=m.__PosthogExtensions__)!=null&&(e=e.integrations)!=null&&e[r])&&this.qo(pl[r],()=>{var e;(e=m.__PosthogExtensions__)==null||(e=e.integrations)==null||(e=e[r])==null||e.start(this._instance)}),!i&&(t=m.__PosthogExtensions__)!=null&&(t=t.integrations)!=null&&t[r]&&((n=m.__PosthogExtensions__)==null||(n=n.integrations)==null||(n=n[r])==null||n.stop())}}},hl=class{constructor(e,t){this.$=e,this.mo=t,this.ru=new Map,this.xo=!1}add(e){var t=this;return pe(function*(){if(t.xo)throw Error(`Cannot add an extension to a disposed ExtensionRuntime`);if(t.ru.has(e.name))throw Error(`Browser extension "${e.name}" is already registered`);t.ru.set(e.name,e);try{let n=e.setup(t.mo);n&&(yield n)}catch(n){let r=t.ru.get(e.name)===e;r&&t.ru.delete(e.name),t.$.error(`Failed to set up browser extension "${e.name}"`,n),r&&t.ou(e)}})()}getExtension(e){return this.ru.get(e)}dispose(){if(this.xo)return;this.xo=!0;let e=Array.from(this.ru.values()).reverse();this.ru.clear();for(let t of e)this.ou(t)}ou(e){try{let t=e.dispose?.call(e);t&&O(t.then)&&t.then(void 0,t=>{this.$.error(`Failed to dispose browser extension "${e.name}"`,t)})}catch(t){this.$.error(`Failed to dispose browser extension "${e.name}"`,t)}}},gl=class{constructor(e){this._instance=e}initialize(){}get(e){let t=this._instance.persistence;if(typeof e==`string`)return t?.get_property(e);let n={};for(let r of e){let e=t?.get_property(r);j(e)||(n[r]=e)}return n}set(e,t){var n;(n=this._instance.persistence)==null||n.register(typeof e==`string`?{[e]:t}:e)}remove(e){var t;(t=this._instance.persistence)==null||t.unregister(e)}},_l=`extensionsRemoteConfig`,vl=class{constructor(e){this.instance=e,this.xo=!1,this.$=z,this.lu=e.au,this.kv=new gl(e),this.onEvent=e=>js(this.instance.on(`eventCaptured`,t=>{try{e({event:t.event,properties:t.properties})}catch(e){this.$.error(`Browser extension event listener failed`,e)}})),this.onRemoteConfig=e=>{if(this.xo)return js(()=>{});let t=t=>{try{e(t)}catch(e){this.$.error(`Browser extension remote config listener failed`,e)}},n=this.instance.uu.on(_l,t);return this.lu&&t(this.lu),js(n)},this.hu=new hl(z.createLogger(`[BrowserExtensions]`),this)}get logger(){return this.$}get distinctId(){return this.instance.get_distinct_id()}get anonymousId(){return this.instance.get_property(`$device_id`)??this.distinctId}get deviceId(){let e=this.instance.get_property(xr);return typeof e==`string`?e:void 0}get library(){return{name:vr.LIB_NAME,version:vr.LIB_VERSION}}get initialPersonProperties(){return this.instance.persistence?.get_initial_props()??{}}get groups(){return this.instance.getGroups()}get session(){try{let e=this.instance.sessionManager?.checkAndGetSessionAndWindowId(!0);return{sessionId:e?.sessionId??``,windowId:e?.windowId??``,sessionStartTimestamp:e?.sessionStartTimestamp??0}}catch{return{sessionId:``,windowId:``,sessionStartTimestamp:0}}}get canCapture(){return this.instance.is_capturing()}get projectToken(){return this.instance.config.token}add(e){return this.hu.add(e)}getExtension(e){return this.hu.getExtension(e)}capture(e,t,n){var r=this;return pe(function*(){n?r.instance.capture(e,t,{timestamp:n.timestamp,uuid:n.uuid,$set:n.set,$set_once:n.setOnce}):r.instance.capture(e,t)})()}registerDynamicEventProperties(e){return js(this.instance.cu(e))}handleRemoteConfig(e){this.xo||(this.lu=e,this.instance.uu.emit(_l,e))}sendRequest(e){var t=this;return pe(function*(e,n={}){let r=t.instance.requestRouter.endpointFor(n.target??`api`,e),i={method:n.method,url:n.query?Cc(r,n.query):r,data:n.body,headers:n.headers,timeout:n.timeoutMs,fireCallbackOnDrop:!0,transport:n.transport,compression:n.compression,compressionFallback:n.target===`flags`&&n.compression===`best-available`?v.Base64:void 0,timestampMode:n.sentAt};return n.transport===`sendBeacon`?(t.instance._send_request(i),{statusCode:202}):new Promise(e=>{i.callback=e,t.instance._send_request(i)})}).apply(this,arguments)}dispose(){this.xo||(this.xo=!0,this.hu.dispose())}},yl={},bl=0,xl=()=>{}
1,Sl=`Consent opt in/out is not valid with cookieless_mode="always" and will be ignored`,Cl=`Surveys module not available`,wl=`sanitize_properties is deprecated. Use before_send instead`,Tl=`Invalid value for property_denylist config: `,El=/^[A-Za-z0-9_-]{1,400}$/,Dl=/^fb\.[0-9]+\.[0-9]+\.[A-Za-z0-9_-]+(?:\.[A-Za-z0-9_-]+)?$/,Ol=/^fb\.[0-9]+\.[0-9]+\.[0-9]+$/,kl=[`token`,`distinct_id`,Ii],Al=`posthog`,jl=e=>{let t={};return e&&e!==`unset`?(`2025-11-30`>e||(t.strictMinimumDuration=!0),`2026-05-30`>e||(t.canvasCapture={resolutionScale:.6}),`2026-06-25`>e||(t.streamNetworkBody=!0),`2026-08-30`>e||(t.captureJsonLd=!0),t):t},Ml=e=>{var t;return R({api_host:`https://us.i.posthog.com`,flags_api_host:null,ui_host:null,asset_host:null,token:``,autocapture:!0,cross_subdomain_cookie:fa(a?.location),persistence:`localStorage+cookie`,persistence_name:``,cookie_persisted_properties:[],loaded:xl,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:`if_capture_pageview`,defaults:e??`unset`,__preview_deferred_init_extensions:!1,__preview_external_dependency_versioned_paths:!1,__preview_cookie_wins_on_conflict:!1,debug:o&&M(o?.search)&&o.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_conversations:!1,disable_product_tours:!1,disableDeviceModel:!1,reuseAnonymousId:!1,disable_external_dependency_loading:!1,strict_script_versioning:`fallback`,enable_recording_console_log:void 0,secure_cookie:(n==null||(t=n.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,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_feature_flags_dedup_per_session:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error(e){z.error(`Bad HTTP status: `+e.statusCode+` `+e.text)},get_device_id:e=>e,capture_performance:void 0,name:`posthog`,bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:Zi,before_send:void 0,get_current_url:void 0,request_queue_config:{flush_interval_ms:3e3},error_tracking:{},_onCapture:xl},(e=>({rageclick:e&&e>=`2026-05-30`?{content_ignorelist:co,ignore_text_selection:!0}
1:!e||`2025-11-30`>e||{content_ignorelist:!0},capture_pageview:!e||`2025-05-24`>e||`history_change`,session_recording:jl(e),external_scripts_inject_target:e&&e>=`2026-01-30`?`head`:`body`,internal_or_test_user_hostname:e&&e>=`2026-01-30`?/^(localhost|127\.0\.0\.1)$/:void 0,persistence_save_debounce_ms:e&&e>=`2026-05-30`?250:0,split_storage:!(!e||`2026-05-30`>e),detect_google_search_app:!(!e||`2026-05-30`>e),disable_capture_url_hashes:!(!e||`2026-06-25`>e),cookieWinsOnConflict:!(!e||e===`unset`||`2026-08-29`>e)}))(e))},Nl=[[`process_person`,`person_profiles`],[`xhr_headers`,`request_headers`],[`cookie_name`,`persistence_name`],[`disable_cookie`,`disable_persistence`],[`__preview_disable_beacon`,`disable_beacon`],[`store_google`,`save_campaign_params`],[`verbose`,`debug`],[`__preview_cookie_wins_on_conflict`,`cookieWinsOnConflict`]],Pl=e=>{let t={};for(let[n,r]of Nl)j(e[n])||(t[r]=e[n]);let n=oa({},t,e),r=e.__preview_external_dependency_versioned_paths;return j(r)||(j(e.strict_script_versioning)&&(n.strict_script_versioning=!!r),M(r)&&j(e.asset_host)&&(n.asset_host=r)),D(e.property_blacklist)&&(j(e.property_denylist)?n.property_denylist=e.property_blacklist:D(e.property_denylist)?n.property_denylist=[...e.property_blacklist,...e.property_denylist]:z.error(Tl+e.property_denylist)),n},Fl=class{constructor(){this.__forceAllowLocalhost=!1}get du(){return this.__forceAllowLocalhost}set du(e){z.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}},Il=class e{vu(e){if(!e)return;let t=this.ru.indexOf(e);t!==-1&&this.ru.splice(t,1)}fu(e,t){var n;return this.vu(e),this.ru.push(t),(n=t.initialize)==null||n.call(t),t}pu(){return this.config.cookieless_mode===`always`||this.config.cookieless_mode===`on_reject`&&this.consent.isRejected()}gu(){if(this.mu||this.config.reuseAnonymousId||this.config.segment||this.pu())return;let e=this.config.persistence===`memory`||this.config.persistence===`sessionStorage`;if(!e&&!this.config.disable_persistence||this.yu)return;let t,n,r;e?(t=`persistence is set to '${this.config.persistence}'`,n=this.config.persistence===`memory`?`on every page load`:`for every new browser tab or window`,r=`Either set persistence to 'localStorage+cookie', keep this persistence and pass a stable ID through bootstrap.distinctID, or enable reuseAnonymousId.`):(t=`persistence is disabled (disable_persistence is true)`,n=`on every page load`,r=`Either set disable_persistence to false, keep persistence disabled and pass a stable ID through bootstrap.distinctID, or enable reuseAnonymousId.`),this.mu=!0,console.warn(`[PostHog.js]`,`${t} but no bootstrap.distinctID was provided. PostHog will mint a new distinct ID ${n}, so calling identify() merges a new ID onto the person each time. A person can then pass the distinct-ID limit and its events stop appearing on person pages and the session tab. ${r}`)}bu(){if(this.pu()||this.get_distinct_id()!==`$posthog_cookieless`)return;let e=this.persistence;if(!e)return;this._u()||e.load(!0);let t=this.get_distinct_id();if(!t||t===`$posthog_cookieless`){let t=this.config.get_device_id(xa());this.register({distinct_id:t,$device_id:t}),e.set_property(Oi,Yi)}this.wu()}get decideEndpointWasHit(){var e;return(e=this.featureFlags?.hasLoadedFlags)!=null&&e}get flagsEndpointWasHit(){var e;return(e=this.featureFlags?.hasLoadedFlags)!=null&&e}constructor(){this.ku=!1,this.Su=!1,this.webPerformance=new Fl,this.xu=!1,this.version=vr.LIB_VERSION,this.Cu=new Set,this.$u=``,this.uu=new Wc,this.ru=[],this.Iu=[],this.yu=!1,this.mu=!1,this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=Ml(),this.SentryIntegration=Ro,this.sentryIntegration=e=>function(e,t){let n=Lo(e,t);return{name:Io,processEvent:e=>n(e)}}(this,e),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint=`/e/`,this.Tu=!1,this.Mu=null,this.Eu=null,this.Pu=null,this.scrollManager=new Vc(this),this.pageViewManager=new zo(this),this.rateLimiter=new Fs(this),this.requestRouter=new sl(this),this.consent=new Ua(this),this.externalIntegrations=new ml(this);let t=e.__defaultExtensionClasses??{};this.featureFlags=t.featureFlags&&new t.featureFlags(this),this.toolbar=t.toolbar&&new t.toolbar(this),this.surveys=t.surveys&&new t.surveys(this),this.conversations=t.conversations&&new t.conversations(this),this.logs=t.logs&&new t.logs(this),this.metrics=t.metrics&&new t.metrics(this),this.experiments=t.experiments&&new t.experiments(this),this.exceptions=t.exceptions&&new t.exceptions(this),this.people={set:(e,t,n)=>{let r=M(e)?{[e]:t}:e;this.setPersonProperties(r),n?.({})},set_once:(e,t,n)=>{let r=M(e)?{[e]:t}:e;this.setPersonProperties(void 0,r),n?.({})}},this.on(`eventCaptured`,e=>z.info(`send "${e?.event}"`,e))}init(t,n,r){if(r&&r!==Al){let i=yl[r]??new e;return i._init(t,n,r),yl[r]=i,yl[Al][r]=i,i}return this._init(t,n,r)}_init(e,t={},r){var i;let a=M(e)?e.trim():``;if(!a)return z.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 a===this.config?.token?console.warn(`[PostHog.js]`,`You have already initialized PostHog! Re-initializing is a no-op`):console.warn(`[PostHog.js]`,`You have already initialized PostHog with a different project token! Re-initializing is a no-op, so events will keep going to the project this instance was initialized with. To capture into a second project, load PostHog once, then initialize a named instance after the SDK has loaded, e.g. posthog.init('${a}', { ... }, 'project2')`),this;this.__loaded=!0,this.config=Ml(t.defaults),t.debug=this.Ru(t.debug),this.Au=t,this.Fu=[],t.person_profiles?this.Eu=t.person_profiles:t.process_person&&(this.Eu=t.process_person);let o=Ml(t.defaults),s=Pl(t),c=oa({},o,s,{name:r,token:a});k(o.rageclick)&&k(s.rageclick)&&(c.rageclick=oa({},o.rageclick,s.rageclick)),k(o.session_recording)&&k(s.session_recording)&&(c.session_recording=oa({},o.session_recording,s.session_recording)),this.set_config(c),this.config.on_xhr_error&&z.error(`on_xhr_error is deprecated. Use on_request_error instead`),this.compression=t.disable_compression?void 0:Ts.GZipJS;let l=this._u();if(this.persistence=new ws(this.config,l),this.sessionPersistence=this.config.persistence===`
1sessionStorage`||this.config.persistence===`memory`?this.persistence:new ws(R(R({},this.config),{},{persistence:`sessionStorage`}),l,!1),this.$u=`ph_`+(this.config.persistence_name||this.config.token)+`_session_registered_properties`,this.config.persistence!==`memory`&&!l&&Ha.Et()){let e=Ha.Dt(this.$u);D(e)&&e.forEach(e=>{M(e)&&this.Cu.add(e)})}else Ha.Lt(this.$u);let u=R({},this.persistence.props),d=R({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.Ou=new Rc((e,t)=>this.Du(e,t),this.config.request_queue_config),this.Lu=new Bc(this),this.__request_queue=[];let f=this.pu();f||(this.sessionManager=new qc(this),this.sessionPropsManager=new Uc(this,this.sessionManager,this.persistence),this.sessionManager.onSessionId((e,t,n)=>{(n!=null&&n.activityTimeout||n!=null&&n.sessionPastMaximumLength||n!=null&&n.crossTabAdoption)&&this.Nu()})),this.qu(),this.config.__preview_deferred_init_extensions?(z.info(`Deferring extension initialization to improve startup performance`),setTimeout(()=>{this.ju(f)},0)):(z.info(`Initializing extensions synchronously`),this.ju(f)),vr.DEBUG=vr.DEBUG||this.config.debug,vr.DEBUG&&z.info(`Starting in debug mode`,{this:this,config:t,thisC:R({},this.config),p:u,s:d}),this.config.identity_distinct_id&&!((i=t.bootstrap)!=null&&i.distinctID)&&(t.bootstrap=R(R({},t.bootstrap),{},{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0}));let p=t.bootstrap?.distinctID;if(this.yu=!!p&&!N(p),t.bootstrap?.distinctID){let e=t.bootstrap.distinctID,n=this.get_distinct_id(),r=this.persistence.get_property(Oi);if(t.bootstrap.isIdentifiedID&&n!=null&&n!==e&&r===`anonymous`)this.identify(e);else if(t.bootstrap.isIdentifiedID&&n!=null&&n!==e&&r===`identified`)z.warn(`Bootstrap distinctID differs from an already-identified user. The existing identity is preserved. Call reset() before reinitializing if you intend to switch users.`);else{let n=this.config.get_device_id(xa()),r=t.bootstrap.isIdentifiedID?n:e;this.persistence.set_property(Oi,t.bootstrap.isIdentifiedID?Xi:Yi),this.register({distinct_id:e,$device_id:r})}}if(f)this.register_once({distinct_id:Fi,$device_id:null},``);else if(!this.get_distinct_id()){let e=this.config.get_device_id(xa());this.register_once({distinct_id:e,$device_id:e},``),this.persistence.set_property(Oi,Yi)}return pa(n,`onpagehide`in self?`pagehide`:`unload`,this._handle_unload.bind(this),{passive:!1}),pa(n,`pageshow`,()=>{var e;this.ku=!1,this.Su||(e=this.Lu)==null||e.resume()}),t.segment?Fo(this,()=>this.Bu()):this.Bu(),O(this.config._onCapture)&&this.config._onCapture!==xl&&(z.warn("onCapture is deprecated. Please use `before_send` instead"),this.on(`eventCaptured`,e=>this.config._onCapture(e.event,e))),this.config.ip&&z.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.config.disableDeviceModel||function(){return Yc.apply(this,arguments)}().then(e=>{e&&this.register({[Sr]:e})}).catch(xl),this}Hu(e){let t=e;return M(t.name)&&O(t.setup)}zu(e,t){this.Hu(e)?t.push(()=>{this.Uu().add(e).catch(()=>
1e.dispose?.call(e)).catch(t=>{z.error(`Failed to dispose browser extension "${e.name}"`,t)})}):this.ru.push(e)}qu(){let t=this.config.__extensionClasses?.featureFlags??e.__defaultExtensionClasses?.featureFlags;var n,r,i;t&&(this.featureFlags&&this.featureFlags instanceof t||((n=this.Wu)==null||n.call(this),this.Wu=void 0,this.featureFlags=new t(this)),O(this.featureFlags.onReloading)&&O(this.featureFlags.setup)?this.Wu||(this.Wu=this.featureFlags.onReloading(()=>{this.uu.emit(`featureFlagsReloading`,!0)}),this.Uu().add(this.featureFlags)):(r=(i=this.featureFlags).initialize)==null||r.call(i))}ju(t){let n=performance.now(),r=R(R({},e.__defaultExtensionClasses),this.config.__extensionClasses),i=[];r.exceptions&&this.ru.push(this.exceptions=this.exceptions??new r.exceptions(this)),r.historyAutocapture&&this.ru.push(this.historyAutocapture=new r.historyAutocapture(this)),r.tracingHeaders&&this.ru.push(this.tracingHeaders=new r.tracingHeaders(this)),r.siteApps&&this.ru.push(this.siteApps=new r.siteApps(this)),r.sessionRecording&&!t&&this.ru.push(this.sessionRecording=new r.sessionRecording(this)),this.config.disable_scroll_properties||i.push(()=>{this.scrollManager.startMeasuringScrollPosition()}),r.autocapture&&this.zu(this.autocapture=new r.autocapture(this),i),r.surveys&&this.zu(this.surveys=this.surveys??new r.surveys(this),i),r.logs&&this.zu(this.logs=this.logs??new r.logs(this),i),r.metrics&&this.ru.push(this.metrics=this.metrics??new r.metrics(this)),r.conversations&&this.ru.push(this.conversations=this.conversations??new r.conversations(this)),r.productTours&&this.ru.push(this.productTours=new r.productTours(this)),r.heatmaps&&this.ru.push(this.heatmaps=new r.heatmaps(this)),r.webVitalsAutocapture&&this.ru.push(this.webVitalsAutocapture=new r.webVitalsAutocapture(this)),r.exceptionObserver&&this.ru.push(this.exceptionObserver=new r.exceptionObserver(this)),r.deadClicksAutocapture&&this.ru.push(this.deadClicksAutocapture=new r.deadClicksAutocapture(this,Mo)),r.toolbar&&this.ru.push(this.toolbar=this.toolbar??new r.toolbar(this)),r.experiments&&this.ru.push(this.experiments=this.experiments??new r.experiments(this)),this.ru.forEach(e=>{e.initialize&&i.push(()=>{var t;(t=e.initialize)==null||t.call(e)})}),i.push(()=>{if(this.Vu){let e=this.Vu;this.Vu=void 0,this.ru.forEach(t=>t.onRemoteConfig?.call(t,e))}}),this.Gu(i,n)}Gu(e,t){for(;e.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-t>=30&&e.length>0)return void setTimeout(()=>{this.Gu(e,t)},0);let n=e.shift();if(n)try{n()}catch(e){z.error(`Error initializing extension:`,e)}}let n=Math.round(performance.now()-t);this.register_for_session({[Li]:this.config.__preview_deferred_init_extensions?`deferred`:`synchronous`,[Ri]:n}),this.config.__preview_deferred_init_extensions&&z.info(`PostHog extensions initialized (${n}ms)`)}Xl(e){var t;if(!a||!a.body)return z.info(`document not ready yet, trying again in 500 milliseconds...`),void setTimeout(()=>{this.Xl(e)},500);if(this.config.__preview_deferred_init_extensions&&(this.Vu=e),this.au=e,this.compression=void 0,e.ok){var n;let t=e.config;t.supportedCompression&&!this.config.disable_compression&&(this.compression=x(t.supportedCompression,Ts.GZipJS)?Ts.GZipJS:x(t.supportedCompression,Ts.Base64)?Ts.Base64:void 0),(n=t.analytics)!=null&&n.endpoint&&(this.analyticsDefaultEndpoint=t.analytics.endpoint)}this.set_config({person_profiles:this.Eu?this.Eu:Zi}),(t=this.Zu)==null||t.handleRemoteConfig(e),this.ru.forEach(t=>t.onRemoteConfig?.call(t,e))}Bu(){try{this.config.loaded(this)}catch(e){z.critical("`loaded` function failed",e)}if(this.Qu(),this.config.internal_or_test_user_hostname&&o?.hostname){let e=o.hostname,t=this.config.internal_or_test_user_hostname;(typeof t==`string`?e===t:t.test(e))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout(()=>{(this.consent.isOptedIn()||this.pu())&&this.Ju()},1),this.Ku=new Ls(this),this.Ku.load()}Qu(){var e;this.is_capturing()&&this.config.request_batching&&((e=this.Ou)==null||e.enable())}_dom_loaded(){this.is_capturing()&&ia(this.__request_queue,e=>this.Du(e)),this.__request_queue=[],this.Qu()}_handle_unload(){var e,t,n,r,i,a;this.ku=!0,(e=this.surveys)==null||(t=e.handlePageUnload)==null||t.call(e),(n=this.metrics)==null||n.flush(`sendBeacon`),this.config.request_batching?(this.Xu()&&this.capture(ta),(r=this.logs)==null||r.flushLogs(`sendBeacon`),(i=this.Ou)==null||i.unload(),(a=this.Lu)==null||a.unload()):this.Xu()&&this.capture(ta,null,{transport:`sendBeacon`})}_send_request(e){Lc(this,e)}Du(e,t){this.Lu?this.Lu.retriableRequest(e,t):this._send_request(t?R(R({},e),{},{transport:t}):e)}_execute_array(e){bl++;try{let t,n=[],r=[],i=[];ia(e,e=>{if(e){if(t=e[0],D(t))i.push(e);else if(O(e))try{e.call(this)}catch(t){z.error(`Error executing queued PostHog call`,e,t)}else D(e)&&t===`alias`?n.push(e):D(e)&&t.indexOf(`capture`)!==-1&&O(this[t])?i.push(e):r.push(e)}});let a=function(e,t){ia(e,function(e){try{if(D(e[0])){let n=t;aa(e,function(e){n=n[e[0]].apply(n,e.slice(1))})}else t[e[0]].apply(t,e.slice(1))}catch(t){z.error(`Error executing queued PostHog call`,e,t)}})};a(n,this),a(r,this),a(i,this)}finally{bl--}}push(t){if(bl>0&&D(t)&&M(t[0])){let n=e.prototype[t[0]];O(n)&&n.apply(this,t.slice(1));return}this._execute_array([t])}get Yu(){return{property:Tr,persistenceKey:Er,cookieName:`_fbc`,pattern:Dl,register:(e,t)=>this.persistence?.register({[Er]:{value:e,delivered:t}}),unregister:()=>this.persistence?.unregister(Er)}}get th(){return{property:Dr,persistenceKey:Or,cookieName:`_fbp`,pattern:Ol,register:(e,t)=>this.persistence?.register({[Or]:{value:e,delivered:t}}),unregister:()=>this.persistence?.unregister(Or)}}eh(e){let t=this.persistence?.get_property(e.persistenceKey);return M(t)&&e.pattern.test(t)?{value:t,delivered:!1}:k(t)&&M(t.value)&&e.pattern.test(t.value)?{value:t.value,delivered:!0===t.delivered}:void 0}ih(e,t,n){return t===n?.value?{value:t,pending:!n.delivered}:(e.register(t,!1),{value:t,pending:!0})}nh(e){if(!this.config.save_campaign_params||this.pu())return;let t=ha(e.cookieName);return M(t)&&e.pattern.test(t)?t:void 0}sh(e,t,n,r){if(!this.persistence)return;let i=this.Yu;this.persistence.refreshKey(i.persistenceKey);let a=this.eh(i);if(r)return void i.unregister();if(n)return M(t)&&Dl.test(t)?this.ih(i,t,a):void i.unregister();let o=M(e)&&El.test(e)?e:void 0,s=this.nh(i);return s&&((e,t,n)=>{let r=e.split(`.`);if(t)return r[3]===t;if(!n)return!0;let i=n.value.split(`.`);return r[3]===i[3]||Number(r[2])>Number(i[2])})(s,o,a)?this.ih(i,s,a):o?a?.value.split(`.`)[3]===o?{value:a.value,pending:!a.delivered}:this.ih(i,`fb.1.${Date.now()}.${o}`,a):a?{value:a.value,pending:!a.delivered}:void 0}rh(e,t,n){if(!this.persistence)return;let r=this.th;this.persistence.refreshKey(r.persistenceKey);let i=this.eh(r);if(n)return void r.unregister();if(t)return M(e)&&Ol.test(e)?this.ih(r,e,i):void r.unregister();let a=this.nh(r);return a?this.ih(r,a,i):i?{value:i.value,pending:!i.delivered}:void 0}oh(e,t){if(!this.persistence)return;this.persistence.refreshKey(e.persistenceKey);let n=this.eh(e);n?.value!==t||n.delivered||e.register(t,!0)}capture(e,t,n){if(!(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Ou))return void z.uninitializedWarning(`posthog.capture`);if(!this.is_capturing())return;if(j(e)||!M(e))return void z.error(`No event name provided to posthog.capture`);this.bu();let r=!this.config.opt_out_useragent_filter&&this._is_bot();if(r&&!this.config.__preview_capture_bot_pageviews)return;let i=n?.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(i?.isRateLimited)return void z.critical(`This capture call is ignored due to client rate limiting.`);let a;t!=null&&t.$current_url&&!M(t?.$current_url)&&(z.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),t==null||delete t.$current_url),e!==`$exception`||n!=null&&n.ah||z.warn("Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&(a=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();let o=new Date,s=n?.timestamp||o,c=Ot(n?.uuid,xa),l={uuid:c,event:e,properties:this.calculateEventProperties(e,t||{},s,c)};e===`$pageview`&&this.config.__preview_capture_bot_pageviews&&r&&(l.event=`$bot_pageview`,l.properties.$browser_type=`bot`),i&&(l.properties.$lib_rate_limit_remaining_tokens=i.remainingTokens);let u=e===`$feature_flag_called`&&!1===l.properties.$feature_flag_has_experiment&&!0===this.get_property(`$minimal_flag_called_events`);n!=null&&n.$set&&!u&&(l.$set=n?.$set);let d=k(t?.$set)?t.$set:void 0,f=D(t?.$unset)?t.$unset:[],p=n?.$unset||[],m=e=>{var t;let r=!!n?.$set&&e in n.$set;return{hasProvided:r||!!d&&e in d,provided:r?n==null||(t=n.$set)==null?void 0:t[e]:d?.[e],unset:f.indexOf(e)!==-1||p.indexOf(e)!==-1}},h=m(Tr),g=m(Dr),_=[{channel:this.Yu,hasProvided:h.hasProvided,update:this.sh(a?.fbclid,h.provided,h.hasProvided,h.unset)},{channel:this.th,hasProvided:g.hasProvided,update:this.rh(g.provided,g.hasProvided,g.unset)}];for(let{channel:e,hasProvided:t,update:n}of _)n&&!0===l.properties.$process_person_profile&&n.pending&&!t&&!u&&(l.$set=R({[e.property]:n.value},l.$set));let v=n?.$unset;v&&(l.$unset=v);let y=u?void 0:this.uh(n?.$set_once,e!==ra,e===na);if(y&&(l.$set_once=y),n!=null&&n._noTruncate||(b=this.config.properties_string_max_length,l=function(e,t){let n=new Set;return function e(r,i){if(r!==Object(r))return t?t(r):r;if(n.has(r))return;let a;if(n.add(r),D(r))a=[],ia(r,t=>{a.push(e(t))});else{let t={};aa(L(r)?ua(r):r,(r,i)=>{n.has(r)||(t[i]=e(r,i))}),a=t}return a}(e)}(l,e=>M(e)?e.slice(0,b):e)),l.timestamp=s,j(n?.timestamp)||(l.properties.$event_time_override_provided=!0,l.properties.$event_time_override_system_time=o),u&&(l.properties=((e,t=[])=>{let n={},r=t=>{e[t]!==void 0&&(n[t]=e[t])};return jn.forEach(r),t.forEach(r),n})(l.properties,kl)),e===Os.DISMISSED||e===Os.SENT){let n=t?.[ks.SURVEY_ID],r=t?.[ks.SURVEY_ITERATION];ll({id:n,current_iteration:r}),l.$set=R(R({},l.$set),{},{[Xc({id:n,current_iteration:r},e===Os.SENT?`responded`:`dismissed`)]:!0})}else e===Os.SHOWN&&(l.$set=R(R({},l.$set),{},{[ks.SURVEY_LAST_SEEN_DATE]:new Date().toISOString()}));var b;if(e===Ms.SHOWN){let e=t?.[Ns.TOUR_TYPE];e&&(l.$set=R(R({},l.$set),{},{[`${Ns.TOUR_LAST_SEEN_DATE}/${e}`]:new Date().toISOString()}))}let x=R(R({},l.properties.$set),l.$set);if(A(x)||this.setPersonPropertiesForFlags(x),!F(this.config.before_send)){let e=this.Os(l);if(!e)return;l=e,l.uuid=Ot(l.uuid,xa)}let S=_.filter(({channel:e,update:t})=>{let n=l.$set?.[e.property]??(k(l.properties?.$set)?l.properties.$set[e.property]:void 0);return t?.pending&&n===t.value});this.uu.emit(`eventCaptured`,l);let C=n?._url??this.requestRouter.endpointFor(`api`,this.analyticsDefaultEndpoint),w=n?._batchKey===`recordings`||/\/s\/(?:\?|$)/.test(C),T=R(R(R({method:`POST`,url:C,data:l,compression:`best-available`,timestampMode:w?`body`:`capture-body`,batchKey:n?._batchKey},w&&l.properties?.$session_id?{batchGroup:l.properties.$session_id+(l.properties.$window_id?`-${l.properties.$window_id}`:``)}
1:{}),n?.transport?{transport:n.transport}:{}),S.length?{fireCallbackOnDrop:!0,callback:e=>{if(e.statusCode>=200&&300>e.statusCode)for(let{channel:e,update:t}of S)this.oh(e,t.value)}}:{});if(!this.config.request_batching||n&&!n?._batchKey||n?.send_instantly||S.length){let e;!T.transport&&!T.callback&&A(this.config.request_headers??{})&&this.ku&&(e=`sendBeacon`),this.Du(T,e)}else this.Ou.enqueue(T);return l}_addCaptureHook(e){return this.on(`eventCaptured`,t=>e(t.event,t))}getExtension(e){return this.Zu?.getExtension(e)}Uu(){return this.Zu??=new vl(this)}cu(e){this.Iu.push(e);let t=!0;return()=>{if(!t)return;t=!1;let n=this.Iu.indexOf(e);n!==-1&&this.Iu.splice(n,1)}}hh(e=!0){var t,n;return!!this.persistence?.consumeCookieIdentityChange()&&(this.Pu=null,this.persistence.get_property(`$user_state`)===`anonymous`&&((n=this.sessionPersistence)==null||n.clear(),this.Cu.clear(),this.dh()),(t=this.featureFlags)==null||t.reset(),e&&this.reloadFeatureFlags(),!0)}calculateEventProperties(e,t,r,i,s){if(r||=new Date,!this.persistence||!this.sessionPersistence)return t;this.persistence.syncCookieProperties(),this.hh();let c=s?void 0:this.persistence.remove_event_timer(e),l=R({},t);if(l.token=this.config.token,l.$config_defaults=this.config.defaults,this.pu()&&(l[Ii]=!0),e===`$snapshot`){let e=R(R({},this.persistence.properties()),this.sessionPersistence.properties());return l.distinct_id=e.distinct_id,(!M(l.distinct_id)&&!I(l.distinct_id)||N(l.distinct_id))&&z.error(`Invalid distinct_id for replay event. This indicates a bug in your implementation`),l}let u=function(e,t,r,i=!1){var a,s,c;if(!d)return{};let l=e?[...Zo,...t||[]]:[],[u,f]=gt(d),[p,m]=function(e){for(let t=0;bt.length>t;t++){let[n,r,i]=bt[t],a=e.match(n);if(a)return[r,(i&&e.match(i)||a)?.[1]||``]}return[``,``]}(d),h=function(){return(`u`>typeof navigator?navigator:void 0)?.brave?{brave:!0}:{}}(),_={};j(r)||(_.detectGoogleSearchApp=r);let v={},y=(a=navigator)==null||(a=a.userAgentData)==null?void 0:a.platform,b=navigator?.maxTouchPoints,x=n==null||(s=n.screen)==null?void 0:s.width,S=n==null||(c=n.screen)==null?void 0:c.height,C=n?.devicePixelRatio;j(y)||(v.userAgentDataPlatform=y),j(b)||(v.maxTouchPoints=b),j(x)||(v.screenWidth=x),j(S)||(v.screenHeight=S),j(C)||(v.devicePixelRatio=C);let w=oa(la({$os:u,$os_version:f,$browser:ft(d,navigator.vendor,h,_),$webview_app:p,$webview_app_version:m,$device:_t(d),$device_type:vt(d,v),$timezone:us(),$timezone_offset:ds()}),{$current_url:qo(i?At(o?.href):o?.href,l,$o),$host:o?.host,$pathname:o?.pathname,$raw_user_agent:d.length>1e3?d.substring(0,997)+`...`:d,$browser_version:mt(d,navigator.vendor,h,_),$browser_language:is(),$browser_language_prefix:as(),$screen_height:n?.screen.height,$screen_width:n?.screen.width,$viewport_height:n?.innerHeight,$viewport_width:n?.innerWidth,$lib:g.LIB_NAME,$lib_version:g.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3});return g.SDK_DIST_CHANNEL&&(w.$sdk_dist_channel=g.SDK_DIST_CHANNEL),w}(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties,this.config.detect_google_search_app,this.config.disable_capture_url_hashes);if(this.sessionManager){let{sessionId:e,windowId:t}=this.sessionManager.checkAndGetSessionAndWindowId(s,r.getTime(),!0);l.$session_id=e,l.$window_id=t}this.sessionPropsManager&&oa(l,this.sessionPropsManager.getSessionProps());try{this.sessionRecording&&oa(l,this.sessionRecording.sdkDebugProperties),l.$sdk_debug_retry_queue_size=this.Lu?.length}catch(e){l.$sdk_debug_error_capturing_properties=String(e)}let f;if(this.requestRouter.region===rl&&(l.$lib_custom_api_host=this.config.api_host),f=e!==`$pageview`||s?e!==`$pageleave`||s?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(r):this.pageViewManager.doPageView(r,i),l=oa(l,f),e===`$pageview`&&a&&(l.title=a.title),!j(c)){let e=r.getTime()-c;l.$duration=parseFloat((e/1e3).toFixed(3))}d&&this.config.opt_out_useragent_filter&&(l.$browser_type=this._is_bot()?`bot`:`browser`);let p=this.persistence.properties(),m=this.sessionPersistence.properties(),h=l.$groups,_=p.$groups;k(h)&&!A(h)&&(l.$groups=R(R({},k(_)?_:{}),h)),aa([`$referrer`,`$referring_domain`],e=>{e in p&&delete m[e]});let v={};if(this.Iu.length>0)for(let e of this.Iu.slice())try{oa(v,e())}catch(e){z.error(`Failed to produce browser extension event properties`,e)}l=oa({},u,p,m,R(R({},v),l)),l.$is_identified=this._isIdentified(),D(this.config.property_denylist)?aa(this.config.property_denylist,function(e){delete l[e]}):z.error(Tl+this.config.property_denylist+` or property_blacklist config: `+this.config.property_blacklist);let y=this.config.sanitize_properties;y&&(z.error(wl),l=y(l,e));let b=this.fh();return l.$process_person_profile=b,b&&!s&&this.ph(`_calculate_event_properties`),l}uh(e,t=!0,n=!1){if(!this.persistence||!this.fh()||this.xu&&!n)return e;let r=this.persistence.get_initial_props(),i=this.sessionPropsManager?.getSetOnceProps(),a=oa({},r,i||{},e||{}),o=this.config.sanitize_properties;return o&&(z.error(wl),a=o(a,`$set_once`)),t&&(this.xu=!0),A(a)?void 0:a}register(e,t){var n;(n=this.persistence)==null||n.register(e,t)}register_once(e,t,n){var r;(r=this.persistence)==null||r.register_once(e,t,n)}register_for_session(e){var t,n;(t=this.persistence)==null||t.syncCookieProperties(),this.hh(),(n=this.sessionPersistence)==null||n.register(e),Object.keys(e).forEach(e
1=>this.Cu.add(e)),this.dh()}unregister(e){var t;(t=this.persistence)==null||t.unregister(e)}unregister_for_session(e){var t;(t=this.sessionPersistence)==null||t.unregister(e),this.Cu.delete(e),this.dh()}gh(e,t){this.register({[e]:t})}Nu(){this.Cu.forEach(e=>{var t;(t=this.sessionPersistence)==null||t.unregister(e)}),this.Cu.clear(),this.dh()}dh(){if(!this.$u)return;if(this.config.persistence===`memory`||this.sessionPersistence?.mi||!Ha.Et())return void Ha.Lt(this.$u);let e=[];this.Cu.forEach(t=>e.push(t)),e.length>0?Ha.At(this.$u,e):Ha.Lt(this.$u)}getFeatureFlag(e,t){return this.featureFlags?.getFeatureFlag(e,t)}getFeatureFlagPayload(e){return this.featureFlags?.getFeatureFlagPayload(e)}getFeatureFlagResult(e,t){return this.featureFlags?.getFeatureFlagResult(e,t)}getAllFeatureFlags(){return this.featureFlags?.getAllFeatureFlags()??[]}isFeatureEnabled(e,t){return this.featureFlags?.isFeatureEnabled(e,t)??t?.defaultValue}reloadFeatureFlags(){var e;(e=this.featureFlags)==null||e.reloadFeatureFlags()}updateFlags(e,t,n){var r;(r=this.featureFlags)==null||r.updateFlags(e,t,n)}updateEarlyAccessFeatureEnrollment(e,t,n){var r;(r=this.featureFlags)==null||r.updateEarlyAccessFeatureEnrollment(e,t,n)}getEarlyAccessFeatures(e,t=!1,n){return this.featureFlags?.getEarlyAccessFeatures(e,t,n)}on(e,t){return this.uu.on(e,t)}onFeatureFlags(e){return this.featureFlags?this.featureFlags.onFeatureFlags(e):(e([],{},{errorsLoading:!0}),()=>{})}onSurveysLoaded(e){return this.surveys?this.surveys.onSurveysLoaded(e):(e([],{isLoaded:!1,error:Cl}),()=>{})}onSessionId(e){return this.sessionManager?.onSessionId(e)??(()=>{})}getSurveys(e,t=!1){this.surveys?this.surveys.getSurveys(e,t):e([],{isLoaded:!1,error:Cl})}getActiveMatchingSurveys(e,t=!1){this.surveys?this.surveys.getActiveMatchingSurveys(e,t):e([],{isLoaded:!1,error:Cl})}renderSurvey(e,t){var n;(n=this.surveys)==null||n.renderSurvey(e,t)}displaySurvey(e,t=dl){var n;(n=this.surveys)==null||n.displaySurvey(e,t)}cancelPendingSurvey(e){var t;(t=this.surveys)==null||t.cancelPendingSurvey(e)}canRenderSurvey(e){return this.surveys?.canRenderSurvey(e)??{visible:!1,disabledReason:Cl}}canRenderSurveyAsync(e,t=!1){return this.surveys?.canRenderSurveyAsync(e,t)??Promise.resolve({visible:!1,disabledReason:Cl})}mh(e){return!e||N(e)?(z.critical(`Unique user id has not been set in posthog.identify`),!1):e===`$posthog_cookieless`?(z.critical(`The string "${e}" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.`),!1):![`distinct_id`,`distinctid`].includes(e.toLowerCase())&&![`undefined`,`null`].includes(e.toLowerCase())||(z.critical(`The string "${e}" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.`),!1)}identify(e,t,n){if(!this.__loaded||!this.persistence)return z.uninitializedWarning(`posthog.identify`);if(I(e)&&(e=e.toString(),z.warn(`The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.`)),!this.mh(e)||!this.ph(`posthog.identify`))return;this.bu();let r=this.get_distinct_id(),i=this.persistence.syncCookieProperties()&&this.get_distinct_id()!==r,a=this.hh(!1),o=this.persistence.Rl(),s=!1;try{let r=this.get_distinct_id();this.register({$user_id:e}),this.get_property(`$device_id`)||this.register_once({$had_persisted_distinct_id:!0,$device_id:r},``),e!==r&&e!==this.get_property(`__alias`)&&(this.unregister(Cr),this.register({distinct_id:e}));let o=(this.persistence.get_property(`$user_state`)||`anonymous`)===Yi,l=e!==r,u=!l&&o;if(l&&o){var c;let i=this.config.reuseAnonymousId?{distinct_id:e}:{distinct_id:e,$anon_distinct_id:r};this.persistence.set_property(Oi,Xi),this.setPersonPropertiesForFlags({$set:t||{},$set_once:n||{}},!1),this.config.cookieWinsOnConflict&&this.persistence.Al(),this.capture(`$identify`,i,{$set:t||{},$set_once:n||{}})&&(this.Pu=nl(e,t,n)),(c=this.featureFlags)==null||c.setAnonymousDistinctId(this.config.reuseAnonymousId?void 0:r)}else if(u){this.persistence.set_property(Oi,Xi);let r=t||{},i=n||{};this.setPersonPropertiesForFlags({$set:r,$set_once:i},!1),this.config.cookieWinsOnConflict&&this.persistence.Al(),this.capture(`$set`,{$set:r,$set_once:i})&&(this.Pu=nl(e,t,n))}else(t||n)&&this.setPersonProperties(t,n);l||i||a?(this.reloadFeatureFlags(),this.featureFlags?this.featureFlags.resetFlagCallReported():this.unregister(wi)):u&&(t||n)&&this.reloadFeatureFlags(),s=!0}finally{o&&this.persistence.Dl(s)}}setPersonProperties(e,t){if(!e&&!t||!this.ph(`posthog.setPersonProperties`))return;let n=nl(this.get_distinct_id(),e,t);this.Pu===n?z.info(`A duplicate setPersonProperties call was made with the same properties. It has been ignored.`):(this.setPersonPropertiesForFlags({$set:e||{},$set_once:t||{}},!0),this.capture(`$set`,{$set:e||{},$set_once:t||{}})&&(this.Pu=n))}unsetPersonProperties(e){var t;let n=(D(e)?e:[e]).filter(e=>M(e)&&e.length>0);n.length!==0&&this.ph(`posthog.unsetPersonProperties`)&&((t=this.featureFlags)==null||t.unsetPersonPropertiesForFlags(n,!0),this.capture(`$set`,{$unset:n}),this.Pu=null)}group(e,t,n){var r;if(!e||!t)return void z.error(`posthog.group requires a group type and group key`);(r=this.persistence)==null||r.syncCookieProperties(),this.hh();let i=this.getGroups(),a=i[e]!==t;if(a&&this.resetGroupPropertiesForFlags(e),this.register({$groups:R(R({},i),{},{[e]:t})}),(a||n)&&this.fh()){let r={$group_type:e,$group_key:t};n&&(r.$group_set=n),this.capture(ra,r)}n&&this.setGroupPropertiesForFlags({[e]:n}),a&&!n&&this.reloadFeatureFlags()}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,t=!0){var n;(n=this.featureFlags)==null||n.setPersonPropertiesForFlags(e,t)}resetPersonPropertiesForFlags(e=!0){var t;(t=this.featureFlags)==null||t.resetPersonPropertiesForFlags(e)}setGroupPropertiesForFlags(e,t=!0){var n;this.ph(`posthog.setGroupPropertiesForFlags`)&&((n=this.featureFlags)==null||n.setGroupPropertiesForFlags(e,t))}resetGroupPropertiesForFlags(e){var t;(t=this.featureFlags)==null||t.resetGroupPropertiesForFlags(e)}reset(e){let t=ne(e)?e:e?.resetDeviceID,n=ne(e)||e==null?void 0:e.bootstrap;this.yh(t,!1,n)}yh(e,t=!1,n){var r,i,a,o,s;if(z.info(`reset`),!this.__loaded)return z.uninitializedWarning(`posthog.reset`);let c=n?.sessionID;this.config.bootstrap=n||this.Au?.bootstrap||{},(r=this.featureFlags)==null||(i=r.updateConfig)==null||i.call(r,this.config,this.Yl());let l=this.get_property(xr),u=this.get_property(Sr),d=this.get_property(Br);(a=this.sessionRecording)==null||a.flushBeforeIdentityReset();let f=this.is_capturing();this.consent.reset(),t||!f||this.is_capturing()||console.warn(`[PostHog.js]`,"reset() cleared the stored consent, and capturing is now off because of `opt_out_capturing_by_default`. Call opt_in_capturing() again, and prefer calling reset() before opting in rather than after.");let p=(o=this.persistence)==null||(s=o.Rl)==null?void 0:s.call(o),m=!1;try{var h,g,_,v,y,b,x,S,C,w,T,E;if((h=this.persistence)==null||h.clear(),(g=this.sessionPersistence)==null||g.clear(),this.Cu.clear(),this.dh(),j(d)||(w=this.persistence)==null||w.register({$session_recording_remote_config:d}),(_=this.surveys)==null||_.reset(),(v=this.featureFlags)==null||v.reset(),(y=this.conversations)==null||y.reset(),(b=this.logs)==null||b.reset(),(x=this.metrics)==null||x.reset(),(S=this.persistence)==null||S.set_property(`$user_state`,`anonymous`),(C=this.sessionManager)==null||C.resetSessionId(),this.Pu=null,this.config.cookieless_mode===`always`)this.register_once({distinct_id:Fi,$device_id:null},``);else{let t=this.config.get_device_id(xa());this.register_once({distinct_id:t,$device_id:e?t:l},``),e||j(u)||this.register({[Sr]:u})}if(this.register({$last_posthog_reset:new Date().toISOString()},1),n&&(n.distinctID&&!this.pu()&&((E=this.persistence)==null||E.set_property(`$user_state`,n.isIdentifiedID?`identified`:`anonymous`),this.register({distinct_id:n.distinctID})),(T=this.featureFlags)==null||T.initialize(),!F(c)&&!this.sessionManager?.setBootstrapSessionId(c,!0))){let e=R({},n);delete e.sessionID,this.config.bootstrap=e}delete this.config.identity_distinct_id,delete this.config.identity_hash,delete this.config.identity_claims,m=!0}finally{var ee,D;p&&((ee=this.persistence)==null||(D=ee.Dl)==null||D.call(ee,m))}this.reloadFeatureFlags()}shutdown(e){var t=this;return pe(function*(){var e,n,r,i,a,o,s,c;if(t.__loaded){t.Su=!0,t.Uu().dispose(),(e=t.sessionRecording)==null||e.dispose(),(n=t.logs)==null||n.flushLogs(`sendBeacon`),(r=t.metrics)==null||r.flush(`sendBeacon`),(i=t.metrics)==null||i.dispose(),(a=t.Ou)==null||a.unload(),(o=t.Lu)==null||o.unload();try{var l;(l=t.featureFlags)==null||l.destroy()}catch(e){z.error(`Error while destroying feature flags`,e)}(s=t.persistence)==null||s.destroy(),(c=t.sessionPersistence)==null||c.destroy()}else z.uninitializedWarning(`posthog.shutdown`)})()}setIdentity(e,t){var n;delete this.config.identity_claims,this.config.identity_distinct_id=e,this.config.identity_hash=t,this.alias(e),(n=this.conversations)==null||n.bh()}clearIdentity(){var e;delete this.config.identity_distinct_id,delete this.config.identity_hash,delete this.config.identity_claims,(e=this.conversations)==null||e._h()}get_distinct_id(){return this.get_property(`distinct_id`)}getGroups(){return this.get_property(`$groups`)||{}}get_session_id(){return this.sessionManager?.checkAndGetSessionAndWindowId(!0).sessionId??``}get_session_replay_url(e){if(!this.sessionManager)return``;let{sessionId:t,sessionStartTimestamp:n}=this.sessionManager.checkAndGetSessionAndWindowId(!0),r=this.requestRouter.endpointFor(`ui`,`/project/${this.config.token}/replay/${t}`);if(e?.withTimestamp&&n){let t=e.timestampLookBack??10;if(!n)return r;r+=`?t=${Math.max(Math.floor((new Date().getTime()-n)/1e3)-t,0)}`}return r}alias(e,t){return e===this.get_property(`$people_distinct_id`)?(z.critical(`Attempting to create alias for existing People user - aborting.`),-2):this.ph(`posthog.alias`)?(j(t)&&(t=this.get_distinct_id()),e===t?(z.warn(`alias matches current distinct_id - skipping api call.`),this.identify(e),-1):(this.gh(Cr,e),this.capture(`$create_alias`,{alias:e,distinct_id:t}))):void 0}set_config(e){let t=R({},this.config);if(k(e)){var n,r,i,a,o,s,c,l,u,d,f,p,m,h;oa(this.config,Pl(e));let _=this._u();(n=this.persistence)==null||n.update_config(this.config,t,_),this.sessionPersistence=this.config.persistence===`
1sessionStorage`||this.config.persistence===`memory`?this.persistence:new ws(R(R({},this.config),{},{persistence:`sessionStorage`}),_,!1);let v=this.Ru(this.config.debug);var g;ne(v)&&(this.config.debug=v),ne(this.config.debug)&&(this.config.debug?(vr.DEBUG=!0,Oa.Et()&&Oa.At(`ph_debug`,!0),z.info(`set_config`,{config:e,oldConfig:t,newConfig:R({},this.config)})):(vr.DEBUG=!1,Oa.Et()&&Oa.Lt(`ph_debug`))),(r=this.featureFlags)==null||(i=r.updateConfig)==null||i.call(r,this.config,this.Yl()),(a=this.exceptionObserver)==null||a.onConfigChange(),(o=this.exceptions)==null||o.onConfigChange(),(s=this.metrics)==null||s.onConfigChange(),(c=this.sessionRecording)==null||c.startIfEnabledOrStop(),(l=this.tracingHeaders)==null||l.startIfEnabledOrStop(),(u=this.autocapture)==null||u.startIfEnabled(),(d=this.heatmaps)==null||d.startIfEnabled(),(`capture_pageview`in e||`disable_capture_url_hashes`in e)&&((g=this.historyAutocapture)==null||g.startIfEnabledOrStop()),(f=this.exceptionObserver)==null||f.startIfEnabledOrStop(),(p=this.deadClicksAutocapture)==null||p.startIfEnabledOrStop(),(m=this.surveys)==null||m.loadIfEnabled(),this.wu(),(h=this.externalIntegrations)==null||h.startIfEnabledOrStop(),!t.segment&&this.config.segment&&this.persistence&&Fo(this,xl,!1)}}_overrideSDKInfo(e,t){vr.LIB_NAME=e,vr.LIB_VERSION=t}startSessionRecording(e){let t=!0===e,n={sampling:t||!!e?.sampling,linked_flag:t||!!e?.linked_flag,url_trigger:t||!!e?.url_trigger,event_trigger:t||!!e?.event_trigger};var r,i,a,o,s;Object.values(n).some(Boolean)&&((r=this.sessionManager)==null||r.checkAndGetSessionAndWindowId(),n.sampling&&((i=this.sessionRecording)==null||i.overrideSampling()),n.linked_flag&&((a=this.sessionRecording)==null||a.overrideLinkedFlag()),n.url_trigger&&((o=this.sessionRecording)==null||o.overrideTrigger(`url`)),n.event_trigger&&((s=this.sessionRecording)==null||s.overrideTrigger(`event`))),this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){return!!this.sessionRecording?.started}captureException(e,t){try{if(!this.exceptions)return;let n=this.exceptions.buildProperties(e,{handled:!0,syntheticException:Error(`PostHog syntheticException`)});return this.exceptions.sendExceptionEvent(R(R({},n),t))}catch{return}}addExceptionStep(e,t){var n;(n=this.exceptions)==null||n.addExceptionStep(e,t)}captureLog(e){var t;(t=this.logs)==null||t.captureLog(e)}get logger(){return this.logs?.logger??e.wh}startExceptionAutocapture(e){this.set_config({capture_exceptions:e==null||e})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(e){var t;return(t=this.toolbar?.loadToolbar(e))!=null&&t}get_property(e){return this.persistence?.props[e]}getSessionProperty(e){return this.sessionPersistence?.props[e]}toString(){let e=this.config.name??Al;return e!==Al&&(e=`posthog.`+e),e}_isIdentified(){return this.persistence?.get_property(`$user_state`)===`identified`||this.sessionPersistence?.get_property(`$user_state`)===`identified`}fh(){var e,t;return!(this.config.person_profiles===`never`||this.config.person_profiles===`identified_only`&&!this._isIdentified()&&A(this.getGroups())&&!((e=this.persistence)!=null&&(e=e.props)!=null&&e.__alias)&&!((t=this.persistence)!=null&&(t=t.props)!=null&&t.$epp))}Xu(){return!0===this.config.capture_pageleave||this.config.capture_pageleave===`if_capture_pageview`&&!!this.config.capture_pageview}createPersonProfile(){this.fh()||this.ph(`posthog.createPersonProfile`)&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.ph(`posthog.setInternalOrTestUser`)&&this.setPersonProperties({$internal_or_test_user:!0})}ph(e){return this.config.person_profiles===`never`?(z.error(e+` was called, but process_person is set to "never". This call will be ignored.`),!1):(this.gu(),this.gh(Pi,!0),!0)}_u(){if(this.config.cookieless_mode===`always`)return!0;let e=this.consent.isOptedOut();return this.config.disable_persistence||e&&!(!this.config.opt_out_persistence_by_default&&this.config.cookieless_mode!==`on_reject`)}wu(){let e=this._u();var t,n,r;return this.is_capturing()||(t=this.logs)==null||t.kh(),this.persistence?.mi!==e&&((n=this.persistence)==null||n.set_disabled(e)),this.sessionPersistence?.mi!==e&&((r=this.sessionPersistence)==null||r.set_disabled(e)),e&&(this.Cu.clear(),this.dh()),e}opt_in_capturing(t){var n;if(this.config.cookieless_mode!==`always`){if(this.pu()){var r,i,a;(r=this.sessionRecording)==null||r.dispose({discardBufferedEvents:!0}),this.yh(!0,!0),(i=this.sessionManager)==null||i.destroy(),(a=this.pageViewM
1anager)==null||a.destroy(),this.sessionManager=new qc(this),this.pageViewManager=new zo(this),this.persistence&&(this.sessionPropsManager=new Uc(this,this.sessionManager,this.persistence));let t=this.config.__extensionClasses?.sessionRecording??e.__defaultExtensionClasses?.sessionRecording;var o,s;t&&(this.sessionRecording=this.fu(this.sessionRecording,new t(this)),this.au&&((o=this.sessionRecording)==null||(s=o.onRemoteConfig)==null||s.call(o,this.au)))}var c;this.consent.optInOut(!0),this.wu(),this.Qu(),(n=this.sessionRecording)==null||n.startIfEnabledOrStop(),this.config.cookieless_mode==`on_reject`&&((c=this.surveys)==null||c.loadIfEnabled()),(j(t?.captureEventName)||t!=null&&t.captureEventName)&&this.capture(t?.captureEventName??`$opt_in`,t?.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Ju()}else z.warn(Sl)}opt_out_capturing(){if(this.config.cookieless_mode===`always`)return void z.warn(Sl);let e=this.config.cookieless_mode===`on_reject`?this.sessionRecording:void 0;var t,n;e?.dispose({discardBufferedEvents:!0}),this.config.cookieless_mode===`on_reject`&&this.consent.isOptedIn()&&this.yh(!0,!0),this.consent.optInOut(!1),this.wu(),this.config.cookieless_mode===`on_reject`&&(this.register({distinct_id:Fi,$device_id:null}),this.vu(e),this.sessionRecording=void 0,(t=this.sessionManager)==null||t.destroy(),(n=this.pageViewManager)==null||n.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,this.config.capture_pageview&&this.Ju(),this.Qu())}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){let e=this.consent.consent;return e===1?`granted`:e===0?`denied`:`pending`}is_capturing(){return this.config.cookieless_mode===`always`||(this.config.cookieless_mode===`on_reject`?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.wu()}_is_bot(){return i?Jc(i,this.config.custom_blocked_useragents):void 0}Ju(){a&&(a.visibilityState===`visible`?this.Tu||(this.Tu=!0,this.capture(ea,{title:a.title},{send_instantly:!0}),this.Mu&&=(a.removeEventListener(Qi,this.Mu),null)):this.Mu||(this.Mu=this.Ju.bind(this),pa(a,Qi,this.Mu)))}debug(e){!1===e?(n?.console.log(`You've disabled debug mode.`),this.set_config({debug:!1})):(n?.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}))}Yl(){let e=this.Au||{};return`advanced_disable_flags`in e?!!e.advanced_disable_flags:!1===this.config.advanced_disable_flags?!0===this.config.advanced_disable_decide?(z.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):function(e,t,n,r,i){let a=t in e&&!F(e[t]),o=n in e&&!F(e[n]);return a?e[t]:!!o&&(i&&i.warn(`Config field '${n}' is deprecated. Please use '${t}' instead. The old field will be removed in a future major version.`),e[n])}(e,`advanced_disable_flags`,`advanced_disable_decide`,0,z):!!this.config.advanced_disable_flags}Os(e){if(F(this.config.before_send))return e;let t=Object.keys(e.properties??{}).filter(ie),n=D(this.config.before_send)?this.config.before_send:[this.config.before_send],r=e;for(let t of n)try{if(r=t(r),F(r)){let t=`Event '${e.event}' was rejected in beforeSend function`;return re(e.event)?z.warn(`${t}. This can cause unexpected behavior.`):z.info(t),null}r.properties&&!A(r.properties)||z.warn(`Event '${e.event}' has no properties after beforeSend function, this is likely an error.`)}catch(t){return z.error(`Error in beforeSend function for event '${e.event}':`,t),null}for(let n of t)if(r.properties&&F(r.properties[n]))return z.warn(`Event '${e.event}' had its '${n}' property removed in a beforeSend function. This property is required for ingestion, so the event will be dropped.`),null;return r}getPageViewId(){return this.pageViewManager.Ho?.pageViewId}captureTraceFeedback(e,t){this.capture(`$ai_feedback`,{$ai_trace_id:String(e),$ai_feedback_text:t})}captureTraceMetric(e,t,n){this.capture(`$ai_metric`,{$ai_trace_id:String(e),$ai_metric_name:t,$ai_metric_value:String(n)})}Ru(e){let t=ne(e)&&!e,n=Oa.Et()&&Oa.Ot(`ph_debug`)===`true`;return!t&&(!!n||e)}};Il.__defaultExtensionClasses={},Il.wh=(()=>{let e=()=>{};return{trace:e,debug:e,info:e,warn:e,error:e,fatal:e}})(),function(e,t){for(let n=0;t.length>n;n++)e.prototype[t[n]]=ca(e.prototype[t[n]])}(Il,[`identify`]);var Ll=class{constructor(e){this.disabled=!1===e;let t=k(e)?e:{};this.thresholdPx=t.threshold_px||30,this.timeoutMs=t.timeout_ms||1e3,this.clickCount=t.click_count||3,this.clicks=[]}isRageClick(e,t,n){if(this.disabled)return!1;let r=this.clicks[this.clicks.length-1];if(r&&Math.abs(e-r.x)+Math.abs(t-r.y)<this.thresholdPx&&this.timeoutMs>n-r.timestamp){if(this.clicks.push({x:e,y:t,timestamp:n}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:e,y:t,timestamp:n}];return!1}},Rl=`$copy_autocapture`,zl=fr(`[AutoCapture]`);function Bl(e,t){return t.length>e?t.slice(0,e)+`...`:t}function Vl(e){if(e.previousElementSibling)return e.previousElementSibling;let t=e;do t=t.previousSibling;while(t&&!Ka(t));return t}function Hl(e,{e:t,maskAllElementAttributes:r,maskAllText:i,elementAttributeIgnoreList:a,elementsC
1hainAsString:o,disableCaptureUrlHashes:s}){if(!Ka(e))return{props:{}};let c=[e],l=new Set([e]),u=e;for(;u.parentNode&&!qa(u,`body`)&&1e3>c.length;){if(Ya(u.parentNode)){let e=u.parentNode.host;if(l.has(e))break;l.add(e),c.push(e),u=e;continue}if(!Ka(u.parentNode)||l.has(u.parentNode))break;l.add(u.parentNode),c.push(u.parentNode),u=u.parentNode}let d=t.type===`click`&&e.namespaceURI===`http://www.w3.org/2000/svg`?c.findIndex(e=>qa(e,`button`)||qa(e,`a`)):-1;d>0&&(i||=c.slice(0,d+1).some(e=>!go(e)||_o(e)));let f=[],p={},m,h=!1,g=!1;if(aa(c,e=>{let t=go(e);if(qa(e,`a`)&&!r&&!a?.includes(`href`)){let n=e.getAttribute(`href`);h=!!(t&&n&&To(n))&&(s?At(n):n)}x(Qa(e),`ph-no-capture`)&&(g=!0),f.push(function(e,t,n,r,i=!1){let a=e.tagName.toLowerCase(),o={tag_name:a};no.indexOf(a)>-1&&!n&&(o.$el_text=a.toLowerCase()===`a`||a.toLowerCase()===`button`?Bl(1024,Eo(e)):Bl(1024,eo(e)));let s=Qa(e);t||r!=null&&r.includes(`class`)||0>=s.length||(o.classes=s.filter(function(e){return e!==``})),aa(e.attributes,function(n){var a;if((!_o(e)||[`name`,`id`,`class`,`aria-label`].indexOf(n.name)!==-1)&&!r?.includes(n.name)&&!t&&To(n.value)&&(!M(a=n.name)||a.substring(0,10)!==`_ngcontent`&&a.substring(0,7)!==`_nghost`)){let e=n.value;n.name===`class`&&(e=Xa(e).join(` `)),o[`attr__`+n.name]=Bl(1024,n.name===`href`&&i?At(e):e)}});let c=1,l=1,u=e;for(;u=Vl(u);)c++,u.tagName===e.tagName&&l++;return o.nth_child=c,o.nth_of_type=l,o}(e,r,i,a,s)),aa(function(e){if(!go(e))return{};let t={};return aa(e.attributes,function(e){if(e.name&&e.name.indexOf(`data-ph-capture-attribute`)===0){let n=e.name.replace(`data-ph-capture-attribute-`,``),r=e.value;n&&r&&To(r)&&(t[n]=r)}}),t}(e),(e,t)=>{({}).hasOwnProperty.call(p,t)||(p[t]=e)})}),g)return{props:{},explicitNoCapture:g};if(d>0&&(e=c[d],f.splice(0,d)),i||(f[0].$el_text=qa(e,`a`)||qa(e,`button`)?Eo(e):eo(e)),h){var _;f[0].attr__href=h;let e=Go(h)?.host,t=n==null||(_=n.location)==null?void 0:_.host;e&&t&&e!==t&&(m=h)}return{props:oa((y=t.type,{$event_type:y,$ce_version:1}),o?{}:{$elements:f},{$elements_chain:(v=f,D(v)?function(e){return e.map(e=>{let t=``;if(e.tag_name&&(t+=e.tag_name),e.attr_class){e.attr_class.sort();for(let n of e.attr_class)t+=`.${n.replace(/"/g,``)}`}let n=R(R(R(R({},e.text?{text:e.text}:{}),{},{"nth-child":e.nth_child??0,"nth-of-type":e.nth_of_type??0},e.href?{href:e.href}:{}),e.attr_id?{attr_id:e.attr_id}:{}),e.attributes),r={};return sa(n).sort(([e],[t])=>function(e,t){return t>e?-1:+(e>t)}(e,t)).forEach(([e,t])=>r[Oo(e.toString())]=Oo(t.toString())),t+=`:`,t+=sa(r).map(([e,t])=>`${e}="${t}"`).join(``),t}).join(`;`)}(function(e){return e.map(e=>{let t={text:e.$el_text?.slice(0,400),tag_name:e.tag_name,href:e.attr__href?.slice(0,2048),attr_class:ko(e),attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return sa(e).filter(([e])=>e.indexOf(`attr__`)===0).forEach(([e,n])=>t.attributes[e]=n),t})}(v)):``)},f[0]?.$el_text?{$el_text:f[0]?.$el_text}:{},m&&t.type===`click`?{$external_click_url:m}:{},p),target:e};var v,y}var Ul=class{ho(){this.co=void 0,clearTimeout(this.do),this.do=void 0}vo(e){if(!go(e))return!0;let t=this.fo().css_selector_ignorelist??oo,n=new Set,r=e;for(;r;){if(n.size>=1e3||n.has(r))return!0;n.add(r);let e=r,i=Qa(e);if(x(i,`ph-no-capture`)||x(i,`ph-sensitive`)||_o(e)||t.some(t=>ro(e,t)))return!0;let a=r.parentNode;r=Ya(a)?a.host:a&&Ka(a)?a:null}return!1}po(e){if(!this.isEnabled||e.type===`pointercancel`)return void this.ho();if(e.type===`pointerdown`){this.ho();let t=to(e);e.isPrimary&&e.button===0&&!e.ctrlKey&&t&&Ka(t)&&(this.co={target:t,excluded:this.vo(t),id:e.pointerId,x:e.clientX,y:e.clientY,released:!1,distinctId:this.mo?.distinctId});return}let t=this.co;t&&(e.pointerId!==t.id||Math.abs(e.clientX-t.x)>5||Math.abs(e.clientY-t.y)>5?this.ho():e.type===`pointerup`&&(t.released=!0,this.do=setTimeout(()=>this.ho(),0)))}yo(e){let t=this.co;this.ho();let n=to(e);if(t?.released&&t.target.isConnected&&t.distinctId===this.mo?.distinctId&&e.pointerId===t.id&&(e.detail>0||e.pointerType===`touch`||e.pointerType===`pen`)&&e.button===0&&5>=Math.abs(e.clientX-t.x)&&5>=Math.abs(e.clientY-t.y)&&n&&(qa(n,`html`)||qa(n,`body`))){if(t.excluded)return null;let e=this.fo().css_selector_ignorelist??oo;return[n,a?.documentElement,a?.body].some(t=>{if(!t)return!1;let n=Qa(t);return x(n,`ph-no-capture`)||x(n,`ph-sensitive`)||!go(t)||_o(t)||e.some(e=>ro(t,e))})?null:t.target}}constructor(e){this.bo=e,this.name=`autocapture`,this._o=!1,this.wo=null,this.ko=!1,this.So=!1,this.Ir={enabled:!1,rageclick:!1,maskAllElementAttributes:!1,maskAllText:!1,disableCaptureUrlHashes:!1,remoteRequestsDisabled:!1},this.xo=!1,this.bo.refresh(this.Ir),this.rageclicks=new Ll(this.Ir.rageclick),this.Co=null}setup(e){this.$o(),this.mo=e;let t=e.onRemoteConfig(this.onRemoteConfig.bind(this));this.xo?t.dispose():(this.Io=t,this.startIfEnabled())}dispose(){var e;this.xo||(this.xo=!0,this.mo=void 0,(e=this.Io)==null||e.dispose(),this.Io=void 0,this.To())}fo(){return this.bo.refresh(this.Ir),this.Ir}$o(){return this.fo(),this.Ir.url_allowlist=this.Ir.url_allowlist?.map(e=>new RegExp(e)),this.Ir.url_ignorelist=this.Ir.url_ignorelist?.map(e=>new RegExp(e)),this.Ir}Mo(){if(!this.isBrowserSupported())return void zl.info(`Disabling Automatic Event Collection because this browser is not supported`);if(!n||!a)return;let e=this.Eo=e=>{e||=n?.event;try{if(e.type===`blur`)return void this.ho();if(e.type.indexOf(`pointer`)===0)return void this.po(e);let t=e.type===`click`?this.yo(e):void 0;if(P(t))return;this.Po(e,`$autocapture`,t)}catch(e){zl.error(`Failed to capture event`,e)}};if(pa(n,`blur`,e),pa(a,`submit`,e,{capture:!0}),pa(a,`change`,e,{capture:!0}),pa(a,`click`,e,{capture:!0}),aa([`pointerdown`,`pointermove`,`pointerup`,`pointercancel`],t=>{pa(a,t,e,{capture:!0})}),this.fo().capture_copied_text){let e=this.Ro=e=>{e||=n?.event;try{this.Po(e,Rl)}catch(e){zl.error(`Failed to capture clipboard event`,e)}};pa(a,`copy`,e,{capture:!0}),pa(a,`cut`,e,{capture:!0}),pa(a,`paste`,e,{capture:!0})}}To(){this.ho(),this.Eo&&=(n?.removeEventListener(`blur`,this.Eo),aa([`pointerdown`,`pointermove`,`pointerup`,`pointercancel`],e=>{a?.removeEventListener(e,this.Eo,!0)}),a?.removeEventListener(`submit`,this.Eo,!0),a?.removeEventListener(`change`,this.Eo,!0),a?.removeEventListener(`click`,this.Eo,!0),void 0),this.Ro&&=(a?.removeEventListener(`copy`,this.Ro,!0),a?.removeEventListener(`cut`,this.Ro,!0),a?.removeEventListener(`paste`,this.Ro,!0),void 0),this._o=!1}startIfEnabled(){this.isEnabled||this.ho(),!this.xo&&this.mo&&this.isEnabled&&!this._o&&(this.Mo(),this._o=!0)}onRemoteConfig(e){if(this.xo)return;if(this.ko=!0,!e.ok)return void this.startIfEnabled();let t=e.config;
1t.elementsChainAsString&&(this.So=t.elementsChainAsString);let n=t.autocapture_opt_out;var r;ne(n)&&((r=this.mo)==null||r.kv.set(`$autocapture_disabled_server_side`,n),this.wo=n),this.startIfEnabled()}setElementSelectors(e){this.Co=e}getElementSelectors(e,t){var n;let r=[];return(n=this.Co)==null||n.forEach(n=>{(a?.querySelectorAll(n))?.forEach(i=>{e!==i&&t!==i||x(r,n)||r.push(n)})}),r}get isEnabled(){if(this.xo)return!1;let e=this.mo?.kv.get(Ar),t=this.wo,n=this.fo();if(!n.remoteRequestsDisabled&&!this.ko)return!1;let r=n.remoteRequestsDisabled&&!this.ko;if(P(t)&&!ne(e)&&!r)return!1;let i=this.wo??!!e;return!!n.enabled&&!i}Po(e,t=`$autocapture`,r){if(!this.isEnabled)return void this.ho();let i=r||to(e);Ja(i)&&(i=i.parentNode||null);let a=this.$o();var o;t===`$autocapture`&&e.type===`click`&&e instanceof MouseEvent&&a.rageclick&&(o=this.rageclicks)!=null&&o.isRageClick(e.clientX,e.clientY,e.timeStamp||new Date().getTime())&&po(i,a.rageclick)&&this.Po(e,`$rageclick`,r);let s=t===Rl,c=s?R(R({},a),{},{dom_event_allowlist:void 0}):a;if(i&&function(e,t,r,i,a,o){if(!n||mo(e)||r?.url_allowlist&&!Za(r.url_allowlist,o)||r?.url_ignorelist&&Za(r.url_ignorelist,o))return!1;if(r?.dom_event_allowlist){let e=r.dom_event_allowlist;if(e&&!e.some(e=>t.type===e))return!1}let{parentIsUsefulElement:s,targetElementList:c}=ho(e,i);if(!function(e,t){let n=t?.element_allowlist;if(j(n))return!0;for(let t of e)if(n.some(e=>t.tagName.toLowerCase()===e))return!0;return!1}(c,r)||!io(c,r?.css_selector_allowlist)||io(c,r?.css_selector_ignorelist??oo))return!1;try{let r=n.getComputedStyle(e);if(r&&r.getPropertyValue(`cursor`)===`pointer`&&t.type===`click`)return!0}catch{}let l=e.tagName.toLowerCase();switch(l){case`html`:return!1;case`form`:return(a||[`submit`]).indexOf(t.type)>=0;case`input`:case`select`:case`textarea`:return(a||[`change`,`click`]).indexOf(t.type)>=0;default:return s?(a||[`click`]).indexOf(t.type)>=0:(a||[`click`]).indexOf(t.type)>=0&&(no.indexOf(l)>-1||e.getAttribute(`contenteditable`)===`true`)}}(i,e,c,s,s?[`copy`,`cut`,`paste`]:void 0,{config:{get_current_url:a.getCurrentUrl}})){var l;let{props:r,explicitNoCapture:o,target:s}=Hl(i,{e,maskAllElementAttributes:a.maskAllElementAttributes,maskAllText:a.maskAllText,elementAttributeIgnoreList:a.element_attribute_ignorelist,elementsChainAsString:this.So,disableCaptureUrlHashes:a.disableCaptureUrlHashes});if(o)return!1;let c=this.getElementSelectors(i,s);if(c&&c.length>0&&(r.$element_selectors=c),t===Rl){let t=e.type||`clipboard`;if(t!==`paste`){var u;let e=n==null||(u=n.getSelection())==null?void 0:u.toString(),t=$a(e);if(!t)return!1;r.$selected_content=t,r.$clipboard_text_length=e?.length??0}r.$copy_type=t}return(l=this.mo)==null||l.capture(t,r).catch(e=>zl.error(`Failed to capture event`,e)),!0}}isBrowserSupported(){return O(a?.querySelectorAll)}},Wl=class{constructor(e){this._instance=e}refresh(e){let t=this._instance.config,n=k(t.autocapture)?t.autocapture:void 0;e.enabled=!!t.autocapture,e.rageclick=t.rageclick,e.maskAllElementAttributes=t.mask_all_element_attributes,e.maskAllText=t.mask_all_text,e.disableCaptureUrlHashes=t.disable_capture_url_hashes,e.getCurrentUrl=t.get_current_url,e.remoteRequestsDisabled=this._instance.Yl(),e.url_allowlist=n?.url_allowlist,e.url_ignorelist=n?.url_ignorelist,e.dom_event_allowlist=n?.dom_event_allowlist,e.element_allowlist=n?.element_allowlist,e.css_selector_allowlist=n?.css_selector_allowlist,e.css_selector_ignorelist=n?.css_selector_ignorelist,e.element_attribute_ignorelist=n?.element_attribute_ignorelist,e.capture_copied_text=n?.capture_copied_text}},Gl=fr(`[ExceptionAutocapture]`),Kl=()=>{},ql=e=>{if(O(e))return e.__posthog_layer__??e.__rrweb_layer__};function Jl(e,t,n){try{if(!(t in e))return Kl;let r={next:e[t]},i=n(function(...e){return r.next.apply(this,e)});return O(i)&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__posthog_wrapped__:{enumerable:!1,value:!0},__posthog_layer__:{enumerable:!1,value:r}})),e[t]=i,()=>{if(e[t]===i)return void(e[t]=r.next);let n=e[t],a=ql(n);for(;a;){if(a.next===i)return void(a.next=r.next);n=a.next,a=ql(n)}}}catch{return Kl}}var Yl=fr(`[TracingHeaders]`),Xl=fr(`[Web Vitals]`),Zl=9e5,Ql=[`CLS`,`FCP`,`INP`,`LCP`],$l=[`INP`,`LCP`],eu=[`interactionTarget`,`interactionType`,`inputDelay`,`processingDuration`,`presentationDelay`,`loadState`,`target`,`url`,`timeToFirstByte`,`resourceLoadDelay`,`resourceLoadDuration`,`elementRenderDelay`,`largestShiftTarget`,`largestShiftTime`,`largestShiftValue`,`firstByteToFCP`],tu=`disabled`,nu=`lazy_loading`,ru=fr(`[SessionRecording]`),iu=fr(`[Heatmaps]`);function au(e){return k(e)&&`clientX`in e&&`clientY`in e&&I(e.clientX)&&I(e.clientY)}var ou=fr(`[Product Tours]`),su=e=>!e.config.disable_product_tours&&!!e.persistence?.get_property(Lr),cu=[`$set_once`,`$set`],lu=fr(`[SiteApps]`),uu=`Error while initializing PostHog app with config id `,du=(e,t)=>e?.then?e.then(t):t(e),fu=`SDK is not enabled or survey functionality is not yet loaded`,pu
1=`Disabled. Not loading surveys.`,mu=class{constructor(e,t){this.bo=e,this.Sh=t,this.name=`surveys`,this._surveyEventReceiver=null,this._surveyManager=null,this.xh=!1,this.Ch=[],this.$h=null,this.Ih=null,this.xo=!1,this.Th=new Set,this.onRemoteConfig=e=>{if(this.xo||this.Ir.disableSurveys)return;if(!e.ok)return cl.warn(`Remote config unavailable. Not loading surveys.`);let t=e.config.surveys;if(F(t))return cl.warn(`Flags not loaded yet. Not loading surveys.`);this.Mh=ne(t)?t:t.length>0,cl.info(`flags response received, isSurveysEnabled: ${this.Mh}`),this.loadIfEnabled()}}setup(e){if(!this.xo)return this.Eh=e,du(e.kv.initialize(),()=>{if(this.Eh!==e||this.xo)return;this.Eh=void 0,this.mo=e;let t=e.onRemoteConfig(this.onRemoteConfig);this.xo?t.dispose():(this.Io=t,this.loadIfEnabled())})}dispose(){var e,t,n,r;this.xo||(this.xo=!0,this.Eh=void 0,this.mo=void 0,(e=this.Io)==null||e.dispose(),this.Io=void 0,(t=this._surveyEventReceiver)==null||t.dispose(),this._surveyEventReceiver=null,(n=this._surveyManager)==null||(r=n.dispose)==null||r.call(n),this._surveyManager=null,this.Ch=[],this.$h=null,this.Th.forEach(e=>clearTimeout(e)),this.Th.clear())}get Ir(){return this.bo.get()}initialize(){this.loadIfEnabled()}reset(){try{var e;(e=this._surveyEventReceiver)==null||e.reset(),localStorage.removeItem(`lastSeenSurveyDate`);let t=[];for(let e=0;e<localStorage.length;e++){let n=localStorage.key(e);(n!=null&&n.startsWith(`seenSurvey_`)||n!=null&&n.startsWith(`inProgressSurvey_`))&&t.push(n)}t.forEach(e=>localStorage.removeItem(e))}catch{}}loadIfEnabled(){if(this.xo||!this.mo)return;let e=this.Ir;if(this._surveyManager)return;if(this.xh)return void cl.info(`Already initializing surveys, skipping...`);if(e.disableSurveys)return void cl.info(pu);if(e.cookielessMode&&this.bo.isOptedOut())return void cl.info(`Not loading surveys in cookieless mode without consent.`);let t=this.bo.getExtensions();if(!t)return void cl.error(`PostHog Extensions not found.`);if(j(this.Mh)&&!e.advancedEnableSurveys)return;let n=this.Mh||e.advancedEnableSurveys;this.xh=!0;try{let e=t.generateSurveys;if(e)return this.Ph(e,n),void(this.xh=!1);let r=t.loadExternalDependency;if(!r)return this.Rh(Ji),void(this.xh=!1);r(e=>{try{if(this.xo)return;let t=this.bo.getExtensions();e||!t?.generateSurveys?this.Rh(`Could not load surveys script`,e):this.Ph(t.generateSurveys,n)}finally{this.xh=!1}})}catch(e){throw this.xh=!1,this.Rh(`Error initializing surveys`,e),e}}Ph(e,t){this.xo||(this._surveyManager=e(t),this._surveyEventReceiver=this.bo.createEventReceiver(),cl.info(`Surveys loaded successfully`),this.Ah({isLoaded:!0}))}Rh(e,t){cl.error(e,t),this.Ah({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.Ch.push(e),this._surveyManager&&this.Ah({isLoaded:!0}),()=>{this.Ch=this.Ch.filter(t=>t!==e)}}getSurveys(e,t=!1){let n=this.mo??this.Sh;if(!n||this.xo)return;if(this.Ir.disableSurveys)return cl.info(pu),e([]);let r=n.kv.get(fi);if(r&&!t)return e(r,{isLoaded:!0}),void(this.Fh()&&this.getSurveys(()=>{},!0));if(this.$h)return void this.$h.then(({surveys:t,context:n})=>{this.xo||e(t,n)}).catch(e=>cl.error(`Error in survey callback`,e));let i=this.Oh(`/api/surveys/`,{method:`GET`,query:{token:n.projectToken},sentAt:`query`,timeoutMs:this.Ir.requestTimeoutMs}).then(e=>{try{return this.Dh(n,e)}catch(e){return cl.error(`Error processing surveys response`,e),this.Dh(n,{statusCode:0,error:e})}},e=>this.Dh(n,{statusCode:0,error:e}));this.$h=i;let a=()=>{this.$h===i&&(this.$h=null)};i.then(t=>{a(),this.xo||e(t.surveys,t.context)},a).catch(e=>cl.error(`Error in survey callback`,e))}Oh(e,t){let n=this.mo;return n?n.sendRequest(e,t):new Promise(e=>e({statusCode:0,error:Error(fu)}))}Dh(e,t){if(this.xo)return{surveys:[],context:{isLoaded:!1,error:fu}};let n=t.statusCode;if(n!==200||!t.json){let e=`Surveys API could not be loaded, status: ${n}`;return n===0?t.error||cl.warn(e):cl.error(e),this.Ih=Date.now(),{surveys:[],context:{isLoaded:!1,error:e}}}this.Ih=null;let r=t.json.surveys||[],i=r.filter(e=>function(e){return!(!e.start_date||e.end_date)}(e)&&(Zc(e)||function(e){var t;return!!((t=e.conditions)!=null&&(t=t.actions)!=null&&(t=t.values)!=null&&t.length)}(e)));var a;return i.length>0&&((a=this._surveyEventReceiver)==null||a.register(i)),e.kv.set({[fi]:r,[pi]:Date.now()}),{surveys:r,context:{isLoaded:!0}}}Fh(){return this.Lh()&&!this.$h&&!this.Nh()}Lh(){let e=(this.mo??this.Sh)?.kv.get(pi);return I(e)&&Date.now()-e>3e5}Nh(){return I(this.Ih)&&3e5>Date.now()-this.Ih}markSurveyAsSeen(e,t){ll({id:e,current_iteration:t?.iteration??null});try{localStorage.setItem(`lastSeenSurveyDate`,new Date().toISOString())}catch{}}
1Ah(e){for(let t of this.Ch)try{if(!e.isLoaded)return t([],e);this.getSurveys(t)}catch(e){cl.error(`Error in survey callback`,e)}}getActiveMatchingSurveys(e,t=!1){if(!F(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);cl.warn(`init was not called`)}qh(e){let t=null;return this.getSurveys(n=>{t=n.find(t=>t.id===e)??null}),t}jh(e){if(F(this._surveyManager))return{eligible:!1,reason:fu};let t=typeof e==`string`?this.qh(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:`Survey not found`}}Bh(e){if(!this.bo.isCapturing())return{eligible:!1,reason:`PostHog is not capturing, so a survey response cannot be recorded`};if(F(this._surveyManager))return{eligible:!1,reason:fu};let t=typeof e==`string`?this.qh(e):e;return t?this._surveyManager.checkSurveyRenderability(t):{eligible:!1,reason:`Survey not found`}}canRenderSurvey(e){if(F(this._surveyManager))return cl.warn(`init was not called`),{visible:!1,disabledReason:fu};let t=this.Bh(e);return{visible:t.eligible,disabledReason:t.reason}}canRenderSurveyAsync(e,t){return F(this._surveyManager)?(cl.warn(`init was not called`),Promise.resolve({visible:!1,disabledReason:fu})):new Promise(n=>{this.getSurveys(t=>{let r=t.find(t=>t.id===e)??null;if(r){let e=this.Bh(r);n({visible:e.eligible,disabledReason:e.reason})}else n({visible:!1,disabledReason:`Survey not found`})},t)})}renderSurvey(e,t,n){if(!this.bo.isCapturing())return;if(F(this._surveyManager))return void cl.warn(`init was not called`);let r=typeof e==`string`?this.qh(e):e;if(!r?.id)return void cl.warn(`Survey not found`);if(!ul.includes(r.type))return void cl.warn(`Surveys of type ${r.type} cannot be rendered in the app`);let i=a?.querySelector(t);if(i){if(r.appearance?.surveyPopupDelaySeconds){cl.info(`Rendering survey ${r.id} with delay of ${r.appearance.surveyPopupDelaySeconds} seconds`);let e=setTimeout(()=>{var t;this.Th.delete(e),!this.xo&&this.bo.isCapturing()&&(cl.info(`Rendering survey ${r.id} with delay of ${r.appearance?.surveyPopupDelaySeconds} seconds`),(t=this._surveyManager)==null||t.renderSurvey(r,i,n),cl.info(`Survey ${r.id} rendered`))},1e3*r.appearance.surveyPopupDelaySeconds);this.Th.add(e);return}this._surveyManager.renderSurvey(r,i,n)}else cl.warn(`Survey element not found`)}displaySurvey(e,t){var n;if(!this.bo.isCapturing())return;if(F(this._surveyManager))return void cl.warn(`init was not called`);let r=this.qh(e);if(!r)return void cl.warn(`Survey not found`);let i=r;if((n=r.appearance)!=null&&n.surveyPopupDelaySeconds&&t.ignoreDelay&&(i=R(R({},r),{},{appearance:R(R({},r.appearance),{},{surveyPopupDelaySeconds:0})})),t.displayType!==As.Popover&&t.initialResponses&&cl.warn(`initialResponses is only supported for popover surveys. prefill will not be applied.`),!1===t.ignoreConditions){let e=this.jh(r);if(!e.eligible)return void cl.warn(`Survey is not eligible to be displayed: `,e.reason)}t.displayType===As.Inline?this.renderSurvey(i,t.selector,t.properties):this._surveyManager.handlePopoverSurvey(i,t)}cancelPendingSurvey(e){F(this._surveyManager)?cl.warn(`init was not called`):this._surveyManager.cancelSurvey(e)}handlePageUnload(){var e,t;(e=this._surveyManager)==null||(t=e.handlePageUnload)==null||t.call(e)}};function hu(e,t,n){if(F(e))return!1;switch(n){case`exact`:return e===t;case`contains`:{let n=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`).replace(/_/g,`.`).replace(/%/g,`.*`);return new RegExp(n,`i`).test(e)}case`regex`:try{return new RegExp(t).test(e)}catch{return!1}default:return!1}}var gu=class{constructor(e){this._instance=e,this.Hh=new Set,this.zh=new Set,this.Uh=new Wc,this.Wh=(e,t)=>this.Vh(e,t)&&this.Gh(e,t)&&this.Zh(e,t)&&this.Qh(e,t),this.Vh=(e,t)=>!t?.event||e?.event===t?.event}init(){j(this._instance?._addCaptureHook)||(this.Jh=this._instance?._addCaptureHook((e,t)=>{this.on(e,t)}))}dispose(){var e;(e=this.Jh)==null||e.call(this),this.Jh=void 0,this.Uh=new Wc}register(e){if(!j(this._instance?._addCaptureHook)&&(e.forEach(e=>{var t;this.Hh.add(e),(t=e.steps)==null||t.forEach(e=>{this.zh.add(e?.event||``)})}),this._instance?.autocapture)){let e=new Set;
1this.Hh.forEach(t=>{var n;(n=t.steps)==null||n.forEach(t=>{t!=null&&t.selector&&e.add(t.selector)})}),this._instance.autocapture.setElementSelectors(e)}}replace(e){this.Hh.clear(),this.zh.clear(),this.register(e)}on(e,t){t!=null&&e.length!=0&&(this.zh.has(e)||this.zh.has(t.event))&&this.Hh.forEach(e=>{this.Kh(t,e)&&this.Uh.emit(`actionCaptured`,e.name)})}Xh(e){this.onAction(`actionCaptured`,t=>e(t))}Kh(e,t){if(t?.steps==null)return!1;for(let n of t.steps)if(this.Wh(e,n))return!0;return!1}onAction(e,t){return this.Uh.on(e,t)}Gh(e,t){if(t?.url){var n;let r=e==null||(n=e.properties)==null?void 0:n.$current_url;if(!r||typeof r!=`string`||!hu(r,t.url,t.url_matching||`contains`))return!1}return!0}Zh(e,t){return!!this.Yh(e,t)&&!!this.tc(e,t)&&!!this.ec(e,t)}Yh(e,t){var n;if(!t?.href)return!0;let r=this.nc(e);if(r.length>0)return r.some(e=>hu(e.href,t.href,t.href_matching||`exact`));let i=(e==null||(n=e.properties)==null?void 0:n.$elements_chain)||``;return!!i&&hu(function(e){let t=e.match(/(?::|")href="(.*?)"/);return t?t[1]:``}(i),t.href,t.href_matching||`exact`)}tc(e,t){var n;if(!t?.text)return!0;let r=this.nc(e);if(r.length>0)return r.some(e=>hu(e.text,t.text,t.text_matching||`exact`)||hu(e.$el_text,t.text,t.text_matching||`exact`));let i=(e==null||(n=e.properties)==null?void 0:n.$elements_chain)||``;return!!i&&(a=function(e){let t=[],n=/(?::|")text="(.*?)"/g,r;for(;!F(r=n.exec(e));)t.includes(r[1])||t.push(r[1]);return t}(i),o=t.text,s=t.text_matching||`exact`,a.some(e=>hu(e,o,s)));var a,o,s}ec(e,t){var n,r;if(!t?.selector||(e==null||(n=e.properties)==null?void 0:n.$element_selectors)?.includes(t.selector))return!0;let i=(e==null||(r=e.properties)==null?void 0:r.$elements_chain)||``;if(t.selector_regex&&i)try{return new RegExp(t.selector_regex).test(i)}catch{return!1}return!1}nc(e){var t;return(e==null||(t=e.properties)==null?void 0:t.$elements)==null?[]:e?.properties.$elements}Qh(e,t){return!t?.properties||t.properties.length===0||tl(t.properties.reduce((e,t)=>{let n=D(t.value)?t.value.map(String):t.value==null?[]:[String(t.value)];return e[t.key]={values:n,operator:t.operator||`exact`},e},{}),e?.properties)}},_u=class{constructor(e){var t,n;this.sc=[],this._instance=e,this.rc=new Map,this.oc=new Map,this.lc=new Map,this.ac=(t=this._instance)==null||(n=t.onSessionId)==null?void 0:n.call(t,e=>this.uc(e))}hc(e){return!1}cc(){return null}dc(e){}vc(){}fc(e,t){return!!e&&tl(e.propertyFilters,t?.properties)}gc(e,t){let n=new Map;return e.forEach(e=>{var r;(r=e.conditions)==null||(r=r[t])==null||(r=r.values)==null||r.forEach(t=>{if(t?.name){let r=n.get(t.name)||[];r.push(e.id),n.set(t.name,r)}})}),n}mc(e,t,n){let r=(n===Es.Activation?this.rc:this.oc).get(e),i=[];return this.yc(e=>{i=e.filter(e=>r?.includes(e.id))}),i.filter(r=>{var i;let a=(i=r.conditions)==null||(i=i[n])==null||(i=i.values)==null?void 0:i.find(t=>t.name===e);return this.fc(a,t)})}register(e){this.bc(e,!1)}replace(e){this.bc(e,!0)}bc(e,t){j(this._instance?._addCaptureHook)||(this._c(e,t),this.wc(e,t))}wc(e,t){let n=e.filter(e=>{var t;return(t=e.conditions)==null||(t=t.actions)==null||(t=t.values)==null?void 0:t.length});var r;if(t&&this.lc.clear(),n.length===0)return void(t&&((r=this.kc)==null||r.replace([])));this.kc||(this.kc=new gu(this._instance),this.kc.init(),this.kc.Xh(e=>this.onAction(e)));let i=[];n.forEach(e=>{var t;(t=e.conditions)==null||(t=t.actions)==null||t.values.forEach(t=>{if(i.push(t),t.name){let n=this.lc.get(t.name)??[];n.includes(e.id)||n.push(e.id),this.lc.set(t.name,n)}})}),t?this.kc.replace(i):this.kc.register(i)}Sc(e,t){t.forEach((t,n)=>{let r=e.get(n)??[];t.forEach(e=>{r.includes(e)||r.push(e)}),e.set(n,r)})}_c(e,t){let n=e.filter(e=>{var t;return e.conditions?.events&&((t=e.conditions)==null||(t=t.events)==null||(t=t.values)==null?void 0:t.length)>0}),r=e.filter(e=>{var t;return e.conditions?.cancelEvents&&((t=e.conditions)==null||(t=t.cancelEvents)==null||(t=t.values)==null?void 0:t.length)>0}),i=this.gc(e,Es.Activation),a=this.gc(e,Es.Cancellation);t?(this.rc=i,this.oc=a):(this.Sc(this.rc,i),this.Sc(this.oc,a)),(n.length!==0||r.length!==0)&&(this.Jh??=this._instance?._addCaptureHook((e,t)=>{this.onEvent(e,t)}))}onEvent(e,t){var n,r;let i=this.xc(),a=(t==null||(n=t.properties)==null?void 0:n.$survey_id)||(t==null||(r=t.properties)==null?void 0:r.$product_tour_id);if(a&&this.getActivatedIds().includes(a)){let t=this.Cc(e,a);if(t===`consume`)return i.info(`event consumed activated item, remov
1ing it`,{event:e,itemId:a}),void this.$c([a]);if(t===`persist`)return i.info(`shown item promoted to persisted activation`,{event:e,itemId:a}),this.Ic(a),void this.Tc([a])}if(this.oc.has(e)){let n=this.mc(e,t,Es.Cancellation);n.length>0&&(i.info(`cancel event matched, cancelling items`,{event:e,itemsToCancel:n.map(e=>e.id)}),this.$c(n.map(e=>e.id)),n.forEach(e=>this.Mc(e.id)))}if(!this.rc.has(e))return;i.info(`event name matched`,{event:e,eventPayload:t,items:this.rc.get(e)});let o=this.mc(e,t,Es.Activation);this.Ec(o.map(e=>e.id))}onAction(e){this.lc.has(e)&&this.Ec(this.lc.get(e)||[])}Ec(e){var t,n;if(e.length===0)return;let r=!!((t=this._instance)!=null&&(n=t.get_session_id)!=null&&n.call(t)),i=[];for(let t of e)r&&this.hc(t)?this.Ic(t)&&this.Pc(t):i.push(t);i.length>0&&(this.sc=[...new Set([...this.sc,...i])]),this.xc().info(`updating activated items`,{activatedItems:this.getActivatedIds()})}Ic(e){this.sc=this.sc.filter(t=>t!==e);let t=this.Rc();return!t.includes(e)&&(this.Ac([...t,e]),this.Fc(),!0)}$c(e){let t=new Set(e);this.sc=this.sc.filter(e=>!t.has(e));let n=this.Oc(),r=n.filter(e=>!t.has(e));r.length!==n.length&&(this.Ac(r),r.length===0&&this.Dc()),this.Tc(e)}Lc(){var e;let t=this.cc();if(!t)return{};let n=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.props[t];return n&&typeof n==`object`?n:{}}Pc(e){if(!this.cc())return;let t=this.Lc();this.dc(R(R({},t),{},{[e]:Date.now()}))}Tc(e){if(!this.cc())return;let t=this.Lc(),n={},r=!1;for(let[i,a]of Object.entries(t))e.includes(i)?r=!0:n[i]=a;r&&(A(n)?this.vc():this.dc(n))}Nc(){this.cc()&&this.vc()}getActivationTimestamp(e){if(!this.Rc().includes(e))return;let t=this.Lc()[e];return I(t)?t:void 0}Oc(){var e;let t=this.qc();return((e=this._instance)==null||(e=e.persistence)==null?void 0:e.props[t])||[]}Rc(){var e,t,n;let r=this.Oc();if(r.length===0)return[];let i=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.props[this.jc()],a=(t=this._instance)==null||(n=t.get_session_id)==null?void 0:n.call(t);return a&&i===a?r:[]}Fc(){var e,t;let n=(e=this._instance)==null||(t=e.get_session_id)==null?void 0:t.call(e);n&&this.Bc(n)}Dc(){this.Hc()}uc(e){var t;let n=(t=this._instance)==null||(t=t.persistence)==null?void 0:t.props[this.jc()];if(n&&n!==e){let e=this.Oc(),t=this.Lc();e.length>0&&(this.Ac([]),e.filter(e=>I(t[e])).forEach(e=>this.Mc(e))),this.Dc(),this.Nc()}}getActivatedIds(){return[...new Set([...this.Rc(),...this.sc])].filter(e=>!this.zc(e))}dispose(){var e,t,n;(e=this.ac)==null||e.call(this),this.ac=void 0,(t=this.Jh)==null||t.call(this),this.Jh=void 0,(n=this.kc)==null||n.dispose(),this.kc=void 0}reset(){this.sc=[],this.Oc().length>0&&this.Ac([]),this.Dc(),this.Nc()}getEventToItemsMap(){return this.rc}Uc(){return this.kc}},vu=class extends _u{constructor(e){super(e)}qc(){return mi}jc(){return hi}cc(){return gi}dc(e){var t;(t=this._instance)==null||(t=t.persistence)==null||t.register({$surveys_activated_timestamps:e})}vc(){var e;(e=this._instance)==null||(e=e.persistence)==null||e.unregister(`$surveys_activated_timestamps`)}hc(e){var t;let n;this.yc(t=>{n=t.find(t=>t.id===e)});let r=n==null||(t=n.appearance)==null?void 0:t.surveyPopupDelaySeconds;return I(r)&&r>0}Wc(){return Os.SHOWN}yc(e){var t;(t=this._instance)==null||t.getSurveys(e)}Mc(e){var t;(t=this._instance)==null||t.cancelPendingSurvey(e)}xc(){return cl}Ac(e){var t;(t=this._instance)==null||(t=t.persistence)==null||t.register({$surveys_activated:e})}Bc(e){var t;(t=this._instance)==null||(t=t.persistence)==null||t.register({$surveys_activated_session:e})}Hc(){var e;(e=this._instance)==null||(e=e.persistence)==null||e.unregister(`$surveys_activated_session`)}zc(){return!1}Cc(e,t){let n;return this.yc(e=>{n=e.find(e=>e.id===t)}),!n||function(e){var t;return Zc(e)&&!!((t=e.conditions)!=null&&(t=t.events)!=null&&t.repeatedActivation)||e.schedule===`always`}(n)?e===Os.SHOWN?`consume`:`ignore`:e===Os.SHOWN?`persist`:e===Os.DISMISSED||e===Os.SENT?`consume`:`ignore`}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}},yu=class{constructor(e){this._instance=e}initialize(){}get(e){if(typeof e==`string`)return this._instance.get_property(e);let t={};for(let n of e){let e=this._instance.get_property(n);j(e)||(t[n]=e)}return t}set(e,t){this._instance.register(typeof e==`string`?{[e]:t}:e)}remove(e){typeof e==`string`?this._instance.unregister(e):e.forEach(e
1=>this._instance.unregister(e))}},bu=class{constructor(e){this._instance=e}get(){let e=this._instance.config;return{disableSurveys:e.disable_surveys,cookielessMode:!!e.cookieless_mode,advancedEnableSurveys:e.advanced_enable_surveys,requestTimeoutMs:e.surveys_request_timeout_ms}}isOptedOut(){return this._instance.consent.isOptedOut()}isCapturing(){return this._instance.is_capturing()}getExtensions(){let e=m?.__PosthogExtensions__;if(!e)return;let{generateSurveys:t,loadExternalDependency:n}=e;return{generateSurveys:t?e=>t(this._instance,e):void 0,loadExternalDependency:n?e=>n(this._instance,`surveys`,e):void 0}}createEventReceiver(){return new vu(this._instance)}},xu=n?.location?Jo(n.location.hash,`__posthog`)||Jo(location.hash,`state`):null,Su=`_postHogToolbarParams`,Cu=fr(`[Toolbar]`),wu=fr(`[FeatureFlags]`),Tu=class{constructor(e,t=!1){this.Vc=!1,this.update(e,t)}update(e,t){this.Gc=((e,t)=>({bootstrap:{featureFlags:e.bootstrap?.featureFlags??void 0,featureFlagPayloads:e.bootstrap?.featureFlagPayloads??void 0},remoteRequestsDisabled:t,featureFlagsDisabled:!!e.advanced_disable_feature_flags,onlyEvaluateSurveyFeatureFlags:!!e.advanced_only_evaluate_survey_feature_flags,deduplicateCallsPerSession:!!e.advanced_feature_flags_dedup_per_session,cacheTtlMs:e.feature_flag_cache_ttl_ms,refreshIntervalMs:e.remote_config_refresh_interval_ms??3e5,idleRefreshBackoff:j(e.remote_config_refresh_interval_ms),requestTimeoutMs:e.feature_flag_request_timeout_ms,compression:e.disable_compression?void 0:`best-available`,evaluationContexts:e.evaluation_contexts??e.evaluation_environments??[],flagKeys:D(e.flag_keys)?e.flag_keys:void 0}))(e,t),!e.evaluation_environments||e.evaluation_contexts||this.Vc||(wu.warn(`evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version.`),this.Vc=!0),j(e.flag_keys)||D(e.flag_keys)||wu.error(`Invalid flag_keys found:`,e.flag_keys,`Expected array of non-empty strings`)}get(){return this.Gc}},Eu=fr(`[FeatureFlags]`),Du=fr(`[FeatureFlags]`,{debugEnabled:!0}),Ou=`" failed. Feature flags didn't load in time.`,ku=[`click`,`keydown`,`wheel`,`touchstart`,`pointerdown`],Au=`connection_error`,ju=e=>{let t={};for(let n=0;e.length>n;n++)t[e[n]]=!0;return t},Mu=e=>{let t={};for(let[n,r]of sa(e||{}))r&&(t[n]=r);return t},Nu=e=>L(e)&&(e.name===`RangeError`&&e.message.indexOf(`Maximum call stack size exceeded`)===0||e.name===`InternalError`&&e.message===`too much recursion`),Pu=fr(`[Error tracking]`),Fu=`webkit-masked-url:`,Iu=[{value:`isolatedAPI.contexts.topHostname`,exact:!1},{value:`No response from target`,exact:!0}],Lu=[`chrome-extension://`,`moz-extension://`,`safari-extension:`,`safari-web-extension:`,Fu],Ru=[`__firefox__`,`__gCrWeb`],zu=`Refusing to render web experiment since the viewer is a likely bot`,Bu={icontains:(e,t)=>t.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>t.toLowerCase().indexOf(e.toLowerCase())===-1,regex:(e,t)=>Qc(t,e),not_regex:(e,t)=>!Qc(t,e),exact:(e,t)=>t===e,is_not:(e,t)=>t!==e},Vu=fr(`[Conversations]`),Hu=`Conversations not available yet.`;function Uu(e,t){let n=e?.flushIntervalMs??3e3,r=e?.maxBufferSize??100,a=t?.consoleCapture?void 0:e?.maxLogsPerInterval??1e3,o=j(a)?Math.max(r,2048):Math.max(r,a),s=R(R({},function(){let e=``,t=``;try{let n=i?.userAgent;n&&([e,t]=gt(n))}catch{}return function(e,t){let n=function(e){if(e)return{}.hasOwnProperty.call(Xn,e)?Xn[e]:e}(e);return R(R({},n?{"os.name":n}:{}),t?{"os.version":t}:{})}(e,t)}()),e?.resourceAttributes);return{serviceName:s?.[`service.name`]??e?.serviceName??t?.serviceNameDefault,serviceVersion:s?.[`service.version`]??e?.serviceVersion,environment:s?.[`deployment.environment`]??e?.environment,resourceAttributes:s,beforeSend:e?.beforeSend,flushIntervalMs:n,maxBufferSize:r,maxQueueSize:o,maxBatchRecordsPerPost:100,rateCapWindowMs:n,maxLogsPerInterval:a,backgroundFlushBudgetMs:0,terminationFlushBudgetMs:0}}var Wu=[`debug`,`log`,`warn`,`error`,`info`],Gu=e=>{for(;e?.__rrweb_original__;)e=e.__rrweb_original__;return e},Ku=`console`,qu=`__posthogHandledLogsRequestError`,Ju=(e,t)=>
1{let n=e instanceof Error?e:Error(t);return n[qu]=!0,n},Yu=e=>!!e&&typeof e==`object`&&!0===e[qu],Xu=fr(`[NetworkMetrics]`),Zu=()=>{var e;return n!=null&&(e=n.performance)!=null&&e.now?n.performance.now():Date.now()},Qu=e=>e?`${Math.floor(e/100)}xx`:`missing`,$u=(e,t)=>{let n=String(t);return{method:String(e).toUpperCase(),url:Go(n)?.href||n}},ed=(e,t,n,r,i)=>{try{var a;let s=i();if(!s)return;let c=n||void 0,l=Zu()-r,u=Go(t.url);if(u&&u.protocol!==`http:`&&u.protocol!==`https:`)return;let d={url:u?.href||t.url,method:t.method},f=O(s.name)?s.name(d):M(s.name)?s.name:`http.client.request.duration`;if(!f)return;let p=R({method:d.method,host:u?.hostname??``,path:u?(o=u.pathname,o.split(`/`).map(e=>(e=>/^\d+$/.test(e)||e.length>=8&&/^[0-9a-f-]*\d[0-9a-f-]*$/i.test(e))(e)?`:id`:e).join(`/`)):``,status_class:Qu(c)},s.attributes?.call(s,d,{status:c,durationMs:l}));(a=e.metrics)==null||a.histogram(f,l,{unit:`ms`,attributes:p})}catch(e){Xu.error(`Failed to record network metric`,e)}var o},td=()=>{},nd=(e,t)=>O(n?.fetch)?Jl(n,`fetch`,n=>function(...r){let i=Zu(),a=n.apply(this,r);if(!t())return a;try{let[n,o]=r,s=$u(o?.method??n?.method??`GET`,n?.url??n);return a.then(n=>(ed(e,s,n?.status,i,t),n),n=>{throw ed(e,s,void 0,i,t),n})}catch(e){return Xu.error(`Failed to observe fetch`,e),a}}):td,rd=(e,t)=>{var r;let i=n==null||(r=n.XMLHttpRequest)==null?void 0:r.prototype;if(!i)return td;let a=new WeakMap,o=Jl(i,`open`,e=>function(...t){try{vc.has(this)||a.set(this,$u(t[0],t[1]))}catch(e){Xu.error(`Failed to observe XHR open`,e)}return e.apply(this,t)}),s=Jl(i,`send`,n=>function(...r){let i;try{let n=a.get(this);if(n&&t()){let r=Zu();i=()=>{this.removeEventListener(`loadend`,i),ed(e,n,this.status,r,t)},pa(this,`loadend`,i)}}catch(e){Xu.error(`Failed to observe XHR send`,e)}try{return n.apply(this,r)}catch(e){throw i&&this.removeEventListener(`loadend`,i),e}});return()=>{o(),s()}},id={featureFlags:class{constructor(e){this.name=`featureFlags`,this.Zc=!1,this.featureFlagEventHandlers=[],this.$=Eu,this.Qc={},this.Jc={},this.Kc=[],this.Xc=!1,this.Yc=!1,this.td=0,this.ed=!1,this.nd=!1,this.sd=!1,this.rd=!1,this.od=0,this.ld=!1,this.an=()=>{let e=this.ad();this.od=0,e&&this.reloadFeatureFlags()},this.ud=()=>{let e=this.hd,t=this.dd??e;j(e)||j(t)||this.Ir.remoteRequestsDisabled||!a||a.visibilityState===`hidden`||Date.now()-(this.vd??0)<t||(this.dd=this.ld||!this.Ir.idleRefreshBackoff?e:Math.min(2*t,36e5),this.ld=!1,this.reloadFeatureFlags(),this.fd())},this.pd=()=>{this.ld&&this.dd===this.hd||this.gd()},this.ln=()=>{a?.visibilityState===`visible`&&this.gd()},`get`in e?this.bo=e:(this._instance=e,this.md=new Tu(e.config,e.Yl()),this.bo=this.md)}updateConfig(e,t){var n;(n=this.md)==null||n.update(e,t),this.mo&&this.yd()}setup(e){return this.Eh=e,this.$=e.logger.createLogger(`[FeatureFlags]`),du(e.kv.initialize(),()=>{this.Eh===e&&(this.Eh=void 0,this.mo=e,this.bd(e))})}bd(e){var t;if(this.mo===e)return n&&pa(n,`online`,this.an),this.yd(),this._d=e.registerDynamicEventProperties(()=>this.wd()?this.Qc:this.Jc),this.kd=(t=this._instance)==null||(t=t.persistence)==null?void 0:t.onCrossTabFeatureFlagChange(()=>{this.Sd(),this.xd(),this.Cd()}),this.xd(),this.initialize()}gd(){this.ld=!0,this.dd=this.hd,this.ud()}yd(){let e=this.Ir.refreshIntervalMs,t=!this.Ir.remoteRequestsDisabled&&a&&!j(e)&&e>0?e:void 0;this.Ir.idleRefreshBackoff||(this.dd=t),t!==this.hd&&(this.$d(),j(t)||(this.hd=t,this.dd=t,this.fd(),a!=null&&a.addEventListener&&(pa(a,Qi,this.ln),ia(ku,e=>{pa(a,e,this.pd,{capture:!0})}))))}fd(){j(this.hd)||(j(this.Id)||clearInterval(this.Id),this.vd=Date.now(),this.Id=setInterval(this.ud,this.hd))}$d(){var e;j(this.Id)||(clearInterval(this.Id),this.Id=void 0,a==null||(e=a.removeEventListener)==null||e.call(a,`visibilitychange`,this.ln),ia(ku,e=>{var t;a==null||(t=a.removeEventListener)==null||t.call(a,e,this.pd,{capture:!0})})),this.hd=void 0,this.dd=void 0,this.ld=!1,this.vd=void 0}destroy(){this.Td()}dispose(){this.Td()}Td(){var e,t;this.$d(),this.td++,this.nd=!1,this.Eh=void 0,this.mo&&=(this.Md(),(e=this._d)==null||e.dispose(),this._d=void 0,(t=this.kd)==null||t.call(this),this.kd=void 0,this.Kc=[],n?.removeEventListener(`online`,this.an),void 0)}get Ir(){return this.bo.get()}Ed(e){return this.Pd&&e in this.Pd?this.Pd[e]:this.mo?.kv.get(e)}Sd(){return!!this.Pd&&(this.Pd=void 0,!0)}Rd(){return!j(this.mo?.kv.get(`$enabled_feature_flags`))&&this.Sd()}At(e){this.Ad(()=>this.mo?.kv.set(e))}Fd(e,t,n){if(!this._instance?.persistence||!e.$enabled_feature_flags)return;let r=this.Ed(`$enabled_feature_flags`)||{},i=e.$enabled_feature_flags||{},a=t.flags||t.featureFlags,o=t.flags?Object.entries(t.flags).filter(([,e])=>!e?.failed).map(([e])=>e):[],s=!!t.errorsWhileComputingFlags&&!!t.flags,c=s?o:n&&!D(a)?Object.keys(a||{}):Array.from(new Set([...Object.keys(r),...Object.keys(i)])),l=this.Ed(`$feature_flag_payloads`)||{},u=e.$feature_flag_payloads||{},d=s||n?c:Array.from(new Set([...Object.keys(l),...Object.keys(u)])),f=!s&&!n,p=!!f||c,m=!!f||d,h={[ti]:p,[ei]:p,[ii]:m};e.$feature_flag_details&&(h[ri]=p);
1for(let t of[ai,Di,oi])j(e[t])||(h[t]=!0);this._instance.persistence.markCrossTabFeatureFlagChanges(h)}Lt(e){this.Ad(()=>this.mo?.kv.remove(e))}Ad(e){try{e()}catch(e){this.$.error(`Failed to update feature flag persistence`,e)}}xd(){let e={};for(let t of[ti,ii,ai,si]){let n=this.Ed(t);j(n)||(e[t]=n)}this.Qc=e;let t=R({},e),n=this.Ed(ei);if(n)for(let[e,r]of Object.entries(n))t[`$feature/${e}`]=r;this.Jc=t}wd(){let e=this.Ir.cacheTtlMs;if(!e||0>=e)return!1;let t=this.Ed(Di);return typeof t!=`number`||Date.now()-t>e}Od(){return!!this.wd()&&(this.rd||this.Yc||(this.rd=!0,this.$.warn(`Feature flag cache is stale, triggering refresh...`),this.reloadFeatureFlags()),!0)}Dd(){let e=this.Ir.evaluationContexts;return e?.length?e.filter(e=>{let t=e&&typeof e==`string`&&e.trim().length>0;return t||this.$.error(`Invalid evaluation context found:`,e,`Expected non-empty string`),t}):[]}Ld(){let e=this.Ir.flagKeys;if(!j(e))return e.filter(e=>{let t=e&&typeof e==`string`&&e.trim().length>0;return t||this.$.error(`Invalid flag key found:`,e,`Expected non-empty string`),t})}initialize(){let e=this.Ir,t=e.bootstrap?.featureFlags??{};if(Object.keys(t).length){let n=e.bootstrap?.featureFlagPayloads??{},r=Object.keys(t).filter(e=>!j(t[e])).reduce((e,n)=>(e[n]=t[n],e),{}),i=Object.keys(n).filter(e=>r[e]).reduce((e,t)=>(e[t]=n[t],e),{});return this.Nd({featureFlags:r,featureFlagPayloads:i},void 0,{persist:!1})}}updateFlags(e,t,n){var r,i;let a=n?.merge&&(r=this.Ed(`$enabled_feature_flags`))!=null?r:{},o=n?.merge&&(i=this.Ed(`$feature_flag_payloads`))!=null?i:{},s=R(R({},a),e),c=R(R({},o),t),l={};for(let[e,t]of Object.entries(s))l[e]={key:e,enabled:kn(t),variant:An(t),reason:void 0,metadata:j(c?.[e])?void 0:{id:0,version:void 0,description:void 0,payload:c[e]}};this.Nd({flags:l})}get hasLoadedFlags(){return this.Xc}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){let e=this.Ed(ri),t=this.Ed(si),n=this.Ed(ci);if(!n&&!t)return e||{};let r=oa({},e||{}),i=[...new Set([...Object.keys(n||{}),...Object.keys(t||{})])];for(let e of i){var a;let i=r[e],s=t?.[e],c=j(s)?(a=i?.enabled)!=null&&a:!!s,l=j(s)?i?.variant:typeof s==`string`?s:void 0,u=n?.[e],d=R(R({},i),{},{enabled:c,variant:c?l??i?.variant:void 0});var o;c!==i?.enabled&&(d.original_enabled=i?.enabled),l!==i?.variant&&(d.original_variant=i?.variant),u&&(d.metadata=R(R({},i?.metadata),{},{payload:u,original_payload:i==null||(o=i.metadata)==null?void 0:o.payload})),r[e]=d}return this.Zc||=(this.$.warn(` Overriding feature flag details!`,{flagDetails:e,overriddenPayloads:n,finalDetails:r}),!0),r}getAllFeatureFlags(){let e=this.getFlagVariants(),t=this.getFlagPayloads();return Object.keys(e).map(n=>{let r=e[n];return{key:n,enabled:kn(r),variant:An(r),payload:On(t[n])}})}getFlagVariants(){let e=this.Ed(ei),t=this.Ed(si);if(!t)return e||{};let n=oa({},e||{}),r=Object.keys(t);for(let e=0;r.length>e;e++)n[r[e]]=t[r[e]];return this.Zc||=(this.$.warn(` Overriding feature flags!`,{enabledFlags:e,overriddenFlags:t,finalFlags:n}),!0),n}getFlagPayloads(){let e=this.Ed(ii),t=this.Ed(ci);if(!t)return e||{};let n=oa({},e||{}),r=Object.keys(t);for(let e=0;r.length>e;e++)n[r[e]]=t[r[e]];return this.Zc||=(this.$.warn(` Overriding feature flag payloads!`,{flagPayloads:e,overriddenPayloads:t,finalPayloads:n}),!0),n}reloadFeatureFlags(){this.ed||this.Ir.featureFlagsDisabled||this.ad()||(this.Yc&&(this.nd=!0),this.qd||=(this.Kc.slice().forEach(e=>{try{e()}catch(e){this.$.error(`Error while running feature flags reloading callback`,e)}}),setTimeout(()=>{this.jd()},5)))}Md(){clearTimeout(this.qd),this.qd=void 0}onReloading(e){return this.Kc.push(e),()=>{this.Kc=this.Kc.filter(t=>t!==e)}}ensureFlagsLoaded(){this.Xc||this.Yc||this.qd||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.ed=e}resetFlagCallReported(){this.Lt(wi)}jd(e){this.Md();let t=this.mo;if(!t||this.Ir.remoteRequestsDisabled||this.ad())return;if(this.Yc)return void(this.nd=!0);let n={token:t.projectToken,distinct_id:t.distinctId,groups:t.groups,$anon_distinct_id:this.$anon_distinct_id,person_properties:R(R(R({},t.initialPersonProperties),this.Ed(`$stored_person_properties`)||{}),{},{$lib:t.library.name,$lib_version:t.library.version}),group_properties:this.Ed(ui),timezone:us()};j(t.deviceId)||(n.$device_id=t.deviceId),(e!=null&&e.disableFlags||this.Ir.featureFlagsDisabled)&&(n.disable_flags=!0);let r=this.Dd();r.length&&(n.evaluation_contexts=r);let i=this.Ld();j(i)||(n.flag_keys=i);let a=this.Ir.onlyEvaluateSurveyFeatureFlags,o=`/flags/?v=2`+(a?`&only_evaluate_survey_feature_flags=true`:``),s=this.td;this.Yc=!0;let c=()=>{this.nd&&(this.nd=!1,this.jd())},l=e=>{let t=e.json??{},r=e.statusCode!==200;if(this.Yc=!1,s!==this.td)return void c();if(this.Bd(e.statusCode),r||this.nd||(this.$anon_distinct_id=void 0),n.disable_flags&&!this.nd)return;this.sd=!r;let i=[];e.error?i.push(e.error instanceof Error&&e.error.name===`AbortError`?`timeout`:e.error instanceof Error?Au:`unknown_error`):e.statusCode!==200&&i.push(`api_error_${e.statusCode}`),t.errorsWhileComputingFlags&&i.push(`errors_while_computing_flags`);let o=!!t.quotaLimited?.includes(`feature_flags`);o&&i.push(`quota_limited`),this.At({[Ei]:i}),o?this.$.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.`):n.disable_flags||this.Nd(t,r,{partialResponse:a}),c()},u=e=>{this.Yc=!1,s===this.td?(this.At({[Ei]:[Au]}),this.$.error(`Feature flag request failed`,e),this.Rd()&&this.Cd(!0),c()):c()};try{t.sendRequest(o,{target:`flags`,method:`POST`,body:n,compression:this.Ir.compression,sentAt:`body`,timeoutMs:this.Ir.requestTimeoutMs}).then(l).catch(u)}catch(e){u(e)}}ad(){return Yo(this.od,3)}Bd(e){this.od=Xo(e,this.od,3,()=>this.$.warn(`Feature flag requests are failing before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped refreshing feature flags; will try again when connectivity changes.`))}getFeatureFlag(e,t={}){if(t.fresh&&!this.sd)return;if(!(this.Xc||this.getFlags()&&this.getFlags().length>0))return void this.$.warn(`getFeatureFlag for key "`+e+Ou);if(this.Od())return;let n=this.getFeatureFlagResult(e,t);return n?.variant??n?.enabled}getFeatureFlagDetails(e){return this.getFlagsWithDetails()[e]}getFeatureFlagPayload(e){return this.getFeatureFlagResult(e,{send_event:!1})?.payload}getFeatureFlagResult(e,t={}){if(t.fresh&&!this.sd)return;if(!(this.Xc||this.getFlags()&&this.getFlags().length>0))return void this.$.warn(`getFeatureFlagResult for key "`+e+Ou);if(this.Od())return;let n=this.getFlagVariants(),r=e in n,i=n[e],a=this.getFlagPayloads()[e],o=String(i),s=this.Ed(`$feature_flag_request_id`)||void 0,c=this.Ed(`$feature_flag_evaluated_at`)||void 0,l,u=this.Ed(`$flag_call_reported`)||{};if(this.Ir.deduplicateCallsPerSession){let e=this.mo?.session.sessionId,t=this.Ed(Ti);e&&e!==t&&(u={},l=e)}if(t.send_event||!(`send_event`in t)){if(e in u&&u[e].includes(o))l&&this.At({[wi]:u,[Ti]:l});else{var d,f,p,m,h,g,_,v;D(u[e])?u[e].push(o):u[e]=[o],this.At(R({[wi]:u},l?{[Ti]:l}:{}));let t=this.getFeatureFlagDetails(e),n=[...this.Ed(`$feature_flag_errors`)??[]];j(i)&&n.push(`flag_missing`);let r={$feature_flag:e,$feature_flag_response:i,$feature_flag_payload:a??null,$feature_flag_request_id:s,$feature_flag_evaluated_at:c,$feature_flag_bootstrapped_response:((d=this.Ir.bootstrap)==null||(d=d.featureFlags)==null?void 0:d[e])??null,$feature_flag_bootstrapped_payload:((f=this.Ir.bootstrap)==null||(f=f.featureFlagPayloads)==null?void 0:f[e])??null,$used_bootstrap_value:!this.sd};j(t==null||(p=t.metadata)==null?void 0:p.has_experiment)||(r.$feature_flag_has_experiment=t.metadata.has_experiment),j(t==null||(m=t.metadata)==null?void 0:m.version)||(r.$feature_flag_version=t.metadata.version);let b=(t==null||(h=t.reason)==null?void 0:h.description)??(t==null||(g=t.reason)==null?void 0:g.code);var y;b&&(r.$feature_flag_reason=b),t!=null&&(_=t.metadata)!=null&&_.id&&(r.$feature_flag_id=t.metadata.id),j(t?.original_variant)&&j(t?.original_enabled)||(r.$feature_flag_original_response=j(t.original_variant)?t.original_enabled:t.original_variant),t!=null&&(v=t.metadata)!=null&&v.original_payload&&(r.$feature_flag_original_payload=t==null||(y=t.metadata)==null?void 0:y.original_payload),n.length&&(r.$feature_flag_error=n.join(`,`)),this.Hd(r)}}else l&&this.At({[wi]:u,[Ti]:l});return r?{key:e,enabled:!!i,variant:typeof i==`string`?i:void 0,payload:On(a)}:void 0}Hd(e){try{var t;(t=this.mo)==null||t.capture(`$feature_flag_called`,e).catch(e=>{this.$.error(`Failed to capture feature flag call`,e)})}catch(e){this.$.error(`Failed to capture feature flag call`,e)}}getRemoteConfigPayload(e,t){this.zd(e,t)}zd(e,t){var n=this;return pe(function*(){let r=n.mo;if(!r)return;let i={distinct_id:r.distinctId,token:r.projectToken,person_properties:{$lib:r.library.name,$lib_version:r.library.version}},a=n.Dd();a.length&&(i.evaluation_contexts=a);let o=n.Ld(),s;j(o)||(i.flag_keys=o);try{s=(yield r.sendRequest(`/flags/?v=2`,{target:`flags`,method:`POST`,body:i,compression:n.Ir.compression,sentAt:`body`,timeoutMs:n.Ir.requestTimeoutMs})).json?.featureFlagPayloads?.[e]||void 0}catch(e){n.$.error(`Remote config feature flag request failed`,e);return}try{t(s)}catch(e){n.$.error(`Remote config feature flag callback failed`,e)}})()}isFeatureEnabled(e,t={}){if(t.fresh&&!this.sd)return t.defaultValue;if(!(this.Xc||this.getFlags()&&this.getFlags().length>
10))return this.$.warn(`isFeatureEnabled for key "`+e+Ou),t.defaultValue;let n=this.getFeatureFlag(e,t);return j(n)?t.defaultValue:!!n}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(t=>t!==e)}receivedFeatureFlags(e,t,n){this.Nd(e,t,n)}Nd(e,t,n){if(!this.mo)return;this.Xc=!0;let r=((e,t={},n={},r={},i,a=Eu)=>{let o=((e,t)=>{let n=e.flags;if(n){let t=Object.fromEntries(Object.keys(n).map(e=>[e,n[e].variant??n[e].enabled])),r=Object.fromEntries(Object.keys(n).filter(e=>n[e].enabled).filter(e=>!j(n[e].metadata?.payload)).map(e=>[e,n[e].metadata?.payload]));return R(R({},e),{},{featureFlags:t,featureFlagPayloads:r})}return e.featureFlags&&t.warn(`Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version`),e})(e,a),s=o.flags,c=o.featureFlags,l=o.featureFlagPayloads;if(!c)return;let u=e.requestId,d=e.evaluatedAt;if(D(c)){a.warn(`v1 of the feature flags endpoint is deprecated. Please use the latest version.`);let e={};if(c)for(let t=0;c.length>t;t++)e[c[t]]=!0;return{[ti]:c,[ei]:e,[oi]:!1}}let f=c,p=l,m=s;if(i?.partialResponse){let e=Object.keys(f),i=p||{};f=R(R({},t),f),p=R(R({},n),i),e.forEach(e=>{e in i||p==null||delete p[e]}),m=R(R({},r),m)}else if(e.errorsWhileComputingFlags){if(s){let e=new Set(Object.keys(s).filter(e=>!s[e]?.failed));f=R(R({},t),Object.fromEntries(Object.entries(f).filter(([t])=>e.has(t))));let i=Object.fromEntries(Object.entries(p||{}).filter(([t])=>e.has(t)));p=R(R({},n),i),e.forEach(e=>{e in i||p==null||delete p[e]}),m=R(R({},r),Object.fromEntries(Object.entries(m||{}).filter(([t])=>e.has(t))))}else f=R(R({},t),f),p=R(R({},n),p),m=R(R({},r),m)}return R(R({[ti]:Object.keys(Mu(f)),[ei]:f||{},[ii]:p||{},[ri]:m||{},[oi]:!0===e.minimalFlagCalledEvents},u?{[ai]:u}:{}),d?{[Di]:d}:{})})(e,this.getFlagVariants(),this.getFlagPayloads(),this.getFlagsWithDetails(),n,this.$);if(r){if(!1===n?.persist){let e=!j(this.mo.kv.get(ei));this.Pd=r,e||this.At(r)}else this.Sd(),this.Fd(r,e,!!n?.partialResponse),this.At(r)}else t&&this.Rd();t||(this.rd=!1),this.Cd(t)}override(e,t=!1){this.$.warn(`override is deprecated. Please use overrideFeatureFlags instead.`),this.overrideFeatureFlags({flags:e,suppressWarning:t})}overrideFeatureFlags(e){this.Ud(e)}Ud(e){if(this.mo){if(!1===e)return this.Lt([si,ci]),this.Cd(),void Du.info(`All overrides cleared`);if(D(e))return this.At({[si]:ju(e)}),this.Cd(),void Du.info(`Flag overrides set`,{flags:e});if(e&&typeof e==`object`&&(`flags`in e||`payloads`in e)){var t;let n=e;this.Zc=!!((t=n.suppressWarning)!=null&&t);let r={},i=n.flags,a=n.payloads;i&&(r[si]=D(i)?ju(i):i),a&&(r[ci]=a),Object.keys(r).length&&this.At(r),!1===i&&!1===a?this.Lt([si,ci]):!1===i?this.Lt(si):!1===a&&this.Lt(ci),this.Cd(),!1===i?Du.info(`Flag overrides cleared`):i&&Du.info(`Flag overrides set`,{flags:i}),!1===a?Du.info(`Payload overrides cleared`):a&&Du.info(`Payload overrides set`,{payloads:a});return}if(e&&typeof e==`object`)return this.At({[si]:e}),this.Cd(),void Du.info(`Flag overrides set`,{flags:e});this.$.warn(`Invalid overrideOptions provided to overrideFeatureFlags`,{overrideOptions:e})}else this.$.warn(`posthog.featureFlags.overrideFeatureFlags called before feature flags were ready`)}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.Xc){let{flags:t,flagVariants:n}=this.Wd();try{e(t,n)}catch(e){this.$.error(`Error while running feature flags callback`,e)}}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t,n){var r;let i=(this.Ed(`$early_access_features`)||[]).find(t=>t.flagKey===e),a={[`$feature_enrollment/${e}`]:t},o={$feature_flag:e,$feature_enrollment:t,$set:a};i&&(o.$early_access_feature_name=i.name),n&&(o.$feature_enrollment_stage=n);let s=R(R({},this.getFlagVariants()),{},{[e]:t});(r=this._instance)==null||(r=r.persistence)==null||r.markCrossTabFeatureFlagChanges({$active_feature_flags:[e],$enabled_feature_flags:[e],$stored_person_properties:Object.keys(a)}),this.At({[ti]:Object.keys(Mu(s)),[ei]:s,[li]:R(R({},this.Ed(`$stored_person_properties`)||{}),a)}),this.Cd();try{var c;(c=this.mo)==null||c.capture(`$feature_enrollment_update`,o).catch(e=>{this.$.error(`Failed to capture early access feature enrollment`,e)})}catch(e){this.$.error(`Failed to capture early access feature enrollment`,e)}}getEarlyAccessFeatures(e,t=!1,n){let r=this.Ed(ni);!r||t?this.Vd(e,n):e(r)}Vd(e,t){var n=this;return pe(function*(){let r=n.mo;if(!r)return;let i=t?`&${t.map(e=>`stage=${e}`).join(`&`)}`:``,a;try{let e=yield r.sendRequest(`/api/early_access_features/?token=${r.projectToken}${i}`,{target:`api`,method:`GET`,sentAt:`query`});if(!e.json)return;a=e.json.earlyAccessFeatures,n.At({[ni]:a})}catch(e){n.$.error(`Early access feature request failed`,e);return}try{e(a)}catch(e){n.$.error(`Early access feature callback failed`,e)}})()}Wd(){let e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter(e=>t[e]),flagVariants:Object.keys(t).filter(e=>t[e]).reduce((e,n)=>(e[n]=t[n],e),{})}}Cd(e){this.xd();let{flags:t,flagVariants:n}=this.Wd();
1this.featureFlagEventHandlers.forEach(r=>{try{r(t,n,{errorsLoading:e})}catch(e){this.$.error(`Error while running feature flags callback`,e)}})}setPersonPropertiesForFlags(e,t=!0){this.Gd(e,t)}Gd(e,t=!0){let n=this.Ed(`$stored_person_properties`)||{},r=e?.$set||(e?.$set_once?{}:e),i=e?.$set_once,a={};if(i)for(let e in i)({}).hasOwnProperty.call(i,e)&&(e in n||(a[e]=i[e]));this.At({[li]:R(R(R({},n),a),r)}),t&&this.reloadFeatureFlags()}unsetPersonPropertiesForFlags(e,t=!0){let n=R({},this.Ed(`$stored_person_properties`)||{});e.forEach(e=>{delete n[e]}),this.At({[li]:n}),t&&this.reloadFeatureFlags()}resetPersonPropertiesForFlags(e=!0){this.Lt(li),e&&this.reloadFeatureFlags()}setGroupPropertiesForFlags(e,t=!0){let n=this.Ed(`$stored_group_properties`)||{},r=R({},n);for(let t of Object.keys(e))r[t]=R(R({},n[t]),e[t]);this.At({[ui]:r}),t&&this.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){let t=this.Ed(`$stored_group_properties`)||{};this.At({[ui]:R(R({},t),{},{[e]:{}})})}else this.Lt(ui)}reset(){this.td++,this.nd=!1,this.Qc={},this.Jc={},this.Pd=void 0,this.Xc=!1,this.ed=!1,this.sd=!1,this.$anon_distinct_id=void 0,this.Md(),this.Zc=!1,this.od=0}}},ad={sessionRecording:class{get Ir(){return this._instance.config}get Ca(){return this._instance.persistence}get started(){return!!this.Zd?.isStarted}get status(){return this.Qd===`awaiting_config`||this.Qd===`missing_config`?this.Qd:this.Zd?.status??this.Qd}constructor(e){if(this._instance=e,this._forceAllowLocalhostNetworkCapture=!1,this.Qd=tu,this.Jd=void 0,this.Kd=!1,this.Xe=(()=>{var e,t;if(!a?.visibilityState||a.visibilityState===`visible`)return!0;let r=n==null||(e=n.performance)==null||(t=e.getEntriesByType)==null?void 0:t.call(e,`visibility-state`);return!r?.length||r.some(e=>e.name===`visible`)})(),this.ln=()=>{var e,t;a?.visibilityState===`visible`&&(this.Xe=!0,(e=this.Zd)==null||(t=e.setDocumentWasEverVisible)==null||t.call(e,!0))},!this._instance.sessionManager)throw ru.error(`started without valid sessionManager`),Error(`[SessionRecording] started without valid sessionManager. This is a bug.`);if(this.Ir.cookieless_mode===`always`)throw Error(`[SessionRecording] cannot be used with cookieless_mode="always"`);a!=null&&a.addEventListener&&pa(a,`visibilitychange`,this.ln)}initialize(){this.startIfEnabledOrStop()}dispose({discardBufferedEvents:e=!1}={}){var t;this.Kd=!0,a==null||(t=a.removeEventListener)==null||t.call(a,`visibilitychange`,this.ln),e?this.Xd(!0):this.stopRecording()}get Yd(){let e=!!this._instance.get_property(`$session_recording_remote_config`)?.enabled,t=!this.Ir.disable_session_recording,r=this.Ir.disable_session_recording||this._instance.consent.isOptedOut();return n&&e&&t&&!r}startIfEnabledOrStop(e){if(this.Kd||this.Yd&&this.Zd?.isStarted)return;let t=!j(Object.assign)&&!j(Array.from);this.Yd&&t?(this.tv(e),ru.info(`starting`)):(this.Qd=tu,this.stopRecording())}tv(e){var t;if(this.Yd){if(this.Qd!==`awaiting_config`&&this.Qd!==`missing_config`&&(this.Qd=nu),m!=null&&(t=m.__PosthogExtensions__)!=null&&(t=t.rrweb)!=null&&t.record&&m.__PosthogExtensions__?.initSessionRecording)this.ev(e);else{var n,r;let t=this._instance.sessionManager;(n=m.__PosthogExtensions__)==null||(r=n.loadExternalDependency)==null||r.call(n,this._instance,this.iv,n=>{if(!this.Kd&&this.Yd&&this._instance.sessionManager===t)return n?(this._instance.register_for_session({$sdk_debug_recording_script_not_loaded:!0}),ru.error(`could not load recorder`,n)):void this.ev(e);this.Qd=`disabled`})}}}stopRecording(){var e,t;(e=this.Jd)==null||e.call(this),this.Jd=void 0,(t=this.Zd)==null||t.stop()}Xd(e=!1){var t,n;(t=this.Jd)==null||t.call(this),this.Jd=void 0,(n=this.Zd)==null||n.discard({discardProducerEvents:e})}nv(){var e,t;(e=this.Ca)==null||e.unregister(`$session_is_sampled`),(t=this.Ca)==null||t.unregister(`$replay_sample_rate`)}sv(e,t){if(F(e))return null;let n=I(e)?e:parseFloat(e);return typeof(r=n)!=`number`||!Number.isFinite(r)||0>r||r>1?(ru.warn(`${t} must be between 0 and 1. Ignoring invalid value:`,e),null):n;var r}rv(e){if(this.Ca){var t;let n=this.Ca,r=()=>{let t=!1===e.sessionRecording?void 0:e.sessionRecording,r=this.sv(this.Ir.session_recording?.sampleRate,`session_recording.sampleRate`),i=this.sv(t?.sampleRate,`remote config sampleRate`),a=r??i;F(a)&&this.nv();let o=t?.minimumDurationMilliseconds;n.register({[Br]:R(R({cache_timestamp:Date.now(),enabled:!!t},t),{},{networkPayloadCapture:R({capturePerformance:e.capturePerformance},t?.networkPayloadCapture),canvasRecording:{enabled:t?.recordCanvas,fps:t?.canvasFps,quality:t?.canvasQuality},sampleRate:a,minimumDurationMilliseconds:j(o)?null:o,endpoint:t?.endpoint,triggerMatchType:t?.triggerMatchType,masking:t?.masking,urlTriggers:t?.urlTriggers,version:t?.version,triggerGroups:t?.triggerGroups})})};r(),(t=this.Jd)==null||t.call(this),this.Jd=this._instance.sessionManager?.onSessionId(r)}}onRemoteConfig(e){let t=e.ok?e.config:void 0;t&&`sessionRecording`in t?!1===t.sessionRecording?(this.rv(t),this.Xd()):(this.rv(t),this.startIfEnabledOrStop()):(this.Qd===`awaiting_config`&&(this.Qd=`missing_config`,ru.warn(`config refresh failed, recording will not start until page reload`)),this.startIfEnabledOrStop())}log(e,t=`log`){this.Zd?.log?this.Zd.log(e,t):ru.warn(`log called before recorder was ready`)}get iv(){var e,t;let n=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.get_property(Br);return(n==null||(t=n.scriptConfig)==null?void 0:t.script)||`lazy-recorder`}ov(){let e=this._instance.get_property(Br);if(!e)return!1;let t;try{t=typeof e==`object`?e:JSON.parse(e)}catch(e){return ru.warn(`persisted remote config for session recording is invali
1d and will be ignored`,e),!1}return!F(t.cache_timestamp)&&36e5>=Date.now()-t.cache_timestamp}ev(e){var t,n;if(!this.Kd&&this.Yd&&this._instance.sessionManager){if(!m.__PosthogExtensions__?.initSessionRecording)return ru.warn(`Called on script loaded before session recording is available. This can be caused by adblockers.`),void this._instance.register_for_session({[zi]:!0});if(this.Zd||(this.Zd=m.__PosthogExtensions__?.initSessionRecording(this._instance,this.Xe),this.Zd._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.ov()){if(this.Qd===`missing_config`||this.Qd===`awaiting_config`)return;this.Qd=`awaiting_config`,ru.info(`persisted remote config is stale, requesting fresh config before starting`),new Ls(this._instance).load();return}this.Qd=nu,(t=(n=this.Zd).setDocumentWasEverVisible)==null||t.call(n,this.Xe),this.Zd.start(e)}else this.Qd=tu}onRRwebEmit(e){var t,n;(t=this.Zd)==null||(n=t.onRRwebEmit)==null||n.call(t,e)}overrideLinkedFlag(){var e,t;this.Zd||(t=this.Ca)==null||t.register({$replay_override_linked_flag:!0}),(e=this.Zd)==null||e.overrideLinkedFlag()}overrideSampling(){var e,t;this.Zd||(t=this.Ca)==null||t.register({$replay_override_sampling:!0}),(e=this.Zd)==null||e.overrideSampling()}overrideTrigger(e){var t,n;this.Zd||(n=this.Ca)==null||n.register({[e===`url`?`$replay_override_url_trigger`:`$replay_override_event_trigger`]:!0}),(t=this.Zd)==null||t.overrideTrigger(e)}get sdkDebugProperties(){return this.Zd?.sdkDebugProperties||{$recording_status:this.status}}tryAddCustomEvent(e,t){return!!this.Zd?.tryAddCustomEvent(e,t)}flushBeforeIdentityReset(){var e,t;(e=this.Zd)==null||(t=e.flushBeforeIdentityReset)==null||t.call(e)}}},od={autocapture:class extends Ul{constructor(e){super(new Wl(e)),this.instance=e}},historyAutocapture:class{constructor(e){this._instance=e,this.lv=this.av()}initialize(){this.startIfEnabled()}get isEnabled(){let e=this.uv();return!!(e.path||e.search||this.hv(e))}startIfEnabled(){this.isEnabled&&(z.info(`History API monitoring enabled, starting...`),this.monitorHistoryChanges())}startIfEnabledOrStop(){this.stop(),this.lv=this.av(),this.startIfEnabled()}stop(){this.dv&&this.dv(),this.dv=void 0,this.vv&&this.vv(),this.vv=void 0,z.info(`History API monitoring stopped`)}monitorHistoryChanges(){n&&n.history&&(this.fv(`pushState`),this.fv(`replaceState`),this.pv(),this.hv()&&this.gv())}fv(e){if(!n||n.history[e]?.__posthog_wrapped__)return;let t=this;Jl(n.history,e,n=>function(r,i,a){n.call(this,r,i,a),t.mv(e)})}av(){let e=n?.location;if(e?.pathname)return{pathname:e.pathname,search:e.search,hash:e.hash}}uv(){let e=this._instance.config.capture_pageview;return e===`history_change`?{path:!0}:k(e)?e:{}}hv(e=this.uv()){return!!e.hash&&!this._instance.config.disable_capture_url_hashes}yv(e){let t=this.uv(),n=this.lv;return!(!n||!(t.path&&e.pathname!==n.pathname||t.search&&e.search!==n.search||this.hv(t)&&e.hash!==n.hash))}mv(e){try{let t=this.av();if(!t)return;this.yv(t)&&this._instance.capture(ea,{navigation_type:e}),this.lv=t}catch(t){z.error(`Error capturing ${e} pageview`,t)}}pv(){if(this.dv)return;let e=()=>{this.mv(`popstate`)};pa(n,`popstate`,e),this.dv=()=>{n&&n.removeEventListener(`popstate`,e)}}gv(){if(this.vv)return;let e=()=>{this.mv(`hashchange`)};pa(n,`hashchange`,e),this.vv=()=>{n&&n.removeEventListener(`hashchange`,e)}}},heatmaps:class{get Ir(){return this.instance.config}constructor(e){this.bv=!1,this._o=!1,this._v=null,this.instance=e,this.bv=!!this.instance.persistence?.props[jr],this.rageclicks=new Ll(e.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){let e=5e3;return k(this.Ir.capture_heatmaps)&&this.Ir.capture_heatmaps.flush_interval_milliseconds&&(e=this.Ir.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return F(this.Ir.capture_heatmaps)?F(this.Ir.enable_heatmaps)?this.bv:this.Ir.enable_heatmaps:!1!==this.Ir.capture_heatmaps}startIfEnabled(){if(this.isEnabled){if(this._o)return;iu.info(`starting...`),this.wv(),this.ln()}else clearInterval(this._v??void 0),this.Sv(),this.getAndClearBuffer()}onRemoteConfig(e){if(!e.ok)return;let t=e.config;if(!(`heatmaps`in t))return;let n=!!t.heatmaps;this.instance.persistence&&this.instance.persistence.register({[jr]:n}),this.bv=n,this.startIfEnabled()}getAndClearBuffer(){let e=this.Rt;return this.Rt=void 0,e}xv(e){au(e.originalEvent)&&this.Mr(e.originalEvent,`deadclick`)}ln(){this._v&&clearInterval(this._v),this._v=a?.visibilityState===`visible`?setInterval(this.pa.bind(this),this.flushIntervalMilliseconds):null}wv(){n&&a&&(this.Cv=this.pa.bind(this),pa(n,$i,this.Cv),this.$v=e=>this.Mr(e||n?.event),pa(a,`click`,this.$v,{capture:!0}),this.Iv=e=>this.Tv(e||n?.event),pa(a,`mousemove`,this.Iv,{capture:!0}
1),this.Mv=new No(this.instance,jo,this.xv.bind(this)),this.Mv.startIfEnabledOrStop(),this.Ev=this.ln.bind(this),pa(a,Qi,this.Ev),this._o=!0)}Sv(){var e;n&&a&&(this.Cv&&n.removeEventListener($i,this.Cv),this.$v&&a.removeEventListener(`click`,this.$v,{capture:!0}),this.Iv&&a.removeEventListener(`mousemove`,this.Iv,{capture:!0}),this.Ev&&a.removeEventListener(Qi,this.Ev),clearTimeout(this.Pv),(e=this.Mv)==null||e.stop(),this._o=!1)}Rv(e,t){let r=this.instance.scrollManager.scrollY(),i=this.instance.scrollManager.scrollX(),a=this.instance.scrollManager.scrollElement(),o=function(e,t,r){let i=e;for(;i&&Ka(i)&&!qa(i,`body`);){if(i===r)return!1;let e;try{e=(i.ownerDocument?.defaultView??n)?.getComputedStyle(i).position}catch{return!1}if(x(t,e))return!0;i=ao(i)}return!1}(to(e),[`fixed`,`sticky`],a);return{x:e.clientX+(o?0:i),y:e.clientY+(o?0:r),target_fixed:o,type:t}}Mr(e,t=`click`){var n;if(Ga(e.target)||!au(e))return;let r=this.Rv(e,t);(n=this.rageclicks)!=null&&n.isRageClick(e.clientX,e.clientY,new Date().getTime())&&po(to(e),this.instance.config.rageclick)&&this.Zs(R(R({},r),{},{type:`rageclick`})),this.Zs(r)}Tv(e){!Ga(e.target)&&au(e)&&(clearTimeout(this.Pv),this.Pv=setTimeout(()=>{this.Zs(this.Rv(e,`mousemove`))},500))}Zs(e){if(!n)return;let t=this.Ir.disable_capture_url_hashes?At(n.location.href):n.location.href,r=this.Ir.custom_personal_data_properties,i=qo(t,this.Ir.mask_personal_data_properties?[...Zo,...r||[]]:[],$o);this.Rt=this.Rt||{},this.Rt[i]||(this.Rt[i]=[]),this.Rt[i].push(e)}pa(){this.Rt&&!A(this.Rt)&&this.instance.capture(`$$heatmap`,{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:No,webVitalsAutocapture:class{constructor(e){this._instance=e,this.bv=!1,this._o=!1,this.Rt={navigationKey:void 0,url:void 0,metrics:[],firstMetricTimestamp:void 0},this.Av=()=>{clearTimeout(this.Fv),this.Fv=void 0,this.Rt.metrics.length!==0&&(this._instance.capture(`$web_vitals`,R({$current_url:this.Rt.url},this.Rt.metrics.reduce((e,t)=>R(R({},e),{},{[`$web_vitals_${t.name}_event`]:R({},t),[`$web_vitals_${t.name}_value`]:t.value}),{}))),this.Rt={navigationKey:void 0,url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.Ov=e=>{if(this.Rt=this.Rt||{navigationKey:void 0,url:void 0,metrics:[],firstMetricTimestamp:void 0},F(e?.name)||F(e?.value))return void Xl.error(`Invalid metric received`,e);let t=typeof e.navigationURL==`string`?e.navigationURL:void 0,n=this.Dv(t);if(j(n))return;let r=I(e.navigationId)||typeof e.navigationId==`string`?`navigation:${e.navigationId}`:`url:${n}`;if(this.Lv&&e.value>=this.Lv)return void Xl.error(`Ignoring metric with value >= `+this.Lv,e);this.Rt.navigationKey!==r&&(this.Av(),this.Fv=setTimeout(this.Av,this.flushToCaptureTimeoutMs)),j(this.Rt.navigationKey)&&(this.Rt.navigationKey=r,this.Rt.url=n),this.Rt.firstMetricTimestamp=j(this.Rt.firstMetricTimestamp)?Date.now():this.Rt.firstMetricTimestamp;let i=this._instance.sessionManager?.checkAndGetSessionAndWindowId(!0),a=R(R(R({},e),t?{navigationURL:n}:{}),{},{$current_url:n,timestamp:Date.now()});if(delete a.entries,k(e.attribution)&&this.attributionMetrics.indexOf(e.name)>-1){let t={};for(let n of eu){let r=n===`url`&&typeof e.attribution[n]==`string`?this.Dv(e.attribution[n]):e.attribution[n];j(r)||(t[n]=r)}a.attribution=t}else delete a.attribution;j(i)||(a.$session_id=i.sessionId,a.$window_id=i.windowId),this.Rt.metrics.push(a),this.Rt.metrics.length===this.allowedMetrics.length&&this.Av()},this.Nv=()=>{if(this._o)return;let e,t,n,r,i=!1,a=m.__PosthogExtensions__,o=a?.postHogWebVitalsCallbacksByFlavor,s=o?.[this.qv]||(this.qv===`web-vitals`&&j(o)?a?.postHogWebVitalsCallbacks:void 0);if(!j(s)){let a=s.withoutAttribution,o=this.attributionMetrics;i=!j(a),e=o.indexOf(`LCP`)>-1?s.onLCP:a?.onLCP||s.onLCP,t=o.indexOf(`CLS`)>-1?s.onCLS:a?.onCLS||s.onCLS,n=o.indexOf(`FCP`)>-1?s.onFCP:a?.onFCP||s.onFCP,r=o.indexOf(`INP`)>-1?s.onINP:a?.onINP||s.onINP}if(!(e&&t&&n&&r))return void Xl.error(`web vitals callbacks not loaded - not starting`);let c={reportSoftNavs:this.useSoftNavs},l=i&&this.attributionMetrics.indexOf(`INP`)>-1?R(R({},c),{},{includeProcessedEventEntries:!1}):c;this.allowedMetrics.indexOf(`LCP`)>-1&&e(this.Ov.bind(this),c),this.allowedMetrics.indexOf(`CLS`)>-1&&t(this.Ov.bind(this),c),this.allowedMetrics.indexOf(`FCP`)>-1&&n(this.Ov.bind(this),c),this.allowedMetrics.indexOf(`INP`)>-1&&r(this.Ov.bind(this),l),this._o=!0},this.bv=!!this._instance.persistence?.props[Fr],this.startIfEnabled()}get jv(){return this._instance.config.capture_performance}get allowedMetrics(){let e=k(this.jv)?this.jv?.web_vitals_allowed_metrics:void 0;return F(e)?this._instance.persistence?.props.$web_vitals_allowed_metrics||Ql
1:e}get flushToCaptureTimeoutMs(){return(k(this.jv)?this.jv.web_vitals_delayed_flush_ms:void 0)||5e3}get attributionMetrics(){let e=k(this.jv)?this.jv.web_vitals_attribution:void 0;return ne(e)?e?Ql:[]:D(e)?e:$l}get useAttribution(){return this.attributionMetrics.length>0}get useSoftNavs(){let e=k(this.jv)?this.jv.__preview_web_vitals_soft_navs:void 0;return e!=null&&e}get Lv(){let e=k(this.jv)&&I(this.jv.__web_vitals_max_value)?this.jv.__web_vitals_max_value:Zl;return e>0&&6e4>=e?Zl:e}get isEnabled(){let e=o?.protocol;if(e!==`http:`&&e!==`https:`)return Xl.info(`Web Vitals are disabled on non-http/https protocols`),!1;let t=k(this.jv)?this.jv.web_vitals:ne(this.jv)?this.jv:void 0;return ne(t)?t:this.bv}startIfEnabled(){this.isEnabled&&!this._o&&(Xl.info(`enabled, starting...`),this.qo(this.Nv))}onRemoteConfig(e){if(!e.ok)return;let t=e.config;if(!(`capturePerformance`in t))return;let n=k(t.capturePerformance)&&!!t.capturePerformance.web_vitals,r=k(t.capturePerformance)?t.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[Fr]:n}),this._instance.persistence.register({[zr]:r})),this.bv=n,this.startIfEnabled()}get qv(){return this.useSoftNavs?this.useAttribution?`web-vitals-with-attribution-soft-navs`:`web-vitals-soft-navs`:this.useAttribution?`web-vitals-with-attribution`:`web-vitals`}qo(e){var t;let n=m.__PosthogExtensions__,r=this.qv,i=n?.postHogWebVitalsCallbacksByFlavor;i?.[r]||r===`web-vitals`&&j(i)&&n?.postHogWebVitalsCallbacks?e():n==null||(t=n.loadExternalDependency)==null||t.call(n,this._instance,r,t=>{t?Xl.error(`failed to load script`,t):e()})}Dv(e){let t=e||n?.location.href;if(!t)return void Xl.error(`Could not determine current URL`);let r=this._instance.config.disable_capture_url_hashes?At(t):t,i=this._instance.config.custom_personal_data_properties;return qo(r,this._instance.config.mask_personal_data_properties?[...Zo,...i||[]]:[],$o)}}},sd={exceptionObserver:class{constructor(e){this.Nv=()=>{if(!n||!this.isEnabled||!m.__PosthogExtensions__?.errorWrappingFunctions)return;let e=m.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,t=m.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,r=m.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.Bv&&this.Ir.capture_unhandled_errors&&(this.Bv=e(this.captureException.bind(this))),!this.Hv&&this.Ir.capture_unhandled_rejections&&(this.Hv=t(this.captureException.bind(this))),!this.zv&&this.Ir.capture_console_errors&&(this.zv=r(this.captureException.bind(this)))}catch(e){Gl.error(`failed to start`,e),this.Uv()}},this._instance=e,this.Wv=!!this._instance.persistence?.props[Mr],this.wt=new _e(R(R({},function(e={}){return{refillRate:e.exceptionRateLimiterRefillRate??e.__exceptionRateLimiterRefillRate??1,bucketSize:e.exceptionRateLimiterBucketSize??e.__exceptionRateLimiterBucketSize??10}}(this._instance.config.error_tracking)),{},{refillInterval:1e4,$:Gl})),this.Ir=this.Vv(),this.startIfEnabledOrStop()}Vv(){let e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return k(e)?t=R(R({},t),e):(j(e)?this.Wv:e)&&(t=R(R({},t),{},{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t}get isEnabled(){return this.Ir.capture_console_errors||this.Ir.capture_unhandled_errors||this.Ir.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(Gl.info(`enabled`),this.Uv(),this.qo(this.Nv)):this.Uv()}qo(e){var t,n;m.__PosthogExtensions__?.errorWrappingFunctions?e():(t=m.__PosthogExtensions__)==null||(n=t.loadExternalDependency)==null||n.call(t,this._instance,`exception-autocapture`,t=>{if(t)return Gl.error(`failed to load script`,t);e()})}Uv(){var e,t,n;(e=this.Bv)==null||e.call(this),this.Bv=void 0,(t=this.Hv)==null||t.call(this),this.Hv=void 0,(n=this.zv)==null||n.call(this),this.zv=void 0}onRemoteConfig(e){if(!e.ok)return;let t=e.config;`autocaptureExceptions`in t&&(this.Wv=!!t.autocaptureExceptions||!1,this._instance.persistence&&this._instance.persistence.register({[Mr]:this.Wv}),this.Ir=this.Vv(),this.startIfEnabledOrStop())}onConfigChange(){this.Ir=this.Vv()}captureException(e){try{var t,n;let r=(e==null||(t=e.$exception_list)==null||(t=t[0])==null?void 0:t.type)??`Exception`;if(this.wt.consumeRateLimit(r))return void Gl.info(`Skipping exception capture because of client rate limiting.`,{exception:r});(n=this._instance.exceptions)==null||n.sendExceptionEvent(e)}catch{}}},exceptions:class{constructor(e){this.Gv=[],this.Zv=new Ht([new un,new bn,new fn,new dn,new vn,new _n,new mn,new yn],function(e,...t){return(n,r=0)=>{let i=[],a=n.split(`
2`),o=Math.min(a.length,r+1e3),s=[];for(let n=r;o>n;n++){let r=a[n];if(r.length>1024)continue;let o=tn.test(r)?r.replace(tn,`$1`):r;if(!o.match(/\S*Error: /)){for(let n of t){let t=n(o,e);if(t){i.push(t);let e=rn(i);if(e){for(let t=s.length-1;t>=0;t--){let n=s[t];if(e.start>=n.start+n.length)break;s.pop()}s.push(e)}break}}if(cn(i,s)>=50)break}}let c=[...s].sort((e,t)=>
2t.start-e.start),l=c[c.length-1];if(l){let e=on(i,l);i.splice(l.start-e,e);for(let t of c)t.start-=e}for(let e of c)an(i,e);return s.some(e=>e.start===0&&i.length===e.length)&&function(e){let t=e.map(e=>`${e.function}|${e.filename}|${e.lineno}|${e.colno}|${e.module}`),n=0;for(let e=1;t.length>e;e++)ln(t,e,n)&&(n=e);e.push(...e.splice(0,n))}(i),function(e){if(!e.length)return[];let t=Array.from(e);return t.reverse(),t.slice(0,50).map(e=>{return R(R({},e),{},{filename:e.filename||(n=t,n[n.length-1]||{}).filename,function:e.function||`?`});var n})}(i)}}(`web:javascript`,Zt,en)),this._instance=e,this.Gv=this._instance.persistence?.get_property(`$error_tracking_suppression_rules`)??[],this.Qv=Tn(this.Jv()),this.Kv=new En(this.Qv)}onConfigChange(){this.Qv=Tn(this.Jv()),this.Kv.setConfig(this.Qv)}onRemoteConfig(e){if(!e.ok)return;let t=e.config;if(!(`errorTracking`in t))return;let n=t.errorTracking?.suppressionRules??[],r=t.errorTracking?.captureExtensionExceptions;this.Gv=n,this._instance.persistence&&this._instance.persistence.register({[Nr]:this.Gv,[Pr]:r})}get Xv(){var e;let t=!!this._instance.get_property(Pr);return(e=this._instance.config.error_tracking.captureExtensionExceptions??t)!=null&&e}buildProperties(e,t){return this.Zv.buildFromUnknown(e,{syntheticException:t?.syntheticException,mechanism:{handled:t?.handled}})}addExceptionStep(e,t){if(this.Qv.enabled)try{if(!M(e)||e.trim().length===0)return void Pu.warn(`Ignoring exception step because message must be a non-empty string`);let{sanitizedProperties:n,droppedKeys:r}=function(e){if(!e)return{sanitizedProperties:{},droppedKeys:[]};let t=[];return{sanitizedProperties:Object.keys(e).reduce((n,r)=>Cn.has(r)?(t.push(r),n):(n[r]=e[r],n),{}),droppedKeys:t}}(this.Yv(t));r.length>0&&Pu.warn(`Ignoring reserved exception step fields`,{droppedKeys:r}),this.Kv.add(R({[xn]:e,[Sn]:new Date().toISOString()},n))}catch(e){Pu.error(`Failed to add exception step. Ignoring breadcrumb.`,e)}}sendExceptionEvent(e){try{let t=e.$exception_list;if(this.tf(t)){if(this.ef(t))return this.if(`Exception dropped: matched a suppression rule`),void Pu.info(`Skipping exception capture because a suppression rule matched`);if(!this.Xv&&this.nf(t))return this.if(`Exception dropped: thrown by a browser extension`),void Pu.info(`Skipping exception capture because it was thrown by an extension`);if(!this.Xv&&this.sf(t))return this.if(`Exception dropped: thrown by an injected browser script`),void Pu.info(`Skipping exception capture because it was thrown by an injected browser script`);if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.rf(t))return this.if(`Exception dropped: thrown by the PostHog SDK`),void Pu.info(`Skipping exception capture because it was thrown by the PostHog SDK`)}let n=this.Qv.enabled&&F(e.$exception_steps)?this.lf(e):e,r=function(){let e=globalThis._posthogReleaseId;return typeof e==`string`&&e.length>0?e:void 0}();r&&(n.$release_id=r);try{let e=this._instance.capture(`$exception`,n,{_noTruncate:!0,_batchKey:`exceptionEvent`,ah:!0});return e&&this.Kv.clear(),e}catch(e){Nu(e)||Pu.error(`Failed to capture exception event. Dropping this exception.`,e),this.Kv.clear();return}}catch(e){Nu(e)||Pu.error(`Failed to process exception event. Ignoring this exception.`,e);return}}lf(e){try{let t=this.Kv.getAttachable();return t.length===0?e:R(R({},e),{},{$exception_steps:t})}catch(t){return Pu.error(`Failed to read buffered exception steps. Capturing exception without steps.`,t),e}}if(e){this.Qv.enabled&&this.Kv.add({[xn]:e,[Sn]:new Date().toISOString()})}Yv(e){return k(e)?R({},e):{}}Jv(){return this._instance.config.error_tracking?.exception_steps??{}}ef(e){if(e.length===0)return!1;try{let t=e.reduce((e,{type:t,value:n})=>(M(t)&&t.length>0&&e.$exception_types.push(t),M(n)&&n.length>0&&e.$exception_values.push(n),e),{$exception_types:[],$exception_values:[]});return this.Gv.some(e=>{let n=e.values.map(e=>{let n=el[e.operator],r=t[e.key];if(!n||!r)return!1;let i=D(e.value)?e.value:[e.value];return i.length>0&&n(i,r)});return e.type===`OR`?n.some(Boolean):n.every(Boolean)})}catch(e){return Pu.warn(`Failed to evaluate suppression rules. Capturing the exception.`,e),!1}}nf(e){let t=e.flatMap(e=>e.stacktrace?.frames??[]),n=t.filter(({filename:e})=>!!e&&Lu.some(t=>e.startsWith(t)));return n.length!==0&&(!n.every(({filename:e})=>!!e&&e.startsWith(Fu))||e.some(({type:e,value:t})=>e===`NoResponse`||M(t)&&Iu.some(({value:e,exact:n})=>n?t===e:t.includes(e)))&&!t.some(({in_app:e,filename:t})=>e&&!t?.startsWith(Fu)))}sf(e){return e.some(({value:e})=>M(e)&&Ru.some(t=>e.includes(t)))}rf(e){if(e.length>0){var t,n;let r=e[0].stacktrace?.frames??[],i=r[r.length-1];return(t=i==null||(n=i.filename)==null?void 0:n.includes(`posthog.com/static`))!=null&&t}return!1}tf(e){return!F(e)&&D(e)}}},cd=R({productTours:class{get Ca(){return this._instance.persistence}constructor(e){this.af=null,this.uf=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!e.ok)return;let t=e.config;if(`productTours`in t){var n;if(this.Ca&&this.Ca.register({[Lr]:!!t.productTours}),!su(this._instance))return!this.af&&F(this.Ca?.props.ph_product_tours)||ou.info(`product tours disabled; stopping and clearing cached tours`),(n=this.af)==null||n.stop(),this.af=null,void this.clearCache();this.loadIfEnabled()}}loadIfEnabled(){!this.af&&su(this._instance)&&this.qo(()=>this.hf())}qo(e){var t,n;m.__PosthogExtensions__?.generateProductTours?e():(t=m.__PosthogExtensions__)==null||(n=t.loadExternalDependency)==null||n.call(t,this._instance,`product-tours`,t=>{t?ou.error(`Could not load product tours script`,t):e()})}hf(){var e;!this.af&&(e=m.__PosthogExtensions__)!=null&&e.generateProductTours&&(this.af=m.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(e,t=!1){if(D(this.uf)&&!t)return void e(this.uf,{isLoaded:!0});let n=this.Ca;if(n){let r=n.props[_i];if(D(r)&&!t)return this.uf=r,void e(r,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor(`api`,`/api/product_tours/?token=${this._instance.config.token}`),method:`GET`,timestampMode:`query`,callback:t=>{if(!su(this._instance))return void e([],{isLoaded:!0});let r=t.statusCode;if(r!==200||!t.json){let n=`Product Tours API could not be loaded, status: ${r}`;r===0?t.error||ou.warn(n):ou.error(n),e([],{isLoaded:!1,error:n});return}let i=D(t.json.product_tours)?t.json.product_tours:[];this.uf=i,n&&n.register({[_i]:i}),e(i,{isLoaded:!0})}})}getActiveProductTours(e){F(this.af)?e([],{isLoaded:!1,error:`Product tours not loaded`}):this.af.getActiveProductTours(e)}showProductTour(e){var t;(t=this.af)==null||t.showTourById(e)}previewTour(e){this.af?this.af.previewTour(e):this.qo(()=>{var t;this.hf(),(t=this.af)==null||t.previewTour(e)})}dismissProductTour(){var e;(e=this.af)==null||e.dismissTour(`user_clicked_skip`)}nextStep(){var e;(e=this.af)==null||e.nextStep()}previousStep(){var e;(e=this.af)==null||e.previousStep()}clearCache(){var e;this.uf=null,(e=this.Ca)==null||e.unregister(`ph_product_tours`)}resetTour(e){var t;(t=this.af)==null||t.resetTour(e)}resetAllTours(){var e;(e=this.af)==null||e.resetAllTours()}cancelPendingTour(e){var t;(t=this.af)==null||t.cancelPendingTour(e)}}},id),ld={siteApps:class{constructor(e){this._instance=e,this.cf=0,this.df=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}vf(e,t){if(!t)return;let n=this.globalsForEvent(t);this.df.push(n),this.df.length>1e3&&(this.df=this.df.slice(10))}get siteAppLoaders(){var e;return(e=m._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.siteApps}initialize(){if(this.isEnabled){let e=this._instance._addCaptureHook(this.vf.bind(this));this.ff=()=>{e(),this.df=[],this.ff=void 0}}}globalsForEvent(e){if(!e)throw Error(`Event payload is required`);let t={},n=this._instance.get_property(`$groups`)||[],r=this._instance.get_property(`$stored_group_properties`)||{};for(let[e,i]of Object.entries(r))t[e]={id:n[e],type:e,properties:i};let{$set_once:i,$set:a}=e;return{event:R(R({},Vn(e,cu)),{},{properties:R(R(R({},e.properties),a?{$set:R(R({},e.properties?.$set??{}),a)}:{}),i?{$set_once:R(R({},e.properties?.$set_once??{}),i)}:{}),elements_chain:e.properties?.$elements_chain??``,distinct_id:e.properties?.distinct_id}),person:{properties:this._instance.get_property(`$stored_person_properties`)},groups:t}}pf(e){let t=e.tagName?.toLowerCase();
2return t===`style`&&this._instance.config.prepare_external_dependency_stylesheet?this._instance.config.prepare_external_dependency_stylesheet(e)||(lu.error(`prepare_external_dependency_stylesheet returned null`),null):t===`script`&&this._instance.config.prepare_external_dependency_script?this._instance.config.prepare_external_dependency_script(e)||(lu.error(`prepare_external_dependency_script returned null`),null):e}gf(){var e;if(!this._instance.config.prepare_external_dependency_stylesheet&&!this._instance.config.prepare_external_dependency_script)return()=>{};let t=a?.defaultView,n=t==null||(e=t.Node)==null?void 0:e.prototype;if(!t||!n)return()=>{};if(this.cf++,this.mf)return this.yf();let r=[],i=this,o=new WeakSet,s=(e,t,n)=>{if(!e?.[t])return;let i=e[t];e[t]=n(i),r.push(()=>{e[t]=i})},c=e=>{if(o.has(e))return e;let t=i.pf(e);return t&&o.add(t),t},l=e=>e.map(e=>typeof e==`string`?e:c(e)).filter(e=>!P(e));return s(n,`appendChild`,e=>function(t){let n=c(t);return n?e.call(this,n):t}),s(n,`insertBefore`,e=>function(t,n){let r=c(t);return r?e.call(this,r,n):t}),s(n,`replaceChild`,e=>function(t,n){let r=c(t);return r?e.call(this,r,n):n}),[t.Element?.prototype,t.Document?.prototype,t.DocumentFragment?.prototype].forEach(e=>{s(e,`append`,e=>function(...t){return e.apply(this,l(t))}),s(e,`prepend`,e=>function(...t){return e.apply(this,l(t))})}),[t.Element?.prototype,t.CharacterData?.prototype,t.DocumentType?.prototype].forEach(e=>{s(e,`before`,e=>function(...t){return e.apply(this,l(t))}),s(e,`after`,e=>function(...t){return e.apply(this,l(t))}),s(e,`replaceWith`,e=>function(...t){let n=l(t);return t.length&&!n.length?void 0:e.apply(this,n)})}),s(t.Element?.prototype,`insertAdjacentElement`,e=>function(t,n){let r=c(n);return r?e.call(this,t,r):null}),this.mf=()=>{r.forEach(e=>e()),this.mf=void 0},this.yf()}yf(){let e=!1;return()=>{var t;e||(e=!0,this.cf--,this.cf===0&&((t=this.mf)==null||t.call(this)))}}bf(e,t=!0){let n=this.gf();try{let r=e(n);return t&&n(),r}catch(e){throw n(),e}}setupSiteApp(e){let t=this.apps[e.id],n=()=>{var n;!t.errored&&this.df.length&&(lu.info(`Processing ${this.df.length} events for site app with id ${e.id}`),this.df.forEach(e=>this.bf(()=>t.processEvent?.call(t,e))),t.processedBuffer=!0),Object.values(this.apps).every(e=>e.processedBuffer||e.errored)&&((n=this.ff)==null||n.call(this))},r=!1,i=i=>{t.errored=!i,t.loaded=!0,lu.info(`Site app with id ${e.id} ${i?`loaded`:`errored`}`),r&&n()};try{let{processEvent:n}=this.bf(t=>e.init({posthog:this._instance,callback(e){t(),i(e)}}),!1);n&&(t.processEvent=n),r=!0}catch(t){lu.error(uu+e.id,t),i(!1)}if(r&&t.loaded)try{n()}catch(n){lu.error(`Error while processing buffered events PostHog app with config id ${e.id}`,n),t.errored=!0}}_f(){let e=this.siteAppLoaders||[];for(let t of e)this.apps[t.id]={id:t.id,loaded:!1,errored:!1,processedBuffer:!1};for(let t of e)this.setupSiteApp(t)}wf(e){if(Object.keys(this.apps).length===0)return;let t=this.globalsForEvent(e);for(let n of Object.values(this.apps))try{this.bf(()=>n.processEvent?.call(n,t))}catch(t){lu.error(`Error while processing event ${e.event} for site app ${n.id}`,t)}}onRemoteConfig(e){var t;if(this.siteAppLoaders?.length)return this.isEnabled?(this._f(),void this._instance.on(`eventCaptured`,e=>this.wf(e))):void lu.error(`PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.`);if((t=this.ff)==null||t.call(this),!e.ok)return;let n=e.config;if(n.siteApps?.length){if(this.isEnabled)for(let{id:e,url:t}of n.siteApps){var r,i;m[`__$$ph_site_app_${e}`]=this._instance,(r=m.__PosthogExtensions__)==null||(i=r.loadSiteApp)==null||i.call(r,this._instance,t,t=>{if(t)return lu.error(uu+e,t)})}else lu.error(`PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.`)}}}},ud={tracingHeaders:class{constructor(e){this._instance=e,this.kf=void 0,this.Sf=void 0,this.xf=void 0,this.Nv=()=>{let e=this.Cf();var t,n;e?(j(this.kf)&&(this.kf=(t=m.__PosthogExtensions__)==null||(t=t.tracingHeadersPatchFns)==null?void 0:t._patchXHR(e,()=>this._instance.get_distinct_id(),this._instance.sessionManager)),j(this.Sf)&&(this.Sf=(n=m.__PosthogExtensions__)==null||(n=n.tracingHeadersPatchFns)==null?void 0:n._patchFetch(e,()=>this._instance.get_distinct_id(),this._instance.sessionManager))):this.Uv()}}initialize(){this.startIfEnabledOrStop()}qo(e){var t,n;m.__PosthogExtensions__?.tracingHeadersPatchFns?e():(t=m.__PosthogExtensions__)==null||(n=t.loadExternalDependency)==null||n.call(t,this._instance,`tracing-headers`,t=>{if(t)return Yl.error(`failed to load script`,t);
2e()})}$f(){return this._instance.config.tracing_headers??this._instance.config.addTracingHeaders??this._instance.config.__add_tracing_headers}Cf(){let e=this.$f();return D(e)?(D(this.xf)?this.xf.splice(0,this.xf.length,...e):this.xf=[...e],e.length>0?this.xf:void 0):(D(this.xf)&&this.xf.splice(0),this.xf=e||void 0,this.xf)}Uv(){var e,t;(e=this.kf)==null||e.call(this),(t=this.Sf)==null||t.call(this),this.kf=void 0,this.Sf=void 0}startIfEnabledOrStop(){this.Cf()?this.qo(this.Nv):this.Uv()}}},dd=R({surveys:class extends mu{constructor(e){var t;super(new bu(e),(t=e,{get projectToken(){return t.config.token},kv:new yu(t)})),this._instance=e}Oh(e,t){let n=t.query?Cc(e,t.query):e;return new Promise(e=>{this._instance._send_request({method:t.method,url:this._instance.requestRouter.endpointFor(t.target??`api`,n),data:t.body,headers:t.headers,timeout:t.timeoutMs,fireCallbackOnDrop:!0,transport:t.transport,compression:t.compression,timestampMode:t.sentAt,callback:e})})}}},id),fd={toolbar:class{constructor(e){this.instance=e}If(e){m.ph_toolbar_state=e}Tf(){return m.ph_toolbar_state??0}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(e=void 0,t=void 0,r=void 0){if(ma(this.instance.config)||!n||!a)return!1;e??=n.location,r??=n.history;try{if(!t){try{n.localStorage.setItem(`test`,`test`),n.localStorage.removeItem(`test`)}catch{return!1}t=n?.localStorage}let i=xu||Jo(e.hash,`__posthog`)||Jo(e.hash,`state`),a,o=i?jt(()=>JSON.parse(atob(decodeURIComponent(i))))||jt(()=>JSON.parse(decodeURIComponent(i))):null;return o&&o.action===`ph_authorize`?(a=o,a.source=`url`,a&&Object.keys(a).length>0&&(o.desiredHash?e.hash=o.desiredHash:r?r.replaceState(r.state,``,e.pathname+e.search):e.hash=``)):(a=JSON.parse(t.getItem(Su)||`{}`),a.source=`localstorage`,delete a.userIntent),!(!a.token||this.instance.config.token!==a.token||(this.loadToolbar(a),0))}catch{return!1}}Mf(e){let t=m.ph_load_toolbar||m.ph_load_editor;!F(t)&&O(t)?t(e,this.instance):Cu.warn(`No toolbar load function found`)}loadToolbar(e){let t=!!a?.getElementById(`__POSTHOG_TOOLBAR__`);if(!n||t)return!1;let r=this.instance.requestRouter.region===`custom`&&this.instance.config.advanced_disable_toolbar_metrics,i=R(R({token:this.instance.config.token},e),{},{apiURL:this.instance.requestRouter.endpointFor(`ui`)},r?{instrument:!1}:{});if(n.localStorage.setItem(Su,JSON.stringify(R(R({},i),{},{source:void 0}))),this.Tf()===2)this.Mf(i);else if(this.Tf()===0){var o,s;this.If(1),(o=m.__PosthogExtensions__)==null||(s=o.loadExternalDependency)==null||s.call(o,this.instance,`toolbar`,e=>{if(e)return Cu.error(`[Toolbar] Failed to load`,e),void this.If(0);this.If(2),this.Mf(i)}),pa(n,`turbolinks:load`,()=>{this.If(0),this.loadToolbar(i)})}return!0}Ef(e){return this.loadToolbar(e)}maybeLoadEditor(e=void 0,t=void 0,n=void 0){return this.maybeLoadToolbar(e,t,n)}}},pd=R({experiments:class e{get Ir(){return this._instance.config}constructor(t){this._instance=t,this.getWebExperimentsAndEvaluateDisplayLogic=(t=!1)=>{this.getWebExperiments(t=>{e.Pf(`retrieved web experiments from the server`),this.Rf=new Map,t.forEach(t=>{if(t.feature_flag_key){var n;this.Rf&&(e.Pf(`setting flag key `,t.feature_flag_key,` to web experiment `,t),(n=this.Rf)==null||n.set(t.feature_flag_key,t));let r=this._instance.getFeatureFlag(t.feature_flag_key);M(r)&&t.variants[r]&&this.Af(t.name,r,t.variants[r].transforms)}else if(t.variants)for(let n in t.variants){let r=t.variants[n];e.Ff(r,this._instance)&&this.Af(t.name,n,r.transforms)}})},t)},this._instance.onFeatureFlags(e=>{this.onFeatureFlags(e)})}initialize(){}onFeatureFlags(t){if(this._is_bot())e.Pf(zu);else if(!this.Ir.disable_web_experiments){if(F(this.Rf))return this.Rf=new Map,this.loadIfEnabled(),void this.previewWebExperiment();e.Pf(`applying feature flags`,t),t.forEach(e=>{if(this.Rf&&this.Rf?.has(e)){let t=this._instance.getFeatureFlag(e),n=this.Rf?.get(e);t&&n!=null&&n.variants[t]&&this.Af(n.name,t,n.variants[t].transforms)}})}}previewWebExperiment(){let t=e.getWindowLocation();if(t?.search){let n=Ko(t?.search,`__experiment_id`),r=Ko(t?.search,`__experiment_variant`);n&&r&&(e.Pf(`previewing web experiments ${n} && ${r}`),this.getWebExperiments(e=>{this.Of(parseInt(n),r,e)},!1,!0))}}loadIfEnabled(){this.Ir.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}
2getWebExperiments(e,t,n){if(this.Ir.disable_web_experiments&&!n)return e([]);let r=this._instance.get_property(`$web_experiments`);if(r&&!t)return e(r);this._instance._send_request({url:this._instance.requestRouter.endpointFor(`api`,`/api/web_experiments/?token=${this.Ir.token}`),method:`GET`,timestampMode:`query`,callback:t=>e(t.statusCode===200&&t.json&&t.json.experiments||[])})}Of(t,n,r){let i=r.filter(e=>e.id===t);i&&i.length>0&&(e.Pf(`Previewing web experiment [${i[0].name}] with variant [${n}]`),this.Af(i[0].name,n,i[0].variants[n].transforms))}static Ff(t,n){return!F(t.conditions)&&e.Df(t,n)&&e.Lf(t)}static Df(t,n){if(F(t.conditions)||F(t.conditions?.url))return!0;let r=e.getWindowLocation();if(r){let e=Wa(n,r.href);return!t.conditions?.url||Bu[t.conditions?.urlMatchType??`icontains`](t.conditions.url,e)}return!1}static getWindowLocation(){return n?.location}static Lf(e){if(F(e.conditions)||F(e.conditions?.utm))return!0;let t=ts();if(t.utm_source){var n,r,i,a,o,s,c,l;let u=!((n=e.conditions)!=null&&(n=n.utm)!=null&&n.utm_campaign)||((r=e.conditions)==null||(r=r.utm)==null?void 0:r.utm_campaign)==t.utm_campaign,d=!((i=e.conditions)!=null&&(i=i.utm)!=null&&i.utm_source)||((a=e.conditions)==null||(a=a.utm)==null?void 0:a.utm_source)==t.utm_source,f=!((o=e.conditions)!=null&&(o=o.utm)!=null&&o.utm_medium)||((s=e.conditions)==null||(s=s.utm)==null?void 0:s.utm_medium)==t.utm_medium,p=!((c=e.conditions)!=null&&(c=c.utm)!=null&&c.utm_term)||((l=e.conditions)==null||(l=l.utm)==null?void 0:l.utm_term)==t.utm_term;return u&&f&&p&&d}return!1}static Pf(e,...t){z.info(`[WebExperiments] ${e}`,t)}Af(t,n,r){this._is_bot()?e.Pf(zu):n===`control`?e.Pf(`Control variants leave the page unmodified.`):r.forEach(r=>{r.selector&&(e.Pf(`applying transform of variant ${n} for experiment ${t} `,r),(document?.querySelectorAll(r.selector))?.forEach(e=>{let t=e;r.html&&(t.innerHTML=r.html),r.css&&t.setAttribute(`style`,r.css)}))})}_is_bot(){return i&&this._instance?Jc(i,this.Ir.custom_blocked_useragents):void 0}}},id),md={conversations:class{constructor(e){this._instance=e,this.Nf=void 0,this._conversationsManager=null,this.qf=!1,this.ne=null,this.jf=!1}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(this._instance.config.disable_conversations||(this.Bf=e.ok,!e.ok))return;let t=e.config.conversations;F(t)||(ne(t)?this.Nf=t:(this.Nf=t.enabled,this.ne=t),this.loadIfEnabled())}reset(){var e;(e=this._conversationsManager)==null||e.reset(),this._conversationsManager=null,this.Nf=void 0,this.ne=null,this.Bf=void 0,this.jf=!1}loadIfEnabled(){if(this._conversationsManager||this.qf||this._instance.config.disable_conversations||ma(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())return;let e=m?.__PosthogExtensions__;if(e&&!j(this.Nf)&&this.Nf){if(this.ne&&this.ne.token){this.qf=!0;try{let t=e.initConversations;if(t)return this.Hf(t),void(this.qf=!1);let n=e.loadExternalDependency;if(!n)return void this.zf(Ji);n(this._instance,`conversations`,t=>{t||!e.initConversations?this.zf(`Could not load conversations script`,t):this.Hf(e.initConversations),this.qf=!1})}catch(e){this.zf(`Error initializing conversations`,e),this.qf=!1}}else Vu.error(`Conversations enabled but missing token in remote config.`)}}Hf(e){if(this.ne)try{this._conversationsManager=e(this.ne,this._instance),this.jf=!1,Vu.info(`Conversations loaded successfully`)}catch(e){this.zf(`Error completing conversations initialization`,e)}else Vu.error(`Cannot complete initialization: remote config is null`)}zf(e,t){Vu.error(e,t),this._conversationsManager=null,this.qf=!1,this.jf=!0}show(){this._conversationsManager?this._conversationsManager.show():Vu.warn(`Conversations not loaded yet.`)}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return!0===this.Nf&&!P(this._conversationsManager)}getUnavailableReason(){return this.isAvailable()?null:this._instance.config.disable_conversations?`disabled_by_config`:ma(this._instance.config)?`disabled_for_toolbar`:this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut()?`consent_opted_out`:!1===this.Bf?`remote_config_failed`:j(this.Nf)?this.Bf?`disabled_in_project`:`remote_config_pending`:this.Nf?F(this.ne)||!this.ne.token?`missing_token`:m?.__PosthogExtensions__?this.qf?`initializing`:this.jf?`load_failed`:`not_loaded`:`extensions_unavailable`:`disabled_in_project`}isVisible(){var e;return(e=this._conversationsManager?.isVisible())!=null&&e}sendMessage(e,t,n){var r=this;return pe(function*(){return r._conversationsManager?r._conversationsManager.sendMessage(e,t,n):(Vu.warn(Hu),null)})()}getMessages(e,t){var n=this;return pe(function*(){return n._conversationsManager?n._conversationsManager.getMessages(e,t):(Vu.warn(Hu),null)})()}markAsRead(e){var t=this;return pe(function*(){return t._conversationsManager?t._conversationsManager.markAsRead(e):(Vu.warn(Hu),null)})()}getTickets(e){var t=this;return pe(function*(){return t._conversationsManager?t._conversationsManager.getTickets(e):(Vu.warn(Hu),null)})()}requestRestoreLink(e){var t=this;return pe(function*(){return t._conversationsManager?t._conversationsManager.requestRestoreLink(e):(Vu.warn(Hu),null)})()}restoreFromToken(e){var t=this;return pe(function*(){return t._conversationsManager?t._conversationsManager.restoreFromToken(e):(Vu.warn(Hu),null)})()}restoreFromUrlToken(){var e=this;return pe(function*(){return e._conversationsManager?e._conversationsManager.restoreFromUrlToken():(Vu.warn(Hu),null)})()}getCurrentTicketId(){return this._conversationsManager?.getCurrentTicketId()??null}getWidgetSessionId(){return this._conversationsManager?.getWidgetSessionId()??null}bh(){var e;(e=this._conversationsManager)==null||e.setIdentity()}_h(){var e;(e=this._conversationsManager)==null||e.clearIdentity()}}},hd={logs:class{constructor(e){var t;this._instance=e,this.name=`logs`,this.Uf=!1,this.Wf=!1,this.Vf=!1,this.$=fr(`[logs]`),this.Gf=R(R({},this.$),{},{error:(...e)=>{e.some(Yu)||this.$.error(...e)}}),this.na=[],this.Zf=[],this.od=0,this.xo=!1,this.Qf=[],this.Jf=[],this.Kf=!1,this.Xf=!1,this.Yf=()=>{var e,t;this.xo||(this.od=0,(e=this.tp)==null||e.onReconnect(),(t=this.ep)==null||t.onReconnect())},this._instance&&(t=this._instance.config.logs)!=null&&t.captureConsoleLogs&&(this.Uf=!0),n&&pa(n,`online`,this.Yf)}np(e,t,n,r){var i;let a=Uu((i=this._instance)==null||(i=i.config)==null?void 0:i.logs,n);return[new or(this.sp(e,t),a,this.Gf,()=>this.rp(),e=>e(),void 0,r),a]}op(){var e;let t=(e=this._instance)==null||(e=e.config)==null?void 0:e.logs;var n;return this.tp&&this.lp===t||((n=this.tp)==null||n.reset(),this.lp=t,[this.tp,this.ap]=this.np(()=>this.na,e=>{this.na=e})),this.tp}up(){var e;let t=(e=this._instance)==null||(e=e.config)==null?void 0:e.logs;var n;return this.ep&&this.hp===t||((n=this.ep)==null||n.reset(),this.hp=t,[this.ep,this.cp]=this.np(()=>this.Zf,e=>{this.Zf=e},{serviceNameDefault:`posthog-browser-logs`,consoleCapture:!0},Ku)),this.ep}setup(e){var t;if(this.xo)return;this.mo=e,(t=this._instance)!=null&&(t=t.config)!=null&&(t=t.logs)!=null&&t.captureConsoleLogs&&(this.Uf=!0),(this.Uf||this.dp()&&this.vp())&&this.fp();let n=!1,r=e.onRemoteConfig(e=>{n=e.ok&&!0===e.config.logs?.captureConsoleLogs,this.onRemoteConfig(e)});this.xo?r.dispose():(this.Io=r,n||this.loadIfEnabled())}dispose(){var e,t,r,i;this.xo||(this.xo=!0,this.pp(),(e=this.Io)==null||e.dispose(),this.Io=void 0,this.mo=void 0,this.Vf=!1,n?.removeEventListener(`online`,this.Yf),(t=this.gp)==null||t.call(this),this.gp=void 0,(r=this.tp)==null||r.reset(),(i=this.ep)==null||i.reset())}onRemoteConfig(e){var t;if(this.xo)return;let n=e.ok?e.config.logs?.captureConsoleLogs:void 0;F(n)?this.mp():((t=this._instance)==null||(t=t.persistence)==null||t.register({$logs_capture_enabled_server_side:!!n}),n?(this.Uf=!0,this.Wf||this.fp(),this.loadIfEnabled()):this.mp())}reset(){var e,t,n,r;this.pp(),(e=this.tp)==null||e.clearQueue(),this.na=[],(t=this.tp)==null||t.reset(),(n=this.ep)==null||n.clearQueue(),this.Zf=[],(r=this.ep)==null||r.reset(),this.od=0}captureLog(e){this.xo||this.op().captureLog(e)}captureConsoleLog(e){this.xo||this.up().captureLog(e)}captureBufferedConsoleLog(e,t,n){this.xo||this.up().captureLog(e,{context:t,occurredAtMs:n})}vp(){var e;return!!((e=this._instance)!=null&&(e=e.persistence)!=null&&(e=e.props)!=null&&e[Rr])}dp(){var e,t,n;return!((e=this._instance)!=null&&(t=e.Yl)!=null&&t.call(e))||!!((n=m._POSTHOG_REMOTE_CONFIG)!=null&&(n=n[this._instance.config.token])!=null&&n.config)}kh(){var e;this.pp(),(e=this.ep)==null||e.clearQueue(),this.Zf=[]}mp(){this.Uf||this.pp()}fp(){var e;if(this.Kf||!m?.console)return;let t=Uu((e=this._instance)==null||(e=e.config)==null?void 0:e.logs).maxBufferSize,n=!0;this.Jf.push(()=>{n=!1});for(let e of Wu){let r;try{r=Gu(m.console[e])}catch{continue}r&&this.Jf.push(Jl(m.console,e,i=>{let a=(...r)=>{try{n&&this.yp(e,r,t)}catch{}return i.apply(m.console,r)};return a.__rrweb_original__=r,a}))}this.Kf=!0,this.bp=setTimeout(()=>{this.pp()},3e4)}yp(e,t,n){if(this.Kf&&!this.Xf&&t.length!==0){if(this._instance?.is_capturing()){if(n>this.Qf.length){this.Xf=!0;try{this.Qf.push({level:e,args:t,occurredAtMs:Date.now(),context:this.rp()})}finally{this.Xf=!1}}}else this.pp()}}pp(){if(this.Qf=[],this.Kf){this.Kf=!1,this.bp&&=(clearTimeout(this.bp),void 0);for(let e of this.Jf)e();this.Jf=[]}}_p(){let e=this.Qf;return this.pp(),e}get logger(){return this.wp||={trace:(e,t)=>this.captureLog({body:e,level:`trace`,attributes:t}),debug:(e,t)=>this.captureLog({body:e,level:`debug`,attributes:t}),info:(e,t)=>this.captureLog({body:e,level:`info`,attributes:t}),warn:(e,t)=>this.captureLog({body:e,level:`warn`,attributes:t}),error:(e,t)=>
2this.captureLog({body:e,level:`error`,attributes:t}),fatal:(e,t)=>this.captureLog({body:e,level:`fatal`,attributes:t})},this.wp}flushLogs(e){e?this.kp(e):(this.tp&&this.tp.flush().catch(e=>this.Sp(e)),this.ep&&this.ep.flush().catch(e=>this.Sp(e)))}Sp(e){Yu(e)||this.$.error(`PostHog logs flush failed:`,e)}loadIfEnabled(){if(this.xo||!this.Uf||this.Wf||this.Vf)return;let e=m?.__PosthogExtensions__;if(!e)return this.$.error(`PostHog Extensions not found.`),void this.pp();let t=e.loadExternalDependency;if(!t)return this.$.error(Ji),void this.pp();this.Vf=!0;try{t(this._instance,`logs`,t=>{if(this.Vf=!1,this.xo||!this.Uf)return;let n=e.logs;if(t||!n?.initializeLogs)this.$.error(`Could not load logs script`,t),this.pp();else{let e=this._p();var r;this.gp=n.initializeLogs(this.mo??this._instance),this.Wf=!0,e.length>0&&((r=n.replayConsoleBuffer)==null||r.call(n,this.mo??this._instance,e))}})}catch(e){throw this.Vf=!1,e}}sp(e,t){let n=this._instance;return{get isDisabled(){return!1},get optedOut(){return!n.is_capturing()},getPersistedProperty:t=>t===_.LogsQueue?e():void 0,setPersistedProperty(e,n){e===_.LogsQueue&&t(n??[])},js:e=>this.js(e),getLibraryId:()=>vr.LIB_NAME,getLibraryVersion:()=>vr.LIB_VERSION}}js(e){return new Promise(t=>{if(Yo(this.od,3))return void t({kind:`fatal`,error:Ju(void 0,`logs endpoint is unreachable, dropping batch`)});let n=!1,r=e=>{n||(n=!0,clearTimeout(i),t(e))},i=setTimeout(()=>{this.$.warn(`Logs request timed out before receiving a response`),r({kind:`retry-later`,error:Ju(void 0,`logs request timed out`)})},9e4);this._instance._send_request({method:`POST`,url:this.xp(),data:e,compression:`best-available`,batchKey:`logs`,fireCallbackOnDrop:!0,callback:e=>{let t=e.statusCode;this.Cp(t),t>=200&&300>t?r({kind:`ok`}):t===413?r({kind:`too-large`}):t!==0&&t!==408&&t!==429&&500>t?r({kind:`fatal`,error:Error(`logs request failed with status ${t}`)}):t===0?(e.error||this.$.warn(`Logs request failed before receiving an HTTP response`),r({kind:`retry-later`,error:Ju(e.error,`logs request failed before receiving an HTTP response`)})):r({kind:`retry-later`,error:e.error??Error(`logs request failed with status ${t}`)})}})})}Cp(e){(e!==0||this._instance.__loaded)&&(this.od=Xo(e,this.od,3,()=>this.$.warn(`Log requests are failing before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped sending logs; will try again when connectivity changes.`)))}kp(e){this.na.length>0&&this.$p(e,this.na,this.ap,vr.LIB_NAME,e=>{this.na=e}),this.Zf.length>0&&this.$p(e,this.Zf,this.cp,Ku,e=>{this.Zf=e})}$p(e,t,n,r,i){if(t.length===0)return;let a=t.map(e=>e.record);i([]);let o=nr(a,tr(n,vr.LIB_NAME,vr.LIB_VERSION),r,vr.LIB_VERSION);this._instance._send_request({method:`POST`,url:this.xp(),data:o,compression:`best-available`,batchKey:`logs`,transport:e})}xp(){return this._instance.requestRouter.endpointFor(`api`,`/i/v1/logs`)+`?token=`+encodeURIComponent(this._instance.config.token)}rp(){var e;let t={};if(t.distinctId=this._instance.get_distinct_id(),this._instance.sessionManager){let{sessionId:e,windowId:n,sessionStartTimestamp:r,lastActivityTimestamp:i}=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0);t.sessionId=e,t.windowId=n,F(r)||(t.sessionStartTimestamp=r),F(i)||(t.lastActivityTimestamp=i)}if(m!=null&&(e=m.location)!=null&&e.href&&(t.currentUrl=this._instance.config.disable_capture_url_hashes?At(m.location.href):m.location.href),this._instance.featureFlags){let e=this._instance.featureFlags.getFlags();e&&e.length>0&&(t.activeFeatureFlags=e)}return t}}},gd={metrics:class{constructor(e){this._instance=e,this.$=fr(`[metrics]`),this.xo=!1}initialize(){this.onConfigChange()}onConfigChange(){if(this.xo)return;let e=!!this._instance.config.metrics?.network;e&&!this.Ip?this.Ip=(e=>{let t=!0,n=()=>t?(e=>{let t=e.config.metrics?.network;return!0===t?{}:t||void 0})(e):void 0,r=nd(e,n),i=rd(e,n);return()=>{t=!1,r(),i()}})(this._instance):!e&&this.Ip&&(this.Ip(),this.Ip=void 0)}op(){var e;let t=(e=this._instance)==null||(e=e.config)==null?void 0:e.metrics;var n;return this.tp&&this.lp===t||((n=this.tp)==null||n.reset(),this.lp=t,this.tp=new ur(this.sp(),function(e){let t=e?.resourceAttributes;return{serviceName:t?.[`service.name`]??e?.serviceName,serviceVersion:t?.[`service.version`]??e?.serviceVersion,environment:t?.[`deployment.environment`]??e?.environment,resourceAttributes:t,beforeSend:e?.beforeSend,flushIntervalMs:e?.flushIntervalMs??1e4,maxSeriesPerFlush:e?.maxSeriesPerFlush??1e3}}(t),this.$)),this.tp}count(e,t=1,n){this.op().count(e,t,n)}
vendor: 9,245 bytes, line 2
2gauge(e,t,n){this.op().gauge(e,t,n)}histogram(e,t,n){this.op().histogram(e,t,n)}flush(e){if(!this.tp)return Promise.resolve();if(e){let t=this.tp.drainWindow();return t&&this.Ys(t,e),Promise.resolve()}return this.tp.flush().catch(e=>this.$.error(`PostHog metrics flush failed:`,e))}reset(){var e;(e=this.tp)==null||e.reset()}dispose(){var e,t;this.xo=!0,(e=this.Ip)==null||e.call(this),this.Ip=void 0,(t=this.tp)==null||t.reset()}sp(){let e=this._instance,t=this;return{get isDisabled(){return!1},get optedOut(){return!e.is_capturing()},Ys:e=>t.Ys(e),getLibraryId:()=>vr.LIB_NAME,getLibraryVersion:()=>vr.LIB_VERSION}}Ys(e,t){return new Promise(n=>{let r=!1,i=e=>{r||(r=!0,clearTimeout(a),n(e))},a=setTimeout(()=>i({kind:`retry-later`,error:Error(`metrics request timed out`)}),9e4);this._instance._send_request(R(R({method:`POST`,url:this.Tp(),data:e,compression:`best-available`,batchKey:`metrics`},t&&{transport:t}),{},{fireCallbackOnDrop:!0,callback(e){let t=e.statusCode;i(t>=200&&300>t?{kind:`ok`}:t===413?{kind:`too-large`}:t!==0&&t!==408&&t!==429&&500>t?{kind:`fatal`,error:Error(`metrics request failed with status ${t}`)}:{kind:`retry-later`,error:e.error??Error(`metrics request failed with status ${t}`)})}}))})}Tp(){return this._instance.requestRouter.endpointFor(`api`,`/i/v1/metrics`)+`?token=`+encodeURIComponent(this._instance.config.token)}}};Il.__defaultExtensionClasses=R({},R(R(R(R(R(R(R(R(R(R(R(R(R({},id),ad),od),sd),cd),ld),dd),ud),fd),pd),md),hd),gd));var _d=function(){vr.SDK_DIST_CHANNEL=`npm`;let e=yl[Al]=new Il;return function(){function e(){e.done||(e.done=!0,Ic=!1,aa(yl,function(e){e._dom_loaded()}))}a?.addEventListener?a.readyState===`complete`?e():pa(a,`DOMContentLoaded`,e,{capture:!1}):n&&z.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),e}(),vd=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function ee(e,t){return E(e.type,t,e.props)}function D(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function O(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var k=/\/+/g;function A(e,t){return typeof e==`object`&&e&&e.key!=null?O(``+e.key):t.toString(36)}function j(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function M(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,M(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+A(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(k,`$&/`)+`/`),M(o,r,i,``,function(e){return e})):o!=null&&(D(o)&&(o=ee(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(k,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+A(a,u),c+=M(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+A(a,u++),c+=M(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return M(j(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function N(e,t,n){if(e==null)return e;var r=[],i=0;return M(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function P(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var F=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},I={map:N,forEach:function(e,t,n){N(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return N(e,function(){t++}),t},toArray:function(e){return N(e,function(e){return e})||[]},only:function(e){if(!D(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=I,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=D,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:P}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,F)}catch(e){F(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()}
2,e.version=`19.2.6`})),yd=t(((e,t)=>{t.exports=vd()})),B=e(yd()),bd=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),xd=function(e,t,n){return typeof t==`symbol`&&(t=t.description?`[${t.description}]`:``),Object.defineProperty(e,"name",{configurable:!0,value:n?`${n} ${t}`:t})},Sd,Cd;function wd(e){Cd=e}function Td(){return Cd}var Ed=(0,B.createContext)({get client(){return Td()},bootstrap:void 0});function Dd(e,t,n){if(n===void 0&&(n=new WeakMap),e===t)return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)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 a=0,o=r;a<o.length;a++){var s=o[a];if(!i.includes(s)||!Dd(e[s],t[s],n))return!1}return!0}function Od(e){var t=e.children,n=e.client,r=e.apiKey,i=e.options,a=(0,B.useRef)(null),o=(0,B.useMemo)(function(){if(n)return 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;var e=Td();return 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."),e},[n,r,JSON.stringify(i)]);return(0,B.useEffect)(function(){if(!n&&r){var e=Td(),t=a.current;t?(r!==t.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&&!Dd(i,t.options)&&e.set_config(i),a.current={apiKey:r,options:i??{}}):(e.__loaded&&console.warn("[PostHog.js] `posthog` was already loaded elsewhere. This may cause issues."),e.init(r,i),a.current={apiKey:r,options:i??{}})}},[n,r,JSON.stringify(i)]),B.createElement(Ed.Provider,{value:{client:o,bootstrap:i?.bootstrap??n?.config?.bootstrap}},t)}var kd=function(e){return typeof e==`function`},Ad=function(e){return e===void 0},jd=function(e){var t=Object.prototype.toString.call(e);return e instanceof Error||t===`[object Error]`||t===`[object Exception]`||t===`[object DOMException]`||t===`[object DOMError]`},Md=function(e,t){for(var n=new WeakSet,r=e;!n.has(r);){if(n.add(r),!jd(r.cause)){Ad(r.cause)||(t.cause=r.cause),r.cause=t;return}r=r.cause}},Nd=function(e,t){if(!t)return e;var n=Error(jd(e)?e.message:`Primitive value captured as exception: ${String(e)}`);return n.name=`React ErrorBoundary ${jd(e)?e.name:`Error`}`,n.stack=t,jd(e)?(Md(e,n),e):n},Pd={componentStack:null,exceptionEvent:null,error:null},Fd={INVALID_FALLBACK:`[PostHog.js][PostHogErrorBoundary] Invalid fallback prop, provide a valid React element or a function that returns a valid React element.`};Sd=function(e){bd(t,e);function t(t){var n=e.call(this,t)||this;return n._resetError=function(){n.setState(Pd)},n.state=Pd,n}return t.prototype.componentDidCatch=function(e,t){var n=this.props.additionalProperties,r;kd(n)?r=n(e,t):typeof n==`object`&&(r=n);var i=this.context.client,a=t.componentStack,o=i.captureException(Nd(e,a),r);this.setState({error:e,componentStack:a??null,exceptionEvent:o})},t.prototype.render=function(){var e=this.props,t=e.children,n=e.fallback,r=this.state;if(r.componentStack==null)return kd(t)?t():t;var i=kd(n)?B.createElement(n,{error:r.error,componentStack:r.componentStack,exceptionEvent:r.exceptionEvent,resetError:this._resetError}):n;return B.isValidElement(i)?i:(console.warn(Fd.INVALID_FALLBACK),B.createElement(B.Fragment,null))},t}
vendor: 11,836 bytes, lines 2-4
2(B.Component),xd(Sd,`PostHogErrorBoundary`),(function(){Sd.contextType=Ed})(),wd(_d);var Id=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,D());else{var t=n(l);t!==null&&A(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function ee(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&A(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?D():S=!1}}}var D;if(typeof y==`function`)D=function(){y(ee)};else if(typeof MessageChannel<`u`){var O=new MessageChannel,k=O.port2;O.port1.onmessage=ee,D=function(){k.postMessage(null)}}else D=function(){_(ee,0)};function A(t,n){C=_(function(){t(e.unstable_now())},n)}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(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,A(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,D()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Ld=t(((e,t)=>{t.exports=Id()})),Rd=t((e=>{var t=yd();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.6`})),zd=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Rd()})),Bd=t((e=>{var t=Ld(),n=yd(),r=zd();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,p=Symbol.for(`react.element`),m=Symbol.for(`react.transitional.element`),h=Symbol.for(`react.portal`),g=Symbol.for(`react.fragment`),_=Symbol.for(`react.strict_mode`),v=Symbol.for(`react.profiler`),y=Symbol.for(`react.consumer`),b=Symbol.for(`react.context`),x=Symbol.for(`react.forward_ref`),S=Symbol.for(`react.suspense`),C=Symbol.for(`react.suspense_list`),w=Symbol.for(`react.memo`),T=Symbol.for(`react.lazy`),E=Symbol.for(`react.activity`),ee=Symbol.for(`react.memo_cache_sentinel`),D=Symbol.iterator;function O(e){return typeof e!=`object`||!e?null:(e=D&&e[D]||e[`@@iterator`],typeof e==`function`?e:null)}var k=Symbol.for(`react.client.reference`);function A(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===k?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case g:return`Fragment`;case v:return`Profiler`;case _:return`StrictMode`;case S:return`Suspense`;case C:return`SuspenseList`;case E:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case h:return`Portal`;case b:return e.displayName||`Context`;case y:return(e._context.displayName||`Context`)+`.Consumer`;case x:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case w:return t=e.displayName||null,t===null?A(e.type)||`Memo`:t;case T:t=e._payload,e=e._init;try{return A(e(t))}catch{}}return null}var j=Array.isArray,M=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P={pending:!1,data:null,method:null,action:null},F=[],I=-1;function te(e){return{current:e}}function ne(e){0>I||(e.current=F[I],F[I]=null,I--)}function re(e,t){I++,F[I]=e.current,e.current=t}var ie=te(null),ae=te(null),oe=te(null),L=te(null);function se(e,t){switch(re(oe,t),re(ae,e),re(ie,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?ef(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=ef(t),e=tf(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ne(ie),re(ie,e)}function ce(){ne(ie),ne(ae),ne(oe)}function le(e){e.memoizedState!==null&&re(L,e);var t=ie.current,n=tf(t,e.type);t!==n&&(re(ae,e),re(ie,n))}function ue(e){ae.current===e&&(ne(ie),ne(ae)),L.current===e&&(ne(L),dp._currentValue=P)}var de,fe;function pe(e){if(de===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);de=t&&t[1]||``,fe=-1<e.stack.indexOf(`
3    at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4`+de+e+fe}var me=!1;function he(e,t){if(!e||me)return``;me=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}
vendor: 6,582 bytes, lines 4-9
4else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
5`),l=s.split(`
6`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
7`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{me=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?pe(n):``}function ge(e,t){switch(e.tag){case 26:case 27:case 5:return pe(e.type);case 16:return pe(`Lazy`);case 13:return e.child!==t&&t!==null?pe(`Suspense Fallback`):pe(`Suspense`);case 19:return pe(`SuspenseList`);case 0:case 15:return he(e.type,!1);case 11:return he(e.type.render,!1);case 1:return he(e.type,!0);case 31:return pe(`Activity`);default:return``}}function _e(e){try{var t=``,n=null;do t+=ge(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
8Error generating stack: `+e.message+`
9`+e.stack}}var ve=Object.prototype.hasOwnProperty,ye=t.unstable_scheduleCallback,be=t.unstable_cancelCallback,xe=t.unstable_shouldYield,Se=t.unstable_requestPaint,Ce=t.unstable_now,we=t.unstable_getCurrentPriorityLevel,Te=t.unstable_ImmediatePriority,Ee=t.unstable_UserBlockingPriority,De=t.unstable_NormalPriority,Oe=t.unstable_LowPriority,ke=t.unstable_IdlePriority,Ae=t.log,je=t.unstable_setDisableYieldValue,Me=null,Ne=null;function Pe(e){if(typeof Ae==`function`&&je(e),Ne&&typeof Ne.setStrictMode==`function`)try{Ne.setStrictMode(Me,e)}catch{}}var Fe=Math.clz32?Math.clz32:Re,Ie=Math.log,Le=Math.LN2;function Re(e){return e>>>=0,e===0?32:31-(Ie(e)/Le|0)|0}var ze=256,Be=262144,Ve=4194304;function He(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ue(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=He(n))):i=He(o):i=He(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=He(n))):i=He(o)):i=He(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function We(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ge(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ke(){var e=Ve;return Ve<<=1,!(Ve&62914560)&&(Ve=4194304),e}function qe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Je(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ye(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Fe(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Xe(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Xe(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Fe(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ze(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Fe(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Qe(e,t){var n=t&-t;return n=n&42?1:$e(n),(n&(e.suspendedLanes|t))===0?n:0}function $e(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function et(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function tt(){var e=N.p;return e===0?(e=window.event,e===void 0?32:Dp(e.type)):e}function nt(e,t){var n=N.p;try{return N.p=e,t()}finally{N.p=n}}var rt=Math.random().toString(36).slice(2),it=`__reactFiber$`+rt,at=`__reactProps$`+rt,ot=`__reactContainer$`+rt,st=`__reactEvents$`+rt,ct=`__reactListeners$`+rt,lt=`__reactHandles$`+rt,ut=`__reactResources$`+rt,dt=`__reactMarker$`+rt;function ft(e){delete e[it],delete e[at],delete e[st],delete e[ct],delete e[lt]}function pt(e){var t=e[it];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ot]||n[it]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=wf(e);e!==null;){if(n=e[it])return n;e=wf(e)}return t}e=n,n=e.parentNode}return null}function mt(e){if(e=e[it]||e[ot]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ht(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function gt(e){var t=e[ut];return t||=e[ut]={hoistableStyles:new Map,hoistableScripts:new Map},t}function _t(e){e[dt]=!0}var vt=new Set,yt={};function bt(e,t){xt(e,t),xt(e+`Capture`,t)}function xt(e,t){for(yt[e]=t,e=0;e<t.length;e++)vt.add(t[e])}var St=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u
9037D\\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]*$`),Ct={},wt={};function Tt(e){return ve.call(wt,e)?!0:ve.call(Ct,e)?!1:St.test(e)?wt[e]=!0:(Ct[e]=!0,!1)}function Et(e,t,n){if(Tt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}}function Dt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Ot(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function kt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function At(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function jt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Mt(e){if(!e._valueTracker){var t=At(e)?`checked`:`value`;e._valueTracker=jt(e,t,``+e[t])}}function Nt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=At(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function Pt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Ft=/[\n"\\]/g;function It(e){return e.replace(Ft,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Lt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+kt(t)):e.value!==``+kt(t)&&(e.value=``+kt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):zt(e,o,kt(n)):zt(e,o,kt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+kt(s):e.removeAttribute(`name`)}function Rt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Mt(e);return}n=n==null?``:``+kt(n),t=t==null?n:``+kt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Mt(e)}function zt(e,t,n){t===`number`&&Pt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Bt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+kt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Vt(e,t,n){if(t!=null&&(t=``+kt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+kt(n)}function R(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(j(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}
vendor: 9,505 bytes, line 9
9n=kt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Mt(e)}function Ht(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ut=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 Wt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Ut.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Gt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Wt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Wt(e,o,t[o])}function Kt(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var qt=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Jt=/^[\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 Yt(e){return Jt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Xt(){}var Zt=null;function Qt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var $t=null,en=null;function tn(e){var t=mt(e);if(t&&(e=t.stateNode)){var n=e[at]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Lt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+It(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[at]||null;if(!a)throw Error(i(90));Lt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Nt(r)}break a;case`textarea`:Vt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Bt(e,!!n.multiple,t,!1)}}}var nn=!1;function rn(e,t,n){if(nn)return e(t,n);nn=!0;try{return e(t)}finally{if(nn=!1,($t!==null||en!==null)&&(Ou(),$t&&(t=$t,e=en,en=$t=null,tn(t),e)))for(t=0;t<e.length;t++)tn(e[t])}}function an(e,t){var n=e.stateNode;if(n===null)return null;var r=n[at]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var on=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),sn=!1;if(on)try{var cn={};Object.defineProperty(cn,"passive",{get:function(){sn=!0}}),window.addEventListener(`test`,cn,cn),window.removeEventListener(`test`,cn,cn)}catch{sn=!1}var ln=null,un=null,dn=null;function fn(){if(dn)return dn;var e,t=un,n=t.length,r,i=`value`in ln?ln.value:ln.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return dn=i.slice(e,1<r?1-r:void 0)}function pn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function mn(){return!0}function hn(){return!1}function gn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?mn:hn,this.isPropagationStopped=hn,this}return f(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=mn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=mn)},persist:function(){},isPersistent:mn}),t}var _n={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vn=gn(_n),yn=f({},_n,{view:0,detail:0}),bn=gn(yn),xn,Sn,Cn,wn=f({},yn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Cn&&(Cn&&e.type===`mousemove`?(xn=e.screenX-Cn.screenX,Sn=e.screenY-Cn.screenY):Sn=xn=0,Cn=e),xn)},movementY:function(e){return`movementY`in e?e.movementY:Sn}}),Tn=gn(wn),En=gn(f({},wn,{dataTransfer:0})),Dn=gn(f({},yn,{relatedTarget:0})),On=gn(f({},_n,{animationName:0,elapsedTime:0,pseudoElement:0})),kn=gn(f({},_n,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),An=gn(f({},_n,{data:0})),jn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Mn={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:`F
95`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Nn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Pn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Nn[e])?!!t[e]:!1}function Fn(){return Pn}var In=gn(f({},yn,{key:function(e){if(e.key){var t=jn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=pn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Mn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fn,charCode:function(e){return e.type===`keypress`?pn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?pn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Ln=gn(f({},wn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Rn=gn(f({},yn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fn})),zn=gn(f({},_n,{propertyName:0,elapsedTime:0,pseudoElement:0})),Bn=gn(f({},wn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Vn=gn(f({},_n,{newState:0,oldState:0})),Hn=[9,13,27,32],Un=on&&`CompositionEvent`in window,Wn=null;on&&`documentMode`in document&&(Wn=document.documentMode);var Gn=on&&`TextEvent`in window&&!Wn,Kn=on&&(!Un||Wn&&8<Wn&&11>=Wn),qn=` `,Jn=!1;function Yn(e,t){switch(e){case`keyup`:return Hn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Xn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Zn=!1;function Qn(e,t){switch(e){case`compositionend`:return Xn(t);case`keypress`:return t.which===32?(Jn=!0,qn):null;case`textInput`:return e=t.data,e===qn&&Jn?null:e;default:return null}}function $n(e,t){if(Zn)return e===`compositionend`||!Un&&Yn(e,t)?(e=fn(),dn=un=ln=null,Zn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Kn&&t.locale!==`ko`?null:t.data;default:return null}}var er={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 tr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!er[e.type]:t===`textarea`}function nr(e,t,n,r){$t?en?en.push(r):en=[r]:$t=r,t=Id(t,`onChange`),0<t.length&&(n=new vn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var rr=null,ir=null;function ar(e){Od(e,0)}function or(e){if(Nt(ht(e)))return e}function sr(e,t){if(e===`change`)return t}var cr=!1;if(on){var lr;if(on){var ur=`oninput`in document;if(!ur){var dr=document.createElement(`div`);dr.setAttribute(`oninput`,`return;`),ur=typeof dr.oninput==`function`}lr=ur}else lr=!1;cr=lr&&(!document.documentMode||9<document.documentMode)}function z(){rr&&(rr.detachEvent(`onpropertychange`,fr),ir=rr=null)}function fr(e){if(e.propertyName===`value`&&or(ir)){var t=[];nr(t,ir,e,Qt(e)),rn(ar,t)}}function pr(e,t,n){e===`focusin`?(z(),rr=t,ir=n,rr.attachEvent(`onpropertychange`,fr)):e===`focusout`&&z()}function mr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return or(ir)}function hr(e,t){if(e===`click`)return or(t)}function gr(e,t){if(e===`input`||e===`change`)return or(t)}function _r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var vr=typeof Object.is==`function`?Object.is:_r;function yr(e,t){if(vr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!ve.call(t,i)||!vr(e[i],t[i]))return!1}return!0}function br(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function xr(e,t){var n=br(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=br(n)}}function Sr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Sr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Cr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Pt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Pt(e.document)}return t}function wr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Tr=on&&`documentMode`in document&&11>=document.documentMode,Er=null,Dr=null,Or=null,kr=!1;function Ar(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;kr||Er==null||Er!==Pt(r)||(r=Er,`selectionStart`in r&&wr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focu
vendor: 110,956 bytes, lines 9-10
9sNode:r.focusNode,focusOffset:r.focusOffset}),Or&&yr(Or,r)||(Or=r,r=Id(Dr,`onSelect`),0<r.length&&(t=new vn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Er)))}function jr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Mr={animationend:jr(`Animation`,`AnimationEnd`),animationiteration:jr(`Animation`,`AnimationIteration`),animationstart:jr(`Animation`,`AnimationStart`),transitionrun:jr(`Transition`,`TransitionRun`),transitionstart:jr(`Transition`,`TransitionStart`),transitioncancel:jr(`Transition`,`TransitionCancel`),transitionend:jr(`Transition`,`TransitionEnd`)},Nr={},Pr={};on&&(Pr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Mr.animationend.animation,delete Mr.animationiteration.animation,delete Mr.animationstart.animation),`TransitionEvent`in window||delete Mr.transitionend.transition);function Fr(e){if(Nr[e])return Nr[e];if(!Mr[e])return e;var t=Mr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Pr)return Nr[e]=t[n];return e}var Ir=Fr(`animationend`),Lr=Fr(`animationiteration`),Rr=Fr(`animationstart`),zr=Fr(`transitionrun`),Br=Fr(`transitionstart`),Vr=Fr(`transitioncancel`),Hr=Fr(`transitionend`),Ur=new Map,Wr=`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(` `);Wr.push(`scrollEnd`);function Gr(e,t){Ur.set(e,t),bt(t,[e])}var Kr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},qr=[],Jr=0,Yr=0;function Xr(){for(var e=Jr,t=Yr=Jr=0;t<e;){var n=qr[t];qr[t++]=null;var r=qr[t];qr[t++]=null;var i=qr[t];qr[t++]=null;var a=qr[t];if(qr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ei(n,i,a)}}function Zr(e,t,n,r){qr[Jr++]=e,qr[Jr++]=t,qr[Jr++]=n,qr[Jr++]=r,Yr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Qr(e,t,n,r){return Zr(e,t,n,r),ti(e)}function $r(e,t){return Zr(e,null,null,t),ti(e)}function ei(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Fe(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ti(e){if(50<yu)throw yu=0,bu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ni={};function ri(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ii(e,t,n,r){return new ri(e,t,n,r)}function ai(e){return e=e.prototype,!(!e||!e.isReactComponent)}function oi(e,t){var n=e.alternate;return n===null?(n=ii(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function si(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ci(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ai(e)&&(s=1);else if(typeof e==`string`)s=np(e,n,ie.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case E:return e=ii(31,n,t,a),e.elementType=E,e.lanes=o,e;case g:return li(n.children,a,o,t);case _:s=8,a|=24;break;case v:return e=ii(12,n,t,a|2),e.elementType=v,e.lanes=o,e;case S:return e=ii(13,n,t,a),e.elementType=S,e.lanes=o,e;case C:return e=ii(19,n,t,a),e.elementType=C,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case b:s=10;break a;case y:s=9;break a;case x:s=11;break a;case w:s=14;break a;case T:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ii(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function li(e,t,n,r){return e=ii(7,e,r,t),e.lanes=n,e}function ui(e,t,n){return e=ii(6,e,null,t),e.lanes=n,e}function di(e){var t=ii(18,null,null,0);return t.stateNode=e,t}function fi(e,t,n){return t=ii(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var pi=new WeakMap;function mi(e,t){if(typeof e==`object`&&e){var n=pi.get(e);return n===void 0?(t={value:e,source:t,stack:_e(t)},pi.set(e,t),t):n}return{value:e,source:t,stack:_e(t)}}var hi=[],gi=0,_i=null,vi=0,yi=[],bi=0,xi=null,Si=1,Ci=``;function wi(e,t){hi[gi++]=vi,hi[gi++]=_i,_i=e,vi=t}function Ti(e,t,n){yi[bi++]=Si,yi[bi++]=Ci,yi[bi++]=xi,xi=e;var r=Si;e=Ci;var i=32-Fe(r)-1;r&=~(1<<i),n+=1;var a=32-Fe(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Si=1<<32-Fe(t)+i|n<<i|r,Ci=a+e}else Si=1<<a|n<<i|r,Ci=e}function Ei(e){e.return!==null&&(wi(e,1),Ti(e,1,0))}function Di(e){for(;e===_i;)_i=hi[--gi],hi[gi]=null,vi=hi[--gi],hi[gi]=null;for(;e===xi;)xi=yi[--bi],yi[bi]=null,Ci=yi[--bi],yi[bi]=null,Si=yi[--bi],yi[bi]=null}function Oi(e,t){yi[bi++]=Si,yi[bi++]=Ci,yi[bi++]=xi,Si=t.id,Ci=t.overflow,xi=e}var ki=null,Ai=null,ji=!1,Mi=null,Ni=!1,Pi=Error(i(519));function Fi(e){throw Vi(mi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Pi}function Ii(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[it]=e,t[at]=r,n){case`dialog`:kd(`cancel`,t),kd(`close`,t);break;case`iframe`:case`object`:case`embed`:kd(`load`,t);break;case`video`:case`audio`:for(n=0;n<Ed.length;n++)kd(Ed[n],t);break;case`source`:kd(`error`,t);break;case`img`:case`image`:case`link`:kd(`error`,t),kd(`load`,t);break;case`details`:kd(`toggle`,t);break;case`input`:kd(`invalid`,t),Rt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:kd(`invalid`,t);break;case`textarea`:kd(`invalid`,t),R(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Wd(t.textContent,n)?(r.popover!=null&&(kd(`beforetoggle`,t),kd(`toggle`,t)),r.onScroll!=null&&kd(`scroll`,t),r.onScrollEnd!=null&&kd(`scrollend`,t),r.onClick!=null&&(t.onclick=Xt),t=!0):t=!1,t||Fi(e,!0)}function Li(e){for(ki=e.return;ki;)switch(ki.tag){case 5:case 31:case 13:Ni=!1;return;case 27:case 3:Ni=!0;return;default:ki=ki.return}}function Ri(e){if(e!==ki)return!1;if(!ji)return Li(e),ji=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||nf(e.type,e.memoizedProps)),n=!n),n&&Ai&&Fi(e),Li(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ai=Cf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ai=Cf(e)}else t===27?(t=Ai,df(e.type)?(e=Sf,Sf=null,Ai=e):Ai=t):Ai=ki?xf(e.stateNode.nextSibling):null;return!0}function zi(){Ai=ki=null,ji=!1}function Bi(){var e=Mi;return e!==null&&(au===null?au=e:au.push.apply(au,e),Mi=null),e}function Vi(e){Mi===null?Mi=[e]:Mi.push(e)}var Hi=te(null),Ui=null,Wi=null;function Gi(e,t,n){re(Hi,t._currentValue),t._currentValue=n}function Ki(e){e._currentValue=Hi.current,ne(Hi)}function qi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Ji(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),qi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),qi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Yi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;vr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===L.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[dp]:e.push(dp))}a=a.return}e!==null&&Ji(t,e,n,r),t.flags|=262144}function Xi(e){for(e=e.firstContext;e!==null;){if(!vr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Zi(e){Ui=e,Wi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Qi(e){return ea(Ui,e)}function $i(e,t){return Ui===null&&Zi(e),ea(e,t)}function ea(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Wi===null){if(e===null)throw Error(i(308));Wi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Wi=Wi.next=t;return n}var ta=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},na=t.unstable_scheduleCallback,ra=t.unstable_NormalPriority,ia={$$typeof:b,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function aa(){return{controller:new ta,data:new Map,refCount:0}}function oa(e){e.refCount--,e.refCount===0&&na(ra,function(){e.controller.abort()})}var sa=null,ca=0,la=0,ua=null;function da(e,t){if(sa===null){var n=sa=[];ca=0,la=bd(),ua={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ca++,t.then(fa,fa),t}function fa(){if(--ca===0&&sa!==null){ua!==null&&(ua.status=`fulfilled`);var e=sa;sa=null,la=0,ua=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function pa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ma=M.S;M.S=function(e,t){cu=Ce(),typeof t==`object`&&t&&typeof t.then==`function`&&da(e,t),ma!==null&&ma(e,t)};var ha=te(null);function ga(){var e=ha.current;return e===null?Ul.pooledCache:e}function _a(e,t){t===null?re(ha,ha.current):re(ha,t.pool)}function va(){var e=ga();return e===null?null:{parent:ia._currentValue,pool:e}}var ya=Error(i(460)),ba=Error(i(474)),xa=Error(i(542)),Sa={then:function(){}};function Ca(e){return e=e.status,e===`fulfilled`||e===`rejected`}function wa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Xt,Xt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Oa(e),e;default:if(typeof t.status==`string`)t.then(Xt,Xt);else{if(e=Ul,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Oa(e),e}throw Ea=t,ya}}function Ta(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ea=e,ya):e}}var Ea=null;function Da(){if(Ea===null)throw Error(i(459));var e=Ea;return Ea=null,e}function Oa(e){if(e===ya||e===xa)throw Error(i(483))}var ka=null,Aa=0;function ja(e){var t=Aa;return Aa+=1,ka===null&&(ka=[]),wa(ka,e,t)}function Ma(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Na(e,t){throw t.$$typeof===p?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Pa(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=oi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=ui(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===g?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===T&&Ta(i)===t.type)?(t=a(t,n.props),Ma(t,n),t.return=e,t):(t=ci(n.type,n.key,n.props,null,e.mode,r),Ma(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=fi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=li(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=ui(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case m:return n=ci(t.type,t.key,t.props,null,e.mode,n),Ma(n,t),n.return=e,n;case h:return t=fi(t,e.mode,n),t.return=e,t;case T:return t=Ta(t),f(e,t,n)}if(j(t)||O(t))return t=li(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,ja(t),n);if(t.$$typeof===b)return f(e,$i(e,t),n);Na(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case m:return n.key===i?l(e,t,n,r):null;case h:return n.key===i?u(e,t,n,r):null;case T:return n=Ta(n),p(e,t,n,r)}if(j(n)||O(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,ja(n),r);if(n.$$typeof===b)return p(e,t,$i(e,n),r);Na(e,n)}return null}function _(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case m:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case h:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case T:return r=Ta(r),_(e,t,n,r,i)}if(j(r)||O(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return _(e,t,n,ja(r),i);if(r.$$typeof===b)return _(e,t,n,$i(t,r),i);Na(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,m=a=0,h=null;d!==null&&m<s.length;m++){d.index>m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),ji&&wi(i,m),l;if(d===null){for(;m<s.length;m++)d=f(i,s[m],c),d!==null&&(a=o(d,a,m),u===null?l=d:u.sibling=d,u=d);return ji&&wi(i,m),l}for(d=r(d);m<s.length;m++)h=_(d,i,m,s[m],c),h!==null&&(e&&h.alternate!==null&&d.delete(h.key===null?m:h.key),a=o(h,a,m),u===null?l=h:u.sibling=h,u=h);return e&&d.forEach(function(e){return t(i,e)}),ji&&wi(i,m),l}function y(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,m=s,h=s=0,g=null,v=c.next();m!==null&&!v.done;h++,v=c.next()){m.index>h?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),ji&&wi(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return ji&&wi(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),ji&&wi(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===T&&Ta(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ma(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===g?(c=li(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ci(o.type,o.key,o.props,null,e.mode,c),Ma(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=fi(o,e.mode,c),c.return=e,e=c}return s(e);case T:return o=Ta(o),x(e,r,o,c)}if(j(o))return v(e,r,o,c);if(O(o)){if(l=O(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,ja(o),c);if(o.$$typeof===b)return x(e,r,$i(e,o),c);Na(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=ui(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Aa=0;var i=x(e,t,n,r);return ka=null,i}catch(t){if(t===ya||t===xa)throw t;var a=ii(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Fa=Pa(!0),Ia=Pa(!1),La=!1;function Ra(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function za(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ba(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Va(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Hl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ti(e),ei(e,null,n),t}return Zr(e,r,t,n),ti(e)}function Ha(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ze(e,n)}}function Ua(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Wa=!1;function Ga(){if(Wa){var e=ua;if(e!==null)throw e}}function Ka(e,t,n,r){Wa=!1;var i=e.updateQueue;La=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(Gl&p)===p:(r&p)===p){p!==0&&p===la&&(Wa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:La=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),$l|=o,e.lanes=o,e.memoizedState=d}}function qa(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ja(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)qa(n[e],t)}var Ya=te(null),Xa=te(0);function Za(e,t){e=Zl,re(Xa,e),re(Ya,t),Zl=e|t.baseLanes}function Qa(){re(Xa,Zl),re(Ya,Ya.current)}function $a(){Zl=Xa.current,ne(Ya),ne(Xa)}var eo=te(null),to=null;function no(e){var t=e.alternate;re(so,so.current&1),re(eo,e),to===null&&(t===null||Ya.current!==null||t.memoizedState!==null)&&(to=e)}function ro(e){re(so,so.current),re(eo,e),to===null&&(to=e)}function io(e){e.tag===22?(re(so,so.current),re(eo,e),to===null&&(to=e)):ao(e)}function ao(){re(so,so.current),re(eo,eo.current)}function oo(e){ne(eo),to===e&&(to=null),ne(so)}var so=te(0);function co(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||vf(n)||yf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var lo=0,uo=null,fo=null,po=null,mo=!1,ho=!1,go=!1,_o=0,vo=0,yo=null,bo=0;function xo(){throw Error(i(321))}function So(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!vr(e[n],t[n]))return!1;return!0}function Co(e,t,n,r,i,a){return lo=a,uo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?Bs:Vs,go=!1,a=n(r,i),go=!1,ho&&(a=To(t,n,r,i)),wo(e),a}function wo(e){M.H=zs;var t=fo!==null&&fo.next!==null;if(lo=0,po=fo=uo=null,mo=!1,vo=0,yo=null,t)throw Error(i(300));e===null||ic||(e=e.dependencies,e!==null&&Xi(e)&&(ic=!0))}function To(e,t,n,r){uo=e;var a=0;do{if(ho&&(yo=null),vo=0,ho=!1,25<=a)throw Error(i(301));if(a+=1,po=fo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}M.H=Hs,o=t(n,r)}while(ho);return o}function Eo(){var e=M.H,t=e.useState()[0];return t=typeof t.then==`function`?No(t):t,e=e.useState()[0],(fo===null?null:fo.memoizedState)!==e&&(uo.flags|=1024),t}function Do(){var e=_o!==0;return _o=0,e}function Oo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ko(e){if(mo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}mo=!1}lo=0,po=fo=uo=null,ho=!1,vo=_o=0,yo=null}function Ao(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return po===null?uo.memoizedState=po=e:po=po.next=e,po}function jo(){if(fo===null){var e=uo.alternate;e=e===null?null:e.memoizedState}else e=fo.next;var t=po===null?uo.memoizedState:po.next;if(t!==null)po=t,fo=e;else{if(e===null)throw uo.alternate===null?Error(i(467)):Error(i(310));fo=e,e={memoizedState:fo.memoizedState,baseState:fo.baseState,baseQueue:fo.baseQueue,queue:fo.queue,next:null},po===null?uo.memoizedState=po=e:po=po.next=e}return po}function Mo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function No(e){var t=vo;return vo+=1,yo===null&&(yo=[]),e=wa(yo,e,t),t=uo,(po===null?t.memoizedState:po.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?Bs:Vs),e}function Po(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return No(e);if(e.$$typeof===b)return Qi(e)}throw Error(i(438,String(e)))}function Fo(e){var t=null,n=uo.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=uo.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Mo(),uo.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ee;return t.index++,n}function Io(e,t){return typeof t==`function`?t(e):t}function Lo(e){return Ro(jo(),fo,e)}function Ro(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(lo&f)===f:(Gl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===la&&(d=!0);else if((lo&p)===p){u=u.next,p===la&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,uo.lanes|=p,$l|=p;f=u.action,go&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,uo.lanes|=f,$l|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!vr(o,e.memoizedState)&&(ic=!0,d&&(n=ua,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function zo(e){var t=jo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);vr(o,t.memoizedState)||(ic=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Bo(e,t,n){var r=uo,a=jo(),o=ji;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!vr((fo||a).memoizedState,n);if(s&&(a.memoizedState=n,ic=!0),a=a.queue,ds(Uo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||po!==null&&po.memoizedState.tag&1){if(r.flags|=2048,os(9,{destroy:void 0},Ho.bind(null,r,a,n,t),null),Ul===null)throw Error(i(349));o||lo&127||Vo(r,t,n)}return n}function Vo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=uo.updateQueue,t===null?(t=Mo(),uo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ho(e,t,n,r){t.value=n,t.getSnapshot=r,Wo(t)&&Go(e)}function Uo(e,t,n){return n(function(){Wo(t)&&Go(e)})}function Wo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!vr(e,n)}catch{return!0}}function Go(e){var t=$r(e,2);t!==null&&Cu(t,e,2)}function Ko(e){var t=Ao();if(typeof e==`function`){var n=e;if(e=n(),go){Pe(!0);try{n()}finally{Pe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:e},t}function qo(e,t,n,r){return e.baseState=n,Ro(e,fo,typeof r==`function`?r:Io)}function Jo(e,t,n,r,a){if(Is(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};M.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Yo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Yo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=M.T,o={};M.T=o;try{var s=n(i,r),c=M.S;c!==null&&c(o,s),Xo(e,t,s)}catch(n){Qo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),M.T=a}}else try{a=n(i,r),Xo(e,t,a)}catch(n){Qo(e,t,n)}}function Xo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Zo(e,t,n)},function(n){return Qo(e,t,n)}):Zo(e,t,n)}function Zo(e,t,n){t.status=`fulfilled`,t.value=n,$o(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Yo(e,n)))}function Qo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,$o(t),t=t.next;while(t!==r)}e.action=null}function $o(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function es(e,t){return t}function ts(e,t){if(ji){var n=Ul.formState;if(n!==null){a:{var r=uo;if(ji){if(Ai){b:{for(var i=Ai,a=Ni;i.nodeType!==8;){if(!a){i=null;break b}if(i=xf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ai=xf(i.nextSibling),r=i.data===`F!`;break a}}Fi(r)}r=!1}r&&(t=n[0])}}return n=Ao(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:es,lastRenderedState:t},n.queue=r,n=Ns.bind(null,uo,r),r.dispatch=n,r=Ko(!1),a=Fs.bind(null,uo,!1,r.queue),r=Ao(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Jo.bind(null,uo,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ns(e){return rs(jo(),fo,e)}function rs(e,t,n){if(t=Ro(e,t,es)[0],e=Lo(Io)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=No(t)}catch(e){throw e===ya?xa:e}else r=t;t=jo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(uo.flags|=2048,os(9,{destroy:void 0},is.bind(null,i,n),null)),[r,a,e]}function is(e,t){e.action=t}function as(e){var t=jo(),n=fo;if(n!==null)return rs(t,n,e);jo(),t=t.memoizedState,n=jo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function os(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=uo.updateQueue,t===null&&(t=Mo(),uo.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ss(){return jo().memoizedState}function cs(e,t,n,r){var i=Ao();uo.flags|=e,i.memoizedState=os(1|t,{destroy:void 0},n,r===void 0?null:r)}function ls(e,t,n,r){var i=jo();r=r===void 0?null:r;var a=i.memoizedState.inst;fo!==null&&r!==null&&So(r,fo.memoizedState.deps)?i.memoizedState=os(t,a,n,r):(uo.flags|=e,i.memoizedState=os(1|t,a,n,r))}function us(e,t){cs(8390656,8,e,t)}function ds(e,t){ls(2048,8,e,t)}function fs(e){uo.flags|=4;var t=uo.updateQueue;if(t===null)t=Mo(),uo.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ps(e){var t=jo().memoizedState;return fs({ref:t,nextImpl:e}),function(){if(Hl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ms(e,t){return ls(4,2,e,t)}function hs(e,t){return ls(4,4,e,t)}function gs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function _s(e,t,n){n=n==null?null:n.concat([e]),ls(4,4,gs.bind(null,t,e),n)}function vs(){}function ys(e,t){var n=jo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&So(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function bs(e,t){var n=jo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&So(t,r[1]))return r[0];if(r=e(),go){Pe(!0);try{e()}finally{Pe(!1)}}return n.memoizedState=[r,t],r}function xs(e,t,n){return n===void 0||lo&1073741824&&!(Gl&261930)?e.memoizedState=t:(e.memoizedState=n,e=Su(),uo.lanes|=e,$l|=e,n)}function Ss(e,t,n,r){return vr(n,t)?n:Ya.current===null?!(lo&42)||lo&1073741824&&!(Gl&261930)?(ic=!0,e.memoizedState=n):(e=Su(),uo.lanes|=e,$l|=e,t):(e=xs(e,n,r),vr(e,t)||(ic=!0),e)}function Cs(e,t,n,r,i){var a=N.p;N.p=a!==0&&8>a?a:8;var o=M.T,s={};M.T=s,Fs(e,!1,t,n);try{var c=i(),l=M.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ps(e,t,pa(c,r),xu(e)):Ps(e,t,r,xu(e))}catch(n){Ps(e,t,{then:function(){},status:`rejected`,reason:n},xu())}finally{N.p=a,o!==null&&s.types!==null&&(o.types=s.types),M.T=o}}function ws(){}function Ts(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Es(e).queue;Cs(e,a,t,P,n===null?ws:function(){return Ds(e),n(r)})}function Es(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:P,baseState:P,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:P},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ds(e){var t=Es(e);t.next===null&&(t=e.alternate.memoizedState),Ps(e,t.next.queue,{},xu())}function Os(){return Qi(dp)}function ks(){return jo().memoizedState}function As(){return jo().memoizedState}function js(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=xu();e=Ba(n);var r=Va(t,e,n);r!==null&&(Cu(r,t,n),Ha(r,t,n)),t={cache:aa()},e.payload=t;return}t=t.return}}function Ms(e,t,n){var r=xu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Is(e)?Ls(t,n):(n=Qr(e,t,n,r),n!==null&&(Cu(n,e,r),Rs(n,t,r)))}function Ns(e,t,n){Ps(e,t,n,xu())}function Ps(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Is(e))Ls(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,vr(s,o))return Zr(e,t,i,0),Ul===null&&Xr(),!1}catch{}if(n=Qr(e,t,i,r),n!==null)return Cu(n,e,r),Rs(n,t,r),!0}return!1}function Fs(e,t,n,r){if(r={lane:2,revertLane:bd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Is(e)){if(t)throw Error(i(479))}else t=Qr(e,n,r,2),t!==null&&Cu(t,e,2)}function Is(e){var t=e.alternate;return e===uo||t!==null&&t===uo}function Ls(e,t){ho=mo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Rs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ze(e,n)}}var zs={readContext:Qi,use:Po,useCallback:xo,useContext:xo,useEffect:xo,useImperativeHandle:xo,useLayoutEffect:xo,useInsertionEffect:xo,useMemo:xo,useReducer:xo,useRef:xo,useState:xo,useDebugValue:xo,useDeferredValue:xo,useTransition:xo,useSyncExternalStore:xo,useId:xo,useHostTransitionStatus:xo,useFormState:xo,useActionState:xo,useOptimistic:xo,useMemoCache:xo,useCacheRefresh:xo};zs.useEffectEvent=xo;var Bs={readContext:Qi,use:Po,useCallback:function(e,t){return Ao().memoizedState=[e,t===void 0?null:t],e},useContext:Qi,useEffect:us,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),cs(4194308,4,gs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return cs(4194308,4,e,t)},useInsertionEffect:function(e,t){cs(4,2,e,t)},useMemo:function(e,t){var n=Ao();t=t===void 0?null:t;var r=e();if(go){Pe(!0);try{e()}finally{Pe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Ao();if(n!==void 0){var i=n(t);if(go){Pe(!0);try{n(t)}finally{Pe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ms.bind(null,uo,e),[r.memoizedState,e]},useRef:function(e){var t=Ao();return e={current:e},t.memoizedState=e},useState:function(e){e=Ko(e);var t=e.queue,n=Ns.bind(null,uo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:vs,useDeferredValue:function(e,t){return xs(Ao(),e,t)},useTransition:function(){var e=Ko(!1);return e=Cs.bind(null,uo,e.queue,!0,!1),Ao().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=uo,a=Ao();if(ji){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Ul===null)throw Error(i(349));Gl&127||Vo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,us(Uo.bind(null,r,o,e),[e]),r.flags|=2048,os(9,{destroy:void 0},Ho.bind(null,r,o,n,t),null),n},useId:function(){var e=Ao(),t=Ul.identifierPrefix;if(ji){var n=Ci,r=Si;n=(r&~(1<<32-Fe(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=_o++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=bo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Os,useFormState:ts,useActionState:ts,useOptimistic:function(e){var t=Ao();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Fs.bind(null,uo,!0,n),n.dispatch=t,[e,t]},useMemoCache:Fo,useCacheRefresh:function(){return Ao().memoizedState=js.bind(null,uo)},useEffectEvent:function(e){var t=Ao(),n={impl:e};return t.memoizedState=n,function(){if(Hl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Vs={readContext:Qi,use:Po,useCallback:ys,useContext:Qi,useEffect:ds,useImperativeHandle:_s,useInsertionEffect:ms,useLayoutEffect:hs,useMemo:bs,useReducer:Lo,useRef:ss,useState:function(){return Lo(Io)},useDebugValue:vs,useDeferredValue:function(e,t){return Ss(jo(),fo.memoizedState,e,t)},useTransition:function(){var e=Lo(Io)[0],t=jo().memoizedState;return[typeof e==`boolean`?e:No(e),t]},useSyncExternalStore:Bo,useId:ks,useHostTransitionStatus:Os,useFormState:ns,useActionState:ns,useOptimistic:function(e,t){return qo(jo(),fo,e,t)},useMemoCache:Fo,useCacheRefresh:As};Vs.useEffectEvent=ps;var Hs={readContext:Qi,use:Po,useCallback:ys,useContext:Qi,useEffect:ds,useImperativeHandle:_s,useInsertionEffect:ms,useLayoutEffect:hs,useMemo:bs,useReducer:zo,useRef:ss,useState:function(){return zo(Io)},useDebugValue:vs,useDeferredValue:function(e,t){var n=jo();return fo===null?xs(n,e,t):Ss(n,fo.memoizedState,e,t)},useTransition:function(){var e=zo(Io)[0],t=jo().memoizedState;return[typeof e==`boolean`?e:No(e),t]},useSyncExternalStore:Bo,useId:ks,useHostTransitionStatus:Os,useFormState:as,useActionState:as,useOptimistic:function(e,t){var n=jo();return fo===null?(n.baseState=e,[e,n.queue.dispatch]):qo(n,fo,e,t)},useMemoCache:Fo,useCacheRefresh:As};Hs.useEffectEvent=ps;function Us(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ws={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=xu(),i=Ba(r);i.payload=t,n!=null&&(i.callback=n),t=Va(e,i,r),t!==null&&(Cu(t,e,r),Ha(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=xu(),i=Ba(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Va(e,i,r),t!==null&&(Cu(t,e,r),Ha(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=xu(),r=Ba(n);r.tag=2,t!=null&&(r.callback=t),t=Va(e,r,n),t!==null&&(Cu(t,e,n),Ha(t,e,n))}};function Gs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!yr(n,r)||!yr(i,a):!0}function Ks(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ws.enqueueReplaceState(t,t.state,null)}function qs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Js(e){Kr(e)}function Ys(e){console.error(e)}function Xs(e){Kr(e)}function Zs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Qs(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function $s(e,t,n){return n=Ba(n),n.tag=3,n.payload={element:null},n.callback=function(){Zs(e,t)},n}function ec(e){return e=Ba(e),e.tag=3,e}function tc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Qs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Qs(t,n,r),typeof i!=`function`&&(du===null?du=new Set([this]):du.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function nc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Yi(t,n,a,!0),n=eo.current,n!==null){switch(n.tag){case 31:case 13:return to===null?Fu():n.alternate===null&&Ql===0&&(Ql=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Sa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),ed(e,r,a)),!1;case 22:return n.flags|=65536,r===Sa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),ed(e,r,a)),!1}throw Error(i(435,n.tag))}return ed(e,r,a),Fu(),!1}if(ji)return t=eo.current,t===null?(r!==Pi&&(t=Error(i(423),{cause:r}),Vi(mi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=mi(r,n),a=$s(e.stateNode,r,a),Ua(e,a),Ql!==4&&(Ql=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Pi&&(e=Error(i(422),{cause:r}),Vi(mi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=mi(o,n),iu===null?iu=[o]:iu.push(o),Ql!==4&&(Ql=2),t===null)return!0;r=mi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=$s(n.stateNode,r,e),Ua(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(du===null||!du.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=ec(a),tc(a,e,n,r),Ua(n,a),!1}n=n.return}while(n!==null);return!1}var rc=Error(i(461)),ic=!1;function ac(e,t,n,r){t.child=e===null?Ia(t,null,n,r):Fa(t,e.child,n,r)}function oc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Zi(t),r=Co(e,t,n,o,a,i),s=Do(),e!==null&&!ic?(Oo(e,t,i),Ac(e,t,i)):(ji&&s&&Ei(t),t.flags|=1,ac(e,t,r,i),t.child)}function sc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ai(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,cc(e,t,a,r,i)):(e=ci(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!jc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?yr:n,n(o,r)&&e.ref===t.ref)return Ac(e,t,i)}return t.flags|=1,e=oi(a,r),e.ref=t.ref,e.return=t,t.child=e}function cc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(yr(a,r)&&e.ref===t.ref){if(ic=!1,t.pendingProps=r=a,jc(e,i))e.flags&131072&&(ic=!0);else return t.lanes=e.lanes,Ac(e,t,i)}}return gc(e,t,n,r,i)}function lc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return dc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&_a(t,a===null?null:a.cachePool),a===null?Qa():Za(t,a),io(t);else return r=t.lanes=536870912,dc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&_a(t,null),Qa(),ao(t)):(_a(t,a.cachePool),Za(t,a),ao(t),t.memoizedState=null);return ac(e,t,i,n),t.child}function uc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function dc(e,t,n,r,i){var a=ga();return a=a===null?null:{parent:ia._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&_a(t,null),Qa(),io(t),e!==null&&Yi(e,t,r,!0),t.childLanes=i,null}function fc(e,t){return t=Tc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function pc(e,t,n){return Fa(t,e.child,null,n),e=fc(t,t.pendingProps),e.flags|=2,oo(t),t.memoizedState=null,e}function mc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(ji){if(r.mode===`hidden`)return e=fc(t,r),t.lanes=536870912,uc(null,e);if(ro(t),(e=Ai)?(e=_f(e,Ni),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xi===null?null:{id:Si,overflow:Ci},retryLane:536870912,hydrationErrors:null},n=di(e),n.return=t,t.child=n,ki=t,Ai=null)):e=null,e===null)throw Fi(t);return t.lanes=536870912,null}return fc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(ro(t),a){if(t.flags&256)t.flags&=-257,t=pc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(ic||Yi(e,t,n,!1),a=(n&e.childLanes)!==0,ic||a){if(r=Ul,r!==null&&(s=Qe(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,$r(e,s),Cu(r,e,s),rc;Fu(),t=pc(e,t,n)}else e=o.treeContext,Ai=xf(s.nextSibling),ki=t,ji=!0,Mi=null,Ni=!1,e!==null&&Oi(t,e),t=fc(t,r),t.flags|=4096;return t}return e=oi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function hc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function gc(e,t,n,r,i){return Zi(t),n=Co(e,t,n,r,void 0,i),r=Do(),e!==null&&!ic?(Oo(e,t,i),Ac(e,t,i)):(ji&&r&&Ei(t),t.flags|=1,ac(e,t,n,i),t.child)}function _c(e,t,n,r,i,a){return Zi(t),t.updateQueue=null,n=To(t,r,n,i),wo(e),r=Do(),e!==null&&!ic?(Oo(e,t,a),Ac(e,t,a)):(ji&&r&&Ei(t),t.flags|=1,ac(e,t,n,a),t.child)}function vc(e,t,n,r,i){if(Zi(t),t.stateNode===null){var a=ni,o=n.contextType;typeof o==`object`&&o&&(a=Qi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ws,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ra(t),o=n.contextType,a.context=typeof o==`object`&&o?Qi(o):ni,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Us(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Ws.enqueueReplaceState(a,a.state,null),Ka(t,r,a,i),Ga(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=qs(n,s);a.props=c;var l=a.context,u=n.contextType;o=ni,typeof u==`object`&&u&&(o=Qi(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Ks(t,a,r,o),La=!1;var f=t.memoizedState;a.state=f,Ka(t,r,a,i),Ga(),l=t.memoizedState,s||f!==l||La?(typeof d==`function`&&(Us(t,n,d,r),l=t.memoizedState),(c=La||Gs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,za(e,t),o=t.memoizedProps,u=qs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ni,typeof l==`object`&&l&&(c=Qi(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Ks(t,a,r,c),La=!1,f=t.memoizedState,a.state=f,Ka(t,r,a,i),Ga();var p=t.memoizedState;o!==d||f!==p||La||e!==null&&e.dependencies!==null&&Xi(e.dependencies)?(typeof s==`function`&&(Us(t,n,s,r),p=t.memoizedState),(u=La||Gs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Xi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,hc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Fa(t,e.child,null,i),t.child=Fa(t,null,n,i)):ac(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Ac(e,t,i),e}function yc(e,t,n,r){return zi(),t.flags|=256,ac(e,t,n,r),t.child}var bc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function xc(e){return{baseLanes:e,cachePool:va()}}function Sc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=nu),e}function Cc(e,t,n){var r=t.pendingProps,a=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!(so.current&2)),s&&(a=!0,t.flags&=-129),s=!!(t.flags&32),t.flags&=-33,e===null){if(ji){if(a?no(t):ao(t),(e=Ai)?(e=_f(e,Ni),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xi===null?null:{id:Si,overflow:Ci},retryLane:536870912,hydrationErrors:null},n=di(e),n.return=t,t.child=n,ki=t,Ai=null)):e=null,e===null)throw Fi(t);return yf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(ao(t),a=t.mode,c=Tc({mode:`hidden`,children:c},a),r=li(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=xc(n),r.childLanes=Sc(e,s,n),t.memoizedState=bc,uc(null,r)):(no(t),wc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(no(t),t.flags&=-257,t=Ec(e,t,n)):t.memoizedState===null?(ao(t),c=r.fallback,a=t.mode,r=Tc({mode:`visible`,children:r.children},a),c=li(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Fa(t,e.child,null,n),r=t.child,r.memoizedState=xc(n),r.childLanes=Sc(e,s,n),t.memoizedState=bc,t=uc(null,r)):(ao(t),t.child=e.child,t.flags|=128,t=null);else if(no(t),yf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Vi({value:r,source:null,stack:null}),t=Ec(e,t,n)}else if(ic||Yi(e,t,n,!1),s=(n&e.childLanes)!==0,ic||s){if(s=Ul,s!==null&&(r=Qe(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,$r(e,r),Cu(s,e,r),rc;vf(c)||Fu(),t=Ec(e,t,n)}else vf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ai=xf(c.nextSibling),ki=t,ji=!0,Mi=null,Ni=!1,e!==null&&Oi(t,e),t=wc(t,r.children),t.flags|=4096);return t}return a?(ao(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=oi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=li(c,a,n,null),c.flags|=2):c=oi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,uc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=xc(n):(a=c.cachePool,a===null?a=va():(l=ia._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Sc(e,s,n),t.memoizedState=bc,uc(e.child,r)):(no(t),n=e.child,e=n.sibling,n=oi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function wc(e,t){return t=Tc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Tc(e,t){return e=ii(22,e,null,t),e.lanes=0,e}function Ec(e,t,n){return Fa(t,e.child,null,n),e=wc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Dc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),qi(e.return,t,n)}function Oc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function kc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=so.current,s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,re(so,o),ac(e,t,r,n),r=ji?vi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Dc(e,n,t);else if(e.tag===19)Dc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&co(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Oc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&co(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Oc(t,!0,n,null,a,r);break;case`together`:Oc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Ac(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),$l|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(Yi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=oi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=oi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function jc(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Xi(e)))}function Mc(e,t,n){switch(t.tag){case 3:se(t,t.stateNode.containerInfo),Gi(t,ia,e.memoizedState.cache),zi();break;case 27:case 5:le(t);break;case 4:se(t,t.stateNode.containerInfo);break;case 10:Gi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ro(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(no(t),e=Ac(e,t,n),e===null?null:e.sibling):Cc(e,t,n):(no(t),t.flags|=128,null);no(t);break;case 19:var i=!!(e.flags&128);if(r=(n&t.childLanes)!==0,r||=(Yi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return kc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),re(so,so.current),r)break;return null;case 22:return t.lanes=0,lc(e,t,n,t.pendingProps);case 24:Gi(t,ia,e.memoizedState.cache)}return Ac(e,t,n)}function Nc(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)ic=!0;else{if(!jc(e,n)&&!(t.flags&128))return ic=!1,Mc(e,t,n);ic=!!(e.flags&131072)}}else ic=!1,ji&&t.flags&1048576&&Ti(t,vi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ta(t.elementType),t.type=e,typeof e==`function`)ai(e)?(r=qs(e,r),t.tag=1,t=vc(null,t,e,r,n)):(t.tag=0,t=gc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===x){t.tag=11,t=oc(null,t,e,r,n);break a}if(a===w){t.tag=14,t=sc(null,t,e,r,n);break a}}throw t=A(e)||e,Error(i(306,t,``))}}return t;case 0:return gc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=qs(r,t.pendingProps),vc(e,t,r,a,n);case 3:a:{if(se(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,za(e,t),Ka(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Gi(t,ia,r),r!==o.cache&&Ji(t,[ia],n,!0),Ga(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=yc(e,t,r,n);break a}if(r!==a){a=mi(Error(i(424)),t),Vi(a),t=yc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Ai=xf(e.firstChild),ki=t,ji=!0,Mi=null,Ni=!0,n=Ia(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(zi(),r===a){t=Ac(e,t,n);break a}ac(e,t,r,n)}t=t.child}return t;case 26:return hc(e,t),e===null?(n=Hf(t.type,null,t.pendingProps,null))?t.memoizedState=n:ji||(n=t.type,e=t.pendingProps,r=$d(oe.current).createElement(n),r[it]=t,r[at]=e,qd(r,n,e),_t(r),t.stateNode=r):t.memoizedState=Hf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return le(t),e===null&&ji&&(r=t.stateNode=Tf(t.type,t.pendingProps,oe.current),ki=t,Ni=!0,a=Ai,df(t.type)?(Sf=a,Ai=xf(r.firstChild)):Ai=a),ac(e,t,t.pendingProps.children,n),hc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ji&&((a=r=Ai)&&(r=hf(r,t.type,t.pendingProps,Ni),r===null?a=!1:(t.stateNode=r,ki=t,Ai=xf(r.firstChild),Ni=!1,a=!0)),a||Fi(t)),le(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,nf(a,o)?r=null:s!==null&&nf(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Co(e,t,Eo,null,null,n),dp._currentValue=a),hc(e,t),ac(e,t,r,n),t.child;case 6:return e===null&&ji&&((e=n=Ai)&&(n=gf(n,t.pendingProps,Ni),n===null?e=!1:(t.stateNode=n,ki=t,Ai=null,e=!0)),e||Fi(t)),null;case 13:return Cc(e,t,n);case 4:return se(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Fa(t,null,r,n):ac(e,t,r,n),t.child;case 11:return oc(e,t,t.type,t.pendingProps,n);case 7:return ac(e,t,t.pendingProps,n),t.child;case 8:return ac(e,t,t.pendingProps.children,n),t.child;case 12:return ac(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Gi(t,t.type,r.value),ac(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Zi(t),a=Qi(a),r=r(a),t.flags|=1,ac(e,t,r,n),t.child;case 14:return sc(e,t,t.type,t.pendingProps,n);case 15:return cc(e,t,t.type,t.pendingProps,n);case 19:return kc(e,t,n);case 31:return mc(e,t,n);case 22:return lc(e,t,n,t.pendingProps);case 24:return Zi(t),r=Qi(ia),e===null?(a=ga(),a===null&&(a=Ul,o=aa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ra(t),Gi(t,ia,a)):((e.lanes&n)!==0&&(za(e,t),Ka(t,null,null,n),Ga()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Gi(t,ia,r),r!==a.cache&&Ji(t,[ia],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Gi(t,ia,r))),ac(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Pc(e){e.flags|=4}function Fc(e,t,n,r,i){if((t=!!(e.mode&32))&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Mu())e.flags|=8192;else throw Ea=Sa,ba}}else e.flags&=-16777217}function Ic(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!rp(t)){if(Mu())e.flags|=8192;else throw Ea=Sa,ba}}function Lc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ke(),e.lanes|=t,ru|=t)}function Rc(e,t){if(!ji)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function zc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Bc(e,t,n){var r=t.pendingProps;switch(Di(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return zc(t),null;case 1:return zc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ki(ia),ce(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ri(t)?Pc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Bi())),zc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Pc(t),o===null?(zc(t),Fc(t,a,null,r,n)):(zc(t),Ic(t,o))):o?o===e.memoizedState?(zc(t),t.flags&=-16777217):(Pc(t),zc(t),Ic(t,o)):(e=e.memoizedProps,e!==r&&Pc(t),zc(t),Fc(t,a,e,r,n)),null;case 27:if(ue(t),n=oe.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Pc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return zc(t),null}e=ie.current,Ri(t)?Ii(t,e):(e=Tf(a,r,n),t.stateNode=e,Pc(t))}return zc(t),null;case 5:if(ue(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Pc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return zc(t),null}if(o=ie.current,Ri(t))Ii(t,o);else{var s=$d(oe.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[it]=t,o[at]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(qd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Pc(t)}}return zc(t),Fc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Pc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=oe.current,Ri(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ki,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[it]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Wd(e.nodeValue,n)),e||Fi(t,!0)}else e=$d(e).createTextNode(r),e[it]=t,t.stateNode=e}return zc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ri(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[it]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;zc(t),e=!1}else n=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(oo(t),t):(oo(t),null);if(t.flags&128)throw Error(i(558))}return zc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ri(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[it]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;zc(t),a=!1}else a=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(oo(t),t):(oo(t),null)}return oo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Lc(t,t.updateQueue),zc(t),null);case 4:return ce(),e===null&&Md(t.stateNode.containerInfo),zc(t),null;case 10:return Ki(t.type),zc(t),null;case 19:if(ne(so),r=t.memoizedState,r===null)return zc(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)Rc(r,!1);else{if(Ql!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=co(e),o!==null){for(t.flags|=128,Rc(r,!1),e=o.updateQueue,t.updateQueue=e,Lc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)si(n,e),n=n.sibling;return re(so,so.current&1|2),ji&&wi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ce()>lu&&(t.flags|=128,a=!0,Rc(r,!1),t.lanes=4194304)}}else{if(!a){if(e=co(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Lc(t,e),Rc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!ji)return zc(t),null}else 2*Ce()-r.renderingStartTime>lu&&n!==536870912&&(t.flags|=128,a=!0,Rc(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(zc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ce(),e.sibling=null,n=so.current,re(so,a?n&1|2:n&1),ji&&wi(t,r.treeForkCount),e);case 22:case 23:return oo(t),$a(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(zc(t),t.subtreeFlags&6&&(t.flags|=8192)):zc(t),n=t.updateQueue,n!==null&&Lc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ne(ha),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ki(ia),zc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Vc(e,t){switch(Di(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ki(ia),ce(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ue(t),null;case 31:if(t.memoizedState!==null){if(oo(t),t.alternate===null)throw Error(i(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(oo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ne(so),null;case 4:return ce(),null;case 10:return Ki(t.type),null;case 22:case 23:return oo(t),$a(),e!==null&&ne(ha),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ki(ia),null;case 25:return null;default:return null}}function Hc(e,t){switch(Di(t),t.tag){case 3:Ki(ia),ce();break;case 26:case 27:case 5:ue(t);break;case 4:ce();break;case 31:t.memoizedState!==null&&oo(t);break;case 13:oo(t);break;case 19:ne(so);break;case 10:Ki(t.type);break;case 22:case 23:oo(t),$a(),e!==null&&ne(ha);break;case 24:Ki(ia)}}function Uc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){$u(t,t.return,e)}}function Wc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){$u(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){$u(t,t.return,e)}}function Gc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ja(t,n)}catch(t){$u(e,e.return,t)}}}function Kc(e,t,n){n.props=qs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){$u(e,t,n)}}function qc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){$u(e,t,n)}}function Jc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){$u(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){$u(e,t,n)}else n.current=null}}function Yc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){$u(e,e.return,t)}}function Xc(e,t,n){try{var r=e.stateNode;Jd(r,e.type,n,t),r[at]=t}catch(t){$u(e,e.return,t)}}function Zc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&df(e.type)||e.tag===4}function Qc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Zc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&df(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function $c(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Xt));else if(r!==4&&(r===27&&df(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}function el(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&df(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(el(e,t,n),e=e.sibling;e!==null;)el(e,t,n),e=e.sibling}function tl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);qd(t,r,n),t[it]=e,t[at]=n}catch(t){$u(e,e.return,t)}}var nl=!1,rl=!1,il=!1,al=typeof WeakSet==`function`?WeakSet:Set,ol=null;function sl(e,t){if(e=e.containerInfo,Zd=bp,e=Cr(e),wr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Qd={focusedElem:e,selectionRange:n},bp=!1,ol=t;ol!==null;)if(t=ol,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,ol=e;else for(;ol!==null;){switch(t=ol,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=qs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){$u(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)mf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:mf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,ol=e;break}ol=t.return}}function cl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Cl(e,n),r&4&&Uc(5,n);break;case 1:if(Cl(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){$u(n,n.return,e)}else{var i=qs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){$u(n,n.return,e)}}}r&64&&Gc(n),r&512&&qc(n,n.return);break;case 3:if(Cl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Ja(e,t)}catch(e){$u(n,n.return,e)}}break;case 27:t===null&&r&4&&tl(n);case 26:case 5:Cl(e,n),t===null&&r&4&&Yc(n),r&512&&qc(n,n.return);break;case 12:Cl(e,n);break;case 31:Cl(e,n),r&4&&ml(e,n);break;case 13:Cl(e,n),r&4&&hl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=rd.bind(null,n),bf(e,n))));break;case 22:if(r=n.memoizedState!==null||nl,!r){t=t!==null&&t.memoizedState!==null||rl,i=nl;var a=rl;nl=r,(rl=t)&&!a?Tl(e,n,!!(n.subtreeFlags&8772)):Cl(e,n),nl=i,rl=a}break;case 30:break;default:Cl(e,n)}}function ll(e){var t=e.alternate;t!==null&&(e.alternate=null,ll(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ft(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ul=null,dl=!1;function fl(e,t,n){for(n=n.child;n!==null;)pl(e,t,n),n=n.sibling}function pl(e,t,n){if(Ne&&typeof Ne.onCommitFiberUnmount==`function`)try{Ne.onCommitFiberUnmount(Me,n)}catch{}switch(n.tag){case 26:rl||Jc(n,t),fl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:rl||Jc(n,t);var r=ul,i=dl;df(n.type)&&(ul=n.stateNode,dl=!1),fl(e,t,n),Ef(n.stateNode),ul=r,dl=i;break;case 5:rl||Jc(n,t);case 6:if(r=ul,i=dl,ul=null,fl(e,t,n),ul=r,dl=i,ul!==null){if(dl)try{(ul.nodeType===9?ul.body:ul.nodeName===`HTML`?ul.ownerDocument.body:ul).removeChild(n.stateNode)}catch(e){$u(n,t,e)}else try{ul.removeChild(n.stateNode)}catch(e){$u(n,t,e)}}break;case 18:ul!==null&&(dl?(e=ul,ff(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Kp(e)):ff(ul,n.stateNode));break;case 4:r=ul,i=dl,ul=n.stateNode.containerInfo,dl=!0,fl(e,t,n),ul=r,dl=i;break;case 0:case 11:case 14:case 15:Wc(2,n,t),rl||Wc(4,n,t),fl(e,t,n);break;case 1:rl||(Jc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Kc(n,t,r)),fl(e,t,n);break;case 21:fl(e,t,n);break;case 22:rl=(r=rl)||n.memoizedState!==null,fl(e,t,n),rl=r;break;default:fl(e,t,n)}}function ml(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Kp(e)}catch(e){$u(t,t.return,e)}}}function hl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Kp(e)}catch(e){$u(t,t.return,e)}}function gl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new al),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new al),t;default:throw Error(i(435,e.tag))}}function _l(e,t){var n=gl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=id.bind(null,e,t);t.then(r,r)}})}function vl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(df(c.type)){ul=c.stateNode,dl=!1;break a}break;case 5:ul=c.stateNode,dl=!1;break a;case 3:case 4:ul=c.stateNode.containerInfo,dl=!0;break a}c=c.return}if(ul===null)throw Error(i(160));pl(o,s,a),ul=null,dl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)bl(t,e),t=t.sibling}var yl=null;function bl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:vl(t,e),xl(e),r&4&&(Wc(3,e,e.return),Uc(3,e),Wc(5,e,e.return));break;case 1:vl(t,e),xl(e),r&512&&(rl||n===null||Jc(n,n.return)),r&64&&nl&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=yl;if(vl(t,e),xl(e),r&512&&(rl||n===null||Jc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null){if(r===null){if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[dt]||o[it]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),qd(o,r,n),o[it]=e,_t(o),r=o;break a;case`link`:var s=ep(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),qd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=ep(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),qd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[it]=e,_t(o),r=o}e.stateNode=r}else tp(a,e.type,e.stateNode)}else e.stateNode=Yf(a,r,e.memoizedProps)}else o===r?r===null&&e.stateNode!==null&&Xc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?tp(a,e.type,e.stateNode):Yf(a,r,e.memoizedProps))}break;case 27:vl(t,e),xl(e),r&512&&(rl||n===null||Jc(n,n.return)),n!==null&&r&4&&Xc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(vl(t,e),xl(e),r&512&&(rl||n===null||Jc(n,n.return)),e.flags&32){a=e.stateNode;try{Ht(a,``)}catch(t){$u(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Xc(e,a,n===null?a:n.memoizedProps)),r&1024&&(il=!0);break;case 6:if(vl(t,e),xl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){$u(e,e.return,t)}}break;case 3:if($f=null,a=yl,yl=kf(t.containerInfo),vl(t,e),yl=a,xl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Kp(t.containerInfo)}catch(t){$u(e,e.return,t)}il&&(il=!1,Sl(e));break;case 4:r=yl,yl=kf(e.stateNode.containerInfo),vl(t,e),xl(e),yl=r;break;case 12:vl(t,e),xl(e);break;case 31:vl(t,e),xl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,_l(e,r)));break;case 13:vl(t,e),xl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(su=Ce()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,_l(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=nl,d=rl;if(nl=u||a,rl=d||l,vl(t,e),rl=d,nl=u,xl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||nl||rl||wl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){$u(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){$u(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?pf(m,!0):pf(l.stateNode,!1)}catch(e){$u(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,_l(e,n))));break;case 19:vl(t,e),xl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,_l(e,r)));break;case 30:break;case 21:break;default:vl(t,e),xl(e)}}function xl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Zc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;el(e,Qc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Ht(o,``),n.flags&=-33),el(e,Qc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;$c(e,Qc(e),s);break;default:throw Error(i(161))}}catch(t){$u(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Sl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Sl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Cl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)cl(e,t.alternate,t),t=t.sibling}function wl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Wc(4,t,t.return),wl(t);break;case 1:Jc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Kc(t,t.return,n),wl(t);break;case 27:Ef(t.stateNode);case 26:case 5:Jc(t,t.return),wl(t);break;case 22:t.memoizedState===null&&wl(t);break;case 30:wl(t);break;default:wl(t)}e=e.sibling}}function Tl(e,t,n){for(n&&=!!(t.subtreeFlags&8772),t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Tl(i,a,n),Uc(4,a);break;case 1:if(Tl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){$u(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)qa(c[i],s)}catch(e){$u(r,r.return,e)}}n&&o&64&&Gc(a),qc(a,a.return);break;case 27:tl(a);case 26:case 5:Tl(i,a,n),n&&r===null&&o&4&&Yc(a),qc(a,a.return);break;case 12:Tl(i,a,n);break;case 31:Tl(i,a,n),n&&o&4&&ml(i,a);break;case 13:Tl(i,a,n),n&&o&4&&hl(i,a);break;case 22:a.memoizedState===null&&Tl(i,a,n),qc(a,a.return);break;case 30:break;default:Tl(i,a,n)}t=t.sibling}}function El(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&oa(n))}function Dl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&oa(e))}function Ol(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)kl(e,t,n,r),t=t.sibling}function kl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Ol(e,t,n,r),i&2048&&Uc(9,t);break;case 1:Ol(e,t,n,r);break;case 3:Ol(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&oa(e)));break;case 12:if(i&2048){Ol(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){$u(t,t.return,e)}}else Ol(e,t,n,r);break;case 31:Ol(e,t,n,r);break;case 13:Ol(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Ol(e,t,n,r):(a._visibility|=2,Al(e,t,n,r,!!(t.subtreeFlags&10256)||!1)):a._visibility&2?Ol(e,t,n,r):jl(e,t),i&2048&&El(o,t);break;case 24:Ol(e,t,n,r),i&2048&&Dl(t.alternate,t);break;default:Ol(e,t,n,r)}}function Al(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Al(a,o,s,c,i),Uc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Al(a,o,s,c,i)):u._visibility&2?Al(a,o,s,c,i):jl(a,o),i&&l&2048&&El(o.alternate,o);break;case 24:Al(a,o,s,c,i),i&&l&2048&&Dl(o.alternate,o);break;default:Al(a,o,s,c,i)}t=t.sibling}}function jl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:jl(n,r),i&2048&&El(r.alternate,r);break;case 24:jl(n,r),i&2048&&Dl(r.alternate,r);break;default:jl(n,r)}t=t.sibling}}var Ml=8192;function Nl(e,t,n){if(e.subtreeFlags&Ml)for(e=e.child;e!==null;)Pl(e,t,n),e=e.sibling}function Pl(e,t,n){switch(e.tag){case 26:Nl(e,t,n),e.flags&Ml&&e.memoizedState!==null&&ip(n,yl,e.memoizedState,e.memoizedProps);break;case 5:Nl(e,t,n);break;case 3:case 4:var r=yl;yl=kf(e.stateNode.containerInfo),Nl(e,t,n),yl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Ml,Ml=16777216,Nl(e,t,n),Ml=r):Nl(e,t,n));break;default:Nl(e,t,n)}}function Fl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Il(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ol=r,zl(r,e)}Fl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ll(e),e=e.sibling}function Ll(e){switch(e.tag){case 0:case 11:case 15:Il(e),e.flags&2048&&Wc(9,e,e.return);break;case 3:Il(e);break;case 12:Il(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Rl(e)):Il(e);break;default:Il(e)}}function Rl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ol=r,zl(r,e)}Fl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Wc(8,t,t.return),Rl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Rl(t));break;default:Rl(t)}e=e.sibling}}function zl(e,t){for(;ol!==null;){var n=ol;switch(n.tag){case 0:case 11:case 15:Wc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:oa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,ol=r;else a:for(n=e;ol!==null;){r=ol;var i=r.sibling,a=r.return;if(ll(r),r===n){ol=null;break a}if(i!==null){i.return=a,ol=i;break a}ol=a}}}var Bl={getCacheForType:function(e){var t=Qi(ia),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Qi(ia).controller.signal}},Vl=typeof WeakMap==`function`?WeakMap:Map,Hl=0,Ul=null,Wl=null,Gl=0,Kl=0,ql=null,Jl=!1,Yl=!1,Xl=!1,Zl=0,Ql=0,$l=0,eu=0,tu=0,nu=0,ru=0,iu=null,au=null,ou=!1,su=0,cu=0,lu=1/0,uu=null,du=null,fu=0,pu=null,mu=null,hu=0,gu=0,_u=null,vu=null,yu=0,bu=null;function xu(){return Hl&2&&Gl!==0?Gl&-Gl:M.T===null?tt():bd()}function Su(){if(nu===0){if(!(Gl&536870912)||ji){var e=Be;Be<<=1,!(Be&3932160)&&(Be=262144),nu=e}else nu=536870912}return e=eo.current,e!==null&&(e.flags|=32),nu}function Cu(e,t,n){(e===Ul&&(Kl===2||Kl===9)||e.cancelPendingCommit!==null)&&(Au(e,0),Du(e,Gl,nu,!1)),Je(e,n),(!(Hl&2)||e!==Ul)&&(e===Ul&&(!(Hl&2)&&(eu|=n),Ql===4&&Du(e,Gl,nu,!1)),fd(e))}function wu(e,t,n){if(Hl&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||We(e,t),a=r?Ru(e,t):Iu(e,t,!0),o=r;do{if(a===0){Yl&&!r&&Du(e,t,0,!1);break}if(n=e.current.alternate,o&&!Eu(n)){a=Iu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=iu;var l=c.current.memoizedState.isDehydrated;if(l&&(Au(c,s).flags|=256),s=Iu(c,s,!1),s!==2){if(Xl&&!l){c.errorRecoveryDisabledLanes|=o,eu|=o,a=4;break a}o=au,au=a,o!==null&&(au===null?au=o:au.push.apply(au,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Au(e,0),Du(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Du(r,t,nu,!Jl);break a;case 2:au=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=su+300-Ce(),10<a)){if(Du(r,t,nu,!Jl),Ue(r,0,!0)!==0)break a;hu=t,r.timeoutHandle=of(Tu.bind(null,r,n,au,uu,ou,t,nu,eu,ru,Jl,o,`Throttled`,-0,0),a);break a}Tu(r,n,au,uu,ou,t,nu,eu,ru,Jl,o,null,-0,0)}break}while(1);fd(e)}function Tu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Xt},Pl(t,a,d);var m=(a&62914560)===a?su-Ce():(a&4194048)===a?cu-Ce():0;if(m=op(d,m),m!==null){hu=a,e.cancelPendingCommit=m(Gu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Du(e,a,o,!l);return}}Gu(e,t,a,n,r,i,o,s,c)}function Eu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!vr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Du(e,t,n,r){t&=~tu,t&=~eu,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Fe(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Xe(e,n,t)}function Ou(){return Hl&6?!0:(pd(0,!1),!1)}function ku(){if(Wl!==null){if(Kl===0)var e=Wl.return;else e=Wl,Wi=Ui=null,ko(e),ka=null,Aa=0,e=Wl;for(;e!==null;)Hc(e.alternate,e),e=e.return;Wl=null}}function Au(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,sf(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),hu=0,ku(),Ul=e,Wl=n=oi(e.current,null),Gl=t,Kl=0,ql=null,Jl=!1,Yl=We(e,t),Xl=!1,ru=nu=tu=eu=$l=Ql=0,au=iu=null,ou=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Fe(r),a=1<<i;t|=e[i],r&=~a}return Zl=t,Xr(),n}function ju(e,t){uo=null,M.H=zs,t===ya||t===xa?(t=Da(),Kl=3):t===ba?(t=Da(),Kl=4):Kl=t===rc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,ql=t,Wl===null&&(Ql=1,Zs(e,mi(t,e.current)))}function Mu(){var e=eo.current;return e===null?!0:(Gl&4194048)===Gl?to===null:(Gl&62914560)===Gl||Gl&536870912?e===to:!1}function Nu(){var e=M.H;return M.H=zs,e===null?zs:e}function Pu(){var e=M.A;return M.A=Bl,e}function Fu(){Ql=4,Jl||(Gl&4194048)!==Gl&&eo.current!==null||(Yl=!0),!($l&134217727)&&!(eu&134217727)||Ul===null||Du(Ul,Gl,nu,!1)}function Iu(e,t,n){var r=Hl;Hl|=2;var i=Nu(),a=Pu();(Ul!==e||Gl!==t)&&(uu=null,Au(e,t)),t=!1;var o=Ql;a:do try{if(Kl!==0&&Wl!==null){var s=Wl,c=ql;switch(Kl){case 8:ku(),o=6;break a;case 3:case 2:case 9:case 6:eo.current===null&&(t=!0);var l=Kl;if(Kl=0,ql=null,Hu(e,s,c,l),n&&Yl){o=0;break a}break;default:l=Kl,Kl=0,ql=null,Hu(e,s,c,l)}}Lu(),o=Ql;break}catch(t){ju(e,t)}while(1);return t&&e.shellSuspendCounter++,Wi=Ui=null,Hl=r,M.H=i,M.A=a,Wl===null&&(Ul=null,Gl=0,Xr()),o}function Lu(){for(;Wl!==null;)Bu(Wl)}function Ru(e,t){var n=Hl;Hl|=2;var r=Nu(),a=Pu();Ul!==e||Gl!==t?(uu=null,lu=Ce()+500,Au(e,t)):Yl=We(e,t);a:do try{if(Kl!==0&&Wl!==null){t=Wl;var o=ql;b:switch(Kl){case 1:Kl=0,ql=null,Hu(e,t,o,1);break;case 2:case 9:if(Ca(o)){Kl=0,ql=null,Vu(t);break}t=function(){Kl!==2&&Kl!==9||Ul!==e||(Kl=7),fd(e)},o.then(t,t);break a;case 3:Kl=7;break a;case 4:Kl=5;break a;case 7:Ca(o)?(Kl=0,ql=null,Vu(t)):(Kl=0,ql=null,Hu(e,t,o,7));break;case 5:var s=null;switch(Wl.tag){case 26:s=Wl.memoizedState;case 5:case 27:var c=Wl;if(s?rp(s):c.stateNode.complete){Kl=0,ql=null;var l=c.sibling;if(l!==null)Wl=l;else{var u=c.return;u===null?Wl=null:(Wl=u,Uu(u))}break b}}Kl=0,ql=null,Hu(e,t,o,5);break;case 6:Kl=0,ql=null,Hu(e,t,o,6);break;case 8:ku(),Ql=6;break a;default:throw Error(i(462))}}zu();break}catch(t){ju(e,t)}while(1);return Wi=Ui=null,M.H=r,M.A=a,Hl=n,Wl===null?(Ul=null,Gl=0,Xr(),Ql):0}function zu(){for(;Wl!==null&&!xe();)Bu(Wl)}function Bu(e){var t=Nc(e.alternate,e,Zl);e.memoizedProps=e.pendingProps,t===null?Uu(e):Wl=t}function Vu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=_c(n,t,t.pendingProps,t.type,void 0,Gl);break;case 11:t=_c(n,t,t.pendingProps,t.type.render,t.ref,Gl);break;case 5:ko(t);default:Hc(n,t),t=Wl=si(t,Zl),t=Nc(n,t,Zl)}e.memoizedProps=e.pendingProps,t===null?Uu(e):Wl=t}function Hu(e,t,n,r){Wi=Ui=null,ko(t),ka=null,Aa=0;var i=t.return;try{if(nc(e,i,t,n,Gl)){Ql=1,Zs(e,mi(n,e.current)),Wl=null;return}}catch(t){if(i!==null)throw Wl=i,t;Ql=1,Zs(e,mi(n,e.current)),Wl=null;return}t.flags&32768?(ji||r===1?e=!0:Yl||Gl&536870912?e=!1:(Jl=e=!0,(r===2||r===9||r===3||r===6)&&(r=eo.current,r!==null&&r.tag===13&&(r.flags|=16384))),Wu(t,e)):Uu(t)}function Uu(e){var t=e;do{if(t.flags&32768){Wu(t,Jl);return}e=t.return;var n=Bc(t.alternate,t,Zl);if(n!==null){Wl=n;return}if(t=t.sibling,t!==null){Wl=t;return}Wl=t=e}while(t!==null);Ql===0&&(Ql=5)}function Wu(e,t){do{var n=Vc(e.alternate,e);if(n!==null){n.flags&=32767,Wl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Wl=e;return}Wl=e=n}while(e!==null);Ql=6,Wl=null}function Gu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Xu();while(fu!==0);if(Hl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Yr,Ye(e,n,o,s,c,l),e===Ul&&(Wl=Ul=null,Gl=0),mu=t,pu=e,hu=n,gu=o,_u=a,vu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,ad(De,function(){return Zu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=M.T,M.T=null,a=N.p,N.p=2,s=Hl,Hl|=4;try{sl(e,t,n)}finally{Hl=s,N.p=a,M.T=r}}fu=1,Ku(),qu(),Ju()}}function Ku(){if(fu===1){fu=0;var e=pu,t=mu,n=!!(t.flags&13878);if(t.subtreeFlags&13878||n){n=M.T,M.T=null;var r=N.p;N.p=2;var i=Hl;Hl|=4;try{bl(t,e);var a=Qd,o=Cr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Sr(s.ownerDocument.documentElement,s)){if(c!==null&&wr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=xr(s,h),v=xr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}bp=!!Zd,Qd=Zd=null}finally{Hl=i,N.p=r,M.T=n}}e.current=t,fu=2}}function qu(){if(fu===2){fu=0;var e=pu,t=mu,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=M.T,M.T=null;var r=N.p;N.p=2;var i=Hl;Hl|=4;try{cl(e,t.alternate,t)}finally{Hl=i,N.p=r,M.T=n}}fu=3}}function Ju(){if(fu===4||fu===3){fu=0,Se();var e=pu,t=mu,n=hu,r=vu;t.subtreeFlags&10256||t.flags&10256?fu=5:(fu=0,mu=pu=null,Yu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(du=null),et(n),t=t.stateNode,Ne&&typeof Ne.onCommitFiberRoot==`function`)try{Ne.onCommitFiberRoot(Me,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=M.T,i=N.p,N.p=2,M.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{M.T=t,N.p=i}}hu&3&&Xu(),fd(e),i=e.pendingLanes,n&261930&&i&42?e===bu?yu++:(yu=0,bu=e):yu=0,pd(0,!1)}}function Yu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,oa(t)))}function Xu(){return Ku(),qu(),Ju(),Zu()}function Zu(){if(fu!==5)return!1;var e=pu,t=gu;gu=0;var n=et(hu),r=M.T,a=N.p;try{N.p=32>n?32:n,M.T=null,n=_u,_u=null;var o=pu,s=hu;if(fu=0,mu=pu=null,hu=0,Hl&6)throw Error(i(331));var c=Hl;if(Hl|=4,Ll(o.current),kl(o,o.current,s,n),Hl=c,pd(0,!1),Ne&&typeof Ne.onPostCommitFiberRoot==`function`)try{Ne.onPostCommitFiberRoot(Me,o)}catch{}return!0}finally{N.p=a,M.T=r,Yu(e,t)}}function Qu(e,t,n){t=mi(n,t),t=$s(e.stateNode,t,2),e=Va(e,t,2),e!==null&&(Je(e,2),fd(e))}function $u(e,t,n){if(e.tag===3)Qu(e,e,n);else for(;t!==null;){if(t.tag===3){Qu(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(du===null||!du.has(r))){e=mi(n,e),n=ec(2),r=Va(t,n,2),r!==null&&(tc(n,r,t,e),Je(r,2),fd(r));break}}t=t.return}}function ed(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Vl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Xl=!0,i.add(n),e=td.bind(null,e,t,n),t.then(e,e))}function td(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ul===e&&(Gl&n)===n&&(Ql===4||Ql===3&&(Gl&62914560)===Gl&&300>Ce()-su?!(Hl&2)&&Au(e,0):tu|=n,ru===Gl&&(ru=0)),fd(e)}function nd(e,t){t===0&&(t=Ke()),e=$r(e,t),e!==null&&(Je(e,t),fd(e))}function rd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),nd(e,n)}function id(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),nd(e,n)}function ad(e,t){return ye(e,t)}var od=null,sd=null,cd=!1,ld=!1,ud=!1,dd=0;function fd(e){e!==sd&&e.next===null&&(sd===null?od=sd=e:sd=sd.next=e),ld=!0,cd||(cd=!0,B())}function pd(e,t){if(!ud&&ld){ud=!0;do for(var n=!1,r=od;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Fe(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,vd(r,a))}else a=Gl,a=Ue(r,r===Ul?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||We(r,a)||(n=!0,vd(r,a))}r=r.next}while(n);ud=!1}}function md(){hd()}function hd(){ld=cd=!1;var e=0;dd!==0&&af()&&(e=dd);for(var t=Ce(),n=null,r=od;r!==null;){var i=r.next,a=gd(r,t);a===0?(r.next=null,n===null?od=i:n.next=i,i===null&&(sd=n)):(n=r,(e!==0||a&3)&&(ld=!0)),r=i}fu!==0&&fu!==5||pd(e,!1),dd!==0&&(dd=0)}function gd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Fe(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Ge(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Ul,n=Gl,n=Ue(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Kl===2||Kl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&be(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||We(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&be(r),et(n)){case 2:case 8:n=Ee;break;case 32:n=De;break;case 268435456:n=ke;break;default:n=De}return r=_d.bind(null,e),n=ye(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&be(r),e.callbackPriority=2,e.callbackNode=null,2}function _d(e,t){if(fu!==0&&fu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Xu()&&e.callbackNode!==n)return null;var r=Gl;return r=Ue(e,e===Ul?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(wu(e,r,t),gd(e,Ce()),e.callbackNode!=null&&e.callbackNode===n?_d.bind(null,e):null)}function vd(e,t){if(Xu())return null;wu(e,t,!0)}function B(){lf(function(){Hl&6?ye(Te,md):hd()})}function bd(){if(dd===0){var e=la;e===0&&(e=ze,ze<<=1,!(ze&261888)&&(ze=256)),dd=e}return dd}function xd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Yt(``+e)}function Sd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Cd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=xd((i[at]||null).action),o=r.submitter;o&&(t=(t=o[at]||null)?xd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new vn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(dd!==0){var e=o?Sd(i,o):new FormData(i);Ts(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?Sd(i,o):new FormData(i),Ts(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var wd=0;wd<Wr.length;wd++){var Td=Wr[wd];Gr(Td.toLowerCase(),`on`+(Td[0].toUpperCase()+Td.slice(1)))}Gr(Ir,`onAnimationEnd`),Gr(Lr,`onAnimationIteration`),Gr(Rr,`onAnimationStart`),Gr(`dblclick`,`onDoubleClick`),Gr(`focusin`,`onFocus`),Gr(`focusout`,`onBlur`),Gr(zr,`onTransitionRun`),Gr(Br,`onTransitionStart`),Gr(Vr,`onTransitionCancel`),Gr(Hr,`onTransitionEnd`),xt(`onMouseEnter`,[`mouseout`,`mouseover`]),xt(`onMouseLeave`,[`mouseout`,`mouseover`]),xt(`onPointerEnter`,[`pointerout`,`pointerover`]),xt(`onPointerLeave`,[`pointerout`,`pointerover`]),bt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),bt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),bt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),bt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),bt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),bt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Ed=`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(` `),Dd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Ed));function Od(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Kr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Kr(e)}i.currentTarget=null,a=c}}}}function kd(e,t){var n=t[st];n===void 0&&(n=t[st]=new Set);var r=e+`__bubble`;n.has(r)||(Nd(t,e,2,!1),n.add(r))}function Ad(e,t,n){var r=0;t&&(r|=4),Nd(n,e,r,t)}var jd=`_reactListening`+Math.random().toString(36).slice(2);function Md(e){if(!e[jd]){e[jd]=!0,vt.forEach(function(t){t!==`selectionchange`&&(Dd.has(t)||Ad(t,!1,e),Ad(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[jd]||(t[jd]=!0,Ad(`selectionchange`,!1,t))}}function Nd(e,t,n,r){switch(Dp(t)){case 2:var i=xp;break;case 8:i=Sp;break;default:i=Cp}n=i.bind(null,t,n,e),i=void 0,!sn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Pd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=pt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}rn(function(){var r=a,i=Qt(n),s=[];a:{var c=Ur.get(e);if(c!==void 0){var l=vn,u=e;switch(e){case`keypress`:if(pn(n)===0)break a;case`keydown`:case`keyup`:l=In;break;case`focusin`:u=`focus`,l=Dn;break;case`focusout`:u=`blur`,l=Dn;break;case`beforeblur`:case`afterblur`:l=Dn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Tn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=En;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Rn;break;case Ir:case Lr:case Rr:l=On;break;case Hr:l=zn;break;case`scroll`:case`scrollend`:l=bn;break;case`wheel`:l=Bn;break;case`copy`:case`cut`:case`paste`:l=kn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Ln;break;case`toggle`:case`beforetoggle`:l=Vn}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=an(m,p),g!=null&&d.push(Fd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==Zt&&(u=n.relatedTarget||n.fromElement)&&(pt(u)||u[ot]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?pt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Tn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Ln,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:ht(l),h=u==null?c:ht(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,pt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Rd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Bd(s,c,l,d,!1),u!==null&&f!==null&&Bd(s,f,u,d,!0)}}a:{if(c=r?ht(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=sr;else if(tr(c)){if(cr)v=gr;else{v=mr;var y=pr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Kt(r.elementType)&&(v=sr):v=hr;if(v&&=v(e,r)){nr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&zt(c,`number`,c.value)}switch(y=r?ht(r):window,e){case`focusin`:(tr(y)||y.contentEditable===`true`)&&(Er=y,Dr=r,Or=null);break;case`focusout`:Or=Dr=Er=null;break;case`mousedown`:kr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:kr=!1,Ar(s,n,i);break;case`selectionchange`:if(Tr)break;case`keydown`:case`keyup`:Ar(s,n,i)}var b;if(Un)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else Zn?Yn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Kn&&n.locale!==`ko`&&(Zn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Zn&&(b=fn()):(ln=i,un=`value`in ln?ln.value:ln.textContent,Zn=!0)),y=Id(r,x),0<y.length&&(x=new An(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Xn(n),b!==null&&(x.data=b)))),(b=Gn?Qn(e,n):$n(e,n))&&(x=Id(r,`onBeforeInput`),0<x.length&&(y=new An(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),Cd(s,e,r,n,i)}Od(s,t)})}function Fd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Id(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=an(e,n),i!=null&&r.unshift(Fd(e,i,a)),i=an(e,t),i!=null&&r.push(Fd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Rd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Bd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=an(n,a),l!=null&&o.unshift(Fd(n,l,c))):i||(l=an(n,a),l!=null&&o.push(Fd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Vd=/\r\n?/g,Hd=/\u0000|\uFFFD/g;function Ud(e){return(typeof e==`string`?e:``+e).replace(Vd,`
10`).replace(Hd,``)}function Wd(e,t){return t=Ud(t),Ud(e)===t}function Gd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Ht(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Ht(e,``+r);break;case`className`:Dt(e,`class`,r);break;case`tabIndex`:Dt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Dt(e,n,r);break;case`style`:Gt(e,r,o);break;case`data`:if(t!==`object`){Dt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Yt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`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}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&Gd(e,t,`name`,a.name,a,null),Gd(e,t,`formEncType`,a.formEncType,a,null),Gd(e,t,`formMethod`,a.formMethod,a,null),Gd(e,t,`formTarget`,a.formTarget,a,null)):(Gd(e,t,`encType`,a.encType,a,null),Gd(e,t,`method`,a.method,a,null),Gd(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Yt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Xt);break;case`onScroll`:r!=null&&kd(`scroll`,e);break;case`onScrollEnd`:r!=null&&kd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Yt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInl
10ine`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:kd(`beforetoggle`,e),kd(`toggle`,e),Et(e,`popover`,r);break;case`xlinkActuate`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ot(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ot(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ot(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Et(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=qt.get(n)||n,Et(e,n,r))}}function Kd(e,t,n,r,a,o){switch(n){case`style`:Gt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Ht(e,r):(typeof r==`number`||typeof r==`bigint`)&&Ht(e,``+r);break;case`onScroll`:r!=null&&kd(`scroll`,e);break;case`onScrollEnd`:r!=null&&kd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Xt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!yt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[at]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Et(e,n,r)}}}function qd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:kd(`error`,e),kd(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Gd(e,t,o,s,n,null)}}a&&Gd(e,t,`srcSet`,n.srcSet,n,null),r&&Gd(e,t,`src`,n.src,n,null);return;case`input`:kd(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Gd(e,t,r,d,n,null)}}Rt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in kd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Gd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Bt(e,!!r,n,!0):Bt(e,!!r,t,!1);return;case`textarea`:for(s in kd(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Gd(e,t,s,c,n,null)}R(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Gd(e,t,l,r,n,null)}return;case`dialog`:kd(`beforetoggle`,e),kd(`toggle`,e),kd(`cancel`,e),kd(`close`,e);break;case`iframe`:case`object`:kd(`load`,e);break;case`video`:case`audio`:for(r=0;r<Ed.length;r++)kd(Ed[r],e);break;case`image`:kd(`error`,e),kd(`load`,e);break;case`details`:kd(`toggle`,e);break;case`embed`:case`source`:case`link`:kd(`error`,e),kd(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Gd(e,t,u,r,n,null)}return;default:if(Kt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Kd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Gd(e,t,c,r,n,null))}function Jd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Gd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Gd(e,t,p,m,r,f)}}Lt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Gd(e,t,o,null,r,l)}
vendor: 24,649 bytes, line 10
10for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Gd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Bt(e,!!n,n?[]:``,!1):Bt(e,!!n,t,!0)):Bt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Gd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Gd(e,t,s,a,r,o)}Vt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Gd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Gd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Gd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Gd(e,t,u,p,r,m)}return;default:if(Kt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Kd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Kd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Gd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Gd(e,t,f,p,r,m)}function Yd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Xd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Yd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Yd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Zd=null,Qd=null;function $d(e){return e.nodeType===9?e:e.ownerDocument}function ef(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function tf(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function nf(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var rf=null;function af(){var e=window.event;return e&&e.type===`popstate`?e!==rf&&(rf=e,!0):(rf=null,!1)}var of=typeof setTimeout==`function`?setTimeout:void 0,sf=typeof clearTimeout==`function`?clearTimeout:void 0,cf=typeof Promise==`function`?Promise:void 0,lf=typeof queueMicrotask==`function`?queueMicrotask:cf===void 0?of:function(e){return cf.resolve(null).then(e).catch(uf)};function uf(e){setTimeout(function(){throw e})}function df(e){return e===`head`}function ff(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Kp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Ef(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Ef(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[dt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Ef(e.ownerDocument.body)}n=i}while(n);Kp(t)}function pf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function mf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:mf(n),ft(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function hf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[dt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=xf(e.nextSibling),e===null)break}return null}function gf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=xf(e.nextSibling),e===null))return null;return e}function _f(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=xf(e.nextSibling),e===null))return null;return e}function vf(e){return e.data===`$?`||e.data===`$~`}function yf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function bf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function xf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var Sf=null;function Cf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return xf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function wf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function Tf(e,t,n){switch(t=$d(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Ef(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ft(e)}var Df=new Map,Of=new Set;function kf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Af=N.d;N.d={f:jf,r:Mf,D:Ff,C:If,L:Lf,m:Rf,X:Bf,S:zf,M:Vf};function jf(){var e=Af.f(),t=Ou();return e||t}function Mf(e){var t=mt(e);t!==null&&t.tag===5&&t.type===`form`?Ds(t):Af.r(e)}var Nf=typeof document>`u`?null:document;function Pf(e,t,n){var r=Nf;if(r&&typeof t==`string`&&t){var i=It(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Of.has(i)||(Of.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),qd(t,`link`,e),_t(t),r.head.appendChild(t)))}}function Ff(e){Af.D(e),Pf(`dns-prefetch`,e,null)}function If(e,t){Af.C(e,t),Pf(`preconnect`,e,t)}function Lf(e,t,n){Af.L(e,t,n);var r=Nf;if(r&&e&&t){var i=`link[rel="preload"][as="`+It(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+It(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+It(n.imageSizes)+`"]`)):i+=`[href="`+It(e)+`"]`;var a=i;switch(t){case`style`:a=Uf(e);break;case`script`:a=qf(e)}Df.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Df.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Wf(a))||t===`script`&&r.querySelector(Jf(a))||(t=r.createElement(`link`),qd(t,`link`,e),_t(t),r.head.appendChild(t)))}}function Rf(e,t){Af.m(e,t);var n=Nf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+It(r)+`"][href="`+It(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=qf(e)}if(!Df.has(a)&&(e=f({rel:`modulepreload`,href:e},t),Df.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Jf(a)))return}r=n.createElement(`link`),qd(r,`link`,e),_t(r),n.head.appendChild(r)}}}function zf(e,t,n){Af.S(e,t,n);var r=Nf;if(r&&e){var i=gt(r).hoistableStyles,a=Uf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Wf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Df.get(a))&&Zf(e,n);var c=o=r.createElement(`link`);_t(c),qd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Xf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Bf(e,t){Af.X(e,t);var n=Nf;if(n&&e){var r=gt(n).hoistableScripts,i=qf(e),a=r.get(i);a||(a=n.querySelector(Jf(i)),a||(e=f({src:e,async:!0},t),(t=Df.get(i))&&Qf(e,t),a=n.createElement(`script`),_t(a),qd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Vf(e,t){Af.M(e,t);var n=Nf;if(n&&e){var r=gt(n).hoistableScripts,i=qf(e),a=r.get(i);a||(a=n.querySelector(Jf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=Df.get(i))&&Qf(e,t),a=n.createElement(`script`),_t(a),qd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Hf(e,t,n,r){var a=(a=oe.current)?kf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Uf(n.href),n=gt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Uf(n.href);var o=gt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Wf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Df.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Df.set(e,n),o||Kf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=qf(n),n=gt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Uf(e){return`href="`+It(e)+`"`}function Wf(e){return`link[rel="stylesheet"][`+e+`]`}function Gf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Kf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),qd(t,`link`,n),_t(t),e.head.appendChild(t))}function qf(e){return`[src="`+It(e)+`"]`}function Jf(e){return`script[async]`+e}function Yf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+It(n.href)+`"]`);if(r)return t.instance=r,_t(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),_t(r),qd(r,`style`,a),Xf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Uf(n.href);var o=e.querySelector(Wf(a));if(o)return t.state.loading|=4,t.instance=o,_t(o),o;r=Gf(n),(a=Df.get(a))&&Zf(r,a),o=(e.ownerDocument||e).createElement(`link`),_t(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),qd(o,`link`,r),t.state.loading|=4,Xf(o,n.precedence,e),t.instance=o;case`script`:return o=qf(n.src),(a=e.querySelector(Jf(o)))?(t.instance=a,_t(a),a):(r=n,(a=Df.get(o))&&(r=f({},n),Qf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),_t(a),qd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Xf(r,n.precedence,e));return t.instance}function Xf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Qf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var $f=null;function ep(e,t,n){if($f===null){var r=new Map,i=$f=new Map;i.set(n,r)}else i=$f,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[dt]||a[it]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function tp(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function np(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function rp(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function ip(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Uf(r.href),a=t.querySelector(Wf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=sp.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,_t(a);return}a=t.ownerDocument||t,r=Gf(r),(i=Df.get(i))&&Zf(r,i),a=a.createElement(`link`),_t(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),qd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=sp.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var ap=0;function op(e,t){return e.stylesheets&&e.count===0&&lp(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&lp(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&ap===0&&(ap=62500*Xd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&lp(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>ap?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function sp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)lp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var cp=null;function lp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,cp=new Map,t.forEach(up,e),cp=null,sp.call(e))}function up(e,t){if(!(t.state.loading&4)){var n=cp.get(e);if(n)var r=n.get(null);else{n=new Map,cp.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=sp.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var dp={$$typeof:b,Provider:null,Consumer:null,_currentValue:P,_currentValue2:P,_threadCount:0};function fp(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=qe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qe(0),this.hiddenUpdates=qe(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function pp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new fp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ii(3,null,null,t),e.current=a,a.stateNode=e,t=aa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ra(a),e}function mp(e){return e?(e=ni,e):ni}function hp(e,t,n,r,i,a){i=mp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ba(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Va(e,r,t),n!==null&&(Cu(n,e,t),Ha(n,e,t))}function gp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function _p(e,t){gp(e,t),(e=e.alternate)&&gp(e,t)}function vp(e){if(e.tag===13||e.tag===31){var t=$r(e,67108864);t!==null&&Cu(t,e,67108864),_p(e,67108864)}}function yp(e){if(e.tag===13||e.tag===31){var t=xu();t=$e(t);var n=$r(e,t);n!==null&&Cu(n,e,t),_p(e,t)}}var bp=!0;function xp(e,t,n,r){var i=M.T;M.T=null;var a=N.p;try{N.p=2,Cp(e,t,n,r)}finally{N.p=a,M.T=i}}function Sp(e,t,n,r){var i=M.T;M.T=null;var a=N.p;try{N.p=8,Cp(e,t,n,r)}finally{N.p=a,M.T=i}}function Cp(e,t,n,r){if(bp){var i=wp(r);if(i===null)Pd(e,t,r,Tp,n),Ip(e,r);else if(Rp(i,e,t,n,r))r.stopPropagation();else if(Ip(e,r),t&4&&-1<Fp.indexOf(e)){for(;i!==null;){var a=mt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=He(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Fe(o);s.entanglements[1]|=c,o&=~c}fd(a),!(Hl&6)&&(lu=Ce()+500,pd(0,!1))}}break;case 31:case 13:s=$r(a,2),s!==null&&Cu(s,a,2),Ou(),_p(a,2)}if(a=wp(r),a===null&&Pd(e,t,r,Tp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Pd(e,t,r,null,n)}}function wp(e){return e=Qt(e),Ep(e)}var Tp=null;function Ep(e){if(Tp=null,e=pt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Tp=e,null}function Dp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`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(we()){case Te:return 2;case Ee:return 8;case De:case Oe:return 32;case ke:return 268435456;default:return 32}default:return 32}}var Op=!1,kp=null,Ap=null,jp=null,Mp=new Map,Np=new Map,Pp=[],Fp=`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 Ip(e,t){switch(e){case`focusin`:case`focusout`:kp=null;break;case`dragenter`:case`dragleave`:Ap=null;break;case`mouseover`:case`mouseout`:jp=null;break;case`pointerover`:case`pointerout`:Mp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Np.delete(t.pointerId)}}function Lp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=mt(t),t!==null&&vp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Rp(e,t,n,r,i){switch(t){case`focusin`:return kp=Lp(kp,e,t,n,r,i),!0;case`dragenter`:return Ap=Lp(Ap,e,t,n,r,i),!0;case`mouseover`:return jp=Lp(jp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Mp.set(a,Lp(Mp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Np.set(a,Lp(Np.get(a)||null,e,t,n,r,i)),!0}return!1}function zp(e){var t=pt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,nt(e.priority,function(){yp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,nt(e.priority,function(){yp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Bp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=wp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Zt=r,n.target.dispatchEvent(r),Zt=null}else return t=mt(n),t!==null&&vp(t),e.blockedOn=n,!1;t.shift()}return!0}function Vp(e,t,n){Bp(e)&&n.delete(t)}function Hp(){Op=!1,kp!==null&&Bp(kp)&&(kp=null),Ap!==null&&Bp(Ap)&&(Ap=null),jp!==null&&Bp(jp)&&(jp=null),Mp.forEach(Vp),Np.forEach(Vp)}function Up(e,n){e.blockedOn===n&&(e.blockedOn=null,Op||(Op=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Hp)))}var Wp=null;function Gp(e){Wp!==e&&(Wp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Wp===e&&(Wp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Ep(r||n)===null)continue;break}var a=mt(n);a!==null&&(e.splice(t,3),t-=3,Ts(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Kp(e){function t(t){return Up(t,e)}kp!==null&&Up(kp,e),Ap!==null&&Up(Ap,e),jp!==null&&Up(jp,e),Mp.forEac
vendor: 4,838 bytes, line 10
10h(t),Np.forEach(t);for(var n=0;n<Pp.length;n++){var r=Pp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Pp.length&&(n=Pp[0],n.blockedOn===null);)zp(n),n.blockedOn===null&&Pp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[at]||null;if(typeof a==`function`)o||Gp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[at]||null)s=o.formAction;else if(Ep(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Gp(n)}}}function qp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Jp(e){this._internalRoot=e}Yp.prototype.render=Jp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;hp(n,xu(),e,t,null,null)},Yp.prototype.unmount=Jp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;hp(e.current,2,null,e,null,null),Ou(),t[ot]=null}};function Yp(e){this._internalRoot=e}Yp.prototype.unstable_scheduleHydration=function(e){if(e){var t=tt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Pp.length&&t!==0&&t<Pp[n].priority;n++);Pp.splice(n,0,e),n===0&&zp(e)}};var Xp=n.version;if(Xp!==`19.2.6`)throw Error(i(527,Xp,`19.2.6`));N.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Zp={bundleType:0,version:`19.2.6`,rendererPackageName:`react-dom`,currentDispatcherRef:M,reconcilerVersion:`19.2.6`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Qp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qp.isDisabled&&Qp.supportsFiber)try{Me=Qp.inject(Zp),Ne=Qp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Js,s=Ys,c=Xs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=pp(e,1,!1,null,null,n,r,null,o,s,c,qp),e[ot]=t.current,Md(e),new Jp(t)}})),Vd=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Bd()})),Hd=t((e=>{var t=yd();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),Ud=t(((e,t)=>{t.exports=Hd()})),Wd=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),Gd=t(((e,t)=>{t.exports=Wd()})),Kd=Gd();function qd(){}Object.freeze([]);var Jd=Object.freeze({}),Yd=e(zd()),Xd=Ud();function Zd(e){let t=B.useRef(!0);t.current&&(t.current=!1,e())}var Qd={};function $d(e,t){let n=B.useRef(Qd);return n.current===Qd&&(n.current=e(t)),n}var ef=[];function tf(e){B.useEffect(e,ef)}var nf=0,rf=class e{static create(){return new e}currentId=nf;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=nf,t()},e)}isStarted(){return this.currentId!==nf}clear=()=>{this.currentId!==nf&&(clearTimeout(this.currentId),this.currentId=nf)};
10disposeEffect=()=>this.clear};function af(){let e=$d(rf.create).current;return tf(e.disposeEffect),e}var of=typeof document<`u`?B.useLayoutEffect:()=>{},sf=typeof navigator<`u`,cf=gf(),lf=vf(),uf=_f(),df=typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter:none`),ff=cf.platform===`MacIntel`&&cf.maxTouchPoints>1||/iP(hone|ad|od)|iOS/.test(cf.platform);sf&&/firefox/i.test(uf);var pf=sf&&/apple/i.test(navigator.vendor);sf&&/Edg/i.test(uf);var mf=sf&&/android/i.test(lf)||/android/i.test(uf);sf&&lf.toLowerCase().startsWith(`mac`)&&navigator.maxTouchPoints;var hf=uf.includes(`jsdom/`);function gf(){if(!sf)return{platform:``,maxTouchPoints:-1};let e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??-1}}function _f(){if(!sf)return``;let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}function vf(){if(!sf)return``;let e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??``}function yf(e){e.preventDefault(),e.stopPropagation()}function bf(e){return`nativeEvent`in e}function xf(e){return e.pointerType===``&&e.isTrusted?!0:mf&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function Sf(e){return hf?!1:!mf&&e.width===0&&e.height===0||mf&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function Cf(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function wf(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}function Tf(){return typeof window<`u`}function Ef(e){return kf(e)?(e.nodeName||``).toLowerCase():`#document`}function Df(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Of(e){return((kf(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function kf(e){return Tf()?e instanceof Node||e instanceof Df(e).Node:!1}function Af(e){return Tf()?e instanceof Element||e instanceof Df(e).Element:!1}function jf(e){return Tf()?e instanceof HTMLElement||e instanceof Df(e).HTMLElement:!1}function Mf(e){return!Tf()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Df(e).ShadowRoot}function Nf(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Wf(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Pf(e){return/^(table|td|th)$/.test(Ef(e))}function Ff(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var If=/transform|translate|scale|rotate|perspective|filter/,Lf=/paint|layout|strict|content/,Rf=e=>!!e&&e!==`none`,zf;function Bf(e){let t=Af(e)?Wf(e):e;return Rf(t.transform)||Rf(t.translate)||Rf(t.scale)||Rf(t.rotate)||Rf(t.perspective)||!Hf()&&(Rf(t.backdropFilter)||Rf(t.filter))||If.test(t.willChange||``)||Lf.test(t.contain||``)}function Vf(e){let t=Kf(e);for(;jf(t)&&!Uf(t);){if(Bf(t))return t;if(Ff(t))return null;t=Kf(t)}return null}function Hf(){return zf??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),zf}function Uf(e){return/^(html|body|#document)$/.test(Ef(e))}function Wf(e){return Df(e).getComputedStyle(e)}function Gf(e){return Af(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Kf(e){if(Ef(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Mf(e)&&e.host||Of(e);return Mf(t)?t.host:t}function qf(e){let t=Kf(e);return Uf(t)?e.ownerDocument?e.ownerDocument.body:e.body:jf(t)&&Nf(t)?t:qf(t)}function Jf(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=qf(e),i=r===e.ownerDocument?.body,a=Df(r);if(i){let e=Yf(a);return t.concat(a,a.visualViewport||[],Nf(r)?r:[],e&&n?Jf(e):[])}return t.concat(r,Jf(r,[],n))}function Yf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Xf=`data-base-ui-focusable`,Zf=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`;function Qf(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function $f(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;
10if(n&&Mf(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function ep(e){return`composedPath`in e?e.composedPath()[0]:e.target}function tp(e,t){if(!Af(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(`data-trigger-disabled`);for(let[,e]of t.entries())if($f(e,n))return!e.hasAttribute(`data-trigger-disabled`);return!1}function np(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function rp(e){return e.matches(`html,body`)}function ip(e){return jf(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function ap(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${Zf}`)!=null}function op(e){return e?e.getAttribute(`role`)===`combobox`&&ip(e):!1}function sp(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function cp(e,t){return t!=null&&!Cf(t)?0:typeof e==`function`?e():e}function lp(e,t,n){let r=cp(e,n);return typeof r==`number`?r:r?.[t]}function up(e,t){return t||e===`click`||e===`mousedown`}function dp(e){return e?.includes(`mouse`)&&e!==`mousedown`}var fp=`trigger-press`,pp=`trigger-hover`,mp=`outside-press`,hp=`focus-out`,gp=`escape-key`,_p=`imperative-action`;function vp(e,t,n,r){let i=!1,a=!1,o=r??Jd;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}function yp(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function bp(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function xp(e,t,n,r){let i=$d(Cp).current;return wp(i,e,t,n,r)&&Ep(i,[e,t,n,r]),i.callback}function Sp(e){let t=$d(Cp).current;return Tp(t,e)&&Ep(t,e),t.callback}function Cp(){return{callback:null,cleanup:null,refs:[]}}function wp(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function Tp(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function Ep(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null}}}}}}function Dp(e){let t=$d(Op,e).current;return t.next=e,of(t.effect),t}function Op(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var kp={...B},Ap=kp.useInsertionEffect,jp=Ap&&Ap!==kp.useLayoutEffect?Ap:e=>e();function Mp(e){let t=$d(Np).current;return t.next=e,jp(t.effect),t.trampoline}function Np(){let e={next:void 0,callback:Pp,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Pp(){}var Fp=null;globalThis.requestAnimationFrame;var Ip=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,--this.callbacksCount)}},Lp=class e{static create(){return new e}static request(e){return Ip.request(e)}static cancel(e){return Ip.cancel(e)}currentId=Fp;request(e){this.cancel(),this.currentId=Ip.request(()=>{this.currentId=Fp,e()})}cancel=()=>{this.currentId!==Fp&&(Ip.cancel(this.currentId),this.currentId=Fp)};disposeEffect=()=>this.cancel};function Rp(){let e=$d(Lp.create).current;return tf(e.disposeEffect),e}function zp(e){return e?.ownerDocument||document}var Bp={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},Vp={...Bp,position:`fixed`,top:0,left:0};({...Bp});
vendor: 4,174 bytes, line 10
10var Hp=B.forwardRef(function(e,t){let[n,r]=B.useState();of(()=>{pf&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,Kd.jsx)(`span`,{...e,ref:t,style:Vp,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})}),Up=[`top`,`right`,`bottom`,`left`],Wp=Math.min,Gp=Math.max,Kp=Math.round,qp=Math.floor,Jp=e=>({x:e,y:e}),Yp={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Xp(e,t,n){return Gp(e,Wp(t,n))}function Zp(e,t){return typeof e==`function`?e(t):e}function Qp(e){return e.split(`-`)[0]}function $p(e){return e.split(`-`)[1]}function em(e){return e===`x`?`y`:`x`}function tm(e){return e===`y`?`height`:`width`}function nm(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function rm(e){return em(nm(e))}function im(e,t,n){n===void 0&&(n=!1);let r=$p(e),i=rm(e),a=tm(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=pm(o)),[o,pm(o)]}function am(e){let t=pm(e);return[om(e),t,om(t)]}function om(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var sm=[`left`,`right`],cm=[`right`,`left`],lm=[`top`,`bottom`],um=[`bottom`,`top`];function dm(e,t,n){switch(e){case`top`:case`bottom`:return n?t?cm:sm:t?sm:cm;case`left`:case`right`:return t?lm:um;default:return[]}}function fm(e,t,n,r){let i=$p(e),a=dm(Qp(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(om)))),a}function pm(e){let t=Qp(e);return Yp[t]+e.slice(t.length)}function mm(e){return{top:0,right:0,bottom:0,left:0,...e}}function hm(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:mm(e)}function gm(e){let{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 _m(e){return e.visibility===`hidden`||e.visibility===`collapse`}function vm(e,t=e?Wf(e):null){return!e||!e.isConnected||!t||_m(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var ym=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function bm(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return Mf(n)?n.host:null}function xm(e){for(let t of Array.from(e.children))if(Ef(t)===`summary`)return t;return null}function Sm(e,t){let n=xm(t);return!!n&&(e===n||$f(n,e))}function Cm(e){let t=e?Ef(e):``;return e!=null&&e.matches(ym)&&(t!==`summary`||e.parentElement!=null&&Ef(e.parentElement)===`details`&&xm(e.parentElement)===e)&&(t!==`details`||xm(e)==null)&&(t!==`input`||e.type!==`hidden`)}function wm(e){if(!Cm(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=bm(t)){let n=t!==e,r=Ef(t)===`slot`;if(t.hasAttribute(`inert`)||n&&Ef(t)===`details`&&!t.open&&!Sm(e,t)||t.hasAttribute(`hidden`)||!r&&!Tm(t,n))return!1}return!0}function Tm(e,t){let n=Wf(e);return t?n.display!==`none`:vm(e,n)}function Em(e){let t=e.tabIndex;if(t<0){let t=Ef(e);if(t===`details`||t===`audio`||t===`video`||jf(e)&&e.isContentEditable)return 0}return t}function Dm(e){if(Ef(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function Om(e,t){let n=Dm(e);if(!n)return!0;let r=t.find(e=>{let t=Dm(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=Dm(e);return t?.name===n.name&&t.form===n.form})===n}function km(e){if(jf(e)&&Ef(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return jf(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Am(e,t){km(e).forEach(e=>{Cm(e)&&t.push(e),Am(e,t)})}function jm(e,t,n){km(e).forEach(e=>{jf(e)&&e.matches(t)&&n.push(e),jm(e,t,n)})}function Mm(e){return wm(e)&&Em(e)>=0}function Nm(e){let t=[];return Am(e,t),t.filter(wm)}function Pm(e){let t=Nm(e);return t.filter(e=>Em(e)>=0&&Om(e,t))}function Fm(e,t){let n=Pm(e),r=n.length;if(r===0)return;let i=Qf(zp(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function Im(e){return Fm(zp(e).body,1)||e}function Lm(e){return Fm(zp(e).body,-1)||e}function Rm(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!$f(n,r)}
10function zm(e){Pm(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function Bm(e){let t=[];jm(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function Vm(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...Vm(e,t.id,n)])}function Hm(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function Um(e){return`data-base-ui-${e}`}var Wm=0;function Gm(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(Wm);function a(){(!i||i())&&e?.focus({preventScroll:n})}if(r)return a(),qd;let o=requestAnimationFrame(a);return Wm=o,()=>{Wm===o&&(cancelAnimationFrame(o),Wm=0)}}var Km={inert:new WeakMap,"aria-hidden":new WeakMap},qm=`data-base-ui-inert`,Jm={inert:new WeakSet,"aria-hidden":new WeakSet},Ym=new WeakMap,Xm=0;function Zm(e){return Jm[e]}function Qm(e){return e?Mf(e)?e.host:Qm(e.parentNode):null}var $m=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=Qm(t);return e.contains(n)?n:null}).filter(e=>e!=null),eh=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},th=(e,t,n)=>{let r=[],i=e=>{e&&!n.has(e)&&Array.from(e.children).forEach(e=>{Ef(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function nh(e,t,n,r,{mark:i=!0,markerIgnoreElements:a=[]}){let o=r?`inert`:n?`aria-hidden`:null,s=null,c=null,l=$m(t,e),u=i?$m(t,a):[],d=new Set(u),f=i?th(t,eh(l),new Set(l)).filter(e=>!d.has(e)):[],p=[],m=[];if(o){let e=Km[o],n=Zm(o);c=n,s=e;let r=$m(t,Array.from(t.querySelectorAll(`[aria-live]`))),i=l.concat(r);th(t,eh(i),new Set(i)).forEach(t=>{let r=t.getAttribute(o),i=r!==null&&r!==`false`,a=(e.get(t)||0)+1;e.set(t,a),p.push(t),a===1&&i&&n.add(t),i||t.setAttribute(o,o===`inert`?``:`true`)})}return i&&f.forEach(e=>{let t=(Ym.get(e)||0)+1;Ym.set(e,t),m.push(e),t===1&&e.setAttribute(qm,``)}),Xm+=1,()=>{s&&p.forEach(e=>{let t=(s.get(e)||0)-1;s.set(e,t),t||(!c?.has(e)&&o&&e.removeAttribute(o),c?.delete(e))}),i&&m.forEach(e=>{let t=(Ym.get(e)||0)-1;Ym.set(e,t),t||e.removeAttribute(qm)}),--Xm,Xm||(Km.inert=new WeakMap,Km[`aria-hidden`]=new WeakMap,Jm.inert=new WeakSet,Jm[`aria-hidden`]=new WeakSet,Ym=new WeakMap)}}function rh(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:i=!0,markerIgnoreElements:a=[]}=t,o=zp(e[0]).body;return nh(e,o,n,r,{mark:i,markerIgnoreElements:a})}var ih=0;function ah(e,t=`mui`){let[n,r]=B.useState(e),i=e||n;return B.useEffect(()=>{n??(ih+=1,r(`${t}-${ih}`))},[n,t]),i}var oh=kp.useId;function sh(e,t){if(oh!==void 0){let n=oh();return e??(t?`${t}-${n}`:n)}return ah(e,t)}function ch(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var lh=ch(`https://base-ui.com/production-error`,`Base UI`),uh=19;function dh(e){return uh>=e}function fh(e){if(!B.isValidElement(e))return null;let t=e,n=t.props;return(dh(19)?n?.ref:t.ref)??null}function ph(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function mh(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function hh(e,t){return typeof e==`function`?e(t):e}function gh(e,t){return typeof e==`function`?e(t):e}var _h={};function vh(e,t,n,r,i){if(!n&&!r&&!i&&!e)return bh(t);let a=bh(e);return t&&(a=xh(a,t)),n&&(a=xh(a,n)),r&&(a=xh(a,r)),i&&(a=xh(a,i)),a}function yh(e){if(e.length===0)return _h;if(e.length===1)return bh(e[0]);let t=bh(e[0]);for(let n=1;n<e.length;n+=1)t=xh(t,e[n]);return t}function bh(e){return Th(e)?{...Eh(e,_h)}:Sh(e)}function xh(e,t){return Th(t)?Eh(t,e):Ch(e,t)}function Sh(e){let t={...e};for(let e in t){let n=t[e];wh(e,n)&&(t[e]=Oh(n))}return t}function Ch(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=ph(e.style,r);break;case`className`:e[n]=Ah(e.className,r);break;default:e[n]=wh(n,r)?Dh(e[n],r):r}}return e}function wh(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function Th(e){return typeof e==`function`}function Eh(e,t){return Th(e)?e(t):e??_h}function Dh(e,t){return t?e?(...n)=>{let r=n[0];if(jh(r)){let i=r;kh(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:Oh(t):e}function Oh(e){return e&&((...t)=>{let n=t[0];return jh(n)&&kh(n),e(...t)})}function kh(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Ah(e,t){return t?e?t+` `+e:t:e}function jh(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function Mh(e,t,n={}){let r=t.render,i=Nh(t,n);return n.enabled===!1?null:Ih(e,r,i,n.state??Jd)}function Nh(e,t={}){let{className:n,style:r,render:i}=e,{state:a=Jd,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?hh(n,a):void 0,d=l?gh(r,a):void 0,f=l?mh(a,c):Jd,p=l&&s?Ph(s):void 0,m=l?ph(f,p)??{}:Jd;return typeof document<`u`&&(l?m.ref=Array.isArray(o)?Sp([m.ref,fh(i),...o]):xp(m.ref,fh(i),o):xp(null,null)),l?(u!==void 0&&(m.className=Ah(m.className,u)),d!==void 0&&(m.style=ph(m.style,d)),m):Jd}function Ph(e){return Array.isArray(e)?yh(e):vh(void 0,e)}var Fh=Symbol.for(`react.lazy`);function Ih(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=vh(n,t.props);e.ref=n.ref;let i=t;return i?.$$typeof===Fh&&(i=B.Children.toArray(t)[0]),B.cloneElement(i,e)}if(e&&typeof e==`string`)return Lh(e,n);throw Error(lh(8))}function Lh(e,t){return e===`button`?(0,B.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,B.createElement)(`img`,{alt:``,...t,key:t.key}):B.createElement(e,t)}var Rh={style:{transition:`none`}},zh={fallbackAxisSide:`end`},Bh={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},Vh=B.createContext(null),Hh=()=>B.useContext(Vh),Uh=Um(`portal`);function Wh(e={}){let{ref:t,container:n,componentProps:r=Jd,elementProps:i}=e,a=sh(),o=Hh()?.portalNode,[s,c]=B.useState(null),[l,u]=B.useState(null),d=Mp(e=>{e!==null&&u(e)}),f=B.useRef(null);of(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}if(a==null)return;let e=(n&&(kf(n)?n:n.current))??o??document.body;if(e==null){f.current&&(f.current=null,u(null),c(null));return}f.current!==e&&(f.current=e,u(null),c(e))},[n,o,a]);
10let p=Mh(`div`,r,{ref:[t,d],props:[{id:a,[Uh]:``},i]});return{portalNode:l,portalSubtree:s&&p?Yd.createPortal(p,s):null}}var Gh=B.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,renderGuards:s,...c}=e,{portalNode:l,portalSubtree:u}=Wh({container:o,ref:t,componentProps:e,elementProps:c}),d=B.useRef(null),f=B.useRef(null),p=B.useRef(null),m=B.useRef(null),[h,g]=B.useState(null),_=B.useRef(!1),v=h?.modal,y=h?.open,b=typeof s==`boolean`?s:!!h&&!h.modal&&h.open&&!!l;B.useEffect(()=>{if(!l||v)return;function e(e){l&&e.relatedTarget&&Rm(e)&&(e.type===`focusin`?_.current&&=(Bm(l),!1):(zm(l),_.current=!0))}return bp(yp(l,`focusin`,e,!0),yp(l,`focusout`,e,!0))},[l,v]),B.useEffect(()=>{l&&y===!1&&(Bm(l),_.current=!1)},[y,l]);let x=B.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:p,afterInsideRef:m,portalNode:l,setFocusManagerState:g}),[l]);return(0,Kd.jsxs)(B.Fragment,{children:[u,(0,Kd.jsxs)(Vh.Provider,{value:x,children:[b&&l&&(0,Kd.jsx)(Hp,{"data-type":`outside`,ref:d,onFocus:e=>{Rm(e,l)?p.current?.focus():Lm(h?h.domReference:null)?.focus()}}),b&&l&&(0,Kd.jsx)(`span`,{"aria-owns":l.id,style:Bh}),l&&Yd.createPortal(a,l),b&&l&&(0,Kd.jsx)(Hp,{"data-type":`outside`,ref:f,onFocus:e=>{Rm(e,l)?m.current?.focus():(Im(h?h.domReference:null)?.focus(),h?.closeOnFocusOut&&h?.onOpenChange(!1,vp(`focus-out`,e.nativeEvent)))}})]})]})});function Kh(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var qh=class{nodesRef={current:[]};events=Kh();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},Jh=B.createContext(null),Yh=B.createContext(null),Xh=()=>B.useContext(Jh)?.id||null,Zh=e=>{let t=B.useContext(Yh);return e??t};function Qh(e){let t=sh(),n=Zh(e),r=Xh();return of(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function $h(e){let{children:t,id:n}=e,r=Xh();return(0,Kd.jsx)(Jh.Provider,{value:B.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function eg(e){let{children:t,externalTree:n}=e,r=$d(()=>n??new qh).current;return(0,Kd.jsx)(Yh.Provider,{value:r,children:t})}function tg(e){return e==null?e:`current`in e?e.current:e}function ng(e,t){let n=Df(ep(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||`keyboard`:`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var rg=20,ig=[];function ag(){ig=ig.filter(e=>e.deref()?.isConnected)}function og(e){ag(),e&&Ef(e)!==`body`&&(ig.push(new WeakRef(e)),ig.length>rg&&(ig=ig.slice(-20)))}function sg(){return ag(),ig[ig.length-1]?.deref()}function cg(e){return e?Mm(e)?e:Pm(e)[0]||e:null}function lg(e,t){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!t.current.includes(`floating`)&&!e.getAttribute(`role`)?.includes(`dialog`))return;let n=Nm(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return Mm(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),r=e.getAttribute(`tabindex`);t.current.includes(`floating`)||n.length===0?r!==`0`&&e.setAttribute(`tabindex`,`0`):(r!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function ug(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,restoreFocus:o=!1,modal:s=!0,closeOnFocusOut:c=!0,openInteractionType:l=``,nextFocusableElement:u,previousFocusableElement:d,beforeContentFocusGuardRef:f,externalTree:p,getInsideElements:m}=e,h=`rootStore`in t?t.rootStore:t,g=h.useState(`open`),_=h.useState(`domReferenceElement`),v=h.useState(`floatingElement`),{events:y,dataRef:b}=h.context,x=Mp(()=>b.current.floatingContext?.nodeId),S=i===!1,C=op(_)&&S,w=B.useRef([`content`]),T=Dp(i),E=Dp(a),ee=Dp(l),D=Zh(p),O=Hh(),k=B.useRef(!1),A=B.useRef(!1),j=B.useRef(!1),M=B.useRef(null),N=B.useRef(``),P=B.useRef(``),F=B.useRef(null),I=B.useRef(null),te=xp(F,f,O?.beforeInsideRef),ne=xp(I,O?.afterInsideRef),re=af(),ie=af(),ae=Rp(),oe=O!=null,L=sp(v),se=Mp((e=L)=>e?Pm(e):[]),ce=Mp(()=>m?.().filter(e=>e!=null)??[]);B.useEffect(()=>{if(r||!s)return;function e(e){e.key===`Tab`&&$f(L,Qf(zp(L)))&&se().length===0&&!C&&yf(e)}return yp(zp(L),`keydown`,e)},[r,L,s,C,se]),B.useEffect(()=>{if(r||!g)return;let e=zp(L);function t(){j.current=!1}function n(e){let t=ep(e),n=ce(),r=$f(v,t)||$f(_,t)||$f(O?.portalNode,t)||n.some(e=>e===t||$f(e,t));j.current=!r,P.current=e.pointerType||`keyboard`,t?.closest(`[data-base-ui-click-trigger]`)&&(A.current=!0)}function i(){P.current=`keyboard`}return bp(yp(e,`pointerdown`,n,!0),yp(e,`pointerup`,t,!0),yp(e,`pointercancel`,t,!0),yp(e,`keydown`,i,!0))},[r,v,_,L,g,O,ce]),B.useEffect(()=>{if(r||!c)return;let e=zp(L);function t(){A.current=!0,ie.start(0,()=>{A.current=!1})}function n(e){let t=ep(e);Mm(t)&&(M.current=t)}function i(t){let n=t.relatedTarget,r=t.currentTarget,i=ep(t);queueMicrotask(()=>{let a=x(),c=h.context.triggerElements,l=ce(),f=n?.hasAttribute(Um(`focus-guard`))&&[F.current,I.current,O?.beforeInsideRef.current,O?.afterInsideRef.current,O?.beforeOutsideRef.current,O?.afterOutsideRef.current,tg(d),tg(u)
10].includes(n),p=!($f(_,n)||$f(v,n)||$f(n,v)||$f(O?.portalNode,n)||l.some(e=>e===n||$f(e,n))||n!=null&&c.hasElement(n)||c.hasMatchingElement(e=>$f(e,n))||f||D&&(Vm(D.nodesRef.current,a).find(e=>$f(e.context?.elements.floating,n)||$f(e.context?.elements.domReference,n))||Hm(D.nodesRef.current,a).find(e=>[e.context?.elements.floating,sp(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===_&&L&&lg(L,w),o&&r!==_&&!vm(i)&&Qf(e)===e.body){if(jf(L)&&(L.focus(),o===`popup`)){ae.request(()=>{L.focus()});return}let e=se(),t=M.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||L;jf(n)&&n.focus()}if(b.current.insideReactTree){b.current.insideReactTree=!1;return}(C||!s)&&n&&p&&!A.current&&(C||n!==sg())&&(k.current=!0,h.setOpen(!1,vp(hp,t)))})}function a(){j.current||(b.current.insideReactTree=!0,re.start(0,()=>{b.current.insideReactTree=!1}))}let l=jf(_)?_:null;if(v||l)return bp(l&&yp(l,`focusout`,i),l&&yp(l,`pointerdown`,t),v&&yp(v,`focusin`,n),v&&yp(v,`focusout`,i),v&&O&&yp(v,`focusout`,a,!0))},[r,_,v,L,s,D,O,h,c,o,se,C,x,w,b,re,ie,ae,u,d,ce]),B.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(O?.portalNode?.querySelectorAll(`[${Um(`portal`)}]`)||[]),t=(D?Hm(D.nodesRef.current,x()):[]).find(e=>op(e.context?.elements.domReference||null))?.context?.elements.domReference,n=rh([v,...e,F.current,I.current,O?.beforeOutsideRef.current,O?.afterOutsideRef.current,...ce(),t,tg(d),tg(u),C?_:null].filter(e=>e!=null),{ariaHidden:s||C,mark:!1}),i=rh([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,s,O,C,D,x,u,d,ce]),of(()=>{if(!g||r||!jf(L))return;let e=zp(L),t=Qf(e);queueMicrotask(()=>{let n=T.current,r=typeof n==`function`?n(ee.current||``):n;if(r===void 0||r===!1||$f(L,t))return;let i=null,a=()=>(i??=se(L),i[0]||L),o;o=r===!0||r===null?a():tg(r),o||=a();let s=$f(L,Qf(e));Gm(o,{preventScroll:o===L,shouldFocus(){if(s)return!0;let t=Qf(e);return!(t!==o&&$f(L,t))}})})},[r,g,L,se,T,ee]),of(()=>{if(r||!L)return;let e=zp(L);og(Qf(e));function t(e){if(e.open||(N.current=ng(e.nativeEvent,P.current)),e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`&&(k.current=!0),e.reason===`outside-press`){if(e.nested)k.current=!1;else if(xf(e.nativeEvent)||Sf(e.nativeEvent))k.current=!1;else{let e=!1;zp(L).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?k.current=!1:k.current=!0}}}y.on(`openchange`,t);function n(){let e=E.current,t=typeof e==`function`?e(N.current):e;if(t===void 0||t===!1)return null;if(t===null&&(t=!0),typeof t==`boolean`)return _?.isConnected?_:sg()||null;let n=_?.isConnected?_:sg();return tg(t)||n||null}return()=>{y.off(`openchange`,t);let r=Qf(e),i=ce(),a=$f(v,r)||i.some(e=>e===r||$f(e,r))||D&&Vm(D.nodesRef.current,x(),!1).some(e=>$f(e.context?.elements.floating,r)),o=E.current,s=n();queueMicrotask(()=>{let t=cg(s),n=typeof o!=`boolean`;o&&!k.current&&jf(t)&&(n||t===r||r===e.body||a)&&t.focus({preventScroll:!0}),k.current=!1})}},[r,v,L,E,y,D,_,x,ce]),of(()=>{if(!df||g||!v)return;let e=Qf(zp(v));jf(e)&&ip(e)&&$f(v,e)&&e.blur()},[g,v]),of(()=>{if(!r&&O)return O.setFocusManagerState({modal:s,closeOnFocusOut:c,open:g,onOpenChange:h.setOpen,domReference:_}),()=>{O.setFocusManagerState(null)}},[r,O,s,g,h,c,_]),of(()=>{if(!r&&L)return lg(L,w),()=>{queueMicrotask(ag)}},[r,L,w]);let le=!r&&(!s||!C)&&(oe||s);return(0,Kd.jsxs)(B.Fragment,{children:[le&&(0,Kd.jsx)(Hp,{"data-type":`inside`,ref:te,onFocus:e=>{if(s){let e=se();Gm(e[e.length-1])}else O?.portalNode&&(k.current=!1,Rm(e,O.portalNode)?Im(_)?.focus():tg(d??O.beforeOutsideRef)?.focus())}}),n,le&&(0,Kd.jsx)(Hp,{"data-type":`inside`,ref:ne,onFocus:e=>{s?Gm(se()[0]):O?.portalNode&&(c&&(k.current=!0),Rm(e,O.portalNode)?Lm(_)?.focus():tg(u??O.afterOutsideRef)?.focus())}})]})}var dg={intentional:`onClick`,sloppy:`onPointerDown`};function fg(){return!1}function pg(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function mg(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=fg,referencePressEvent:s=`sloppy`,bubbles:c,externalTree:l}=t,u=`rootStore`in e?e.rootStore:e,d=u.useState(`open`),f=u.useState(`floatingElement`),{dataRef:p}=u.context,m=Zh(l),h=Mp(typeof i==`function`?i:()=>!1),g=typeof i==`function`?h:i,_=g!==!1,v=Mp(()=>a),{escapeKey:y,outsidePress:b}=pg(c),x=B.useRef(!1),S=B.useRef(!1),C=B.useRef(!1),w=B.useRef(!1),T=B.useRef(``),E=B.useRef(null),ee=af(),D=af(),O=Mp(()=>{D.clear(),p.current.insideReactTree=!1}),k=Mp(e=>{let t=p.current.floatingContext?.nodeId;return(m?Vm(m.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),A=Mp(e=>np(e,u.select(`floatingElement`))||np(e,u.select(`domReferenceElement`))),j=Mp(e=>{o()&&u.setOpen(!1,vp(fp,e.nativeEvent))}),M=Mp(e=>{if(!d||!n||!r||e.key!==`Escape`||w.current||!y&&k(`__escapeKeyBubbles`))return;
vendor: 5,030 bytes, line 10
10let t=vp(gp,bf(e)?e.nativeEvent:e);u.setOpen(!1,t),t.isCanceled||e.preventDefault(),!y&&!t.isPropagationAllowed&&e.stopPropagation()}),N=Mp(()=>{p.current.insideReactTree=!0,D.start(0,O)}),P=Mp(e=>{if(!d||!n||e.button!==0)return;let t=ep(e.nativeEvent);$f(u.select(`floatingElement`),t)&&(x.current||(x.current=!0,S.current=!1))}),F=Mp(e=>{d&&n&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&x.current&&(S.current=!0)});B.useEffect(()=>{if(!d||!n)return;p.current.__escapeKeyBubbles=y,p.current.__outsidePressBubbles=b;let e=new rf,t=new rf;function i(){e.clear(),w.current=!0}function a(){e.start(Hf()?5:0,()=>{w.current=!1})}function o(){C.current=!0,t.start(0,()=>{C.current=!1})}function s(){x.current=!1,S.current=!1}function c(){let e=T.current,t=e===`pen`||!e?`mouse`:e,n=v(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function l(e){let t=c();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function h(e){let t=p.current.floatingContext?.nodeId,n=m&&Vm(m.nodesRef.current,t).some(t=>np(e,t.context?.elements.floating));return A(e)||n}function D(e){if(l(e)){e.type!==`click`&&!A(e)&&(t.clear(),C.current=!1),O();return}if(p.current.insideReactTree){O();return}let n=ep(e),r=`[${Um(`inert`)}]`,i=Af(n)?n.getRootNode():null,a=Array.from((Mf(i)?i:zp(u.select(`floatingElement`))).querySelectorAll(r)),o=u.context.triggerElements;if(n&&(o.hasElement(n)||o.hasMatchingElement(e=>$f(e,n))))return;let s=Af(n)?n:null;for(;s&&!Uf(s);){let e=Kf(s);if(Uf(e)||!Af(e))break;s=e}if(!(a.length&&Af(n)&&!rp(n)&&!$f(n,u.select(`floatingElement`))&&a.every(e=>!$f(s,e)))){if(jf(n)&&!(`touches`in e)){let t=Uf(n),r=Wf(n),i=/auto|scroll/,a=t||i.test(r.overflowX),o=t||i.test(r.overflowY),s=a&&n.clientWidth>0&&n.scrollWidth>n.clientWidth,c=o&&n.clientHeight>0&&n.scrollHeight>n.clientHeight,l=r.direction===`rtl`,u=c&&(l?e.offsetX<=n.offsetWidth-n.clientWidth:e.offsetX>n.clientWidth),d=s&&e.offsetY>n.clientHeight;if(u||d)return}if(!h(e)){if(c()===`intentional`&&C.current){t.clear(),C.current=!1;return}(typeof g!=`function`||g(e))&&(k(`__outsidePressBubbles`)||(u.setOpen(!1,vp(mp,e)),O()))}}}function j(e){c()===`sloppy`&&e.pointerType!==`touch`&&u.select(`open`)&&n&&!A(e)&&D(e)}function N(e){if(c()!==`sloppy`||!u.select(`open`)||!n||A(e))return;let t=e.touches[0];t&&(E.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},ee.start(1e3,()=>{E.current&&(E.current.dismissOnTouchEnd=!1,E.current.dismissOnMouseDown=!1)}))}function P(e,t){let n=ep(e);if(!n)return;let r=yp(n,e.type,()=>{t(e),r()})}function F(e){T.current=`touch`,P(e,N)}function I(e){ee.clear(),e.type===`pointerdown`&&(T.current=e.pointerType),(e.type!==`mousedown`||!E.current||E.current.dismissOnMouseDown)&&P(e,e=>{e.type===`pointerdown`?j(e):D(e)})}function te(e){if(!x.current)return;let n=S.current;if(s(),c()===`intentional`){if(e.type===`pointercancel`){n&&o();return}if(!h(e)){if(n){o();return}(typeof g!=`function`||g(e))&&(t.clear(),C.current=!0,O())}}}function ne(e){if(c()!==`sloppy`||!E.current||A(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-E.current.startX),r=Math.abs(t.clientY-E.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(E.current.dismissOnTouchEnd=!0),i>10&&(D(e),ee.clear(),E.current=null)}function re(e){P(e,ne)}function ie(e){c()===`sloppy`&&E.current&&!A(e)&&(E.current.dismissOnTouchEnd&&D(e),ee.clear(),E.current=null)}function ae(e){P(e,ie)}let oe=zp(f),L=bp(r&&bp(yp(oe,`keydown`,M),yp(oe,`compositionstart`,i),yp(oe,`compositionend`,a)),_&&bp(yp(oe,`click`,I,!0),yp(oe,`pointerdown`,I,!0),yp(oe,`pointerup`,te,!0),yp(oe,`pointercancel`,te,!0),yp(oe,`mousedown`,I,!0),yp(oe,`mouseup`,te,!0),yp(oe,`touchstart`,F,!0),yp(oe,`touchmove`,re,!0),yp(oe,`touchend`,ae,!0)));return()=>{L(),e.clear(),t.clear(),s(),C.current=!1}},[p,f,r,_,g,d,n,y,b,M,O,v,k,A,m,u,ee]),B.useEffect(O,[g,O]);let I=B.useMemo(()=>({onKeyDown:M,[dg[s]]:j,...s!==`intentional`&&{onClick:j}}),[M,j,s]),te=B.useMemo(()=>({onKeyDown:M,onPointerDown:F,onMouseDown:F,onClickCapture:N,onMouseDownCapture(e){N(),P(e)},onPointerDownCapture(e){N(),P(e)},onMouseUpCapture:N,onTouchEndCapture:N,onTouchMoveCapture:N}),[M,N,P,F]);return B.useMemo(()=>n?{reference:I,floating:te,trigger:I}:{},[n,I,te])}function hg(e,t,n){let{reference:r,floating:i}=e,a=nm(t),o=rm(t),s=tm(o),c=Qp(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch($p(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1)}return p}async function gg(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Zp(t,e),p=hm(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=gm(await i.getClippingRect
vendor: 6,907 bytes, line 10
10({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=gm(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var _g=50,vg=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:gg},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=hg(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<_g&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=hg(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},yg=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Zp(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Qp(r),_=nm(o),v=Qp(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[pm(o)]:am(o)),x=p!==`none`;!d&&x&&b.push(...fm(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=im(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===nm(t)||T.every(e=>nm(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=nm(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function bg(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function xg(e){return Up.some(t=>e[t]>=0)}var Sg=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Zp(e,t);switch(i){case`referenceHidden`:{let e=bg(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:xg(e)}}}case`escaped`:{let e=bg(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:xg(e)}}}default:return{}}}}},Cg=new Set([`left`,`top`]);async function wg(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Qp(n),s=$p(n),c=nm(n)===`y`,l=Cg.has(o)?-1:1,u=a&&c?-1:1,d=Zp(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Tg=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await wg(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Eg=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Zp(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=nm(Qp(i)),p=em(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=Xp(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=Xp(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Dg=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Zp(e,t),u={x:n,y:r},d=nm(i),f=em(d),p=u[f],m=u[d],h=Zp(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Cg.has(Qp(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Og=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=Zp(e,t),u=await o.detectOverflow(t,l),d=Qp(i),f=$p(i),p=nm(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Wp(h-u[g],v),x=Wp(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=Gp(u.left,0),t=Gp(u.right,0),n=Gp(u.top,0),r=Gp(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:Gp(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:Gp(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function kg(e){let t=Wf(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=jf(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Kp(n)!==a||Kp(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Ag(e){return Af(e)?e:e.contextElement}function jg(e){let t=Ag(e);if(!jf(t))return Jp(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=kg(t),o=(a?Kp(n.width):n.width)/r,s=(a?Kp(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Mg=Jp(0);function Ng(e){let t=Df(e);
vendor: 5,772 bytes, line 10
10return!Hf()||!t.visualViewport?Mg:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Pg(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Df(e)?!1:t}function Fg(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Ag(e),o=Jp(1);t&&(r?Af(r)&&(o=jg(r)):o=jg(e));let s=Pg(a,n,r)?Ng(a):Jp(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=Df(a),t=r&&Af(r)?Df(r):r,n=e,i=Yf(n);for(;i&&r&&t!==n;){let e=jg(i),t=i.getBoundingClientRect(),r=Wf(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Df(i),i=Yf(n)}}return gm({width:u,height:d,x:c,y:l})}function Ig(e,t){let n=Gf(e).scrollLeft;return t?t.left+n:Fg(Of(e)).left+n}function Lg(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Ig(e,n),y:n.top+t.scrollTop}}function Rg(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Of(r),s=t?Ff(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Jp(1),u=Jp(0),d=jf(r);if((d||!d&&!a)&&((Ef(r)!==`body`||Nf(o))&&(c=Gf(r)),d)){let e=Fg(r);l=jg(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Lg(o,c):Jp(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function zg(e){return Array.from(e.getClientRects())}function Bg(e){let t=Of(e),n=Gf(e),r=e.ownerDocument.body,i=Gp(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Gp(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Ig(e),s=-n.scrollTop;return Wf(r).direction===`rtl`&&(o+=Gp(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var Vg=25;function Hg(e,t){let n=Df(e),r=Of(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Hf();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Ig(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=Vg&&(a-=o)}else l<=Vg&&(a+=l);return{width:a,height:o,x:s,y:c}}function Ug(e,t){let n=Fg(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=jf(e)?jg(e):Jp(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Wg(e,t,n){let r;if(t===`viewport`)r=Hg(e,n);else if(t===`document`)r=Bg(Of(e));else if(Af(t))r=Ug(t,n);else{let n=Ng(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return gm(r)}function Gg(e,t){let n=Kf(e);return n===t||!Af(n)||Uf(n)?!1:Wf(n).position===`fixed`||Gg(n,t)}function Kg(e,t){let n=t.get(e);if(n)return n;let r=Jf(e,[],!1).filter(e=>Af(e)&&Ef(e)!==`body`),i=null,a=Wf(e).position===`fixed`,o=a?Kf(e):e;for(;Af(o)&&!Uf(o);){let t=Wf(o),n=Bf(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Nf(o)&&!n&&Gg(e,o))?r=r.filter(e=>e!==o):i=t,o=Kf(o)}return t.set(e,r),r}function qg(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Ff(t)?[]:Kg(t,this._c):[].concat(n),r],o=Wg(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Wg(t,a[e],i);s=Gp(n.top,s),c=Wp(n.right,c),l=Wp(n.bottom,l),u=Gp(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Jg(e){let{width:t,height:n}=kg(e);return{width:t,height:n}}function Yg(e,t,n){let r=jf(t),i=Of(t),a=n===`fixed`,o=Fg(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Jp(0);function l(){c.x=Ig(i)}if(r||!r&&!a){if((Ef(t)!==`body`||Nf(i))&&(s=Gf(t)),r){let e=Fg(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l()}a&&!r&&i&&l();let u=i&&!r&&!a?Lg(i,s):Jp(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Xg(e){return Wf(e).position===`static`}function Zg(e,t){if(!jf(e)||Wf(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Of(e)===n&&(n=n.ownerDocument.body),n}function Qg(e,t){let n=Df(e);if(Ff(e))return n;if(!jf(e)){let t=Kf(e);for(;t&&!Uf(t);){if(Af(t)&&!Xg(t))return t;t=Kf(t)}return n}let r=Zg(e,t);for(;r&&Pf(r)&&Xg(r);)r=Zg(r,t);return r&&Uf(r)&&Xg(r)&&!Bf(r)?n:r||Vf(e)||n}var $g=async function(e){let t=this.getOffsetParent||Qg,n=this.getDimensions,r=await n(e.floating);return{reference:Yg(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function e_(e){return Wf(e).direction===`rtl`}var t_={convertOffsetParentRelativeRectToViewportRelativeRect:Rg,getDocumentElement:Of,getClippingRect:qg,getOffsetParent:Qg,getElementRects:$g,getClientRects:zg,getDimensions:Jg,getScale:jg,isElement:Af,isRTL:e_};function n_(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function r_(e,t){let n=null,r,i=Of(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=qp(d),h=qp(i.clientWidth-(u+f)),g=qp(i.clientHeight-(d+p)),_=qp(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Gp(0,Wp(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!n_(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function i_(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Ag(e),u=i||a?[...l?Jf(l):[],...t?Jf(t):[]]:[];
vendor: 3,736 bytes, line 10
10u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?r_(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Fg(e):null;c&&g();function g(){let t=Fg(e);h&&!n_(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var a_=Tg,o_=Eg,s_=yg,c_=Og,l_=Sg,u_=Dg,d_=(e,t,n)=>{let r=new Map,i={platform:t_,...n},a={...i.platform,_c:r};return vg(e,t,{...i,platform:a})},f_=typeof document<`u`?B.useLayoutEffect:function(){};function p_(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(!p_(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;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!p_(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function m_(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function h_(e,t){let n=m_(e);return Math.round(t*n)/n}function g_(e){let t=B.useRef(e);return f_(()=>{t.current=e}),t}function __(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=B.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=B.useState(r);p_(f,r)||p(r);let[m,h]=B.useState(null),[g,_]=B.useState(null),v=B.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=B.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=B.useRef(null),C=B.useRef(null),w=B.useRef(u),T=c!=null,E=g_(c),ee=g_(i),D=g_(l),O=B.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};ee.current&&(e.platform=ee.current),d_(S.current,C.current,e).then(e=>{let t={...e,isPositioned:D.current!==!1};k.current&&!p_(w.current,t)&&(w.current=t,Yd.flushSync(()=>{d(t)}))})},[f,t,n,ee,D]);f_(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let k=B.useRef(!1);f_(()=>(k.current=!0,()=>{k.current=!1}),[]),f_(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,O);O()}},[b,x,O,E,T]);let A=B.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),j=B.useMemo(()=>({reference:b,floating:x}),[b,x]),M=B.useMemo(()=>{let e={position:n,left:0,top:0};if(!j.floating)return e;let t=h_(j.floating,u.x),r=h_(j.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...m_(j.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,j.floating,u.x,u.y]);return B.useMemo(()=>({...u,update:O,refs:A,elements:j,floatingStyles:M}),[u,O,A,j,M])}var v_=(e,t)=>{let n=a_(e);return{name:n.name,fn:n.fn,options:[e,t]}},y_=(e,t)=>{let n=o_(e);return{name:n.name,fn:n.fn,options:[e,t]}},b_=(e,t)=>({fn:u_(e).fn,options:[e,t]}),x_=(e,t)=>{let n=s_(e);return{name:n.name,fn:n.fn,options:[e,t]}},S_=(e,t)=>{let n=c_(e);return{name:n.name,fn:n.fn,options:[e,t]}},C_=(e,t)=>{let n=l_(e);return{name:n.name,fn:n.fn,options:[e,t]}},w_=(e,t,n,r,i,a,...o)=>{if(o.length>0)throw Error(lh(1));let s;if(e&&t&&n&&r&&i&&a)s=(o,s,c,l)=>a(e(o,s,c,l),t(o,s,c,l),n(o,s,c,l),r(o,s,c,l),i(o,s,c,l),s,c,l);
10else if(e&&t&&n&&r&&i)s=(a,o,s,c)=>i(e(a,o,s,c),t(a,o,s,c),n(a,o,s,c),r(a,o,s,c),o,s,c);else if(e&&t&&n&&r)s=(i,a,o,s)=>r(e(i,a,o,s),t(i,a,o,s),n(i,a,o,s),a,o,s);else if(e&&t&&n)s=(r,i,a,o)=>n(e(r,i,a,o),t(r,i,a,o),i,a,o);else if(e&&t)s=(n,r,i,a)=>t(e(n,r,i,a),r,i,a);else if(e)s=e;else throw Error(`Missing arguments`);return s},T_=t((e=>{var t=yd(),n=Ud();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),E_=t(((e,t)=>{t.exports=T_()}))(),D_=[],O_=void 0;function k_(){return O_}function A_(e){D_.push(e)}var j_=dh(19)?P_:F_;function M_(e,t,n,r,i){return j_(e,t,n,r,i)}function N_(e,t,n,r,i){let a=B.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,Xd.useSyncExternalStore)(e.subscribe,a,a)}A_({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);(r.didChange||!Object.is(r.value,i))&&(t=!0,r.value=i,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,Xd.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function P_(e,t,n,r,i){let a=k_();if(!a)return N_(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.didChange=!0)):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i),didChange:!1},a.syncHooks.push(s)),s.value}function F_(e,t,n,r,i){return(0,E_.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var I_=class{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return M_(this,e,t,n,r)}},L_=class extends I_{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){B.useDebugValue(e);let n=this;of(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;of(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;of(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){B.useDebugValue(e);let n=this,r=t!==void 0;of(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return B.useDebugValue(e),M_(this,this.selectors[e],t,n,r)}useContextCallback(e,t){B.useDebugValue(e);let n=Mp(t??qd);this.context[e]=n}useStateSetter(e){let t=B.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},R_={open:w_(e=>e.open),transitionStatus:w_(e=>e.transitionStatus),domReferenceElement:w_(e=>e.domReferenceElement),referenceElement:w_(e=>e.positionReference??e.referenceElement),floatingElement:w_(e=>e.floatingElement),floatingId:w_(e=>e.floatingId)},z_=class extends L_{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:Kh(),nested:n,triggerElements:i},R_),this.syncOnly=t}syncOpenEvent=(e,t)=>
10{(!e||!this.state.open||t!=null&&wf(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{if(this.syncOnly){this.context.onOpenChange?.(e,t);return}this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function B_(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=t.context.triggerElements,d=o,f=B.useRef(null);r===void 0&&f.current===null&&(f.current=new z_({open:s,transitionStatus:void 0,referenceElement:c,floatingElement:l,triggerElements:u,onOpenChange:d,floatingId:i,syncOnly:!0,nested:a}));let p=r??f.current;return t.useSyncedValue(`floatingId`,i),of(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};Af(c)&&(e.domReferenceElement=c),p.state.positionReference===p.state.referenceElement&&(e.positionReference=c),p.update(e)},[s,i,c,l,p]),p.context.onOpenChange=d,p.context.nested=a,p}function V_(e,t=!1,n=!1){let[r,i]=B.useState(e&&t?`idle`:void 0),[a,o]=B.useState(e);return e&&!a&&(o(!0),i(`starting`)),!e&&a&&r!==`ending`&&!n&&i(`ending`),!e&&!a&&r===`ending`&&i(void 0),of(()=>{if(!e&&a&&r!==`ending`&&n){let e=Lp.request(()=>{i(`ending`)});return()=>{Lp.cancel(e)}}},[e,a,r,n]),of(()=>{if(!e||t)return;let n=Lp.request(()=>{i(void 0)});return()=>{Lp.cancel(n)}},[t,e]),of(()=>{if(!e||!t)return;e&&a&&r!==`idle`&&i(`starting`);let n=Lp.request(()=>{i(`idle`)});return()=>{Lp.cancel(n)}},[t,e,a,r]),{mounted:a,setMounted:o,transitionStatus:r}}var H_=function(e){return e.startingStyle=`data-starting-style`,e.endingStyle=`data-ending-style`,e}({}),U_={[H_.startingStyle]:``},W_={[H_.endingStyle]:``},G_={transitionStatus(e){return e===`starting`?U_:e===`ending`?W_:null}};function K_(e,t=!1,n=!0){let r=Rp();return Mp((i,a=null)=>{r.cancel();let o=tg(e);if(o==null)return;let s=o,c=()=>{Yd.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(s.getAnimations().map(e=>e.finished)).then(()=>{a?.aborted||c()}).catch(()=>{if(n){a?.aborted||c();return}let e=s.getAnimations();!a?.aborted&&e.length>0&&e.some(e=>e.pending||e.playState!==`finished`)&&l()})}if(t){let e=H_.startingStyle;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0});return}r.request(l)})}function q_(e){let{enabled:t=!0,open:n,ref:r,onComplete:i}=e,a=Mp(i),o=K_(r,n,!1);B.useEffect(()=>{if(!t)return;let e=new AbortController;return o(a,e.signal),()=>{e.abort()}},[t,n,a,o])}var J_={tabIndex:-1,[Xf]:``};function Y_(e,t,n=!1){let r=sh(),i=Xh()!=null,a=B.useRef(null);e===void 0&&a.current===null&&(a.current=t(r,i));let o=e??a.current;return B_({popupStore:o,treatPopupAsFloatingElement:n,floatingRootContext:o.state.floatingRootContext,floatingId:r,nested:i,onOpenChange:o.setOpen}),{store:o,internalStore:a.current}}function X_(e,t,n){let r=n?.id??null;(r||t)&&(e.activeTriggerId=r,e.activeTriggerElement=n??null)}function Z_(e){let t=e.useState(`open`);of(()=>{if(!t){e.state.triggerCount!==0&&e.set(`triggerCount`,0);return}let n=e.context.triggerElements.size,r={};if(e.state.triggerCount!==n&&(r.triggerCount=n),!e.select(`activeTriggerId`)&&n===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;r.activeTriggerId=e,r.activeTriggerElement=n}}(r.triggerCount!==void 0||r.activeTriggerId!==void 0)&&e.update(r)},[t,e,e.useState(`triggerCount`)])}function Q_(e,t,n){let{mounted:r,setMounted:i,transitionStatus:a}=V_(e);t.useSyncedValues({mounted:r,transitionStatus:a});let o=Mp(()=>{i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}),s=t.useState(`preventUnmountingOnClose`);return q_({enabled:r&&!e&&!s,open:e,ref:t.context.popupRef,onComplete(){e||o()}}),{forceUnmount:o,transitionStatus:a}}function $_(e,t){e.useSyncedValues(t),of(()=>()=>{e.update({activeTriggerProps:Jd,inactiveTriggerProps:Jd,popupProps:Jd})},[e])}function ev(e,t){of(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),of(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var tv=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){let n=this.idMap.get(e);n!==t&&(n!==void 0&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t))}delete(e){let t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(let t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function nv(){return new z_({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new tv,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function rv(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:nv(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Jd,inactiveTriggerProps:Jd,popupProps:Jd}}function iv(e,t,n=!1){return new z_({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0})}var av=w_(e=>e.triggerIdProp??e.activeTriggerId),ov=w_(e=>e.openProp??e.open),sv=w_(e=>(e.popupElement?.id??e.floatingId)||void 0);function cv(e,t){return t!==void 0&&ov(e)&&av(e)===t}function lv(e,t){return cv(e,t)?!0:t!==void 0&&ov(e)&&av(e)==null&&e.triggerCount===1}
10var uv={open:ov,mounted:w_(e=>e.mounted),transitionStatus:w_(e=>e.transitionStatus),floatingRootContext:w_(e=>e.floatingRootContext),triggerCount:w_(e=>e.triggerCount),preventUnmountingOnClose:w_(e=>e.preventUnmountingOnClose),payload:w_(e=>e.payload),activeTriggerId:av,activeTriggerElement:w_(e=>e.mounted?e.activeTriggerElement:null),popupId:sv,isTriggerActive:w_((e,t)=>t!==void 0&&av(e)===t),isOpenedByTrigger:w_((e,t)=>cv(e,t)),isMountedByTrigger:w_((e,t)=>t!==void 0&&av(e)===t&&e.mounted),triggerProps:w_((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:w_((e,t)=>lv(e,t)?sv(e):void 0),popupProps:w_(e=>e.popupProps),popupElement:w_(e=>e.popupElement),positionerElement:w_(e=>e.positionerElement)};function dv(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=sh(),a=Xh()!=null,o=$d(()=>new z_({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new tv,floatingId:i,syncOnly:!1,nested:a})).current;return of(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=Af(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}function fv(e={}){let{nodeId:t,externalTree:n}=e,r=dv(e),i=e.rootContext||r,a=i.useState(`referenceElement`),o=i.useState(`floatingElement`),s=i.useState(`domReferenceElement`),c=i.useState(`open`),l=i.useState(`floatingId`),[u,d]=B.useState(null),[f,p]=B.useState(void 0),[m,h]=B.useState(void 0),g=B.useRef(null),_=Zh(n),v=B.useMemo(()=>({reference:a,floating:o,domReference:s}),[a,o,s]),y=__({...e,elements:{...v,...u&&{reference:u}}}),b=Af(f)?f:null,x=m===void 0?i.state.floatingElement:m;i.useSyncedValue(`referenceElement`,f??null),i.useSyncedValue(`domReferenceElement`,f===void 0?s:b),i.useSyncedValue(`floatingElement`,x);let S=B.useCallback(e=>{let t=Af(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;d(t),y.refs.setReference(t)},[y.refs]),C=B.useCallback(e=>{(Af(e)||e===null)&&(g.current=e,p(e)),(Af(y.refs.reference.current)||y.refs.reference.current===null||e!==null&&!Af(e))&&y.refs.setReference(e)},[y.refs,p]),w=B.useCallback(e=>{h(e),y.refs.setFloating(e)},[y.refs]),T=B.useMemo(()=>({...y.refs,setReference:C,setFloating:w,setPositionReference:S,domReference:g}),[y.refs,C,w,S]),E=B.useMemo(()=>({...y.elements,domReference:s}),[y.elements,s]),ee=B.useMemo(()=>({...y,dataRef:i.context.dataRef,open:c,onOpenChange:i.setOpen,events:i.context.events,floatingId:l,refs:T,elements:E,nodeId:t,rootStore:i}),[y,T,E,t,i,c,l]);return of(()=>{s&&(g.current=s)},[s]),of(()=>{i.context.dataRef.current.floatingContext=ee;let e=_?.nodesRef.current.find(e=>e.id===t);e&&(e.context=ee)}),B.useMemo(()=>({...y,context:ee,refs:T,elements:E,rootStore:i}),[y,T,E,ee,i])}var pv=class e{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new rf,this.restTimeout=new rf,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},mv=new WeakMap;function hv(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&mv.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),mv.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function gv(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=mv.get(n);a&&a!==e&&hv(a),hv(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,mv.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function _v(e){let t=e.context.dataRef.current,n=$d(()=>t.hoverInteractionState??pv.create()).current;return t.hoverInteractionState||=n,tf(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function vv(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=`rootStore`in e?e.rootStore:e,o=a.useState(`open`),s=a.useState(`floatingElement`),c=a.use
10State(`domReferenceElement`),{dataRef:l}=a.context,u=Zh(),d=Xh(),f=_v(a),p=af(),m=Mp(()=>up(l.current.openEvent?.type,f.interactedInside)),h=Mp(()=>dp(l.current.openEvent?.type)),g=Mp(()=>{hv(f)});of(()=>{o||(f.pointerType=void 0,f.restTimeoutPending=!1,f.interactedInside=!1,g())},[o,f,g]),B.useEffect(()=>g,[g]),of(()=>{if(n&&o&&f.handleCloseOptions?.blockPointerEvents&&h()&&Af(c)&&s){let e=c,t=s,n=zp(s),r=u?.nodesRef.current.find(e=>e.id===d)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=f.pointerEventsScopeElement===t?null:f.pointerEventsScopeElement,a=r===t?null:r,o=f.handleCloseOptions?.getScope?.()??i??a??e.closest(`[data-rootownerid]`)??n.body;return gv(f,{scopeElement:o,referenceElement:e,floatingElement:t}),()=>{g()}}},[n,o,c,s,f,h,u,d,g]),B.useEffect(()=>{if(!n)return;function e(){return!!(u&&d&&Vm(u.nodesRef.current,d).length>0)}function t(e){let t=lp(r,`close`,f.pointerType),n=()=>{a.setOpen(!1,vp(pp,e)),u?.events.emit(`floating.closed`,e)};t?f.openChangeTimeout.start(t,n):(f.openChangeTimeout.clear(),n())}function o(e){let t=ep(e);if(!ap(t)){f.interactedInside=!1;return}f.interactedInside=t?.closest(`[aria-haspopup]`)!=null}function c(){f.openChangeTimeout.clear(),p.clear(),u?.events.off(`floating.closed`,_),g()}function h(n){if(e()&&u){u.events.on(`floating.closed`,_);return}if(tp(n.relatedTarget,a.context.triggerElements))return;let r=l.current.floatingContext?.nodeId??i,o=n.relatedTarget;if(!(u&&r&&Af(o)&&Vm(u.nodesRef.current,r,!1).some(e=>$f(e.context?.elements.floating,o)))){if(f.handler){f.handler(n);return}g(),m()||t(n)}}function _(t){u&&d&&!e()&&p.start(0,()=>{u.events.off(`floating.closed`,_),a.setOpen(!1,vp(pp,t)),u.events.emit(`floating.closed`,t)})}let v=s;return bp(v&&yp(v,`mouseenter`,c),v&&yp(v,`mouseleave`,h),v&&yp(v,`pointerdown`,o,!0),()=>{u?.events.off(`floating.closed`,_)})},[n,s,a,l,r,i,m,g,f,u,d,p])}var yv=B.createContext(void 0);function bv(e){let t=B.useContext(yv);if(t===void 0&&!e)throw Error(lh(47));return t}function xv(){return{...rv(),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1}}var Sv={...uv,disabled:w_(e=>e.disabled),instantType:w_(e=>e.instantType),openMethod:w_(e=>e.openMethod),openChangeReason:w_(e=>e.openChangeReason),modal:w_(e=>e.modal),focusManagerModal:w_(e=>e.focusManagerModal),stickIfOpen:w_(e=>e.stickIfOpen),titleElementId:w_(e=>e.titleElementId),descriptionElementId:w_(e=>e.descriptionElementId),openOnHover:w_(e=>e.openOnHover),closeDelay:w_(e=>e.closeDelay),hasViewport:w_(e=>e.hasViewport)},Cv=class e extends L_{constructor(e,t,n=!1){let r={...xv(),...e},i=new tv;r.open&&e?.mounted===void 0&&(r.mounted=!0),r.floatingRootContext=iv(i,t,n),super(r,{popupRef:B.createRef(),backdropRef:B.createRef(),internalBackdropRef:B.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:B.createRef(),beforeContentFocusGuardRef:B.createRef(),stickIfOpenTimeout:new rf,triggerElements:i},Sv)}setOpen=(e,t)=>{let n=t.reason===pp,r=t.reason===`trigger-press`&&t.event.detail===0,i=!e&&(t.reason===`escape-key`||t.reason==null);t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)};let a=this.select(`activeTriggerId`);if(!e&&t.reason===`close-press`&&t.trigger==null&&a!=null&&(t.trigger=this.context.triggerElements.getById(a)??this.select(`activeTriggerElement`)??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let o=()=>{let n={open:e,openChangeReason:t.reason};X_(n,e,t.trigger),this.update(n)};n?(this.set(`stickIfOpen`,!0),this.context.stickIfOpenTimeout.start(500,()=>{this.set(`stickIfOpen`,!1)}),Yd.flushSync(o)):o(),r||i?this.set(`instantType`,r?`click`:`dismiss`):t.reason===`focus-out`?this.set(`instantType`,`focus`):this.set(`instantType`,void 0)};static useStore(t,n){let{store:r,internalStore:i}=Y_(t,(t,r)=>new e(n,t,r));return B.useEffect(()=>i?.disposeEffect(),[i]),r}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()};function wv({props:e}){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,modal:o=!1,handle:s,triggerId:c,defaultTr
10iggerId:l=null}=e,u=Cv.useStore(s?.store,{modal:o,open:r,openProp:n,activeTriggerId:l,triggerIdProp:c});Zd(()=>{n===void 0&&u.state.open===!1&&r===!0&&u.update({open:!0,activeTriggerId:l})}),u.useControlledProp(`openProp`,n),u.useControlledProp(`triggerIdProp`,c);let d=u.useState(`open`),f=u.useState(`mounted`),p=u.useState(`payload`),m=Xh()!=null;u.useContextCallback(`onOpenChange`,i),u.useContextCallback(`onOpenChangeComplete`,a),ev(u,d),Z_(u);let{forceUnmount:h}=Q_(d,u,()=>{u.update({stickIfOpen:!0,openChangeReason:null})});u.useSyncedValues({modal:o,nested:m}),B.useEffect(()=>{d||u.context.stickIfOpenTimeout.clear()},[u,d]);let g=B.useCallback(()=>{u.setOpen(!1,vp(_p))},[u]);B.useImperativeHandle(e.actionsRef,()=>({unmount:h,close:g}),[h,g]);let _=d||f,v=B.useMemo(()=>({store:u}),[u]);return(0,Kd.jsxs)(yv.Provider,{value:v,children:[_&&(0,Kd.jsx)(Ev,{store:u,modal:o}),typeof t==`function`?t({payload:p}):t]})}function Tv(e){return bv(!0)?(0,Kd.jsx)(wv,{props:e}):(0,Kd.jsx)(eg,{children:(0,Kd.jsx)(wv,{props:e})})}function Ev({store:e,modal:t}){let n=mg(e.useState(`floatingRootContext`),{outsidePressEvent:{mouse:t===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}});return $_(e,{activeTriggerProps:n.reference??Jd,inactiveTriggerProps:n.trigger??Jd,popupProps:B.useMemo(()=>vh(J_,n.floating),[n.floating])}),null}var Dv=function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=H_.startingStyle]=`startingStyle`,e[e.endingStyle=H_.endingStyle]=`endingStyle`,e.anchorHidden=`data-anchor-hidden`,e.side=`data-side`,e.align=`data-align`,e}({}),Ov=function(e){return e.popupOpen=`data-popup-open`,e.pressed=`data-pressed`,e}({});Ov.popupOpen,Ov.popupOpen,Ov.pressed;var kv={[Dv.open]:``},Av={[Dv.closed]:``},jv={[Dv.anchorHidden]:``},Mv={open(e){return e?kv:Av},anchorHidden(e){return e?jv:null}},Nv=B.createContext(void 0);function Pv(){let e=B.useContext(Nv);if(e===void 0)throw Error(lh(45));return e}var Fv=B.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=bv();return i.useState(`mounted`)||n?(0,Kd.jsx)(Nv.Provider,{value:n,children:(0,Kd.jsx)(Gh,{ref:t,...r})}):null});function Iv(e){return dh(19)?e:e?`true`:void 0}var Lv=B.createContext(void 0);function Rv(){let e=B.useContext(Lv);if(!e)throw Error(lh(46));return e}var zv=B.createContext(void 0);function Bv(){return B.useContext(zv)?.direction??`ltr`}var Vv=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0,offsetParent:d=`real`}=Zp(e,t)||{};if(l==null)return{};let f=hm(u),p={x:n,y:r},m=rm(i),h=tm(m),g=await o.getDimensions(l),_=m===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,b=_?`clientHeight`:`clientWidth`,x=a.reference[h]+a.reference[m]-p[m]-a.floating[h],S=p[m]-a.reference[m],C=d===`real`?await o.getOffsetParent?.(l):s.floating,w=s.floating[b]||a.floating[h];(!w||!await o.isElement?.(C))&&(w=s.floating[b]||a.floating[h]);let T=x/2-S/2,E=w/2-g[h]/2-1,ee=Math.min(f[v],E),D=Math.min(f[y],E),O=ee,k=w-g[h]-D,A=w/2-g[h]/2+T,j=Xp(O,A,k),M=!c.arrow&&$p(i)!=null&&A!==j&&a.reference[h]/2-(A<O?ee:D)-g[h]/2<0,N=M?A<O?A-O:A-k:0;return{[m]:p[m]+N,data:{[m]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),Hv=(e,t)=>({...Vv(e),options:[e,t]}),Uv={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:(await C_().fn(e)).data?.referenceHidden||a}}}},Wv={sideX:`left`,sideY:`top`},Gv={name:`adaptiveOrigin`,async fn(e){let{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:a,strategy:o,placement:s}=e,c=Df(i),l=c.getComputedStyle(i);if(l.transitionDuration===`0s`||l.transitionDuration===``)return{x:t,y:n,data:Wv};let u=await a.getOffsetParent?.(i),d={width:0,height:0};if(o===`fixed`&&c?.visualViewport)d={width:c.visualViewport.width,height:c.visualViewport.height};else if(u===c){let e=zp(i);d={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await a.isElement?.(u)&&(d=await a.getDimensions(u));let f=Qp(s),p=t,m=n;f===`left`&&(p=d.width-(t+r.width)),f===`top`&&(m=d.height-(n+r.height));let h=f===`left`?`right`:Wv.sideX,g=f===`top`?`bottom`:Wv.sideY;return{x:p,y:m,data:{sideX:h,sideY:g}}}};function Kv(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function qv(e,t,n){let{rects:r,placement:i}=e;return{side:Kv(t,Qp(i),n),align:$p(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Jv(e){let{anchor:t,positionMethod:n=`absolute`,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,collisionBoundary:s,collisionPadding:c=5,sticky:l=!1,arrowPadding:u=5,disableAnchorTracking:d=!1,inl
vendor: 4,262 bytes, line 10
10ine:f,keepMounted:p=!1,floatingRootContext:m,mounted:h,collisionAvoidance:g,shiftCrossAxis:_=!1,nodeId:v,adaptiveOrigin:y,lazyFlip:b=!1,externalTree:x}=e,[S,C]=B.useState(null);!h&&S!==null&&C(null);let w=g.side||`flip`,T=g.align||`flip`,E=g.fallbackAxisSide||`end`,ee=typeof t==`function`?t:void 0,D=Mp(ee),O=ee?D:t,k=Dp(t),A=Dp(h),j=Bv()===`rtl`,M=S||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":j?`left`:`right`,"inline-start":j?`right`:`left`}[r],N=a===`center`?M:`${M}-${a}`,P=c,F=+(r===`bottom`),I=+(r===`top`),te=+(r===`right`),ne=+(r===`left`);typeof P==`number`?P={top:P+F,right:P+ne,bottom:P+I,left:P+te}:P&&={top:(P.top||0)+F,right:(P.right||0)+ne,bottom:(P.bottom||0)+I,left:(P.left||0)+te};let re={boundary:s===`clipping-ancestors`?`clippingAncestors`:s,padding:P},ie=B.useRef(null),ae=Dp(i),oe=Dp(o),L=typeof i==`function`?0:i,se=typeof o==`function`?0:o,ce=[];f&&ce.push(f),ce.push(v_(e=>{let t=qv(e,r,j),n=typeof ae.current==`function`?ae.current(t):ae.current,i=typeof oe.current==`function`?oe.current(t):oe.current;return{mainAxis:n,crossAxis:i,alignmentAxis:i}},[L,se,j,r]));let le=T===`none`&&w!==`shift`,ue=!le&&(l||_||w===`shift`),de=w===`none`?null:x_({...re,padding:{top:P.top+1,right:P.right+1,bottom:P.bottom+1,left:P.left+1},mainAxis:!_&&w===`flip`,crossAxis:T===`flip`&&`alignment`,fallbackAxisSideDirection:E}),fe=le?null:y_(e=>{let t=zp(e.elements.floating).documentElement;return{...re,rootBoundary:_?{x:0,y:0,width:t.clientWidth,height:t.clientHeight}:void 0,mainAxis:T!==`none`,crossAxis:ue,limiter:l||_?void 0:b_(e=>{if(!ie.current)return{};let{width:t,height:n}=ie.current.getBoundingClientRect(),r=nm(Qp(e.placement)),i=r===`y`?t:n,a=r===`y`?P.left+P.right:P.top+P.bottom;return{offset:i/2+a/2}})}},[re,l,_,P,T]);w===`shift`||T===`shift`||a===`center`?ce.push(fe,de):ce.push(de,fe),ce.push(S_({...re,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!A.current)return;let i=e.style;i.setProperty(`--available-width`,`${t}px`),i.setProperty(`--available-height`,`${n}px`);let a=Df(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(`--anchor-width`,`${u}px`),i.setProperty(`--anchor-height`,`${d}px`)}}),Hv(e=>({element:ie.current||zp(e.elements.floating).createElement(`div`),padding:u,offsetParent:`floating`}),[u]),{name:`transformOrigin`,fn(e){let{elements:t,middlewareData:n,placement:a,rects:o,y:s}=e,c=Qp(a),l=nm(c),u=ie.current,d=n.arrow?.x||0,f=n.arrow?.y||0,p=u?.clientWidth||0,m=u?.clientHeight||0,h=d+p/2,g=f+m/2,_=Math.abs(n.shift?.y||0),v=o.reference.height/2,y=typeof i==`function`?i(qv(e,r,j)):i,b=_>y,x={top:`${h}px calc(100% + ${y}px)`,bottom:`${h}px ${-y}px`,left:`calc(100% + ${y}px) ${g}px`,right:`${-y}px ${g}px`}[c],S=`${h}px ${o.reference.y+v-s}px`;return t.floating.style.setProperty(`--transform-origin`,ue&&l===`y`&&b?S:x),{}}},Uv,y),of(()=>{!h&&m&&m.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[h,m]);let pe=B.useMemo(()=>({elementResize:!d&&typeof ResizeObserver<`u`,layoutShift:!d&&typeof IntersectionObserver<`u`}),[d]),{refs:me,elements:he,x:ge,y:_e,middlewareData:ve,update:ye,placement:be,context:xe,isPositioned:Se,floatingStyles:Ce}=fv({rootContext:m,open:p?h:void 0,placement:N,middleware:ce,strategy:n,whileElementsMounted:p?void 0:(...e)=>i_(...e,pe),nodeId:v,externalTree:x}),{sideX:we,sideY:Te}=ve.adaptiveOrigin||Wv,Ee=Se?n:`fixed`,De=B.useMemo(()=>{let e=y?{position:Ee,[we]:ge,[Te]:_e}:{position:Ee,...Ce};return Se||(e.opacity=0),e},[y,Ee,we,ge,Te,_e,Ce,Se]),Oe=B.useRef(null);of(()=>{if(!h)return;let e=k.current,t=typeof e==`function`?e():e,n=(Yv(t)?t.current:t)||null;n!==Oe.current&&(me.setPositionReference(n),Oe.current=n)},[h,me,O,k]),B.useEffect(()=>{if(!h)return;let e=k.current;typeof e!=`function`&&Yv(e)&&e.current!==Oe.current&&(me.setPositionReference(e.current),Oe.current=e.current)},[h,me,O,k]),B.useEffect(()=>{if(p&&h&&he.domReference&&he.floating)return i_(he.domReference,he.floating,ye,pe)},[p,h,he,ye,pe]);let ke=Qp(be),Ae=Kv(r,ke,j),je=$p(be)||`center`,Me=!!ve.hide?.referenceHidden;of(()=>{b&&h&&Se&&C(ke)},[b,h,Se,ke]);let Ne=B.useMemo(()=>
10({position:`absolute`,top:ve.arrow?.y,left:ve.arrow?.x}),[ve.arrow]),Pe=ve.arrow?.centerOffset!==0;return B.useMemo(()=>({positionerStyles:De,arrowStyles:Ne,arrowRef:ie,arrowUncentered:Pe,side:Ae,align:je,physicalSide:ke,anchorHidden:Me,refs:me,context:xe,isPositioned:Se,update:ye}),[De,Ne,ie,Pe,Ae,je,ke,Me,me,xe,Se,ye])}function Yv(e){return e!=null&&`current`in e}var Xv=B.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,Kd.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})});function Zv(e){return e===`starting`?Rh:Jd}function Qv(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),Mh(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},Zv(r),i],stateAttributesMapping:Mv})}var $v={},ey={},ty=``;function ny(e){if(typeof document>`u`)return!1;let t=zp(e);return Df(t).innerWidth-t.documentElement.clientWidth>0}function ry(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=zp(e),n=t.documentElement,r=t.body,i=Nf(n)?n:r,a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function iy(e){let t=zp(e),n=t.documentElement,r=t.body,i=Nf(n)?n:r,a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function ay(e){let t=zp(e),n=t.documentElement,r=t.body,i=Df(n),a=0,o=0,s=!1,c=Lp.create();if(df&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,$v={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},ty=n.style.scrollBehavior,ey={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=Nf(n)?n:r;if(s=ry(e),s){n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflow:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`}function u(){Object.assign(n.style,$v),Object.assign(r.style,ey),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=ty)}function d(){u(),c.request(l)}l();let f=yp(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var oy=new class{lockCount=0;restore=null;timeoutLock=rf.create();timeoutUnlock=rf.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=zp(e).documentElement,n=Df(t).getComputedStyle(t).overflowY;if(n===`hidden`||n===`clip`){this.restore=qd;return}let r=ff||!ny(e);this.restore=r?iy(e):ay(e)}};function sy(e=!0,t=null){of(()=>{if(e)return oy.acquire(t)},[e,t])}var cy=20;function ly(e,t,n,r){let[i,a]=B.useState(!1);of(()=>{if(!e||!t||n==null){a(!1);return}let r=zp(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-cy)},[e,t,n]),sy(e&&(!t||i),r)}var uy=B.forwardRef(function(e,t){let{render:n,className:r,style:i,anchor:a,positionMethod:o=`absolute`,side:s=`bottom`,align:c=`center`,sideOffset:l=0,alignOffset:u=0,collisionBoundary:d=`clipping-ancestors`,collisionPadding:f=5,arrowPadding:p=5,sticky:m=!1,disableAnchorTracking:h=!1,collisionAvoidance:g=zh,..._}=e,{store:v}=bv(),y=Pv(),b=Qh(),x=v.useState(`floatingRootContext`),S=v.useState(`mounted`),C=v.useState(`open`),w=v.useState(`openChangeReason`),T=v.useState(`activeTriggerElement`),E=v.useState(`modal`),ee=v.useState(`openMethod`),D=v.useState(`positionerElement`),O=v.useState(`instantType`),k=v.useState(`transitionStatus`),A=v.useState(`hasViewport`),j=B.useRef(null),M=K_(D,!1,!1),N=Jv({anchor:a,floatingRootContext:x,positionMethod:o,mounted:S,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:p,collisionBoundary:d,collisionPadding:f,sticky:m,disableAnchorTracking:h,keepMounted:y,nodeId:b,collisionAvoidance:g,adaptiveOrigin:A?Gv:void 0}),P=x.useState(`domReferenceElement`);of(()=>{let e=P,t=j.current;if(e&&(j.current=e),t&&e&&e!==t){v.set(`instantType`,void 0);let e=new AbortController;return M(()=>{v.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[P,M,v]),ly(C&&E===!0&&w!==`trigger-hover`,ee===`touch`,D,T);let F=B.useCallback(e=>{v.set(`positionerElement`,e)},[v]),I=Qv(e,{open:C,side:N.side,align:N.align,anchorHidden:N.anchorHidden,instant:O},{styles:N.positionerStyles,transitionStatus:k,props:_,refs:[t,F],hidden:!S,inert:!C});return(0,Kd.jsxs)(Lv.Provider,{value:N,children:[S&&E===!0&&w!==`trigger-hover`&&(0,Kd.jsx)(Xv,{ref:v.context.
10internalBackdropRef,inert:Iv(!C),cutout:T}),(0,Kd.jsx)($h,{id:b,children:I})]})}),dy=`ArrowUp`,fy=`ArrowDown`,py=`ArrowLeft`,my=`ArrowRight`,hy=`Home`,gy=new Set([py,my]),_y=new Set([dy,fy]),vy=new Set([...gy,..._y]),yy=new Set([...vy,hy,`End`]),by=B.createContext(void 0);function xy(e){let t=B.useContext(by);if(t===void 0&&!e)throw Error(lh(69));return t}var Sy=B.createContext(void 0);function Cy(){let[e,t]=B.useState(0),n=Mp(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:B.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}function wy(e){let{value:t,children:n}=e;return(0,Kd.jsx)(Sy.Provider,{value:t,children:n})}var Ty={...Mv,...G_},Ey=B.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,{store:c}=bv(),l=Rv(),u=xy(!0)!=null,{context:d,hasClosePart:f}=Cy(),p=c.useState(`open`),m=c.useState(`openMethod`),h=c.useState(`instantType`),g=c.useState(`transitionStatus`),_=c.useState(`popupProps`),v=c.useState(`titleElementId`),y=c.useState(`descriptionElementId`),b=c.useState(`modal`),x=c.useState(`mounted`),S=c.useState(`openChangeReason`),C=c.useState(`activeTriggerElement`),w=c.useState(`floatingRootContext`),T=w.useState(`floatingId`),E=c.useState(`disabled`),ee=c.useState(`openOnHover`),D=c.useState(`closeDelay`),O=s.id??T;q_({open:p,ref:c.context.popupRef,onComplete(){p&&c.context.onOpenChangeComplete?.(!0)}}),vv(w,{enabled:ee&&!E,closeDelay:D});function k(e){return e!==`touch`||c.context.popupRef.current}let A=a===void 0?k:a,j=b!==!1&&f;c.useSyncedValue(`focusManagerModal`,j);let M=B.useCallback(e=>{c.set(`popupElement`,e)},[c]),N=Mh(`div`,e,{state:{open:p,side:l.side,align:l.align,instant:h,transitionStatus:g},ref:[t,c.context.popupRef,M],props:[_,{id:O,role:`dialog`,...J_,"aria-labelledby":v,"aria-describedby":y,onKeyDown(e){u&&yy.has(e.key)&&e.stopPropagation()}},Zv(g),s],stateAttributesMapping:Ty});return(0,Kd.jsx)(ug,{context:w,openInteractionType:m,modal:j,disabled:!x||S===`trigger-hover`,initialFocus:A,returnFocus:o,restoreFocus:`popup`,previousFocusableElement:jf(C)?C:void 0,nextFocusableElement:c.context.triggerFocusTargetRef,beforeContentFocusGuardRef:c.context.beforeContentFocusGuardRef,children:(0,Kd.jsx)(wy,{value:d,children:N})})});function Dy(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function a(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&a(t);n&&(i[e]=[t].concat(n))}return i[e]}return Object.keys(n).concat(Object.keys(r)).forEach(a),i}var Oy=Object.freeze({left:0,top:0,width:16,height:16}),ky=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Ay=Object.freeze({...Oy,...ky}),jy=Object.freeze({...Ay,body:``,hidden:!1});function My(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function Ny(e,t){let n=My(e,t);for(let r in jy)r in ky?r in e&&!(r in n)&&(n[r]=ky[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function Py(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=Ny(r[e]||i[e],a)}return o(t),n.forEach(o),Ny(e,a)}function Fy(e,t){let n=[];if(typeof e!=`object`||typeof e.icons!=`object`)return n;e.not_found instanceof Array&&e.not_found.forEach(e=>{t(e,null),n.push(e)});let r=Dy(e);for(let i in r){let a=r[i];a&&(t(i,Py(e,i,a)),n.push(i))}return n}var Iy={provider:``,aliases:{},not_found:{},...Oy};function Ly(e,t){for(let n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function Ry(e){if(typeof e!=`object`||!e)return null;let t=e;if(typeof t.prefix!=`string`||!e.icons||typeof e.icons!=`object`||!Ly(e,Iy))return null;let n=t.icons;for(let e in n){let t=n[e];if(!e||typeof t.body!=`string`||!Ly(t,jy))return null}let r=t.aliases||Object.create(null);for(let e in r){let t=r[e],i=t.parent;if(!e||typeof i!=`string`||!n[i]&&!r[i]||!Ly(t,jy))return null}return t}var zy=Object.create(null);function By(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Vy(e,t){let n=zy[e]||(zy[e]=Object.create(null));return n[t]||(n[t]=By(e,t))}function Hy(e,t){return Ry(t)?Fy(t,(t,n)=>{n?e.icons[t]=n:e.missing.add(t)}):[]}function Uy(e,t,n){try{if(typeof n.body==`string`)return e.icons[t]={...n},!0}catch{}return!1}var Wy=/^[a-z0-9]+(-[a-z0-9]+)*$/,Gy=(e,t,n,r=``)=>{let i=e.split(`:`);
vendor: 11,160 bytes, line 10
10if(e.slice(0,1)===`@`){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!Ky(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!Ky(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!Ky(e,n)?null:e}return null},Ky=(e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1,qy=!1;function Jy(e){return typeof e==`boolean`&&(qy=e),qy}function Yy(e){let t=typeof e==`string`?Gy(e,!0,qy):e;if(t){let e=Vy(t.provider,t.prefix),n=t.name;return e.icons[n]||(e.missing.has(n)?null:void 0)}}function Xy(e,t){let n=Gy(e,!0,qy);if(!n)return!1;let r=Vy(n.provider,n.prefix);return t?Uy(r,n.name,t):(r.missing.add(n.name),!0)}function Zy(e,t){if(typeof e!=`object`)return!1;if(typeof t!=`string`&&(t=e.provider||``),qy&&!t&&!e.prefix){let t=!1;return Ry(e)&&(e.prefix=``,Fy(e,(e,n)=>{Xy(e,n)&&(t=!0)})),t}let n=e.prefix;return Ky({prefix:n,name:`a`})?!!Hy(Vy(t,n),e):!1}var Qy=Object.freeze({width:null,height:null}),$y=Object.freeze({...Qy,...ky}),eb=/(-?[0-9.]*[0-9]+[0-9.]*)/g,tb=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function nb(e,t,n){if(t===1)return e;if(n||=100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(eb);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=tb.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}function rb(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(`</`+t);if(i===-1||a===-1)break;let o=e.indexOf(`>`,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}function ib(e,t){return e?`<defs>`+e+`</defs>`+t:t}function ab(e,t,n){let r=rb(e);return ib(r.defs,t+r.content+n)}var ob=e=>e===`unset`||e===`undefined`||e===`none`;function sb(e,t){let n={...Ay,...e},r={...$y,...t},i={left:n.left,top:n.top,width:n.width,height:n.height},a=n.body;[n,r].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,o=e.rotate;n?r?o+=2:(t.push(`translate(`+(i.width+i.left).toString()+` `+(0-i.top).toString()+`)`),t.push(`scale(-1 1)`),i.top=i.left=0):r&&(t.push(`translate(`+(0-i.left).toString()+` `+(i.height+i.top).toString()+`)`),t.push(`scale(1 -1)`),i.top=i.left=0);let s;switch(o<0&&(o-=Math.floor(o/4)*4),o%=4,o){case 1:s=i.height/2+i.top,t.unshift(`rotate(90 `+s.toString()+` `+s.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(i.width/2+i.left).toString()+` `+(i.height/2+i.top).toString()+`)`);break;case 3:s=i.width/2+i.left,t.unshift(`rotate(-90 `+s.toString()+` `+s.toString()+`)`)}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),t.length&&(a=ab(a,`<g transform="`+t.join(` `)+`">`,`</g>`))});let o=r.width,s=r.height,c=i.width,l=i.height,u,d;o===null?(d=s===null?`1em`:s===`auto`?l:s,u=nb(d,c/l)):(u=o===`auto`?c:o,d=s===null?nb(u,l/c):s===`auto`?l:s);let f={},p=(e,t)=>{ob(t)||(f[e]=t.toString())};p(`width`,u),p(`height`,d);let m=[i.left,i.top,c,l];return f.viewBox=m.join(` `),{attributes:f,viewBox:m,body:a}}var cb=/\sid="(\S+)"/g,lb=`IconifyId`+Date.now().toString(16)+(Math.random()*16777216|0).toString(16),ub=0;function db(e,t=lb){let n=[],r;for(;r=cb.exec(e);)n.push(r[1]);if(!n.length)return e;let i=`suffix`+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(n=>{let r=typeof t==`function`?t(n):t+(ub++).toString(),a=n.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);e=e.replace(RegExp(`([#;"])(`+a+`)([")]|\\.[a-z])`,`g`),`$1`+r+i+`$3`)}),e=e.replace(new RegExp(i,`g`),``),e}var fb=Object.create(null);function pb(e,t){fb[e]=t}function mb(e){return fb[e]||fb[``]}function hb(e){let t;if(typeof e.resources==`string`)t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||`/`,maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}for(var gb=Object.create(null),_b=[`https://api.simplesvg.com`,`https://api.unisvg.com`],vb=[];_b.length>0;)_b.length===1||Math.random()>.5?vb.push(_b.shift()):vb.push(_b.pop());gb[``]=hb({resources:[`https://api.iconify.design`].concat(vb)});function yb(e,t){let n=hb(t);return n!==null&&(gb[e]=n,!0)}function bb(e){return gb[e]}var xb=(()=>{let e;try{if(e=fetch,typeof e==`function`)return e}catch{}})();function Sb(e,t){let n=bb(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let e=0;n.resources.forEach(t=>{e=Math.max(e,t.length)});let i=t+`.json?icons=`;r=n.maxURL-e-n.path.length-i.length}return r}function Cb(e){return e===404}var wb=(e,t,n)=>{let r=[],i=Sb(e,t),a=`icons`,o={type:a,provider:e,prefix:t,icons:[]},s=0;return n.forEach((n,c)=>{s+=n.length+1,s>=i&&c>0&&(r.push(o),o={type:a,provider:e,prefix:t,icons:[]},s=n.length),o.icons.push(n)}),r.push(o),r};function Tb(e){if(typeof e==`string`){let t=bb(e);if(t)return t.path}return`/`}var Eb={prepare:wb,send:(e,t,n)=>{if(!xb){n(`abort`,424);return}let r=Tb(t.provider);switch(t.type){case`icons`:{let e=t.prefix,n=t.icons.join(`,`),i=new URLSearchParams({icons:n});r+=e+`.json?`+i.toString();break}case`custom`:{let e=t.uri;r+=e.slice(0,1)===`/`?e.slice(1):e;break}default:n(`abort`,400);return}let i=503;xb(e+r).then(e=>{let t=e.status;if(t!==200){setTimeout(()=>{n(Cb(t)?`abort`:`next`,t)});return}return i=501,e.json()}).then(e=>{if(typeof e!=`object`||!e){setTimeout(()=>{e===404?n(`abort`,e):n(`next`,i)});return}setTimeout(()=>{n(`success`,e)})}).catch(()=>{n(`next`,i)})}};function Db(e,t){e.forEach(e=>{let n=e.loaderCallbacks;n&&(e.loaderCallbacks=n.filter(e=>e.id!==t))})}function Ob(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;let t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1,r=e.provider,i=e.prefix;t.forEach(t=>{let a=t.icons,o=a.pending.length;a.pending=a.pending.filter(t=>{if(t.prefix!==i)return!0;let o=t.name;if(e.icons[o])a.loaded.push({provider:r,prefix:i,name:o});else if(e.missing.has(o))a.missing.push({provider:r,prefix:i,name:o});else return n=!0,!0;return!1}),a.pending.length!==o&&(n||Db([e],t.id),t.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),t.abort))})}))}var kb=0;function Ab(e,t,n){let r=kb++,i=Db.bind(null,n,r);if(!t.pending.length)return i;let a={id:r,icons:t,callback:e,abort:i};return n.forEach(e=>{(e.loaderCallbacks||=[]).push(a)}),i}function jb(e){let t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((e,t)=>e.provider===t.provider?e.prefix===t.prefix?e.name.localeCompare(t.name):e.prefix.localeCompare(t.prefix):e.provider.localeCompare(t.provider));let r={provider:``,prefix:``,name:``};return e.forEach(e=>{if(r.name===e.name&&r.prefix===e.prefix&&r.provider===e.provider)return;r=e;let i=e.provider,a=e.prefix,o=e.name,s=n[i]||(n[i]=Object.create(null)),c=s[a]||(s[a]=Vy(i,a)),l;l=o in c.icons?t.loaded:a===``||c.missing.has(o)?t.missing:t.pending;let u={provider:i,prefix:a,name:o};l.push(u)}),t}function Mb(e,t=!0,n=!1){let r=[];return e.forEach(e=>{let i=typeof e==`string`?Gy(e,t,n):e;i&&r.push(i)}),r}var Nb={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Pb(e,t,n,r){let i=e.resources.length,a=e.random?Math.floor(Math.random()*i):e.index,o;if(e.random){let t=e.resources.slice(0);for(o=[];t.length>1;){let e=Math.floor(Math.random()*t.length);o.push(t[e]),t=t.slice(0,e).concat(t.slice(e+1))}o=o.concat(t)}else o=e.resources.slice(a).concat(e.resources.slice(0,a));let s=Date.now(),c=`pending`,l=0,u,d=null,f=[],p=[];typeof r==`function`&&p.push(r);function m(){d&&=(clearTimeout(d),null)}function h(){c===`pending`&&(c=`aborted`),m(),f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function g(e,t){t&&(p=[]),typeof e==`function`&&p.push(e)}function _(){return{startTime:s,payload:t,status:c,queriesSent:l,queriesPending:f.length,subscribe:g,abort:h}}function v(){c=`failed`,p.forEach(e=>{e(void 0,u)})}function y(){f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function b(t,n,r){let i=n!==`success`;switch(f=f.filter(e=>e!==t),c){case`pending`:break;case`failed`:if(i||!e.dataAfterTimeout)return;break;default:return}if(n===`abort`){u=r,v();return}if(i){u=r,f.length||(o.length?x():v());return}if(m(),y(),!e.random){let n=e.resources.indexOf(t.resource);n!==-1&&n!==e.index&&(e.index=n)}c=`completed`,p.forEach(e=>{e(r)})}function x(){if(c!==`pending`)return;m();let r=o.shift();if(r===void 0){if(f.length){d=setTimeout(()=>{m(),c===`pending`&&(y(),v())},e.timeout);return}v();return}let i={status:`pending`,resource:r,callback:(e,t)=>{b(i,e,t)}};f.push(i),l++,d=setTimeout(x,e.rotate),n(r,t,i.callback)}return setTimeout(x),_}function Fb(e){let t={...Nb,...e},n=[];function r(){n=n.filter(e=>e().status===`pending`)}function i(e,i,a){let o=Pb(t,e,i,(e,t)=>{r(),a&&a(e,t)});return n.push(o),o}function a(e){return n.find(t=>e(t))||null}return{query:i,find:a,setIndex:e=>{t.index=e},getIndex:()=>t.index,cleanup:r}}function Ib(){}var Lb=Object.create(null);function Rb(e){if(!Lb[e]){let t=bb(e);if(!t)return;Lb[e]={config:t,redundancy:Fb(t)}}return Lb[e]}function zb(e,t,n){let r,i;if(typeof e==`string`){let t=mb(e);if(!t)return n(void 0,424),Ib;i=t.send;let a=Rb(e);a&&(r=a.redundancy)}else{let t=hb(e);if(t){r=Fb(t);let n=mb(e.resources?e.resources[0]:``);n&&(i=n.send)}}return!r||!i?(n(void 0,424),Ib):r.query(t,i,n)().abort}function Bb(){}function Vb(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Ob(e)}))}function Hb(e){let t=[],n=[];return e.forEach(e=>{(e.match(Wy)?t:n).push(e)}),{valid:t,invalid:n}}function Ub(e,t,n){function r(){let n=e.pendingIcons;t.forEach(t=>{n&&n.delete(t),e.icons[t]||e.missing.add(t)})}if(n&&typeof n==`object`)try{if(!Hy(e,n).length){r();return}}catch(e){console.error(e)}r(),Vb(e)}function Wb(e,t){e instanceof Promise?e.then(e=>{t(e)}).catch(()=>{t(null)}):t(e)}function Gb(e,t){e.iconsToLoad=e.iconsToLoad?e.iconsToLoad.concat(t).sort():t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;let{provider:t,prefix:n}=e,r=e.iconsToLoad;if(delete e.iconsToLoad,!r||!r.length)return;let i=e.loadIcon;if(e.loadIcons&&(r.length>1||!i)){Wb(e.loadIcons(r,n,t),t=>{Ub(e,r,t)});return}if(i){r.forEach(r=>{Wb(i(r,n,t),t=>{Ub(e,[r],t?{prefix:n,icons:{[r]:t}}:null)})});return}let{valid:a,invalid:o}=Hb(r);if(o.length&&Ub(e,o,null),!a.length)return;let s=n.match(Wy)?mb(t):null;if(!s){Ub(e,a,null);return}s.prepare(t,n,a).forEach(n=>{zb(t,n,t=>{Ub(e,n.icons,t)})})}))}var Kb=(e,t)=>{let n=jb(Mb(e,!0,Jy()));if(!n.pending.length){let e=!0;return t&&setTimeout(()=>{e&&t(n.loaded,n.missing,n.pending,Bb)}),()=>{e=!1}}let r=Object.create(null),i=[],a,o;return n.pending.forEach(e=>{let{provider:t,prefix:n}=e;if(n===o&&t===a)return;a=t,o=n,i.push(Vy(t,n));let s=r[t]||(r[t]=Object.create(null));s[n]||(s[n]=[])}),n.pending.forEach(e=>{let{provider:t,prefix:n,name:i}=e,a=Vy(t,n),o=a.pendingIcons||=new Set;o.has(i)||(o.add(i),r[t][n].push(i))}
10),i.forEach(e=>{let t=r[e.provider][e.prefix];t.length&&Gb(e,t)}),t?Ab(t,n,i):Bb};function qb(e,t){let n={...e};for(let e in t){let r=t[e],i=typeof r;e in Qy?(r===null||r&&(i===`string`||i===`number`))&&(n[e]=r):i===typeof n[e]&&(n[e]=e===`rotate`?r%4:r)}return n}var Jb=/[\s,]+/;function Yb(e,t){t.split(Jb).forEach(t=>{switch(t.trim()){case`horizontal`:e.hFlip=!0;break;case`vertical`:e.vFlip=!0}})}function Xb(e,t=0){let n=e.replace(/^-?[0-9.]*/,``);function r(e){for(;e<0;)e+=4;return e%4}if(n===``){let t=parseInt(e);return isNaN(t)?0:r(t)}if(n!==e){let t=0;switch(n){case`%`:t=25;break;case`deg`:t=90}if(t){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i/=t,i%1==0?r(i):0)}}return t}function Zb(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return`<svg xmlns="http://www.w3.org/2000/svg"`+n+`>`+e+`</svg>`}function Qb(e){return e.replace(/"/g,`'`).replace(/%/g,`%25`).replace(/#/g,`%23`).replace(/</g,`%3C`).replace(/>/g,`%3E`).replace(/\s+/g,` `)}function $b(e){return`data:image/svg+xml,`+Qb(e)}function ex(e){return`url("`+$b(e)+`")`}var tx;function nx(){try{tx=window.trustedTypes.createPolicy(`iconify`,{createHTML:e=>e})}catch{tx=null}}function rx(e){return tx===void 0&&nx(),tx?tx.createHTML(e):e}var ix={...$y,inline:!1},ax={xmlns:`http://www.w3.org/2000/svg`,xmlnsXlink:`http://www.w3.org/1999/xlink`,"aria-hidden":!0,role:`img`},ox={display:`inline-block`},sx={backgroundColor:`currentColor`},cx={backgroundColor:`transparent`},lx={Image:`var(--svg)`,Repeat:`no-repeat`,Size:`100% 100%`},ux={WebkitMask:sx,mask:sx,background:cx};for(let e in ux){let t=ux[e];for(let n in lx)t[e+n]=lx[n]}var dx={...ix,inline:!0};function fx(e){return e+(e.match(/^[-0-9.]+$/)?`px`:``)}var px=(e,t,n)=>{let r=t.inline?dx:ix,i=qb(r,t),a=t.mode||`svg`,o={},s=t.style||{},c={...a===`svg`?ax:{}};
10if(n){let e=Gy(n,!1,!0);if(e){let t=[`iconify`];for(let n of[`provider`,`prefix`])e[n]&&t.push(`iconify--`+e[n]);c.className=t.join(` `)}}for(let e in t){let n=t[e];if(n!==void 0)switch(e){case`icon`:case`style`:case`children`:case`onLoad`:case`mode`:case`ssr`:case`fallback`:break;case`_ref`:c.ref=n;break;case`className`:c[e]=(c[e]?c[e]+` `:``)+n;break;case`inline`:case`hFlip`:case`vFlip`:i[e]=n===!0||n===`true`||n===1;break;case`flip`:typeof n==`string`&&Yb(i,n);break;case`color`:o.color=n;break;case`rotate`:typeof n==`string`?i[e]=Xb(n):typeof n==`number`&&(i[e]=n);break;case`ariaHidden`:case`aria-hidden`:n!==!0&&n!==`true`&&delete c[`aria-hidden`];break;default:r[e]===void 0&&(c[e]=n)}}let l=sb(e,i),u=l.attributes;if(i.inline&&(o.verticalAlign=`-0.125em`),a===`svg`){c.style={...o,...s},Object.assign(c,u);let e=0,n=t.id;return typeof n==`string`&&(n=n.replace(/-/g,`_`)),c.dangerouslySetInnerHTML={__html:rx(db(l.body,n?()=>n+`ID`+e++:`iconifyReact`))},(0,B.createElement)(`svg`,c)}let{body:d,width:f,height:p}=e,m=a===`mask`||a!==`bg`&&d.indexOf(`currentColor`)!==-1,h=Zb(d,{...u,width:f+``,height:p+``});return c.style={...o,"--svg":ex(h),width:fx(u.width),height:fx(u.height),...ox,...m?sx:cx,...s},(0,B.createElement)(`span`,c)};if(Jy(!0),pb(``,Eb),typeof document<`u`&&typeof window<`u`){let e=window;if(e.IconifyPreload!==void 0){let t=e.IconifyPreload,n=`Invalid IconifyPreload syntax.`;typeof t==`object`&&t&&(t instanceof Array?t:[t]).forEach(e=>{try{(typeof e!=`object`||!e||e instanceof Array||typeof e.icons!=`object`||typeof e.prefix!=`string`||!Zy(e))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){let t=e.IconifyProviders;if(typeof t==`object`&&t)for(let e in t){let n=`IconifyProviders[`+e+`] is invalid.`;try{let r=t[e];if(typeof r!=`object`||!r||r.resources===void 0)continue;yb(e,r)||console.error(n)}catch{console.error(n)}}}}function mx(e){let[t,n]=(0,B.useState)(!!e.ssr),[r,i]=(0,B.useState)({});function a(t){if(t){let t=e.icon;if(typeof t==`object`)return{name:``,data:t};let n=Yy(t);if(n)return{name:t,data:n}}return{name:``}}let[o,s]=(0,B.useState)(a(!!e.ssr));function c(){let e=r.callback;e&&(e(),i({}))}function l(e){if(JSON.stringify(o)!==JSON.stringify(e))return c(),s(e),!0}function u(){var t;let n=e.icon;if(typeof n==`object`){l({name:``,data:n});return}let r=Yy(n);if(l({name:n,data:r})){if(r===void 0){let e=Kb([n],u);i({callback:e})}else r&&((t=e.onLoad)==null||t.call(e,n))}}(0,B.useEffect)(()=>(n(!0),c),[]),(0,B.useEffect)(()=>{t&&u()},[e.icon,t]);let{name:d,data:f}=o;return f?px({...Ay,...f},e,d):e.children?e.children:e.fallback?e.fallback:(0,B.createElement)(`span`,{})}var hx=(0,B.forwardRef)((e,t)=>mx({...e,_ref:t}));(0,B.forwardRef)((e,t)=>mx({inline:!0,...e,_ref:t}));function gx(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 _x(e,t,n){return(t=function(e){var t=function(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 TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}(e,`string`);return typeof t==`symbol`?t:t+``}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function yx(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?vx(Object(n),!0).forEach(function(t){_x(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vx(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function bx(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}
10finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}(e,t)||function(e,t){if(e){if(typeof e==`string`)return gx(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)?gx(e,t):void 0}}(e,t)||function(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
11In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}var xx={"Ctrl/Cmd+K":!0,"/":!0,"Ctrl/Cmd+I":!0};function Sx(e){return yx(yx({},xx),e)}function Cx(e){var t=e.isOpen,n=e.isAskAiActive,r=e.onAskAiToggle,i=e.onClose,a=e.onOpen,o=e.keyboardShortcuts,s=o===void 0?xx:o;B.useEffect(function(){function e(e){if(t&&e.code===`Escape`&&n)r(!1);else{var o=s[`Ctrl/Cmd+K`]&&e.key?.toLowerCase()===`k`&&(e.metaKey||e.ctrlKey),c=s[`/`]&&e.key===`/`;(e.code===`Escape`&&t||o||!function(e){var t=e.composedPath()[0],n=t.tagName;return t.isContentEditable||n===`INPUT`||n===`SELECT`||n===`TEXTAREA`}(e)&&c&&!t)&&(e.preventDefault(),t?i():document.body.classList.contains(`DocSearch--active`)||a())}}return window.addEventListener(`keydown`,e),function(){window.removeEventListener(`keydown`,e)}},[t,n,s,a,i,r])}var wx=function(e){var t=e.theme;(0,B.useEffect)(function(){if(t){var e=document.documentElement.dataset.theme;if(t!==e)return document.documentElement.dataset.theme=t,function(){e===void 0?delete document.documentElement.dataset.theme:document.documentElement.dataset.theme=e}}},[t])},Tx=[`children`,`theme`,`onReady`,`onOpen`,`onClose`,`onSidepanelOpen`,`onSidepanelClose`],Ex=B.createContext(void 0);Ex.displayName=`DocSearchContext`;var Dx=B.forwardRef(function(e,t){var n=e.children,r=e.theme,i=e.onReady,a=e.onOpen,o=e.onClose,s=e.onSidepanelOpen,c=e.onSidepanelClose,l=function(e,t){if(e==null)return{};var n,r,i=function(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}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,Tx),u=bx(B.useState(`ready`),2),d=u[0],f=u[1],p=bx(B.useState(l.initialQuery||``),2),m=p[0],h=p[1],g=B.useRef(null),_=Sx(l.keyboardShortcuts),v=bx(B.useState(),2),y=v[0],b=v[1],x=bx(B.useState(function(){return new Set}),2),S=x[0],C=x[1],w=function(){var e=bx(B.useState(!1),2),t=e[0],n=e[1];return B.useEffect(function(){var e=function(){n(window.matchMedia(`(max-width: 768px)`).matches)};return e(),window.addEventListener(`resize`,e),function(){window.removeEventListener(`resize`,e)}},[]),t}(),T=B.useRef(`ready`),E=[`modal-search`,`modal-askai`].includes(d),ee=d===`modal-askai`,D=!w&&S.has(`sidepanel`),O=d===`sidepanel`;B.useEffect(function(){i?.()},[i]),B.useEffect(function(){var e=T.current,t=d;t!==`modal-search`&&t!==`modal-askai`||e===`modal-search`||e===`modal-askai`||a==null||a(),t!==`ready`||e!==`modal-search`&&e!==`modal-askai`||o==null||o(),t===`sidepanel`&&e!==`sidepanel`&&s?.(),t!==`sidepanel`&&e===`sidepanel`&&c?.(),T.current=t},[d,a,o,s,c]);var k=B.useCallback(function(){f(`modal-search`)},[]),A=B.useCallback(function(){var e;f(`ready`),(e=g.current)==null||e.focus(),h(l.initialQuery??``)},[f,l.initialQuery]),j=B.useCallback(function(e,t){if(!w&&e&&D)return b(t),void f(`sidepanel`);f(e?`modal-askai`:`modal-search`)},[f,w,D]),M=B.useCallback(function(e){S.has(`sidepanel`)&&(b(e),f(`sidepanel`))},[f,S]);B.useCallback(function(e){f(`modal-search`),h(e.key)},[f,h]);var N=B.useCallback(function(){b(void 0)},[]),P=B.useCallback(function(e){S.has(e)||C(function(t){var n=new Set(t);return n.add(e),n})},[S]);B.useImperativeHandle(t,function(){return{open:k,close:A,openAskAi:function(e){return j(!0,e)},openSidepanel:M,get isReady(){return!0},get isOpen(){return E},get isSidepanelOpen(){return O},get isSidepanelSupported(){return D}}},[k,A,j,M,E,O,D]),wx({theme:r}),Cx({isOpen:E,onOpen:k,onClose:A,onAskAiToggle:j,isAskAiActive:ee,keyboardShortcuts:_});var F=B.useMemo(function(){return{docsearchState:d,setDocsearchState:f,searchButtonRef:g,
11initialQuery:m,keyboardShortcuts:_,openModal:k,closeModal:A,isAskAiActive:ee,isModalActive:E,onAskAiToggle:j,initialAskAiMessage:y,clearInitialAskAiMessage:N,registerView:P,isHybridModeSupported:D}},[d,g,m,_,k,A,ee,E,j,y,N,P,D]);return B.createElement(Ex.Provider,{value:F},n)});function Ox(){var e=B.useContext(Ex);if(e===void 0)throw Error("`useDocSearch` must be used within the `DocSearch` provider");return e}Dx.displayName=`DocSearch`;function kx(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 Ax(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function jx(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){Ax(a,r,i,o,s,`next`,e)}function s(e){Ax(a,r,i,o,s,`throw`,e)}o(void 0)})}}function Mx(e,t,n){return t=Lx(t),function(e,t){if(t&&(typeof t==`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return function(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}(e)}(e,zx()?Reflect.construct(t,n||[],Lx(e).constructor):t.apply(e,n))}function V(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function Nx(e,t,n){if(zx())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&Ux(i,n.prototype),i}function Px(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,Gx(r.key),r)}}function H(e,t,n){return t&&Px(e.prototype,t),n&&Px(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function U(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=qx(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(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
12In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function Fx(e,t,n){return(t=Gx(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ix(){return Ix=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},Ix.apply(null,arguments)}function Lx(e){return Lx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Lx(e)}function Rx(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ux(e,t)}function zx(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(zx=function(){return!!e})()}function Bx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function W(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Bx(Object(n),!0).forEach(function(t){Fx(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bx(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Vx(e,t){if(e==null)return{};var n,r,i=function(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}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function G(){var e,t,n=typeof Symbol==`function`?Symbol:{},r=n.iterator||`@@iterator`,i=n.toStringTag||`@@toStringTag`;function a(n,r,i,a){var c=r&&r.prototype instanceof s?r:s,l=Object.create(c.prototype);return Hx(l,`_invoke`,function(n,r,i){var a,s,c,l=0,u=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return a=t,s=0,c=e,f.n=n,o}};function p(n,r){for(s=n,c=r,t=0;!d&&l&&!i&&t<u.length;t++){var i,a=u[t],p=f.p,m=a[2];n>3?(i=m===r)&&(c=a[(s=a[4])?5:(s=3,3)],a[4]=a[5]=e):a[0]<=p&&((i=n<2&&p<a[1])?(s=0,f.v=r,f.n=a[1]):p<m&&(i=n<3||a[0]>r||r>m)&&(a[4]=n,a[5]=r,f.n=m,s=0))}if(i||n>1)return o;throw d=!0,r}return function(i,u,m){if(l>1)throw TypeError(`Generator is already running`);for(d&&u===1&&p(u,m),s=u,c=m;(t=s<2?e:c)||!d;){a||(s?s<3?(s>1&&(f.n=-1),p(s,c)):f.n=c:f.v=c);try{if(l=2,a){if(s||(i=`next`),t=a[i]){if(!(t=t.call(a,c)))throw TypeError(`iterator result is not an object`);if(!t.done)return t;c=t.value,s<2&&(s=0)}else s===1&&(t=a.return)&&t.call(a),s<2&&(c=TypeError(`The iterator does not provide a '`+i+`' method`),s=1);a=e}else if((t=(d=f.n<0)?c:n.call(r,f))!==o)break}catch(t){a=e,s=1,c=t}finally{l=1}}return{value:t,done:d}}}(n,i,a),!0),l}var o={};function s(){}function c(){}function l(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(Hx(t={},r,function(){return this}),t),d=l.prototype=s.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,Hx(e,i,`GeneratorFunction`)),e.prototype=Object.create(d),e}return c.prototype=l,Hx(d,`constructor`,l),Hx(l,`constructor`,c),c.displayName=`GeneratorFunction`,Hx(l,i,`GeneratorFunction`),Hx(d),Hx(d,i,`Generator`),Hx(d,r,function(){return this}),Hx(d,`toString`,function(){return`[object Generator]`}),(G=function(){return{w:a,m:f}})()}function Hx(e,t,n,r){var i=Object.defineProperty;try{i({},``,{})}catch{i=0}Hx=function(e,t,n,r){function a(t,n){Hx(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a(`next`,0),a(`throw`,1),a(`return`,2))},Hx(e,t,n,r)}
12function Ux(e,t){return Ux=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ux(e,t)}function Wx(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}(e,t)||qx(e,t)||function(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
13In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function K(e){return function(e){if(Array.isArray(e))return kx(e)}(e)||function(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}(e)||qx(e)||function(){throw TypeError(`Invalid attempt to spread non-iterable instance.
14In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Gx(e){var t=function(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 TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}(e,`string`);return typeof t==`symbol`?t:t+``}function Kx(e){return Kx=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Kx(e)}function qx(e,t){if(e){if(typeof e==`string`)return kx(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)?kx(e,t):void 0}}function Jx(e){var t=typeof Map==`function`?new Map:void 0;return Jx=function(e){if(e===null||!function(e){try{return Function.toString.call(e).indexOf(`[native code]`)!==-1}catch{return typeof e==`function`}}(e))return e;if(typeof e!=`function`)throw TypeError(`Super expression must either be null or a function`);if(t!==void 0){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return Nx(e,arguments,Lx(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Ux(n,e)},Jx(e)}function Yx(){Yx=function(e,t){return new n(e,void 0,t)};var e=RegExp.prototype,t=new WeakMap;function n(e,r,i){var a=RegExp(e,r);return t.set(a,i||t.get(e)),Ux(a,n.prototype)}function r(e,n){var r=t.get(n);return Object.keys(r).reduce(function(t,n){var i=r[n];if(typeof i==`number`)t[n]=e[i];else{for(var a=0;e[i[a]]===void 0&&a+1<i.length;)a++;t[n]=e[i[a]]}return t},Object.create(null))}return Rx(n,RegExp),n.prototype.exec=function(t){var n=e.exec.call(this,t);if(n){n.groups=r(n,this);var i=n.indices;i&&(i.groups=r(i,this))}return n},n.prototype[Symbol.replace]=function(n,i){if(typeof i==`string`){var a=t.get(this);return e[Symbol.replace].call(this,n,i.replace(/\$<([^>]+)(>|$)/g,function(e,t,n){if(n===``)return e;var r=a[t];return Array.isArray(r)?`$`+r.join(`$`):typeof r==`number`?`$`+r:``}))}if(typeof i==`function`){var o=this;return e[Symbol.replace].call(this,n,function(){var e=arguments;return typeof e[e.length-1]!=`object`&&(e=[].slice.call(e)).push(r(e,o)),i.apply(this,e)})}return e[Symbol.replace].call(this,n,i)},Yx.apply(this,arguments)}var Xx=new Set([`AI-203`,`AI-205`,`AI-224`,`AI-225`]);function Zx(e,t){for(var n=0,r=Object.entries(e);n<r.length;n++){var i=Wx(r[n],2),a=i[0],o=i[1];if(a.toLowerCase()===t.toLowerCase()&&typeof o==`string`&&o.trim()!==``)return o.trim()}}function Qx(e){var t=/\b(AI-\d{3})\b/i.exec(e);if(t)return t[1].toUpperCase();try{var n=JSON.parse(e),r=n.code??n.errorCode;if(typeof r==`string`&&/AI-\d{3}/i.test(r))return r.trim().toUpperCase()}catch{}}function $x(e){return e.includes(`ai-217`)||/thread\s+depth/.test(e)}function eS(e){return/\brequest blocked for this domain\b/.test(e)||/\bblocked for this domain\b/.test(e)}function tS(e){var t=e;return/\bstep limit\b/.test(t)||/\bmax steps\b/.test(t)||/\bmax step\b/.test(t)||/\bmaximum steps\b/.test(t)||/\bmaximum step\b/.test(t)||/\bmax agent steps\b/.test(t)||/\bmax agent step\b/.test(t)||/\bmaximum agent steps\b/.test(t)||/\bmaximum agent step\b/.test(t)}function nS(e){return/\b429\b/.test(e)||/\brate\s*limit/i.test(e)||/\btoo\s+many\s+attempts\b/.test(e)||/\btoo_many_requests\b/.test(e)}function rS(e){return/\bTokenOutputLimitError\b/i.test(e)}function iS(e){return/\bwhitelist(ed)?\b/.test(e)||/\bnot\s+allowed\s+for\s+this\s+domain\b/.test(e)}function aS(e){var t=e;return/\bcontext\s+length\b/.test(t)||/\bmax tokens\b/.test(t)||/\bmax token\b/.test(t)||/\bmaximum tokens\b/.test(t)||/\bmaximum token\b/.test(t)||/\btoken\s+limit\b/.test(t)||/\btoken\s+output\b/.test(t)||/\boutput\s+limits?\b/.test(t)}var oS=[{matches:function(e){return typeof e.extractedCodeUpper==`string`&&Xx.has(e.extractedCodeUpper)}},{matches:function(e){return e.parsedJson!==null&&(t=e.parsedJson,eS(((n=Zx(t,`message`))??``).toLowerCase()));var t,n},showNewConversationLink:!1},{matches:function(e){return e.parsedJson!==null&&function(e){var t=typeof e.type==`string`?e.type:``;if(/tokenoutput|outputlimit|steplimit|maxstep|ratelimit|domainnotallowed/i.test(t))return!0;var n=Zx(e,`error`)??``;if(n.toUpperCase()===`TOO_MANY_REQUESTS`||/token output|output limits|token limits|rate limit|whitelist|step limit|max steps|could not complete response due to token/i.test(n))return!0;var r=Zx(e,`message`)??``;if(/rate limit exceeded|retry after \d+/i.test(r)||/whitelist/i.test(r))return!0;
14var i=r.toLowerCase(),a=i.indexOf(`not allowed`);return a!==-1&&i.indexOf(`domain`,a)!==-1}(e.parsedJson)}},{matches:function(e){return rS(e.message)},showNewConversationLink:!1},{matches:function(e){return nS(e.messageLower)}},{matches:function(e){return eS(e.messageLower)},showNewConversationLink:!1},{matches:function(e){return iS(e.messageLower)}},{matches:function(e){return aS(e.messageLower)}},{matches:function(e){return tS(e.messageLower)}}];function sS(e){var t=function(e){var t=e.message??``,n=t.toLowerCase(),r=null;try{var i=JSON.parse(t);i&&Kx(i)===`object`&&!Array.isArray(i)&&(r=i)}catch{}return{message:t,messageLower:n,parsedJson:r,extractedCodeUpper:Qx(t)}}(e),n=oS.filter(function(e){return e.matches(t)});return n.length===0?{blocking:!1,showNewConversationLink:!0}:{blocking:!0,showNewConversationLink:n.every(function(e){return!1!==e.showNewConversationLink})}}function cS(e){return e.replace(/<[^>]*>/g,``).replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#039;`)}var lS=function(e,t){var n=t[0].parts.find(function(e){return e.type===`text`}),r=n!=null&&n.text?cS(n.text):``;return{query:e,objectID:r,messages:t,type:`askAI`,anchor:`stored`,content:null,hierarchy:{lvl0:`askAI`,lvl1:r,lvl2:null,lvl3:null,lvl4:null,lvl5:null,lvl6:null},url:``,url_without_anchor:``}},uS=function(e){return e?.parts.find(function(e){return e.type===`text`})};function dS(e,t){return e}function fS(e){return!!e&&$x(e.toLowerCase())}function pS(e){return!!e&&function(e){if(fS(e))return!0;try{var t=JSON.parse(e),n=t.code??t.errorCode;return typeof n==`string`&&n.toUpperCase()===`AI-217`||fS(typeof t.message==`string`?t.message:``)}catch{return!1}}(e.message??``)}function mS(e,t){return!!e&&(!!pS(e)||!!t&&function(e){return sS(e).blocking}(e))}function hS(e){if(!e)return!1;var t=e.message??``;if(/TokenOutputLimitError/i.test(t)||/could not complete response due to token output limits/i.test(t))return!0;try{var n=JSON.parse(t);if(typeof n.type==`string`&&/^TokenOutputLimitError$/i.test(n.type.trim())||typeof n.error==`string`&&/token output limits/i.test(n.error))return!0}catch{}return!1}function gS(e,t){return!e||!hS(e)&&(!!pS(e)||!t||sS(e).showNewConversationLink)}function _S(e){var t=e.trim();if(t)for(var n=0;n<10;){n+=1;try{var r=JSON.parse(t);if(typeof r!=`string`){if(r&&Kx(r)===`object`&&!Array.isArray(r)){var i=r;return Zx(i,`message`)||Zx(i,`error`)||void 0}return}var a=r.trim();if(!a)return;t=a}catch{if(!/\\"/.test(t)){var o=/"message"\s*:\s*"((?:[^"\\]|\\.)*)"/.exec(t);if(o!=null&&o[1])return o[1].replace(/\\"/g,`"`).replace(/\\\\/g,`\\`).trim();var s=/"error"\s*:\s*"((?:[^"\\]|\\.)*)"/.exec(t);return s!=null&&s[1]?s[1].replace(/\\"/g,`"`).replace(/\\\\/g,`\\`).trim():void 0}t=t.replace(/\\"/g,`"`).replace(/\\\\/g,`\\`).trim()}}}function vS(e){if(e){var t=e.message??``,n=_S(t);if(n)return n;var r=t.trim().replace(/\s*\(AI-\d{3}\)\s*$/i,``).trim();return r===``?void 0:r}}function yS(e){if(e){if(hS(e)){var t=vS(e);return t&&!function(e){var t=e.trim();return t.startsWith(`{`)&&t.endsWith(`}`)}(t)?t:`Could not complete response due to token output limits`}return vS(e)}}var bS=function(e){var t=e.theme;(0,B.useEffect)(function(){if(t){var e=document.documentElement.dataset.theme;if(t!==e)return document.documentElement.dataset.theme=t,function(){e===void 0?delete document.documentElement.dataset.theme:document.documentElement.dataset.theme=e}}},[t])},xS={"Ctrl/Cmd+K":!0,"/":!0};function SS(e){return W(W({},xS),e)}function CS(e){var t=e.size,n=t===void 0?20:t,r=e.color,i=r===void 0?`currentColor`:r;return B.createElement(`svg`,{width:n,height:n,className:`DocSearch-Search-Icon`,viewBox:`0 0 24 24`,"aria-hidden":`true`},B.createElement(`circle`,{cx:`11`,cy:`11`,r:`8`,stroke:i,fill:`none`,strokeWidth:`1.4`}),B.createElement(`path`,{d:`m21 21-4.3-4.3`,stroke:i,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`}))}function wS(e,t,n){return e.reduce(function(e,r){var i=t(r);return e.hasOwnProperty(i)||(e[i]=[]),e[i].length<(n||5)&&e[i].push(r),e},{})}function TS(e){return e}function ES(e){return e.button===1||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}var DS=`Ctrl`;function OS(){}var kS=/(<mark>|<\/mark>)/g,AS=RegExp(kS.source);function jS(e){var t,n,r=e;if(!r.__docsearch_parent&&!e._highlightResult)return e.hierarchy.lvl0;var i=r.__docsearch_parent?(t=r.__docsearch_parent)==null||(t=t._highlightResult)==null||(t=t.hierarchy)==null?void 0:t.lvl0:(n=e._highlightResult)==null||(n=n.hierarchy)==null?void 0:n.lvl0;return i?i.value&&AS.test(i.value)?i.value.replace(kS,``):i.value:e.hierarchy.lvl0}var MS=[`translations`,`keyboardShortcuts`],NS=B.forwardRef(function(e,t){var n=e.translations,r=n===void 0?{}:n,i=e.keyboardShortcuts,a=Vx(e,MS),o=r.buttonText,s=o===void 0?`Search`:o,c=r.buttonAriaLabel,l=c===void 0?`Search`:c,u=SS(i),d=Wx((0,B.useState)(null),2),f=d[0],p=d[1];bS({theme:a.theme}),(0,B.useEffect)(function(){typeof navigator<`u`&&(/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?p(`⌘`):p(DS))},[]);var m=Wx(f===DS?[DS,`Control`,`Ctrl`]:[`Meta`,`Meta`,`⌘`],3),h=m[0],g=m[1],_=m[2],v=u[`Ctrl/Cmd+K`],y=`${g}+k`;return B.createElement(`button`,Ix({type:`button`,className:`DocSearch DocSearch-Button`,"aria-label":v?`${l} (${y})`:l,"aria-keyshortcuts":v?y:void 0},a,{ref:t}),B.createElement(`span`,{className:`DocSearch-Button-Container`},B.createElement(CS,null),B.createElement(`span`,{className:`DocSearch-Button-Placeholder`},s)),B.createElement(`span`,{className:`DocSearch-Button-Keys`},f!==null&&v&&B.createElement(B.Fragment,null,B.createElement(PS,{reactsToKey:h},_),B.createElement(PS,{reactsToKey:`k`},`K`))))});function PS(e){var t=e.reactsToKey,n=e.children,r=Wx((0,B.useState)(!1),2),i=r[0],a=r[1];return(0,B.useEffect)(function(){if(t)return window.addEventListener(`ke
14ydown`,e),window.addEventListener(`keyup`,n),function(){window.removeEventListener(`keydown`,e),window.removeEventListener(`keyup`,n)};function e(e){e.key===t&&a(!0)}function n(e){e.key!==t&&e.key!==`Meta`||a(!1)}},[t]),B.createElement(`kbd`,{className:i?`DocSearch-Button-Key DocSearch-Button-Key--pressed`:`DocSearch-Button-Key`+(t===`Ctrl`?` DocSearch-Button-Key--ctrl`:``)},n)}function FS(e,t){var n=void 0;return function(){var r=[...arguments];n&&clearTimeout(n),n=setTimeout(function(){return e.apply(void 0,r)},t)}}function IS(e){return e.reduce(function(e,t){return e.concat(t)},[])}var LS=0;function RS(e){return e.collections.length===0?0:e.collections.reduce(function(e,t){return e+t.items.length},0)}function zS(e){return e!==Object(e)}function BS(e,t){if(e===t)return!0;if(zS(e)||zS(t)||typeof e==`function`||typeof t==`function`)return e===t;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];if(!(i in t)||!BS(e[i],t[i]))return!1}return!0}var VS=function(){},HS=[{segment:`autocomplete-core`,version:`1.19.2`}];function US(e){var t=e.item,n=e.items,r=n===void 0?[]:n;return{index:t.__autocomplete_indexName,items:[t],positions:[1+r.findIndex(function(e){return e.objectID===t.objectID})],queryID:t.__autocomplete_queryID,algoliaSource:[`autocomplete`]}}function WS(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}(e,t)||function(e,t){if(e){if(typeof e==`string`)return GS(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 GS(e,t)}}(e,t)||function(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
15In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function GS(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}var KS=[`items`],qS=[`items`];function JS(e){return JS=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},JS(e)}function YS(e){return function(e){if(Array.isArray(e))return XS(e)}(e)||function(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}(e)||function(e,t){if(e){if(typeof e==`string`)return XS(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 XS(e,t)}}(e)||function(){throw TypeError(`Invalid attempt to spread non-iterable instance.
16In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function XS(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 ZS(e,t){if(e==null)return{};var n,r,i=function(e,t){if(e==null)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function QS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $S(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?QS(Object(n),!0).forEach(function(t){eC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QS(Object(n)).forEac
16h(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function eC(e,t,n){return(t=function(e){var t=function(e,t){if(JS(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(JS(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}(e,`string`);return JS(t)===`symbol`?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tC(e){return e.map(function(e){var t=e.items,n=ZS(e,KS);return $S($S({},n),{},{objectIDs:t?.map(function(e){return e.objectID})||n.objectIDs})})}function nC(e){var t,n,r,i=(t=WS((e.version||``).split(`.`).map(Number),2),n=t[0],r=t[1],n>=3||n===2&&r>=4||n===1&&r>=10);function a(t,n,r){if(i&&r!==void 0){var a=r[0].__autocomplete_algoliaCredentials,o={"X-Algolia-Application-Id":a.appId,"X-Algolia-API-Key":a.apiKey};e.apply(void 0,[t].concat(YS(n),[{headers:o}]))}else e.apply(void 0,[t].concat(YS(n)))}return{init:function(t,n){e(`init`,{appId:t,apiKey:n})},setAuthenticatedUserToken:function(t){e(`setAuthenticatedUserToken`,t)},setUserToken:function(t){e(`setUserToken`,t)},clickedObjectIDsAfterSearch:function(){var e=[...arguments];e.length>0&&a(`clickedObjectIDsAfterSearch`,tC(e),e[0].items)},clickedObjectIDs:function(){var e=[...arguments];e.length>0&&a(`clickedObjectIDs`,tC(e),e[0].items)},clickedFilters:function(){var t=[...arguments];t.length>0&&e.apply(void 0,[`clickedFilters`].concat(t))},convertedObjectIDsAfterSearch:function(){var e=[...arguments];e.length>0&&a(`convertedObjectIDsAfterSearch`,tC(e),e[0].items)},convertedObjectIDs:function(){var e=[...arguments];e.length>0&&a(`convertedObjectIDs`,tC(e),e[0].items)},convertedFilters:function(){var t=[...arguments];t.length>0&&e.apply(void 0,[`convertedFilters`].concat(t))},viewedObjectIDs:function(){var e=[...arguments];e.length>0&&e.reduce(function(e,t){var n=t.items,r=ZS(t,qS);return[].concat(YS(e),YS(function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:20,n=[],r=0;r<e.objectIDs.length;r+=t)n.push($S($S({},e),{},{objectIDs:e.objectIDs.slice(r,r+t)}));return n}($S($S({},r),{},{objectIDs:n?.map(function(e){return e.objectID})||r.objectIDs})).map(function(e){return{items:n,payload:e}})))},[]).forEach(function(e){var t=e.items;return a(`viewedObjectIDs`,[e.payload],t)})},viewedFilters:function(){var t=[...arguments];t.length>0&&e.apply(void 0,[`viewedFilters`].concat(t))}}}function rC(e){var t=e.items.reduce(function(e,t){return e[t.__autocomplete_indexName]=(e[t.__autocomplete_indexName]??[]).concat(t),e},{});return Object.keys(t).map(function(e){return{index:e,items:t[e],algoliaSource:[`autocomplete`]}})}function iC(e){return e.objectID&&e.__autocomplete_indexName&&e.__autocomplete_queryID}function aC(e){return aC=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},aC(e)}function oC(e){return function(e){if(Array.isArray(e))return sC(e)}(e)||function(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}(e)||function(e,t){if(e){if(typeof e==`string`)return sC(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 sC(e,t)}}(e)||function(){throw TypeError(`Invalid attempt to spread non-iterable instance.
17In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function sC(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 cC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function lC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];
17t%2?cC(Object(n),!0).forEach(function(t){uC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function uC(e,t,n){return(t=function(e){var t=function(e,t){if(aC(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(aC(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}(e,`string`);return aC(t)===`symbol`?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var dC=`2.15.0`,fC=`https://cdn.jsdelivr.net/npm/search-insights@${dC}/dist/search-insights.min.js`,pC=FS(function(e){var t=e.onItemsChange,n=e.items,r=e.insights,i=e.state;t({insights:r,insightsEvents:rC({items:n}).map(function(e){return lC({eventName:`Items Viewed`},e)}),state:i})},400);function mC(e){var t=function(e){return lC({onItemsChange:function(e){var t=e.insights,n=e.insightsEvents,r=e.state;t.viewedObjectIDs.apply(t,oC(n.map(function(e){return lC(lC({},e),{},{algoliaSource:hC(e.algoliaSource,r.context)})})))},onSelect:function(e){var t=e.insights,n=e.insightsEvents,r=e.state;t.clickedObjectIDsAfterSearch.apply(t,oC(n.map(function(e){return lC(lC({},e),{},{algoliaSource:hC(e.algoliaSource,r.context)})})))},onActive:VS,__autocomplete_clickAnalytics:!0},e)}(e),n=t.insightsClient,r=t.insightsInitParams,i=t.onItemsChange,a=t.onSelect,o=t.onActive,s=t.__autocomplete_clickAnalytics,c=n;if(n||function(e){typeof window<`u`&&e({window})}(function(e){var t=e.window,n=t.AlgoliaAnalyticsObject||`aa`;typeof n==`string`&&(c=t[n]),c||(t.AlgoliaAnalyticsObject=n,t[n]||(t[n]=function(){t[n].queue||(t[n].queue=[]);var e=[...arguments];t[n].queue.push(e)}),t[n].version=dC,c=t[n],function(e){var t=`[Autocomplete]: Could not load search-insights.js. Please load it manually following https://alg.li/insights-autocomplete`;try{var n=e.document.createElement(`script`);n.async=!0,n.src=fC,n.onerror=function(){console.error(t)},document.body.appendChild(n)}catch{console.error(t)}}(t))}),!c)return{};r&&c(`init`,lC({partial:!0},r));var l=nC(c),u={current:[]},d=FS(function(e){var t=e.state;if(t.isOpen){var n=t.collections.reduce(function(e,t){return[].concat(oC(e),oC(t.items))},[]).filter(iC);BS(u.current.map(function(e){return e.objectID}),n.map(function(e){return e.objectID}))||(u.current=n,n.length>0&&pC({onItemsChange:i,items:n,insights:l,state:t}))}},0);return{name:`aa.algoliaInsightsPlugin`,subscribe:function(e){var t=e.setContext,n=e.onSelect,r=e.onActive;function i(e){t({algoliaInsightsPlugin:{__algoliaSearchParameters:lC(lC({},s?{clickAnalytics:!0}:{}),e?{userToken:gC(e)}:{}),insights:l}})}c(`addAlgoliaAgent`,`insights-plugin`),i(),c(`onUserTokenChange`,function(e){i(e)}),c(`getUserToken`,null,function(e,t){i(t)}),n(function(e){var t=e.item,n=e.state,r=e.event,i=e.source;iC(t)&&a({state:n,event:r,insights:l,item:t,insightsEvents:[lC({eventName:`Item Selected`},US({item:t,items:i.getItems().filter(iC)}))]})}),r(function(e){var t=e.item,n=e.source,r=e.state,i=e.event;iC(t)&&o({state:r,event:i,insights:l,item:t,insightsEvents:[lC({eventName:`Item Active`},US({item:t,items:n.getItems().filter(iC)}))]})})},onStateChange:function(e){var t=e.state;d({state:t})},__autocomplete_pluginOptions:e}}function hC(){var e,t=arguments.length>1?arguments[1]:void 0;return[].concat(oC(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]),[`autocomplete-internal`],oC((e=t.algoliaInsightsPlugin)!=null&&e.__automaticInsights?[`autocomplete-automatic`]:[]))}function gC(e){return typeof e==`number`?e.toString():e}function _C(e,t){var n=t;return{then:function(t,r){return _C(e.then(yC(t,n,e),yC(r,n,e)),n)},catch:function(t){return _C(e.catch(yC(t,n,e)),n)},finally:function(t){return t&&n.onCancelList.push(t),_C(e.finally(yC(t&&function(){return n.onCancelList=[],t()},n,e)),n)},cancel:function(){n.isCanceled=!0;var e=n.onCancelList;n.onCancelList=[],e.forEach(function(e){e()})},isCanceled:function(){return!0===n.isCanceled}}}function vC(e){return _C(e,{isCanceled:!1,onCancelList:[]})}function yC(e,t,n){return e?function(n){return t.isCanceled?n:e(n)}:n}var bC,xC=!0;function SC(e,t,n,r){if(!n)return null;if(e<0&&(t===null||r!==null&&t===0))return n+e;var i=(t===null?-1:t)+e;return i<=-1||i>=n?r===null?null:0:i}function CC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function wC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];
17t%2?CC(Object(n),!0).forEach(function(t){TC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function TC(e,t,n){return(t=function(e){var t=function(e,t){if(EC(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(EC(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}(e,`string`);return EC(t)===`symbol`?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EC(e){return EC=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},EC(e)}function DC(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if(typeof e==`string`)return OC(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 OC(e,t)}}(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(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
18In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function OC(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}var kC=function(e,t){var n,r=!1,i=[],a=DC(e);try{for(a.s();!(n=a.n()).done;){var o,s,c,l=(o=n.value.__autocomplete_pluginOptions)==null||(s=(c=o).awaitSubmit)==null?void 0:s.call(c);if(typeof l==`number`)i.push(l);else if(!0===l){r=!0;break}}}catch(e){a.e(e)}finally{a.f()}return r?t.wait():i.length>0?t.wait(Math.max.apply(Math,i)):void 0};function AC(e){var t=function(e){var t=e.collections.map(function(e){return e.items.length}).reduce(function(e,t,n){var r=(e[n-1]||0)+t;return e.push(r),e},[]).reduce(function(t,n){return n<=e.activeItemId?t+1:t},0);return e.collections[t]}(e);if(!t)return null;var n=t.items[function(e){for(var t=e.state,n=e.collection,r=!1,i=0,a=0;!1===r;){var o=t.collections[i];if(o===n){r=!0;break}a+=o.items.length,i++}return t.activeItemId-a}({state:e,collection:t})],r=t.source;return{item:n,itemInputValue:r.getItemInputValue({item:n,state:e}),itemUrl:r.getItemUrl({item:n,state:e}),source:r}}function jC(e,t,n){return[e,n?.sourceId,t].filter(Boolean).join(`-`).replace(/\s/g,``)}var MC=/((gt|sm)-|galaxy nexus)|samsung[- ]|samsungbrowser/i;function NC(e){return e.nativeEvent||e}function PC(e){return PC=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},PC(e)}function FC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function IC(e,t,n){return(t=function(e){var t=function(e,t){if(PC(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(PC(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}(e,`string`);return PC(t)===`symbol`?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LC(e,t,n){var r,i=t.initialState;return{getState:function(){return i},dispatch:function(r,a){var o=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];
18t%2?FC(Object(n),!0).forEach(function(t){IC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},i);i=e(i,{type:r,props:t,payload:a}),n({state:i,prevState:o})},pendingRequests:(r=[],{add:function(e){return r.push(e),e.finally(function(){r=r.filter(function(t){return t!==e})})},cancelAll:function(){r.forEach(function(e){return e.cancel()})},isEmpty:function(){return r.length===0},wait:function(e){return xC?(xC=!1,bC=e?Promise.race([Promise.all(r),new Promise(function(t){return setTimeout(t,e)})]):Promise.all(r),bC.then(function(){xC=!0})):bC}})}}function RC(e){return RC=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},RC(e)}function zC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function BC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?zC(Object(n),!0).forEach(function(t){VC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function VC(e,t,n){return(t=function(e){var t=function(e,t){if(RC(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(RC(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}(e,`string`);return RC(t)===`symbol`?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HC(e){return HC=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},HC(e)}function UC(e){return function(e){if(Array.isArray(e))return WC(e)}(e)||function(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}(e)||function(e,t){if(e){if(typeof e==`string`)return WC(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 WC(e,t)}}(e)||function(){throw TypeError(`Invalid attempt to spread non-iterable instance.
19In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function WC(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 GC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function KC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?GC(Object(n),!0).forEach(function(t){qC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function qC(e,t,n){return(t=function(e){var t=function(e,t){if(HC(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(HC(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}(e,`string`);return HC(t)===`symbol`?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JC(e,t){var n=typeof window<`u`?window:{},r=e.plugins||[];return KC(KC({debug:!1,openOnFocus:!1,enterKeyHint:void 0,ignoreCompositionEvents:!1,placeholder:``,autoF
19ocus:!1,defaultActiveItemId:null,stallThreshold:300,insights:void 0,environment:n,shouldPanelOpen:function(e){return RS(e.state)>0},reshape:function(e){return e.sources}},e),{},{id:e.id??`autocomplete-${LS++}`,plugins:r,initialState:KC({activeItemId:null,query:``,completion:null,collections:[],isOpen:!1,status:`idle`,context:{}},e.initialState),onStateChange:function(t){var n;(n=e.onStateChange)==null||n.call(e,t),r.forEach(function(e){return e.onStateChange?.call(e,t)})},onSubmit:function(t){var n;(n=e.onSubmit)==null||n.call(e,t),r.forEach(function(e){return e.onSubmit?.call(e,t)})},onReset:function(t){var n;(n=e.onReset)==null||n.call(e,t),r.forEach(function(e){return e.onReset?.call(e,t)})},getSources:function(n){return Promise.all([].concat(UC(r.map(function(e){return e.getSources})),[e.getSources]).filter(Boolean).map(function(e){return function(e,t){var n=[];return Promise.resolve(e(t)).then(function(e){return Promise.all(e.filter(function(e){return!!e}).map(function(e){if(e.sourceId,n.includes(e.sourceId))throw Error(`[Autocomplete] The \`sourceId\` ${JSON.stringify(e.sourceId)} is not unique.`);n.push(e.sourceId);var t={getItemInputValue:function(e){return e.state.query},getItemUrl:function(){},onSelect:function(e){(0,e.setIsOpen)(!1)},onActive:VS,onResolve:VS};Object.keys(t).forEach(function(e){t[e].__default=!0});var r=wC(wC({},t),e);return Promise.resolve(r)}))})}(e,n)})).then(function(e){return IS(e)}).then(function(e){return e.map(function(e){return KC(KC({},e),{},{onSelect:function(n){e.onSelect(n),t.forEach(function(e){return e.onSelect?.call(e,n)})},onActive:function(n){e.onActive(n),t.forEach(function(e){return e.onActive?.call(e,n)})},onResolve:function(n){e.onResolve(n),t.forEach(function(e){return e.onResolve?.call(e,n)})}})})})},navigator:KC({navigate:function(e){var t=e.itemUrl;n.location.assign(t)},navigateNewTab:function(e){var t=e.itemUrl;n.open(t,`_blank`,`noopener`)?.focus()},navigateNewWindow:function(e){var t=e.itemUrl;n.open(t,`_blank`,`noopener`)}},e.navigator)})}function YC(e){return YC=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},YC(e)}function XC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ZC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?XC(Object(n),!0).forEach(function(t){QC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function QC(e,t,n){return(t=function(e){var t=function(e,t){if(YC(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(YC(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}(e,`string`);return YC(t)===`symbol`?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $C(e){return $C=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},$C(e)}function ew(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ew(Object(n),!0).forEach(function(t){nw(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ew(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function nw(e,t,n){return(t=function(e){var t=function(e,t){if($C(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if($C(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}(e,`string`);return $C(t)===`symbol`?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rw(e){return function(e){if(Array.isArray(e))return iw(e)}(e)||function(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}(e)||function(e,t){if(e){if(typeof e==`string`)return iw(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 iw(e,t)}}(e)||function(){throw TypeError(`Invalid attempt to spread non-iterable instance.
20In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function iw(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 aw(e){return!!e.execute}function ow(e,t,n){if(i=e,i?.execute){var r=e.requesterId===`algolia`?Object.assign.apply(Object,[{}].concat(rw(Object.keys(n.context).map(function(e){return n.context[e]?.__algoliaSearchParameters})))):{};return tw(tw({},e),{},{requests:e.queries.map(function(n){return{query:e.requesterId===`algolia`?tw(tw({},n),{},{params:tw(tw({},r),n.params)}):n,sourceId:t,transformResponse:e.transformResponse}})})}var i;return{items:e,sourceId:t}}function sw(e){var t=e.reduce(function(e,t){if(!aw(t))return e.push(t),e;var n=t.searchClient,r=t.execute,i=t.requesterId,a=t.requests,o=e.find(function(e){return aw(t)&&aw(e)&&e.searchClient===n&&!!i&&e.requesterId===i});if(o){var s;(s=o.items).push.apply(s,rw(a))}else{var c={execute:r,requesterId:i,items:a,searchClient:n};e.push(c)}return e},[]).map(function(e){if(!aw(e))return Promise.resolve(e);var t=e,n=t.execute,r=t.items;return n({searchClient:t.searchClient,requests:r})});return Promise.all(t).then(function(e){return IS(e)})}function cw(e,t,n){return t.map(function(t){var r,i=e.filter(function(e){return e.sourceId===t.sourceId}),a=i.map(function(e){return e.items}),o=i[0].transformResponse,s=o?o({results:r=a,hits:r.map(function(e){return e.hits}
20).filter(Boolean),facetHits:r.map(function(e){return e.facetHits?.map(function(e){return{label:e.value,count:e.count,_highlightResult:{label:{value:e.highlighted}}}})}).filter(Boolean)}):a;return t.onResolve({source:t,results:a,items:s,state:n.getState()}),s.every(Boolean),`${t.sourceId}${JSON.stringify(void 0)}`,{source:t,items:s}})}function lw(e){return lw=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},lw(e)}var uw=[`event`,`nextState`,`props`,`query`,`refresh`,`store`];function dw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function fw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?dw(Object(n),!0).forEach(function(t){pw(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dw(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function pw(e,t,n){return(t=function(e){var t=function(e,t){if(lw(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(lw(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}(e,`string`);return lw(t)===`symbol`?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mw(e,t){if(e==null)return{};var n,r,i=function(e,t){if(e==null)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var hw,gw,_w,vw=null,yw=(hw=-1,gw=-1,_w=void 0,function(e){var t=++hw;return Promise.resolve(e).then(function(e){return _w&&t<gw?_w:(gw=t,_w=e,e)})});function bw(e){var t=e.event,n=e.nextState,r=n===void 0?{}:n,i=e.props,a=e.query,o=e.refresh,s=e.store,c=mw(e,uw);vw&&i.environment.clearTimeout(vw);var l=c.setCollections,u=c.setIsOpen,d=c.setQuery,f=c.setActiveItemId,p=c.setStatus,m=c.setContext;if(d(a),f(i.defaultActiveItemId),!a&&!1===i.openOnFocus){var h=s.getState().collections.map(function(e){return fw(fw({},e),{},{items:[]})});p(`idle`),l(h),u(r.isOpen??i.shouldPanelOpen({state:s.getState()}));var g=vC(yw(h).then(function(){return Promise.resolve()}));return s.pendingRequests.add(g)}p(`loading`),vw=i.environment.setTimeout(function(){p(`stalled`)},i.stallThreshold);var _=vC(yw(i.getSources(fw({query:a,refresh:o,state:s.getState()},c)).then(function(e){return Promise.all(e.map(function(e){return Promise.resolve(e.getItems(fw({query:a,refresh:o,state:s.getState()},c))).then(function(t){return ow(t,e.sourceId,s.getState())})})).then(sw).then(function(t){var n=t.some(function(e){return function(e){return!Array.isArray(e)&&!!e?._automaticInsights}(e.items)});return n&&m({algoliaInsightsPlugin:fw(fw({},s.getState().context?.algoliaInsightsPlugin||{}),{},{__automaticInsights:n})}),cw(t,e,s)}).then(function(e){return function(e){var t=e.collections,n=e.props,r=e.state,i=t.reduce(function(e,t){return ZC(ZC({},e),{},QC({},t.source.sourceId,ZC(ZC({},t.source),{},{getItems:function(){return IS(t.items)}})))},{}),a=n.plugins.reduce(function(e,t){return t.reshape?t.reshape(e):e},{sourcesBySourceId:i,state:r}).sourcesBySourceId;return IS(n.reshape({sourcesBySourceId:a,sources:Object.values(a),state:r})).filter(Boolean).map(function(e){return{source:e,items:e.getItems()}})}({collections:e,props:i,state:s.getState()})})}))).then(function(e){p(`idle`),l(e);var n=i.shouldPanelOpen({state:s.getState()});u(r.isOpen??(i.openOnFocus&&!a&&n||n));var d=AC(s.getState());if(s.getState().activeItemId!==null&&d){var f=d.item,m=d.itemInputValue,h=d.itemUrl,g=d.source;g.onActive(fw({event:t,item:f,itemInputValue:m,itemUrl:h,refresh:o,source:g,state:s.getState()},c))}}).finally(function(){p(`idle`),vw&&i.environment.clearTimeout(vw)});return s.pendingRequests.add(_)}function xw(e){return xw=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},xw(e)}var Sw=[`event`,`props`,`refresh`,`store`];function Cw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ww(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];
20t%2?Cw(Object(n),!0).forEach(function(t){Tw(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cw(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Tw(e,t,n){return(t=function(e){var t=function(e,t){if(xw(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xw(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}(e,`string`);return xw(t)===`symbol`?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ew(e,t){if(e==null)return{};var n,r,i=function(e,t){if(e==null)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Dw(e){return Dw=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Dw(e)}var Ow=[`props`,`refresh`,`store`],kw=[`inputElement`,`formElement`,`panelElement`],Aw=[`inputElement`],jw=[`inputElement`,`maxLength`],Mw=[`source`],Nw=[`item`,`source`];function Pw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Fw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Pw(Object(n),!0).forEach(function(t){Iw(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pw(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Iw(e,t,n){return(t=function(e){var t=function(e,t){if(Dw(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Dw(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}(e,`string`);return Dw(t)===`symbol`?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lw(e,t){if(e==null)return{};var n,r,i=function(e,t){if(e==null)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Rw(e){var t=e.props,n=e.refresh,r=e.store,i=Lw(e,Ow);return{getEnvironmentProps:function(e){var n=e.inputElement,i=e.formElement,a=e.panelElement;function o(e){!r.getState().isOpen&&r.pendingRequests.isEmpty()||e.target===n||!1===[i,a].some(function(t){return n=t,r=e.target,n===r||n.contains(r);var n,r})&&(r.dispatch(`blur`,null),t.debug||r.pendingRequests.cancelAll())}return Fw({onTouchStart:o,onMouseDown:o,onTouchMove:function(e){!1!==r.getState().isOpen&&n===t.environment.document.activeElement&&e.target!==n&&n.blur()}},Lw(e,kw))},getRootProps:function(e){return Fw({role:`combobox`,"aria-expanded":r.getState().isOpen,"aria-haspopup":`listbox`,"aria-controls":r.getState().isOpen?r.getState().collections.map(function(e){var n=e.source;return jC(t.id,`list`,n)}).join(` `):void 0,"aria-labelledby":jC(t.id,`label`)},e)},getFormProps:function(e){e.inputElement;var a=Lw(e,Aw),o=function(a){var o;t.onSubmit(Fw({event:a,refresh:n,state:r.getState()},i)),r.dispatch(`submit`,null),(o=e.inputElement)==null||o.blur()};return Fw({action:``,noValidate:!0,role:`search`,onSubmit:function(e){e.preventDefault();var n=kC(t.plugins,r.pendingRequests);n===void 0?o(e):n.then(function(){return o(e)})},onReset:function(a){var o;a.preventDefault(),t.onReset(Fw({event:a,refresh:n,state:r.getState()},i)),r.dispatch(`reset`,null),(o=e.inputElement)==null||o.focus()}},a)},getLabelProps:function(e){return Fw({htmlFor:jC(t.id,`input`),id:jC(t.
20id,`label`)},e)},getInputProps:function(e){function a(e){(t.openOnFocus||r.getState().query)&&bw(Fw({event:e,props:t,query:r.getState().completion||r.getState().query,refresh:n,store:r},i)),r.dispatch(`focus`,null)}var o=e||{};o.inputElement;var s=o.maxLength,c=s===void 0?512:s,l=Lw(o,jw),u=AC(r.getState()),d=function(e){return!!(e&&e.match(MC))}(t.environment.navigator?.userAgent||``),f=t.enterKeyHint||(u!=null&&u.itemUrl&&!d?`go`:`search`);return Fw({"aria-autocomplete":`both`,"aria-activedescendant":r.getState().isOpen&&r.getState().activeItemId!==null?jC(t.id,`item-${r.getState().activeItemId}`,u?.source):void 0,"aria-controls":r.getState().isOpen?r.getState().collections.filter(function(e){return e.items.length>0}).map(function(e){var n=e.source;return jC(t.id,`list`,n)}).join(` `):void 0,"aria-labelledby":jC(t.id,`label`),value:r.getState().completion||r.getState().query,id:jC(t.id,`input`),autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`off`,enterKeyHint:f,spellCheck:`false`,autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:c,type:`search`,onChange:function(e){var a=e.currentTarget.value;t.ignoreCompositionEvents&&NC(e).isComposing?i.setQuery(a):bw(Fw({event:e,props:t,query:a.slice(0,c),refresh:n,store:r},i))},onCompositionEnd:function(e){bw(Fw({event:e,props:t,query:e.currentTarget.value.slice(0,c),refresh:n,store:r},i))},onKeyDown:function(e){NC(e).isComposing||function(e){var t=e.event,n=e.props,r=e.refresh,i=e.store,a=Ew(e,Sw);if(t.key===`ArrowUp`||t.key===`ArrowDown`){var o=function(){var e=AC(i.getState()),t=n.environment.document.getElementById(jC(n.id,`item-${i.getState().activeItemId}`,e?.source));t&&(t.scrollIntoViewIfNeeded?t.scrollIntoViewIfNeeded(!1):t.scrollIntoView(!1))},s=function(){var e=AC(i.getState());if(i.getState().activeItemId!==null&&e){var n=e.item,o=e.itemInputValue,s=e.itemUrl,c=e.source;c.onActive(ww({event:t,item:n,itemInputValue:o,itemUrl:s,refresh:r,source:c,state:i.getState()},a))}};t.preventDefault(),!1===i.getState().isOpen&&(n.openOnFocus||i.getState().query)?bw(ww({event:t,props:n,query:i.getState().query,refresh:r,store:i},a)).then(function(){i.dispatch(t.key,{nextActiveItemId:n.defaultActiveItemId}),s(),setTimeout(o,0)}):(i.dispatch(t.key,{}),s(),o())}else if(t.key===`Escape`)t.preventDefault(),i.dispatch(t.key,null),i.pendingRequests.cancelAll();else if(t.key===`Tab`)i.dispatch(`blur`,null),i.pendingRequests.cancelAll();else if(t.key===`Enter`){if(i.getState().activeItemId===null||i.getState().collections.every(function(e){return e.items.length===0})){var c=kC(n.plugins,i.pendingRequests);c===void 0?n.debug||i.pendingRequests.cancelAll():c.then(i.pendingRequests.cancelAll);return}t.preventDefault();var l=AC(i.getState()),u=l.item,d=l.itemInputValue,f=l.itemUrl,p=l.source;if(t.metaKey||t.ctrlKey)f!==void 0&&(p.onSelect(ww({event:t,item:u,itemInputValue:d,itemUrl:f,refresh:r,source:p,state:i.getState()},a)),n.navigator.navigateNewTab({itemUrl:f,item:u,state:i.getState()}));else if(t.shiftKey)f!==void 0&&(p.onSelect(ww({event:t,item:u,itemInputValue:d,itemUrl:f,refresh:r,source:p,state:i.getState()},a)),n.navigator.navigateNewWindow({itemUrl:f,item:u,state:i.getState()}));else if(!t.altKey){if(f!==void 0)return p.onSelect(ww({event:t,item:u,itemInputValue:d,itemUrl:f,refresh:r,source:p,state:i.getState()},a)),void n.navigator.navigate({itemUrl:f,item:u,state:i.getState()});bw(ww({event:t,nextState:{isOpen:!1},props:n,query:d,refresh:r,store:i},a)).then(function(){p.onSelect(ww({event:t,item:u,itemInputValue:d,itemUrl:f,refresh:r,source:p,state:i.getState()},a))})}}}(Fw({event:e,props:t,refresh:n,store:r},i))},onFocus:a,onBlur:VS,onClick:function(n){e.inputElement!==t.environment.document.activeElement||r.getState().isOpen||a(n)}},l)},getPanelProps:function(e){return Fw({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){r.dispatch(`mouseleave`,null)}},e)},getListProps:function(e){var n=e||{},r=n.source,i=Lw(n,Mw);return Fw({role:`listbox`,"aria-labelledby":jC(t.id,`label`),id:jC(t.id,`list`,r)},i)},getItemProps:function(e){var a=e.item,o=e.source,s=Lw(e,Nw);
20return Fw({id:jC(t.id,`item-${a.__autocomplete_id}`,o),role:`option`,"aria-selected":r.getState().activeItemId===a.__autocomplete_id,onMouseMove:function(e){if(a.__autocomplete_id!==r.getState().activeItemId){r.dispatch(`mousemove`,a.__autocomplete_id);var t=AC(r.getState());if(r.getState().activeItemId!==null&&t){var o=t.item,s=t.itemInputValue,c=t.itemUrl,l=t.source;l.onActive(Fw({event:e,item:o,itemInputValue:s,itemUrl:c,refresh:n,source:l,state:r.getState()},i))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var s=o.getItemInputValue({item:a,state:r.getState()}),c=o.getItemUrl({item:a,state:r.getState()});(c?Promise.resolve():bw(Fw({event:e,nextState:{isOpen:!1},props:t,query:s,refresh:n,store:r},i))).then(function(){o.onSelect(Fw({event:e,item:a,itemInputValue:s,itemUrl:c,refresh:n,source:o,state:r.getState()},i))})}},s)}}}function zw(e){return zw=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},zw(e)}function Bw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Vw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Bw(Object(n),!0).forEach(function(t){Hw(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bw(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Hw(e,t,n){return(t=function(e){var t=function(e,t){if(zw(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(zw(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}(e,`string`);return zw(t)===`symbol`?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Uw(e){var t=e.plugins,n=e.options,r=(n.__autocomplete_metadata?.userAgents||[])[0]?.segment,i=r?Hw({},r,Object.keys(n.__autocomplete_metadata?.options||{})):{};return{plugins:t.map(function(e){return{name:e.name,options:Object.keys(e.__autocomplete_pluginOptions||[])}}),options:Vw({"autocomplete-core":Object.keys(n)},i),ua:HS.concat(n.__autocomplete_metadata?.userAgents||[])}}function Ww(e){var t=e.state;return!1===t.isOpen||t.activeItemId===null?null:AC(t)?.itemInputValue||null}function Gw(e){return Gw=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Gw(e)}function Kw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function qw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Kw(Object(n),!0).forEach(function(t){Jw(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kw(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}
20function Jw(e,t,n){return(t=function(e){var t=function(e,t){if(Gw(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Gw(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}(e,`string`);return Gw(t)===`symbol`?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Yw=function(e,t){switch(t.type){case`setActiveItemId`:case`mousemove`:return qw(qw({},e),{},{activeItemId:t.payload});case`setQuery`:return qw(qw({},e),{},{query:t.payload,completion:null});case`setCollections`:return qw(qw({},e),{},{collections:t.payload});case`setIsOpen`:return qw(qw({},e),{},{isOpen:t.payload});case`setStatus`:return qw(qw({},e),{},{status:t.payload});case`setContext`:return qw(qw({},e),{},{context:qw(qw({},e.context),t.payload)});case`ArrowDown`:var n=qw(qw({},e),{},{activeItemId:t.payload.hasOwnProperty(`nextActiveItemId`)?t.payload.nextActiveItemId:SC(1,e.activeItemId,RS(e),t.props.defaultActiveItemId)});return qw(qw({},n),{},{completion:Ww({state:n})});case`ArrowUp`:var r=qw(qw({},e),{},{activeItemId:SC(-1,e.activeItemId,RS(e),t.props.defaultActiveItemId)});return qw(qw({},r),{},{completion:Ww({state:r})});case`Escape`:return e.isOpen?qw(qw({},e),{},{activeItemId:null,isOpen:!1,completion:null}):qw(qw({},e),{},{activeItemId:null,query:``,status:`idle`,collections:[]});case`submit`:return qw(qw({},e),{},{activeItemId:null,isOpen:!1,status:`idle`});case`reset`:return qw(qw({},e),{},{activeItemId:!0===t.props.openOnFocus?t.props.defaultActiveItemId:null,status:`idle`,completion:null,query:``});case`focus`:return qw(qw({},e),{},{activeItemId:t.props.defaultActiveItemId,isOpen:(t.props.openOnFocus||!!e.query)&&t.props.shouldPanelOpen({state:e})});case`blur`:return t.props.debug?e:qw(qw({},e),{},{isOpen:!1,activeItemId:null});case`mouseleave`:return qw(qw({},e),{},{activeItemId:t.props.defaultActiveItemId});default:return`${JSON.stringify(t.type)}`,e}};function Xw(e){return Xw=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Xw(e)}function Zw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Zw(Object(n),!0).forEach(function(t){$w(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zw(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function $w(e,t,n){return(t=function(e){var t=function(e,t){if(Xw(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Xw(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}(e,`string`);return Xw(t)===`symbol`?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eT(e){var t=[],n=JC(e,t),r=LC(Yw,n,function(e){var t,r,a=e.prevState,l=e.state;if(n.onStateChange(Qw({prevState:a,state:l,refresh:o,navigator:n.navigator},i)),!c()&&(t=l.context)!=null&&(r=t.algoliaInsightsPlugin)!=null&&r.__automaticInsights&&!1!==n.insights){var u=mC({__autocomplete_clickAnalytics:!1});n.plugins.push(u),s([u])}}),i=function(e){var t=e.store;return{setActiveItemId:function(e){t.dispatch(`setActiveItemId`,e)},setQuery:function(e){t.dispatch(`setQuery`,e)},setCollections:function(e){var n=0,r=e.map(function(e){return BC(BC({},e),{},{items:IS(e.items).map(function(e){return BC(BC({},e),{},{__autocomplete_id:n++})})})});t.dispatch(`setCollections`,r)},setIsOpen:function(e){t.dispatch(`setIsOpen`,e)},setStatus:function(e){t.dispatch(`setStatus`,e)},setContext:function(e){t.dispatch(`setContext`,e)}}}({store:r}
20),a=Rw(Qw({props:n,refresh:o,store:r,navigator:n.navigator},i));function o(){return bw(Qw({event:new Event(`input`),nextState:{isOpen:r.getState().isOpen},props:n,navigator:n.navigator,query:r.getState().query,refresh:o,store:r},i))}function s(e){e.forEach(function(e){return e.subscribe?.call(e,Qw(Qw({},i),{},{navigator:n.navigator,refresh:o,onSelect:function(e){t.push({onSelect:e})},onActive:function(e){t.push({onActive:e})},onResolve:function(e){t.push({onResolve:e})}}))})}function c(){return n.plugins.some(function(e){return e.name===`aa.algoliaInsightsPlugin`})}if(n.insights&&!c()){var l=typeof n.insights==`boolean`?{}:n.insights;n.plugins.push(mC(l))}return s(n.plugins),function(e){var t,n,r=e.metadata,i=e.environment;if((t=i.navigator)!=null&&(n=t.userAgent)!=null&&n.includes(`Algolia Crawler`)){var a=i.document.createElement(`meta`),o=i.document.querySelector(`head`);a.name=`algolia:metadata`,setTimeout(function(){a.content=JSON.stringify(r),o.appendChild(a)},0)}}({metadata:Uw({plugins:n.plugins,options:e}),environment:n.environment}),Qw(Qw({refresh:o,navigator:n.navigator},a),i)}var tT=`https://askai.algolia.com/chat`,nT=`https://beta-chat-askai.algolia.com`;function rT(e){var t=e.translations,n=(t===void 0?{}:t).poweredByText,r=n===void 0?`Powered by`:n;return B.createElement(`a`,{href:`https://www.algolia.com/ref/docsearch/?utm_source=${window.location.hostname}&utm_medium=referral&utm_content=powered_by&utm_campaign=docsearch`,target:`_blank`,rel:`noopener noreferrer`},B.createElement(`span`,{className:`DocSearch-Label`},r),B.createElement(`svg`,{width:`80`,height:`24`,"aria-label":`Algolia`,role:`img`,id:`Layer_1`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 2196.2 500`},B.createElement(`defs`,null,B.createElement(`style`,null,`.cls-1,.cls-2{fill:#003dff;}.cls-2{fill-rule:evenodd;}`)),B.createElement(`path`,{className:`cls-2`,d:`M1070.38,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z`}),B.createElement(`rect`,{className:`cls-1`,x:`1845.88`,y:`104.73`,width:`62.58`,height:`277.9`,rx:`5.9`,ry:`5.9`}),B.createElement(`path`,{className:`cls-2`,d:`M1851.78,71.38h50.77c3.26,0,5.9-2.64,5.9-5.9V5.9c0-3.62-3.24-6.39-6.82-5.83l-50.77,7.95c-2.87,.45-4.99,2.92-4.99,5.83v51.62c0,3.26,2.64,5.9,5.9,5.9Z`}),B.createElement(`path`,{className:`cls-2`,d:`M1764.03,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z`}),B.createElement(`path`,{className:`cls-2`,d:`M1631.95,142.72c-11.14-12.25-24.83-21.65-40.78-28.31-15.92-6.53-33.26-9.85-52.07-9.85-18.78,0-36.15,3.17-51.92,9.85-15.59,6.66-29.29,16.05-40.76,28.31-11.47,12.23-20.38,26.87-26.76,44.03-6.38,17.17-9.24,37.37-9.24,58.36,0,20.99,3.19,36.87,9.55,54.21,6.38,17.32,15.14,32.11,26.45,44.36,11.29,12.23,24.83,21.62,40.6,28.46,15.77,6.83,40.12,10.33,52.4,10.48,12.25,0,36.78-3.82,52.7-10.48,15.92-6.68,29.46-16.23,40.78-28.46,11.29-12.25,20.05-27.04,26.25-44.36,6.22-17.34,9.24-33.22,9.24-54.21,0-20.99-3.34-41.19-10.03-58.36-6.38-17.17-15.14-31.8-26.43-44.03Zm-44.43,163.75c-11.47,15.75-27.56,23.7-48.09,23.7-20.55,0-36.63-7.8-48.1-23.7-11.47-15.75-17.21-34.01-17.21-61.2,0-26.89,5.59-49.14,17.06-64.87,11.45-15.75,27.54-23.52,48.07-23.52,20.55,0,36.63,7.78,48.09,23.52,11.47,15.57,17.36,37.98,17.36,64.87,0,27.19-5.72,45.3-17.19,61.2Z`}),B.createElement(`path`,{className:`cls-2`,d:`M894.42,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.
2012,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z`}),B.createElement(`path`,{className:`cls-2`,d:`M2133.97,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z`}),B.createElement(`path`,{className:`cls-2`,d:`M1314.05,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-11.79,18.34-19.6,39.64-22.11,62.59-.58,5.3-.88,10.68-.88,16.14s.31,11.15,.93,16.59c4.28,38.09,23.14,71.61,50.66,94.52,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47h0c17.99,0,34.61-5.93,48.16-15.97,16.29-11.58,28.88-28.54,34.48-47.75v50.26h-.11v11.08c0,21.84-5.71,38.27-17.34,49.36-11.61,11.08-31.04,16.63-58.25,16.63-11.12,0-28.79-.59-46.6-2.41-2.83-.29-5.46,1.5-6.27,4.22l-12.78,43.11c-1.02,3.46,1.27,7.02,4.83,7.53,21.52,3.08,42.52,4.68,54.65,4.68,48.91,0,85.16-10.75,108.89-32.21,21.48-19.41,33.15-48.89,35.2-88.52V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,64.1s.65,139.13,0,143.36c-12.08,9.77-27.11,13.59-43.49,14.7-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-1.32,0-2.63-.03-3.94-.1-40.41-2.11-74.52-37.26-74.52-79.38,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33Z`}),B.createElement(`path`,{className:`cls-1`,d:`M249.83,0C113.3,0,2,110.09,.03,246.16c-2,138.19,110.12,252.7,248.33,253.5,42.68,.25,83.79-10.19,120.3-30.03,3.56-1.93,4.11-6.83,1.08-9.51l-23.38-20.72c-4.75-4.21-11.51-5.4-17.36-2.92-25.48,10.84-53.17,16.38-81.71,16.03-111.68-1.37-201.91-94.29-200.13-205.96,1.76-110.26,92-199.41,202.67-199.41h202.69V407.41l-115-102.18c-3.72-3.31-9.42-2.66-12.42,1.31-18.46,24.44-48.53,39.64-81.93,37.34-46.33-3.2-83.87-40.5-87.34-86.81-4.15-55.24,39.63-101.52,94-101.52,49.18,0,89.68,37.85,93.91,85.95,.38,4.28,2.31,8.27,5.52,11.12l29.95,26.55c3.4,3.01,8.79,1.17,9.63-3.3,2.16-11.55,2.92-23.58,2.07-35.92-4.82-70.34-61.8-126.93-132.17-131.26-80.68-4.97-148.13,58.14-150.27,137.25-2.09,77.1,61.08,143.56,138.19,145.26,32.19,.71,62.03-9.41,86.14-26.95l150.26,133.2c6.44,5.71,16.61,1.14,16.61-7.47V9.48C499.66,4.25,495.42,0,490.18,0H249.83Z`})))}function iT(e){return B.createElement(`svg`,{width:`20`,height:`20`,"aria-label":e.ariaLabel,viewBox:`0 0 24 24`,role:`img`},B.createElement(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.4`},e.children))}function aT(e){var t=e.translations,n=t===void 0?{}:t,r=e.isAskAiActive,i=r!==void 0&&r,a=n.selectText,o=a===void 0?`Select`:a,s=n.selectKeyAriaLabel,c=s===void 0?`Enter key`:s,l=n.submitQuestionText,u=l===void 0?`Submit question`:l,d=n.navigateText,f=d===void 0?`Navigate`:d,p=n.navigateUpKeyAriaLabel,m=p===void 0?`Arrow up`:p,h=n.navigateDownKeyAriaLabel,g=h===void 0?`Arrow down`:h,_=n.closeText,v=_===void 0?`Close`:_,y=n.backToSearchText,b=y===void 0?`Back to search`:y,x=n.closeKeyAriaLabel,S=x===void 0?`Escape key`:x,C=n.poweredByText,w=C===void 0?`Powered by`:C;return B.createElement(B.Fragment,null,B.createElement(`div`,{className:`DocSearch-Logo`},B.createElement(rT,{translations:{poweredByText:w}})),B.createElement(`ul`,{className:`DocSearch-Commands`},B.createElement(`li`,null,B.createElement(`kbd`,{className:`DocSearch-Commands-Key`},B.createElement(iT,{ariaLabel:g},B.createElement(`path`,{d:`M12 5v14`}),B.createElement(`path`,{d:`m19 12-7 7-7-7`}))),B.createElement(`kbd`,{className:`DocSearch-Commands-Key`},B.createElement(iT,{ariaLabel:m},B.createElement(`path`,{d:`m5 12 7-7 7 7`}),B.createElement(`path`,{d:`M12 19V5`}))),B.createElement(`span`,{className:`DocSearch-Label`},f)),B.createElement(`li`,null,B.createElement(`kbd`,{className:`DocSearch-Commands-Key`},B.createElement(iT,{ariaLabel:c},B.createElement(`polyline`,{points:`9 10 4 15 9 20`}),B.createElement(`path`,{d:`M20 4v7a4 4 0 0 1-4 4H4`}))),B.createElement(`span`,{className:`DocSearch-Label`},i?u:o)),B.createElement(`li`,null,B.createElement(`kbd`,{className:`DocSearch-Commands-Key`},B.createElement(`span`,{className:`DocSearch-Escape-Key`},`ESC`)),B.createElement(`span`,{className:`DocSearch-Label`,"aria-label":S},i?b:v))))}function oT(e){var t=e.hit,n=e.children;return B.createElement(`a`,{href:t.url},n)}function sT(e){var t=e.className;
vendor: 4,306 bytes, line 20
20return B.createElement(`svg`,{viewBox:`0 0 38 38`,className:t,stroke:`currentColor`,strokeOpacity:`.5`},B.createElement(`g`,{fill:`none`,fillRule:`evenodd`},B.createElement(`g`,{transform:`translate(1 1)`,strokeWidth:`2`},B.createElement(`circle`,{strokeOpacity:`.3`,cx:`18`,cy:`18`,r:`18`}),B.createElement(`path`,{d:`M36 18c0-9.94-8.06-18-18-18`},B.createElement(`animateTransform`,{attributeName:`transform`,type:`rotate`,from:`0 18 18`,to:`360 18 18`,dur:`1s`,repeatCount:`indefinite`})))))}function cT(e){var t=e.className,n=t===void 0?``:t;return B.createElement(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.3`,strokeLinecap:`round`,strokeLinejoin:`round`,className:`DocSearch-Hit-icon-sparkles ${n}`},B.createElement(`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`}),B.createElement(`path`,{d:`M20 3v4`}),B.createElement(`path`,{d:`M22 5h-4`}),B.createElement(`path`,{d:`M4 17v2`}),B.createElement(`path`,{d:`M5 18H3`}))}function lT(){return B.createElement(`svg`,{width:`20`,height:`20`,viewBox:`0 0 20 20`},B.createElement(`g`,{stroke:`currentColor`,fill:`none`,fillRule:`evenodd`,strokeLinecap:`round`,strokeLinejoin:`round`},B.createElement(`path`,{d:`M3.18 6.6a8.23 8.23 0 1112.93 9.94h0a8.23 8.23 0 01-11.63 0`}),B.createElement(`path`,{d:`M6.44 7.25H2.55V3.36M10.45 6v5.6M10.45 11.6L13 13`})))}function uT(){return B.createElement(`svg`,{width:`20`,height:`20`,viewBox:`0 0 20 20`},B.createElement(`path`,{d:`M10 10l5.09-5.09L10 10l5.09 5.09L10 10zm0 0L4.91 4.91 10 10l-5.09 5.09L10 10z`,stroke:`currentColor`,fill:`none`,fillRule:`evenodd`,strokeLinecap:`round`,strokeLinejoin:`round`}))}function dT(){return B.createElement(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,fillRule:`evenodd`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,className:`lucide lucide-triangle-alert-icon lucide-triangle-alert`},B.createElement(`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`}),B.createElement(`path`,{d:`M12 9v4`}),B.createElement(`path`,{d:`M12 17h.01`}))}function fT(){return B.createElement(`svg`,{className:`DocSearch-Hit-Select-Icon`,width:`20`,height:`20`,viewBox:`0 0 20 20`},B.createElement(`g`,{stroke:`currentColor`,fill:`none`,fillRule:`evenodd`,strokeLinecap:`round`,strokeLinejoin:`round`},B.createElement(`path`,{d:`M18 3v4c0 2-2 4-4 4H2`}),B.createElement(`path`,{d:`M8 17l-6-6 6-6`})))}var pT=function(){return B.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`},B.createElement(`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`}),B.createElement(`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`}),B.createElement(`path`,{d:`M10 9H8`}),B.createElement(`path`,{d:`M16 13H8`}),B.createElement(`path`,{d:`M16 17H8`}))};function mT(e){switch(e.type){case`lvl1`:return B.createElement(pT,null);case`content`:return B.createElement(gT,null);default:return B.createElement(hT,null)}}function hT(){return B.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`},B.createElement(`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`}),B.createElement(`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`}),B.createElement(`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`}),B.createElement(`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`}))}function gT(){return B.createElement(`svg`,{width:`20`,height:`20`,viewBox:`0 0 20 20`},B.createElement(`path`,{d:`M17 5H3h14zm0 5H3h14zm0 5H3h14z`,stroke:`currentColor`,fill:`none`,fillRule:`evenodd`,strokeLinejoin:`round`}))}function _T(){return B.createElement(`svg`,{width:`20`,height:`20`,viewBox:`0 0 20 20`},B.createElement(`path`,{d:`M10 14.2L5 17l1-5.6-4-4 5.5-.7 2.5-5 2.5 5 5.6.8-4 4 .9 5.5z`,stroke:`currentColor`,fill:`none`,fillRule:`evenodd`,strokeLinejoin:`round`}))}function vT(){return B.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,
20width:18,height:18,viewBox:`0 0 18 18`,fill:`none`},B.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M8.99984 1.29102C4.74264 1.29102 1.2915 4.74215 1.2915 8.99935C1.2915 13.2565 4.74264 16.7077 8.99984 16.7077C13.257 16.7077 16.7082 13.2565 16.7082 8.99935C16.7082 4.74215 13.257 1.29102 8.99984 1.29102ZM0.0415039 8.99935C0.0415039 4.0518 4.05229 0.0410156 8.99984 0.0410156C13.9474 0.0410156 17.9582 4.0518 17.9582 8.99935C17.9582 13.9469 13.9474 17.9577 8.99984 17.9577C4.05229 17.9577 0.0415039 13.9469 0.0415039 8.99935ZM5.87484 6.49935C5.87484 6.15417 6.15466 5.87435 6.49984 5.87435H11.4998C11.845 5.87435 12.1248 6.15417 12.1248 6.49935V11.4993C12.1248 11.8445 11.845 12.1243 11.4998 12.1243H6.49984C6.15466 12.1243 5.87484 11.8445 5.87484 11.4993V6.49935ZM7.12484 7.12435V10.8743H10.8748V7.12435H7.12484Z`,fill:`currentcolor`}))}function yT(){return B.createElement(`svg`,{width:`40`,height:`40`,viewBox:`0 0 20 20`,fill:`none`,fillRule:`evenodd`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`},B.createElement(`path`,{d:`M19 4.8a16 16 0 00-2-1.2m-3.3-1.2A16 16 0 001.1 4.7M16.7 8a12 12 0 00-2.8-1.4M10 6a12 12 0 00-6.7 2M12.3 14.7a4 4 0 00-4.5 0M14.5 11.4A8 8 0 0010 10M3 16L18 2M10 18h0`}))}function bT(){return B.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`64`,height:`64`,viewBox:`0 0 24 24`,fill:`none`,stroke:`#5a5e9a`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`},B.createElement(`path`,{d:`m13.5 8.5-5 5`}),B.createElement(`path`,{d:`m8.5 8.5 5 5`}),B.createElement(`circle`,{cx:`11`,cy:`11`,r:`8`}),B.createElement(`path`,{d:`m21 21-4.3-4.3`}))}function xT(){return B.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:4,height:16,viewBox:`0 0 4 16`,fill:`none`},B.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M1.99984 1.95898C1.88478 1.95898 1.7915 2.05226 1.7915 2.16732C1.7915 2.28238 1.88478 2.37565 1.99984 2.37565C2.1149 2.37565 2.20817 2.28238 2.20817 2.16732C2.20817 2.05226 2.1149 1.95898 1.99984 1.95898ZM0.541504 2.16732C0.541504 1.3619 1.19442 0.708984 1.99984 0.708984C2.80525 0.708984 3.45817 1.3619 3.45817 2.16732C3.45817 2.97273 2.80525 3.62565 1.99984 3.62565C1.19442 3.62565 0.541504 2.97273 0.541504 2.16732ZM1.99984 7.79232C1.88478 7.79232 1.7915 7.88559 1.7915 8.00065C1.7915 8.11571 1.88478 8.20898 1.99984 8.20898C2.1149 8.20898 2.20817 8.11571 2.20817 8.00065C2.20817 7.88559 2.1149 7.79232 1.99984 7.79232ZM0.541504 8.00065C0.541504 7.19524 1.19442 6.54232 1.99984 6.54232C2.80525 6.54232 3.45817 7.19524 3.45817 8.00065C3.45817 8.80607 2.80525 9.45898 1.99984 9.45898C1.19442 9.45898 0.541504 8.80607 0.541504 8.00065ZM1.99984 13.6257C1.88478 13.6257 1.7915 13.7189 1.7915 13.834C1.7915 13.949 1.88478 14.0423 1.99984 14.0423C2.1149 14.0423 2.20817 13.949 2.20817 13.834C2.20817 13.7189 2.1149 13.6257 1.99984 13.6257ZM0.541504 13.834C0.541504 13.0286 1.19442 12.3757 1.99984 12.3757C2.80525 12.3757 3.45817 13.0286 3.45817 13.834C3.45817 14.6394 2.80525 15.2923 1.99984 15.2923C1.19442 15.2923 0.541504 14.6394 0.541504 13.834Z`,fill:`currentcolor`}))}function ST(){return B.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`18`,height:`18`,viewBox:`0 0 18 18`,fill:`none`},B.createElement(`path`,{d:`M9 0.875C10.6068 0.875 12.1776 1.35149 13.5137 2.24414C14.8498 3.13693 15.8919 4.40598 16.5068 5.89062C17.1218 7.37522 17.2822 9.00892 16.9688 10.585C16.6552 12.1611 15.8814 13.6088 14.7451 14.7451C13.6088 15.8814 12.1611 16.6552 10.585 16.9688C9.00892 17.2822 7.37523 17.1218 5.89062 16.5068C4.40598 15.8919 3.13693 14.8498 2.24414 13.5137C1.35149 12.1776 0.875 10.6068 0.875 9C0.875 8.65482 1.15482 8.375 1.5 8.375C1.84518 8.375 2.125 8.65482 2.125 9C2.125 10.3596 2.52792 11.6888 3.2832 12.8193C4.03864 13.9499 5.1129 14.8312 6.36914 15.3516C7.62523 15.8718 9.00736 16.0083 10.3408 15.7432C11.6744 15.4779 12.8998 14.8228 13.8613 13.8613C14.8228 12.8998 15.4779 11.6744 15.7432 10.3408C16.0083 9.00736 15.8718 7.62523 15.3516 6.36914C14.8312 5.1129 13.9499 4.03864 12.8193 3.2832C11.6888 2.52792 10.3596 2.125 9 2.125C7.06829 2.125 5.21604 2.89096 3.82129 4.22949L3.00879 5.04199H5.66699C6.01202 5.04217 6.29199 5.32192 6.29199 5.66699C6.29182 6.01191 6.01191 6.29182 5.66699 6.29199H1.5C1.45939 6.29199 1.41889 6.28716 1.37891 6.2793C1.36148 6.27587 1.345 6.26949 1.32812 6.26465C1.267 6.24714 1.20782 6.22205 1.15332 6.18555C1.08536 6.14005 1.02604 6.08256 0.980469 6.01465C0.970244 5.99942 0.962841 5.98268 0.954102 5.9668C0.904937 5.87756 0.875056 5.77606 0.875 5.66699V1.5C0.875 1.15482 1.15482 0.875002 1.5 0.875C1.84518 0.875 2.125 1.15482 2.125 1.5V4.15723L2.94141 3.3418L2.9502 3.33301C4.57158 1.77433 6.73388 0.875 9 0.875ZM9.33301 4.20801C9.67808 4.20801 9.95783 4.48798 9.95801 4.83301V9.44727L12.9463 10.9414C13.2548 11.0958 13.3798 11.4707 13.2256 11.7793C13.0712 12.088 12.6955 12.213 12.3867 12.0586L9.05371 10.3926C8.84198 10.2867 8.70801 10.0697 8.70801 9.83301V4.83301C8.70818 4.48809 8.98809 4.20819 9.33301 4.20801Z`,fill:`currentcolor`}))}function CT(){return B.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,
20width:`19`,height:`19`,viewBox:`0 0 19 19`,fill:`none`},B.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M0.712717 3.38039C1.14249 2.95062 1.72538 2.70917 2.33317 2.70917H8.1665C8.51168 2.70917 8.7915 2.989 8.7915 3.33417C8.7915 3.67935 8.51168 3.95917 8.1665 3.95917H2.33317C2.0569 3.95917 1.79195 4.06892 1.5966 4.26427C1.40125 4.45962 1.2915 4.72457 1.2915 5.00084V16.6675C1.2915 16.9438 1.40125 17.2087 1.5966 17.4041C1.79195 17.5994 2.0569 17.7092 2.33317 17.7092H13.9998C14.2761 17.7092 14.5411 17.5994 14.7364 17.4041C14.9318 17.2087 15.0415 16.9438 15.0415 16.6675V10.8342C15.0415 10.489 15.3213 10.2092 15.6665 10.2092C16.0117 10.2092 16.2915 10.489 16.2915 10.8342V16.6675C16.2915 17.2753 16.0501 17.8582 15.6203 18.288C15.1905 18.7177 14.6076 18.9592 13.9998 18.9592H2.33317C1.72538 18.9592 1.14249 18.7177 0.712717 18.288C0.282947 17.8582 0.0415039 17.2753 0.0415039 16.6675V5.00084C0.0415039 4.39305 0.282947 3.81016 0.712717 3.38039Z`,fill:`currentcolor`}),B.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M15.6665 2.19141C15.3634 2.19141 15.0728 2.3118 14.8584 2.52611L7.06419 10.3204L6.52548 12.4752L8.68031 11.9365L16.4746 4.14223C16.6889 3.92792 16.8093 3.63725 16.8093 3.33417C16.8093 3.03109 16.6889 2.74043 16.4746 2.52611C16.2603 2.3118 15.9696 2.19141 15.6665 2.19141ZM13.9746 1.64223C14.4233 1.1935 15.0319 0.941406 15.6665 0.941406C16.3011 0.941406 16.9097 1.1935 17.3584 1.64223C17.8072 2.09096 18.0593 2.69957 18.0593 3.33417C18.0593 3.96877 17.8072 4.57738 17.3584 5.02611L9.44178 12.9428C9.36168 13.0229 9.26132 13.0797 9.15142 13.1072L5.81809 13.9405C5.6051 13.9938 5.3798 13.9314 5.22456 13.7761C5.06932 13.6209 5.00692 13.3956 5.06016 13.1826L5.8935 9.84925C5.92097 9.73936 5.9778 9.639 6.0579 9.5589L13.9746 1.64223Z`,fill:`currentcolor`}))}var wT,TT={before:`Searched for `,separator:`, `,lastSeparator:` and `,after:``};function ET(e){var t=e.queries,n=e.translations,r=e.onSearchQueryClick;if(t.length===0)return null;if(typeof n.aggregatedToolCallNode==`function`)return B.createElement(B.Fragment,null,n.aggregatedToolCallNode(t,r));var i=(n.aggregatedToolCallText?n.aggregatedToolCallText(t):TT)||{},a=i.before,o=a===void 0?``:a,s=i.separator,c=s===void 0?`, `:s,l=i.lastSeparator,u=l===void 0?` and `:l,d=i.after,f=d===void 0?``:d;return B.createElement(`div`,{className:`DocSearch-AskAiScreen-MessageContent-Tool Tool--AggregatedResult`},B.createElement(CS,{size:18}),B.createElement(`span`,null,o&&B.createElement(`span`,null,o),t.map(function(e,n){return B.createElement(B.Fragment,{key:e+n},B.createElement(`span`,{role:`button`,tabIndex:0,className:`DocSearch-AskAiScreen-MessageContent-Tool-Query`,onKeyDown:function(t){t.key!==`enter`&&t.key!==` `||(t.preventDefault(),r(e))},onClick:function(){return r(e)}},`"`,e,`"`),n<t.length-2&&c,n===t.length-2&&u)}),f&&B.createElement(`span`,null,f)))}function DT(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var OT={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function kT(e){OT=e}var AT={exec:function(){return null}};function jT(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:``,n=typeof e==`string`?e:e.source,r={replace:function(e,t){var i=typeof t==`string`?t:t.source;return i=i.replace(NT.caret,`$1`),n=n.replace(e,i),r},getRegex:function(){return new RegExp(n,t)}};return r}var MT=function(){try{return!0}catch{return!1}}(),NT={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine
20:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFB
20D3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDDC0-\uDDF3\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD40-\uDD59\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDD40-\uDD65\uDD6F-\uDD85\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDEC2-\uDEC7\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61\uDF80-\uDF89\uDF8B\uDF8E\uDF90-\uDFB5\uDFB7\uDFD1\uDFD3]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDED0-\uDEE3\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8\uDFC0-\uDFE0\uDFF0-\uDFF9]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDDB0-\uDDDB\uDDE0-\uDDE9\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDF50-\uDF59\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD80E\uD80F\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46\uDC60-\uDFFF]|\uD810[\uDC00-\uDFFA]|\uD811[\uDC00-\uDE46]|\uD818[\uDD00-\uDD1D\uDD30-\uDD39]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDD40-\uDD6C\uDD70-\uDD79\uDE40-\uDE96\uDEA0-\uDEB8\uDEBB-\uDED3\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3\uDFF2-\uDFF6]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD833[\uDCF0-\uDCF9]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDCD0-\uDCEB\uDCF0-\uDCF9\uDDD0-\uDDED\uDDF0-\uDDFA\uDEC0-\uDEDE\uDEE0-\uDEE2\uDEE4\uDEE5\uDEE7-\uDEED\uDEF0-\uDEF4\uDEFE\uDEFF\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79])/,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:function(e){return RegExp(`^( {0,3}${e})((?:[	 ][^\\n]*)?(?:\\n|\$))`)},nextBulletRegex:function(e){return RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ 	][^\\n]*)?(?:\\n|\$))`)},hrRegex:function(e){return RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|\$)`)},fencesBeginRegex:function(e){return RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`)},headingBeginRegex:function(e){return RegExp(`^ {0,${Math.min(3,e-1)}}#`)},htmlBeginRegex:function(e){return RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`)}},PT=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,FT=/(?:[*+-]|\d{1,9}[.)])/,IT=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,LT=jT(IT).replace(/bull/g,FT).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),RT=jT(IT).replace(/bull/g,FT).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),zT=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,BT=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,VT=jT(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,BT).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),HT=jT(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,FT).getRegex(),UT=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,WT=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,GT=jT(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>
20)[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$))`,`i`).replace(`comment`,WT).replace(`tag`,UT).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),KT=jT(zT).replace(`hr`,PT).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,UT).getRegex(),qT={blockquote:jT(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,KT).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:VT,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:PT,html:GT,lheading:LT,list:HT,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:KT,table:AT,text:/^[^\n]+/},JT=jT(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,PT).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3}	)[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,UT).getRegex(),YT=W(W({},qT),{},{lheading:RT,table:JT,paragraph:jT(zT).replace(`hr`,PT).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,JT).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,UT).getRegex()}),XT=W(W({},qT),{},{html:jT(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,WT).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:AT,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:jT(zT).replace(`hr`,PT).replace(`heading`,` *#{1,6} *[^
21]`).replace(`lheading`,LT).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()}),ZT=/^( {2,}|\\)\n(?!\s*$)/,QT=/(?:[!-\/:-@\[-`\{-~\xA1-\xA9\xAB\xAC\xAE-\xB1\xB4\xB6-\xB8\xBB\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u037E\u0384\u0385\u0387\u03F6\u0482\u055A-\u055F\u0589\u058A\u058D-\u058F\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0606-\u060F\u061B\u061D-\u061F\u066A-\u066D\u06D4\u06DE\u06E9\u06FD\u06FE\u0700-\u070D\u07F6-\u07F9\u07FE\u07FF\u0830-\u083E\u085E\u0888\u0964\u0965\u0970\u09F2\u09F3\u09FA\u09FB\u09FD\u0A76\u0AF0\u0AF1\u0B70\u0BF3-\u0BFA\u0C77\u0C7F\u0C84\u0D4F\u0D79\u0DF4\u0E3F\u0E4F\u0E5A\u0E5B\u0F01-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F85\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE-\u0FDA\u104A-\u104F\u109E\u109F\u10FB\u1360-\u1368\u1390-\u1399\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DB\u1800-\u180A\u1940\u1944\u1945\u19DE-\u19FF\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2010-\u2027\u2030-\u205E\u207A-\u207E\u208A-\u208E\u20A0-\u20C1\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2775\u2794-\u2B73\u2B76-\u2BFF\u2CE5-\u2CEA\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E5D\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3001-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u303F\u309B\u309C\u30A0\u30FB\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAA77-\uAA79\uAADE\uAADF\uAAF0\uAAF1\uAB5B\uAB6A\uAB6B\uABEB\uFB29\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDCF\uFDFC-\uFDFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD00-\uDD02\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDC77\uDC78\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEC8\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDD8E\uDD8F\uDEAD\uDED0-\uDED8\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3F]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFD5-\uDFF1\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3F\uDF44\uDF45]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F[\uDC9C\uDC9F]|\uD833[\uDC00-\uDCEF\uDCFA-\uDCFC\uDD00-\uDEB3\uDEBA-\uDED0\uDEE0-\uDEF0\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE8B]|\uD838[\uDD4F\uDEFF]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED8\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDCD0-\uDCD8\uDD00-\uDE57\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE8A\uDE8
21E-\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF\uDFFA])/,$T=/(?:[\t-\r -\/:-@\[-`\{-~\xA0-\xA9\xAB\xAC\xAE-\xB1\xB4\xB6-\xB8\xBB\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u037E\u0384\u0385\u0387\u03F6\u0482\u055A-\u055F\u0589\u058A\u058D-\u058F\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0606-\u060F\u061B\u061D-\u061F\u066A-\u066D\u06D4\u06DE\u06E9\u06FD\u06FE\u0700-\u070D\u07F6-\u07F9\u07FE\u07FF\u0830-\u083E\u085E\u0888\u0964\u0965\u0970\u09F2\u09F3\u09FA\u09FB\u09FD\u0A76\u0AF0\u0AF1\u0B70\u0BF3-\u0BFA\u0C77\u0C7F\u0C84\u0D4F\u0D79\u0DF4\u0E3F\u0E4F\u0E5A\u0E5B\u0F01-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F85\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE-\u0FDA\u104A-\u104F\u109E\u109F\u10FB\u1360-\u1368\u1390-\u1399\u1400\u166D\u166E\u1680\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DB\u1800-\u180A\u1940\u1944\u1945\u19DE-\u19FF\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2000-\u200A\u2010-\u2029\u202F-\u205F\u207A-\u207E\u208A-\u208E\u20A0-\u20C1\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2775\u2794-\u2B73\u2B76-\u2BFF\u2CE5-\u2CEA\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E5D\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u303F\u309B\u309C\u30A0\u30FB\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAA77-\uAA79\uAADE\uAADF\uAAF0\uAAF1\uAB5B\uAB6A\uAB6B\uABEB\uFB29\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDCF\uFDFC-\uFDFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFEFF\uFF01-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD00-\uDD02\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDC77\uDC78\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEC8\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDD8E\uDD8F\uDEAD\uDED0-\uDED8\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3F]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFD5-\uDFF1\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3F\uDF44\uDF45]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F[\uDC9C\uDC9F]|\uD833[\uDC00-\uDCEF\uDCFA-\uDCFC\uDD00-\uDEB3\uDEBA-\uDED0\uDEE0-\uDEF0\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE8B]|\uD838[\uDD4F\uDEFF]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED8\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDCD0-\uDCD8\uDD00-\uDE57\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF\uDFFA])/,eE=/(?:[\0-\x08\x0E-\x1F0-9A-Za-z\x7F-\x9F\xAA\xAD\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376-\u037D\u037F-\u0383\u0386\u0388-\u03F5\u03F7-\u0481\u0483-\u0559\u0560-\u0588\u058B\u058C\u0590-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7-\u05F2\u05F5-\u0605\u0610-\u061A\u061C\u0620-\u0669\u066E-\u06D3\u06D5-\u06DD\u06DF-\u06E8\u06EA-\u06FC\u06FF\u070E-\u07F5\u07FA-\u07FD\u0800-\u082F\u083F-\u085D\u085F-\u0887\u0889-\u0963\u0966-\u096F\u0971-\u09F1\u09F4-\u09F9\u09FC\u09FE-\u0A75\u0A77-\u0AEF\u0AF2-\u0B6F\u0B71-\u0BF2\u
210BFB-\u0C76\u0C78-\u0C7E\u0C80-\u0C83\u0C85-\u0D4E\u0D50-\u0D78\u0D7A-\u0DF3\u0DF5-\u0E3E\u0E40-\u0E4E\u0E50-\u0E59\u0E5C-\u0F00\u0F18\u0F19\u0F20-\u0F33\u0F35\u0F37\u0F39\u0F3E-\u0F84\u0F86-\u0FBD\u0FC6\u0FCD\u0FDB-\u1049\u1050-\u109D\u10A0-\u10FA\u10FC-\u135F\u1369-\u138F\u139A-\u13FF\u1401-\u166C\u166F-\u167F\u1681-\u169A\u169D-\u16EA\u16EE-\u1734\u1737-\u17D3\u17D7\u17DC-\u17FF\u180B-\u193F\u1941-\u1943\u1946-\u19DD\u1A00-\u1A1D\u1A20-\u1A9F\u1AA7\u1AAE-\u1B4D\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BFB\u1C00-\u1C3A\u1C40-\u1C7D\u1C80-\u1CBF\u1CC8-\u1CD2\u1CD4-\u1FBC\u1FBE\u1FC2-\u1FCC\u1FD0-\u1FDC\u1FE0-\u1FEC\u1FF0-\u1FFC\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u2079\u207F-\u2089\u208F-\u209F\u20C2-\u20FF\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u218C-\u218F\u242A-\u243F\u244B-\u249B\u24EA-\u24FF\u2776-\u2793\u2B74\u2B75\u2C00-\u2CE4\u2CEB-\u2CF8\u2CFD\u2D00-\u2D6F\u2D71-\u2DFF\u2E2F\u2E5E-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3040-\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u318F\u3192-\u3195\u31A0-\u31BF\u31E6-\u31EE\u31F0-\u31FF\u321F-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48F\uA4C7-\uA4FD\uA500-\uA60C\uA610-\uA672\uA674-\uA67D\uA67F-\uA6F1\uA6F8-\uA6FF\uA717-\uA71F\uA722-\uA788\uA78B-\uA827\uA82C-\uA835\uA83A-\uA873\uA878-\uA8CD\uA8D0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA95E\uA960-\uA9C0\uA9CE-\uA9DD\uA9E0-\uAA5B\uAA60-\uAA76\uAA7A-\uAADD\uAAE0-\uAAEF\uAAF2-\uAB5A\uAB5C-\uAB69\uAB6C-\uABEA\uABEC-\uD7FF\uE000-\uFB28\uFB2A-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDD0-\uFDFB\uFE00-\uFE0F\uFE1A-\uFE2F\uFE53\uFE67\uFE6C-\uFEFE\uFF00\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF]|\uD800[\uDC00-\uDCFF\uDD03-\uDD36\uDD40-\uDD78\uDD8A\uDD8B\uDD8F\uDD9D-\uDD9F\uDDA1-\uDDCF\uDDFD-\uDF9E\uDFA0-\uDFCF\uDFD1-\uDFFF]|\uD801[\uDC00-\uDD6E\uDD70-\uDFFF]|\uD802[\uDC00-\uDC56\uDC58-\uDC76\uDC79-\uDD1E\uDD20-\uDD3E\uDD40-\uDE4F\uDE59-\uDE7E\uDE80-\uDEC7\uDEC9-\uDEEF\uDEF7-\uDF38\uDF40-\uDF98\uDF9D-\uDFFF]|\uD803[\uDC00-\uDD6D\uDD6F-\uDD8D\uDD90-\uDEAC\uDEAE-\uDECF\uDED9-\uDF54\uDF5A-\uDF85\uDF8A-\uDFFF]|\uD804[\uDC00-\uDC46\uDC4E-\uDCBA\uDCBD\uDCC2-\uDD3F\uDD44-\uDD73\uDD76-\uDDC4\uDDC9-\uDDCC\uDDCE-\uDDDA\uDDDC\uDDE0-\uDE37\uDE3E-\uDEA8\uDEAA-\uDFD3\uDFD6\uDFD9-\uDFFF]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5C\uDC5E-\uDCC5\uDCC7-\uDDC0\uDDD8-\uDE40\uDE44-\uDE5F\uDE6D-\uDEB8\uDEBA-\uDF3B\uDF40-\uDFFF]|\uD806[\uDC00-\uDC3A\uDC3C-\uDD43\uDD47-\uDDE1\uDDE3-\uDE3E\uDE47-\uDE99\uDE9D\uDEA3-\uDEFF\uDF0A-\uDFE0\uDFE2-\uDFFF]|\uD807[\uDC00-\uDC40\uDC46-\uDC6F\uDC72-\uDEF6\uDEF9-\uDF42\uDF50-\uDFD4\uDFF2-\uDFFE]|[\uD808\uD80A\uD80C-\uD819\uD81C-\uD82E\uD830-\uD832\uD837\uD83F-\uDBFF][\uDC00-\uDFFF]|\uD809[\uDC00-\uDC6F\uDC75-\uDFFF]|\uD80B[\uDC00-\uDFF0\uDFF3-\uDFFF]|\uD81A[\uDC00-\uDE6D\uDE70-\uDEF4\uDEF6-\uDF36\uDF40-\uDF43\uDF46-\uDFFF]|\uD81B[\uDC00-\uDD6C\uDD70-\uDE96\uDE9B-\uDFE1\uDFE3-\uDFFF]|\uD82F[\uDC00-\uDC9B\uDC9D\uDC9E\uDCA0-\uDFFF]|\uD833[\uDCF0-\uDCF9\uDCFD-\uDCFF\uDEB4-\uDEB9\uDED1-\uDEDF\uDEF1-\uDF4F\uDFC4-\uDFFF]|\uD834[\uDCF6-\uDCFF\uDD27\uDD28\uDD65-\uDD69\uDD6D-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDDEB-\uDDFF\uDE42-\uDE44\uDE46-\uDEFF\uDF57-\uDFFF]|\uD835[\uDC00-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE8C-\uDFFF]|\uD838[\uDC00-\uDD4E\uDD50-\uDEFE\uDF00-\uDFFF]|\uD839[\uDC00-\uDDFE\uDE00-\uDFFF]|\uD83A[\uDC00-\uDD5D\uDD60-\uDFFF]|\uD83B[\uDC00-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDD2D\uDD2F-\uDEEF\uDEF2-\uDFFF]|\uD83C[\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCC0\uDCD0\uDCF6-\uDD0C\uDDAE-\uDDE5\uDE03-\uDE0F\uDE3C-\uDE3F\uDE49-\uDE4F\uDE52-\uDE5F\uDE66-\uDEFF]|\uD83D[\uDED9-\uDEDB\uDEED-\uDEEF\uDEFD-\uDEFF\uDFDA-\uDFDF\uDFEC-\uDFEF\uDFF1-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE\uDCAF\uDCBC-\uDCBF\uDCC2-\uDCCF\uDCD9-\uDCFF\uDE58-\uDE5F\uDE6E\uDE6F\uDE7D-\uDE7F\uDE8B-\uDE8D\uDEC7\uDEC9-\uDECC\uDEDD\uDEDE\uDEEB-\uDEEE\uDEF9-\uDEFF\uDF93\uDFF0-\uDFF9\uDFFB-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,tE=jT(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,$T).getRegex(),nE=/(?!~)(?:[!-\/:-@\[-`\{-~\xA1-\xA9\xAB\xAC\xAE-\xB1\xB4\xB6-\xB8\xBB\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u037E\u0384\u0385\u0387\u03F6\u0482\u055A-\u055F\u0589\u058A\u058D-\u058F\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0606-\u060F\u061B\u061D-\u061F\u066A-\u066D\u06D4\u06DE\u06E9\u06FD\u06FE\u0700-\u070D\u07F6-\u07F9\u07FE\u07FF\u0830-\u083E\u085E\u0888\u0964\u0965\u0970\u09F2\u09F3\u09FA\u09FB\u09FD\u0A76\u0AF0\u0AF1\u0B70\u0BF3-\u0BFA\u0C77\u0C7F\u0C84\u0D4F\u0D79\u0DF4\u0E3F\u0E4F\u0E5A\u0E5B\u0F01-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u
210F3A-\u0F3D\u0F85\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE-\u0FDA\u104A-\u104F\u109E\u109F\u10FB\u1360-\u1368\u1390-\u1399\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DB\u1800-\u180A\u1940\u1944\u1945\u19DE-\u19FF\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2010-\u2027\u2030-\u205E\u207A-\u207E\u208A-\u208E\u20A0-\u20C1\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2775\u2794-\u2B73\u2B76-\u2BFF\u2CE5-\u2CEA\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E5D\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3001-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u303F\u309B\u309C\u30A0\u30FB\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAA77-\uAA79\uAADE\uAADF\uAAF0\uAAF1\uAB5B\uAB6A\uAB6B\uABEB\uFB29\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDCF\uFDFC-\uFDFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD00-\uDD02\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDC77\uDC78\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEC8\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDD8E\uDD8F\uDEAD\uDED0-\uDED8\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3F]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFD5-\uDFF1\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3F\uDF44\uDF45]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F[\uDC9C\uDC9F]|\uD833[\uDC00-\uDCEF\uDCFA-\uDCFC\uDD00-\uDEB3\uDEBA-\uDED0\uDEE0-\uDEF0\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE8B]|\uD838[\uDD4F\uDEFF]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED8\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDCD0-\uDCD8\uDD00-\uDE57\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF\uDFFA])/,rE=jT(/link|precode-code|html/,`g`).replace(`link`,Yx(/\[(?:[^\[\]`]|(`+)[^`]+\1(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/,{a:1})).replace(`precode-`,MT?"(?<!`)()":"(^^|[^`])").replace(`code`,Yx(/(`+)[^`]+\1(?!`)/,{b:1})).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),iE=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,aE=jT(iE,`u`).replace(/punct/g,QT).getRegex(),oE=jT(iE,`u`).replace(/punct/g,nE).getRegex(),sE=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,cE=jT(sE,`gu`).replace(/notPunctSpace/g,eE).replace(/punctSpace/g,$T).replace(/punct/g,QT).getRegex(),lE=jT(sE,`gu`).replace(/notPunctSpace/g,/(?:(?:[\0-\x08\x0E-\x1F0-9A-Za-z\x7F-\x9F\xAA\xAD\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376-\u037D\u037F-\u0383\u0386\u0388-\u03F5\u03F7-\u0481\u0483-\u0559\u0560-\u0588\u058B\u058C\u0590-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7-\u05F2\u05F5-\u0605\u0610-\u061A\u061C\u0620-\u0669\u066E-\u06D3\u06D5-\u06DD\u06DF-\u06E8\u06EA-\u06FC\u06FF\u070E-\u07F5\u07FA-\u07FD\u0800-\u082F\u083F-\u085D\u085F-\u0887\u0889-\u0963\u0966-\u096F\u0971-\u09F1\u09F4-\u09F9\u09FC\u09FE-\u0A75\u0A77-\u0AEF\u0AF2-\u0B6F\u0B71-\u0BF2\u
210BFB-\u0C76\u0C78-\u0C7E\u0C80-\u0C83\u0C85-\u0D4E\u0D50-\u0D78\u0D7A-\u0DF3\u0DF5-\u0E3E\u0E40-\u0E4E\u0E50-\u0E59\u0E5C-\u0F00\u0F18\u0F19\u0F20-\u0F33\u0F35\u0F37\u0F39\u0F3E-\u0F84\u0F86-\u0FBD\u0FC6\u0FCD\u0FDB-\u1049\u1050-\u109D\u10A0-\u10FA\u10FC-\u135F\u1369-\u138F\u139A-\u13FF\u1401-\u166C\u166F-\u167F\u1681-\u169A\u169D-\u16EA\u16EE-\u1734\u1737-\u17D3\u17D7\u17DC-\u17FF\u180B-\u193F\u1941-\u1943\u1946-\u19DD\u1A00-\u1A1D\u1A20-\u1A9F\u1AA7\u1AAE-\u1B4D\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BFB\u1C00-\u1C3A\u1C40-\u1C7D\u1C80-\u1CBF\u1CC8-\u1CD2\u1CD4-\u1FBC\u1FBE\u1FC2-\u1FCC\u1FD0-\u1FDC\u1FE0-\u1FEC\u1FF0-\u1FFC\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u2079\u207F-\u2089\u208F-\u209F\u20C2-\u20FF\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u218C-\u218F\u242A-\u243F\u244B-\u249B\u24EA-\u24FF\u2776-\u2793\u2B74\u2B75\u2C00-\u2CE4\u2CEB-\u2CF8\u2CFD\u2D00-\u2D6F\u2D71-\u2DFF\u2E2F\u2E5E-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3040-\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u318F\u3192-\u3195\u31A0-\u31BF\u31E6-\u31EE\u31F0-\u31FF\u321F-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48F\uA4C7-\uA4FD\uA500-\uA60C\uA610-\uA672\uA674-\uA67D\uA67F-\uA6F1\uA6F8-\uA6FF\uA717-\uA71F\uA722-\uA788\uA78B-\uA827\uA82C-\uA835\uA83A-\uA873\uA878-\uA8CD\uA8D0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA95E\uA960-\uA9C0\uA9CE-\uA9DD\uA9E0-\uAA5B\uAA60-\uAA76\uAA7A-\uAADD\uAAE0-\uAAEF\uAAF2-\uAB5A\uAB5C-\uAB69\uAB6C-\uABEA\uABEC-\uD7FF\uE000-\uFB28\uFB2A-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDD0-\uFDFB\uFE00-\uFE0F\uFE1A-\uFE2F\uFE53\uFE67\uFE6C-\uFEFE\uFF00\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF]|\uD800[\uDC00-\uDCFF\uDD03-\uDD36\uDD40-\uDD78\uDD8A\uDD8B\uDD8F\uDD9D-\uDD9F\uDDA1-\uDDCF\uDDFD-\uDF9E\uDFA0-\uDFCF\uDFD1-\uDFFF]|\uD801[\uDC00-\uDD6E\uDD70-\uDFFF]|\uD802[\uDC00-\uDC56\uDC58-\uDC76\uDC79-\uDD1E\uDD20-\uDD3E\uDD40-\uDE4F\uDE59-\uDE7E\uDE80-\uDEC7\uDEC9-\uDEEF\uDEF7-\uDF38\uDF40-\uDF98\uDF9D-\uDFFF]|\uD803[\uDC00-\uDD6D\uDD6F-\uDD8D\uDD90-\uDEAC\uDEAE-\uDECF\uDED9-\uDF54\uDF5A-\uDF85\uDF8A-\uDFFF]|\uD804[\uDC00-\uDC46\uDC4E-\uDCBA\uDCBD\uDCC2-\uDD3F\uDD44-\uDD73\uDD76-\uDDC4\uDDC9-\uDDCC\uDDCE-\uDDDA\uDDDC\uDDE0-\uDE37\uDE3E-\uDEA8\uDEAA-\uDFD3\uDFD6\uDFD9-\uDFFF]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5C\uDC5E-\uDCC5\uDCC7-\uDDC0\uDDD8-\uDE40\uDE44-\uDE5F\uDE6D-\uDEB8\uDEBA-\uDF3B\uDF40-\uDFFF]|\uD806[\uDC00-\uDC3A\uDC3C-\uDD43\uDD47-\uDDE1\uDDE3-\uDE3E\uDE47-\uDE99\uDE9D\uDEA3-\uDEFF\uDF0A-\uDFE0\uDFE2-\uDFFF]|\uD807[\uDC00-\uDC40\uDC46-\uDC6F\uDC72-\uDEF6\uDEF9-\uDF42\uDF50-\uDFD4\uDFF2-\uDFFE]|[\uD808\uD80A\uD80C-\uD819\uD81C-\uD82E\uD830-\uD832\uD837\uD83F-\uDBFF][\uDC00-\uDFFF]|\uD809[\uDC00-\uDC6F\uDC75-\uDFFF]|\uD80B[\uDC00-\uDFF0\uDFF3-\uDFFF]|\uD81A[\uDC00-\uDE6D\uDE70-\uDEF4\uDEF6-\uDF36\uDF40-\uDF43\uDF46-\uDFFF]|\uD81B[\uDC00-\uDD6C\uDD70-\uDE96\uDE9B-\uDFE1\uDFE3-\uDFFF]|\uD82F[\uDC00-\uDC9B\uDC9D\uDC9E\uDCA0-\uDFFF]|\uD833[\uDCF0-\uDCF9\uDCFD-\uDCFF\uDEB4-\uDEB9\uDED1-\uDEDF\uDEF1-\uDF4F\uDFC4-\uDFFF]|\uD834[\uDCF6-\uDCFF\uDD27\uDD28\uDD65-\uDD69\uDD6D-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDDEB-\uDDFF\uDE42-\uDE44\uDE46-\uDEFF\uDF57-\uDFFF]|\uD835[\uDC00-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE8C-\uDFFF]|\uD838[\uDC00-\uDD4E\uDD50-\uDEFE\uDF00-\uDFFF]|\uD839[\uDC00-\uDDFE\uDE00-\uDFFF]|\uD83A[\uDC00-\uDD5D\uDD60-\uDFFF]|\uD83B[\uDC00-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDD2D\uDD2F-\uDEEF\uDEF2-\uDFFF]|\uD83C[\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCC0\uDCD0\uDCF6-\uDD0C\uDDAE-\uDDE5\uDE03-\uDE0F\uDE3C-\uDE3F\uDE49-\uDE4F\uDE52-\uDE5F\uDE66-\uDEFF]|\uD83D[\uDED9-\uDEDB\uDEED-\uDEEF\uDEFD-\uDEFF\uDFDA-\uDFDF\uDFEC-\uDFEF\uDFF1-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE\uDCAF\uDCBC-\uDCBF\uDCC2-\uDCCF\uDCD9-\uDCFF\uDE58-\uDE5F\uDE6E\uDE6F\uDE7D-\uDE7F\uDE8B-\uDE8D\uDEC7\uDEC9-\uDECC\uDEDD\uDEDE\uDEEB-\uDEEE\uDEF9-\uDEFF\uDF93\uDFF0-\uDFF9\uDFFB-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])|~)/).replace(/punctSpace/g,/(?!~)(?:[\t-\r -\/:-@\[-`\{-~\xA0-\xA9\xAB\xAC\xAE-\xB1\xB4\xB6-\xB8\xBB\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u037E\u0384\u0385\u0387\u03F6\u0482\u055A-\u055F\u0589\u058A\u058D-\u058F\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0606-\u060F\u061B\u061D-\u061F\u066A-\u066D\u06D4\u06DE\u06E9\u06FD\u06FE\u0700-\u070D\u07F6-\u07F9\u07FE\u07FF\u0830-\u083E\u085E\u0888\u0964\u0965\u0970\u09F2\u09F3\u09FA\u09FB\u09FD\u0A76\u0AF0\u0AF1\u0B70\u0BF3-\u0BFA\u0C77\u0C7F\u0C84\u0D4F\u0D79\u0DF4\u0E3F\u0E4F\u0E5A\u0E5B\u0F01-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u
210F3A-\u0F3D\u0F85\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE-\u0FDA\u104A-\u104F\u109E\u109F\u10FB\u1360-\u1368\u1390-\u1399\u1400\u166D\u166E\u1680\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DB\u1800-\u180A\u1940\u1944\u1945\u19DE-\u19FF\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2000-\u200A\u2010-\u2029\u202F-\u205F\u207A-\u207E\u208A-\u208E\u20A0-\u20C1\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2775\u2794-\u2B73\u2B76-\u2BFF\u2CE5-\u2CEA\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E5D\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u303F\u309B\u309C\u30A0\u30FB\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAA77-\uAA79\uAADE\uAADF\uAAF0\uAAF1\uAB5B\uAB6A\uAB6B\uABEB\uFB29\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDCF\uFDFC-\uFDFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFEFF\uFF01-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD00-\uDD02\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDC77\uDC78\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEC8\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDD8E\uDD8F\uDEAD\uDED0-\uDED8\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3F]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFD5-\uDFF1\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3F\uDF44\uDF45]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F[\uDC9C\uDC9F]|\uD833[\uDC00-\uDCEF\uDCFA-\uDCFC\uDD00-\uDEB3\uDEBA-\uDED0\uDEE0-\uDEF0\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE8B]|\uD838[\uDD4F\uDEFF]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED8\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDCD0-\uDCD8\uDD00-\uDE57\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF\uDFFA])/).replace(/punct/g,nE).getRegex(),uE=jT(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,eE).replace(/punctSpace/g,$T).replace(/punct/g,QT).getRegex(),dE=jT(/\\(punct)/,`gu`).replace(/punct/g,QT).getRegex(),fE=jT(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),pE=jT(WT).replace(`(?:-->|$)`,`-->`).getRegex(),mE=jT(`^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,pE).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),hE=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,gE=jT(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace(`label`,hE).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),_E=jT(/^!?\[(label)\]\[(ref)\]/).replace(`label`,hE).replace(`ref`,BT).getRegex(),vE=jT(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,BT).getRegex(),yE=/[h
21H][tT][tT][pP][sS]?|[fF][tT][pP]/,bE={_backpedal:AT,anyPunctuation:dE,autolink:fE,blockSkip:rE,br:ZT,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:AT,emStrongLDelim:aE,emStrongRDelimAst:cE,emStrongRDelimUnd:uE,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:gE,nolink:vE,punctuation:tE,reflink:_E,reflinkSearch:jT(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,_E).replace(`nolink`,vE).getRegex(),tag:mE,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:AT},xE=W(W({},bE),{},{link:jT(/^!?\[(label)\]\((.*?)\)/).replace(`label`,hE).getRegex(),reflink:jT(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,hE).getRegex()}),SE=W(W({},bE),{},{emStrongRDelimAst:lE,emStrongLDelim:oE,url:jT(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,yE).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:jT(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,yE).getRegex()}),CE=W(W({},SE),{},{br:jT(ZT).replace(`{2,}`,`*`).getRegex(),text:jT(SE.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()}),wE={normal:qT,gfm:YT,pedantic:XT},TE={normal:bE,gfm:SE,breaks:CE,pedantic:xE},EE={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`},DE=function(e){return EE[e]};function OE(e,t){if(t){if(NT.escapeTest.test(e))return e.replace(NT.escapeReplace,DE)}else if(NT.escapeTestNoEncode.test(e))return e.replace(NT.escapeReplaceNoEncode,DE);return e}function kE(e){try{e=encodeURI(e).replace(NT.percentDecode,`%`)}catch{return null}return e}function AE(e,t){var n,r=e.replace(NT.findPipe,function(e,t,n){for(var r=!1,i=t;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(NT.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!((n=r.at(-1))!=null&&n.trim())&&r.pop(),t){if(r.length>t)r.splice(t);else for(;r.length<t;)r.push(``)}for(;i<r.length;i++)r[i]=r[i].trim().replace(NT.slashPipe,`|`);return r}function jE(e,t,n){var r=e.length;if(r===0)return``;for(var i=0;i<r&&e.charAt(r-i-1)===t;)i++;return e.slice(0,r-i)}function ME(e,t,n,r,i){var a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;var c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}var NE=function(){return H(function e(t){V(this,e),Fx(this,`options`,void 0),Fx(this,`rules`,void 0),Fx(this,`lexer`,void 0),this.options=t||OT},[{key:`space`,value:function(e){var t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}},{key:`code`,value:function(e){var t=this.rules.block.code.exec(e);if(t){var n=t[0].replace(this.rules.other.codeRemoveIndent,``);return{type:`code`,raw:t[0],codeBlockStyle:`indented`,text:this.options.pedantic?n:jE(n,`
22`)}}}},{key:`fences`,value:function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t,n){var r=e.match(n.other.indentCodeCompensation);if(r===null)return t;var i=r[1];return t.split(`
23`).map(function(e){var t=e.match(n.other.beginningSpace);return t===null?e:Wx(t,1)[0].length>=i.length?e.slice(i.length):e}).join(`
24`)}(n,t[3]||``,this.rules);return{type:`code`,raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:r}}}},{key:`heading`,value:function(e){var t=this.rules.block.heading.exec(e);if(t){var n=t[2].trim();if(this.rules.other.endingHash.test(n)){var r=jE(n,`#`);(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:`heading`,raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}},{key:`hr`,value:function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:jE(t[0],`
25`)}}},{key:`blockquote`,value:function(e){var t=this.rules.block.blockquote.exec(e);if(t){for(var n=jE(t[0],`
26`).split(`
27`),r=``,i=``,a=[];n.length>0;){var o=!1,s=[],c=void 0;for(c=0;c<n.length;c++)if(this.rules.other.blockquoteStart.test(n[c]))s.push(n[c]),o=!0;else{if(o)break;s.push(n[c])}n=n.slice(c);var l=s.join(`
28`),u=l.replace(this.rules.other.blockquoteSetextReplace,`
29    $1`).replace(this.rules.other.blockquoteSetextReplace2,``);r=r?`${r}
30${l}`:l,i=i?`${i}
31${u}`:u;var d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,a,!0),this.lexer.state.top=d,n.length===0)break;var f=a.at(-1);if(f?.type===`code`)break;
31if(f?.type===`blockquote`){var p=f,m=p.raw+`
32`+n.join(`
33`),h=this.blockquote(m);a[a.length-1]=h,r=r.substring(0,r.length-p.raw.length)+h.raw,i=i.substring(0,i.length-p.text.length)+h.text;break}if(f?.type===`list`){var g=f,_=g.raw+`
34`+n.join(`
35`),v=this.list(_);a[a.length-1]=v,r=r.substring(0,r.length-f.raw.length)+v.raw,i=i.substring(0,i.length-g.raw.length)+v.raw,n=_.substring(a.at(-1).raw.length).split(`
36`)}}return{type:`blockquote`,raw:r,tokens:a,text:i}}}},{key:`list`,value:function(e){var t=this,n=this.rules.block.list.exec(e);if(n){var r=n[1].trim(),i=r.length>1,a={type:`list`,raw:``,ordered:i,start:i?+r.slice(0,-1):``,loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:`[*+-]`);for(var o=this.rules.other.listItemRegex(r),s=!1;e;){var c=!1,l=``,u=``;if(!(n=o.exec(e))||this.rules.block.hr.test(e))break;l=n[0],e=e.substring(l.length);var d=n[2].split(`
37`,1)[0].replace(this.rules.other.listReplaceTabs,function(e){return` `.repeat(3*e.length)}),f=e.split(`
38`,1)[0],p=!d.trim(),m=0;if(this.options.pedantic?(m=2,u=d.trimStart()):p?m=n[1].length+1:(m=(m=n[2].search(this.rules.other.nonSpaceChar))>4?1:m,u=d.slice(m),m+=n[1].length),p&&this.rules.other.blankLine.test(f)&&(l+=f+`
39`,e=e.substring(f.length+1),c=!0),!c)for(var h=this.rules.other.nextBulletRegex(m),g=this.rules.other.hrRegex(m),_=this.rules.other.fencesBeginRegex(m),v=this.rules.other.headingBeginRegex(m),y=this.rules.other.htmlBeginRegex(m);e;){var b=e.split(`
40`,1)[0],x=void 0;if(f=b,x=this.options.pedantic?f=f.replace(this.rules.other.listReplaceNesting,`  `):f.replace(this.rules.other.tabCharGlobal,`    `),_.test(f)||v.test(f)||y.test(f)||h.test(f)||g.test(f))break;if(x.search(this.rules.other.nonSpaceChar)>=m||!f.trim())u+=`
41`+x.slice(m);else{if(p||d.replace(this.rules.other.tabCharGlobal,`    `).search(this.rules.other.nonSpaceChar)>=4||_.test(d)||v.test(d)||g.test(d))break;u+=`
42`+f}!p&&!f.trim()&&(p=!0),l+=b+`
43`,e=e.substring(b.length+1),d=x.slice(m)}a.loose||(s?a.loose=!0:this.rules.other.doubleBlankLine.test(l)&&(s=!0));var S=null,C=void 0;this.options.gfm&&(S=this.rules.other.listIsTask.exec(u))&&(C=S[0]!==`[ ] `,u=u.replace(this.rules.other.listReplaceTask,``)),a.items.push({type:`list_item`,raw:l,task:!!S,checked:C,loose:!1,text:u,tokens:[]}),a.raw+=l}var w=a.items.at(-1);if(!w)return;w.raw=w.raw.trimEnd(),w.text=w.text.trimEnd(),a.raw=a.raw.trimEnd();for(var T=0;T<a.items.length;T++)if(this.lexer.state.top=!1,a.items[T].tokens=this.lexer.blockTokens(a.items[T].text,[]),!a.loose){var E=a.items[T].tokens.filter(function(e){return e.type===`space`});a.loose=E.length>0&&E.some(function(e){return t.rules.other.anyLine.test(e.raw)})}if(a.loose)for(var ee=0;ee<a.items.length;ee++)a.items[ee].loose=!0;return a}}},{key:`html`,value:function(e){var t=this.rules.block.html.exec(e);if(t)return{type:`html`,block:!0,raw:t[0],pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:t[0]}}},{key:`def`,value:function(e){var t=this.rules.block.def.exec(e);if(t){var n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal,` `),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:n,raw:t[0],href:r,title:i}}}},{key:`table`,value:function(e){var t,n=this,r=this.rules.block.table.exec(e);if(r&&this.rules.other.tableDelimiter.test(r[2])){var i=AE(r[1]),a=r[2].replace(this.rules.other.tableAlignChars,``).split(`|`),o=(t=r[3])!=null&&t.trim()?r[3].replace(this.rules.other.tableRowBlankLine,``).split(`
44`):[],s={type:`table`,raw:r[0],header:[],align:[],rows:[]};if(i.length===a.length){var c,l=U(a);try{for(l.s();!(c=l.n()).done;){var u=c.value;this.rules.other.tableAlignRight.test(u)?s.align.push(`right`):this.rules.other.tableAlignCenter.test(u)?s.align.push(`center`):this.rules.other.tableAlignLeft.test(u)?s.align.push(`left`):s.align.push(null)}}catch(e){l.e(e)}finally{l.f()}for(var d=0;d<i.length;d++)s.header.push({text:i[d],tokens:this.lexer.inline(i[d]),header:!0,align:s.align[d]});var f,p=U(o);try{for(p.s();!(f=p.n()).done;){var m=f.value;s.rows.push(AE(m,s.header.length).map(function(e,t){return{text:e,tokens:n.lexer.inline(e),header:!1,align:s.align[t]}}
44))}}catch(e){p.e(e)}finally{p.f()}return s}}}},{key:`lheading`,value:function(e){var t=this.rules.block.lheading.exec(e);if(t)return{type:`heading`,raw:t[0],depth:t[2].charAt(0)===`=`?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}},{key:`paragraph`,value:function(e){var t=this.rules.block.paragraph.exec(e);if(t){var n=t[1].charAt(t[1].length-1)===`
45`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:n,tokens:this.lexer.inline(n)}}}},{key:`text`,value:function(e){var t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}},{key:`escape`,value:function(e){var t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}},{key:`tag`,value:function(e){var t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}},{key:`link`,value:function(e){var t=this.rules.inline.link.exec(e);if(t){var n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;var r=jE(n.slice(0,-1),`\\`);if((n.length-r.length)%2==0)return}else{var i=function(e,t){if(e.indexOf(t[1])===-1)return-1;for(var n=0,r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&--n<0)return r;return n>0?-2:-1}(t[2],`()`);if(i===-2)return;if(i>-1){var a=(t[0].indexOf(`!`)===0?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,a).trim(),t[3]=``}}var o=t[2],s=``;if(this.options.pedantic){var c=this.rules.other.pedanticHrefTitle.exec(o);c&&(o=c[1],s=c[3])}else s=t[3]?t[3].slice(1,-1):``;return o=o.trim(),this.rules.other.startAngleBracket.test(o)&&(o=this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?o.slice(1):o.slice(1,-1)),ME(t,{href:o&&o.replace(this.rules.inline.anyPunctuation,`$1`),title:s&&s.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}},{key:`reflink`,value:function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `).toLowerCase()];if(!r){var i=n[0].charAt(0);return{type:`text`,raw:i,text:i}}return ME(n,r,n[0],this.lexer,this.rules)}}},{key:`emStrong`,value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:``,r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!r[1]&&!r[2]||!n||this.rules.inline.punctuation.exec(n))){var i,a,o=K(r[0]).length-1,s=o,c=0,l=r[0][0]===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+o);(r=l.exec(t))!=null;)if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6]){if(a=K(i).length,r[3]||r[4])s+=a;else if(!((r[5]||r[6])&&o%3)||(o+a)%3){if(!((s-=a)>0)){a=Math.min(a,a+s+c);var u=K(r[0])[0].length,d=e.slice(0,o+r.index+u+a);if(Math.min(o,a)%2){var f=d.slice(1,-1);return{type:`em`,raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}var p=d.slice(2,-2);return{type:`strong`,raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}}else c+=a}}}},{key:`codespan`,value:function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(this.rules.other.newLineCharGlobal,` `),r=this.rules.other.nonSpaceChar.test(n),i=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&i&&(n=n.substring(1,n.length-1)),{type:`codespan`,raw:t[0],text:n}}}},{key:`br`,value:function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}},{key:`del`,value:function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:`del`,raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}},{key:`autolink`,value:function(e){var t,n,r=this.rules.inline.autolink.exec(e);if(r)return n=r[2]===`@`?`mailto:`+(t=r[1]):t=r[1],{type:`link`,raw:r[0],text:t,href:n,tokens:[{type:`text`,raw:t,text:t}]}}},{key:`url`,value:function(e){var t;if(t=this.rules.inline.url.exec(e)){var n,r;if(t[2]===`@`)r=`mailto:`+(n=t[0]);else{var i;do i=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(i!==t[0]);n=t[0],r=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:n,href:r,tokens:[{type:`text`,raw:n,text:n}]}}}}
45,{key:`inlineText`,value:function(e){var t=this.rules.inline.text.exec(e);if(t){var n=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:n}}}}])}(),PE=function(){function e(t){V(this,e),Fx(this,`tokens`,void 0),Fx(this,`options`,void 0),Fx(this,`state`,void 0),Fx(this,`tokenizer`,void 0),Fx(this,`inlineQueue`,void 0),this.tokens=[],this.tokens.links=Object.create(null),this.options=t||OT,this.options.tokenizer=this.options.tokenizer||new NE,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};var n={other:NT,block:wE.normal,inline:TE.normal};this.options.pedantic?(n.block=wE.pedantic,n.inline=TE.pedantic):this.options.gfm&&(n.block=wE.gfm,n.inline=this.options.breaks?TE.breaks:TE.gfm),this.tokenizer.rules=n}return H(e,[{key:`lex`,value:function(e){e=e.replace(NT.carriageReturn,`
46`),this.blockTokens(e,this.tokens);for(var t=0;t<this.inlineQueue.length;t++){var n=this.inlineQueue[t];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}},{key:`blockTokens`,value:function(e){var t,n=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2&&arguments[2]!==void 0&&arguments[2],a=function(){var t,a,o;if((t=n.options.extensions)!=null&&(t=t.block)!=null&&t.some(function(t){return!!(o=t.call({lexer:n},e,r))&&(e=e.substring(o.raw.length),r.push(o),!0)}))return 0;if(o=n.tokenizer.space(e)){e=e.substring(o.raw.length);var s=r.at(-1);return o.raw.length===1&&s!==void 0?s.raw+=`
47`:r.push(o),0}if(o=n.tokenizer.code(e)){e=e.substring(o.raw.length);var c=r.at(-1);return c?.type===`paragraph`||c?.type===`text`?(c.raw+=(c.raw.endsWith(`
48`)?``:`
49`)+o.raw,c.text+=`
50`+o.text,n.inlineQueue.at(-1).src=c.text):r.push(o),0}if((o=n.tokenizer.fences(e))||(o=n.tokenizer.heading(e))||(o=n.tokenizer.hr(e))||(o=n.tokenizer.blockquote(e))||(o=n.tokenizer.list(e))||(o=n.tokenizer.html(e)))return e=e.substring(o.raw.length),r.push(o),0;if(o=n.tokenizer.def(e)){e=e.substring(o.raw.length);var l=r.at(-1);return l?.type===`paragraph`||l?.type===`text`?(l.raw+=(l.raw.endsWith(`
51`)?``:`
52`)+o.raw,l.text+=`
53`+o.raw,n.inlineQueue.at(-1).src=l.text):n.tokens.links[o.tag]||(n.tokens.links[o.tag]={href:o.href,title:o.title},r.push(o)),0}if((o=n.tokenizer.table(e))||(o=n.tokenizer.lheading(e)))return e=e.substring(o.raw.length),r.push(o),0;var u=e;if((a=n.options.extensions)!=null&&a.startBlock){var d,f=1/0,p=e.slice(1);n.options.extensions.startBlock.forEach(function(e){typeof(d=e.call({lexer:n},p))==`number`&&d>=0&&(f=Math.min(f,d))}),f<1/0&&f>=0&&(u=e.substring(0,f+1))}if(n.state.top&&(o=n.tokenizer.paragraph(u))){var m=r.at(-1);return i&&m?.type===`paragraph`?(m.raw+=(m.raw.endsWith(`
54`)?``:`
55`)+o.raw,m.text+=`
56`+o.text,n.inlineQueue.pop(),n.inlineQueue.at(-1).src=m.text):r.push(o),i=u.length!==e.length,e=e.substring(o.raw.length),0}if(o=n.tokenizer.text(e)){e=e.substring(o.raw.length);var h=r.at(-1);return h?.type===`text`?(h.raw+=(h.raw.endsWith(`
57`)?``:`
58`)+o.raw,h.text+=`
59`+o.text,n.inlineQueue.pop(),n.inlineQueue.at(-1).src=h.text):r.push(o),0}if(e){var g=`Infinite loop on byte: `+e.charCodeAt(0);if(n.options.silent)return console.error(g),1;throw Error(g)}};for(this.options.pedantic&&(e=e.replace(NT.tabCharGlobal,`    `).replace(NT.spaceLine,``));e&&((t=a())===0||t!==1););return this.state.top=!0,r}},{key:`inline`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:t}),t}},{key:`inlineTokens`,value:function(e){var t,n,r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=e,o=null;if(this.tokens.links){var s=Object.keys(this.tokens.links);if(s.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)s.includes(o[0].slice(o[0].lastIndexOf(`[`)+1,-1))&&(a=a.slice(0,o.index)+`[`+`a`.repeat(o[0].length-2)+`]`+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(a))!=null;)a=a.slice(0,o.index)+`++`+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(o=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)n=o[2]?o[2].length:0,a=a.slice(0,o.index+n)+`[`+`a`.repeat(o[0].length-n-2)+`]`+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);a=((t=this.options.hooks)==null||(t=t.emStrongMask)==null?void 0:t.call({lexer:this},a))??a;for(var c,l=!1,u=``,d=function(){var t,n,o;if(l||(u=``),l=!1,(t=r.options.extensions)!=null&&(t=t.inline)!=null&&t.some(function(t){return!!(o=t.call({lexer:r},e,i))&&(e=e.substring(o.raw.length),i.push(o),!0)}))return 0;if((o=r.tokenizer.escape(e))||(o=r.tokenizer.tag(e))||(o=r.tokenizer.link(e)))return e=e.substring(o.raw.length),i.push(o),0;if(o=r.tokenizer.reflink(e,r.tokens.links)){e=e.substring(o.raw.length);var s=i.at(-1);return o.type===`text`&&s?.type===`text`?(s.raw+=o.raw,s.text+=o.text):i.push(o),0}if((o=r.tokenizer.emStrong(e,a,u))||(o=r.tokenizer.codespan(e))||(o=r.tokenizer.br(e))||(o=r.tokenizer.del(e))||(o=r.tokenizer.autolink(e))||!r.state.inLink&&(o=r.tokenizer.url(e)))return e=e.substring(o.raw.length),i.push(o),0;var c=e;if((n=r.options.extensions)!=null&&n.startInline){var d,f=1/0,p=e.slice(1);r.options.extensions.startInline.forEach(function(e){typeof(d=e.call({lexer:r},p))==`number`&&d>=0&&(f=Math.min(f,d))}),f<1/0&&f>=0&&(c=e.substring(0,f+1))}if(o=r.tokenizer.inlineText(c)){e=e.substring(o.raw.length),o.raw.slice(-1)!==`_`&&(u=o.raw.slice(-1)),l=!0;var m=i.at(-1);
59return m?.type===`text`?(m.raw+=o.raw,m.text+=o.text):i.push(o),0}if(e){var h=`Infinite loop on byte: `+e.charCodeAt(0);if(r.options.silent)return console.error(h),1;throw Error(h)}};e&&((c=d())===0||c!==1););return i}}],[{key:`rules`,get:function(){return{block:wE,inline:TE}}},{key:`lex`,value:function(t,n){return new e(n).lex(t)}},{key:`lexInline`,value:function(t,n){return new e(n).inlineTokens(t)}}])}(),FE=function(){return H(function e(t){V(this,e),Fx(this,`options`,void 0),Fx(this,`parser`,void 0),this.options=t||OT},[{key:`space`,value:function(e){return``}},{key:`code`,value:function(e){var t=e.text,n=e.lang,r=e.escaped,i=(n||``).match(NT.notSpaceStart)?.[0],a=t.replace(NT.endingNewline,``)+`
60`;return i?`<pre><code class="language-`+OE(i)+`">`+(r?a:OE(a,!0))+`</code></pre>
61`:`<pre><code>`+(r?a:OE(a,!0))+`</code></pre>
62`}},{key:`blockquote`,value:function(e){var t=e.tokens;return`<blockquote>
63${this.parser.parse(t)}</blockquote>
64`}},{key:`html`,value:function(e){return e.text}},{key:`def`,value:function(e){return``}},{key:`heading`,value:function(e){var t=e.tokens,n=e.depth;return`<h${n}>${this.parser.parseInline(t)}</h${n}>
65`}},{key:`hr`,value:function(e){return`<hr>
66`}},{key:`list`,value:function(e){for(var t=e.ordered,n=e.start,r=``,i=0;i<e.items.length;i++){var a=e.items[i];r+=this.listitem(a)}var o=t?`ol`:`ul`;return`<`+o+(t&&n!==1?` start="`+n+`"`:``)+`>
67`+r+`</`+o+`>
68`}},{key:`listitem`,value:function(e){var t=``;if(e.task){var n=this.checkbox({checked:!!e.checked});e.loose?e.tokens[0]?.type===`paragraph`?(e.tokens[0].text=n+` `+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type===`text`&&(e.tokens[0].tokens[0].text=n+` `+OE(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:`text`,raw:n+` `,text:n+` `,escaped:!0}):t+=n+` `}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
69`}},{key:`checkbox`,value:function(e){return`<input `+(e.checked?`checked="" `:``)+`disabled="" type="checkbox">`}},{key:`paragraph`,value:function(e){var t=e.tokens;return`<p>${this.parser.parseInline(t)}</p>
70`}},{key:`table`,value:function(e){for(var t=``,n=``,r=0;r<e.header.length;r++)n+=this.tablecell(e.header[r]);t+=this.tablerow({text:n});for(var i=``,a=0;a<e.rows.length;a++){var o=e.rows[a];n=``;for(var s=0;s<o.length;s++)n+=this.tablecell(o[s]);i+=this.tablerow({text:n})}return i&&=`<tbody>${i}</tbody>`,`<table>
71<thead>
72`+t+`</thead>
73`+i+`</table>
74`}},{key:`tablerow`,value:function(e){return`<tr>
75${e.text}</tr>
76`}},{key:`tablecell`,value:function(e){var t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
77`}},{key:`strong`,value:function(e){var t=e.tokens;return`<strong>${this.parser.parseInline(t)}</strong>`}},{key:`em`,value:function(e){var t=e.tokens;return`<em>${this.parser.parseInline(t)}</em>`}},{key:`codespan`,value:function(e){var t=e.text;return`<code>${OE(t,!0)}</code>`}},{key:`br`,value:function(e){return`<br>`}},{key:`del`,value:function(e){var t=e.tokens;return`<del>${this.parser.parseInline(t)}</del>`}},{key:`link`,value:function(e){var t=e.href,n=e.title,r=e.tokens,i=this.parser.parseInline(r),a=kE(t);if(a===null)return i;var o=`<a href="`+(t=a)+`"`;return n&&(o+=` title="`+OE(n)+`"`),o+=`>`+i+`</a>`}},{key:`image`,value:function(e){var t=e.href,n=e.title,r=e.text,i=e.tokens;i&&(r=this.parser.parseInline(i,this.parser.textRenderer));var a=kE(t);if(a===null)return OE(r);var o=`<img src="${t=a}" alt="${r}"`;return n&&(o+=` title="${OE(n)}"`),o+=`>`}},{key:`text`,value:function(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:OE(e.text)}}])}(),IE=function(){return H(function e(){V(this,e)},[{key:`strong`,value:function(e){return e.text}},{key:`em`,value:function(e){return e.text}},{key:`codespan`,value:function(e){return e.text}},{key:`del`,value:function(e){return e.text}},{key:`html`,value:function(e){return e.text}},{key:`text`,value:function(e){return e.text}},{key:`link`,value:function(e){return``+e.text}}
77,{key:`image`,value:function(e){return``+e.text}},{key:`br`,value:function(){return``}}])}(),LE=function(){function e(t){V(this,e),Fx(this,`options`,void 0),Fx(this,`renderer`,void 0),Fx(this,`textRenderer`,void 0),this.options=t||OT,this.options.renderer=this.options.renderer||new FE,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new IE}return H(e,[{key:`parse`,value:function(e){for(var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],n=``,r=0;r<e.length;r++){var i,a=e[r];if((i=this.options.extensions)!=null&&(i=i.renderers)!=null&&i[a.type]){var o=a,s=this.options.extensions.renderers[o.type].call({parser:this},o);if(!1!==s||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`html`,`def`,`paragraph`,`text`].includes(o.type)){n+=s||``;continue}}var c=a;switch(c.type){case`space`:n+=this.renderer.space(c);continue;case`hr`:n+=this.renderer.hr(c);continue;case`heading`:n+=this.renderer.heading(c);continue;case`code`:n+=this.renderer.code(c);continue;case`table`:n+=this.renderer.table(c);continue;case`blockquote`:n+=this.renderer.blockquote(c);continue;case`list`:n+=this.renderer.list(c);continue;case`html`:n+=this.renderer.html(c);continue;case`def`:n+=this.renderer.def(c);continue;case`paragraph`:n+=this.renderer.paragraph(c);continue;case`text`:for(var l=c,u=this.renderer.text(l);r+1<e.length&&e[r+1].type===`text`;)l=e[++r],u+=`
78`+this.renderer.text(l);n+=t?this.renderer.paragraph({type:`paragraph`,raw:u,text:u,tokens:[{type:`text`,raw:u,text:u,escaped:!0}]}):u;continue;default:var d=`Token with "`+c.type+`" type was not found.`;if(this.options.silent)return console.error(d),``;throw Error(d)}}return n}},{key:`parseInline`,value:function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.renderer,n=``,r=0;r<e.length;r++){var i,a=e[r];if((i=this.options.extensions)!=null&&(i=i.renderers)!=null&&i[a.type]){var o=this.options.extensions.renderers[a.type].call({parser:this},a);if(!1!==o||![`escape`,`html`,`link`,`image`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(a.type)){n+=o||``;continue}}var s=a;switch(s.type){case`escape`:case`text`:n+=t.text(s);break;case`html`:n+=t.html(s);break;case`link`:n+=t.link(s);break;case`image`:n+=t.image(s);break;case`strong`:n+=t.strong(s);break;case`em`:n+=t.em(s);break;case`codespan`:n+=t.codespan(s);break;case`br`:n+=t.br(s);break;case`del`:n+=t.del(s);break;default:var c=`Token with "`+s.type+`" type was not found.`;if(this.options.silent)return console.error(c),``;throw Error(c)}}return n}}],[{key:`parse`,value:function(t,n){return new e(n).parse(t)}},{key:`parseInline`,value:function(t,n){return new e(n).parseInline(t)}}])}(),RE=(wT=function(){return H(function e(t){V(this,e),Fx(this,`options`,void 0),Fx(this,`block`,void 0),this.options=t||OT},[{key:`preprocess`,value:function(e){return e}},{key:`postprocess`,value:function(e){return e}},{key:`processAllTokens`,value:function(e){return e}},{key:`emStrongMask`,value:function(e){return e}},{key:`provideLexer`,value:function(){return this.block?PE.lex:PE.lexInline}},{key:`provideParser`,value:function(){return this.block?LE.parse:LE.parseInline}}])}(),Fx(wT,`passThroughHooks`,new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`])),Fx(wT,`passThroughHooksRespectAsync`,new Set([`preprocess`,`postprocess`,`processAllTokens`])),wT),zE=new(function(){return H(function e(){V(this,e),Fx(this,`defaults`,{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}),Fx(this,`options`,this.setOptions),Fx(this,`parse`,this.parseMarkdown(!0)),Fx(this,`parseInline`,this.parseMarkdown(!1)),Fx(this,`Parser`,LE),Fx(this,`Renderer`,FE),Fx(this,`TextRenderer`,IE),Fx(this,`Lexer`,PE),Fx(this,`Tokenizer`,NE),Fx(this,`Hooks`,RE),this.use.apply(this,arguments)},[{key:`walkTokens`,value:function(e,t){var n,r=this,i=[],a=U(e);try{var o=function(){var e=n.value;switch(i=i.concat(t.call(r,e)),e.type){case`table`:var a,o=e,s=U(o.header);try{for(s.s();!(a=s.n()).done;){var c=a.value;i=i.concat(r.walkTokens(c.tokens,t))}}catch(e){s.e(e)}finally{s.f()}var l,u=U(o.rows);try{for(u.s();!(l=u.n()).done;){var d,f=U(l.value);try{for(f.s();!(d=f.n()).done;){var p=d.value;i=i.concat(r.walkTokens(p.tokens,t))}}catch(e){f.e(e)}finally{f.f()}}}catch(e){u.e(e)}finally{u.f()}break;case`list`:var m=e;i=i.concat(r.walkTokens(m.items,t));break;default:var h,g=e;(h=r.defaults.extensions)!=null&&(h=h.childTokens)!=null&&h[g.type]?r.defaults.extensions.childTokens[g.type].forEach(function(e){var n=g[e].flat(1/0);i=i.concat(r.walkTokens(n,t))}):g.tokens&&(i=i.concat(r.walkTokens(g.tokens,t)))}};for(a.s();!(n=a.n()).done;)o()}catch(e){a.e(e)}finally{a.f()}return i}},{key:`use`,value:function(){for(var e=this,t=this.defaults.extensions||{renderers:{},childTokens:{}},n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return r.forEach(function(n){var r=W({},n);if(r.async=e.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(function(e){if(!e.name)throw Error(`extension name required`);if(`renderer`in e){var n=t.renderers[e.name];t.renderers[e.name]=n?function(){var t=[...arguments],r=e.renderer.apply(this,t);return!1===r&&(r=n.apply(this,t)),r}:e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);var r=t[e.level];r?r.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),r.extensions=t),n.renderer){var i=e.defaults.renderer||new FE(e.defaults),a=function(){if(!(o in i))throw Error(`renderer '${o}' does not exist`);if([`options`,`parser`].includes(o))return 1;var e=o,t=n.renderer[e],r=i[e];i[e]=function(){var e=[...arguments],n=t.apply(i,e);return!1===n&&(n=r.apply(i,e)),n||``}};for(var o in n.renderer)a();r.renderer=i}if(n.tokenizer){var s=e.defaults.tokenizer||new NE(e.defaults),c=function(){if(!(l in s))throw Error(`tokenizer '${l}' does not exist`);if([`options`,`rules`,`lexer`].includes(l))return 1;var e=l,t=n.tokenizer[e],r=s[e];s[e]=function(){var e=[...arguments],n=t.apply(s,e);return!1===n&&(n=r.apply(s,e)),n}};for(var l in n.tokenizer)c();r.tokenizer=s}if(n.hooks){var u=e.defaults.hooks||new RE,d=function(t){if(!(t in u))throw Error(`hook '${t}' does not exist`);if([`options`,`block`].includes(t))return 1;var r=t,i=n.hooks[r],a=u[r];u[r]=RE.passThroughHooks.has(t)?function(n){if(e.defaults.async&&RE.passThroughHooksRespectAsync.has(t))return jx(G().m(function e(){var t;return G().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,i.call(u,n);case 1:return t=e.v,e.a(2,a.call(u,t))}},e)}))();var r=i.call(u,n);return a.call(u,r)}:function(){var t=[...arguments];if(e.defaults.async)return jx(G().m(function e(){var n;return G().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,i.apply(u,t);case 1:if(n=e.v,!1!==n){e.n=3;break}return e.n=2,a.apply(u,t);case 2:n=e.v;case 3:return e.a(2,n)}},e)}))();var n=i.apply(u,t);return!1===n&&(n=a.apply(u,t)),n}};for(var f in n.hooks)d(f);r.hooks=u}if(n.walkTokens){var p=e.defaults.walkTokens,m=n.walkTokens;r.walkTokens=function(e){var t=[];return t.push(m.call(this,e)),p&&(t=t.concat(p.call(this,e))),t}}e.defaults=W(W({},e.defaults),r)}),this}},{key:`setOptions`,value:function(e){return this.defaults=W(W({},this.defaults),e),this}},{key:`lexer`,value:function(e,t){return PE.lex(e,t??this.defaults)}},{key:`parser`,value:function(e,t){return LE.parse(e,t??this.defaults)}},{key:`parseMarkdown`,value:function(e){var t=this;return function(n,r){var i=W({},r),a=W(W({},t.defaults),i),o=t.onError(!!a.silent,!!a.async);if(!0===t.defaults.async&&!1===i.async)return o(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(Kx(n)>`u`||n===null)return o(Error(`marked(): input parameter is undefined or null`));if(typeof n!=`string`)return o(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(n)+`, string expected`));if(a.hooks&&(a.hooks.options=a,a.hooks.block=e),a.async)return jx(G().m(function r(){var i,o,s,c,l,u,d,f,p,m,h;return G().w(function(r){for(;;)switch(r.n){case 0:if(!a.hooks){r.n=2;break}return r.n=1,a.hooks.preprocess(n);case 1:l=r.v,r.n=3;break;case 2:l=n;case 3:if(i=l,!a.hooks){r.n=5;break}return r.n=4,a.hooks.provideLexer();case 4:u=r.v,r.n=6;break;case 5:u=e?PE.lex:PE.lexInline;case 6:return d=u,r.n=7,d(i,a);case 7:if(o=r.v,!a.hooks){r.n=9;break}return r.n=8,a.hooks.processAllTokens(o);case 8:f=r.v,r.n=10;break;case 9:f=o;case 10:if(s=f,!a.walkTokens){r.n=11;break}return r.n=11,Promise.all(t.walkTokens(s,a.walkTokens));case 11:if(!a.hooks){r.n=13;break}return r.n=12,a.hooks.provideParser();case 12:p=r.v,r.n=14;break;case 13:p=e?LE.parse:LE.parseInline;case 14:return m=p,r.n=15,m(s,a);case 15:if(c=r.v,!a.hooks){r.n=17;break}return r.n=16,a.hooks.postprocess(c);case 16:h=r.v,r.n=18;break;case 17:h=c;case 18:return r.a(2,h)}},r)}))().catch(o);try{a.hooks&&(n=a.hooks.preprocess(n));var s=(a.hooks?a.hooks.provideLexer():e?PE.lex:PE.lexInline)(n,a);a.hooks&&(s=a.hooks.processAllTokens(s)),a.walkTokens&&t.walkTokens(s,a.walkTokens);var c=(a.hooks?a.hooks.provideParser():e?LE.parse:LE.parseInline)(s,a);return a.hooks&&(c=a.hooks.postprocess(c)),c}catch(e){return o(e)}}}},{key:`onError`,value:function(e,t){return function(n){if(n.message+=`
79Please report this to https://github.com/markedjs/marked.`,e){var r=`<p>An error occurred:</p><pre>`+OE(n.message+``,!0)+`</pre>`;return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}}])}());function BE(e,t){return zE.parse(e,t)}function VE(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#39;`)}BE.options=BE.setOptions=function(e){return zE.setOptions(e),BE.defaults=zE.defaults,kT(BE.defaults),BE},BE.getDefaults=DT,BE.defaults=OT,BE.use=function(){return zE.use.apply(zE,arguments),BE.defaults=zE.defaults,kT(BE.defaults),BE},BE.walkTokens=function(e,t){return zE.walkTokens(e,t)},BE.parseInline=zE.parseInline,BE.Parser=LE,BE.parser=LE.parse,BE.Renderer=FE,BE.TextRenderer=IE,BE.Lexer=PE,BE.lexer=PE.lex,BE.Tokenizer=NE,BE.Hooks=RE,BE.parse=BE,BE.options,BE.setOptions,BE.use,BE.walkTokens,BE.parseInline,LE.parse,PE.lex;var HE=new BE.Renderer;HE.code=function(e){var t=e.text,n=e.lang,r=n===void 0?``:n,i=e.escaped,a=r?`language-${r}`:``,o=i?t:VE(t);return`
80    <div class="DocSearch-CodeSnippet">
81      <button class="DocSearch-CodeSnippet-CopyButton" data-code="${encodeURIComponent(t)}" aria-label="copy code"><svg class="DocSearch-CodeSnippet-CopyIcon" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewB
81ox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2" ry="2" /><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" /></svg><svg class="DocSearch-CodeSnippet-CheckIcon" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5" /></svg><span class="DocSearch-CodeSnippet-CopyButton-Label"></span></button>
82      <pre><code class="${a}">${o}</code></pre>
83    </div>
84  `},HE.link=function(e){var t=e.href,n=e.title,r=e.text,i=n?` title="${VE(n)}"`:``;return`<a href="${t?VE(t):``}"${i} target="_blank" rel="noopener noreferrer">${VE(r)}</a>`};var UE=(0,B.memo)(function(e){var t=e.content,n=e.copyButtonText,r=e.copyButtonCopiedText,i=e.isStreaming,a=(0,B.useMemo)(function(){return BE.parse(t,{gfm:!0,breaks:!0,renderer:HE})},[t]),o=(0,B.useRef)(null);return(0,B.useEffect)(function(){var e=o.current;if(e)return Array.from(e.querySelectorAll(`.DocSearch-CodeSnippet-CopyButton`)).forEach(function(e){var t=e.querySelector(`.DocSearch-CodeSnippet-CopyButton-Label`);t&&(t.textContent=n),e.classList.remove(`DocSearch-CodeSnippet-CopyButton--copied`)}),e.addEventListener(`click`,t),function(){e.removeEventListener(`click`,t)};function t(e){var t=e.target.closest(`.DocSearch-CodeSnippet-CopyButton`);if(t){var i=t.getAttribute(`data-code`)??``;navigator.clipboard.writeText(decodeURIComponent(i)).catch(function(){});var a=t.querySelector(`.DocSearch-CodeSnippet-CopyButton-Label`);if(a){t.classList.add(`DocSearch-CodeSnippet-CopyButton--copied`);var o=n;a.textContent=r,setTimeout(function(){t.classList.remove(`DocSearch-CodeSnippet-CopyButton--copied`),a.textContent=o},1500)}}}},[a,n,r]),B.createElement(`div`,{ref:o,className:`DocSearch-Markdown-Content ${i?`DocSearch-Markdown-Content--streaming`:``}`,dangerouslySetInnerHTML:{__html:a}})});function WE(e){var t=e.part,n=e.translations,r=e.onSearchQueryClick,i=n.searchingText,a=n.preToolCallText,o=n.toolCallResultText;switch(t.state){case`input-streaming`:return B.createElement(`div`,{className:`DocSearch-AskAiScreen-MessageContent-Tool Tool--PartialCall shimmer`},B.createElement(sT,{className:`DocSearch-AskAiScreen-SmallerLoadingIcon`}),B.createElement(`span`,null,i));case`input-available`:return B.createElement(`div`,{className:`DocSearch-AskAiScreen-MessageContent-Tool Tool--Call shimmer`},B.createElement(sT,{className:`DocSearch-AskAiScreen-SmallerLoadingIcon`}),B.createElement(`span`,null,a,` `,`"${t.input.query||``}" ...`));case`output-available`:var s=t.type===`tool-searchIndex`?t.output.query:t.input.query,c=t.output.hits?.length??0;return B.createElement(`div`,{className:`DocSearch-AskAiScreen-MessageContent-Tool Tool--Result`},B.createElement(CS,null),B.createElement(`span`,null,o,` `,r?B.createElement(`span`,{role:`button`,tabIndex:0,className:`DocSearch-AskAiScreen-MessageContent-Tool-Query`,onKeyDown:function(e){e.key!==`Enter`&&e.key!==` `||(e.preventDefault(),r(s||``))},onClick:function(){return r(s||``)}},` `,`"`,s||``,`"`):B.createElement(`span`,{className:`DocSearch-AskAiScreen-MessageContent-Tool-Query`},` "`,s||``,`"`),` `,`found `,c,` results`));default:return null}}UE.displayName=`MemoizedMarkdown`;var GE=[`translations`];function KE(e){var t=e.disclaimerText;return B.createElement(`p`,{className:`DocSearch-AskAiScreen-Disclaimer`},t)}function qE(e){var t,n=e.exchange,r=e.askAiError,i=e.isLastExchange,a=e.loadingStatus,o=e.onSearchQueryClick,s=e.translations,c=e.conversations,l=e.onFeedback,u=e.agentStudio,d=n.userMessage,f=n.assistantMessage,p=s.stoppedStreamingText,m=p===void 0?`You stopped this response`:p,h=s.errorTitleText,g=h===void 0?`Chat error`:h,_=s.preToolCallText,v=_===void 0?`Searching...`:_,y=s.afterToolCallText,b=y===void 0?`Searched for`:y,x=s.duringToolCallText,S=x===void 0?`Searching...`:x,C=mS(r,!!u),w=(0,B.useMemo)(function(){return uS(f)},[f]),T=(0,B.useMemo)(function(){return uS(d)},[d]),E=B.useMemo(function(){return e=f,t=[],n=new Set,e?(e.parts.forEac
84h(function(e){if(e.type===`text`&&e.text.length!==0){var r,i=e.text.replace(/```[\s\S]*?```/g,``).replace(/`[^`]*`/g,``),a=U(i.matchAll(/\[([^\]]*)\]\(([^)]+)\)/g));try{for(a.s();!(r=a.n()).done;){var o=r.value,s=o[1].trim(),c=o[2];n.has(c)||(n.add(c),t.push({url:c,title:s||void 0}))}}catch(e){a.e(e)}finally{a.f()}var l,u=U(i.matchAll(/(?<!\]\()https?:\/\/[^\s<>"{}|\\^`[\]]+/g));try{for(u.s();!(l=u.n()).done;){var d=l.value[0].replace(/[.,;:!?]+$/,``);n.has(d)||(n.add(d),t.push({url:d}))}}catch(e){u.e(e)}finally{u.f()}}}),t):[];var e,t,n},[f]),ee=B.useMemo(function(){return function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];if(r.type===`tool-searchIndex`&&r.state===`output-available`){for(var i=[],a=n;a<e.length;){var o=e[a];if(o.type!==`tool-searchIndex`||o.state!==`output-available`)break;var s=(o.output?.query??``).trim();s&&s.length>0&&i.push(s),a++}i.length>1?t.push({type:`aggregated-tool-call`,queries:i}):i.length===1&&t.push(r),n=a-1}else t.push(r)}return t}(f?.parts||[])},[f]),D=d.metadata?.stopped||(f==null||(t=f.metadata)==null?void 0:t.stopped),O=!D&&(!i||i&&a===`ready`&&!!f),k=[`submitted`,`streaming`].includes(a)&&i&&!ee.some(function(e){return e.type!==`step-start`}),A=u?f?.id||n.id:d?.id||n.id;return B.createElement(`div`,{className:`DocSearch-AskAiScreen-Response-Container`},B.createElement(`div`,{className:`DocSearch-AskAiScreen-Response`},B.createElement(`div`,{className:`DocSearch-AskAiScreen-Message DocSearch-AskAiScreen-Message--user`},B.createElement(`p`,{className:`DocSearch-AskAiScreen-Query`},T?.text??``)),B.createElement(`div`,{className:`DocSearch-AskAiScreen-Message DocSearch-AskAiScreen-Message--assistant`},B.createElement(`div`,{className:`DocSearch-AskAiScreen-MessageContent`},a===`error`&&r&&i&&!C&&B.createElement(`div`,{className:`DocSearch-AskAiScreen-MessageContent DocSearch-AskAiScreen-Error`},B.createElement(dT,null),B.createElement(`div`,{className:`DocSearch-AskAiScreen-Error-Content`},B.createElement(`h4`,{className:`DocSearch-AskAiScreen-Error-Title`},g),B.createElement(UE,{content:r.message,copyButtonText:``,copyButtonCopiedText:``,isStreaming:!1}))),k&&B.createElement(`div`,{className:`DocSearch-AskAiScreen-MessageContent-Reasoning`},B.createElement(`span`,{className:`shimmer`},s.thinkingText||`Thinking...`)),ee.map(function(e,t){var n=t;return typeof e==`string`?B.createElement(UE,{key:n,content:e,copyButtonText:s.copyButtonText||`Copy`,copyButtonCopiedText:s.copyButtonCopiedText||`Copied!`,isStreaming:a===`streaming`}):e.type===`aggregated-tool-call`?B.createElement(ET,{key:n,queries:e.queries,translations:s,onSearchQueryClick:o}):e.type===`reasoning`&&e.state===`streaming`?B.createElement(`div`,{key:n,className:`DocSearch-AskAiScreen-MessageContent-Reasoning shimmer`},B.createElement(sT,{className:`DocSearch-AskAiScreen-SmallerLoadingIcon`}),B.createElement(`span`,{className:`shimmer`},`Reasoning...`)):e.type===`text`?B.createElement(UE,{key:n,content:e.text,copyButtonText:s.copyButtonText||`Copy`,copyButtonCopiedText:s.copyButtonCopiedText||`Copied!`,isStreaming:e.state===`streaming`}):e.type===`tool-searchIndex`||e.type===`tool-algolia_search_index`?B.createElement(WE,{key:n,translations:{preToolCallText:v,searchingText:S,toolCallResultText:b},part:e,onSearchQueryClick:o}):null})),D&&B.createElement(`p`,{className:`DocSearck-AskAiScreen-MessageContent-Stopped`},m)),B.createElement(`div`,{className:`DocSearch-AskAiScreen-Answer
84-Footer`},B.createElement(JE,{id:A,showActions:O,latestAssistantMessageContent:w?.text||null,translations:s,conversations:c,onFeedback:l}))),E.length>0?B.createElement(YE,{urlsToDisplay:E,relatedSourcesText:s.relatedSourcesText}):null)}function JE(e){var t=e.id,n=e.showActions,r=e.latestAssistantMessageContent,i=e.translations,a=e.conversations,o=e.onFeedback,s=B.useMemo(function(){return a.getOne?.call(a,t)?.feedback??null},[a,t]),c=Wx(B.useState(s),2),l=c[0],u=c[1],d=Wx(B.useState(!1),2),f=d[0],p=d[1],m=Wx(B.useState(null),2),h=m[0],g=m[1],_=function(){var e=jx(G().m(function e(n){var r;return G().w(function(e){for(;;)switch(e.p=e.n){case 0:if(!f){e.n=1;break}return e.a(2);case 1:return g(null),p(!0),e.p=2,e.n=3,o?.(t,+(n===`like`));case 3:u(n),e.n=5;break;case 4:e.p=4,r=e.v,g(r);case 5:return e.p=5,p(!1),e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}));return function(t){return e.apply(this,arguments)}}(),v=i.likeButtonTitle,y=v===void 0?`Like`:v,b=i.dislikeButtonTitle,x=b===void 0?`Dislike`:b,S=i.thanksForFeedbackText,C=S===void 0?`Thanks for your feedback!`:S;return n&&r?B.createElement(`div`,{className:`DocSearch-AskAiScreen-Actions`},l===null?B.createElement(B.Fragment,null,f?B.createElement(sT,{className:`DocSearch-AskAiScreen-SmallerLoadingIcon`}):B.createElement(B.Fragment,null,B.createElement($E,{title:y,onClick:function(){return _(`like`)}}),B.createElement(eD,{title:x,onClick:function(){return _(`dislike`)}})),h&&B.createElement(`p`,{className:`DocSearch-AskAiScreen-FeedbackText`},h.message||`An error occured`)):B.createElement(`p`,{className:`DocSearch-AskAiScreen-FeedbackText DocSearch-AskAiScreen-FeedbackText--visible`},C),B.createElement(QE,{translations:i,onClick:function(){return navigator.clipboard.writeText(r)}})):null}function YE(e){var t=e.urlsToDisplay,n=e.relatedSourcesText;return B.createElement(`div`,{className:`DocSearch-AskAiScreen-RelatedSources`},B.createElement(`p`,{className:`DocSearch-AskAiScreen-RelatedSources-Title`},n||`Related sources`),B.createElement(`div`,{className:`DocSearch-AskAiScreen-RelatedSources-List`},t.length>0&&t.map(function(e){return B.createElement(`a`,{key:e.url,href:e.url,className:`DocSearch-AskAiScreen-RelatedSources-Item-Link`,target:`_blank`,rel:`noopener noreferrer`},B.createElement(ZE,null),B.createElement(`span`,null,e.title||e.url))})))}function XE(e){var t=e.translations,n=t===void 0?{}:t,r=Vx(e,GE),i=n.disclaimerText,a=i===void 0?`Answers are generated with AI which can make mistakes. Verify responses.`:i,o=n.startNewConversationButtonText,s=o===void 0?`Start a new conversation`:o,c=r.messages,l=r.askAiError,u=r.status,d=r.agentStudio,f=(0,B.useMemo)(function(){return u===`error`&&mS(l,!!d)},[u,l,d]),p=(0,B.useMemo)(function(){return yS(l)},[l]),m=gS(l,!!d),h=(0,B.useMemo)(function(){for(var e=[],t=0;t<c.length;t++)if(c[t].role===`user`){var n=c[t],r=c[t+1]?.role===`assistant`?c[t+1]:null;e.push({id:n.id,userMessage:n,assistantMessage:r}),r&&t++}return dS(e)},[c,f]),g=function(e){r.onAskAiToggle(!1),r.setQuery(e)},_=f&&(!pS(l)||c.some(function(e){return e.role===`assistant`}));return B.createElement(`div`,{className:`DocSearch-AskAiScreen DocSearch-AskAiScreen-Container`},_&&B.createElement(`div`,{className:`DocSearch-AskAiScreen-MessageContent DocSearch-AskAiScreen-Error DocSearch-AskAiScreen-Error--ThreadDepth`},B.createElement(`div`,{className:`DocSearch-AskAiScreen-Error-Content`},p?B.createElement(`p`,{className:`DocSearch-AskAiScreen-Error-Title`},p):null,m?B.createElement(`p`,null,B.createElement(`button`,{type:`button`,className:`DocSearch-ThreadDepthError-Link`,onClick:r.onNewConversation},s),` `,`to continue.`):null)),B.createElement(KE,{disclaimerText:a}),B.createElement(`div`,{className:`DocSearch-AskAiScreen-Body`},B.createElement(`div`,{className:`DocSearch-AskAiScreen-ExchangesList`},h.slice().reverse().map(function(e,t){return B.createElement(qE,{key:e.id,exchange:e,askAiError:r.askAiError,isLastExchange:t===0,loadingStatus:r.status,translations:n,conversations:r.conversations,agentStudio:d,onSearchQueryClick:g,onFeedback:r.onFeedback})}))))}function ZE(){return B.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,
84width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`},B.createElement(`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`}),B.createElement(`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`}),B.createElement(`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`}),B.createElement(`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`}))}function QE(e){var t=e.onClick,n=e.translations,r=n.copyButtonTitle,i=r===void 0?`Copy`:r,a=n.copyButtonCopiedText,o=a===void 0?`Copied!`:a,s=Wx((0,B.useState)(!1),2),c=s[0],l=s[1];return(0,B.useEffect)(function(){if(c){var e=setTimeout(function(){l(!1)},1500);return function(){return clearTimeout(e)}}},[c]),B.createElement(`button`,{type:`button`,className:`DocSearch-AskAiScreen-ActionButton DocSearch-AskAiScreen-CopyButton ${c?`DocSearch-AskAiScreen-CopyButton--copied`:``}`,disabled:c,title:c?o:i,onClick:function(){t(),l(!0)}},c?B.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,className:`lucide lucide-check-icon lucide-check`},B.createElement(`path`,{d:`M20 6 9 17l-5-5`})):B.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,className:`lucide lucide-copy-icon lucide-copy`},B.createElement(`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}),B.createElement(`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`})))}function $E(e){var t=e.title,n=e.onClick;return B.createElement(`button`,{type:`button`,className:`DocSearch-AskAiScreen-ActionButton DocSearch-AskAiScreen-LikeButton`,title:t,onClick:n},B.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,className:`lucide lucide-thumbs-up-icon lucide-thumbs-up`},B.createElement(`path`,{d:`M7 10v12`}),B.createElement(`path`,{d:`M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z`})))}function eD(e){var t=e.title,n=e.onClick;return B.createElement(`button`,{type:`button`,className:`DocSearch-AskAiScreen-ActionButton DocSearch-AskAiScreen-DislikeButton`,title:t,onClick:n},B.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,className:`lucide lucide-thumbs-down-icon lucide-thumbs-down`},B.createElement(`path`,{d:`M17 14V2`}),B.createElement(`path`,{d:`M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z`})))}var tD=[`hit`,`attribute`,`tagName`];function nD(e,t){return t.split(`.`).reduce(function(e,t){return e!=null&&e[t]?e[t]:null},e)}function rD(e){var t=e.hit,n=e.attribute,r=e.tagName,i=r===void 0?`span`:r,a=Vx(e,tD);return(0,B.createElement)(i,W(W({},a),{},{dangerouslySetInnerHTML:{__html:nD(t,`_snippetResult.${n}.value`)||nD(t,n)}}))}var iD=[`item`,`getItemProps`,`onItemClick`,`translations`,`collection`];function aD(e){var t=B.useMemo(function(){return e.title?e.title.replace(/&amp;/g,`&`).replace(/&lt;/g,`<`).replace(/&gt;/g,`>`).replace(/&quot;/g,`"`).replace(/&#039;/g,`'`):null},[e.title]);return e.collection&&e.collection.items.length!==0?e.collection.source.sourceId===`askAI`?B.createElement(`section`,{className:`DocSearch-AskAi-Section`},B.createElement(`ul`,e.getListProps({source:e.collection.source}),B.createElement(sD,Ix({item:e.collection.items[0],translations:e.translations},e)))):(e.collection.source.sourceId,B.createElement(`section`,{className:`DocSearch-Hits`},B.createElement(`div`,{className:`DocSearch-Hit-source`},t),B.createElement(`ul`,e.getListProps({source:e.collection.source}),e.collection.items.map(function(t,n){return B.createElement(oD,Ix({key:[e.title,t.objectID].join(`:`),item:t,index:n},e))})))):null}function oD(e){var t=e.item,n=e.index,r=e.renderIcon,i=e.renderAction,a=e.getItemProps,o=e.onItemClick,s=e.collection,c=e.hit
84Component;return B.createElement(`li`,Ix({className:[`DocSearch-Hit`,t.__docsearch_parent&&`DocSearch-Hit--Child`].filter(Boolean).join(` `)},a({item:t,source:s.source,onClick:function(e){o(t,e)}})),B.createElement(c,{hit:t},B.createElement(`div`,{className:`DocSearch-Hit-Container`},r({item:t,index:n}),t.hierarchy[t.type]&&t.type===`lvl1`&&B.createElement(`div`,{className:`DocSearch-Hit-content-wrapper`},B.createElement(rD,{className:`DocSearch-Hit-title`,hit:t,attribute:`hierarchy.lvl1`}),t.content&&B.createElement(rD,{className:`DocSearch-Hit-path`,hit:t,attribute:`content`})),t.type===`askAI`&&B.createElement(`div`,{className:`DocSearch-Hit-content-wrapper`},B.createElement(`span`,{className:`DocSearch-Hit-title`},cS(t.hierarchy.lvl1||``))),t.hierarchy[t.type]&&(t.type===`lvl2`||t.type===`lvl3`||t.type===`lvl4`||t.type===`lvl5`||t.type===`lvl6`)&&B.createElement(`div`,{className:`DocSearch-Hit-content-wrapper`},B.createElement(rD,{className:`DocSearch-Hit-title`,hit:t,attribute:`hierarchy.${t.type}`}),B.createElement(rD,{className:`DocSearch-Hit-path`,hit:t,attribute:`hierarchy.lvl1`})),t.type===`content`&&B.createElement(`div`,{className:`DocSearch-Hit-content-wrapper`},B.createElement(rD,{className:`DocSearch-Hit-title`,hit:t,attribute:`content`}),B.createElement(rD,{className:`DocSearch-Hit-path`,hit:t,attribute:`hierarchy.lvl1`})),i({item:t}))))}function sD(e){var t=e.item,n=e.getItemProps,r=e.onItemClick,i=e.translations,a=e.collection,o=Vx(e,iD),s=i||{},c=s.askAiPlaceholder,l=c===void 0?`Ask AI: `:c,u=s.noResultsAskAiPlaceholder,d=u===void 0?`Didn't find it in the docs? Ask AI to help: `:u,f=o.state.collections.length===1?d:l;return B.createElement(`li`,Ix({className:`DocSearch-Hit`},n({item:t,source:a.source,onClick:function(e){r(t,e)}})),B.createElement(`div`,{className:`DocSearch-Hit--AskAI`},B.createElement(`div`,{className:`DocSearch-Hit-AskAIButton DocSearch-Hit-Container`},B.createElement(`div`,{className:` DocSearch-Hit-AskAIButton-icon DocSearch-Hit-icon`},B.createElement(cT,null)),B.createElement(`div`,{className:`DocSearch-Hit-AskAIButton-title`},B.createElement(`span`,{className:`DocSearch-Hit-AskAIButton-title-highlight`},f),B.createElement(`mark`,{className:`DocSearch-Hit-AskAIButton-title-query`},String(t.query||``))))))}var cD=[`onAskAiToggle`];function lD(e){var t=e.onAskAiToggle,n=Vx(e,cD),r=B.useMemo(function(){return n.state.collections[2]},[n.state]);return B.useEffect(function(){r&&r.items.length!==0||t(!0)},[r,t]),B.createElement(`div`,{className:`DocSearch-Dropdown-Container DocSearch-Conversation-History`},B.createElement(aD,Ix({},n,{key:r.source.sourceId,title:``,translations:n.translations,collection:r,renderIcon:function(){return B.createElement(`div`,{className:`DocSearch-Hit-icon`},B.createElement(cT,null))},renderAction:function(e){var t=e.item;return B.createElement(`div`,{className:`DocSearch-Hit-action`},B.createElement(`button`,{type:`button`,className:`DocSearch-Hit-action-button`,onClick:function(e){e.preventDefault(),e.stopPropagation(),n.conversations.remove(t),n.refresh()}},B.createElement(uT,null)))}})))}function uD(e){var t=e.translations,n=t===void 0?{}:t,r=n.titleText,i=r===void 0?`Unable to fetch results`:r,a=n.helpText,o=a===void 0?`You might want to check your network connection.`:a;return B.createElement(`div`,{className:`DocSearch-ErrorScreen`},B.createElement(`div`,{className:`DocSearch-Screen-Icon`},B.createElement(yT,null)),B.createElement(`p`,{className:`DocSearch-Title`},i),B.createElement(`p`,{className:`DocSearch-Help`},o))}function dD(e){var t=e.translations,n=t===void 0?{}:t,r=e.suggestedQuestions,i=r===void 0?[]:r,a=e.selectSuggestedQuestion,o=n.newConversationTitle,s=o===void 0?`How can I help you today?`:o,c=n.newConversationDescription,l=c===void 0?`I search through your documentation to help you find setup guides, feature details and troubleshooting tips, fast.`:c;return B.createElement(`div`,{className:`DocSearch-NewConversationScreen`},B.createElement(`h3`,{className:`DocSearch-NewConversationScreen-Title`},s),B.createElement(`p`,{className:`DocSearch-NewConversationScreen-Description`},l),B.createElement(`div`,{className:`DocSearch-NewConversationScreen-SuggestedQuestions`},i.map(function(e){return B.createElement(`button`,{key:e.objectID,type:`button`,className:`DocSearch-NewConversationScreen-SuggestedQuestion`,onClick:function(){return a(e)}},e.question)})))}var fD=[`translations`];function pD(e){var t=e.translations,n=t===void 0?{}:t,r=Vx(e,fD),i=n.noResultsText,a=i===void 0?`No results found for`:i,o=n.suggestedQueryText,s=o===void 0?`Try searching for`:o,c=n.reportMissingResultsText,l=c===void 0?`Believe this query should return results?`:c,u=n.reportMissingResultsLinkText,d=u===void 0?`Let us know.`:u,f=r.state.context.searchSuggestions;return B.createElement(`div`,{className:`DocSearch-NoResults ${r.canHandleAskAi?`DocSearch-NoResults--withAskA
84i`:``}`},B.createElement(`div`,{className:`DocSearch-Screen-Icon`},B.createElement(bT,null)),B.createElement(`p`,{className:`DocSearch-Title`},a,` "`,B.createElement(`strong`,null,r.state.query),`"`),f&&f.length>0&&B.createElement(`div`,{className:`DocSearch-NoResults-Prefill-List`},B.createElement(`p`,{className:`DocSearch-Help`},s,`:`),B.createElement(`div`,{className:`DocSearch-NoResults-Prefill-List-Items`},f.slice(0,3).reduce(function(e,t){return[].concat(K(e),[B.createElement(`p`,{key:t},B.createElement(CS,{size:16}),B.createElement(`button`,{className:`DocSearch-Prefill`,key:t,type:`button`,onClick:function(){r.setQuery(t.toLowerCase()+` `),r.refresh(),r.inputRef.current.focus()}},t))])},[]))),r.getMissingResultsUrl&&B.createElement(`p`,{className:`DocSearch-Help`},`${l} `,B.createElement(`a`,{href:r.getMissingResultsUrl({query:r.state.query}),target:`_blank`,rel:`noopener noreferrer`},d)))}var mD=[`translations`];function hD(e){var t=e.translations,n=t===void 0?{}:t,r=Vx(e,mD);return B.createElement(`div`,{className:`DocSearch-Dropdown-Container`},r.state.collections.map(function(e){if(e.items.length===0)return null;var t=jS(e.items[0]);return B.createElement(aD,Ix({},r,{key:e.source.sourceId,translations:n,title:t,collection:e,renderIcon:function(t){var n=t.item,r=t.index;return B.createElement(B.Fragment,null,n.__docsearch_parent&&B.createElement(`svg`,{className:`DocSearch-Hit-Tree`,viewBox:`0 0 24 54`},B.createElement(`g`,{stroke:`currentColor`,fill:`none`,fillRule:`evenodd`,strokeLinecap:`round`,strokeLinejoin:`round`},n.__docsearch_parent===e.items[r+1]?.__docsearch_parent?B.createElement(`path`,{d:`M8 6v42M20 27H8.3`}):B.createElement(`path`,{d:`M8 6v21M20 27H8.3`}))),B.createElement(`div`,{className:`DocSearch-Hit-icon`},B.createElement(mT,{type:n.type})))},renderAction:function(){return B.createElement(`div`,{className:`DocSearch-Hit-action`},B.createElement(fT,null))}}))}),r.resultsFooterComponent&&B.createElement(`section`,{className:`DocSearch-HitsFooter`},B.createElement(r.resultsFooterComponent,{state:r.state})))}var gD=[`translations`];function _D(e){var t=e.translations,n=t===void 0?{}:t,r=Vx(e,gD),i=n.recentSearchesTitle,a=i===void 0?`Recent`:i,o=n.saveRecentSearchButtonTitle,s=o===void 0?`Save this search`:o,c=n.removeRecentSearchButtonTitle,l=c===void 0?`Remove this search from history`:c,u=n.favoriteSearchesTitle,d=u===void 0?`Favorite`:u,f=n.removeFavoriteSearchButtonTitle,p=f===void 0?`Remove this search from favorites`:f,m=n.recentConversationsTitle,h=m===void 0?`Recent conversations`:m,g=n.removeRecentConversationButtonTitle,_=g===void 0?`Remove this conversation from history`:g;return B.createElement(`div`,{className:`DocSearch-Dropdown-Container`},B.createElement(aD,Ix({},r,{title:a,collection:r.state.collections[0],renderIcon:function(){return B.createElement(`div`,{className:`DocSearch-Hit-icon`},B.createElement(lT,null))},renderAction:function(e){var t=e.item;return B.createElement(B.Fragment,null,B.createElement(`div`,{className:`DocSearch-Hit-action`},B.createElement(`button`,{className:`DocSearch-Hit-action-button`,title:s,type:`submit`,onClick:function(e){e.preventDefault(),e.stopPropagation(),r.favoriteSearches.add(t),r.recentSearches.remove(t),r.refresh()}},B.createElement(_T,null))),B.createElement(`div`,{className:`DocSearch-Hit-action`},B.createElement(`button`,{className:`DocSearch-Hit-action-button`,title:l,type:`submit`,onClick:function(e){e.preventDefault(),e.stopPropagation(),r.recentSearches.remove(t),r.refresh()}},B.createElement(uT,null))))}})),B.createElement(aD,Ix({},r,{title:d,collection:r.state.collections[1],renderIcon:function(){return B.createElement(`div`,{className:`DocSearch-Hit-icon`},B.createElement(_T,null))},renderAction:function(e){var t=e.item;return B.createElement(`div`,{className:`DocSearch-Hit-action`},B.createElement(`button`,{className:`DocSearch-Hit-action-button`,title:p,type:`submit`,onClick:function(e){e.preventDefault(),e.stopPropagation(),r.favoriteSearches.remove(t),r.refresh()}},B.createElement(uT,null)))}})),B.createElement(aD,Ix({},r,{title:h,collection:r.state.collections[2],renderIcon:function(){return B.createElement(`div`,{className:`DocSearch-Hit-icon`},B.createElement(cT,null))},renderAction:function(e){var t=e.item;return B.createElement(`div`,{className:`DocSearch-Hit-action`},B.createElement(`button`,{className:`DocSearch-Hit-action-button`,title:_,type:`submit`,onClick:function(e){e.preventDefault(),e.stopPropagation(),r.conversations.remove(t),r.refresh()}},B.createElement(uT,null)))}})))}var vD=[`translations`],yD=B.memo(function(e){var t=e.translations,n=t===void 0?{}:t,r=Vx(e,vD);return r.canHandleAskAi&&r.isAskAiActive&&r.askAiState===`conversation-history`?B.createElement(lD,r):r.canHandleAskAi&&r.isAskAiActive&&r.askAiState===`
84new-conversation`?B.createElement(dD,{translations:n?.newConversation,selectSuggestedQuestion:r.selectSuggestedQuestion,suggestedQuestions:r.suggestedQuestions}):r.isAskAiActive&&r.canHandleAskAi?B.createElement(XE,Ix({},r,{messages:r.messages,status:r.status,askAiError:r.askAiError,translations:n?.askAiScreen,agentStudio:r.agentStudio})):r.state?.status===`error`?B.createElement(uD,{translations:n?.errorScreen}):r.state.query?r.hasCollections||r.canHandleAskAi?B.createElement(B.Fragment,null,B.createElement(hD,Ix({},r,{translations:n?.resultsScreen})),r.canHandleAskAi&&r.state.collections.length===1&&B.createElement(pD,Ix({},r,{translations:n?.noResultsScreen}))):B.createElement(pD,Ix({},r,{translations:n?.noResultsScreen})):B.createElement(_D,Ix({},r,{hasCollections:r.hasCollections,translations:n?.startScreen}))},function(e,t){return t.state.status===`loading`||t.state.status===`stalled`});function bD(e){var t=e.size,n=t===void 0?20:t,r=e.color,i=r===void 0?`currentColor`:r;return B.createElement(`svg`,{width:n,height:n,className:`DocSearch-Back-Icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:i,strokeWidth:`1.6`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`},B.createElement(`path`,{d:`m12 19-7-7 7-7`}),B.createElement(`path`,{d:`M19 12H5`}))}var xD=[`children`,`className`,`onClick`],SD=B.createContext({open:!1,setOpen:function(e){}});function CD(e){var t=e.children,n=Wx(B.useState(!1),2),r=n[0],i=n[1],a=B.useRef(null);return B.useEffect(function(){function e(e){var t;(t=a.current)!=null&&t.contains(e.target)||i(!1)}return r&&window.addEventListener(`click`,e),function(){window.removeEventListener(`click`,e)}},[r]),B.createElement(SD.Provider,{value:{open:r,setOpen:i}},B.createElement(`div`,{ref:a,className:`DocSearch-Menu`},t))}function wD(e){var t=e.heading,n=e.shimmer,r=n!==void 0&&n;return B.createElement(`span`,{className:`DocSearch-Modal-heading${r?` shimmer`:``}`},t)}CD.Trigger=function(e){var t=e.children,n=e.className,r=n===void 0?``:n,i=e.disabled,a=B.useContext(SD),o=a.open,s=a.setOpen;return B.createElement(`button`,{type:`button`,className:`DocSearch-Menu-trigger ${r}${i?` disabled`:``}`,"aria-disabled":i,onClick:function(){i||s(!o)}},t)},CD.Content=function(e){var t=e.children,n=B.useContext(SD).open;return B.createElement(`div`,{className:`DocSearch-Menu-content${n?` open`:``}`},t)},CD.Item=function(e){var t=e.children,n=e.className,r=n===void 0?``:n,i=e.onClick,a=Vx(e,xD),o=B.useContext(SD).setOpen;return B.createElement(`button`,Ix({type:`button`,className:`DocSearch-Menu-item ${r}`,onClick:function(e){i&&(i(e),o(!1))}},a),t)};var TD=[`translations`,`askAiState`,`onAskAiToggle`,`setAskAiState`];function ED(e){var t=e.translations,n=t===void 0?{}:t,r=e.askAiState,i=e.onAskAiToggle,a=e.setAskAiState,o=Vx(e,TD),s=n.clearButtonTitle,c=s===void 0?`Clear`:s,l=n.clearButtonAriaLabel,u=l===void 0?`Clear the query`:l,d=n.closeButtonText,f=d===void 0?`Close`:d,p=n.closeButtonAriaLabel,m=p===void 0?`Close`:p,h=n.searchInputLabel,g=h===void 0?`Search`:h,_=n.backToKeywordSearchButtonText,v=_===void 0?`Back to keyword search`:_,y=n.backToKeywordSearchButtonAriaLabel,b=y===void 0?`Back to keyword search`:y,x=n.placeholderTextAskAiStreaming,S=x===void 0?`Answering...`:x,C=n.newConversationPlaceholder,w=C===void 0?`Ask a question`:C,T=n.conversationHistoryTitle,E=T===void 0?`My conversation history`:T,ee=n.startNewConversationText,D=ee===void 0?`Start a new conversation`:ee,O=n.viewConversationHistoryText,k=O===void 0?`Conversation history`:O,A=n.threadDepthErrorPlaceholder,j=A===void 0?`Conversation limit reached`:A,M=o.getFormProps({inputElement:o.inputRef.current}).onReset;B.useEffect(function(){o.autoFocus&&o.inputRef.current&&o.inputRef.current.focus()},[o.autoFocus,o.inputRef]),B.useEffect(function(){o.isFromSelection&&o.inputRef.current&&o.inputRef.current.select()},[o.isFromSelection,o.inputRef]);var N=B.useMemo(function(){var e=o.state.collections[2];return!!e&&e.items.length>0},[o.state.collections]),P=o.getInputProps({inputElement:o.inputRef.current,autoFocus:o.autoFocus,maxLength:512}),F=new Set([`ArrowUp`,`ArrowDown`,`Enter`]),I=P.onKeyDown,te=P.onChange,ne=o.askAiStatus===`streaming`||o.askAiStatus===`submitted`,re=o.state.status===`stalled`,ie=o.isAskAiActive&&r!==`conversation-history`,ae=o.isThreadDepthError||!1,oe=o.placeholder;
84r===`new-conversation`&&(oe=w),ae&&o.isAskAiActive&&o.askAiBlockingChrome!==`minimal`&&(oe=j);var L=null;ne&&(L=S),r===`conversation-history`&&(L=E),B.useEffect(function(){o.askAiStatus!==`streaming`&&o.askAiStatus!==`submitted`&&o.inputRef.current&&o.inputRef.current.focus()},[o.askAiStatus,o.inputRef]);var se=W(W({},P),{},{enterKeyHint:o.isAskAiActive?`enter`:`search`,onKeyDown:function(e){if(o.isAskAiActive&&F.has(e.key))return e.key===`Enter`&&!ne&&o.state.query&&o.onAskAgain(o.state.query),e.preventDefault(),void e.stopPropagation();I?.(e)},onChange:function(e){if(o.isAskAiActive)return o.setQuery(e.currentTarget.value),e.preventDefault(),void e.stopPropagation();te?.(e)},disabled:ne||ae&&o.isAskAiActive}),ce=B.useCallback(function(){if(!ae)return r===`conversation-history`?(i(!0),void a(`initial`)):void i(!1);o.onNewConversation()},[r,ae,i,a,o]);return B.createElement(B.Fragment,null,B.createElement(`form`,{className:`DocSearch-Form`,onSubmit:function(e){e.preventDefault()},onReset:M},o.isAskAiActive?B.createElement(B.Fragment,null,B.createElement(`button`,{type:`button`,tabIndex:0,className:`DocSearch-Action DocSearch-AskAi-Return`,title:v,"aria-label":b,onClick:ce},B.createElement(bD,null))):B.createElement(B.Fragment,null,re&&B.createElement(`div`,{className:`DocSearch-LoadingIndicator`},B.createElement(sT,null)),!re&&B.createElement(`label`,Ix({className:`DocSearch-MagnifierLabel`},o.getLabelProps()),B.createElement(CS,null),B.createElement(`span`,{className:`DocSearch-VisuallyHiddenForAccessibility`},g))),L&&B.createElement(wD,{heading:L,shimmer:ne}),B.createElement(`input`,Ix({className:`DocSearch-Input`,ref:o.inputRef},se,{placeholder:oe,hidden:!!L})),B.createElement(`div`,{className:`DocSearch-Actions`},B.createElement(`button`,{className:`DocSearch-Clear`,type:`reset`,"aria-label":u,hidden:!o.state.query,tabIndex:o.state.query?0:-1,"aria-hidden":o.state.query?`false`:`true`},c),o.state.query&&B.createElement(`div`,{className:`DocSearch-Divider`}),ne&&B.createElement(B.Fragment,null,B.createElement(`button`,{type:`button`,className:`DocSearch-Action DocSearch-StopStreaming`,onClick:o.onStopAskAiStreaming},B.createElement(vT,null)),B.createElement(`div`,{className:`DocSearch-Divider`})),ie&&B.createElement(B.Fragment,null,B.createElement(CD,null,B.createElement(CD.Trigger,{className:`DocSearch-Action`},B.createElement(xT,null)),B.createElement(CD.Content,null,B.createElement(CD.Item,{onClick:o.onNewConversation},B.createElement(CT,null),D),N&&B.createElement(CD.Item,{onClick:o.onViewConversationHistory},B.createElement(ST,null),k))),B.createElement(`div`,{className:`DocSearch-Divider`})),B.createElement(`button`,{type:`button`,title:f,className:`DocSearch-Action DocSearch-Close`,"aria-label":m,onClick:o.onClose},B.createElement(uT,null)))))}function DD(){if(typeof window<`u`&&window.localStorage){var e=[];for(var t in window.localStorage)if(t.includes(`__DOCSEARCH_`)){var n=window.localStorage[t];e.push({key:t,size:n.length+t.length})}e.sort(function(e,t){return t.size-e.size});for(var r=Math.ceil(e.length/2),i=0;i<r&&i<e.length;i++)try{window.localStorage.removeItem(e[i].key)}catch{}}}function OD(){typeof window<`u`&&window.localStorage&&(function(){if(typeof window>`u`||!window.localStorage)return 0;var e=0;for(var t in window.localStorage)window.localStorage.hasOwnProperty(t)&&(e+=window.localStorage[t].length+t.length);return e})()>4194304&&DD()}function kD(e){return!1===function(){if(typeof window>`u`||!(`localStorage`in window))return!1;var e=`__TEST_KEY__`;try{return window.localStorage.setItem(e,``),window.localStorage.removeItem(e),!0}catch{return!1}}()?{setItem:function(){},getItem:function(){return[]}}:{setItem:function(t){(function(e,t){try{window.localStorage.setItem(e,JSON.stringify(t))}catch(n){if(n instanceof DOMException&&n.name===`QuotaExceededError`)try{DD(),window.localStorage.setItem(e,JSON.stringify(t))}catch{}}})(e,t)},getItem:function(){var t=window.localStorage.getItem(e);if(t===null)return[];try{var n=JSON.parse(t);return Array.isArray(n)?n:[]}catch{return window.localStorage.removeItem(e),[]}}}}var AD=[`_highlightResult`,`_snippetResult`];function jD(e){var t=e.key,n=e.limit,r=n===void 0?5:n,i=kD(t),a=i.getItem().slice(0,r);return{add:function(e){var t=e;t._highlightResult,t._snippetResult;var n=Vx(t,AD),o=a.findIndex(function(e){return e.objectID===n.objectID});o>-1&&a.splice(o,1),a.unshift(n),a=a.slice(0,r),i.setItem(a)},remove:function(e){a=a.filter(function(t){return t.objectID!==e.objectID}),i.setItem(a)},getAll:function(){return a}}}var MD,ND=`vercel.ai.error`,PD=Symbol.for(ND),FD=class e extends 
84Error{constructor({name:e,message:t,cause:n}){super(t),this[MD]=!0,this.name=e,this.cause=n}static isInstance(t){return e.hasMarker(t,ND)}static hasMarker(e,t){let n=Symbol.for(t);return typeof e==`object`&&!!e&&n in e&&typeof e[n]==`boolean`&&!0===e[n]}};MD=PD;var ID=FD;function LD(e){return e==null?`unknown error`:typeof e==`string`?e:e instanceof Error?e.message:JSON.stringify(e)}var RD,zD=`AI_InvalidArgumentError`,BD=`vercel.ai.error.${zD}`,VD=Symbol.for(BD),HD=class extends ID{constructor({message:e,cause:t,argument:n}){super({name:zD,message:e,cause:t}),this[RD]=!0,this.argument=n}static isInstance(e){return ID.hasMarker(e,BD)}};RD=VD;var UD,WD=`AI_JSONParseError`,GD=`vercel.ai.error.${WD}`,KD=Symbol.for(GD),qD=class extends ID{constructor({text:e,cause:t}){super({name:WD,message:`JSON parsing failed: Text: ${e}.\nError message: ${LD(t)}`,cause:t}),this[UD]=!0,this.text=e}static isInstance(e){return ID.hasMarker(e,GD)}};UD=KD;var JD,YD=`AI_TypeValidationError`,XD=`vercel.ai.error.${YD}`;JD=Symbol.for(XD);var ZD=class e extends ID{constructor({value:e,cause:t}){super({name:YD,message:`Type validation failed: Value: ${JSON.stringify(e)}.\nError message: ${LD(t)}`,cause:t}),this[JD]=!0,this.value=e}static isInstance(e){return ID.hasMarker(e,XD)}static wrap({value:t,cause:n}){return e.isInstance(n)&&n.value===t?n:new e({value:t,cause:n})}},QD=function(){function e(t,n){var r;return V(this,e),(r=Mx(this,e,[t])).name=`ParseError`,r.type=n.type,r.field=n.field,r.value=n.value,r.line=n.line,r}return Rx(e,Jx(Error)),H(e)}();function $D(e){}function eO(e){if(typeof e==`function`)throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");var t,n=e.onEvent,r=n===void 0?$D:n,i=e.onError,a=i===void 0?$D:i,o=e.onRetry,s=o===void 0?$D:o,c=e.onComment,l=``,u=!0,d=``,f=``;function p(e){if(e===``)return d.length>0&&r({id:t,event:f||void 0,data:d.endsWith(`
85`)?d.slice(0,-1):d}),t=void 0,d=``,void(f=``);if(e.startsWith(`:`))c&&c(e.slice(e.startsWith(`: `)?2:1));else{var n=e.indexOf(`:`);if(n===-1)m(e,``,e);else{var i=e.slice(0,n),a=e[n+1]===` `?2:1;m(i,e.slice(n+a),e)}}}function m(e,n,r){switch(e){case`event`:f=n;break;case`data`:d=`${d}${n}
86`;break;case`id`:t=n.includes(`\0`)?void 0:n;break;case`retry`:/^\d+$/.test(n)?s(parseInt(n,10)):a(new QD(`Invalid \`retry\` value: "${n}"`,{type:`invalid-retry`,value:n,line:r}));break;default:a(new QD(`Unknown field "${e.length>20?`${e.slice(0,20)}…`:e}"`,{type:`unknown-field`,field:e,value:n,line:r}))}}return{feed:function(e){var t,n=u?e.replace(/^\xEF\xBB\xBF/,``):e,r=Wx(function(e){for(var t=[],n=``,r=0;r<e.length;){var i=e.indexOf(`\r`,r),a=e.indexOf(`
87`,r),o=-1;if(i!==-1&&a!==-1?o=Math.min(i,a):i===-1?a!==-1&&(o=a):o=i===e.length-1?-1:i,o===-1){n=e.slice(r);break}var s=e.slice(r,o);t.push(s),e[(r=o+1)-1]===`\r`&&e[r]===`
88`&&r++}return[t,n]}(`${l}${n}`),2),i=r[0],a=r[1],o=U(i);try{for(o.s();!(t=o.n()).done;)p(t.value)}catch(e){o.e(e)}finally{o.f()}l=a,u=!1},reset:function(){l&&(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).consume&&p(l),u=!0,t=void 0,d=``,f=``,l=``}}}var tO=function(){function e(){var t,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=n.onError,i=n.onRetry,a=n.onComment;return V(this,e),Mx(this,e,[{start:function(e){t=eO({onEvent:function(t){e.enqueue(t)},onError:function(t){r===`terminate`?e.error(t):typeof r==`function`&&r(t)},onRetry:i,onComment:a})},transform:function(e){t.feed(e)}}])}return Rx(e,Jx(TransformStream)),H(e)}();function q(e,t,n){function r(n,r){var i;for(var o in Object.defineProperty(n,"_zod",{value:n._zod??{},enumerable:!1}),(i=n._zod).traits??(i.traits=new Set),n._zod.traits.add(e),t(n,r),a.prototype)o in n||Object.defineProperty(n,o,{value:a.prototype[o].bind(n)});n._zod.constr=a,n._zod.def=r}var i=function(e){function t(){return V(this,t),Mx(this,t,arguments)}return Rx(t,e),H(t)}(n?.Parent??Object);function a(e){var t,a=n!=null&&n.Parent?new i:this;r(a,e),(t=a._zod).deferred??(t.deferred=[]);var o,s=U(a._zod.deferred);try{for(s.s();!(o=s.n()).done;)(0,o.value)()}catch(e){s.e(e)}finally{s.f()}return a}return Object.defineProperty(i,"name",{value:e}),Object.defineProperty(a,"init",{value:r}),Object.defineProperty(a,Symbol.hasInstance,{value:function(t){var r;return!!(n!=null&&n.Parent&&t instanceof n.Parent)||(t==null||(r=t._zod)==null||(r=r.traits)==null?void 0:r.has(e))}}),Object.defineProperty(a,"name",{value:e}),a}var nO=function(){function e(){return V(this,e),Mx(this,e,[`Encountered Promise during synchronous parse. Use .parseAsync() instead.`])}return Rx(e,Jx(Error)),H(e)}(),rO=function(){function e(t){var n;return V(this,e),(n=Mx(this,e,[`Encountered unidirectional transform during encode: ${t}`])).name=`ZodEncodeError`,n}return Rx(e,Jx(Error)),H(e)}(),iO={};function aO(e){return iO}function oO(e){var t=Object.values(e).filter(function(e){return typeof e==`number`});return Object.entries(e).filter(function(e){var n=Wx(e,2),r=n[0];return n[1],t.indexOf(+r)===-1}).map(function(e){var t=Wx(e,2);return t[0],t[1]})}function sO(e,t){return typeof t==`bigint`?t.toString():t}function cO(e){return{get value(){var t=e();return Object.defineProperty(this,"value",{value:t}),t}}}function lO(e){return e==null}function uO(e){var t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}var dO=Symbol(`evaluating`);function fO(e,t,n){var r=void 0;Object.defineProperty(e,t,{get:function(){if(r!==dO)return r===void 0&&(r=dO,r=n()),r},set:function(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function pO(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function mO(){for(var e={},t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var i=0,a=n;i<a.length;i++){var o=a[i],s=Object.getOwnPropertyDescriptors(o);Object.assign(e,s)}return Object.defineProperties({},e)}function hO(e){return JSON.stringify(e)}var gO=`captureStackTrace`in Error?Error.captureStackTrace:function(){};function _O(e){return Kx(e)===`object`&&e!==null&&!Array.isArray(e)}var vO=cO(function(){var e;if(typeof navigator<`u`&&(e=navigator)!=null&&(e=e.userAgent)!=null&&e.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function yO(e){if(!1===_O(e))return!1;var t=e.constructor;if(t===void 0)return!0;var n=t.prototype;return!1!==_O(n)&&!1!==Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)}function bO(e){return yO(e)?W({},e):Array.isArray(e)?K(e):e}var xO=new Set([`string`,`number`,`symbol`]);function SO(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function CO(e,t,n){var r=new e._zod.constr(t??e._zod.def);return(!t||n!=null&&n.parent)&&(r._zod.parent=e),r}function J(e){var t=e;if(!t)return{};if(typeof t==`string`)return{error:function(){return t}};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?W(W({},t),{},{error:function(){return t.error}}):t}var wO={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function TO(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!0===e.aborted)return!0;for(var n=t;n<e.issues.length;n++)if(!0!==e.issues[n]?.continue)return!0;return!1}function EO(e,t){return t.map(function(t){var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function DO(e){return typeof e==`string`?e:e?.message}function OO(e,t,n){var r=W(W({},e),{},{path:e.path??[]});if(!e.message){var i,a,o;r.message=DO((i=e.inst)==null||(i=i._zod.def)==null||(a=i.error)==null?void 0:a.call(i,e))??DO(t==null||(o=t.error)==null?void 0:o.call(t,e))??DO(n.customError?.call(n,e))??DO(n.localeError?.call(n,e))??`Invalid input`}return delete r.inst,delete r.continue,t!=null&&t.reportInput||delete r.input,r}function kO(e){return e instanceof Set?`set`:e instanceof Map?`map`:e instanceof File?`file`:`unknown`}function AO(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function jO(){var e=[...arguments],t=e[0],n=e[1],r=e[2];return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:W({},t)}var MO=function(e,t){e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,sO,2),Object.defineProperty(e,"toString",{value:function(){return e.message},enumerable:!1})},NO=q(`$ZodError`,MO),PO=q(`$ZodError`,MO,{Parent:Error}),FO=function(e){return function(t,n,r,i){var a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new nO;if(o.issues.length){var s=new((i?.Err)??e)(o.issues.map(function(e){return OO(e,a,aO())}));throw gO(s,i?.callee),s}return o.value}}
88,IO=function(e){return function(){var t=jx(G().m(function t(n,r,i,a){var o,s,c;return G().w(function(t){for(;;)switch(t.n){case 0:if(o=i?Object.assign(i,{async:!0}):{async:!0},!((s=n._zod.run({value:r,issues:[]},o))instanceof Promise)){t.n=2;break}return t.n=1,s;case 1:s=t.v;case 2:if(!s.issues.length){t.n=3;break}throw c=new((a?.Err)??e)(s.issues.map(function(e){return OO(e,o,aO())})),gO(c,a?.callee),c;case 3:return t.a(2,s.value)}},t)}));return function(e,n,r,i){return t.apply(this,arguments)}}()},LO=function(e){return function(t,n,r){var i=r?W(W({},r),{},{async:!1}):{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new nO;return a.issues.length?{success:!1,error:new(e??NO)(a.issues.map(function(e){return OO(e,i,aO())}))}:{success:!0,data:a.value}}},RO=LO(PO),zO=function(e){return function(){var t=jx(G().m(function t(n,r,i){var a,o;return G().w(function(t){for(;;)switch(t.n){case 0:if(a=i?Object.assign(i,{async:!0}):{async:!0},!((o=n._zod.run({value:r,issues:[]},a))instanceof Promise)){t.n=2;break}return t.n=1,o;case 1:o=t.v;case 2:return t.a(2,o.issues.length?{success:!1,error:new e(o.issues.map(function(e){return OO(e,a,aO())}))}:{success:!0,data:o.value})}},t)}));return function(e,n,r){return t.apply(this,arguments)}}()},BO=zO(PO),VO=function(e){return function(t,n,r){var i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return FO(e)(t,n,i)}},HO=function(e){return function(t,n,r){return FO(e)(t,n,r)}},UO=function(e){return function(){var t=jx(G().m(function t(n,r,i){var a;return G().w(function(t){for(;;)if(t.n===0)return a=i?Object.assign(i,{direction:`backward`}):{direction:`backward`},t.a(2,IO(e)(n,r,a))},t)}));return function(e,n,r){return t.apply(this,arguments)}}()},WO=function(e){return function(){var t=jx(G().m(function t(n,r,i){return G().w(function(t){for(;;)if(t.n===0)return t.a(2,IO(e)(n,r,i))},t)}));return function(e,n,r){return t.apply(this,arguments)}}()},GO=function(e){return function(t,n,r){var i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return LO(e)(t,n,i)}},KO=function(e){return function(t,n,r){return LO(e)(t,n,r)}},qO=function(e){return function(){var t=jx(G().m(function t(n,r,i){var a;return G().w(function(t){for(;;)if(t.n===0)return a=i?Object.assign(i,{direction:`backward`}):{direction:`backward`},t.a(2,zO(e)(n,r,a))},t)}));return function(e,n,r){return t.apply(this,arguments)}}()},JO=function(e){return function(){var t=jx(G().m(function t(n,r,i){return G().w(function(t){for(;;)if(t.n===0)return t.a(2,zO(e)(n,r,i))},t)}));return function(e,n,r){return t.apply(this,arguments)}}()},YO=/^[cC][^\s-]{8,}$/,XO=/^[0-9a-z]+$/,ZO=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,QO=/^[0-9a-vA-V]{20}$/,$O=/^[A-Za-z0-9]{27}$/,ek=/^[a-zA-Z0-9_-]{21}$/,tk=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,nk=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,rk=function(e){return e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})\$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/},ik=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,ak=/^(?:(?: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])$/,ok=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,sk=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,ck=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,lk=/^$|^(?:[0-9a-zA-Z+/]{4}
88)*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,uk=/^[A-Za-z0-9_-]*$/,dk=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,fk=/^\+(?:[0-9]){6,14}[0-9]$/,pk=`(?:(?:\\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])))`,mk=RegExp(`^${pk}\$`);function hk(e){var t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}var gk=/^-?\d+$/,_k=/^-?\d+(?:\.\d+)?/,vk=/^(?:true|false)$/i,yk=/^null$/i,bk=/^[^A-Z]*$/,xk=/^[^a-z]*$/,Sk=q(`$ZodCheck`,function(e,t){var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Ck={number:`number`,bigint:`bigint`,object:`date`},wk=q(`$ZodCheckLessThan`,function(e,t){Sk.init(e,t);var n=Ck[Kx(t.value)];e._zod.onattach.push(function(e){var n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=function(r){(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Tk=q(`$ZodCheckGreaterThan`,function(e,t){Sk.init(e,t);var n=Ck[Kx(t.value)];e._zod.onattach.push(function(e){var n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=function(r){(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ek=q(`$ZodCheckMultipleOf`,function(e,t){Sk.init(e,t),e._zod.onattach.push(function(e){var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=function(n){if(Kx(n.value)!==Kx(t.value))throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):function(e,t){var n=(e.toString().split(`.`)[1]||``).length,r=t.toString(),i=(r.split(`.`)[1]||``).length;if(i===0&&/\d?e-\d?/.test(r)){var a=r.match(/\d?e-(\d?)/);a!=null&&a[1]&&(i=Number.parseInt(a[1]))}var o=n>i?n:i;return Number.parseInt(e.toFixed(o).replace(`.`,``))%Number.parseInt(t.toFixed(o).replace(`.`,``))/10**o}(n.value,t.value)===0)||n.issues.push({origin:Kx(n.value),code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Dk=q(`$ZodCheckNumberFormat`,function(e,t){Sk.init(e,t),t.format=t.format||`float64`;var n=t.format?.includes(`int`),r=n?`int`:`number`,i=Wx(wO[t.format],2),a=i[0],o=i[1];e._zod.onattach.push(function(e){var r=e._zod.bag;r.format=t.format,r.minimum=a,r.maximum=o,n&&(r.pattern=gk)}),e._zod.check=function(i){var s=i.value;if(n){if(!Number.isInteger(s))return void i.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});if(!Number.isSafeInteger(s))return void(s>0?i.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,continue:!t.abort}):i.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,continue:!t.abort}))}s<a&&i.issues.push({origin:`number`,input:s,code:`too_small`,minimum:a,inclusive:!0,inst:e,continue:!t.abort}),s>o&&i.issues.push({origin:`number`,input:s,code:`too_big`,maximum:o,inst:e})}}),Ok=q(`$ZodCheckMaxSize`,function(e,t){var n;Sk.init(e,t),(n=e._zod.def).when??(n.when=function(e){var t=e.value;return!lO(t)&&t.size!==void 0}),e._zod.onattach.push(function(e){var n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=function(n){var r=n.value;r.size<=t.maximum||n.issues.push({origin:kO(r),code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),kk=q(`$ZodCheckMinSize`,function(e,t){var n;Sk.init(e,t),(n=e._zod.def).when??(n.when=function(e){var t=e.value;return!lO(t)&&t.size!==void 0}),e._zod.onattach.push(function(e){var n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=function(n){var r=n.value;r.size>=t.minimum||n.issues.push({origin:kO(r),code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Ak=q(`$ZodCheckSizeEquals`,function(e,t){var n;Sk.init(e,t),(n=e._zod.def).when??(n.when=function(e){var t=e.value;return!lO(t)&&t.size!==void 0}),e._zod.onattach.push(function(e){var n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=function(n){var r=n.value,i=r.size;if(i!==t.size){var a=i>t.size;n.issues.push(W(W({origin:kO(r)},a?{code:`too_big`,maximum:t.size}:{code:`too_small`,minimum:t.size}),{},{inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort}))}}}),jk=q(`$ZodCheckMaxLength`,function(e,t){var n;Sk.init(e,t),(n=e._zod.def).when??(n.when=function(e){var t=e.value;return!lO(t)&&t.length!==void 0}),e._zod.onattach.push(function(e){var n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=function(n){var r=n.value;if(!(r.length<=t.maximum)){var i=AO(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}}),Mk=q(`$ZodCheckMinLength`,function(e,t){var n;Sk.init(e,t),(n=e._zod.def).when??(n.when=function(e){var t=e.value;return!lO(t)&&t.length!==void 0}),e._zod.onattach.push(function(e){var n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=function(n){var r=n.value;if(!(r.length>=t.minimum)){var i=AO(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}}),Nk=q(`$ZodCheckLengthEquals`,function(e,t){var n;Sk.init(e,t),(n=e._zod.def).when??(n.when=function(e){var t=e.value;return!lO(t)&&t.length!==void 0}),e._zod.onattach.push(function(e){var n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=function(n){var r=n.value,i=r.length;if(i!==t.length){var a=AO(r),o=i>
88t.length;n.issues.push(W(W({origin:a},o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length}),{},{inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort}))}}}),Pk=q(`$ZodCheckStringFormat`,function(e,t){var n,r;Sk.init(e,t),e._zod.onattach.push(function(e){var n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=function(n){t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push(W(W({origin:`string`,code:`invalid_format`,format:t.format,input:n.value},t.pattern?{pattern:t.pattern.toString()}:{}),{},{inst:e,continue:!t.abort}))}):(r=e._zod).check??(r.check=function(){})}),Fk=q(`$ZodCheckRegex`,function(e,t){Pk.init(e,t),e._zod.check=function(n){t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Ik=q(`$ZodCheckLowerCase`,function(e,t){t.pattern??=bk,Pk.init(e,t)}),Lk=q(`$ZodCheckUpperCase`,function(e,t){t.pattern??=xk,Pk.init(e,t)}),Rk=q(`$ZodCheckIncludes`,function(e,t){Sk.init(e,t);var n=SO(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(function(e){var t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=function(n){n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),zk=q(`$ZodCheckStartsWith`,function(e,t){Sk.init(e,t);var n=RegExp(`^${SO(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(function(e){var t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=function(n){n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Bk=q(`$ZodCheckEndsWith`,function(e,t){Sk.init(e,t);var n=RegExp(`.*${SO(t.suffix)}\$`);t.pattern??=n,e._zod.onattach.push(function(e){var t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=function(n){n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function Vk(e,t,n){var r;e.issues.length&&(r=t.issues).push.apply(r,K(EO(n,e.issues)))}var Hk=q(`$ZodCheckProperty`,function(e,t){Sk.init(e,t),e._zod.check=function(e){var n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(function(n){return Vk(n,e,t.property)});Vk(n,e,t.property)}}),Uk=q(`$ZodCheckMimeType`,function(e,t){Sk.init(e,t);var n=new Set(t.mime);e._zod.onattach.push(function(e){e._zod.bag.mime=t.mime}),e._zod.check=function(r){n.has(r.value.type)||r.issues.push({code:`invalid_value`,values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),Wk=q(`$ZodCheckOverwrite`,function(e,t){Sk.init(e,t),e._zod.check=function(e){e.value=t.tx(e.value)}}),Gk=function(){return H(function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];V(this,e),this.content=[],this.indent=0,this&&(this.args=t)},[{key:`indented`,value:function(e){this.indent+=1,e(this),--this.indent}},{key:`write`,value:function(e){var t=this;if(typeof e==`function`)return e(this,{execution:`sync`}),void e(this,{execution:`async`});var n,r=e.split(`
89`).filter(function(e){return e}),i=Math.min.apply(Math,K(r.map(function(e){return e.length-e.trimStart().length}))),a=U(r.map(function(e){return e.slice(i)}).map(function(e){return` `.repeat(2*t.indent)+e}));try{for(a.s();!(n=a.n()).done;){var o=n.value;this.content.push(o)}}catch(e){a.e(e)}finally{a.f()}}},{key:`compile`,value:function(){var e=Function,t=this==null?void 0:this.args,n=K(((this==null?void 0:this.content)??[``]).map(function(e){return`  ${e}`}));return Nx(e,K(t).concat([n.join(`
90`)]))}}])}(),Kk={major:4,minor:1,patch:12},qk=q(`$ZodType`,function(e,t){var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Kk;var r=K(e._zod.def.checks??[]);e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);var i,a=U(r);try{for(a.s();!(i=a.n()).done;){var o,s=U(i.value._zod.onattach);try{for(s.s();!(o=s.n()).done;)(0,o.value)(e)}catch(e){s.e(e)}finally{s.f()}}}catch(e){a.e(e)}finally{a.f()}if(r.length===0){var c;(n=e._zod).deferred??(n.deferred=[]),(c=e._zod.deferred)==null||c.push(function(){e._zod.run=e._zod.parse})}else{var l=function(e,t,n){var r,i,a=TO(e),o=U(t);try{var s=function(){var t=i.value;if(t._zod.def.when){if(!t._zod.def.when(e))return 0}else if(a)return 0;var o=e.issues.length,s=t._zod.check(e);if(s instanceof Promise&&!1===n?.async)throw new nO;if(r||s instanceof Promise)r=(r??Promise.resolve()).then(jx(G().m(function t(){return G().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,s;case 1:if(e.issues.length!==o){t.n=2;break}return t.a(2);case 2:a||=TO(e,o);case 3:return t.a(2)}},t)})));else{if(e.issues.length===o)return 0;a||=TO(e,o)}};for(o.s();!(i=o.n()).done;)s()}catch(e){o.e(e)}finally{o.f()}return r?r.then(function(){return e}):e},u=function(t,n,i){if(TO(t))return t.aborted=!0,t;var a=l(n,r,i);if(a instanceof Promise){if(!1===i.async)throw new nO;return a.then(function(t){return e._zod.parse(t,i)})}return e._zod.parse(a,i)};e._zod.run=function(t,n){if(n.skipChecks)return e._zod.parse(t,n);if(n.direction===`backward`){var i=e._zod.parse({value:t.value,issues:[]},W(W({},n),{},{skipChecks:!0}));return i instanceof Promise?i.then(function(e){return u(e,t,n)}):u(i,t,n)}var a=e._zod.parse(t,n);if(a instanceof Promise){if(!1===n.async)throw new nO;return a.then(function(e){return l(e,r,n)})}return l(a,r,n)}}e[`~standard`]={validate:function(t){try{var n=RO(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return BO(e,t).then(function(e){return e.success?{value:e.data}:{issues:e.error?.issues}})}},vendor:`zod`,version:1}}),Jk=q(`$ZodString`,function(e,t){var n;qk.init(e,t),e._zod.pattern=K((e==null||(n=e._zod.bag)==null?void 0:n.patterns)??[]).pop()??function(e){var t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}\$`)}(e._zod.bag),e._zod.parse=function(n,r){if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),Yk=q(`$ZodStringFormat`,function(e,t){Pk.init(e,t),Jk.init(e,t)}),Xk=q(`$ZodGUID`,function(e,t){t.pattern??=nk,Yk.init(e,t)}),Zk=q(`$ZodUUID`,function(e,t){if(t.version){var n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=rk(n)}else t.pattern??=rk();Yk.init(e,t)}),Qk=q(`$ZodEmail`,function(e,t){t.pattern??=ik,Yk.init(e,t)}),$k=q(`$ZodURL`,function(e,t){Yk.init(e,t),e._zod.check=function(n){try{var r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:dk.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),n.value=t.normalize?i.href:r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),eA=q(`$ZodEmoji`,function(e,t){t.pattern??=RegExp(`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,`u`),Yk.init(e,t)}),tA=q(`$ZodNanoID`,function(e,t){t.pattern??=ek,Yk.init(e,t)}),nA=q(`$ZodCUID`,function(e,t){t.pattern??=YO,Yk.init(e,t)}),rA=q(`$ZodCUID2`,function(e,t){t.pattern??=XO,Yk.init(e,t)}),iA=q(`$ZodULID`,function(e,t){t.pattern??=ZO,Yk.init(e,t)}),aA=q(`$ZodXID`,function(e,t){t.pattern??=QO,Yk.init(e,t)}),oA=q(`$ZodKSUID`,function(e,t){t.pattern??=$O,Yk.init(e,t)}),sA=q(`$ZodISODateTime`,function(e,t){t.pattern??=function(e){var t=hk({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);var r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${pk}T(?:${r})\$`)}(t),Yk.init(e,t)}),cA=q(`$ZodISODate`,function(e,t){t.pattern??=mk,Yk.init(e,t)}),lA=q(`$ZodISOTime`,function(e,t){t.pattern??=RegExp(`^${hk(t)}\$`),Yk.init(e,t)}),uA=q(`$ZodISODuration`,function(e,t){t.pattern??=tk,Yk.init(e,t)}),dA=q(`$ZodIPv4`,function(e,t){t.pattern??=ak,Yk.init(e,t),e._zod.onattach.push(function(e){e._zod.bag.format=`ipv4`})}),fA=q(`$ZodIPv6`,function(e,t){t.pattern??=ok,Yk.init(e,t),e._zod.onattach.push(function(e){e._zod.bag.format=`ipv6`}),e._zod.check=function(n){try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),pA=q(`$ZodCIDRv4`,function(e,t){t.pattern??=sk,Yk.init(e,t)}),mA=q(`$ZodCIDRv6`,function(e,t){t.pattern??=ck,Yk.init(e,t),e._zod.check=function(n){var r=n.value.split(`/`);try{if(r.length!==2)throw Error();var i=Wx(r,2),a=i[0],o=i[1];if(!o)throw Error();var s=Number(o);if(`${s}`!==o||s<0||s>128)throw Error();new URL(`http://[${a}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function hA(e){if(e===``)return!0;
90if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var gA=q(`$ZodBase64`,function(e,t){t.pattern??=lk,Yk.init(e,t),e._zod.onattach.push(function(e){e._zod.bag.contentEncoding=`base64`}),e._zod.check=function(n){hA(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),_A=q(`$ZodBase64URL`,function(e,t){t.pattern??=uk,Yk.init(e,t),e._zod.onattach.push(function(e){e._zod.bag.contentEncoding=`base64url`}),e._zod.check=function(n){(function(e){if(!uk.test(e))return!1;var t=e.replace(/[-_]/g,function(e){return e===`-`?`+`:`/`});return hA(t.padEnd(4*Math.ceil(t.length/4),`=`))})(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),vA=q(`$ZodE164`,function(e,t){t.pattern??=fk,Yk.init(e,t)}),yA=q(`$ZodJWT`,function(e,t){Yk.init(e,t),e._zod.check=function(n){(function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;try{var n=e.split(`.`);if(n.length!==3)return!1;var r=Wx(n,1)[0];if(!r)return!1;var i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}})(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),bA=q(`$ZodNumber`,function(e,t){qk.init(e,t),e._zod.pattern=e._zod.bag.pattern??_k,e._zod.parse=function(n,r){if(t.coerce)try{n.value=Number(n.value)}catch{}var i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;var a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push(W({expected:`number`,code:`invalid_type`,input:i,inst:e},a?{received:a}:{})),n}}),xA=q(`$ZodNumber`,function(e,t){Dk.init(e,t),bA.init(e,t)}),SA=q(`$ZodBoolean`,function(e,t){qk.init(e,t),e._zod.pattern=vk,e._zod.parse=function(n,r){if(t.coerce)try{n.value=!!n.value}catch{}var i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),CA=q(`$ZodNull`,function(e,t){qk.init(e,t),e._zod.pattern=yk,e._zod.values=new Set([null]),e._zod.parse=function(t,n){var r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),wA=q(`$ZodUnknown`,function(e,t){qk.init(e,t),e._zod.parse=function(e){return e}}),TA=q(`$ZodNever`,function(e,t){qk.init(e,t),e._zod.parse=function(t,n){return t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t}});function EA(e,t,n){var r;e.issues.length&&(r=t.issues).push.apply(r,K(EO(n,e.issues))),t.value[n]=e.value}var DA=q(`$ZodArray`,function(e,t){qk.init(e,t),e._zod.parse=function(n,r){var i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);for(var a=[],o=function(e){var o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(function(t){return EA(t,n,e)})):EA(s,n,e)},s=0;s<i.length;s++)o(s);return a.length?Promise.all(a).then(function(){return n}):n}});function OA(e,t,n,r){var i;e.issues.length&&(i=t.issues).push.apply(i,K(EO(n,e.issues))),e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function kA(e){for(var t=Object.keys(e.shape),n=0,r=t;n<r.length;n++){var i,a=r[n];if((i=e.shape)==null||(i=i[a])==null||(i=i._zod)==null||(i=i.traits)==null||!i.has(`$ZodType`))throw Error(`Invalid element at key "${a}": expected a Zod schema`)}var o,s=(o=e.shape,Object.keys(o).filter(function(e){return o[e]._zod.optin===`optional`&&o[e]._zod.optout===`optional`}));return W(W({},e),{},{keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(s)})}function AA(e,t,n,r,i,a){for(var o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=function(){var i=f[d];if(s.has(i))return 0;if(l===`never`)return o.push(i),0;var a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(function(e){return OA(e,n,i,t)})):OA(a,n,i,t)},d=0,f=Object.keys(t);d<f.length;d++)u();return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(function(){return n}):n}var jA=q(`$ZodObject`,function(e,t){qk.init(e,t);var n=Object.getOwnPropertyDescriptor(t,`shape`);if(n==null||!n.get){var r=t.shape;Object.defineProperty(t,"shape",{get:function(){var e=W({},r);return Object.defineProperty(t,"shape",{value:e}),e}})}var i=cO(function(){return kA(t)});fO(e._zod,`propValues`,function(){var e=t.shape,n={};for(var r in e){var i=e[r]._zod;if(i.values){n[r]??(n[r]=new Set);var a,o=U(i.values);try{for(o.s();!(a=o.n()).done;){var s=a.value;n[r].add(s)}}catch(e){o.e(e)}finally{o.f()}}}return n});var a,o=_O,s=t.catchall;e._zod.parse=function(t,n){a??=i.value;var r=t.value;if(!o(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value={};var c,l=[],u=a.shape,d=U(a.keys);try{var f=function(){var e=c.value,i=u[e]._zod.run({value:r[e],issues:[]},n);i instanceof Promise?l.push(i.then(function(n){return OA(n,t,e,r)})):OA(i,t,e,r)};for(d.s();!(c=d.n()).done;)f()}catch(e){d.e(e)}finally{d.f()}return s?AA(l,r,t,n,i.value,e):l.length?Promise.all(l).then(function(){return t}):t}}),MA=q(`$ZodObjectJIT`,function(e,t){jA.init(e,t);var n,r,i=e._zod.parse,a=cO(function(){return kA(t)}),o=_O,s=!iO.jitless,c=s&&vO.value,l=t.catchall;e._zod.parse=function(u,d){r??=a.value;var f=u.value;return o(f)?s&&c&&!1===d?.async&&!0!==d.jitless?(n||=function(e){var t=new Gk([`shape`,`payload`,`ctx`]),n=a.value,r=function(e){var t=hO(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);var i,o=Object.create(null),s=0,c=U(n.keys);try{for(c.s();!(i=c.n()).done;)o[i.value]=`key_${s++}`}catch(e){c.e(e)}finally{c.f()}t.write(`const newResult = {};`);var l,u=U(n.keys);try{for(u.s();!(l=u.n()).done;){var d=l.value,f=o[d],p=hO(d);t.write(`const ${f} = ${r(d)};`),t.write(`
91        if (${f}.issues.length) {
92          payload.issues = payload.issues.concat(${f}.issues.map(iss => ({
93            ...iss,
94            path: iss.path ? [${p}, ...iss.path] : [${p}]
95          })));
96        }
97        
98        
99        if (${f}.value === undefined) {
100          if (${p} in input) {
101            newResult[${p}] = undefined;
102          }
103        } else {
104          newResult[${p}] = ${f}.value;
105        }
106        
107      `)}}catch(e){u.e(e)}finally{u.f()}t.write(`payload.value = newResult;`),t.write(`return payload;`);var m=t.compile();return function(t,n){return m(e,t,n)}}(t.shape),u=n(u,d),l?AA([],f,u,d,r,e):u):i(u,d):(u.issues.push({expected:`object`,code:`invalid_type`,input:f,inst:e}),u)}});function NA(e,t,n,r){var i,a=U(e);try{for(a.s();!(i=a.n()).done;){var o=i.value;if(o.issues.length===0)return t.value=o.value,t}}catch(e){a.e(e)}finally{a.f()}var s=e.filter(function(e){return!TO(e)});return s.length===1?(t.value=s[0].value,s[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(function(e){return e.issues.map(function(e){return OO(e,r,aO())})})}),t)}var PA=q(`$ZodUnion`,function(e,t){qk.init(e,t),fO(e._zod,`optin`,function(){return t.options.some(function(e){return e._zod.optin===`optional`})?`optional`:void 0}),fO(e._zod,`optout`,function(){return t.options.some(function(e){return e._zod.optout===`optional`})?`optional`:void 0}),fO(e._zod,`values`,function(){if(t.options.every(function(e){return e._zod.values}))return new Set(t.options.flatMap(function(e){return Array.from(e._zod.values)}))}),fO(e._zod,`pattern`,function(){if(t.options.every(function(e){return e._zod.pattern}
107)){var e=t.options.map(function(e){return e._zod.pattern});return RegExp(`^(${e.map(function(e){return uO(e.source)}).join(`|`)})\$`)}});var n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=function(i,a){if(n)return r(i,a);var o,s=!1,c=[],l=U(t.options);try{for(l.s();!(o=l.n()).done;){var u=o.value._zod.run({value:i.value,issues:[]},a);if(u instanceof Promise)c.push(u),s=!0;else{if(u.issues.length===0)return u;c.push(u)}}}catch(e){l.e(e)}finally{l.f()}return s?Promise.all(c).then(function(t){return NA(t,i,e,a)}):NA(c,i,e,a)}}),FA=q(`$ZodDiscriminatedUnion`,function(e,t){PA.init(e,t);var n=e._zod.parse;fO(e._zod,`propValues`,function(){var e,n={},r=U(t.options);try{for(r.s();!(e=r.n()).done;){var i=e.value,a=i._zod.propValues;if(!a||Object.keys(a).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(var o=0,s=Object.entries(a);o<s.length;o++){var c=Wx(s[o],2),l=c[0],u=c[1];n[l]||(n[l]=new Set);var d,f=U(u);try{for(f.s();!(d=f.n()).done;){var p=d.value;n[l].add(p)}}catch(e){f.e(e)}finally{f.f()}}}}catch(e){r.e(e)}finally{r.f()}return n});var r=cO(function(){var e,n=t.options,r=new Map,i=U(n);try{for(i.s();!(e=i.n()).done;){var a=e.value,o=a._zod.propValues?.[t.discriminator];if(!o||o.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);var s,c=U(o);try{for(c.s();!(s=c.n()).done;){var l=s.value;if(r.has(l))throw Error(`Duplicate discriminator value "${String(l)}"`);r.set(l,a)}}catch(e){c.e(e)}finally{c.f()}}}catch(e){i.e(e)}finally{i.f()}return r});e._zod.parse=function(i,a){var o=i.value;if(!_O(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;var s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,input:o,path:[t.discriminator],inst:e}),i)}}),IA=q(`$ZodIntersection`,function(e,t){qk.init(e,t),e._zod.parse=function(e,n){var r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(function(t){var n=Wx(t,2),r=n[0],i=n[1];return RA(e,r,i)}):RA(e,i,a)}});function LA(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(yO(e)&&yO(t)){var n,r=Object.keys(t),i=Object.keys(e).filter(function(e){return r.indexOf(e)!==-1}),a=W(W({},e),t),o=U(i);try{for(o.s();!(n=o.n()).done;){var s=n.value,c=LA(e[s],t[s]);if(!c.valid)return{valid:!1,mergeErrorPath:[s].concat(K(c.mergeErrorPath))};a[s]=c.data}}catch(e){o.e(e)}finally{o.f()}return{valid:!0,data:a}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};for(var l=[],u=0;u<e.length;u++){var d=LA(e[u],t[u]);if(!d.valid)return{valid:!1,mergeErrorPath:[u].concat(K(d.mergeErrorPath))};l.push(d.data)}return{valid:!0,data:l}}return{valid:!1,mergeErrorPath:[]}}function RA(e,t,n){var r,i;if(t.issues.length&&(r=e.issues).push.apply(r,K(t.issues)),n.issues.length&&(i=e.issues).push.apply(i,K(n.issues)),TO(e))return e;var a=LA(t.value,n.value);if(!a.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}var zA=q(`$ZodRecord`,function(e,t){qk.init(e,t),e._zod.parse=function(n,r){var i=n.value;if(!yO(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;var a=[];if(t.keyType._zod.values){var o=t.keyType._zod.values;n.value={};var s,c,l=U(o);try{var u=function(){var e=s.value;if(typeof e==`string`||typeof e==`number`||Kx(e)===`symbol`){var o=t.valueType._zod.run({value:i[e],issues:[]},r);if(o instanceof Promise)a.push(o.then(function(t){var r;t.issues.length&&(r=n.issues).push.apply(r,K(EO(e,t.issues))),n.value[e]=t.value}));else{var c;o.issues.length&&(c=n.issues).push.apply(c,K(EO(e,o.issues))),n.value[e]=o.value}}};for(l.s();!(s=l.n()).done;)u()}catch(e){l.e(e)}finally{l.f()}for(var d in i)o.has(d)||(c??=[]).push(d);c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};var f,p=U(Reflect.ownKeys(i));try{var m=function(){var o=f.value;if(o===`__proto__`)return 0;var s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length)return n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(function(e){return OO(e,r,aO())}
107),input:o,path:[o],inst:e}),n.value[s.value]=s.value,0;var c=t.valueType._zod.run({value:i[o],issues:[]},r);if(c instanceof Promise)a.push(c.then(function(e){var t;e.issues.length&&(t=n.issues).push.apply(t,K(EO(o,e.issues))),n.value[s.value]=e.value}));else{var l;c.issues.length&&(l=n.issues).push.apply(l,K(EO(o,c.issues))),n.value[s.value]=c.value}};for(p.s();!(f=p.n()).done;)m()}catch(e){p.e(e)}finally{p.f()}}return a.length?Promise.all(a).then(function(){return n}):n}}),BA=q(`$ZodEnum`,function(e,t){qk.init(e,t);var n=oO(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(function(e){return xO.has(Kx(e))}).map(function(e){return typeof e==`string`?SO(e):e.toString()}).join(`|`)})\$`),e._zod.parse=function(t,i){var a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),VA=q(`$ZodLiteral`,function(e,t){if(qk.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);e._zod.values=new Set(t.values),e._zod.pattern=RegExp(`^(${t.values.map(function(e){return typeof e==`string`?SO(e):e?SO(e.toString()):String(e)}).join(`|`)})\$`),e._zod.parse=function(n,r){var i=n.value;return e._zod.values.has(i)||n.issues.push({code:`invalid_value`,values:t.values,input:i,inst:e}),n}}),HA=q(`$ZodTransform`,function(e,t){qk.init(e,t),e._zod.parse=function(n,r){if(r.direction===`backward`)throw new rO(e.constructor.name);var i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(function(e){return n.value=e,n});if(i instanceof Promise)throw new nO;return n.value=i,n}});function UA(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var WA=q(`$ZodOptional`,function(e,t){qk.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,fO(e._zod,`values`,function(){return t.innerType._zod.values?new Set([].concat(K(t.innerType._zod.values),[void 0])):void 0}),fO(e._zod,`pattern`,function(){var e=t.innerType._zod.pattern;return e?RegExp(`^(${uO(e.source)})?\$`):void 0}),e._zod.parse=function(e,n){if(t.innerType._zod.optin===`optional`){var r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(function(t){return UA(t,e.value)}):UA(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),GA=q(`$ZodNullable`,function(e,t){qk.init(e,t),fO(e._zod,`optin`,function(){return t.innerType._zod.optin}),fO(e._zod,`optout`,function(){return t.innerType._zod.optout}),fO(e._zod,`pattern`,function(){var e=t.innerType._zod.pattern;return e?RegExp(`^(${uO(e.source)}|null)\$`):void 0}),fO(e._zod,`values`,function(){return t.innerType._zod.values?new Set([].concat(K(t.innerType._zod.values),[null])):void 0}),e._zod.parse=function(e,n){return e.value===null?e:t.innerType._zod.run(e,n)}}),KA=q(`$ZodDefault`,function(e,t){qk.init(e,t),e._zod.optin=`optional`,fO(e._zod,`values`,function(){return t.innerType._zod.values}),e._zod.parse=function(e,n){if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;var r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(function(e){return qA(e,t)}):qA(r,t)}});function qA(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var JA=q(`$ZodPrefault`,function(e,t){qk.init(e,t),e._zod.optin=`optional`,fO(e._zod,`values`,function(){return t.innerType._zod.values}),e._zod.parse=function(e,n){return n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n)}}),YA=q(`$ZodNonOptional`,function(e,t){qk.init(e,t),fO(e._zod,`values`,function(){var e=t.innerType._zod.values;return e?new Set(K(e).filter(function(e){return e!==void 0})):void 0}),e._zod.parse=function(n,r){var i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(function(t){return XA(t,e)}):XA(i,e)}});function XA(e,t){return e.issues.length||e.value!==void 0||e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var ZA=q(`$ZodCatch`,function(e,t){qk.init(e,t),fO(e._zod,`optin`,function(){return t.innerType._zod.optin}),fO(e._zod,`optout`,function(){return t.innerType._zod.optout}),fO(e._zod,`values`,function(){return t.innerType._zod.values}),e._zod.parse=function(e,n){if(n.direction===`backward`)return t.innerType._zod.run(e,n);var r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(function(r){return e.value=r.value,r.issues.length&&(e.value=t.catchValue(W(W({},e),{},{error:{issues:r.issues.map(function(e){return OO(e,n,aO())})},input:e.value}
107)),e.issues=[]),e}):(e.value=r.value,r.issues.length&&(e.value=t.catchValue(W(W({},e),{},{error:{issues:r.issues.map(function(e){return OO(e,n,aO())})},input:e.value})),e.issues=[]),e)}}),QA=q(`$ZodPipe`,function(e,t){qk.init(e,t),fO(e._zod,`values`,function(){return t.in._zod.values}),fO(e._zod,`optin`,function(){return t.in._zod.optin}),fO(e._zod,`optout`,function(){return t.out._zod.optout}),fO(e._zod,`propValues`,function(){return t.in._zod.propValues}),e._zod.parse=function(e,n){if(n.direction===`backward`){var r=t.out._zod.run(e,n);return r instanceof Promise?r.then(function(e){return $A(e,t.in,n)}):$A(r,t.in,n)}var i=t.in._zod.run(e,n);return i instanceof Promise?i.then(function(e){return $A(e,t.out,n)}):$A(i,t.out,n)}});function $A(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var ej=q(`$ZodReadonly`,function(e,t){qk.init(e,t),fO(e._zod,`propValues`,function(){return t.innerType._zod.propValues}),fO(e._zod,`values`,function(){return t.innerType._zod.values}),fO(e._zod,`optin`,function(){return t.innerType._zod.optin}),fO(e._zod,`optout`,function(){return t.innerType._zod.optout}),e._zod.parse=function(e,n){if(n.direction===`backward`)return t.innerType._zod.run(e,n);var r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(tj):tj(r)}});function tj(e){return e.value=Object.freeze(e.value),e}var nj=q(`$ZodLazy`,function(e,t){qk.init(e,t),fO(e._zod,`innerType`,function(){return t.getter()}),fO(e._zod,`pattern`,function(){return e._zod.innerType._zod.pattern}),fO(e._zod,`propValues`,function(){return e._zod.innerType._zod.propValues}),fO(e._zod,`optin`,function(){return e._zod.innerType._zod.optin??void 0}),fO(e._zod,`optout`,function(){return e._zod.innerType._zod.optout??void 0}),e._zod.parse=function(t,n){return e._zod.innerType._zod.run(t,n)}}),rj=q(`$ZodCustom`,function(e,t){Sk.init(e,t),qk.init(e,t),e._zod.parse=function(e,t){return e},e._zod.check=function(n){var r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(function(t){return ij(t,n,r,e)});ij(i,n,r,e)}});function ij(e,t,n,r){if(!e){var i={code:`custom`,input:n,inst:r,path:K(r._zod.def.path??[]),continue:!r._zod.def.abort};r._zod.def.params&&(i.params=r._zod.def.params),t.issues.push(jO(i))}}var aj=function(){return H(function e(){V(this,e),this._map=new WeakMap,this._idmap=new Map},[{key:`add`,value:function(e){var t=arguments.length<=1?void 0:arguments[1];if(this._map.set(e,t),t&&Kx(t)===`object`&&`id`in t){if(this._idmap.has(t.id))throw Error(`ID ${t.id} already exists in the registry`);this._idmap.set(t.id,e)}return this}},{key:`clear`,value:function(){return this._map=new WeakMap,this._idmap=new Map,this}},{key:`remove`,value:function(e){var t=this._map.get(e);return t&&Kx(t)===`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}},{key:`get`,value:function(e){var t=e._zod.parent;if(t){var n=W({},this.get(t)??{});delete n.id;var r=W(W({},n),this._map.get(e));return Object.keys(r).length?r:void 0}return this._map.get(e)}},{key:`has`,value:function(e){return this._map.has(e)}}])}();function oj(){return new aj}var sj=oj();function cj(e,t){return new e(W({type:`string`,format:`guid`,check:`string_format`,abort:!1},J(t)))}function lj(e,t){return new wk(W(W({check:`less_than`},J(t)),{},{value:e,inclusive:!1}))}function uj(e,t){return new wk(W(W({check:`less_than`},J(t)),{},{value:e,inclusive:!0}))}function dj(e,t){return new Tk(W(W({check:`greater_than`},J(t)),{},{value:e,inclusive:!1}))}function fj(e,t){return new Tk(W(W({check:`greater_than`},J(t)),{},{value:e,inclusive:!0}))}function pj(e,t){return new Ek(W(W({check:`multiple_of`},J(t)),{},{value:e}))}function mj(e,t){return new jk(W(W({check:`max_length`},J(t)),{},{maximum:e}))}function hj(e,t){return new Mk(W(W({check:`min_length`},J(t)),{},{minimum:e}))}function gj(e,t){return new Nk(W(W({check:`length_equals`},J(t)),{},{length:e}))}function _j(e,t){return new Fk(W(W({check:`string_format`,format:`regex`},J(t)),{},{pattern:e}))}function vj(e){return new Ik(W({check:`string_format`,format:`lowercase`},J(e)))}function yj(e){return new Lk(W({check:`string_format`,format:`uppercase`},J(e)))}function bj(e,t){return new Rk(W(W({check:`string_format`,format:`includes`},J(t)),{},{includes:e}))}function xj(e,t){return new zk(W(W({check:`string_format`,format:`starts_with`},J(t)),{},{prefix:e}))}function Sj(e,t){return new Bk(W(W({check:`string_format`,format:`ends_with`},J(t)),{},{suffix:e}))}function Cj(e){return new Wk({check:`overwrite`,tx:e})}function wj(e){return Cj(function(t){return t.normalize(e)})}function Tj(){return Cj(function(e){return e.trim()})}function Ej(){return Cj(function(e){return e.toLowerCase()})}function Dj(){return Cj(function(e){return e.toUpperCase()})}function Oj(e){var t=function(e,t){var n=new Sk(W({check:`custom`},J(t)));return n._zod.check=e,n}(function(n){return n.addIssue=function(e){if(typeof e==`string`)n.issues.push(jO(e,n.value,t._zod.def));else{var r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(jO(r))}}
107,e(n.value,n)});return t}var kj=function(){return H(function e(t){V(this,e),this.counter=0,this.metadataRegistry=t?.metadata??sj,this.target=t?.target??`draft-2020-12`,this.unrepresentable=t?.unrepresentable??`throw`,this.override=t?.override??function(){},this.io=t?.io??`output`,this.seen=new Map},[{key:`process`,value:function(e){var t,n,r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{path:[],schemaPath:[]},a=e._zod.def,o=this.seen.get(e);if(o)return o.count++,i.schemaPath.includes(e)&&(o.cycle=i.path),o.schema;var s={schema:{},count:1,cycle:void 0,path:i.path};this.seen.set(e,s);var c=(t=e._zod).toJSONSchema?.call(t);if(c)s.schema=c;else{var l=W(W({},i),{},{schemaPath:[].concat(K(i.schemaPath),[e]),path:i.path}),u=e._zod.parent;if(u)s.ref=u,this.process(u,l),this.seen.get(u).isParent=!0;else{var d=s.schema;switch(a.type){case`string`:var f=d;f.type=`string`;var p=e._zod.bag,m=p.minimum,h=p.maximum,g=p.format,_=p.patterns,v=p.contentEncoding;if(typeof m==`number`&&(f.minLength=m),typeof h==`number`&&(f.maxLength=h),g&&(f.format={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``}[g]??g,f.format===``&&delete f.format),v&&(f.contentEncoding=v),_&&_.size>0){var y=K(_);y.length===1?f.pattern=y[0].source:y.length>1&&(s.schema.allOf=K(y.map(function(e){return W(W({},r.target===`draft-7`||r.target===`draft-4`||r.target===`openapi-3.0`?{type:`string`}:{}),{},{pattern:e.source})})))}break;case`number`:var b=d,x=e._zod.bag,S=x.minimum,C=x.maximum,w=x.format,T=x.multipleOf,E=x.exclusiveMaximum,ee=x.exclusiveMinimum;b.type=typeof w==`string`&&w.includes(`int`)?`integer`:`number`,typeof ee==`number`&&(this.target===`draft-4`||this.target===`openapi-3.0`?(b.minimum=ee,b.exclusiveMinimum=!0):b.exclusiveMinimum=ee),typeof S==`number`&&(b.minimum=S,typeof ee==`number`&&this.target!==`draft-4`&&(ee>=S?delete b.minimum:delete b.exclusiveMinimum)),typeof E==`number`&&(this.target===`draft-4`||this.target===`openapi-3.0`?(b.maximum=E,b.exclusiveMaximum=!0):b.exclusiveMaximum=E),typeof C==`number`&&(b.maximum=C,typeof E==`number`&&this.target!==`draft-4`&&(E<=C?delete b.maximum:delete b.exclusiveMaximum)),typeof T==`number`&&(b.multipleOf=T);break;case`boolean`:d.type=`boolean`;break;case`bigint`:if(this.unrepresentable===`throw`)throw Error(`BigInt cannot be represented in JSON Schema`);break;case`symbol`:if(this.unrepresentable===`throw`)throw Error(`Symbols cannot be represented in JSON Schema`);break;case`null`:this.target===`openapi-3.0`?(d.type=`string`,d.nullable=!0,d.enum=[null]):d.type=`null`;break;case`any`:case`unknown`:break;case`undefined`:if(this.unrepresentable===`throw`)throw Error(`Undefined cannot be represented in JSON Schema`);break;case`void`:if(this.unrepresentable===`throw`)throw Error(`Void cannot be represented in JSON Schema`);break;case`never`:d.not={};break;case`date`:if(this.unrepresentable===`throw`)throw Error(`Date cannot be represented in JSON Schema`);break;case`array`:var D=d,O=e._zod.bag,k=O.minimum,A=O.maximum;typeof k==`number`&&(D.minItems=k),typeof A==`number`&&(D.maxItems=A),D.type=`array`,D.items=this.process(a.element,W(W({},l),{},{path:[].concat(K(l.path),[`items`])}));break;case`object`:var j=d;j.type=`object`,j.properties={};var M=a.shape;for(var N in M)j.properties[N]=this.process(M[N],W(W({},l),{},{path:[].concat(K(l.path),[`properties`,N])}));var P=new Set(Object.keys(M)),F=new Set(K(P).filter(function(e){var t=a.shape[e]._zod;return r.io===`input`?t.optin===void 0:t.optout===void 0}));F.size>0&&(j.required=Array.from(F)),a.catchall?._zod.def.type===`never`?j.additionalProperties=!1:a.catchall?a.catchall&&(j.additionalProperties=this.process(a.catchall,W(W({},l),{},{path:[].concat(K(l.path),[`additionalProperties`])}))):this.io===`output`&&(j.additionalProperties=!1);break;case`union`:var I=d;I.anyOf=a.options.map(function(e,t){return r.process(e,W(W({},l),{},{path:[].concat(K(l.path),[`anyOf`,t])}))});break;case`intersection`:var te=d,ne=this.process(a.left,W(W({},l),{},{path:[].concat(K(l.path),[`allOf`,0])})),re=this.process(a.right,W(W({},l),{},{path:[].concat(K(l.path),[`allOf`,1])})),ie=function(e){return`allOf`in e&&Object.keys(e).length===1};te.allOf=[].concat(K(ie(ne)?ne.allOf:[ne]),K(ie(re)?re.allOf:[re]));break;case`tuple`:var ae=d;ae.type=`array`;
107var oe=this.target===`draft-2020-12`?`prefixItems`:`items`,L=this.target===`draft-2020-12`||this.target===`openapi-3.0`?`items`:`additionalItems`,se=a.items.map(function(e,t){return r.process(e,W(W({},l),{},{path:[].concat(K(l.path),[oe,t])}))}),ce=a.rest?this.process(a.rest,W(W({},l),{},{path:[].concat(K(l.path),[L],K(this.target===`openapi-3.0`?[a.items.length]:[]))})):null;this.target===`draft-2020-12`?(ae.prefixItems=se,ce&&(ae.items=ce)):this.target===`openapi-3.0`?(ae.items={anyOf:se},ce&&ae.items.anyOf.push(ce),ae.minItems=se.length,ce||(ae.maxItems=se.length)):(ae.items=se,ce&&(ae.additionalItems=ce));var le=e._zod.bag,ue=le.minimum,de=le.maximum;typeof ue==`number`&&(ae.minItems=ue),typeof de==`number`&&(ae.maxItems=de);break;case`record`:var fe=d;fe.type=`object`,this.target!==`draft-7`&&this.target!==`draft-2020-12`||(fe.propertyNames=this.process(a.keyType,W(W({},l),{},{path:[].concat(K(l.path),[`propertyNames`])}))),fe.additionalProperties=this.process(a.valueType,W(W({},l),{},{path:[].concat(K(l.path),[`additionalProperties`])}));break;case`map`:if(this.unrepresentable===`throw`)throw Error(`Map cannot be represented in JSON Schema`);break;case`set`:if(this.unrepresentable===`throw`)throw Error(`Set cannot be represented in JSON Schema`);break;case`enum`:var pe=d,me=oO(a.entries);me.every(function(e){return typeof e==`number`})&&(pe.type=`number`),me.every(function(e){return typeof e==`string`})&&(pe.type=`string`),pe.enum=me;break;case`literal`:var he,ge=d,_e=[],ve=U(a.values);try{for(ve.s();!(he=ve.n()).done;){var ye=he.value;if(ye===void 0){if(this.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof ye==`bigint`){if(this.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);_e.push(Number(ye))}else _e.push(ye)}}catch(e){ve.e(e)}finally{ve.f()}if(_e.length!==0){if(_e.length===1){var be=_e[0];ge.type=be===null?`null`:Kx(be),this.target===`draft-4`||this.target===`openapi-3.0`?ge.enum=[be]:ge.const=be}else _e.every(function(e){return typeof e==`number`})&&(ge.type=`number`),_e.every(function(e){return typeof e==`string`})&&(ge.type=`string`),_e.every(function(e){return typeof e==`boolean`})&&(ge.type=`string`),_e.every(function(e){return e===null})&&(ge.type=`null`),ge.enum=_e}break;case`file`:var xe=d,Se={type:`string`,format:`binary`,contentEncoding:`binary`},Ce=e._zod.bag,we=Ce.minimum,Te=Ce.maximum,Ee=Ce.mime;we!==void 0&&(Se.minLength=we),Te!==void 0&&(Se.maxLength=Te),Ee?Ee.length===1?(Se.contentMediaType=Ee[0],Object.assign(xe,Se)):xe.anyOf=Ee.map(function(e){return W(W({},Se),{},{contentMediaType:e})}):Object.assign(xe,Se);break;case`transform`:if(this.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`);break;case`nullable`:var De=this.process(a.innerType,l);this.target===`openapi-3.0`?(s.ref=a.innerType,d.nullable=!0):d.anyOf=[De,{type:`null`}];break;case`nonoptional`:case`promise`:case`optional`:this.process(a.innerType,l),s.ref=a.innerType;break;case`success`:d.type=`boolean`;break;case`default`:this.process(a.innerType,l),s.ref=a.innerType,d.default=JSON.parse(JSON.stringify(a.defaultValue));break;case`prefault`:this.process(a.innerType,l),s.ref=a.innerType,this.io===`input`&&(d._prefault=JSON.parse(JSON.stringify(a.defaultValue)));break;case`catch`:var Oe;this.process(a.innerType,l),s.ref=a.innerType;try{Oe=a.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}d.default=Oe;break;case`nan`:if(this.unrepresentable===`throw`)throw Error(`NaN cannot be represented in JSON Schema`);break;case`template_literal`:var ke=d,Ae=e._zod.pattern;if(!Ae)throw Error(`Pattern not found in template literal`);ke.type=`string`,ke.pattern=Ae.source;break;case`pipe`:var je=this.io===`input`?a.in._zod.def.type===`transform`?a.out:a.in:a.out;this.process(je,l),s.ref=je;break;case`readonly`:this.process(a.innerType,l),s.ref=a.innerType,d.readOnly=!0;break;case`lazy`:var Me=e._zod.innerType;this.process(Me,l),s.ref=Me;break;case`custom`:if(this.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`);break;case`function`:if(this.unrepresentable===`throw`)throw Error(`Function types cannot be represented in JSON Schema`)}}}var Ne=this.metadataRegistry.get(e);return Ne&&Object.assign(s.schema,Ne),this.io===`input`&&Aj(e)&&(delete s.schema.examples,delete s.schema.default),this.io===`input`&&s.schema._prefault&&((n=s.schema).default??(n.default=s.schema._prefault)),delete s.schema._prefault,this.seen.get(e).schema}},{key:`emit`,value:function(e,t){var n,r=this,i={cycles:t?.cycles??`ref`,reused:t?.reused??`inline`,external:t?.external??void 0},a=this.seen.get(e);if(!a)throw Error(`Unprocessed schema. This is a bug in Zod.`);var o=function(e){if(!e[1].schema.$ref){var t=e[1],n=function(e){var t=r.target===`draft
107-2020-12`?`$defs`:`definitions`;if(i.external){var n=i.external.registry.get(e[0])?.id,o=i.external.uri??function(e){return e};if(n)return{ref:o(n)};var s=e[1].defId??e[1].schema.id??`schema${r.counter++}`;return e[1].defId=s,{defId:s,ref:`${o(`__shared`)}#/${t}/${s}`}}if(e[1]===a)return{ref:`#`};var c=`#/${t}/`,l=e[1].schema.id??`__schema${r.counter++}`;return{defId:l,ref:c+l}}(e),o=n.ref,s=n.defId;t.def=W({},t.schema),s&&(t.defId=s);var c=t.schema;for(var l in c)delete c[l];c.$ref=o}};if(i.cycles===`throw`){var s,c=U(this.seen.entries());try{for(c.s();!(s=c.n()).done;){var l=s.value[1];if(l.cycle)throw Error(`Cycle detected: #/${l.cycle?.join(`/`)}/<root>
108
109Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}}catch(e){c.e(e)}finally{c.f()}}var u,d=U(this.seen.entries());try{for(d.s();!(u=d.n()).done;){var f,p=u.value,m=p[1];if(e!==p[0]){if(i.external){var h=i.external.registry.get(p[0])?.id;if(e!==p[0]&&h){o(p);continue}}((f=this.metadataRegistry.get(p[0]))!=null&&f.id||m.cycle||m.count>1&&i.reused===`ref`)&&o(p)}else o(p)}}catch(e){d.e(e)}finally{d.f()}var g,_=function(e,t){var n=r.seen.get(e),i=n.def??n.schema,a=W({},i);if(n.ref!==null){var o=n.ref;if(n.ref=null,o){_(o,t);var s=r.seen.get(o).schema;!s.$ref||t.target!==`draft-7`&&t.target!==`draft-4`&&t.target!==`openapi-3.0`?(Object.assign(i,s),Object.assign(i,a)):(i.allOf=i.allOf??[],i.allOf.push(s))}n.isParent||r.override({zodSchema:e,jsonSchema:i,path:n.path??[]})}},v=U(K(this.seen.entries()).reverse());try{for(v.s();!(g=v.n()).done;){var y=g.value;_(y[0],{target:this.target})}}catch(e){v.e(e)}finally{v.f()}var b={};if(this.target===`draft-2020-12`?b.$schema=`https://json-schema.org/draft/2020-12/schema`:this.target===`draft-7`?b.$schema=`http://json-schema.org/draft-07/schema#`:this.target===`draft-4`?b.$schema=`http://json-schema.org/draft-04/schema#`:this.target===`openapi-3.0`||console.warn(`Invalid target: ${this.target}`),(n=i.external)!=null&&n.uri){var x=i.external.registry.get(e)?.id;if(!x)throw Error("Schema is missing an `id` property");b.$id=i.external.uri(x)}Object.assign(b,a.def);var S,C=i.external?.defs??{},w=U(this.seen.entries());try{for(w.s();!(S=w.n()).done;){var T=S.value[1];T.def&&T.defId&&(C[T.defId]=T.def)}}catch(e){w.e(e)}finally{w.f()}i.external||Object.keys(C).length>0&&(this.target===`draft-2020-12`?b.$defs=C:b.definitions=C);try{return JSON.parse(JSON.stringify(b))}catch{throw Error(`Error converting schema to JSON.`)}}}])}();function Aj(e,t){var n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);var r=e._zod.def;switch(r.type){case`string`:case`number`:case`bigint`:case`boolean`:case`date`:case`symbol`:case`undefined`:case`null`:case`any`:case`unknown`:case`never`:case`void`:case`literal`:case`enum`:case`nan`:case`file`:case`template_literal`:case`custom`:case`success`:case`catch`:case`function`:return!1;case`array`:return Aj(r.element,n);case`object`:for(var i in r.shape)if(Aj(r.shape[i],n))return!0;return!1;case`union`:var a,o=U(r.options);try{for(o.s();!(a=o.n()).done;)if(Aj(a.value,n))return!0}catch(e){o.e(e)}finally{o.f()}return!1;case`intersection`:return Aj(r.left,n)||Aj(r.right,n);case`tuple`:var s,c=U(r.items);try{for(c.s();!(s=c.n()).done;)if(Aj(s.value,n))return!0}catch(e){c.e(e)}finally{c.f()}return!(!r.rest||!Aj(r.rest,n));case`record`:case`map`:return Aj(r.keyType,n)||Aj(r.valueType,n);case`set`:return Aj(r.valueType,n);case`promise`:case`optional`:case`nonoptional`:case`nullable`:case`readonly`:case`default`:case`prefault`:return Aj(r.innerType,n);case`lazy`:return Aj(r.getter(),n);case`transform`:return!0;case`pipe`:return Aj(r.in,n)||Aj(r.out,n)}throw Error(`Unknown schema type: ${r.type}`)}var jj=Object.freeze({__proto__:null,endsWith:Sj,gt:dj,gte:fj,includes:bj,length:gj,lowercase:vj,lt:lj,lte:uj,maxLength:mj,maxSize:function(e,t){return new Ok(W(W({check:`max_size`},J(t)),{},{maximum:e}))},mime:function(e,t){return new Uk(W({check:`mime_type`,mime:e},J(t)))},minLength:hj,minSize:function(e,t){return new kk(W(W({check:`min_size`},J(t)),{},{minimum:e}))},multipleOf:pj,negative:function(e){return lj(0,e)},nonnegative:function(e){return fj(0,e)},nonpositive:function(e){return uj(0,e)},normalize:wj,overwrite:Cj,positive:function(e){return dj(0,e)},property:function(e,t,n){return new Hk(W({check:`property`,property:e,schema:t},J(n)))},regex:_j,size:function(e,t){return new Ak(W(W({check:`size_equals`},J(t)),{},{size:e}))},startsWith:xj,toLowerCase:Ej,toUpperCase:Dj,trim:Tj,uppercase:yj}
109),Mj=q(`ZodISODateTime`,function(e,t){sA.init(e,t),rM.init(e,t)});function Nj(e){return function(e,t){return new e(W({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null},J(t)))}(Mj,e)}var Pj=q(`ZodISODate`,function(e,t){cA.init(e,t),rM.init(e,t)});function Fj(e){return function(e,t){return new e(W({type:`string`,format:`date`,check:`string_format`},J(t)))}(Pj,e)}var Ij=q(`ZodISOTime`,function(e,t){lA.init(e,t),rM.init(e,t)});function Lj(e){return function(e,t){return new e(W({type:`string`,format:`time`,check:`string_format`,precision:null},J(t)))}(Ij,e)}var Rj=q(`ZodISODuration`,function(e,t){uA.init(e,t),rM.init(e,t)});function zj(e){return function(e,t){return new e(W({type:`string`,format:`duration`,check:`string_format`},J(t)))}(Rj,e)}var Bj=q(`ZodError`,function(e,t){NO.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:function(t){return function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(e){return e.message},n={_errors:[]},r=function(e){var i,a=U(e.issues);try{for(a.s();!(i=a.n()).done;){var o=i.value;if(o.code===`invalid_union`&&o.errors.length)o.errors.map(function(e){return r({issues:e})});else if(o.code===`invalid_key`)r({issues:o.issues});else if(o.code===`invalid_element`)r({issues:o.issues});else if(o.path.length===0)n._errors.push(t(o));else for(var s=n,c=0;c<o.path.length;){var l=o.path[c];c===o.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(t(o))):s[l]=s[l]||{_errors:[]},s=s[l],c++}}}catch(e){a.e(e)}finally{a.f()}};return r(e),n}(e,t)}},flatten:{value:function(t){return function(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(e){return e.message},r={},i=[],a=U(e.issues);try{for(a.s();!(t=a.n()).done;){var o=t.value;o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(n(o))):i.push(n(o))}}catch(e){a.e(e)}finally{a.f()}return{formErrors:i,fieldErrors:r}}(e,t)}},addIssue:{value:function(t){e.issues.push(t),e.message=JSON.stringify(e.issues,sO,2)}},addIssues:{value:function(t){var n;(n=e.issues).push.apply(n,K(t)),e.message=JSON.stringify(e.issues,sO,2)}},isEmpty:{get:function(){return e.issues.length===0}}})},{Parent:Error}),Vj=FO(Bj),Hj=IO(Bj),Uj=LO(Bj),Wj=zO(Bj),Gj=VO(Bj),Kj=HO(Bj),qj=UO(Bj),Jj=WO(Bj),Yj=GO(Bj),Xj=KO(Bj),Zj=qO(Bj),Qj=JO(Bj),$j=q(`ZodType`,function(e,t){return qk.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=function(){var n=[...arguments];return e.clone(mO(t,{checks:[].concat(K(t.checks??[]),K(n.map(function(e){return typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e})))}))},e.clone=function(t,n){return CO(e,t,n)},e.brand=function(){return e},e.register=function(t,n){return t.add(e,n),e},e.parse=function(t,n){return Vj(e,t,n,{callee:e.parse})},e.safeParse=function(t,n){return Uj(e,t,n)},e.parseAsync=function(){var t=jx(G().m(function t(n,r){return G().w(function(t){for(;;)if(t.n===0)return t.a(2,Hj(e,n,r,{callee:e.parseAsync}))},t)}));return function(e,n){return t.apply(this,arguments)}}(),e.safeParseAsync=function(){var t=jx(G().m(function t(n,r){return G().w(function(t){for(;;)if(t.n===0)return t.a(2,Wj(e,n,r))},t)}));return function(e,n){return t.apply(this,arguments)}}(),e.spa=e.safeParseAsync,e.encode=function(t,n){return Gj(e,t,n)},e.decode=function(t,n){return Kj(e,t,n)},e.encodeAsync=function(){var t=jx(G().m(function t(n,r){return G().w(function(t){for(;;)if(t.n===0)return t.a(2,qj(e,n,r))},t)}));return function(e,n){return t.apply(this,arguments)}}(),e.decodeAsync=function(){var t=jx(G().m(function t(n,r){return G().w(function(t){for(;;)if(t.n===0)return t.a(2,Jj(e,n,r))},t)}));return function(e,n){return t.apply(this,arguments)}}(),e.safeEncode=function(t,n){return Yj(e,t,n)},e.safeDecode=function(t,n){return Xj(e,t,n)},e.safeEncodeAsync=function(){var t=jx(G().m(function t(n,r){return G().w(function(t){for(;;)if(t.n===0)return t.a(2,Zj(e,n,r))},t)}));return function(e,n){return t.apply(this,arguments)}}(),e.safeDecodeAsync=function(){var t=jx(G().m(function t(n,r){return G().w(function(t){for(;;)if(t.n===0)return t.a(2,Qj(e,n,r))},t)}));return function(e,n){return t.apply(this,arguments)}}(),e.refine=function(t,n){return e.check(function(e){return function(e,t,n){return new e(W({type:`custom`,check:`custom`,fn:t},J(n)))}(dN,e,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{})}(t,n))},e.superRefine=function(t){return e.check(Oj(t))},e.overwrite=function(t){return e.check(Cj(t))}
109,e.optional=function(){return QM(e)},e.nullable=function(){return eN(e)},e.nullish=function(){return QM(eN(e))},e.nonoptional=function(t){return function(e,t){return new rN(W({type:`nonoptional`,innerType:e},J(t)))}(e,t)},e.array=function(){return IM(e)},e.or=function(t){return VM([e,t])},e.and=function(t){return new UM({type:`intersection`,left:e,right:t})},e.transform=function(t){return oN(e,new XM({type:`transform`,transform:t}))},e.default=function(t){return n=t,new tN({type:`default`,innerType:e,get defaultValue(){return typeof n==`function`?n():bO(n)}});var n},e.prefault=function(t){return n=t,new nN({type:`prefault`,innerType:e,get defaultValue(){return typeof n==`function`?n():bO(n)}});var n},e.catch=function(t){return new iN({type:`catch`,innerType:e,catchValue:typeof(n=t)==`function`?n:function(){return n}});var n},e.pipe=function(t){return oN(e,t)},e.readonly=function(){return new sN({type:`readonly`,innerType:e})},e.describe=function(t){var n=e.clone();return sj.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:function(){return sj.get(e)?.description},configurable:!0}),e.meta=function(){if(arguments.length===0)return sj.get(e);var t=e.clone();return sj.add(t,arguments.length<=0?void 0:arguments[0]),t},e.isOptional=function(){return e.safeParse(void 0).success},e.isNullable=function(){return e.safeParse(null).success},e}),eM=q(`_ZodString`,function(e,t){Jk.init(e,t),$j.init(e,t);var n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=function(){return e.check(_j.apply(jj,arguments))},e.includes=function(){return e.check(bj.apply(jj,arguments))},e.startsWith=function(){return e.check(xj.apply(jj,arguments))},e.endsWith=function(){return e.check(Sj.apply(jj,arguments))},e.min=function(){return e.check(hj.apply(jj,arguments))},e.max=function(){return e.check(mj.apply(jj,arguments))},e.length=function(){return e.check(gj.apply(jj,arguments))},e.nonempty=function(){var t=[...arguments];return e.check(hj.apply(jj,[1].concat(t)))},e.lowercase=function(t){return e.check(vj(t))},e.uppercase=function(t){return e.check(yj(t))},e.trim=function(){return e.check(Tj())},e.normalize=function(){return e.check(wj.apply(jj,arguments))},e.toLowerCase=function(){return e.check(Ej())},e.toUpperCase=function(){return e.check(Dj())}}),tM=q(`ZodString`,function(e,t){Jk.init(e,t),eM.init(e,t),e.email=function(t){return e.check(function(e,t){return new e(W({type:`string`,format:`email`,check:`string_format`,abort:!1},J(t)))}(iM,t))},e.url=function(t){return e.check(function(e,t){return new e(W({type:`string`,format:`url`,check:`string_format`,abort:!1},J(t)))}(sM,t))},e.jwt=function(t){return e.check(function(e,t){return new e(W({type:`string`,format:`jwt`,check:`string_format`,abort:!1},J(t)))}(SM,t))},e.emoji=function(t){return e.check(function(e,t){return new e(W({type:`string`,format:`emoji`,check:`string_format`,abort:!1},J(t)))}(cM,t))},e.guid=function(t){return e.check(cj(aM,t))},e.uuid=function(t){return e.check(function(e,t){return new e(W({type:`string`,format:`uuid`,check:`string_format`,abort:!1},J(t)))}(oM,t))},e.uuidv4=function(t){return e.check(function(e,t){return new e(W({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`},J(t)))}(oM,t))},e.uuidv6=function(t){return e.check(function(e,t){return new e(W({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`},J(t)))}(oM,t))},e.uuidv7=function(t){return e.check(function(e,t){return new e(W({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`},J(t)))}(oM,t))},e.nanoid=function(t){return e.check(function(e,t){return new e(W({type:`string`,format:`nanoid`,check:`string_format`,abort:!1},J(t)))}(lM,t))},e.guid=function(t){return e.check(cj(aM,t))},e.cuid=function(t){return e.check(function(e,t){return new e(W({type:`string`,format:`cuid`,check:`string_format`,abort:!1},J(t)))}(uM,t))},e.cuid2=function(t){return e.check(function(e,t){return new e(W({type:`string`,format:`cuid2`,check:`string_format`,abort:!1},J(t)))}(dM,t))},e.ulid=function(t){return e.check(function(e,t){return new e(W({type:`string`,format:`ulid`,check:`string_format`,abort:!1},J(t)))}(fM,t))},e.base64=function(t){return e.check(function(e,t){return new e(W({type:`string`,format:`base64`,check:`string_format`,abort:!1},J(t)))}(yM,t))},e.base64url=function(t){return e.check(function(e,t){return new e(W({type:`string`,format:`base64url`,check:`string_format`,abort:!1},J(t)))}(bM,t))},e.xid=function(t){return e.check(function(e,t){return new e(W({type:`string`,format:`xid`,check:`string_format`,abort:!1},J(t)))}(pM,t))},e.ksuid=function(t){return e.check(function(e,t){return new e(W({type:`string`,format:`ksui
109d`,check:`string_format`,abort:!1},J(t)))}(mM,t))},e.ipv4=function(t){return e.check(function(e,t){return new e(W({type:`string`,format:`ipv4`,check:`string_format`,abort:!1},J(t)))}(hM,t))},e.ipv6=function(t){return e.check(function(e,t){return new e(W({type:`string`,format:`ipv6`,check:`string_format`,abort:!1},J(t)))}(gM,t))},e.cidrv4=function(t){return e.check(function(e,t){return new e(W({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1},J(t)))}(_M,t))},e.cidrv6=function(t){return e.check(function(e,t){return new e(W({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1},J(t)))}(vM,t))},e.e164=function(t){return e.check(function(e,t){return new e(W({type:`string`,format:`e164`,check:`string_format`,abort:!1},J(t)))}(xM,t))},e.datetime=function(t){return e.check(Nj(t))},e.date=function(t){return e.check(Fj(t))},e.time=function(t){return e.check(Lj(t))},e.duration=function(t){return e.check(zj(t))}});function nM(e){return function(e,t){return new e(W({type:`string`},J(t)))}(tM,e)}var rM=q(`ZodStringFormat`,function(e,t){Yk.init(e,t),eM.init(e,t)}),iM=q(`ZodEmail`,function(e,t){Qk.init(e,t),rM.init(e,t)}),aM=q(`ZodGUID`,function(e,t){Xk.init(e,t),rM.init(e,t)}),oM=q(`ZodUUID`,function(e,t){Zk.init(e,t),rM.init(e,t)}),sM=q(`ZodURL`,function(e,t){$k.init(e,t),rM.init(e,t)}),cM=q(`ZodEmoji`,function(e,t){eA.init(e,t),rM.init(e,t)}),lM=q(`ZodNanoID`,function(e,t){tA.init(e,t),rM.init(e,t)}),uM=q(`ZodCUID`,function(e,t){nA.init(e,t),rM.init(e,t)}),dM=q(`ZodCUID2`,function(e,t){rA.init(e,t),rM.init(e,t)}),fM=q(`ZodULID`,function(e,t){iA.init(e,t),rM.init(e,t)}),pM=q(`ZodXID`,function(e,t){aA.init(e,t),rM.init(e,t)}),mM=q(`ZodKSUID`,function(e,t){oA.init(e,t),rM.init(e,t)}),hM=q(`ZodIPv4`,function(e,t){dA.init(e,t),rM.init(e,t)}),gM=q(`ZodIPv6`,function(e,t){fA.init(e,t),rM.init(e,t)}),_M=q(`ZodCIDRv4`,function(e,t){pA.init(e,t),rM.init(e,t)}),vM=q(`ZodCIDRv6`,function(e,t){mA.init(e,t),rM.init(e,t)}),yM=q(`ZodBase64`,function(e,t){gA.init(e,t),rM.init(e,t)}),bM=q(`ZodBase64URL`,function(e,t){_A.init(e,t),rM.init(e,t)}),xM=q(`ZodE164`,function(e,t){vA.init(e,t),rM.init(e,t)}),SM=q(`ZodJWT`,function(e,t){yA.init(e,t),rM.init(e,t)}),CM=q(`ZodNumber`,function(e,t){bA.init(e,t),$j.init(e,t),e.gt=function(t,n){return e.check(dj(t,n))},e.gte=function(t,n){return e.check(fj(t,n))},e.min=function(t,n){return e.check(fj(t,n))},e.lt=function(t,n){return e.check(lj(t,n))},e.lte=function(t,n){return e.check(uj(t,n))},e.max=function(t,n){return e.check(uj(t,n))},e.int=function(t){return e.check(EM(t))},e.safe=function(t){return e.check(EM(t))},e.positive=function(t){return e.check(dj(0,t))},e.nonnegative=function(t){return e.check(fj(0,t))},e.negative=function(t){return e.check(lj(0,t))},e.nonpositive=function(t){return e.check(uj(0,t))},e.multipleOf=function(t,n){return e.check(pj(t,n))},e.step=function(t,n){return e.check(pj(t,n))},e.finite=function(){return e};var n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function wM(e){return function(e,t){return new e(W({type:`number`,checks:[]},J(t)))}(CM,e)}var TM=q(`ZodNumberFormat`,function(e,t){xA.init(e,t),CM.init(e,t)});function EM(e){return function(e,t){return new e(W({type:`number`,check:`number_format`,abort:!1,format:`safeint`},J(t)))}(TM,e)}var DM=q(`ZodBoolean`,function(e,t){SA.init(e,t),$j.init(e,t)});function OM(e){return function(e,t){return new e(W({type:`boolean`},J(t)))}(DM,e)}var kM=q(`ZodNull`,function(e,t){CA.init(e,t),$j.init(e,t)});function AM(e){return function(e,t){return new e(W({type:`null`},J(t)))}(kM,e)}var jM=q(`ZodUnknown`,function(e,t){wA.init(e,t),$j.init(e,t)});function MM(){return new jM({type:`unknown`})}var NM=q(`ZodNever`,function(e,t){TA.init(e,t),$j.init(e,t)});function PM(e){return function(e,t){return new e(W({type:`never`},J(t)))}(NM,e)}var FM=q(`ZodArray`,function(e,t){DA.init(e,t),$j.init(e,t),e.element=t.element,e.min=function(t,n){return e.check(hj(t,n))},e.nonempty=function(t){return e.check(hj(1,t))},e.max=function(t,n){return e.check(mj(t,n))}
109,e.length=function(t,n){return e.check(gj(t,n))},e.unwrap=function(){return e.element}});function IM(e,t){return function(e,t,n){return new e(W({type:`array`,element:t},J(n)))}(FM,e,t)}var LM=q(`ZodObject`,function(e,t){MA.init(e,t),$j.init(e,t),fO(e,`shape`,function(){return t.shape}),e.keyof=function(){return qM(Object.keys(e._zod.def.shape))},e.catchall=function(t){return e.clone(W(W({},e._zod.def),{},{catchall:t}))},e.passthrough=function(){return e.clone(W(W({},e._zod.def),{},{catchall:MM()}))},e.loose=function(){return e.clone(W(W({},e._zod.def),{},{catchall:MM()}))},e.strict=function(){return e.clone(W(W({},e._zod.def),{},{catchall:PM()}))},e.strip=function(){return e.clone(W(W({},e._zod.def),{},{catchall:void 0}))},e.extend=function(t){return function(e,t){if(!yO(t))throw Error(`Invalid input to extend: expected a plain object`);var n=e._zod.def.checks;if(n&&n.length>0)throw Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");return CO(e,mO(e._zod.def,{get shape(){var n=W(W({},e._zod.def.shape),t);return pO(this,`shape`,n),n},checks:[]}))}(e,t)},e.safeExtend=function(t){return function(e,t){if(!yO(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return CO(e,W(W({},e._zod.def),{},{get shape(){var n=W(W({},e._zod.def.shape),t);return pO(this,`shape`,n),n},checks:e._zod.def.checks}))}(e,t)},e.merge=function(t){return function(e,t){return CO(e,mO(e._zod.def,{get shape(){var n=W(W({},e._zod.def.shape),t._zod.def.shape);return pO(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}(e,t)},e.pick=function(t){return function(e,t){var n=e._zod.def;return CO(e,mO(e._zod.def,{get shape(){var e={};for(var r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return pO(this,`shape`,e),e},checks:[]}))}(e,t)},e.omit=function(t){return function(e,t){var n=e._zod.def;return CO(e,mO(e._zod.def,{get shape(){var r=W({},e._zod.def.shape);for(var i in t){if(!(i in n.shape))throw Error(`Unrecognized key: "${i}"`);t[i]&&delete r[i]}return pO(this,`shape`,r),r},checks:[]}))}(e,t)},e.partial=function(){return function(e,t,n){return CO(t,mO(t._zod.def,{get shape(){var r=t._zod.def.shape,i=W({},r);if(n)for(var a in n){if(!(a in r))throw Error(`Unrecognized key: "${a}"`);n[a]&&(i[a]=e?new e({type:`optional`,innerType:r[a]}):r[a])}else for(var o in r)i[o]=e?new e({type:`optional`,innerType:r[o]}):r[o];return pO(this,`shape`,i),i},checks:[]}))}(ZM,e,arguments.length<=0?void 0:arguments[0])},e.required=function(){return function(e,t,n){return CO(t,mO(t._zod.def,{get shape(){var r=t._zod.def.shape,i=W({},r);if(n)for(var a in n){if(!(a in i))throw Error(`Unrecognized key: "${a}"`);n[a]&&(i[a]=new e({type:`nonoptional`,innerType:r[a]}))}else for(var o in r)i[o]=new e({type:`nonoptional`,innerType:r[o]});return pO(this,`shape`,i),i},checks:[]}))}(rN,e,arguments.length<=0?void 0:arguments[0])}});function RM(e,t){return new LM(W({type:`object`,shape:e??{}},J(t)))}function zM(e,t){return new LM(W({type:`object`,shape:e,catchall:PM()},J(t)))}var BM=q(`ZodUnion`,function(e,t){PA.init(e,t),$j.init(e,t),e.options=t.options});function VM(e,t){return new BM(W({type:`union`,options:e},J(t)))}var HM=q(`ZodDiscriminatedUnion`,function(e,t){BM.init(e,t),FA.init(e,t)}),UM=q(`ZodIntersection`,function(e,t){IA.init(e,t),$j.init(e,t)}),WM=q(`ZodRecord`,function(e,t){zA.init(e,t),$j.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function GM(e,t,n){return new WM(W({type:`record`,keyType:e,valueType:t},J(n)))}var KM=q(`ZodEnum`,function(e,t){BA.init(e,t),$j.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);var n=new Set(Object.keys(t.entries));e.extract=function(e,r){var i,a={},o=U(e);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(!n.has(s))throw Error(`Key ${s} not found in enum`);a[s]=t.entries[s]}}catch(e){o.e(e)}finally{o.f()}return new KM(W(W(W({},t),{},{checks:[]},J(r)),{},{entries:a}))},e.exclude=function(e,r){var i,a=W({},t.entries),o=U(e);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(!n.has(s))throw Error(`Key ${s} not found in enum`);delete a[s]}}catch(e){o.e(e)}finally{o.f()}return new KM(W(W(W({},t),{},{checks:[]},J(r)),{},{entries:a}))}});function qM(e,t){return new KM(W({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(function(e){return[e,e]})):e},J(t)))}var JM=q(`ZodLiteral`,function(e,t){VA.init(e,t),$j.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get:function(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function YM(e,t){return new JM(W({type:`literal`,values:Array.isArray(e)?e:[e]},J(t)))}var XM=q(`ZodTransform`,function(e,t){HA.init(e,t),$j.init(e,t),e._zod.parse=function(n,r){if(r.direction===`backward`)throw new rO(e.constructor.name);n.addIssue=function(r){if(typeof r==`string`)n.issues.push(jO(r,n.value,t));else{var i=r;i.fatal&&(i.continue=!1),i.code??=`custom`,i.input??=n.value,i.inst??=e,n.issues.push(jO(i))}};
109var i=t.transform(n.value,n);return i instanceof Promise?i.then(function(e){return n.value=e,n}):(n.value=i,n)}}),ZM=q(`ZodOptional`,function(e,t){WA.init(e,t),$j.init(e,t),e.unwrap=function(){return e._zod.def.innerType}});function QM(e){return new ZM({type:`optional`,innerType:e})}var $M=q(`ZodNullable`,function(e,t){GA.init(e,t),$j.init(e,t),e.unwrap=function(){return e._zod.def.innerType}});function eN(e){return new $M({type:`nullable`,innerType:e})}var tN=q(`ZodDefault`,function(e,t){KA.init(e,t),$j.init(e,t),e.unwrap=function(){return e._zod.def.innerType},e.removeDefault=e.unwrap}),nN=q(`ZodPrefault`,function(e,t){JA.init(e,t),$j.init(e,t),e.unwrap=function(){return e._zod.def.innerType}}),rN=q(`ZodNonOptional`,function(e,t){YA.init(e,t),$j.init(e,t),e.unwrap=function(){return e._zod.def.innerType}}),iN=q(`ZodCatch`,function(e,t){ZA.init(e,t),$j.init(e,t),e.unwrap=function(){return e._zod.def.innerType},e.removeCatch=e.unwrap}),aN=q(`ZodPipe`,function(e,t){QA.init(e,t),$j.init(e,t),e.in=t.in,e.out=t.out});function oN(e,t){return new aN({type:`pipe`,in:e,out:t})}var sN=q(`ZodReadonly`,function(e,t){ej.init(e,t),$j.init(e,t),e.unwrap=function(){return e._zod.def.innerType}}),cN=q(`ZodLazy`,function(e,t){nj.init(e,t),$j.init(e,t),e.unwrap=function(){return e._zod.def.getter()}}),lN,uN,dN=q(`ZodCustom`,function(e,t){rj.init(e,t),$j.init(e,t)});function fN(e,t){return function(e,t,n){var r=J(n);return r.abort??=!0,new e(W({type:`custom`,check:`custom`,fn:t},r))}(dN,e??function(){return!0},t)}function pN(e){var t=new dN(W({type:`custom`,check:`custom`,fn:function(t){return t instanceof e},abort:!0},J(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{error:`Input not instance of ${e.name}`})));return t._zod.bag.Class=e,t}(function(e){e.assertEqual=function(e){},e.assertIs=function(e){},e.assertNever=function(e){throw Error()},e.arrayToEnum=function(e){var t,n={},r=U(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;n[i]=i}}catch(e){r.e(e)}finally{r.f()}return n},e.getValidEnumValues=function(t){var n,r=e.objectKeys(t).filter(function(e){return typeof t[t[e]]!=`number`}),i={},a=U(r);try{for(a.s();!(n=a.n()).done;){var o=n.value;i[o]=t[o]}}catch(e){a.e(e)}finally{a.f()}return e.objectValues(i)},e.objectValues=function(t){return e.objectKeys(t).map(function(e){return t[e]})},e.objectKeys=typeof Object.keys==`function`?function(e){return Object.keys(e)}:function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=function(e,t){var n,r=U(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(t(i))return i}}catch(e){r.e(e)}finally{r.f()}},e.isInteger=typeof Number.isInteger==`function`?function(e){return Number.isInteger(e)}:function(e){return typeof e==`number`&&Number.isFinite(e)&&Math.floor(e)===e},e.joinValues=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:` | `;return e.map(function(e){return typeof e==`string`?`'${e}'`:e}).join(t)},e.jsonStringifyReplacer=function(e,t){return typeof t==`bigint`?t.toString():t}})(lN||={}),function(e){e.mergeShapes=function(e,t){return W(W({},e),t)}}(uN||={});var Y=lN.arrayToEnum([`string`,`nan`,`number`,`integer`,`float`,`boolean`,`date`,`bigint`,`symbol`,`function`,`undefined`,`null`,`array`,`object`,`unknown`,`promise`,`void`,`never`,`map`,`set`]),mN=function(e){switch(Kx(e)){case`undefined`:return Y.undefined;case`string`:return Y.string;case`number`:return Number.isNaN(e)?Y.nan:Y.number;case`boolean`:return Y.boolean;case`function`:return Y.function;case`bigint`:return Y.bigint;case`symbol`:return Y.symbol;case`object`:return Array.isArray(e)?Y.array:e===null?Y.null:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?Y.promise:typeof Map<`u`&&e instanceof Map?Y.map:typeof Set<`u`&&e instanceof Set?Y.set:typeof Date<`u`&&e instanceof Date?Y.date:Y.object;default:return Y.unknown}},X=lN.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`]),hN=function(){function e(t){var n;V(this,e),(n=Mx(this,e)).issues=[],n.addIssue=function(e){n.issues=[].concat(K(n.issues),[e])},n.addIssues=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];n.issues=[].concat(K(n.issues),K(e))};var r=(this instanceof e?this.constructor:void 0).prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,r):n.__proto__=r,n.name=`ZodError`,n.issues=t,n}return Rx(e,Jx(Error)),H(e,[{key:`errors`,get:function(){return this.issues}},{key:`format`,value:function(e){var t=e||function(e){return e.message},n={_errors:[]},r=function(e){var i,a=U(e.issues);try{for(a.s();!(i=a.n()).done;){var o=i.value;
109if(o.code===`invalid_union`)o.unionErrors.map(r);else if(o.code===`invalid_return_type`)r(o.returnTypeError);else if(o.code===`invalid_arguments`)r(o.argumentsError);else if(o.path.length===0)n._errors.push(t(o));else for(var s=n,c=0;c<o.path.length;){var l=o.path[c];c===o.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(t(o))):s[l]=s[l]||{_errors:[]},s=s[l],c++}}}catch(e){a.e(e)}finally{a.f()}};return r(this),n}},{key:`toString`,value:function(){return this.message}},{key:`message`,get:function(){return JSON.stringify(this.issues,lN.jsonStringifyReplacer,2)}},{key:`isEmpty`,get:function(){return this.issues.length===0}},{key:`flatten`,value:function(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(e){return e.message},n=Object.create(null),r=[],i=U(this.issues);try{for(i.s();!(e=i.n()).done;){var a=e.value;if(a.path.length>0){var o=a.path[0];n[o]=n[o]||[],n[o].push(t(a))}else r.push(t(a))}}catch(e){i.e(e)}finally{i.f()}return{formErrors:r,fieldErrors:n}}},{key:`formErrors`,get:function(){return this.flatten()}}],[{key:`assert`,value:function(t){if(!(t instanceof e))throw Error(`Not a ZodError: ${t}`)}}])}();hN.create=function(e){return new hN(e)};var gN=function(e,t){var n;switch(e.code){case X.invalid_type:n=e.received===Y.undefined?`Required`:`Expected ${e.expected}, received ${e.received}`;break;case X.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,lN.jsonStringifyReplacer)}`;break;case X.unrecognized_keys:n=`Unrecognized key(s) in object: ${lN.joinValues(e.keys,`, `)}`;break;case X.invalid_union:n=`Invalid input`;break;case X.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${lN.joinValues(e.options)}`;break;case X.invalid_enum_value:n=`Invalid enum value. Expected ${lN.joinValues(e.options)}, received '${e.received}'`;break;case X.invalid_arguments:n=`Invalid function arguments`;break;case X.invalid_return_type:n=`Invalid function return type`;break;case X.invalid_date:n=`Invalid date`;break;case X.invalid_string:Kx(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}"`:lN.assertNever(e.validation):n=e.validation===`regex`?`Invalid`:`Invalid ${e.validation}`;break;case X.too_small:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at least`:`more than`} ${e.minimum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at least`:`over`} ${e.minimum} character(s)`:e.type===`number`||e.type===`bigint`?`Number must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${e.minimum}`:e.type===`date`?`Date must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${new Date(Number(e.minimum))}`:`Invalid input`;break;case X.too_big:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at most`:`less than`} ${e.maximum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at most`:`under`} ${e.maximum} character(s)`:e.type===`number`?`Number must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`bigint`?`BigInt must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`date`?`Date must be ${e.exact?`exactly`:e.inclusive?`smaller than or equal to`:`smaller than`} ${new Date(Number(e.maximum))}`:`Invalid input`;break;case X.custom:n=`Invalid input`;break;case X.invalid_intersection_types:n=`Intersection results could not be merged`;break;case X.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case X.not_finite:n=`Number must be finite`;break;default:n=t.defaultError,lN.assertNever(e)}return{message:n}},_N=gN;function vN(){return _N}var yN=function(e){var t=e.data,n=e.path,r=e.errorMaps,i=e.issueData,a=[].concat(K(n),K(i.path||[])),o=W(W({},i),{},{path:a});if(i.message!==void 0)return W(W({},i),{},{path:a,message:i.message});var s,c=``,l=U(r.filter(function(e){return!!e}).slice().reverse());try{for(l.s();!(s=l.n()).done;)c=(0,s.value)(o,{data:t,defaultError:c}).message}catch(e){l.e(e)}finally{l.f()}return W(W({},i),{},{path:a,message:c})};function Z(e,t){var n=vN(),r=yN({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===gN?void 0:gN].filter(function(e){return!!e})});e.common.issues.push(r)}var Q,bN=function(){function e(){V(this,e),this.value=`valid`}return H(e,[{key:`dirty`,value:function(){this.value===`valid`&&(this.value=`dirty`)}},{key:`abort`,value:function(){this.value!==`aborted`&&(this.value=`aborted`)}}],[{key:`mergeArray`,value:function(e,t){var n,r=[],i=U(t);try{for(i.s();!(n=i.n()).done;){var a=n.value;if(a.status===`aborted`)return xN;a.status===`dirty`&&e.dirty(),r.push(a.value)}}catch(e){i.e(e)}finally{i.f()}return{status:e.value,value:r}}},{key:`mergeObjectAsync`,value:(t=jx(G().m(function t(n,r){var i,a,o,s,c,l,u;return G().w(function(t){for(;;)switch(t.p=t.n){case 0:i=[],a=U(r),t.p=1,a.s();case 2:if((o=a.n()).done){t.n=6;break}return s=o.value,t.n=3,s.key;case 3:return c=t.v,t.n=4,s.value;case 4:l=t.v,i.push({key:c,value:l});case 5:t.n=2;break;case 6:t.n=8;break;case 7:t.p=7,u=t.v,a.e(u);case 8:return t.p=8,a.f(),t.f(8);case 9:return t.a(2,e.mergeObjectSync(n,i))}},t,null,[[1,7,8,9]])})),function(e,n){return t.apply(this,arguments)})},{key:`mergeObjectSync`,value:function(e,t){var n,r={},i=U(t);try{for(i.s();!(n=i.n()).done;){var a=n.value,o=a.key,s=a.value;if(o.status===`aborted`||s.status===`aborted`)return xN;o.status===`dirty`&&e.dirty(),s.status===`dirty`&&e.dirty(),o.value===`__proto__`||s.value===void 0&&!a.alwaysSet||(r[o.value]=s.value)}}catch(e){i.e(e)}finally{i.f()}return{status:e.value,value:r}}}]);var t}(),xN=Object.freeze({status:`aborted`}),SN=function(e){return{status:`dirty`,value:e}},CN=function(e){return{status:`valid`,value:e}},wN=function(e){return e.status===`aborted`},TN=function(e){return e.status===`dirty`},EN=function(e){return e.status===`valid`},DN=function(e){return typeof Promise<`u`&&e instanceof Promise};(function(e){e.errToObj=function(e){return typeof e==`string`?{message:e}:e||{}},e.toString=function(e){return typeof e==`string`?e:e?.message}})(Q||={});var ON=function(){return H(function e(t,n,r,i){V(this,e),this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i},[{key:`path`,get:function(){var e,t;return this._cachedPath.length||(Array.isArray(this._key)?(e=this._cachedPath).push.apply(e,K(this._path).concat(K(this._key))):(t=this._cachedPath).push.apply(t,K(this._path).concat([this._key]))),this._cachedPath}}])}(),kN=function(e,t){if(EN(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error(`Validation failed but no issues detected.`);return{success:!1,get error(){if(this._error)return this._error;var t=new hN(e.common.issues);return this._error=t,this._error}}};function AN(e){if(!e)return{};var t=e.errorMap,n=e.invalid_type_error,r=e.required_error,i=e.description;if(t&&(n||r))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:function(t,i){var a=e.message;
109return t.code===`invalid_enum_value`?{message:a??i.defaultError}:i.data===void 0?{message:a??r??i.defaultError}:t.code===`invalid_type`?{message:a??n??i.defaultError}:{message:i.defaultError}},description:i}}var jN,MN=function(){return H(function e(t){var n=this;V(this,e),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:function(e){return n[`~validate`](e)}}},[{key:`description`,get:function(){return this._def.description}},{key:`_getType`,value:function(e){return mN(e.data)}},{key:`_getOrReturnCtx`,value:function(e,t){return t||{common:e.parent.common,data:e.data,parsedType:mN(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}},{key:`_processInputParams`,value:function(e){return{status:new bN,ctx:{common:e.parent.common,data:e.data,parsedType:mN(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}},{key:`_parseSync`,value:function(e){var t=this._parse(e);if(DN(t))throw Error(`Synchronous parse encountered promise.`);return t}},{key:`_parseAsync`,value:function(e){var t=this._parse(e);return Promise.resolve(t)}},{key:`parse`,value:function(e,t){var n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}},{key:`safeParse`,value:function(e,t){var n,r={common:{issues:[],async:(n=t?.async)!=null&&n,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:mN(e)};return kN(r,this._parseSync({data:e,path:r.path,parent:r}))}},{key:`~validate`,value:function(e){var t={common:{issues:[],async:!!this[`~standard`].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:mN(e)};if(!this[`~standard`].async)try{var n=this._parseSync({data:e,path:[],parent:t});return EN(n)?{value:n.value}:{issues:t.common.issues}}catch(e){var r;e!=null&&(r=e.message)!=null&&(r=r.toLowerCase())!=null&&r.includes(`encountered`)&&(this[`~standard`].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(function(e){return EN(e)?{value:e.value}:{issues:t.common.issues}})}},{key:`parseAsync`,value:(e=jx(G().m(function e(t,n){var r;return G().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.safeParseAsync(t,n);case 1:if(!(r=e.v).success){e.n=2;break}return e.a(2,r.data);case 2:throw r.error;case 3:return e.a(2)}},e,this)})),function(t,n){return e.apply(this,arguments)})},{key:`safeParseAsync`,value:function(){var e=jx(G().m(function e(t,n){var r,i,a;return G().w(function(e){for(;;)switch(e.n){case 0:return r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:mN(t)},i=this._parse({data:t,path:r.path,parent:r}),e.n=1,DN(i)?i:Promise.resolve(i);case 1:return a=e.v,e.a(2,kN(r,a))}},e,this)}));return function(t,n){return e.apply(this,arguments)}}()},{key:`refine`,value:function(e,t){return this._refinement(function(n,r){var i=e(n),a=function(){return r.addIssue(W({code:X.custom},function(e){return typeof t==`string`||t===void 0?{message:t}:typeof t==`function`?t(e):t}(n)))};return typeof Promise<`u`&&i instanceof Promise?i.then(function(e){return!!e||(a(),!1)}):!!i||(a(),!1)})}},{key:`refinement`,value:function(e,t){return this._refinement(function(n,r){return!!e(n)||(r.addIssue(typeof t==`function`?t(n,r):t),!1)})}},{key:`_refinement`,value:function(e){return new NP({schema:this,typeName:$.ZodEffects,effect:{type:`refinement`,refinement:e}})}},{key:`superRefine`,value:function(e){return this._refinement(e)}},{key:`optional`,value:function(){return PP.create(this,this._def)}},{key:`nullable`,value:function(){return FP.create(this,this._def)}},{key:`nullish`,value:function(){return this.nullable().optional()}},{key:`array`,value:function(){return mP.create(this)}},{key:`promise`,value:function(){return MP.create(this,this._def)}},{key:`or`,value:function(e){return _P.create([this,e],this._def)}},{key:`and`,value:function(e){return xP.create(this,e,this._def)}},{key:`transform`,value:function(e){return new NP(W(W({},AN(this._def)),{},{schema:this,typeName:$.ZodEffects,effect:{type:`transform`,transform:e}}))}},{key:`default`,value:function(e){var t=typeof e==`function`?e:function(){return e};return new IP(W(W({},AN(this._def)),{},{innerType:this,defaultValue:t,typeName:$.ZodDefault}))}},{key:`brand`,value:function(){return new zP(W({typeName:$.ZodBranded,type:this},AN(this._def)))}},{key:`catch`,value:function(e){var t=typeof e==`function`?e:function(){return e};
109return new LP(W(W({},AN(this._def)),{},{innerType:this,catchValue:t,typeName:$.ZodCatch}))}},{key:`describe`,value:function(e){return new this.constructor(W(W({},this._def),{},{description:e}))}},{key:`pipe`,value:function(e){return BP.create(this,e)}},{key:`readonly`,value:function(){return VP.create(this)}},{key:`isOptional`,value:function(){return this.safeParse(void 0).success}},{key:`isNullable`,value:function(){return this.safeParse(null).success}}]);var e}(),NN=/^c[^\s-]{8,}$/i,PN=/^[0-9a-z]+$/,FN=/^[0-9A-HJKMNP-TV-Z]{26}$/i,IN=/^[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,LN=/^[a-z0-9_-]{21}$/i,RN=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,zN=/^[-+]?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)?)??$/,BN=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,VN=/^(?:(?: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])$/,HN=/^(?:(?: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])$/,UN=/^(([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]))$/,WN=/^(([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])$/,GN=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,KN=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,qN=`((\\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])))`,JN=RegExp(`^${qN}\$`);function YN(e){var t=`[0-5]\\d`;e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision??(t=`${t}(\\.\\d+)?`);var n=e.precision?`+`:`?`;return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function XN(e){return RegExp(`^${YN(e)}\$`)}function ZN(e){var t=`${qN}T${YN(e)}`,n=[];return n.push(e.local?`Z?`:`Z`),e.offset&&n.push(`([+-]\\d{2}:?\\d{2})`),t=`${t}(${n.join(`|`)})`,RegExp(`^${t}\$`)}function QN(e,t){return!(t!==`v4`&&t||!VN.test(e))||!(t!==`v6`&&t||!UN.test(e))}function $N(e,t){if(!RN.test(e))return!1;try{var n=Wx(e.split(`.`),1)[0];if(!n)return!1;var r=n.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(n.length+(4-n.length%4)%4,`=`),i=JSON.parse(atob(r));return Kx(i)===`object`&&i!==null&&(!(`typ`in i)||i?.typ===`JWT`)&&!!i.alg&&(!t||i.alg===t)}catch{return!1}}function eP(e,t){return!(t!==`v4`&&t||!HN.test(e))||!(t!==`v6`&&t||!WN.test(e))}var tP=function(){function e(){return V(this,e),Mx(this,e,arguments)}return Rx(e,MN),H(e,[{key:`_parse`,value:function(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Y.string){var t=this._getOrReturnCtx(e);return Z(t,{code:X.invalid_type,expected:Y.string,received:t.parsedType}),xN}var n,r=new bN,i=void 0,a=U(this._def.checks);try{for(a.s();!(n=a.n()).done;){var o=n.value;if(o.kind===`min`)e.data.length<o.value&&(Z(i=this._getOrReturnCtx(e,i),{code:X.too_small,minimum:o.value,type:`string`,inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind===`max`)e.data.length>o.value&&(Z(i=this._getOrReturnCtx(e,i),{code:X.too_big,maximum:o.value,type:`string`,inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind===`length`){var s=e.data.length>o.value,c=e.data.length<o.value;
109(s||c)&&(i=this._getOrReturnCtx(e,i),s?Z(i,{code:X.too_big,maximum:o.value,type:`string`,inclusive:!0,exact:!0,message:o.message}):c&&Z(i,{code:X.too_small,minimum:o.value,type:`string`,inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind===`email`)BN.test(e.data)||(Z(i=this._getOrReturnCtx(e,i),{validation:`email`,code:X.invalid_string,message:o.message}),r.dirty());else if(o.kind===`emoji`)jN||=RegExp(`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,`u`),jN.test(e.data)||(Z(i=this._getOrReturnCtx(e,i),{validation:`emoji`,code:X.invalid_string,message:o.message}),r.dirty());else if(o.kind===`uuid`)IN.test(e.data)||(Z(i=this._getOrReturnCtx(e,i),{validation:`uuid`,code:X.invalid_string,message:o.message}),r.dirty());else if(o.kind===`nanoid`)LN.test(e.data)||(Z(i=this._getOrReturnCtx(e,i),{validation:`nanoid`,code:X.invalid_string,message:o.message}),r.dirty());else if(o.kind===`cuid`)NN.test(e.data)||(Z(i=this._getOrReturnCtx(e,i),{validation:`cuid`,code:X.invalid_string,message:o.message}),r.dirty());else if(o.kind===`cuid2`)PN.test(e.data)||(Z(i=this._getOrReturnCtx(e,i),{validation:`cuid2`,code:X.invalid_string,message:o.message}),r.dirty());else if(o.kind===`ulid`)FN.test(e.data)||(Z(i=this._getOrReturnCtx(e,i),{validation:`ulid`,code:X.invalid_string,message:o.message}),r.dirty());else if(o.kind===`url`)try{new URL(e.data)}catch{Z(i=this._getOrReturnCtx(e,i),{validation:`url`,code:X.invalid_string,message:o.message}),r.dirty()}else o.kind===`regex`?(o.regex.lastIndex=0,o.regex.test(e.data)||(Z(i=this._getOrReturnCtx(e,i),{validation:`regex`,code:X.invalid_string,message:o.message}),r.dirty())):o.kind===`trim`?e.data=e.data.trim():o.kind===`includes`?e.data.includes(o.value,o.position)||(Z(i=this._getOrReturnCtx(e,i),{code:X.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind===`toLowerCase`?e.data=e.data.toLowerCase():o.kind===`toUpperCase`?e.data=e.data.toUpperCase():o.kind===`startsWith`?e.data.startsWith(o.value)||(Z(i=this._getOrReturnCtx(e,i),{code:X.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind===`endsWith`?e.data.endsWith(o.value)||(Z(i=this._getOrReturnCtx(e,i),{code:X.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind===`datetime`?ZN(o).test(e.data)||(Z(i=this._getOrReturnCtx(e,i),{code:X.invalid_string,validation:`datetime`,message:o.message}),r.dirty()):o.kind===`date`?JN.test(e.data)||(Z(i=this._getOrReturnCtx(e,i),{code:X.invalid_string,validation:`date`,message:o.message}),r.dirty()):o.kind===`time`?XN(o).test(e.data)||(Z(i=this._getOrReturnCtx(e,i),{code:X.invalid_string,validation:`time`,message:o.message}),r.dirty()):o.kind===`duration`?zN.test(e.data)||(Z(i=this._getOrReturnCtx(e,i),{validation:`duration`,code:X.invalid_string,message:o.message}),r.dirty()):o.kind===`ip`?QN(e.data,o.version)||(Z(i=this._getOrReturnCtx(e,i),{validation:`ip`,code:X.invalid_string,message:o.message}),r.dirty()):o.kind===`jwt`?$N(e.data,o.alg)||(Z(i=this._getOrReturnCtx(e,i),{validation:`jwt`,code:X.invalid_string,message:o.message}),r.dirty()):o.kind===`cidr`?eP(e.data,o.version)||(Z(i=this._getOrReturnCtx(e,i),{validation:`cidr`,code:X.invalid_string,message:o.message}),r.dirty()):o.kind===`base64`?GN.test(e.data)||(Z(i=this._getOrReturnCtx(e,i),{validation:`base64`,code:X.invalid_string,message:o.message}),r.dirty()):o.kind===`base64url`?KN.test(e.data)||(Z(i=this._getOrReturnCtx(e,i),{validation:`base64url`,code:X.invalid_string,message:o.message}),r.dirty()):lN.assertNever(o)}}catch(e){a.e(e)}finally{a.f()}return{status:r.value,value:e.data}}},{key:`_regex`,value:function(e,t,n){return this.refinement(function(t){return e.test(t)},W({validation:t,code:X.invalid_string},Q.errToObj(n)))}},{key:`_addCheck`,value:function(t){return new e(W(W({},this._def),{},{checks:[].concat(K(this._def.checks),[t])}))}},{key:`email`,value:function(e){return this._addCheck(W({kind:`email`},Q.errToObj(e)))}},{key:`url`,value:function(e){return this._addCheck(W({kind:`url`},Q.errToObj(e)))}},{key:`emoji`,value:function(e){return this._addCheck(W({kind:`emoji`},Q.errToObj(e)))}},{key:`uuid`,value:function(e){return this._addCheck(W({kind:`uuid`},Q.errToObj(e)))}},{key:`nanoid`,value:function(e){return this._addCheck(W({kind:`nanoid`},Q.errToObj(e)))}},{key:`cuid`,value:function(e){return this._addCheck(W({kind:`cuid`},Q.errToObj(e)))}},{key:`cuid2`,value:function(e){return this._addCheck(W({kind:`cuid2`},Q.errToObj(e)))}},{key:`ulid`,value:function(e){return this._addCheck(W({kind:`ulid`},Q.errToObj(e)))}},{key:`base64`,value:function(e){return this._addCheck(W({kind:`base64`},Q.errToObj(e)))}},{key:`base64url`,value:function(e){return this._addCheck(W({kind:`base64url`},Q.errToObj(e)))}},{key:`jwt`,value:function(e){return this._addCheck(W({kind:`jwt`},Q.errToObj(e)))}}
109,{key:`ip`,value:function(e){return this._addCheck(W({kind:`ip`},Q.errToObj(e)))}},{key:`cidr`,value:function(e){return this._addCheck(W({kind:`cidr`},Q.errToObj(e)))}},{key:`datetime`,value:function(e){var t,n;return typeof e==`string`?this._addCheck({kind:`datetime`,precision:null,offset:!1,local:!1,message:e}):this._addCheck(W({kind:`datetime`,precision:e?.precision===void 0?null:e?.precision,offset:(t=e?.offset)!=null&&t,local:(n=e?.local)!=null&&n},Q.errToObj(e?.message)))}},{key:`date`,value:function(e){return this._addCheck({kind:`date`,message:e})}},{key:`time`,value:function(e){return typeof e==`string`?this._addCheck({kind:`time`,precision:null,message:e}):this._addCheck(W({kind:`time`,precision:e?.precision===void 0?null:e?.precision},Q.errToObj(e?.message)))}},{key:`duration`,value:function(e){return this._addCheck(W({kind:`duration`},Q.errToObj(e)))}},{key:`regex`,value:function(e,t){return this._addCheck(W({kind:`regex`,regex:e},Q.errToObj(t)))}},{key:`includes`,value:function(e,t){return this._addCheck(W({kind:`includes`,value:e,position:t?.position},Q.errToObj(t?.message)))}},{key:`startsWith`,value:function(e,t){return this._addCheck(W({kind:`startsWith`,value:e},Q.errToObj(t)))}},{key:`endsWith`,value:function(e,t){return this._addCheck(W({kind:`endsWith`,value:e},Q.errToObj(t)))}},{key:`min`,value:function(e,t){return this._addCheck(W({kind:`min`,value:e},Q.errToObj(t)))}},{key:`max`,value:function(e,t){return this._addCheck(W({kind:`max`,value:e},Q.errToObj(t)))}},{key:`length`,value:function(e,t){return this._addCheck(W({kind:`length`,value:e},Q.errToObj(t)))}},{key:`nonempty`,value:function(e){return this.min(1,Q.errToObj(e))}},{key:`trim`,value:function(){return new e(W(W({},this._def),{},{checks:[].concat(K(this._def.checks),[{kind:`trim`}])}))}},{key:`toLowerCase`,value:function(){return new e(W(W({},this._def),{},{checks:[].concat(K(this._def.checks),[{kind:`toLowerCase`}])}))}},{key:`toUpperCase`,value:function(){return new e(W(W({},this._def),{},{checks:[].concat(K(this._def.checks),[{kind:`toUpperCase`}])}))}},{key:`isDatetime`,get:function(){return!!this._def.checks.find(function(e){return e.kind===`datetime`})}},{key:`isDate`,get:function(){return!!this._def.checks.find(function(e){return e.kind===`date`})}},{key:`isTime`,get:function(){return!!this._def.checks.find(function(e){return e.kind===`time`})}},{key:`isDuration`,get:function(){return!!this._def.checks.find(function(e){return e.kind===`duration`})}}
109,{key:`isEmail`,get:function(){return!!this._def.checks.find(function(e){return e.kind===`email`})}},{key:`isURL`,get:function(){return!!this._def.checks.find(function(e){return e.kind===`url`})}},{key:`isEmoji`,get:function(){return!!this._def.checks.find(function(e){return e.kind===`emoji`})}},{key:`isUUID`,get:function(){return!!this._def.checks.find(function(e){return e.kind===`uuid`})}},{key:`isNANOID`,get:function(){return!!this._def.checks.find(function(e){return e.kind===`nanoid`})}},{key:`isCUID`,get:function(){return!!this._def.checks.find(function(e){return e.kind===`cuid`})}},{key:`isCUID2`,get:function(){return!!this._def.checks.find(function(e){return e.kind===`cuid2`})}},{key:`isULID`,get:function(){return!!this._def.checks.find(function(e){return e.kind===`ulid`})}},{key:`isIP`,get:function(){return!!this._def.checks.find(function(e){return e.kind===`ip`})}},{key:`isCIDR`,get:function(){return!!this._def.checks.find(function(e){return e.kind===`cidr`})}},{key:`isBase64`,get:function(){return!!this._def.checks.find(function(e){return e.kind===`base64`})}},{key:`isBase64url`,get:function(){return!!this._def.checks.find(function(e){return e.kind===`base64url`})}},{key:`minLength`,get:function(){var e,t=null,n=U(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.kind===`min`&&(t===null||r.value>t)&&(t=r.value)}}catch(e){n.e(e)}finally{n.f()}return t}},{key:`maxLength`,get:function(){var e,t=null,n=U(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.kind===`max`&&(t===null||r.value<t)&&(t=r.value)}}catch(e){n.e(e)}finally{n.f()}return t}}])}();function nP(e,t){var n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(`.`,``))%Number.parseInt(t.toFixed(i).replace(`.`,``))/10**i}tP.create=function(e){var t;return new tP(W({checks:[],typeName:$.ZodString,coerce:(t=e?.coerce)!=null&&t},AN(e)))};var rP=function(){function e(){var t;return V(this,e),(t=Mx(this,e,arguments)).min=t.gte,t.max=t.lte,t.step=t.multipleOf,t}return Rx(e,MN),H(e,[{key:`_parse`,value:function(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Y.number){var t=this._getOrReturnCtx(e);return Z(t,{code:X.invalid_type,expected:Y.number,received:t.parsedType}),xN}var n,r=void 0,i=new bN,a=U(this._def.checks);try{for(a.s();!(n=a.n()).done;){var o=n.value;o.kind===`int`?lN.isInteger(e.data)||(Z(r=this._getOrReturnCtx(e,r),{code:X.invalid_type,expected:`integer`,received:`float`,message:o.message}),i.dirty()):o.kind===`min`?(o.inclusive?e.data<o.value:e.data<=o.value)&&(Z(r=this._getOrReturnCtx(e,r),{code:X.too_small,minimum:o.value,type:`number`,inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind===`max`?(o.inclusive?e.data>o.value:e.data>=o.value)&&(Z(r=this._getOrReturnCtx(e,r),{code:X.too_big,maximum:o.value,type:`number`,inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind===`multipleOf`?nP(e.data,o.value)!==0&&(Z(r=this._getOrReturnCtx(e,r),{code:X.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind===`finite`?Number.isFinite(e.data)||(Z(r=this._getOrReturnCtx(e,r),{code:X.not_finite,message:o.message}),i.dirty()):lN.assertNever(o)}}catch(e){a.e(e)}finally{a.f()}return{status:i.value,value:e.data}}},{key:`gte`,value:function(e,t){return this.setLimit(`min`,e,!0,Q.toString(t))}},{key:`gt`,value:function(e,t){return this.setLimit(`min`,e,!1,Q.toString(t))}},{key:`lte`,value:function(e,t){return this.setLimit(`max`,e,!0,Q.toString(t))}},{key:`lt`,value:function(e,t){return this.setLimit(`max`,e,!1,Q.toString(t))}},{key:`setLimit`,value:function(t,n,r,i){return new e(W(W({},this._def),{},{checks:[].concat(K(this._def.checks),[{kind:t,value:n,inclusive:r,message:Q.toString(i)}])}))}},{key:`_addCheck`,value:function(t){return new e(W(W({},this._def),{},{checks:[].concat(K(this._def.checks),[t])}))}},{key:`int`,value:function(e){return this._addCheck({kind:`int`,message:Q.toString(e)})}},{key:`positive`,value:function(e){return this._addCheck({kind:`min`,value:0,inclusive:!1,message:Q.toString(e)})}},{key:`negative`,value:function(e){return this._addCheck({kind:`max`,value:0,inclusive:!1,message:Q.toString(e)})}},{key:`nonpositive`,value:function(e){return this._addCheck({kind:`max`,value:0,inclusive:!0,message:Q.toString(e)})}},{key:`nonnegative`,value:function(e){return this._addCheck({kind:`min`,value:0,inclusive:!0,message:Q.toString(e)})}},{key:`multipleOf`,value:function(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:Q.toString(t)})}},{key:`finite`,value:function(e){return this._addCheck({kind:`finite`,message:Q.toString(e)})}},{key:`safe`,value:function(e){return this._addCheck({kind:`min`,inclusive:!0,value:-(2**53-1),message:Q.toString(e)})._addCheck({kind:`max`,inclusive:!0,value:2**53-1,message:Q.toString(e)})}},{key:`minValue`,get:function(){var e,t=null,n=U(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.kind===`min`&&(t===null||r.value>t)&&(t=r.value)}}catch(e){n.e(e)}finally{n.f()}return t}},{key:`maxValue`,get:function(){var e,t=null,n=U(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.kind===`max`&&(t===null||r.value<t)&&(t=r.value)}}catch(e){n.e(e)}finally{n.f()}return t}}
109,{key:`isInt`,get:function(){return!!this._def.checks.find(function(e){return e.kind===`int`||e.kind===`multipleOf`&&lN.isInteger(e.value)})}},{key:`isFinite`,get:function(){var e,t=null,n=null,r=U(this._def.checks);try{for(r.s();!(e=r.n()).done;){var i=e.value;if(i.kind===`finite`||i.kind===`int`||i.kind===`multipleOf`)return!0;i.kind===`min`?(n===null||i.value>n)&&(n=i.value):i.kind===`max`&&(t===null||i.value<t)&&(t=i.value)}}catch(e){r.e(e)}finally{r.f()}return Number.isFinite(n)&&Number.isFinite(t)}}])}();rP.create=function(e){return new rP(W({checks:[],typeName:$.ZodNumber,coerce:e?.coerce||!1},AN(e)))};var iP=function(){function e(){var t;return V(this,e),(t=Mx(this,e,arguments)).min=t.gte,t.max=t.lte,t}return Rx(e,MN),H(e,[{key:`_parse`,value:function(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==Y.bigint)return this._getInvalidInput(e);var t,n=void 0,r=new bN,i=U(this._def.checks);try{for(i.s();!(t=i.n()).done;){var a=t.value;a.kind===`min`?(a.inclusive?e.data<a.value:e.data<=a.value)&&(Z(n=this._getOrReturnCtx(e,n),{code:X.too_small,type:`bigint`,minimum:a.value,inclusive:a.inclusive,message:a.message}),r.dirty()):a.kind===`max`?(a.inclusive?e.data>a.value:e.data>=a.value)&&(Z(n=this._getOrReturnCtx(e,n),{code:X.too_big,type:`bigint`,maximum:a.value,inclusive:a.inclusive,message:a.message}),r.dirty()):a.kind===`multipleOf`?e.data%a.value!==BigInt(0)&&(Z(n=this._getOrReturnCtx(e,n),{code:X.not_multiple_of,multipleOf:a.value,message:a.message}),r.dirty()):lN.assertNever(a)}}catch(e){i.e(e)}finally{i.f()}return{status:r.value,value:e.data}}},{key:`_getInvalidInput`,value:function(e){var t=this._getOrReturnCtx(e);return Z(t,{code:X.invalid_type,expected:Y.bigint,received:t.parsedType}),xN}},{key:`gte`,value:function(e,t){return this.setLimit(`min`,e,!0,Q.toString(t))}},{key:`gt`,value:function(e,t){return this.setLimit(`min`,e,!1,Q.toString(t))}},{key:`lte`,value:function(e,t){return this.setLimit(`max`,e,!0,Q.toString(t))}},{key:`lt`,value:function(e,t){return this.setLimit(`max`,e,!1,Q.toString(t))}},{key:`setLimit`,value:function(t,n,r,i){return new e(W(W({},this._def),{},{checks:[].concat(K(this._def.checks),[{kind:t,value:n,inclusive:r,message:Q.toString(i)}])}))}},{key:`_addCheck`,value:function(t){return new e(W(W({},this._def),{},{checks:[].concat(K(this._def.checks),[t])}))}},{key:`positive`,value:function(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!1,message:Q.toString(e)})}},{key:`negative`,value:function(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!1,message:Q.toString(e)})}},{key:`nonpositive`,value:function(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!0,message:Q.toString(e)})}},{key:`nonnegative`,value:function(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!0,message:Q.toString(e)})}},{key:`multipleOf`,value:function(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:Q.toString(t)})}},{key:`minValue`,get:function(){var e,t=null,n=U(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.kind===`min`&&(t===null||r.value>t)&&(t=r.value)}}catch(e){n.e(e)}finally{n.f()}return t}},{key:`maxValue`,get:function(){var e,t=null,n=U(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.kind===`max`&&(t===null||r.value<t)&&(t=r.value)}}catch(e){n.e(e)}finally{n.f()}return t}}])}();iP.create=function(e){var t;return new iP(W({checks:[],typeName:$.ZodBigInt,coerce:(t=e?.coerce)!=null&&t},AN(e)))};var aP=function(){function e(){return V(this,e),Mx(this,e,arguments)}return Rx(e,MN),H(e,[{key:`_parse`,value:function(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Y.boolean){var t=this._getOrReturnCtx(e);return Z(t,{code:X.invalid_type,expected:Y.boolean,received:t.parsedType}),xN}return CN(e.data)}}])}();aP.create=function(e){return new aP(W({typeName:$.ZodBoolean,coerce:e?.coerce||!1},AN(e)))};var oP=function(){function e(){return V(this,e),Mx(this,e,arguments)}return Rx(e,MN),H(e,[{key:`_parse`,value:function(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Y.date){var t=this._getOrReturnCtx(e);return Z(t,{code:X.invalid_type,expected:Y.date,received:t.parsedType}),xN}if(Number.isNaN(e.data.getTime()))return Z(this._getOrReturnCtx(e),{code:X.invalid_date}),xN;var n,r=new bN,i=void 0,a=U(this._def.checks);try{for(a.s();!(n=a.n()).done;){var o=n.value;o.kind===`min`?e.data.getTime()<o.value&&(Z(i=this._getOrReturnCtx(e,i),{code:X.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:`date`}),r.dirty()):o.kind===`max`?e.data.getTime()>o.value&&(Z(i=this._getOrReturnCtx(e,i),{code:X.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:`date`}),r.dirty()):lN.assertNever(o)}}catch(e){a.e(e)}finally{a.f()}return{status:r.value,value:new Date(e.data.getTime())}}},{key:`_addCheck`,value:function(t){return new e(W(W({},this._def),{},{checks:[].concat(K(this._def.checks),[t])}))}},{key:`min`,value:function(e,t){return this._addCheck({kind:`min`,value:e.getTime(),message:Q.toString(t)})}},{key:`max`,value:function(e,t){return this._addCheck({kind:`max`,value:e.getTime(),message:Q.toString(t)})}},{key:`minDate`,get:function(){var e,t=null,n=U(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.kind===`min`&&(t===null||r.value>t)&&(t=r.value)}}catch(e){n.e(e)}finally{n.f()}return t==null?null:new Date(t)}},{key:`maxDate`,get:function(){var e,t=null,n=U(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.kind===`max`&&(t===null||r.value<t)&&(t=r.value)}}catch(e){n.e(e)}finally{n.f()}return t==null?null:new Date(t)}}])}();oP.create=function(e){return new oP(W({checks:[],coerce:e?.coerce||!1,typeName:$.ZodDate},AN(e)))};var sP=function(){function e(){return V(this,e),Mx(this,e,arguments)}return Rx(e,MN),H(e,[{key:`_parse`,value:function(e){if(this._getType(e)!==Y.symbol){var t=this._getOrReturnCtx(e);return Z(t,{code:X.invalid_type,expected:Y.symbol,received:t.parsedType}),xN}return CN(e.data)}}])}();
109sP.create=function(e){return new sP(W({typeName:$.ZodSymbol},AN(e)))};var cP=function(){function e(){return V(this,e),Mx(this,e,arguments)}return Rx(e,MN),H(e,[{key:`_parse`,value:function(e){if(this._getType(e)!==Y.undefined){var t=this._getOrReturnCtx(e);return Z(t,{code:X.invalid_type,expected:Y.undefined,received:t.parsedType}),xN}return CN(e.data)}}])}();cP.create=function(e){return new cP(W({typeName:$.ZodUndefined},AN(e)))};var lP=function(){function e(){return V(this,e),Mx(this,e,arguments)}return Rx(e,MN),H(e,[{key:`_parse`,value:function(e){if(this._getType(e)!==Y.null){var t=this._getOrReturnCtx(e);return Z(t,{code:X.invalid_type,expected:Y.null,received:t.parsedType}),xN}return CN(e.data)}}])}();lP.create=function(e){return new lP(W({typeName:$.ZodNull},AN(e)))};var uP=function(){function e(){var t;return V(this,e),(t=Mx(this,e,arguments))._any=!0,t}return Rx(e,MN),H(e,[{key:`_parse`,value:function(e){return CN(e.data)}}])}();uP.create=function(e){return new uP(W({typeName:$.ZodAny},AN(e)))};var dP=function(){function e(){var t;return V(this,e),(t=Mx(this,e,arguments))._unknown=!0,t}return Rx(e,MN),H(e,[{key:`_parse`,value:function(e){return CN(e.data)}}])}();dP.create=function(e){return new dP(W({typeName:$.ZodUnknown},AN(e)))};var fP=function(){function e(){return V(this,e),Mx(this,e,arguments)}return Rx(e,MN),H(e,[{key:`_parse`,value:function(e){var t=this._getOrReturnCtx(e);return Z(t,{code:X.invalid_type,expected:Y.never,received:t.parsedType}),xN}}])}();fP.create=function(e){return new fP(W({typeName:$.ZodNever},AN(e)))};var pP=function(){function e(){return V(this,e),Mx(this,e,arguments)}return Rx(e,MN),H(e,[{key:`_parse`,value:function(e){if(this._getType(e)!==Y.undefined){var t=this._getOrReturnCtx(e);return Z(t,{code:X.invalid_type,expected:Y.void,received:t.parsedType}),xN}return CN(e.data)}}])}();pP.create=function(e){return new pP(W({typeName:$.ZodVoid},AN(e)))};var mP=function(){function e(){return V(this,e),Mx(this,e,arguments)}return Rx(e,MN),H(e,[{key:`_parse`,value:function(e){var t=this._processInputParams(e),n=t.ctx,r=t.status,i=this._def;if(n.parsedType!==Y.array)return Z(n,{code:X.invalid_type,expected:Y.array,received:n.parsedType}),xN;if(i.exactLength!==null){var a=n.data.length>i.exactLength.value,o=n.data.length<i.exactLength.value;(a||o)&&(Z(n,{code:a?X.too_big:X.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&&(Z(n,{code:X.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&&(Z(n,{code:X.too_big,maximum:i.maxLength.value,type:`array`,inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all(K(n.data).map(function(e,t){return i.type._parseAsync(new ON(n,e,n.path,t))})).then(function(e){return bN.mergeArray(r,e)});var s=K(n.data).map(function(e,t){return i.type._parseSync(new ON(n,e,n.path,t))});return bN.mergeArray(r,s)}},{key:`element`,get:function(){return this._def.type}},{key:`min`,value:function(t,n){return new e(W(W({},this._def),{},{minLength:{value:t,message:Q.toString(n)}}))}},{key:`max`,value:function(t,n){return new e(W(W({},this._def),{},{maxLength:{value:t,message:Q.toString(n)}}))}},{key:`length`,value:function(t,n){return new e(W(W({},this._def),{},{exactLength:{value:t,message:Q.toString(n)}}))}},{key:`nonempty`,value:function(e){return this.min(1,e)}}])}();function hP(e){if(e instanceof gP){var t={};for(var n in e.shape){var r=e.shape[n];t[n]=PP.create(hP(r))}return new gP(W(W({},e._def),{},{shape:function(){return t}}))}return e instanceof mP?new mP(W(W({},e._def),{},{type:hP(e.element)})):e instanceof PP?PP.create(hP(e.unwrap())):e instanceof FP?FP.create(hP(e.unwrap())):e instanceof SP?SP.create(e.items.map(function(e){return hP(e)})):e}mP.create=function(e,t){return new mP(W({type:e,minLength:null,maxLength:null,exactLength:null,typeName:$.ZodArray},AN(t)))};var gP=function(){function e(){var t;return V(this,e),(t=Mx(this,e,arguments))._cached=null,t.nonstrict=t.passthrough,t.augment=t.extend,t}return Rx(e,MN),H(e,[{key:`_getCached`,value:function(){if(this._cached!==null)return this._cached;var e=this._def.shape(),t=lN.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}},{key:`_parse`,value:function(e){if(this._getType(e)!==Y.object){var t=this._getOrReturnCtx(e);return Z(t,{code:X.invalid_type,expected:Y.object,received:t.parsedType}),xN}var n=this._processInputParams(e),r=n.status,i=n.ctx,a=this._getCached(),o=a.shape,s=a.keys,c=[];if(!(this._def.catchall instanceof fP&&this._def.unknownKeys===`strip`))for(var l in i.data)s.includes(l)||c.push(l);var u,d=[],f=U(s);try{for(f.s();!(u=f.n()).done;){var p=u.value,m=o[p],h=i.data[p];d.push({key:{status:`valid`,value:p},value:m._parse(new ON(i,h,i.path,p)),alwaysSet:p in i.data})}}catch(e){f.e(e)}finally{f.f()}if(this._def.catchall instanceof fP){var g=this._def.unknownKeys;if(g===`passthrough`){var _,v=U(c);try{for(v.s();!(_=v.n()).done;){var y=_.value;d.push({key:{status:`valid`,value:y},value:{status:`valid`,value:i.data[y]}})}}catch(e){v.e(e)}finally{v.f()}}else if(g===`strict`)c.length>0&&(Z(i,{code:X.unrecognized_keys,keys:c}),r.dirty());
109else if(g!==`strip`)throw Error(`Internal ZodObject error: invalid unknownKeys value.`)}else{var b,x=this._def.catchall,S=U(c);try{for(S.s();!(b=S.n()).done;){var C=b.value,w=i.data[C];d.push({key:{status:`valid`,value:C},value:x._parse(new ON(i,w,i.path,C)),alwaysSet:C in i.data})}}catch(e){S.e(e)}finally{S.f()}}return i.common.async?Promise.resolve().then(jx(G().m(function e(){var t,n,r,i,a,o,s;return G().w(function(e){for(;;)switch(e.p=e.n){case 0:t=[],n=U(d),e.p=1,n.s();case 2:if((r=n.n()).done){e.n=6;break}return i=r.value,e.n=3,i.key;case 3:return a=e.v,e.n=4,i.value;case 4:o=e.v,t.push({key:a,value:o,alwaysSet:i.alwaysSet});case 5:e.n=2;break;case 6:e.n=8;break;case 7:e.p=7,s=e.v,n.e(s);case 8:return e.p=8,n.f(),e.f(8);case 9:return e.a(2,t)}},e,null,[[1,7,8,9]])}))).then(function(e){return bN.mergeObjectSync(r,e)}):bN.mergeObjectSync(r,d)}},{key:`shape`,get:function(){return this._def.shape()}},{key:`strict`,value:function(t){var n=this;return Q.errToObj,new e(W(W({},this._def),{},{unknownKeys:`strict`},t===void 0?{}:{errorMap:function(e,r){var i,a=(i=n._def).errorMap?.call(i,e,r).message??r.defaultError;return e.code===`unrecognized_keys`?{message:Q.errToObj(t).message??a}:{message:a}}}))}},{key:`strip`,value:function(){return new e(W(W({},this._def),{},{unknownKeys:`strip`}))}},{key:`passthrough`,value:function(){return new e(W(W({},this._def),{},{unknownKeys:`passthrough`}))}},{key:`extend`,value:function(t){var n=this;return new e(W(W({},this._def),{},{shape:function(){return W(W({},n._def.shape()),t)}}))}},{key:`merge`,value:function(t){var n=this;return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:function(){return W(W({},n._def.shape()),t._def.shape())},typeName:$.ZodObject})}},{key:`setKey`,value:function(e,t){return this.augment(Fx({},e,t))}},{key:`catchall`,value:function(t){return new e(W(W({},this._def),{},{catchall:t}))}},{key:`pick`,value:function(t){var n,r={},i=U(lN.objectKeys(t));try{for(i.s();!(n=i.n()).done;){var a=n.value;t[a]&&this.shape[a]&&(r[a]=this.shape[a])}}catch(e){i.e(e)}finally{i.f()}return new e(W(W({},this._def),{},{shape:function(){return r}}))}},{key:`omit`,value:function(t){var n,r={},i=U(lN.objectKeys(this.shape));try{for(i.s();!(n=i.n()).done;){var a=n.value;t[a]||(r[a]=this.shape[a])}}catch(e){i.e(e)}finally{i.f()}return new e(W(W({},this._def),{},{shape:function(){return r}}))}},{key:`deepPartial`,value:function(){return hP(this)}},{key:`partial`,value:function(t){var n,r={},i=U(lN.objectKeys(this.shape));try{for(i.s();!(n=i.n()).done;){var a=n.value,o=this.shape[a];r[a]=t&&!t[a]?o:o.optional()}}catch(e){i.e(e)}finally{i.f()}return new e(W(W({},this._def),{},{shape:function(){return r}}))}},{key:`required`,value:function(t){var n,r={},i=U(lN.objectKeys(this.shape));try{for(i.s();!(n=i.n()).done;){var a=n.value;if(t&&!t[a])r[a]=this.shape[a];else{for(var o=this.shape[a];o instanceof PP;)o=o._def.innerType;r[a]=o}}}catch(e){i.e(e)}finally{i.f()}return new e(W(W({},this._def),{},{shape:function(){return r}}))}},{key:`keyof`,value:function(){return kP(lN.objectKeys(this.shape))}}])}();gP.create=function(e,t){return new gP(W({shape:function(){return e},unknownKeys:`strip`,catchall:fP.create(),typeName:$.ZodObject},AN(t)))},gP.strictCreate=function(e,t){return new gP(W({shape:function(){return e},unknownKeys:`strict`,catchall:fP.create(),typeName:$.ZodObject},AN(t)))},gP.lazycreate=function(e,t){return new gP(W({shape:e,unknownKeys:`strip`,catchall:fP.create(),typeName:$.ZodObject},AN(t)))};var _P=function(){function e(){return V(this,e),Mx(this,e,arguments)}return Rx(e,MN),H(e,[{key:`_parse`,value:function(e){var t=this._processInputParams(e).ctx,n=this._def.options;if(t.common.async)return Promise.all(n.map(function(){var e=jx(G().m(function e(n){var r,i,a;return G().w(function(e){for(;;)switch(e.n){case 0:return r=W(W({},t),{},{common:W(W({},t.common),{},{issues:[]}),parent:null}),e.n=1,n._parseAsync({data:t.data,path:t.path,parent:r});case 1:return i=e.v,a=r,e.a(2,{result:i,ctx:a})}},e)}));return function(t){return e.apply(this,arguments)}}())).then(function(e){var n,r=U(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.result.status===`valid`)return i.result}}catch(e){r.e(e)}finally{r.f()}var a,o=U(e);try{for(o.s();!(a=o.n()).done;){var s,c=a.value;if(c.result.status===`dirty`)return(s=t.common.issues).push.apply(s,K(c.ctx.common.issues)),c.result}}catch(e){o.e(e)}finally{o.f()}var l=e.map(function(e){return new hN(e.ctx.common.issues)});return Z(t,{code:X.invalid_union,unionErrors:l}),xN});var r,i,a=void 0,o=[],s=U(n);try{for(s.s();!(r=s.n()).done;){var c=r.value,l=W(W({},t),{},{common:W(W({},t.common),{},{issues:[]}),parent:null}),u=c._parseSync({data:t.data,path:t.path,parent:l});if(u.status===`valid`)return u;u.status!==`dirty`||a||(a={result:u,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}}catch(e){s.e(e)}finally{s.f()}if(a)return(i=t.common.issues).push.apply(i,K(a.ctx.common.issues)),a.result;var d=o.map(function(e){return new hN(e)});return Z(t,{code:X.invalid_union,unionErrors:d}),xN}},{key:`options`,get:function(){return this._def.options}}])}();_P.create=function(e,t){return new _P(W({options:e,typeName:$.ZodUnion},AN(t)))};var vP=function(e){return e instanceof DP?vP(e.schema):e instanceof NP?vP(e.innerType()):e instanceof OP?[e.value]:e instanceof AP?e.options:e instanceof jP?lN.objectValues(e.enum):e instanceof IP?vP(e._def.innerType):e instanceof cP?[void 0]:e instanceof lP?[null]:e instanceof PP?[void 0].concat(K(vP(e.unwrap()))):e instanceof FP?[null].concat(K(vP(e.unwrap()))):e instanceof zP||e instanceof VP?vP(e.unwrap()):e instanceof LP?vP(e._def.innerType):[]},yP=function(){function e(){return V(this,e),Mx(this,e,arguments)}return Rx(e,MN),H(e,[{key:`_parse`,value:function(e){var t=this._processInputParams(e).ctx;if(t.parsedType!==Y.object)return Z(t,{code:X.invalid_type,expected:Y.object,received:t.parsedType}),xN;var n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(Z(t,{code:X.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),xN)}},{key:`discriminator`,get:function(){return this._def.discriminator}},{key:`options`,get:function(){return this._def.options}},{key:`optionsMap`,get:function(){return this._def.optionsMap}}],[{key:`create`,value:function(t,n,r){var i,a=new Map,o=U(n);try{for(o.s();!(i=o.n()).done;){var s=i.value,c=vP(s.shape[t]);if(!c.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);var l,u=U(c);try{for(u.s();!(l=u.n()).done;){var d=l.value;if(a.has(d))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(d)}`);a.set(d,s)}}catch(e){u.e(e)}finally{u.f()}}}catch(e){o.e(e)}finally{o.f()}return new e(W({typeName:$.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:a},AN(r)))}}])}();function bP(e,t){var n=mN(e),r=mN(t);if(e===t)return{valid:!0,data:e};if(n===Y.object&&r===Y.object){var i,a=lN.objectKeys(t),o=lN.objectKeys(e).filter(function(e){return a.indexOf(e)!==-1}),s=W(W({},e),t),c=U(o);try{for(c.s();!(i=c.n()).done;){var l=i.value,u=bP(e[l],t[l]);if(!u.valid)return{valid:!1};s[l]=u.data}}catch(e){c.e(e)}finally{c.f()}return{valid:!0,data:s}}if(n===Y.array&&r===Y.array){if(e.length!==t.length)return{valid:!1};for(var d=[],f=0;f<e.length;f++){var p=bP(e[f],t[f]);if(!p.valid)return{valid:!1};d.push(p.data)}return{valid:!0,data:d}}return n===Y.date&&r===Y.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var xP=function(){function e(){return V(this,e),Mx(this,e,arguments)}return Rx(e,MN),H(e,[{key:`_parse`,value:function(e){var t=this._processInputParams(e),n=t.status,r=t.ctx,i=function(e,t){if(wN(e)||wN(t))return xN;var i=bP(e.value,t.value);return i.valid?((TN(e)||TN(t))&&n.dirty(),{status:n.value,value:i.data}):(Z(r,{code:X.invalid_intersection_types}),xN)};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(function(e){var t=Wx(e,2),n=t[0],r=t[1];return i(n,r)}):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}))}}])}();xP.create=function(e,t,n){return new xP(W({left:e,right:t,typeName:$.ZodIntersection},AN(n)))};var SP=function(){function e(){return V(this,e),Mx(this,e,arguments)}return Rx(e,MN),H(e,[{key:`_parse`,value:function(e){var t=this,n=this._processInputParams(e),r=n.status,i=n.ctx;if(i.parsedType!==Y.array)return Z(i,{code:X.invalid_type,expected:Y.array,received:i.parsedType}),xN;if(i.data.length<this._def.items.length)return Z(i,{code:X.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),xN;!this._def.rest&&i.data.length>this._def.items.length&&(Z(i,{code:X.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),r.dirty());var a=K(i.data).map(function(e,n){var r=t._def.items[n]||t._def.rest;return r?r._parse(new ON(i,e,i.path,n)):null}).filter(function(e){return!!e});return i.common.async?Promise.all(a).then(function(e){return bN.mergeArray(r,e)}):bN.mergeArray(r,a)}}
109,{key:`items`,get:function(){return this._def.items}},{key:`rest`,value:function(t){return new e(W(W({},this._def),{},{rest:t}))}}])}();SP.create=function(e,t){if(!Array.isArray(e))throw Error(`You must pass an array of schemas to z.tuple([ ... ])`);return new SP(W({items:e,typeName:$.ZodTuple,rest:null},AN(t)))};var CP=function(){function e(){return V(this,e),Mx(this,e,arguments)}return Rx(e,MN),H(e,[{key:`keySchema`,get:function(){return this._def.keyType}},{key:`valueSchema`,get:function(){return this._def.valueType}},{key:`_parse`,value:function(e){var t=this._processInputParams(e),n=t.status,r=t.ctx;if(r.parsedType!==Y.object)return Z(r,{code:X.invalid_type,expected:Y.object,received:r.parsedType}),xN;var i=[],a=this._def.keyType,o=this._def.valueType;for(var s in r.data)i.push({key:a._parse(new ON(r,s,r.path,s)),value:o._parse(new ON(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?bN.mergeObjectAsync(n,i):bN.mergeObjectSync(n,i)}},{key:`element`,get:function(){return this._def.valueType}}],[{key:`create`,value:function(t,n,r){return new e(n instanceof MN?W({keyType:t,valueType:n,typeName:$.ZodRecord},AN(r)):W({keyType:tP.create(),valueType:t,typeName:$.ZodRecord},AN(n)))}}])}(),wP=function(){function e(){return V(this,e),Mx(this,e,arguments)}return Rx(e,MN),H(e,[{key:`keySchema`,get:function(){return this._def.keyType}},{key:`valueSchema`,get:function(){return this._def.valueType}},{key:`_parse`,value:function(e){var t=this._processInputParams(e),n=t.status,r=t.ctx;if(r.parsedType!==Y.map)return Z(r,{code:X.invalid_type,expected:Y.map,received:r.parsedType}),xN;var i=this._def.keyType,a=this._def.valueType,o=K(r.data.entries()).map(function(e,t){var n=Wx(e,2),o=n[0],s=n[1];return{key:i._parse(new ON(r,o,r.path,[t,`key`])),value:a._parse(new ON(r,s,r.path,[t,`value`]))}});if(r.common.async){var s=new Map;return Promise.resolve().then(jx(G().m(function e(){var t,r,i,a,c,l;return G().w(function(e){for(;;)switch(e.p=e.n){case 0:t=U(o),e.p=1,t.s();case 2:if((r=t.n()).done){e.n=7;break}return i=r.value,e.n=3,i.key;case 3:return a=e.v,e.n=4,i.value;case 4:if(c=e.v,a.status!==`aborted`&&c.status!==`aborted`){e.n=5;break}return e.a(2,xN);case 5:a.status!==`dirty`&&c.status!==`dirty`||n.dirty(),s.set(a.value,c.value);case 6:e.n=2;break;case 7:e.n=9;break;case 8:e.p=8,l=e.v,t.e(l);case 9:return e.p=9,t.f(),e.f(9);case 10:return e.a(2,{status:n.value,value:s})}},e,null,[[1,8,9,10]])})))}var c,l=new Map,u=U(o);try{for(u.s();!(c=u.n()).done;){var d=c.value,f=d.key,p=d.value;if(f.status===`aborted`||p.status===`aborted`)return xN;f.status!==`dirty`&&p.status!==`dirty`||n.dirty(),l.set(f.value,p.value)}}catch(e){u.e(e)}finally{u.f()}return{status:n.value,value:l}}}])}();wP.create=function(e,t,n){return new wP(W({valueType:t,keyType:e,typeName:$.ZodMap},AN(n)))};var TP=function(){function e(){return V(this,e),Mx(this,e,arguments)}return Rx(e,MN),H(e,[{key:`_parse`,value:function(e){var t=this._processInputParams(e),n=t.status,r=t.ctx;if(r.parsedType!==Y.set)return Z(r,{code:X.invalid_type,expected:Y.set,received:r.parsedType}),xN;var i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(Z(r,{code:X.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&&(Z(r,{code:X.too_big,maximum:i.maxSize.value,type:`set`,inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());var a=this._def.valueType;function o(e){var t,r=new Set,i=U(e);try{for(i.s();!(t=i.n()).done;){var a=t.value;if(a.status===`aborted`)return xN;a.status===`dirty`&&n.dirty(),r.add(a.value)}}catch(e){i.e(e)}finally{i.f()}return{status:n.value,value:r}}var s=K(r.data.values()).map(function(e,t){return a._parse(new ON(r,e,r.path,t))});return r.common.async?Promise.all(s).then(function(e){return o(e)}):o(s)}},{key:`min`,value:function(t,n){return new e(W(W({},this._def),{},{minSize:{value:t,message:Q.toString(n)}}))}},{key:`max`,value:function(t,n){return new e(W(W({},this._def),{},{maxSize:{value:t,message:Q.toString(n)}}))}},{key:`size`,value:function(e,t){return this.min(e,t).max(e,t)}},{key:`nonempty`,value:function(e){return this.min(1,e)}}])}();TP.create=function(e,t){return new TP(W({valueType:e,minSize:null,maxSize:null,typeName:$.ZodSet},AN(t)))};var EP=function(){function e(){var t;return V(this,e),(t=Mx(this,e,arguments)).validate=t.implement,t}return Rx(e,MN),H(e,[{key:`_parse`,value:function(e){var t=this._processInputParams(e).ctx;if(t.parsedType!==Y.function)return Z(t,{code:X.invalid_type,expected:Y.function,received:t.parsedType}),xN;function n(e,n){return yN({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,vN(),gN].filter(function(e){return!!e}),issueData:{code:X.invalid_arguments,argumentsError:n}})}function r(e,n){return yN({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,vN(),gN].filter(function(e){return!!e}),issueData:{code:X.invalid_return_type,returnTypeError:n}})}var i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof MP){var o=this;return CN(jx(G().m(function e(){var t,s,c,l,u,d,f,p=arguments;return G().w(function(e){for(;;)switch(e.n){case 0:for(t=p.length,s=Array(t),c=0;c<t;c++)s[c]=p[c];return l=new hN([]),e.n=1,o._def.args.parseAsync(s,i).catch(function(e){throw l.addIssue(n(s,e)),l});case 1:return u=e.v,e.n=2,Reflect.apply(a,this,u);case 2:return d=e.v,e.n=3,o._def.returns._def.type.parseAsync(d,i).catch(function(e){throw l.addIssue(r(d,e)),l});case 3:return f=e.v,e.a(2,f)}},e,this)})))}var s=this;return CN(function(){var e=[...arguments],t=s._def.args.safeParse(e,i);if(!t.success)throw new hN([n(e,t.error)]);var o=Reflect.apply(a,this,t.data),c=s._def.returns.safeParse(o,i);if(!c.success)throw new hN([r(o,c.error)]);return c.data})}},{key:`parameters`,value:function(){return this._def.args}},{key:`returnType`,value:function(){return this._def.returns}},{key:`args`,value:function(){var t=[...arguments];return new e(W(W({},this._def),{},{args:SP.create(t).rest(dP.create())}))}},{key:`returns`,value:function(t){return new e(W(W({},this._def),{},{returns:t}))}}
109,{key:`implement`,value:function(e){return this.parse(e)}},{key:`strictImplement`,value:function(e){return this.parse(e)}}],[{key:`create`,value:function(t,n,r){return new e(W({args:t||SP.create([]).rest(dP.create()),returns:n||dP.create(),typeName:$.ZodFunction},AN(r)))}}])}(),DP=function(){function e(){return V(this,e),Mx(this,e,arguments)}return Rx(e,MN),H(e,[{key:`schema`,get:function(){return this._def.getter()}},{key:`_parse`,value:function(e){var t=this._processInputParams(e).ctx;return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}])}();DP.create=function(e,t){return new DP(W({getter:e,typeName:$.ZodLazy},AN(t)))};var OP=function(){function e(){return V(this,e),Mx(this,e,arguments)}return Rx(e,MN),H(e,[{key:`_parse`,value:function(e){if(e.data!==this._def.value){var t=this._getOrReturnCtx(e);return Z(t,{received:t.data,code:X.invalid_literal,expected:this._def.value}),xN}return{status:`valid`,value:e.data}}},{key:`value`,get:function(){return this._def.value}}])}();function kP(e,t){return new AP(W({values:e,typeName:$.ZodEnum},AN(t)))}OP.create=function(e,t){return new OP(W({value:e,typeName:$.ZodLiteral},AN(t)))};var AP=function(){function e(){return V(this,e),Mx(this,e,arguments)}return Rx(e,MN),H(e,[{key:`_parse`,value:function(e){if(typeof e.data!=`
109string`){var t=this._getOrReturnCtx(e),n=this._def.values;return Z(t,{expected:lN.joinValues(n),received:t.parsedType,code:X.invalid_type}),xN}if(this._cache||=new Set(this._def.values),!this._cache.has(e.data)){var r=this._getOrReturnCtx(e),i=this._def.values;return Z(r,{received:r.data,code:X.invalid_enum_value,options:i}),xN}return CN(e.data)}},{key:`options`,get:function(){return this._def.values}},{key:`enum`,get:function(){var e,t={},n=U(this._def.values);try{for(n.s();!(e=n.n()).done;){var r=e.value;t[r]=r}}catch(e){n.e(e)}finally{n.f()}return t}},{key:`Values`,get:function(){var e,t={},n=U(this._def.values);try{for(n.s();!(e=n.n()).done;){var r=e.value;t[r]=r}}catch(e){n.e(e)}finally{n.f()}return t}},{key:`Enum`,get:function(){var e,t={},n=U(this._def.values);try{for(n.s();!(e=n.n()).done;){var r=e.value;t[r]=r}}catch(e){n.e(e)}finally{n.f()}return t}},{key:`extract`,value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._def;return e.create(t,W(W({},this._def),n))}},{key:`exclude`,value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._def;return e.create(this.options.filter(function(e){return!t.includes(e)}),W(W({},this._def),n))}}])}();AP.create=kP;var jP=function(){function e(){return V(this,e),Mx(this,e,arguments)}return Rx(e,MN),H(e,[{key:`_parse`,value:function(e){var t=lN.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==Y.string&&n.parsedType!==Y.number){var r=lN.objectValues(t);return Z(n,{expected:lN.joinValues(r),received:n.parsedType,code:X.invalid_type}),xN}if(this._cache||=new Set(lN.getValidEnumValues(this._def.values)),!this._cache.has(e.data)){var i=lN.objectValues(t);return Z(n,{received:n.data,code:X.invalid_enum_value,options:i}),xN}return CN(e.data)}},{key:`enum`,get:function(){return this._def.values}}])}();jP.create=function(e,t){return new jP(W({values:e,typeName:$.ZodNativeEnum},AN(t)))};var MP=function(){function e(){return V(this,e),Mx(this,e,arguments)}return Rx(e,MN),H(e,[{key:`unwrap`,value:function(){return this._def.type}},{key:`_parse`,value:function(e){var t=this,n=this._processInputParams(e).ctx;return n.parsedType!==Y.promise&&!1===n.common.async?(Z(n,{code:X.invalid_type,expected:Y.promise,received:n.parsedType}),xN):CN((n.parsedType===Y.promise?n.data:Promise.resolve(n.data)).then(function(e){return t._def.type.parseAsync(e,{path:n.path,errorMap:n.common.contextualErrorMap})}))}}])}();MP.create=function(e,t){return new MP(W({type:e,typeName:$.ZodPromise},AN(t)))};var NP=function(){function e(){return V(this,e),Mx(this,e,arguments)}return Rx(e,MN),H(e,[{key:`innerType`,value:function(){return this._def.schema}},{key:`sourceType`,value:function(){return this._def.schema._def.typeName===$.ZodEffects?this._def.schema.sourceType():this._def.schema}},{key:`_parse`,value:function(e){var t=this,n=this._processInputParams(e),r=n.status,i=n.ctx,a=this._def.effect||null,o={addIssue:function(e){Z(i,e),e.fatal?r.abort():r.dirty()},get path(){return i.path}};if(o.addIssue=o.addIssue.bind(o),a.type===`preprocess`){var s=a.transform(i.data,o);if(i.common.async)return Promise.resolve(s).then(function(){var e=jx(G().m(function e(n){var a;return G().w(function(e){for(;;)switch(e.n){case 0:if(r.value!==`aborted`){e.n=1;break}return e.a(2,xN);case 1:return e.n=2,t._def.schema._parseAsync({data:n,path:i.path,parent:i});case 2:if((a=e.v).status!==`aborted`){e.n=3;break}return e.a(2,xN);case 3:if(a.status!==`dirty`){e.n=4;break}return e.a(2,SN(a.value));case 4:if(r.value!==`dirty`){e.n=5;break}return e.a(2,SN(a.value));case 5:return e.a(2,a)}},e)}));return function(t){return e.apply(this,arguments)}}());if(r.value===`aborted`)return xN;var c=this._def.schema._parseSync({data:s,path:i.path,parent:i});return c.status===`aborted`?xN:c.status===`dirty`||r.value===`dirty`?SN(c.value):c}if(a.type===`refinement`){var l=function(e){var t=a.refinement(e,o);if(i.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error(`Async refinement encountered during synchronous parse operation. Use .parseAsync instead.`);return e};if(!1===i.common.async){var u=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return u.status===`aborted`?xN:(u.status===`dirty`&&r.dirty(),l(u.value),{status:r.value,value:u.value})}return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(function(e){return e.status===`aborted`?xN:(e.status===`dirty`&&r.dirty(),l(e.value).then(function(){return{status:r.value,value:e.value}}))})}if(a.type===`transform`){if(!1===i.common.async){var d=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!EN(d))return xN;var f=a.transform(d.value,o);if(f instanceof Promise)throw Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);return{status:r.value,value:f}}return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(function(e){return EN(e)?Promise.resolve(a.transform(e.value,o)).then(function(e){return{status:r.value,value:e}}):xN})}lN.assertNever(a)}}])}();NP.create=function(e,t,n){return new NP(W({schema:e,typeName:$.ZodEffects,effect:t},AN(n)))},NP.createWithPreprocess=function(e,t,n){return new NP(W({schema:t,effect:{type:`preprocess`,transform:e},typeName:$.ZodEffects},AN(n)))};var PP=function(){function e(){return V(this,e),Mx(this,e,arguments)}return Rx(e,MN),H(e,[{key:`_parse`,value:function(e){return this._getType(e)===Y.undefined?CN(void 0):this._def.innerType._parse(e)}},{key:`unwrap`,value:function(){return this._def.innerType}}])}();PP.create=function(e,t){return new PP(W({innerType:e,typeName:$.ZodOptional},AN(t)))};var FP=function(){function e(){return V(this,e),Mx(this,e,arguments)}return Rx(e,MN),H(e,[{key:`_parse`,value:function(e){return this._getType(e)===Y.null?CN(null):this._def.innerType._parse(e)}},{key:`unwrap`,value:function(){return this._def.innerType}}])}();FP.create=function(e,t){return new FP(W({innerType:e,typeName:$.ZodNullable},AN(t)))};var IP=function(){function e(){return V(this,e),Mx(this,e,arguments)}return Rx(e,MN),H(e,[{key:`_parse`,value:function(e){var t=this._processInputParams(e).ctx,n=t.data;return t.parsedType===Y.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}},{key:`removeDefault`,value:function(){return this._def.innerType}}])}();IP.create=function(e,t){return new IP(W({innerType:e,typeName:$.ZodDefault,defaultValue:typeof t.default==`function`?t.default:function(){return t.default}},AN(t)))};var LP=function(){function e(){return V(this,e),Mx(this,e,arguments)}return Rx(e,MN),H(e,[{key:`_parse`,value:function(e){var t=this,n=this._processInputParams(e).ctx,r=W(W({},n),{},{common:W(W({},n.common),{},{issues:[]})}),i=this._def.innerType._parse({data:r.data,path:r.path,parent:W({},r)});return DN(i)?i.then(function(e){return{status:`valid`,value:e.status===`valid`?e.value:t._def.catchValue({get error(){return new hN(r.common.issues)},input:r.data})}}):{status:`valid`,value:i.status===`valid`?i.value:this._def.catchValue({get error(){return new hN(r.common.issues)},input:r.data})}}},{key:`removeCatch`,value:function(){return this._def.innerType}}])}();
109LP.create=function(e,t){return new LP(W({innerType:e,typeName:$.ZodCatch,catchValue:typeof t.catch==`function`?t.catch:function(){return t.catch}},AN(t)))};var RP=function(){function e(){return V(this,e),Mx(this,e,arguments)}return Rx(e,MN),H(e,[{key:`_parse`,value:function(e){if(this._getType(e)!==Y.nan){var t=this._getOrReturnCtx(e);return Z(t,{code:X.invalid_type,expected:Y.nan,received:t.parsedType}),xN}return{status:`valid`,value:e.data}}}])}();RP.create=function(e){return new RP(W({typeName:$.ZodNaN},AN(e)))};var $,zP=function(){function e(){return V(this,e),Mx(this,e,arguments)}return Rx(e,MN),H(e,[{key:`_parse`,value:function(e){var t=this._processInputParams(e).ctx,n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}},{key:`unwrap`,value:function(){return this._def.type}}])}(),BP=function(){function e(){return V(this,e),Mx(this,e,arguments)}return Rx(e,MN),H(e,[{key:`_parse`,value:function(e){var t=this,n=this._processInputParams(e),r=n.status,i=n.ctx;if(i.common.async)return function(){var e=jx(G().m(function e(){var n;return G().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,t._def.in._parseAsync({data:i.data,path:i.path,parent:i});case 1:if((n=e.v).status!==`aborted`){e.n=2;break}return e.a(2,xN);case 2:if(n.status!==`dirty`){e.n=3;break}return r.dirty(),e.a(2,SN(n.value));case 3:return e.a(2,t._def.out._parseAsync({data:n.value,path:i.path,parent:i}));case 4:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}()();var a=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return a.status===`aborted`?xN:a.status===`dirty`?(r.dirty(),{status:`dirty`,value:a.value}):this._def.out._parseSync({data:a.value,path:i.path,parent:i})}}],[{key:`create`,value:function(t,n){return new e({in:t,out:n,typeName:$.ZodPipeline})}}])}(),VP=function(){function e(){return V(this,e),Mx(this,e,arguments)}return Rx(e,MN),H(e,[{key:`_parse`,value:function(e){var t=this._def.innerType._parse(e),n=function(e){return EN(e)&&(e.value=Object.freeze(e.value)),e};return DN(t)?t.then(function(e){return n(e)}):n(t)}},{key:`unwrap`,value:function(){return this._def.innerType}}])}();VP.create=function(e,t){return new VP(W({innerType:e,typeName:$.ZodReadonly},AN(t)))},gP.lazycreate,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`}($||={}),tP.create,rP.create,RP.create,iP.create,aP.create,oP.create,sP.create,cP.create,lP.create,uP.create,dP.create,fP.create,pP.create,mP.create,gP.create,gP.strictCreate,_P.create,yP.create,xP.create,SP.create,CP.create,wP.create,TP.create,EP.create,DP.create,OP.create,AP.create,jP.create,MP.create,NP.create,PP.create,FP.create,NP.createWithPreprocess,BP.create;var HP=({prefix:e,size:t=16,alphabet:n=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`,separator:r=`-`}={})=>{let i=()=>{let e=n.length,r=Array(t);for(let i=0;i<t;i++)r[i]=n[Math.random()*e|0];return r.join(``)};if(e==null)return i;if(n.includes(r))throw new HD({argument:`separator`,message:`The separator "${r}" must not be part of the alphabet "${n}".`});return()=>`${e}${r}${i()}`},UP=HP();function WP(e=globalThis){return e.window?`runtime/browser`:e.navigator?.userAgent?`runtime/${e.navigator.userAgent.toLowerCase()}`:e.process?.versions?.node?`runtime/node.js/${e.process.version.substring(0)}`:e.EdgeRuntime?`runtime/vercel-edge`:`runtime/unknown`}function GP(e){if(e==null)return{};let t={};if(e instanceof Headers)e.forEach((e,n)=>{t[n.toLowerCase()]=e});else{Array.isArray(e)||(e=Object.entries(e));for(let[n,r]of e)r!=null&&(t[n.toLowerCase()]=r)}return t}function KP(e,...t){let n=new Headers(GP(e)),r=n.get(`user-agent`)||``;
109return n.set(`user-agent`,[r,...t].filter(Boolean).join(` `)),Object.fromEntries(n.entries())}var qP=/"__proto__"\s*:/,JP=/"constructor"\s*:/;function YP(e){let t=JSON.parse(e);return typeof t!=`object`||!t||!1===qP.test(e)&&!1===JP.test(e)?t:function(e){let t=[e];for(;t.length;){let e=t;t=[];for(let n of e){if(Object.prototype.hasOwnProperty.call(n,`__proto__`)||Object.prototype.hasOwnProperty.call(n,`constructor`)&&Object.prototype.hasOwnProperty.call(n.constructor,`prototype`))throw SyntaxError(`Object contains forbidden prototype property`);for(let e in n){let r=n[e];r&&typeof r==`object`&&t.push(r)}}}return e}(t)}var XP=Symbol.for(`vercel.ai.validator`);function ZP(e){return function(e){return typeof e==`object`&&!!e&&XP in e&&!0===e[XP]&&`validate`in e}(e)?e:typeof e==`function`?e():(t=e,n=async e=>{let n=await t[`~standard`].validate(e);return n.issues==null?{success:!0,value:n.value}:{success:!1,error:new ZD({value:e,cause:n.issues})}},{[XP]:!0,validate:n});var t,n}async function QP({value:e,schema:t}){let n=await $P({value:e,schema:t});if(!n.success)throw ZD.wrap({value:e,cause:n.error});return n.value}async function $P({value:e,schema:t}){let n=ZP(t);try{if(n.validate==null)return{success:!0,value:e,rawValue:e};let t=await n.validate(e);return t.success?{success:!0,value:t.value,rawValue:e}:{success:!1,error:ZD.wrap({value:e,cause:t.error}),rawValue:e}}catch(t){return{success:!1,error:ZD.wrap({value:e,cause:t}),rawValue:e}}}async function eF({text:e,schema:t}){try{let n=function(e){let{stackTraceLimit:t}=Error;try{Error.stackTraceLimit=0}catch{return YP(e)}try{return YP(e)}finally{Error.stackTraceLimit=t}}(e);return t==null?{success:!0,value:n,rawValue:n}:await $P({value:n,schema:t})}catch(t){return{success:!1,error:qD.isInstance(t)?t:new qD({text:e,cause:t}),rawValue:void 0}}}async function tF(e){return typeof e==`function`&&(e=e()),Promise.resolve(e)}var nF=(e,t)=>{let n=0;for(;n<e.length&&n<t.length&&e[n]===t[n];n++);return[(e.length-n).toString(),...t.slice(n)].join(`/`)},rF=Symbol(`Let zodToJsonSchema decide on which parser to use`),iF={name:void 0,$refStrategy:`root`,basePath:[`#`],effectStrategy:`input`,pipeStrategy:`all`,dateStrategy:`format:date-time`,mapStrategy:`entries`,removeAdditionalStrategy:`passthrough`,allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:`definitions`,strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:`escape`,applyRegexFlags:!1,emailStrategy:`format:email`,base64Strategy:`contentEncoding:base64`,nameStrategy:`ref`};function aF(e,t){return MF(e.type._def,t)}function oF(e,t,n){let r=n??t.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((n,r)=>oF(e,t,n))};switch(r){case`string`:case`format:date-time`:return{type:`string`,format:`date-time`};case`format:date`:return{type:`string`,format:`date`};case`integer`:return sF(e)}}var sF=e=>{let t={type:`integer`,format:`unix-time`};for(let n of e.checks)switch(n.kind){case`min`:t.minimum=n.value;break;case`max`:t.maximum=n.value}return t},cF=void 0,lF=/^[cC][^\s-]{8,}$/,uF=/^[0-9a-z]+$/,dF=/^[0-9A-HJKMNP-TV-Z]{26}$/,fF=/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,pF=()=>(cF===void 0&&(cF=RegExp(`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,`u`)),cF),mF=/^(?:(?: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])$/,hF=/^(([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])$/,gF=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,_F=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,vF=/^[a-zA-Z0-9_-]{21}$/,yF=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/;function bF(e,t){let n={type:`string`};
109if(e.checks)for(let r of e.checks)switch(r.kind){case`min`:n.minLength=typeof n.minLength==`number`?Math.max(n.minLength,r.value):r.value;break;case`max`:n.maxLength=typeof n.maxLength==`number`?Math.min(n.maxLength,r.value):r.value;break;case`email`:switch(t.emailStrategy){case`format:email`:CF(n,`email`,r.message,t);break;case`format:idn-email`:CF(n,`idn-email`,r.message,t);break;case`pattern:zod`:wF(n,fF,r.message,t)}break;case`url`:CF(n,`uri`,r.message,t);break;case`uuid`:CF(n,`uuid`,r.message,t);break;case`regex`:wF(n,r.regex,r.message,t);break;case`cuid`:wF(n,lF,r.message,t);break;case`cuid2`:wF(n,uF,r.message,t);break;case`startsWith`:wF(n,RegExp(`^${xF(r.value,t)}`),r.message,t);break;case`endsWith`:wF(n,RegExp(`${xF(r.value,t)}$`),r.message,t);break;case`datetime`:CF(n,`date-time`,r.message,t);break;case`date`:CF(n,`date`,r.message,t);break;case`time`:CF(n,`time`,r.message,t);break;case`duration`:CF(n,`duration`,r.message,t);break;case`length`:n.minLength=typeof n.minLength==`number`?Math.max(n.minLength,r.value):r.value,n.maxLength=typeof n.maxLength==`number`?Math.min(n.maxLength,r.value):r.value;break;case`includes`:wF(n,RegExp(xF(r.value,t)),r.message,t);break;case`ip`:r.version!==`v6`&&CF(n,`ipv4`,r.message,t),r.version!==`v4`&&CF(n,`ipv6`,r.message,t);break;case`base64url`:wF(n,_F,r.message,t);break;case`jwt`:wF(n,yF,r.message,t);break;case`cidr`:r.version!==`v6`&&wF(n,mF,r.message,t),r.version!==`v4`&&wF(n,hF,r.message,t);break;case`emoji`:wF(n,pF(),r.message,t);break;case`ulid`:wF(n,dF,r.message,t);break;case`base64`:switch(t.base64Strategy){case`format:binary`:CF(n,`binary`,r.message,t);break;case`contentEncoding:base64`:n.contentEncoding=`base64`;break;case`pattern:zod`:wF(n,gF,r.message,t)}break;case`nanoid`:wF(n,vF,r.message,t)}return n}function xF(e,t){return t.patternStrategy===`escape`?function(e){let t=``;for(let n=0;n<e.length;n++)SF.has(e[n])||(t+=`\\`),t+=e[n];return t}(e):e}var SF=new Set(`ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789`);function CF(e,t,n,r){e.format||e.anyOf?.some(e=>e.format)?(e.anyOf||=[],e.format&&(e.anyOf.push({format:e.format}),delete e.format),e.anyOf.push({format:t,...n&&r.errorMessages&&{errorMessage:{format:n}}})):e.format=t}function wF(e,t,n,r){e.pattern||e.allOf?.some(e=>e.pattern)?(e.allOf||=[],e.pattern&&(e.allOf.push({pattern:e.pattern}),delete e.pattern),e.allOf.push({pattern:TF(t,r),...n&&r.errorMessages&&{errorMessage:{pattern:n}}})):e.pattern=TF(t,r)}function TF(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;let n=e.flags.includes(`i`),r=e.flags.includes(`m`),i=e.flags.includes(`s`),a=n?e.source.toLowerCase():e.source,o=``,s=!1,c=!1,l=!1;for(let e=0;e<a.length;e++)if(s)o+=a[e],s=!1;else{if(n){if(c){if(a[e].match(/[a-z]/)){l?(o+=a[e],o+=`${a[e-2]}-${a[e]}`.toUpperCase(),l=!1):a[e+1]===`-`&&a[e+2]?.match(/[a-z]/)?(o+=a[e],l=!0):o+=`${a[e]}${a[e].toUpperCase()}`;continue}}else if(a[e].match(/[a-z]/)){o+=`[${a[e]}${a[e].toUpperCase()}]`;continue}}if(r){if(a[e]===`^`){o+=`(^|(?<=[\r
110]))`;continue}if(a[e]===`$`){o+=`($|(?=[\r
111]))`;continue}}i&&a[e]===`.`?o+=c?`${a[e]}\r\n`:`[${a[e]}\r\n]`:(o+=a[e],a[e]===`\\`?s=!0:c&&a[e]===`]`?c=!1:c||a[e]!==`[`||(c=!0))}try{new RegExp(o)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join(`/`)} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return o}function EF(e,t){let n={type:`object`,additionalProperties:MF(e.valueType._def,{...t,currentPath:[...t.currentPath,`additionalProperties`]})??t.allowedAdditionalProperties};if(e.keyType?._def.typeName===$.ZodString&&e.keyType._def.checks?.length){let{type:r,...i}=bF(e.keyType._def,t);return{...n,propertyNames:i}}if(e.keyType?._def.typeName===$.ZodEnum)return{...n,propertyNames:{enum:e.keyType._def.values}};if(e.keyType?._def.typeName===$.ZodBranded&&e.keyType._def.type._def.typeName===$.ZodString&&e.keyType._def.type._def.checks?.length){let{type:r,...i}=aF(e.keyType._def,t);return{...n,propertyNames:i}}return n}var DF={ZodString:`string`,ZodNumber:`number`,ZodBigInt:`integer`,ZodBoolean:`boolean`,ZodNull:`null`},OF=(e,t)=>{let n=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((e,n)=>MF(e._def,{...t,currentPath:[...t.currentPath,`anyOf`,`${n}`]})).filter(e=>!!e&&(!t.strictUnions||typeof e==`object`&&Object.keys(e).length>0));return n.length?{anyOf:n}:void 0};function kF(e,t){let n={type:`object`,properties:{}},r=[],i=e.shape();for(let e in i){let a=i[e];if(a===void 0||a._def===void 0)continue;let o=AF(a),s=MF(a._def,{...t,currentPath:[...t.currentPath,`properties`,e],propertyPath:[...t.currentPath,`properties`,e]});s!==void 0&&(n.properties[e]=s,o||r.push(e))}r.length&&(n.required=r);let a=function(e,t){if(e.catchall._def.typeName!==`ZodNever`)return MF(e.catchall._def,{...t,currentPath:[...t.currentPath,`additionalProperties`]});switch(e.unknownKeys){case`passthrough`:return t.allowedAdditionalProperties;case`strict`:return t.rejectedAdditionalProperties;case`strip`:return t.removeAdditionalStrategy===`strict`?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}(e,t);return a!==void 0&&(n.additionalProperties=a),n}function AF(e){try{return e.isOptional()}catch{return!0}}var jF=(e,t,n)=>{switch(t){case $.ZodString:return bF(e,n);case $.ZodNumber:return function(e){let t={type:`number`};if(!e.checks)return t;for(let n of e.checks)switch(n.kind){case`int`:t.type=`integer`;break;case`min`:n.inclusive?t.minimum=n.value:t.exclusiveMinimum=n.value;break;case`max`:n.inclusive?t.maximum=n.value:t.exclusiveMaximum=n.value;break;case`multipleOf`:t.multipleOf=n.value}return t}(e);case $.ZodObject:return kF(e,n);case $.ZodBigInt:return function(e){let t={type:`integer`,format:`int64`};if(!e.checks)return t;for(let n of e.checks)switch(n.kind){case`min`:n.inclusive?t.minimum=n.value:t.exclusiveMinimum=n.value;break;case`max`:n.inclusive?t.maximum=n.value:t.exclusiveMaximum=n.value;break;case`multipleOf`:t.multipleOf=n.value}return t}(e);case $.ZodBoolean:return{type:`boolean`};case $.ZodDate:return oF(e,n);case $.ZodUndefined:return{not:{}};case $.ZodNull:return{type:`null`};case $.ZodArray:return function(e,t){var n;let r={type:`array`};return(n=e.type)!=null&&n._def&&e.type?._def?.typeName!==$.ZodAny&&(r.items=MF(e.type._def,{...t,currentPath:[...t.currentPath,`items`]})),e.minLength&&(r.minItems=e.minLength.value),e.maxLength&&(r.maxItems=e.maxLength.value),e.exactLength&&(r.minItems=e.exactLength.value,r.max
111Items=e.exactLength.value),r}(e,n);case $.ZodUnion:case $.ZodDiscriminatedUnion:return function(e,t){let n=e.options instanceof Map?Array.from(e.options.values()):e.options;if(n.every(e=>e._def.typeName in DF&&(!e._def.checks||!e._def.checks.length))){let e=n.reduce((e,t)=>{let n=DF[t._def.typeName];return n&&!e.includes(n)?[...e,n]:e},[]);return{type:e.length>1?e:e[0]}}if(n.every(e=>e._def.typeName===`ZodLiteral`&&!e.description)){let e=n.reduce((e,t)=>{let n=typeof t._def.value;switch(n){case`string`:case`number`:case`boolean`:return[...e,n];case`bigint`:return[...e,`integer`];case`object`:if(t._def.value===null)return[...e,`null`];default:return e}},[]);if(e.length===n.length){let t=e.filter((e,t,n)=>n.indexOf(e)===t);return{type:t.length>1?t:t[0],enum:n.reduce((e,t)=>e.includes(t._def.value)?e:[...e,t._def.value],[])}}}else if(n.every(e=>e._def.typeName===`ZodEnum`))return{type:`string`,enum:n.reduce((e,t)=>[...e,...t._def.values.filter(t=>!e.includes(t))],[])};return OF(e,t)}(e,n);case $.ZodIntersection:return function(e,t){let n=[MF(e.left._def,{...t,currentPath:[...t.currentPath,`allOf`,`0`]}),MF(e.right._def,{...t,currentPath:[...t.currentPath,`allOf`,`1`]})].filter(e=>!!e),r=[];return n.forEach(e=>{if(`type`in(t=e)&&t.type===`string`||!(`allOf`in t)){let t=e;if(`additionalProperties`in e&&!1===e.additionalProperties){let{additionalProperties:n,...r}=e;t=r}r.push(t)}else r.push(...e.allOf);var t}),r.length?{allOf:r}:void 0}(e,n);case $.ZodTuple:return function(e,t){return e.rest?{type:`array`,minItems:e.items.length,items:e.items.map((e,n)=>MF(e._def,{...t,currentPath:[...t.currentPath,`items`,`${n}`]})).reduce((e,t)=>t===void 0?e:[...e,t],[]),additionalItems:MF(e.rest._def,{...t,currentPath:[...t.currentPath,`additionalItems`]})}:{type:`array`,minItems:e.items.length,maxItems:e.items.length,items:e.items.map((e,n)=>MF(e._def,{...t,currentPath:[...t.currentPath,`items`,`${n}`]})).reduce((e,t)=>t===void 0?e:[...e,t],[])}}(e,n);case $.ZodRecord:return EF(e,n);case $.ZodLiteral:return function(e){let t=typeof e.value;return t!==`bigint`&&t!==`number`&&t!==`boolean`&&t!==`string`?{type:Array.isArray(e.value)?`array`:`object`}:{type:t===`bigint`?`integer`:t,const:e.value}}(e);case $.ZodEnum:return function(e){return{type:`string`,enum:Array.from(e.values)}}(e);case $.ZodNativeEnum:return function(e){let t=e.values,n=Object.keys(e.values).filter(e=>typeof t[t[e]]!=`number`).map(e=>t[e]),r=Array.from(new Set(n.map(e=>typeof e)));return{type:r.length===1?r[0]===`string`?`string`:`number`:[`string`,`number`],enum:n}}(e);case $.ZodNullable:return function(e,t){if([`ZodString`,`ZodNumber`,`ZodBigInt`,`ZodBoolean`,`ZodNull`].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[DF[e.innerType._def.typeName],`null`]};let n=MF(e.innerType._def,{...t,currentPath:[...t.currentPath,`anyOf`,`0`]});return n&&{anyOf:[n,{type:`null`}]}}(e,n);case $.ZodOptional:return((e,t)=>{if(t.currentPath.toString()===t.propertyPath?.toString())return MF(e.innerType._def,t);let n=MF(e.innerType._def,{...t,currentPath:[...t.currentPath,`anyOf`,`1`]});return n?{anyOf:[{not:{}},n]}:{}})(e,n);case $.ZodMap:return function(e,t){return t.mapStrategy===`record`?EF(e,t):{type:`array`,maxItems:125,items:{type:`array`,items:[MF(e.keyType._def,{...t,currentPath:[...t.currentPath,`items`,`items`,`0`]})||{},MF(e.valueType._def,{...t,currentPath:[...t.currentPath,`items`,`items`,`1`]})||{}],minItems:2,maxItems:2}}}
111(e,n);case $.ZodSet:return function(e,t){let n={type:`array`,uniqueItems:!0,items:MF(e.valueType._def,{...t,currentPath:[...t.currentPath,`items`]})};return e.minSize&&(n.minItems=e.minSize.value),e.maxSize&&(n.maxItems=e.maxSize.value),n}(e,n);case $.ZodLazy:return()=>e.getter()._def;case $.ZodPromise:return function(e,t){return MF(e.type._def,t)}(e,n);case $.ZodNaN:case $.ZodNever:return{not:{}};case $.ZodEffects:return function(e,t){return t.effectStrategy===`input`?MF(e.schema._def,t):{}}(e,n);case $.ZodAny:case $.ZodUnknown:return{};case $.ZodDefault:return function(e,t){return{...MF(e.innerType._def,t),default:e.defaultValue()}}(e,n);case $.ZodBranded:return aF(e,n);case $.ZodReadonly:case $.ZodCatch:return((e,t)=>MF(e.innerType._def,t))(e,n);case $.ZodPipeline:return((e,t)=>{if(t.pipeStrategy===`input`)return MF(e.in._def,t);if(t.pipeStrategy===`output`)return MF(e.out._def,t);let n=MF(e.in._def,{...t,currentPath:[...t.currentPath,`allOf`,`0`]});return{allOf:[n,MF(e.out._def,{...t,currentPath:[...t.currentPath,`allOf`,n?`1`:`0`]})].filter(e=>e!==void 0)}})(e,n);case $.ZodFunction:case $.ZodVoid:case $.ZodSymbol:default:return}};function MF(e,t,n=!1){let r=t.seen.get(e);if(t.override){let i=t.override?.call(t,e,t,r,n);if(i!==rF)return i}if(r&&!n){let e=NF(r,t);if(e!==void 0)return e}let i={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,i);let a=jF(e,e.typeName,t),o=typeof a==`function`?MF(a(),t):a;if(o&&PF(e,t,o),t.postProcess){let n=t.postProcess(o,e,t);return i.jsonSchema=o,n}return i.jsonSchema=o,o}var NF=(e,t)=>{switch(t.$refStrategy){case`root`:return{$ref:e.path.join(`/`)};case`relative`:return{$ref:nF(t.currentPath,e.path)};case`none`:case`seen`:return e.path.length<t.currentPath.length&&e.path.every((e,n)=>t.currentPath[n]===e)?(console.warn(`Recursive reference detected at ${t.currentPath.join(`/`)}! Defaulting to any`),{}):t.$refStrategy===`seen`?{}:void 0}},PF=(e,t,n)=>(e.description&&(n.description=e.description),n),FF=e=>{let t=(e=>typeof e==`string`?{...iF,name:e}:{...iF,...e})(e),n=t.name===void 0?t.basePath:[...t.basePath,t.definitionPath,t.name];return{...t,currentPath:n,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([e,n])=>[n._def,{def:n._def,path:[...t.basePath,t.definitionPath,e],jsonSchema:void 0}]))}},IF=(e,t)=>{let n=FF(t),r=typeof t==`object`&&t.definitions?Object.entries(t.definitions).reduce((e,[t,r])=>({...e,[t]:MF(r._def,{...n,currentPath:[...n.basePath,n.definitionPath,t]},!0)??{}}),{}):void 0,i=typeof t==`string`?t:t?.nameStrategy===`title`||t==null?void 0:t.name,a=MF(e._def,i===void 0?n:{...n,currentPath:[...n.basePath,n.definitionPath,i]},!1)??{},o=typeof t==`object`&&t.name!==void 0&&t.nameStrategy===`title`?t.name:void 0;o!==void 0&&(a.title=o);let s=i===void 0?r?{...a,[n.definitionPath]:r}:a:{$ref:[...n.$refStrategy===`relative`?[]:n.basePath,n.definitionPath,i].join(`/`),[n.definitionPath]:{...r,[i]:a}};return s.$schema=`http://json-schema.org/draft-07/schema#`,s};function LF(e,t){return BF(()=>function(e,t){if(e instanceof aj){var n,r=new kj(t),i={}
111,a=U(e._idmap.entries());try{for(a.s();!(n=a.n()).done;){var o=Wx(n.value,2),s=(o[0],o[1]);r.process(s)}}catch(e){a.e(e)}finally{a.f()}var c,l={},u={registry:e,uri:t?.uri,defs:i},d=U(e._idmap.entries());try{for(d.s();!(c=d.n()).done;){var f=Wx(c.value,2),p=f[0],m=f[1];l[p]=r.emit(m,W(W({},t),{},{external:u}))}}catch(e){d.e(e)}finally{d.f()}return Object.keys(i).length>0&&(l.__shared=Fx({},r.target===`draft-2020-12`?`$defs`:`definitions`,i)),{schemas:l}}var h=new kj(t);return h.process(e),h.emit(e,t)}(e,{target:`draft-7`,io:`output`,reused:`inline`}),{validate:async t=>{let n=await Wj(e,t);return n.success?{success:!0,value:n.data}:{success:!1,error:n.error}}})}function RF(e,t){return function(e){return`_zod`in e}(e)?LF(e):function(e){return BF(()=>IF(e,{$refStrategy:`none`}),{validate:async t=>{let n=await e.safeParseAsync(t);return n.success?{success:!0,value:n.data}:{success:!1,error:n.error}}})}(e)}var zF=Symbol.for(`vercel.ai.schema`);function BF(e,{validate:t}={}){return{[zF]:!0,_type:void 0,[XP]:!0,get jsonSchema(){return typeof e==`function`&&(e=e()),e},validate:t}}function VF(e){return e==null?BF({properties:{},additionalProperties:!1}):typeof(t=e)==`object`&&t!==null&&zF in t&&!0===t[zF]&&`jsonSchema`in t&&`validate`in t?e:typeof e==`function`?e():RF(e);var t}function HF(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var UF,WF=Object.defineProperty,GF=`AI_NoObjectGeneratedError`,KF=`vercel.ai.error.${GF}`,qF=Symbol.for(KF),JF=class extends ID{constructor({message:e=`No object generated.`,cause:t,text:n,response:r,usage:i,finishReason:a}){super({name:GF,message:e,cause:t}),this[UF]=!0,this.text=n,this.response=r,this.usage=i,this.finishReason=a}static isInstance(e){return ID.hasMarker(e,KF)}};UF=qF;var YF,XF,ZF,QF=`5.0.93`,$F=VM([nM(),pN(Uint8Array),pN(ArrayBuffer),fN(e=>{var t;return(t=globalThis.Buffer?.isBuffer(e))!=null&&t},{message:`Must be a Buffer`})]),eI=new cN({type:`lazy`,getter:()=>VM([AM(),nM(),wM(),OM(),GM(nM(),eI),IM(eI)])}),tI=GM(nM(),GM(nM(),eI)),nI=RM({type:YM(`text`),text:nM(),providerOptions:tI.optional()}),rI=RM({type:YM(`image`),image:VM([$F,pN(URL)]),mediaType:nM().optional(),providerOptions:tI.optional()}),iI=RM({type:YM(`file`),data:VM([$F,pN(URL)]),filename:nM().optional(),mediaType:nM(),providerOptions:tI.optional()}),aI=RM({type:YM(`reasoning`),text:nM(),providerOptions:tI.optional()}),oI=RM({type:YM(`tool-call`),toolCallId:nM(),toolName:nM(),input:MM(),providerOptions:tI.optional(),providerExecuted:OM().optional()}),sI=(YF=`type`,XF=[RM({type:YM(`text`),value:nM()}),RM({type:YM(`json`),value:eI}),RM({type:YM(`error-text`),value:nM()}),RM({type:YM(`error-json`),value:eI}),RM({type:YM(`content`),value:IM(VM([RM({type:YM(`text`),text:nM()}),RM({type:YM(`media`),data:nM(),mediaType:nM()})]))})],new HM(W({type:`union`,options:XF,discriminator:YF},J(ZF)))),cI=RM({type:YM(`tool-result`),toolCallId:nM(),toolName:nM(),output:sI,providerOptions:tI.optional()});VM([RM({role:YM(`system`),content:nM(),providerOptions:tI.optional()}),RM({role:YM(`user`),content:VM([nM(),IM(VM([nI,rI,iI]))]),providerOptions:tI.optional()}),RM({role:YM(`assistant`),content:VM([nM(),IM(VM([nI,iI,aI,oI,cI]))]),providerOptions:tI.optional()}),RM({role:YM(`tool`),content:IM(cI),providerOptions:tI.optional()})]),HP({prefix:`aitxt`,size:24}),TransformStream;var lI=function(e){let t;return()=>(t??=e(),t)}(()=>RF(VM([zM({type:YM(`text-start`),id:nM(),providerMetadata:tI.optional()}),zM({type:YM(`text-delta`),id:nM(),delta:nM(),providerMetadata:tI.optional()}),zM({type:YM(`text-end`),id:nM(),providerMetadata:tI.optional()}),zM({type:YM(`error`),errorText:nM()}),zM({type:YM(`tool-input-start`),toolCallId:nM(),toolName:nM(),providerExecuted:OM().optional(),dynamic:OM().optional()}),zM({type:YM(`tool-input-delta`),toolCallId:nM(),inputTextDelta:nM()}),zM({type:YM(`tool-input-available`),toolCallId:nM(),toolName:nM(),input:MM(),providerExecuted:OM().optional(),providerMetadata:tI.optional(),dynamic:OM().optional()}),zM({type:YM(`tool-input-error`),toolCallId:nM(),toolName:nM(),input:MM(),providerExecuted:OM().optional(),providerMetadata:tI.optional(),dynamic:OM().optional(),errorText:nM()}),zM({type:YM(`tool-output-available`),toolCallId:nM(),output:MM(),providerExecuted:OM().optional(),dynamic:OM().optional(),preliminary:OM().optional()}),zM({type:YM(`tool-output-error`),toolCallId:nM(),errorText:nM(),providerExecuted:OM().optional(),dynamic:OM().optional()}),zM({type:YM(`reasoning-start`),id:nM(),providerMetadata:tI.optional()}),zM({type:YM(`reasoning-delta`),id:nM(),delta:nM(),providerMetadata:tI.optional()}),zM({type:YM(`reasoning-end`),id:nM(),providerMetadata:tI.optional()}),zM({type:YM(`source-url`),sourceId:nM(),url:nM(),title:nM().optional(),providerMetadata:tI.optional()}),zM({type:YM(`source-document`),sourceId:nM(),mediaType:nM(),title:nM(),filename:nM().optional(),providerMetadata:tI.optional()}),zM({type:YM(`file`),url:nM(),mediaType:nM(),providerMetadata:tI.optional()}),zM({type:fN(e=>typeof e==`string`&&e.startsWith(`data-`),{message:`Type must start with "data-"`}),id:nM().optional(),data:MM(),transient:OM().optional()}),zM({type:YM(`start-step`)}),zM({type:YM(`finish-step`)}),zM({type:YM(`start`),messageId:nM().optional(),messageMetadata:MM().optional()}),zM({type:YM(`finish`),finishReason:qM([`stop`,`length`,`content-filter`,`tool-calls`,`error`,`other`,`unknown`]).optional(),messageMetadata:MM().optional()}),zM({type:YM(`abort`)}),zM({type:YM(`message-metadata`),messageMetadata:MM()})])));function uI(e,t){if(e===void 0&&t===void 0)return;if(e===void 0)return t;if(t===void 0)return e;let n={...e};for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)){let i=t[r];
111if(i===void 0)continue;let a=r in e?e[r]:void 0,o=!(typeof i!=`object`||!i||Array.isArray(i)||i instanceof Date||i instanceof RegExp),s=!(typeof a!=`object`||!a||Array.isArray(a)||a instanceof Date||a instanceof RegExp);n[r]=o&&s?uI(a,i):i}return n}function dI(e){let t=[`ROOT`],n=-1,r=null;function i(e,i,a){switch(e){case`"`:n=i,t.pop(),t.push(a),t.push(`INSIDE_STRING`);break;case`f`:case`t`:case`n`:n=i,r=i,t.pop(),t.push(a),t.push(`INSIDE_LITERAL`);break;case`-`:t.pop(),t.push(a),t.push(`INSIDE_NUMBER`);break;case`0`:case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:n=i,t.pop(),t.push(a),t.push(`INSIDE_NUMBER`);break;case`{`:n=i,t.pop(),t.push(a),t.push(`INSIDE_OBJECT_START`);break;case`[`:n=i,t.pop(),t.push(a),t.push(`INSIDE_ARRAY_START`)}}function a(e,r){switch(e){case`,`:t.pop(),t.push(`INSIDE_OBJECT_AFTER_COMMA`);break;case`}`:n=r,t.pop()}}function o(e,r){switch(e){case`,`:t.pop(),t.push(`INSIDE_ARRAY_AFTER_COMMA`);break;case`]`:n=r,t.pop()}}for(let s=0;s<e.length;s++){let c=e[s];switch(t[t.length-1]){case`ROOT`:i(c,s,`FINISH`);break;case`INSIDE_OBJECT_START`:switch(c){case`"`:t.pop(),t.push(`INSIDE_OBJECT_KEY`);break;case`}`:n=s,t.pop()}break;case`INSIDE_OBJECT_AFTER_COMMA`:c===`"`&&(t.pop(),t.push(`INSIDE_OBJECT_KEY`));break;case`INSIDE_OBJECT_KEY`:c===`"`&&(t.pop(),t.push(`INSIDE_OBJECT_AFTER_KEY`));break;case`INSIDE_OBJECT_AFTER_KEY`:c===`:`&&(t.pop(),t.push(`INSIDE_OBJECT_BEFORE_VALUE`));break;case`INSIDE_OBJECT_BEFORE_VALUE`:i(c,s,`INSIDE_OBJECT_AFTER_VALUE`);break;case`INSIDE_OBJECT_AFTER_VALUE`:a(c,s);break;case`INSIDE_STRING`:switch(c){case`"`:t.pop(),n=s;break;case`\\`:t.push(`INSIDE_STRING_ESCAPE`);break;default:n=s}break;case`INSIDE_ARRAY_START`:c===`]`?(n=s,t.pop()):(n=s,i(c,s,`INSIDE_ARRAY_AFTER_VALUE`));break;case`INSIDE_ARRAY_AFTER_VALUE`:switch(c){case`,`:t.pop(),t.push(`INSIDE_ARRAY_AFTER_COMMA`);break;case`]`:n=s,t.pop();break;default:n=s}break;case`INSIDE_ARRAY_AFTER_COMMA`:i(c,s,`INSIDE_ARRAY_AFTER_VALUE`);break;case`INSIDE_STRING_ESCAPE`:t.pop(),n=s;break;case`INSIDE_NUMBER`:switch(c){case`0`:case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:n=s;break;case`e`:case`E`:case`-`:case`.`:break;case`,`:t.pop(),t[t.length-1]===`INSIDE_ARRAY_AFTER_VALUE`&&o(c,s),t[t.length-1]===`INSIDE_OBJECT_AFTER_VALUE`&&a(c,s);break;case`}`:t.pop(),t[t.length-1]===`INSIDE_OBJECT_AFTER_VALUE`&&a(c,s);break;case`]`:t.pop(),t[t.length-1]===`INSIDE_ARRAY_AFTER_VALUE`&&o(c,s);break;default:t.pop()}break;case`INSIDE_LITERAL`:{let i=e.substring(r,s+1);`false`.startsWith(i)||`true`.startsWith(i)||`null`.startsWith(i)?n=s:(t.pop(),t[t.length-1]===`INSIDE_OBJECT_AFTER_VALUE`?a(c,s):t[t.length-1]===`INSIDE_ARRAY_AFTER_VALUE`&&o(c,s));break}}}let s=e.slice(0,n+1);for(let n=t.length-1;n>=0;n--)switch(t[n]){case`INSIDE_STRING`:s+=`"`;break;case`INSIDE_OBJECT_KEY`:case`INSIDE_OBJECT_AFTER_KEY`:case`INSIDE_OBJECT_AFTER_COMMA`:case`INSIDE_OBJECT_START`:case`INSIDE_OBJECT_BEFORE_VALUE`:case`INSIDE_OBJECT_AFTER_VALUE`:s+=`}`;break;case`INSIDE_ARRAY_START`:case`INSIDE_ARRAY_AFTER_COMMA`:case`INSIDE_ARRAY_AFTER_VALUE`:s+=`]`;break;case`INSIDE_LITERAL`:{let t=e.substring(r,e.length);`true`.startsWith(t)?s+=`true`.slice(t.length):`false`.startsWith(t)?s+=`false`.slice(t.length):`null`.startsWith(t)&&(s+=`null`.slice(t.length))}}return s}async function fI(e){if(e===void 0)return{value:void 0,state:`undefined-input`};let t=await eF({text:e});return t.success?{value:t.value,state:`successful-parse`}:(t=await eF({text:dI(e)}),t.success?{value:t.value,state:`repaired-parse`}:{value:void 0,state:`failed-parse`})}function pI(e){return e.type.startsWith(`tool-`)}function mI(e){return pI(e)||function(e){return e.type===`dynamic-tool`}(e)}function hI(e){return e.type.split(`-`).slice(1).join(`-`)}function gI({lastMessage:e,messageId:t}){return{message:e?.role===`assistant`?e:{id:t,metadata:void 0,role:`assistant`,parts:[]},activeTextParts:{},activeReasoningParts:{},partialToolCalls:{}}}function _I({stream:e,messageMetadataSchema:t,dataPartSchemas:n,runUpdateMessageJob:r,onError:i,onToolCall:a,onData:o}){return e.pipeThrough(new TransformStream({async transform(e,s){await r(async({state:r,write:c})=>{function l(e){let t=r.message.parts.filter(pI).find(t=>t.toolCallId===e);if(t==null)throw Error(`tool-output-error must be preceded by a tool-input-available`);return t}function u(e){let t=r.message.parts.filter(e=>e.type===`dynamic-tool`).find(t=>t.toolCallId===e);if(t==null)throw Error(`tool-output-error must be preceded by a tool-input-available`);return t}function d(e){let t=r.message.parts.find(t=>pI(t)&&t.toolCallId===e.toolCallId),n=e,i=t;t==null?r.message.parts.push({type:`tool-${e.toolName}`,toolCallId:e.toolCallId,state:e.state,input:n.input,output:n.output,rawInput:n.rawInput,errorText:n.errorText,providerExecuted:n.providerExecuted,preliminary:n.preliminary,...n.providerMetadata==null?{}:{callProviderMetadata:n.providerMetadata}}):(t.state=e.state,i.input=n.input,i.output=n.output,i.errorText=n.errorText,i.rawInput=n.rawInput,i.preliminary=n.preliminary,i.providerExecuted=n.providerExecuted??t.providerExecuted,n.providerMetadata!=null&&t.state===`input-available`&&(t.callProviderMetadata=n.providerMetadata))}function f(e){let t=r.message.parts.find(t=>t.type===`dynamic-tool`&&t.toolCallId===e.toolCallId),n=e,i=t;t==null?r.message.parts.push({type:`dynamic-tool`,toolName:e.toolName,toolCallId:e.toolCallId,state:e.state,input:n.input,output:n.output,errorText:n.errorText,preliminary:n.preliminary,providerExecuted:n.providerExecuted,...n.providerMetadata==null?{}:{callProviderMetadata:n.providerMetadata}}):(t.state=e.state,i.toolName=e.toolName,i.input=n.input,i.output=n.output,i.errorText=n.errorText,i.rawInput=n.rawInput??i.rawInput,i.preliminary=n.preliminary,i.providerExecuted=n.providerExecuted??t.providerExecuted,n.providerMetadata!=null&&t.state===`input-available`&&(t.callProviderMetadata=n.providerMetadata))}async function p(e){if(e!=null){let n=r.message.metadata==null?e:uI(r.message.metadata,e);t!=null&&await QP({value:n,schema:t}),r.message.metadata=n}}switch(e.type){case`text-start`:{let t={type:`text`,text:``,providerMetadata:e.providerMetadata,state:`streaming`};r.activeTextParts[e.id]=t,r.message.parts.push(t),c();break}case`text-delta`:{let t=r.activeTextParts[e.id];t.text+=e.delta,t.providerMetadata=e.providerMetadata??t.providerMetadata,c();break}case`text-end`:{let t=r.activeTextParts[e.id];t.state=`done`,t.providerMetadata=e.providerMetadata??t.providerMetadata,delete r.activeTextParts[e.id],c();break}case`reasoning-start`:{let t={type:`reasoning`,text:``,providerMetadata:e.providerMetadata,state:`streaming`};r.activeReasoningParts[e.id]=t,r.message.parts.push(t),c();break}case`reasoning-delta`:{let t=r.activeReasoningParts[e.id];t.text+=e.delta,t.providerMetadata=e.providerMetadata??t.providerMetadata,c();break}case`reasoning-end`:{let t=r.activeReasoningParts[e.id];t.providerMetadata=e.providerMetadata??t.providerMetadata,t.state=`done`,delete r.activeReasoningParts[e.id],c();break}case`file`:r.message.parts.push({type:`file`,mediaType:e.mediaType,url:e.url}),c();break;case`source-url`:r.message.parts.push({type:`source-url`,sourceId:e.sourceId,url:e.url,title:e.title,providerMetadata:e.providerMetadata}),c();break;case`source-document`:r.message.parts.push({type:`source-document`,sourceId:e.sourceId,mediaType:e.mediaType,title:e.title,filename:e.filename,providerMetadata:e.providerMetadata}),c();break;case`tool-input-start`:{let t=r.message.parts.filter(pI);r.partialToolCalls[e.toolCallId]={text:``,toolName:e.toolName,index:t.length,dynamic:e.dynamic},e.dynamic?f({toolCallId:e.toolCallId,toolName:e.toolName,state:`input-streaming`,input:void 0,providerExecuted:e.providerExecuted}):d({toolCallId:e.toolCallId,toolName:e.toolName,state:`input-streaming`,input:void 0,providerExecuted:e.providerExecuted}),c();break}case`tool-input-delta`:{let t=r.partialToolCalls[e.toolCallId];t.text+=e.inputTextDelta;let{value:n}=await fI(t.text);t.dynamic?f({toolCallId:e.toolCallId,toolName:t.toolName,state:`input-streaming`,input:n}):d({toolCallId:e.toolCallId,toolName:t.toolName,state:`input-streaming`,input:n}),c();break}case`tool-input-available`:e.dynamic?f({toolCallId:e.toolCallId,toolName:e.toolName,state:`input-available`,input:e.input,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}):d({toolCallId:e.toolCallId,toolName:e.toolName,state:`input-available`,input:e.input,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}),c(),a&&!e.providerExecuted&&await a({toolCall:e});break;case`tool-input-error`:e.dynamic?f({toolCallId:e.toolCallId,toolName:e.toolName,state:`output-error`,input:e.input,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}):d({toolCallId:e.toolCallId,toolName:e.toolName,state:`output-error`,input:void 0,rawInput:e.input,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}),c();break;case`tool-output-available`:if(e.dynamic){let t=u(e.toolCallId);
111f({toolCallId:e.toolCallId,toolName:t.toolName,state:`output-available`,input:t.input,output:e.output,preliminary:e.preliminary})}else{let t=l(e.toolCallId);d({toolCallId:e.toolCallId,toolName:hI(t),state:`output-available`,input:t.input,output:e.output,providerExecuted:e.providerExecuted,preliminary:e.preliminary})}c();break;case`tool-output-error`:if(e.dynamic){let t=u(e.toolCallId);f({toolCallId:e.toolCallId,toolName:t.toolName,state:`output-error`,input:t.input,errorText:e.errorText,providerExecuted:e.providerExecuted})}else{let t=l(e.toolCallId);d({toolCallId:e.toolCallId,toolName:hI(t),state:`output-error`,input:t.input,rawInput:t.rawInput,errorText:e.errorText,providerExecuted:e.providerExecuted})}c();break;case`start-step`:r.message.parts.push({type:`step-start`});break;case`finish-step`:r.activeTextParts={},r.activeReasoningParts={};break;case`start`:e.messageId!=null&&(r.message.id=e.messageId),await p(e.messageMetadata),e.messageId==null&&e.messageMetadata==null||c();break;case`finish`:e.finishReason!=null&&(r.finishReason=e.finishReason),await p(e.messageMetadata),e.messageMetadata!=null&&c();break;case`message-metadata`:await p(e.messageMetadata),e.messageMetadata!=null&&c();break;case`error`:i?.(Error(e.errorText));break;default:if(function(e){return e.type.startsWith(`data-`)}(e)){n?.[e.type]!=null&&await QP({value:e.data,schema:n[e.type]});let t=e;if(t.transient){o?.(t);break}let i=t.id==null?void 0:r.message.parts.find(e=>t.type===e.type&&t.id===e.id);i==null?r.message.parts.push(t):i.data=t.data,o?.(t),c()}}s.enqueue(e)})}}))}HP({prefix:`aitxt`,size:24}),HP({prefix:`aiobj`,size:24});var vI=class{constructor(){this.queue=[],this.isProcessing=!1}async processQueue(){if(!this.isProcessing){for(this.isProcessing=!0;this.queue.length>0;)await this.queue[0](),this.queue.shift();this.isProcessing=!1}}async run(e){return new Promise((t,n)=>{this.queue.push(async()=>{try{await e(),t()}catch(e){n(e)}}),this.processQueue()})}};HP({prefix:`aiobj`,size:24}),((e,t)=>{for(var n in t)WF(e,n,{get:t[n],enumerable:!0})})({},{object:()=>bI,text:()=>yI});var yI=()=>({type:`text`,responseFormat:{type:`text`},parsePartial:async({text:e})=>({partial:e}),parseOutput:async({text:e})=>e}),bI=({schema:e})=>{let t=VF(e);return{type:`object`,responseFormat:{type:`json`,schema:t.jsonSchema},async parsePartial({text:e}){let t=await fI(e);switch(t.state){case`failed-parse`:case`undefined-input`:return;case`repaired-parse`:case`successful-parse`:return{partial:t.value};default:{let e=t.state;throw Error(`Unsupported parse state: ${e}`)}}},async parseOutput({text:e},n){let r=await eF({text:e});if(!r.success)throw new JF({message:`No object generated: could not parse the response.`,cause:r.error,text:e,response:n.response,usage:n.usage,finishReason:n.finishReason});let i=await $P({value:r.value,schema:t});if(!i.success)throw new JF({message:`No object generated: response did not match schema.`,cause:i.error,text:e,response:n.response,usage:n.usage,finishReason:n.finishReason});return i.value}}},xI,SI,CI=class{constructor({api:e=`/api/chat`,credentials:t,headers:n,body:r,fetch:i,prepareSendMessagesRequest:a,prepareReconnectToStreamRequest:o}){this.api=e,this.credentials=t,this.headers=n,this.body=r,this.fetch=i,this.prepareSendMessagesRequest=a,this.prepareReconnectToStreamRequest=o}async sendMessages({abortSignal:e,...t}){let n=await tF(this.body),r=await tF(this.headers),i=await tF(this.credentials),a={...GP(r),...GP(t.headers)},o=await this.prepareSendMessagesRequest?.call(this,{api:this.api,id:t.chatId,messages:t.messages,body:{...n,...t.body},headers:a,credentials:i,requestMetadata:t.metadata,trigger:t.trigger,messageId:t.messageId}),s=o?.api??this.api,c=o?.headers===void 0?a:GP(o.headers),l=o?.body===void 0?{...n,...t.body,id:t.chatId,messages:t.messages,trigger:t.trigger,messageId:t.messageId}:o.body,u=o?.credentials??i,d=await(this.fetch??globalThis.fetch)(s,{method:`POST`,headers:KP({"Content-Type":`application/json`,...c},`ai-sdk/${QF}`,WP()),body:JSON.stringify(l),credentials:u,signal:e});if(!d.ok)throw Error(await d.text()??`Failed to fetch the chat response.`);if(!d.body)throw Error(`The response body is empty.`);return this.processResponseStream(d.body)}async reconnectToStream(e){let t=await tF(this.body),n=await tF(this.headers),r=await tF(this.credentials),i={...GP(n),...GP(e.headers)},a=await this.prepareReconnectToStreamRequest?.call(this,{api:this.api,id:e.chatId,body:{...t,...e.body},headers:i,credentials:r,requestMetadata:e.metadata}),o=a?.api??`${this.api}/${e.chatId}/stream`,s=a?.headers===void 0?i:GP(a.headers),c=a?.credentials??r,l=await(this.fetch??globalThis.fetch)(o,{method:`GET`,headers:KP(s,`ai-sdk/${QF}`,WP()),credentials:c});if(l.status===204)return null;if(!l.ok)throw Error(await l.text()??`Failed to fetch the chat response.`);if(!l.body)throw Error(`The response body is empty.`);return this.processResponseStream(l.body)}},wI=class extends CI{constructor(e={}){super(e)}processResponseStream(e){return function({stream:e,schema:t}){return e.pipeThrough(new TextDecoderStream).pipeThrough(new tO).pipeThrough(new TransformStream({async transform({data:e},n){e!==`[DONE]`&&n.enqueue(await eF({text:e,schema:t}))}}))}({stream:e,schema:lI}).pipeThrough(new TransformStream({async transform(e,t){if(!e.success)throw e.error;t.enqueue(e.value)}}))}},TI=class{constructor({generateId:e=UP,id:t=e(),transport:n=new wI,messageMetadataSchema:r,dataPartSchemas:i,state:a,onError:o,onToolCall:s,onFinish:c,onData:l,sendAutomaticallyWhen:u}){this.activeResponse=void 0,this.jobExecutor=new vI,this.sendMessage=async(e,t)=>
111{if(e==null)return void await this.makeRequest({trigger:`submit-message`,messageId:this.lastMessage?.id,...t});let n;if(n=`text`in e||`files`in e?{parts:[...Array.isArray(e.files)?e.files:await async function(e){if(e==null)return[];if(!(globalThis.FileList&&e instanceof globalThis.FileList))throw Error(`FileList is not supported in the current environment`);return Promise.all(Array.from(e).map(async e=>{let{name:t,type:n}=e;return{type:`file`,mediaType:n,filename:t,url:await new Promise((t,n)=>{let r=new FileReader;r.onload=e=>{t(e.target?.result)},r.onerror=e=>n(e),r.readAsDataURL(e)})}}))}(e.files),...`text`in e&&e.text!=null?[{type:`text`,text:e.text}]:[]]}:e,e.messageId!=null){let t=this.state.messages.findIndex(t=>t.id===e.messageId);if(t===-1)throw Error(`message with id ${e.messageId} not found`);if(this.state.messages[t].role!==`user`)throw Error(`message with id ${e.messageId} is not a user message`);this.state.messages=this.state.messages.slice(0,t+1),this.state.replaceMessage(t,{...n,id:e.messageId,role:n.role??`user`,metadata:e.metadata})}else this.state.pushMessage({...n,id:n.id??this.generateId(),role:n.role??`user`,metadata:e.metadata});await this.makeRequest({trigger:`submit-message`,messageId:e.messageId,...t})},this.regenerate=async({messageId:e,...t}={})=>{let n=e==null?this.state.messages.length-1:this.state.messages.findIndex(t=>t.id===e);if(n===-1)throw Error(`message ${e} not found`);this.state.messages=this.state.messages.slice(0,this.messages[n].role===`assistant`?n:n+1),await this.makeRequest({trigger:`regenerate-message`,messageId:e,...t})},this.resumeStream=async(e={})=>{await this.makeRequest({trigger:`resume-stream`,...e})},this.clearError=()=>{this.status===`error`&&(this.state.error=void 0,this.setStatus({status:`ready`}))},this.addToolOutput=async({state:e=`output-available`,tool:t,toolCallId:n,output:r,errorText:i})=>this.jobExecutor.run(async()=>{var t;let a=this.state.messages,o=a[a.length-1];this.state.replaceMessage(a.length-1,{...o,parts:o.parts.map(t=>mI(t)&&t.toolCallId===n?{...t,state:e,output:r,errorText:i}:t)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(t=>mI(t)&&t.toolCallId===n?{...t,state:e,output:r,errorText:i}:t)),this.status!==`streaming`&&this.status!==`submitted`&&(t=this.sendAutomaticallyWhen)!=null&&t.call(this,{messages:this.state.messages})&&this.makeRequest({trigger:`submit-message`,messageId:this.lastMessage?.id})}),this.addToolResult=this.addToolOutput,this.stop=async()=>{var e;this.status!==`streaming`&&this.status!==`submitted`||(e=this.activeResponse)!=null&&e.abortController&&this.activeResponse.abortController.abort()},this.id=t,this.transport=n,this.generateId=e,this.messageMetadataSchema=r,this.dataPartSchemas=i,this.state=a,this.onError=o,this.onToolCall=s,this.onFinish=c,this.onData=l,this.sendAutomaticallyWhen=u}get status(){return this.state.status}setStatus({status:e,error:t}){this.status!==e&&(this.state.status=e,this.state.error=t)}get error(){return this.state.error}get messages(){return this.state.messages}get lastMessage(){return this.state.messages[this.state.messages.length-1]}set messages(e){this.state.messages=e}async makeRequest({trigger:e,metadata:t,headers:n,body:r,messageId:i}){var a,o;this.setStatus({status:`submitted`,error:void 0});let s=this.lastMessage,c=!1,l=!1,u=!1;try{let a={state:gI({lastMessage:this.state.snapshot(s),messageId:this.generateId()}),abortController:new AbortController},o;if(a.abortController.signal.addEventListener(`abort`,()=>{c=!0}),this.activeResponse=a,e===`resume-stream`){let e=await this.transport.reconnectToStream({chatId:this.id,metadata:t,headers:n,body:r});if(e==null)return void this.setStatus({status:`ready`});o=e}else o=await this.transport.sendMessages({chatId:this.id,messages:this.state.messages,abortSignal:a.abortController.signal,metadata:t,headers:n,body:r,trigger:e,messageId:i});await async function({stream:e,onError:t}){let n=e.getReader();try{for(;;){let{done:e}=await n.read();if(e)break}}catch(e){t?.(e)}finally{n.releaseLock()}}({stream:_I({stream:o,onToolCall:this.onToolCall,onData:this.onData,messageMetadataSchema:this.messageMetadataSchema,dataPartSchemas:this.dataPartSchemas,runUpdateMessageJob:e=>this.jobExecutor.run(()=>e({state:a.state,write:()=>{this.setStatus({status:`streaming`}),a.state.message.id===this.lastMessage?.id?this.state.replaceMessage(this.state.messages.length-1,a.state.message):this.state.pushMessage(a.state.message)}})),onError:e=>{throw e}}),onError:e=>{throw e}}),this.setStatus({status:`ready`})}catch(e){if(c||e.name===`AbortError`)return c=!0,this.setStatus({status:`ready`}),null;u=!0,e instanceof TypeError&&(e.message.toLowerCase().includes(`fetch`)||e.message.toLowerCase().includes(`network`))&&(l=!0),this.onError&&e instanceof Error&&this.onError(e),this.setStatus({status:`error`,error:e})}finally{try{(a=this.onFinish)==null||a.call(this,{message:this.activeResponse.state.message,messages:this.state.messages,isAbort:c,isDisconnect:l,isError:u,finishReason:this.activeResponse?.state.finishReason})}catch(e){console.error(e)}this.activeResponse=void 0}(o=this.sendAutomaticallyWhen)!=null&&o.call(this,{messages:this.state.messages}
111)&&!u&&await this.makeRequest({trigger:`submit-message`,messageId:this.lastMessage?.id,metadata:t,headers:n,body:r})}};function EI({messages:e}){let t=e[e.length-1];if(!t||t.role!==`assistant`)return!1;let n=t.parts.reduce((e,t,n)=>t.type===`step-start`?n:e,-1),r=t.parts.slice(n+1).filter(mI).filter(e=>!e.providerExecuted);return r.length>0&&r.every(e=>e.state===`output-available`||e.state===`output-error`)}function DI(){return SI?xI:(SI=1,xI=function(e,t){if(typeof e!=`function`)throw TypeError(`Expected the first argument to be a \`function\`, got \`${Kx(e)}\`.`);var n,r=0;return function(){for(var i=this,a=arguments.length,o=Array(a),s=0;s<a;s++)o[s]=arguments[s];clearTimeout(n);var c=Date.now(),l=t-(c-r);l<=0?(r=c,e.apply(this,o)):n=setTimeout(function(){r=Date.now(),e.apply(i,o)},l)}},xI)}var OI,kI,AI,jI,MI,NI,PI,FI,II,LI=HF(DI()),RI=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},zI=(e,t,n)=>(RI(e,t,`read from private field`),n?n.call(e):t.get(e)),BI=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},VI=(e,t,n,r)=>(RI(e,t,`write to private field`),t.set(e,n),n),HI,UI=class{constructor(e=[]){BI(this,OI,void 0),BI(this,kI,`ready`),BI(this,AI,void 0),BI(this,jI,new Set),BI(this,MI,new Set),BI(this,NI,new Set),this.pushMessage=e=>{VI(this,OI,zI(this,OI).concat(e)),zI(this,PI).call(this)},this.popMessage=()=>{VI(this,OI,zI(this,OI).slice(0,-1)),zI(this,PI).call(this)},this.replaceMessage=(e,t)=>{VI(this,OI,[...zI(this,OI).slice(0,e),this.snapshot(t),...zI(this,OI).slice(e+1)]),zI(this,PI).call(this)},this.snapshot=e=>structuredClone(e),this[`~registerMessagesCallback`]=(e,t)=>{let n=t?(r=e,(i=t)==null?r:LI(r,i)):e;var r,i;return zI(this,jI).add(n),()=>{zI(this,jI).delete(n)}},this[`~registerStatusCallback`]=e=>(zI(this,MI).add(e),()=>{zI(this,MI).delete(e)}),this[`~registerErrorCallback`]=e=>(zI(this,NI).add(e),()=>{zI(this,NI).delete(e)}),BI(this,PI,()=>{zI(this,jI).forEach(e=>e())}),BI(this,FI,()=>{zI(this,MI).forEach(e=>e())}),BI(this,II,()=>{zI(this,NI).forEach(e=>e())}),VI(this,OI,e)}get status(){return zI(this,kI)}set status(e){VI(this,kI,e),zI(this,FI).call(this)}get error(){return zI(this,AI)}set error(e){VI(this,AI,e),zI(this,II).call(this)}get messages(){return zI(this,OI)}set messages(e){VI(this,OI,[...e]),zI(this,PI).call(this)}};OI=new WeakMap,kI=new WeakMap,AI=new WeakMap,jI=new WeakMap,MI=new WeakMap,NI=new WeakMap,PI=new WeakMap,FI=new WeakMap,II=new WeakMap;var WI=class extends TI{constructor({messages:e,...t}){let n=new UI(e);super({...t,state:n}),BI(this,HI,void 0),this[`~registerMessagesCallback`]=(e,t)=>zI(this,HI)[`~registerMessagesCallback`](e,t),this[`~registerStatusCallback`]=e=>zI(this,HI)[`~registerStatusCallback`](e),this[`~registerErrorCallback`]=e=>zI(this,HI)[`~registerErrorCallback`](e),VI(this,HI,n)}};HI=new WeakMap;var GI=`askai_token`,KI=function(e){return`https://${e}.algolia.net/agent-studio/1`},qI=function(e){if(!e)return!0;try{var t=function(e){var t=Wx(e.split(`.`),1)[0];return JSON.parse(atob(t))}(e).exp;return Date.now()/1e3>t-30}catch{return!0}},JI=null,YI=function(){var e=jx(G().m(function e(t){var n,r,i,a,o,s;return G().w(function(e){for(;;)switch(e.n){case 0:if(n=t.assistantId,r=t.abortSignal,i=t.useStagingEnv,a=i!==void 0&&i,o=sessionStorage.getItem(GI),qI(o)){e.n=1;break}return e.a(2,o);case 1:return s=a?nT:tT,JI||=fetch(`${s}/token`,{method:`POST`,headers:{"x-algolia-assistant-id":n,"content-type":`application/json`},signal:r}).then(function(e){return e.json()}).then(function(e){var t=e.token,n=e.success,r=e.message;if(!n&&r)throw Error(r);return sessionStorage.setItem(GI,t),t}).finally(function(){return JI=null}),e.a(2,JI)}},e)}));return function(t){return e.apply(this,arguments)}}(),XI=function(){var e=jx(G().m(function e(t){var n,r,i,a,o,s,c,l,u,d;return G().w(function(e){for(;;)switch(e.n){case 0:return n=t.assistantId,r=t.thumbs,i=t.messageId,a=t.appId,o=t.abortSignal,s=t.useStagingEnv,c=s!==void 0&&s,(l=new Headers).set(`x-algolia-assistant-id`,n),l.set(`content-type`,`application/json`),e.n=1,YI({assistantId:n,abortSignal:o,useStagingEnv:c});case 1:return u=e.v,l.set(`authorization`,`TOKEN ${u}`),d=c?nT:tT,e.a(2,fetch(`${d}/feedback`,{method:`POST`,body:JSON.stringify({appId:a,messageId:i,thumbs:r}),headers:l}))}},e)}));return function(t){return e.apply(this,arguments)}}(),ZI=function(e){var t=e.agentId,n=e.vote,r=e.messageId,i=e.appId,a=e.apiKey,o=e.abortSignal,s=new Headers;s.set(`x-algolia-application-id`,i),s.set(`x-algolia-api-key`,a),s.set(`content-type`,`application/json`);var c=`${KI(i)}/feedback`;return fetch(c,{method:`POST`,body:JSON.stringify({messageId:r,agentId:t,vote:n}),headers:s,signal:o})},QI=[`assistantId`,`apiKey`,`appId`,`indexName`,`useStagingEnv`],$I=function(e){var t=e.assistantId,n=e.apiKey,r=e.appId,i=e.indexName,a=e.useStagingEnv,o=a!==void 0&&a,s=Vx(e,QI),c=(0,B.useRef)(new AbortController),l=Wx((0,B.useState)(function(){return UP()}),2),u=l[0],d=l[1],f=(0,B.useRef)(null),p=(0,B.useRef)(null),m=(0,B.useRef)(null),h=(0,B.useMemo)(function(){return s.agentStudio?function(e){var t=e.appId,n=e.apiKey,r=e.assistantId,i=e.searchParameters;return new wI({api:`${KI(t)}/agents/${r}/completions?stream=true&compatibilityMode=ai-sdk-5`,headers:{"x-algolia-application-id":t,"x-algolia-api-key":n},body:i?{algolia:{searchParameters:i}}:{}})}
111({apiKey:n,appId:r,assistantId:t??``,searchParameters:s.searchParameters}):function(e){var t,n=e.assistantId,r=e.apiKey,i=e.indexName,a=e.searchParameters,o=e.appId,s=e.abortControllerRef,c=e.useStagingEnv;return new wI({api:c?nT:tT,headers:(t=jx(G().m(function e(){var t;return G().w(function(e){for(;;)switch(e.n){case 0:if(n){e.n=1;break}throw Error(`Ask AI assistant ID is required`);case 1:return e.n=2,YI({assistantId:n,abortSignal:s.current.signal,useStagingEnv:c});case 2:return t=e.v,e.a(2,W(W({},t?{authorization:`TOKEN ${t}`}:{}),{},{"X-Algolia-API-Key":r,"X-Algolia-Application-Id":o,"X-Algolia-Index-Name":i,"X-Algolia-Assistant-Id":n||``,"X-AI-SDK-Version":`v5`}))}},e)})),function(){return t.apply(this,arguments)}),body:a?{searchParameters:a}:{}})}({assistantId:t??``,apiKey:n,appId:r,indexName:i,searchParameters:s.searchParameters,abortControllerRef:c,useStagingEnv:o})},[n,r,t,i,o,s]),g=function({experimental_throttle:e,resume:t=!1,...n}={}){let r=(0,B.useRef)(`chat`in n?n.chat:new WI(n));(`chat`in n&&n.chat!==r.current||`id`in n&&r.current.id!==n.id)&&(r.current=`chat`in n?n.chat:new WI(n));let i=`id`in n?n.id:null,a=(0,B.useCallback)(t=>r.current[`~registerMessagesCallback`](t,e),[e,i]),o=(0,B.useSyncExternalStore)(a,()=>r.current.messages,()=>r.current.messages),s=(0,B.useSyncExternalStore)(r.current[`~registerStatusCallback`],()=>r.current.status,()=>r.current.status),c=(0,B.useSyncExternalStore)(r.current[`~registerErrorCallback`],()=>r.current.error,()=>r.current.error),l=(0,B.useCallback)(e=>{typeof e==`function`&&(e=e(r.current.messages)),r.current.messages=e},[r]);return(0,B.useEffect)(()=>{t&&r.current.resumeStream()},[t,r]),{id:r.current.id,messages:o,setMessages:l,sendMessage:r.current.sendMessage,regenerate:r.current.regenerate,clearError:r.current.clearError,stop:r.current.stop,error:c,resumeStream:r.current.resumeStream,status:s,addToolResult:r.current.addToolOutput,addToolOutput:r.current.addToolOutput}}((0,B.useMemo)(function(){return{id:u,sendAutomaticallyWhen:EI,transport:h}},[u,h])),_=g.messages,v=g.sendMessage,y=g.status,b=g.setMessages,x=g.error,S=g.stop,C=g.clearError;p.current=v,m.current=b;var w=(0,B.useRef)(function(e){var t=e.key,n=e.limit,r=n===void 0?5:n,i=kD(t),a=i.getItem().slice(0,r);return{add:function(e){var t=e.objectID,n=e.query,o=a.findIndex(function(e){return e.objectID===t||e.query===n});o>-1?a[o]=e:(a.unshift(e),a=a.slice(0,r)),i.setItem(a)},addFeedback:function(e,t){var n=a.find(function(t){return t.messages?.some(function(t){return t.id===e})});if(n&&n.messages){var r=n.messages.find(function(t){return t.id===e});r&&(r.feedback=t,i.setItem(a))}},getOne:function(e){var t,n=a.find(function(t){return t.messages?.some(function(t){return t.id===e})});return n==null||(t=n.messages)==null?void 0:t.find(function(t){return t.id===e})},getAll:function(){return a},remove:function(e){a=a.filter(function(t){return t.objectID!==e.objectID}),i.setItem(a)},getConversation:function(e){var t=a.find(function(t){return t.messages?.some(function(t){return t.id===e})});if(t&&t.messages)return t}}}({key:`__DOCSEARCH_ASKAI_CONVERSATIONS__${i}`,limit:10})).current,T=(0,B.useCallback)(function(){var e=jx(G().m(function e(i,a){var l;return G().w(function(e){for(;;)switch(e.n){case 0:if(t){e.n=1;break}return e.a(2);case 1:return e.n=2,s.agentStudio?ZI({agentId:t,vote:a,messageId:i,appId:r,apiKey:n,abortSignal:c.current.signal}):XI({assistantId:t,thumbs:a,messageId:i,appId:r,abortSignal:c.current.signal,useStagingEnv:o});case 2:if(!(e.v.status>=300)){e.n=3;break}throw Error(`Failed, try again later.`);case 3:(l=w.addFeedback)==null||l.call(w,i,a===1?`like`:`dislike`);case 4:return e.a(2)}},e)}));return function(t,n){return e.apply(this,arguments)}}(),[t,s.agentStudio,r,n,o,w]),E=(0,B.useCallback)(function(){c.current.abort(),c.current=new AbortController},[]),ee=(0,B.useCallback)(function(e){E(),f.current=e??null,d(UP())},[E]);(0,B.useEffect)(function(){var e=f.current;if(e!==null){var t=p.current,n=m.current;if(e.kind===`sendText`){if(!t)return;f.current=null,t({text:e.text},e.requestOptions??{});return}if(e.kind===`sendUserMessage`){if(!t)return;f.current=null,t(e.message,e.requestOptions??{});return}n&&(f.current=null,n(e.messages))}},[u]);var D=function(){var e=jx(G().m(function e(){return G().w(function(e){for(;;)switch(e.n){case 0:return c.current.abort(),e.n=1,S();
111case 1:c.current=new AbortController;case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),O=(0,B.useMemo)(function(){for(var e=[],t=0;t<_.length;t++)if(_[t].role===`user`){var n=_[t],r=_[t+1]?.role===`assistant`?_[t+1]:null;e.push({id:n.id,userMessage:n,assistantMessage:r}),r&&t++}return e},[_]),k=y===`streaming`||y===`submitted`;return{messages:_,sendMessage:v,status:y,setMessages:b,clearError:C,resetAskAiAbortScope:E,resetAskAiChatSession:ee,askAiError:(0,B.useMemo)(function(){if(x)return s.agentStudio?function(e){var t,n=e.message;try{t=JSON.parse(n)}catch{var r=_S(n);return Error(r??n)}for(;typeof t==`string`;)try{t=JSON.parse(t.trim())}catch{var i=_S(n);return Error(i??t)}if(Kx(t)!==`object`||t===null||Array.isArray(t)){var a=_S(n);return Error(a??n)}var o=t;if(o.name===`ValidationError`){var s=o,c=n;if(s.detail&&s.detail.length>0){var l=s.detail[0];c=`${l.msg}: ${l.loc.at(-1)}`}return Error(c)}var u=_S(n)||(typeof o.message==`string`&&o.message.trim()!==``?o.message.trim():typeof o.error==`string`&&o.error.trim()!==``?o.error.trim():n),d=o.code??o.errorCode;if(typeof d==`string`&&d.trim()!==``){var f=d.trim();u.toUpperCase().includes(f.toUpperCase())||(u=`${u} (${f})`)}return Error(u)}(x):x},[x,s.agentStudio]),stopAskAiStreaming:D,isStreaming:k,exchanges:O,conversations:w,sendFeedback:T}};function eL(e){var t,n=`algolia-client-js-${e.key}`;function r(){return t===void 0&&(t=e.localStorage||window.localStorage),t}function i(){return JSON.parse(r().getItem(n)||`{}`)}function a(e){r().setItem(n,JSON.stringify(e))}return{get:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then(function(){var n=e.timeToLive?1e3*e.timeToLive:null,r=i(),o;return a(o=Object.fromEntries(Object.entries(r).filter(function(e){return Wx(e,2)[1].timestamp!==void 0}))),n&&a(Object.fromEntries(Object.entries(o).filter(function(e){var t=Wx(e,2)[1],r=new Date().getTime();return!(t.timestamp+n<r)}))),i()[JSON.stringify(t)]}).then(function(e){return Promise.all([e?e.value:n(),e!==void 0])}).then(function(e){var t=Wx(e,2),n=t[0],i=t[1];return Promise.all([n,i||r.miss(n)])}).then(function(e){return Wx(e,1)[0]})},set:function(e,t){return Promise.resolve().then(function(){var a=i();return a[JSON.stringify(e)]={timestamp:new Date().getTime(),value:t},r().setItem(n,JSON.stringify(a)),t})},delete:function(e){return Promise.resolve().then(function(){var t=i();delete t[JSON.stringify(e)],r().setItem(n,JSON.stringify(t))})},clear:function(){return Promise.resolve().then(function(){r().removeItem(n)})}}}function tL(e){var t=K(e.caches),n=t.shift();return n===void 0?{get:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then(function(e){return Promise.all([e,n.miss(e)])}).then(function(e){return Wx(e,1)[0]})},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return n.get(e,r,i).catch(function(){return tL({caches:t}).get(e,r,i)})},set:function(e,r){return n.set(e,r).catch(function(){return tL({caches:t}).set(e,r)})},delete:function(e){return n.delete(e).catch(function(){return tL({caches:t}).delete(e)})},clear:function(){return n.clear().catch(function(){return tL({caches:t}).clear()})}}}function nL(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{serializable:!0},t={};return{get:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}},a=JSON.stringify(n);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);var o=r();return o.then(function(e){return i.miss(e)}).then(function(){return o})},set:function(n,r){return t[JSON.stringify(n)]=e.serializable?JSON.stringify(r):r,Promise.resolve(r)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function rL(e){var t=e.algoliaAgents,n=e.client,r=e.version,i=function(e){var t={value:`Algolia for JavaScript (${e})`,add:function(e){var n=`; ${e.segment}${e.version===void 0?``:` (${e.version})`}`;return t.value.indexOf(n)===-1&&(t.value=`${t.value}${n}`),t}};return t}(r).add({segment:n,version:r});return t.forEach(function(e){return i.add(e)}),i}var iL=12e4;function aL(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`up`,n=Date.now();return W(W({},e),{},{status:t,lastUpdate:n,isUp:function(){return t===`up`||Date.now()-n>iL},isTimedOut:function(){return t===`timed out`&&Date.now()-n<=iL}})}var oL=function(){function e(t,n){var r;return V(this,e),Fx(r=Mx(this,e,[t]),`name`,`AlgoliaError`),n&&(r.name=n),r}return Rx(e,Jx(Error)),H(e)}(),sL=function(){function e(t,n,r){var i;return V(this,e),Fx(i=Mx(this,e,[t,r]),`stackTrace`,void 0),i.stackTrace=n,i}return Rx(e,oL),H(e)}(),cL=function(){function e(t){return V(this,e),Mx(this,e,[`Unreachable hosts - your application id may be incorrect. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support`,t,`RetryError`])}return Rx(e,sL),H(e)}(),lL=function(){function e(t,n,r){var i,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:`ApiError`;return V(this,e),Fx(i=Mx(this,e,[t,r,a]),`status`,void 0),i.status=n,i}return Rx(e,sL),H(e)}(),uL=function(){function e(t,n){var r;return V(this,e),Fx(r=Mx(this,e,[t,`DeserializationError`]),`response`,void 0),r.response=n,r}return Rx(e,oL),H(e)}(),dL=function(){function e(t,n,r,i){var a;return V(this,e),Fx(a=Mx(this,e,[t,n,i,`DetailedApiError`]),`error`,void 0),a.error=r,a}return Rx(e,lL),H(e)}();function fL(e,t,n){var r,i=(r=n,Object.keys(r).filter(function(e){return r[e]!==void 0}).sort().map(function(e){return`${e}=${encodeURIComponent(Object.prototype.toString.call(r[e])===`[object Array]`?r[e].join(`,`):r[e]).replace(/\+/g,`%20`)}`}).join(`&`)),a=`${e.protocol}://${e.url}${e.port?`:${e.port}`:``}/${t.charAt(0)===`/`?t.substring(1):t}`;return i.length&&(a+=`?${i}`),a}function pL(e,t){if(e.method!==`GET`&&(e.data!==void 0||t.data!==void 0)){var n=Array.isArray(e.data)?e.data:W(W({},e.data),t.data);return JSON.stringify(n)}}
111function mL(e,t,n){var r=W(W(W({Accept:`application/json`},e),t),n),i={};return Object.keys(r).forEach(function(e){var t=r[e];i[e.toLowerCase()]=t}),i}function hL(e){try{return JSON.parse(e.content)}catch(t){throw new uL(t.message,e)}}function gL(e,t){var n=e.content,r=e.status;try{var i=JSON.parse(n);return`error`in i?new dL(i.message,r,i.error,t):new lL(i.message,r,t)}catch{}return new lL(n,r,t)}function _L(e){var t=e.isTimedOut,n=e.status;return t||function(e){var t=e.isTimedOut,n=e.status;return!t&&~~n===0}({isTimedOut:t,status:n})||~~(n/100)!=2&&~~(n/100)!=4}function vL(e){return~~(e.status/100)==2}function yL(e){return e.map(function(e){return bL(e)})}function bL(e){var t=e.request.headers[`x-algolia-api-key`]?{"x-algolia-api-key":`*****`}:{};return W(W({},e),{},{request:W(W({},e.request),{},{headers:W(W({},e.request.headers),t)})})}var xL=[`appId`,`apiKey`,`authMode`,`algoliaAgents`],SL=[`params`],CL=`5.43.0`;function wL(e){return[{url:`${e}-dsn.algolia.net`,accept:`read`,protocol:`https`},{url:`${e}.algolia.net`,accept:`write`,protocol:`https`}].concat(function(e){for(var t=e,n=e.length-1;n>0;n--){var r=Math.floor(Math.random()*(n+1)),i=e[n];t[n]=e[r],t[r]=i}return t}([{url:`${e}-1.algolianet.com`,accept:`readWrite`,protocol:`https`},{url:`${e}-2.algolianet.com`,accept:`readWrite`,protocol:`https`},{url:`${e}-3.algolianet.com`,accept:`readWrite`,protocol:`https`}]))}function TL(e){var t=e.appId,n=e.apiKey,r=e.authMode,i=e.algoliaAgents,a=Vx(e,xL),o=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:`WithinHeaders`,r={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:function(){return n===`WithinHeaders`?r:{}},queryParameters:function(){return n===`WithinQueryParameters`?r:{}}}}(t,n,r),s=function(e){var t=e.hosts,n=e.hostsCache,r=e.baseHeaders,i=e.logger,a=e.baseQueryParameters,o=e.algoliaAgent,s=e.timeouts,c=e.requester,l=e.requestsCache,u=e.responsesCache;function d(e){return f.apply(this,arguments)}function f(){return(f=jx(G().m(function e(t){var r,i,a,o,s;return G().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,Promise.all(t.map(function(e){return n.get(e,function(){return Promise.resolve(aL(e))})}));case 1:return r=e.v,i=r.filter(function(e){return e.isUp()}),a=r.filter(function(e){return e.isTimedOut()}),o=[].concat(K(i),K(a)),s=o.length>0?o:t,e.a(2,{hosts:s,getTimeout:function(e,t){return(a.length===0&&e===0?1:a.length+3+e)*t}})}},e)}))).apply(this,arguments)}function p(e,t){return m.apply(this,arguments)}function m(){return m=jx(G().m(function e(l,u){var f,p,m,h,g,_,v,y,b,x,S,C,w,T=arguments;return G().w(function(e){for(;;)switch(e.n){case 0:if(f=!(T.length>2&&T[2]!==void 0)||T[2],p=[],m=pL(l,u),h=mL(r,l.headers,u.headers),g=l.method===`GET`?W(W({},l.data),u.data):{},_=W(W(W({},a),l.queryParameters),g),o.value&&(_[`x-algolia-agent`]=o.value),u&&u.queryParameters)for(v=0,y=Object.keys(u.queryParameters);v<y.length;v++)b=y[v],u.queryParameters[b]&&Object.prototype.toString.call(u.queryParameters[b])!==`[object Object]`?_[b]=u.queryParameters[b].toString():_[b]=u.queryParameters[b];return x=0,S=function(){var e=jx(G().m(function e(t,r){var a,o,d,g,v,y;return G().w(function(e){for(;;)switch(e.n){case 0:if((a=t.pop())!==void 0){e.n=1;break}throw new cL(yL(p));case 1:return o=W(W({},s),u.timeouts),d={data:m,headers:h,method:l.method,url:fL(a,l.path,_),connectTimeout:r(x,o.connect),responseTimeout:r(x,f?o.read:o.write)},g=function(e){var n={request:d,response:e,host:a,triesLeft:t.length};return p.push(n),n},e.n=2,c.send(d);case 2:if(!_L(v=e.v)){e.n=4;break}return y=g(v),v.isTimedOut&&x++,i.info(`Retryable failure`,bL(y)),e.n=3,n.set(a,aL(a,v.isTimedOut?`timed out`:`down`));case 3:return e.a(2,S(t,r));case 4:if(!vL(v)){e.n=5;break}return e.a(2,hL(v));case 5:throw g(v),gL(v,p);case 6:return e.a(2)}},e)}));return function(t,n){return e.apply(this,arguments)}}(),C=t.filter(function(e){return e.accept===`readWrite`||(f?e.accept===`read`:e.accept===`write`)}),e.n=1,d(C);case 1:return w=e.v,e.a(2,S(K(w.hosts).reverse(),w.getTimeout))}},e)})),m.apply(this,arguments)}return{hostsCache:n,requester:c,timeouts:s,logger:i,algoliaAgent:o,baseHeaders:r,baseQueryParameters:a,hosts:t,request:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.useReadTransporter||e.method===`GET`;if(!n)return p(e,t,n);var i=function(){return p(e,t)};if(!0!==(t.cacheable||e.cacheable))return i();var o={request:e,requestOptions:t,transporter:{queryParameters:a,headers:r}};return u.get(o,function(){return l.get(o,function(){return l.set(o,i()).then(function(e){return Promise.all([l.delete(o),e])},function(e){return Promise.all([l.delete(o),Promise.reject(e)])}).then(function(e){var t=Wx(e,2);return t[0],t[1]})})},{miss:function(e){return u.set(o,e)}})},requestsCache:l,responsesCache:u}}(W(W({hosts:wL(t)},a),{},{algoliaAgent:rL({algoliaAgents:i,client:`Lite`,version:CL}),baseHeaders:W(W({"content-type":`text/plain`},o.headers()),a.baseHeaders),baseQueryParameters:W(W({},o.queryParameters()),a.baseQueryParameters)}));return{transporter:s,appId:t,apiKey:n,clearCache:function(){return Promise.all([s.requestsCache.clear(),s.responsesCache.clear()]).then(function(){})},get _ua(){return s.algoliaAgent.value},addAlgoliaAgent:function(e,t){s.algoliaAgent.add({segment:e,version:t})},setClientApiKey:function(e){var t=e.apiKey;r&&r!==`WithinHeaders`?s.baseQueryParameters[`x-algolia-api-key`]=t:s.baseHeaders[`x-algolia-api-key`]=t},searchForHits:function(e,t){return this.search(e,t)},searchForFacets:function(e,t){return this.search(e,t)},customPost:function(e,t){var n=e.path,r=e.parameters,i=e.body;if(!n)throw Error("Parameter `path` is required when calling `customPost`.");var a={method:`POST`,path:`/{path}`.replace(`{path}`,n),queryParameters:r||{},headers:{},data:i||{}};return s.request(a,t)},getRecommendations:function(e,t){if(e&&Array.isArray(e)&&(e={requests:e}),!e)throw Error("Parameter `getRecommendationsParams` is required when calling `getRecommendations`.");if(!e.requests)throw Error("Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.");var n={method:`POST`,path:`/1/indexes/*/recommendations`,queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return s.request(n,t)},search:function(e,t){if(e&&Array.isArray(e)&&(e={requests:e.map(function(e){var t=e.params,n=Vx(e,SL);return n.type===`facet`?W(W(W({},n),t),{},{type:`facet`}):W(W(W({},n),t),{},{facet:void 0,maxFacetHits:void 0,facetQuery:void 0})})}),!e)throw Error("Parameter `searchMethodParams` is required when calling `search`.");if(!e.requests)throw Error("Parameter `searchMethodParams.requests` is required when calling `search`.");var n={method:`POST`,path:`/1/indexes/*/queries`,queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return s.request(n,t)}}}var EL=`4.6.3`;function DL(e,t,n){return B.useMemo(function(){var r=function(e,t,n){if(!e||typeof e!=`string`)throw Error("`appId` is missing.");if(!t||typeof t!=`string`)throw Error("`apiKey` is missing.");return TL(W({appId:e,apiKey:t,timeouts:{connect:1e3,read:2e3,write:3e4},logger:{debug:function(e,t){return Promise.resolve()},info:function(e,t){return Promise.resolve()},error:function(e,t){return Promise.resolve()}},requester:{send:function(e){return new Promise(function(t){var n=new XMLHttpRequest;
111n.open(e.method,e.url,!0),Object.keys(e.headers).forEach(function(t){return n.setRequestHeader(t,e.headers[t])});var r,i=function(e,r){return setTimeout(function(){n.abort(),t({status:0,content:r,isTimedOut:!0})},e)},a=i(e.connectTimeout,`Connection timeout`);n.onreadystatechange=function(){n.readyState>n.OPENED&&r===void 0&&(clearTimeout(a),r=i(e.responseTimeout,`Socket timeout`))},n.onerror=function(){n.status===0&&(clearTimeout(a),clearTimeout(r),t({content:n.responseText||`Network request failed`,status:n.status,isTimedOut:!1}))},n.onload=function(){clearTimeout(a),clearTimeout(r),t({content:n.responseText,status:n.status,isTimedOut:!1})},n.send(e.data)})}},algoliaAgents:[{segment:`Browser`}],authMode:`WithinQueryParameters`,responsesCache:nL(),requestsCache:nL({serializable:!1}),hostsCache:tL({caches:[eL({key:`${CL}-${e}`}),nL()]})},n))}(e,t);return r.addAlgoliaAgent(`docsearch`,EL),!1===/docsearch.js \(.*\)/.test(r.transporter.algoliaAgent.value)&&r.addAlgoliaAgent(`docsearch-react`,`4.6.3`),n(r)},[e,t,n])}var OL=`appId.apiKey.askAi.maxResultsPerGroup.theme.onClose.transformItems.hitComponent.resultsFooterComponent.navigator.initialScrollY.transformSearchClient.disableUserPersonalization.initialQuery.translations.getMissingResultsUrl.insights.onAskAiToggle.interceptAskAiEvent.isAskAiActive.recentSearchesLimit.recentSearchesWithFavoritesLimit.indices.indexName.searchParameters.isHybridModeSupported`.split(`.`),kL=[`footer`,`searchBox`],AL=function(){var e=jx(G().m(function e(t){var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b;return G().w(function(e){for(;;)switch(e.p=e.n){case 0:return n=t.query,r=t.state,i=t.setContext,a=t.setStatus,o=t.searchClient,s=t.indexes,c=t.snippetLength,l=t.insights,u=t.appId,d=t.apiKey,f=t.maxResultsPerGroup,p=t.transformItems,m=p===void 0?TS:p,h=t.saveRecentSearch,g=t.onClose,_=l,e.p=1,e.n=2,o.search({requests:s.map(function(e){var t=typeof e==`string`?e:e.name,r=typeof e==`string`?{}:e.searchParameters;return W({query:n,indexName:t,attributesToRetrieve:r?.attributesToRetrieve??[`hierarchy.lvl0`,`hierarchy.lvl1`,`hierarchy.lvl2`,`hierarchy.lvl3`,`hierarchy.lvl4`,`hierarchy.lvl5`,`hierarchy.lvl6`,`content`,`type`,`url`],attributesToSnippet:r?.attributesToSnippet??[`hierarchy.lvl1:${c.current}`,`hierarchy.lvl2:${c.current}`,`hierarchy.lvl3:${c.current}`,`hierarchy.lvl4:${c.current}`,`hierarchy.lvl5:${c.current}`,`hierarchy.lvl6:${c.current}`,`content:${c.current}`],snippetEllipsisText:r?.snippetEllipsisText??`…`,highlightPreTag:r?.highlightPreTag??`<mark>`,highlightPostTag:r?.highlightPostTag??`</mark>`,hitsPerPage:r?.hitsPerPage??20,clickAnalytics:r?.clickAnalytics??_},r??{})})});case 2:return v=e.v,y=v.results,e.a(2,y.flatMap(function(e){var t=e,n=t.hits,a=t.nbHits,o=wS(m(n),function(e){return jS(e)},f);if(r.context.searchSuggestions.length<Object.keys(o).length&&i({searchSuggestions:W(W({},r.context.searchSuggestions??[]),Object.keys(o))}),a){var s=r.context.nbHits;i({nbHits:(s??0)+a})}var c={};return _&&(c={__autocomplete_indexName:t.index,__autocomplete_queryID:t.queryID,__autocomplete_algoliaCredentials:{appId:u,apiKey:d}}),Object.values(o).map(function(e,n){return{sourceId:`hits_${t.index}_${n}`,onSelect:function(e){var t=e.item,n=e.event;h(t),ES(n)||g()},getItemUrl:function(e){return e.item.url},getItems:function(){return Object.values(wS(e,function(e){return e.hierarchy.lvl1},f)).map(function(e){return e.map(function(t){var n=null,r=e.find(function(e){return e.type===`lvl1`&&e.hierarchy.lvl1===t.hierarchy.lvl1});return t.type!==`lvl1`&&r&&(n=r),W(W({},t),{},{__docsearch_parent:n},c)})}).flat()}}})}));case 3:throw e.p=3,(b=e.v).name===`RetryError`&&a(`error`),b;case 4:return e.a(2)}},e,null,[[1,3]])}));return function(t){return e.apply(this,arguments)}}();function jL(e){var t,n,r,i,a=e.appId,o=e.apiKey,s=e.askAi,c=e.maxResultsPerGroup,l=e.theme,u=e.onClose,d=u===void 0?OS:u,f=e.transformItems,p=f===void 0?TS:f,m=e.hitComponent,h=m===void 0?oT:m,g=e.resultsFooterComponent,_=g===void 0?function(){return null}:g,v=e.navigator,y=e.initialScrollY,b=y===void 0?0:y,x=e.transformSearchClient,S=x===void 0?TS:x,C=e.disableUserPersonalization,w=C!==void 0&&C,T=e.initialQuery,E=T===void 0?``:T,ee=e.translations,D=ee===void 0?{}:ee,O=e.getMissingResultsUrl,k=e.insights,A=k!==void 0&&k,j=e.onAskA
111iToggle,M=e.interceptAskAiEvent,N=e.isAskAiActive,P=N!==void 0&&N,F=e.recentSearchesLimit,I=F===void 0?7:F,te=e.recentSearchesWithFavoritesLimit,ne=te===void 0?4:te,re=e.indices,ie=re===void 0?[]:re,ae=e.indexName,oe=e.searchParameters,L=e.isHybridModeSupported,se=L!==void 0&&L,ce=Vx(e,OL),le=D.footer,ue=D.searchBox,de=Vx(D,kL),fe=Wx(B.useState({query:``,collections:[],completion:null,context:{},isOpen:!1,activeItemId:null,status:`idle`}),2),pe=fe[0],me=fe[1],he=!!s,ge=(D==null||(t=D.searchBox)==null?void 0:t.placeholderText)||ce.placeholder||`Search docs`;he&&(ge=(D==null||(r=D.searchBox)==null?void 0:r.placeholderText)||`Search docs or ask AI a question`),P&&(ge=(D==null||(i=D.searchBox)==null?void 0:i.placeholderTextAskAi)||`Ask another question...`);var _e=B.useRef(null),ve=B.useRef(null),ye=B.useRef(null),be=B.useRef(null),xe=B.useRef(null),Se=B.useRef(15),Ce=B.useRef(typeof window<`u`?window.getSelection().toString().slice(0,512):``).current,we=B.useRef(E||Ce).current,Te=DL(a,o,S),Ee=Kx(s)===`object`?s:null,De=typeof s==`string`?s:Ee?.assistantId||null,Oe=Ee?.searchParameters,ke=Ee?.useStagingEnv||!1,Ae=Wx(B.useState(`initial`),2),je=Ae[0],Me=Ae[1],Ne=function(e){var t=e.assistantId,n=e.searchClient,r=e.suggestedQuestionsEnabled,i=r!==void 0&&r,a=Wx((0,B.useState)([]),2),o=a[0],s=a[1];return(0,B.useEffect)(function(){var e=function(){var e=jx(G().m(function e(){var r,i,a;return G().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,n.search({requests:[{indexName:`algolia_ask_ai_suggested_questions`,filters:`state:published AND assistantId:${t}`,hitsPerPage:3}]});case 1:r=e.v,i=r.results,a=i[0],s(a.hits);case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();i&&t&&t!==``&&e()},[i,t,n]),o}({assistantId:De,searchClient:Te,suggestedQuestionsEnabled:Ee?.suggestedQuestions}),Pe=(n=Ee?.agentStudio)!=null&&n,Fe=[];if(ae&&ae!==``&&Fe.push({name:ae,searchParameters:oe}),ie.length>0&&ie.forEach(function(e){Fe.push(typeof e==`string`?{name:e}:e)}),Fe.length<1)throw Error("Must supply either `indexName` or `indices` for DocSearch to work");var Ie=Fe[0].name,Le=B.useRef(jD({key:`__DOCSEARCH_FAVORITE_SEARCHES__${Ie}`,limit:10})).current,Re=B.useRef(jD({key:`__DOCSEARCH_RECENT_SEARCHES__${Ie}`,limit:Le.getAll().length===0?I:ne})).current,ze=Wx(B.useState(!1),2),Be=ze[0],Ve=ze[1],He=$I({assistantId:De,apiKey:Ee?.apiKey||o,appId:Ee?.appId||a,indexName:Ee?.indexName||Ie,searchParameters:Oe,useStagingEnv:ke,agentStudio:Pe}),Ue=He.messages,We=He.status,Ge=He.sendMessage,Ke=He.stopAskAiStreaming,qe=He.askAiError,Je=He.sendFeedback,Ye=He.conversations,Xe=He.clearError,Ze=He.resetAskAiAbortScope,Qe=He.resetAskAiChatSession,$e=B.useRef(We);B.useEffect(function(){if(!w){if($e.current===`streaming`&&We===`ready`){Be&&Ue.at(-1)&&(Ue.at(-1).metadata={stopped:!0});var e=Ue[0];if(e!=null&&e.parts){var t,n=U(e.parts);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.type===`text`&&Ye.add(lS(r.text,Ue))}}catch(e){n.e(e)}finally{n.f()}}}$e.current=We}},[We,Ue,Ye,w,Be]);var et=B.useMemo(function(){return We===`error`&&mS(qe,Pe)},[We,qe,Pe]),tt=B.useMemo(function(){if(et&&je!==`new-conversation`)return hS(qe)?`minimal`:`thread-depth`},[et,je,qe]),nt=B.useCallback(function(e){var t=e.hierarchy,n=[`lvl6`,`lvl5`,`lvl4`,`lvl3`,`lvl2`,`lvl1`,`lvl0`].find(function(e){return t[e]});return W(W({},e),{},{type:n||`lvl0`,content:null})},[]),rt=B.useCallback(function(e){if(!w){var t=e.type===`content`?e.__docsearch_parent||nt(e):e;t&&Le.getAll().findIndex(function(e){return e.objectID===t.objectID})===-1&&Re.add(t)}},[Le,Re,w,nt]),it=B.useCallback(function(e){if(pe.context.algoliaInsightsPlugin&&e.__autocomplete_id){var t=e,n={eventName:`Item Selected`,index:t.__autocomplete_indexName,items:[t],positions:[e.__autocomplete_id],queryID:t.__autocomplete_queryID};pe.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch(n)}},[pe.context.algoliaInsightsPlugin]),at=B.useRef(void 0),ot=B.useCallback(function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;if(e){var r={query:t,suggestedQuestionId:n?.objectID};if(M!=null&&M(r))return void(at.current&&at.current.setQuery(``))}if(e&&je===`new-conversation`&&Me(`initial`),j(e,{query:t,suggestedQuestionId:n?.objectID}),!se){Ve(!1),Ze(),Xe();var i={};if(n&&(i.body={suggestedQuestionId:n.objectID}),Ge({role:`user`,parts:[{type:`text`,text:t}]},i),be.current){var a=be.current;typeof a.scrollTo==`function`?a.scrollTo({top:0,behavior:`smooth`}):a.scrollTop=0}at.current&&at.current.setQuery(``)}},[j,M,je,Me,se,Xe,Ze,Ge]),st=B.useCallback(function(){var e=jx(G().m(function e(t,n){return G().w(function(e){for(;;)switch(e.n){case 0:if(De&&a){e.n=1;break}return e.a(2);case 1:return e.n=2,Je(t,n);case 2:return e.a(2)}},e)}));return function(t,n){return e.apply(this,arguments)}}(),[De,a,Je]);at.current||=eT({id:`docsearch`,defaultActiveItemId:0,openOnFocus:!0,initialState:{query:we,context:{searchSuggestions:[]}},insights:!!A,navigator:v,onStateChange:function(e){me(e.state)},getSources:function(e){var t=e.query,n=e.state,r=e.setContext,i=e.setStatus;if(!t){var s=function(e){var t=e.recentSearches,n=e.favoriteSearches,r=e.saveRecentSearch,i=e.onClose;return e.disableUserPersonalization?[]:[{sourceId:`recentSearches`,onSelect:function(e){var t=e.item,n=e.event;r(t),ES(n)||i()},getItemUrl:function(e){return e.item.url},getItems:function(){return t.getAll()}},{sourceId:`favoriteSearches`,onSelect:function(e){var t=e.item,n=e.event;r(t),ES(n)||i()},getItemUrl:function(e){return e.item.url},getItems:function(){return n.getAll()}}]}
111({recentSearches:Re,favoriteSearches:Le,saveRecentSearch:rt,onClose:d,disableUserPersonalization:w}),l=he?[{sourceId:`recentConversations`,getItems:function(){return w?[]:Ye.getAll()},onSelect:function(e){var t=e.item;t.messages&&(Qe({kind:`setMessages`,messages:t.messages}),j(!0))}}]:[];return[].concat(K(s),l)}var u=AL({query:t,state:{context:n.context},setContext:r,setStatus:i,searchClient:Te,indexes:Fe,snippetLength:Se,insights:!!A,appId:a,apiKey:o,maxResultsPerGroup:c,transformItems:p,saveRecentSearch:rt,onClose:d}),f=he?[{sourceId:`askAI`,getItems:function(){return[{type:`askAI`,query:t,url_without_anchor:``,objectID:`ask-ai-button`,content:null,url:``,anchor:null,hierarchy:{lvl0:`Ask AI`,lvl1:t,lvl2:null,lvl3:null,lvl4:null,lvl5:null,lvl6:null},_highlightResult:{},_snippetResult:{},__docsearch_parent:null}]},onSelect:function(e){var t=e.item;t.type===`askAI`&&t.query&&ot(!0,t.query)}}]:[];return u.then(function(e){return[].concat(f,K(e))})}});var ct,lt,ut=at.current,dt=ut.getEnvironmentProps,ft=ut.getRootProps,pt=ut.refresh;(function(e){var t=e.getEnvironmentProps,n=e.panelElement,r=e.formElement,i=e.inputElement;B.useEffect(function(){if(n&&r&&i){var e=t({panelElement:n,formElement:r,inputElement:i}),a=e.onTouchStart,o=e.onTouchMove;return window.addEventListener(`touchstart`,a),window.addEventListener(`touchmove`,o),function(){window.removeEventListener(`touchstart`,a),window.removeEventListener(`touchmove`,o)}}},[t,n,r,i])})({getEnvironmentProps:dt,panelElement:be.current,formElement:ye.current,inputElement:xe.current}),ct={container:_e.current},lt=ct.container,B.useEffect(function(){if(lt){var e=lt.querySelectorAll(`a[href]:not([disabled]), button:not([disabled]), input:not([disabled])`),t=e[0],n=e[e.length-1];return lt.addEventListener(`keydown`,r),function(){lt.removeEventListener(`keydown`,r)}}function r(e){e.key===`Tab`&&(e.shiftKey?document.activeElement===t&&(e.preventDefault(),n.focus()):document.activeElement===n&&(e.preventDefault(),t.focus()))}},[lt]),bS({theme:l}),B.useEffect(function(){return document.body.classList.add(`DocSearch--active`),function(){var e,t;document.body.classList.remove(`DocSearch--active`),(e=(t=window).scrollTo)==null||e.call(t,0,b)}},[]),B.useEffect(function(){OD()},[]),B.useLayoutEffect(function(){var e=window.innerWidth-document.body.clientWidth;return document.body.style.marginInlineEnd=`${e}px`,function(){document.body.style.marginInlineEnd=`0px`}},[]),B.useEffect(function(){window.matchMedia(`(max-width: 768px)`).matches&&(Se.current=5)},[]),B.useEffect(function(){var e;be.current&&!P&&(typeof(e=be.current).scrollTo==`function`?e.scrollTo({top:0,behavior:`smooth`}):e.scrollTop=0)},[pe.query,P]),B.useEffect(function(){we.length>0&&(pt(),xe.current&&xe.current.focus())},[we,pt]),B.useEffect(function(){function e(){if(ve.current){var e=.01*window.innerHeight;ve.current.style.setProperty(`--docsearch-vh`,`${e}px`)}}return e(),window.addEventListener(`resize`,e),function(){window.removeEventListener(`resize`,e)}},[]);var mt=B.useRef(P);B.useEffect(function(){mt.current&&!P&&(ut.refresh(),Xe(),Qe()),mt.current=P},[P,ut,Xe,Qe]),B.useEffect(function(){Me(`initial`)},[P,Me]);var ht=function(){var e=jx(G().m(function e(){return G().w(function(e){for(;;)switch(e.n){case 0:return Ve(!0),e.n=1,Ke();case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),gt=function(){Xe(),Qe(),Me(`new-conversation`)},_t=!0,vt=pe.collections.some(function(e){return e.items.length>0});return pe.status!==`idle`||!1!==vt||pe.query.length!==0||P||(_t=!1),B.createElement(`div`,Ix({ref:_e},ft({"aria-expanded":!0}),{className:[`DocSearch`,`DocSearch-Container`,pe.status===`stalled`&&`DocSearch-Container--Stalled`,pe.status===`error`&&`DocSearch-Container--Errored`].filter(Boolean).join(` `),role:`button`,tabIndex:0,onMouseDown:function(e){e.target===e.currentTarget&&d()}}),B.createElement(`div`,{className:`DocSearch-Modal`,ref:ve},B.createElement(`header`,{className:`DocSearch-SearchBar`,ref:ye},B.createElement(ED,Ix({},ut,{state:pe,placeholder:ge||`Search docs`,autoFocus:we.length===0,inputRef:xe,isFromSelection:!!we&&we===Ce,translations:ue,isAskAiActive:P,askAiStatus:We,askAiError:qe,askAiState:je,setAskAiState:Me,isThreadDepthError:et&&je!==`new-conversation`,askAiBlockingChrome:tt,onClose:d,onAskAiToggle:j,onAskAgain:function(e){ot(!0,e)},onStopAskAiStreaming:ht,onNewConversation:gt,onViewConversationHistory:function(){Me(`conversation-history`)}}))),_t&&B.createElement(`div`,{className:`DocSearch-Dropdown`,ref:be},B.createElement(yD,Ix({}
111,ut,{indexName:Ie,state:pe,hitComponent:h,resultsFooterComponent:_,disableUserPersonalization:w,recentSearches:Re,favoriteSearches:Le,conversations:Ye,inputRef:xe,translations:de,getMissingResultsUrl:O,isAskAiActive:P,canHandleAskAi:he,messages:Ue,askAiError:qe,status:We,hasCollections:vt,askAiState:je,selectAskAiQuestion:ot,suggestedQuestions:Ne,selectSuggestedQuestion:function(e){ot(!0,e.question,e)},agentStudio:Pe,onAskAiToggle:j,onNewConversation:gt,onItemClick:function(e,t){if(e.type===`askAI`&&e.query){if(e.anchor===`stored`&&`messages`in e){Qe({kind:`setMessages`,messages:e.messages});var n={query:e.query,messageId:e.messages[0].id};if(M!=null&&M(n))return at.current&&at.current.setQuery(``),void t.preventDefault();j(!0,n)}else ot(!0,e.query);Me(`initial`),t.preventDefault();return}it(e),rt(e),ES(t)||d()},onFeedback:st}))),B.createElement(`footer`,{className:`DocSearch-Footer`},B.createElement(aT,{translations:le,isAskAiActive:P}))))}var ML=B.forwardRef(function(e,t){return B.createElement(Dx,Ix({},e,{ref:t}),B.createElement(NL,e))});function NL(e){var t,n=Ox(),r=n.searchButtonRef,i=n.keyboardShortcuts,a=n.isModalActive,o=n.isAskAiActive,s=n.initialQuery,c=n.onAskAiToggle,l=n.openModal,u=n.closeModal;return B.createElement(B.Fragment,null,B.createElement(NS,{keyboardShortcuts:i,ref:r,translations:e.translations?.button,onClick:l}),a&&(0,Yd.createPortal)(B.createElement(jL,Ix({},e,{initialScrollY:window.scrollY,initialQuery:s,translations:e==null||(t=e.translations)==null?void 0:t.modal,isAskAiActive:o,onAskAiToggle:c,onClose:u})),e.portalContainer??document.body))}export{Fv as a,Ud as c,Od as d,yd as f,uy as i,Vd as l,hx as n,Tv as o,Ey as r,Gd as s,ML as t,zd as u};

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.