mastra 0.10.13-alpha.1 → 0.10.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -6
- package/src/playground/dist/assets/{index-CQUZzE3V.js → index-Bncwsm_d.js} +4 -4
- package/src/playground/dist/assets/{index-B_Qdb7Wa.js → index-D1XeC4tv.js} +1 -1
- package/src/playground/dist/assets/{index-Q_5l7c_H.js → index-bd7ggwIc.js} +1 -1
- package/src/playground/dist/index.html +1 -1
|
@@ -575,7 +575,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
575
575
|
`),style:o,startingLineNumber:a}))}function DGe(e){return"".concat(e.toString().length,".25em")}function Lce(e,t){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(e),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:t},children:[{type:"text",value:e}]}}function Bce(e,t,n){var r={display:"inline-block",minWidth:DGe(n),paddingRight:"1em",textAlign:"right",userSelect:"none"},s=typeof e=="function"?e(t):e,i=Gf(Gf({},r),s);return i}function GE(e){var t=e.children,n=e.lineNumber,r=e.lineNumberStyle,s=e.largestLineNumber,i=e.showInlineLineNumbers,o=e.lineProps,a=o===void 0?{}:o,l=e.className,c=l===void 0?[]:l,u=e.showLineNumbers,d=e.wrapLongLines,p=e.wrapLines,g=p===void 0?!1:p,b=g?Gf({},typeof a=="function"?a(n):a):{};if(b.className=b.className?[].concat(ZP(b.className.trim().split(/\s+/)),ZP(c)):c,n&&i){var x=Bce(r,n,s);t.unshift(Lce(n,x))}return d&u&&(b.style=Gf({display:"flex"},b.style)),{type:"element",tagName:"span",properties:b,children:t}}function $ce(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],r=0;r<e.length;r++){var s=e[r];if(s.type==="text")n.push(GE({children:[s],className:ZP(new Set(t))}));else if(s.children){var i=t.concat(s.properties.className);$ce(s.children,i).forEach(function(o){return n.push(o)})}}return n}function AGe(e,t,n,r,s,i,o,a,l){var c,u=$ce(e.value),d=[],p=-1,g=0;function b(M,j){var F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return GE({children:M,lineNumber:j,lineNumberStyle:a,largestLineNumber:o,showInlineLineNumbers:s,lineProps:n,className:F,showLineNumbers:r,wrapLongLines:l,wrapLines:t})}function x(M,j){if(r&&j&&s){var F=Bce(a,j,o);M.unshift(Lce(j,F))}return M}function S(M,j){var F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return t||F.length>0?b(M,j,F):x(M,j)}for(var E=function(){var j=u[g],F=j.children[0].value,I=CGe(F);if(I){var B=F.split(`
|
|
576
576
|
`);B.forEach(function(L,W){var $=r&&d.length+i,J={type:"text",value:"".concat(L,`
|
|
577
577
|
`)};if(W===0){var V=u.slice(p+1,g).concat(GE({children:[J],className:j.properties.className})),Z=S(V,$);d.push(Z)}else if(W===B.length-1){var G=u[g+1]&&u[g+1].children&&u[g+1].children[0],q={type:"text",value:"".concat(L)};if(G){var z=GE({children:[q],className:j.properties.className});u.splice(g+1,0,z)}else{var Y=[q],U=S(Y,$,j.properties.className);d.push(U)}}else{var X=[J],ne=S(X,$,j.properties.className);d.push(ne)}}),p=g}g++};g<u.length;)E();if(p!==u.length-1){var k=u.slice(p+1,u.length);if(k&&k.length){var T=r&&d.length+i,P=S(k,T);d.push(P)}}return t?d:(c=[]).concat.apply(c,d)}function TGe(e){var t=e.rows,n=e.stylesheet,r=e.useInlineStyles;return t.map(function(s,i){return Rce({node:s,stylesheet:n,useInlineStyles:r,key:"code-segement".concat(i)})})}function zce(e){return e&&typeof e.highlightAuto<"u"}function _Ge(e){var t=e.astGenerator,n=e.language,r=e.code,s=e.defaultCodeValue;if(zce(t)){var i=vGe(t,n);return n==="text"?{value:s,language:"text"}:i?t.highlight(n,r):t.highlightAuto(r)}try{return n&&n!=="text"?{value:t.highlight(r,n)}:{value:s}}catch{return{value:s}}}function NGe(e,t){return function(r){var s=r.language,i=r.children,o=r.style,a=o===void 0?t:o,l=r.customStyle,c=l===void 0?{}:l,u=r.codeTagProps,d=u===void 0?{className:s?"language-".concat(s):void 0,style:Gf(Gf({},a['code[class*="language-"]']),a['code[class*="language-'.concat(s,'"]')])}:u,p=r.useInlineStyles,g=p===void 0?!0:p,b=r.showLineNumbers,x=b===void 0?!1:b,S=r.showInlineLineNumbers,E=S===void 0?!0:S,k=r.startingLineNumber,T=k===void 0?1:k,P=r.lineNumberContainerStyle,M=r.lineNumberStyle,j=M===void 0?{}:M,F=r.wrapLines,I=r.wrapLongLines,B=I===void 0?!1:I,L=r.lineProps,W=L===void 0?{}:L,$=r.renderer,J=r.PreTag,V=J===void 0?"pre":J,Z=r.CodeTag,G=Z===void 0?"code":Z,q=r.code,z=q===void 0?(Array.isArray(i)?i[0]:i)||"":q,Y=r.astGenerator,U=uGe(r,wGe);Y=Y||e;var X=x?Se.createElement(EGe,{containerStyle:P,codeStyle:d.style||{},numberStyle:j,startingLineNumber:T,codeString:z}):null,ne=a.hljs||a['pre[class*="language-"]']||{backgroundColor:"#fff"},H=zce(Y)?"hljs":"prismjs",ee=g?Object.assign({},U,{style:Object.assign({},ne,c)}):Object.assign({},U,{className:U.className?"".concat(H," ").concat(U.className):H,style:Object.assign({},c)});if(B?d.style=Gf({whiteSpace:"pre-wrap"},d.style):d.style=Gf({whiteSpace:"pre"},d.style),!Y)return Se.createElement(V,ee,X,Se.createElement(G,d,z));(F===void 0&&$||B)&&(F=!0),$=$||TGe;var ie=[{type:"text",value:z}],se=_Ge({astGenerator:Y,language:s,code:z,defaultCodeValue:ie});se.language===null&&(se.value=ie);var ae=se.value.length;ae===1&&se.value[0].type==="text"&&(ae=se.value[0].value.split(`
|
|
578
|
-
`).length);var le=ae+T,pe=AGe(se,F,W,x,E,T,le,j,B);return Se.createElement(V,ee,Se.createElement(G,d,!E&&X,$({rows:pe,stylesheet:a,useInlineStyles:g})))}}function bG(e,t,n,r,s,i,o){try{var a=e[i](o),l=a.value}catch(c){return void n(c)}a.done?t(l):Promise.resolve(l).then(r,s)}function PGe(e){return function(){var t=this,n=arguments;return new Promise(function(r,s){var i=e.apply(t,n);function o(l){bG(i,r,s,o,a,"next",l)}function a(l){bG(i,r,s,o,a,"throw",l)}o(void 0)})}}function MGe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xG(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,Oce(r.key),r)}}function jGe(e,t,n){return t&&xG(e.prototype,t),n&&xG(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function FGe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function IGe(e,t){if(t&&(yp(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return FGe(e)}function e3(e){return e3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},e3(e)}function QP(e,t){return QP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},QP(e,t)}function OGe(e,t){if(typeof t!="function"&&t!==null)throw new 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&&QP(e,t)}function eM(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */eM=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,s=Object.defineProperty||function(G,q,z){G[q]=z.value},i=typeof Symbol=="function"?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(G,q,z){return Object.defineProperty(G,q,{value:z,enumerable:!0,configurable:!0,writable:!0}),G[q]}try{c({},"")}catch{c=function(z,Y,U){return z[Y]=U}}function u(G,q,z,Y){var U=q&&q.prototype instanceof E?q:E,X=Object.create(U.prototype),ne=new V(Y||[]);return s(X,"_invoke",{value:L(G,z,ne)}),X}function d(G,q,z){try{return{type:"normal",arg:G.call(q,z)}}catch(Y){return{type:"throw",arg:Y}}}t.wrap=u;var p="suspendedStart",g="suspendedYield",b="executing",x="completed",S={};function E(){}function k(){}function T(){}var P={};c(P,o,function(){return this});var M=Object.getPrototypeOf,j=M&&M(M(Z([])));j&&j!==n&&r.call(j,o)&&(P=j);var F=T.prototype=E.prototype=Object.create(P);function I(G){["next","throw","return"].forEach(function(q){c(G,q,function(z){return this._invoke(q,z)})})}function B(G,q){function z(U,X,ne,H){var ee=d(G[U],G,X);if(ee.type!=="throw"){var ie=ee.arg,se=ie.value;return se&&yp(se)=="object"&&r.call(se,"__await")?q.resolve(se.__await).then(function(ae){z("next",ae,ne,H)},function(ae){z("throw",ae,ne,H)}):q.resolve(se).then(function(ae){ie.value=ae,ne(ie)},function(ae){return z("throw",ae,ne,H)})}H(ee.arg)}var Y;s(this,"_invoke",{value:function(X,ne){function H(){return new q(function(ee,ie){z(X,ne,ee,ie)})}return Y=Y?Y.then(H,H):H()}})}function L(G,q,z){var Y=p;return function(U,X){if(Y===b)throw Error("Generator is already running");if(Y===x){if(U==="throw")throw X;return{value:e,done:!0}}for(z.method=U,z.arg=X;;){var ne=z.delegate;if(ne){var H=W(ne,z);if(H){if(H===S)continue;return H}}if(z.method==="next")z.sent=z._sent=z.arg;else if(z.method==="throw"){if(Y===p)throw Y=x,z.arg;z.dispatchException(z.arg)}else z.method==="return"&&z.abrupt("return",z.arg);Y=b;var ee=d(G,q,z);if(ee.type==="normal"){if(Y=z.done?x:g,ee.arg===S)continue;return{value:ee.arg,done:z.done}}ee.type==="throw"&&(Y=x,z.method="throw",z.arg=ee.arg)}}}function W(G,q){var z=q.method,Y=G.iterator[z];if(Y===e)return q.delegate=null,z==="throw"&&G.iterator.return&&(q.method="return",q.arg=e,W(G,q),q.method==="throw")||z!=="return"&&(q.method="throw",q.arg=new TypeError("The iterator does not provide a '"+z+"' method")),S;var U=d(Y,G.iterator,q.arg);if(U.type==="throw")return q.method="throw",q.arg=U.arg,q.delegate=null,S;var X=U.arg;return X?X.done?(q[G.resultName]=X.value,q.next=G.nextLoc,q.method!=="return"&&(q.method="next",q.arg=e),q.delegate=null,S):X:(q.method="throw",q.arg=new TypeError("iterator result is not an object"),q.delegate=null,S)}function $(G){var q={tryLoc:G[0]};1 in G&&(q.catchLoc=G[1]),2 in G&&(q.finallyLoc=G[2],q.afterLoc=G[3]),this.tryEntries.push(q)}function J(G){var q=G.completion||{};q.type="normal",delete q.arg,G.completion=q}function V(G){this.tryEntries=[{tryLoc:"root"}],G.forEach($,this),this.reset(!0)}function Z(G){if(G||G===""){var q=G[o];if(q)return q.call(G);if(typeof G.next=="function")return G;if(!isNaN(G.length)){var z=-1,Y=function U(){for(;++z<G.length;)if(r.call(G,z))return U.value=G[z],U.done=!1,U;return U.value=e,U.done=!0,U};return Y.next=Y}}throw new TypeError(yp(G)+" is not iterable")}return k.prototype=T,s(F,"constructor",{value:T,configurable:!0}),s(T,"constructor",{value:k,configurable:!0}),k.displayName=c(T,l,"GeneratorFunction"),t.isGeneratorFunction=function(G){var q=typeof G=="function"&&G.constructor;return!!q&&(q===k||(q.displayName||q.name)==="GeneratorFunction")},t.mark=function(G){return Object.setPrototypeOf?Object.setPrototypeOf(G,T):(G.__proto__=T,c(G,l,"GeneratorFunction")),G.prototype=Object.create(F),G},t.awrap=function(G){return{__await:G}},I(B.prototype),c(B.prototype,a,function(){return this}),t.AsyncIterator=B,t.async=function(G,q,z,Y,U){U===void 0&&(U=Promise);var X=new B(u(G,q,z,Y),U);return t.isGeneratorFunction(q)?X:X.next().then(function(ne){return ne.done?ne.value:X.next()})},I(F),c(F,l,"Generator"),c(F,o,function(){return this}),c(F,"toString",function(){return"[object Generator]"}),t.keys=function(G){var q=Object(G),z=[];for(var Y in q)z.push(Y);return z.reverse(),function U(){for(;z.length;){var X=z.pop();if(X in q)return U.value=X,U.done=!1,U}return U.done=!0,U}},t.values=Z,V.prototype={constructor:V,reset:function(q){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(J),!q)for(var z in this)z.charAt(0)==="t"&&r.call(this,z)&&!isNaN(+z.slice(1))&&(this[z]=e)},stop:function(){this.done=!0;var q=this.tryEntries[0].completion;if(q.type==="throw")throw q.arg;return this.rval},dispatchException:function(q){if(this.done)throw q;var z=this;function Y(ie,se){return ne.type="throw",ne.arg=q,z.next=ie,se&&(z.method="next",z.arg=e),!!se}for(var U=this.tryEntries.length-1;U>=0;--U){var X=this.tryEntries[U],ne=X.completion;if(X.tryLoc==="root")return Y("end");if(X.tryLoc<=this.prev){var H=r.call(X,"catchLoc"),ee=r.call(X,"finallyLoc");if(H&&ee){if(this.prev<X.catchLoc)return Y(X.catchLoc,!0);if(this.prev<X.finallyLoc)return Y(X.finallyLoc)}else if(H){if(this.prev<X.catchLoc)return Y(X.catchLoc,!0)}else{if(!ee)throw Error("try statement without catch or finally");if(this.prev<X.finallyLoc)return Y(X.finallyLoc)}}}},abrupt:function(q,z){for(var Y=this.tryEntries.length-1;Y>=0;--Y){var U=this.tryEntries[Y];if(U.tryLoc<=this.prev&&r.call(U,"finallyLoc")&&this.prev<U.finallyLoc){var X=U;break}}X&&(q==="break"||q==="continue")&&X.tryLoc<=z&&z<=X.finallyLoc&&(X=null);var ne=X?X.completion:{};return ne.type=q,ne.arg=z,X?(this.method="next",this.next=X.finallyLoc,S):this.complete(ne)},complete:function(q,z){if(q.type==="throw")throw q.arg;return q.type==="break"||q.type==="continue"?this.next=q.arg:q.type==="return"?(this.rval=this.arg=q.arg,this.method="return",this.next="end"):q.type==="normal"&&z&&(this.next=z),S},finish:function(q){for(var z=this.tryEntries.length-1;z>=0;--z){var Y=this.tryEntries[z];if(Y.finallyLoc===q)return this.complete(Y.completion,Y.afterLoc),J(Y),S}},catch:function(q){for(var z=this.tryEntries.length-1;z>=0;--z){var Y=this.tryEntries[z];if(Y.tryLoc===q){var U=Y.completion;if(U.type==="throw"){var X=U.arg;J(Y)}return X}}throw Error("illegal catch attempt")},delegateYield:function(q,z,Y){return this.delegate={iterator:Z(q),resultName:z,nextLoc:Y},this.method==="next"&&(this.arg=e),S}},t}function RGe(e,t,n){return t=e3(t),IGe(e,Hce()?Reflect.construct(t,n||[],e3(e).constructor):t.apply(e,n))}function Hce(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Hce=function(){return!!e})()}const LGe=function(e){var t,n=e.loader,r=e.isLanguageRegistered,s=e.registerLanguage,i=e.languageLoaders,o=e.noAsyncLoadingLanguages,a=function(l){function c(){return MGe(this,c),RGe(this,c,arguments)}return OGe(c,l),jGe(c,[{key:"componentDidUpdate",value:function(){!c.isRegistered(this.props.language)&&i&&this.loadLanguage()}},{key:"componentDidMount",value:function(){var d=this;c.astGeneratorPromise||c.loadAstGenerator(),c.astGenerator||c.astGeneratorPromise.then(function(){d.forceUpdate()}),!c.isRegistered(this.props.language)&&i&&this.loadLanguage()}},{key:"loadLanguage",value:function(){var d=this,p=this.props.language;p!=="text"&&c.loadLanguage(p).then(function(){return d.forceUpdate()}).catch(function(){})}},{key:"normalizeLanguage",value:function(d){return c.isSupportedLanguage(d)?d:"text"}},{key:"render",value:function(){return Se.createElement(c.highlightInstance,Sg({},this.props,{language:this.normalizeLanguage(this.props.language),astGenerator:c.astGenerator}))}}],[{key:"preload",value:function(){return c.loadAstGenerator()}},{key:"loadLanguage",value:function(){var u=PGe(eM().mark(function p(g){var b;return eM().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:if(b=i[g],typeof b!="function"){S.next=5;break}return S.abrupt("return",b(c.registerLanguage));case 5:throw new Error("Language ".concat(g," not supported"));case 6:case"end":return S.stop()}},p)}));function d(p){return u.apply(this,arguments)}return d}()},{key:"isSupportedLanguage",value:function(d){return c.isRegistered(d)||typeof i[d]=="function"}},{key:"loadAstGenerator",value:function(){return c.astGeneratorPromise=n().then(function(d){c.astGenerator=d,s&&c.languages.forEach(function(p,g){return s(d,g,p)})}),c.astGeneratorPromise}}])}(Se.PureComponent);return t=a,Td(a,"astGenerator",null),Td(a,"highlightInstance",NGe(null,{})),Td(a,"astGeneratorPromise",null),Td(a,"languages",new Map),Td(a,"supportedLanguages",e.supportedLanguages||Object.keys(i||{})),Td(a,"isRegistered",function(l){if(o)return!0;if(!s)throw new Error("Current syntax highlighter doesn't support registration of languages");return t.astGenerator?r(t.astGenerator,l):t.languages.has(l)}),Td(a,"registerLanguage",function(l,c){if(!s)throw new Error("Current syntax highlighter doesn't support registration of languages");if(t.astGenerator)return s(t.astGenerator,l,c);t.languages.set(l,c)}),a},BGe=["abap","abnf","actionscript","ada","agda","al","antlr4","apacheconf","apex","apl","applescript","aql","arduino","arff","asciidoc","asm6502","asmatmel","aspnet","autohotkey","autoit","avisynth","avro-idl","bash","basic","batch","bbcode","bicep","birb","bison","bnf","brainfuck","brightscript","bro","bsl","c","cfscript","chaiscript","cil","clike","clojure","cmake","cobol","coffeescript","concurnas","coq","cpp","crystal","csharp","cshtml","csp","css-extras","css","csv","cypher","d","dart","dataweave","dax","dhall","diff","django","dns-zone-file","docker","dot","ebnf","editorconfig","eiffel","ejs","elixir","elm","erb","erlang","etlua","excel-formula","factor","false","firestore-security-rules","flow","fortran","fsharp","ftl","gap","gcode","gdscript","gedcom","gherkin","git","glsl","gml","gn","go-module","go","graphql","groovy","haml","handlebars","haskell","haxe","hcl","hlsl","hoon","hpkp","hsts","http","ichigojam","icon","icu-message-format","idris","iecst","ignore","inform7","ini","io","j","java","javadoc","javadoclike","javascript","javastacktrace","jexl","jolie","jq","js-extras","js-templates","jsdoc","json","json5","jsonp","jsstacktrace","jsx","julia","keepalived","keyman","kotlin","kumir","kusto","latex","latte","less","lilypond","liquid","lisp","livescript","llvm","log","lolcode","lua","magma","makefile","markdown","markup-templating","markup","matlab","maxscript","mel","mermaid","mizar","mongodb","monkey","moonscript","n1ql","n4js","nand2tetris-hdl","naniscript","nasm","neon","nevod","nginx","nim","nix","nsis","objectivec","ocaml","opencl","openqasm","oz","parigp","parser","pascal","pascaligo","pcaxis","peoplecode","perl","php-extras","php","phpdoc","plsql","powerquery","powershell","processing","prolog","promql","properties","protobuf","psl","pug","puppet","pure","purebasic","purescript","python","q","qml","qore","qsharp","r","racket","reason","regex","rego","renpy","rest","rip","roboconf","robotframework","ruby","rust","sas","sass","scala","scheme","scss","shell-session","smali","smalltalk","smarty","sml","solidity","solution-file","soy","sparql","splunk-spl","sqf","sql","squirrel","stan","stylus","swift","systemd","t4-cs","t4-templating","t4-vb","tap","tcl","textile","toml","tremor","tsx","tt2","turtle","twig","typescript","typoscript","unrealscript","uorazor","uri","v","vala","vbnet","velocity","verilog","vhdl","vim","visual-basic","warpscript","wasm","web-idl","wiki","wolfram","wren","xeora","xml-doc","xojo","xquery","yaml","yang","zig"],$Ge=LGe({loader:function(){return ooe(()=>import("./index-Q_5l7c_H.js").then(t=>t.i),[]).then(function(t){return t.default||t})},noAsyncLoadingLanguages:!0,supportedLanguages:BGe});var zGe=e=>t=>{const n=({components:{Pre:r,Code:s},language:i,code:o})=>h.jsx(e,{PreTag:r,CodeTag:s,...t,language:i,children:o});return n.displayName="PrismSyntaxHighlighter",n},HGe=zGe($Ge),m8={},g8={exports:{}},vG;function VGe(){return vG||(vG=1,function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(g8)),g8.exports}var y8={},wG;function UGe(){return wG||(wG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"black",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",maxHeight:"inherit",height:"inherit",padding:"0 1em",display:"block",overflow:"auto"},'pre[class*="language-"]':{color:"black",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",position:"relative",margin:".5em 0",overflow:"visible",padding:"1px",backgroundColor:"#fdfdfd",WebkitBoxSizing:"border-box",MozBoxSizing:"border-box",boxSizing:"border-box",marginBottom:"1em"},'pre[class*="language-"] > code':{position:"relative",zIndex:"1",borderLeft:"10px solid #358ccb",boxShadow:"-1px 0px 0px 0px #358ccb, 0px 0px 0px 1px #dfdfdf",backgroundColor:"#fdfdfd",backgroundImage:"linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%)",backgroundSize:"3em 3em",backgroundOrigin:"content-box",backgroundAttachment:"local"},':not(pre) > code[class*="language-"]':{backgroundColor:"#fdfdfd",WebkitBoxSizing:"border-box",MozBoxSizing:"border-box",boxSizing:"border-box",marginBottom:"1em",position:"relative",padding:".2em",borderRadius:"0.3em",color:"#c92c2c",border:"1px solid rgba(0, 0, 0, 0.1)",display:"inline",whiteSpace:"normal"},'pre[class*="language-"]:before':{content:"''",display:"block",position:"absolute",bottom:"0.75em",left:"0.18em",width:"40%",height:"20%",maxHeight:"13em",boxShadow:"0px 13px 8px #979797",WebkitTransform:"rotate(-2deg)",MozTransform:"rotate(-2deg)",msTransform:"rotate(-2deg)",OTransform:"rotate(-2deg)",transform:"rotate(-2deg)"},'pre[class*="language-"]:after':{content:"''",display:"block",position:"absolute",bottom:"0.75em",left:"auto",width:"40%",height:"20%",maxHeight:"13em",boxShadow:"0px 13px 8px #979797",WebkitTransform:"rotate(2deg)",MozTransform:"rotate(2deg)",msTransform:"rotate(2deg)",OTransform:"rotate(2deg)",transform:"rotate(2deg)",right:"0.75em"},comment:{color:"#7D8B99"},"block-comment":{color:"#7D8B99"},prolog:{color:"#7D8B99"},doctype:{color:"#7D8B99"},cdata:{color:"#7D8B99"},punctuation:{color:"#5F6364"},property:{color:"#c92c2c"},tag:{color:"#c92c2c"},boolean:{color:"#c92c2c"},number:{color:"#c92c2c"},"function-name":{color:"#c92c2c"},constant:{color:"#c92c2c"},symbol:{color:"#c92c2c"},deleted:{color:"#c92c2c"},selector:{color:"#2f9c0a"},"attr-name":{color:"#2f9c0a"},string:{color:"#2f9c0a"},char:{color:"#2f9c0a"},function:{color:"#2f9c0a"},builtin:{color:"#2f9c0a"},inserted:{color:"#2f9c0a"},operator:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},entity:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)",cursor:"help"},url:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},variable:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},atrule:{color:"#1990b8"},"attr-value":{color:"#1990b8"},keyword:{color:"#1990b8"},"class-name":{color:"#1990b8"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"normal"},".language-css .token.string":{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},".style .token.string":{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:".7"},'pre[class*="language-"].line-numbers.line-numbers':{paddingLeft:"0"},'pre[class*="language-"].line-numbers.line-numbers code':{paddingLeft:"3.8em"},'pre[class*="language-"].line-numbers.line-numbers .line-numbers-rows':{left:"0"},'pre[class*="language-"][data-line]':{paddingTop:"0",paddingBottom:"0",paddingLeft:"0"},"pre[data-line] code":{position:"relative",paddingLeft:"4em"},"pre .line-highlight":{marginTop:"0"}}}(y8)),y8}var b8={},SG;function WGe(){return SG||(SG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"white",background:"none",textShadow:"0 -.1em .2em black",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"white",background:"hsl(30, 20%, 25%)",textShadow:"0 -.1em .2em black",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",border:".3em solid hsl(30, 20%, 40%)",borderRadius:".5em",boxShadow:"1px 1px .5em black inset"},':not(pre) > code[class*="language-"]':{background:"hsl(30, 20%, 25%)",padding:".15em .2em .05em",borderRadius:".3em",border:".13em solid hsl(30, 20%, 40%)",boxShadow:"1px 1px .3em -.1em black inset",whiteSpace:"normal"},comment:{color:"hsl(30, 20%, 50%)"},prolog:{color:"hsl(30, 20%, 50%)"},doctype:{color:"hsl(30, 20%, 50%)"},cdata:{color:"hsl(30, 20%, 50%)"},punctuation:{Opacity:".7"},namespace:{Opacity:".7"},property:{color:"hsl(350, 40%, 70%)"},tag:{color:"hsl(350, 40%, 70%)"},boolean:{color:"hsl(350, 40%, 70%)"},number:{color:"hsl(350, 40%, 70%)"},constant:{color:"hsl(350, 40%, 70%)"},symbol:{color:"hsl(350, 40%, 70%)"},selector:{color:"hsl(75, 70%, 60%)"},"attr-name":{color:"hsl(75, 70%, 60%)"},string:{color:"hsl(75, 70%, 60%)"},char:{color:"hsl(75, 70%, 60%)"},builtin:{color:"hsl(75, 70%, 60%)"},inserted:{color:"hsl(75, 70%, 60%)"},operator:{color:"hsl(40, 90%, 60%)"},entity:{color:"hsl(40, 90%, 60%)",cursor:"help"},url:{color:"hsl(40, 90%, 60%)"},".language-css .token.string":{color:"hsl(40, 90%, 60%)"},".style .token.string":{color:"hsl(40, 90%, 60%)"},variable:{color:"hsl(40, 90%, 60%)"},atrule:{color:"hsl(350, 40%, 70%)"},"attr-value":{color:"hsl(350, 40%, 70%)"},keyword:{color:"hsl(350, 40%, 70%)"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},deleted:{color:"red"}}}(b8)),b8}var x8={},CG;function qGe(){return CG||(CG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"black",color:"white",boxShadow:"-.3em 0 0 .3em black, .3em 0 0 .3em black"},'pre[class*="language-"]':{fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:".4em .8em",margin:".5em 0",overflow:"auto",background:`url('data:image/svg+xml;charset=utf-8,<svg%20version%3D"1.1"%20xmlns%3D"http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg"%20width%3D"100"%20height%3D"100"%20fill%3D"rgba(0%2C0%2C0%2C.2)">%0D%0A<polygon%20points%3D"0%2C50%2050%2C0%200%2C0"%20%2F>%0D%0A<polygon%20points%3D"0%2C100%2050%2C100%20100%2C50%20100%2C0"%20%2F>%0D%0A<%2Fsvg>')`,backgroundSize:"1em 1em"},':not(pre) > code[class*="language-"]':{padding:".2em",borderRadius:".3em",boxShadow:"none",whiteSpace:"normal"},comment:{color:"#aaa"},prolog:{color:"#aaa"},doctype:{color:"#aaa"},cdata:{color:"#aaa"},punctuation:{color:"#999"},namespace:{Opacity:".7"},property:{color:"#0cf"},tag:{color:"#0cf"},boolean:{color:"#0cf"},number:{color:"#0cf"},constant:{color:"#0cf"},symbol:{color:"#0cf"},selector:{color:"yellow"},"attr-name":{color:"yellow"},string:{color:"yellow"},char:{color:"yellow"},builtin:{color:"yellow"},operator:{color:"yellowgreen"},entity:{color:"yellowgreen",cursor:"help"},url:{color:"yellowgreen"},".language-css .token.string":{color:"yellowgreen"},variable:{color:"yellowgreen"},inserted:{color:"yellowgreen"},atrule:{color:"deeppink"},"attr-value":{color:"deeppink"},keyword:{color:"deeppink"},regex:{color:"orange"},important:{color:"orange",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},deleted:{color:"red"},"pre.diff-highlight.diff-highlight > code .token.deleted:not(.prefix)":{backgroundColor:"rgba(255, 0, 0, .3)",display:"inline"},"pre > code.diff-highlight.diff-highlight .token.deleted:not(.prefix)":{backgroundColor:"rgba(255, 0, 0, .3)",display:"inline"},"pre.diff-highlight.diff-highlight > code .token.inserted:not(.prefix)":{backgroundColor:"rgba(0, 255, 128, .3)",display:"inline"},"pre > code.diff-highlight.diff-highlight .token.inserted:not(.prefix)":{backgroundColor:"rgba(0, 255, 128, .3)",display:"inline"}}}(x8)),x8}var v8={},kG;function GGe(){return kG||(kG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#f8f8f2",background:"none",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#f8f8f2",background:"#272822",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",borderRadius:"0.3em"},':not(pre) > code[class*="language-"]':{background:"#272822",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"#8292a2"},prolog:{color:"#8292a2"},doctype:{color:"#8292a2"},cdata:{color:"#8292a2"},punctuation:{color:"#f8f8f2"},namespace:{Opacity:".7"},property:{color:"#f92672"},tag:{color:"#f92672"},constant:{color:"#f92672"},symbol:{color:"#f92672"},deleted:{color:"#f92672"},boolean:{color:"#ae81ff"},number:{color:"#ae81ff"},selector:{color:"#a6e22e"},"attr-name":{color:"#a6e22e"},string:{color:"#a6e22e"},char:{color:"#a6e22e"},builtin:{color:"#a6e22e"},inserted:{color:"#a6e22e"},operator:{color:"#f8f8f2"},entity:{color:"#f8f8f2",cursor:"help"},url:{color:"#f8f8f2"},".language-css .token.string":{color:"#f8f8f2"},".style .token.string":{color:"#f8f8f2"},variable:{color:"#f8f8f2"},atrule:{color:"#e6db74"},"attr-value":{color:"#e6db74"},function:{color:"#e6db74"},"class-name":{color:"#e6db74"},keyword:{color:"#66d9ef"},regex:{color:"#fd971f"},important:{color:"#fd971f",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(v8)),v8}var w8={},EG;function YGe(){return EG||(EG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#657b83",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#657b83",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",borderRadius:"0.3em",backgroundColor:"#fdf6e3"},'pre[class*="language-"]::-moz-selection':{background:"#073642"},'pre[class*="language-"] ::-moz-selection':{background:"#073642"},'code[class*="language-"]::-moz-selection':{background:"#073642"},'code[class*="language-"] ::-moz-selection':{background:"#073642"},'pre[class*="language-"]::selection':{background:"#073642"},'pre[class*="language-"] ::selection':{background:"#073642"},'code[class*="language-"]::selection':{background:"#073642"},'code[class*="language-"] ::selection':{background:"#073642"},':not(pre) > code[class*="language-"]':{backgroundColor:"#fdf6e3",padding:".1em",borderRadius:".3em"},comment:{color:"#93a1a1"},prolog:{color:"#93a1a1"},doctype:{color:"#93a1a1"},cdata:{color:"#93a1a1"},punctuation:{color:"#586e75"},namespace:{Opacity:".7"},property:{color:"#268bd2"},tag:{color:"#268bd2"},boolean:{color:"#268bd2"},number:{color:"#268bd2"},constant:{color:"#268bd2"},symbol:{color:"#268bd2"},deleted:{color:"#268bd2"},selector:{color:"#2aa198"},"attr-name":{color:"#2aa198"},string:{color:"#2aa198"},char:{color:"#2aa198"},builtin:{color:"#2aa198"},url:{color:"#2aa198"},inserted:{color:"#2aa198"},entity:{color:"#657b83",background:"#eee8d5",cursor:"help"},atrule:{color:"#859900"},"attr-value":{color:"#859900"},keyword:{color:"#859900"},function:{color:"#b58900"},"class-name":{color:"#b58900"},regex:{color:"#cb4b16"},important:{color:"#cb4b16",fontWeight:"bold"},variable:{color:"#cb4b16"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(w8)),w8}var S8={},DG;function KGe(){return DG||(DG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#ccc",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#ccc",background:"#2d2d2d",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto"},':not(pre) > code[class*="language-"]':{background:"#2d2d2d",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"#999"},"block-comment":{color:"#999"},prolog:{color:"#999"},doctype:{color:"#999"},cdata:{color:"#999"},punctuation:{color:"#ccc"},tag:{color:"#e2777a"},"attr-name":{color:"#e2777a"},namespace:{color:"#e2777a"},deleted:{color:"#e2777a"},"function-name":{color:"#6196cc"},boolean:{color:"#f08d49"},number:{color:"#f08d49"},function:{color:"#f08d49"},property:{color:"#f8c555"},"class-name":{color:"#f8c555"},constant:{color:"#f8c555"},symbol:{color:"#f8c555"},selector:{color:"#cc99cd"},important:{color:"#cc99cd",fontWeight:"bold"},atrule:{color:"#cc99cd"},keyword:{color:"#cc99cd"},builtin:{color:"#cc99cd"},string:{color:"#7ec699"},char:{color:"#7ec699"},"attr-value":{color:"#7ec699"},regex:{color:"#7ec699"},variable:{color:"#7ec699"},operator:{color:"#67cdcc"},entity:{color:"#67cdcc",cursor:"help"},url:{color:"#67cdcc"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},inserted:{color:"green"}}}(S8)),S8}var C8={},AG;function XGe(){return AG||(AG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"white",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",textShadow:"0 -.1em .2em black",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"white",background:"hsl(0, 0%, 8%)",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",textShadow:"0 -.1em .2em black",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",borderRadius:".5em",border:".3em solid hsl(0, 0%, 33%)",boxShadow:"1px 1px .5em black inset",margin:".5em 0",overflow:"auto",padding:"1em"},':not(pre) > code[class*="language-"]':{background:"hsl(0, 0%, 8%)",borderRadius:".3em",border:".13em solid hsl(0, 0%, 33%)",boxShadow:"1px 1px .3em -.1em black inset",padding:".15em .2em .05em",whiteSpace:"normal"},'pre[class*="language-"]::-moz-selection':{background:"hsla(0, 0%, 93%, 0.15)",textShadow:"none"},'pre[class*="language-"]::selection':{background:"hsla(0, 0%, 93%, 0.15)",textShadow:"none"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"hsla(0, 0%, 93%, 0.15)"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"hsla(0, 0%, 93%, 0.15)"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"hsla(0, 0%, 93%, 0.15)"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"hsla(0, 0%, 93%, 0.15)"},'code[class*="language-"]::selection':{textShadow:"none",background:"hsla(0, 0%, 93%, 0.15)"},'code[class*="language-"] ::selection':{textShadow:"none",background:"hsla(0, 0%, 93%, 0.15)"},comment:{color:"hsl(0, 0%, 47%)"},prolog:{color:"hsl(0, 0%, 47%)"},doctype:{color:"hsl(0, 0%, 47%)"},cdata:{color:"hsl(0, 0%, 47%)"},punctuation:{Opacity:".7"},namespace:{Opacity:".7"},tag:{color:"hsl(14, 58%, 55%)"},boolean:{color:"hsl(14, 58%, 55%)"},number:{color:"hsl(14, 58%, 55%)"},deleted:{color:"hsl(14, 58%, 55%)"},keyword:{color:"hsl(53, 89%, 79%)"},property:{color:"hsl(53, 89%, 79%)"},selector:{color:"hsl(53, 89%, 79%)"},constant:{color:"hsl(53, 89%, 79%)"},symbol:{color:"hsl(53, 89%, 79%)"},builtin:{color:"hsl(53, 89%, 79%)"},"attr-name":{color:"hsl(76, 21%, 52%)"},"attr-value":{color:"hsl(76, 21%, 52%)"},string:{color:"hsl(76, 21%, 52%)"},char:{color:"hsl(76, 21%, 52%)"},operator:{color:"hsl(76, 21%, 52%)"},entity:{color:"hsl(76, 21%, 52%)",cursor:"help"},url:{color:"hsl(76, 21%, 52%)"},".language-css .token.string":{color:"hsl(76, 21%, 52%)"},".style .token.string":{color:"hsl(76, 21%, 52%)"},variable:{color:"hsl(76, 21%, 52%)"},inserted:{color:"hsl(76, 21%, 52%)"},atrule:{color:"hsl(218, 22%, 55%)"},regex:{color:"hsl(42, 75%, 65%)"},important:{color:"hsl(42, 75%, 65%)",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},".language-markup .token.tag":{color:"hsl(33, 33%, 52%)"},".language-markup .token.attr-name":{color:"hsl(33, 33%, 52%)"},".language-markup .token.punctuation":{color:"hsl(33, 33%, 52%)"},"":{position:"relative",zIndex:"1"},".line-highlight.line-highlight":{background:"linear-gradient(to right, hsla(0, 0%, 33%, .1) 70%, hsla(0, 0%, 33%, 0))",borderBottom:"1px dashed hsl(0, 0%, 33%)",borderTop:"1px dashed hsl(0, 0%, 33%)",marginTop:"0.75em",zIndex:"0"},".line-highlight.line-highlight:before":{backgroundColor:"hsl(215, 15%, 59%)",color:"hsl(24, 20%, 95%)"},".line-highlight.line-highlight[data-end]:after":{backgroundColor:"hsl(215, 15%, 59%)",color:"hsl(24, 20%, 95%)"}}}(C8)),C8}var k8={},TG;function JGe(){return TG||(TG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"black",background:"none",textShadow:"0 1px white",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"black",background:"#f5f2f0",textShadow:"0 1px white",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"]::selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#b3d4fc"},':not(pre) > code[class*="language-"]':{background:"#f5f2f0",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"slategray"},prolog:{color:"slategray"},doctype:{color:"slategray"},cdata:{color:"slategray"},punctuation:{color:"#999"},namespace:{Opacity:".7"},property:{color:"#905"},tag:{color:"#905"},boolean:{color:"#905"},number:{color:"#905"},constant:{color:"#905"},symbol:{color:"#905"},deleted:{color:"#905"},selector:{color:"#690"},"attr-name":{color:"#690"},string:{color:"#690"},char:{color:"#690"},builtin:{color:"#690"},inserted:{color:"#690"},operator:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},entity:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)",cursor:"help"},url:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".language-css .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".style .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},atrule:{color:"#07a"},"attr-value":{color:"#07a"},keyword:{color:"#07a"},function:{color:"#DD4A68"},"class-name":{color:"#DD4A68"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"bold"},variable:{color:"#e90"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(k8)),k8}var E8={},_G;function ZGe(){return _G||(_G=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#f8f8f2",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#f8f8f2",background:"#2b2b2b",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},':not(pre) > code[class*="language-"]':{background:"#2b2b2b",padding:"0.1em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"#d4d0ab"},prolog:{color:"#d4d0ab"},doctype:{color:"#d4d0ab"},cdata:{color:"#d4d0ab"},punctuation:{color:"#fefefe"},property:{color:"#ffa07a"},tag:{color:"#ffa07a"},constant:{color:"#ffa07a"},symbol:{color:"#ffa07a"},deleted:{color:"#ffa07a"},boolean:{color:"#00e0e0"},number:{color:"#00e0e0"},selector:{color:"#abe338"},"attr-name":{color:"#abe338"},string:{color:"#abe338"},char:{color:"#abe338"},builtin:{color:"#abe338"},inserted:{color:"#abe338"},operator:{color:"#00e0e0"},entity:{color:"#00e0e0",cursor:"help"},url:{color:"#00e0e0"},".language-css .token.string":{color:"#00e0e0"},".style .token.string":{color:"#00e0e0"},variable:{color:"#00e0e0"},atrule:{color:"#ffd700"},"attr-value":{color:"#ffd700"},function:{color:"#ffd700"},keyword:{color:"#00e0e0"},regex:{color:"#ffd700"},important:{color:"#ffd700",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(E8)),E8}var D8={},NG;function QGe(){return NG||(NG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#c5c8c6",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#c5c8c6",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",borderRadius:"0.3em",background:"#1d1f21"},':not(pre) > code[class*="language-"]':{background:"#1d1f21",padding:".1em",borderRadius:".3em"},comment:{color:"#7C7C7C"},prolog:{color:"#7C7C7C"},doctype:{color:"#7C7C7C"},cdata:{color:"#7C7C7C"},punctuation:{color:"#c5c8c6"},".namespace":{Opacity:".7"},property:{color:"#96CBFE"},keyword:{color:"#96CBFE"},tag:{color:"#96CBFE"},"class-name":{color:"#FFFFB6",textDecoration:"underline"},boolean:{color:"#99CC99"},constant:{color:"#99CC99"},symbol:{color:"#f92672"},deleted:{color:"#f92672"},number:{color:"#FF73FD"},selector:{color:"#A8FF60"},"attr-name":{color:"#A8FF60"},string:{color:"#A8FF60"},char:{color:"#A8FF60"},builtin:{color:"#A8FF60"},inserted:{color:"#A8FF60"},variable:{color:"#C6C5FE"},operator:{color:"#EDEDED"},entity:{color:"#FFFFB6",cursor:"help"},url:{color:"#96CBFE"},".language-css .token.string":{color:"#87C38A"},".style .token.string":{color:"#87C38A"},atrule:{color:"#F9EE98"},"attr-value":{color:"#F9EE98"},function:{color:"#DAD085"},regex:{color:"#E9C062"},important:{color:"#fd971f",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(D8)),D8}var A8={},PG;function eYe(){return PG||(PG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#f5f7ff",color:"#5e6687"},'pre[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#f5f7ff",color:"#5e6687",padding:"1em",margin:".5em 0",overflow:"auto"},'pre > code[class*="language-"]':{fontSize:"1em"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#dfe2f1"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#dfe2f1"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#dfe2f1"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#dfe2f1"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#dfe2f1"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#dfe2f1"},'code[class*="language-"]::selection':{textShadow:"none",background:"#dfe2f1"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#dfe2f1"},':not(pre) > code[class*="language-"]':{padding:".1em",borderRadius:".3em"},comment:{color:"#898ea4"},prolog:{color:"#898ea4"},doctype:{color:"#898ea4"},cdata:{color:"#898ea4"},punctuation:{color:"#5e6687"},namespace:{Opacity:".7"},operator:{color:"#c76b29"},boolean:{color:"#c76b29"},number:{color:"#c76b29"},property:{color:"#c08b30"},tag:{color:"#3d8fd1"},string:{color:"#22a2c9"},selector:{color:"#6679cc"},"attr-name":{color:"#c76b29"},entity:{color:"#22a2c9",cursor:"help"},url:{color:"#22a2c9"},".language-css .token.string":{color:"#22a2c9"},".style .token.string":{color:"#22a2c9"},"attr-value":{color:"#ac9739"},keyword:{color:"#ac9739"},control:{color:"#ac9739"},directive:{color:"#ac9739"},unit:{color:"#ac9739"},statement:{color:"#22a2c9"},regex:{color:"#22a2c9"},atrule:{color:"#22a2c9"},placeholder:{color:"#3d8fd1"},variable:{color:"#3d8fd1"},deleted:{textDecoration:"line-through"},inserted:{borderBottom:"1px dotted #202746",textDecoration:"none"},italic:{fontStyle:"italic"},important:{fontWeight:"bold",color:"#c94922"},bold:{fontWeight:"bold"},"pre > code.highlight":{Outline:"0.4em solid #c94922",OutlineOffset:".4em"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"#dfe2f1"},".line-numbers .line-numbers-rows > span:before":{color:"#979db4"},".line-highlight.line-highlight":{background:"linear-gradient(to right, rgba(107, 115, 148, 0.2) 70%, rgba(107, 115, 148, 0))"}}}(A8)),A8}var T8={},MG;function tYe(){return MG||(MG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#fff",textShadow:"0 1px 1px #000",fontFamily:'Menlo, Monaco, "Courier New", monospace',direction:"ltr",textAlign:"left",wordSpacing:"normal",whiteSpace:"pre",wordWrap:"normal",lineHeight:"1.4",background:"none",border:"0",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#fff",textShadow:"0 1px 1px #000",fontFamily:'Menlo, Monaco, "Courier New", monospace',direction:"ltr",textAlign:"left",wordSpacing:"normal",whiteSpace:"pre",wordWrap:"normal",lineHeight:"1.4",background:"#222",border:"0",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"15px",margin:"1em 0",overflow:"auto",MozBorderRadius:"8px",WebkitBorderRadius:"8px",borderRadius:"8px"},'pre[class*="language-"] code':{float:"left",padding:"0 15px 0 0"},':not(pre) > code[class*="language-"]':{background:"#222",padding:"5px 10px",lineHeight:"1",MozBorderRadius:"3px",WebkitBorderRadius:"3px",borderRadius:"3px"},comment:{color:"#797979"},prolog:{color:"#797979"},doctype:{color:"#797979"},cdata:{color:"#797979"},selector:{color:"#fff"},operator:{color:"#fff"},punctuation:{color:"#fff"},namespace:{Opacity:".7"},tag:{color:"#ffd893"},boolean:{color:"#ffd893"},atrule:{color:"#B0C975"},"attr-value":{color:"#B0C975"},hex:{color:"#B0C975"},string:{color:"#B0C975"},property:{color:"#c27628"},entity:{color:"#c27628",cursor:"help"},url:{color:"#c27628"},"attr-name":{color:"#c27628"},keyword:{color:"#c27628"},regex:{color:"#9B71C6"},function:{color:"#e5a638"},constant:{color:"#e5a638"},variable:{color:"#fdfba8"},number:{color:"#8799B0"},important:{color:"#E45734"},deliminator:{color:"#E45734"},".line-highlight.line-highlight":{background:"rgba(255, 255, 255, .2)"},".line-highlight.line-highlight:before":{top:".3em",backgroundColor:"rgba(255, 255, 255, .3)",color:"#fff",MozBorderRadius:"8px",WebkitBorderRadius:"8px",borderRadius:"8px"},".line-highlight.line-highlight[data-end]:after":{top:".3em",backgroundColor:"rgba(255, 255, 255, .3)",color:"#fff",MozBorderRadius:"8px",WebkitBorderRadius:"8px",borderRadius:"8px"},".line-numbers .line-numbers-rows > span":{borderRight:"3px #d9d336 solid"}}}(T8)),T8}var _8={},jG;function nYe(){return jG||(jG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#111b27",background:"none",fontFamily:'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#111b27",background:"#e3eaf2",fontFamily:'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto"},'pre[class*="language-"]::-moz-selection':{background:"#8da1b9"},'pre[class*="language-"] ::-moz-selection':{background:"#8da1b9"},'code[class*="language-"]::-moz-selection':{background:"#8da1b9"},'code[class*="language-"] ::-moz-selection':{background:"#8da1b9"},'pre[class*="language-"]::selection':{background:"#8da1b9"},'pre[class*="language-"] ::selection':{background:"#8da1b9"},'code[class*="language-"]::selection':{background:"#8da1b9"},'code[class*="language-"] ::selection':{background:"#8da1b9"},':not(pre) > code[class*="language-"]':{background:"#e3eaf2",padding:"0.1em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"#3c526d"},prolog:{color:"#3c526d"},doctype:{color:"#3c526d"},cdata:{color:"#3c526d"},punctuation:{color:"#111b27"},"delimiter.important":{color:"#006d6d",fontWeight:"inherit"},"selector.parent":{color:"#006d6d"},tag:{color:"#006d6d"},"tag.punctuation":{color:"#006d6d"},"attr-name":{color:"#755f00"},boolean:{color:"#755f00"},"boolean.important":{color:"#755f00"},number:{color:"#755f00"},constant:{color:"#755f00"},"selector.attribute":{color:"#755f00"},"class-name":{color:"#005a8e"},key:{color:"#005a8e"},parameter:{color:"#005a8e"},property:{color:"#005a8e"},"property-access":{color:"#005a8e"},variable:{color:"#005a8e"},"attr-value":{color:"#116b00"},inserted:{color:"#116b00"},color:{color:"#116b00"},"selector.value":{color:"#116b00"},string:{color:"#116b00"},"string.url-link":{color:"#116b00"},builtin:{color:"#af00af"},"keyword-array":{color:"#af00af"},package:{color:"#af00af"},regex:{color:"#af00af"},function:{color:"#7c00aa"},"selector.class":{color:"#7c00aa"},"selector.id":{color:"#7c00aa"},"atrule.rule":{color:"#a04900"},combinator:{color:"#a04900"},keyword:{color:"#a04900"},operator:{color:"#a04900"},"pseudo-class":{color:"#a04900"},"pseudo-element":{color:"#a04900"},selector:{color:"#a04900"},unit:{color:"#a04900"},deleted:{color:"#c22f2e"},important:{color:"#c22f2e",fontWeight:"bold"},"keyword-this":{color:"#005a8e",fontWeight:"bold"},this:{color:"#005a8e",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},entity:{cursor:"help"},".language-markdown .token.title":{color:"#005a8e",fontWeight:"bold"},".language-markdown .token.title .token.punctuation":{color:"#005a8e",fontWeight:"bold"},".language-markdown .token.blockquote.punctuation":{color:"#af00af"},".language-markdown .token.code":{color:"#006d6d"},".language-markdown .token.hr.punctuation":{color:"#005a8e"},".language-markdown .token.url > .token.content":{color:"#116b00"},".language-markdown .token.url-link":{color:"#755f00"},".language-markdown .token.list.punctuation":{color:"#af00af"},".language-markdown .token.table-header":{color:"#111b27"},".language-json .token.operator":{color:"#111b27"},".language-scss .token.variable":{color:"#006d6d"},"token.tab:not(:empty):before":{color:"#3c526d"},"token.cr:before":{color:"#3c526d"},"token.lf:before":{color:"#3c526d"},"token.space:before":{color:"#3c526d"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{color:"#e3eaf2",background:"#005a8e"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{color:"#e3eaf2",background:"#005a8e"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{color:"#e3eaf2",background:"#005a8eda",textDecoration:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{color:"#e3eaf2",background:"#005a8eda",textDecoration:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{color:"#e3eaf2",background:"#005a8eda",textDecoration:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{color:"#e3eaf2",background:"#005a8eda",textDecoration:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{color:"#e3eaf2",background:"#3c526d"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{color:"#e3eaf2",background:"#3c526d"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{color:"#e3eaf2",background:"#3c526d"},".line-highlight.line-highlight":{background:"linear-gradient(to right, #8da1b92f 70%, #8da1b925)"},".line-highlight.line-highlight:before":{backgroundColor:"#3c526d",color:"#e3eaf2",boxShadow:"0 1px #8da1b9"},".line-highlight.line-highlight[data-end]:after":{backgroundColor:"#3c526d",color:"#e3eaf2",boxShadow:"0 1px #8da1b9"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"#3c526d1f"},".line-numbers.line-numbers .line-numbers-rows":{borderRight:"1px solid #8da1b97a",background:"#d0dae77a"},".line-numbers .line-numbers-rows > span:before":{color:"#3c526dda"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"#755f00"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"#755f00"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"#755f00"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"#af00af"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"#af00af"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"#af00af"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"#005a8e"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"#005a8e"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"#005a8e"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"#7c00aa"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"#7c00aa"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"#7c00aa"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"#c22f2e1f"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"#c22f2e1f"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"#116b001f"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"#116b001f"},".command-line .command-line-prompt":{borderRight:"1px solid #8da1b97a"},".command-line .command-line-prompt > span:before":{color:"#3c526dda"}}}(_8)),_8}var N8={},FG;function rYe(){return FG||(FG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#e3eaf2",background:"none",fontFamily:'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#e3eaf2",background:"#111b27",fontFamily:'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto"},'pre[class*="language-"]::-moz-selection':{background:"#3c526d"},'pre[class*="language-"] ::-moz-selection':{background:"#3c526d"},'code[class*="language-"]::-moz-selection':{background:"#3c526d"},'code[class*="language-"] ::-moz-selection':{background:"#3c526d"},'pre[class*="language-"]::selection':{background:"#3c526d"},'pre[class*="language-"] ::selection':{background:"#3c526d"},'code[class*="language-"]::selection':{background:"#3c526d"},'code[class*="language-"] ::selection':{background:"#3c526d"},':not(pre) > code[class*="language-"]':{background:"#111b27",padding:"0.1em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"#8da1b9"},prolog:{color:"#8da1b9"},doctype:{color:"#8da1b9"},cdata:{color:"#8da1b9"},punctuation:{color:"#e3eaf2"},"delimiter.important":{color:"#66cccc",fontWeight:"inherit"},"selector.parent":{color:"#66cccc"},tag:{color:"#66cccc"},"tag.punctuation":{color:"#66cccc"},"attr-name":{color:"#e6d37a"},boolean:{color:"#e6d37a"},"boolean.important":{color:"#e6d37a"},number:{color:"#e6d37a"},constant:{color:"#e6d37a"},"selector.attribute":{color:"#e6d37a"},"class-name":{color:"#6cb8e6"},key:{color:"#6cb8e6"},parameter:{color:"#6cb8e6"},property:{color:"#6cb8e6"},"property-access":{color:"#6cb8e6"},variable:{color:"#6cb8e6"},"attr-value":{color:"#91d076"},inserted:{color:"#91d076"},color:{color:"#91d076"},"selector.value":{color:"#91d076"},string:{color:"#91d076"},"string.url-link":{color:"#91d076"},builtin:{color:"#f4adf4"},"keyword-array":{color:"#f4adf4"},package:{color:"#f4adf4"},regex:{color:"#f4adf4"},function:{color:"#c699e3"},"selector.class":{color:"#c699e3"},"selector.id":{color:"#c699e3"},"atrule.rule":{color:"#e9ae7e"},combinator:{color:"#e9ae7e"},keyword:{color:"#e9ae7e"},operator:{color:"#e9ae7e"},"pseudo-class":{color:"#e9ae7e"},"pseudo-element":{color:"#e9ae7e"},selector:{color:"#e9ae7e"},unit:{color:"#e9ae7e"},deleted:{color:"#cd6660"},important:{color:"#cd6660",fontWeight:"bold"},"keyword-this":{color:"#6cb8e6",fontWeight:"bold"},this:{color:"#6cb8e6",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},entity:{cursor:"help"},".language-markdown .token.title":{color:"#6cb8e6",fontWeight:"bold"},".language-markdown .token.title .token.punctuation":{color:"#6cb8e6",fontWeight:"bold"},".language-markdown .token.blockquote.punctuation":{color:"#f4adf4"},".language-markdown .token.code":{color:"#66cccc"},".language-markdown .token.hr.punctuation":{color:"#6cb8e6"},".language-markdown .token.url .token.content":{color:"#91d076"},".language-markdown .token.url-link":{color:"#e6d37a"},".language-markdown .token.list.punctuation":{color:"#f4adf4"},".language-markdown .token.table-header":{color:"#e3eaf2"},".language-json .token.operator":{color:"#e3eaf2"},".language-scss .token.variable":{color:"#66cccc"},"token.tab:not(:empty):before":{color:"#8da1b9"},"token.cr:before":{color:"#8da1b9"},"token.lf:before":{color:"#8da1b9"},"token.space:before":{color:"#8da1b9"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{color:"#111b27",background:"#6cb8e6"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{color:"#111b27",background:"#6cb8e6"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{color:"#111b27",background:"#6cb8e6da",textDecoration:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{color:"#111b27",background:"#6cb8e6da",textDecoration:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{color:"#111b27",background:"#6cb8e6da",textDecoration:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{color:"#111b27",background:"#6cb8e6da",textDecoration:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{color:"#111b27",background:"#8da1b9"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{color:"#111b27",background:"#8da1b9"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{color:"#111b27",background:"#8da1b9"},".line-highlight.line-highlight":{background:"linear-gradient(to right, #3c526d5f 70%, #3c526d55)"},".line-highlight.line-highlight:before":{backgroundColor:"#8da1b9",color:"#111b27",boxShadow:"0 1px #3c526d"},".line-highlight.line-highlight[data-end]:after":{backgroundColor:"#8da1b9",color:"#111b27",boxShadow:"0 1px #3c526d"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"#8da1b918"},".line-numbers.line-numbers .line-numbers-rows":{borderRight:"1px solid #0b121b",background:"#0b121b7a"},".line-numbers .line-numbers-rows > span:before":{color:"#8da1b9da"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"#e6d37a"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"#e6d37a"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"#e6d37a"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"#f4adf4"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"#f4adf4"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"#f4adf4"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"#6cb8e6"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"#6cb8e6"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"#6cb8e6"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"#c699e3"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"#c699e3"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"#c699e3"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"#cd66601f"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"#cd66601f"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"#91d0761f"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"#91d0761f"},".command-line .command-line-prompt":{borderRight:"1px solid #0b121b"},".command-line .command-line-prompt > span:before":{color:"#8da1b9da"}}}(N8)),N8}var P8={},IG;function sYe(){return IG||(IG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"black",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"black",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",position:"relative",borderLeft:"10px solid #358ccb",boxShadow:"-1px 0 0 0 #358ccb, 0 0 0 1px #dfdfdf",backgroundColor:"#fdfdfd",backgroundImage:"linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%)",backgroundSize:"3em 3em",backgroundOrigin:"content-box",backgroundAttachment:"local",margin:".5em 0",padding:"0 1em"},'pre[class*="language-"] > code':{display:"block"},':not(pre) > code[class*="language-"]':{position:"relative",padding:".2em",borderRadius:"0.3em",color:"#c92c2c",border:"1px solid rgba(0, 0, 0, 0.1)",display:"inline",whiteSpace:"normal",backgroundColor:"#fdfdfd",WebkitBoxSizing:"border-box",MozBoxSizing:"border-box",boxSizing:"border-box"},comment:{color:"#7D8B99"},"block-comment":{color:"#7D8B99"},prolog:{color:"#7D8B99"},doctype:{color:"#7D8B99"},cdata:{color:"#7D8B99"},punctuation:{color:"#5F6364"},property:{color:"#c92c2c"},tag:{color:"#c92c2c"},boolean:{color:"#c92c2c"},number:{color:"#c92c2c"},"function-name":{color:"#c92c2c"},constant:{color:"#c92c2c"},symbol:{color:"#c92c2c"},deleted:{color:"#c92c2c"},selector:{color:"#2f9c0a"},"attr-name":{color:"#2f9c0a"},string:{color:"#2f9c0a"},char:{color:"#2f9c0a"},function:{color:"#2f9c0a"},builtin:{color:"#2f9c0a"},inserted:{color:"#2f9c0a"},operator:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},entity:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)",cursor:"help"},url:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},variable:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},atrule:{color:"#1990b8"},"attr-value":{color:"#1990b8"},keyword:{color:"#1990b8"},"class-name":{color:"#1990b8"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"normal"},".language-css .token.string":{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},".style .token.string":{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:".7"}}}(P8)),P8}var M8={},OG;function iYe(){return OG||(OG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#a9b7c6",fontFamily:"Consolas, Monaco, 'Andale Mono', monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#a9b7c6",fontFamily:"Consolas, Monaco, 'Andale Mono', monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",background:"#2b2b2b"},'pre[class*="language-"]::-moz-selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'pre[class*="language-"] ::-moz-selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'code[class*="language-"]::-moz-selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'code[class*="language-"] ::-moz-selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'pre[class*="language-"]::selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'pre[class*="language-"] ::selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'code[class*="language-"]::selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'code[class*="language-"] ::selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},':not(pre) > code[class*="language-"]':{background:"#2b2b2b",padding:".1em",borderRadius:".3em"},comment:{color:"#808080"},prolog:{color:"#808080"},cdata:{color:"#808080"},delimiter:{color:"#cc7832"},boolean:{color:"#cc7832"},keyword:{color:"#cc7832"},selector:{color:"#cc7832"},important:{color:"#cc7832"},atrule:{color:"#cc7832"},operator:{color:"#a9b7c6"},punctuation:{color:"#a9b7c6"},"attr-name":{color:"#a9b7c6"},tag:{color:"#e8bf6a"},"tag.punctuation":{color:"#e8bf6a"},doctype:{color:"#e8bf6a"},builtin:{color:"#e8bf6a"},entity:{color:"#6897bb"},number:{color:"#6897bb"},symbol:{color:"#6897bb"},property:{color:"#9876aa"},constant:{color:"#9876aa"},variable:{color:"#9876aa"},string:{color:"#6a8759"},char:{color:"#6a8759"},"attr-value":{color:"#a5c261"},"attr-value.punctuation":{color:"#a5c261"},"attr-value.punctuation:first-child":{color:"#a9b7c6"},url:{color:"#287bde",textDecoration:"underline"},function:{color:"#ffc66d"},regex:{background:"#364135"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},inserted:{background:"#294436"},deleted:{background:"#484a4a"},"code.language-css .token.property":{color:"#a9b7c6"},"code.language-css .token.property + .token.punctuation":{color:"#a9b7c6"},"code.language-css .token.id":{color:"#ffc66d"},"code.language-css .token.selector > .token.class":{color:"#ffc66d"},"code.language-css .token.selector > .token.attribute":{color:"#ffc66d"},"code.language-css .token.selector > .token.pseudo-class":{color:"#ffc66d"},"code.language-css .token.selector > .token.pseudo-element":{color:"#ffc66d"}}}(M8)),M8}var j8={},RG;function oYe(){return RG||(RG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#f8f8f2",background:"none",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#f8f8f2",background:"#282a36",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",borderRadius:"0.3em"},':not(pre) > code[class*="language-"]':{background:"#282a36",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"#6272a4"},prolog:{color:"#6272a4"},doctype:{color:"#6272a4"},cdata:{color:"#6272a4"},punctuation:{color:"#f8f8f2"},".namespace":{Opacity:".7"},property:{color:"#ff79c6"},tag:{color:"#ff79c6"},constant:{color:"#ff79c6"},symbol:{color:"#ff79c6"},deleted:{color:"#ff79c6"},boolean:{color:"#bd93f9"},number:{color:"#bd93f9"},selector:{color:"#50fa7b"},"attr-name":{color:"#50fa7b"},string:{color:"#50fa7b"},char:{color:"#50fa7b"},builtin:{color:"#50fa7b"},inserted:{color:"#50fa7b"},operator:{color:"#f8f8f2"},entity:{color:"#f8f8f2",cursor:"help"},url:{color:"#f8f8f2"},".language-css .token.string":{color:"#f8f8f2"},".style .token.string":{color:"#f8f8f2"},variable:{color:"#f8f8f2"},atrule:{color:"#f1fa8c"},"attr-value":{color:"#f1fa8c"},function:{color:"#f1fa8c"},"class-name":{color:"#f1fa8c"},keyword:{color:"#8be9fd"},regex:{color:"#ffb86c"},important:{color:"#ffb86c",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(j8)),j8}var F8={},LG;function aYe(){return LG||(LG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#2a2734",color:"#9a86fd"},'pre[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#2a2734",color:"#9a86fd",padding:"1em",margin:".5em 0",overflow:"auto"},'pre > code[class*="language-"]':{fontSize:"1em"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#6a51e6"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#6a51e6"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#6a51e6"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#6a51e6"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#6a51e6"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#6a51e6"},'code[class*="language-"]::selection':{textShadow:"none",background:"#6a51e6"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#6a51e6"},':not(pre) > code[class*="language-"]':{padding:".1em",borderRadius:".3em"},comment:{color:"#6c6783"},prolog:{color:"#6c6783"},doctype:{color:"#6c6783"},cdata:{color:"#6c6783"},punctuation:{color:"#6c6783"},namespace:{Opacity:".7"},tag:{color:"#e09142"},operator:{color:"#e09142"},number:{color:"#e09142"},property:{color:"#9a86fd"},function:{color:"#9a86fd"},"tag-id":{color:"#eeebff"},selector:{color:"#eeebff"},"atrule-id":{color:"#eeebff"},"code.language-javascript":{color:"#c4b9fe"},"attr-name":{color:"#c4b9fe"},"code.language-css":{color:"#ffcc99"},"code.language-scss":{color:"#ffcc99"},boolean:{color:"#ffcc99"},string:{color:"#ffcc99"},entity:{color:"#ffcc99",cursor:"help"},url:{color:"#ffcc99"},".language-css .token.string":{color:"#ffcc99"},".language-scss .token.string":{color:"#ffcc99"},".style .token.string":{color:"#ffcc99"},"attr-value":{color:"#ffcc99"},keyword:{color:"#ffcc99"},control:{color:"#ffcc99"},directive:{color:"#ffcc99"},unit:{color:"#ffcc99"},statement:{color:"#ffcc99"},regex:{color:"#ffcc99"},atrule:{color:"#ffcc99"},placeholder:{color:"#ffcc99"},variable:{color:"#ffcc99"},deleted:{textDecoration:"line-through"},inserted:{borderBottom:"1px dotted #eeebff",textDecoration:"none"},italic:{fontStyle:"italic"},important:{fontWeight:"bold",color:"#c4b9fe"},bold:{fontWeight:"bold"},"pre > code.highlight":{Outline:".4em solid #8a75f5",OutlineOffset:".4em"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"#2c2937"},".line-numbers .line-numbers-rows > span:before":{color:"#3c3949"},".line-highlight.line-highlight":{background:"linear-gradient(to right, rgba(224, 145, 66, 0.2) 70%, rgba(224, 145, 66, 0))"}}}(F8)),F8}var I8={},BG;function lYe(){return BG||(BG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#322d29",color:"#88786d"},'pre[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#322d29",color:"#88786d",padding:"1em",margin:".5em 0",overflow:"auto"},'pre > code[class*="language-"]':{fontSize:"1em"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#6f5849"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#6f5849"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#6f5849"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#6f5849"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#6f5849"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#6f5849"},'code[class*="language-"]::selection':{textShadow:"none",background:"#6f5849"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#6f5849"},':not(pre) > code[class*="language-"]':{padding:".1em",borderRadius:".3em"},comment:{color:"#6a5f58"},prolog:{color:"#6a5f58"},doctype:{color:"#6a5f58"},cdata:{color:"#6a5f58"},punctuation:{color:"#6a5f58"},namespace:{Opacity:".7"},tag:{color:"#bfa05a"},operator:{color:"#bfa05a"},number:{color:"#bfa05a"},property:{color:"#88786d"},function:{color:"#88786d"},"tag-id":{color:"#fff3eb"},selector:{color:"#fff3eb"},"atrule-id":{color:"#fff3eb"},"code.language-javascript":{color:"#a48774"},"attr-name":{color:"#a48774"},"code.language-css":{color:"#fcc440"},"code.language-scss":{color:"#fcc440"},boolean:{color:"#fcc440"},string:{color:"#fcc440"},entity:{color:"#fcc440",cursor:"help"},url:{color:"#fcc440"},".language-css .token.string":{color:"#fcc440"},".language-scss .token.string":{color:"#fcc440"},".style .token.string":{color:"#fcc440"},"attr-value":{color:"#fcc440"},keyword:{color:"#fcc440"},control:{color:"#fcc440"},directive:{color:"#fcc440"},unit:{color:"#fcc440"},statement:{color:"#fcc440"},regex:{color:"#fcc440"},atrule:{color:"#fcc440"},placeholder:{color:"#fcc440"},variable:{color:"#fcc440"},deleted:{textDecoration:"line-through"},inserted:{borderBottom:"1px dotted #fff3eb",textDecoration:"none"},italic:{fontStyle:"italic"},important:{fontWeight:"bold",color:"#a48774"},bold:{fontWeight:"bold"},"pre > code.highlight":{Outline:".4em solid #816d5f",OutlineOffset:".4em"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"#35302b"},".line-numbers .line-numbers-rows > span:before":{color:"#46403d"},".line-highlight.line-highlight":{background:"linear-gradient(to right, rgba(191, 160, 90, 0.2) 70%, rgba(191, 160, 90, 0))"}}}(I8)),I8}var O8={},$G;function cYe(){return $G||($G=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#2a2d2a",color:"#687d68"},'pre[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#2a2d2a",color:"#687d68",padding:"1em",margin:".5em 0",overflow:"auto"},'pre > code[class*="language-"]':{fontSize:"1em"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#435643"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#435643"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#435643"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#435643"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#435643"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#435643"},'code[class*="language-"]::selection':{textShadow:"none",background:"#435643"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#435643"},':not(pre) > code[class*="language-"]':{padding:".1em",borderRadius:".3em"},comment:{color:"#535f53"},prolog:{color:"#535f53"},doctype:{color:"#535f53"},cdata:{color:"#535f53"},punctuation:{color:"#535f53"},namespace:{Opacity:".7"},tag:{color:"#a2b34d"},operator:{color:"#a2b34d"},number:{color:"#a2b34d"},property:{color:"#687d68"},function:{color:"#687d68"},"tag-id":{color:"#f0fff0"},selector:{color:"#f0fff0"},"atrule-id":{color:"#f0fff0"},"code.language-javascript":{color:"#b3d6b3"},"attr-name":{color:"#b3d6b3"},"code.language-css":{color:"#e5fb79"},"code.language-scss":{color:"#e5fb79"},boolean:{color:"#e5fb79"},string:{color:"#e5fb79"},entity:{color:"#e5fb79",cursor:"help"},url:{color:"#e5fb79"},".language-css .token.string":{color:"#e5fb79"},".language-scss .token.string":{color:"#e5fb79"},".style .token.string":{color:"#e5fb79"},"attr-value":{color:"#e5fb79"},keyword:{color:"#e5fb79"},control:{color:"#e5fb79"},directive:{color:"#e5fb79"},unit:{color:"#e5fb79"},statement:{color:"#e5fb79"},regex:{color:"#e5fb79"},atrule:{color:"#e5fb79"},placeholder:{color:"#e5fb79"},variable:{color:"#e5fb79"},deleted:{textDecoration:"line-through"},inserted:{borderBottom:"1px dotted #f0fff0",textDecoration:"none"},italic:{fontStyle:"italic"},important:{fontWeight:"bold",color:"#b3d6b3"},bold:{fontWeight:"bold"},"pre > code.highlight":{Outline:".4em solid #5c705c",OutlineOffset:".4em"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"#2c302c"},".line-numbers .line-numbers-rows > span:before":{color:"#3b423b"},".line-highlight.line-highlight":{background:"linear-gradient(to right, rgba(162, 179, 77, 0.2) 70%, rgba(162, 179, 77, 0))"}}}(O8)),O8}var R8={},zG;function uYe(){return zG||(zG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#faf8f5",color:"#728fcb"},'pre[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#faf8f5",color:"#728fcb",padding:"1em",margin:".5em 0",overflow:"auto"},'pre > code[class*="language-"]':{fontSize:"1em"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#faf8f5"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#faf8f5"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#faf8f5"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#faf8f5"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#faf8f5"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#faf8f5"},'code[class*="language-"]::selection':{textShadow:"none",background:"#faf8f5"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#faf8f5"},':not(pre) > code[class*="language-"]':{padding:".1em",borderRadius:".3em"},comment:{color:"#b6ad9a"},prolog:{color:"#b6ad9a"},doctype:{color:"#b6ad9a"},cdata:{color:"#b6ad9a"},punctuation:{color:"#b6ad9a"},namespace:{Opacity:".7"},tag:{color:"#063289"},operator:{color:"#063289"},number:{color:"#063289"},property:{color:"#b29762"},function:{color:"#b29762"},"tag-id":{color:"#2d2006"},selector:{color:"#2d2006"},"atrule-id":{color:"#2d2006"},"code.language-javascript":{color:"#896724"},"attr-name":{color:"#896724"},"code.language-css":{color:"#728fcb"},"code.language-scss":{color:"#728fcb"},boolean:{color:"#728fcb"},string:{color:"#728fcb"},entity:{color:"#728fcb",cursor:"help"},url:{color:"#728fcb"},".language-css .token.string":{color:"#728fcb"},".language-scss .token.string":{color:"#728fcb"},".style .token.string":{color:"#728fcb"},"attr-value":{color:"#728fcb"},keyword:{color:"#728fcb"},control:{color:"#728fcb"},directive:{color:"#728fcb"},unit:{color:"#728fcb"},statement:{color:"#728fcb"},regex:{color:"#728fcb"},atrule:{color:"#728fcb"},placeholder:{color:"#93abdc"},variable:{color:"#93abdc"},deleted:{textDecoration:"line-through"},inserted:{borderBottom:"1px dotted #2d2006",textDecoration:"none"},italic:{fontStyle:"italic"},important:{fontWeight:"bold",color:"#896724"},bold:{fontWeight:"bold"},"pre > code.highlight":{Outline:".4em solid #896724",OutlineOffset:".4em"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"#ece8de"},".line-numbers .line-numbers-rows > span:before":{color:"#cdc4b1"},".line-highlight.line-highlight":{background:"linear-gradient(to right, rgba(45, 32, 6, 0.2) 70%, rgba(45, 32, 6, 0))"}}}(R8)),R8}var L8={},HG;function dYe(){return HG||(HG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#1d262f",color:"#57718e"},'pre[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#1d262f",color:"#57718e",padding:"1em",margin:".5em 0",overflow:"auto"},'pre > code[class*="language-"]':{fontSize:"1em"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#004a9e"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#004a9e"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#004a9e"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#004a9e"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#004a9e"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#004a9e"},'code[class*="language-"]::selection':{textShadow:"none",background:"#004a9e"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#004a9e"},':not(pre) > code[class*="language-"]':{padding:".1em",borderRadius:".3em"},comment:{color:"#4a5f78"},prolog:{color:"#4a5f78"},doctype:{color:"#4a5f78"},cdata:{color:"#4a5f78"},punctuation:{color:"#4a5f78"},namespace:{Opacity:".7"},tag:{color:"#0aa370"},operator:{color:"#0aa370"},number:{color:"#0aa370"},property:{color:"#57718e"},function:{color:"#57718e"},"tag-id":{color:"#ebf4ff"},selector:{color:"#ebf4ff"},"atrule-id":{color:"#ebf4ff"},"code.language-javascript":{color:"#7eb6f6"},"attr-name":{color:"#7eb6f6"},"code.language-css":{color:"#47ebb4"},"code.language-scss":{color:"#47ebb4"},boolean:{color:"#47ebb4"},string:{color:"#47ebb4"},entity:{color:"#47ebb4",cursor:"help"},url:{color:"#47ebb4"},".language-css .token.string":{color:"#47ebb4"},".language-scss .token.string":{color:"#47ebb4"},".style .token.string":{color:"#47ebb4"},"attr-value":{color:"#47ebb4"},keyword:{color:"#47ebb4"},control:{color:"#47ebb4"},directive:{color:"#47ebb4"},unit:{color:"#47ebb4"},statement:{color:"#47ebb4"},regex:{color:"#47ebb4"},atrule:{color:"#47ebb4"},placeholder:{color:"#47ebb4"},variable:{color:"#47ebb4"},deleted:{textDecoration:"line-through"},inserted:{borderBottom:"1px dotted #ebf4ff",textDecoration:"none"},italic:{fontStyle:"italic"},important:{fontWeight:"bold",color:"#7eb6f6"},bold:{fontWeight:"bold"},"pre > code.highlight":{Outline:".4em solid #34659d",OutlineOffset:".4em"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"#1f2932"},".line-numbers .line-numbers-rows > span:before":{color:"#2c3847"},".line-highlight.line-highlight":{background:"linear-gradient(to right, rgba(10, 163, 112, 0.2) 70%, rgba(10, 163, 112, 0))"}}}(L8)),L8}var B8={},VG;function hYe(){return VG||(VG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#24242e",color:"#767693"},'pre[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#24242e",color:"#767693",padding:"1em",margin:".5em 0",overflow:"auto"},'pre > code[class*="language-"]':{fontSize:"1em"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#5151e6"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#5151e6"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#5151e6"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#5151e6"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#5151e6"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#5151e6"},'code[class*="language-"]::selection':{textShadow:"none",background:"#5151e6"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#5151e6"},':not(pre) > code[class*="language-"]':{padding:".1em",borderRadius:".3em"},comment:{color:"#5b5b76"},prolog:{color:"#5b5b76"},doctype:{color:"#5b5b76"},cdata:{color:"#5b5b76"},punctuation:{color:"#5b5b76"},namespace:{Opacity:".7"},tag:{color:"#dd672c"},operator:{color:"#dd672c"},number:{color:"#dd672c"},property:{color:"#767693"},function:{color:"#767693"},"tag-id":{color:"#ebebff"},selector:{color:"#ebebff"},"atrule-id":{color:"#ebebff"},"code.language-javascript":{color:"#aaaaca"},"attr-name":{color:"#aaaaca"},"code.language-css":{color:"#fe8c52"},"code.language-scss":{color:"#fe8c52"},boolean:{color:"#fe8c52"},string:{color:"#fe8c52"},entity:{color:"#fe8c52",cursor:"help"},url:{color:"#fe8c52"},".language-css .token.string":{color:"#fe8c52"},".language-scss .token.string":{color:"#fe8c52"},".style .token.string":{color:"#fe8c52"},"attr-value":{color:"#fe8c52"},keyword:{color:"#fe8c52"},control:{color:"#fe8c52"},directive:{color:"#fe8c52"},unit:{color:"#fe8c52"},statement:{color:"#fe8c52"},regex:{color:"#fe8c52"},atrule:{color:"#fe8c52"},placeholder:{color:"#fe8c52"},variable:{color:"#fe8c52"},deleted:{textDecoration:"line-through"},inserted:{borderBottom:"1px dotted #ebebff",textDecoration:"none"},italic:{fontStyle:"italic"},important:{fontWeight:"bold",color:"#aaaaca"},bold:{fontWeight:"bold"},"pre > code.highlight":{Outline:".4em solid #7676f4",OutlineOffset:".4em"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"#262631"},".line-numbers .line-numbers-rows > span:before":{color:"#393949"},".line-highlight.line-highlight":{background:"linear-gradient(to right, rgba(221, 103, 44, 0.2) 70%, rgba(221, 103, 44, 0))"}}}(B8)),B8}var $8={},UG;function fYe(){return UG||(UG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#393A34",fontFamily:'"Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",fontSize:".9em",lineHeight:"1.2em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#393A34",fontFamily:'"Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",fontSize:".9em",lineHeight:"1.2em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",border:"1px solid #dddddd",backgroundColor:"white"},'pre > code[class*="language-"]':{fontSize:"1em"},'pre[class*="language-"]::-moz-selection':{background:"#b3d4fc"},'pre[class*="language-"] ::-moz-selection':{background:"#b3d4fc"},'code[class*="language-"]::-moz-selection':{background:"#b3d4fc"},'code[class*="language-"] ::-moz-selection':{background:"#b3d4fc"},'pre[class*="language-"]::selection':{background:"#b3d4fc"},'pre[class*="language-"] ::selection':{background:"#b3d4fc"},'code[class*="language-"]::selection':{background:"#b3d4fc"},'code[class*="language-"] ::selection':{background:"#b3d4fc"},':not(pre) > code[class*="language-"]':{padding:".2em",paddingTop:"1px",paddingBottom:"1px",background:"#f8f8f8",border:"1px solid #dddddd"},comment:{color:"#999988",fontStyle:"italic"},prolog:{color:"#999988",fontStyle:"italic"},doctype:{color:"#999988",fontStyle:"italic"},cdata:{color:"#999988",fontStyle:"italic"},namespace:{Opacity:".7"},string:{color:"#e3116c"},"attr-value":{color:"#e3116c"},punctuation:{color:"#393A34"},operator:{color:"#393A34"},entity:{color:"#36acaa"},url:{color:"#36acaa"},symbol:{color:"#36acaa"},number:{color:"#36acaa"},boolean:{color:"#36acaa"},variable:{color:"#36acaa"},constant:{color:"#36acaa"},property:{color:"#36acaa"},regex:{color:"#36acaa"},inserted:{color:"#36acaa"},atrule:{color:"#00a4db"},keyword:{color:"#00a4db"},"attr-name":{color:"#00a4db"},".language-autohotkey .token.selector":{color:"#00a4db"},function:{color:"#9a050f",fontWeight:"bold"},deleted:{color:"#9a050f"},".language-autohotkey .token.tag":{color:"#9a050f"},tag:{color:"#00009f"},selector:{color:"#00009f"},".language-autohotkey .token.keyword":{color:"#00009f"},important:{fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}($8)),$8}var z8={},WG;function pYe(){return WG||(WG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#ebdbb2",fontFamily:'Consolas, Monaco, "Andale Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#ebdbb2",fontFamily:'Consolas, Monaco, "Andale Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",background:"#1d2021"},'pre[class*="language-"]::-moz-selection':{color:"#fbf1c7",background:"#7c6f64"},'pre[class*="language-"] ::-moz-selection':{color:"#fbf1c7",background:"#7c6f64"},'code[class*="language-"]::-moz-selection':{color:"#fbf1c7",background:"#7c6f64"},'code[class*="language-"] ::-moz-selection':{color:"#fbf1c7",background:"#7c6f64"},'pre[class*="language-"]::selection':{color:"#fbf1c7",background:"#7c6f64"},'pre[class*="language-"] ::selection':{color:"#fbf1c7",background:"#7c6f64"},'code[class*="language-"]::selection':{color:"#fbf1c7",background:"#7c6f64"},'code[class*="language-"] ::selection':{color:"#fbf1c7",background:"#7c6f64"},':not(pre) > code[class*="language-"]':{background:"#1d2021",padding:"0.1em",borderRadius:"0.3em"},comment:{color:"#a89984"},prolog:{color:"#a89984"},cdata:{color:"#a89984"},delimiter:{color:"#fb4934"},boolean:{color:"#fb4934"},keyword:{color:"#fb4934"},selector:{color:"#fb4934"},important:{color:"#fb4934"},atrule:{color:"#fb4934"},operator:{color:"#a89984"},punctuation:{color:"#a89984"},"attr-name":{color:"#a89984"},tag:{color:"#fabd2f"},"tag.punctuation":{color:"#fabd2f"},doctype:{color:"#fabd2f"},builtin:{color:"#fabd2f"},entity:{color:"#d3869b"},number:{color:"#d3869b"},symbol:{color:"#d3869b"},property:{color:"#fb4934"},constant:{color:"#fb4934"},variable:{color:"#fb4934"},string:{color:"#b8bb26"},char:{color:"#b8bb26"},"attr-value":{color:"#a89984"},"attr-value.punctuation":{color:"#a89984"},url:{color:"#b8bb26",textDecoration:"underline"},function:{color:"#fabd2f"},regex:{background:"#b8bb26"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},inserted:{background:"#a89984"},deleted:{background:"#fb4934"}}}(z8)),z8}var H8={},qG;function mYe(){return qG||(qG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#3c3836",fontFamily:'Consolas, Monaco, "Andale Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#3c3836",fontFamily:'Consolas, Monaco, "Andale Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",background:"#f9f5d7"},'pre[class*="language-"]::-moz-selection':{color:"#282828",background:"#a89984"},'pre[class*="language-"] ::-moz-selection':{color:"#282828",background:"#a89984"},'code[class*="language-"]::-moz-selection':{color:"#282828",background:"#a89984"},'code[class*="language-"] ::-moz-selection':{color:"#282828",background:"#a89984"},'pre[class*="language-"]::selection':{color:"#282828",background:"#a89984"},'pre[class*="language-"] ::selection':{color:"#282828",background:"#a89984"},'code[class*="language-"]::selection':{color:"#282828",background:"#a89984"},'code[class*="language-"] ::selection':{color:"#282828",background:"#a89984"},':not(pre) > code[class*="language-"]':{background:"#f9f5d7",padding:"0.1em",borderRadius:"0.3em"},comment:{color:"#7c6f64"},prolog:{color:"#7c6f64"},cdata:{color:"#7c6f64"},delimiter:{color:"#9d0006"},boolean:{color:"#9d0006"},keyword:{color:"#9d0006"},selector:{color:"#9d0006"},important:{color:"#9d0006"},atrule:{color:"#9d0006"},operator:{color:"#7c6f64"},punctuation:{color:"#7c6f64"},"attr-name":{color:"#7c6f64"},tag:{color:"#b57614"},"tag.punctuation":{color:"#b57614"},doctype:{color:"#b57614"},builtin:{color:"#b57614"},entity:{color:"#8f3f71"},number:{color:"#8f3f71"},symbol:{color:"#8f3f71"},property:{color:"#9d0006"},constant:{color:"#9d0006"},variable:{color:"#9d0006"},string:{color:"#797403"},char:{color:"#797403"},"attr-value":{color:"#7c6f64"},"attr-value.punctuation":{color:"#7c6f64"},url:{color:"#797403",textDecoration:"underline"},function:{color:"#b57614"},regex:{background:"#797403"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},inserted:{background:"#7c6f64"},deleted:{background:"#9d0006"}}}(H8)),H8}var V8={},GG;function gYe(){return GG||(GG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={"code[class*='language-']":{color:"#d6e7ff",background:"#030314",textShadow:"none",fontFamily:'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',fontSize:"1em",lineHeight:"1.5",letterSpacing:".2px",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",textAlign:"left",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},"pre[class*='language-']":{color:"#d6e7ff",background:"#030314",textShadow:"none",fontFamily:'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',fontSize:"1em",lineHeight:"1.5",letterSpacing:".2px",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",textAlign:"left",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",border:"1px solid #2a4555",borderRadius:"5px",padding:"1.5em 1em",margin:"1em 0",overflow:"auto"},"pre[class*='language-']::-moz-selection":{color:"inherit",background:"#1d3b54",textShadow:"none"},"pre[class*='language-'] ::-moz-selection":{color:"inherit",background:"#1d3b54",textShadow:"none"},"code[class*='language-']::-moz-selection":{color:"inherit",background:"#1d3b54",textShadow:"none"},"code[class*='language-'] ::-moz-selection":{color:"inherit",background:"#1d3b54",textShadow:"none"},"pre[class*='language-']::selection":{color:"inherit",background:"#1d3b54",textShadow:"none"},"pre[class*='language-'] ::selection":{color:"inherit",background:"#1d3b54",textShadow:"none"},"code[class*='language-']::selection":{color:"inherit",background:"#1d3b54",textShadow:"none"},"code[class*='language-'] ::selection":{color:"inherit",background:"#1d3b54",textShadow:"none"},":not(pre) > code[class*='language-']":{color:"#f0f6f6",background:"#2a4555",padding:"0.2em 0.3em",borderRadius:"0.2em",boxDecorationBreak:"clone"},comment:{color:"#446e69"},prolog:{color:"#446e69"},doctype:{color:"#446e69"},cdata:{color:"#446e69"},punctuation:{color:"#d6b007"},property:{color:"#d6e7ff"},tag:{color:"#d6e7ff"},boolean:{color:"#d6e7ff"},number:{color:"#d6e7ff"},constant:{color:"#d6e7ff"},symbol:{color:"#d6e7ff"},deleted:{color:"#d6e7ff"},selector:{color:"#e60067"},"attr-name":{color:"#e60067"},builtin:{color:"#e60067"},inserted:{color:"#e60067"},string:{color:"#49c6ec"},char:{color:"#49c6ec"},operator:{color:"#ec8e01",background:"transparent"},entity:{color:"#ec8e01",background:"transparent"},url:{color:"#ec8e01",background:"transparent"},".language-css .token.string":{color:"#ec8e01",background:"transparent"},".style .token.string":{color:"#ec8e01",background:"transparent"},atrule:{color:"#0fe468"},"attr-value":{color:"#0fe468"},keyword:{color:"#0fe468"},function:{color:"#78f3e9"},"class-name":{color:"#78f3e9"},regex:{color:"#d6e7ff"},important:{color:"#d6e7ff"},variable:{color:"#d6e7ff"}}}(V8)),V8}var U8={},YG;function yYe(){return YG||(YG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{fontFamily:'"Fira Mono", Menlo, Monaco, "Lucida Console", "Courier New", Courier, monospace',fontSize:"16px",lineHeight:"1.375",direction:"ltr",textAlign:"left",wordSpacing:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",whiteSpace:"pre-wrap",wordBreak:"break-all",wordWrap:"break-word",background:"#322931",color:"#b9b5b8"},'pre[class*="language-"]':{fontFamily:'"Fira Mono", Menlo, Monaco, "Lucida Console", "Courier New", Courier, monospace',fontSize:"16px",lineHeight:"1.375",direction:"ltr",textAlign:"left",wordSpacing:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",whiteSpace:"pre-wrap",wordBreak:"break-all",wordWrap:"break-word",background:"#322931",color:"#b9b5b8",padding:"1em",margin:".5em 0",overflow:"auto"},'pre > code[class*="language-"]':{fontSize:"1em"},':not(pre) > code[class*="language-"]':{padding:".1em",borderRadius:".3em"},comment:{color:"#797379"},prolog:{color:"#797379"},doctype:{color:"#797379"},cdata:{color:"#797379"},punctuation:{color:"#b9b5b8"},".namespace":{Opacity:".7"},null:{color:"#fd8b19"},operator:{color:"#fd8b19"},boolean:{color:"#fd8b19"},number:{color:"#fd8b19"},property:{color:"#fdcc59"},tag:{color:"#1290bf"},string:{color:"#149b93"},selector:{color:"#c85e7c"},"attr-name":{color:"#fd8b19"},entity:{color:"#149b93",cursor:"help"},url:{color:"#149b93"},".language-css .token.string":{color:"#149b93"},".style .token.string":{color:"#149b93"},"attr-value":{color:"#8fc13e"},keyword:{color:"#8fc13e"},control:{color:"#8fc13e"},directive:{color:"#8fc13e"},unit:{color:"#8fc13e"},statement:{color:"#149b93"},regex:{color:"#149b93"},atrule:{color:"#149b93"},placeholder:{color:"#1290bf"},variable:{color:"#1290bf"},important:{color:"#dd464c",fontWeight:"bold"},"pre > code.highlight":{Outline:".4em solid red",OutlineOffset:".4em"}}}(U8)),U8}var W8={},KG;function bYe(){return KG||(KG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#f8f8f2",background:"none",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Monaco, Consolas, 'Andale Mono', 'Ubuntu Mono', monospace",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#f8f8f2",background:"#263E52",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Monaco, Consolas, 'Andale Mono', 'Ubuntu Mono', monospace",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",borderRadius:"0.3em"},':not(pre) > code[class*="language-"]':{background:"#263E52",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"#5c98cd"},prolog:{color:"#5c98cd"},doctype:{color:"#5c98cd"},cdata:{color:"#5c98cd"},punctuation:{color:"#f8f8f2"},".namespace":{Opacity:".7"},property:{color:"#F05E5D"},tag:{color:"#F05E5D"},constant:{color:"#F05E5D"},symbol:{color:"#F05E5D"},deleted:{color:"#F05E5D"},boolean:{color:"#BC94F9"},number:{color:"#BC94F9"},selector:{color:"#FCFCD6"},"attr-name":{color:"#FCFCD6"},string:{color:"#FCFCD6"},char:{color:"#FCFCD6"},builtin:{color:"#FCFCD6"},inserted:{color:"#FCFCD6"},operator:{color:"#f8f8f2"},entity:{color:"#f8f8f2",cursor:"help"},url:{color:"#f8f8f2"},".language-css .token.string":{color:"#f8f8f2"},".style .token.string":{color:"#f8f8f2"},variable:{color:"#f8f8f2"},atrule:{color:"#66D8EF"},"attr-value":{color:"#66D8EF"},function:{color:"#66D8EF"},"class-name":{color:"#66D8EF"},keyword:{color:"#6EB26E"},regex:{color:"#F05E5D"},important:{color:"#F05E5D",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(W8)),W8}var q8={},XG;function xYe(){return XG||(XG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",color:"#eee",background:"#2f2f2f",fontFamily:"Roboto Mono, monospace",fontSize:"1em",lineHeight:"1.5em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",color:"#eee",background:"#2f2f2f",fontFamily:"Roboto Mono, monospace",fontSize:"1em",lineHeight:"1.5em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",overflow:"auto",position:"relative",margin:"0.5em 0",padding:"1.25em 1em"},'code[class*="language-"]::-moz-selection':{background:"#363636"},'pre[class*="language-"]::-moz-selection':{background:"#363636"},'code[class*="language-"] ::-moz-selection':{background:"#363636"},'pre[class*="language-"] ::-moz-selection':{background:"#363636"},'code[class*="language-"]::selection':{background:"#363636"},'pre[class*="language-"]::selection':{background:"#363636"},'code[class*="language-"] ::selection':{background:"#363636"},'pre[class*="language-"] ::selection':{background:"#363636"},':not(pre) > code[class*="language-"]':{whiteSpace:"normal",borderRadius:"0.2em",padding:"0.1em"},".language-css > code":{color:"#fd9170"},".language-sass > code":{color:"#fd9170"},".language-scss > code":{color:"#fd9170"},'[class*="language-"] .namespace':{Opacity:"0.7"},atrule:{color:"#c792ea"},"attr-name":{color:"#ffcb6b"},"attr-value":{color:"#a5e844"},attribute:{color:"#a5e844"},boolean:{color:"#c792ea"},builtin:{color:"#ffcb6b"},cdata:{color:"#80cbc4"},char:{color:"#80cbc4"},class:{color:"#ffcb6b"},"class-name":{color:"#f2ff00"},comment:{color:"#616161"},constant:{color:"#c792ea"},deleted:{color:"#ff6666"},doctype:{color:"#616161"},entity:{color:"#ff6666"},function:{color:"#c792ea"},hexcode:{color:"#f2ff00"},id:{color:"#c792ea",fontWeight:"bold"},important:{color:"#c792ea",fontWeight:"bold"},inserted:{color:"#80cbc4"},keyword:{color:"#c792ea"},number:{color:"#fd9170"},operator:{color:"#89ddff"},prolog:{color:"#616161"},property:{color:"#80cbc4"},"pseudo-class":{color:"#a5e844"},"pseudo-element":{color:"#a5e844"},punctuation:{color:"#89ddff"},regex:{color:"#f2ff00"},selector:{color:"#ff6666"},string:{color:"#a5e844"},symbol:{color:"#c792ea"},tag:{color:"#ff6666"},unit:{color:"#fd9170"},url:{color:"#ff6666"},variable:{color:"#ff6666"}}}(q8)),q8}var G8={},JG;function vYe(){return JG||(JG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",color:"#90a4ae",background:"#fafafa",fontFamily:"Roboto Mono, monospace",fontSize:"1em",lineHeight:"1.5em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",color:"#90a4ae",background:"#fafafa",fontFamily:"Roboto Mono, monospace",fontSize:"1em",lineHeight:"1.5em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",overflow:"auto",position:"relative",margin:"0.5em 0",padding:"1.25em 1em"},'code[class*="language-"]::-moz-selection':{background:"#cceae7",color:"#263238"},'pre[class*="language-"]::-moz-selection':{background:"#cceae7",color:"#263238"},'code[class*="language-"] ::-moz-selection':{background:"#cceae7",color:"#263238"},'pre[class*="language-"] ::-moz-selection':{background:"#cceae7",color:"#263238"},'code[class*="language-"]::selection':{background:"#cceae7",color:"#263238"},'pre[class*="language-"]::selection':{background:"#cceae7",color:"#263238"},'code[class*="language-"] ::selection':{background:"#cceae7",color:"#263238"},'pre[class*="language-"] ::selection':{background:"#cceae7",color:"#263238"},':not(pre) > code[class*="language-"]':{whiteSpace:"normal",borderRadius:"0.2em",padding:"0.1em"},".language-css > code":{color:"#f76d47"},".language-sass > code":{color:"#f76d47"},".language-scss > code":{color:"#f76d47"},'[class*="language-"] .namespace':{Opacity:"0.7"},atrule:{color:"#7c4dff"},"attr-name":{color:"#39adb5"},"attr-value":{color:"#f6a434"},attribute:{color:"#f6a434"},boolean:{color:"#7c4dff"},builtin:{color:"#39adb5"},cdata:{color:"#39adb5"},char:{color:"#39adb5"},class:{color:"#39adb5"},"class-name":{color:"#6182b8"},comment:{color:"#aabfc9"},constant:{color:"#7c4dff"},deleted:{color:"#e53935"},doctype:{color:"#aabfc9"},entity:{color:"#e53935"},function:{color:"#7c4dff"},hexcode:{color:"#f76d47"},id:{color:"#7c4dff",fontWeight:"bold"},important:{color:"#7c4dff",fontWeight:"bold"},inserted:{color:"#39adb5"},keyword:{color:"#7c4dff"},number:{color:"#f76d47"},operator:{color:"#39adb5"},prolog:{color:"#aabfc9"},property:{color:"#39adb5"},"pseudo-class":{color:"#f6a434"},"pseudo-element":{color:"#f6a434"},punctuation:{color:"#39adb5"},regex:{color:"#6182b8"},selector:{color:"#e53935"},string:{color:"#f6a434"},symbol:{color:"#7c4dff"},tag:{color:"#e53935"},unit:{color:"#f76d47"},url:{color:"#e53935"},variable:{color:"#e53935"}}}(G8)),G8}var Y8={},ZG;function wYe(){return ZG||(ZG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",color:"#c3cee3",background:"#263238",fontFamily:"Roboto Mono, monospace",fontSize:"1em",lineHeight:"1.5em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",color:"#c3cee3",background:"#263238",fontFamily:"Roboto Mono, monospace",fontSize:"1em",lineHeight:"1.5em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",overflow:"auto",position:"relative",margin:"0.5em 0",padding:"1.25em 1em"},'code[class*="language-"]::-moz-selection':{background:"#363636"},'pre[class*="language-"]::-moz-selection':{background:"#363636"},'code[class*="language-"] ::-moz-selection':{background:"#363636"},'pre[class*="language-"] ::-moz-selection':{background:"#363636"},'code[class*="language-"]::selection':{background:"#363636"},'pre[class*="language-"]::selection':{background:"#363636"},'code[class*="language-"] ::selection':{background:"#363636"},'pre[class*="language-"] ::selection':{background:"#363636"},':not(pre) > code[class*="language-"]':{whiteSpace:"normal",borderRadius:"0.2em",padding:"0.1em"},".language-css > code":{color:"#fd9170"},".language-sass > code":{color:"#fd9170"},".language-scss > code":{color:"#fd9170"},'[class*="language-"] .namespace':{Opacity:"0.7"},atrule:{color:"#c792ea"},"attr-name":{color:"#ffcb6b"},"attr-value":{color:"#c3e88d"},attribute:{color:"#c3e88d"},boolean:{color:"#c792ea"},builtin:{color:"#ffcb6b"},cdata:{color:"#80cbc4"},char:{color:"#80cbc4"},class:{color:"#ffcb6b"},"class-name":{color:"#f2ff00"},color:{color:"#f2ff00"},comment:{color:"#546e7a"},constant:{color:"#c792ea"},deleted:{color:"#f07178"},doctype:{color:"#546e7a"},entity:{color:"#f07178"},function:{color:"#c792ea"},hexcode:{color:"#f2ff00"},id:{color:"#c792ea",fontWeight:"bold"},important:{color:"#c792ea",fontWeight:"bold"},inserted:{color:"#80cbc4"},keyword:{color:"#c792ea",fontStyle:"italic"},number:{color:"#fd9170"},operator:{color:"#89ddff"},prolog:{color:"#546e7a"},property:{color:"#80cbc4"},"pseudo-class":{color:"#c3e88d"},"pseudo-element":{color:"#c3e88d"},punctuation:{color:"#89ddff"},regex:{color:"#f2ff00"},selector:{color:"#f07178"},string:{color:"#c3e88d"},symbol:{color:"#c792ea"},tag:{color:"#f07178"},unit:{color:"#f07178"},url:{color:"#fd9170"},variable:{color:"#f07178"}}}(Y8)),Y8}var K8={},QG;function SYe(){return QG||(QG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#d6deeb",fontFamily:'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",fontSize:"1em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"white",fontFamily:'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",fontSize:"1em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",background:"#011627"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'pre[class*="language-"]::selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'code[class*="language-"]::selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'code[class*="language-"] ::selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},':not(pre) > code[class*="language-"]':{color:"white",background:"#011627",padding:"0.1em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"rgb(99, 119, 119)",fontStyle:"italic"},prolog:{color:"rgb(99, 119, 119)",fontStyle:"italic"},cdata:{color:"rgb(99, 119, 119)",fontStyle:"italic"},punctuation:{color:"rgb(199, 146, 234)"},".namespace":{color:"rgb(178, 204, 214)"},deleted:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"},symbol:{color:"rgb(128, 203, 196)"},property:{color:"rgb(128, 203, 196)"},tag:{color:"rgb(127, 219, 202)"},operator:{color:"rgb(127, 219, 202)"},keyword:{color:"rgb(127, 219, 202)"},boolean:{color:"rgb(255, 88, 116)"},number:{color:"rgb(247, 140, 108)"},constant:{color:"rgb(130, 170, 255)"},function:{color:"rgb(130, 170, 255)"},builtin:{color:"rgb(130, 170, 255)"},char:{color:"rgb(130, 170, 255)"},selector:{color:"rgb(199, 146, 234)",fontStyle:"italic"},doctype:{color:"rgb(199, 146, 234)",fontStyle:"italic"},"attr-name":{color:"rgb(173, 219, 103)",fontStyle:"italic"},inserted:{color:"rgb(173, 219, 103)",fontStyle:"italic"},string:{color:"rgb(173, 219, 103)"},url:{color:"rgb(173, 219, 103)"},entity:{color:"rgb(173, 219, 103)"},".language-css .token.string":{color:"rgb(173, 219, 103)"},".style .token.string":{color:"rgb(173, 219, 103)"},"class-name":{color:"rgb(255, 203, 139)"},atrule:{color:"rgb(255, 203, 139)"},"attr-value":{color:"rgb(255, 203, 139)"},regex:{color:"rgb(214, 222, 235)"},important:{color:"rgb(214, 222, 235)",fontWeight:"bold"},variable:{color:"rgb(214, 222, 235)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(K8)),K8}var X8={},eY;function CYe(){return eY||(eY=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#f8f8f2",background:"none",fontFamily:`"Fira Code", Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace`,textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#f8f8f2",background:"#2E3440",fontFamily:`"Fira Code", Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace`,textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",borderRadius:"0.3em"},':not(pre) > code[class*="language-"]':{background:"#2E3440",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"#636f88"},prolog:{color:"#636f88"},doctype:{color:"#636f88"},cdata:{color:"#636f88"},punctuation:{color:"#81A1C1"},".namespace":{Opacity:".7"},property:{color:"#81A1C1"},tag:{color:"#81A1C1"},constant:{color:"#81A1C1"},symbol:{color:"#81A1C1"},deleted:{color:"#81A1C1"},number:{color:"#B48EAD"},boolean:{color:"#81A1C1"},selector:{color:"#A3BE8C"},"attr-name":{color:"#A3BE8C"},string:{color:"#A3BE8C"},char:{color:"#A3BE8C"},builtin:{color:"#A3BE8C"},inserted:{color:"#A3BE8C"},operator:{color:"#81A1C1"},entity:{color:"#81A1C1",cursor:"help"},url:{color:"#81A1C1"},".language-css .token.string":{color:"#81A1C1"},".style .token.string":{color:"#81A1C1"},variable:{color:"#81A1C1"},atrule:{color:"#88C0D0"},"attr-value":{color:"#88C0D0"},function:{color:"#88C0D0"},"class-name":{color:"#88C0D0"},keyword:{color:"#81A1C1"},regex:{color:"#EBCB8B"},important:{color:"#EBCB8B",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(X8)),X8}var J8={},tY;function kYe(){return tY||(tY=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{background:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},'code[class*="language-"]::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"] *::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"]::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"] *::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'pre[class*="language-"] *::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},prolog:{color:"hsl(220, 10%, 40%)"},cdata:{color:"hsl(220, 10%, 40%)"},doctype:{color:"hsl(220, 14%, 71%)"},punctuation:{color:"hsl(220, 14%, 71%)"},entity:{color:"hsl(220, 14%, 71%)",cursor:"help"},"attr-name":{color:"hsl(29, 54%, 61%)"},"class-name":{color:"hsl(29, 54%, 61%)"},boolean:{color:"hsl(29, 54%, 61%)"},constant:{color:"hsl(29, 54%, 61%)"},number:{color:"hsl(29, 54%, 61%)"},atrule:{color:"hsl(29, 54%, 61%)"},keyword:{color:"hsl(286, 60%, 67%)"},property:{color:"hsl(355, 65%, 65%)"},tag:{color:"hsl(355, 65%, 65%)"},symbol:{color:"hsl(355, 65%, 65%)"},deleted:{color:"hsl(355, 65%, 65%)"},important:{color:"hsl(355, 65%, 65%)"},selector:{color:"hsl(95, 38%, 62%)"},string:{color:"hsl(95, 38%, 62%)"},char:{color:"hsl(95, 38%, 62%)"},builtin:{color:"hsl(95, 38%, 62%)"},inserted:{color:"hsl(95, 38%, 62%)"},regex:{color:"hsl(95, 38%, 62%)"},"attr-value":{color:"hsl(95, 38%, 62%)"},"attr-value > .token.punctuation":{color:"hsl(95, 38%, 62%)"},variable:{color:"hsl(207, 82%, 66%)"},operator:{color:"hsl(207, 82%, 66%)"},function:{color:"hsl(207, 82%, 66%)"},url:{color:"hsl(187, 47%, 55%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(220, 14%, 71%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(220, 14%, 71%)"},".language-css .token.selector":{color:"hsl(355, 65%, 65%)"},".language-css .token.property":{color:"hsl(220, 14%, 71%)"},".language-css .token.function":{color:"hsl(187, 47%, 55%)"},".language-css .token.url > .token.function":{color:"hsl(187, 47%, 55%)"},".language-css .token.url > .token.string.url":{color:"hsl(95, 38%, 62%)"},".language-css .token.important":{color:"hsl(286, 60%, 67%)"},".language-css .token.atrule .token.rule":{color:"hsl(286, 60%, 67%)"},".language-javascript .token.operator":{color:"hsl(286, 60%, 67%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(5, 48%, 51%)"},".language-json .token.operator":{color:"hsl(220, 14%, 71%)"},".language-json .token.null.keyword":{color:"hsl(29, 54%, 61%)"},".language-markdown .token.url":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url > .token.operator":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url > .token.content":{color:"hsl(207, 82%, 66%)"},".language-markdown .token.url > .token.url":{color:"hsl(187, 47%, 55%)"},".language-markdown .token.url-reference.url":{color:"hsl(187, 47%, 55%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"hsl(95, 38%, 62%)"},".language-markdown .token.bold .token.content":{color:"hsl(29, 54%, 61%)"},".language-markdown .token.italic .token.content":{color:"hsl(286, 60%, 67%)"},".language-markdown .token.strike .token.content":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.list.punctuation":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(355, 65%, 65%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:"0.8"},"token.tab:not(:empty):before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.cr:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.lf:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.space:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},".line-highlight.line-highlight":{background:"hsla(220, 100%, 80%, 0.04)"},".line-highlight.line-highlight:before":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 14%, 71%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 14%, 71%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(220, 100%, 80%, 0.04)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(220, 14%, 71%, 0.15)"},".command-line .command-line-prompt":{borderRightColor:"hsla(220, 14%, 71%, 0.15)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(220, 14%, 45%)"},".command-line .command-line-prompt > span:before":{color:"hsl(220, 14%, 45%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"hsl(95, 38%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"hsl(95, 38%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"hsl(95, 38%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"hsl(207, 82%, 66%)"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"hsl(207, 82%, 66%)"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"hsl(207, 82%, 66%)"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(286, 60%, 67%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(286, 60%, 67%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(286, 60%, 67%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(224, 13%, 17%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(224, 13%, 17%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(224, 13%, 17%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(224, 13%, 17%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(219, 13%, 22%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(219, 13%, 22%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(219, 13%, 22%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(220, 14%, 71%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(220, 14%, 71%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(220, 14%, 71%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(220, 14%, 71%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(220, 14%, 71%)"}}}(J8)),J8}var Z8={},nY;function EYe(){return nY||(nY=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},'code[class*="language-"]::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"]::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},prolog:{color:"hsl(230, 4%, 64%)"},cdata:{color:"hsl(230, 4%, 64%)"},doctype:{color:"hsl(230, 8%, 24%)"},punctuation:{color:"hsl(230, 8%, 24%)"},entity:{color:"hsl(230, 8%, 24%)",cursor:"help"},"attr-name":{color:"hsl(35, 99%, 36%)"},"class-name":{color:"hsl(35, 99%, 36%)"},boolean:{color:"hsl(35, 99%, 36%)"},constant:{color:"hsl(35, 99%, 36%)"},number:{color:"hsl(35, 99%, 36%)"},atrule:{color:"hsl(35, 99%, 36%)"},keyword:{color:"hsl(301, 63%, 40%)"},property:{color:"hsl(5, 74%, 59%)"},tag:{color:"hsl(5, 74%, 59%)"},symbol:{color:"hsl(5, 74%, 59%)"},deleted:{color:"hsl(5, 74%, 59%)"},important:{color:"hsl(5, 74%, 59%)"},selector:{color:"hsl(119, 34%, 47%)"},string:{color:"hsl(119, 34%, 47%)"},char:{color:"hsl(119, 34%, 47%)"},builtin:{color:"hsl(119, 34%, 47%)"},inserted:{color:"hsl(119, 34%, 47%)"},regex:{color:"hsl(119, 34%, 47%)"},"attr-value":{color:"hsl(119, 34%, 47%)"},"attr-value > .token.punctuation":{color:"hsl(119, 34%, 47%)"},variable:{color:"hsl(221, 87%, 60%)"},operator:{color:"hsl(221, 87%, 60%)"},function:{color:"hsl(221, 87%, 60%)"},url:{color:"hsl(198, 99%, 37%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(230, 8%, 24%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(230, 8%, 24%)"},".language-css .token.selector":{color:"hsl(5, 74%, 59%)"},".language-css .token.property":{color:"hsl(230, 8%, 24%)"},".language-css .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.string.url":{color:"hsl(119, 34%, 47%)"},".language-css .token.important":{color:"hsl(301, 63%, 40%)"},".language-css .token.atrule .token.rule":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.operator":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(344, 84%, 43%)"},".language-json .token.operator":{color:"hsl(230, 8%, 24%)"},".language-json .token.null.keyword":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.url":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.operator":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.content":{color:"hsl(221, 87%, 60%)"},".language-markdown .token.url > .token.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.url-reference.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"hsl(119, 34%, 47%)"},".language-markdown .token.bold .token.content":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.italic .token.content":{color:"hsl(301, 63%, 40%)"},".language-markdown .token.strike .token.content":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.list.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(5, 74%, 59%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:"0.8"},"token.tab:not(:empty):before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.cr:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.lf:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.space:before":{color:"hsla(230, 8%, 24%, 0.2)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},".line-highlight.line-highlight":{background:"hsla(230, 8%, 24%, 0.05)"},".line-highlight.line-highlight:before":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(230, 8%, 24%, 0.05)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".command-line .command-line-prompt":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(230, 1%, 62%)"},".command-line .command-line-prompt > span:before":{color:"hsl(230, 1%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(301, 63%, 40%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(0, 0, 95%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(0, 0, 95%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(0, 0, 95%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(0, 0, 95%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(0, 0%, 100%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(230, 8%, 24%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(230, 8%, 24%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(230, 8%, 24%)"}}}(Z8)),Z8}var Q8={},rY;function DYe(){return rY||(rY=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",whiteSpace:"pre-wrap",wordBreak:"break-all",wordWrap:"break-word",fontFamily:'Menlo, Monaco, "Courier New", monospace',fontSize:"15px",lineHeight:"1.5",color:"#dccf8f",textShadow:"0"},'pre[class*="language-"]':{MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",whiteSpace:"pre-wrap",wordBreak:"break-all",wordWrap:"break-word",fontFamily:'Menlo, Monaco, "Courier New", monospace',fontSize:"15px",lineHeight:"1.5",color:"#DCCF8F",textShadow:"0",borderRadius:"5px",border:"1px solid #000",background:"#181914 url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAMAAA/+4ADkFkb2JlAGTAAAAAAf/bAIQACQYGBgcGCQcHCQ0IBwgNDwsJCQsPEQ4ODw4OERENDg4ODg0RERQUFhQUERoaHBwaGiYmJiYmKysrKysrKysrKwEJCAgJCgkMCgoMDwwODA8TDg4ODhMVDg4PDg4VGhMRERERExoXGhYWFhoXHR0aGh0dJCQjJCQrKysrKysrKysr/8AAEQgAjACMAwEiAAIRAQMRAf/EAF4AAQEBAAAAAAAAAAAAAAAAAAABBwEBAQAAAAAAAAAAAAAAAAAAAAIQAAEDAwIHAQEAAAAAAAAAAADwAREhYaExkUFRcYGxwdHh8REBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AyGFEjHaBS2fDDs2zkhKmBKktb7km+ZwwCnXPkLVmCTMItj6AXFxRS465/BTnkAJvkLkJe+7AKKoi2AtRS2zuAWsCb5GOlBN8gKfmuGHZ8MFqIth3ALmFoFwbwKWyAlTAp17uKqBvgBD8sM4fTjhvAhkzhaRkBMKBrfs7jGPIpzy7gFrAqnC0C0gB0EWwBDW2cBVQwm+QtPpa3wBO3sVvszCnLAhkzgL5/RLf13cLQd8/AGlu0Cb5HTx9KuAEieGJEdcehS3eRTp2ATdt3CpIm+QtZwAhROXFeb7swp/ahaM3kBE/jSIUBc/AWrgBN8uNFAl+b7sAXFxFn2YLUU5Ns7gFX8C4ib+hN8gFWXwK3bZglxEJm+gKdciLPsFV/TClsgJUwKJ5FVA7tvIFrfZhVfGJDcsCKaYgAqv6YRbE+RWOWBtu7+AL3yRalXLyKqAIIfk+zARbDgFyEsncYwJvlgFRW+GEWntIi2P0BooyFxcNr8Ep3+ANLbMO+QyhvbiqdgC0kVvgUUiLYgBS2QtPbiVI1/sgOmG9uO+Y8DW+7jS2zAOnj6O2BndwuIAUtkdRN8gFoK3wwXMQyZwHVbClsuNLd4E3yAUR6FVDBR+BafQGt93LVMxJTv8ABts4CVLhcfYWsCb5kC9/BHdU8CLYFY5bMAd+eX9MGthhpbA1vu4B7+RKkaW2Yq4AQtVBBFsAJU/AuIXBhN8gGWnstefhiZyWvLAEnbYS1uzSFP6Jvn4Baxx70JKkQojLib5AVTey1jjgkKJGO0AKWyOm7N7cSpgSpAdPH0Tfd/gp1z5C1ZgKqN9J2wFxcUUuAFLZAm+QC0Fb4YUVRFsAOvj4KW2dwtYE3yAWk/wS/PLMKfmuGHZ8MAXF/Ja32Yi5haAKWz4Ydm2cSpgU693Atb7km+Zwwh+WGcPpxw3gAkzCLY+iYUDW/Z3Adc/gpzyFrAqnALkJe+7DoItgAtRS2zuKqGE3yAx0oJvkdvYrfZmALURbDuL5/RLf13cAuDeBS2RpbtAm+QFVA3wR+3fUtFHoBDJnC0jIXH0HWsgMY8inPLuOkd9chp4z20ALQLSA8cI9jYAIa2zjzjBd8gRafS1vgiUho/kAKcsCGTOGWvoOpkAtB3z8Hm8x2Ff5ADp4+lXAlIvcmwH/2Q==') repeat left top",padding:"12px",overflow:"auto"},'pre > code[class*="language-"]':{fontSize:"1em"},':not(pre) > code[class*="language-"]':{borderRadius:"5px",border:"1px solid #000",color:"#DCCF8F",background:"#181914 url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAMAAA/+4ADkFkb2JlAGTAAAAAAf/bAIQACQYGBgcGCQcHCQ0IBwgNDwsJCQsPEQ4ODw4OERENDg4ODg0RERQUFhQUERoaHBwaGiYmJiYmKysrKysrKysrKwEJCAgJCgkMCgoMDwwODA8TDg4ODhMVDg4PDg4VGhMRERERExoXGhYWFhoXHR0aGh0dJCQjJCQrKysrKysrKysr/8AAEQgAjACMAwEiAAIRAQMRAf/EAF4AAQEBAAAAAAAAAAAAAAAAAAABBwEBAQAAAAAAAAAAAAAAAAAAAAIQAAEDAwIHAQEAAAAAAAAAAADwAREhYaExkUFRcYGxwdHh8REBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AyGFEjHaBS2fDDs2zkhKmBKktb7km+ZwwCnXPkLVmCTMItj6AXFxRS465/BTnkAJvkLkJe+7AKKoi2AtRS2zuAWsCb5GOlBN8gKfmuGHZ8MFqIth3ALmFoFwbwKWyAlTAp17uKqBvgBD8sM4fTjhvAhkzhaRkBMKBrfs7jGPIpzy7gFrAqnC0C0gB0EWwBDW2cBVQwm+QtPpa3wBO3sVvszCnLAhkzgL5/RLf13cLQd8/AGlu0Cb5HTx9KuAEieGJEdcehS3eRTp2ATdt3CpIm+QtZwAhROXFeb7swp/ahaM3kBE/jSIUBc/AWrgBN8uNFAl+b7sAXFxFn2YLUU5Ns7gFX8C4ib+hN8gFWXwK3bZglxEJm+gKdciLPsFV/TClsgJUwKJ5FVA7tvIFrfZhVfGJDcsCKaYgAqv6YRbE+RWOWBtu7+AL3yRalXLyKqAIIfk+zARbDgFyEsncYwJvlgFRW+GEWntIi2P0BooyFxcNr8Ep3+ANLbMO+QyhvbiqdgC0kVvgUUiLYgBS2QtPbiVI1/sgOmG9uO+Y8DW+7jS2zAOnj6O2BndwuIAUtkdRN8gFoK3wwXMQyZwHVbClsuNLd4E3yAUR6FVDBR+BafQGt93LVMxJTv8ABts4CVLhcfYWsCb5kC9/BHdU8CLYFY5bMAd+eX9MGthhpbA1vu4B7+RKkaW2Yq4AQtVBBFsAJU/AuIXBhN8gGWnstefhiZyWvLAEnbYS1uzSFP6Jvn4Baxx70JKkQojLib5AVTey1jjgkKJGO0AKWyOm7N7cSpgSpAdPH0Tfd/gp1z5C1ZgKqN9J2wFxcUUuAFLZAm+QC0Fb4YUVRFsAOvj4KW2dwtYE3yAWk/wS/PLMKfmuGHZ8MAXF/Ja32Yi5haAKWz4Ydm2cSpgU693Atb7km+Zwwh+WGcPpxw3gAkzCLY+iYUDW/Z3Adc/gpzyFrAqnALkJe+7DoItgAtRS2zuKqGE3yAx0oJvkdvYrfZmALURbDuL5/RLf13cAuDeBS2RpbtAm+QFVA3wR+3fUtFHoBDJnC0jIXH0HWsgMY8inPLuOkd9chp4z20ALQLSA8cI9jYAIa2zjzjBd8gRafS1vgiUho/kAKcsCGTOGWvoOpkAtB3z8Hm8x2Ff5ADp4+lXAlIvcmwH/2Q==') repeat left top",padding:"2px 6px"},namespace:{Opacity:".7"},comment:{color:"#586e75",fontStyle:"italic"},prolog:{color:"#586e75",fontStyle:"italic"},doctype:{color:"#586e75",fontStyle:"italic"},cdata:{color:"#586e75",fontStyle:"italic"},number:{color:"#b89859"},string:{color:"#468966"},char:{color:"#468966"},builtin:{color:"#468966"},inserted:{color:"#468966"},"attr-name":{color:"#b89859"},operator:{color:"#dccf8f"},entity:{color:"#dccf8f",cursor:"help"},url:{color:"#dccf8f"},".language-css .token.string":{color:"#dccf8f"},".style .token.string":{color:"#dccf8f"},selector:{color:"#859900"},regex:{color:"#859900"},atrule:{color:"#cb4b16"},keyword:{color:"#cb4b16"},"attr-value":{color:"#468966"},function:{color:"#b58900"},variable:{color:"#b58900"},placeholder:{color:"#b58900"},property:{color:"#b89859"},tag:{color:"#ffb03b"},boolean:{color:"#b89859"},constant:{color:"#b89859"},symbol:{color:"#b89859"},important:{color:"#dc322f"},statement:{color:"#dc322f"},deleted:{color:"#dc322f"},punctuation:{color:"#dccf8f"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(Q8)),Q8}var e9={},sY;function AYe(){return sY||(sY=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={"code[class*='language-']":{color:"#9efeff",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",fontFamily:"'Operator Mono', 'Fira Code', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontWeight:"400",fontSize:"17px",lineHeight:"25px",letterSpacing:"0.5px",textShadow:"0 1px #222245"},"pre[class*='language-']":{color:"#9efeff",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",fontFamily:"'Operator Mono', 'Fira Code', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontWeight:"400",fontSize:"17px",lineHeight:"25px",letterSpacing:"0.5px",textShadow:"0 1px #222245",padding:"2em",margin:"0.5em 0",overflow:"auto",background:"#1e1e3f"},"pre[class*='language-']::-moz-selection":{color:"inherit",background:"#a599e9"},"pre[class*='language-'] ::-moz-selection":{color:"inherit",background:"#a599e9"},"code[class*='language-']::-moz-selection":{color:"inherit",background:"#a599e9"},"code[class*='language-'] ::-moz-selection":{color:"inherit",background:"#a599e9"},"pre[class*='language-']::selection":{color:"inherit",background:"#a599e9"},"pre[class*='language-'] ::selection":{color:"inherit",background:"#a599e9"},"code[class*='language-']::selection":{color:"inherit",background:"#a599e9"},"code[class*='language-'] ::selection":{color:"inherit",background:"#a599e9"},":not(pre) > code[class*='language-']":{background:"#1e1e3f",padding:"0.1em",borderRadius:"0.3em"},"":{fontWeight:"400"},comment:{color:"#b362ff"},prolog:{color:"#b362ff"},cdata:{color:"#b362ff"},delimiter:{color:"#ff9d00"},keyword:{color:"#ff9d00"},selector:{color:"#ff9d00"},important:{color:"#ff9d00"},atrule:{color:"#ff9d00"},operator:{color:"rgb(255, 180, 84)",background:"none"},"attr-name":{color:"rgb(255, 180, 84)"},punctuation:{color:"#ffffff"},boolean:{color:"rgb(255, 98, 140)"},tag:{color:"rgb(255, 157, 0)"},"tag.punctuation":{color:"rgb(255, 157, 0)"},doctype:{color:"rgb(255, 157, 0)"},builtin:{color:"rgb(255, 157, 0)"},entity:{color:"#6897bb",background:"none"},symbol:{color:"#6897bb"},number:{color:"#ff628c"},property:{color:"#ff628c"},constant:{color:"#ff628c"},variable:{color:"#ff628c"},string:{color:"#a5ff90"},char:{color:"#a5ff90"},"attr-value":{color:"#a5c261"},"attr-value.punctuation":{color:"#a5c261"},"attr-value.punctuation:first-child":{color:"#a9b7c6"},url:{color:"#287bde",textDecoration:"underline",background:"none"},function:{color:"rgb(250, 208, 0)"},regex:{background:"#364135"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},inserted:{background:"#00ff00"},deleted:{background:"#ff000d"},"code.language-css .token.property":{color:"#a9b7c6"},"code.language-css .token.property + .token.punctuation":{color:"#a9b7c6"},"code.language-css .token.id":{color:"#ffc66d"},"code.language-css .token.selector > .token.class":{color:"#ffc66d"},"code.language-css .token.selector > .token.attribute":{color:"#ffc66d"},"code.language-css .token.selector > .token.pseudo-class":{color:"#ffc66d"},"code.language-css .token.selector > .token.pseudo-element":{color:"#ffc66d"},"class-name":{color:"#fb94ff"},".language-css .token.string":{background:"none"},".style .token.string":{background:"none"},".line-highlight.line-highlight":{marginTop:"36px",background:"linear-gradient(to right, rgba(179, 98, 255, 0.17), transparent)"},".line-highlight.line-highlight:before":{content:"''"},".line-highlight.line-highlight[data-end]:after":{content:"''"}}}(e9)),e9}var t9={},iY;function TYe(){return iY||(iY=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#839496",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#839496",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",borderRadius:"0.3em",background:"#002b36"},':not(pre) > code[class*="language-"]':{background:"#002b36",padding:".1em",borderRadius:".3em"},comment:{color:"#586e75"},prolog:{color:"#586e75"},doctype:{color:"#586e75"},cdata:{color:"#586e75"},punctuation:{color:"#93a1a1"},".namespace":{Opacity:".7"},property:{color:"#268bd2"},keyword:{color:"#268bd2"},tag:{color:"#268bd2"},"class-name":{color:"#FFFFB6",textDecoration:"underline"},boolean:{color:"#b58900"},constant:{color:"#b58900"},symbol:{color:"#dc322f"},deleted:{color:"#dc322f"},number:{color:"#859900"},selector:{color:"#859900"},"attr-name":{color:"#859900"},string:{color:"#859900"},char:{color:"#859900"},builtin:{color:"#859900"},inserted:{color:"#859900"},variable:{color:"#268bd2"},operator:{color:"#EDEDED"},function:{color:"#268bd2"},regex:{color:"#E9C062"},important:{color:"#fd971f",fontWeight:"bold"},entity:{color:"#FFFFB6",cursor:"help"},url:{color:"#96CBFE"},".language-css .token.string":{color:"#87C38A"},".style .token.string":{color:"#87C38A"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},atrule:{color:"#F9EE98"},"attr-value":{color:"#F9EE98"}}}(t9)),t9}var n9={},oY;function _Ye(){return oY||(oY=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",backgroundColor:"transparent !important",backgroundImage:"linear-gradient(to bottom, #2a2139 75%, #34294f)"},':not(pre) > code[class*="language-"]':{backgroundColor:"transparent !important",backgroundImage:"linear-gradient(to bottom, #2a2139 75%, #34294f)",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"#8e8e8e"},"block-comment":{color:"#8e8e8e"},prolog:{color:"#8e8e8e"},doctype:{color:"#8e8e8e"},cdata:{color:"#8e8e8e"},punctuation:{color:"#ccc"},tag:{color:"#e2777a"},"attr-name":{color:"#e2777a"},namespace:{color:"#e2777a"},number:{color:"#e2777a"},unit:{color:"#e2777a"},hexcode:{color:"#e2777a"},deleted:{color:"#e2777a"},property:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"},selector:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"},"function-name":{color:"#6196cc"},boolean:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"},"selector.id":{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"},function:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"},"class-name":{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"},constant:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},symbol:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},important:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575",fontWeight:"bold"},atrule:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"},keyword:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"},"selector.class":{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"},builtin:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"},string:{color:"#f87c32"},char:{color:"#f87c32"},"attr-value":{color:"#f87c32"},regex:{color:"#f87c32"},variable:{color:"#f87c32"},operator:{color:"#67cdcc"},entity:{color:"#67cdcc",cursor:"help"},url:{color:"#67cdcc"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},inserted:{color:"green"}}}(n9)),n9}var r9={},aY;function NYe(){return aY||(aY=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#393A34",fontFamily:'"Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",fontSize:".9em",lineHeight:"1.2em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#393A34",fontFamily:'"Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",fontSize:".9em",lineHeight:"1.2em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",border:"1px solid #dddddd",backgroundColor:"white"},'pre > code[class*="language-"]':{fontSize:"1em"},'pre[class*="language-"]::-moz-selection':{background:"#C1DEF1"},'pre[class*="language-"] ::-moz-selection':{background:"#C1DEF1"},'code[class*="language-"]::-moz-selection':{background:"#C1DEF1"},'code[class*="language-"] ::-moz-selection':{background:"#C1DEF1"},'pre[class*="language-"]::selection':{background:"#C1DEF1"},'pre[class*="language-"] ::selection':{background:"#C1DEF1"},'code[class*="language-"]::selection':{background:"#C1DEF1"},'code[class*="language-"] ::selection':{background:"#C1DEF1"},':not(pre) > code[class*="language-"]':{padding:".2em",paddingTop:"1px",paddingBottom:"1px",background:"#f8f8f8",border:"1px solid #dddddd"},comment:{color:"#008000",fontStyle:"italic"},prolog:{color:"#008000",fontStyle:"italic"},doctype:{color:"#008000",fontStyle:"italic"},cdata:{color:"#008000",fontStyle:"italic"},namespace:{Opacity:".7"},string:{color:"#A31515"},punctuation:{color:"#393A34"},operator:{color:"#393A34"},url:{color:"#36acaa"},symbol:{color:"#36acaa"},number:{color:"#36acaa"},boolean:{color:"#36acaa"},variable:{color:"#36acaa"},constant:{color:"#36acaa"},inserted:{color:"#36acaa"},atrule:{color:"#0000ff"},keyword:{color:"#0000ff"},"attr-value":{color:"#0000ff"},".language-autohotkey .token.selector":{color:"#0000ff"},".language-json .token.boolean":{color:"#0000ff"},".language-json .token.number":{color:"#0000ff"},'code[class*="language-css"]':{color:"#0000ff"},function:{color:"#393A34"},deleted:{color:"#9a050f"},".language-autohotkey .token.tag":{color:"#9a050f"},selector:{color:"#800000"},".language-autohotkey .token.keyword":{color:"#00009f"},important:{color:"#e90",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},"class-name":{color:"#2B91AF"},".language-json .token.property":{color:"#2B91AF"},tag:{color:"#800000"},"attr-name":{color:"#ff0000"},property:{color:"#ff0000"},regex:{color:"#ff0000"},entity:{color:"#ff0000"},"directive.tag.tag":{background:"#ffff00",color:"#393A34"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"#a5a5a5"},".line-numbers .line-numbers-rows > span:before":{color:"#2B91AF"},".line-highlight.line-highlight":{background:"linear-gradient(to right, rgba(193, 222, 241, 0.2) 70%, rgba(221, 222, 241, 0))"}}}(r9)),r9}var s9={},lY;function PYe(){return lY||(lY=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'pre[class*="language-"]':{color:"#d4d4d4",fontSize:"13px",textShadow:"none",fontFamily:'Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",background:"#1e1e1e"},'code[class*="language-"]':{color:"#d4d4d4",fontSize:"13px",textShadow:"none",fontFamily:'Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#264F78"},'code[class*="language-"]::selection':{textShadow:"none",background:"#264F78"},'pre[class*="language-"] *::selection':{textShadow:"none",background:"#264F78"},'code[class*="language-"] *::selection':{textShadow:"none",background:"#264F78"},':not(pre) > code[class*="language-"]':{padding:".1em .3em",borderRadius:".3em",color:"#db4c69",background:"#1e1e1e"},".namespace":{Opacity:".7"},"doctype.doctype-tag":{color:"#569CD6"},"doctype.name":{color:"#9cdcfe"},comment:{color:"#6a9955"},prolog:{color:"#6a9955"},punctuation:{color:"#d4d4d4"},".language-html .language-css .token.punctuation":{color:"#d4d4d4"},".language-html .language-javascript .token.punctuation":{color:"#d4d4d4"},property:{color:"#9cdcfe"},tag:{color:"#569cd6"},boolean:{color:"#569cd6"},number:{color:"#b5cea8"},constant:{color:"#9cdcfe"},symbol:{color:"#b5cea8"},inserted:{color:"#b5cea8"},unit:{color:"#b5cea8"},selector:{color:"#d7ba7d"},"attr-name":{color:"#9cdcfe"},string:{color:"#ce9178"},char:{color:"#ce9178"},builtin:{color:"#ce9178"},deleted:{color:"#ce9178"},".language-css .token.string.url":{textDecoration:"underline"},operator:{color:"#d4d4d4"},entity:{color:"#569cd6"},"operator.arrow":{color:"#569CD6"},atrule:{color:"#ce9178"},"atrule.rule":{color:"#c586c0"},"atrule.url":{color:"#9cdcfe"},"atrule.url.function":{color:"#dcdcaa"},"atrule.url.punctuation":{color:"#d4d4d4"},keyword:{color:"#569CD6"},"keyword.module":{color:"#c586c0"},"keyword.control-flow":{color:"#c586c0"},function:{color:"#dcdcaa"},"function.maybe-class-name":{color:"#dcdcaa"},regex:{color:"#d16969"},important:{color:"#569cd6"},italic:{fontStyle:"italic"},"class-name":{color:"#4ec9b0"},"maybe-class-name":{color:"#4ec9b0"},console:{color:"#9cdcfe"},parameter:{color:"#9cdcfe"},interpolation:{color:"#9cdcfe"},"punctuation.interpolation-punctuation":{color:"#569cd6"},variable:{color:"#9cdcfe"},"imports.maybe-class-name":{color:"#9cdcfe"},"exports.maybe-class-name":{color:"#9cdcfe"},escape:{color:"#d7ba7d"},"tag.punctuation":{color:"#808080"},cdata:{color:"#808080"},"attr-value":{color:"#ce9178"},"attr-value.punctuation":{color:"#ce9178"},"attr-value.punctuation.attr-equals":{color:"#d4d4d4"},namespace:{color:"#4ec9b0"},'pre[class*="language-javascript"]':{color:"#9cdcfe"},'code[class*="language-javascript"]':{color:"#9cdcfe"},'pre[class*="language-jsx"]':{color:"#9cdcfe"},'code[class*="language-jsx"]':{color:"#9cdcfe"},'pre[class*="language-typescript"]':{color:"#9cdcfe"},'code[class*="language-typescript"]':{color:"#9cdcfe"},'pre[class*="language-tsx"]':{color:"#9cdcfe"},'code[class*="language-tsx"]':{color:"#9cdcfe"},'pre[class*="language-css"]':{color:"#ce9178"},'code[class*="language-css"]':{color:"#ce9178"},'pre[class*="language-html"]':{color:"#d4d4d4"},'code[class*="language-html"]':{color:"#d4d4d4"},".language-regex .token.anchor":{color:"#dcdcaa"},".language-html .token.punctuation":{color:"#808080"},'pre[class*="language-"] > code[class*="language-"]':{position:"relative",zIndex:"1"},".line-highlight.line-highlight":{background:"#f7ebc6",boxShadow:"inset 5px 0 0 #f7d87c",zIndex:"0"}}}(s9)),s9}var i9={},cY;function MYe(){return cY||(cY=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",whiteSpace:"pre-wrap",wordWrap:"normal",fontFamily:'Menlo, Monaco, "Courier New", monospace',fontSize:"14px",color:"#76d9e6",textShadow:"none"},'pre[class*="language-"]':{MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",whiteSpace:"pre-wrap",wordWrap:"normal",fontFamily:'Menlo, Monaco, "Courier New", monospace',fontSize:"14px",color:"#76d9e6",textShadow:"none",background:"#2a2a2a",padding:"15px",borderRadius:"4px",border:"1px solid #e1e1e8",overflow:"auto",position:"relative"},'pre > code[class*="language-"]':{fontSize:"1em"},':not(pre) > code[class*="language-"]':{background:"#2a2a2a",padding:"0.15em 0.2em 0.05em",borderRadius:".3em",border:"0.13em solid #7a6652",boxShadow:"1px 1px 0.3em -0.1em #000 inset"},'pre[class*="language-"] code':{whiteSpace:"pre",display:"block"},namespace:{Opacity:".7"},comment:{color:"#6f705e"},prolog:{color:"#6f705e"},doctype:{color:"#6f705e"},cdata:{color:"#6f705e"},operator:{color:"#a77afe"},boolean:{color:"#a77afe"},number:{color:"#a77afe"},"attr-name":{color:"#e6d06c"},string:{color:"#e6d06c"},entity:{color:"#e6d06c",cursor:"help"},url:{color:"#e6d06c"},".language-css .token.string":{color:"#e6d06c"},".style .token.string":{color:"#e6d06c"},selector:{color:"#a6e22d"},inserted:{color:"#a6e22d"},atrule:{color:"#ef3b7d"},"attr-value":{color:"#ef3b7d"},keyword:{color:"#ef3b7d"},important:{color:"#ef3b7d",fontWeight:"bold"},deleted:{color:"#ef3b7d"},regex:{color:"#76d9e6"},statement:{color:"#76d9e6",fontWeight:"bold"},placeholder:{color:"#fff"},variable:{color:"#fff"},bold:{fontWeight:"bold"},punctuation:{color:"#bebec5"},italic:{fontStyle:"italic"},"code.language-markup":{color:"#f9f9f9"},"code.language-markup .token.tag":{color:"#ef3b7d"},"code.language-markup .token.attr-name":{color:"#a6e22d"},"code.language-markup .token.attr-value":{color:"#e6d06c"},"code.language-markup .token.style":{color:"#76d9e6"},"code.language-markup .token.script":{color:"#76d9e6"},"code.language-markup .token.script .token.keyword":{color:"#76d9e6"},".line-highlight.line-highlight":{padding:"0",background:"rgba(255, 255, 255, 0.08)"},".line-highlight.line-highlight:before":{padding:"0.2em 0.5em",backgroundColor:"rgba(255, 255, 255, 0.4)",color:"black",height:"1em",lineHeight:"1em",boxShadow:"0 1px 1px rgba(255, 255, 255, 0.7)"},".line-highlight.line-highlight[data-end]:after":{padding:"0.2em 0.5em",backgroundColor:"rgba(255, 255, 255, 0.4)",color:"black",height:"1em",lineHeight:"1em",boxShadow:"0 1px 1px rgba(255, 255, 255, 0.7)"}}}(i9)),i9}var o9={},uY;function jYe(){return uY||(uY=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#22da17",fontFamily:"monospace",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",lineHeight:"25px",fontSize:"18px",margin:"5px 0"},'pre[class*="language-"]':{color:"white",fontFamily:"monospace",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",lineHeight:"25px",fontSize:"18px",margin:"0.5em 0",background:"#0a143c",padding:"1em",overflow:"auto"},'pre[class*="language-"] *':{fontFamily:"monospace"},':not(pre) > code[class*="language-"]':{color:"white",background:"#0a143c",padding:"0.1em",borderRadius:"0.3em",whiteSpace:"normal"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'pre[class*="language-"]::selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'code[class*="language-"]::selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'code[class*="language-"] ::selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},comment:{color:"rgb(99, 119, 119)",fontStyle:"italic"},prolog:{color:"rgb(99, 119, 119)",fontStyle:"italic"},cdata:{color:"rgb(99, 119, 119)",fontStyle:"italic"},punctuation:{color:"rgb(199, 146, 234)"},".namespace":{color:"rgb(178, 204, 214)"},deleted:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"},symbol:{color:"rgb(128, 203, 196)"},property:{color:"rgb(128, 203, 196)"},tag:{color:"rgb(127, 219, 202)"},operator:{color:"rgb(127, 219, 202)"},keyword:{color:"rgb(127, 219, 202)"},boolean:{color:"rgb(255, 88, 116)"},number:{color:"rgb(247, 140, 108)"},constant:{color:"rgb(34 183 199)"},function:{color:"rgb(34 183 199)"},builtin:{color:"rgb(34 183 199)"},char:{color:"rgb(34 183 199)"},selector:{color:"rgb(199, 146, 234)",fontStyle:"italic"},doctype:{color:"rgb(199, 146, 234)",fontStyle:"italic"},"attr-name":{color:"rgb(173, 219, 103)",fontStyle:"italic"},inserted:{color:"rgb(173, 219, 103)",fontStyle:"italic"},string:{color:"rgb(173, 219, 103)"},url:{color:"rgb(173, 219, 103)"},entity:{color:"rgb(173, 219, 103)"},".language-css .token.string":{color:"rgb(173, 219, 103)"},".style .token.string":{color:"rgb(173, 219, 103)"},"class-name":{color:"rgb(255, 203, 139)"},atrule:{color:"rgb(255, 203, 139)"},"attr-value":{color:"rgb(255, 203, 139)"},regex:{color:"rgb(214, 222, 235)"},important:{color:"rgb(214, 222, 235)",fontWeight:"bold"},variable:{color:"rgb(214, 222, 235)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(o9)),o9}var dY;function FYe(){return dY||(dY=1,function(e){var t=VGe();Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"a11yDark",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"atomDark",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(e,"base16AteliersulphurpoolLight",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(e,"cb",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(e,"coldarkCold",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(e,"coldarkDark",{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(e,"coy",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"coyWithoutShadows",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(e,"darcula",{enumerable:!0,get:function(){return E.default}}),Object.defineProperty(e,"dark",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"dracula",{enumerable:!0,get:function(){return k.default}}),Object.defineProperty(e,"duotoneDark",{enumerable:!0,get:function(){return T.default}}),Object.defineProperty(e,"duotoneEarth",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(e,"duotoneForest",{enumerable:!0,get:function(){return M.default}}),Object.defineProperty(e,"duotoneLight",{enumerable:!0,get:function(){return j.default}}),Object.defineProperty(e,"duotoneSea",{enumerable:!0,get:function(){return F.default}}),Object.defineProperty(e,"duotoneSpace",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(e,"funky",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"ghcolors",{enumerable:!0,get:function(){return B.default}}),Object.defineProperty(e,"gruvboxDark",{enumerable:!0,get:function(){return L.default}}),Object.defineProperty(e,"gruvboxLight",{enumerable:!0,get:function(){return W.default}}),Object.defineProperty(e,"holiTheme",{enumerable:!0,get:function(){return $.default}}),Object.defineProperty(e,"hopscotch",{enumerable:!0,get:function(){return J.default}}),Object.defineProperty(e,"lucario",{enumerable:!0,get:function(){return V.default}}),Object.defineProperty(e,"materialDark",{enumerable:!0,get:function(){return Z.default}}),Object.defineProperty(e,"materialLight",{enumerable:!0,get:function(){return G.default}}),Object.defineProperty(e,"materialOceanic",{enumerable:!0,get:function(){return q.default}}),Object.defineProperty(e,"nightOwl",{enumerable:!0,get:function(){return z.default}}),Object.defineProperty(e,"nord",{enumerable:!0,get:function(){return Y.default}}),Object.defineProperty(e,"okaidia",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"oneDark",{enumerable:!0,get:function(){return U.default}}),Object.defineProperty(e,"oneLight",{enumerable:!0,get:function(){return X.default}}),Object.defineProperty(e,"pojoaque",{enumerable:!0,get:function(){return ne.default}}),Object.defineProperty(e,"prism",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"shadesOfPurple",{enumerable:!0,get:function(){return H.default}}),Object.defineProperty(e,"solarizedDarkAtom",{enumerable:!0,get:function(){return ee.default}}),Object.defineProperty(e,"solarizedlight",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"synthwave84",{enumerable:!0,get:function(){return ie.default}}),Object.defineProperty(e,"tomorrow",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"twilight",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"vs",{enumerable:!0,get:function(){return se.default}}),Object.defineProperty(e,"vscDarkPlus",{enumerable:!0,get:function(){return ae.default}}),Object.defineProperty(e,"xonokai",{enumerable:!0,get:function(){return le.default}}),Object.defineProperty(e,"zTouch",{enumerable:!0,get:function(){return pe.default}});var n=t(UGe()),r=t(WGe()),s=t(qGe()),i=t(GGe()),o=t(YGe()),a=t(KGe()),l=t(XGe()),c=t(JGe()),u=t(ZGe()),d=t(QGe()),p=t(eYe()),g=t(tYe()),b=t(nYe()),x=t(rYe()),S=t(sYe()),E=t(iYe()),k=t(oYe()),T=t(aYe()),P=t(lYe()),M=t(cYe()),j=t(uYe()),F=t(dYe()),I=t(hYe()),B=t(fYe()),L=t(pYe()),W=t(mYe()),$=t(gYe()),J=t(yYe()),V=t(bYe()),Z=t(xYe()),G=t(vYe()),q=t(wYe()),z=t(SYe()),Y=t(CYe()),U=t(kYe()),X=t(EYe()),ne=t(DYe()),H=t(AYe()),ee=t(TYe()),ie=t(_Ye()),se=t(NYe()),ae=t(PYe()),le=t(MYe()),pe=t(jYe())}(m8)),m8}var IYe=FYe();const Vce=1024;let OYe=0,a9=class{constructor(t,n){this.from=t,this.to=n}};class fn{constructor(t={}){this.id=OYe++,this.perNode=!!t.perNode,this.deserialize=t.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(t){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof t!="function"&&(t=Yo.match(t)),n=>{let r=t(n);return r===void 0?null:[this,r]}}}fn.closedBy=new fn({deserialize:e=>e.split(" ")});fn.openedBy=new fn({deserialize:e=>e.split(" ")});fn.group=new fn({deserialize:e=>e.split(" ")});fn.isolate=new fn({deserialize:e=>{if(e&&e!="rtl"&&e!="ltr"&&e!="auto")throw new RangeError("Invalid value for isolate: "+e);return e||"auto"}});fn.contextHash=new fn({perNode:!0});fn.lookAhead=new fn({perNode:!0});fn.mounted=new fn({perNode:!0});class t3{constructor(t,n,r){this.tree=t,this.overlay=n,this.parser=r}static get(t){return t&&t.props&&t.props[fn.mounted.id]}}const RYe=Object.create(null);class Yo{constructor(t,n,r,s=0){this.name=t,this.props=n,this.id=r,this.flags=s}static define(t){let n=t.props&&t.props.length?Object.create(null):RYe,r=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(t.name==null?8:0),s=new Yo(t.name||"",n,t.id,r);if(t.props){for(let i of t.props)if(Array.isArray(i)||(i=i(s)),i){if(i[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[i[0].id]=i[1]}}return s}prop(t){return this.props[t.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(t){if(typeof t=="string"){if(this.name==t)return!0;let n=this.prop(fn.group);return n?n.indexOf(t)>-1:!1}return this.id==t}static match(t){let n=Object.create(null);for(let r in t)for(let s of r.split(" "))n[s]=t[r];return r=>{for(let s=r.prop(fn.group),i=-1;i<(s?s.length:0);i++){let o=n[i<0?r.name:s[i]];if(o)return o}}}}Yo.none=new Yo("",Object.create(null),0,8);class _R{constructor(t){this.types=t;for(let n=0;n<t.length;n++)if(t[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...t){let n=[];for(let r of this.types){let s=null;for(let i of t){let o=i(r);o&&(s||(s=Object.assign({},r.props)),s[o[0].id]=o[1])}n.push(s?new Yo(r.name,s,r.id,r.flags):r)}return new _R(n)}}const A2=new WeakMap,hY=new WeakMap;var Ys;(function(e){e[e.ExcludeBuffers=1]="ExcludeBuffers",e[e.IncludeAnonymous=2]="IncludeAnonymous",e[e.IgnoreMounts=4]="IgnoreMounts",e[e.IgnoreOverlays=8]="IgnoreOverlays"})(Ys||(Ys={}));class ws{constructor(t,n,r,s,i){if(this.type=t,this.children=n,this.positions=r,this.length=s,this.props=null,i&&i.length){this.props=Object.create(null);for(let[o,a]of i)this.props[typeof o=="number"?o:o.id]=a}}toString(){let t=t3.get(this);if(t&&!t.overlay)return t.tree.toString();let n="";for(let r of this.children){let s=r.toString();s&&(n&&(n+=","),n+=s)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(t=0){return new nM(this.topNode,t)}cursorAt(t,n=0,r=0){let s=A2.get(this)||this.topNode,i=new nM(s);return i.moveTo(t,n),A2.set(this,i._tree),i}get topNode(){return new il(this,0,0,null)}resolve(t,n=0){let r=Xw(A2.get(this)||this.topNode,t,n,!1);return A2.set(this,r),r}resolveInner(t,n=0){let r=Xw(hY.get(this)||this.topNode,t,n,!0);return hY.set(this,r),r}resolveStack(t,n=0){return $Ye(this,t,n)}iterate(t){let{enter:n,leave:r,from:s=0,to:i=this.length}=t,o=t.mode||0,a=(o&Ys.IncludeAnonymous)>0;for(let l=this.cursor(o|Ys.IncludeAnonymous);;){let c=!1;if(l.from<=i&&l.to>=s&&(!a&&l.type.isAnonymous||n(l)!==!1)){if(l.firstChild())continue;c=!0}for(;c&&r&&(a||!l.type.isAnonymous)&&r(l),!l.nextSibling();){if(!l.parent())return;c=!0}}}prop(t){return t.perNode?this.props?this.props[t.id]:void 0:this.type.prop(t)}get propValues(){let t=[];if(this.props)for(let n in this.props)t.push([+n,this.props[n]]);return t}balance(t={}){return this.children.length<=8?this:MR(Yo.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,s)=>new ws(this.type,n,r,s,this.propValues),t.makeTree||((n,r,s)=>new ws(Yo.none,n,r,s)))}static build(t){return zYe(t)}}ws.empty=new ws(Yo.none,[],[],0);class NR{constructor(t,n){this.buffer=t,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new NR(this.buffer,this.index)}}class bp{constructor(t,n,r){this.buffer=t,this.length=n,this.set=r}get type(){return Yo.none}toString(){let t=[];for(let n=0;n<this.buffer.length;)t.push(this.childString(n)),n=this.buffer[n+3];return t.join(",")}childString(t){let n=this.buffer[t],r=this.buffer[t+3],s=this.set.types[n],i=s.name;if(/\W/.test(i)&&!s.isError&&(i=JSON.stringify(i)),t+=4,r==t)return i;let o=[];for(;t<r;)o.push(this.childString(t)),t=this.buffer[t+3];return i+"("+o.join(",")+")"}findChild(t,n,r,s,i){let{buffer:o}=this,a=-1;for(let l=t;l!=n&&!(Uce(i,s,o[l+1],o[l+2])&&(a=l,r>0));l=o[l+3]);return a}slice(t,n,r){let s=this.buffer,i=new Uint16Array(n-t),o=0;for(let a=t,l=0;a<n;){i[l++]=s[a++],i[l++]=s[a++]-r;let c=i[l++]=s[a++]-r;i[l++]=s[a++]-t,o=Math.max(o,c)}return new bp(i,o,this.set)}}function Uce(e,t,n,r){switch(e){case-2:return n<t;case-1:return r>=t&&n<t;case 0:return n<t&&r>t;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function Xw(e,t,n,r){for(var s;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to<t);){let o=!r&&e instanceof il&&e.index<0?null:e.parent;if(!o)return e;e=o}let i=r?0:Ys.IgnoreOverlays;if(r)for(let o=e,a=o.parent;a;o=a,a=o.parent)o instanceof il&&o.index<0&&((s=a.enter(t,n,i))===null||s===void 0?void 0:s.from)!=o.from&&(e=a);for(;;){let o=e.enter(t,n,i);if(!o)return e;e=o}}class Wce{cursor(t=0){return new nM(this,t)}getChild(t,n=null,r=null){let s=fY(this,t,n,r);return s.length?s[0]:null}getChildren(t,n=null,r=null){return fY(this,t,n,r)}resolve(t,n=0){return Xw(this,t,n,!1)}resolveInner(t,n=0){return Xw(this,t,n,!0)}matchContext(t){return tM(this.parent,t)}enterUnfinishedNodesBefore(t){let n=this.childBefore(t),r=this;for(;n;){let s=n.lastChild;if(!s||s.to!=n.to)break;s.type.isError&&s.from==s.to?(r=n,n=s.prevSibling):n=s}return r}get node(){return this}get next(){return this.parent}}class il extends Wce{constructor(t,n,r,s){super(),this._tree=t,this.from=n,this.index=r,this._parent=s}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(t,n,r,s,i=0){for(let o=this;;){for(let{children:a,positions:l}=o._tree,c=n>0?a.length:-1;t!=c;t+=n){let u=a[t],d=l[t]+o.from;if(Uce(s,r,d,d+u.length)){if(u instanceof bp){if(i&Ys.ExcludeBuffers)continue;let p=u.findChild(0,u.buffer.length,n,r-d,s);if(p>-1)return new Yf(new LYe(o,u,t,d),null,p)}else if(i&Ys.IncludeAnonymous||!u.type.isAnonymous||PR(u)){let p;if(!(i&Ys.IgnoreMounts)&&(p=t3.get(u))&&!p.overlay)return new il(p.tree,d,t,o);let g=new il(u,d,t,o);return i&Ys.IncludeAnonymous||!g.type.isAnonymous?g:g.nextChild(n<0?u.children.length-1:0,n,r,s)}}}if(i&Ys.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?t=o.index+n:t=n<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(t){return this.nextChild(0,1,t,2)}childBefore(t){return this.nextChild(this._tree.children.length-1,-1,t,-2)}enter(t,n,r=0){let s;if(!(r&Ys.IgnoreOverlays)&&(s=t3.get(this._tree))&&s.overlay){let i=t-this.from;for(let{from:o,to:a}of s.overlay)if((n>0?o<=i:o<i)&&(n<0?a>=i:a>i))return new il(s.tree,s.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,n,r)}nextSignificantParent(){let t=this;for(;t.type.isAnonymous&&t._parent;)t=t._parent;return t}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function fY(e,t,n,r){let s=e.cursor(),i=[];if(!s.firstChild())return i;if(n!=null){for(let o=!1;!o;)if(o=s.type.is(n),!s.nextSibling())return i}for(;;){if(r!=null&&s.type.is(r))return i;if(s.type.is(t)&&i.push(s.node),!s.nextSibling())return r==null?i:[]}}function tM(e,t,n=t.length-1){for(let r=e;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}class LYe{constructor(t,n,r,s){this.parent=t,this.buffer=n,this.index=r,this.start=s}}class Yf extends Wce{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(t,n,r){super(),this.context=t,this._parent=n,this.index=r,this.type=t.buffer.set.types[t.buffer.buffer[r]]}child(t,n,r){let{buffer:s}=this.context,i=s.findChild(this.index+4,s.buffer[this.index+3],t,n-this.context.start,r);return i<0?null:new Yf(this.context,this,i)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(t){return this.child(1,t,2)}childBefore(t){return this.child(-1,t,-2)}enter(t,n,r=0){if(r&Ys.ExcludeBuffers)return null;let{buffer:s}=this.context,i=s.findChild(this.index+4,s.buffer[this.index+3],n>0?1:-1,t-this.context.start,n);return i<0?null:new Yf(this.context,this,i)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(t){return this._parent?null:this.context.parent.nextChild(this.context.index+t,t,0,4)}get nextSibling(){let{buffer:t}=this.context,n=t.buffer[this.index+3];return n<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new Yf(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new Yf(this.context,this._parent,t.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let t=[],n=[],{buffer:r}=this.context,s=this.index+4,i=r.buffer[this.index+3];if(i>s){let o=r.buffer[this.index+1];t.push(r.slice(s,i,o)),n.push(0)}return new ws(this.type,t,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function qce(e){if(!e.length)return null;let t=0,n=e[0];for(let i=1;i<e.length;i++){let o=e[i];(o.from>n.from||o.to<n.to)&&(n=o,t=i)}let r=n instanceof il&&n.index<0?null:n.parent,s=e.slice();return r?s[t]=r:s.splice(t,1),new BYe(s,n)}class BYe{constructor(t,n){this.heads=t,this.node=n}get next(){return qce(this.heads)}}function $Ye(e,t,n){let r=e.resolveInner(t,n),s=null;for(let i=r instanceof il?r:r.context.parent;i;i=i.parent)if(i.index<0){let o=i.parent;(s||(s=[r])).push(o.resolve(t,n)),i=o}else{let o=t3.get(i.tree);if(o&&o.overlay&&o.overlay[0].from<=t&&o.overlay[o.overlay.length-1].to>=t){let a=new il(o.tree,o.overlay[0].from+i.from,-1,i);(s||(s=[r])).push(Xw(a,t,n,!1))}}return s?qce(s):r}class nM{get name(){return this.type.name}constructor(t,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,t instanceof il)this.yieldNode(t);else{this._tree=t.context.parent,this.buffer=t.context;for(let r=t._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=t,this.yieldBuf(t.index)}}yieldNode(t){return t?(this._tree=t,this.type=t.type,this.from=t.from,this.to=t.to,!0):!1}yieldBuf(t,n){this.index=t;let{start:r,buffer:s}=this.buffer;return this.type=n||s.set.types[s.buffer[t]],this.from=r+s.buffer[t+1],this.to=r+s.buffer[t+2],!0}yield(t){return t?t instanceof il?(this.buffer=null,this.yieldNode(t)):(this.buffer=t.context,this.yieldBuf(t.index,t.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(t,n,r){if(!this.buffer)return this.yield(this._tree.nextChild(t<0?this._tree._tree.children.length-1:0,t,n,r,this.mode));let{buffer:s}=this.buffer,i=s.findChild(this.index+4,s.buffer[this.index+3],t,n-this.buffer.start,r);return i<0?!1:(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(t){return this.enterChild(1,t,2)}childBefore(t){return this.enterChild(-1,t,-2)}enter(t,n,r=this.mode){return this.buffer?r&Ys.ExcludeBuffers?!1:this.enterChild(1,t,n):this.yield(this._tree.enter(t,n,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Ys.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let t=this.mode&Ys.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(t)}sibling(t){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+t,t,0,4,this.mode)):!1;let{buffer:n}=this.buffer,r=this.stack.length-1;if(t<0){let s=r<0?0:this.stack[r]+4;if(this.index!=s)return this.yieldBuf(n.findChild(s,this.index,-1,0,4))}else{let s=n.buffer[this.index+3];if(s<(r<0?n.buffer.length:n.buffer[this.stack[r]+3]))return this.yieldBuf(s)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+t,t,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(t){let n,r,{buffer:s}=this;if(s){if(t>0){if(this.index<s.buffer.buffer.length)return!1}else for(let i=0;i<this.index;i++)if(s.buffer.buffer[i+3]<this.index)return!1;({index:n,parent:r}=s)}else({index:n,_parent:r}=this._tree);for(;r;{index:n,_parent:r}=r)if(n>-1)for(let i=n+t,o=t<0?-1:r._tree.children.length;i!=o;i+=t){let a=r._tree.children[i];if(this.mode&Ys.IncludeAnonymous||a instanceof bp||!a.type.isAnonymous||PR(a))return!1}return!0}move(t,n){if(n&&this.enterChild(t,0,4))return!0;for(;;){if(this.sibling(t))return!0;if(this.atLastNode(t)||!this.parent())return!1}}next(t=!0){return this.move(1,t)}prev(t=!0){return this.move(-1,t)}moveTo(t,n=0){for(;(this.from==this.to||(n<1?this.from>=t:this.from>t)||(n>-1?this.to<=t:this.to<t))&&this.parent(););for(;this.enterChild(1,t,n););return this}get node(){if(!this.buffer)return this._tree;let t=this.bufferNode,n=null,r=0;if(t&&t.context==this.buffer)e:for(let s=this.index,i=this.stack.length;i>=0;){for(let o=t;o;o=o._parent)if(o.index==s){if(s==this.index)return o;n=o,r=i+1;break e}s=this.stack[--i]}for(let s=r;s<this.stack.length;s++)n=new Yf(this.buffer,n,this.stack[s]);return this.bufferNode=new Yf(this.buffer,n,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(t,n){for(let r=0;;){let s=!1;if(this.type.isAnonymous||t(this)!==!1){if(this.firstChild()){r++;continue}this.type.isAnonymous||(s=!0)}for(;;){if(s&&n&&n(this),s=this.type.isAnonymous,!r)return;if(this.nextSibling())break;this.parent(),r--,s=!0}}}matchContext(t){if(!this.buffer)return tM(this.node.parent,t);let{buffer:n}=this.buffer,{types:r}=n.set;for(let s=t.length-1,i=this.stack.length-1;s>=0;i--){if(i<0)return tM(this._tree,t,s);let o=r[n.buffer[this.stack[i]]];if(!o.isAnonymous){if(t[s]&&t[s]!=o.name)return!1;s--}}return!0}}function PR(e){return e.children.some(t=>t instanceof bp||!t.type.isAnonymous||PR(t))}function zYe(e){var t;let{buffer:n,nodeSet:r,maxBufferLength:s=Vce,reused:i=[],minRepeatType:o=r.types.length}=e,a=Array.isArray(n)?new NR(n,n.length):n,l=r.types,c=0,u=0;function d(M,j,F,I,B,L){let{id:W,start:$,end:J,size:V}=a,Z=u,G=c;for(;V<0;)if(a.next(),V==-1){let X=i[W];F.push(X),I.push($-M);return}else if(V==-3){c=W;return}else if(V==-4){u=W;return}else throw new RangeError(`Unrecognized record size: ${V}`);let q=l[W],z,Y,U=$-M;if(J-$<=s&&(Y=S(a.pos-j,B))){let X=new Uint16Array(Y.size-Y.skip),ne=a.pos-Y.size,H=X.length;for(;a.pos>ne;)H=E(Y.start,X,H);z=new bp(X,J-Y.start,r),U=Y.start-M}else{let X=a.pos-V;a.next();let ne=[],H=[],ee=W>=o?W:-1,ie=0,se=J;for(;a.pos>X;)ee>=0&&a.id==ee&&a.size>=0?(a.end<=se-s&&(b(ne,H,$,ie,a.end,se,ee,Z,G),ie=ne.length,se=a.end),a.next()):L>2500?p($,X,ne,H):d($,X,ne,H,ee,L+1);if(ee>=0&&ie>0&&ie<ne.length&&b(ne,H,$,ie,$,se,ee,Z,G),ne.reverse(),H.reverse(),ee>-1&&ie>0){let ae=g(q,G);z=MR(q,ne,H,0,ne.length,0,J-$,ae,ae)}else z=x(q,ne,H,J-$,Z-J,G)}F.push(z),I.push(U)}function p(M,j,F,I){let B=[],L=0,W=-1;for(;a.pos>j;){let{id:$,start:J,end:V,size:Z}=a;if(Z>4)a.next();else{if(W>-1&&J<W)break;W<0&&(W=V-s),B.push($,J,V),L++,a.next()}}if(L){let $=new Uint16Array(L*4),J=B[B.length-2];for(let V=B.length-3,Z=0;V>=0;V-=3)$[Z++]=B[V],$[Z++]=B[V+1]-J,$[Z++]=B[V+2]-J,$[Z++]=Z;F.push(new bp($,B[2]-J,r)),I.push(J-M)}}function g(M,j){return(F,I,B)=>{let L=0,W=F.length-1,$,J;if(W>=0&&($=F[W])instanceof ws){if(!W&&$.type==M&&$.length==B)return $;(J=$.prop(fn.lookAhead))&&(L=I[W]+$.length+J)}return x(M,F,I,B,L,j)}}function b(M,j,F,I,B,L,W,$,J){let V=[],Z=[];for(;M.length>I;)V.push(M.pop()),Z.push(j.pop()+F-B);M.push(x(r.types[W],V,Z,L-B,$-L,J)),j.push(B-F)}function x(M,j,F,I,B,L,W){if(L){let $=[fn.contextHash,L];W=W?[$].concat(W):[$]}if(B>25){let $=[fn.lookAhead,B];W=W?[$].concat(W):[$]}return new ws(M,j,F,I,W)}function S(M,j){let F=a.fork(),I=0,B=0,L=0,W=F.end-s,$={size:0,start:0,skip:0};e:for(let J=F.pos-M;F.pos>J;){let V=F.size;if(F.id==j&&V>=0){$.size=I,$.start=B,$.skip=L,L+=4,I+=4,F.next();continue}let Z=F.pos-V;if(V<0||Z<J||F.start<W)break;let G=F.id>=o?4:0,q=F.start;for(F.next();F.pos>Z;){if(F.size<0)if(F.size==-3)G+=4;else break e;else F.id>=o&&(G+=4);F.next()}B=q,I+=V,L+=G}return(j<0||I==M)&&($.size=I,$.start=B,$.skip=L),$.size>4?$:void 0}function E(M,j,F){let{id:I,start:B,end:L,size:W}=a;if(a.next(),W>=0&&I<o){let $=F;if(W>4){let J=a.pos-(W-4);for(;a.pos>J;)F=E(M,j,F)}j[--F]=$,j[--F]=L-M,j[--F]=B-M,j[--F]=I}else W==-3?c=I:W==-4&&(u=I);return F}let k=[],T=[];for(;a.pos>0;)d(e.start||0,e.bufferStart||0,k,T,-1,0);let P=(t=e.length)!==null&&t!==void 0?t:k.length?T[0]+k[0].length:0;return new ws(l[e.topID],k.reverse(),T.reverse(),P)}const pY=new WeakMap;function YE(e,t){if(!e.isAnonymous||t instanceof bp||t.type!=e)return 1;let n=pY.get(t);if(n==null){n=1;for(let r of t.children){if(r.type!=e||!(r instanceof ws)){n=1;break}n+=YE(e,r)}pY.set(t,n)}return n}function MR(e,t,n,r,s,i,o,a,l){let c=0;for(let b=r;b<s;b++)c+=YE(e,t[b]);let u=Math.ceil(c*1.5/8),d=[],p=[];function g(b,x,S,E,k){for(let T=S;T<E;){let P=T,M=x[T],j=YE(e,b[T]);for(T++;T<E;T++){let F=YE(e,b[T]);if(j+F>=u)break;j+=F}if(T==P+1){if(j>u){let F=b[P];g(F.children,F.positions,0,F.children.length,x[P]+k);continue}d.push(b[P])}else{let F=x[T-1]+b[T-1].length-M;d.push(MR(e,b,x,P,T,M,F,null,l))}p.push(M+k-i)}}return g(t,n,r,s,0),(a||l)(d,p,o)}class ag{constructor(t,n,r,s,i=!1,o=!1){this.from=t,this.to=n,this.tree=r,this.offset=s,this.open=(i?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(t,n=[],r=!1){let s=[new ag(0,t.length,t,0,!1,r)];for(let i of n)i.to>t.length&&s.push(i);return s}static applyChanges(t,n,r=128){if(!n.length)return t;let s=[],i=1,o=t.length?t[0]:null;for(let a=0,l=0,c=0;;a++){let u=a<n.length?n[a]:null,d=u?u.fromA:1e9;if(d-l>=r)for(;o&&o.from<d;){let p=o;if(l>=p.from||d<=p.to||c){let g=Math.max(p.from,l)-c,b=Math.min(p.to,d)-c;p=g>=b?null:new ag(g,b,p.tree,p.offset+c,a>0,!!u)}if(p&&s.push(p),o.to>d)break;o=i<t.length?t[i++]:null}if(!u)break;l=u.toA,c=u.toA-u.toB}return s}}class Gce{startParse(t,n,r){return typeof t=="string"&&(t=new HYe(t)),r=r?r.length?r.map(s=>new a9(s.from,s.to)):[new a9(0,0)]:[new a9(0,t.length)],this.createParse(t,n||[],r)}parse(t,n,r){let s=this.startParse(t,n,r);for(;;){let i=s.advance();if(i)return i}}}class HYe{constructor(t){this.string=t}get length(){return this.string.length}chunk(t){return this.string.slice(t)}get lineChunks(){return!1}read(t,n){return this.string.slice(t,n)}}new fn({perNode:!0});var VYe={},mY={};class n3{constructor(t,n,r,s,i,o,a,l,c,u=0,d){this.p=t,this.stack=n,this.state=r,this.reducePos=s,this.pos=i,this.score=o,this.buffer=a,this.bufferBase=l,this.curContext=c,this.lookAhead=u,this.parent=d}toString(){return`[${this.stack.filter((t,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,n,r=0){let s=t.parser.context;return new n3(t,[],n,r,r,0,[],0,s?new gY(s,s.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var n;let r=t>>19,s=t&65535,{parser:i}=this.p,o=this.reducePos<this.pos-25;o&&this.setLookAhead(this.pos);let a=i.dynamicPrecedence(s);if(a&&(this.score+=a),r==0){this.pushState(i.getGoto(this.state,s,!0),this.reducePos),s<i.minRepeatTerm&&this.storeNode(s,this.reducePos,this.reducePos,o?8:4,!0),this.reduceContext(s,this.reducePos);return}let l=this.stack.length-(r-1)*3-(t&262144?6:0),c=l?this.stack[l-2]:this.p.ranges[0].from,u=this.reducePos-c;u>=2e3&&!(!((n=this.p.parser.nodeSet.types[s])===null||n===void 0)&&n.isAnonymous)&&(c==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSize<u&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=c,this.p.lastBigReductionSize=u));let d=l?this.stack[l-1]:0,p=this.bufferBase+this.buffer.length-d;if(s<i.minRepeatTerm||t&131072){let g=i.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(s,c,g,p+4,!0)}if(t&262144)this.state=this.stack[l];else{let g=this.stack[l-3];this.state=i.getGoto(g,s,!0)}for(;this.stack.length>l;)this.stack.pop();this.reduceContext(s,c)}storeNode(t,n,r,s=4,i=!1){if(t==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let o=this,a=this.buffer.length;if(a==0&&o.parent&&(a=o.bufferBase-o.parent.bufferBase,o=o.parent),a>0&&o.buffer[a-4]==0&&o.buffer[a-1]>-1){if(n==r)return;if(o.buffer[a-2]>=n){o.buffer[a-2]=r;return}}}if(!i||this.pos==r)this.buffer.push(t,n,r,s);else{let o=this.buffer.length;if(o>0&&this.buffer[o-4]!=0){let a=!1;for(let l=o;l>0&&this.buffer[l-2]>r;l-=4)if(this.buffer[l-1]>=0){a=!0;break}if(a)for(;o>0&&this.buffer[o-2]>r;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,s>4&&(s-=4)}this.buffer[o]=t,this.buffer[o+1]=n,this.buffer[o+2]=r,this.buffer[o+3]=s}}shift(t,n,r,s){if(t&131072)this.pushState(t&65535,this.pos);else if((t&262144)==0){let i=t,{parser:o}=this.p;(s>this.pos||n<=o.maxNode)&&(this.pos=s,o.stateFlag(i,1)||(this.reducePos=s)),this.pushState(i,r),this.shiftContext(n,r),n<=o.maxNode&&this.buffer.push(n,r,s,4)}else this.pos=s,this.shiftContext(n,r),n<=this.p.parser.maxNode&&this.buffer.push(n,r,s,4)}apply(t,n,r,s){t&65536?this.reduce(t):this.shift(t,n,r,s)}useNode(t,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=t)&&(this.p.reused.push(t),r++);let s=this.pos;this.reducePos=this.pos=s+t.length,this.pushState(n,s),this.buffer.push(r,s,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,n=t.buffer.length;for(;n>0&&t.buffer[n-2]>t.reducePos;)n-=4;let r=t.buffer.slice(n),s=t.bufferBase+n;for(;t&&s==t.bufferBase;)t=t.parent;return new n3(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,s,this.curContext,this.lookAhead,t)}recoverByDelete(t,n){let r=t<=this.p.parser.maxNode;r&&this.storeNode(t,this.pos,n,4),this.storeNode(0,this.pos,n,r?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(t){for(let n=new UYe(this);;){let r=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,t);if(r==0)return!1;if((r&65536)==0)return!0;n.reduce(r)}}recoverByInsert(t){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let s=[];for(let i=0,o;i<n.length;i+=2)(o=n[i+1])!=this.state&&this.p.parser.hasAction(o,t)&&s.push(n[i],o);if(this.stack.length<120)for(let i=0;s.length<8&&i<n.length;i+=2){let o=n[i+1];s.some((a,l)=>l&1&&a==o)||s.push(n[i],o)}n=s}let r=[];for(let s=0;s<n.length&&r.length<4;s+=2){let i=n[s+1];if(i==this.state)continue;let o=this.split();o.pushState(i,this.pos),o.storeNode(0,o.pos,o.pos,4,!0),o.shiftContext(n[s],this.pos),o.reducePos=this.pos,o.score-=200,r.push(o)}return r}forceReduce(){let{parser:t}=this.p,n=t.stateSlot(this.state,5);if((n&65536)==0)return!1;if(!t.validAction(this.state,n)){let r=n>>19,s=n&65535,i=this.stack.length-r*3;if(i<0||t.getGoto(this.stack[i],s,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;n=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:t}=this.p,n=[],r=(s,i)=>{if(!n.includes(s))return n.push(s),t.allActions(s,o=>{if(!(o&393216))if(o&65536){let a=(o>>19)-i;if(a>1){let l=o&65535,c=this.stack.length-a*3;if(c>=0&&t.getGoto(this.stack[c],l,!1)>=0)return a<<19|65536|l}}else{let a=r(o,i+1);if(a!=null)return a}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:t}=this.p;return t.data[t.stateSlot(this.state,1)]==65535&&!t.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let n=0;n<this.stack.length;n+=3)if(this.stack[n]!=t.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(t){return this.p.parser.dialect.flags[t]}shiftContext(t,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,t,this,this.p.stream.reset(n)))}reduceContext(t,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,t,this,this.p.stream.reset(n)))}emitContext(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(t){if(t!=this.curContext.context){let n=new gY(this.curContext.tracker,t);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(t){t>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=t)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class gY{constructor(t,n){this.tracker=t,this.context=n,this.hash=t.strict?t.hash(n):0}}class UYe{constructor(t){this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}reduce(t){let n=t&65535,r=t>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let s=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=s}}class r3{constructor(t,n,r){this.stack=t,this.pos=n,this.index=r,this.buffer=t.buffer,this.index==0&&this.maybeNext()}static create(t,n=t.bufferBase+t.buffer.length){return new r3(t,n,n-t.bufferBase)}maybeNext(){let t=this.stack.parent;t!=null&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new r3(this.stack,this.pos,this.index)}}function T2(e,t=Uint16Array){if(typeof e!="string")return e;let n=null;for(let r=0,s=0;r<e.length;){let i=0;for(;;){let o=e.charCodeAt(r++),a=!1;if(o==126){i=65535;break}o>=92&&o--,o>=34&&o--;let l=o-32;if(l>=46&&(l-=46,a=!0),i+=l,a)break;i*=46}n?n[s++]=i:n=new t(i)}return n}class KE{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const yY=new KE;class WYe{constructor(t,n){this.input=t,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=yY,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(t,n){let r=this.range,s=this.rangeIndex,i=this.pos+t;for(;i<r.from;){if(!s)return null;let o=this.ranges[--s];i-=r.from-o.to,r=o}for(;n<0?i>r.to:i>=r.to;){if(s==this.ranges.length-1)return null;let o=this.ranges[++s];i+=o.from-r.to,r=o}return i}clipPos(t){if(t>=this.range.from&&t<this.range.to)return t;for(let n of this.ranges)if(n.to>t)return Math.max(t,n.from);return this.end}peek(t){let n=this.chunkOff+t,r,s;if(n>=0&&n<this.chunk.length)r=this.pos+t,s=this.chunk.charCodeAt(n);else{let i=this.resolveOffset(t,1);if(i==null)return-1;if(r=i,r>=this.chunk2Pos&&r<this.chunk2Pos+this.chunk2.length)s=this.chunk2.charCodeAt(r-this.chunk2Pos);else{let o=this.rangeIndex,a=this.range;for(;a.to<=r;)a=this.ranges[++o];this.chunk2=this.input.chunk(this.chunk2Pos=r),r+this.chunk2.length>a.to&&(this.chunk2=this.chunk2.slice(0,a.to-r)),s=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),s}acceptToken(t,n=0){let r=n?this.resolveOffset(n,-1):this.pos;if(r==null||r<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=t,this.token.end=r}acceptTokenTo(t,n){this.token.value=t,this.token.end=n}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:t,chunkPos:n}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=t,this.chunk2Pos=n,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let t=this.input.chunk(this.pos),n=this.pos+t.length;this.chunk=n>this.range.to?t.slice(0,this.range.to-this.pos):t,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(t=1){for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(t,n){if(n?(this.token=n,n.start=t,n.lookAhead=t+1,n.value=n.extended=-1):this.token=yY,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;t>=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t<this.chunkPos+this.chunk.length?this.chunkOff=t-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(t,n){if(t>=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,n-this.chunkPos);if(t>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(t-this.chunk2Pos,n-this.chunk2Pos);if(t>=this.range.from&&n<=this.range.to)return this.input.read(t,n);let r="";for(let s of this.ranges){if(s.from>=n)break;s.to>t&&(r+=this.input.read(Math.max(s.from,t),Math.min(s.to,n)))}return r}}class K0{constructor(t,n){this.data=t,this.id=n}token(t,n){let{parser:r}=n.p;qYe(this.data,t,n,this.id,r.data,r.tokenPrecTable)}}K0.prototype.contextual=K0.prototype.fallback=K0.prototype.extend=!1;K0.prototype.fallback=K0.prototype.extend=!1;function qYe(e,t,n,r,s,i){let o=0,a=1<<r,{dialect:l}=n.p.parser;e:for(;(a&e[o])!=0;){let c=e[o+1];for(let g=o+3;g<c;g+=2)if((e[g+1]&a)>0){let b=e[g];if(l.allows(b)&&(t.token.value==-1||t.token.value==b||GYe(b,t.token.value,s,i))){t.acceptToken(b);break}}let u=t.next,d=0,p=e[o+2];if(t.next<0&&p>d&&e[c+p*3-3]==65535){o=e[c+p*3-1];continue e}for(;d<p;){let g=d+p>>1,b=c+g+(g<<1),x=e[b],S=e[b+1]||65536;if(u<x)p=g;else if(u>=S)d=g+1;else{o=e[b+2],t.advance();continue e}}break}}function bY(e,t,n){for(let r=t,s;(s=e[r])!=65535;r++)if(s==n)return r-t;return-1}function GYe(e,t,n,r){let s=bY(n,r,t);return s<0||bY(n,r,e)<s}const ca=typeof VYe<"u"&&mY&&/\bparse\b/.test(mY.LOG);let l9=null;function xY(e,t,n){let r=e.cursor(Ys.IncludeAnonymous);for(r.moveTo(t);;)if(!(n<0?r.childBefore(t):r.childAfter(t)))for(;;){if((n<0?r.to<t:r.from>t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}class YYe{constructor(t,n){this.fragments=t,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?xY(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?xY(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(t){if(t<this.nextStart)return null;for(;this.fragment&&this.safeTo<=t;)this.nextFragment();if(!this.fragment)return null;for(;;){let n=this.trees.length-1;if(n<0)return this.nextFragment(),null;let r=this.trees[n],s=this.index[n];if(s==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let i=r.children[s],o=this.start[n]+r.positions[s];if(o>t)return this.nextStart=o,null;if(i instanceof ws){if(o==t){if(o<this.safeFrom)return null;let a=o+i.length;if(a<=this.safeTo){let l=i.prop(fn.lookAhead);if(!l||a+l<this.fragment.to)return i}}this.index[n]++,o+i.length>=Math.max(this.safeFrom,t)&&(this.trees.push(i),this.start.push(o),this.index.push(0))}else this.index[n]++,this.nextStart=o+i.length}}}class KYe{constructor(t,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map(r=>new KE)}getActions(t){let n=0,r=null,{parser:s}=t.p,{tokenizers:i}=s,o=s.stateSlot(t.state,3),a=t.curContext?t.curContext.hash:0,l=0;for(let c=0;c<i.length;c++){if((1<<c&o)==0)continue;let u=i[c],d=this.tokens[c];if(!(r&&!u.fallback)&&((u.contextual||d.start!=t.pos||d.mask!=o||d.context!=a)&&(this.updateCachedToken(d,u,t),d.mask=o,d.context=a),d.lookAhead>d.end+25&&(l=Math.max(d.lookAhead,l)),d.value!=0)){let p=n;if(d.extended>-1&&(n=this.addActions(t,d.extended,d.end,n)),n=this.addActions(t,d.value,d.end,n),!u.extend&&(r=d,n>p))break}}for(;this.actions.length>n;)this.actions.pop();return l&&t.setLookAhead(l),!r&&t.pos==this.stream.end&&(r=new KE,r.value=t.p.parser.eofTerm,r.start=r.end=t.pos,n=this.addActions(t,r.value,r.end,n)),this.mainToken=r,this.actions}getMainToken(t){if(this.mainToken)return this.mainToken;let n=new KE,{pos:r,p:s}=t;return n.start=r,n.end=Math.min(r+1,s.stream.end),n.value=r==s.stream.end?s.parser.eofTerm:0,n}updateCachedToken(t,n,r){let s=this.stream.clipPos(r.pos);if(n.token(this.stream.reset(s,t),r),t.value>-1){let{parser:i}=r.p;for(let o=0;o<i.specialized.length;o++)if(i.specialized[o]==t.value){let a=i.specializers[o](this.stream.read(t.start,t.end),r);if(a>=0&&r.p.parser.dialect.allows(a>>1)){(a&1)==0?t.value=a>>1:t.extended=a>>1;break}}}else t.value=0,t.end=this.stream.clipPos(s+1)}putAction(t,n,r,s){for(let i=0;i<s;i+=3)if(this.actions[i]==t)return s;return this.actions[s++]=t,this.actions[s++]=n,this.actions[s++]=r,s}addActions(t,n,r,s){let{state:i}=t,{parser:o}=t.p,{data:a}=o;for(let l=0;l<2;l++)for(let c=o.stateSlot(i,l?2:1);;c+=3){if(a[c]==65535)if(a[c+1]==1)c=Od(a,c+2);else{s==0&&a[c+1]==2&&(s=this.putAction(Od(a,c+2),n,r,s));break}a[c]==n&&(s=this.putAction(Od(a,c+1),n,r,s))}return s}}class XYe{constructor(t,n,r,s){this.parser=t,this.input=n,this.ranges=s,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new WYe(n,s),this.tokens=new KYe(t,this.stream),this.topTerm=t.top[1];let{from:i}=s[0];this.stacks=[n3.start(this,t.top[0],i)],this.fragments=r.length&&this.stream.end-i>t.bufferLength*4?new YYe(r,t.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let t=this.stacks,n=this.minStackPos,r=this.stacks=[],s,i;if(this.bigReductionCount>300&&t.length==1){let[o]=t;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;o<t.length;o++){let a=t[o];for(;;){if(this.tokens.mainToken=null,a.pos>n)r.push(a);else{if(this.advanceStack(a,r,t))continue;{s||(s=[],i=[]),s.push(a);let l=this.tokens.getMainToken(a);i.push(l.value,l.end)}}break}}if(!r.length){let o=s&&ZYe(s);if(o)return ca&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw ca&&s&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&s){let o=this.stoppedAt!=null&&s[0].pos>this.stoppedAt?s[0]:this.runRecovery(s,i,r);if(o)return ca&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(r.length>o)for(r.sort((a,l)=>l.score-a.score);r.length>o;)r.pop();r.some(a=>a.reducePos>n)&&this.recovering--}else if(r.length>1){e:for(let o=0;o<r.length-1;o++){let a=r[o];for(let l=o+1;l<r.length;l++){let c=r[l];if(a.sameState(c)||a.buffer.length>500&&c.buffer.length>500)if((a.score-c.score||a.buffer.length-c.buffer.length)>0)r.splice(l--,1);else{r.splice(o--,1);continue e}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let o=1;o<r.length;o++)r[o].pos<this.minStackPos&&(this.minStackPos=r[o].pos);return null}stopAt(t){if(this.stoppedAt!=null&&this.stoppedAt<t)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=t}advanceStack(t,n,r){let s=t.pos,{parser:i}=this,o=ca?this.stackID(t)+" -> ":"";if(this.stoppedAt!=null&&s>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments){let c=t.curContext&&t.curContext.tracker.strict,u=c?t.curContext.hash:0;for(let d=this.fragments.nodeAt(s);d;){let p=this.parser.nodeSet.types[d.type.id]==d.type?i.getGoto(t.state,d.type.id):-1;if(p>-1&&d.length&&(!c||(d.prop(fn.contextHash)||0)==u))return t.useNode(d,p),ca&&console.log(o+this.stackID(t)+` (via reuse of ${i.getName(d.type.id)})`),!0;if(!(d instanceof ws)||d.children.length==0||d.positions[0]>0)break;let g=d.children[0];if(g instanceof ws&&d.positions[0]==0)d=g;else break}}let a=i.stateSlot(t.state,4);if(a>0)return t.reduce(a),ca&&console.log(o+this.stackID(t)+` (via always-reduce ${i.getName(a&65535)})`),!0;if(t.stack.length>=8400)for(;t.stack.length>6e3&&t.forceReduce(););let l=this.tokens.getActions(t);for(let c=0;c<l.length;){let u=l[c++],d=l[c++],p=l[c++],g=c==l.length||!r,b=g?t:t.split(),x=this.tokens.mainToken;if(b.apply(u,d,x?x.start:b.pos,p),ca&&console.log(o+this.stackID(b)+` (via ${(u&65536)==0?"shift":`reduce of ${i.getName(u&65535)}`} for ${i.getName(d)} @ ${s}${b==t?"":", split"})`),g)return!0;b.pos>s?n.push(b):r.push(b)}return!1}advanceFully(t,n){let r=t.pos;for(;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>r)return vY(t,n),!0}}runRecovery(t,n,r){let s=null,i=!1;for(let o=0;o<t.length;o++){let a=t[o],l=n[o<<1],c=n[(o<<1)+1],u=ca?this.stackID(a)+" -> ":"";if(a.deadEnd&&(i||(i=!0,a.restart(),ca&&console.log(u+this.stackID(a)+" (restarted)"),this.advanceFully(a,r))))continue;let d=a.split(),p=u;for(let g=0;d.forceReduce()&&g<10&&(ca&&console.log(p+this.stackID(d)+" (via force-reduce)"),!this.advanceFully(d,r));g++)ca&&(p=this.stackID(d)+" -> ");for(let g of a.recoverByInsert(l))ca&&console.log(u+this.stackID(g)+" (via recover-insert)"),this.advanceFully(g,r);this.stream.end>a.pos?(c==a.pos&&(c++,l=0),a.recoverByDelete(l,c),ca&&console.log(u+this.stackID(a)+` (via recover-delete ${this.parser.getName(l)})`),vY(a,r)):(!s||s.score<a.score)&&(s=a)}return s}stackToTree(t){return t.close(),ws.build({buffer:r3.create(t),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:t.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(t){let n=(l9||(l9=new WeakMap)).get(t);return n||l9.set(t,n=String.fromCodePoint(this.nextStackID++)),n+t}}function vY(e,t){for(let n=0;n<t.length;n++){let r=t[n];if(r.pos==e.pos&&r.sameState(e)){t[n].score<e.score&&(t[n]=e);return}}t.push(e)}class JYe{constructor(t,n,r){this.source=t,this.flags=n,this.disabled=r}allows(t){return!this.disabled||this.disabled[t]==0}}class s3 extends Gce{constructor(t){if(super(),this.wrappers=[],t.version!=14)throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);let n=t.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let a=0;a<t.repeatNodeCount;a++)n.push("");let r=Object.keys(t.topRules).map(a=>t.topRules[a][1]),s=[];for(let a=0;a<n.length;a++)s.push([]);function i(a,l,c){s[a].push([l,l.deserialize(String(c))])}if(t.nodeProps)for(let a of t.nodeProps){let l=a[0];typeof l=="string"&&(l=fn[l]);for(let c=1;c<a.length;){let u=a[c++];if(u>=0)i(u,l,a[c++]);else{let d=a[c+-u];for(let p=-u;p>0;p--)i(a[c++],l,d);c++}}}this.nodeSet=new _R(n.map((a,l)=>Yo.define({name:l>=this.minRepeatTerm?void 0:a,id:l,props:s[l],top:r.indexOf(l)>-1,error:l==0,skipped:t.skippedNodes&&t.skippedNodes.indexOf(l)>-1}))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=Vce;let o=T2(t.tokenData);this.context=t.context,this.specializerSpecs=t.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let a=0;a<this.specializerSpecs.length;a++)this.specialized[a]=this.specializerSpecs[a].term;this.specializers=this.specializerSpecs.map(wY),this.states=T2(t.states,Uint32Array),this.data=T2(t.stateData),this.goto=T2(t.goto),this.maxTerm=t.maxTerm,this.tokenizers=t.tokenizers.map(a=>typeof a=="number"?new K0(o,a):a),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,n,r){let s=new XYe(this,t,n,r);for(let i of this.wrappers)s=i(s,t,n,r);return s}getGoto(t,n,r=!1){let s=this.goto;if(n>=s[0])return-1;for(let i=s[n+1];;){let o=s[i++],a=o&1,l=s[i++];if(a&&r)return l;for(let c=i+(o>>1);i<c;i++)if(s[i]==t)return l;if(a)return-1}}hasAction(t,n){let r=this.data;for(let s=0;s<2;s++)for(let i=this.stateSlot(t,s?2:1),o;;i+=3){if((o=r[i])==65535)if(r[i+1]==1)o=r[i=Od(r,i+2)];else{if(r[i+1]==2)return Od(r,i+2);break}if(o==n||o==0)return Od(r,i+1)}return 0}stateSlot(t,n){return this.states[t*6+n]}stateFlag(t,n){return(this.stateSlot(t,0)&n)>0}validAction(t,n){return!!this.allActions(t,r=>r==n?!0:null)}allActions(t,n){let r=this.stateSlot(t,4),s=r?n(r):void 0;for(let i=this.stateSlot(t,1);s==null;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=Od(this.data,i+2);else break;s=n(Od(this.data,i+1))}return s}nextStates(t){let n=[];for(let r=this.stateSlot(t,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Od(this.data,r+2);else break;if((this.data[r+2]&1)==0){let s=this.data[r+1];n.some((i,o)=>o&1&&i==s)||n.push(this.data[r],s)}}return n}configure(t){let n=Object.assign(Object.create(s3.prototype),this);if(t.props&&(n.nodeSet=this.nodeSet.extend(...t.props)),t.top){let r=this.topRules[t.top];if(!r)throw new RangeError(`Invalid top rule name ${t.top}`);n.top=r}return t.tokenizers&&(n.tokenizers=this.tokenizers.map(r=>{let s=t.tokenizers.find(i=>i.from==r);return s?s.to:r})),t.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((r,s)=>{let i=t.specializers.find(a=>a.from==r.external);if(!i)return r;let o=Object.assign(Object.assign({},r),{external:i.to});return n.specializers[s]=wY(o),o})),t.contextTracker&&(n.context=t.contextTracker),t.dialect&&(n.dialect=this.parseDialect(t.dialect)),t.strict!=null&&(n.strict=t.strict),t.wrap&&(n.wrappers=n.wrappers.concat(t.wrap)),t.bufferLength!=null&&(n.bufferLength=t.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let n=this.dynamicPrecedences;return n==null?0:n[t]||0}parseDialect(t){let n=Object.keys(this.dialects),r=n.map(()=>!1);if(t)for(let i of t.split(" ")){let o=n.indexOf(i);o>=0&&(r[o]=!0)}let s=null;for(let i=0;i<n.length;i++)if(!r[i])for(let o=this.dialects[n[i]],a;(a=this.data[o++])!=65535;)(s||(s=new Uint8Array(this.maxTerm+1)))[a]=1;return new JYe(t,r,s)}static deserialize(t){return new s3(t)}}function Od(e,t){return e[t]|e[t+1]<<16}function ZYe(e){let t=null;for(let n of e){let r=n.p.stoppedAt;(n.pos==n.p.stream.end||r!=null&&n.pos>r)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.score<n.score)&&(t=n)}return t}function wY(e){if(e.external){let t=e.extend?1:0;return(n,r)=>e.external(n,r)<<1|t}return e.get}let QYe=0;class Ja{constructor(t,n,r,s){this.name=t,this.set=n,this.base=r,this.modified=s,this.id=QYe++}toString(){let{name:t}=this;for(let n of this.modified)n.name&&(t=`${n.name}(${t})`);return t}static define(t,n){let r=typeof t=="string"?t:"?";if(t instanceof Ja&&(n=t),n!=null&&n.base)throw new Error("Can not derive from a modified tag");let s=new Ja(r,[],null,[]);if(s.set.push(s),n)for(let i of n.set)s.set.push(i);return s}static defineModifier(t){let n=new i3(t);return r=>r.modified.indexOf(n)>-1?r:i3.get(r.base||r,r.modified.concat(n).sort((s,i)=>s.id-i.id))}}let eKe=0;class i3{constructor(t){this.name=t,this.instances=[],this.id=eKe++}static get(t,n){if(!n.length)return t;let r=n[0].instances.find(a=>a.base==t&&tKe(n,a.modified));if(r)return r;let s=[],i=new Ja(t.name,s,t,n);for(let a of n)a.instances.push(i);let o=nKe(n);for(let a of t.set)if(!a.modified.length)for(let l of o)s.push(i3.get(a,l));return i}}function tKe(e,t){return e.length==t.length&&e.every((n,r)=>n==t[r])}function nKe(e){let t=[[]];for(let n=0;n<e.length;n++)for(let r=0,s=t.length;r<s;r++)t.push(t[r].concat(e[n]));return t.sort((n,r)=>r.length-n.length)}function Yce(e){let t=Object.create(null);for(let n in e){let r=e[n];Array.isArray(r)||(r=[r]);for(let s of n.split(" "))if(s){let i=[],o=2,a=s;for(let d=0;;){if(a=="..."&&d>0&&d+3==s.length){o=1;break}let p=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!p)throw new RangeError("Invalid path: "+s);if(i.push(p[0]=="*"?"":p[0][0]=='"'?JSON.parse(p[0]):p[0]),d+=p[0].length,d==s.length)break;let g=s[d++];if(d==s.length&&g=="!"){o=0;break}if(g!="/")throw new RangeError("Invalid path: "+s);a=s.slice(d)}let l=i.length-1,c=i[l];if(!c)throw new RangeError("Invalid path: "+s);let u=new o3(r,o,l>0?i.slice(0,l):null);t[c]=u.sort(t[c])}}return Kce.add(t)}const Kce=new fn;class o3{constructor(t,n,r,s){this.tags=t,this.mode=n,this.context=r,this.next=s}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(t){return!t||t.depth<this.depth?(this.next=t,this):(t.next=this.sort(t.next),t)}get depth(){return this.context?this.context.length:0}}o3.empty=new o3([],2,null);function Xce(e,t){let n=Object.create(null);for(let i of e)if(!Array.isArray(i.tag))n[i.tag.id]=i.class;else for(let o of i.tag)n[o.id]=i.class;let{scope:r,all:s=null}=t||{};return{style:i=>{let o=s;for(let a of i)for(let l of a.set){let c=n[l.id];if(c){o=o?o+" "+c:c;break}}return o},scope:r}}function rKe(e,t){let n=null;for(let r of e){let s=r.style(t);s&&(n=n?n+" "+s:s)}return n}function sKe(e,t,n,r=0,s=e.length){let i=new iKe(r,Array.isArray(t)?t:[t],n);i.highlightRange(e.cursor(),r,s,"",i.highlighters),i.flush(s)}class iKe{constructor(t,n,r){this.at=t,this.highlighters=n,this.span=r,this.class=""}startSpan(t,n){n!=this.class&&(this.flush(t),t>this.at&&(this.at=t),this.class=n)}flush(t){t>this.at&&this.class&&this.span(this.at,t,this.class)}highlightRange(t,n,r,s,i){let{type:o,from:a,to:l}=t;if(a>=r||l<=n)return;o.isTop&&(i=this.highlighters.filter(g=>!g.scope||g.scope(o)));let c=s,u=oKe(t)||o3.empty,d=rKe(i,u.tags);if(d&&(c&&(c+=" "),c+=d,u.mode==1&&(s+=(s?" ":"")+d)),this.startSpan(Math.max(n,a),c),u.opaque)return;let p=t.tree&&t.tree.prop(fn.mounted);if(p&&p.overlay){let g=t.node.enter(p.overlay[0].from+a,1),b=this.highlighters.filter(S=>!S.scope||S.scope(p.tree.type)),x=t.firstChild();for(let S=0,E=a;;S++){let k=S<p.overlay.length?p.overlay[S]:null,T=k?k.from+a:l,P=Math.max(n,E),M=Math.min(r,T);if(P<M&&x)for(;t.from<M&&(this.highlightRange(t,P,M,s,i),this.startSpan(Math.min(M,t.to),c),!(t.to>=T||!t.nextSibling())););if(!k||T>r)break;E=k.to+a,E>n&&(this.highlightRange(g.cursor(),Math.max(n,k.from+a),Math.min(r,E),"",b),this.startSpan(Math.min(r,E),c))}x&&t.parent()}else if(t.firstChild()){p&&(s="");do if(!(t.to<=n)){if(t.from>=r)break;this.highlightRange(t,n,r,s,i),this.startSpan(Math.min(r,t.to),c)}while(t.nextSibling());t.parent()}}}function oKe(e){let t=e.type.prop(Kce);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}const it=Ja.define,_2=it(),Mf=it(),SY=it(Mf),CY=it(Mf),jf=it(),N2=it(jf),c9=it(jf),Uc=it(),vm=it(Uc),Lc=it(),Bc=it(),rM=it(),hv=it(rM),P2=it(),Ce={comment:_2,lineComment:it(_2),blockComment:it(_2),docComment:it(_2),name:Mf,variableName:it(Mf),typeName:SY,tagName:it(SY),propertyName:CY,attributeName:it(CY),className:it(Mf),labelName:it(Mf),namespace:it(Mf),macroName:it(Mf),literal:jf,string:N2,docString:it(N2),character:it(N2),attributeValue:it(N2),number:c9,integer:it(c9),float:it(c9),bool:it(jf),regexp:it(jf),escape:it(jf),color:it(jf),url:it(jf),keyword:Lc,self:it(Lc),null:it(Lc),atom:it(Lc),unit:it(Lc),modifier:it(Lc),operatorKeyword:it(Lc),controlKeyword:it(Lc),definitionKeyword:it(Lc),moduleKeyword:it(Lc),operator:Bc,derefOperator:it(Bc),arithmeticOperator:it(Bc),logicOperator:it(Bc),bitwiseOperator:it(Bc),compareOperator:it(Bc),updateOperator:it(Bc),definitionOperator:it(Bc),typeOperator:it(Bc),controlOperator:it(Bc),punctuation:rM,separator:it(rM),bracket:hv,angleBracket:it(hv),squareBracket:it(hv),paren:it(hv),brace:it(hv),content:Uc,heading:vm,heading1:it(vm),heading2:it(vm),heading3:it(vm),heading4:it(vm),heading5:it(vm),heading6:it(vm),contentSeparator:it(Uc),list:it(Uc),quote:it(Uc),emphasis:it(Uc),strong:it(Uc),link:it(Uc),monospace:it(Uc),strikethrough:it(Uc),inserted:it(),deleted:it(),changed:it(),invalid:it(),meta:P2,documentMeta:it(P2),annotation:it(P2),processingInstruction:it(P2),definition:Ja.defineModifier("definition"),constant:Ja.defineModifier("constant"),function:Ja.defineModifier("function"),standard:Ja.defineModifier("standard"),local:Ja.defineModifier("local"),special:Ja.defineModifier("special")};for(let e in Ce){let t=Ce[e];t instanceof Ja&&(t.name=e)}Xce([{tag:Ce.link,class:"tok-link"},{tag:Ce.heading,class:"tok-heading"},{tag:Ce.emphasis,class:"tok-emphasis"},{tag:Ce.strong,class:"tok-strong"},{tag:Ce.keyword,class:"tok-keyword"},{tag:Ce.atom,class:"tok-atom"},{tag:Ce.bool,class:"tok-bool"},{tag:Ce.url,class:"tok-url"},{tag:Ce.labelName,class:"tok-labelName"},{tag:Ce.inserted,class:"tok-inserted"},{tag:Ce.deleted,class:"tok-deleted"},{tag:Ce.literal,class:"tok-literal"},{tag:Ce.string,class:"tok-string"},{tag:Ce.number,class:"tok-number"},{tag:[Ce.regexp,Ce.escape,Ce.special(Ce.string)],class:"tok-string2"},{tag:Ce.variableName,class:"tok-variableName"},{tag:Ce.local(Ce.variableName),class:"tok-variableName tok-local"},{tag:Ce.definition(Ce.variableName),class:"tok-variableName tok-definition"},{tag:Ce.special(Ce.variableName),class:"tok-variableName2"},{tag:Ce.definition(Ce.propertyName),class:"tok-propertyName tok-definition"},{tag:Ce.typeName,class:"tok-typeName"},{tag:Ce.namespace,class:"tok-namespace"},{tag:Ce.className,class:"tok-className"},{tag:Ce.macroName,class:"tok-macroName"},{tag:Ce.propertyName,class:"tok-propertyName"},{tag:Ce.operator,class:"tok-operator"},{tag:Ce.comment,class:"tok-comment"},{tag:Ce.meta,class:"tok-meta"},{tag:Ce.invalid,class:"tok-invalid"},{tag:Ce.punctuation,class:"tok-punctuation"}]);const aKe=Yce({String:Ce.string,Number:Ce.number,"True False":Ce.bool,PropertyName:Ce.propertyName,Null:Ce.null,", :":Ce.separator,"[ ]":Ce.squareBracket,"{ }":Ce.brace}),lKe=s3.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[aKe],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0});let sM=[],Jce=[];(()=>{let e="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(t=>t?parseInt(t,36):1);for(let t=0,n=0;t<e.length;t++)(t%2?Jce:sM).push(n=n+e[t])})();function cKe(e){if(e<768)return!1;for(let t=0,n=sM.length;;){let r=t+n>>1;if(e<sM[r])n=r;else if(e>=Jce[r])t=r+1;else return!0;if(t==n)return!1}}function kY(e){return e>=127462&&e<=127487}const EY=8205;function uKe(e,t,n=!0,r=!0){return(n?Zce:dKe)(e,t,r)}function Zce(e,t,n){if(t==e.length)return t;t&&Qce(e.charCodeAt(t))&&eue(e.charCodeAt(t-1))&&t--;let r=u9(e,t);for(t+=DY(r);t<e.length;){let s=u9(e,t);if(r==EY||s==EY||n&&cKe(s))t+=DY(s),r=s;else if(kY(s)){let i=0,o=t-2;for(;o>=0&&kY(u9(e,o));)i++,o-=2;if(i%2==0)break;t+=2}else break}return t}function dKe(e,t,n){for(;t>0;){let r=Zce(e,t-2,n);if(r<t)return r;t--}return 0}function u9(e,t){let n=e.charCodeAt(t);if(!eue(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return Qce(r)?(n-55296<<10)+(r-56320)+65536:n}function Qce(e){return e>=56320&&e<57344}function eue(e){return e>=55296&&e<56320}function DY(e){return e<65536?1:2}let Gn=class tue{lineAt(t){if(t<0||t>this.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,n,r){[t,n]=Hb(this,t,n);let s=[];return this.decompose(0,t,s,2),r.length&&r.decompose(0,r.length,s,3),this.decompose(n,this.length,s,1),Qc.from(s,this.length-(n-t)+r.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,n=this.length){[t,n]=Hb(this,t,n);let r=[];return this.decompose(t,n,r,0),Qc.from(r,n-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let n=this.scanIdentical(t,1),r=this.length-this.scanIdentical(t,-1),s=new aw(this),i=new aw(t);for(let o=n,a=n;;){if(s.next(o),i.next(o),o=0,s.lineBreak!=i.lineBreak||s.done!=i.done||s.value!=i.value)return!1;if(a+=s.value.length,s.done||a>=r)return!0}}iter(t=1){return new aw(this,t)}iterRange(t,n=this.length){return new nue(this,t,n)}iterLines(t,n){let r;if(t==null)r=this.iter();else{n==null&&(n=this.lines+1);let s=this.line(t).from;r=this.iterRange(s,Math.max(s,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new rue(r)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}constructor(){}static of(t){if(t.length==0)throw new RangeError("A document must have at least one line");return t.length==1&&!t[0]?tue.empty:t.length<=32?new is(t):Qc.from(is.split(t,[]))}};class is extends Gn{constructor(t,n=hKe(t)){super(),this.text=t,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(t,n,r,s){for(let i=0;;i++){let o=this.text[i],a=s+o.length;if((n?r:a)>=t)return new fKe(s,a,r,o);s=a+1,r++}}decompose(t,n,r,s){let i=t<=0&&n>=this.length?this:new is(AY(this.text,t,n),Math.min(n,this.length)-Math.max(0,t));if(s&1){let o=r.pop(),a=XE(i.text,o.text.slice(),0,i.length);if(a.length<=32)r.push(new is(a,o.length+i.length));else{let l=a.length>>1;r.push(new is(a.slice(0,l)),new is(a.slice(l)))}}else r.push(i)}replace(t,n,r){if(!(r instanceof is))return super.replace(t,n,r);[t,n]=Hb(this,t,n);let s=XE(this.text,XE(r.text,AY(this.text,0,t)),n),i=this.length+r.length-(n-t);return s.length<=32?new is(s,i):Qc.from(is.split(s,[]),i)}sliceString(t,n=this.length,r=`
|
|
578
|
+
`).length);var le=ae+T,pe=AGe(se,F,W,x,E,T,le,j,B);return Se.createElement(V,ee,Se.createElement(G,d,!E&&X,$({rows:pe,stylesheet:a,useInlineStyles:g})))}}function bG(e,t,n,r,s,i,o){try{var a=e[i](o),l=a.value}catch(c){return void n(c)}a.done?t(l):Promise.resolve(l).then(r,s)}function PGe(e){return function(){var t=this,n=arguments;return new Promise(function(r,s){var i=e.apply(t,n);function o(l){bG(i,r,s,o,a,"next",l)}function a(l){bG(i,r,s,o,a,"throw",l)}o(void 0)})}}function MGe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xG(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,Oce(r.key),r)}}function jGe(e,t,n){return t&&xG(e.prototype,t),n&&xG(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function FGe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function IGe(e,t){if(t&&(yp(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return FGe(e)}function e3(e){return e3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},e3(e)}function QP(e,t){return QP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},QP(e,t)}function OGe(e,t){if(typeof t!="function"&&t!==null)throw new 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&&QP(e,t)}function eM(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */eM=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,s=Object.defineProperty||function(G,q,z){G[q]=z.value},i=typeof Symbol=="function"?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(G,q,z){return Object.defineProperty(G,q,{value:z,enumerable:!0,configurable:!0,writable:!0}),G[q]}try{c({},"")}catch{c=function(z,Y,U){return z[Y]=U}}function u(G,q,z,Y){var U=q&&q.prototype instanceof E?q:E,X=Object.create(U.prototype),ne=new V(Y||[]);return s(X,"_invoke",{value:L(G,z,ne)}),X}function d(G,q,z){try{return{type:"normal",arg:G.call(q,z)}}catch(Y){return{type:"throw",arg:Y}}}t.wrap=u;var p="suspendedStart",g="suspendedYield",b="executing",x="completed",S={};function E(){}function k(){}function T(){}var P={};c(P,o,function(){return this});var M=Object.getPrototypeOf,j=M&&M(M(Z([])));j&&j!==n&&r.call(j,o)&&(P=j);var F=T.prototype=E.prototype=Object.create(P);function I(G){["next","throw","return"].forEach(function(q){c(G,q,function(z){return this._invoke(q,z)})})}function B(G,q){function z(U,X,ne,H){var ee=d(G[U],G,X);if(ee.type!=="throw"){var ie=ee.arg,se=ie.value;return se&&yp(se)=="object"&&r.call(se,"__await")?q.resolve(se.__await).then(function(ae){z("next",ae,ne,H)},function(ae){z("throw",ae,ne,H)}):q.resolve(se).then(function(ae){ie.value=ae,ne(ie)},function(ae){return z("throw",ae,ne,H)})}H(ee.arg)}var Y;s(this,"_invoke",{value:function(X,ne){function H(){return new q(function(ee,ie){z(X,ne,ee,ie)})}return Y=Y?Y.then(H,H):H()}})}function L(G,q,z){var Y=p;return function(U,X){if(Y===b)throw Error("Generator is already running");if(Y===x){if(U==="throw")throw X;return{value:e,done:!0}}for(z.method=U,z.arg=X;;){var ne=z.delegate;if(ne){var H=W(ne,z);if(H){if(H===S)continue;return H}}if(z.method==="next")z.sent=z._sent=z.arg;else if(z.method==="throw"){if(Y===p)throw Y=x,z.arg;z.dispatchException(z.arg)}else z.method==="return"&&z.abrupt("return",z.arg);Y=b;var ee=d(G,q,z);if(ee.type==="normal"){if(Y=z.done?x:g,ee.arg===S)continue;return{value:ee.arg,done:z.done}}ee.type==="throw"&&(Y=x,z.method="throw",z.arg=ee.arg)}}}function W(G,q){var z=q.method,Y=G.iterator[z];if(Y===e)return q.delegate=null,z==="throw"&&G.iterator.return&&(q.method="return",q.arg=e,W(G,q),q.method==="throw")||z!=="return"&&(q.method="throw",q.arg=new TypeError("The iterator does not provide a '"+z+"' method")),S;var U=d(Y,G.iterator,q.arg);if(U.type==="throw")return q.method="throw",q.arg=U.arg,q.delegate=null,S;var X=U.arg;return X?X.done?(q[G.resultName]=X.value,q.next=G.nextLoc,q.method!=="return"&&(q.method="next",q.arg=e),q.delegate=null,S):X:(q.method="throw",q.arg=new TypeError("iterator result is not an object"),q.delegate=null,S)}function $(G){var q={tryLoc:G[0]};1 in G&&(q.catchLoc=G[1]),2 in G&&(q.finallyLoc=G[2],q.afterLoc=G[3]),this.tryEntries.push(q)}function J(G){var q=G.completion||{};q.type="normal",delete q.arg,G.completion=q}function V(G){this.tryEntries=[{tryLoc:"root"}],G.forEach($,this),this.reset(!0)}function Z(G){if(G||G===""){var q=G[o];if(q)return q.call(G);if(typeof G.next=="function")return G;if(!isNaN(G.length)){var z=-1,Y=function U(){for(;++z<G.length;)if(r.call(G,z))return U.value=G[z],U.done=!1,U;return U.value=e,U.done=!0,U};return Y.next=Y}}throw new TypeError(yp(G)+" is not iterable")}return k.prototype=T,s(F,"constructor",{value:T,configurable:!0}),s(T,"constructor",{value:k,configurable:!0}),k.displayName=c(T,l,"GeneratorFunction"),t.isGeneratorFunction=function(G){var q=typeof G=="function"&&G.constructor;return!!q&&(q===k||(q.displayName||q.name)==="GeneratorFunction")},t.mark=function(G){return Object.setPrototypeOf?Object.setPrototypeOf(G,T):(G.__proto__=T,c(G,l,"GeneratorFunction")),G.prototype=Object.create(F),G},t.awrap=function(G){return{__await:G}},I(B.prototype),c(B.prototype,a,function(){return this}),t.AsyncIterator=B,t.async=function(G,q,z,Y,U){U===void 0&&(U=Promise);var X=new B(u(G,q,z,Y),U);return t.isGeneratorFunction(q)?X:X.next().then(function(ne){return ne.done?ne.value:X.next()})},I(F),c(F,l,"Generator"),c(F,o,function(){return this}),c(F,"toString",function(){return"[object Generator]"}),t.keys=function(G){var q=Object(G),z=[];for(var Y in q)z.push(Y);return z.reverse(),function U(){for(;z.length;){var X=z.pop();if(X in q)return U.value=X,U.done=!1,U}return U.done=!0,U}},t.values=Z,V.prototype={constructor:V,reset:function(q){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(J),!q)for(var z in this)z.charAt(0)==="t"&&r.call(this,z)&&!isNaN(+z.slice(1))&&(this[z]=e)},stop:function(){this.done=!0;var q=this.tryEntries[0].completion;if(q.type==="throw")throw q.arg;return this.rval},dispatchException:function(q){if(this.done)throw q;var z=this;function Y(ie,se){return ne.type="throw",ne.arg=q,z.next=ie,se&&(z.method="next",z.arg=e),!!se}for(var U=this.tryEntries.length-1;U>=0;--U){var X=this.tryEntries[U],ne=X.completion;if(X.tryLoc==="root")return Y("end");if(X.tryLoc<=this.prev){var H=r.call(X,"catchLoc"),ee=r.call(X,"finallyLoc");if(H&&ee){if(this.prev<X.catchLoc)return Y(X.catchLoc,!0);if(this.prev<X.finallyLoc)return Y(X.finallyLoc)}else if(H){if(this.prev<X.catchLoc)return Y(X.catchLoc,!0)}else{if(!ee)throw Error("try statement without catch or finally");if(this.prev<X.finallyLoc)return Y(X.finallyLoc)}}}},abrupt:function(q,z){for(var Y=this.tryEntries.length-1;Y>=0;--Y){var U=this.tryEntries[Y];if(U.tryLoc<=this.prev&&r.call(U,"finallyLoc")&&this.prev<U.finallyLoc){var X=U;break}}X&&(q==="break"||q==="continue")&&X.tryLoc<=z&&z<=X.finallyLoc&&(X=null);var ne=X?X.completion:{};return ne.type=q,ne.arg=z,X?(this.method="next",this.next=X.finallyLoc,S):this.complete(ne)},complete:function(q,z){if(q.type==="throw")throw q.arg;return q.type==="break"||q.type==="continue"?this.next=q.arg:q.type==="return"?(this.rval=this.arg=q.arg,this.method="return",this.next="end"):q.type==="normal"&&z&&(this.next=z),S},finish:function(q){for(var z=this.tryEntries.length-1;z>=0;--z){var Y=this.tryEntries[z];if(Y.finallyLoc===q)return this.complete(Y.completion,Y.afterLoc),J(Y),S}},catch:function(q){for(var z=this.tryEntries.length-1;z>=0;--z){var Y=this.tryEntries[z];if(Y.tryLoc===q){var U=Y.completion;if(U.type==="throw"){var X=U.arg;J(Y)}return X}}throw Error("illegal catch attempt")},delegateYield:function(q,z,Y){return this.delegate={iterator:Z(q),resultName:z,nextLoc:Y},this.method==="next"&&(this.arg=e),S}},t}function RGe(e,t,n){return t=e3(t),IGe(e,Hce()?Reflect.construct(t,n||[],e3(e).constructor):t.apply(e,n))}function Hce(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Hce=function(){return!!e})()}const LGe=function(e){var t,n=e.loader,r=e.isLanguageRegistered,s=e.registerLanguage,i=e.languageLoaders,o=e.noAsyncLoadingLanguages,a=function(l){function c(){return MGe(this,c),RGe(this,c,arguments)}return OGe(c,l),jGe(c,[{key:"componentDidUpdate",value:function(){!c.isRegistered(this.props.language)&&i&&this.loadLanguage()}},{key:"componentDidMount",value:function(){var d=this;c.astGeneratorPromise||c.loadAstGenerator(),c.astGenerator||c.astGeneratorPromise.then(function(){d.forceUpdate()}),!c.isRegistered(this.props.language)&&i&&this.loadLanguage()}},{key:"loadLanguage",value:function(){var d=this,p=this.props.language;p!=="text"&&c.loadLanguage(p).then(function(){return d.forceUpdate()}).catch(function(){})}},{key:"normalizeLanguage",value:function(d){return c.isSupportedLanguage(d)?d:"text"}},{key:"render",value:function(){return Se.createElement(c.highlightInstance,Sg({},this.props,{language:this.normalizeLanguage(this.props.language),astGenerator:c.astGenerator}))}}],[{key:"preload",value:function(){return c.loadAstGenerator()}},{key:"loadLanguage",value:function(){var u=PGe(eM().mark(function p(g){var b;return eM().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:if(b=i[g],typeof b!="function"){S.next=5;break}return S.abrupt("return",b(c.registerLanguage));case 5:throw new Error("Language ".concat(g," not supported"));case 6:case"end":return S.stop()}},p)}));function d(p){return u.apply(this,arguments)}return d}()},{key:"isSupportedLanguage",value:function(d){return c.isRegistered(d)||typeof i[d]=="function"}},{key:"loadAstGenerator",value:function(){return c.astGeneratorPromise=n().then(function(d){c.astGenerator=d,s&&c.languages.forEach(function(p,g){return s(d,g,p)})}),c.astGeneratorPromise}}])}(Se.PureComponent);return t=a,Td(a,"astGenerator",null),Td(a,"highlightInstance",NGe(null,{})),Td(a,"astGeneratorPromise",null),Td(a,"languages",new Map),Td(a,"supportedLanguages",e.supportedLanguages||Object.keys(i||{})),Td(a,"isRegistered",function(l){if(o)return!0;if(!s)throw new Error("Current syntax highlighter doesn't support registration of languages");return t.astGenerator?r(t.astGenerator,l):t.languages.has(l)}),Td(a,"registerLanguage",function(l,c){if(!s)throw new Error("Current syntax highlighter doesn't support registration of languages");if(t.astGenerator)return s(t.astGenerator,l,c);t.languages.set(l,c)}),a},BGe=["abap","abnf","actionscript","ada","agda","al","antlr4","apacheconf","apex","apl","applescript","aql","arduino","arff","asciidoc","asm6502","asmatmel","aspnet","autohotkey","autoit","avisynth","avro-idl","bash","basic","batch","bbcode","bicep","birb","bison","bnf","brainfuck","brightscript","bro","bsl","c","cfscript","chaiscript","cil","clike","clojure","cmake","cobol","coffeescript","concurnas","coq","cpp","crystal","csharp","cshtml","csp","css-extras","css","csv","cypher","d","dart","dataweave","dax","dhall","diff","django","dns-zone-file","docker","dot","ebnf","editorconfig","eiffel","ejs","elixir","elm","erb","erlang","etlua","excel-formula","factor","false","firestore-security-rules","flow","fortran","fsharp","ftl","gap","gcode","gdscript","gedcom","gherkin","git","glsl","gml","gn","go-module","go","graphql","groovy","haml","handlebars","haskell","haxe","hcl","hlsl","hoon","hpkp","hsts","http","ichigojam","icon","icu-message-format","idris","iecst","ignore","inform7","ini","io","j","java","javadoc","javadoclike","javascript","javastacktrace","jexl","jolie","jq","js-extras","js-templates","jsdoc","json","json5","jsonp","jsstacktrace","jsx","julia","keepalived","keyman","kotlin","kumir","kusto","latex","latte","less","lilypond","liquid","lisp","livescript","llvm","log","lolcode","lua","magma","makefile","markdown","markup-templating","markup","matlab","maxscript","mel","mermaid","mizar","mongodb","monkey","moonscript","n1ql","n4js","nand2tetris-hdl","naniscript","nasm","neon","nevod","nginx","nim","nix","nsis","objectivec","ocaml","opencl","openqasm","oz","parigp","parser","pascal","pascaligo","pcaxis","peoplecode","perl","php-extras","php","phpdoc","plsql","powerquery","powershell","processing","prolog","promql","properties","protobuf","psl","pug","puppet","pure","purebasic","purescript","python","q","qml","qore","qsharp","r","racket","reason","regex","rego","renpy","rest","rip","roboconf","robotframework","ruby","rust","sas","sass","scala","scheme","scss","shell-session","smali","smalltalk","smarty","sml","solidity","solution-file","soy","sparql","splunk-spl","sqf","sql","squirrel","stan","stylus","swift","systemd","t4-cs","t4-templating","t4-vb","tap","tcl","textile","toml","tremor","tsx","tt2","turtle","twig","typescript","typoscript","unrealscript","uorazor","uri","v","vala","vbnet","velocity","verilog","vhdl","vim","visual-basic","warpscript","wasm","web-idl","wiki","wolfram","wren","xeora","xml-doc","xojo","xquery","yaml","yang","zig"],$Ge=LGe({loader:function(){return ooe(()=>import("./index-bd7ggwIc.js").then(t=>t.i),[]).then(function(t){return t.default||t})},noAsyncLoadingLanguages:!0,supportedLanguages:BGe});var zGe=e=>t=>{const n=({components:{Pre:r,Code:s},language:i,code:o})=>h.jsx(e,{PreTag:r,CodeTag:s,...t,language:i,children:o});return n.displayName="PrismSyntaxHighlighter",n},HGe=zGe($Ge),m8={},g8={exports:{}},vG;function VGe(){return vG||(vG=1,function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(g8)),g8.exports}var y8={},wG;function UGe(){return wG||(wG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"black",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",maxHeight:"inherit",height:"inherit",padding:"0 1em",display:"block",overflow:"auto"},'pre[class*="language-"]':{color:"black",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",position:"relative",margin:".5em 0",overflow:"visible",padding:"1px",backgroundColor:"#fdfdfd",WebkitBoxSizing:"border-box",MozBoxSizing:"border-box",boxSizing:"border-box",marginBottom:"1em"},'pre[class*="language-"] > code':{position:"relative",zIndex:"1",borderLeft:"10px solid #358ccb",boxShadow:"-1px 0px 0px 0px #358ccb, 0px 0px 0px 1px #dfdfdf",backgroundColor:"#fdfdfd",backgroundImage:"linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%)",backgroundSize:"3em 3em",backgroundOrigin:"content-box",backgroundAttachment:"local"},':not(pre) > code[class*="language-"]':{backgroundColor:"#fdfdfd",WebkitBoxSizing:"border-box",MozBoxSizing:"border-box",boxSizing:"border-box",marginBottom:"1em",position:"relative",padding:".2em",borderRadius:"0.3em",color:"#c92c2c",border:"1px solid rgba(0, 0, 0, 0.1)",display:"inline",whiteSpace:"normal"},'pre[class*="language-"]:before':{content:"''",display:"block",position:"absolute",bottom:"0.75em",left:"0.18em",width:"40%",height:"20%",maxHeight:"13em",boxShadow:"0px 13px 8px #979797",WebkitTransform:"rotate(-2deg)",MozTransform:"rotate(-2deg)",msTransform:"rotate(-2deg)",OTransform:"rotate(-2deg)",transform:"rotate(-2deg)"},'pre[class*="language-"]:after':{content:"''",display:"block",position:"absolute",bottom:"0.75em",left:"auto",width:"40%",height:"20%",maxHeight:"13em",boxShadow:"0px 13px 8px #979797",WebkitTransform:"rotate(2deg)",MozTransform:"rotate(2deg)",msTransform:"rotate(2deg)",OTransform:"rotate(2deg)",transform:"rotate(2deg)",right:"0.75em"},comment:{color:"#7D8B99"},"block-comment":{color:"#7D8B99"},prolog:{color:"#7D8B99"},doctype:{color:"#7D8B99"},cdata:{color:"#7D8B99"},punctuation:{color:"#5F6364"},property:{color:"#c92c2c"},tag:{color:"#c92c2c"},boolean:{color:"#c92c2c"},number:{color:"#c92c2c"},"function-name":{color:"#c92c2c"},constant:{color:"#c92c2c"},symbol:{color:"#c92c2c"},deleted:{color:"#c92c2c"},selector:{color:"#2f9c0a"},"attr-name":{color:"#2f9c0a"},string:{color:"#2f9c0a"},char:{color:"#2f9c0a"},function:{color:"#2f9c0a"},builtin:{color:"#2f9c0a"},inserted:{color:"#2f9c0a"},operator:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},entity:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)",cursor:"help"},url:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},variable:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},atrule:{color:"#1990b8"},"attr-value":{color:"#1990b8"},keyword:{color:"#1990b8"},"class-name":{color:"#1990b8"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"normal"},".language-css .token.string":{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},".style .token.string":{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:".7"},'pre[class*="language-"].line-numbers.line-numbers':{paddingLeft:"0"},'pre[class*="language-"].line-numbers.line-numbers code':{paddingLeft:"3.8em"},'pre[class*="language-"].line-numbers.line-numbers .line-numbers-rows':{left:"0"},'pre[class*="language-"][data-line]':{paddingTop:"0",paddingBottom:"0",paddingLeft:"0"},"pre[data-line] code":{position:"relative",paddingLeft:"4em"},"pre .line-highlight":{marginTop:"0"}}}(y8)),y8}var b8={},SG;function WGe(){return SG||(SG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"white",background:"none",textShadow:"0 -.1em .2em black",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"white",background:"hsl(30, 20%, 25%)",textShadow:"0 -.1em .2em black",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",border:".3em solid hsl(30, 20%, 40%)",borderRadius:".5em",boxShadow:"1px 1px .5em black inset"},':not(pre) > code[class*="language-"]':{background:"hsl(30, 20%, 25%)",padding:".15em .2em .05em",borderRadius:".3em",border:".13em solid hsl(30, 20%, 40%)",boxShadow:"1px 1px .3em -.1em black inset",whiteSpace:"normal"},comment:{color:"hsl(30, 20%, 50%)"},prolog:{color:"hsl(30, 20%, 50%)"},doctype:{color:"hsl(30, 20%, 50%)"},cdata:{color:"hsl(30, 20%, 50%)"},punctuation:{Opacity:".7"},namespace:{Opacity:".7"},property:{color:"hsl(350, 40%, 70%)"},tag:{color:"hsl(350, 40%, 70%)"},boolean:{color:"hsl(350, 40%, 70%)"},number:{color:"hsl(350, 40%, 70%)"},constant:{color:"hsl(350, 40%, 70%)"},symbol:{color:"hsl(350, 40%, 70%)"},selector:{color:"hsl(75, 70%, 60%)"},"attr-name":{color:"hsl(75, 70%, 60%)"},string:{color:"hsl(75, 70%, 60%)"},char:{color:"hsl(75, 70%, 60%)"},builtin:{color:"hsl(75, 70%, 60%)"},inserted:{color:"hsl(75, 70%, 60%)"},operator:{color:"hsl(40, 90%, 60%)"},entity:{color:"hsl(40, 90%, 60%)",cursor:"help"},url:{color:"hsl(40, 90%, 60%)"},".language-css .token.string":{color:"hsl(40, 90%, 60%)"},".style .token.string":{color:"hsl(40, 90%, 60%)"},variable:{color:"hsl(40, 90%, 60%)"},atrule:{color:"hsl(350, 40%, 70%)"},"attr-value":{color:"hsl(350, 40%, 70%)"},keyword:{color:"hsl(350, 40%, 70%)"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},deleted:{color:"red"}}}(b8)),b8}var x8={},CG;function qGe(){return CG||(CG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"black",color:"white",boxShadow:"-.3em 0 0 .3em black, .3em 0 0 .3em black"},'pre[class*="language-"]':{fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:".4em .8em",margin:".5em 0",overflow:"auto",background:`url('data:image/svg+xml;charset=utf-8,<svg%20version%3D"1.1"%20xmlns%3D"http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg"%20width%3D"100"%20height%3D"100"%20fill%3D"rgba(0%2C0%2C0%2C.2)">%0D%0A<polygon%20points%3D"0%2C50%2050%2C0%200%2C0"%20%2F>%0D%0A<polygon%20points%3D"0%2C100%2050%2C100%20100%2C50%20100%2C0"%20%2F>%0D%0A<%2Fsvg>')`,backgroundSize:"1em 1em"},':not(pre) > code[class*="language-"]':{padding:".2em",borderRadius:".3em",boxShadow:"none",whiteSpace:"normal"},comment:{color:"#aaa"},prolog:{color:"#aaa"},doctype:{color:"#aaa"},cdata:{color:"#aaa"},punctuation:{color:"#999"},namespace:{Opacity:".7"},property:{color:"#0cf"},tag:{color:"#0cf"},boolean:{color:"#0cf"},number:{color:"#0cf"},constant:{color:"#0cf"},symbol:{color:"#0cf"},selector:{color:"yellow"},"attr-name":{color:"yellow"},string:{color:"yellow"},char:{color:"yellow"},builtin:{color:"yellow"},operator:{color:"yellowgreen"},entity:{color:"yellowgreen",cursor:"help"},url:{color:"yellowgreen"},".language-css .token.string":{color:"yellowgreen"},variable:{color:"yellowgreen"},inserted:{color:"yellowgreen"},atrule:{color:"deeppink"},"attr-value":{color:"deeppink"},keyword:{color:"deeppink"},regex:{color:"orange"},important:{color:"orange",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},deleted:{color:"red"},"pre.diff-highlight.diff-highlight > code .token.deleted:not(.prefix)":{backgroundColor:"rgba(255, 0, 0, .3)",display:"inline"},"pre > code.diff-highlight.diff-highlight .token.deleted:not(.prefix)":{backgroundColor:"rgba(255, 0, 0, .3)",display:"inline"},"pre.diff-highlight.diff-highlight > code .token.inserted:not(.prefix)":{backgroundColor:"rgba(0, 255, 128, .3)",display:"inline"},"pre > code.diff-highlight.diff-highlight .token.inserted:not(.prefix)":{backgroundColor:"rgba(0, 255, 128, .3)",display:"inline"}}}(x8)),x8}var v8={},kG;function GGe(){return kG||(kG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#f8f8f2",background:"none",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#f8f8f2",background:"#272822",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",borderRadius:"0.3em"},':not(pre) > code[class*="language-"]':{background:"#272822",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"#8292a2"},prolog:{color:"#8292a2"},doctype:{color:"#8292a2"},cdata:{color:"#8292a2"},punctuation:{color:"#f8f8f2"},namespace:{Opacity:".7"},property:{color:"#f92672"},tag:{color:"#f92672"},constant:{color:"#f92672"},symbol:{color:"#f92672"},deleted:{color:"#f92672"},boolean:{color:"#ae81ff"},number:{color:"#ae81ff"},selector:{color:"#a6e22e"},"attr-name":{color:"#a6e22e"},string:{color:"#a6e22e"},char:{color:"#a6e22e"},builtin:{color:"#a6e22e"},inserted:{color:"#a6e22e"},operator:{color:"#f8f8f2"},entity:{color:"#f8f8f2",cursor:"help"},url:{color:"#f8f8f2"},".language-css .token.string":{color:"#f8f8f2"},".style .token.string":{color:"#f8f8f2"},variable:{color:"#f8f8f2"},atrule:{color:"#e6db74"},"attr-value":{color:"#e6db74"},function:{color:"#e6db74"},"class-name":{color:"#e6db74"},keyword:{color:"#66d9ef"},regex:{color:"#fd971f"},important:{color:"#fd971f",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(v8)),v8}var w8={},EG;function YGe(){return EG||(EG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#657b83",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#657b83",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",borderRadius:"0.3em",backgroundColor:"#fdf6e3"},'pre[class*="language-"]::-moz-selection':{background:"#073642"},'pre[class*="language-"] ::-moz-selection':{background:"#073642"},'code[class*="language-"]::-moz-selection':{background:"#073642"},'code[class*="language-"] ::-moz-selection':{background:"#073642"},'pre[class*="language-"]::selection':{background:"#073642"},'pre[class*="language-"] ::selection':{background:"#073642"},'code[class*="language-"]::selection':{background:"#073642"},'code[class*="language-"] ::selection':{background:"#073642"},':not(pre) > code[class*="language-"]':{backgroundColor:"#fdf6e3",padding:".1em",borderRadius:".3em"},comment:{color:"#93a1a1"},prolog:{color:"#93a1a1"},doctype:{color:"#93a1a1"},cdata:{color:"#93a1a1"},punctuation:{color:"#586e75"},namespace:{Opacity:".7"},property:{color:"#268bd2"},tag:{color:"#268bd2"},boolean:{color:"#268bd2"},number:{color:"#268bd2"},constant:{color:"#268bd2"},symbol:{color:"#268bd2"},deleted:{color:"#268bd2"},selector:{color:"#2aa198"},"attr-name":{color:"#2aa198"},string:{color:"#2aa198"},char:{color:"#2aa198"},builtin:{color:"#2aa198"},url:{color:"#2aa198"},inserted:{color:"#2aa198"},entity:{color:"#657b83",background:"#eee8d5",cursor:"help"},atrule:{color:"#859900"},"attr-value":{color:"#859900"},keyword:{color:"#859900"},function:{color:"#b58900"},"class-name":{color:"#b58900"},regex:{color:"#cb4b16"},important:{color:"#cb4b16",fontWeight:"bold"},variable:{color:"#cb4b16"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(w8)),w8}var S8={},DG;function KGe(){return DG||(DG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#ccc",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#ccc",background:"#2d2d2d",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto"},':not(pre) > code[class*="language-"]':{background:"#2d2d2d",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"#999"},"block-comment":{color:"#999"},prolog:{color:"#999"},doctype:{color:"#999"},cdata:{color:"#999"},punctuation:{color:"#ccc"},tag:{color:"#e2777a"},"attr-name":{color:"#e2777a"},namespace:{color:"#e2777a"},deleted:{color:"#e2777a"},"function-name":{color:"#6196cc"},boolean:{color:"#f08d49"},number:{color:"#f08d49"},function:{color:"#f08d49"},property:{color:"#f8c555"},"class-name":{color:"#f8c555"},constant:{color:"#f8c555"},symbol:{color:"#f8c555"},selector:{color:"#cc99cd"},important:{color:"#cc99cd",fontWeight:"bold"},atrule:{color:"#cc99cd"},keyword:{color:"#cc99cd"},builtin:{color:"#cc99cd"},string:{color:"#7ec699"},char:{color:"#7ec699"},"attr-value":{color:"#7ec699"},regex:{color:"#7ec699"},variable:{color:"#7ec699"},operator:{color:"#67cdcc"},entity:{color:"#67cdcc",cursor:"help"},url:{color:"#67cdcc"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},inserted:{color:"green"}}}(S8)),S8}var C8={},AG;function XGe(){return AG||(AG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"white",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",textShadow:"0 -.1em .2em black",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"white",background:"hsl(0, 0%, 8%)",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",textShadow:"0 -.1em .2em black",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",borderRadius:".5em",border:".3em solid hsl(0, 0%, 33%)",boxShadow:"1px 1px .5em black inset",margin:".5em 0",overflow:"auto",padding:"1em"},':not(pre) > code[class*="language-"]':{background:"hsl(0, 0%, 8%)",borderRadius:".3em",border:".13em solid hsl(0, 0%, 33%)",boxShadow:"1px 1px .3em -.1em black inset",padding:".15em .2em .05em",whiteSpace:"normal"},'pre[class*="language-"]::-moz-selection':{background:"hsla(0, 0%, 93%, 0.15)",textShadow:"none"},'pre[class*="language-"]::selection':{background:"hsla(0, 0%, 93%, 0.15)",textShadow:"none"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"hsla(0, 0%, 93%, 0.15)"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"hsla(0, 0%, 93%, 0.15)"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"hsla(0, 0%, 93%, 0.15)"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"hsla(0, 0%, 93%, 0.15)"},'code[class*="language-"]::selection':{textShadow:"none",background:"hsla(0, 0%, 93%, 0.15)"},'code[class*="language-"] ::selection':{textShadow:"none",background:"hsla(0, 0%, 93%, 0.15)"},comment:{color:"hsl(0, 0%, 47%)"},prolog:{color:"hsl(0, 0%, 47%)"},doctype:{color:"hsl(0, 0%, 47%)"},cdata:{color:"hsl(0, 0%, 47%)"},punctuation:{Opacity:".7"},namespace:{Opacity:".7"},tag:{color:"hsl(14, 58%, 55%)"},boolean:{color:"hsl(14, 58%, 55%)"},number:{color:"hsl(14, 58%, 55%)"},deleted:{color:"hsl(14, 58%, 55%)"},keyword:{color:"hsl(53, 89%, 79%)"},property:{color:"hsl(53, 89%, 79%)"},selector:{color:"hsl(53, 89%, 79%)"},constant:{color:"hsl(53, 89%, 79%)"},symbol:{color:"hsl(53, 89%, 79%)"},builtin:{color:"hsl(53, 89%, 79%)"},"attr-name":{color:"hsl(76, 21%, 52%)"},"attr-value":{color:"hsl(76, 21%, 52%)"},string:{color:"hsl(76, 21%, 52%)"},char:{color:"hsl(76, 21%, 52%)"},operator:{color:"hsl(76, 21%, 52%)"},entity:{color:"hsl(76, 21%, 52%)",cursor:"help"},url:{color:"hsl(76, 21%, 52%)"},".language-css .token.string":{color:"hsl(76, 21%, 52%)"},".style .token.string":{color:"hsl(76, 21%, 52%)"},variable:{color:"hsl(76, 21%, 52%)"},inserted:{color:"hsl(76, 21%, 52%)"},atrule:{color:"hsl(218, 22%, 55%)"},regex:{color:"hsl(42, 75%, 65%)"},important:{color:"hsl(42, 75%, 65%)",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},".language-markup .token.tag":{color:"hsl(33, 33%, 52%)"},".language-markup .token.attr-name":{color:"hsl(33, 33%, 52%)"},".language-markup .token.punctuation":{color:"hsl(33, 33%, 52%)"},"":{position:"relative",zIndex:"1"},".line-highlight.line-highlight":{background:"linear-gradient(to right, hsla(0, 0%, 33%, .1) 70%, hsla(0, 0%, 33%, 0))",borderBottom:"1px dashed hsl(0, 0%, 33%)",borderTop:"1px dashed hsl(0, 0%, 33%)",marginTop:"0.75em",zIndex:"0"},".line-highlight.line-highlight:before":{backgroundColor:"hsl(215, 15%, 59%)",color:"hsl(24, 20%, 95%)"},".line-highlight.line-highlight[data-end]:after":{backgroundColor:"hsl(215, 15%, 59%)",color:"hsl(24, 20%, 95%)"}}}(C8)),C8}var k8={},TG;function JGe(){return TG||(TG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"black",background:"none",textShadow:"0 1px white",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"black",background:"#f5f2f0",textShadow:"0 1px white",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"]::selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#b3d4fc"},':not(pre) > code[class*="language-"]':{background:"#f5f2f0",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"slategray"},prolog:{color:"slategray"},doctype:{color:"slategray"},cdata:{color:"slategray"},punctuation:{color:"#999"},namespace:{Opacity:".7"},property:{color:"#905"},tag:{color:"#905"},boolean:{color:"#905"},number:{color:"#905"},constant:{color:"#905"},symbol:{color:"#905"},deleted:{color:"#905"},selector:{color:"#690"},"attr-name":{color:"#690"},string:{color:"#690"},char:{color:"#690"},builtin:{color:"#690"},inserted:{color:"#690"},operator:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},entity:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)",cursor:"help"},url:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".language-css .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".style .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},atrule:{color:"#07a"},"attr-value":{color:"#07a"},keyword:{color:"#07a"},function:{color:"#DD4A68"},"class-name":{color:"#DD4A68"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"bold"},variable:{color:"#e90"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(k8)),k8}var E8={},_G;function ZGe(){return _G||(_G=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#f8f8f2",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#f8f8f2",background:"#2b2b2b",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},':not(pre) > code[class*="language-"]':{background:"#2b2b2b",padding:"0.1em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"#d4d0ab"},prolog:{color:"#d4d0ab"},doctype:{color:"#d4d0ab"},cdata:{color:"#d4d0ab"},punctuation:{color:"#fefefe"},property:{color:"#ffa07a"},tag:{color:"#ffa07a"},constant:{color:"#ffa07a"},symbol:{color:"#ffa07a"},deleted:{color:"#ffa07a"},boolean:{color:"#00e0e0"},number:{color:"#00e0e0"},selector:{color:"#abe338"},"attr-name":{color:"#abe338"},string:{color:"#abe338"},char:{color:"#abe338"},builtin:{color:"#abe338"},inserted:{color:"#abe338"},operator:{color:"#00e0e0"},entity:{color:"#00e0e0",cursor:"help"},url:{color:"#00e0e0"},".language-css .token.string":{color:"#00e0e0"},".style .token.string":{color:"#00e0e0"},variable:{color:"#00e0e0"},atrule:{color:"#ffd700"},"attr-value":{color:"#ffd700"},function:{color:"#ffd700"},keyword:{color:"#00e0e0"},regex:{color:"#ffd700"},important:{color:"#ffd700",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(E8)),E8}var D8={},NG;function QGe(){return NG||(NG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#c5c8c6",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#c5c8c6",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",borderRadius:"0.3em",background:"#1d1f21"},':not(pre) > code[class*="language-"]':{background:"#1d1f21",padding:".1em",borderRadius:".3em"},comment:{color:"#7C7C7C"},prolog:{color:"#7C7C7C"},doctype:{color:"#7C7C7C"},cdata:{color:"#7C7C7C"},punctuation:{color:"#c5c8c6"},".namespace":{Opacity:".7"},property:{color:"#96CBFE"},keyword:{color:"#96CBFE"},tag:{color:"#96CBFE"},"class-name":{color:"#FFFFB6",textDecoration:"underline"},boolean:{color:"#99CC99"},constant:{color:"#99CC99"},symbol:{color:"#f92672"},deleted:{color:"#f92672"},number:{color:"#FF73FD"},selector:{color:"#A8FF60"},"attr-name":{color:"#A8FF60"},string:{color:"#A8FF60"},char:{color:"#A8FF60"},builtin:{color:"#A8FF60"},inserted:{color:"#A8FF60"},variable:{color:"#C6C5FE"},operator:{color:"#EDEDED"},entity:{color:"#FFFFB6",cursor:"help"},url:{color:"#96CBFE"},".language-css .token.string":{color:"#87C38A"},".style .token.string":{color:"#87C38A"},atrule:{color:"#F9EE98"},"attr-value":{color:"#F9EE98"},function:{color:"#DAD085"},regex:{color:"#E9C062"},important:{color:"#fd971f",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(D8)),D8}var A8={},PG;function eYe(){return PG||(PG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#f5f7ff",color:"#5e6687"},'pre[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#f5f7ff",color:"#5e6687",padding:"1em",margin:".5em 0",overflow:"auto"},'pre > code[class*="language-"]':{fontSize:"1em"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#dfe2f1"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#dfe2f1"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#dfe2f1"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#dfe2f1"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#dfe2f1"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#dfe2f1"},'code[class*="language-"]::selection':{textShadow:"none",background:"#dfe2f1"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#dfe2f1"},':not(pre) > code[class*="language-"]':{padding:".1em",borderRadius:".3em"},comment:{color:"#898ea4"},prolog:{color:"#898ea4"},doctype:{color:"#898ea4"},cdata:{color:"#898ea4"},punctuation:{color:"#5e6687"},namespace:{Opacity:".7"},operator:{color:"#c76b29"},boolean:{color:"#c76b29"},number:{color:"#c76b29"},property:{color:"#c08b30"},tag:{color:"#3d8fd1"},string:{color:"#22a2c9"},selector:{color:"#6679cc"},"attr-name":{color:"#c76b29"},entity:{color:"#22a2c9",cursor:"help"},url:{color:"#22a2c9"},".language-css .token.string":{color:"#22a2c9"},".style .token.string":{color:"#22a2c9"},"attr-value":{color:"#ac9739"},keyword:{color:"#ac9739"},control:{color:"#ac9739"},directive:{color:"#ac9739"},unit:{color:"#ac9739"},statement:{color:"#22a2c9"},regex:{color:"#22a2c9"},atrule:{color:"#22a2c9"},placeholder:{color:"#3d8fd1"},variable:{color:"#3d8fd1"},deleted:{textDecoration:"line-through"},inserted:{borderBottom:"1px dotted #202746",textDecoration:"none"},italic:{fontStyle:"italic"},important:{fontWeight:"bold",color:"#c94922"},bold:{fontWeight:"bold"},"pre > code.highlight":{Outline:"0.4em solid #c94922",OutlineOffset:".4em"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"#dfe2f1"},".line-numbers .line-numbers-rows > span:before":{color:"#979db4"},".line-highlight.line-highlight":{background:"linear-gradient(to right, rgba(107, 115, 148, 0.2) 70%, rgba(107, 115, 148, 0))"}}}(A8)),A8}var T8={},MG;function tYe(){return MG||(MG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#fff",textShadow:"0 1px 1px #000",fontFamily:'Menlo, Monaco, "Courier New", monospace',direction:"ltr",textAlign:"left",wordSpacing:"normal",whiteSpace:"pre",wordWrap:"normal",lineHeight:"1.4",background:"none",border:"0",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#fff",textShadow:"0 1px 1px #000",fontFamily:'Menlo, Monaco, "Courier New", monospace',direction:"ltr",textAlign:"left",wordSpacing:"normal",whiteSpace:"pre",wordWrap:"normal",lineHeight:"1.4",background:"#222",border:"0",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"15px",margin:"1em 0",overflow:"auto",MozBorderRadius:"8px",WebkitBorderRadius:"8px",borderRadius:"8px"},'pre[class*="language-"] code':{float:"left",padding:"0 15px 0 0"},':not(pre) > code[class*="language-"]':{background:"#222",padding:"5px 10px",lineHeight:"1",MozBorderRadius:"3px",WebkitBorderRadius:"3px",borderRadius:"3px"},comment:{color:"#797979"},prolog:{color:"#797979"},doctype:{color:"#797979"},cdata:{color:"#797979"},selector:{color:"#fff"},operator:{color:"#fff"},punctuation:{color:"#fff"},namespace:{Opacity:".7"},tag:{color:"#ffd893"},boolean:{color:"#ffd893"},atrule:{color:"#B0C975"},"attr-value":{color:"#B0C975"},hex:{color:"#B0C975"},string:{color:"#B0C975"},property:{color:"#c27628"},entity:{color:"#c27628",cursor:"help"},url:{color:"#c27628"},"attr-name":{color:"#c27628"},keyword:{color:"#c27628"},regex:{color:"#9B71C6"},function:{color:"#e5a638"},constant:{color:"#e5a638"},variable:{color:"#fdfba8"},number:{color:"#8799B0"},important:{color:"#E45734"},deliminator:{color:"#E45734"},".line-highlight.line-highlight":{background:"rgba(255, 255, 255, .2)"},".line-highlight.line-highlight:before":{top:".3em",backgroundColor:"rgba(255, 255, 255, .3)",color:"#fff",MozBorderRadius:"8px",WebkitBorderRadius:"8px",borderRadius:"8px"},".line-highlight.line-highlight[data-end]:after":{top:".3em",backgroundColor:"rgba(255, 255, 255, .3)",color:"#fff",MozBorderRadius:"8px",WebkitBorderRadius:"8px",borderRadius:"8px"},".line-numbers .line-numbers-rows > span":{borderRight:"3px #d9d336 solid"}}}(T8)),T8}var _8={},jG;function nYe(){return jG||(jG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#111b27",background:"none",fontFamily:'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#111b27",background:"#e3eaf2",fontFamily:'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto"},'pre[class*="language-"]::-moz-selection':{background:"#8da1b9"},'pre[class*="language-"] ::-moz-selection':{background:"#8da1b9"},'code[class*="language-"]::-moz-selection':{background:"#8da1b9"},'code[class*="language-"] ::-moz-selection':{background:"#8da1b9"},'pre[class*="language-"]::selection':{background:"#8da1b9"},'pre[class*="language-"] ::selection':{background:"#8da1b9"},'code[class*="language-"]::selection':{background:"#8da1b9"},'code[class*="language-"] ::selection':{background:"#8da1b9"},':not(pre) > code[class*="language-"]':{background:"#e3eaf2",padding:"0.1em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"#3c526d"},prolog:{color:"#3c526d"},doctype:{color:"#3c526d"},cdata:{color:"#3c526d"},punctuation:{color:"#111b27"},"delimiter.important":{color:"#006d6d",fontWeight:"inherit"},"selector.parent":{color:"#006d6d"},tag:{color:"#006d6d"},"tag.punctuation":{color:"#006d6d"},"attr-name":{color:"#755f00"},boolean:{color:"#755f00"},"boolean.important":{color:"#755f00"},number:{color:"#755f00"},constant:{color:"#755f00"},"selector.attribute":{color:"#755f00"},"class-name":{color:"#005a8e"},key:{color:"#005a8e"},parameter:{color:"#005a8e"},property:{color:"#005a8e"},"property-access":{color:"#005a8e"},variable:{color:"#005a8e"},"attr-value":{color:"#116b00"},inserted:{color:"#116b00"},color:{color:"#116b00"},"selector.value":{color:"#116b00"},string:{color:"#116b00"},"string.url-link":{color:"#116b00"},builtin:{color:"#af00af"},"keyword-array":{color:"#af00af"},package:{color:"#af00af"},regex:{color:"#af00af"},function:{color:"#7c00aa"},"selector.class":{color:"#7c00aa"},"selector.id":{color:"#7c00aa"},"atrule.rule":{color:"#a04900"},combinator:{color:"#a04900"},keyword:{color:"#a04900"},operator:{color:"#a04900"},"pseudo-class":{color:"#a04900"},"pseudo-element":{color:"#a04900"},selector:{color:"#a04900"},unit:{color:"#a04900"},deleted:{color:"#c22f2e"},important:{color:"#c22f2e",fontWeight:"bold"},"keyword-this":{color:"#005a8e",fontWeight:"bold"},this:{color:"#005a8e",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},entity:{cursor:"help"},".language-markdown .token.title":{color:"#005a8e",fontWeight:"bold"},".language-markdown .token.title .token.punctuation":{color:"#005a8e",fontWeight:"bold"},".language-markdown .token.blockquote.punctuation":{color:"#af00af"},".language-markdown .token.code":{color:"#006d6d"},".language-markdown .token.hr.punctuation":{color:"#005a8e"},".language-markdown .token.url > .token.content":{color:"#116b00"},".language-markdown .token.url-link":{color:"#755f00"},".language-markdown .token.list.punctuation":{color:"#af00af"},".language-markdown .token.table-header":{color:"#111b27"},".language-json .token.operator":{color:"#111b27"},".language-scss .token.variable":{color:"#006d6d"},"token.tab:not(:empty):before":{color:"#3c526d"},"token.cr:before":{color:"#3c526d"},"token.lf:before":{color:"#3c526d"},"token.space:before":{color:"#3c526d"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{color:"#e3eaf2",background:"#005a8e"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{color:"#e3eaf2",background:"#005a8e"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{color:"#e3eaf2",background:"#005a8eda",textDecoration:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{color:"#e3eaf2",background:"#005a8eda",textDecoration:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{color:"#e3eaf2",background:"#005a8eda",textDecoration:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{color:"#e3eaf2",background:"#005a8eda",textDecoration:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{color:"#e3eaf2",background:"#3c526d"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{color:"#e3eaf2",background:"#3c526d"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{color:"#e3eaf2",background:"#3c526d"},".line-highlight.line-highlight":{background:"linear-gradient(to right, #8da1b92f 70%, #8da1b925)"},".line-highlight.line-highlight:before":{backgroundColor:"#3c526d",color:"#e3eaf2",boxShadow:"0 1px #8da1b9"},".line-highlight.line-highlight[data-end]:after":{backgroundColor:"#3c526d",color:"#e3eaf2",boxShadow:"0 1px #8da1b9"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"#3c526d1f"},".line-numbers.line-numbers .line-numbers-rows":{borderRight:"1px solid #8da1b97a",background:"#d0dae77a"},".line-numbers .line-numbers-rows > span:before":{color:"#3c526dda"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"#755f00"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"#755f00"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"#755f00"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"#af00af"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"#af00af"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"#af00af"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"#005a8e"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"#005a8e"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"#005a8e"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"#7c00aa"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"#7c00aa"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"#7c00aa"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"#c22f2e1f"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"#c22f2e1f"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"#116b001f"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"#116b001f"},".command-line .command-line-prompt":{borderRight:"1px solid #8da1b97a"},".command-line .command-line-prompt > span:before":{color:"#3c526dda"}}}(_8)),_8}var N8={},FG;function rYe(){return FG||(FG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#e3eaf2",background:"none",fontFamily:'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#e3eaf2",background:"#111b27",fontFamily:'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto"},'pre[class*="language-"]::-moz-selection':{background:"#3c526d"},'pre[class*="language-"] ::-moz-selection':{background:"#3c526d"},'code[class*="language-"]::-moz-selection':{background:"#3c526d"},'code[class*="language-"] ::-moz-selection':{background:"#3c526d"},'pre[class*="language-"]::selection':{background:"#3c526d"},'pre[class*="language-"] ::selection':{background:"#3c526d"},'code[class*="language-"]::selection':{background:"#3c526d"},'code[class*="language-"] ::selection':{background:"#3c526d"},':not(pre) > code[class*="language-"]':{background:"#111b27",padding:"0.1em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"#8da1b9"},prolog:{color:"#8da1b9"},doctype:{color:"#8da1b9"},cdata:{color:"#8da1b9"},punctuation:{color:"#e3eaf2"},"delimiter.important":{color:"#66cccc",fontWeight:"inherit"},"selector.parent":{color:"#66cccc"},tag:{color:"#66cccc"},"tag.punctuation":{color:"#66cccc"},"attr-name":{color:"#e6d37a"},boolean:{color:"#e6d37a"},"boolean.important":{color:"#e6d37a"},number:{color:"#e6d37a"},constant:{color:"#e6d37a"},"selector.attribute":{color:"#e6d37a"},"class-name":{color:"#6cb8e6"},key:{color:"#6cb8e6"},parameter:{color:"#6cb8e6"},property:{color:"#6cb8e6"},"property-access":{color:"#6cb8e6"},variable:{color:"#6cb8e6"},"attr-value":{color:"#91d076"},inserted:{color:"#91d076"},color:{color:"#91d076"},"selector.value":{color:"#91d076"},string:{color:"#91d076"},"string.url-link":{color:"#91d076"},builtin:{color:"#f4adf4"},"keyword-array":{color:"#f4adf4"},package:{color:"#f4adf4"},regex:{color:"#f4adf4"},function:{color:"#c699e3"},"selector.class":{color:"#c699e3"},"selector.id":{color:"#c699e3"},"atrule.rule":{color:"#e9ae7e"},combinator:{color:"#e9ae7e"},keyword:{color:"#e9ae7e"},operator:{color:"#e9ae7e"},"pseudo-class":{color:"#e9ae7e"},"pseudo-element":{color:"#e9ae7e"},selector:{color:"#e9ae7e"},unit:{color:"#e9ae7e"},deleted:{color:"#cd6660"},important:{color:"#cd6660",fontWeight:"bold"},"keyword-this":{color:"#6cb8e6",fontWeight:"bold"},this:{color:"#6cb8e6",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},entity:{cursor:"help"},".language-markdown .token.title":{color:"#6cb8e6",fontWeight:"bold"},".language-markdown .token.title .token.punctuation":{color:"#6cb8e6",fontWeight:"bold"},".language-markdown .token.blockquote.punctuation":{color:"#f4adf4"},".language-markdown .token.code":{color:"#66cccc"},".language-markdown .token.hr.punctuation":{color:"#6cb8e6"},".language-markdown .token.url .token.content":{color:"#91d076"},".language-markdown .token.url-link":{color:"#e6d37a"},".language-markdown .token.list.punctuation":{color:"#f4adf4"},".language-markdown .token.table-header":{color:"#e3eaf2"},".language-json .token.operator":{color:"#e3eaf2"},".language-scss .token.variable":{color:"#66cccc"},"token.tab:not(:empty):before":{color:"#8da1b9"},"token.cr:before":{color:"#8da1b9"},"token.lf:before":{color:"#8da1b9"},"token.space:before":{color:"#8da1b9"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{color:"#111b27",background:"#6cb8e6"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{color:"#111b27",background:"#6cb8e6"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{color:"#111b27",background:"#6cb8e6da",textDecoration:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{color:"#111b27",background:"#6cb8e6da",textDecoration:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{color:"#111b27",background:"#6cb8e6da",textDecoration:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{color:"#111b27",background:"#6cb8e6da",textDecoration:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{color:"#111b27",background:"#8da1b9"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{color:"#111b27",background:"#8da1b9"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{color:"#111b27",background:"#8da1b9"},".line-highlight.line-highlight":{background:"linear-gradient(to right, #3c526d5f 70%, #3c526d55)"},".line-highlight.line-highlight:before":{backgroundColor:"#8da1b9",color:"#111b27",boxShadow:"0 1px #3c526d"},".line-highlight.line-highlight[data-end]:after":{backgroundColor:"#8da1b9",color:"#111b27",boxShadow:"0 1px #3c526d"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"#8da1b918"},".line-numbers.line-numbers .line-numbers-rows":{borderRight:"1px solid #0b121b",background:"#0b121b7a"},".line-numbers .line-numbers-rows > span:before":{color:"#8da1b9da"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"#e6d37a"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"#e6d37a"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"#e6d37a"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"#f4adf4"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"#f4adf4"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"#f4adf4"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"#6cb8e6"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"#6cb8e6"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"#6cb8e6"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"#c699e3"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"#c699e3"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"#c699e3"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"#cd66601f"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"#cd66601f"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"#91d0761f"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"#91d0761f"},".command-line .command-line-prompt":{borderRight:"1px solid #0b121b"},".command-line .command-line-prompt > span:before":{color:"#8da1b9da"}}}(N8)),N8}var P8={},IG;function sYe(){return IG||(IG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"black",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"black",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",position:"relative",borderLeft:"10px solid #358ccb",boxShadow:"-1px 0 0 0 #358ccb, 0 0 0 1px #dfdfdf",backgroundColor:"#fdfdfd",backgroundImage:"linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%)",backgroundSize:"3em 3em",backgroundOrigin:"content-box",backgroundAttachment:"local",margin:".5em 0",padding:"0 1em"},'pre[class*="language-"] > code':{display:"block"},':not(pre) > code[class*="language-"]':{position:"relative",padding:".2em",borderRadius:"0.3em",color:"#c92c2c",border:"1px solid rgba(0, 0, 0, 0.1)",display:"inline",whiteSpace:"normal",backgroundColor:"#fdfdfd",WebkitBoxSizing:"border-box",MozBoxSizing:"border-box",boxSizing:"border-box"},comment:{color:"#7D8B99"},"block-comment":{color:"#7D8B99"},prolog:{color:"#7D8B99"},doctype:{color:"#7D8B99"},cdata:{color:"#7D8B99"},punctuation:{color:"#5F6364"},property:{color:"#c92c2c"},tag:{color:"#c92c2c"},boolean:{color:"#c92c2c"},number:{color:"#c92c2c"},"function-name":{color:"#c92c2c"},constant:{color:"#c92c2c"},symbol:{color:"#c92c2c"},deleted:{color:"#c92c2c"},selector:{color:"#2f9c0a"},"attr-name":{color:"#2f9c0a"},string:{color:"#2f9c0a"},char:{color:"#2f9c0a"},function:{color:"#2f9c0a"},builtin:{color:"#2f9c0a"},inserted:{color:"#2f9c0a"},operator:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},entity:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)",cursor:"help"},url:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},variable:{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},atrule:{color:"#1990b8"},"attr-value":{color:"#1990b8"},keyword:{color:"#1990b8"},"class-name":{color:"#1990b8"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"normal"},".language-css .token.string":{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},".style .token.string":{color:"#a67f59",background:"rgba(255, 255, 255, 0.5)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:".7"}}}(P8)),P8}var M8={},OG;function iYe(){return OG||(OG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#a9b7c6",fontFamily:"Consolas, Monaco, 'Andale Mono', monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#a9b7c6",fontFamily:"Consolas, Monaco, 'Andale Mono', monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",background:"#2b2b2b"},'pre[class*="language-"]::-moz-selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'pre[class*="language-"] ::-moz-selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'code[class*="language-"]::-moz-selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'code[class*="language-"] ::-moz-selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'pre[class*="language-"]::selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'pre[class*="language-"] ::selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'code[class*="language-"]::selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},'code[class*="language-"] ::selection':{color:"inherit",background:"rgba(33, 66, 131, .85)"},':not(pre) > code[class*="language-"]':{background:"#2b2b2b",padding:".1em",borderRadius:".3em"},comment:{color:"#808080"},prolog:{color:"#808080"},cdata:{color:"#808080"},delimiter:{color:"#cc7832"},boolean:{color:"#cc7832"},keyword:{color:"#cc7832"},selector:{color:"#cc7832"},important:{color:"#cc7832"},atrule:{color:"#cc7832"},operator:{color:"#a9b7c6"},punctuation:{color:"#a9b7c6"},"attr-name":{color:"#a9b7c6"},tag:{color:"#e8bf6a"},"tag.punctuation":{color:"#e8bf6a"},doctype:{color:"#e8bf6a"},builtin:{color:"#e8bf6a"},entity:{color:"#6897bb"},number:{color:"#6897bb"},symbol:{color:"#6897bb"},property:{color:"#9876aa"},constant:{color:"#9876aa"},variable:{color:"#9876aa"},string:{color:"#6a8759"},char:{color:"#6a8759"},"attr-value":{color:"#a5c261"},"attr-value.punctuation":{color:"#a5c261"},"attr-value.punctuation:first-child":{color:"#a9b7c6"},url:{color:"#287bde",textDecoration:"underline"},function:{color:"#ffc66d"},regex:{background:"#364135"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},inserted:{background:"#294436"},deleted:{background:"#484a4a"},"code.language-css .token.property":{color:"#a9b7c6"},"code.language-css .token.property + .token.punctuation":{color:"#a9b7c6"},"code.language-css .token.id":{color:"#ffc66d"},"code.language-css .token.selector > .token.class":{color:"#ffc66d"},"code.language-css .token.selector > .token.attribute":{color:"#ffc66d"},"code.language-css .token.selector > .token.pseudo-class":{color:"#ffc66d"},"code.language-css .token.selector > .token.pseudo-element":{color:"#ffc66d"}}}(M8)),M8}var j8={},RG;function oYe(){return RG||(RG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#f8f8f2",background:"none",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#f8f8f2",background:"#282a36",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",borderRadius:"0.3em"},':not(pre) > code[class*="language-"]':{background:"#282a36",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"#6272a4"},prolog:{color:"#6272a4"},doctype:{color:"#6272a4"},cdata:{color:"#6272a4"},punctuation:{color:"#f8f8f2"},".namespace":{Opacity:".7"},property:{color:"#ff79c6"},tag:{color:"#ff79c6"},constant:{color:"#ff79c6"},symbol:{color:"#ff79c6"},deleted:{color:"#ff79c6"},boolean:{color:"#bd93f9"},number:{color:"#bd93f9"},selector:{color:"#50fa7b"},"attr-name":{color:"#50fa7b"},string:{color:"#50fa7b"},char:{color:"#50fa7b"},builtin:{color:"#50fa7b"},inserted:{color:"#50fa7b"},operator:{color:"#f8f8f2"},entity:{color:"#f8f8f2",cursor:"help"},url:{color:"#f8f8f2"},".language-css .token.string":{color:"#f8f8f2"},".style .token.string":{color:"#f8f8f2"},variable:{color:"#f8f8f2"},atrule:{color:"#f1fa8c"},"attr-value":{color:"#f1fa8c"},function:{color:"#f1fa8c"},"class-name":{color:"#f1fa8c"},keyword:{color:"#8be9fd"},regex:{color:"#ffb86c"},important:{color:"#ffb86c",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(j8)),j8}var F8={},LG;function aYe(){return LG||(LG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#2a2734",color:"#9a86fd"},'pre[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#2a2734",color:"#9a86fd",padding:"1em",margin:".5em 0",overflow:"auto"},'pre > code[class*="language-"]':{fontSize:"1em"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#6a51e6"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#6a51e6"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#6a51e6"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#6a51e6"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#6a51e6"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#6a51e6"},'code[class*="language-"]::selection':{textShadow:"none",background:"#6a51e6"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#6a51e6"},':not(pre) > code[class*="language-"]':{padding:".1em",borderRadius:".3em"},comment:{color:"#6c6783"},prolog:{color:"#6c6783"},doctype:{color:"#6c6783"},cdata:{color:"#6c6783"},punctuation:{color:"#6c6783"},namespace:{Opacity:".7"},tag:{color:"#e09142"},operator:{color:"#e09142"},number:{color:"#e09142"},property:{color:"#9a86fd"},function:{color:"#9a86fd"},"tag-id":{color:"#eeebff"},selector:{color:"#eeebff"},"atrule-id":{color:"#eeebff"},"code.language-javascript":{color:"#c4b9fe"},"attr-name":{color:"#c4b9fe"},"code.language-css":{color:"#ffcc99"},"code.language-scss":{color:"#ffcc99"},boolean:{color:"#ffcc99"},string:{color:"#ffcc99"},entity:{color:"#ffcc99",cursor:"help"},url:{color:"#ffcc99"},".language-css .token.string":{color:"#ffcc99"},".language-scss .token.string":{color:"#ffcc99"},".style .token.string":{color:"#ffcc99"},"attr-value":{color:"#ffcc99"},keyword:{color:"#ffcc99"},control:{color:"#ffcc99"},directive:{color:"#ffcc99"},unit:{color:"#ffcc99"},statement:{color:"#ffcc99"},regex:{color:"#ffcc99"},atrule:{color:"#ffcc99"},placeholder:{color:"#ffcc99"},variable:{color:"#ffcc99"},deleted:{textDecoration:"line-through"},inserted:{borderBottom:"1px dotted #eeebff",textDecoration:"none"},italic:{fontStyle:"italic"},important:{fontWeight:"bold",color:"#c4b9fe"},bold:{fontWeight:"bold"},"pre > code.highlight":{Outline:".4em solid #8a75f5",OutlineOffset:".4em"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"#2c2937"},".line-numbers .line-numbers-rows > span:before":{color:"#3c3949"},".line-highlight.line-highlight":{background:"linear-gradient(to right, rgba(224, 145, 66, 0.2) 70%, rgba(224, 145, 66, 0))"}}}(F8)),F8}var I8={},BG;function lYe(){return BG||(BG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#322d29",color:"#88786d"},'pre[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#322d29",color:"#88786d",padding:"1em",margin:".5em 0",overflow:"auto"},'pre > code[class*="language-"]':{fontSize:"1em"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#6f5849"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#6f5849"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#6f5849"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#6f5849"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#6f5849"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#6f5849"},'code[class*="language-"]::selection':{textShadow:"none",background:"#6f5849"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#6f5849"},':not(pre) > code[class*="language-"]':{padding:".1em",borderRadius:".3em"},comment:{color:"#6a5f58"},prolog:{color:"#6a5f58"},doctype:{color:"#6a5f58"},cdata:{color:"#6a5f58"},punctuation:{color:"#6a5f58"},namespace:{Opacity:".7"},tag:{color:"#bfa05a"},operator:{color:"#bfa05a"},number:{color:"#bfa05a"},property:{color:"#88786d"},function:{color:"#88786d"},"tag-id":{color:"#fff3eb"},selector:{color:"#fff3eb"},"atrule-id":{color:"#fff3eb"},"code.language-javascript":{color:"#a48774"},"attr-name":{color:"#a48774"},"code.language-css":{color:"#fcc440"},"code.language-scss":{color:"#fcc440"},boolean:{color:"#fcc440"},string:{color:"#fcc440"},entity:{color:"#fcc440",cursor:"help"},url:{color:"#fcc440"},".language-css .token.string":{color:"#fcc440"},".language-scss .token.string":{color:"#fcc440"},".style .token.string":{color:"#fcc440"},"attr-value":{color:"#fcc440"},keyword:{color:"#fcc440"},control:{color:"#fcc440"},directive:{color:"#fcc440"},unit:{color:"#fcc440"},statement:{color:"#fcc440"},regex:{color:"#fcc440"},atrule:{color:"#fcc440"},placeholder:{color:"#fcc440"},variable:{color:"#fcc440"},deleted:{textDecoration:"line-through"},inserted:{borderBottom:"1px dotted #fff3eb",textDecoration:"none"},italic:{fontStyle:"italic"},important:{fontWeight:"bold",color:"#a48774"},bold:{fontWeight:"bold"},"pre > code.highlight":{Outline:".4em solid #816d5f",OutlineOffset:".4em"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"#35302b"},".line-numbers .line-numbers-rows > span:before":{color:"#46403d"},".line-highlight.line-highlight":{background:"linear-gradient(to right, rgba(191, 160, 90, 0.2) 70%, rgba(191, 160, 90, 0))"}}}(I8)),I8}var O8={},$G;function cYe(){return $G||($G=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#2a2d2a",color:"#687d68"},'pre[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#2a2d2a",color:"#687d68",padding:"1em",margin:".5em 0",overflow:"auto"},'pre > code[class*="language-"]':{fontSize:"1em"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#435643"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#435643"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#435643"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#435643"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#435643"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#435643"},'code[class*="language-"]::selection':{textShadow:"none",background:"#435643"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#435643"},':not(pre) > code[class*="language-"]':{padding:".1em",borderRadius:".3em"},comment:{color:"#535f53"},prolog:{color:"#535f53"},doctype:{color:"#535f53"},cdata:{color:"#535f53"},punctuation:{color:"#535f53"},namespace:{Opacity:".7"},tag:{color:"#a2b34d"},operator:{color:"#a2b34d"},number:{color:"#a2b34d"},property:{color:"#687d68"},function:{color:"#687d68"},"tag-id":{color:"#f0fff0"},selector:{color:"#f0fff0"},"atrule-id":{color:"#f0fff0"},"code.language-javascript":{color:"#b3d6b3"},"attr-name":{color:"#b3d6b3"},"code.language-css":{color:"#e5fb79"},"code.language-scss":{color:"#e5fb79"},boolean:{color:"#e5fb79"},string:{color:"#e5fb79"},entity:{color:"#e5fb79",cursor:"help"},url:{color:"#e5fb79"},".language-css .token.string":{color:"#e5fb79"},".language-scss .token.string":{color:"#e5fb79"},".style .token.string":{color:"#e5fb79"},"attr-value":{color:"#e5fb79"},keyword:{color:"#e5fb79"},control:{color:"#e5fb79"},directive:{color:"#e5fb79"},unit:{color:"#e5fb79"},statement:{color:"#e5fb79"},regex:{color:"#e5fb79"},atrule:{color:"#e5fb79"},placeholder:{color:"#e5fb79"},variable:{color:"#e5fb79"},deleted:{textDecoration:"line-through"},inserted:{borderBottom:"1px dotted #f0fff0",textDecoration:"none"},italic:{fontStyle:"italic"},important:{fontWeight:"bold",color:"#b3d6b3"},bold:{fontWeight:"bold"},"pre > code.highlight":{Outline:".4em solid #5c705c",OutlineOffset:".4em"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"#2c302c"},".line-numbers .line-numbers-rows > span:before":{color:"#3b423b"},".line-highlight.line-highlight":{background:"linear-gradient(to right, rgba(162, 179, 77, 0.2) 70%, rgba(162, 179, 77, 0))"}}}(O8)),O8}var R8={},zG;function uYe(){return zG||(zG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#faf8f5",color:"#728fcb"},'pre[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#faf8f5",color:"#728fcb",padding:"1em",margin:".5em 0",overflow:"auto"},'pre > code[class*="language-"]':{fontSize:"1em"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#faf8f5"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#faf8f5"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#faf8f5"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#faf8f5"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#faf8f5"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#faf8f5"},'code[class*="language-"]::selection':{textShadow:"none",background:"#faf8f5"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#faf8f5"},':not(pre) > code[class*="language-"]':{padding:".1em",borderRadius:".3em"},comment:{color:"#b6ad9a"},prolog:{color:"#b6ad9a"},doctype:{color:"#b6ad9a"},cdata:{color:"#b6ad9a"},punctuation:{color:"#b6ad9a"},namespace:{Opacity:".7"},tag:{color:"#063289"},operator:{color:"#063289"},number:{color:"#063289"},property:{color:"#b29762"},function:{color:"#b29762"},"tag-id":{color:"#2d2006"},selector:{color:"#2d2006"},"atrule-id":{color:"#2d2006"},"code.language-javascript":{color:"#896724"},"attr-name":{color:"#896724"},"code.language-css":{color:"#728fcb"},"code.language-scss":{color:"#728fcb"},boolean:{color:"#728fcb"},string:{color:"#728fcb"},entity:{color:"#728fcb",cursor:"help"},url:{color:"#728fcb"},".language-css .token.string":{color:"#728fcb"},".language-scss .token.string":{color:"#728fcb"},".style .token.string":{color:"#728fcb"},"attr-value":{color:"#728fcb"},keyword:{color:"#728fcb"},control:{color:"#728fcb"},directive:{color:"#728fcb"},unit:{color:"#728fcb"},statement:{color:"#728fcb"},regex:{color:"#728fcb"},atrule:{color:"#728fcb"},placeholder:{color:"#93abdc"},variable:{color:"#93abdc"},deleted:{textDecoration:"line-through"},inserted:{borderBottom:"1px dotted #2d2006",textDecoration:"none"},italic:{fontStyle:"italic"},important:{fontWeight:"bold",color:"#896724"},bold:{fontWeight:"bold"},"pre > code.highlight":{Outline:".4em solid #896724",OutlineOffset:".4em"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"#ece8de"},".line-numbers .line-numbers-rows > span:before":{color:"#cdc4b1"},".line-highlight.line-highlight":{background:"linear-gradient(to right, rgba(45, 32, 6, 0.2) 70%, rgba(45, 32, 6, 0))"}}}(R8)),R8}var L8={},HG;function dYe(){return HG||(HG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#1d262f",color:"#57718e"},'pre[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#1d262f",color:"#57718e",padding:"1em",margin:".5em 0",overflow:"auto"},'pre > code[class*="language-"]':{fontSize:"1em"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#004a9e"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#004a9e"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#004a9e"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#004a9e"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#004a9e"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#004a9e"},'code[class*="language-"]::selection':{textShadow:"none",background:"#004a9e"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#004a9e"},':not(pre) > code[class*="language-"]':{padding:".1em",borderRadius:".3em"},comment:{color:"#4a5f78"},prolog:{color:"#4a5f78"},doctype:{color:"#4a5f78"},cdata:{color:"#4a5f78"},punctuation:{color:"#4a5f78"},namespace:{Opacity:".7"},tag:{color:"#0aa370"},operator:{color:"#0aa370"},number:{color:"#0aa370"},property:{color:"#57718e"},function:{color:"#57718e"},"tag-id":{color:"#ebf4ff"},selector:{color:"#ebf4ff"},"atrule-id":{color:"#ebf4ff"},"code.language-javascript":{color:"#7eb6f6"},"attr-name":{color:"#7eb6f6"},"code.language-css":{color:"#47ebb4"},"code.language-scss":{color:"#47ebb4"},boolean:{color:"#47ebb4"},string:{color:"#47ebb4"},entity:{color:"#47ebb4",cursor:"help"},url:{color:"#47ebb4"},".language-css .token.string":{color:"#47ebb4"},".language-scss .token.string":{color:"#47ebb4"},".style .token.string":{color:"#47ebb4"},"attr-value":{color:"#47ebb4"},keyword:{color:"#47ebb4"},control:{color:"#47ebb4"},directive:{color:"#47ebb4"},unit:{color:"#47ebb4"},statement:{color:"#47ebb4"},regex:{color:"#47ebb4"},atrule:{color:"#47ebb4"},placeholder:{color:"#47ebb4"},variable:{color:"#47ebb4"},deleted:{textDecoration:"line-through"},inserted:{borderBottom:"1px dotted #ebf4ff",textDecoration:"none"},italic:{fontStyle:"italic"},important:{fontWeight:"bold",color:"#7eb6f6"},bold:{fontWeight:"bold"},"pre > code.highlight":{Outline:".4em solid #34659d",OutlineOffset:".4em"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"#1f2932"},".line-numbers .line-numbers-rows > span:before":{color:"#2c3847"},".line-highlight.line-highlight":{background:"linear-gradient(to right, rgba(10, 163, 112, 0.2) 70%, rgba(10, 163, 112, 0))"}}}(L8)),L8}var B8={},VG;function hYe(){return VG||(VG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#24242e",color:"#767693"},'pre[class*="language-"]':{fontFamily:'Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace',fontSize:"14px",lineHeight:"1.375",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",background:"#24242e",color:"#767693",padding:"1em",margin:".5em 0",overflow:"auto"},'pre > code[class*="language-"]':{fontSize:"1em"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#5151e6"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#5151e6"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#5151e6"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#5151e6"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#5151e6"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#5151e6"},'code[class*="language-"]::selection':{textShadow:"none",background:"#5151e6"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#5151e6"},':not(pre) > code[class*="language-"]':{padding:".1em",borderRadius:".3em"},comment:{color:"#5b5b76"},prolog:{color:"#5b5b76"},doctype:{color:"#5b5b76"},cdata:{color:"#5b5b76"},punctuation:{color:"#5b5b76"},namespace:{Opacity:".7"},tag:{color:"#dd672c"},operator:{color:"#dd672c"},number:{color:"#dd672c"},property:{color:"#767693"},function:{color:"#767693"},"tag-id":{color:"#ebebff"},selector:{color:"#ebebff"},"atrule-id":{color:"#ebebff"},"code.language-javascript":{color:"#aaaaca"},"attr-name":{color:"#aaaaca"},"code.language-css":{color:"#fe8c52"},"code.language-scss":{color:"#fe8c52"},boolean:{color:"#fe8c52"},string:{color:"#fe8c52"},entity:{color:"#fe8c52",cursor:"help"},url:{color:"#fe8c52"},".language-css .token.string":{color:"#fe8c52"},".language-scss .token.string":{color:"#fe8c52"},".style .token.string":{color:"#fe8c52"},"attr-value":{color:"#fe8c52"},keyword:{color:"#fe8c52"},control:{color:"#fe8c52"},directive:{color:"#fe8c52"},unit:{color:"#fe8c52"},statement:{color:"#fe8c52"},regex:{color:"#fe8c52"},atrule:{color:"#fe8c52"},placeholder:{color:"#fe8c52"},variable:{color:"#fe8c52"},deleted:{textDecoration:"line-through"},inserted:{borderBottom:"1px dotted #ebebff",textDecoration:"none"},italic:{fontStyle:"italic"},important:{fontWeight:"bold",color:"#aaaaca"},bold:{fontWeight:"bold"},"pre > code.highlight":{Outline:".4em solid #7676f4",OutlineOffset:".4em"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"#262631"},".line-numbers .line-numbers-rows > span:before":{color:"#393949"},".line-highlight.line-highlight":{background:"linear-gradient(to right, rgba(221, 103, 44, 0.2) 70%, rgba(221, 103, 44, 0))"}}}(B8)),B8}var $8={},UG;function fYe(){return UG||(UG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#393A34",fontFamily:'"Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",fontSize:".9em",lineHeight:"1.2em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#393A34",fontFamily:'"Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",fontSize:".9em",lineHeight:"1.2em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",border:"1px solid #dddddd",backgroundColor:"white"},'pre > code[class*="language-"]':{fontSize:"1em"},'pre[class*="language-"]::-moz-selection':{background:"#b3d4fc"},'pre[class*="language-"] ::-moz-selection':{background:"#b3d4fc"},'code[class*="language-"]::-moz-selection':{background:"#b3d4fc"},'code[class*="language-"] ::-moz-selection':{background:"#b3d4fc"},'pre[class*="language-"]::selection':{background:"#b3d4fc"},'pre[class*="language-"] ::selection':{background:"#b3d4fc"},'code[class*="language-"]::selection':{background:"#b3d4fc"},'code[class*="language-"] ::selection':{background:"#b3d4fc"},':not(pre) > code[class*="language-"]':{padding:".2em",paddingTop:"1px",paddingBottom:"1px",background:"#f8f8f8",border:"1px solid #dddddd"},comment:{color:"#999988",fontStyle:"italic"},prolog:{color:"#999988",fontStyle:"italic"},doctype:{color:"#999988",fontStyle:"italic"},cdata:{color:"#999988",fontStyle:"italic"},namespace:{Opacity:".7"},string:{color:"#e3116c"},"attr-value":{color:"#e3116c"},punctuation:{color:"#393A34"},operator:{color:"#393A34"},entity:{color:"#36acaa"},url:{color:"#36acaa"},symbol:{color:"#36acaa"},number:{color:"#36acaa"},boolean:{color:"#36acaa"},variable:{color:"#36acaa"},constant:{color:"#36acaa"},property:{color:"#36acaa"},regex:{color:"#36acaa"},inserted:{color:"#36acaa"},atrule:{color:"#00a4db"},keyword:{color:"#00a4db"},"attr-name":{color:"#00a4db"},".language-autohotkey .token.selector":{color:"#00a4db"},function:{color:"#9a050f",fontWeight:"bold"},deleted:{color:"#9a050f"},".language-autohotkey .token.tag":{color:"#9a050f"},tag:{color:"#00009f"},selector:{color:"#00009f"},".language-autohotkey .token.keyword":{color:"#00009f"},important:{fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}($8)),$8}var z8={},WG;function pYe(){return WG||(WG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#ebdbb2",fontFamily:'Consolas, Monaco, "Andale Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#ebdbb2",fontFamily:'Consolas, Monaco, "Andale Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",background:"#1d2021"},'pre[class*="language-"]::-moz-selection':{color:"#fbf1c7",background:"#7c6f64"},'pre[class*="language-"] ::-moz-selection':{color:"#fbf1c7",background:"#7c6f64"},'code[class*="language-"]::-moz-selection':{color:"#fbf1c7",background:"#7c6f64"},'code[class*="language-"] ::-moz-selection':{color:"#fbf1c7",background:"#7c6f64"},'pre[class*="language-"]::selection':{color:"#fbf1c7",background:"#7c6f64"},'pre[class*="language-"] ::selection':{color:"#fbf1c7",background:"#7c6f64"},'code[class*="language-"]::selection':{color:"#fbf1c7",background:"#7c6f64"},'code[class*="language-"] ::selection':{color:"#fbf1c7",background:"#7c6f64"},':not(pre) > code[class*="language-"]':{background:"#1d2021",padding:"0.1em",borderRadius:"0.3em"},comment:{color:"#a89984"},prolog:{color:"#a89984"},cdata:{color:"#a89984"},delimiter:{color:"#fb4934"},boolean:{color:"#fb4934"},keyword:{color:"#fb4934"},selector:{color:"#fb4934"},important:{color:"#fb4934"},atrule:{color:"#fb4934"},operator:{color:"#a89984"},punctuation:{color:"#a89984"},"attr-name":{color:"#a89984"},tag:{color:"#fabd2f"},"tag.punctuation":{color:"#fabd2f"},doctype:{color:"#fabd2f"},builtin:{color:"#fabd2f"},entity:{color:"#d3869b"},number:{color:"#d3869b"},symbol:{color:"#d3869b"},property:{color:"#fb4934"},constant:{color:"#fb4934"},variable:{color:"#fb4934"},string:{color:"#b8bb26"},char:{color:"#b8bb26"},"attr-value":{color:"#a89984"},"attr-value.punctuation":{color:"#a89984"},url:{color:"#b8bb26",textDecoration:"underline"},function:{color:"#fabd2f"},regex:{background:"#b8bb26"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},inserted:{background:"#a89984"},deleted:{background:"#fb4934"}}}(z8)),z8}var H8={},qG;function mYe(){return qG||(qG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#3c3836",fontFamily:'Consolas, Monaco, "Andale Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#3c3836",fontFamily:'Consolas, Monaco, "Andale Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",background:"#f9f5d7"},'pre[class*="language-"]::-moz-selection':{color:"#282828",background:"#a89984"},'pre[class*="language-"] ::-moz-selection':{color:"#282828",background:"#a89984"},'code[class*="language-"]::-moz-selection':{color:"#282828",background:"#a89984"},'code[class*="language-"] ::-moz-selection':{color:"#282828",background:"#a89984"},'pre[class*="language-"]::selection':{color:"#282828",background:"#a89984"},'pre[class*="language-"] ::selection':{color:"#282828",background:"#a89984"},'code[class*="language-"]::selection':{color:"#282828",background:"#a89984"},'code[class*="language-"] ::selection':{color:"#282828",background:"#a89984"},':not(pre) > code[class*="language-"]':{background:"#f9f5d7",padding:"0.1em",borderRadius:"0.3em"},comment:{color:"#7c6f64"},prolog:{color:"#7c6f64"},cdata:{color:"#7c6f64"},delimiter:{color:"#9d0006"},boolean:{color:"#9d0006"},keyword:{color:"#9d0006"},selector:{color:"#9d0006"},important:{color:"#9d0006"},atrule:{color:"#9d0006"},operator:{color:"#7c6f64"},punctuation:{color:"#7c6f64"},"attr-name":{color:"#7c6f64"},tag:{color:"#b57614"},"tag.punctuation":{color:"#b57614"},doctype:{color:"#b57614"},builtin:{color:"#b57614"},entity:{color:"#8f3f71"},number:{color:"#8f3f71"},symbol:{color:"#8f3f71"},property:{color:"#9d0006"},constant:{color:"#9d0006"},variable:{color:"#9d0006"},string:{color:"#797403"},char:{color:"#797403"},"attr-value":{color:"#7c6f64"},"attr-value.punctuation":{color:"#7c6f64"},url:{color:"#797403",textDecoration:"underline"},function:{color:"#b57614"},regex:{background:"#797403"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},inserted:{background:"#7c6f64"},deleted:{background:"#9d0006"}}}(H8)),H8}var V8={},GG;function gYe(){return GG||(GG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={"code[class*='language-']":{color:"#d6e7ff",background:"#030314",textShadow:"none",fontFamily:'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',fontSize:"1em",lineHeight:"1.5",letterSpacing:".2px",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",textAlign:"left",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},"pre[class*='language-']":{color:"#d6e7ff",background:"#030314",textShadow:"none",fontFamily:'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',fontSize:"1em",lineHeight:"1.5",letterSpacing:".2px",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",textAlign:"left",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",border:"1px solid #2a4555",borderRadius:"5px",padding:"1.5em 1em",margin:"1em 0",overflow:"auto"},"pre[class*='language-']::-moz-selection":{color:"inherit",background:"#1d3b54",textShadow:"none"},"pre[class*='language-'] ::-moz-selection":{color:"inherit",background:"#1d3b54",textShadow:"none"},"code[class*='language-']::-moz-selection":{color:"inherit",background:"#1d3b54",textShadow:"none"},"code[class*='language-'] ::-moz-selection":{color:"inherit",background:"#1d3b54",textShadow:"none"},"pre[class*='language-']::selection":{color:"inherit",background:"#1d3b54",textShadow:"none"},"pre[class*='language-'] ::selection":{color:"inherit",background:"#1d3b54",textShadow:"none"},"code[class*='language-']::selection":{color:"inherit",background:"#1d3b54",textShadow:"none"},"code[class*='language-'] ::selection":{color:"inherit",background:"#1d3b54",textShadow:"none"},":not(pre) > code[class*='language-']":{color:"#f0f6f6",background:"#2a4555",padding:"0.2em 0.3em",borderRadius:"0.2em",boxDecorationBreak:"clone"},comment:{color:"#446e69"},prolog:{color:"#446e69"},doctype:{color:"#446e69"},cdata:{color:"#446e69"},punctuation:{color:"#d6b007"},property:{color:"#d6e7ff"},tag:{color:"#d6e7ff"},boolean:{color:"#d6e7ff"},number:{color:"#d6e7ff"},constant:{color:"#d6e7ff"},symbol:{color:"#d6e7ff"},deleted:{color:"#d6e7ff"},selector:{color:"#e60067"},"attr-name":{color:"#e60067"},builtin:{color:"#e60067"},inserted:{color:"#e60067"},string:{color:"#49c6ec"},char:{color:"#49c6ec"},operator:{color:"#ec8e01",background:"transparent"},entity:{color:"#ec8e01",background:"transparent"},url:{color:"#ec8e01",background:"transparent"},".language-css .token.string":{color:"#ec8e01",background:"transparent"},".style .token.string":{color:"#ec8e01",background:"transparent"},atrule:{color:"#0fe468"},"attr-value":{color:"#0fe468"},keyword:{color:"#0fe468"},function:{color:"#78f3e9"},"class-name":{color:"#78f3e9"},regex:{color:"#d6e7ff"},important:{color:"#d6e7ff"},variable:{color:"#d6e7ff"}}}(V8)),V8}var U8={},YG;function yYe(){return YG||(YG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{fontFamily:'"Fira Mono", Menlo, Monaco, "Lucida Console", "Courier New", Courier, monospace',fontSize:"16px",lineHeight:"1.375",direction:"ltr",textAlign:"left",wordSpacing:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",whiteSpace:"pre-wrap",wordBreak:"break-all",wordWrap:"break-word",background:"#322931",color:"#b9b5b8"},'pre[class*="language-"]':{fontFamily:'"Fira Mono", Menlo, Monaco, "Lucida Console", "Courier New", Courier, monospace',fontSize:"16px",lineHeight:"1.375",direction:"ltr",textAlign:"left",wordSpacing:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",whiteSpace:"pre-wrap",wordBreak:"break-all",wordWrap:"break-word",background:"#322931",color:"#b9b5b8",padding:"1em",margin:".5em 0",overflow:"auto"},'pre > code[class*="language-"]':{fontSize:"1em"},':not(pre) > code[class*="language-"]':{padding:".1em",borderRadius:".3em"},comment:{color:"#797379"},prolog:{color:"#797379"},doctype:{color:"#797379"},cdata:{color:"#797379"},punctuation:{color:"#b9b5b8"},".namespace":{Opacity:".7"},null:{color:"#fd8b19"},operator:{color:"#fd8b19"},boolean:{color:"#fd8b19"},number:{color:"#fd8b19"},property:{color:"#fdcc59"},tag:{color:"#1290bf"},string:{color:"#149b93"},selector:{color:"#c85e7c"},"attr-name":{color:"#fd8b19"},entity:{color:"#149b93",cursor:"help"},url:{color:"#149b93"},".language-css .token.string":{color:"#149b93"},".style .token.string":{color:"#149b93"},"attr-value":{color:"#8fc13e"},keyword:{color:"#8fc13e"},control:{color:"#8fc13e"},directive:{color:"#8fc13e"},unit:{color:"#8fc13e"},statement:{color:"#149b93"},regex:{color:"#149b93"},atrule:{color:"#149b93"},placeholder:{color:"#1290bf"},variable:{color:"#1290bf"},important:{color:"#dd464c",fontWeight:"bold"},"pre > code.highlight":{Outline:".4em solid red",OutlineOffset:".4em"}}}(U8)),U8}var W8={},KG;function bYe(){return KG||(KG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#f8f8f2",background:"none",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Monaco, Consolas, 'Andale Mono', 'Ubuntu Mono', monospace",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#f8f8f2",background:"#263E52",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Monaco, Consolas, 'Andale Mono', 'Ubuntu Mono', monospace",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",borderRadius:"0.3em"},':not(pre) > code[class*="language-"]':{background:"#263E52",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"#5c98cd"},prolog:{color:"#5c98cd"},doctype:{color:"#5c98cd"},cdata:{color:"#5c98cd"},punctuation:{color:"#f8f8f2"},".namespace":{Opacity:".7"},property:{color:"#F05E5D"},tag:{color:"#F05E5D"},constant:{color:"#F05E5D"},symbol:{color:"#F05E5D"},deleted:{color:"#F05E5D"},boolean:{color:"#BC94F9"},number:{color:"#BC94F9"},selector:{color:"#FCFCD6"},"attr-name":{color:"#FCFCD6"},string:{color:"#FCFCD6"},char:{color:"#FCFCD6"},builtin:{color:"#FCFCD6"},inserted:{color:"#FCFCD6"},operator:{color:"#f8f8f2"},entity:{color:"#f8f8f2",cursor:"help"},url:{color:"#f8f8f2"},".language-css .token.string":{color:"#f8f8f2"},".style .token.string":{color:"#f8f8f2"},variable:{color:"#f8f8f2"},atrule:{color:"#66D8EF"},"attr-value":{color:"#66D8EF"},function:{color:"#66D8EF"},"class-name":{color:"#66D8EF"},keyword:{color:"#6EB26E"},regex:{color:"#F05E5D"},important:{color:"#F05E5D",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(W8)),W8}var q8={},XG;function xYe(){return XG||(XG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",color:"#eee",background:"#2f2f2f",fontFamily:"Roboto Mono, monospace",fontSize:"1em",lineHeight:"1.5em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",color:"#eee",background:"#2f2f2f",fontFamily:"Roboto Mono, monospace",fontSize:"1em",lineHeight:"1.5em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",overflow:"auto",position:"relative",margin:"0.5em 0",padding:"1.25em 1em"},'code[class*="language-"]::-moz-selection':{background:"#363636"},'pre[class*="language-"]::-moz-selection':{background:"#363636"},'code[class*="language-"] ::-moz-selection':{background:"#363636"},'pre[class*="language-"] ::-moz-selection':{background:"#363636"},'code[class*="language-"]::selection':{background:"#363636"},'pre[class*="language-"]::selection':{background:"#363636"},'code[class*="language-"] ::selection':{background:"#363636"},'pre[class*="language-"] ::selection':{background:"#363636"},':not(pre) > code[class*="language-"]':{whiteSpace:"normal",borderRadius:"0.2em",padding:"0.1em"},".language-css > code":{color:"#fd9170"},".language-sass > code":{color:"#fd9170"},".language-scss > code":{color:"#fd9170"},'[class*="language-"] .namespace':{Opacity:"0.7"},atrule:{color:"#c792ea"},"attr-name":{color:"#ffcb6b"},"attr-value":{color:"#a5e844"},attribute:{color:"#a5e844"},boolean:{color:"#c792ea"},builtin:{color:"#ffcb6b"},cdata:{color:"#80cbc4"},char:{color:"#80cbc4"},class:{color:"#ffcb6b"},"class-name":{color:"#f2ff00"},comment:{color:"#616161"},constant:{color:"#c792ea"},deleted:{color:"#ff6666"},doctype:{color:"#616161"},entity:{color:"#ff6666"},function:{color:"#c792ea"},hexcode:{color:"#f2ff00"},id:{color:"#c792ea",fontWeight:"bold"},important:{color:"#c792ea",fontWeight:"bold"},inserted:{color:"#80cbc4"},keyword:{color:"#c792ea"},number:{color:"#fd9170"},operator:{color:"#89ddff"},prolog:{color:"#616161"},property:{color:"#80cbc4"},"pseudo-class":{color:"#a5e844"},"pseudo-element":{color:"#a5e844"},punctuation:{color:"#89ddff"},regex:{color:"#f2ff00"},selector:{color:"#ff6666"},string:{color:"#a5e844"},symbol:{color:"#c792ea"},tag:{color:"#ff6666"},unit:{color:"#fd9170"},url:{color:"#ff6666"},variable:{color:"#ff6666"}}}(q8)),q8}var G8={},JG;function vYe(){return JG||(JG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",color:"#90a4ae",background:"#fafafa",fontFamily:"Roboto Mono, monospace",fontSize:"1em",lineHeight:"1.5em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",color:"#90a4ae",background:"#fafafa",fontFamily:"Roboto Mono, monospace",fontSize:"1em",lineHeight:"1.5em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",overflow:"auto",position:"relative",margin:"0.5em 0",padding:"1.25em 1em"},'code[class*="language-"]::-moz-selection':{background:"#cceae7",color:"#263238"},'pre[class*="language-"]::-moz-selection':{background:"#cceae7",color:"#263238"},'code[class*="language-"] ::-moz-selection':{background:"#cceae7",color:"#263238"},'pre[class*="language-"] ::-moz-selection':{background:"#cceae7",color:"#263238"},'code[class*="language-"]::selection':{background:"#cceae7",color:"#263238"},'pre[class*="language-"]::selection':{background:"#cceae7",color:"#263238"},'code[class*="language-"] ::selection':{background:"#cceae7",color:"#263238"},'pre[class*="language-"] ::selection':{background:"#cceae7",color:"#263238"},':not(pre) > code[class*="language-"]':{whiteSpace:"normal",borderRadius:"0.2em",padding:"0.1em"},".language-css > code":{color:"#f76d47"},".language-sass > code":{color:"#f76d47"},".language-scss > code":{color:"#f76d47"},'[class*="language-"] .namespace':{Opacity:"0.7"},atrule:{color:"#7c4dff"},"attr-name":{color:"#39adb5"},"attr-value":{color:"#f6a434"},attribute:{color:"#f6a434"},boolean:{color:"#7c4dff"},builtin:{color:"#39adb5"},cdata:{color:"#39adb5"},char:{color:"#39adb5"},class:{color:"#39adb5"},"class-name":{color:"#6182b8"},comment:{color:"#aabfc9"},constant:{color:"#7c4dff"},deleted:{color:"#e53935"},doctype:{color:"#aabfc9"},entity:{color:"#e53935"},function:{color:"#7c4dff"},hexcode:{color:"#f76d47"},id:{color:"#7c4dff",fontWeight:"bold"},important:{color:"#7c4dff",fontWeight:"bold"},inserted:{color:"#39adb5"},keyword:{color:"#7c4dff"},number:{color:"#f76d47"},operator:{color:"#39adb5"},prolog:{color:"#aabfc9"},property:{color:"#39adb5"},"pseudo-class":{color:"#f6a434"},"pseudo-element":{color:"#f6a434"},punctuation:{color:"#39adb5"},regex:{color:"#6182b8"},selector:{color:"#e53935"},string:{color:"#f6a434"},symbol:{color:"#7c4dff"},tag:{color:"#e53935"},unit:{color:"#f76d47"},url:{color:"#e53935"},variable:{color:"#e53935"}}}(G8)),G8}var Y8={},ZG;function wYe(){return ZG||(ZG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",color:"#c3cee3",background:"#263238",fontFamily:"Roboto Mono, monospace",fontSize:"1em",lineHeight:"1.5em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",color:"#c3cee3",background:"#263238",fontFamily:"Roboto Mono, monospace",fontSize:"1em",lineHeight:"1.5em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",overflow:"auto",position:"relative",margin:"0.5em 0",padding:"1.25em 1em"},'code[class*="language-"]::-moz-selection':{background:"#363636"},'pre[class*="language-"]::-moz-selection':{background:"#363636"},'code[class*="language-"] ::-moz-selection':{background:"#363636"},'pre[class*="language-"] ::-moz-selection':{background:"#363636"},'code[class*="language-"]::selection':{background:"#363636"},'pre[class*="language-"]::selection':{background:"#363636"},'code[class*="language-"] ::selection':{background:"#363636"},'pre[class*="language-"] ::selection':{background:"#363636"},':not(pre) > code[class*="language-"]':{whiteSpace:"normal",borderRadius:"0.2em",padding:"0.1em"},".language-css > code":{color:"#fd9170"},".language-sass > code":{color:"#fd9170"},".language-scss > code":{color:"#fd9170"},'[class*="language-"] .namespace':{Opacity:"0.7"},atrule:{color:"#c792ea"},"attr-name":{color:"#ffcb6b"},"attr-value":{color:"#c3e88d"},attribute:{color:"#c3e88d"},boolean:{color:"#c792ea"},builtin:{color:"#ffcb6b"},cdata:{color:"#80cbc4"},char:{color:"#80cbc4"},class:{color:"#ffcb6b"},"class-name":{color:"#f2ff00"},color:{color:"#f2ff00"},comment:{color:"#546e7a"},constant:{color:"#c792ea"},deleted:{color:"#f07178"},doctype:{color:"#546e7a"},entity:{color:"#f07178"},function:{color:"#c792ea"},hexcode:{color:"#f2ff00"},id:{color:"#c792ea",fontWeight:"bold"},important:{color:"#c792ea",fontWeight:"bold"},inserted:{color:"#80cbc4"},keyword:{color:"#c792ea",fontStyle:"italic"},number:{color:"#fd9170"},operator:{color:"#89ddff"},prolog:{color:"#546e7a"},property:{color:"#80cbc4"},"pseudo-class":{color:"#c3e88d"},"pseudo-element":{color:"#c3e88d"},punctuation:{color:"#89ddff"},regex:{color:"#f2ff00"},selector:{color:"#f07178"},string:{color:"#c3e88d"},symbol:{color:"#c792ea"},tag:{color:"#f07178"},unit:{color:"#f07178"},url:{color:"#fd9170"},variable:{color:"#f07178"}}}(Y8)),Y8}var K8={},QG;function SYe(){return QG||(QG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#d6deeb",fontFamily:'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",fontSize:"1em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"white",fontFamily:'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",fontSize:"1em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",background:"#011627"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'pre[class*="language-"]::selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'code[class*="language-"]::selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'code[class*="language-"] ::selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},':not(pre) > code[class*="language-"]':{color:"white",background:"#011627",padding:"0.1em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"rgb(99, 119, 119)",fontStyle:"italic"},prolog:{color:"rgb(99, 119, 119)",fontStyle:"italic"},cdata:{color:"rgb(99, 119, 119)",fontStyle:"italic"},punctuation:{color:"rgb(199, 146, 234)"},".namespace":{color:"rgb(178, 204, 214)"},deleted:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"},symbol:{color:"rgb(128, 203, 196)"},property:{color:"rgb(128, 203, 196)"},tag:{color:"rgb(127, 219, 202)"},operator:{color:"rgb(127, 219, 202)"},keyword:{color:"rgb(127, 219, 202)"},boolean:{color:"rgb(255, 88, 116)"},number:{color:"rgb(247, 140, 108)"},constant:{color:"rgb(130, 170, 255)"},function:{color:"rgb(130, 170, 255)"},builtin:{color:"rgb(130, 170, 255)"},char:{color:"rgb(130, 170, 255)"},selector:{color:"rgb(199, 146, 234)",fontStyle:"italic"},doctype:{color:"rgb(199, 146, 234)",fontStyle:"italic"},"attr-name":{color:"rgb(173, 219, 103)",fontStyle:"italic"},inserted:{color:"rgb(173, 219, 103)",fontStyle:"italic"},string:{color:"rgb(173, 219, 103)"},url:{color:"rgb(173, 219, 103)"},entity:{color:"rgb(173, 219, 103)"},".language-css .token.string":{color:"rgb(173, 219, 103)"},".style .token.string":{color:"rgb(173, 219, 103)"},"class-name":{color:"rgb(255, 203, 139)"},atrule:{color:"rgb(255, 203, 139)"},"attr-value":{color:"rgb(255, 203, 139)"},regex:{color:"rgb(214, 222, 235)"},important:{color:"rgb(214, 222, 235)",fontWeight:"bold"},variable:{color:"rgb(214, 222, 235)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(K8)),K8}var X8={},eY;function CYe(){return eY||(eY=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#f8f8f2",background:"none",fontFamily:`"Fira Code", Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace`,textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#f8f8f2",background:"#2E3440",fontFamily:`"Fira Code", Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace`,textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",borderRadius:"0.3em"},':not(pre) > code[class*="language-"]':{background:"#2E3440",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"#636f88"},prolog:{color:"#636f88"},doctype:{color:"#636f88"},cdata:{color:"#636f88"},punctuation:{color:"#81A1C1"},".namespace":{Opacity:".7"},property:{color:"#81A1C1"},tag:{color:"#81A1C1"},constant:{color:"#81A1C1"},symbol:{color:"#81A1C1"},deleted:{color:"#81A1C1"},number:{color:"#B48EAD"},boolean:{color:"#81A1C1"},selector:{color:"#A3BE8C"},"attr-name":{color:"#A3BE8C"},string:{color:"#A3BE8C"},char:{color:"#A3BE8C"},builtin:{color:"#A3BE8C"},inserted:{color:"#A3BE8C"},operator:{color:"#81A1C1"},entity:{color:"#81A1C1",cursor:"help"},url:{color:"#81A1C1"},".language-css .token.string":{color:"#81A1C1"},".style .token.string":{color:"#81A1C1"},variable:{color:"#81A1C1"},atrule:{color:"#88C0D0"},"attr-value":{color:"#88C0D0"},function:{color:"#88C0D0"},"class-name":{color:"#88C0D0"},keyword:{color:"#81A1C1"},regex:{color:"#EBCB8B"},important:{color:"#EBCB8B",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(X8)),X8}var J8={},tY;function kYe(){return tY||(tY=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{background:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},'code[class*="language-"]::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"] *::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"]::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"] *::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'pre[class*="language-"] *::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},prolog:{color:"hsl(220, 10%, 40%)"},cdata:{color:"hsl(220, 10%, 40%)"},doctype:{color:"hsl(220, 14%, 71%)"},punctuation:{color:"hsl(220, 14%, 71%)"},entity:{color:"hsl(220, 14%, 71%)",cursor:"help"},"attr-name":{color:"hsl(29, 54%, 61%)"},"class-name":{color:"hsl(29, 54%, 61%)"},boolean:{color:"hsl(29, 54%, 61%)"},constant:{color:"hsl(29, 54%, 61%)"},number:{color:"hsl(29, 54%, 61%)"},atrule:{color:"hsl(29, 54%, 61%)"},keyword:{color:"hsl(286, 60%, 67%)"},property:{color:"hsl(355, 65%, 65%)"},tag:{color:"hsl(355, 65%, 65%)"},symbol:{color:"hsl(355, 65%, 65%)"},deleted:{color:"hsl(355, 65%, 65%)"},important:{color:"hsl(355, 65%, 65%)"},selector:{color:"hsl(95, 38%, 62%)"},string:{color:"hsl(95, 38%, 62%)"},char:{color:"hsl(95, 38%, 62%)"},builtin:{color:"hsl(95, 38%, 62%)"},inserted:{color:"hsl(95, 38%, 62%)"},regex:{color:"hsl(95, 38%, 62%)"},"attr-value":{color:"hsl(95, 38%, 62%)"},"attr-value > .token.punctuation":{color:"hsl(95, 38%, 62%)"},variable:{color:"hsl(207, 82%, 66%)"},operator:{color:"hsl(207, 82%, 66%)"},function:{color:"hsl(207, 82%, 66%)"},url:{color:"hsl(187, 47%, 55%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(220, 14%, 71%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(220, 14%, 71%)"},".language-css .token.selector":{color:"hsl(355, 65%, 65%)"},".language-css .token.property":{color:"hsl(220, 14%, 71%)"},".language-css .token.function":{color:"hsl(187, 47%, 55%)"},".language-css .token.url > .token.function":{color:"hsl(187, 47%, 55%)"},".language-css .token.url > .token.string.url":{color:"hsl(95, 38%, 62%)"},".language-css .token.important":{color:"hsl(286, 60%, 67%)"},".language-css .token.atrule .token.rule":{color:"hsl(286, 60%, 67%)"},".language-javascript .token.operator":{color:"hsl(286, 60%, 67%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(5, 48%, 51%)"},".language-json .token.operator":{color:"hsl(220, 14%, 71%)"},".language-json .token.null.keyword":{color:"hsl(29, 54%, 61%)"},".language-markdown .token.url":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url > .token.operator":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url > .token.content":{color:"hsl(207, 82%, 66%)"},".language-markdown .token.url > .token.url":{color:"hsl(187, 47%, 55%)"},".language-markdown .token.url-reference.url":{color:"hsl(187, 47%, 55%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"hsl(95, 38%, 62%)"},".language-markdown .token.bold .token.content":{color:"hsl(29, 54%, 61%)"},".language-markdown .token.italic .token.content":{color:"hsl(286, 60%, 67%)"},".language-markdown .token.strike .token.content":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.list.punctuation":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(355, 65%, 65%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:"0.8"},"token.tab:not(:empty):before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.cr:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.lf:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.space:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},".line-highlight.line-highlight":{background:"hsla(220, 100%, 80%, 0.04)"},".line-highlight.line-highlight:before":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 14%, 71%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 14%, 71%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(220, 100%, 80%, 0.04)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(220, 14%, 71%, 0.15)"},".command-line .command-line-prompt":{borderRightColor:"hsla(220, 14%, 71%, 0.15)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(220, 14%, 45%)"},".command-line .command-line-prompt > span:before":{color:"hsl(220, 14%, 45%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"hsl(95, 38%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"hsl(95, 38%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"hsl(95, 38%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"hsl(207, 82%, 66%)"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"hsl(207, 82%, 66%)"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"hsl(207, 82%, 66%)"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(286, 60%, 67%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(286, 60%, 67%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(286, 60%, 67%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(224, 13%, 17%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(224, 13%, 17%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(224, 13%, 17%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(224, 13%, 17%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(219, 13%, 22%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(219, 13%, 22%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(219, 13%, 22%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(220, 14%, 71%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(220, 14%, 71%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(220, 14%, 71%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(220, 14%, 71%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(220, 14%, 71%)"}}}(J8)),J8}var Z8={},nY;function EYe(){return nY||(nY=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},'code[class*="language-"]::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"]::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},prolog:{color:"hsl(230, 4%, 64%)"},cdata:{color:"hsl(230, 4%, 64%)"},doctype:{color:"hsl(230, 8%, 24%)"},punctuation:{color:"hsl(230, 8%, 24%)"},entity:{color:"hsl(230, 8%, 24%)",cursor:"help"},"attr-name":{color:"hsl(35, 99%, 36%)"},"class-name":{color:"hsl(35, 99%, 36%)"},boolean:{color:"hsl(35, 99%, 36%)"},constant:{color:"hsl(35, 99%, 36%)"},number:{color:"hsl(35, 99%, 36%)"},atrule:{color:"hsl(35, 99%, 36%)"},keyword:{color:"hsl(301, 63%, 40%)"},property:{color:"hsl(5, 74%, 59%)"},tag:{color:"hsl(5, 74%, 59%)"},symbol:{color:"hsl(5, 74%, 59%)"},deleted:{color:"hsl(5, 74%, 59%)"},important:{color:"hsl(5, 74%, 59%)"},selector:{color:"hsl(119, 34%, 47%)"},string:{color:"hsl(119, 34%, 47%)"},char:{color:"hsl(119, 34%, 47%)"},builtin:{color:"hsl(119, 34%, 47%)"},inserted:{color:"hsl(119, 34%, 47%)"},regex:{color:"hsl(119, 34%, 47%)"},"attr-value":{color:"hsl(119, 34%, 47%)"},"attr-value > .token.punctuation":{color:"hsl(119, 34%, 47%)"},variable:{color:"hsl(221, 87%, 60%)"},operator:{color:"hsl(221, 87%, 60%)"},function:{color:"hsl(221, 87%, 60%)"},url:{color:"hsl(198, 99%, 37%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(230, 8%, 24%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(230, 8%, 24%)"},".language-css .token.selector":{color:"hsl(5, 74%, 59%)"},".language-css .token.property":{color:"hsl(230, 8%, 24%)"},".language-css .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.string.url":{color:"hsl(119, 34%, 47%)"},".language-css .token.important":{color:"hsl(301, 63%, 40%)"},".language-css .token.atrule .token.rule":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.operator":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(344, 84%, 43%)"},".language-json .token.operator":{color:"hsl(230, 8%, 24%)"},".language-json .token.null.keyword":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.url":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.operator":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.content":{color:"hsl(221, 87%, 60%)"},".language-markdown .token.url > .token.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.url-reference.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"hsl(119, 34%, 47%)"},".language-markdown .token.bold .token.content":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.italic .token.content":{color:"hsl(301, 63%, 40%)"},".language-markdown .token.strike .token.content":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.list.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(5, 74%, 59%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:"0.8"},"token.tab:not(:empty):before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.cr:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.lf:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.space:before":{color:"hsla(230, 8%, 24%, 0.2)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},".line-highlight.line-highlight":{background:"hsla(230, 8%, 24%, 0.05)"},".line-highlight.line-highlight:before":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(230, 8%, 24%, 0.05)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".command-line .command-line-prompt":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(230, 1%, 62%)"},".command-line .command-line-prompt > span:before":{color:"hsl(230, 1%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(301, 63%, 40%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(0, 0, 95%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(0, 0, 95%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(0, 0, 95%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(0, 0, 95%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(0, 0%, 100%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(230, 8%, 24%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(230, 8%, 24%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(230, 8%, 24%)"}}}(Z8)),Z8}var Q8={},rY;function DYe(){return rY||(rY=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",whiteSpace:"pre-wrap",wordBreak:"break-all",wordWrap:"break-word",fontFamily:'Menlo, Monaco, "Courier New", monospace',fontSize:"15px",lineHeight:"1.5",color:"#dccf8f",textShadow:"0"},'pre[class*="language-"]':{MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",whiteSpace:"pre-wrap",wordBreak:"break-all",wordWrap:"break-word",fontFamily:'Menlo, Monaco, "Courier New", monospace',fontSize:"15px",lineHeight:"1.5",color:"#DCCF8F",textShadow:"0",borderRadius:"5px",border:"1px solid #000",background:"#181914 url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAMAAA/+4ADkFkb2JlAGTAAAAAAf/bAIQACQYGBgcGCQcHCQ0IBwgNDwsJCQsPEQ4ODw4OERENDg4ODg0RERQUFhQUERoaHBwaGiYmJiYmKysrKysrKysrKwEJCAgJCgkMCgoMDwwODA8TDg4ODhMVDg4PDg4VGhMRERERExoXGhYWFhoXHR0aGh0dJCQjJCQrKysrKysrKysr/8AAEQgAjACMAwEiAAIRAQMRAf/EAF4AAQEBAAAAAAAAAAAAAAAAAAABBwEBAQAAAAAAAAAAAAAAAAAAAAIQAAEDAwIHAQEAAAAAAAAAAADwAREhYaExkUFRcYGxwdHh8REBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AyGFEjHaBS2fDDs2zkhKmBKktb7km+ZwwCnXPkLVmCTMItj6AXFxRS465/BTnkAJvkLkJe+7AKKoi2AtRS2zuAWsCb5GOlBN8gKfmuGHZ8MFqIth3ALmFoFwbwKWyAlTAp17uKqBvgBD8sM4fTjhvAhkzhaRkBMKBrfs7jGPIpzy7gFrAqnC0C0gB0EWwBDW2cBVQwm+QtPpa3wBO3sVvszCnLAhkzgL5/RLf13cLQd8/AGlu0Cb5HTx9KuAEieGJEdcehS3eRTp2ATdt3CpIm+QtZwAhROXFeb7swp/ahaM3kBE/jSIUBc/AWrgBN8uNFAl+b7sAXFxFn2YLUU5Ns7gFX8C4ib+hN8gFWXwK3bZglxEJm+gKdciLPsFV/TClsgJUwKJ5FVA7tvIFrfZhVfGJDcsCKaYgAqv6YRbE+RWOWBtu7+AL3yRalXLyKqAIIfk+zARbDgFyEsncYwJvlgFRW+GEWntIi2P0BooyFxcNr8Ep3+ANLbMO+QyhvbiqdgC0kVvgUUiLYgBS2QtPbiVI1/sgOmG9uO+Y8DW+7jS2zAOnj6O2BndwuIAUtkdRN8gFoK3wwXMQyZwHVbClsuNLd4E3yAUR6FVDBR+BafQGt93LVMxJTv8ABts4CVLhcfYWsCb5kC9/BHdU8CLYFY5bMAd+eX9MGthhpbA1vu4B7+RKkaW2Yq4AQtVBBFsAJU/AuIXBhN8gGWnstefhiZyWvLAEnbYS1uzSFP6Jvn4Baxx70JKkQojLib5AVTey1jjgkKJGO0AKWyOm7N7cSpgSpAdPH0Tfd/gp1z5C1ZgKqN9J2wFxcUUuAFLZAm+QC0Fb4YUVRFsAOvj4KW2dwtYE3yAWk/wS/PLMKfmuGHZ8MAXF/Ja32Yi5haAKWz4Ydm2cSpgU693Atb7km+Zwwh+WGcPpxw3gAkzCLY+iYUDW/Z3Adc/gpzyFrAqnALkJe+7DoItgAtRS2zuKqGE3yAx0oJvkdvYrfZmALURbDuL5/RLf13cAuDeBS2RpbtAm+QFVA3wR+3fUtFHoBDJnC0jIXH0HWsgMY8inPLuOkd9chp4z20ALQLSA8cI9jYAIa2zjzjBd8gRafS1vgiUho/kAKcsCGTOGWvoOpkAtB3z8Hm8x2Ff5ADp4+lXAlIvcmwH/2Q==') repeat left top",padding:"12px",overflow:"auto"},'pre > code[class*="language-"]':{fontSize:"1em"},':not(pre) > code[class*="language-"]':{borderRadius:"5px",border:"1px solid #000",color:"#DCCF8F",background:"#181914 url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAMAAA/+4ADkFkb2JlAGTAAAAAAf/bAIQACQYGBgcGCQcHCQ0IBwgNDwsJCQsPEQ4ODw4OERENDg4ODg0RERQUFhQUERoaHBwaGiYmJiYmKysrKysrKysrKwEJCAgJCgkMCgoMDwwODA8TDg4ODhMVDg4PDg4VGhMRERERExoXGhYWFhoXHR0aGh0dJCQjJCQrKysrKysrKysr/8AAEQgAjACMAwEiAAIRAQMRAf/EAF4AAQEBAAAAAAAAAAAAAAAAAAABBwEBAQAAAAAAAAAAAAAAAAAAAAIQAAEDAwIHAQEAAAAAAAAAAADwAREhYaExkUFRcYGxwdHh8REBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AyGFEjHaBS2fDDs2zkhKmBKktb7km+ZwwCnXPkLVmCTMItj6AXFxRS465/BTnkAJvkLkJe+7AKKoi2AtRS2zuAWsCb5GOlBN8gKfmuGHZ8MFqIth3ALmFoFwbwKWyAlTAp17uKqBvgBD8sM4fTjhvAhkzhaRkBMKBrfs7jGPIpzy7gFrAqnC0C0gB0EWwBDW2cBVQwm+QtPpa3wBO3sVvszCnLAhkzgL5/RLf13cLQd8/AGlu0Cb5HTx9KuAEieGJEdcehS3eRTp2ATdt3CpIm+QtZwAhROXFeb7swp/ahaM3kBE/jSIUBc/AWrgBN8uNFAl+b7sAXFxFn2YLUU5Ns7gFX8C4ib+hN8gFWXwK3bZglxEJm+gKdciLPsFV/TClsgJUwKJ5FVA7tvIFrfZhVfGJDcsCKaYgAqv6YRbE+RWOWBtu7+AL3yRalXLyKqAIIfk+zARbDgFyEsncYwJvlgFRW+GEWntIi2P0BooyFxcNr8Ep3+ANLbMO+QyhvbiqdgC0kVvgUUiLYgBS2QtPbiVI1/sgOmG9uO+Y8DW+7jS2zAOnj6O2BndwuIAUtkdRN8gFoK3wwXMQyZwHVbClsuNLd4E3yAUR6FVDBR+BafQGt93LVMxJTv8ABts4CVLhcfYWsCb5kC9/BHdU8CLYFY5bMAd+eX9MGthhpbA1vu4B7+RKkaW2Yq4AQtVBBFsAJU/AuIXBhN8gGWnstefhiZyWvLAEnbYS1uzSFP6Jvn4Baxx70JKkQojLib5AVTey1jjgkKJGO0AKWyOm7N7cSpgSpAdPH0Tfd/gp1z5C1ZgKqN9J2wFxcUUuAFLZAm+QC0Fb4YUVRFsAOvj4KW2dwtYE3yAWk/wS/PLMKfmuGHZ8MAXF/Ja32Yi5haAKWz4Ydm2cSpgU693Atb7km+Zwwh+WGcPpxw3gAkzCLY+iYUDW/Z3Adc/gpzyFrAqnALkJe+7DoItgAtRS2zuKqGE3yAx0oJvkdvYrfZmALURbDuL5/RLf13cAuDeBS2RpbtAm+QFVA3wR+3fUtFHoBDJnC0jIXH0HWsgMY8inPLuOkd9chp4z20ALQLSA8cI9jYAIa2zjzjBd8gRafS1vgiUho/kAKcsCGTOGWvoOpkAtB3z8Hm8x2Ff5ADp4+lXAlIvcmwH/2Q==') repeat left top",padding:"2px 6px"},namespace:{Opacity:".7"},comment:{color:"#586e75",fontStyle:"italic"},prolog:{color:"#586e75",fontStyle:"italic"},doctype:{color:"#586e75",fontStyle:"italic"},cdata:{color:"#586e75",fontStyle:"italic"},number:{color:"#b89859"},string:{color:"#468966"},char:{color:"#468966"},builtin:{color:"#468966"},inserted:{color:"#468966"},"attr-name":{color:"#b89859"},operator:{color:"#dccf8f"},entity:{color:"#dccf8f",cursor:"help"},url:{color:"#dccf8f"},".language-css .token.string":{color:"#dccf8f"},".style .token.string":{color:"#dccf8f"},selector:{color:"#859900"},regex:{color:"#859900"},atrule:{color:"#cb4b16"},keyword:{color:"#cb4b16"},"attr-value":{color:"#468966"},function:{color:"#b58900"},variable:{color:"#b58900"},placeholder:{color:"#b58900"},property:{color:"#b89859"},tag:{color:"#ffb03b"},boolean:{color:"#b89859"},constant:{color:"#b89859"},symbol:{color:"#b89859"},important:{color:"#dc322f"},statement:{color:"#dc322f"},deleted:{color:"#dc322f"},punctuation:{color:"#dccf8f"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(Q8)),Q8}var e9={},sY;function AYe(){return sY||(sY=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={"code[class*='language-']":{color:"#9efeff",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",fontFamily:"'Operator Mono', 'Fira Code', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontWeight:"400",fontSize:"17px",lineHeight:"25px",letterSpacing:"0.5px",textShadow:"0 1px #222245"},"pre[class*='language-']":{color:"#9efeff",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",fontFamily:"'Operator Mono', 'Fira Code', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontWeight:"400",fontSize:"17px",lineHeight:"25px",letterSpacing:"0.5px",textShadow:"0 1px #222245",padding:"2em",margin:"0.5em 0",overflow:"auto",background:"#1e1e3f"},"pre[class*='language-']::-moz-selection":{color:"inherit",background:"#a599e9"},"pre[class*='language-'] ::-moz-selection":{color:"inherit",background:"#a599e9"},"code[class*='language-']::-moz-selection":{color:"inherit",background:"#a599e9"},"code[class*='language-'] ::-moz-selection":{color:"inherit",background:"#a599e9"},"pre[class*='language-']::selection":{color:"inherit",background:"#a599e9"},"pre[class*='language-'] ::selection":{color:"inherit",background:"#a599e9"},"code[class*='language-']::selection":{color:"inherit",background:"#a599e9"},"code[class*='language-'] ::selection":{color:"inherit",background:"#a599e9"},":not(pre) > code[class*='language-']":{background:"#1e1e3f",padding:"0.1em",borderRadius:"0.3em"},"":{fontWeight:"400"},comment:{color:"#b362ff"},prolog:{color:"#b362ff"},cdata:{color:"#b362ff"},delimiter:{color:"#ff9d00"},keyword:{color:"#ff9d00"},selector:{color:"#ff9d00"},important:{color:"#ff9d00"},atrule:{color:"#ff9d00"},operator:{color:"rgb(255, 180, 84)",background:"none"},"attr-name":{color:"rgb(255, 180, 84)"},punctuation:{color:"#ffffff"},boolean:{color:"rgb(255, 98, 140)"},tag:{color:"rgb(255, 157, 0)"},"tag.punctuation":{color:"rgb(255, 157, 0)"},doctype:{color:"rgb(255, 157, 0)"},builtin:{color:"rgb(255, 157, 0)"},entity:{color:"#6897bb",background:"none"},symbol:{color:"#6897bb"},number:{color:"#ff628c"},property:{color:"#ff628c"},constant:{color:"#ff628c"},variable:{color:"#ff628c"},string:{color:"#a5ff90"},char:{color:"#a5ff90"},"attr-value":{color:"#a5c261"},"attr-value.punctuation":{color:"#a5c261"},"attr-value.punctuation:first-child":{color:"#a9b7c6"},url:{color:"#287bde",textDecoration:"underline",background:"none"},function:{color:"rgb(250, 208, 0)"},regex:{background:"#364135"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},inserted:{background:"#00ff00"},deleted:{background:"#ff000d"},"code.language-css .token.property":{color:"#a9b7c6"},"code.language-css .token.property + .token.punctuation":{color:"#a9b7c6"},"code.language-css .token.id":{color:"#ffc66d"},"code.language-css .token.selector > .token.class":{color:"#ffc66d"},"code.language-css .token.selector > .token.attribute":{color:"#ffc66d"},"code.language-css .token.selector > .token.pseudo-class":{color:"#ffc66d"},"code.language-css .token.selector > .token.pseudo-element":{color:"#ffc66d"},"class-name":{color:"#fb94ff"},".language-css .token.string":{background:"none"},".style .token.string":{background:"none"},".line-highlight.line-highlight":{marginTop:"36px",background:"linear-gradient(to right, rgba(179, 98, 255, 0.17), transparent)"},".line-highlight.line-highlight:before":{content:"''"},".line-highlight.line-highlight[data-end]:after":{content:"''"}}}(e9)),e9}var t9={},iY;function TYe(){return iY||(iY=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#839496",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#839496",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:"Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace",direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",borderRadius:"0.3em",background:"#002b36"},':not(pre) > code[class*="language-"]':{background:"#002b36",padding:".1em",borderRadius:".3em"},comment:{color:"#586e75"},prolog:{color:"#586e75"},doctype:{color:"#586e75"},cdata:{color:"#586e75"},punctuation:{color:"#93a1a1"},".namespace":{Opacity:".7"},property:{color:"#268bd2"},keyword:{color:"#268bd2"},tag:{color:"#268bd2"},"class-name":{color:"#FFFFB6",textDecoration:"underline"},boolean:{color:"#b58900"},constant:{color:"#b58900"},symbol:{color:"#dc322f"},deleted:{color:"#dc322f"},number:{color:"#859900"},selector:{color:"#859900"},"attr-name":{color:"#859900"},string:{color:"#859900"},char:{color:"#859900"},builtin:{color:"#859900"},inserted:{color:"#859900"},variable:{color:"#268bd2"},operator:{color:"#EDEDED"},function:{color:"#268bd2"},regex:{color:"#E9C062"},important:{color:"#fd971f",fontWeight:"bold"},entity:{color:"#FFFFB6",cursor:"help"},url:{color:"#96CBFE"},".language-css .token.string":{color:"#87C38A"},".style .token.string":{color:"#87C38A"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},atrule:{color:"#F9EE98"},"attr-value":{color:"#F9EE98"}}}(t9)),t9}var n9={},oY;function _Ye(){return oY||(oY=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3",background:"none",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",backgroundColor:"transparent !important",backgroundImage:"linear-gradient(to bottom, #2a2139 75%, #34294f)"},':not(pre) > code[class*="language-"]':{backgroundColor:"transparent !important",backgroundImage:"linear-gradient(to bottom, #2a2139 75%, #34294f)",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"#8e8e8e"},"block-comment":{color:"#8e8e8e"},prolog:{color:"#8e8e8e"},doctype:{color:"#8e8e8e"},cdata:{color:"#8e8e8e"},punctuation:{color:"#ccc"},tag:{color:"#e2777a"},"attr-name":{color:"#e2777a"},namespace:{color:"#e2777a"},number:{color:"#e2777a"},unit:{color:"#e2777a"},hexcode:{color:"#e2777a"},deleted:{color:"#e2777a"},property:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"},selector:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"},"function-name":{color:"#6196cc"},boolean:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"},"selector.id":{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"},function:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"},"class-name":{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"},constant:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},symbol:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},important:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575",fontWeight:"bold"},atrule:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"},keyword:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"},"selector.class":{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"},builtin:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"},string:{color:"#f87c32"},char:{color:"#f87c32"},"attr-value":{color:"#f87c32"},regex:{color:"#f87c32"},variable:{color:"#f87c32"},operator:{color:"#67cdcc"},entity:{color:"#67cdcc",cursor:"help"},url:{color:"#67cdcc"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},inserted:{color:"green"}}}(n9)),n9}var r9={},aY;function NYe(){return aY||(aY=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#393A34",fontFamily:'"Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",fontSize:".9em",lineHeight:"1.2em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"#393A34",fontFamily:'"Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",fontSize:".9em",lineHeight:"1.2em",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",border:"1px solid #dddddd",backgroundColor:"white"},'pre > code[class*="language-"]':{fontSize:"1em"},'pre[class*="language-"]::-moz-selection':{background:"#C1DEF1"},'pre[class*="language-"] ::-moz-selection':{background:"#C1DEF1"},'code[class*="language-"]::-moz-selection':{background:"#C1DEF1"},'code[class*="language-"] ::-moz-selection':{background:"#C1DEF1"},'pre[class*="language-"]::selection':{background:"#C1DEF1"},'pre[class*="language-"] ::selection':{background:"#C1DEF1"},'code[class*="language-"]::selection':{background:"#C1DEF1"},'code[class*="language-"] ::selection':{background:"#C1DEF1"},':not(pre) > code[class*="language-"]':{padding:".2em",paddingTop:"1px",paddingBottom:"1px",background:"#f8f8f8",border:"1px solid #dddddd"},comment:{color:"#008000",fontStyle:"italic"},prolog:{color:"#008000",fontStyle:"italic"},doctype:{color:"#008000",fontStyle:"italic"},cdata:{color:"#008000",fontStyle:"italic"},namespace:{Opacity:".7"},string:{color:"#A31515"},punctuation:{color:"#393A34"},operator:{color:"#393A34"},url:{color:"#36acaa"},symbol:{color:"#36acaa"},number:{color:"#36acaa"},boolean:{color:"#36acaa"},variable:{color:"#36acaa"},constant:{color:"#36acaa"},inserted:{color:"#36acaa"},atrule:{color:"#0000ff"},keyword:{color:"#0000ff"},"attr-value":{color:"#0000ff"},".language-autohotkey .token.selector":{color:"#0000ff"},".language-json .token.boolean":{color:"#0000ff"},".language-json .token.number":{color:"#0000ff"},'code[class*="language-css"]':{color:"#0000ff"},function:{color:"#393A34"},deleted:{color:"#9a050f"},".language-autohotkey .token.tag":{color:"#9a050f"},selector:{color:"#800000"},".language-autohotkey .token.keyword":{color:"#00009f"},important:{color:"#e90",fontWeight:"bold"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},"class-name":{color:"#2B91AF"},".language-json .token.property":{color:"#2B91AF"},tag:{color:"#800000"},"attr-name":{color:"#ff0000"},property:{color:"#ff0000"},regex:{color:"#ff0000"},entity:{color:"#ff0000"},"directive.tag.tag":{background:"#ffff00",color:"#393A34"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"#a5a5a5"},".line-numbers .line-numbers-rows > span:before":{color:"#2B91AF"},".line-highlight.line-highlight":{background:"linear-gradient(to right, rgba(193, 222, 241, 0.2) 70%, rgba(221, 222, 241, 0))"}}}(r9)),r9}var s9={},lY;function PYe(){return lY||(lY=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'pre[class*="language-"]':{color:"#d4d4d4",fontSize:"13px",textShadow:"none",fontFamily:'Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",background:"#1e1e1e"},'code[class*="language-"]':{color:"#d4d4d4",fontSize:"13px",textShadow:"none",fontFamily:'Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#264F78"},'code[class*="language-"]::selection':{textShadow:"none",background:"#264F78"},'pre[class*="language-"] *::selection':{textShadow:"none",background:"#264F78"},'code[class*="language-"] *::selection':{textShadow:"none",background:"#264F78"},':not(pre) > code[class*="language-"]':{padding:".1em .3em",borderRadius:".3em",color:"#db4c69",background:"#1e1e1e"},".namespace":{Opacity:".7"},"doctype.doctype-tag":{color:"#569CD6"},"doctype.name":{color:"#9cdcfe"},comment:{color:"#6a9955"},prolog:{color:"#6a9955"},punctuation:{color:"#d4d4d4"},".language-html .language-css .token.punctuation":{color:"#d4d4d4"},".language-html .language-javascript .token.punctuation":{color:"#d4d4d4"},property:{color:"#9cdcfe"},tag:{color:"#569cd6"},boolean:{color:"#569cd6"},number:{color:"#b5cea8"},constant:{color:"#9cdcfe"},symbol:{color:"#b5cea8"},inserted:{color:"#b5cea8"},unit:{color:"#b5cea8"},selector:{color:"#d7ba7d"},"attr-name":{color:"#9cdcfe"},string:{color:"#ce9178"},char:{color:"#ce9178"},builtin:{color:"#ce9178"},deleted:{color:"#ce9178"},".language-css .token.string.url":{textDecoration:"underline"},operator:{color:"#d4d4d4"},entity:{color:"#569cd6"},"operator.arrow":{color:"#569CD6"},atrule:{color:"#ce9178"},"atrule.rule":{color:"#c586c0"},"atrule.url":{color:"#9cdcfe"},"atrule.url.function":{color:"#dcdcaa"},"atrule.url.punctuation":{color:"#d4d4d4"},keyword:{color:"#569CD6"},"keyword.module":{color:"#c586c0"},"keyword.control-flow":{color:"#c586c0"},function:{color:"#dcdcaa"},"function.maybe-class-name":{color:"#dcdcaa"},regex:{color:"#d16969"},important:{color:"#569cd6"},italic:{fontStyle:"italic"},"class-name":{color:"#4ec9b0"},"maybe-class-name":{color:"#4ec9b0"},console:{color:"#9cdcfe"},parameter:{color:"#9cdcfe"},interpolation:{color:"#9cdcfe"},"punctuation.interpolation-punctuation":{color:"#569cd6"},variable:{color:"#9cdcfe"},"imports.maybe-class-name":{color:"#9cdcfe"},"exports.maybe-class-name":{color:"#9cdcfe"},escape:{color:"#d7ba7d"},"tag.punctuation":{color:"#808080"},cdata:{color:"#808080"},"attr-value":{color:"#ce9178"},"attr-value.punctuation":{color:"#ce9178"},"attr-value.punctuation.attr-equals":{color:"#d4d4d4"},namespace:{color:"#4ec9b0"},'pre[class*="language-javascript"]':{color:"#9cdcfe"},'code[class*="language-javascript"]':{color:"#9cdcfe"},'pre[class*="language-jsx"]':{color:"#9cdcfe"},'code[class*="language-jsx"]':{color:"#9cdcfe"},'pre[class*="language-typescript"]':{color:"#9cdcfe"},'code[class*="language-typescript"]':{color:"#9cdcfe"},'pre[class*="language-tsx"]':{color:"#9cdcfe"},'code[class*="language-tsx"]':{color:"#9cdcfe"},'pre[class*="language-css"]':{color:"#ce9178"},'code[class*="language-css"]':{color:"#ce9178"},'pre[class*="language-html"]':{color:"#d4d4d4"},'code[class*="language-html"]':{color:"#d4d4d4"},".language-regex .token.anchor":{color:"#dcdcaa"},".language-html .token.punctuation":{color:"#808080"},'pre[class*="language-"] > code[class*="language-"]':{position:"relative",zIndex:"1"},".line-highlight.line-highlight":{background:"#f7ebc6",boxShadow:"inset 5px 0 0 #f7d87c",zIndex:"0"}}}(s9)),s9}var i9={},cY;function MYe(){return cY||(cY=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",whiteSpace:"pre-wrap",wordWrap:"normal",fontFamily:'Menlo, Monaco, "Courier New", monospace',fontSize:"14px",color:"#76d9e6",textShadow:"none"},'pre[class*="language-"]':{MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",whiteSpace:"pre-wrap",wordWrap:"normal",fontFamily:'Menlo, Monaco, "Courier New", monospace',fontSize:"14px",color:"#76d9e6",textShadow:"none",background:"#2a2a2a",padding:"15px",borderRadius:"4px",border:"1px solid #e1e1e8",overflow:"auto",position:"relative"},'pre > code[class*="language-"]':{fontSize:"1em"},':not(pre) > code[class*="language-"]':{background:"#2a2a2a",padding:"0.15em 0.2em 0.05em",borderRadius:".3em",border:"0.13em solid #7a6652",boxShadow:"1px 1px 0.3em -0.1em #000 inset"},'pre[class*="language-"] code':{whiteSpace:"pre",display:"block"},namespace:{Opacity:".7"},comment:{color:"#6f705e"},prolog:{color:"#6f705e"},doctype:{color:"#6f705e"},cdata:{color:"#6f705e"},operator:{color:"#a77afe"},boolean:{color:"#a77afe"},number:{color:"#a77afe"},"attr-name":{color:"#e6d06c"},string:{color:"#e6d06c"},entity:{color:"#e6d06c",cursor:"help"},url:{color:"#e6d06c"},".language-css .token.string":{color:"#e6d06c"},".style .token.string":{color:"#e6d06c"},selector:{color:"#a6e22d"},inserted:{color:"#a6e22d"},atrule:{color:"#ef3b7d"},"attr-value":{color:"#ef3b7d"},keyword:{color:"#ef3b7d"},important:{color:"#ef3b7d",fontWeight:"bold"},deleted:{color:"#ef3b7d"},regex:{color:"#76d9e6"},statement:{color:"#76d9e6",fontWeight:"bold"},placeholder:{color:"#fff"},variable:{color:"#fff"},bold:{fontWeight:"bold"},punctuation:{color:"#bebec5"},italic:{fontStyle:"italic"},"code.language-markup":{color:"#f9f9f9"},"code.language-markup .token.tag":{color:"#ef3b7d"},"code.language-markup .token.attr-name":{color:"#a6e22d"},"code.language-markup .token.attr-value":{color:"#e6d06c"},"code.language-markup .token.style":{color:"#76d9e6"},"code.language-markup .token.script":{color:"#76d9e6"},"code.language-markup .token.script .token.keyword":{color:"#76d9e6"},".line-highlight.line-highlight":{padding:"0",background:"rgba(255, 255, 255, 0.08)"},".line-highlight.line-highlight:before":{padding:"0.2em 0.5em",backgroundColor:"rgba(255, 255, 255, 0.4)",color:"black",height:"1em",lineHeight:"1em",boxShadow:"0 1px 1px rgba(255, 255, 255, 0.7)"},".line-highlight.line-highlight[data-end]:after":{padding:"0.2em 0.5em",backgroundColor:"rgba(255, 255, 255, 0.4)",color:"black",height:"1em",lineHeight:"1em",boxShadow:"0 1px 1px rgba(255, 255, 255, 0.7)"}}}(i9)),i9}var o9={},uY;function jYe(){return uY||(uY=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={'code[class*="language-"]':{color:"#22da17",fontFamily:"monospace",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",lineHeight:"25px",fontSize:"18px",margin:"5px 0"},'pre[class*="language-"]':{color:"white",fontFamily:"monospace",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",lineHeight:"25px",fontSize:"18px",margin:"0.5em 0",background:"#0a143c",padding:"1em",overflow:"auto"},'pre[class*="language-"] *':{fontFamily:"monospace"},':not(pre) > code[class*="language-"]':{color:"white",background:"#0a143c",padding:"0.1em",borderRadius:"0.3em",whiteSpace:"normal"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'pre[class*="language-"]::selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'code[class*="language-"]::selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},'code[class*="language-"] ::selection':{textShadow:"none",background:"rgba(29, 59, 83, 0.99)"},comment:{color:"rgb(99, 119, 119)",fontStyle:"italic"},prolog:{color:"rgb(99, 119, 119)",fontStyle:"italic"},cdata:{color:"rgb(99, 119, 119)",fontStyle:"italic"},punctuation:{color:"rgb(199, 146, 234)"},".namespace":{color:"rgb(178, 204, 214)"},deleted:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"},symbol:{color:"rgb(128, 203, 196)"},property:{color:"rgb(128, 203, 196)"},tag:{color:"rgb(127, 219, 202)"},operator:{color:"rgb(127, 219, 202)"},keyword:{color:"rgb(127, 219, 202)"},boolean:{color:"rgb(255, 88, 116)"},number:{color:"rgb(247, 140, 108)"},constant:{color:"rgb(34 183 199)"},function:{color:"rgb(34 183 199)"},builtin:{color:"rgb(34 183 199)"},char:{color:"rgb(34 183 199)"},selector:{color:"rgb(199, 146, 234)",fontStyle:"italic"},doctype:{color:"rgb(199, 146, 234)",fontStyle:"italic"},"attr-name":{color:"rgb(173, 219, 103)",fontStyle:"italic"},inserted:{color:"rgb(173, 219, 103)",fontStyle:"italic"},string:{color:"rgb(173, 219, 103)"},url:{color:"rgb(173, 219, 103)"},entity:{color:"rgb(173, 219, 103)"},".language-css .token.string":{color:"rgb(173, 219, 103)"},".style .token.string":{color:"rgb(173, 219, 103)"},"class-name":{color:"rgb(255, 203, 139)"},atrule:{color:"rgb(255, 203, 139)"},"attr-value":{color:"rgb(255, 203, 139)"},regex:{color:"rgb(214, 222, 235)"},important:{color:"rgb(214, 222, 235)",fontWeight:"bold"},variable:{color:"rgb(214, 222, 235)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}}}(o9)),o9}var dY;function FYe(){return dY||(dY=1,function(e){var t=VGe();Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"a11yDark",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"atomDark",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(e,"base16AteliersulphurpoolLight",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(e,"cb",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(e,"coldarkCold",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(e,"coldarkDark",{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(e,"coy",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"coyWithoutShadows",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(e,"darcula",{enumerable:!0,get:function(){return E.default}}),Object.defineProperty(e,"dark",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"dracula",{enumerable:!0,get:function(){return k.default}}),Object.defineProperty(e,"duotoneDark",{enumerable:!0,get:function(){return T.default}}),Object.defineProperty(e,"duotoneEarth",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(e,"duotoneForest",{enumerable:!0,get:function(){return M.default}}),Object.defineProperty(e,"duotoneLight",{enumerable:!0,get:function(){return j.default}}),Object.defineProperty(e,"duotoneSea",{enumerable:!0,get:function(){return F.default}}),Object.defineProperty(e,"duotoneSpace",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(e,"funky",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"ghcolors",{enumerable:!0,get:function(){return B.default}}),Object.defineProperty(e,"gruvboxDark",{enumerable:!0,get:function(){return L.default}}),Object.defineProperty(e,"gruvboxLight",{enumerable:!0,get:function(){return W.default}}),Object.defineProperty(e,"holiTheme",{enumerable:!0,get:function(){return $.default}}),Object.defineProperty(e,"hopscotch",{enumerable:!0,get:function(){return J.default}}),Object.defineProperty(e,"lucario",{enumerable:!0,get:function(){return V.default}}),Object.defineProperty(e,"materialDark",{enumerable:!0,get:function(){return Z.default}}),Object.defineProperty(e,"materialLight",{enumerable:!0,get:function(){return G.default}}),Object.defineProperty(e,"materialOceanic",{enumerable:!0,get:function(){return q.default}}),Object.defineProperty(e,"nightOwl",{enumerable:!0,get:function(){return z.default}}),Object.defineProperty(e,"nord",{enumerable:!0,get:function(){return Y.default}}),Object.defineProperty(e,"okaidia",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"oneDark",{enumerable:!0,get:function(){return U.default}}),Object.defineProperty(e,"oneLight",{enumerable:!0,get:function(){return X.default}}),Object.defineProperty(e,"pojoaque",{enumerable:!0,get:function(){return ne.default}}),Object.defineProperty(e,"prism",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"shadesOfPurple",{enumerable:!0,get:function(){return H.default}}),Object.defineProperty(e,"solarizedDarkAtom",{enumerable:!0,get:function(){return ee.default}}),Object.defineProperty(e,"solarizedlight",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"synthwave84",{enumerable:!0,get:function(){return ie.default}}),Object.defineProperty(e,"tomorrow",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"twilight",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"vs",{enumerable:!0,get:function(){return se.default}}),Object.defineProperty(e,"vscDarkPlus",{enumerable:!0,get:function(){return ae.default}}),Object.defineProperty(e,"xonokai",{enumerable:!0,get:function(){return le.default}}),Object.defineProperty(e,"zTouch",{enumerable:!0,get:function(){return pe.default}});var n=t(UGe()),r=t(WGe()),s=t(qGe()),i=t(GGe()),o=t(YGe()),a=t(KGe()),l=t(XGe()),c=t(JGe()),u=t(ZGe()),d=t(QGe()),p=t(eYe()),g=t(tYe()),b=t(nYe()),x=t(rYe()),S=t(sYe()),E=t(iYe()),k=t(oYe()),T=t(aYe()),P=t(lYe()),M=t(cYe()),j=t(uYe()),F=t(dYe()),I=t(hYe()),B=t(fYe()),L=t(pYe()),W=t(mYe()),$=t(gYe()),J=t(yYe()),V=t(bYe()),Z=t(xYe()),G=t(vYe()),q=t(wYe()),z=t(SYe()),Y=t(CYe()),U=t(kYe()),X=t(EYe()),ne=t(DYe()),H=t(AYe()),ee=t(TYe()),ie=t(_Ye()),se=t(NYe()),ae=t(PYe()),le=t(MYe()),pe=t(jYe())}(m8)),m8}var IYe=FYe();const Vce=1024;let OYe=0,a9=class{constructor(t,n){this.from=t,this.to=n}};class fn{constructor(t={}){this.id=OYe++,this.perNode=!!t.perNode,this.deserialize=t.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(t){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof t!="function"&&(t=Yo.match(t)),n=>{let r=t(n);return r===void 0?null:[this,r]}}}fn.closedBy=new fn({deserialize:e=>e.split(" ")});fn.openedBy=new fn({deserialize:e=>e.split(" ")});fn.group=new fn({deserialize:e=>e.split(" ")});fn.isolate=new fn({deserialize:e=>{if(e&&e!="rtl"&&e!="ltr"&&e!="auto")throw new RangeError("Invalid value for isolate: "+e);return e||"auto"}});fn.contextHash=new fn({perNode:!0});fn.lookAhead=new fn({perNode:!0});fn.mounted=new fn({perNode:!0});class t3{constructor(t,n,r){this.tree=t,this.overlay=n,this.parser=r}static get(t){return t&&t.props&&t.props[fn.mounted.id]}}const RYe=Object.create(null);class Yo{constructor(t,n,r,s=0){this.name=t,this.props=n,this.id=r,this.flags=s}static define(t){let n=t.props&&t.props.length?Object.create(null):RYe,r=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(t.name==null?8:0),s=new Yo(t.name||"",n,t.id,r);if(t.props){for(let i of t.props)if(Array.isArray(i)||(i=i(s)),i){if(i[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[i[0].id]=i[1]}}return s}prop(t){return this.props[t.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(t){if(typeof t=="string"){if(this.name==t)return!0;let n=this.prop(fn.group);return n?n.indexOf(t)>-1:!1}return this.id==t}static match(t){let n=Object.create(null);for(let r in t)for(let s of r.split(" "))n[s]=t[r];return r=>{for(let s=r.prop(fn.group),i=-1;i<(s?s.length:0);i++){let o=n[i<0?r.name:s[i]];if(o)return o}}}}Yo.none=new Yo("",Object.create(null),0,8);class _R{constructor(t){this.types=t;for(let n=0;n<t.length;n++)if(t[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...t){let n=[];for(let r of this.types){let s=null;for(let i of t){let o=i(r);o&&(s||(s=Object.assign({},r.props)),s[o[0].id]=o[1])}n.push(s?new Yo(r.name,s,r.id,r.flags):r)}return new _R(n)}}const A2=new WeakMap,hY=new WeakMap;var Ys;(function(e){e[e.ExcludeBuffers=1]="ExcludeBuffers",e[e.IncludeAnonymous=2]="IncludeAnonymous",e[e.IgnoreMounts=4]="IgnoreMounts",e[e.IgnoreOverlays=8]="IgnoreOverlays"})(Ys||(Ys={}));class ws{constructor(t,n,r,s,i){if(this.type=t,this.children=n,this.positions=r,this.length=s,this.props=null,i&&i.length){this.props=Object.create(null);for(let[o,a]of i)this.props[typeof o=="number"?o:o.id]=a}}toString(){let t=t3.get(this);if(t&&!t.overlay)return t.tree.toString();let n="";for(let r of this.children){let s=r.toString();s&&(n&&(n+=","),n+=s)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(t=0){return new nM(this.topNode,t)}cursorAt(t,n=0,r=0){let s=A2.get(this)||this.topNode,i=new nM(s);return i.moveTo(t,n),A2.set(this,i._tree),i}get topNode(){return new il(this,0,0,null)}resolve(t,n=0){let r=Xw(A2.get(this)||this.topNode,t,n,!1);return A2.set(this,r),r}resolveInner(t,n=0){let r=Xw(hY.get(this)||this.topNode,t,n,!0);return hY.set(this,r),r}resolveStack(t,n=0){return $Ye(this,t,n)}iterate(t){let{enter:n,leave:r,from:s=0,to:i=this.length}=t,o=t.mode||0,a=(o&Ys.IncludeAnonymous)>0;for(let l=this.cursor(o|Ys.IncludeAnonymous);;){let c=!1;if(l.from<=i&&l.to>=s&&(!a&&l.type.isAnonymous||n(l)!==!1)){if(l.firstChild())continue;c=!0}for(;c&&r&&(a||!l.type.isAnonymous)&&r(l),!l.nextSibling();){if(!l.parent())return;c=!0}}}prop(t){return t.perNode?this.props?this.props[t.id]:void 0:this.type.prop(t)}get propValues(){let t=[];if(this.props)for(let n in this.props)t.push([+n,this.props[n]]);return t}balance(t={}){return this.children.length<=8?this:MR(Yo.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,s)=>new ws(this.type,n,r,s,this.propValues),t.makeTree||((n,r,s)=>new ws(Yo.none,n,r,s)))}static build(t){return zYe(t)}}ws.empty=new ws(Yo.none,[],[],0);class NR{constructor(t,n){this.buffer=t,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new NR(this.buffer,this.index)}}class bp{constructor(t,n,r){this.buffer=t,this.length=n,this.set=r}get type(){return Yo.none}toString(){let t=[];for(let n=0;n<this.buffer.length;)t.push(this.childString(n)),n=this.buffer[n+3];return t.join(",")}childString(t){let n=this.buffer[t],r=this.buffer[t+3],s=this.set.types[n],i=s.name;if(/\W/.test(i)&&!s.isError&&(i=JSON.stringify(i)),t+=4,r==t)return i;let o=[];for(;t<r;)o.push(this.childString(t)),t=this.buffer[t+3];return i+"("+o.join(",")+")"}findChild(t,n,r,s,i){let{buffer:o}=this,a=-1;for(let l=t;l!=n&&!(Uce(i,s,o[l+1],o[l+2])&&(a=l,r>0));l=o[l+3]);return a}slice(t,n,r){let s=this.buffer,i=new Uint16Array(n-t),o=0;for(let a=t,l=0;a<n;){i[l++]=s[a++],i[l++]=s[a++]-r;let c=i[l++]=s[a++]-r;i[l++]=s[a++]-t,o=Math.max(o,c)}return new bp(i,o,this.set)}}function Uce(e,t,n,r){switch(e){case-2:return n<t;case-1:return r>=t&&n<t;case 0:return n<t&&r>t;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function Xw(e,t,n,r){for(var s;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to<t);){let o=!r&&e instanceof il&&e.index<0?null:e.parent;if(!o)return e;e=o}let i=r?0:Ys.IgnoreOverlays;if(r)for(let o=e,a=o.parent;a;o=a,a=o.parent)o instanceof il&&o.index<0&&((s=a.enter(t,n,i))===null||s===void 0?void 0:s.from)!=o.from&&(e=a);for(;;){let o=e.enter(t,n,i);if(!o)return e;e=o}}class Wce{cursor(t=0){return new nM(this,t)}getChild(t,n=null,r=null){let s=fY(this,t,n,r);return s.length?s[0]:null}getChildren(t,n=null,r=null){return fY(this,t,n,r)}resolve(t,n=0){return Xw(this,t,n,!1)}resolveInner(t,n=0){return Xw(this,t,n,!0)}matchContext(t){return tM(this.parent,t)}enterUnfinishedNodesBefore(t){let n=this.childBefore(t),r=this;for(;n;){let s=n.lastChild;if(!s||s.to!=n.to)break;s.type.isError&&s.from==s.to?(r=n,n=s.prevSibling):n=s}return r}get node(){return this}get next(){return this.parent}}class il extends Wce{constructor(t,n,r,s){super(),this._tree=t,this.from=n,this.index=r,this._parent=s}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(t,n,r,s,i=0){for(let o=this;;){for(let{children:a,positions:l}=o._tree,c=n>0?a.length:-1;t!=c;t+=n){let u=a[t],d=l[t]+o.from;if(Uce(s,r,d,d+u.length)){if(u instanceof bp){if(i&Ys.ExcludeBuffers)continue;let p=u.findChild(0,u.buffer.length,n,r-d,s);if(p>-1)return new Yf(new LYe(o,u,t,d),null,p)}else if(i&Ys.IncludeAnonymous||!u.type.isAnonymous||PR(u)){let p;if(!(i&Ys.IgnoreMounts)&&(p=t3.get(u))&&!p.overlay)return new il(p.tree,d,t,o);let g=new il(u,d,t,o);return i&Ys.IncludeAnonymous||!g.type.isAnonymous?g:g.nextChild(n<0?u.children.length-1:0,n,r,s)}}}if(i&Ys.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?t=o.index+n:t=n<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(t){return this.nextChild(0,1,t,2)}childBefore(t){return this.nextChild(this._tree.children.length-1,-1,t,-2)}enter(t,n,r=0){let s;if(!(r&Ys.IgnoreOverlays)&&(s=t3.get(this._tree))&&s.overlay){let i=t-this.from;for(let{from:o,to:a}of s.overlay)if((n>0?o<=i:o<i)&&(n<0?a>=i:a>i))return new il(s.tree,s.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,n,r)}nextSignificantParent(){let t=this;for(;t.type.isAnonymous&&t._parent;)t=t._parent;return t}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function fY(e,t,n,r){let s=e.cursor(),i=[];if(!s.firstChild())return i;if(n!=null){for(let o=!1;!o;)if(o=s.type.is(n),!s.nextSibling())return i}for(;;){if(r!=null&&s.type.is(r))return i;if(s.type.is(t)&&i.push(s.node),!s.nextSibling())return r==null?i:[]}}function tM(e,t,n=t.length-1){for(let r=e;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}class LYe{constructor(t,n,r,s){this.parent=t,this.buffer=n,this.index=r,this.start=s}}class Yf extends Wce{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(t,n,r){super(),this.context=t,this._parent=n,this.index=r,this.type=t.buffer.set.types[t.buffer.buffer[r]]}child(t,n,r){let{buffer:s}=this.context,i=s.findChild(this.index+4,s.buffer[this.index+3],t,n-this.context.start,r);return i<0?null:new Yf(this.context,this,i)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(t){return this.child(1,t,2)}childBefore(t){return this.child(-1,t,-2)}enter(t,n,r=0){if(r&Ys.ExcludeBuffers)return null;let{buffer:s}=this.context,i=s.findChild(this.index+4,s.buffer[this.index+3],n>0?1:-1,t-this.context.start,n);return i<0?null:new Yf(this.context,this,i)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(t){return this._parent?null:this.context.parent.nextChild(this.context.index+t,t,0,4)}get nextSibling(){let{buffer:t}=this.context,n=t.buffer[this.index+3];return n<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new Yf(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new Yf(this.context,this._parent,t.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let t=[],n=[],{buffer:r}=this.context,s=this.index+4,i=r.buffer[this.index+3];if(i>s){let o=r.buffer[this.index+1];t.push(r.slice(s,i,o)),n.push(0)}return new ws(this.type,t,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function qce(e){if(!e.length)return null;let t=0,n=e[0];for(let i=1;i<e.length;i++){let o=e[i];(o.from>n.from||o.to<n.to)&&(n=o,t=i)}let r=n instanceof il&&n.index<0?null:n.parent,s=e.slice();return r?s[t]=r:s.splice(t,1),new BYe(s,n)}class BYe{constructor(t,n){this.heads=t,this.node=n}get next(){return qce(this.heads)}}function $Ye(e,t,n){let r=e.resolveInner(t,n),s=null;for(let i=r instanceof il?r:r.context.parent;i;i=i.parent)if(i.index<0){let o=i.parent;(s||(s=[r])).push(o.resolve(t,n)),i=o}else{let o=t3.get(i.tree);if(o&&o.overlay&&o.overlay[0].from<=t&&o.overlay[o.overlay.length-1].to>=t){let a=new il(o.tree,o.overlay[0].from+i.from,-1,i);(s||(s=[r])).push(Xw(a,t,n,!1))}}return s?qce(s):r}class nM{get name(){return this.type.name}constructor(t,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,t instanceof il)this.yieldNode(t);else{this._tree=t.context.parent,this.buffer=t.context;for(let r=t._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=t,this.yieldBuf(t.index)}}yieldNode(t){return t?(this._tree=t,this.type=t.type,this.from=t.from,this.to=t.to,!0):!1}yieldBuf(t,n){this.index=t;let{start:r,buffer:s}=this.buffer;return this.type=n||s.set.types[s.buffer[t]],this.from=r+s.buffer[t+1],this.to=r+s.buffer[t+2],!0}yield(t){return t?t instanceof il?(this.buffer=null,this.yieldNode(t)):(this.buffer=t.context,this.yieldBuf(t.index,t.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(t,n,r){if(!this.buffer)return this.yield(this._tree.nextChild(t<0?this._tree._tree.children.length-1:0,t,n,r,this.mode));let{buffer:s}=this.buffer,i=s.findChild(this.index+4,s.buffer[this.index+3],t,n-this.buffer.start,r);return i<0?!1:(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(t){return this.enterChild(1,t,2)}childBefore(t){return this.enterChild(-1,t,-2)}enter(t,n,r=this.mode){return this.buffer?r&Ys.ExcludeBuffers?!1:this.enterChild(1,t,n):this.yield(this._tree.enter(t,n,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Ys.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let t=this.mode&Ys.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(t)}sibling(t){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+t,t,0,4,this.mode)):!1;let{buffer:n}=this.buffer,r=this.stack.length-1;if(t<0){let s=r<0?0:this.stack[r]+4;if(this.index!=s)return this.yieldBuf(n.findChild(s,this.index,-1,0,4))}else{let s=n.buffer[this.index+3];if(s<(r<0?n.buffer.length:n.buffer[this.stack[r]+3]))return this.yieldBuf(s)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+t,t,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(t){let n,r,{buffer:s}=this;if(s){if(t>0){if(this.index<s.buffer.buffer.length)return!1}else for(let i=0;i<this.index;i++)if(s.buffer.buffer[i+3]<this.index)return!1;({index:n,parent:r}=s)}else({index:n,_parent:r}=this._tree);for(;r;{index:n,_parent:r}=r)if(n>-1)for(let i=n+t,o=t<0?-1:r._tree.children.length;i!=o;i+=t){let a=r._tree.children[i];if(this.mode&Ys.IncludeAnonymous||a instanceof bp||!a.type.isAnonymous||PR(a))return!1}return!0}move(t,n){if(n&&this.enterChild(t,0,4))return!0;for(;;){if(this.sibling(t))return!0;if(this.atLastNode(t)||!this.parent())return!1}}next(t=!0){return this.move(1,t)}prev(t=!0){return this.move(-1,t)}moveTo(t,n=0){for(;(this.from==this.to||(n<1?this.from>=t:this.from>t)||(n>-1?this.to<=t:this.to<t))&&this.parent(););for(;this.enterChild(1,t,n););return this}get node(){if(!this.buffer)return this._tree;let t=this.bufferNode,n=null,r=0;if(t&&t.context==this.buffer)e:for(let s=this.index,i=this.stack.length;i>=0;){for(let o=t;o;o=o._parent)if(o.index==s){if(s==this.index)return o;n=o,r=i+1;break e}s=this.stack[--i]}for(let s=r;s<this.stack.length;s++)n=new Yf(this.buffer,n,this.stack[s]);return this.bufferNode=new Yf(this.buffer,n,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(t,n){for(let r=0;;){let s=!1;if(this.type.isAnonymous||t(this)!==!1){if(this.firstChild()){r++;continue}this.type.isAnonymous||(s=!0)}for(;;){if(s&&n&&n(this),s=this.type.isAnonymous,!r)return;if(this.nextSibling())break;this.parent(),r--,s=!0}}}matchContext(t){if(!this.buffer)return tM(this.node.parent,t);let{buffer:n}=this.buffer,{types:r}=n.set;for(let s=t.length-1,i=this.stack.length-1;s>=0;i--){if(i<0)return tM(this._tree,t,s);let o=r[n.buffer[this.stack[i]]];if(!o.isAnonymous){if(t[s]&&t[s]!=o.name)return!1;s--}}return!0}}function PR(e){return e.children.some(t=>t instanceof bp||!t.type.isAnonymous||PR(t))}function zYe(e){var t;let{buffer:n,nodeSet:r,maxBufferLength:s=Vce,reused:i=[],minRepeatType:o=r.types.length}=e,a=Array.isArray(n)?new NR(n,n.length):n,l=r.types,c=0,u=0;function d(M,j,F,I,B,L){let{id:W,start:$,end:J,size:V}=a,Z=u,G=c;for(;V<0;)if(a.next(),V==-1){let X=i[W];F.push(X),I.push($-M);return}else if(V==-3){c=W;return}else if(V==-4){u=W;return}else throw new RangeError(`Unrecognized record size: ${V}`);let q=l[W],z,Y,U=$-M;if(J-$<=s&&(Y=S(a.pos-j,B))){let X=new Uint16Array(Y.size-Y.skip),ne=a.pos-Y.size,H=X.length;for(;a.pos>ne;)H=E(Y.start,X,H);z=new bp(X,J-Y.start,r),U=Y.start-M}else{let X=a.pos-V;a.next();let ne=[],H=[],ee=W>=o?W:-1,ie=0,se=J;for(;a.pos>X;)ee>=0&&a.id==ee&&a.size>=0?(a.end<=se-s&&(b(ne,H,$,ie,a.end,se,ee,Z,G),ie=ne.length,se=a.end),a.next()):L>2500?p($,X,ne,H):d($,X,ne,H,ee,L+1);if(ee>=0&&ie>0&&ie<ne.length&&b(ne,H,$,ie,$,se,ee,Z,G),ne.reverse(),H.reverse(),ee>-1&&ie>0){let ae=g(q,G);z=MR(q,ne,H,0,ne.length,0,J-$,ae,ae)}else z=x(q,ne,H,J-$,Z-J,G)}F.push(z),I.push(U)}function p(M,j,F,I){let B=[],L=0,W=-1;for(;a.pos>j;){let{id:$,start:J,end:V,size:Z}=a;if(Z>4)a.next();else{if(W>-1&&J<W)break;W<0&&(W=V-s),B.push($,J,V),L++,a.next()}}if(L){let $=new Uint16Array(L*4),J=B[B.length-2];for(let V=B.length-3,Z=0;V>=0;V-=3)$[Z++]=B[V],$[Z++]=B[V+1]-J,$[Z++]=B[V+2]-J,$[Z++]=Z;F.push(new bp($,B[2]-J,r)),I.push(J-M)}}function g(M,j){return(F,I,B)=>{let L=0,W=F.length-1,$,J;if(W>=0&&($=F[W])instanceof ws){if(!W&&$.type==M&&$.length==B)return $;(J=$.prop(fn.lookAhead))&&(L=I[W]+$.length+J)}return x(M,F,I,B,L,j)}}function b(M,j,F,I,B,L,W,$,J){let V=[],Z=[];for(;M.length>I;)V.push(M.pop()),Z.push(j.pop()+F-B);M.push(x(r.types[W],V,Z,L-B,$-L,J)),j.push(B-F)}function x(M,j,F,I,B,L,W){if(L){let $=[fn.contextHash,L];W=W?[$].concat(W):[$]}if(B>25){let $=[fn.lookAhead,B];W=W?[$].concat(W):[$]}return new ws(M,j,F,I,W)}function S(M,j){let F=a.fork(),I=0,B=0,L=0,W=F.end-s,$={size:0,start:0,skip:0};e:for(let J=F.pos-M;F.pos>J;){let V=F.size;if(F.id==j&&V>=0){$.size=I,$.start=B,$.skip=L,L+=4,I+=4,F.next();continue}let Z=F.pos-V;if(V<0||Z<J||F.start<W)break;let G=F.id>=o?4:0,q=F.start;for(F.next();F.pos>Z;){if(F.size<0)if(F.size==-3)G+=4;else break e;else F.id>=o&&(G+=4);F.next()}B=q,I+=V,L+=G}return(j<0||I==M)&&($.size=I,$.start=B,$.skip=L),$.size>4?$:void 0}function E(M,j,F){let{id:I,start:B,end:L,size:W}=a;if(a.next(),W>=0&&I<o){let $=F;if(W>4){let J=a.pos-(W-4);for(;a.pos>J;)F=E(M,j,F)}j[--F]=$,j[--F]=L-M,j[--F]=B-M,j[--F]=I}else W==-3?c=I:W==-4&&(u=I);return F}let k=[],T=[];for(;a.pos>0;)d(e.start||0,e.bufferStart||0,k,T,-1,0);let P=(t=e.length)!==null&&t!==void 0?t:k.length?T[0]+k[0].length:0;return new ws(l[e.topID],k.reverse(),T.reverse(),P)}const pY=new WeakMap;function YE(e,t){if(!e.isAnonymous||t instanceof bp||t.type!=e)return 1;let n=pY.get(t);if(n==null){n=1;for(let r of t.children){if(r.type!=e||!(r instanceof ws)){n=1;break}n+=YE(e,r)}pY.set(t,n)}return n}function MR(e,t,n,r,s,i,o,a,l){let c=0;for(let b=r;b<s;b++)c+=YE(e,t[b]);let u=Math.ceil(c*1.5/8),d=[],p=[];function g(b,x,S,E,k){for(let T=S;T<E;){let P=T,M=x[T],j=YE(e,b[T]);for(T++;T<E;T++){let F=YE(e,b[T]);if(j+F>=u)break;j+=F}if(T==P+1){if(j>u){let F=b[P];g(F.children,F.positions,0,F.children.length,x[P]+k);continue}d.push(b[P])}else{let F=x[T-1]+b[T-1].length-M;d.push(MR(e,b,x,P,T,M,F,null,l))}p.push(M+k-i)}}return g(t,n,r,s,0),(a||l)(d,p,o)}class ag{constructor(t,n,r,s,i=!1,o=!1){this.from=t,this.to=n,this.tree=r,this.offset=s,this.open=(i?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(t,n=[],r=!1){let s=[new ag(0,t.length,t,0,!1,r)];for(let i of n)i.to>t.length&&s.push(i);return s}static applyChanges(t,n,r=128){if(!n.length)return t;let s=[],i=1,o=t.length?t[0]:null;for(let a=0,l=0,c=0;;a++){let u=a<n.length?n[a]:null,d=u?u.fromA:1e9;if(d-l>=r)for(;o&&o.from<d;){let p=o;if(l>=p.from||d<=p.to||c){let g=Math.max(p.from,l)-c,b=Math.min(p.to,d)-c;p=g>=b?null:new ag(g,b,p.tree,p.offset+c,a>0,!!u)}if(p&&s.push(p),o.to>d)break;o=i<t.length?t[i++]:null}if(!u)break;l=u.toA,c=u.toA-u.toB}return s}}class Gce{startParse(t,n,r){return typeof t=="string"&&(t=new HYe(t)),r=r?r.length?r.map(s=>new a9(s.from,s.to)):[new a9(0,0)]:[new a9(0,t.length)],this.createParse(t,n||[],r)}parse(t,n,r){let s=this.startParse(t,n,r);for(;;){let i=s.advance();if(i)return i}}}class HYe{constructor(t){this.string=t}get length(){return this.string.length}chunk(t){return this.string.slice(t)}get lineChunks(){return!1}read(t,n){return this.string.slice(t,n)}}new fn({perNode:!0});var VYe={},mY={};class n3{constructor(t,n,r,s,i,o,a,l,c,u=0,d){this.p=t,this.stack=n,this.state=r,this.reducePos=s,this.pos=i,this.score=o,this.buffer=a,this.bufferBase=l,this.curContext=c,this.lookAhead=u,this.parent=d}toString(){return`[${this.stack.filter((t,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,n,r=0){let s=t.parser.context;return new n3(t,[],n,r,r,0,[],0,s?new gY(s,s.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var n;let r=t>>19,s=t&65535,{parser:i}=this.p,o=this.reducePos<this.pos-25;o&&this.setLookAhead(this.pos);let a=i.dynamicPrecedence(s);if(a&&(this.score+=a),r==0){this.pushState(i.getGoto(this.state,s,!0),this.reducePos),s<i.minRepeatTerm&&this.storeNode(s,this.reducePos,this.reducePos,o?8:4,!0),this.reduceContext(s,this.reducePos);return}let l=this.stack.length-(r-1)*3-(t&262144?6:0),c=l?this.stack[l-2]:this.p.ranges[0].from,u=this.reducePos-c;u>=2e3&&!(!((n=this.p.parser.nodeSet.types[s])===null||n===void 0)&&n.isAnonymous)&&(c==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSize<u&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=c,this.p.lastBigReductionSize=u));let d=l?this.stack[l-1]:0,p=this.bufferBase+this.buffer.length-d;if(s<i.minRepeatTerm||t&131072){let g=i.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(s,c,g,p+4,!0)}if(t&262144)this.state=this.stack[l];else{let g=this.stack[l-3];this.state=i.getGoto(g,s,!0)}for(;this.stack.length>l;)this.stack.pop();this.reduceContext(s,c)}storeNode(t,n,r,s=4,i=!1){if(t==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let o=this,a=this.buffer.length;if(a==0&&o.parent&&(a=o.bufferBase-o.parent.bufferBase,o=o.parent),a>0&&o.buffer[a-4]==0&&o.buffer[a-1]>-1){if(n==r)return;if(o.buffer[a-2]>=n){o.buffer[a-2]=r;return}}}if(!i||this.pos==r)this.buffer.push(t,n,r,s);else{let o=this.buffer.length;if(o>0&&this.buffer[o-4]!=0){let a=!1;for(let l=o;l>0&&this.buffer[l-2]>r;l-=4)if(this.buffer[l-1]>=0){a=!0;break}if(a)for(;o>0&&this.buffer[o-2]>r;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,s>4&&(s-=4)}this.buffer[o]=t,this.buffer[o+1]=n,this.buffer[o+2]=r,this.buffer[o+3]=s}}shift(t,n,r,s){if(t&131072)this.pushState(t&65535,this.pos);else if((t&262144)==0){let i=t,{parser:o}=this.p;(s>this.pos||n<=o.maxNode)&&(this.pos=s,o.stateFlag(i,1)||(this.reducePos=s)),this.pushState(i,r),this.shiftContext(n,r),n<=o.maxNode&&this.buffer.push(n,r,s,4)}else this.pos=s,this.shiftContext(n,r),n<=this.p.parser.maxNode&&this.buffer.push(n,r,s,4)}apply(t,n,r,s){t&65536?this.reduce(t):this.shift(t,n,r,s)}useNode(t,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=t)&&(this.p.reused.push(t),r++);let s=this.pos;this.reducePos=this.pos=s+t.length,this.pushState(n,s),this.buffer.push(r,s,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,n=t.buffer.length;for(;n>0&&t.buffer[n-2]>t.reducePos;)n-=4;let r=t.buffer.slice(n),s=t.bufferBase+n;for(;t&&s==t.bufferBase;)t=t.parent;return new n3(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,s,this.curContext,this.lookAhead,t)}recoverByDelete(t,n){let r=t<=this.p.parser.maxNode;r&&this.storeNode(t,this.pos,n,4),this.storeNode(0,this.pos,n,r?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(t){for(let n=new UYe(this);;){let r=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,t);if(r==0)return!1;if((r&65536)==0)return!0;n.reduce(r)}}recoverByInsert(t){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let s=[];for(let i=0,o;i<n.length;i+=2)(o=n[i+1])!=this.state&&this.p.parser.hasAction(o,t)&&s.push(n[i],o);if(this.stack.length<120)for(let i=0;s.length<8&&i<n.length;i+=2){let o=n[i+1];s.some((a,l)=>l&1&&a==o)||s.push(n[i],o)}n=s}let r=[];for(let s=0;s<n.length&&r.length<4;s+=2){let i=n[s+1];if(i==this.state)continue;let o=this.split();o.pushState(i,this.pos),o.storeNode(0,o.pos,o.pos,4,!0),o.shiftContext(n[s],this.pos),o.reducePos=this.pos,o.score-=200,r.push(o)}return r}forceReduce(){let{parser:t}=this.p,n=t.stateSlot(this.state,5);if((n&65536)==0)return!1;if(!t.validAction(this.state,n)){let r=n>>19,s=n&65535,i=this.stack.length-r*3;if(i<0||t.getGoto(this.stack[i],s,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;n=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:t}=this.p,n=[],r=(s,i)=>{if(!n.includes(s))return n.push(s),t.allActions(s,o=>{if(!(o&393216))if(o&65536){let a=(o>>19)-i;if(a>1){let l=o&65535,c=this.stack.length-a*3;if(c>=0&&t.getGoto(this.stack[c],l,!1)>=0)return a<<19|65536|l}}else{let a=r(o,i+1);if(a!=null)return a}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:t}=this.p;return t.data[t.stateSlot(this.state,1)]==65535&&!t.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let n=0;n<this.stack.length;n+=3)if(this.stack[n]!=t.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(t){return this.p.parser.dialect.flags[t]}shiftContext(t,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,t,this,this.p.stream.reset(n)))}reduceContext(t,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,t,this,this.p.stream.reset(n)))}emitContext(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(t){if(t!=this.curContext.context){let n=new gY(this.curContext.tracker,t);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(t){t>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=t)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class gY{constructor(t,n){this.tracker=t,this.context=n,this.hash=t.strict?t.hash(n):0}}class UYe{constructor(t){this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}reduce(t){let n=t&65535,r=t>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let s=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=s}}class r3{constructor(t,n,r){this.stack=t,this.pos=n,this.index=r,this.buffer=t.buffer,this.index==0&&this.maybeNext()}static create(t,n=t.bufferBase+t.buffer.length){return new r3(t,n,n-t.bufferBase)}maybeNext(){let t=this.stack.parent;t!=null&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new r3(this.stack,this.pos,this.index)}}function T2(e,t=Uint16Array){if(typeof e!="string")return e;let n=null;for(let r=0,s=0;r<e.length;){let i=0;for(;;){let o=e.charCodeAt(r++),a=!1;if(o==126){i=65535;break}o>=92&&o--,o>=34&&o--;let l=o-32;if(l>=46&&(l-=46,a=!0),i+=l,a)break;i*=46}n?n[s++]=i:n=new t(i)}return n}class KE{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const yY=new KE;class WYe{constructor(t,n){this.input=t,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=yY,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(t,n){let r=this.range,s=this.rangeIndex,i=this.pos+t;for(;i<r.from;){if(!s)return null;let o=this.ranges[--s];i-=r.from-o.to,r=o}for(;n<0?i>r.to:i>=r.to;){if(s==this.ranges.length-1)return null;let o=this.ranges[++s];i+=o.from-r.to,r=o}return i}clipPos(t){if(t>=this.range.from&&t<this.range.to)return t;for(let n of this.ranges)if(n.to>t)return Math.max(t,n.from);return this.end}peek(t){let n=this.chunkOff+t,r,s;if(n>=0&&n<this.chunk.length)r=this.pos+t,s=this.chunk.charCodeAt(n);else{let i=this.resolveOffset(t,1);if(i==null)return-1;if(r=i,r>=this.chunk2Pos&&r<this.chunk2Pos+this.chunk2.length)s=this.chunk2.charCodeAt(r-this.chunk2Pos);else{let o=this.rangeIndex,a=this.range;for(;a.to<=r;)a=this.ranges[++o];this.chunk2=this.input.chunk(this.chunk2Pos=r),r+this.chunk2.length>a.to&&(this.chunk2=this.chunk2.slice(0,a.to-r)),s=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),s}acceptToken(t,n=0){let r=n?this.resolveOffset(n,-1):this.pos;if(r==null||r<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=t,this.token.end=r}acceptTokenTo(t,n){this.token.value=t,this.token.end=n}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:t,chunkPos:n}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=t,this.chunk2Pos=n,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let t=this.input.chunk(this.pos),n=this.pos+t.length;this.chunk=n>this.range.to?t.slice(0,this.range.to-this.pos):t,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(t=1){for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(t,n){if(n?(this.token=n,n.start=t,n.lookAhead=t+1,n.value=n.extended=-1):this.token=yY,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;t>=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t<this.chunkPos+this.chunk.length?this.chunkOff=t-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(t,n){if(t>=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,n-this.chunkPos);if(t>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(t-this.chunk2Pos,n-this.chunk2Pos);if(t>=this.range.from&&n<=this.range.to)return this.input.read(t,n);let r="";for(let s of this.ranges){if(s.from>=n)break;s.to>t&&(r+=this.input.read(Math.max(s.from,t),Math.min(s.to,n)))}return r}}class K0{constructor(t,n){this.data=t,this.id=n}token(t,n){let{parser:r}=n.p;qYe(this.data,t,n,this.id,r.data,r.tokenPrecTable)}}K0.prototype.contextual=K0.prototype.fallback=K0.prototype.extend=!1;K0.prototype.fallback=K0.prototype.extend=!1;function qYe(e,t,n,r,s,i){let o=0,a=1<<r,{dialect:l}=n.p.parser;e:for(;(a&e[o])!=0;){let c=e[o+1];for(let g=o+3;g<c;g+=2)if((e[g+1]&a)>0){let b=e[g];if(l.allows(b)&&(t.token.value==-1||t.token.value==b||GYe(b,t.token.value,s,i))){t.acceptToken(b);break}}let u=t.next,d=0,p=e[o+2];if(t.next<0&&p>d&&e[c+p*3-3]==65535){o=e[c+p*3-1];continue e}for(;d<p;){let g=d+p>>1,b=c+g+(g<<1),x=e[b],S=e[b+1]||65536;if(u<x)p=g;else if(u>=S)d=g+1;else{o=e[b+2],t.advance();continue e}}break}}function bY(e,t,n){for(let r=t,s;(s=e[r])!=65535;r++)if(s==n)return r-t;return-1}function GYe(e,t,n,r){let s=bY(n,r,t);return s<0||bY(n,r,e)<s}const ca=typeof VYe<"u"&&mY&&/\bparse\b/.test(mY.LOG);let l9=null;function xY(e,t,n){let r=e.cursor(Ys.IncludeAnonymous);for(r.moveTo(t);;)if(!(n<0?r.childBefore(t):r.childAfter(t)))for(;;){if((n<0?r.to<t:r.from>t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}class YYe{constructor(t,n){this.fragments=t,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?xY(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?xY(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(t){if(t<this.nextStart)return null;for(;this.fragment&&this.safeTo<=t;)this.nextFragment();if(!this.fragment)return null;for(;;){let n=this.trees.length-1;if(n<0)return this.nextFragment(),null;let r=this.trees[n],s=this.index[n];if(s==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let i=r.children[s],o=this.start[n]+r.positions[s];if(o>t)return this.nextStart=o,null;if(i instanceof ws){if(o==t){if(o<this.safeFrom)return null;let a=o+i.length;if(a<=this.safeTo){let l=i.prop(fn.lookAhead);if(!l||a+l<this.fragment.to)return i}}this.index[n]++,o+i.length>=Math.max(this.safeFrom,t)&&(this.trees.push(i),this.start.push(o),this.index.push(0))}else this.index[n]++,this.nextStart=o+i.length}}}class KYe{constructor(t,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map(r=>new KE)}getActions(t){let n=0,r=null,{parser:s}=t.p,{tokenizers:i}=s,o=s.stateSlot(t.state,3),a=t.curContext?t.curContext.hash:0,l=0;for(let c=0;c<i.length;c++){if((1<<c&o)==0)continue;let u=i[c],d=this.tokens[c];if(!(r&&!u.fallback)&&((u.contextual||d.start!=t.pos||d.mask!=o||d.context!=a)&&(this.updateCachedToken(d,u,t),d.mask=o,d.context=a),d.lookAhead>d.end+25&&(l=Math.max(d.lookAhead,l)),d.value!=0)){let p=n;if(d.extended>-1&&(n=this.addActions(t,d.extended,d.end,n)),n=this.addActions(t,d.value,d.end,n),!u.extend&&(r=d,n>p))break}}for(;this.actions.length>n;)this.actions.pop();return l&&t.setLookAhead(l),!r&&t.pos==this.stream.end&&(r=new KE,r.value=t.p.parser.eofTerm,r.start=r.end=t.pos,n=this.addActions(t,r.value,r.end,n)),this.mainToken=r,this.actions}getMainToken(t){if(this.mainToken)return this.mainToken;let n=new KE,{pos:r,p:s}=t;return n.start=r,n.end=Math.min(r+1,s.stream.end),n.value=r==s.stream.end?s.parser.eofTerm:0,n}updateCachedToken(t,n,r){let s=this.stream.clipPos(r.pos);if(n.token(this.stream.reset(s,t),r),t.value>-1){let{parser:i}=r.p;for(let o=0;o<i.specialized.length;o++)if(i.specialized[o]==t.value){let a=i.specializers[o](this.stream.read(t.start,t.end),r);if(a>=0&&r.p.parser.dialect.allows(a>>1)){(a&1)==0?t.value=a>>1:t.extended=a>>1;break}}}else t.value=0,t.end=this.stream.clipPos(s+1)}putAction(t,n,r,s){for(let i=0;i<s;i+=3)if(this.actions[i]==t)return s;return this.actions[s++]=t,this.actions[s++]=n,this.actions[s++]=r,s}addActions(t,n,r,s){let{state:i}=t,{parser:o}=t.p,{data:a}=o;for(let l=0;l<2;l++)for(let c=o.stateSlot(i,l?2:1);;c+=3){if(a[c]==65535)if(a[c+1]==1)c=Od(a,c+2);else{s==0&&a[c+1]==2&&(s=this.putAction(Od(a,c+2),n,r,s));break}a[c]==n&&(s=this.putAction(Od(a,c+1),n,r,s))}return s}}class XYe{constructor(t,n,r,s){this.parser=t,this.input=n,this.ranges=s,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new WYe(n,s),this.tokens=new KYe(t,this.stream),this.topTerm=t.top[1];let{from:i}=s[0];this.stacks=[n3.start(this,t.top[0],i)],this.fragments=r.length&&this.stream.end-i>t.bufferLength*4?new YYe(r,t.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let t=this.stacks,n=this.minStackPos,r=this.stacks=[],s,i;if(this.bigReductionCount>300&&t.length==1){let[o]=t;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;o<t.length;o++){let a=t[o];for(;;){if(this.tokens.mainToken=null,a.pos>n)r.push(a);else{if(this.advanceStack(a,r,t))continue;{s||(s=[],i=[]),s.push(a);let l=this.tokens.getMainToken(a);i.push(l.value,l.end)}}break}}if(!r.length){let o=s&&ZYe(s);if(o)return ca&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw ca&&s&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&s){let o=this.stoppedAt!=null&&s[0].pos>this.stoppedAt?s[0]:this.runRecovery(s,i,r);if(o)return ca&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(r.length>o)for(r.sort((a,l)=>l.score-a.score);r.length>o;)r.pop();r.some(a=>a.reducePos>n)&&this.recovering--}else if(r.length>1){e:for(let o=0;o<r.length-1;o++){let a=r[o];for(let l=o+1;l<r.length;l++){let c=r[l];if(a.sameState(c)||a.buffer.length>500&&c.buffer.length>500)if((a.score-c.score||a.buffer.length-c.buffer.length)>0)r.splice(l--,1);else{r.splice(o--,1);continue e}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let o=1;o<r.length;o++)r[o].pos<this.minStackPos&&(this.minStackPos=r[o].pos);return null}stopAt(t){if(this.stoppedAt!=null&&this.stoppedAt<t)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=t}advanceStack(t,n,r){let s=t.pos,{parser:i}=this,o=ca?this.stackID(t)+" -> ":"";if(this.stoppedAt!=null&&s>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments){let c=t.curContext&&t.curContext.tracker.strict,u=c?t.curContext.hash:0;for(let d=this.fragments.nodeAt(s);d;){let p=this.parser.nodeSet.types[d.type.id]==d.type?i.getGoto(t.state,d.type.id):-1;if(p>-1&&d.length&&(!c||(d.prop(fn.contextHash)||0)==u))return t.useNode(d,p),ca&&console.log(o+this.stackID(t)+` (via reuse of ${i.getName(d.type.id)})`),!0;if(!(d instanceof ws)||d.children.length==0||d.positions[0]>0)break;let g=d.children[0];if(g instanceof ws&&d.positions[0]==0)d=g;else break}}let a=i.stateSlot(t.state,4);if(a>0)return t.reduce(a),ca&&console.log(o+this.stackID(t)+` (via always-reduce ${i.getName(a&65535)})`),!0;if(t.stack.length>=8400)for(;t.stack.length>6e3&&t.forceReduce(););let l=this.tokens.getActions(t);for(let c=0;c<l.length;){let u=l[c++],d=l[c++],p=l[c++],g=c==l.length||!r,b=g?t:t.split(),x=this.tokens.mainToken;if(b.apply(u,d,x?x.start:b.pos,p),ca&&console.log(o+this.stackID(b)+` (via ${(u&65536)==0?"shift":`reduce of ${i.getName(u&65535)}`} for ${i.getName(d)} @ ${s}${b==t?"":", split"})`),g)return!0;b.pos>s?n.push(b):r.push(b)}return!1}advanceFully(t,n){let r=t.pos;for(;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>r)return vY(t,n),!0}}runRecovery(t,n,r){let s=null,i=!1;for(let o=0;o<t.length;o++){let a=t[o],l=n[o<<1],c=n[(o<<1)+1],u=ca?this.stackID(a)+" -> ":"";if(a.deadEnd&&(i||(i=!0,a.restart(),ca&&console.log(u+this.stackID(a)+" (restarted)"),this.advanceFully(a,r))))continue;let d=a.split(),p=u;for(let g=0;d.forceReduce()&&g<10&&(ca&&console.log(p+this.stackID(d)+" (via force-reduce)"),!this.advanceFully(d,r));g++)ca&&(p=this.stackID(d)+" -> ");for(let g of a.recoverByInsert(l))ca&&console.log(u+this.stackID(g)+" (via recover-insert)"),this.advanceFully(g,r);this.stream.end>a.pos?(c==a.pos&&(c++,l=0),a.recoverByDelete(l,c),ca&&console.log(u+this.stackID(a)+` (via recover-delete ${this.parser.getName(l)})`),vY(a,r)):(!s||s.score<a.score)&&(s=a)}return s}stackToTree(t){return t.close(),ws.build({buffer:r3.create(t),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:t.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(t){let n=(l9||(l9=new WeakMap)).get(t);return n||l9.set(t,n=String.fromCodePoint(this.nextStackID++)),n+t}}function vY(e,t){for(let n=0;n<t.length;n++){let r=t[n];if(r.pos==e.pos&&r.sameState(e)){t[n].score<e.score&&(t[n]=e);return}}t.push(e)}class JYe{constructor(t,n,r){this.source=t,this.flags=n,this.disabled=r}allows(t){return!this.disabled||this.disabled[t]==0}}class s3 extends Gce{constructor(t){if(super(),this.wrappers=[],t.version!=14)throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);let n=t.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let a=0;a<t.repeatNodeCount;a++)n.push("");let r=Object.keys(t.topRules).map(a=>t.topRules[a][1]),s=[];for(let a=0;a<n.length;a++)s.push([]);function i(a,l,c){s[a].push([l,l.deserialize(String(c))])}if(t.nodeProps)for(let a of t.nodeProps){let l=a[0];typeof l=="string"&&(l=fn[l]);for(let c=1;c<a.length;){let u=a[c++];if(u>=0)i(u,l,a[c++]);else{let d=a[c+-u];for(let p=-u;p>0;p--)i(a[c++],l,d);c++}}}this.nodeSet=new _R(n.map((a,l)=>Yo.define({name:l>=this.minRepeatTerm?void 0:a,id:l,props:s[l],top:r.indexOf(l)>-1,error:l==0,skipped:t.skippedNodes&&t.skippedNodes.indexOf(l)>-1}))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=Vce;let o=T2(t.tokenData);this.context=t.context,this.specializerSpecs=t.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let a=0;a<this.specializerSpecs.length;a++)this.specialized[a]=this.specializerSpecs[a].term;this.specializers=this.specializerSpecs.map(wY),this.states=T2(t.states,Uint32Array),this.data=T2(t.stateData),this.goto=T2(t.goto),this.maxTerm=t.maxTerm,this.tokenizers=t.tokenizers.map(a=>typeof a=="number"?new K0(o,a):a),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,n,r){let s=new XYe(this,t,n,r);for(let i of this.wrappers)s=i(s,t,n,r);return s}getGoto(t,n,r=!1){let s=this.goto;if(n>=s[0])return-1;for(let i=s[n+1];;){let o=s[i++],a=o&1,l=s[i++];if(a&&r)return l;for(let c=i+(o>>1);i<c;i++)if(s[i]==t)return l;if(a)return-1}}hasAction(t,n){let r=this.data;for(let s=0;s<2;s++)for(let i=this.stateSlot(t,s?2:1),o;;i+=3){if((o=r[i])==65535)if(r[i+1]==1)o=r[i=Od(r,i+2)];else{if(r[i+1]==2)return Od(r,i+2);break}if(o==n||o==0)return Od(r,i+1)}return 0}stateSlot(t,n){return this.states[t*6+n]}stateFlag(t,n){return(this.stateSlot(t,0)&n)>0}validAction(t,n){return!!this.allActions(t,r=>r==n?!0:null)}allActions(t,n){let r=this.stateSlot(t,4),s=r?n(r):void 0;for(let i=this.stateSlot(t,1);s==null;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=Od(this.data,i+2);else break;s=n(Od(this.data,i+1))}return s}nextStates(t){let n=[];for(let r=this.stateSlot(t,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Od(this.data,r+2);else break;if((this.data[r+2]&1)==0){let s=this.data[r+1];n.some((i,o)=>o&1&&i==s)||n.push(this.data[r],s)}}return n}configure(t){let n=Object.assign(Object.create(s3.prototype),this);if(t.props&&(n.nodeSet=this.nodeSet.extend(...t.props)),t.top){let r=this.topRules[t.top];if(!r)throw new RangeError(`Invalid top rule name ${t.top}`);n.top=r}return t.tokenizers&&(n.tokenizers=this.tokenizers.map(r=>{let s=t.tokenizers.find(i=>i.from==r);return s?s.to:r})),t.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((r,s)=>{let i=t.specializers.find(a=>a.from==r.external);if(!i)return r;let o=Object.assign(Object.assign({},r),{external:i.to});return n.specializers[s]=wY(o),o})),t.contextTracker&&(n.context=t.contextTracker),t.dialect&&(n.dialect=this.parseDialect(t.dialect)),t.strict!=null&&(n.strict=t.strict),t.wrap&&(n.wrappers=n.wrappers.concat(t.wrap)),t.bufferLength!=null&&(n.bufferLength=t.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let n=this.dynamicPrecedences;return n==null?0:n[t]||0}parseDialect(t){let n=Object.keys(this.dialects),r=n.map(()=>!1);if(t)for(let i of t.split(" ")){let o=n.indexOf(i);o>=0&&(r[o]=!0)}let s=null;for(let i=0;i<n.length;i++)if(!r[i])for(let o=this.dialects[n[i]],a;(a=this.data[o++])!=65535;)(s||(s=new Uint8Array(this.maxTerm+1)))[a]=1;return new JYe(t,r,s)}static deserialize(t){return new s3(t)}}function Od(e,t){return e[t]|e[t+1]<<16}function ZYe(e){let t=null;for(let n of e){let r=n.p.stoppedAt;(n.pos==n.p.stream.end||r!=null&&n.pos>r)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.score<n.score)&&(t=n)}return t}function wY(e){if(e.external){let t=e.extend?1:0;return(n,r)=>e.external(n,r)<<1|t}return e.get}let QYe=0;class Ja{constructor(t,n,r,s){this.name=t,this.set=n,this.base=r,this.modified=s,this.id=QYe++}toString(){let{name:t}=this;for(let n of this.modified)n.name&&(t=`${n.name}(${t})`);return t}static define(t,n){let r=typeof t=="string"?t:"?";if(t instanceof Ja&&(n=t),n!=null&&n.base)throw new Error("Can not derive from a modified tag");let s=new Ja(r,[],null,[]);if(s.set.push(s),n)for(let i of n.set)s.set.push(i);return s}static defineModifier(t){let n=new i3(t);return r=>r.modified.indexOf(n)>-1?r:i3.get(r.base||r,r.modified.concat(n).sort((s,i)=>s.id-i.id))}}let eKe=0;class i3{constructor(t){this.name=t,this.instances=[],this.id=eKe++}static get(t,n){if(!n.length)return t;let r=n[0].instances.find(a=>a.base==t&&tKe(n,a.modified));if(r)return r;let s=[],i=new Ja(t.name,s,t,n);for(let a of n)a.instances.push(i);let o=nKe(n);for(let a of t.set)if(!a.modified.length)for(let l of o)s.push(i3.get(a,l));return i}}function tKe(e,t){return e.length==t.length&&e.every((n,r)=>n==t[r])}function nKe(e){let t=[[]];for(let n=0;n<e.length;n++)for(let r=0,s=t.length;r<s;r++)t.push(t[r].concat(e[n]));return t.sort((n,r)=>r.length-n.length)}function Yce(e){let t=Object.create(null);for(let n in e){let r=e[n];Array.isArray(r)||(r=[r]);for(let s of n.split(" "))if(s){let i=[],o=2,a=s;for(let d=0;;){if(a=="..."&&d>0&&d+3==s.length){o=1;break}let p=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!p)throw new RangeError("Invalid path: "+s);if(i.push(p[0]=="*"?"":p[0][0]=='"'?JSON.parse(p[0]):p[0]),d+=p[0].length,d==s.length)break;let g=s[d++];if(d==s.length&&g=="!"){o=0;break}if(g!="/")throw new RangeError("Invalid path: "+s);a=s.slice(d)}let l=i.length-1,c=i[l];if(!c)throw new RangeError("Invalid path: "+s);let u=new o3(r,o,l>0?i.slice(0,l):null);t[c]=u.sort(t[c])}}return Kce.add(t)}const Kce=new fn;class o3{constructor(t,n,r,s){this.tags=t,this.mode=n,this.context=r,this.next=s}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(t){return!t||t.depth<this.depth?(this.next=t,this):(t.next=this.sort(t.next),t)}get depth(){return this.context?this.context.length:0}}o3.empty=new o3([],2,null);function Xce(e,t){let n=Object.create(null);for(let i of e)if(!Array.isArray(i.tag))n[i.tag.id]=i.class;else for(let o of i.tag)n[o.id]=i.class;let{scope:r,all:s=null}=t||{};return{style:i=>{let o=s;for(let a of i)for(let l of a.set){let c=n[l.id];if(c){o=o?o+" "+c:c;break}}return o},scope:r}}function rKe(e,t){let n=null;for(let r of e){let s=r.style(t);s&&(n=n?n+" "+s:s)}return n}function sKe(e,t,n,r=0,s=e.length){let i=new iKe(r,Array.isArray(t)?t:[t],n);i.highlightRange(e.cursor(),r,s,"",i.highlighters),i.flush(s)}class iKe{constructor(t,n,r){this.at=t,this.highlighters=n,this.span=r,this.class=""}startSpan(t,n){n!=this.class&&(this.flush(t),t>this.at&&(this.at=t),this.class=n)}flush(t){t>this.at&&this.class&&this.span(this.at,t,this.class)}highlightRange(t,n,r,s,i){let{type:o,from:a,to:l}=t;if(a>=r||l<=n)return;o.isTop&&(i=this.highlighters.filter(g=>!g.scope||g.scope(o)));let c=s,u=oKe(t)||o3.empty,d=rKe(i,u.tags);if(d&&(c&&(c+=" "),c+=d,u.mode==1&&(s+=(s?" ":"")+d)),this.startSpan(Math.max(n,a),c),u.opaque)return;let p=t.tree&&t.tree.prop(fn.mounted);if(p&&p.overlay){let g=t.node.enter(p.overlay[0].from+a,1),b=this.highlighters.filter(S=>!S.scope||S.scope(p.tree.type)),x=t.firstChild();for(let S=0,E=a;;S++){let k=S<p.overlay.length?p.overlay[S]:null,T=k?k.from+a:l,P=Math.max(n,E),M=Math.min(r,T);if(P<M&&x)for(;t.from<M&&(this.highlightRange(t,P,M,s,i),this.startSpan(Math.min(M,t.to),c),!(t.to>=T||!t.nextSibling())););if(!k||T>r)break;E=k.to+a,E>n&&(this.highlightRange(g.cursor(),Math.max(n,k.from+a),Math.min(r,E),"",b),this.startSpan(Math.min(r,E),c))}x&&t.parent()}else if(t.firstChild()){p&&(s="");do if(!(t.to<=n)){if(t.from>=r)break;this.highlightRange(t,n,r,s,i),this.startSpan(Math.min(r,t.to),c)}while(t.nextSibling());t.parent()}}}function oKe(e){let t=e.type.prop(Kce);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}const it=Ja.define,_2=it(),Mf=it(),SY=it(Mf),CY=it(Mf),jf=it(),N2=it(jf),c9=it(jf),Uc=it(),vm=it(Uc),Lc=it(),Bc=it(),rM=it(),hv=it(rM),P2=it(),Ce={comment:_2,lineComment:it(_2),blockComment:it(_2),docComment:it(_2),name:Mf,variableName:it(Mf),typeName:SY,tagName:it(SY),propertyName:CY,attributeName:it(CY),className:it(Mf),labelName:it(Mf),namespace:it(Mf),macroName:it(Mf),literal:jf,string:N2,docString:it(N2),character:it(N2),attributeValue:it(N2),number:c9,integer:it(c9),float:it(c9),bool:it(jf),regexp:it(jf),escape:it(jf),color:it(jf),url:it(jf),keyword:Lc,self:it(Lc),null:it(Lc),atom:it(Lc),unit:it(Lc),modifier:it(Lc),operatorKeyword:it(Lc),controlKeyword:it(Lc),definitionKeyword:it(Lc),moduleKeyword:it(Lc),operator:Bc,derefOperator:it(Bc),arithmeticOperator:it(Bc),logicOperator:it(Bc),bitwiseOperator:it(Bc),compareOperator:it(Bc),updateOperator:it(Bc),definitionOperator:it(Bc),typeOperator:it(Bc),controlOperator:it(Bc),punctuation:rM,separator:it(rM),bracket:hv,angleBracket:it(hv),squareBracket:it(hv),paren:it(hv),brace:it(hv),content:Uc,heading:vm,heading1:it(vm),heading2:it(vm),heading3:it(vm),heading4:it(vm),heading5:it(vm),heading6:it(vm),contentSeparator:it(Uc),list:it(Uc),quote:it(Uc),emphasis:it(Uc),strong:it(Uc),link:it(Uc),monospace:it(Uc),strikethrough:it(Uc),inserted:it(),deleted:it(),changed:it(),invalid:it(),meta:P2,documentMeta:it(P2),annotation:it(P2),processingInstruction:it(P2),definition:Ja.defineModifier("definition"),constant:Ja.defineModifier("constant"),function:Ja.defineModifier("function"),standard:Ja.defineModifier("standard"),local:Ja.defineModifier("local"),special:Ja.defineModifier("special")};for(let e in Ce){let t=Ce[e];t instanceof Ja&&(t.name=e)}Xce([{tag:Ce.link,class:"tok-link"},{tag:Ce.heading,class:"tok-heading"},{tag:Ce.emphasis,class:"tok-emphasis"},{tag:Ce.strong,class:"tok-strong"},{tag:Ce.keyword,class:"tok-keyword"},{tag:Ce.atom,class:"tok-atom"},{tag:Ce.bool,class:"tok-bool"},{tag:Ce.url,class:"tok-url"},{tag:Ce.labelName,class:"tok-labelName"},{tag:Ce.inserted,class:"tok-inserted"},{tag:Ce.deleted,class:"tok-deleted"},{tag:Ce.literal,class:"tok-literal"},{tag:Ce.string,class:"tok-string"},{tag:Ce.number,class:"tok-number"},{tag:[Ce.regexp,Ce.escape,Ce.special(Ce.string)],class:"tok-string2"},{tag:Ce.variableName,class:"tok-variableName"},{tag:Ce.local(Ce.variableName),class:"tok-variableName tok-local"},{tag:Ce.definition(Ce.variableName),class:"tok-variableName tok-definition"},{tag:Ce.special(Ce.variableName),class:"tok-variableName2"},{tag:Ce.definition(Ce.propertyName),class:"tok-propertyName tok-definition"},{tag:Ce.typeName,class:"tok-typeName"},{tag:Ce.namespace,class:"tok-namespace"},{tag:Ce.className,class:"tok-className"},{tag:Ce.macroName,class:"tok-macroName"},{tag:Ce.propertyName,class:"tok-propertyName"},{tag:Ce.operator,class:"tok-operator"},{tag:Ce.comment,class:"tok-comment"},{tag:Ce.meta,class:"tok-meta"},{tag:Ce.invalid,class:"tok-invalid"},{tag:Ce.punctuation,class:"tok-punctuation"}]);const aKe=Yce({String:Ce.string,Number:Ce.number,"True False":Ce.bool,PropertyName:Ce.propertyName,Null:Ce.null,", :":Ce.separator,"[ ]":Ce.squareBracket,"{ }":Ce.brace}),lKe=s3.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[aKe],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0});let sM=[],Jce=[];(()=>{let e="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(t=>t?parseInt(t,36):1);for(let t=0,n=0;t<e.length;t++)(t%2?Jce:sM).push(n=n+e[t])})();function cKe(e){if(e<768)return!1;for(let t=0,n=sM.length;;){let r=t+n>>1;if(e<sM[r])n=r;else if(e>=Jce[r])t=r+1;else return!0;if(t==n)return!1}}function kY(e){return e>=127462&&e<=127487}const EY=8205;function uKe(e,t,n=!0,r=!0){return(n?Zce:dKe)(e,t,r)}function Zce(e,t,n){if(t==e.length)return t;t&&Qce(e.charCodeAt(t))&&eue(e.charCodeAt(t-1))&&t--;let r=u9(e,t);for(t+=DY(r);t<e.length;){let s=u9(e,t);if(r==EY||s==EY||n&&cKe(s))t+=DY(s),r=s;else if(kY(s)){let i=0,o=t-2;for(;o>=0&&kY(u9(e,o));)i++,o-=2;if(i%2==0)break;t+=2}else break}return t}function dKe(e,t,n){for(;t>0;){let r=Zce(e,t-2,n);if(r<t)return r;t--}return 0}function u9(e,t){let n=e.charCodeAt(t);if(!eue(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return Qce(r)?(n-55296<<10)+(r-56320)+65536:n}function Qce(e){return e>=56320&&e<57344}function eue(e){return e>=55296&&e<56320}function DY(e){return e<65536?1:2}let Gn=class tue{lineAt(t){if(t<0||t>this.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,n,r){[t,n]=Hb(this,t,n);let s=[];return this.decompose(0,t,s,2),r.length&&r.decompose(0,r.length,s,3),this.decompose(n,this.length,s,1),Qc.from(s,this.length-(n-t)+r.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,n=this.length){[t,n]=Hb(this,t,n);let r=[];return this.decompose(t,n,r,0),Qc.from(r,n-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let n=this.scanIdentical(t,1),r=this.length-this.scanIdentical(t,-1),s=new aw(this),i=new aw(t);for(let o=n,a=n;;){if(s.next(o),i.next(o),o=0,s.lineBreak!=i.lineBreak||s.done!=i.done||s.value!=i.value)return!1;if(a+=s.value.length,s.done||a>=r)return!0}}iter(t=1){return new aw(this,t)}iterRange(t,n=this.length){return new nue(this,t,n)}iterLines(t,n){let r;if(t==null)r=this.iter();else{n==null&&(n=this.lines+1);let s=this.line(t).from;r=this.iterRange(s,Math.max(s,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new rue(r)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}constructor(){}static of(t){if(t.length==0)throw new RangeError("A document must have at least one line");return t.length==1&&!t[0]?tue.empty:t.length<=32?new is(t):Qc.from(is.split(t,[]))}};class is extends Gn{constructor(t,n=hKe(t)){super(),this.text=t,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(t,n,r,s){for(let i=0;;i++){let o=this.text[i],a=s+o.length;if((n?r:a)>=t)return new fKe(s,a,r,o);s=a+1,r++}}decompose(t,n,r,s){let i=t<=0&&n>=this.length?this:new is(AY(this.text,t,n),Math.min(n,this.length)-Math.max(0,t));if(s&1){let o=r.pop(),a=XE(i.text,o.text.slice(),0,i.length);if(a.length<=32)r.push(new is(a,o.length+i.length));else{let l=a.length>>1;r.push(new is(a.slice(0,l)),new is(a.slice(l)))}}else r.push(i)}replace(t,n,r){if(!(r instanceof is))return super.replace(t,n,r);[t,n]=Hb(this,t,n);let s=XE(this.text,XE(r.text,AY(this.text,0,t)),n),i=this.length+r.length-(n-t);return s.length<=32?new is(s,i):Qc.from(is.split(s,[]),i)}sliceString(t,n=this.length,r=`
|
|
579
579
|
`){[t,n]=Hb(this,t,n);let s="";for(let i=0,o=0;i<=n&&o<this.text.length;o++){let a=this.text[o],l=i+a.length;i>t&&o&&(s+=r),t<l&&n>i&&(s+=a.slice(Math.max(0,t-i),n-i)),i=l+1}return s}flatten(t){for(let n of this.text)t.push(n)}scanIdentical(){return 0}static split(t,n){let r=[],s=-1;for(let i of t)r.push(i),s+=i.length+1,r.length==32&&(n.push(new is(r,s)),r=[],s=-1);return s>-1&&n.push(new is(r,s)),n}}class Qc extends Gn{constructor(t,n){super(),this.children=t,this.length=n,this.lines=0;for(let r of t)this.lines+=r.lines}lineInner(t,n,r,s){for(let i=0;;i++){let o=this.children[i],a=s+o.length,l=r+o.lines-1;if((n?l:a)>=t)return o.lineInner(t,n,r,s);s=a+1,r=l+1}}decompose(t,n,r,s){for(let i=0,o=0;o<=n&&i<this.children.length;i++){let a=this.children[i],l=o+a.length;if(t<=l&&n>=o){let c=s&((o<=t?1:0)|(l>=n?2:0));o>=t&&l<=n&&!c?r.push(a):a.decompose(t-o,n-o,r,c)}o=l+1}}replace(t,n,r){if([t,n]=Hb(this,t,n),r.lines<this.lines)for(let s=0,i=0;s<this.children.length;s++){let o=this.children[s],a=i+o.length;if(t>=i&&n<=a){let l=o.replace(t-i,n-i,r),c=this.lines-o.lines+l.lines;if(l.lines<c>>4&&l.lines>c>>6){let u=this.children.slice();return u[s]=l,new Qc(u,this.length-(n-t)+r.length)}return super.replace(i,a,l)}i=a+1}return super.replace(t,n,r)}sliceString(t,n=this.length,r=`
|
|
580
580
|
`){[t,n]=Hb(this,t,n);let s="";for(let i=0,o=0;i<this.children.length&&o<=n;i++){let a=this.children[i],l=o+a.length;o>t&&i&&(s+=r),t<l&&n>o&&(s+=a.sliceString(t-o,n-o,r)),o=l+1}return s}flatten(t){for(let n of this.children)n.flatten(t)}scanIdentical(t,n){if(!(t instanceof Qc))return 0;let r=0,[s,i,o,a]=n>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;s+=n,i+=n){if(s==o||i==a)return r;let l=this.children[s],c=t.children[i];if(l!=c)return r+l.scanIdentical(c,n);r+=l.length+1}}static from(t,n=t.reduce((r,s)=>r+s.length+1,-1)){let r=0;for(let g of t)r+=g.lines;if(r<32){let g=[];for(let b of t)b.flatten(g);return new is(g,n)}let s=Math.max(32,r>>5),i=s<<1,o=s>>1,a=[],l=0,c=-1,u=[];function d(g){let b;if(g.lines>i&&g instanceof Qc)for(let x of g.children)d(x);else g.lines>o&&(l>o||!l)?(p(),a.push(g)):g instanceof is&&l&&(b=u[u.length-1])instanceof is&&g.lines+b.lines<=32?(l+=g.lines,c+=g.length+1,u[u.length-1]=new is(b.text.concat(g.text),b.length+1+g.length)):(l+g.lines>s&&p(),l+=g.lines,c+=g.length+1,u.push(g))}function p(){l!=0&&(a.push(u.length==1?u[0]:Qc.from(u,c)),c=-1,l=u.length=0)}for(let g of t)d(g);return p(),a.length==1?a[0]:new Qc(a,n)}}Gn.empty=new is([""],0);function hKe(e){let t=-1;for(let n of e)t+=n.length+1;return t}function XE(e,t,n=0,r=1e9){for(let s=0,i=0,o=!0;i<e.length&&s<=r;i++){let a=e[i],l=s+a.length;l>=n&&(l>r&&(a=a.slice(0,r-s)),s<n&&(a=a.slice(n-s)),o?(t[t.length-1]+=a,o=!1):t.push(a)),s=l+1}return t}function AY(e,t,n){return XE(e,[""],t,n)}class aw{constructor(t,n=1){this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[t],this.offsets=[n>0?1:(t instanceof is?t.text.length:t.children.length)<<1]}nextInner(t,n){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,s=this.nodes[r],i=this.offsets[r],o=i>>1,a=s instanceof is?s.text.length:s.children.length;if(o==(n>0?a:0)){if(r==0)return this.done=!0,this.value="",this;n>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((i&1)==(n>0?0:1)){if(this.offsets[r]+=n,t==0)return this.lineBreak=!0,this.value=`
|
|
581
581
|
`,this;t--}else if(s instanceof is){let l=s.text[o+(n<0?-1:0)];if(this.offsets[r]+=n,l.length>Math.max(0,t))return this.value=t==0?l:n>0?l.slice(t):l.slice(0,l.length-t),this;t-=l.length}else{let l=s.children[o+(n<0?-1:0)];t>l.length?(t-=l.length,this.offsets[r]+=n):(n<0&&this.offsets[r]--,this.nodes.push(l),this.offsets.push(n>0?1:(l instanceof is?l.text.length:l.children.length)<<1))}}}next(t=0){return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}class nue{constructor(t,n,r){this.value="",this.done=!1,this.cursor=new aw(t,n>r?-1:1),this.pos=n>r?t.length:0,this.from=Math.min(n,r),this.to=Math.max(n,r)}nextInner(t,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let r=n<0?this.pos-this.from:this.to-this.pos;t>r&&(t=r),r-=t;let{value:s}=this.cursor.next(t);return this.pos+=(s.length+t)*n,this.value=s.length<=r?s:n<0?s.slice(s.length-r):s.slice(0,r),this.done=!this.value,this}next(t=0){return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class rue{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:n,lineBreak:r,value:s}=this.inner.next(t);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Gn.prototype[Symbol.iterator]=function(){return this.iter()},aw.prototype[Symbol.iterator]=nue.prototype[Symbol.iterator]=rue.prototype[Symbol.iterator]=function(){return this});class fKe{constructor(t,n,r,s){this.from=t,this.to=n,this.number=r,this.text=s}get length(){return this.to-this.from}}function Hb(e,t,n){return t=Math.max(0,Math.min(e.length,t)),[t,Math.max(t,Math.min(e.length,n))]}function ui(e,t,n=!0,r=!0){return uKe(e,t,n,r)}function pKe(e){return e>=56320&&e<57344}function mKe(e){return e>=55296&&e<56320}function Do(e,t){let n=e.charCodeAt(t);if(!mKe(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return pKe(r)?(n-55296<<10)+(r-56320)+65536:n}function jR(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}function eu(e){return e<65536?1:2}const iM=/\r\n?|\n/;var ro=function(e){return e[e.Simple=0]="Simple",e[e.TrackDel=1]="TrackDel",e[e.TrackBefore=2]="TrackBefore",e[e.TrackAfter=3]="TrackAfter",e}(ro||(ro={}));class xu{constructor(t){this.sections=t}get length(){let t=0;for(let n=0;n<this.sections.length;n+=2)t+=this.sections[n];return t}get newLength(){let t=0;for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n+1];t+=r<0?this.sections[n]:r}return t}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(t){for(let n=0,r=0,s=0;n<this.sections.length;){let i=this.sections[n++],o=this.sections[n++];o<0?(t(r,s,i),s+=i):s+=o,r+=i}}iterChangedRanges(t,n=!1){oM(this,t,n)}get invertedDesc(){let t=[];for(let n=0;n<this.sections.length;){let r=this.sections[n++],s=this.sections[n++];s<0?t.push(r,s):t.push(s,r)}return new xu(t)}composeDesc(t){return this.empty?t:t.empty?this:sue(this,t)}mapDesc(t,n=!1){return t.empty?this:aM(this,t,n)}mapPos(t,n=-1,r=ro.Simple){let s=0,i=0;for(let o=0;o<this.sections.length;){let a=this.sections[o++],l=this.sections[o++],c=s+a;if(l<0){if(c>t)return i+(t-s);i+=a}else{if(r!=ro.Simple&&c>=t&&(r==ro.TrackDel&&s<t&&c>t||r==ro.TrackBefore&&s<t||r==ro.TrackAfter&&c>t))return null;if(c>t||c==t&&n<0&&!a)return t==s||n<0?i:i+l;i+=l}s=c}if(t>s)throw new RangeError(`Position ${t} is out of range for changeset of length ${s}`);return i}touchesRange(t,n=t){for(let r=0,s=0;r<this.sections.length&&s<=n;){let i=this.sections[r++],o=this.sections[r++],a=s+i;if(o>=0&&s<=n&&a>=t)return s<t&&a>n?"cover":!0;s=a}return!1}toString(){let t="";for(let n=0;n<this.sections.length;){let r=this.sections[n++],s=this.sections[n++];t+=(t?" ":"")+r+(s>=0?":"+s:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new xu(t)}static create(t){return new xu(t)}}class Ms extends xu{constructor(t,n){super(t),this.inserted=n}apply(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return oM(this,(n,r,s,i,o)=>t=t.replace(s,s+(r-n),o),!1),t}mapDesc(t,n=!1){return aM(this,t,n,!0)}invert(t){let n=this.sections.slice(),r=[];for(let s=0,i=0;s<n.length;s+=2){let o=n[s],a=n[s+1];if(a>=0){n[s]=a,n[s+1]=o;let l=s>>1;for(;r.length<l;)r.push(Gn.empty);r.push(o?t.slice(i,i+o):Gn.empty)}i+=o}return new Ms(n,r)}compose(t){return this.empty?t:t.empty?this:sue(this,t,!0)}map(t,n=!1){return t.empty?this:aM(this,t,n,!0)}iterChanges(t,n=!1){oM(this,t,n)}get desc(){return xu.create(this.sections)}filter(t){let n=[],r=[],s=[],i=new Jw(this);e:for(let o=0,a=0;;){let l=o==t.length?1e9:t[o++];for(;a<l||a==l&&i.len==0;){if(i.done)break e;let u=Math.min(i.len,l-a);Ei(s,u,-1);let d=i.ins==-1?-1:i.off==0?i.ins:0;Ei(n,u,d),d>0&&Kf(r,n,i.text),i.forward(u),a+=u}let c=t[o++];for(;a<c;){if(i.done)break e;let u=Math.min(i.len,c-a);Ei(n,u,-1),Ei(s,u,i.ins==-1?-1:i.off==0?i.ins:0),i.forward(u),a+=u}}return{changes:new Ms(n,r),filtered:xu.create(s)}}toJSON(){let t=[];for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n],s=this.sections[n+1];s<0?t.push(r):s==0?t.push([r]):t.push([r].concat(this.inserted[n>>1].toJSON()))}return t}static of(t,n,r){let s=[],i=[],o=0,a=null;function l(u=!1){if(!u&&!s.length)return;o<n&&Ei(s,n-o,-1);let d=new Ms(s,i);a=a?a.compose(d.map(a)):d,s=[],i=[],o=0}function c(u){if(Array.isArray(u))for(let d of u)c(d);else if(u instanceof Ms){if(u.length!=n)throw new RangeError(`Mismatched change set length (got ${u.length}, expected ${n})`);l(),a=a?a.compose(u.map(a)):u}else{let{from:d,to:p=d,insert:g}=u;if(d>p||d<0||p>n)throw new RangeError(`Invalid change range ${d} to ${p} (in doc of length ${n})`);let b=g?typeof g=="string"?Gn.of(g.split(r||iM)):g:Gn.empty,x=b.length;if(d==p&&x==0)return;d<o&&l(),d>o&&Ei(s,d-o,-1),Ei(s,p-d,x),Kf(i,s,b),o=p}}return c(t),l(!a),a}static empty(t){return new Ms(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],r=[];for(let s=0;s<t.length;s++){let i=t[s];if(typeof i=="number")n.push(i,-1);else{if(!Array.isArray(i)||typeof i[0]!="number"||i.some((o,a)=>a&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(i.length==1)n.push(i[0],0);else{for(;r.length<s;)r.push(Gn.empty);r[s]=Gn.of(i.slice(1)),n.push(i[0],r[s].length)}}}return new Ms(n,r)}static createSet(t,n){return new Ms(t,n)}}function Ei(e,t,n,r=!1){if(t==0&&n<=0)return;let s=e.length-2;s>=0&&n<=0&&n==e[s+1]?e[s]+=t:s>=0&&t==0&&e[s]==0?e[s+1]+=n:r?(e[s]+=t,e[s+1]+=n):e.push(t,n)}function Kf(e,t,n){if(n.length==0)return;let r=t.length-2>>1;if(r<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<r;)e.push(Gn.empty);e.push(n)}}function oM(e,t,n){let r=e.inserted;for(let s=0,i=0,o=0;o<e.sections.length;){let a=e.sections[o++],l=e.sections[o++];if(l<0)s+=a,i+=a;else{let c=s,u=i,d=Gn.empty;for(;c+=a,u+=l,l&&r&&(d=d.append(r[o-2>>1])),!(n||o==e.sections.length||e.sections[o+1]<0);)a=e.sections[o++],l=e.sections[o++];t(s,c,i,u,d),s=c,i=u}}}function aM(e,t,n,r=!1){let s=[],i=r?[]:null,o=new Jw(e),a=new Jw(t);for(let l=-1;;){if(o.done&&a.len||a.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&a.ins==-1){let c=Math.min(o.len,a.len);Ei(s,c,-1),o.forward(c),a.forward(c)}else if(a.ins>=0&&(o.ins<0||l==o.i||o.off==0&&(a.len<o.len||a.len==o.len&&!n))){let c=a.len;for(Ei(s,a.ins,-1);c;){let u=Math.min(o.len,c);o.ins>=0&&l<o.i&&o.len<=u&&(Ei(s,0,o.ins),i&&Kf(i,s,o.text),l=o.i),o.forward(u),c-=u}a.next()}else if(o.ins>=0){let c=0,u=o.len;for(;u;)if(a.ins==-1){let d=Math.min(u,a.len);c+=d,u-=d,a.forward(d)}else if(a.ins==0&&a.len<u)u-=a.len,a.next();else break;Ei(s,c,l<o.i?o.ins:0),i&&l<o.i&&Kf(i,s,o.text),l=o.i,o.forward(o.len-u)}else{if(o.done&&a.done)return i?Ms.createSet(s,i):xu.create(s);throw new Error("Mismatched change set lengths")}}}function sue(e,t,n=!1){let r=[],s=n?[]:null,i=new Jw(e),o=new Jw(t);for(let a=!1;;){if(i.done&&o.done)return s?Ms.createSet(r,s):xu.create(r);if(i.ins==0)Ei(r,i.len,0,a),i.next();else if(o.len==0&&!o.done)Ei(r,0,o.ins,a),s&&Kf(s,r,o.text),o.next();else{if(i.done||o.done)throw new Error("Mismatched change set lengths");{let l=Math.min(i.len2,o.len),c=r.length;if(i.ins==-1){let u=o.ins==-1?-1:o.off?0:o.ins;Ei(r,l,u,a),s&&u&&Kf(s,r,o.text)}else o.ins==-1?(Ei(r,i.off?0:i.len,l,a),s&&Kf(s,r,i.textBit(l))):(Ei(r,i.off?0:i.len,o.off?0:o.ins,a),s&&!o.off&&Kf(s,r,o.text));a=(i.ins>l||o.ins>=0&&o.len>l)&&(a||r.length>c),i.forward2(l),o.forward(l)}}}}class Jw{constructor(t){this.set=t,this.i=0,this.next()}next(){let{sections:t}=this.set;this.i<t.length?(this.len=t[this.i++],this.ins=t[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length?Gn.empty:t[n]}textBit(t){let{inserted:n}=this.set,r=this.i-2>>1;return r>=n.length&&!t?Gn.empty:n[r].slice(this.off,t==null?void 0:this.off+t)}forward(t){t==this.len?this.next():(this.len-=t,this.off+=t)}forward2(t){this.ins==-1?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}class Hm{constructor(t,n,r){this.from=t,this.to=n,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let t=this.flags&7;return t==7?null:t}get goalColumn(){let t=this.flags>>6;return t==16777215?void 0:t}map(t,n=-1){let r,s;return this.empty?r=s=t.mapPos(this.from,n):(r=t.mapPos(this.from,1),s=t.mapPos(this.to,-1)),r==this.from&&s==this.to?this:new Hm(r,s,this.flags)}extend(t,n=t){if(t<=this.anchor&&n>=this.anchor)return $e.range(t,n);let r=Math.abs(t-this.anchor)>Math.abs(n-this.anchor)?t:n;return $e.range(this.anchor,r)}eq(t,n=!1){return this.anchor==t.anchor&&this.head==t.head&&(!n||!this.empty||this.assoc==t.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return $e.range(t.anchor,t.head)}static create(t,n,r){return new Hm(t,n,r)}}class $e{constructor(t,n){this.ranges=t,this.mainIndex=n}map(t,n=-1){return t.empty?this:$e.create(this.ranges.map(r=>r.map(t,n)),this.mainIndex)}eq(t,n=!1){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let r=0;r<this.ranges.length;r++)if(!this.ranges[r].eq(t.ranges[r],n))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new $e([this.main],0)}addRange(t,n=!0){return $e.create([t].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(t,n=this.mainIndex){let r=this.ranges.slice();return r[n]=t,$e.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(t=>t.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||typeof t.main!="number"||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new $e(t.ranges.map(n=>Hm.fromJSON(n)),t.main)}static single(t,n=t){return new $e([$e.range(t,n)],0)}static create(t,n=0){if(t.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,s=0;s<t.length;s++){let i=t[s];if(i.empty?i.from<=r:i.from<r)return $e.normalized(t.slice(),n);r=i.to}return new $e(t,n)}static cursor(t,n=0,r,s){return Hm.create(t,t,(n==0?0:n<0?8:16)|(r==null?7:Math.min(6,r))|(s??16777215)<<6)}static range(t,n,r,s){let i=(r??16777215)<<6|(s==null?7:Math.min(6,s));return n<t?Hm.create(n,t,48|i):Hm.create(t,n,(n>t?8:0)|i)}static normalized(t,n=0){let r=t[n];t.sort((s,i)=>s.from-i.from),n=t.indexOf(r);for(let s=1;s<t.length;s++){let i=t[s],o=t[s-1];if(i.empty?i.from<=o.to:i.from<o.to){let a=o.from,l=Math.max(i.to,o.to);s<=n&&n--,t.splice(--s,2,i.anchor>i.head?$e.range(l,a):$e.range(a,l))}}return new $e(t,n)}}function iue(e,t){for(let n of e.ranges)if(n.to>t)throw new RangeError("Selection points outside of document")}let FR=0;class wt{constructor(t,n,r,s,i){this.combine=t,this.compareInput=n,this.compare=r,this.isStatic=s,this.id=FR++,this.default=t([]),this.extensions=typeof i=="function"?i(this):i}get reader(){return this}static define(t={}){return new wt(t.combine||(n=>n),t.compareInput||((n,r)=>n===r),t.compare||(t.combine?(n,r)=>n===r:IR),!!t.static,t.enables)}of(t){return new JE([],this,0,t)}compute(t,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new JE(t,this,1,n)}computeN(t,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new JE(t,this,2,n)}from(t,n){return n||(n=r=>r),this.compute([t],r=>n(r.field(t)))}}function IR(e,t){return e==t||e.length==t.length&&e.every((n,r)=>n===t[r])}class JE{constructor(t,n,r,s){this.dependencies=t,this.facet=n,this.type=r,this.value=s,this.id=FR++}dynamicSlot(t){var n;let r=this.value,s=this.facet.compareInput,i=this.id,o=t[i]>>1,a=this.type==2,l=!1,c=!1,u=[];for(let d of this.dependencies)d=="doc"?l=!0:d=="selection"?c=!0:(((n=t[d.id])!==null&&n!==void 0?n:1)&1)==0&&u.push(t[d.id]);return{create(d){return d.values[o]=r(d),1},update(d,p){if(l&&p.docChanged||c&&(p.docChanged||p.selection)||lM(d,u)){let g=r(d);if(a?!TY(g,d.values[o],s):!s(g,d.values[o]))return d.values[o]=g,1}return 0},reconfigure:(d,p)=>{let g,b=p.config.address[i];if(b!=null){let x=l3(p,b);if(this.dependencies.every(S=>S instanceof wt?p.facet(S)===d.facet(S):S instanceof mi?p.field(S,!1)==d.field(S,!1):!0)||(a?TY(g=r(d),x,s):s(g=r(d),x)))return d.values[o]=x,0}else g=r(d);return d.values[o]=g,1}}}}function TY(e,t,n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function lM(e,t){let n=!1;for(let r of t)lw(e,r)&1&&(n=!0);return n}function gKe(e,t,n){let r=n.map(l=>e[l.id]),s=n.map(l=>l.type),i=r.filter(l=>!(l&1)),o=e[t.id]>>1;function a(l){let c=[];for(let u=0;u<r.length;u++){let d=l3(l,r[u]);if(s[u]==2)for(let p of d)c.push(p);else c.push(d)}return t.combine(c)}return{create(l){for(let c of r)lw(l,c);return l.values[o]=a(l),1},update(l,c){if(!lM(l,i))return 0;let u=a(l);return t.compare(u,l.values[o])?0:(l.values[o]=u,1)},reconfigure(l,c){let u=lM(l,r),d=c.config.facets[t.id],p=c.facet(t);if(d&&!u&&IR(n,d))return l.values[o]=p,0;let g=a(l);return t.compare(g,p)?(l.values[o]=p,0):(l.values[o]=g,1)}}}const M2=wt.define({static:!0});class mi{constructor(t,n,r,s,i){this.id=t,this.createF=n,this.updateF=r,this.compareF=s,this.spec=i,this.provides=void 0}static define(t){let n=new mi(FR++,t.create,t.update,t.compare||((r,s)=>r===s),t);return t.provide&&(n.provides=t.provide(n)),n}create(t){let n=t.facet(M2).find(r=>r.field==this);return((n==null?void 0:n.create)||this.createF)(t)}slot(t){let n=t[this.id]>>1;return{create:r=>(r.values[n]=this.create(r),1),update:(r,s)=>{let i=r.values[n],o=this.updateF(i,s);return this.compareF(i,o)?0:(r.values[n]=o,1)},reconfigure:(r,s)=>{let i=r.facet(M2),o=s.facet(M2),a;return(a=i.find(l=>l.field==this))&&a!=o.find(l=>l.field==this)?(r.values[n]=a.create(r),1):s.config.address[this.id]!=null?(r.values[n]=s.field(this),0):(r.values[n]=this.create(r),1)}}}init(t){return[this,M2.of({field:this,create:t})]}get extension(){return this}}const Om={lowest:4,low:3,default:2,high:1,highest:0};function fv(e){return t=>new oue(t,e)}const uy={highest:fv(Om.highest),high:fv(Om.high),default:fv(Om.default),low:fv(Om.low),lowest:fv(Om.lowest)};class oue{constructor(t,n){this.inner=t,this.prec=n}}class ST{of(t){return new cM(this,t)}reconfigure(t){return ST.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class cM{constructor(t,n){this.compartment=t,this.inner=n}}class a3{constructor(t,n,r,s,i,o){for(this.base=t,this.compartments=n,this.dynamicSlots=r,this.address=s,this.staticValues=i,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(t){let n=this.address[t.id];return n==null?t.default:this.staticValues[n>>1]}static resolve(t,n,r){let s=[],i=Object.create(null),o=new Map;for(let p of yKe(t,n,o))p instanceof mi?s.push(p):(i[p.facet.id]||(i[p.facet.id]=[])).push(p);let a=Object.create(null),l=[],c=[];for(let p of s)a[p.id]=c.length<<1,c.push(g=>p.slot(g));let u=r==null?void 0:r.config.facets;for(let p in i){let g=i[p],b=g[0].facet,x=u&&u[p]||[];if(g.every(S=>S.type==0))if(a[b.id]=l.length<<1|1,IR(x,g))l.push(r.facet(b));else{let S=b.combine(g.map(E=>E.value));l.push(r&&b.compare(S,r.facet(b))?r.facet(b):S)}else{for(let S of g)S.type==0?(a[S.id]=l.length<<1|1,l.push(S.value)):(a[S.id]=c.length<<1,c.push(E=>S.dynamicSlot(E)));a[b.id]=c.length<<1,c.push(S=>gKe(S,b,g))}}let d=c.map(p=>p(a));return new a3(t,o,d,a,l,i)}}function yKe(e,t,n){let r=[[],[],[],[],[]],s=new Map;function i(o,a){let l=s.get(o);if(l!=null){if(l<=a)return;let c=r[l].indexOf(o);c>-1&&r[l].splice(c,1),o instanceof cM&&n.delete(o.compartment)}if(s.set(o,a),Array.isArray(o))for(let c of o)i(c,a);else if(o instanceof cM){if(n.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let c=t.get(o.compartment)||o.inner;n.set(o.compartment,c),i(c,a)}else if(o instanceof oue)i(o.inner,o.prec);else if(o instanceof mi)r[a].push(o),o.provides&&i(o.provides,a);else if(o instanceof JE)r[a].push(o),o.facet.extensions&&i(o.facet.extensions,Om.default);else{let c=o.extension;if(!c)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);i(c,a)}}return i(e,Om.default),r.reduce((o,a)=>o.concat(a))}function lw(e,t){if(t&1)return 2;let n=t>>1,r=e.status[n];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;e.status[n]=4;let s=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|s}function l3(e,t){return t&1?e.config.staticValues[t>>1]:e.values[t>>1]}const aue=wt.define(),uM=wt.define({combine:e=>e.some(t=>t),static:!0}),lue=wt.define({combine:e=>e.length?e[0]:void 0,static:!0}),cue=wt.define(),uue=wt.define(),due=wt.define(),hue=wt.define({combine:e=>e.length?e[0]:!1});class Uu{constructor(t,n){this.type=t,this.value=n}static define(){return new bKe}}class bKe{of(t){return new Uu(this,t)}}class xKe{constructor(t){this.map=t}of(t){return new en(this,t)}}class en{constructor(t,n){this.type=t,this.value=n}map(t){let n=this.type.map(this.value,t);return n===void 0?void 0:n==this.value?this:new en(this.type,n)}is(t){return this.type==t}static define(t={}){return new xKe(t.map||(n=>n))}static mapEffects(t,n){if(!t.length)return t;let r=[];for(let s of t){let i=s.map(n);i&&r.push(i)}return r}}en.reconfigure=en.define();en.appendConfig=en.define();class Is{constructor(t,n,r,s,i,o){this.startState=t,this.changes=n,this.selection=r,this.effects=s,this.annotations=i,this.scrollIntoView=o,this._doc=null,this._state=null,r&&iue(r,n.newLength),i.some(a=>a.type==Is.time)||(this.annotations=i.concat(Is.time.of(Date.now())))}static create(t,n,r,s,i,o){return new Is(t,n,r,s,i,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(t){for(let n of this.annotations)if(n.type==t)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let n=this.annotation(Is.userEvent);return!!(n&&(n==t||n.length>t.length&&n.slice(0,t.length)==t&&n[t.length]=="."))}}Is.time=Uu.define();Is.userEvent=Uu.define();Is.addToHistory=Uu.define();Is.remote=Uu.define();function vKe(e,t){let n=[];for(let r=0,s=0;;){let i,o;if(r<e.length&&(s==t.length||t[s]>=e[r]))i=e[r++],o=e[r++];else if(s<t.length)i=t[s++],o=t[s++];else return n;!n.length||n[n.length-1]<i?n.push(i,o):n[n.length-1]<o&&(n[n.length-1]=o)}}function fue(e,t,n){var r;let s,i,o;return n?(s=t.changes,i=Ms.empty(t.changes.length),o=e.changes.compose(t.changes)):(s=t.changes.map(e.changes),i=e.changes.mapDesc(t.changes,!0),o=e.changes.compose(s)),{changes:o,selection:t.selection?t.selection.map(i):(r=e.selection)===null||r===void 0?void 0:r.map(s),effects:en.mapEffects(e.effects,s).concat(en.mapEffects(t.effects,i)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function dM(e,t,n){let r=t.selection,s=X0(t.annotations);return t.userEvent&&(s=s.concat(Is.userEvent.of(t.userEvent))),{changes:t.changes instanceof Ms?t.changes:Ms.of(t.changes||[],n,e.facet(lue)),selection:r&&(r instanceof $e?r:$e.single(r.anchor,r.head)),effects:X0(t.effects),annotations:s,scrollIntoView:!!t.scrollIntoView}}function pue(e,t,n){let r=dM(e,t.length?t[0]:{},e.doc.length);t.length&&t[0].filter===!1&&(n=!1);for(let i=1;i<t.length;i++){t[i].filter===!1&&(n=!1);let o=!!t[i].sequential;r=fue(r,dM(e,t[i],o?r.changes.newLength:e.doc.length),o)}let s=Is.create(e,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return SKe(n?wKe(s):s)}function wKe(e){let t=e.startState,n=!0;for(let s of t.facet(cue)){let i=s(e);if(i===!1){n=!1;break}Array.isArray(i)&&(n=n===!0?i:vKe(n,i))}if(n!==!0){let s,i;if(n===!1)i=e.changes.invertedDesc,s=Ms.empty(t.doc.length);else{let o=e.changes.filter(n);s=o.changes,i=o.filtered.mapDesc(o.changes).invertedDesc}e=Is.create(t,s,e.selection&&e.selection.map(i),en.mapEffects(e.effects,i),e.annotations,e.scrollIntoView)}let r=t.facet(uue);for(let s=r.length-1;s>=0;s--){let i=r[s](e);i instanceof Is?e=i:Array.isArray(i)&&i.length==1&&i[0]instanceof Is?e=i[0]:e=pue(t,X0(i),!1)}return e}function SKe(e){let t=e.startState,n=t.facet(due),r=e;for(let s=n.length-1;s>=0;s--){let i=n[s](e);i&&Object.keys(i).length&&(r=fue(r,dM(t,i,e.changes.newLength),!0))}return r==e?e:Is.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}const CKe=[];function X0(e){return e==null?CKe:Array.isArray(e)?e:[e]}var Ir=function(e){return e[e.Word=0]="Word",e[e.Space=1]="Space",e[e.Other=2]="Other",e}(Ir||(Ir={}));const kKe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let hM;try{hM=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function EKe(e){if(hM)return hM.test(e);for(let t=0;t<e.length;t++){let n=e[t];if(/\w/.test(n)||n>""&&(n.toUpperCase()!=n.toLowerCase()||kKe.test(n)))return!0}return!1}function DKe(e){return t=>{if(!/\S/.test(t))return Ir.Space;if(EKe(t))return Ir.Word;for(let n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return Ir.Word;return Ir.Other}}class En{constructor(t,n,r,s,i,o){this.config=t,this.doc=n,this.selection=r,this.values=s,this.status=t.statusTemplate.slice(),this.computeSlot=i,o&&(o._state=this);for(let a=0;a<this.config.dynamicSlots.length;a++)lw(this,a<<1);this.computeSlot=null}field(t,n=!0){let r=this.config.address[t.id];if(r==null){if(n)throw new RangeError("Field is not present in this state");return}return lw(this,r),l3(this,r)}update(...t){return pue(this,t,!0)}applyTransaction(t){let n=this.config,{base:r,compartments:s}=n;for(let a of t.effects)a.is(ST.reconfigure)?(n&&(s=new Map,n.compartments.forEach((l,c)=>s.set(c,l)),n=null),s.set(a.value.compartment,a.value.extension)):a.is(en.reconfigure)?(n=null,r=a.value):a.is(en.appendConfig)&&(n=null,r=X0(r).concat(a.value));let i;n?i=t.startState.values.slice():(n=a3.resolve(r,s,this),i=new En(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(l,c)=>c.reconfigure(l,this),null).values);let o=t.startState.facet(uM)?t.newSelection:t.newSelection.asSingle();new En(n,t.newDoc,o,i,(a,l)=>l.update(a,t),t)}replaceSelection(t){return typeof t=="string"&&(t=this.toText(t)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:t},range:$e.cursor(n.from+t.length)}))}changeByRange(t){let n=this.selection,r=t(n.ranges[0]),s=this.changes(r.changes),i=[r.range],o=X0(r.effects);for(let a=1;a<n.ranges.length;a++){let l=t(n.ranges[a]),c=this.changes(l.changes),u=c.map(s);for(let p=0;p<a;p++)i[p]=i[p].map(u);let d=s.mapDesc(c,!0);i.push(l.range.map(d)),s=s.compose(u),o=en.mapEffects(o,u).concat(en.mapEffects(X0(l.effects),d))}return{changes:s,selection:$e.create(i,n.mainIndex),effects:o}}changes(t=[]){return t instanceof Ms?t:Ms.of(t,this.doc.length,this.facet(En.lineSeparator))}toText(t){return Gn.of(t.split(this.facet(En.lineSeparator)||iM))}sliceDoc(t=0,n=this.doc.length){return this.doc.sliceString(t,n,this.lineBreak)}facet(t){let n=this.config.address[t.id];return n==null?t.default:(lw(this,n),l3(this,n))}toJSON(t){let n={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(t)for(let r in t){let s=t[r];s instanceof mi&&this.config.address[s.id]!=null&&(n[r]=s.spec.toJSON(this.field(t[r]),this))}return n}static fromJSON(t,n={},r){if(!t||typeof t.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let s=[];if(r){for(let i in r)if(Object.prototype.hasOwnProperty.call(t,i)){let o=r[i],a=t[i];s.push(o.init(l=>o.spec.fromJSON(a,l)))}}return En.create({doc:t.doc,selection:$e.fromJSON(t.selection),extensions:n.extensions?s.concat([n.extensions]):s})}static create(t={}){let n=a3.resolve(t.extensions||[],new Map),r=t.doc instanceof Gn?t.doc:Gn.of((t.doc||"").split(n.staticFacet(En.lineSeparator)||iM)),s=t.selection?t.selection instanceof $e?t.selection:$e.single(t.selection.anchor,t.selection.head):$e.single(0);return iue(s,r.length),n.staticFacet(uM)||(s=s.asSingle()),new En(n,r,s,n.dynamicSlots.map(()=>null),(i,o)=>o.create(i),null)}get tabSize(){return this.facet(En.tabSize)}get lineBreak(){return this.facet(En.lineSeparator)||`
|
|
@@ -715,21 +715,21 @@ ${o}`)):n&&(o=`${a}const ${n} = ${o}`),r&&n){let l=typeof r=="string"?r:`${n[0].
|
|
|
715
715
|
`}return o};class Wpt{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(t,n){this.keyToValue.set(t,n),this.valueToKey.set(n,t)}getByKey(t){return this.keyToValue.get(t)}getByValue(t){return this.valueToKey.get(t)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}}class yge{constructor(t){this.generateIdentifier=t,this.kv=new Wpt}register(t,n){this.kv.getByValue(t)||(n||(n=this.generateIdentifier(t)),this.kv.set(n,t))}clear(){this.kv.clear()}getIdentifier(t){return this.kv.getByValue(t)}getValue(t){return this.kv.getByKey(t)}}class qpt extends yge{constructor(){super(t=>t.name),this.classToAllowedProps=new Map}register(t,n){typeof n=="object"?(n.allowProps&&this.classToAllowedProps.set(t,n.allowProps),super.register(t,n.identifier)):super.register(t,n)}getAllowedProps(t){return this.classToAllowedProps.get(t)}}function Gpt(e){if("values"in Object)return Object.values(e);const t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}function Ypt(e,t){const n=Gpt(e);if("find"in n)return n.find(t);const r=n;for(let s=0;s<r.length;s++){const i=r[s];if(t(i))return i}}function l1(e,t){Object.entries(e).forEach(([n,r])=>t(r,n))}function hD(e,t){return e.indexOf(t)!==-1}function kZ(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(t(r))return r}}class Kpt{constructor(){this.transfomers={}}register(t){this.transfomers[t.name]=t}findApplicable(t){return Ypt(this.transfomers,n=>n.isApplicable(t))}findByName(t){return this.transfomers[t]}}const Xpt=e=>Object.prototype.toString.call(e).slice(8,-1),bge=e=>typeof e>"u",Jpt=e=>e===null,SS=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,kj=e=>SS(e)&&Object.keys(e).length===0,kp=e=>Array.isArray(e),Zpt=e=>typeof e=="string",Qpt=e=>typeof e=="number"&&!isNaN(e),emt=e=>typeof e=="boolean",tmt=e=>e instanceof RegExp,CS=e=>e instanceof Map,kS=e=>e instanceof Set,xge=e=>Xpt(e)==="Symbol",nmt=e=>e instanceof Date&&!isNaN(e.valueOf()),rmt=e=>e instanceof Error,EZ=e=>typeof e=="number"&&isNaN(e),smt=e=>emt(e)||Jpt(e)||bge(e)||Qpt(e)||Zpt(e)||xge(e),imt=e=>typeof e=="bigint",omt=e=>e===1/0||e===-1/0,amt=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),lmt=e=>e instanceof URL,vge=e=>e.replace(/\./g,"\\."),XN=e=>e.map(String).map(vge).join("."),gw=e=>{const t=[];let n="";for(let s=0;s<e.length;s++){let i=e.charAt(s);if(i==="\\"&&e.charAt(s+1)==="."){n+=".",s++;continue}if(i==="."){t.push(n),n="";continue}n+=i}const r=n;return t.push(r),t};function zc(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}const wge=[zc(bge,"undefined",()=>null,()=>{}),zc(imt,"bigint",e=>e.toString(),e=>typeof BigInt<"u"?BigInt(e):(console.error("Please add a BigInt polyfill."),e)),zc(nmt,"Date",e=>e.toISOString(),e=>new Date(e)),zc(rmt,"Error",(e,t)=>{const n={name:e.name,message:e.message};return t.allowedErrorProps.forEach(r=>{n[r]=e[r]}),n},(e,t)=>{const n=new Error(e.message);return n.name=e.name,n.stack=e.stack,t.allowedErrorProps.forEach(r=>{n[r]=e[r]}),n}),zc(tmt,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),n=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,n)}),zc(kS,"set",e=>[...e.values()],e=>new Set(e)),zc(CS,"map",e=>[...e.entries()],e=>new Map(e)),zc(e=>EZ(e)||omt(e),"number",e=>EZ(e)?"NaN":e>0?"Infinity":"-Infinity",Number),zc(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),zc(lmt,"URL",e=>e.toString(),e=>new URL(e))];function b4(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}const Sge=b4((e,t)=>xge(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>["symbol",t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,n)=>{const r=n.symbolRegistry.getValue(t[1]);if(!r)throw new Error("Trying to deserialize unknown symbol");return r}),cmt=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),Cge=b4(amt,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const n=cmt[t[1]];if(!n)throw new Error("Trying to deserialize unknown typed array");return new n(e)});function kge(e,t){return e!=null&&e.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}const Ege=b4(kge,(e,t)=>["class",t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{const n=t.classRegistry.getAllowedProps(e.constructor);if(!n)return{...e};const r={};return n.forEach(s=>{r[s]=e[s]}),r},(e,t,n)=>{const r=n.classRegistry.getValue(t[1]);if(!r)throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);return Object.assign(Object.create(r.prototype),e)}),Dge=b4((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>["custom",t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,n)=>{const r=n.customTransformerRegistry.findByName(t[1]);if(!r)throw new Error("Trying to deserialize unknown custom value");return r.deserialize(e)}),umt=[Ege,Sge,Dge,Cge],DZ=(e,t)=>{const n=kZ(umt,s=>s.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};const r=kZ(wge,s=>s.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation}},Age={};wge.forEach(e=>{Age[e.annotation]=e});const dmt=(e,t,n)=>{if(kp(t))switch(t[0]){case"symbol":return Sge.untransform(e,t,n);case"class":return Ege.untransform(e,t,n);case"custom":return Dge.untransform(e,t,n);case"typed-array":return Cge.untransform(e,t,n);default:throw new Error("Unknown transformation: "+t)}else{const r=Age[t];if(!r)throw new Error("Unknown transformation: "+t);return r.untransform(e,n)}},O0=(e,t)=>{if(t>e.size)throw new Error("index out of bounds");const n=e.keys();for(;t>0;)n.next(),t--;return n.next().value};function Tge(e){if(hD(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(hD(e,"prototype"))throw new Error("prototype is not allowed as a property");if(hD(e,"constructor"))throw new Error("constructor is not allowed as a property")}const hmt=(e,t)=>{Tge(t);for(let n=0;n<t.length;n++){const r=t[n];if(kS(e))e=O0(e,+r);else if(CS(e)){const s=+r,i=+t[++n]==0?"key":"value",o=O0(e,s);switch(i){case"key":e=o;break;case"value":e=e.get(o);break}}else e=e[r]}return e},Ej=(e,t,n)=>{if(Tge(t),t.length===0)return n(e);let r=e;for(let i=0;i<t.length-1;i++){const o=t[i];if(kp(r)){const a=+o;r=r[a]}else if(SS(r))r=r[o];else if(kS(r)){const a=+o;r=O0(r,a)}else if(CS(r)){if(i===t.length-2)break;const l=+o,c=+t[++i]==0?"key":"value",u=O0(r,l);switch(c){case"key":r=u;break;case"value":r=r.get(u);break}}}const s=t[t.length-1];if(kp(r)?r[+s]=n(r[+s]):SS(r)&&(r[s]=n(r[s])),kS(r)){const i=O0(r,+s),o=n(i);i!==o&&(r.delete(i),r.add(o))}if(CS(r)){const i=+t[t.length-2],o=O0(r,i);switch(+s==0?"key":"value"){case"key":{const l=n(o);r.set(l,r.get(o)),l!==o&&r.delete(o);break}case"value":{r.set(o,n(r.get(o)));break}}}return e};function Dj(e,t,n=[]){if(!e)return;if(!kp(e)){l1(e,(i,o)=>Dj(i,t,[...n,...gw(o)]));return}const[r,s]=e;s&&l1(s,(i,o)=>{Dj(i,t,[...n,...gw(o)])}),t(r,n)}function fmt(e,t,n){return Dj(t,(r,s)=>{e=Ej(e,s,i=>dmt(i,r,n))}),e}function pmt(e,t){function n(r,s){const i=hmt(e,gw(s));r.map(gw).forEach(o=>{e=Ej(e,o,()=>i)})}if(kp(t)){const[r,s]=t;r.forEach(i=>{e=Ej(e,gw(i),()=>e)}),s&&l1(s,n)}else l1(t,n);return e}const mmt=(e,t)=>SS(e)||kp(e)||CS(e)||kS(e)||kge(e,t);function gmt(e,t,n){const r=n.get(e);r?r.push(t):n.set(e,[t])}function ymt(e,t){const n={};let r;return e.forEach(s=>{if(s.length<=1)return;t||(s=s.map(a=>a.map(String)).sort((a,l)=>a.length-l.length));const[i,...o]=s;i.length===0?r=o.map(XN):n[XN(i)]=o.map(XN)}),r?kj(n)?[r]:[r,n]:kj(n)?void 0:n}const _ge=(e,t,n,r,s=[],i=[],o=new Map)=>{const a=smt(e);if(!a){gmt(e,s,t);const g=o.get(e);if(g)return r?{transformedValue:null}:g}if(!mmt(e,n)){const g=DZ(e,n),b=g?{transformedValue:g.value,annotations:[g.type]}:{transformedValue:e};return a||o.set(e,b),b}if(hD(i,e))return{transformedValue:null};const l=DZ(e,n),c=(l==null?void 0:l.value)??e,u=kp(c)?[]:{},d={};l1(c,(g,b)=>{if(b==="__proto__"||b==="constructor"||b==="prototype")throw new Error(`Detected property ${b}. This is a prototype pollution risk, please remove it from your object.`);const x=_ge(g,t,n,r,[...s,b],[...i,e],o);u[b]=x.transformedValue,kp(x.annotations)?d[b]=x.annotations:SS(x.annotations)&&l1(x.annotations,(S,E)=>{d[vge(b)+"."+E]=S})});const p=kj(d)?{transformedValue:u,annotations:l?[l.type]:void 0}:{transformedValue:u,annotations:l?[l.type,d]:d};return a||o.set(e,p),p};function Nge(e){return Object.prototype.toString.call(e).slice(8,-1)}function AZ(e){return Nge(e)==="Array"}function bmt(e){if(Nge(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function xmt(e,t,n,r,s){const i={}.propertyIsEnumerable.call(r,t)?"enumerable":"nonenumerable";i==="enumerable"&&(e[t]=n),s&&i==="nonenumerable"&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}function Aj(e,t={}){if(AZ(e))return e.map(s=>Aj(s,t));if(!bmt(e))return e;const n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols(e);return[...n,...r].reduce((s,i)=>{if(AZ(t.props)&&!t.props.includes(i))return s;const o=e[i],a=Aj(o,t);return xmt(s,i,a,e,t.nonenumerable),s},{})}class yr{constructor({dedupe:t=!1}={}){this.classRegistry=new qpt,this.symbolRegistry=new yge(n=>n.description??""),this.customTransformerRegistry=new Kpt,this.allowedErrorProps=[],this.dedupe=t}serialize(t){const n=new Map,r=_ge(t,n,this,this.dedupe),s={json:r.transformedValue};r.annotations&&(s.meta={...s.meta,values:r.annotations});const i=ymt(n,this.dedupe);return i&&(s.meta={...s.meta,referentialEqualities:i}),s}deserialize(t){const{json:n,meta:r}=t;let s=Aj(n);return r!=null&&r.values&&(s=fmt(s,r.values,this)),r!=null&&r.referentialEqualities&&(s=pmt(s,r.referentialEqualities)),s}stringify(t){return JSON.stringify(this.serialize(t))}parse(t){return this.deserialize(JSON.parse(t))}registerClass(t,n){this.classRegistry.register(t,n)}registerSymbol(t,n){this.symbolRegistry.register(t,n)}registerCustom(t,n){this.customTransformerRegistry.register({name:n,...t})}allowErrorProps(...t){this.allowedErrorProps.push(...t)}}yr.defaultInstance=new yr;yr.serialize=yr.defaultInstance.serialize.bind(yr.defaultInstance);yr.deserialize=yr.defaultInstance.deserialize.bind(yr.defaultInstance);yr.stringify=yr.defaultInstance.stringify.bind(yr.defaultInstance);yr.parse=yr.defaultInstance.parse.bind(yr.defaultInstance);yr.registerClass=yr.defaultInstance.registerClass.bind(yr.defaultInstance);yr.registerSymbol=yr.defaultInstance.registerSymbol.bind(yr.defaultInstance);yr.registerCustom=yr.defaultInstance.registerCustom.bind(yr.defaultInstance);yr.allowErrorProps=yr.defaultInstance.allowErrorProps.bind(yr.defaultInstance);const c1=yr.parse;var _C=e=>e.type==="checkbox",Wm=e=>e instanceof Date,Xi=e=>e==null;const Pge=e=>typeof e=="object";var cs=e=>!Xi(e)&&!Array.isArray(e)&&Pge(e)&&!Wm(e),vmt=e=>cs(e)&&e.target?_C(e.target)?e.target.checked:e.target.value:e,wmt=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Smt=(e,t)=>e.has(wmt(t)),Cmt=e=>{const t=e.constructor&&e.constructor.prototype;return cs(t)&&t.hasOwnProperty("isPrototypeOf")},JL=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function zr(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(JL&&(e instanceof Blob||r))&&(n||cs(e)))if(t=n?[]:{},!n&&!Cmt(e))t=e;else for(const s in e)e.hasOwnProperty(s)&&(t[s]=zr(e[s]));else return e;return t}var x4=e=>/^\w*$/.test(e),Er=e=>e===void 0,v4=e=>Array.isArray(e)?e.filter(Boolean):[],ZL=e=>v4(e.replace(/["|']|\]/g,"").split(/\.|\[/)),mt=(e,t,n)=>{if(!t||!cs(e))return n;const r=(x4(t)?[t]:ZL(t)).reduce((s,i)=>Xi(s)?s:s[i],e);return Er(r)||r===e?Er(e[t])?n:e[t]:r},Gc=e=>typeof e=="boolean",hr=(e,t,n)=>{let r=-1;const s=x4(t)?[t]:ZL(t),i=s.length,o=i-1;for(;++r<i;){const a=s[r];let l=n;if(r!==o){const c=e[a];l=cs(c)||Array.isArray(c)?c:isNaN(+s[r+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;e[a]=l,e=e[a]}};const TZ={BLUR:"blur",FOCUS_OUT:"focusout"},Qa={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},bd={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},QL=Se.createContext(null);QL.displayName="HookFormContext";const eB=()=>Se.useContext(QL),kmt=e=>{const{children:t,...n}=e;return Se.createElement(QL.Provider,{value:n},t)};var Emt=(e,t,n,r=!0)=>{const s={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(s,i,{get:()=>{const o=i;return t._proxyFormState[o]!==Qa.all&&(t._proxyFormState[o]=!r||Qa.all),e[o]}});return s};const Mge=typeof window<"u"?A.useLayoutEffect:A.useEffect;var du=e=>typeof e=="string",Dmt=(e,t,n,r,s)=>du(e)?(r&&t.watch.add(e),mt(n,e,s)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),mt(n,i))):(r&&(t.watchAll=!0),n),Amt=(e,t,n,r,s)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:s||!0}}:{},Ro=e=>Array.isArray(e)?e:[e],_Z=()=>{let e=[];return{get observers(){return e},next:s=>{for(const i of e)i.next&&i.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(i=>i!==s)}}),unsubscribe:()=>{e=[]}}},Tj=e=>Xi(e)||!Pge(e);function Of(e,t,n=new WeakSet){if(Tj(e)||Tj(t))return e===t;if(Wm(e)&&Wm(t))return e.getTime()===t.getTime();const r=Object.keys(e),s=Object.keys(t);if(r.length!==s.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const i of r){const o=e[i];if(!s.includes(i))return!1;if(i!=="ref"){const a=t[i];if(Wm(o)&&Wm(a)||cs(o)&&cs(a)||Array.isArray(o)&&Array.isArray(a)?!Of(o,a,n):o!==a)return!1}}return!0}var Gi=e=>cs(e)&&!Object.keys(e).length,tB=e=>e.type==="file",Yl=e=>typeof e=="function",W3=e=>{if(!JL)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},jge=e=>e.type==="select-multiple",nB=e=>e.type==="radio",Tmt=e=>nB(e)||_C(e),JN=e=>W3(e)&&e.isConnected;function _mt(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Er(e)?r++:e[t[r++]];return e}function Nmt(e){for(const t in e)if(e.hasOwnProperty(t)&&!Er(e[t]))return!1;return!0}function ss(e,t){const n=Array.isArray(t)?t:x4(t)?[t]:ZL(t),r=n.length===1?e:_mt(e,n),s=n.length-1,i=n[s];return r&&delete r[i],s!==0&&(cs(r)&&Gi(r)||Array.isArray(r)&&Nmt(r))&&ss(e,n.slice(0,-1)),e}var Fge=e=>{for(const t in e)if(Yl(e[t]))return!0;return!1};function q3(e,t={}){const n=Array.isArray(e);if(cs(e)||n)for(const r in e)Array.isArray(e[r])||cs(e[r])&&!Fge(e[r])?(t[r]=Array.isArray(e[r])?[]:{},q3(e[r],t[r])):Xi(e[r])||(t[r]=!0);return t}function Ige(e,t,n){const r=Array.isArray(e);if(cs(e)||r)for(const s in e)Array.isArray(e[s])||cs(e[s])&&!Fge(e[s])?Er(t)||Tj(n[s])?n[s]=Array.isArray(e[s])?q3(e[s],[]):{...q3(e[s])}:Ige(e[s],Xi(t)?{}:t[s],n[s]):n[s]=!Of(e[s],t[s]);return n}var Cv=(e,t)=>Ige(e,t,q3(t));const NZ={value:!1,isValid:!1},PZ={value:!0,isValid:!0};var Oge=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Er(e[0].attributes.value)?Er(e[0].value)||e[0].value===""?PZ:{value:e[0].value,isValid:!0}:PZ:NZ}return NZ},Rge=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Er(e)?e:t?e===""?NaN:e&&+e:n&&du(e)?new Date(e):r?r(e):e;const MZ={isValid:!1,value:null};var Lge=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,MZ):MZ;function jZ(e){const t=e.ref;return tB(t)?t.files:nB(t)?Lge(e.refs).value:jge(t)?[...t.selectedOptions].map(({value:n})=>n):_C(t)?Oge(e.refs).value:Rge(Er(t.value)?e.ref.value:t.value,e)}var Pmt=(e,t,n,r)=>{const s={};for(const i of e){const o=mt(t,i);o&&hr(s,i,o._f)}return{criteriaMode:n,names:[...e],fields:s,shouldUseNativeValidation:r}},G3=e=>e instanceof RegExp,kv=e=>Er(e)?e:G3(e)?e.source:cs(e)?G3(e.value)?e.value.source:e.value:e,R0=e=>({isOnSubmit:!e||e===Qa.onSubmit,isOnBlur:e===Qa.onBlur,isOnChange:e===Qa.onChange,isOnAll:e===Qa.all,isOnTouch:e===Qa.onTouched});const FZ="AsyncFunction";var Mmt=e=>!!e&&!!e.validate&&!!(Yl(e.validate)&&e.validate.constructor.name===FZ||cs(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===FZ)),jmt=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),_j=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const rb=(e,t,n,r)=>{for(const s of n||Object.keys(e)){const i=mt(e,s);if(i){const{_f:o,...a}=i;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],s)&&!r)return!0;if(o.ref&&t(o.ref,o.name)&&!r)return!0;if(rb(a,t))break}else if(cs(a)&&rb(a,t))break}}};function IZ(e,t,n){const r=mt(e,n);if(r||x4(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const i=s.join("."),o=mt(t,i),a=mt(e,i);if(o&&!Array.isArray(o)&&n!==i)return{name:n};if(a&&a.type)return{name:i,error:a};if(a&&a.root&&a.root.type)return{name:`${i}.root`,error:a.root};s.pop()}return{name:n}}var Fmt=(e,t,n,r)=>{n(e);const{name:s,...i}=e;return Gi(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(o=>t[o]===(!r||Qa.all))},Imt=(e,t,n)=>!e||!t||e===t||Ro(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),Omt=(e,t,n,r,s)=>s.isOnAll?!1:!n&&s.isOnTouch?!(t||e):(n?r.isOnBlur:s.isOnBlur)?!e:(n?r.isOnChange:s.isOnChange)?e:!0,Rmt=(e,t)=>!v4(mt(e,t)).length&&ss(e,t),Bge=(e,t,n)=>{const r=Ro(mt(e,n));return hr(r,"root",t[n]),hr(e,n,r),e},fD=e=>du(e);function OZ(e,t,n="validate"){if(fD(e)||Array.isArray(e)&&e.every(fD)||Gc(e)&&!e)return{type:n,message:fD(e)?e:"",ref:t}}var c0=e=>cs(e)&&!G3(e)?e:{value:e,message:""},Nj=async(e,t,n,r,s,i)=>{const{ref:o,refs:a,required:l,maxLength:c,minLength:u,min:d,max:p,pattern:g,validate:b,name:x,valueAsNumber:S,mount:E}=e._f,k=mt(n,x);if(!E||t.has(x))return{};const T=a?a[0]:o,P=$=>{s&&T.reportValidity&&(T.setCustomValidity(Gc($)?"":$||""),T.reportValidity())},M={},j=nB(o),F=_C(o),I=j||F,B=(S||tB(o))&&Er(o.value)&&Er(k)||W3(o)&&o.value===""||k===""||Array.isArray(k)&&!k.length,L=Amt.bind(null,x,r,M),W=($,J,V,Z=bd.maxLength,G=bd.minLength)=>{const q=$?J:V;M[x]={type:$?Z:G,message:q,ref:o,...L($?Z:G,q)}};if(i?!Array.isArray(k)||!k.length:l&&(!I&&(B||Xi(k))||Gc(k)&&!k||F&&!Oge(a).isValid||j&&!Lge(a).isValid)){const{value:$,message:J}=fD(l)?{value:!!l,message:l}:c0(l);if($&&(M[x]={type:bd.required,message:J,ref:T,...L(bd.required,J)},!r))return P(J),M}if(!B&&(!Xi(d)||!Xi(p))){let $,J;const V=c0(p),Z=c0(d);if(!Xi(k)&&!isNaN(k)){const G=o.valueAsNumber||k&&+k;Xi(V.value)||($=G>V.value),Xi(Z.value)||(J=G<Z.value)}else{const G=o.valueAsDate||new Date(k),q=U=>new Date(new Date().toDateString()+" "+U),z=o.type=="time",Y=o.type=="week";du(V.value)&&k&&($=z?q(k)>q(V.value):Y?k>V.value:G>new Date(V.value)),du(Z.value)&&k&&(J=z?q(k)<q(Z.value):Y?k<Z.value:G<new Date(Z.value))}if(($||J)&&(W(!!$,V.message,Z.message,bd.max,bd.min),!r))return P(M[x].message),M}if((c||u)&&!B&&(du(k)||i&&Array.isArray(k))){const $=c0(c),J=c0(u),V=!Xi($.value)&&k.length>+$.value,Z=!Xi(J.value)&&k.length<+J.value;if((V||Z)&&(W(V,$.message,J.message),!r))return P(M[x].message),M}if(g&&!B&&du(k)){const{value:$,message:J}=c0(g);if(G3($)&&!k.match($)&&(M[x]={type:bd.pattern,message:J,ref:o,...L(bd.pattern,J)},!r))return P(J),M}if(b){if(Yl(b)){const $=await b(k,n),J=OZ($,T);if(J&&(M[x]={...J,...L(bd.validate,J.message)},!r))return P(J.message),M}else if(cs(b)){let $={};for(const J in b){if(!Gi($)&&!r)break;const V=OZ(await b[J](k,n),T,J);V&&($={...V,...L(J,V.message)},P(V.message),r&&(M[x]=$))}if(!Gi($)&&(M[x]={ref:T,...$},!r))return M}}return P(!0),M};const Lmt={mode:Qa.onSubmit,reValidateMode:Qa.onChange,shouldFocusError:!0};function Bmt(e={}){let t={...Lmt,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:Yl(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1};const r={};let s=cs(t.defaultValues)||cs(t.values)?zr(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:zr(s),o={action:!1,mount:!1,watch:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,c=0;const u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let d={...u};const p={array:_Z(),state:_Z()},g=t.criteriaMode===Qa.all,b=de=>xe=>{clearTimeout(c),c=setTimeout(de,xe)},x=async de=>{if(!t.disabled&&(u.isValid||d.isValid||de)){const xe=t.resolver?Gi((await F()).errors):await B(r,!0);xe!==n.isValid&&p.state.next({isValid:xe})}},S=(de,xe)=>{!t.disabled&&(u.isValidating||u.validatingFields||d.isValidating||d.validatingFields)&&((de||Array.from(a.mount)).forEach(Me=>{Me&&(xe?hr(n.validatingFields,Me,xe):ss(n.validatingFields,Me))}),p.state.next({validatingFields:n.validatingFields,isValidating:!Gi(n.validatingFields)}))},E=(de,xe=[],Me,Je,Ze=!0,ze=!0)=>{if(Je&&Me&&!t.disabled){if(o.action=!0,ze&&Array.isArray(mt(r,de))){const fe=Me(mt(r,de),Je.argA,Je.argB);Ze&&hr(r,de,fe)}if(ze&&Array.isArray(mt(n.errors,de))){const fe=Me(mt(n.errors,de),Je.argA,Je.argB);Ze&&hr(n.errors,de,fe),Rmt(n.errors,de)}if((u.touchedFields||d.touchedFields)&&ze&&Array.isArray(mt(n.touchedFields,de))){const fe=Me(mt(n.touchedFields,de),Je.argA,Je.argB);Ze&&hr(n.touchedFields,de,fe)}(u.dirtyFields||d.dirtyFields)&&(n.dirtyFields=Cv(s,i)),p.state.next({name:de,isDirty:W(de,xe),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else hr(i,de,xe)},k=(de,xe)=>{hr(n.errors,de,xe),p.state.next({errors:n.errors})},T=de=>{n.errors=de,p.state.next({errors:n.errors,isValid:!1})},P=(de,xe,Me,Je)=>{const Ze=mt(r,de);if(Ze){const ze=mt(i,de,Er(Me)?mt(s,de):Me);Er(ze)||Je&&Je.defaultChecked||xe?hr(i,de,xe?ze:jZ(Ze._f)):V(de,ze),o.mount&&x()}},M=(de,xe,Me,Je,Ze)=>{let ze=!1,fe=!1;const Pe={name:de};if(!t.disabled){if(!Me||Je){(u.isDirty||d.isDirty)&&(fe=n.isDirty,n.isDirty=Pe.isDirty=W(),ze=fe!==Pe.isDirty);const Xe=Of(mt(s,de),xe);fe=!!mt(n.dirtyFields,de),Xe?ss(n.dirtyFields,de):hr(n.dirtyFields,de,!0),Pe.dirtyFields=n.dirtyFields,ze=ze||(u.dirtyFields||d.dirtyFields)&&fe!==!Xe}if(Me){const Xe=mt(n.touchedFields,de);Xe||(hr(n.touchedFields,de,Me),Pe.touchedFields=n.touchedFields,ze=ze||(u.touchedFields||d.touchedFields)&&Xe!==Me)}ze&&Ze&&p.state.next(Pe)}return ze?Pe:{}},j=(de,xe,Me,Je)=>{const Ze=mt(n.errors,de),ze=(u.isValid||d.isValid)&&Gc(xe)&&n.isValid!==xe;if(t.delayError&&Me?(l=b(()=>k(de,Me)),l(t.delayError)):(clearTimeout(c),l=null,Me?hr(n.errors,de,Me):ss(n.errors,de)),(Me?!Of(Ze,Me):Ze)||!Gi(Je)||ze){const fe={...Je,...ze&&Gc(xe)?{isValid:xe}:{},errors:n.errors,name:de};n={...n,...fe},p.state.next(fe)}},F=async de=>{S(de,!0);const xe=await t.resolver(i,t.context,Pmt(de||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return S(de),xe},I=async de=>{const{errors:xe}=await F(de);if(de)for(const Me of de){const Je=mt(xe,Me);Je?hr(n.errors,Me,Je):ss(n.errors,Me)}else n.errors=xe;return xe},B=async(de,xe,Me={valid:!0})=>{for(const Je in de){const Ze=de[Je];if(Ze){const{_f:ze,...fe}=Ze;if(ze){const Pe=a.array.has(ze.name),Xe=Ze._f&&Mmt(Ze._f);Xe&&u.validatingFields&&S([Je],!0);const ht=await Nj(Ze,a.disabled,i,g,t.shouldUseNativeValidation&&!xe,Pe);if(Xe&&u.validatingFields&&S([Je]),ht[ze.name]&&(Me.valid=!1,xe))break;!xe&&(mt(ht,ze.name)?Pe?Bge(n.errors,ht,ze.name):hr(n.errors,ze.name,ht[ze.name]):ss(n.errors,ze.name))}!Gi(fe)&&await B(fe,xe,Me)}}return Me.valid},L=()=>{for(const de of a.unMount){const xe=mt(r,de);xe&&(xe._f.refs?xe._f.refs.every(Me=>!JN(Me)):!JN(xe._f.ref))&&ae(de)}a.unMount=new Set},W=(de,xe)=>!t.disabled&&(de&&xe&&hr(i,de,xe),!Of(U(),s)),$=(de,xe,Me)=>Dmt(de,a,{...o.mount?i:Er(xe)?s:du(de)?{[de]:xe}:xe},Me,xe),J=de=>v4(mt(o.mount?i:s,de,t.shouldUnregister?mt(s,de,[]):[])),V=(de,xe,Me={})=>{const Je=mt(r,de);let Ze=xe;if(Je){const ze=Je._f;ze&&(!ze.disabled&&hr(i,de,Rge(xe,ze)),Ze=W3(ze.ref)&&Xi(xe)?"":xe,jge(ze.ref)?[...ze.ref.options].forEach(fe=>fe.selected=Ze.includes(fe.value)):ze.refs?_C(ze.ref)?ze.refs.forEach(fe=>{(!fe.defaultChecked||!fe.disabled)&&(Array.isArray(Ze)?fe.checked=!!Ze.find(Pe=>Pe===fe.value):fe.checked=Ze===fe.value||!!Ze)}):ze.refs.forEach(fe=>fe.checked=fe.value===Ze):tB(ze.ref)?ze.ref.value="":(ze.ref.value=Ze,ze.ref.type||p.state.next({name:de,values:zr(i)})))}(Me.shouldDirty||Me.shouldTouch)&&M(de,Ze,Me.shouldTouch,Me.shouldDirty,!0),Me.shouldValidate&&Y(de)},Z=(de,xe,Me)=>{for(const Je in xe){if(!xe.hasOwnProperty(Je))return;const Ze=xe[Je],ze=de+"."+Je,fe=mt(r,ze);(a.array.has(de)||cs(Ze)||fe&&!fe._f)&&!Wm(Ze)?Z(ze,Ze,Me):V(ze,Ze,Me)}},G=(de,xe,Me={})=>{const Je=mt(r,de),Ze=a.array.has(de),ze=zr(xe);hr(i,de,ze),Ze?(p.array.next({name:de,values:zr(i)}),(u.isDirty||u.dirtyFields||d.isDirty||d.dirtyFields)&&Me.shouldDirty&&p.state.next({name:de,dirtyFields:Cv(s,i),isDirty:W(de,ze)})):Je&&!Je._f&&!Xi(ze)?Z(de,ze,Me):V(de,ze,Me),_j(de,a)&&p.state.next({...n}),p.state.next({name:o.mount?de:void 0,values:zr(i)})},q=async de=>{o.mount=!0;const xe=de.target;let Me=xe.name,Je=!0;const Ze=mt(r,Me),ze=Xe=>{Je=Number.isNaN(Xe)||Wm(Xe)&&isNaN(Xe.getTime())||Of(Xe,mt(i,Me,Xe))},fe=R0(t.mode),Pe=R0(t.reValidateMode);if(Ze){let Xe,ht;const At=xe.type?jZ(Ze._f):vmt(de),Zn=de.type===TZ.BLUR||de.type===TZ.FOCUS_OUT,Es=!jmt(Ze._f)&&!t.resolver&&!mt(n.errors,Me)&&!Ze._f.deps||Omt(Zn,mt(n.touchedFields,Me),n.isSubmitted,Pe,fe),Br=_j(Me,a,Zn);hr(i,Me,At),Zn?(Ze._f.onBlur&&Ze._f.onBlur(de),l&&l(0)):Ze._f.onChange&&Ze._f.onChange(de);const wr=M(Me,At,Zn),ps=!Gi(wr)||Br;if(!Zn&&p.state.next({name:Me,type:de.type,values:zr(i)}),Es)return(u.isValid||d.isValid)&&(t.mode==="onBlur"?Zn&&x():Zn||x()),ps&&p.state.next({name:Me,...Br?{}:wr});if(!Zn&&Br&&p.state.next({...n}),t.resolver){const{errors:Cn}=await F([Me]);if(ze(At),Je){const es=IZ(n.errors,r,Me),Hn=IZ(Cn,r,es.name||Me);Xe=Hn.error,Me=Hn.name,ht=Gi(Cn)}}else S([Me],!0),Xe=(await Nj(Ze,a.disabled,i,g,t.shouldUseNativeValidation))[Me],S([Me]),ze(At),Je&&(Xe?ht=!1:(u.isValid||d.isValid)&&(ht=await B(r,!0)));Je&&(Ze._f.deps&&Y(Ze._f.deps),j(Me,ht,Xe,wr))}},z=(de,xe)=>{if(mt(n.errors,xe)&&de.focus)return de.focus(),1},Y=async(de,xe={})=>{let Me,Je;const Ze=Ro(de);if(t.resolver){const ze=await I(Er(de)?de:Ze);Me=Gi(ze),Je=de?!Ze.some(fe=>mt(ze,fe)):Me}else de?(Je=(await Promise.all(Ze.map(async ze=>{const fe=mt(r,ze);return await B(fe&&fe._f?{[ze]:fe}:fe)}))).every(Boolean),!(!Je&&!n.isValid)&&x()):Je=Me=await B(r);return p.state.next({...!du(de)||(u.isValid||d.isValid)&&Me!==n.isValid?{}:{name:de},...t.resolver||!de?{isValid:Me}:{},errors:n.errors}),xe.shouldFocus&&!Je&&rb(r,z,de?Ze:a.mount),Je},U=de=>{const xe={...o.mount?i:s};return Er(de)?xe:du(de)?mt(xe,de):de.map(Me=>mt(xe,Me))},X=(de,xe)=>({invalid:!!mt((xe||n).errors,de),isDirty:!!mt((xe||n).dirtyFields,de),error:mt((xe||n).errors,de),isValidating:!!mt(n.validatingFields,de),isTouched:!!mt((xe||n).touchedFields,de)}),ne=de=>{de&&Ro(de).forEach(xe=>ss(n.errors,xe)),p.state.next({errors:de?n.errors:{}})},H=(de,xe,Me)=>{const Je=(mt(r,de,{_f:{}})._f||{}).ref,Ze=mt(n.errors,de)||{},{ref:ze,message:fe,type:Pe,...Xe}=Ze;hr(n.errors,de,{...Xe,...xe,ref:Je}),p.state.next({name:de,errors:n.errors,isValid:!1}),Me&&Me.shouldFocus&&Je&&Je.focus&&Je.focus()},ee=(de,xe)=>Yl(de)?p.state.subscribe({next:Me=>de($(void 0,xe),Me)}):$(de,xe,!0),ie=de=>p.state.subscribe({next:xe=>{Imt(de.name,xe.name,de.exact)&&Fmt(xe,de.formState||u,Dt,de.reRenderRoot)&&de.callback({values:{...i},...n,...xe})}}).unsubscribe,se=de=>(o.mount=!0,d={...d,...de.formState},ie({...de,formState:d})),ae=(de,xe={})=>{for(const Me of de?Ro(de):a.mount)a.mount.delete(Me),a.array.delete(Me),xe.keepValue||(ss(r,Me),ss(i,Me)),!xe.keepError&&ss(n.errors,Me),!xe.keepDirty&&ss(n.dirtyFields,Me),!xe.keepTouched&&ss(n.touchedFields,Me),!xe.keepIsValidating&&ss(n.validatingFields,Me),!t.shouldUnregister&&!xe.keepDefaultValue&&ss(s,Me);p.state.next({values:zr(i)}),p.state.next({...n,...xe.keepDirty?{isDirty:W()}:{}}),!xe.keepIsValid&&x()},le=({disabled:de,name:xe})=>{(Gc(de)&&o.mount||de||a.disabled.has(xe))&&(de?a.disabled.add(xe):a.disabled.delete(xe))},pe=(de,xe={})=>{let Me=mt(r,de);const Je=Gc(xe.disabled)||Gc(t.disabled);return hr(r,de,{...Me||{},_f:{...Me&&Me._f?Me._f:{ref:{name:de}},name:de,mount:!0,...xe}}),a.mount.add(de),Me?le({disabled:Gc(xe.disabled)?xe.disabled:t.disabled,name:de}):P(de,!0,xe.value),{...Je?{disabled:xe.disabled||t.disabled}:{},...t.progressive?{required:!!xe.required,min:kv(xe.min),max:kv(xe.max),minLength:kv(xe.minLength),maxLength:kv(xe.maxLength),pattern:kv(xe.pattern)}:{},name:de,onChange:q,onBlur:q,ref:Ze=>{if(Ze){pe(de,xe),Me=mt(r,de);const ze=Er(Ze.value)&&Ze.querySelectorAll&&Ze.querySelectorAll("input,select,textarea")[0]||Ze,fe=Tmt(ze),Pe=Me._f.refs||[];if(fe?Pe.find(Xe=>Xe===ze):ze===Me._f.ref)return;hr(r,de,{_f:{...Me._f,...fe?{refs:[...Pe.filter(JN),ze,...Array.isArray(mt(s,de))?[{}]:[]],ref:{type:ze.type,name:de}}:{ref:ze}}}),P(de,!1,void 0,ze)}else Me=mt(r,de,{}),Me._f&&(Me._f.mount=!1),(t.shouldUnregister||xe.shouldUnregister)&&!(Smt(a.array,de)&&o.action)&&a.unMount.add(de)}}},ye=()=>t.shouldFocusError&&rb(r,z,a.mount),Te=de=>{Gc(de)&&(p.state.next({disabled:de}),rb(r,(xe,Me)=>{const Je=mt(r,Me);Je&&(xe.disabled=Je._f.disabled||de,Array.isArray(Je._f.refs)&&Je._f.refs.forEach(Ze=>{Ze.disabled=Je._f.disabled||de}))},0,!1))},Ee=(de,xe)=>async Me=>{let Je;Me&&(Me.preventDefault&&Me.preventDefault(),Me.persist&&Me.persist());let Ze=zr(i);if(p.state.next({isSubmitting:!0}),t.resolver){const{errors:ze,values:fe}=await F();n.errors=ze,Ze=zr(fe)}else await B(r);if(a.disabled.size)for(const ze of a.disabled)ss(Ze,ze);if(ss(n.errors,"root"),Gi(n.errors)){p.state.next({errors:{}});try{await de(Ze,Me)}catch(ze){Je=ze}}else xe&&await xe({...n.errors},Me),ye(),setTimeout(ye);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Gi(n.errors)&&!Je,submitCount:n.submitCount+1,errors:n.errors}),Je)throw Je},_e=(de,xe={})=>{mt(r,de)&&(Er(xe.defaultValue)?G(de,zr(mt(s,de))):(G(de,xe.defaultValue),hr(s,de,zr(xe.defaultValue))),xe.keepTouched||ss(n.touchedFields,de),xe.keepDirty||(ss(n.dirtyFields,de),n.isDirty=xe.defaultValue?W(de,zr(mt(s,de))):W()),xe.keepError||(ss(n.errors,de),u.isValid&&x()),p.state.next({...n}))},Fe=(de,xe={})=>{const Me=de?zr(de):s,Je=zr(Me),Ze=Gi(de),ze=Ze?s:Je;if(xe.keepDefaultValues||(s=Me),!xe.keepValues){if(xe.keepDirtyValues){const fe=new Set([...a.mount,...Object.keys(Cv(s,i))]);for(const Pe of Array.from(fe))mt(n.dirtyFields,Pe)?hr(ze,Pe,mt(i,Pe)):G(Pe,mt(ze,Pe))}else{if(JL&&Er(de))for(const fe of a.mount){const Pe=mt(r,fe);if(Pe&&Pe._f){const Xe=Array.isArray(Pe._f.refs)?Pe._f.refs[0]:Pe._f.ref;if(W3(Xe)){const ht=Xe.closest("form");if(ht){ht.reset();break}}}}for(const fe of a.mount){const Pe=mt(ze,fe,mt(s,fe));Er(Pe)||(hr(ze,fe,Pe),G(fe,mt(ze,fe)))}}i=zr(ze),p.array.next({values:{...ze}}),p.state.next({values:{...ze}})}a={mount:xe.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!u.isValid||!!xe.keepIsValid||!!xe.keepDirtyValues,o.watch=!!t.shouldUnregister,p.state.next({submitCount:xe.keepSubmitCount?n.submitCount:0,isDirty:Ze?!1:xe.keepDirty?n.isDirty:!!(xe.keepDefaultValues&&!Of(de,s)),isSubmitted:xe.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Ze?{}:xe.keepDirtyValues?xe.keepDefaultValues&&i?Cv(s,i):n.dirtyFields:xe.keepDefaultValues&&de?Cv(s,de):xe.keepDirty?n.dirtyFields:{},touchedFields:xe.keepTouched?n.touchedFields:{},errors:xe.keepErrors?n.errors:{},isSubmitSuccessful:xe.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},tt=(de,xe)=>Fe(Yl(de)?de(i):de,xe),nt=(de,xe={})=>{const Me=mt(r,de),Je=Me&&Me._f;if(Je){const Ze=Je.refs?Je.refs[0]:Je.ref;Ze.focus&&(Ze.focus(),xe.shouldSelect&&Yl(Ze.select)&&Ze.select())}},Dt=de=>{n={...n,...de}},tn={control:{register:pe,unregister:ae,getFieldState:X,handleSubmit:Ee,setError:H,_subscribe:ie,_runSchema:F,_focusError:ye,_getWatch:$,_getDirty:W,_setValid:x,_setFieldArray:E,_setDisabledField:le,_setErrors:T,_getFieldArray:J,_reset:Fe,_resetDefaultValues:()=>Yl(t.defaultValues)&&t.defaultValues().then(de=>{tt(de,t.resetOptions),p.state.next({isLoading:!1})}),_removeUnmounted:L,_disableForm:Te,_subjects:p,_proxyFormState:u,get _fields(){return r},get _formValues(){return i},get _state(){return o},set _state(de){o=de},get _defaultValues(){return s},get _names(){return a},set _names(de){a=de},get _formState(){return n},get _options(){return t},set _options(de){t={...t,...de}}},subscribe:se,trigger:Y,register:pe,handleSubmit:Ee,watch:ee,setValue:G,getValues:U,reset:tt,resetField:_e,clearErrors:ne,unregister:ae,setError:H,setFocus:nt,getFieldState:X};return{...tn,formControl:tn}}var kf=()=>{if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=(Math.random()*16+e)%16|0;return(t=="x"?n:n&3|8).toString(16)})},ZN=(e,t,n={})=>n.shouldFocus||Er(n.shouldFocus)?n.focusName||`${e}.${Er(n.focusIndex)?t:n.focusIndex}.`:"",QN=(e,t)=>[...e,...Ro(t)],e7=e=>Array.isArray(e)?e.map(()=>{}):void 0;function t7(e,t,n){return[...e.slice(0,t),...Ro(n),...e.slice(t)]}var n7=(e,t,n)=>Array.isArray(e)?(Er(e[n])&&(e[n]=void 0),e.splice(n,0,e.splice(t,1)[0]),e):[],r7=(e,t)=>[...Ro(t),...Ro(e)];function $mt(e,t){let n=0;const r=[...e];for(const s of t)r.splice(s-n,1),n++;return v4(r).length?r:[]}var s7=(e,t)=>Er(t)?[]:$mt(e,Ro(t).sort((n,r)=>n-r)),i7=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]},RZ=(e,t,n)=>(e[t]=n,e);function zmt(e){const t=eB(),{control:n=t.control,name:r,keyName:s="id",shouldUnregister:i,rules:o}=e,[a,l]=Se.useState(n._getFieldArray(r)),c=Se.useRef(n._getFieldArray(r).map(kf)),u=Se.useRef(a),d=Se.useRef(r),p=Se.useRef(!1);d.current=r,u.current=a,n._names.array.add(r),o&&n.register(r,o),Mge(()=>n._subjects.array.subscribe({next:({values:j,name:F})=>{if(F===d.current||!F){const I=mt(j,d.current);Array.isArray(I)&&(l(I),c.current=I.map(kf))}}}).unsubscribe,[n]);const g=Se.useCallback(j=>{p.current=!0,n._setFieldArray(r,j)},[n,r]),b=(j,F)=>{const I=Ro(zr(j)),B=QN(n._getFieldArray(r),I);n._names.focus=ZN(r,B.length-1,F),c.current=QN(c.current,I.map(kf)),g(B),l(B),n._setFieldArray(r,B,QN,{argA:e7(j)})},x=(j,F)=>{const I=Ro(zr(j)),B=r7(n._getFieldArray(r),I);n._names.focus=ZN(r,0,F),c.current=r7(c.current,I.map(kf)),g(B),l(B),n._setFieldArray(r,B,r7,{argA:e7(j)})},S=j=>{const F=s7(n._getFieldArray(r),j);c.current=s7(c.current,j),g(F),l(F),!Array.isArray(mt(n._fields,r))&&hr(n._fields,r,void 0),n._setFieldArray(r,F,s7,{argA:j})},E=(j,F,I)=>{const B=Ro(zr(F)),L=t7(n._getFieldArray(r),j,B);n._names.focus=ZN(r,j,I),c.current=t7(c.current,j,B.map(kf)),g(L),l(L),n._setFieldArray(r,L,t7,{argA:j,argB:e7(F)})},k=(j,F)=>{const I=n._getFieldArray(r);i7(I,j,F),i7(c.current,j,F),g(I),l(I),n._setFieldArray(r,I,i7,{argA:j,argB:F},!1)},T=(j,F)=>{const I=n._getFieldArray(r);n7(I,j,F),n7(c.current,j,F),g(I),l(I),n._setFieldArray(r,I,n7,{argA:j,argB:F},!1)},P=(j,F)=>{const I=zr(F),B=RZ(n._getFieldArray(r),j,I);c.current=[...B].map((L,W)=>!L||W===j?kf():c.current[W]),g(B),l([...B]),n._setFieldArray(r,B,RZ,{argA:j,argB:I},!0,!1)},M=j=>{const F=Ro(zr(j));c.current=F.map(kf),g([...F]),l([...F]),n._setFieldArray(r,[...F],I=>I,{},!0,!1)};return Se.useEffect(()=>{if(n._state.action=!1,_j(r,n._names)&&n._subjects.state.next({...n._formState}),p.current&&(!R0(n._options.mode).isOnSubmit||n._formState.isSubmitted)&&!R0(n._options.reValidateMode).isOnSubmit)if(n._options.resolver)n._runSchema([r]).then(j=>{const F=mt(j.errors,r),I=mt(n._formState.errors,r);(I?!F&&I.type||F&&(I.type!==F.type||I.message!==F.message):F&&F.type)&&(F?hr(n._formState.errors,r,F):ss(n._formState.errors,r),n._subjects.state.next({errors:n._formState.errors}))});else{const j=mt(n._fields,r);j&&j._f&&!(R0(n._options.reValidateMode).isOnSubmit&&R0(n._options.mode).isOnSubmit)&&Nj(j,n._names.disabled,n._formValues,n._options.criteriaMode===Qa.all,n._options.shouldUseNativeValidation,!0).then(F=>!Gi(F)&&n._subjects.state.next({errors:Bge(n._formState.errors,F,r)}))}n._subjects.state.next({name:r,values:zr(n._formValues)}),n._names.focus&&rb(n._fields,(j,F)=>{if(n._names.focus&&F.startsWith(n._names.focus)&&j.focus)return j.focus(),1}),n._names.focus="",n._setValid(),p.current=!1},[a,r,n]),Se.useEffect(()=>(!mt(n._formValues,r)&&n._setFieldArray(r),()=>{const j=(F,I)=>{const B=mt(n._fields,F);B&&B._f&&(B._f.mount=I)};n._options.shouldUnregister||i?n.unregister(r):j(r,!1)}),[r,n,s,i]),{swap:Se.useCallback(k,[g,r,n]),move:Se.useCallback(T,[g,r,n]),prepend:Se.useCallback(x,[g,r,n]),append:Se.useCallback(b,[g,r,n]),remove:Se.useCallback(S,[g,r,n]),insert:Se.useCallback(E,[g,r,n]),update:Se.useCallback(P,[g,r,n]),replace:Se.useCallback(M,[g,r,n]),fields:Se.useMemo(()=>a.map((j,F)=>({...j,[s]:c.current[F]||kf()})),[a,s])}}function Hmt(e={}){const t=Se.useRef(void 0),n=Se.useRef(void 0),[r,s]=Se.useState({isDirty:!1,isValidating:!1,isLoading:Yl(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Yl(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!Yl(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...a}=Bmt(e);t.current={...a,formState:r}}const i=t.current.control;return i._options=e,Mge(()=>{const o=i._subscribe({formState:i._proxyFormState,callback:()=>s({...i._formState}),reRenderRoot:!0});return s(a=>({...a,isReady:!0})),i._formState.isReady=!0,o},[i]),Se.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),Se.useEffect(()=>{e.mode&&(i._options.mode=e.mode),e.reValidateMode&&(i._options.reValidateMode=e.reValidateMode)},[i,e.mode,e.reValidateMode]),Se.useEffect(()=>{e.errors&&(i._setErrors(e.errors),i._focusError())},[i,e.errors]),Se.useEffect(()=>{e.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[i,e.shouldUnregister]),Se.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==r.isDirty&&i._subjects.state.next({isDirty:o})}},[i,r.isDirty]),Se.useEffect(()=>{e.values&&!Of(e.values,n.current)?(i._reset(e.values,i._options.resetOptions),n.current=e.values,s(o=>({...o}))):i._resetDefaultValues()},[i,e.values]),Se.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=Emt(r,i),t.current}function Y3(e){var t;return((t=e.fieldConfig)==null?void 0:t.label)||e.description||Vmt(e.key)}function Vmt(e){if(!e)return"";let t=e.replace(/([A-Z])/g," $1");return t=t.charAt(0).toUpperCase()+t.slice(1),!isNaN(Number(t))||t==="*"?"":t}function Umt(e){const t=e.parseSchema();return{...t,fields:$ge(t.fields)}}function Wmt(e){return e.getDefaultValues()}function Pj(e){const t={};for(const n in e){const r=e[n];if(![null,void 0,"",[],{}].includes(r))if(Array.isArray(r)){const s=r.map(i=>typeof i=="object"?Pj(i):i);t[n]=s.filter(i=>i!==null)}else typeof r=="object"?t[n]=Pj(r):t[n]=r}return t}function $ge(e){return e?e.map(n=>n.schema?{...n,schema:$ge(n.schema)}:n).sort((n,r)=>{var o,a;const s=((o=n.fieldConfig)==null?void 0:o.order)??0,i=((a=r.fieldConfig)==null?void 0:a.order)??0;return s-i}):[]}function qmt(e,t){return t!=null&&t.fieldType?t.fieldType:e instanceof ir?"object":e instanceof ba?"string":e instanceof _u?"number":e instanceof xg?"boolean":e instanceof sh?"date":e instanceof Pu||e instanceof wg?"select":e instanceof io?"array":"string"}function w4(e){if(e instanceof Fb)return e._def.defaultValue();if(e instanceof uo)return w4(e.innerType())}function Gmt(e){const n=(e instanceof uo?e.innerType():e).shape,r={};for(const[s,i]of Object.entries(n)){const o=w4(i);o!==void 0&&(r[s]=o)}return r}var LZ=Symbol("GetFieldConfig");function K3(e){const t=e;if(t._def.typeName==="ZodEffects"){const r=t._def.effect.refinement;if(LZ in r)return r[LZ]}if("innerType"in t._def)return K3(t._def.innerType);if("schema"in t._def)return K3(t._def.schema)}function Mj(e,t){const n=jj(t),r=K3(t),s=qmt(n,r),i=w4(t),o=n._def.values;let a=[];o&&(Array.isArray(o)?a=o.map(c=>[c,c]):a=Object.entries(o));let l=[];return n instanceof ir&&(l=Object.entries(n.shape).map(([c,u])=>Mj(c,u))),n instanceof io&&(l=[Mj("0",n._def.type)]),{key:e,type:s,required:!t.isOptional(),default:i,description:n.description,fieldConfig:r,options:a,schema:l}}function jj(e){return"innerType"in e._def?jj(e._def.innerType):"schema"in e._def?jj(e._def.schema):e}function Ymt(e){const n=(e instanceof uo?e.innerType():e).shape;return{fields:Object.entries(n).map(([s,i])=>Mj(s,i))}}var Kmt=class{constructor(e){if(this.schema=e,!e)throw new Error("ZodProvider: schema is required")}parseSchema(){return Ymt(this.schema)}validateSchema(e){try{return{success:!0,data:this.schema.parse(e)}}catch(t){if(t instanceof zo)return{success:!1,errors:t.errors.map(n=>({path:n.path,message:n.message}))};throw t}}getDefaultValues(){return Gmt(this.schema)}},o7,BZ;function Xmt(){if(BZ)return o7;BZ=1;function e(E){this._maxSize=E,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(E){return this._values[E]},e.prototype.set=function(E,k){return this._size>=this._maxSize&&this.clear(),E in this._values||this._size++,this._values[E]=k};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,n=/^\d+$/,r=/^\d/,s=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,i=/^\s*(['"]?)(.*?)(\1)\s*$/,o=512,a=new e(o),l=new e(o),c=new e(o);o7={Cache:e,split:d,normalizePath:u,setter:function(E){var k=u(E);return l.get(E)||l.set(E,function(P,M){for(var j=0,F=k.length,I=P;j<F-1;){var B=k[j];if(B==="__proto__"||B==="constructor"||B==="prototype")return P;I=I[k[j++]]}I[k[j]]=M})},getter:function(E,k){var T=u(E);return c.get(E)||c.set(E,function(M){for(var j=0,F=T.length;j<F;)if(M!=null||!k)M=M[T[j++]];else return;return M})},join:function(E){return E.reduce(function(k,T){return k+(g(T)||n.test(T)?"["+T+"]":(k?".":"")+T)},"")},forEach:function(E,k,T){p(Array.isArray(E)?E:d(E),k,T)}};function u(E){return a.get(E)||a.set(E,d(E).map(function(k){return k.replace(i,"$2")}))}function d(E){return E.match(t)||[""]}function p(E,k,T){var P=E.length,M,j,F,I;for(j=0;j<P;j++)M=E[j],M&&(S(M)&&(M='"'+M+'"'),I=g(M),F=!I&&/^\d+$/.test(M),k.call(T,M,I,F,j,E))}function g(E){return typeof E=="string"&&E&&["'",'"'].indexOf(E.charAt(0))!==-1}function b(E){return E.match(r)&&!E.match(n)}function x(E){return s.test(E)}function S(E){return!g(E)&&(b(E)||x(E))}return o7}var zge=Xmt(),dE={exports:{}},$Z;function Jmt(){if($Z)return dE.exports;$Z=1,dE.exports=function(s){return e(t(s),s)},dE.exports.array=e;function e(s,i){var o=s.length,a=new Array(o),l={},c=o,u=n(i),d=r(s);for(i.forEach(function(g){if(!d.has(g[0])||!d.has(g[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});c--;)l[c]||p(s[c],c,new Set);return a;function p(g,b,x){if(x.has(g)){var S;try{S=", node was:"+JSON.stringify(g)}catch{S=""}throw new Error("Cyclic dependency"+S)}if(!d.has(g))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(g));if(!l[b]){l[b]=!0;var E=u.get(g)||new Set;if(E=Array.from(E),b=E.length){x.add(g);do{var k=E[--b];p(k,d.get(k),x)}while(b);x.delete(g)}a[--o]=g}}}function t(s){for(var i=new Set,o=0,a=s.length;o<a;o++){var l=s[o];i.add(l[0]),i.add(l[1])}return Array.from(i)}function n(s){for(var i=new Map,o=0,a=s.length;o<a;o++){var l=s[o];i.has(l[0])||i.set(l[0],new Set),i.has(l[1])||i.set(l[1],new Set),i.get(l[0]).add(l[1])}return i}function r(s){for(var i=new Map,o=0,a=s.length;o<a;o++)i.set(s[o],o);return i}return dE.exports}Jmt();const Zmt=Object.prototype.toString,Qmt=Error.prototype.toString,egt=RegExp.prototype.toString,tgt=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",ngt=/^Symbol\((.*)\)(.*)$/;function rgt(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function zZ(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return rgt(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return tgt.call(e).replace(ngt,"Symbol($1)");const r=Zmt.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+Qmt.call(e)+"]":r==="RegExp"?egt.call(e):null}function rp(e,t){let n=zZ(e,t);return n!==null?n:JSON.stringify(e,function(r,s){let i=zZ(this[r],t);return i!==null?i:s},2)}function Hge(e){return e==null?[]:[].concat(e)}let Vge,Uge,Wge,sgt=/\$\{\s*(\w+)\s*\}/g;Vge=Symbol.toStringTag;class HZ{constructor(t,n,r,s){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[Vge]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=s,this.errors=[],this.inner=[],Hge(t).forEach(i=>{if(_o.isError(i)){this.errors.push(...i.errors);const o=i.inner.length?i.inner:[i];this.inner.push(...o)}else this.errors.push(i)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}Uge=Symbol.hasInstance;Wge=Symbol.toStringTag;class _o extends Error{static formatError(t,n){const r=n.label||n.path||"this";return n=Object.assign({},n,{path:r,originalPath:n.path}),typeof t=="string"?t.replace(sgt,(s,i)=>rp(n[i])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,r,s,i){const o=new HZ(t,n,r,s);if(i)return o;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Wge]="Error",this.name=o.name,this.message=o.message,this.type=o.type,this.value=o.value,this.path=o.path,this.errors=o.errors,this.inner=o.inner,Error.captureStackTrace&&Error.captureStackTrace(this,_o)}static[Uge](t){return HZ[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Nd={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const s=r!=null&&r!==n?` (cast from the value \`${rp(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${rp(n,!0)}\``+s:`${e} must match the configured type. The validated value was: \`${rp(n,!0)}\``+s}},igt={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},ogt={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},Fj={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},agt={isValue:"${path} field must be ${value}"},lgt={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},cgt={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},ugt={notType:e=>{const{path:t,value:n,spec:r}=e,s=r.types.length;if(Array.isArray(n)){if(n.length<s)return`${t} tuple value has too few items, expected a length of ${s} but got ${n.length} for value: \`${rp(n,!0)}\``;if(n.length>s)return`${t} tuple value has too many items, expected a length of ${s} but got ${n.length} for value: \`${rp(n,!0)}\``}return _o.formatError(Nd.notType,e)}};Object.assign(Object.create(null),{mixed:Nd,string:igt,number:ogt,date:Fj,object:lgt,array:cgt,boolean:agt,tuple:ugt});const qge=e=>e&&e.__isYupSchema__;class X3{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:s,otherwise:i}=n,o=typeof r=="function"?r:(...a)=>a.every(l=>l===r);return new X3(t,(a,l)=>{var c;let u=o(...a)?s:i;return(c=u==null?void 0:u(l))!=null?c:l})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let r=this.refs.map(i=>i.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),s=this.fn(r,t,n);if(s===void 0||s===t)return t;if(!qge(s))throw new TypeError("conditions must return a schema object");return s.resolve(n)}}const hE={context:"$",value:"."};class NC{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===hE.context,this.isValue=this.key[0]===hE.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?hE.context:this.isValue?hE.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&zge.getter(this.path,!0),this.map=n.map}getValue(t,n,r){let s=this.isContext?r:this.isValue?t:n;return this.getter&&(s=this.getter(s||{})),this.map&&(s=this.map(s)),s}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}NC.prototype.__isYupRef=!0;const Gge=e=>e==null;function u0(e){function t({value:n,path:r="",options:s,originalValue:i,schema:o},a,l){const{name:c,test:u,params:d,message:p,skipAbsent:g}=e;let{parent:b,context:x,abortEarly:S=o.spec.abortEarly,disableStackTrace:E=o.spec.disableStackTrace}=s;function k(W){return NC.isRef(W)?W.getValue(n,b,x):W}function T(W={}){const $=Object.assign({value:n,originalValue:i,label:o.spec.label,path:W.path||r,spec:o.spec,disableStackTrace:W.disableStackTrace||E},d,W.params);for(const V of Object.keys($))$[V]=k($[V]);const J=new _o(_o.formatError(W.message||p,$),n,$.path,W.type||c,$.disableStackTrace);return J.params=$,J}const P=S?a:l;let M={path:r,parent:b,type:c,from:s.from,createError:T,resolve:k,options:s,originalValue:i,schema:o};const j=W=>{_o.isError(W)?P(W):W?l(null):P(T())},F=W=>{_o.isError(W)?P(W):a(W)};if(g&&Gge(n))return j(!0);let B;try{var L;if(B=u.call(M,n,M),typeof((L=B)==null?void 0:L.then)=="function"){if(s.sync)throw new Error(`Validation test of type: "${M.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(B).then(j,F)}}catch(W){F(W);return}j(B)}return t.OPTIONS=e,t}function dgt(e,t,n,r=n){let s,i,o;return t?(zge.forEach(t,(a,l,c)=>{let u=l?a.slice(1,a.length-1):a;e=e.resolve({context:r,parent:s,value:n});let d=e.type==="tuple",p=c?parseInt(u,10):0;if(e.innerType||d){if(d&&!c)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(n&&p>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${t}. because there is no value at that index. `);s=n,n=n&&n[p],e=d?e.spec.types[p]:e.innerType}if(!c){if(!e.fields||!e.fields[u])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);s=n,n=n&&n[u],e=e.fields[u]}i=u,o=l?"["+a+"]":"."+a}),{schema:e,parent:s,parentPath:i}):{parent:s,parentPath:t,schema:e}}class J3 extends Set{describe(){const t=[];for(const n of this.values())t.push(NC.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const r of this.values())n.push(t(r));return n}clone(){return new J3(this.values())}merge(t,n){const r=this.clone();return t.forEach(s=>r.add(s)),n.forEach(s=>r.delete(s)),r}}function L0(e,t=new Map){if(qge(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=L0(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,s]of e.entries())n.set(r,L0(s,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(L0(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,s]of Object.entries(e))n[r]=L0(s,t)}else throw Error(`Unable to clone ${e}`);return n}class Ig{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new J3,this._blacklist=new J3,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Nd.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=L0(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let r=t(this);return this._mutate=n,r}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,r=t.clone();const s=Object.assign({},n.spec,r.spec);return r.spec=s,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(i=>{t.tests.forEach(o=>{i.test(o.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((s,i)=>i.resolve(s,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,r,s,i;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(r=t.abortEarly)!=null?r:this.spec.abortEarly,recursive:(s=t.recursive)!=null?s:this.spec.recursive,disableStackTrace:(i=t.disableStackTrace)!=null?i:this.spec.disableStackTrace})}cast(t,n={}){let r=this.resolve(Object.assign({value:t},n)),s=n.assert==="ignore-optionality",i=r._cast(t,n);if(n.assert!==!1&&!r.isType(i)){if(s&&Gge(i))return i;let o=rp(t),a=rp(i);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
|
|
716
716
|
|
|
717
717
|
attempted value: ${o}
|
|
718
|
-
`+(a!==o?`result of cast: ${a}`:""))}return i}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((s,i)=>i.call(this,s,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,s){let{path:i,originalValue:o=t,strict:a=this.spec.strict}=n,l=t;a||(l=this._cast(l,Object.assign({assert:!1},n)));let c=[];for(let u of Object.values(this.internalTests))u&&c.push(u);this.runTests({path:i,value:l,originalValue:o,options:n,tests:c},r,u=>{if(u.length)return s(u,l);this.runTests({path:i,value:l,originalValue:o,options:n,tests:this.tests},r,s)})}runTests(t,n,r){let s=!1,{tests:i,value:o,originalValue:a,path:l,options:c}=t,u=x=>{s||(s=!0,n(x,o))},d=x=>{s||(s=!0,r(x,o))},p=i.length,g=[];if(!p)return d([]);let b={value:o,originalValue:a,path:l,options:c,schema:this};for(let x=0;x<i.length;x++){const S=i[x];S(b,u,function(k){k&&(Array.isArray(k)?g.push(...k):g.push(k)),--p<=0&&d(g)})}}asNestedTest({key:t,index:n,parent:r,parentPath:s,originalParent:i,options:o}){const a=t??n;if(a==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof a=="number";let c=r[a];const u=Object.assign({},o,{strict:!0,parent:r,value:c,originalValue:i[a],key:void 0,[l?"index":"key"]:a,path:l||a.includes(".")?`${s||""}[${l?a:`"${a}"`}]`:(s?`${s}.`:"")+t});return(d,p,g)=>this.resolve(u)._validate(c,u,p,g)}validate(t,n){var r;let s=this.resolve(Object.assign({},n,{value:t})),i=(r=n==null?void 0:n.disableStackTrace)!=null?r:s.spec.disableStackTrace;return new Promise((o,a)=>s._validate(t,n,(l,c)=>{_o.isError(l)&&(l.value=c),a(l)},(l,c)=>{l.length?a(new _o(l,c,void 0,void 0,i)):o(c)}))}validateSync(t,n){var r;let s=this.resolve(Object.assign({},n,{value:t})),i,o=(r=n==null?void 0:n.disableStackTrace)!=null?r:s.spec.disableStackTrace;return s._validate(t,Object.assign({},n,{sync:!0}),(a,l)=>{throw _o.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new _o(a,t,void 0,void 0,o);i=l}),i}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(_o.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(_o.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):L0(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=u0({message:n,name:"nullable",test(s){return s===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=u0({message:n,name:"optionality",test(s){return s===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=Nd.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Nd.notNull){return this.nullability(!1,t)}required(t=Nd.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=Nd.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),s=u0(n),i=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(o=>!(o.OPTIONS.name===n.name&&(i||o.OPTIONS.test===s.OPTIONS.test))),r.tests.push(s),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),s=Hge(t).map(i=>new NC(i));return s.forEach(i=>{i.isSibling&&r.deps.push(i.key)}),r.conditions.push(typeof n=="function"?new X3(s,n):X3.fromOptions(s,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=u0({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=Nd.oneOf){let r=this.clone();return t.forEach(s=>{r._whitelist.add(s),r._blacklist.delete(s)}),r.internalTests.whiteList=u0({message:n,name:"oneOf",skipAbsent:!0,test(s){let i=this.schema._whitelist,o=i.resolveAll(this.resolve);return o.includes(s)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:o}})}}),r}notOneOf(t,n=Nd.notOneOf){let r=this.clone();return t.forEach(s=>{r._blacklist.add(s),r._whitelist.delete(s)}),r.internalTests.blacklist=u0({message:n,name:"notOneOf",test(s){let i=this.schema._blacklist,o=i.resolveAll(this.resolve);return o.includes(s)?this.createError({params:{values:Array.from(i).join(", "),resolved:o}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:s,optional:i,nullable:o}=n.spec;return{meta:s,label:r,optional:i,nullable:o,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,c,u)=>u.findIndex(d=>d.name===l.name)===c)}}}Ig.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Ig.prototype[`${e}At`]=function(t,n,r={}){const{parent:s,parentPath:i,schema:o}=dgt(this,t,n,r.context);return o[e](s&&s[i],Object.assign({},r,{parent:s,path:t}))};for(const e of["equals","is"])Ig.prototype[e]=Ig.prototype.oneOf;for(const e of["not","nope"])Ig.prototype[e]=Ig.prototype.notOneOf;const hgt=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function fgt(e){const t=pgt(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function pgt(e){var t,n;const r=hgt.exec(e);return r?{year:xd(r[1]),month:xd(r[2],1)-1,day:xd(r[3],1),hour:xd(r[4]),minute:xd(r[5]),second:xd(r[6]),millisecond:r[7]?xd(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:xd(r[10]),minuteOffset:xd(r[11])}:null}function xd(e,t=0){return Number(e)||t}let mgt=new Date(""),ggt=e=>Object.prototype.toString.call(e)==="[object Date]";class rB extends Ig{constructor(){super({type:"date",check(t){return ggt(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=fgt(t),isNaN(t)?rB.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(NC.isRef(t))r=t;else{let s=this.cast(t);if(!this._typeCheck(s))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=s}return r}min(t,n=Fj.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(s){return s>=this.resolve(r)}})}max(t,n=Fj.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(s){return s<=this.resolve(r)}})}}rB.INVALID_DATE=mgt;var Yge=A.createContext(null),ygt=Yge.Provider;function sB(){const e=A.useContext(Yge);if(!e)throw new Error("useAutoForm must be used within an AutoFormProvider");return e}var bgt=({field:e,path:t})=>{const{uiComponents:n}=sB();return h.jsx(n.ObjectWrapper,{label:Y3(e),field:e,children:Object.entries(e.schema).map(([r,s])=>h.jsx(iB,{field:s,path:[...t,s.key]},`${t.join(".")}.${s.key}`))})},xgt=({field:e,path:t})=>{var c,u;const{uiComponents:n}=sB(),{control:r}=eB(),{fields:s,append:i,remove:o}=zmt({control:r,name:t.join(".")}),a=(u=(c=e.schema)==null?void 0:c[0])==null?void 0:u.type;let l;return a==="object"?l={}:a==="array"?l=[]:l=null,h.jsx(n.ArrayWrapper,{label:Y3(e),field:e,onAddItem:()=>i(l),children:s.map((d,p)=>h.jsx(n.ArrayElementWrapper,{onRemove:()=>o(p),index:p,children:h.jsx(iB,{field:e.schema[0],path:[...t,p.toString()]})},d.id))})};function vgt(e,t){let n=e;for(const r of t)if(n=n[r],n===void 0)return;return n}var iB=({field:e,path:t})=>{var p,g,b;const{formComponents:n,uiComponents:r}=sB(),{register:s,formState:{errors:i},getValues:o}=eB(),a=t.join("."),l=(p=vgt(i,t))==null?void 0:p.message,c=o(a),u=((g=e.fieldConfig)==null?void 0:g.fieldWrapper)||r.FieldWrapper;let d=()=>h.jsx(r.ErrorMessage,{error:`[AutoForm Configuration Error] No component found for type "${e.type}" nor a fallback`});return e.type==="array"?d=xgt:e.type==="object"?d=bgt:e.type in n?d=n[e.type]:"fallback"in n&&(d=n.fallback),h.jsx(u,{label:Y3(e),error:l,id:a,field:e,children:h.jsx(d,{label:Y3(e),field:e,value:c,error:l,id:a,path:t,inputProps:{required:e.required,error:l,key:`${a}-input`,...(b=e.fieldConfig)==null?void 0:b.inputProps,...s(a)}},a)})};function wgt({schema:e,onSubmit:t=()=>{},defaultValues:n,values:r,children:s,uiComponents:i,formComponents:o,withSubmit:a=!1,onFormInit:l=()=>{},formProps:c={}}){const u=Umt(e),d=Hmt({defaultValues:{...Wmt(e),...n},values:r});A.useEffect(()=>{l&&l(d)},[l,d]);const p=async g=>{var S;const b=Pj(g),x=e.validateSchema(b);if(console.log("validationResult",{validationResult:x,dataRaw:g,data:b}),x.success)await t(x.data,d);else{d.clearErrors();let E=!1;(S=x.errors)==null||S.forEach(k=>{var M,j;const T=k.path.join(".");d.setError(T,{type:"custom",message:k.message},{shouldFocus:!E}),E=!0;const P=(j=(M=k.path)==null?void 0:M.slice)==null?void 0:j.call(M,0,-1);(P==null?void 0:P.length)>0&&d.setError(P.join("."),{type:"custom",message:k.message})})}};return h.jsx(kmt,{...d,children:h.jsx(ygt,{value:{schema:u,uiComponents:i,formComponents:o},children:h.jsxs(i.Form,{onSubmit:d.handleSubmit(p),...c,children:[u.fields.map(g=>h.jsx(iB,{field:g,path:[g.key]},g.key)),a&&h.jsx(i.SubmitButton,{children:"Submit"}),s]})})})}var S4="Checkbox",[Sgt,GDt]=Ri(S4),[Cgt,oB]=Sgt(S4);function kgt(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:s,disabled:i,form:o,name:a,onCheckedChange:l,required:c,value:u="on",internal_do_not_use_render:d}=e,[p,g]=lc({prop:n,defaultProp:s??!1,onChange:l,caller:S4}),[b,x]=A.useState(null),[S,E]=A.useState(null),k=A.useRef(!1),T=b?!!o||!!b.closest("form"):!0,P={checked:p,disabled:i,setChecked:g,control:b,setControl:x,name:a,form:o,value:u,hasConsumerStoppedPropagationRef:k,required:c,defaultChecked:sp(s)?!1:s,isFormControl:T,bubbleInput:S,setBubbleInput:E};return h.jsx(Cgt,{scope:t,...P,children:Egt(d)?d(P):r})}var Kge="CheckboxTrigger",Xge=A.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},s)=>{const{control:i,value:o,disabled:a,checked:l,required:c,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:p,isFormControl:g,bubbleInput:b}=oB(Kge,e),x=Ut(s,u),S=A.useRef(l);return A.useEffect(()=>{const E=i==null?void 0:i.form;if(E){const k=()=>d(S.current);return E.addEventListener("reset",k),()=>E.removeEventListener("reset",k)}},[i,d]),h.jsx(xt.button,{type:"button",role:"checkbox","aria-checked":sp(l)?"mixed":l,"aria-required":c,"data-state":tye(l),"data-disabled":a?"":void 0,disabled:a,value:o,...r,ref:x,onKeyDown:bt(t,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:bt(n,E=>{d(k=>sp(k)?!0:!k),b&&g&&(p.current=E.isPropagationStopped(),p.current||E.stopPropagation())})})});Xge.displayName=Kge;var aB=A.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:s,defaultChecked:i,required:o,disabled:a,value:l,onCheckedChange:c,form:u,...d}=e;return h.jsx(kgt,{__scopeCheckbox:n,checked:s,defaultChecked:i,disabled:a,required:o,onCheckedChange:c,name:r,form:u,value:l,internal_do_not_use_render:({isFormControl:p})=>h.jsxs(h.Fragment,{children:[h.jsx(Xge,{...d,ref:t,__scopeCheckbox:n}),p&&h.jsx(eye,{__scopeCheckbox:n})]})})});aB.displayName=S4;var Jge="CheckboxIndicator",Zge=A.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...s}=e,i=oB(Jge,n);return h.jsx(Li,{present:r||sp(i.checked)||i.checked===!0,children:h.jsx(xt.span,{"data-state":tye(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});Zge.displayName=Jge;var Qge="CheckboxBubbleInput",eye=A.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:s,checked:i,defaultChecked:o,required:a,disabled:l,name:c,value:u,form:d,bubbleInput:p,setBubbleInput:g}=oB(Qge,e),b=Ut(n,g),x=HT(i),S=JA(r);A.useEffect(()=>{const k=p;if(!k)return;const T=window.HTMLInputElement.prototype,M=Object.getOwnPropertyDescriptor(T,"checked").set,j=!s.current;if(x!==i&&M){const F=new Event("click",{bubbles:j});k.indeterminate=sp(i),M.call(k,sp(i)?!1:i),k.dispatchEvent(F)}},[p,x,i,s]);const E=A.useRef(sp(i)?!1:i);return h.jsx(xt.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??E.current,required:a,disabled:l,name:c,value:u,form:d,...t,tabIndex:-1,ref:b,style:{...t.style,...S,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});eye.displayName=Qge;function Egt(e){return typeof e=="function"}function sp(e){return e==="indeterminate"}function tye(e){return sp(e)?"indeterminate":e?"checked":"unchecked"}var qt=function(){return qt=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},qt.apply(this,arguments)};function Dgt(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function nye(e,t,n){for(var r=0,s=t.length,i;r<s;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}function PC(e){return e.mode==="multiple"}function MC(e){return e.mode==="range"}function C4(e){return e.mode==="single"}var Agt={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rdp-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"};function Tgt(e,t){return lo(e,"LLLL y",t)}function _gt(e,t){return lo(e,"d",t)}function Ngt(e,t){return lo(e,"LLLL",t)}function Pgt(e){return"".concat(e)}function Mgt(e,t){return lo(e,"cccccc",t)}function jgt(e,t){return lo(e,"yyyy",t)}var Fgt=Object.freeze({__proto__:null,formatCaption:Tgt,formatDay:_gt,formatMonthCaption:Ngt,formatWeekNumber:Pgt,formatWeekdayName:Mgt,formatYearCaption:jgt}),Igt=function(e,t,n){return lo(e,"do MMMM (EEEE)",n)},Ogt=function(){return"Month: "},Rgt=function(){return"Go to next month"},Lgt=function(){return"Go to previous month"},Bgt=function(e,t){return lo(e,"cccc",t)},$gt=function(e){return"Week n. ".concat(e)},zgt=function(){return"Year: "},Hgt=Object.freeze({__proto__:null,labelDay:Igt,labelMonthDropdown:Ogt,labelNext:Rgt,labelPrevious:Lgt,labelWeekNumber:$gt,labelWeekday:Bgt,labelYearDropdown:zgt});function Vgt(){var e="buttons",t=Agt,n=fL,r={},s={},i=1,o={},a=new Date;return{captionLayout:e,classNames:t,formatters:Fgt,labels:Hgt,locale:n,modifiersClassNames:r,modifiers:s,numberOfMonths:i,styles:o,today:a,mode:"default"}}function Ugt(e){var t=e.fromYear,n=e.toYear,r=e.fromMonth,s=e.toMonth,i=e.fromDate,o=e.toDate;return r?i=Ho(r):t&&(i=new Date(t,0,1)),s?o=OT(s):n&&(o=new Date(n,11,31)),{fromDate:i?Jb(i):void 0,toDate:o?Jb(o):void 0}}var rye=A.createContext(void 0);function Wgt(e){var t,n=e.initialProps,r=Vgt(),s=Ugt(n),i=s.fromDate,o=s.toDate,a=(t=n.captionLayout)!==null&&t!==void 0?t:r.captionLayout;a!=="buttons"&&(!i||!o)&&(a="buttons");var l;(C4(n)||PC(n)||MC(n))&&(l=n.onSelect);var c=qt(qt(qt({},r),n),{captionLayout:a,classNames:qt(qt({},r.classNames),n.classNames),components:qt({},n.components),formatters:qt(qt({},r.formatters),n.formatters),fromDate:i,labels:qt(qt({},r.labels),n.labels),mode:n.mode||r.mode,modifiers:qt(qt({},r.modifiers),n.modifiers),modifiersClassNames:qt(qt({},r.modifiersClassNames),n.modifiersClassNames),onSelect:l,styles:qt(qt({},r.styles),n.styles),toDate:o});return h.jsx(rye.Provider,{value:c,children:e.children})}function vr(){var e=A.useContext(rye);if(!e)throw new Error("useDayPicker must be used within a DayPickerProvider.");return e}function sye(e){var t=vr(),n=t.locale,r=t.classNames,s=t.styles,i=t.formatters.formatCaption;return h.jsx("div",{className:r.caption_label,style:s.caption_label,"aria-live":"polite",role:"presentation",id:e.id,children:i(e.displayMonth,{locale:n})})}function qgt(e){return h.jsx("svg",qt({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e,{children:h.jsx("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"})}))}function iye(e){var t,n,r=e.onChange,s=e.value,i=e.children,o=e.caption,a=e.className,l=e.style,c=vr(),u=(n=(t=c.components)===null||t===void 0?void 0:t.IconDropdown)!==null&&n!==void 0?n:qgt;return h.jsxs("div",{className:a,style:l,children:[h.jsx("span",{className:c.classNames.vhidden,children:e["aria-label"]}),h.jsx("select",{name:e.name,"aria-label":e["aria-label"],className:c.classNames.dropdown,style:c.styles.dropdown,value:s,onChange:r,children:i}),h.jsxs("div",{className:c.classNames.caption_label,style:c.styles.caption_label,"aria-hidden":"true",children:[o,h.jsx(u,{className:c.classNames.dropdown_icon,style:c.styles.dropdown_icon})]})]})}function Ggt(e){var t,n=vr(),r=n.fromDate,s=n.toDate,i=n.styles,o=n.locale,a=n.formatters.formatMonthCaption,l=n.classNames,c=n.components,u=n.labels.labelMonthDropdown;if(!r)return h.jsx(h.Fragment,{});if(!s)return h.jsx(h.Fragment,{});var d=[];if(Lrt(r,s))for(var p=Ho(r),g=r.getMonth();g<=s.getMonth();g++)d.push(R9(p,g));else for(var p=Ho(new Date),g=0;g<=11;g++)d.push(R9(p,g));var b=function(S){var E=Number(S.target.value),k=R9(Ho(e.displayMonth),E);e.onChange(k)},x=(t=c==null?void 0:c.Dropdown)!==null&&t!==void 0?t:iye;return h.jsx(x,{name:"months","aria-label":u(),className:l.dropdown_month,style:i.dropdown_month,onChange:b,value:e.displayMonth.getMonth(),caption:a(e.displayMonth,{locale:o}),children:d.map(function(S){return h.jsx("option",{value:S.getMonth(),children:a(S,{locale:o})},S.getMonth())})})}function Ygt(e){var t,n=e.displayMonth,r=vr(),s=r.fromDate,i=r.toDate,o=r.locale,a=r.styles,l=r.classNames,c=r.components,u=r.formatters.formatYearCaption,d=r.labels.labelYearDropdown,p=[];if(!s)return h.jsx(h.Fragment,{});if(!i)return h.jsx(h.Fragment,{});for(var g=s.getFullYear(),b=i.getFullYear(),x=g;x<=b;x++)p.push(bX(zhe(new Date),x));var S=function(k){var T=bX(Ho(n),Number(k.target.value));e.onChange(T)},E=(t=c==null?void 0:c.Dropdown)!==null&&t!==void 0?t:iye;return h.jsx(E,{name:"years","aria-label":d(),className:l.dropdown_year,style:a.dropdown_year,onChange:S,value:n.getFullYear(),caption:u(n,{locale:o}),children:p.map(function(k){return h.jsx("option",{value:k.getFullYear(),children:u(k,{locale:o})},k.getFullYear())})})}function Kgt(e,t){var n=A.useState(e),r=n[0],s=n[1],i=t===void 0?r:t;return[i,s]}function Xgt(e){var t=e.month,n=e.defaultMonth,r=e.today,s=t||n||r||new Date,i=e.toDate,o=e.fromDate,a=e.numberOfMonths,l=a===void 0?1:a;if(i&&Zb(i,s)<0){var c=-1*(l-1);s=mc(i,c)}return o&&Zb(s,o)<0&&(s=o),Ho(s)}function Jgt(){var e=vr(),t=Xgt(e),n=Kgt(t,e.month),r=n[0],s=n[1],i=function(o){var a;if(!e.disableNavigation){var l=Ho(o);s(l),(a=e.onMonthChange)===null||a===void 0||a.call(e,l)}};return[r,i]}function Zgt(e,t){for(var n=t.reverseMonths,r=t.numberOfMonths,s=Ho(e),i=Ho(mc(s,r)),o=Zb(i,s),a=[],l=0;l<o;l++){var c=mc(s,l);a.push(c)}return n&&(a=a.reverse()),a}function Qgt(e,t){if(!t.disableNavigation){var n=t.toDate,r=t.pagedNavigation,s=t.numberOfMonths,i=s===void 0?1:s,o=r?i:1,a=Ho(e);if(!n)return mc(a,o);var l=Zb(n,e);if(!(l<i))return mc(a,o)}}function eyt(e,t){if(!t.disableNavigation){var n=t.fromDate,r=t.pagedNavigation,s=t.numberOfMonths,i=s===void 0?1:s,o=r?i:1,a=Ho(e);if(!n)return mc(a,-o);var l=Zb(a,n);if(!(l<=0))return mc(a,-o)}}var oye=A.createContext(void 0);function tyt(e){var t=vr(),n=Jgt(),r=n[0],s=n[1],i=Zgt(r,t),o=Qgt(r,t),a=eyt(r,t),l=function(d){return i.some(function(p){return pL(d,p)})},c=function(d,p){l(d)||(p&&Ghe(d,p)?s(mc(d,1+t.numberOfMonths*-1)):s(d))},u={currentMonth:r,displayMonths:i,goToMonth:s,goToDate:c,previousMonth:a,nextMonth:o,isDateDisplayed:l};return h.jsx(oye.Provider,{value:u,children:e.children})}function jC(){var e=A.useContext(oye);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}function VZ(e){var t,n=vr(),r=n.classNames,s=n.styles,i=n.components,o=jC().goToMonth,a=function(u){o(mc(u,e.displayIndex?-e.displayIndex:0))},l=(t=i==null?void 0:i.CaptionLabel)!==null&&t!==void 0?t:sye,c=h.jsx(l,{id:e.id,displayMonth:e.displayMonth});return h.jsxs("div",{className:r.caption_dropdowns,style:s.caption_dropdowns,children:[h.jsx("div",{className:r.vhidden,children:c}),h.jsx(Ggt,{onChange:a,displayMonth:e.displayMonth}),h.jsx(Ygt,{onChange:a,displayMonth:e.displayMonth})]})}function nyt(e){return h.jsx("svg",qt({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:h.jsx("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"})}))}function ryt(e){return h.jsx("svg",qt({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:h.jsx("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"})}))}var Z3=A.forwardRef(function(e,t){var n=vr(),r=n.classNames,s=n.styles,i=[r.button_reset,r.button];e.className&&i.push(e.className);var o=i.join(" "),a=qt(qt({},s.button_reset),s.button);return e.style&&Object.assign(a,e.style),h.jsx("button",qt({},e,{ref:t,type:"button",className:o,style:a}))});function syt(e){var t,n,r=vr(),s=r.dir,i=r.locale,o=r.classNames,a=r.styles,l=r.labels,c=l.labelPrevious,u=l.labelNext,d=r.components;if(!e.nextMonth&&!e.previousMonth)return h.jsx(h.Fragment,{});var p=c(e.previousMonth,{locale:i}),g=[o.nav_button,o.nav_button_previous].join(" "),b=u(e.nextMonth,{locale:i}),x=[o.nav_button,o.nav_button_next].join(" "),S=(t=d==null?void 0:d.IconRight)!==null&&t!==void 0?t:ryt,E=(n=d==null?void 0:d.IconLeft)!==null&&n!==void 0?n:nyt;return h.jsxs("div",{className:o.nav,style:a.nav,children:[!e.hidePrevious&&h.jsx(Z3,{name:"previous-month","aria-label":p,className:g,style:a.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:s==="rtl"?h.jsx(S,{className:o.nav_icon,style:a.nav_icon}):h.jsx(E,{className:o.nav_icon,style:a.nav_icon})}),!e.hideNext&&h.jsx(Z3,{name:"next-month","aria-label":b,className:x,style:a.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:s==="rtl"?h.jsx(E,{className:o.nav_icon,style:a.nav_icon}):h.jsx(S,{className:o.nav_icon,style:a.nav_icon})})]})}function UZ(e){var t=vr().numberOfMonths,n=jC(),r=n.previousMonth,s=n.nextMonth,i=n.goToMonth,o=n.displayMonths,a=o.findIndex(function(b){return pL(e.displayMonth,b)}),l=a===0,c=a===o.length-1,u=t>1&&(l||!c),d=t>1&&(c||!l),p=function(){r&&i(r)},g=function(){s&&i(s)};return h.jsx(syt,{displayMonth:e.displayMonth,hideNext:u,hidePrevious:d,nextMonth:s,previousMonth:r,onPreviousClick:p,onNextClick:g})}function iyt(e){var t,n=vr(),r=n.classNames,s=n.disableNavigation,i=n.styles,o=n.captionLayout,a=n.components,l=(t=a==null?void 0:a.CaptionLabel)!==null&&t!==void 0?t:sye,c;return s?c=h.jsx(l,{id:e.id,displayMonth:e.displayMonth}):o==="dropdown"?c=h.jsx(VZ,{displayMonth:e.displayMonth,id:e.id}):o==="dropdown-buttons"?c=h.jsxs(h.Fragment,{children:[h.jsx(VZ,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),h.jsx(UZ,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):c=h.jsxs(h.Fragment,{children:[h.jsx(l,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),h.jsx(UZ,{displayMonth:e.displayMonth,id:e.id})]}),h.jsx("div",{className:r.caption,style:i.caption,children:c})}function oyt(e){var t=vr(),n=t.footer,r=t.styles,s=t.classNames.tfoot;return n?h.jsx("tfoot",{className:s,style:r.tfoot,children:h.jsx("tr",{children:h.jsx("td",{colSpan:8,children:n})})}):h.jsx(h.Fragment,{})}function ayt(e,t,n){for(var r=n?Ng(new Date):Iu(new Date,{locale:e,weekStartsOn:t}),s=[],i=0;i<7;i++){var o=Ki(r,i);s.push(o)}return s}function lyt(){var e=vr(),t=e.classNames,n=e.styles,r=e.showWeekNumber,s=e.locale,i=e.weekStartsOn,o=e.ISOWeek,a=e.formatters.formatWeekdayName,l=e.labels.labelWeekday,c=ayt(s,i,o);return h.jsxs("tr",{style:n.head_row,className:t.head_row,children:[r&&h.jsx("td",{style:n.head_cell,className:t.head_cell}),c.map(function(u,d){return h.jsx("th",{scope:"col",className:t.head_cell,style:n.head_cell,"aria-label":l(u,{locale:s}),children:a(u,{locale:s})},d)})]})}function cyt(){var e,t=vr(),n=t.classNames,r=t.styles,s=t.components,i=(e=s==null?void 0:s.HeadRow)!==null&&e!==void 0?e:lyt;return h.jsx("thead",{style:r.head,className:n.head,children:h.jsx(i,{})})}function uyt(e){var t=vr(),n=t.locale,r=t.formatters.formatDay;return h.jsx(h.Fragment,{children:r(e.date,{locale:n})})}var lB=A.createContext(void 0);function dyt(e){if(!PC(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return h.jsx(lB.Provider,{value:t,children:e.children})}return h.jsx(hyt,{initialProps:e.initialProps,children:e.children})}function hyt(e){var t=e.initialProps,n=e.children,r=t.selected,s=t.min,i=t.max,o=function(c,u,d){var p,g;(p=t.onDayClick)===null||p===void 0||p.call(t,c,u,d);var b=!!(u.selected&&s&&(r==null?void 0:r.length)===s);if(!b){var x=!!(!u.selected&&i&&(r==null?void 0:r.length)===i);if(!x){var S=r?nye([],r):[];if(u.selected){var E=S.findIndex(function(k){return Io(c,k)});S.splice(E,1)}else S.push(c);(g=t.onSelect)===null||g===void 0||g.call(t,S,c,u,d)}}},a={disabled:[]};r&&a.disabled.push(function(c){var u=i&&r.length>i-1,d=r.some(function(p){return Io(p,c)});return!!(u&&!d)});var l={selected:r,onDayClick:o,modifiers:a};return h.jsx(lB.Provider,{value:l,children:n})}function cB(){var e=A.useContext(lB);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}function fyt(e,t){var n=t||{},r=n.from,s=n.to;return r&&s?Io(s,e)&&Io(r,e)?void 0:Io(s,e)?{from:s,to:void 0}:Io(r,e)?void 0:QM(r,e)?{from:e,to:s}:{from:r,to:e}:s?QM(e,s)?{from:s,to:e}:{from:e,to:s}:r?Ghe(e,r)?{from:e,to:r}:{from:r,to:e}:{from:e,to:void 0}}var uB=A.createContext(void 0);function pyt(e){if(!MC(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return h.jsx(uB.Provider,{value:t,children:e.children})}return h.jsx(myt,{initialProps:e.initialProps,children:e.children})}function myt(e){var t=e.initialProps,n=e.children,r=t.selected,s=r||{},i=s.from,o=s.to,a=t.min,l=t.max,c=function(g,b,x){var S,E;(S=t.onDayClick)===null||S===void 0||S.call(t,g,b,x);var k=fyt(g,r);(E=t.onSelect)===null||E===void 0||E.call(t,k,g,b,x)},u={range_start:[],range_end:[],range_middle:[],disabled:[]};if(i?(u.range_start=[i],o?(u.range_end=[o],Io(i,o)||(u.range_middle=[{after:i,before:o}])):u.range_end=[i]):o&&(u.range_start=[o],u.range_end=[o]),a&&(i&&!o&&u.disabled.push({after:O9(i,a-1),before:Ki(i,a-1)}),i&&o&&u.disabled.push({after:i,before:Ki(i,a-1)}),!i&&o&&u.disabled.push({after:O9(o,a-1),before:Ki(o,a-1)})),l){if(i&&!o&&(u.disabled.push({before:Ki(i,-l+1)}),u.disabled.push({after:Ki(i,l-1)})),i&&o){var d=cu(o,i)+1,p=l-d;u.disabled.push({before:O9(i,p)}),u.disabled.push({after:Ki(o,p)})}!i&&o&&(u.disabled.push({before:Ki(o,-l+1)}),u.disabled.push({after:Ki(o,l-1)}))}return h.jsx(uB.Provider,{value:{selected:r,onDayClick:c,modifiers:u},children:n})}function dB(){var e=A.useContext(uB);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function pD(e){return Array.isArray(e)?nye([],e):e!==void 0?[e]:[]}function gyt(e){var t={};return Object.entries(e).forEach(function(n){var r=n[0],s=n[1];t[r]=pD(s)}),t}var yc;(function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"})(yc||(yc={}));var yyt=yc.Selected,vd=yc.Disabled,byt=yc.Hidden,xyt=yc.Today,a7=yc.RangeEnd,l7=yc.RangeMiddle,c7=yc.RangeStart,vyt=yc.Outside;function wyt(e,t,n){var r,s=(r={},r[yyt]=pD(e.selected),r[vd]=pD(e.disabled),r[byt]=pD(e.hidden),r[xyt]=[e.today],r[a7]=[],r[l7]=[],r[c7]=[],r[vyt]=[],r);return e.fromDate&&s[vd].push({before:e.fromDate}),e.toDate&&s[vd].push({after:e.toDate}),PC(e)?s[vd]=s[vd].concat(t.modifiers[vd]):MC(e)&&(s[vd]=s[vd].concat(n.modifiers[vd]),s[c7]=n.modifiers[c7],s[l7]=n.modifiers[l7],s[a7]=n.modifiers[a7]),s}var aye=A.createContext(void 0);function Syt(e){var t=vr(),n=cB(),r=dB(),s=wyt(t,n,r),i=gyt(t.modifiers),o=qt(qt({},s),i);return h.jsx(aye.Provider,{value:o,children:e.children})}function lye(){var e=A.useContext(aye);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function Cyt(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function kyt(e){return!!(e&&typeof e=="object"&&"from"in e)}function Eyt(e){return!!(e&&typeof e=="object"&&"after"in e)}function Dyt(e){return!!(e&&typeof e=="object"&&"before"in e)}function Ayt(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function Tyt(e,t){var n,r=t.from,s=t.to;if(r&&s){var i=cu(s,r)<0;i&&(n=[s,r],r=n[0],s=n[1]);var o=cu(e,r)>=0&&cu(s,e)>=0;return o}return s?Io(s,e):r?Io(r,e):!1}function _yt(e){return uL(e)}function Nyt(e){return Array.isArray(e)&&e.every(uL)}function Pyt(e,t){return t.some(function(n){if(typeof n=="boolean")return n;if(_yt(n))return Io(e,n);if(Nyt(n))return n.includes(e);if(kyt(n))return Tyt(e,n);if(Ayt(n))return n.dayOfWeek.includes(e.getDay());if(Cyt(n)){var r=cu(n.before,e),s=cu(n.after,e),i=r>0,o=s<0,a=QM(n.before,n.after);return a?o&&i:i||o}return Eyt(n)?cu(e,n.after)>0:Dyt(n)?cu(n.before,e)>0:typeof n=="function"?n(e):!1})}function hB(e,t,n){var r=Object.keys(t).reduce(function(i,o){var a=t[o];return Pyt(e,a)&&i.push(o),i},[]),s={};return r.forEach(function(i){return s[i]=!0}),n&&!pL(e,n)&&(s.outside=!0),s}function Myt(e,t){for(var n=Ho(e[0]),r=OT(e[e.length-1]),s,i,o=n;o<=r;){var a=hB(o,t),l=!a.disabled&&!a.hidden;if(!l){o=Ki(o,1);continue}if(a.selected)return o;a.today&&!i&&(i=o),s||(s=o),o=Ki(o,1)}return i||s}var jyt=365;function cye(e,t){var n=t.moveBy,r=t.direction,s=t.context,i=t.modifiers,o=t.retry,a=o===void 0?{count:0,lastFocused:e}:o,l=s.weekStartsOn,c=s.fromDate,u=s.toDate,d=s.locale,p={day:Ki,week:ZM,month:mc,year:Dnt,startOfWeek:function(S){return s.ISOWeek?Ng(S):Iu(S,{locale:d,weekStartsOn:l})},endOfWeek:function(S){return s.ISOWeek?Hhe(S):hL(S,{locale:d,weekStartsOn:l})}},g=p[n](e,r==="after"?1:-1);r==="before"&&c?g=Ant([c,g]):r==="after"&&u&&(g=Tnt([u,g]));var b=!0;if(i){var x=hB(g,i);b=!x.disabled&&!x.hidden}return b?g:a.count>jyt?a.lastFocused:cye(g,{moveBy:n,direction:r,context:s,modifiers:i,retry:qt(qt({},a),{count:a.count+1})})}var uye=A.createContext(void 0);function Fyt(e){var t=jC(),n=lye(),r=A.useState(),s=r[0],i=r[1],o=A.useState(),a=o[0],l=o[1],c=Myt(t.displayMonths,n),u=s??(a&&t.isDateDisplayed(a))?a:c,d=function(){l(s),i(void 0)},p=function(S){i(S)},g=vr(),b=function(S,E){if(s){var k=cye(s,{moveBy:S,direction:E,context:g,modifiers:n});Io(s,k)||(t.goToDate(k,s),p(k))}},x={focusedDay:s,focusTarget:u,blur:d,focus:p,focusDayAfter:function(){return b("day","after")},focusDayBefore:function(){return b("day","before")},focusWeekAfter:function(){return b("week","after")},focusWeekBefore:function(){return b("week","before")},focusMonthBefore:function(){return b("month","before")},focusMonthAfter:function(){return b("month","after")},focusYearBefore:function(){return b("year","before")},focusYearAfter:function(){return b("year","after")},focusStartOfWeek:function(){return b("startOfWeek","before")},focusEndOfWeek:function(){return b("endOfWeek","after")}};return h.jsx(uye.Provider,{value:x,children:e.children})}function fB(){var e=A.useContext(uye);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}function Iyt(e,t){var n=lye(),r=hB(e,n,t);return r}var pB=A.createContext(void 0);function Oyt(e){if(!C4(e.initialProps)){var t={selected:void 0};return h.jsx(pB.Provider,{value:t,children:e.children})}return h.jsx(Ryt,{initialProps:e.initialProps,children:e.children})}function Ryt(e){var t=e.initialProps,n=e.children,r=function(i,o,a){var l,c,u;if((l=t.onDayClick)===null||l===void 0||l.call(t,i,o,a),o.selected&&!t.required){(c=t.onSelect)===null||c===void 0||c.call(t,void 0,i,o,a);return}(u=t.onSelect)===null||u===void 0||u.call(t,i,i,o,a)},s={selected:t.selected,onDayClick:r};return h.jsx(pB.Provider,{value:s,children:n})}function dye(){var e=A.useContext(pB);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function Lyt(e,t){var n=vr(),r=dye(),s=cB(),i=dB(),o=fB(),a=o.focusDayAfter,l=o.focusDayBefore,c=o.focusWeekAfter,u=o.focusWeekBefore,d=o.blur,p=o.focus,g=o.focusMonthBefore,b=o.focusMonthAfter,x=o.focusYearBefore,S=o.focusYearAfter,E=o.focusStartOfWeek,k=o.focusEndOfWeek,T=function(q){var z,Y,U,X;C4(n)?(z=r.onDayClick)===null||z===void 0||z.call(r,e,t,q):PC(n)?(Y=s.onDayClick)===null||Y===void 0||Y.call(s,e,t,q):MC(n)?(U=i.onDayClick)===null||U===void 0||U.call(i,e,t,q):(X=n.onDayClick)===null||X===void 0||X.call(n,e,t,q)},P=function(q){var z;p(e),(z=n.onDayFocus)===null||z===void 0||z.call(n,e,t,q)},M=function(q){var z;d(),(z=n.onDayBlur)===null||z===void 0||z.call(n,e,t,q)},j=function(q){var z;(z=n.onDayMouseEnter)===null||z===void 0||z.call(n,e,t,q)},F=function(q){var z;(z=n.onDayMouseLeave)===null||z===void 0||z.call(n,e,t,q)},I=function(q){var z;(z=n.onDayPointerEnter)===null||z===void 0||z.call(n,e,t,q)},B=function(q){var z;(z=n.onDayPointerLeave)===null||z===void 0||z.call(n,e,t,q)},L=function(q){var z;(z=n.onDayTouchCancel)===null||z===void 0||z.call(n,e,t,q)},W=function(q){var z;(z=n.onDayTouchEnd)===null||z===void 0||z.call(n,e,t,q)},$=function(q){var z;(z=n.onDayTouchMove)===null||z===void 0||z.call(n,e,t,q)},J=function(q){var z;(z=n.onDayTouchStart)===null||z===void 0||z.call(n,e,t,q)},V=function(q){var z;(z=n.onDayKeyUp)===null||z===void 0||z.call(n,e,t,q)},Z=function(q){var z;switch(q.key){case"ArrowLeft":q.preventDefault(),q.stopPropagation(),n.dir==="rtl"?a():l();break;case"ArrowRight":q.preventDefault(),q.stopPropagation(),n.dir==="rtl"?l():a();break;case"ArrowDown":q.preventDefault(),q.stopPropagation(),c();break;case"ArrowUp":q.preventDefault(),q.stopPropagation(),u();break;case"PageUp":q.preventDefault(),q.stopPropagation(),q.shiftKey?x():g();break;case"PageDown":q.preventDefault(),q.stopPropagation(),q.shiftKey?S():b();break;case"Home":q.preventDefault(),q.stopPropagation(),E();break;case"End":q.preventDefault(),q.stopPropagation(),k();break}(z=n.onDayKeyDown)===null||z===void 0||z.call(n,e,t,q)},G={onClick:T,onFocus:P,onBlur:M,onKeyDown:Z,onKeyUp:V,onMouseEnter:j,onMouseLeave:F,onPointerEnter:I,onPointerLeave:B,onTouchCancel:L,onTouchEnd:W,onTouchMove:$,onTouchStart:J};return G}function Byt(){var e=vr(),t=dye(),n=cB(),r=dB(),s=C4(e)?t.selected:PC(e)?n.selected:MC(e)?r.selected:void 0;return s}function $yt(e){return Object.values(yc).includes(e)}function zyt(e,t){var n=[e.classNames.day];return Object.keys(t).forEach(function(r){var s=e.modifiersClassNames[r];if(s)n.push(s);else if($yt(r)){var i=e.classNames["day_".concat(r)];i&&n.push(i)}}),n}function Hyt(e,t){var n=qt({},e.styles.day);return Object.keys(t).forEach(function(r){var s;n=qt(qt({},n),(s=e.modifiersStyles)===null||s===void 0?void 0:s[r])}),n}function Vyt(e,t,n){var r,s,i,o=vr(),a=fB(),l=Iyt(e,t),c=Lyt(e,l),u=Byt(),d=!!(o.onDayClick||o.mode!=="default");A.useEffect(function(){var j;l.outside||a.focusedDay&&d&&Io(a.focusedDay,e)&&((j=n.current)===null||j===void 0||j.focus())},[a.focusedDay,e,n,d,l.outside]);var p=zyt(o,l).join(" "),g=Hyt(o,l),b=!!(l.outside&&!o.showOutsideDays||l.hidden),x=(i=(s=o.components)===null||s===void 0?void 0:s.DayContent)!==null&&i!==void 0?i:uyt,S=h.jsx(x,{date:e,displayMonth:t,activeModifiers:l}),E={style:g,className:p,children:S,role:"gridcell"},k=a.focusTarget&&Io(a.focusTarget,e)&&!l.outside,T=a.focusedDay&&Io(a.focusedDay,e),P=qt(qt(qt({},E),(r={disabled:l.disabled,role:"gridcell"},r["aria-selected"]=l.selected,r.tabIndex=T||k?0:-1,r)),c),M={isButton:d,isHidden:b,activeModifiers:l,selectedDays:u,buttonProps:P,divProps:E};return M}function Uyt(e){var t=A.useRef(null),n=Vyt(e.date,e.displayMonth,t);return n.isHidden?h.jsx("div",{role:"gridcell"}):n.isButton?h.jsx(Z3,qt({name:"day",ref:t},n.buttonProps)):h.jsx("div",qt({},n.divProps))}function Wyt(e){var t=e.number,n=e.dates,r=vr(),s=r.onWeekNumberClick,i=r.styles,o=r.classNames,a=r.locale,l=r.labels.labelWeekNumber,c=r.formatters.formatWeekNumber,u=c(Number(t),{locale:a});if(!s)return h.jsx("span",{className:o.weeknumber,style:i.weeknumber,children:u});var d=l(Number(t),{locale:a}),p=function(g){s(t,n,g)};return h.jsx(Z3,{name:"week-number","aria-label":d,className:o.weeknumber,style:i.weeknumber,onClick:p,children:u})}function qyt(e){var t,n,r=vr(),s=r.styles,i=r.classNames,o=r.showWeekNumber,a=r.components,l=(t=a==null?void 0:a.Day)!==null&&t!==void 0?t:Uyt,c=(n=a==null?void 0:a.WeekNumber)!==null&&n!==void 0?n:Wyt,u;return o&&(u=h.jsx("td",{className:i.cell,style:s.cell,children:h.jsx(c,{number:e.weekNumber,dates:e.dates})})),h.jsxs("tr",{className:i.row,style:s.row,children:[u,e.dates.map(function(d){return h.jsx("td",{className:i.cell,style:s.cell,role:"presentation",children:h.jsx(l,{displayMonth:e.displayMonth,date:d})},Irt(d))})]})}function WZ(e,t,n){for(var r=n!=null&&n.ISOWeek?Hhe(t):hL(t,n),s=n!=null&&n.ISOWeek?Ng(e):Iu(e,n),i=cu(r,s),o=[],a=0;a<=i;a++)o.push(Ki(s,a));var l=o.reduce(function(c,u){var d=n!=null&&n.ISOWeek?Vhe(u):Whe(u,n),p=c.find(function(g){return g.weekNumber===d});return p?(p.dates.push(u),c):(c.push({weekNumber:d,dates:[u]}),c)},[]);return l}function Gyt(e,t){var n=WZ(Ho(e),OT(e),t);if(t!=null&&t.useFixedWeeks){var r=Rrt(e,t);if(r<6){var s=n[n.length-1],i=s.dates[s.dates.length-1],o=ZM(i,6-r),a=WZ(ZM(i,1),o,t);n.push.apply(n,a)}}return n}function Yyt(e){var t,n,r,s=vr(),i=s.locale,o=s.classNames,a=s.styles,l=s.hideHead,c=s.fixedWeeks,u=s.components,d=s.weekStartsOn,p=s.firstWeekContainsDate,g=s.ISOWeek,b=Gyt(e.displayMonth,{useFixedWeeks:!!c,ISOWeek:g,locale:i,weekStartsOn:d,firstWeekContainsDate:p}),x=(t=u==null?void 0:u.Head)!==null&&t!==void 0?t:cyt,S=(n=u==null?void 0:u.Row)!==null&&n!==void 0?n:qyt,E=(r=u==null?void 0:u.Footer)!==null&&r!==void 0?r:oyt;return h.jsxs("table",{id:e.id,className:o.table,style:a.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!l&&h.jsx(x,{}),h.jsx("tbody",{className:o.tbody,style:a.tbody,children:b.map(function(k){return h.jsx(S,{displayMonth:e.displayMonth,dates:k.dates,weekNumber:k.weekNumber},k.weekNumber)})}),h.jsx(E,{displayMonth:e.displayMonth})]})}function Kyt(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var Xyt=Kyt()?A.useLayoutEffect:A.useEffect,u7=!1,Jyt=0;function qZ(){return"react-day-picker-".concat(++Jyt)}function Zyt(e){var t,n=e??(u7?qZ():null),r=A.useState(n),s=r[0],i=r[1];return Xyt(function(){s===null&&i(qZ())},[]),A.useEffect(function(){u7===!1&&(u7=!0)},[]),(t=e??s)!==null&&t!==void 0?t:void 0}function Qyt(e){var t,n,r=vr(),s=r.dir,i=r.classNames,o=r.styles,a=r.components,l=jC().displayMonths,c=Zyt(r.id?"".concat(r.id,"-").concat(e.displayIndex):void 0),u=r.id?"".concat(r.id,"-grid-").concat(e.displayIndex):void 0,d=[i.month],p=o.month,g=e.displayIndex===0,b=e.displayIndex===l.length-1,x=!g&&!b;s==="rtl"&&(t=[g,b],b=t[0],g=t[1]),g&&(d.push(i.caption_start),p=qt(qt({},p),o.caption_start)),b&&(d.push(i.caption_end),p=qt(qt({},p),o.caption_end)),x&&(d.push(i.caption_between),p=qt(qt({},p),o.caption_between));var S=(n=a==null?void 0:a.Caption)!==null&&n!==void 0?n:iyt;return h.jsxs("div",{className:d.join(" "),style:p,children:[h.jsx(S,{id:c,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),h.jsx(Yyt,{id:u,"aria-labelledby":c,displayMonth:e.displayMonth})]},e.displayIndex)}function e0t(e){var t=vr(),n=t.classNames,r=t.styles;return h.jsx("div",{className:n.months,style:r.months,children:e.children})}function t0t(e){var t,n,r=e.initialProps,s=vr(),i=fB(),o=jC(),a=A.useState(!1),l=a[0],c=a[1];A.useEffect(function(){s.initialFocus&&i.focusTarget&&(l||(i.focus(i.focusTarget),c(!0)))},[s.initialFocus,l,i.focus,i.focusTarget,i]);var u=[s.classNames.root,s.className];s.numberOfMonths>1&&u.push(s.classNames.multiple_months),s.showWeekNumber&&u.push(s.classNames.with_weeknumber);var d=qt(qt({},s.styles.root),s.style),p=Object.keys(r).filter(function(b){return b.startsWith("data-")}).reduce(function(b,x){var S;return qt(qt({},b),(S={},S[x]=r[x],S))},{}),g=(n=(t=r.components)===null||t===void 0?void 0:t.Months)!==null&&n!==void 0?n:e0t;return h.jsx("div",qt({className:u.join(" "),style:d,dir:s.dir,id:s.id,nonce:r.nonce,title:r.title,lang:r.lang},p,{children:h.jsx(g,{children:o.displayMonths.map(function(b,x){return h.jsx(Qyt,{displayIndex:x,displayMonth:b},x)})})}))}function n0t(e){var t=e.children,n=Dgt(e,["children"]);return h.jsx(Wgt,{initialProps:n,children:h.jsx(tyt,{children:h.jsx(Oyt,{initialProps:n,children:h.jsx(dyt,{initialProps:n,children:h.jsx(pyt,{initialProps:n,children:h.jsx(Syt,{children:h.jsx(Fyt,{children:t})})})})})})})}function r0t(e){return h.jsx(n0t,qt({},e,{children:h.jsx(t0t,{initialProps:e})}))}var s0t=[" ","Enter","ArrowUp","ArrowDown"],i0t=[" ","Enter"],Og="Select",[k4,E4,o0t]=mL(Og),[H1,YDt]=Ri(Og,[o0t,N1]),D4=N1(),[a0t,$p]=H1(Og),[l0t,c0t]=H1(Og),hye=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:s,onOpenChange:i,value:o,defaultValue:a,onValueChange:l,dir:c,name:u,autoComplete:d,disabled:p,required:g,form:b}=e,x=D4(t),[S,E]=A.useState(null),[k,T]=A.useState(null),[P,M]=A.useState(!1),j=$1(c),[F,I]=lc({prop:r,defaultProp:s??!1,onChange:i,caller:Og}),[B,L]=lc({prop:o,defaultProp:a,onChange:l,caller:Og}),W=A.useRef(null),$=S?b||!!S.closest("form"):!0,[J,V]=A.useState(new Set),Z=Array.from(J).map(G=>G.props.value).join(";");return h.jsx(vO,{...x,children:h.jsxs(a0t,{required:g,scope:t,trigger:S,onTriggerChange:E,valueNode:k,onValueNodeChange:T,valueNodeHasChildren:P,onValueNodeHasChildrenChange:M,contentId:tc(),value:B,onValueChange:L,open:F,onOpenChange:I,dir:j,triggerPointerDownPosRef:W,disabled:p,children:[h.jsx(k4.Provider,{scope:t,children:h.jsx(l0t,{scope:e.__scopeSelect,onNativeOptionAdd:A.useCallback(G=>{V(q=>new Set(q).add(G))},[]),onNativeOptionRemove:A.useCallback(G=>{V(q=>{const z=new Set(q);return z.delete(G),z})},[]),children:n})}),$?h.jsxs(Mye,{"aria-hidden":!0,required:g,tabIndex:-1,name:u,autoComplete:d,value:B,onChange:G=>L(G.target.value),disabled:p,form:b,children:[B===void 0?h.jsx("option",{value:""}):null,Array.from(J)]},Z):null]})})};hye.displayName=Og;var fye="SelectTrigger",pye=A.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...s}=e,i=D4(n),o=$p(fye,n),a=o.disabled||r,l=Ut(t,o.onTriggerChange),c=E4(n),u=A.useRef("touch"),[d,p,g]=Fye(x=>{const S=c().filter(T=>!T.disabled),E=S.find(T=>T.value===o.value),k=Iye(S,x,E);k!==void 0&&o.onValueChange(k.value)}),b=x=>{a||(o.onOpenChange(!0),g()),x&&(o.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)})};return h.jsx(ZA,{asChild:!0,...i,children:h.jsx(xt.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":jye(o.value)?"":void 0,...s,ref:l,onClick:bt(s.onClick,x=>{x.currentTarget.focus(),u.current!=="mouse"&&b(x)}),onPointerDown:bt(s.onPointerDown,x=>{u.current=x.pointerType;const S=x.target;S.hasPointerCapture(x.pointerId)&&S.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&x.pointerType==="mouse"&&(b(x),x.preventDefault())}),onKeyDown:bt(s.onKeyDown,x=>{const S=d.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&p(x.key),!(S&&x.key===" ")&&s0t.includes(x.key)&&(b(),x.preventDefault())})})})});pye.displayName=fye;var mye="SelectValue",gye=A.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,children:i,placeholder:o="",...a}=e,l=$p(mye,n),{onValueNodeHasChildrenChange:c}=l,u=i!==void 0,d=Ut(t,l.onValueNodeChange);return ds(()=>{c(u)},[c,u]),h.jsx(xt.span,{...a,ref:d,style:{pointerEvents:"none"},children:jye(l.value)?h.jsx(h.Fragment,{children:o}):i})});gye.displayName=mye;var u0t="SelectIcon",yye=A.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...s}=e;return h.jsx(xt.span,{"aria-hidden":!0,...s,ref:t,children:r||"▼"})});yye.displayName=u0t;var d0t="SelectPortal",bye=e=>h.jsx(KS,{asChild:!0,...e});bye.displayName=d0t;var Rg="SelectContent",xye=A.forwardRef((e,t)=>{const n=$p(Rg,e.__scopeSelect),[r,s]=A.useState();if(ds(()=>{s(new DocumentFragment)},[]),!n.open){const i=r;return i?HS.createPortal(h.jsx(vye,{scope:e.__scopeSelect,children:h.jsx(k4.Slot,{scope:e.__scopeSelect,children:h.jsx("div",{children:e.children})})}),i):null}return h.jsx(wye,{...e,ref:t})});xye.displayName=Rg;var Bl=10,[vye,zp]=H1(Rg),h0t="SelectContentImpl",f0t=hg("SelectContent.RemoveScroll"),wye=A.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:p,collisionPadding:g,sticky:b,hideWhenDetached:x,avoidCollisions:S,...E}=e,k=$p(Rg,n),[T,P]=A.useState(null),[M,j]=A.useState(null),F=Ut(t,ae=>P(ae)),[I,B]=A.useState(null),[L,W]=A.useState(null),$=E4(n),[J,V]=A.useState(!1),Z=A.useRef(!1);A.useEffect(()=>{if(T)return aO(T)},[T]),iO();const G=A.useCallback(ae=>{const[le,...pe]=$().map(Ee=>Ee.ref.current),[ye]=pe.slice(-1),Te=document.activeElement;for(const Ee of ae)if(Ee===Te||(Ee==null||Ee.scrollIntoView({block:"nearest"}),Ee===le&&M&&(M.scrollTop=0),Ee===ye&&M&&(M.scrollTop=M.scrollHeight),Ee==null||Ee.focus(),document.activeElement!==Te))return},[$,M]),q=A.useCallback(()=>G([I,T]),[G,I,T]);A.useEffect(()=>{J&&q()},[J,q]);const{onOpenChange:z,triggerPointerDownPosRef:Y}=k;A.useEffect(()=>{if(T){let ae={x:0,y:0};const le=ye=>{var Te,Ee;ae={x:Math.abs(Math.round(ye.pageX)-(((Te=Y.current)==null?void 0:Te.x)??0)),y:Math.abs(Math.round(ye.pageY)-(((Ee=Y.current)==null?void 0:Ee.y)??0))}},pe=ye=>{ae.x<=10&&ae.y<=10?ye.preventDefault():T.contains(ye.target)||z(!1),document.removeEventListener("pointermove",le),Y.current=null};return Y.current!==null&&(document.addEventListener("pointermove",le),document.addEventListener("pointerup",pe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",le),document.removeEventListener("pointerup",pe,{capture:!0})}}},[T,z,Y]),A.useEffect(()=>{const ae=()=>z(!1);return window.addEventListener("blur",ae),window.addEventListener("resize",ae),()=>{window.removeEventListener("blur",ae),window.removeEventListener("resize",ae)}},[z]);const[U,X]=Fye(ae=>{const le=$().filter(Te=>!Te.disabled),pe=le.find(Te=>Te.ref.current===document.activeElement),ye=Iye(le,ae,pe);ye&&setTimeout(()=>ye.ref.current.focus())}),ne=A.useCallback((ae,le,pe)=>{const ye=!Z.current&&!pe;(k.value!==void 0&&k.value===le||ye)&&(B(ae),ye&&(Z.current=!0))},[k.value]),H=A.useCallback(()=>T==null?void 0:T.focus(),[T]),ee=A.useCallback((ae,le,pe)=>{const ye=!Z.current&&!pe;(k.value!==void 0&&k.value===le||ye)&&W(ae)},[k.value]),ie=r==="popper"?Ij:Sye,se=ie===Ij?{side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:p,collisionPadding:g,sticky:b,hideWhenDetached:x,avoidCollisions:S}:{};return h.jsx(vye,{scope:n,content:T,viewport:M,onViewportChange:j,itemRefCallback:ne,selectedItem:I,onItemLeave:H,itemTextRefCallback:ee,focusSelectedItem:q,selectedItemText:L,position:r,isPositioned:J,searchRef:U,children:h.jsx(UA,{as:f0t,allowPinchZoom:!0,children:h.jsx(HA,{asChild:!0,trapped:k.open,onMountAutoFocus:ae=>{ae.preventDefault()},onUnmountAutoFocus:bt(s,ae=>{var le;(le=k.trigger)==null||le.focus({preventScroll:!0}),ae.preventDefault()}),children:h.jsx(YS,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:ae=>ae.preventDefault(),onDismiss:()=>k.onOpenChange(!1),children:h.jsx(ie,{role:"listbox",id:k.contentId,"data-state":k.open?"open":"closed",dir:k.dir,onContextMenu:ae=>ae.preventDefault(),...E,...se,onPlaced:()=>V(!0),ref:F,style:{display:"flex",flexDirection:"column",outline:"none",...E.style},onKeyDown:bt(E.onKeyDown,ae=>{const le=ae.ctrlKey||ae.altKey||ae.metaKey;if(ae.key==="Tab"&&ae.preventDefault(),!le&&ae.key.length===1&&X(ae.key),["ArrowUp","ArrowDown","Home","End"].includes(ae.key)){let ye=$().filter(Te=>!Te.disabled).map(Te=>Te.ref.current);if(["ArrowUp","End"].includes(ae.key)&&(ye=ye.slice().reverse()),["ArrowUp","ArrowDown"].includes(ae.key)){const Te=ae.target,Ee=ye.indexOf(Te);ye=ye.slice(Ee+1)}setTimeout(()=>G(ye)),ae.preventDefault()}})})})})})})});wye.displayName=h0t;var p0t="SelectItemAlignedPosition",Sye=A.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...s}=e,i=$p(Rg,n),o=zp(Rg,n),[a,l]=A.useState(null),[c,u]=A.useState(null),d=Ut(t,F=>u(F)),p=E4(n),g=A.useRef(!1),b=A.useRef(!0),{viewport:x,selectedItem:S,selectedItemText:E,focusSelectedItem:k}=o,T=A.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&c&&x&&S&&E){const F=i.trigger.getBoundingClientRect(),I=c.getBoundingClientRect(),B=i.valueNode.getBoundingClientRect(),L=E.getBoundingClientRect();if(i.dir!=="rtl"){const Te=L.left-I.left,Ee=B.left-Te,_e=F.left-Ee,Fe=F.width+_e,tt=Math.max(Fe,I.width),nt=window.innerWidth-Bl,Dt=dS(Ee,[Bl,Math.max(Bl,nt-tt)]);a.style.minWidth=Fe+"px",a.style.left=Dt+"px"}else{const Te=I.right-L.right,Ee=window.innerWidth-B.right-Te,_e=window.innerWidth-F.right-Ee,Fe=F.width+_e,tt=Math.max(Fe,I.width),nt=window.innerWidth-Bl,Dt=dS(Ee,[Bl,Math.max(Bl,nt-tt)]);a.style.minWidth=Fe+"px",a.style.right=Dt+"px"}const W=p(),$=window.innerHeight-Bl*2,J=x.scrollHeight,V=window.getComputedStyle(c),Z=parseInt(V.borderTopWidth,10),G=parseInt(V.paddingTop,10),q=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),Y=Z+G+J+z+q,U=Math.min(S.offsetHeight*5,Y),X=window.getComputedStyle(x),ne=parseInt(X.paddingTop,10),H=parseInt(X.paddingBottom,10),ee=F.top+F.height/2-Bl,ie=$-ee,se=S.offsetHeight/2,ae=S.offsetTop+se,le=Z+G+ae,pe=Y-le;if(le<=ee){const Te=W.length>0&&S===W[W.length-1].ref.current;a.style.bottom="0px";const Ee=c.clientHeight-x.offsetTop-x.offsetHeight,_e=Math.max(ie,se+(Te?H:0)+Ee+q),Fe=le+_e;a.style.height=Fe+"px"}else{const Te=W.length>0&&S===W[0].ref.current;a.style.top="0px";const _e=Math.max(ee,Z+x.offsetTop+(Te?ne:0)+se)+pe;a.style.height=_e+"px",x.scrollTop=le-ee+x.offsetTop}a.style.margin=`${Bl}px 0`,a.style.minHeight=U+"px",a.style.maxHeight=$+"px",r==null||r(),requestAnimationFrame(()=>g.current=!0)}},[p,i.trigger,i.valueNode,a,c,x,S,E,i.dir,r]);ds(()=>T(),[T]);const[P,M]=A.useState();ds(()=>{c&&M(window.getComputedStyle(c).zIndex)},[c]);const j=A.useCallback(F=>{F&&b.current===!0&&(T(),k==null||k(),b.current=!1)},[T,k]);return h.jsx(g0t,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:g,onScrollButtonChange:j,children:h.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:P},children:h.jsx(xt.div,{...s,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});Sye.displayName=p0t;var m0t="SelectPopperPosition",Ij=A.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=Bl,...i}=e,o=D4(n);return h.jsx(wO,{...o,...i,ref:t,align:r,collisionPadding:s,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Ij.displayName=m0t;var[g0t,mB]=H1(Rg,{}),Oj="SelectViewport",Cye=A.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...s}=e,i=zp(Oj,n),o=mB(Oj,n),a=Ut(t,i.onViewportChange),l=A.useRef(0);return h.jsxs(h.Fragment,{children:[h.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),h.jsx(k4.Slot,{scope:n,children:h.jsx(xt.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:bt(s.onScroll,c=>{const u=c.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:p}=o;if(p!=null&&p.current&&d){const g=Math.abs(l.current-u.scrollTop);if(g>0){const b=window.innerHeight-Bl*2,x=parseFloat(d.style.minHeight),S=parseFloat(d.style.height),E=Math.max(x,S);if(E<b){const k=E+g,T=Math.min(b,k),P=k-T;d.style.height=T+"px",d.style.bottom==="0px"&&(u.scrollTop=P>0?P:0,d.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});Cye.displayName=Oj;var kye="SelectGroup",[y0t,b0t]=H1(kye),x0t=A.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=tc();return h.jsx(y0t,{scope:n,id:s,children:h.jsx(xt.div,{role:"group","aria-labelledby":s,...r,ref:t})})});x0t.displayName=kye;var Eye="SelectLabel",v0t=A.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=b0t(Eye,n);return h.jsx(xt.div,{id:s.id,...r,ref:t})});v0t.displayName=Eye;var Q3="SelectItem",[w0t,Dye]=H1(Q3),Aye=A.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:i,...o}=e,a=$p(Q3,n),l=zp(Q3,n),c=a.value===r,[u,d]=A.useState(i??""),[p,g]=A.useState(!1),b=Ut(t,k=>{var T;return(T=l.itemRefCallback)==null?void 0:T.call(l,k,r,s)}),x=tc(),S=A.useRef("touch"),E=()=>{s||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return h.jsx(w0t,{scope:n,value:r,disabled:s,textId:x,isSelected:c,onItemTextChange:A.useCallback(k=>{d(T=>T||((k==null?void 0:k.textContent)??"").trim())},[]),children:h.jsx(k4.ItemSlot,{scope:n,value:r,disabled:s,textValue:u,children:h.jsx(xt.div,{role:"option","aria-labelledby":x,"data-highlighted":p?"":void 0,"aria-selected":c&&p,"data-state":c?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...o,ref:b,onFocus:bt(o.onFocus,()=>g(!0)),onBlur:bt(o.onBlur,()=>g(!1)),onClick:bt(o.onClick,()=>{S.current!=="mouse"&&E()}),onPointerUp:bt(o.onPointerUp,()=>{S.current==="mouse"&&E()}),onPointerDown:bt(o.onPointerDown,k=>{S.current=k.pointerType}),onPointerMove:bt(o.onPointerMove,k=>{var T;S.current=k.pointerType,s?(T=l.onItemLeave)==null||T.call(l):S.current==="mouse"&&k.currentTarget.focus({preventScroll:!0})}),onPointerLeave:bt(o.onPointerLeave,k=>{var T;k.currentTarget===document.activeElement&&((T=l.onItemLeave)==null||T.call(l))}),onKeyDown:bt(o.onKeyDown,k=>{var P;((P=l.searchRef)==null?void 0:P.current)!==""&&k.key===" "||(i0t.includes(k.key)&&E(),k.key===" "&&k.preventDefault())})})})})});Aye.displayName=Q3;var Bv="SelectItemText",Tye=A.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,...i}=e,o=$p(Bv,n),a=zp(Bv,n),l=Dye(Bv,n),c=c0t(Bv,n),[u,d]=A.useState(null),p=Ut(t,E=>d(E),l.onItemTextChange,E=>{var k;return(k=a.itemTextRefCallback)==null?void 0:k.call(a,E,l.value,l.disabled)}),g=u==null?void 0:u.textContent,b=A.useMemo(()=>h.jsx("option",{value:l.value,disabled:l.disabled,children:g},l.value),[l.disabled,l.value,g]),{onNativeOptionAdd:x,onNativeOptionRemove:S}=c;return ds(()=>(x(b),()=>S(b)),[x,S,b]),h.jsxs(h.Fragment,{children:[h.jsx(xt.span,{id:l.textId,...i,ref:p}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?HS.createPortal(i.children,o.valueNode):null]})});Tye.displayName=Bv;var _ye="SelectItemIndicator",Nye=A.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Dye(_ye,n).isSelected?h.jsx(xt.span,{"aria-hidden":!0,...r,ref:t}):null});Nye.displayName=_ye;var Rj="SelectScrollUpButton",S0t=A.forwardRef((e,t)=>{const n=zp(Rj,e.__scopeSelect),r=mB(Rj,e.__scopeSelect),[s,i]=A.useState(!1),o=Ut(t,r.onScrollButtonChange);return ds(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollTop>0;i(c)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?h.jsx(Pye,{...e,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});S0t.displayName=Rj;var Lj="SelectScrollDownButton",C0t=A.forwardRef((e,t)=>{const n=zp(Lj,e.__scopeSelect),r=mB(Lj,e.__scopeSelect),[s,i]=A.useState(!1),o=Ut(t,r.onScrollButtonChange);return ds(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollHeight-l.clientHeight,u=Math.ceil(l.scrollTop)<c;i(u)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?h.jsx(Pye,{...e,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});C0t.displayName=Lj;var Pye=A.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=e,i=zp("SelectScrollButton",n),o=A.useRef(null),a=E4(n),l=A.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return A.useEffect(()=>()=>l(),[l]),ds(()=>{var u;const c=a().find(d=>d.ref.current===document.activeElement);(u=c==null?void 0:c.ref.current)==null||u.scrollIntoView({block:"nearest"})},[a]),h.jsx(xt.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:bt(s.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:bt(s.onPointerMove,()=>{var c;(c=i.onItemLeave)==null||c.call(i),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:bt(s.onPointerLeave,()=>{l()})})}),k0t="SelectSeparator",E0t=A.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return h.jsx(xt.div,{"aria-hidden":!0,...r,ref:t})});E0t.displayName=k0t;var Bj="SelectArrow",D0t=A.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=D4(n),i=$p(Bj,n),o=zp(Bj,n);return i.open&&o.position==="popper"?h.jsx(SO,{...s,...r,ref:t}):null});D0t.displayName=Bj;var A0t="SelectBubbleInput",Mye=A.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const s=A.useRef(null),i=Ut(r,s),o=HT(t);return A.useEffect(()=>{const a=s.current;if(!a)return;const l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==t&&u){const d=new Event("change",{bubbles:!0});u.call(a,t),a.dispatchEvent(d)}},[o,t]),h.jsx(xt.select,{...n,style:{...Vie,...n.style},ref:i,defaultValue:t})});Mye.displayName=A0t;function jye(e){return e===""||e===void 0}function Fye(e){const t=Zr(e),n=A.useRef(""),r=A.useRef(0),s=A.useCallback(o=>{const a=n.current+o;t(a),function l(c){n.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),i=A.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return A.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,i]}function Iye(e,t,n){const s=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let o=T0t(e,Math.max(i,0));s.length===1&&(o=o.filter(c=>c!==n));const l=o.find(c=>c.textValue.toLowerCase().startsWith(s.toLowerCase()));return l!==n?l:void 0}function T0t(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var _0t=hye,Oye=pye,N0t=gye,P0t=yye,M0t=bye,Rye=xye,j0t=Cye,Lye=Aye,F0t=Tye,I0t=Nye;const O0t=(e,t)=>t.some(n=>{if(typeof n=="number")return e===n;const[r,s]=n.split(":").map(i=>parseInt(i));return r<=e&&e<=s}),R0t=(e,t,n)=>n.some(([r,[s,i]])=>r===e&&s<=t&&t<=i),L0t=(e,t)=>e.split(new RegExp(`(${t.map(([n])=>n).join("|")})`)).filter(Boolean),B0t=e=>e.map(t=>{t=t.startsWith("/")?t:"/"+t;const[,n,r="0:Infinity"]=t.split("/"),[s,i=s]=r.split(":").map(o=>Number(o));return[n,[s,i]]}),Bye=(e,t)=>()=>{const n=A.useContext(e);if(n===void 0)throw new Error(t);return n},A4=e=>Object.assign(A.forwardRef(e),{displayName:e.displayName??e.name}),$ye=A.createContext(void 0),zye=A.createContext(void 0),Hye=Bye($ye,'Could not find nearest <CodeBlock /> component. Please wrap this component with a <CodeBlock /> component imported from "react-code-block".'),gB=Bye(zye,'Could not find nearest <CodeBlock.Code /> component. Please wrap this component with <CodeBlock.Code /> component imported from "react-code-block".'),zd=({code:e,words:t=[],lines:n=[],children:r,...s})=>{const i=A.useMemo(()=>B0t(t),[t]);return h.jsx($ye.Provider,{value:{code:e.trim(),words:i,lines:n,...s},children:r})},$0t=({as:e,children:t,...n},r)=>{const{lines:s,words:i,...o}=Hye(),a=e??"pre";return h.jsx(Cj,{...o,children:l=>h.jsx(a,{...n,ref:r,children:l.tokens.map((c,u)=>{const d=u+1,p=O0t(d,s);return h.jsx(zye.Provider,{value:{highlight:l,line:c,lineNumber:d},children:typeof t=="function"?t({isLineHighlighted:p,lineNumber:d},u):t},u)})})})},z0t=({as:e,children:t,className:n,...r},s)=>{const{highlight:i,line:o}=gB(),{getLineProps:a}=i,l=e??"div";return h.jsx(l,{...a({line:o,className:n}),...r,ref:s,children:t})},H0t=({as:e,children:t=({children:i})=>h.jsx("span",{children:i}),className:n,...r},s)=>{const{words:i}=Hye(),{line:o,highlight:a,lineNumber:l}=gB(),{getTokenProps:c}=a,u=e??"span";return h.jsx(Se.Fragment,{children:o.map((d,p)=>{const{children:g,...b}=c({token:d,className:n}),x=i.length?L0t(g,i):[g];return h.jsx(Se.Fragment,{children:x.map((S,E)=>h.jsx(u,{...b,...r,ref:s,children:t({children:S,isTokenHighlighted:R0t(S,l,i)})},E))},p)})})},V0t=({as:e,...t},n)=>{const{lineNumber:r}=gB(),s=e??"span";return h.jsx(s,{...t,ref:n,children:r})};zd.Code=A4($0t);zd.LineContent=A4(z0t);zd.Token=A4(H0t);zd.LineNumber=A4(V0t);const U0t=(e,t={})=>new LO({baseUrl:e||"",headers:e?t:{...t,"x-mastra-dev-playground":"true"}}),Vye=A.createContext(void 0),W0t=({children:e,baseUrl:t,headers:n})=>{const r=U0t(t,n);return h.jsx(Vye.Provider,{value:{client:r},children:e})},Ku=()=>{const e=A.useContext(Vye);if(e===void 0)throw new Error("useMastraClient must be used within a MastraClientProvider");return e.client};function Uye(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=Uye(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function zn(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=Uye(e))&&(r&&(r+=" "),r+=t);return r}const GZ=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,YZ=zn,V1=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return YZ(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(c=>{const u=n==null?void 0:n[c],d=i==null?void 0:i[c];if(u===null)return null;const p=GZ(u)||GZ(d);return s[c][p]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,p]=u;return p===void 0||(c[d]=p),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:p,...g}=u;return Object.entries(g).every(b=>{let[x,S]=b;return Array.isArray(S)?S.includes({...i,...a}[x]):{...i,...a}[x]===S})?[...c,d,p]:c},[]);return YZ(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},yB="-",q0t=e=>{const t=Y0t(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(yB);return a[0]===""&&a.length!==1&&a.shift(),Wye(a,t)||G0t(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},Wye=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?Wye(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(yB);return(o=t.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},KZ=/^\[(.+)\]$/,G0t=e=>{if(KZ.test(e)){const t=KZ.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Y0t=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const s in n)$j(n[s],r,s,t);return r},$j=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:XZ(t,s);i.classGroupId=n;return}if(typeof s=="function"){if(K0t(s)){$j(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,o])=>{$j(o,XZ(t,i),n,r)})})},XZ=(e,t)=>{let n=e;return t.split(yB).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},K0t=e=>e.isThemeGetter,X0t=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(i,o)=>{n.set(i,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let o=n.get(i);if(o!==void 0)return o;if((o=r.get(i))!==void 0)return s(i,o),o},set(i,o){n.has(i)?n.set(i,o):s(i,o)}}},zj="!",Hj=":",J0t=Hj.length,Z0t=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=s=>{const i=[];let o=0,a=0,l=0,c;for(let b=0;b<s.length;b++){let x=s[b];if(o===0&&a===0){if(x===Hj){i.push(s.slice(l,b)),l=b+J0t;continue}if(x==="/"){c=b;continue}}x==="["?o++:x==="]"?o--:x==="("?a++:x===")"&&a--}const u=i.length===0?s:s.substring(l),d=Q0t(u),p=d!==u,g=c&&c>l?c-l:void 0;return{modifiers:i,hasImportantModifier:p,baseClassName:d,maybePostfixModifierPosition:g}};if(t){const s=t+Hj,i=r;r=o=>o.startsWith(s)?i(o.substring(s.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0}}if(n){const s=r;r=i=>n({className:i,parseClassName:s})}return r},Q0t=e=>e.endsWith(zj)?e.substring(0,e.length-1):e.startsWith(zj)?e.substring(1):e,ebt=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const s=[];let i=[];return r.forEach(o=>{o[0]==="["||t[o]?(s.push(...i.sort(),o),i=[]):i.push(o)}),s.push(...i.sort()),s}},tbt=e=>({cache:X0t(e.cacheSize),parseClassName:Z0t(e),sortModifiers:ebt(e),...q0t(e)}),nbt=/\s+/,rbt=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:i}=t,o=[],a=e.trim().split(nbt);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:d,modifiers:p,hasImportantModifier:g,baseClassName:b,maybePostfixModifierPosition:x}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let S=!!x,E=r(S?b.substring(0,x):b);if(!E){if(!S){l=u+(l.length>0?" "+l:l);continue}if(E=r(b),!E){l=u+(l.length>0?" "+l:l);continue}S=!1}const k=i(p).join(":"),T=g?k+zj:k,P=T+E;if(o.includes(P))continue;o.push(P);const M=s(E,S);for(let j=0;j<M.length;++j){const F=M[j];o.push(T+F)}l=u+(l.length>0?" "+l:l)}return l};function sbt(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=qye(t))&&(r&&(r+=" "),r+=n);return r}const qye=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=qye(e[r]))&&(n&&(n+=" "),n+=t);return n};function ibt(e,...t){let n,r,s,i=o;function o(l){const c=t.reduce((u,d)=>d(u),e());return n=tbt(c),r=n.cache.get,s=n.cache.set,i=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=rbt(l,n);return s(l,u),u}return function(){return i(sbt.apply(null,arguments))}}const _s=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Gye=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Yye=/^\((?:(\w[\w-]*):)?(.+)\)$/i,obt=/^\d+\/\d+$/,abt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lbt=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,cbt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ubt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,dbt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,d0=e=>obt.test(e),un=e=>!!e&&!Number.isNaN(Number(e)),Ef=e=>!!e&&Number.isInteger(Number(e)),d7=e=>e.endsWith("%")&&un(e.slice(0,-1)),wd=e=>abt.test(e),hbt=()=>!0,fbt=e=>lbt.test(e)&&!cbt.test(e),Kye=()=>!1,pbt=e=>ubt.test(e),mbt=e=>dbt.test(e),gbt=e=>!_t(e)&&!Nt(e),ybt=e=>U1(e,Zye,Kye),_t=e=>Gye.test(e),wm=e=>U1(e,Qye,fbt),h7=e=>U1(e,Sbt,un),JZ=e=>U1(e,Xye,Kye),bbt=e=>U1(e,Jye,mbt),fE=e=>U1(e,e0e,pbt),Nt=e=>Yye.test(e),Ev=e=>W1(e,Qye),xbt=e=>W1(e,Cbt),ZZ=e=>W1(e,Xye),vbt=e=>W1(e,Zye),wbt=e=>W1(e,Jye),pE=e=>W1(e,e0e,!0),U1=(e,t,n)=>{const r=Gye.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},W1=(e,t,n=!1)=>{const r=Yye.exec(e);return r?r[1]?t(r[1]):n:!1},Xye=e=>e==="position"||e==="percentage",Jye=e=>e==="image"||e==="url",Zye=e=>e==="length"||e==="size"||e==="bg-size",Qye=e=>e==="length",Sbt=e=>e==="number",Cbt=e=>e==="family-name",e0e=e=>e==="shadow",kbt=()=>{const e=_s("color"),t=_s("font"),n=_s("text"),r=_s("font-weight"),s=_s("tracking"),i=_s("leading"),o=_s("breakpoint"),a=_s("container"),l=_s("spacing"),c=_s("radius"),u=_s("shadow"),d=_s("inset-shadow"),p=_s("text-shadow"),g=_s("drop-shadow"),b=_s("blur"),x=_s("perspective"),S=_s("aspect"),E=_s("ease"),k=_s("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],M=()=>[...P(),Nt,_t],j=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto","contain","none"],I=()=>[Nt,_t,l],B=()=>[d0,"full","auto",...I()],L=()=>[Ef,"none","subgrid",Nt,_t],W=()=>["auto",{span:["full",Ef,Nt,_t]},Ef,Nt,_t],$=()=>[Ef,"auto",Nt,_t],J=()=>["auto","min","max","fr",Nt,_t],V=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Z=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...I()],q=()=>[d0,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],z=()=>[e,Nt,_t],Y=()=>[...P(),ZZ,JZ,{position:[Nt,_t]}],U=()=>["no-repeat",{repeat:["","x","y","space","round"]}],X=()=>["auto","cover","contain",vbt,ybt,{size:[Nt,_t]}],ne=()=>[d7,Ev,wm],H=()=>["","none","full",c,Nt,_t],ee=()=>["",un,Ev,wm],ie=()=>["solid","dashed","dotted","double"],se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ae=()=>[un,d7,ZZ,JZ],le=()=>["","none",b,Nt,_t],pe=()=>["none",un,Nt,_t],ye=()=>["none",un,Nt,_t],Te=()=>[un,Nt,_t],Ee=()=>[d0,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[wd],breakpoint:[wd],color:[hbt],container:[wd],"drop-shadow":[wd],ease:["in","out","in-out"],font:[gbt],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[wd],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[wd],shadow:[wd],spacing:["px",un],text:[wd],"text-shadow":[wd],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",d0,_t,Nt,S]}],container:["container"],columns:[{columns:[un,_t,Nt,a]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:M()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:B()}],"inset-x":[{"inset-x":B()}],"inset-y":[{"inset-y":B()}],start:[{start:B()}],end:[{end:B()}],top:[{top:B()}],right:[{right:B()}],bottom:[{bottom:B()}],left:[{left:B()}],visibility:["visible","invisible","collapse"],z:[{z:[Ef,"auto",Nt,_t]}],basis:[{basis:[d0,"full","auto",a,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[un,d0,"auto","initial","none",_t]}],grow:[{grow:["",un,Nt,_t]}],shrink:[{shrink:["",un,Nt,_t]}],order:[{order:[Ef,"first","last","none",Nt,_t]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:W()}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:W()}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":J()}],"auto-rows":[{"auto-rows":J()}],gap:[{gap:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[...V(),"normal"]}],"justify-items":[{"justify-items":[...Z(),"normal"]}],"justify-self":[{"justify-self":["auto",...Z()]}],"align-content":[{content:["normal",...V()]}],"align-items":[{items:[...Z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Z(),{baseline:["","last"]}]}],"place-content":[{"place-content":V()}],"place-items":[{"place-items":[...Z(),"baseline"]}],"place-self":[{"place-self":["auto",...Z()]}],p:[{p:I()}],px:[{px:I()}],py:[{py:I()}],ps:[{ps:I()}],pe:[{pe:I()}],pt:[{pt:I()}],pr:[{pr:I()}],pb:[{pb:I()}],pl:[{pl:I()}],m:[{m:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"space-x":[{"space-x":I()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":I()}],"space-y-reverse":["space-y-reverse"],size:[{size:q()}],w:[{w:[a,"screen",...q()]}],"min-w":[{"min-w":[a,"screen","none",...q()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...q()]}],h:[{h:["screen","lh",...q()]}],"min-h":[{"min-h":["screen","lh","none",...q()]}],"max-h":[{"max-h":["screen","lh",...q()]}],"font-size":[{text:["base",n,Ev,wm]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Nt,h7]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",d7,_t]}],"font-family":[{font:[xbt,_t,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,Nt,_t]}],"line-clamp":[{"line-clamp":[un,"none",Nt,h7]}],leading:[{leading:[i,...I()]}],"list-image":[{"list-image":["none",Nt,_t]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Nt,_t]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:z()}],"text-color":[{text:z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ie(),"wavy"]}],"text-decoration-thickness":[{decoration:[un,"from-font","auto",Nt,wm]}],"text-decoration-color":[{decoration:z()}],"underline-offset":[{"underline-offset":[un,"auto",Nt,_t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Nt,_t]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Nt,_t]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Y()}],"bg-repeat":[{bg:U()}],"bg-size":[{bg:X()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ef,Nt,_t],radial:["",Nt,_t],conic:[Ef,Nt,_t]},wbt,bbt]}],"bg-color":[{bg:z()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:z()}],"gradient-via":[{via:z()}],"gradient-to":[{to:z()}],rounded:[{rounded:H()}],"rounded-s":[{"rounded-s":H()}],"rounded-e":[{"rounded-e":H()}],"rounded-t":[{"rounded-t":H()}],"rounded-r":[{"rounded-r":H()}],"rounded-b":[{"rounded-b":H()}],"rounded-l":[{"rounded-l":H()}],"rounded-ss":[{"rounded-ss":H()}],"rounded-se":[{"rounded-se":H()}],"rounded-ee":[{"rounded-ee":H()}],"rounded-es":[{"rounded-es":H()}],"rounded-tl":[{"rounded-tl":H()}],"rounded-tr":[{"rounded-tr":H()}],"rounded-br":[{"rounded-br":H()}],"rounded-bl":[{"rounded-bl":H()}],"border-w":[{border:ee()}],"border-w-x":[{"border-x":ee()}],"border-w-y":[{"border-y":ee()}],"border-w-s":[{"border-s":ee()}],"border-w-e":[{"border-e":ee()}],"border-w-t":[{"border-t":ee()}],"border-w-r":[{"border-r":ee()}],"border-w-b":[{"border-b":ee()}],"border-w-l":[{"border-l":ee()}],"divide-x":[{"divide-x":ee()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ee()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ie(),"hidden","none"]}],"divide-style":[{divide:[...ie(),"hidden","none"]}],"border-color":[{border:z()}],"border-color-x":[{"border-x":z()}],"border-color-y":[{"border-y":z()}],"border-color-s":[{"border-s":z()}],"border-color-e":[{"border-e":z()}],"border-color-t":[{"border-t":z()}],"border-color-r":[{"border-r":z()}],"border-color-b":[{"border-b":z()}],"border-color-l":[{"border-l":z()}],"divide-color":[{divide:z()}],"outline-style":[{outline:[...ie(),"none","hidden"]}],"outline-offset":[{"outline-offset":[un,Nt,_t]}],"outline-w":[{outline:["",un,Ev,wm]}],"outline-color":[{outline:z()}],shadow:[{shadow:["","none",u,pE,fE]}],"shadow-color":[{shadow:z()}],"inset-shadow":[{"inset-shadow":["none",d,pE,fE]}],"inset-shadow-color":[{"inset-shadow":z()}],"ring-w":[{ring:ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:z()}],"ring-offset-w":[{"ring-offset":[un,wm]}],"ring-offset-color":[{"ring-offset":z()}],"inset-ring-w":[{"inset-ring":ee()}],"inset-ring-color":[{"inset-ring":z()}],"text-shadow":[{"text-shadow":["none",p,pE,fE]}],"text-shadow-color":[{"text-shadow":z()}],opacity:[{opacity:[un,Nt,_t]}],"mix-blend":[{"mix-blend":[...se(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":se()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[un]}],"mask-image-linear-from-pos":[{"mask-linear-from":ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":ae()}],"mask-image-linear-from-color":[{"mask-linear-from":z()}],"mask-image-linear-to-color":[{"mask-linear-to":z()}],"mask-image-t-from-pos":[{"mask-t-from":ae()}],"mask-image-t-to-pos":[{"mask-t-to":ae()}],"mask-image-t-from-color":[{"mask-t-from":z()}],"mask-image-t-to-color":[{"mask-t-to":z()}],"mask-image-r-from-pos":[{"mask-r-from":ae()}],"mask-image-r-to-pos":[{"mask-r-to":ae()}],"mask-image-r-from-color":[{"mask-r-from":z()}],"mask-image-r-to-color":[{"mask-r-to":z()}],"mask-image-b-from-pos":[{"mask-b-from":ae()}],"mask-image-b-to-pos":[{"mask-b-to":ae()}],"mask-image-b-from-color":[{"mask-b-from":z()}],"mask-image-b-to-color":[{"mask-b-to":z()}],"mask-image-l-from-pos":[{"mask-l-from":ae()}],"mask-image-l-to-pos":[{"mask-l-to":ae()}],"mask-image-l-from-color":[{"mask-l-from":z()}],"mask-image-l-to-color":[{"mask-l-to":z()}],"mask-image-x-from-pos":[{"mask-x-from":ae()}],"mask-image-x-to-pos":[{"mask-x-to":ae()}],"mask-image-x-from-color":[{"mask-x-from":z()}],"mask-image-x-to-color":[{"mask-x-to":z()}],"mask-image-y-from-pos":[{"mask-y-from":ae()}],"mask-image-y-to-pos":[{"mask-y-to":ae()}],"mask-image-y-from-color":[{"mask-y-from":z()}],"mask-image-y-to-color":[{"mask-y-to":z()}],"mask-image-radial":[{"mask-radial":[Nt,_t]}],"mask-image-radial-from-pos":[{"mask-radial-from":ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":ae()}],"mask-image-radial-from-color":[{"mask-radial-from":z()}],"mask-image-radial-to-color":[{"mask-radial-to":z()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":P()}],"mask-image-conic-pos":[{"mask-conic":[un]}],"mask-image-conic-from-pos":[{"mask-conic-from":ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":ae()}],"mask-image-conic-from-color":[{"mask-conic-from":z()}],"mask-image-conic-to-color":[{"mask-conic-to":z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Y()}],"mask-repeat":[{mask:U()}],"mask-size":[{mask:X()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Nt,_t]}],filter:[{filter:["","none",Nt,_t]}],blur:[{blur:le()}],brightness:[{brightness:[un,Nt,_t]}],contrast:[{contrast:[un,Nt,_t]}],"drop-shadow":[{"drop-shadow":["","none",g,pE,fE]}],"drop-shadow-color":[{"drop-shadow":z()}],grayscale:[{grayscale:["",un,Nt,_t]}],"hue-rotate":[{"hue-rotate":[un,Nt,_t]}],invert:[{invert:["",un,Nt,_t]}],saturate:[{saturate:[un,Nt,_t]}],sepia:[{sepia:["",un,Nt,_t]}],"backdrop-filter":[{"backdrop-filter":["","none",Nt,_t]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[un,Nt,_t]}],"backdrop-contrast":[{"backdrop-contrast":[un,Nt,_t]}],"backdrop-grayscale":[{"backdrop-grayscale":["",un,Nt,_t]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[un,Nt,_t]}],"backdrop-invert":[{"backdrop-invert":["",un,Nt,_t]}],"backdrop-opacity":[{"backdrop-opacity":[un,Nt,_t]}],"backdrop-saturate":[{"backdrop-saturate":[un,Nt,_t]}],"backdrop-sepia":[{"backdrop-sepia":["",un,Nt,_t]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":I()}],"border-spacing-x":[{"border-spacing-x":I()}],"border-spacing-y":[{"border-spacing-y":I()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Nt,_t]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[un,"initial",Nt,_t]}],ease:[{ease:["linear","initial",E,Nt,_t]}],delay:[{delay:[un,Nt,_t]}],animate:[{animate:["none",k,Nt,_t]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,Nt,_t]}],"perspective-origin":[{"perspective-origin":M()}],rotate:[{rotate:pe()}],"rotate-x":[{"rotate-x":pe()}],"rotate-y":[{"rotate-y":pe()}],"rotate-z":[{"rotate-z":pe()}],scale:[{scale:ye()}],"scale-x":[{"scale-x":ye()}],"scale-y":[{"scale-y":ye()}],"scale-z":[{"scale-z":ye()}],"scale-3d":["scale-3d"],skew:[{skew:Te()}],"skew-x":[{"skew-x":Te()}],"skew-y":[{"skew-y":Te()}],transform:[{transform:[Nt,_t,"","none","gpu","cpu"]}],"transform-origin":[{origin:M()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ee()}],"translate-x":[{"translate-x":Ee()}],"translate-y":[{"translate-y":Ee()}],"translate-z":[{"translate-z":Ee()}],"translate-none":["translate-none"],accent:[{accent:z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:z()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Nt,_t]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Nt,_t]}],fill:[{fill:["none",...z()]}],"stroke-w":[{stroke:[un,Ev,wm,h7]}],stroke:[{stroke:["none",...z()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Ebt=ibt(kbt);function Ve(...e){return Ebt(zn(e))}const mD=V1("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Js=A.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},i)=>{const o=r?Ap:"button";return h.jsx(o,{className:Ve(mD({variant:t,size:n,className:e})),ref:i,...s})});Js.displayName="Button";const FC=EO,Ta=DO,_a=AO,Vo=A.forwardRef(({className:e,sideOffset:t=4,...n},r)=>h.jsx(Zie,{children:h.jsx(QS,{ref:r,sideOffset:t,className:Ve("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Vo.displayName=QS.displayName;const Na=A.forwardRef(({children:e,tooltip:t,side:n="bottom",className:r,...s},i)=>h.jsx(FC,{children:h.jsxs(Ta,{children:[h.jsx(_a,{asChild:!0,children:h.jsxs(Js,{variant:"ghost",size:"icon",...s,className:Ve("size-6 p-1",r),ref:i,children:[e,h.jsx("span",{className:"sr-only",children:t})]})}),h.jsx(Vo,{side:n,children:t})]})}));Na.displayName="TooltipIconButton";const bB=A.forwardRef(({className:e,...t},n)=>h.jsx(ple,{ref:n,className:Ve("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));bB.displayName=ple.displayName;const Dbt=A.forwardRef(({className:e,...t},n)=>h.jsx(mle,{ref:n,className:Ve("aspect-square h-full w-full",e),...t}));Dbt.displayName=mle.displayName;const xB=A.forwardRef(({className:e,...t},n)=>h.jsx(gle,{ref:n,className:Ve("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));xB.displayName=gle.displayName;const Abt=HGe({style:IYe.coldarkDark,customStyle:{margin:0,backgroundColor:"black"}}),Tbt=()=>h.jsx(tWe,{remarkPlugins:[Ice],className:"aui-md",components:Mbt}),t0e=A.memo(Tbt),_bt=({language:e,code:t})=>{const{isCopied:n,copyToClipboard:r}=Nbt(),s=()=>{!t||n||r(t)};return h.jsxs("div",{style:{background:"hsl(0 0% 100% / 0.06)",borderTopRightRadius:"0.5rem",borderTopLeftRadius:"0.5rem",marginTop:"0.5rem",border:"1px solid hsl(0 0% 20.4%)",borderBottom:"none"},className:"flex items-center justify-between gap-4 px-4 py-2 text-sm font-semibold text-white",children:[h.jsx("span",{className:"lowercase [&>span]:text-xs",children:e}),h.jsx(Na,{tooltip:"Copy",onClick:s,children:h.jsxs("span",{className:"grid",children:[h.jsx("span",{style:{gridArea:"1/1"},className:Ve("transition-transform",n?"scale-100":"scale-0"),children:h.jsx(kh,{size:14})},"checkmark"),h.jsx("span",{style:{gridArea:"1/1"},className:Ve("transition-transform",n?"scale-0":"scale-100"),children:h.jsx(Dh,{size:14})},"copy")]})})]})},Nbt=({copiedDuration:e=1500}={})=>{const[t,n]=A.useState(!1);return{isCopied:t,copyToClipboard:s=>{s&&navigator.clipboard.writeText(s).then(()=>{n(!0),setTimeout(()=>n(!1),e)})}}},Pbt=({alt:e,src:t,...n})=>{const[r,s]=A.useState(!1);return A.useEffect(()=>{s(!1)},[t]),r||!t?h.jsxs("div",{children:[h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",width:"150",height:"150",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m2.25 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5Zm10.5-11.25h.008v.008h-.008V8.25Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"})}),h.jsx("p",{className:"text-xs italic text-muted-foreground -mt-[0.625rem] mb-[0.625rem]",children:"Image link is broken"})]}):h.jsx("img",{src:t,alt:e,...n,onError:()=>{s(!0)}})},Mbt=UUe({h1:({className:e,...t})=>h.jsx("h1",{className:Ve("mb-8 scroll-m-20 text-4xl font-extrabold tracking-tight last:mb-0",e),...t,style:{marginBottom:"2rem"}}),h2:({className:e,...t})=>h.jsx("h2",{className:Ve("mb-4 mt-8 scroll-m-20 text-3xl font-semibold tracking-tight first:mt-0 last:mb-0",e),...t,style:{marginBottom:"1rem",marginTop:"2rem"}}),h3:({className:e,...t})=>h.jsx("h3",{className:Ve("scroll-m-20 text-2xl font-semibold tracking-tight first:mt-0 last:mb-0",e),...t,style:{marginBottom:"1rem",marginTop:"1.5rem"}}),h4:({className:e,...t})=>h.jsx("h4",{className:Ve("scroll-m-20 text-xl font-semibold tracking-tight first:mt-0 last:mb-0",e),...t,style:{marginBottom:"1rem",marginTop:"1.5rem"}}),h5:({className:e,...t})=>h.jsx("h5",{className:Ve("font-semibold first:mt-0 last:mb-0",e),...t,style:{marginBottom:"1rem",marginTop:"1rem"}}),h6:({className:e,...t})=>h.jsx("h6",{className:Ve("font-semibold first:mt-0 last:mb-0",e),...t,style:{marginBottom:"1rem",marginTop:"1rem"}}),p:({className:e,...t})=>h.jsx("p",{className:Ve("leading-7 first:mt-0 last:mb-0",e),...t}),a:({className:e,...t})=>h.jsx("a",{className:Ve("text-primary font-medium underline underline-offset-4",e),...t}),blockquote:({className:e,...t})=>h.jsx("blockquote",{className:Ve("border-l-2 pl-6 italic",e),...t}),ul:({className:e,...t})=>h.jsx("ul",{className:Ve("my-5 ml-6 list-disc [&>li]:mt-2",e),...t}),ol:({className:e,...t})=>h.jsx("ol",{className:Ve("my-5 ml-6 list-decimal [&>li]:mt-2",e),...t}),hr:({className:e,...t})=>h.jsx("hr",{className:Ve("my-5 border-b",e),...t}),table:({className:e,...t})=>h.jsx("table",{className:Ve("my-5 w-full border-separate border-spacing-0 overflow-y-auto",e),...t}),th:({className:e,...t})=>h.jsx("th",{className:Ve("bg-muted px-4 py-2 text-left font-bold first:rounded-tl-lg last:rounded-tr-lg [&[align=center]]:text-center [&[align=right]]:text-right",e),...t}),td:({className:e,...t})=>h.jsx("td",{className:Ve("border-b border-l px-4 py-2 text-left last:border-r [&[align=center]]:text-center [&[align=right]]:text-right",e),...t}),tr:({className:e,...t})=>h.jsx("tr",{className:Ve("m-0 border-b p-0 first:border-t [&:last-child>td:first-child]:rounded-bl-lg [&:last-child>td:last-child]:rounded-br-lg",e),...t}),sup:({className:e,...t})=>h.jsx("sup",{className:Ve("[&>a]:text-xs [&>a]:no-underline",e),...t}),pre:({className:e,...t})=>h.jsx("pre",{...t,style:{borderBottomRightRadius:"0.5rem",borderBottomLeftRadius:"0.5rem",background:"transparent",fontSize:"0.875rem",marginBottom:"0.5rem",border:"1px solid hsl(0 0% 20.4%)"},className:Ve("overflow-x-auto p-4 text-white",e)}),code:function({className:t,...n}){const r=uce();return h.jsxs("pre",{style:{fontSize:"0.875rem",display:"inline"},children:[h.jsx("code",{className:Ve(!r&&"bg-muted rounded border font-semibold",t),...n,style:{fontWeight:"400",paddingBlock:r?0:"0.1em",paddingInline:r?0:"0.3em"}})," "]})},CodeHeader:_bt,SyntaxHighlighter:Abt,img:Pbt}),jbt={sm:"[&>svg]:h-icon-sm [&>svg]:w-icon-sm",default:"[&>svg]:h-icon-default [&>svg]:w-icon-default",lg:"[&>svg]:h-icon-lg [&>svg]:w-icon-lg"},ot=({children:e,className:t,size:n="default",...r})=>h.jsx("span",{className:zn("block",jbt[n],t),...r,children:e}),QZ={default:"text-icon3",success:"text-accent1",error:"text-accent2",info:"text-accent3"},Un=({icon:e,variant:t="default",className:n,children:r,...s})=>h.jsxs("div",{className:zn("bg-surface4 text-ui-sm gap-md h-badge-default inline-flex items-center rounded-md",e?"pl-md pr-1.5":"px-1.5",e||t==="default"?"text-icon5":QZ[t],n),...s,children:[e&&h.jsx("span",{className:QZ[t],children:h.jsx(ot,{children:e})}),r]}),Nh=e=>h.jsxs("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.5 15C10.3565 15 12.137 14.2625 13.4497 12.9497C14.7625 11.637 15.5 9.85652 15.5 8C15.5 6.14348 14.7625 4.36301 13.4497 3.05025C12.137 1.7375 10.3565 1 8.5 1C6.64348 1 4.86301 1.7375 3.55025 3.05025C2.2375 4.36301 1.5 6.14348 1.5 8C1.5 9.85652 2.2375 11.637 3.55025 12.9497C4.86301 14.2625 6.64348 15 8.5 15ZM5.621 10.879L4.611 11.889C3.84179 11.1198 3.31794 10.1398 3.1057 9.07291C2.89346 8.00601 3.00236 6.90013 3.41864 5.89512C3.83491 4.89012 4.53986 4.03112 5.44434 3.42676C6.34881 2.8224 7.41219 2.49983 8.5 2.49983C9.58781 2.49983 10.6512 2.8224 11.5557 3.42676C12.4601 4.03112 13.1651 4.89012 13.5814 5.89512C13.9976 6.90013 14.1065 8.00601 13.8943 9.07291C13.6821 10.1398 13.1582 11.1198 12.389 11.889L11.379 10.879C11.1004 10.6003 10.7696 10.3792 10.4055 10.2284C10.0414 10.0776 9.6511 9.99995 9.257 10H7.743C7.3489 9.99995 6.95865 10.0776 6.59455 10.2284C6.23045 10.3792 5.89963 10.6003 5.621 10.879Z",fill:"currentColor"}),h.jsx("path",{d:"M8.5 4C7.96957 4 7.46086 4.21071 7.08579 4.58579C6.71071 4.96086 6.5 5.46957 6.5 6V6.5C6.5 7.03043 6.71071 7.53914 7.08579 7.91421C7.46086 8.28929 7.96957 8.5 8.5 8.5C9.03043 8.5 9.53914 8.28929 9.91421 7.91421C10.2893 7.53914 10.5 7.03043 10.5 6.5V6C10.5 5.46957 10.2893 4.96086 9.91421 4.58579C9.53914 4.21071 9.03043 4 8.5 4Z",fill:"currentColor"})]}),Fbt=e=>h.jsxs("svg",{width:"126",height:"85",viewBox:"0 0 126 85",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[h.jsx("path",{d:"M63.0002 0.968262C28.5152 0.968262 0.55957 15.6484 0.55957 33.7573V51.2428C0.55957 69.3517 28.5152 84.0319 63.0002 84.0319C97.4853 84.0319 125.441 69.3517 125.441 51.2428V33.7573C125.441 15.6484 97.4853 0.968262 63.0002 0.968262Z",stroke:"#707070"}),h.jsx("path",{d:"M119.322 35.1636C119.322 50.3595 94.1055 62.6782 62.9998 62.6782C31.894 62.6782 6.67773 50.3595 6.67773 35.1636V49.8363C6.67773 65.0322 31.894 77.351 62.9998 77.351C94.1055 77.351 119.322 65.0322 119.322 49.8363V35.1636Z",fill:"#2E2E2E",fillOpacity:"0.9"}),h.jsx("path",{d:"M119.322 35.1636C119.322 50.3595 94.1055 62.6782 62.9998 62.6782C31.894 62.6782 6.67773 50.3595 6.67773 35.1636M119.322 35.1636C119.322 19.9677 94.1055 7.64893 62.9998 7.64893C31.894 7.64893 6.67773 19.9677 6.67773 35.1636M119.322 35.1636V49.8363C119.322 65.0322 94.1055 77.351 62.9998 77.351C31.894 77.351 6.67773 65.0322 6.67773 49.8363V35.1636",stroke:"#424242"}),h.jsxs("g",{clipPath:"url(#clip0_21421_19519)",children:[h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.5383 47.0955C45.0714 50.3122 53.9322 52.1193 63.1714 52.1193C72.4106 52.1193 81.2714 50.3122 87.8045 47.0955C94.3376 43.8787 98.0078 39.5159 98.0078 34.9668C98.0078 30.4177 94.3376 26.0549 87.8045 22.8381C81.2714 19.6214 72.4106 17.8143 63.1714 17.8143C53.9322 17.8143 45.0714 19.6214 38.5383 22.8381C32.0052 26.0549 28.3349 30.4177 28.3349 34.9668C28.3349 39.5159 32.0052 43.8787 38.5383 47.0955ZM42.9089 34.9668L35.8005 34.9668C35.8004 32.3013 37.4056 29.6956 40.4132 27.4793C43.4207 25.263 47.6956 23.5355 52.6971 22.5154C57.6986 21.4954 63.2022 21.2285 68.5118 21.7485C73.8214 22.2685 78.6986 23.552 82.5266 25.4368C86.3546 27.3216 88.9615 29.723 90.0176 32.3373C91.0737 34.9517 90.5316 37.6614 88.4599 40.1241C86.3881 42.5867 82.8797 44.6915 78.3784 46.1723C73.8771 47.6532 68.585 48.4435 63.1714 48.4435V44.9435C63.1717 43.9778 62.7855 43.0215 62.035 42.1293C61.2845 41.2372 60.1843 40.4265 58.7973 39.7438L53.4695 37.1205C52.0828 36.4376 50.4364 35.8959 48.6244 35.5263C46.8124 35.1568 44.8702 34.9667 42.9089 34.9668Z",fill:"#A9A9A9"}),h.jsx("path",{d:"M77.2474 28.0361C75.3808 27.1171 72.8492 26.6007 70.2094 26.6007C67.5696 26.6007 65.038 27.1171 63.1714 28.0361L61.4119 28.9025C59.5453 29.8215 58.4966 31.068 58.4966 32.3678C58.4966 33.6676 59.5453 34.9141 61.4119 35.8331C63.2785 36.7522 65.8101 37.2685 68.4499 37.2685C71.0897 37.2685 73.6213 36.7522 75.4879 35.8331L77.2474 34.9668C79.114 34.0477 80.1627 32.8012 80.1627 31.5015C80.1627 30.2017 79.114 28.9552 77.2474 28.0361Z",fill:"#A9A9A9"})]}),h.jsx("defs",{children:h.jsx("clipPath",{id:"clip0_21421_19519",children:h.jsx("rect",{width:"62.7591",height:"62.7591",fill:"white",transform:"matrix(0.897148 0.441731 -0.897148 0.441731 63.1714 7.24365)"})})})]}),n0e=e=>h.jsxs("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[h.jsx("path",{d:"M11.0313 7.97578C11.0313 9.34436 9.92183 10.4538 8.55324 10.4538C7.18466 10.4538 6.0752 9.34436 6.0752 7.97578C6.0752 6.60719 7.18466 5.49773 8.55324 5.49773C9.92183 5.49773 11.0313 6.60719 11.0313 7.97578ZM11.0313 7.97578H14.573",stroke:"currentColor",strokeWidth:"1.33333",strokeLinecap:"round"}),h.jsx("path",{d:"M12.967 4.46154C11.9273 3.14431 10.3165 2.29883 8.50814 2.29883C5.37277 2.29883 2.83105 4.84055 2.83105 7.97591C2.83105 11.1113 5.37277 13.653 8.50814 13.653C10.3165 13.653 11.9273 12.8075 12.967 11.4903",stroke:"currentColor",strokeWidth:"1.33333",strokeLinecap:"round"})]}),q1=e=>h.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.99982 2.0625C3.8252 2.0625 2.06232 3.82538 2.06232 6C2.06232 8.17462 3.8252 9.9375 5.99982 9.9375C8.17444 9.9375 9.93732 8.17462 9.93732 6C9.93732 3.82538 8.17444 2.0625 5.99982 2.0625ZM0.937317 6C0.937317 3.20406 3.20388 0.9375 5.99982 0.9375C8.79576 0.9375 11.0623 3.20406 11.0623 6C11.0623 8.79594 8.79576 11.0625 5.99982 11.0625C3.20388 11.0625 0.937317 8.79594 0.937317 6Z",fill:"currentColor"}),h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.97865 4.57004C8.22604 4.75795 8.27426 5.11082 8.08635 5.35821L6.05486 8.03279C5.94873 8.17251 5.78348 8.25471 5.60803 8.25505C5.43257 8.2554 5.267 8.17385 5.16032 8.03454L3.80937 6.27034C3.6205 6.02369 3.66733 5.67063 3.91398 5.48176C4.16063 5.29288 4.51369 5.33972 4.70257 5.58637L5.6051 6.76498L7.19048 4.67774C7.37839 4.43036 7.73126 4.38213 7.97865 4.57004Z",fill:"currentColor"})]}),Ibt=e=>h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:h.jsx("path",{d:"M4.60059 6.30005L8.00098 9.70005L11.3996 6.30142",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),G1=e=>h.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.99982 2.0625C3.8252 2.0625 2.06232 3.82538 2.06232 6C2.06232 8.17462 3.8252 9.9375 5.99982 9.9375C8.17444 9.9375 9.93732 8.17462 9.93732 6C9.93732 3.82538 8.17444 2.0625 5.99982 2.0625ZM0.937317 6C0.937317 3.20406 3.20388 0.9375 5.99982 0.9375C8.79576 0.9375 11.0623 3.20406 11.0623 6C11.0623 8.79594 8.79576 11.0625 5.99982 11.0625C3.20388 11.0625 0.937317 8.79594 0.937317 6Z",fill:"currentColor"}),h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.89741 4.10293C8.11707 4.32261 8.11706 4.67877 7.89738 4.89843L6.79517 6.00058L7.8962 7.10155C8.11588 7.32122 8.11589 7.67737 7.89623 7.89705C7.67656 8.11673 7.32041 8.11674 7.10073 7.89707L5.99965 6.79605L4.89856 7.89707C4.67889 8.11673 4.32273 8.11672 4.10307 7.89704C3.88341 7.67737 3.88342 7.32121 4.10309 7.10155L5.20413 6.00058L4.10191 4.89843C3.88224 4.67877 3.88223 4.32262 4.10189 4.10294C4.32155 3.88326 4.67771 3.88325 4.89738 4.10292L5.99965 5.20511L7.10191 4.10291C7.32159 3.88325 7.67774 3.88326 7.89741 4.10293Z",fill:"currentColor"})]}),Obt=e=>h.jsx("svg",{width:"13",height:"14",viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.941406 2.831V3.75745C0.941406 4.27885 1.35491 4.76002 2.05273 5.14711C2.10389 5.17549 2.15658 5.20337 2.21074 5.23071C3.23028 5.74546 4.77322 6.07356 6.50007 6.07356C8.31866 6.07356 9.93328 5.70967 10.9474 5.14711C11.6453 4.76002 12.0587 4.27886 12.0587 3.75745V2.831C12.0587 1.55185 9.57003 0.514893 6.50007 0.514893C3.4301 0.514893 0.941406 1.55185 0.941406 2.831ZM1.02052 6.14518C0.968505 6.27247 0.941406 6.40331 0.941406 6.53678V7.46322C0.941406 7.98463 1.35491 8.46579 2.05273 8.85289C3.06686 9.41542 4.68148 9.77933 6.50007 9.77933C8.22692 9.77933 9.76986 9.45128 10.7894 8.93645C10.8436 8.90912 10.8962 8.88124 10.9474 8.85289C11.6453 8.46579 12.0587 7.98462 12.0587 7.46322V6.53678C12.0587 6.40331 12.0316 6.27248 11.9796 6.14519C11.664 6.35469 11.3187 6.53063 10.9652 6.67795C9.75207 7.18337 8.17267 7.46322 6.50007 7.46322C4.82747 7.46322 3.24803 7.18337 2.03502 6.67795C1.68142 6.53063 1.3362 6.35469 1.02052 6.14518ZM1.02052 9.85095C0.968505 9.97824 0.941406 10.1091 0.941406 10.2426V11.169C0.941406 12.4481 3.4301 13.4851 6.50007 13.4851C9.57003 13.4851 12.0587 12.4481 12.0587 11.169V10.2426C12.0587 10.1091 12.0316 9.97824 11.9796 9.85095C11.664 10.0605 11.3187 10.2364 10.9652 10.3837C9.75207 10.8891 8.17267 11.169 6.50007 11.169C4.82747 11.169 3.24803 10.8891 2.03502 10.3837C1.68142 10.2364 1.3362 10.0605 1.02052 9.85095Z",fill:"currentColor"})}),Rbt=e=>h.jsxs("svg",{width:"13",height:"14",viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[h.jsx("path",{d:"M6.83531 7.0062C6.64515 7.35069 6.15 7.35069 5.95984 7.0062L2.99029 1.62664C2.7855 1.25565 3.10614 0.814077 3.5223 0.893977L6.30195 1.42765C6.36421 1.43961 6.42818 1.43961 6.49044 1.42766L9.27301 0.893806C9.68915 0.813965 10.0097 1.25552 9.80495 1.62648L6.83531 7.0062Z",fill:"currentColor"}),h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.77553 6.93249C4.70399 6.80288 4.52254 6.79459 4.4558 6.92674C4.30167 7.23196 4.21484 7.57697 4.21484 7.94226C4.21484 9.18814 5.22483 10.1981 6.4707 10.1981C7.71658 10.1981 8.72656 9.18814 8.72656 7.94226C8.72656 7.51818 8.60954 7.12143 8.40603 6.78254C8.33262 6.66031 8.15949 6.67411 8.09059 6.79894L7.70941 7.48947C7.13892 8.52294 5.65347 8.52293 5.08299 7.48947L4.77553 6.93249ZM5.56313 5.8764C5.46196 5.92091 5.42707 6.04354 5.48048 6.1403L5.95846 7.0062C6.14862 7.35069 6.64377 7.35069 6.83393 7.0062L7.33905 6.09115C7.39467 5.99039 7.35417 5.86275 7.2461 5.8232C7.00431 5.7347 6.74315 5.6864 6.4707 5.6864C6.14785 5.6864 5.84083 5.75423 5.56313 5.8764Z",fill:"currentColor"}),h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.01974 3.49407C4.17993 3.78426 4.54405 3.88541 4.85312 3.76562C5.35484 3.57118 5.90031 3.46453 6.4707 3.46453C7.0005 3.46453 7.50881 3.55654 7.98052 3.72545C8.28711 3.83523 8.64168 3.73133 8.79906 3.44623C8.96234 3.15043 8.85109 2.77497 8.5364 2.652C7.89621 2.40184 7.19949 2.26453 6.4707 2.26453C5.69013 2.26453 4.94634 2.42205 4.2694 2.70703C3.96395 2.83562 3.85958 3.20392 4.01974 3.49407ZM9.9461 4.47216C9.81565 4.70848 9.85645 4.99948 10.0211 5.21339C10.6026 5.96887 10.9484 6.91518 10.9484 7.94226C10.9484 10.4152 8.94369 12.42 6.4707 12.42C3.99772 12.42 1.99297 10.4152 1.99297 7.94226C1.99297 6.96004 2.30923 6.05168 2.84547 5.31345C3.0006 5.09989 3.03605 4.81591 2.90848 4.58482C2.70986 4.22501 2.22216 4.15342 1.97124 4.47893C1.2324 5.43738 0.792968 6.6385 0.792968 7.94226C0.792969 11.078 3.33498 13.62 6.4707 13.62C9.60643 13.62 12.1484 11.078 12.1484 7.94226C12.1484 6.58193 11.67 5.33333 10.8723 4.35553C10.6173 4.04298 10.141 4.11901 9.9461 4.47216Z",fill:"currentColor"})]}),Lbt=e=>h.jsx("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:h.jsx("path",{d:"M8.5 3V13",stroke:"currentColor",strokeWidth:"0.5"})}),Bbt=e=>h.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[h.jsx("g",{clipPath:"url(#clip0_21999_22095)",children:h.jsx("path",{d:"M7.5 0.75C3.6325 0.75 0.5 3.8825 0.5 7.75C0.5 10.8475 2.50375 13.4637 5.28625 14.3912C5.63625 14.4525 5.7675 14.2425 5.7675 14.0587C5.7675 13.8925 5.75875 13.3412 5.75875 12.755C4 13.0787 3.545 12.3262 3.405 11.9325C3.32625 11.7312 2.985 11.11 2.6875 10.9437C2.4425 10.8125 2.0925 10.4887 2.67875 10.48C3.23 10.4712 3.62375 10.9875 3.755 11.1975C4.385 12.2562 5.39125 11.9587 5.79375 11.775C5.855 11.32 6.03875 11.0137 6.24 10.8387C4.6825 10.6637 3.055 10.06 3.055 7.3825C3.055 6.62125 3.32625 5.99125 3.7725 5.50125C3.7025 5.32625 3.4575 4.60875 3.8425 3.64625C3.8425 3.64625 4.42875 3.4625 5.7675 4.36375C6.3275 4.20625 6.9225 4.1275 7.5175 4.1275C8.1125 4.1275 8.7075 4.20625 9.2675 4.36375C10.6062 3.45375 11.1925 3.64625 11.1925 3.64625C11.5775 4.60875 11.3325 5.32625 11.2625 5.50125C11.7087 5.99125 11.98 6.6125 11.98 7.3825C11.98 10.0687 10.3438 10.6637 8.78625 10.8387C9.04 11.0575 9.25875 11.4775 9.25875 12.1337C9.25875 13.07 9.25 13.8225 9.25 14.0587C9.25 14.2425 9.38125 14.4612 9.73125 14.3912C11.1209 13.9221 12.3284 13.029 13.1839 11.8377C14.0393 10.6463 14.4996 9.21668 14.5 7.75C14.5 3.8825 11.3675 0.75 7.5 0.75Z",fill:"currentColor"})}),h.jsx("defs",{children:h.jsx("clipPath",{id:"clip0_21999_22095",children:h.jsx("rect",{width:"14",height:"14",fill:"currentColor",transform:"translate(0.5 0.75)"})})})]}),$bt=e=>h.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[h.jsxs("g",{clipPath:"url(#clip0_21999_20513)",children:[h.jsx("path",{d:"M13.5037 7.54867C13.5037 7.1144 13.4648 6.69683 13.3924 6.29596H7.62436V8.66776H10.9204C10.7756 9.43052 10.3413 10.0764 9.68994 10.5106V12.0529H11.6776C12.8356 10.9839 13.5037 9.41382 13.5037 7.54867Z",fill:"white"}),h.jsx("path",{d:"M7.62415 13.5339C9.27773 13.5339 10.6643 12.9882 11.6776 12.0529L9.68994 10.5106C9.14431 10.8781 8.44816 11.1009 7.62415 11.1009C6.03182 11.1009 4.67889 10.0263 4.19451 8.57877H2.15677V10.16C3.1645 12.1587 5.23008 13.5339 7.62415 13.5339Z",fill:"white"}),h.jsx("path",{d:"M4.19472 8.57315C4.07223 8.20569 3.99985 7.81595 3.99985 7.40952C3.99985 7.00308 4.07223 6.61335 4.19472 6.24589V4.66469H2.15698C1.73941 5.4887 1.5 6.41849 1.5 7.40952C1.5 8.40055 1.73941 9.33034 2.15698 10.1543L3.74374 8.91834L4.19472 8.57315Z",fill:"white"}),h.jsx("path",{d:"M7.62415 3.72376C8.5261 3.72376 9.32783 4.03555 9.96811 4.63685L11.7219 2.88306C10.6585 1.89202 9.27773 1.28516 7.62415 1.28516C5.23008 1.28516 3.16471 2.66036 2.15698 4.66469L4.19472 6.24589C4.6791 4.79832 6.03182 3.72376 7.62415 3.72376Z",fill:"white"})]}),h.jsx("defs",{children:h.jsx("clipPath",{id:"clip0_21999_20513",children:h.jsx("rect",{width:"12.2487",height:"12.2487",fill:"white",transform:"translate(1.375 1.28516)"})})})]}),r0e=e=>h.jsxs("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[h.jsx("path",{d:"M7.07303 7.39921C6.65882 7.39921 6.32303 7.735 6.32303 8.14921C6.32303 8.56343 6.65882 8.89921 7.07303 8.89921H7.75V10.6187C7.75 11.0329 8.08579 11.3687 8.5 11.3687C8.91421 11.3687 9.25 11.0329 9.25 10.6187V8.14921C9.25 7.735 8.91421 7.39921 8.5 7.39921H7.07303Z",fill:"currentColor"}),h.jsx("path",{d:"M8.50309 4.72995C7.9971 4.72995 7.58691 5.14014 7.58691 5.64613C7.58691 6.15212 7.9971 6.56231 8.50309 6.56231C9.00908 6.56231 9.41927 6.15212 9.41927 5.64613C9.41927 5.14014 9.00908 4.72995 8.50309 4.72995Z",fill:"currentColor"}),h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.5 1.75293C5.04984 1.75293 2.25293 4.54984 2.25293 8C2.25293 11.4502 5.04984 14.2471 8.5 14.2471C11.9502 14.2471 14.7471 11.4502 14.7471 8C14.7471 4.54984 11.9502 1.75293 8.5 1.75293ZM3.75293 8C3.75293 5.37827 5.87827 3.25293 8.5 3.25293C11.1218 3.25293 13.2471 5.37826 13.2471 8C13.2471 10.6218 11.1218 12.7471 8.5 12.7471C5.87826 12.7471 3.75293 10.6218 3.75293 8Z",fill:"currentColor"})]}),s0e=e=>h.jsx("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:h.jsx("path",{d:"M3.8674 9.19968L4.14554 10.8649C4.23965 11.4283 4.75254 11.8237 5.32137 11.7713L5.58252 11.7472C6.56555 11.6567 7.43309 12.3868 7.51181 13.3708L7.59308 14.3867C7.60422 14.5259 7.71868 14.6342 7.85825 14.6376L9.91053 14.6876C10.1066 14.6924 10.2434 14.4948 10.17 14.3129L8.90452 11.1782C8.80956 10.9429 8.65085 10.7389 8.44626 10.5889L7.90134 10.1895C7.70604 10.0464 7.55223 9.85411 7.45759 9.63124C7.15011 8.90712 6.6579 7.71234 6.37054 6.88944C6.19204 6.3783 5.79931 6.29158 5.45492 6.21553C4.98179 6.11106 4.5999 6.02673 4.99001 4.88985C5.66408 2.92541 8.06015 2.07904 10.6601 3.33088C12.6488 4.2884 13.1187 6.35416 13.0328 7.58237C13.0297 7.62768 13.0214 7.67186 13.0094 7.71566C12.8829 8.17534 12.368 8.40491 11.9415 8.19169L10.3022 7.37201C10.2069 7.32439 10.0927 7.33657 10.0096 7.40322L8.64809 8.49559C8.55405 8.57104 8.52072 8.69931 8.56615 8.811L10.8995 14.5478C10.9404 14.6483 11.0369 14.715 11.1454 14.7177L12.0572 14.7399C12.2581 14.7448 12.3951 14.5382 12.3124 14.3551L11.8681 13.3706C11.4211 12.3803 11.6047 11.2192 12.3354 10.4151L13.4616 9.17575C13.7473 8.86125 13.9224 8.46187 13.9599 8.03858L13.9763 7.85359C14.2866 4.35298 11.377 1.41272 7.87336 1.68639C6.03919 1.82965 4.45399 3.02228 3.80807 4.74492L3.70275 5.02579C3.5828 5.34571 3.62741 5.70411 3.82213 5.98485L3.88946 6.08192C4.12183 6.41695 4.0958 6.86726 3.82637 7.17328L3.06705 8.03572C2.96261 8.15435 2.98058 8.33664 3.10617 8.43259L3.66059 8.85617C3.77064 8.94026 3.84458 9.06307 3.8674 9.19968Z",fill:"currentColor"})}),zbt=e=>h.jsx("svg",{width:"12",height:"13",viewBox:"0 0 12 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:h.jsx("path",{d:"M10.1266 5.67745C10.3409 5.0225 10.2695 4.2961 9.92413 3.70069C9.40017 2.78376 8.34034 2.31934 7.30433 2.53369C6.85182 2.02164 6.18496 1.73584 5.49428 1.73584C4.43445 1.73584 3.50561 2.41461 3.17218 3.4149C2.49342 3.55779 1.90992 3.97458 1.56458 4.5819C1.04062 5.49883 1.1597 6.64202 1.86228 7.42796C1.64793 8.09482 1.73129 8.80931 2.07663 9.40472C2.60059 10.3217 3.66042 10.798 4.69643 10.5717C5.16085 11.0838 5.8158 11.3815 6.50648 11.3815C7.56631 11.3815 8.49515 10.7027 8.82858 9.70243C9.50735 9.55953 10.0908 9.14274 10.4362 8.53542C10.9601 7.61849 10.8411 6.46339 10.1266 5.67745ZM6.50648 10.7503C6.07778 10.7503 5.67291 10.6074 5.35138 10.3336C5.36329 10.3217 5.39902 10.3097 5.41093 10.2978L7.32815 9.19037C7.42341 9.13083 7.48295 9.03557 7.48295 8.91648V6.21332L8.29271 6.67774C8.30462 6.67774 8.30462 6.68965 8.30462 6.70156V8.9403C8.31653 9.94059 7.50677 10.7503 6.50648 10.7503ZM2.62441 9.09511C2.41006 8.72595 2.33861 8.29726 2.41006 7.88047C2.42197 7.89238 2.44578 7.90429 2.4696 7.91619L4.38682 9.02366C4.48209 9.0832 4.60117 9.0832 4.69643 9.02366L7.04235 7.66612V8.60687C7.04235 8.61878 7.04235 8.63069 7.03044 8.63069L5.0894 9.75006C4.23201 10.2502 3.12455 9.9525 2.62441 9.09511ZM2.12426 4.90342C2.33861 4.53427 2.67204 4.26038 3.06501 4.10557V6.39195C3.06501 6.49912 3.12455 6.60629 3.21982 6.66583L5.56573 8.02337L4.75597 8.48779C4.74407 8.48779 4.73216 8.4997 4.73216 8.48779L2.79112 7.36842C1.90992 6.86827 1.62412 5.76081 2.12426 4.90342ZM8.79285 6.45149L6.44694 5.09395L7.2567 4.62953C7.2686 4.62953 7.28051 4.61762 7.28051 4.62953L9.22155 5.7489C10.0908 6.24905 10.3766 7.35651 9.8765 8.2139C9.66215 8.58305 9.32872 8.85694 8.93575 8.99984V6.72538C8.94766 6.6182 8.88812 6.51103 8.79285 6.45149ZM9.5907 5.23685C9.5788 5.22494 9.55498 5.21303 9.53116 5.20113L7.61394 4.09366C7.51868 4.03412 7.39959 4.03412 7.30433 4.09366L4.95841 5.4512V4.51045C4.95841 4.49854 4.95841 4.48663 4.97032 4.48663L6.91136 3.36726C7.78066 2.86712 8.87621 3.16482 9.37636 4.03412C9.5907 4.39137 9.66215 4.82006 9.5907 5.23685ZM4.51781 6.904L3.70805 6.43958C3.69615 6.43958 3.69615 6.42767 3.69615 6.41576V4.17702C3.69615 3.17673 4.5059 2.36697 5.50619 2.36697C5.93489 2.36697 6.33977 2.50987 6.66129 2.78376C6.64938 2.79567 6.62556 2.80758 6.60175 2.81949L4.68453 3.92695C4.58926 3.98649 4.52972 4.08176 4.52972 4.20084V6.904H4.51781ZM4.95841 5.95134L6.00634 5.34402L7.05426 5.95134V7.15407L6.00634 7.76139L4.95841 7.15407V5.95134Z",fill:"currentColor"})}),Hbt=e=>h.jsx("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 12V11C3 10.6022 3.15804 10.2206 3.43934 9.93934C3.72064 9.65804 4.10218 9.5 4.5 9.5C4.89782 9.5 5.27936 9.65804 5.56066 9.93934C5.84196 10.2206 6 10.6022 6 11V12C6 12.3978 5.84196 12.7794 5.56066 13.0607C5.27936 13.342 4.89782 13.5 4.5 13.5C4.10218 13.5 3.72064 13.342 3.43934 13.0607C3.15804 12.7794 3 12.3978 3 12ZM7 12V8.5C7 8.10218 7.15804 7.72064 7.43934 7.43934C7.72064 7.15804 8.10218 7 8.5 7C8.89782 7 9.27936 7.15804 9.56066 7.43934C9.84196 7.72064 10 8.10218 10 8.5V12C10 12.3978 9.84196 12.7794 9.56066 13.0607C9.27936 13.342 8.89782 13.5 8.5 13.5C8.10218 13.5 7.72064 13.342 7.43934 13.0607C7.15804 12.7794 7 12.3978 7 12ZM11 12V4C11 3.60218 11.158 3.22064 11.4393 2.93934C11.7206 2.65804 12.1022 2.5 12.5 2.5C12.8978 2.5 13.2794 2.65804 13.5607 2.93934C13.842 3.22064 14 3.60218 14 4V12C14 12.3978 13.842 12.7794 13.5607 13.0607C13.2794 13.342 12.8978 13.5 12.5 13.5C12.1022 13.5 11.7206 13.342 11.4393 13.0607C11.158 12.7794 11 12.3978 11 12Z",fill:"currentColor"})}),Vbt=e=>h.jsx("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:h.jsx("path",{d:"M5.25684 12.6387L10.4003 3.36133H11.7432L6.5997 12.6387H5.25684Z",fill:"currentColor"})}),gl=e=>h.jsx("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.5605 1.42351C8.0791 0.904904 8.92215 0.906157 9.4395 1.42351L10.6922 2.67617C11.2108 3.19477 11.2095 4.03782 10.6922 4.55517L9.4395 5.80783C8.9209 6.32643 8.07785 6.32518 7.5605 5.80783L6.30784 4.55517C5.78923 4.03656 5.79049 3.19352 6.30784 2.67617L7.5605 1.42351ZM3.17618 5.80783C3.69478 5.28923 4.53782 5.29048 5.05517 5.80783L6.30784 7.0605C6.82644 7.5791 6.82519 8.42214 6.30784 8.93949L5.05517 10.1922C4.53657 10.7108 3.69353 10.7095 3.17618 10.1922L1.92351 8.93949C1.40491 8.42089 1.40616 7.57785 1.92351 7.0605L3.17618 5.80783ZM11.9448 5.80783C12.4634 5.28923 13.3065 5.29048 13.8238 5.80783L15.0765 7.0605C15.5951 7.5791 15.5938 8.42214 15.0765 8.93949L13.8238 10.1922C13.3052 10.7108 12.4622 10.7095 11.9448 10.1922L10.6922 8.93949C10.1736 8.42089 10.1748 7.57785 10.6922 7.0605L11.9448 5.80783ZM7.5605 10.1922C8.0791 9.67355 8.92215 9.67481 9.4395 10.1922L10.6922 11.4448C11.2108 11.9634 11.2095 12.8065 10.6922 13.3238L9.4395 14.5765C8.9209 15.0951 8.07785 15.0938 7.5605 14.5765L6.30784 13.3238C5.78923 12.8052 5.79049 11.9622 6.30784 11.4448L7.5605 10.1922Z",fill:"currentColor"})}),Vj=e=>h.jsxs("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[h.jsx("path",{d:"M3.0498 3.17139V7.95137M6.91346 12.8737L4.04984 12.8738C3.49754 12.8738 3.0498 12.4261 3.0498 11.8738V7.95137M3.0498 7.95137L6.85968 7.95125",stroke:"currentColor",strokeLinecap:"round"}),h.jsx("path",{d:"M6.59668 3.12631L13.9507 3.12631",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),h.jsx("path",{d:"M10.293 7.95099L13.8072 7.95099",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),h.jsx("path",{d:"M10.293 12.8025L13.8072 12.8025",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),kc=e=>h.jsx("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.24388 2.4018C6.24388 2.0394 6.53767 1.74561 6.90008 1.74561H10.0991C10.4614 1.74561 10.7553 2.0394 10.7553 2.4018V4.57546C10.7553 4.93787 10.4614 5.23166 10.0991 5.23166H9.31982V7.35469L10.0033 9.22664C9.90442 9.20146 9.80035 9.1761 9.6915 9.14986L9.62652 9.13422C9.30473 9.05687 8.92256 8.96501 8.61993 8.84491C8.5819 8.82981 8.54147 8.81292 8.49957 8.79391C8.45767 8.81292 8.41724 8.82981 8.3792 8.84491C8.07657 8.96501 7.6944 9.05687 7.37261 9.13422L7.30763 9.14986C7.19879 9.1761 7.09471 9.20146 6.99577 9.22664L7.67932 7.35469V5.23166H6.90008C6.53767 5.23166 6.24388 4.93787 6.24388 4.57546V2.4018ZM6.99577 9.22664C6.99577 9.22664 6.99578 9.22664 6.99577 9.22664L6.43283 10.7683H6.81806C7.18047 10.7683 7.47426 11.0622 7.47426 11.4245V13.5982C7.47426 13.9606 7.18047 14.2544 6.81806 14.2544H3.61909C3.25668 14.2544 2.96289 13.9606 2.96289 13.5982V11.4245C2.96289 11.0622 3.25668 10.7683 3.61909 10.7683H4.26617C4.2921 10.4663 4.32783 10.1494 4.37744 9.85171C4.43762 9.49063 4.52982 9.08135 4.68998 8.76102C4.93975 8.2615 5.44743 8.01751 5.7771 7.88788C6.14684 7.74249 6.57537 7.63889 6.92317 7.55505C7.24707 7.47696 7.49576 7.41679 7.67932 7.35469L6.99577 9.22664ZM6.43283 10.7683L6.99577 9.22664C6.75846 9.28705 6.55067 9.34646 6.37745 9.41458C6.22784 9.47341 6.1623 9.51712 6.14023 9.53254C6.09752 9.63631 6.04409 9.83055 5.99562 10.1214C5.96201 10.3231 5.93498 10.5439 5.91341 10.7683H6.43283ZM10.0033 9.22664L9.31982 7.35469C9.50338 7.41679 9.75206 7.47696 10.076 7.55505C10.4238 7.63889 10.8523 7.74249 11.2221 7.88788C11.5517 8.01751 12.0594 8.2615 12.3091 8.76102C12.4693 9.08135 12.5615 9.49063 12.6217 9.85171C12.6713 10.1494 12.707 10.4663 12.733 10.7683H13.38C13.7424 10.7683 14.0362 11.0622 14.0362 11.4245V13.5982C14.0362 13.9606 13.7424 14.2544 13.38 14.2544H10.1811C9.81867 14.2544 9.52488 13.9606 9.52488 13.5982V11.4245C9.52488 11.0622 9.81867 10.7683 10.1811 10.7683H10.5663L10.0033 9.22664ZM10.0033 9.22664L10.5663 10.7683H11.0857C11.0642 10.5439 11.0372 10.3231 11.0035 10.1214C10.9551 9.83055 10.9016 9.63631 10.8589 9.53254C10.8369 9.51712 10.7713 9.47341 10.6217 9.41458C10.4485 9.34646 10.2407 9.28705 10.0033 9.22664Z",fill:"currentColor"})}),Ubt=e=>h.jsxs("svg",{width:"126",height:"85",viewBox:"0 0 126 85",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[h.jsx("path",{d:"M119.322 35.1636C119.322 50.3595 94.1055 62.6782 62.9998 62.6782C31.894 62.6782 6.67773 50.3595 6.67773 35.1636V49.8363C6.67773 65.0322 31.894 77.351 62.9998 77.351C94.1055 77.351 119.322 65.0322 119.322 49.8363V35.1636Z",fill:"#2E2E2E",fillOpacity:"0.9"}),h.jsx("path",{d:"M119.322 35.1636C119.322 50.3595 94.1055 62.6782 62.9998 62.6782C31.894 62.6782 6.67773 50.3595 6.67773 35.1636M119.322 35.1636C119.322 19.9677 94.1055 7.64893 62.9998 7.64893C31.894 7.64893 6.67773 19.9677 6.67773 35.1636M119.322 35.1636V49.8363C119.322 65.0322 94.1055 77.351 62.9998 77.351C31.894 77.351 6.67773 65.0322 6.67773 49.8363V35.1636",stroke:"#424242"}),h.jsx("path",{d:"M63.0002 0.968262C28.5152 0.968262 0.55957 15.6484 0.55957 33.7573V51.2428C0.55957 69.3517 28.5152 84.0319 63.0002 84.0319C97.4853 84.0319 125.441 69.3517 125.441 51.2428V33.7573C125.441 15.6484 97.4853 0.968262 63.0002 0.968262Z",stroke:"#707070"}),h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M74.9374 21.357C76.2127 20.7291 78.2804 20.7291 79.5557 21.357L90.8129 26.8997C92.0882 27.5276 92.0882 28.5458 90.8129 29.1737L83.1638 32.9399C81.8885 33.5678 79.8207 33.5678 78.5454 32.9399L75.8033 31.5898L68.3324 35.2682L64.1502 39.696C63.8908 39.481 63.6138 39.2568 63.3231 39.0227L63.1495 38.883C62.2893 38.1914 61.2677 37.3701 60.6254 36.6376C60.5446 36.5456 60.4618 36.4463 60.3812 36.3407C60.1669 36.3011 59.9652 36.2603 59.7782 36.2205C58.2906 35.9043 56.6225 35.4013 55.2179 34.9777L54.9342 34.8922C54.4589 34.7491 54.0034 34.6127 53.5666 34.4849L62.5594 32.4258L70.0304 28.7473L67.2882 27.3972C66.0129 26.7692 66.0129 25.7512 67.2882 25.1232L74.9374 21.357ZM53.5666 34.4849C53.5666 34.4849 53.5666 34.4849 53.5666 34.4849L46.1603 36.1808L47.516 36.8483C48.7913 37.4762 48.7912 38.4943 47.516 39.1222L39.8668 42.8884C38.5916 43.5163 36.5238 43.5164 35.2485 42.8884L23.9913 37.3457C22.7159 36.7177 22.716 35.6996 23.9913 35.0717L31.6404 31.3055C32.9156 30.6776 34.9834 30.6776 36.2587 31.3055L38.5358 32.4267C39.6899 31.9483 40.9309 31.4611 42.153 31.0313C43.6354 30.5099 45.4001 29.9605 47.091 29.683C49.7278 29.2502 52.3729 29.7072 53.9892 30.0537C55.8019 30.4425 57.6745 31.0055 59.1934 31.4628C60.6081 31.8887 61.6949 32.2154 62.5594 32.4258L53.5666 34.4849ZM46.1603 36.1808L53.5666 34.4849C52.5189 34.1784 51.5786 33.9213 50.7293 33.7392C49.9958 33.5819 49.6114 33.5441 49.4794 33.5326C48.964 33.6384 48.0924 33.8823 46.8983 34.3023C46.0703 34.5936 45.1981 34.9293 44.3325 35.2808L46.1603 36.1808ZM64.1502 39.696L68.3324 35.2682C68.7598 35.6939 69.4232 36.229 70.2883 36.9256C71.2171 37.6735 72.3605 38.5954 73.15 39.488C73.8539 40.2838 74.7818 41.5862 73.9029 42.8844C73.3394 43.717 72.2235 44.5859 71.1648 45.3159C70.2916 45.9175 69.3021 46.5286 68.3305 47.0968L70.6077 48.218C71.8829 48.8459 71.8829 49.864 70.6077 50.4919L62.9585 54.2582C61.6833 54.8861 59.6154 54.8861 58.3402 54.2582L47.083 48.7154C45.8077 48.0875 45.8077 47.0694 47.083 46.4415L54.7321 42.6752C56.0074 42.0474 58.0751 42.0473 59.3505 42.6752L60.7062 43.3428L64.1502 39.696ZM64.1502 39.696L60.7062 43.3428L62.5339 44.2427C63.2478 43.8165 63.9298 43.3871 64.5213 42.9794C65.3742 42.3914 65.8695 41.9622 66.0846 41.7085C66.0613 41.6436 65.9844 41.4543 65.6649 41.0931C65.295 40.6749 64.773 40.212 64.1502 39.696Z",fill:"#A9A9A9"})]}),Wbt=e=>h.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[h.jsx("path",{d:"M2.0625 5.99976C2.0625 3.82513 3.82538 2.06226 6 2.06226C6.58712 2.06226 7.14423 2.19076 7.64473 2.42117V1.21042C7.12905 1.03337 6.57575 0.937256 6 0.937256C3.20406 0.937256 0.9375 3.20381 0.9375 5.99976C0.9375 8.7957 3.20406 11.0623 6 11.0623C8.79594 11.0623 11.0625 8.7957 11.0625 5.99976H9.9375C9.9375 8.17438 8.17462 9.93726 6 9.93726C3.82538 9.93726 2.0625 8.17438 2.0625 5.99976Z",fill:"currentColor"}),h.jsx("path",{d:"M9.28577 4.3986C9.08709 4.3986 8.92603 4.23753 8.92603 4.03885V0.978563C8.92603 0.681899 9.16652 0.441406 9.46318 0.441406C9.75985 0.441406 10.0003 0.6819 10.0003 0.978564V3.25858C10.0003 3.33638 10.0634 3.39944 10.1412 3.39944H11.2091C11.485 3.39944 11.7087 3.62311 11.7087 3.89902C11.7087 4.17493 11.485 4.3986 11.2091 4.3986H9.28577Z",fill:"currentColor"}),h.jsx("path",{d:"M6.57568 3.69244C6.57568 3.38178 6.32384 3.12994 6.01318 3.12994C5.70252 3.12994 5.45068 3.38178 5.45068 3.69244V6.22272L6.7242 7.88675C6.91301 8.13346 7.26606 8.18039 7.51276 7.99159C7.75946 7.80278 7.8064 7.44973 7.61759 7.20303L6.57568 5.84162V3.69244Z",fill:"currentColor"})]}),T4=e=>h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[h.jsx("path",{d:"M6.53918 9.32122C6.34324 9.51508 6.02724 9.51338 5.83338 9.31744C5.63952 9.1215 5.6412 8.80551 5.83713 8.61164L10.1958 4.29931C10.7996 3.70186 10.8017 2.72852 10.2041 2.12839L10.1899 2.11428C9.58767 1.52481 8.62251 1.53208 8.0292 2.13052L2.29396 7.91536C2.0999 8.1111 1.78388 8.11246 1.58813 7.9184C1.39239 7.72433 1.39103 7.40831 1.58509 7.21257L7.32036 1.42774C8.30005 0.439581 9.89369 0.427613 10.8881 1.40094L10.9116 1.42425C11.4942 2.00929 11.7316 2.80913 11.6232 3.56922C12.389 3.44866 13.1999 3.67918 13.7961 4.26273C14.804 5.24929 14.8147 6.86824 13.82 7.86808L8.5531 13.1619C8.50045 13.2148 8.50024 13.3002 8.55263 13.3534L9.65448 14.4717C9.84794 14.668 9.8456 14.984 9.64925 15.1775C9.45291 15.3709 9.13691 15.3686 8.94345 15.1723L7.84163 14.054C7.40505 13.6109 7.40677 12.8988 7.8455 12.4579L13.1124 7.16405C13.7161 6.55727 13.7095 5.57478 13.0979 4.97606C12.4925 4.38347 11.4942 4.40725 10.8978 5.00886L6.53918 9.32122Z",fill:"currentColor"}),h.jsx("path",{d:"M8.84622 2.75411C9.04697 2.56188 9.36555 2.56381 9.56395 2.76076C9.76234 2.95771 9.76658 3.27625 9.57582 3.4784L9.56661 3.48794L5.25912 7.82701C4.67023 8.42022 4.672 9.37798 5.26305 9.96904C5.85624 10.5622 6.81818 10.5615 7.41052 9.9675L11.6299 5.73599L11.6395 5.72671C11.8406 5.53493 12.1592 5.53756 12.3572 5.73496C12.5583 5.93548 12.5587 6.26104 12.3582 6.46214L8.13877 10.6937C7.14498 11.6903 5.53105 11.6915 4.53584 10.6963C3.5442 9.70461 3.54127 8.09774 4.52928 7.10248L8.83677 2.76342L8.84622 2.75411Z",fill:"currentColor"})]}),qbt=e=>h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:h.jsx("path",{d:"M1.5 8.5V8C1.5 7.60218 1.65804 7.22064 1.93934 6.93934C2.22064 6.65804 2.60218 6.5 3 6.5H13C13.3978 6.5 13.7794 6.65804 14.0607 6.93934C14.342 7.22064 14.5 7.60218 14.5 8V8.5M8.70667 4.20667L7.29333 2.79333C7.20048 2.70037 7.09022 2.62661 6.96886 2.57628C6.84749 2.52595 6.71739 2.50003 6.586 2.5H3C2.60218 2.5 2.22064 2.65804 1.93934 2.93934C1.65804 3.22064 1.5 3.60218 1.5 4V12C1.5 12.3978 1.65804 12.7794 1.93934 13.0607C2.22064 13.342 2.60218 13.5 3 13.5H13C13.3978 13.5 13.7794 13.342 14.0607 13.0607C14.342 12.7794 14.5 12.3978 14.5 12V6C14.5 5.60218 14.342 5.22064 14.0607 4.93934C13.7794 4.65804 13.3978 4.5 13 4.5H9.414C9.14887 4.49977 8.89402 4.39426 8.70667 4.20667Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})}),Gbt=e=>h.jsxs("svg",{width:"126",height:"85",viewBox:"0 0 126 85",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[h.jsx("path",{d:"M119.322 35.1641C119.322 50.36 94.1055 62.6787 62.9998 62.6787C31.894 62.6787 6.67773 50.36 6.67773 35.1641V49.8368C6.67773 65.0327 31.894 77.3514 62.9998 77.3514C94.1055 77.3514 119.322 65.0327 119.322 49.8368V35.1641Z",fill:"#2E2E2E",fillOpacity:"0.9"}),h.jsx("path",{d:"M119.322 35.1641C119.322 50.36 94.1055 62.6787 62.9998 62.6787C31.894 62.6787 6.67773 50.36 6.67773 35.1641M119.322 35.1641C119.322 19.9681 94.1055 7.64941 62.9998 7.64941C31.894 7.64941 6.67773 19.9681 6.67773 35.1641M119.322 35.1641V49.8368C119.322 65.0327 94.1055 77.3514 62.9998 77.3514C31.894 77.3514 6.67773 65.0327 6.67773 49.8368V35.1641",stroke:"#424242"}),h.jsx("path",{d:"M63.0002 0.96875C28.5152 0.96875 0.55957 15.6489 0.55957 33.7578V51.2433C0.55957 69.3522 28.5152 84.0323 63.0002 84.0323C97.4853 84.0323 125.441 69.3522 125.441 51.2433V33.7578C125.441 15.6489 97.4853 0.96875 63.0002 0.96875Z",stroke:"#707070"}),h.jsx("path",{d:"M51.5215 39.9726C50.5464 40.4477 48.9738 40.4435 48.009 39.9634C47.0442 39.4833 47.0526 38.709 48.0277 38.2339L69.7191 27.6672C72.7243 26.2032 72.7347 23.8181 69.7605 22.3476L69.6898 22.313C66.6927 20.8686 61.8895 20.8864 58.9368 22.3528L30.3946 36.5278C29.4288 37.0074 27.8561 37.0107 26.882 36.5352C25.9078 36.0597 25.901 35.2853 26.8668 34.8057L55.4092 20.6308C60.2847 18.2094 68.2157 18.1801 73.1645 20.5651L73.2814 20.6222C76.1808 22.0558 77.3624 24.0157 76.8227 25.8782C80.6339 25.5828 84.6694 26.1476 87.6364 27.5775C92.6525 29.9949 92.7059 33.962 87.7554 36.4119L61.5441 49.3836C61.282 49.5133 61.281 49.7227 61.5417 49.853L67.0252 52.5932C67.988 53.0743 67.9763 53.8486 66.9992 54.3226C66.0221 54.7966 64.4495 54.7909 63.4867 54.3098L58.0033 51.5695C55.8306 50.4838 55.8392 48.7391 58.0226 47.6585L84.2339 34.6868C87.2382 33.2 87.2058 30.7925 84.1617 29.3254C81.1488 27.8734 76.1811 27.9317 73.2127 29.4058L51.5215 39.9726Z",fill:"#A9A9A9"}),h.jsx("path",{d:"M63.0028 23.8809C64.0019 23.4098 65.5873 23.4146 66.5747 23.8972C67.562 24.3798 67.5831 25.1603 66.6338 25.6556L66.5879 25.679L45.1511 36.3113C42.2204 37.7649 42.2292 40.1117 45.1707 41.56C48.1228 43.0135 52.91 43.0118 55.8578 41.5563L76.8564 31.1875L76.9037 31.1648C77.9049 30.6949 79.4903 30.7013 80.4755 31.185C81.4763 31.6764 81.4785 32.4741 80.4806 32.9669L59.4821 43.3356C54.5363 45.7777 46.5044 45.7806 41.5516 43.342C36.6166 40.9121 36.602 36.9747 41.519 34.5359L62.9558 23.9037L63.0028 23.8809Z",fill:"#A9A9A9"})]}),Ybt=e=>h.jsxs("svg",{width:"126",height:"85",viewBox:"0 0 126 85",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[h.jsx("path",{d:"M119.322 35.1641C119.322 50.36 94.1055 62.6787 62.9998 62.6787C31.894 62.6787 6.67773 50.36 6.67773 35.1641V49.8368C6.67773 65.0327 31.894 77.3514 62.9998 77.3514C94.1055 77.3514 119.322 65.0327 119.322 49.8368V35.1641Z",fill:"#2E2E2E",fillOpacity:"0.9"}),h.jsx("path",{d:"M119.322 35.1641C119.322 50.36 94.1055 62.6787 62.9998 62.6787C31.894 62.6787 6.67773 50.36 6.67773 35.1641M119.322 35.1641C119.322 19.9681 94.1055 7.64941 62.9998 7.64941C31.894 7.64941 6.67773 19.9681 6.67773 35.1641M119.322 35.1641V49.8368C119.322 65.0327 94.1055 77.3514 62.9998 77.3514C31.894 77.3514 6.67773 65.0327 6.67773 49.8368V35.1641",stroke:"#424242"}),h.jsx("path",{d:"M63.0002 0.96875C28.5152 0.96875 0.55957 15.6489 0.55957 33.7578V51.2433C0.55957 69.3522 28.5152 84.0323 63.0002 84.0323C97.4853 84.0323 125.441 69.3522 125.441 51.2433V33.7578C125.441 15.6489 97.4853 0.96875 63.0002 0.96875Z",stroke:"#707070"}),h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M95.8997 32.6647C98.4806 33.9355 98.4744 36.0012 95.8997 37.2689L89.6657 40.3384C87.0848 41.6091 82.8892 41.6061 80.3146 40.3384L74.0805 37.2689C71.4996 35.9981 71.5059 33.9324 74.0805 32.6647L80.3146 29.5952C82.8955 28.3244 87.091 28.3275 89.6657 29.5952L95.8997 32.6647ZM74.0805 21.9215C76.6614 23.1923 76.6552 25.258 74.0805 26.5257L67.8465 29.5952C65.2656 30.866 61.0701 30.8629 58.4954 29.5952L52.2613 26.5257C49.6804 25.255 49.6867 23.1892 52.2613 21.9215L58.4954 18.852C61.0763 17.5813 65.2718 17.5843 67.8465 18.852L74.0805 21.9215ZM74.0805 43.4079C76.6614 44.6786 76.6552 46.7444 74.0805 48.0121L67.8465 51.0816C65.2656 52.3523 61.0701 52.3493 58.4954 51.0816L52.2613 48.0121C49.6804 46.7413 49.6867 44.6756 52.2613 43.4079L58.4954 40.3384C61.0763 39.0676 65.2718 39.0707 67.8465 40.3384L74.0805 43.4079ZM52.2613 32.6647C54.8422 33.9355 54.836 36.0012 52.2613 37.2689L46.0273 40.3384C43.4464 41.6091 39.2509 41.6061 36.6762 40.3384L30.4422 37.2689C27.8613 35.9981 27.8675 33.9324 30.4422 32.6647L36.6762 29.5952C39.2571 28.3244 43.4526 28.3275 46.0273 29.5952L52.2613 32.6647Z",fill:"#A9A9A9"})]}),Kbt=e=>h.jsxs("svg",{width:"126",height:"85",viewBox:"0 0 126 85",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[h.jsx("path",{d:"M119.322 35.1641C119.322 50.36 94.1055 62.6787 62.9998 62.6787C31.894 62.6787 6.67773 50.36 6.67773 35.1641V49.8368C6.67773 65.0327 31.894 77.3514 62.9998 77.3514C94.1055 77.3514 119.322 65.0327 119.322 49.8368V35.1641Z",fill:"#2E2E2E",fillOpacity:"0.9"}),h.jsx("path",{d:"M119.322 35.1641C119.322 50.36 94.1055 62.6787 62.9998 62.6787C31.894 62.6787 6.67773 50.36 6.67773 35.1641M119.322 35.1641C119.322 19.9681 94.1055 7.64941 62.9998 7.64941C31.894 7.64941 6.67773 19.9681 6.67773 35.1641M119.322 35.1641V49.8368C119.322 65.0327 94.1055 77.3514 62.9998 77.3514C31.894 77.3514 6.67773 65.0327 6.67773 49.8368V35.1641",stroke:"#424242"}),h.jsx("path",{d:"M63.0002 0.96875C28.5152 0.96875 0.55957 15.6489 0.55957 33.7578V51.2433C0.55957 69.3522 28.5152 84.0323 63.0002 84.0323C97.4853 84.0323 125.441 69.3522 125.441 51.2433V33.7578C125.441 15.6489 97.4853 0.96875 63.0002 0.96875Z",stroke:"#707070"}),h.jsx("g",{clipPath:"url(#clip0_23333_14744)",children:h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M79.2946 17.9539C83.0143 19.7854 83.016 22.7559 79.2979 24.5879C77.0214 25.7087 73.8794 26.1385 70.9301 25.8878L67.5296 30.2202C68.0944 30.3987 68.6321 30.6075 69.1262 30.8507C71.0847 31.815 72.0009 33.0948 71.8979 34.3581L77.2504 35.1977C77.6452 34.8727 78.1174 34.5635 78.6856 34.2835C82.4066 32.4514 88.4403 32.4485 92.1623 34.2803C95.8842 36.1128 95.8805 39.0851 92.159 40.9175C88.4373 42.7488 82.4002 42.7513 78.679 40.9191C76.7415 39.9647 75.8248 38.7009 75.9073 37.4506L70.5219 36.6045C70.1354 36.9168 69.6777 37.2145 69.1295 37.4846C68.345 37.8708 67.4527 38.1705 66.5059 38.3939L67.9312 41.984C70.1507 42.0573 72.3276 42.5087 74.0244 43.3438C77.7444 45.1754 77.7467 48.1458 74.0277 49.9778C70.3071 51.8092 64.2712 51.8095 60.551 49.9778C56.8323 48.1459 56.8351 45.1755 60.5543 43.3438C61.3581 42.9482 62.2741 42.6414 63.247 42.4167L61.8282 38.8428C59.5803 38.7777 57.3696 38.3299 55.6527 37.4846C54.1264 36.7327 53.2395 35.7882 52.9666 34.8103L43.924 34.0469C43.4596 34.6259 42.7547 35.1702 41.8041 35.6385C38.0834 37.4696 32.0473 37.4701 28.3273 35.6385C24.6089 33.8068 24.6123 30.8363 28.3306 29.0046C32.0508 27.1737 38.0806 27.1737 41.8008 29.0046C43.3459 29.7653 44.2412 30.7224 44.5033 31.7129L53.5098 32.4747C53.9742 31.8832 54.6868 31.3279 55.656 30.8507C57.6687 29.8601 60.357 29.4079 62.9902 29.4892L66.5783 24.9218C66.3174 24.8179 66.0637 24.7073 65.8212 24.5879C62.1022 22.7559 62.1045 19.7856 65.8245 17.9539C69.5447 16.1235 75.5747 16.1232 79.2946 17.9539ZM38.4299 30.6643C36.5715 29.75 33.5599 29.75 31.7015 30.6643C29.8447 31.5793 29.8414 33.0638 31.6982 33.9788C33.5565 34.8938 36.5742 34.8933 38.4332 33.9788C40.2906 33.0635 40.2883 31.5793 38.4299 30.6643ZM70.6536 45.0035C68.7951 44.0893 65.7836 44.0893 63.9251 45.0035C62.0676 45.9185 62.0647 47.4029 63.9218 48.318C65.7804 49.2332 68.7979 49.2329 70.6569 48.3181C72.5142 47.4027 72.5119 45.9185 70.6536 45.0035ZM65.7553 32.5104C63.8969 31.5961 60.8853 31.5961 59.0269 32.5104C57.1685 33.4254 57.1662 34.9096 59.0236 35.8249C60.8824 36.7402 63.8998 36.7402 65.7586 35.8249C67.616 34.9096 67.6137 33.4254 65.7553 32.5104ZM88.7915 35.94C86.9338 35.0261 83.9184 35.0264 82.0564 35.9432C80.1965 36.8601 80.1945 38.3451 82.0498 39.2594C83.9067 40.1736 86.9255 40.1738 88.7882 39.2578C90.6507 38.3407 90.649 36.8546 88.7915 35.94ZM75.9238 19.6136C74.0656 18.6995 71.0538 18.6998 69.1953 19.6136C67.3369 20.5286 67.3347 22.0129 69.192 22.9282C71.0509 23.8434 74.0682 23.8434 75.9271 22.9282C77.7836 22.0128 77.7818 20.5285 75.9238 19.6136Z",fill:"#A9A9A9"})}),h.jsx("defs",{children:h.jsx("clipPath",{id:"clip0_23333_14744",children:h.jsx("rect",{width:"59.3185",height:"59.3185",fill:"white",transform:"matrix(0.897148 0.441731 -0.897148 0.441731 65.3042 6.51953)"})})})]});function IC({text:e,copyMessage:t="Copied to clipboard!"}){const[n,r]=A.useState(!1),s=A.useRef(null),i=A.useCallback(()=>{navigator.clipboard.writeText(e).then(()=>{Fo.success(t),r(!0),s.current&&(clearTimeout(s.current),s.current=null),s.current=setTimeout(()=>{r(!1)},2e3)}).catch(()=>{Fo.error("Failed to copy to clipboard.")})},[e,t]);return{isCopied:n,handleCopy:i}}function dg({content:e,copyMessage:t,className:n}){const{isCopied:r,handleCopy:s}=IC({text:e,copyMessage:t});return h.jsxs(Js,{variant:"ghost",size:"icon",className:Ve("relative h-6 w-6",n),"aria-label":"Copy to clipboard",onClick:s,children:[h.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:h.jsx(kh,{className:Ve("h-4 w-4 transition-transform ease-in-out",r?"scale-100":"scale-0")})}),h.jsx(Dh,{className:Ve("h-4 w-4 transition-transform ease-in-out",r?"scale-0":"scale-100")})]})}const i0e=()=>A.useMemo(()=>NT({settings:{fontFamily:"var(--geist-mono)",fontSize:"0.8rem",lineHighlight:"transparent",gutterBackground:"transparent",background:"transparent",gutterForeground:"#939393"},styles:[{tag:[Ce.className,Ce.propertyName]}]}),[]),Uj=({data:e,className:t})=>{const n=JSON.stringify(e,null,2),r=i0e();return h.jsxs("div",{className:zn("rounded-md bg-surface4 p-1 font-mono relative",t),children:[h.jsx(dg,{content:n,className:"absolute top-2 right-2"}),h.jsx(al,{value:n,theme:r,extensions:[Fu]})]})};async function Xbt(e,t){const{codeToTokens:n,bundledLanguages:r}=await ooe(async()=>{const{codeToTokens:i,bundledLanguages:o}=await import("./index-B_Qdb7Wa.js");return{codeToTokens:i,bundledLanguages:o}},[]);if(!(t in r))return null;const{tokens:s}=await n(e,{lang:t,defaultColor:!1,themes:{light:"github-light",dark:"github-dark"}});return s}const o0e=({toolName:e,argsText:t,result:n})=>{const[r,s]=A.useState(!0);let i;try{const o=JSON.parse(t);i=h.jsx(Uj,{data:o})}catch{i=h.jsx("pre",{className:"whitespace-pre-wrap",children:t})}return h.jsxs("div",{className:"mb-2",children:[h.jsxs("button",{onClick:()=>s(o=>!o),className:"flex items-center gap-2",children:[h.jsx(ot,{children:h.jsx(lC,{className:Ve("transition-all",r?"rotate-90":"rotate-180")})}),h.jsx(Un,{icon:h.jsx(gl,{className:"text-[#ECB047]"}),children:e})]}),!r&&h.jsx("div",{className:"pt-2",children:h.jsxs("div",{className:"border-sm border-border1 rounded-lg bg-surface4",children:[h.jsxs("div",{className:"px-4 border-b-sm border-border1 py-2",children:[h.jsx("p",{className:"font-medium pb-2",children:"Tool arguments"}),i]}),n!==void 0&&h.jsxs("div",{className:"px-4 py-2",children:[h.jsx("p",{className:"font-medium pb-2",children:"Tool result"}),typeof n=="string"?h.jsx("pre",{className:"whitespace-pre-wrap",children:n}):h.jsx(Uj,{data:n})]})]})})]})},Jbt=({text:e})=>{const[t,n]=A.useState(!1);return h.jsxs("div",{className:"mb-2 space-y-2",children:[h.jsxs("button",{onClick:()=>n(r=>!r),className:"flex items-center gap-2",children:[h.jsx(ot,{children:h.jsx(lC,{className:Ve("transition-all",t?"rotate-90":"rotate-180")})}),h.jsxs(Un,{icon:h.jsx(xle,{}),children:[t?"Show":"Hide"," reasoning"]})]}),t?null:h.jsx("div",{className:"rounded-lg bg-surface4 p-2 border-sm border-border-1",children:h.jsx("pre",{className:"whitespace-pre-wrap text-ui-sm leading-ui-sm text-icon6",children:e})})]})},Zbt=({ToolFallback:e})=>{const n=Ch().content.every(({type:r})=>r==="tool-call"||r==="reasoning");return h.jsxs(fT,{className:"max-w-full",children:[h.jsx("div",{className:"text-icon6 text-ui-lg leading-ui-lg",children:h.jsx(pT,{components:{Text:t0e,tools:{Fallback:e||o0e},Reasoning:Jbt}})}),!n&&h.jsx("div",{className:"h-6 pt-1",children:h.jsx(Qbt,{})})]})},Qbt=()=>h.jsx(KO,{hideWhenRunning:!0,autohide:"always",autohideFloat:"single-branch",className:"flex gap-1 items-center transition-all relative",children:h.jsx(XO,{asChild:!0,children:h.jsxs(Na,{tooltip:"Copy",className:"bg-transparent text-icon3 hover:text-icon6",children:[h.jsx(Gw,{copied:!0,children:h.jsx(kh,{})}),h.jsx(Gw,{copied:!1,children:h.jsx(Dh,{})})]})})}),e1t=e=>{const[t,n]=A.useState(void 0);return A.useEffect(()=>{if(!e){n(void 0);return}const r=URL.createObjectURL(e);return n(r),()=>{URL.revokeObjectURL(r)}},[e]),t},a0e=()=>{const{file:e,src:t}=G0(EBe(n=>{var s,i;if(n.type!=="image")return{};if(n.file)return{file:n.file};const r=(i=(s=n.content)==null?void 0:s.filter(o=>o.type==="image")[0])==null?void 0:i.image;return r?{src:r}:{}}));return e1t(e)??t},No=qA,OC=GA,l0e=A.forwardRef(({className:e,...t},n)=>h.jsx(ty,{ref:n,className:Ve("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));l0e.displayName=ty.displayName;const Zi=A.forwardRef(({className:e,children:t,...n},r)=>h.jsxs(OC,{children:[h.jsx(l0e,{}),h.jsxs(ny,{ref:r,className:Ve("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,h.jsxs(XS,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[h.jsx($b,{className:"h-4 w-4"}),h.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Zi.displayName=ny.displayName;const Qi=A.forwardRef(({className:e,...t},n)=>h.jsx(ry,{ref:n,className:zn("text-lg font-semibold leading-none tracking-tight",e),...t}));Qi.displayName=ry.displayName;const t1t=A.forwardRef(({className:e,...t},n)=>h.jsx(sy,{ref:n,className:Ve("text-sm text-muted-foreground",e),...t}));t1t.displayName=sy.displayName;const c0e=({data:e})=>{const[t,n]=A.useState(!1);return h.jsxs(h.Fragment,{children:[h.jsx("button",{onClick:()=>n(!0),className:"h-full w-full flex items-center justify-center",type:"button",children:h.jsx(Cle,{className:"text-accent2"})}),h.jsx(n1t,{data:e,open:t,onOpenChange:n})]})},n1t=({data:e,open:t,onOpenChange:n})=>h.jsx(No,{open:t,onOpenChange:n,children:h.jsx(Zi,{className:"max-w-4xl bg-surface2",children:h.jsxs("div",{className:"h-full w-full",children:[h.jsx(Qi,{className:"pb-4",children:"PDF preview"}),t&&h.jsx("iframe",{src:e,width:"100%",height:"600px"})]})})}),u0e=({src:e})=>{const[t,n]=A.useState(!1);return h.jsxs(h.Fragment,{children:[h.jsx("button",{onClick:()=>n(!0),type:"button",className:"h-full w-full flex items-center justify-center",children:h.jsx("img",{src:e,className:"object-cover aspect-ratio max-h-[140px] max-w-[320px]",alt:"Preview"})}),h.jsx(r1t,{src:e,open:t,onOpenChange:n})]})},r1t=({src:e,open:t,onOpenChange:n})=>h.jsx(No,{open:t,onOpenChange:n,children:h.jsx(Zi,{className:"max-w-4xl bg-surface2",children:h.jsxs("div",{className:"h-full w-full",children:[h.jsx(Qi,{className:"pb-4",children:"Image preview"}),t&&h.jsx("img",{src:e,alt:"Image"})]})})}),d0e=({data:e})=>{const[t,n]=A.useState(!1),r=e.replace(/<attachment[^>]*>/,"").replace(/<\/attachment>/g,"");return h.jsxs(h.Fragment,{children:[h.jsx("button",{onClick:()=>n(!0),className:"h-full w-full flex items-center justify-center",type:"button",children:h.jsx(Cle,{className:"text-icon3"})}),h.jsx(s1t,{data:r,open:t,onOpenChange:n})]})},s1t=({data:e,open:t,onOpenChange:n})=>h.jsx(No,{open:t,onOpenChange:n,children:h.jsx(Zi,{className:"max-w-4xl bg-surface2 h-[80vh] overflow-y-auto",children:h.jsxs("div",{className:"h-full w-full",children:[h.jsx(Qi,{className:"pb-4",children:"Text preview"}),t&&h.jsx("div",{className:"whitespace-pre-wrap",children:e})]})})}),i1t=()=>h.jsx(ZO,{className:"pt-4",children:h.jsx("div",{className:"max-w-[366px] px-5 py-3 text-icon6 text-ui-lg leading-ui-lg rounded-lg bg-surface3",children:h.jsx(o1t,{})})}),o1t=()=>{var n,r,s,i;const e=a0e(),t=G0(o=>o);if(t.type==="image")return h.jsx(sb,{type:"image",contentType:void 0,nameSlot:h.jsx(rw,{}),src:e,data:void 0});if(t.contentType==="application/pdf"){const o=(r=(n=t.content)==null?void 0:n[0])==null?void 0:r.text;return h.jsx(sb,{type:"document",contentType:t.contentType,nameSlot:h.jsx(rw,{}),src:e,data:`data:application/pdf;base64,${o}`})}return h.jsx(sb,{type:t.type,contentType:t.contentType,nameSlot:h.jsx(rw,{}),src:e,data:(i=(s=t.content)==null?void 0:s[0])==null?void 0:i.text})},sb=({type:e,contentType:t,nameSlot:n,src:r,data:s})=>h.jsx(tT,{children:h.jsxs(Ta,{children:[h.jsx(_a,{asChild:!0,children:h.jsx("div",{className:"h-full w-full overflow-hidden rounded-lg",children:e==="image"?h.jsx(u0e,{src:r??""}):e==="document"&&t==="application/pdf"?h.jsx(c0e,{data:s??""}):h.jsx(d0e,{data:s??""})})}),h.jsx(Vo,{side:"top",children:n})]})}),a1t=()=>h.jsx(Zae,{components:{Attachment:i1t}}),h0e=()=>h.jsxs(fT,{className:"w-full flex items-end pb-4 flex-col",children:[h.jsx("div",{className:"max-w-[366px] px-5 py-3 text-icon6 text-ui-lg leading-ui-lg rounded-lg bg-surface3",children:h.jsx(pT,{components:{File:e=>h.jsx(sb,{type:"document",contentType:e.mimeType,nameSlot:"Unknown filename",src:void 0,data:e.image}),Image:e=>h.jsx(sb,{type:"image",nameSlot:"Unknown filename",src:e.image}),Text:e=>e.text.includes("<attachment name=")?h.jsx(sb,{type:"document",contentType:"text/plain",nameSlot:"Unknown filename",src:void 0,data:e.text}):e.text}})}),h.jsx(a1t,{})]}),vB=(e,{enabled:t=!0})=>{const n=A.useRef(t);Se.useEffect(()=>{if(!t||!(e!=null&&e.current))return;const r=e.current,s=new MutationObserver(()=>{n.current&&r.scrollTo({top:r.scrollHeight,behavior:"smooth"})});s.observe(r,{childList:!0,subtree:!0,characterData:!0});const i=o=>{const a=o.target,l=a.scrollTop+a.clientHeight,c=a.scrollHeight;l>=c-1?n.current=!0:n.current=!1};return r.addEventListener("scroll",i),()=>{r.removeEventListener("scroll",i),s.disconnect()}},[t,e])},l1t={"header-md":"text-header-md leading-header-md","ui-lg":"text-ui-lg leading-ui-lg","ui-md":"text-ui-md leading-ui-md","ui-sm":"text-ui-sm leading-ui-sm","ui-xs":"text-ui-xs leading-ui-xs"},c1t={mono:"font-mono"},Ue=({as:e="p",className:t,variant:n="ui-md",font:r,...s})=>h.jsx(e,{className:zn(l1t[n],r&&c1t[r],t),...s}),f0e=({language:e="en-US"}={})=>{const t=A.useRef(null),[n,r]=A.useState({isListening:!1,transcript:"",error:null}),s=()=>{t.current&&t.current.start()},i=()=>{t.current&&t.current.stop()};return A.useEffect(()=>{if(!("webkitSpeechRecognition"in window)&&!("SpeechRecognition"in window)){r(l=>({...l,error:"Speech Recognition not supported in this browser"}));return}const o=window.SpeechRecognition||window.webkitSpeechRecognition,a=new o;t.current=a,a.continuous=!0,a.lang=e,a.onstart=()=>{r(l=>({...l,isListening:!0}))},a.onresult=l=>{let c="";for(let u=l.resultIndex;u<l.results.length;u++){const d=l.results[u][0].transcript;l.results[u].isFinal&&(c+=d+" ")}r(u=>({...u,transcript:c}))},a.onerror=l=>{r(c=>({...c,error:`Error: ${l.error}`}))},a.onend=()=>r(l=>({...l,isListening:!1}))},[e]),{...n,start:s,stop:i}},p0e=()=>{const e=Hu(),[t,n]=A.useState(!1);return A.useEffect(()=>{e.subscribe(()=>{const r=e.getState().attachments;n(r.length>0)})},[e]),t};function Y1({color:e="#fff",className:t}){return h.jsx("svg",{className:Ve("animate-spin duration-700",t),xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:h.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56",stroke:e})})}const u1t=e=>{const[t,n]=A.useState({isLoading:!1,text:""});return A.useEffect(()=>{if(!e)return;(async()=>{n(i=>({...i,isLoading:!0}));const s=await e.text();n(i=>({...i,isLoading:!1,text:s}))})()},[e]),t},m0e=async e=>new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{const s=r.result;typeof s=="string"?t(s):n(new Error("Failed to convert file to base64."))},r.onerror=s=>{n(s)},r.readAsDataURL(e)}),d1t=({document:e})=>{const{isLoading:t,text:n}=u1t(e.file);return h.jsx("div",{className:"flex items-center justify-center h-full w-full",children:t?h.jsx(Y1,{className:"animate-spin"}):h.jsx(d0e,{data:n})})},h1t=({document:e})=>{const[t,n]=A.useState({isLoading:!1,text:""});return A.useEffect(()=>{let r=!1;return(async()=>{if(!e.file)return;n(o=>({...o,isLoading:!0}));const i=await m0e(e.file);r||n(o=>({...o,isLoading:!1,text:i}))})(),()=>{r=!0}},[e]),h.jsx("div",{className:"flex items-center justify-center h-full w-full",children:t.isLoading?h.jsx(Y1,{className:"animate-spin"}):h.jsx(c0e,{data:t.text})})},f1t=()=>{const e=G0(s=>s.type==="image"),t=G0(s=>s.type==="document"?s:void 0),n=a0e(),r=G0(s=>s.source!=="message");return h.jsx(h.Fragment,{children:h.jsxs("div",{className:"relative",children:[h.jsx(tT,{children:h.jsxs(Ta,{children:[h.jsx(ZO,{children:h.jsx(_a,{asChild:!0,children:h.jsx("div",{className:"overflow-hidden size-16 rounded-lg bg-surface3 border-sm border-border1 ",children:e?h.jsx(u0e,{src:n??""}):(t==null?void 0:t.contentType)==="application/pdf"?h.jsx(h1t,{document:t}):t?h.jsx(d1t,{document:t}):null})})}),h.jsx(Vo,{side:"top",children:h.jsx(rw,{})})]})}),r&&h.jsx(p1t,{})]})})},p1t=()=>h.jsx(gLe,{asChild:!0,children:h.jsx(Na,{tooltip:"Remove file",className:"absolute -right-3 -top-3 text-icon3 hover:text-icon6 rounded-full bg-surface1 hover:bg-surface2 rounded-full p-1",side:"top",children:h.jsx(ot,{children:h.jsx(wle,{})})})}),g0e=()=>p0e()?h.jsx("div",{className:"flex w-full flex-row items-center gap-4 pb-2",children:h.jsx(nle,{components:{Attachment:f1t}})}):null,y0e=({ToolFallback:e,agentName:t,hasMemory:n})=>{const r=A.useRef(null);vB(r,{enabled:!0});const s=i=>h.jsx(Zbt,{...i,ToolFallback:e});return h.jsxs(m1t,{children:[h.jsxs(sR,{ref:r,autoScroll:!1,className:"overflow-y-scroll scroll-smooth h-full",children:[h.jsx(g1t,{agentName:t}),h.jsx("div",{className:"max-w-[568px] w-full mx-auto px-4 pb-7",children:h.jsx(ile,{components:{UserMessage:h0e,EditComposer:v1t,AssistantMessage:s}})}),h.jsx(Cg,{empty:!1,children:h.jsx("div",{})})]}),h.jsx(y1t,{hasMemory:n})]})},m1t=({children:e})=>h.jsx(nR,{className:"grid grid-rows-[1fr_auto] h-full overflow-y-auto",children:e}),g1t=({agentName:e})=>{const t=e??"",n=t.split(" ")??[];let r="A";return n.length===2?r=`${n[0][0]}${n[1][0]}`:t.length>0?r=`${t[0]}`:r="A",h.jsx(rR,{children:h.jsxs("div",{className:"flex w-full flex-grow flex-col items-center justify-center",children:[h.jsx(bB,{children:h.jsx(xB,{children:r})}),h.jsx("p",{className:"mt-4 font-medium",children:"How can I help you today?"})]})})},y1t=({hasMemory:e})=>h.jsxs("div",{className:"mx-4",children:[h.jsxs(iC,{children:[h.jsx("div",{className:"max-w-[568px] w-full mx-auto pb-2",children:h.jsx(g0e,{})}),h.jsxs("div",{className:"bg-surface3 rounded-lg border-sm border-border1 py-4 mt-auto max-w-[568px] w-full mx-auto px-4",children:[h.jsx(oC,{asChild:!0,className:"w-full",children:h.jsx("textarea",{className:"text-ui-lg leading-ui-lg placeholder:text-icon3 text-icon6 bg-transparent focus:outline-none resize-none",autoFocus:!0,placeholder:"Enter your message...",name:"",id:""})}),h.jsxs("div",{className:"flex justify-end gap-2",children:[h.jsx(b1t,{}),h.jsx(x1t,{})]})]})]}),!e&&h.jsxs(Ue,{variant:"ui-sm",className:"text-icon3 flex gap-2 pt-1 max-w-[568px] w-full mx-auto border-t items-start",children:[h.jsx(ot,{className:"transform translate-y-[0.1rem]",children:h.jsx(r0e,{})}),"Memory is not enabled. The conversation will not be persisted."]})]}),b1t=()=>{const e=Hu(),{start:t,stop:n,isListening:r,transcript:s}=f0e();return A.useEffect(()=>{s&&e.setText(s)},[e,s]),h.jsx(Na,{type:"button",tooltip:r?"Stop dictation":"Start dictation",variant:"ghost",className:"rounded-full",onClick:()=>r?n():t(),children:r?h.jsx(b0e,{}):h.jsx(Ele,{className:"h-6 w-6 text-[#898989] hover:text-[#fff]"})})},x1t=()=>h.jsxs(h.Fragment,{children:[h.jsx(tle,{asChild:!0,children:h.jsx(Na,{tooltip:"Add attachment",variant:"ghost",className:"rounded-full",children:h.jsx(cC,{className:"h-6 w-6 text-[#898989] hover:text-[#fff]"})})}),h.jsx(Cg,{running:!1,children:h.jsx(mT,{asChild:!0,children:h.jsx(Na,{tooltip:"Send",variant:"default",className:"rounded-full border-sm border-[#363636] bg-[#292929]",children:h.jsx(ble,{className:"h-6 w-6 text-[#898989] hover:text-[#fff]"})})})}),h.jsx(Cg,{running:!0,children:h.jsx(gT,{asChild:!0,children:h.jsx(Na,{tooltip:"Cancel",variant:"default",children:h.jsx(b0e,{})})})})]}),v1t=()=>h.jsxs(iC,{children:[h.jsx(oC,{}),h.jsxs("div",{children:[h.jsx(gT,{asChild:!0,children:h.jsx(Js,{variant:"ghost",children:"Cancel"})}),h.jsx(mT,{asChild:!0,children:h.jsx(Js,{children:"Send"})})]})]}),b0e=()=>h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",children:h.jsx("rect",{width:"10",height:"10",x:"3",y:"3",rx:"2"})});function eQ(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function w1t(e,t,n){const r=Ku(),[s,i]=A.useState(!1),[o,a]=A.useState(null),[l,c]=A.useState("thread"),[u,d]=A.useState("markdown"),[p,g]=A.useState(!0),[b,x]=A.useState(!1),S=A.useCallback(async()=>{g(!0);try{if(!e||!t){a(null),g(!1);return}const k=await r.getWorkingMemory({agentId:e,threadId:t,resourceId:n}),{workingMemory:T,source:P,workingMemoryTemplate:M,threadExists:j}=k;if(i(j),a(T),c(P),d((M==null?void 0:M.format)||"markdown"),(M==null?void 0:M.format)==="json"){let F="";T?F=eQ(T):M!=null&&M.content?F=eQ(M.content):F="",a(F)}else a(T||(M==null?void 0:M.content)||"")}catch(k){a(null),console.error("Error fetching working memory",k)}finally{g(!1)}},[e,t,n]);return A.useEffect(()=>{S()},[S]),{threadExists:s,workingMemoryData:o,workingMemorySource:l,workingMemoryFormat:u,isLoading:p,isUpdating:b,refetch:S,updateWorkingMemory:async k=>{x(!0);try{if(u==="json")try{JSON.parse(k)}catch{throw new Error("Invalid JSON working memory")}await r.updateWorkingMemory({agentId:e,threadId:t,workingMemory:k,resourceId:n}),S()}catch(T){throw console.error("Error updating working memory",T),T}finally{x(!1)}}}}const x0e=A.createContext({threadExists:!1,workingMemoryData:null,workingMemorySource:"thread",isLoading:!1,isUpdating:!1,updateWorkingMemory:()=>Promise.resolve(),refetch:()=>Promise.resolve()});function S1t({agentId:e,threadId:t,resourceId:n,children:r}){const s=w1t(e,t,n);return h.jsx(x0e.Provider,{value:s,children:r})}function v0e(){const e=A.useContext(x0e);if(!e)throw new Error("useWorkingMemory must be used within a WorkingMemoryProvider");return e}class C1t{constructor(){Le(this,"accept","application/pdf")}async add({file:t}){if(t.size>20971520)throw new Error("PDF size exceeds 20MB limit");return{id:crypto.randomUUID(),type:"document",name:t.name,file:t,status:{type:"running",reason:"uploading",progress:0},contentType:"application/pdf"}}async send(t){const n=await this.fileToBase64(t.file);return{id:t.id,type:"document",name:t.name,content:[{type:"text",text:n}],status:{type:"complete"},contentType:"application/pdf"}}async remove(t){}async fileToBase64(t){const n=await t.arrayBuffer(),r=new Uint8Array(n);let s="";return r.forEach(i=>{s+=String.fromCharCode(i)}),btoa(s)}async extractTextFromPDF(t){return"Extracted PDF text content"}}const k1t=e=>e,tQ=e=>{switch(e){case"tool-calls":throw new Error("Stream finished with reason tool-calls, try increasing maxSteps")}},E1t=async e=>{const t=e.filter(n=>n.type==="image"||n.type==="document").map(async n=>{var r,s,i;return n.type==="document"?n.contentType==="application/pdf"?{role:"user",content:[{type:"file",data:`data:application/pdf;base64,${((s=(r=n.content)==null?void 0:r[0])==null?void 0:s.text)||""}`,mimeType:n.contentType,filename:n.name}]}:{role:"user",content:((i=n.content[0])==null?void 0:i.text)||""}:{role:"user",content:[{type:"image",image:await m0e(n.file),mimeType:n.file.type}]}});return Promise.all(t)};function D1t({children:e,agentId:t,initialMessages:n,memory:r,threadId:s,refreshThreadList:i,settings:o,runtimeContext:a}){const[l,c]=A.useState(!1),[u,d]=A.useState([]),[p,g]=A.useState(s),{refetch:b}=v0e(),{frequencyPenalty:x,presencePenalty:S,maxRetries:E,maxSteps:k,maxTokens:T,temperature:P,topK:M,topP:j,instructions:F,chatWithGenerate:I,providerOptions:B}=(o==null?void 0:o.modelSettings)??{},L=A.useRef({}),W=new oh;Object.entries(a??{}).forEach(([G,q])=>{W.set(G,q)}),A.useEffect(()=>{const G=n&&(n==null?void 0:n.length)>(u==null?void 0:u.length);if((u.length===0||p!==s||G&&p===s)&&n&&s&&r){const q=n==null?void 0:n.map(z=>{var ne,H,ee,ie;const Y=(z.toolInvocations||[]).map(se=>({type:"tool-call",toolCallId:se==null?void 0:se.toolCallId,toolName:se==null?void 0:se.toolName,args:se==null?void 0:se.args,result:se==null?void 0:se.result})),U=(z.experimental_attachments||[]).map(se=>({type:se.contentType.startsWith("image/")?"image":se.contentType.startsWith("audio/")?"audio":"file",mimeType:se.contentType,image:se.url})),X=(ie=(ee=(H=(ne=z==null?void 0:z.parts)==null?void 0:ne.find(({type:se})=>se==="reasoning"))==null?void 0:H.details)==null?void 0:ee.map(se=>se==null?void 0:se.text))==null?void 0:ie.join(" ");return{...z,content:[...X?[{type:"reasoning",text:X}]:[],...typeof z.content=="string"?[{type:"text",text:z.content}]:[],...Y,...U]}}).filter(Boolean);d(q),g(s)}},[n,s,r]);const J=Ku().getAgent(t),Z=GO({isRunning:l,messages:u,convertMessage:k1t,onNew:async G=>{var Y;if(((Y=G.content[0])==null?void 0:Y.type)!=="text")throw new Error("Only text messages are supported");const q=await E1t(G.attachments),z=G.content[0].text;d(U=>[...U,{role:"user",content:z,attachments:G.attachments}]),c(!0);try{if(I){const U=await J.generate({messages:[{role:"user",content:z},...q],runId:t,frequencyPenalty:x,presencePenalty:S,maxRetries:E,maxSteps:k,maxTokens:T,temperature:P,topK:M,topP:j,instructions:F,runtimeContext:W,...r?{threadId:s,resourceId:t}:{},providerOptions:B});if(U.response){const X=U.response.messages.reduce((ne,H)=>{const ee=Array.isArray(ne.content)?ne.content:[];if(typeof H.content=="string")return{...ne,content:[...ee,...U.reasoning?[{type:"reasoning",text:U.reasoning}]:[],{type:"text",text:H.content}]};if(H.role==="assistant"){const ie=Array.isArray(H.content)?H.content.find(le=>le.type==="tool-call"):void 0,se=Array.isArray(H.content)?H.content.find(le=>le.type==="reasoning"):void 0;if(ie){const le=ee.map(ye=>ye.type==="tool-call"&&ye.toolCallId===(ie==null?void 0:ie.toolCallId)?{...ye,...ie}:ye),pe=le.some(ye=>ye.type==="tool-call");return{...ne,content:pe?[...se?[se]:[],...le]:[...ee,...se?[se]:[],ie]}}const ae=Array.isArray(H.content)?H.content.find(le=>le.type==="text"&&le.text):void 0;if(ae)return{...ne,content:[...ee,...se?[se]:[],ae]}}if(H.role==="tool"){const ie=Array.isArray(H.content)?H.content.find(se=>se.type==="tool-result"):void 0;if(ie){const se=ee.map(le=>le.type==="tool-call"&&le.toolCallId===(ie==null?void 0:ie.toolCallId)?{...le,result:ie.result}:le),ae=se.some(le=>le.type==="tool-call");return{...ne,content:ae?se:[...ee,{type:"tool-result",toolCallId:ie.toolCallId,result:ie.result}]}}return{...ne,content:[...ee,ie]}}return ne},{role:"assistant",content:[]});d(ne=>[...ne,X]),tQ(U.finishReason)}}else{let U=function(){d(se=>{const ae={role:"assistant",content:[{type:"text",text:ne}]};return H?ee?(ee=!1,[...se,ae]):[...se.slice(0,-1),ae]:(H=!0,ee&&(ee=!1),[...se,ae])})};const X=await J.stream({messages:[{role:"user",content:z},...q],runId:t,frequencyPenalty:x,presencePenalty:S,maxRetries:E,maxSteps:k,maxTokens:T,temperature:P,topK:M,topP:j,instructions:F,runtimeContext:W,...r?{threadId:s,resourceId:t}:{},providerOptions:B});if(!X.body)throw new Error("No response body");let ne="",H=!1,ee=!1,ie=!1;await X.processDataStream({onTextPart(se){ie?(ie=!1,ne=se):ne+=se,U()},async onToolCallPart(se){d(ae=>{const le=ae[ae.length-1];if(le&&le.role==="assistant"){const ye={...le,content:Array.isArray(le.content)?[...le.content,{type:"tool-call",toolCallId:se.toolCallId,toolName:se.toolName,args:se.args}]:[...typeof le.content=="string"?[{type:"text",text:le.content}]:[],{type:"tool-call",toolCallId:se.toolCallId,toolName:se.toolName,args:se.args}]};return ee=!0,ie=!0,[...ae.slice(0,-1),ye]}const pe={role:"assistant",content:[{type:"text",text:ne},{type:"tool-call",toolCallId:se.toolCallId,toolName:se.toolName,args:se.args}]};return ee=!0,ie=!0,[...ae,pe]}),L.current[se.toolCallId]=se.toolName},async onToolResultPart(se){var ae;d(le=>{const pe=le[le.length-1];if(pe&&pe.role==="assistant"&&Array.isArray(pe.content)){const ye=pe.content.map(Ee=>typeof Ee=="object"&&Ee.type==="tool-call"&&Ee.toolCallId===se.toolCallId?{...Ee,result:se.result}:Ee),Te={...pe,content:ye};return[...le.slice(0,-1),Te]}return le});try{L.current[se.toolCallId]==="updateWorkingMemory"&&((ae=se.result)!=null&&ae.success)&&await(b==null?void 0:b())}finally{delete L.current[se.toolCallId]}},onErrorPart(se){throw new Error(se)},onFinishMessagePart({finishReason:se}){tQ(se)},onReasoningPart(se){d(ae=>{const le=ae[ae.length-1];if(le&&le.role==="assistant"&&Array.isArray(le.content)){const ye=le.content.map(Ee=>typeof Ee=="object"&&Ee.type==="reasoning"?{...Ee,text:Ee.text+se}:Ee),Te={...le,content:ye};return[...ae.slice(0,-1),Te]}const pe={role:"assistant",content:[{type:"reasoning",text:se},{type:"text",text:ne}]};return[...ae,pe]})}})}c(!1),setTimeout(()=>{i==null||i()},500)}catch(U){console.error("Error occurred in MastraRuntimeProvider",U),c(!1),d(X=>[...X,{role:"assistant",content:[{type:"text",text:`${U}`}]}])}},adapters:{attachments:new CRe([new xRe,new wRe,new C1t])}});return h.jsxs($O,{runtime:Z,children:[" ",e," "]})}const nQ={modelSettings:{maxRetries:2,maxSteps:5,temperature:.5,topP:1,chatWithGenerate:!1}};function A1t({agentId:e}){const[t,n]=A.useState(void 0),r=`mastra-agent-store-${e}`;return A.useEffect(()=>{try{const o=localStorage.getItem(r);if(o){const a=JSON.parse(o);n(a??void 0)}}catch(o){console.error(o)}},[r]),{settings:t,setSettings:o=>{n(a=>({...a,...o})),localStorage.setItem(r,JSON.stringify({...o,agentId:e}))},resetAll:()=>{n(nQ),localStorage.setItem(r,JSON.stringify(nQ))}}}const w0e=A.createContext({});function T1t({children:e,agentId:t}){const{settings:n,setSettings:r,resetAll:s}=A1t({agentId:t});return h.jsx(w0e.Provider,{value:{settings:n,setSettings:r,resetAll:s},children:e})}const wB=()=>A.useContext(w0e),dy=ja()(Snt(e=>({runtimeContext:{},setRuntimeContext:t=>e({runtimeContext:t})}),{name:"mastra-playground-store"})),_1t=({agentId:e,agentName:t,threadId:n,initialMessages:r,memory:s,refreshThreadList:i})=>{const{settings:o}=wB(),{runtimeContext:a}=dy();return h.jsx(D1t,{agentId:e,agentName:t,threadId:n,initialMessages:r,memory:s,refreshThreadList:i,settings:o,runtimeContext:a,children:h.jsx(y0e,{agentName:t??"",hasMemory:s})})},N1t=V1("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function gD({className:e,variant:t,...n}){return h.jsx("div",{className:Ve(N1t({variant:t}),e),...n})}function mE({content:e,label:t,multiline:n=!1}){const r=()=>{navigator.clipboard.writeText(e)};return h.jsxs("div",{className:"group relative flex items-start gap-2",children:[h.jsx("span",{className:Ve("text-sm text-mastra-el-4",n?"whitespace-pre-wrap":"truncate"),children:e}),h.jsx(Js,{variant:"ghost",size:"sm",className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0 -mt-1",onClick:s=>{s.stopPropagation(),r()},"aria-label":`Copy ${t}`,children:h.jsx(Dh,{className:"h-3 w-3"})})]})}function P1t({date:e}){const t={relativeTime:jrt(new Date(e),{addSuffix:!0}),fullDate:lo(new Date(e),"PPpp")};return h.jsx(FC,{children:h.jsxs(Ta,{children:[h.jsx(_a,{className:"text-left text-sm text-mastra-el-4",children:t.relativeTime}),h.jsx(Vo,{className:"bg-mastra-bg-1 text-mastra-el-1",children:h.jsx("p",{className:"text-sm",children:t.fullDate})})]})})}const M1t=V1("flex w-full text-icon6 rounded-lg border bg-transparent shadow-sm focus-visible:ring-ring transition-colors focus-visible:outline-none focus-visible:ring-1 disabled:cursor-not-allowed disabled:opacity-50",{variants:{variant:{default:"border-sm border-border1 placeholder:text-icon3",filled:"border-sm bg-inputFill border-border1 placeholder:text-icon3",unstyled:"border-0 bg-transparent placeholder:text-icon3 focus-visible:ring-transparent focus-visible:outline-none"},customSize:{default:"px-[13px] text-[calc(13_/_16_*_1rem)] h-8",sm:"h-[30px] px-[13px] text-xs",lg:"h-10 px-[17px] text-[calc(13_/_16_*_1rem)]"}},defaultVariants:{variant:"default",customSize:"default"}}),ga=A.forwardRef(({className:e,customSize:t,testId:n,variant:r,type:s,...i},o)=>h.jsx("input",{type:s,className:zn(e,M1t({variant:r,customSize:t,className:e})),"data-testid":n,ref:o,...i}));ga.displayName="Input";function rQ({score:e}){return h.jsx(gD,{variant:"secondary",children:e.toFixed(2)})}const Wj=A.forwardRef(({className:e,...t},n)=>h.jsx("table",{ref:n,className:Ve("w-full caption-bottom text-sm border-spacing-0",e),...t}));Wj.displayName="Table";const qj=A.forwardRef(({className:e,...t},n)=>h.jsx("thead",{ref:n,className:Ve("[&_tr]:border-b-[0.5px]",e),...t}));qj.displayName="TableHeader";const Gj=A.forwardRef(({className:e,...t},n)=>h.jsx("tbody",{ref:n,className:Ve("[&_tr:last-child]:border-0",e),...t}));Gj.displayName="TableBody";const j1t=A.forwardRef(({className:e,...t},n)=>h.jsx("tfoot",{ref:n,className:Ve("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));j1t.displayName="TableFooter";const jm=A.forwardRef(({className:e,...t},n)=>h.jsx("tr",{ref:n,className:Ve("border-b-[0.5px] border-mastra-border-1 transition-colors hover:bg-muted/50 data-[state=selected]:bg-mastra-bg-4/70",e),...t}));jm.displayName="TableRow";const fa=A.forwardRef(({className:e,...t},n)=>h.jsx("th",{ref:n,className:Ve("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));fa.displayName="TableHead";const Si=A.forwardRef(({className:e,...t},n)=>h.jsx("td",{ref:n,className:Ve("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));Si.displayName="TableCell";const F1t=A.forwardRef(({className:e,...t},n)=>h.jsx("caption",{ref:n,className:Ve("mt-4 text-sm text-muted-foreground",e),...t}));F1t.displayName="TableCaption";const I1t=dfe,S0e=A.forwardRef(({className:e,...t},n)=>h.jsx(BT,{ref:n,className:Ve(e),...t}));S0e.displayName=BT.displayName;const Yj=A.forwardRef(({className:e,...t},n)=>h.jsx($T,{ref:n,className:Ve(e),...t}));Yj.displayName=$T.displayName;const Kj=A.forwardRef(({className:e,...t},n)=>h.jsx(zT,{ref:n,className:Ve("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Kj.displayName=zT.displayName;const gE=Ve("relative overflow-y-auto overflow-x-hidden invisible hover:visible focus:visible","[&::-webkit-scrollbar]:w-1","[&::-webkit-scrollbar-track]:bg-transparent","[&::-webkit-scrollbar-thumb]:rounded-full","[&::-webkit-scrollbar-thumb]:bg-mastra-border/20","[&>*]:visible"),sQ=Ve("px-4 py-2 text-sm transition-all border-b-2 border-transparent","data-[state=active]:border-white data-[state=active]:text-white font-medium","data-[state=inactive]:text-mastra-el-4 hover:data-[state=inactive]:text-mastra-el-2","focus-visible:outline-none"),iQ=Ve("data-[state=inactive]:mt-0 min-h-0 h-full grid grid-rows-[1fr]");function O1t({liveEvals:e,ciEvals:t,onRefetchLiveEvals:n,onRefetchCiEvals:r}){const[s,i]=A.useState("live");function o(){return s==="live"?n():r()}return h.jsxs(I1t,{value:s,onValueChange:a=>i(a),className:"grid grid-rows-[auto_1fr] h-full min-h-0 pb-2",children:[h.jsx("div",{className:"border-b border-mastra-border/10",children:h.jsxs(S0e,{className:"bg-transparent border-0 h-auto mx-4",children:[h.jsx(Yj,{value:"live",className:sQ,children:"Live"}),h.jsx(Yj,{value:"ci",className:sQ,children:"CI"})]})}),h.jsx(Kj,{value:"live",className:iQ,children:h.jsx(oQ,{evals:e,isCIMode:!1,onRefresh:o})}),h.jsx(Kj,{value:"ci",className:iQ,children:h.jsx(oQ,{evals:t,isCIMode:!0,onRefresh:o})})]})}function oQ({evals:e,isCIMode:t=!1,onRefresh:n}){const[r,s]=A.useState(new Set),[i,o]=A.useState(""),[a,l]=A.useState({field:"metricName",direction:"asc"});return h.jsxs("div",{className:"min-h-0 grid grid-rows-[auto_1fr]",children:[h.jsxs("div",{className:"flex items-center gap-4 p-4 rounded-lg",children:[h.jsxs("div",{className:"relative flex-1",children:[h.jsx(BP,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-mastra-el-3"}),h.jsx(ga,{id:"search-input",placeholder:"Search metrics, inputs, or outputs...",value:i,onChange:b=>o(b.target.value),className:"pl-10"})]}),h.jsxs(gD,{variant:"secondary",className:"text-xs",children:[e.length," Total Evaluations"]}),h.jsx(Js,{variant:"ghost",size:"icon",onClick:n,className:"h-9 w-9",children:h.jsx(y$e,{className:"h-4 w-4"})})]}),h.jsx("div",{className:"overflow-auto",children:h.jsxs(Wj,{className:"w-full",children:[h.jsx(qj,{className:"bg-mastra-bg-2 h-[var(--table-header-height)] sticky top-0 z-10",children:h.jsxs(jm,{className:"border-gray-6 border-b-[0.1px] text-[0.8125rem]",children:[h.jsx(fa,{className:"w-12 h-12"}),h.jsx(fa,{className:"min-w-[200px] max-w-[30%] text-mastra-el-3 cursor-pointer",onClick:()=>d("metricName"),children:h.jsxs("div",{className:"flex items-center",children:["Metric ",p("metricName")]})}),h.jsx(fa,{className:"flex-1 text-mastra-el-3"}),h.jsx(fa,{className:"w-48 text-mastra-el-3 cursor-pointer",onClick:()=>d("averageScore"),children:h.jsxs("div",{className:"flex items-center",children:["Average Score ",p("averageScore")]})}),h.jsx(fa,{className:"w-48 text-mastra-el-3",children:"Evaluations"})]})}),h.jsx(Gj,{className:"border-b border-gray-6 relative",children:h.jsx(cst,{mode:"wait",presenceAffectsLayout:!1,children:g(e).length===0?h.jsxs(jm,{children:[h.jsx(Si,{className:"h-12 w-16"}),h.jsx(Si,{colSpan:4,className:"h-32 px-4 text-center text-mastra-el-3",children:h.jsxs("div",{className:"flex flex-col items-center gap-2",children:[h.jsx(BP,{className:"size-5"}),h.jsx("p",{children:"No evaluations found"}),i&&h.jsx("p",{className:"text-sm",children:"Try adjusting your search terms"})]})})]}):g(e).map(b=>h.jsxs(Se.Fragment,{children:[h.jsxs(jm,{className:"border-b-gray-6 border-b-[0.1px] text-[0.8125rem] cursor-pointer hover:bg-mastra-bg-3",onClick:()=>u(b.metricName),children:[h.jsx(Si,{className:"w-12",children:h.jsx("div",{className:"h-8 w-full flex items-center justify-center",children:h.jsx("div",{className:Ve("transform transition-transform duration-200",r.has(b.metricName)?"rotate-90":""),children:h.jsx(VBe,{className:"h-4 w-4 text-mastra-el-5"})})})}),h.jsx(Si,{className:"min-w-[200px] max-w-[30%] font-medium text-mastra-el-5",children:b.metricName}),h.jsx(Si,{className:"flex-1 text-mastra-el-5"}),h.jsx(Si,{className:"w-48 text-mastra-el-5",children:h.jsx(rQ,{score:b.averageScore})}),h.jsx(Si,{className:"w-48 text-mastra-el-5",children:h.jsx(gD,{variant:"secondary",children:b.evals.length})})]}),r.has(b.metricName)&&h.jsx(jm,{children:h.jsx(Si,{colSpan:5+(c(b.evals)?1:0)+(t?1:0),className:"p-0",children:h.jsx("div",{className:"bg-mastra-bg-3 rounded-lg m-2",children:h.jsx("div",{className:"w-full",children:h.jsxs(Wj,{className:"w-full",children:[h.jsx(qj,{children:h.jsxs(jm,{className:"text-[0.7rem] text-mastra-el-3 hover:bg-transparent",children:[h.jsx(fa,{className:"pl-12 w-[120px]",children:"Timestamp"}),h.jsx(fa,{className:"w-[300px]",children:"Instructions"}),h.jsx(fa,{className:"w-[300px]",children:"Input"}),h.jsx(fa,{className:"w-[300px]",children:"Output"}),h.jsx(fa,{className:"w-[80px]",children:"Score"}),c(b.evals)&&h.jsx(fa,{className:"w-[250px]",children:"Reason"}),t&&h.jsx(fa,{className:"w-[120px]",children:"Test Name"})]})}),h.jsx(Gj,{children:b.evals.map((x,S)=>{var E,k;return h.jsxs(jm,{className:"text-[0.8125rem] hover:bg-mastra-bg-2/50",children:[h.jsx(Si,{className:"pl-12 text-mastra-el-4 align-top py-4",children:h.jsx(P1t,{date:x.createdAt})}),h.jsx(Si,{className:"text-mastra-el-4 align-top py-4",children:h.jsx("div",{className:Ve("max-w-[300px] max-h-[200px]",gE),children:h.jsx(mE,{content:x.instructions,label:"instructions",multiline:!0})})}),h.jsx(Si,{className:"text-mastra-el-4 align-top py-4",children:h.jsx("div",{className:Ve("max-w-[300px] max-h-[200px]",gE),children:h.jsx(mE,{content:x.input,label:"input",multiline:!0})})}),h.jsx(Si,{className:"text-mastra-el-4 align-top py-4",children:h.jsx("div",{className:Ve("max-w-[300px] max-h-[200px]",gE),children:h.jsx(mE,{content:x.output,label:"output",multiline:!0})})}),h.jsx(Si,{className:"text-mastra-el-4 align-top py-4",children:h.jsx(rQ,{score:x.result.score})}),c(b.evals)&&h.jsx(Si,{className:"text-mastra-el-4 align-top py-4",children:h.jsx("div",{className:Ve("max-w-[300px] max-h-[200px]",gE),children:h.jsx(mE,{content:((E=x.result.info)==null?void 0:E.reason)||"",label:"reason",multiline:!0})})}),t&&h.jsx(Si,{className:"text-mastra-el-4 align-top py-4",children:((k=x.testInfo)==null?void 0:k.testName)&&h.jsx(gD,{variant:"secondary",className:"text-xs",children:x.testInfo.testName})})]},`${b.metricName}-${S}`)})})]})})})})})]},b.metricName))})})]})})]});function c(b){return b.some(x=>{var S;return(S=x.result.info)==null?void 0:S.reason})}function u(b){const x=new Set(r);x.has(b)?x.delete(b):x.add(b),s(x)}function d(b){l(x=>({field:b,direction:x.field===b&&x.direction==="asc"?"desc":"asc"}))}function p(b){return a.field!==b?null:a.direction==="asc"?h.jsx(MBe,{className:"h-4 w-4 ml-1"}):h.jsx(NBe,{className:"h-4 w-4 ml-1"})}function g(b){let x=b.reduce((S,E)=>{const k=S.find(T=>T.metricName===E.metricName);return k?(k.evals.push(E),k.averageScore=k.evals.reduce((T,P)=>T+P.result.score,0)/k.evals.length):S.push({metricName:E.metricName,averageScore:E.result.score,evals:[E]}),S},[]);return i&&(x=x.filter(S=>S.metricName.toLowerCase().includes(i.toLowerCase())||S.evals.some(E=>{var k,T,P;return((k=E.input)==null?void 0:k.toLowerCase().includes(i.toLowerCase()))||((T=E.output)==null?void 0:T.toLowerCase().includes(i.toLowerCase()))||((P=E.instructions)==null?void 0:P.toLowerCase().includes(i.toLowerCase()))}))),x.sort((S,E)=>{const k=a.direction==="asc"?1:-1;switch(a.field){case"metricName":return k*S.metricName.localeCompare(E.metricName);case"averageScore":return k*(S.averageScore-E.averageScore);default:return 0}}),x}}const Ph=A.createContext({});function C0e({children:e,initialTraces:t=[]}){const[n,r]=A.useState(!1),[s,i]=A.useState(null),[o,a]=A.useState(0),[l,c]=A.useState(null),u=()=>{if(o<t.length-1){const g=o+1;a(g);const b=t[g].trace;i(b);const x=b.find(S=>S.parentSpanId===null)||b[0];c(x)}},d=()=>{if(o>0){const g=o-1;a(g);const b=t[g].trace;i(b);const x=b.find(S=>S.parentSpanId===null)||b[0];c(x)}},p=()=>{r(!1),i(null),c(null)};return h.jsx(Ph.Provider,{value:{isOpen:n,setIsOpen:r,trace:s,setTrace:i,traces:t,currentTraceIndex:o,setCurrentTraceIndex:a,nextTrace:u,prevTrace:d,span:l,setSpan:c,clearData:p},children:e})}const R1t={default:"[&>tbody>tr]:h-table-row",small:"[&>tbody>tr]:h-table-row-small"},hy=({className:e,children:t,size:n="default"})=>h.jsx("table",{className:zn("w-full",R1t[n],e),children:t}),fy=({className:e,children:t})=>h.jsx("thead",{children:h.jsx("tr",{className:zn("h-table-header border-b-sm border-border1",e),children:t})}),Xs=({className:e,children:t,...n})=>h.jsx("th",{className:zn("text-icon3 text-ui-sm h-full text-left font-normal uppercase first:pl-5 last:pr-5 whitespace-nowrap",e),...n,children:t}),Mh=({className:e,children:t})=>h.jsx("tbody",{className:zn("",e),children:t}),jh=({className:e,children:t,selected:n=!1,onClick:r})=>h.jsx("tr",{className:zn("border-b-sm border-border1 hover:bg-surface3",n&&"bg-surface4",r&&"cursor-pointer",e),onClick:r,children:t}),L1t=e=>{const t=new Intl.DateTimeFormat("en-US",{month:"short"}).format(e).toUpperCase(),n=e.getDate(),r=`${t} ${n}`,s=new Intl.DateTimeFormat("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).format(e);return{day:r,time:s}},Dr=({className:e,children:t,...n})=>h.jsx("td",{className:zn("text-icon5 first:pl-5 last:pr-5",e),...n,children:h.jsx("div",{className:zn("flex h-full w-full shrink-0 items-center"),children:t})}),B1t=({className:e,children:t})=>h.jsx(Dr,{className:e,children:h.jsx(Ue,{as:"span",variant:"ui-md",className:"w-full truncate",children:t})}),$1t=({className:e,children:t,unit:n})=>h.jsx(Dr,{className:e,children:h.jsxs("div",{className:"flex min-w-0 items-center",children:[h.jsx(Ue,{as:"span",variant:"ui-md",className:"shrink-0",children:t}),h.jsx(Ue,{as:"span",variant:"ui-sm",className:"text-icon3 w-full truncate",children:n})]})}),z1t=({dateTime:e,...t})=>{const{day:n,time:r}=L1t(e);return h.jsx(Dr,{...t,children:h.jsxs("div",{className:"shrink-0",children:[h.jsx(Ue,{as:"span",variant:"ui-sm",className:"text-icon3",children:n})," ",h.jsx(Ue,{as:"span",variant:"ui-md",children:r})]})})},SB=({name:e,description:t,icon:n,meta:r,...s})=>h.jsx(Dr,{...s,children:h.jsxs("div",{className:"flex items-center gap-[14px]",children:[h.jsx(ot,{size:"lg",className:"text-icon5",children:n}),h.jsxs("div",{className:"flex flex-col gap-0",children:[h.jsx(Ue,{as:"span",variant:"ui-md",className:"text-icon6 font-medium !leading-tight",children:e}),t&&h.jsx(Ue,{as:"span",variant:"ui-xs",className:"text-icon3 w-full max-w-[300px] truncate !leading-tight",children:t})]}),r]})}),H1t=()=>{const{setTrace:e,isOpen:t,setIsOpen:n,trace:r,setSpan:s,setCurrentTraceIndex:i}=A.useContext(Ph);return{openTrace:(a,l)=>{var u;e(a);const c=a.find(d=>d.parentSpanId===null)||a[0];s(c),i(l),!(t&&((u=r==null?void 0:r[0])==null?void 0:u.id)!==a[0].id)&&n(d=>!d)}}},ES=(e,t)=>Number(e.toPrecision(t)),V1t=({colsCount:e})=>h.jsx(Mh,{children:h.jsx(jh,{children:h.jsx(Dr,{colSpan:e,className:"text-center py-4",children:h.jsx(Ue,{children:"No traces found"})})})}),U1t=({error:e,colsCount:t})=>h.jsx(Mh,{children:h.jsx(jh,{children:h.jsx(Dr,{colSpan:t,className:"text-center py-4",children:h.jsx(Ue,{children:e.message})})})}),W1t=({trace:e,index:t,isActive:n})=>{const{openTrace:r}=H1t(),s=e.trace.some(i=>i.status.code!==0);return h.jsxs(jh,{className:n?"bg-surface4":"",onClick:()=>r(e.trace,t),children:[h.jsx(z1t,{dateTime:new Date(e.started/1e3)}),h.jsxs(B1t,{title:e.traceId,children:[e.traceId.substring(0,7),"..."]}),h.jsx($1t,{unit:"ms",children:ES(e.duration/1e3,3)}),h.jsx(Dr,{children:h.jsx("button",{onClick:()=>r(e.trace,t),children:h.jsx(Un,{icon:h.jsx(Vj,{}),children:e.trace.length})})}),h.jsx(Dr,{children:s?h.jsx(Un,{variant:"error",icon:h.jsx($b,{}),children:"Failed"}):h.jsx(Un,{icon:h.jsx(kh,{}),variant:"success",children:"Success"})})]})},k0e=({traces:e,error:t})=>{const n=!e||e.length===0,{currentTraceIndex:r}=A.useContext(Ph),s=4;return h.jsxs(hy,{size:"small",children:[h.jsxs(fy,{children:[h.jsx(Xs,{width:120,children:"Time"}),h.jsx(Xs,{width:"auto",children:"Trace Id"}),h.jsx(Xs,{width:120,children:"Duration"}),h.jsx(Xs,{width:120,children:"Spans"}),h.jsx(Xs,{width:120,children:"Status"})]}),t?h.jsx(U1t,{error:t,colsCount:s}):n?h.jsx(V1t,{colsCount:s}):h.jsx(h.Fragment,{children:h.jsx(Mh,{children:e.map((i,o)=>h.jsx(W1t,{trace:i,index:o,isActive:o===r},i.traceId))})})]})},q1t=({defaultWidth:e,minimumWidth:t,maximumWidth:n,setCurrentWidth:r})=>{const[s,i]=A.useState(!1),[o,a]=A.useState(e),l=A.useRef(null),c=A.useRef(0),u=A.useRef(0),d=p=>{p.preventDefault(),i(!0),c.current=p.clientX,u.current=o};return A.useEffect(()=>{a(e),r==null||r(e)},[e]),A.useEffect(()=>{const p=b=>{if(!s||!l.current)return;const x=l.current.offsetWidth,E=(c.current-b.clientX)/x*100,k=Math.min(Math.max(u.current+E,t),n);a(k),r==null||r(k)},g=()=>{i(!1)};return s&&(window.addEventListener("mousemove",p),window.addEventListener("mouseup",g)),()=>{window.removeEventListener("mousemove",p),window.removeEventListener("mouseup",g)}},[s]),{sidebarWidth:o,isDragging:s,handleMouseDown:d,containerRef:l}},CB=({children:e,defaultWidth:t,minimumWidth:n,maximumWidth:r,className:s,disabled:i=!1,setCurrentWidth:o,dividerPosition:a="left"})=>{const{sidebarWidth:l,isDragging:c,handleMouseDown:u,containerRef:d}=q1t({defaultWidth:i?100:t,minimumWidth:n,maximumWidth:r,setCurrentWidth:o});return h.jsxs("div",{className:Ve("w-full h-full relative",s),ref:d,style:{width:`${l}%`},children:[!i&&a==="left"?h.jsx("div",{className:`w-px bg-border1 h-full cursor-col-resize hover:w-1.5 hover:bg-mastra-border-2 hover:bg-[#424242] active:bg-mastra-border-3 active:bg-[#3e3e3e] transition-colors absolute inset-y-0 z-10
|
|
718
|
+
`+(a!==o?`result of cast: ${a}`:""))}return i}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((s,i)=>i.call(this,s,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,s){let{path:i,originalValue:o=t,strict:a=this.spec.strict}=n,l=t;a||(l=this._cast(l,Object.assign({assert:!1},n)));let c=[];for(let u of Object.values(this.internalTests))u&&c.push(u);this.runTests({path:i,value:l,originalValue:o,options:n,tests:c},r,u=>{if(u.length)return s(u,l);this.runTests({path:i,value:l,originalValue:o,options:n,tests:this.tests},r,s)})}runTests(t,n,r){let s=!1,{tests:i,value:o,originalValue:a,path:l,options:c}=t,u=x=>{s||(s=!0,n(x,o))},d=x=>{s||(s=!0,r(x,o))},p=i.length,g=[];if(!p)return d([]);let b={value:o,originalValue:a,path:l,options:c,schema:this};for(let x=0;x<i.length;x++){const S=i[x];S(b,u,function(k){k&&(Array.isArray(k)?g.push(...k):g.push(k)),--p<=0&&d(g)})}}asNestedTest({key:t,index:n,parent:r,parentPath:s,originalParent:i,options:o}){const a=t??n;if(a==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof a=="number";let c=r[a];const u=Object.assign({},o,{strict:!0,parent:r,value:c,originalValue:i[a],key:void 0,[l?"index":"key"]:a,path:l||a.includes(".")?`${s||""}[${l?a:`"${a}"`}]`:(s?`${s}.`:"")+t});return(d,p,g)=>this.resolve(u)._validate(c,u,p,g)}validate(t,n){var r;let s=this.resolve(Object.assign({},n,{value:t})),i=(r=n==null?void 0:n.disableStackTrace)!=null?r:s.spec.disableStackTrace;return new Promise((o,a)=>s._validate(t,n,(l,c)=>{_o.isError(l)&&(l.value=c),a(l)},(l,c)=>{l.length?a(new _o(l,c,void 0,void 0,i)):o(c)}))}validateSync(t,n){var r;let s=this.resolve(Object.assign({},n,{value:t})),i,o=(r=n==null?void 0:n.disableStackTrace)!=null?r:s.spec.disableStackTrace;return s._validate(t,Object.assign({},n,{sync:!0}),(a,l)=>{throw _o.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new _o(a,t,void 0,void 0,o);i=l}),i}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(_o.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(_o.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):L0(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=u0({message:n,name:"nullable",test(s){return s===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=u0({message:n,name:"optionality",test(s){return s===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=Nd.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Nd.notNull){return this.nullability(!1,t)}required(t=Nd.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=Nd.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),s=u0(n),i=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(o=>!(o.OPTIONS.name===n.name&&(i||o.OPTIONS.test===s.OPTIONS.test))),r.tests.push(s),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),s=Hge(t).map(i=>new NC(i));return s.forEach(i=>{i.isSibling&&r.deps.push(i.key)}),r.conditions.push(typeof n=="function"?new X3(s,n):X3.fromOptions(s,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=u0({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=Nd.oneOf){let r=this.clone();return t.forEach(s=>{r._whitelist.add(s),r._blacklist.delete(s)}),r.internalTests.whiteList=u0({message:n,name:"oneOf",skipAbsent:!0,test(s){let i=this.schema._whitelist,o=i.resolveAll(this.resolve);return o.includes(s)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:o}})}}),r}notOneOf(t,n=Nd.notOneOf){let r=this.clone();return t.forEach(s=>{r._blacklist.add(s),r._whitelist.delete(s)}),r.internalTests.blacklist=u0({message:n,name:"notOneOf",test(s){let i=this.schema._blacklist,o=i.resolveAll(this.resolve);return o.includes(s)?this.createError({params:{values:Array.from(i).join(", "),resolved:o}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:s,optional:i,nullable:o}=n.spec;return{meta:s,label:r,optional:i,nullable:o,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,c,u)=>u.findIndex(d=>d.name===l.name)===c)}}}Ig.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Ig.prototype[`${e}At`]=function(t,n,r={}){const{parent:s,parentPath:i,schema:o}=dgt(this,t,n,r.context);return o[e](s&&s[i],Object.assign({},r,{parent:s,path:t}))};for(const e of["equals","is"])Ig.prototype[e]=Ig.prototype.oneOf;for(const e of["not","nope"])Ig.prototype[e]=Ig.prototype.notOneOf;const hgt=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function fgt(e){const t=pgt(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function pgt(e){var t,n;const r=hgt.exec(e);return r?{year:xd(r[1]),month:xd(r[2],1)-1,day:xd(r[3],1),hour:xd(r[4]),minute:xd(r[5]),second:xd(r[6]),millisecond:r[7]?xd(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:xd(r[10]),minuteOffset:xd(r[11])}:null}function xd(e,t=0){return Number(e)||t}let mgt=new Date(""),ggt=e=>Object.prototype.toString.call(e)==="[object Date]";class rB extends Ig{constructor(){super({type:"date",check(t){return ggt(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=fgt(t),isNaN(t)?rB.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(NC.isRef(t))r=t;else{let s=this.cast(t);if(!this._typeCheck(s))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=s}return r}min(t,n=Fj.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(s){return s>=this.resolve(r)}})}max(t,n=Fj.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(s){return s<=this.resolve(r)}})}}rB.INVALID_DATE=mgt;var Yge=A.createContext(null),ygt=Yge.Provider;function sB(){const e=A.useContext(Yge);if(!e)throw new Error("useAutoForm must be used within an AutoFormProvider");return e}var bgt=({field:e,path:t})=>{const{uiComponents:n}=sB();return h.jsx(n.ObjectWrapper,{label:Y3(e),field:e,children:Object.entries(e.schema).map(([r,s])=>h.jsx(iB,{field:s,path:[...t,s.key]},`${t.join(".")}.${s.key}`))})},xgt=({field:e,path:t})=>{var c,u;const{uiComponents:n}=sB(),{control:r}=eB(),{fields:s,append:i,remove:o}=zmt({control:r,name:t.join(".")}),a=(u=(c=e.schema)==null?void 0:c[0])==null?void 0:u.type;let l;return a==="object"?l={}:a==="array"?l=[]:l=null,h.jsx(n.ArrayWrapper,{label:Y3(e),field:e,onAddItem:()=>i(l),children:s.map((d,p)=>h.jsx(n.ArrayElementWrapper,{onRemove:()=>o(p),index:p,children:h.jsx(iB,{field:e.schema[0],path:[...t,p.toString()]})},d.id))})};function vgt(e,t){let n=e;for(const r of t)if(n=n[r],n===void 0)return;return n}var iB=({field:e,path:t})=>{var p,g,b;const{formComponents:n,uiComponents:r}=sB(),{register:s,formState:{errors:i},getValues:o}=eB(),a=t.join("."),l=(p=vgt(i,t))==null?void 0:p.message,c=o(a),u=((g=e.fieldConfig)==null?void 0:g.fieldWrapper)||r.FieldWrapper;let d=()=>h.jsx(r.ErrorMessage,{error:`[AutoForm Configuration Error] No component found for type "${e.type}" nor a fallback`});return e.type==="array"?d=xgt:e.type==="object"?d=bgt:e.type in n?d=n[e.type]:"fallback"in n&&(d=n.fallback),h.jsx(u,{label:Y3(e),error:l,id:a,field:e,children:h.jsx(d,{label:Y3(e),field:e,value:c,error:l,id:a,path:t,inputProps:{required:e.required,error:l,key:`${a}-input`,...(b=e.fieldConfig)==null?void 0:b.inputProps,...s(a)}},a)})};function wgt({schema:e,onSubmit:t=()=>{},defaultValues:n,values:r,children:s,uiComponents:i,formComponents:o,withSubmit:a=!1,onFormInit:l=()=>{},formProps:c={}}){const u=Umt(e),d=Hmt({defaultValues:{...Wmt(e),...n},values:r});A.useEffect(()=>{l&&l(d)},[l,d]);const p=async g=>{var S;const b=Pj(g),x=e.validateSchema(b);if(console.log("validationResult",{validationResult:x,dataRaw:g,data:b}),x.success)await t(x.data,d);else{d.clearErrors();let E=!1;(S=x.errors)==null||S.forEach(k=>{var M,j;const T=k.path.join(".");d.setError(T,{type:"custom",message:k.message},{shouldFocus:!E}),E=!0;const P=(j=(M=k.path)==null?void 0:M.slice)==null?void 0:j.call(M,0,-1);(P==null?void 0:P.length)>0&&d.setError(P.join("."),{type:"custom",message:k.message})})}};return h.jsx(kmt,{...d,children:h.jsx(ygt,{value:{schema:u,uiComponents:i,formComponents:o},children:h.jsxs(i.Form,{onSubmit:d.handleSubmit(p),...c,children:[u.fields.map(g=>h.jsx(iB,{field:g,path:[g.key]},g.key)),a&&h.jsx(i.SubmitButton,{children:"Submit"}),s]})})})}var S4="Checkbox",[Sgt,GDt]=Ri(S4),[Cgt,oB]=Sgt(S4);function kgt(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:s,disabled:i,form:o,name:a,onCheckedChange:l,required:c,value:u="on",internal_do_not_use_render:d}=e,[p,g]=lc({prop:n,defaultProp:s??!1,onChange:l,caller:S4}),[b,x]=A.useState(null),[S,E]=A.useState(null),k=A.useRef(!1),T=b?!!o||!!b.closest("form"):!0,P={checked:p,disabled:i,setChecked:g,control:b,setControl:x,name:a,form:o,value:u,hasConsumerStoppedPropagationRef:k,required:c,defaultChecked:sp(s)?!1:s,isFormControl:T,bubbleInput:S,setBubbleInput:E};return h.jsx(Cgt,{scope:t,...P,children:Egt(d)?d(P):r})}var Kge="CheckboxTrigger",Xge=A.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},s)=>{const{control:i,value:o,disabled:a,checked:l,required:c,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:p,isFormControl:g,bubbleInput:b}=oB(Kge,e),x=Ut(s,u),S=A.useRef(l);return A.useEffect(()=>{const E=i==null?void 0:i.form;if(E){const k=()=>d(S.current);return E.addEventListener("reset",k),()=>E.removeEventListener("reset",k)}},[i,d]),h.jsx(xt.button,{type:"button",role:"checkbox","aria-checked":sp(l)?"mixed":l,"aria-required":c,"data-state":tye(l),"data-disabled":a?"":void 0,disabled:a,value:o,...r,ref:x,onKeyDown:bt(t,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:bt(n,E=>{d(k=>sp(k)?!0:!k),b&&g&&(p.current=E.isPropagationStopped(),p.current||E.stopPropagation())})})});Xge.displayName=Kge;var aB=A.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:s,defaultChecked:i,required:o,disabled:a,value:l,onCheckedChange:c,form:u,...d}=e;return h.jsx(kgt,{__scopeCheckbox:n,checked:s,defaultChecked:i,disabled:a,required:o,onCheckedChange:c,name:r,form:u,value:l,internal_do_not_use_render:({isFormControl:p})=>h.jsxs(h.Fragment,{children:[h.jsx(Xge,{...d,ref:t,__scopeCheckbox:n}),p&&h.jsx(eye,{__scopeCheckbox:n})]})})});aB.displayName=S4;var Jge="CheckboxIndicator",Zge=A.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...s}=e,i=oB(Jge,n);return h.jsx(Li,{present:r||sp(i.checked)||i.checked===!0,children:h.jsx(xt.span,{"data-state":tye(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});Zge.displayName=Jge;var Qge="CheckboxBubbleInput",eye=A.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:s,checked:i,defaultChecked:o,required:a,disabled:l,name:c,value:u,form:d,bubbleInput:p,setBubbleInput:g}=oB(Qge,e),b=Ut(n,g),x=HT(i),S=JA(r);A.useEffect(()=>{const k=p;if(!k)return;const T=window.HTMLInputElement.prototype,M=Object.getOwnPropertyDescriptor(T,"checked").set,j=!s.current;if(x!==i&&M){const F=new Event("click",{bubbles:j});k.indeterminate=sp(i),M.call(k,sp(i)?!1:i),k.dispatchEvent(F)}},[p,x,i,s]);const E=A.useRef(sp(i)?!1:i);return h.jsx(xt.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??E.current,required:a,disabled:l,name:c,value:u,form:d,...t,tabIndex:-1,ref:b,style:{...t.style,...S,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});eye.displayName=Qge;function Egt(e){return typeof e=="function"}function sp(e){return e==="indeterminate"}function tye(e){return sp(e)?"indeterminate":e?"checked":"unchecked"}var qt=function(){return qt=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},qt.apply(this,arguments)};function Dgt(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function nye(e,t,n){for(var r=0,s=t.length,i;r<s;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}function PC(e){return e.mode==="multiple"}function MC(e){return e.mode==="range"}function C4(e){return e.mode==="single"}var Agt={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rdp-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"};function Tgt(e,t){return lo(e,"LLLL y",t)}function _gt(e,t){return lo(e,"d",t)}function Ngt(e,t){return lo(e,"LLLL",t)}function Pgt(e){return"".concat(e)}function Mgt(e,t){return lo(e,"cccccc",t)}function jgt(e,t){return lo(e,"yyyy",t)}var Fgt=Object.freeze({__proto__:null,formatCaption:Tgt,formatDay:_gt,formatMonthCaption:Ngt,formatWeekNumber:Pgt,formatWeekdayName:Mgt,formatYearCaption:jgt}),Igt=function(e,t,n){return lo(e,"do MMMM (EEEE)",n)},Ogt=function(){return"Month: "},Rgt=function(){return"Go to next month"},Lgt=function(){return"Go to previous month"},Bgt=function(e,t){return lo(e,"cccc",t)},$gt=function(e){return"Week n. ".concat(e)},zgt=function(){return"Year: "},Hgt=Object.freeze({__proto__:null,labelDay:Igt,labelMonthDropdown:Ogt,labelNext:Rgt,labelPrevious:Lgt,labelWeekNumber:$gt,labelWeekday:Bgt,labelYearDropdown:zgt});function Vgt(){var e="buttons",t=Agt,n=fL,r={},s={},i=1,o={},a=new Date;return{captionLayout:e,classNames:t,formatters:Fgt,labels:Hgt,locale:n,modifiersClassNames:r,modifiers:s,numberOfMonths:i,styles:o,today:a,mode:"default"}}function Ugt(e){var t=e.fromYear,n=e.toYear,r=e.fromMonth,s=e.toMonth,i=e.fromDate,o=e.toDate;return r?i=Ho(r):t&&(i=new Date(t,0,1)),s?o=OT(s):n&&(o=new Date(n,11,31)),{fromDate:i?Jb(i):void 0,toDate:o?Jb(o):void 0}}var rye=A.createContext(void 0);function Wgt(e){var t,n=e.initialProps,r=Vgt(),s=Ugt(n),i=s.fromDate,o=s.toDate,a=(t=n.captionLayout)!==null&&t!==void 0?t:r.captionLayout;a!=="buttons"&&(!i||!o)&&(a="buttons");var l;(C4(n)||PC(n)||MC(n))&&(l=n.onSelect);var c=qt(qt(qt({},r),n),{captionLayout:a,classNames:qt(qt({},r.classNames),n.classNames),components:qt({},n.components),formatters:qt(qt({},r.formatters),n.formatters),fromDate:i,labels:qt(qt({},r.labels),n.labels),mode:n.mode||r.mode,modifiers:qt(qt({},r.modifiers),n.modifiers),modifiersClassNames:qt(qt({},r.modifiersClassNames),n.modifiersClassNames),onSelect:l,styles:qt(qt({},r.styles),n.styles),toDate:o});return h.jsx(rye.Provider,{value:c,children:e.children})}function vr(){var e=A.useContext(rye);if(!e)throw new Error("useDayPicker must be used within a DayPickerProvider.");return e}function sye(e){var t=vr(),n=t.locale,r=t.classNames,s=t.styles,i=t.formatters.formatCaption;return h.jsx("div",{className:r.caption_label,style:s.caption_label,"aria-live":"polite",role:"presentation",id:e.id,children:i(e.displayMonth,{locale:n})})}function qgt(e){return h.jsx("svg",qt({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e,{children:h.jsx("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"})}))}function iye(e){var t,n,r=e.onChange,s=e.value,i=e.children,o=e.caption,a=e.className,l=e.style,c=vr(),u=(n=(t=c.components)===null||t===void 0?void 0:t.IconDropdown)!==null&&n!==void 0?n:qgt;return h.jsxs("div",{className:a,style:l,children:[h.jsx("span",{className:c.classNames.vhidden,children:e["aria-label"]}),h.jsx("select",{name:e.name,"aria-label":e["aria-label"],className:c.classNames.dropdown,style:c.styles.dropdown,value:s,onChange:r,children:i}),h.jsxs("div",{className:c.classNames.caption_label,style:c.styles.caption_label,"aria-hidden":"true",children:[o,h.jsx(u,{className:c.classNames.dropdown_icon,style:c.styles.dropdown_icon})]})]})}function Ggt(e){var t,n=vr(),r=n.fromDate,s=n.toDate,i=n.styles,o=n.locale,a=n.formatters.formatMonthCaption,l=n.classNames,c=n.components,u=n.labels.labelMonthDropdown;if(!r)return h.jsx(h.Fragment,{});if(!s)return h.jsx(h.Fragment,{});var d=[];if(Lrt(r,s))for(var p=Ho(r),g=r.getMonth();g<=s.getMonth();g++)d.push(R9(p,g));else for(var p=Ho(new Date),g=0;g<=11;g++)d.push(R9(p,g));var b=function(S){var E=Number(S.target.value),k=R9(Ho(e.displayMonth),E);e.onChange(k)},x=(t=c==null?void 0:c.Dropdown)!==null&&t!==void 0?t:iye;return h.jsx(x,{name:"months","aria-label":u(),className:l.dropdown_month,style:i.dropdown_month,onChange:b,value:e.displayMonth.getMonth(),caption:a(e.displayMonth,{locale:o}),children:d.map(function(S){return h.jsx("option",{value:S.getMonth(),children:a(S,{locale:o})},S.getMonth())})})}function Ygt(e){var t,n=e.displayMonth,r=vr(),s=r.fromDate,i=r.toDate,o=r.locale,a=r.styles,l=r.classNames,c=r.components,u=r.formatters.formatYearCaption,d=r.labels.labelYearDropdown,p=[];if(!s)return h.jsx(h.Fragment,{});if(!i)return h.jsx(h.Fragment,{});for(var g=s.getFullYear(),b=i.getFullYear(),x=g;x<=b;x++)p.push(bX(zhe(new Date),x));var S=function(k){var T=bX(Ho(n),Number(k.target.value));e.onChange(T)},E=(t=c==null?void 0:c.Dropdown)!==null&&t!==void 0?t:iye;return h.jsx(E,{name:"years","aria-label":d(),className:l.dropdown_year,style:a.dropdown_year,onChange:S,value:n.getFullYear(),caption:u(n,{locale:o}),children:p.map(function(k){return h.jsx("option",{value:k.getFullYear(),children:u(k,{locale:o})},k.getFullYear())})})}function Kgt(e,t){var n=A.useState(e),r=n[0],s=n[1],i=t===void 0?r:t;return[i,s]}function Xgt(e){var t=e.month,n=e.defaultMonth,r=e.today,s=t||n||r||new Date,i=e.toDate,o=e.fromDate,a=e.numberOfMonths,l=a===void 0?1:a;if(i&&Zb(i,s)<0){var c=-1*(l-1);s=mc(i,c)}return o&&Zb(s,o)<0&&(s=o),Ho(s)}function Jgt(){var e=vr(),t=Xgt(e),n=Kgt(t,e.month),r=n[0],s=n[1],i=function(o){var a;if(!e.disableNavigation){var l=Ho(o);s(l),(a=e.onMonthChange)===null||a===void 0||a.call(e,l)}};return[r,i]}function Zgt(e,t){for(var n=t.reverseMonths,r=t.numberOfMonths,s=Ho(e),i=Ho(mc(s,r)),o=Zb(i,s),a=[],l=0;l<o;l++){var c=mc(s,l);a.push(c)}return n&&(a=a.reverse()),a}function Qgt(e,t){if(!t.disableNavigation){var n=t.toDate,r=t.pagedNavigation,s=t.numberOfMonths,i=s===void 0?1:s,o=r?i:1,a=Ho(e);if(!n)return mc(a,o);var l=Zb(n,e);if(!(l<i))return mc(a,o)}}function eyt(e,t){if(!t.disableNavigation){var n=t.fromDate,r=t.pagedNavigation,s=t.numberOfMonths,i=s===void 0?1:s,o=r?i:1,a=Ho(e);if(!n)return mc(a,-o);var l=Zb(a,n);if(!(l<=0))return mc(a,-o)}}var oye=A.createContext(void 0);function tyt(e){var t=vr(),n=Jgt(),r=n[0],s=n[1],i=Zgt(r,t),o=Qgt(r,t),a=eyt(r,t),l=function(d){return i.some(function(p){return pL(d,p)})},c=function(d,p){l(d)||(p&&Ghe(d,p)?s(mc(d,1+t.numberOfMonths*-1)):s(d))},u={currentMonth:r,displayMonths:i,goToMonth:s,goToDate:c,previousMonth:a,nextMonth:o,isDateDisplayed:l};return h.jsx(oye.Provider,{value:u,children:e.children})}function jC(){var e=A.useContext(oye);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}function VZ(e){var t,n=vr(),r=n.classNames,s=n.styles,i=n.components,o=jC().goToMonth,a=function(u){o(mc(u,e.displayIndex?-e.displayIndex:0))},l=(t=i==null?void 0:i.CaptionLabel)!==null&&t!==void 0?t:sye,c=h.jsx(l,{id:e.id,displayMonth:e.displayMonth});return h.jsxs("div",{className:r.caption_dropdowns,style:s.caption_dropdowns,children:[h.jsx("div",{className:r.vhidden,children:c}),h.jsx(Ggt,{onChange:a,displayMonth:e.displayMonth}),h.jsx(Ygt,{onChange:a,displayMonth:e.displayMonth})]})}function nyt(e){return h.jsx("svg",qt({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:h.jsx("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"})}))}function ryt(e){return h.jsx("svg",qt({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:h.jsx("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"})}))}var Z3=A.forwardRef(function(e,t){var n=vr(),r=n.classNames,s=n.styles,i=[r.button_reset,r.button];e.className&&i.push(e.className);var o=i.join(" "),a=qt(qt({},s.button_reset),s.button);return e.style&&Object.assign(a,e.style),h.jsx("button",qt({},e,{ref:t,type:"button",className:o,style:a}))});function syt(e){var t,n,r=vr(),s=r.dir,i=r.locale,o=r.classNames,a=r.styles,l=r.labels,c=l.labelPrevious,u=l.labelNext,d=r.components;if(!e.nextMonth&&!e.previousMonth)return h.jsx(h.Fragment,{});var p=c(e.previousMonth,{locale:i}),g=[o.nav_button,o.nav_button_previous].join(" "),b=u(e.nextMonth,{locale:i}),x=[o.nav_button,o.nav_button_next].join(" "),S=(t=d==null?void 0:d.IconRight)!==null&&t!==void 0?t:ryt,E=(n=d==null?void 0:d.IconLeft)!==null&&n!==void 0?n:nyt;return h.jsxs("div",{className:o.nav,style:a.nav,children:[!e.hidePrevious&&h.jsx(Z3,{name:"previous-month","aria-label":p,className:g,style:a.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:s==="rtl"?h.jsx(S,{className:o.nav_icon,style:a.nav_icon}):h.jsx(E,{className:o.nav_icon,style:a.nav_icon})}),!e.hideNext&&h.jsx(Z3,{name:"next-month","aria-label":b,className:x,style:a.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:s==="rtl"?h.jsx(E,{className:o.nav_icon,style:a.nav_icon}):h.jsx(S,{className:o.nav_icon,style:a.nav_icon})})]})}function UZ(e){var t=vr().numberOfMonths,n=jC(),r=n.previousMonth,s=n.nextMonth,i=n.goToMonth,o=n.displayMonths,a=o.findIndex(function(b){return pL(e.displayMonth,b)}),l=a===0,c=a===o.length-1,u=t>1&&(l||!c),d=t>1&&(c||!l),p=function(){r&&i(r)},g=function(){s&&i(s)};return h.jsx(syt,{displayMonth:e.displayMonth,hideNext:u,hidePrevious:d,nextMonth:s,previousMonth:r,onPreviousClick:p,onNextClick:g})}function iyt(e){var t,n=vr(),r=n.classNames,s=n.disableNavigation,i=n.styles,o=n.captionLayout,a=n.components,l=(t=a==null?void 0:a.CaptionLabel)!==null&&t!==void 0?t:sye,c;return s?c=h.jsx(l,{id:e.id,displayMonth:e.displayMonth}):o==="dropdown"?c=h.jsx(VZ,{displayMonth:e.displayMonth,id:e.id}):o==="dropdown-buttons"?c=h.jsxs(h.Fragment,{children:[h.jsx(VZ,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),h.jsx(UZ,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):c=h.jsxs(h.Fragment,{children:[h.jsx(l,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),h.jsx(UZ,{displayMonth:e.displayMonth,id:e.id})]}),h.jsx("div",{className:r.caption,style:i.caption,children:c})}function oyt(e){var t=vr(),n=t.footer,r=t.styles,s=t.classNames.tfoot;return n?h.jsx("tfoot",{className:s,style:r.tfoot,children:h.jsx("tr",{children:h.jsx("td",{colSpan:8,children:n})})}):h.jsx(h.Fragment,{})}function ayt(e,t,n){for(var r=n?Ng(new Date):Iu(new Date,{locale:e,weekStartsOn:t}),s=[],i=0;i<7;i++){var o=Ki(r,i);s.push(o)}return s}function lyt(){var e=vr(),t=e.classNames,n=e.styles,r=e.showWeekNumber,s=e.locale,i=e.weekStartsOn,o=e.ISOWeek,a=e.formatters.formatWeekdayName,l=e.labels.labelWeekday,c=ayt(s,i,o);return h.jsxs("tr",{style:n.head_row,className:t.head_row,children:[r&&h.jsx("td",{style:n.head_cell,className:t.head_cell}),c.map(function(u,d){return h.jsx("th",{scope:"col",className:t.head_cell,style:n.head_cell,"aria-label":l(u,{locale:s}),children:a(u,{locale:s})},d)})]})}function cyt(){var e,t=vr(),n=t.classNames,r=t.styles,s=t.components,i=(e=s==null?void 0:s.HeadRow)!==null&&e!==void 0?e:lyt;return h.jsx("thead",{style:r.head,className:n.head,children:h.jsx(i,{})})}function uyt(e){var t=vr(),n=t.locale,r=t.formatters.formatDay;return h.jsx(h.Fragment,{children:r(e.date,{locale:n})})}var lB=A.createContext(void 0);function dyt(e){if(!PC(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return h.jsx(lB.Provider,{value:t,children:e.children})}return h.jsx(hyt,{initialProps:e.initialProps,children:e.children})}function hyt(e){var t=e.initialProps,n=e.children,r=t.selected,s=t.min,i=t.max,o=function(c,u,d){var p,g;(p=t.onDayClick)===null||p===void 0||p.call(t,c,u,d);var b=!!(u.selected&&s&&(r==null?void 0:r.length)===s);if(!b){var x=!!(!u.selected&&i&&(r==null?void 0:r.length)===i);if(!x){var S=r?nye([],r):[];if(u.selected){var E=S.findIndex(function(k){return Io(c,k)});S.splice(E,1)}else S.push(c);(g=t.onSelect)===null||g===void 0||g.call(t,S,c,u,d)}}},a={disabled:[]};r&&a.disabled.push(function(c){var u=i&&r.length>i-1,d=r.some(function(p){return Io(p,c)});return!!(u&&!d)});var l={selected:r,onDayClick:o,modifiers:a};return h.jsx(lB.Provider,{value:l,children:n})}function cB(){var e=A.useContext(lB);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}function fyt(e,t){var n=t||{},r=n.from,s=n.to;return r&&s?Io(s,e)&&Io(r,e)?void 0:Io(s,e)?{from:s,to:void 0}:Io(r,e)?void 0:QM(r,e)?{from:e,to:s}:{from:r,to:e}:s?QM(e,s)?{from:s,to:e}:{from:e,to:s}:r?Ghe(e,r)?{from:e,to:r}:{from:r,to:e}:{from:e,to:void 0}}var uB=A.createContext(void 0);function pyt(e){if(!MC(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return h.jsx(uB.Provider,{value:t,children:e.children})}return h.jsx(myt,{initialProps:e.initialProps,children:e.children})}function myt(e){var t=e.initialProps,n=e.children,r=t.selected,s=r||{},i=s.from,o=s.to,a=t.min,l=t.max,c=function(g,b,x){var S,E;(S=t.onDayClick)===null||S===void 0||S.call(t,g,b,x);var k=fyt(g,r);(E=t.onSelect)===null||E===void 0||E.call(t,k,g,b,x)},u={range_start:[],range_end:[],range_middle:[],disabled:[]};if(i?(u.range_start=[i],o?(u.range_end=[o],Io(i,o)||(u.range_middle=[{after:i,before:o}])):u.range_end=[i]):o&&(u.range_start=[o],u.range_end=[o]),a&&(i&&!o&&u.disabled.push({after:O9(i,a-1),before:Ki(i,a-1)}),i&&o&&u.disabled.push({after:i,before:Ki(i,a-1)}),!i&&o&&u.disabled.push({after:O9(o,a-1),before:Ki(o,a-1)})),l){if(i&&!o&&(u.disabled.push({before:Ki(i,-l+1)}),u.disabled.push({after:Ki(i,l-1)})),i&&o){var d=cu(o,i)+1,p=l-d;u.disabled.push({before:O9(i,p)}),u.disabled.push({after:Ki(o,p)})}!i&&o&&(u.disabled.push({before:Ki(o,-l+1)}),u.disabled.push({after:Ki(o,l-1)}))}return h.jsx(uB.Provider,{value:{selected:r,onDayClick:c,modifiers:u},children:n})}function dB(){var e=A.useContext(uB);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function pD(e){return Array.isArray(e)?nye([],e):e!==void 0?[e]:[]}function gyt(e){var t={};return Object.entries(e).forEach(function(n){var r=n[0],s=n[1];t[r]=pD(s)}),t}var yc;(function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"})(yc||(yc={}));var yyt=yc.Selected,vd=yc.Disabled,byt=yc.Hidden,xyt=yc.Today,a7=yc.RangeEnd,l7=yc.RangeMiddle,c7=yc.RangeStart,vyt=yc.Outside;function wyt(e,t,n){var r,s=(r={},r[yyt]=pD(e.selected),r[vd]=pD(e.disabled),r[byt]=pD(e.hidden),r[xyt]=[e.today],r[a7]=[],r[l7]=[],r[c7]=[],r[vyt]=[],r);return e.fromDate&&s[vd].push({before:e.fromDate}),e.toDate&&s[vd].push({after:e.toDate}),PC(e)?s[vd]=s[vd].concat(t.modifiers[vd]):MC(e)&&(s[vd]=s[vd].concat(n.modifiers[vd]),s[c7]=n.modifiers[c7],s[l7]=n.modifiers[l7],s[a7]=n.modifiers[a7]),s}var aye=A.createContext(void 0);function Syt(e){var t=vr(),n=cB(),r=dB(),s=wyt(t,n,r),i=gyt(t.modifiers),o=qt(qt({},s),i);return h.jsx(aye.Provider,{value:o,children:e.children})}function lye(){var e=A.useContext(aye);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function Cyt(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function kyt(e){return!!(e&&typeof e=="object"&&"from"in e)}function Eyt(e){return!!(e&&typeof e=="object"&&"after"in e)}function Dyt(e){return!!(e&&typeof e=="object"&&"before"in e)}function Ayt(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function Tyt(e,t){var n,r=t.from,s=t.to;if(r&&s){var i=cu(s,r)<0;i&&(n=[s,r],r=n[0],s=n[1]);var o=cu(e,r)>=0&&cu(s,e)>=0;return o}return s?Io(s,e):r?Io(r,e):!1}function _yt(e){return uL(e)}function Nyt(e){return Array.isArray(e)&&e.every(uL)}function Pyt(e,t){return t.some(function(n){if(typeof n=="boolean")return n;if(_yt(n))return Io(e,n);if(Nyt(n))return n.includes(e);if(kyt(n))return Tyt(e,n);if(Ayt(n))return n.dayOfWeek.includes(e.getDay());if(Cyt(n)){var r=cu(n.before,e),s=cu(n.after,e),i=r>0,o=s<0,a=QM(n.before,n.after);return a?o&&i:i||o}return Eyt(n)?cu(e,n.after)>0:Dyt(n)?cu(n.before,e)>0:typeof n=="function"?n(e):!1})}function hB(e,t,n){var r=Object.keys(t).reduce(function(i,o){var a=t[o];return Pyt(e,a)&&i.push(o),i},[]),s={};return r.forEach(function(i){return s[i]=!0}),n&&!pL(e,n)&&(s.outside=!0),s}function Myt(e,t){for(var n=Ho(e[0]),r=OT(e[e.length-1]),s,i,o=n;o<=r;){var a=hB(o,t),l=!a.disabled&&!a.hidden;if(!l){o=Ki(o,1);continue}if(a.selected)return o;a.today&&!i&&(i=o),s||(s=o),o=Ki(o,1)}return i||s}var jyt=365;function cye(e,t){var n=t.moveBy,r=t.direction,s=t.context,i=t.modifiers,o=t.retry,a=o===void 0?{count:0,lastFocused:e}:o,l=s.weekStartsOn,c=s.fromDate,u=s.toDate,d=s.locale,p={day:Ki,week:ZM,month:mc,year:Dnt,startOfWeek:function(S){return s.ISOWeek?Ng(S):Iu(S,{locale:d,weekStartsOn:l})},endOfWeek:function(S){return s.ISOWeek?Hhe(S):hL(S,{locale:d,weekStartsOn:l})}},g=p[n](e,r==="after"?1:-1);r==="before"&&c?g=Ant([c,g]):r==="after"&&u&&(g=Tnt([u,g]));var b=!0;if(i){var x=hB(g,i);b=!x.disabled&&!x.hidden}return b?g:a.count>jyt?a.lastFocused:cye(g,{moveBy:n,direction:r,context:s,modifiers:i,retry:qt(qt({},a),{count:a.count+1})})}var uye=A.createContext(void 0);function Fyt(e){var t=jC(),n=lye(),r=A.useState(),s=r[0],i=r[1],o=A.useState(),a=o[0],l=o[1],c=Myt(t.displayMonths,n),u=s??(a&&t.isDateDisplayed(a))?a:c,d=function(){l(s),i(void 0)},p=function(S){i(S)},g=vr(),b=function(S,E){if(s){var k=cye(s,{moveBy:S,direction:E,context:g,modifiers:n});Io(s,k)||(t.goToDate(k,s),p(k))}},x={focusedDay:s,focusTarget:u,blur:d,focus:p,focusDayAfter:function(){return b("day","after")},focusDayBefore:function(){return b("day","before")},focusWeekAfter:function(){return b("week","after")},focusWeekBefore:function(){return b("week","before")},focusMonthBefore:function(){return b("month","before")},focusMonthAfter:function(){return b("month","after")},focusYearBefore:function(){return b("year","before")},focusYearAfter:function(){return b("year","after")},focusStartOfWeek:function(){return b("startOfWeek","before")},focusEndOfWeek:function(){return b("endOfWeek","after")}};return h.jsx(uye.Provider,{value:x,children:e.children})}function fB(){var e=A.useContext(uye);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}function Iyt(e,t){var n=lye(),r=hB(e,n,t);return r}var pB=A.createContext(void 0);function Oyt(e){if(!C4(e.initialProps)){var t={selected:void 0};return h.jsx(pB.Provider,{value:t,children:e.children})}return h.jsx(Ryt,{initialProps:e.initialProps,children:e.children})}function Ryt(e){var t=e.initialProps,n=e.children,r=function(i,o,a){var l,c,u;if((l=t.onDayClick)===null||l===void 0||l.call(t,i,o,a),o.selected&&!t.required){(c=t.onSelect)===null||c===void 0||c.call(t,void 0,i,o,a);return}(u=t.onSelect)===null||u===void 0||u.call(t,i,i,o,a)},s={selected:t.selected,onDayClick:r};return h.jsx(pB.Provider,{value:s,children:n})}function dye(){var e=A.useContext(pB);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function Lyt(e,t){var n=vr(),r=dye(),s=cB(),i=dB(),o=fB(),a=o.focusDayAfter,l=o.focusDayBefore,c=o.focusWeekAfter,u=o.focusWeekBefore,d=o.blur,p=o.focus,g=o.focusMonthBefore,b=o.focusMonthAfter,x=o.focusYearBefore,S=o.focusYearAfter,E=o.focusStartOfWeek,k=o.focusEndOfWeek,T=function(q){var z,Y,U,X;C4(n)?(z=r.onDayClick)===null||z===void 0||z.call(r,e,t,q):PC(n)?(Y=s.onDayClick)===null||Y===void 0||Y.call(s,e,t,q):MC(n)?(U=i.onDayClick)===null||U===void 0||U.call(i,e,t,q):(X=n.onDayClick)===null||X===void 0||X.call(n,e,t,q)},P=function(q){var z;p(e),(z=n.onDayFocus)===null||z===void 0||z.call(n,e,t,q)},M=function(q){var z;d(),(z=n.onDayBlur)===null||z===void 0||z.call(n,e,t,q)},j=function(q){var z;(z=n.onDayMouseEnter)===null||z===void 0||z.call(n,e,t,q)},F=function(q){var z;(z=n.onDayMouseLeave)===null||z===void 0||z.call(n,e,t,q)},I=function(q){var z;(z=n.onDayPointerEnter)===null||z===void 0||z.call(n,e,t,q)},B=function(q){var z;(z=n.onDayPointerLeave)===null||z===void 0||z.call(n,e,t,q)},L=function(q){var z;(z=n.onDayTouchCancel)===null||z===void 0||z.call(n,e,t,q)},W=function(q){var z;(z=n.onDayTouchEnd)===null||z===void 0||z.call(n,e,t,q)},$=function(q){var z;(z=n.onDayTouchMove)===null||z===void 0||z.call(n,e,t,q)},J=function(q){var z;(z=n.onDayTouchStart)===null||z===void 0||z.call(n,e,t,q)},V=function(q){var z;(z=n.onDayKeyUp)===null||z===void 0||z.call(n,e,t,q)},Z=function(q){var z;switch(q.key){case"ArrowLeft":q.preventDefault(),q.stopPropagation(),n.dir==="rtl"?a():l();break;case"ArrowRight":q.preventDefault(),q.stopPropagation(),n.dir==="rtl"?l():a();break;case"ArrowDown":q.preventDefault(),q.stopPropagation(),c();break;case"ArrowUp":q.preventDefault(),q.stopPropagation(),u();break;case"PageUp":q.preventDefault(),q.stopPropagation(),q.shiftKey?x():g();break;case"PageDown":q.preventDefault(),q.stopPropagation(),q.shiftKey?S():b();break;case"Home":q.preventDefault(),q.stopPropagation(),E();break;case"End":q.preventDefault(),q.stopPropagation(),k();break}(z=n.onDayKeyDown)===null||z===void 0||z.call(n,e,t,q)},G={onClick:T,onFocus:P,onBlur:M,onKeyDown:Z,onKeyUp:V,onMouseEnter:j,onMouseLeave:F,onPointerEnter:I,onPointerLeave:B,onTouchCancel:L,onTouchEnd:W,onTouchMove:$,onTouchStart:J};return G}function Byt(){var e=vr(),t=dye(),n=cB(),r=dB(),s=C4(e)?t.selected:PC(e)?n.selected:MC(e)?r.selected:void 0;return s}function $yt(e){return Object.values(yc).includes(e)}function zyt(e,t){var n=[e.classNames.day];return Object.keys(t).forEach(function(r){var s=e.modifiersClassNames[r];if(s)n.push(s);else if($yt(r)){var i=e.classNames["day_".concat(r)];i&&n.push(i)}}),n}function Hyt(e,t){var n=qt({},e.styles.day);return Object.keys(t).forEach(function(r){var s;n=qt(qt({},n),(s=e.modifiersStyles)===null||s===void 0?void 0:s[r])}),n}function Vyt(e,t,n){var r,s,i,o=vr(),a=fB(),l=Iyt(e,t),c=Lyt(e,l),u=Byt(),d=!!(o.onDayClick||o.mode!=="default");A.useEffect(function(){var j;l.outside||a.focusedDay&&d&&Io(a.focusedDay,e)&&((j=n.current)===null||j===void 0||j.focus())},[a.focusedDay,e,n,d,l.outside]);var p=zyt(o,l).join(" "),g=Hyt(o,l),b=!!(l.outside&&!o.showOutsideDays||l.hidden),x=(i=(s=o.components)===null||s===void 0?void 0:s.DayContent)!==null&&i!==void 0?i:uyt,S=h.jsx(x,{date:e,displayMonth:t,activeModifiers:l}),E={style:g,className:p,children:S,role:"gridcell"},k=a.focusTarget&&Io(a.focusTarget,e)&&!l.outside,T=a.focusedDay&&Io(a.focusedDay,e),P=qt(qt(qt({},E),(r={disabled:l.disabled,role:"gridcell"},r["aria-selected"]=l.selected,r.tabIndex=T||k?0:-1,r)),c),M={isButton:d,isHidden:b,activeModifiers:l,selectedDays:u,buttonProps:P,divProps:E};return M}function Uyt(e){var t=A.useRef(null),n=Vyt(e.date,e.displayMonth,t);return n.isHidden?h.jsx("div",{role:"gridcell"}):n.isButton?h.jsx(Z3,qt({name:"day",ref:t},n.buttonProps)):h.jsx("div",qt({},n.divProps))}function Wyt(e){var t=e.number,n=e.dates,r=vr(),s=r.onWeekNumberClick,i=r.styles,o=r.classNames,a=r.locale,l=r.labels.labelWeekNumber,c=r.formatters.formatWeekNumber,u=c(Number(t),{locale:a});if(!s)return h.jsx("span",{className:o.weeknumber,style:i.weeknumber,children:u});var d=l(Number(t),{locale:a}),p=function(g){s(t,n,g)};return h.jsx(Z3,{name:"week-number","aria-label":d,className:o.weeknumber,style:i.weeknumber,onClick:p,children:u})}function qyt(e){var t,n,r=vr(),s=r.styles,i=r.classNames,o=r.showWeekNumber,a=r.components,l=(t=a==null?void 0:a.Day)!==null&&t!==void 0?t:Uyt,c=(n=a==null?void 0:a.WeekNumber)!==null&&n!==void 0?n:Wyt,u;return o&&(u=h.jsx("td",{className:i.cell,style:s.cell,children:h.jsx(c,{number:e.weekNumber,dates:e.dates})})),h.jsxs("tr",{className:i.row,style:s.row,children:[u,e.dates.map(function(d){return h.jsx("td",{className:i.cell,style:s.cell,role:"presentation",children:h.jsx(l,{displayMonth:e.displayMonth,date:d})},Irt(d))})]})}function WZ(e,t,n){for(var r=n!=null&&n.ISOWeek?Hhe(t):hL(t,n),s=n!=null&&n.ISOWeek?Ng(e):Iu(e,n),i=cu(r,s),o=[],a=0;a<=i;a++)o.push(Ki(s,a));var l=o.reduce(function(c,u){var d=n!=null&&n.ISOWeek?Vhe(u):Whe(u,n),p=c.find(function(g){return g.weekNumber===d});return p?(p.dates.push(u),c):(c.push({weekNumber:d,dates:[u]}),c)},[]);return l}function Gyt(e,t){var n=WZ(Ho(e),OT(e),t);if(t!=null&&t.useFixedWeeks){var r=Rrt(e,t);if(r<6){var s=n[n.length-1],i=s.dates[s.dates.length-1],o=ZM(i,6-r),a=WZ(ZM(i,1),o,t);n.push.apply(n,a)}}return n}function Yyt(e){var t,n,r,s=vr(),i=s.locale,o=s.classNames,a=s.styles,l=s.hideHead,c=s.fixedWeeks,u=s.components,d=s.weekStartsOn,p=s.firstWeekContainsDate,g=s.ISOWeek,b=Gyt(e.displayMonth,{useFixedWeeks:!!c,ISOWeek:g,locale:i,weekStartsOn:d,firstWeekContainsDate:p}),x=(t=u==null?void 0:u.Head)!==null&&t!==void 0?t:cyt,S=(n=u==null?void 0:u.Row)!==null&&n!==void 0?n:qyt,E=(r=u==null?void 0:u.Footer)!==null&&r!==void 0?r:oyt;return h.jsxs("table",{id:e.id,className:o.table,style:a.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!l&&h.jsx(x,{}),h.jsx("tbody",{className:o.tbody,style:a.tbody,children:b.map(function(k){return h.jsx(S,{displayMonth:e.displayMonth,dates:k.dates,weekNumber:k.weekNumber},k.weekNumber)})}),h.jsx(E,{displayMonth:e.displayMonth})]})}function Kyt(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var Xyt=Kyt()?A.useLayoutEffect:A.useEffect,u7=!1,Jyt=0;function qZ(){return"react-day-picker-".concat(++Jyt)}function Zyt(e){var t,n=e??(u7?qZ():null),r=A.useState(n),s=r[0],i=r[1];return Xyt(function(){s===null&&i(qZ())},[]),A.useEffect(function(){u7===!1&&(u7=!0)},[]),(t=e??s)!==null&&t!==void 0?t:void 0}function Qyt(e){var t,n,r=vr(),s=r.dir,i=r.classNames,o=r.styles,a=r.components,l=jC().displayMonths,c=Zyt(r.id?"".concat(r.id,"-").concat(e.displayIndex):void 0),u=r.id?"".concat(r.id,"-grid-").concat(e.displayIndex):void 0,d=[i.month],p=o.month,g=e.displayIndex===0,b=e.displayIndex===l.length-1,x=!g&&!b;s==="rtl"&&(t=[g,b],b=t[0],g=t[1]),g&&(d.push(i.caption_start),p=qt(qt({},p),o.caption_start)),b&&(d.push(i.caption_end),p=qt(qt({},p),o.caption_end)),x&&(d.push(i.caption_between),p=qt(qt({},p),o.caption_between));var S=(n=a==null?void 0:a.Caption)!==null&&n!==void 0?n:iyt;return h.jsxs("div",{className:d.join(" "),style:p,children:[h.jsx(S,{id:c,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),h.jsx(Yyt,{id:u,"aria-labelledby":c,displayMonth:e.displayMonth})]},e.displayIndex)}function e0t(e){var t=vr(),n=t.classNames,r=t.styles;return h.jsx("div",{className:n.months,style:r.months,children:e.children})}function t0t(e){var t,n,r=e.initialProps,s=vr(),i=fB(),o=jC(),a=A.useState(!1),l=a[0],c=a[1];A.useEffect(function(){s.initialFocus&&i.focusTarget&&(l||(i.focus(i.focusTarget),c(!0)))},[s.initialFocus,l,i.focus,i.focusTarget,i]);var u=[s.classNames.root,s.className];s.numberOfMonths>1&&u.push(s.classNames.multiple_months),s.showWeekNumber&&u.push(s.classNames.with_weeknumber);var d=qt(qt({},s.styles.root),s.style),p=Object.keys(r).filter(function(b){return b.startsWith("data-")}).reduce(function(b,x){var S;return qt(qt({},b),(S={},S[x]=r[x],S))},{}),g=(n=(t=r.components)===null||t===void 0?void 0:t.Months)!==null&&n!==void 0?n:e0t;return h.jsx("div",qt({className:u.join(" "),style:d,dir:s.dir,id:s.id,nonce:r.nonce,title:r.title,lang:r.lang},p,{children:h.jsx(g,{children:o.displayMonths.map(function(b,x){return h.jsx(Qyt,{displayIndex:x,displayMonth:b},x)})})}))}function n0t(e){var t=e.children,n=Dgt(e,["children"]);return h.jsx(Wgt,{initialProps:n,children:h.jsx(tyt,{children:h.jsx(Oyt,{initialProps:n,children:h.jsx(dyt,{initialProps:n,children:h.jsx(pyt,{initialProps:n,children:h.jsx(Syt,{children:h.jsx(Fyt,{children:t})})})})})})})}function r0t(e){return h.jsx(n0t,qt({},e,{children:h.jsx(t0t,{initialProps:e})}))}var s0t=[" ","Enter","ArrowUp","ArrowDown"],i0t=[" ","Enter"],Og="Select",[k4,E4,o0t]=mL(Og),[H1,YDt]=Ri(Og,[o0t,N1]),D4=N1(),[a0t,$p]=H1(Og),[l0t,c0t]=H1(Og),hye=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:s,onOpenChange:i,value:o,defaultValue:a,onValueChange:l,dir:c,name:u,autoComplete:d,disabled:p,required:g,form:b}=e,x=D4(t),[S,E]=A.useState(null),[k,T]=A.useState(null),[P,M]=A.useState(!1),j=$1(c),[F,I]=lc({prop:r,defaultProp:s??!1,onChange:i,caller:Og}),[B,L]=lc({prop:o,defaultProp:a,onChange:l,caller:Og}),W=A.useRef(null),$=S?b||!!S.closest("form"):!0,[J,V]=A.useState(new Set),Z=Array.from(J).map(G=>G.props.value).join(";");return h.jsx(vO,{...x,children:h.jsxs(a0t,{required:g,scope:t,trigger:S,onTriggerChange:E,valueNode:k,onValueNodeChange:T,valueNodeHasChildren:P,onValueNodeHasChildrenChange:M,contentId:tc(),value:B,onValueChange:L,open:F,onOpenChange:I,dir:j,triggerPointerDownPosRef:W,disabled:p,children:[h.jsx(k4.Provider,{scope:t,children:h.jsx(l0t,{scope:e.__scopeSelect,onNativeOptionAdd:A.useCallback(G=>{V(q=>new Set(q).add(G))},[]),onNativeOptionRemove:A.useCallback(G=>{V(q=>{const z=new Set(q);return z.delete(G),z})},[]),children:n})}),$?h.jsxs(Mye,{"aria-hidden":!0,required:g,tabIndex:-1,name:u,autoComplete:d,value:B,onChange:G=>L(G.target.value),disabled:p,form:b,children:[B===void 0?h.jsx("option",{value:""}):null,Array.from(J)]},Z):null]})})};hye.displayName=Og;var fye="SelectTrigger",pye=A.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...s}=e,i=D4(n),o=$p(fye,n),a=o.disabled||r,l=Ut(t,o.onTriggerChange),c=E4(n),u=A.useRef("touch"),[d,p,g]=Fye(x=>{const S=c().filter(T=>!T.disabled),E=S.find(T=>T.value===o.value),k=Iye(S,x,E);k!==void 0&&o.onValueChange(k.value)}),b=x=>{a||(o.onOpenChange(!0),g()),x&&(o.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)})};return h.jsx(ZA,{asChild:!0,...i,children:h.jsx(xt.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":jye(o.value)?"":void 0,...s,ref:l,onClick:bt(s.onClick,x=>{x.currentTarget.focus(),u.current!=="mouse"&&b(x)}),onPointerDown:bt(s.onPointerDown,x=>{u.current=x.pointerType;const S=x.target;S.hasPointerCapture(x.pointerId)&&S.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&x.pointerType==="mouse"&&(b(x),x.preventDefault())}),onKeyDown:bt(s.onKeyDown,x=>{const S=d.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&p(x.key),!(S&&x.key===" ")&&s0t.includes(x.key)&&(b(),x.preventDefault())})})})});pye.displayName=fye;var mye="SelectValue",gye=A.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,children:i,placeholder:o="",...a}=e,l=$p(mye,n),{onValueNodeHasChildrenChange:c}=l,u=i!==void 0,d=Ut(t,l.onValueNodeChange);return ds(()=>{c(u)},[c,u]),h.jsx(xt.span,{...a,ref:d,style:{pointerEvents:"none"},children:jye(l.value)?h.jsx(h.Fragment,{children:o}):i})});gye.displayName=mye;var u0t="SelectIcon",yye=A.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...s}=e;return h.jsx(xt.span,{"aria-hidden":!0,...s,ref:t,children:r||"▼"})});yye.displayName=u0t;var d0t="SelectPortal",bye=e=>h.jsx(KS,{asChild:!0,...e});bye.displayName=d0t;var Rg="SelectContent",xye=A.forwardRef((e,t)=>{const n=$p(Rg,e.__scopeSelect),[r,s]=A.useState();if(ds(()=>{s(new DocumentFragment)},[]),!n.open){const i=r;return i?HS.createPortal(h.jsx(vye,{scope:e.__scopeSelect,children:h.jsx(k4.Slot,{scope:e.__scopeSelect,children:h.jsx("div",{children:e.children})})}),i):null}return h.jsx(wye,{...e,ref:t})});xye.displayName=Rg;var Bl=10,[vye,zp]=H1(Rg),h0t="SelectContentImpl",f0t=hg("SelectContent.RemoveScroll"),wye=A.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:p,collisionPadding:g,sticky:b,hideWhenDetached:x,avoidCollisions:S,...E}=e,k=$p(Rg,n),[T,P]=A.useState(null),[M,j]=A.useState(null),F=Ut(t,ae=>P(ae)),[I,B]=A.useState(null),[L,W]=A.useState(null),$=E4(n),[J,V]=A.useState(!1),Z=A.useRef(!1);A.useEffect(()=>{if(T)return aO(T)},[T]),iO();const G=A.useCallback(ae=>{const[le,...pe]=$().map(Ee=>Ee.ref.current),[ye]=pe.slice(-1),Te=document.activeElement;for(const Ee of ae)if(Ee===Te||(Ee==null||Ee.scrollIntoView({block:"nearest"}),Ee===le&&M&&(M.scrollTop=0),Ee===ye&&M&&(M.scrollTop=M.scrollHeight),Ee==null||Ee.focus(),document.activeElement!==Te))return},[$,M]),q=A.useCallback(()=>G([I,T]),[G,I,T]);A.useEffect(()=>{J&&q()},[J,q]);const{onOpenChange:z,triggerPointerDownPosRef:Y}=k;A.useEffect(()=>{if(T){let ae={x:0,y:0};const le=ye=>{var Te,Ee;ae={x:Math.abs(Math.round(ye.pageX)-(((Te=Y.current)==null?void 0:Te.x)??0)),y:Math.abs(Math.round(ye.pageY)-(((Ee=Y.current)==null?void 0:Ee.y)??0))}},pe=ye=>{ae.x<=10&&ae.y<=10?ye.preventDefault():T.contains(ye.target)||z(!1),document.removeEventListener("pointermove",le),Y.current=null};return Y.current!==null&&(document.addEventListener("pointermove",le),document.addEventListener("pointerup",pe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",le),document.removeEventListener("pointerup",pe,{capture:!0})}}},[T,z,Y]),A.useEffect(()=>{const ae=()=>z(!1);return window.addEventListener("blur",ae),window.addEventListener("resize",ae),()=>{window.removeEventListener("blur",ae),window.removeEventListener("resize",ae)}},[z]);const[U,X]=Fye(ae=>{const le=$().filter(Te=>!Te.disabled),pe=le.find(Te=>Te.ref.current===document.activeElement),ye=Iye(le,ae,pe);ye&&setTimeout(()=>ye.ref.current.focus())}),ne=A.useCallback((ae,le,pe)=>{const ye=!Z.current&&!pe;(k.value!==void 0&&k.value===le||ye)&&(B(ae),ye&&(Z.current=!0))},[k.value]),H=A.useCallback(()=>T==null?void 0:T.focus(),[T]),ee=A.useCallback((ae,le,pe)=>{const ye=!Z.current&&!pe;(k.value!==void 0&&k.value===le||ye)&&W(ae)},[k.value]),ie=r==="popper"?Ij:Sye,se=ie===Ij?{side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:p,collisionPadding:g,sticky:b,hideWhenDetached:x,avoidCollisions:S}:{};return h.jsx(vye,{scope:n,content:T,viewport:M,onViewportChange:j,itemRefCallback:ne,selectedItem:I,onItemLeave:H,itemTextRefCallback:ee,focusSelectedItem:q,selectedItemText:L,position:r,isPositioned:J,searchRef:U,children:h.jsx(UA,{as:f0t,allowPinchZoom:!0,children:h.jsx(HA,{asChild:!0,trapped:k.open,onMountAutoFocus:ae=>{ae.preventDefault()},onUnmountAutoFocus:bt(s,ae=>{var le;(le=k.trigger)==null||le.focus({preventScroll:!0}),ae.preventDefault()}),children:h.jsx(YS,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:ae=>ae.preventDefault(),onDismiss:()=>k.onOpenChange(!1),children:h.jsx(ie,{role:"listbox",id:k.contentId,"data-state":k.open?"open":"closed",dir:k.dir,onContextMenu:ae=>ae.preventDefault(),...E,...se,onPlaced:()=>V(!0),ref:F,style:{display:"flex",flexDirection:"column",outline:"none",...E.style},onKeyDown:bt(E.onKeyDown,ae=>{const le=ae.ctrlKey||ae.altKey||ae.metaKey;if(ae.key==="Tab"&&ae.preventDefault(),!le&&ae.key.length===1&&X(ae.key),["ArrowUp","ArrowDown","Home","End"].includes(ae.key)){let ye=$().filter(Te=>!Te.disabled).map(Te=>Te.ref.current);if(["ArrowUp","End"].includes(ae.key)&&(ye=ye.slice().reverse()),["ArrowUp","ArrowDown"].includes(ae.key)){const Te=ae.target,Ee=ye.indexOf(Te);ye=ye.slice(Ee+1)}setTimeout(()=>G(ye)),ae.preventDefault()}})})})})})})});wye.displayName=h0t;var p0t="SelectItemAlignedPosition",Sye=A.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...s}=e,i=$p(Rg,n),o=zp(Rg,n),[a,l]=A.useState(null),[c,u]=A.useState(null),d=Ut(t,F=>u(F)),p=E4(n),g=A.useRef(!1),b=A.useRef(!0),{viewport:x,selectedItem:S,selectedItemText:E,focusSelectedItem:k}=o,T=A.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&c&&x&&S&&E){const F=i.trigger.getBoundingClientRect(),I=c.getBoundingClientRect(),B=i.valueNode.getBoundingClientRect(),L=E.getBoundingClientRect();if(i.dir!=="rtl"){const Te=L.left-I.left,Ee=B.left-Te,_e=F.left-Ee,Fe=F.width+_e,tt=Math.max(Fe,I.width),nt=window.innerWidth-Bl,Dt=dS(Ee,[Bl,Math.max(Bl,nt-tt)]);a.style.minWidth=Fe+"px",a.style.left=Dt+"px"}else{const Te=I.right-L.right,Ee=window.innerWidth-B.right-Te,_e=window.innerWidth-F.right-Ee,Fe=F.width+_e,tt=Math.max(Fe,I.width),nt=window.innerWidth-Bl,Dt=dS(Ee,[Bl,Math.max(Bl,nt-tt)]);a.style.minWidth=Fe+"px",a.style.right=Dt+"px"}const W=p(),$=window.innerHeight-Bl*2,J=x.scrollHeight,V=window.getComputedStyle(c),Z=parseInt(V.borderTopWidth,10),G=parseInt(V.paddingTop,10),q=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),Y=Z+G+J+z+q,U=Math.min(S.offsetHeight*5,Y),X=window.getComputedStyle(x),ne=parseInt(X.paddingTop,10),H=parseInt(X.paddingBottom,10),ee=F.top+F.height/2-Bl,ie=$-ee,se=S.offsetHeight/2,ae=S.offsetTop+se,le=Z+G+ae,pe=Y-le;if(le<=ee){const Te=W.length>0&&S===W[W.length-1].ref.current;a.style.bottom="0px";const Ee=c.clientHeight-x.offsetTop-x.offsetHeight,_e=Math.max(ie,se+(Te?H:0)+Ee+q),Fe=le+_e;a.style.height=Fe+"px"}else{const Te=W.length>0&&S===W[0].ref.current;a.style.top="0px";const _e=Math.max(ee,Z+x.offsetTop+(Te?ne:0)+se)+pe;a.style.height=_e+"px",x.scrollTop=le-ee+x.offsetTop}a.style.margin=`${Bl}px 0`,a.style.minHeight=U+"px",a.style.maxHeight=$+"px",r==null||r(),requestAnimationFrame(()=>g.current=!0)}},[p,i.trigger,i.valueNode,a,c,x,S,E,i.dir,r]);ds(()=>T(),[T]);const[P,M]=A.useState();ds(()=>{c&&M(window.getComputedStyle(c).zIndex)},[c]);const j=A.useCallback(F=>{F&&b.current===!0&&(T(),k==null||k(),b.current=!1)},[T,k]);return h.jsx(g0t,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:g,onScrollButtonChange:j,children:h.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:P},children:h.jsx(xt.div,{...s,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});Sye.displayName=p0t;var m0t="SelectPopperPosition",Ij=A.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=Bl,...i}=e,o=D4(n);return h.jsx(wO,{...o,...i,ref:t,align:r,collisionPadding:s,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Ij.displayName=m0t;var[g0t,mB]=H1(Rg,{}),Oj="SelectViewport",Cye=A.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...s}=e,i=zp(Oj,n),o=mB(Oj,n),a=Ut(t,i.onViewportChange),l=A.useRef(0);return h.jsxs(h.Fragment,{children:[h.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),h.jsx(k4.Slot,{scope:n,children:h.jsx(xt.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:bt(s.onScroll,c=>{const u=c.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:p}=o;if(p!=null&&p.current&&d){const g=Math.abs(l.current-u.scrollTop);if(g>0){const b=window.innerHeight-Bl*2,x=parseFloat(d.style.minHeight),S=parseFloat(d.style.height),E=Math.max(x,S);if(E<b){const k=E+g,T=Math.min(b,k),P=k-T;d.style.height=T+"px",d.style.bottom==="0px"&&(u.scrollTop=P>0?P:0,d.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});Cye.displayName=Oj;var kye="SelectGroup",[y0t,b0t]=H1(kye),x0t=A.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=tc();return h.jsx(y0t,{scope:n,id:s,children:h.jsx(xt.div,{role:"group","aria-labelledby":s,...r,ref:t})})});x0t.displayName=kye;var Eye="SelectLabel",v0t=A.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=b0t(Eye,n);return h.jsx(xt.div,{id:s.id,...r,ref:t})});v0t.displayName=Eye;var Q3="SelectItem",[w0t,Dye]=H1(Q3),Aye=A.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:i,...o}=e,a=$p(Q3,n),l=zp(Q3,n),c=a.value===r,[u,d]=A.useState(i??""),[p,g]=A.useState(!1),b=Ut(t,k=>{var T;return(T=l.itemRefCallback)==null?void 0:T.call(l,k,r,s)}),x=tc(),S=A.useRef("touch"),E=()=>{s||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return h.jsx(w0t,{scope:n,value:r,disabled:s,textId:x,isSelected:c,onItemTextChange:A.useCallback(k=>{d(T=>T||((k==null?void 0:k.textContent)??"").trim())},[]),children:h.jsx(k4.ItemSlot,{scope:n,value:r,disabled:s,textValue:u,children:h.jsx(xt.div,{role:"option","aria-labelledby":x,"data-highlighted":p?"":void 0,"aria-selected":c&&p,"data-state":c?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...o,ref:b,onFocus:bt(o.onFocus,()=>g(!0)),onBlur:bt(o.onBlur,()=>g(!1)),onClick:bt(o.onClick,()=>{S.current!=="mouse"&&E()}),onPointerUp:bt(o.onPointerUp,()=>{S.current==="mouse"&&E()}),onPointerDown:bt(o.onPointerDown,k=>{S.current=k.pointerType}),onPointerMove:bt(o.onPointerMove,k=>{var T;S.current=k.pointerType,s?(T=l.onItemLeave)==null||T.call(l):S.current==="mouse"&&k.currentTarget.focus({preventScroll:!0})}),onPointerLeave:bt(o.onPointerLeave,k=>{var T;k.currentTarget===document.activeElement&&((T=l.onItemLeave)==null||T.call(l))}),onKeyDown:bt(o.onKeyDown,k=>{var P;((P=l.searchRef)==null?void 0:P.current)!==""&&k.key===" "||(i0t.includes(k.key)&&E(),k.key===" "&&k.preventDefault())})})})})});Aye.displayName=Q3;var Bv="SelectItemText",Tye=A.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,...i}=e,o=$p(Bv,n),a=zp(Bv,n),l=Dye(Bv,n),c=c0t(Bv,n),[u,d]=A.useState(null),p=Ut(t,E=>d(E),l.onItemTextChange,E=>{var k;return(k=a.itemTextRefCallback)==null?void 0:k.call(a,E,l.value,l.disabled)}),g=u==null?void 0:u.textContent,b=A.useMemo(()=>h.jsx("option",{value:l.value,disabled:l.disabled,children:g},l.value),[l.disabled,l.value,g]),{onNativeOptionAdd:x,onNativeOptionRemove:S}=c;return ds(()=>(x(b),()=>S(b)),[x,S,b]),h.jsxs(h.Fragment,{children:[h.jsx(xt.span,{id:l.textId,...i,ref:p}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?HS.createPortal(i.children,o.valueNode):null]})});Tye.displayName=Bv;var _ye="SelectItemIndicator",Nye=A.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Dye(_ye,n).isSelected?h.jsx(xt.span,{"aria-hidden":!0,...r,ref:t}):null});Nye.displayName=_ye;var Rj="SelectScrollUpButton",S0t=A.forwardRef((e,t)=>{const n=zp(Rj,e.__scopeSelect),r=mB(Rj,e.__scopeSelect),[s,i]=A.useState(!1),o=Ut(t,r.onScrollButtonChange);return ds(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollTop>0;i(c)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?h.jsx(Pye,{...e,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});S0t.displayName=Rj;var Lj="SelectScrollDownButton",C0t=A.forwardRef((e,t)=>{const n=zp(Lj,e.__scopeSelect),r=mB(Lj,e.__scopeSelect),[s,i]=A.useState(!1),o=Ut(t,r.onScrollButtonChange);return ds(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollHeight-l.clientHeight,u=Math.ceil(l.scrollTop)<c;i(u)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?h.jsx(Pye,{...e,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});C0t.displayName=Lj;var Pye=A.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=e,i=zp("SelectScrollButton",n),o=A.useRef(null),a=E4(n),l=A.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return A.useEffect(()=>()=>l(),[l]),ds(()=>{var u;const c=a().find(d=>d.ref.current===document.activeElement);(u=c==null?void 0:c.ref.current)==null||u.scrollIntoView({block:"nearest"})},[a]),h.jsx(xt.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:bt(s.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:bt(s.onPointerMove,()=>{var c;(c=i.onItemLeave)==null||c.call(i),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:bt(s.onPointerLeave,()=>{l()})})}),k0t="SelectSeparator",E0t=A.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return h.jsx(xt.div,{"aria-hidden":!0,...r,ref:t})});E0t.displayName=k0t;var Bj="SelectArrow",D0t=A.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=D4(n),i=$p(Bj,n),o=zp(Bj,n);return i.open&&o.position==="popper"?h.jsx(SO,{...s,...r,ref:t}):null});D0t.displayName=Bj;var A0t="SelectBubbleInput",Mye=A.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const s=A.useRef(null),i=Ut(r,s),o=HT(t);return A.useEffect(()=>{const a=s.current;if(!a)return;const l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==t&&u){const d=new Event("change",{bubbles:!0});u.call(a,t),a.dispatchEvent(d)}},[o,t]),h.jsx(xt.select,{...n,style:{...Vie,...n.style},ref:i,defaultValue:t})});Mye.displayName=A0t;function jye(e){return e===""||e===void 0}function Fye(e){const t=Zr(e),n=A.useRef(""),r=A.useRef(0),s=A.useCallback(o=>{const a=n.current+o;t(a),function l(c){n.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),i=A.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return A.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,i]}function Iye(e,t,n){const s=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let o=T0t(e,Math.max(i,0));s.length===1&&(o=o.filter(c=>c!==n));const l=o.find(c=>c.textValue.toLowerCase().startsWith(s.toLowerCase()));return l!==n?l:void 0}function T0t(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var _0t=hye,Oye=pye,N0t=gye,P0t=yye,M0t=bye,Rye=xye,j0t=Cye,Lye=Aye,F0t=Tye,I0t=Nye;const O0t=(e,t)=>t.some(n=>{if(typeof n=="number")return e===n;const[r,s]=n.split(":").map(i=>parseInt(i));return r<=e&&e<=s}),R0t=(e,t,n)=>n.some(([r,[s,i]])=>r===e&&s<=t&&t<=i),L0t=(e,t)=>e.split(new RegExp(`(${t.map(([n])=>n).join("|")})`)).filter(Boolean),B0t=e=>e.map(t=>{t=t.startsWith("/")?t:"/"+t;const[,n,r="0:Infinity"]=t.split("/"),[s,i=s]=r.split(":").map(o=>Number(o));return[n,[s,i]]}),Bye=(e,t)=>()=>{const n=A.useContext(e);if(n===void 0)throw new Error(t);return n},A4=e=>Object.assign(A.forwardRef(e),{displayName:e.displayName??e.name}),$ye=A.createContext(void 0),zye=A.createContext(void 0),Hye=Bye($ye,'Could not find nearest <CodeBlock /> component. Please wrap this component with a <CodeBlock /> component imported from "react-code-block".'),gB=Bye(zye,'Could not find nearest <CodeBlock.Code /> component. Please wrap this component with <CodeBlock.Code /> component imported from "react-code-block".'),zd=({code:e,words:t=[],lines:n=[],children:r,...s})=>{const i=A.useMemo(()=>B0t(t),[t]);return h.jsx($ye.Provider,{value:{code:e.trim(),words:i,lines:n,...s},children:r})},$0t=({as:e,children:t,...n},r)=>{const{lines:s,words:i,...o}=Hye(),a=e??"pre";return h.jsx(Cj,{...o,children:l=>h.jsx(a,{...n,ref:r,children:l.tokens.map((c,u)=>{const d=u+1,p=O0t(d,s);return h.jsx(zye.Provider,{value:{highlight:l,line:c,lineNumber:d},children:typeof t=="function"?t({isLineHighlighted:p,lineNumber:d},u):t},u)})})})},z0t=({as:e,children:t,className:n,...r},s)=>{const{highlight:i,line:o}=gB(),{getLineProps:a}=i,l=e??"div";return h.jsx(l,{...a({line:o,className:n}),...r,ref:s,children:t})},H0t=({as:e,children:t=({children:i})=>h.jsx("span",{children:i}),className:n,...r},s)=>{const{words:i}=Hye(),{line:o,highlight:a,lineNumber:l}=gB(),{getTokenProps:c}=a,u=e??"span";return h.jsx(Se.Fragment,{children:o.map((d,p)=>{const{children:g,...b}=c({token:d,className:n}),x=i.length?L0t(g,i):[g];return h.jsx(Se.Fragment,{children:x.map((S,E)=>h.jsx(u,{...b,...r,ref:s,children:t({children:S,isTokenHighlighted:R0t(S,l,i)})},E))},p)})})},V0t=({as:e,...t},n)=>{const{lineNumber:r}=gB(),s=e??"span";return h.jsx(s,{...t,ref:n,children:r})};zd.Code=A4($0t);zd.LineContent=A4(z0t);zd.Token=A4(H0t);zd.LineNumber=A4(V0t);const U0t=(e,t={})=>new LO({baseUrl:e||"",headers:e?t:{...t,"x-mastra-dev-playground":"true"}}),Vye=A.createContext(void 0),W0t=({children:e,baseUrl:t,headers:n})=>{const r=U0t(t,n);return h.jsx(Vye.Provider,{value:{client:r},children:e})},Ku=()=>{const e=A.useContext(Vye);if(e===void 0)throw new Error("useMastraClient must be used within a MastraClientProvider");return e.client};function Uye(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=Uye(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function zn(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=Uye(e))&&(r&&(r+=" "),r+=t);return r}const GZ=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,YZ=zn,V1=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return YZ(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(c=>{const u=n==null?void 0:n[c],d=i==null?void 0:i[c];if(u===null)return null;const p=GZ(u)||GZ(d);return s[c][p]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,p]=u;return p===void 0||(c[d]=p),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:p,...g}=u;return Object.entries(g).every(b=>{let[x,S]=b;return Array.isArray(S)?S.includes({...i,...a}[x]):{...i,...a}[x]===S})?[...c,d,p]:c},[]);return YZ(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},yB="-",q0t=e=>{const t=Y0t(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(yB);return a[0]===""&&a.length!==1&&a.shift(),Wye(a,t)||G0t(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},Wye=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?Wye(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(yB);return(o=t.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},KZ=/^\[(.+)\]$/,G0t=e=>{if(KZ.test(e)){const t=KZ.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Y0t=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const s in n)$j(n[s],r,s,t);return r},$j=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:XZ(t,s);i.classGroupId=n;return}if(typeof s=="function"){if(K0t(s)){$j(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,o])=>{$j(o,XZ(t,i),n,r)})})},XZ=(e,t)=>{let n=e;return t.split(yB).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},K0t=e=>e.isThemeGetter,X0t=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(i,o)=>{n.set(i,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let o=n.get(i);if(o!==void 0)return o;if((o=r.get(i))!==void 0)return s(i,o),o},set(i,o){n.has(i)?n.set(i,o):s(i,o)}}},zj="!",Hj=":",J0t=Hj.length,Z0t=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=s=>{const i=[];let o=0,a=0,l=0,c;for(let b=0;b<s.length;b++){let x=s[b];if(o===0&&a===0){if(x===Hj){i.push(s.slice(l,b)),l=b+J0t;continue}if(x==="/"){c=b;continue}}x==="["?o++:x==="]"?o--:x==="("?a++:x===")"&&a--}const u=i.length===0?s:s.substring(l),d=Q0t(u),p=d!==u,g=c&&c>l?c-l:void 0;return{modifiers:i,hasImportantModifier:p,baseClassName:d,maybePostfixModifierPosition:g}};if(t){const s=t+Hj,i=r;r=o=>o.startsWith(s)?i(o.substring(s.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0}}if(n){const s=r;r=i=>n({className:i,parseClassName:s})}return r},Q0t=e=>e.endsWith(zj)?e.substring(0,e.length-1):e.startsWith(zj)?e.substring(1):e,ebt=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const s=[];let i=[];return r.forEach(o=>{o[0]==="["||t[o]?(s.push(...i.sort(),o),i=[]):i.push(o)}),s.push(...i.sort()),s}},tbt=e=>({cache:X0t(e.cacheSize),parseClassName:Z0t(e),sortModifiers:ebt(e),...q0t(e)}),nbt=/\s+/,rbt=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:i}=t,o=[],a=e.trim().split(nbt);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:d,modifiers:p,hasImportantModifier:g,baseClassName:b,maybePostfixModifierPosition:x}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let S=!!x,E=r(S?b.substring(0,x):b);if(!E){if(!S){l=u+(l.length>0?" "+l:l);continue}if(E=r(b),!E){l=u+(l.length>0?" "+l:l);continue}S=!1}const k=i(p).join(":"),T=g?k+zj:k,P=T+E;if(o.includes(P))continue;o.push(P);const M=s(E,S);for(let j=0;j<M.length;++j){const F=M[j];o.push(T+F)}l=u+(l.length>0?" "+l:l)}return l};function sbt(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=qye(t))&&(r&&(r+=" "),r+=n);return r}const qye=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=qye(e[r]))&&(n&&(n+=" "),n+=t);return n};function ibt(e,...t){let n,r,s,i=o;function o(l){const c=t.reduce((u,d)=>d(u),e());return n=tbt(c),r=n.cache.get,s=n.cache.set,i=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=rbt(l,n);return s(l,u),u}return function(){return i(sbt.apply(null,arguments))}}const _s=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Gye=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Yye=/^\((?:(\w[\w-]*):)?(.+)\)$/i,obt=/^\d+\/\d+$/,abt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lbt=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,cbt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ubt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,dbt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,d0=e=>obt.test(e),un=e=>!!e&&!Number.isNaN(Number(e)),Ef=e=>!!e&&Number.isInteger(Number(e)),d7=e=>e.endsWith("%")&&un(e.slice(0,-1)),wd=e=>abt.test(e),hbt=()=>!0,fbt=e=>lbt.test(e)&&!cbt.test(e),Kye=()=>!1,pbt=e=>ubt.test(e),mbt=e=>dbt.test(e),gbt=e=>!_t(e)&&!Nt(e),ybt=e=>U1(e,Zye,Kye),_t=e=>Gye.test(e),wm=e=>U1(e,Qye,fbt),h7=e=>U1(e,Sbt,un),JZ=e=>U1(e,Xye,Kye),bbt=e=>U1(e,Jye,mbt),fE=e=>U1(e,e0e,pbt),Nt=e=>Yye.test(e),Ev=e=>W1(e,Qye),xbt=e=>W1(e,Cbt),ZZ=e=>W1(e,Xye),vbt=e=>W1(e,Zye),wbt=e=>W1(e,Jye),pE=e=>W1(e,e0e,!0),U1=(e,t,n)=>{const r=Gye.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},W1=(e,t,n=!1)=>{const r=Yye.exec(e);return r?r[1]?t(r[1]):n:!1},Xye=e=>e==="position"||e==="percentage",Jye=e=>e==="image"||e==="url",Zye=e=>e==="length"||e==="size"||e==="bg-size",Qye=e=>e==="length",Sbt=e=>e==="number",Cbt=e=>e==="family-name",e0e=e=>e==="shadow",kbt=()=>{const e=_s("color"),t=_s("font"),n=_s("text"),r=_s("font-weight"),s=_s("tracking"),i=_s("leading"),o=_s("breakpoint"),a=_s("container"),l=_s("spacing"),c=_s("radius"),u=_s("shadow"),d=_s("inset-shadow"),p=_s("text-shadow"),g=_s("drop-shadow"),b=_s("blur"),x=_s("perspective"),S=_s("aspect"),E=_s("ease"),k=_s("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],M=()=>[...P(),Nt,_t],j=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto","contain","none"],I=()=>[Nt,_t,l],B=()=>[d0,"full","auto",...I()],L=()=>[Ef,"none","subgrid",Nt,_t],W=()=>["auto",{span:["full",Ef,Nt,_t]},Ef,Nt,_t],$=()=>[Ef,"auto",Nt,_t],J=()=>["auto","min","max","fr",Nt,_t],V=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Z=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...I()],q=()=>[d0,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],z=()=>[e,Nt,_t],Y=()=>[...P(),ZZ,JZ,{position:[Nt,_t]}],U=()=>["no-repeat",{repeat:["","x","y","space","round"]}],X=()=>["auto","cover","contain",vbt,ybt,{size:[Nt,_t]}],ne=()=>[d7,Ev,wm],H=()=>["","none","full",c,Nt,_t],ee=()=>["",un,Ev,wm],ie=()=>["solid","dashed","dotted","double"],se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ae=()=>[un,d7,ZZ,JZ],le=()=>["","none",b,Nt,_t],pe=()=>["none",un,Nt,_t],ye=()=>["none",un,Nt,_t],Te=()=>[un,Nt,_t],Ee=()=>[d0,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[wd],breakpoint:[wd],color:[hbt],container:[wd],"drop-shadow":[wd],ease:["in","out","in-out"],font:[gbt],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[wd],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[wd],shadow:[wd],spacing:["px",un],text:[wd],"text-shadow":[wd],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",d0,_t,Nt,S]}],container:["container"],columns:[{columns:[un,_t,Nt,a]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:M()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:B()}],"inset-x":[{"inset-x":B()}],"inset-y":[{"inset-y":B()}],start:[{start:B()}],end:[{end:B()}],top:[{top:B()}],right:[{right:B()}],bottom:[{bottom:B()}],left:[{left:B()}],visibility:["visible","invisible","collapse"],z:[{z:[Ef,"auto",Nt,_t]}],basis:[{basis:[d0,"full","auto",a,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[un,d0,"auto","initial","none",_t]}],grow:[{grow:["",un,Nt,_t]}],shrink:[{shrink:["",un,Nt,_t]}],order:[{order:[Ef,"first","last","none",Nt,_t]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:W()}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:W()}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":J()}],"auto-rows":[{"auto-rows":J()}],gap:[{gap:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[...V(),"normal"]}],"justify-items":[{"justify-items":[...Z(),"normal"]}],"justify-self":[{"justify-self":["auto",...Z()]}],"align-content":[{content:["normal",...V()]}],"align-items":[{items:[...Z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Z(),{baseline:["","last"]}]}],"place-content":[{"place-content":V()}],"place-items":[{"place-items":[...Z(),"baseline"]}],"place-self":[{"place-self":["auto",...Z()]}],p:[{p:I()}],px:[{px:I()}],py:[{py:I()}],ps:[{ps:I()}],pe:[{pe:I()}],pt:[{pt:I()}],pr:[{pr:I()}],pb:[{pb:I()}],pl:[{pl:I()}],m:[{m:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"space-x":[{"space-x":I()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":I()}],"space-y-reverse":["space-y-reverse"],size:[{size:q()}],w:[{w:[a,"screen",...q()]}],"min-w":[{"min-w":[a,"screen","none",...q()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...q()]}],h:[{h:["screen","lh",...q()]}],"min-h":[{"min-h":["screen","lh","none",...q()]}],"max-h":[{"max-h":["screen","lh",...q()]}],"font-size":[{text:["base",n,Ev,wm]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Nt,h7]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",d7,_t]}],"font-family":[{font:[xbt,_t,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,Nt,_t]}],"line-clamp":[{"line-clamp":[un,"none",Nt,h7]}],leading:[{leading:[i,...I()]}],"list-image":[{"list-image":["none",Nt,_t]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Nt,_t]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:z()}],"text-color":[{text:z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ie(),"wavy"]}],"text-decoration-thickness":[{decoration:[un,"from-font","auto",Nt,wm]}],"text-decoration-color":[{decoration:z()}],"underline-offset":[{"underline-offset":[un,"auto",Nt,_t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Nt,_t]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Nt,_t]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Y()}],"bg-repeat":[{bg:U()}],"bg-size":[{bg:X()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ef,Nt,_t],radial:["",Nt,_t],conic:[Ef,Nt,_t]},wbt,bbt]}],"bg-color":[{bg:z()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:z()}],"gradient-via":[{via:z()}],"gradient-to":[{to:z()}],rounded:[{rounded:H()}],"rounded-s":[{"rounded-s":H()}],"rounded-e":[{"rounded-e":H()}],"rounded-t":[{"rounded-t":H()}],"rounded-r":[{"rounded-r":H()}],"rounded-b":[{"rounded-b":H()}],"rounded-l":[{"rounded-l":H()}],"rounded-ss":[{"rounded-ss":H()}],"rounded-se":[{"rounded-se":H()}],"rounded-ee":[{"rounded-ee":H()}],"rounded-es":[{"rounded-es":H()}],"rounded-tl":[{"rounded-tl":H()}],"rounded-tr":[{"rounded-tr":H()}],"rounded-br":[{"rounded-br":H()}],"rounded-bl":[{"rounded-bl":H()}],"border-w":[{border:ee()}],"border-w-x":[{"border-x":ee()}],"border-w-y":[{"border-y":ee()}],"border-w-s":[{"border-s":ee()}],"border-w-e":[{"border-e":ee()}],"border-w-t":[{"border-t":ee()}],"border-w-r":[{"border-r":ee()}],"border-w-b":[{"border-b":ee()}],"border-w-l":[{"border-l":ee()}],"divide-x":[{"divide-x":ee()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ee()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ie(),"hidden","none"]}],"divide-style":[{divide:[...ie(),"hidden","none"]}],"border-color":[{border:z()}],"border-color-x":[{"border-x":z()}],"border-color-y":[{"border-y":z()}],"border-color-s":[{"border-s":z()}],"border-color-e":[{"border-e":z()}],"border-color-t":[{"border-t":z()}],"border-color-r":[{"border-r":z()}],"border-color-b":[{"border-b":z()}],"border-color-l":[{"border-l":z()}],"divide-color":[{divide:z()}],"outline-style":[{outline:[...ie(),"none","hidden"]}],"outline-offset":[{"outline-offset":[un,Nt,_t]}],"outline-w":[{outline:["",un,Ev,wm]}],"outline-color":[{outline:z()}],shadow:[{shadow:["","none",u,pE,fE]}],"shadow-color":[{shadow:z()}],"inset-shadow":[{"inset-shadow":["none",d,pE,fE]}],"inset-shadow-color":[{"inset-shadow":z()}],"ring-w":[{ring:ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:z()}],"ring-offset-w":[{"ring-offset":[un,wm]}],"ring-offset-color":[{"ring-offset":z()}],"inset-ring-w":[{"inset-ring":ee()}],"inset-ring-color":[{"inset-ring":z()}],"text-shadow":[{"text-shadow":["none",p,pE,fE]}],"text-shadow-color":[{"text-shadow":z()}],opacity:[{opacity:[un,Nt,_t]}],"mix-blend":[{"mix-blend":[...se(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":se()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[un]}],"mask-image-linear-from-pos":[{"mask-linear-from":ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":ae()}],"mask-image-linear-from-color":[{"mask-linear-from":z()}],"mask-image-linear-to-color":[{"mask-linear-to":z()}],"mask-image-t-from-pos":[{"mask-t-from":ae()}],"mask-image-t-to-pos":[{"mask-t-to":ae()}],"mask-image-t-from-color":[{"mask-t-from":z()}],"mask-image-t-to-color":[{"mask-t-to":z()}],"mask-image-r-from-pos":[{"mask-r-from":ae()}],"mask-image-r-to-pos":[{"mask-r-to":ae()}],"mask-image-r-from-color":[{"mask-r-from":z()}],"mask-image-r-to-color":[{"mask-r-to":z()}],"mask-image-b-from-pos":[{"mask-b-from":ae()}],"mask-image-b-to-pos":[{"mask-b-to":ae()}],"mask-image-b-from-color":[{"mask-b-from":z()}],"mask-image-b-to-color":[{"mask-b-to":z()}],"mask-image-l-from-pos":[{"mask-l-from":ae()}],"mask-image-l-to-pos":[{"mask-l-to":ae()}],"mask-image-l-from-color":[{"mask-l-from":z()}],"mask-image-l-to-color":[{"mask-l-to":z()}],"mask-image-x-from-pos":[{"mask-x-from":ae()}],"mask-image-x-to-pos":[{"mask-x-to":ae()}],"mask-image-x-from-color":[{"mask-x-from":z()}],"mask-image-x-to-color":[{"mask-x-to":z()}],"mask-image-y-from-pos":[{"mask-y-from":ae()}],"mask-image-y-to-pos":[{"mask-y-to":ae()}],"mask-image-y-from-color":[{"mask-y-from":z()}],"mask-image-y-to-color":[{"mask-y-to":z()}],"mask-image-radial":[{"mask-radial":[Nt,_t]}],"mask-image-radial-from-pos":[{"mask-radial-from":ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":ae()}],"mask-image-radial-from-color":[{"mask-radial-from":z()}],"mask-image-radial-to-color":[{"mask-radial-to":z()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":P()}],"mask-image-conic-pos":[{"mask-conic":[un]}],"mask-image-conic-from-pos":[{"mask-conic-from":ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":ae()}],"mask-image-conic-from-color":[{"mask-conic-from":z()}],"mask-image-conic-to-color":[{"mask-conic-to":z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Y()}],"mask-repeat":[{mask:U()}],"mask-size":[{mask:X()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Nt,_t]}],filter:[{filter:["","none",Nt,_t]}],blur:[{blur:le()}],brightness:[{brightness:[un,Nt,_t]}],contrast:[{contrast:[un,Nt,_t]}],"drop-shadow":[{"drop-shadow":["","none",g,pE,fE]}],"drop-shadow-color":[{"drop-shadow":z()}],grayscale:[{grayscale:["",un,Nt,_t]}],"hue-rotate":[{"hue-rotate":[un,Nt,_t]}],invert:[{invert:["",un,Nt,_t]}],saturate:[{saturate:[un,Nt,_t]}],sepia:[{sepia:["",un,Nt,_t]}],"backdrop-filter":[{"backdrop-filter":["","none",Nt,_t]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[un,Nt,_t]}],"backdrop-contrast":[{"backdrop-contrast":[un,Nt,_t]}],"backdrop-grayscale":[{"backdrop-grayscale":["",un,Nt,_t]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[un,Nt,_t]}],"backdrop-invert":[{"backdrop-invert":["",un,Nt,_t]}],"backdrop-opacity":[{"backdrop-opacity":[un,Nt,_t]}],"backdrop-saturate":[{"backdrop-saturate":[un,Nt,_t]}],"backdrop-sepia":[{"backdrop-sepia":["",un,Nt,_t]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":I()}],"border-spacing-x":[{"border-spacing-x":I()}],"border-spacing-y":[{"border-spacing-y":I()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Nt,_t]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[un,"initial",Nt,_t]}],ease:[{ease:["linear","initial",E,Nt,_t]}],delay:[{delay:[un,Nt,_t]}],animate:[{animate:["none",k,Nt,_t]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,Nt,_t]}],"perspective-origin":[{"perspective-origin":M()}],rotate:[{rotate:pe()}],"rotate-x":[{"rotate-x":pe()}],"rotate-y":[{"rotate-y":pe()}],"rotate-z":[{"rotate-z":pe()}],scale:[{scale:ye()}],"scale-x":[{"scale-x":ye()}],"scale-y":[{"scale-y":ye()}],"scale-z":[{"scale-z":ye()}],"scale-3d":["scale-3d"],skew:[{skew:Te()}],"skew-x":[{"skew-x":Te()}],"skew-y":[{"skew-y":Te()}],transform:[{transform:[Nt,_t,"","none","gpu","cpu"]}],"transform-origin":[{origin:M()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ee()}],"translate-x":[{"translate-x":Ee()}],"translate-y":[{"translate-y":Ee()}],"translate-z":[{"translate-z":Ee()}],"translate-none":["translate-none"],accent:[{accent:z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:z()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Nt,_t]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Nt,_t]}],fill:[{fill:["none",...z()]}],"stroke-w":[{stroke:[un,Ev,wm,h7]}],stroke:[{stroke:["none",...z()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Ebt=ibt(kbt);function Ve(...e){return Ebt(zn(e))}const mD=V1("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Js=A.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},i)=>{const o=r?Ap:"button";return h.jsx(o,{className:Ve(mD({variant:t,size:n,className:e})),ref:i,...s})});Js.displayName="Button";const FC=EO,Ta=DO,_a=AO,Vo=A.forwardRef(({className:e,sideOffset:t=4,...n},r)=>h.jsx(Zie,{children:h.jsx(QS,{ref:r,sideOffset:t,className:Ve("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Vo.displayName=QS.displayName;const Na=A.forwardRef(({children:e,tooltip:t,side:n="bottom",className:r,...s},i)=>h.jsx(FC,{children:h.jsxs(Ta,{children:[h.jsx(_a,{asChild:!0,children:h.jsxs(Js,{variant:"ghost",size:"icon",...s,className:Ve("size-6 p-1",r),ref:i,children:[e,h.jsx("span",{className:"sr-only",children:t})]})}),h.jsx(Vo,{side:n,children:t})]})}));Na.displayName="TooltipIconButton";const bB=A.forwardRef(({className:e,...t},n)=>h.jsx(ple,{ref:n,className:Ve("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));bB.displayName=ple.displayName;const Dbt=A.forwardRef(({className:e,...t},n)=>h.jsx(mle,{ref:n,className:Ve("aspect-square h-full w-full",e),...t}));Dbt.displayName=mle.displayName;const xB=A.forwardRef(({className:e,...t},n)=>h.jsx(gle,{ref:n,className:Ve("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));xB.displayName=gle.displayName;const Abt=HGe({style:IYe.coldarkDark,customStyle:{margin:0,backgroundColor:"black"}}),Tbt=()=>h.jsx(tWe,{remarkPlugins:[Ice],className:"aui-md",components:Mbt}),t0e=A.memo(Tbt),_bt=({language:e,code:t})=>{const{isCopied:n,copyToClipboard:r}=Nbt(),s=()=>{!t||n||r(t)};return h.jsxs("div",{style:{background:"hsl(0 0% 100% / 0.06)",borderTopRightRadius:"0.5rem",borderTopLeftRadius:"0.5rem",marginTop:"0.5rem",border:"1px solid hsl(0 0% 20.4%)",borderBottom:"none"},className:"flex items-center justify-between gap-4 px-4 py-2 text-sm font-semibold text-white",children:[h.jsx("span",{className:"lowercase [&>span]:text-xs",children:e}),h.jsx(Na,{tooltip:"Copy",onClick:s,children:h.jsxs("span",{className:"grid",children:[h.jsx("span",{style:{gridArea:"1/1"},className:Ve("transition-transform",n?"scale-100":"scale-0"),children:h.jsx(kh,{size:14})},"checkmark"),h.jsx("span",{style:{gridArea:"1/1"},className:Ve("transition-transform",n?"scale-0":"scale-100"),children:h.jsx(Dh,{size:14})},"copy")]})})]})},Nbt=({copiedDuration:e=1500}={})=>{const[t,n]=A.useState(!1);return{isCopied:t,copyToClipboard:s=>{s&&navigator.clipboard.writeText(s).then(()=>{n(!0),setTimeout(()=>n(!1),e)})}}},Pbt=({alt:e,src:t,...n})=>{const[r,s]=A.useState(!1);return A.useEffect(()=>{s(!1)},[t]),r||!t?h.jsxs("div",{children:[h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",width:"150",height:"150",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m2.25 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5Zm10.5-11.25h.008v.008h-.008V8.25Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"})}),h.jsx("p",{className:"text-xs italic text-muted-foreground -mt-[0.625rem] mb-[0.625rem]",children:"Image link is broken"})]}):h.jsx("img",{src:t,alt:e,...n,onError:()=>{s(!0)}})},Mbt=UUe({h1:({className:e,...t})=>h.jsx("h1",{className:Ve("mb-8 scroll-m-20 text-4xl font-extrabold tracking-tight last:mb-0",e),...t,style:{marginBottom:"2rem"}}),h2:({className:e,...t})=>h.jsx("h2",{className:Ve("mb-4 mt-8 scroll-m-20 text-3xl font-semibold tracking-tight first:mt-0 last:mb-0",e),...t,style:{marginBottom:"1rem",marginTop:"2rem"}}),h3:({className:e,...t})=>h.jsx("h3",{className:Ve("scroll-m-20 text-2xl font-semibold tracking-tight first:mt-0 last:mb-0",e),...t,style:{marginBottom:"1rem",marginTop:"1.5rem"}}),h4:({className:e,...t})=>h.jsx("h4",{className:Ve("scroll-m-20 text-xl font-semibold tracking-tight first:mt-0 last:mb-0",e),...t,style:{marginBottom:"1rem",marginTop:"1.5rem"}}),h5:({className:e,...t})=>h.jsx("h5",{className:Ve("font-semibold first:mt-0 last:mb-0",e),...t,style:{marginBottom:"1rem",marginTop:"1rem"}}),h6:({className:e,...t})=>h.jsx("h6",{className:Ve("font-semibold first:mt-0 last:mb-0",e),...t,style:{marginBottom:"1rem",marginTop:"1rem"}}),p:({className:e,...t})=>h.jsx("p",{className:Ve("leading-7 first:mt-0 last:mb-0",e),...t}),a:({className:e,...t})=>h.jsx("a",{className:Ve("text-primary font-medium underline underline-offset-4",e),...t}),blockquote:({className:e,...t})=>h.jsx("blockquote",{className:Ve("border-l-2 pl-6 italic",e),...t}),ul:({className:e,...t})=>h.jsx("ul",{className:Ve("my-5 ml-6 list-disc [&>li]:mt-2",e),...t}),ol:({className:e,...t})=>h.jsx("ol",{className:Ve("my-5 ml-6 list-decimal [&>li]:mt-2",e),...t}),hr:({className:e,...t})=>h.jsx("hr",{className:Ve("my-5 border-b",e),...t}),table:({className:e,...t})=>h.jsx("table",{className:Ve("my-5 w-full border-separate border-spacing-0 overflow-y-auto",e),...t}),th:({className:e,...t})=>h.jsx("th",{className:Ve("bg-muted px-4 py-2 text-left font-bold first:rounded-tl-lg last:rounded-tr-lg [&[align=center]]:text-center [&[align=right]]:text-right",e),...t}),td:({className:e,...t})=>h.jsx("td",{className:Ve("border-b border-l px-4 py-2 text-left last:border-r [&[align=center]]:text-center [&[align=right]]:text-right",e),...t}),tr:({className:e,...t})=>h.jsx("tr",{className:Ve("m-0 border-b p-0 first:border-t [&:last-child>td:first-child]:rounded-bl-lg [&:last-child>td:last-child]:rounded-br-lg",e),...t}),sup:({className:e,...t})=>h.jsx("sup",{className:Ve("[&>a]:text-xs [&>a]:no-underline",e),...t}),pre:({className:e,...t})=>h.jsx("pre",{...t,style:{borderBottomRightRadius:"0.5rem",borderBottomLeftRadius:"0.5rem",background:"transparent",fontSize:"0.875rem",marginBottom:"0.5rem",border:"1px solid hsl(0 0% 20.4%)"},className:Ve("overflow-x-auto p-4 text-white",e)}),code:function({className:t,...n}){const r=uce();return h.jsxs("pre",{style:{fontSize:"0.875rem",display:"inline"},children:[h.jsx("code",{className:Ve(!r&&"bg-muted rounded border font-semibold",t),...n,style:{fontWeight:"400",paddingBlock:r?0:"0.1em",paddingInline:r?0:"0.3em"}})," "]})},CodeHeader:_bt,SyntaxHighlighter:Abt,img:Pbt}),jbt={sm:"[&>svg]:h-icon-sm [&>svg]:w-icon-sm",default:"[&>svg]:h-icon-default [&>svg]:w-icon-default",lg:"[&>svg]:h-icon-lg [&>svg]:w-icon-lg"},ot=({children:e,className:t,size:n="default",...r})=>h.jsx("span",{className:zn("block",jbt[n],t),...r,children:e}),QZ={default:"text-icon3",success:"text-accent1",error:"text-accent2",info:"text-accent3"},Un=({icon:e,variant:t="default",className:n,children:r,...s})=>h.jsxs("div",{className:zn("bg-surface4 text-ui-sm gap-md h-badge-default inline-flex items-center rounded-md",e?"pl-md pr-1.5":"px-1.5",e||t==="default"?"text-icon5":QZ[t],n),...s,children:[e&&h.jsx("span",{className:QZ[t],children:h.jsx(ot,{children:e})}),r]}),Nh=e=>h.jsxs("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.5 15C10.3565 15 12.137 14.2625 13.4497 12.9497C14.7625 11.637 15.5 9.85652 15.5 8C15.5 6.14348 14.7625 4.36301 13.4497 3.05025C12.137 1.7375 10.3565 1 8.5 1C6.64348 1 4.86301 1.7375 3.55025 3.05025C2.2375 4.36301 1.5 6.14348 1.5 8C1.5 9.85652 2.2375 11.637 3.55025 12.9497C4.86301 14.2625 6.64348 15 8.5 15ZM5.621 10.879L4.611 11.889C3.84179 11.1198 3.31794 10.1398 3.1057 9.07291C2.89346 8.00601 3.00236 6.90013 3.41864 5.89512C3.83491 4.89012 4.53986 4.03112 5.44434 3.42676C6.34881 2.8224 7.41219 2.49983 8.5 2.49983C9.58781 2.49983 10.6512 2.8224 11.5557 3.42676C12.4601 4.03112 13.1651 4.89012 13.5814 5.89512C13.9976 6.90013 14.1065 8.00601 13.8943 9.07291C13.6821 10.1398 13.1582 11.1198 12.389 11.889L11.379 10.879C11.1004 10.6003 10.7696 10.3792 10.4055 10.2284C10.0414 10.0776 9.6511 9.99995 9.257 10H7.743C7.3489 9.99995 6.95865 10.0776 6.59455 10.2284C6.23045 10.3792 5.89963 10.6003 5.621 10.879Z",fill:"currentColor"}),h.jsx("path",{d:"M8.5 4C7.96957 4 7.46086 4.21071 7.08579 4.58579C6.71071 4.96086 6.5 5.46957 6.5 6V6.5C6.5 7.03043 6.71071 7.53914 7.08579 7.91421C7.46086 8.28929 7.96957 8.5 8.5 8.5C9.03043 8.5 9.53914 8.28929 9.91421 7.91421C10.2893 7.53914 10.5 7.03043 10.5 6.5V6C10.5 5.46957 10.2893 4.96086 9.91421 4.58579C9.53914 4.21071 9.03043 4 8.5 4Z",fill:"currentColor"})]}),Fbt=e=>h.jsxs("svg",{width:"126",height:"85",viewBox:"0 0 126 85",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[h.jsx("path",{d:"M63.0002 0.968262C28.5152 0.968262 0.55957 15.6484 0.55957 33.7573V51.2428C0.55957 69.3517 28.5152 84.0319 63.0002 84.0319C97.4853 84.0319 125.441 69.3517 125.441 51.2428V33.7573C125.441 15.6484 97.4853 0.968262 63.0002 0.968262Z",stroke:"#707070"}),h.jsx("path",{d:"M119.322 35.1636C119.322 50.3595 94.1055 62.6782 62.9998 62.6782C31.894 62.6782 6.67773 50.3595 6.67773 35.1636V49.8363C6.67773 65.0322 31.894 77.351 62.9998 77.351C94.1055 77.351 119.322 65.0322 119.322 49.8363V35.1636Z",fill:"#2E2E2E",fillOpacity:"0.9"}),h.jsx("path",{d:"M119.322 35.1636C119.322 50.3595 94.1055 62.6782 62.9998 62.6782C31.894 62.6782 6.67773 50.3595 6.67773 35.1636M119.322 35.1636C119.322 19.9677 94.1055 7.64893 62.9998 7.64893C31.894 7.64893 6.67773 19.9677 6.67773 35.1636M119.322 35.1636V49.8363C119.322 65.0322 94.1055 77.351 62.9998 77.351C31.894 77.351 6.67773 65.0322 6.67773 49.8363V35.1636",stroke:"#424242"}),h.jsxs("g",{clipPath:"url(#clip0_21421_19519)",children:[h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.5383 47.0955C45.0714 50.3122 53.9322 52.1193 63.1714 52.1193C72.4106 52.1193 81.2714 50.3122 87.8045 47.0955C94.3376 43.8787 98.0078 39.5159 98.0078 34.9668C98.0078 30.4177 94.3376 26.0549 87.8045 22.8381C81.2714 19.6214 72.4106 17.8143 63.1714 17.8143C53.9322 17.8143 45.0714 19.6214 38.5383 22.8381C32.0052 26.0549 28.3349 30.4177 28.3349 34.9668C28.3349 39.5159 32.0052 43.8787 38.5383 47.0955ZM42.9089 34.9668L35.8005 34.9668C35.8004 32.3013 37.4056 29.6956 40.4132 27.4793C43.4207 25.263 47.6956 23.5355 52.6971 22.5154C57.6986 21.4954 63.2022 21.2285 68.5118 21.7485C73.8214 22.2685 78.6986 23.552 82.5266 25.4368C86.3546 27.3216 88.9615 29.723 90.0176 32.3373C91.0737 34.9517 90.5316 37.6614 88.4599 40.1241C86.3881 42.5867 82.8797 44.6915 78.3784 46.1723C73.8771 47.6532 68.585 48.4435 63.1714 48.4435V44.9435C63.1717 43.9778 62.7855 43.0215 62.035 42.1293C61.2845 41.2372 60.1843 40.4265 58.7973 39.7438L53.4695 37.1205C52.0828 36.4376 50.4364 35.8959 48.6244 35.5263C46.8124 35.1568 44.8702 34.9667 42.9089 34.9668Z",fill:"#A9A9A9"}),h.jsx("path",{d:"M77.2474 28.0361C75.3808 27.1171 72.8492 26.6007 70.2094 26.6007C67.5696 26.6007 65.038 27.1171 63.1714 28.0361L61.4119 28.9025C59.5453 29.8215 58.4966 31.068 58.4966 32.3678C58.4966 33.6676 59.5453 34.9141 61.4119 35.8331C63.2785 36.7522 65.8101 37.2685 68.4499 37.2685C71.0897 37.2685 73.6213 36.7522 75.4879 35.8331L77.2474 34.9668C79.114 34.0477 80.1627 32.8012 80.1627 31.5015C80.1627 30.2017 79.114 28.9552 77.2474 28.0361Z",fill:"#A9A9A9"})]}),h.jsx("defs",{children:h.jsx("clipPath",{id:"clip0_21421_19519",children:h.jsx("rect",{width:"62.7591",height:"62.7591",fill:"white",transform:"matrix(0.897148 0.441731 -0.897148 0.441731 63.1714 7.24365)"})})})]}),n0e=e=>h.jsxs("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[h.jsx("path",{d:"M11.0313 7.97578C11.0313 9.34436 9.92183 10.4538 8.55324 10.4538C7.18466 10.4538 6.0752 9.34436 6.0752 7.97578C6.0752 6.60719 7.18466 5.49773 8.55324 5.49773C9.92183 5.49773 11.0313 6.60719 11.0313 7.97578ZM11.0313 7.97578H14.573",stroke:"currentColor",strokeWidth:"1.33333",strokeLinecap:"round"}),h.jsx("path",{d:"M12.967 4.46154C11.9273 3.14431 10.3165 2.29883 8.50814 2.29883C5.37277 2.29883 2.83105 4.84055 2.83105 7.97591C2.83105 11.1113 5.37277 13.653 8.50814 13.653C10.3165 13.653 11.9273 12.8075 12.967 11.4903",stroke:"currentColor",strokeWidth:"1.33333",strokeLinecap:"round"})]}),q1=e=>h.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.99982 2.0625C3.8252 2.0625 2.06232 3.82538 2.06232 6C2.06232 8.17462 3.8252 9.9375 5.99982 9.9375C8.17444 9.9375 9.93732 8.17462 9.93732 6C9.93732 3.82538 8.17444 2.0625 5.99982 2.0625ZM0.937317 6C0.937317 3.20406 3.20388 0.9375 5.99982 0.9375C8.79576 0.9375 11.0623 3.20406 11.0623 6C11.0623 8.79594 8.79576 11.0625 5.99982 11.0625C3.20388 11.0625 0.937317 8.79594 0.937317 6Z",fill:"currentColor"}),h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.97865 4.57004C8.22604 4.75795 8.27426 5.11082 8.08635 5.35821L6.05486 8.03279C5.94873 8.17251 5.78348 8.25471 5.60803 8.25505C5.43257 8.2554 5.267 8.17385 5.16032 8.03454L3.80937 6.27034C3.6205 6.02369 3.66733 5.67063 3.91398 5.48176C4.16063 5.29288 4.51369 5.33972 4.70257 5.58637L5.6051 6.76498L7.19048 4.67774C7.37839 4.43036 7.73126 4.38213 7.97865 4.57004Z",fill:"currentColor"})]}),Ibt=e=>h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:h.jsx("path",{d:"M4.60059 6.30005L8.00098 9.70005L11.3996 6.30142",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),G1=e=>h.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.99982 2.0625C3.8252 2.0625 2.06232 3.82538 2.06232 6C2.06232 8.17462 3.8252 9.9375 5.99982 9.9375C8.17444 9.9375 9.93732 8.17462 9.93732 6C9.93732 3.82538 8.17444 2.0625 5.99982 2.0625ZM0.937317 6C0.937317 3.20406 3.20388 0.9375 5.99982 0.9375C8.79576 0.9375 11.0623 3.20406 11.0623 6C11.0623 8.79594 8.79576 11.0625 5.99982 11.0625C3.20388 11.0625 0.937317 8.79594 0.937317 6Z",fill:"currentColor"}),h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.89741 4.10293C8.11707 4.32261 8.11706 4.67877 7.89738 4.89843L6.79517 6.00058L7.8962 7.10155C8.11588 7.32122 8.11589 7.67737 7.89623 7.89705C7.67656 8.11673 7.32041 8.11674 7.10073 7.89707L5.99965 6.79605L4.89856 7.89707C4.67889 8.11673 4.32273 8.11672 4.10307 7.89704C3.88341 7.67737 3.88342 7.32121 4.10309 7.10155L5.20413 6.00058L4.10191 4.89843C3.88224 4.67877 3.88223 4.32262 4.10189 4.10294C4.32155 3.88326 4.67771 3.88325 4.89738 4.10292L5.99965 5.20511L7.10191 4.10291C7.32159 3.88325 7.67774 3.88326 7.89741 4.10293Z",fill:"currentColor"})]}),Obt=e=>h.jsx("svg",{width:"13",height:"14",viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.941406 2.831V3.75745C0.941406 4.27885 1.35491 4.76002 2.05273 5.14711C2.10389 5.17549 2.15658 5.20337 2.21074 5.23071C3.23028 5.74546 4.77322 6.07356 6.50007 6.07356C8.31866 6.07356 9.93328 5.70967 10.9474 5.14711C11.6453 4.76002 12.0587 4.27886 12.0587 3.75745V2.831C12.0587 1.55185 9.57003 0.514893 6.50007 0.514893C3.4301 0.514893 0.941406 1.55185 0.941406 2.831ZM1.02052 6.14518C0.968505 6.27247 0.941406 6.40331 0.941406 6.53678V7.46322C0.941406 7.98463 1.35491 8.46579 2.05273 8.85289C3.06686 9.41542 4.68148 9.77933 6.50007 9.77933C8.22692 9.77933 9.76986 9.45128 10.7894 8.93645C10.8436 8.90912 10.8962 8.88124 10.9474 8.85289C11.6453 8.46579 12.0587 7.98462 12.0587 7.46322V6.53678C12.0587 6.40331 12.0316 6.27248 11.9796 6.14519C11.664 6.35469 11.3187 6.53063 10.9652 6.67795C9.75207 7.18337 8.17267 7.46322 6.50007 7.46322C4.82747 7.46322 3.24803 7.18337 2.03502 6.67795C1.68142 6.53063 1.3362 6.35469 1.02052 6.14518ZM1.02052 9.85095C0.968505 9.97824 0.941406 10.1091 0.941406 10.2426V11.169C0.941406 12.4481 3.4301 13.4851 6.50007 13.4851C9.57003 13.4851 12.0587 12.4481 12.0587 11.169V10.2426C12.0587 10.1091 12.0316 9.97824 11.9796 9.85095C11.664 10.0605 11.3187 10.2364 10.9652 10.3837C9.75207 10.8891 8.17267 11.169 6.50007 11.169C4.82747 11.169 3.24803 10.8891 2.03502 10.3837C1.68142 10.2364 1.3362 10.0605 1.02052 9.85095Z",fill:"currentColor"})}),Rbt=e=>h.jsxs("svg",{width:"13",height:"14",viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[h.jsx("path",{d:"M6.83531 7.0062C6.64515 7.35069 6.15 7.35069 5.95984 7.0062L2.99029 1.62664C2.7855 1.25565 3.10614 0.814077 3.5223 0.893977L6.30195 1.42765C6.36421 1.43961 6.42818 1.43961 6.49044 1.42766L9.27301 0.893806C9.68915 0.813965 10.0097 1.25552 9.80495 1.62648L6.83531 7.0062Z",fill:"currentColor"}),h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.77553 6.93249C4.70399 6.80288 4.52254 6.79459 4.4558 6.92674C4.30167 7.23196 4.21484 7.57697 4.21484 7.94226C4.21484 9.18814 5.22483 10.1981 6.4707 10.1981C7.71658 10.1981 8.72656 9.18814 8.72656 7.94226C8.72656 7.51818 8.60954 7.12143 8.40603 6.78254C8.33262 6.66031 8.15949 6.67411 8.09059 6.79894L7.70941 7.48947C7.13892 8.52294 5.65347 8.52293 5.08299 7.48947L4.77553 6.93249ZM5.56313 5.8764C5.46196 5.92091 5.42707 6.04354 5.48048 6.1403L5.95846 7.0062C6.14862 7.35069 6.64377 7.35069 6.83393 7.0062L7.33905 6.09115C7.39467 5.99039 7.35417 5.86275 7.2461 5.8232C7.00431 5.7347 6.74315 5.6864 6.4707 5.6864C6.14785 5.6864 5.84083 5.75423 5.56313 5.8764Z",fill:"currentColor"}),h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.01974 3.49407C4.17993 3.78426 4.54405 3.88541 4.85312 3.76562C5.35484 3.57118 5.90031 3.46453 6.4707 3.46453C7.0005 3.46453 7.50881 3.55654 7.98052 3.72545C8.28711 3.83523 8.64168 3.73133 8.79906 3.44623C8.96234 3.15043 8.85109 2.77497 8.5364 2.652C7.89621 2.40184 7.19949 2.26453 6.4707 2.26453C5.69013 2.26453 4.94634 2.42205 4.2694 2.70703C3.96395 2.83562 3.85958 3.20392 4.01974 3.49407ZM9.9461 4.47216C9.81565 4.70848 9.85645 4.99948 10.0211 5.21339C10.6026 5.96887 10.9484 6.91518 10.9484 7.94226C10.9484 10.4152 8.94369 12.42 6.4707 12.42C3.99772 12.42 1.99297 10.4152 1.99297 7.94226C1.99297 6.96004 2.30923 6.05168 2.84547 5.31345C3.0006 5.09989 3.03605 4.81591 2.90848 4.58482C2.70986 4.22501 2.22216 4.15342 1.97124 4.47893C1.2324 5.43738 0.792968 6.6385 0.792968 7.94226C0.792969 11.078 3.33498 13.62 6.4707 13.62C9.60643 13.62 12.1484 11.078 12.1484 7.94226C12.1484 6.58193 11.67 5.33333 10.8723 4.35553C10.6173 4.04298 10.141 4.11901 9.9461 4.47216Z",fill:"currentColor"})]}),Lbt=e=>h.jsx("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:h.jsx("path",{d:"M8.5 3V13",stroke:"currentColor",strokeWidth:"0.5"})}),Bbt=e=>h.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[h.jsx("g",{clipPath:"url(#clip0_21999_22095)",children:h.jsx("path",{d:"M7.5 0.75C3.6325 0.75 0.5 3.8825 0.5 7.75C0.5 10.8475 2.50375 13.4637 5.28625 14.3912C5.63625 14.4525 5.7675 14.2425 5.7675 14.0587C5.7675 13.8925 5.75875 13.3412 5.75875 12.755C4 13.0787 3.545 12.3262 3.405 11.9325C3.32625 11.7312 2.985 11.11 2.6875 10.9437C2.4425 10.8125 2.0925 10.4887 2.67875 10.48C3.23 10.4712 3.62375 10.9875 3.755 11.1975C4.385 12.2562 5.39125 11.9587 5.79375 11.775C5.855 11.32 6.03875 11.0137 6.24 10.8387C4.6825 10.6637 3.055 10.06 3.055 7.3825C3.055 6.62125 3.32625 5.99125 3.7725 5.50125C3.7025 5.32625 3.4575 4.60875 3.8425 3.64625C3.8425 3.64625 4.42875 3.4625 5.7675 4.36375C6.3275 4.20625 6.9225 4.1275 7.5175 4.1275C8.1125 4.1275 8.7075 4.20625 9.2675 4.36375C10.6062 3.45375 11.1925 3.64625 11.1925 3.64625C11.5775 4.60875 11.3325 5.32625 11.2625 5.50125C11.7087 5.99125 11.98 6.6125 11.98 7.3825C11.98 10.0687 10.3438 10.6637 8.78625 10.8387C9.04 11.0575 9.25875 11.4775 9.25875 12.1337C9.25875 13.07 9.25 13.8225 9.25 14.0587C9.25 14.2425 9.38125 14.4612 9.73125 14.3912C11.1209 13.9221 12.3284 13.029 13.1839 11.8377C14.0393 10.6463 14.4996 9.21668 14.5 7.75C14.5 3.8825 11.3675 0.75 7.5 0.75Z",fill:"currentColor"})}),h.jsx("defs",{children:h.jsx("clipPath",{id:"clip0_21999_22095",children:h.jsx("rect",{width:"14",height:"14",fill:"currentColor",transform:"translate(0.5 0.75)"})})})]}),$bt=e=>h.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[h.jsxs("g",{clipPath:"url(#clip0_21999_20513)",children:[h.jsx("path",{d:"M13.5037 7.54867C13.5037 7.1144 13.4648 6.69683 13.3924 6.29596H7.62436V8.66776H10.9204C10.7756 9.43052 10.3413 10.0764 9.68994 10.5106V12.0529H11.6776C12.8356 10.9839 13.5037 9.41382 13.5037 7.54867Z",fill:"white"}),h.jsx("path",{d:"M7.62415 13.5339C9.27773 13.5339 10.6643 12.9882 11.6776 12.0529L9.68994 10.5106C9.14431 10.8781 8.44816 11.1009 7.62415 11.1009C6.03182 11.1009 4.67889 10.0263 4.19451 8.57877H2.15677V10.16C3.1645 12.1587 5.23008 13.5339 7.62415 13.5339Z",fill:"white"}),h.jsx("path",{d:"M4.19472 8.57315C4.07223 8.20569 3.99985 7.81595 3.99985 7.40952C3.99985 7.00308 4.07223 6.61335 4.19472 6.24589V4.66469H2.15698C1.73941 5.4887 1.5 6.41849 1.5 7.40952C1.5 8.40055 1.73941 9.33034 2.15698 10.1543L3.74374 8.91834L4.19472 8.57315Z",fill:"white"}),h.jsx("path",{d:"M7.62415 3.72376C8.5261 3.72376 9.32783 4.03555 9.96811 4.63685L11.7219 2.88306C10.6585 1.89202 9.27773 1.28516 7.62415 1.28516C5.23008 1.28516 3.16471 2.66036 2.15698 4.66469L4.19472 6.24589C4.6791 4.79832 6.03182 3.72376 7.62415 3.72376Z",fill:"white"})]}),h.jsx("defs",{children:h.jsx("clipPath",{id:"clip0_21999_20513",children:h.jsx("rect",{width:"12.2487",height:"12.2487",fill:"white",transform:"translate(1.375 1.28516)"})})})]}),r0e=e=>h.jsxs("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[h.jsx("path",{d:"M7.07303 7.39921C6.65882 7.39921 6.32303 7.735 6.32303 8.14921C6.32303 8.56343 6.65882 8.89921 7.07303 8.89921H7.75V10.6187C7.75 11.0329 8.08579 11.3687 8.5 11.3687C8.91421 11.3687 9.25 11.0329 9.25 10.6187V8.14921C9.25 7.735 8.91421 7.39921 8.5 7.39921H7.07303Z",fill:"currentColor"}),h.jsx("path",{d:"M8.50309 4.72995C7.9971 4.72995 7.58691 5.14014 7.58691 5.64613C7.58691 6.15212 7.9971 6.56231 8.50309 6.56231C9.00908 6.56231 9.41927 6.15212 9.41927 5.64613C9.41927 5.14014 9.00908 4.72995 8.50309 4.72995Z",fill:"currentColor"}),h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.5 1.75293C5.04984 1.75293 2.25293 4.54984 2.25293 8C2.25293 11.4502 5.04984 14.2471 8.5 14.2471C11.9502 14.2471 14.7471 11.4502 14.7471 8C14.7471 4.54984 11.9502 1.75293 8.5 1.75293ZM3.75293 8C3.75293 5.37827 5.87827 3.25293 8.5 3.25293C11.1218 3.25293 13.2471 5.37826 13.2471 8C13.2471 10.6218 11.1218 12.7471 8.5 12.7471C5.87826 12.7471 3.75293 10.6218 3.75293 8Z",fill:"currentColor"})]}),s0e=e=>h.jsx("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:h.jsx("path",{d:"M3.8674 9.19968L4.14554 10.8649C4.23965 11.4283 4.75254 11.8237 5.32137 11.7713L5.58252 11.7472C6.56555 11.6567 7.43309 12.3868 7.51181 13.3708L7.59308 14.3867C7.60422 14.5259 7.71868 14.6342 7.85825 14.6376L9.91053 14.6876C10.1066 14.6924 10.2434 14.4948 10.17 14.3129L8.90452 11.1782C8.80956 10.9429 8.65085 10.7389 8.44626 10.5889L7.90134 10.1895C7.70604 10.0464 7.55223 9.85411 7.45759 9.63124C7.15011 8.90712 6.6579 7.71234 6.37054 6.88944C6.19204 6.3783 5.79931 6.29158 5.45492 6.21553C4.98179 6.11106 4.5999 6.02673 4.99001 4.88985C5.66408 2.92541 8.06015 2.07904 10.6601 3.33088C12.6488 4.2884 13.1187 6.35416 13.0328 7.58237C13.0297 7.62768 13.0214 7.67186 13.0094 7.71566C12.8829 8.17534 12.368 8.40491 11.9415 8.19169L10.3022 7.37201C10.2069 7.32439 10.0927 7.33657 10.0096 7.40322L8.64809 8.49559C8.55405 8.57104 8.52072 8.69931 8.56615 8.811L10.8995 14.5478C10.9404 14.6483 11.0369 14.715 11.1454 14.7177L12.0572 14.7399C12.2581 14.7448 12.3951 14.5382 12.3124 14.3551L11.8681 13.3706C11.4211 12.3803 11.6047 11.2192 12.3354 10.4151L13.4616 9.17575C13.7473 8.86125 13.9224 8.46187 13.9599 8.03858L13.9763 7.85359C14.2866 4.35298 11.377 1.41272 7.87336 1.68639C6.03919 1.82965 4.45399 3.02228 3.80807 4.74492L3.70275 5.02579C3.5828 5.34571 3.62741 5.70411 3.82213 5.98485L3.88946 6.08192C4.12183 6.41695 4.0958 6.86726 3.82637 7.17328L3.06705 8.03572C2.96261 8.15435 2.98058 8.33664 3.10617 8.43259L3.66059 8.85617C3.77064 8.94026 3.84458 9.06307 3.8674 9.19968Z",fill:"currentColor"})}),zbt=e=>h.jsx("svg",{width:"12",height:"13",viewBox:"0 0 12 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:h.jsx("path",{d:"M10.1266 5.67745C10.3409 5.0225 10.2695 4.2961 9.92413 3.70069C9.40017 2.78376 8.34034 2.31934 7.30433 2.53369C6.85182 2.02164 6.18496 1.73584 5.49428 1.73584C4.43445 1.73584 3.50561 2.41461 3.17218 3.4149C2.49342 3.55779 1.90992 3.97458 1.56458 4.5819C1.04062 5.49883 1.1597 6.64202 1.86228 7.42796C1.64793 8.09482 1.73129 8.80931 2.07663 9.40472C2.60059 10.3217 3.66042 10.798 4.69643 10.5717C5.16085 11.0838 5.8158 11.3815 6.50648 11.3815C7.56631 11.3815 8.49515 10.7027 8.82858 9.70243C9.50735 9.55953 10.0908 9.14274 10.4362 8.53542C10.9601 7.61849 10.8411 6.46339 10.1266 5.67745ZM6.50648 10.7503C6.07778 10.7503 5.67291 10.6074 5.35138 10.3336C5.36329 10.3217 5.39902 10.3097 5.41093 10.2978L7.32815 9.19037C7.42341 9.13083 7.48295 9.03557 7.48295 8.91648V6.21332L8.29271 6.67774C8.30462 6.67774 8.30462 6.68965 8.30462 6.70156V8.9403C8.31653 9.94059 7.50677 10.7503 6.50648 10.7503ZM2.62441 9.09511C2.41006 8.72595 2.33861 8.29726 2.41006 7.88047C2.42197 7.89238 2.44578 7.90429 2.4696 7.91619L4.38682 9.02366C4.48209 9.0832 4.60117 9.0832 4.69643 9.02366L7.04235 7.66612V8.60687C7.04235 8.61878 7.04235 8.63069 7.03044 8.63069L5.0894 9.75006C4.23201 10.2502 3.12455 9.9525 2.62441 9.09511ZM2.12426 4.90342C2.33861 4.53427 2.67204 4.26038 3.06501 4.10557V6.39195C3.06501 6.49912 3.12455 6.60629 3.21982 6.66583L5.56573 8.02337L4.75597 8.48779C4.74407 8.48779 4.73216 8.4997 4.73216 8.48779L2.79112 7.36842C1.90992 6.86827 1.62412 5.76081 2.12426 4.90342ZM8.79285 6.45149L6.44694 5.09395L7.2567 4.62953C7.2686 4.62953 7.28051 4.61762 7.28051 4.62953L9.22155 5.7489C10.0908 6.24905 10.3766 7.35651 9.8765 8.2139C9.66215 8.58305 9.32872 8.85694 8.93575 8.99984V6.72538C8.94766 6.6182 8.88812 6.51103 8.79285 6.45149ZM9.5907 5.23685C9.5788 5.22494 9.55498 5.21303 9.53116 5.20113L7.61394 4.09366C7.51868 4.03412 7.39959 4.03412 7.30433 4.09366L4.95841 5.4512V4.51045C4.95841 4.49854 4.95841 4.48663 4.97032 4.48663L6.91136 3.36726C7.78066 2.86712 8.87621 3.16482 9.37636 4.03412C9.5907 4.39137 9.66215 4.82006 9.5907 5.23685ZM4.51781 6.904L3.70805 6.43958C3.69615 6.43958 3.69615 6.42767 3.69615 6.41576V4.17702C3.69615 3.17673 4.5059 2.36697 5.50619 2.36697C5.93489 2.36697 6.33977 2.50987 6.66129 2.78376C6.64938 2.79567 6.62556 2.80758 6.60175 2.81949L4.68453 3.92695C4.58926 3.98649 4.52972 4.08176 4.52972 4.20084V6.904H4.51781ZM4.95841 5.95134L6.00634 5.34402L7.05426 5.95134V7.15407L6.00634 7.76139L4.95841 7.15407V5.95134Z",fill:"currentColor"})}),Hbt=e=>h.jsx("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 12V11C3 10.6022 3.15804 10.2206 3.43934 9.93934C3.72064 9.65804 4.10218 9.5 4.5 9.5C4.89782 9.5 5.27936 9.65804 5.56066 9.93934C5.84196 10.2206 6 10.6022 6 11V12C6 12.3978 5.84196 12.7794 5.56066 13.0607C5.27936 13.342 4.89782 13.5 4.5 13.5C4.10218 13.5 3.72064 13.342 3.43934 13.0607C3.15804 12.7794 3 12.3978 3 12ZM7 12V8.5C7 8.10218 7.15804 7.72064 7.43934 7.43934C7.72064 7.15804 8.10218 7 8.5 7C8.89782 7 9.27936 7.15804 9.56066 7.43934C9.84196 7.72064 10 8.10218 10 8.5V12C10 12.3978 9.84196 12.7794 9.56066 13.0607C9.27936 13.342 8.89782 13.5 8.5 13.5C8.10218 13.5 7.72064 13.342 7.43934 13.0607C7.15804 12.7794 7 12.3978 7 12ZM11 12V4C11 3.60218 11.158 3.22064 11.4393 2.93934C11.7206 2.65804 12.1022 2.5 12.5 2.5C12.8978 2.5 13.2794 2.65804 13.5607 2.93934C13.842 3.22064 14 3.60218 14 4V12C14 12.3978 13.842 12.7794 13.5607 13.0607C13.2794 13.342 12.8978 13.5 12.5 13.5C12.1022 13.5 11.7206 13.342 11.4393 13.0607C11.158 12.7794 11 12.3978 11 12Z",fill:"currentColor"})}),Vbt=e=>h.jsx("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:h.jsx("path",{d:"M5.25684 12.6387L10.4003 3.36133H11.7432L6.5997 12.6387H5.25684Z",fill:"currentColor"})}),gl=e=>h.jsx("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.5605 1.42351C8.0791 0.904904 8.92215 0.906157 9.4395 1.42351L10.6922 2.67617C11.2108 3.19477 11.2095 4.03782 10.6922 4.55517L9.4395 5.80783C8.9209 6.32643 8.07785 6.32518 7.5605 5.80783L6.30784 4.55517C5.78923 4.03656 5.79049 3.19352 6.30784 2.67617L7.5605 1.42351ZM3.17618 5.80783C3.69478 5.28923 4.53782 5.29048 5.05517 5.80783L6.30784 7.0605C6.82644 7.5791 6.82519 8.42214 6.30784 8.93949L5.05517 10.1922C4.53657 10.7108 3.69353 10.7095 3.17618 10.1922L1.92351 8.93949C1.40491 8.42089 1.40616 7.57785 1.92351 7.0605L3.17618 5.80783ZM11.9448 5.80783C12.4634 5.28923 13.3065 5.29048 13.8238 5.80783L15.0765 7.0605C15.5951 7.5791 15.5938 8.42214 15.0765 8.93949L13.8238 10.1922C13.3052 10.7108 12.4622 10.7095 11.9448 10.1922L10.6922 8.93949C10.1736 8.42089 10.1748 7.57785 10.6922 7.0605L11.9448 5.80783ZM7.5605 10.1922C8.0791 9.67355 8.92215 9.67481 9.4395 10.1922L10.6922 11.4448C11.2108 11.9634 11.2095 12.8065 10.6922 13.3238L9.4395 14.5765C8.9209 15.0951 8.07785 15.0938 7.5605 14.5765L6.30784 13.3238C5.78923 12.8052 5.79049 11.9622 6.30784 11.4448L7.5605 10.1922Z",fill:"currentColor"})}),Vj=e=>h.jsxs("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[h.jsx("path",{d:"M3.0498 3.17139V7.95137M6.91346 12.8737L4.04984 12.8738C3.49754 12.8738 3.0498 12.4261 3.0498 11.8738V7.95137M3.0498 7.95137L6.85968 7.95125",stroke:"currentColor",strokeLinecap:"round"}),h.jsx("path",{d:"M6.59668 3.12631L13.9507 3.12631",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),h.jsx("path",{d:"M10.293 7.95099L13.8072 7.95099",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),h.jsx("path",{d:"M10.293 12.8025L13.8072 12.8025",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),kc=e=>h.jsx("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.24388 2.4018C6.24388 2.0394 6.53767 1.74561 6.90008 1.74561H10.0991C10.4614 1.74561 10.7553 2.0394 10.7553 2.4018V4.57546C10.7553 4.93787 10.4614 5.23166 10.0991 5.23166H9.31982V7.35469L10.0033 9.22664C9.90442 9.20146 9.80035 9.1761 9.6915 9.14986L9.62652 9.13422C9.30473 9.05687 8.92256 8.96501 8.61993 8.84491C8.5819 8.82981 8.54147 8.81292 8.49957 8.79391C8.45767 8.81292 8.41724 8.82981 8.3792 8.84491C8.07657 8.96501 7.6944 9.05687 7.37261 9.13422L7.30763 9.14986C7.19879 9.1761 7.09471 9.20146 6.99577 9.22664L7.67932 7.35469V5.23166H6.90008C6.53767 5.23166 6.24388 4.93787 6.24388 4.57546V2.4018ZM6.99577 9.22664C6.99577 9.22664 6.99578 9.22664 6.99577 9.22664L6.43283 10.7683H6.81806C7.18047 10.7683 7.47426 11.0622 7.47426 11.4245V13.5982C7.47426 13.9606 7.18047 14.2544 6.81806 14.2544H3.61909C3.25668 14.2544 2.96289 13.9606 2.96289 13.5982V11.4245C2.96289 11.0622 3.25668 10.7683 3.61909 10.7683H4.26617C4.2921 10.4663 4.32783 10.1494 4.37744 9.85171C4.43762 9.49063 4.52982 9.08135 4.68998 8.76102C4.93975 8.2615 5.44743 8.01751 5.7771 7.88788C6.14684 7.74249 6.57537 7.63889 6.92317 7.55505C7.24707 7.47696 7.49576 7.41679 7.67932 7.35469L6.99577 9.22664ZM6.43283 10.7683L6.99577 9.22664C6.75846 9.28705 6.55067 9.34646 6.37745 9.41458C6.22784 9.47341 6.1623 9.51712 6.14023 9.53254C6.09752 9.63631 6.04409 9.83055 5.99562 10.1214C5.96201 10.3231 5.93498 10.5439 5.91341 10.7683H6.43283ZM10.0033 9.22664L9.31982 7.35469C9.50338 7.41679 9.75206 7.47696 10.076 7.55505C10.4238 7.63889 10.8523 7.74249 11.2221 7.88788C11.5517 8.01751 12.0594 8.2615 12.3091 8.76102C12.4693 9.08135 12.5615 9.49063 12.6217 9.85171C12.6713 10.1494 12.707 10.4663 12.733 10.7683H13.38C13.7424 10.7683 14.0362 11.0622 14.0362 11.4245V13.5982C14.0362 13.9606 13.7424 14.2544 13.38 14.2544H10.1811C9.81867 14.2544 9.52488 13.9606 9.52488 13.5982V11.4245C9.52488 11.0622 9.81867 10.7683 10.1811 10.7683H10.5663L10.0033 9.22664ZM10.0033 9.22664L10.5663 10.7683H11.0857C11.0642 10.5439 11.0372 10.3231 11.0035 10.1214C10.9551 9.83055 10.9016 9.63631 10.8589 9.53254C10.8369 9.51712 10.7713 9.47341 10.6217 9.41458C10.4485 9.34646 10.2407 9.28705 10.0033 9.22664Z",fill:"currentColor"})}),Ubt=e=>h.jsxs("svg",{width:"126",height:"85",viewBox:"0 0 126 85",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[h.jsx("path",{d:"M119.322 35.1636C119.322 50.3595 94.1055 62.6782 62.9998 62.6782C31.894 62.6782 6.67773 50.3595 6.67773 35.1636V49.8363C6.67773 65.0322 31.894 77.351 62.9998 77.351C94.1055 77.351 119.322 65.0322 119.322 49.8363V35.1636Z",fill:"#2E2E2E",fillOpacity:"0.9"}),h.jsx("path",{d:"M119.322 35.1636C119.322 50.3595 94.1055 62.6782 62.9998 62.6782C31.894 62.6782 6.67773 50.3595 6.67773 35.1636M119.322 35.1636C119.322 19.9677 94.1055 7.64893 62.9998 7.64893C31.894 7.64893 6.67773 19.9677 6.67773 35.1636M119.322 35.1636V49.8363C119.322 65.0322 94.1055 77.351 62.9998 77.351C31.894 77.351 6.67773 65.0322 6.67773 49.8363V35.1636",stroke:"#424242"}),h.jsx("path",{d:"M63.0002 0.968262C28.5152 0.968262 0.55957 15.6484 0.55957 33.7573V51.2428C0.55957 69.3517 28.5152 84.0319 63.0002 84.0319C97.4853 84.0319 125.441 69.3517 125.441 51.2428V33.7573C125.441 15.6484 97.4853 0.968262 63.0002 0.968262Z",stroke:"#707070"}),h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M74.9374 21.357C76.2127 20.7291 78.2804 20.7291 79.5557 21.357L90.8129 26.8997C92.0882 27.5276 92.0882 28.5458 90.8129 29.1737L83.1638 32.9399C81.8885 33.5678 79.8207 33.5678 78.5454 32.9399L75.8033 31.5898L68.3324 35.2682L64.1502 39.696C63.8908 39.481 63.6138 39.2568 63.3231 39.0227L63.1495 38.883C62.2893 38.1914 61.2677 37.3701 60.6254 36.6376C60.5446 36.5456 60.4618 36.4463 60.3812 36.3407C60.1669 36.3011 59.9652 36.2603 59.7782 36.2205C58.2906 35.9043 56.6225 35.4013 55.2179 34.9777L54.9342 34.8922C54.4589 34.7491 54.0034 34.6127 53.5666 34.4849L62.5594 32.4258L70.0304 28.7473L67.2882 27.3972C66.0129 26.7692 66.0129 25.7512 67.2882 25.1232L74.9374 21.357ZM53.5666 34.4849C53.5666 34.4849 53.5666 34.4849 53.5666 34.4849L46.1603 36.1808L47.516 36.8483C48.7913 37.4762 48.7912 38.4943 47.516 39.1222L39.8668 42.8884C38.5916 43.5163 36.5238 43.5164 35.2485 42.8884L23.9913 37.3457C22.7159 36.7177 22.716 35.6996 23.9913 35.0717L31.6404 31.3055C32.9156 30.6776 34.9834 30.6776 36.2587 31.3055L38.5358 32.4267C39.6899 31.9483 40.9309 31.4611 42.153 31.0313C43.6354 30.5099 45.4001 29.9605 47.091 29.683C49.7278 29.2502 52.3729 29.7072 53.9892 30.0537C55.8019 30.4425 57.6745 31.0055 59.1934 31.4628C60.6081 31.8887 61.6949 32.2154 62.5594 32.4258L53.5666 34.4849ZM46.1603 36.1808L53.5666 34.4849C52.5189 34.1784 51.5786 33.9213 50.7293 33.7392C49.9958 33.5819 49.6114 33.5441 49.4794 33.5326C48.964 33.6384 48.0924 33.8823 46.8983 34.3023C46.0703 34.5936 45.1981 34.9293 44.3325 35.2808L46.1603 36.1808ZM64.1502 39.696L68.3324 35.2682C68.7598 35.6939 69.4232 36.229 70.2883 36.9256C71.2171 37.6735 72.3605 38.5954 73.15 39.488C73.8539 40.2838 74.7818 41.5862 73.9029 42.8844C73.3394 43.717 72.2235 44.5859 71.1648 45.3159C70.2916 45.9175 69.3021 46.5286 68.3305 47.0968L70.6077 48.218C71.8829 48.8459 71.8829 49.864 70.6077 50.4919L62.9585 54.2582C61.6833 54.8861 59.6154 54.8861 58.3402 54.2582L47.083 48.7154C45.8077 48.0875 45.8077 47.0694 47.083 46.4415L54.7321 42.6752C56.0074 42.0474 58.0751 42.0473 59.3505 42.6752L60.7062 43.3428L64.1502 39.696ZM64.1502 39.696L60.7062 43.3428L62.5339 44.2427C63.2478 43.8165 63.9298 43.3871 64.5213 42.9794C65.3742 42.3914 65.8695 41.9622 66.0846 41.7085C66.0613 41.6436 65.9844 41.4543 65.6649 41.0931C65.295 40.6749 64.773 40.212 64.1502 39.696Z",fill:"#A9A9A9"})]}),Wbt=e=>h.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[h.jsx("path",{d:"M2.0625 5.99976C2.0625 3.82513 3.82538 2.06226 6 2.06226C6.58712 2.06226 7.14423 2.19076 7.64473 2.42117V1.21042C7.12905 1.03337 6.57575 0.937256 6 0.937256C3.20406 0.937256 0.9375 3.20381 0.9375 5.99976C0.9375 8.7957 3.20406 11.0623 6 11.0623C8.79594 11.0623 11.0625 8.7957 11.0625 5.99976H9.9375C9.9375 8.17438 8.17462 9.93726 6 9.93726C3.82538 9.93726 2.0625 8.17438 2.0625 5.99976Z",fill:"currentColor"}),h.jsx("path",{d:"M9.28577 4.3986C9.08709 4.3986 8.92603 4.23753 8.92603 4.03885V0.978563C8.92603 0.681899 9.16652 0.441406 9.46318 0.441406C9.75985 0.441406 10.0003 0.6819 10.0003 0.978564V3.25858C10.0003 3.33638 10.0634 3.39944 10.1412 3.39944H11.2091C11.485 3.39944 11.7087 3.62311 11.7087 3.89902C11.7087 4.17493 11.485 4.3986 11.2091 4.3986H9.28577Z",fill:"currentColor"}),h.jsx("path",{d:"M6.57568 3.69244C6.57568 3.38178 6.32384 3.12994 6.01318 3.12994C5.70252 3.12994 5.45068 3.38178 5.45068 3.69244V6.22272L6.7242 7.88675C6.91301 8.13346 7.26606 8.18039 7.51276 7.99159C7.75946 7.80278 7.8064 7.44973 7.61759 7.20303L6.57568 5.84162V3.69244Z",fill:"currentColor"})]}),T4=e=>h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[h.jsx("path",{d:"M6.53918 9.32122C6.34324 9.51508 6.02724 9.51338 5.83338 9.31744C5.63952 9.1215 5.6412 8.80551 5.83713 8.61164L10.1958 4.29931C10.7996 3.70186 10.8017 2.72852 10.2041 2.12839L10.1899 2.11428C9.58767 1.52481 8.62251 1.53208 8.0292 2.13052L2.29396 7.91536C2.0999 8.1111 1.78388 8.11246 1.58813 7.9184C1.39239 7.72433 1.39103 7.40831 1.58509 7.21257L7.32036 1.42774C8.30005 0.439581 9.89369 0.427613 10.8881 1.40094L10.9116 1.42425C11.4942 2.00929 11.7316 2.80913 11.6232 3.56922C12.389 3.44866 13.1999 3.67918 13.7961 4.26273C14.804 5.24929 14.8147 6.86824 13.82 7.86808L8.5531 13.1619C8.50045 13.2148 8.50024 13.3002 8.55263 13.3534L9.65448 14.4717C9.84794 14.668 9.8456 14.984 9.64925 15.1775C9.45291 15.3709 9.13691 15.3686 8.94345 15.1723L7.84163 14.054C7.40505 13.6109 7.40677 12.8988 7.8455 12.4579L13.1124 7.16405C13.7161 6.55727 13.7095 5.57478 13.0979 4.97606C12.4925 4.38347 11.4942 4.40725 10.8978 5.00886L6.53918 9.32122Z",fill:"currentColor"}),h.jsx("path",{d:"M8.84622 2.75411C9.04697 2.56188 9.36555 2.56381 9.56395 2.76076C9.76234 2.95771 9.76658 3.27625 9.57582 3.4784L9.56661 3.48794L5.25912 7.82701C4.67023 8.42022 4.672 9.37798 5.26305 9.96904C5.85624 10.5622 6.81818 10.5615 7.41052 9.9675L11.6299 5.73599L11.6395 5.72671C11.8406 5.53493 12.1592 5.53756 12.3572 5.73496C12.5583 5.93548 12.5587 6.26104 12.3582 6.46214L8.13877 10.6937C7.14498 11.6903 5.53105 11.6915 4.53584 10.6963C3.5442 9.70461 3.54127 8.09774 4.52928 7.10248L8.83677 2.76342L8.84622 2.75411Z",fill:"currentColor"})]}),qbt=e=>h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:h.jsx("path",{d:"M1.5 8.5V8C1.5 7.60218 1.65804 7.22064 1.93934 6.93934C2.22064 6.65804 2.60218 6.5 3 6.5H13C13.3978 6.5 13.7794 6.65804 14.0607 6.93934C14.342 7.22064 14.5 7.60218 14.5 8V8.5M8.70667 4.20667L7.29333 2.79333C7.20048 2.70037 7.09022 2.62661 6.96886 2.57628C6.84749 2.52595 6.71739 2.50003 6.586 2.5H3C2.60218 2.5 2.22064 2.65804 1.93934 2.93934C1.65804 3.22064 1.5 3.60218 1.5 4V12C1.5 12.3978 1.65804 12.7794 1.93934 13.0607C2.22064 13.342 2.60218 13.5 3 13.5H13C13.3978 13.5 13.7794 13.342 14.0607 13.0607C14.342 12.7794 14.5 12.3978 14.5 12V6C14.5 5.60218 14.342 5.22064 14.0607 4.93934C13.7794 4.65804 13.3978 4.5 13 4.5H9.414C9.14887 4.49977 8.89402 4.39426 8.70667 4.20667Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})}),Gbt=e=>h.jsxs("svg",{width:"126",height:"85",viewBox:"0 0 126 85",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[h.jsx("path",{d:"M119.322 35.1641C119.322 50.36 94.1055 62.6787 62.9998 62.6787C31.894 62.6787 6.67773 50.36 6.67773 35.1641V49.8368C6.67773 65.0327 31.894 77.3514 62.9998 77.3514C94.1055 77.3514 119.322 65.0327 119.322 49.8368V35.1641Z",fill:"#2E2E2E",fillOpacity:"0.9"}),h.jsx("path",{d:"M119.322 35.1641C119.322 50.36 94.1055 62.6787 62.9998 62.6787C31.894 62.6787 6.67773 50.36 6.67773 35.1641M119.322 35.1641C119.322 19.9681 94.1055 7.64941 62.9998 7.64941C31.894 7.64941 6.67773 19.9681 6.67773 35.1641M119.322 35.1641V49.8368C119.322 65.0327 94.1055 77.3514 62.9998 77.3514C31.894 77.3514 6.67773 65.0327 6.67773 49.8368V35.1641",stroke:"#424242"}),h.jsx("path",{d:"M63.0002 0.96875C28.5152 0.96875 0.55957 15.6489 0.55957 33.7578V51.2433C0.55957 69.3522 28.5152 84.0323 63.0002 84.0323C97.4853 84.0323 125.441 69.3522 125.441 51.2433V33.7578C125.441 15.6489 97.4853 0.96875 63.0002 0.96875Z",stroke:"#707070"}),h.jsx("path",{d:"M51.5215 39.9726C50.5464 40.4477 48.9738 40.4435 48.009 39.9634C47.0442 39.4833 47.0526 38.709 48.0277 38.2339L69.7191 27.6672C72.7243 26.2032 72.7347 23.8181 69.7605 22.3476L69.6898 22.313C66.6927 20.8686 61.8895 20.8864 58.9368 22.3528L30.3946 36.5278C29.4288 37.0074 27.8561 37.0107 26.882 36.5352C25.9078 36.0597 25.901 35.2853 26.8668 34.8057L55.4092 20.6308C60.2847 18.2094 68.2157 18.1801 73.1645 20.5651L73.2814 20.6222C76.1808 22.0558 77.3624 24.0157 76.8227 25.8782C80.6339 25.5828 84.6694 26.1476 87.6364 27.5775C92.6525 29.9949 92.7059 33.962 87.7554 36.4119L61.5441 49.3836C61.282 49.5133 61.281 49.7227 61.5417 49.853L67.0252 52.5932C67.988 53.0743 67.9763 53.8486 66.9992 54.3226C66.0221 54.7966 64.4495 54.7909 63.4867 54.3098L58.0033 51.5695C55.8306 50.4838 55.8392 48.7391 58.0226 47.6585L84.2339 34.6868C87.2382 33.2 87.2058 30.7925 84.1617 29.3254C81.1488 27.8734 76.1811 27.9317 73.2127 29.4058L51.5215 39.9726Z",fill:"#A9A9A9"}),h.jsx("path",{d:"M63.0028 23.8809C64.0019 23.4098 65.5873 23.4146 66.5747 23.8972C67.562 24.3798 67.5831 25.1603 66.6338 25.6556L66.5879 25.679L45.1511 36.3113C42.2204 37.7649 42.2292 40.1117 45.1707 41.56C48.1228 43.0135 52.91 43.0118 55.8578 41.5563L76.8564 31.1875L76.9037 31.1648C77.9049 30.6949 79.4903 30.7013 80.4755 31.185C81.4763 31.6764 81.4785 32.4741 80.4806 32.9669L59.4821 43.3356C54.5363 45.7777 46.5044 45.7806 41.5516 43.342C36.6166 40.9121 36.602 36.9747 41.519 34.5359L62.9558 23.9037L63.0028 23.8809Z",fill:"#A9A9A9"})]}),Ybt=e=>h.jsxs("svg",{width:"126",height:"85",viewBox:"0 0 126 85",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[h.jsx("path",{d:"M119.322 35.1641C119.322 50.36 94.1055 62.6787 62.9998 62.6787C31.894 62.6787 6.67773 50.36 6.67773 35.1641V49.8368C6.67773 65.0327 31.894 77.3514 62.9998 77.3514C94.1055 77.3514 119.322 65.0327 119.322 49.8368V35.1641Z",fill:"#2E2E2E",fillOpacity:"0.9"}),h.jsx("path",{d:"M119.322 35.1641C119.322 50.36 94.1055 62.6787 62.9998 62.6787C31.894 62.6787 6.67773 50.36 6.67773 35.1641M119.322 35.1641C119.322 19.9681 94.1055 7.64941 62.9998 7.64941C31.894 7.64941 6.67773 19.9681 6.67773 35.1641M119.322 35.1641V49.8368C119.322 65.0327 94.1055 77.3514 62.9998 77.3514C31.894 77.3514 6.67773 65.0327 6.67773 49.8368V35.1641",stroke:"#424242"}),h.jsx("path",{d:"M63.0002 0.96875C28.5152 0.96875 0.55957 15.6489 0.55957 33.7578V51.2433C0.55957 69.3522 28.5152 84.0323 63.0002 84.0323C97.4853 84.0323 125.441 69.3522 125.441 51.2433V33.7578C125.441 15.6489 97.4853 0.96875 63.0002 0.96875Z",stroke:"#707070"}),h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M95.8997 32.6647C98.4806 33.9355 98.4744 36.0012 95.8997 37.2689L89.6657 40.3384C87.0848 41.6091 82.8892 41.6061 80.3146 40.3384L74.0805 37.2689C71.4996 35.9981 71.5059 33.9324 74.0805 32.6647L80.3146 29.5952C82.8955 28.3244 87.091 28.3275 89.6657 29.5952L95.8997 32.6647ZM74.0805 21.9215C76.6614 23.1923 76.6552 25.258 74.0805 26.5257L67.8465 29.5952C65.2656 30.866 61.0701 30.8629 58.4954 29.5952L52.2613 26.5257C49.6804 25.255 49.6867 23.1892 52.2613 21.9215L58.4954 18.852C61.0763 17.5813 65.2718 17.5843 67.8465 18.852L74.0805 21.9215ZM74.0805 43.4079C76.6614 44.6786 76.6552 46.7444 74.0805 48.0121L67.8465 51.0816C65.2656 52.3523 61.0701 52.3493 58.4954 51.0816L52.2613 48.0121C49.6804 46.7413 49.6867 44.6756 52.2613 43.4079L58.4954 40.3384C61.0763 39.0676 65.2718 39.0707 67.8465 40.3384L74.0805 43.4079ZM52.2613 32.6647C54.8422 33.9355 54.836 36.0012 52.2613 37.2689L46.0273 40.3384C43.4464 41.6091 39.2509 41.6061 36.6762 40.3384L30.4422 37.2689C27.8613 35.9981 27.8675 33.9324 30.4422 32.6647L36.6762 29.5952C39.2571 28.3244 43.4526 28.3275 46.0273 29.5952L52.2613 32.6647Z",fill:"#A9A9A9"})]}),Kbt=e=>h.jsxs("svg",{width:"126",height:"85",viewBox:"0 0 126 85",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[h.jsx("path",{d:"M119.322 35.1641C119.322 50.36 94.1055 62.6787 62.9998 62.6787C31.894 62.6787 6.67773 50.36 6.67773 35.1641V49.8368C6.67773 65.0327 31.894 77.3514 62.9998 77.3514C94.1055 77.3514 119.322 65.0327 119.322 49.8368V35.1641Z",fill:"#2E2E2E",fillOpacity:"0.9"}),h.jsx("path",{d:"M119.322 35.1641C119.322 50.36 94.1055 62.6787 62.9998 62.6787C31.894 62.6787 6.67773 50.36 6.67773 35.1641M119.322 35.1641C119.322 19.9681 94.1055 7.64941 62.9998 7.64941C31.894 7.64941 6.67773 19.9681 6.67773 35.1641M119.322 35.1641V49.8368C119.322 65.0327 94.1055 77.3514 62.9998 77.3514C31.894 77.3514 6.67773 65.0327 6.67773 49.8368V35.1641",stroke:"#424242"}),h.jsx("path",{d:"M63.0002 0.96875C28.5152 0.96875 0.55957 15.6489 0.55957 33.7578V51.2433C0.55957 69.3522 28.5152 84.0323 63.0002 84.0323C97.4853 84.0323 125.441 69.3522 125.441 51.2433V33.7578C125.441 15.6489 97.4853 0.96875 63.0002 0.96875Z",stroke:"#707070"}),h.jsx("g",{clipPath:"url(#clip0_23333_14744)",children:h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M79.2946 17.9539C83.0143 19.7854 83.016 22.7559 79.2979 24.5879C77.0214 25.7087 73.8794 26.1385 70.9301 25.8878L67.5296 30.2202C68.0944 30.3987 68.6321 30.6075 69.1262 30.8507C71.0847 31.815 72.0009 33.0948 71.8979 34.3581L77.2504 35.1977C77.6452 34.8727 78.1174 34.5635 78.6856 34.2835C82.4066 32.4514 88.4403 32.4485 92.1623 34.2803C95.8842 36.1128 95.8805 39.0851 92.159 40.9175C88.4373 42.7488 82.4002 42.7513 78.679 40.9191C76.7415 39.9647 75.8248 38.7009 75.9073 37.4506L70.5219 36.6045C70.1354 36.9168 69.6777 37.2145 69.1295 37.4846C68.345 37.8708 67.4527 38.1705 66.5059 38.3939L67.9312 41.984C70.1507 42.0573 72.3276 42.5087 74.0244 43.3438C77.7444 45.1754 77.7467 48.1458 74.0277 49.9778C70.3071 51.8092 64.2712 51.8095 60.551 49.9778C56.8323 48.1459 56.8351 45.1755 60.5543 43.3438C61.3581 42.9482 62.2741 42.6414 63.247 42.4167L61.8282 38.8428C59.5803 38.7777 57.3696 38.3299 55.6527 37.4846C54.1264 36.7327 53.2395 35.7882 52.9666 34.8103L43.924 34.0469C43.4596 34.6259 42.7547 35.1702 41.8041 35.6385C38.0834 37.4696 32.0473 37.4701 28.3273 35.6385C24.6089 33.8068 24.6123 30.8363 28.3306 29.0046C32.0508 27.1737 38.0806 27.1737 41.8008 29.0046C43.3459 29.7653 44.2412 30.7224 44.5033 31.7129L53.5098 32.4747C53.9742 31.8832 54.6868 31.3279 55.656 30.8507C57.6687 29.8601 60.357 29.4079 62.9902 29.4892L66.5783 24.9218C66.3174 24.8179 66.0637 24.7073 65.8212 24.5879C62.1022 22.7559 62.1045 19.7856 65.8245 17.9539C69.5447 16.1235 75.5747 16.1232 79.2946 17.9539ZM38.4299 30.6643C36.5715 29.75 33.5599 29.75 31.7015 30.6643C29.8447 31.5793 29.8414 33.0638 31.6982 33.9788C33.5565 34.8938 36.5742 34.8933 38.4332 33.9788C40.2906 33.0635 40.2883 31.5793 38.4299 30.6643ZM70.6536 45.0035C68.7951 44.0893 65.7836 44.0893 63.9251 45.0035C62.0676 45.9185 62.0647 47.4029 63.9218 48.318C65.7804 49.2332 68.7979 49.2329 70.6569 48.3181C72.5142 47.4027 72.5119 45.9185 70.6536 45.0035ZM65.7553 32.5104C63.8969 31.5961 60.8853 31.5961 59.0269 32.5104C57.1685 33.4254 57.1662 34.9096 59.0236 35.8249C60.8824 36.7402 63.8998 36.7402 65.7586 35.8249C67.616 34.9096 67.6137 33.4254 65.7553 32.5104ZM88.7915 35.94C86.9338 35.0261 83.9184 35.0264 82.0564 35.9432C80.1965 36.8601 80.1945 38.3451 82.0498 39.2594C83.9067 40.1736 86.9255 40.1738 88.7882 39.2578C90.6507 38.3407 90.649 36.8546 88.7915 35.94ZM75.9238 19.6136C74.0656 18.6995 71.0538 18.6998 69.1953 19.6136C67.3369 20.5286 67.3347 22.0129 69.192 22.9282C71.0509 23.8434 74.0682 23.8434 75.9271 22.9282C77.7836 22.0128 77.7818 20.5285 75.9238 19.6136Z",fill:"#A9A9A9"})}),h.jsx("defs",{children:h.jsx("clipPath",{id:"clip0_23333_14744",children:h.jsx("rect",{width:"59.3185",height:"59.3185",fill:"white",transform:"matrix(0.897148 0.441731 -0.897148 0.441731 65.3042 6.51953)"})})})]});function IC({text:e,copyMessage:t="Copied to clipboard!"}){const[n,r]=A.useState(!1),s=A.useRef(null),i=A.useCallback(()=>{navigator.clipboard.writeText(e).then(()=>{Fo.success(t),r(!0),s.current&&(clearTimeout(s.current),s.current=null),s.current=setTimeout(()=>{r(!1)},2e3)}).catch(()=>{Fo.error("Failed to copy to clipboard.")})},[e,t]);return{isCopied:n,handleCopy:i}}function dg({content:e,copyMessage:t,className:n}){const{isCopied:r,handleCopy:s}=IC({text:e,copyMessage:t});return h.jsxs(Js,{variant:"ghost",size:"icon",className:Ve("relative h-6 w-6",n),"aria-label":"Copy to clipboard",onClick:s,children:[h.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:h.jsx(kh,{className:Ve("h-4 w-4 transition-transform ease-in-out",r?"scale-100":"scale-0")})}),h.jsx(Dh,{className:Ve("h-4 w-4 transition-transform ease-in-out",r?"scale-0":"scale-100")})]})}const i0e=()=>A.useMemo(()=>NT({settings:{fontFamily:"var(--geist-mono)",fontSize:"0.8rem",lineHighlight:"transparent",gutterBackground:"transparent",background:"transparent",gutterForeground:"#939393"},styles:[{tag:[Ce.className,Ce.propertyName]}]}),[]),Uj=({data:e,className:t})=>{const n=JSON.stringify(e,null,2),r=i0e();return h.jsxs("div",{className:zn("rounded-md bg-surface4 p-1 font-mono relative",t),children:[h.jsx(dg,{content:n,className:"absolute top-2 right-2"}),h.jsx(al,{value:n,theme:r,extensions:[Fu]})]})};async function Xbt(e,t){const{codeToTokens:n,bundledLanguages:r}=await ooe(async()=>{const{codeToTokens:i,bundledLanguages:o}=await import("./index-D1XeC4tv.js");return{codeToTokens:i,bundledLanguages:o}},[]);if(!(t in r))return null;const{tokens:s}=await n(e,{lang:t,defaultColor:!1,themes:{light:"github-light",dark:"github-dark"}});return s}const o0e=({toolName:e,argsText:t,result:n})=>{const[r,s]=A.useState(!0);let i;try{const o=JSON.parse(t);i=h.jsx(Uj,{data:o})}catch{i=h.jsx("pre",{className:"whitespace-pre-wrap",children:t})}return h.jsxs("div",{className:"mb-2",children:[h.jsxs("button",{onClick:()=>s(o=>!o),className:"flex items-center gap-2",children:[h.jsx(ot,{children:h.jsx(lC,{className:Ve("transition-all",r?"rotate-90":"rotate-180")})}),h.jsx(Un,{icon:h.jsx(gl,{className:"text-[#ECB047]"}),children:e})]}),!r&&h.jsx("div",{className:"pt-2",children:h.jsxs("div",{className:"border-sm border-border1 rounded-lg bg-surface4",children:[h.jsxs("div",{className:"px-4 border-b-sm border-border1 py-2",children:[h.jsx("p",{className:"font-medium pb-2",children:"Tool arguments"}),i]}),n!==void 0&&h.jsxs("div",{className:"px-4 py-2",children:[h.jsx("p",{className:"font-medium pb-2",children:"Tool result"}),typeof n=="string"?h.jsx("pre",{className:"whitespace-pre-wrap",children:n}):h.jsx(Uj,{data:n})]})]})})]})},Jbt=({text:e})=>{const[t,n]=A.useState(!1);return h.jsxs("div",{className:"mb-2 space-y-2",children:[h.jsxs("button",{onClick:()=>n(r=>!r),className:"flex items-center gap-2",children:[h.jsx(ot,{children:h.jsx(lC,{className:Ve("transition-all",t?"rotate-90":"rotate-180")})}),h.jsxs(Un,{icon:h.jsx(xle,{}),children:[t?"Show":"Hide"," reasoning"]})]}),t?null:h.jsx("div",{className:"rounded-lg bg-surface4 p-2 border-sm border-border-1",children:h.jsx("pre",{className:"whitespace-pre-wrap text-ui-sm leading-ui-sm text-icon6",children:e})})]})},Zbt=({ToolFallback:e})=>{const n=Ch().content.every(({type:r})=>r==="tool-call"||r==="reasoning");return h.jsxs(fT,{className:"max-w-full",children:[h.jsx("div",{className:"text-icon6 text-ui-lg leading-ui-lg",children:h.jsx(pT,{components:{Text:t0e,tools:{Fallback:e||o0e},Reasoning:Jbt}})}),!n&&h.jsx("div",{className:"h-6 pt-1",children:h.jsx(Qbt,{})})]})},Qbt=()=>h.jsx(KO,{hideWhenRunning:!0,autohide:"always",autohideFloat:"single-branch",className:"flex gap-1 items-center transition-all relative",children:h.jsx(XO,{asChild:!0,children:h.jsxs(Na,{tooltip:"Copy",className:"bg-transparent text-icon3 hover:text-icon6",children:[h.jsx(Gw,{copied:!0,children:h.jsx(kh,{})}),h.jsx(Gw,{copied:!1,children:h.jsx(Dh,{})})]})})}),e1t=e=>{const[t,n]=A.useState(void 0);return A.useEffect(()=>{if(!e){n(void 0);return}const r=URL.createObjectURL(e);return n(r),()=>{URL.revokeObjectURL(r)}},[e]),t},a0e=()=>{const{file:e,src:t}=G0(EBe(n=>{var s,i;if(n.type!=="image")return{};if(n.file)return{file:n.file};const r=(i=(s=n.content)==null?void 0:s.filter(o=>o.type==="image")[0])==null?void 0:i.image;return r?{src:r}:{}}));return e1t(e)??t},No=qA,OC=GA,l0e=A.forwardRef(({className:e,...t},n)=>h.jsx(ty,{ref:n,className:Ve("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));l0e.displayName=ty.displayName;const Zi=A.forwardRef(({className:e,children:t,...n},r)=>h.jsxs(OC,{children:[h.jsx(l0e,{}),h.jsxs(ny,{ref:r,className:Ve("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,h.jsxs(XS,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[h.jsx($b,{className:"h-4 w-4"}),h.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Zi.displayName=ny.displayName;const Qi=A.forwardRef(({className:e,...t},n)=>h.jsx(ry,{ref:n,className:zn("text-lg font-semibold leading-none tracking-tight",e),...t}));Qi.displayName=ry.displayName;const t1t=A.forwardRef(({className:e,...t},n)=>h.jsx(sy,{ref:n,className:Ve("text-sm text-muted-foreground",e),...t}));t1t.displayName=sy.displayName;const c0e=({data:e})=>{const[t,n]=A.useState(!1);return h.jsxs(h.Fragment,{children:[h.jsx("button",{onClick:()=>n(!0),className:"h-full w-full flex items-center justify-center",type:"button",children:h.jsx(Cle,{className:"text-accent2"})}),h.jsx(n1t,{data:e,open:t,onOpenChange:n})]})},n1t=({data:e,open:t,onOpenChange:n})=>h.jsx(No,{open:t,onOpenChange:n,children:h.jsx(Zi,{className:"max-w-4xl bg-surface2",children:h.jsxs("div",{className:"h-full w-full",children:[h.jsx(Qi,{className:"pb-4",children:"PDF preview"}),t&&h.jsx("iframe",{src:e,width:"100%",height:"600px"})]})})}),u0e=({src:e})=>{const[t,n]=A.useState(!1);return h.jsxs(h.Fragment,{children:[h.jsx("button",{onClick:()=>n(!0),type:"button",className:"h-full w-full flex items-center justify-center",children:h.jsx("img",{src:e,className:"object-cover aspect-ratio max-h-[140px] max-w-[320px]",alt:"Preview"})}),h.jsx(r1t,{src:e,open:t,onOpenChange:n})]})},r1t=({src:e,open:t,onOpenChange:n})=>h.jsx(No,{open:t,onOpenChange:n,children:h.jsx(Zi,{className:"max-w-4xl bg-surface2",children:h.jsxs("div",{className:"h-full w-full",children:[h.jsx(Qi,{className:"pb-4",children:"Image preview"}),t&&h.jsx("img",{src:e,alt:"Image"})]})})}),d0e=({data:e})=>{const[t,n]=A.useState(!1),r=e.replace(/<attachment[^>]*>/,"").replace(/<\/attachment>/g,"");return h.jsxs(h.Fragment,{children:[h.jsx("button",{onClick:()=>n(!0),className:"h-full w-full flex items-center justify-center",type:"button",children:h.jsx(Cle,{className:"text-icon3"})}),h.jsx(s1t,{data:r,open:t,onOpenChange:n})]})},s1t=({data:e,open:t,onOpenChange:n})=>h.jsx(No,{open:t,onOpenChange:n,children:h.jsx(Zi,{className:"max-w-4xl bg-surface2 h-[80vh] overflow-y-auto",children:h.jsxs("div",{className:"h-full w-full",children:[h.jsx(Qi,{className:"pb-4",children:"Text preview"}),t&&h.jsx("div",{className:"whitespace-pre-wrap",children:e})]})})}),i1t=()=>h.jsx(ZO,{className:"pt-4",children:h.jsx("div",{className:"max-w-[366px] px-5 py-3 text-icon6 text-ui-lg leading-ui-lg rounded-lg bg-surface3",children:h.jsx(o1t,{})})}),o1t=()=>{var n,r,s,i;const e=a0e(),t=G0(o=>o);if(t.type==="image")return h.jsx(sb,{type:"image",contentType:void 0,nameSlot:h.jsx(rw,{}),src:e,data:void 0});if(t.contentType==="application/pdf"){const o=(r=(n=t.content)==null?void 0:n[0])==null?void 0:r.text;return h.jsx(sb,{type:"document",contentType:t.contentType,nameSlot:h.jsx(rw,{}),src:e,data:`data:application/pdf;base64,${o}`})}return h.jsx(sb,{type:t.type,contentType:t.contentType,nameSlot:h.jsx(rw,{}),src:e,data:(i=(s=t.content)==null?void 0:s[0])==null?void 0:i.text})},sb=({type:e,contentType:t,nameSlot:n,src:r,data:s})=>h.jsx(tT,{children:h.jsxs(Ta,{children:[h.jsx(_a,{asChild:!0,children:h.jsx("div",{className:"h-full w-full overflow-hidden rounded-lg",children:e==="image"?h.jsx(u0e,{src:r??""}):e==="document"&&t==="application/pdf"?h.jsx(c0e,{data:s??""}):h.jsx(d0e,{data:s??""})})}),h.jsx(Vo,{side:"top",children:n})]})}),a1t=()=>h.jsx(Zae,{components:{Attachment:i1t}}),h0e=()=>h.jsxs(fT,{className:"w-full flex items-end pb-4 flex-col",children:[h.jsx("div",{className:"max-w-[366px] px-5 py-3 text-icon6 text-ui-lg leading-ui-lg rounded-lg bg-surface3",children:h.jsx(pT,{components:{File:e=>h.jsx(sb,{type:"document",contentType:e.mimeType,nameSlot:"Unknown filename",src:void 0,data:e.image}),Image:e=>h.jsx(sb,{type:"image",nameSlot:"Unknown filename",src:e.image}),Text:e=>e.text.includes("<attachment name=")?h.jsx(sb,{type:"document",contentType:"text/plain",nameSlot:"Unknown filename",src:void 0,data:e.text}):e.text}})}),h.jsx(a1t,{})]}),vB=(e,{enabled:t=!0})=>{const n=A.useRef(t);Se.useEffect(()=>{if(!t||!(e!=null&&e.current))return;const r=e.current,s=new MutationObserver(()=>{n.current&&r.scrollTo({top:r.scrollHeight,behavior:"smooth"})});s.observe(r,{childList:!0,subtree:!0,characterData:!0});const i=o=>{const a=o.target,l=a.scrollTop+a.clientHeight,c=a.scrollHeight;l>=c-1?n.current=!0:n.current=!1};return r.addEventListener("scroll",i),()=>{r.removeEventListener("scroll",i),s.disconnect()}},[t,e])},l1t={"header-md":"text-header-md leading-header-md","ui-lg":"text-ui-lg leading-ui-lg","ui-md":"text-ui-md leading-ui-md","ui-sm":"text-ui-sm leading-ui-sm","ui-xs":"text-ui-xs leading-ui-xs"},c1t={mono:"font-mono"},Ue=({as:e="p",className:t,variant:n="ui-md",font:r,...s})=>h.jsx(e,{className:zn(l1t[n],r&&c1t[r],t),...s}),f0e=({language:e="en-US"}={})=>{const t=A.useRef(null),[n,r]=A.useState({isListening:!1,transcript:"",error:null}),s=()=>{t.current&&t.current.start()},i=()=>{t.current&&t.current.stop()};return A.useEffect(()=>{if(!("webkitSpeechRecognition"in window)&&!("SpeechRecognition"in window)){r(l=>({...l,error:"Speech Recognition not supported in this browser"}));return}const o=window.SpeechRecognition||window.webkitSpeechRecognition,a=new o;t.current=a,a.continuous=!0,a.lang=e,a.onstart=()=>{r(l=>({...l,isListening:!0}))},a.onresult=l=>{let c="";for(let u=l.resultIndex;u<l.results.length;u++){const d=l.results[u][0].transcript;l.results[u].isFinal&&(c+=d+" ")}r(u=>({...u,transcript:c}))},a.onerror=l=>{r(c=>({...c,error:`Error: ${l.error}`}))},a.onend=()=>r(l=>({...l,isListening:!1}))},[e]),{...n,start:s,stop:i}},p0e=()=>{const e=Hu(),[t,n]=A.useState(!1);return A.useEffect(()=>{e.subscribe(()=>{const r=e.getState().attachments;n(r.length>0)})},[e]),t};function Y1({color:e="#fff",className:t}){return h.jsx("svg",{className:Ve("animate-spin duration-700",t),xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:h.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56",stroke:e})})}const u1t=e=>{const[t,n]=A.useState({isLoading:!1,text:""});return A.useEffect(()=>{if(!e)return;(async()=>{n(i=>({...i,isLoading:!0}));const s=await e.text();n(i=>({...i,isLoading:!1,text:s}))})()},[e]),t},m0e=async e=>new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{const s=r.result;typeof s=="string"?t(s):n(new Error("Failed to convert file to base64."))},r.onerror=s=>{n(s)},r.readAsDataURL(e)}),d1t=({document:e})=>{const{isLoading:t,text:n}=u1t(e.file);return h.jsx("div",{className:"flex items-center justify-center h-full w-full",children:t?h.jsx(Y1,{className:"animate-spin"}):h.jsx(d0e,{data:n})})},h1t=({document:e})=>{const[t,n]=A.useState({isLoading:!1,text:""});return A.useEffect(()=>{let r=!1;return(async()=>{if(!e.file)return;n(o=>({...o,isLoading:!0}));const i=await m0e(e.file);r||n(o=>({...o,isLoading:!1,text:i}))})(),()=>{r=!0}},[e]),h.jsx("div",{className:"flex items-center justify-center h-full w-full",children:t.isLoading?h.jsx(Y1,{className:"animate-spin"}):h.jsx(c0e,{data:t.text})})},f1t=()=>{const e=G0(s=>s.type==="image"),t=G0(s=>s.type==="document"?s:void 0),n=a0e(),r=G0(s=>s.source!=="message");return h.jsx(h.Fragment,{children:h.jsxs("div",{className:"relative",children:[h.jsx(tT,{children:h.jsxs(Ta,{children:[h.jsx(ZO,{children:h.jsx(_a,{asChild:!0,children:h.jsx("div",{className:"overflow-hidden size-16 rounded-lg bg-surface3 border-sm border-border1 ",children:e?h.jsx(u0e,{src:n??""}):(t==null?void 0:t.contentType)==="application/pdf"?h.jsx(h1t,{document:t}):t?h.jsx(d1t,{document:t}):null})})}),h.jsx(Vo,{side:"top",children:h.jsx(rw,{})})]})}),r&&h.jsx(p1t,{})]})})},p1t=()=>h.jsx(gLe,{asChild:!0,children:h.jsx(Na,{tooltip:"Remove file",className:"absolute -right-3 -top-3 text-icon3 hover:text-icon6 rounded-full bg-surface1 hover:bg-surface2 rounded-full p-1",side:"top",children:h.jsx(ot,{children:h.jsx(wle,{})})})}),g0e=()=>p0e()?h.jsx("div",{className:"flex w-full flex-row items-center gap-4 pb-2",children:h.jsx(nle,{components:{Attachment:f1t}})}):null,y0e=({ToolFallback:e,agentName:t,hasMemory:n})=>{const r=A.useRef(null);vB(r,{enabled:!0});const s=i=>h.jsx(Zbt,{...i,ToolFallback:e});return h.jsxs(m1t,{children:[h.jsxs(sR,{ref:r,autoScroll:!1,className:"overflow-y-scroll scroll-smooth h-full",children:[h.jsx(g1t,{agentName:t}),h.jsx("div",{className:"max-w-[568px] w-full mx-auto px-4 pb-7",children:h.jsx(ile,{components:{UserMessage:h0e,EditComposer:v1t,AssistantMessage:s}})}),h.jsx(Cg,{empty:!1,children:h.jsx("div",{})})]}),h.jsx(y1t,{hasMemory:n})]})},m1t=({children:e})=>h.jsx(nR,{className:"grid grid-rows-[1fr_auto] h-full overflow-y-auto",children:e}),g1t=({agentName:e})=>{const t=e??"",n=t.split(" ")??[];let r="A";return n.length===2?r=`${n[0][0]}${n[1][0]}`:t.length>0?r=`${t[0]}`:r="A",h.jsx(rR,{children:h.jsxs("div",{className:"flex w-full flex-grow flex-col items-center justify-center",children:[h.jsx(bB,{children:h.jsx(xB,{children:r})}),h.jsx("p",{className:"mt-4 font-medium",children:"How can I help you today?"})]})})},y1t=({hasMemory:e})=>h.jsxs("div",{className:"mx-4",children:[h.jsxs(iC,{children:[h.jsx("div",{className:"max-w-[568px] w-full mx-auto pb-2",children:h.jsx(g0e,{})}),h.jsxs("div",{className:"bg-surface3 rounded-lg border-sm border-border1 py-4 mt-auto max-w-[568px] w-full mx-auto px-4",children:[h.jsx(oC,{asChild:!0,className:"w-full",children:h.jsx("textarea",{className:"text-ui-lg leading-ui-lg placeholder:text-icon3 text-icon6 bg-transparent focus:outline-none resize-none",autoFocus:!0,placeholder:"Enter your message...",name:"",id:""})}),h.jsxs("div",{className:"flex justify-end gap-2",children:[h.jsx(b1t,{}),h.jsx(x1t,{})]})]})]}),!e&&h.jsxs(Ue,{variant:"ui-sm",className:"text-icon3 flex gap-2 pt-1 max-w-[568px] w-full mx-auto border-t items-start",children:[h.jsx(ot,{className:"transform translate-y-[0.1rem]",children:h.jsx(r0e,{})}),"Memory is not enabled. The conversation will not be persisted."]})]}),b1t=()=>{const e=Hu(),{start:t,stop:n,isListening:r,transcript:s}=f0e();return A.useEffect(()=>{s&&e.setText(s)},[e,s]),h.jsx(Na,{type:"button",tooltip:r?"Stop dictation":"Start dictation",variant:"ghost",className:"rounded-full",onClick:()=>r?n():t(),children:r?h.jsx(b0e,{}):h.jsx(Ele,{className:"h-6 w-6 text-[#898989] hover:text-[#fff]"})})},x1t=()=>h.jsxs(h.Fragment,{children:[h.jsx(tle,{asChild:!0,children:h.jsx(Na,{tooltip:"Add attachment",variant:"ghost",className:"rounded-full",children:h.jsx(cC,{className:"h-6 w-6 text-[#898989] hover:text-[#fff]"})})}),h.jsx(Cg,{running:!1,children:h.jsx(mT,{asChild:!0,children:h.jsx(Na,{tooltip:"Send",variant:"default",className:"rounded-full border-sm border-[#363636] bg-[#292929]",children:h.jsx(ble,{className:"h-6 w-6 text-[#898989] hover:text-[#fff]"})})})}),h.jsx(Cg,{running:!0,children:h.jsx(gT,{asChild:!0,children:h.jsx(Na,{tooltip:"Cancel",variant:"default",children:h.jsx(b0e,{})})})})]}),v1t=()=>h.jsxs(iC,{children:[h.jsx(oC,{}),h.jsxs("div",{children:[h.jsx(gT,{asChild:!0,children:h.jsx(Js,{variant:"ghost",children:"Cancel"})}),h.jsx(mT,{asChild:!0,children:h.jsx(Js,{children:"Send"})})]})]}),b0e=()=>h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",children:h.jsx("rect",{width:"10",height:"10",x:"3",y:"3",rx:"2"})});function eQ(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function w1t(e,t,n){const r=Ku(),[s,i]=A.useState(!1),[o,a]=A.useState(null),[l,c]=A.useState("thread"),[u,d]=A.useState("markdown"),[p,g]=A.useState(!0),[b,x]=A.useState(!1),S=A.useCallback(async()=>{g(!0);try{if(!e||!t){a(null),g(!1);return}const k=await r.getWorkingMemory({agentId:e,threadId:t,resourceId:n}),{workingMemory:T,source:P,workingMemoryTemplate:M,threadExists:j}=k;if(i(j),a(T),c(P),d((M==null?void 0:M.format)||"markdown"),(M==null?void 0:M.format)==="json"){let F="";T?F=eQ(T):M!=null&&M.content?F=eQ(M.content):F="",a(F)}else a(T||(M==null?void 0:M.content)||"")}catch(k){a(null),console.error("Error fetching working memory",k)}finally{g(!1)}},[e,t,n]);return A.useEffect(()=>{S()},[S]),{threadExists:s,workingMemoryData:o,workingMemorySource:l,workingMemoryFormat:u,isLoading:p,isUpdating:b,refetch:S,updateWorkingMemory:async k=>{x(!0);try{if(u==="json")try{JSON.parse(k)}catch{throw new Error("Invalid JSON working memory")}await r.updateWorkingMemory({agentId:e,threadId:t,workingMemory:k,resourceId:n}),S()}catch(T){throw console.error("Error updating working memory",T),T}finally{x(!1)}}}}const x0e=A.createContext({threadExists:!1,workingMemoryData:null,workingMemorySource:"thread",isLoading:!1,isUpdating:!1,updateWorkingMemory:()=>Promise.resolve(),refetch:()=>Promise.resolve()});function S1t({agentId:e,threadId:t,resourceId:n,children:r}){const s=w1t(e,t,n);return h.jsx(x0e.Provider,{value:s,children:r})}function v0e(){const e=A.useContext(x0e);if(!e)throw new Error("useWorkingMemory must be used within a WorkingMemoryProvider");return e}class C1t{constructor(){Le(this,"accept","application/pdf")}async add({file:t}){if(t.size>20971520)throw new Error("PDF size exceeds 20MB limit");return{id:crypto.randomUUID(),type:"document",name:t.name,file:t,status:{type:"running",reason:"uploading",progress:0},contentType:"application/pdf"}}async send(t){const n=await this.fileToBase64(t.file);return{id:t.id,type:"document",name:t.name,content:[{type:"text",text:n}],status:{type:"complete"},contentType:"application/pdf"}}async remove(t){}async fileToBase64(t){const n=await t.arrayBuffer(),r=new Uint8Array(n);let s="";return r.forEach(i=>{s+=String.fromCharCode(i)}),btoa(s)}async extractTextFromPDF(t){return"Extracted PDF text content"}}const k1t=e=>e,tQ=e=>{switch(e){case"tool-calls":throw new Error("Stream finished with reason tool-calls, try increasing maxSteps")}},E1t=async e=>{const t=e.filter(n=>n.type==="image"||n.type==="document").map(async n=>{var r,s,i;return n.type==="document"?n.contentType==="application/pdf"?{role:"user",content:[{type:"file",data:`data:application/pdf;base64,${((s=(r=n.content)==null?void 0:r[0])==null?void 0:s.text)||""}`,mimeType:n.contentType,filename:n.name}]}:{role:"user",content:((i=n.content[0])==null?void 0:i.text)||""}:{role:"user",content:[{type:"image",image:await m0e(n.file),mimeType:n.file.type}]}});return Promise.all(t)};function D1t({children:e,agentId:t,initialMessages:n,memory:r,threadId:s,refreshThreadList:i,settings:o,runtimeContext:a}){const[l,c]=A.useState(!1),[u,d]=A.useState([]),[p,g]=A.useState(s),{refetch:b}=v0e(),{frequencyPenalty:x,presencePenalty:S,maxRetries:E,maxSteps:k,maxTokens:T,temperature:P,topK:M,topP:j,instructions:F,chatWithGenerate:I,providerOptions:B}=(o==null?void 0:o.modelSettings)??{},L=A.useRef({}),W=new oh;Object.entries(a??{}).forEach(([G,q])=>{W.set(G,q)}),A.useEffect(()=>{const G=n&&(n==null?void 0:n.length)>(u==null?void 0:u.length);if((u.length===0||p!==s||G&&p===s)&&n&&s&&r){const q=n==null?void 0:n.map(z=>{var ne,H,ee,ie;const Y=(z.toolInvocations||[]).map(se=>({type:"tool-call",toolCallId:se==null?void 0:se.toolCallId,toolName:se==null?void 0:se.toolName,args:se==null?void 0:se.args,result:se==null?void 0:se.result})),U=(z.experimental_attachments||[]).map(se=>({type:se.contentType.startsWith("image/")?"image":se.contentType.startsWith("audio/")?"audio":"file",mimeType:se.contentType,image:se.url})),X=(ie=(ee=(H=(ne=z==null?void 0:z.parts)==null?void 0:ne.find(({type:se})=>se==="reasoning"))==null?void 0:H.details)==null?void 0:ee.map(se=>se==null?void 0:se.text))==null?void 0:ie.join(" ");return{...z,content:[...X?[{type:"reasoning",text:X}]:[],...typeof z.content=="string"?[{type:"text",text:z.content}]:[],...Y,...U]}}).filter(Boolean);d(q),g(s)}},[n,s,r]);const J=Ku().getAgent(t),Z=GO({isRunning:l,messages:u,convertMessage:k1t,onNew:async G=>{var Y;if(((Y=G.content[0])==null?void 0:Y.type)!=="text")throw new Error("Only text messages are supported");const q=await E1t(G.attachments),z=G.content[0].text;d(U=>[...U,{role:"user",content:z,attachments:G.attachments}]),c(!0);try{if(I){const U=await J.generate({messages:[{role:"user",content:z},...q],runId:t,frequencyPenalty:x,presencePenalty:S,maxRetries:E,maxSteps:k,maxTokens:T,temperature:P,topK:M,topP:j,instructions:F,runtimeContext:W,...r?{threadId:s,resourceId:t}:{},providerOptions:B});if(U.response){const X=U.response.messages.reduce((ne,H)=>{const ee=Array.isArray(ne.content)?ne.content:[];if(typeof H.content=="string")return{...ne,content:[...ee,...U.reasoning?[{type:"reasoning",text:U.reasoning}]:[],{type:"text",text:H.content}]};if(H.role==="assistant"){const ie=Array.isArray(H.content)?H.content.find(le=>le.type==="tool-call"):void 0,se=Array.isArray(H.content)?H.content.find(le=>le.type==="reasoning"):void 0;if(ie){const le=ee.map(ye=>ye.type==="tool-call"&&ye.toolCallId===(ie==null?void 0:ie.toolCallId)?{...ye,...ie}:ye),pe=le.some(ye=>ye.type==="tool-call");return{...ne,content:pe?[...se?[se]:[],...le]:[...ee,...se?[se]:[],ie]}}const ae=Array.isArray(H.content)?H.content.find(le=>le.type==="text"&&le.text):void 0;if(ae)return{...ne,content:[...ee,...se?[se]:[],ae]}}if(H.role==="tool"){const ie=Array.isArray(H.content)?H.content.find(se=>se.type==="tool-result"):void 0;if(ie){const se=ee.map(le=>le.type==="tool-call"&&le.toolCallId===(ie==null?void 0:ie.toolCallId)?{...le,result:ie.result}:le),ae=se.some(le=>le.type==="tool-call");return{...ne,content:ae?se:[...ee,{type:"tool-result",toolCallId:ie.toolCallId,result:ie.result}]}}return{...ne,content:[...ee,ie]}}return ne},{role:"assistant",content:[]});d(ne=>[...ne,X]),tQ(U.finishReason)}}else{let U=function(){d(se=>{const ae={role:"assistant",content:[{type:"text",text:ne}]};return H?ee?(ee=!1,[...se,ae]):[...se.slice(0,-1),ae]:(H=!0,ee&&(ee=!1),[...se,ae])})};const X=await J.stream({messages:[{role:"user",content:z},...q],runId:t,frequencyPenalty:x,presencePenalty:S,maxRetries:E,maxSteps:k,maxTokens:T,temperature:P,topK:M,topP:j,instructions:F,runtimeContext:W,...r?{threadId:s,resourceId:t}:{},providerOptions:B});if(!X.body)throw new Error("No response body");let ne="",H=!1,ee=!1,ie=!1;await X.processDataStream({onTextPart(se){ie?(ie=!1,ne=se):ne+=se,U()},async onToolCallPart(se){d(ae=>{const le=ae[ae.length-1];if(le&&le.role==="assistant"){const ye={...le,content:Array.isArray(le.content)?[...le.content,{type:"tool-call",toolCallId:se.toolCallId,toolName:se.toolName,args:se.args}]:[...typeof le.content=="string"?[{type:"text",text:le.content}]:[],{type:"tool-call",toolCallId:se.toolCallId,toolName:se.toolName,args:se.args}]};return ee=!0,ie=!0,[...ae.slice(0,-1),ye]}const pe={role:"assistant",content:[{type:"text",text:ne},{type:"tool-call",toolCallId:se.toolCallId,toolName:se.toolName,args:se.args}]};return ee=!0,ie=!0,[...ae,pe]}),L.current[se.toolCallId]=se.toolName},async onToolResultPart(se){var ae;d(le=>{const pe=le[le.length-1];if(pe&&pe.role==="assistant"&&Array.isArray(pe.content)){const ye=pe.content.map(Ee=>typeof Ee=="object"&&Ee.type==="tool-call"&&Ee.toolCallId===se.toolCallId?{...Ee,result:se.result}:Ee),Te={...pe,content:ye};return[...le.slice(0,-1),Te]}return le});try{L.current[se.toolCallId]==="updateWorkingMemory"&&((ae=se.result)!=null&&ae.success)&&await(b==null?void 0:b())}finally{delete L.current[se.toolCallId]}},onErrorPart(se){throw new Error(se)},onFinishMessagePart({finishReason:se}){tQ(se)},onReasoningPart(se){d(ae=>{const le=ae[ae.length-1];if(le&&le.role==="assistant"&&Array.isArray(le.content)){const ye=le.content.map(Ee=>typeof Ee=="object"&&Ee.type==="reasoning"?{...Ee,text:Ee.text+se}:Ee),Te={...le,content:ye};return[...ae.slice(0,-1),Te]}const pe={role:"assistant",content:[{type:"reasoning",text:se},{type:"text",text:ne}]};return[...ae,pe]})}})}c(!1),setTimeout(()=>{i==null||i()},500)}catch(U){console.error("Error occurred in MastraRuntimeProvider",U),c(!1),d(X=>[...X,{role:"assistant",content:[{type:"text",text:`${U}`}]}])}},adapters:{attachments:new CRe([new xRe,new wRe,new C1t])}});return h.jsxs($O,{runtime:Z,children:[" ",e," "]})}const nQ={modelSettings:{maxRetries:2,maxSteps:5,temperature:.5,topP:1,chatWithGenerate:!1}};function A1t({agentId:e}){const[t,n]=A.useState(void 0),r=`mastra-agent-store-${e}`;return A.useEffect(()=>{try{const o=localStorage.getItem(r);if(o){const a=JSON.parse(o);n(a??void 0)}}catch(o){console.error(o)}},[r]),{settings:t,setSettings:o=>{n(a=>({...a,...o})),localStorage.setItem(r,JSON.stringify({...o,agentId:e}))},resetAll:()=>{n(nQ),localStorage.setItem(r,JSON.stringify(nQ))}}}const w0e=A.createContext({});function T1t({children:e,agentId:t}){const{settings:n,setSettings:r,resetAll:s}=A1t({agentId:t});return h.jsx(w0e.Provider,{value:{settings:n,setSettings:r,resetAll:s},children:e})}const wB=()=>A.useContext(w0e),dy=ja()(Snt(e=>({runtimeContext:{},setRuntimeContext:t=>e({runtimeContext:t})}),{name:"mastra-playground-store"})),_1t=({agentId:e,agentName:t,threadId:n,initialMessages:r,memory:s,refreshThreadList:i})=>{const{settings:o}=wB(),{runtimeContext:a}=dy();return h.jsx(D1t,{agentId:e,agentName:t,threadId:n,initialMessages:r,memory:s,refreshThreadList:i,settings:o,runtimeContext:a,children:h.jsx(y0e,{agentName:t??"",hasMemory:s})})},N1t=V1("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function gD({className:e,variant:t,...n}){return h.jsx("div",{className:Ve(N1t({variant:t}),e),...n})}function mE({content:e,label:t,multiline:n=!1}){const r=()=>{navigator.clipboard.writeText(e)};return h.jsxs("div",{className:"group relative flex items-start gap-2",children:[h.jsx("span",{className:Ve("text-sm text-mastra-el-4",n?"whitespace-pre-wrap":"truncate"),children:e}),h.jsx(Js,{variant:"ghost",size:"sm",className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0 -mt-1",onClick:s=>{s.stopPropagation(),r()},"aria-label":`Copy ${t}`,children:h.jsx(Dh,{className:"h-3 w-3"})})]})}function P1t({date:e}){const t={relativeTime:jrt(new Date(e),{addSuffix:!0}),fullDate:lo(new Date(e),"PPpp")};return h.jsx(FC,{children:h.jsxs(Ta,{children:[h.jsx(_a,{className:"text-left text-sm text-mastra-el-4",children:t.relativeTime}),h.jsx(Vo,{className:"bg-mastra-bg-1 text-mastra-el-1",children:h.jsx("p",{className:"text-sm",children:t.fullDate})})]})})}const M1t=V1("flex w-full text-icon6 rounded-lg border bg-transparent shadow-sm focus-visible:ring-ring transition-colors focus-visible:outline-none focus-visible:ring-1 disabled:cursor-not-allowed disabled:opacity-50",{variants:{variant:{default:"border-sm border-border1 placeholder:text-icon3",filled:"border-sm bg-inputFill border-border1 placeholder:text-icon3",unstyled:"border-0 bg-transparent placeholder:text-icon3 focus-visible:ring-transparent focus-visible:outline-none"},customSize:{default:"px-[13px] text-[calc(13_/_16_*_1rem)] h-8",sm:"h-[30px] px-[13px] text-xs",lg:"h-10 px-[17px] text-[calc(13_/_16_*_1rem)]"}},defaultVariants:{variant:"default",customSize:"default"}}),ga=A.forwardRef(({className:e,customSize:t,testId:n,variant:r,type:s,...i},o)=>h.jsx("input",{type:s,className:zn(e,M1t({variant:r,customSize:t,className:e})),"data-testid":n,ref:o,...i}));ga.displayName="Input";function rQ({score:e}){return h.jsx(gD,{variant:"secondary",children:e.toFixed(2)})}const Wj=A.forwardRef(({className:e,...t},n)=>h.jsx("table",{ref:n,className:Ve("w-full caption-bottom text-sm border-spacing-0",e),...t}));Wj.displayName="Table";const qj=A.forwardRef(({className:e,...t},n)=>h.jsx("thead",{ref:n,className:Ve("[&_tr]:border-b-[0.5px]",e),...t}));qj.displayName="TableHeader";const Gj=A.forwardRef(({className:e,...t},n)=>h.jsx("tbody",{ref:n,className:Ve("[&_tr:last-child]:border-0",e),...t}));Gj.displayName="TableBody";const j1t=A.forwardRef(({className:e,...t},n)=>h.jsx("tfoot",{ref:n,className:Ve("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));j1t.displayName="TableFooter";const jm=A.forwardRef(({className:e,...t},n)=>h.jsx("tr",{ref:n,className:Ve("border-b-[0.5px] border-mastra-border-1 transition-colors hover:bg-muted/50 data-[state=selected]:bg-mastra-bg-4/70",e),...t}));jm.displayName="TableRow";const fa=A.forwardRef(({className:e,...t},n)=>h.jsx("th",{ref:n,className:Ve("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));fa.displayName="TableHead";const Si=A.forwardRef(({className:e,...t},n)=>h.jsx("td",{ref:n,className:Ve("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));Si.displayName="TableCell";const F1t=A.forwardRef(({className:e,...t},n)=>h.jsx("caption",{ref:n,className:Ve("mt-4 text-sm text-muted-foreground",e),...t}));F1t.displayName="TableCaption";const I1t=dfe,S0e=A.forwardRef(({className:e,...t},n)=>h.jsx(BT,{ref:n,className:Ve(e),...t}));S0e.displayName=BT.displayName;const Yj=A.forwardRef(({className:e,...t},n)=>h.jsx($T,{ref:n,className:Ve(e),...t}));Yj.displayName=$T.displayName;const Kj=A.forwardRef(({className:e,...t},n)=>h.jsx(zT,{ref:n,className:Ve("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Kj.displayName=zT.displayName;const gE=Ve("relative overflow-y-auto overflow-x-hidden invisible hover:visible focus:visible","[&::-webkit-scrollbar]:w-1","[&::-webkit-scrollbar-track]:bg-transparent","[&::-webkit-scrollbar-thumb]:rounded-full","[&::-webkit-scrollbar-thumb]:bg-mastra-border/20","[&>*]:visible"),sQ=Ve("px-4 py-2 text-sm transition-all border-b-2 border-transparent","data-[state=active]:border-white data-[state=active]:text-white font-medium","data-[state=inactive]:text-mastra-el-4 hover:data-[state=inactive]:text-mastra-el-2","focus-visible:outline-none"),iQ=Ve("data-[state=inactive]:mt-0 min-h-0 h-full grid grid-rows-[1fr]");function O1t({liveEvals:e,ciEvals:t,onRefetchLiveEvals:n,onRefetchCiEvals:r}){const[s,i]=A.useState("live");function o(){return s==="live"?n():r()}return h.jsxs(I1t,{value:s,onValueChange:a=>i(a),className:"grid grid-rows-[auto_1fr] h-full min-h-0 pb-2",children:[h.jsx("div",{className:"border-b border-mastra-border/10",children:h.jsxs(S0e,{className:"bg-transparent border-0 h-auto mx-4",children:[h.jsx(Yj,{value:"live",className:sQ,children:"Live"}),h.jsx(Yj,{value:"ci",className:sQ,children:"CI"})]})}),h.jsx(Kj,{value:"live",className:iQ,children:h.jsx(oQ,{evals:e,isCIMode:!1,onRefresh:o})}),h.jsx(Kj,{value:"ci",className:iQ,children:h.jsx(oQ,{evals:t,isCIMode:!0,onRefresh:o})})]})}function oQ({evals:e,isCIMode:t=!1,onRefresh:n}){const[r,s]=A.useState(new Set),[i,o]=A.useState(""),[a,l]=A.useState({field:"metricName",direction:"asc"});return h.jsxs("div",{className:"min-h-0 grid grid-rows-[auto_1fr]",children:[h.jsxs("div",{className:"flex items-center gap-4 p-4 rounded-lg",children:[h.jsxs("div",{className:"relative flex-1",children:[h.jsx(BP,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-mastra-el-3"}),h.jsx(ga,{id:"search-input",placeholder:"Search metrics, inputs, or outputs...",value:i,onChange:b=>o(b.target.value),className:"pl-10"})]}),h.jsxs(gD,{variant:"secondary",className:"text-xs",children:[e.length," Total Evaluations"]}),h.jsx(Js,{variant:"ghost",size:"icon",onClick:n,className:"h-9 w-9",children:h.jsx(y$e,{className:"h-4 w-4"})})]}),h.jsx("div",{className:"overflow-auto",children:h.jsxs(Wj,{className:"w-full",children:[h.jsx(qj,{className:"bg-mastra-bg-2 h-[var(--table-header-height)] sticky top-0 z-10",children:h.jsxs(jm,{className:"border-gray-6 border-b-[0.1px] text-[0.8125rem]",children:[h.jsx(fa,{className:"w-12 h-12"}),h.jsx(fa,{className:"min-w-[200px] max-w-[30%] text-mastra-el-3 cursor-pointer",onClick:()=>d("metricName"),children:h.jsxs("div",{className:"flex items-center",children:["Metric ",p("metricName")]})}),h.jsx(fa,{className:"flex-1 text-mastra-el-3"}),h.jsx(fa,{className:"w-48 text-mastra-el-3 cursor-pointer",onClick:()=>d("averageScore"),children:h.jsxs("div",{className:"flex items-center",children:["Average Score ",p("averageScore")]})}),h.jsx(fa,{className:"w-48 text-mastra-el-3",children:"Evaluations"})]})}),h.jsx(Gj,{className:"border-b border-gray-6 relative",children:h.jsx(cst,{mode:"wait",presenceAffectsLayout:!1,children:g(e).length===0?h.jsxs(jm,{children:[h.jsx(Si,{className:"h-12 w-16"}),h.jsx(Si,{colSpan:4,className:"h-32 px-4 text-center text-mastra-el-3",children:h.jsxs("div",{className:"flex flex-col items-center gap-2",children:[h.jsx(BP,{className:"size-5"}),h.jsx("p",{children:"No evaluations found"}),i&&h.jsx("p",{className:"text-sm",children:"Try adjusting your search terms"})]})})]}):g(e).map(b=>h.jsxs(Se.Fragment,{children:[h.jsxs(jm,{className:"border-b-gray-6 border-b-[0.1px] text-[0.8125rem] cursor-pointer hover:bg-mastra-bg-3",onClick:()=>u(b.metricName),children:[h.jsx(Si,{className:"w-12",children:h.jsx("div",{className:"h-8 w-full flex items-center justify-center",children:h.jsx("div",{className:Ve("transform transition-transform duration-200",r.has(b.metricName)?"rotate-90":""),children:h.jsx(VBe,{className:"h-4 w-4 text-mastra-el-5"})})})}),h.jsx(Si,{className:"min-w-[200px] max-w-[30%] font-medium text-mastra-el-5",children:b.metricName}),h.jsx(Si,{className:"flex-1 text-mastra-el-5"}),h.jsx(Si,{className:"w-48 text-mastra-el-5",children:h.jsx(rQ,{score:b.averageScore})}),h.jsx(Si,{className:"w-48 text-mastra-el-5",children:h.jsx(gD,{variant:"secondary",children:b.evals.length})})]}),r.has(b.metricName)&&h.jsx(jm,{children:h.jsx(Si,{colSpan:5+(c(b.evals)?1:0)+(t?1:0),className:"p-0",children:h.jsx("div",{className:"bg-mastra-bg-3 rounded-lg m-2",children:h.jsx("div",{className:"w-full",children:h.jsxs(Wj,{className:"w-full",children:[h.jsx(qj,{children:h.jsxs(jm,{className:"text-[0.7rem] text-mastra-el-3 hover:bg-transparent",children:[h.jsx(fa,{className:"pl-12 w-[120px]",children:"Timestamp"}),h.jsx(fa,{className:"w-[300px]",children:"Instructions"}),h.jsx(fa,{className:"w-[300px]",children:"Input"}),h.jsx(fa,{className:"w-[300px]",children:"Output"}),h.jsx(fa,{className:"w-[80px]",children:"Score"}),c(b.evals)&&h.jsx(fa,{className:"w-[250px]",children:"Reason"}),t&&h.jsx(fa,{className:"w-[120px]",children:"Test Name"})]})}),h.jsx(Gj,{children:b.evals.map((x,S)=>{var E,k;return h.jsxs(jm,{className:"text-[0.8125rem] hover:bg-mastra-bg-2/50",children:[h.jsx(Si,{className:"pl-12 text-mastra-el-4 align-top py-4",children:h.jsx(P1t,{date:x.createdAt})}),h.jsx(Si,{className:"text-mastra-el-4 align-top py-4",children:h.jsx("div",{className:Ve("max-w-[300px] max-h-[200px]",gE),children:h.jsx(mE,{content:x.instructions,label:"instructions",multiline:!0})})}),h.jsx(Si,{className:"text-mastra-el-4 align-top py-4",children:h.jsx("div",{className:Ve("max-w-[300px] max-h-[200px]",gE),children:h.jsx(mE,{content:x.input,label:"input",multiline:!0})})}),h.jsx(Si,{className:"text-mastra-el-4 align-top py-4",children:h.jsx("div",{className:Ve("max-w-[300px] max-h-[200px]",gE),children:h.jsx(mE,{content:x.output,label:"output",multiline:!0})})}),h.jsx(Si,{className:"text-mastra-el-4 align-top py-4",children:h.jsx(rQ,{score:x.result.score})}),c(b.evals)&&h.jsx(Si,{className:"text-mastra-el-4 align-top py-4",children:h.jsx("div",{className:Ve("max-w-[300px] max-h-[200px]",gE),children:h.jsx(mE,{content:((E=x.result.info)==null?void 0:E.reason)||"",label:"reason",multiline:!0})})}),t&&h.jsx(Si,{className:"text-mastra-el-4 align-top py-4",children:((k=x.testInfo)==null?void 0:k.testName)&&h.jsx(gD,{variant:"secondary",className:"text-xs",children:x.testInfo.testName})})]},`${b.metricName}-${S}`)})})]})})})})})]},b.metricName))})})]})})]});function c(b){return b.some(x=>{var S;return(S=x.result.info)==null?void 0:S.reason})}function u(b){const x=new Set(r);x.has(b)?x.delete(b):x.add(b),s(x)}function d(b){l(x=>({field:b,direction:x.field===b&&x.direction==="asc"?"desc":"asc"}))}function p(b){return a.field!==b?null:a.direction==="asc"?h.jsx(MBe,{className:"h-4 w-4 ml-1"}):h.jsx(NBe,{className:"h-4 w-4 ml-1"})}function g(b){let x=b.reduce((S,E)=>{const k=S.find(T=>T.metricName===E.metricName);return k?(k.evals.push(E),k.averageScore=k.evals.reduce((T,P)=>T+P.result.score,0)/k.evals.length):S.push({metricName:E.metricName,averageScore:E.result.score,evals:[E]}),S},[]);return i&&(x=x.filter(S=>S.metricName.toLowerCase().includes(i.toLowerCase())||S.evals.some(E=>{var k,T,P;return((k=E.input)==null?void 0:k.toLowerCase().includes(i.toLowerCase()))||((T=E.output)==null?void 0:T.toLowerCase().includes(i.toLowerCase()))||((P=E.instructions)==null?void 0:P.toLowerCase().includes(i.toLowerCase()))}))),x.sort((S,E)=>{const k=a.direction==="asc"?1:-1;switch(a.field){case"metricName":return k*S.metricName.localeCompare(E.metricName);case"averageScore":return k*(S.averageScore-E.averageScore);default:return 0}}),x}}const Ph=A.createContext({});function C0e({children:e,initialTraces:t=[]}){const[n,r]=A.useState(!1),[s,i]=A.useState(null),[o,a]=A.useState(0),[l,c]=A.useState(null),u=()=>{if(o<t.length-1){const g=o+1;a(g);const b=t[g].trace;i(b);const x=b.find(S=>S.parentSpanId===null)||b[0];c(x)}},d=()=>{if(o>0){const g=o-1;a(g);const b=t[g].trace;i(b);const x=b.find(S=>S.parentSpanId===null)||b[0];c(x)}},p=()=>{r(!1),i(null),c(null)};return h.jsx(Ph.Provider,{value:{isOpen:n,setIsOpen:r,trace:s,setTrace:i,traces:t,currentTraceIndex:o,setCurrentTraceIndex:a,nextTrace:u,prevTrace:d,span:l,setSpan:c,clearData:p},children:e})}const R1t={default:"[&>tbody>tr]:h-table-row",small:"[&>tbody>tr]:h-table-row-small"},hy=({className:e,children:t,size:n="default"})=>h.jsx("table",{className:zn("w-full",R1t[n],e),children:t}),fy=({className:e,children:t})=>h.jsx("thead",{children:h.jsx("tr",{className:zn("h-table-header border-b-sm border-border1",e),children:t})}),Xs=({className:e,children:t,...n})=>h.jsx("th",{className:zn("text-icon3 text-ui-sm h-full text-left font-normal uppercase first:pl-5 last:pr-5 whitespace-nowrap",e),...n,children:t}),Mh=({className:e,children:t})=>h.jsx("tbody",{className:zn("",e),children:t}),jh=({className:e,children:t,selected:n=!1,onClick:r})=>h.jsx("tr",{className:zn("border-b-sm border-border1 hover:bg-surface3",n&&"bg-surface4",r&&"cursor-pointer",e),onClick:r,children:t}),L1t=e=>{const t=new Intl.DateTimeFormat("en-US",{month:"short"}).format(e).toUpperCase(),n=e.getDate(),r=`${t} ${n}`,s=new Intl.DateTimeFormat("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).format(e);return{day:r,time:s}},Dr=({className:e,children:t,...n})=>h.jsx("td",{className:zn("text-icon5 first:pl-5 last:pr-5",e),...n,children:h.jsx("div",{className:zn("flex h-full w-full shrink-0 items-center"),children:t})}),B1t=({className:e,children:t})=>h.jsx(Dr,{className:e,children:h.jsx(Ue,{as:"span",variant:"ui-md",className:"w-full truncate",children:t})}),$1t=({className:e,children:t,unit:n})=>h.jsx(Dr,{className:e,children:h.jsxs("div",{className:"flex min-w-0 items-center",children:[h.jsx(Ue,{as:"span",variant:"ui-md",className:"shrink-0",children:t}),h.jsx(Ue,{as:"span",variant:"ui-sm",className:"text-icon3 w-full truncate",children:n})]})}),z1t=({dateTime:e,...t})=>{const{day:n,time:r}=L1t(e);return h.jsx(Dr,{...t,children:h.jsxs("div",{className:"shrink-0",children:[h.jsx(Ue,{as:"span",variant:"ui-sm",className:"text-icon3",children:n})," ",h.jsx(Ue,{as:"span",variant:"ui-md",children:r})]})})},SB=({name:e,description:t,icon:n,meta:r,...s})=>h.jsx(Dr,{...s,children:h.jsxs("div",{className:"flex items-center gap-[14px]",children:[h.jsx(ot,{size:"lg",className:"text-icon5",children:n}),h.jsxs("div",{className:"flex flex-col gap-0",children:[h.jsx(Ue,{as:"span",variant:"ui-md",className:"text-icon6 font-medium !leading-tight",children:e}),t&&h.jsx(Ue,{as:"span",variant:"ui-xs",className:"text-icon3 w-full max-w-[300px] truncate !leading-tight",children:t})]}),r]})}),H1t=()=>{const{setTrace:e,isOpen:t,setIsOpen:n,trace:r,setSpan:s,setCurrentTraceIndex:i}=A.useContext(Ph);return{openTrace:(a,l)=>{var u;e(a);const c=a.find(d=>d.parentSpanId===null)||a[0];s(c),i(l),!(t&&((u=r==null?void 0:r[0])==null?void 0:u.id)!==a[0].id)&&n(d=>!d)}}},ES=(e,t)=>Number(e.toPrecision(t)),V1t=({colsCount:e})=>h.jsx(Mh,{children:h.jsx(jh,{children:h.jsx(Dr,{colSpan:e,className:"text-center py-4",children:h.jsx(Ue,{children:"No traces found"})})})}),U1t=({error:e,colsCount:t})=>h.jsx(Mh,{children:h.jsx(jh,{children:h.jsx(Dr,{colSpan:t,className:"text-center py-4",children:h.jsx(Ue,{children:e.message})})})}),W1t=({trace:e,index:t,isActive:n})=>{const{openTrace:r}=H1t(),s=e.trace.some(i=>i.status.code!==0);return h.jsxs(jh,{className:n?"bg-surface4":"",onClick:()=>r(e.trace,t),children:[h.jsx(z1t,{dateTime:new Date(e.started/1e3)}),h.jsxs(B1t,{title:e.traceId,children:[e.traceId.substring(0,7),"..."]}),h.jsx($1t,{unit:"ms",children:ES(e.duration/1e3,3)}),h.jsx(Dr,{children:h.jsx("button",{onClick:()=>r(e.trace,t),children:h.jsx(Un,{icon:h.jsx(Vj,{}),children:e.trace.length})})}),h.jsx(Dr,{children:s?h.jsx(Un,{variant:"error",icon:h.jsx($b,{}),children:"Failed"}):h.jsx(Un,{icon:h.jsx(kh,{}),variant:"success",children:"Success"})})]})},k0e=({traces:e,error:t})=>{const n=!e||e.length===0,{currentTraceIndex:r}=A.useContext(Ph),s=4;return h.jsxs(hy,{size:"small",children:[h.jsxs(fy,{children:[h.jsx(Xs,{width:120,children:"Time"}),h.jsx(Xs,{width:"auto",children:"Trace Id"}),h.jsx(Xs,{width:120,children:"Duration"}),h.jsx(Xs,{width:120,children:"Spans"}),h.jsx(Xs,{width:120,children:"Status"})]}),t?h.jsx(U1t,{error:t,colsCount:s}):n?h.jsx(V1t,{colsCount:s}):h.jsx(h.Fragment,{children:h.jsx(Mh,{children:e.map((i,o)=>h.jsx(W1t,{trace:i,index:o,isActive:o===r},i.traceId))})})]})},q1t=({defaultWidth:e,minimumWidth:t,maximumWidth:n,setCurrentWidth:r})=>{const[s,i]=A.useState(!1),[o,a]=A.useState(e),l=A.useRef(null),c=A.useRef(0),u=A.useRef(0),d=p=>{p.preventDefault(),i(!0),c.current=p.clientX,u.current=o};return A.useEffect(()=>{a(e),r==null||r(e)},[e]),A.useEffect(()=>{const p=b=>{if(!s||!l.current)return;const x=l.current.offsetWidth,E=(c.current-b.clientX)/x*100,k=Math.min(Math.max(u.current+E,t),n);a(k),r==null||r(k)},g=()=>{i(!1)};return s&&(window.addEventListener("mousemove",p),window.addEventListener("mouseup",g)),()=>{window.removeEventListener("mousemove",p),window.removeEventListener("mouseup",g)}},[s]),{sidebarWidth:o,isDragging:s,handleMouseDown:d,containerRef:l}},CB=({children:e,defaultWidth:t,minimumWidth:n,maximumWidth:r,className:s,disabled:i=!1,setCurrentWidth:o,dividerPosition:a="left"})=>{const{sidebarWidth:l,isDragging:c,handleMouseDown:u,containerRef:d}=q1t({defaultWidth:i?100:t,minimumWidth:n,maximumWidth:r,setCurrentWidth:o});return h.jsxs("div",{className:Ve("w-full h-full relative",s),ref:d,style:{width:`${l}%`},children:[!i&&a==="left"?h.jsx("div",{className:`w-px bg-border1 h-full cursor-col-resize hover:w-1.5 hover:bg-mastra-border-2 hover:bg-[#424242] active:bg-mastra-border-3 active:bg-[#3e3e3e] transition-colors absolute inset-y-0 z-10
|
|
719
719
|
${c?"bg-border2 w-1.5 cursor- col-resize":""}`,onMouseDown:u}):null,e,!i&&a==="right"?h.jsx("div",{className:`w-px bg-border1 h-full cursor-col-resize hover:w-1.5 hover:bg-border2 active:bg-border3 transition-colors absolute inset-y-0 z-10
|
|
720
720
|
${c?"bg-border2 w-1.5 cursor- col-resize":""}`,onMouseDown:u}):null]})},G1t={md:"h-button-md gap-md",lg:"h-button-lg gap-lg"},Y1t={default:"bg-surface2 hover:bg-surface4 text-icon3 hover:text-icon6",light:"bg-surface3 hover:bg-surface5 text-icon6"},hn=({className:e,as:t,size:n="md",variant:r="default",...s})=>{const i=t||"button";return h.jsx(i,{className:zn("bg-surface2 border-sm border-border1 px-lg text-ui-md inline-flex items-center justify-center rounded-md border",Y1t[r],G1t[n],e,{"cursor-not-allowed":s.disabled}),...s})},K1t=({children:e})=>h.jsx("ol",{children:e}),X1t={agent:"bg-accent1"},J1t=({durationMs:e,tokenCount:t,variant:n,progressPercent:r,offsetPercent:s})=>{const i=n?X1t[n]:"bg-accent3",o=Math.min(100,r);return h.jsxs("div",{className:"w-[80px] xl:w-[166px] shrink-0",children:[h.jsx("div",{className:"bg-surface4 relative h-[6px] w-full rounded-full p-px overflow-hidden",children:h.jsx("div",{className:zn("absolute h-1 rounded-full",i),style:{width:`${o}%`,left:`${s}%`}})}),h.jsxs("div",{className:"flex items-center gap-4 pt-0.5",children:[h.jsxs(Ue,{variant:"ui-sm",className:"text-icon2 font-medium",children:[ES(e,3),"ms"]}),t&&h.jsxs(Ue,{variant:"ui-sm",className:"text-icon2 font-medium",children:[t,"t"]})]})]})},E0e={tool:gl,agent:Nh,workflow:kc,memory:s0e,rag:Vj,storage:Obt,eval:Hbt,other:Vj},D0e={tool:"text-[#ECB047]",agent:"text-accent1",workflow:"text-accent3",memory:"text-accent2",rag:"text-accent2",storage:"text-accent2",eval:"text-accent4",other:"text-icon6"},A0e=({children:e,durationMs:t,variant:n,tokenCount:r,spans:s,isRoot:i,onClick:o,isActive:a,offsetMs:l,totalDurationMs:c})=>{const[u,d]=A.useState(!0),p=E0e[n],g=D0e[n],b=t/c*100,x=l/c*100,S=o?"button":"div";return h.jsxs("li",{children:[h.jsxs("div",{className:zn("flex justify-between items-center gap-2 rounded-md pl-2",a&&"bg-surface4"),children:[h.jsxs("div",{className:"flex h-8 items-center gap-1 min-w-0",children:[s?h.jsx("button",{type:"button","aria-label":u?"Collapse span":"Expand span","aria-expanded":u,className:"text-icon3 flex h-4 w-4",onClick:()=>d(!u),children:h.jsx(ot,{children:h.jsx(Ibt,{className:zn("transition-transform -rotate-90",{"rotate-0":u})})})}):h.jsx("div",{"aria-hidden":!0,className:"h-full w-4",children:!i&&h.jsx("div",{className:"ml-[7px] h-full w-px rounded-full"})}),h.jsxs(S,{className:"flex items-center gap-2 min-w-0",onClick:o,children:[h.jsx("div",{className:zn("bg-surface4 flex items-center justify-center rounded-md p-[3px]",g),children:h.jsx(ot,{children:h.jsx(p,{})})}),h.jsx(Ue,{variant:"ui-md",className:"text-icon6 truncate",children:e})]})]}),h.jsx(J1t,{durationMs:t,tokenCount:r,variant:n==="agent"?"agent":void 0,progressPercent:b,offsetPercent:x})]}),u&&s&&h.jsx("div",{className:"ml-4",children:s})]})},T0e=({children:e})=>h.jsx("ol",{children:e}),Z1t=({name:e,spans:t,durationMs:n,tokenCount:r,onClick:s,variant:i,isActive:o,totalDurationMs:a})=>h.jsx(A0e,{isRoot:!0,durationMs:n,variant:i,spans:h.jsx(T0e,{children:t}),onClick:s,isActive:o,offsetMs:0,totalDurationMs:a,children:e}),eA=e=>{const t=Object.keys(e.attributes||{}).map(a=>a.toLowerCase()),n=e.name.toLowerCase();return n.startsWith("ai.")?n.includes("tool")?"tool":"other":t.some(a=>a.includes("memory")||a.includes("storage"))?"memory":t.some(a=>a.includes("tool"))?"tool":t.some(a=>a.includes("agent."))?"agent":n.includes(".insert")&&t.find(l=>{var c,u;return(u=String((c=e.attributes)==null?void 0:c[l]))==null?void 0:u.includes("mastra_evals")})?"eval":"other"};function _0e(e,t,n,r=null){return e.filter(s=>s.parentSpanId===r).map(s=>({...s,children:_0e(e,t,n,s.id),offset:(s.startTime-t)/1e3,duration:s.duration/1e3,totalDurationMs:n}))}const Q1t=e=>{if(e.length===0)return[];let t,n;const r=[],s=e.length;for(let o=s-1;o>=0;o--){const a=e[o];(!t||a.startTime<t)&&(t=a.startTime),(!n||a.endTime>n)&&(n=a.endTime),a.name!==".insert"&&a.name!=="mastra.getStorage"&&r.push(a)}if(!t||!n)return[];const i=(n-t)/1e3;return _0e(r,t,i)},N0e=({spanNodes:e})=>{const{span:t,setSpan:n}=A.useContext(Ph);return h.jsx(T0e,{children:e.map(r=>{const s=r.id===(t==null?void 0:t.id);return h.jsx(A0e,{spans:r.children.length>0&&h.jsx(N0e,{spanNodes:r.children}),durationMs:r.duration,offsetMs:r.offset,variant:eA(r),isActive:s,onClick:()=>n(r),totalDurationMs:r.totalDurationMs,children:r.name},r.id)})})};function ext({trace:e}){const{span:t,setSpan:n}=A.useContext(Ph),r=Q1t(e);return h.jsx(K1t,{children:r.map(s=>h.jsx(Z1t,{name:s.name,durationMs:s.duration,totalDurationMs:s.totalDurationMs,spans:h.jsx(N0e,{spanNodes:s.children}),variant:eA(s),isActive:s.id===(t==null?void 0:t.id),onClick:()=>n(s)}))})}const us=({children:e,border:t=!0})=>h.jsx("header",{className:zn("h-header-default z-50 flex w-full items-center gap-[18px] bg-transparent px-5",{"border-b-sm border-border1":t}),children:e}),Xu=({children:e})=>h.jsx(Ue,{as:"h1",variant:"ui-lg",className:"font-medium text-white",children:e}),txt=({children:e})=>h.jsx("div",{className:"ml-auto",children:e}),kB=({children:e})=>h.jsx("div",{className:"gap-lg flex items-center",children:e});function nxt(){const{trace:e,currentTraceIndex:t,prevTrace:n,nextTrace:r,traces:s}=A.useContext(Ph),i=s[t];if(!i||!e)return null;const o=e.some(a=>a.status.code!==0);return h.jsxs("aside",{children:[h.jsxs(us,{children:[h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx(hn,{className:"bg-transparent border-none",onClick:n,disabled:t===0,children:h.jsx(ot,{children:h.jsx(lC,{})})}),h.jsx(hn,{className:"bg-transparent border-none",onClick:r,disabled:t===s.length-1,children:h.jsx(ot,{children:h.jsx(Eh,{})})})]}),h.jsxs("div",{className:"flex items-center gap-1 justify-between w-full",children:[h.jsxs(Ue,{variant:"ui-lg",className:"font-medium text-icon5 shrink-0",children:["Trace ",h.jsx("span",{className:"ml-2 text-icon3",children:i.traceId.substring(0,7)})]}),o&&h.jsx(Un,{variant:"error",icon:h.jsx($b,{}),children:"Failed"})]})]}),h.jsx("div",{className:"p-5",children:h.jsx(ext,{trace:e})})]})}const RC=()=>A.useMemo(()=>NT({settings:{fontFamily:"var(--geist-mono)",fontSize:"0.8rem",lineHighlight:"transparent",gutterBackground:"transparent",gutterForeground:ust.surface3,background:"transparent"},styles:[{tag:[Ce.className,Ce.propertyName]}]}),[]),Xj=({data:e})=>{const t=JSON.stringify(e,null,2),n=RC();return h.jsx("div",{className:"rounded-md bg-[#1a1a1a] p-1 font-mono",children:h.jsx(al,{value:t,theme:n,extensions:[Fu]})})};function rxt(e){const t=new Date(e/1e3);return new Intl.DateTimeFormat("en-US",{month:"numeric",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!0}).format(t)}function sxt(e){const t=new Date(e/1e6);return new Intl.DateTimeFormat("en-US",{month:"numeric",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!0}).format(t)}function P0e(e){if(e.includes(".argument."))return"Input";if(e.includes(".result"))return"Output";const t=e.split(".").join(" ").split("_").join(" ").replaceAll("ai","AI");return t.substring(0,1).toUpperCase()+t.substring(1)}function ixt(){var l;const{span:e,setSpan:t,trace:n,setIsOpen:r}=A.useContext(Ph);if(!e||!n)return null;const s=()=>{const c=n.findIndex(u=>u.id===e.id);c!==-1&&c<n.length-1&&t(n[c+1])},i=()=>{const c=n.findIndex(u=>u.id===e.id);c!==-1&&c>0&&t(n[c-1])},o=E0e[eA(e)],a=D0e[eA(e)];return h.jsxs("aside",{children:[h.jsxs(us,{children:[h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx(hn,{className:"bg-transparent border-none",onClick:s,children:h.jsx(ot,{children:h.jsx(lC,{})})}),h.jsx(hn,{className:"bg-transparent border-none",onClick:i,children:h.jsx(ot,{children:h.jsx(Eh,{})})})]}),h.jsx("div",{children:h.jsxs(Ue,{variant:"ui-lg",className:"font-medium text-icon5",as:"h2",children:["Span ",h.jsx("span",{className:"ml-2 text-icon3",children:e.id.substring(0,7)})]})}),h.jsx("div",{className:"ml-auto flex items-center gap-2",children:h.jsx(hn,{className:"bg-transparent border-none",onClick:()=>r(!1),children:h.jsx(ot,{children:h.jsx($b,{})})})})]}),h.jsxs("div",{className:"p-5",children:[h.jsxs(Ue,{variant:"header-md",as:"h3",className:"text-icon-6 flex items-center gap-4 pb-3",children:[h.jsx(ot,{size:"lg",className:"bg-surface4 p-1 rounded-md",children:h.jsx(o,{className:a})}),e.name]}),h.jsx("div",{className:"flex flex-row gap-2 items-center",children:e.status.code===0?h.jsxs(Un,{icon:h.jsx(Wbt,{}),variant:"success",children:[ES(e.duration,3),"ms"]}):h.jsxs(Un,{variant:"error",icon:h.jsx($b,{}),children:["Failed in ",ES(e.duration,3),"ms"]})}),h.jsx("hr",{className:"border-border1 border-sm my-5"}),h.jsxs("dl",{className:"grid grid-cols-2 justify-between gap-2",children:[h.jsx("dt",{className:"font-medium text-ui-md text-icon3",children:"ID"}),h.jsx("dd",{className:"text-ui-md text-icon6",children:e.id}),h.jsx("dt",{className:"font-medium text-ui-md text-icon3",children:"Created at"}),h.jsx("dd",{className:"text-ui-md text-icon6",children:e.startTime?rxt(e.startTime):""})]}),e.attributes&&h.jsx(oxt,{attributes:e.attributes}),((l=e.events)==null?void 0:l.length)>0&&h.jsx(axt,{span:e})]})]})}function oxt({attributes:e}){if(!e)return null;const t=Object.entries(e);if(t.length===0)return null;const n=["http.request_id","componentName"];return h.jsx("div",{children:t.filter(([r])=>!n.includes(r)).map(([r,s])=>h.jsxs("div",{children:[h.jsx("hr",{className:"border-border1 border-sm my-5"}),h.jsx(Ue,{as:"h4",variant:"ui-md",className:"text-icon3 pb-2",children:P0e(r)}),h.jsx(M0e,{value:s})]},r))})}const M0e=({value:e})=>{if(!e)return h.jsx(Ue,{as:"p",variant:"ui-md",className:"text-icon6",children:"N/A"});if(typeof e=="number"||typeof e=="boolean")return h.jsx(Ue,{as:"p",variant:"ui-md",className:"text-icon6",children:String(e)});if(typeof e=="object")return h.jsx(Xj,{data:e});try{return h.jsx(Xj,{data:JSON.parse(e)})}catch{return h.jsx(Ue,{as:"p",variant:"ui-md",className:"text-icon6",children:String(e)})}};function axt({span:e}){return e.events?h.jsxs("div",{children:[h.jsx("hr",{className:"border-border1 border-sm my-5"}),h.jsx(Ue,{as:"p",variant:"ui-md",className:"text-icon6 pb-2",children:"Events"}),e.events.map(t=>{var r;const n=t===e.events[e.events.length-1];return h.jsxs(Se.Fragment,{children:[h.jsxs("div",{children:[h.jsxs("dl",{className:"grid grid-cols-2 justify-between gap-2 pb-2",children:[h.jsx("dt",{className:"font-medium text-ui-md text-icon3",children:"Name"}),h.jsx("dd",{className:"text-ui-md text-icon6",children:t.name}),h.jsx("dt",{className:"font-medium text-ui-md text-icon3",children:"Time"}),h.jsx("dd",{className:"text-ui-md text-icon6",children:t.timeUnixNano?sxt(Number(t.timeUnixNano)):"N/A"})]}),((r=t.attributes)==null?void 0:r.length)>0?h.jsx("ul",{className:"space-y-2",children:t.attributes.filter(s=>s!==null).map(s=>h.jsxs("li",{children:[h.jsx(Ue,{as:"h4",variant:"ui-md",className:"text-icon3 pb-2",children:P0e(s.key)}),h.jsx(M0e,{value:s.value})]},s.key))}):null]},t.name),!n&&h.jsx("hr",{className:"border-border1 border-sm my-5"})]},t.name)})]}):null}const j0e=({onResize:e})=>h.jsx(CB,{className:"h-full absolute right-0 inset-y-0 bg-surface2",defaultWidth:80,minimumWidth:50,maximumWidth:80,setCurrentWidth:e,children:h.jsxs("div",{className:"h-full grid grid-cols-2",children:[h.jsx("div",{className:"overflow-x-scroll w-full h-[calc(100%-40px)]",children:h.jsx(nxt,{})}),h.jsx("div",{className:"h-[calc(100%-40px)] overflow-x-scroll w-full border-l border-border1",children:h.jsx(ixt,{})})]})});function lxt({className:e,traces:t,error:n}){return h.jsx(C0e,{initialTraces:t||[],children:h.jsx(cxt,{className:e,traces:t,error:n})})}function cxt({className:e,traces:t,error:n}){const[r,s]=A.useState(100),{isOpen:i}=A.useContext(Ph);return h.jsxs("div",{className:zn("h-full relative overflow-hidden flex",e),children:[h.jsx("div",{className:"h-full overflow-y-scroll w-full",children:h.jsx(k0e,{traces:t,error:n})}),i&&h.jsx(j0e,{width:r,onResize:s})]})}const tA=A.forwardRef(({className:e,...t},n)=>h.jsxs(UT,{ref:n,className:Ve("relative flex w-full touch-none select-none items-center",e),...t,children:[h.jsx(Tfe,{className:"relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20",children:h.jsx(_fe,{className:"absolute h-full bg-primary/50"})}),h.jsx(Nfe,{className:"block h-4 w-4 rounded-full border border-primary/50 bg-white shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"})]}));tA.displayName=UT.displayName;const uxt=V1("text-sm leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),u1=A.forwardRef(({className:e,...t},n)=>h.jsx(WT,{ref:n,className:Ve(uxt(),e),...t}));u1.displayName=WT.displayName;const _4=A.forwardRef(({className:e,...t},n)=>h.jsx(Ufe,{className:Ve("grid gap-2",e),...t,ref:n}));_4.displayName=Ufe.displayName;const Lg=A.forwardRef(({className:e,...t},n)=>h.jsx(Wfe,{ref:n,className:Ve("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:h.jsx(Ost,{className:"flex items-center justify-center",children:h.jsx(t$e,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Lg.displayName=Wfe.displayName;const qm=({label:e,children:t})=>h.jsxs("div",{className:"space-y-2",children:[h.jsx(Ue,{as:"p",variant:"ui-md",className:"text-icon3",children:e}),t]}),EB=Yfe,DB=vL,AB=SL,ip=async e=>await rDe.format(e,{semi:!1,parser:"json",printWidth:80,tabWidth:2,plugins:[IAe,t9e]}),DS=e=>{try{const t=JSON.parse(e);return!!t&&typeof t=="object"}catch{return!1}},dxt=()=>{var T,P,M,j,F,I,B;const{settings:e,setSettings:t}=wB(),[n,r]=A.useState(!1),[s,i]=A.useState(""),[o,a]=A.useState(!1),[l,c]=A.useState(null),u=RC(),{handleCopy:d}=IC({text:s}),p=JSON.stringify(((T=e==null?void 0:e.modelSettings)==null?void 0:T.providerOptions)??{});A.useEffect(()=>{(async()=>{if(!DS(p)){c("Invalid JSON");return}const W=await ip(p);i(W)})()},[p]);const g=async()=>{if(c(null),!DS(s)){c("Invalid JSON");return}const L=await ip(s);i(L)},b=async()=>{try{c(null);const L=JSON.parse(s);t({...e,modelSettings:{...e==null?void 0:e.modelSettings,providerOptions:L}}),a(!0),setTimeout(()=>{a(!1)},1e3)}catch(L){console.error("error",L),c("Invalid JSON")}},x="rounded-lg border-sm border-border1 bg-surface3 overflow-clip",S="text-icon3 text-ui-lg font-medium flex items-center gap-2 w-full p-[10px] justify-between",E="bg-surface2 p-[10px] grid grid-cols-2 gap-[10px]",k="text-icon3 hover:text-icon6";return h.jsx(FC,{children:h.jsxs(EB,{className:x,open:n,onOpenChange:r,children:[h.jsxs(DB,{className:S,children:["Advanced Settings",h.jsx(ot,{className:Ve("transition-transform",n?"rotate-0":"-rotate-90"),children:h.jsx(Eh,{})})]}),h.jsxs(AB,{className:E,children:[h.jsxs("div",{className:"space-y-1",children:[h.jsx(Ue,{as:"label",className:"text-icon3",variant:"ui-sm",htmlFor:"top-k",children:"Top K"}),h.jsx(ga,{id:"top-k",type:"number",value:((P=e==null?void 0:e.modelSettings)==null?void 0:P.topK)||"",onChange:L=>t({...e,modelSettings:{...e==null?void 0:e.modelSettings,topK:L.target.value?Number(L.target.value):void 0}})})]}),h.jsxs("div",{className:"space-y-1",children:[h.jsx(Ue,{as:"label",className:"text-icon3",variant:"ui-sm",htmlFor:"frequency-penalty",children:"Frequency Penalty"}),h.jsx(ga,{id:"frequency-penalty",type:"number",value:((M=e==null?void 0:e.modelSettings)==null?void 0:M.frequencyPenalty)||"",onChange:L=>t({...e,modelSettings:{...e==null?void 0:e.modelSettings,frequencyPenalty:L.target.value?Number(L.target.value):void 0}})})]}),h.jsxs("div",{className:"space-y-1",children:[h.jsx(Ue,{as:"label",className:"text-icon3",variant:"ui-sm",htmlFor:"presence-penalty",children:"Presence Penalty"}),h.jsx(ga,{id:"presence-penalty",type:"number",value:((j=e==null?void 0:e.modelSettings)==null?void 0:j.presencePenalty)||"",onChange:L=>t({...e,modelSettings:{...e==null?void 0:e.modelSettings,presencePenalty:L.target.value?Number(L.target.value):void 0}})})]}),h.jsxs("div",{className:"space-y-1",children:[h.jsx(Ue,{as:"label",className:"text-icon3",variant:"ui-sm",htmlFor:"max-tokens",children:"Max Tokens"}),h.jsx(ga,{id:"max-tokens",type:"number",value:((F=e==null?void 0:e.modelSettings)==null?void 0:F.maxTokens)||"",onChange:L=>t({...e,modelSettings:{...e==null?void 0:e.modelSettings,maxTokens:L.target.value?Number(L.target.value):void 0}})})]}),h.jsxs("div",{className:"space-y-1",children:[h.jsx(Ue,{as:"label",className:"text-icon3",variant:"ui-sm",htmlFor:"max-steps",children:"Max Steps"}),h.jsx(ga,{id:"max-steps",type:"number",value:((I=e==null?void 0:e.modelSettings)==null?void 0:I.maxSteps)||"",onChange:L=>t({...e,modelSettings:{...e==null?void 0:e.modelSettings,maxSteps:L.target.value?Number(L.target.value):void 0}})})]}),h.jsxs("div",{className:"space-y-1",children:[h.jsx(Ue,{as:"label",className:"text-icon3",variant:"ui-sm",htmlFor:"max-retries",children:"Max Retries"}),h.jsx(ga,{id:"max-retries",type:"number",value:((B=e==null?void 0:e.modelSettings)==null?void 0:B.maxRetries)||"",onChange:L=>t({...e,modelSettings:{...e==null?void 0:e.modelSettings,maxRetries:L.target.value?Number(L.target.value):void 0}})})]}),h.jsxs("div",{className:"space-y-1 col-span-2",children:[h.jsxs("div",{className:"flex justify-between items-center",children:[h.jsx(Ue,{as:"label",className:"text-icon3",variant:"ui-sm",htmlFor:"provider-options",children:"Provider Options"}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsxs(Ta,{children:[h.jsx(_a,{asChild:!0,children:h.jsx("button",{onClick:g,className:k,children:h.jsx(ot,{children:h.jsx(aC,{})})})}),h.jsx(Vo,{children:"Format the Provider Options JSON"})]}),h.jsxs(Ta,{children:[h.jsx(_a,{asChild:!0,children:h.jsx("button",{onClick:d,className:k,children:h.jsx(ot,{children:h.jsx(Dh,{})})})}),h.jsx(Vo,{children:"Copy Provider Options"})]}),h.jsxs(Ta,{children:[h.jsx(_a,{asChild:!0,children:h.jsx("button",{onClick:b,className:k,children:h.jsx(ot,{children:o?h.jsx(kh,{}):h.jsx(w$e,{})})})}),h.jsx(Vo,{children:o?"Saved":"Save Provider Options"})]})]})]}),h.jsx(al,{value:s,onChange:i,theme:u,extensions:[Fu],className:"h-[300px] overflow-scroll rounded-lg border bg-transparent shadow-sm focus-visible:ring-ring transition-colors focus-visible:outline-none focus-visible:ring-1 p-2"}),l&&h.jsx(Ue,{variant:"ui-md",className:"text-accent2",children:l})]})]})]})})},hxt=()=>{var r,s,i,o,a;const{settings:e,setSettings:t,resetAll:n}=wB();return h.jsxs("div",{className:"px-5 text-xs py-2 pb-4",children:[h.jsxs("section",{className:"space-y-7",children:[h.jsx(qm,{label:"Chat Method",children:h.jsxs(_4,{orientation:"horizontal",value:(r=e==null?void 0:e.modelSettings)!=null&&r.chatWithGenerate?"generate":"stream",onValueChange:l=>t({...e,modelSettings:{...e==null?void 0:e.modelSettings,chatWithGenerate:l==="generate"}}),className:"flex flex-row gap-4",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(Lg,{value:"generate",id:"generate",className:"text-icon6"}),h.jsx(u1,{className:"text-icon6 text-ui-md",htmlFor:"generate",children:"Generate"})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(Lg,{value:"stream",id:"stream",className:"text-icon6"}),h.jsx(u1,{className:"text-icon6 text-ui-md",htmlFor:"stream",children:"Stream"})]})]})}),h.jsxs("div",{className:"grid grid-cols-2 gap-8",children:[h.jsx(qm,{label:"Temperature",children:h.jsxs("div",{className:"flex flex-row justify-between items-center gap-2",children:[h.jsx(tA,{value:[((s=e==null?void 0:e.modelSettings)==null?void 0:s.temperature)??-.1],max:1,min:-.1,step:.1,onValueChange:l=>t({...e,modelSettings:{...e==null?void 0:e.modelSettings,temperature:l[0]<0?void 0:l[0]}})}),h.jsx(Ue,{as:"p",variant:"ui-sm",className:"text-icon3",children:((i=e==null?void 0:e.modelSettings)==null?void 0:i.temperature)??"n/a"})]})}),h.jsx(qm,{label:"Top P",children:h.jsxs("div",{className:"flex flex-row justify-between items-center gap-2",children:[h.jsx(tA,{onValueChange:l=>t({...e,modelSettings:{...e==null?void 0:e.modelSettings,topP:l[0]<0?void 0:l[0]}}),value:[((o=e==null?void 0:e.modelSettings)==null?void 0:o.topP)??-.1],max:1,min:-.1,step:.1}),h.jsx(Ue,{as:"p",variant:"ui-sm",className:"text-icon3",children:((a=e==null?void 0:e.modelSettings)==null?void 0:a.topP)??"n/a"})]})})]})]}),h.jsx("section",{className:"py-7",children:h.jsx(dxt,{})}),h.jsxs(hn,{onClick:()=>n(),variant:"light",className:"w-full",size:"lg",children:[h.jsx(ot,{children:h.jsx(x$e,{})}),"Reset"]})]})},LC=({iconSlot:e,titleSlot:t,descriptionSlot:n,actionSlot:r,as:s="div"})=>h.jsxs("div",{className:"flex w-[340px] flex-col items-center justify-center text-center",children:[h.jsx("div",{className:"h-auto [&>svg]:w-[126px]",children:e}),h.jsx(s,{className:"text-icon6 pt-[34px] font-serif text-[1.75rem] font-semibold",children:t}),h.jsx(Ue,{variant:"ui-lg",className:"text-icon3 pb-[34px]",children:n}),r]}),aQ=40,yE=150,lQ=10,TB=({className:e,children:t,scrollSpeed:n=100,scrollIntervalTime:r=20})=>{const s=A.useRef(null),i=A.useRef(null),[o,a]=A.useState(0),[l,c]=A.useState(0),[u,d]=A.useState(0),[p,g]=A.useState(0),[b,x]=A.useState(!1),[S,E]=A.useState(!1);A.useEffect(()=>{var B;const M=()=>{if(!s.current)return;const L=s.current.scrollLeft<s.current.scrollWidth-s.current.clientWidth;x(L),a(s.current.clientHeight);const W=s.current.getBoundingClientRect();c(W.right),g(W.left),d(W.top)};M();const j=new ResizeObserver(M);s.current&&j.observe(s.current);const F=()=>{if(!s.current)return;const L=s.current.scrollLeft>0,W=s.current.scrollLeft<s.current.scrollWidth-s.current.clientWidth;E(L),x(W),M()};(B=s==null?void 0:s.current)==null||B.addEventListener("scroll",F);const I=s.current;return()=>{I&&(j.unobserve(I),I.removeEventListener("scroll",F))}},[]);const k=({isVisible:M,position:j,containerHeight:F,containerTop:I,containerRight:B,onStartScrolling:L,onStopScrolling:W})=>{if(!M)return null;const $={top:F<yE?I:I+(F-yE)/2,width:aQ,height:F<yE?`${F}px`:`${yE}px`};return h.jsxs("button",{onMouseDown:L,onTouchStart:L,onMouseUp:W,onTouchEnd:W,onTouchCancel:W,className:"bg-surface4 text-muted-foreground border-surface5 hover:border-muted-foreground fixed z-10 flex items-center justify-center rounded-lg border text-2xl hover:text-white",style:{...$,left:j==="left"?p+lQ:B-aQ-lQ},children:[" ",j==="left"?"«":"»"]})},T=A.useCallback((M,j)=>{j==null||j.preventDefault(),j==null||j.stopPropagation(),i.current&&(clearInterval(i.current),i.current=null),s.current&&s.current.scrollBy({left:M==="right"?n*2:-n*2,behavior:"smooth"}),i.current=setInterval(()=>{s.current&&s.current.scrollBy({left:M==="right"?n:-n,behavior:"smooth"})},r)},[n,r]),P=A.useCallback(()=>{i.current&&(clearInterval(i.current),i.current=null)},[]);return h.jsxs("div",{ref:s,className:zn("relative max-h-full overflow-auto",e),children:[t,h.jsx(k,{isVisible:S,position:"left",containerHeight:o,containerTop:u,containerRight:l,onStartScrolling:M=>T("left",M),onStopScrolling:P}),h.jsx(k,{isVisible:b,position:"right",containerHeight:o,containerTop:u,containerRight:l,onStartScrolling:M=>T("right",M),onStopScrolling:P})]})};function as({className:e,...t}){return h.jsx("div",{className:Ve("animate-pulse rounded-md bg-muted/50",e),...t})}const fxt=e=>h.jsx("svg",{className:"h-3 w-3",viewBox:"0 0 320 320",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",...e,children:h.jsx("path",{d:"m297.06 130.97c7.26-21.79 4.76-45.66-6.85-65.48-17.46-30.4-52.56-46.04-86.84-38.68-15.25-17.18-37.16-26.95-60.13-26.81-35.04-.08-66.13 22.48-76.91 55.82-22.51 4.61-41.94 18.7-53.31 38.67-17.59 30.32-13.58 68.54 9.92 94.54-7.26 21.79-4.76 45.66 6.85 65.48 17.46 30.4 52.56 46.04 86.84 38.68 15.24 17.18 37.16 26.95 60.13 26.8 35.06.09 66.16-22.49 76.94-55.86 22.51-4.61 41.94-18.7 53.31-38.67 17.57-30.32 13.55-68.51-9.94-94.51zm-120.28 168.11c-14.03.02-27.62-4.89-38.39-13.88.49-.26 1.34-.73 1.89-1.07l63.72-36.8c3.26-1.85 5.26-5.32 5.24-9.07v-89.83l26.93 15.55c.29.14.48.42.52.74v74.39c-.04 33.08-26.83 59.9-59.91 59.97zm-128.84-55.03c-7.03-12.14-9.56-26.37-7.15-40.18.47.28 1.3.79 1.89 1.13l63.72 36.8c3.23 1.89 7.23 1.89 10.47 0l77.79-44.92v31.1c.02.32-.13.63-.38.83l-64.41 37.19c-28.69 16.52-65.33 6.7-81.92-21.95zm-16.77-139.09c7-12.16 18.05-21.46 31.21-26.29 0 .55-.03 1.52-.03 2.2v73.61c-.02 3.74 1.98 7.21 5.23 9.06l77.79 44.91-26.93 15.55c-.27.18-.61.21-.91.08l-64.42-37.22c-28.63-16.58-38.45-53.21-21.95-81.89zm221.26 51.49-77.79-44.92 26.93-15.54c.27-.18.61-.21.91-.08l64.42 37.19c28.68 16.57 38.51 53.26 21.94 81.94-7.01 12.14-18.05 21.44-31.2 26.28v-75.81c.03-3.74-1.96-7.2-5.2-9.06zm26.8-40.34c-.47-.29-1.3-.79-1.89-1.13l-63.72-36.8c-3.23-1.89-7.23-1.89-10.47 0l-77.79 44.92v-31.1c-.02-.32.13-.63.38-.83l64.41-37.16c28.69-16.55 65.37-6.7 81.91 22 6.99 12.12 9.52 26.31 7.15 40.1zm-168.51 55.43-26.94-15.55c-.29-.14-.48-.42-.52-.74v-74.39c.02-33.12 26.89-59.96 60.01-59.94 14.01 0 27.57 4.92 38.34 13.88-.49.26-1.33.73-1.89 1.07l-63.72 36.8c-3.26 1.85-5.26 5.31-5.24 9.06l-.04 89.79zm14.63-31.54 34.65-20.01 34.65 20v40.01l-34.65 20-34.65-20z"})}),pxt=e=>h.jsx("svg",{className:"h-3 w-3",viewBox:"0 0 320 320",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",...e,children:h.jsx("path",{d:"m297.06 130.97c7.26-21.79 4.76-45.66-6.85-65.48-17.46-30.4-52.56-46.04-86.84-38.68-15.25-17.18-37.16-26.95-60.13-26.81-35.04-.08-66.13 22.48-76.91 55.82-22.51 4.61-41.94 18.7-53.31 38.67-17.59 30.32-13.58 68.54 9.92 94.54-7.26 21.79-4.76 45.66 6.85 65.48 17.46 30.4 52.56 46.04 86.84 38.68 15.24 17.18 37.16 26.95 60.13 26.8 35.06.09 66.16-22.49 76.94-55.86 22.51-4.61 41.94-18.7 53.31-38.67 17.57-30.32 13.55-68.51-9.94-94.51zm-120.28 168.11c-14.03.02-27.62-4.89-38.39-13.88.49-.26 1.34-.73 1.89-1.07l63.72-36.8c3.26-1.85 5.26-5.32 5.24-9.07v-89.83l26.93 15.55c.29.14.48.42.52.74v74.39c-.04 33.08-26.83 59.9-59.91 59.97zm-128.84-55.03c-7.03-12.14-9.56-26.37-7.15-40.18.47.28 1.3.79 1.89 1.13l63.72 36.8c3.23 1.89 7.23 1.89 10.47 0l77.79-44.92v31.1c.02.32-.13.63-.38.83l-64.41 37.19c-28.69 16.52-65.33 6.7-81.92-21.95zm-16.77-139.09c7-12.16 18.05-21.46 31.21-26.29 0 .55-.03 1.52-.03 2.2v73.61c-.02 3.74 1.98 7.21 5.23 9.06l77.79 44.91-26.93 15.55c-.27.18-.61.21-.91.08l-64.42-37.22c-28.63-16.58-38.45-53.21-21.95-81.89zm221.26 51.49-77.79-44.92 26.93-15.54c.27-.18.61-.21.91-.08l64.42 37.19c28.68 16.57 38.51 53.26 21.94 81.94-7.01 12.14-18.05 21.44-31.2 26.28v-75.81c.03-3.74-1.96-7.2-5.2-9.06zm26.8-40.34c-.47-.29-1.3-.79-1.89-1.13l-63.72-36.8c-3.23-1.89-7.23-1.89-10.47 0l-77.79 44.92v-31.1c-.02-.32.13-.63.38-.83l64.41-37.16c28.69-16.55 65.37-6.7 81.91 22 6.99 12.12 9.52 26.31 7.15 40.1zm-168.51 55.43-26.94-15.55c-.29-.14-.48-.42-.52-.74v-74.39c.02-33.12 26.89-59.96 60.01-59.94 14.01 0 27.57 4.92 38.34 13.88-.49.26-1.33.73-1.89 1.07l-63.72 36.8c-3.26 1.85-5.26 5.31-5.24 9.06l-.04 89.79zm14.63-31.54 34.65-20.01 34.65 20v40.01l-34.65 20-34.65-20z"})}),mxt=e=>h.jsx("svg",{className:"h-3 w-3",fill:"white",height:"78",strokeLinejoin:"round",viewBox:"0 0 16 16",width:"78",style:{color:"currentcolor"},...e,children:h.jsx("g",{transform:"translate(0,2)",children:h.jsx("path",{d:"M11.375 0h-2.411L13.352 11.13h2.411L11.375 0ZM4.4 0 0 11.13h2.46l0.9-2.336h4.604l0.9 2.336h2.46L6.924 0H4.4Zm-0.244 6.723 1.506-3.909 1.506 3.909H4.156Z",fill:"currentColor"})})}),gxt=e=>h.jsx("svg",{className:"h-3 w-3",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",...e,children:h.jsx("path",{d:"M7.402 13.8777C9.45763 13.4674 11.1555 13.128 11.175 13.1233L11.2104 13.1148L9.2697 10.507C8.2023 9.07276 7.32898 7.8937 7.32898 7.88691C7.32898 7.87404 9.33293 1.63997 9.3442 1.61779C9.34797 1.61037 10.7117 4.27017 12.65 8.06532C14.4647 11.6184 15.9608 14.5479 15.9747 14.5754L16 14.6253L9.83224 14.6244L3.66449 14.6235L7.402 13.8777ZM0 13.0824C0 13.0787 0.914457 11.2855 2.03212 9.09735L4.06425 5.11896L6.43245 2.87384C7.73497 1.63902 8.80417 0.627201 8.80845 0.625356C8.81274 0.623511 8.79561 0.672228 8.77038 0.733617C8.74515 0.795006 7.58796 3.59893 6.19884 6.96455L3.67317 13.0839L1.83659 13.0865C0.826464 13.0879 0 13.0861 0 13.0824Z",fill:"#0089D6",style:{fill:"#0089D6",fillOpacity:1}})}),yxt=e=>h.jsxs("svg",{className:"h-3 w-3",width:"16",height:"16",viewBox:"0 0 181 108",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[h.jsxs("g",{clipPath:"url(#clip0_1480_1723)",children:[h.jsx("path",{d:"M51.2203 39.3158C51.2203 41.5066 51.4572 43.2829 51.8717 44.5856C52.3453 45.8882 52.9374 47.3093 53.7664 48.8487C54.0624 49.3224 54.1809 49.7961 54.1809 50.2106C54.1809 50.8027 53.8256 51.3948 53.0559 51.9869L49.3256 54.4737C48.7927 54.829 48.2598 55.0066 47.7861 55.0066C47.194 55.0066 46.6019 54.7106 46.0098 54.1777C45.1809 53.2895 44.4703 52.3422 43.8782 51.3948C43.2861 50.3882 42.694 49.2632 42.0427 47.9014C37.4243 53.3487 31.6217 56.0724 24.6348 56.0724C19.6611 56.0724 15.694 54.6514 12.7927 51.8093C9.8914 48.9672 8.41113 45.1777 8.41113 40.4408C8.41113 35.4079 10.1874 31.3224 13.7993 28.2435C17.4111 25.1645 22.2072 23.6251 28.3059 23.6251C30.319 23.6251 32.3914 23.8027 34.5822 24.0987C36.773 24.3948 39.023 24.8685 41.3914 25.4014V21.079C41.3914 16.579 40.444 13.4408 38.6085 11.6053C36.7138 9.76979 33.5164 8.88163 28.9572 8.88163C26.8848 8.88163 24.7532 9.11847 22.5624 9.65137C20.3717 10.1843 18.2401 10.8356 16.1677 11.6645C15.2203 12.079 14.5098 12.3158 14.0953 12.4343C13.6809 12.5527 13.3848 12.6119 13.148 12.6119C12.319 12.6119 11.9046 12.0198 11.9046 10.7764V7.87505C11.9046 6.92768 12.023 6.21716 12.319 5.80268C12.6151 5.38821 13.148 4.97374 13.9769 4.55926C16.0493 3.49347 18.5361 2.60531 21.4374 1.89479C24.3388 1.12505 27.4177 0.769788 30.6743 0.769788C37.7203 0.769788 42.8717 2.36847 46.1875 5.56584C49.444 8.76321 51.1019 13.6185 51.1019 20.1316V39.3158H51.2203ZM27.1809 48.3158C29.1348 48.3158 31.148 47.9606 33.2796 47.2501C35.4111 46.5395 37.3059 45.2369 38.9046 43.4606C39.8519 42.3356 40.5625 41.0922 40.9177 39.6711C41.273 38.2501 41.5098 36.5329 41.5098 34.5198V32.0329C39.7927 31.6185 37.9572 31.2632 36.0624 31.0264C34.1677 30.7895 32.3322 30.6711 30.4967 30.6711C26.5296 30.6711 23.6282 31.4408 21.6743 33.0395C19.7203 34.6382 18.773 36.8882 18.773 39.8487C18.773 42.6316 19.4835 44.704 20.9638 46.1251C22.3848 47.6053 24.4572 48.3158 27.1809 48.3158ZM74.7269 54.7106C73.6611 54.7106 72.9506 54.5329 72.4769 54.1185C72.0032 53.7632 71.5888 52.9343 71.2335 51.8093L57.319 6.03953C56.9638 4.85531 56.7861 4.08558 56.7861 3.6711C56.7861 2.72374 57.2598 2.19084 58.2072 2.19084H64.0098C65.1348 2.19084 65.9046 2.36847 66.319 2.78295C66.7927 3.13821 67.148 3.96716 67.5032 5.09216L77.4506 44.2895L86.6874 5.09216C86.9835 3.90795 87.3388 3.13821 87.8124 2.78295C88.2861 2.42768 89.1151 2.19084 90.1809 2.19084H94.9177C96.0427 2.19084 96.8124 2.36847 97.2861 2.78295C97.7598 3.13821 98.1743 3.96716 98.4111 5.09216L107.766 44.7632L118.01 5.09216C118.365 3.90795 118.78 3.13821 119.194 2.78295C119.668 2.42768 120.437 2.19084 121.503 2.19084H127.01C127.957 2.19084 128.49 2.66453 128.49 3.6711C128.49 3.96716 128.431 4.26321 128.372 4.61847C128.312 4.97374 128.194 5.44742 127.957 6.09874L113.687 51.8685C113.332 53.0527 112.918 53.8224 112.444 54.1777C111.97 54.5329 111.201 54.7698 110.194 54.7698H105.102C103.977 54.7698 103.207 54.5922 102.733 54.1777C102.26 53.7632 101.845 52.9935 101.608 51.8093L92.4309 13.6185L83.3125 51.7501C83.0164 52.9343 82.6611 53.704 82.1874 54.1185C81.7138 54.5329 80.8848 54.7106 79.819 54.7106H74.7269ZM150.812 56.3093C147.734 56.3093 144.655 55.954 141.694 55.2435C138.733 54.5329 136.424 53.7632 134.885 52.8751C133.937 52.3422 133.286 51.7501 133.049 51.2172C132.812 50.6843 132.694 50.0922 132.694 49.5593V46.5395C132.694 45.2961 133.168 44.704 134.056 44.704C134.411 44.704 134.766 44.7632 135.122 44.8816C135.477 45.0001 136.01 45.2369 136.602 45.4737C138.615 46.3619 140.806 47.0724 143.115 47.5461C145.484 48.0198 147.793 48.2566 150.161 48.2566C153.891 48.2566 156.793 47.6053 158.806 46.3027C160.819 45 161.885 43.1053 161.885 40.6777C161.885 39.0198 161.352 37.6579 160.286 36.5329C159.22 35.4079 157.207 34.4014 154.306 33.454L145.72 30.7895C141.398 29.4277 138.201 27.4145 136.247 24.7501C134.293 22.1448 133.286 19.2435 133.286 16.1645C133.286 13.6777 133.819 11.4869 134.885 9.59216C135.951 7.69742 137.372 6.03953 139.148 4.73689C140.924 3.37505 142.937 2.36847 145.306 1.65795C147.674 0.94742 150.161 0.651367 152.766 0.651367C154.069 0.651367 155.431 0.710578 156.734 0.888209C158.095 1.06584 159.339 1.30268 160.582 1.53953C161.766 1.83558 162.891 2.13163 163.957 2.48689C165.023 2.84216 165.852 3.19742 166.444 3.55268C167.273 4.02637 167.865 4.50005 168.22 5.03295C168.576 5.50663 168.753 6.15795 168.753 6.98689V9.76979C168.753 11.0132 168.28 11.6645 167.391 11.6645C166.918 11.6645 166.148 11.4277 165.141 10.954C161.766 9.41453 157.977 8.64479 153.773 8.64479C150.398 8.64479 147.734 9.17768 145.898 10.3027C144.062 11.4277 143.115 13.1448 143.115 15.5724C143.115 17.2303 143.707 18.6514 144.891 19.7764C146.076 20.9014 148.266 22.0264 151.405 23.0329L159.812 25.6974C164.076 27.0593 167.155 28.954 168.99 31.3816C170.826 33.8093 171.714 36.5922 171.714 39.6711C171.714 42.2172 171.181 44.5264 170.174 46.5395C169.108 48.5527 167.687 50.329 165.852 51.7501C164.016 53.2303 161.826 54.2961 159.28 55.0658C156.615 55.8948 153.832 56.3093 150.812 56.3093Z",fill:"currentColor"}),h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M162.004 85.0856C142.524 99.4738 114.221 107.112 89.8855 107.112C55.7803 107.112 25.05 94.5001 1.83948 73.5396C0.00394917 71.8817 1.66184 69.6317 3.85263 70.9343C28.9579 85.5001 59.925 94.3225 91.9579 94.3225C113.57 94.3225 137.313 89.8225 159.162 80.5856C162.418 79.1054 165.201 82.7172 162.004 85.0856Z",fill:"#FF9900"}),h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M170.115 75.8487C167.628 72.6513 153.654 74.3092 147.319 75.079C145.424 75.3158 145.128 73.6579 146.845 72.4145C157.976 64.5987 176.272 66.8487 178.404 69.454C180.536 72.1184 177.812 90.4145 167.391 99.1776C165.792 100.539 164.253 99.8289 164.963 98.0526C167.332 92.1908 172.601 78.9868 170.115 75.8487Z",fill:"#FF9900"})]}),h.jsx("defs",{children:h.jsx("clipPath",{id:"clip0_1480_1723",children:h.jsx("rect",{width:"180",height:"107.763",fill:"white",transform:"translate(0.0625)"})})})]}),bxt=e=>h.jsxs("svg",{className:"h-3 w-3",xmlns:"http://www.w3.org/2000/svg",width:"17",height:"18",fill:"none",...e,children:[h.jsx("mask",{id:"mask0_174_2406",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"17",height:"18",children:h.jsx("path",{d:"M17 0.5H0V17.5H17V0.5Z",fill:"white"})}),h.jsxs("g",{mask:"url(#mask0_174_2406)",children:[h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.50773 10.6219C5.9653 10.6219 6.8755 10.5968 8.13362 10.0788C9.59973 9.47518 12.5166 8.37942 14.6208 7.2539C16.0924 6.46668 16.7375 5.42553 16.7375 4.02344C16.7375 2.07751 15.16 0.5 13.2141 0.5H5.06095C2.26586 0.5 0 2.76586 0 5.56095C0 8.35604 2.12151 10.6219 5.50773 10.6219Z",fill:"#39594D"}),h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.88672 14.107C6.88672 12.7369 7.71155 11.5016 8.97699 10.9764L11.5446 9.9108C14.1417 8.83294 17.0003 10.7415 17.0003 13.5535C17.0003 15.732 15.2339 17.4979 13.0553 17.4973L10.2754 17.4966C8.40372 17.4961 6.88672 15.9787 6.88672 14.107Z",fill:"#D18EE2"}),h.jsx("path",{d:"M2.91749 11.2891C1.30623 11.2891 0 12.5952 0 14.2065V14.5844C0 16.1956 1.30618 17.5018 2.91744 17.5018C4.5287 17.5018 5.83493 16.1956 5.83493 14.5844V14.2065C5.83493 12.5952 4.52875 11.2891 2.91749 11.2891Z",fill:"#FF7759"})]})]}),xxt=e=>h.jsxs("svg",{className:"h-3 w-3","data-testid":"geist-icon",height:"78",strokeLinejoin:"round",viewBox:"0 0 160 59",width:"104",style:{color:"currentcolor"},...e,children:[h.jsx("mask",{id:"mask0_4345_1846",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"160",height:"59",style:{maskType:"luminance"},children:h.jsx("path",{d:"M0.273438 0.219727H159.216V58.1817H0.273438V0.219727Z",fill:"white"})}),h.jsx("g",{mask:"url(#mask0_4345_1846)",children:h.jsx("path",{d:"M95.4635 0.314595C84.4822 0.314595 75.5599 9.19525 75.5599 20.1677C75.5599 31.1402 84.4632 40.0208 95.4635 40.0208C106.464 40.0208 115.367 31.1402 115.367 20.1677C115.348 9.21427 106.445 0.333611 95.4635 0.314595ZM95.4635 32.5664C88.6002 32.5664 83.0333 27.0136 83.0333 20.1677C83.0333 13.3218 88.6002 7.76902 95.4635 7.76902C102.327 7.76902 107.894 13.3218 107.894 20.1677C107.894 27.0136 102.327 32.5664 95.4635 32.5664ZM67.9912 0.39066C67.3049 0.314595 66.6376 0.276562 65.9513 0.276562C65.6081 0.276562 65.284 0.276562 64.9599 0.295578C64.6358 0.314595 64.2926 0.333611 63.9685 0.352628C62.634 0.44771 61.2995 0.675906 60.0031 1.03722C57.3531 1.74082 54.8556 2.99591 52.7013 4.68836C50.4898 6.43787 48.7358 8.68181 47.5347 11.23C46.9437 12.5041 46.5052 13.8543 46.2193 15.2234C46.0858 15.908 45.9905 16.5926 45.9142 17.2772C45.8952 17.6195 45.857 17.9618 45.857 18.3041L45.838 18.8175V19.293L45.8761 32.5854L45.9142 39.2221H53.3685L53.4067 32.5854L53.4448 19.293V18.5893C53.4448 18.3802 53.4829 18.171 53.4829 17.9618C53.5211 17.5434 53.5973 17.1441 53.6736 16.7257C53.8452 15.9271 54.093 15.1474 54.4362 14.4057C55.1225 12.9225 56.152 11.6293 57.4293 10.6025C58.7639 9.53755 60.3081 8.75787 61.9477 8.3205C62.7865 8.0923 63.6635 7.94017 64.5405 7.8641C64.7693 7.84509 64.979 7.82607 65.2078 7.82607C65.4365 7.82607 65.6653 7.80705 65.875 7.80705C66.2944 7.80705 66.7329 7.82607 67.1524 7.8641C68.8491 8.03525 70.4887 8.54869 71.9948 9.38541L75.7124 2.93886C73.3484 1.56968 70.7175 0.694923 67.9912 0.39066ZM20.3484 0.219513C9.36711 0.124431 0.36855 8.92902 0.273226 19.8825C0.177902 30.8359 9.00488 39.8116 19.9862 39.9067H26.8876V32.4713H20.3484C13.4851 32.5474 7.84193 27.0707 7.76567 20.2057C7.68941 13.3408 13.1801 7.73099 20.0624 7.65492H20.3484C27.2117 7.65492 32.7786 13.2077 32.8167 20.0536V38.3284C32.8167 45.1172 27.2689 50.651 20.4819 50.7271C17.2218 50.708 14.1142 49.3959 11.8265 47.0949L6.54553 52.3625C10.206 56.0326 15.1628 58.1244 20.3484 58.1625H20.6153C31.4632 58.0103 40.1757 49.2248 40.2329 38.4044V19.5592C39.966 8.81492 31.1391 0.238529 20.3484 0.219513ZM139.389 0.314595C128.407 0.314595 119.485 9.19525 119.504 20.1677C119.504 31.1212 128.407 40.0018 139.389 40.0018H146.195V32.5664H139.389C132.525 32.5664 126.958 27.0136 126.958 20.1677C126.958 13.3218 132.525 7.76902 139.389 7.76902C145.833 7.76902 151.209 12.6943 151.781 19.1028H151.762V57.2116H159.216V20.1677C159.216 9.21427 150.351 0.314595 139.389 0.314595Z",fill:"currentColor"})})]}),vxt=e=>h.jsx("svg",{className:"h-3 w-3",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1000 1000",width:"78",height:"78",style:{color:"currentcolor"},...e,children:h.jsxs("g",{children:[h.jsx("polygon",{fill:"currentColor",points:"226.83 411.15 501.31 803.15 623.31 803.15 348.82 411.15 226.83 411.15"}),h.jsx("polygon",{fill:"currentColor",points:"348.72 628.87 226.69 803.15 348.77 803.15 409.76 716.05 348.72 628.87"}),h.jsx("polygon",{fill:"currentColor",points:"651.23 196.85 440.28 498.12 501.32 585.29 773.31 196.85 651.23 196.85"}),h.jsx("polygon",{fill:"currentColor",points:"673.31 383.25 673.31 803.15 773.31 803.15 773.31 240.44 673.31 383.25"})]})}),wxt=e=>h.jsxs("svg",{className:"h-3 w-3",xmlns:"http://www.w3.org/2000/svg",width:"176",height:"162",viewBox:"0 0 176 162",fill:"none",...e,children:[h.jsx("rect",{x:"15",y:"1",width:"32",height:"32",fill:"#FFCD00",stroke:"#636363","stroke-opacity":"0.2","stroke-width":"0.5"}),h.jsx("rect",{x:"143",y:"1",width:"32",height:"32",fill:"#FFCD00",stroke:"#636363","stroke-opacity":"0.2","stroke-width":"0.5"}),h.jsx("rect",{x:"15",y:"33",width:"32",height:"32",fill:"#FFA400",stroke:"#636363","stroke-opacity":"0.2","stroke-width":"0.5"}),h.jsx("rect",{x:"47",y:"33",width:"32",height:"32",fill:"#FFA400",stroke:"#636363","stroke-opacity":"0.2","stroke-width":"0.5"}),h.jsx("rect",{x:"111",y:"33",width:"32",height:"32",fill:"#FFA400",stroke:"#636363","stroke-opacity":"0.2","stroke-width":"0.5"}),h.jsx("rect",{x:"143",y:"33",width:"32",height:"32",fill:"#FFA400",stroke:"#636363","stroke-opacity":"0.2","stroke-width":"0.5"}),h.jsx("rect",{x:"15",y:"65",width:"32",height:"32",fill:"#FF7100",stroke:"#636363","stroke-opacity":"0.2","stroke-width":"0.5"}),h.jsx("rect",{x:"47",y:"65",width:"32",height:"32",fill:"#FF7100",stroke:"#636363","stroke-opacity":"0.2","stroke-width":"0.5"}),h.jsx("rect",{x:"79",y:"65",width:"32",height:"32",fill:"#FF7100",stroke:"#636363","stroke-opacity":"0.2","stroke-width":"0.5"}),h.jsx("rect",{x:"111",y:"65",width:"32",height:"32",fill:"#FF7100",stroke:"#636363","stroke-opacity":"0.2","stroke-width":"0.5"}),h.jsx("rect",{x:"143",y:"65",width:"32",height:"32",fill:"#FF7100",stroke:"#636363","stroke-opacity":"0.2","stroke-width":"0.5"}),h.jsx("rect",{x:"15",y:"97",width:"32",height:"32",fill:"#FF4902",stroke:"#636363","stroke-opacity":"0.2","stroke-width":"0.5"}),h.jsx("rect",{x:"79",y:"97",width:"32",height:"32",fill:"#FF4902",stroke:"#636363","stroke-opacity":"0.2","stroke-width":"0.5"}),h.jsx("rect",{x:"143",y:"97",width:"32",height:"32",fill:"#FF4902",stroke:"#636363","stroke-opacity":"0.2","stroke-width":"0.5"}),h.jsx("rect",{x:"15",y:"129",width:"32",height:"32",fill:"#FF0006",stroke:"#636363","stroke-opacity":"0.2","stroke-width":"0.5"}),h.jsx("rect",{x:"143",y:"129",width:"32",height:"32",fill:"#FF0006",stroke:"#636363","stroke-opacity":"0.2","stroke-width":"0.5"}),h.jsx("rect",{y:"1",width:"16",height:"160",fill:"black"}),h.jsx("rect",{x:"63",y:"97",width:"16",height:"32",fill:"black"}),h.jsx("rect",{x:"95",y:"33",width:"16",height:"32",fill:"black"}),h.jsx("rect",{x:"127",y:"1",width:"16",height:"32",fill:"black"}),h.jsx("rect",{x:"127",y:"97",width:"16",height:"64",fill:"black"})]}),F0e=A.createContext({Link:A.forwardRef(()=>null)}),Sxt=({children:e,Link:t})=>h.jsx(F0e.Provider,{value:{Link:t},children:e}),BC=()=>{const e=A.useContext(F0e);if(!e)throw new Error("useLinkComponent must be used within a LinkComponentProvider");return e},Cxt={"openai.chat":h.jsx(fxt,{}),"anthropic.chat":h.jsx(pxt,{}),"anthropic.messages":h.jsx(mxt,{}),AZURE:h.jsx(gxt,{}),AMAZON:h.jsx(yxt,{}),GOOGLE:h.jsx($bt,{}),COHERE:h.jsx(bxt,{}),GROQ:h.jsx(xxt,{}),X_GROK:h.jsx(vxt,{}),MISTRAL:h.jsx(wxt,{})},kxt=({row:e})=>{const{Link:t}=BC();return h.jsx(SB,{icon:h.jsx(Nh,{}),name:h.jsx(t,{className:"w-full space-y-0",href:e.original.link,children:e.original.name}),description:e.original.instructions})},Ext=[{header:"Name",accessorKey:"name",cell:kxt},{header:"Model",accessorKey:"model",size:160,cell:({row:e})=>h.jsx(Dr,{children:h.jsx(Un,{variant:"default",icon:Cxt[e.original.provider]||h.jsx(zbt,{}),children:e.original.modelId||"N/A"})})},{size:160,header:"Tools",accessorKey:"tools",cell:({row:e})=>{const t=e.original.tools?Object.keys(e.original.tools).length:0;return h.jsx(Dr,{children:h.jsxs(Un,{variant:"default",icon:h.jsx(n0e,{}),children:[t," tool",t>1?"s":""]})})}}];function Dxt({agents:e,isLoading:t,onClickRow:n}){const r=A.useMemo(()=>Object.keys(e).map(a=>{const l=e[a];return{id:a,name:l.name,instructions:l.instructions,provider:l.provider,branch:void 0,executedAt:void 0,repoUrl:void 0,tools:l.tools,modelId:l.modelId,link:`/agents/${a}/chat/new`}}),[e]),s=TL({data:r,columns:Ext,getCoreRowModel:AL()});if(t)return h.jsx(Axt,{});const i=s.getHeaderGroups()[0],o=s.getRowModel().rows.concat();return o.length===0?h.jsx(Txt,{}):h.jsx(TB,{children:h.jsxs(hy,{children:[h.jsx(fy,{className:"sticky top-0",children:i.headers.map(a=>h.jsx(Xs,{style:{width:a.index===0?"auto":a.column.getSize()},children:Qb(a.column.columnDef.header,a.getContext())},a.id))}),h.jsx(Mh,{children:o.map(a=>h.jsx(jh,{onClick:()=>n(a.original.id),children:a.getVisibleCells().map(l=>h.jsx(Se.Fragment,{children:Qb(l.column.columnDef.cell,l.getContext())},l.id))},a.id))})]})})}const Axt=()=>h.jsxs(hy,{children:[h.jsxs(fy,{children:[h.jsx(Xs,{children:"Name"}),h.jsx(Xs,{width:160,children:"Model"}),h.jsx(Xs,{width:160,children:"Tools"})]}),h.jsx(Mh,{children:Array.from({length:3}).map((e,t)=>h.jsxs(jh,{children:[h.jsx(Dr,{children:h.jsx(as,{className:"h-4 w-1/2"})}),h.jsx(Dr,{width:160,children:h.jsx(as,{className:"h-4 w-1/2"})}),h.jsx(Dr,{width:160,children:h.jsx(as,{className:"h-4 w-1/2"})})]},t))})]}),Txt=()=>h.jsx("div",{className:"flex h-full items-center justify-center",children:h.jsx(LC,{iconSlot:h.jsx(Fbt,{}),titleSlot:"Configure Agents",descriptionSlot:"Mastra agents are not configured yet. You can find more information in the documentation.",actionSlot:h.jsxs(hn,{size:"lg",className:"w-full",variant:"light",as:"a",href:"https://mastra.ai/en/docs/agents/overview",target:"_blank",children:[h.jsx(ot,{children:h.jsx(Nh,{})}),"Docs"]})})}),_xt=()=>{const{runtimeContext:e,setRuntimeContext:t}=dy(),[n,r]=A.useState(""),s=RC(),{handleCopy:i}=IC({text:n}),o=JSON.stringify(e);A.useEffect(()=>{(async()=>{if(!DS(o)){Fo.error("Invalid JSON");return}const d=await ip(o);r(d)})()},[o]);const a=()=>{try{const u=JSON.parse(n);t(u),Fo.success("Runtime context saved successfully")}catch(u){console.error("error",u),Fo.error("Invalid JSON")}},l="text-icon3 hover:text-icon6",c=async()=>{if(!DS(n)){Fo.error("Invalid JSON");return}const u=await ip(n);r(u)};return h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center justify-between pb-2",children:[h.jsx(Ue,{as:"label",variant:"ui-md",className:"text-icon3",children:"Runtime Context (JSON)"}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsxs(Ta,{children:[h.jsx(_a,{asChild:!0,children:h.jsx("button",{onClick:c,className:l,children:h.jsx(ot,{children:h.jsx(aC,{})})})}),h.jsx(Vo,{children:"Format the Runtime Context JSON"})]}),h.jsxs(Ta,{children:[h.jsx(_a,{asChild:!0,children:h.jsx("button",{onClick:i,className:l,children:h.jsx(ot,{children:h.jsx(Dh,{})})})}),h.jsx(Vo,{children:"Copy Runtime Context"})]})]})]}),h.jsx(al,{value:n,onChange:r,theme:s,extensions:[Fu],className:"h-[400px] overflow-y-scroll bg-surface3 rounded-lg overflow-hidden p-3"}),h.jsx("div",{className:"flex justify-end pt-2",children:h.jsx(hn,{onClick:a,children:"Save"})})]})},Nxt=({children:e})=>{const{Link:t}=BC();return h.jsxs("div",{className:"max-w-3xl p-5 overflow-y-scroll h-full",children:[h.jsxs("div",{className:"rounded-lg p-4 pb-5 bg-surface4 shadow-md space-y-3 border border-border1 mb-5",children:[h.jsx(Ue,{as:"p",variant:"ui-lg",className:"text-icon3",children:"Mastra provides runtime context, which is a system based on dependency injection that enables you to configure your agents and tools with runtime variables. If you find yourself creating several different agents that do very similar things, runtime context allows you to combine them into one agent."}),h.jsxs(hn,{as:t,to:"https://mastra.ai/en/docs/agents/runtime-variables",target:"_blank",children:[h.jsx(ot,{children:h.jsx(Sle,{})}),"See documentation"]})]}),e]})},Pxt=e=>e;function Mxt({children:e,agentId:t,initialMessages:n,memory:r,threadId:s,modelSettings:i}){const[o,a]=A.useState(!1),[l,c]=A.useState(n||[]),[u,d]=A.useState(s),{frequencyPenalty:p,presencePenalty:g,maxRetries:b,maxSteps:x,maxTokens:S,temperature:E,topK:k,topP:T,instructions:P}=i;A.useEffect(()=>{(l.length===0||u!==s)&&n&&s&&r&&(c(n),d(s))},[n,s,r,l]);const j=Ku().getNetwork(t),I=GO({isRunning:o,messages:l,convertMessage:Pxt,onNew:async B=>{var W;if(((W=B.content[0])==null?void 0:W.type)!=="text")throw new Error("Only text messages are supported");const L=B.content[0].text;c($=>[...$,{role:"user",content:L}]),a(!0);try{let $=function(){c(z=>{const Y={role:"assistant",content:[{type:"text",text:Z}]};return q?[...z.slice(0,-1),Y]:(q=!0,[...z,Y])})};const J=await j.stream({messages:[{role:"user",content:L}],runId:t,frequencyPenalty:p,presencePenalty:g,maxRetries:b,maxSteps:x,maxTokens:S,temperature:E,topK:k,topP:T,instructions:P,...r?{threadId:s,resourceId:t}:{}});if(!J.body)throw new Error("No response body");const V=[];let Z="",G=null,q=!1;await GD({stream:J.body,onTextPart(z){G==null?(G={type:"text",text:z},V.push(G)):G.text+=z,Z+=z,$()},async onToolCallPart(z){console.log("Tool call received:",z),c(Y=>{const U=Y[Y.length-1];if(U&&U.role==="assistant"){const ne={...U,content:Array.isArray(U.content)?[...U.content,{type:"tool-call",toolCallId:z.toolCallId,toolName:z.toolName,args:z.args}]:[...typeof U.content=="string"?[{type:"text",text:U.content}]:[],{type:"tool-call",toolCallId:z.toolCallId,toolName:z.toolName,args:z.args}]};return[...Y.slice(0,-1),ne]}const X={role:"assistant",content:[{type:"text",text:Z},{type:"tool-call",toolCallId:z.toolCallId,toolName:z.toolName,args:z.args}]};return[...Y,X]})},async onToolResultPart(z){console.log("Tool call result received:",z),c(Y=>{const U=Y[Y.length-1];if(U&&U.role==="assistant"&&Array.isArray(U.content)){const X=U.content.map(H=>typeof H=="object"&&H.type==="tool-call"&&H.toolCallId===z.toolCallId?{...H,result:z.result}:H),ne={...U,content:X};return[...Y.slice(0,-1),ne]}return Y})},onErrorPart(z){throw new Error(z)}}),console.log(l),a(!1)}catch($){console.error("Error occurred in MastraRuntimeProvider",$),a(!1)}}});return h.jsxs($O,{runtime:I,children:[" ",e," "]})}function jxt({children:e}){const t=e.replace(/\\n/g,`
|
|
721
721
|
`);return h.jsx(cce,{remarkPlugins:[Ice],components:Ixt,className:"space-y-3",children:t})}const I0e=Se.memo(({children:e,language:t,...n})=>{const[r,s]=A.useState([]);return A.useEffect(()=>{Xbt(e,t).then(i=>{i&&s(i)})},[e,t]),r.length?h.jsx("pre",{...n,children:h.jsx("code",{children:r.map((i,o)=>h.jsxs(h.Fragment,{children:[h.jsx("span",{children:i.map((a,l)=>{const c=typeof a.htmlStyle=="string"?void 0:a.htmlStyle;return h.jsx("span",{className:"text-shiki-light bg-shiki-light-bg dark:text-shiki-dark dark:bg-shiki-dark-bg",style:c,children:a.content},l)})},o),o!==r.length-1&&`
|
|
722
722
|
`]}))})}):h.jsx("pre",{...n,children:e})});I0e.displayName="HighlightedCode";const Fxt=({children:e,className:t,language:n,...r})=>{const s=typeof e=="string"?e:Jj(e),i=Ve("overflow-x-scroll rounded-md border bg-background/50 p-4 font-mono text-sm [scrollbar-width:none]",t);return h.jsxs("div",{className:"group/code relative mb-4",children:[h.jsx(A.Suspense,{fallback:h.jsx("pre",{className:i,...r,children:e}),children:h.jsx(I0e,{language:n,className:i,children:s})}),h.jsx("div",{className:"invisible absolute right-2 top-2 flex space-x-1 rounded-lg p-1 opacity-0 transition-all duration-200 group-hover/code:visible group-hover/code:opacity-100",children:h.jsx(dg,{content:s,copyMessage:"Copied code to clipboard"})})]})};function Jj(e){var t;if(typeof e=="string")return e;if((t=e==null?void 0:e.props)!=null&&t.children){let n=e.props.children;return Array.isArray(n)?n.map(r=>Jj(r)).join(""):Jj(n)}return""}const Ixt={h1:({children:e,...t})=>h.jsx("h1",{className:"text-2xl font-semibold",...t,children:e}),h2:({children:e,...t})=>h.jsx("h2",{className:"font-semibold text-xl",...t,children:e}),h3:({children:e,...t})=>h.jsx("h3",{className:"font-semibold text-lg",...t,children:e}),h4:({children:e,...t})=>h.jsx("h4",{className:"font-semibold text-base",...t,children:e}),h5:({children:e,...t})=>h.jsx("h5",{className:"font-medium",...t,children:e}),strong:({children:e,...t})=>h.jsx("strong",{className:"font-semibold",...t,children:e}),a:({children:e,...t})=>h.jsx("a",{className:"underline underline-offset-2",...t,children:e}),blockquote:({children:e,...t})=>h.jsx("blockquote",{className:"border-l-2 border-primary pl-4",...t,children:e}),code:({children:e,className:t,...n})=>{const r=/language-(\w+)/.exec(t||"");return r?h.jsx(Fxt,{className:t,language:r[1],...n,children:e}):h.jsx("code",{className:Ve("font-mono [:not(pre)>&]:rounded-md [:not(pre)>&]:bg-background/50 [:not(pre)>&]:px-1 [:not(pre)>&]:py-0.5"),...n,children:e})},pre:({children:e})=>e,ol:({children:e,...t})=>h.jsx("ol",{className:"list-decimal space-y-2 pl-6",...t,children:e}),ul:({children:e,...t})=>h.jsx("ul",{className:"list-disc space-y-2 pl-6",...t,children:e}),li:({children:e,...t})=>h.jsx("li",{className:"my-1.5",...t,children:e}),table:({children:e,...t})=>h.jsx("table",{className:"w-full border-collapse overflow-y-auto rounded-md border border-foreground/20",...t,children:e}),th:({children:e,...t})=>h.jsx("th",{className:"border border-foreground/20 px-4 py-2 text-left font-bold [&[align=center]]:text-center [&[align=right]]:text-right",...t,children:e}),td:({children:e,...t})=>h.jsx("td",{className:"border border-foreground/20 px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right",...t,children:e}),tr:({children:e,...t})=>h.jsx("tr",{className:"m-0 border-t p-0 even:bg-muted",...t,children:e}),p:({children:e,...t})=>h.jsx("p",{className:"whitespace-pre-wrap leading-relaxed",...t,children:e}),hr:({...e})=>h.jsx("hr",{className:"border-foreground/20",...e})},Sm={bg:"bg-[rgba(124,80,175,0.25)]",text:"text-[rgb(180,140,230)]",hover:"hover:text-[rgb(200,160,250)]"},Oxt=e=>{const{toolCallId:t,toolName:n,args:r,argsText:s,result:i,status:o}=e,[a,l]=A.useState({}),c=(r==null?void 0:r.actions)||[];if(c.length===0)return null;const u=p=>{l(g=>({...g,[p]:!g[p]}))},d=p=>{if(typeof p!="string")return[];const g=/(https?:\/\/[^\s]+)/g;return p.match(g)||[]};return h.jsx("div",{className:"mb-4 w-full rounded-lg border border-gray-700 overflow-hidden shadow-md",children:c.map((p,g)=>{var E;const b=`${t||"tool"}-${p.agent}-${g}`,x=a[b]||!1,S=i?d(i):[];return h.jsxs("div",{className:`border-b border-gray-700 ${g===c.length-1?"border-b-0":""}`,children:[h.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-gray-900 hover:bg-gray-800 cursor-pointer",onClick:()=>u(b),children:[h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx("div",{className:Ve("flex h-6 w-6 items-center justify-center rounded-full",Sm.bg),children:(o==null?void 0:o.type)==="running"?h.jsx(Da,{className:Ve("h-4 w-4 animate-spin",Sm.text)}):h.jsx(kh,{className:Ve("h-4 w-4",Sm.text)})}),h.jsx("div",{children:h.jsx("p",{className:"font-medium text-sm text-gray-100",children:(E=p.agent)==null?void 0:E.replaceAll("_"," ")})})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("span",{className:Ve("text-xs px-2 py-1 rounded-full",Sm.bg,Sm.text),children:(o==null?void 0:o.type)==="running"?"Processing...":"Complete"}),x?h.jsx(lC,{className:"h-4 w-4 text-gray-300"}):h.jsx(Eh,{className:"h-4 w-4 text-gray-300"})]})]}),x&&h.jsxs("div",{className:"px-4 py-3 bg-[#111]",children:[h.jsxs("div",{className:"mb-3",children:[h.jsx("p",{className:"text-xs font-semibold text-gray-300 mb-1",children:"Query:"}),h.jsx("div",{className:"p-2 bg-gray-900 rounded border border-gray-700",children:h.jsx("p",{className:"text-sm text-gray-200 whitespace-pre-wrap",children:p.input})})]}),i&&h.jsxs("div",{children:[h.jsx("p",{className:"text-xs font-semibold text-gray-300 mb-1",children:"Result:"}),h.jsx("div",{className:"p-2 bg-gray-900 rounded border border-gray-700 max-h-60 overflow-auto",children:typeof i=="string"?h.jsx("div",{className:"text-sm text-gray-200",children:h.jsx(jxt,{children:i})}):h.jsx("p",{className:"text-sm text-gray-200 whitespace-pre-wrap",children:JSON.stringify(i,null,2)})}),S.length>0&&h.jsxs("div",{className:"mt-2",children:[h.jsx("p",{className:"text-xs font-semibold text-gray-300 mb-1",children:"Sources:"}),h.jsxs("div",{className:"flex flex-wrap gap-2",children:[S.slice(0,3).map((k,T)=>h.jsxs("a",{href:k,target:"_blank",rel:"noopener noreferrer",className:Ve("inline-flex items-center gap-1 text-xs hover:underline",Sm.text,Sm.hover),children:[h.jsxs("span",{children:["Source ",T+1]}),h.jsx(Sle,{className:"h-3 w-3"})]},T)),S.length>3&&h.jsxs("span",{className:"text-xs text-gray-400",children:["+",S.length-3," more"]})]})]})]})]})]},b)})})},cQ={maxRetries:2,maxSteps:5,temperature:.5,topP:1},$C=A.createContext({});function O0e({children:e}){const[t,n]=A.useState(cQ),[r,s]=A.useState(!1),[i,o]=A.useState(void 0),a=()=>{n(cQ),s(!1),o(void 0)};return h.jsx($C.Provider,{value:{modelSettings:t,setModelSettings:n,resetModelSettings:a,chatWithLoop:r,setChatWithLoop:s,maxIterations:i,setMaxIterations:o},children:e})}const Rxt=({agentId:e,memory:t})=>{const{modelSettings:n}=A.useContext($C);return h.jsx(Mxt,{agentId:e,memory:t,modelSettings:n,children:h.jsx(y0e,{ToolFallback:Oxt})})},R0e=A.createContext(void 0),Lxt=({children:e})=>{const[t,n]=A.useState({}),{chatWithLoop:r}=A.useContext($C),s=(i,o)=>{var c,u;const a=r&&o.type==="step-finish"&&((c=o.payload)==null?void 0:c.id)==="final-step"||o.type==="error";let l=(o==null?void 0:o.type)==="finish"?"finish":o.type==="start"?"start":(u=o.payload)==null?void 0:u.id;l!=null&&l.includes("mapping_")||n(d=>{var S,E,k,T,P,M;const p=d[i];o.type==="error"&&(l=(S=p==null?void 0:p.executionSteps)==null?void 0:S[(p==null?void 0:p.executionSteps.length)-1]);const g=(k=(E=p==null?void 0:p.steps)==null?void 0:E[l])==null?void 0:k.metadata;let b=g==null?void 0:g.startTime,x=g==null?void 0:g.endTime;return o.type==="step-start"&&(b=Date.now()),(o.type==="step-finish"||o.type==="error")&&(x=Date.now()),{...d,[i]:{...p,runId:(p==null?void 0:p.runId)||((T=o==null?void 0:o.payload)==null?void 0:T.runId),executionSteps:(P=p==null?void 0:p.steps)!=null&&P[l]?[...p==null?void 0:p.executionSteps,...a?["finish"]:[]]:[...(p==null?void 0:p.executionSteps)||[],l],steps:{...p==null?void 0:p.steps,[l]:{...((M=p==null?void 0:p.steps)==null?void 0:M[l])||{},[o.type]:o.payload||(o==null?void 0:o.error),metadata:{startTime:b,endTime:x}}}}}})};return h.jsx(R0e.Provider,{value:{state:t,handleStep:s,setState:n},children:e})},_B=()=>{const e=A.useContext(R0e);if(e===void 0)throw new Error("useVNextNetworkChat must be used within a VNextNetworkChatProvider");return e},NB=({startedAt:e,endedAt:t})=>{const[n,r]=A.useState(e);A.useEffect(()=>{const i=setInterval(()=>{r(Date.now())},100);return()=>clearInterval(i)},[e]);const s=t?t-e:n-e;return h.jsxs("span",{className:"text-xs text-icon3",children:[ES(s,3),"ms"]})},L0e=e=>e.replace(/[-_\s]+(.)?/g,(n,r)=>r?r.toUpperCase():"").replace(/^(.)/,n=>n.toLowerCase()).replace(/([A-Z])/g," $1").replace(/^./,n=>n.toUpperCase()).trim();function uQ(e,t){let n=[];if(!e)return n;function r(s,i){if(typeof s=="string")n.push({type:t,fnString:s});else{const o=Object.entries(s).find(([a])=>a.includes("."));if(o){const[a,l]=o,[c,...u]=a.split("."),d={step:{id:c},path:u.join(".")};n.push({type:t,ref:d,query:{[l===!0||l===!1?"is":"eq"]:String(l)},conj:i})}if("ref"in s){const{ref:a,query:l}=s;n.push({type:t,ref:a,query:l,conj:i})}if("and"in s)for(const a of s.and)r({...a},"and");if("or"in s)for(const a of s.or)r({...a},"or");"not"in s&&r({...s.not},"not")}}return r(e),n.reverse()}const Zj=(e,t)=>{var i,o;const n=new bZ.graphlib.Graph().setDefaultEdgeLabel(()=>({}));n.setGraph({rankdir:"TB"}),t.forEach(a=>n.setEdge(a.source,a.target)),e.forEach(a=>{var l,c,u;return n.setNode(a.id,{...a,width:((l=a.measured)==null?void 0:l.width)??274,height:((c=a.measured)==null?void 0:c.height)??((u=a==null?void 0:a.data)!=null&&u.isLarge?260:100)})}),bZ.layout(n);const r=(i=n.graph())!=null&&i.width?n.graph().width/2:0,s=(o=n.graph())!=null&&o.height?n.graph().height/2:0;return{nodes:e.map(a=>{var g,b,x;const l=n.node(a.id),c=l.x-(((g=a.measured)==null?void 0:g.width)??274)/2,u=l.y-(((b=a.measured)==null?void 0:b.height)??((x=a==null?void 0:a.data)!=null&&x.isLarge?260:100))/2;return{...a,position:{x:c,y:u}}}),edges:t,fullWidth:r,fullHeight:s}},Ps={animated:!0,markerEnd:{type:bS.ArrowClosed,width:20,height:20,color:"#8e8e8e"}},B0e=({stepGraph:e,stepSubscriberGraph:t,steps:n={}})=>{var u;if(!e)return{nodes:[],edges:[]};const{initial:r,...s}=e;if(!r.length)return{nodes:[],edges:[]};let i=[],o=[],a=[];for(const[d,p]of r.entries()){const b=p.step.id,x=[p,...(s==null?void 0:s[b])||[]].reduce((T,P,M)=>{var $,J,V,Z;const{stepGraph:j,stepSubscriberGraph:F}=n[P.step.id]||{},I=!!j,B=i.some(G=>G.id===P.step.id)?`${P.step.id}-${M}`:P.step.id;let L={...P.step,label:P.step.id,originalId:P.step.id,type:I?"nested-node":"default-node",id:B,stepGraph:j,stepSubscriberGraph:F},W="when";if(($=P.config)!=null&&$.serializedWhen){W=(J=P.step.id)!=null&&J.endsWith("_if")?"if":(V=P.step.id)!=null&&V.endsWith("_else")?"else":"when";const G=uQ(P.config.serializedWhen,W),q={id:crypto.randomUUID(),conditions:G,type:"condition-node",isLarge:((G==null?void 0:G.length)>1||G.some(({fnString:z})=>!!z))&&W!=="else"};T.push(q)}return(W==="if"||W==="else")&&(L={...L,label:W==="if"?"start if":"start else"}),L={...L,label:((Z=P.config)==null?void 0:Z.loopLabel)||L.label},T.push(L),T},[]);a=[...a,...x];const S=[...x].map((T,P)=>{const M=t==null?void 0:t[T.id];return{id:T.id,position:{x:d*300,y:P*100},type:T.type,data:{conditions:T.conditions,label:T.label,description:T.description,withoutTopHandle:M!=null&&M[T.id]?!1:P===0,withoutBottomHandle:M?!1:P===x.length-1,isLarge:T.isLarge,stepGraph:T.stepGraph,stepSubscriberGraph:T.stepSubscriberGraph}}});i=[...i,...S];const k=[...x].slice(0,-1).map((T,P)=>({id:`e${T.id}-${x[P+1].id}`,source:T.id,target:x[P+1].id,...Ps}));o=[...o,...k]}if(!t||!Object.keys(t).length){const{nodes:d,edges:p}=Zj(i,o);return{nodes:d,edges:p}}for(const[d,p]of Object.entries(t)){const{initial:g,...b}=p;let x;const S=[];let E,k;if(g.length){for(const[T,P]of g.entries()){const j=P.step.id,F=[P,...(b==null?void 0:b[j])||[]].reduce((Y,U,X)=>{var pe,ye,Te,Ee,_e,Fe,tt,nt;const{stepGraph:ne,stepSubscriberGraph:H}=n[U.step.id]||{},ee=!!ne,ie=i.some(Dt=>Dt.id===U.step.id)?`${U.step.id}-${X}`:U.step.id;let se={...U.step,originalId:U.step.id,label:U.step.id,type:ee?"nested-node":"default-node",id:ie,stepGraph:ne,stepSubscriberGraph:H},ae="when";const le=(ye=(pe=U.config)==null?void 0:pe.loopLabel)==null?void 0:ye.endsWith("loop finished");if((Te=U.config)!=null&&Te.serializedWhen&&!le){ae=(Ee=U.step.id)!=null&&Ee.endsWith("_if")?"if":(_e=U.step.id)!=null&&_e.endsWith("_else")?"else":((Fe=U.config)==null?void 0:Fe.loopType)??"when";const Dt=uQ(U.config.serializedWhen,ae),Gt={id:crypto.randomUUID(),conditions:Dt,type:"condition-node",isLarge:((Dt==null?void 0:Dt.length)>1||Dt.some(({fnString:tn})=>!!tn))&&ae!=="else"};(ae==="until"||ae==="while")&&(x=Gt.id),Y.push(Gt)}if(le){const Dt={id:crypto.randomUUID(),type:"loop-result-node",loopType:"finished",loopResult:U.config.loopType==="until"};S.push(Dt),Y.push(Dt)}if(!le&&((tt=U.config)!=null&&tt.loopType)){const Dt={id:crypto.randomUUID(),type:"loop-result-node",loopType:U.config.loopType,loopResult:U.config.loopType!=="until"};S.push(Dt),Y.push(Dt)}return(ae==="if"||ae==="else")&&(se={...se,label:ae==="if"?"start if":"start else"}),U.config.loopType&&(le?E=se:k=se),se={...se,loopType:le?"finished":U.config.loopType,label:((nt=U.config)==null?void 0:nt.loopLabel)||se.label},Y.push(se),Y},[]);let I=[],B=d!=null&&d.includes("&&")?d.split("&&"):[];d!=null&&d.includes("&&")&&(I=[{id:d,label:d,type:"after-node",steps:B}]);const L=[...F,...I].map((Y,U)=>{const X=t==null?void 0:t[Y.id],ne=Y.originalId===d||X;return{id:Y.id,position:{x:T*300+300,y:U*100+100},type:Y.type,data:{conditions:Y.conditions,label:Y.label,description:Y.description,result:Y.loopResult,loopType:Y.loopType,steps:Y.steps,withoutBottomHandle:ne?!1:U===F.length-1,isLarge:Y.isLarge,stepGraph:Y.stepGraph,stepSubscriberGraph:Y.stepSubscriberGraph}}});i=[...i,...L].map(Y=>({...Y,data:{...Y.data,withoutBottomHandle:B.includes(Y.id)?!1:Y.data.withoutBottomHandle}}));const W=[...F].slice(0,-1),$=F[0],J=F[F.length-1],V=B==null?void 0:B.map(Y=>({id:`e${Y}-${d}`,source:Y,target:d,...Ps})),Z=S==null?void 0:S.find(Y=>Y.loopType==="finished"),G=(u=W.map((Y,U)=>({id:`e${Y.id}-${F[U+1].id}`,source:Y.id,target:F[U+1].id,remove:(Z==null?void 0:Z.id)===F[U+1].id,...Ps})))==null?void 0:u.filter(Y=>!Y.remove),q=d===$.id?[]:[{id:`e${d}-${$.id}`,source:d,target:$.id,remove:(Z==null?void 0:Z.id)===$.id,...Ps}].filter(Y=>!Y.remove),z=J.originalId===d?[{id:`e${J.id}-${d}`,source:J.id,target:d,...Ps}]:[];o=[...o,...V,...q,...G,...z],a=[...a,...F]}if(x&&S.length&&E&&k){const T=S.map(I=>({id:`e${x}-${I.id}`,source:x,target:I.id,...Ps})),P=S==null?void 0:S.find(I=>I.loopType==="finished"),M=S==null?void 0:S.find(I=>I.loopType!=="finished"),j={id:`e${M==null?void 0:M.id}-${k==null?void 0:k.id}`,source:M==null?void 0:M.id,target:k.id,...Ps},F={id:`e${P==null?void 0:P.id}-${E==null?void 0:E.id}`,source:P==null?void 0:P.id,target:E.id,...Ps};o=[...o,...T,j,F]}}}const{nodes:l,edges:c}=Zj(i,o);return{nodes:l,edges:c}},Qj=({stepFlow:e,xIndex:t,yIndex:n,prevNodeIds:r,prevStepIds:s,nextStepFlow:i,condition:o,allPrevNodeIds:a})=>{var u;let l=[],c=[];if(((i==null?void 0:i.type)==="step"||(i==null?void 0:i.type)==="foreach"||(i==null?void 0:i.type)==="loop"||(i==null?void 0:i.type)==="waitForEvent")&&(l=[a!=null&&a.includes(i.step.id)?`${i.step.id}-${n+1}`:i.step.id],c=[i.step.id]),((i==null?void 0:i.type)==="sleep"||(i==null?void 0:i.type)==="sleepUntil")&&(l=[a!=null&&a.includes(i.id)?`${i.id}-${n+1}`:i.id],c=[i.id]),(i==null?void 0:i.type)==="parallel"&&(l=(i==null?void 0:i.steps.map(d=>{const p=d.step.id;return a!=null&&a.includes(p)?`${p}-${n+1}`:p}))||[],c=(i==null?void 0:i.steps.map(d=>d.step.id))||[]),(i==null?void 0:i.type)==="conditional"&&(l=(i==null?void 0:i.serializedConditions.map(d=>d.id))||[],c=((u=i==null?void 0:i.steps)==null?void 0:u.map(d=>d.step.id))||[]),e.type==="step"||e.type==="foreach"||e.type==="waitForEvent"){const d=e.step.component==="WORKFLOW",p=a!=null&&a.includes(e.step.id)?`${e.step.id}-${n}`:e.step.id,g=[...o?[{id:o.id,position:{x:t*300,y:n*100},type:"condition-node",data:{label:o.id,previousStepId:s[s.length-1],nextStepId:e.step.id,withoutTopHandle:!1,withoutBottomHandle:!l.length,isLarge:!0,conditions:[{type:"when",fnString:o.fn}]}}]:[],{id:p,position:{x:t*300,y:(n+(o?1:0))*100},type:d?"nested-node":"default-node",data:{label:e.step.id,description:e.step.description,withoutTopHandle:o?!1:!r.length,withoutBottomHandle:!l.length,stepGraph:d?e.step.serializedStepFlow:void 0,mapConfig:e.step.mapConfig,...e.type==="waitForEvent"?{event:e.event}:{}}}],b=[...r.length?o?[...r.map((x,S)=>({id:`e${x}-${o.id}`,source:x,data:{previousStepId:s[S],nextStepId:e.step.id},target:o.id,...Ps})),{id:`e${o.id}-${p}`,source:o.id,data:{previousStepId:s[s.length-1],nextStepId:e.step.id},target:p,...Ps}]:r.map((x,S)=>({id:`e${x}-${p}`,source:x,data:{previousStepId:s[S],nextStepId:e.step.id},target:p,...Ps})):[],...l.length?l.map((x,S)=>({id:`e${p}-${x}`,source:p,data:{previousStepId:e.step.id,nextStepId:c[S]},target:x,...Ps})):[]];return{nodes:g,edges:b,nextPrevNodeIds:[p],nextPrevStepIds:[e.step.id]}}if(e.type==="sleep"||e.type==="sleepUntil"){const d=a!=null&&a.includes(e.id)?`${e.id}-${n}`:e.id,p=[...o?[{id:o.id,position:{x:t*300,y:n*100},type:"condition-node",data:{label:o.id,previousStepId:s[s.length-1],nextStepId:e.id,withoutTopHandle:!1,withoutBottomHandle:!l.length,isLarge:!0,conditions:[{type:"when",fnString:o.fn}]}}]:[],{id:d,position:{x:t*300,y:(n+(o?1:0))*100},type:"default-node",data:{label:e.id,withoutTopHandle:o?!1:!r.length,withoutBottomHandle:!l.length,...e.type==="sleepUntil"?{date:e.date}:{duration:e.duration}}}],g=[...r.length?o?[...r.map((b,x)=>({id:`e${b}-${o.id}`,source:b,data:{previousStepId:s[x],nextStepId:e.id},target:o.id,...Ps})),{id:`e${o.id}-${d}`,source:o.id,data:{previousStepId:s[s.length-1],nextStepId:e.id},target:d,...Ps}]:r.map((b,x)=>({id:`e${b}-${d}`,source:b,data:{previousStepId:s[x],nextStepId:e.id},target:d,...Ps})):[],...l.length?l.map((b,x)=>({id:`e${d}-${b}`,source:d,data:{previousStepId:e.id,nextStepId:c[x]},target:b,...Ps})):[]];return{nodes:p,edges:g,nextPrevNodeIds:[d],nextPrevStepIds:[e.id]}}if(e.type==="loop"){const{step:d,serializedCondition:p,loopType:g}=e,b=d.component==="WORKFLOW",x=[{id:d.id,position:{x:t*300,y:n*100},type:b?"nested-node":"default-node",data:{label:d.id,description:d.description,withoutTopHandle:!r.length,withoutBottomHandle:!1,stepGraph:b?d.serializedStepFlow:void 0}},{id:p.id,position:{x:t*300,y:(n+1)*100},type:"condition-node",data:{label:p.id,previousStepId:d.id,nextStepId:c[0],withoutTopHandle:!1,withoutBottomHandle:!l.length,isLarge:!0,conditions:[{type:g,fnString:p.fn}]}}],S=[...r.length?r.map((E,k)=>({id:`e${E}-${d.id}`,source:E,data:{previousStepId:s[k],nextStepId:d.id},target:d.id,...Ps})):[],{id:`e${d.id}-${p.id}`,source:d.id,data:{previousStepId:d.id,nextStepId:c[0]},target:p.id,...Ps},...l.length?l.map((E,k)=>({id:`e${p.id}-${E}`,source:p.id,data:{previousStepId:d.id,nextStepId:c[k]},target:E,...Ps})):[]];return{nodes:x,edges:S,nextPrevNodeIds:[p.id],nextPrevStepIds:[d.id]}}if(e.type==="parallel"){let d=[],p=[],g=[];return e.steps.forEach((b,x)=>{const{nodes:S,edges:E,nextPrevStepIds:k}=Qj({stepFlow:b,xIndex:x,yIndex:n,prevNodeIds:r,prevStepIds:s,nextStepFlow:i,allPrevNodeIds:a});d.push(...S),p.push(...E),g.push(...k)}),{nodes:d,edges:p,nextPrevNodeIds:d.map(b=>b.id),nextPrevStepIds:g}}if(e.type==="conditional"){let d=[],p=[],g=[];return e.steps.forEach((b,x)=>{const{nodes:S,edges:E,nextPrevStepIds:k}=Qj({stepFlow:b,xIndex:x,yIndex:n,prevNodeIds:r,prevStepIds:s,nextStepFlow:i,condition:e.serializedConditions[x],allPrevNodeIds:a});d.push(...S),p.push(...E),g.push(...k)}),{nodes:d,edges:p,nextPrevNodeIds:d.filter(({type:b})=>b!=="condition-node").map(b=>b.id),nextPrevStepIds:g}}return{nodes:[],edges:[],nextPrevNodeIds:[],nextPrevStepIds:[]}},$0e=({stepGraph:e})=>{if(!e)return{nodes:[],edges:[]};if(e.length===0)return{nodes:[],edges:[]};let t=[],n=[],r=[],s=[],i=[];for(let l=0;l<e.length;l++){const{nodes:c,edges:u,nextPrevNodeIds:d,nextPrevStepIds:p}=Qj({stepFlow:e[l],xIndex:l,yIndex:l,prevNodeIds:r,prevStepIds:s,nextStepFlow:l===e.length-1?void 0:e[l+1],allPrevNodeIds:i});t.push(...c),n.push(...u),r=d,s=p,i.push(...r)}const{nodes:o,edges:a}=Zj(t,n);return{nodes:o,edges:a}},Bxt=V1("block",{variants:{variant:{primary:"text-text",secondary:"text-text-dim"},size:{default:"text-base",xs:"text-xs",sm:"text-sm",md:"text-md",lg:"text-lg",xl:"text-xl","2xl":"text-2xl"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{variant:"primary",size:"default",weight:"normal"}}),Ru=({className:e,weight:t,variant:n,as:r="span",size:s,...i})=>h.jsx(r,{className:Ve(Bxt({size:s,variant:n,weight:t,className:e})),...i}),N4=A.forwardRef(({className:e,children:t,viewPortClassName:n,maxHeight:r,autoScroll:s=!1,...i},o)=>{const a=A.useRef(null);return vB(a,{enabled:s}),h.jsxs(y4,{ref:o,className:Ve("relative overflow-hidden",e),...i,children:[h.jsx(dge,{ref:a,className:Ve("h-full w-full rounded-[inherit] [&>div]:!block",n),style:r?{maxHeight:r}:void 0,children:t}),h.jsx(z0e,{}),h.jsx(hge,{})]})});N4.displayName=y4.displayName;const z0e=A.forwardRef(({className:e,orientation:t="vertical",...n},r)=>h.jsx(TC,{ref:r,orientation:t,className:Ve("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:h.jsx(KL,{className:"relative flex-1 rounded-full bg-border"})}));z0e.displayName=TC.displayName;function dQ(e){const t=e.runId,n={},r=e.context||{};return Object.entries(r).forEach(([i,o])=>{if(i!=="input"&&"status"in o){const a=o;n[i]={status:a.status,output:"output"in a?a.output:void 0,payload:"payload"in a?a.payload:void 0,resumePayload:"resumePayload"in a?a.resumePayload:void 0,error:"error"in a?a.error:void 0,startedAt:"startedAt"in a?a.startedAt:Date.now(),endedAt:"endedAt"in a?a.endedAt:void 0,suspendedAt:"suspendedAt"in a?a.suspendedAt:void 0,resumedAt:"resumedAt"in a?a.resumedAt:void 0}}}),{type:"watch",payload:{workflowState:{status:$xt(n),steps:n,result:e.value,payload:r.input,error:void 0}},eventTimestamp:new Date(e.timestamp),runId:t}}function $xt(e){const t=Object.values(e).map(n=>n.status);return t.includes("failed")?"failed":t.includes("suspended")?"suspended":t.every(n=>n==="success")?"success":"running"}const zC=A.createContext({});function PB({children:e,snapshot:t}){const[n,r]=A.useState(null),[s,i]=A.useState(()=>t?dQ(t):null),[o,a]=A.useState(null),l=()=>{r(null),i(null),a(null)};return A.useEffect(()=>{t!=null&&t.runId?i(dQ(t)):i(null)},[(t==null?void 0:t.runId)??""]),h.jsx(zC.Provider,{value:{legacyResult:n,setLegacyResult:r,result:s,setResult:i,payload:o,setPayload:a,clearData:l,snapshot:t},children:e})}const HC=()=>{var r,s,i,o;const e=A.useContext(zC),t=((i=(s=(r=e.result)==null?void 0:r.payload)==null?void 0:s.workflowState)==null?void 0:i.steps)??{};return{steps:Object.entries(t).reduce((a,[l,c])=>({...a,[l]:{error:c.error,startedAt:c.startedAt,endedAt:c.endedAt,status:c.status,output:c.output,input:c.payload,resumeData:c.resumePayload}}),{}),isRunning:!!e.payload,runId:(o=e.result)==null?void 0:o.runId}},Dv=({data:e})=>{const t=RC();if(typeof e!="string")return h.jsxs("div",{className:"max-h-[500px] overflow-auto relative p-4",children:[h.jsx("div",{className:"absolute right-2 top-2 bg-surface4 rounded-full z-10",children:h.jsx(dg,{content:JSON.stringify(e,null,2)})}),h.jsx("div",{className:"bg-surface4 rounded-lg p-4",children:h.jsx(al,{value:JSON.stringify(e,null,2),theme:t,extensions:[Fu]})})]});try{const n=JSON.parse(e);return h.jsxs("div",{className:"max-h-[500px] overflow-auto relative p-4",children:[h.jsx("div",{className:"absolute right-2 top-2 bg-surface4 rounded-full z-10",children:h.jsx(dg,{content:e})}),h.jsx("div",{className:"bg-surface4 rounded-lg p-4",children:h.jsx(al,{value:JSON.stringify(n,null,2),theme:t,extensions:[Fu]})})]})}catch{return h.jsxs("div",{className:"max-h-[500px] overflow-auto relative p-4",children:[h.jsx("div",{className:"absolute right-2 top-2 bg-surface4 rounded-full z-10",children:h.jsx(dg,{content:e})}),h.jsx("div",{className:"bg-surface4 rounded-lg p-4",children:h.jsx(al,{value:e,theme:t,extensions:[]})})]})}},zxt=({event:e,runId:t,onSendEvent:n})=>{const[r,s]=A.useState(""),[i,o]=A.useState(!1),[a,l]=A.useState(null),c=RC(),{handleCopy:u}=IC({text:r}),d=async()=>{let b;o(!0),l(null);try{l(null),b=JSON.parse(r)}catch{l("Invalid JSON"),o(!1);return}try{l(null);const x=await n({event:e,data:b,runId:t});Fo.success(x.message)}catch(x){console.error("Error sending event",x),l("Error sending event")}finally{o(!1)}},p="text-icon3 hover:text-icon6",g=async()=>{if(l(null),!DS(r)){l("Invalid JSON");return}const b=await ip(r);s(b)};return h.jsxs(FC,{children:[h.jsxs("div",{className:"space-y-2",children:[h.jsxs("div",{className:"flex items-center justify-between pb-2",children:[h.jsx(Ue,{as:"label",variant:"ui-md",className:"text-icon3",children:"Event data (JSON)"}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsxs(Ta,{children:[h.jsx(_a,{asChild:!0,children:h.jsx("button",{onClick:g,className:p,children:h.jsx(ot,{children:h.jsx(aC,{})})})}),h.jsx(Vo,{children:"Format the event data JSON"})]}),h.jsxs(Ta,{children:[h.jsx(_a,{asChild:!0,children:h.jsx("button",{onClick:u,className:p,children:h.jsx(ot,{children:h.jsx(Dh,{})})})}),h.jsx(Vo,{children:"Copy event data"})]})]})]}),h.jsx(al,{value:r,onChange:s,theme:c,extensions:[Fu],className:"h-[400px] overflow-y-scroll bg-surface3 rounded-lg overflow-hidden p-3"}),a&&h.jsx(Ue,{variant:"ui-md",className:"text-accent2",children:a})]}),h.jsx("div",{className:"flex justify-end pt-4",children:h.jsx(hn,{onClick:d,disabled:i,children:i?h.jsx(Da,{className:"w-4 h-4 animate-spin"}):"Send"})})]})},MB=({input:e,output:t,resumeData:n,error:r,mapConfig:s,stepName:i,event:o,onShowTrace:a,onShowNestedGraph:l,onSendEvent:c,runId:u})=>{const[d,p]=A.useState(!1),[g,b]=A.useState(!1),[x,S]=A.useState(!1),[E,k]=A.useState(!1),[T,P]=A.useState(!1),[M,j]=A.useState(!1),F="bg-surface2 rounded-lg border-sm border-border1 max-w-4xl w-full px-0",I="border-b-sm border-border1 pb-4 px-6",B=o&&c&&u;return h.jsx(h.Fragment,{children:(e||t||r||s||n||l||B)&&h.jsxs("div",{className:"flex flex-wrap items-center bg-surface4 border-t-sm border-border1 px-2 py-1 gap-2 rounded-b-lg",children:[l&&h.jsx(hn,{onClick:l,children:"View nested graph"}),s&&h.jsxs(h.Fragment,{children:[h.jsx(hn,{onClick:()=>P(!0),children:"Map config"}),h.jsx(No,{open:T,onOpenChange:P,children:h.jsxs(Zi,{className:F,children:[h.jsxs(Qi,{className:I,children:[i," map config"]}),h.jsx("div",{className:"px-4 overflow-hidden",children:h.jsx(Dv,{data:s})})]})})]}),e&&h.jsxs(h.Fragment,{children:[h.jsx(hn,{onClick:()=>p(!0),children:"Input"}),h.jsx(No,{open:d,onOpenChange:p,children:h.jsxs(Zi,{className:F,children:[h.jsxs(Qi,{className:I,children:[i," input"]}),h.jsx("div",{className:"px-4 overflow-hidden",children:h.jsx(Dv,{data:e})})]})})]}),n&&h.jsxs(h.Fragment,{children:[h.jsx(hn,{onClick:()=>S(!0),children:"Resume data"}),h.jsx(No,{open:x,onOpenChange:S,children:h.jsxs(Zi,{className:F,children:[h.jsxs(Qi,{className:I,children:[i," resume data"]}),h.jsx("div",{className:"px-4 overflow-hidden",children:h.jsx(Dv,{data:n})})]})})]}),t&&h.jsxs(h.Fragment,{children:[h.jsx(hn,{onClick:()=>b(!0),children:"Output"}),h.jsx(No,{open:g,onOpenChange:b,children:h.jsxs(Zi,{className:F,children:[h.jsxs(Qi,{className:I,children:[i," output"]}),h.jsx("div",{className:"px-4 overflow-hidden",children:h.jsx(Dv,{data:t})})]})})]}),r&&h.jsxs(h.Fragment,{children:[h.jsx(hn,{onClick:()=>k(!0),children:"Error"}),h.jsx(No,{open:E,onOpenChange:k,children:h.jsxs(Zi,{className:F,children:[h.jsxs(Qi,{className:I,children:[i," error"]}),h.jsx("div",{className:"px-4 overflow-hidden",children:h.jsx(Dv,{data:r})})]})})]}),a&&h.jsx(hn,{onClick:a,children:"Show trace"}),B&&h.jsxs(h.Fragment,{children:[h.jsx(hn,{className:"ring-1 ring-accent5 !text-accent5",onClick:()=>j(!0),children:"Send event"}),h.jsx(No,{open:M,onOpenChange:j,children:h.jsxs(Zi,{className:F,children:[h.jsxs(Qi,{className:I,children:["Send ",o," event"]}),h.jsx("div",{className:"px-4 overflow-hidden",children:h.jsx(zxt,{event:o,runId:u,onSendEvent:c})})]})})]})]})})};function P4({data:e}){var g;const{conditions:t,previousStepId:n,nextStepId:r}=e,[s,i]=A.useState(!0),[o,a]=A.useState(!1),l=(g=t[0])==null?void 0:g.type,c=(t.some(b=>b.fnString)||(t==null?void 0:t.length)>1)&&l!=="else",{steps:u}=HC(),d=u[n],p=u[r];return h.jsxs(h.Fragment,{children:[h.jsx(Oi,{type:"target",position:Pt.Top,style:{visibility:"hidden"}}),h.jsxs("div",{className:Ve("bg-surface3 rounded-lg w-[300px] border-sm border-border1",(d==null?void 0:d.status)==="success"&&p&&"ring-2 ring-accent1",(d==null?void 0:d.status)==="failed"&&p&&"ring-2 ring-accent2"),children:[h.jsxs(EB,{open:c?s:!0,onOpenChange:b=>{c&&i(b)},children:[h.jsxs(DB,{className:"flex items-center justify-between w-full px-3 py-2",children:[h.jsx(Un,{icon:l==="when"?h.jsx(LP,{className:"text-[#ECB047]"}):null,children:l==null?void 0:l.toUpperCase()}),c&&h.jsx(ot,{children:h.jsx(Eh,{className:Ve("transition-transform text-icon3",{"transform rotate-180":s})})})]}),l==="else"?null:h.jsx(AB,{className:"flex flex-col gap-2 pb-2",children:t.map((b,x)=>{var S,E,k;return b.fnString?h.jsxs("div",{className:"px-3",children:[h.jsx(Cj,{theme:z3.oneDark,code:String(b.fnString).trim(),language:"javascript",children:({className:T,style:P,tokens:M,getLineProps:j,getTokenProps:F})=>h.jsx("pre",{className:`${T} relative font-mono p-3 w-full cursor-pointer rounded-lg text-xs !bg-surface4 overflow-scroll`,onClick:()=>a(!0),style:P,children:M.map((I,B)=>h.jsxs("div",{...j({line:I}),children:[h.jsx("span",{className:"inline-block mr-2 text-muted-foreground",children:B+1}),I.map((L,W)=>h.jsx("span",{...F({token:L})},W))]},B))})}),h.jsx(No,{open:o,onOpenChange:a,children:h.jsxs(Zi,{className:"max-w-[30rem] bg-surface2 p-4",children:[h.jsx(Qi,{className:"sr-only",children:"Condition Function"}),h.jsx(N4,{className:"w-full p-2 pt-4",maxHeight:"400px",children:h.jsx(Cj,{theme:z3.oneDark,code:String(b.fnString).trim(),language:"javascript",children:({className:T,style:P,tokens:M,getLineProps:j,getTokenProps:F})=>h.jsx("pre",{className:`${T} relative font-mono text-sm overflow-x-auto p-3 w-full rounded-lg mt-2 dark:bg-zinc-800`,style:{...P,backgroundColor:"#121212",padding:"0 0.75rem 0 0"},children:M.map((I,B)=>h.jsxs("div",{...j({line:I}),children:[h.jsx("span",{className:"inline-block mr-2 text-muted-foreground",children:B+1}),I.map((L,W)=>h.jsx("span",{...F({token:L})},W))]},B))})})})]})})]},`${b.fnString}-${x}`):h.jsx(A.Fragment,{children:(S=b.ref)!=null&&S.step?h.jsxs("div",{className:"flex items-center gap-1",children:[x===0?null:h.jsx(Un,{icon:h.jsx(LP,{className:"text-[#ECB047]"}),children:((E=b.conj)==null?void 0:E.toLocaleUpperCase())||"WHEN"}),h.jsxs(Ru,{size:"xs",className:" text-mastra-el-3 flex-1",children:[b.ref.step.id||b.ref.step,"'s ",b.ref.path," ",Object.entries(b.query).map(([T,P])=>`${T} ${String(P)}`)]})]}):null},`${(k=b.ref)==null?void 0:k.path}-${x}`)})})]}),h.jsx(MB,{stepName:r,input:d==null?void 0:d.output,mapConfig:e.mapConfig})]}),h.jsx(Oi,{type:"source",position:Pt.Bottom,style:{visibility:"hidden"}})]})}function M4({data:e,onShowTrace:t,parentWorkflowName:n,onSendEvent:r}){const{steps:s,isRunning:i,runId:o}=HC(),{label:a,description:l,withoutTopHandle:c,withoutBottomHandle:u,mapConfig:d,event:p,duration:g,date:b}=e,x=n?`${n}.${a}`:a,S=s[x];return h.jsxs(h.Fragment,{children:[!c&&h.jsx(Oi,{type:"target",position:Pt.Top,style:{visibility:"hidden"}}),h.jsxs("div",{className:Ve("bg-surface3 rounded-lg w-[274px] border-sm border-border1 pt-2",(S==null?void 0:S.status)==="success"&&"ring-2 ring-accent1",(S==null?void 0:S.status)==="failed"&&"ring-2 ring-accent2",(S==null?void 0:S.status)==="suspended"&&"ring-2 ring-accent3",(S==null?void 0:S.status)==="waiting"&&"ring-2 ring-accent5"),children:[h.jsxs("div",{className:Ve("flex items-center gap-2 px-3",!l&&"pb-2"),children:[i&&h.jsxs(ot,{children:[(S==null?void 0:S.status)==="failed"&&h.jsx(G1,{className:"text-accent2"}),(S==null?void 0:S.status)==="success"&&h.jsx(q1,{className:"text-accent1"}),(S==null?void 0:S.status)==="suspended"&&h.jsx(Dle,{className:"text-accent3"}),(S==null?void 0:S.status)==="waiting"&&h.jsx(aR,{className:"text-accent5"}),(S==null?void 0:S.status)==="running"&&h.jsx(Da,{className:"text-icon6 animate-spin"}),!S&&h.jsx(vle,{className:"text-icon2"})]}),h.jsxs(Ue,{variant:"ui-lg",className:"text-icon6 font-medium inline-flex items-center gap-1 justify-between w-full",children:[a," ",(S==null?void 0:S.startedAt)&&h.jsx(NB,{startedAt:S.startedAt,endedAt:S.endedAt})]})]}),l&&h.jsx(Ue,{variant:"ui-sm",className:"text-icon3 px-3 pb-2",children:l}),p&&h.jsxs(Ue,{variant:"ui-sm",className:"text-icon3 px-3 pb-2",children:["waits for event: ",h.jsx("strong",{children:p})]}),g&&h.jsxs(Ue,{variant:"ui-sm",className:"text-icon3 px-3 pb-2",children:["sleeps for ",h.jsxs("strong",{children:[g,"ms"]})]}),b&&h.jsxs(Ue,{variant:"ui-sm",className:"text-icon3 px-3 pb-2",children:["sleeps until ",h.jsx("strong",{children:new Date(b).toLocaleString()})]}),h.jsx(MB,{stepName:a,input:S==null?void 0:S.input,resumeData:S==null?void 0:S.resumeData,output:S==null?void 0:S.output,error:S==null?void 0:S.error,mapConfig:d,event:(S==null?void 0:S.status)==="waiting"?p:void 0,onShowTrace:o&&t?()=>t==null?void 0:t({runId:o,stepName:x}):void 0,runId:o,onSendEvent:r})]}),!u&&h.jsx(Oi,{type:"source",position:Pt.Bottom,style:{visibility:"hidden",color:"red"}})]})}function j4({data:e}){const{steps:t}=e,[n,r]=A.useState(!0);return h.jsxs(EB,{open:n,onOpenChange:r,className:Ve("bg-mastra-bg-3 rounded-md w-[274px] flex flex-col p-2 gap-2"),children:[h.jsx(Oi,{type:"target",position:Pt.Top,style:{visibility:"hidden"}}),h.jsxs(DB,{className:"flex items-center justify-between w-full",children:[h.jsx(Ru,{size:"xs",weight:"medium",className:"text-mastra-el-3 bg-mastra-bg-11 my-auto block rounded-[0.125rem] px-2 py-1 text-[10px] w-fit",children:"AFTER"}),h.jsx(Eh,{className:Ve("w-4 h-4 transition-transform",{"transform rotate-180":n})})]}),h.jsx(AB,{className:"flex flex-col gap-2",children:t.map(s=>h.jsxs("div",{className:"text-sm bg-mastra-bg-9 flex items-center gap-[6px] rounded-sm p-2",children:[h.jsx(kle,{className:"text-current w-4 h-4"}),h.jsx(Ru,{size:"xs",weight:"medium",className:"text-mastra-el-6 capitalize",children:s})]},s))}),h.jsx(Oi,{type:"source",position:Pt.Bottom,style:{visibility:"hidden"}})]})}function F4({data:e}){const{result:t}=e;return h.jsxs("div",{className:Ve("bg-mastra-bg-8 rounded-md w-[274px]"),children:[h.jsx(Oi,{type:"target",position:Pt.Top,style:{visibility:"hidden"}}),h.jsx("div",{className:"p-2",children:h.jsxs("div",{className:"text-sm bg-mastra-bg-9 flex items-center gap-[6px] rounded-sm p-2",children:[t?h.jsx(GBe,{className:"text-current w-4 h-4"}):h.jsx(wle,{className:"text-current w-4 h-4"}),h.jsx(Ru,{size:"xs",weight:"medium",className:"text-mastra-el-6 capitalize",children:String(t)})]})}),h.jsx(Oi,{type:"source",position:Pt.Bottom,style:{visibility:"hidden"}})]})}const jB=A.forwardRef(({className:e,...t})=>{const{zoom:n}=eht(),{zoomTo:r,zoomIn:s,zoomOut:i,fitView:o}=i4();return h.jsxs(DC,{className:Ve("flex gap-1 rounded-md bg-primary-foreground p-1 text-foreground",e),...t,children:[h.jsx(Js,{variant:"ghost",size:"icon",onClick:()=>i({duration:300}),children:h.jsx(h$e,{className:"h-4 w-4"})}),h.jsx(tA,{className:"w-[140px]",value:[n],min:.01,max:1,step:.01,onValueChange:a=>{r(a[0])}}),h.jsx(Js,{variant:"ghost",size:"icon",onClick:()=>s({duration:300}),children:h.jsx(cC,{className:"h-4 w-4"})}),h.jsxs(Js,{className:"min-w-20 tabular-nums",variant:"ghost",onClick:()=>r(1,{duration:300}),children:[(100*n).toFixed(0),"%"]}),h.jsx(Js,{variant:"ghost",size:"icon",onClick:()=>o({duration:300,maxZoom:1}),children:h.jsx(c$e,{className:"h-4 w-4"})})]})});jB.displayName="ZoomSlider";function Hxt({stepGraph:e,open:t,workflowName:n,onShowTrace:r,onSendEvent:s}){const{nodes:i,edges:o}=$0e({stepGraph:e}),[a,l]=A.useState(!1),[c,u,d]=c4(i),[p]=u4(o),{steps:g}=HC(),b={"default-node":x=>h.jsx(M4,{parentWorkflowName:n,onShowTrace:r,onSendEvent:s,...x}),"condition-node":P4,"after-node":j4,"loop-result-node":F4,"nested-node":x=>h.jsx(V0e,{parentWorkflowName:n,onShowTrace:r,onSendEvent:s,...x})};return A.useEffect(()=>{t&&setTimeout(()=>{l(!0)},500)},[t]),h.jsx("div",{className:"w-full h-full relative bg-surface1",children:a?h.jsxs(l4,{nodes:c,edges:p.map(x=>{var S,E,k;return{...x,style:{...x.style,stroke:((E=g[`${n}.${(S=x.data)==null?void 0:S.previousStepId}`])==null?void 0:E.status)==="success"&&g[`${n}.${(k=x.data)==null?void 0:k.nextStepId}`]?"#22c55e":void 0}}}),fitView:!0,fitViewOptions:{maxZoom:1},minZoom:.01,maxZoom:1,nodeTypes:b,onNodesChange:d,children:[h.jsx(jB,{position:"bottom-left"}),h.jsx(h4,{pannable:!0,zoomable:!0,maskColor:"#121212",bgColor:"#171717",nodeColor:"#2c2c2c"}),h.jsx(d4,{variant:ll.Lines,gap:12,size:.5})]}):h.jsx("div",{className:"w-full h-full flex items-center justify-center",children:h.jsx(Y1,{})})})}const H0e=A.createContext({});function Vxt({children:e,onShowTrace:t,onSendEvent:n}){const[r,s]=A.useState(null),[i,o]=A.useState([]),[a,l]=A.useState(!1),[c,u]=A.useState(""),[d,p]=A.useState(""),g=()=>{if(i.length){const x=i[i.length-1];s(x.stepGraph),u(x.label),p(x.fullStep),o(i.slice(0,-1))}else l(!1),s(null),u(""),p("")},b=({label:x,stepGraph:S,fullStep:E})=>{r&&o([...i,{stepGraph:r,label:c,fullStep:d}]),u(x),p(E),s(S),l(!0)};return h.jsxs(H0e.Provider,{value:{showNestedGraph:b,closeNestedGraph:g},children:[e,h.jsx(No,{open:a,onOpenChange:g,children:h.jsx(OC,{children:h.jsxs(Zi,{className:"w-[45rem] h-[45rem] max-w-[unset] bg-[#121212] p-[0.5rem]",children:[h.jsxs(Qi,{className:"flex items-center gap-1.5 absolute top-3 left-3 z-50",children:[h.jsx(lR,{className:"text-current w-4 h-4"}),h.jsxs(Ru,{size:"xs",weight:"medium",className:"text-mastra-el-6 capitalize",children:[c," workflow"]})]}),h.jsx(AC,{children:h.jsx(Hxt,{stepGraph:r,open:a,workflowName:d,onShowTrace:t,onSendEvent:n})})]})})},`${c}-${d}`)]})}function V0e({data:e,parentWorkflowName:t,onShowTrace:n,onSendEvent:r}){const{steps:s,isRunning:i,runId:o}=HC(),{showNestedGraph:a}=A.useContext(H0e),{label:l,description:c,withoutTopHandle:u,withoutBottomHandle:d,stepGraph:p,mapConfig:g,event:b}=e,x=t?`${t}.${l}`:l,S=s[x];return h.jsxs(h.Fragment,{children:[!u&&h.jsx(Oi,{type:"target",position:Pt.Top,style:{visibility:"hidden"}}),h.jsxs("div",{className:Ve("bg-surface3 rounded-lg w-[274px] border-sm border-border1 pt-2",(S==null?void 0:S.status)==="success"&&"ring-2 ring-accent1",(S==null?void 0:S.status)==="failed"&&"ring-2 ring-accent2",(S==null?void 0:S.status)==="suspended"&&"ring-2 ring-accent3",(S==null?void 0:S.status)==="waiting"&&"ring-2 ring-accent5"),children:[h.jsxs("div",{className:Ve("flex items-center gap-2 px-3",!c&&"pb-2"),children:[i&&h.jsxs(ot,{children:[(S==null?void 0:S.status)==="failed"&&h.jsx(G1,{className:"text-accent2"}),(S==null?void 0:S.status)==="success"&&h.jsx(q1,{className:"text-accent1"}),(S==null?void 0:S.status)==="suspended"&&h.jsx(Dle,{className:"text-accent3"}),(S==null?void 0:S.status)==="waiting"&&h.jsx(aR,{className:"text-accent5"}),(S==null?void 0:S.status)==="running"&&h.jsx(Da,{className:"text-icon6 animate-spin"}),!S&&h.jsx(vle,{className:"text-icon2"})]}),h.jsxs(Ue,{variant:"ui-lg",className:"text-icon6 font-medium inline-flex items-center gap-1 justify-between w-full",children:[l," ",(S==null?void 0:S.startedAt)&&h.jsx(NB,{startedAt:S.startedAt,endedAt:S.endedAt})]})]}),c&&h.jsx(Ue,{variant:"ui-sm",className:"text-icon3 px-3 pb-2",children:c}),h.jsx(MB,{stepName:l,input:S==null?void 0:S.input,resumeData:S==null?void 0:S.resumeData,output:S==null?void 0:S.output,error:S==null?void 0:S.error,mapConfig:g,onShowTrace:o&&n?()=>n==null?void 0:n({runId:o,stepName:x}):void 0,onShowNestedGraph:()=>a({label:l,fullStep:x,stepGraph:p}),onSendEvent:r,event:(S==null?void 0:S.status)==="waiting"?b:void 0,runId:o})]}),!d&&h.jsx(Oi,{type:"source",position:Pt.Bottom,style:{visibility:"hidden"}})]})}function Uxt({workflow:e,onShowTrace:t,onSendEvent:n}){const{nodes:r,edges:s}=$0e(e),[i,o,a]=c4(r),[l]=u4(s),{steps:c}=HC(),u={"default-node":d=>h.jsx(M4,{onShowTrace:t,onSendEvent:n,...d}),"condition-node":P4,"after-node":j4,"loop-result-node":F4,"nested-node":d=>h.jsx(V0e,{onShowTrace:t,onSendEvent:n,...d})};return h.jsx("div",{className:"w-full h-full bg-surface1",children:h.jsxs(l4,{nodes:i,edges:l.map(d=>{var p,g,b;return{...d,style:{...d.style,stroke:((g=c[(p=d.data)==null?void 0:p.previousStepId])==null?void 0:g.status)==="success"&&c[(b=d.data)==null?void 0:b.nextStepId]?"#22c55e":void 0}}}),nodeTypes:u,onNodesChange:a,fitView:!0,fitViewOptions:{maxZoom:1},minZoom:.01,maxZoom:1,children:[h.jsx(jB,{position:"bottom-left"}),h.jsx(h4,{pannable:!0,zoomable:!0,maskColor:"#121212",bgColor:"#171717",nodeColor:"#2c2c2c"}),h.jsx(d4,{variant:ll.Dots,gap:12,size:.5})]})})}function U0e({workflowId:e,onShowTrace:t,workflow:n,isLoading:r,onSendEvent:s}){const{snapshot:i}=A.useContext(zC);return r?h.jsx("div",{className:"p-4",children:h.jsx(as,{className:"h-full"})}):n?h.jsx(Vxt,{onShowTrace:t,onSendEvent:s,children:h.jsx(AC,{children:h.jsx(Uxt,{workflow:i!=null&&i.serializedStepGraph?{stepGraph:i==null?void 0:i.serializedStepGraph}:n,onShowTrace:t,onSendEvent:s})})},(i==null?void 0:i.runId)??e):h.jsx("div",{className:"grid h-full place-items-center",children:h.jsxs("div",{className:"flex flex-col items-center gap-2",children:[h.jsx(oR,{}),h.jsxs("div",{children:["We couldn't find ",L0e(e)," workflow."]})]})})}const Wxt=e=>{const[t,n]=A.useState(null),[r,s]=A.useState(!0),i=Ku();return A.useEffect(()=>{(async()=>{s(!0);try{if(!e){n(null),s(!1);return}const a=await i.getWorkflow(e).runs({limit:50});n(a)}catch(a){n(null),console.error("Error fetching workflow",a),Fo.error("Error fetching workflow")}finally{s(!1)}})()},[e]),{runs:t,isLoading:r}},qxt=e=>{const[t,n]=A.useState(null),[r,s]=A.useState(!0),i=Ku();return A.useEffect(()=>{(async()=>{s(!0);try{if(!e){n(null),s(!1);return}const a=await i.getWorkflow(e).details();if(!a){n(null),console.error("Error fetching workflow"),Fo.error("Error fetching workflow");return}n(a)}catch(a){n(null),console.error("Error fetching workflow",a),Fo.error("Error fetching workflow")}finally{s(!1)}})()},[e]),{workflow:t,isLoading:r}},W0e=e=>{const[t,n]=A.useState(null),[r,s]=A.useState(!0),i=Ku();return A.useEffect(()=>{(async()=>{var a;s(!0);try{if(!e){n(null),s(!1);return}const l=await i.getLegacyWorkflow(e).details();if(!l){n(null),console.error("Error fetching legacy workflow"),Fo.error("Error fetching legacy workflow");return}const c=l.steps,d=(await Promise.all((a=Object.values(c))==null?void 0:a.map(async p=>{if(!p.workflowId)return p;const g=await i.getLegacyWorkflow(p.workflowId).details();return g?{...p,stepGraph:g.stepGraph,stepSubscriberGraph:g.stepSubscriberGraph}:p}))).reduce((p,g)=>({...p,[g.id]:g}),{});n({...l,steps:d})}catch(l){n(null),console.error("Error fetching legacy workflow",l),Fo.error("Error fetching legacy workflow")}finally{s(!1)}})()},[e]),{legacyWorkflow:t,isLoading:r}},Gxt=()=>{const e=Ku();return{startLegacyWorkflowRun:async({workflowId:r,runId:s,input:i})=>{try{await e.getLegacyWorkflow(r).start({runId:s,triggerData:i||{}})}catch(o){throw console.error("Error starting workflow run:",o),o}},createLegacyWorkflowRun:async({workflowId:r,prevRunId:s})=>{try{const i=e.getLegacyWorkflow(r),{runId:o}=await i.createRun({runId:s});return{runId:o}}catch(i){throw console.error("Error creating workflow run:",i),i}}}},Yxt=()=>{const[e,t]=A.useState(!1),[n,r]=A.useState(null),s=Ku(),i=fge(a=>{const l=Object.entries(a.results||{}).reduce((u,[d,p])=>{let g=p.status==="success"?p.output:void 0;return g&&(g=Object.entries(g).reduce((b,[x,S])=>{var k;const E=S;return b[x]=((k=E.type)==null?void 0:k.toLowerCase())==="buffer"?{type:"Buffer",data:"[...buffered data]"}:E,b},{})),u[d]={...p,output:g},u},{}),c={...a,sanitizedOutput:a?JSON.stringify({...a,results:l},null,2).slice(0,5e4):null};r(c)},100);return{watchLegacyWorkflow:async({workflowId:a,runId:l})=>{try{t(!0),await s.getLegacyWorkflow(a).watch({runId:l},u=>{try{i(u)}catch(d){console.error("Error processing workflow record:",d),r({...u})}})}catch(c){throw console.error("Error watching workflow:",c),c}finally{t(!1)}},isWatchingLegacyWorkflow:e,legacyWatchResult:n}},Kxt=()=>{const[e,t]=A.useState(!1),n=Ku();return{resumeLegacyWorkflow:async({workflowId:s,stepId:i,runId:o,context:a})=>{try{return t(!0),await n.getLegacyWorkflow(s).resume({stepId:i,runId:o,context:a})}catch(l){throw console.error("Error resuming workflow:",l),l}finally{t(!1)}},isResumingLegacyWorkflow:e}},Xxt={"Agent-Network-Outer-Workflow.routing-step":"Decision making process","routing-step":"Decision making process","agent-step":"Agent execution","Agent-Network-Outer-Workflow.agent-step":"Agent execution","workflow-step":"Workflow execution","Agent-Network-Outer-Workflow.workflow-step":"Workflow execution",toolStep:"Tool execution","Agent-Network-Outer-Workflow.toolStep":"Tool execution","final-step":"Task completed"},Jxt=()=>{var c,u,d;const[e,t]=A.useState(!1),{state:n}=_B(),r=Ch(),s=(u=(c=r==null?void 0:r.metadata)==null?void 0:c.custom)==null?void 0:u.id;if(!s)return h.jsx("div",{children:"Something is wrong"});const i=n[s],a=(i.executionSteps?(d=i.executionSteps)==null?void 0:d[i.executionSteps.length-1]:"")==="finish",l=Object.values((i==null?void 0:i.steps)||{}).some(p=>{var g;return(p==null?void 0:p.error)||((g=p==null?void 0:p["step-result"])==null?void 0:g.status)==="failed"});return h.jsxs("div",{className:"space-y-2 mb-2",children:[h.jsxs(hn,{onClick:()=>t(!e),children:[a?h.jsx(h.Fragment,{children:l?h.jsxs(h.Fragment,{children:[h.jsx(ot,{children:h.jsx(G1,{className:"text-accent2"})}),"Failed"]}):h.jsxs(h.Fragment,{children:[h.jsx(ot,{children:h.jsx(q1,{className:"text-accent1"})}),"Done"]})}):h.jsxs(h.Fragment,{children:[h.jsx(ot,{children:h.jsx(Y1,{className:"animate-spin"})}),"Thinking..."]}),h.jsx(ot,{className:"ml-2",children:h.jsx(Eh,{className:zn("transition-transform -rotate-90",e&&"rotate-0")})})]}),e?h.jsx(Zxt,{id:s}):null]})},Zxt=({id:e})=>{var r;const{state:t}=_B(),n=t[e];return h.jsx("ol",{className:"flex flex-col gap-px rounded-lg overflow-hidden",children:(r=n.executionSteps)==null?void 0:r.filter(s=>s!=="start").map((s,i)=>h.jsx(Qxt,{stepId:s,step:n.steps[s]||{},runId:n.runId},i))})},Qxt=({stepId:e,step:t,runId:n})=>{var a,l,c,u,d,p,g,b,x,S,E,k,T,P;const[r,s]=A.useState(!1);let i=t["step-result"];const o=t.error;if(e==="workflow-step"||e==="Agent-Network-Outer-Workflow.workflow-step"){const M=JSON.parse(((a=i==null?void 0:i.output)==null?void 0:a.result)??"{}")??{};!(M!=null&&M.runResult)&&(i==null?void 0:i.status)==="success"&&(i={...i,status:"failed",error:"Something went wrong"})}return o&&(i={...i,status:"failed",error:(c=(l=o==null?void 0:o.data)==null?void 0:l.error)==null?void 0:c.message}),e==="finish"?h.jsx("div",{className:"bg-surface4 py-2 px-3 text-icon6 flex items-center gap-4 justify-between",children:h.jsx(Ue,{variant:"ui-sm",className:"text-icon6",children:"Process completed"})}):h.jsxs("li",{children:[h.jsxs("button",{className:"bg-surface4 py-2 px-3 text-icon6 flex items-center gap-4 justify-between w-full text-left",onClick:()=>s(M=>!M),children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(tvt,{status:i?i==null?void 0:i.status:"loading"}),h.jsx(Ue,{variant:"ui-sm",className:"text-icon6",children:Xxt[e]||e})]}),((u=t.metadata)==null?void 0:u.startTime)&&h.jsx(nvt,{step:t})]}),(e==="routing-step"||e==="Agent-Network-Outer-Workflow.routing-step")&&r&&h.jsxs("div",{className:"bg-surface1 p-3 space-y-4",children:[h.jsxs("div",{children:[h.jsx(Ue,{variant:"ui-sm",className:"text-icon3 font-medium",children:"Selection reason:"}),h.jsx(Ue,{variant:"ui-sm",className:"text-icon6",children:((d=i==null?void 0:i.output)==null?void 0:d.selectionReason)||"N/A"})]}),h.jsxs("div",{children:[h.jsx(Ue,{variant:"ui-sm",className:"text-icon3 font-medium",children:"Resource ID"}),h.jsx(Ue,{variant:"ui-sm",className:"text-icon6",children:((p=i==null?void 0:i.output)==null?void 0:p.resourceId)||"N/A"})]}),i!=null&&i.error?h.jsxs("div",{children:[h.jsx(Ue,{variant:"ui-sm",className:"text-icon3 font-medium",children:"Error"}),h.jsx(Ue,{variant:"ui-sm",className:"text-icon6",children:(i==null?void 0:i.error)||"N/A"})]}):null]}),(e==="agent-step"||e==="Agent-Network-Outer-Workflow.agent-step")&&(o||(i==null?void 0:i.error))&&r&&h.jsx("div",{className:"bg-surface1 p-3 space-y-4",children:h.jsxs("div",{children:[h.jsx(Ue,{variant:"ui-sm",className:"text-icon3 font-medium",children:"Error"}),h.jsx(Ue,{variant:"ui-sm",className:"text-icon6",children:(o==null?void 0:o.message)||((b=(g=o==null?void 0:o.data)==null?void 0:g.error)==null?void 0:b.message)||(i==null?void 0:i.error)||"N/A"})]})}),(e==="toolStep"||e==="Agent-Network-Outer-Workflow.toolStep")&&(o||(i==null?void 0:i.error))&&r&&h.jsx("div",{className:"bg-surface1 p-3 space-y-4",children:h.jsxs("div",{children:[h.jsx(Ue,{variant:"ui-sm",className:"text-icon3 font-medium",children:"Error"}),h.jsx(Ue,{variant:"ui-sm",className:"text-icon6",children:(o==null?void 0:o.message)||((S=(x=o==null?void 0:o.data)==null?void 0:x.error)==null?void 0:S.message)||(i==null?void 0:i.error)||"N/A"})]})}),e==="final-step"&&r&&h.jsxs("div",{className:"bg-surface1 p-3 space-y-4",children:[h.jsxs("div",{children:[h.jsx(Ue,{variant:"ui-sm",className:"text-icon3 font-medium",children:"Task:"}),h.jsx(Ue,{variant:"ui-sm",className:"text-icon6",children:((E=i==null?void 0:i.output)==null?void 0:E.task)||"N/A"})]}),h.jsxs("div",{children:[h.jsx(Ue,{variant:"ui-sm",className:"text-icon3 font-medium",children:"Number of iterations:"}),h.jsx(Ue,{variant:"ui-sm",className:"text-icon6",children:((k=i==null?void 0:i.output)==null?void 0:k.iteration)||"N/A"})]})]}),(e==="workflow-step"||e==="Agent-Network-Outer-Workflow.workflow-step")&&((T=i==null?void 0:i.output)!=null&&T.resourceId)?h.jsx(evt,{open:r,onOpenChange:s,workflowId:(P=i==null?void 0:i.output)==null?void 0:P.resourceId,runId:n}):null]})},evt=({open:e,onOpenChange:t,workflowId:n,runId:r})=>{const{runs:s}=Wxt(n),{workflow:i,isLoading:o}=qxt(n),a=s==null?void 0:s.runs.find(l=>l.runId===r);return h.jsx(No,{open:e,onOpenChange:t,children:h.jsx(OC,{children:h.jsx(Zi,{className:"h-[90vh] w-[90%] max-w-[unset]",children:h.jsxs("div",{className:"flex-1 h-full",children:[h.jsx(Qi,{children:"Workflow details"}),h.jsx(PB,{snapshot:typeof(a==null?void 0:a.snapshot)=="object"?a.snapshot:void 0,children:h.jsx(U0e,{workflowId:n,workflow:i,isLoading:o})})]})})})})},tvt=({status:e})=>e==="failed"?h.jsx(ot,{children:h.jsx(G1,{className:"text-accent2"})}):e==="success"?h.jsx(ot,{children:h.jsx(q1,{className:"text-accent1"})}):h.jsx(ot,{children:h.jsx(Y1,{className:"animate-spin"})}),nvt=({step:e})=>{var t;return h.jsx(Un,{children:h.jsx(NB,{startedAt:e.metadata.startTime,endedAt:(t=e.metadata)==null?void 0:t.endTime})})},rvt=({ToolFallback:e})=>{const t=Ch(),n=t.content.length===1&&t.content[0].type==="tool-call",r=t.content[0];return r?r.text==="start"?h.jsx(Jxt,{}):h.jsxs(fT,{className:"max-w-full",children:[h.jsx("div",{className:"text-icon6 text-ui-lg leading-ui-lg",children:h.jsx(pT,{components:{Text:t0e,tools:{Fallback:e||o0e}}})}),h.jsx("div",{className:"h-6 pt-1",children:!n&&h.jsx(svt,{})})]}):null},svt=()=>h.jsx(KO,{hideWhenRunning:!0,autohide:"always",autohideFloat:"single-branch",className:"flex gap-1 items-center transition-all",children:h.jsx(XO,{asChild:!0,children:h.jsxs(Na,{tooltip:"Copy",className:"bg-transparent text-icon3 hover:text-icon6",children:[h.jsx(Gw,{copied:!0,children:h.jsx(kh,{})}),h.jsx(Gw,{copied:!1,children:h.jsx(Dh,{})})]})})}),ivt=({ToolFallback:e,networkName:t,hasMemory:n})=>{const r=A.useRef(null);vB(r,{enabled:!0});const s=i=>h.jsx(rvt,{...i,ToolFallback:e});return h.jsxs(ovt,{children:[h.jsxs(sR,{className:"py-10 overflow-y-auto scroll-smooth h-full",ref:r,autoScroll:!1,children:[h.jsxs("div",{children:[h.jsx(avt,{networkName:t}),h.jsx(ile,{components:{UserMessage:h0e,EditComposer:dvt,AssistantMessage:s}})]}),h.jsx(Cg,{empty:!1,children:h.jsx("div",{})})]}),h.jsx(lvt,{hasMemory:n})]})},ovt=({children:e})=>{const t=p0e();return h.jsx(nR,{className:zn("max-w-[568px] w-full mx-auto px-4",t?"h-[calc(100%-208px)]":"h-[calc(100%-112px)]"),children:e})},avt=({networkName:e})=>{const t=e??"",n=t.split(" ")??[];let r="A";return n.length===2?r=`${n[0][0]}${n[1][0]}`:t.length>0?r=`${t[0]}`:r="A",h.jsx(rR,{children:h.jsxs("div",{className:"flex w-full flex-grow flex-col items-center justify-center",children:[h.jsx(bB,{children:h.jsx(xB,{children:r})}),h.jsx("p",{className:"mt-4 font-medium",children:"How can I help you today?"})]})})},lvt=({hasMemory:e})=>h.jsxs("div",{children:[h.jsxs(iC,{children:[h.jsx(g0e,{}),h.jsxs("div",{className:"w-full bg-surface3 rounded-lg border-sm border-border1 px-3 py-4 mt-auto h-[100px]",children:[h.jsx(oC,{asChild:!0,className:"w-full",children:h.jsx("textarea",{className:"text-ui-lg leading-ui-lg placeholder:text-icon3 text-icon6 bg-transparent focus:outline-none resize-none",autoFocus:!0,placeholder:"Enter your message...",name:"",id:""})}),h.jsxs("div",{className:"flex justify-end gap-2",children:[h.jsx(cvt,{}),h.jsx(uvt,{})]})]})]}),!e&&h.jsxs(Ue,{variant:"ui-sm",className:"text-icon3 flex items-center gap-2 pt-0.5",children:[h.jsx(ot,{children:h.jsx(r0e,{})}),"Memory is not enabled. The conversation will not be persisted."]})]}),cvt=()=>{const e=Hu(),{start:t,stop:n,isListening:r,transcript:s}=f0e();return A.useEffect(()=>{s&&e.setText(s)},[e,s]),h.jsx(Na,{type:"button",tooltip:r?"Stop dictation":"Start dictation",variant:"ghost",className:"rounded-full",onClick:()=>r?n():t(),children:r?h.jsx(q0e,{}):h.jsx(Ele,{className:"h-6 w-6 text-[#898989] hover:text-[#fff]"})})},uvt=()=>h.jsxs(h.Fragment,{children:[h.jsx(tle,{asChild:!0,children:h.jsx(Na,{tooltip:"Add attachment",variant:"ghost",className:"rounded-full",children:h.jsx(cC,{className:"h-6 w-6 text-[#898989] hover:text-[#fff]"})})}),h.jsx(Cg,{running:!1,children:h.jsx(mT,{asChild:!0,children:h.jsx(Na,{tooltip:"Send",variant:"default",className:"rounded-full border-sm border-[#363636] bg-[#292929]",children:h.jsx(ble,{className:"h-6 w-6 text-[#898989] hover:text-[#fff]"})})})}),h.jsx(Cg,{running:!0,children:h.jsx(gT,{asChild:!0,children:h.jsx(Na,{tooltip:"Cancel",variant:"default",children:h.jsx(q0e,{})})})})]}),dvt=()=>h.jsxs(iC,{children:[h.jsx(oC,{}),h.jsxs("div",{children:[h.jsx(gT,{asChild:!0,children:h.jsx(Js,{variant:"ghost",children:"Cancel"})}),h.jsx(mT,{asChild:!0,children:h.jsx(Js,{children:"Send"})})]})]}),q0e=()=>h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",children:h.jsx("rect",{width:"10",height:"10",x:"3",y:"3",rx:"2"})}),G0e=A.createContext({messages:[],setMessages:()=>{},appendToLastMessage:()=>{}}),hvt=({children:e})=>{const[t,n]=A.useState([]),r=s=>n(i=>{var l;const o=i[i.length-1],a=typeof o.content=="string"?o.content:((l=o.content)==null?void 0:l[0]).text;return[...i.slice(0,-1),{...o,content:[{type:"text",text:a+s}]}]});return h.jsx(G0e.Provider,{value:{messages:t,setMessages:n,appendToLastMessage:r},children:e})},fvt=()=>A.useContext(G0e),pvt=e=>e;function mvt({children:e,networkId:t,memory:n,threadId:r,refreshThreadList:s,initialMessages:i,runtimeContext:o}){const a=A.useRef(void 0),[l,c]=A.useState(!1),{messages:u,setMessages:d,appendToLastMessage:p}=fvt(),[g,b]=A.useState(r),{handleStep:x,state:S,setState:E}=_B(),{chatWithLoop:k,maxIterations:T}=A.useContext($C),P=a.current,M=P?S[P]:void 0,j=new oh;Object.entries(o??{}).forEach(([J,V])=>{j.set(J,V)}),A.useEffect(()=>{var X,ne,H;if(!M||!!!((X=M==null?void 0:M.steps)!=null&&X.finish))return;const V=(ne=M==null?void 0:M.steps)==null?void 0:ne["workflow-step"],Z=(H=M==null?void 0:M.steps)==null?void 0:H.toolStep;if(!V&&!Z)return;const G=V==null?void 0:V["step-result"],q=Z==null?void 0:Z["step-result"];if(!G&&!q)return;const z=G==null?void 0:G.output,Y=q==null?void 0:q.output;if(!z&&!Y)return;(async()=>{var ie;const ee=G?JSON.parse(((ie=G==null?void 0:G.output)==null?void 0:ie.result)??"{}")??{}:{runResult:(Y==null?void 0:Y.result)??{}};if(ee!=null&&ee.runResult){const se=(ee==null?void 0:ee.runResult)??{},ae=await ip(JSON.stringify(se));d(le=>[...le,{role:"assistant",content:[{type:"text",text:`\`\`\`json
|
|
723
723
|
${ae}\`\`\``}]}])}})()},[M]),A.useEffect(()=>{if(u.length===0||g!==r){const J=async(V,Z)=>{const q=`\`\`\`json
|
|
724
724
|
${await ip(V)}\`\`\``;d(z=>z.map(Y=>{var U,X;return((X=(U=Y.metadata)==null?void 0:U.custom)==null?void 0:X.id)===Z?{...Y,content:[{type:"text",text:q}]}:Y}))};if(i&&r&&n){let V="",Z=1;const G=[];let q=$();for(let z=0;z<i.length;z++){const Y=i[z];if(Y.role==="user"){q=$(),V=Y.content,G.push({role:"user",message:Y});continue}if(Y.role==="assistant"){const U=Y.parts??[];let X=!1,ne=!1,H="",ee="";for(const ie of U)if(ie.type==="text"&&ie.text){const se=W(ie.text);se!=null&&se.resourceId&&(se!=null&&se.resourceType)&&(X=!0,q.routingDecision=se),typeof(se==null?void 0:se.isComplete)=="boolean"&&(ne=!0,q.taskCompleteDecision=se,se!=null&&se.isComplete&&(q.finalResponse=se.finalResult,G.push({role:"assistant",message:q}),q=$())),(!se||!se.resourceId&&!se.runResult&&typeof se.isComplete!="boolean")&&(H=ie.text),se&&!se.resourceId&&typeof se.isComplete!="boolean"&&(ee=ie.text)}!X&&!ne&&(q.finalResponse=H||ee,(q.routingDecision||q.finalResponse)&&(G.push({role:"assistant",message:q}),q=$()))}z===i.length-1&&(q.routingDecision||q.finalResponse)&&G.push({role:"assistant",message:q})}for(const z of G){const{role:Y,message:U}=z;if(Y==="user"&&(Z=1,V=U.content,d(X=>X.some(ne=>ne.id===U.id)?X:[...X,U])),Y==="assistant"){const{id:X,formattedMessageId:ne,finalStepId:H,routingDecision:ee,finalResponse:ie,taskCompleteDecision:se}=U;let ae="";(ee==null?void 0:ee.resourceType)==="agent"&&(ae="agent-step"),(ee==null?void 0:ee.resourceType)==="tool"&&(ae="toolStep"),(ee==null?void 0:ee.resourceType)==="workflow"&&(ae="workflow-step");let le="",pe={},ye=null,Te="";if(ae==="workflow-step"||ae==="toolStep"){const _e=JSON.parse(ie??"{}")??{};pe=ae==="workflow-step"?(_e==null?void 0:_e.runResult)??{}:_e??{},le=(_e==null?void 0:_e.runId)??""}se!=null&&se.isComplete&&(ye={executionSteps:["start","routing-step","final-step","finish"],runId:"",steps:{start:{},"routing-step":{"step-result":{output:{selectionReason:(se==null?void 0:se.completionReason)??""},status:"success"}},"final-step":{"step-result":{output:{iteration:Z,task:V},status:"success"}},finish:{}}},Te=se==null?void 0:se.finalResult);const Ee=ae==="workflow-step"||ae==="toolStep"?Object.keys(pe).length===0:!ie;E(_e=>({..._e,...ye?{[H]:ye}:{[X]:{executionSteps:["start","routing-step",ae,"finish"],runId:le,steps:{start:{},"routing-step":{"step-result":{output:ee,status:ee?"success":"failed",...ee?{}:{error:"Something went wrong"}}},[ae]:{"step-result":{output:{resourceId:ee==null?void 0:ee.resourceId,result:ie??""},status:Ee?"failed":"success",...Ee?{error:"Something went wrong"}:{}}},finish:{}}}}})),d(_e=>{const Fe=_e.some(nt=>{var Dt,Gt;return((Gt=(Dt=nt.metadata)==null?void 0:Dt.custom)==null?void 0:Gt.id)===X}),tt=_e.some(nt=>{var Dt,Gt;return((Gt=(Dt=nt.metadata)==null?void 0:Dt.custom)==null?void 0:Gt.id)===ne});return[..._e,...Te?[{role:"assistant",metadata:{custom:{id:H}},content:[{type:"text",text:"start"}]},{role:"assistant",content:[{type:"text",text:Te}]}]:[...Fe?[]:[{role:"assistant",metadata:{custom:{id:X}},content:[{type:"text",text:"start"}]}],...tt?[]:[{role:"assistant",content:[{type:"text",text:ae==="workflow-step"||ae==="toolStep"?"":ie}],metadata:{custom:{id:ne}}}]]]}),(ae==="workflow-step"||ae==="toolStep")&&!Ee&&J(JSON.stringify(pe),ne),Z++}}b(r)}}},[i,r,n,u]);const I=Ku().getVNextNetwork(t),L=GO({isRunning:l,messages:u,convertMessage:pvt,onNew:async J=>{var Z;if(a.current=void 0,((Z=J.content[0])==null?void 0:Z.type)!=="text")throw new Error("Only text messages are supported");const V=J.content[0].text;d(G=>[...G,{role:"user",content:V}]),c(!0);try{if(k){const G=async(z,Y)=>{const X=`\`\`\`json
|
|
725
|
-
${await ip(z)}\`\`\``;d(ne=>ne.map(H=>{var ee,ie;return((ie=(ee=H.metadata)==null?void 0:ee.custom)==null?void 0:ie.id)===Y?{...H,content:[{type:"text",text:X}]}:H}))};let q=!1;await I.loopStream({message:V,threadId:r,resourceId:t,maxIterations:T,runtimeContext:j},async z=>{var Y,U,X,ne,H,ee,ie,se,ae,le,pe,ye,Te,Ee,_e;if(z.type==="step-start"&&((Y=z.payload)==null?void 0:Y.id)==="Agent-Network-Outer-Workflow"){const Fe=Gs();a.current=Fe,d(tt=>[...tt,{role:"assistant",metadata:{custom:{id:Fe}},content:[{type:"text",text:"start"}]}])}else if(a.current)if(z.type==="tool-call-delta")p(z.argsTextDelta);else if(z.type==="tool-call-streaming-start"){d(Fe=>[...Fe,{role:"assistant",content:[{type:"text",text:""}]}]),setTimeout(()=>{s==null||s()},500);return}else if(z.type==="step-finish"&&((U=z.payload)==null?void 0:U.id)==="Agent-Network-Outer-Workflow")q||(x(a.current,{...z,type:"finish"}),a.current=void 0);else if(z.type==="step-result"&&(((X=z.payload)==null?void 0:X.id)==="Agent-Network-Outer-Workflow.workflow-step"||((ne=z.payload)==null?void 0:ne.id)==="Agent-Network-Outer-Workflow.toolStep")){x(a.current,z);const Fe=(ee=(H=z==null?void 0:z.payload)==null?void 0:H.output)==null?void 0:ee.result,tt=typeof Fe=="string"?JSON.parse(((se=(ie=z==null?void 0:z.payload)==null?void 0:ie.output)==null?void 0:se.result)??"{}")??{}:{runResult:Fe},nt=(tt==null?void 0:tt.runResult)??{},Dt=Gs();d(Gt=>[...Gt,{role:"assistant",content:[{type:"text",text:""}],metadata:{custom:{id:Dt}}}]),G(JSON.stringify(nt),Dt)}else((ae=z.payload)==null?void 0:ae.id)==="Agent-Network-Outer-Workflow"||((le=z.payload)==null?void 0:le.id)==="finish-step"?z.type==="step-result"&&((pe=z.payload)==null?void 0:pe.id)==="Agent-Network-Outer-Workflow"&&(q=(Te=(ye=z==null?void 0:z.payload)==null?void 0:ye.output)==null?void 0:Te.isComplete):x(a.current,z);z.type==="step-result"&&((Ee=z.payload)==null?void 0:Ee.id)==="final-step"&&d(Fe=>{var tt,nt;return[...Fe,{role:"assistant",content:[{type:"text",text:(nt=(tt=z.payload)==null?void 0:tt.output)==null?void 0:nt.result}]}]}),z.type==="step-finish"&&((_e=z.payload)==null?void 0:_e.id)==="final-step"&&(a.current=void 0),(z.type==="start"||z.type==="step-start"||z.type==="finish")&&setTimeout(()=>{s==null||s()},500)})}else await I.stream({message:V,threadId:r,resourceId:t,runtimeContext:j},G=>{if(a.current)if(G.type==="tool-call-delta")p(G.argsTextDelta);else if(G.type==="tool-call-streaming-start"){d(q=>[...q,{role:"assistant",content:[{type:"text",text:""}]}]);return}else x(a.current,G);else if(G.type==="start"){const q=Gs();a.current=q,d(z=>[...z,{role:"assistant",metadata:{custom:{id:q}},content:[{type:"text",text:"start"}]}])}(G.type==="start"||G.type==="step-start"||G.type==="finish")&&setTimeout(()=>{s==null||s()},500)});c(!1)}catch(G){console.error("Error occurred in VNextMastraNetworkRuntimeProvider",G),c(!1)}}});return h.jsxs($O,{runtime:L,children:[" ",e," "]});function W(J){try{return JSON.parse(J)}catch{return}}function $(){return{id:Gs(),formattedMessageId:Gs(),finalStepId:Gs(),finalResponse:""}}}const gvt=({networkId:e,networkName:t,threadId:n,initialMessages:r,memory:s,refreshThreadList:i})=>{const{runtimeContext:o}=dy();return h.jsx(hvt,{children:h.jsx(Lxt,{children:h.jsx(mvt,{networkId:e,initialMessages:r??[],threadId:n,memory:s,refreshThreadList:i,runtimeContext:o,children:h.jsx("div",{className:"h-full pb-4",children:h.jsx(ivt,{hasMemory:s,networkName:t})})},n)},n)},n)},yvt=[{id:"name",header:"Name",cell:({row:e})=>{const{Link:t}=BC();return h.jsx(SB,{icon:h.jsx(Nh,{}),name:h.jsx(t,{className:"w-full space-y-0",href:`/networks${e.original.isVNext?"/v-next":""}/${e.original.id}/chat`,children:e.original.name}),description:e.original.instructions})},meta:{width:"auto"}},{id:"agents",header:"Agents",cell:({row:e})=>h.jsx(Dr,{children:h.jsx(Un,{icon:h.jsx(E$e,{}),children:e.original.agentsSize})})},{id:"workflows",header:"Workflows",cell:({row:e})=>h.jsx(Dr,{children:h.jsx(Un,{icon:h.jsx(kc,{}),children:e.original.workflowsSize})})},{id:"tools",header:"Tools",cell:({row:e})=>h.jsx(Dr,{children:h.jsx(Un,{icon:h.jsx(gl,{}),children:e.original.toolsSize})})},{id:"model",header:"Routing Models",cell:({row:e})=>h.jsxs(Dr,{children:[h.jsx(Un,{variant:"default",icon:h.jsx(xle,{}),children:e.original.routingModel}),e.original.isVNext?h.jsx(Un,{className:"!text-accent1 ml-2",children:"vNext"}):null]})}],bvt=({legacyNetworks:e,networks:t,isLoading:n,onClickRow:r})=>{const s=A.useMemo(()=>[...(e==null?void 0:e.map(l=>({...l,routingModel:l.routingModel.modelId,agentsSize:l.agents.length,isVNext:!1})))??[],...(t==null?void 0:t.map(l=>({...l,routingModel:l.routingModel.modelId,agentsSize:l.agents.length,workflowsSize:l.workflows.length,toolsSize:l.tools.length,isVNext:!0})))??[]],[t,e]),i=TL({data:s,columns:yvt,getCoreRowModel:AL()});if(n)return h.jsx(vvt,{});const o=i.getHeaderGroups()[0],a=i.getRowModel().rows.concat();return a.length===0?h.jsx(xvt,{}):h.jsx(TB,{children:h.jsxs(hy,{children:[h.jsx(fy,{className:"sticky top-0",children:o.headers.map(l=>h.jsx(Xs,{style:{width:l.index===0?"auto":l.column.getSize()},children:Qb(l.column.columnDef.header,l.getContext())},l.id))}),h.jsx(Mh,{children:a.map(l=>h.jsx(jh,{onClick:()=>r(l.original.id),children:l.getVisibleCells().map(c=>h.jsx(Se.Fragment,{children:Qb(c.column.columnDef.cell,c.getContext())},c.id))},l.id))})]})})},xvt=()=>h.jsx(LC,{iconSlot:h.jsx(Kbt,{}),titleSlot:"Configure Agent Networks",descriptionSlot:"Mastra agent networks are not configured yet. You can find more information in the documentation.",actionSlot:h.jsxs(hn,{size:"lg",className:"w-full",variant:"light",as:"a",href:"https://mastra.ai/en/reference/networks/agent-network",target:"_blank",children:[h.jsx(ot,{children:h.jsx(LP,{})}),"Docs"]})}),vvt=()=>h.jsxs(hy,{children:[h.jsxs(fy,{children:[h.jsx(Xs,{children:"Name"}),h.jsx(Xs,{width:160,children:"Agents"}),h.jsx(Xs,{width:160,children:"Workflows"}),h.jsx(Xs,{width:160,children:"Tools"}),h.jsx(Xs,{width:160,children:"Routing Models"})]}),h.jsx(Mh,{children:Array.from({length:3}).map((e,t)=>h.jsxs(jh,{children:[h.jsx(Dr,{children:h.jsx(as,{className:"h-4 w-1/2"})}),h.jsx(Dr,{width:160,children:h.jsx(as,{className:"h-4 w-1/2"})}),h.jsx(Dr,{width:160,children:h.jsx(as,{className:"h-4 w-1/2"})}),h.jsx(Dr,{width:160,children:h.jsx(as,{className:"h-4 w-1/2"})}),h.jsx(Dr,{width:160,children:h.jsx(as,{className:"h-4 w-1/2"})})]},t))})]}),I4=({children:e,className:t,onClick:n})=>h.jsx("div",{tabIndex:n?0:void 0,onKeyDown:r=>{n&&(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),n==null||n())},className:zn("flex gap-3 group/entity bg-surface3 rounded-lg border-sm border-border1 py-3 px-4",n&&"cursor-pointer hover:bg-surface4 transition-all",t),onClick:n,children:e}),O4=({children:e,className:t})=>h.jsx(ot,{size:"lg",className:zn("text-icon3 mt-1",t),children:e}),R4=({children:e,className:t})=>h.jsx(Ue,{as:"p",variant:"ui-lg",className:zn("text-icon6 font-medium",t),children:e}),L4=({children:e,className:t})=>h.jsx(Ue,{as:"p",variant:"ui-sm",className:zn("text-icon3",t),children:e}),B4=({children:e,className:t})=>h.jsx("div",{className:t,children:e}),wvt=({tools:e,agents:t,isLoading:n})=>{const r=A.useMemo(()=>Dvt(e,t),[e,t]);return n?h.jsx("div",{className:"max-w-5xl w-full mx-auto px-4 pt-8",children:h.jsx(kvt,{})}):h.jsx(Svt,{toolsWithAgents:r})},Svt=({toolsWithAgents:e})=>{const[t,n]=A.useState(e),[r,s]=A.useState("");if(t.length===0&&!r)return h.jsx(Evt,{});const i=o=>{const a=o.target.value;s(a),A.startTransition(()=>{n(e.filter(l=>l.id.toLowerCase().includes(a.toLowerCase())||l.description.toLowerCase().includes(a.toLowerCase())||l.agents.some(c=>c.name.toLowerCase().includes(a.toLowerCase())||c.id.toLowerCase().includes(a.toLowerCase()))))})};return h.jsxs("div",{children:[h.jsxs("div",{className:"max-w-5xl w-full mx-auto px-4 pt-8",children:[h.jsxs("div",{className:"px-4 flex items-center gap-2 rounded-lg bg-surface5 focus-within:ring-2 focus-within:ring-accent3",children:[h.jsx(ot,{children:h.jsx(BP,{})}),h.jsx("input",{type:"text",placeholder:"Search for a tool",className:"w-full py-2 bg-transparent text-icon3 focus:text-icon6 placeholder:text-icon3 outline-none",value:r,onChange:i})]}),t.length===0&&h.jsx(Ue,{as:"p",className:"text-icon3 py-2",children:"No tools found matching your search."})]}),h.jsx("div",{className:"grid md:grid-cols-2 xl:grid-cols-3 gap-4 max-w-5xl mx-auto py-8",children:t.map(o=>h.jsx(Cvt,{tool:o},o.id))})]})},Cvt=({tool:e})=>{const t=A.useRef(null),{Link:n}=BC();return h.jsxs(I4,{onClick:()=>{var r;return(r=t.current)==null?void 0:r.click()},children:[h.jsx(O4,{children:h.jsx(gl,{className:"group-hover/entity:text-[#ECB047]"})}),h.jsxs(B4,{children:[h.jsx(R4,{children:h.jsx(n,{ref:t,href:e.agents.length>0?`/tools/${e.agents[0].id}/${e.id}`:`/tools/all/${e.id}`,children:e.id})}),h.jsx(L4,{children:e.description}),h.jsx("div",{className:"inline-flex flex-wrap gap-2 pt-4",children:e.agents.map(r=>h.jsx(n,{href:`/agents/${r.id}/chat`,onClick:s=>s.stopPropagation(),className:"group/link",children:h.jsx(Un,{icon:h.jsx(Nh,{className:"group-hover/link:text-accent3"}),className:"bg-surface5 ",children:r.name})},r.id))})]})]})},kvt=()=>h.jsxs("div",{children:[h.jsx("div",{className:"max-w-5xl w-full mx-auto px-4 pt-8",children:h.jsx(as,{className:"h-10 w-full"})}),h.jsxs("div",{className:"grid md:grid-cols-2 xl:grid-cols-3 gap-4 max-w-5xl mx-auto py-8",children:[h.jsx(as,{className:"h-40 w-full"}),h.jsx(as,{className:"h-40 w-full"}),h.jsx(as,{className:"h-40 w-full"})]})]}),Evt=()=>h.jsx(LC,{iconSlot:h.jsx(Ybt,{}),titleSlot:"Configure Tools",descriptionSlot:"Mastra tools are not configured yet. You can find more information in the documentation.",actionSlot:h.jsxs(hn,{size:"lg",className:"w-full",variant:"light",as:"a",href:"https://mastra.ai/en/docs/agents/using-tools-and-mcp",target:"_blank",children:[h.jsx(ot,{children:h.jsx(gl,{})}),"Docs"]})}),Dvt=(e,t)=>{const n=new Map,r=Object.keys(t);for(const s of r){const i=t[s],o=i.tools,a=Object.keys(o);for(const l of a){const c=o[l];n.has(c.id)||n.set(c.id,{...c,agents:[]}),n.get(c.id).agents.push({id:s,name:i.name})}}for(const[s,i]of Object.entries(e))n.has(i.id)||n.set(i.id,{...i,agents:[]});return Array.from(n.values())};function Y0e({traces:e,error:t,runId:n,stepName:r}){return h.jsx(C0e,{initialTraces:e||[],children:h.jsx(Avt,{traces:e,error:t,runId:n,stepName:r})})}function Avt({traces:e,error:t,runId:n,stepName:r}){const s=A.useRef(!1),[i,o]=A.useState(100),{isOpen:a,setTrace:l,setIsOpen:c,setSpan:u}=A.useContext(Ph);return A.useEffect(()=>{if(s.current||!n||!r)return;const d=e.find(g=>g.runId===n);if(!d)return;const p=d.trace.find(g=>g.name.includes(r));p&&(l(d.trace),u(p),c(!0),s.current=!0)},[n,e,l]),h.jsxs("main",{className:"h-full relative overflow-hidden flex",children:[h.jsx("div",{className:"h-full overflow-y-scroll w-full",children:h.jsx(k0e,{traces:e,error:t})}),a&&h.jsx(j0e,{width:i,onResize:o})]})}function Tvt({stepGraph:e,stepSubscriberGraph:t,open:n}){const{nodes:r,edges:s}=B0e({stepGraph:e,stepSubscriberGraph:t}),[i,o]=A.useState(!1),[a,l,c]=c4(r),[u]=u4(s),d={"default-node":M4,"condition-node":P4,"after-node":j4,"loop-result-node":F4};return A.useEffect(()=>{n&&setTimeout(()=>{o(!0)},500)},[n]),h.jsx("div",{className:"w-full h-full relative",children:i?h.jsxs(l4,{nodes:a,edges:u,fitView:!0,fitViewOptions:{maxZoom:.85},nodeTypes:d,onNodesChange:c,children:[h.jsx(Hme,{}),h.jsx(h4,{pannable:!0,zoomable:!0,maskColor:"#121212",bgColor:"#171717",nodeColor:"#2c2c2c"}),h.jsx(d4,{variant:ll.Lines,gap:12,size:.5})]}):h.jsx("div",{className:"w-full h-full flex items-center justify-center",children:h.jsx(Y1,{})})})}const K0e=A.createContext({});function _vt({children:e}){const[t,n]=A.useState(null),[r,s]=A.useState(null),[i,o]=A.useState(!1),[a,l]=A.useState(""),c=()=>{o(!1),n(null),s(null),l("")},u=({label:d,stepGraph:p,stepSubscriberGraph:g})=>{l(d),n(p),s(g),o(!0)};return h.jsxs(K0e.Provider,{value:{showNestedGraph:u,closeNestedGraph:c},children:[e,h.jsx(No,{open:i,onOpenChange:c,children:h.jsx(OC,{children:h.jsxs(Zi,{className:"w-[40rem] h-[40rem] bg-[#121212] p-[0.5rem]",children:[h.jsxs(Qi,{className:"flex items-center gap-1.5 absolute top-2.5 left-2.5",children:[h.jsx(lR,{className:"text-current w-4 h-4"}),h.jsxs(Ru,{size:"xs",weight:"medium",className:"text-mastra-el-6 capitalize",children:[a," workflow"]})]}),h.jsx(AC,{children:h.jsx(Tvt,{stepGraph:t,open:i,stepSubscriberGraph:r})})]})})})]})}function Nvt({data:e}){const{label:t,withoutTopHandle:n,withoutBottomHandle:r,stepGraph:s,stepSubscriberGraph:i}=e,{showNestedGraph:o}=A.useContext(K0e);return h.jsxs("div",{className:Ve("bg-[rgba(29,29,29,0.5)] rounded-md h-full overflow-scroll w-[274px]"),children:[!n&&h.jsx(Oi,{type:"target",position:Pt.Top,style:{visibility:"hidden"}}),h.jsx("div",{className:"p-2 cursor-pointer",onClick:()=>o({label:t,stepGraph:s,stepSubscriberGraph:i}),children:h.jsxs("div",{className:"text-sm bg-mastra-bg-9 flex items-center gap-1.5 rounded-sm p-2 cursor-pointer",children:[h.jsx(lR,{className:"text-current w-4 h-4"}),h.jsx(Ru,{size:"xs",weight:"medium",className:"text-mastra-el-6 capitalize",children:t})]})}),!r&&h.jsx(Oi,{type:"source",position:Pt.Bottom,style:{visibility:"hidden"}})]})}function Pvt({workflow:e}){const{nodes:t,edges:n}=B0e({stepGraph:e.serializedStepGraph||e.stepGraph,stepSubscriberGraph:e.serializedStepSubscriberGraph||e.stepSubscriberGraph,steps:e.steps}),[r,s,i]=c4(t),[o]=u4(n),a={"default-node":M4,"condition-node":P4,"after-node":j4,"loop-result-node":F4,"nested-node":Nvt};return h.jsx("div",{className:"w-full h-full",children:h.jsxs(l4,{nodes:r,edges:o,nodeTypes:a,onNodesChange:i,fitView:!0,fitViewOptions:{maxZoom:.85},children:[h.jsx(Hme,{}),h.jsx(h4,{pannable:!0,zoomable:!0,maskColor:"#121212",bgColor:"#171717",nodeColor:"#2c2c2c"}),h.jsx(d4,{variant:ll.Dots,gap:12,size:.5})]})})}function Mvt({workflowId:e}){const{legacyWorkflow:t,isLoading:n}=W0e(e);return n?h.jsx("div",{className:"p-4",children:h.jsx(as,{className:"h-[600px]"})}):t?h.jsx(_vt,{children:h.jsx(AC,{children:h.jsx(Pvt,{workflow:t})})}):h.jsx("div",{className:"grid h-full place-items-center",children:h.jsxs("div",{className:"flex flex-col items-center gap-2",children:[h.jsx(oR,{}),h.jsxs("div",{children:["We couldn't find ",L0e(e)," workflow."]})]})})}const jvt=Se.forwardRef(({children:e,...t},n)=>h.jsx("form",{ref:n,className:"space-y-4",...t,children:e})),Fvt=["boolean","object","array"],Ivt=({label:e,children:t,id:n,field:r,error:s})=>{var o;const i=Fvt.includes(r.type);return h.jsxs("div",{className:"pb-4 last:pb-0",children:[!i&&h.jsxs(Ue,{as:"label",variant:"ui-sm",className:"text-icon3 pb-1 block",htmlFor:n,children:[e,r.required&&h.jsx("span",{className:"text-accent2",children:" *"})]}),t,((o=r.fieldConfig)==null?void 0:o.description)&&h.jsx(Ue,{as:"p",variant:"ui-sm",className:"text-icon6",children:r.fieldConfig.description}),s&&h.jsx(Ue,{as:"p",variant:"ui-sm",className:"text-accent2",children:s})]})},Ovt=V1("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),X0e=A.forwardRef(({className:e,variant:t,...n},r)=>h.jsx("div",{ref:r,role:"alert",className:Ve(Ovt({variant:t}),e),...n}));X0e.displayName="Alert";const J0e=A.forwardRef(({className:e,...t},n)=>h.jsx("h5",{ref:n,className:Ve("mb-1 font-medium leading-none tracking-tight",e),...t}));J0e.displayName="AlertTitle";const Rvt=A.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:Ve("text-sm [&_p]:leading-relaxed",e),...t}));Rvt.displayName="AlertDescription";const Lvt=({error:e})=>h.jsxs(X0e,{variant:"destructive",children:[h.jsx(oR,{className:"h-4 w-4"}),h.jsx(J0e,{children:e})]}),Bvt=({children:e})=>h.jsx(Js,{type:"submit",children:e}),$vt=({inputProps:e,error:t,field:n,id:r})=>{const{key:s,...i}=e;return h.jsx(ga,{id:r,className:t?"border-destructive":"",...i,defaultValue:n.default})},zvt=({inputProps:e,error:t,field:n,id:r})=>{const{key:s,...i}=e;return A.useEffect(()=>{n.default!==void 0&&i.onChange({target:{value:Number(n.default),name:e.name}})},[n.default]),h.jsx(ga,{id:r,type:"number",className:t?"border-destructive":"",...i,defaultValue:n.default!==void 0?Number(n.default):void 0,onChange:o=>{const a=o.target.value;a!==""&&!isNaN(Number(a))&&i.onChange({target:{value:a,name:e.name}})},onBlur:o=>{const a=o.target.value;a!==""&&!isNaN(Number(a))&&i.onChange({target:{value:Number(a),name:e.name}})}})},Z0e=A.forwardRef(({className:e,...t},n)=>h.jsx(aB,{ref:n,className:Ve("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:h.jsx(Zge,{className:Ve("flex items-center justify-center text-current"),children:h.jsx(kh,{className:"h-4 w-4"})})}));Z0e.displayName=aB.displayName;const Hvt=({field:e,label:t,id:n,inputProps:r,value:s})=>h.jsxs("div",{className:"flex items-center space-x-2",children:[h.jsx(Z0e,{id:n,onCheckedChange:i=>{const o={target:{name:r.name,value:i}};r.onChange(o)},defaultChecked:e.default,disabled:r.disabled||r.readOnly}),h.jsxs(Ue,{as:"label",variant:"ui-sm",className:"text-icon3",htmlFor:n,children:[t,e.required&&h.jsx("span",{className:"text-accent2",children:" *"})]})]});function Q0e({className:e,classNames:t,showOutsideDays:n=!0,...r}){return h.jsx(r0t,{showOutsideDays:n,className:Ve("p-3",e),classNames:{months:"flex flex-col space-y-4 sm:space-y-0",month:"space-y-4",caption_label:"text-sm text-text font-medium",nav:"space-x-1 flex items-center",nav_button_previous:Ve(mD({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100","absolute left-4 top-[56px] z-10"),nav_button_next:Ve(mD({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100","absolute right-4 top-[56px] z-10"),dropdown_month:"w-full border-collapse space-y-1",weeknumber:"flex",day:Ve(mD({variant:"ghost"}),"relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",r.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md","h-8 w-8 p-0 hover:bg-lightGray-7/50 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"!bg-primary !text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-lightGray-7/50 text-accent-foreground",day_outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},components:{},...r})}Q0e.displayName="Calendar";const Vvt=hLe,Uvt=fLe,ebe=A.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},s)=>h.jsx(pLe,{children:h.jsx(Wae,{ref:s,align:t,sideOffset:n,className:Ve("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));ebe.displayName=Wae.displayName;const Wvt=({value:e,setValue:t,children:n,className:r,placeholder:s,...i})=>{const[o,a]=A.useState(!1);return h.jsxs(Vvt,{open:o,onOpenChange:a,children:[h.jsx(Uvt,{asChild:!0,children:n||h.jsx(tbe,{value:e,placeholder:s,className:r,"data-testid":"datepicker-button"})}),h.jsx(ebe,{className:"backdrop-blur-4xl w-auto p-0 bg-[#171717]",align:"start","data-testid":"datepicker-calendar",children:h.jsx(qvt,{value:e,setValue:l=>t(l?new Date(`${l}z`):null),clearable:i.clearable,setOpenPopover:a,...i})})]})},qvt=({value:e,setValue:t,setOpenPopover:n,clearable:r,placeholder:s,className:i,...o})=>{const[a,l]=A.useState(e?lo(e,"PP"):""),[c,u]=A.useState(e?new Date(e):void 0),d=fge(x=>{dL(x)&&(u(x),t==null||t(x),n==null||n(!1))},2e3),p=x=>{l(x.currentTarget.value);const S=new Date(x.target.value);d(S)},g=x=>{u(x),t==null||t(x),n==null||n(!1),l(x?lo(x,"PP"):"")},b=x=>{u(x),l(x?lo(x,"PP"):"")};return h.jsxs("div",{"aria-label":"Choose date",className:"relative mt-2 flex flex-col gap-2",onKeyDown:x=>{x.stopPropagation(),x.key==="Escape"&&(n==null||n(!1))},children:[h.jsx("div",{className:"w-full px-3",children:h.jsx(ga,{type:"text",value:a,onChange:p,placeholder:s,className:i})}),h.jsx(Q0e,{mode:"single",month:c,selected:c,onMonthChange:b,onSelect:g,...o}),h.jsx("div",{className:"px-3 pb-2",children:r&&h.jsx(Js,{variant:"outline",tabIndex:0,className:"w-full !opacity-50 duration-200 hover:!opacity-100",onClick:()=>{t(null),u(void 0),l(""),n==null||n(!1)},children:"Clear"})})]})},tbe=A.forwardRef(({value:e,placeholder:t,className:n,...r},s)=>h.jsxs(Js,{ref:s,variant:"outline",className:Ve("bg-neutral-825 border-neutral-775 w-full justify-start whitespace-nowrap rounded-md border px-2 py-0 text-left flex items-center gap-1",n),...r,children:[h.jsx(BBe,{className:"h-4 w-4"}),e?h.jsx("span",{className:"text-white",children:lo(e,"PPP")}):h.jsx("span",{className:"text-gray",children:t??"Pick a date"})]}));tbe.displayName="DefaultButton";const Gvt=({inputProps:e,field:t,error:n,id:r})=>{const{key:s,...i}=e,[o,a]=A.useState(null);return A.useEffect(()=>{if(t.default){const l=new Date(t.default);dL(l)&&a(l)}},[t]),h.jsx(Wvt,{id:r,className:n?"border-destructive":"",value:o,setValue:l=>{const c=l&&new Date(l).toISOString();c&&(i.onChange({target:{value:c==null?void 0:c.toString(),name:e.name}}),a(new Date(c)))},clearable:!0})},Yvt=_0t,Kvt=N0t,nbe=A.forwardRef(({className:e,children:t,...n},r)=>h.jsxs(Oye,{ref:r,className:Ve("flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),...n,children:[t,h.jsx(P0t,{asChild:!0,children:h.jsx(Eh,{className:"h-4 w-4 opacity-50"})})]}));nbe.displayName=Oye.displayName;const rbe=A.forwardRef(({className:e,children:t,position:n="popper",...r},s)=>h.jsx(M0t,{children:h.jsx(Rye,{ref:s,className:Ve("relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:h.jsx(j0t,{className:Ve("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));rbe.displayName=Rye.displayName;const sbe=A.forwardRef(({className:e,children:t,...n},r)=>h.jsxs(Lye,{ref:r,className:Ve("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-mastra-el-5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[h.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:h.jsx(I0t,{children:h.jsx(kh,{className:"h-4 w-4"})})}),h.jsx(F0t,{children:t})]}));sbe.displayName=Lye.displayName;const Xvt=({field:e,inputProps:t,error:n,id:r,value:s})=>{const{key:i,...o}=t;return h.jsxs(Yvt,{...o,onValueChange:a=>{const l={target:{value:a,name:t.name}};o.onChange(l)},defaultValue:e.default,children:[h.jsx(nbe,{id:r,className:n?"border-destructive":"",children:h.jsx(Kvt,{placeholder:"Select an option"})}),h.jsx(rbe,{children:(e.options||[]).map(([a,l])=>h.jsx(sbe,{value:a,children:l},a))})]})},Jvt=({label:e,children:t})=>{const n=e!==""&&e!=="";return h.jsxs("div",{className:"",children:[n&&h.jsxs(Ue,{as:"h3",variant:"ui-sm",className:"text-icon3 flex items-center gap-1 pb-2",children:[h.jsx(ot,{size:"sm",children:h.jsx(aC,{})}),e]}),h.jsx("div",{className:n?"flex flex-col gap-1 [&>*]:border-dashed [&>*]:border-l [&>*]:border-l-border1 [&>*]:pl-4":"",children:t})]})},Zvt=({label:e,children:t,onAddItem:n})=>h.jsxs("div",{children:[h.jsxs("div",{className:"flex gap-2 justify-between",children:[h.jsxs(Ue,{as:"h3",variant:"ui-sm",className:"text-icon3 pb-2 flex items-center gap-1",children:[h.jsx(ot,{size:"sm",children:h.jsx(OBe,{})}),e]}),h.jsx(FC,{children:h.jsxs(Ta,{delayDuration:0,children:[h.jsx(_a,{asChild:!0,children:h.jsx("button",{onClick:n,type:"button",className:"text-icon3 bg-surface3 rounded-md p-1 hover:bg-surface4 hover:text-icon6 h-icon-sm w-icon-sm",children:h.jsx(ot,{size:"sm",children:h.jsx(cC,{})})})}),h.jsx(Vo,{children:"Add item"})]})})]}),h.jsx("div",{className:"flex flex-col gap-1",children:t})]}),Qvt=({children:e,onRemove:t})=>h.jsxs("div",{className:"pl-4 border-l border-border1",children:[e,h.jsxs(hn,{onClick:t,type:"button",children:[h.jsx(ot,{size:"sm",children:h.jsx(Ale,{})}),"Delete"]})]}),ewt=({inputProps:e,field:t,error:n,id:r})=>{const{key:s,onChange:i,...o}=e,[a,l]=A.useState(()=>Object.entries(t.default||{}).map(([b,x])=>({id:b||Gs(),key:b,value:x})));A.useEffect(()=>{a.length===0&&l([{id:Gs(),key:"",value:""}])},[a]);const c=A.useCallback(b=>{const x=b.reduce((S,E)=>(E.key&&(S[E.key]=E.value),S),{});i==null||i({target:{value:x,name:e.name}})},[i,e.name]),u=(b,x,S)=>{l(E=>E.map(k=>k.id===b?{...k,[x]:S}:k))},d=()=>{c(a)},p=()=>{const b=[...a,{id:Gs(),key:"",value:""}];l(b),c(b)},g=b=>{const x=a.filter(S=>S.id!==b);x.length===0&&x.push({id:Gs(),key:"",value:""}),l(x),c(x)};return h.jsxs("div",{className:"space-y-3",children:[a.map(b=>h.jsxs("div",{className:"relative space-y-2 rounded-lg border p-4",children:[h.jsx(Js,{type:"button",variant:"ghost",size:"icon",className:"absolute right-2 top-2",onClick:()=>g(b.id),children:h.jsx(Ale,{className:"h-4 w-4"})}),h.jsxs("div",{className:"space-y-2 pt-6",children:[h.jsx(ga,{placeholder:"Key",value:b.key,onChange:x=>u(b.id,"key",x.target.value),onBlur:d}),h.jsx(ga,{placeholder:"Value",value:b.value,onChange:x=>u(b.id,"value",x.target.value),onBlur:d})]})]},b.id)),h.jsxs(Js,{type:"button",variant:"outline",size:"sm",className:"w-full",onClick:p,children:[h.jsx(cC,{className:"mr-2 h-4 w-4"}),"Add Key-Value Pair"]})]})},twt={Form:jvt,FieldWrapper:Ivt,ErrorMessage:Lvt,SubmitButton:Bvt,ObjectWrapper:Jvt,ArrayWrapper:Zvt,ArrayElementWrapper:Qvt};function nwt({uiComponents:e,formComponents:t,readOnly:n,...r}){return h.jsx(wgt,{...r,uiComponents:{...twt,...e},formComponents:{string:s=>h.jsx($vt,{...s,inputProps:{...s.inputProps,readOnly:n}}),number:s=>h.jsx(zvt,{...s,inputProps:{...s.inputProps,readOnly:n}}),boolean:s=>h.jsx(Hvt,{...s,inputProps:{...s.inputProps,readOnly:n}}),date:s=>h.jsx(Gvt,{...s,inputProps:{...s.inputProps,readOnly:n}}),select:s=>h.jsx(Xvt,{...s,inputProps:{...s.inputProps,readOnly:n}}),record:s=>h.jsx(ewt,{...s,inputProps:{...s.inputProps,readOnly:n}}),...t}})}function rwt(e,t){return t!=null&&t.fieldType?t.fieldType:e instanceof ir?"object":e instanceof _u?"number":e instanceof xg?"boolean":e instanceof sh||e!=null&&e.isDatetime||e!=null&&e.isDate?"date":e instanceof ba?"string":e instanceof Pu||e instanceof wg?"select":e instanceof io?"array":e instanceof Mb?"record":"string"}function eF(e,t){var c;const n=tF(t),r=K3(t),s=rwt(n,r),i=w4(t),o=(c=n._def)==null?void 0:c.values;let a=[];o&&(Array.isArray(o)?a=o.map(u=>[u,u]):a=Object.entries(o));let l=[];return n instanceof ir&&(l=Object.entries(n.shape).map(([u,d])=>eF(u,d))),n instanceof io&&(l=[eF("0",n._def.type)]),{key:e,type:s,required:!t.isOptional(),default:i,description:n.description,fieldConfig:r,options:a,schema:l}}function tF(e){return"innerType"in e._def?tF(e._def.innerType):"schema"in e._def?tF(e._def.schema):e}function swt(e){const n=(e instanceof uo?e.innerType():e).shape;return{fields:Object.entries(n).map(([s,i])=>eF(s,i))}}class iwt extends Kmt{constructor(n){super(n);Le(this,"_schema");this._schema=n}parseSchema(){return swt(this._schema)}}function owt(e){return e instanceof ir?Object.keys(e.shape).length===0:!1}function nA({schema:e,onSubmit:t,defaultValues:n,isSubmitLoading:r,submitButtonLabel:s,className:i,readOnly:o}){const a=!(e instanceof ir);if(!e)return console.error("no form schema found"),null;const l=d=>owt(d)?HD.object({}):a?HD.object({"":d}):d,u={schema:new iwt(l(e)),onSubmit:async d=>{await(t==null?void 0:t(a?d[""]||{}:d))},defaultValues:a?n?{"":n}:void 0:n,formProps:{className:""},uiComponents:{SubmitButton:({children:d})=>t?h.jsx(hn,{variant:"light",className:"w-full",size:"lg",disabled:r,children:r?h.jsx(ot,{children:h.jsx(Da,{className:"animate-spin"})}):s||d}):null},formComponents:{Label:({value:d})=>h.jsx(u1,{className:"text-sm font-normal",children:d})},withSubmit:!0};return h.jsx(nwt,{...u,readOnly:o})}function rA(e){return Function("z",`"use strict";return (${e});`)(HD)}function FB({code:e="",language:t="ts",filename:n,className:r}){return h.jsxs(zd,{code:e,language:t,theme:z3.oneDark,children:[n?h.jsx("div",{className:"absolute w-full px-6 py-2 pl-4 text-sm rounded bg-mastra-bg-2 text-mastra-el-6/50",children:n}):null,h.jsx(zd.Code,{className:Ve("bg-transparent h-full p-6 rounded-xl whitespace-pre-wrap",n?"pt-10":"",r),children:h.jsx("div",{className:"table-row",children:h.jsxs("div",{className:"flex items-center",children:[h.jsx(zd.LineNumber,{className:"table-cell pr-4 text-sm text-right select-none text-gray-500/50"}),h.jsx(zd.LineContent,{className:"flex",children:h.jsx(zd.Token,{className:"font-mono text-sm mastra-token"})})]})})})]})}const IB=({header:e,children:t,footer:n})=>{const[r,s]=A.useState(!1);return h.jsxs("div",{className:"rounded-lg border-sm border-border1 bg-surface4",children:[h.jsxs("button",{className:"py-1 px-2 flex items-center gap-3 justify-between w-full",onClick:()=>s(i=>!i),children:[h.jsx("div",{className:"w-full",children:e}),h.jsx(ot,{children:h.jsx(Eh,{className:Ve("text-icon3 transition-transform -rotate-90",r&&"rotate-0")})})]}),t&&r&&h.jsx("div",{className:"border-t-sm border-border1",children:t}),n&&h.jsx("div",{className:"py-1 px-2 border-t-sm border-border1",children:n})]})},awt=({stepId:e,pathStatus:t,path:n})=>{const r=t==="completed"?"Completed":e===n?t.charAt(0).toUpperCase()+t.slice(1):t==="executing"?"Executing":"Completed";return h.jsx(IB,{header:h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsxs(ot,{children:[r==="Completed"&&h.jsx(q1,{className:"text-accent1"}),r==="Failed"&&h.jsx(G1,{className:"text-accent2"}),r==="Executing"&&h.jsx(Da,{className:"text-icon3 animate-spin"})]}),h.jsx(Ue,{as:"span",variant:"ui-lg",className:"text-icon6 font-medium",children:n})]})})},lwt=({jsonResult:e,sanitizedJsonResult:t})=>{const{handleCopy:n}=IC({text:e}),[r,s]=A.useState(!1);return h.jsx(IB,{header:h.jsxs("div",{className:"flex items-center gap-2 justify-between w-full",children:[h.jsxs(Ue,{variant:"ui-lg",className:"text-icon6 flex items-center gap-3 font-medium",children:[h.jsx(ot,{children:h.jsx(Rbt,{})}),"Workflow Execution (JSON)"]}),h.jsxs(Ta,{children:[h.jsx(_a,{asChild:!0,children:h.jsx("button",{className:"p-2 rounded-lg hover:bg-surface5 transition-colors duration-150 ease-in-out text-icon3 hover:text-icon6",onClick:()=>n(),children:h.jsx(ot,{size:"sm",children:h.jsx(Dh,{})})})}),h.jsx(Vo,{children:"Copy result"})]})]}),footer:h.jsx("button",{className:"w-full h-full text-center text-icon2 hover:text-icon6 text-ui-md",onClick:()=>s(i=>!i),children:r?"collapse":"expand"}),children:r?h.jsx(FB,{className:"w-full overflow-x-auto",code:t||e,language:"json"}):null})};function cwt({workflowId:e,setRunId:t}){var J;const{legacyResult:n,setLegacyResult:r,payload:s,setPayload:i}=A.useContext(zC),{isLoading:o,legacyWorkflow:a}=W0e(e),{createLegacyWorkflowRun:l,startLegacyWorkflowRun:c}=Gxt(),{watchLegacyWorkflow:u,legacyWatchResult:d,isWatchingLegacyWorkflow:p}=Yxt(),{resumeLegacyWorkflow:g,isResumingLegacyWorkflow:b}=Kxt(),[x,S]=A.useState([]),[E,k]=A.useState(!1),T=a==null?void 0:a.triggerSchema,P=async V=>{try{if(!a)return;k(!0),r(null);const{runId:Z}=await l({workflowId:e});t==null||t(Z),u({workflowId:e,runId:Z}),c({workflowId:e,runId:Z,input:V})}catch{k(!1),Fo.error("Error executing workflow")}},M=async V=>{if(!a)return;const{stepId:Z,runId:G,context:q}=V,{runId:z}=await l({workflowId:e,prevRunId:G});u({workflowId:e,runId:z}),await g({stepId:Z,runId:z,context:q,workflowId:e})},j=n??d,F=(j==null?void 0:j.activePaths)??{};if(A.useEffect(()=>{k(p)},[p]),A.useEffect(()=>{if(!(j!=null&&j.activePaths)||!(n!=null&&n.runId))return;const V=Object.entries(j.activePaths).filter(([Z,{status:G}])=>G==="suspended").map(([Z,{suspendPayload:G}])=>({stepId:Z,runId:n.runId,suspendPayload:G}));S(V)},[j,n]),A.useEffect(()=>{d&&r(d)},[d]),o)return h.jsx(N4,{className:"h-[calc(100vh-126px)] pt-2 px-4 pb-4 text-xs",children:h.jsxs("div",{className:"space-y-4",children:[h.jsx(as,{className:"h-10"}),h.jsx(as,{className:"h-10"})]})});if(!a)return null;const I=x.length>0,B=T?rA(Fg(c1(T))):null,{sanitizedOutput:L,...W}=n??{},$=Object.values(F).length>0;return h.jsx("div",{className:"h-full px-5 pt-3 pb-12",children:h.jsxs("div",{className:"space-y-4",children:[b&&h.jsxs("div",{className:"py-2 px-5 flex items-center gap-2 bg-surface5 -mx-5 -mt-5 border-b-sm border-border1",children:[h.jsx(ot,{children:h.jsx(Da,{className:"animate-spin text-icon6"})}),h.jsx(Ue,{children:"Resuming workflow"})]}),!I&&h.jsx(h.Fragment,{children:B?h.jsx(nA,{schema:B,defaultValues:s,isSubmitLoading:p,submitButtonLabel:"Run",onSubmit:V=>{i(V),P(V)}}):h.jsx(hn,{className:"w-full",variant:"light",disabled:E,onClick:()=>P(null),children:E?h.jsx(ot,{children:h.jsx(Da,{className:"animate-spin"})}):"Trigger"})}),I&&(x==null?void 0:x.map(V=>{const Z=a.steps[V.stepId],G=Z!=null&&Z.inputSchema?rA(Fg(c1(Z.inputSchema))):P1(Ge(),qo());return h.jsxs("div",{className:"flex flex-col px-4",children:[h.jsx(Ru,{variant:"secondary",className:"text-mastra-el-3",size:"xs",children:V.stepId}),V.suspendPayload&&h.jsx("div",{children:h.jsx(FB,{className:"w-full overflow-x-auto p-2",code:JSON.stringify(V.suspendPayload,null,2),language:"json"})}),h.jsx(nA,{schema:G,isSubmitLoading:b,submitButtonLabel:"Resume",onSubmit:q=>{M({stepId:V.stepId,runId:V.runId,suspendPayload:V.suspendPayload,context:q})}})]})})),$&&h.jsxs(h.Fragment,{children:[h.jsx("hr",{className:"border-border1 border-sm my-5"}),h.jsx("div",{className:"flex flex-col gap-4",children:(J=Object.entries(F))==null?void 0:J.map(([V,{status:Z,stepPath:G}])=>h.jsx("div",{className:"flex flex-col gap-1",children:G==null?void 0:G.map((q,z)=>h.jsx(awt,{stepId:V,pathStatus:Z,path:q},z))},V))})]}),n&&h.jsxs(h.Fragment,{children:[h.jsx("hr",{className:"border-border1 border-sm my-5"}),h.jsx(lwt,{sanitizedJsonResult:L,jsonResult:JSON.stringify(W,null,2)})]})]})})}const uwt=({stepId:e,status:t,result:n})=>h.jsx(IB,{header:h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsxs(ot,{children:[t==="success"&&h.jsx(q1,{className:"text-accent1"}),t==="failed"&&h.jsx(G1,{className:"text-accent2"}),t==="suspended"&&h.jsx(XBe,{className:"text-accent3"}),t==="waiting"&&h.jsx(aR,{className:"text-accent5"}),t==="running"&&h.jsx(Da,{className:"text-icon3 animate-spin"})]}),h.jsx(Ue,{as:"span",variant:"ui-lg",className:"text-icon6 font-medium",children:e.charAt(0).toUpperCase()+e.slice(1)})]}),children:h.jsxs("div",{className:"rounded-md bg-surface4 p-1 font-mono relative",children:[h.jsx(dg,{content:JSON.stringify(n,null,2),className:"absolute top-2 right-2 z-10"}),h.jsx(Xj,{data:n})]})}),hQ=({schema:e,defaultValues:t,isSubmitLoading:n,submitButtonLabel:r,onSubmit:s})=>{const[i,o]=A.useState("form");return h.jsxs("div",{children:[h.jsx(_4,{value:i,onValueChange:a=>o(a),className:"pb-4",children:h.jsxs("div",{className:"flex flex-row gap-4",children:[h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx(Lg,{value:"form",id:"form"}),h.jsx(u1,{htmlFor:"form",className:"!text-icon3 text-ui-sm",children:"Form"})]}),h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx(Lg,{value:"json",id:"json"}),h.jsx(u1,{htmlFor:"json",className:"!text-icon3 text-ui-sm",children:"JSON"})]})]})}),i==="form"?h.jsx(nA,{schema:e,defaultValues:t,isSubmitLoading:n,submitButtonLabel:r,onSubmit:s}):h.jsx(dwt,{schema:e,defaultValues:t,isSubmitLoading:n,submitButtonLabel:r,onSubmit:s})]})},dwt=({schema:e,defaultValues:t,isSubmitLoading:n,submitButtonLabel:r,onSubmit:s})=>{const[i,o]=A.useState([]),[a,l]=A.useState(JSON.stringify(t??{},null,2)),c=()=>{o([]);try{const u=e.safeParse(JSON.parse(a));u.success?s(u.data):o(u.error.issues.map(d=>`[${d.path.join(".")}] ${d.message}`))}catch{o(["Invalid JSON provided"])}};return h.jsxs("div",{className:"flex flex-col gap-4",children:[i.length>0&&h.jsxs("div",{className:"border-sm border-accent2 rounded-lg p-2",children:[h.jsxs(Ue,{as:"p",variant:"ui-md",className:"text-accent2 font-semibold",children:[i.length," errors found"]}),h.jsx("ul",{className:"list-disc list-inside",children:i.map((u,d)=>h.jsx("li",{className:"text-ui-sm text-accent2",children:u},d))})]}),h.jsx(hwt,{data:a,onChange:l}),h.jsx(hn,{variant:"light",onClick:c,className:"w-full",size:"lg",children:n?h.jsx(Da,{className:"animate-spin"}):r})]})},hwt=({data:e,onChange:t})=>{const n=i0e();return h.jsxs("div",{className:"rounded-md bg-[#1a1a1a] p-1 font-mono",children:[h.jsx(dg,{content:e,className:"absolute top-2 right-2 z-10"}),h.jsx(al,{value:e,theme:n,extensions:[Fu],onChange:t})]})};function fwt({workflowId:e,setRunId:t,workflow:n,isLoading:r,createWorkflowRun:s,resumeWorkflow:i,streamWorkflow:o,isStreamingWorkflow:a,streamResult:l,isResumingWorkflow:c,isCancellingWorkflowRun:u,cancelWorkflowRun:d}){var z,Y;const{runtimeContext:p}=dy(),{result:g,setResult:b,payload:x,setPayload:S}=A.useContext(zC),[E,k]=A.useState([]),[T,P]=A.useState(!1),[M,j]=A.useState(""),[F,I]=A.useState(null),B=n==null?void 0:n.inputSchema,L=async U=>{try{if(!n)return;P(!0),I(null),b(null);const{runId:X}=await s({workflowId:e});t==null||t(X),j(X),o({workflowId:e,runId:X,inputData:U,runtimeContext:p})}catch{P(!1),Fo.error("Error executing workflow")}},W=async U=>{if(!n)return;I(null);const{stepId:X,runId:ne,resumeData:H}=U,{runId:ee}=await s({workflowId:e,prevRunId:ne});await i({step:X,runId:ee,resumeData:H,workflowId:e,runtimeContext:p})},$=async()=>{const U=await d({workflowId:e,runId:M});I(U)},J=g??l;if(A.useEffect(()=>{P(a)},[a]),A.useEffect(()=>{var X,ne;if(!((ne=(X=J==null?void 0:J.payload)==null?void 0:X.workflowState)!=null&&ne.steps)||!(g!=null&&g.runId))return;const U=Object.entries(J.payload.workflowState.steps).filter(([H,{status:ee}])=>ee==="suspended").map(([H,{payload:ee}])=>({stepId:H,runId:g.runId,suspendPayload:ee,isLoading:!1}));k(U)},[J,g]),A.useEffect(()=>{l&&b(l)},[l]),r)return h.jsx(N4,{className:"h-[calc(100vh-126px)] pt-2 px-4 pb-4 text-xs",children:h.jsxs("div",{className:"space-y-4",children:[h.jsx(as,{className:"h-10"}),h.jsx(as,{className:"h-10"})]})});if(!n)return null;const V=E.length>0,Z=B?rA(Fg(c1(B))):null,G=((Y=(z=J==null?void 0:J.payload)==null?void 0:z.workflowState)==null?void 0:Y.steps)??{},q=Object.values(G).length>0;return h.jsxs("div",{className:"h-full pt-3 pb-12",children:[h.jsxs("div",{className:"space-y-4 px-5 pb-5 border-b-sm border-border1",children:[(c||V&&a)&&h.jsxs("div",{className:"py-2 px-5 flex items-center gap-2 bg-surface5 -mx-5 -mt-5 border-b-sm border-border1",children:[h.jsx(ot,{children:h.jsx(Da,{className:"animate-spin text-icon6"})}),h.jsx(Ue,{children:"Resuming workflow"})]}),!V&&h.jsx(h.Fragment,{children:Z?h.jsx(hQ,{schema:Z,defaultValues:x,isSubmitLoading:a,submitButtonLabel:"Run",onSubmit:U=>{S(U),L(U)}}):h.jsx(hn,{className:"w-full",variant:"light",disabled:T,onClick:()=>L(null),children:T?h.jsx(ot,{children:h.jsx(Da,{className:"animate-spin"})}):"Trigger"})}),!a&&V&&(E==null?void 0:E.map(U=>{const X=n.allSteps[U.stepId];if(!X||X.isWorkflow)return null;const ne=X!=null&&X.resumeSchema?rA(Fg(c1(X.resumeSchema))):P1(Ge(),qo());return h.jsxs("div",{className:"flex flex-col px-4",children:[h.jsx(Ru,{variant:"secondary",className:"text-mastra-el-3",size:"xs",children:U.stepId}),U.suspendPayload&&h.jsx("div",{children:h.jsx(FB,{className:"w-full overflow-x-auto p-2",code:JSON.stringify(U.suspendPayload,null,2),language:"json"})}),h.jsx(hQ,{schema:ne,isSubmitLoading:c,submitButtonLabel:"Resume",onSubmit:H=>{var ie;const ee=(ie=U.stepId)==null?void 0:ie.split(".");W({stepId:ee,runId:U.runId,suspendPayload:U.suspendPayload,resumeData:H})}})]},U.stepId)})),(g==null?void 0:g.runId)&&h.jsxs(hn,{variant:"light",className:"w-full",size:"lg",onClick:$,disabled:!!(F!=null&&F.message)||u,children:[u?h.jsx(ot,{children:h.jsx(Da,{className:"animate-spin"})}):h.jsx(ot,{children:h.jsx(ZBe,{})}),(F==null?void 0:F.message)||"Cancel Workflow Run"]}),q&&h.jsxs(h.Fragment,{children:[h.jsx("hr",{className:"border-border1 border-sm my-5"}),h.jsxs("div",{className:"flex flex-col gap-2",children:[h.jsx(Ru,{variant:"secondary",className:"px-4 text-mastra-el-3",size:"xs",children:"Status"}),h.jsx("div",{className:"px-4 flex flex-col gap-4",children:Object.entries(G).filter(([U,X])=>U!=="input"&&!U.endsWith(".input")).map(([U,{status:X,output:ne}])=>h.jsx(uwt,{stepId:U,status:X,result:ne??{}},U))})]})]})]}),g&&h.jsx("div",{className:"p-5 border-b-sm border-border1",children:h.jsx(pwt,{result:g})})]})}const pwt=({result:e})=>{const[t,n]=A.useState(!1);return h.jsxs(h.Fragment,{children:[h.jsxs(hn,{variant:"light",onClick:()=>n(!0),className:"w-full",size:"lg",children:[h.jsx(ot,{children:h.jsx(aC,{className:"text-icon3"})}),"Open Workflow Execution (JSON)"]}),h.jsx(No,{open:t,onOpenChange:n,children:h.jsx(OC,{children:h.jsxs(Zi,{className:"max-w-6xl max-h-[90vh] overflow-y-auto overflow-x-hidden bg-surface2",children:[h.jsx(Qi,{children:"Workflow Execution (JSON)"}),h.jsx("div",{className:"w-full h-full overflow-x-scroll",children:h.jsx(Uj,{data:e,className:"p-4"})})]})})})]})},mwt=({workflowId:e,runId:t,isLoading:n,runs:r,onPressRun:s})=>n?h.jsx("div",{className:"p-4",children:h.jsx(as,{className:"h-[600px]"})}):r.length===0?h.jsx("div",{className:"p-4",children:h.jsx(Ue,{variant:"ui-md",className:"text-icon6 text-center",children:"No previous run"})}):h.jsx("ol",{className:"pb-10",children:r.map(i=>{var o,a;return h.jsx("li",{children:h.jsxs("button",{onClick:()=>s({workflowId:e,runId:i.runId}),className:zn("px-3 py-2 border-b-sm border-border1 block w-full hover:bg-surface4 text-left",{"bg-surface4":i.runId===t}),children:[h.jsx(Ue,{variant:"ui-lg",className:"font-medium text-icon6 truncate",as:"p",children:i.runId}),h.jsx(Ue,{variant:"ui-sm",className:"font-medium text-icon3 truncate",as:"p",children:typeof(i==null?void 0:i.snapshot)=="string"?"":(o=i==null?void 0:i.snapshot)!=null&&o.timestamp?lo((a=i==null?void 0:i.snapshot)==null?void 0:a.timestamp,"MMM d, yyyy h:mm a"):""})]})},i.runId)})}),gwt=[{id:"name",header:"Name",cell:({row:e})=>{const{Link:t}=BC();return h.jsx(SB,{icon:h.jsx(kc,{}),name:h.jsx(t,{href:e.original.link,children:e.original.name}),description:void 0,meta:void 0})},meta:{width:"auto"}},{id:"stepsCount",header:"Steps",size:300,cell:({row:e})=>h.jsx(Dr,{children:h.jsxs("div",{className:"flex justify-end items-center gap-2",children:[h.jsxs(Un,{icon:h.jsx(kle,{}),className:"!h-button-md",children:[e.original.stepsCount," step",e.original.stepsCount>1?"s":""]}),e.original.isLegacy?h.jsx(Un,{className:"!text-foreground/80 !h-button-md",children:"Legacy"}):null]})})}];function ywt({workflows:e,legacyWorkflows:t,isLoading:n,onClickRow:r}){const s=A.useMemo(()=>{const l=Object.keys(e??{}).map(u=>{var p;const d=e==null?void 0:e[u];return{id:u,name:(d==null?void 0:d.name)||"N/A",stepsCount:(p=Object.keys((d==null?void 0:d.steps)??{}))==null?void 0:p.length,isLegacy:!1,link:`/workflows/${u}/graph`}}),c=Object.keys(t??{}).map(u=>{var p;const d=t==null?void 0:t[u];return{id:u,name:(d==null?void 0:d.name)||"N/A",stepsCount:(p=Object.keys((d==null?void 0:d.steps)??{}))==null?void 0:p.length,isLegacy:!0,link:`/workflows/legacy/${u}/graph`}});return[...l,...c]},[e,t]),i=TL({data:s,columns:gwt,getCoreRowModel:AL()});if(n)return h.jsx(bwt,{});const o=i.getHeaderGroups()[0],a=i.getRowModel().rows.concat();return a.length===0?h.jsx(xwt,{}):h.jsx(TB,{children:h.jsxs(hy,{children:[h.jsx(fy,{className:"sticky top-0",children:o.headers.map(l=>h.jsx(Xs,{style:{width:l.index===0?"auto":l.column.getSize()},children:Qb(l.column.columnDef.header,l.getContext())},l.id))}),h.jsx(Mh,{children:a.map(l=>h.jsx(jh,{onClick:()=>r(l.original.id),children:l.getVisibleCells().map(c=>h.jsx(Se.Fragment,{children:Qb(c.column.columnDef.cell,c.getContext())},c.id))},l.id))})]})})}const bwt=()=>h.jsxs(hy,{children:[h.jsxs(fy,{children:[h.jsx(Xs,{children:"Name"}),h.jsx(Xs,{width:300,children:"Steps"})]}),h.jsx(Mh,{children:Array.from({length:3}).map((e,t)=>h.jsxs(jh,{children:[h.jsx(Dr,{children:h.jsx(as,{className:"h-4 w-1/2"})}),h.jsx(Dr,{width:300,children:h.jsx(as,{className:"h-4 w-1/2"})})]},t))})]}),xwt=()=>h.jsx("div",{className:"flex h-full items-center justify-center",children:h.jsx(LC,{iconSlot:h.jsx(Ubt,{}),titleSlot:"Configure Workflows",descriptionSlot:"Mastra workflows are not configured yet. You can find more information in the documentation.",actionSlot:h.jsxs(hn,{size:"lg",className:"w-full",variant:"light",as:"a",href:"https://mastra.ai/en/docs/workflows/overview",target:"_blank",children:[h.jsx(ot,{children:h.jsx(kc,{})}),"Docs"]})})});function yl({children:e,className:t,style:n}){const r=ibe("MainContentLayout");return h.jsx("main",{className:Ve("grid grid-rows-[auto_1fr] h-full items-start content-start",t),style:{...n,...r?{border:"3px dotted red"}:{}},children:e})}function ho({children:e,className:t,isCentered:n=!1,isDivided:r=!1,hasLeftServiceColumn:s=!1,style:i}){const o=ibe("MainContentContent");return h.jsx("div",{className:Ve("grid overflow-y-auto h-full ","overflow-x-auto min-w-[min-content]",{"items-start content-start":!n&&!r&&!s,"grid place-items-center":n,"grid-cols-[1fr_1fr]":r&&!s,"grid-cols-[auto_1fr_1fr]":r&&s,"grid-cols-[auto_1fr]":!r&&s},t),style:{...i,...o?{border:"3px dotted orange"}:{}},children:e})}function ibe(e){try{const t=localStorage.getItem("add-dev-style-to-components");return t?t.split(",").map(r=>r.trim()).filter(Boolean).includes(e):!1}catch(t){return console.error("Error reading or parsing localStorage:",t),!1}}const obe=({children:e})=>h.jsx("nav",{className:"bg-surface2 border-r-sm border-border1 min-h-full overflow-hidden",children:e}),sA=({children:e,as:t="a",href:n,className:r,prefetch:s,to:i})=>h.jsx(t,{href:n,prefetch:s,to:i,className:zn("text-ui-sm flex h-full w-full flex-col justify-center font-medium",r),children:e}),abe=({children:e})=>h.jsx("ol",{children:e}),iA=({children:e,isActive:t})=>h.jsx("li",{className:zn("border-b-sm border-border1 hover:bg-surface3 group flex h-[54px] items-center justify-between gap-2 pl-5 py-2",t&&"bg-surface4"),children:e}),lbe=({onClick:e})=>h.jsx(hn,{className:"shrink-0 border-none bg-transparent opacity-0 transition-all group-focus-within:opacity-100 group-hover:opacity-100",onClick:e,children:h.jsx(ot,{children:h.jsx($b,{"aria-label":"delete thread",className:"text-icon3"})})}),Yd=({children:e,label:t})=>h.jsx("nav",{"aria-label":t,children:h.jsx("ol",{className:"gap-sm flex items-center",children:e})}),Vr=({className:e,as:t,isCurrent:n,...r})=>{const s=t||"span";return h.jsxs(h.Fragment,{children:[h.jsx("li",{className:"flex h-full items-center",children:h.jsx(s,{"aria-current":n?"page":void 0,className:zn("text-ui-lg leading-ui-lg font-medium",n?"text-white":"text-icon3",e),...r})}),!n&&h.jsx("li",{role:"separator",className:"flex h-full items-center",children:h.jsx(ot,{className:"text-icon3",children:h.jsx(Vbt,{})})})]})},fQ=e=>h.jsxs("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"21",height:"21",viewBox:"0 0 21 21",fill:"none",children:[h.jsx("rect",{x:"0.605469",y:"0.5",width:"20",height:"20",rx:"2.18625",fill:"black"}),h.jsx("circle",{cx:"10.6059",cy:"10.5004",r:"6.0121",stroke:"url(#paint0_linear_18520_30330)",strokeWidth:"0.766389"}),h.jsx("ellipse",{cx:"10.6069",cy:"10.501",rx:"6.0121",ry:"4.0324",transform:"rotate(45 10.6069 10.501)",stroke:"url(#paint1_linear_18520_30330)",strokeWidth:"0.766389"}),h.jsx("path",{d:"M8.15234 10.5234H13.0931",stroke:"url(#paint2_linear_18520_30330)",strokeWidth:"0.766389"}),h.jsx("path",{d:"M9.36523 11.7773L11.8755 9.26708",stroke:"url(#paint3_linear_18520_30330)",strokeWidth:"0.766389"}),h.jsx("path",{d:"M11.877 11.7773L9.36669 9.26708",stroke:"url(#paint4_linear_18520_30330)",strokeWidth:"0.766389"}),h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.49185 7.85663C5.44831 8.55655 4.84055 9.49673 4.84055 10.5025C4.84055 11.5082 5.44831 12.4484 6.49185 13.1483C7.5338 13.8472 8.98737 14.2875 10.6052 14.2875C12.2231 14.2875 13.6767 13.8472 14.7186 13.1483C15.7621 12.4484 16.3699 11.5082 16.3699 10.5025C16.3699 9.49673 15.7621 8.55655 14.7186 7.85663C13.6767 7.15778 12.2231 6.7175 10.6052 6.7175C8.98737 6.7175 7.5338 7.15778 6.49185 7.85663ZM6.21621 7.44566C7.35021 6.68507 8.9027 6.22266 10.6052 6.22266C12.3078 6.22266 13.8602 6.68507 14.9942 7.44566C16.1267 8.20518 16.8648 9.2812 16.8648 10.5025C16.8648 11.7238 16.1267 12.7998 14.9942 13.5593C13.8602 14.3199 12.3078 14.7823 10.6052 14.7823C8.9027 14.7823 7.35021 14.3199 6.21621 13.5593C5.0838 12.7998 4.3457 11.7238 4.3457 10.5025C4.3457 9.2812 5.0838 8.20518 6.21621 7.44566Z",fill:"url(#paint5_linear_18520_30330)"}),h.jsxs("defs",{children:[h.jsxs("linearGradient",{id:"paint0_linear_18520_30330",x1:"10.6059",y1:"4.48828",x2:"10.6059",y2:"16.5125",gradientUnits:"userSpaceOnUse",children:[h.jsx("stop",{stopColor:"#CACACA"}),h.jsx("stop",{offset:"1",stopColor:"#5C5C5C"})]}),h.jsxs("linearGradient",{id:"paint1_linear_18520_30330",x1:"10.6069",y1:"6.46857",x2:"10.6069",y2:"14.5334",gradientUnits:"userSpaceOnUse",children:[h.jsx("stop",{stopColor:"#CACACA"}),h.jsx("stop",{offset:"1",stopColor:"#5C5C5C"})]}),h.jsxs("linearGradient",{id:"paint2_linear_18520_30330",x1:"10.6227",y1:"10.5234",x2:"10.6227",y2:"11.5234",gradientUnits:"userSpaceOnUse",children:[h.jsx("stop",{stopColor:"#CACACA"}),h.jsx("stop",{offset:"1",stopColor:"#5C5C5C"})]}),h.jsxs("linearGradient",{id:"paint3_linear_18520_30330",x1:"10.6204",y1:"10.5222",x2:"11.3275",y2:"11.2293",gradientUnits:"userSpaceOnUse",children:[h.jsx("stop",{stopColor:"#CACACA"}),h.jsx("stop",{offset:"1",stopColor:"#5C5C5C"})]}),h.jsxs("linearGradient",{id:"paint4_linear_18520_30330",x1:"10.6218",y1:"10.5222",x2:"11.3289",y2:"9.81511",gradientUnits:"userSpaceOnUse",children:[h.jsx("stop",{stopColor:"#CACACA"}),h.jsx("stop",{offset:"1",stopColor:"#5C5C5C"})]}),h.jsxs("linearGradient",{id:"paint5_linear_18520_30330",x1:"10.6052",y1:"6.22266",x2:"10.6052",y2:"14.7823",gradientUnits:"userSpaceOnUse",children:[h.jsx("stop",{stopColor:"#CACACA"}),h.jsx("stop",{offset:"1",stopColor:"#5C5C5C"})]})]})]}),vwt=[{name:"Agents",url:"/agents",icon:Nh},{name:"Networks",url:"/networks",icon:mCe},{name:"Tools",url:"/tools",icon:gl},{name:"MCP Servers",url:"/mcps",icon:T4},{name:"Workflows",url:"/workflows",icon:kc},{name:"Runtime Context",url:"/runtime-context",icon:dCe}];function wwt(){const{state:e,toggleSidebar:t}=eC(),r=xc().pathname;return h.jsxs(toe,{collapsible:"icon",children:[h.jsxs(roe,{className:"w-full pl-1 pt-3 pb-0",children:[h.jsxs("div",{className:"flex justify-between gap-2 items-center",children:[h.jsx("span",{className:"flex shrink-0",children:e==="collapsed"?h.jsx(fQ,{className:"h-10 w-10 shrink-0 ml-1"}):h.jsxs("span",{className:"flex items-center gap-0.5 pl-1",children:[h.jsx(fQ,{className:"h-10 w-10 shrink-0"}),h.jsx("span",{className:"font-serif text-sm",children:"Mastra"})]})}),e==="expanded"&&h.jsxs(Kl,{children:[h.jsx(Xl,{asChild:!0,children:h.jsx(y0,{onClick:()=>t(),className:"w-8 text-icon3",children:h.jsx(zV,{})})}),h.jsx(nl,{className:"bg-border1 font-sans text-icon6",children:"Collapse sidebar"})]})]}),e==="collapsed"&&h.jsx(y0,{onClick:()=>t(),tooltip:"Expand sidebar",className:"w-8 text-icon3 ml-2 absolute mt-[52px] p-1",children:h.jsx(zV,{className:"rotate-180"})})]}),h.jsx(ioe,{className:ic("p-1 transition-transform",e==="collapsed"&&"translate-y-10"),children:h.jsx(wP,{children:h.jsx(SP,{children:h.jsx(CP,{children:vwt.map((s,i)=>{const[o,a]=r.split("/"),l=s.name.toLowerCase(),c=s.url===r||s.name===r||a===l;return h.jsx(VE,{children:h.jsx(y0,{tooltip:s.name,asChild:!0,children:h.jsxs(Zt,{className:`group/icon pr-4 ${c?"text-primary bg-muted/50":"text-[#939393]"}`,to:s.url,children:[h.jsx(ot,{children:h.jsx(s.icon,{})}),h.jsx("span",{className:"text-[0.8rem] font-normal",children:s.name})]})})},`${s.name}-${i}`)})})})})}),h.jsx(soe,{className:"px-1",children:h.jsx(wP,{children:h.jsx(SP,{children:h.jsxs(CP,{children:[h.jsx(VE,{children:h.jsx(y0,{tooltip:"Documentation",asChild:!0,children:h.jsxs("a",{className:"group/icon text-[#939393]",href:"https://mastra.ai/docs",target:"_blank",rel:"noopener",children:[h.jsx(ot,{children:h.jsx(eCe,{})}),h.jsx("span",{className:"text-[0.8rem] font-normal",children:"Documentation"})]})})}),h.jsx(VE,{children:h.jsx(y0,{tooltip:"Github",asChild:!0,children:h.jsxs("a",{className:"group/icon text-[#939393]",href:"https://github.com/mastra-ai/mastra",target:"_blank",rel:"noopener",children:[h.jsx(ot,{children:h.jsx(Bbt,{})}),h.jsx("span",{className:"text-[0.8rem] font-normal",children:"Github"})]})})})]})})})}),h.jsx(noe,{})]})}var Swt=(e,t,n,r,s,i,o,a)=>{let l=document.documentElement,c=["light","dark"];function u(g){(Array.isArray(e)?e:[e]).forEach(b=>{let x=b==="class",S=x&&i?s.map(E=>i[E]||E):s;x?(l.classList.remove(...S),l.classList.add(i&&i[g]?i[g]:g)):l.setAttribute(b,g)}),d(g)}function d(g){a&&c.includes(g)&&(l.style.colorScheme=g)}function p(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)u(r);else try{let g=localStorage.getItem(t)||n,b=o&&g==="system"?p():g;u(b)}catch{}},Cwt=A.createContext(void 0),kwt={setTheme:e=>{},themes:[]},Ewt=()=>{var e;return(e=A.useContext(Cwt))!=null?e:kwt};A.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:i,value:o,themes:a,nonce:l,scriptProps:c})=>{let u=JSON.stringify([n,t,i,e,a,o,r,s]).slice(1,-1);return A.createElement("script",{...c,suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(${Swt.toString()})(${u})`}})});const Dwt=({...e})=>{const{theme:t="system"}=Ewt();return h.jsx(NDe,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-surface3 group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})},Awt=A.createContext({theme:"system",setTheme:()=>null});function Twt({children:e,defaultTheme:t="system"}){const[n,r]=A.useState(t);return A.useEffect(()=>{const s=window.document.documentElement;if(s.classList.remove("light","dark"),n==="system"){const i=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";s.classList.add(i);return}s.classList.add(n)},[n]),h.jsx(Awt.Provider,{value:{theme:n,setTheme:r},children:e})}const pQ=({children:e})=>h.jsx("div",{className:"bg-surface1 font-sans h-screen",children:h.jsx(Twt,{defaultTheme:"dark",attribute:"class",children:h.jsxs(eoe,{children:[h.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[auto_1fr] h-full",children:[h.jsx(wwt,{}),h.jsx("div",{className:"bg-surface2 my-3 mr-3 rounded-lg border-sm border-border1 overflow-y-auto",children:e})]}),h.jsx(Dwt,{position:"bottom-right"})]})})}),Dn=new LO({baseUrl:"",headers:{"x-mastra-dev-playground":"true"}}),cbe=()=>{const[e,t]=A.useState({}),[n,r]=A.useState(!0);return A.useEffect(()=>{(async()=>{r(!0);try{const i=await Dn.getAgents();t(i)}catch(i){t({}),console.error("Error fetching agents",i),Nr.error("Error fetching agents")}finally{r(!1)}})()},[]),{agents:e,isLoading:n}},K1=e=>{const[t,n]=A.useState(null),[r,s]=A.useState(!0);return A.useEffect(()=>{(async()=>{s(!0);try{if(!e){n(null),s(!1);return}const o=await Dn.getAgent(e).details();n(o)}catch(o){n(null),console.error("Error fetching agent",o),Nr.error("Error fetching agent")}finally{s(!1)}})()},[e]),{agent:t,isLoading:r}};function _wt({agentName:e,agentId:t}){return h.jsxs(us,{children:[h.jsxs(Yd,{children:[h.jsx(Vr,{as:Zt,to:"/agents",children:"Agents"}),h.jsx(Vr,{as:Zt,to:`/agents/${t}`,isCurrent:!0,children:e})]}),h.jsxs(kB,{children:[h.jsx(hn,{as:Zt,to:`/agents/${t}/chat`,children:"Chat"}),h.jsx(Lbt,{}),h.jsx(hn,{as:Zt,to:`/agents/${t}/traces`,children:"Traces"}),h.jsx(hn,{as:Zt,to:`/agents/${t}/evals`,children:"Evals"})]})]})}const Nwt=({children:e})=>{const{agentId:t}=Cs(),{agent:n,isLoading:r}=K1(t);return h.jsxs(yl,{children:[r?h.jsx(us,{children:h.jsx(Xu,{children:h.jsx($n,{className:"h-6 w-[200px]"})})}):h.jsx(_wt,{agentName:n==null?void 0:n.name,agentId:t}),e]})};var X1=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Bg=typeof window>"u"||"Deno"in globalThis;function Ji(){}function Pwt(e,t){return typeof e=="function"?e(t):e}function nF(e){return typeof e=="number"&&e>=0&&e!==1/0}function ube(e,t){return Math.max(e+(t||0)-Date.now(),0)}function op(e,t){return typeof e=="function"?e(t):e}function ql(e,t){return typeof e=="function"?e(t):e}function mQ(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==OB(o,t.options))return!1}else if(!AS(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||i&&!i(t))}function gQ(e,t){const{exact:n,status:r,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if($g(t.options.mutationKey)!==$g(i))return!1}else if(!AS(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function OB(e,t){return((t==null?void 0:t.queryKeyHashFn)||$g)(e)}function $g(e){return JSON.stringify(e,(t,n)=>rF(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function AS(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>AS(e[n],t[n])):!1}function dbe(e,t){if(e===t)return e;const n=yQ(e)&&yQ(t);if(n||rF(e)&&rF(t)){const r=n?e:Object.keys(e),s=r.length,i=n?t:Object.keys(t),o=i.length,a=n?[]:{},l=new Set(r);let c=0;for(let u=0;u<o;u++){const d=n?u:i[u];(!n&&l.has(d)||n)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,c++):(a[d]=dbe(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&c++)}return s===o&&c===s?e:a}return t}function oA(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function yQ(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function rF(e){if(!bQ(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!bQ(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function bQ(e){return Object.prototype.toString.call(e)==="[object Object]"}function Mwt(e){return new Promise(t=>{setTimeout(t,e)})}function sF(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?dbe(e,t):t}function jwt(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Fwt(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var RB=Symbol();function hbe(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===RB?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function fbe(e,t){return typeof e=="function"?e(...t):!!e}var Gm,Rf,lb,$ee,Iwt=($ee=class extends X1{constructor(){super();Ot(this,Gm);Ot(this,Rf);Ot(this,lb);pt(this,lb,t=>{if(!Bg&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){me(this,Rf)||this.setEventListener(me(this,lb))}onUnsubscribe(){var t;this.hasListeners()||((t=me(this,Rf))==null||t.call(this),pt(this,Rf,void 0))}setEventListener(t){var n;pt(this,lb,t),(n=me(this,Rf))==null||n.call(this),pt(this,Rf,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){me(this,Gm)!==t&&(pt(this,Gm,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof me(this,Gm)=="boolean"?me(this,Gm):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Gm=new WeakMap,Rf=new WeakMap,lb=new WeakMap,$ee),LB=new Iwt,cb,Lf,ub,zee,Owt=(zee=class extends X1{constructor(){super();Ot(this,cb,!0);Ot(this,Lf);Ot(this,ub);pt(this,ub,t=>{if(!Bg&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){me(this,Lf)||this.setEventListener(me(this,ub))}onUnsubscribe(){var t;this.hasListeners()||((t=me(this,Lf))==null||t.call(this),pt(this,Lf,void 0))}setEventListener(t){var n;pt(this,ub,t),(n=me(this,Lf))==null||n.call(this),pt(this,Lf,t(this.setOnline.bind(this)))}setOnline(t){me(this,cb)!==t&&(pt(this,cb,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return me(this,cb)}},cb=new WeakMap,Lf=new WeakMap,ub=new WeakMap,zee),aA=new Owt;function iF(){let e,t;const n=new Promise((s,i)=>{e=s,t=i});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}function Rwt(e){return Math.min(1e3*2**e,3e4)}function pbe(e){return(e??"online")==="online"?aA.isOnline():!0}var mbe=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function f7(e){return e instanceof mbe}function gbe(e){let t=!1,n=0,r=!1,s;const i=iF(),o=x=>{var S;r||(p(new mbe(x)),(S=e.abort)==null||S.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>LB.isFocused()&&(e.networkMode==="always"||aA.isOnline())&&e.canRun(),u=()=>pbe(e.networkMode)&&e.canRun(),d=x=>{var S;r||(r=!0,(S=e.onSuccess)==null||S.call(e,x),s==null||s(),i.resolve(x))},p=x=>{var S;r||(r=!0,(S=e.onError)==null||S.call(e,x),s==null||s(),i.reject(x))},g=()=>new Promise(x=>{var S;s=E=>{(r||c())&&x(E)},(S=e.onPause)==null||S.call(e)}).then(()=>{var x;s=void 0,r||(x=e.onContinue)==null||x.call(e)}),b=()=>{if(r)return;let x;const S=n===0?e.initialPromise:void 0;try{x=S??e.fn()}catch(E){x=Promise.reject(E)}Promise.resolve(x).then(d).catch(E=>{var j;if(r)return;const k=e.retry??(Bg?0:3),T=e.retryDelay??Rwt,P=typeof T=="function"?T(n,E):T,M=k===!0||typeof k=="number"&&n<k||typeof k=="function"&&k(n,E);if(t||!M){p(E);return}n++,(j=e.onFail)==null||j.call(e,n,E),Mwt(P).then(()=>c()?void 0:g()).then(()=>{t?p(E):b()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?b():g().then(b),i)}}var Lwt=e=>setTimeout(e,0);function Bwt(){let e=[],t=0,n=a=>{a()},r=a=>{a()},s=Lwt;const i=a=>{t?e.push(a):s(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&s(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{s=a}}}var Fs=Bwt(),Ym,Hee,ybe=(Hee=class{constructor(){Ot(this,Ym)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),nF(this.gcTime)&&pt(this,Ym,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Bg?1/0:5*60*1e3))}clearGcTimeout(){me(this,Ym)&&(clearTimeout(me(this,Ym)),pt(this,Ym,void 0))}},Ym=new WeakMap,Hee),db,Km,Ka,Xm,ki,jS,Jm,Hl,Ed,Vee,$wt=(Vee=class extends ybe{constructor(t){super();Ot(this,Hl);Ot(this,db);Ot(this,Km);Ot(this,Ka);Ot(this,Xm);Ot(this,ki);Ot(this,jS);Ot(this,Jm);pt(this,Jm,!1),pt(this,jS,t.defaultOptions),this.setOptions(t.options),this.observers=[],pt(this,Xm,t.client),pt(this,Ka,me(this,Xm).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,pt(this,db,zwt(this.options)),this.state=t.state??me(this,db),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=me(this,ki))==null?void 0:t.promise}setOptions(t){this.options={...me(this,jS),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&me(this,Ka).remove(this)}setData(t,n){const r=sF(this.state.data,t,this.options);return ln(this,Hl,Ed).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){ln(this,Hl,Ed).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=me(this,ki))==null?void 0:r.promise;return(s=me(this,ki))==null||s.cancel(t),n?n.then(Ji).catch(Ji):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(me(this,db))}isActive(){return this.observers.some(t=>ql(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===RB||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>op(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!ube(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=me(this,ki))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=me(this,ki))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),me(this,Ka).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(me(this,ki)&&(me(this,Jm)?me(this,ki).cancel({revert:!0}):me(this,ki).cancelRetry()),this.scheduleGc()),me(this,Ka).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ln(this,Hl,Ed).call(this,{type:"invalidate"})}fetch(t,n){var c,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(me(this,ki))return me(this,ki).continueRetry(),me(this,ki).promise}if(t&&this.setOptions(t),!this.options.queryFn){const p=this.observers.find(g=>g.options.queryFn);p&&this.setOptions(p.options)}const r=new AbortController,s=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(pt(this,Jm,!0),r.signal)})},i=()=>{const p=hbe(this.options,n),b=(()=>{const x={client:me(this,Xm),queryKey:this.queryKey,meta:this.meta};return s(x),x})();return pt(this,Jm,!1),this.options.persister?this.options.persister(p,b,this):p(b)},a=(()=>{const p={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:me(this,Xm),state:this.state,fetchFn:i};return s(p),p})();(c=this.options.behavior)==null||c.onFetch(a,this),pt(this,Km,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&ln(this,Hl,Ed).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const l=p=>{var g,b,x,S;f7(p)&&p.silent||ln(this,Hl,Ed).call(this,{type:"error",error:p}),f7(p)||((b=(g=me(this,Ka).config).onError)==null||b.call(g,p,this),(S=(x=me(this,Ka).config).onSettled)==null||S.call(x,this.state.data,p,this)),this.scheduleGc()};return pt(this,ki,gbe({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:p=>{var g,b,x,S;if(p===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(p)}catch(E){l(E);return}(b=(g=me(this,Ka).config).onSuccess)==null||b.call(g,p,this),(S=(x=me(this,Ka).config).onSettled)==null||S.call(x,p,this.state.error,this),this.scheduleGc()},onError:l,onFail:(p,g)=>{ln(this,Hl,Ed).call(this,{type:"failed",failureCount:p,error:g})},onPause:()=>{ln(this,Hl,Ed).call(this,{type:"pause"})},onContinue:()=>{ln(this,Hl,Ed).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),me(this,ki).start()}},db=new WeakMap,Km=new WeakMap,Ka=new WeakMap,Xm=new WeakMap,ki=new WeakMap,jS=new WeakMap,Jm=new WeakMap,Hl=new WeakSet,Ed=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...bbe(r.data,this.options),fetchMeta:t.meta??null};case"success":return pt(this,Km,void 0),{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return f7(s)&&s.revert&&me(this,Km)?{...me(this,Km),fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Fs.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),me(this,Ka).notify({query:this,type:"updated",action:t})})},Vee);function bbe(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:pbe(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function zwt(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Yc,Uee,Hwt=(Uee=class extends X1{constructor(t={}){super();Ot(this,Yc);this.config=t,pt(this,Yc,new Map)}build(t,n,r){const s=n.queryKey,i=n.queryHash??OB(s,n);let o=this.get(i);return o||(o=new $wt({client:t,queryKey:s,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){me(this,Yc).has(t.queryHash)||(me(this,Yc).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=me(this,Yc).get(t.queryHash);n&&(t.destroy(),n===t&&me(this,Yc).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Fs.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return me(this,Yc).get(t)}getAll(){return[...me(this,Yc).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>mQ(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>mQ(t,r)):n}notify(t){Fs.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Fs.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Fs.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Yc=new WeakMap,Uee),Kc,Wi,Zm,Xc,Nf,Wee,Vwt=(Wee=class extends ybe{constructor(t){super();Ot(this,Xc);Ot(this,Kc);Ot(this,Wi);Ot(this,Zm);this.mutationId=t.mutationId,pt(this,Wi,t.mutationCache),pt(this,Kc,[]),this.state=t.state||xbe(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){me(this,Kc).includes(t)||(me(this,Kc).push(t),this.clearGcTimeout(),me(this,Wi).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){pt(this,Kc,me(this,Kc).filter(n=>n!==t)),this.scheduleGc(),me(this,Wi).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){me(this,Kc).length||(this.state.status==="pending"?this.scheduleGc():me(this,Wi).remove(this))}continue(){var t;return((t=me(this,Zm))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,a,l,c,u,d,p,g,b,x,S,E,k,T,P,M,j,F,I;const n=()=>{ln(this,Xc,Nf).call(this,{type:"continue"})};pt(this,Zm,gbe({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(B,L)=>{ln(this,Xc,Nf).call(this,{type:"failed",failureCount:B,error:L})},onPause:()=>{ln(this,Xc,Nf).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>me(this,Wi).canRun(this)}));const r=this.state.status==="pending",s=!me(this,Zm).canStart();try{if(r)n();else{ln(this,Xc,Nf).call(this,{type:"pending",variables:t,isPaused:s}),await((o=(i=me(this,Wi).config).onMutate)==null?void 0:o.call(i,t,this));const L=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));L!==this.state.context&&ln(this,Xc,Nf).call(this,{type:"pending",context:L,variables:t,isPaused:s})}const B=await me(this,Zm).start();return await((u=(c=me(this,Wi).config).onSuccess)==null?void 0:u.call(c,B,t,this.state.context,this)),await((p=(d=this.options).onSuccess)==null?void 0:p.call(d,B,t,this.state.context)),await((b=(g=me(this,Wi).config).onSettled)==null?void 0:b.call(g,B,null,this.state.variables,this.state.context,this)),await((S=(x=this.options).onSettled)==null?void 0:S.call(x,B,null,t,this.state.context)),ln(this,Xc,Nf).call(this,{type:"success",data:B}),B}catch(B){try{throw await((k=(E=me(this,Wi).config).onError)==null?void 0:k.call(E,B,t,this.state.context,this)),await((P=(T=this.options).onError)==null?void 0:P.call(T,B,t,this.state.context)),await((j=(M=me(this,Wi).config).onSettled)==null?void 0:j.call(M,void 0,B,this.state.variables,this.state.context,this)),await((I=(F=this.options).onSettled)==null?void 0:I.call(F,void 0,B,t,this.state.context)),B}finally{ln(this,Xc,Nf).call(this,{type:"error",error:B})}}finally{me(this,Wi).runNext(this)}}},Kc=new WeakMap,Wi=new WeakMap,Zm=new WeakMap,Xc=new WeakSet,Nf=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Fs.batch(()=>{me(this,Kc).forEach(r=>{r.onMutationUpdate(t)}),me(this,Wi).notify({mutation:this,type:"updated",action:t})})},Wee);function xbe(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ld,Vl,FS,qee,Uwt=(qee=class extends X1{constructor(t={}){super();Ot(this,Ld);Ot(this,Vl);Ot(this,FS);this.config=t,pt(this,Ld,new Set),pt(this,Vl,new Map),pt(this,FS,0)}build(t,n,r){const s=new Vwt({mutationCache:this,mutationId:++Qk(this,FS)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){me(this,Ld).add(t);const n=bE(t);if(typeof n=="string"){const r=me(this,Vl).get(n);r?r.push(t):me(this,Vl).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(me(this,Ld).delete(t)){const n=bE(t);if(typeof n=="string"){const r=me(this,Vl).get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&me(this,Vl).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=bE(t);if(typeof n=="string"){const r=me(this,Vl).get(n),s=r==null?void 0:r.find(i=>i.state.status==="pending");return!s||s===t}else return!0}runNext(t){var r;const n=bE(t);if(typeof n=="string"){const s=(r=me(this,Vl).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Fs.batch(()=>{me(this,Ld).forEach(t=>{this.notify({type:"removed",mutation:t})}),me(this,Ld).clear(),me(this,Vl).clear()})}getAll(){return Array.from(me(this,Ld))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>gQ(n,r))}findAll(t={}){return this.getAll().filter(n=>gQ(t,n))}notify(t){Fs.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Fs.batch(()=>Promise.all(t.map(n=>n.continue().catch(Ji))))}},Ld=new WeakMap,Vl=new WeakMap,FS=new WeakMap,qee);function bE(e){var t;return(t=e.options.scope)==null?void 0:t.id}function xQ(e){return{onFetch:(t,n)=>{var u,d,p,g,b;const r=t.options,s=(p=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:p.direction,i=((g=t.state.data)==null?void 0:g.pages)||[],o=((b=t.state.data)==null?void 0:b.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let x=!1;const S=T=>{Object.defineProperty(T,"signal",{enumerable:!0,get:()=>(t.signal.aborted?x=!0:t.signal.addEventListener("abort",()=>{x=!0}),t.signal)})},E=hbe(t.options,t.fetchOptions),k=async(T,P,M)=>{if(x)return Promise.reject();if(P==null&&T.pages.length)return Promise.resolve(T);const F=(()=>{const W={client:t.client,queryKey:t.queryKey,pageParam:P,direction:M?"backward":"forward",meta:t.options.meta};return S(W),W})(),I=await E(F),{maxPages:B}=t.options,L=M?Fwt:jwt;return{pages:L(T.pages,I,B),pageParams:L(T.pageParams,P,B)}};if(s&&i.length){const T=s==="backward",P=T?Wwt:vQ,M={pages:i,pageParams:o},j=P(r,M);a=await k(M,j,T)}else{const T=e??i.length;do{const P=l===0?o[0]??r.initialPageParam:vQ(r,a);if(l>0&&P==null)break;a=await k(a,P),l++}while(l<T)}return a};t.options.persister?t.fetchFn=()=>{var x,S;return(S=(x=t.options).persister)==null?void 0:S.call(x,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function vQ(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Wwt(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Kr,Bf,$f,hb,fb,zf,pb,mb,Gee,qwt=(Gee=class{constructor(e={}){Ot(this,Kr);Ot(this,Bf);Ot(this,$f);Ot(this,hb);Ot(this,fb);Ot(this,zf);Ot(this,pb);Ot(this,mb);pt(this,Kr,e.queryCache||new Hwt),pt(this,Bf,e.mutationCache||new Uwt),pt(this,$f,e.defaultOptions||{}),pt(this,hb,new Map),pt(this,fb,new Map),pt(this,zf,0)}mount(){Qk(this,zf)._++,me(this,zf)===1&&(pt(this,pb,LB.subscribe(async e=>{e&&(await this.resumePausedMutations(),me(this,Kr).onFocus())})),pt(this,mb,aA.subscribe(async e=>{e&&(await this.resumePausedMutations(),me(this,Kr).onOnline())})))}unmount(){var e,t;Qk(this,zf)._--,me(this,zf)===0&&((e=me(this,pb))==null||e.call(this),pt(this,pb,void 0),(t=me(this,mb))==null||t.call(this),pt(this,mb,void 0))}isFetching(e){return me(this,Kr).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return me(this,Bf).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=me(this,Kr).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=me(this,Kr).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(op(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return me(this,Kr).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=me(this,Kr).get(r.queryHash),i=s==null?void 0:s.state.data,o=Pwt(t,i);if(o!==void 0)return me(this,Kr).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Fs.batch(()=>me(this,Kr).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=me(this,Kr).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=me(this,Kr);Fs.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=me(this,Kr);return Fs.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Fs.batch(()=>me(this,Kr).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(Ji).catch(Ji)}invalidateQueries(e,t={}){return Fs.batch(()=>(me(this,Kr).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Fs.batch(()=>me(this,Kr).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(Ji)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Ji)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=me(this,Kr).build(this,t);return n.isStaleByTime(op(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ji).catch(Ji)}fetchInfiniteQuery(e){return e.behavior=xQ(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ji).catch(Ji)}ensureInfiniteQueryData(e){return e.behavior=xQ(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return aA.isOnline()?me(this,Bf).resumePausedMutations():Promise.resolve()}getQueryCache(){return me(this,Kr)}getMutationCache(){return me(this,Bf)}getDefaultOptions(){return me(this,$f)}setDefaultOptions(e){pt(this,$f,e)}setQueryDefaults(e,t){me(this,hb).set($g(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...me(this,hb).values()],n={};return t.forEach(r=>{AS(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){me(this,fb).set($g(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...me(this,fb).values()],n={};return t.forEach(r=>{AS(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...me(this,$f).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=OB(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===RB&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...me(this,$f).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){me(this,Kr).clear(),me(this,Bf).clear()}},Kr=new WeakMap,Bf=new WeakMap,$f=new WeakMap,hb=new WeakMap,fb=new WeakMap,zf=new WeakMap,pb=new WeakMap,mb=new WeakMap,Gee),xo,kn,IS,qi,Qm,gb,Hf,Vf,OS,yb,bb,eg,tg,Uf,xb,er,$v,oF,aF,lF,cF,uF,dF,hF,vbe,Yee,Gwt=(Yee=class extends X1{constructor(t,n){super();Ot(this,er);Ot(this,xo);Ot(this,kn);Ot(this,IS);Ot(this,qi);Ot(this,Qm);Ot(this,gb);Ot(this,Hf);Ot(this,Vf);Ot(this,OS);Ot(this,yb);Ot(this,bb);Ot(this,eg);Ot(this,tg);Ot(this,Uf);Ot(this,xb,new Set);this.options=n,pt(this,xo,t),pt(this,Vf,null),pt(this,Hf,iF()),this.options.experimental_prefetchInRender||me(this,Hf).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(me(this,kn).addObserver(this),wQ(me(this,kn),this.options)?ln(this,er,$v).call(this):this.updateResult(),ln(this,er,cF).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return fF(me(this,kn),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return fF(me(this,kn),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ln(this,er,uF).call(this),ln(this,er,dF).call(this),me(this,kn).removeObserver(this)}setOptions(t){const n=this.options,r=me(this,kn);if(this.options=me(this,xo).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ql(this.options.enabled,me(this,kn))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ln(this,er,hF).call(this),me(this,kn).setOptions(this.options),n._defaulted&&!oA(this.options,n)&&me(this,xo).getQueryCache().notify({type:"observerOptionsUpdated",query:me(this,kn),observer:this});const s=this.hasListeners();s&&SQ(me(this,kn),r,this.options,n)&&ln(this,er,$v).call(this),this.updateResult(),s&&(me(this,kn)!==r||ql(this.options.enabled,me(this,kn))!==ql(n.enabled,me(this,kn))||op(this.options.staleTime,me(this,kn))!==op(n.staleTime,me(this,kn)))&&ln(this,er,oF).call(this);const i=ln(this,er,aF).call(this);s&&(me(this,kn)!==r||ql(this.options.enabled,me(this,kn))!==ql(n.enabled,me(this,kn))||i!==me(this,Uf))&&ln(this,er,lF).call(this,i)}getOptimisticResult(t){const n=me(this,xo).getQueryCache().build(me(this,xo),t),r=this.createResult(n,t);return Kwt(this,r)&&(pt(this,qi,r),pt(this,gb,this.options),pt(this,Qm,me(this,kn).state)),r}getCurrentResult(){return me(this,qi)}trackResult(t,n){return new Proxy(t,{get:(r,s)=>(this.trackProp(s),n==null||n(s),Reflect.get(r,s))})}trackProp(t){me(this,xb).add(t)}getCurrentQuery(){return me(this,kn)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=me(this,xo).defaultQueryOptions(t),r=me(this,xo).getQueryCache().build(me(this,xo),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return ln(this,er,$v).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),me(this,qi)))}createResult(t,n){var B;const r=me(this,kn),s=this.options,i=me(this,qi),o=me(this,Qm),a=me(this,gb),c=t!==r?t.state:me(this,IS),{state:u}=t;let d={...u},p=!1,g;if(n._optimisticResults){const L=this.hasListeners(),W=!L&&wQ(t,n),$=L&&SQ(t,r,n,s);(W||$)&&(d={...d,...bbe(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:b,errorUpdatedAt:x,status:S}=d;g=d.data;let E=!1;if(n.placeholderData!==void 0&&g===void 0&&S==="pending"){let L;i!=null&&i.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(L=i.data,E=!0):L=typeof n.placeholderData=="function"?n.placeholderData((B=me(this,bb))==null?void 0:B.state.data,me(this,bb)):n.placeholderData,L!==void 0&&(S="success",g=sF(i==null?void 0:i.data,L,n),p=!0)}if(n.select&&g!==void 0&&!E)if(i&&g===(o==null?void 0:o.data)&&n.select===me(this,OS))g=me(this,yb);else try{pt(this,OS,n.select),g=n.select(g),g=sF(i==null?void 0:i.data,g,n),pt(this,yb,g),pt(this,Vf,null)}catch(L){pt(this,Vf,L)}me(this,Vf)&&(b=me(this,Vf),g=me(this,yb),x=Date.now(),S="error");const k=d.fetchStatus==="fetching",T=S==="pending",P=S==="error",M=T&&k,j=g!==void 0,I={status:S,fetchStatus:d.fetchStatus,isPending:T,isSuccess:S==="success",isError:P,isInitialLoading:M,isLoading:M,data:g,dataUpdatedAt:d.dataUpdatedAt,error:b,errorUpdatedAt:x,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:k,isRefetching:k&&!T,isLoadingError:P&&!j,isPaused:d.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:P&&j,isStale:BB(t,n),refetch:this.refetch,promise:me(this,Hf)};if(this.options.experimental_prefetchInRender){const L=J=>{I.status==="error"?J.reject(I.error):I.data!==void 0&&J.resolve(I.data)},W=()=>{const J=pt(this,Hf,I.promise=iF());L(J)},$=me(this,Hf);switch($.status){case"pending":t.queryHash===r.queryHash&&L($);break;case"fulfilled":(I.status==="error"||I.data!==$.value)&&W();break;case"rejected":(I.status!=="error"||I.error!==$.reason)&&W();break}}return I}updateResult(){const t=me(this,qi),n=this.createResult(me(this,kn),this.options);if(pt(this,Qm,me(this,kn).state),pt(this,gb,this.options),me(this,Qm).data!==void 0&&pt(this,bb,me(this,kn)),oA(n,t))return;pt(this,qi,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,i=typeof s=="function"?s():s;if(i==="all"||!i&&!me(this,xb).size)return!0;const o=new Set(i??me(this,xb));return this.options.throwOnError&&o.add("error"),Object.keys(me(this,qi)).some(a=>{const l=a;return me(this,qi)[l]!==t[l]&&o.has(l)})};ln(this,er,vbe).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ln(this,er,cF).call(this)}},xo=new WeakMap,kn=new WeakMap,IS=new WeakMap,qi=new WeakMap,Qm=new WeakMap,gb=new WeakMap,Hf=new WeakMap,Vf=new WeakMap,OS=new WeakMap,yb=new WeakMap,bb=new WeakMap,eg=new WeakMap,tg=new WeakMap,Uf=new WeakMap,xb=new WeakMap,er=new WeakSet,$v=function(t){ln(this,er,hF).call(this);let n=me(this,kn).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Ji)),n},oF=function(){ln(this,er,uF).call(this);const t=op(this.options.staleTime,me(this,kn));if(Bg||me(this,qi).isStale||!nF(t))return;const r=ube(me(this,qi).dataUpdatedAt,t)+1;pt(this,eg,setTimeout(()=>{me(this,qi).isStale||this.updateResult()},r))},aF=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(me(this,kn)):this.options.refetchInterval)??!1},lF=function(t){ln(this,er,dF).call(this),pt(this,Uf,t),!(Bg||ql(this.options.enabled,me(this,kn))===!1||!nF(me(this,Uf))||me(this,Uf)===0)&&pt(this,tg,setInterval(()=>{(this.options.refetchIntervalInBackground||LB.isFocused())&&ln(this,er,$v).call(this)},me(this,Uf)))},cF=function(){ln(this,er,oF).call(this),ln(this,er,lF).call(this,ln(this,er,aF).call(this))},uF=function(){me(this,eg)&&(clearTimeout(me(this,eg)),pt(this,eg,void 0))},dF=function(){me(this,tg)&&(clearInterval(me(this,tg)),pt(this,tg,void 0))},hF=function(){const t=me(this,xo).getQueryCache().build(me(this,xo),this.options);if(t===me(this,kn))return;const n=me(this,kn);pt(this,kn,t),pt(this,IS,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},vbe=function(t){Fs.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(me(this,qi))}),me(this,xo).getQueryCache().notify({query:me(this,kn),type:"observerResultsUpdated"})})},Yee);function Ywt(e,t){return ql(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function wQ(e,t){return Ywt(e,t)||e.state.data!==void 0&&fF(e,t,t.refetchOnMount)}function fF(e,t,n){if(ql(t.enabled,e)!==!1&&op(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&BB(e,t)}return!1}function SQ(e,t,n,r){return(e!==t||ql(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&BB(e,n)}function BB(e,t){return ql(t.enabled,e)!==!1&&e.isStaleByTime(op(t.staleTime,e))}function Kwt(e,t){return!oA(e.getCurrentResult(),t)}var Wf,qf,vo,Bd,Kd,yD,pF,Kee,Xwt=(Kee=class extends X1{constructor(n,r){super();Ot(this,Kd);Ot(this,Wf);Ot(this,qf);Ot(this,vo);Ot(this,Bd);pt(this,Wf,n),this.setOptions(r),this.bindMethods(),ln(this,Kd,yD).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const r=this.options;this.options=me(this,Wf).defaultMutationOptions(n),oA(this.options,r)||me(this,Wf).getMutationCache().notify({type:"observerOptionsUpdated",mutation:me(this,vo),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&$g(r.mutationKey)!==$g(this.options.mutationKey)?this.reset():((s=me(this,vo))==null?void 0:s.state.status)==="pending"&&me(this,vo).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=me(this,vo))==null||n.removeObserver(this)}onMutationUpdate(n){ln(this,Kd,yD).call(this),ln(this,Kd,pF).call(this,n)}getCurrentResult(){return me(this,qf)}reset(){var n;(n=me(this,vo))==null||n.removeObserver(this),pt(this,vo,void 0),ln(this,Kd,yD).call(this),ln(this,Kd,pF).call(this)}mutate(n,r){var s;return pt(this,Bd,r),(s=me(this,vo))==null||s.removeObserver(this),pt(this,vo,me(this,Wf).getMutationCache().build(me(this,Wf),this.options)),me(this,vo).addObserver(this),me(this,vo).execute(n)}},Wf=new WeakMap,qf=new WeakMap,vo=new WeakMap,Bd=new WeakMap,Kd=new WeakSet,yD=function(){var r;const n=((r=me(this,vo))==null?void 0:r.state)??xbe();pt(this,qf,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},pF=function(n){Fs.batch(()=>{var r,s,i,o,a,l,c,u;if(me(this,Bd)&&this.hasListeners()){const d=me(this,qf).variables,p=me(this,qf).context;(n==null?void 0:n.type)==="success"?((s=(r=me(this,Bd)).onSuccess)==null||s.call(r,n.data,d,p),(o=(i=me(this,Bd)).onSettled)==null||o.call(i,n.data,null,d,p)):(n==null?void 0:n.type)==="error"&&((l=(a=me(this,Bd)).onError)==null||l.call(a,n.error,d,p),(u=(c=me(this,Bd)).onSettled)==null||u.call(c,void 0,n.error,d,p))}this.listeners.forEach(d=>{d(me(this,qf))})})},Kee),wbe=A.createContext(void 0),Sbe=e=>{const t=A.useContext(wbe);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Jwt=({client:e,children:t})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),h.jsx(wbe.Provider,{value:e,children:t})),Cbe=A.createContext(!1),Zwt=()=>A.useContext(Cbe);Cbe.Provider;function Qwt(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var eSt=A.createContext(Qwt()),tSt=()=>A.useContext(eSt),nSt=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},rSt=e=>{A.useEffect(()=>{e.clearReset()},[e])},sSt=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||fbe(n,[e.error,r])),iSt=e=>{if(e.suspense){const t=r=>r==="static"?r:Math.max(r??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...r)=>t(n(...r)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},oSt=(e,t)=>e.isLoading&&e.isFetching&&!t,aSt=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,CQ=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function lSt(e,t,n){var d,p,g,b,x;const r=Zwt(),s=tSt(),i=Sbe(),o=i.defaultQueryOptions(e);(p=(d=i.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||p.call(d,o),o._optimisticResults=r?"isRestoring":"optimistic",iSt(o),nSt(o,s),rSt(s);const a=!i.getQueryCache().get(o.queryHash),[l]=A.useState(()=>new t(i,o)),c=l.getOptimisticResult(o),u=!r&&e.subscribed!==!1;if(A.useSyncExternalStore(A.useCallback(S=>{const E=u?l.subscribe(Fs.batchCalls(S)):Ji;return l.updateResult(),E},[l,u]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),A.useEffect(()=>{l.setOptions(o)},[o,l]),aSt(o,c))throw CQ(o,l,s);if(sSt({result:c,errorResetBoundary:s,throwOnError:o.throwOnError,query:i.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw c.error;if((b=(g=i.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||b.call(g,o,c),o.experimental_prefetchInRender&&!Bg&&oSt(c,r)){const S=a?CQ(o,l,s):(x=i.getQueryCache().get(o.queryHash))==null?void 0:x.promise;S==null||S.catch(Ji).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?c:l.trackResult(c)}function VC(e,t){return lSt(e,Gwt)}function el(e,t){const n=Sbe(),[r]=A.useState(()=>new Xwt(n,e));A.useEffect(()=>{r.setOptions(e)},[r,e]);const s=A.useSyncExternalStore(A.useCallback(o=>r.subscribe(Fs.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=A.useCallback((o,a)=>{r.mutate(o,a).catch(Ji)},[r]);if(s.error&&fbe(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:i,mutateAsync:s.mutate}}const cSt=()=>VC({queryKey:["workflows"],queryFn:()=>Promise.all([Dn.getLegacyWorkflows(),Dn.getWorkflows()])}),$B=(e,t=!0)=>VC({gcTime:0,staleTime:0,queryKey:["legacy-workflow",e],queryFn:()=>Dn.getLegacyWorkflow(e).details(),enabled:t}),$4=(e,t=!0)=>VC({gcTime:0,staleTime:0,queryKey:["workflow",e],queryFn:()=>Dn.getWorkflow(e).details(),enabled:t}),uSt=()=>{const e=el({mutationFn:async({workflowId:i,prevRunId:o})=>{try{const a=Dn.getLegacyWorkflow(i),{runId:l}=await a.createRun({runId:o});return{runId:l}}catch(a){throw console.error("Error creating workflow run:",a),a}}}),t=el({mutationFn:async({workflowId:i,prevRunId:o})=>{try{const a=Dn.getWorkflow(i),{runId:l}=await a.createRun({runId:o});return{runId:l}}catch(a){throw console.error("Error creating workflow run:",a),a}}}),n=el({mutationFn:async({workflowId:i,runId:o,input:a})=>{try{await Dn.getLegacyWorkflow(i).start({runId:o,triggerData:a||{}})}catch(l){throw console.error("Error starting workflow run:",l),l}}}),r=el({mutationFn:async({workflowId:i,runId:o,input:a,runtimeContext:l})=>{try{const c=new oh;Object.entries(l).forEach(([d,p])=>{c.set(d,p)}),await Dn.getWorkflow(i).start({runId:o,inputData:a||{},runtimeContext:c})}catch(c){throw console.error("Error starting workflow run:",c),c}}}),s=el({mutationFn:async({workflowId:i,runId:o,input:a,runtimeContext:l})=>{try{const c=new oh;return Object.entries(l).forEach(([p,g])=>{c.set(p,g)}),await Dn.getWorkflow(i).startAsync({runId:o,inputData:a||{},runtimeContext:c})}catch(c){throw console.error("Error starting workflow run:",c),c}}});return{startWorkflowRun:r,createWorkflowRun:t,startLegacyWorkflowRun:n,createLegacyWorkflowRun:e,startAsyncWorkflowRun:s}},dSt=()=>{const[e,t]=A.useState({}),[n,r]=A.useState(!1);return{streamWorkflow:el({mutationFn:async({workflowId:i,runId:o,inputData:a,runtimeContext:l})=>{r(!0),t({});const c=new oh;Object.entries(l).forEach(([g,b])=>{c.set(g,b)});const d=await Dn.getWorkflow(i).stream({runId:o,inputData:a,runtimeContext:c});if(!d)throw new Error("No stream returned");const p=d.getReader();try{let g="";for(;;){const{done:b,value:x}=await p.read();if(b)break;x.type==="start"&&t(S=>{var E;return{...S,runId:x.payload.runId,eventTimestamp:new Date,payload:{...(S==null?void 0:S.payload)||{},workflowState:{...((E=S==null?void 0:S.payload)==null?void 0:E.workflowState)||{},status:"running"}}}}),x.type==="step-start"&&(r(!0),t(S=>{var k,T,P;const E=((P=(T=(k=S==null?void 0:S.payload)==null?void 0:k.workflowState)==null?void 0:T.steps)==null?void 0:P[x.payload.id])||{};return{...S,payload:{...S.payload,currentStep:{id:x.payload.id,...x.payload},workflowState:{...S.payload.workflowState,steps:{...S.payload.workflowState.steps,[x.payload.id]:{...E||{},...x.payload}}}},eventTimestamp:new Date}})),x.type==="step-suspended"&&(t(S=>{var k,T,P,M;const E=((P=(T=(k=S==null?void 0:S.payload)==null?void 0:k.workflowState)==null?void 0:T.steps)==null?void 0:P[x.payload.id])||{};return{...S,payload:{...S.payload,currentStep:{id:x.payload.id,...((M=S==null?void 0:S.payload)==null?void 0:M.currentStep)||{},...x.payload},workflowState:{...S.payload.workflowState,status:"suspended",steps:{...S.payload.workflowState.steps,[x.payload.id]:{...E||{},...x.payload}}}},eventTimestamp:new Date}}),r(!1)),x.type==="step-waiting"&&t(S=>{var k,T,P,M;const E=((P=(T=(k=S==null?void 0:S.payload)==null?void 0:k.workflowState)==null?void 0:T.steps)==null?void 0:P[x.payload.id])||{};return{...S,payload:{...S.payload,currentStep:{id:x.payload.id,...((M=S==null?void 0:S.payload)==null?void 0:M.currentStep)||{},...x.payload},workflowState:{...S.payload.workflowState,status:"waiting",steps:{...S.payload.workflowState.steps,[x.payload.id]:{...E,...x.payload}}}},eventTimestamp:new Date}}),x.type==="step-result"&&(g=x.payload.status,t(S=>{var M,j,F,I;const E=((F=(j=(M=S==null?void 0:S.payload)==null?void 0:M.workflowState)==null?void 0:j.steps)==null?void 0:F[x.payload.id])||{},{output:k,...T}=x.payload,P=k&&typeof k=="object"&&!Array.isArray(k)&&Object.keys(k).length>0?Object.entries(k).reduce((B,[L,W])=>{var J;const $=W;return B[L]=((J=$.type)==null?void 0:J.toLowerCase())==="buffer"?{type:"Buffer",data:"[...buffered data]"}:$,B},{}):k||void 0;return{...S,payload:{...S.payload,currentStep:{id:x.payload.id,...((I=S==null?void 0:S.payload)==null?void 0:I.currentStep)||{},...T,output:P},workflowState:{...S.payload.workflowState,status:"running",steps:{...S.payload.workflowState.steps,[x.payload.id]:{...E,...T,output:P}}}},eventTimestamp:new Date}})),x.type==="step-finish"&&t(S=>({...S,payload:{...S.payload,currentStep:void 0},eventTimestamp:new Date})),x.type==="finish"&&t(S=>({...S,payload:{...S.payload,currentStep:void 0,workflowState:{...S.payload.workflowState,status:g}},eventTimestamp:new Date}))}}finally{r(!1),p.releaseLock()}}}),streamResult:e,isStreaming:n}},hSt=()=>{const e=el({mutationFn:async({workflowId:n,stepId:r,runId:s,context:i})=>{try{return await Dn.getLegacyWorkflow(n).resume({stepId:r,runId:s,context:i})}catch(o){throw console.error("Error resuming workflow:",o),o}}}),t=el({mutationFn:async({workflowId:n,step:r,runId:s,resumeData:i,runtimeContext:o})=>{try{const a=new oh;return Object.entries(o).forEach(([c,u])=>{a.set(c,u)}),await Dn.getWorkflow(n).resume({step:r,runId:s,resumeData:i,runtimeContext:a})}catch(a){throw console.error("Error resuming workflow:",a),a}}});return{resumeLegacyWorkflow:e,resumeWorkflow:t}},fSt=()=>el({mutationFn:async({workflowId:t,runId:n})=>{try{return await Dn.getWorkflow(t).cancelRun(n)}catch(r){throw console.error("Error canceling workflow run:",r),r}}}),pSt=e=>el({mutationFn:async({runId:n,event:r,data:s})=>{try{return await Dn.getWorkflow(e).sendRunEvent({runId:n,event:r,data:s})}catch(i){throw console.error("Error sending workflow run event:",i),i}}});function kbe({workflowName:e,workflowId:t,isLegacy:n,runId:r}){return h.jsx("div",{className:"shrink-0",children:h.jsxs(us,{children:[h.jsxs(Yd,{children:[h.jsx(Vr,{as:Zt,to:"/workflows",children:"Workflows"}),h.jsx(Vr,{as:Zt,to:`/workflows${n?"/legacy":""}/${t}`,isCurrent:!r,children:e}),r&&h.jsx(Vr,{as:Zt,to:`/workflows/${t}/graph/${r}`,isCurrent:!0,children:r})]}),h.jsxs(kB,{children:[h.jsx(hn,{as:Zt,to:`/workflows${n?"/legacy":""}/${t}/graph`,children:"Graph"}),h.jsx(hn,{as:Zt,to:`/workflows${n?"/legacy":""}/${t}/traces`,children:"Traces"})]}),h.jsx(txt,{children:h.jsxs(hn,{as:Zt,to:"/swagger-ui",children:[h.jsx(ot,{children:h.jsx(n0e,{})}),"API endpoints"]})})]})})}const mSt=({children:e})=>{const{workflowId:t}=Cs(),{data:n,isLoading:r}=$B(t);return h.jsx(PB,{children:h.jsxs("div",{className:"h-full overflow-hidden",children:[r?h.jsx(us,{children:h.jsx(Xu,{children:h.jsx($n,{className:"h-6 w-[200px]"})})}):h.jsx(kbe,{workflowName:(n==null?void 0:n.name)||"",workflowId:t,isLegacy:!0}),e]})})},gSt=()=>{const[e,t]=A.useState({}),[n,r]=A.useState(!0);return A.useEffect(()=>{(async()=>{r(!0);try{const i=await Dn.getTools();t(i)}catch(i){t({}),console.error("Error fetching tools",i),Nr.error("Error fetching tools")}finally{r(!1)}})()},[]),{tools:e,isLoading:n}},ySt=e=>{const[t,n]=A.useState(null),[r,s]=A.useState(!0);return A.useEffect(()=>{(async()=>{s(!0);try{if(!e){n(null),s(!1);return}const a=await Dn.getTool(e).details();n(a)}catch(o){n(null),console.error("Error fetching tool",o),Nr.error("Error fetching tool")}finally{s(!1)}})()},[e]),{tool:t,isLoading:r}};function bSt(){const{agents:e,isLoading:t}=cbe(),{tools:n,isLoading:r}=gSt(),s=!r&&Object.keys(n).length===0;return h.jsxs(yl,{children:[h.jsx(us,{children:h.jsx(Xu,{children:"Tools"})}),h.jsx(ho,{isCentered:s,children:h.jsx(wvt,{tools:n,agents:e,isLoading:t||r})})]})}function xSt(){const e=xl(),{agents:t,isLoading:n}=cbe();return h.jsxs(yl,{children:[h.jsx(us,{children:h.jsx(Xu,{children:"Agents"})}),h.jsx(ho,{isCentered:!n&&Object.keys(t||{}).length===0,children:h.jsx(Dxt,{agents:t,isLoading:n,onClickRow:r=>e(`/agents/${r}/chat/new`)})})]})}const z4=dfe,UC=A.forwardRef(({className:e,...t},n)=>h.jsx(BT,{ref:n,className:ic(e),...t}));UC.displayName=BT.displayName;const Ti=A.forwardRef(({className:e,...t},n)=>h.jsx($T,{ref:n,className:ic(e),...t}));Ti.displayName=$T.displayName;const _i=A.forwardRef(({className:e,...t},n)=>h.jsx(zT,{ref:n,className:$t("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));_i.displayName=zT.displayName;function vSt({agentId:e}){return h.jsxs("div",{className:"space-y-4 pt-2 px-4 pb-4 text-xs overflow-y-auto",children:[h.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[h.jsx("p",{className:"text-mastra-el-3",children:"GET"}),h.jsx("p",{className:"text-mastra-el-5",children:"/api/agents"})]}),h.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[h.jsx("p",{className:"text-mastra-el-3",children:"GET"}),h.jsxs("p",{className:"text-mastra-el-5",children:["/api/agents/",e]})]}),h.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[h.jsx("p",{className:"text-mastra-el-3",children:"GET"}),h.jsxs("p",{className:"text-mastra-el-5",children:["/api/agents/",e,"/evals/ci"]})]}),h.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[h.jsx("p",{className:"text-mastra-el-3",children:"GET"}),h.jsxs("p",{className:"text-mastra-el-5",children:["/api/agents/",e,"/evals/live"]})]}),h.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[h.jsx("p",{className:"text-mastra-el-3",children:"POST"}),h.jsxs("p",{className:"text-mastra-el-5",children:["/api/agents/",e,"/instructions"]})]}),h.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[h.jsx("p",{className:"text-mastra-el-3",children:"POST"}),h.jsxs("p",{className:"text-mastra-el-5",children:["/api/agents/",e,"/generate"]})]}),h.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[h.jsx("p",{className:"text-mastra-el-3",children:"POST"}),h.jsxs("p",{className:"text-mastra-el-5",children:["/api/agents/",e,"/stream"]})]}),h.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[h.jsx("p",{className:"text-mastra-el-3",children:"POST"}),h.jsxs("p",{className:"text-mastra-el-5",children:["/api/agents/",e,"/text-object"]})]}),h.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[h.jsx("p",{className:"text-mastra-el-3",children:"POST"}),h.jsxs("p",{className:"text-mastra-el-5",children:["/api/agents/",e,"/stream-object"]})]})]})}const wSt={10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal",100:"silent"},Ebe=e=>{const[t,n]=A.useState([]),[r,s]=A.useState(!0),{transports:i,isLoading:o}=SSt(),a=i[0],l=async c=>{const u=c??e;if(!u){s(!1);return}s(!0);try{const d=await Dn.getLogForRun({transportId:a,runId:u});n(d.logs.map(p=>({level:typeof p.level=="number"?wSt[p.level]:p.level,time:p.time,pid:p.pid,hostname:p.hostname,name:p.name,runId:p.runId,msg:p.msg})))}catch(d){n([]),console.error("Error fetching logs",d),Nr.error("Error fetching logs")}finally{s(!1)}};return A.useEffect(()=>{o||!a||l(e)},[e,a]),{logs:t,isLoading:r,refetchLogs:l}},SSt=()=>{const[e,t]=A.useState([]),[n,r]=A.useState(!0),s=async()=>{try{const i=await Dn.getLogTransports();t(i.transports)}catch(i){console.error("Error fetching logs",i),Nr.error("Error fetching logs")}finally{r(!1)}};return A.useEffect(()=>{s()},[]),{transports:e,isLoading:n}};function CSt({agentId:e}){const{logs:t,isLoading:n,refetchLogs:r}=Ebe(e);return h.jsxs("div",{className:"px-4 pb-4 text-xs overflow-y-auto",children:[h.jsx("div",{className:"flex justify-end sticky top-0 py-2",children:h.jsx(gu,{variant:"outline",onClick:()=>r(),children:n?h.jsx(ww,{className:"w-4 h-4 animate-spin"}):h.jsx(ww,{className:"w-4 h-4"})})}),h.jsx("div",{className:"space-y-4",children:t.length===0?h.jsxs("p",{className:"text-gray-300/60",children:["No log drains. By default, logs are sent to the console. To configure log drains see"," ",h.jsx("a",{href:"https://mastra.ai/reference/observability/create-logger#upstash-logger-remote-log-drain",target:"_blank",rel:"noopener",className:" hover:text-gray-100 underline",children:"docs."})]}):t.map((s,i)=>h.jsxs("div",{className:"space-y-2",children:[h.jsxs("div",{className:"flex gap-2 items-center",children:[h.jsxs("p",{className:"text-mastra-el-5",children:["[",lo(new Date(s.time),"yyyy-MM-dd HH:mm:ss"),"]"]}),h.jsxs("p",{className:"text-mastra-el-4",children:["[",s.level,"]"]})]}),h.jsx("p",{className:"text-mastra-el-5 whitespace-pre-wrap",children:h.jsx("code",{children:s.msg})})]},i))})]})}function J1({text:e,copyMessage:t="Copied to clipboard!"}){const[n,r]=A.useState(!1),s=A.useRef(null),i=A.useCallback(()=>{navigator.clipboard.writeText(e).then(()=>{Nr.success(t),r(!0),s.current&&(clearTimeout(s.current),s.current=null),s.current=setTimeout(()=>{r(!1)},2e3)}).catch(()=>{Nr.error("Failed to copy to clipboard.")})},[e,t]);return{isCopied:n,handleCopy:i}}const kSt={openai:h.jsx("svg",{className:"h-3 w-3",viewBox:"0 0 320 320",xmlns:"http://www.w3.org/2000/svg",fill:"white",children:h.jsx("path",{d:"m297.06 130.97c7.26-21.79 4.76-45.66-6.85-65.48-17.46-30.4-52.56-46.04-86.84-38.68-15.25-17.18-37.16-26.95-60.13-26.81-35.04-.08-66.13 22.48-76.91 55.82-22.51 4.61-41.94 18.7-53.31 38.67-17.59 30.32-13.58 68.54 9.92 94.54-7.26 21.79-4.76 45.66 6.85 65.48 17.46 30.4 52.56 46.04 86.84 38.68 15.24 17.18 37.16 26.95 60.13 26.8 35.06.09 66.16-22.49 76.94-55.86 22.51-4.61 41.94-18.7 53.31-38.67 17.57-30.32 13.55-68.51-9.94-94.51zm-120.28 168.11c-14.03.02-27.62-4.89-38.39-13.88.49-.26 1.34-.73 1.89-1.07l63.72-36.8c3.26-1.85 5.26-5.32 5.24-9.07v-89.83l26.93 15.55c.29.14.48.42.52.74v74.39c-.04 33.08-26.83 59.9-59.91 59.97zm-128.84-55.03c-7.03-12.14-9.56-26.37-7.15-40.18.47.28 1.3.79 1.89 1.13l63.72 36.8c3.23 1.89 7.23 1.89 10.47 0l77.79-44.92v31.1c.02.32-.13.63-.38.83l-64.41 37.19c-28.69 16.52-65.33 6.7-81.92-21.95zm-16.77-139.09c7-12.16 18.05-21.46 31.21-26.29 0 .55-.03 1.52-.03 2.2v73.61c-.02 3.74 1.98 7.21 5.23 9.06l77.79 44.91-26.93 15.55c-.27.18-.61.21-.91.08l-64.42-37.22c-28.63-16.58-38.45-53.21-21.95-81.89zm221.26 51.49-77.79-44.92 26.93-15.54c.27-.18.61-.21.91-.08l64.42 37.19c28.68 16.57 38.51 53.26 21.94 81.94-7.01 12.14-18.05 21.44-31.2 26.28v-75.81c.03-3.74-1.96-7.2-5.2-9.06zm26.8-40.34c-.47-.29-1.3-.79-1.89-1.13l-63.72-36.8c-3.23-1.89-7.23-1.89-10.47 0l-77.79 44.92v-31.1c-.02-.32.13-.63.38-.83l64.41-37.16c28.69-16.55 65.37-6.7 81.91 22 6.99 12.12 9.52 26.31 7.15 40.1zm-168.51 55.43-26.94-15.55c-.29-.14-.48-.42-.52-.74v-74.39c.02-33.12 26.89-59.96 60.01-59.94 14.01 0 27.57 4.92 38.34 13.88-.49.26-1.33.73-1.89 1.07l-63.72 36.8c-3.26 1.85-5.26 5.31-5.24 9.06l-.04 89.79zm14.63-31.54 34.65-20.01 34.65 20v40.01l-34.65 20-34.65-20z"})}),anthropic:h.jsx("svg",{className:"h-3 w-3",fill:"white",height:"78",strokeLinejoin:"round",viewBox:"0 0 16 16",width:"78",style:{color:"currentcolor"},children:h.jsx("g",{transform:"translate(0,2)",children:h.jsx("path",{d:"M11.375 0h-2.411L13.352 11.13h2.411L11.375 0ZM4.4 0 0 11.13h2.46l0.9-2.336h4.604l0.9 2.336h2.46L6.924 0H4.4Zm-0.244 6.723 1.506-3.909 1.506 3.909H4.156Z",fill:"currentColor"})})})};var Dbe="AlertDialog",[ESt,XDt]=Ri(Dbe,[iie]),Fh=iie(),Abe=e=>{const{__scopeAlertDialog:t,...n}=e,r=Fh(t);return h.jsx(qA,{...r,...n,modal:!0})};Abe.displayName=Dbe;var DSt="AlertDialogTrigger",Tbe=A.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Fh(n);return h.jsx(NNe,{...s,...r,ref:t})});Tbe.displayName=DSt;var ASt="AlertDialogPortal",_be=e=>{const{__scopeAlertDialog:t,...n}=e,r=Fh(t);return h.jsx(GA,{...r,...n})};_be.displayName=ASt;var TSt="AlertDialogOverlay",Nbe=A.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Fh(n);return h.jsx(ty,{...s,...r,ref:t})});Nbe.displayName=TSt;var ib="AlertDialogContent",[_St,NSt]=ESt(ib),PSt=yte("AlertDialogContent"),Pbe=A.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...s}=e,i=Fh(n),o=A.useRef(null),a=Ut(t,o),l=A.useRef(null);return h.jsx(DNe,{contentName:ib,titleName:Mbe,docsSlug:"alert-dialog",children:h.jsx(_St,{scope:n,cancelRef:l,children:h.jsxs(ny,{role:"alertdialog",...i,...s,ref:a,onOpenAutoFocus:bt(s.onOpenAutoFocus,c=>{var u;c.preventDefault(),(u=l.current)==null||u.focus({preventScroll:!0})}),onPointerDownOutside:c=>c.preventDefault(),onInteractOutside:c=>c.preventDefault(),children:[h.jsx(PSt,{children:r}),h.jsx(jSt,{contentRef:o})]})})})});Pbe.displayName=ib;var Mbe="AlertDialogTitle",jbe=A.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Fh(n);return h.jsx(ry,{...s,...r,ref:t})});jbe.displayName=Mbe;var Fbe="AlertDialogDescription",Ibe=A.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Fh(n);return h.jsx(sy,{...s,...r,ref:t})});Ibe.displayName=Fbe;var MSt="AlertDialogAction",Obe=A.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Fh(n);return h.jsx(XS,{...s,...r,ref:t})});Obe.displayName=MSt;var Rbe="AlertDialogCancel",Lbe=A.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:s}=NSt(Rbe,n),i=Fh(n),o=Ut(t,s);return h.jsx(XS,{...i,...r,ref:o})});Lbe.displayName=Rbe;var jSt=({contentRef:e})=>{const t=`\`${ib}\` requires a description for the component to be accessible for screen reader users.
|
|
725
|
+
${await ip(z)}\`\`\``;d(ne=>ne.map(H=>{var ee,ie;return((ie=(ee=H.metadata)==null?void 0:ee.custom)==null?void 0:ie.id)===Y?{...H,content:[{type:"text",text:X}]}:H}))};let q=!1;await I.loopStream({message:V,threadId:r,resourceId:t,maxIterations:T,runtimeContext:j},async z=>{var Y,U,X,ne,H,ee,ie,se,ae,le,pe,ye,Te,Ee,_e;if(z.type==="step-start"&&((Y=z.payload)==null?void 0:Y.id)==="Agent-Network-Outer-Workflow"){const Fe=Gs();a.current=Fe,d(tt=>[...tt,{role:"assistant",metadata:{custom:{id:Fe}},content:[{type:"text",text:"start"}]}])}else if(a.current)if(z.type==="tool-call-delta")p(z.argsTextDelta);else if(z.type==="tool-call-streaming-start"){d(Fe=>[...Fe,{role:"assistant",content:[{type:"text",text:""}]}]),setTimeout(()=>{s==null||s()},500);return}else if(z.type==="step-finish"&&((U=z.payload)==null?void 0:U.id)==="Agent-Network-Outer-Workflow")q||(x(a.current,{...z,type:"finish"}),a.current=void 0);else if(z.type==="step-result"&&(((X=z.payload)==null?void 0:X.id)==="Agent-Network-Outer-Workflow.workflow-step"||((ne=z.payload)==null?void 0:ne.id)==="Agent-Network-Outer-Workflow.toolStep")){x(a.current,z);const Fe=(ee=(H=z==null?void 0:z.payload)==null?void 0:H.output)==null?void 0:ee.result,tt=typeof Fe=="string"?JSON.parse(((se=(ie=z==null?void 0:z.payload)==null?void 0:ie.output)==null?void 0:se.result)??"{}")??{}:{runResult:Fe},nt=(tt==null?void 0:tt.runResult)??{},Dt=Gs();d(Gt=>[...Gt,{role:"assistant",content:[{type:"text",text:""}],metadata:{custom:{id:Dt}}}]),G(JSON.stringify(nt),Dt)}else((ae=z.payload)==null?void 0:ae.id)==="Agent-Network-Outer-Workflow"||((le=z.payload)==null?void 0:le.id)==="finish-step"?z.type==="step-result"&&((pe=z.payload)==null?void 0:pe.id)==="Agent-Network-Outer-Workflow"&&(q=(Te=(ye=z==null?void 0:z.payload)==null?void 0:ye.output)==null?void 0:Te.isComplete):x(a.current,z);z.type==="step-result"&&((Ee=z.payload)==null?void 0:Ee.id)==="final-step"&&d(Fe=>{var tt,nt;return[...Fe,{role:"assistant",content:[{type:"text",text:(nt=(tt=z.payload)==null?void 0:tt.output)==null?void 0:nt.result}]}]}),z.type==="step-finish"&&((_e=z.payload)==null?void 0:_e.id)==="final-step"&&(a.current=void 0),(z.type==="start"||z.type==="step-start"||z.type==="finish")&&setTimeout(()=>{s==null||s()},500)})}else await I.stream({message:V,threadId:r,resourceId:t,runtimeContext:j},G=>{if(a.current)if(G.type==="tool-call-delta")p(G.argsTextDelta);else if(G.type==="tool-call-streaming-start"){d(q=>[...q,{role:"assistant",content:[{type:"text",text:""}]}]);return}else x(a.current,G);else if(G.type==="start"){const q=Gs();a.current=q,d(z=>[...z,{role:"assistant",metadata:{custom:{id:q}},content:[{type:"text",text:"start"}]}])}(G.type==="start"||G.type==="step-start"||G.type==="finish")&&setTimeout(()=>{s==null||s()},500)});c(!1)}catch(G){console.error("Error occurred in VNextMastraNetworkRuntimeProvider",G),c(!1)}}});return h.jsxs($O,{runtime:L,children:[" ",e," "]});function W(J){try{return JSON.parse(J)}catch{return}}function $(){return{id:Gs(),formattedMessageId:Gs(),finalStepId:Gs(),finalResponse:""}}}const gvt=({networkId:e,networkName:t,threadId:n,initialMessages:r,memory:s,refreshThreadList:i})=>{const{runtimeContext:o}=dy();return h.jsx(hvt,{children:h.jsx(Lxt,{children:h.jsx(mvt,{networkId:e,initialMessages:r??[],threadId:n,memory:s,refreshThreadList:i,runtimeContext:o,children:h.jsx("div",{className:"h-full pb-4",children:h.jsx(ivt,{hasMemory:s,networkName:t})})},n)},n)},n)},yvt=[{id:"name",header:"Name",cell:({row:e})=>{const{Link:t}=BC();return h.jsx(SB,{icon:h.jsx(Nh,{}),name:h.jsx(t,{className:"w-full space-y-0",href:`/networks${e.original.isVNext?"/v-next":""}/${e.original.id}/chat`,children:e.original.name}),description:e.original.instructions})},meta:{width:"auto"}},{id:"agents",header:"Agents",cell:({row:e})=>h.jsx(Dr,{children:h.jsx(Un,{icon:h.jsx(E$e,{}),children:e.original.agentsSize})})},{id:"workflows",header:"Workflows",cell:({row:e})=>h.jsx(Dr,{children:h.jsx(Un,{icon:h.jsx(kc,{}),children:e.original.workflowsSize})})},{id:"tools",header:"Tools",cell:({row:e})=>h.jsx(Dr,{children:h.jsx(Un,{icon:h.jsx(gl,{}),children:e.original.toolsSize})})},{id:"model",header:"Routing Models",cell:({row:e})=>h.jsxs(Dr,{children:[h.jsx(Un,{variant:"default",icon:h.jsx(xle,{}),children:e.original.routingModel}),e.original.isVNext?h.jsx(Un,{className:"!text-accent1 ml-2",children:"vNext"}):null]})}],bvt=({legacyNetworks:e,networks:t,isLoading:n,onClickRow:r})=>{const s=A.useMemo(()=>[...(e==null?void 0:e.map(l=>({...l,routingModel:l.routingModel.modelId,agentsSize:l.agents.length,isVNext:!1})))??[],...(t==null?void 0:t.map(l=>({...l,routingModel:l.routingModel.modelId,agentsSize:l.agents.length,workflowsSize:l.workflows.length,toolsSize:l.tools.length,isVNext:!0})))??[]],[t,e]),i=TL({data:s,columns:yvt,getCoreRowModel:AL()});if(n)return h.jsx(vvt,{});const o=i.getHeaderGroups()[0],a=i.getRowModel().rows.concat();return a.length===0?h.jsx(xvt,{}):h.jsx(TB,{children:h.jsxs(hy,{children:[h.jsx(fy,{className:"sticky top-0",children:o.headers.map(l=>h.jsx(Xs,{style:{width:l.index===0?"auto":l.column.getSize()},children:Qb(l.column.columnDef.header,l.getContext())},l.id))}),h.jsx(Mh,{children:a.map(l=>h.jsx(jh,{onClick:()=>r(l.original.id,l.original.isVNext||!1),children:l.getVisibleCells().map(c=>h.jsx(Se.Fragment,{children:Qb(c.column.columnDef.cell,c.getContext())},c.id))},l.id))})]})})},xvt=()=>h.jsx(LC,{iconSlot:h.jsx(Kbt,{}),titleSlot:"Configure Agent Networks",descriptionSlot:"Mastra agent networks are not configured yet. You can find more information in the documentation.",actionSlot:h.jsxs(hn,{size:"lg",className:"w-full",variant:"light",as:"a",href:"https://mastra.ai/en/reference/networks/agent-network",target:"_blank",children:[h.jsx(ot,{children:h.jsx(LP,{})}),"Docs"]})}),vvt=()=>h.jsxs(hy,{children:[h.jsxs(fy,{children:[h.jsx(Xs,{children:"Name"}),h.jsx(Xs,{width:160,children:"Agents"}),h.jsx(Xs,{width:160,children:"Workflows"}),h.jsx(Xs,{width:160,children:"Tools"}),h.jsx(Xs,{width:160,children:"Routing Models"})]}),h.jsx(Mh,{children:Array.from({length:3}).map((e,t)=>h.jsxs(jh,{children:[h.jsx(Dr,{children:h.jsx(as,{className:"h-4 w-1/2"})}),h.jsx(Dr,{width:160,children:h.jsx(as,{className:"h-4 w-1/2"})}),h.jsx(Dr,{width:160,children:h.jsx(as,{className:"h-4 w-1/2"})}),h.jsx(Dr,{width:160,children:h.jsx(as,{className:"h-4 w-1/2"})}),h.jsx(Dr,{width:160,children:h.jsx(as,{className:"h-4 w-1/2"})})]},t))})]}),I4=({children:e,className:t,onClick:n})=>h.jsx("div",{tabIndex:n?0:void 0,onKeyDown:r=>{n&&(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),n==null||n())},className:zn("flex gap-3 group/entity bg-surface3 rounded-lg border-sm border-border1 py-3 px-4",n&&"cursor-pointer hover:bg-surface4 transition-all",t),onClick:n,children:e}),O4=({children:e,className:t})=>h.jsx(ot,{size:"lg",className:zn("text-icon3 mt-1",t),children:e}),R4=({children:e,className:t})=>h.jsx(Ue,{as:"p",variant:"ui-lg",className:zn("text-icon6 font-medium",t),children:e}),L4=({children:e,className:t})=>h.jsx(Ue,{as:"p",variant:"ui-sm",className:zn("text-icon3",t),children:e}),B4=({children:e,className:t})=>h.jsx("div",{className:t,children:e}),wvt=({tools:e,agents:t,isLoading:n})=>{const r=A.useMemo(()=>Dvt(e,t),[e,t]);return n?h.jsx("div",{className:"max-w-5xl w-full mx-auto px-4 pt-8",children:h.jsx(kvt,{})}):h.jsx(Svt,{toolsWithAgents:r})},Svt=({toolsWithAgents:e})=>{const[t,n]=A.useState(e),[r,s]=A.useState("");if(t.length===0&&!r)return h.jsx(Evt,{});const i=o=>{const a=o.target.value;s(a),A.startTransition(()=>{n(e.filter(l=>l.id.toLowerCase().includes(a.toLowerCase())||l.description.toLowerCase().includes(a.toLowerCase())||l.agents.some(c=>c.name.toLowerCase().includes(a.toLowerCase())||c.id.toLowerCase().includes(a.toLowerCase()))))})};return h.jsxs("div",{children:[h.jsxs("div",{className:"max-w-5xl w-full mx-auto px-4 pt-8",children:[h.jsxs("div",{className:"px-4 flex items-center gap-2 rounded-lg bg-surface5 focus-within:ring-2 focus-within:ring-accent3",children:[h.jsx(ot,{children:h.jsx(BP,{})}),h.jsx("input",{type:"text",placeholder:"Search for a tool",className:"w-full py-2 bg-transparent text-icon3 focus:text-icon6 placeholder:text-icon3 outline-none",value:r,onChange:i})]}),t.length===0&&h.jsx(Ue,{as:"p",className:"text-icon3 py-2",children:"No tools found matching your search."})]}),h.jsx("div",{className:"grid md:grid-cols-2 xl:grid-cols-3 gap-4 max-w-5xl mx-auto py-8",children:t.map(o=>h.jsx(Cvt,{tool:o},o.id))})]})},Cvt=({tool:e})=>{const t=A.useRef(null),{Link:n}=BC();return h.jsxs(I4,{onClick:()=>{var r;return(r=t.current)==null?void 0:r.click()},children:[h.jsx(O4,{children:h.jsx(gl,{className:"group-hover/entity:text-[#ECB047]"})}),h.jsxs(B4,{children:[h.jsx(R4,{children:h.jsx(n,{ref:t,href:e.agents.length>0?`/tools/${e.agents[0].id}/${e.id}`:`/tools/all/${e.id}`,children:e.id})}),h.jsx(L4,{children:e.description}),h.jsx("div",{className:"inline-flex flex-wrap gap-2 pt-4",children:e.agents.map(r=>h.jsx(n,{href:`/agents/${r.id}/chat`,onClick:s=>s.stopPropagation(),className:"group/link",children:h.jsx(Un,{icon:h.jsx(Nh,{className:"group-hover/link:text-accent3"}),className:"bg-surface5 ",children:r.name})},r.id))})]})]})},kvt=()=>h.jsxs("div",{children:[h.jsx("div",{className:"max-w-5xl w-full mx-auto px-4 pt-8",children:h.jsx(as,{className:"h-10 w-full"})}),h.jsxs("div",{className:"grid md:grid-cols-2 xl:grid-cols-3 gap-4 max-w-5xl mx-auto py-8",children:[h.jsx(as,{className:"h-40 w-full"}),h.jsx(as,{className:"h-40 w-full"}),h.jsx(as,{className:"h-40 w-full"})]})]}),Evt=()=>h.jsx(LC,{iconSlot:h.jsx(Ybt,{}),titleSlot:"Configure Tools",descriptionSlot:"Mastra tools are not configured yet. You can find more information in the documentation.",actionSlot:h.jsxs(hn,{size:"lg",className:"w-full",variant:"light",as:"a",href:"https://mastra.ai/en/docs/agents/using-tools-and-mcp",target:"_blank",children:[h.jsx(ot,{children:h.jsx(gl,{})}),"Docs"]})}),Dvt=(e,t)=>{const n=new Map,r=Object.keys(t);for(const s of r){const i=t[s],o=i.tools,a=Object.keys(o);for(const l of a){const c=o[l];n.has(c.id)||n.set(c.id,{...c,agents:[]}),n.get(c.id).agents.push({id:s,name:i.name})}}for(const[s,i]of Object.entries(e))n.has(i.id)||n.set(i.id,{...i,agents:[]});return Array.from(n.values())};function Y0e({traces:e,error:t,runId:n,stepName:r}){return h.jsx(C0e,{initialTraces:e||[],children:h.jsx(Avt,{traces:e,error:t,runId:n,stepName:r})})}function Avt({traces:e,error:t,runId:n,stepName:r}){const s=A.useRef(!1),[i,o]=A.useState(100),{isOpen:a,setTrace:l,setIsOpen:c,setSpan:u}=A.useContext(Ph);return A.useEffect(()=>{if(s.current||!n||!r)return;const d=e.find(g=>g.runId===n);if(!d)return;const p=d.trace.find(g=>g.name.includes(r));p&&(l(d.trace),u(p),c(!0),s.current=!0)},[n,e,l]),h.jsxs("main",{className:"h-full relative overflow-hidden flex",children:[h.jsx("div",{className:"h-full overflow-y-scroll w-full",children:h.jsx(k0e,{traces:e,error:t})}),a&&h.jsx(j0e,{width:i,onResize:o})]})}function Tvt({stepGraph:e,stepSubscriberGraph:t,open:n}){const{nodes:r,edges:s}=B0e({stepGraph:e,stepSubscriberGraph:t}),[i,o]=A.useState(!1),[a,l,c]=c4(r),[u]=u4(s),d={"default-node":M4,"condition-node":P4,"after-node":j4,"loop-result-node":F4};return A.useEffect(()=>{n&&setTimeout(()=>{o(!0)},500)},[n]),h.jsx("div",{className:"w-full h-full relative",children:i?h.jsxs(l4,{nodes:a,edges:u,fitView:!0,fitViewOptions:{maxZoom:.85},nodeTypes:d,onNodesChange:c,children:[h.jsx(Hme,{}),h.jsx(h4,{pannable:!0,zoomable:!0,maskColor:"#121212",bgColor:"#171717",nodeColor:"#2c2c2c"}),h.jsx(d4,{variant:ll.Lines,gap:12,size:.5})]}):h.jsx("div",{className:"w-full h-full flex items-center justify-center",children:h.jsx(Y1,{})})})}const K0e=A.createContext({});function _vt({children:e}){const[t,n]=A.useState(null),[r,s]=A.useState(null),[i,o]=A.useState(!1),[a,l]=A.useState(""),c=()=>{o(!1),n(null),s(null),l("")},u=({label:d,stepGraph:p,stepSubscriberGraph:g})=>{l(d),n(p),s(g),o(!0)};return h.jsxs(K0e.Provider,{value:{showNestedGraph:u,closeNestedGraph:c},children:[e,h.jsx(No,{open:i,onOpenChange:c,children:h.jsx(OC,{children:h.jsxs(Zi,{className:"w-[40rem] h-[40rem] bg-[#121212] p-[0.5rem]",children:[h.jsxs(Qi,{className:"flex items-center gap-1.5 absolute top-2.5 left-2.5",children:[h.jsx(lR,{className:"text-current w-4 h-4"}),h.jsxs(Ru,{size:"xs",weight:"medium",className:"text-mastra-el-6 capitalize",children:[a," workflow"]})]}),h.jsx(AC,{children:h.jsx(Tvt,{stepGraph:t,open:i,stepSubscriberGraph:r})})]})})})]})}function Nvt({data:e}){const{label:t,withoutTopHandle:n,withoutBottomHandle:r,stepGraph:s,stepSubscriberGraph:i}=e,{showNestedGraph:o}=A.useContext(K0e);return h.jsxs("div",{className:Ve("bg-[rgba(29,29,29,0.5)] rounded-md h-full overflow-scroll w-[274px]"),children:[!n&&h.jsx(Oi,{type:"target",position:Pt.Top,style:{visibility:"hidden"}}),h.jsx("div",{className:"p-2 cursor-pointer",onClick:()=>o({label:t,stepGraph:s,stepSubscriberGraph:i}),children:h.jsxs("div",{className:"text-sm bg-mastra-bg-9 flex items-center gap-1.5 rounded-sm p-2 cursor-pointer",children:[h.jsx(lR,{className:"text-current w-4 h-4"}),h.jsx(Ru,{size:"xs",weight:"medium",className:"text-mastra-el-6 capitalize",children:t})]})}),!r&&h.jsx(Oi,{type:"source",position:Pt.Bottom,style:{visibility:"hidden"}})]})}function Pvt({workflow:e}){const{nodes:t,edges:n}=B0e({stepGraph:e.serializedStepGraph||e.stepGraph,stepSubscriberGraph:e.serializedStepSubscriberGraph||e.stepSubscriberGraph,steps:e.steps}),[r,s,i]=c4(t),[o]=u4(n),a={"default-node":M4,"condition-node":P4,"after-node":j4,"loop-result-node":F4,"nested-node":Nvt};return h.jsx("div",{className:"w-full h-full",children:h.jsxs(l4,{nodes:r,edges:o,nodeTypes:a,onNodesChange:i,fitView:!0,fitViewOptions:{maxZoom:.85},children:[h.jsx(Hme,{}),h.jsx(h4,{pannable:!0,zoomable:!0,maskColor:"#121212",bgColor:"#171717",nodeColor:"#2c2c2c"}),h.jsx(d4,{variant:ll.Dots,gap:12,size:.5})]})})}function Mvt({workflowId:e}){const{legacyWorkflow:t,isLoading:n}=W0e(e);return n?h.jsx("div",{className:"p-4",children:h.jsx(as,{className:"h-[600px]"})}):t?h.jsx(_vt,{children:h.jsx(AC,{children:h.jsx(Pvt,{workflow:t})})}):h.jsx("div",{className:"grid h-full place-items-center",children:h.jsxs("div",{className:"flex flex-col items-center gap-2",children:[h.jsx(oR,{}),h.jsxs("div",{children:["We couldn't find ",L0e(e)," workflow."]})]})})}const jvt=Se.forwardRef(({children:e,...t},n)=>h.jsx("form",{ref:n,className:"space-y-4",...t,children:e})),Fvt=["boolean","object","array"],Ivt=({label:e,children:t,id:n,field:r,error:s})=>{var o;const i=Fvt.includes(r.type);return h.jsxs("div",{className:"pb-4 last:pb-0",children:[!i&&h.jsxs(Ue,{as:"label",variant:"ui-sm",className:"text-icon3 pb-1 block",htmlFor:n,children:[e,r.required&&h.jsx("span",{className:"text-accent2",children:" *"})]}),t,((o=r.fieldConfig)==null?void 0:o.description)&&h.jsx(Ue,{as:"p",variant:"ui-sm",className:"text-icon6",children:r.fieldConfig.description}),s&&h.jsx(Ue,{as:"p",variant:"ui-sm",className:"text-accent2",children:s})]})},Ovt=V1("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),X0e=A.forwardRef(({className:e,variant:t,...n},r)=>h.jsx("div",{ref:r,role:"alert",className:Ve(Ovt({variant:t}),e),...n}));X0e.displayName="Alert";const J0e=A.forwardRef(({className:e,...t},n)=>h.jsx("h5",{ref:n,className:Ve("mb-1 font-medium leading-none tracking-tight",e),...t}));J0e.displayName="AlertTitle";const Rvt=A.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:Ve("text-sm [&_p]:leading-relaxed",e),...t}));Rvt.displayName="AlertDescription";const Lvt=({error:e})=>h.jsxs(X0e,{variant:"destructive",children:[h.jsx(oR,{className:"h-4 w-4"}),h.jsx(J0e,{children:e})]}),Bvt=({children:e})=>h.jsx(Js,{type:"submit",children:e}),$vt=({inputProps:e,error:t,field:n,id:r})=>{const{key:s,...i}=e;return h.jsx(ga,{id:r,className:t?"border-destructive":"",...i,defaultValue:n.default})},zvt=({inputProps:e,error:t,field:n,id:r})=>{const{key:s,...i}=e;return A.useEffect(()=>{n.default!==void 0&&i.onChange({target:{value:Number(n.default),name:e.name}})},[n.default]),h.jsx(ga,{id:r,type:"number",className:t?"border-destructive":"",...i,defaultValue:n.default!==void 0?Number(n.default):void 0,onChange:o=>{const a=o.target.value;a!==""&&!isNaN(Number(a))&&i.onChange({target:{value:a,name:e.name}})},onBlur:o=>{const a=o.target.value;a!==""&&!isNaN(Number(a))&&i.onChange({target:{value:Number(a),name:e.name}})}})},Z0e=A.forwardRef(({className:e,...t},n)=>h.jsx(aB,{ref:n,className:Ve("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:h.jsx(Zge,{className:Ve("flex items-center justify-center text-current"),children:h.jsx(kh,{className:"h-4 w-4"})})}));Z0e.displayName=aB.displayName;const Hvt=({field:e,label:t,id:n,inputProps:r,value:s})=>h.jsxs("div",{className:"flex items-center space-x-2",children:[h.jsx(Z0e,{id:n,onCheckedChange:i=>{const o={target:{name:r.name,value:i}};r.onChange(o)},defaultChecked:e.default,disabled:r.disabled||r.readOnly}),h.jsxs(Ue,{as:"label",variant:"ui-sm",className:"text-icon3",htmlFor:n,children:[t,e.required&&h.jsx("span",{className:"text-accent2",children:" *"})]})]});function Q0e({className:e,classNames:t,showOutsideDays:n=!0,...r}){return h.jsx(r0t,{showOutsideDays:n,className:Ve("p-3",e),classNames:{months:"flex flex-col space-y-4 sm:space-y-0",month:"space-y-4",caption_label:"text-sm text-text font-medium",nav:"space-x-1 flex items-center",nav_button_previous:Ve(mD({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100","absolute left-4 top-[56px] z-10"),nav_button_next:Ve(mD({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100","absolute right-4 top-[56px] z-10"),dropdown_month:"w-full border-collapse space-y-1",weeknumber:"flex",day:Ve(mD({variant:"ghost"}),"relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",r.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md","h-8 w-8 p-0 hover:bg-lightGray-7/50 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"!bg-primary !text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-lightGray-7/50 text-accent-foreground",day_outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},components:{},...r})}Q0e.displayName="Calendar";const Vvt=hLe,Uvt=fLe,ebe=A.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},s)=>h.jsx(pLe,{children:h.jsx(Wae,{ref:s,align:t,sideOffset:n,className:Ve("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));ebe.displayName=Wae.displayName;const Wvt=({value:e,setValue:t,children:n,className:r,placeholder:s,...i})=>{const[o,a]=A.useState(!1);return h.jsxs(Vvt,{open:o,onOpenChange:a,children:[h.jsx(Uvt,{asChild:!0,children:n||h.jsx(tbe,{value:e,placeholder:s,className:r,"data-testid":"datepicker-button"})}),h.jsx(ebe,{className:"backdrop-blur-4xl w-auto p-0 bg-[#171717]",align:"start","data-testid":"datepicker-calendar",children:h.jsx(qvt,{value:e,setValue:l=>t(l?new Date(`${l}z`):null),clearable:i.clearable,setOpenPopover:a,...i})})]})},qvt=({value:e,setValue:t,setOpenPopover:n,clearable:r,placeholder:s,className:i,...o})=>{const[a,l]=A.useState(e?lo(e,"PP"):""),[c,u]=A.useState(e?new Date(e):void 0),d=fge(x=>{dL(x)&&(u(x),t==null||t(x),n==null||n(!1))},2e3),p=x=>{l(x.currentTarget.value);const S=new Date(x.target.value);d(S)},g=x=>{u(x),t==null||t(x),n==null||n(!1),l(x?lo(x,"PP"):"")},b=x=>{u(x),l(x?lo(x,"PP"):"")};return h.jsxs("div",{"aria-label":"Choose date",className:"relative mt-2 flex flex-col gap-2",onKeyDown:x=>{x.stopPropagation(),x.key==="Escape"&&(n==null||n(!1))},children:[h.jsx("div",{className:"w-full px-3",children:h.jsx(ga,{type:"text",value:a,onChange:p,placeholder:s,className:i})}),h.jsx(Q0e,{mode:"single",month:c,selected:c,onMonthChange:b,onSelect:g,...o}),h.jsx("div",{className:"px-3 pb-2",children:r&&h.jsx(Js,{variant:"outline",tabIndex:0,className:"w-full !opacity-50 duration-200 hover:!opacity-100",onClick:()=>{t(null),u(void 0),l(""),n==null||n(!1)},children:"Clear"})})]})},tbe=A.forwardRef(({value:e,placeholder:t,className:n,...r},s)=>h.jsxs(Js,{ref:s,variant:"outline",className:Ve("bg-neutral-825 border-neutral-775 w-full justify-start whitespace-nowrap rounded-md border px-2 py-0 text-left flex items-center gap-1",n),...r,children:[h.jsx(BBe,{className:"h-4 w-4"}),e?h.jsx("span",{className:"text-white",children:lo(e,"PPP")}):h.jsx("span",{className:"text-gray",children:t??"Pick a date"})]}));tbe.displayName="DefaultButton";const Gvt=({inputProps:e,field:t,error:n,id:r})=>{const{key:s,...i}=e,[o,a]=A.useState(null);return A.useEffect(()=>{if(t.default){const l=new Date(t.default);dL(l)&&a(l)}},[t]),h.jsx(Wvt,{id:r,className:n?"border-destructive":"",value:o,setValue:l=>{const c=l&&new Date(l).toISOString();c&&(i.onChange({target:{value:c==null?void 0:c.toString(),name:e.name}}),a(new Date(c)))},clearable:!0})},Yvt=_0t,Kvt=N0t,nbe=A.forwardRef(({className:e,children:t,...n},r)=>h.jsxs(Oye,{ref:r,className:Ve("flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),...n,children:[t,h.jsx(P0t,{asChild:!0,children:h.jsx(Eh,{className:"h-4 w-4 opacity-50"})})]}));nbe.displayName=Oye.displayName;const rbe=A.forwardRef(({className:e,children:t,position:n="popper",...r},s)=>h.jsx(M0t,{children:h.jsx(Rye,{ref:s,className:Ve("relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:h.jsx(j0t,{className:Ve("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));rbe.displayName=Rye.displayName;const sbe=A.forwardRef(({className:e,children:t,...n},r)=>h.jsxs(Lye,{ref:r,className:Ve("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-mastra-el-5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[h.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:h.jsx(I0t,{children:h.jsx(kh,{className:"h-4 w-4"})})}),h.jsx(F0t,{children:t})]}));sbe.displayName=Lye.displayName;const Xvt=({field:e,inputProps:t,error:n,id:r,value:s})=>{const{key:i,...o}=t;return h.jsxs(Yvt,{...o,onValueChange:a=>{const l={target:{value:a,name:t.name}};o.onChange(l)},defaultValue:e.default,children:[h.jsx(nbe,{id:r,className:n?"border-destructive":"",children:h.jsx(Kvt,{placeholder:"Select an option"})}),h.jsx(rbe,{children:(e.options||[]).map(([a,l])=>h.jsx(sbe,{value:a,children:l},a))})]})},Jvt=({label:e,children:t})=>{const n=e!==""&&e!=="";return h.jsxs("div",{className:"",children:[n&&h.jsxs(Ue,{as:"h3",variant:"ui-sm",className:"text-icon3 flex items-center gap-1 pb-2",children:[h.jsx(ot,{size:"sm",children:h.jsx(aC,{})}),e]}),h.jsx("div",{className:n?"flex flex-col gap-1 [&>*]:border-dashed [&>*]:border-l [&>*]:border-l-border1 [&>*]:pl-4":"",children:t})]})},Zvt=({label:e,children:t,onAddItem:n})=>h.jsxs("div",{children:[h.jsxs("div",{className:"flex gap-2 justify-between",children:[h.jsxs(Ue,{as:"h3",variant:"ui-sm",className:"text-icon3 pb-2 flex items-center gap-1",children:[h.jsx(ot,{size:"sm",children:h.jsx(OBe,{})}),e]}),h.jsx(FC,{children:h.jsxs(Ta,{delayDuration:0,children:[h.jsx(_a,{asChild:!0,children:h.jsx("button",{onClick:n,type:"button",className:"text-icon3 bg-surface3 rounded-md p-1 hover:bg-surface4 hover:text-icon6 h-icon-sm w-icon-sm",children:h.jsx(ot,{size:"sm",children:h.jsx(cC,{})})})}),h.jsx(Vo,{children:"Add item"})]})})]}),h.jsx("div",{className:"flex flex-col gap-1",children:t})]}),Qvt=({children:e,onRemove:t})=>h.jsxs("div",{className:"pl-4 border-l border-border1",children:[e,h.jsxs(hn,{onClick:t,type:"button",children:[h.jsx(ot,{size:"sm",children:h.jsx(Ale,{})}),"Delete"]})]}),ewt=({inputProps:e,field:t,error:n,id:r})=>{const{key:s,onChange:i,...o}=e,[a,l]=A.useState(()=>Object.entries(t.default||{}).map(([b,x])=>({id:b||Gs(),key:b,value:x})));A.useEffect(()=>{a.length===0&&l([{id:Gs(),key:"",value:""}])},[a]);const c=A.useCallback(b=>{const x=b.reduce((S,E)=>(E.key&&(S[E.key]=E.value),S),{});i==null||i({target:{value:x,name:e.name}})},[i,e.name]),u=(b,x,S)=>{l(E=>E.map(k=>k.id===b?{...k,[x]:S}:k))},d=()=>{c(a)},p=()=>{const b=[...a,{id:Gs(),key:"",value:""}];l(b),c(b)},g=b=>{const x=a.filter(S=>S.id!==b);x.length===0&&x.push({id:Gs(),key:"",value:""}),l(x),c(x)};return h.jsxs("div",{className:"space-y-3",children:[a.map(b=>h.jsxs("div",{className:"relative space-y-2 rounded-lg border p-4",children:[h.jsx(Js,{type:"button",variant:"ghost",size:"icon",className:"absolute right-2 top-2",onClick:()=>g(b.id),children:h.jsx(Ale,{className:"h-4 w-4"})}),h.jsxs("div",{className:"space-y-2 pt-6",children:[h.jsx(ga,{placeholder:"Key",value:b.key,onChange:x=>u(b.id,"key",x.target.value),onBlur:d}),h.jsx(ga,{placeholder:"Value",value:b.value,onChange:x=>u(b.id,"value",x.target.value),onBlur:d})]})]},b.id)),h.jsxs(Js,{type:"button",variant:"outline",size:"sm",className:"w-full",onClick:p,children:[h.jsx(cC,{className:"mr-2 h-4 w-4"}),"Add Key-Value Pair"]})]})},twt={Form:jvt,FieldWrapper:Ivt,ErrorMessage:Lvt,SubmitButton:Bvt,ObjectWrapper:Jvt,ArrayWrapper:Zvt,ArrayElementWrapper:Qvt};function nwt({uiComponents:e,formComponents:t,readOnly:n,...r}){return h.jsx(wgt,{...r,uiComponents:{...twt,...e},formComponents:{string:s=>h.jsx($vt,{...s,inputProps:{...s.inputProps,readOnly:n}}),number:s=>h.jsx(zvt,{...s,inputProps:{...s.inputProps,readOnly:n}}),boolean:s=>h.jsx(Hvt,{...s,inputProps:{...s.inputProps,readOnly:n}}),date:s=>h.jsx(Gvt,{...s,inputProps:{...s.inputProps,readOnly:n}}),select:s=>h.jsx(Xvt,{...s,inputProps:{...s.inputProps,readOnly:n}}),record:s=>h.jsx(ewt,{...s,inputProps:{...s.inputProps,readOnly:n}}),...t}})}function rwt(e,t){return t!=null&&t.fieldType?t.fieldType:e instanceof ir?"object":e instanceof _u?"number":e instanceof xg?"boolean":e instanceof sh||e!=null&&e.isDatetime||e!=null&&e.isDate?"date":e instanceof ba?"string":e instanceof Pu||e instanceof wg?"select":e instanceof io?"array":e instanceof Mb?"record":"string"}function eF(e,t){var c;const n=tF(t),r=K3(t),s=rwt(n,r),i=w4(t),o=(c=n._def)==null?void 0:c.values;let a=[];o&&(Array.isArray(o)?a=o.map(u=>[u,u]):a=Object.entries(o));let l=[];return n instanceof ir&&(l=Object.entries(n.shape).map(([u,d])=>eF(u,d))),n instanceof io&&(l=[eF("0",n._def.type)]),{key:e,type:s,required:!t.isOptional(),default:i,description:n.description,fieldConfig:r,options:a,schema:l}}function tF(e){return"innerType"in e._def?tF(e._def.innerType):"schema"in e._def?tF(e._def.schema):e}function swt(e){const n=(e instanceof uo?e.innerType():e).shape;return{fields:Object.entries(n).map(([s,i])=>eF(s,i))}}class iwt extends Kmt{constructor(n){super(n);Le(this,"_schema");this._schema=n}parseSchema(){return swt(this._schema)}}function owt(e){return e instanceof ir?Object.keys(e.shape).length===0:!1}function nA({schema:e,onSubmit:t,defaultValues:n,isSubmitLoading:r,submitButtonLabel:s,className:i,readOnly:o}){const a=!(e instanceof ir);if(!e)return console.error("no form schema found"),null;const l=d=>owt(d)?HD.object({}):a?HD.object({"":d}):d,u={schema:new iwt(l(e)),onSubmit:async d=>{await(t==null?void 0:t(a?d[""]||{}:d))},defaultValues:a?n?{"":n}:void 0:n,formProps:{className:""},uiComponents:{SubmitButton:({children:d})=>t?h.jsx(hn,{variant:"light",className:"w-full",size:"lg",disabled:r,children:r?h.jsx(ot,{children:h.jsx(Da,{className:"animate-spin"})}):s||d}):null},formComponents:{Label:({value:d})=>h.jsx(u1,{className:"text-sm font-normal",children:d})},withSubmit:!0};return h.jsx(nwt,{...u,readOnly:o})}function rA(e){return Function("z",`"use strict";return (${e});`)(HD)}function FB({code:e="",language:t="ts",filename:n,className:r}){return h.jsxs(zd,{code:e,language:t,theme:z3.oneDark,children:[n?h.jsx("div",{className:"absolute w-full px-6 py-2 pl-4 text-sm rounded bg-mastra-bg-2 text-mastra-el-6/50",children:n}):null,h.jsx(zd.Code,{className:Ve("bg-transparent h-full p-6 rounded-xl whitespace-pre-wrap",n?"pt-10":"",r),children:h.jsx("div",{className:"table-row",children:h.jsxs("div",{className:"flex items-center",children:[h.jsx(zd.LineNumber,{className:"table-cell pr-4 text-sm text-right select-none text-gray-500/50"}),h.jsx(zd.LineContent,{className:"flex",children:h.jsx(zd.Token,{className:"font-mono text-sm mastra-token"})})]})})})]})}const IB=({header:e,children:t,footer:n})=>{const[r,s]=A.useState(!1);return h.jsxs("div",{className:"rounded-lg border-sm border-border1 bg-surface4",children:[h.jsxs("button",{className:"py-1 px-2 flex items-center gap-3 justify-between w-full",onClick:()=>s(i=>!i),children:[h.jsx("div",{className:"w-full",children:e}),h.jsx(ot,{children:h.jsx(Eh,{className:Ve("text-icon3 transition-transform -rotate-90",r&&"rotate-0")})})]}),t&&r&&h.jsx("div",{className:"border-t-sm border-border1",children:t}),n&&h.jsx("div",{className:"py-1 px-2 border-t-sm border-border1",children:n})]})},awt=({stepId:e,pathStatus:t,path:n})=>{const r=t==="completed"?"Completed":e===n?t.charAt(0).toUpperCase()+t.slice(1):t==="executing"?"Executing":"Completed";return h.jsx(IB,{header:h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsxs(ot,{children:[r==="Completed"&&h.jsx(q1,{className:"text-accent1"}),r==="Failed"&&h.jsx(G1,{className:"text-accent2"}),r==="Executing"&&h.jsx(Da,{className:"text-icon3 animate-spin"})]}),h.jsx(Ue,{as:"span",variant:"ui-lg",className:"text-icon6 font-medium",children:n})]})})},lwt=({jsonResult:e,sanitizedJsonResult:t})=>{const{handleCopy:n}=IC({text:e}),[r,s]=A.useState(!1);return h.jsx(IB,{header:h.jsxs("div",{className:"flex items-center gap-2 justify-between w-full",children:[h.jsxs(Ue,{variant:"ui-lg",className:"text-icon6 flex items-center gap-3 font-medium",children:[h.jsx(ot,{children:h.jsx(Rbt,{})}),"Workflow Execution (JSON)"]}),h.jsxs(Ta,{children:[h.jsx(_a,{asChild:!0,children:h.jsx("button",{className:"p-2 rounded-lg hover:bg-surface5 transition-colors duration-150 ease-in-out text-icon3 hover:text-icon6",onClick:()=>n(),children:h.jsx(ot,{size:"sm",children:h.jsx(Dh,{})})})}),h.jsx(Vo,{children:"Copy result"})]})]}),footer:h.jsx("button",{className:"w-full h-full text-center text-icon2 hover:text-icon6 text-ui-md",onClick:()=>s(i=>!i),children:r?"collapse":"expand"}),children:r?h.jsx(FB,{className:"w-full overflow-x-auto",code:t||e,language:"json"}):null})};function cwt({workflowId:e,setRunId:t}){var J;const{legacyResult:n,setLegacyResult:r,payload:s,setPayload:i}=A.useContext(zC),{isLoading:o,legacyWorkflow:a}=W0e(e),{createLegacyWorkflowRun:l,startLegacyWorkflowRun:c}=Gxt(),{watchLegacyWorkflow:u,legacyWatchResult:d,isWatchingLegacyWorkflow:p}=Yxt(),{resumeLegacyWorkflow:g,isResumingLegacyWorkflow:b}=Kxt(),[x,S]=A.useState([]),[E,k]=A.useState(!1),T=a==null?void 0:a.triggerSchema,P=async V=>{try{if(!a)return;k(!0),r(null);const{runId:Z}=await l({workflowId:e});t==null||t(Z),u({workflowId:e,runId:Z}),c({workflowId:e,runId:Z,input:V})}catch{k(!1),Fo.error("Error executing workflow")}},M=async V=>{if(!a)return;const{stepId:Z,runId:G,context:q}=V,{runId:z}=await l({workflowId:e,prevRunId:G});u({workflowId:e,runId:z}),await g({stepId:Z,runId:z,context:q,workflowId:e})},j=n??d,F=(j==null?void 0:j.activePaths)??{};if(A.useEffect(()=>{k(p)},[p]),A.useEffect(()=>{if(!(j!=null&&j.activePaths)||!(n!=null&&n.runId))return;const V=Object.entries(j.activePaths).filter(([Z,{status:G}])=>G==="suspended").map(([Z,{suspendPayload:G}])=>({stepId:Z,runId:n.runId,suspendPayload:G}));S(V)},[j,n]),A.useEffect(()=>{d&&r(d)},[d]),o)return h.jsx(N4,{className:"h-[calc(100vh-126px)] pt-2 px-4 pb-4 text-xs",children:h.jsxs("div",{className:"space-y-4",children:[h.jsx(as,{className:"h-10"}),h.jsx(as,{className:"h-10"})]})});if(!a)return null;const I=x.length>0,B=T?rA(Fg(c1(T))):null,{sanitizedOutput:L,...W}=n??{},$=Object.values(F).length>0;return h.jsx("div",{className:"h-full px-5 pt-3 pb-12",children:h.jsxs("div",{className:"space-y-4",children:[b&&h.jsxs("div",{className:"py-2 px-5 flex items-center gap-2 bg-surface5 -mx-5 -mt-5 border-b-sm border-border1",children:[h.jsx(ot,{children:h.jsx(Da,{className:"animate-spin text-icon6"})}),h.jsx(Ue,{children:"Resuming workflow"})]}),!I&&h.jsx(h.Fragment,{children:B?h.jsx(nA,{schema:B,defaultValues:s,isSubmitLoading:p,submitButtonLabel:"Run",onSubmit:V=>{i(V),P(V)}}):h.jsx(hn,{className:"w-full",variant:"light",disabled:E,onClick:()=>P(null),children:E?h.jsx(ot,{children:h.jsx(Da,{className:"animate-spin"})}):"Trigger"})}),I&&(x==null?void 0:x.map(V=>{const Z=a.steps[V.stepId],G=Z!=null&&Z.inputSchema?rA(Fg(c1(Z.inputSchema))):P1(Ge(),qo());return h.jsxs("div",{className:"flex flex-col px-4",children:[h.jsx(Ru,{variant:"secondary",className:"text-mastra-el-3",size:"xs",children:V.stepId}),V.suspendPayload&&h.jsx("div",{children:h.jsx(FB,{className:"w-full overflow-x-auto p-2",code:JSON.stringify(V.suspendPayload,null,2),language:"json"})}),h.jsx(nA,{schema:G,isSubmitLoading:b,submitButtonLabel:"Resume",onSubmit:q=>{M({stepId:V.stepId,runId:V.runId,suspendPayload:V.suspendPayload,context:q})}})]})})),$&&h.jsxs(h.Fragment,{children:[h.jsx("hr",{className:"border-border1 border-sm my-5"}),h.jsx("div",{className:"flex flex-col gap-4",children:(J=Object.entries(F))==null?void 0:J.map(([V,{status:Z,stepPath:G}])=>h.jsx("div",{className:"flex flex-col gap-1",children:G==null?void 0:G.map((q,z)=>h.jsx(awt,{stepId:V,pathStatus:Z,path:q},z))},V))})]}),n&&h.jsxs(h.Fragment,{children:[h.jsx("hr",{className:"border-border1 border-sm my-5"}),h.jsx(lwt,{sanitizedJsonResult:L,jsonResult:JSON.stringify(W,null,2)})]})]})})}const uwt=({stepId:e,status:t,result:n})=>h.jsx(IB,{header:h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsxs(ot,{children:[t==="success"&&h.jsx(q1,{className:"text-accent1"}),t==="failed"&&h.jsx(G1,{className:"text-accent2"}),t==="suspended"&&h.jsx(XBe,{className:"text-accent3"}),t==="waiting"&&h.jsx(aR,{className:"text-accent5"}),t==="running"&&h.jsx(Da,{className:"text-icon3 animate-spin"})]}),h.jsx(Ue,{as:"span",variant:"ui-lg",className:"text-icon6 font-medium",children:e.charAt(0).toUpperCase()+e.slice(1)})]}),children:h.jsxs("div",{className:"rounded-md bg-surface4 p-1 font-mono relative",children:[h.jsx(dg,{content:JSON.stringify(n,null,2),className:"absolute top-2 right-2 z-10"}),h.jsx(Xj,{data:n})]})}),hQ=({schema:e,defaultValues:t,isSubmitLoading:n,submitButtonLabel:r,onSubmit:s})=>{const[i,o]=A.useState("form");return h.jsxs("div",{children:[h.jsx(_4,{value:i,onValueChange:a=>o(a),className:"pb-4",children:h.jsxs("div",{className:"flex flex-row gap-4",children:[h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx(Lg,{value:"form",id:"form"}),h.jsx(u1,{htmlFor:"form",className:"!text-icon3 text-ui-sm",children:"Form"})]}),h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx(Lg,{value:"json",id:"json"}),h.jsx(u1,{htmlFor:"json",className:"!text-icon3 text-ui-sm",children:"JSON"})]})]})}),i==="form"?h.jsx(nA,{schema:e,defaultValues:t,isSubmitLoading:n,submitButtonLabel:r,onSubmit:s}):h.jsx(dwt,{schema:e,defaultValues:t,isSubmitLoading:n,submitButtonLabel:r,onSubmit:s})]})},dwt=({schema:e,defaultValues:t,isSubmitLoading:n,submitButtonLabel:r,onSubmit:s})=>{const[i,o]=A.useState([]),[a,l]=A.useState(JSON.stringify(t??{},null,2)),c=()=>{o([]);try{const u=e.safeParse(JSON.parse(a));u.success?s(u.data):o(u.error.issues.map(d=>`[${d.path.join(".")}] ${d.message}`))}catch{o(["Invalid JSON provided"])}};return h.jsxs("div",{className:"flex flex-col gap-4",children:[i.length>0&&h.jsxs("div",{className:"border-sm border-accent2 rounded-lg p-2",children:[h.jsxs(Ue,{as:"p",variant:"ui-md",className:"text-accent2 font-semibold",children:[i.length," errors found"]}),h.jsx("ul",{className:"list-disc list-inside",children:i.map((u,d)=>h.jsx("li",{className:"text-ui-sm text-accent2",children:u},d))})]}),h.jsx(hwt,{data:a,onChange:l}),h.jsx(hn,{variant:"light",onClick:c,className:"w-full",size:"lg",children:n?h.jsx(Da,{className:"animate-spin"}):r})]})},hwt=({data:e,onChange:t})=>{const n=i0e();return h.jsxs("div",{className:"rounded-md bg-[#1a1a1a] p-1 font-mono",children:[h.jsx(dg,{content:e,className:"absolute top-2 right-2 z-10"}),h.jsx(al,{value:e,theme:n,extensions:[Fu],onChange:t})]})};function fwt({workflowId:e,setRunId:t,workflow:n,isLoading:r,createWorkflowRun:s,resumeWorkflow:i,streamWorkflow:o,isStreamingWorkflow:a,streamResult:l,isResumingWorkflow:c,isCancellingWorkflowRun:u,cancelWorkflowRun:d}){var z,Y;const{runtimeContext:p}=dy(),{result:g,setResult:b,payload:x,setPayload:S}=A.useContext(zC),[E,k]=A.useState([]),[T,P]=A.useState(!1),[M,j]=A.useState(""),[F,I]=A.useState(null),B=n==null?void 0:n.inputSchema,L=async U=>{try{if(!n)return;P(!0),I(null),b(null);const{runId:X}=await s({workflowId:e});t==null||t(X),j(X),o({workflowId:e,runId:X,inputData:U,runtimeContext:p})}catch{P(!1),Fo.error("Error executing workflow")}},W=async U=>{if(!n)return;I(null);const{stepId:X,runId:ne,resumeData:H}=U,{runId:ee}=await s({workflowId:e,prevRunId:ne});await i({step:X,runId:ee,resumeData:H,workflowId:e,runtimeContext:p})},$=async()=>{const U=await d({workflowId:e,runId:M});I(U)},J=g??l;if(A.useEffect(()=>{P(a)},[a]),A.useEffect(()=>{var X,ne;if(!((ne=(X=J==null?void 0:J.payload)==null?void 0:X.workflowState)!=null&&ne.steps)||!(g!=null&&g.runId))return;const U=Object.entries(J.payload.workflowState.steps).filter(([H,{status:ee}])=>ee==="suspended").map(([H,{payload:ee}])=>({stepId:H,runId:g.runId,suspendPayload:ee,isLoading:!1}));k(U)},[J,g]),A.useEffect(()=>{l&&b(l)},[l]),r)return h.jsx(N4,{className:"h-[calc(100vh-126px)] pt-2 px-4 pb-4 text-xs",children:h.jsxs("div",{className:"space-y-4",children:[h.jsx(as,{className:"h-10"}),h.jsx(as,{className:"h-10"})]})});if(!n)return null;const V=E.length>0,Z=B?rA(Fg(c1(B))):null,G=((Y=(z=J==null?void 0:J.payload)==null?void 0:z.workflowState)==null?void 0:Y.steps)??{},q=Object.values(G).length>0;return h.jsxs("div",{className:"h-full pt-3 pb-12",children:[h.jsxs("div",{className:"space-y-4 px-5 pb-5 border-b-sm border-border1",children:[(c||V&&a)&&h.jsxs("div",{className:"py-2 px-5 flex items-center gap-2 bg-surface5 -mx-5 -mt-5 border-b-sm border-border1",children:[h.jsx(ot,{children:h.jsx(Da,{className:"animate-spin text-icon6"})}),h.jsx(Ue,{children:"Resuming workflow"})]}),!V&&h.jsx(h.Fragment,{children:Z?h.jsx(hQ,{schema:Z,defaultValues:x,isSubmitLoading:a,submitButtonLabel:"Run",onSubmit:U=>{S(U),L(U)}}):h.jsx(hn,{className:"w-full",variant:"light",disabled:T,onClick:()=>L(null),children:T?h.jsx(ot,{children:h.jsx(Da,{className:"animate-spin"})}):"Trigger"})}),!a&&V&&(E==null?void 0:E.map(U=>{const X=n.allSteps[U.stepId];if(!X||X.isWorkflow)return null;const ne=X!=null&&X.resumeSchema?rA(Fg(c1(X.resumeSchema))):P1(Ge(),qo());return h.jsxs("div",{className:"flex flex-col px-4",children:[h.jsx(Ru,{variant:"secondary",className:"text-mastra-el-3",size:"xs",children:U.stepId}),U.suspendPayload&&h.jsx("div",{children:h.jsx(FB,{className:"w-full overflow-x-auto p-2",code:JSON.stringify(U.suspendPayload,null,2),language:"json"})}),h.jsx(hQ,{schema:ne,isSubmitLoading:c,submitButtonLabel:"Resume",onSubmit:H=>{var ie;const ee=(ie=U.stepId)==null?void 0:ie.split(".");W({stepId:ee,runId:U.runId,suspendPayload:U.suspendPayload,resumeData:H})}})]},U.stepId)})),(g==null?void 0:g.runId)&&h.jsxs(hn,{variant:"light",className:"w-full",size:"lg",onClick:$,disabled:!!(F!=null&&F.message)||u,children:[u?h.jsx(ot,{children:h.jsx(Da,{className:"animate-spin"})}):h.jsx(ot,{children:h.jsx(ZBe,{})}),(F==null?void 0:F.message)||"Cancel Workflow Run"]}),q&&h.jsxs(h.Fragment,{children:[h.jsx("hr",{className:"border-border1 border-sm my-5"}),h.jsxs("div",{className:"flex flex-col gap-2",children:[h.jsx(Ru,{variant:"secondary",className:"px-4 text-mastra-el-3",size:"xs",children:"Status"}),h.jsx("div",{className:"px-4 flex flex-col gap-4",children:Object.entries(G).filter(([U,X])=>U!=="input"&&!U.endsWith(".input")).map(([U,{status:X,output:ne}])=>h.jsx(uwt,{stepId:U,status:X,result:ne??{}},U))})]})]})]}),g&&h.jsx("div",{className:"p-5 border-b-sm border-border1",children:h.jsx(pwt,{result:g})})]})}const pwt=({result:e})=>{const[t,n]=A.useState(!1);return h.jsxs(h.Fragment,{children:[h.jsxs(hn,{variant:"light",onClick:()=>n(!0),className:"w-full",size:"lg",children:[h.jsx(ot,{children:h.jsx(aC,{className:"text-icon3"})}),"Open Workflow Execution (JSON)"]}),h.jsx(No,{open:t,onOpenChange:n,children:h.jsx(OC,{children:h.jsxs(Zi,{className:"max-w-6xl max-h-[90vh] overflow-y-auto overflow-x-hidden bg-surface2",children:[h.jsx(Qi,{children:"Workflow Execution (JSON)"}),h.jsx("div",{className:"w-full h-full overflow-x-scroll",children:h.jsx(Uj,{data:e,className:"p-4"})})]})})})]})},mwt=({workflowId:e,runId:t,isLoading:n,runs:r,onPressRun:s})=>n?h.jsx("div",{className:"p-4",children:h.jsx(as,{className:"h-[600px]"})}):r.length===0?h.jsx("div",{className:"p-4",children:h.jsx(Ue,{variant:"ui-md",className:"text-icon6 text-center",children:"No previous run"})}):h.jsx("ol",{className:"pb-10",children:r.map(i=>{var o,a;return h.jsx("li",{children:h.jsxs("button",{onClick:()=>s({workflowId:e,runId:i.runId}),className:zn("px-3 py-2 border-b-sm border-border1 block w-full hover:bg-surface4 text-left",{"bg-surface4":i.runId===t}),children:[h.jsx(Ue,{variant:"ui-lg",className:"font-medium text-icon6 truncate",as:"p",children:i.runId}),h.jsx(Ue,{variant:"ui-sm",className:"font-medium text-icon3 truncate",as:"p",children:typeof(i==null?void 0:i.snapshot)=="string"?"":(o=i==null?void 0:i.snapshot)!=null&&o.timestamp?lo((a=i==null?void 0:i.snapshot)==null?void 0:a.timestamp,"MMM d, yyyy h:mm a"):""})]})},i.runId)})}),gwt=[{id:"name",header:"Name",cell:({row:e})=>{const{Link:t}=BC();return h.jsx(SB,{icon:h.jsx(kc,{}),name:h.jsx(t,{href:e.original.link,children:e.original.name}),description:void 0,meta:void 0})},meta:{width:"auto"}},{id:"stepsCount",header:"Steps",size:300,cell:({row:e})=>h.jsx(Dr,{children:h.jsxs("div",{className:"flex justify-end items-center gap-2",children:[h.jsxs(Un,{icon:h.jsx(kle,{}),className:"!h-button-md",children:[e.original.stepsCount," step",e.original.stepsCount>1?"s":""]}),e.original.isLegacy?h.jsx(Un,{className:"!text-foreground/80 !h-button-md",children:"Legacy"}):null]})})}];function ywt({workflows:e,legacyWorkflows:t,isLoading:n,onClickRow:r}){const s=A.useMemo(()=>{const l=Object.keys(e??{}).map(u=>{var p;const d=e==null?void 0:e[u];return{id:u,name:(d==null?void 0:d.name)||"N/A",stepsCount:(p=Object.keys((d==null?void 0:d.steps)??{}))==null?void 0:p.length,isLegacy:!1,link:`/workflows/${u}/graph`}}),c=Object.keys(t??{}).map(u=>{var p;const d=t==null?void 0:t[u];return{id:u,name:(d==null?void 0:d.name)||"N/A",stepsCount:(p=Object.keys((d==null?void 0:d.steps)??{}))==null?void 0:p.length,isLegacy:!0,link:`/workflows/legacy/${u}/graph`}});return[...l,...c]},[e,t]),i=TL({data:s,columns:gwt,getCoreRowModel:AL()});if(n)return h.jsx(bwt,{});const o=i.getHeaderGroups()[0],a=i.getRowModel().rows.concat();return a.length===0?h.jsx(xwt,{}):h.jsx(TB,{children:h.jsxs(hy,{children:[h.jsx(fy,{className:"sticky top-0",children:o.headers.map(l=>h.jsx(Xs,{style:{width:l.index===0?"auto":l.column.getSize()},children:Qb(l.column.columnDef.header,l.getContext())},l.id))}),h.jsx(Mh,{children:a.map(l=>h.jsx(jh,{onClick:()=>r(l.original.id),children:l.getVisibleCells().map(c=>h.jsx(Se.Fragment,{children:Qb(c.column.columnDef.cell,c.getContext())},c.id))},l.id))})]})})}const bwt=()=>h.jsxs(hy,{children:[h.jsxs(fy,{children:[h.jsx(Xs,{children:"Name"}),h.jsx(Xs,{width:300,children:"Steps"})]}),h.jsx(Mh,{children:Array.from({length:3}).map((e,t)=>h.jsxs(jh,{children:[h.jsx(Dr,{children:h.jsx(as,{className:"h-4 w-1/2"})}),h.jsx(Dr,{width:300,children:h.jsx(as,{className:"h-4 w-1/2"})})]},t))})]}),xwt=()=>h.jsx("div",{className:"flex h-full items-center justify-center",children:h.jsx(LC,{iconSlot:h.jsx(Ubt,{}),titleSlot:"Configure Workflows",descriptionSlot:"Mastra workflows are not configured yet. You can find more information in the documentation.",actionSlot:h.jsxs(hn,{size:"lg",className:"w-full",variant:"light",as:"a",href:"https://mastra.ai/en/docs/workflows/overview",target:"_blank",children:[h.jsx(ot,{children:h.jsx(kc,{})}),"Docs"]})})});function yl({children:e,className:t,style:n}){const r=ibe("MainContentLayout");return h.jsx("main",{className:Ve("grid grid-rows-[auto_1fr] h-full items-start content-start",t),style:{...n,...r?{border:"3px dotted red"}:{}},children:e})}function ho({children:e,className:t,isCentered:n=!1,isDivided:r=!1,hasLeftServiceColumn:s=!1,style:i}){const o=ibe("MainContentContent");return h.jsx("div",{className:Ve("grid overflow-y-auto h-full ","overflow-x-auto min-w-[min-content]",{"items-start content-start":!n&&!r&&!s,"grid place-items-center":n,"grid-cols-[1fr_1fr]":r&&!s,"grid-cols-[auto_1fr_1fr]":r&&s,"grid-cols-[auto_1fr]":!r&&s},t),style:{...i,...o?{border:"3px dotted orange"}:{}},children:e})}function ibe(e){try{const t=localStorage.getItem("add-dev-style-to-components");return t?t.split(",").map(r=>r.trim()).filter(Boolean).includes(e):!1}catch(t){return console.error("Error reading or parsing localStorage:",t),!1}}const obe=({children:e})=>h.jsx("nav",{className:"bg-surface2 border-r-sm border-border1 min-h-full overflow-hidden",children:e}),sA=({children:e,as:t="a",href:n,className:r,prefetch:s,to:i})=>h.jsx(t,{href:n,prefetch:s,to:i,className:zn("text-ui-sm flex h-full w-full flex-col justify-center font-medium",r),children:e}),abe=({children:e})=>h.jsx("ol",{children:e}),iA=({children:e,isActive:t})=>h.jsx("li",{className:zn("border-b-sm border-border1 hover:bg-surface3 group flex h-[54px] items-center justify-between gap-2 pl-5 py-2",t&&"bg-surface4"),children:e}),lbe=({onClick:e})=>h.jsx(hn,{className:"shrink-0 border-none bg-transparent opacity-0 transition-all group-focus-within:opacity-100 group-hover:opacity-100",onClick:e,children:h.jsx(ot,{children:h.jsx($b,{"aria-label":"delete thread",className:"text-icon3"})})}),Yd=({children:e,label:t})=>h.jsx("nav",{"aria-label":t,children:h.jsx("ol",{className:"gap-sm flex items-center",children:e})}),Vr=({className:e,as:t,isCurrent:n,...r})=>{const s=t||"span";return h.jsxs(h.Fragment,{children:[h.jsx("li",{className:"flex h-full items-center",children:h.jsx(s,{"aria-current":n?"page":void 0,className:zn("text-ui-lg leading-ui-lg font-medium",n?"text-white":"text-icon3",e),...r})}),!n&&h.jsx("li",{role:"separator",className:"flex h-full items-center",children:h.jsx(ot,{className:"text-icon3",children:h.jsx(Vbt,{})})})]})},fQ=e=>h.jsxs("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"21",height:"21",viewBox:"0 0 21 21",fill:"none",children:[h.jsx("rect",{x:"0.605469",y:"0.5",width:"20",height:"20",rx:"2.18625",fill:"black"}),h.jsx("circle",{cx:"10.6059",cy:"10.5004",r:"6.0121",stroke:"url(#paint0_linear_18520_30330)",strokeWidth:"0.766389"}),h.jsx("ellipse",{cx:"10.6069",cy:"10.501",rx:"6.0121",ry:"4.0324",transform:"rotate(45 10.6069 10.501)",stroke:"url(#paint1_linear_18520_30330)",strokeWidth:"0.766389"}),h.jsx("path",{d:"M8.15234 10.5234H13.0931",stroke:"url(#paint2_linear_18520_30330)",strokeWidth:"0.766389"}),h.jsx("path",{d:"M9.36523 11.7773L11.8755 9.26708",stroke:"url(#paint3_linear_18520_30330)",strokeWidth:"0.766389"}),h.jsx("path",{d:"M11.877 11.7773L9.36669 9.26708",stroke:"url(#paint4_linear_18520_30330)",strokeWidth:"0.766389"}),h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.49185 7.85663C5.44831 8.55655 4.84055 9.49673 4.84055 10.5025C4.84055 11.5082 5.44831 12.4484 6.49185 13.1483C7.5338 13.8472 8.98737 14.2875 10.6052 14.2875C12.2231 14.2875 13.6767 13.8472 14.7186 13.1483C15.7621 12.4484 16.3699 11.5082 16.3699 10.5025C16.3699 9.49673 15.7621 8.55655 14.7186 7.85663C13.6767 7.15778 12.2231 6.7175 10.6052 6.7175C8.98737 6.7175 7.5338 7.15778 6.49185 7.85663ZM6.21621 7.44566C7.35021 6.68507 8.9027 6.22266 10.6052 6.22266C12.3078 6.22266 13.8602 6.68507 14.9942 7.44566C16.1267 8.20518 16.8648 9.2812 16.8648 10.5025C16.8648 11.7238 16.1267 12.7998 14.9942 13.5593C13.8602 14.3199 12.3078 14.7823 10.6052 14.7823C8.9027 14.7823 7.35021 14.3199 6.21621 13.5593C5.0838 12.7998 4.3457 11.7238 4.3457 10.5025C4.3457 9.2812 5.0838 8.20518 6.21621 7.44566Z",fill:"url(#paint5_linear_18520_30330)"}),h.jsxs("defs",{children:[h.jsxs("linearGradient",{id:"paint0_linear_18520_30330",x1:"10.6059",y1:"4.48828",x2:"10.6059",y2:"16.5125",gradientUnits:"userSpaceOnUse",children:[h.jsx("stop",{stopColor:"#CACACA"}),h.jsx("stop",{offset:"1",stopColor:"#5C5C5C"})]}),h.jsxs("linearGradient",{id:"paint1_linear_18520_30330",x1:"10.6069",y1:"6.46857",x2:"10.6069",y2:"14.5334",gradientUnits:"userSpaceOnUse",children:[h.jsx("stop",{stopColor:"#CACACA"}),h.jsx("stop",{offset:"1",stopColor:"#5C5C5C"})]}),h.jsxs("linearGradient",{id:"paint2_linear_18520_30330",x1:"10.6227",y1:"10.5234",x2:"10.6227",y2:"11.5234",gradientUnits:"userSpaceOnUse",children:[h.jsx("stop",{stopColor:"#CACACA"}),h.jsx("stop",{offset:"1",stopColor:"#5C5C5C"})]}),h.jsxs("linearGradient",{id:"paint3_linear_18520_30330",x1:"10.6204",y1:"10.5222",x2:"11.3275",y2:"11.2293",gradientUnits:"userSpaceOnUse",children:[h.jsx("stop",{stopColor:"#CACACA"}),h.jsx("stop",{offset:"1",stopColor:"#5C5C5C"})]}),h.jsxs("linearGradient",{id:"paint4_linear_18520_30330",x1:"10.6218",y1:"10.5222",x2:"11.3289",y2:"9.81511",gradientUnits:"userSpaceOnUse",children:[h.jsx("stop",{stopColor:"#CACACA"}),h.jsx("stop",{offset:"1",stopColor:"#5C5C5C"})]}),h.jsxs("linearGradient",{id:"paint5_linear_18520_30330",x1:"10.6052",y1:"6.22266",x2:"10.6052",y2:"14.7823",gradientUnits:"userSpaceOnUse",children:[h.jsx("stop",{stopColor:"#CACACA"}),h.jsx("stop",{offset:"1",stopColor:"#5C5C5C"})]})]})]}),vwt=[{name:"Agents",url:"/agents",icon:Nh},{name:"Networks",url:"/networks",icon:mCe},{name:"Tools",url:"/tools",icon:gl},{name:"MCP Servers",url:"/mcps",icon:T4},{name:"Workflows",url:"/workflows",icon:kc},{name:"Runtime Context",url:"/runtime-context",icon:dCe}];function wwt(){const{state:e,toggleSidebar:t}=eC(),r=xc().pathname;return h.jsxs(toe,{collapsible:"icon",children:[h.jsxs(roe,{className:"w-full pl-1 pt-3 pb-0",children:[h.jsxs("div",{className:"flex justify-between gap-2 items-center",children:[h.jsx("span",{className:"flex shrink-0",children:e==="collapsed"?h.jsx(fQ,{className:"h-10 w-10 shrink-0 ml-1"}):h.jsxs("span",{className:"flex items-center gap-0.5 pl-1",children:[h.jsx(fQ,{className:"h-10 w-10 shrink-0"}),h.jsx("span",{className:"font-serif text-sm",children:"Mastra"})]})}),e==="expanded"&&h.jsxs(Kl,{children:[h.jsx(Xl,{asChild:!0,children:h.jsx(y0,{onClick:()=>t(),className:"w-8 text-icon3",children:h.jsx(zV,{})})}),h.jsx(nl,{className:"bg-border1 font-sans text-icon6",children:"Collapse sidebar"})]})]}),e==="collapsed"&&h.jsx(y0,{onClick:()=>t(),tooltip:"Expand sidebar",className:"w-8 text-icon3 ml-2 absolute mt-[52px] p-1",children:h.jsx(zV,{className:"rotate-180"})})]}),h.jsx(ioe,{className:ic("p-1 transition-transform",e==="collapsed"&&"translate-y-10"),children:h.jsx(wP,{children:h.jsx(SP,{children:h.jsx(CP,{children:vwt.map((s,i)=>{const[o,a]=r.split("/"),l=s.name.toLowerCase(),c=s.url===r||s.name===r||a===l;return h.jsx(VE,{children:h.jsx(y0,{tooltip:s.name,asChild:!0,children:h.jsxs(Zt,{className:`group/icon pr-4 ${c?"text-primary bg-muted/50":"text-[#939393]"}`,to:s.url,children:[h.jsx(ot,{children:h.jsx(s.icon,{})}),h.jsx("span",{className:"text-[0.8rem] font-normal",children:s.name})]})})},`${s.name}-${i}`)})})})})}),h.jsx(soe,{className:"px-1",children:h.jsx(wP,{children:h.jsx(SP,{children:h.jsxs(CP,{children:[h.jsx(VE,{children:h.jsx(y0,{tooltip:"Documentation",asChild:!0,children:h.jsxs("a",{className:"group/icon text-[#939393]",href:"https://mastra.ai/docs",target:"_blank",rel:"noopener",children:[h.jsx(ot,{children:h.jsx(eCe,{})}),h.jsx("span",{className:"text-[0.8rem] font-normal",children:"Documentation"})]})})}),h.jsx(VE,{children:h.jsx(y0,{tooltip:"Github",asChild:!0,children:h.jsxs("a",{className:"group/icon text-[#939393]",href:"https://github.com/mastra-ai/mastra",target:"_blank",rel:"noopener",children:[h.jsx(ot,{children:h.jsx(Bbt,{})}),h.jsx("span",{className:"text-[0.8rem] font-normal",children:"Github"})]})})})]})})})}),h.jsx(noe,{})]})}var Swt=(e,t,n,r,s,i,o,a)=>{let l=document.documentElement,c=["light","dark"];function u(g){(Array.isArray(e)?e:[e]).forEach(b=>{let x=b==="class",S=x&&i?s.map(E=>i[E]||E):s;x?(l.classList.remove(...S),l.classList.add(i&&i[g]?i[g]:g)):l.setAttribute(b,g)}),d(g)}function d(g){a&&c.includes(g)&&(l.style.colorScheme=g)}function p(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)u(r);else try{let g=localStorage.getItem(t)||n,b=o&&g==="system"?p():g;u(b)}catch{}},Cwt=A.createContext(void 0),kwt={setTheme:e=>{},themes:[]},Ewt=()=>{var e;return(e=A.useContext(Cwt))!=null?e:kwt};A.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:i,value:o,themes:a,nonce:l,scriptProps:c})=>{let u=JSON.stringify([n,t,i,e,a,o,r,s]).slice(1,-1);return A.createElement("script",{...c,suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(${Swt.toString()})(${u})`}})});const Dwt=({...e})=>{const{theme:t="system"}=Ewt();return h.jsx(NDe,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-surface3 group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})},Awt=A.createContext({theme:"system",setTheme:()=>null});function Twt({children:e,defaultTheme:t="system"}){const[n,r]=A.useState(t);return A.useEffect(()=>{const s=window.document.documentElement;if(s.classList.remove("light","dark"),n==="system"){const i=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";s.classList.add(i);return}s.classList.add(n)},[n]),h.jsx(Awt.Provider,{value:{theme:n,setTheme:r},children:e})}const pQ=({children:e})=>h.jsx("div",{className:"bg-surface1 font-sans h-screen",children:h.jsx(Twt,{defaultTheme:"dark",attribute:"class",children:h.jsxs(eoe,{children:[h.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[auto_1fr] h-full",children:[h.jsx(wwt,{}),h.jsx("div",{className:"bg-surface2 my-3 mr-3 rounded-lg border-sm border-border1 overflow-y-auto",children:e})]}),h.jsx(Dwt,{position:"bottom-right"})]})})}),Dn=new LO({baseUrl:"",headers:{"x-mastra-dev-playground":"true"}}),cbe=()=>{const[e,t]=A.useState({}),[n,r]=A.useState(!0);return A.useEffect(()=>{(async()=>{r(!0);try{const i=await Dn.getAgents();t(i)}catch(i){t({}),console.error("Error fetching agents",i),Nr.error("Error fetching agents")}finally{r(!1)}})()},[]),{agents:e,isLoading:n}},K1=e=>{const[t,n]=A.useState(null),[r,s]=A.useState(!0);return A.useEffect(()=>{(async()=>{s(!0);try{if(!e){n(null),s(!1);return}const o=await Dn.getAgent(e).details();n(o)}catch(o){n(null),console.error("Error fetching agent",o),Nr.error("Error fetching agent")}finally{s(!1)}})()},[e]),{agent:t,isLoading:r}};function _wt({agentName:e,agentId:t}){return h.jsxs(us,{children:[h.jsxs(Yd,{children:[h.jsx(Vr,{as:Zt,to:"/agents",children:"Agents"}),h.jsx(Vr,{as:Zt,to:`/agents/${t}`,isCurrent:!0,children:e})]}),h.jsxs(kB,{children:[h.jsx(hn,{as:Zt,to:`/agents/${t}/chat`,children:"Chat"}),h.jsx(Lbt,{}),h.jsx(hn,{as:Zt,to:`/agents/${t}/traces`,children:"Traces"}),h.jsx(hn,{as:Zt,to:`/agents/${t}/evals`,children:"Evals"})]})]})}const Nwt=({children:e})=>{const{agentId:t}=Cs(),{agent:n,isLoading:r}=K1(t);return h.jsxs(yl,{children:[r?h.jsx(us,{children:h.jsx(Xu,{children:h.jsx($n,{className:"h-6 w-[200px]"})})}):h.jsx(_wt,{agentName:n==null?void 0:n.name,agentId:t}),e]})};var X1=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Bg=typeof window>"u"||"Deno"in globalThis;function Ji(){}function Pwt(e,t){return typeof e=="function"?e(t):e}function nF(e){return typeof e=="number"&&e>=0&&e!==1/0}function ube(e,t){return Math.max(e+(t||0)-Date.now(),0)}function op(e,t){return typeof e=="function"?e(t):e}function ql(e,t){return typeof e=="function"?e(t):e}function mQ(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==OB(o,t.options))return!1}else if(!AS(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||i&&!i(t))}function gQ(e,t){const{exact:n,status:r,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if($g(t.options.mutationKey)!==$g(i))return!1}else if(!AS(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function OB(e,t){return((t==null?void 0:t.queryKeyHashFn)||$g)(e)}function $g(e){return JSON.stringify(e,(t,n)=>rF(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function AS(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>AS(e[n],t[n])):!1}function dbe(e,t){if(e===t)return e;const n=yQ(e)&&yQ(t);if(n||rF(e)&&rF(t)){const r=n?e:Object.keys(e),s=r.length,i=n?t:Object.keys(t),o=i.length,a=n?[]:{},l=new Set(r);let c=0;for(let u=0;u<o;u++){const d=n?u:i[u];(!n&&l.has(d)||n)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,c++):(a[d]=dbe(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&c++)}return s===o&&c===s?e:a}return t}function oA(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function yQ(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function rF(e){if(!bQ(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!bQ(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function bQ(e){return Object.prototype.toString.call(e)==="[object Object]"}function Mwt(e){return new Promise(t=>{setTimeout(t,e)})}function sF(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?dbe(e,t):t}function jwt(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Fwt(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var RB=Symbol();function hbe(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===RB?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function fbe(e,t){return typeof e=="function"?e(...t):!!e}var Gm,Rf,lb,$ee,Iwt=($ee=class extends X1{constructor(){super();Ot(this,Gm);Ot(this,Rf);Ot(this,lb);pt(this,lb,t=>{if(!Bg&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){me(this,Rf)||this.setEventListener(me(this,lb))}onUnsubscribe(){var t;this.hasListeners()||((t=me(this,Rf))==null||t.call(this),pt(this,Rf,void 0))}setEventListener(t){var n;pt(this,lb,t),(n=me(this,Rf))==null||n.call(this),pt(this,Rf,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){me(this,Gm)!==t&&(pt(this,Gm,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof me(this,Gm)=="boolean"?me(this,Gm):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Gm=new WeakMap,Rf=new WeakMap,lb=new WeakMap,$ee),LB=new Iwt,cb,Lf,ub,zee,Owt=(zee=class extends X1{constructor(){super();Ot(this,cb,!0);Ot(this,Lf);Ot(this,ub);pt(this,ub,t=>{if(!Bg&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){me(this,Lf)||this.setEventListener(me(this,ub))}onUnsubscribe(){var t;this.hasListeners()||((t=me(this,Lf))==null||t.call(this),pt(this,Lf,void 0))}setEventListener(t){var n;pt(this,ub,t),(n=me(this,Lf))==null||n.call(this),pt(this,Lf,t(this.setOnline.bind(this)))}setOnline(t){me(this,cb)!==t&&(pt(this,cb,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return me(this,cb)}},cb=new WeakMap,Lf=new WeakMap,ub=new WeakMap,zee),aA=new Owt;function iF(){let e,t;const n=new Promise((s,i)=>{e=s,t=i});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}function Rwt(e){return Math.min(1e3*2**e,3e4)}function pbe(e){return(e??"online")==="online"?aA.isOnline():!0}var mbe=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function f7(e){return e instanceof mbe}function gbe(e){let t=!1,n=0,r=!1,s;const i=iF(),o=x=>{var S;r||(p(new mbe(x)),(S=e.abort)==null||S.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>LB.isFocused()&&(e.networkMode==="always"||aA.isOnline())&&e.canRun(),u=()=>pbe(e.networkMode)&&e.canRun(),d=x=>{var S;r||(r=!0,(S=e.onSuccess)==null||S.call(e,x),s==null||s(),i.resolve(x))},p=x=>{var S;r||(r=!0,(S=e.onError)==null||S.call(e,x),s==null||s(),i.reject(x))},g=()=>new Promise(x=>{var S;s=E=>{(r||c())&&x(E)},(S=e.onPause)==null||S.call(e)}).then(()=>{var x;s=void 0,r||(x=e.onContinue)==null||x.call(e)}),b=()=>{if(r)return;let x;const S=n===0?e.initialPromise:void 0;try{x=S??e.fn()}catch(E){x=Promise.reject(E)}Promise.resolve(x).then(d).catch(E=>{var j;if(r)return;const k=e.retry??(Bg?0:3),T=e.retryDelay??Rwt,P=typeof T=="function"?T(n,E):T,M=k===!0||typeof k=="number"&&n<k||typeof k=="function"&&k(n,E);if(t||!M){p(E);return}n++,(j=e.onFail)==null||j.call(e,n,E),Mwt(P).then(()=>c()?void 0:g()).then(()=>{t?p(E):b()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?b():g().then(b),i)}}var Lwt=e=>setTimeout(e,0);function Bwt(){let e=[],t=0,n=a=>{a()},r=a=>{a()},s=Lwt;const i=a=>{t?e.push(a):s(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&s(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{s=a}}}var Fs=Bwt(),Ym,Hee,ybe=(Hee=class{constructor(){Ot(this,Ym)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),nF(this.gcTime)&&pt(this,Ym,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Bg?1/0:5*60*1e3))}clearGcTimeout(){me(this,Ym)&&(clearTimeout(me(this,Ym)),pt(this,Ym,void 0))}},Ym=new WeakMap,Hee),db,Km,Ka,Xm,ki,jS,Jm,Hl,Ed,Vee,$wt=(Vee=class extends ybe{constructor(t){super();Ot(this,Hl);Ot(this,db);Ot(this,Km);Ot(this,Ka);Ot(this,Xm);Ot(this,ki);Ot(this,jS);Ot(this,Jm);pt(this,Jm,!1),pt(this,jS,t.defaultOptions),this.setOptions(t.options),this.observers=[],pt(this,Xm,t.client),pt(this,Ka,me(this,Xm).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,pt(this,db,zwt(this.options)),this.state=t.state??me(this,db),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=me(this,ki))==null?void 0:t.promise}setOptions(t){this.options={...me(this,jS),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&me(this,Ka).remove(this)}setData(t,n){const r=sF(this.state.data,t,this.options);return ln(this,Hl,Ed).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){ln(this,Hl,Ed).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=me(this,ki))==null?void 0:r.promise;return(s=me(this,ki))==null||s.cancel(t),n?n.then(Ji).catch(Ji):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(me(this,db))}isActive(){return this.observers.some(t=>ql(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===RB||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>op(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!ube(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=me(this,ki))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=me(this,ki))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),me(this,Ka).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(me(this,ki)&&(me(this,Jm)?me(this,ki).cancel({revert:!0}):me(this,ki).cancelRetry()),this.scheduleGc()),me(this,Ka).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ln(this,Hl,Ed).call(this,{type:"invalidate"})}fetch(t,n){var c,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(me(this,ki))return me(this,ki).continueRetry(),me(this,ki).promise}if(t&&this.setOptions(t),!this.options.queryFn){const p=this.observers.find(g=>g.options.queryFn);p&&this.setOptions(p.options)}const r=new AbortController,s=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(pt(this,Jm,!0),r.signal)})},i=()=>{const p=hbe(this.options,n),b=(()=>{const x={client:me(this,Xm),queryKey:this.queryKey,meta:this.meta};return s(x),x})();return pt(this,Jm,!1),this.options.persister?this.options.persister(p,b,this):p(b)},a=(()=>{const p={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:me(this,Xm),state:this.state,fetchFn:i};return s(p),p})();(c=this.options.behavior)==null||c.onFetch(a,this),pt(this,Km,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&ln(this,Hl,Ed).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const l=p=>{var g,b,x,S;f7(p)&&p.silent||ln(this,Hl,Ed).call(this,{type:"error",error:p}),f7(p)||((b=(g=me(this,Ka).config).onError)==null||b.call(g,p,this),(S=(x=me(this,Ka).config).onSettled)==null||S.call(x,this.state.data,p,this)),this.scheduleGc()};return pt(this,ki,gbe({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:p=>{var g,b,x,S;if(p===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(p)}catch(E){l(E);return}(b=(g=me(this,Ka).config).onSuccess)==null||b.call(g,p,this),(S=(x=me(this,Ka).config).onSettled)==null||S.call(x,p,this.state.error,this),this.scheduleGc()},onError:l,onFail:(p,g)=>{ln(this,Hl,Ed).call(this,{type:"failed",failureCount:p,error:g})},onPause:()=>{ln(this,Hl,Ed).call(this,{type:"pause"})},onContinue:()=>{ln(this,Hl,Ed).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),me(this,ki).start()}},db=new WeakMap,Km=new WeakMap,Ka=new WeakMap,Xm=new WeakMap,ki=new WeakMap,jS=new WeakMap,Jm=new WeakMap,Hl=new WeakSet,Ed=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...bbe(r.data,this.options),fetchMeta:t.meta??null};case"success":return pt(this,Km,void 0),{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return f7(s)&&s.revert&&me(this,Km)?{...me(this,Km),fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Fs.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),me(this,Ka).notify({query:this,type:"updated",action:t})})},Vee);function bbe(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:pbe(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function zwt(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Yc,Uee,Hwt=(Uee=class extends X1{constructor(t={}){super();Ot(this,Yc);this.config=t,pt(this,Yc,new Map)}build(t,n,r){const s=n.queryKey,i=n.queryHash??OB(s,n);let o=this.get(i);return o||(o=new $wt({client:t,queryKey:s,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){me(this,Yc).has(t.queryHash)||(me(this,Yc).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=me(this,Yc).get(t.queryHash);n&&(t.destroy(),n===t&&me(this,Yc).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Fs.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return me(this,Yc).get(t)}getAll(){return[...me(this,Yc).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>mQ(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>mQ(t,r)):n}notify(t){Fs.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Fs.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Fs.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Yc=new WeakMap,Uee),Kc,Wi,Zm,Xc,Nf,Wee,Vwt=(Wee=class extends ybe{constructor(t){super();Ot(this,Xc);Ot(this,Kc);Ot(this,Wi);Ot(this,Zm);this.mutationId=t.mutationId,pt(this,Wi,t.mutationCache),pt(this,Kc,[]),this.state=t.state||xbe(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){me(this,Kc).includes(t)||(me(this,Kc).push(t),this.clearGcTimeout(),me(this,Wi).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){pt(this,Kc,me(this,Kc).filter(n=>n!==t)),this.scheduleGc(),me(this,Wi).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){me(this,Kc).length||(this.state.status==="pending"?this.scheduleGc():me(this,Wi).remove(this))}continue(){var t;return((t=me(this,Zm))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,a,l,c,u,d,p,g,b,x,S,E,k,T,P,M,j,F,I;const n=()=>{ln(this,Xc,Nf).call(this,{type:"continue"})};pt(this,Zm,gbe({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(B,L)=>{ln(this,Xc,Nf).call(this,{type:"failed",failureCount:B,error:L})},onPause:()=>{ln(this,Xc,Nf).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>me(this,Wi).canRun(this)}));const r=this.state.status==="pending",s=!me(this,Zm).canStart();try{if(r)n();else{ln(this,Xc,Nf).call(this,{type:"pending",variables:t,isPaused:s}),await((o=(i=me(this,Wi).config).onMutate)==null?void 0:o.call(i,t,this));const L=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));L!==this.state.context&&ln(this,Xc,Nf).call(this,{type:"pending",context:L,variables:t,isPaused:s})}const B=await me(this,Zm).start();return await((u=(c=me(this,Wi).config).onSuccess)==null?void 0:u.call(c,B,t,this.state.context,this)),await((p=(d=this.options).onSuccess)==null?void 0:p.call(d,B,t,this.state.context)),await((b=(g=me(this,Wi).config).onSettled)==null?void 0:b.call(g,B,null,this.state.variables,this.state.context,this)),await((S=(x=this.options).onSettled)==null?void 0:S.call(x,B,null,t,this.state.context)),ln(this,Xc,Nf).call(this,{type:"success",data:B}),B}catch(B){try{throw await((k=(E=me(this,Wi).config).onError)==null?void 0:k.call(E,B,t,this.state.context,this)),await((P=(T=this.options).onError)==null?void 0:P.call(T,B,t,this.state.context)),await((j=(M=me(this,Wi).config).onSettled)==null?void 0:j.call(M,void 0,B,this.state.variables,this.state.context,this)),await((I=(F=this.options).onSettled)==null?void 0:I.call(F,void 0,B,t,this.state.context)),B}finally{ln(this,Xc,Nf).call(this,{type:"error",error:B})}}finally{me(this,Wi).runNext(this)}}},Kc=new WeakMap,Wi=new WeakMap,Zm=new WeakMap,Xc=new WeakSet,Nf=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Fs.batch(()=>{me(this,Kc).forEach(r=>{r.onMutationUpdate(t)}),me(this,Wi).notify({mutation:this,type:"updated",action:t})})},Wee);function xbe(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ld,Vl,FS,qee,Uwt=(qee=class extends X1{constructor(t={}){super();Ot(this,Ld);Ot(this,Vl);Ot(this,FS);this.config=t,pt(this,Ld,new Set),pt(this,Vl,new Map),pt(this,FS,0)}build(t,n,r){const s=new Vwt({mutationCache:this,mutationId:++Qk(this,FS)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){me(this,Ld).add(t);const n=bE(t);if(typeof n=="string"){const r=me(this,Vl).get(n);r?r.push(t):me(this,Vl).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(me(this,Ld).delete(t)){const n=bE(t);if(typeof n=="string"){const r=me(this,Vl).get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&me(this,Vl).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=bE(t);if(typeof n=="string"){const r=me(this,Vl).get(n),s=r==null?void 0:r.find(i=>i.state.status==="pending");return!s||s===t}else return!0}runNext(t){var r;const n=bE(t);if(typeof n=="string"){const s=(r=me(this,Vl).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Fs.batch(()=>{me(this,Ld).forEach(t=>{this.notify({type:"removed",mutation:t})}),me(this,Ld).clear(),me(this,Vl).clear()})}getAll(){return Array.from(me(this,Ld))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>gQ(n,r))}findAll(t={}){return this.getAll().filter(n=>gQ(t,n))}notify(t){Fs.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Fs.batch(()=>Promise.all(t.map(n=>n.continue().catch(Ji))))}},Ld=new WeakMap,Vl=new WeakMap,FS=new WeakMap,qee);function bE(e){var t;return(t=e.options.scope)==null?void 0:t.id}function xQ(e){return{onFetch:(t,n)=>{var u,d,p,g,b;const r=t.options,s=(p=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:p.direction,i=((g=t.state.data)==null?void 0:g.pages)||[],o=((b=t.state.data)==null?void 0:b.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let x=!1;const S=T=>{Object.defineProperty(T,"signal",{enumerable:!0,get:()=>(t.signal.aborted?x=!0:t.signal.addEventListener("abort",()=>{x=!0}),t.signal)})},E=hbe(t.options,t.fetchOptions),k=async(T,P,M)=>{if(x)return Promise.reject();if(P==null&&T.pages.length)return Promise.resolve(T);const F=(()=>{const W={client:t.client,queryKey:t.queryKey,pageParam:P,direction:M?"backward":"forward",meta:t.options.meta};return S(W),W})(),I=await E(F),{maxPages:B}=t.options,L=M?Fwt:jwt;return{pages:L(T.pages,I,B),pageParams:L(T.pageParams,P,B)}};if(s&&i.length){const T=s==="backward",P=T?Wwt:vQ,M={pages:i,pageParams:o},j=P(r,M);a=await k(M,j,T)}else{const T=e??i.length;do{const P=l===0?o[0]??r.initialPageParam:vQ(r,a);if(l>0&&P==null)break;a=await k(a,P),l++}while(l<T)}return a};t.options.persister?t.fetchFn=()=>{var x,S;return(S=(x=t.options).persister)==null?void 0:S.call(x,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function vQ(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Wwt(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Kr,Bf,$f,hb,fb,zf,pb,mb,Gee,qwt=(Gee=class{constructor(e={}){Ot(this,Kr);Ot(this,Bf);Ot(this,$f);Ot(this,hb);Ot(this,fb);Ot(this,zf);Ot(this,pb);Ot(this,mb);pt(this,Kr,e.queryCache||new Hwt),pt(this,Bf,e.mutationCache||new Uwt),pt(this,$f,e.defaultOptions||{}),pt(this,hb,new Map),pt(this,fb,new Map),pt(this,zf,0)}mount(){Qk(this,zf)._++,me(this,zf)===1&&(pt(this,pb,LB.subscribe(async e=>{e&&(await this.resumePausedMutations(),me(this,Kr).onFocus())})),pt(this,mb,aA.subscribe(async e=>{e&&(await this.resumePausedMutations(),me(this,Kr).onOnline())})))}unmount(){var e,t;Qk(this,zf)._--,me(this,zf)===0&&((e=me(this,pb))==null||e.call(this),pt(this,pb,void 0),(t=me(this,mb))==null||t.call(this),pt(this,mb,void 0))}isFetching(e){return me(this,Kr).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return me(this,Bf).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=me(this,Kr).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=me(this,Kr).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(op(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return me(this,Kr).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=me(this,Kr).get(r.queryHash),i=s==null?void 0:s.state.data,o=Pwt(t,i);if(o!==void 0)return me(this,Kr).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Fs.batch(()=>me(this,Kr).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=me(this,Kr).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=me(this,Kr);Fs.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=me(this,Kr);return Fs.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Fs.batch(()=>me(this,Kr).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(Ji).catch(Ji)}invalidateQueries(e,t={}){return Fs.batch(()=>(me(this,Kr).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Fs.batch(()=>me(this,Kr).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(Ji)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Ji)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=me(this,Kr).build(this,t);return n.isStaleByTime(op(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ji).catch(Ji)}fetchInfiniteQuery(e){return e.behavior=xQ(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ji).catch(Ji)}ensureInfiniteQueryData(e){return e.behavior=xQ(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return aA.isOnline()?me(this,Bf).resumePausedMutations():Promise.resolve()}getQueryCache(){return me(this,Kr)}getMutationCache(){return me(this,Bf)}getDefaultOptions(){return me(this,$f)}setDefaultOptions(e){pt(this,$f,e)}setQueryDefaults(e,t){me(this,hb).set($g(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...me(this,hb).values()],n={};return t.forEach(r=>{AS(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){me(this,fb).set($g(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...me(this,fb).values()],n={};return t.forEach(r=>{AS(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...me(this,$f).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=OB(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===RB&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...me(this,$f).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){me(this,Kr).clear(),me(this,Bf).clear()}},Kr=new WeakMap,Bf=new WeakMap,$f=new WeakMap,hb=new WeakMap,fb=new WeakMap,zf=new WeakMap,pb=new WeakMap,mb=new WeakMap,Gee),xo,kn,IS,qi,Qm,gb,Hf,Vf,OS,yb,bb,eg,tg,Uf,xb,er,$v,oF,aF,lF,cF,uF,dF,hF,vbe,Yee,Gwt=(Yee=class extends X1{constructor(t,n){super();Ot(this,er);Ot(this,xo);Ot(this,kn);Ot(this,IS);Ot(this,qi);Ot(this,Qm);Ot(this,gb);Ot(this,Hf);Ot(this,Vf);Ot(this,OS);Ot(this,yb);Ot(this,bb);Ot(this,eg);Ot(this,tg);Ot(this,Uf);Ot(this,xb,new Set);this.options=n,pt(this,xo,t),pt(this,Vf,null),pt(this,Hf,iF()),this.options.experimental_prefetchInRender||me(this,Hf).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(me(this,kn).addObserver(this),wQ(me(this,kn),this.options)?ln(this,er,$v).call(this):this.updateResult(),ln(this,er,cF).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return fF(me(this,kn),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return fF(me(this,kn),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ln(this,er,uF).call(this),ln(this,er,dF).call(this),me(this,kn).removeObserver(this)}setOptions(t){const n=this.options,r=me(this,kn);if(this.options=me(this,xo).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ql(this.options.enabled,me(this,kn))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ln(this,er,hF).call(this),me(this,kn).setOptions(this.options),n._defaulted&&!oA(this.options,n)&&me(this,xo).getQueryCache().notify({type:"observerOptionsUpdated",query:me(this,kn),observer:this});const s=this.hasListeners();s&&SQ(me(this,kn),r,this.options,n)&&ln(this,er,$v).call(this),this.updateResult(),s&&(me(this,kn)!==r||ql(this.options.enabled,me(this,kn))!==ql(n.enabled,me(this,kn))||op(this.options.staleTime,me(this,kn))!==op(n.staleTime,me(this,kn)))&&ln(this,er,oF).call(this);const i=ln(this,er,aF).call(this);s&&(me(this,kn)!==r||ql(this.options.enabled,me(this,kn))!==ql(n.enabled,me(this,kn))||i!==me(this,Uf))&&ln(this,er,lF).call(this,i)}getOptimisticResult(t){const n=me(this,xo).getQueryCache().build(me(this,xo),t),r=this.createResult(n,t);return Kwt(this,r)&&(pt(this,qi,r),pt(this,gb,this.options),pt(this,Qm,me(this,kn).state)),r}getCurrentResult(){return me(this,qi)}trackResult(t,n){return new Proxy(t,{get:(r,s)=>(this.trackProp(s),n==null||n(s),Reflect.get(r,s))})}trackProp(t){me(this,xb).add(t)}getCurrentQuery(){return me(this,kn)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=me(this,xo).defaultQueryOptions(t),r=me(this,xo).getQueryCache().build(me(this,xo),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return ln(this,er,$v).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),me(this,qi)))}createResult(t,n){var B;const r=me(this,kn),s=this.options,i=me(this,qi),o=me(this,Qm),a=me(this,gb),c=t!==r?t.state:me(this,IS),{state:u}=t;let d={...u},p=!1,g;if(n._optimisticResults){const L=this.hasListeners(),W=!L&&wQ(t,n),$=L&&SQ(t,r,n,s);(W||$)&&(d={...d,...bbe(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:b,errorUpdatedAt:x,status:S}=d;g=d.data;let E=!1;if(n.placeholderData!==void 0&&g===void 0&&S==="pending"){let L;i!=null&&i.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(L=i.data,E=!0):L=typeof n.placeholderData=="function"?n.placeholderData((B=me(this,bb))==null?void 0:B.state.data,me(this,bb)):n.placeholderData,L!==void 0&&(S="success",g=sF(i==null?void 0:i.data,L,n),p=!0)}if(n.select&&g!==void 0&&!E)if(i&&g===(o==null?void 0:o.data)&&n.select===me(this,OS))g=me(this,yb);else try{pt(this,OS,n.select),g=n.select(g),g=sF(i==null?void 0:i.data,g,n),pt(this,yb,g),pt(this,Vf,null)}catch(L){pt(this,Vf,L)}me(this,Vf)&&(b=me(this,Vf),g=me(this,yb),x=Date.now(),S="error");const k=d.fetchStatus==="fetching",T=S==="pending",P=S==="error",M=T&&k,j=g!==void 0,I={status:S,fetchStatus:d.fetchStatus,isPending:T,isSuccess:S==="success",isError:P,isInitialLoading:M,isLoading:M,data:g,dataUpdatedAt:d.dataUpdatedAt,error:b,errorUpdatedAt:x,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:k,isRefetching:k&&!T,isLoadingError:P&&!j,isPaused:d.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:P&&j,isStale:BB(t,n),refetch:this.refetch,promise:me(this,Hf)};if(this.options.experimental_prefetchInRender){const L=J=>{I.status==="error"?J.reject(I.error):I.data!==void 0&&J.resolve(I.data)},W=()=>{const J=pt(this,Hf,I.promise=iF());L(J)},$=me(this,Hf);switch($.status){case"pending":t.queryHash===r.queryHash&&L($);break;case"fulfilled":(I.status==="error"||I.data!==$.value)&&W();break;case"rejected":(I.status!=="error"||I.error!==$.reason)&&W();break}}return I}updateResult(){const t=me(this,qi),n=this.createResult(me(this,kn),this.options);if(pt(this,Qm,me(this,kn).state),pt(this,gb,this.options),me(this,Qm).data!==void 0&&pt(this,bb,me(this,kn)),oA(n,t))return;pt(this,qi,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,i=typeof s=="function"?s():s;if(i==="all"||!i&&!me(this,xb).size)return!0;const o=new Set(i??me(this,xb));return this.options.throwOnError&&o.add("error"),Object.keys(me(this,qi)).some(a=>{const l=a;return me(this,qi)[l]!==t[l]&&o.has(l)})};ln(this,er,vbe).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ln(this,er,cF).call(this)}},xo=new WeakMap,kn=new WeakMap,IS=new WeakMap,qi=new WeakMap,Qm=new WeakMap,gb=new WeakMap,Hf=new WeakMap,Vf=new WeakMap,OS=new WeakMap,yb=new WeakMap,bb=new WeakMap,eg=new WeakMap,tg=new WeakMap,Uf=new WeakMap,xb=new WeakMap,er=new WeakSet,$v=function(t){ln(this,er,hF).call(this);let n=me(this,kn).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Ji)),n},oF=function(){ln(this,er,uF).call(this);const t=op(this.options.staleTime,me(this,kn));if(Bg||me(this,qi).isStale||!nF(t))return;const r=ube(me(this,qi).dataUpdatedAt,t)+1;pt(this,eg,setTimeout(()=>{me(this,qi).isStale||this.updateResult()},r))},aF=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(me(this,kn)):this.options.refetchInterval)??!1},lF=function(t){ln(this,er,dF).call(this),pt(this,Uf,t),!(Bg||ql(this.options.enabled,me(this,kn))===!1||!nF(me(this,Uf))||me(this,Uf)===0)&&pt(this,tg,setInterval(()=>{(this.options.refetchIntervalInBackground||LB.isFocused())&&ln(this,er,$v).call(this)},me(this,Uf)))},cF=function(){ln(this,er,oF).call(this),ln(this,er,lF).call(this,ln(this,er,aF).call(this))},uF=function(){me(this,eg)&&(clearTimeout(me(this,eg)),pt(this,eg,void 0))},dF=function(){me(this,tg)&&(clearInterval(me(this,tg)),pt(this,tg,void 0))},hF=function(){const t=me(this,xo).getQueryCache().build(me(this,xo),this.options);if(t===me(this,kn))return;const n=me(this,kn);pt(this,kn,t),pt(this,IS,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},vbe=function(t){Fs.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(me(this,qi))}),me(this,xo).getQueryCache().notify({query:me(this,kn),type:"observerResultsUpdated"})})},Yee);function Ywt(e,t){return ql(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function wQ(e,t){return Ywt(e,t)||e.state.data!==void 0&&fF(e,t,t.refetchOnMount)}function fF(e,t,n){if(ql(t.enabled,e)!==!1&&op(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&BB(e,t)}return!1}function SQ(e,t,n,r){return(e!==t||ql(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&BB(e,n)}function BB(e,t){return ql(t.enabled,e)!==!1&&e.isStaleByTime(op(t.staleTime,e))}function Kwt(e,t){return!oA(e.getCurrentResult(),t)}var Wf,qf,vo,Bd,Kd,yD,pF,Kee,Xwt=(Kee=class extends X1{constructor(n,r){super();Ot(this,Kd);Ot(this,Wf);Ot(this,qf);Ot(this,vo);Ot(this,Bd);pt(this,Wf,n),this.setOptions(r),this.bindMethods(),ln(this,Kd,yD).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const r=this.options;this.options=me(this,Wf).defaultMutationOptions(n),oA(this.options,r)||me(this,Wf).getMutationCache().notify({type:"observerOptionsUpdated",mutation:me(this,vo),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&$g(r.mutationKey)!==$g(this.options.mutationKey)?this.reset():((s=me(this,vo))==null?void 0:s.state.status)==="pending"&&me(this,vo).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=me(this,vo))==null||n.removeObserver(this)}onMutationUpdate(n){ln(this,Kd,yD).call(this),ln(this,Kd,pF).call(this,n)}getCurrentResult(){return me(this,qf)}reset(){var n;(n=me(this,vo))==null||n.removeObserver(this),pt(this,vo,void 0),ln(this,Kd,yD).call(this),ln(this,Kd,pF).call(this)}mutate(n,r){var s;return pt(this,Bd,r),(s=me(this,vo))==null||s.removeObserver(this),pt(this,vo,me(this,Wf).getMutationCache().build(me(this,Wf),this.options)),me(this,vo).addObserver(this),me(this,vo).execute(n)}},Wf=new WeakMap,qf=new WeakMap,vo=new WeakMap,Bd=new WeakMap,Kd=new WeakSet,yD=function(){var r;const n=((r=me(this,vo))==null?void 0:r.state)??xbe();pt(this,qf,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},pF=function(n){Fs.batch(()=>{var r,s,i,o,a,l,c,u;if(me(this,Bd)&&this.hasListeners()){const d=me(this,qf).variables,p=me(this,qf).context;(n==null?void 0:n.type)==="success"?((s=(r=me(this,Bd)).onSuccess)==null||s.call(r,n.data,d,p),(o=(i=me(this,Bd)).onSettled)==null||o.call(i,n.data,null,d,p)):(n==null?void 0:n.type)==="error"&&((l=(a=me(this,Bd)).onError)==null||l.call(a,n.error,d,p),(u=(c=me(this,Bd)).onSettled)==null||u.call(c,void 0,n.error,d,p))}this.listeners.forEach(d=>{d(me(this,qf))})})},Kee),wbe=A.createContext(void 0),Sbe=e=>{const t=A.useContext(wbe);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Jwt=({client:e,children:t})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),h.jsx(wbe.Provider,{value:e,children:t})),Cbe=A.createContext(!1),Zwt=()=>A.useContext(Cbe);Cbe.Provider;function Qwt(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var eSt=A.createContext(Qwt()),tSt=()=>A.useContext(eSt),nSt=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},rSt=e=>{A.useEffect(()=>{e.clearReset()},[e])},sSt=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||fbe(n,[e.error,r])),iSt=e=>{if(e.suspense){const t=r=>r==="static"?r:Math.max(r??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...r)=>t(n(...r)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},oSt=(e,t)=>e.isLoading&&e.isFetching&&!t,aSt=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,CQ=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function lSt(e,t,n){var d,p,g,b,x;const r=Zwt(),s=tSt(),i=Sbe(),o=i.defaultQueryOptions(e);(p=(d=i.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||p.call(d,o),o._optimisticResults=r?"isRestoring":"optimistic",iSt(o),nSt(o,s),rSt(s);const a=!i.getQueryCache().get(o.queryHash),[l]=A.useState(()=>new t(i,o)),c=l.getOptimisticResult(o),u=!r&&e.subscribed!==!1;if(A.useSyncExternalStore(A.useCallback(S=>{const E=u?l.subscribe(Fs.batchCalls(S)):Ji;return l.updateResult(),E},[l,u]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),A.useEffect(()=>{l.setOptions(o)},[o,l]),aSt(o,c))throw CQ(o,l,s);if(sSt({result:c,errorResetBoundary:s,throwOnError:o.throwOnError,query:i.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw c.error;if((b=(g=i.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||b.call(g,o,c),o.experimental_prefetchInRender&&!Bg&&oSt(c,r)){const S=a?CQ(o,l,s):(x=i.getQueryCache().get(o.queryHash))==null?void 0:x.promise;S==null||S.catch(Ji).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?c:l.trackResult(c)}function VC(e,t){return lSt(e,Gwt)}function el(e,t){const n=Sbe(),[r]=A.useState(()=>new Xwt(n,e));A.useEffect(()=>{r.setOptions(e)},[r,e]);const s=A.useSyncExternalStore(A.useCallback(o=>r.subscribe(Fs.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=A.useCallback((o,a)=>{r.mutate(o,a).catch(Ji)},[r]);if(s.error&&fbe(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:i,mutateAsync:s.mutate}}const cSt=()=>VC({queryKey:["workflows"],queryFn:()=>Promise.all([Dn.getLegacyWorkflows(),Dn.getWorkflows()])}),$B=(e,t=!0)=>VC({gcTime:0,staleTime:0,queryKey:["legacy-workflow",e],queryFn:()=>Dn.getLegacyWorkflow(e).details(),enabled:t}),$4=(e,t=!0)=>VC({gcTime:0,staleTime:0,queryKey:["workflow",e],queryFn:()=>Dn.getWorkflow(e).details(),enabled:t}),uSt=()=>{const e=el({mutationFn:async({workflowId:i,prevRunId:o})=>{try{const a=Dn.getLegacyWorkflow(i),{runId:l}=await a.createRun({runId:o});return{runId:l}}catch(a){throw console.error("Error creating workflow run:",a),a}}}),t=el({mutationFn:async({workflowId:i,prevRunId:o})=>{try{const a=Dn.getWorkflow(i),{runId:l}=await a.createRun({runId:o});return{runId:l}}catch(a){throw console.error("Error creating workflow run:",a),a}}}),n=el({mutationFn:async({workflowId:i,runId:o,input:a})=>{try{await Dn.getLegacyWorkflow(i).start({runId:o,triggerData:a||{}})}catch(l){throw console.error("Error starting workflow run:",l),l}}}),r=el({mutationFn:async({workflowId:i,runId:o,input:a,runtimeContext:l})=>{try{const c=new oh;Object.entries(l).forEach(([d,p])=>{c.set(d,p)}),await Dn.getWorkflow(i).start({runId:o,inputData:a||{},runtimeContext:c})}catch(c){throw console.error("Error starting workflow run:",c),c}}}),s=el({mutationFn:async({workflowId:i,runId:o,input:a,runtimeContext:l})=>{try{const c=new oh;return Object.entries(l).forEach(([p,g])=>{c.set(p,g)}),await Dn.getWorkflow(i).startAsync({runId:o,inputData:a||{},runtimeContext:c})}catch(c){throw console.error("Error starting workflow run:",c),c}}});return{startWorkflowRun:r,createWorkflowRun:t,startLegacyWorkflowRun:n,createLegacyWorkflowRun:e,startAsyncWorkflowRun:s}},dSt=()=>{const[e,t]=A.useState({}),[n,r]=A.useState(!1);return{streamWorkflow:el({mutationFn:async({workflowId:i,runId:o,inputData:a,runtimeContext:l})=>{r(!0),t({});const c=new oh;Object.entries(l).forEach(([g,b])=>{c.set(g,b)});const d=await Dn.getWorkflow(i).stream({runId:o,inputData:a,runtimeContext:c});if(!d)throw new Error("No stream returned");const p=d.getReader();try{let g="";for(;;){const{done:b,value:x}=await p.read();if(b)break;x.type==="start"&&t(S=>{var E;return{...S,runId:x.payload.runId,eventTimestamp:new Date,payload:{...(S==null?void 0:S.payload)||{},workflowState:{...((E=S==null?void 0:S.payload)==null?void 0:E.workflowState)||{},status:"running"}}}}),x.type==="step-start"&&(r(!0),t(S=>{var k,T,P;const E=((P=(T=(k=S==null?void 0:S.payload)==null?void 0:k.workflowState)==null?void 0:T.steps)==null?void 0:P[x.payload.id])||{};return{...S,payload:{...S.payload,currentStep:{id:x.payload.id,...x.payload},workflowState:{...S.payload.workflowState,steps:{...S.payload.workflowState.steps,[x.payload.id]:{...E||{},...x.payload}}}},eventTimestamp:new Date}})),x.type==="step-suspended"&&(t(S=>{var k,T,P,M;const E=((P=(T=(k=S==null?void 0:S.payload)==null?void 0:k.workflowState)==null?void 0:T.steps)==null?void 0:P[x.payload.id])||{};return{...S,payload:{...S.payload,currentStep:{id:x.payload.id,...((M=S==null?void 0:S.payload)==null?void 0:M.currentStep)||{},...x.payload},workflowState:{...S.payload.workflowState,status:"suspended",steps:{...S.payload.workflowState.steps,[x.payload.id]:{...E||{},...x.payload}}}},eventTimestamp:new Date}}),r(!1)),x.type==="step-waiting"&&t(S=>{var k,T,P,M;const E=((P=(T=(k=S==null?void 0:S.payload)==null?void 0:k.workflowState)==null?void 0:T.steps)==null?void 0:P[x.payload.id])||{};return{...S,payload:{...S.payload,currentStep:{id:x.payload.id,...((M=S==null?void 0:S.payload)==null?void 0:M.currentStep)||{},...x.payload},workflowState:{...S.payload.workflowState,status:"waiting",steps:{...S.payload.workflowState.steps,[x.payload.id]:{...E,...x.payload}}}},eventTimestamp:new Date}}),x.type==="step-result"&&(g=x.payload.status,t(S=>{var M,j,F,I;const E=((F=(j=(M=S==null?void 0:S.payload)==null?void 0:M.workflowState)==null?void 0:j.steps)==null?void 0:F[x.payload.id])||{},{output:k,...T}=x.payload,P=k&&typeof k=="object"&&!Array.isArray(k)&&Object.keys(k).length>0?Object.entries(k).reduce((B,[L,W])=>{var J;const $=W;return B[L]=((J=$.type)==null?void 0:J.toLowerCase())==="buffer"?{type:"Buffer",data:"[...buffered data]"}:$,B},{}):k||void 0;return{...S,payload:{...S.payload,currentStep:{id:x.payload.id,...((I=S==null?void 0:S.payload)==null?void 0:I.currentStep)||{},...T,output:P},workflowState:{...S.payload.workflowState,status:"running",steps:{...S.payload.workflowState.steps,[x.payload.id]:{...E,...T,output:P}}}},eventTimestamp:new Date}})),x.type==="step-finish"&&t(S=>({...S,payload:{...S.payload,currentStep:void 0},eventTimestamp:new Date})),x.type==="finish"&&t(S=>({...S,payload:{...S.payload,currentStep:void 0,workflowState:{...S.payload.workflowState,status:g}},eventTimestamp:new Date}))}}finally{r(!1),p.releaseLock()}}}),streamResult:e,isStreaming:n}},hSt=()=>{const e=el({mutationFn:async({workflowId:n,stepId:r,runId:s,context:i})=>{try{return await Dn.getLegacyWorkflow(n).resume({stepId:r,runId:s,context:i})}catch(o){throw console.error("Error resuming workflow:",o),o}}}),t=el({mutationFn:async({workflowId:n,step:r,runId:s,resumeData:i,runtimeContext:o})=>{try{const a=new oh;return Object.entries(o).forEach(([c,u])=>{a.set(c,u)}),await Dn.getWorkflow(n).resume({step:r,runId:s,resumeData:i,runtimeContext:a})}catch(a){throw console.error("Error resuming workflow:",a),a}}});return{resumeLegacyWorkflow:e,resumeWorkflow:t}},fSt=()=>el({mutationFn:async({workflowId:t,runId:n})=>{try{return await Dn.getWorkflow(t).cancelRun(n)}catch(r){throw console.error("Error canceling workflow run:",r),r}}}),pSt=e=>el({mutationFn:async({runId:n,event:r,data:s})=>{try{return await Dn.getWorkflow(e).sendRunEvent({runId:n,event:r,data:s})}catch(i){throw console.error("Error sending workflow run event:",i),i}}});function kbe({workflowName:e,workflowId:t,isLegacy:n,runId:r}){return h.jsx("div",{className:"shrink-0",children:h.jsxs(us,{children:[h.jsxs(Yd,{children:[h.jsx(Vr,{as:Zt,to:"/workflows",children:"Workflows"}),h.jsx(Vr,{as:Zt,to:`/workflows${n?"/legacy":""}/${t}`,isCurrent:!r,children:e}),r&&h.jsx(Vr,{as:Zt,to:`/workflows/${t}/graph/${r}`,isCurrent:!0,children:r})]}),h.jsxs(kB,{children:[h.jsx(hn,{as:Zt,to:`/workflows${n?"/legacy":""}/${t}/graph`,children:"Graph"}),h.jsx(hn,{as:Zt,to:`/workflows${n?"/legacy":""}/${t}/traces`,children:"Traces"})]}),h.jsx(txt,{children:h.jsxs(hn,{as:Zt,to:"/swagger-ui",children:[h.jsx(ot,{children:h.jsx(n0e,{})}),"API endpoints"]})})]})})}const mSt=({children:e})=>{const{workflowId:t}=Cs(),{data:n,isLoading:r}=$B(t);return h.jsx(PB,{children:h.jsxs("div",{className:"h-full overflow-hidden",children:[r?h.jsx(us,{children:h.jsx(Xu,{children:h.jsx($n,{className:"h-6 w-[200px]"})})}):h.jsx(kbe,{workflowName:(n==null?void 0:n.name)||"",workflowId:t,isLegacy:!0}),e]})})},gSt=()=>{const[e,t]=A.useState({}),[n,r]=A.useState(!0);return A.useEffect(()=>{(async()=>{r(!0);try{const i=await Dn.getTools();t(i)}catch(i){t({}),console.error("Error fetching tools",i),Nr.error("Error fetching tools")}finally{r(!1)}})()},[]),{tools:e,isLoading:n}},ySt=e=>{const[t,n]=A.useState(null),[r,s]=A.useState(!0);return A.useEffect(()=>{(async()=>{s(!0);try{if(!e){n(null),s(!1);return}const a=await Dn.getTool(e).details();n(a)}catch(o){n(null),console.error("Error fetching tool",o),Nr.error("Error fetching tool")}finally{s(!1)}})()},[e]),{tool:t,isLoading:r}};function bSt(){const{agents:e,isLoading:t}=cbe(),{tools:n,isLoading:r}=gSt(),s=!r&&Object.keys(n).length===0;return h.jsxs(yl,{children:[h.jsx(us,{children:h.jsx(Xu,{children:"Tools"})}),h.jsx(ho,{isCentered:s,children:h.jsx(wvt,{tools:n,agents:e,isLoading:t||r})})]})}function xSt(){const e=xl(),{agents:t,isLoading:n}=cbe();return h.jsxs(yl,{children:[h.jsx(us,{children:h.jsx(Xu,{children:"Agents"})}),h.jsx(ho,{isCentered:!n&&Object.keys(t||{}).length===0,children:h.jsx(Dxt,{agents:t,isLoading:n,onClickRow:r=>e(`/agents/${r}/chat/new`)})})]})}const z4=dfe,UC=A.forwardRef(({className:e,...t},n)=>h.jsx(BT,{ref:n,className:ic(e),...t}));UC.displayName=BT.displayName;const Ti=A.forwardRef(({className:e,...t},n)=>h.jsx($T,{ref:n,className:ic(e),...t}));Ti.displayName=$T.displayName;const _i=A.forwardRef(({className:e,...t},n)=>h.jsx(zT,{ref:n,className:$t("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));_i.displayName=zT.displayName;function vSt({agentId:e}){return h.jsxs("div",{className:"space-y-4 pt-2 px-4 pb-4 text-xs overflow-y-auto",children:[h.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[h.jsx("p",{className:"text-mastra-el-3",children:"GET"}),h.jsx("p",{className:"text-mastra-el-5",children:"/api/agents"})]}),h.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[h.jsx("p",{className:"text-mastra-el-3",children:"GET"}),h.jsxs("p",{className:"text-mastra-el-5",children:["/api/agents/",e]})]}),h.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[h.jsx("p",{className:"text-mastra-el-3",children:"GET"}),h.jsxs("p",{className:"text-mastra-el-5",children:["/api/agents/",e,"/evals/ci"]})]}),h.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[h.jsx("p",{className:"text-mastra-el-3",children:"GET"}),h.jsxs("p",{className:"text-mastra-el-5",children:["/api/agents/",e,"/evals/live"]})]}),h.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[h.jsx("p",{className:"text-mastra-el-3",children:"POST"}),h.jsxs("p",{className:"text-mastra-el-5",children:["/api/agents/",e,"/instructions"]})]}),h.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[h.jsx("p",{className:"text-mastra-el-3",children:"POST"}),h.jsxs("p",{className:"text-mastra-el-5",children:["/api/agents/",e,"/generate"]})]}),h.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[h.jsx("p",{className:"text-mastra-el-3",children:"POST"}),h.jsxs("p",{className:"text-mastra-el-5",children:["/api/agents/",e,"/stream"]})]}),h.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[h.jsx("p",{className:"text-mastra-el-3",children:"POST"}),h.jsxs("p",{className:"text-mastra-el-5",children:["/api/agents/",e,"/text-object"]})]}),h.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[h.jsx("p",{className:"text-mastra-el-3",children:"POST"}),h.jsxs("p",{className:"text-mastra-el-5",children:["/api/agents/",e,"/stream-object"]})]})]})}const wSt={10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal",100:"silent"},Ebe=e=>{const[t,n]=A.useState([]),[r,s]=A.useState(!0),{transports:i,isLoading:o}=SSt(),a=i[0],l=async c=>{const u=c??e;if(!u){s(!1);return}s(!0);try{const d=await Dn.getLogForRun({transportId:a,runId:u});n(d.logs.map(p=>({level:typeof p.level=="number"?wSt[p.level]:p.level,time:p.time,pid:p.pid,hostname:p.hostname,name:p.name,runId:p.runId,msg:p.msg})))}catch(d){n([]),console.error("Error fetching logs",d),Nr.error("Error fetching logs")}finally{s(!1)}};return A.useEffect(()=>{o||!a||l(e)},[e,a]),{logs:t,isLoading:r,refetchLogs:l}},SSt=()=>{const[e,t]=A.useState([]),[n,r]=A.useState(!0),s=async()=>{try{const i=await Dn.getLogTransports();t(i.transports)}catch(i){console.error("Error fetching logs",i),Nr.error("Error fetching logs")}finally{r(!1)}};return A.useEffect(()=>{s()},[]),{transports:e,isLoading:n}};function CSt({agentId:e}){const{logs:t,isLoading:n,refetchLogs:r}=Ebe(e);return h.jsxs("div",{className:"px-4 pb-4 text-xs overflow-y-auto",children:[h.jsx("div",{className:"flex justify-end sticky top-0 py-2",children:h.jsx(gu,{variant:"outline",onClick:()=>r(),children:n?h.jsx(ww,{className:"w-4 h-4 animate-spin"}):h.jsx(ww,{className:"w-4 h-4"})})}),h.jsx("div",{className:"space-y-4",children:t.length===0?h.jsxs("p",{className:"text-gray-300/60",children:["No log drains. By default, logs are sent to the console. To configure log drains see"," ",h.jsx("a",{href:"https://mastra.ai/reference/observability/create-logger#upstash-logger-remote-log-drain",target:"_blank",rel:"noopener",className:" hover:text-gray-100 underline",children:"docs."})]}):t.map((s,i)=>h.jsxs("div",{className:"space-y-2",children:[h.jsxs("div",{className:"flex gap-2 items-center",children:[h.jsxs("p",{className:"text-mastra-el-5",children:["[",lo(new Date(s.time),"yyyy-MM-dd HH:mm:ss"),"]"]}),h.jsxs("p",{className:"text-mastra-el-4",children:["[",s.level,"]"]})]}),h.jsx("p",{className:"text-mastra-el-5 whitespace-pre-wrap",children:h.jsx("code",{children:s.msg})})]},i))})]})}function J1({text:e,copyMessage:t="Copied to clipboard!"}){const[n,r]=A.useState(!1),s=A.useRef(null),i=A.useCallback(()=>{navigator.clipboard.writeText(e).then(()=>{Nr.success(t),r(!0),s.current&&(clearTimeout(s.current),s.current=null),s.current=setTimeout(()=>{r(!1)},2e3)}).catch(()=>{Nr.error("Failed to copy to clipboard.")})},[e,t]);return{isCopied:n,handleCopy:i}}const kSt={openai:h.jsx("svg",{className:"h-3 w-3",viewBox:"0 0 320 320",xmlns:"http://www.w3.org/2000/svg",fill:"white",children:h.jsx("path",{d:"m297.06 130.97c7.26-21.79 4.76-45.66-6.85-65.48-17.46-30.4-52.56-46.04-86.84-38.68-15.25-17.18-37.16-26.95-60.13-26.81-35.04-.08-66.13 22.48-76.91 55.82-22.51 4.61-41.94 18.7-53.31 38.67-17.59 30.32-13.58 68.54 9.92 94.54-7.26 21.79-4.76 45.66 6.85 65.48 17.46 30.4 52.56 46.04 86.84 38.68 15.24 17.18 37.16 26.95 60.13 26.8 35.06.09 66.16-22.49 76.94-55.86 22.51-4.61 41.94-18.7 53.31-38.67 17.57-30.32 13.55-68.51-9.94-94.51zm-120.28 168.11c-14.03.02-27.62-4.89-38.39-13.88.49-.26 1.34-.73 1.89-1.07l63.72-36.8c3.26-1.85 5.26-5.32 5.24-9.07v-89.83l26.93 15.55c.29.14.48.42.52.74v74.39c-.04 33.08-26.83 59.9-59.91 59.97zm-128.84-55.03c-7.03-12.14-9.56-26.37-7.15-40.18.47.28 1.3.79 1.89 1.13l63.72 36.8c3.23 1.89 7.23 1.89 10.47 0l77.79-44.92v31.1c.02.32-.13.63-.38.83l-64.41 37.19c-28.69 16.52-65.33 6.7-81.92-21.95zm-16.77-139.09c7-12.16 18.05-21.46 31.21-26.29 0 .55-.03 1.52-.03 2.2v73.61c-.02 3.74 1.98 7.21 5.23 9.06l77.79 44.91-26.93 15.55c-.27.18-.61.21-.91.08l-64.42-37.22c-28.63-16.58-38.45-53.21-21.95-81.89zm221.26 51.49-77.79-44.92 26.93-15.54c.27-.18.61-.21.91-.08l64.42 37.19c28.68 16.57 38.51 53.26 21.94 81.94-7.01 12.14-18.05 21.44-31.2 26.28v-75.81c.03-3.74-1.96-7.2-5.2-9.06zm26.8-40.34c-.47-.29-1.3-.79-1.89-1.13l-63.72-36.8c-3.23-1.89-7.23-1.89-10.47 0l-77.79 44.92v-31.1c-.02-.32.13-.63.38-.83l64.41-37.16c28.69-16.55 65.37-6.7 81.91 22 6.99 12.12 9.52 26.31 7.15 40.1zm-168.51 55.43-26.94-15.55c-.29-.14-.48-.42-.52-.74v-74.39c.02-33.12 26.89-59.96 60.01-59.94 14.01 0 27.57 4.92 38.34 13.88-.49.26-1.33.73-1.89 1.07l-63.72 36.8c-3.26 1.85-5.26 5.31-5.24 9.06l-.04 89.79zm14.63-31.54 34.65-20.01 34.65 20v40.01l-34.65 20-34.65-20z"})}),anthropic:h.jsx("svg",{className:"h-3 w-3",fill:"white",height:"78",strokeLinejoin:"round",viewBox:"0 0 16 16",width:"78",style:{color:"currentcolor"},children:h.jsx("g",{transform:"translate(0,2)",children:h.jsx("path",{d:"M11.375 0h-2.411L13.352 11.13h2.411L11.375 0ZM4.4 0 0 11.13h2.46l0.9-2.336h4.604l0.9 2.336h2.46L6.924 0H4.4Zm-0.244 6.723 1.506-3.909 1.506 3.909H4.156Z",fill:"currentColor"})})})};var Dbe="AlertDialog",[ESt,XDt]=Ri(Dbe,[iie]),Fh=iie(),Abe=e=>{const{__scopeAlertDialog:t,...n}=e,r=Fh(t);return h.jsx(qA,{...r,...n,modal:!0})};Abe.displayName=Dbe;var DSt="AlertDialogTrigger",Tbe=A.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Fh(n);return h.jsx(NNe,{...s,...r,ref:t})});Tbe.displayName=DSt;var ASt="AlertDialogPortal",_be=e=>{const{__scopeAlertDialog:t,...n}=e,r=Fh(t);return h.jsx(GA,{...r,...n})};_be.displayName=ASt;var TSt="AlertDialogOverlay",Nbe=A.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Fh(n);return h.jsx(ty,{...s,...r,ref:t})});Nbe.displayName=TSt;var ib="AlertDialogContent",[_St,NSt]=ESt(ib),PSt=yte("AlertDialogContent"),Pbe=A.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...s}=e,i=Fh(n),o=A.useRef(null),a=Ut(t,o),l=A.useRef(null);return h.jsx(DNe,{contentName:ib,titleName:Mbe,docsSlug:"alert-dialog",children:h.jsx(_St,{scope:n,cancelRef:l,children:h.jsxs(ny,{role:"alertdialog",...i,...s,ref:a,onOpenAutoFocus:bt(s.onOpenAutoFocus,c=>{var u;c.preventDefault(),(u=l.current)==null||u.focus({preventScroll:!0})}),onPointerDownOutside:c=>c.preventDefault(),onInteractOutside:c=>c.preventDefault(),children:[h.jsx(PSt,{children:r}),h.jsx(jSt,{contentRef:o})]})})})});Pbe.displayName=ib;var Mbe="AlertDialogTitle",jbe=A.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Fh(n);return h.jsx(ry,{...s,...r,ref:t})});jbe.displayName=Mbe;var Fbe="AlertDialogDescription",Ibe=A.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Fh(n);return h.jsx(sy,{...s,...r,ref:t})});Ibe.displayName=Fbe;var MSt="AlertDialogAction",Obe=A.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Fh(n);return h.jsx(XS,{...s,...r,ref:t})});Obe.displayName=MSt;var Rbe="AlertDialogCancel",Lbe=A.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:s}=NSt(Rbe,n),i=Fh(n),o=Ut(t,s);return h.jsx(XS,{...i,...r,ref:o})});Lbe.displayName=Rbe;var jSt=({contentRef:e})=>{const t=`\`${ib}\` requires a description for the component to be accessible for screen reader users.
|
|
726
726
|
|
|
727
727
|
You can add a description to the \`${ib}\` by passing a \`${Fbe}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
728
728
|
|
|
729
729
|
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${ib}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
730
730
|
|
|
731
731
|
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return A.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},FSt=Abe,ISt=Tbe,OSt=_be,Bbe=Nbe,$be=Pbe,zbe=Obe,Hbe=Lbe,Vbe=jbe,Ube=Ibe;const RSt=FSt,LSt=ISt,Wbe=OSt;function jn({open:e,onOpenChange:t,children:n}){return h.jsx(RSt,{open:e,onOpenChange:t,children:n})}const zB=A.forwardRef(({className:e,...t},n)=>h.jsx(Bbe,{className:$t("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));zB.displayName=Bbe.displayName;const qbe=A.forwardRef(({className:e,...t},n)=>h.jsxs(Wbe,{children:[h.jsx(zB,{}),h.jsx($be,{ref:n,className:$t("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-[#141414] p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));qbe.displayName=$be.displayName;const Gbe=({className:e,...t})=>h.jsx("div",{className:$t("flex flex-col space-y-2 text-center sm:text-left",e),...t});Gbe.displayName="AlertDialogHeader";const Ybe=({className:e,...t})=>h.jsx("div",{className:$t("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ybe.displayName="AlertDialogFooter";const Kbe=A.forwardRef(({className:e,...t},n)=>h.jsx(Vbe,{ref:n,className:$t("text-lg font-semibold",e),...t}));Kbe.displayName=Vbe.displayName;const Xbe=A.forwardRef(({className:e,...t},n)=>h.jsx(Ube,{ref:n,className:$t("text-sm text-muted-foreground",e),...t}));Xbe.displayName=Ube.displayName;const Jbe=A.forwardRef(({className:e,...t},n)=>h.jsx(zbe,{ref:n,className:$t(sO(),e),...t}));Jbe.displayName=zbe.displayName;const Zbe=A.forwardRef(({className:e,...t},n)=>h.jsx(Hbe,{ref:n,className:$t(sO({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Zbe.displayName=Hbe.displayName;jn.Trigger=LSt;jn.Portal=Wbe;jn.Overlay=zB;jn.Content=qbe;jn.Header=Gbe;jn.Footer=Ybe;jn.Title=Kbe;jn.Description=Xbe;jn.Action=Jbe;jn.Cancel=Zbe;const Z1=A.forwardRef(({className:e,children:t,...n},r)=>h.jsxs(y4,{ref:r,className:$t("relative overflow-hidden",e),...n,children:[h.jsx(dge,{className:"h-full w-full rounded-[inherit]",children:t}),h.jsx(Qbe,{}),h.jsx(hge,{})]}));Z1.displayName=y4.displayName;const Qbe=A.forwardRef(({className:e,orientation:t="vertical",...n},r)=>h.jsx(TC,{ref:r,orientation:t,className:$t("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:h.jsx(KL,{className:"relative flex-1 rounded-full bg-border"})}));Qbe.displayName=TC.displayName;function HB({content:e,height:t="150px",isCopied:n=!1,isDraft:r=!1,onCopy:s,className:i=""}){return h.jsx("div",{className:`rounded-md border ${i}`,style:{height:t},children:h.jsx(Z1,{className:"h-full",children:h.jsxs("div",{className:"p-2 cursor-pointer hover:bg-mastra-bg-3/50 transition-colors group relative",onClick:s,children:[h.jsx("pre",{className:"text-[10px] whitespace-pre-wrap font-mono",children:e}),r&&h.jsx("div",{className:"mt-1.5",children:h.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full bg-yellow-500/20 text-yellow-500",children:"Draft - Save changes to apply"})}),n&&h.jsx("span",{className:"absolute top-2 right-2 text-[10px] px-1.5 py-0.5 rounded-full bg-green-500/20 text-green-500",children:"Copied!"}),s&&h.jsx("span",{className:"absolute top-2 right-2 text-[10px] px-1.5 py-0.5 rounded-full bg-mastra-bg-3 text-mastra-el-4 opacity-0 group-hover:opacity-100 transition-opacity",children:"Click to copy"})]})})})}function BSt({instructions:e,enhancedPrompt:t,isEnhancing:n,userComment:r,onEnhance:s,onCancel:i,onSave:o,onCommentChange:a,onShowHistory:l}){const c=t||(e==null?void 0:e.trim()),{isCopied:u,handleCopy:d}=J1({text:c||""});return h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center justify-between gap-4 pb-1",children:[h.jsx(Ue,{as:"h3",variant:"ui-md",className:"text-icon3 pb-1",children:"Current Instructions"}),t?h.jsxs("div",{className:"flex items-center gap-4",children:[h.jsx("button",{onClick:i,children:h.jsxs(Kl,{children:[h.jsx(Xl,{asChild:!0,children:h.jsx(ot,{className:"hover:bg-surface2 rounded-lg",children:h.jsx(uI,{className:"text-accent2"})})}),h.jsx(nl,{children:"Discard prompt suggestions"})]})}),h.jsx("button",{onClick:o,disabled:!t,children:h.jsxs(Kl,{children:[h.jsx(Xl,{asChild:!0,children:h.jsx(ot,{className:"hover:bg-surface2 rounded-lg",children:h.jsx(rCe,{className:"text-accent1"})})}),h.jsx(nl,{children:"Save prompt suggestions"})]})})]}):h.jsx("button",{onClick:l,children:h.jsxs(Kl,{children:[h.jsx(Xl,{asChild:!0,children:h.jsx(ot,{className:"hover:bg-surface2 rounded-lg text-icon3 hover:text-icon6",children:h.jsx(cCe,{})})}),h.jsx(nl,{children:"Version history"})]})})]}),h.jsx("div",{children:h.jsxs("div",{className:ic("p-[1px] rounded-lg overflow-hidden relative"),children:[h.jsx("div",{className:ic("absolute inset-0 bg-surface4 transition-all",t&&"bg-gradient-to-br from-accent1 to-accent3")}),h.jsxs("div",{className:"relative z-10 bg-surface4 rounded-lg",children:[h.jsx(HB,{content:c||"",isCopied:u,isDraft:!!t,onCopy:()=>c&&d(),className:"border-none bg-surface4 text-ui-sm p-2 !h-[260px]"}),h.jsx("div",{className:"px-3 py-3",children:h.jsxs("div",{className:"flex justify-between rounded-lg border border-border1 bg-surface5 shadow-lg disabled:bg-surface3 text-icon6 w-full py-2 px-3 gap-3 relative z-10",children:[h.jsx("textarea",{value:r,onChange:p=>a(p.target.value),placeholder:"Add your comments or requirements for enhancing your agent's prompt...",className:"resize-none text-ui-sm w-full placeholder:text-icon3 bg-transparent block disabled:text-icon3 outline-none focus-visible:ring-1 focus-visible:ring-accent3",disabled:!!(n||t)}),h.jsx("button",{onClick:s,disabled:n||!e||!!t,children:h.jsxs(Kl,{children:[h.jsx(Xl,{asChild:!0,children:h.jsx(ot,{className:"text-icon3 hover:text-icon6 disabled:hover:text-icon3",children:n?h.jsx(fCe,{className:"animate-spin"}):h.jsx(ACe,{})})}),h.jsx(nl,{children:n?"Enhancing...":"Enhance prompt"})]})})]})})]})]})})]})}function $St({agentId:e,instructions:t,versions:n,onVersionCreate:r,onVersionUpdate:s}){const[i,o]=A.useState(""),[a,l]=A.useState(""),[c,u]=A.useState(!1),[d,p]=A.useState(""),g=async()=>{if(t){u(!0);try{const S=await fetch(`/api/agents/${e}/instructions/enhance`,{method:"POST",headers:{"Content-Type":"application/json","x-mastra-dev-playground":"true"},body:JSON.stringify({instructions:t,comment:d})});if(!S.ok)throw new Error("Failed to enhance prompt");const E=await S.json();o(E.new_prompt),l(E.explanation),p("")}catch(S){console.error("Failed to enhance prompt:",S)}finally{u(!1)}}},b=()=>{o(""),l("")};return{enhancedPrompt:i,explanation:a,isEnhancing:c,userComment:d,enhancePrompt:g,setUserComment:p,clearEnhancement:b,applyChanges:()=>{if(!i)return;const S=n.findIndex(E=>E.status==="draft");S!==-1?s(S,{content:i,analysis:a,status:"published",timestamp:new Date}):r({content:i,timestamp:new Date,analysis:a,status:"published"}),b()}}}function zSt(e,t){const[n,r]=A.useState([]),[s,i]=A.useState({}),[o,a]=A.useState(!1),[l,c]=A.useState(null),u=async()=>{try{const x=await fetch(`/api/agents/${e}/evals/live`,{method:"GET",headers:{"x-mastra-dev-playground":"true"}});if(!x.ok)throw new Error("Failed to fetch eval results");const S=await x.json();return S==null?void 0:S.evals}catch(x){return console.error("Failed to fetch eval results:",x),[]}};return A.useEffect(()=>{(async()=>{const S=await u(),E=localStorage.getItem(`agent-${e}-versions`);if(E){const k=JSON.parse(E),T=k.find(P=>P.status==="original");if(t&&T&&T.content!==t){const P=S==null?void 0:S.filter(j=>j.meta.instructions===t),M=[{content:t,timestamp:new Date,analysis:"Original instructions",status:"original",evals:P}];M[0].evals=S,r(M),localStorage.setItem(`agent-${e}-versions`,JSON.stringify(M))}else{const P=await Promise.all(k.map(async M=>{const j=S==null?void 0:S.filter(I=>I.meta.instructions===M.content);return{...{...M,timestamp:new Date(M.timestamp),status:M.content===t?"active":M.status==="active"?"published":M.status},evals:j}}));r(P)}}else if(t){const k=[{content:t,timestamp:new Date,analysis:"Original instructions",status:"original",evals:[]}],T=S==null?void 0:S.filter(P=>P.meta.instructions===t);k[0].evals=T,r(k),localStorage.setItem(`agent-${e}-versions`,JSON.stringify(k))}})()},[t,e]),A.useEffect(()=>{n.length>0&&localStorage.setItem(`agent-${e}-versions`,JSON.stringify(n))},[n,e]),{versions:n,copiedVersions:s,isUpdating:o,versionToDelete:l,setVersions:r,setVersionToDelete:c,copyToClipboard:async(x,S)=>{i(k=>({...k,[S]:!0}));const E=setTimeout(()=>{i(k=>({...k,[S]:!1}))},1e3);return()=>clearTimeout(E)},setVersionActive:async(x,S)=>{a(!0);try{if(!(await fetch(`/api/agents/${e}/instructions`,{method:"POST",headers:{"Content-Type":"application/json","x-mastra-dev-playground":"true"},body:JSON.stringify({instructions:x.content})})).ok)throw new Error("Failed to update instructions");r(k=>k.map((T,P)=>({...T,status:P===S?"active":T.status==="active"?"published":T.status})))}catch(E){console.error("Failed to set version as active:",E)}finally{a(!1)}},deleteVersion:x=>{r(S=>S.filter((E,k)=>k!==x)),c(null)},updateVersion:async(x,S)=>{const E={...n[x],...S};r(k=>k.map((T,P)=>P===x?E:T))}}}const HSt=qA,VSt=GA,e1e=A.forwardRef(({className:e,...t},n)=>h.jsx(ty,{ref:n,className:$t("fixed inset-0 z-50 bg-transparent border-none outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));e1e.displayName=ty.displayName;const t1e=A.forwardRef(({className:e,children:t,...n},r)=>h.jsxs(VSt,{children:[h.jsx(e1e,{}),h.jsxs(ny,{ref:r,className:$t("fixed left-[50%] bg-sidebar top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,h.jsxs(XS,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[h.jsx(uI,{className:"h-4 w-4"}),h.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));t1e.displayName=ny.displayName;const n1e=({className:e,...t})=>h.jsx("div",{className:$t("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});n1e.displayName="DialogHeader";const r1e=A.forwardRef(({className:e,...t},n)=>h.jsx(ry,{ref:n,className:$t("text-lg font-semibold leading-none tracking-tight",e),...t}));r1e.displayName=ry.displayName;const s1e=A.forwardRef(({className:e,...t},n)=>h.jsx(sy,{ref:n,className:$t("text-sm text-muted-foreground",e),...t}));s1e.displayName=sy.displayName;function USt({version:e,index:t,isUpdating:n,onSetActive:r,onDelete:s}){return h.jsxs("div",{className:"flex items-center space-x-1",children:[e.status!=="active"&&e.status!=="draft"&&h.jsx(gu,{variant:"ghost",size:"sm",className:"h-6 px-2 hover:bg-mastra-bg-3 relative group",onClick:i=>{i.stopPropagation(),r(e,t)},disabled:n,children:h.jsx(xCe,{className:"h-3 w-3"})}),t!==0&&e.status!=="active"&&h.jsx(gu,{variant:"ghost",size:"sm",className:"h-6 px-2 hover:bg-mastra-bg-3 relative group",onClick:i=>{i.stopPropagation(),s(t)},children:h.jsx(ECe,{className:"h-3 w-3 text-red-400 hover:text-red-500"})})]})}function WSt({version:e,index:t,isExpanded:n,isAnalysisExpanded:r,isUpdating:s,onToggleExpand:i,onToggleAnalysis:o,onSetActive:a,onDelete:l}){const[c,u]=A.useState(!1),[d,p]=A.useState(!0),[g,b]=A.useState(!1),{handleCopy:x,isCopied:S}=J1({text:e.content}),E=k=>k.replace(/\\n/g,`
|
|
732
|
-
`);return h.jsxs("div",{className:`rounded-md border ${n?"border-mastra-purple/30":"border-mastra-bg-3"} bg-mastra-bg-2`,children:[h.jsxs("div",{className:"p-2 flex items-center justify-between cursor-pointer hover:bg-mastra-bg-3/50",onClick:i,children:[h.jsxs("div",{className:"flex items-center space-x-2",children:[h.jsx(t2,{className:`h-3 w-3 transition-transform ${n?"rotate-90 text-mastra-purple":""}`}),h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center space-x-2",children:[h.jsxs("p",{className:"text-xs font-medium text-mastra-el-4",children:["Version ",t+1]}),e.status==="active"&&h.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full bg-green-500/20 text-green-500",children:"Active"}),e.status==="original"&&h.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full bg-blue-500/20 text-blue-500",children:"Original"}),e.status==="draft"&&h.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full bg-yellow-500/20 text-yellow-500",children:"Draft"})]}),h.jsx("p",{className:"text-[10px] text-mastra-el-3",children:e.timestamp.toLocaleString()})]})]}),h.jsx(USt,{version:e,index:t,isUpdating:s,isAnalysisExpanded:r===t,onSetActive:a,onDelete:l,onToggleAnalysis:o})]}),n&&h.jsx(Z1,{className:"h-[250px]",children:h.jsxs("div",{className:"px-2 pb-2 space-y-2",children:[h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center space-x-1 cursor-pointer hover:bg-mastra-bg-3/50 p-1 rounded-md mb-2",onClick:k=>{k.stopPropagation(),p(!d)},children:[h.jsx(t2,{className:`h-3 w-3 transition-transform ${d?"rotate-90":""}`}),h.jsx("p",{className:"text-xs font-medium text-mastra-el-4",children:"Instructions"})]}),d&&h.jsx("div",{className:"rounded-md border border-mastra-bg-3",children:h.jsx("div",{className:"mt-2",children:h.jsx(HB,{content:E(e.content),isCopied:S,onCopy:x})})})]}),e.analysis&&h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center space-x-1 cursor-pointer hover:bg-mastra-bg-3/50 p-1 rounded-md mb-2",onClick:k=>{k.stopPropagation(),b(!g)},children:[h.jsx(t2,{className:`h-3 w-3 transition-transform ${g?"rotate-90":""}`}),h.jsx("p",{className:"text-xs font-medium text-mastra-el-4",children:"Analysis"})]}),g&&h.jsx("div",{className:"rounded-md border border-mastra-bg-3",children:h.jsx("div",{className:"p-2",children:h.jsx("pre",{className:"text-[10px] text-mastra-el-4 whitespace-pre-wrap font-mono",children:E(e.analysis||"")})})})]}),e.evals&&e.evals.length>0&&h.jsxs("div",{className:"space-y-1",children:[h.jsxs("div",{className:"flex items-center space-x-1 cursor-pointer hover:bg-mastra-bg-3/50 p-1 rounded-md",onClick:k=>{k.stopPropagation(),u(!c)},children:[h.jsx(t2,{className:`h-3 w-3 transition-transform ${c?"rotate-90":""}`}),h.jsxs("p",{className:"text-xs font-medium text-mastra-el-4",children:["Evaluations (",e.evals.length,")"]})]}),c&&h.jsx("div",{className:"pl-4",children:h.jsx("div",{className:"space-y-1 pr-4",children:e.evals.map((k,T)=>h.jsxs("div",{className:"rounded-md border border-mastra-bg-3 p-1.5 text-[10px]",children:[h.jsx("div",{className:"flex items-center justify-between",children:h.jsxs("div",{className:"flex items-center space-x-2",children:[h.jsx("span",{className:`px-1.5 py-0.5 rounded-full min-w-[32px] text-center ${k.result.score>=.7?"bg-green-500/20 text-green-500":k.result.score>=.4?"bg-yellow-500/20 text-yellow-500":"bg-red-500/20 text-red-500"}`,children:k.result.score.toFixed(2)}),h.jsx("span",{className:"text-mastra-el-3 text-[9px]",children:new Date(k.createdAt).toLocaleTimeString()})]})}),h.jsxs("div",{className:"mt-1 space-y-1",children:[h.jsxs("div",{className:"flex gap-1.5",children:[h.jsx("span",{className:"text-mastra-el-3 shrink-0",children:"→"}),h.jsx("span",{className:"text-mastra-el-4",children:k.input})]}),h.jsxs("div",{className:"flex gap-1.5",children:[h.jsx("span",{className:"text-mastra-el-3 shrink-0",children:"←"}),h.jsx("span",{className:"text-mastra-el-4",children:k.output})]}),h.jsxs("div",{className:"flex gap-1.5 text-[9px] text-mastra-el-3",children:[h.jsx("span",{className:"shrink-0",children:"⚬"}),h.jsx("span",{children:k.result.info.reason})]})]})]},T))})})]})]})})]})}function qSt({versions:e,isUpdating:t,copiedVersions:n,onCopy:r,onSetActive:s,onDelete:i}){const[o,a]=A.useState(null),[l,c]=A.useState(null);return h.jsx(Z1,{className:"flex-1",children:h.jsx("div",{className:"space-y-2 pr-4",children:e.map((u,d)=>h.jsx(WSt,{version:u,index:d,isExpanded:o===d,isAnalysisExpanded:l,isUpdating:t,copiedVersions:n,onToggleExpand:()=>{if(o===d)return a(null);a(d)},onToggleAnalysis:()=>{if(l===d)return c(null);c(d)},onCopy:r,onSetActive:s,onDelete:i},d))})})}const GSt=({open:e,onOpenChange:t,onDelete:n,onSetActive:r,versions:s,isUpdating:i})=>h.jsx(HSt,{open:e,onOpenChange:t,children:h.jsxs(t1e,{children:[h.jsxs(n1e,{children:[h.jsx(r1e,{children:"Version History"}),h.jsx(s1e,{children:"View the history of changes to the agent's instructions."})]}),h.jsx(qSt,{versions:s,isUpdating:i,copiedVersions:{},onSetActive:r,onDelete:n})]})});function YSt({agentId:e}){const{agent:t}=K1(e),[n,r]=A.useState(!1),{versions:s,isUpdating:i,versionToDelete:o,setVersions:a,setVersionToDelete:l,deleteVersion:c,updateVersion:u,setVersionActive:d}=zSt(e,t==null?void 0:t.instructions),{enhancedPrompt:p,isEnhancing:g,userComment:b,enhancePrompt:x,setUserComment:S,clearEnhancement:E,applyChanges:k}=$St({agentId:e,instructions:t==null?void 0:t.instructions,versions:s,onVersionCreate:T=>{a(P=>[...P,T])},onVersionUpdate:u});return t?h.jsxs(h.Fragment,{children:[h.jsx(BSt,{instructions:t.instructions,enhancedPrompt:p,isEnhancing:g,userComment:b,onEnhance:x,onCancel:E,onSave:k,onCommentChange:S,agentId:e,onShowHistory:()=>r(!0)}),h.jsx(GSt,{versions:s,isUpdating:i,onSetActive:d,onDelete:l,open:n,onOpenChange:r}),h.jsx(jn,{open:o!==null,onOpenChange:()=>l(null),children:h.jsxs(jn.Content,{children:[h.jsxs(jn.Header,{children:[h.jsxs(jn.Title,{children:["Delete Version ",o!==null?o+1:""]}),h.jsx(jn.Description,{children:"Are you sure you want to delete this version? This action cannot be undone."})]}),h.jsxs(jn.Footer,{children:[h.jsx(jn.Cancel,{children:"Cancel"}),h.jsx(jn.Action,{className:"bg-red-500 hover:bg-red-600",onClick:()=>{o!==null&&c(o)},children:"Delete"})]})]})})]}):null}function KSt({tools:e,agentId:t}){return h.jsx("ul",{className:"space-y-2",children:e.map(n=>h.jsx("li",{children:h.jsx(XSt,{tool:n,agentId:t})},n.id))})}const XSt=({tool:e,agentId:t})=>{const n=A.useRef(null);return h.jsxs(I4,{onClick:()=>{var r;return(r=n.current)==null?void 0:r.click()},children:[h.jsx(O4,{children:h.jsx(gl,{className:"group-hover/entity:text-[#ECB047]"})}),h.jsxs(B4,{children:[h.jsx(R4,{children:h.jsx(Zt,{ref:n,to:`/tools/${t}/${e.id}`,children:e.name})}),h.jsx(L4,{children:e.description})]})]})};function JSt({workflows:e,agentId:t}){return h.jsx("ul",{className:"space-y-2",children:e.map(n=>h.jsx("li",{children:h.jsx(ZSt,{workflow:n,agentId:t})},n.id))})}const ZSt=({workflow:e,agentId:t})=>{const n=A.useRef(null);return h.jsxs(I4,{onClick:()=>{var r;return(r=n.current)==null?void 0:r.click()},children:[h.jsx(O4,{children:h.jsx(kc,{className:"group-hover/entity:text-accent3"})}),h.jsxs(B4,{children:[h.jsx(R4,{children:h.jsx(Zt,{ref:n,to:`/workflows/${e.id}/graph`,children:e.id})}),h.jsx(L4,{children:e.description})]})]})},QSt=({agent:e,agentId:t})=>{const n=Object.entries((e==null?void 0:e.tools)??{}).map(([s,i])=>({name:s,id:i.id,description:i.description})),r=Object.entries((e==null?void 0:e.workflows)??{}).map(([s,i])=>({id:s,description:`Contains ${Object.keys(i.steps||{}).length} steps`}));return h.jsxs("div",{className:"py-2 overflow-y-auto h-full",children:[h.jsx("div",{className:"px-5",children:h.jsx(YSt,{agentId:t})}),h.jsx("hr",{className:"border-border1 border-sm my-5"}),h.jsxs("div",{className:"px-5",children:[h.jsx(Ue,{as:"h3",variant:"ui-md",className:"text-icon3 pb-1",children:"Agent Tools"}),n.length>0?h.jsx(KSt,{tools:n,agentId:t}):h.jsxs(Ue,{as:"p",variant:"ui-lg",className:"text-icon6",children:["No tools found. You can add tools by following the"," ",h.jsx(Zt,{to:"https://mastra.ai/en/docs/agents/using-tools-and-mcp",className:"underline",target:"_blank",children:"Agents and Tools"})," ","documentation."]})]}),h.jsx("hr",{className:"border-border1 border-sm my-5"}),h.jsxs("div",{className:"px-5",children:[h.jsx(Ue,{as:"h3",variant:"ui-md",className:"text-icon3 pb-1",children:"Agent Workflows"}),r.length>0?h.jsx(JSt,{workflows:r,agentId:t}):h.jsx(Ue,{as:"p",variant:"ui-lg",className:"text-icon6",children:"No workflows were attached to this agent."})]})]})},i1e=0,o1e=1,a1e=2,kQ=3;var EQ=Object.prototype.hasOwnProperty;function mF(e,t){var n,r;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&mF(e[r],t[r]););return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(EQ.call(e,n)&&++r&&!EQ.call(t,n)||!(n in t)||!mF(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}const Hd=new WeakMap,Qf=()=>{},eo=Qf(),gF=Object,Rn=e=>e===eo,nu=e=>typeof e=="function",Ep=(e,t)=>({...e,...t}),l1e=e=>nu(e.then),p7={},xE={},VB="undefined",WC=typeof window!=VB,yF=typeof document!=VB,eCt=WC&&"Deno"in window,tCt=()=>WC&&typeof window.requestAnimationFrame!=VB,c1e=(e,t)=>{const n=Hd.get(e);return[()=>!Rn(t)&&e.get(t)||p7,r=>{if(!Rn(t)){const s=e.get(t);t in xE||(xE[t]=s),n[5](t,Ep(s,r),s||p7)}},n[6],()=>!Rn(t)&&t in xE?xE[t]:!Rn(t)&&e.get(t)||p7]};let bF=!0;const nCt=()=>bF,[xF,vF]=WC&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[Qf,Qf],rCt=()=>{const e=yF&&document.visibilityState;return Rn(e)||e!=="hidden"},sCt=e=>(yF&&document.addEventListener("visibilitychange",e),xF("focus",e),()=>{yF&&document.removeEventListener("visibilitychange",e),vF("focus",e)}),iCt=e=>{const t=()=>{bF=!0,e()},n=()=>{bF=!1};return xF("online",t),xF("offline",n),()=>{vF("online",t),vF("offline",n)}},oCt={isOnline:nCt,isVisible:rCt},aCt={initFocus:sCt,initReconnect:iCt},DQ=!Se.useId,TS=!WC||eCt,lCt=e=>tCt()?window.requestAnimationFrame(e):setTimeout(e,1),m7=TS?A.useEffect:A.useLayoutEffect,g7=typeof navigator<"u"&&navigator.connection,AQ=!TS&&g7&&(["slow-2g","2g"].includes(g7.effectiveType)||g7.saveData),vE=new WeakMap,cCt=e=>gF.prototype.toString.call(e),y7=(e,t)=>e===`[object ${t}]`;let uCt=0;const wF=e=>{const t=typeof e,n=cCt(e),r=y7(n,"Date"),s=y7(n,"RegExp"),i=y7(n,"Object");let o,a;if(gF(e)===e&&!r&&!s){if(o=vE.get(e),o)return o;if(o=++uCt+"~",vE.set(e,o),Array.isArray(e)){for(o="@",a=0;a<e.length;a++)o+=wF(e[a])+",";vE.set(e,o)}if(i){o="#";const l=gF.keys(e).sort();for(;!Rn(a=l.pop());)Rn(e[a])||(o+=a+":"+wF(e[a])+",");vE.set(e,o)}}else o=r?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return o},UB=e=>{if(nu(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?wF(e):"",[e,t]};let dCt=0;const SF=()=>++dCt;async function u1e(...e){const[t,n,r,s]=e,i=Ep({populateCache:!0,throwOnError:!0},typeof s=="boolean"?{revalidate:s}:s||{});let o=i.populateCache;const a=i.rollbackOnError;let l=i.optimisticData;const c=p=>typeof a=="function"?a(p):a!==!1,u=i.throwOnError;if(nu(n)){const p=n,g=[],b=t.keys();for(const x of b)!/^\$(inf|sub)\$/.test(x)&&p(t.get(x)._k)&&g.push(x);return Promise.all(g.map(d))}return d(n);async function d(p){const[g]=UB(p);if(!g)return;const[b,x]=c1e(t,g),[S,E,k,T]=Hd.get(t),P=()=>{const V=S[g];return(nu(i.revalidate)?i.revalidate(b().data,p):i.revalidate!==!1)&&(delete k[g],delete T[g],V&&V[0])?V[0](a1e).then(()=>b().data):b().data};if(e.length<3)return P();let M=r,j,F=!1;const I=SF();E[g]=[I,0];const B=!Rn(l),L=b(),W=L.data,$=L._c,J=Rn($)?W:$;if(B&&(l=nu(l)?l(J,W):l,x({data:l,_c:J})),nu(M))try{M=M(J)}catch(V){j=V,F=!0}if(M&&l1e(M))if(M=await M.catch(V=>{j=V,F=!0}),I!==E[g][0]){if(F)throw j;return M}else F&&B&&c(j)&&(o=!0,x({data:J,_c:eo}));if(o&&!F)if(nu(o)){const V=o(M,J);x({data:V,error:eo,_c:eo})}else x({data:M,error:eo,_c:eo});if(E[g][1]=SF(),Promise.resolve(P()).then(()=>{x({_c:eo})}),F){if(u)throw j;return}return M}}const TQ=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},hCt=(e,t)=>{if(!Hd.has(e)){const n=Ep(aCt,t),r=Object.create(null),s=u1e.bind(eo,e);let i=Qf;const o=Object.create(null),a=(u,d)=>{const p=o[u]||[];return o[u]=p,p.push(d),()=>p.splice(p.indexOf(d),1)},l=(u,d,p)=>{e.set(u,d);const g=o[u];if(g)for(const b of g)b(d,p)},c=()=>{if(!Hd.has(e)&&(Hd.set(e,[r,Object.create(null),Object.create(null),Object.create(null),s,l,a]),!TS)){const u=n.initFocus(setTimeout.bind(eo,TQ.bind(eo,r,i1e))),d=n.initReconnect(setTimeout.bind(eo,TQ.bind(eo,r,o1e)));i=()=>{u&&u(),d&&d(),Hd.delete(e)}}};return c(),[e,s,c,i]}return[e,Hd.get(e)[4]]},fCt=(e,t,n,r,s)=>{const i=n.errorRetryCount,o=s.retryCount,a=~~((Math.random()+.5)*(1<<(o<8?o:8)))*n.errorRetryInterval;!Rn(i)&&o>i||setTimeout(r,a,s)},pCt=mF,[d1e,mCt]=hCt(new Map),gCt=Ep({onLoadingSlow:Qf,onSuccess:Qf,onError:Qf,onErrorRetry:fCt,onDiscarded:Qf,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:AQ?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:AQ?5e3:3e3,compare:pCt,isPaused:()=>!1,cache:d1e,mutate:mCt,fallback:{}},oCt),yCt=(e,t)=>{const n=Ep(e,t);if(t){const{use:r,fallback:s}=e,{use:i,fallback:o}=t;r&&i&&(n.use=r.concat(i)),s&&o&&(n.fallback=Ep(s,o))}return n},bCt=A.createContext({}),xCt="$inf$",h1e=WC&&window.__SWR_DEVTOOLS_USE__,vCt=h1e?window.__SWR_DEVTOOLS_USE__:[],wCt=()=>{h1e&&(window.__SWR_DEVTOOLS_REACT__=Se)},SCt=e=>nu(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],WB=()=>Ep(gCt,A.useContext(bCt)),CCt=e=>(t,n,r)=>e(t,n&&((...i)=>{const[o]=UB(t),[,,,a]=Hd.get(d1e);if(o.startsWith(xCt))return n(...i);const l=a[o];return Rn(l)?n(...i):(delete a[o],l)}),r),kCt=vCt.concat(CCt),ECt=e=>function(...n){const r=WB(),[s,i,o]=SCt(n),a=yCt(r,o);let l=e;const{use:c}=a,u=(c||[]).concat(kCt);for(let d=u.length;d--;)l=u[d](l);return l(s,i||a.fetcher||null,a)},DCt=(e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const s=r.indexOf(n);s>=0&&(r[s]=r[r.length-1],r.pop())}};wCt();const b7=Se.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}}),x7={dedupe:!0},ACt=(e,t,n)=>{const{cache:r,compare:s,suspense:i,fallbackData:o,revalidateOnMount:a,revalidateIfStale:l,refreshInterval:c,refreshWhenHidden:u,refreshWhenOffline:d,keepPreviousData:p}=n,[g,b,x,S]=Hd.get(r),[E,k]=UB(e),T=A.useRef(!1),P=A.useRef(!1),M=A.useRef(E),j=A.useRef(t),F=A.useRef(n),I=()=>F.current,B=()=>I().isVisible()&&I().isOnline(),[L,W,$,J]=c1e(r,E),V=A.useRef({}).current,Z=Rn(o)?Rn(n.fallback)?eo:n.fallback[E]:o,G=(_e,Fe)=>{for(const tt in V){const nt=tt;if(nt==="data"){if(!s(_e[nt],Fe[nt])&&(!Rn(_e[nt])||!s(ie,Fe[nt])))return!1}else if(Fe[nt]!==_e[nt])return!1}return!0},q=A.useMemo(()=>{const _e=!E||!t?!1:Rn(a)?I().isPaused()||i?!1:l!==!1:a,Fe=de=>{const xe=Ep(de);return delete xe._k,_e?{isValidating:!0,isLoading:!0,...xe}:xe},tt=L(),nt=J(),Dt=Fe(tt),Gt=tt===nt?Dt:Fe(nt);let tn=Dt;return[()=>{const de=Fe(L());return G(de,tn)?(tn.data=de.data,tn.isLoading=de.isLoading,tn.isValidating=de.isValidating,tn.error=de.error,tn):(tn=de,de)},()=>Gt]},[r,E]),z=ale.useSyncExternalStore(A.useCallback(_e=>$(E,(Fe,tt)=>{G(tt,Fe)||_e()}),[r,E]),q[0],q[1]),Y=!T.current,U=g[E]&&g[E].length>0,X=z.data,ne=Rn(X)?Z&&l1e(Z)?b7(Z):Z:X,H=z.error,ee=A.useRef(ne),ie=p?Rn(X)?Rn(ee.current)?ne:ee.current:X:ne,se=U&&!Rn(H)?!1:Y&&!Rn(a)?a:I().isPaused()?!1:i?Rn(ne)?!1:l:Rn(ne)||l,ae=!!(E&&t&&Y&&se),le=Rn(z.isValidating)?ae:z.isValidating,pe=Rn(z.isLoading)?ae:z.isLoading,ye=A.useCallback(async _e=>{const Fe=j.current;if(!E||!Fe||P.current||I().isPaused())return!1;let tt,nt,Dt=!0;const Gt=_e||{},tn=!x[E]||!Gt.dedupe,de=()=>DQ?!P.current&&E===M.current&&T.current:E===M.current,xe={isValidating:!1,isLoading:!1},Me=()=>{W(xe)},Je=()=>{const ze=x[E];ze&&ze[1]===nt&&delete x[E]},Ze={isValidating:!0};Rn(L().data)&&(Ze.isLoading=!0);try{if(tn&&(W(Ze),n.loadingTimeout&&Rn(L().data)&&setTimeout(()=>{Dt&&de()&&I().onLoadingSlow(E,n)},n.loadingTimeout),x[E]=[Fe(k),SF()]),[tt,nt]=x[E],tt=await tt,tn&&setTimeout(Je,n.dedupingInterval),!x[E]||x[E][1]!==nt)return tn&&de()&&I().onDiscarded(E),!1;xe.error=eo;const ze=b[E];if(!Rn(ze)&&(nt<=ze[0]||nt<=ze[1]||ze[1]===0))return Me(),tn&&de()&&I().onDiscarded(E),!1;const fe=L().data;xe.data=s(fe,tt)?fe:tt,tn&&de()&&I().onSuccess(tt,E,n)}catch(ze){Je();const fe=I(),{shouldRetryOnError:Pe}=fe;fe.isPaused()||(xe.error=ze,tn&&de()&&(fe.onError(ze,E,fe),(Pe===!0||nu(Pe)&&Pe(ze))&&(!I().revalidateOnFocus||!I().revalidateOnReconnect||B())&&fe.onErrorRetry(ze,E,fe,Xe=>{const ht=g[E];ht&&ht[0]&&ht[0](kQ,Xe)},{retryCount:(Gt.retryCount||0)+1,dedupe:!0})))}return Dt=!1,Me(),!0},[E,r]),Te=A.useCallback((..._e)=>u1e(r,M.current,..._e),[]);if(m7(()=>{j.current=t,F.current=n,Rn(X)||(ee.current=X)}),m7(()=>{if(!E)return;const _e=ye.bind(eo,x7);let Fe=0;I().revalidateOnFocus&&(Fe=Date.now()+I().focusThrottleInterval);const nt=DCt(E,g,(Dt,Gt={})=>{if(Dt==i1e){const tn=Date.now();I().revalidateOnFocus&&tn>Fe&&B()&&(Fe=tn+I().focusThrottleInterval,_e())}else if(Dt==o1e)I().revalidateOnReconnect&&B()&&_e();else{if(Dt==a1e)return ye();if(Dt==kQ)return ye(Gt)}});return P.current=!1,M.current=E,T.current=!0,W({_k:k}),se&&(x[E]||(Rn(ne)||TS?_e():lCt(_e))),()=>{P.current=!0,nt()}},[E]),m7(()=>{let _e;function Fe(){const nt=nu(c)?c(L().data):c;nt&&_e!==-1&&(_e=setTimeout(tt,nt))}function tt(){!L().error&&(u||I().isVisible())&&(d||I().isOnline())?ye(x7).then(Fe):Fe()}return Fe(),()=>{_e&&(clearTimeout(_e),_e=-1)}},[c,u,d,E]),A.useDebugValue(ie),i&&Rn(ne)&&E){if(!DQ&&TS)throw new Error("Fallback data is required when using Suspense in SSR.");j.current=t,F.current=n,P.current=!1;const _e=S[E];if(!Rn(_e)){const Fe=Te(_e);b7(Fe)}if(Rn(H)){const Fe=ye(x7);Rn(ie)||(Fe.status="fulfilled",Fe.value=!0),b7(Fe)}else throw H}return{mutate:Te,get data(){return V.data=!0,ie},get error(){return V.error=!0,H},get isValidating(){return V.isValidating=!0,le},get isLoading(){return V.isLoading=!0,pe}}},Q1=ECt(ACt),f1e=e=>{const{data:t,isLoading:n,mutate:r}=Q1(`/api/memory/status?agentId=${e}`,A1,{fallbackData:{result:!1},isPaused:()=>!e});return{memory:t,isLoading:n,mutate:r}},TCt=({resourceid:e,agentId:t,isMemoryEnabled:n})=>{const{data:r,isLoading:s,mutate:i}=Q1(`/api/memory/threads?resourceid=${e}&agentId=${t}`,A1,{fallbackData:[],isPaused:()=>!e||!t||!n,revalidateOnFocus:!1});return A.useEffect(()=>{e&&t&&n&&i()},[e,t,n]),A.useEffect(()=>{var a,l;const o=async(c=0)=>{var d,p;const u=await i();if(u!=null&&u.length){const g=u[u.length-1];c=c+1,(p=(d=g==null?void 0:g.title)==null?void 0:d.toLowerCase())!=null&&p.includes("new thread")&&c<3&&setTimeout(()=>{o(c)},500)}};if(r!=null&&r.length){const c=r[r.length-1];(l=(a=c==null?void 0:c.title)==null?void 0:a.toLowerCase())!=null&&l.includes("new thread")&&setTimeout(()=>{o()},500)}},[r]),{threads:r,isLoading:s,mutate:i}},p1e=({threadId:e,memory:t,agentId:n})=>{const{data:r,isLoading:s,mutate:i}=Q1(`/api/memory/threads/${e}/messages?agentId=${n}`,o=>A1(o,!0),{fallbackData:{uiMessages:[],messages:[]},revalidateOnFocus:!1,isPaused:()=>!e||!n,shouldRetryOnError:!1});return A.useEffect(()=>{e&&t&&i()},[e,t]),{messages:r==null?void 0:r.uiMessages,isLoading:s,mutate:i}},_Ct=()=>{const{mutate:e}=WB();return{deleteThread:async({threadId:n,resourceid:r,agentId:s})=>{const i=fetch(`/api/memory/threads/${n}?agentId=${s}`,{method:"DELETE",headers:{"Content-Type":"application/json","x-mastra-dev-playground":"true"}});Nr.promise(i,{loading:"Deleting chat...",success:()=>(e(`/api/memory/threads?resourceid=${r}&agentId=${s}`),"Chat deleted successfully"),error:"Failed to delete chat"})}}},NCt=()=>{const{threadExists:e,workingMemoryData:t,workingMemorySource:n,isLoading:r,isUpdating:s,updateWorkingMemory:i}=v0e(),{isCopied:o,handleCopy:a}=J1({text:t??"",copyMessage:"Working memory copied!"}),[l,c]=A.useState(t??""),[u,d]=A.useState(!1);return Se.useEffect(()=>{c(t??"")},[t]),r?h.jsx($n,{className:"h-32 w-full"}):h.jsxs("div",{className:"flex flex-col gap-4 p-4",children:[h.jsxs(Ue,{variant:"header-md",children:["Working Memory (Scope: ",n,")"]}),!e&&h.jsx(Ue,{variant:"ui-sm",className:"text-icon3 flex items-center gap-2 pt-0.5",children:"Send a message to the agent to enable working memory."}),u?h.jsx("textarea",{className:"w-full min-h-[200px] p-3 border border-border2 rounded bg-surface1 font-mono text-[15px] text-mastra-el-4",value:l,onChange:p=>c(p.target.value),disabled:s}):h.jsx(HB,{content:t||"",isCopied:o,onCopy:a,className:"bg-surface2 text-[15px] font-mono min-h-[200px]"}),h.jsx("div",{className:"flex gap-2",children:u?h.jsxs(h.Fragment,{children:[h.jsx(gu,{variant:"default",onClick:async()=>{try{await i(l),d(!1)}catch(p){console.error("Failed to update working memory:",p),Nr.error("Failed to update working memory")}},children:s?h.jsx(ww,{className:"w-4 h-4 animate-spin"}):"Save"}),h.jsx(gu,{variant:"secondary",onClick:()=>{c(t??""),d(!1)},disabled:s,children:"Cancel"})]}):h.jsx(gu,{variant:"secondary",onClick:()=>d(!0),disabled:!e||s,children:"Edit"})})]})};function PCt({agentId:e}){var a;const{agent:t,isLoading:n}=K1(e),{memory:r,isLoading:s}=f1e(e),{handleCopy:i}=J1({text:e}),o=kSt[(t==null?void 0:t.provider)||"openai.chat"];return h.jsxs("div",{className:"grid grid-rows-[auto_1fr] h-full items-start overflow-y-auto border-l-sm border-border1",children:[h.jsxs("div",{className:"p-5 border-b-sm border-border1",children:[h.jsxs("div",{className:"text-icon6 flex items-center gap-2 min-w-0",children:[h.jsx(ot,{size:"lg",className:"bg-surface4 rounded-md p-1",children:h.jsx(Nh,{})}),n||s?h.jsx($n,{className:"h-3 w-1/3"}):h.jsx(Ue,{variant:"header-md",as:"h2",className:"font-medium truncate",children:t==null?void 0:t.name})]}),h.jsxs("div",{className:"flex items-center gap-2 pt-2 flex-wrap",children:[h.jsxs(Kl,{children:[h.jsx(Xl,{asChild:!0,children:h.jsx("button",{onClick:i,className:"h-badge-default shrink-0",children:h.jsx(Un,{icon:h.jsx(cI,{}),variant:"default",children:e})})}),h.jsx(nl,{children:"Copy Agent ID for use in code"})]}),h.jsx(Un,{className:"capitalize shrink-0",icon:o,children:(a=t==null?void 0:t.provider)==null?void 0:a.split(".")[0]}),h.jsx(Un,{className:"shrink-0",children:t==null?void 0:t.modelId}),h.jsxs(Kl,{children:[h.jsx(Xl,{asChild:!0,children:h.jsx(Un,{icon:h.jsx(s0e,{}),variant:r!=null&&r.result?"success":"error",className:"shrink-0",children:r!=null&&r.result?"Memory is On":"Memory is Off"})}),h.jsx(nl,{children:r!=null&&r.result?"Memory is active, your messages will be persisted.":h.jsxs(h.Fragment,{children:[h.jsx("p",{children:"Memory is off, your messages will not be persisted neither available in the context."}),h.jsx("p",{children:h.jsx(Zt,{to:"https://mastra.ai/en/docs/memory/overview",target:"_blank",className:"underline",children:"See documentation to enable memory"})})]})})]})]})]}),h.jsxs(z4,{defaultValue:"overview",className:"overflow-y-auto grid grid-rows-[auto_1fr] h-full",children:[h.jsxs(UC,{className:"flex border-b overflow-x-auto pl-5",children:[h.jsx(Ti,{value:"overview",className:"group",children:h.jsx("p",{className:"text-xs p-3 text-mastra-el-3 group-data-[state=active]:text-mastra-el-5 group-data-[state=active]:border-b-2 group-data-[state=active]:pb-2.5 border-white",children:"Overview"})}),h.jsx(Ti,{value:"model-settings",className:"group",children:h.jsx("p",{className:"text-xs p-3 text-mastra-el-3 group-data-[state=active]:text-mastra-el-5 group-data-[state=active]:border-b-2 group-data-[state=active]:pb-2.5 border-white",children:"Model settings"})}),h.jsx(Ti,{value:"endpoints",className:"group",children:h.jsx("p",{className:"text-xs p-3 text-mastra-el-3 group-data-[state=active]:text-mastra-el-5 group-data-[state=active]:border-b-2 group-data-[state=active]:pb-2.5 border-white",children:"Endpoints"})}),h.jsx(Ti,{value:"logs",className:"group ",children:h.jsx("p",{className:"text-xs p-3 text-mastra-el-3 group-data-[state=active]:text-mastra-el-5 group-data-[state=active]:border-b-2 group-data-[state=active]:pb-2.5 border-white",children:"Log Drains"})}),h.jsx(Ti,{value:"working-memory",className:"group",children:h.jsx("p",{className:"text-xs p-3 text-mastra-el-3 group-data-[state=active]:text-mastra-el-5 group-data-[state=active]:border-b-2 group-data-[state=active]:pb-2.5 border-white",children:"Working Memory"})})]}),h.jsxs("div",{className:"overflow-y-auto",children:[h.jsxs(_i,{value:"overview",children:[n&&h.jsx($n,{className:"h-full"}),t&&h.jsx(QSt,{agent:t,agentId:e})]}),h.jsxs(_i,{value:"model-settings",children:[n&&h.jsx($n,{className:"h-full"}),t&&h.jsx(hxt,{})]}),h.jsx(_i,{value:"endpoints",children:n?h.jsx($n,{className:"h-full"}):h.jsx(vSt,{agentId:e})}),h.jsx(_i,{value:"logs",children:n?h.jsx($n,{className:"h-full"}):h.jsx(CSt,{agentId:e})}),h.jsx(_i,{value:"working-memory",children:n?h.jsx($n,{className:"h-full"}):h.jsx(NCt,{})})]})]})]})}const MCt=e=>{const t={month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!0};return new Date(e).toLocaleString("en-us",t).replace(","," at")};function jCt({agentId:e,threadId:t,threads:n,isLoading:r}){const{deleteThread:s}=_Ct(),i=xl(),[o,a]=A.useState(null),l=async()=>{await s({threadId:o,resourceid:e,agentId:e}),a(null),o===t&&i(`/agents/${e}/chat/${Gs()}`)};if(r)return h.jsxs("div",{className:"p-4 w-full h-full space-y-2",children:[h.jsx("div",{className:"flex justify-end",children:h.jsx($n,{className:"h-9 w-9"})}),h.jsx($n,{className:"h-4"}),h.jsx($n,{className:"h-4"}),h.jsx($n,{className:"h-4"}),h.jsx($n,{className:"h-4"}),h.jsx($n,{className:"h-4"})]});const c=[...n||[]].reverse();return h.jsxs("div",{className:"overflow-y-auto h-full w-full",children:[h.jsx(obe,{children:h.jsxs(abe,{children:[h.jsx(iA,{children:h.jsx(sA,{as:Zt,to:`/agents/${e}/chat/${Gs()}`,children:h.jsxs("span",{className:"text-accent1 flex items-center gap-4",children:[h.jsx(ot,{className:"bg-surface4 rounded-lg",size:"lg",children:h.jsx(pte,{})}),"New Chat"]})})}),c.length===0&&h.jsx(Ue,{as:"p",variant:"ui-sm",className:"text-icon3 py-3 px-5 max-w-[12rem]",children:"Your conversations will appear here once you start chatting!"}),c.map(u=>{const d=u.id===t;return h.jsxs(iA,{isActive:d,children:[h.jsxs(sA,{as:Zt,to:`/agents/${e}/chat/${u.id}`,children:[h.jsx(ICt,{title:u.title}),h.jsx("span",{children:MCt(u.createdAt)})]}),h.jsx(lbe,{onClick:()=>a(u.id)})]},u.id)})]})}),h.jsx(jn,{open:!!o,onOpenChange:()=>a(null),children:h.jsxs(jn.Content,{children:[h.jsxs(jn.Header,{children:[h.jsx(jn.Title,{children:"Are you absolutely sure?"}),h.jsx(jn.Description,{children:"This action cannot be undone. This will permanently delete your chat and remove it from our servers."})]}),h.jsxs(jn.Footer,{children:[h.jsx(jn.Cancel,{children:"Cancel"}),h.jsx(jn.Action,{onClick:l,children:"Continue"})]})]})})]})}function FCt(e){return/^New Thread \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/.test(e)}function ICt({title:e}){return e?FCt(e)?h.jsx("span",{className:"text-muted-foreground",children:"Chat from"}):h.jsx("span",{className:"truncate max-w-[14rem]",children:e}):null}function _Q(){const{agentId:e,threadId:t}=Cs(),{agent:n,isLoading:r}=K1(e),{memory:s}=f1e(e),i=xl(),{messages:o,isLoading:a}=p1e({agentId:e,threadId:t,memory:!!(s!=null&&s.result)}),{threads:l,isLoading:c,mutate:u}=TCt({resourceid:e,agentId:e,isMemoryEnabled:!!(s!=null&&s.result)});if(A.useEffect(()=>{s!=null&&s.result&&!t&&i(`/agents/${e}/chat/${Gs()}`)},[s==null?void 0:s.result,t]),r)return null;const d=!!(s!=null&&s.result);return h.jsx(T1t,{agentId:e,children:h.jsx(S1t,{agentId:e,threadId:t,resourceId:e,children:h.jsxs(ho,{isDivided:!0,hasLeftServiceColumn:d,children:[d&&h.jsx(jCt,{agentId:e,threadId:t,threads:l,isLoading:c}),h.jsx("div",{className:"grid overflow-y-auto relative bg-surface1 py-4",children:h.jsx(_1t,{agentId:e,agentName:n==null?void 0:n.name,threadId:t,initialMessages:a?void 0:o,memory:s==null?void 0:s.result,refreshThreadList:u})}),h.jsx(PCt,{agentId:e})]})})})}const NQ=(e,t)=>VC({staleTime:0,gcTime:0,queryKey:["evals",e,t],queryFn:()=>t==="live"?Dn.getAgent(e).liveEvals():Dn.getAgent(e).evals()});function OCt(){const{agentId:e}=Cs(),{data:t,isLoading:n,refetch:r}=NQ(e,"live"),{data:s,isLoading:i,refetch:o}=NQ(e,"ci");return n||i?null:h.jsx("main",{className:"h-full overflow-hidden",children:h.jsx(O1t,{liveEvals:(t==null?void 0:t.evals)??[],ciEvals:(s==null?void 0:s.evals)??[],onRefetchLiveEvals:r,onRefetchCiEvals:o})})}function RCt({fetchFn:e,interval:t=3e3,enabled:n=!1,onSuccess:r,onError:s,shouldContinue:i=()=>!0}){const[o,a]=A.useState(n),[l,c]=A.useState(null),[u,d]=A.useState(null),[p,g]=A.useState(!1),[b,x]=A.useState(!1),S=A.useRef(null),E=A.useRef(!0),k=A.useCallback(()=>{console.log("cleanup"),S.current&&(clearTimeout(S.current),S.current=null)},[]),T=A.useCallback(()=>{console.log("stopPolling"),a(!1),k()},[k]),P=A.useCallback(()=>{console.log("startPolling"),a(!0),c(null)},[]),M=A.useCallback(async(j=!1)=>{if(E.current){g(!0),x(j);try{const F=await e();d(F),c(null),r==null||r(F),x(!1),i(F)?S.current=setTimeout(M,t):T()}catch(F){if(!E.current)return;c(F),s==null||s(F),T()}finally{E.current&&(x(!1),g(!1))}}},[e,t,r,s,i,T]);return A.useEffect(()=>(E.current=!0,n&&o&&M(!0),()=>{console.log("cleanup poll"),E.current=!1,k()}),[n,o,M,k]),{isPolling:o,isLoading:p,error:l,data:u,startPolling:P,stopPolling:T,firstCallLoading:b}}const LCt=(e,t=!1)=>{const n=new Set,r=o=>{var a,l,c,u;return o!=null&&o.startsWith("workflow.")&&t?(l=(a=o==null?void 0:o.split("."))==null?void 0:a.slice(2))==null?void 0:l.join("."):o!=null&&o.startsWith("agent.")&&!t?(u=(c=o==null?void 0:o.split("."))==null?void 0:c.slice(1))==null?void 0:u.join("."):o},s=e==null?void 0:e.reduce((o,a)=>{const l={...a,name:r(a.name),duration:a.endTime-a.startTime};return n.add(a.id),{...o,[a.traceId]:[...o[a.traceId]||[],l]}},{});return Object.entries(s).map(([o,a])=>{var p,g,b;const l=a.find(x=>!x.parentSpanId||!n.has(x.parentSpanId)),c=a.map(x=>({...x,parentSpanId:(l==null?void 0:l.id)===x.id?null:x==null?void 0:x.parentSpanId})),u=(p=a.find(x=>x.status.code!==0))==null?void 0:p.status,d=(b=(g=a==null?void 0:a[0])==null?void 0:g.attributes)==null?void 0:b.runId;return{traceId:o,serviceName:(l==null?void 0:l.name)||o,duration:(l==null?void 0:l.duration)||a.reduce((x,S)=>x+S.duration,0),status:u||(l==null?void 0:l.status)||a[0].status,started:a[0].startTime,trace:c,runId:d?String(d):void 0}})},qB=(e,t=!1)=>{const[n,r]=A.useState([]),s=A.useCallback(async()=>{try{const u=await Dn.getTelemetry({attribute:{componentName:e}});if(!u.traces)throw new Error("Error fetching traces");return LCt((u==null?void 0:u.traces)||[],t)}catch(u){throw u}},[Dn,e,t]),i=A.useCallback(u=>{u.length>0&&r(()=>u)},[]),o=A.useCallback(u=>{console.log("error, onError",u),Nr.error(u.message)},[]),a=A.useCallback(()=>!0,[]),{firstCallLoading:l,error:c}=RCt({fetchFn:s,interval:3e3,onSuccess:i,onError:o,shouldContinue:a,enabled:!0});return{traces:n,firstCallLoading:l,error:c}};function BCt(){const{agentId:e}=Cs(),{agent:t,isLoading:n}=K1(e),{traces:r,firstCallLoading:s,error:i}=qB((t==null?void 0:t.name)||"");return n||s?h.jsx("div",{className:"p-4",children:h.jsx($n,{className:"h-10"})}):h.jsx(lxt,{traces:r||[],error:i,className:"h-[calc(100vh-40px)]"})}function GB(e){return Function("z",`"use strict";return (${e});`)(HD)}const $Ct=()=>el({mutationFn:async({agentId:e,toolId:t,input:n,playgroundRuntimeContext:r})=>{const s=new oh;Object.entries(r??{}).forEach(([i,o])=>{s.set(i,o)});try{return await Dn.getAgent(e).executeTool(t,{data:n,runtimeContext:s})}catch(i){throw Nr.error("Error executing agent tool"),console.error("Error executing tool:",i),i}}});function lA({content:e,copyMessage:t,tooltip:n="Copy to clipboard",iconSize:r="default"}){const{handleCopy:s}=J1({text:e,copyMessage:t});return h.jsxs(Kl,{children:[h.jsx(Xl,{asChild:!0,children:h.jsx("button",{onClick:s,type:"button",children:h.jsx(ot,{className:"transition-colors hover:bg-surface4 rounded-lg text-icon3 hover:text-icon6",size:r,children:h.jsx(cI,{})})})}),h.jsx(nl,{children:n})]})}const m1e={agent:Nh,workflow:kc,tool:gl},zCt=({toolDescription:e,toolId:t,toolType:n})=>{const r=m1e[n||"tool"];return h.jsx("div",{className:"p-5 border-b-sm border-border1",children:h.jsxs("div",{className:"text-icon6 flex gap-2",children:[h.jsx("div",{children:h.jsx(ot,{size:"lg",className:"bg-surface4 rounded-md p-1",children:h.jsx(r,{})})}),h.jsx("div",{className:"flex gap-4 justify-between w-full min-w-0",children:h.jsxs("div",{children:[h.jsx(Ue,{variant:"header-md",as:"h2",className:"font-medium truncate",children:t}),h.jsx(Ue,{variant:"ui-sm",className:"text-icon3",children:e})]})})]})})},g1e=()=>A.useMemo(()=>NT({settings:{fontFamily:"var(--geist-mono)",fontSize:"0.8rem",lineHighlight:"transparent",gutterBackground:"transparent",gutterForeground:"#939393",background:"transparent"},styles:[{tag:[Ce.className,Ce.propertyName]}]}),[]),YB=({isExecutingTool:e,zodInputSchema:t,handleExecuteTool:n,executionResult:r,errorString:s,toolDescription:i,toolId:o,toolType:a})=>{const l=g1e(),c=JSON.stringify(r??{},null,2);return h.jsxs(ho,{hasLeftServiceColumn:!0,className:"relative",children:[h.jsxs("div",{className:"bg-surface2 border-r-sm border-border1 w-[20rem]",children:[h.jsx(zCt,{toolDescription:i,toolId:o,toolType:a}),h.jsx("div",{className:"p-5 overflow-y-auto",children:h.jsx(nA,{isSubmitLoading:e,schema:t,onSubmit:u=>{n(u)},className:"h-auto"})})]}),h.jsx("div",{className:"absolute top-4 right-4 z-10",children:h.jsx(lA,{content:c,tooltip:"Copy JSON result to clipboard"})}),h.jsx("div",{className:"p-5 h-full relative overflow-x-auto overflow-y-auto",children:h.jsx(al,{value:s||c,editable:!0,theme:l,extensions:[Fu]})})]})},HCt=()=>{const{toolId:e,agentId:t}=Cs(),{runtimeContext:n}=dy(),{mutateAsync:r,isPending:s,error:i}=$Ct(),[o,a]=A.useState(null),{agent:l,isLoading:c}=K1(t),u=Object.values((l==null?void 0:l.tools)??{}).find(b=>b.id===e),d=async b=>{if(!l||!u)return;const x=await r({agentId:t,toolId:u.id,input:b,playgroundRuntimeContext:n});a(x)},p=u!=null&&u.inputSchema?GB(Fg(c1(u==null?void 0:u.inputSchema))):pn({}),g=!l||!u;return h.jsxs(yl,{children:[h.jsx(us,{children:h.jsxs(Yd,{children:[h.jsx(Vr,{as:Zt,to:"/agents",children:"Agents"}),h.jsx(Vr,{as:Zt,to:`/agents/${t}/chat`,children:t}),h.jsx(Vr,{as:Zt,to:`/agents/${t}/tools/${e}`,isCurrent:!0,children:e})]})}),c?null:g?h.jsx("div",{className:"py-12 text-center px-6",children:h.jsx(Ue,{variant:"header-md",className:"text-icon3",children:"Agent or tool not found"})}):h.jsx(YB,{executionResult:o,errorString:(i==null?void 0:i.message)??"",isExecutingTool:s,zodInputSchema:p,handleExecuteTool:d,toolDescription:u.description,toolId:u.id})]})},VCt=()=>el({mutationFn:async({toolId:e,input:t,runtimeContext:n})=>{const r=new oh;Object.entries(n??{}).forEach(([s,i])=>{r.set(s,i)});try{return await Dn.getTool(e).execute({data:t,runtimeContext:r})}catch(s){throw Nr.error("Error executing dev tool"),console.error("Error executing dev tool:",s),s}}}),UCt=()=>{const{toolId:e}=Cs(),{tool:t,isLoading:n}=ySt(e),{mutateAsync:r,isPending:s,data:i}=VCt(),{runtimeContext:o}=dy(),a=async c=>{if(t)return r({toolId:t.id,input:c,runtimeContext:o})},l=t!=null&&t.inputSchema?GB(Fg(c1(t==null?void 0:t.inputSchema))):pn({});return h.jsxs("div",{className:"h-full w-full overflow-y-hidden",children:[h.jsx(us,{children:h.jsxs(Yd,{children:[h.jsx(Vr,{as:Zt,to:"/tools",children:"Tools"}),h.jsx(Vr,{as:Zt,to:`/tools/all/${e}`,isCurrent:!0,children:e})]})}),n?null:t?h.jsx(YB,{executionResult:i,isExecutingTool:s,zodInputSchema:l,handleExecuteTool:a,toolDescription:t.description,toolId:t.id}):h.jsx("div",{className:"py-12 text-center px-6",children:h.jsx(Ue,{variant:"header-md",className:"text-icon3",children:"Tool not found"})})]})};function WCt(){const{data:e,isLoading:t}=cSt(),n=xl(),[r,s]=e??[];return h.jsxs(yl,{children:[h.jsx(us,{children:h.jsx(Xu,{children:"Workflows"})}),h.jsx(ho,{isCentered:!t&&Object.keys(e||{}).length===0,children:h.jsx(ywt,{workflows:s,legacyWorkflows:r,isLoading:t,onClickRow:i=>n(`/workflows/${i}/graph`)})})]})}const PQ=()=>{const{workflowId:e}=Cs(),t=xl(),{data:n,isLoading:r}=$4(e),{mutateAsync:s}=pSt(e);return h.jsx(U0e,{workflowId:e,workflow:n,isLoading:r,onShowTrace:({runId:i,stepName:o})=>{t(`/workflows/${e}/traces?runId=${i}&stepName=${o}`)},onSendEvent:s})};function qCt({runId:e}){const{logs:t,isLoading:n,refetchLogs:r}=Ebe(e);return h.jsxs("div",{className:"h-full px-4 pb-4 text-xs w-full overflow-y-auto",children:[h.jsx("div",{className:"flex justify-end sticky top-0 py-2 overflow-y-auto",children:h.jsx(gu,{variant:"outline",onClick:()=>r(e),children:n?h.jsx(ww,{className:"w-4 h-4 animate-spin"}):h.jsx(ww,{className:"w-4 h-4"})})}),h.jsx("div",{className:"space-y-4 h-full overflow-y-auto",children:t.length===0?h.jsxs("p",{className:"text-gray-300/60",children:["No log drains. By default, logs are sent to the console. To configure log drains see"," ",h.jsx("a",{href:"https://mastra.ai/reference/observability/create-logger#upstash-logger-remote-log-drain",target:"_blank",rel:"noopener",className:" hover:text-gray-100 underline",children:"docs."})]}):t.map((s,i)=>h.jsxs("div",{className:"space-y-2",children:[h.jsxs("div",{className:"flex gap-2 items-center",children:[h.jsxs("p",{className:"text-mastra-el-5",children:["[",lo(new Date(s.time),"yyyy-MM-dd HH:mm:ss"),"]"]}),h.jsxs("p",{className:"text-mastra-el-4",children:["[",s.level,"]"]})]}),h.jsx("p",{className:"text-mastra-el-5 whitespace-pre-wrap",children:h.jsx("code",{children:s.msg})})]},i))})]})}const y1e=({workflowId:e})=>VC({queryKey:["workflow-runs",e],queryFn:()=>new LO({baseUrl:"",headers:{"x-mastra-dev-playground":"true"}}).getWorkflow(e).runs({limit:50})});function H4({workflowId:e,isLegacy:t}){const n=Cs(),r=xl(),{data:s,isLoading:i}=$4(e,!t),{isLoading:o,data:a}=y1e({workflowId:e}),{data:l,isLoading:c}=$B(e,!!t),{createWorkflowRun:u}=uSt(),{resumeWorkflow:d}=hSt(),{streamWorkflow:p,streamResult:g,isStreaming:b}=dSt(),{mutateAsync:x,isPending:S}=fSt(),[E,k]=A.useState(""),{handleCopy:T}=J1({text:e}),P=Object.keys((s==null?void 0:s.steps)??{}).length,M=t?c:i,j=t?l:s;return h.jsxs("div",{className:"grid grid-rows-[auto_1fr] h-full overflow-y-auto",children:[h.jsxs("div",{className:"p-5 border-b-sm border-border1",children:[h.jsxs("div",{className:"text-icon6 flex items-center gap-2",children:[h.jsx(ot,{size:"lg",className:"bg-surface4 rounded-md p-1",children:h.jsx(kc,{})}),M?h.jsx($n,{className:"h-3 w-1/3"}):h.jsx("div",{className:"flex items-center gap-4 min-w-0",children:h.jsx(Ue,{variant:"header-md",as:"h2",className:"font-medium truncate",children:j==null?void 0:j.name})})]}),h.jsxs("div",{className:"flex items-center gap-2 pt-2",children:[h.jsxs(Kl,{children:[h.jsx(Xl,{asChild:!0,children:h.jsx("button",{onClick:T,className:"h-badge-default",children:h.jsx(Un,{icon:h.jsx(cI,{}),variant:"default",children:e})})}),h.jsx(nl,{children:"Copy Workflow ID for use in code"})]}),h.jsxs(Un,{children:[P," step",P>1?"s":""]})]})]}),h.jsx("div",{className:"overflow-y-auto",children:h.jsxs(z4,{defaultValue:"run",className:"h-full grid grid-rows-[auto_1fr] overflow-y-auto",children:[h.jsxs(UC,{className:"flex shrink-0 border-b",children:[h.jsx(Ti,{value:"run",className:"group",onClick:()=>r(`/workflows/${e}/graph`),children:h.jsx("p",{className:"text-xs p-3 text-mastra-el-3 group-data-[state=active]:text-mastra-el-5 group-data-[state=active]:border-b-2 group-data-[state=active]:pb-2.5 border-white",children:"Run"})}),h.jsx(Ti,{value:"runs",className:"group",children:h.jsx("p",{className:"text-xs p-3 text-mastra-el-3 group-data-[state=active]:text-mastra-el-5 group-data-[state=active]:border-b-2 group-data-[state=active]:pb-2.5 border-white",children:"Runs"})}),h.jsx(Ti,{value:"logs",className:"group",children:h.jsx("p",{className:"text-xs p-3 text-mastra-el-3 group-data-[state=active]:text-mastra-el-5 group-data-[state=active]:border-b-2 group-data-[state=active]:pb-2.5 border-white",children:"Log Drains"})})]}),h.jsxs("div",{className:"h-full overflow-y-auto",children:[h.jsx(_i,{value:"run",children:e?h.jsx(h.Fragment,{children:t?h.jsx(cwt,{workflowId:e,setRunId:k}):h.jsx(fwt,{workflowId:e,setRunId:k,workflow:s,isLoading:i,createWorkflowRun:u.mutateAsync,streamWorkflow:p.mutateAsync,resumeWorkflow:d.mutateAsync,streamResult:g,isStreamingWorkflow:b,isResumingWorkflow:d.isPending,isCancellingWorkflowRun:S,cancelWorkflowRun:x})}):null}),h.jsx(_i,{value:"runs",children:h.jsx(mwt,{workflowId:e,runId:n==null?void 0:n.runId,isLoading:o,runs:(a==null?void 0:a.runs)||[],onPressRun:({workflowId:F,runId:I})=>r(`/workflows/${F}/graph/${I}`)})}),h.jsx(_i,{value:"logs",children:h.jsx(qCt,{runId:E})})]})]})})]})}function GCt(){const{workflowId:e}=Cs();return h.jsxs("main",{className:"flex-1 relative divide-x flex w-full h-full",children:[h.jsx("div",{className:"min-w-[325px] grow",children:h.jsx(Mvt,{workflowId:e})}),h.jsx(CB,{defaultWidth:20,minimumWidth:20,maximumWidth:60,className:"flex flex-col min-w-[325px] right-0 top-0 h-full z-20 bg-[#121212] [&>div:first-child]:-left-[1px] [&>div:first-child]:-right-[1px] [&>div:first-child]:w-[1px] [&>div:first-child]:bg-[#424242] [&>div:first-child]:hover:w-[2px] [&>div:first-child]:active:w-[2px]",children:h.jsx(H4,{workflowId:e,isLegacy:!0})})]})}function YCt(){const{workflowId:e}=Cs(),[t]=zSe(),n=t.get("runId"),r=t.get("stepName"),{data:s,isLoading:i}=$4(e),{traces:o,error:a,firstCallLoading:l}=qB((s==null?void 0:s.name)||"",!0);return i||l?h.jsxs("main",{className:"flex-1 relative grid grid-cols-[1fr_325px] divide-x h-full",children:[h.jsx("div",{className:"p-4",children:h.jsx($n,{className:"h-[600px]"})}),h.jsx("div",{className:"flex flex-col",children:h.jsx(H4,{workflowId:e})})]}):h.jsx(Y0e,{traces:o,error:a,runId:n||void 0,stepName:r||void 0})}function KCt(){const{workflowId:e}=Cs(),{data:t,isLoading:n}=$B(e),{traces:r,error:s,firstCallLoading:i}=qB((t==null?void 0:t.name)||"",!0);return n||i?h.jsxs("main",{className:"flex-1 relative grid grid-cols-[1fr_325px] divide-x h-full",children:[h.jsx("div",{className:"p-4",children:h.jsx($n,{className:"h-[600px]"})}),h.jsx("div",{className:"flex flex-col",children:h.jsx(H4,{workflowId:e,isLegacy:!0})})]}):h.jsx(Y0e,{traces:r,error:s})}const XCt=()=>{const[e,t]=A.useState([]),[n,r]=A.useState(!0);return A.useEffect(()=>{(async()=>{r(!0);try{const i=await Dn.getNetworks();t(i)}catch(i){t([]),console.error("Error fetching networks",i),Nr.error("Error fetching networks")}finally{r(!1)}})()},[]),{networks:e,isLoading:n}},KB=(e,t=!0)=>{const[n,r]=A.useState(null),[s,i]=A.useState(!0);return A.useEffect(()=>{e&&t&&(async()=>{i(!0);try{const a=Dn.getNetwork(e);r(await a.details())}catch(a){r(null),console.error("Error fetching network",a),Nr.error("Error fetching network")}finally{i(!1)}})()},[e,t]),{network:n,isLoading:s}},JCt=()=>{const[e,t]=A.useState([]),[n,r]=A.useState(!0);return A.useEffect(()=>{(async()=>{r(!0);try{const i=await Dn.getVNextNetworks();t(i)}catch(i){t([]),console.error("Error fetching networks",i),Nr.error("Error fetching networks")}finally{r(!1)}})()},[]),{vNextNetworks:e,isLoading:n}},XB=(e,t=!0)=>{const[n,r]=A.useState(null),[s,i]=A.useState(!0);return A.useEffect(()=>{e&&t&&(async()=>{i(!0);try{const a=Dn.getVNextNetwork(e);r(await a.details())}catch(a){r(null),console.error("Error fetching network",a),Nr.error("Error fetching network")}finally{i(!1)}})()},[e,t]),{vNextNetwork:n,isLoading:s}};function ZCt(){const e=xl(),{networks:t,isLoading:n}=XCt(),{vNextNetworks:r,isLoading:s}=JCt(),i=[...t,...r].length===0;return h.jsxs(yl,{children:[h.jsx(us,{children:h.jsx(Xu,{children:"Networks"})}),h.jsx(ho,{isCentered:i&&!n,children:h.jsx(bvt,{legacyNetworks:t,networks:r,isLoading:n||s,onClickRow:o=>e(`/networks/${o}/chat`)})})]})}function QCt({networkName:e,networkId:t}){return h.jsxs(us,{children:[h.jsxs(Yd,{children:[h.jsx(Vr,{as:Zt,to:"/networks",children:"Networks"}),h.jsx(Vr,{as:Zt,to:`/networks/${t}`,isCurrent:!0,children:e})]}),h.jsx(kB,{children:h.jsx(hn,{as:Zt,to:`/networks/${t}/chat`,children:"Chat"})})]})}const MQ=({children:e,isVNext:t})=>{const{networkId:n}=Cs(),{network:r,isLoading:s}=KB(n,!t),{vNextNetwork:i,isLoading:o}=XB(n,t),a=t?o:s,l=t?i:r;return h.jsxs(yl,{children:[a?h.jsx(us,{children:h.jsx(Xu,{children:h.jsx($n,{className:"h-6 w-[200px]"})})}):h.jsx(QCt,{networkName:l==null?void 0:l.name,networkId:n}),e]})},jQ=({children:e})=>{const{workflowId:t,runId:n}=Cs(),{data:r,isLoading:s}=$4(t),{data:i}=y1e({workflowId:t});if(s)return h.jsx(yl,{children:h.jsx(us,{children:h.jsx(Xu,{children:h.jsx($n,{className:"h-6 w-[200px]"})})})});const o=i==null?void 0:i.runs.find(a=>a.runId===n);return h.jsx(PB,{snapshot:typeof(o==null?void 0:o.snapshot)=="object"?o.snapshot:void 0,children:h.jsxs(yl,{children:[h.jsx(kbe,{workflowName:(r==null?void 0:r.name)||"",workflowId:t,runId:n}),e]})})},ekt=Tp("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function zv({className:e,variant:t,...n}){return h.jsx("div",{className:$t(ekt({variant:t}),e),...n})}const tkt=()=>h.jsxs("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.90625 13.7C12.0543 13.7 14.6062 11.148 14.6062 8C14.6062 4.85198 12.0543 2.3 8.90625 2.3C5.75823 2.3 3.20625 4.85198 3.20625 8C3.20625 11.148 5.75823 13.7 8.90625 13.7ZM8.90625 15C12.7722 15 15.9062 11.866 15.9062 8C15.9062 4.13401 12.7722 1 8.90625 1C5.04026 1 1.90625 4.13401 1.90625 8C1.90625 11.866 5.04026 15 8.90625 15Z",fill:"currentColor"}),h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.4652 10.2358C14.5313 12.8424 12.0391 14.707 9.11131 14.707C9.0617 14.707 9.01222 14.7065 8.96286 14.7054C8.2899 13.0924 7.99638 11.3949 8.24344 9.55135C8.32897 9.24542 8.44745 8.7986 8.42849 8.39404C8.41982 8.20891 8.21671 8.23135 8.16572 8.40953C8.10356 8.62678 8.01682 8.85452 7.90686 9.05582C7.7808 9.07647 7.61987 9.09091 7.41708 9.07898C6.77839 9.04141 6.30758 8.70811 6.207 8.60035C6.0243 8.68313 6.01285 8.74449 6.0019 8.80318C5.99501 8.8401 5.98832 8.87596 5.93935 8.91543L5.92431 8.92772C5.83552 9.00073 5.7706 9.05411 5.56668 8.74463C5.38324 8.38491 5.24798 7.85962 5.79957 7.29461C6.1277 6.9585 6.78378 6.68405 6.87725 6.66968C6.87725 6.13802 7.29396 5.17963 8.48684 4.84422C9.74529 4.49038 11.198 4.84991 12.0373 6.07673C12.5645 6.84745 12.6162 7.29277 12.6557 7.6326C12.6968 7.98678 12.7247 8.22638 13.2636 8.60035C13.4125 8.70365 13.5621 8.80449 13.7129 8.90615C14.2705 9.28209 14.8452 9.66951 15.4652 10.2358ZM8.8836 6.73288C9.08285 6.73288 9.24437 6.57136 9.24437 6.37211C9.24437 6.17286 9.08285 6.01134 8.8836 6.01134C8.68436 6.01134 8.52284 6.17286 8.52284 6.37211C8.52284 6.57136 8.68436 6.73288 8.8836 6.73288Z",fill:"currentColor"})]}),nkt=Tp("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Dd=A.forwardRef(({className:e,...t},n)=>h.jsx(WT,{ref:n,className:$t(nkt(),e),...t}));Dd.displayName=WT.displayName;const rkt=Yfe,skt=vL,ikt=SL,CF=A.forwardRef(({className:e,...t},n)=>h.jsxs(UT,{ref:n,className:$t("relative flex w-full touch-none select-none items-center",e),...t,children:[h.jsx(Tfe,{className:"relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20",children:h.jsx(_fe,{className:"absolute h-full bg-primary/50"})}),h.jsx(Nfe,{className:"block h-4 w-4 rounded-full border border-primary/50 bg-white shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"})]}));CF.displayName=UT.displayName;function okt({network:e,isVNext:t}){var l,c,u,d,p,g,b;const{modelSettings:n,setModelSettings:r,chatWithLoop:s,setChatWithLoop:i,maxIterations:o,setMaxIterations:a}=A.useContext($C);return h.jsx(Z1,{className:"pt-2 px-4 pb-4 text-xs",children:h.jsxs("div",{className:"p-4 space-y-4",children:[h.jsxs("div",{children:[h.jsx("h3",{className:"text-sm font-medium text-mastra-el-5 mb-1",children:"Network Name"}),h.jsx("p",{className:"text-sm text-mastra-el-4",children:e.name})]}),h.jsxs("div",{children:[h.jsx("h3",{className:"text-sm font-medium text-mastra-el-5 mb-1",children:"Instructions"}),h.jsx("div",{className:"max-h-36 overflow-auto rounded border border-mastra-el-2 bg-mastra-bg-2 p-2",children:h.jsx("p",{className:"text-sm text-mastra-el-4",children:e.instructions||"No instructions provided"})})]}),h.jsxs("div",{children:[h.jsx("h3",{className:"text-sm font-medium text-mastra-el-5 mb-1",children:"Agents"}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(tkt,{}),h.jsxs(zv,{variant:"outline",className:"text-xs",children:[((l=e.agents)==null?void 0:l.length)||0," agent",((c=e.agents)==null?void 0:c.length)===1?"":"s"]})]})]}),t&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{children:[h.jsx("h3",{className:"text-sm font-medium text-mastra-el-5 mb-1",children:"Workflows"}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(kc,{}),h.jsxs(zv,{variant:"outline",className:"text-xs",children:[((u=e.workflows)==null?void 0:u.length)||0," workflow",((d=e.workflows)==null?void 0:d.length)===1?"":"s"]})]})]}),h.jsxs("div",{children:[h.jsx("h3",{className:"text-sm font-medium text-mastra-el-5 mb-1",children:"Tools"}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(gl,{}),h.jsxs(zv,{variant:"outline",className:"text-xs",children:[((p=e.tools)==null?void 0:p.length)||0," tool",((g=e.tools)==null?void 0:g.length)===1?"":"s"]})]})]})]}),h.jsxs("div",{children:[h.jsx("h3",{className:"text-sm font-medium text-mastra-el-5 mb-1",children:"Routing Model"}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(fte,{className:"h-4 w-4 text-mastra-el-4"}),h.jsx(zv,{className:"border-none text-xs",children:((b=e.routingModel)==null?void 0:b.modelId)||"Unknown"})]})]}),h.jsxs("div",{children:[h.jsx("h3",{className:"text-sm font-medium text-mastra-el-5 mb-1",children:"Routing Model Settings"}),t?h.jsxs("div",{className:"flex flex-col gap-3 text-mastra-el-5 pb-4",children:[h.jsx(qm,{label:"Chat Method",children:h.jsxs(_4,{orientation:"horizontal",value:s?"loop":"stream",onValueChange:x=>i(x==="loop"),className:"flex flex-row gap-4",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(Lg,{value:"loop",id:"loop",className:"text-icon6"}),h.jsx(Dd,{className:"text-icon6 text-ui-md",htmlFor:"loop",children:"Loop"})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(Lg,{value:"stream",id:"stream",className:"text-icon6"}),h.jsx(Dd,{className:"text-icon6 text-ui-md",htmlFor:"stream",children:"Stream"})]})]})}),s&&h.jsx(qm,{label:"Max Iterations",children:h.jsx(Ad,{type:"number",value:o,onChange:x=>a(x.target.value?Number(x.target.value):void 0)})})]}):h.jsxs("div",{className:"flex flex-col gap-3 text-mastra-el-5 pb-4",children:[h.jsx(qm,{label:"Temperature",children:h.jsxs("div",{className:"flex flex-row justify-between items-center gap-2",children:[h.jsx(CF,{value:[(n==null?void 0:n.temperature)??.5],max:1,step:.1,onValueChange:x=>r({...n,temperature:x[0]})}),h.jsx(Ue,{as:"p",variant:"ui-sm",className:"text-icon3",children:(n==null?void 0:n.temperature)??"n/a"})]})}),h.jsx(qm,{label:"Top P",children:h.jsxs("div",{className:"flex flex-row justify-between items-center gap-2",children:[h.jsx(CF,{onValueChange:x=>r({...n,topP:x[0]}),value:[(n==null?void 0:n.topP)??1],max:1,step:.1}),h.jsx(Ue,{as:"p",variant:"ui-sm",className:"text-icon3",children:(n==null?void 0:n.topP)??"n/a"})]})}),h.jsxs(rkt,{children:[h.jsxs(skt,{className:"w-full group flex flex-row justify-between items-center pt-1 py-2",children:[h.jsx("span",{className:"text-mastra-el-3 text-[12px] group-hover:text-mastra-el-5",children:"Extended Settings"}),h.jsx(iCe,{className:"w-4 h-4 text-mastra-el-3 group-hover:text-mastra-el-5"})]}),h.jsxs(ikt,{className:"flex flex-col gap-2 pt-2",children:[h.jsxs("div",{className:"flex flex-col gap-2",children:[h.jsx(Dd,{className:"text-mastra-el-3 text-[12px]",children:"Top K"}),h.jsx(Ad,{type:"number",value:n==null?void 0:n.topK,onChange:x=>r({...n,topK:x.target.value?Number(x.target.value):void 0})})]}),h.jsxs("div",{className:"flex flex-col gap-2",children:[h.jsx(Dd,{className:"text-mastra-el-3 text-[12px]",children:"Frequency Penalty"}),h.jsx(Ad,{type:"number",value:n==null?void 0:n.frequencyPenalty,onChange:x=>r({...n,frequencyPenalty:x.target.value?Number(x.target.value):void 0})})]}),h.jsxs("div",{className:"flex flex-col gap-2",children:[h.jsx(Dd,{className:"text-mastra-el-3 text-[12px]",children:"Presence Penalty"}),h.jsx(Ad,{type:"number",value:n==null?void 0:n.presencePenalty,onChange:x=>r({...n,presencePenalty:x.target.value?Number(x.target.value):void 0})})]}),h.jsxs("div",{className:"flex flex-col gap-2",children:[h.jsx(Dd,{className:"text-mastra-el-3 text-[12px]",children:"Max Tokens"}),h.jsx(Ad,{type:"number",value:n==null?void 0:n.maxTokens,onChange:x=>r({...n,maxTokens:x.target.value?Number(x.target.value):void 0})})]}),h.jsxs("div",{className:"flex flex-col gap-2",children:[h.jsx(Dd,{className:"text-mastra-el-3 text-[12px]",children:"Max Steps"}),h.jsx(Ad,{type:"number",value:n==null?void 0:n.maxSteps,onChange:x=>r({...n,maxSteps:x.target.value?Number(x.target.value):void 0})})]}),h.jsxs("div",{className:"flex flex-col gap-2",children:[h.jsx(Dd,{className:"text-mastra-el-3 text-[12px]",children:"Max Retries"}),h.jsx(Ad,{type:"number",value:n==null?void 0:n.maxRetries,onChange:x=>r({...n,maxRetries:x.target.value?Number(x.target.value):void 0})})]})]})]}),h.jsx("div",{className:"flex flex-row justify-start gap-2",children:h.jsxs(gu,{title:"Reset",variant:"ghost",className:"h-max p-0 group w-max bg-transparent hover:bg-transparent flex flex-row items-center gap-2 text-[12px]",onClick:()=>r({frequencyPenalty:void 0,presencePenalty:void 0,maxRetries:2,maxSteps:5,maxTokens:void 0,temperature:.5,topP:1,topK:void 0}),children:[h.jsx("span",{className:"text-mastra-el-3 text-[12px] group-hover:text-mastra-el-5",children:"Reset"}),h.jsx(CCe,{className:"!w-3 !h-3 text-mastra-el-3 group-hover:text-mastra-el-5"})]})})]})]})]})})}function akt({network:e}){return!e.agents||e.agents.length===0?h.jsx("div",{className:"p-4",children:h.jsx("p",{className:"text-sm text-mastra-el-4",children:"No agents found in this network."})}):h.jsxs("div",{className:"p-4",children:[h.jsx("h3",{className:"text-sm font-medium text-mastra-el-5 mb-3",children:"Network Agents"}),h.jsx("div",{className:"space-y-3",children:e.agents.map((t,n)=>h.jsx("div",{className:"bg-mastra-bg-2 py-2 px-3 rounded-md",children:h.jsxs("div",{className:"flex justify-between items-center",children:[h.jsxs("div",{className:"flex gap-1 items-center",children:[h.jsx(fte,{className:"h-3 w-3 text-mastra-el-4"}),h.jsx("h4",{className:"text-xs font-medium text-mastra-el-5",children:t.name})]}),h.jsxs(zv,{className:"border-none text-xs py-0.5 px-1.5",children:[t.provider,"/",t.modelId]})]})},n))})]})}function lkt({networkId:e,isVNext:t}){return h.jsx(Z1,{className:"pt-2 px-4 pb-4 text-xs w-[400px]",children:h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[h.jsx("p",{className:"text-mastra-el-3",children:"GET"}),h.jsxs("p",{className:"text-mastra-el-5",children:["/api/networks",t?"/v-next":""]})]}),h.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[h.jsx("p",{className:"text-mastra-el-3",children:"GET"}),h.jsxs("p",{className:"text-mastra-el-5",children:["/api/networks",t?"/v-next":"","/",e]})]}),h.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[h.jsx("p",{className:"text-mastra-el-3",children:"POST"}),h.jsxs("p",{className:"text-mastra-el-5",children:["/api/networks",t?"/v-next":"","/",e,"/generate"]})]}),h.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[h.jsx("p",{className:"text-mastra-el-3",children:"POST"}),h.jsxs("p",{className:"text-mastra-el-5",children:["/api/networks",t?"/v-next":"","/",e,"/stream"]})]}),t?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[h.jsx("p",{className:"text-mastra-el-3",children:"POST"}),h.jsxs("p",{className:"text-mastra-el-5",children:["/api/networks/v-next/",e,"/loop"]})]}),h.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[h.jsx("p",{className:"text-mastra-el-3",children:"POST"}),h.jsxs("p",{className:"text-mastra-el-5",children:["/api/networks/v-next/",e,"/loop-stream"]})]})]}):null]})})}function ckt({network:e}){return!e.workflows||e.workflows.length===0?h.jsx("div",{className:"p-4",children:h.jsx("p",{className:"text-sm text-mastra-el-4",children:"No workflows found in this network."})}):h.jsxs("div",{className:"p-4",children:[h.jsx("h3",{className:"text-sm font-medium text-mastra-el-5 mb-3",children:"Network Workflows"}),h.jsx("div",{className:"space-y-3",children:e.workflows.map(t=>h.jsx("div",{className:"bg-mastra-bg-2 py-2 px-3 rounded-md",children:h.jsxs("div",{className:"flex justify-between items-center",children:[h.jsxs("div",{className:"flex gap-1 items-center",children:[h.jsx(kc,{className:"h-3 w-3 text-mastra-el-4"}),h.jsx("h4",{className:"text-xs font-medium text-mastra-el-5",children:t.name})]}),h.jsx("p",{className:"text-xs py-0.5 px-1.5 w-3/4 truncate",children:t.description})]})},t.name))})]})}function ukt({network:e}){return!e.tools||e.tools.length===0?h.jsx("div",{className:"p-4",children:h.jsx("p",{className:"text-sm text-mastra-el-4",children:"No tools found in this network."})}):h.jsxs("div",{className:"p-4",children:[h.jsx("h3",{className:"text-sm font-medium text-mastra-el-5 mb-3",children:"Network Tools"}),h.jsx("div",{className:"space-y-3",children:e.tools.map(t=>h.jsx("div",{className:"bg-mastra-bg-2 py-2 px-3 rounded-md",children:h.jsxs("div",{className:"flex justify-between items-center",children:[h.jsxs("div",{className:"flex gap-1 items-center",children:[h.jsx(gl,{className:"h-3 w-3 text-mastra-el-4"}),h.jsx("h4",{className:"text-xs font-medium text-mastra-el-5",children:t.id})]}),h.jsx("p",{className:"text-xs py-0.5 px-1.5 w-3/4 truncate",children:t.description})]})},t.id))})]})}function kF({networkId:e,isVNext:t}){const{network:n,isLoading:r}=KB(e,!t),{vNextNetwork:s,isLoading:i}=XB(e,t),o=t?s:n;return!o||(t?i:r)?null:h.jsxs(z4,{defaultValue:"details",className:"overflow-y-auto grid grid-rows-[auto_1fr] h-full",children:[h.jsxs(UC,{className:"flex shrink-0 border-b",children:[h.jsx(Ti,{value:"details",className:"group",children:h.jsx("p",{className:"text-xs p-3 text-mastra-el-3 group-data-[state=active]:text-mastra-el-5 group-data-[state=active]:border-b-2 group-data-[state=active]:pb-2.5 border-white",children:"Details"})}),h.jsx(Ti,{value:"agents",className:"group",children:h.jsx("p",{className:"text-xs p-3 text-mastra-el-3 group-data-[state=active]:text-mastra-el-5 group-data-[state=active]:border-b-2 group-data-[state=active]:pb-2.5 border-white",children:"Agents"})}),t?h.jsxs(h.Fragment,{children:[h.jsx(Ti,{value:"workflows",className:"group",children:h.jsx("p",{className:"text-xs p-3 text-mastra-el-3 group-data-[state=active]:text-mastra-el-5 group-data-[state=active]:border-b-2 group-data-[state=active]:pb-2.5 border-white",children:"Workflows"})}),h.jsx(Ti,{value:"tools",className:"group",children:h.jsx("p",{className:"text-xs p-3 text-mastra-el-3 group-data-[state=active]:text-mastra-el-5 group-data-[state=active]:border-b-2 group-data-[state=active]:pb-2.5 border-white",children:"Tools"})})]}):null,h.jsx(Ti,{value:"endpoints",className:"group",children:h.jsx("p",{className:"text-xs p-3 text-mastra-el-3 group-data-[state=active]:text-mastra-el-5 group-data-[state=active]:border-b-2 group-data-[state=active]:pb-2.5 border-white",children:"Endpoints"})})]}),h.jsxs("div",{className:"overflow-y-auto",children:[h.jsx(_i,{value:"details",children:h.jsx(okt,{network:o,isVNext:t})}),h.jsx(_i,{value:"agents",children:h.jsx(akt,{network:o})}),t?h.jsxs(h.Fragment,{children:[h.jsx(_i,{value:"workflows",children:h.jsx(ckt,{network:o})}),h.jsx(_i,{value:"tools",children:h.jsx(ukt,{network:o})})]}):null,h.jsx(_i,{value:"endpoints",children:h.jsx(lkt,{networkId:e,isVNext:t})})]})]})}function dkt(){const{networkId:e,threadId:t}=Cs(),{network:n,isLoading:r}=KB(e),{messages:s,isLoading:i}=p1e({agentId:e,threadId:t,memory:!1});return r?h.jsxs(ho,{isDivided:!0,children:[h.jsx("div",{}),h.jsx("div",{className:"flex flex-col",children:h.jsx(kF,{networkId:e})})]}):h.jsx(O0e,{children:h.jsxs(ho,{isDivided:!0,children:[h.jsx("div",{className:"grid overflow-y-auto relative bg-surface1 py-4",children:h.jsx(Rxt,{agentId:e,agentName:n==null?void 0:n.name,threadId:t,initialMessages:i?void 0:s})}),h.jsx("div",{className:"border-l-sm h-full overflow-y-auto",children:h.jsx(kF,{networkId:e})})]})})}var Ne=typeof window<"u"?window:void 0,Lo=typeof globalThis<"u"?globalThis:Ne,b1e=Array.prototype,FQ=b1e.forEach,IQ=b1e.indexOf,wa=Lo==null?void 0:Lo.navigator,Ct=Lo==null?void 0:Lo.document,Po=Lo==null?void 0:Lo.location,EF=Lo==null?void 0:Lo.fetch,DF=Lo!=null&&Lo.XMLHttpRequest&&"withCredentials"in new Lo.XMLHttpRequest?Lo.XMLHttpRequest:void 0,OQ=Lo==null?void 0:Lo.AbortController,ko=wa==null?void 0:wa.userAgent,Xt=Ne??{},Rd={DEBUG:!1,LIB_VERSION:"1.257.0"},v7="$copy_autocapture",hkt=["$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"],Vd=function(e){return e.GZipJS="gzip-js",e.Base64="base64",e}({}),fkt=["fatal","error","warning","log","info","debug"];function xn(e,t){return e.indexOf(t)!==-1}var V4=function(e){return e.trim()},AF=function(e){return e.replace(/^\$/,"")},pkt=Array.isArray,x1e=Object.prototype,v1e=x1e.hasOwnProperty,U4=x1e.toString,Fr=pkt||function(e){return U4.call(e)==="[object Array]"},cl=e=>typeof e=="function",Jr=e=>e===Object(e)&&!Fr(e),B0=e=>{if(Jr(e)){for(var t in e)if(v1e.call(e,t))return!1;return!0}return!1},lt=e=>e===void 0,Qr=e=>U4.call(e)=="[object String]",TF=e=>Qr(e)&&e.trim().length===0,Hp=e=>e===null,Yn=e=>lt(e)||Hp(e),Di=e=>U4.call(e)=="[object Number]",hu=e=>U4.call(e)==="[object Boolean]",mkt=e=>e instanceof FormData,gkt=e=>xn(hkt,e),w1e=e=>{var t={t:function(n){if(Ne&&(Rd.DEBUG||Xt.POSTHOG_DEBUG)&&!lt(Ne.console)&&Ne.console){for(var r=("__rrweb_original__"in Ne.console[n])?Ne.console[n].__rrweb_original__:Ne.console[n],s=arguments.length,i=new Array(s>1?s-1:0),o=1;o<s;o++)i[o-1]=arguments[o];r(e,...i)}},info:function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];t.t("log",...r)},warn:function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];t.t("warn",...r)},error:function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];t.t("error",...r)},critical:function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];console.error(e,...r)},uninitializedWarning:n=>{t.error("You must initialize PostHog before calling "+n)},createLogger:n=>w1e(e+" "+n)};return t},kt=w1e("[PostHog.js]"),ei=kt.createLogger,ykt=ei("[ExternalScriptsLoader]"),RQ=(e,t,n)=>{if(e.config.disable_external_dependency_loading)return ykt.warn(t+" was requested but loading of external scripts is disabled."),n("Loading of external scripts is disabled");var r=Ct==null?void 0:Ct.querySelectorAll("script");if(r){for(var s=0;s<r.length;s++)if(r[s].src===t)return n()}var i=()=>{if(!Ct)return n("document not found");var o=Ct.createElement("script");if(o.type="text/javascript",o.crossOrigin="anonymous",o.src=t,o.onload=c=>n(void 0,c),o.onerror=c=>n(c),e.config.prepare_external_dependency_script&&(o=e.config.prepare_external_dependency_script(o)),!o)return n("prepare_external_dependency_script returned null");var a,l=Ct.querySelectorAll("body > script");l.length>0?(a=l[0].parentNode)==null||a.insertBefore(o,l[0]):Ct.body.appendChild(o)};Ct!=null&&Ct.body?i():Ct==null||Ct.addEventListener("DOMContentLoaded",i)};function gt(){return gt=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},gt.apply(null,arguments)}function S1e(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}Xt.__PosthogExtensions__=Xt.__PosthogExtensions__||{},Xt.__PosthogExtensions__.loadExternalDependency=(e,t,n)=>{var r="/static/"+t+".js?v="+e.version;if(t==="remote-config"&&(r="/array/"+e.config.token+"/config.js"),t==="toolbar"){var s=3e5;r=r+"&t="+Math.floor(Date.now()/s)*s}var i=e.requestRouter.endpointFor("assets",r);RQ(e,i,n)},Xt.__PosthogExtensions__.loadSiteApp=(e,t,n)=>{var r=e.requestRouter.endpointFor("api",t);RQ(e,r,n)};var cA={};function ap(e,t,n){if(Fr(e)){if(FQ&&e.forEach===FQ)e.forEach(t,n);else if("length"in e&&e.length===+e.length){for(var r=0,s=e.length;r<s;r++)if(r in e&&t.call(n,e[r],r)===cA)return}}}function ur(e,t,n){if(!Yn(e)){if(Fr(e))return ap(e,t,n);if(mkt(e)){for(var r of e.entries())if(t.call(n,r[1],r[0])===cA)return}else for(var s in e)if(v1e.call(e,s)&&t.call(n,e[s],s)===cA)return}}var os=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return ap(n,function(s){for(var i in s)s[i]!==void 0&&(e[i]=s[i])}),e},W4=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return ap(n,function(s){ap(s,function(i){e.push(i)})}),e};function bD(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r}var LQ=function(e){try{return e()}catch{return}},bkt=function(e){return function(){try{for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(this,n)}catch(s){kt.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),kt.critical(s)}}},JB=function(e){var t={};return ur(e,function(n,r){(Qr(n)&&n.length>0||Di(n))&&(t[r]=n)}),t};function xkt(e,t){return n=e,r=i=>Qr(i)&&!Hp(t)?i.slice(0,t):i,s=new Set,function i(o,a){return o!==Object(o)?r?r(o,a):o:s.has(o)?void 0:(s.add(o),Fr(o)?(l=[],ap(o,c=>{l.push(i(c))})):(l={},ur(o,(c,u)=>{s.has(c)||(l[u]=i(c,u))})),l);var l}(n);var n,r,s}var vkt=["herokuapp.com","vercel.app","netlify.app"];function wkt(e){var t=e==null?void 0:e.hostname;if(!Qr(t))return!1;var n=t.split(".").slice(-2).join(".");for(var r of vkt)if(n===r)return!1;return!0}function C1e(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]}function Ur(e,t,n,r){var{capture:s=!1,passive:i=!0}=r??{};e==null||e.addEventListener(t,n,{capture:s,passive:i})}var k1e="$people_distinct_id",Hv="__alias",Vv="__timers",BQ="$autocapture_disabled_server_side",_F="$heatmaps_enabled_server_side",$Q="$exception_capture_enabled_server_side",NF="$error_tracking_suppression_rules",zQ="$web_vitals_enabled_server_side",E1e="$dead_clicks_enabled_server_side",HQ="$web_vitals_allowed_metrics",PF="$session_recording_enabled_server_side",VQ="$console_log_recording_enabled_server_side",UQ="$session_recording_network_payload_capture",WQ="$session_recording_masking",qQ="$session_recording_canvas_recording",GQ="$replay_sample_rate",YQ="$replay_minimum_duration",KQ="$replay_script_config",uA="$sesid",Uv="$session_is_sampled",MF="$session_recording_url_trigger_activated_session",jF="$session_recording_event_trigger_activated_session",$0="$enabled_feature_flags",xD="$early_access_features",FF="$feature_flag_details",Wv="$stored_person_properties",Fm="$stored_group_properties",IF="$surveys",wE="$surveys_activated",dA="$flag_call_reported",Pd="$user_state",OF="$client_session_props",RF="$capture_rate_limit",LF="$initial_campaign_params",BF="$initial_referrer_info",hA="$initial_person_info",fA="$epp",D1e="__POSTHOG_TOOLBAR__",SE="$posthog_cookieless",Skt=[k1e,Hv,"__cmpns",Vv,PF,_F,uA,$0,NF,Pd,xD,FF,Fm,Wv,IF,dA,OF,RF,LF,BF,fA,hA];function XQ(e){return e instanceof Element&&(e.id===D1e||!(e.closest==null||!e.closest(".toolbar-global-fade-container")))}function q4(e){return!!e&&e.nodeType===1}function lp(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function A1e(e){return!!e&&e.nodeType===3}function T1e(e){return!!e&&e.nodeType===11}function ZB(e){return e?V4(e).split(/\s+/):[]}function JQ(e){var t=Ne==null?void 0:Ne.location.href;return!!(t&&e&&e.some(n=>t.match(n)))}function pA(e){var t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return ZB(t)}function _1e(e){return Yn(e)?null:V4(e).split(/(\s+)/).filter(t=>d1(t)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function G4(e){var t="";return zF(e)&&!M1e(e)&&e.childNodes&&e.childNodes.length&&ur(e.childNodes,function(n){var r;A1e(n)&&n.textContent&&(t+=(r=_1e(n.textContent))!==null&&r!==void 0?r:"")}),V4(t)}function N1e(e){return lt(e.target)?e.srcElement||null:(t=e.target)!=null&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}var $F=["a","button","form","input","select","textarea","label"];function P1e(e){var t=e.parentNode;return!(!t||!q4(t))&&t}function Ckt(e,t,n,r,s){var i,o,a;if(n===void 0&&(n=void 0),!Ne||!e||lp(e,"html")||!q4(e)||(i=n)!=null&&i.url_allowlist&&!JQ(n.url_allowlist)||(o=n)!=null&&o.url_ignorelist&&JQ(n.url_ignorelist))return!1;if((a=n)!=null&&a.dom_event_allowlist){var l=n.dom_event_allowlist;if(l&&!l.some(S=>t.type===S))return!1}for(var c=!1,u=[e],d=!0,p=e;p.parentNode&&!lp(p,"body");)if(T1e(p.parentNode))u.push(p.parentNode.host),p=p.parentNode.host;else{if(!(d=P1e(p)))break;if(r||$F.indexOf(d.tagName.toLowerCase())>-1)c=!0;else{var g=Ne.getComputedStyle(d);g&&g.getPropertyValue("cursor")==="pointer"&&(c=!0)}u.push(d),p=d}if(!function(S,E){var k=E==null?void 0:E.element_allowlist;if(lt(k))return!0;var T,P=function(j){if(k.some(F=>j.tagName.toLowerCase()===F))return{v:!0}};for(var M of S)if(T=P(M))return T.v;return!1}(u,n)||!function(S,E){var k=E==null?void 0:E.css_selector_allowlist;if(lt(k))return!0;var T,P=function(j){if(k.some(F=>j.matches(F)))return{v:!0}};for(var M of S)if(T=P(M))return T.v;return!1}(u,n))return!1;var b=Ne.getComputedStyle(e);if(b&&b.getPropertyValue("cursor")==="pointer"&&t.type==="click")return!0;var x=e.tagName.toLowerCase();switch(x){case"html":return!1;case"form":return(s||["submit"]).indexOf(t.type)>=0;case"input":case"select":case"textarea":return(s||["change","click"]).indexOf(t.type)>=0;default:return c?(s||["click"]).indexOf(t.type)>=0:(s||["click"]).indexOf(t.type)>=0&&($F.indexOf(x)>-1||e.getAttribute("contenteditable")==="true")}}function zF(e){for(var t=e;t.parentNode&&!lp(t,"body");t=t.parentNode){var n=pA(t);if(xn(n,"ph-sensitive")||xn(n,"ph-no-capture"))return!1}if(xn(pA(e),"ph-include"))return!0;var r=e.type||"";if(Qr(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var s=e.name||e.id||"";return!(Qr(s)&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(s.replace(/[^a-zA-Z0-9]/g,"")))}function M1e(e){return!!(lp(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||lp(e,"select")||lp(e,"textarea")||e.getAttribute("contenteditable")==="true")}var j1e="(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})",kkt=new RegExp("^(?:"+j1e+")$"),Ekt=new RegExp(j1e),F1e="\\d{3}-?\\d{2}-?\\d{4}",Dkt=new RegExp("^("+F1e+")$"),Akt=new RegExp("("+F1e+")");function d1(e,t){return t===void 0&&(t=!0),!(Yn(e)||Qr(e)&&(e=V4(e),(t?kkt:Ekt).test((e||"").replace(/[- ]/g,""))||(t?Dkt:Akt).test(e)))}function I1e(e){var t=G4(e);return d1(t=(t+" "+O1e(e)).trim())?t:""}function O1e(e){var t="";return e&&e.childNodes&&e.childNodes.length&&ur(e.childNodes,function(n){var r;if(n&&((r=n.tagName)==null?void 0:r.toLowerCase())==="span")try{var s=G4(n);t=(t+" "+s).trim(),n.childNodes&&n.childNodes.length&&(t=(t+" "+O1e(n)).trim())}catch(i){kt.error("[AutoCapture]",i)}}),t}function Tkt(e){return function(t){var n=t.map(r=>{var s,i,o="";if(r.tag_name&&(o+=r.tag_name),r.attr_class)for(var a of(r.attr_class.sort(),r.attr_class))o+="."+a.replace(/"/g,"");var l=gt({},r.text?{text:r.text}:{},{"nth-child":(s=r.nth_child)!==null&&s!==void 0?s:0,"nth-of-type":(i=r.nth_of_type)!==null&&i!==void 0?i:0},r.href?{href:r.href}:{},r.attr_id?{attr_id:r.attr_id}:{},r.attributes),c={};return bD(l).sort((u,d)=>{var[p]=u,[g]=d;return p.localeCompare(g)}).forEach(u=>{var[d,p]=u;return c[ZQ(d.toString())]=ZQ(p.toString())}),o+=":",o+=bD(c).map(u=>{var[d,p]=u;return d+'="'+p+'"'}).join("")});return n.join(";")}(function(t){return t.map(n=>{var r,s,i={text:(r=n.$el_text)==null?void 0:r.slice(0,400),tag_name:n.tag_name,href:(s=n.attr__href)==null?void 0:s.slice(0,2048),attr_class:_kt(n),attr_id:n.attr__id,nth_child:n.nth_child,nth_of_type:n.nth_of_type,attributes:{}};return bD(n).filter(o=>{var[a]=o;return a.indexOf("attr__")===0}).forEach(o=>{var[a,l]=o;return i.attributes[a]=l}),i})}(e))}function ZQ(e){return e.replace(/"|\\"/g,'\\"')}function _kt(e){var t=e.attr__class;return t?Fr(t)?t:ZB(t):void 0}class R1e{constructor(){this.clicks=[]}isRageClick(t,n,r){var s=this.clicks[this.clicks.length-1];if(s&&Math.abs(t-s.x)+Math.abs(n-s.y)<30&&r-s.timestamp<1e3){if(this.clicks.push({x:t,y:n,timestamp:r}),this.clicks.length===3)return!0}else this.clicks=[{x:t,y:n,timestamp:r}];return!1}}var Nkt=["localhost","127.0.0.1"],h1=e=>{var t=Ct==null?void 0:Ct.createElement("a");return lt(t)?null:(t.href=e,t)},Pkt=function(e,t){var n,r;t===void 0&&(t="&");var s=[];return ur(e,function(i,o){lt(i)||lt(o)||o==="undefined"||(n=encodeURIComponent((a=>a instanceof File)(i)?i.name:i.toString()),r=encodeURIComponent(o),s[s.length]=r+"="+n)}),s.join(t)},mA=function(e,t){for(var n,r=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),s=0;s<r.length;s++){var i=r[s].split("=");if(i[0]===t){n=i;break}}if(!Fr(n)||n.length<2)return"";var o=n[1];try{o=decodeURIComponent(o)}catch{kt.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")},QB=function(e,t,n){if(!e||!t||!t.length)return e;for(var r=e.split("#"),s=r[0]||"",i=r[1],o=s.split("?"),a=o[1],l=o[0],c=(a||"").split("&"),u=[],d=0;d<c.length;d++){var p=c[d].split("=");Fr(p)&&(t.includes(p[0])?u.push(p[0]+"="+n):u.push(c[d]))}var g=l;return a!=null&&(g+="?"+u.join("&")),i!=null&&(g+="#"+i),g},gA=function(e,t){var n=e.match(new RegExp(t+"=([^&]*)"));return n?n[1]:null},QQ=ei("[AutoCapture]");function w7(e,t){return t.length>e?t.slice(0,e)+"...":t}function Mkt(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!q4(t));return t}function jkt(e,t,n,r){var s=e.tagName.toLowerCase(),i={tag_name:s};$F.indexOf(s)>-1&&!n&&(s.toLowerCase()==="a"||s.toLowerCase()==="button"?i.$el_text=w7(1024,I1e(e)):i.$el_text=w7(1024,G4(e)));var o=pA(e);o.length>0&&(i.classes=o.filter(function(u){return u!==""})),ur(e.attributes,function(u){var d;if((!M1e(e)||["name","id","class","aria-label"].indexOf(u.name)!==-1)&&(r==null||!r.includes(u.name))&&!t&&d1(u.value)&&(d=u.name,!Qr(d)||d.substring(0,10)!=="_ngcontent"&&d.substring(0,7)!=="_nghost")){var p=u.value;u.name==="class"&&(p=ZB(p).join(" ")),i["attr__"+u.name]=w7(1024,p)}});for(var a=1,l=1,c=e;c=Mkt(c);)a++,c.tagName===e.tagName&&l++;return i.nth_child=a,i.nth_of_type=l,i}function Fkt(e,t){for(var n,r,{e:s,maskAllElementAttributes:i,maskAllText:o,elementAttributeIgnoreList:a,elementsChainAsString:l}=t,c=[e],u=e;u.parentNode&&!lp(u,"body");)T1e(u.parentNode)?(c.push(u.parentNode.host),u=u.parentNode.host):(c.push(u.parentNode),u=u.parentNode);var d,p=[],g={},b=!1,x=!1;if(ur(c,P=>{var M=zF(P);P.tagName.toLowerCase()==="a"&&(b=P.getAttribute("href"),b=M&&b&&d1(b)&&b),xn(pA(P),"ph-no-capture")&&(x=!0),p.push(jkt(P,i,o,a));var j=function(F){if(!zF(F))return{};var I={};return ur(F.attributes,function(B){if(B.name&&B.name.indexOf("data-ph-capture-attribute")===0){var L=B.name.replace("data-ph-capture-attribute-",""),W=B.value;L&&W&&d1(W)&&(I[L]=W)}}),I}(P);os(g,j)}),x)return{props:{},explicitNoCapture:x};if(o||(e.tagName.toLowerCase()==="a"||e.tagName.toLowerCase()==="button"?p[0].$el_text=I1e(e):p[0].$el_text=G4(e)),b){var S,E;p[0].attr__href=b;var k=(S=h1(b))==null?void 0:S.host,T=Ne==null||(E=Ne.location)==null?void 0:E.host;k&&T&&k!==T&&(d=b)}return{props:os({$event_type:s.type,$ce_version:1},l?{}:{$elements:p},{$elements_chain:Tkt(p)},(n=p[0])!=null&&n.$el_text?{$el_text:(r=p[0])==null?void 0:r.$el_text}:{},d&&s.type==="click"?{$external_click_url:d}:{},g)}}class Ikt{constructor(t){this.i=!1,this.o=null,this.rageclicks=new R1e,this.h=!1,this.instance=t,this.m=null}get S(){var t,n,r=Jr(this.instance.config.autocapture)?this.instance.config.autocapture:{};return r.url_allowlist=(t=r.url_allowlist)==null?void 0:t.map(s=>new RegExp(s)),r.url_ignorelist=(n=r.url_ignorelist)==null?void 0:n.map(s=>new RegExp(s)),r}$(){if(this.isBrowserSupported()){if(Ne&&Ct){var t=r=>{r=r||(Ne==null?void 0:Ne.event);try{this.k(r)}catch(s){QQ.error("Failed to capture event",s)}};if(Ur(Ct,"submit",t,{capture:!0}),Ur(Ct,"change",t,{capture:!0}),Ur(Ct,"click",t,{capture:!0}),this.S.capture_copied_text){var n=r=>{r=r||(Ne==null?void 0:Ne.event),this.k(r,v7)};Ur(Ct,"copy",n,{capture:!0}),Ur(Ct,"cut",n,{capture:!0})}}}else QQ.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.i&&(this.$(),this.i=!0)}onRemoteConfig(t){t.elementsChainAsString&&(this.h=t.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[BQ]:!!t.autocapture_opt_out}),this.o=!!t.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(t){this.m=t}getElementSelectors(t){var n,r=[];return(n=this.m)==null||n.forEach(s=>{var i=Ct==null?void 0:Ct.querySelectorAll(s);i==null||i.forEach(o=>{t===o&&r.push(s)})}),r}get isEnabled(){var t,n,r=(t=this.instance.persistence)==null?void 0:t.props[BQ],s=this.o;if(Hp(s)&&!hu(r)&&!this.instance.I())return!1;var i=(n=this.o)!==null&&n!==void 0?n:!!r;return!!this.instance.config.autocapture&&!i}k(t,n){if(n===void 0&&(n="$autocapture"),this.isEnabled){var r,s=N1e(t);A1e(s)&&(s=s.parentNode||null),n==="$autocapture"&&t.type==="click"&&t instanceof MouseEvent&&this.instance.config.rageclick&&(r=this.rageclicks)!=null&&r.isRageClick(t.clientX,t.clientY,new Date().getTime())&&this.k(t,"$rageclick");var i=n===v7;if(s&&Ckt(s,t,this.S,i,i?["copy","cut"]:void 0)){var{props:o,explicitNoCapture:a}=Fkt(s,{e:t,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.S.element_attribute_ignorelist,elementsChainAsString:this.h});if(a)return!1;var l=this.getElementSelectors(s);if(l&&l.length>0&&(o.$element_selectors=l),n===v7){var c,u=_1e(Ne==null||(c=Ne.getSelection())==null?void 0:c.toString()),d=t.type||"clipboard";if(!u)return!1;o.$selected_content=u,o.$copy_type=d}return this.instance.capture(n,o),!0}}}isBrowserSupported(){return cl(Ct==null?void 0:Ct.querySelectorAll)}}Math.trunc||(Math.trunc=function(e){return e<0?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return Di(e)&&isFinite(e)&&Math.floor(e)===e});var eee="0123456789abcdef";class yA{constructor(t){if(this.bytes=t,t.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(t,n,r,s){if(!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(r)||!Number.isInteger(s)||t<0||n<0||r<0||s<0||t>0xffffffffffff||n>4095||r>1073741823||s>4294967295)throw new RangeError("invalid field value");var i=new Uint8Array(16);return i[0]=t/Math.pow(2,40),i[1]=t/Math.pow(2,32),i[2]=t/Math.pow(2,24),i[3]=t/Math.pow(2,16),i[4]=t/Math.pow(2,8),i[5]=t,i[6]=112|n>>>8,i[7]=n,i[8]=128|r>>>24,i[9]=r>>>16,i[10]=r>>>8,i[11]=r,i[12]=s>>>24,i[13]=s>>>16,i[14]=s>>>8,i[15]=s,new yA(i)}toString(){for(var t="",n=0;n<this.bytes.length;n++)t=t+eee.charAt(this.bytes[n]>>>4)+eee.charAt(15&this.bytes[n]),n!==3&&n!==5&&n!==7&&n!==9||(t+="-");if(t.length!==36)throw new Error("Invalid UUIDv7 was generated");return t}clone(){return new yA(this.bytes.slice(0))}equals(t){return this.compareTo(t)===0}compareTo(t){for(var n=0;n<16;n++){var r=this.bytes[n]-t.bytes[n];if(r!==0)return Math.sign(r)}return 0}}class Okt{constructor(){this.P=0,this.R=0,this.T=new Rkt}generate(){var t=this.generateOrAbort();if(lt(t)){this.P=0;var n=this.generateOrAbort();if(lt(n))throw new Error("Could not generate UUID after timestamp reset");return n}return t}generateOrAbort(){var t=Date.now();if(t>this.P)this.P=t,this.M();else{if(!(t+1e4>this.P))return;this.R++,this.R>4398046511103&&(this.P++,this.M())}return yA.fromFieldsV7(this.P,Math.trunc(this.R/Math.pow(2,30)),this.R&Math.pow(2,30)-1,this.T.nextUint32())}M(){this.R=1024*this.T.nextUint32()+(1023&this.T.nextUint32())}}var tee,L1e=e=>{if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var t=0;t<e.length;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};Ne&&!lt(Ne.crypto)&&crypto.getRandomValues&&(L1e=e=>crypto.getRandomValues(e));class Rkt{constructor(){this.C=new Uint32Array(8),this.F=1/0}nextUint32(){return this.F>=this.C.length&&(L1e(this.C),this.F=0),this.C[this.F++]}}var ep=()=>Lkt().toString(),Lkt=()=>(tee||(tee=new Okt)).generate(),Av="",Bkt=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i;function $kt(e,t){if(t){var n=function(s,i){if(i===void 0&&(i=Ct),Av)return Av;if(!i||["localhost","127.0.0.1"].includes(s))return"";for(var o=s.split("."),a=Math.min(o.length,8),l="dmn_chk_"+ep();!Av&&a--;){var c=o.slice(a).join("."),u=l+"=1;domain=."+c+";path=/";i.cookie=u+";max-age=3",i.cookie.includes(l)&&(i.cookie=u+";max-age=0",Av=c)}return Av}(e);if(!n){var r=(s=>{var i=s.match(Bkt);return i?i[0]:""})(e);r!==n&&kt.info("Warning: cookie subdomain discovery mismatch",r,n),n=r}return n?"; domain=."+n:""}return""}var Su={O:()=>!!Ct,A:function(e){kt.error("cookieStore error: "+e)},D:function(e){if(Ct){try{for(var t=e+"=",n=Ct.cookie.split(";").filter(i=>i.length),r=0;r<n.length;r++){for(var s=n[r];s.charAt(0)==" ";)s=s.substring(1,s.length);if(s.indexOf(t)===0)return decodeURIComponent(s.substring(t.length,s.length))}}catch{}return null}},L:function(e){var t;try{t=JSON.parse(Su.D(e))||{}}catch{}return t},j:function(e,t,n,r,s){if(Ct)try{var i="",o="",a=$kt(Ct.location.hostname,r);if(n){var l=new Date;l.setTime(l.getTime()+24*n*60*60*1e3),i="; expires="+l.toUTCString()}s&&(o="; secure");var c=e+"="+encodeURIComponent(JSON.stringify(t))+i+"; SameSite=Lax; path=/"+a+o;return c.length>3686.4&&kt.warn("cookieStore warning: large cookie, len="+c.length),Ct.cookie=c,c}catch{return}},N:function(e,t){try{Su.j(e,"",-1,t)}catch{return}}},S7=null,js={O:function(){if(!Hp(S7))return S7;var e=!0;if(lt(Ne))e=!1;else try{var t="__mplssupport__";js.j(t,"xyz"),js.D(t)!=='"xyz"'&&(e=!1),js.N(t)}catch{e=!1}return e||kt.error("localStorage unsupported; falling back to cookie store"),S7=e,e},A:function(e){kt.error("localStorage error: "+e)},D:function(e){try{return Ne==null?void 0:Ne.localStorage.getItem(e)}catch(t){js.A(t)}return null},L:function(e){try{return JSON.parse(js.D(e))||{}}catch{}return null},j:function(e,t){try{Ne==null||Ne.localStorage.setItem(e,JSON.stringify(t))}catch(n){js.A(n)}},N:function(e){try{Ne==null||Ne.localStorage.removeItem(e)}catch(t){js.A(t)}}},zkt=["distinct_id",uA,Uv,fA,hA],CE=gt({},js,{L:function(e){try{var t={};try{t=Su.L(e)||{}}catch{}var n=os(t,JSON.parse(js.D(e)||"{}"));return js.j(e,n),n}catch{}return null},j:function(e,t,n,r,s,i){try{js.j(e,t,void 0,void 0,i);var o={};zkt.forEach(a=>{t[a]&&(o[a]=t[a])}),Object.keys(o).length&&Su.j(e,o,n,r,s,i)}catch(a){js.A(a)}},N:function(e,t){try{Ne==null||Ne.localStorage.removeItem(e),Su.N(e,t)}catch(n){js.A(n)}}}),kE={},Hkt={O:function(){return!0},A:function(e){kt.error("memoryStorage error: "+e)},D:function(e){return kE[e]||null},L:function(e){return kE[e]||null},j:function(e,t){kE[e]=t},N:function(e){delete kE[e]}},Cm=null,ai={O:function(){if(!Hp(Cm))return Cm;if(Cm=!0,lt(Ne))Cm=!1;else try{var e="__support__";ai.j(e,"xyz"),ai.D(e)!=='"xyz"'&&(Cm=!1),ai.N(e)}catch{Cm=!1}return Cm},A:function(e){kt.error("sessionStorage error: ",e)},D:function(e){try{return Ne==null?void 0:Ne.sessionStorage.getItem(e)}catch(t){ai.A(t)}return null},L:function(e){try{return JSON.parse(ai.D(e))||null}catch{}return null},j:function(e,t){try{Ne==null||Ne.sessionStorage.setItem(e,JSON.stringify(t))}catch(n){ai.A(n)}},N:function(e){try{Ne==null||Ne.sessionStorage.removeItem(e)}catch(t){ai.A(t)}}},h0=function(e){return e[e.PENDING=-1]="PENDING",e[e.DENIED=0]="DENIED",e[e.GRANTED=1]="GRANTED",e}({});class Vkt{constructor(t){this._instance=t}get S(){return this._instance.config}get consent(){return this.U()?h0.DENIED:this.q}isOptedOut(){return this.consent===h0.DENIED||this.consent===h0.PENDING&&this.S.opt_out_capturing_by_default}isOptedIn(){return!this.isOptedOut()}optInOut(t){this.B.j(this.H,t?1:0,this.S.cookie_expiration,this.S.cross_subdomain_cookie,this.S.secure_cookie)}reset(){this.B.N(this.H,this.S.cross_subdomain_cookie)}get H(){var{token:t,opt_out_capturing_cookie_prefix:n}=this._instance.config;return(n||"__ph_opt_in_out_")+t}get q(){var t=this.B.D(this.H);return t==="1"?h0.GRANTED:t==="0"?h0.DENIED:h0.PENDING}get B(){if(!this.W){var t=this.S.opt_out_capturing_persistence_type;this.W=t==="localStorage"?js:Su;var n=t==="localStorage"?Su:js;n.D(this.H)&&(this.W.D(this.H)||this.optInOut(n.D(this.H)==="1"),n.N(this.H,this.S.cross_subdomain_cookie))}return this.W}U(){return!!this.S.respect_dnt&&!!C1e([wa==null?void 0:wa.doNotTrack,wa==null?void 0:wa.msDoNotTrack,Xt.doNotTrack],t=>xn([!0,1,"1","yes"],t))}}var EE=ei("[Dead Clicks]"),Ukt=()=>!0,Wkt=e=>{var t,n=!((t=e.instance.persistence)==null||!t.get_property(E1e)),r=e.instance.config.capture_dead_clicks;return hu(r)?r:n};class B1e{get lazyLoadedDeadClicksAutocapture(){return this.G}constructor(t,n,r){this.instance=t,this.isEnabled=n,this.onCapture=r,this.startIfEnabled()}onRemoteConfig(t){this.instance.persistence&&this.instance.persistence.register({[E1e]:t==null?void 0:t.captureDeadClicks}),this.startIfEnabled()}startIfEnabled(){this.isEnabled(this)&&this.J(()=>{this.V()})}J(t){var n,r;(n=Xt.__PosthogExtensions__)!=null&&n.initDeadClicksAutocapture&&t(),(r=Xt.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this.instance,"dead-clicks-autocapture",s=>{s?EE.error("failed to load script",s):t()})}V(){var t;if(Ct){if(!this.G&&(t=Xt.__PosthogExtensions__)!=null&&t.initDeadClicksAutocapture){var n=Jr(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};n.__onCapture=this.onCapture,this.G=Xt.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,n),this.G.start(Ct),EE.info("starting...")}}else EE.error("`document` not found. Cannot start.")}stop(){this.G&&(this.G.stop(),this.G=void 0,EE.info("stopping..."))}}function Sa(e,t,n,r,s){return t>n&&(kt.warn("min cannot be greater than max."),t=n),Di(e)?e>n?(r&&kt.warn(r+" cannot be greater than max: "+n+". Using max value instead."),n):e<t?(r&&kt.warn(r+" cannot be less than min: "+t+". Using min value instead."),t):e:(r&&kt.warn(r+" must be a number. using max or fallback. max: "+n+", fallback: "+s),Sa(s||n,t,n,r))}class $1e{constructor(t){this.K={},this.Y=()=>{Object.keys(this.K).forEach(n=>{var r=this.X(n)+this.Z;r>=this.tt?delete this.K[n]:this.it(n,r)})},this.X=n=>this.K[String(n)],this.it=(n,r)=>{this.K[String(n)]=r},this.consumeRateLimit=n=>{var r,s=(r=this.X(n))!==null&&r!==void 0?r:this.tt;if((s=Math.max(s-1,0))===0)return!0;this.it(n,s);var i,o=s===0;return o&&((i=this.et)==null||i.call(this,n)),o},this.rt=t,this.et=this.rt.et,this.tt=Sa(this.rt.bucketSize,0,100,"rate limiter bucket size"),this.Z=Sa(this.rt.refillRate,0,this.tt,"rate limiter refill rate"),this.st=Sa(this.rt.refillInterval,0,864e5,"rate limiter refill interval"),setInterval(()=>{this.Y()},this.st)}}var DE=ei("[ExceptionAutocapture]");class qkt{constructor(t){var n,r,s;this.nt=()=>{var i;if(Ne&&this.isEnabled&&(i=Xt.__PosthogExtensions__)!=null&&i.errorWrappingFunctions){var o=Xt.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,a=Xt.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,l=Xt.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.ot&&this.S.capture_unhandled_errors&&(this.ot=o(this.captureException.bind(this))),!this.lt&&this.S.capture_unhandled_rejections&&(this.lt=a(this.captureException.bind(this))),!this.ut&&this.S.capture_console_errors&&(this.ut=l(this.captureException.bind(this)))}catch(c){DE.error("failed to start",c),this.ht()}}},this._instance=t,this.dt=!((n=this._instance.persistence)==null||!n.props[$Q]),this.S=this.vt(),this.ct=new $1e({refillRate:(r=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)!==null&&r!==void 0?r:1,bucketSize:(s=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)!==null&&s!==void 0?s:10,refillInterval:1e4}),this.startIfEnabled()}vt(){var t=this._instance.config.capture_exceptions,n={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return Jr(t)?n=gt({},n,t):(lt(t)?this.dt:t)&&(n=gt({},n,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),n}get isEnabled(){return this.S.capture_console_errors||this.S.capture_unhandled_errors||this.S.capture_unhandled_rejections}startIfEnabled(){this.isEnabled&&(DE.info("enabled"),this.J(this.nt))}J(t){var n,r;(n=Xt.__PosthogExtensions__)!=null&&n.errorWrappingFunctions&&t(),(r=Xt.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"exception-autocapture",s=>{if(s)return DE.error("failed to load script",s);t()})}ht(){var t,n,r;(t=this.ot)==null||t.call(this),this.ot=void 0,(n=this.lt)==null||n.call(this),this.lt=void 0,(r=this.ut)==null||r.call(this),this.ut=void 0}onRemoteConfig(t){var n=t.autocaptureExceptions;this.dt=!!n||!1,this.S=this.vt(),this._instance.persistence&&this._instance.persistence.register({[$Q]:this.dt}),this.startIfEnabled()}captureException(t){var n,r=this._instance.requestRouter.endpointFor("ui");t.$exception_personURL=r+"/project/"+this._instance.config.token+"/person/"+this._instance.get_distinct_id();var s=(n=t.$exception_list[0].type)!==null&&n!==void 0?n:"Exception";this.ct.consumeRateLimit(s)?DE.info("Skipping exception capture because of client rate limiting.",{exception:t.$exception_list[0].type}):this._instance.exceptions.sendExceptionEvent(t)}}function z1e(e){return!lt(Event)&&H1e(e,Event)}function H1e(e,t){try{return e instanceof t}catch{return!1}}function V1e(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object DOMError]":return!0;default:return H1e(e,Error)}}function vD(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function C7(e){return vD(e,"DOMError")}var nee=/\(error: (.*)\)/,ree=50,z0="?";function k7(e,t,n,r){var s={platform:"web:javascript",filename:e,function:t==="<anonymous>"?z0:t,in_app:!0};return lt(n)||(s.lineno=n),lt(r)||(s.colno=r),s}var Gkt=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Ykt=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Kkt=/\((\S*)(?::(\d+))(?::(\d+))\)/,Xkt=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Jkt=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Zkt=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.sort((s,i)=>s[0]-i[0]).map(s=>s[1]);return function(s,i){i===void 0&&(i=0);for(var o=[],a=s.split(`
|
|
732
|
+
`);return h.jsxs("div",{className:`rounded-md border ${n?"border-mastra-purple/30":"border-mastra-bg-3"} bg-mastra-bg-2`,children:[h.jsxs("div",{className:"p-2 flex items-center justify-between cursor-pointer hover:bg-mastra-bg-3/50",onClick:i,children:[h.jsxs("div",{className:"flex items-center space-x-2",children:[h.jsx(t2,{className:`h-3 w-3 transition-transform ${n?"rotate-90 text-mastra-purple":""}`}),h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center space-x-2",children:[h.jsxs("p",{className:"text-xs font-medium text-mastra-el-4",children:["Version ",t+1]}),e.status==="active"&&h.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full bg-green-500/20 text-green-500",children:"Active"}),e.status==="original"&&h.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full bg-blue-500/20 text-blue-500",children:"Original"}),e.status==="draft"&&h.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full bg-yellow-500/20 text-yellow-500",children:"Draft"})]}),h.jsx("p",{className:"text-[10px] text-mastra-el-3",children:e.timestamp.toLocaleString()})]})]}),h.jsx(USt,{version:e,index:t,isUpdating:s,isAnalysisExpanded:r===t,onSetActive:a,onDelete:l,onToggleAnalysis:o})]}),n&&h.jsx(Z1,{className:"h-[250px]",children:h.jsxs("div",{className:"px-2 pb-2 space-y-2",children:[h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center space-x-1 cursor-pointer hover:bg-mastra-bg-3/50 p-1 rounded-md mb-2",onClick:k=>{k.stopPropagation(),p(!d)},children:[h.jsx(t2,{className:`h-3 w-3 transition-transform ${d?"rotate-90":""}`}),h.jsx("p",{className:"text-xs font-medium text-mastra-el-4",children:"Instructions"})]}),d&&h.jsx("div",{className:"rounded-md border border-mastra-bg-3",children:h.jsx("div",{className:"mt-2",children:h.jsx(HB,{content:E(e.content),isCopied:S,onCopy:x})})})]}),e.analysis&&h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center space-x-1 cursor-pointer hover:bg-mastra-bg-3/50 p-1 rounded-md mb-2",onClick:k=>{k.stopPropagation(),b(!g)},children:[h.jsx(t2,{className:`h-3 w-3 transition-transform ${g?"rotate-90":""}`}),h.jsx("p",{className:"text-xs font-medium text-mastra-el-4",children:"Analysis"})]}),g&&h.jsx("div",{className:"rounded-md border border-mastra-bg-3",children:h.jsx("div",{className:"p-2",children:h.jsx("pre",{className:"text-[10px] text-mastra-el-4 whitespace-pre-wrap font-mono",children:E(e.analysis||"")})})})]}),e.evals&&e.evals.length>0&&h.jsxs("div",{className:"space-y-1",children:[h.jsxs("div",{className:"flex items-center space-x-1 cursor-pointer hover:bg-mastra-bg-3/50 p-1 rounded-md",onClick:k=>{k.stopPropagation(),u(!c)},children:[h.jsx(t2,{className:`h-3 w-3 transition-transform ${c?"rotate-90":""}`}),h.jsxs("p",{className:"text-xs font-medium text-mastra-el-4",children:["Evaluations (",e.evals.length,")"]})]}),c&&h.jsx("div",{className:"pl-4",children:h.jsx("div",{className:"space-y-1 pr-4",children:e.evals.map((k,T)=>h.jsxs("div",{className:"rounded-md border border-mastra-bg-3 p-1.5 text-[10px]",children:[h.jsx("div",{className:"flex items-center justify-between",children:h.jsxs("div",{className:"flex items-center space-x-2",children:[h.jsx("span",{className:`px-1.5 py-0.5 rounded-full min-w-[32px] text-center ${k.result.score>=.7?"bg-green-500/20 text-green-500":k.result.score>=.4?"bg-yellow-500/20 text-yellow-500":"bg-red-500/20 text-red-500"}`,children:k.result.score.toFixed(2)}),h.jsx("span",{className:"text-mastra-el-3 text-[9px]",children:new Date(k.createdAt).toLocaleTimeString()})]})}),h.jsxs("div",{className:"mt-1 space-y-1",children:[h.jsxs("div",{className:"flex gap-1.5",children:[h.jsx("span",{className:"text-mastra-el-3 shrink-0",children:"→"}),h.jsx("span",{className:"text-mastra-el-4",children:k.input})]}),h.jsxs("div",{className:"flex gap-1.5",children:[h.jsx("span",{className:"text-mastra-el-3 shrink-0",children:"←"}),h.jsx("span",{className:"text-mastra-el-4",children:k.output})]}),h.jsxs("div",{className:"flex gap-1.5 text-[9px] text-mastra-el-3",children:[h.jsx("span",{className:"shrink-0",children:"⚬"}),h.jsx("span",{children:k.result.info.reason})]})]})]},T))})})]})]})})]})}function qSt({versions:e,isUpdating:t,copiedVersions:n,onCopy:r,onSetActive:s,onDelete:i}){const[o,a]=A.useState(null),[l,c]=A.useState(null);return h.jsx(Z1,{className:"flex-1",children:h.jsx("div",{className:"space-y-2 pr-4",children:e.map((u,d)=>h.jsx(WSt,{version:u,index:d,isExpanded:o===d,isAnalysisExpanded:l,isUpdating:t,copiedVersions:n,onToggleExpand:()=>{if(o===d)return a(null);a(d)},onToggleAnalysis:()=>{if(l===d)return c(null);c(d)},onCopy:r,onSetActive:s,onDelete:i},d))})})}const GSt=({open:e,onOpenChange:t,onDelete:n,onSetActive:r,versions:s,isUpdating:i})=>h.jsx(HSt,{open:e,onOpenChange:t,children:h.jsxs(t1e,{children:[h.jsxs(n1e,{children:[h.jsx(r1e,{children:"Version History"}),h.jsx(s1e,{children:"View the history of changes to the agent's instructions."})]}),h.jsx(qSt,{versions:s,isUpdating:i,copiedVersions:{},onSetActive:r,onDelete:n})]})});function YSt({agentId:e}){const{agent:t}=K1(e),[n,r]=A.useState(!1),{versions:s,isUpdating:i,versionToDelete:o,setVersions:a,setVersionToDelete:l,deleteVersion:c,updateVersion:u,setVersionActive:d}=zSt(e,t==null?void 0:t.instructions),{enhancedPrompt:p,isEnhancing:g,userComment:b,enhancePrompt:x,setUserComment:S,clearEnhancement:E,applyChanges:k}=$St({agentId:e,instructions:t==null?void 0:t.instructions,versions:s,onVersionCreate:T=>{a(P=>[...P,T])},onVersionUpdate:u});return t?h.jsxs(h.Fragment,{children:[h.jsx(BSt,{instructions:t.instructions,enhancedPrompt:p,isEnhancing:g,userComment:b,onEnhance:x,onCancel:E,onSave:k,onCommentChange:S,agentId:e,onShowHistory:()=>r(!0)}),h.jsx(GSt,{versions:s,isUpdating:i,onSetActive:d,onDelete:l,open:n,onOpenChange:r}),h.jsx(jn,{open:o!==null,onOpenChange:()=>l(null),children:h.jsxs(jn.Content,{children:[h.jsxs(jn.Header,{children:[h.jsxs(jn.Title,{children:["Delete Version ",o!==null?o+1:""]}),h.jsx(jn.Description,{children:"Are you sure you want to delete this version? This action cannot be undone."})]}),h.jsxs(jn.Footer,{children:[h.jsx(jn.Cancel,{children:"Cancel"}),h.jsx(jn.Action,{className:"bg-red-500 hover:bg-red-600",onClick:()=>{o!==null&&c(o)},children:"Delete"})]})]})})]}):null}function KSt({tools:e,agentId:t}){return h.jsx("ul",{className:"space-y-2",children:e.map(n=>h.jsx("li",{children:h.jsx(XSt,{tool:n,agentId:t})},n.id))})}const XSt=({tool:e,agentId:t})=>{const n=A.useRef(null);return h.jsxs(I4,{onClick:()=>{var r;return(r=n.current)==null?void 0:r.click()},children:[h.jsx(O4,{children:h.jsx(gl,{className:"group-hover/entity:text-[#ECB047]"})}),h.jsxs(B4,{children:[h.jsx(R4,{children:h.jsx(Zt,{ref:n,to:`/tools/${t}/${e.id}`,children:e.name})}),h.jsx(L4,{children:e.description})]})]})};function JSt({workflows:e,agentId:t}){return h.jsx("ul",{className:"space-y-2",children:e.map(n=>h.jsx("li",{children:h.jsx(ZSt,{workflow:n,agentId:t})},n.id))})}const ZSt=({workflow:e,agentId:t})=>{const n=A.useRef(null);return h.jsxs(I4,{onClick:()=>{var r;return(r=n.current)==null?void 0:r.click()},children:[h.jsx(O4,{children:h.jsx(kc,{className:"group-hover/entity:text-accent3"})}),h.jsxs(B4,{children:[h.jsx(R4,{children:h.jsx(Zt,{ref:n,to:`/workflows/${e.id}/graph`,children:e.id})}),h.jsx(L4,{children:e.description})]})]})},QSt=({agent:e,agentId:t})=>{const n=Object.entries((e==null?void 0:e.tools)??{}).map(([s,i])=>({name:s,id:i.id,description:i.description})),r=Object.entries((e==null?void 0:e.workflows)??{}).map(([s,i])=>({id:s,description:`Contains ${Object.keys(i.steps||{}).length} steps`}));return h.jsxs("div",{className:"py-2 overflow-y-auto h-full",children:[h.jsx("div",{className:"px-5",children:h.jsx(YSt,{agentId:t})}),h.jsx("hr",{className:"border-border1 border-sm my-5"}),h.jsxs("div",{className:"px-5",children:[h.jsx(Ue,{as:"h3",variant:"ui-md",className:"text-icon3 pb-1",children:"Agent Tools"}),n.length>0?h.jsx(KSt,{tools:n,agentId:t}):h.jsxs(Ue,{as:"p",variant:"ui-lg",className:"text-icon6",children:["No tools found. You can add tools by following the"," ",h.jsx(Zt,{to:"https://mastra.ai/en/docs/agents/using-tools-and-mcp",className:"underline",target:"_blank",children:"Agents and Tools"})," ","documentation."]})]}),h.jsx("hr",{className:"border-border1 border-sm my-5"}),h.jsxs("div",{className:"px-5",children:[h.jsx(Ue,{as:"h3",variant:"ui-md",className:"text-icon3 pb-1",children:"Agent Workflows"}),r.length>0?h.jsx(JSt,{workflows:r,agentId:t}):h.jsx(Ue,{as:"p",variant:"ui-lg",className:"text-icon6",children:"No workflows were attached to this agent."})]})]})},i1e=0,o1e=1,a1e=2,kQ=3;var EQ=Object.prototype.hasOwnProperty;function mF(e,t){var n,r;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&mF(e[r],t[r]););return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(EQ.call(e,n)&&++r&&!EQ.call(t,n)||!(n in t)||!mF(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}const Hd=new WeakMap,Qf=()=>{},eo=Qf(),gF=Object,Rn=e=>e===eo,nu=e=>typeof e=="function",Ep=(e,t)=>({...e,...t}),l1e=e=>nu(e.then),p7={},xE={},VB="undefined",WC=typeof window!=VB,yF=typeof document!=VB,eCt=WC&&"Deno"in window,tCt=()=>WC&&typeof window.requestAnimationFrame!=VB,c1e=(e,t)=>{const n=Hd.get(e);return[()=>!Rn(t)&&e.get(t)||p7,r=>{if(!Rn(t)){const s=e.get(t);t in xE||(xE[t]=s),n[5](t,Ep(s,r),s||p7)}},n[6],()=>!Rn(t)&&t in xE?xE[t]:!Rn(t)&&e.get(t)||p7]};let bF=!0;const nCt=()=>bF,[xF,vF]=WC&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[Qf,Qf],rCt=()=>{const e=yF&&document.visibilityState;return Rn(e)||e!=="hidden"},sCt=e=>(yF&&document.addEventListener("visibilitychange",e),xF("focus",e),()=>{yF&&document.removeEventListener("visibilitychange",e),vF("focus",e)}),iCt=e=>{const t=()=>{bF=!0,e()},n=()=>{bF=!1};return xF("online",t),xF("offline",n),()=>{vF("online",t),vF("offline",n)}},oCt={isOnline:nCt,isVisible:rCt},aCt={initFocus:sCt,initReconnect:iCt},DQ=!Se.useId,TS=!WC||eCt,lCt=e=>tCt()?window.requestAnimationFrame(e):setTimeout(e,1),m7=TS?A.useEffect:A.useLayoutEffect,g7=typeof navigator<"u"&&navigator.connection,AQ=!TS&&g7&&(["slow-2g","2g"].includes(g7.effectiveType)||g7.saveData),vE=new WeakMap,cCt=e=>gF.prototype.toString.call(e),y7=(e,t)=>e===`[object ${t}]`;let uCt=0;const wF=e=>{const t=typeof e,n=cCt(e),r=y7(n,"Date"),s=y7(n,"RegExp"),i=y7(n,"Object");let o,a;if(gF(e)===e&&!r&&!s){if(o=vE.get(e),o)return o;if(o=++uCt+"~",vE.set(e,o),Array.isArray(e)){for(o="@",a=0;a<e.length;a++)o+=wF(e[a])+",";vE.set(e,o)}if(i){o="#";const l=gF.keys(e).sort();for(;!Rn(a=l.pop());)Rn(e[a])||(o+=a+":"+wF(e[a])+",");vE.set(e,o)}}else o=r?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return o},UB=e=>{if(nu(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?wF(e):"",[e,t]};let dCt=0;const SF=()=>++dCt;async function u1e(...e){const[t,n,r,s]=e,i=Ep({populateCache:!0,throwOnError:!0},typeof s=="boolean"?{revalidate:s}:s||{});let o=i.populateCache;const a=i.rollbackOnError;let l=i.optimisticData;const c=p=>typeof a=="function"?a(p):a!==!1,u=i.throwOnError;if(nu(n)){const p=n,g=[],b=t.keys();for(const x of b)!/^\$(inf|sub)\$/.test(x)&&p(t.get(x)._k)&&g.push(x);return Promise.all(g.map(d))}return d(n);async function d(p){const[g]=UB(p);if(!g)return;const[b,x]=c1e(t,g),[S,E,k,T]=Hd.get(t),P=()=>{const V=S[g];return(nu(i.revalidate)?i.revalidate(b().data,p):i.revalidate!==!1)&&(delete k[g],delete T[g],V&&V[0])?V[0](a1e).then(()=>b().data):b().data};if(e.length<3)return P();let M=r,j,F=!1;const I=SF();E[g]=[I,0];const B=!Rn(l),L=b(),W=L.data,$=L._c,J=Rn($)?W:$;if(B&&(l=nu(l)?l(J,W):l,x({data:l,_c:J})),nu(M))try{M=M(J)}catch(V){j=V,F=!0}if(M&&l1e(M))if(M=await M.catch(V=>{j=V,F=!0}),I!==E[g][0]){if(F)throw j;return M}else F&&B&&c(j)&&(o=!0,x({data:J,_c:eo}));if(o&&!F)if(nu(o)){const V=o(M,J);x({data:V,error:eo,_c:eo})}else x({data:M,error:eo,_c:eo});if(E[g][1]=SF(),Promise.resolve(P()).then(()=>{x({_c:eo})}),F){if(u)throw j;return}return M}}const TQ=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},hCt=(e,t)=>{if(!Hd.has(e)){const n=Ep(aCt,t),r=Object.create(null),s=u1e.bind(eo,e);let i=Qf;const o=Object.create(null),a=(u,d)=>{const p=o[u]||[];return o[u]=p,p.push(d),()=>p.splice(p.indexOf(d),1)},l=(u,d,p)=>{e.set(u,d);const g=o[u];if(g)for(const b of g)b(d,p)},c=()=>{if(!Hd.has(e)&&(Hd.set(e,[r,Object.create(null),Object.create(null),Object.create(null),s,l,a]),!TS)){const u=n.initFocus(setTimeout.bind(eo,TQ.bind(eo,r,i1e))),d=n.initReconnect(setTimeout.bind(eo,TQ.bind(eo,r,o1e)));i=()=>{u&&u(),d&&d(),Hd.delete(e)}}};return c(),[e,s,c,i]}return[e,Hd.get(e)[4]]},fCt=(e,t,n,r,s)=>{const i=n.errorRetryCount,o=s.retryCount,a=~~((Math.random()+.5)*(1<<(o<8?o:8)))*n.errorRetryInterval;!Rn(i)&&o>i||setTimeout(r,a,s)},pCt=mF,[d1e,mCt]=hCt(new Map),gCt=Ep({onLoadingSlow:Qf,onSuccess:Qf,onError:Qf,onErrorRetry:fCt,onDiscarded:Qf,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:AQ?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:AQ?5e3:3e3,compare:pCt,isPaused:()=>!1,cache:d1e,mutate:mCt,fallback:{}},oCt),yCt=(e,t)=>{const n=Ep(e,t);if(t){const{use:r,fallback:s}=e,{use:i,fallback:o}=t;r&&i&&(n.use=r.concat(i)),s&&o&&(n.fallback=Ep(s,o))}return n},bCt=A.createContext({}),xCt="$inf$",h1e=WC&&window.__SWR_DEVTOOLS_USE__,vCt=h1e?window.__SWR_DEVTOOLS_USE__:[],wCt=()=>{h1e&&(window.__SWR_DEVTOOLS_REACT__=Se)},SCt=e=>nu(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],WB=()=>Ep(gCt,A.useContext(bCt)),CCt=e=>(t,n,r)=>e(t,n&&((...i)=>{const[o]=UB(t),[,,,a]=Hd.get(d1e);if(o.startsWith(xCt))return n(...i);const l=a[o];return Rn(l)?n(...i):(delete a[o],l)}),r),kCt=vCt.concat(CCt),ECt=e=>function(...n){const r=WB(),[s,i,o]=SCt(n),a=yCt(r,o);let l=e;const{use:c}=a,u=(c||[]).concat(kCt);for(let d=u.length;d--;)l=u[d](l);return l(s,i||a.fetcher||null,a)},DCt=(e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const s=r.indexOf(n);s>=0&&(r[s]=r[r.length-1],r.pop())}};wCt();const b7=Se.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}}),x7={dedupe:!0},ACt=(e,t,n)=>{const{cache:r,compare:s,suspense:i,fallbackData:o,revalidateOnMount:a,revalidateIfStale:l,refreshInterval:c,refreshWhenHidden:u,refreshWhenOffline:d,keepPreviousData:p}=n,[g,b,x,S]=Hd.get(r),[E,k]=UB(e),T=A.useRef(!1),P=A.useRef(!1),M=A.useRef(E),j=A.useRef(t),F=A.useRef(n),I=()=>F.current,B=()=>I().isVisible()&&I().isOnline(),[L,W,$,J]=c1e(r,E),V=A.useRef({}).current,Z=Rn(o)?Rn(n.fallback)?eo:n.fallback[E]:o,G=(_e,Fe)=>{for(const tt in V){const nt=tt;if(nt==="data"){if(!s(_e[nt],Fe[nt])&&(!Rn(_e[nt])||!s(ie,Fe[nt])))return!1}else if(Fe[nt]!==_e[nt])return!1}return!0},q=A.useMemo(()=>{const _e=!E||!t?!1:Rn(a)?I().isPaused()||i?!1:l!==!1:a,Fe=de=>{const xe=Ep(de);return delete xe._k,_e?{isValidating:!0,isLoading:!0,...xe}:xe},tt=L(),nt=J(),Dt=Fe(tt),Gt=tt===nt?Dt:Fe(nt);let tn=Dt;return[()=>{const de=Fe(L());return G(de,tn)?(tn.data=de.data,tn.isLoading=de.isLoading,tn.isValidating=de.isValidating,tn.error=de.error,tn):(tn=de,de)},()=>Gt]},[r,E]),z=ale.useSyncExternalStore(A.useCallback(_e=>$(E,(Fe,tt)=>{G(tt,Fe)||_e()}),[r,E]),q[0],q[1]),Y=!T.current,U=g[E]&&g[E].length>0,X=z.data,ne=Rn(X)?Z&&l1e(Z)?b7(Z):Z:X,H=z.error,ee=A.useRef(ne),ie=p?Rn(X)?Rn(ee.current)?ne:ee.current:X:ne,se=U&&!Rn(H)?!1:Y&&!Rn(a)?a:I().isPaused()?!1:i?Rn(ne)?!1:l:Rn(ne)||l,ae=!!(E&&t&&Y&&se),le=Rn(z.isValidating)?ae:z.isValidating,pe=Rn(z.isLoading)?ae:z.isLoading,ye=A.useCallback(async _e=>{const Fe=j.current;if(!E||!Fe||P.current||I().isPaused())return!1;let tt,nt,Dt=!0;const Gt=_e||{},tn=!x[E]||!Gt.dedupe,de=()=>DQ?!P.current&&E===M.current&&T.current:E===M.current,xe={isValidating:!1,isLoading:!1},Me=()=>{W(xe)},Je=()=>{const ze=x[E];ze&&ze[1]===nt&&delete x[E]},Ze={isValidating:!0};Rn(L().data)&&(Ze.isLoading=!0);try{if(tn&&(W(Ze),n.loadingTimeout&&Rn(L().data)&&setTimeout(()=>{Dt&&de()&&I().onLoadingSlow(E,n)},n.loadingTimeout),x[E]=[Fe(k),SF()]),[tt,nt]=x[E],tt=await tt,tn&&setTimeout(Je,n.dedupingInterval),!x[E]||x[E][1]!==nt)return tn&&de()&&I().onDiscarded(E),!1;xe.error=eo;const ze=b[E];if(!Rn(ze)&&(nt<=ze[0]||nt<=ze[1]||ze[1]===0))return Me(),tn&&de()&&I().onDiscarded(E),!1;const fe=L().data;xe.data=s(fe,tt)?fe:tt,tn&&de()&&I().onSuccess(tt,E,n)}catch(ze){Je();const fe=I(),{shouldRetryOnError:Pe}=fe;fe.isPaused()||(xe.error=ze,tn&&de()&&(fe.onError(ze,E,fe),(Pe===!0||nu(Pe)&&Pe(ze))&&(!I().revalidateOnFocus||!I().revalidateOnReconnect||B())&&fe.onErrorRetry(ze,E,fe,Xe=>{const ht=g[E];ht&&ht[0]&&ht[0](kQ,Xe)},{retryCount:(Gt.retryCount||0)+1,dedupe:!0})))}return Dt=!1,Me(),!0},[E,r]),Te=A.useCallback((..._e)=>u1e(r,M.current,..._e),[]);if(m7(()=>{j.current=t,F.current=n,Rn(X)||(ee.current=X)}),m7(()=>{if(!E)return;const _e=ye.bind(eo,x7);let Fe=0;I().revalidateOnFocus&&(Fe=Date.now()+I().focusThrottleInterval);const nt=DCt(E,g,(Dt,Gt={})=>{if(Dt==i1e){const tn=Date.now();I().revalidateOnFocus&&tn>Fe&&B()&&(Fe=tn+I().focusThrottleInterval,_e())}else if(Dt==o1e)I().revalidateOnReconnect&&B()&&_e();else{if(Dt==a1e)return ye();if(Dt==kQ)return ye(Gt)}});return P.current=!1,M.current=E,T.current=!0,W({_k:k}),se&&(x[E]||(Rn(ne)||TS?_e():lCt(_e))),()=>{P.current=!0,nt()}},[E]),m7(()=>{let _e;function Fe(){const nt=nu(c)?c(L().data):c;nt&&_e!==-1&&(_e=setTimeout(tt,nt))}function tt(){!L().error&&(u||I().isVisible())&&(d||I().isOnline())?ye(x7).then(Fe):Fe()}return Fe(),()=>{_e&&(clearTimeout(_e),_e=-1)}},[c,u,d,E]),A.useDebugValue(ie),i&&Rn(ne)&&E){if(!DQ&&TS)throw new Error("Fallback data is required when using Suspense in SSR.");j.current=t,F.current=n,P.current=!1;const _e=S[E];if(!Rn(_e)){const Fe=Te(_e);b7(Fe)}if(Rn(H)){const Fe=ye(x7);Rn(ie)||(Fe.status="fulfilled",Fe.value=!0),b7(Fe)}else throw H}return{mutate:Te,get data(){return V.data=!0,ie},get error(){return V.error=!0,H},get isValidating(){return V.isValidating=!0,le},get isLoading(){return V.isLoading=!0,pe}}},Q1=ECt(ACt),f1e=e=>{const{data:t,isLoading:n,mutate:r}=Q1(`/api/memory/status?agentId=${e}`,A1,{fallbackData:{result:!1},isPaused:()=>!e});return{memory:t,isLoading:n,mutate:r}},TCt=({resourceid:e,agentId:t,isMemoryEnabled:n})=>{const{data:r,isLoading:s,mutate:i}=Q1(`/api/memory/threads?resourceid=${e}&agentId=${t}`,A1,{fallbackData:[],isPaused:()=>!e||!t||!n,revalidateOnFocus:!1});return A.useEffect(()=>{e&&t&&n&&i()},[e,t,n]),A.useEffect(()=>{var a,l;const o=async(c=0)=>{var d,p;const u=await i();if(u!=null&&u.length){const g=u[u.length-1];c=c+1,(p=(d=g==null?void 0:g.title)==null?void 0:d.toLowerCase())!=null&&p.includes("new thread")&&c<3&&setTimeout(()=>{o(c)},500)}};if(r!=null&&r.length){const c=r[r.length-1];(l=(a=c==null?void 0:c.title)==null?void 0:a.toLowerCase())!=null&&l.includes("new thread")&&setTimeout(()=>{o()},500)}},[r]),{threads:r,isLoading:s,mutate:i}},p1e=({threadId:e,memory:t,agentId:n})=>{const{data:r,isLoading:s,mutate:i}=Q1(`/api/memory/threads/${e}/messages?agentId=${n}`,o=>A1(o,!0),{fallbackData:{uiMessages:[],messages:[]},revalidateOnFocus:!1,isPaused:()=>!e||!n,shouldRetryOnError:!1});return A.useEffect(()=>{e&&t&&i()},[e,t]),{messages:r==null?void 0:r.uiMessages,isLoading:s,mutate:i}},_Ct=()=>{const{mutate:e}=WB();return{deleteThread:async({threadId:n,resourceid:r,agentId:s})=>{const i=fetch(`/api/memory/threads/${n}?agentId=${s}`,{method:"DELETE",headers:{"Content-Type":"application/json","x-mastra-dev-playground":"true"}});Nr.promise(i,{loading:"Deleting chat...",success:()=>(e(`/api/memory/threads?resourceid=${r}&agentId=${s}`),"Chat deleted successfully"),error:"Failed to delete chat"})}}},NCt=()=>{const{threadExists:e,workingMemoryData:t,workingMemorySource:n,isLoading:r,isUpdating:s,updateWorkingMemory:i}=v0e(),{isCopied:o,handleCopy:a}=J1({text:t??"",copyMessage:"Working memory copied!"}),[l,c]=A.useState(t??""),[u,d]=A.useState(!1);return Se.useEffect(()=>{c(t??"")},[t]),r?h.jsx($n,{className:"h-32 w-full"}):h.jsxs("div",{className:"flex flex-col gap-4 p-4",children:[h.jsxs(Ue,{variant:"header-md",children:["Working Memory (Scope: ",n,")"]}),!e&&h.jsx(Ue,{variant:"ui-sm",className:"text-icon3 flex items-center gap-2 pt-0.5",children:"Send a message to the agent to enable working memory."}),u?h.jsx("textarea",{className:"w-full min-h-[200px] p-3 border border-border2 rounded bg-surface1 font-mono text-[15px] text-mastra-el-4",value:l,onChange:p=>c(p.target.value),disabled:s}):h.jsx(HB,{content:t||"",isCopied:o,onCopy:a,className:"bg-surface2 text-[15px] font-mono min-h-[200px]"}),h.jsx("div",{className:"flex gap-2",children:u?h.jsxs(h.Fragment,{children:[h.jsx(gu,{variant:"default",onClick:async()=>{try{await i(l),d(!1)}catch(p){console.error("Failed to update working memory:",p),Nr.error("Failed to update working memory")}},children:s?h.jsx(ww,{className:"w-4 h-4 animate-spin"}):"Save"}),h.jsx(gu,{variant:"secondary",onClick:()=>{c(t??""),d(!1)},disabled:s,children:"Cancel"})]}):h.jsx(gu,{variant:"secondary",onClick:()=>d(!0),disabled:!e||s,children:"Edit"})})]})};function PCt({agentId:e}){var a;const{agent:t,isLoading:n}=K1(e),{memory:r,isLoading:s}=f1e(e),{handleCopy:i}=J1({text:e}),o=kSt[(t==null?void 0:t.provider)||"openai.chat"];return h.jsxs("div",{className:"grid grid-rows-[auto_1fr] h-full items-start overflow-y-auto border-l-sm border-border1",children:[h.jsxs("div",{className:"p-5 border-b-sm border-border1",children:[h.jsxs("div",{className:"text-icon6 flex items-center gap-2 min-w-0",children:[h.jsx(ot,{size:"lg",className:"bg-surface4 rounded-md p-1",children:h.jsx(Nh,{})}),n||s?h.jsx($n,{className:"h-3 w-1/3"}):h.jsx(Ue,{variant:"header-md",as:"h2",className:"font-medium truncate",children:t==null?void 0:t.name})]}),h.jsxs("div",{className:"flex items-center gap-2 pt-2 flex-wrap",children:[h.jsxs(Kl,{children:[h.jsx(Xl,{asChild:!0,children:h.jsx("button",{onClick:i,className:"h-badge-default shrink-0",children:h.jsx(Un,{icon:h.jsx(cI,{}),variant:"default",children:e})})}),h.jsx(nl,{children:"Copy Agent ID for use in code"})]}),h.jsx(Un,{className:"capitalize shrink-0",icon:o,children:(a=t==null?void 0:t.provider)==null?void 0:a.split(".")[0]}),h.jsx(Un,{className:"shrink-0",children:t==null?void 0:t.modelId}),h.jsxs(Kl,{children:[h.jsx(Xl,{asChild:!0,children:h.jsx(Un,{icon:h.jsx(s0e,{}),variant:r!=null&&r.result?"success":"error",className:"shrink-0",children:r!=null&&r.result?"Memory is On":"Memory is Off"})}),h.jsx(nl,{children:r!=null&&r.result?"Memory is active, your messages will be persisted.":h.jsxs(h.Fragment,{children:[h.jsx("p",{children:"Memory is off, your messages will not be persisted neither available in the context."}),h.jsx("p",{children:h.jsx(Zt,{to:"https://mastra.ai/en/docs/memory/overview",target:"_blank",className:"underline",children:"See documentation to enable memory"})})]})})]})]})]}),h.jsxs(z4,{defaultValue:"overview",className:"overflow-y-auto grid grid-rows-[auto_1fr] h-full",children:[h.jsxs(UC,{className:"flex border-b overflow-x-auto pl-5",children:[h.jsx(Ti,{value:"overview",className:"group",children:h.jsx("p",{className:"text-xs p-3 text-mastra-el-3 group-data-[state=active]:text-mastra-el-5 group-data-[state=active]:border-b-2 group-data-[state=active]:pb-2.5 border-white",children:"Overview"})}),h.jsx(Ti,{value:"model-settings",className:"group",children:h.jsx("p",{className:"text-xs p-3 text-mastra-el-3 group-data-[state=active]:text-mastra-el-5 group-data-[state=active]:border-b-2 group-data-[state=active]:pb-2.5 border-white",children:"Model settings"})}),h.jsx(Ti,{value:"endpoints",className:"group",children:h.jsx("p",{className:"text-xs p-3 text-mastra-el-3 group-data-[state=active]:text-mastra-el-5 group-data-[state=active]:border-b-2 group-data-[state=active]:pb-2.5 border-white",children:"Endpoints"})}),h.jsx(Ti,{value:"logs",className:"group ",children:h.jsx("p",{className:"text-xs p-3 text-mastra-el-3 group-data-[state=active]:text-mastra-el-5 group-data-[state=active]:border-b-2 group-data-[state=active]:pb-2.5 border-white",children:"Log Drains"})}),h.jsx(Ti,{value:"working-memory",className:"group",children:h.jsx("p",{className:"text-xs p-3 text-mastra-el-3 group-data-[state=active]:text-mastra-el-5 group-data-[state=active]:border-b-2 group-data-[state=active]:pb-2.5 border-white",children:"Working Memory"})})]}),h.jsxs("div",{className:"overflow-y-auto",children:[h.jsxs(_i,{value:"overview",children:[n&&h.jsx($n,{className:"h-full"}),t&&h.jsx(QSt,{agent:t,agentId:e})]}),h.jsxs(_i,{value:"model-settings",children:[n&&h.jsx($n,{className:"h-full"}),t&&h.jsx(hxt,{})]}),h.jsx(_i,{value:"endpoints",children:n?h.jsx($n,{className:"h-full"}):h.jsx(vSt,{agentId:e})}),h.jsx(_i,{value:"logs",children:n?h.jsx($n,{className:"h-full"}):h.jsx(CSt,{agentId:e})}),h.jsx(_i,{value:"working-memory",children:n?h.jsx($n,{className:"h-full"}):h.jsx(NCt,{})})]})]})]})}const MCt=e=>{const t={month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!0};return new Date(e).toLocaleString("en-us",t).replace(","," at")};function jCt({agentId:e,threadId:t,threads:n,isLoading:r}){const{deleteThread:s}=_Ct(),i=xl(),[o,a]=A.useState(null),l=async()=>{await s({threadId:o,resourceid:e,agentId:e}),a(null),o===t&&i(`/agents/${e}/chat/${Gs()}`)};if(r)return h.jsxs("div",{className:"p-4 w-full h-full space-y-2",children:[h.jsx("div",{className:"flex justify-end",children:h.jsx($n,{className:"h-9 w-9"})}),h.jsx($n,{className:"h-4"}),h.jsx($n,{className:"h-4"}),h.jsx($n,{className:"h-4"}),h.jsx($n,{className:"h-4"}),h.jsx($n,{className:"h-4"})]});const c=[...n||[]].reverse();return h.jsxs("div",{className:"overflow-y-auto h-full w-full",children:[h.jsx(obe,{children:h.jsxs(abe,{children:[h.jsx(iA,{children:h.jsx(sA,{as:Zt,to:`/agents/${e}/chat/${Gs()}`,children:h.jsxs("span",{className:"text-accent1 flex items-center gap-4",children:[h.jsx(ot,{className:"bg-surface4 rounded-lg",size:"lg",children:h.jsx(pte,{})}),"New Chat"]})})}),c.length===0&&h.jsx(Ue,{as:"p",variant:"ui-sm",className:"text-icon3 py-3 px-5 max-w-[12rem]",children:"Your conversations will appear here once you start chatting!"}),c.map(u=>{const d=u.id===t;return h.jsxs(iA,{isActive:d,children:[h.jsxs(sA,{as:Zt,to:`/agents/${e}/chat/${u.id}`,children:[h.jsx(ICt,{title:u.title}),h.jsx("span",{children:MCt(u.createdAt)})]}),h.jsx(lbe,{onClick:()=>a(u.id)})]},u.id)})]})}),h.jsx(jn,{open:!!o,onOpenChange:()=>a(null),children:h.jsxs(jn.Content,{children:[h.jsxs(jn.Header,{children:[h.jsx(jn.Title,{children:"Are you absolutely sure?"}),h.jsx(jn.Description,{children:"This action cannot be undone. This will permanently delete your chat and remove it from our servers."})]}),h.jsxs(jn.Footer,{children:[h.jsx(jn.Cancel,{children:"Cancel"}),h.jsx(jn.Action,{onClick:l,children:"Continue"})]})]})})]})}function FCt(e){return/^New Thread \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/.test(e)}function ICt({title:e}){return e?FCt(e)?h.jsx("span",{className:"text-muted-foreground",children:"Chat from"}):h.jsx("span",{className:"truncate max-w-[14rem]",children:e}):null}function _Q(){const{agentId:e,threadId:t}=Cs(),{agent:n,isLoading:r}=K1(e),{memory:s}=f1e(e),i=xl(),{messages:o,isLoading:a}=p1e({agentId:e,threadId:t,memory:!!(s!=null&&s.result)}),{threads:l,isLoading:c,mutate:u}=TCt({resourceid:e,agentId:e,isMemoryEnabled:!!(s!=null&&s.result)});if(A.useEffect(()=>{s!=null&&s.result&&(!t||t==="new")&&i(`/agents/${e}/chat/${Gs()}`)},[s==null?void 0:s.result,t]),r)return null;const d=!!(s!=null&&s.result);return h.jsx(T1t,{agentId:e,children:h.jsx(S1t,{agentId:e,threadId:t,resourceId:e,children:h.jsxs(ho,{isDivided:!0,hasLeftServiceColumn:d,children:[d&&h.jsx(jCt,{agentId:e,threadId:t,threads:l,isLoading:c}),h.jsx("div",{className:"grid overflow-y-auto relative bg-surface1 py-4",children:h.jsx(_1t,{agentId:e,agentName:n==null?void 0:n.name,threadId:t,initialMessages:a?void 0:o,memory:s==null?void 0:s.result,refreshThreadList:u})}),h.jsx(PCt,{agentId:e})]})})})}const NQ=(e,t)=>VC({staleTime:0,gcTime:0,queryKey:["evals",e,t],queryFn:()=>t==="live"?Dn.getAgent(e).liveEvals():Dn.getAgent(e).evals()});function OCt(){const{agentId:e}=Cs(),{data:t,isLoading:n,refetch:r}=NQ(e,"live"),{data:s,isLoading:i,refetch:o}=NQ(e,"ci");return n||i?null:h.jsx("main",{className:"h-full overflow-hidden",children:h.jsx(O1t,{liveEvals:(t==null?void 0:t.evals)??[],ciEvals:(s==null?void 0:s.evals)??[],onRefetchLiveEvals:r,onRefetchCiEvals:o})})}function RCt({fetchFn:e,interval:t=3e3,enabled:n=!1,onSuccess:r,onError:s,shouldContinue:i=()=>!0}){const[o,a]=A.useState(n),[l,c]=A.useState(null),[u,d]=A.useState(null),[p,g]=A.useState(!1),[b,x]=A.useState(!1),S=A.useRef(null),E=A.useRef(!0),k=A.useCallback(()=>{console.log("cleanup"),S.current&&(clearTimeout(S.current),S.current=null)},[]),T=A.useCallback(()=>{console.log("stopPolling"),a(!1),k()},[k]),P=A.useCallback(()=>{console.log("startPolling"),a(!0),c(null)},[]),M=A.useCallback(async(j=!1)=>{if(E.current){g(!0),x(j);try{const F=await e();d(F),c(null),r==null||r(F),x(!1),i(F)?S.current=setTimeout(M,t):T()}catch(F){if(!E.current)return;c(F),s==null||s(F),T()}finally{E.current&&(x(!1),g(!1))}}},[e,t,r,s,i,T]);return A.useEffect(()=>(E.current=!0,n&&o&&M(!0),()=>{console.log("cleanup poll"),E.current=!1,k()}),[n,o,M,k]),{isPolling:o,isLoading:p,error:l,data:u,startPolling:P,stopPolling:T,firstCallLoading:b}}const LCt=(e,t=!1)=>{const n=new Set,r=o=>{var a,l,c,u;return o!=null&&o.startsWith("workflow.")&&t?(l=(a=o==null?void 0:o.split("."))==null?void 0:a.slice(2))==null?void 0:l.join("."):o!=null&&o.startsWith("agent.")&&!t?(u=(c=o==null?void 0:o.split("."))==null?void 0:c.slice(1))==null?void 0:u.join("."):o},s=e==null?void 0:e.reduce((o,a)=>{const l={...a,name:r(a.name),duration:a.endTime-a.startTime};return n.add(a.id),{...o,[a.traceId]:[...o[a.traceId]||[],l]}},{});return Object.entries(s).map(([o,a])=>{var p,g,b;const l=a.find(x=>!x.parentSpanId||!n.has(x.parentSpanId)),c=a.map(x=>({...x,parentSpanId:(l==null?void 0:l.id)===x.id?null:x==null?void 0:x.parentSpanId})),u=(p=a.find(x=>x.status.code!==0))==null?void 0:p.status,d=(b=(g=a==null?void 0:a[0])==null?void 0:g.attributes)==null?void 0:b.runId;return{traceId:o,serviceName:(l==null?void 0:l.name)||o,duration:(l==null?void 0:l.duration)||a.reduce((x,S)=>x+S.duration,0),status:u||(l==null?void 0:l.status)||a[0].status,started:a[0].startTime,trace:c,runId:d?String(d):void 0}})},qB=(e,t=!1)=>{const[n,r]=A.useState([]),s=A.useCallback(async()=>{try{const u=await Dn.getTelemetry({attribute:{componentName:e}});if(!u.traces)throw new Error("Error fetching traces");return LCt((u==null?void 0:u.traces)||[],t)}catch(u){throw u}},[Dn,e,t]),i=A.useCallback(u=>{u.length>0&&r(()=>u)},[]),o=A.useCallback(u=>{console.log("error, onError",u),Nr.error(u.message)},[]),a=A.useCallback(()=>!0,[]),{firstCallLoading:l,error:c}=RCt({fetchFn:s,interval:3e3,onSuccess:i,onError:o,shouldContinue:a,enabled:!0});return{traces:n,firstCallLoading:l,error:c}};function BCt(){const{agentId:e}=Cs(),{agent:t,isLoading:n}=K1(e),{traces:r,firstCallLoading:s,error:i}=qB((t==null?void 0:t.name)||"");return n||s?h.jsx("div",{className:"p-4",children:h.jsx($n,{className:"h-10"})}):h.jsx(lxt,{traces:r||[],error:i,className:"h-[calc(100vh-40px)]"})}function GB(e){return Function("z",`"use strict";return (${e});`)(HD)}const $Ct=()=>el({mutationFn:async({agentId:e,toolId:t,input:n,playgroundRuntimeContext:r})=>{const s=new oh;Object.entries(r??{}).forEach(([i,o])=>{s.set(i,o)});try{return await Dn.getAgent(e).executeTool(t,{data:n,runtimeContext:s})}catch(i){throw Nr.error("Error executing agent tool"),console.error("Error executing tool:",i),i}}});function lA({content:e,copyMessage:t,tooltip:n="Copy to clipboard",iconSize:r="default"}){const{handleCopy:s}=J1({text:e,copyMessage:t});return h.jsxs(Kl,{children:[h.jsx(Xl,{asChild:!0,children:h.jsx("button",{onClick:s,type:"button",children:h.jsx(ot,{className:"transition-colors hover:bg-surface4 rounded-lg text-icon3 hover:text-icon6",size:r,children:h.jsx(cI,{})})})}),h.jsx(nl,{children:n})]})}const m1e={agent:Nh,workflow:kc,tool:gl},zCt=({toolDescription:e,toolId:t,toolType:n})=>{const r=m1e[n||"tool"];return h.jsx("div",{className:"p-5 border-b-sm border-border1",children:h.jsxs("div",{className:"text-icon6 flex gap-2",children:[h.jsx("div",{children:h.jsx(ot,{size:"lg",className:"bg-surface4 rounded-md p-1",children:h.jsx(r,{})})}),h.jsx("div",{className:"flex gap-4 justify-between w-full min-w-0",children:h.jsxs("div",{children:[h.jsx(Ue,{variant:"header-md",as:"h2",className:"font-medium truncate",children:t}),h.jsx(Ue,{variant:"ui-sm",className:"text-icon3",children:e})]})})]})})},g1e=()=>A.useMemo(()=>NT({settings:{fontFamily:"var(--geist-mono)",fontSize:"0.8rem",lineHighlight:"transparent",gutterBackground:"transparent",gutterForeground:"#939393",background:"transparent"},styles:[{tag:[Ce.className,Ce.propertyName]}]}),[]),YB=({isExecutingTool:e,zodInputSchema:t,handleExecuteTool:n,executionResult:r,errorString:s,toolDescription:i,toolId:o,toolType:a})=>{const l=g1e(),c=JSON.stringify(r??{},null,2);return h.jsxs(ho,{hasLeftServiceColumn:!0,className:"relative",children:[h.jsxs("div",{className:"bg-surface2 border-r-sm border-border1 w-[20rem]",children:[h.jsx(zCt,{toolDescription:i,toolId:o,toolType:a}),h.jsx("div",{className:"p-5 overflow-y-auto",children:h.jsx(nA,{isSubmitLoading:e,schema:t,onSubmit:u=>{n(u)},className:"h-auto"})})]}),h.jsx("div",{className:"absolute top-4 right-4 z-10",children:h.jsx(lA,{content:c,tooltip:"Copy JSON result to clipboard"})}),h.jsx("div",{className:"p-5 h-full relative overflow-x-auto overflow-y-auto",children:h.jsx(al,{value:s||c,editable:!0,theme:l,extensions:[Fu]})})]})},HCt=()=>{const{toolId:e,agentId:t}=Cs(),{runtimeContext:n}=dy(),{mutateAsync:r,isPending:s,error:i}=$Ct(),[o,a]=A.useState(null),{agent:l,isLoading:c}=K1(t),u=Object.values((l==null?void 0:l.tools)??{}).find(b=>b.id===e),d=async b=>{if(!l||!u)return;const x=await r({agentId:t,toolId:u.id,input:b,playgroundRuntimeContext:n});a(x)},p=u!=null&&u.inputSchema?GB(Fg(c1(u==null?void 0:u.inputSchema))):pn({}),g=!l||!u;return h.jsxs(yl,{children:[h.jsx(us,{children:h.jsxs(Yd,{children:[h.jsx(Vr,{as:Zt,to:"/agents",children:"Agents"}),h.jsx(Vr,{as:Zt,to:`/agents/${t}/chat`,children:t}),h.jsx(Vr,{as:Zt,to:`/agents/${t}/tools/${e}`,isCurrent:!0,children:e})]})}),c?null:g?h.jsx("div",{className:"py-12 text-center px-6",children:h.jsx(Ue,{variant:"header-md",className:"text-icon3",children:"Agent or tool not found"})}):h.jsx(YB,{executionResult:o,errorString:(i==null?void 0:i.message)??"",isExecutingTool:s,zodInputSchema:p,handleExecuteTool:d,toolDescription:u.description,toolId:u.id})]})},VCt=()=>el({mutationFn:async({toolId:e,input:t,runtimeContext:n})=>{const r=new oh;Object.entries(n??{}).forEach(([s,i])=>{r.set(s,i)});try{return await Dn.getTool(e).execute({data:t,runtimeContext:r})}catch(s){throw Nr.error("Error executing dev tool"),console.error("Error executing dev tool:",s),s}}}),UCt=()=>{const{toolId:e}=Cs(),{tool:t,isLoading:n}=ySt(e),{mutateAsync:r,isPending:s,data:i}=VCt(),{runtimeContext:o}=dy(),a=async c=>{if(t)return r({toolId:t.id,input:c,runtimeContext:o})},l=t!=null&&t.inputSchema?GB(Fg(c1(t==null?void 0:t.inputSchema))):pn({});return h.jsxs("div",{className:"h-full w-full overflow-y-hidden",children:[h.jsx(us,{children:h.jsxs(Yd,{children:[h.jsx(Vr,{as:Zt,to:"/tools",children:"Tools"}),h.jsx(Vr,{as:Zt,to:`/tools/all/${e}`,isCurrent:!0,children:e})]})}),n?null:t?h.jsx(YB,{executionResult:i,isExecutingTool:s,zodInputSchema:l,handleExecuteTool:a,toolDescription:t.description,toolId:t.id}):h.jsx("div",{className:"py-12 text-center px-6",children:h.jsx(Ue,{variant:"header-md",className:"text-icon3",children:"Tool not found"})})]})};function WCt(){const{data:e,isLoading:t}=cSt(),n=xl(),[r,s]=e??[];return h.jsxs(yl,{children:[h.jsx(us,{children:h.jsx(Xu,{children:"Workflows"})}),h.jsx(ho,{isCentered:!t&&Object.keys(e||{}).length===0,children:h.jsx(ywt,{workflows:s,legacyWorkflows:r,isLoading:t,onClickRow:i=>n(`/workflows/${i}/graph`)})})]})}const PQ=()=>{const{workflowId:e}=Cs(),t=xl(),{data:n,isLoading:r}=$4(e),{mutateAsync:s}=pSt(e);return h.jsx(U0e,{workflowId:e,workflow:n,isLoading:r,onShowTrace:({runId:i,stepName:o})=>{t(`/workflows/${e}/traces?runId=${i}&stepName=${o}`)},onSendEvent:s})};function qCt({runId:e}){const{logs:t,isLoading:n,refetchLogs:r}=Ebe(e);return h.jsxs("div",{className:"h-full px-4 pb-4 text-xs w-full overflow-y-auto",children:[h.jsx("div",{className:"flex justify-end sticky top-0 py-2 overflow-y-auto",children:h.jsx(gu,{variant:"outline",onClick:()=>r(e),children:n?h.jsx(ww,{className:"w-4 h-4 animate-spin"}):h.jsx(ww,{className:"w-4 h-4"})})}),h.jsx("div",{className:"space-y-4 h-full overflow-y-auto",children:t.length===0?h.jsxs("p",{className:"text-gray-300/60",children:["No log drains. By default, logs are sent to the console. To configure log drains see"," ",h.jsx("a",{href:"https://mastra.ai/reference/observability/create-logger#upstash-logger-remote-log-drain",target:"_blank",rel:"noopener",className:" hover:text-gray-100 underline",children:"docs."})]}):t.map((s,i)=>h.jsxs("div",{className:"space-y-2",children:[h.jsxs("div",{className:"flex gap-2 items-center",children:[h.jsxs("p",{className:"text-mastra-el-5",children:["[",lo(new Date(s.time),"yyyy-MM-dd HH:mm:ss"),"]"]}),h.jsxs("p",{className:"text-mastra-el-4",children:["[",s.level,"]"]})]}),h.jsx("p",{className:"text-mastra-el-5 whitespace-pre-wrap",children:h.jsx("code",{children:s.msg})})]},i))})]})}const y1e=({workflowId:e})=>VC({queryKey:["workflow-runs",e],queryFn:()=>new LO({baseUrl:"",headers:{"x-mastra-dev-playground":"true"}}).getWorkflow(e).runs({limit:50})});function H4({workflowId:e,isLegacy:t}){const n=Cs(),r=xl(),{data:s,isLoading:i}=$4(e,!t),{isLoading:o,data:a}=y1e({workflowId:e}),{data:l,isLoading:c}=$B(e,!!t),{createWorkflowRun:u}=uSt(),{resumeWorkflow:d}=hSt(),{streamWorkflow:p,streamResult:g,isStreaming:b}=dSt(),{mutateAsync:x,isPending:S}=fSt(),[E,k]=A.useState(""),{handleCopy:T}=J1({text:e}),P=Object.keys((s==null?void 0:s.steps)??{}).length,M=t?c:i,j=t?l:s;return h.jsxs("div",{className:"grid grid-rows-[auto_1fr] h-full overflow-y-auto",children:[h.jsxs("div",{className:"p-5 border-b-sm border-border1",children:[h.jsxs("div",{className:"text-icon6 flex items-center gap-2",children:[h.jsx(ot,{size:"lg",className:"bg-surface4 rounded-md p-1",children:h.jsx(kc,{})}),M?h.jsx($n,{className:"h-3 w-1/3"}):h.jsx("div",{className:"flex items-center gap-4 min-w-0",children:h.jsx(Ue,{variant:"header-md",as:"h2",className:"font-medium truncate",children:j==null?void 0:j.name})})]}),h.jsxs("div",{className:"flex items-center gap-2 pt-2",children:[h.jsxs(Kl,{children:[h.jsx(Xl,{asChild:!0,children:h.jsx("button",{onClick:T,className:"h-badge-default",children:h.jsx(Un,{icon:h.jsx(cI,{}),variant:"default",children:e})})}),h.jsx(nl,{children:"Copy Workflow ID for use in code"})]}),h.jsxs(Un,{children:[P," step",P>1?"s":""]})]})]}),h.jsx("div",{className:"overflow-y-auto",children:h.jsxs(z4,{defaultValue:"run",className:"h-full grid grid-rows-[auto_1fr] overflow-y-auto",children:[h.jsxs(UC,{className:"flex shrink-0 border-b",children:[h.jsx(Ti,{value:"run",className:"group",onClick:()=>r(`/workflows/${e}/graph`),children:h.jsx("p",{className:"text-xs p-3 text-mastra-el-3 group-data-[state=active]:text-mastra-el-5 group-data-[state=active]:border-b-2 group-data-[state=active]:pb-2.5 border-white",children:"Run"})}),h.jsx(Ti,{value:"runs",className:"group",children:h.jsx("p",{className:"text-xs p-3 text-mastra-el-3 group-data-[state=active]:text-mastra-el-5 group-data-[state=active]:border-b-2 group-data-[state=active]:pb-2.5 border-white",children:"Runs"})}),h.jsx(Ti,{value:"logs",className:"group",children:h.jsx("p",{className:"text-xs p-3 text-mastra-el-3 group-data-[state=active]:text-mastra-el-5 group-data-[state=active]:border-b-2 group-data-[state=active]:pb-2.5 border-white",children:"Log Drains"})})]}),h.jsxs("div",{className:"h-full overflow-y-auto",children:[h.jsx(_i,{value:"run",children:e?h.jsx(h.Fragment,{children:t?h.jsx(cwt,{workflowId:e,setRunId:k}):h.jsx(fwt,{workflowId:e,setRunId:k,workflow:s,isLoading:i,createWorkflowRun:u.mutateAsync,streamWorkflow:p.mutateAsync,resumeWorkflow:d.mutateAsync,streamResult:g,isStreamingWorkflow:b,isResumingWorkflow:d.isPending,isCancellingWorkflowRun:S,cancelWorkflowRun:x})}):null}),h.jsx(_i,{value:"runs",children:h.jsx(mwt,{workflowId:e,runId:n==null?void 0:n.runId,isLoading:o,runs:(a==null?void 0:a.runs)||[],onPressRun:({workflowId:F,runId:I})=>r(`/workflows/${F}/graph/${I}`)})}),h.jsx(_i,{value:"logs",children:h.jsx(qCt,{runId:E})})]})]})})]})}function GCt(){const{workflowId:e}=Cs();return h.jsxs("main",{className:"flex-1 relative divide-x flex w-full h-full",children:[h.jsx("div",{className:"min-w-[325px] grow",children:h.jsx(Mvt,{workflowId:e})}),h.jsx(CB,{defaultWidth:20,minimumWidth:20,maximumWidth:60,className:"flex flex-col min-w-[325px] right-0 top-0 h-full z-20 bg-[#121212] [&>div:first-child]:-left-[1px] [&>div:first-child]:-right-[1px] [&>div:first-child]:w-[1px] [&>div:first-child]:bg-[#424242] [&>div:first-child]:hover:w-[2px] [&>div:first-child]:active:w-[2px]",children:h.jsx(H4,{workflowId:e,isLegacy:!0})})]})}function YCt(){const{workflowId:e}=Cs(),[t]=zSe(),n=t.get("runId"),r=t.get("stepName"),{data:s,isLoading:i}=$4(e),{traces:o,error:a,firstCallLoading:l}=qB((s==null?void 0:s.name)||"",!0);return i||l?h.jsxs("main",{className:"flex-1 relative grid grid-cols-[1fr_325px] divide-x h-full",children:[h.jsx("div",{className:"p-4",children:h.jsx($n,{className:"h-[600px]"})}),h.jsx("div",{className:"flex flex-col",children:h.jsx(H4,{workflowId:e})})]}):h.jsx(Y0e,{traces:o,error:a,runId:n||void 0,stepName:r||void 0})}function KCt(){const{workflowId:e}=Cs(),{data:t,isLoading:n}=$B(e),{traces:r,error:s,firstCallLoading:i}=qB((t==null?void 0:t.name)||"",!0);return n||i?h.jsxs("main",{className:"flex-1 relative grid grid-cols-[1fr_325px] divide-x h-full",children:[h.jsx("div",{className:"p-4",children:h.jsx($n,{className:"h-[600px]"})}),h.jsx("div",{className:"flex flex-col",children:h.jsx(H4,{workflowId:e,isLegacy:!0})})]}):h.jsx(Y0e,{traces:r,error:s})}const XCt=()=>{const[e,t]=A.useState([]),[n,r]=A.useState(!0);return A.useEffect(()=>{(async()=>{r(!0);try{const i=await Dn.getNetworks();t(i)}catch(i){t([]),console.error("Error fetching networks",i),Nr.error("Error fetching networks")}finally{r(!1)}})()},[]),{networks:e,isLoading:n}},KB=(e,t=!0)=>{const[n,r]=A.useState(null),[s,i]=A.useState(!0);return A.useEffect(()=>{e&&t&&(async()=>{i(!0);try{const a=Dn.getNetwork(e);r(await a.details())}catch(a){r(null),console.error("Error fetching network",a),Nr.error("Error fetching network")}finally{i(!1)}})()},[e,t]),{network:n,isLoading:s}},JCt=()=>{const[e,t]=A.useState([]),[n,r]=A.useState(!0);return A.useEffect(()=>{(async()=>{r(!0);try{const i=await Dn.getVNextNetworks();t(i)}catch(i){t([]),console.error("Error fetching networks",i),Nr.error("Error fetching networks")}finally{r(!1)}})()},[]),{vNextNetworks:e,isLoading:n}},XB=(e,t=!0)=>{const[n,r]=A.useState(null),[s,i]=A.useState(!0);return A.useEffect(()=>{e&&t&&(async()=>{i(!0);try{const a=Dn.getVNextNetwork(e);r(await a.details())}catch(a){r(null),console.error("Error fetching network",a),Nr.error("Error fetching network")}finally{i(!1)}})()},[e,t]),{vNextNetwork:n,isLoading:s}};function ZCt(){const e=xl(),{networks:t,isLoading:n}=XCt(),{vNextNetworks:r,isLoading:s}=JCt(),i=[...t,...r].length===0;return h.jsxs(yl,{children:[h.jsx(us,{children:h.jsx(Xu,{children:"Networks"})}),h.jsx(ho,{isCentered:i&&!n,children:h.jsx(bvt,{legacyNetworks:t,networks:r,isLoading:n||s,onClickRow:(o,a)=>{e(a?`/networks/v-next/${o}/chat`:`/networks/${o}/chat`)}})})]})}function QCt({networkName:e,networkId:t}){return h.jsxs(us,{children:[h.jsxs(Yd,{children:[h.jsx(Vr,{as:Zt,to:"/networks",children:"Networks"}),h.jsx(Vr,{as:Zt,to:`/networks/${t}`,isCurrent:!0,children:e})]}),h.jsx(kB,{children:h.jsx(hn,{as:Zt,to:`/networks/${t}/chat`,children:"Chat"})})]})}const MQ=({children:e,isVNext:t})=>{const{networkId:n}=Cs(),{network:r,isLoading:s}=KB(n,!t),{vNextNetwork:i,isLoading:o}=XB(n,t),a=t?o:s,l=t?i:r;return h.jsxs(yl,{children:[a?h.jsx(us,{children:h.jsx(Xu,{children:h.jsx($n,{className:"h-6 w-[200px]"})})}):h.jsx(QCt,{networkName:l==null?void 0:l.name,networkId:n}),e]})},jQ=({children:e})=>{const{workflowId:t,runId:n}=Cs(),{data:r,isLoading:s}=$4(t),{data:i}=y1e({workflowId:t});if(s)return h.jsx(yl,{children:h.jsx(us,{children:h.jsx(Xu,{children:h.jsx($n,{className:"h-6 w-[200px]"})})})});const o=i==null?void 0:i.runs.find(a=>a.runId===n);return h.jsx(PB,{snapshot:typeof(o==null?void 0:o.snapshot)=="object"?o.snapshot:void 0,children:h.jsxs(yl,{children:[h.jsx(kbe,{workflowName:(r==null?void 0:r.name)||"",workflowId:t,runId:n}),e]})})},ekt=Tp("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function zv({className:e,variant:t,...n}){return h.jsx("div",{className:$t(ekt({variant:t}),e),...n})}const tkt=()=>h.jsxs("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.90625 13.7C12.0543 13.7 14.6062 11.148 14.6062 8C14.6062 4.85198 12.0543 2.3 8.90625 2.3C5.75823 2.3 3.20625 4.85198 3.20625 8C3.20625 11.148 5.75823 13.7 8.90625 13.7ZM8.90625 15C12.7722 15 15.9062 11.866 15.9062 8C15.9062 4.13401 12.7722 1 8.90625 1C5.04026 1 1.90625 4.13401 1.90625 8C1.90625 11.866 5.04026 15 8.90625 15Z",fill:"currentColor"}),h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.4652 10.2358C14.5313 12.8424 12.0391 14.707 9.11131 14.707C9.0617 14.707 9.01222 14.7065 8.96286 14.7054C8.2899 13.0924 7.99638 11.3949 8.24344 9.55135C8.32897 9.24542 8.44745 8.7986 8.42849 8.39404C8.41982 8.20891 8.21671 8.23135 8.16572 8.40953C8.10356 8.62678 8.01682 8.85452 7.90686 9.05582C7.7808 9.07647 7.61987 9.09091 7.41708 9.07898C6.77839 9.04141 6.30758 8.70811 6.207 8.60035C6.0243 8.68313 6.01285 8.74449 6.0019 8.80318C5.99501 8.8401 5.98832 8.87596 5.93935 8.91543L5.92431 8.92772C5.83552 9.00073 5.7706 9.05411 5.56668 8.74463C5.38324 8.38491 5.24798 7.85962 5.79957 7.29461C6.1277 6.9585 6.78378 6.68405 6.87725 6.66968C6.87725 6.13802 7.29396 5.17963 8.48684 4.84422C9.74529 4.49038 11.198 4.84991 12.0373 6.07673C12.5645 6.84745 12.6162 7.29277 12.6557 7.6326C12.6968 7.98678 12.7247 8.22638 13.2636 8.60035C13.4125 8.70365 13.5621 8.80449 13.7129 8.90615C14.2705 9.28209 14.8452 9.66951 15.4652 10.2358ZM8.8836 6.73288C9.08285 6.73288 9.24437 6.57136 9.24437 6.37211C9.24437 6.17286 9.08285 6.01134 8.8836 6.01134C8.68436 6.01134 8.52284 6.17286 8.52284 6.37211C8.52284 6.57136 8.68436 6.73288 8.8836 6.73288Z",fill:"currentColor"})]}),nkt=Tp("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Dd=A.forwardRef(({className:e,...t},n)=>h.jsx(WT,{ref:n,className:$t(nkt(),e),...t}));Dd.displayName=WT.displayName;const rkt=Yfe,skt=vL,ikt=SL,CF=A.forwardRef(({className:e,...t},n)=>h.jsxs(UT,{ref:n,className:$t("relative flex w-full touch-none select-none items-center",e),...t,children:[h.jsx(Tfe,{className:"relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20",children:h.jsx(_fe,{className:"absolute h-full bg-primary/50"})}),h.jsx(Nfe,{className:"block h-4 w-4 rounded-full border border-primary/50 bg-white shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"})]}));CF.displayName=UT.displayName;function okt({network:e,isVNext:t}){var l,c,u,d,p,g,b;const{modelSettings:n,setModelSettings:r,chatWithLoop:s,setChatWithLoop:i,maxIterations:o,setMaxIterations:a}=A.useContext($C);return h.jsx(Z1,{className:"pt-2 px-4 pb-4 text-xs",children:h.jsxs("div",{className:"p-4 space-y-4",children:[h.jsxs("div",{children:[h.jsx("h3",{className:"text-sm font-medium text-mastra-el-5 mb-1",children:"Network Name"}),h.jsx("p",{className:"text-sm text-mastra-el-4",children:e.name})]}),h.jsxs("div",{children:[h.jsx("h3",{className:"text-sm font-medium text-mastra-el-5 mb-1",children:"Instructions"}),h.jsx("div",{className:"max-h-36 overflow-auto rounded border border-mastra-el-2 bg-mastra-bg-2 p-2",children:h.jsx("p",{className:"text-sm text-mastra-el-4",children:e.instructions||"No instructions provided"})})]}),h.jsxs("div",{children:[h.jsx("h3",{className:"text-sm font-medium text-mastra-el-5 mb-1",children:"Agents"}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(tkt,{}),h.jsxs(zv,{variant:"outline",className:"text-xs",children:[((l=e.agents)==null?void 0:l.length)||0," agent",((c=e.agents)==null?void 0:c.length)===1?"":"s"]})]})]}),t&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{children:[h.jsx("h3",{className:"text-sm font-medium text-mastra-el-5 mb-1",children:"Workflows"}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(kc,{}),h.jsxs(zv,{variant:"outline",className:"text-xs",children:[((u=e.workflows)==null?void 0:u.length)||0," workflow",((d=e.workflows)==null?void 0:d.length)===1?"":"s"]})]})]}),h.jsxs("div",{children:[h.jsx("h3",{className:"text-sm font-medium text-mastra-el-5 mb-1",children:"Tools"}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(gl,{}),h.jsxs(zv,{variant:"outline",className:"text-xs",children:[((p=e.tools)==null?void 0:p.length)||0," tool",((g=e.tools)==null?void 0:g.length)===1?"":"s"]})]})]})]}),h.jsxs("div",{children:[h.jsx("h3",{className:"text-sm font-medium text-mastra-el-5 mb-1",children:"Routing Model"}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(fte,{className:"h-4 w-4 text-mastra-el-4"}),h.jsx(zv,{className:"border-none text-xs",children:((b=e.routingModel)==null?void 0:b.modelId)||"Unknown"})]})]}),h.jsxs("div",{children:[h.jsx("h3",{className:"text-sm font-medium text-mastra-el-5 mb-1",children:"Routing Model Settings"}),t?h.jsxs("div",{className:"flex flex-col gap-3 text-mastra-el-5 pb-4",children:[h.jsx(qm,{label:"Chat Method",children:h.jsxs(_4,{orientation:"horizontal",value:s?"loop":"stream",onValueChange:x=>i(x==="loop"),className:"flex flex-row gap-4",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(Lg,{value:"loop",id:"loop",className:"text-icon6"}),h.jsx(Dd,{className:"text-icon6 text-ui-md",htmlFor:"loop",children:"Loop"})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(Lg,{value:"stream",id:"stream",className:"text-icon6"}),h.jsx(Dd,{className:"text-icon6 text-ui-md",htmlFor:"stream",children:"Stream"})]})]})}),s&&h.jsx(qm,{label:"Max Iterations",children:h.jsx(Ad,{type:"number",value:o,onChange:x=>a(x.target.value?Number(x.target.value):void 0)})})]}):h.jsxs("div",{className:"flex flex-col gap-3 text-mastra-el-5 pb-4",children:[h.jsx(qm,{label:"Temperature",children:h.jsxs("div",{className:"flex flex-row justify-between items-center gap-2",children:[h.jsx(CF,{value:[(n==null?void 0:n.temperature)??.5],max:1,step:.1,onValueChange:x=>r({...n,temperature:x[0]})}),h.jsx(Ue,{as:"p",variant:"ui-sm",className:"text-icon3",children:(n==null?void 0:n.temperature)??"n/a"})]})}),h.jsx(qm,{label:"Top P",children:h.jsxs("div",{className:"flex flex-row justify-between items-center gap-2",children:[h.jsx(CF,{onValueChange:x=>r({...n,topP:x[0]}),value:[(n==null?void 0:n.topP)??1],max:1,step:.1}),h.jsx(Ue,{as:"p",variant:"ui-sm",className:"text-icon3",children:(n==null?void 0:n.topP)??"n/a"})]})}),h.jsxs(rkt,{children:[h.jsxs(skt,{className:"w-full group flex flex-row justify-between items-center pt-1 py-2",children:[h.jsx("span",{className:"text-mastra-el-3 text-[12px] group-hover:text-mastra-el-5",children:"Extended Settings"}),h.jsx(iCe,{className:"w-4 h-4 text-mastra-el-3 group-hover:text-mastra-el-5"})]}),h.jsxs(ikt,{className:"flex flex-col gap-2 pt-2",children:[h.jsxs("div",{className:"flex flex-col gap-2",children:[h.jsx(Dd,{className:"text-mastra-el-3 text-[12px]",children:"Top K"}),h.jsx(Ad,{type:"number",value:n==null?void 0:n.topK,onChange:x=>r({...n,topK:x.target.value?Number(x.target.value):void 0})})]}),h.jsxs("div",{className:"flex flex-col gap-2",children:[h.jsx(Dd,{className:"text-mastra-el-3 text-[12px]",children:"Frequency Penalty"}),h.jsx(Ad,{type:"number",value:n==null?void 0:n.frequencyPenalty,onChange:x=>r({...n,frequencyPenalty:x.target.value?Number(x.target.value):void 0})})]}),h.jsxs("div",{className:"flex flex-col gap-2",children:[h.jsx(Dd,{className:"text-mastra-el-3 text-[12px]",children:"Presence Penalty"}),h.jsx(Ad,{type:"number",value:n==null?void 0:n.presencePenalty,onChange:x=>r({...n,presencePenalty:x.target.value?Number(x.target.value):void 0})})]}),h.jsxs("div",{className:"flex flex-col gap-2",children:[h.jsx(Dd,{className:"text-mastra-el-3 text-[12px]",children:"Max Tokens"}),h.jsx(Ad,{type:"number",value:n==null?void 0:n.maxTokens,onChange:x=>r({...n,maxTokens:x.target.value?Number(x.target.value):void 0})})]}),h.jsxs("div",{className:"flex flex-col gap-2",children:[h.jsx(Dd,{className:"text-mastra-el-3 text-[12px]",children:"Max Steps"}),h.jsx(Ad,{type:"number",value:n==null?void 0:n.maxSteps,onChange:x=>r({...n,maxSteps:x.target.value?Number(x.target.value):void 0})})]}),h.jsxs("div",{className:"flex flex-col gap-2",children:[h.jsx(Dd,{className:"text-mastra-el-3 text-[12px]",children:"Max Retries"}),h.jsx(Ad,{type:"number",value:n==null?void 0:n.maxRetries,onChange:x=>r({...n,maxRetries:x.target.value?Number(x.target.value):void 0})})]})]})]}),h.jsx("div",{className:"flex flex-row justify-start gap-2",children:h.jsxs(gu,{title:"Reset",variant:"ghost",className:"h-max p-0 group w-max bg-transparent hover:bg-transparent flex flex-row items-center gap-2 text-[12px]",onClick:()=>r({frequencyPenalty:void 0,presencePenalty:void 0,maxRetries:2,maxSteps:5,maxTokens:void 0,temperature:.5,topP:1,topK:void 0}),children:[h.jsx("span",{className:"text-mastra-el-3 text-[12px] group-hover:text-mastra-el-5",children:"Reset"}),h.jsx(CCe,{className:"!w-3 !h-3 text-mastra-el-3 group-hover:text-mastra-el-5"})]})})]})]})]})})}function akt({network:e}){return!e.agents||e.agents.length===0?h.jsx("div",{className:"p-4",children:h.jsx("p",{className:"text-sm text-mastra-el-4",children:"No agents found in this network."})}):h.jsxs("div",{className:"p-4",children:[h.jsx("h3",{className:"text-sm font-medium text-mastra-el-5 mb-3",children:"Network Agents"}),h.jsx("div",{className:"space-y-3",children:e.agents.map((t,n)=>h.jsx("div",{className:"bg-mastra-bg-2 py-2 px-3 rounded-md",children:h.jsxs("div",{className:"flex justify-between items-center",children:[h.jsxs("div",{className:"flex gap-1 items-center",children:[h.jsx(fte,{className:"h-3 w-3 text-mastra-el-4"}),h.jsx("h4",{className:"text-xs font-medium text-mastra-el-5",children:t.name})]}),h.jsxs(zv,{className:"border-none text-xs py-0.5 px-1.5",children:[t.provider,"/",t.modelId]})]})},n))})]})}function lkt({networkId:e,isVNext:t}){return h.jsx(Z1,{className:"pt-2 px-4 pb-4 text-xs w-[400px]",children:h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[h.jsx("p",{className:"text-mastra-el-3",children:"GET"}),h.jsxs("p",{className:"text-mastra-el-5",children:["/api/networks",t?"/v-next":""]})]}),h.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[h.jsx("p",{className:"text-mastra-el-3",children:"GET"}),h.jsxs("p",{className:"text-mastra-el-5",children:["/api/networks",t?"/v-next":"","/",e]})]}),h.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[h.jsx("p",{className:"text-mastra-el-3",children:"POST"}),h.jsxs("p",{className:"text-mastra-el-5",children:["/api/networks",t?"/v-next":"","/",e,"/generate"]})]}),h.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[h.jsx("p",{className:"text-mastra-el-3",children:"POST"}),h.jsxs("p",{className:"text-mastra-el-5",children:["/api/networks",t?"/v-next":"","/",e,"/stream"]})]}),t?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[h.jsx("p",{className:"text-mastra-el-3",children:"POST"}),h.jsxs("p",{className:"text-mastra-el-5",children:["/api/networks/v-next/",e,"/loop"]})]}),h.jsxs("div",{className:"grid grid-cols-[70px_1fr] gap-2",children:[h.jsx("p",{className:"text-mastra-el-3",children:"POST"}),h.jsxs("p",{className:"text-mastra-el-5",children:["/api/networks/v-next/",e,"/loop-stream"]})]})]}):null]})})}function ckt({network:e}){return!e.workflows||e.workflows.length===0?h.jsx("div",{className:"p-4",children:h.jsx("p",{className:"text-sm text-mastra-el-4",children:"No workflows found in this network."})}):h.jsxs("div",{className:"p-4",children:[h.jsx("h3",{className:"text-sm font-medium text-mastra-el-5 mb-3",children:"Network Workflows"}),h.jsx("div",{className:"space-y-3",children:e.workflows.map(t=>h.jsx("div",{className:"bg-mastra-bg-2 py-2 px-3 rounded-md",children:h.jsxs("div",{className:"flex justify-between items-center",children:[h.jsxs("div",{className:"flex gap-1 items-center",children:[h.jsx(kc,{className:"h-3 w-3 text-mastra-el-4"}),h.jsx("h4",{className:"text-xs font-medium text-mastra-el-5",children:t.name})]}),h.jsx("p",{className:"text-xs py-0.5 px-1.5 w-3/4 truncate",children:t.description})]})},t.name))})]})}function ukt({network:e}){return!e.tools||e.tools.length===0?h.jsx("div",{className:"p-4",children:h.jsx("p",{className:"text-sm text-mastra-el-4",children:"No tools found in this network."})}):h.jsxs("div",{className:"p-4",children:[h.jsx("h3",{className:"text-sm font-medium text-mastra-el-5 mb-3",children:"Network Tools"}),h.jsx("div",{className:"space-y-3",children:e.tools.map(t=>h.jsx("div",{className:"bg-mastra-bg-2 py-2 px-3 rounded-md",children:h.jsxs("div",{className:"flex justify-between items-center",children:[h.jsxs("div",{className:"flex gap-1 items-center",children:[h.jsx(gl,{className:"h-3 w-3 text-mastra-el-4"}),h.jsx("h4",{className:"text-xs font-medium text-mastra-el-5",children:t.id})]}),h.jsx("p",{className:"text-xs py-0.5 px-1.5 w-3/4 truncate",children:t.description})]})},t.id))})]})}function kF({networkId:e,isVNext:t}){const{network:n,isLoading:r}=KB(e,!t),{vNextNetwork:s,isLoading:i}=XB(e,t),o=t?s:n;return!o||(t?i:r)?null:h.jsxs(z4,{defaultValue:"details",className:"overflow-y-auto grid grid-rows-[auto_1fr] h-full",children:[h.jsxs(UC,{className:"flex shrink-0 border-b",children:[h.jsx(Ti,{value:"details",className:"group",children:h.jsx("p",{className:"text-xs p-3 text-mastra-el-3 group-data-[state=active]:text-mastra-el-5 group-data-[state=active]:border-b-2 group-data-[state=active]:pb-2.5 border-white",children:"Details"})}),h.jsx(Ti,{value:"agents",className:"group",children:h.jsx("p",{className:"text-xs p-3 text-mastra-el-3 group-data-[state=active]:text-mastra-el-5 group-data-[state=active]:border-b-2 group-data-[state=active]:pb-2.5 border-white",children:"Agents"})}),t?h.jsxs(h.Fragment,{children:[h.jsx(Ti,{value:"workflows",className:"group",children:h.jsx("p",{className:"text-xs p-3 text-mastra-el-3 group-data-[state=active]:text-mastra-el-5 group-data-[state=active]:border-b-2 group-data-[state=active]:pb-2.5 border-white",children:"Workflows"})}),h.jsx(Ti,{value:"tools",className:"group",children:h.jsx("p",{className:"text-xs p-3 text-mastra-el-3 group-data-[state=active]:text-mastra-el-5 group-data-[state=active]:border-b-2 group-data-[state=active]:pb-2.5 border-white",children:"Tools"})})]}):null,h.jsx(Ti,{value:"endpoints",className:"group",children:h.jsx("p",{className:"text-xs p-3 text-mastra-el-3 group-data-[state=active]:text-mastra-el-5 group-data-[state=active]:border-b-2 group-data-[state=active]:pb-2.5 border-white",children:"Endpoints"})})]}),h.jsxs("div",{className:"overflow-y-auto",children:[h.jsx(_i,{value:"details",children:h.jsx(okt,{network:o,isVNext:t})}),h.jsx(_i,{value:"agents",children:h.jsx(akt,{network:o})}),t?h.jsxs(h.Fragment,{children:[h.jsx(_i,{value:"workflows",children:h.jsx(ckt,{network:o})}),h.jsx(_i,{value:"tools",children:h.jsx(ukt,{network:o})})]}):null,h.jsx(_i,{value:"endpoints",children:h.jsx(lkt,{networkId:e,isVNext:t})})]})]})}function dkt(){const{networkId:e,threadId:t}=Cs(),{network:n,isLoading:r}=KB(e),{messages:s,isLoading:i}=p1e({agentId:e,threadId:t,memory:!1});return r?h.jsxs(ho,{isDivided:!0,children:[h.jsx("div",{}),h.jsx("div",{className:"flex flex-col",children:h.jsx(kF,{networkId:e})})]}):h.jsx(O0e,{children:h.jsxs(ho,{isDivided:!0,children:[h.jsx("div",{className:"grid overflow-y-auto relative bg-surface1 py-4",children:h.jsx(Rxt,{agentId:e,agentName:n==null?void 0:n.name,threadId:t,initialMessages:i?void 0:s})}),h.jsx("div",{className:"border-l-sm h-full overflow-y-auto",children:h.jsx(kF,{networkId:e})})]})})}var Ne=typeof window<"u"?window:void 0,Lo=typeof globalThis<"u"?globalThis:Ne,b1e=Array.prototype,FQ=b1e.forEach,IQ=b1e.indexOf,wa=Lo==null?void 0:Lo.navigator,Ct=Lo==null?void 0:Lo.document,Po=Lo==null?void 0:Lo.location,EF=Lo==null?void 0:Lo.fetch,DF=Lo!=null&&Lo.XMLHttpRequest&&"withCredentials"in new Lo.XMLHttpRequest?Lo.XMLHttpRequest:void 0,OQ=Lo==null?void 0:Lo.AbortController,ko=wa==null?void 0:wa.userAgent,Xt=Ne??{},Rd={DEBUG:!1,LIB_VERSION:"1.257.0"},v7="$copy_autocapture",hkt=["$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"],Vd=function(e){return e.GZipJS="gzip-js",e.Base64="base64",e}({}),fkt=["fatal","error","warning","log","info","debug"];function xn(e,t){return e.indexOf(t)!==-1}var V4=function(e){return e.trim()},AF=function(e){return e.replace(/^\$/,"")},pkt=Array.isArray,x1e=Object.prototype,v1e=x1e.hasOwnProperty,U4=x1e.toString,Fr=pkt||function(e){return U4.call(e)==="[object Array]"},cl=e=>typeof e=="function",Jr=e=>e===Object(e)&&!Fr(e),B0=e=>{if(Jr(e)){for(var t in e)if(v1e.call(e,t))return!1;return!0}return!1},lt=e=>e===void 0,Qr=e=>U4.call(e)=="[object String]",TF=e=>Qr(e)&&e.trim().length===0,Hp=e=>e===null,Yn=e=>lt(e)||Hp(e),Di=e=>U4.call(e)=="[object Number]",hu=e=>U4.call(e)==="[object Boolean]",mkt=e=>e instanceof FormData,gkt=e=>xn(hkt,e),w1e=e=>{var t={t:function(n){if(Ne&&(Rd.DEBUG||Xt.POSTHOG_DEBUG)&&!lt(Ne.console)&&Ne.console){for(var r=("__rrweb_original__"in Ne.console[n])?Ne.console[n].__rrweb_original__:Ne.console[n],s=arguments.length,i=new Array(s>1?s-1:0),o=1;o<s;o++)i[o-1]=arguments[o];r(e,...i)}},info:function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];t.t("log",...r)},warn:function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];t.t("warn",...r)},error:function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];t.t("error",...r)},critical:function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];console.error(e,...r)},uninitializedWarning:n=>{t.error("You must initialize PostHog before calling "+n)},createLogger:n=>w1e(e+" "+n)};return t},kt=w1e("[PostHog.js]"),ei=kt.createLogger,ykt=ei("[ExternalScriptsLoader]"),RQ=(e,t,n)=>{if(e.config.disable_external_dependency_loading)return ykt.warn(t+" was requested but loading of external scripts is disabled."),n("Loading of external scripts is disabled");var r=Ct==null?void 0:Ct.querySelectorAll("script");if(r){for(var s=0;s<r.length;s++)if(r[s].src===t)return n()}var i=()=>{if(!Ct)return n("document not found");var o=Ct.createElement("script");if(o.type="text/javascript",o.crossOrigin="anonymous",o.src=t,o.onload=c=>n(void 0,c),o.onerror=c=>n(c),e.config.prepare_external_dependency_script&&(o=e.config.prepare_external_dependency_script(o)),!o)return n("prepare_external_dependency_script returned null");var a,l=Ct.querySelectorAll("body > script");l.length>0?(a=l[0].parentNode)==null||a.insertBefore(o,l[0]):Ct.body.appendChild(o)};Ct!=null&&Ct.body?i():Ct==null||Ct.addEventListener("DOMContentLoaded",i)};function gt(){return gt=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},gt.apply(null,arguments)}function S1e(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}Xt.__PosthogExtensions__=Xt.__PosthogExtensions__||{},Xt.__PosthogExtensions__.loadExternalDependency=(e,t,n)=>{var r="/static/"+t+".js?v="+e.version;if(t==="remote-config"&&(r="/array/"+e.config.token+"/config.js"),t==="toolbar"){var s=3e5;r=r+"&t="+Math.floor(Date.now()/s)*s}var i=e.requestRouter.endpointFor("assets",r);RQ(e,i,n)},Xt.__PosthogExtensions__.loadSiteApp=(e,t,n)=>{var r=e.requestRouter.endpointFor("api",t);RQ(e,r,n)};var cA={};function ap(e,t,n){if(Fr(e)){if(FQ&&e.forEach===FQ)e.forEach(t,n);else if("length"in e&&e.length===+e.length){for(var r=0,s=e.length;r<s;r++)if(r in e&&t.call(n,e[r],r)===cA)return}}}function ur(e,t,n){if(!Yn(e)){if(Fr(e))return ap(e,t,n);if(mkt(e)){for(var r of e.entries())if(t.call(n,r[1],r[0])===cA)return}else for(var s in e)if(v1e.call(e,s)&&t.call(n,e[s],s)===cA)return}}var os=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return ap(n,function(s){for(var i in s)s[i]!==void 0&&(e[i]=s[i])}),e},W4=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return ap(n,function(s){ap(s,function(i){e.push(i)})}),e};function bD(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r}var LQ=function(e){try{return e()}catch{return}},bkt=function(e){return function(){try{for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(this,n)}catch(s){kt.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),kt.critical(s)}}},JB=function(e){var t={};return ur(e,function(n,r){(Qr(n)&&n.length>0||Di(n))&&(t[r]=n)}),t};function xkt(e,t){return n=e,r=i=>Qr(i)&&!Hp(t)?i.slice(0,t):i,s=new Set,function i(o,a){return o!==Object(o)?r?r(o,a):o:s.has(o)?void 0:(s.add(o),Fr(o)?(l=[],ap(o,c=>{l.push(i(c))})):(l={},ur(o,(c,u)=>{s.has(c)||(l[u]=i(c,u))})),l);var l}(n);var n,r,s}var vkt=["herokuapp.com","vercel.app","netlify.app"];function wkt(e){var t=e==null?void 0:e.hostname;if(!Qr(t))return!1;var n=t.split(".").slice(-2).join(".");for(var r of vkt)if(n===r)return!1;return!0}function C1e(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]}function Ur(e,t,n,r){var{capture:s=!1,passive:i=!0}=r??{};e==null||e.addEventListener(t,n,{capture:s,passive:i})}var k1e="$people_distinct_id",Hv="__alias",Vv="__timers",BQ="$autocapture_disabled_server_side",_F="$heatmaps_enabled_server_side",$Q="$exception_capture_enabled_server_side",NF="$error_tracking_suppression_rules",zQ="$web_vitals_enabled_server_side",E1e="$dead_clicks_enabled_server_side",HQ="$web_vitals_allowed_metrics",PF="$session_recording_enabled_server_side",VQ="$console_log_recording_enabled_server_side",UQ="$session_recording_network_payload_capture",WQ="$session_recording_masking",qQ="$session_recording_canvas_recording",GQ="$replay_sample_rate",YQ="$replay_minimum_duration",KQ="$replay_script_config",uA="$sesid",Uv="$session_is_sampled",MF="$session_recording_url_trigger_activated_session",jF="$session_recording_event_trigger_activated_session",$0="$enabled_feature_flags",xD="$early_access_features",FF="$feature_flag_details",Wv="$stored_person_properties",Fm="$stored_group_properties",IF="$surveys",wE="$surveys_activated",dA="$flag_call_reported",Pd="$user_state",OF="$client_session_props",RF="$capture_rate_limit",LF="$initial_campaign_params",BF="$initial_referrer_info",hA="$initial_person_info",fA="$epp",D1e="__POSTHOG_TOOLBAR__",SE="$posthog_cookieless",Skt=[k1e,Hv,"__cmpns",Vv,PF,_F,uA,$0,NF,Pd,xD,FF,Fm,Wv,IF,dA,OF,RF,LF,BF,fA,hA];function XQ(e){return e instanceof Element&&(e.id===D1e||!(e.closest==null||!e.closest(".toolbar-global-fade-container")))}function q4(e){return!!e&&e.nodeType===1}function lp(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function A1e(e){return!!e&&e.nodeType===3}function T1e(e){return!!e&&e.nodeType===11}function ZB(e){return e?V4(e).split(/\s+/):[]}function JQ(e){var t=Ne==null?void 0:Ne.location.href;return!!(t&&e&&e.some(n=>t.match(n)))}function pA(e){var t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return ZB(t)}function _1e(e){return Yn(e)?null:V4(e).split(/(\s+)/).filter(t=>d1(t)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function G4(e){var t="";return zF(e)&&!M1e(e)&&e.childNodes&&e.childNodes.length&&ur(e.childNodes,function(n){var r;A1e(n)&&n.textContent&&(t+=(r=_1e(n.textContent))!==null&&r!==void 0?r:"")}),V4(t)}function N1e(e){return lt(e.target)?e.srcElement||null:(t=e.target)!=null&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}var $F=["a","button","form","input","select","textarea","label"];function P1e(e){var t=e.parentNode;return!(!t||!q4(t))&&t}function Ckt(e,t,n,r,s){var i,o,a;if(n===void 0&&(n=void 0),!Ne||!e||lp(e,"html")||!q4(e)||(i=n)!=null&&i.url_allowlist&&!JQ(n.url_allowlist)||(o=n)!=null&&o.url_ignorelist&&JQ(n.url_ignorelist))return!1;if((a=n)!=null&&a.dom_event_allowlist){var l=n.dom_event_allowlist;if(l&&!l.some(S=>t.type===S))return!1}for(var c=!1,u=[e],d=!0,p=e;p.parentNode&&!lp(p,"body");)if(T1e(p.parentNode))u.push(p.parentNode.host),p=p.parentNode.host;else{if(!(d=P1e(p)))break;if(r||$F.indexOf(d.tagName.toLowerCase())>-1)c=!0;else{var g=Ne.getComputedStyle(d);g&&g.getPropertyValue("cursor")==="pointer"&&(c=!0)}u.push(d),p=d}if(!function(S,E){var k=E==null?void 0:E.element_allowlist;if(lt(k))return!0;var T,P=function(j){if(k.some(F=>j.tagName.toLowerCase()===F))return{v:!0}};for(var M of S)if(T=P(M))return T.v;return!1}(u,n)||!function(S,E){var k=E==null?void 0:E.css_selector_allowlist;if(lt(k))return!0;var T,P=function(j){if(k.some(F=>j.matches(F)))return{v:!0}};for(var M of S)if(T=P(M))return T.v;return!1}(u,n))return!1;var b=Ne.getComputedStyle(e);if(b&&b.getPropertyValue("cursor")==="pointer"&&t.type==="click")return!0;var x=e.tagName.toLowerCase();switch(x){case"html":return!1;case"form":return(s||["submit"]).indexOf(t.type)>=0;case"input":case"select":case"textarea":return(s||["change","click"]).indexOf(t.type)>=0;default:return c?(s||["click"]).indexOf(t.type)>=0:(s||["click"]).indexOf(t.type)>=0&&($F.indexOf(x)>-1||e.getAttribute("contenteditable")==="true")}}function zF(e){for(var t=e;t.parentNode&&!lp(t,"body");t=t.parentNode){var n=pA(t);if(xn(n,"ph-sensitive")||xn(n,"ph-no-capture"))return!1}if(xn(pA(e),"ph-include"))return!0;var r=e.type||"";if(Qr(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var s=e.name||e.id||"";return!(Qr(s)&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(s.replace(/[^a-zA-Z0-9]/g,"")))}function M1e(e){return!!(lp(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||lp(e,"select")||lp(e,"textarea")||e.getAttribute("contenteditable")==="true")}var j1e="(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})",kkt=new RegExp("^(?:"+j1e+")$"),Ekt=new RegExp(j1e),F1e="\\d{3}-?\\d{2}-?\\d{4}",Dkt=new RegExp("^("+F1e+")$"),Akt=new RegExp("("+F1e+")");function d1(e,t){return t===void 0&&(t=!0),!(Yn(e)||Qr(e)&&(e=V4(e),(t?kkt:Ekt).test((e||"").replace(/[- ]/g,""))||(t?Dkt:Akt).test(e)))}function I1e(e){var t=G4(e);return d1(t=(t+" "+O1e(e)).trim())?t:""}function O1e(e){var t="";return e&&e.childNodes&&e.childNodes.length&&ur(e.childNodes,function(n){var r;if(n&&((r=n.tagName)==null?void 0:r.toLowerCase())==="span")try{var s=G4(n);t=(t+" "+s).trim(),n.childNodes&&n.childNodes.length&&(t=(t+" "+O1e(n)).trim())}catch(i){kt.error("[AutoCapture]",i)}}),t}function Tkt(e){return function(t){var n=t.map(r=>{var s,i,o="";if(r.tag_name&&(o+=r.tag_name),r.attr_class)for(var a of(r.attr_class.sort(),r.attr_class))o+="."+a.replace(/"/g,"");var l=gt({},r.text?{text:r.text}:{},{"nth-child":(s=r.nth_child)!==null&&s!==void 0?s:0,"nth-of-type":(i=r.nth_of_type)!==null&&i!==void 0?i:0},r.href?{href:r.href}:{},r.attr_id?{attr_id:r.attr_id}:{},r.attributes),c={};return bD(l).sort((u,d)=>{var[p]=u,[g]=d;return p.localeCompare(g)}).forEach(u=>{var[d,p]=u;return c[ZQ(d.toString())]=ZQ(p.toString())}),o+=":",o+=bD(c).map(u=>{var[d,p]=u;return d+'="'+p+'"'}).join("")});return n.join(";")}(function(t){return t.map(n=>{var r,s,i={text:(r=n.$el_text)==null?void 0:r.slice(0,400),tag_name:n.tag_name,href:(s=n.attr__href)==null?void 0:s.slice(0,2048),attr_class:_kt(n),attr_id:n.attr__id,nth_child:n.nth_child,nth_of_type:n.nth_of_type,attributes:{}};return bD(n).filter(o=>{var[a]=o;return a.indexOf("attr__")===0}).forEach(o=>{var[a,l]=o;return i.attributes[a]=l}),i})}(e))}function ZQ(e){return e.replace(/"|\\"/g,'\\"')}function _kt(e){var t=e.attr__class;return t?Fr(t)?t:ZB(t):void 0}class R1e{constructor(){this.clicks=[]}isRageClick(t,n,r){var s=this.clicks[this.clicks.length-1];if(s&&Math.abs(t-s.x)+Math.abs(n-s.y)<30&&r-s.timestamp<1e3){if(this.clicks.push({x:t,y:n,timestamp:r}),this.clicks.length===3)return!0}else this.clicks=[{x:t,y:n,timestamp:r}];return!1}}var Nkt=["localhost","127.0.0.1"],h1=e=>{var t=Ct==null?void 0:Ct.createElement("a");return lt(t)?null:(t.href=e,t)},Pkt=function(e,t){var n,r;t===void 0&&(t="&");var s=[];return ur(e,function(i,o){lt(i)||lt(o)||o==="undefined"||(n=encodeURIComponent((a=>a instanceof File)(i)?i.name:i.toString()),r=encodeURIComponent(o),s[s.length]=r+"="+n)}),s.join(t)},mA=function(e,t){for(var n,r=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),s=0;s<r.length;s++){var i=r[s].split("=");if(i[0]===t){n=i;break}}if(!Fr(n)||n.length<2)return"";var o=n[1];try{o=decodeURIComponent(o)}catch{kt.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")},QB=function(e,t,n){if(!e||!t||!t.length)return e;for(var r=e.split("#"),s=r[0]||"",i=r[1],o=s.split("?"),a=o[1],l=o[0],c=(a||"").split("&"),u=[],d=0;d<c.length;d++){var p=c[d].split("=");Fr(p)&&(t.includes(p[0])?u.push(p[0]+"="+n):u.push(c[d]))}var g=l;return a!=null&&(g+="?"+u.join("&")),i!=null&&(g+="#"+i),g},gA=function(e,t){var n=e.match(new RegExp(t+"=([^&]*)"));return n?n[1]:null},QQ=ei("[AutoCapture]");function w7(e,t){return t.length>e?t.slice(0,e)+"...":t}function Mkt(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!q4(t));return t}function jkt(e,t,n,r){var s=e.tagName.toLowerCase(),i={tag_name:s};$F.indexOf(s)>-1&&!n&&(s.toLowerCase()==="a"||s.toLowerCase()==="button"?i.$el_text=w7(1024,I1e(e)):i.$el_text=w7(1024,G4(e)));var o=pA(e);o.length>0&&(i.classes=o.filter(function(u){return u!==""})),ur(e.attributes,function(u){var d;if((!M1e(e)||["name","id","class","aria-label"].indexOf(u.name)!==-1)&&(r==null||!r.includes(u.name))&&!t&&d1(u.value)&&(d=u.name,!Qr(d)||d.substring(0,10)!=="_ngcontent"&&d.substring(0,7)!=="_nghost")){var p=u.value;u.name==="class"&&(p=ZB(p).join(" ")),i["attr__"+u.name]=w7(1024,p)}});for(var a=1,l=1,c=e;c=Mkt(c);)a++,c.tagName===e.tagName&&l++;return i.nth_child=a,i.nth_of_type=l,i}function Fkt(e,t){for(var n,r,{e:s,maskAllElementAttributes:i,maskAllText:o,elementAttributeIgnoreList:a,elementsChainAsString:l}=t,c=[e],u=e;u.parentNode&&!lp(u,"body");)T1e(u.parentNode)?(c.push(u.parentNode.host),u=u.parentNode.host):(c.push(u.parentNode),u=u.parentNode);var d,p=[],g={},b=!1,x=!1;if(ur(c,P=>{var M=zF(P);P.tagName.toLowerCase()==="a"&&(b=P.getAttribute("href"),b=M&&b&&d1(b)&&b),xn(pA(P),"ph-no-capture")&&(x=!0),p.push(jkt(P,i,o,a));var j=function(F){if(!zF(F))return{};var I={};return ur(F.attributes,function(B){if(B.name&&B.name.indexOf("data-ph-capture-attribute")===0){var L=B.name.replace("data-ph-capture-attribute-",""),W=B.value;L&&W&&d1(W)&&(I[L]=W)}}),I}(P);os(g,j)}),x)return{props:{},explicitNoCapture:x};if(o||(e.tagName.toLowerCase()==="a"||e.tagName.toLowerCase()==="button"?p[0].$el_text=I1e(e):p[0].$el_text=G4(e)),b){var S,E;p[0].attr__href=b;var k=(S=h1(b))==null?void 0:S.host,T=Ne==null||(E=Ne.location)==null?void 0:E.host;k&&T&&k!==T&&(d=b)}return{props:os({$event_type:s.type,$ce_version:1},l?{}:{$elements:p},{$elements_chain:Tkt(p)},(n=p[0])!=null&&n.$el_text?{$el_text:(r=p[0])==null?void 0:r.$el_text}:{},d&&s.type==="click"?{$external_click_url:d}:{},g)}}class Ikt{constructor(t){this.i=!1,this.o=null,this.rageclicks=new R1e,this.h=!1,this.instance=t,this.m=null}get S(){var t,n,r=Jr(this.instance.config.autocapture)?this.instance.config.autocapture:{};return r.url_allowlist=(t=r.url_allowlist)==null?void 0:t.map(s=>new RegExp(s)),r.url_ignorelist=(n=r.url_ignorelist)==null?void 0:n.map(s=>new RegExp(s)),r}$(){if(this.isBrowserSupported()){if(Ne&&Ct){var t=r=>{r=r||(Ne==null?void 0:Ne.event);try{this.k(r)}catch(s){QQ.error("Failed to capture event",s)}};if(Ur(Ct,"submit",t,{capture:!0}),Ur(Ct,"change",t,{capture:!0}),Ur(Ct,"click",t,{capture:!0}),this.S.capture_copied_text){var n=r=>{r=r||(Ne==null?void 0:Ne.event),this.k(r,v7)};Ur(Ct,"copy",n,{capture:!0}),Ur(Ct,"cut",n,{capture:!0})}}}else QQ.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.i&&(this.$(),this.i=!0)}onRemoteConfig(t){t.elementsChainAsString&&(this.h=t.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[BQ]:!!t.autocapture_opt_out}),this.o=!!t.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(t){this.m=t}getElementSelectors(t){var n,r=[];return(n=this.m)==null||n.forEach(s=>{var i=Ct==null?void 0:Ct.querySelectorAll(s);i==null||i.forEach(o=>{t===o&&r.push(s)})}),r}get isEnabled(){var t,n,r=(t=this.instance.persistence)==null?void 0:t.props[BQ],s=this.o;if(Hp(s)&&!hu(r)&&!this.instance.I())return!1;var i=(n=this.o)!==null&&n!==void 0?n:!!r;return!!this.instance.config.autocapture&&!i}k(t,n){if(n===void 0&&(n="$autocapture"),this.isEnabled){var r,s=N1e(t);A1e(s)&&(s=s.parentNode||null),n==="$autocapture"&&t.type==="click"&&t instanceof MouseEvent&&this.instance.config.rageclick&&(r=this.rageclicks)!=null&&r.isRageClick(t.clientX,t.clientY,new Date().getTime())&&this.k(t,"$rageclick");var i=n===v7;if(s&&Ckt(s,t,this.S,i,i?["copy","cut"]:void 0)){var{props:o,explicitNoCapture:a}=Fkt(s,{e:t,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.S.element_attribute_ignorelist,elementsChainAsString:this.h});if(a)return!1;var l=this.getElementSelectors(s);if(l&&l.length>0&&(o.$element_selectors=l),n===v7){var c,u=_1e(Ne==null||(c=Ne.getSelection())==null?void 0:c.toString()),d=t.type||"clipboard";if(!u)return!1;o.$selected_content=u,o.$copy_type=d}return this.instance.capture(n,o),!0}}}isBrowserSupported(){return cl(Ct==null?void 0:Ct.querySelectorAll)}}Math.trunc||(Math.trunc=function(e){return e<0?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return Di(e)&&isFinite(e)&&Math.floor(e)===e});var eee="0123456789abcdef";class yA{constructor(t){if(this.bytes=t,t.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(t,n,r,s){if(!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(r)||!Number.isInteger(s)||t<0||n<0||r<0||s<0||t>0xffffffffffff||n>4095||r>1073741823||s>4294967295)throw new RangeError("invalid field value");var i=new Uint8Array(16);return i[0]=t/Math.pow(2,40),i[1]=t/Math.pow(2,32),i[2]=t/Math.pow(2,24),i[3]=t/Math.pow(2,16),i[4]=t/Math.pow(2,8),i[5]=t,i[6]=112|n>>>8,i[7]=n,i[8]=128|r>>>24,i[9]=r>>>16,i[10]=r>>>8,i[11]=r,i[12]=s>>>24,i[13]=s>>>16,i[14]=s>>>8,i[15]=s,new yA(i)}toString(){for(var t="",n=0;n<this.bytes.length;n++)t=t+eee.charAt(this.bytes[n]>>>4)+eee.charAt(15&this.bytes[n]),n!==3&&n!==5&&n!==7&&n!==9||(t+="-");if(t.length!==36)throw new Error("Invalid UUIDv7 was generated");return t}clone(){return new yA(this.bytes.slice(0))}equals(t){return this.compareTo(t)===0}compareTo(t){for(var n=0;n<16;n++){var r=this.bytes[n]-t.bytes[n];if(r!==0)return Math.sign(r)}return 0}}class Okt{constructor(){this.P=0,this.R=0,this.T=new Rkt}generate(){var t=this.generateOrAbort();if(lt(t)){this.P=0;var n=this.generateOrAbort();if(lt(n))throw new Error("Could not generate UUID after timestamp reset");return n}return t}generateOrAbort(){var t=Date.now();if(t>this.P)this.P=t,this.M();else{if(!(t+1e4>this.P))return;this.R++,this.R>4398046511103&&(this.P++,this.M())}return yA.fromFieldsV7(this.P,Math.trunc(this.R/Math.pow(2,30)),this.R&Math.pow(2,30)-1,this.T.nextUint32())}M(){this.R=1024*this.T.nextUint32()+(1023&this.T.nextUint32())}}var tee,L1e=e=>{if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var t=0;t<e.length;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};Ne&&!lt(Ne.crypto)&&crypto.getRandomValues&&(L1e=e=>crypto.getRandomValues(e));class Rkt{constructor(){this.C=new Uint32Array(8),this.F=1/0}nextUint32(){return this.F>=this.C.length&&(L1e(this.C),this.F=0),this.C[this.F++]}}var ep=()=>Lkt().toString(),Lkt=()=>(tee||(tee=new Okt)).generate(),Av="",Bkt=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i;function $kt(e,t){if(t){var n=function(s,i){if(i===void 0&&(i=Ct),Av)return Av;if(!i||["localhost","127.0.0.1"].includes(s))return"";for(var o=s.split("."),a=Math.min(o.length,8),l="dmn_chk_"+ep();!Av&&a--;){var c=o.slice(a).join("."),u=l+"=1;domain=."+c+";path=/";i.cookie=u+";max-age=3",i.cookie.includes(l)&&(i.cookie=u+";max-age=0",Av=c)}return Av}(e);if(!n){var r=(s=>{var i=s.match(Bkt);return i?i[0]:""})(e);r!==n&&kt.info("Warning: cookie subdomain discovery mismatch",r,n),n=r}return n?"; domain=."+n:""}return""}var Su={O:()=>!!Ct,A:function(e){kt.error("cookieStore error: "+e)},D:function(e){if(Ct){try{for(var t=e+"=",n=Ct.cookie.split(";").filter(i=>i.length),r=0;r<n.length;r++){for(var s=n[r];s.charAt(0)==" ";)s=s.substring(1,s.length);if(s.indexOf(t)===0)return decodeURIComponent(s.substring(t.length,s.length))}}catch{}return null}},L:function(e){var t;try{t=JSON.parse(Su.D(e))||{}}catch{}return t},j:function(e,t,n,r,s){if(Ct)try{var i="",o="",a=$kt(Ct.location.hostname,r);if(n){var l=new Date;l.setTime(l.getTime()+24*n*60*60*1e3),i="; expires="+l.toUTCString()}s&&(o="; secure");var c=e+"="+encodeURIComponent(JSON.stringify(t))+i+"; SameSite=Lax; path=/"+a+o;return c.length>3686.4&&kt.warn("cookieStore warning: large cookie, len="+c.length),Ct.cookie=c,c}catch{return}},N:function(e,t){try{Su.j(e,"",-1,t)}catch{return}}},S7=null,js={O:function(){if(!Hp(S7))return S7;var e=!0;if(lt(Ne))e=!1;else try{var t="__mplssupport__";js.j(t,"xyz"),js.D(t)!=='"xyz"'&&(e=!1),js.N(t)}catch{e=!1}return e||kt.error("localStorage unsupported; falling back to cookie store"),S7=e,e},A:function(e){kt.error("localStorage error: "+e)},D:function(e){try{return Ne==null?void 0:Ne.localStorage.getItem(e)}catch(t){js.A(t)}return null},L:function(e){try{return JSON.parse(js.D(e))||{}}catch{}return null},j:function(e,t){try{Ne==null||Ne.localStorage.setItem(e,JSON.stringify(t))}catch(n){js.A(n)}},N:function(e){try{Ne==null||Ne.localStorage.removeItem(e)}catch(t){js.A(t)}}},zkt=["distinct_id",uA,Uv,fA,hA],CE=gt({},js,{L:function(e){try{var t={};try{t=Su.L(e)||{}}catch{}var n=os(t,JSON.parse(js.D(e)||"{}"));return js.j(e,n),n}catch{}return null},j:function(e,t,n,r,s,i){try{js.j(e,t,void 0,void 0,i);var o={};zkt.forEach(a=>{t[a]&&(o[a]=t[a])}),Object.keys(o).length&&Su.j(e,o,n,r,s,i)}catch(a){js.A(a)}},N:function(e,t){try{Ne==null||Ne.localStorage.removeItem(e),Su.N(e,t)}catch(n){js.A(n)}}}),kE={},Hkt={O:function(){return!0},A:function(e){kt.error("memoryStorage error: "+e)},D:function(e){return kE[e]||null},L:function(e){return kE[e]||null},j:function(e,t){kE[e]=t},N:function(e){delete kE[e]}},Cm=null,ai={O:function(){if(!Hp(Cm))return Cm;if(Cm=!0,lt(Ne))Cm=!1;else try{var e="__support__";ai.j(e,"xyz"),ai.D(e)!=='"xyz"'&&(Cm=!1),ai.N(e)}catch{Cm=!1}return Cm},A:function(e){kt.error("sessionStorage error: ",e)},D:function(e){try{return Ne==null?void 0:Ne.sessionStorage.getItem(e)}catch(t){ai.A(t)}return null},L:function(e){try{return JSON.parse(ai.D(e))||null}catch{}return null},j:function(e,t){try{Ne==null||Ne.sessionStorage.setItem(e,JSON.stringify(t))}catch(n){ai.A(n)}},N:function(e){try{Ne==null||Ne.sessionStorage.removeItem(e)}catch(t){ai.A(t)}}},h0=function(e){return e[e.PENDING=-1]="PENDING",e[e.DENIED=0]="DENIED",e[e.GRANTED=1]="GRANTED",e}({});class Vkt{constructor(t){this._instance=t}get S(){return this._instance.config}get consent(){return this.U()?h0.DENIED:this.q}isOptedOut(){return this.consent===h0.DENIED||this.consent===h0.PENDING&&this.S.opt_out_capturing_by_default}isOptedIn(){return!this.isOptedOut()}optInOut(t){this.B.j(this.H,t?1:0,this.S.cookie_expiration,this.S.cross_subdomain_cookie,this.S.secure_cookie)}reset(){this.B.N(this.H,this.S.cross_subdomain_cookie)}get H(){var{token:t,opt_out_capturing_cookie_prefix:n}=this._instance.config;return(n||"__ph_opt_in_out_")+t}get q(){var t=this.B.D(this.H);return t==="1"?h0.GRANTED:t==="0"?h0.DENIED:h0.PENDING}get B(){if(!this.W){var t=this.S.opt_out_capturing_persistence_type;this.W=t==="localStorage"?js:Su;var n=t==="localStorage"?Su:js;n.D(this.H)&&(this.W.D(this.H)||this.optInOut(n.D(this.H)==="1"),n.N(this.H,this.S.cross_subdomain_cookie))}return this.W}U(){return!!this.S.respect_dnt&&!!C1e([wa==null?void 0:wa.doNotTrack,wa==null?void 0:wa.msDoNotTrack,Xt.doNotTrack],t=>xn([!0,1,"1","yes"],t))}}var EE=ei("[Dead Clicks]"),Ukt=()=>!0,Wkt=e=>{var t,n=!((t=e.instance.persistence)==null||!t.get_property(E1e)),r=e.instance.config.capture_dead_clicks;return hu(r)?r:n};class B1e{get lazyLoadedDeadClicksAutocapture(){return this.G}constructor(t,n,r){this.instance=t,this.isEnabled=n,this.onCapture=r,this.startIfEnabled()}onRemoteConfig(t){this.instance.persistence&&this.instance.persistence.register({[E1e]:t==null?void 0:t.captureDeadClicks}),this.startIfEnabled()}startIfEnabled(){this.isEnabled(this)&&this.J(()=>{this.V()})}J(t){var n,r;(n=Xt.__PosthogExtensions__)!=null&&n.initDeadClicksAutocapture&&t(),(r=Xt.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this.instance,"dead-clicks-autocapture",s=>{s?EE.error("failed to load script",s):t()})}V(){var t;if(Ct){if(!this.G&&(t=Xt.__PosthogExtensions__)!=null&&t.initDeadClicksAutocapture){var n=Jr(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};n.__onCapture=this.onCapture,this.G=Xt.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,n),this.G.start(Ct),EE.info("starting...")}}else EE.error("`document` not found. Cannot start.")}stop(){this.G&&(this.G.stop(),this.G=void 0,EE.info("stopping..."))}}function Sa(e,t,n,r,s){return t>n&&(kt.warn("min cannot be greater than max."),t=n),Di(e)?e>n?(r&&kt.warn(r+" cannot be greater than max: "+n+". Using max value instead."),n):e<t?(r&&kt.warn(r+" cannot be less than min: "+t+". Using min value instead."),t):e:(r&&kt.warn(r+" must be a number. using max or fallback. max: "+n+", fallback: "+s),Sa(s||n,t,n,r))}class $1e{constructor(t){this.K={},this.Y=()=>{Object.keys(this.K).forEach(n=>{var r=this.X(n)+this.Z;r>=this.tt?delete this.K[n]:this.it(n,r)})},this.X=n=>this.K[String(n)],this.it=(n,r)=>{this.K[String(n)]=r},this.consumeRateLimit=n=>{var r,s=(r=this.X(n))!==null&&r!==void 0?r:this.tt;if((s=Math.max(s-1,0))===0)return!0;this.it(n,s);var i,o=s===0;return o&&((i=this.et)==null||i.call(this,n)),o},this.rt=t,this.et=this.rt.et,this.tt=Sa(this.rt.bucketSize,0,100,"rate limiter bucket size"),this.Z=Sa(this.rt.refillRate,0,this.tt,"rate limiter refill rate"),this.st=Sa(this.rt.refillInterval,0,864e5,"rate limiter refill interval"),setInterval(()=>{this.Y()},this.st)}}var DE=ei("[ExceptionAutocapture]");class qkt{constructor(t){var n,r,s;this.nt=()=>{var i;if(Ne&&this.isEnabled&&(i=Xt.__PosthogExtensions__)!=null&&i.errorWrappingFunctions){var o=Xt.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,a=Xt.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,l=Xt.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.ot&&this.S.capture_unhandled_errors&&(this.ot=o(this.captureException.bind(this))),!this.lt&&this.S.capture_unhandled_rejections&&(this.lt=a(this.captureException.bind(this))),!this.ut&&this.S.capture_console_errors&&(this.ut=l(this.captureException.bind(this)))}catch(c){DE.error("failed to start",c),this.ht()}}},this._instance=t,this.dt=!((n=this._instance.persistence)==null||!n.props[$Q]),this.S=this.vt(),this.ct=new $1e({refillRate:(r=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)!==null&&r!==void 0?r:1,bucketSize:(s=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)!==null&&s!==void 0?s:10,refillInterval:1e4}),this.startIfEnabled()}vt(){var t=this._instance.config.capture_exceptions,n={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return Jr(t)?n=gt({},n,t):(lt(t)?this.dt:t)&&(n=gt({},n,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),n}get isEnabled(){return this.S.capture_console_errors||this.S.capture_unhandled_errors||this.S.capture_unhandled_rejections}startIfEnabled(){this.isEnabled&&(DE.info("enabled"),this.J(this.nt))}J(t){var n,r;(n=Xt.__PosthogExtensions__)!=null&&n.errorWrappingFunctions&&t(),(r=Xt.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"exception-autocapture",s=>{if(s)return DE.error("failed to load script",s);t()})}ht(){var t,n,r;(t=this.ot)==null||t.call(this),this.ot=void 0,(n=this.lt)==null||n.call(this),this.lt=void 0,(r=this.ut)==null||r.call(this),this.ut=void 0}onRemoteConfig(t){var n=t.autocaptureExceptions;this.dt=!!n||!1,this.S=this.vt(),this._instance.persistence&&this._instance.persistence.register({[$Q]:this.dt}),this.startIfEnabled()}captureException(t){var n,r=this._instance.requestRouter.endpointFor("ui");t.$exception_personURL=r+"/project/"+this._instance.config.token+"/person/"+this._instance.get_distinct_id();var s=(n=t.$exception_list[0].type)!==null&&n!==void 0?n:"Exception";this.ct.consumeRateLimit(s)?DE.info("Skipping exception capture because of client rate limiting.",{exception:t.$exception_list[0].type}):this._instance.exceptions.sendExceptionEvent(t)}}function z1e(e){return!lt(Event)&&H1e(e,Event)}function H1e(e,t){try{return e instanceof t}catch{return!1}}function V1e(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object DOMError]":return!0;default:return H1e(e,Error)}}function vD(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function C7(e){return vD(e,"DOMError")}var nee=/\(error: (.*)\)/,ree=50,z0="?";function k7(e,t,n,r){var s={platform:"web:javascript",filename:e,function:t==="<anonymous>"?z0:t,in_app:!0};return lt(n)||(s.lineno=n),lt(r)||(s.colno=r),s}var Gkt=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Ykt=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Kkt=/\((\S*)(?::(\d+))(?::(\d+))\)/,Xkt=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Jkt=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Zkt=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.sort((s,i)=>s[0]-i[0]).map(s=>s[1]);return function(s,i){i===void 0&&(i=0);for(var o=[],a=s.split(`
|
|
733
733
|
`),l=i;l<a.length;l++){var c=a[l];if(!(c.length>1024)){var u=nee.test(c)?c.replace(nee,"$1"):c;if(!u.match(/\S*Error: /)){for(var d of r){var p=d(u);if(p){o.push(p);break}}if(o.length>=ree)break}}}return function(g){if(!g.length)return[];var b=Array.from(g);return b.reverse(),b.slice(0,ree).map(x=>gt({},x,{filename:x.filename||Qkt(b).filename,function:x.function||z0}))}(o)}}([30,e=>{var t=Gkt.exec(e);if(t){var[,n,r,s]=t;return k7(n,z0,+r,+s)}var i=Ykt.exec(e);if(i){if(i[2]&&i[2].indexOf("eval")===0){var o=Kkt.exec(i[2]);o&&(i[2]=o[1],i[3]=o[2],i[4]=o[3])}var[a,l]=iee(i[1]||z0,i[2]);return k7(l,a,i[3]?+i[3]:void 0,i[4]?+i[4]:void 0)}}],[50,e=>{var t=Xkt.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){var n=Jkt.exec(t[3]);n&&(t[1]=t[1]||"eval",t[3]=n[1],t[4]=n[2],t[5]="")}var r=t[3],s=t[1]||z0;return[s,r]=iee(s,r),k7(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]);function Qkt(e){return e[e.length-1]||{}}var AE,see,E7,iee=(e,t)=>{var n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:z0,n?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},e2t=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;function e$(e,t){t===void 0&&(t=0);var n=e.stacktrace||e.stack||"",r=function(o){return o&&t2t.test(o.message)?1:0}(e);try{var s=Zkt,i=function(o,a){var l=function(c){var u=globalThis._posthogChunkIds;if(!u)return{};var d=Object.keys(u);return E7&&d.length===see||(see=d.length,E7=d.reduce((p,g)=>{AE||(AE={});var b=AE[g];if(b)p[b[0]]=b[1];else for(var x=c(g),S=x.length-1;S>=0;S--){var E=x[S],k=E==null?void 0:E.filename,T=u[g];if(k&&T){p[k]=T,AE[g]=[k,T];break}}return p},{})),E7}(a);return o.forEach(c=>{c.filename&&(c.chunk_id=l[c.filename])}),o}(s(n,r),s);return i.slice(0,i.length-t)}catch{}return[]}var t2t=/Minified React error #\d+;/i;function n2t(e,t){var n,r,s=e$(e),i=(n=t==null?void 0:t.handled)===null||n===void 0||n,o=(r=t==null?void 0:t.synthetic)!==null&&r!==void 0&&r;return{type:t!=null&&t.overrideExceptionType?t.overrideExceptionType:e.name,value:function(a){var l=a.message;return l.error&&typeof l.error.message=="string"?String(l.error.message):String(l)}(e),stacktrace:{frames:s,type:"raw"},mechanism:{handled:i,synthetic:o}}}function U1e(e,t){var n=n2t(e,t);return e.cause&&V1e(e.cause)&&e.cause!==e?[n,...U1e(e.cause,{handled:t==null?void 0:t.handled,synthetic:t==null?void 0:t.synthetic})]:[n]}function D7(e,t){return{$exception_list:U1e(e,t),$exception_level:"error"}}function A7(e,t){var n,r,s,i=(n=t==null?void 0:t.handled)===null||n===void 0||n,o=(r=t==null?void 0:t.synthetic)===null||r===void 0||r,a={type:t!=null&&t.overrideExceptionType?t.overrideExceptionType:(s=t==null?void 0:t.defaultExceptionType)!==null&&s!==void 0?s:"Error",value:e||(t==null?void 0:t.defaultExceptionMessage),mechanism:{handled:i,synthetic:o}};if(t!=null&&t.syntheticException){var l=e$(t.syntheticException,1);l.length&&(a.stacktrace={frames:l,type:"raw"})}return{$exception_list:[a],$exception_level:"error"}}function r2t(e){return Qr(e)&&!TF(e)&&fkt.indexOf(e)>=0}function s2t(e,t){var n,r,s=(n=t==null?void 0:t.handled)===null||n===void 0||n,i=(r=t==null?void 0:t.synthetic)===null||r===void 0||r,o=t!=null&&t.overrideExceptionType?t.overrideExceptionType:z1e(e)?e.constructor.name:"Error",a="Non-Error 'exception' captured with keys: "+function(u,d){d===void 0&&(d=40);var p=Object.keys(u);if(p.sort(),!p.length)return"[object has no keys]";for(var g=p.length;g>0;g--){var b=p.slice(0,g).join(", ");if(!(b.length>d))return g===p.length||b.length<=d?b:b.slice(0,d)+"..."}return""}(e),l={type:o,value:a,mechanism:{handled:s,synthetic:i}};if(t!=null&&t.syntheticException){var c=e$(t==null?void 0:t.syntheticException,1);c.length&&(l.stacktrace={frames:c,type:"raw"})}return{$exception_list:[l],$exception_level:r2t(e.level)?e.level:"error"}}function i2t(e,t){var{error:n,event:r}=e,s={$exception_list:[]},i=n||r;if(C7(i)||function(p){return vD(p,"DOMException")}(i)){var o=i;if(function(p){return"stack"in p}(i))s=D7(i,t);else{var a=o.name||(C7(o)?"DOMError":"DOMException"),l=o.message?a+": "+o.message:a;s=A7(l,gt({},t,{overrideExceptionType:C7(o)?"DOMError":"DOMException",defaultExceptionMessage:l}))}return"code"in o&&(s.$exception_DOMException_code=""+o.code),s}if(function(p){return vD(p,"ErrorEvent")}(i)&&i.error)return D7(i.error,t);if(V1e(i))return D7(i,t);if(function(p){return vD(p,"Object")}(i)||z1e(i))return s2t(i,t);if(lt(n)&&Qr(r)){var c="Error",u=r,d=r.match(e2t);return d&&(c=d[1],u=d[2]),A7(u,gt({},t,{overrideExceptionType:c,defaultExceptionMessage:u}))}return A7(i,t)}function oee(e,t,n){try{if(!(t in e))return()=>{};var r=e[t],s=n(r);return cl(s)&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=s,()=>{e[t]=r}}catch{return()=>{}}}class o2t{constructor(t){var n;this._instance=t,this.ft=(Ne==null||(n=Ne.location)==null?void 0:n.pathname)||""}get isEnabled(){return this._instance.config.capture_pageview==="history_change"}startIfEnabled(){this.isEnabled&&(kt.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.gt&&this.gt(),this.gt=void 0,kt.info("History API monitoring stopped")}monitorHistoryChanges(){var t,n;if(Ne&&Ne.history){var r=this;(t=Ne.history.pushState)!=null&&t.__posthog_wrapped__||oee(Ne.history,"pushState",s=>function(i,o,a){s.call(this,i,o,a),r._t("pushState")}),(n=Ne.history.replaceState)!=null&&n.__posthog_wrapped__||oee(Ne.history,"replaceState",s=>function(i,o,a){s.call(this,i,o,a),r._t("replaceState")}),this.bt()}}_t(t){try{var n,r=Ne==null||(n=Ne.location)==null?void 0:n.pathname;if(!r)return;r!==this.ft&&this.isEnabled&&this._instance.capture("$pageview",{navigation_type:t}),this.ft=r}catch(s){kt.error("Error capturing "+t+" pageview",s)}}bt(){if(!this.gt){var t=()=>{this._t("popstate")};Ur(Ne,"popstate",t),this.gt=()=>{Ne&&Ne.removeEventListener("popstate",t)}}}}function bA(e){var t,n;return((t=JSON.stringify(e,(n=[],function(r,s){if(Jr(s)){for(;n.length>0&&n[n.length-1]!==this;)n.pop();return n.includes(s)?"[Circular]":(n.push(s),s)}return s})))==null?void 0:t.length)||0}function HF(e,t){if(t===void 0&&(t=66060288e-1),e.size>=t&&e.data.length>1){var n=Math.floor(e.data.length/2),r=e.data.slice(0,n),s=e.data.slice(n);return[HF({size:bA(r),data:r,sessionId:e.sessionId,windowId:e.windowId}),HF({size:bA(s),data:s,sessionId:e.sessionId,windowId:e.windowId})].flatMap(i=>i)}return[e]}var Md=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(Md||{}),zl=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(zl||{}),VF="[SessionRecording]",UF="redacted",TE={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],maskRequestFn:e=>e,recordHeaders:!1,recordBody:!1,recordInitialRequests:!1,recordPerformance:!1,performanceEntryTypeToObserve:["first-input","navigation","paint","resource"],payloadSizeLimitBytes:1e6,payloadHostDenyList:[".lr-ingest.io",".ingest.sentry.io",".clarity.ms","analytics.google.com","bam.nr-data.net"]},a2t=["authorization","x-forwarded-for","authorization","cookie","set-cookie","x-api-key","x-real-ip","remote-addr","forwarded","proxy-authorization","x-csrf-token","x-csrftoken","x-xsrf-token"],l2t=["password","secret","passwd","api_key","apikey","auth","credentials","mysql_pwd","privatekey","private_key","token"],c2t=["/s/","/e/","/i/"];function aee(e,t,n,r){if(Yn(e))return e;var s=(t==null?void 0:t["content-length"])||function(i){return new Blob([i]).size}(e);return Qr(s)&&(s=parseInt(s)),s>n?VF+" "+r+" body too large to record ("+s+" bytes)":e}function lee(e,t){if(Yn(e))return e;var n=e;return d1(n,!1)||(n=VF+" "+t+" body "+UF),ur(l2t,r=>{var s,i;(s=n)!=null&&s.length&&((i=n)==null?void 0:i.indexOf(r))!==-1&&(n=VF+" "+t+" body "+UF+" as might contain: "+r)}),n}var u2t=(e,t)=>{var n,r,s,i={payloadSizeLimitBytes:TE.payloadSizeLimitBytes,performanceEntryTypeToObserve:[...TE.performanceEntryTypeToObserve],payloadHostDenyList:[...t.payloadHostDenyList||[],...TE.payloadHostDenyList]},o=e.session_recording.recordHeaders!==!1&&t.recordHeaders,a=e.session_recording.recordBody!==!1&&t.recordBody,l=e.capture_performance!==!1&&t.recordPerformance,c=(n=i,s=Math.min(1e6,(r=n.payloadSizeLimitBytes)!==null&&r!==void 0?r:1e6),p=>(p!=null&&p.requestBody&&(p.requestBody=aee(p.requestBody,p.requestHeaders,s,"Request")),p!=null&&p.responseBody&&(p.responseBody=aee(p.responseBody,p.responseHeaders,s,"Response")),p)),u=p=>{return c(((x,S)=>{var E,k=h1(x.name),T=S.indexOf("http")===0?(E=h1(S))==null?void 0:E.pathname:S;T==="/"&&(T="");var P=k==null?void 0:k.pathname.replace(T||"","");if(!(k&&P&&c2t.some(M=>P.indexOf(M)===0)))return x})((b=(g=p).requestHeaders,Yn(b)||ur(Object.keys(b??{}),x=>{a2t.includes(x.toLowerCase())&&(b[x]=UF)}),g),e.api_host));var g,b},d=cl(e.session_recording.maskNetworkRequestFn);return d&&cl(e.session_recording.maskCapturedNetworkRequestFn)&&kt.warn("Both `maskNetworkRequestFn` and `maskCapturedNetworkRequestFn` are defined. `maskNetworkRequestFn` will be ignored."),d&&(e.session_recording.maskCapturedNetworkRequestFn=p=>{var g=e.session_recording.maskNetworkRequestFn({url:p.name});return gt({},p,{name:g==null?void 0:g.url})}),i.maskRequestFn=cl(e.session_recording.maskCapturedNetworkRequestFn)?p=>{var g,b=u(p);return b&&(g=e.session_recording.maskCapturedNetworkRequestFn==null?void 0:e.session_recording.maskCapturedNetworkRequestFn(b))!==null&&g!==void 0?g:void 0}:p=>function(g){if(!lt(g))return g.requestBody=lee(g.requestBody,"Request"),g.responseBody=lee(g.responseBody,"Response"),g}(u(p)),gt({},TE,i,{recordHeaders:o,recordBody:a,recordPerformance:l,recordInitialRequests:l})};class d2t{constructor(t,n){var r,s;n===void 0&&(n={}),this.yt={},this.wt=i=>{if(!this.yt[i]){var o,a;this.yt[i]=!0;var l=this.St(i);(o=(a=this.rt).onBlockedNode)==null||o.call(a,i,l)}},this.$t=i=>{var o=this.St(i);if((o==null?void 0:o.nodeName)!=="svg"&&o instanceof Element){var a=o.closest("svg");if(a)return[this._rrweb.mirror.getId(a),a]}return[i,o]},this.St=i=>this._rrweb.mirror.getNode(i),this.kt=i=>{var o,a,l,c,u,d,p,g;return((o=(a=i.removes)==null?void 0:a.length)!==null&&o!==void 0?o:0)+((l=(c=i.attributes)==null?void 0:c.length)!==null&&l!==void 0?l:0)+((u=(d=i.texts)==null?void 0:d.length)!==null&&u!==void 0?u:0)+((p=(g=i.adds)==null?void 0:g.length)!==null&&p!==void 0?p:0)},this.throttleMutations=i=>{if(i.type!==3||i.data.source!==0)return i;var o=i.data,a=this.kt(o);o.attributes&&(o.attributes=o.attributes.filter(c=>{var[u]=this.$t(c.id);return!this.ct.consumeRateLimit(u)&&c}));var l=this.kt(o);return l!==0||a===l?i:void 0},this._rrweb=t,this.rt=n,this.ct=new $1e({bucketSize:(r=this.rt.bucketSize)!==null&&r!==void 0?r:100,refillRate:(s=this.rt.refillRate)!==null&&s!==void 0?s:10,refillInterval:1e3,et:this.wt})}}var ul=Uint8Array,Bo=Uint16Array,f1=Uint32Array,t$=new ul([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]),n$=new ul([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]),cee=new ul([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),W1e=function(e,t){for(var n=new Bo(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var s=new f1(n[30]);for(r=1;r<30;++r)for(var i=n[r];i<n[r+1];++i)s[i]=i-n[r]<<5|r;return[n,s]},q1e=W1e(t$,2),h2t=q1e[0],WF=q1e[1];h2t[28]=258,WF[258]=28;for(var uee=W1e(n$,0)[1],G1e=new Bo(32768),Ar=0;Ar<32768;++Ar){var km=(43690&Ar)>>>1|(21845&Ar)<<1;km=(61680&(km=(52428&km)>>>2|(13107&km)<<2))>>>4|(3855&km)<<4,G1e[Ar]=((65280&km)>>>8|(255&km)<<8)>>>1}var yw=function(e,t,n){for(var r=e.length,s=0,i=new Bo(t);s<r;++s)++i[e[s]-1];var o,a=new Bo(t);for(s=0;s<t;++s)a[s]=a[s-1]+i[s-1]<<1;for(o=new Bo(r),s=0;s<r;++s)o[s]=G1e[a[e[s]-1]++]>>>15-e[s];return o},zg=new ul(288);for(Ar=0;Ar<144;++Ar)zg[Ar]=8;for(Ar=144;Ar<256;++Ar)zg[Ar]=9;for(Ar=256;Ar<280;++Ar)zg[Ar]=7;for(Ar=280;Ar<288;++Ar)zg[Ar]=8;var xA=new ul(32);for(Ar=0;Ar<32;++Ar)xA[Ar]=5;var f2t=yw(zg,9),p2t=yw(xA,5),Y1e=function(e){return(e/8>>0)+(7&e&&1)},K1e=function(e,t,n){(n==null||n>e.length)&&(n=e.length);var r=new(e instanceof Bo?Bo:e instanceof f1?f1:ul)(n-t);return r.set(e.subarray(t,n)),r},Sd=function(e,t,n){n<<=7&t;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8},Tv=function(e,t,n){n<<=7&t;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},T7=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var s=n.length,i=n.slice();if(!s)return[new ul(0),0];if(s==1){var o=new ul(n[0].s+1);return o[n[0].s]=1,[o,1]}n.sort(function(M,j){return M.f-j.f}),n.push({s:-1,f:25001});var a=n[0],l=n[1],c=0,u=1,d=2;for(n[0]={s:-1,f:a.f+l.f,l:a,r:l};u!=s-1;)a=n[n[c].f<n[d].f?c++:d++],l=n[c!=u&&n[c].f<n[d].f?c++:d++],n[u++]={s:-1,f:a.f+l.f,l:a,r:l};var p=i[0].s;for(r=1;r<s;++r)i[r].s>p&&(p=i[r].s);var g=new Bo(p+1),b=qF(n[u-1],g,0);if(b>t){r=0;var x=0,S=b-t,E=1<<S;for(i.sort(function(M,j){return g[j.s]-g[M.s]||M.f-j.f});r<s;++r){var k=i[r].s;if(!(g[k]>t))break;x+=E-(1<<b-g[k]),g[k]=t}for(x>>>=S;x>0;){var T=i[r].s;g[T]<t?x-=1<<t-g[T]++-1:++r}for(;r>=0&&x;--r){var P=i[r].s;g[P]==t&&(--g[P],++x)}b=t}return[new ul(g),b]},qF=function(e,t,n){return e.s==-1?Math.max(qF(e.l,t,n+1),qF(e.r,t,n+1)):t[e.s]=n},dee=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new Bo(++t),r=0,s=e[0],i=1,o=function(l){n[r++]=l},a=1;a<=t;++a)if(e[a]==s&&a!=t)++i;else{if(!s&&i>2){for(;i>138;i-=138)o(32754);i>2&&(o(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(o(s),--i;i>6;i-=6)o(8304);i>2&&(o(i-3<<5|8208),i=0)}for(;i--;)o(s);i=1,s=e[a]}return[n.subarray(0,r),t]},_v=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},GF=function(e,t,n){var r=n.length,s=Y1e(t+2);e[s]=255&r,e[s+1]=r>>>8,e[s+2]=255^e[s],e[s+3]=255^e[s+1];for(var i=0;i<r;++i)e[s+i+4]=n[i];return 8*(s+4+r)},hee=function(e,t,n,r,s,i,o,a,l,c,u){Sd(t,u++,n),++s[256];for(var d=T7(s,15),p=d[0],g=d[1],b=T7(i,15),x=b[0],S=b[1],E=dee(p),k=E[0],T=E[1],P=dee(x),M=P[0],j=P[1],F=new Bo(19),I=0;I<k.length;++I)F[31&k[I]]++;for(I=0;I<M.length;++I)F[31&M[I]]++;for(var B=T7(F,7),L=B[0],W=B[1],$=19;$>4&&!L[cee[$-1]];--$);var J,V,Z,G,q=c+5<<3,z=_v(s,zg)+_v(i,xA)+o,Y=_v(s,p)+_v(i,x)+o+14+3*$+_v(F,L)+(2*F[16]+3*F[17]+7*F[18]);if(q<=z&&q<=Y)return GF(t,u,e.subarray(l,l+c));if(Sd(t,u,1+(Y<z)),u+=2,Y<z){J=yw(p,g),V=p,Z=yw(x,S),G=x;var U=yw(L,W);for(Sd(t,u,T-257),Sd(t,u+5,j-1),Sd(t,u+10,$-4),u+=14,I=0;I<$;++I)Sd(t,u+3*I,L[cee[I]]);u+=3*$;for(var X=[k,M],ne=0;ne<2;++ne){var H=X[ne];for(I=0;I<H.length;++I){var ee=31&H[I];Sd(t,u,U[ee]),u+=L[ee],ee>15&&(Sd(t,u,H[I]>>>5&127),u+=H[I]>>>12)}}}else J=f2t,V=zg,Z=p2t,G=xA;for(I=0;I<a;++I)if(r[I]>255){ee=r[I]>>>18&31,Tv(t,u,J[ee+257]),u+=V[ee+257],ee>7&&(Sd(t,u,r[I]>>>23&31),u+=t$[ee]);var ie=31&r[I];Tv(t,u,Z[ie]),u+=G[ie],ie>3&&(Tv(t,u,r[I]>>>5&8191),u+=n$[ie])}else Tv(t,u,J[r[I]]),u+=V[r[I]];return Tv(t,u,J[256]),u+V[256]},m2t=new f1([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),g2t=function(){for(var e=new f1(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(1&n&&3988292384)^n>>>1;e[t]=n}return e}(),y2t=function(){var e=4294967295;return{p:function(t){for(var n=e,r=0;r<t.length;++r)n=g2t[255&n^t[r]]^n>>>8;e=n},d:function(){return 4294967295^e}}},b2t=function(e,t,n,r,s){return function(i,o,a,l,c,u){var d=i.length,p=new ul(l+d+5*(1+Math.floor(d/7e3))+c),g=p.subarray(l,p.length-c),b=0;if(!o||d<8)for(var x=0;x<=d;x+=65535){var S=x+65535;S<d?b=GF(g,b,i.subarray(x,S)):(g[x]=u,b=GF(g,b,i.subarray(x,d)))}else{for(var E=m2t[o-1],k=E>>>13,T=8191&E,P=(1<<a)-1,M=new Bo(32768),j=new Bo(P+1),F=Math.ceil(a/3),I=2*F,B=function(Dt){return(i[Dt]^i[Dt+1]<<F^i[Dt+2]<<I)&P},L=new f1(25e3),W=new Bo(288),$=new Bo(32),J=0,V=0,Z=(x=0,0),G=0,q=0;x<d;++x){var z=B(x),Y=32767&x,U=j[z];if(M[Y]=U,j[z]=Y,G<=x){var X=d-x;if((J>7e3||Z>24576)&&X>423){b=hee(i,g,0,L,W,$,V,Z,q,x-q,b),Z=J=V=0,q=x;for(var ne=0;ne<286;++ne)W[ne]=0;for(ne=0;ne<30;++ne)$[ne]=0}var H=2,ee=0,ie=T,se=Y-U&32767;if(X>2&&z==B(x-se))for(var ae=Math.min(k,X)-1,le=Math.min(32767,x),pe=Math.min(258,X);se<=le&&--ie&&Y!=U;){if(i[x+H]==i[x+H-se]){for(var ye=0;ye<pe&&i[x+ye]==i[x+ye-se];++ye);if(ye>H){if(H=ye,ee=se,ye>ae)break;var Te=Math.min(se,ye-2),Ee=0;for(ne=0;ne<Te;++ne){var _e=x-se+ne+32768&32767,Fe=_e-M[_e]+32768&32767;Fe>Ee&&(Ee=Fe,U=_e)}}}se+=(Y=U)-(U=M[Y])+32768&32767}if(ee){L[Z++]=268435456|WF[H]<<18|uee[ee];var tt=31&WF[H],nt=31&uee[ee];V+=t$[tt]+n$[nt],++W[257+tt],++$[nt],G=x+H,++J}else L[Z++]=i[x],++W[i[x]]}}b=hee(i,g,u,L,W,$,V,Z,q,x-q,b)}return K1e(p,0,l+Y1e(b)+c)}(e,t.level==null?6:t.level,t.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,n,r,!0)},YF=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},x2t=function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:t.level==9?2:0,e[9]=3,t.mtime!=0&&YF(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;r<=n.length;++r)e[r+10]=n.charCodeAt(r)}},v2t=function(e){return 10+(e.filename&&e.filename.length+1||0)};function X1e(e,t){t===void 0&&(t={});var n=y2t(),r=e.length;n.p(e);var s=b2t(e,t,v2t(t),8),i=s.length;return x2t(s,t),YF(s,i-8,n.d()),YF(s,i-4,r),s}function J1e(e,t){var n=e.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(e);for(var r=new ul(e.length+(e.length>>>1)),s=0,i=function(c){r[s++]=c},o=0;o<n;++o){if(s+5>r.length){var a=new ul(s+8+(n-o<<1));a.set(r),r=a}var l=e.charCodeAt(o);l<128||t?i(l):l<2048?(i(192|l>>>6),i(128|63&l)):l>55295&&l<57344?(i(240|(l=65536+(1047552&l)|1023&e.charCodeAt(++o))>>>18),i(128|l>>>12&63),i(128|l>>>6&63),i(128|63&l)):(i(224|l>>>12),i(128|l>>>6&63),i(128|63&l))}return K1e(r,0,s)}function w2t(e,t){return function(n){for(var r=0,s=0;s<n.length;s++)r=(r<<5)-r+n.charCodeAt(s),r|=0;return Math.abs(r)}(e)%100<Sa(100*t,0,100)}var Dp="disabled",r$="sampled",vA="active",Hg="buffering",s$="paused",i$="trigger",Cu=i$+"_activated",Pi=i$+"_pending",Lu=i$+"_"+Dp;function fee(e,t){return t.some(n=>n.matching==="regex"&&new RegExp(n.url).test(e))}class Z1e{constructor(t){this.xt=t}triggerStatus(t){var n=this.xt.map(r=>r.triggerStatus(t));return n.includes(Cu)?Cu:n.includes(Pi)?Pi:Lu}stop(){this.xt.forEach(t=>t.stop())}}class Q1e{constructor(t){this.xt=t}triggerStatus(t){var n=new Set;for(var r of this.xt)n.add(r.triggerStatus(t));switch(n.delete(Lu),n.size){case 0:return Lu;case 1:return Array.from(n)[0];default:return Pi}}stop(){this.xt.forEach(t=>t.stop())}}class S2t{triggerStatus(){return Pi}stop(){}}class C2t{constructor(t){this.Et=[],this.It=[],this.urlBlocked=!1,this._instance=t}onRemoteConfig(t){var n,r;this.Et=((n=t.sessionRecording)==null?void 0:n.urlTriggers)||[],this.It=((r=t.sessionRecording)==null?void 0:r.urlBlocklist)||[]}Pt(t){var n;return this.Et.length===0?Lu:((n=this._instance)==null?void 0:n.get_property(MF))===t?Cu:Pi}triggerStatus(t){var n=this.Pt(t),r=n===Cu?Cu:n===Pi?Pi:Lu;return this._instance.register_for_session({$sdk_debug_replay_url_trigger_status:r}),r}checkUrlTriggerConditions(t,n,r){if(Ne!==void 0&&Ne.location.href){var s=Ne.location.href,i=this.urlBlocked,o=fee(s,this.It);i&&o||(o&&!i?t():!o&&i&&n(),fee(s,this.Et)&&r("url"))}}stop(){}}class k2t{constructor(t){this.linkedFlag=null,this.linkedFlagSeen=!1,this.Rt=()=>{},this._instance=t}triggerStatus(){var t=Pi;return Yn(this.linkedFlag)&&(t=Lu),this.linkedFlagSeen&&(t=Cu),this._instance.register_for_session({$sdk_debug_replay_linked_flag_trigger_status:t}),t}onRemoteConfig(t,n){var r;if(this.linkedFlag=((r=t.sessionRecording)==null?void 0:r.linkedFlag)||null,!Yn(this.linkedFlag)&&!this.linkedFlagSeen){var s=Qr(this.linkedFlag)?this.linkedFlag:this.linkedFlag.flag,i=Qr(this.linkedFlag)?null:this.linkedFlag.variant;this.Rt=this._instance.onFeatureFlags((o,a)=>{var l=!1;if(Jr(a)&&s in a){var c=a[s];l=hu(c)?c===!0:i?c===i:!!c}this.linkedFlagSeen=l,l&&n(s,i)})}}stop(){this.Rt()}}class E2t{constructor(t){this.Tt=[],this._instance=t}onRemoteConfig(t){var n;this.Tt=((n=t.sessionRecording)==null?void 0:n.eventTriggers)||[]}Mt(t){var n;return this.Tt.length===0?Lu:((n=this._instance)==null?void 0:n.get_property(jF))===t?Cu:Pi}triggerStatus(t){var n=this.Mt(t),r=n===Cu?Cu:n===Pi?Pi:Lu;return this._instance.register_for_session({$sdk_debug_replay_event_trigger_status:r}),r}stop(){}}function D2t(e){return e.isRecordingEnabled?Hg:Dp}function A2t(e){if(!e.receivedFlags)return Hg;if(!e.isRecordingEnabled)return Dp;if(e.urlTriggerMatching.urlBlocked)return s$;var t=e.isSampled===!0,n=new Z1e([e.eventTriggerMatching,e.urlTriggerMatching,e.linkedFlagMatching]).triggerStatus(e.sessionId);return t?r$:n===Cu?vA:n===Pi?Hg:e.isSampled===!1?Dp:vA}function T2t(e){if(!e.receivedFlags)return Hg;if(!e.isRecordingEnabled)return Dp;if(e.urlTriggerMatching.urlBlocked)return s$;var t=new Q1e([e.eventTriggerMatching,e.urlTriggerMatching,e.linkedFlagMatching]).triggerStatus(e.sessionId),n=t!==Lu,r=hu(e.isSampled);return n&&t===Pi?Hg:n&&t===Lu||r&&!e.isSampled?Dp:e.isSampled===!0?r$:vA}var qv="[SessionRecording]",wi=ei(qv);function _E(){var e;return Xt==null||(e=Xt.__PosthogExtensions__)==null||(e=e.rrweb)==null?void 0:e.record}var _2t=3e5,N2t=[zl.MouseMove,zl.MouseInteraction,zl.Scroll,zl.ViewportResize,zl.Input,zl.TouchMove,zl.MediaInteraction,zl.Drag],pee=e=>({rrwebMethod:e,enqueuedAt:Date.now(),attempt:1});function Em(e){return function(t,n){for(var r="",s=0;s<t.length;){var i=t[s++];r+=String.fromCharCode(i)}return r}(X1e(J1e(JSON.stringify(e))))}function mee(e){return e.type===Md.Custom&&e.data.tag==="sessionIdle"}class P2t{get sessionId(){return this.Ct}get Ft(){return this._instance.config.session_recording.session_idle_threshold_ms||3e5}get started(){return this.Ot}get At(){if(!this._instance.sessionManager)throw new Error(qv+" must be started with a valid sessionManager.");return this._instance.sessionManager}get Dt(){var t,n;return this.Lt.triggerStatus(this.sessionId)===Pi?6e4:(t=(n=this._instance.config.session_recording)==null?void 0:n.full_snapshot_interval_millis)!==null&&t!==void 0?t:_2t}get jt(){var t=this._instance.get_property(Uv);return hu(t)?t:null}get Nt(){var t,n,r=(t=this.C)==null?void 0:t.data[((n=this.C)==null?void 0:n.data.length)-1],{sessionStartTimestamp:s}=this.At.checkAndGetSessionAndWindowId(!0);return r?r.timestamp-s:null}get zt(){var t=!!this._instance.get_property(PF),n=!this._instance.config.disable_session_recording;return Ne&&t&&n}get Ut(){var t=!!this._instance.get_property(VQ),n=this._instance.config.enable_recording_console_log;return n??t}get qt(){var t,n,r,s,i,o,a=this._instance.config.session_recording.captureCanvas,l=this._instance.get_property(qQ),c=(t=(n=a==null?void 0:a.recordCanvas)!==null&&n!==void 0?n:l==null?void 0:l.enabled)!==null&&t!==void 0&&t,u=(r=(s=a==null?void 0:a.canvasFps)!==null&&s!==void 0?s:l==null?void 0:l.fps)!==null&&r!==void 0?r:4,d=(i=(o=a==null?void 0:a.canvasQuality)!==null&&o!==void 0?o:l==null?void 0:l.quality)!==null&&i!==void 0?i:.4;if(typeof d=="string"){var p=parseFloat(d);d=isNaN(p)?.4:p}return{enabled:c,fps:Sa(u,0,12,"canvas recording fps",4),quality:Sa(d,0,1,"canvas recording quality",.4)}}get Bt(){var t,n,r=this._instance.get_property(UQ),s={recordHeaders:(t=this._instance.config.session_recording)==null?void 0:t.recordHeaders,recordBody:(n=this._instance.config.session_recording)==null?void 0:n.recordBody},i=(s==null?void 0:s.recordHeaders)||(r==null?void 0:r.recordHeaders),o=(s==null?void 0:s.recordBody)||(r==null?void 0:r.recordBody),a=Jr(this._instance.config.capture_performance)?this._instance.config.capture_performance.network_timing:this._instance.config.capture_performance,l=!!(hu(a)?a:r!=null&&r.capturePerformance);return i||o||l?{recordHeaders:i,recordBody:o,recordPerformance:l}:void 0}get Ht(){var t,n,r,s,i,o,a=this._instance.get_property(WQ),l={maskAllInputs:(t=this._instance.config.session_recording)==null?void 0:t.maskAllInputs,maskTextSelector:(n=this._instance.config.session_recording)==null?void 0:n.maskTextSelector,blockSelector:(r=this._instance.config.session_recording)==null?void 0:r.blockSelector},c=(s=l==null?void 0:l.maskAllInputs)!==null&&s!==void 0?s:a==null?void 0:a.maskAllInputs,u=(i=l==null?void 0:l.maskTextSelector)!==null&&i!==void 0?i:a==null?void 0:a.maskTextSelector,d=(o=l==null?void 0:l.blockSelector)!==null&&o!==void 0?o:a==null?void 0:a.blockSelector;return lt(c)&<(u)&<(d)?void 0:{maskAllInputs:c==null||c,maskTextSelector:u,blockSelector:d}}get Wt(){var t=this._instance.get_property(GQ);return Di(t)?t:null}get Gt(){var t=this._instance.get_property(YQ);return Di(t)?t:null}get status(){return this.Jt?this.Vt({receivedFlags:this.Jt,isRecordingEnabled:this.zt,isSampled:this.jt,urlTriggerMatching:this.Kt,eventTriggerMatching:this.Yt,linkedFlagMatching:this.Xt,sessionId:this.sessionId}):Hg}constructor(t){if(this.Vt=D2t,this.Jt=!1,this.Qt=[],this.Zt="unknown",this.ti=Date.now(),this.Lt=new S2t,this.ii=void 0,this.ei=void 0,this.ri=void 0,this.si=void 0,this.ni=void 0,this._forceAllowLocalhostNetworkCapture=!1,this.oi=()=>{this.ai()},this.li=()=>{this.ui("browser offline",{})},this.hi=()=>{this.ui("browser online",{})},this.di=()=>{if(Ct!=null&&Ct.visibilityState){var s="window "+Ct.visibilityState;this.ui(s,{})}},this._instance=t,this.Ot=!1,this.vi="/s/",this.ci=void 0,this.Jt=!1,!this._instance.sessionManager)throw wi.error("started without valid sessionManager"),new Error(qv+" started without valid sessionManager. This is a bug.");if(this._instance.config.__preview_experimental_cookieless_mode)throw new Error(qv+" cannot be used with __preview_experimental_cookieless_mode.");this.Xt=new k2t(this._instance),this.Kt=new C2t(this._instance),this.Yt=new E2t(this._instance);var{sessionId:n,windowId:r}=this.At.checkAndGetSessionAndWindowId();this.Ct=n,this.fi=r,this.C=this.pi(),this.Ft>=this.At.sessionTimeoutMs&&wi.warn("session_idle_threshold_ms ("+this.Ft+") is greater than the session timeout ("+this.At.sessionTimeoutMs+"). Session will never be detected as idle")}startIfEnabledOrStop(t){this.zt?(this.gi(t),Ur(Ne,"beforeunload",this.oi),Ur(Ne,"offline",this.li),Ur(Ne,"online",this.hi),Ur(Ne,"visibilitychange",this.di),this.mi(),this.bi(),Yn(this.ii)&&(this.ii=this._instance.on("eventCaptured",n=>{try{if(n.event==="$pageview"){var r=n!=null&&n.properties.$current_url?this.yi(n==null?void 0:n.properties.$current_url):"";if(!r)return;this.ui("$pageview",{href:r})}}catch(s){wi.error("Could not add $pageview to rrweb session",s)}})),this.ei||(this.ei=this.At.onSessionId((n,r,s)=>{var i,o;s&&(this.ui("$session_id_change",{sessionId:n,windowId:r,changeReason:s}),(i=this._instance)==null||(i=i.persistence)==null||i.unregister(jF),(o=this._instance)==null||(o=o.persistence)==null||o.unregister(MF))}))):this.stopRecording()}stopRecording(){var t,n,r,s;this.Ot&&this.ci&&(this.ci(),this.ci=void 0,this.Ot=!1,Ne==null||Ne.removeEventListener("beforeunload",this.oi),Ne==null||Ne.removeEventListener("offline",this.li),Ne==null||Ne.removeEventListener("online",this.hi),Ne==null||Ne.removeEventListener("visibilitychange",this.di),this.pi(),clearInterval(this.wi),(t=this.ii)==null||t.call(this),this.ii=void 0,(n=this.ni)==null||n.call(this),this.ni=void 0,(r=this.ei)==null||r.call(this),this.ei=void 0,(s=this.si)==null||s.call(this),this.si=void 0,this.Yt.stop(),this.Kt.stop(),this.Xt.stop(),wi.info("stopped"))}Si(){var t;(t=this._instance.persistence)==null||t.unregister(Uv)}$i(t){var n,r=this.Ct!==t,s=this.Wt;if(Di(s)){var i=this.jt,o=r||!hu(i),a=o?w2t(t,s):i;o&&(a?this.ki(r$):wi.warn("Sample rate ("+s+") has determined that this sessionId ("+t+") will not be sent to the server."),this.ui("samplingDecisionMade",{sampleRate:s,isSampled:a})),(n=this._instance.persistence)==null||n.register({[Uv]:a})}else this.Si()}onRemoteConfig(t){var n,r,s,i;this.ui("$remote_config_received",t),this.xi(t),(n=t.sessionRecording)!=null&&n.endpoint&&(this.vi=(i=t.sessionRecording)==null?void 0:i.endpoint),this.mi(),((r=t.sessionRecording)==null?void 0:r.triggerMatchType)==="any"?(this.Vt=A2t,this.Lt=new Z1e([this.Yt,this.Kt])):(this.Vt=T2t,this.Lt=new Q1e([this.Yt,this.Kt])),this._instance.register_for_session({$sdk_debug_replay_remote_trigger_matching_config:(s=t.sessionRecording)==null?void 0:s.triggerMatchType}),this.Kt.onRemoteConfig(t),this.Yt.onRemoteConfig(t),this.Xt.onRemoteConfig(t,(o,a)=>{this.ki("linked_flag_matched",{flag:o,variant:a})}),this.Jt=!0,this.startIfEnabledOrStop()}mi(){Di(this.Wt)&&Yn(this.si)&&(this.si=this.At.onSessionId(t=>{this.$i(t)}))}xi(t){if(this._instance.persistence){var n,r=this._instance.persistence,s=()=>{var i,o,a,l,c,u,d,p,g,b=(i=t.sessionRecording)==null?void 0:i.sampleRate,x=Yn(b)?null:parseFloat(b);Yn(x)&&this.Si();var S=(o=t.sessionRecording)==null?void 0:o.minimumDurationMilliseconds;r.register({[PF]:!!t.sessionRecording,[VQ]:(a=t.sessionRecording)==null?void 0:a.consoleLogRecordingEnabled,[UQ]:gt({capturePerformance:t.capturePerformance},(l=t.sessionRecording)==null?void 0:l.networkPayloadCapture),[WQ]:(c=t.sessionRecording)==null?void 0:c.masking,[qQ]:{enabled:(u=t.sessionRecording)==null?void 0:u.recordCanvas,fps:(d=t.sessionRecording)==null?void 0:d.canvasFps,quality:(p=t.sessionRecording)==null?void 0:p.canvasQuality},[GQ]:x,[YQ]:lt(S)?null:S,[KQ]:(g=t.sessionRecording)==null?void 0:g.scriptConfig})};s(),(n=this.ri)==null||n.call(this),this.ri=this.At.onSessionId(s)}}log(t,n){var r;n===void 0&&(n="log"),(r=this._instance.sessionRecording)==null||r.onRRwebEmit({type:6,data:{plugin:"rrweb/console@1",payload:{level:n,trace:[],payload:[JSON.stringify(t)]}},timestamp:Date.now()})}gi(t){if(!lt(Object.assign)&&!lt(Array.from)&&!(this.Ot||this._instance.config.disable_session_recording||this._instance.consent.isOptedOut())){var n;this.Ot=!0,this.At.checkAndGetSessionAndWindowId(),_E()?this.Ei():(n=Xt.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,this.Ii,r=>{if(r)return wi.error("could not load recorder",r);this.Ei()}),wi.info("starting"),this.status===vA&&this.ki(t||"recording_initialized")}}get Ii(){var t;return((t=this._instance)==null||(t=t.persistence)==null||(t=t.get_property(KQ))==null?void 0:t.script)||"recorder"}Pi(t){var n;return t.type===3&&N2t.indexOf((n=t.data)==null?void 0:n.source)!==-1}Ri(t){var n=this.Pi(t);n||this.Zt||t.timestamp-this.ti>this.Ft&&(this.Zt=!0,clearInterval(this.wi),this.ui("sessionIdle",{eventTimestamp:t.timestamp,lastActivityTimestamp:this.ti,threshold:this.Ft,bufferLength:this.C.data.length,bufferSize:this.C.size}),this.ai());var r=!1;if(n&&(this.ti=t.timestamp,this.Zt)){var s=this.Zt==="unknown";this.Zt=!1,s||(this.ui("sessionNoLongerIdle",{reason:"user activity",type:t.type}),r=!0)}if(!this.Zt){var{windowId:i,sessionId:o}=this.At.checkAndGetSessionAndWindowId(!n,t.timestamp),a=this.Ct!==o,l=this.fi!==i;this.fi=i,this.Ct=o,a||l?(this.stopRecording(),this.startIfEnabledOrStop("session_id_changed")):r&&this.Ti()}}Mi(t){try{return t.rrwebMethod(),!0}catch(n){return this.Qt.length<10?this.Qt.push({enqueuedAt:t.enqueuedAt||Date.now(),attempt:t.attempt++,rrwebMethod:t.rrwebMethod}):wi.warn("could not emit queued rrweb event.",n,t),!1}}ui(t,n){return this.Mi(pee(()=>_E().addCustomEvent(t,n)))}Ci(){return this.Mi(pee(()=>_E().takeFullSnapshot()))}Ei(){var t,n,r,s,i={blockClass:"ph-no-capture",blockSelector:void 0,ignoreClass:"ph-ignore-input",maskTextClass:"ph-mask",maskTextSelector:void 0,maskTextFn:void 0,maskAllInputs:!0,maskInputOptions:{password:!0},maskInputFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0,recordCrossOriginIframes:!1},o=this._instance.config.session_recording;for(var[a,l]of Object.entries(o||{}))a in i&&(a==="maskInputOptions"?i.maskInputOptions=gt({password:!0},l):i[a]=l);this.qt&&this.qt.enabled&&(i.recordCanvas=!0,i.sampling={canvas:this.qt.fps},i.dataURLOptions={type:"image/webp",quality:this.qt.quality}),this.Ht&&(i.maskAllInputs=(n=this.Ht.maskAllInputs)===null||n===void 0||n,i.maskTextSelector=(r=this.Ht.maskTextSelector)!==null&&r!==void 0?r:void 0,i.blockSelector=(s=this.Ht.blockSelector)!==null&&s!==void 0?s:void 0);var c=_E();if(c){this.Fi=(t=this.Fi)!==null&&t!==void 0?t:new d2t(c,{refillRate:this._instance.config.session_recording.__mutationThrottlerRefillRate,bucketSize:this._instance.config.session_recording.__mutationThrottlerBucketSize,onBlockedNode:(d,p)=>{var g="Too many mutations on node '"+d+"'. Rate limiting. This could be due to SVG animations or something similar";wi.info(g,{node:p}),this.log(qv+" "+g,"warn")}});var u=this.Oi();this.ci=c(gt({emit:d=>{this.onRRwebEmit(d)},plugins:u},i)),this.ti=Date.now(),this.Zt=hu(this.Zt)?this.Zt:"unknown",this.ui("$session_options",{sessionRecordingOptions:i,activePlugins:u.map(d=>d==null?void 0:d.name)}),this.ui("$posthog_config",{config:this._instance.config})}else wi.error("onScriptLoaded was called but rrwebRecord is not available. This indicates something has gone wrong.")}Ti(){if(this.wi&&clearInterval(this.wi),this.Zt!==!0){var t=this.Dt;t&&(this.wi=setInterval(()=>{this.Ci()},t))}}Oi(){var t,n,r=[],s=(t=Xt.__PosthogExtensions__)==null||(t=t.rrwebPlugins)==null?void 0:t.getRecordConsolePlugin;s&&this.Ut&&r.push(s());var i=(n=Xt.__PosthogExtensions__)==null||(n=n.rrwebPlugins)==null?void 0:n.getRecordNetworkPlugin;return this.Bt&&cl(i)&&(!Nkt.includes(location.hostname)||this._forceAllowLocalhostNetworkCapture?r.push(i(u2t(this._instance.config,this.Bt))):wi.info("NetworkCapture not started because we are on localhost.")),r}onRRwebEmit(t){var n;if(this.Ai(),t&&Jr(t)){if(t.type===Md.Meta){var r=this.yi(t.data.href);if(this.Di=r,!r)return;t.data.href=r}else this.Li();if(this.Kt.checkUrlTriggerConditions(()=>this.ji(),()=>this.Ni(),p=>this.zi(p)),!this.Kt.urlBlocked||(s=t).type===Md.Custom&&s.data.tag==="recording paused"){var s;t.type===Md.FullSnapshot&&this.Ti(),t.type===Md.FullSnapshot&&this.Jt&&this.Lt.triggerStatus(this.sessionId)===Pi&&this.pi();var i=this.Fi?this.Fi.throttleMutations(t):t;if(i){var o=function(p){var g=p;if(g&&Jr(g)&&g.type===6&&Jr(g.data)&&g.data.plugin==="rrweb/console@1"){g.data.payload.payload.length>10&&(g.data.payload.payload=g.data.payload.payload.slice(0,10),g.data.payload.payload.push("...[truncated]"));for(var b=[],x=0;x<g.data.payload.payload.length;x++)g.data.payload.payload[x]&&g.data.payload.payload[x].length>2e3?b.push(g.data.payload.payload[x].slice(0,2e3)+"...[truncated]"):b.push(g.data.payload.payload[x]);return g.data.payload.payload=b,p}return p}(i);if(this.Ri(o),this.Zt!==!0||mee(o)){if(mee(o)){var a=o.data.payload;if(a){var l=a.lastActivityTimestamp,c=a.threshold;o.timestamp=l+c}}var u=(n=this._instance.config.session_recording.compress_events)===null||n===void 0||n?function(p){if(bA(p)<1024)return p;try{if(p.type===Md.FullSnapshot)return gt({},p,{data:Em(p.data),cv:"2024-10"});if(p.type===Md.IncrementalSnapshot&&p.data.source===zl.Mutation)return gt({},p,{cv:"2024-10",data:gt({},p.data,{texts:Em(p.data.texts),attributes:Em(p.data.attributes),removes:Em(p.data.removes),adds:Em(p.data.adds)})});if(p.type===Md.IncrementalSnapshot&&p.data.source===zl.StyleSheetRule)return gt({},p,{cv:"2024-10",data:gt({},p.data,{adds:p.data.adds?Em(p.data.adds):void 0,removes:p.data.removes?Em(p.data.removes):void 0})})}catch(g){wi.error("could not compress event - will use uncompressed event",g)}return p}(o):o,d={$snapshot_bytes:bA(u),$snapshot_data:u,$session_id:this.Ct,$window_id:this.fi};this.status!==Dp?this.Ui(d):this.pi()}}}}}Li(){if(!this._instance.config.capture_pageview&&Ne){var t=this.yi(Ne.location.href);this.Di!==t&&(this.ui("$url_changed",{href:t}),this.Di=t)}}Ai(){if(this.Qt.length){var t=[...this.Qt];this.Qt=[],t.forEach(n=>{Date.now()-n.enqueuedAt<=2e3&&this.Mi(n)})}}yi(t){var n=this._instance.config.session_recording;if(n.maskNetworkRequestFn){var r,s={url:t};return(r=s=n.maskNetworkRequestFn(s))==null?void 0:r.url}return t}pi(){return this.C={size:0,data:[],sessionId:this.Ct,windowId:this.fi},this.C}ai(){this.qi&&(clearTimeout(this.qi),this.qi=void 0);var t=this.Gt,n=this.Nt,r=Di(n)&&n>=0,s=Di(t)&&r&&n<t;return this.status===Hg||this.status===s$||this.status===Dp||s?(this.qi=setTimeout(()=>{this.ai()},2e3),this.C):(this.C.data.length>0&&HF(this.C).forEach(i=>{this.Bi({$snapshot_bytes:i.size,$snapshot_data:i.data,$session_id:i.sessionId,$window_id:i.windowId,$lib:"web",$lib_version:Rd.LIB_VERSION})}),this.pi())}Ui(t){var n,r=2+(((n=this.C)==null?void 0:n.data.length)||0);!this.Zt&&(this.C.size+t.$snapshot_bytes+r>943718.4||this.C.sessionId!==this.Ct)&&(this.C=this.ai()),this.C.size+=t.$snapshot_bytes,this.C.data.push(t.$snapshot_data),this.qi||this.Zt||(this.qi=setTimeout(()=>{this.ai()},2e3))}Bi(t){this._instance.capture("$snapshot",t,{_url:this._instance.requestRouter.endpointFor("api",this.vi),_noTruncate:!0,_batchKey:"recordings",skip_client_rate_limiting:!0})}zi(t){var n;this.Lt.triggerStatus(this.sessionId)===Pi&&((n=this._instance)==null||(n=n.persistence)==null||n.register({[t==="url"?MF:jF]:this.Ct}),this.ai(),this.ki(t+"_trigger_matched"))}ji(){this.Kt.urlBlocked||(this.Kt.urlBlocked=!0,clearInterval(this.wi),wi.info("recording paused due to URL blocker"),this.ui("recording paused",{reason:"url blocker"}))}Ni(){this.Kt.urlBlocked&&(this.Kt.urlBlocked=!1,this.Ci(),this.Ti(),this.ui("recording resumed",{reason:"left blocked url"}),wi.info("recording resumed"))}bi(){this.Yt.Tt.length!==0&&Yn(this.ni)&&(this.ni=this._instance.on("eventCaptured",t=>{try{this.Yt.Tt.includes(t.event)&&this.zi("event")}catch(n){wi.error("Could not activate event trigger",n)}}))}overrideLinkedFlag(){this.Xt.linkedFlagSeen=!0,this.Ci(),this.ki("linked_flag_overridden")}overrideSampling(){var t;(t=this._instance.persistence)==null||t.register({[Uv]:!0}),this.Ci(),this.ki("sampling_overridden")}overrideTrigger(t){this.zi(t)}ki(t,n){this._instance.register_for_session({$session_recording_start_reason:t}),wi.info(t.replace("_"," "),n),xn(["recording_initialized","session_id_changed"],t)||this.ui(t,n)}get sdkDebugProperties(){var{sessionStartTimestamp:t}=this.At.checkAndGetSessionAndWindowId(!0);return{$recording_status:this.status,$sdk_debug_replay_internal_buffer_length:this.C.data.length,$sdk_debug_replay_internal_buffer_size:this.C.size,$sdk_debug_current_session_duration:this.Nt,$sdk_debug_session_start:t}}}var _7=ei("[SegmentIntegration]");function M2t(e,t){var n=e.config.segment;if(!n)return t();(function(r,s){var i=r.config.segment;if(!i)return s();var o=l=>{var c=()=>l.anonymousId()||ep();r.config.get_device_id=c,l.id()&&(r.register({distinct_id:l.id(),$device_id:c()}),r.persistence.set_property(Pd,"identified")),s()},a=i.user();"then"in a&&cl(a.then)?a.then(l=>o(l)):o(a)})(e,()=>{n.register((r=>{Promise&&Promise.resolve||_7.warn("This browser does not have Promise support, and can not use the segment integration");var s=(i,o)=>{if(!o)return i;i.event.userId||i.event.anonymousId===r.get_distinct_id()||(_7.info("No userId set, resetting PostHog"),r.reset()),i.event.userId&&i.event.userId!==r.get_distinct_id()&&(_7.info("UserId set, identifying with PostHog"),r.identify(i.event.userId));var a=r.calculateEventProperties(o,i.event.properties);return i.event.properties=Object.assign({},a,i.event.properties),i};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:i=>s(i,i.event.event),page:i=>s(i,"$pageview"),identify:i=>s(i,"$identify"),screen:i=>s(i,"$screen")}})(e)).then(()=>{t()})})}var exe="posthog-js";function txe(e,t){var{organization:n,projectId:r,prefix:s,severityAllowList:i=["error"]}=t===void 0?{}:t;return o=>{var a,l,c,u,d;if(!(i==="*"||i.includes(o.level))||!e.__loaded)return o;o.tags||(o.tags={});var p=e.requestRouter.endpointFor("ui","/project/"+e.config.token+"/person/"+e.get_distinct_id());o.tags["PostHog Person URL"]=p,e.sessionRecordingStarted()&&(o.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var g=((a=o.exception)==null?void 0:a.values)||[],b=g.map(S=>gt({},S,{stacktrace:S.stacktrace?gt({},S.stacktrace,{type:"raw",frames:(S.stacktrace.frames||[]).map(E=>gt({},E,{platform:"web:javascript"}))}):void 0})),x={$exception_message:((l=g[0])==null?void 0:l.value)||o.message,$exception_type:(c=g[0])==null?void 0:c.type,$exception_personURL:p,$exception_level:o.level,$exception_list:b,$sentry_event_id:o.event_id,$sentry_exception:o.exception,$sentry_exception_message:((u=g[0])==null?void 0:u.value)||o.message,$sentry_exception_type:(d=g[0])==null?void 0:d.type,$sentry_tags:o.tags};return n&&r&&(x.$sentry_url=(s||"https://sentry.io/organizations/")+n+"/issues/?project="+r+"&query="+o.event_id),e.exceptions.sendExceptionEvent(x),o}}class j2t{constructor(t,n,r,s,i){this.name=exe,this.setupOnce=function(o){o(txe(t,{organization:n,projectId:r,prefix:s,severityAllowList:i}))}}}var F2t=Ne!=null&&Ne.location?gA(Ne.location.hash,"__posthog")||gA(location.hash,"state"):null,gee="_postHogToolbarParams",yee=ei("[Toolbar]"),Pf=function(e){return e[e.UNINITIALIZED=0]="UNINITIALIZED",e[e.LOADING=1]="LOADING",e[e.LOADED=2]="LOADED",e}(Pf||{});class I2t{constructor(t){this.instance=t}Hi(t){Xt.ph_toolbar_state=t}Wi(){var t;return(t=Xt.ph_toolbar_state)!==null&&t!==void 0?t:Pf.UNINITIALIZED}maybeLoadToolbar(t,n,r){if(t===void 0&&(t=void 0),n===void 0&&(n=void 0),r===void 0&&(r=void 0),!Ne||!Ct)return!1;t=t??Ne.location,r=r??Ne.history;try{if(!n){try{Ne.localStorage.setItem("test","test"),Ne.localStorage.removeItem("test")}catch{return!1}n=Ne==null?void 0:Ne.localStorage}var s,i=F2t||gA(t.hash,"__posthog")||gA(t.hash,"state"),o=i?LQ(()=>JSON.parse(atob(decodeURIComponent(i))))||LQ(()=>JSON.parse(decodeURIComponent(i))):null;return o&&o.action==="ph_authorize"?((s=o).source="url",s&&Object.keys(s).length>0&&(o.desiredHash?t.hash=o.desiredHash:r?r.replaceState(r.state,"",t.pathname+t.search):t.hash="")):((s=JSON.parse(n.getItem(gee)||"{}")).source="localstorage",delete s.userIntent),!(!s.token||this.instance.config.token!==s.token)&&(this.loadToolbar(s),!0)}catch{return!1}}Gi(t){var n=Xt.ph_load_toolbar||Xt.ph_load_editor;!Yn(n)&&cl(n)?n(t,this.instance):yee.warn("No toolbar load function found")}loadToolbar(t){var n=!(Ct==null||!Ct.getElementById(D1e));if(!Ne||n)return!1;var r=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,s=gt({token:this.instance.config.token},t,{apiURL:this.instance.requestRouter.endpointFor("ui")},r?{instrument:!1}:{});if(Ne.localStorage.setItem(gee,JSON.stringify(gt({},s,{source:void 0}))),this.Wi()===Pf.LOADED)this.Gi(s);else if(this.Wi()===Pf.UNINITIALIZED){var i;this.Hi(Pf.LOADING),(i=Xt.__PosthogExtensions__)==null||i.loadExternalDependency==null||i.loadExternalDependency(this.instance,"toolbar",o=>{if(o)return yee.error("[Toolbar] Failed to load",o),void this.Hi(Pf.UNINITIALIZED);this.Hi(Pf.LOADED),this.Gi(s)}),Ur(Ne,"turbolinks:load",()=>{this.Hi(Pf.UNINITIALIZED),this.loadToolbar(s)})}return!0}Ji(t){return this.loadToolbar(t)}maybeLoadEditor(t,n,r){return t===void 0&&(t=void 0),n===void 0&&(n=void 0),r===void 0&&(r=void 0),this.maybeLoadToolbar(t,n,r)}}var O2t=ei("[TracingHeaders]");class R2t{constructor(t){this.Vi=void 0,this.Ki=void 0,this.nt=()=>{var n,r;lt(this.Vi)&&((n=Xt.__PosthogExtensions__)==null||(n=n.tracingHeadersPatchFns)==null||n._patchXHR(this._instance.get_distinct_id(),this._instance.sessionManager)),lt(this.Ki)&&((r=Xt.__PosthogExtensions__)==null||(r=r.tracingHeadersPatchFns)==null||r._patchFetch(this._instance.get_distinct_id(),this._instance.sessionManager))},this._instance=t}J(t){var n,r;(n=Xt.__PosthogExtensions__)!=null&&n.tracingHeadersPatchFns&&t(),(r=Xt.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"tracing-headers",s=>{if(s)return O2t.error("failed to load script",s);t()})}startIfEnabledOrStop(){var t,n;this._instance.config.__add_tracing_headers?this.J(this.nt):((t=this.Vi)==null||t.call(this),(n=this.Ki)==null||n.call(this),this.Vi=void 0,this.Ki=void 0)}}var Df=ei("[Web Vitals]"),bee=9e5;class L2t{constructor(t){var n;this.Yi=!1,this.i=!1,this.C={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.Xi=()=>{clearTimeout(this.Qi),this.C.metrics.length!==0&&(this._instance.capture("$web_vitals",this.C.metrics.reduce((r,s)=>gt({},r,{["$web_vitals_"+s.name+"_event"]:gt({},s),["$web_vitals_"+s.name+"_value"]:s.value}),{})),this.C={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.Zi=r=>{var s,i=(s=this._instance.sessionManager)==null?void 0:s.checkAndGetSessionAndWindowId(!0);if(lt(i))Df.error("Could not read session ID. Dropping metrics!");else{this.C=this.C||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var o=this.te();lt(o)||(Yn(r==null?void 0:r.name)||Yn(r==null?void 0:r.value)?Df.error("Invalid metric received",r):this.ie&&r.value>=this.ie?Df.error("Ignoring metric with value >= "+this.ie,r):(this.C.url!==o&&(this.Xi(),this.Qi=setTimeout(this.Xi,this.flushToCaptureTimeoutMs)),lt(this.C.url)&&(this.C.url=o),this.C.firstMetricTimestamp=lt(this.C.firstMetricTimestamp)?Date.now():this.C.firstMetricTimestamp,r.attribution&&r.attribution.interactionTargetElement&&(r.attribution.interactionTargetElement=void 0),this.C.metrics.push(gt({},r,{$current_url:o,$session_id:i.sessionId,$window_id:i.windowId,timestamp:Date.now()})),this.C.metrics.length===this.allowedMetrics.length&&this.Xi()))}},this.nt=()=>{var r,s,i,o,a=Xt.__PosthogExtensions__;lt(a)||lt(a.postHogWebVitalsCallbacks)||({onLCP:r,onCLS:s,onFCP:i,onINP:o}=a.postHogWebVitalsCallbacks),r&&s&&i&&o?(this.allowedMetrics.indexOf("LCP")>-1&&r(this.Zi.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&s(this.Zi.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&i(this.Zi.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&o(this.Zi.bind(this)),this.i=!0):Df.error("web vitals callbacks not loaded - not starting")},this._instance=t,this.Yi=!((n=this._instance.persistence)==null||!n.props[zQ]),this.startIfEnabled()}get allowedMetrics(){var t,n,r=Jr(this._instance.config.capture_performance)?(t=this._instance.config.capture_performance)==null?void 0:t.web_vitals_allowed_metrics:void 0;return lt(r)?((n=this._instance.persistence)==null?void 0:n.props[HQ])||["CLS","FCP","INP","LCP"]:r}get flushToCaptureTimeoutMs(){return(Jr(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals_delayed_flush_ms:void 0)||5e3}get ie(){var t=Jr(this._instance.config.capture_performance)&&Di(this._instance.config.capture_performance.__web_vitals_max_value)?this._instance.config.capture_performance.__web_vitals_max_value:bee;return 0<t&&t<=6e4?bee:t}get isEnabled(){var t=Po==null?void 0:Po.protocol;if(t!=="http:"&&t!=="https:")return Df.info("Web Vitals are disabled on non-http/https protocols"),!1;var n=Jr(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals:hu(this._instance.config.capture_performance)?this._instance.config.capture_performance:void 0;return hu(n)?n:this.Yi}startIfEnabled(){this.isEnabled&&!this.i&&(Df.info("enabled, starting..."),this.J(this.nt))}onRemoteConfig(t){var n=Jr(t.capturePerformance)&&!!t.capturePerformance.web_vitals,r=Jr(t.capturePerformance)?t.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[zQ]:n}),this._instance.persistence.register({[HQ]:r})),this.Yi=n,this.startIfEnabled()}J(t){var n,r;(n=Xt.__PosthogExtensions__)!=null&&n.postHogWebVitalsCallbacks&&t(),(r=Xt.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"web-vitals",s=>{s?Df.error("failed to load script",s):t()})}te(){var t=Ne?Ne.location.href:void 0;return t||Df.error("Could not determine current URL"),t}}var B2t=ei("[Heatmaps]");function xee(e){return Jr(e)&&"clientX"in e&&"clientY"in e&&Di(e.clientX)&&Di(e.clientY)}class $2t{constructor(t){var n;this.rageclicks=new R1e,this.Yi=!1,this.i=!1,this.ee=null,this.instance=t,this.Yi=!((n=this.instance.persistence)==null||!n.props[_F])}get flushIntervalMilliseconds(){var t=5e3;return Jr(this.instance.config.capture_heatmaps)&&this.instance.config.capture_heatmaps.flush_interval_milliseconds&&(t=this.instance.config.capture_heatmaps.flush_interval_milliseconds),t}get isEnabled(){return lt(this.instance.config.capture_heatmaps)?lt(this.instance.config.enable_heatmaps)?this.Yi:this.instance.config.enable_heatmaps:this.instance.config.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this.i)return;B2t.info("starting..."),this.re(),this.ee=setInterval(this.se.bind(this),this.flushIntervalMilliseconds)}else{var t,n;clearInterval((t=this.ee)!==null&&t!==void 0?t:void 0),(n=this.ne)==null||n.stop(),this.getAndClearBuffer()}}onRemoteConfig(t){var n=!!t.heatmaps;this.instance.persistence&&this.instance.persistence.register({[_F]:n}),this.Yi=n,this.startIfEnabled()}getAndClearBuffer(){var t=this.C;return this.C=void 0,t}oe(t){this.ae(t.originalEvent,"deadclick")}re(){Ne&&Ct&&(Ur(Ne,"beforeunload",this.se.bind(this)),Ur(Ct,"click",t=>this.ae(t||(Ne==null?void 0:Ne.event)),{capture:!0}),Ur(Ct,"mousemove",t=>this.le(t||(Ne==null?void 0:Ne.event)),{capture:!0}),this.ne=new B1e(this.instance,Ukt,this.oe.bind(this)),this.ne.startIfEnabled(),this.i=!0)}ue(t,n){var r=this.instance.scrollManager.scrollY(),s=this.instance.scrollManager.scrollX(),i=this.instance.scrollManager.scrollElement(),o=function(a,l,c){for(var u=a;u&&q4(u)&&!lp(u,"body");){if(u===c)return!1;if(xn(l,Ne==null?void 0:Ne.getComputedStyle(u).position))return!0;u=P1e(u)}return!1}(N1e(t),["fixed","sticky"],i);return{x:t.clientX+(o?0:s),y:t.clientY+(o?0:r),target_fixed:o,type:n}}ae(t,n){var r;if(n===void 0&&(n="click"),!XQ(t.target)&&xee(t)){var s=this.ue(t,n);(r=this.rageclicks)!=null&&r.isRageClick(t.clientX,t.clientY,new Date().getTime())&&this.he(gt({},s,{type:"rageclick"})),this.he(s)}}le(t){!XQ(t.target)&&xee(t)&&(clearTimeout(this.de),this.de=setTimeout(()=>{this.he(this.ue(t,"mousemove"))},500))}he(t){if(Ne){var n=Ne.location.href;this.C=this.C||{},this.C[n]||(this.C[n]=[]),this.C[n].push(t)}}se(){this.C&&!B0(this.C)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}}class z2t{constructor(t){this._instance=t}doPageView(t,n){var r,s=this.ve(t,n);return this.ce={pathname:(r=Ne==null?void 0:Ne.location.pathname)!==null&&r!==void 0?r:"",pageViewId:n,timestamp:t},this._instance.scrollManager.resetContext(),s}doPageLeave(t){var n;return this.ve(t,(n=this.ce)==null?void 0:n.pageViewId)}doEvent(){var t;return{$pageview_id:(t=this.ce)==null?void 0:t.pageViewId}}ve(t,n){var r=this.ce;if(!r)return{$pageview_id:n};var s={$pageview_id:n,$prev_pageview_id:r.pageViewId},i=this._instance.scrollManager.getContext();if(i&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:o,lastScrollY:a,maxScrollY:l,maxContentHeight:c,lastContentY:u,maxContentY:d}=i;if(!(lt(o)||lt(a)||lt(l)||lt(c)||lt(u)||lt(d))){o=Math.ceil(o),a=Math.ceil(a),l=Math.ceil(l),c=Math.ceil(c),u=Math.ceil(u),d=Math.ceil(d);var p=o<=1?1:Sa(a/o,0,1),g=o<=1?1:Sa(l/o,0,1),b=c<=1?1:Sa(u/c,0,1),x=c<=1?1:Sa(d/c,0,1);s=os(s,{$prev_pageview_last_scroll:a,$prev_pageview_last_scroll_percentage:p,$prev_pageview_max_scroll:l,$prev_pageview_max_scroll_percentage:g,$prev_pageview_last_content:u,$prev_pageview_last_content_percentage:b,$prev_pageview_max_content:d,$prev_pageview_max_content_percentage:x})}}return r.pathname&&(s.$prev_pageview_pathname=r.pathname),r.timestamp&&(s.$prev_pageview_duration=(t.getTime()-r.timestamp.getTime())/1e3),s}}var H2t=function(e){var t,n,r,s,i="";for(t=n=0,r=(e=(e+"").replace(/\r\n/g,`
|
|
734
734
|
`).replace(/\r/g,`
|
|
735
735
|
`)).length,s=0;s<r;s++){var o=e.charCodeAt(s),a=null;o<128?n++:a=o>127&&o<2048?String.fromCharCode(o>>6|192,63&o|128):String.fromCharCode(o>>12|224,o>>6&63|128,63&o|128),Hp(a)||(n>t&&(i+=e.substring(t,n)),i+=a,t=n=s+1)}return n>t&&(i+=e.substring(t,e.length)),i},V2t=!!DF||!!EF,vee="text/plain",wA=(e,t)=>{var[n,r]=e.split("?"),s=gt({},t);r==null||r.split("&").forEach(o=>{var[a]=o.split("=");delete s[a]});var i=Pkt(s);return n+"?"+(i=i?(r?r+"&":"")+i:r)},Gv=(e,t)=>JSON.stringify(e,(n,r)=>typeof r=="bigint"?r.toString():r,t),N7=e=>{var{data:t,compression:n}=e;if(t){if(n===Vd.GZipJS){var r=X1e(J1e(Gv(t)),{mtime:0}),s=new Blob([r],{type:vee});return{contentType:vee,body:s,estimatedSize:s.size}}if(n===Vd.Base64){var i=function(l){var c,u,d,p,g,b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",x=0,S=0,E="",k=[];if(!l)return l;l=H2t(l);do c=(g=l.charCodeAt(x++)<<16|l.charCodeAt(x++)<<8|l.charCodeAt(x++))>>18&63,u=g>>12&63,d=g>>6&63,p=63&g,k[S++]=b.charAt(c)+b.charAt(u)+b.charAt(d)+b.charAt(p);while(x<l.length);switch(E=k.join(""),l.length%3){case 1:E=E.slice(0,-2)+"==";break;case 2:E=E.slice(0,-1)+"="}return E}(Gv(t)),o=(l=>"data="+encodeURIComponent(typeof l=="string"?l:Gv(l)))(i);return{contentType:"application/x-www-form-urlencoded",body:o,estimatedSize:new Blob([o]).size}}var a=Gv(t);return{contentType:"application/json",body:a,estimatedSize:new Blob([a]).size}}},bw=[];EF&&bw.push({transport:"fetch",method:e=>{var t,n,{contentType:r,body:s,estimatedSize:i}=(t=N7(e))!==null&&t!==void 0?t:{},o=new Headers;ur(e.headers,function(u,d){o.append(d,u)}),r&&o.append("Content-Type",r);var a=e.url,l=null;if(OQ){var c=new OQ;l={signal:c.signal,timeout:setTimeout(()=>c.abort(),e.timeout)}}EF(a,gt({method:(e==null?void 0:e.method)||"GET",headers:o,keepalive:e.method==="POST"&&(i||0)<52428.8,body:s,signal:(n=l)==null?void 0:n.signal},e.fetchOptions)).then(u=>u.text().then(d=>{var p={statusCode:u.status,text:d};if(u.status===200)try{p.json=JSON.parse(d)}catch(g){kt.error(g)}e.callback==null||e.callback(p)})).catch(u=>{kt.error(u),e.callback==null||e.callback({statusCode:0,text:u})}).finally(()=>l?clearTimeout(l.timeout):null)}}),DF&&bw.push({transport:"XHR",method:e=>{var t,n=new DF;n.open(e.method||"GET",e.url,!0);var{contentType:r,body:s}=(t=N7(e))!==null&&t!==void 0?t:{};ur(e.headers,function(i,o){n.setRequestHeader(o,i)}),r&&n.setRequestHeader("Content-Type",r),e.timeout&&(n.timeout=e.timeout),n.withCredentials=!0,n.onreadystatechange=()=>{if(n.readyState===4){var i={statusCode:n.status,text:n.responseText};if(n.status===200)try{i.json=JSON.parse(n.responseText)}catch{}e.callback==null||e.callback(i)}},n.send(s)}}),wa!=null&&wa.sendBeacon&&bw.push({transport:"sendBeacon",method:e=>{var t=wA(e.url,{beacon:"1"});try{var n,{contentType:r,body:s}=(n=N7(e))!==null&&n!==void 0?n:{},i=typeof s=="string"?new Blob([s],{type:r}):s;wa.sendBeacon(t,i)}catch{}}});var p1=function(e,t){if(!function(n){try{new RegExp(n)}catch{return!1}return!0}(t))return!1;try{return new RegExp(t).test(e)}catch{return!1}};function wee(e,t,n){return Gv({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:n})}var U2t={exact:(e,t)=>t.some(n=>e.some(r=>n===r)),is_not:(e,t)=>t.every(n=>e.every(r=>n!==r)),regex:(e,t)=>t.some(n=>e.some(r=>p1(n,r))),not_regex:(e,t)=>t.every(n=>e.every(r=>!p1(n,r))),icontains:(e,t)=>t.map(NE).some(n=>e.map(NE).some(r=>n.includes(r))),not_icontains:(e,t)=>t.map(NE).every(n=>e.map(NE).every(r=>!n.includes(r)))},NE=e=>e.toLowerCase(),W2t=ei("[Error tracking]");class q2t{constructor(t){var n,r;this.fe=[],this._instance=t,this.fe=(n=(r=this._instance.persistence)==null?void 0:r.get_property(NF))!==null&&n!==void 0?n:[]}onRemoteConfig(t){var n,r,s=(n=(r=t.errorTracking)==null?void 0:r.suppressionRules)!==null&&n!==void 0?n:[];this.fe=s,this._instance.persistence&&this._instance.persistence.register({[NF]:this.fe})}sendExceptionEvent(t){this.pe(t)?W2t.info("Skipping exception capture because a suppression rule matched"):this._instance.capture("$exception",t,{_noTruncate:!0,_batchKey:"exceptionEvent"})}pe(t){var n=t.$exception_list;if(!n||!Fr(n)||n.length===0)return!1;var r=n.reduce((s,i)=>{var{type:o,value:a}=i;return Qr(o)&&o.length>0&&s.$exception_types.push(o),Qr(a)&&a.length>0&&s.$exception_values.push(a),s},{$exception_types:[],$exception_values:[]});return this.fe.some(s=>{var i=s.values.map(o=>{var a,l=U2t[o.operator],c=Fr(o.value)?o.value:[o.value],u=(a=r[o.key])!==null&&a!==void 0?a:[];return c.length>0&&l(c,u)});return s.type==="OR"?i.some(Boolean):i.every(Boolean)})}}var dl="Mobile",SA="iOS",fu="Android",_S="Tablet",nxe=fu+" "+_S,rxe="iPad",sxe="Apple",ixe=sxe+" Watch",NS="Safari",m1="BlackBerry",oxe="Samsung",axe=oxe+"Browser",lxe=oxe+" Internet",Vg="Chrome",G2t=Vg+" OS",cxe=Vg+" "+SA,o$="Internet Explorer",uxe=o$+" "+dl,a$="Opera",Y2t=a$+" Mini",l$="Edge",dxe="Microsoft "+l$,ob="Firefox",hxe=ob+" "+SA,PS="Nintendo",MS="PlayStation",ab="Xbox",fxe=fu+" "+dl,pxe=dl+" "+NS,Yv="Windows",KF=Yv+" Phone",See="Nokia",XF="Ouya",mxe="Generic",K2t=mxe+" "+dl.toLowerCase(),gxe=mxe+" "+_S.toLowerCase(),JF="Konqueror",Ui="(\\d+(\\.\\d+)?)",P7=new RegExp("Version/"+Ui),X2t=new RegExp(ab,"i"),J2t=new RegExp(MS+" \\w+","i"),Z2t=new RegExp(PS+" \\w+","i"),c$=new RegExp(m1+"|PlayBook|BB10","i"),Q2t={"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"},eEt=(e,t)=>t&&xn(t,sxe)||function(n){return xn(n,NS)&&!xn(n,Vg)&&!xn(n,fu)}(e),yxe=function(e,t){return t=t||"",xn(e," OPR/")&&xn(e,"Mini")?Y2t:xn(e," OPR/")?a$:c$.test(e)?m1:xn(e,"IE"+dl)||xn(e,"WPDesktop")?uxe:xn(e,axe)?lxe:xn(e,l$)||xn(e,"Edg/")?dxe:xn(e,"FBIOS")?"Facebook "+dl:xn(e,"UCWEB")||xn(e,"UCBrowser")?"UC Browser":xn(e,"CriOS")?cxe:xn(e,"CrMo")||xn(e,Vg)?Vg:xn(e,fu)&&xn(e,NS)?fxe:xn(e,"FxiOS")?hxe:xn(e.toLowerCase(),JF.toLowerCase())?JF:eEt(e,t)?xn(e,dl)?pxe:NS:xn(e,ob)?ob:xn(e,"MSIE")||xn(e,"Trident/")?o$:xn(e,"Gecko")?ob:""},tEt={[uxe]:[new RegExp("rv:"+Ui)],[dxe]:[new RegExp(l$+"?\\/"+Ui)],[Vg]:[new RegExp("("+Vg+"|CrMo)\\/"+Ui)],[cxe]:[new RegExp("CriOS\\/"+Ui)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+Ui)],[NS]:[P7],[pxe]:[P7],[a$]:[new RegExp("(Opera|OPR)\\/"+Ui)],[ob]:[new RegExp(ob+"\\/"+Ui)],[hxe]:[new RegExp("FxiOS\\/"+Ui)],[JF]:[new RegExp("Konqueror[:/]?"+Ui,"i")],[m1]:[new RegExp(m1+" "+Ui),P7],[fxe]:[new RegExp("android\\s"+Ui,"i")],[lxe]:[new RegExp(axe+"\\/"+Ui)],[o$]:[new RegExp("(rv:|MSIE )"+Ui)],Mozilla:[new RegExp("rv:"+Ui)]},nEt=function(e,t){var n=yxe(e,t),r=tEt[n];if(lt(r))return null;for(var s=0;s<r.length;s++){var i=r[s],o=e.match(i);if(o)return parseFloat(o[o.length-2])}return null},Cee=[[new RegExp(ab+"; "+ab+" (.*?)[);]","i"),e=>[ab,e&&e[1]||""]],[new RegExp(PS,"i"),[PS,""]],[new RegExp(MS,"i"),[MS,""]],[c$,[m1,""]],[new RegExp(Yv,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[KF,""];if(new RegExp(dl).test(t)&&!/IEMobile\b/.test(t))return[Yv+" "+dl,""];var n=/Windows NT ([0-9.]+)/i.exec(t);if(n&&n[1]){var r=n[1],s=Q2t[r]||"";return/arm/i.test(t)&&(s="RT"),[Yv,s]}return[Yv,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>{if(e&&e[3]){var t=[e[3],e[4],e[5]||"0"];return[SA,t.join(".")]}return[SA,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=lt(e[2])?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+fu+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+fu+")","i"),e=>{if(e&&e[2]){var t=[e[2],e[3],e[4]||"0"];return[fu,t.join(".")]}return[fu,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var t=["Mac OS X",""];if(e&&e[1]){var n=[e[1],e[2],e[3]||"0"];t[1]=n.join(".")}return t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[G2t,""]],[/Linux|debian/i,["Linux",""]]],kee=function(e){return Z2t.test(e)?PS:J2t.test(e)?MS:X2t.test(e)?ab:new RegExp(XF,"i").test(e)?XF:new RegExp("("+KF+"|WPDesktop)","i").test(e)?KF:/iPad/.test(e)?rxe:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?ixe:c$.test(e)?m1:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(See,"i").test(e)?See:/(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(dl).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)?fu:nxe:fu:new RegExp("(pda|"+dl+")","i").test(e)?K2t:new RegExp(_S,"i").test(e)&&!new RegExp(_S+" pc","i").test(e)?gxe:""},PE="https?://(.*)",Y4=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],rEt=W4(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],Y4),u$="<masked>",sEt=["li_fat_id"];function bxe(e,t,n){if(!Ct)return{};var r,s=t?W4([],Y4,n||[]):[],i=xxe(QB(Ct.URL,s,u$),e),o=(r={},ur(sEt,function(a){var l=Su.D(a);r[a]=l||null}),r);return os(o,i)}function xxe(e,t){var n=rEt.concat(t||[]),r={};return ur(n,function(s){var i=mA(e,s);r[s]=i||null}),r}function vxe(e){var t=function(i){return i?i.search(PE+"google.([^/?]*)")===0?"google":i.search(PE+"bing.com")===0?"bing":i.search(PE+"yahoo.com")===0?"yahoo":i.search(PE+"duckduckgo.com")===0?"duckduckgo":null:null}(e),n=t!="yahoo"?"q":"p",r={};if(!Hp(t)){r.$search_engine=t;var s=Ct?mA(Ct.referrer,n):"";s.length&&(r.ph_keyword=s)}return r}function Eee(){return navigator.language||navigator.userLanguage}function wxe(){return(Ct==null?void 0:Ct.referrer)||"$direct"}function Sxe(e,t){var n=e?W4([],Y4,t||[]):[],r=Po==null?void 0:Po.href.substring(0,1e3);return{r:wxe().substring(0,1e3),u:r?QB(r,n,u$):void 0}}function Cxe(e){var t,{r:n,u:r}=e,s={$referrer:n,$referring_domain:n==null?void 0:n=="$direct"?"$direct":(t=h1(n))==null?void 0:t.host};if(r){s.$current_url=r;var i=h1(r);s.$host=i==null?void 0:i.host,s.$pathname=i==null?void 0:i.pathname;var o=xxe(r);os(s,o)}if(n){var a=vxe(n);os(s,a)}return s}function kxe(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function iEt(){try{return new Date().getTimezoneOffset()}catch{return}}function oEt(e,t){if(!ko)return{};var n,r,s,i=e?W4([],Y4,t||[]):[],[o,a]=function(l){for(var c=0;c<Cee.length;c++){var[u,d]=Cee[c],p=u.exec(l),g=p&&(cl(d)?d(p,l):d);if(g)return g}return["",""]}(ko);return os(JB({$os:o,$os_version:a,$browser:yxe(ko,navigator.vendor),$device:kee(ko),$device_type:(r=ko,s=kee(r),s===rxe||s===nxe||s==="Kobo"||s==="Kindle Fire"||s===gxe?_S:s===PS||s===ab||s===MS||s===XF?"Console":s===ixe?"Wearable":s?dl:"Desktop"),$timezone:kxe(),$timezone_offset:iEt()}),{$current_url:QB(Po==null?void 0:Po.href,i,u$),$host:Po==null?void 0:Po.host,$pathname:Po==null?void 0:Po.pathname,$raw_user_agent:ko.length>1e3?ko.substring(0,997)+"...":ko,$browser_version:nEt(ko,navigator.vendor),$browser_language:Eee(),$browser_language_prefix:(n=Eee(),typeof n=="string"?n.split("-")[0]:void 0),$screen_height:Ne==null?void 0:Ne.screen.height,$screen_width:Ne==null?void 0:Ne.screen.width,$viewport_height:Ne==null?void 0:Ne.innerHeight,$viewport_width:Ne==null?void 0:Ne.innerWidth,$lib:"web",$lib_version:Rd.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}var Wc=ei("[FeatureFlags]"),M7="$active_feature_flags",f0="$override_feature_flags",Dee="$feature_flag_payloads",Nv="$override_feature_flag_payloads",Aee="$feature_flag_request_id",Tee=e=>{var t={};for(var[n,r]of bD(e||{}))r&&(t[n]=r);return t},aEt=e=>{var t=e.flags;return t?(e.featureFlags=Object.fromEntries(Object.keys(t).map(n=>{var r;return[n,(r=t[n].variant)!==null&&r!==void 0?r:t[n].enabled]})),e.featureFlagPayloads=Object.fromEntries(Object.keys(t).filter(n=>t[n].enabled).filter(n=>{var r;return(r=t[n].metadata)==null?void 0:r.payload}).map(n=>{var r;return[n,(r=t[n].metadata)==null?void 0:r.payload]}))):Wc.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),e},lEt=function(e){return e.FeatureFlags="feature_flags",e.Recordings="recordings",e}({});class cEt{constructor(t){this.ge=!1,this._e=!1,this.me=!1,this.be=!1,this.ye=!1,this.we=!1,this.Se=!1,this._instance=t,this.featureFlagEventHandlers=[]}flags(){if(this._instance.config.__preview_remote_config)this.we=!0;else{var t=!this.$e&&(this._instance.config.advanced_disable_feature_flags||this._instance.config.advanced_disable_feature_flags_on_first_load);this.ke({disableFlags:t})}}get hasLoadedFlags(){return this._e}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var t=this._instance.get_property(FF),n=this._instance.get_property(f0),r=this._instance.get_property(Nv);if(!r&&!n)return t||{};var s=os({},t||{}),i=[...new Set([...Object.keys(r||{}),...Object.keys(n||{})])];for(var o of i){var a,l,c=s[o],u=n==null?void 0:n[o],d=lt(u)?(a=c==null?void 0:c.enabled)!==null&&a!==void 0&&a:!!u,p=lt(u)?c.variant:typeof u=="string"?u:void 0,g=r==null?void 0:r[o],b=gt({},c,{enabled:d,variant:d?p??(c==null?void 0:c.variant):void 0});d!==(c==null?void 0:c.enabled)&&(b.original_enabled=c==null?void 0:c.enabled),p!==(c==null?void 0:c.variant)&&(b.original_variant=c==null?void 0:c.variant),g&&(b.metadata=gt({},c==null?void 0:c.metadata,{payload:g,original_payload:c==null||(l=c.metadata)==null?void 0:l.payload})),s[o]=b}return this.ge||(Wc.warn(" Overriding feature flag details!",{flagDetails:t,overriddenPayloads:r,finalDetails:s}),this.ge=!0),s}getFlagVariants(){var t=this._instance.get_property($0),n=this._instance.get_property(f0);if(!n)return t||{};for(var r=os({},t),s=Object.keys(n),i=0;i<s.length;i++)r[s[i]]=n[s[i]];return this.ge||(Wc.warn(" Overriding feature flags!",{enabledFlags:t,overriddenFlags:n,finalFlags:r}),this.ge=!0),r}getFlagPayloads(){var t=this._instance.get_property(Dee),n=this._instance.get_property(Nv);if(!n)return t||{};for(var r=os({},t||{}),s=Object.keys(n),i=0;i<s.length;i++)r[s[i]]=n[s[i]];return this.ge||(Wc.warn(" Overriding feature flag payloads!",{flagPayloads:t,overriddenPayloads:n,finalPayloads:r}),this.ge=!0),r}reloadFeatureFlags(){this.be||this._instance.config.advanced_disable_feature_flags||this.$e||(this.$e=setTimeout(()=>{this.ke()},5))}xe(){clearTimeout(this.$e),this.$e=void 0}ensureFlagsLoaded(){this._e||this.me||this.$e||this.reloadFeatureFlags()}setAnonymousDistinctId(t){this.$anon_distinct_id=t}setReloadingPaused(t){this.be=t}ke(t){var n;if(this.xe(),!this._instance.I())if(this.me)this.ye=!0;else{var r={token:this._instance.config.token,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:gt({},((n=this._instance.persistence)==null?void 0:n.get_initial_props())||{},this._instance.get_property(Wv)||{}),group_properties:this._instance.get_property(Fm)};(t!=null&&t.disableFlags||this._instance.config.advanced_disable_feature_flags)&&(r.disable_flags=!0);var s=this._instance.config.__preview_remote_config,i=s?"/flags/?v=2":"/flags/?v=2&config=true",o=this._instance.config.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":"",a=this._instance.requestRouter.endpointFor("api",i+o);s&&(r.timezone=kxe()),this.me=!0,this._instance.Ee({method:"POST",url:a,data:r,compression:this._instance.config.disable_compression?void 0:Vd.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:l=>{var c,u,d=!0;if(l.statusCode===200&&(this.ye||(this.$anon_distinct_id=void 0),d=!1),this.me=!1,this.we||(this.we=!0,this._instance.Ie((u=l.json)!==null&&u!==void 0?u:{})),!r.disable_flags||this.ye)if(this.Se=!d,l.json&&(c=l.json.quotaLimited)!=null&&c.includes(lEt.FeatureFlags))Wc.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset. Please visit https://posthog.com/docs/billing/limits-alerts to learn more.");else{var p;r.disable_flags||this.receivedFeatureFlags((p=l.json)!==null&&p!==void 0?p:{},d),this.ye&&(this.ye=!1,this.ke())}}})}}getFeatureFlag(t,n){if(n===void 0&&(n={}),this._e||this.getFlags()&&this.getFlags().length>0){var r=this.getFlagVariants()[t],s=""+r,i=this._instance.get_property(Aee)||void 0,o=this._instance.get_property(dA)||{};if((n.send_event||!("send_event"in n))&&(!(t in o)||!o[t].includes(s))){var a,l,c,u,d,p,g,b,x;Fr(o[t])?o[t].push(s):o[t]=[s],(a=this._instance.persistence)==null||a.register({[dA]:o});var S=this.getFeatureFlagDetails(t),E={$feature_flag:t,$feature_flag_response:r,$feature_flag_payload:this.getFeatureFlagPayload(t)||null,$feature_flag_request_id:i,$feature_flag_bootstrapped_response:((l=this._instance.config.bootstrap)==null||(l=l.featureFlags)==null?void 0:l[t])||null,$feature_flag_bootstrapped_payload:((c=this._instance.config.bootstrap)==null||(c=c.featureFlagPayloads)==null?void 0:c[t])||null,$used_bootstrap_value:!this.Se};lt(S==null||(u=S.metadata)==null?void 0:u.version)||(E.$feature_flag_version=S.metadata.version);var k,T=(d=S==null||(p=S.reason)==null?void 0:p.description)!==null&&d!==void 0?d:S==null||(g=S.reason)==null?void 0:g.code;T&&(E.$feature_flag_reason=T),S!=null&&(b=S.metadata)!=null&&b.id&&(E.$feature_flag_id=S.metadata.id),lt(S==null?void 0:S.original_variant)&<(S==null?void 0:S.original_enabled)||(E.$feature_flag_original_response=lt(S.original_variant)?S.original_enabled:S.original_variant),S!=null&&(x=S.metadata)!=null&&x.original_payload&&(E.$feature_flag_original_payload=S==null||(k=S.metadata)==null?void 0:k.original_payload),this._instance.capture("$feature_flag_called",E)}return r}Wc.warn('getFeatureFlag for key "'+t+`" failed. Feature flags didn't load in time.`)}getFeatureFlagDetails(t){return this.getFlagsWithDetails()[t]}getFeatureFlagPayload(t){return this.getFlagPayloads()[t]}getRemoteConfigPayload(t,n){var r=this._instance.config.token;this._instance.Ee({method:"POST",url:this._instance.requestRouter.endpointFor("api","/flags/?v=2&config=true"),data:{distinct_id:this._instance.get_distinct_id(),token:r},compression:this._instance.config.disable_compression?void 0:Vd.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:s=>{var i,o=(i=s.json)==null?void 0:i.featureFlagPayloads;n((o==null?void 0:o[t])||void 0)}})}isFeatureEnabled(t,n){if(n===void 0&&(n={}),this._e||this.getFlags()&&this.getFlags().length>0)return!!this.getFeatureFlag(t,n);Wc.warn('isFeatureEnabled for key "'+t+`" failed. Feature flags didn't load in time.`)}addFeatureFlagsHandler(t){this.featureFlagEventHandlers.push(t)}removeFeatureFlagsHandler(t){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(n=>n!==t)}receivedFeatureFlags(t,n){if(this._instance.persistence){this._e=!0;var r=this.getFlagVariants(),s=this.getFlagPayloads(),i=this.getFlagsWithDetails();(function(o,a,l,c,u){l===void 0&&(l={}),c===void 0&&(c={}),u===void 0&&(u={});var d=aEt(o),p=d.flags,g=d.featureFlags,b=d.featureFlagPayloads;if(g){var x=o.requestId;if(Fr(g)){Wc.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var S={};if(g)for(var E=0;E<g.length;E++)S[g[E]]=!0;a&&a.register({[M7]:g,[$0]:S})}else{var k=g,T=b,P=p;o.errorsWhileComputingFlags&&(k=gt({},l,k),T=gt({},c,T),P=gt({},u,P)),a&&a.register(gt({[M7]:Object.keys(Tee(k)),[$0]:k||{},[Dee]:T||{},[FF]:P||{}},x?{[Aee]:x}:{}))}}})(t,this._instance.persistence,r,s,i),this.Pe(n)}}override(t,n){n===void 0&&(n=!1),Wc.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:t,suppressWarning:n})}overrideFeatureFlags(t){if(!this._instance.__loaded||!this._instance.persistence)return Wc.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(t===!1)return this._instance.persistence.unregister(f0),this._instance.persistence.unregister(Nv),void this.Pe();if(t&&typeof t=="object"&&("flags"in t||"payloads"in t)){var n,r=t;if(this.ge=!!((n=r.suppressWarning)!==null&&n!==void 0&&n),"flags"in r){if(r.flags===!1)this._instance.persistence.unregister(f0);else if(r.flags)if(Fr(r.flags)){for(var s={},i=0;i<r.flags.length;i++)s[r.flags[i]]=!0;this._instance.persistence.register({[f0]:s})}else this._instance.persistence.register({[f0]:r.flags})}return"payloads"in r&&(r.payloads===!1?this._instance.persistence.unregister(Nv):r.payloads&&this._instance.persistence.register({[Nv]:r.payloads})),void this.Pe()}this.Pe()}onFeatureFlags(t){if(this.addFeatureFlagsHandler(t),this._e){var{flags:n,flagVariants:r}=this.Re();t(n,r)}return()=>this.removeFeatureFlagsHandler(t)}updateEarlyAccessFeatureEnrollment(t,n){var r,s=(this._instance.get_property(xD)||[]).find(l=>l.flagKey===t),i={["$feature_enrollment/"+t]:n},o={$feature_flag:t,$feature_enrollment:n,$set:i};s&&(o.$early_access_feature_name=s.name),this._instance.capture("$feature_enrollment_update",o),this.setPersonPropertiesForFlags(i,!1);var a=gt({},this.getFlagVariants(),{[t]:n});(r=this._instance.persistence)==null||r.register({[M7]:Object.keys(Tee(a)),[$0]:a}),this.Pe()}getEarlyAccessFeatures(t,n,r){n===void 0&&(n=!1);var s=this._instance.get_property(xD),i=r?"&"+r.map(o=>"stage="+o).join("&"):"";if(s&&!n)return t(s);this._instance.Ee({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this._instance.config.token+i),method:"GET",callback:o=>{var a;if(o.json){var l=o.json.earlyAccessFeatures;return(a=this._instance.persistence)==null||a.register({[xD]:l}),t(l)}}})}Re(){var t=this.getFlags(),n=this.getFlagVariants();return{flags:t.filter(r=>n[r]),flagVariants:Object.keys(n).filter(r=>n[r]).reduce((r,s)=>(r[s]=n[s],r),{})}}Pe(t){var{flags:n,flagVariants:r}=this.Re();this.featureFlagEventHandlers.forEach(s=>s(n,r,{errorsLoading:t}))}setPersonPropertiesForFlags(t,n){n===void 0&&(n=!0);var r=this._instance.get_property(Wv)||{};this._instance.register({[Wv]:gt({},r,t)}),n&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(Wv)}setGroupPropertiesForFlags(t,n){n===void 0&&(n=!0);var r=this._instance.get_property(Fm)||{};Object.keys(r).length!==0&&Object.keys(r).forEach(s=>{r[s]=gt({},r[s],t[s]),delete t[s]}),this._instance.register({[Fm]:gt({},r,t)}),n&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(t){if(t){var n=this._instance.get_property(Fm)||{};this._instance.register({[Fm]:gt({},n,{[t]:{}})})}else this._instance.unregister(Fm)}reset(){this._e=!1,this.me=!1,this.be=!1,this.ye=!1,this.we=!1,this.Se=!1,this.$anon_distinct_id=void 0,this.xe(),this.ge=!1}}var uEt=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class j7{constructor(t){this.S=t,this.props={},this.Te=!1,this.Me=(n=>{var r="";return n.token&&(r=n.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),n.persistence_name?"ph_"+n.persistence_name:"ph_"+r+"_posthog"})(t),this.B=this.Ce(t),this.load(),t.debug&&kt.info("Persistence loaded",t.persistence,gt({},this.props)),this.update_config(t,t),this.save()}Ce(t){uEt.indexOf(t.persistence.toLowerCase())===-1&&(kt.critical("Unknown persistence type "+t.persistence+"; falling back to localStorage+cookie"),t.persistence="localStorage+cookie");var n=t.persistence.toLowerCase();return n==="localstorage"&&js.O()?js:n==="localstorage+cookie"&&CE.O()?CE:n==="sessionstorage"&&ai.O()?ai:n==="memory"?Hkt:n==="cookie"?Su:CE.O()?CE:Su}properties(){var t={};return ur(this.props,function(n,r){if(r===$0&&Jr(n))for(var s=Object.keys(n),i=0;i<s.length;i++)t["$feature/"+s[i]]=n[s[i]];else a=r,l=!1,(Hp(o=Skt)?l:IQ&&o.indexOf===IQ?o.indexOf(a)!=-1:(ur(o,function(c){if(l||(l=c===a))return cA}),l))||(t[r]=n);var o,a,l}),t}load(){if(!this.Fe){var t=this.B.L(this.Me);t&&(this.props=os({},t))}}save(){this.Fe||this.B.j(this.Me,this.props,this.Oe,this.Ae,this.De,this.S.debug)}remove(){this.B.N(this.Me,!1),this.B.N(this.Me,!0)}clear(){this.remove(),this.props={}}register_once(t,n,r){if(Jr(t)){lt(n)&&(n="None"),this.Oe=lt(r)?this.Le:r;var s=!1;if(ur(t,(i,o)=>{this.props.hasOwnProperty(o)&&this.props[o]!==n||(this.props[o]=i,s=!0)}),s)return this.save(),!0}return!1}register(t,n){if(Jr(t)){this.Oe=lt(n)?this.Le:n;var r=!1;if(ur(t,(s,i)=>{t.hasOwnProperty(i)&&this.props[i]!==s&&(this.props[i]=s,r=!0)}),r)return this.save(),!0}return!1}unregister(t){t in this.props&&(delete this.props[t],this.save())}update_campaign_params(){if(!this.Te){var t=bxe(this.S.custom_campaign_params,this.S.mask_personal_data_properties,this.S.custom_personal_data_properties);B0(JB(t))||this.register(t),this.Te=!0}}update_search_keyword(){var t;this.register((t=Ct==null?void 0:Ct.referrer)?vxe(t):{})}update_referrer_info(){var t;this.register_once({$referrer:wxe(),$referring_domain:Ct!=null&&Ct.referrer&&((t=h1(Ct.referrer))==null?void 0:t.host)||"$direct"},void 0)}set_initial_person_info(){this.props[LF]||this.props[BF]||this.register_once({[hA]:Sxe(this.S.mask_personal_data_properties,this.S.custom_personal_data_properties)},void 0)}get_initial_props(){var t={};ur([BF,LF],o=>{var a=this.props[o];a&&ur(a,function(l,c){t["$initial_"+AF(c)]=l})});var n,r,s=this.props[hA];if(s){var i=(n=Cxe(s),r={},ur(n,function(o,a){r["$initial_"+AF(a)]=o}),r);os(t,i)}return t}safe_merge(t){return ur(this.props,function(n,r){r in t||(t[r]=n)}),t}update_config(t,n){if(this.Le=this.Oe=t.cookie_expiration,this.set_disabled(t.disable_persistence),this.set_cross_subdomain(t.cross_subdomain_cookie),this.set_secure(t.secure_cookie),t.persistence!==n.persistence){var r=this.Ce(t),s=this.props;this.clear(),this.B=r,this.props=s,this.save()}}set_disabled(t){this.Fe=t,this.Fe?this.remove():this.save()}set_cross_subdomain(t){t!==this.Ae&&(this.Ae=t,this.remove(),this.save())}set_secure(t){t!==this.De&&(this.De=t,this.remove(),this.save())}set_event_timer(t,n){var r=this.props[Vv]||{};r[t]=n,this.props[Vv]=r,this.save()}remove_event_timer(t){var n=(this.props[Vv]||{})[t];return lt(n)||(delete this.props[Vv][t],this.save()),n}get_property(t){return this.props[t]}set_property(t,n){this.props[t]=n,this.save()}}class Exe{constructor(){this.je={},this.je={}}on(t,n){return this.je[t]||(this.je[t]=[]),this.je[t].push(n),()=>{this.je[t]=this.je[t].filter(r=>r!==n)}}emit(t,n){for(var r of this.je[t]||[])r(n);for(var s of this.je["*"]||[])s(t,n)}}class Lm{constructor(t){this.Ne=new Exe,this.ze=(n,r)=>this.Ue(n,r)&&this.qe(n,r)&&this.Be(n,r),this.Ue=(n,r)=>r==null||!r.event||(n==null?void 0:n.event)===(r==null?void 0:r.event),this._instance=t,this.He=new Set,this.We=new Set}init(){var t;if(!lt((t=this._instance)==null?void 0:t.Ge)){var n;(n=this._instance)==null||n.Ge((r,s)=>{this.on(r,s)})}}register(t){var n,r;if(!lt((n=this._instance)==null?void 0:n.Ge)&&(t.forEach(o=>{var a,l;(a=this.We)==null||a.add(o),(l=o.steps)==null||l.forEach(c=>{var u;(u=this.He)==null||u.add((c==null?void 0:c.event)||"")})}),(r=this._instance)!=null&&r.autocapture)){var s,i=new Set;t.forEach(o=>{var a;(a=o.steps)==null||a.forEach(l=>{l!=null&&l.selector&&i.add(l==null?void 0:l.selector)})}),(s=this._instance)==null||s.autocapture.setElementSelectors(i)}}on(t,n){var r;n!=null&&t.length!=0&&(this.He.has(t)||this.He.has(n==null?void 0:n.event))&&this.We&&((r=this.We)==null?void 0:r.size)>0&&this.We.forEach(s=>{this.Je(n,s)&&this.Ne.emit("actionCaptured",s.name)})}Ve(t){this.onAction("actionCaptured",n=>t(n))}Je(t,n){if((n==null?void 0:n.steps)==null)return!1;for(var r of n.steps)if(this.ze(t,r))return!0;return!1}onAction(t,n){return this.Ne.on(t,n)}qe(t,n){if(n!=null&&n.url){var r,s=t==null||(r=t.properties)==null?void 0:r.$current_url;if(!s||typeof s!="string"||!Lm.Ke(s,n==null?void 0:n.url,(n==null?void 0:n.url_matching)||"contains"))return!1}return!0}static Ke(t,n,r){switch(r){case"regex":return!!Ne&&p1(t,n);case"exact":return n===t;case"contains":var s=Lm.Ye(n).replace(/_/g,".").replace(/%/g,".*");return p1(t,s);default:return!1}}static Ye(t){return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}Be(t,n){if((n!=null&&n.href||n!=null&&n.tag_name||n!=null&&n.text)&&!this.Xe(t).some(i=>!(n!=null&&n.href&&!Lm.Ke(i.href||"",n==null?void 0:n.href,(n==null?void 0:n.href_matching)||"exact"))&&(n==null||!n.tag_name||i.tag_name===(n==null?void 0:n.tag_name))&&!(n!=null&&n.text&&!Lm.Ke(i.text||"",n==null?void 0:n.text,(n==null?void 0:n.text_matching)||"exact")&&!Lm.Ke(i.$el_text||"",n==null?void 0:n.text,(n==null?void 0:n.text_matching)||"exact"))))return!1;if(n!=null&&n.selector){var r,s=t==null||(r=t.properties)==null?void 0:r.$element_selectors;if(!s||!s.includes(n==null?void 0:n.selector))return!1}return!0}Xe(t){return(t==null?void 0:t.properties.$elements)==null?[]:t==null?void 0:t.properties.$elements}}var Us=ei("[Surveys]"),ZF="seenSurvey_",dEt=(e,t)=>{var n="$survey_"+t+"/"+e.id;return e.current_iteration&&e.current_iteration>0&&(n="$survey_"+t+"/"+e.id+"/"+e.current_iteration),n};class hEt{constructor(t){this._instance=t,this.Qe=new Map,this.Ze=new Map}register(t){var n;lt((n=this._instance)==null?void 0:n.Ge)||(this.tr(t),this.ir(t))}ir(t){var n=t.filter(r=>{var s,i;return((s=r.conditions)==null?void 0:s.actions)&&((i=r.conditions)==null||(i=i.actions)==null||(i=i.values)==null?void 0:i.length)>0});n.length!==0&&(this.er==null&&(this.er=new Lm(this._instance),this.er.init(),this.er.Ve(r=>{this.onAction(r)})),n.forEach(r=>{var s,i,o,a,l;r.conditions&&(s=r.conditions)!=null&&s.actions&&(i=r.conditions)!=null&&(i=i.actions)!=null&&i.values&&((o=r.conditions)==null||(o=o.actions)==null||(o=o.values)==null?void 0:o.length)>0&&((a=this.er)==null||a.register(r.conditions.actions.values),(l=r.conditions)==null||(l=l.actions)==null||(l=l.values)==null||l.forEach(c=>{if(c&&c.name){var u=this.Ze.get(c.name);u&&u.push(r.id),this.Ze.set(c.name,u||[r.id])}}))}))}tr(t){var n;t.filter(r=>{var s,i;return((s=r.conditions)==null?void 0:s.events)&&((i=r.conditions)==null||(i=i.events)==null||(i=i.values)==null?void 0:i.length)>0}).length!==0&&((n=this._instance)==null||n.Ge((r,s)=>{this.onEvent(r,s)}),t.forEach(r=>{var s;(s=r.conditions)==null||(s=s.events)==null||(s=s.values)==null||s.forEach(i=>{if(i&&i.name){var o=this.Qe.get(i.name);o&&o.push(r.id),this.Qe.set(i.name,o||[r.id])}})}))}onEvent(t,n){var r,s=((r=this._instance)==null||(r=r.persistence)==null?void 0:r.props[wE])||[];if(t==="survey shown"&&n&&s.length>0){var i;Us.info("survey event matched, removing survey from activated surveys",{event:t,eventPayload:n,existingActivatedSurveys:s});var o=n==null||(i=n.properties)==null?void 0:i.$survey_id;if(o){var a=s.indexOf(o);a>=0&&(s.splice(a,1),this.rr(s))}}else this.Qe.has(t)&&(Us.info("survey event matched, updating activated surveys",{event:t,surveys:this.Qe.get(t)}),this.rr(s.concat(this.Qe.get(t)||[])))}onAction(t){var n,r=((n=this._instance)==null||(n=n.persistence)==null?void 0:n.props[wE])||[];this.Ze.has(t)&&this.rr(r.concat(this.Ze.get(t)||[]))}rr(t){var n;(n=this._instance)==null||(n=n.persistence)==null||n.register({[wE]:[...new Set(t)]})}getSurveys(){var t,n=(t=this._instance)==null||(t=t.persistence)==null?void 0:t.props[wE];return n||[]}getEventToSurveys(){return this.Qe}sr(){return this.er}}class fEt{constructor(t){this.nr=void 0,this.ar=null,this.lr=!1,this.ur=!1,this.hr=[],this._instance=t,this._surveyEventReceiver=null}onRemoteConfig(t){var n=t.surveys;if(Yn(n))return Us.warn("Flags not loaded yet. Not loading surveys.");var r=Fr(n);this.nr=r?n.length>0:n,Us.info("flags response received, isSurveysEnabled: "+this.nr),this.loadIfEnabled()}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var t=[],n=0;n<localStorage.length;n++){var r=localStorage.key(n);(r!=null&&r.startsWith(ZF)||r!=null&&r.startsWith("inProgressSurvey_"))&&t.push(r)}t.forEach(s=>localStorage.removeItem(s))}loadIfEnabled(){if(!this.ar)if(this.ur)Us.info("Already initializing surveys, skipping...");else if(this._instance.config.disable_surveys)Us.info("Disabled. Not loading surveys.");else{var t=Xt==null?void 0:Xt.__PosthogExtensions__;if(t){var n=this.nr;if(!lt(n)){this.ur=!0;try{var r=t.generateSurveys;if(r)return void this.dr(r,n);var s=t.loadExternalDependency;if(!s)return void this.vr("PostHog loadExternalDependency extension not found.");s(this._instance,"surveys",i=>{i||!t.generateSurveys?this.vr("Could not load surveys script",i):this.dr(t.generateSurveys,n)})}catch(i){throw this.vr("Error initializing surveys",i),i}finally{this.ur=!1}}}else Us.error("PostHog Extensions not found.")}}dr(t,n){this.ar=t(this._instance,n),this._surveyEventReceiver=new hEt(this._instance),Us.info("Surveys loaded successfully"),this.cr({isLoaded:!0})}vr(t,n){Us.error(t,n),this.cr({isLoaded:!1,error:t})}onSurveysLoaded(t){return this.hr.push(t),this.ar&&this.cr({isLoaded:!0}),()=>{this.hr=this.hr.filter(n=>n!==t)}}getSurveys(t,n){if(n===void 0&&(n=!1),this._instance.config.disable_surveys)return Us.info("Disabled. Not loading surveys."),t([]);var r=this._instance.get_property(IF);if(r&&!n)return t(r,{isLoaded:!0});if(this.lr)return t([],{isLoaded:!1,error:"Surveys are already being loaded"});try{this.lr=!0,this._instance.Ee({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this._instance.config.token),method:"GET",timeout:this._instance.config.surveys_request_timeout_ms,callback:s=>{var i;this.lr=!1;var o=s.statusCode;if(o!==200||!s.json){var a="Surveys API could not be loaded, status: "+o;return Us.error(a),t([],{isLoaded:!1,error:a})}var l,c=s.json.surveys||[],u=c.filter(d=>function(p){return!(!p.start_date||p.end_date)}(d)&&(function(p){var g;return!((g=p.conditions)==null||(g=g.events)==null||(g=g.values)==null||!g.length)}(d)||function(p){var g;return!((g=p.conditions)==null||(g=g.actions)==null||(g=g.values)==null||!g.length)}(d)));return u.length>0&&((l=this._surveyEventReceiver)==null||l.register(u)),(i=this._instance.persistence)==null||i.register({[IF]:c}),t(c,{isLoaded:!0})}})}catch(s){throw this.lr=!1,s}}cr(t){for(var n of this.hr)try{t.isLoaded?this.getSurveys(n):n([],t)}catch(r){Us.error("Error in survey callback",r)}}getActiveMatchingSurveys(t,n){if(n===void 0&&(n=!1),!Yn(this.ar))return this.ar.getActiveMatchingSurveys(t,n);Us.warn("init was not called")}pr(t){var n=null;return this.getSurveys(r=>{var s;n=(s=r.find(i=>i.id===t))!==null&&s!==void 0?s:null}),n}gr(t){if(Yn(this.ar))return{eligible:!1,reason:"SDK is not enabled or survey functionality is not yet loaded"};var n=typeof t=="string"?this.pr(t):t;return n?this.ar.checkSurveyEligibility(n):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(t){if(Yn(this.ar))return Us.warn("init was not called"),{visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"};var n=this.gr(t);return{visible:n.eligible,disabledReason:n.reason}}canRenderSurveyAsync(t,n){return Yn(this.ar)?(Us.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"})):new Promise(r=>{this.getSurveys(s=>{var i,o=(i=s.find(l=>l.id===t))!==null&&i!==void 0?i:null;if(o){var a=this.gr(o);r({visible:a.eligible,disabledReason:a.reason})}else r({visible:!1,disabledReason:"Survey not found"})},n)})}renderSurvey(t,n){if(Yn(this.ar))Us.warn("init was not called");else{var r=this.pr(t),s=Ct==null?void 0:Ct.querySelector(n);r?s?this.ar.renderSurvey(r,s):Us.warn("Survey element not found"):Us.warn("Survey not found")}}}(function(e){return e.Button="button",e.Tab="tab",e.Selector="selector",e})({});(function(e){return e.TopLeft="top_left",e.TopRight="top_right",e.TopCenter="top_center",e.MiddleLeft="middle_left",e.MiddleRight="middle_right",e.MiddleCenter="middle_center",e.Left="left",e.Center="center",e.Right="right",e.NextToTrigger="next_to_trigger",e})({});(function(e){return e.Popover="popover",e.API="api",e.Widget="widget",e})({});(function(e){return e.Open="open",e.MultipleChoice="multiple_choice",e.SingleChoice="single_choice",e.Rating="rating",e.Link="link",e})({});(function(e){return e.NextQuestion="next_question",e.End="end",e.ResponseBased="response_based",e.SpecificQuestion="specific_question",e})({});(function(e){return e.Once="once",e.Recurring="recurring",e.Always="always",e})({});var F7=function(e){return e.SHOWN="survey shown",e.DISMISSED="survey dismissed",e.SENT="survey sent",e}({}),_ee=function(e){return e.SURVEY_ID="$survey_id",e.SURVEY_NAME="$survey_name",e.SURVEY_RESPONSE="$survey_response",e.SURVEY_ITERATION="$survey_iteration",e.SURVEY_ITERATION_START_DATE="$survey_iteration_start_date",e.SURVEY_PARTIALLY_COMPLETED="$survey_partially_completed",e.SURVEY_SUBMISSION_ID="$survey_submission_id",e.SURVEY_QUESTIONS="$survey_questions",e.SURVEY_COMPLETED="$survey_completed",e}({}),Nee=ei("[RateLimiter]");class pEt{constructor(t){var n,r;this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=s=>{var i=s.text;if(i&&i.length)try{(JSON.parse(i).quota_limited||[]).forEach(o=>{Nee.info((o||"events")+" is quota limited."),this.serverLimits[o]=new Date().getTime()+6e4})}catch(o){return void Nee.warn('could not rate limit - continuing. Error: "'+(o==null?void 0:o.message)+'"',{text:i})}},this.instance=t,this.captureEventsPerSecond=((n=t.config.rate_limiting)==null?void 0:n.events_per_second)||10,this.captureEventsBurstLimit=Math.max(((r=t.config.rate_limiting)==null?void 0:r.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond),this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}clientRateLimitContext(t){var n,r,s;t===void 0&&(t=!1);var i=new Date().getTime(),o=(n=(r=this.instance.persistence)==null?void 0:r.get_property(RF))!==null&&n!==void 0?n:{tokens:this.captureEventsBurstLimit,last:i};o.tokens+=(i-o.last)/1e3*this.captureEventsPerSecond,o.last=i,o.tokens>this.captureEventsBurstLimit&&(o.tokens=this.captureEventsBurstLimit);var a=o.tokens<1;return a||t||(o.tokens=Math.max(0,o.tokens-1)),!a||this.lastEventRateLimited||t||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+this.captureEventsPerSecond+" events per second and "+this.captureEventsBurstLimit+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=a,(s=this.instance.persistence)==null||s.set_property(RF,o),{isRateLimited:a,remainingTokens:o.tokens}}isServerRateLimited(t){var n=this.serverLimits[t||"events"]||!1;return n!==!1&&new Date().getTime()<n}}var Dm=ei("[RemoteConfig]");class mEt{constructor(t){this._instance=t}get remoteConfig(){var t;return(t=Xt._POSTHOG_REMOTE_CONFIG)==null||(t=t[this._instance.config.token])==null?void 0:t.config}_r(t){var n,r;(n=Xt.__PosthogExtensions__)!=null&&n.loadExternalDependency?(r=Xt.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"remote-config",()=>t(this.remoteConfig)):(Dm.error("PostHog Extensions not found. Cannot load remote config."),t())}mr(t){this._instance.Ee({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback:n=>{t(n.json)}})}load(){try{if(this.remoteConfig)return Dm.info("Using preloaded remote config",this.remoteConfig),void this.Ie(this.remoteConfig);if(this._instance.I())return void Dm.warn("Remote config is disabled. Falling back to local config.");this._r(t=>{if(!t)return Dm.info("No config found after loading remote JS config. Falling back to JSON."),void this.mr(n=>{this.Ie(n)});this.Ie(t)})}catch(t){Dm.error("Error loading remote config",t)}}Ie(t){t?this._instance.config.__preview_remote_config?(this._instance.Ie(t),t.hasFeatureFlags!==!1&&this._instance.featureFlags.ensureFlagsLoaded()):Dm.info("__preview_remote_config is disabled. Logging config instead",t):Dm.error("Failed to fetch remote config from PostHog.")}}var QF=3e3;class gEt{constructor(t,n){this.br=!0,this.yr=[],this.wr=Sa((n==null?void 0:n.flush_interval_ms)||QF,250,5e3,"flush interval",QF),this.Sr=t}enqueue(t){this.yr.push(t),this.$r||this.kr()}unload(){this.Er();var t=this.yr.length>0?this.Ir():{},n=Object.values(t);[...n.filter(r=>r.url.indexOf("/e")===0),...n.filter(r=>r.url.indexOf("/e")!==0)].map(r=>{this.Sr(gt({},r,{transport:"sendBeacon"}))})}enable(){this.br=!1,this.kr()}kr(){var t=this;this.br||(this.$r=setTimeout(()=>{if(this.Er(),this.yr.length>0){var n=this.Ir(),r=function(){var i=n[s],o=new Date().getTime();i.data&&Fr(i.data)&&ur(i.data,a=>{a.offset=Math.abs(a.timestamp-o),delete a.timestamp}),t.Sr(i)};for(var s in n)r()}},this.wr))}Er(){clearTimeout(this.$r),this.$r=void 0}Ir(){var t={};return ur(this.yr,n=>{var r,s=n,i=(s?s.batchKey:null)||s.url;lt(t[i])&&(t[i]=gt({},s,{data:[]})),(r=t[i].data)==null||r.push(s.data)}),this.yr=[],t}}var yEt=["retriesPerformedSoFar"];class bEt{constructor(t){this.Pr=!1,this.Rr=3e3,this.yr=[],this._instance=t,this.yr=[],this.Tr=!0,!lt(Ne)&&"onLine"in Ne.navigator&&(this.Tr=Ne.navigator.onLine,Ur(Ne,"online",()=>{this.Tr=!0,this.se()}),Ur(Ne,"offline",()=>{this.Tr=!1}))}get length(){return this.yr.length}retriableRequest(t){var{retriesPerformedSoFar:n}=t,r=S1e(t,yEt);Di(n)&&n>0&&(r.url=wA(r.url,{retry_count:n})),this._instance.Ee(gt({},r,{callback:s=>{s.statusCode!==200&&(s.statusCode<400||s.statusCode>=500)&&(n??0)<10?this.Mr(gt({retriesPerformedSoFar:n},r)):r.callback==null||r.callback(s)}}))}Mr(t){var n=t.retriesPerformedSoFar||0;t.retriesPerformedSoFar=n+1;var r=function(o){var a=3e3*Math.pow(2,o),l=a/2,c=Math.min(18e5,a),u=(Math.random()-.5)*(c-l);return Math.ceil(c+u)}(n),s=Date.now()+r;this.yr.push({retryAt:s,requestOptions:t});var i="Enqueued failed request for retry in "+r;navigator.onLine||(i+=" (Browser is offline)"),kt.warn(i),this.Pr||(this.Pr=!0,this.Cr())}Cr(){this.Fr&&clearTimeout(this.Fr),this.Fr=setTimeout(()=>{this.Tr&&this.yr.length>0&&this.se(),this.Cr()},this.Rr)}se(){var t=Date.now(),n=[],r=this.yr.filter(i=>i.retryAt<t||(n.push(i),!1));if(this.yr=n,r.length>0)for(var{requestOptions:s}of r)this.retriableRequest(s)}unload(){for(var{requestOptions:t}of(this.Fr&&(clearTimeout(this.Fr),this.Fr=void 0),this.yr))try{this._instance.Ee(gt({},t,{transport:"sendBeacon"}))}catch(n){kt.error(n)}this.yr=[]}}class xEt{constructor(t){this.Or=()=>{var n,r,s,i;this.Ar||(this.Ar={});var o=this.scrollElement(),a=this.scrollY(),l=o?Math.max(0,o.scrollHeight-o.clientHeight):0,c=a+((o==null?void 0:o.clientHeight)||0),u=(o==null?void 0:o.scrollHeight)||0;this.Ar.lastScrollY=Math.ceil(a),this.Ar.maxScrollY=Math.max(a,(n=this.Ar.maxScrollY)!==null&&n!==void 0?n:0),this.Ar.maxScrollHeight=Math.max(l,(r=this.Ar.maxScrollHeight)!==null&&r!==void 0?r:0),this.Ar.lastContentY=c,this.Ar.maxContentY=Math.max(c,(s=this.Ar.maxContentY)!==null&&s!==void 0?s:0),this.Ar.maxContentHeight=Math.max(u,(i=this.Ar.maxContentHeight)!==null&&i!==void 0?i:0)},this._instance=t}getContext(){return this.Ar}resetContext(){var t=this.Ar;return setTimeout(this.Or,0),t}startMeasuringScrollPosition(){Ur(Ne,"scroll",this.Or,{capture:!0}),Ur(Ne,"scrollend",this.Or,{capture:!0}),Ur(Ne,"resize",this.Or)}scrollElement(){if(!this._instance.config.scroll_root_selector)return Ne==null?void 0:Ne.document.documentElement;var t=Fr(this._instance.config.scroll_root_selector)?this._instance.config.scroll_root_selector:[this._instance.config.scroll_root_selector];for(var n of t){var r=Ne==null?void 0:Ne.document.querySelector(n);if(r)return r}}scrollY(){if(this._instance.config.scroll_root_selector){var t=this.scrollElement();return t&&t.scrollTop||0}return Ne&&(Ne.scrollY||Ne.pageYOffset||Ne.document.documentElement.scrollTop)||0}scrollX(){if(this._instance.config.scroll_root_selector){var t=this.scrollElement();return t&&t.scrollLeft||0}return Ne&&(Ne.scrollX||Ne.pageXOffset||Ne.document.documentElement.scrollLeft)||0}}var vEt=e=>Sxe(e==null?void 0:e.config.mask_personal_data_properties,e==null?void 0:e.config.custom_personal_data_properties);class wEt{constructor(t,n,r,s){this.Dr=i=>{var o=this.Lr();if(!o||o.sessionId!==i){var a={sessionId:i,props:this.jr(this._instance)};this.Nr.register({[OF]:a})}},this._instance=t,this.zr=n,this.Nr=r,this.jr=s||vEt,this.zr.onSessionId(this.Dr)}Lr(){return this.Nr.props[OF]}getSetOnceProps(){var t,n=(t=this.Lr())==null?void 0:t.props;return n?"r"in n?Cxe(n):{$referring_domain:n.referringDomain,$pathname:n.initialPathName,utm_source:n.utm_source,utm_campaign:n.utm_campaign,utm_medium:n.utm_medium,utm_content:n.utm_content,utm_term:n.utm_term}:{}}getSessionProps(){var t={};return ur(JB(this.getSetOnceProps()),(n,r)=>{r==="$current_url"&&(r="url"),t["$session_entry_"+AF(r)]=n}),t}}var Pee=ei("[SessionId]");class SEt{constructor(t,n,r){var s;if(this.Ur=[],!t.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(t.config.__preview_experimental_cookieless_mode)throw new Error("SessionIdManager cannot be used with __preview_experimental_cookieless_mode");this.S=t.config,this.Nr=t.persistence,this.fi=void 0,this.Ct=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.qr=n||ep,this.Br=r||ep;var i=this.S.persistence_name||this.S.token,o=this.S.session_idle_timeout_seconds||1800;if(this._sessionTimeoutMs=1e3*Sa(o,60,36e3,"session_idle_timeout_seconds",1800),t.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.Hr(),this.Wr="ph_"+i+"_window_id",this.Gr="ph_"+i+"_primary_window_exists",this.Jr()){var a=ai.L(this.Wr),l=ai.L(this.Gr);a&&!l?this.fi=a:ai.N(this.Wr),ai.j(this.Gr,!0)}if((s=this.S.bootstrap)!=null&&s.sessionID)try{var c=(u=>{var d=u.replace(/-/g,"");if(d.length!==32)throw new Error("Not a valid UUID");if(d[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(d.substring(0,12),16)})(this.S.bootstrap.sessionID);this.Vr(this.S.bootstrap.sessionID,new Date().getTime(),c)}catch(u){Pee.error("Invalid sessionID in bootstrap",u)}this.Kr()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(t){return lt(this.Ur)&&(this.Ur=[]),this.Ur.push(t),this.Ct&&t(this.Ct,this.fi),()=>{this.Ur=this.Ur.filter(n=>n!==t)}}Jr(){return this.S.persistence!=="memory"&&!this.Nr.Fe&&ai.O()}Yr(t){t!==this.fi&&(this.fi=t,this.Jr()&&ai.j(this.Wr,t))}Xr(){return this.fi?this.fi:this.Jr()?ai.L(this.Wr):null}Vr(t,n,r){t===this.Ct&&n===this._sessionActivityTimestamp&&r===this._sessionStartTimestamp||(this._sessionStartTimestamp=r,this._sessionActivityTimestamp=n,this.Ct=t,this.Nr.register({[uA]:[n,t,r]}))}Qr(){if(this.Ct&&this._sessionActivityTimestamp&&this._sessionStartTimestamp)return[this._sessionActivityTimestamp,this.Ct,this._sessionStartTimestamp];var t=this.Nr.props[uA];return Fr(t)&&t.length===2&&t.push(t[0]),t||[0,null,0]}resetSessionId(){this.Vr(null,null,null)}Kr(){Ur(Ne,"beforeunload",()=>{this.Jr()&&ai.N(this.Gr)},{capture:!1})}checkAndGetSessionAndWindowId(t,n){if(t===void 0&&(t=!1),n===void 0&&(n=null),this.S.__preview_experimental_cookieless_mode)throw new Error("checkAndGetSessionAndWindowId should not be called in __preview_experimental_cookieless_mode");var r=n||new Date().getTime(),[s,i,o]=this.Qr(),a=this.Xr(),l=Di(o)&&o>0&&Math.abs(r-o)>864e5,c=!1,u=!i,d=!t&&Math.abs(r-s)>this.sessionTimeoutMs;u||d||l?(i=this.qr(),a=this.Br(),Pee.info("new session ID generated",{sessionId:i,windowId:a,changeReason:{noSessionId:u,activityTimeout:d,sessionPastMaximumLength:l}}),o=r,c=!0):a||(a=this.Br(),c=!0);var p=s===0||!t||l?r:s,g=o===0?new Date().getTime():o;return this.Yr(a),this.Vr(i,p,g),t||this.Hr(),c&&this.Ur.forEach(b=>b(i,a,c?{noSessionId:u,activityTimeout:d,sessionPastMaximumLength:l}:void 0)),{sessionId:i,windowId:a,sessionStartTimestamp:g,changeReason:c?{noSessionId:u,activityTimeout:d,sessionPastMaximumLength:l}:void 0,lastActivityTimestamp:s}}Hr(){clearTimeout(this.Zr),this.Zr=setTimeout(()=>{this.resetSessionId()},1.1*this.sessionTimeoutMs)}}var CEt=["$set_once","$set"],Af=ei("[SiteApps]");class kEt{constructor(t){this._instance=t,this.ts=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}es(t,n){if(n){var r=this.globalsForEvent(n);this.ts.push(r),this.ts.length>1e3&&(this.ts=this.ts.slice(10))}}get siteAppLoaders(){var t;return(t=Xt._POSTHOG_REMOTE_CONFIG)==null||(t=t[this._instance.config.token])==null?void 0:t.siteApps}init(){if(this.isEnabled){var t=this._instance.Ge(this.es.bind(this));this.rs=()=>{t(),this.ts=[],this.rs=void 0}}}globalsForEvent(t){var n,r,s,i,o,a,l;if(!t)throw new Error("Event payload is required");var c={},u=this._instance.get_property("$groups")||[],d=this._instance.get_property("$stored_group_properties")||{};for(var[p,g]of Object.entries(d))c[p]={id:u[p],type:p,properties:g};var{$set_once:b,$set:x}=t;return{event:gt({},S1e(t,CEt),{properties:gt({},t.properties,x?{$set:gt({},(n=(r=t.properties)==null?void 0:r.$set)!==null&&n!==void 0?n:{},x)}:{},b?{$set_once:gt({},(s=(i=t.properties)==null?void 0:i.$set_once)!==null&&s!==void 0?s:{},b)}:{}),elements_chain:(o=(a=t.properties)==null?void 0:a.$elements_chain)!==null&&o!==void 0?o:"",distinct_id:(l=t.properties)==null?void 0:l.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:c}}setupSiteApp(t){var n=this.apps[t.id],r=()=>{var a;!n.errored&&this.ts.length&&(Af.info("Processing "+this.ts.length+" events for site app with id "+t.id),this.ts.forEach(l=>n.processEvent==null?void 0:n.processEvent(l)),n.processedBuffer=!0),Object.values(this.apps).every(l=>l.processedBuffer||l.errored)&&((a=this.rs)==null||a.call(this))},s=!1,i=a=>{n.errored=!a,n.loaded=!0,Af.info("Site app with id "+t.id+" "+(a?"loaded":"errored")),s&&r()};try{var{processEvent:o}=t.init({posthog:this._instance,callback:a=>{i(a)}});o&&(n.processEvent=o),s=!0}catch(a){Af.error("Error while initializing PostHog app with config id "+t.id,a),i(!1)}if(s&&n.loaded)try{r()}catch(a){Af.error("Error while processing buffered events PostHog app with config id "+t.id,a),n.errored=!0}}ss(){var t=this.siteAppLoaders||[];for(var n of t)this.apps[n.id]={id:n.id,loaded:!1,errored:!1,processedBuffer:!1};for(var r of t)this.setupSiteApp(r)}ns(t){if(Object.keys(this.apps).length!==0){var n=this.globalsForEvent(t);for(var r of Object.values(this.apps))try{r.processEvent==null||r.processEvent(n)}catch(s){Af.error("Error while processing event "+t.event+" for site app "+r.id,s)}}}onRemoteConfig(t){var n,r,s,i=this;if((n=this.siteAppLoaders)!=null&&n.length)return this.isEnabled?(this.ss(),void this._instance.on("eventCaptured",c=>this.ns(c))):void Af.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((r=this.rs)==null||r.call(this),(s=t.siteApps)!=null&&s.length)if(this.isEnabled){var o=function(c){var u;Xt["__$$ph_site_app_"+c]=i._instance,(u=Xt.__PosthogExtensions__)==null||u.loadSiteApp==null||u.loadSiteApp(i._instance,l,d=>{if(d)return Af.error("Error while initializing PostHog app with config id "+c,d)})};for(var{id:a,url:l}of t.siteApps)o(a)}else Af.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}var EEt=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","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"],Mee=function(e,t){if(!e)return!1;var n=e.toLowerCase();return EEt.concat(t||[]).some(r=>{var s=r.toLowerCase();return n.indexOf(s)!==-1})},Dxe=function(e,t){if(!e)return!1;var n=e.userAgent;if(n&&Mee(n,t))return!0;try{var r=e==null?void 0:e.userAgentData;if(r!=null&&r.brands&&r.brands.some(s=>Mee(s==null?void 0:s.brand,t)))return!0}catch{}return!!e.webdriver},Kv=function(e){return e.US="us",e.EU="eu",e.CUSTOM="custom",e}({}),jee="i.posthog.com";class DEt{constructor(t){this.os={},this.instance=t}get apiHost(){var t=this.instance.config.api_host.trim().replace(/\/$/,"");return t==="https://app.posthog.com"?"https://us.i.posthog.com":t}get uiHost(){var t,n=(t=this.instance.config.ui_host)==null?void 0:t.replace(/\/$/,"");return n||(n=this.apiHost.replace("."+jee,".posthog.com")),n==="https://app.posthog.com"?"https://us.posthog.com":n}get region(){return this.os[this.apiHost]||(/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.os[this.apiHost]=Kv.US:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.os[this.apiHost]=Kv.EU:this.os[this.apiHost]=Kv.CUSTOM),this.os[this.apiHost]}endpointFor(t,n){if(n===void 0&&(n=""),n&&(n=n[0]==="/"?n:"/"+n),t==="ui")return this.uiHost+n;if(this.region===Kv.CUSTOM)return this.apiHost+n;var r=jee+n;switch(t){case"assets":return"https://"+this.region+"-assets."+r;case"api":return"https://"+this.region+"."+r}}}var AEt={icontains:(e,t)=>!!Ne&&t.href.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>!!Ne&&t.href.toLowerCase().indexOf(e.toLowerCase())===-1,regex:(e,t)=>!!Ne&&p1(t.href,e),not_regex:(e,t)=>!!Ne&&!p1(t.href,e),exact:(e,t)=>t.href===e,is_not:(e,t)=>t.href!==e};class Ci{constructor(t){var n=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(r){r===void 0&&(r=!1),n.getWebExperiments(s=>{Ci.ls("retrieved web experiments from the server"),n.us=new Map,s.forEach(i=>{if(i.feature_flag_key){var o;n.us&&(Ci.ls("setting flag key ",i.feature_flag_key," to web experiment ",i),(o=n.us)==null||o.set(i.feature_flag_key,i));var a=n._instance.getFeatureFlag(i.feature_flag_key);Qr(a)&&i.variants[a]&&n.hs(i.name,a,i.variants[a].transforms)}else if(i.variants)for(var l in i.variants){var c=i.variants[l];Ci.ds(c)&&n.hs(i.name,l,c.transforms)}})},r)},this._instance=t,this._instance.onFeatureFlags(r=>{this.onFeatureFlags(r)})}onFeatureFlags(t){if(this._is_bot())Ci.ls("Refusing to render web experiment since the viewer is a likely bot");else if(!this._instance.config.disable_web_experiments){if(Yn(this.us))return this.us=new Map,this.loadIfEnabled(),void this.previewWebExperiment();Ci.ls("applying feature flags",t),t.forEach(n=>{var r;if(this.us&&(r=this.us)!=null&&r.has(n)){var s,i=this._instance.getFeatureFlag(n),o=(s=this.us)==null?void 0:s.get(n);i&&o!=null&&o.variants[i]&&this.hs(o.name,i,o.variants[i].transforms)}})}}previewWebExperiment(){var t=Ci.getWindowLocation();if(t!=null&&t.search){var n=mA(t==null?void 0:t.search,"__experiment_id"),r=mA(t==null?void 0:t.search,"__experiment_variant");n&&r&&(Ci.ls("previewing web experiments "+n+" && "+r),this.getWebExperiments(s=>{this.vs(parseInt(n),r,s)},!1,!0))}}loadIfEnabled(){this._instance.config.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(t,n,r){if(this._instance.config.disable_web_experiments&&!r)return t([]);var s=this._instance.get_property("$web_experiments");if(s&&!n)return t(s);this._instance.Ee({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this._instance.config.token),method:"GET",callback:i=>{if(i.statusCode!==200||!i.json)return t([]);var o=i.json.experiments||[];return t(o)}})}vs(t,n,r){var s=r.filter(i=>i.id===t);s&&s.length>0&&(Ci.ls("Previewing web experiment ["+s[0].name+"] with variant ["+n+"]"),this.hs(s[0].name,n,s[0].variants[n].transforms))}static ds(t){return!Yn(t.conditions)&&Ci.cs(t)&&Ci.fs(t)}static cs(t){var n;if(Yn(t.conditions)||Yn((n=t.conditions)==null?void 0:n.url))return!0;var r,s,i,o=Ci.getWindowLocation();return!!o&&((r=t.conditions)==null||!r.url||AEt[(s=(i=t.conditions)==null?void 0:i.urlMatchType)!==null&&s!==void 0?s:"icontains"](t.conditions.url,o))}static getWindowLocation(){return Ne==null?void 0:Ne.location}static fs(t){var n;if(Yn(t.conditions)||Yn((n=t.conditions)==null?void 0:n.utm))return!0;var r=bxe();if(r.utm_source){var s,i,o,a,l,c,u,d,p=(s=t.conditions)==null||(s=s.utm)==null||!s.utm_campaign||((i=t.conditions)==null||(i=i.utm)==null?void 0:i.utm_campaign)==r.utm_campaign,g=(o=t.conditions)==null||(o=o.utm)==null||!o.utm_source||((a=t.conditions)==null||(a=a.utm)==null?void 0:a.utm_source)==r.utm_source,b=(l=t.conditions)==null||(l=l.utm)==null||!l.utm_medium||((c=t.conditions)==null||(c=c.utm)==null?void 0:c.utm_medium)==r.utm_medium,x=(u=t.conditions)==null||(u=u.utm)==null||!u.utm_term||((d=t.conditions)==null||(d=d.utm)==null?void 0:d.utm_term)==r.utm_term;return p&&b&&x&&g}return!1}static ls(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];kt.info("[WebExperiments] "+t,r)}hs(t,n,r){this._is_bot()?Ci.ls("Refusing to render web experiment since the viewer is a likely bot"):n!=="control"?r.forEach(s=>{if(s.selector){var i;Ci.ls("applying transform of variant "+n+" for experiment "+t+" ",s);var o=(i=document)==null?void 0:i.querySelectorAll(s.selector);o==null||o.forEach(a=>{var l=a;s.html&&(l.innerHTML=s.html),s.css&&l.setAttribute("style",s.css)})}}):Ci.ls("Control variants leave the page unmodified.")}_is_bot(){return wa&&this._instance?Dxe(wa,this._instance.config.custom_blocked_useragents):void 0}}var TEt=ei("[PostHog ExternalIntegrations]"),_Et={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class NEt{constructor(t){this._instance=t}J(t,n){var r;(r=Xt.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,t,s=>{if(s)return TEt.error("failed to load script",s);n()})}startIfEnabledOrStop(){var t=this,n=function(o){var a,l,c;!s||(a=Xt.__PosthogExtensions__)!=null&&(a=a.integrations)!=null&&a[o]||t.J(_Et[o],()=>{var u;(u=Xt.__PosthogExtensions__)==null||(u=u.integrations)==null||(u=u[o])==null||u.start(t._instance)}),!s&&(l=Xt.__PosthogExtensions__)!=null&&(l=l.integrations)!=null&&l[o]&&((c=Xt.__PosthogExtensions__)==null||(c=c.integrations)==null||(c=c[o])==null||c.stop())};for(var[r,s]of Object.entries((i=this._instance.config.integrations)!==null&&i!==void 0?i:{})){var i;n(r)}}}var xw={},eI=()=>{},S0="posthog",Axe=!V2t&&(ko==null?void 0:ko.indexOf("MSIE"))===-1&&(ko==null?void 0:ko.indexOf("Mozilla"))===-1,Fee=e=>{var t;return{api_host:"https://us.i.posthog.com",ui_host:null,token:"",autocapture:!0,rageclick:!0,cross_subdomain_cookie:wkt(Ct==null?void 0:Ct.location),persistence:"localStorage+cookie",persistence_name:"",loaded:eI,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageview:e!=="2025-05-24"||"history_change",capture_pageleave:"if_capture_pageview",defaults:e??"unset",debug:Po&&Qr(Po==null?void 0:Po.search)&&Po.search.indexOf("__posthog_debug=true")!==-1||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:(Ne==null||(t=Ne.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",opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,session_recording:{},mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error:n=>{var r="Bad HTTP status: "+n.statusCode+" "+n.text;kt.error(r)},get_device_id:n=>n,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:"identified_only",before_send:void 0,request_queue_config:{flush_interval_ms:QF},error_tracking:{},_onCapture:eI}},Iee=e=>{var t={};lt(e.process_person)||(t.person_profiles=e.process_person),lt(e.xhr_headers)||(t.request_headers=e.xhr_headers),lt(e.cookie_name)||(t.persistence_name=e.cookie_name),lt(e.disable_cookie)||(t.disable_persistence=e.disable_cookie),lt(e.store_google)||(t.save_campaign_params=e.store_google),lt(e.verbose)||(t.debug=e.verbose);var n=os({},t,e);return Fr(e.property_blacklist)&&(lt(e.property_denylist)?n.property_denylist=e.property_blacklist:Fr(e.property_denylist)?n.property_denylist=[...e.property_blacklist,...e.property_denylist]:kt.error("Invalid value for property_denylist config: "+e.property_denylist)),n};class PEt{constructor(){this.__forceAllowLocalhost=!1}get ps(){return this.__forceAllowLocalhost}set ps(t){kt.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=t}}class K4{get decideEndpointWasHit(){var t,n;return(t=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&t!==void 0&&t}get flagsEndpointWasHit(){var t,n;return(t=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&t!==void 0&&t}constructor(){this.webPerformance=new PEt,this.gs=!1,this.version=Rd.LIB_VERSION,this._s=new Exe,this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=Fee(),this.SentryIntegration=j2t,this.sentryIntegration=t=>function(n,r){var s=txe(n,r);return{name:exe,processEvent:i=>s(i)}}(this,t),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.bs=!1,this.ys=null,this.ws=null,this.Ss=null,this.featureFlags=new cEt(this),this.toolbar=new I2t(this),this.scrollManager=new xEt(this),this.pageViewManager=new z2t(this),this.surveys=new fEt(this),this.experiments=new Ci(this),this.exceptions=new q2t(this),this.rateLimiter=new pEt(this),this.requestRouter=new DEt(this),this.consent=new Vkt(this),this.externalIntegrations=new NEt(this),this.people={set:(t,n,r)=>{var s=Qr(t)?{[t]:n}:t;this.setPersonProperties(s),r==null||r({})},set_once:(t,n,r)=>{var s=Qr(t)?{[t]:n}:t;this.setPersonProperties(void 0,s),r==null||r({})}},this.on("eventCaptured",t=>kt.info('send "'+(t==null?void 0:t.event)+'"',t))}init(t,n,r){if(r&&r!==S0){var s,i=(s=xw[r])!==null&&s!==void 0?s:new K4;return i._init(t,n,r),xw[r]=i,xw[S0][r]=i,i}return this._init(t,n,r)}_init(t,n,r){var s,i;if(n===void 0&&(n={}),lt(t)||TF(t))return kt.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 kt.warn("You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},this.$s=n,this.ks=[],n.person_profiles&&(this.ws=n.person_profiles),this.set_config(os({},Fee(n.defaults),Iee(n),{name:r,token:t})),this.config.on_xhr_error&&kt.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=n.disable_compression?void 0:Vd.GZipJS,this.persistence=new j7(this.config),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new j7(gt({},this.config,{persistence:"sessionStorage"}));var o=gt({},this.persistence.props),a=gt({},this.sessionPersistence.props);if(this.register({$initialization_time:new Date().toISOString()}),this.xs=new gEt(E=>this.Es(E),this.config.request_queue_config),this.Is=new bEt(this),this.__request_queue=[],this.config.__preview_experimental_cookieless_mode||(this.sessionManager=new SEt(this),this.sessionPropsManager=new wEt(this,this.sessionManager,this.persistence)),new R2t(this).startIfEnabledOrStop(),this.siteApps=new kEt(this),(s=this.siteApps)==null||s.init(),this.config.__preview_experimental_cookieless_mode||(this.sessionRecording=new P2t(this),this.sessionRecording.startIfEnabledOrStop()),this.config.disable_scroll_properties||this.scrollManager.startMeasuringScrollPosition(),this.autocapture=new Ikt(this),this.autocapture.startIfEnabled(),this.surveys.loadIfEnabled(),this.heatmaps=new $2t(this),this.heatmaps.startIfEnabled(),this.webVitalsAutocapture=new L2t(this),this.exceptionObserver=new qkt(this),this.exceptionObserver.startIfEnabled(),this.deadClicksAutocapture=new B1e(this,Wkt),this.deadClicksAutocapture.startIfEnabled(),this.historyAutocapture=new o2t(this),this.historyAutocapture.startIfEnabled(),Rd.DEBUG=Rd.DEBUG||this.config.debug,Rd.DEBUG&&kt.info("Starting in debug mode",{this:this,config:n,thisC:gt({},this.config),p:o,s:a}),this.Ps(),((i=n.bootstrap)==null?void 0:i.distinctID)!==void 0){var l,c,u=this.config.get_device_id(ep()),d=(l=n.bootstrap)!=null&&l.isIdentifiedID?u:n.bootstrap.distinctID;this.persistence.set_property(Pd,(c=n.bootstrap)!=null&&c.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:n.bootstrap.distinctID,$device_id:d})}if(this.Rs()){var p,g,b=Object.keys(((p=n.bootstrap)==null?void 0:p.featureFlags)||{}).filter(E=>{var k;return!((k=n.bootstrap)==null||(k=k.featureFlags)==null||!k[E])}).reduce((E,k)=>{var T;return E[k]=((T=n.bootstrap)==null||(T=T.featureFlags)==null?void 0:T[k])||!1,E},{}),x=Object.keys(((g=n.bootstrap)==null?void 0:g.featureFlagPayloads)||{}).filter(E=>b[E]).reduce((E,k)=>{var T,P;return(T=n.bootstrap)!=null&&(T=T.featureFlagPayloads)!=null&&T[k]&&(E[k]=(P=n.bootstrap)==null||(P=P.featureFlagPayloads)==null?void 0:P[k]),E},{});this.featureFlags.receivedFeatureFlags({featureFlags:b,featureFlagPayloads:x})}if(this.config.__preview_experimental_cookieless_mode)this.register_once({distinct_id:SE,$device_id:null},"");else if(!this.get_distinct_id()){var S=this.config.get_device_id(ep());this.register_once({distinct_id:S,$device_id:S},""),this.persistence.set_property(Pd,"anonymous")}return Ur(Ne,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),this.toolbar.maybeLoadToolbar(),n.segment?M2t(this,()=>this.Ts()):this.Ts(),cl(this.config._onCapture)&&this.config._onCapture!==eI&&(kt.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",E=>this.config._onCapture(E.event,E))),this.config.ip&&kt.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}Ie(t){var n,r,s,i,o,a,l,c;if(!Ct||!Ct.body)return kt.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(()=>{this.Ie(t)},500);this.compression=void 0,t.supportedCompression&&!this.config.disable_compression&&(this.compression=xn(t.supportedCompression,Vd.GZipJS)?Vd.GZipJS:xn(t.supportedCompression,Vd.Base64)?Vd.Base64:void 0),(n=t.analytics)!=null&&n.endpoint&&(this.analyticsDefaultEndpoint=t.analytics.endpoint),this.set_config({person_profiles:this.ws?this.ws:"identified_only"}),(r=this.siteApps)==null||r.onRemoteConfig(t),(s=this.sessionRecording)==null||s.onRemoteConfig(t),(i=this.autocapture)==null||i.onRemoteConfig(t),(o=this.heatmaps)==null||o.onRemoteConfig(t),this.surveys.onRemoteConfig(t),(a=this.webVitalsAutocapture)==null||a.onRemoteConfig(t),(l=this.exceptionObserver)==null||l.onRemoteConfig(t),this.exceptions.onRemoteConfig(t),(c=this.deadClicksAutocapture)==null||c.onRemoteConfig(t)}Ts(){try{this.config.loaded(this)}catch(t){kt.critical("`loaded` function failed",t)}this.Ms(),this.config.capture_pageview&&setTimeout(()=>{this.consent.isOptedIn()&&this.Cs()},1),new mEt(this).load(),this.featureFlags.flags()}Ms(){var t;this.has_opted_out_capturing()||this.config.request_batching&&((t=this.xs)==null||t.enable())}_dom_loaded(){this.has_opted_out_capturing()||ap(this.__request_queue,t=>this.Es(t)),this.__request_queue=[],this.Ms()}_handle_unload(){var t,n;this.config.request_batching?(this.Fs()&&this.capture("$pageleave"),(t=this.xs)==null||t.unload(),(n=this.Is)==null||n.unload()):this.Fs()&&this.capture("$pageleave",null,{transport:"sendBeacon"})}Ee(t){this.__loaded&&(Axe?this.__request_queue.push(t):this.rateLimiter.isServerRateLimited(t.batchKey)||(t.transport=t.transport||this.config.api_transport,t.url=wA(t.url,{ip:this.config.ip?1:0}),t.headers=gt({},this.config.request_headers),t.compression=t.compression==="best-available"?this.compression:t.compression,t.fetchOptions=t.fetchOptions||this.config.fetch_options,(n=>{var r,s,i,o=gt({},n);o.timeout=o.timeout||6e4,o.url=wA(o.url,{_:new Date().getTime().toString(),ver:Rd.LIB_VERSION,compression:o.compression});var a=(r=o.transport)!==null&&r!==void 0?r:"fetch",l=(s=(i=C1e(bw,c=>c.transport===a))==null?void 0:i.method)!==null&&s!==void 0?s:bw[0].method;if(!l)throw new Error("No available transport method");l(o)})(gt({},t,{callback:n=>{var r,s;this.rateLimiter.checkForLimiting(n),n.statusCode>=400&&((r=(s=this.config).on_request_error)==null||r.call(s,n)),t.callback==null||t.callback(n)}}))))}Es(t){this.Is?this.Is.retriableRequest(t):this.Ee(t)}_execute_array(t){var n,r=[],s=[],i=[];ap(t,a=>{a&&(n=a[0],Fr(n)?i.push(a):cl(a)?a.call(this):Fr(a)&&n==="alias"?r.push(a):Fr(a)&&n.indexOf("capture")!==-1&&cl(this[n])?i.push(a):s.push(a))});var o=function(a,l){ap(a,function(c){if(Fr(c[0])){var u=l;ur(c,function(d){u=u[d[0]].apply(u,d.slice(1))})}else this[c[0]].apply(this,c.slice(1))},l)};o(r,this),o(s,this),o(i,this)}Rs(){var t,n;return((t=this.config.bootstrap)==null?void 0:t.featureFlags)&&Object.keys((n=this.config.bootstrap)==null?void 0:n.featureFlags).length>0||!1}push(t){this._execute_array([t])}capture(t,n,r){var s;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.xs){if(!this.consent.isOptedOut())if(!lt(t)&&Qr(t)){if(this.config.opt_out_useragent_filter||!this._is_bot()){var i=r!=null&&r.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(i==null||!i.isRateLimited){n!=null&&n.$current_url&&!Qr(n==null?void 0:n.$current_url)&&(kt.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),n==null||delete n.$current_url),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var o=new Date,a=(r==null?void 0:r.timestamp)||o,l=ep(),c={uuid:l,event:t,properties:this.calculateEventProperties(t,n||{},a,l)};i&&(c.properties.$lib_rate_limit_remaining_tokens=i.remainingTokens),r!=null&&r.$set&&(c.$set=r==null?void 0:r.$set);var u,d,p=this.Os(r==null?void 0:r.$set_once);if(p&&(c.$set_once=p),(c=xkt(c,r!=null&&r._noTruncate?null:this.config.properties_string_max_length)).timestamp=a,lt(r==null?void 0:r.timestamp)||(c.properties.$event_time_override_provided=!0,c.properties.$event_time_override_system_time=o),t===F7.DISMISSED||t===F7.SENT){var g=n==null?void 0:n[_ee.SURVEY_ID],b=n==null?void 0:n[_ee.SURVEY_ITERATION];localStorage.setItem((d=""+ZF+(u={id:g,current_iteration:b}).id,u.current_iteration&&u.current_iteration>0&&(d=""+ZF+u.id+"_"+u.current_iteration),d),"true"),c.$set=gt({},c.$set,{[dEt({id:g,current_iteration:b},t===F7.SENT?"responded":"dismissed")]:!0})}var x=gt({},c.properties.$set,c.$set);if(B0(x)||this.setPersonPropertiesForFlags(x),!Yn(this.config.before_send)){var S=this.As(c);if(!S)return;c=S}this._s.emit("eventCaptured",c);var E={method:"POST",url:(s=r==null?void 0:r._url)!==null&&s!==void 0?s:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:c,compression:"best-available",batchKey:r==null?void 0:r._batchKey};return!this.config.request_batching||r&&(r==null||!r._batchKey)||r!=null&&r.send_instantly?this.Es(E):this.xs.enqueue(E),c}kt.critical("This capture call is ignored due to client rate limiting.")}}else kt.error("No event name provided to posthog.capture")}else kt.uninitializedWarning("posthog.capture")}Ge(t){return this.on("eventCaptured",n=>t(n.event,n))}calculateEventProperties(t,n,r,s,i){if(r=r||new Date,!this.persistence||!this.sessionPersistence)return n;var o=i?void 0:this.persistence.remove_event_timer(t),a=gt({},n);if(a.token=this.config.token,a.$config_defaults=this.config.defaults,this.config.__preview_experimental_cookieless_mode&&(a.$cookieless_mode=!0),t==="$snapshot"){var l=gt({},this.persistence.properties(),this.sessionPersistence.properties());return a.distinct_id=l.distinct_id,(!Qr(a.distinct_id)&&!Di(a.distinct_id)||TF(a.distinct_id))&&kt.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),a}var c,u=oEt(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var{sessionId:d,windowId:p}=this.sessionManager.checkAndGetSessionAndWindowId(i,r.getTime());a.$session_id=d,a.$window_id=p}this.sessionPropsManager&&os(a,this.sessionPropsManager.getSessionProps());try{var g;this.sessionRecording&&os(a,this.sessionRecording.sdkDebugProperties),a.$sdk_debug_retry_queue_size=(g=this.Is)==null?void 0:g.length}catch(E){a.$sdk_debug_error_capturing_properties=String(E)}if(this.requestRouter.region===Kv.CUSTOM&&(a.$lib_custom_api_host=this.config.api_host),c=t!=="$pageview"||i?t!=="$pageleave"||i?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(r):this.pageViewManager.doPageView(r,s),a=os(a,c),t==="$pageview"&&Ct&&(a.title=Ct.title),!lt(o)){var b=r.getTime()-o;a.$duration=parseFloat((b/1e3).toFixed(3))}ko&&this.config.opt_out_useragent_filter&&(a.$browser_type=this._is_bot()?"bot":"browser"),(a=os({},u,this.persistence.properties(),this.sessionPersistence.properties(),a)).$is_identified=this._isIdentified(),Fr(this.config.property_denylist)?ur(this.config.property_denylist,function(E){delete a[E]}):kt.error("Invalid value for property_denylist config: "+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var x=this.config.sanitize_properties;x&&(kt.error("sanitize_properties is deprecated. Use before_send instead"),a=x(a,t));var S=this.Ds();return a.$process_person_profile=S,S&&!i&&this.Ls("_calculate_event_properties"),a}Os(t){var n;if(!this.persistence||!this.Ds()||this.gs)return t;var r=this.persistence.get_initial_props(),s=(n=this.sessionPropsManager)==null?void 0:n.getSetOnceProps(),i=os({},r,s||{},t||{}),o=this.config.sanitize_properties;return o&&(kt.error("sanitize_properties is deprecated. Use before_send instead"),i=o(i,"$set_once")),this.gs=!0,B0(i)?void 0:i}register(t,n){var r;(r=this.persistence)==null||r.register(t,n)}register_once(t,n,r){var s;(s=this.persistence)==null||s.register_once(t,n,r)}register_for_session(t){var n;(n=this.sessionPersistence)==null||n.register(t)}unregister(t){var n;(n=this.persistence)==null||n.unregister(t)}unregister_for_session(t){var n;(n=this.sessionPersistence)==null||n.unregister(t)}js(t,n){this.register({[t]:n})}getFeatureFlag(t,n){return this.featureFlags.getFeatureFlag(t,n)}getFeatureFlagPayload(t){var n=this.featureFlags.getFeatureFlagPayload(t);try{return JSON.parse(n)}catch{return n}}isFeatureEnabled(t,n){return this.featureFlags.isFeatureEnabled(t,n)}reloadFeatureFlags(){this.featureFlags.reloadFeatureFlags()}updateEarlyAccessFeatureEnrollment(t,n){this.featureFlags.updateEarlyAccessFeatureEnrollment(t,n)}getEarlyAccessFeatures(t,n,r){return n===void 0&&(n=!1),this.featureFlags.getEarlyAccessFeatures(t,n,r)}on(t,n){return this._s.on(t,n)}onFeatureFlags(t){return this.featureFlags.onFeatureFlags(t)}onSurveysLoaded(t){return this.surveys.onSurveysLoaded(t)}onSessionId(t){var n,r;return(n=(r=this.sessionManager)==null?void 0:r.onSessionId(t))!==null&&n!==void 0?n:()=>{}}getSurveys(t,n){n===void 0&&(n=!1),this.surveys.getSurveys(t,n)}getActiveMatchingSurveys(t,n){n===void 0&&(n=!1),this.surveys.getActiveMatchingSurveys(t,n)}renderSurvey(t,n){this.surveys.renderSurvey(t,n)}canRenderSurvey(t){return this.surveys.canRenderSurvey(t)}canRenderSurveyAsync(t,n){return n===void 0&&(n=!1),this.surveys.canRenderSurveyAsync(t,n)}identify(t,n,r){if(!this.__loaded||!this.persistence)return kt.uninitializedWarning("posthog.identify");if(Di(t)&&(t=t.toString(),kt.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),t)if(["distinct_id","distinctid"].includes(t.toLowerCase()))kt.critical('The string "'+t+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.');else if(t!==SE){if(this.Ls("posthog.identify")){var s=this.get_distinct_id();if(this.register({$user_id:t}),!this.get_property("$device_id")){var i=s;this.register_once({$had_persisted_distinct_id:!0,$device_id:i},"")}t!==s&&t!==this.get_property(Hv)&&(this.unregister(Hv),this.register({distinct_id:t}));var o=(this.persistence.get_property(Pd)||"anonymous")==="anonymous";t!==s&&o?(this.persistence.set_property(Pd,"identified"),this.setPersonPropertiesForFlags(gt({},r||{},n||{}),!1),this.capture("$identify",{distinct_id:t,$anon_distinct_id:s},{$set:n||{},$set_once:r||{}}),this.Ss=wee(t,n,r),this.featureFlags.setAnonymousDistinctId(s)):(n||r)&&this.setPersonProperties(n,r),t!==s&&(this.reloadFeatureFlags(),this.unregister(dA))}}else kt.critical('The string "'+SE+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.');else kt.error("Unique user id has not been set in posthog.identify")}setPersonProperties(t,n){if((t||n)&&this.Ls("posthog.setPersonProperties")){var r=wee(this.get_distinct_id(),t,n);this.Ss!==r?(this.setPersonPropertiesForFlags(gt({},n||{},t||{})),this.capture("$set",{$set:t||{},$set_once:n||{}}),this.Ss=r):kt.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(t,n,r){if(t&&n){if(this.Ls("posthog.group")){var s=this.getGroups();s[t]!==n&&this.resetGroupPropertiesForFlags(t),this.register({$groups:gt({},s,{[t]:n})}),r&&(this.capture("$groupidentify",{$group_type:t,$group_key:n,$group_set:r}),this.setGroupPropertiesForFlags({[t]:r})),s[t]===n||r||this.reloadFeatureFlags()}}else kt.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(t,n){n===void 0&&(n=!0),this.featureFlags.setPersonPropertiesForFlags(t,n)}resetPersonPropertiesForFlags(){this.featureFlags.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(t,n){n===void 0&&(n=!0),this.Ls("posthog.setGroupPropertiesForFlags")&&this.featureFlags.setGroupPropertiesForFlags(t,n)}resetGroupPropertiesForFlags(t){this.featureFlags.resetGroupPropertiesForFlags(t)}reset(t){var n,r,s,i;if(kt.info("reset"),!this.__loaded)return kt.uninitializedWarning("posthog.reset");var o=this.get_property("$device_id");if(this.consent.reset(),(n=this.persistence)==null||n.clear(),(r=this.sessionPersistence)==null||r.clear(),this.surveys.reset(),this.featureFlags.reset(),(s=this.persistence)==null||s.set_property(Pd,"anonymous"),(i=this.sessionManager)==null||i.resetSessionId(),this.Ss=null,this.config.__preview_experimental_cookieless_mode)this.register_once({distinct_id:SE,$device_id:null},"");else{var a=this.config.get_device_id(ep());this.register_once({distinct_id:a,$device_id:t?a:o},"")}this.register({$last_posthog_reset:new Date().toISOString()},1)}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var t,n;return(t=(n=this.sessionManager)==null?void 0:n.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&t!==void 0?t:""}get_session_replay_url(t){if(!this.sessionManager)return"";var{sessionId:n,sessionStartTimestamp:r}=this.sessionManager.checkAndGetSessionAndWindowId(!0),s=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+n);if(t!=null&&t.withTimestamp&&r){var i,o=(i=t.timestampLookBack)!==null&&i!==void 0?i:10;if(!r)return s;s+="?t="+Math.max(Math.floor((new Date().getTime()-r)/1e3)-o,0)}return s}alias(t,n){return t===this.get_property(k1e)?(kt.critical("Attempting to create alias for existing People user - aborting."),-2):this.Ls("posthog.alias")?(lt(n)&&(n=this.get_distinct_id()),t!==n?(this.js(Hv,t),this.capture("$create_alias",{alias:t,distinct_id:n})):(kt.warn("alias matches current distinct_id - skipping api call."),this.identify(t),-1)):void 0}set_config(t){var n,r,s,i,o,a=gt({},this.config);Jr(t)&&(os(this.config,Iee(t)),(n=this.persistence)==null||n.update_config(this.config,a),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new j7(gt({},this.config,{persistence:"sessionStorage"})),js.O()&&js.D("ph_debug")==="true"&&(this.config.debug=!0),this.config.debug&&(Rd.DEBUG=!0,kt.info("set_config",{config:t,oldConfig:a,newConfig:gt({},this.config)})),(r=this.sessionRecording)==null||r.startIfEnabledOrStop(),(s=this.autocapture)==null||s.startIfEnabled(),(i=this.heatmaps)==null||i.startIfEnabled(),this.surveys.loadIfEnabled(),this.Ps(),(o=this.externalIntegrations)==null||o.startIfEnabledOrStop())}startSessionRecording(t){var n=t===!0,r={sampling:n||!(t==null||!t.sampling),linked_flag:n||!(t==null||!t.linked_flag),url_trigger:n||!(t==null||!t.url_trigger),event_trigger:n||!(t==null||!t.event_trigger)};if(Object.values(r).some(Boolean)){var s,i,o,a,l;(s=this.sessionManager)==null||s.checkAndGetSessionAndWindowId(),r.sampling&&((i=this.sessionRecording)==null||i.overrideSampling()),r.linked_flag&&((o=this.sessionRecording)==null||o.overrideLinkedFlag()),r.url_trigger&&((a=this.sessionRecording)==null||a.overrideTrigger("url")),r.event_trigger&&((l=this.sessionRecording)==null||l.overrideTrigger("event"))}this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var t;return!((t=this.sessionRecording)==null||!t.started)}captureException(t,n){var r=new Error("PostHog syntheticException");this.exceptions.sendExceptionEvent(gt({},i2t((s=>s instanceof Error)(t)?{error:t,event:t.message}:{event:t},{syntheticException:r}),n))}loadToolbar(t){return this.toolbar.loadToolbar(t)}get_property(t){var n;return(n=this.persistence)==null?void 0:n.props[t]}getSessionProperty(t){var n;return(n=this.sessionPersistence)==null?void 0:n.props[t]}toString(){var t,n=(t=this.config.name)!==null&&t!==void 0?t:S0;return n!==S0&&(n=S0+"."+n),n}_isIdentified(){var t,n;return((t=this.persistence)==null?void 0:t.get_property(Pd))==="identified"||((n=this.sessionPersistence)==null?void 0:n.get_property(Pd))==="identified"}Ds(){var t,n;return!(this.config.person_profiles==="never"||this.config.person_profiles==="identified_only"&&!this._isIdentified()&&B0(this.getGroups())&&((t=this.persistence)==null||(t=t.props)==null||!t[Hv])&&((n=this.persistence)==null||(n=n.props)==null||!n[fA]))}Fs(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&(this.config.capture_pageview===!0||this.config.capture_pageview==="history_change")}createPersonProfile(){this.Ds()||this.Ls("posthog.createPersonProfile")&&this.setPersonProperties({},{})}Ls(t){return this.config.person_profiles==="never"?(kt.error(t+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.js(fA,!0),!0)}Ps(){var t,n,r,s,i=this.consent.isOptedOut(),o=this.config.opt_out_persistence_by_default,a=this.config.disable_persistence||i&&!!o;((t=this.persistence)==null?void 0:t.Fe)!==a&&((r=this.persistence)==null||r.set_disabled(a)),((n=this.sessionPersistence)==null?void 0:n.Fe)!==a&&((s=this.sessionPersistence)==null||s.set_disabled(a))}opt_in_capturing(t){var n;this.consent.optInOut(!0),this.Ps(),(lt(t==null?void 0:t.captureEventName)||t!=null&&t.captureEventName)&&this.capture((n=t==null?void 0:t.captureEventName)!==null&&n!==void 0?n:"$opt_in",t==null?void 0:t.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Cs()}opt_out_capturing(){this.consent.optInOut(!1),this.Ps()}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}clear_opt_in_out_capturing(){this.consent.reset(),this.Ps()}_is_bot(){return wa?Dxe(wa,this.config.custom_blocked_useragents):void 0}Cs(){Ct&&(Ct.visibilityState==="visible"?this.bs||(this.bs=!0,this.capture("$pageview",{title:Ct.title},{send_instantly:!0}),this.ys&&(Ct.removeEventListener("visibilitychange",this.ys),this.ys=null)):this.ys||(this.ys=this.Cs.bind(this),Ur(Ct,"visibilitychange",this.ys)))}debug(t){t===!1?(Ne==null||Ne.console.log("You've disabled debug mode."),localStorage&&localStorage.removeItem("ph_debug"),this.set_config({debug:!1})):(Ne==null||Ne.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)`."),localStorage&&localStorage.setItem("ph_debug","true"),this.set_config({debug:!0}))}I(){var t,n,r,s,i,o,a,l=this.$s||{};return"advanced_disable_flags"in l?!!l.advanced_disable_flags:this.config.advanced_disable_flags!==!1?!!this.config.advanced_disable_flags:this.config.advanced_disable_decide===!0?(kt.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(r="advanced_disable_decide",s=!1,i=kt,o=(n="advanced_disable_flags")in(t=l)&&!lt(t[n]),a=r in t&&!lt(t[r]),o?t[n]:a?(i&&i.warn("Config field '"+r+"' is deprecated. Please use '"+n+"' instead. The old field will be removed in a future major version."),t[r]):s)}As(t){if(Yn(this.config.before_send))return t;var n=Fr(this.config.before_send)?this.config.before_send:[this.config.before_send],r=t;for(var s of n){if(r=s(r),Yn(r)){var i="Event '"+t.event+"' was rejected in beforeSend function";return gkt(t.event)?kt.warn(i+". This can cause unexpected behavior."):kt.info(i),null}r.properties&&!B0(r.properties)||kt.warn("Event '"+t.event+"' has no properties after beforeSend function, this is likely an error.")}return r}getPageViewId(){var t;return(t=this.pageViewManager.ce)==null?void 0:t.pageViewId}captureTraceFeedback(t,n){this.capture("$ai_feedback",{$ai_trace_id:String(t),$ai_feedback_text:n})}captureTraceMetric(t,n,r){this.capture("$ai_metric",{$ai_trace_id:String(t),$ai_metric_name:n,$ai_metric_value:String(r)})}}(function(e,t){for(var n=0;n<t.length;n++)e.prototype[t[n]]=bkt(e.prototype[t[n]])})(K4,["identify"]);var Oee,Ud=(Oee=xw[S0]=new K4,function(){function e(){e.done||(e.done=!0,Axe=!1,ur(xw,function(t){t._dom_loaded()}))}Ct!=null&&Ct.addEventListener?Ct.readyState==="complete"?e():Ur(Ct,"DOMContentLoaded",e,{capture:!1}):Ne&&kt.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),Oee),Txe=A.createContext({client:Ud});function _xe(e,t,n){if(n===void 0&&(n=new WeakMap),e===t)return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(n.has(e)&&n.get(e)===t)return!0;n.set(e,t);var r=Object.keys(e),s=Object.keys(t);if(r.length!==s.length)return!1;for(var i=0,o=r;i<o.length;i++){var a=o[i];if(!s.includes(a)||!_xe(e[a],t[a],n))return!1}return!0}function MEt(e){var t=e.children,n=e.client,r=e.apiKey,s=e.options,i=A.useRef(null),o=A.useMemo(function(){return n?(r&&console.warn("[PostHog.js] You have provided both `client` and `apiKey` to `PostHogProvider`. `apiKey` will be ignored in favour of `client`."),s&&console.warn("[PostHog.js] You have provided both `client` and `options` to `PostHogProvider`. `options` will be ignored in favour of `client`."),n):(r||console.warn("[PostHog.js] No `apiKey` or `client` were provided to `PostHogProvider`. Using default global `window.posthog` instance. You must initialize it manually. This is not recommended behavior."),Ud)},[n,r,JSON.stringify(s)]);return A.useEffect(function(){if(!n){var a=i.current;a?(r!==a.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."),s&&!_xe(s,a.options)&&Ud.set_config(s),i.current={apiKey:r,options:s??{}}):(Ud.__loaded&&console.warn("[PostHog.js] `posthog` was already loaded elsewhere. This may cause issues."),Ud.init(r,s),i.current={apiKey:r,options:s??{}})}},[n,r,JSON.stringify(s)]),Se.createElement(Txe.Provider,{value:{client:o}},t)}var tI=function(e,t){return tI=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(n[s]=r[s])},tI(e,t)};function jEt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");tI(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var I7=function(e){return typeof e=="function"},FEt={componentStack:null,error:null},IEt={INVALID_FALLBACK:"[PostHog.js][PostHogErrorBoundary] Invalid fallback prop, provide a valid React element or a function that returns a valid React element."};(function(e){jEt(t,e);function t(n){var r=e.call(this,n)||this;return r.state=FEt,r}return t.prototype.componentDidCatch=function(n,r){var s=r.componentStack,i=this.props.additionalProperties;this.setState({error:n,componentStack:s});var o;I7(i)?o=i(n):typeof i=="object"&&(o=i);var a=this.context.client;a.captureException(n,o)},t.prototype.render=function(){var n=this.props,r=n.children,s=n.fallback,i=this.state;if(i.componentStack==null)return I7(r)?r():r;var o=I7(s)?Se.createElement(s,{error:i.error,componentStack:i.componentStack}):s;return Se.isValidElement(o)?o:(console.warn(IEt.INVALID_FALLBACK),Se.createElement(Se.Fragment,null))},t.contextType=Txe,t})(Se.Component);function OEt({children:e}){return A.useEffect(()=>{if("brave"in navigator){console.info("[Analytics]: Telemetry is disabled for browser constraints.");return}if(window.MASTRA_TELEMETRY_DISABLED){console.info("[Analytics]: Telemetry is disabled.");return}Ud.init("phc_SBLpZVAB6jmHOct9CABq3PF0Yn5FU3G2FgT4xUr2XrT",{api_host:"https://us.posthog.com"}),Ud.register({mastraSource:"playground"})},[]),h.jsx(MEt,{client:Ud,children:e})}function REt(){return h.jsxs(yl,{children:[h.jsx(us,{children:h.jsx(Xu,{children:"Runtime Context"})}),h.jsx(ho,{children:h.jsx(Nxt,{children:h.jsx(_xt,{})})})]})}const Nxe=()=>{const[e,t]=A.useState(),[n,r]=A.useState(!0),[s,i]=A.useState(null);return A.useEffect(()=>{(async()=>{r(!0),i(null);try{const a=(await Dn.getMcpServers()).servers;t(a)}catch(a){const l=a instanceof Error?a.message:"Unknown error fetching MCP servers";console.error("Error fetching MCP servers",a),Nr.error(l),i(a instanceof Error?a:new Error(l)),t([])}finally{r(!1)}})()},[]),{servers:e,isLoading:n,error:s}},Pxe=e=>{const[t,n]=A.useState({}),[r,s]=A.useState(!1),[i,o]=A.useState(null);return A.useEffect(()=>{(async()=>{if(!e){n({}),s(!1),o(null);return}s(!0),o(null);try{const c=(await Dn.getMcpServerTools(e.id)).tools,u={};c.forEach(d=>{u[d.id]=d}),n(u)}catch(l){const c=l instanceof Error?l.message:"Unknown error fetching MCP server tools";console.error(`Error fetching tools for MCP server ${e.name}:`,l),Nr.error(c),o(l instanceof Error?l:new Error(c)),n({})}finally{s(!1)}})()},[e]),{tools:t,isLoading:r,error:i}},LEt=({server:e})=>{const{tools:t,isLoading:n}=Pxe(e),s=`${Dn.options.baseUrl||"http://localhost:4111"}/api/mcp/${e.id}/sse`,i=Object.keys(t||{}).length,o=Object.keys(t||{}).filter(u=>{var d;return((d=t==null?void 0:t[u])==null?void 0:d.toolType)==="agent"}).length,a=Object.keys(t||{}).filter(u=>{var d;return((d=t==null?void 0:t[u])==null?void 0:d.toolType)==="workflow"}).length,l=i-o-a,c=o>0||a>0;return h.jsxs(Zt,{to:`/mcps/${e.id}`,className:"flex justify-between items-center pl-5 pr-6 h-table-row border-b-sm border-border1 hover:bg-surface3 cursor-pointer group/mcp-server",children:[h.jsxs("div",{className:"flex gap-3 items-center",children:[h.jsx(ot,{size:"lg",children:h.jsx(T4,{})}),h.jsxs("div",{children:[h.jsx(Ue,{variant:"ui-md",className:"font-medium text-icon6 !leading-none pb-1",children:e.name}),h.jsx(Ue,{variant:"ui-xs",className:"text-icon3 !leading-none",children:s})]})]}),n?h.jsx($n,{className:"h-4 w-24"}):h.jsx("div",{className:"flex gap-x-2 items-center",children:h.jsxs(Kl,{children:[h.jsx(Xl,{asChild:!0,children:h.jsxs(Un,{icon:h.jsx(gl,{className:"group-hover/mcp-server:text-[#ECB047]"}),children:[i," tool",i===1?"":"s"]})}),c&&h.jsx(nl,{children:h.jsxs("div",{className:"flex flex-col gap-1",children:[l>0&&h.jsxs("span",{children:[h.jsx(gl,{className:"inline mr-1"}),l," tool",l===1?"":"s"]}),o>0&&h.jsxs("span",{children:[h.jsx(Nh,{className:"inline mr-1"}),o," agent",o===1?"":"s"]}),a>0&&h.jsxs("span",{children:[h.jsx(kc,{className:"inline mr-1"}),a," workflow",a===1?"":"s"]})]})})]})})]})},BEt=()=>{const{servers:e,isLoading:t}=Nxe(),n=e??[];return t?null:h.jsxs(yl,{children:[h.jsx(us,{children:h.jsx(Xu,{children:"MCP Servers"})}),n.length===0?h.jsx(ho,{isCentered:!0,children:h.jsx(LC,{iconSlot:h.jsx(Gbt,{}),titleSlot:"Configure MCP servers",descriptionSlot:"MCP servers are not configured yet. You can find more information in the documentation.",actionSlot:h.jsxs(hn,{size:"lg",className:"w-full",variant:"light",as:"a",href:"https://mastra.ai/en/docs/getting-started/mcp-docs-server",target:"_blank",children:[h.jsx(ot,{children:h.jsx(T4,{})}),"Docs"]})})}):h.jsx(ho,{children:h.jsx("ul",{children:(n||[]).map(r=>h.jsx("li",{children:h.jsx(LEt,{server:r})},r.id))})})]})},$Et=Tp("block",{variants:{variant:{primary:"text-text",secondary:"text-text-dim"},size:{default:"text-base",xs:"text-xs",sm:"text-sm",md:"text-md",lg:"text-lg",xl:"text-xl","2xl":"text-2xl"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{variant:"primary",size:"default",weight:"normal"}}),Ree=({className:e,weight:t,variant:n,as:r="span",size:s,...i})=>h.jsx(r,{className:$t($Et({size:s,variant:n,weight:t,className:e})),...i}),zEt=(e,t)=>{const[n,r]=A.useState(null),[s,i]=A.useState(!1),[o,a]=A.useState(null);return A.useEffect(()=>{let l=!0;return(async()=>{if(!e||!t){r(null),i(!1),a(null);return}i(!0),a(null);try{const u=Dn.getMcpServerTool(e,t),d=await u.details();l&&r({instance:u,details:d})}catch(u){const d=u instanceof Error?u.message:"Unknown error fetching MCP tool details";console.error(`Error fetching details for MCP tool ${t} on server ${e}:`,u),l&&(Nr.error(d),a(u instanceof Error?u:new Error(d)),r(null))}finally{l&&i(!1)}})(),()=>{l=!1}},[e,t]),{tool:n,isLoading:s,error:o}},HEt=()=>{var k,T,P,M;const{serverId:e,toolId:t}=Cs(),r=xc().state,s=((k=r==null?void 0:r.toolData)==null?void 0:k.name)||t,i=(r==null?void 0:r.serverName)||e,{tool:o,isLoading:a,error:l}=zEt(e,t),{runtimeContext:c}=dy(),[u,d]=A.useState(null),[p,g]=A.useState(!1),b=async j=>{if(!o||!o.instance){Nr.error("Tool is not properly initialized");return}g(!0),d(null);try{const F=await o.instance.execute({data:j,runtimeContext:c});d(F)}catch(F){const I=F instanceof Error?F.message:"Tool execution failed";console.error("MCP Tool execution error:",F),Nr.error(I),d({error:I})}finally{g(!1)}},x=((T=o==null?void 0:o.details)==null?void 0:T.name)||s;(P=o==null?void 0:o.details)==null||P.description;const S=(M=o==null?void 0:o.details)==null?void 0:M.toolType;if(a||!o&&!l)return h.jsxs("div",{className:"h-full w-full bg-mastra-bg-1",children:[h.jsx(us,{children:h.jsxs(Yd,{children:[h.jsx(Vr,{as:Zt,to:"/mcps",children:"MCP Servers"}),e&&h.jsx(Vr,{as:Zt,to:"/mcps",children:i}),h.jsx(Vr,{as:"span",to:"",isCurrent:!0,children:a?"Loading Tool...":s||"Tool"})]})}),h.jsxs("div",{className:"w-full h-full grid grid-cols-[300px_1fr] p-2 gap-2",children:[h.jsxs("div",{className:"flex flex-col gap-4 border-[0.5px] border-mastra-border-1 rounded-[0.25rem] bg-mastra-bg-2 p-4 py-6",children:[h.jsx(Ree,{variant:"secondary",className:"text-mastra-el-3 px-4",size:"xs",children:"Input"}),h.jsx($n,{className:"h-[200px] w-full"})]}),h.jsxs("div",{className:"flex flex-col gap-4 border-[0.5px] border-mastra-border-1 rounded-[0.25rem] bg-mastra-bg-2 p-4 py-6",children:[h.jsx(Ree,{variant:"secondary",className:"text-mastra-el-3 px-4",size:"xs",children:"Output"}),h.jsx($n,{className:"h-[200px] w-full"})]})]})]});if(l||!o)return h.jsxs("div",{className:"h-full w-full bg-mastra-bg-1 p-4",children:[h.jsx(us,{children:h.jsxs(Yd,{children:[h.jsx(Vr,{as:Zt,to:"/mcps",children:"MCP Servers"}),e&&h.jsx(Vr,{as:Zt,to:"/mcps",children:i}),h.jsx(Vr,{as:"span",to:"",isCurrent:!0,children:s||"Error"})]})}),h.jsxs("div",{className:"text-red-500 mt-4",children:["Error loading tool: ",(l==null?void 0:l.message)||"Tool not found."]})]});let E;try{E=GB(Fg(o.details.inputSchema))}catch(j){console.error("Error processing input schema:",j),Nr.error("Failed to process tool input schema."),E=pn({})}return h.jsxs("div",{className:"h-full w-full bg-mastra-bg-1 overflow-y-hidden",children:[h.jsx(us,{children:h.jsxs(Yd,{children:[h.jsx(Vr,{as:Zt,to:"/mcps",children:"MCP Servers"}),h.jsx(Vr,{as:Zt,to:`/mcps/${e}`,children:i}),h.jsx(Vr,{as:"span",to:"",isCurrent:!0,children:x})]})}),h.jsx(YB,{executionResult:u,isExecutingTool:p,zodInputSchema:E,handleExecuteTool:b,toolDescription:x||"",toolId:t||"",toolType:S})]})},Lee=e=>{const t=g1e();return h.jsxs("div",{className:"rounded-lg border-sm border-border1 bg-surface3 p-4 relative",children:[h.jsx("div",{className:"absolute top-4 right-4 z-10",children:h.jsx(lA,{tooltip:"Copy code",content:e.value||"No content"})}),h.jsx(al,{extensions:[nQe()],theme:t,...e})]})},VEt=()=>{const{serverId:e}=Cs(),{servers:t,isLoading:n}=Nxe(),r=t==null?void 0:t.find(a=>a.id===e),s=Dn.options.baseUrl||"http://localhost:4111",i=`${s}/api/mcp/${e}/sse`,o=`${s}/api/mcp/${e}/mcp`;return h.jsxs(yl,{children:[h.jsx(us,{children:h.jsxs(Yd,{children:[h.jsx(Vr,{as:Zt,to:"/mcps",children:"MCP Servers"}),h.jsx(Vr,{as:Zt,to:`/mcps/${e}`,isCurrent:!0,children:n?h.jsx($n,{className:"w-20 h-4"}):(r==null?void 0:r.name)||"Not found"})]})}),n?null:r?h.jsxs(ho,{isDivided:!0,children:[h.jsxs("div",{className:"px-8 py-20 mx-auto max-w-[604px] w-full",children:[h.jsx(Ue,{as:"h1",variant:"header-md",className:"text-icon6 font-medium pb-4",children:r.name}),h.jsxs("div",{className:"flex flex-col gap-1",children:[h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx(Un,{icon:h.jsx("span",{className:"font-mono w-6 text-accent1 text-ui-xs font-medium",children:"SSE"}),className:"!text-icon4",children:i}),h.jsx(lA,{tooltip:"Copy SSE URL",content:i,iconSize:"sm"})]}),h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx(Un,{icon:h.jsx("span",{className:"font-mono w-6 text-accent1 text-ui-xs font-medium",children:"HTTP"}),className:"!text-icon4",children:o}),h.jsx(lA,{tooltip:"Copy HTTP Stream URL",content:o,iconSize:"sm"})]})]}),h.jsxs("div",{className:"flex items-center gap-1 pt-3 pb-9",children:[h.jsx(Un,{icon:h.jsx(qbt,{className:"text-icon6"}),className:"rounded-r-sm !text-icon4",children:"Version"}),h.jsx(Un,{className:"rounded-l-sm !text-icon4",children:r.version_detail.version})]}),h.jsx(qEt,{sseUrl:i,serverName:r.name})]}),h.jsx("div",{className:"h-full overflow-y-scroll border-l-sm border-border1",children:h.jsx(UEt,{server:r})})]}):h.jsx(ho,{children:h.jsx(Ue,{as:"h1",variant:"header-md",className:"text-icon3 font-medium py-20 text-center",children:"Server not found"})})]})},UEt=({server:e})=>{const{tools:t,isLoading:n}=Pxe(e);if(n)return null;const r=Object.keys(t);return h.jsxs("div",{className:"p-5 overflow-y-scroll",children:[h.jsxs("div",{className:"text-icon6 flex gap-2 items-center",children:[h.jsx(ot,{size:"lg",className:"bg-surface4 rounded-md p-1",children:h.jsx(T4,{})}),h.jsx(Ue,{variant:"header-md",as:"h2",className:"font-medium",children:"Available Tools"})]}),h.jsx("div",{className:"flex flex-col gap-2 pt-6",children:r.map(s=>{const i=t[s];return h.jsx(WEt,{tool:i,serverId:e.id},s)})})]})},WEt=({tool:e,serverId:t})=>{const n=A.useRef(null),r=m1e[e.toolType||"tool"];return h.jsxs(I4,{onClick:()=>{var s;return(s=n.current)==null?void 0:s.click()},children:[h.jsx(O4,{children:h.jsx(r,{className:"group-hover/entity:text-[#ECB047]"})}),h.jsxs(B4,{children:[h.jsx(R4,{children:h.jsx(Zt,{ref:n,to:`/mcps/${t}/tools/${e.id}`,children:e.id})}),h.jsx(L4,{children:e.description})]})]})},qEt=({sseUrl:e,serverName:t})=>{const[n,r]=A.useState("cursor"),s="p-3 text-ui-lg text-icon3 font-medium border-b-2 border-transparent -mb-[0.5px]";return h.jsxs(z4,{onValueChange:r,value:n,children:[h.jsxs(UC,{className:"border-b-sm border-border1 w-full",children:[h.jsx(Ti,{value:"cursor",className:ic(s,n==="cursor"&&"text-icon6 border-b-icon6"),children:"Cursor"}),h.jsx(Ti,{value:"windsurf",className:ic(s,n==="windsurf"&&"text-icon6 border-b-icon6"),children:"Windsurf"})]}),h.jsxs(_i,{value:"cursor",className:"pt-5",children:[h.jsxs(Ue,{className:"text-icon3 pb-4",children:["Cursor comes with built-in MCP Support."," ",h.jsx(Zt,{to:"https://docs.cursor.com/context/model-context-protocol",target:"_blank",rel:"noopener noreferrer",className:"underline hover:text-icon6",children:"Following the documentation"}),", you can register an MCP server using SSE with the following configuration."]}),h.jsx(Lee,{editable:!1,value:`{
|