(function(){var Ul={69:(function(K,P,s){"use strict";K.exports=s(5369)}),105:(function(K){/*!
 * Determine if an object is a Buffer
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */K.exports=function(s){return s!=null&&s.constructor!=null&&typeof s.constructor.isBuffer=="function"&&s.constructor.isBuffer(s)}}),139:(function(K,P,s){"use strict";var ce=s(1868);function oe(){}function g(){}g.resetWarningCache=oe,K.exports=function(){function q($,W,U,G,J,se){if(se!==ce){var de=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw de.name="Invariant Violation",de}}q.isRequired=q;function h(){return q}var Z={array:q,bigint:q,bool:q,func:q,number:q,object:q,string:q,symbol:q,any:q,arrayOf:h,element:q,elementType:q,instanceOf:h,node:q,objectOf:h,oneOf:h,oneOfType:h,shape:h,exact:h,checkPropTypes:g,resetWarningCache:oe};return Z.PropTypes=Z,Z}}),562:(function(K){"use strict";var P=Object.prototype.hasOwnProperty,s=Object.prototype.toString,ce=Object.defineProperty,oe=Object.getOwnPropertyDescriptor,g=function(W){return typeof Array.isArray=="function"?Array.isArray(W):s.call(W)==="[object Array]"},q=function(W){if(!W||s.call(W)!=="[object Object]")return!1;var U=P.call(W,"constructor"),G=W.constructor&&W.constructor.prototype&&P.call(W.constructor.prototype,"isPrototypeOf");if(W.constructor&&!U&&!G)return!1;var J;for(J in W);return typeof J>"u"||P.call(W,J)},h=function(W,U){ce&&U.name==="__proto__"?ce(W,U.name,{enumerable:!0,configurable:!0,value:U.newValue,writable:!0}):W[U.name]=U.newValue},Z=function(W,U){if(U==="__proto__")if(P.call(W,U)){if(oe)return oe(W,U).value}else return;return W[U]};K.exports=function $(){var W,U,G,J,se,de,X=arguments[0],ke=1,xe=arguments.length,ie=!1;for(typeof X=="boolean"&&(ie=X,X=arguments[1]||{},ke=2),(X==null||typeof X!="object"&&typeof X!="function")&&(X={});ke<xe;++ke)if(W=arguments[ke],W!=null)for(U in W)G=Z(X,U),J=Z(W,U),X!==J&&(ie&&J&&(q(J)||(se=g(J)))?(se?(se=!1,de=G&&g(G)?G:[]):de=G&&q(G)?G:{},h(X,{name:U,newValue:$(ie,de,J)})):typeof J<"u"&&h(X,{name:U,newValue:J}));return X}}),848:(function(K){"use strict";var P={};function s(oe){var g,q,h=P[oe];if(h)return h;for(h=P[oe]=[],g=0;g<128;g++)q=String.fromCharCode(g),/^[0-9a-z]$/i.test(q)?h.push(q):h.push("%"+("0"+g.toString(16).toUpperCase()).slice(-2));for(g=0;g<oe.length;g++)h[oe.charCodeAt(g)]=oe[g];return h}function ce(oe,g,q){var h,Z,$,W,U,G="";for(typeof g!="string"&&(q=g,g=ce.defaultChars),typeof q>"u"&&(q=!0),U=s(g),h=0,Z=oe.length;h<Z;h++){if($=oe.charCodeAt(h),q&&$===37&&h+2<Z&&/^[0-9a-f]{2}$/i.test(oe.slice(h+1,h+3))){G+=oe.slice(h,h+3),h+=2;continue}if($<128){G+=U[$];continue}if($>=55296&&$<=57343){if($>=55296&&$<=56319&&h+1<Z&&(W=oe.charCodeAt(h+1),W>=56320&&W<=57343)){G+=encodeURIComponent(oe[h]+oe[h+1]),h++;continue}G+="%EF%BF%BD";continue}G+=encodeURIComponent(oe[h])}return G}ce.defaultChars=";/?:@&=+$,-_.!~*'()#",ce.componentChars="-_.!~*'()",K.exports=ce}),1065:(function(K,P,s){var ce=s(3909);function oe(g,q){var h=null;if(!g||typeof g!="string")return h;for(var Z,$=ce(g),W=typeof q=="function",U,G,J=0,se=$.length;J<se;J++)Z=$[J],U=Z.property,G=Z.value,W?q(U,G,Z):G&&(h||(h={}),h[U]=G);return h}K.exports=oe}),1316:(function(K,P,s){"use strict";K.exports=s(1539)}),1539:(function(K,P){"use strict";/** @license React v17.0.2
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var s=60103,ce=60106,oe=60107,g=60108,q=60114,h=60109,Z=60110,$=60112,W=60113,U=60120,G=60115,J=60116,se=60121,de=60122,X=60117,ke=60129,xe=60131;if(typeof Symbol=="function"&&Symbol.for){var ie=Symbol.for;s=ie("react.element"),ce=ie("react.portal"),oe=ie("react.fragment"),g=ie("react.strict_mode"),q=ie("react.profiler"),h=ie("react.provider"),Z=ie("react.context"),$=ie("react.forward_ref"),W=ie("react.suspense"),U=ie("react.suspense_list"),G=ie("react.memo"),J=ie("react.lazy"),se=ie("react.block"),de=ie("react.server.block"),X=ie("react.fundamental"),ke=ie("react.debug_trace_mode"),xe=ie("react.legacy_hidden")}function Me(R){if(typeof R=="object"&&R!==null){var le=R.$$typeof;switch(le){case s:switch(R=R.type,R){case oe:case q:case g:case W:case U:return R;default:switch(R=R&&R.$$typeof,R){case Z:case $:case J:case G:case h:return R;default:return le}}case ce:return le}}}var Oe=h,vt=s,B=$,tt=oe,te=J,Yt=G,Kt=ce,Se=q,Xe=g,Xt=W;P.ContextConsumer=Z,P.ContextProvider=Oe,P.Element=vt,P.ForwardRef=B,P.Fragment=tt,P.Lazy=te,P.Memo=Yt,P.Portal=Kt,P.Profiler=Se,P.StrictMode=Xe,P.Suspense=Xt,P.isAsyncMode=function(){return!1},P.isConcurrentMode=function(){return!1},P.isContextConsumer=function(R){return Me(R)===Z},P.isContextProvider=function(R){return Me(R)===h},P.isElement=function(R){return typeof R=="object"&&R!==null&&R.$$typeof===s},P.isForwardRef=function(R){return Me(R)===$},P.isFragment=function(R){return Me(R)===oe},P.isLazy=function(R){return Me(R)===J},P.isMemo=function(R){return Me(R)===G},P.isPortal=function(R){return Me(R)===ce},P.isProfiler=function(R){return Me(R)===q},P.isStrictMode=function(R){return Me(R)===g},P.isSuspense=function(R){return Me(R)===W},P.isValidElementType=function(R){return typeof R=="string"||typeof R=="function"||R===oe||R===q||R===ke||R===g||R===W||R===U||R===xe||typeof R=="object"&&R!==null&&(R.$$typeof===J||R.$$typeof===G||R.$$typeof===h||R.$$typeof===Z||R.$$typeof===$||R.$$typeof===X||R.$$typeof===se||R[0]===de)},P.typeOf=Me}),1609:(function(K){"use strict";K.exports=window.React}),1868:(function(K){"use strict";var P="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";K.exports=P}),3593:(function(K,P,s){"use strict";K.exports=s(3691)}),3691:(function(K,P,s){"use strict";/** @license React v17.0.2
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */s(9645);var ce=s(1609),oe=60103;if(P.Fragment=60107,typeof Symbol=="function"&&Symbol.for){var g=Symbol.for;oe=g("react.element"),P.Fragment=g("react.fragment")}var q=ce.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,h=Object.prototype.hasOwnProperty,Z={key:!0,ref:!0,__self:!0,__source:!0};function $(W,U,G){var J,se={},de=null,X=null;G!==void 0&&(de=""+G),U.key!==void 0&&(de=""+U.key),U.ref!==void 0&&(X=U.ref);for(J in U)h.call(U,J)&&!Z.hasOwnProperty(J)&&(se[J]=U[J]);if(W&&W.defaultProps)for(J in U=W.defaultProps,U)se[J]===void 0&&(se[J]=U[J]);return{$$typeof:oe,type:W,key:de,ref:X,props:se,_owner:q.current}}P.jsx=$,P.jsxs=$}),3909:(function(K){var P=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,s=/\n/g,ce=/^\s*/,oe=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,g=/^:\s*/,q=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,h=/^[;\s]*/,Z=/^\s+|\s+$/g,$=`
`,W="/",U="*",G="",J="comment",se="declaration";K.exports=function(X,ke){if(typeof X!="string")throw new TypeError("First argument must be a string");if(!X)return[];ke=ke||{};var xe=1,ie=1;function Me(R){var le=R.match(s);le&&(xe+=le.length);var Ze=R.lastIndexOf($);ie=~Ze?R.length-Ze:ie+R.length}function Oe(){var R={line:xe,column:ie};return function(le){return le.position=new vt(R),Yt(),le}}function vt(R){this.start=R,this.end={line:xe,column:ie},this.source=ke.source}vt.prototype.content=X;var B=[];function tt(R){var le=new Error(ke.source+":"+xe+":"+ie+": "+R);if(le.reason=R,le.filename=ke.source,le.line=xe,le.column=ie,le.source=X,ke.silent)B.push(le);else throw le}function te(R){var le=R.exec(X);if(le){var Ze=le[0];return Me(Ze),X=X.slice(Ze.length),le}}function Yt(){te(ce)}function Kt(R){var le;for(R=R||[];le=Se();)le!==!1&&R.push(le);return R}function Se(){var R=Oe();if(!(W!=X.charAt(0)||U!=X.charAt(1))){for(var le=2;G!=X.charAt(le)&&(U!=X.charAt(le)||W!=X.charAt(le+1));)++le;if(le+=2,G===X.charAt(le-1))return tt("End of comment missing");var Ze=X.slice(2,le-2);return ie+=2,Me(Ze),X=X.slice(le),ie+=2,R({type:J,comment:Ze})}}function Xe(){var R=Oe(),le=te(oe);if(le){if(Se(),!te(g))return tt("property missing ':'");var Ze=te(q),va=R({type:se,property:de(le[0].replace(P,G)),value:Ze?de(Ze[0].replace(P,G)):G});return te(h),va}}function Xt(){var R=[];Kt(R);for(var le;le=Xe();)le!==!1&&(R.push(le),Kt(R));return R}return Yt(),Xt()};function de(X){return X?X.replace(Z,G):G}}),5369:(function(K,P){"use strict";/** @license React v16.13.1
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var s=typeof Symbol=="function"&&Symbol.for,ce=s?Symbol.for("react.element"):60103,oe=s?Symbol.for("react.portal"):60106,g=s?Symbol.for("react.fragment"):60107,q=s?Symbol.for("react.strict_mode"):60108,h=s?Symbol.for("react.profiler"):60114,Z=s?Symbol.for("react.provider"):60109,$=s?Symbol.for("react.context"):60110,W=s?Symbol.for("react.async_mode"):60111,U=s?Symbol.for("react.concurrent_mode"):60111,G=s?Symbol.for("react.forward_ref"):60112,J=s?Symbol.for("react.suspense"):60113,se=s?Symbol.for("react.suspense_list"):60120,de=s?Symbol.for("react.memo"):60115,X=s?Symbol.for("react.lazy"):60116,ke=s?Symbol.for("react.block"):60121,xe=s?Symbol.for("react.fundamental"):60117,ie=s?Symbol.for("react.responder"):60118,Me=s?Symbol.for("react.scope"):60119;function Oe(B){if(typeof B=="object"&&B!==null){var tt=B.$$typeof;switch(tt){case ce:switch(B=B.type,B){case W:case U:case g:case h:case q:case J:return B;default:switch(B=B&&B.$$typeof,B){case $:case G:case X:case de:case Z:return B;default:return tt}}case oe:return tt}}}function vt(B){return Oe(B)===U}P.AsyncMode=W,P.ConcurrentMode=U,P.ContextConsumer=$,P.ContextProvider=Z,P.Element=ce,P.ForwardRef=G,P.Fragment=g,P.Lazy=X,P.Memo=de,P.Portal=oe,P.Profiler=h,P.StrictMode=q,P.Suspense=J,P.isAsyncMode=function(B){return vt(B)||Oe(B)===W},P.isConcurrentMode=vt,P.isContextConsumer=function(B){return Oe(B)===$},P.isContextProvider=function(B){return Oe(B)===Z},P.isElement=function(B){return typeof B=="object"&&B!==null&&B.$$typeof===ce},P.isForwardRef=function(B){return Oe(B)===G},P.isFragment=function(B){return Oe(B)===g},P.isLazy=function(B){return Oe(B)===X},P.isMemo=function(B){return Oe(B)===de},P.isPortal=function(B){return Oe(B)===oe},P.isProfiler=function(B){return Oe(B)===h},P.isStrictMode=function(B){return Oe(B)===q},P.isSuspense=function(B){return Oe(B)===J},P.isValidElementType=function(B){return typeof B=="string"||typeof B=="function"||B===g||B===U||B===h||B===q||B===J||B===se||typeof B=="object"&&B!==null&&(B.$$typeof===X||B.$$typeof===de||B.$$typeof===Z||B.$$typeof===$||B.$$typeof===G||B.$$typeof===xe||B.$$typeof===ie||B.$$typeof===Me||B.$$typeof===ke)},P.typeOf=Oe}),6727:(function(K,P,s){if(0)var ce,oe;else K.exports=s(139)()}),7259:(function(K){/*!
 * Determine if an object is a Buffer
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */K.exports=function(s){return s!=null&&s.constructor!=null&&typeof s.constructor.isBuffer=="function"&&s.constructor.isBuffer(s)}}),7621:(function(K,P,s){"use strict";var ce=s(69),oe={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},g={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},q={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},h={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Z={};Z[ce.ForwardRef]=q,Z[ce.Memo]=h;function $(ke){return ce.isMemo(ke)?h:Z[ke.$$typeof]||oe}var W=Object.defineProperty,U=Object.getOwnPropertyNames,G=Object.getOwnPropertySymbols,J=Object.getOwnPropertyDescriptor,se=Object.getPrototypeOf,de=Object.prototype;function X(ke,xe,ie){if(typeof xe!="string"){if(de){var Me=se(xe);Me&&Me!==de&&X(ke,Me,ie)}var Oe=U(xe);G&&(Oe=Oe.concat(G(xe)));for(var vt=$(ke),B=$(xe),tt=0;tt<Oe.length;++tt){var te=Oe[tt];if(!g[te]&&!(ie&&ie[te])&&!(B&&B[te])&&!(vt&&vt[te])){var Yt=J(xe,te);try{W(ke,te,Yt)}catch{}}}}return ke}K.exports=X}),8140:(function(K,P,s){"use strict";/**
 * @license React
 * use-sync-external-store-shim.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var ce=s(1609);function oe(se,de){return se===de&&(se!==0||1/se===1/de)||se!==se&&de!==de}var g=typeof Object.is=="function"?Object.is:oe,q=ce.useState,h=ce.useEffect,Z=ce.useLayoutEffect,$=ce.useDebugValue;function W(se,de){var X=de(),ke=q({inst:{value:X,getSnapshot:de}}),xe=ke[0].inst,ie=ke[1];return Z(function(){xe.value=X,xe.getSnapshot=de,U(xe)&&ie({inst:xe})},[se,X,de]),h(function(){return U(xe)&&ie({inst:xe}),se(function(){U(xe)&&ie({inst:xe})})},[se]),$(X),X}function U(se){var de=se.getSnapshot;se=se.value;try{var X=de();return!g(se,X)}catch{return!0}}function G(se,de){return de()}var J=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?G:W;P.useSyncExternalStore=ce.useSyncExternalStore!==void 0?ce.useSyncExternalStore:J}),8279:(function(K,P,s){"use strict";K.exports=s(8140)}),9645:(function(K){"use strict";/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var P=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,ce=Object.prototype.propertyIsEnumerable;function oe(q){if(q==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(q)}function g(){try{if(!Object.assign)return!1;var q=new String("abc");if(q[5]="de",Object.getOwnPropertyNames(q)[0]==="5")return!1;for(var h={},Z=0;Z<10;Z++)h["_"+String.fromCharCode(Z)]=Z;var $=Object.getOwnPropertyNames(h).map(function(U){return h[U]});if($.join("")!=="0123456789")return!1;var W={};return"abcdefghijklmnopqrst".split("").forEach(function(U){W[U]=U}),Object.keys(Object.assign({},W)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}K.exports=g()?Object.assign:function(q,h){for(var Z,$=oe(q),W,U=1;U<arguments.length;U++){Z=Object(arguments[U]);for(var G in Z)s.call(Z,G)&&($[G]=Z[G]);if(P){W=P(Z);for(var J=0;J<W.length;J++)ce.call(Z,W[J])&&($[W[J]]=Z[W[J]])}}return $}})},ya={};function Ae(K){var P=ya[K];if(P!==void 0)return P.exports;var s=ya[K]={exports:{}};return Ul[K](s,s.exports,Ae),s.exports}(function(){Ae.n=function(K){var P=K&&K.__esModule?function(){return K.default}:function(){return K};return Ae.d(P,{a:P}),P}})(),(function(){Ae.d=function(K,P){for(var s in P)Ae.o(P,s)&&!Ae.o(K,s)&&Object.defineProperty(K,s,{enumerable:!0,get:P[s]})}})(),(function(){Ae.o=function(K,P){return Object.prototype.hasOwnProperty.call(K,P)}})(),(function(){Ae.r=function(K){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(K,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(K,"__esModule",{value:!0})}})();var Pw={};(function(){"use strict";var K={};Ae.r(K),Ae.d(K,{attentionMarkers:function(){return Cm},contentInitial:function(){return bm},disable:function(){return Am},document:function(){return vm},flow:function(){return km},flowInitial:function(){return _m},insideSpan:function(){return Em},string:function(){return Sm},text:function(){return jm}});var P={};Ae.r(P),Ae.d(P,{boolean:function(){return ue},booleanish:function(){return He},commaOrSpaceSeparated:function(){return lt},commaSeparated:function(){return yn},number:function(){return M},overloadedBoolean:function(){return xl},spaceSeparated:function(){return Ie}});var s=Ae(3593),ce=window.ReactDOM,oe=Ae.n(ce),g=Ae(1609),q=Ae.n(g),h=window.wp.i18n,Z=window.wp.apiFetch,$=Ae.n(Z);function W(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=W(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function U(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=W(e))&&(r&&(r+=" "),r+=t);return r}var G=U;const J=({children:e,onOverlayClick:t,isOpen:n=!1,...r})=>(0,s.jsx)("div",{className:G("wdo:modal",n&&"open"),onClick:t,children:(0,s.jsx)("div",{className:"wdo:modal-content",onClick:o=>o.stopPropagation(),...r,children:e})});var se=q().memo(J);/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const de=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const X=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ke=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const xe=e=>{const t=ke(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */var ie={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Me=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Oe=(0,g.createContext)({});function vt({children:e,size:t,color:n,strokeWidth:r,absoluteStrokeWidth:o,className:a}){const i=useMemo(()=>({size:t,color:n,strokeWidth:r,absoluteStrokeWidth:o,className:a}),[t,n,r,o,a]);return createElement(Oe.Provider,{value:i},e)}const B=()=>(0,g.useContext)(Oe);/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const tt=(0,g.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:o="",children:a,iconNode:i,...l},u)=>{const{size:c=24,strokeWidth:d=2,absoluteStrokeWidth:f=!1,color:m="currentColor",className:p=""}=B()??{},S=r??f?Number(n??d)*24/Number(t??c):n??d;return(0,g.createElement)("svg",{ref:u,...ie,width:t??c??ie.width,height:t??c??ie.height,stroke:e??m,strokeWidth:S,className:de("lucide",p,o),...!a&&!Me(l)&&{"aria-hidden":"true"},...l},[...i.map(([_,y])=>(0,g.createElement)(_,y)),...Array.isArray(a)?a:[a]])});/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const te=(e,t)=>{const n=(0,g.forwardRef)(({className:r,...o},a)=>(0,g.createElement)(tt,{ref:a,iconNode:t,className:de(`lucide-${X(xe(e))}`,`lucide-${e}`,r),...o}));return n.displayName=xe(e),n};/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Kt=te("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),Se=({className:e="",children:t,isLoading:n,...r})=>(0,s.jsx)("button",{className:`wdo:button ${e}`,...r,...n?{disabled:!0}:{},children:n?(0,s.jsx)(Kt,{className:"wdo:animate-spin wdo:w-4 wdo:h-4"}):t}),Xe=({className:e="",children:t,...n})=>(0,s.jsx)(Se,{className:`wdo:button-primary ${e}`,...n,children:t}),Xt=({className:e="",children:t,...n})=>(0,s.jsx)(Se,{className:`wdo:button-danger ${e}`,...n,children:t}),R=({className:e="",children:t,...n})=>jsx(Se,{className:`wdo:button-ghost ${e}`,...n,children:t});/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ze=te("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);var Nr=({className:e,children:t})=>(0,s.jsxs)("div",{className:`wdo:flex wdo:gap-3 wdo:items-center wdo:p-3 wdo:rounded-sm wdo:border wdo:border-amber-500/30 wdo:bg-amber-500/10 wdo:text-amber-700 wdo:dark:text-amber-400 wdo:text-sm ${e??""}`,children:[(0,s.jsx)(Ze,{className:"wdo:w-5 wdo:h-5 wdo:shrink-0"}),(0,s.jsx)("div",{children:t})]}),Wl=({forceOpen:e,onClose:t})=>{const[n,r]=(0,g.useState)(!1),[o,a]=(0,g.useState)(""),[i,l]=(0,g.useState)(!1),[u,c]=(0,g.useState)("");(0,g.useEffect)(()=>{Number(ASP_BACKEND.asset_rev)>0&&r(!0),$()({path:"/ajax-search-pro/updates-help/check"}).then(p=>{p.message==="ok"&&r(!0)}).catch(()=>{})},[]),(0,g.useEffect)(()=>{e&&r(!0)},[e]);const d=()=>{r(!1),a(""),c(""),t?.()},f=()=>{l(!0),c(""),$()({path:"/ajax-search-pro/updates-help/activate",method:"POST",data:{key:o}}).then(()=>{d()}).catch(p=>{c(p?.message||(0,h.__)("Activation failed. Please try again.","ajax-search-pro"))}).finally(()=>{l(!1)})},m=()=>{d(),t||(window.history.length>1?window.history.back():window.location.href=ASP_BACKEND.admin_url)};return(0,s.jsx)(se,{isOpen:n,children:(0,s.jsxs)("div",{className:"wdo:p-8 wdo:min-w-[480px] wdo:max-w-lg",children:[(0,s.jsx)("h2",{className:"wdo:text-lg wdo:font-semibold wdo:text-gray-900 wdo:dark:text-white wdo:mb-3",children:(0,h.__)("Activate your license","ajax-search-pro")}),(0,s.jsx)("p",{className:"wdo:text-sm wdo:text-gray-600 wdo:dark:text-gray-400 wdo:mb-2",children:(0,h.__)("A valid license is required to use Ajax Search Pro. Enter your purchase code to activate it on this site.","ajax-search-pro")}),(0,s.jsx)("p",{className:"wdo:text-sm wdo:mb-5",children:(0,s.jsx)("a",{href:"https://documentation.ajaxsearchpro.com/plugin-updates/automatic-updates/purchase-code",target:"_blank",rel:"noreferrer",className:"wdo:text-blue-600 wdo:dark:text-blue-400 wdo:underline",children:(0,h.__)("Where do I find my license key?","ajax-search-pro")})}),u&&(0,s.jsx)(Nr,{className:"wdo:mb-4",children:u}),(0,s.jsx)("label",{className:"wdo:block wdo:text-sm wdo:font-medium wdo:text-gray-700 wdo:dark:text-gray-200 wdo:mb-1",children:(0,h.__)("License key","ajax-search-pro")}),(0,s.jsx)("input",{type:"text",value:o,onChange:p=>{a(p.target.value),c("")},className:"wdo:block wdo:w-full wdo:mb-4 wdo:px-3 wdo:py-2 wdo:rounded wdo:border wdo:border-gray-300 wdo:dark:border-gray-600 wdo:dark:bg-gray-700 wdo:dark:text-white wdo:text-sm",placeholder:"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}),(0,s.jsxs)("div",{className:"wdo:flex wdo:gap-3",children:[(0,s.jsx)(Xe,{isLoading:i,disabled:i||o.trim().length!==36,onClick:f,children:(0,h.__)("Activate","ajax-search-pro")}),e&&(0,s.jsx)(Se,{disabled:i,onClick:m,children:(0,h.__)("Go back","ajax-search-pro")})]})]})})};const ba=["Yay","Top of the morning to you","You did it","All good chief","Looking good","Good job"],_a=["Something went south :(","Ooof, please try again","Ouch, that didn't work...","Ooops, that didn't work..."];let Qt=[],Un=[];const ka=()=>Un.forEach(e=>e(Qt)),Ir=e=>{Qt=Qt.filter(t=>t.id!==e),ka()},Wn=(e,t="")=>{const n=Math.random().toString(36).substring(2,9);t===""&&(e==="success"?t=ba[Math.floor(Math.random()*ba.length)]:t=_a[Math.floor(Math.random()*_a.length)]),Qt=[...Qt,{id:n,type:e,text:t}],ka(),setTimeout(()=>Ir(n),e==="success"?3e3:15e3)},ql=(e="")=>Wn("success",e),Gl=(e="")=>{typeof e=="string"?Wn("error",e):Wn("error",e.message)},sn=()=>{const[e,t]=(0,g.useState)(Qt);return(0,g.useEffect)(()=>(Un.push(t),t(Qt),()=>{Un=Un.filter(n=>n!==t)}),[]),{messages:e,addSuccess:ql,addError:Gl,addMessage:Wn,dismissMessage:Ir}};/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Yl=te("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Kl=te("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const qn=te("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Xl={success:(0,s.jsx)(Yl,{className:"wdo:w-5 wdo:h-5 wdo:shrink-0"}),error:(0,s.jsx)(Kl,{className:"wdo:w-5 wdo:h-5 wdo:shrink-0"})};var Ql=({messages:e})=>(0,s.jsx)("div",{className:"wdo:fixed wdo:top-16 wdo:left-1/2 wdo:-translate-x-1/2 wdo:w-full wdo:max-w-md wdo:z-50 wdo:flex wdo:flex-col wdo:gap-2 wdo:px-4",children:e.map(t=>(0,s.jsxs)("div",{className:G("wdo:toast",t.type==="success"?"wdo:toast-success":"wdo:toast-error"),children:[(0,s.jsx)("span",{className:G("wdo:shrink-0",t.type==="success"?"wdo:text-green-600 wdo:dark:text-green-400":"wdo:text-red-600 wdo:dark:text-red-400"),children:Xl[t.type]}),(0,s.jsx)("span",{className:"wdo:grow wdo:text-sm",children:t.text}),(0,s.jsx)("button",{className:"wdo:shrink-0 wdo:p-0.5 wdo:rounded wdo:border-0 wdo:cursor-pointer wdo:bg-transparent wdo:text-wp-admin-500 wdo:hover:text-wp-admin-800 wdo:dark:text-wp-admin-400 wdo:dark:hover:text-wp-admin-100 wdo:transition-colors",onClick:()=>Ir(t.id),"aria-label":"Dismiss",children:(0,s.jsx)(qn,{className:"wdo:w-4 wdo:h-4"})})]},t.id))});/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Zl=te("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Jl=te("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const eu=te("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]),Sa=(0,g.createContext)(void 0),ja=e=>e==="light"||e==="dark"||e==="system",Ea=e=>e==="dark"?!0:e==="light"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches,tu=({children:e})=>{const[t,n]=(0,g.useState)(()=>{const i=localStorage.getItem("wdo_darkmode");return ja(i)?i:"system"}),[r,o]=(0,g.useState)(()=>Ea(t)),a=i=>{n(i),localStorage.setItem("wdo_darkmode",i)};return(0,g.useEffect)(()=>{o(Ea(t))},[t]),(0,g.useEffect)(()=>{if(t!=="system")return;const i=window.matchMedia("(prefers-color-scheme: dark)"),l=u=>o(u.matches);return i.addEventListener("change",l),()=>i.removeEventListener("change",l)},[t]),(0,g.useEffect)(()=>{document.body.classList.toggle("wdo:dark",r)},[r]),(0,g.useEffect)(()=>{const i=l=>{l.key==="wdo_darkmode"&&ja(l.newValue)&&n(l.newValue)};return window.addEventListener("storage",i),()=>window.removeEventListener("storage",i)},[]),(0,s.jsx)(Sa.Provider,{value:{isDark:r,mode:t,setMode:a},children:e})},nu=()=>{const e=(0,g.useContext)(Sa);if(e===void 0)throw new Error("useIsDark must be used within a DarkModeProvider");return e},ru=[{mode:"light",icon:(0,s.jsx)(Zl,{}),title:"Light"},{mode:"system",icon:(0,s.jsx)(Jl,{}),title:"System"},{mode:"dark",icon:(0,s.jsx)(eu,{}),title:"Dark"}],ou=()=>{const{isDark:e,mode:t,setMode:n}=nu();return(0,s.jsx)("div",{className:G("wdo:inline-flex wdo:rounded-lg wdo:p-0.5 wdo:gap-0.5",e?"wdo:bg-wp-admin-700":"wdo:bg-wp-admin-200"),children:ru.map(({mode:r,icon:o,title:a})=>{const i=t===r;return(0,s.jsx)("button",{title:a,onClick:()=>n(r),className:G("wdo:rounded wdo:p-1.5 wdo:border-0 wdo:cursor-pointer","wdo:transition-colors wdo:flex wdo:items-center wdo:justify-center",i?e?"wdo:bg-wp-admin-500 wdo:text-white":"wdo:bg-white wdo:text-wp-admin-700 wdo:shadow-sm":e?"wdo:bg-transparent wdo:text-wp-admin-300":"wdo:bg-transparent wdo:text-wp-admin-500"),children:(0,s.jsx)("span",{className:"wdo:w-[18px] wdo:h-[18px] wdo:flex wdo:items-center wdo:justify-center",children:o})},r)})})};var au=()=>{const e=typeof window<"u"&&Array.isArray(window.wpdrmsSharedConflicts)?window.wpdrmsSharedConflicts:[];return e.length===0?null:(0,s.jsx)("div",{className:"wdo:flex wdo:flex-col wdo:gap-2 wdo:mb-4",children:e.map((t,n)=>(0,s.jsx)("div",{role:"alert",className:"wdo:p-3 wdo:rounded wdo:text-sm wdo:bg-red-50 wdo:text-red-800 wdo:dark:bg-red-900/20 wdo:dark:text-red-200",children:t.message},n))})},iu=({subtitle:e="",logo:t,className:n=""})=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(au,{}),(0,s.jsxs)("div",{className:"wdo:top-bar",children:[(0,s.jsxs)("div",{className:G("wdo:flex wdo:items-baseline wdo:gap-3",n),children:[t,e?(0,s.jsx)("h2",{children:e}):""]}),(0,s.jsx)(ou,{})]})]}),su=()=>(0,s.jsx)("svg",{height:"20",width:"20",viewBox:"0 0 20 20",style:{float:"right"},"aria-hidden":"true",focusable:"false",children:(0,s.jsx)("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"})}),lu=()=>(0,s.jsx)("svg",{height:"20",width:"20",viewBox:"0 0 20 20",style:{float:"right",transform:"rotate(180deg)"},"aria-hidden":"true",focusable:"false",children:(0,s.jsx)("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"})});const _n=(0,g.createContext)(null),uu=({children:e})=>{const[t,n]=(0,g.useState)(null),[r,o]=(0,g.useState)(()=>window.location.hash.slice(1)||null),[a,i]=(0,g.useState)([]),l=(0,g.useRef)([]),[u,c]=(0,g.useState)(()=>({})),d=y=>{const w=l.current.reduce((k,j)=>(k[j]=!0,k),{});c(k=>({...k,...w,[y]:!0}))},f=y=>{c(w=>({...w,[y]:!1}))},m=y=>{c(w=>({...w,[y]:!(w[y]??!1)}))},p=y=>{i(w=>[...w,r]),o(y),y?window.history.pushState(null,"",`#${y}`):window.history.replaceState(null,"",window.location.pathname+window.location.search)},S=()=>{if(a.length===0)return;const y=a[a.length-1];i(w=>w.slice(0,-1)),o(y),y?window.history.pushState(null,"",`#${y}`):window.history.replaceState(null,"",window.location.pathname+window.location.search)},_=a.length>0;return(0,g.useEffect)(()=>{const y=()=>{o(window.location.hash.slice(1)||null),r&&d(r)};return r&&d(r),window.addEventListener("hashchange",y),()=>window.removeEventListener("hashchange",y)},[]),(0,s.jsx)(_n.Provider,{value:{activeId:r,setActiveId:o,isOpen:u,toggleOpen:m,open:d,close:f,openedParents:l,confirmBeforeSwap:t,setConfirmBeforeSwap:n,navigate:p,goBack:S,canGoBack:_},children:e})},cu=({children:e,...t})=>(0,s.jsx)("ul",{style:{listStyleType:"none",padding:0,userSelect:"none"},...t,children:g.Children.map(e,n=>(0,g.cloneElement)(n,{level:0}))}),Mt=({label:e,id:t,children:n,iconBefore:r,iconAfter:o,disabled:a,defaultActive:i=!1,level:l=0,parents:u=[],...c})=>{const d=(0,g.useContext)(_n);if(!d)throw new Error("MenuItem must be used within a MenuProvider");const{activeId:f,isOpen:m,toggleOpen:p,openedParents:S,confirmBeforeSwap:_,setConfirmBeforeSwap:y,navigate:w}=d,k=f!==null?f===t:i,j=g.Children.count(n)>0,I=j?m[t]:!1;k&&(j&&(S.current=[...new Set(S.current.concat([t]))]),u.length&&(S.current=[...new Set(S.current.concat(u))]));const F=["","wdo:pl-4","wdo:pl-6","wdo:pl-8","wdo:pl-10"];return(0,s.jsxs)("li",{...c,children:[(0,s.jsxs)("a",{href:t?`#${t}`:void 0,onClick:x=>{x.preventDefault(),j&&!I&&p(t),!a&&(_===null||confirm(_))&&(y(null),j||w(t))},className:`
					${F[l]??""} 
					${k?"wdo:menu-item-active":""}
				    wdo:menu-item
				 `,children:[r&&(0,s.jsx)("span",{children:r}),(0,s.jsx)("span",{children:e}),o&&(0,s.jsx)("span",{children:o}),j&&(0,s.jsx)("span",{className:"wdo:dark:fill-gray-300",onClick:x=>{x.stopPropagation(),x.preventDefault(),p(t)},children:I?(0,s.jsx)(lu,{}):(0,s.jsx)(su,{})})]}),j&&(0,s.jsx)("ul",{style:{listStyleType:"none",padding:0,display:I?"block":"none"},children:g.Children.map(n,x=>(0,g.cloneElement)(x,{level:l+1,parents:u.concat([t]),...c}))})]})};/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ca=te("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const du=te("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const hu=te("wand-sparkles",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]);/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Aa=te("lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Fr=te("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Oa=te("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]);/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Na=te("chart-no-axes-column",[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V3",key:"1lcnhd"}],["path",{d:"M19 21V9",key:"unv183"}]]);/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ia=te("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const pu=te("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const fu=te("list",[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]);var mu=()=>(0,s.jsx)("svg",{width:"200",height:"100%",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 176.64 26.62",children:(0,s.jsxs)("g",{children:[(0,s.jsx)("path",{className:"wdo:fill-black wdo:dark:fill-white",d:"m13.59 20.4-1.32-2.93H5.78L4.46 20.4H.6L8.75 3.6h.55l8.15 16.8h-3.86Zm-6.5-5.81h3.84l-1.92-4.25-1.92 4.25Z"}),(0,s.jsx)("path",{className:"wdo:fill-black wdo:dark:fill-white",d:"M22.03 7.92V21.6c0 1.23-.34 2.16-1.01 2.78-.67.62-1.6.94-2.78.94-.66 0-1.53-.19-2.64-.58v-3.43c.19.05.41.11.66.18.25.07.44.13.58.17.14.04.29.08.46.11.17.03.32.05.47.05.56 0 .84-.45.84-1.34V7.92h3.43Zm0-4.32v3.05H18.6V3.6h3.43ZM29.63 7.78c.89 0 1.65.19 2.27.56.62.38.93.72.95 1.04V7.92h3.43V20.4h-3.43v-1.66c-.02.32-.34.7-.96 1.15-.62.45-1.38.67-2.25.67-.67 0-1.34-.13-2.01-.4s-1.29-.65-1.87-1.15c-.58-.5-1.04-1.18-1.4-2.03-.36-.85-.54-1.8-.54-2.86 0-1.97.6-3.52 1.81-4.66 1.21-1.14 2.54-1.7 4.02-1.7Zm2.56 3.76c-.53-.55-1.19-.83-1.99-.83s-1.49.31-2.09.94c-.59.62-.89 1.46-.89 2.5s.3 1.92.89 2.54c.59.62 1.29.94 2.09.94s1.46-.28 1.99-.85.79-1.44.79-2.63-.26-2.05-.79-2.6ZM46.7 20.4l-2.85-4.06L41 20.4h-3.86l4.79-6.41-4.31-6.07h3.76l2.47 3.72 2.47-3.72h3.76l-4.31 6.07 4.79 6.41H46.7ZM61.63 3.43c1.34 0 2.49.32 3.45.96.96.64 1.68 1.42 2.16 2.33l-3.09 1.06c-.42-.86-1.21-1.3-2.37-1.3-.58 0-1.06.13-1.45.38-.39.26-.59.58-.59.98s.14.78.42 1.09.81.6 1.59.85l.65.22c1.87.64 3.22 1.42 4.04 2.35.82.93 1.23 2.01 1.23 3.24 0 1.09-.34 2.02-1.01 2.81-.67.78-1.45 1.34-2.35 1.67-.9.33-1.81.49-2.76.49-1.53 0-2.85-.35-3.94-1.06-1.09-.7-1.87-1.66-2.31-2.88l2.9-1.3c.24.62.66 1.14 1.27 1.56s1.3.62 2.09.62c.67 0 1.27-.16 1.79-.48.52-.32.78-.8.78-1.44s-.19-1.08-.56-1.4c-.38-.33-1.08-.68-2.12-1.04l-.62-.24c-1.47-.51-2.61-1.16-3.4-1.96-.8-.79-1.2-1.83-1.2-3.11s.54-2.34 1.61-3.17c1.07-.83 2.34-1.25 3.81-1.25ZM74.84 7.78c.69 0 1.39.14 2.1.41s1.38.66 2.01 1.16c.63.5 1.14 1.18 1.53 2.03.39.85.59 1.79.59 2.83 0 .46-.03.88-.1 1.25h-8.92c.19.66.56 1.18 1.11 1.57.55.39 1.14.59 1.76.59.97 0 1.7-.26 2.18-.77l2.83 1.44c-1.33 1.52-3 2.28-5.03 2.28-.67 0-1.37-.13-2.09-.4s-1.41-.64-2.06-1.14c-.66-.5-1.19-1.16-1.61-2s-.62-1.78-.62-2.82.2-1.98.6-2.83.91-1.52 1.55-2.03c.63-.5 1.31-.89 2.03-1.16s1.43-.41 2.13-.41Zm0 2.98c-.62 0-1.19.18-1.69.55-.5.37-.85.89-1.04 1.56h5.49c-.18-.67-.53-1.19-1.06-1.56-.53-.37-1.09-.55-1.7-.55ZM88.1 7.78c.89 0 1.65.19 2.27.56.62.38.93.72.95 1.04V7.92h3.43V20.4h-3.43v-1.66c-.02.32-.34.7-.96 1.15-.62.45-1.38.67-2.25.67-.67 0-1.34-.13-2.01-.4s-1.29-.65-1.87-1.15c-.58-.5-1.04-1.18-1.4-2.03-.36-.85-.54-1.8-.54-2.86 0-1.97.6-3.52 1.81-4.66 1.21-1.14 2.54-1.7 4.02-1.7Zm2.56 3.76c-.53-.55-1.19-.83-1.99-.83s-1.49.31-2.09.94c-.59.62-.89 1.46-.89 2.5s.3 1.92.89 2.54c.59.62 1.29.94 2.09.94s1.46-.28 1.99-.85.79-1.44.79-2.63-.26-2.05-.79-2.6ZM103.94 7.8c.53 0 .92.03 1.17.1v3.19c-.27-.05-.67-.07-1.2-.07-1.07 0-1.98.37-2.72 1.1s-1.17 1.7-1.28 2.88v5.4h-3.4V7.92h3.4v4.01c.14-1.25.54-2.25 1.2-3 .66-.75 1.6-1.13 2.83-1.13ZM112.14 7.78c.96 0 1.92.24 2.88.71s1.74 1.18 2.35 2.12l-3.04 1.1c-.48-.67-1.21-1.01-2.18-1.01-.78 0-1.46.32-2.04.95-.58.63-.86 1.48-.86 2.56s.29 1.85.86 2.47c.58.62 1.25.94 2.04.94.99 0 1.72-.33 2.18-.98l3.07 1.1c-.62.94-1.41 1.65-2.37 2.12-.96.47-1.92.71-2.88.71-.67 0-1.36-.13-2.07-.4-.71-.26-1.39-.64-2.04-1.14-.65-.5-1.18-1.16-1.59-2s-.62-1.78-.62-2.82.21-2.01.62-2.87c.42-.86.95-1.53 1.59-2.03s1.33-.88 2.04-1.14c.71-.26 1.4-.4 2.07-.4ZM126.16 7.8c1.29 0 2.4.45 3.31 1.34.91.9 1.37 2.26 1.37 4.08v7.18h-3.43v-6.96c0-1.81-.67-2.71-2.01-2.71-.64 0-1.22.2-1.75.61s-.9.8-1.13 1.19c-.22.38-.36.69-.41.91v6.96h-3.43V3.6h3.43v6.67c.06-.48.47-1.01 1.22-1.6.75-.58 1.69-.88 2.83-.88ZM142.75 3.6c1.93 0 3.45.5 4.55 1.5 1.1 1 1.65 2.28 1.65 3.83s-.56 2.83-1.67 3.84c-1.11 1.01-2.62 1.51-4.54 1.51h-2.33v6.12h-3.52V3.6h5.85Zm-.1 7.54c.86 0 1.54-.19 2.04-.56.5-.38.74-.92.74-1.64s-.25-1.27-.74-1.64c-.5-.38-1.17-.56-2.04-.56h-2.23v4.42h2.23ZM158.05 7.8c.53 0 .92.03 1.17.1v3.19c-.27-.05-.67-.07-1.2-.07-1.07 0-1.98.37-2.72 1.1s-1.17 1.7-1.28 2.88v5.4h-3.4V7.92h3.4v4.01c.14-1.25.54-2.25 1.2-3 .66-.75 1.6-1.13 2.83-1.13ZM163.71 8.18c.73-.27 1.43-.41 2.1-.41s1.37.14 2.09.41 1.4.66 2.05 1.16c.65.5 1.18 1.18 1.59 2.03.42.85.62 1.79.62 2.83s-.21 1.98-.62 2.82c-.42.84-.95 1.51-1.59 2-.65.5-1.33.88-2.05 1.14s-1.41.4-2.09.4-1.37-.13-2.09-.4-1.41-.64-2.06-1.14c-.66-.5-1.19-1.16-1.61-2s-.62-1.78-.62-2.82.21-1.98.62-2.83.95-1.52 1.59-2.03c.65-.5 1.33-.89 2.06-1.16Zm2.1 2.52c-.78 0-1.47.31-2.06.94-.59.62-.89 1.48-.89 2.57s.3 1.89.89 2.5c.59.61 1.28.91 2.06.91s1.45-.3 2.04-.91.89-1.44.89-2.5-.3-1.94-.89-2.57c-.59-.62-1.27-.94-2.04-.94Z"}),(0,s.jsx)("path",{className:"wdo:fill-black wdo:dark:fill-white",d:"m174.49 24.75-6.88-7.26 1.29-1.39 7.74 6.34-2.15 2.31z"})]})});const kn=({label:e,className:t,description:n,labelClass:r="wdo:basis-3/5",optionClass:o="",children:a,disabled:i=!1,optionDescription:l,footer:u})=>(0,s.jsxs)("div",{className:G("wdo:option",i&&"wdo:pointer-events-none wdo:select-none wdo:opacity-50",t),...i?{"aria-disabled":"true",tabIndex:-1}:{},children:[(0,s.jsxs)("div",{className:G("wdo:option-label-container wdo:lg:grow-0 wdo:grow",r),children:[(0,s.jsx)("p",{className:"wdo:option-label",children:e}),n&&(0,s.jsx)("p",{className:"wdo:option-description",children:n})]}),(0,s.jsx)("div",{className:o||void 0,children:(0,s.jsxs)("div",{className:"wdo:option-container",children:[(0,s.jsx)("div",{children:a}),l&&(0,s.jsx)("div",{className:"wdo:option-description",children:l})]})}),u&&(0,s.jsx)("div",{className:"wdo:basis-full",children:u})]}),Fa=({value:e,onChange:t,tabIndex:n=0})=>{const[r,o]=(0,g.useState)(e??!1);(0,g.useEffect)(()=>{e!==void 0&&o(e)},[e]);const a=()=>{const l=!r;o(l),t?.(l)},i=r?"on":"off";return(0,s.jsx)("div",{onClick:a,onKeyDown:l=>(l.key==="Enter"||l.key===" ")&&a(),"data-state":i,className:"wdo:on-off wdo:group",role:"switch","aria-checked":r,tabIndex:n,children:(0,s.jsx)("div",{className:"wdo:group-data-[state=on]:translate-x-[23px] wdo:group-data-[state=off]:translate-x-[3px]"})})};var Pa=Ae(8279);const Da=0,Ta=1,Ma=2,Ra=3;var La=Object.prototype.hasOwnProperty;function Pr(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--&&Pr(e[r],t[r]););return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(La.call(e,n)&&++r&&!La.call(t,n)||!(n in t)||!Pr(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}const Rt=new WeakMap,Lt=()=>{},Ye=Lt(),Gn=Object,pe=e=>e===Ye,bt=e=>typeof e=="function",zt=(e,t)=>({...e,...t}),za=e=>bt(e.then),Dr={},Yn={},Tr="undefined",Sn=typeof window!=Tr,Mr=typeof document!=Tr,gu=Sn&&"Deno"in window,wu=()=>Sn&&typeof window.requestAnimationFrame!=Tr,Ba=(e,t)=>{const n=Rt.get(e);return[()=>!pe(t)&&e.get(t)||Dr,r=>{if(!pe(t)){const o=e.get(t);t in Yn||(Yn[t]=o),n[5](t,zt(o,r),o||Dr)}},n[6],()=>!pe(t)&&t in Yn?Yn[t]:!pe(t)&&e.get(t)||Dr]};let Rr=!0;const xu=()=>Rr,[Lr,zr]=Sn&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[Lt,Lt],yu=()=>{const e=Mr&&document.visibilityState;return pe(e)||e!=="hidden"},vu=e=>(Mr&&document.addEventListener("visibilitychange",e),Lr("focus",e),()=>{Mr&&document.removeEventListener("visibilitychange",e),zr("focus",e)}),bu=e=>{const t=()=>{Rr=!0,e()},n=()=>{Rr=!1};return Lr("online",t),Lr("offline",n),()=>{zr("online",t),zr("offline",n)}},_u={isOnline:xu,isVisible:yu},ku={initFocus:vu,initReconnect:bu},Va=!g.useId,ln=!Sn||gu,Su=e=>wu()?window.requestAnimationFrame(e):setTimeout(e,1),Kn=ln?g.useEffect:g.useLayoutEffect,Br=typeof navigator<"u"&&navigator.connection,$a=!ln&&Br&&(["slow-2g","2g"].includes(Br.effectiveType)||Br.saveData),Xn=new WeakMap,ju=e=>Gn.prototype.toString.call(e),Vr=(e,t)=>e===`[object ${t}]`;let Eu=0;const $r=e=>{const t=typeof e,n=ju(e),r=Vr(n,"Date"),o=Vr(n,"RegExp"),a=Vr(n,"Object");let i,l;if(Gn(e)===e&&!r&&!o){if(i=Xn.get(e),i)return i;if(i=++Eu+"~",Xn.set(e,i),Array.isArray(e)){for(i="@",l=0;l<e.length;l++)i+=$r(e[l])+",";Xn.set(e,i)}if(a){i="#";const u=Gn.keys(e).sort();for(;!pe(l=u.pop());)pe(e[l])||(i+=l+":"+$r(e[l])+",");Xn.set(e,i)}}else i=r?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return i},Hr=e=>{if(bt(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?$r(e):"",[e,t]};let Cu=0;const Ur=()=>++Cu;async function Ha(...e){const[t,n,r,o]=e,a=zt({populateCache:!0,throwOnError:!0},typeof o=="boolean"?{revalidate:o}:o||{});let i=a.populateCache;const l=a.rollbackOnError;let u=a.optimisticData;const c=m=>typeof l=="function"?l(m):l!==!1,d=a.throwOnError;if(bt(n)){const m=n,p=[],S=t.keys();for(const _ of S)!/^\$(inf|sub)\$/.test(_)&&m(t.get(_)._k)&&p.push(_);return Promise.all(p.map(f))}return f(n);async function f(m){const[p]=Hr(m);if(!p)return;const[S,_]=Ba(t,p),[y,w,k,j]=Rt.get(t),I=()=>{const V=y[p];return(bt(a.revalidate)?a.revalidate(S().data,m):a.revalidate!==!1)&&(delete k[p],delete j[p],V&&V[0])?V[0](Ma).then(()=>S().data):S().data};if(e.length<3)return I();let F=r,x,E=!1;const D=Ur();w[p]=[D,0];const C=!pe(u),N=S(),A=N.data,T=N._c,L=pe(T)?A:T;if(C&&(u=bt(u)?u(L,A):u,_({data:u,_c:L})),bt(F))try{F=F(L)}catch(V){x=V,E=!0}if(F&&za(F))if(F=await F.catch(V=>{x=V,E=!0}),D!==w[p][0]){if(E)throw x;return F}else E&&C&&c(x)&&(i=!0,_({data:L,_c:Ye}));if(i&&!E)if(bt(i)){const V=i(F,L);_({data:V,error:Ye,_c:Ye})}else _({data:F,error:Ye,_c:Ye});if(w[p][1]=Ur(),Promise.resolve(I()).then(()=>{_({_c:Ye})}),E){if(d)throw x;return}return F}}const Ua=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},Wa=(e,t)=>{if(!Rt.has(e)){const n=zt(ku,t),r=Object.create(null),o=Ha.bind(Ye,e);let a=Lt;const i=Object.create(null),l=(d,f)=>{const m=i[d]||[];return i[d]=m,m.push(f),()=>m.splice(m.indexOf(f),1)},u=(d,f,m)=>{e.set(d,f);const p=i[d];if(p)for(const S of p)S(f,m)},c=()=>{if(!Rt.has(e)&&(Rt.set(e,[r,Object.create(null),Object.create(null),Object.create(null),o,u,l]),!ln)){const d=n.initFocus(setTimeout.bind(Ye,Ua.bind(Ye,r,Da))),f=n.initReconnect(setTimeout.bind(Ye,Ua.bind(Ye,r,Ta)));a=()=>{d&&d(),f&&f(),Rt.delete(e)}}};return c(),[e,o,c,a]}return[e,Rt.get(e)[4]]},Au=(e,t,n,r,o)=>{const a=n.errorRetryCount,i=o.retryCount,l=~~((Math.random()+.5)*(1<<(i<8?i:8)))*n.errorRetryInterval;!pe(a)&&i>a||setTimeout(r,l,o)},Ou=Pr,[Wr,qa]=Wa(new Map),Ga=zt({onLoadingSlow:Lt,onSuccess:Lt,onError:Lt,onErrorRetry:Au,onDiscarded:Lt,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:$a?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:$a?5e3:3e3,compare:Ou,isPaused:()=>!1,cache:Wr,mutate:qa,fallback:{}},_u),Ya=(e,t)=>{const n=zt(e,t);if(t){const{use:r,fallback:o}=e,{use:a,fallback:i}=t;r&&a&&(n.use=r.concat(a)),o&&i&&(n.fallback=zt(o,i))}return n},qr=(0,g.createContext)({}),Nu=e=>{const{value:t}=e,n=(0,g.useContext)(qr),r=bt(t),o=(0,g.useMemo)(()=>r?t(n):t,[r,n,t]),a=(0,g.useMemo)(()=>r?o:Ya(n,o),[r,n,o]),i=o&&o.provider,l=(0,g.useRef)(Ye);i&&!l.current&&(l.current=Wa(i(a.cache||Wr),o));const u=l.current;return u&&(a.cache=u[0],a.mutate=u[1]),Kn(()=>{if(u)return u[2]&&u[2](),u[3]},[]),(0,g.createElement)(qr.Provider,zt(e,{value:a}))},Iu="$inf$",Ka=Sn&&window.__SWR_DEVTOOLS_USE__,Fu=Ka?window.__SWR_DEVTOOLS_USE__:[],Pu=()=>{Ka&&(window.__SWR_DEVTOOLS_REACT__=g)},Xa=e=>bt(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],Du=()=>{const e=(0,g.useContext)(qr);return(0,g.useMemo)(()=>zt(Ga,e),[e])},rx=(e,t)=>{if(IS_SERVER)return;const[n,r]=serialize(e),[,,,o]=SWRGlobalState.get(cache);if(o[n])return o[n];const a=t(r);return o[n]=a,a},Tu=e=>(t,n,r)=>e(t,n&&((...a)=>{const[i]=Hr(t),[,,,l]=Rt.get(Wr);if(i.startsWith(Iu))return n(...a);const u=l[i];return pe(u)?n(...a):(delete l[i],u)}),r),Mu=Fu.concat(Tu),Ru=e=>function(...n){const r=Du(),[o,a,i]=Xa(n),l=Ya(r,i);let u=e;const{use:c}=l,d=(c||[]).concat(Mu);for(let f=d.length;f--;)u=d[f](u);return u(o,a||l.fetcher||null,l)},Lu=(e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const o=r.indexOf(n);o>=0&&(r[o]=r[r.length-1],r.pop())}},ox=(e,t)=>(...n)=>{const[r,o,a]=Xa(n),i=(a.use||[]).concat(t);return e(r,o,{...a,use:i})};Pu();const zu=void 0,Gr=null,Qa=e=>e===zu,Bu=e=>typeof e=="function",Qn=new WeakMap,Vu=e=>Gr.prototype.toString.call(e),Yr=(e,t)=>e===`[object ${t}]`;let $u=0;const Kr=e=>{const t=typeof e,n=Vu(e),r=Yr(n,"Date"),o=Yr(n,"RegExp"),a=Yr(n,"Object");let i,l;if(Gr(e)===e&&!r&&!o){if(i=Qn.get(e),i)return i;if(i=++$u+"~",Qn.set(e,i),Array.isArray(e)){for(i="@",l=0;l<e.length;l++)i+=Kr(e[l])+",";Qn.set(e,i)}if(a){i="#";const u=Gr.keys(e).sort();for(;!Qa(l=u.pop());)Qa(e[l])||(i+=l+":"+Kr(e[l])+",");Qn.set(e,i)}}else i=r?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return i},Hu=e=>{if(Bu(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?Kr(e):"",[e,t]},ix=e=>Hu(e)[0],Xr=g.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}}),Qr={dedupe:!0},Za=Promise.resolve(Ye),Uu=()=>Lt,Wu=(e,t,n)=>{const{cache:r,compare:o,suspense:a,fallbackData:i,revalidateOnMount:l,revalidateIfStale:u,refreshInterval:c,refreshWhenHidden:d,refreshWhenOffline:f,keepPreviousData:m,strictServerPrefetchWarning:p}=n,[S,_,y,w]=Rt.get(r),[k,j]=Hr(e),I=(0,g.useRef)(!1),F=(0,g.useRef)(!1),x=(0,g.useRef)(k),E=(0,g.useRef)(t),D=(0,g.useRef)(n),C=()=>D.current,N=()=>C().isVisible()&&C().isOnline(),[A,T,L,V]=Ba(r,k),H=(0,g.useRef)({}).current,re=pe(i)?pe(n.fallback)?Ye:n.fallback[k]:i,ge=(je,Fe)=>{for(const Te in H){const Pe=Te;if(Pe==="data"){if(!o(je[Pe],Fe[Pe])&&(!pe(je[Pe])||!o(Ue,Fe[Pe])))return!1}else if(Fe[Pe]!==je[Pe])return!1}return!0},Ee=!I.current,ze=(0,g.useMemo)(()=>{const je=A(),Fe=V(),Te=Ve=>{const ct=zt(Ve);return delete ct._k,(()=>{if(!k||!t||C().isPaused())return!1;if(Ee&&!pe(l))return l;const an=pe(re)?ct.data:re;return pe(an)||u})()?{isValidating:!0,isLoading:!0,...ct}:ct},Pe=Te(je),ut=je===Fe?Pe:Te(Fe);let it=Pe;return[()=>{const Ve=Te(A());return ge(Ve,it)?(it.data=Ve.data,it.isLoading=Ve.isLoading,it.isValidating=Ve.isValidating,it.error=Ve.error,it):(it=Ve,Ve)},()=>ut]},[r,k]),b=(0,Pa.useSyncExternalStore)((0,g.useCallback)(je=>L(k,(Fe,Te)=>{ge(Te,Fe)||je()}),[r,k]),ze[0],ze[1]),We=S[k]&&S[k].length>0,me=b.data,v=pe(me)?re&&za(re)?Xr(re):re:me,Ce=b.error,qe=(0,g.useRef)(v),Ue=m?pe(me)?pe(qe.current)?v:qe.current:me:v,Be=k&&pe(v),we=(0,g.useRef)(null);!ln&&(0,Pa.useSyncExternalStore)(Uu,()=>(we.current=!1,we),()=>(we.current=!0,we));const gt=we.current;p&&gt&&!a&&Be&&console.warn(`Missing pre-initiated data for serialized key "${k}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);const at=!k||!t||C().isPaused()||We&&!pe(Ce)?!1:Ee&&!pe(l)?l:a?pe(v)?!1:u:pe(v)||u,wt=Ee&&at,xt=pe(b.isValidating)?wt:b.isValidating,rn=pe(b.isLoading)?wt:b.isLoading,Tt=(0,g.useCallback)(async je=>{const Fe=E.current;if(!k||!Fe||F.current||C().isPaused())return!1;let Te,Pe,ut=!0;const it=je||{},Ve=!y[k]||!it.dedupe,ct=()=>Va?!F.current&&k===x.current&&I.current:k===x.current,on={isValidating:!1,isLoading:!1},an=()=>{T(on)},O=()=>{const Y=y[k];Y&&Y[1]===Pe&&delete y[k]},z={isValidating:!0};pe(A().data)&&(z.isLoading=!0);try{if(Ve&&(T(z),n.loadingTimeout&&pe(A().data)&&setTimeout(()=>{ut&&ct()&&C().onLoadingSlow(k,n)},n.loadingTimeout),y[k]=[Fe(j),Ur()]),[Te,Pe]=y[k],Te=await Te,Ve&&setTimeout(O,n.dedupingInterval),!y[k]||y[k][1]!==Pe)return Ve&&ct()&&C().onDiscarded(k),!1;on.error=Ye;const Y=_[k];if(!pe(Y)&&(Pe<=Y[0]||Pe<=Y[1]||Y[1]===0))return an(),Ve&&ct()&&C().onDiscarded(k),!1;const he=A().data;on.data=o(he,Te)?he:Te,Ve&&ct()&&C().onSuccess(Te,k,n)}catch(Y){O();const he=C(),{shouldRetryOnError:_e}=he;he.isPaused()||(on.error=Y,Ve&&ct()&&(he.onError(Y,k,he),(_e===!0||bt(_e)&&_e(Y))&&(!C().revalidateOnFocus||!C().revalidateOnReconnect||N())&&he.onErrorRetry(Y,k,he,dt=>{const yt=S[k];yt&&yt[0]&&yt[0](Ra,dt)},{retryCount:(it.retryCount||0)+1,dedupe:!0})))}return ut=!1,an(),!0},[k,r]),bn=(0,g.useCallback)((...je)=>Ha(r,x.current,...je),[]);if(Kn(()=>{E.current=t,D.current=n,pe(me)||(qe.current=me)}),Kn(()=>{if(!k)return;const je=Tt.bind(Ye,Qr);let Fe=0;C().revalidateOnFocus&&(Fe=Date.now()+C().focusThrottleInterval);const Pe=Lu(k,S,(ut,it={})=>{if(ut==Da){const Ve=Date.now();C().revalidateOnFocus&&Ve>Fe&&N()&&(Fe=Ve+C().focusThrottleInterval,je())}else if(ut==Ta)C().revalidateOnReconnect&&N()&&je();else{if(ut==Ma)return Tt();if(ut==Ra)return Tt(it)}});return F.current=!1,x.current=k,I.current=!0,T({_k:j}),at&&(y[k]||(pe(v)||ln?je():Su(je))),()=>{F.current=!0,Pe()}},[k]),Kn(()=>{let je;function Fe(){const Pe=bt(c)?c(A().data):c;Pe&&je!==-1&&(je=setTimeout(Te,Pe))}function Te(){!A().error&&(d||C().isVisible())&&(f||C().isOnline())?Tt(Qr).then(Fe):Fe()}return Fe(),()=>{je&&(clearTimeout(je),je=-1)}},[c,d,f,k]),(0,g.useDebugValue)(Ue),a){if(!Va&&ln&&Be)throw new Error("Fallback data is required when using Suspense in SSR.");Be&&(E.current=t,D.current=n,F.current=!1);const je=w[k],Fe=!pe(je)&&Be?bn(je):Za;if(Xr(Fe),!pe(Ce)&&Be)throw Ce;const Te=Be?Tt(Qr):Za;!pe(Ue)&&Be&&(Te.status="fulfilled",Te.value=!0),Xr(Te)}return{mutate:bn,get data(){return H.data=!0,Ue},get error(){return H.error=!0,Ce},get isValidating(){return H.isValidating=!0,xt},get isLoading(){return H.isLoading=!0,rn}}},sx=Gn.defineProperty(Nu,"defaultValue",{value:Ga}),un=Ru(Wu);var Zt=window.wp.url;/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const qu=te("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);function Jt(e){"@babel/helpers - typeof";return Jt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jt(e)}function Gu(e,t){if(Jt(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Jt(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ja(e){var t=Gu(e,"string");return Jt(t)=="symbol"?t:t+""}function jn(e,t,n){return(t=Ja(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ei(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function ee(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ei(Object(n),!0).forEach(function(r){jn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ei(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Yu(e){if(Array.isArray(e))return e}function Ku(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,a,i,l=[],u=!0,c=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(d){c=!0,o=d}finally{try{if(!u&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}function Zr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ti(e,t){if(e){if(typeof e=="string")return Zr(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Zr(e,t):void 0}}function Xu(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bt(e,t){return Yu(e)||Ku(e,t)||ti(e,t)||Xu()}function Qu(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Vt(e,t){if(e==null)return{};var n,r,o=Qu(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Zu=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function Ju(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,o=r===void 0?!1:r,a=e.defaultValue,i=a===void 0?null:a,l=e.inputValue,u=e.menuIsOpen,c=e.onChange,d=e.onInputChange,f=e.onMenuClose,m=e.onMenuOpen,p=e.value,S=Vt(e,Zu),_=(0,g.useState)(l!==void 0?l:n),y=Bt(_,2),w=y[0],k=y[1],j=(0,g.useState)(u!==void 0?u:o),I=Bt(j,2),F=I[0],x=I[1],E=(0,g.useState)(p!==void 0?p:i),D=Bt(E,2),C=D[0],N=D[1],A=(0,g.useCallback)(function(Ee,ze){typeof c=="function"&&c(Ee,ze),N(Ee)},[c]),T=(0,g.useCallback)(function(Ee,ze){var b;typeof d=="function"&&(b=d(Ee,ze)),k(b!==void 0?b:Ee)},[d]),L=(0,g.useCallback)(function(){typeof m=="function"&&m(),x(!0)},[m]),V=(0,g.useCallback)(function(){typeof f=="function"&&f(),x(!1)},[f]),H=l!==void 0?l:w,re=u!==void 0?u:F,ge=p!==void 0?p:C;return ee(ee({},S),{},{inputValue:H,menuIsOpen:re,onChange:A,onInputChange:T,onMenuClose:V,onMenuOpen:L,value:ge})}function ne(){return ne=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},ne.apply(null,arguments)}function ec(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ni(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,Ja(r.key),r)}}function tc(e,t,n){return t&&ni(e.prototype,t),n&&ni(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Jr(e,t){return Jr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Jr(e,t)}function nc(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&&Jr(e,t)}function Zn(e){return Zn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Zn(e)}function ri(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ri=function(){return!!e})()}function rc(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oc(e,t){if(t&&(Jt(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rc(e)}function ac(e){var t=ri();return function(){var n,r=Zn(e);if(t){var o=Zn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return oc(this,n)}}function ic(e){if(Array.isArray(e))return Zr(e)}function sc(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function lc(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eo(e){return ic(e)||sc(e)||ti(e)||lc()}var uc=!1;function cc(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function dc(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var hc=(function(){function e(n){var r=this;this._insertTag=function(o){var a;r.tags.length===0?r.insertionPoint?a=r.insertionPoint.nextSibling:r.prepend?a=r.container.firstChild:a=r.before:a=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,a),r.tags.push(o)},this.isSpeedy=n.speedy===void 0?!uc:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(dc(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var a=cc(o);try{a.insertRule(r,a.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var o;return(o=r.parentNode)==null?void 0:o.removeChild(r)}),this.tags=[],this.ctr=0},e})(),pc=Math.abs,Jn=String.fromCharCode,fc=Object.assign;function mc(e,t){return Ke(e,0)^45?(((t<<2^Ke(e,0))<<2^Ke(e,1))<<2^Ke(e,2))<<2^Ke(e,3):0}function oi(e){return e.trim()}function gc(e,t){return(e=t.exec(e))?e[0]:e}function ye(e,t,n){return e.replace(t,n)}function to(e,t){return e.indexOf(t)}function Ke(e,t){return e.charCodeAt(t)|0}function En(e,t,n){return e.slice(t,n)}function jt(e){return e.length}function no(e){return e.length}function er(e,t){return t.push(e),e}function wc(e,t){return e.map(t).join("")}var tr=1,cn=1,ai=0,Je=0,De=0,dn="";function nr(e,t,n,r,o,a,i){return{value:e,root:t,parent:n,type:r,props:o,children:a,line:tr,column:cn,length:i,return:""}}function Cn(e,t){return fc(nr("",null,null,"",null,null,0),e,{length:-e.length},t)}function xc(){return De}function yc(){return De=Je>0?Ke(dn,--Je):0,cn--,De===10&&(cn=1,tr--),De}function nt(){return De=Je<ai?Ke(dn,Je++):0,cn++,De===10&&(cn=1,tr++),De}function Et(){return Ke(dn,Je)}function rr(){return Je}function An(e,t){return En(dn,e,t)}function hn(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function ro(e){return tr=cn=1,ai=jt(dn=e),Je=0,[]}function oo(e){return dn="",e}function On(e){return oi(An(Je-1,ao(e===91?e+2:e===40?e+1:e)))}function ux(e){return oo(bc(ro(e)))}function vc(e){for(;(De=Et())&&De<33;)nt();return hn(e)>2||hn(De)>3?"":" "}function bc(e){for(;nt();)switch(hn(De)){case 0:append(ii(Je-1),e);break;case 2:append(On(De),e);break;default:append(from(De),e)}return e}function _c(e,t){for(;--t&&nt()&&!(De<48||De>102||De>57&&De<65||De>70&&De<97););return An(e,rr()+(t<6&&Et()==32&&nt()==32))}function ao(e){for(;nt();)switch(De){case e:return Je;case 34:case 39:e!==34&&e!==39&&ao(De);break;case 40:e===41&&ao(e);break;case 92:nt();break}return Je}function kc(e,t){for(;nt()&&e+De!==57;)if(e+De===84&&Et()===47)break;return"/*"+An(t,Je-1)+"*"+Jn(e===47?e:nt())}function ii(e){for(;!hn(Et());)nt();return An(e,Je)}var Qe="-ms-",or="-moz-",ve="-webkit-",si="comm",io="rule",so="decl",cx="@page",dx="@media",Sc="@import",hx="@charset",px="@viewport",fx="@supports",mx="@document",gx="@namespace",li="@keyframes",wx="@font-face",xx="@counter-style",yx="@font-feature-values",jc="@layer";function pn(e,t){for(var n="",r=no(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function Ec(e,t,n,r){switch(e.type){case jc:if(e.children.length)break;case Sc:case so:return e.return=e.return||e.value;case si:return"";case li:return e.return=e.value+"{"+pn(e.children,r)+"}";case io:e.value=e.props.join(",")}return jt(n=pn(e.children,r))?e.return=e.value+"{"+n+"}":""}function Cc(e){var t=no(e);return function(n,r,o,a){for(var i="",l=0;l<t;l++)i+=e[l](n,r,o,a)||"";return i}}function Ac(e){return function(t){t.root||(t=t.return)&&e(t)}}function vx(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case DECLARATION:e.return=prefix(e.value,e.length,n);return;case KEYFRAMES:return serialize([copy(e,{value:replace(e.value,"@","@"+WEBKIT)})],r);case RULESET:if(e.length)return combine(e.props,function(o){switch(match(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return serialize([copy(e,{props:[replace(o,/:(read-\w+)/,":"+MOZ+"$1")]})],r);case"::placeholder":return serialize([copy(e,{props:[replace(o,/:(plac\w+)/,":"+WEBKIT+"input-$1")]}),copy(e,{props:[replace(o,/:(plac\w+)/,":"+MOZ+"$1")]}),copy(e,{props:[replace(o,/:(plac\w+)/,MS+"input-$1")]})],r)}return""})}}function bx(e){switch(e.type){case RULESET:e.props=e.props.map(function(t){return combine(tokenize(t),function(n,r,o){switch(charat(n,0)){case 12:return substr(n,1,strlen(n));case 0:case 40:case 43:case 62:case 126:return n;case 58:o[++r]==="global"&&(o[r]="",o[++r]="\f"+substr(o[r],r=1,-1));case 32:return r===1?"":n;default:switch(r){case 0:return e=n,sizeof(o)>1?"":n;case(r=sizeof(o)-1):case 2:return r===2?n+e+e:n+e;default:return n}}})})}}function Oc(e){return oo(ar("",null,null,null,[""],e=ro(e),0,[0],e))}function ar(e,t,n,r,o,a,i,l,u){for(var c=0,d=0,f=i,m=0,p=0,S=0,_=1,y=1,w=1,k=0,j="",I=o,F=a,x=r,E=j;y;)switch(S=k,k=nt()){case 40:if(S!=108&&Ke(E,f-1)==58){to(E+=ye(On(k),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:E+=On(k);break;case 9:case 10:case 13:case 32:E+=vc(S);break;case 92:E+=_c(rr()-1,7);continue;case 47:switch(Et()){case 42:case 47:er(Nc(kc(nt(),rr()),t,n),u);break;default:E+="/"}break;case 123*_:l[c++]=jt(E)*w;case 125*_:case 59:case 0:switch(k){case 0:case 125:y=0;case 59+d:w==-1&&(E=ye(E,/\f/g,"")),p>0&&jt(E)-f&&er(p>32?ci(E+";",r,n,f-1):ci(ye(E," ","")+";",r,n,f-2),u);break;case 59:E+=";";default:if(er(x=ui(E,t,n,c,d,o,l,j,I=[],F=[],f),a),k===123)if(d===0)ar(E,t,x,x,I,a,f,l,F);else switch(m===99&&Ke(E,3)===110?100:m){case 100:case 108:case 109:case 115:ar(e,x,x,r&&er(ui(e,x,x,0,0,o,l,j,o,I=[],f),F),o,F,f,l,r?I:F);break;default:ar(E,x,x,x,[""],F,0,l,F)}}c=d=p=0,_=w=1,j=E="",f=i;break;case 58:f=1+jt(E),p=S;default:if(_<1){if(k==123)--_;else if(k==125&&_++==0&&yc()==125)continue}switch(E+=Jn(k),k*_){case 38:w=d>0?1:(E+="\f",-1);break;case 44:l[c++]=(jt(E)-1)*w,w=1;break;case 64:Et()===45&&(E+=On(nt())),m=Et(),d=f=jt(j=E+=ii(rr())),k++;break;case 45:S===45&&jt(E)==2&&(_=0)}}return a}function ui(e,t,n,r,o,a,i,l,u,c,d){for(var f=o-1,m=o===0?a:[""],p=no(m),S=0,_=0,y=0;S<r;++S)for(var w=0,k=En(e,f+1,f=pc(_=i[S])),j=e;w<p;++w)(j=oi(_>0?m[w]+" "+k:ye(k,/&\f/g,m[w])))&&(u[y++]=j);return nr(e,t,n,o===0?io:l,u,c,d)}function Nc(e,t,n){return nr(e,t,n,si,Jn(xc()),En(e,2,-2),0)}function ci(e,t,n,r){return nr(e,t,n,so,En(e,0,r),En(e,r+1,-1),r)}var Ic=function(t,n,r){for(var o=0,a=0;o=a,a=Et(),o===38&&a===12&&(n[r]=1),!hn(a);)nt();return An(t,Je)},Fc=function(t,n){var r=-1,o=44;do switch(hn(o)){case 0:o===38&&Et()===12&&(n[r]=1),t[r]+=Ic(Je-1,n,r);break;case 2:t[r]+=On(o);break;case 4:if(o===44){t[++r]=Et()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Jn(o)}while(o=nt());return t},Pc=function(t,n){return oo(Fc(ro(t),n))},di=new WeakMap,Dc=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,o=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!di.get(r))&&!o){di.set(t,!0);for(var a=[],i=Pc(n,a),l=r.props,u=0,c=0;u<i.length;u++)for(var d=0;d<l.length;d++,c++)t.props[c]=a[u]?i[u].replace(/&\f/g,l[d]):l[d]+" "+i[u]}}},Tc=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function hi(e,t){switch(mc(e,t)){case 5103:return ve+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ve+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ve+e+or+e+Qe+e+e;case 6828:case 4268:return ve+e+Qe+e+e;case 6165:return ve+e+Qe+"flex-"+e+e;case 5187:return ve+e+ye(e,/(\w+).+(:[^]+)/,ve+"box-$1$2"+Qe+"flex-$1$2")+e;case 5443:return ve+e+Qe+"flex-item-"+ye(e,/flex-|-self/,"")+e;case 4675:return ve+e+Qe+"flex-line-pack"+ye(e,/align-content|flex-|-self/,"")+e;case 5548:return ve+e+Qe+ye(e,"shrink","negative")+e;case 5292:return ve+e+Qe+ye(e,"basis","preferred-size")+e;case 6060:return ve+"box-"+ye(e,"-grow","")+ve+e+Qe+ye(e,"grow","positive")+e;case 4554:return ve+ye(e,/([^-])(transform)/g,"$1"+ve+"$2")+e;case 6187:return ye(ye(ye(e,/(zoom-|grab)/,ve+"$1"),/(image-set)/,ve+"$1"),e,"")+e;case 5495:case 3959:return ye(e,/(image-set\([^]*)/,ve+"$1$`$1");case 4968:return ye(ye(e,/(.+:)(flex-)?(.*)/,ve+"box-pack:$3"+Qe+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ve+e+e;case 4095:case 3583:case 4068:case 2532:return ye(e,/(.+)-inline(.+)/,ve+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(jt(e)-1-t>6)switch(Ke(e,t+1)){case 109:if(Ke(e,t+4)!==45)break;case 102:return ye(e,/(.+:)(.+)-([^]+)/,"$1"+ve+"$2-$3$1"+or+(Ke(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~to(e,"stretch")?hi(ye(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ke(e,t+1)!==115)break;case 6444:switch(Ke(e,jt(e)-3-(~to(e,"!important")&&10))){case 107:return ye(e,":",":"+ve)+e;case 101:return ye(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ve+(Ke(e,14)===45?"inline-":"")+"box$3$1"+ve+"$2$3$1"+Qe+"$2box$3")+e}break;case 5936:switch(Ke(e,t+11)){case 114:return ve+e+Qe+ye(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ve+e+Qe+ye(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ve+e+Qe+ye(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ve+e+Qe+e+e}return e}var Mc=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case so:t.return=hi(t.value,t.length);break;case li:return pn([Cn(t,{value:ye(t.value,"@","@"+ve)})],o);case io:if(t.length)return wc(t.props,function(a){switch(gc(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return pn([Cn(t,{props:[ye(a,/:(read-\w+)/,":"+or+"$1")]})],o);case"::placeholder":return pn([Cn(t,{props:[ye(a,/:(plac\w+)/,":"+ve+"input-$1")]}),Cn(t,{props:[ye(a,/:(plac\w+)/,":"+or+"$1")]}),Cn(t,{props:[ye(a,/:(plac\w+)/,Qe+"input-$1")]})],o)}return""})}},Rc=[Mc],Lc=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(_){var y=_.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(_),_.setAttribute("data-s",""))})}var o=t.stylisPlugins||Rc,a={},i,l=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(_){for(var y=_.getAttribute("data-emotion").split(" "),w=1;w<y.length;w++)a[y[w]]=!0;l.push(_)});var u,c=[Dc,Tc];{var d,f=[Ec,Ac(function(_){d.insert(_)})],m=Cc(c.concat(o,f)),p=function(y){return pn(Oc(y),m)};u=function(y,w,k,j){d=k,p(y?y+"{"+w.styles+"}":w.styles),j&&(S.inserted[w.name]=!0)}}var S={key:n,sheet:new hc({key:n,container:i,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:a,registered:{},insert:u};return S.sheet.hydrate(l),S},zc=!0;function Bc(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(r+=o+" ")}),r}var pi=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||zc===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},Vc=function(t,n,r){pi(t,n,r);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var a=n;do t.insert(n===a?"."+o:"",a,t.sheet,!0),a=a.next;while(a!==void 0)}};function $c(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Hc={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Uc(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Wc=!1,qc=/[A-Z]|^ms/g,Gc=/_EMO_([^_]+?)_([^]*?)_EMO_/g,fi=function(t){return t.charCodeAt(1)===45},mi=function(t){return t!=null&&typeof t!="boolean"},lo=Uc(function(e){return fi(e)?e:e.replace(qc,"-$&").toLowerCase()}),gi=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Gc,function(r,o,a){return Ct={name:o,styles:a,next:Ct},o})}return Hc[t]!==1&&!fi(t)&&typeof n=="number"&&n!==0?n+"px":n},Yc="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Nn(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return Ct={name:o.name,styles:o.styles,next:Ct},o.name;var a=n;if(a.styles!==void 0){var i=a.next;if(i!==void 0)for(;i!==void 0;)Ct={name:i.name,styles:i.styles,next:Ct},i=i.next;var l=a.styles+";";return l}return Kc(e,t,n)}case"function":{if(e!==void 0){var u=Ct,c=n(e);return Ct=u,Nn(e,t,c)}break}}var d=n;if(t==null)return d;var f=t[d];return f!==void 0?f:d}function Kc(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Nn(e,t,n[o])+";";else for(var a in n){var i=n[a];if(typeof i!="object"){var l=i;t!=null&&t[l]!==void 0?r+=a+"{"+t[l]+"}":mi(l)&&(r+=lo(a)+":"+gi(a,l)+";")}else{if(a==="NO_COMPONENT_SELECTOR"&&Wc)throw new Error(Yc);if(Array.isArray(i)&&typeof i[0]=="string"&&(t==null||t[i[0]]===void 0))for(var u=0;u<i.length;u++)mi(i[u])&&(r+=lo(a)+":"+gi(a,i[u])+";");else{var c=Nn(e,t,i);switch(a){case"animation":case"animationName":{r+=lo(a)+":"+c+";";break}default:r+=a+"{"+c+"}"}}}}return r}var wi=/label:\s*([^\s;{]+)\s*(;|$)/g,Ct;function xi(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,o="";Ct=void 0;var a=e[0];if(a==null||a.raw===void 0)r=!1,o+=Nn(n,t,a);else{var i=a;o+=i[0]}for(var l=1;l<e.length;l++)if(o+=Nn(n,t,e[l]),r){var u=a;o+=u[l]}wi.lastIndex=0;for(var c="",d;(d=wi.exec(o))!==null;)c+="-"+d[1];var f=$c(o)+c;return{name:f,styles:o,next:Ct}}var Xc=function(t){return t()},yi=g.useInsertionEffect?g.useInsertionEffect:!1,Qc=yi||Xc,_x=yi||g.useLayoutEffect,Zc=!1,uo=g.createContext(typeof HTMLElement<"u"?Lc({key:"css"}):null),kx=uo.Provider,Sx=function(){return useContext(uo)},Jc=function(t){return(0,g.forwardRef)(function(n,r){var o=(0,g.useContext)(uo);return t(n,o,r)})},In=g.createContext({}),jx=function(){return React.useContext(In)},Ex=function(t,n){if(typeof n=="function"){var r=n(t);return r}return _extends({},t,n)},ed=null,Cx=function(t){var n=React.useContext(In);return t.theme!==n&&(n=ed(n)(t.theme)),React.createElement(In.Provider,{value:n},t.children)};function Ax(e){var t=e.displayName||e.name||"Component",n=React.forwardRef(function(o,a){var i=React.useContext(In);return React.createElement(e,_extends({theme:i,ref:a},o))});return n.displayName="WithTheme("+t+")",hoistNonReactStatics(n,e)}var co={}.hasOwnProperty,ho="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",td=function(t,n){var r={};for(var o in n)co.call(n,o)&&(r[o]=n[o]);return r[ho]=t,r},nd=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return pi(n,r,o),Qc(function(){return Vc(n,r,o)}),null},rd=Jc(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var o=e[ho],a=[r],i="";typeof e.className=="string"?i=Bc(t.registered,a,e.className):e.className!=null&&(i=e.className+" ");var l=xi(a,void 0,g.useContext(In));i+=t.key+"-"+l.name;var u={};for(var c in e)co.call(e,c)&&c!=="css"&&c!==ho&&!Zc&&(u[c]=e[c]);return u.className=i,n&&(u.ref=n),g.createElement(g.Fragment,null,g.createElement(nd,{cache:t,serialized:l,isStringTag:typeof o=="string"}),g.createElement(o,u))}),od=rd,Ox=Ae(7621),Q=function(t,n){var r=arguments;if(n==null||!co.call(n,"css"))return g.createElement.apply(void 0,r);var o=r.length,a=new Array(o);a[0]=od,a[1]=td(t,n);for(var i=2;i<o;i++)a[i]=r[i];return g.createElement.apply(null,a)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(Q||(Q={}));var Nx=null;function po(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return xi(t)}function ad(){var e=po.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var Ix=function e(t){for(var n=t.length,r=0,o="";r<n;r++){var a=t[r];if(a!=null){var i=void 0;switch(typeof a){case"boolean":break;case"object":{if(Array.isArray(a))i=e(a);else{i="";for(var l in a)a[l]&&l&&(i&&(i+=" "),i+=l)}break}default:i=a}i&&(o&&(o+=" "),o+=i)}}return o};function Fx(e,t,n){var r=[],o=getRegisteredStyles(e,r,n);return r.length<2?n:o+t(r)}var Px=function(t){var n=t.cache,r=t.serializedArr;return useInsertionEffectAlwaysWithSyncFallback(function(){for(var o=0;o<r.length;o++)insertStyles(n,r[o],!1)}),null},Dx=null;function id(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const Tx=null,Mx=null,Rx=null,ir=Math.min,en=Math.max,sr=Math.round,lr=Math.floor,At=e=>({x:e,y:e}),sd={left:"right",right:"left",bottom:"top",top:"bottom"},ld={start:"end",end:"start"};function Lx(e,t,n){return en(e,ir(t,n))}function zx(e,t){return typeof e=="function"?e(t):e}function vi(e){return e.split("-")[0]}function bi(e){return e.split("-")[1]}function ud(e){return e==="x"?"y":"x"}function cd(e){return e==="y"?"height":"width"}const dd=new Set(["top","bottom"]);function hd(e){return dd.has(vi(e))?"y":"x"}function pd(e){return ud(hd(e))}function Bx(e,t,n){n===void 0&&(n=!1);const r=bi(e),o=pd(e),a=cd(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=mo(i)),[i,mo(i)]}function Vx(e){const t=mo(e);return[fo(e),t,fo(t)]}function fo(e){return e.replace(/start|end/g,t=>ld[t])}const _i=null,ki=null,fd=null,md=null;function gd(e,t,n){switch(e){case"top":case"bottom":return n?t?ki:_i:t?_i:ki;case"left":case"right":return t?fd:md;default:return[]}}function $x(e,t,n,r){const o=bi(e);let a=gd(vi(e),n==="start",r);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(fo)))),a}function mo(e){return e.replace(/left|right|bottom|top/g,t=>sd[t])}function wd(e){return{top:0,right:0,bottom:0,left:0,...e}}function Hx(e){return typeof e!="number"?wd(e):{top:e,right:e,bottom:e,left:e}}function Si(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function ur(){return typeof window<"u"}function fn(e){return ji(e)?(e.nodeName||"").toLowerCase():"#document"}function st(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ot(e){var t;return(t=(ji(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ji(e){return ur()?e instanceof Node||e instanceof st(e).Node:!1}function _t(e){return ur()?e instanceof Element||e instanceof st(e).Element:!1}function Nt(e){return ur()?e instanceof HTMLElement||e instanceof st(e).HTMLElement:!1}function Ei(e){return!ur()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof st(e).ShadowRoot}const xd=new Set(["inline","contents"]);function Fn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=kt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!xd.has(o)}const yd=new Set(["table","td","th"]);function vd(e){return yd.has(fn(e))}const bd=[":popover-open",":modal"];function cr(e){return bd.some(t=>{try{return e.matches(t)}catch{return!1}})}const _d=["transform","translate","scale","rotate","perspective"],kd=["transform","translate","scale","rotate","perspective","filter"],Sd=["paint","layout","strict","content"];function go(e){const t=wo(),n=_t(e)?kt(e):e;return _d.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||kd.some(r=>(n.willChange||"").includes(r))||Sd.some(r=>(n.contain||"").includes(r))}function jd(e){let t=Ut(e);for(;Nt(t)&&!mn(t);){if(go(t))return t;if(cr(t))return null;t=Ut(t)}return null}function wo(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ed=new Set(["html","body","#document"]);function mn(e){return Ed.has(fn(e))}function kt(e){return st(e).getComputedStyle(e)}function dr(e){return _t(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ut(e){if(fn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ei(e)&&e.host||Ot(e);return Ei(t)?t.host:t}function Ci(e){const t=Ut(e);return mn(t)?e.ownerDocument?e.ownerDocument.body:e.body:Nt(t)&&Fn(t)?t:Ci(t)}function Pn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Ci(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),i=st(o);if(a){const l=xo(i);return t.concat(i,i.visualViewport||[],Fn(o)?o:[],l&&n?Pn(l):[])}return t.concat(o,Pn(o,[],n))}function xo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ai(e){const t=kt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Nt(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,l=sr(n)!==a||sr(r)!==i;return l&&(n=a,r=i),{width:n,height:r,$:l}}function yo(e){return _t(e)?e:e.contextElement}function gn(e){const t=yo(e);if(!Nt(t))return At(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Ai(t);let i=(a?sr(n.width):n.width)/r,l=(a?sr(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const Cd=At(0);function Oi(e){const t=st(e);return!wo()||!t.visualViewport?Cd:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ad(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==st(e)?!1:t}function tn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=yo(e);let i=At(1);t&&(r?_t(r)&&(i=gn(r)):i=gn(e));const l=Ad(a,n,r)?Oi(a):At(0);let u=(o.left+l.x)/i.x,c=(o.top+l.y)/i.y,d=o.width/i.x,f=o.height/i.y;if(a){const m=st(a),p=r&&_t(r)?st(r):r;let S=m,_=xo(S);for(;_&&r&&p!==S;){const y=gn(_),w=_.getBoundingClientRect(),k=kt(_),j=w.left+(_.clientLeft+parseFloat(k.paddingLeft))*y.x,I=w.top+(_.clientTop+parseFloat(k.paddingTop))*y.y;u*=y.x,c*=y.y,d*=y.x,f*=y.y,u+=j,c+=I,S=st(_),_=xo(S)}}return Si({width:d,height:f,x:u,y:c})}function hr(e,t){const n=dr(e).scrollLeft;return t?t.left+n:tn(Ot(e)).left+n}function Ni(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-hr(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Od(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",i=Ot(r),l=t?cr(t.floating):!1;if(r===i||l&&a)return n;let u={scrollLeft:0,scrollTop:0},c=At(1);const d=At(0),f=Nt(r);if((f||!f&&!a)&&((fn(r)!=="body"||Fn(i))&&(u=dr(r)),Nt(r))){const p=tn(r);c=gn(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}const m=i&&!f&&!a?Ni(i,u):At(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+d.x+m.x,y:n.y*c.y-u.scrollTop*c.y+d.y+m.y}}function Nd(e){return Array.from(e.getClientRects())}function Id(e){const t=Ot(e),n=dr(e),r=e.ownerDocument.body,o=en(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=en(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+hr(e);const l=-n.scrollTop;return kt(r).direction==="rtl"&&(i+=en(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:l}}const Ii=25;function Fd(e,t){const n=st(e),r=Ot(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,l=0,u=0;if(o){a=o.width,i=o.height;const d=wo();(!d||d&&t==="fixed")&&(l=o.offsetLeft,u=o.offsetTop)}const c=hr(r);if(c<=0){const d=r.ownerDocument,f=d.body,m=getComputedStyle(f),p=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,S=Math.abs(r.clientWidth-f.clientWidth-p);S<=Ii&&(a-=S)}else c<=Ii&&(a+=c);return{width:a,height:i,x:l,y:u}}const Pd=new Set(["absolute","fixed"]);function Dd(e,t){const n=tn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Nt(e)?gn(e):At(1),i=e.clientWidth*a.x,l=e.clientHeight*a.y,u=o*a.x,c=r*a.y;return{width:i,height:l,x:u,y:c}}function Fi(e,t,n){let r;if(t==="viewport")r=Fd(e,n);else if(t==="document")r=Id(Ot(e));else if(_t(t))r=Dd(t,n);else{const o=Oi(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Si(r)}function Pi(e,t){const n=Ut(e);return n===t||!_t(n)||mn(n)?!1:kt(n).position==="fixed"||Pi(n,t)}function Td(e,t){const n=t.get(e);if(n)return n;let r=Pn(e,[],!1).filter(l=>_t(l)&&fn(l)!=="body"),o=null;const a=kt(e).position==="fixed";let i=a?Ut(e):e;for(;_t(i)&&!mn(i);){const l=kt(i),u=go(i);!u&&l.position==="fixed"&&(o=null),(a?!u&&!o:!u&&l.position==="static"&&!!o&&Pd.has(o.position)||Fn(i)&&!u&&Pi(e,i))?r=r.filter(d=>d!==i):o=l,i=Ut(i)}return t.set(e,r),r}function Md(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?cr(t)?[]:Td(t,this._c):[].concat(n),r],l=i[0],u=i.reduce((c,d)=>{const f=Fi(t,d,o);return c.top=en(f.top,c.top),c.right=ir(f.right,c.right),c.bottom=ir(f.bottom,c.bottom),c.left=en(f.left,c.left),c},Fi(t,l,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function Rd(e){const{width:t,height:n}=Ai(e);return{width:t,height:n}}function Ld(e,t,n){const r=Nt(t),o=Ot(t),a=n==="fixed",i=tn(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const u=At(0);function c(){u.x=hr(o)}if(r||!r&&!a)if((fn(t)!=="body"||Fn(o))&&(l=dr(t)),r){const p=tn(t,!0,a,t);u.x=p.x+t.clientLeft,u.y=p.y+t.clientTop}else o&&c();a&&!r&&o&&c();const d=o&&!r&&!a?Ni(o,l):At(0),f=i.left+l.scrollLeft-u.x-d.x,m=i.top+l.scrollTop-u.y-d.y;return{x:f,y:m,width:i.width,height:i.height}}function vo(e){return kt(e).position==="static"}function Di(e,t){if(!Nt(e)||kt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ot(e)===n&&(n=n.ownerDocument.body),n}function Ti(e,t){const n=st(e);if(cr(e))return n;if(!Nt(e)){let o=Ut(e);for(;o&&!mn(o);){if(_t(o)&&!vo(o))return o;o=Ut(o)}return n}let r=Di(e,t);for(;r&&vd(r)&&vo(r);)r=Di(r,t);return r&&mn(r)&&vo(r)&&!go(r)?n:r||jd(e)||n}const zd=async function(e){const t=this.getOffsetParent||Ti,n=this.getDimensions,r=await n(e.floating);return{reference:Ld(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Bd(e){return kt(e).direction==="rtl"}const Vd={convertOffsetParentRelativeRectToViewportRelativeRect:Od,getDocumentElement:Ot,getClippingRect:Md,getOffsetParent:Ti,getElementRects:zd,getClientRects:Nd,getDimensions:Rd,getScale:gn,isElement:_t,isRTL:Bd};function Mi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $d(e,t){let n=null,r;const o=Ot(e);function a(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function i(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),a();const c=e.getBoundingClientRect(),{left:d,top:f,width:m,height:p}=c;if(l||t(),!m||!p)return;const S=lr(f),_=lr(o.clientWidth-(d+m)),y=lr(o.clientHeight-(f+p)),w=lr(d),j={rootMargin:-S+"px "+-_+"px "+-y+"px "+-w+"px",threshold:en(0,ir(1,u))||1};let I=!0;function F(x){const E=x[0].intersectionRatio;if(E!==u){if(!I)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},1e3)}E===1&&!Mi(c,e.getBoundingClientRect())&&i(),I=!1}try{n=new IntersectionObserver(F,{...j,root:o.ownerDocument})}catch{n=new IntersectionObserver(F,j)}n.observe(e)}return i(!0),a}function Hd(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,c=yo(e),d=o||a?[...c?Pn(c):[],...Pn(t)]:[];d.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),a&&w.addEventListener("resize",n)});const f=c&&l?$d(c,n):null;let m=-1,p=null;i&&(p=new ResizeObserver(w=>{let[k]=w;k&&k.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var j;(j=p)==null||j.observe(t)})),n()}),c&&!u&&p.observe(c),p.observe(t));let S,_=u?tn(e):null;u&&y();function y(){const w=tn(e);_&&!Mi(_,w)&&n(),_=w,S=requestAnimationFrame(y)}return n(),()=>{var w;d.forEach(k=>{o&&k.removeEventListener("scroll",n),a&&k.removeEventListener("resize",n)}),f?.(),(w=p)==null||w.disconnect(),p=null,u&&cancelAnimationFrame(S)}}const Ux=null,Wx=null,qx=null,Gx=null,Yx=null,Kx=null,Xx=null,Qx=null,Zx=null,Jx=null,e1=(e,t,n)=>{const r=new Map,o={platform:Vd,...n},a={...o.platform,_c:r};return computePosition$1(e,t,{...o,platform:a})};var bo=g.useLayoutEffect,Ud=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],pr=function(){};function Wd(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function qd(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var a=[].concat(r);if(t&&e)for(var i in t)t.hasOwnProperty(i)&&t[i]&&a.push("".concat(Wd(e,i)));return a.filter(function(l){return l}).map(function(l){return String(l).trim()}).join(" ")}var Ri=function(t){return th(t)?t.filter(Boolean):Jt(t)==="object"&&t!==null?[t]:[]},Li=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=Vt(t,Ud);return ee({},n)},Re=function(t,n,r){var o=t.cx,a=t.getStyles,i=t.getClassNames,l=t.className;return{css:a(n,t),className:o(r??{},i(n,t),l)}};function t1(e,t,n){if(n){var r=n(e,t);if(typeof r=="string")return r}return e}function fr(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function Gd(e){return fr(e)?window.innerHeight:e.clientHeight}function zi(e){return fr(e)?window.pageYOffset:e.scrollTop}function mr(e,t){if(fr(e)){window.scrollTo(0,t);return}e.scrollTop=t}function Yd(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}function Kd(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function gr(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:pr,o=zi(e),a=t-o,i=10,l=0;function u(){l+=i;var c=Kd(l,o,a,n);mr(e,c),l<n?window.requestAnimationFrame(u):r(e)}u()}function Bi(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?mr(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&mr(e,Math.max(t.offsetTop-o,0))}function Xd(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function Vi(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function Qd(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var $i=!1,Zd={get passive(){return $i=!0}},wr=typeof window<"u"?window:{};wr.addEventListener&&wr.removeEventListener&&(wr.addEventListener("p",pr,Zd),wr.removeEventListener("p",pr,!1));var Jd=$i;function eh(e){return e!=null}function th(e){return Array.isArray(e)}function xr(e,t,n){return e?t:n}function n1(e){return e}function r1(e){return e}var nh=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var a=Object.entries(t).filter(function(i){var l=Bt(i,1),u=l[0];return!r.includes(u)});return a.reduce(function(i,l){var u=Bt(l,2),c=u[0],d=u[1];return i[c]=d,i},{})},rh=["children","innerProps"],oh=["children","innerProps"];function ah(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,a=e.shouldScroll,i=e.isFixedPosition,l=e.controlHeight,u=Yd(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var d=u.getBoundingClientRect(),f=d.height,m=n.getBoundingClientRect(),p=m.bottom,S=m.height,_=m.top,y=n.offsetParent.getBoundingClientRect(),w=y.top,k=i?window.innerHeight:Gd(u),j=zi(u),I=parseInt(getComputedStyle(n).marginBottom,10),F=parseInt(getComputedStyle(n).marginTop,10),x=w-F,E=k-_,D=x+j,C=f-j-_,N=p-k+j+I,A=j+_-F,T=160;switch(o){case"auto":case"bottom":if(E>=S)return{placement:"bottom",maxHeight:t};if(C>=S&&!i)return a&&gr(u,N,T),{placement:"bottom",maxHeight:t};if(!i&&C>=r||i&&E>=r){a&&gr(u,N,T);var L=i?E-I:C-I;return{placement:"bottom",maxHeight:L}}if(o==="auto"||i){var V=t,H=i?x:D;return H>=r&&(V=Math.min(H-I-l,t)),{placement:"top",maxHeight:V}}if(o==="bottom")return a&&mr(u,N),{placement:"bottom",maxHeight:t};break;case"top":if(x>=S)return{placement:"top",maxHeight:t};if(D>=S&&!i)return a&&gr(u,A,T),{placement:"top",maxHeight:t};if(!i&&D>=r||i&&x>=r){var re=t;return(!i&&D>=r||i&&x>=r)&&(re=i?x-F:D-F),a&&gr(u,A,T),{placement:"top",maxHeight:re}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return c}function ih(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var Hi=function(t){return t==="auto"?"bottom":t},sh=function(t,n){var r,o=t.placement,a=t.theme,i=a.borderRadius,l=a.spacing,u=a.colors;return ee((r={label:"menu"},jn(r,ih(o),"100%"),jn(r,"position","absolute"),jn(r,"width","100%"),jn(r,"zIndex",1),r),n?{}:{backgroundColor:u.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:l.menuGutter,marginTop:l.menuGutter})},Ui=(0,g.createContext)(null),lh=function(t){var n=t.children,r=t.minMenuHeight,o=t.maxMenuHeight,a=t.menuPlacement,i=t.menuPosition,l=t.menuShouldScrollIntoView,u=t.theme,c=(0,g.useContext)(Ui)||{},d=c.setPortalPlacement,f=(0,g.useRef)(null),m=(0,g.useState)(o),p=Bt(m,2),S=p[0],_=p[1],y=(0,g.useState)(null),w=Bt(y,2),k=w[0],j=w[1],I=u.spacing.controlHeight;return bo(function(){var F=f.current;if(F){var x=i==="fixed",E=l&&!x,D=ah({maxHeight:o,menuEl:F,minHeight:r,placement:a,shouldScroll:E,isFixedPosition:x,controlHeight:I});_(D.maxHeight),j(D.placement),d?.(D.placement)}},[o,a,i,l,r,d,I]),n({ref:f,placerProps:ee(ee({},t),{},{placement:k||Hi(a),maxHeight:S})})},uh=function(t){var n=t.children,r=t.innerRef,o=t.innerProps;return Q("div",ne({},Re(t,"menu",{menu:!0}),{ref:r},o),n)},ch=uh,dh=function(t,n){var r=t.maxHeight,o=t.theme.spacing.baseUnit;return ee({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:o,paddingTop:o})},hh=function(t){var n=t.children,r=t.innerProps,o=t.innerRef,a=t.isMulti;return Q("div",ne({},Re(t,"menuList",{"menu-list":!0,"menu-list--is-multi":a}),{ref:o},r),n)},Wi=function(t,n){var r=t.theme,o=r.spacing.baseUnit,a=r.colors;return ee({textAlign:"center"},n?{}:{color:a.neutral40,padding:"".concat(o*2,"px ").concat(o*3,"px")})},ph=Wi,fh=Wi,mh=function(t){var n=t.children,r=n===void 0?"No options":n,o=t.innerProps,a=Vt(t,rh);return Q("div",ne({},Re(ee(ee({},a),{},{children:r,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),r)},gh=function(t){var n=t.children,r=n===void 0?"Loading...":n,o=t.innerProps,a=Vt(t,oh);return Q("div",ne({},Re(ee(ee({},a),{},{children:r,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),r)},wh=function(t){var n=t.rect,r=t.offset,o=t.position;return{left:n.left,position:o,top:r,width:n.width,zIndex:1}},xh=function(t){var n=t.appendTo,r=t.children,o=t.controlElement,a=t.innerProps,i=t.menuPlacement,l=t.menuPosition,u=(0,g.useRef)(null),c=(0,g.useRef)(null),d=(0,g.useState)(Hi(i)),f=Bt(d,2),m=f[0],p=f[1],S=(0,g.useMemo)(function(){return{setPortalPlacement:p}},[]),_=(0,g.useState)(null),y=Bt(_,2),w=y[0],k=y[1],j=(0,g.useCallback)(function(){if(o){var E=Xd(o),D=l==="fixed"?0:window.pageYOffset,C=E[m]+D;(C!==w?.offset||E.left!==w?.rect.left||E.width!==w?.rect.width)&&k({offset:C,rect:E})}},[o,l,m,w?.offset,w?.rect.left,w?.rect.width]);bo(function(){j()},[j]);var I=(0,g.useCallback)(function(){typeof c.current=="function"&&(c.current(),c.current=null),o&&u.current&&(c.current=Hd(o,u.current,j,{elementResize:"ResizeObserver"in window}))},[o,j]);bo(function(){I()},[I]);var F=(0,g.useCallback)(function(E){u.current=E,I()},[I]);if(!n&&l!=="fixed"||!w)return null;var x=Q("div",ne({ref:F},Re(ee(ee({},t),{},{offset:w.offset,position:l,rect:w.rect}),"menuPortal",{"menu-portal":!0}),a),r);return Q(Ui.Provider,{value:S},n?(0,ce.createPortal)(x,n):x)},yh=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},vh=function(t){var n=t.children,r=t.innerProps,o=t.isDisabled,a=t.isRtl;return Q("div",ne({},Re(t,"container",{"--is-disabled":o,"--is-rtl":a}),r),n)},bh=function(t,n){var r=t.theme.spacing,o=t.isMulti,a=t.hasValue,i=t.selectProps.controlShouldRenderValue;return ee({alignItems:"center",display:o&&a&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},_h=function(t){var n=t.children,r=t.innerProps,o=t.isMulti,a=t.hasValue;return Q("div",ne({},Re(t,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":a}),r),n)},kh=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},Sh=function(t){var n=t.children,r=t.innerProps;return Q("div",ne({},Re(t,"indicatorsContainer",{indicators:!0}),r),n)},qi,jh=["size"],Eh=["innerProps","isRtl","size"];function o1(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var Ch={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Gi=function(t){var n=t.size,r=Vt(t,jh);return Q("svg",ne({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Ch},r))},_o=function(t){return Q(Gi,ne({size:20},t),Q("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Yi=function(t){return Q(Gi,ne({size:20},t),Q("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Ki=function(t,n){var r=t.isFocused,o=t.theme,a=o.spacing.baseUnit,i=o.colors;return ee({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?i.neutral60:i.neutral20,padding:a*2,":hover":{color:r?i.neutral80:i.neutral40}})},Ah=Ki,Oh=function(t){var n=t.children,r=t.innerProps;return Q("div",ne({},Re(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||Q(Yi,null))},Nh=Ki,Ih=function(t){var n=t.children,r=t.innerProps;return Q("div",ne({},Re(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||Q(_o,null))},Fh=function(t,n){var r=t.isDisabled,o=t.theme,a=o.spacing.baseUnit,i=o.colors;return ee({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?i.neutral10:i.neutral20,marginBottom:a*2,marginTop:a*2})},Ph=function(t){var n=t.innerProps;return Q("span",ne({},n,Re(t,"indicatorSeparator",{"indicator-separator":!0})))},Dh=ad(qi||(qi=id([`
  0%, 80%, 100% { opacity: 0; }
  40% { opacity: 1; }
`]))),Th=function(t,n){var r=t.isFocused,o=t.size,a=t.theme,i=a.colors,l=a.spacing.baseUnit;return ee({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:o,lineHeight:1,marginRight:o,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?i.neutral60:i.neutral20,padding:l*2})},ko=function(t){var n=t.delay,r=t.offset;return Q("span",{css:po({animation:"".concat(Dh," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},Mh=function(t){var n=t.innerProps,r=t.isRtl,o=t.size,a=o===void 0?4:o,i=Vt(t,Eh);return Q("div",ne({},Re(ee(ee({},i),{},{innerProps:n,isRtl:r,size:a}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),Q(ko,{delay:0,offset:r}),Q(ko,{delay:160,offset:!0}),Q(ko,{delay:320,offset:!r}))},Rh=function(t,n){var r=t.isDisabled,o=t.isFocused,a=t.theme,i=a.colors,l=a.borderRadius,u=a.spacing;return ee({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:u.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?i.neutral5:i.neutral0,borderColor:r?i.neutral10:o?i.primary:i.neutral20,borderRadius:l,borderStyle:"solid",borderWidth:1,boxShadow:o?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:o?i.primary:i.neutral30}})},Lh=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,a=t.innerRef,i=t.innerProps,l=t.menuIsOpen;return Q("div",ne({ref:a},Re(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":o,"control--menu-is-open":l}),i,{"aria-disabled":r||void 0}),n)},zh=Lh,Bh=["data"],Vh=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},$h=function(t){var n=t.children,r=t.cx,o=t.getStyles,a=t.getClassNames,i=t.Heading,l=t.headingProps,u=t.innerProps,c=t.label,d=t.theme,f=t.selectProps;return Q("div",ne({},Re(t,"group",{group:!0}),u),Q(i,ne({},l,{selectProps:f,theme:d,getStyles:o,getClassNames:a,cx:r}),c),Q("div",null,n))},Hh=function(t,n){var r=t.theme,o=r.colors,a=r.spacing;return ee({label:"group",cursor:"default",display:"block"},n?{}:{color:o.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:a.baseUnit*3,paddingRight:a.baseUnit*3,textTransform:"uppercase"})},Uh=function(t){var n=Li(t);n.data;var r=Vt(n,Bh);return Q("div",ne({},Re(t,"groupHeading",{"group-heading":!0}),r))},Wh=$h,qh=["innerRef","isDisabled","isHidden","inputClassName"],Gh=function(t,n){var r=t.isDisabled,o=t.value,a=t.theme,i=a.spacing,l=a.colors;return ee(ee({visibility:r?"hidden":"visible",transform:o?"translateZ(0)":""},Yh),n?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:l.neutral80})},Xi={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},Yh={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":ee({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Xi)},Kh=function(t){return ee({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},Xi)},Xh=function(t){var n=t.cx,r=t.value,o=Li(t),a=o.innerRef,i=o.isDisabled,l=o.isHidden,u=o.inputClassName,c=Vt(o,qh);return Q("div",ne({},Re(t,"input",{"input-container":!0}),{"data-value":r||""}),Q("input",ne({className:n({input:!0},u),ref:a,style:Kh(l),disabled:i},c)))},Qh=Xh,Zh=function(t,n){var r=t.theme,o=r.spacing,a=r.borderRadius,i=r.colors;return ee({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:i.neutral10,borderRadius:a/2,margin:o.baseUnit/2})},Jh=function(t,n){var r=t.theme,o=r.borderRadius,a=r.colors,i=t.cropWithEllipsis;return ee({overflow:"hidden",textOverflow:i||i===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:o/2,color:a.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},ep=function(t,n){var r=t.theme,o=r.spacing,a=r.borderRadius,i=r.colors,l=t.isFocused;return ee({alignItems:"center",display:"flex"},n?{}:{borderRadius:a/2,backgroundColor:l?i.dangerLight:void 0,paddingLeft:o.baseUnit,paddingRight:o.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},Qi=function(t){var n=t.children,r=t.innerProps;return Q("div",r,n)},tp=Qi,np=Qi;function rp(e){var t=e.children,n=e.innerProps;return Q("div",ne({role:"button"},n),t||Q(_o,{size:14}))}var op=function(t){var n=t.children,r=t.components,o=t.data,a=t.innerProps,i=t.isDisabled,l=t.removeProps,u=t.selectProps,c=r.Container,d=r.Label,f=r.Remove;return Q(c,{data:o,innerProps:ee(ee({},Re(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),a),selectProps:u},Q(d,{data:o,innerProps:ee({},Re(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:u},n),Q(f,{data:o,innerProps:ee(ee({},Re(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},l),selectProps:u}))},ap=op,ip=function(t,n){var r=t.isDisabled,o=t.isFocused,a=t.isSelected,i=t.theme,l=i.spacing,u=i.colors;return ee({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:a?u.primary:o?u.primary25:"transparent",color:r?u.neutral20:a?u.neutral0:"inherit",padding:"".concat(l.baseUnit*2,"px ").concat(l.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:a?u.primary:u.primary50}})},sp=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,a=t.isSelected,i=t.innerRef,l=t.innerProps;return Q("div",ne({},Re(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":o,"option--is-selected":a}),{ref:i,"aria-disabled":r},l),n)},lp=sp,up=function(t,n){var r=t.theme,o=r.spacing,a=r.colors;return ee({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:a.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},cp=function(t){var n=t.children,r=t.innerProps;return Q("div",ne({},Re(t,"placeholder",{placeholder:!0}),r),n)},dp=cp,hp=function(t,n){var r=t.isDisabled,o=t.theme,a=o.spacing,i=o.colors;return ee({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?i.neutral40:i.neutral80,marginLeft:a.baseUnit/2,marginRight:a.baseUnit/2})},pp=function(t){var n=t.children,r=t.isDisabled,o=t.innerProps;return Q("div",ne({},Re(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),o),n)},fp=pp,mp={ClearIndicator:Ih,Control:zh,DropdownIndicator:Oh,DownChevron:Yi,CrossIcon:_o,Group:Wh,GroupHeading:Uh,IndicatorsContainer:Sh,IndicatorSeparator:Ph,Input:Qh,LoadingIndicator:Mh,Menu:ch,MenuList:hh,MenuPortal:xh,LoadingMessage:gh,NoOptionsMessage:mh,MultiValue:ap,MultiValueContainer:tp,MultiValueLabel:np,MultiValueRemove:rp,Option:lp,Placeholder:dp,SelectContainer:vh,SingleValue:fp,ValueContainer:_h},gp=function(t){return ee(ee({},mp),t.components)},Zi=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function wp(e,t){return!!(e===t||Zi(e)&&Zi(t))}function xp(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!wp(e[n],t[n]))return!1;return!0}function yp(e,t){t===void 0&&(t=xp);var n=null;function r(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];if(n&&n.lastThis===this&&t(o,n.lastArgs))return n.lastResult;var i=e.apply(this,o);return n={lastResult:i,lastArgs:o,lastThis:this},i}return r.clear=function(){n=null},r}function a1(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}for(var vp={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},bp=function(t){return Q("span",ne({css:vp},t))},Ji=bp,_p={guidance:function(t){var n=t.isSearchable,r=t.isMulti,o=t.tabSelectsValue,a=t.context,i=t.isInitialFocus;switch(a){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,o=r===void 0?"":r,a=t.labels,i=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(o,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(a.length>1?"s":""," ").concat(a.join(","),", selected.");case"select-option":return i?"option ".concat(o," is disabled. Select another option."):"option ".concat(o,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,o=t.options,a=t.label,i=a===void 0?"":a,l=t.selectValue,u=t.isDisabled,c=t.isSelected,d=t.isAppleDevice,f=function(_,y){return _&&_.length?"".concat(_.indexOf(y)+1," of ").concat(_.length):""};if(n==="value"&&l)return"value ".concat(i," focused, ").concat(f(l,r),".");if(n==="menu"&&d){var m=u?" disabled":"",p="".concat(c?" selected":"").concat(m);return"".concat(i).concat(p,", ").concat(f(o,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},kp=function(t){var n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,a=t.focusableOptions,i=t.isFocused,l=t.selectValue,u=t.selectProps,c=t.id,d=t.isAppleDevice,f=u.ariaLiveMessages,m=u.getOptionLabel,p=u.inputValue,S=u.isMulti,_=u.isOptionDisabled,y=u.isSearchable,w=u.menuIsOpen,k=u.options,j=u.screenReaderStatus,I=u.tabSelectsValue,F=u.isLoading,x=u["aria-label"],E=u["aria-live"],D=(0,g.useMemo)(function(){return ee(ee({},_p),f||{})},[f]),C=(0,g.useMemo)(function(){var H="";if(n&&D.onChange){var re=n.option,ge=n.options,Ee=n.removedValue,ze=n.removedValues,b=n.value,We=function(we){return Array.isArray(we)?null:we},me=Ee||re||We(b),v=me?m(me):"",Ce=ge||ze||void 0,qe=Ce?Ce.map(m):[],Ue=ee({isDisabled:me&&_(me,l),label:v,labels:qe},n);H=D.onChange(Ue)}return H},[n,D,_,l,m]),N=(0,g.useMemo)(function(){var H="",re=r||o,ge=!!(r&&l&&l.includes(r));if(re&&D.onFocus){var Ee={focused:re,label:m(re),isDisabled:_(re,l),isSelected:ge,options:a,context:re===r?"menu":"value",selectValue:l,isAppleDevice:d};H=D.onFocus(Ee)}return H},[r,o,m,_,D,a,l,d]),A=(0,g.useMemo)(function(){var H="";if(w&&k.length&&!F&&D.onFilter){var re=j({count:a.length});H=D.onFilter({inputValue:p,resultsMessage:re})}return H},[a,p,w,D,k,j,F]),T=n?.action==="initial-input-focus",L=(0,g.useMemo)(function(){var H="";if(D.guidance){var re=o?"value":w?"menu":"input";H=D.guidance({"aria-label":x,context:re,isDisabled:r&&_(r,l),isMulti:S,isSearchable:y,tabSelectsValue:I,isInitialFocus:T})}return H},[x,r,o,S,_,y,w,D,l,I,T]),V=Q(g.Fragment,null,Q("span",{id:"aria-selection"},C),Q("span",{id:"aria-focused"},N),Q("span",{id:"aria-results"},A),Q("span",{id:"aria-guidance"},L));return Q(g.Fragment,null,Q(Ji,{id:c},T&&V),Q(Ji,{"aria-live":E,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!T&&V))},Sp=kp,So=[{base:"A",letters:"A\u24B6\uFF21\xC0\xC1\xC2\u1EA6\u1EA4\u1EAA\u1EA8\xC3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\xC4\u01DE\u1EA2\xC5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F"},{base:"AA",letters:"\uA732"},{base:"AE",letters:"\xC6\u01FC\u01E2"},{base:"AO",letters:"\uA734"},{base:"AU",letters:"\uA736"},{base:"AV",letters:"\uA738\uA73A"},{base:"AY",letters:"\uA73C"},{base:"B",letters:"B\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181"},{base:"C",letters:"C\u24B8\uFF23\u0106\u0108\u010A\u010C\xC7\u1E08\u0187\u023B\uA73E"},{base:"D",letters:"D\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779"},{base:"DZ",letters:"\u01F1\u01C4"},{base:"Dz",letters:"\u01F2\u01C5"},{base:"E",letters:"E\u24BA\uFF25\xC8\xC9\xCA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\xCB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E"},{base:"F",letters:"F\u24BB\uFF26\u1E1E\u0191\uA77B"},{base:"G",letters:"G\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E"},{base:"H",letters:"H\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D"},{base:"I",letters:"I\u24BE\uFF29\xCC\xCD\xCE\u0128\u012A\u012C\u0130\xCF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197"},{base:"J",letters:"J\u24BF\uFF2A\u0134\u0248"},{base:"K",letters:"K\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2"},{base:"L",letters:"L\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780"},{base:"LJ",letters:"\u01C7"},{base:"Lj",letters:"\u01C8"},{base:"M",letters:"M\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C"},{base:"N",letters:"N\u24C3\uFF2E\u01F8\u0143\xD1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4"},{base:"NJ",letters:"\u01CA"},{base:"Nj",letters:"\u01CB"},{base:"O",letters:"O\u24C4\uFF2F\xD2\xD3\xD4\u1ED2\u1ED0\u1ED6\u1ED4\xD5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\xD6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\xD8\u01FE\u0186\u019F\uA74A\uA74C"},{base:"OI",letters:"\u01A2"},{base:"OO",letters:"\uA74E"},{base:"OU",letters:"\u0222"},{base:"P",letters:"P\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754"},{base:"Q",letters:"Q\u24C6\uFF31\uA756\uA758\u024A"},{base:"R",letters:"R\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782"},{base:"S",letters:"S\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784"},{base:"T",letters:"T\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786"},{base:"TZ",letters:"\uA728"},{base:"U",letters:"U\u24CA\uFF35\xD9\xDA\xDB\u0168\u1E78\u016A\u1E7A\u016C\xDC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244"},{base:"V",letters:"V\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245"},{base:"VY",letters:"\uA760"},{base:"W",letters:"W\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72"},{base:"X",letters:"X\u24CD\uFF38\u1E8A\u1E8C"},{base:"Y",letters:"Y\u24CE\uFF39\u1EF2\xDD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE"},{base:"Z",letters:"Z\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762"},{base:"a",letters:"a\u24D0\uFF41\u1E9A\xE0\xE1\xE2\u1EA7\u1EA5\u1EAB\u1EA9\xE3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\xE4\u01DF\u1EA3\xE5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250"},{base:"aa",letters:"\uA733"},{base:"ae",letters:"\xE6\u01FD\u01E3"},{base:"ao",letters:"\uA735"},{base:"au",letters:"\uA737"},{base:"av",letters:"\uA739\uA73B"},{base:"ay",letters:"\uA73D"},{base:"b",letters:"b\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253"},{base:"c",letters:"c\u24D2\uFF43\u0107\u0109\u010B\u010D\xE7\u1E09\u0188\u023C\uA73F\u2184"},{base:"d",letters:"d\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A"},{base:"dz",letters:"\u01F3\u01C6"},{base:"e",letters:"e\u24D4\uFF45\xE8\xE9\xEA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\xEB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD"},{base:"f",letters:"f\u24D5\uFF46\u1E1F\u0192\uA77C"},{base:"g",letters:"g\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F"},{base:"h",letters:"h\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265"},{base:"hv",letters:"\u0195"},{base:"i",letters:"i\u24D8\uFF49\xEC\xED\xEE\u0129\u012B\u012D\xEF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131"},{base:"j",letters:"j\u24D9\uFF4A\u0135\u01F0\u0249"},{base:"k",letters:"k\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3"},{base:"l",letters:"l\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747"},{base:"lj",letters:"\u01C9"},{base:"m",letters:"m\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F"},{base:"n",letters:"n\u24DD\uFF4E\u01F9\u0144\xF1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5"},{base:"nj",letters:"\u01CC"},{base:"o",letters:"o\u24DE\uFF4F\xF2\xF3\xF4\u1ED3\u1ED1\u1ED7\u1ED5\xF5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\xF6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\xF8\u01FF\u0254\uA74B\uA74D\u0275"},{base:"oi",letters:"\u01A3"},{base:"ou",letters:"\u0223"},{base:"oo",letters:"\uA74F"},{base:"p",letters:"p\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755"},{base:"q",letters:"q\u24E0\uFF51\u024B\uA757\uA759"},{base:"r",letters:"r\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783"},{base:"s",letters:"s\u24E2\uFF53\xDF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B"},{base:"t",letters:"t\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787"},{base:"tz",letters:"\uA729"},{base:"u",letters:"u\u24E4\uFF55\xF9\xFA\xFB\u0169\u1E79\u016B\u1E7B\u016D\xFC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289"},{base:"v",letters:"v\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C"},{base:"vy",letters:"\uA761"},{base:"w",letters:"w\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73"},{base:"x",letters:"x\u24E7\uFF58\u1E8B\u1E8D"},{base:"y",letters:"y\u24E8\uFF59\u1EF3\xFD\u0177\u1EF9\u0233\u1E8F\xFF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF"},{base:"z",letters:"z\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763"}],jp=new RegExp("["+So.map(function(e){return e.letters}).join("")+"]","g"),es={},jo=0;jo<So.length;jo++)for(var Eo=So[jo],Co=0;Co<Eo.letters.length;Co++)es[Eo.letters[Co]]=Eo.base;var ts=function(t){return t.replace(jp,function(n){return es[n]})},Ep=yp(ts),ns=function(t){return t.replace(/^\s+|\s+$/g,"")},Cp=function(t){return"".concat(t.label," ").concat(t.value)},Ap=function(t){return function(n,r){if(n.data.__isNew__)return!0;var o=ee({ignoreCase:!0,ignoreAccents:!0,stringify:Cp,trim:!0,matchFrom:"any"},t),a=o.ignoreCase,i=o.ignoreAccents,l=o.stringify,u=o.trim,c=o.matchFrom,d=u?ns(r):r,f=u?ns(l(n)):l(n);return a&&(d=d.toLowerCase(),f=f.toLowerCase()),i&&(d=Ep(d),f=ts(f)),c==="start"?f.substr(0,d.length)===d:f.indexOf(d)>-1}},Op=["innerRef"];function Np(e){var t=e.innerRef,n=Vt(e,Op),r=nh(n,"onExited","in","enter","exit","appear");return Q("input",ne({ref:t},r,{css:po({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var Ip=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function Fp(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,a=e.onTopLeave,i=(0,g.useRef)(!1),l=(0,g.useRef)(!1),u=(0,g.useRef)(0),c=(0,g.useRef)(null),d=(0,g.useCallback)(function(y,w){if(c.current!==null){var k=c.current,j=k.scrollTop,I=k.scrollHeight,F=k.clientHeight,x=c.current,E=w>0,D=I-F-j,C=!1;D>w&&i.current&&(r&&r(y),i.current=!1),E&&l.current&&(a&&a(y),l.current=!1),E&&w>D?(n&&!i.current&&n(y),x.scrollTop=I,C=!0,i.current=!0):!E&&-w>j&&(o&&!l.current&&o(y),x.scrollTop=0,C=!0,l.current=!0),C&&Ip(y)}},[n,r,o,a]),f=(0,g.useCallback)(function(y){d(y,y.deltaY)},[d]),m=(0,g.useCallback)(function(y){u.current=y.changedTouches[0].clientY},[]),p=(0,g.useCallback)(function(y){var w=u.current-y.changedTouches[0].clientY;d(y,w)},[d]),S=(0,g.useCallback)(function(y){if(y){var w=Jd?{passive:!1}:!1;y.addEventListener("wheel",f,w),y.addEventListener("touchstart",m,w),y.addEventListener("touchmove",p,w)}},[p,m,f]),_=(0,g.useCallback)(function(y){y&&(y.removeEventListener("wheel",f,!1),y.removeEventListener("touchstart",m,!1),y.removeEventListener("touchmove",p,!1))},[p,m,f]);return(0,g.useEffect)(function(){if(t){var y=c.current;return S(y),function(){_(y)}}},[t,S,_]),function(y){c.current=y}}var rs=["boxSizing","height","overflow","paddingRight","position"],os={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function as(e){e.cancelable&&e.preventDefault()}function is(e){e.stopPropagation()}function ss(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function ls(){return"ontouchstart"in window||navigator.maxTouchPoints}var us=!!(typeof window<"u"&&window.document&&window.document.createElement),Dn=0,wn={capture:!1,passive:!1};function Pp(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,o=(0,g.useRef)({}),a=(0,g.useRef)(null),i=(0,g.useCallback)(function(u){if(us){var c=document.body,d=c&&c.style;if(r&&rs.forEach(function(S){var _=d&&d[S];o.current[S]=_}),r&&Dn<1){var f=parseInt(o.current.paddingRight,10)||0,m=document.body?document.body.clientWidth:0,p=window.innerWidth-m+f||0;Object.keys(os).forEach(function(S){var _=os[S];d&&(d[S]=_)}),d&&(d.paddingRight="".concat(p,"px"))}c&&ls()&&(c.addEventListener("touchmove",as,wn),u&&(u.addEventListener("touchstart",ss,wn),u.addEventListener("touchmove",is,wn))),Dn+=1}},[r]),l=(0,g.useCallback)(function(u){if(us){var c=document.body,d=c&&c.style;Dn=Math.max(Dn-1,0),r&&Dn<1&&rs.forEach(function(f){var m=o.current[f];d&&(d[f]=m)}),c&&ls()&&(c.removeEventListener("touchmove",as,wn),u&&(u.removeEventListener("touchstart",ss,wn),u.removeEventListener("touchmove",is,wn)))}},[r]);return(0,g.useEffect)(function(){if(t){var u=a.current;return i(u),function(){l(u)}}},[t,i,l]),function(u){a.current=u}}function i1(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var Dp=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},Tp={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Mp(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=r===void 0?!0:r,a=e.onBottomArrive,i=e.onBottomLeave,l=e.onTopArrive,u=e.onTopLeave,c=Fp({isEnabled:o,onBottomArrive:a,onBottomLeave:i,onTopArrive:l,onTopLeave:u}),d=Pp({isEnabled:n}),f=function(p){c(p),d(p)};return Q(g.Fragment,null,n&&Q("div",{onClick:Dp,css:Tp}),t(f))}function s1(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var Rp={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Lp=function(t){var n=t.name,r=t.onFocus;return Q("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:Rp,value:"",onChange:function(){}})},zp=Lp;function Ao(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function Bp(){return Ao(/^iPhone/i)}function cs(){return Ao(/^Mac/i)}function Vp(){return Ao(/^iPad/i)||cs()&&navigator.maxTouchPoints>1}function $p(){return Bp()||Vp()}function Hp(){return cs()||$p()}var Up=function(t){return t.label},Wp=function(t){return t.label},qp=function(t){return t.value},Gp=function(t){return!!t.isDisabled},Yp={clearIndicator:Nh,container:yh,control:Rh,dropdownIndicator:Ah,group:Vh,groupHeading:Hh,indicatorsContainer:kh,indicatorSeparator:Fh,input:Gh,loadingIndicator:Th,loadingMessage:fh,menu:sh,menuList:dh,menuPortal:wh,multiValue:Zh,multiValueLabel:Jh,multiValueRemove:ep,noOptionsMessage:ph,option:ip,placeholder:up,singleValue:hp,valueContainer:bh};function l1(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=_objectSpread({},e);return Object.keys(t).forEach(function(r){var o=r;e[o]?n[o]=function(a,i){return t[o](e[o](a,i),i)}:n[o]=t[o]}),n}var Kp={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},Xp=4,ds=4,Qp=38,Zp=ds*2,Jp={baseUnit:ds,controlHeight:Qp,menuGutter:Zp},Oo={borderRadius:Xp,colors:Kp,spacing:Jp},ef={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Vi(),captureMenuScroll:!Vi(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:Ap(),formatGroupLabel:Up,getOptionLabel:Wp,getOptionValue:qp,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:Gp,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!Qd(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function hs(e,t,n,r){var o=ws(e,t,n),a=xs(e,t,n),i=gs(e,t),l=vr(e,t);return{type:"option",data:t,isDisabled:o,isSelected:a,label:i,value:l,index:r}}function yr(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(i,l){return hs(e,i,t,l)}).filter(function(i){return ms(e,i)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var a=hs(e,n,t,r);return ms(e,a)?a:void 0}).filter(eh)}function ps(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,eo(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function fs(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,eo(r.options.map(function(o){return{data:o.data,id:"".concat(t,"-").concat(r.index,"-").concat(o.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function tf(e,t){return ps(yr(e,t))}function ms(e,t){var n=e.inputValue,r=n===void 0?"":n,o=t.data,a=t.isSelected,i=t.label,l=t.value;return(!vs(e)||!a)&&ys(e,{label:i,value:l,data:o},r)}function nf(e,t){var n=e.focusedValue,r=e.selectValue,o=r.indexOf(n);if(o>-1){var a=t.indexOf(n);if(a>-1)return n;if(o<t.length)return t[o]}return null}function rf(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var No=function(t,n){var r,o=(r=t.find(function(a){return a.data===n}))===null||r===void 0?void 0:r.id;return o||null},gs=function(t,n){return t.getOptionLabel(n)},vr=function(t,n){return t.getOptionValue(n)};function ws(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function xs(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=vr(e,t);return n.some(function(o){return vr(e,o)===r})}function ys(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var vs=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},of=1,bs=(function(e){nc(n,e);var t=ac(n);function n(r){var o;if(ec(this,n),o=t.call(this,r),o.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:"",isAppleDevice:!1},o.blockOptionHover=!1,o.isComposing=!1,o.commonProps=void 0,o.initialTouchX=0,o.initialTouchY=0,o.openAfterFocus=!1,o.scrollToFocusedOptionOnUpdate=!1,o.userIsDragging=void 0,o.controlRef=null,o.getControlRef=function(u){o.controlRef=u},o.focusedOptionRef=null,o.getFocusedOptionRef=function(u){o.focusedOptionRef=u},o.menuListRef=null,o.getMenuListRef=function(u){o.menuListRef=u},o.inputRef=null,o.getInputRef=function(u){o.inputRef=u},o.focus=o.focusInput,o.blur=o.blurInput,o.onChange=function(u,c){var d=o.props,f=d.onChange,m=d.name;c.name=m,o.ariaOnChange(u,c),f(u,c)},o.setValue=function(u,c,d){var f=o.props,m=f.closeMenuOnSelect,p=f.isMulti,S=f.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:S}),m&&(o.setState({inputIsHiddenAfterUpdate:!p}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(u,{action:c,option:d})},o.selectOption=function(u){var c=o.props,d=c.blurInputOnSelect,f=c.isMulti,m=c.name,p=o.state.selectValue,S=f&&o.isOptionSelected(u,p),_=o.isOptionDisabled(u,p);if(S){var y=o.getOptionValue(u);o.setValue(p.filter(function(w){return o.getOptionValue(w)!==y}),"deselect-option",u)}else if(!_)f?o.setValue([].concat(eo(p),[u]),"select-option",u):o.setValue(u,"select-option");else{o.ariaOnChange(u,{action:"select-option",option:u,name:m});return}d&&o.blurInput()},o.removeValue=function(u){var c=o.props.isMulti,d=o.state.selectValue,f=o.getOptionValue(u),m=d.filter(function(S){return o.getOptionValue(S)!==f}),p=xr(c,m,m[0]||null);o.onChange(p,{action:"remove-value",removedValue:u}),o.focusInput()},o.clearValue=function(){var u=o.state.selectValue;o.onChange(xr(o.props.isMulti,[],null),{action:"clear",removedValues:u})},o.popValue=function(){var u=o.props.isMulti,c=o.state.selectValue,d=c[c.length-1],f=c.slice(0,c.length-1),m=xr(u,f,f[0]||null);d&&o.onChange(m,{action:"pop-value",removedValue:d})},o.getFocusedOptionId=function(u){return No(o.state.focusableOptionsWithIds,u)},o.getFocusableOptionsWithIds=function(){return fs(yr(o.props,o.state.selectValue),o.getElementId("option"))},o.getValue=function(){return o.state.selectValue},o.cx=function(){for(var u=arguments.length,c=new Array(u),d=0;d<u;d++)c[d]=arguments[d];return qd.apply(void 0,[o.props.classNamePrefix].concat(c))},o.getOptionLabel=function(u){return gs(o.props,u)},o.getOptionValue=function(u){return vr(o.props,u)},o.getStyles=function(u,c){var d=o.props.unstyled,f=Yp[u](c,d);f.boxSizing="border-box";var m=o.props.styles[u];return m?m(f,c):f},o.getClassNames=function(u,c){var d,f;return(d=(f=o.props.classNames)[u])===null||d===void 0?void 0:d.call(f,c)},o.getElementId=function(u){return"".concat(o.state.instancePrefix,"-").concat(u)},o.getComponents=function(){return gp(o.props)},o.buildCategorizedOptions=function(){return yr(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return ps(o.buildCategorizedOptions())},o.getFocusableOptions=function(){return o.props.menuIsOpen?o.buildFocusableOptions():[]},o.ariaOnChange=function(u,c){o.setState({ariaSelection:ee({value:u},c)})},o.onMenuMouseDown=function(u){u.button===0&&(u.stopPropagation(),u.preventDefault(),o.focusInput())},o.onMenuMouseMove=function(u){o.blockOptionHover=!1},o.onControlMouseDown=function(u){if(!u.defaultPrevented){var c=o.props.openMenuOnClick;o.state.isFocused?o.props.menuIsOpen?u.target.tagName!=="INPUT"&&u.target.tagName!=="TEXTAREA"&&o.onMenuClose():c&&o.openMenu("first"):(c&&(o.openAfterFocus=!0),o.focusInput()),u.target.tagName!=="INPUT"&&u.target.tagName!=="TEXTAREA"&&u.preventDefault()}},o.onDropdownIndicatorMouseDown=function(u){if(!(u&&u.type==="mousedown"&&u.button!==0)&&!o.props.isDisabled){var c=o.props,d=c.isMulti,f=c.menuIsOpen;o.focusInput(),f?(o.setState({inputIsHiddenAfterUpdate:!d}),o.onMenuClose()):o.openMenu("first"),u.preventDefault()}},o.onClearIndicatorMouseDown=function(u){u&&u.type==="mousedown"&&u.button!==0||(o.clearValue(),u.preventDefault(),o.openAfterFocus=!1,u.type==="touchend"?o.focusInput():setTimeout(function(){return o.focusInput()}))},o.onScroll=function(u){typeof o.props.closeMenuOnScroll=="boolean"?u.target instanceof HTMLElement&&fr(u.target)&&o.props.onMenuClose():typeof o.props.closeMenuOnScroll=="function"&&o.props.closeMenuOnScroll(u)&&o.props.onMenuClose()},o.onCompositionStart=function(){o.isComposing=!0},o.onCompositionEnd=function(){o.isComposing=!1},o.onTouchStart=function(u){var c=u.touches,d=c&&c.item(0);d&&(o.initialTouchX=d.clientX,o.initialTouchY=d.clientY,o.userIsDragging=!1)},o.onTouchMove=function(u){var c=u.touches,d=c&&c.item(0);if(d){var f=Math.abs(d.clientX-o.initialTouchX),m=Math.abs(d.clientY-o.initialTouchY),p=5;o.userIsDragging=f>p||m>p}},o.onTouchEnd=function(u){o.userIsDragging||(o.controlRef&&!o.controlRef.contains(u.target)&&o.menuListRef&&!o.menuListRef.contains(u.target)&&o.blurInput(),o.initialTouchX=0,o.initialTouchY=0)},o.onControlTouchEnd=function(u){o.userIsDragging||o.onControlMouseDown(u)},o.onClearIndicatorTouchEnd=function(u){o.userIsDragging||o.onClearIndicatorMouseDown(u)},o.onDropdownIndicatorTouchEnd=function(u){o.userIsDragging||o.onDropdownIndicatorMouseDown(u)},o.handleInputChange=function(u){var c=o.props.inputValue,d=u.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(d,{action:"input-change",prevInputValue:c}),o.props.menuIsOpen||o.onMenuOpen()},o.onInputFocus=function(u){o.props.onFocus&&o.props.onFocus(u),o.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(o.openAfterFocus||o.props.openMenuOnFocus)&&o.openMenu("first"),o.openAfterFocus=!1},o.onInputBlur=function(u){var c=o.props.inputValue;if(o.menuListRef&&o.menuListRef.contains(document.activeElement)){o.inputRef.focus();return}o.props.onBlur&&o.props.onBlur(u),o.onInputChange("",{action:"input-blur",prevInputValue:c}),o.onMenuClose(),o.setState({focusedValue:null,isFocused:!1})},o.onOptionHover=function(u){if(!(o.blockOptionHover||o.state.focusedOption===u)){var c=o.getFocusableOptions(),d=c.indexOf(u);o.setState({focusedOption:u,focusedOptionId:d>-1?o.getFocusedOptionId(u):null})}},o.shouldHideSelectedOptions=function(){return vs(o.props)},o.onValueInputFocus=function(u){u.preventDefault(),u.stopPropagation(),o.focus()},o.onKeyDown=function(u){var c=o.props,d=c.isMulti,f=c.backspaceRemovesValue,m=c.escapeClearsValue,p=c.inputValue,S=c.isClearable,_=c.isDisabled,y=c.menuIsOpen,w=c.onKeyDown,k=c.tabSelectsValue,j=c.openMenuOnFocus,I=o.state,F=I.focusedOption,x=I.focusedValue,E=I.selectValue;if(!_&&!(typeof w=="function"&&(w(u),u.defaultPrevented))){switch(o.blockOptionHover=!0,u.key){case"ArrowLeft":if(!d||p)return;o.focusValue("previous");break;case"ArrowRight":if(!d||p)return;o.focusValue("next");break;case"Delete":case"Backspace":if(p)return;if(x)o.removeValue(x);else{if(!f)return;d?o.popValue():S&&o.clearValue()}break;case"Tab":if(o.isComposing||u.shiftKey||!y||!k||!F||j&&o.isOptionSelected(F,E))return;o.selectOption(F);break;case"Enter":if(u.keyCode===229)break;if(y){if(!F||o.isComposing)return;o.selectOption(F);break}return;case"Escape":y?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:p}),o.onMenuClose()):S&&m&&o.clearValue();break;case" ":if(p)return;if(!y){o.openMenu("first");break}if(!F)return;o.selectOption(F);break;case"ArrowUp":y?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":y?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!y)return;o.focusOption("pageup");break;case"PageDown":if(!y)return;o.focusOption("pagedown");break;case"Home":if(!y)return;o.focusOption("first");break;case"End":if(!y)return;o.focusOption("last");break;default:return}u.preventDefault()}},o.state.instancePrefix="react-select-"+(o.props.instanceId||++of),o.state.selectValue=Ri(r.value),r.menuIsOpen&&o.state.selectValue.length){var a=o.getFocusableOptionsWithIds(),i=o.buildFocusableOptions(),l=i.indexOf(o.state.selectValue[0]);o.state.focusableOptionsWithIds=a,o.state.focusedOption=i[l],o.state.focusedOptionId=No(a,i[l])}return o}return tc(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&Bi(this.menuListRef,this.focusedOptionRef),Hp()&&this.setState({isAppleDevice:!0})}},{key:"componentDidUpdate",value:function(o){var a=this.props,i=a.isDisabled,l=a.menuIsOpen,u=this.state.isFocused;(u&&!i&&o.isDisabled||u&&l&&!o.menuIsOpen)&&this.focusInput(),u&&i&&!o.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!u&&!i&&o.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Bi(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(o,a){this.props.onInputChange(o,a)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(o){var a=this,i=this.state,l=i.selectValue,u=i.isFocused,c=this.buildFocusableOptions(),d=o==="first"?0:c.length-1;if(!this.props.isMulti){var f=c.indexOf(l[0]);f>-1&&(d=f)}this.scrollToFocusedOptionOnUpdate=!(u&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:c[d],focusedOptionId:this.getFocusedOptionId(c[d])},function(){return a.onMenuOpen()})}},{key:"focusValue",value:function(o){var a=this.state,i=a.selectValue,l=a.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var u=i.indexOf(l);l||(u=-1);var c=i.length-1,d=-1;if(i.length){switch(o){case"previous":u===0?d=0:u===-1?d=c:d=u-1;break;case"next":u>-1&&u<c&&(d=u+1);break}this.setState({inputIsHidden:d!==-1,focusedValue:i[d]})}}}},{key:"focusOption",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",a=this.props.pageSize,i=this.state.focusedOption,l=this.getFocusableOptions();if(l.length){var u=0,c=l.indexOf(i);i||(c=-1),o==="up"?u=c>0?c-1:l.length-1:o==="down"?u=(c+1)%l.length:o==="pageup"?(u=c-a,u<0&&(u=0)):o==="pagedown"?(u=c+a,u>l.length-1&&(u=l.length-1)):o==="last"&&(u=l.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:l[u],focusedValue:null,focusedOptionId:this.getFocusedOptionId(l[u])})}}},{key:"getTheme",value:(function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Oo):ee(ee({},Oo),this.props.theme):Oo})},{key:"getCommonProps",value:function(){var o=this.clearValue,a=this.cx,i=this.getStyles,l=this.getClassNames,u=this.getValue,c=this.selectOption,d=this.setValue,f=this.props,m=f.isMulti,p=f.isRtl,S=f.options,_=this.hasValue();return{clearValue:o,cx:a,getStyles:i,getClassNames:l,getValue:u,hasValue:_,isMulti:m,isRtl:p,options:S,selectOption:c,selectProps:f,setValue:d,theme:this.getTheme()}}},{key:"hasValue",value:function(){var o=this.state.selectValue;return o.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var o=this.props,a=o.isClearable,i=o.isMulti;return a===void 0?i:a}},{key:"isOptionDisabled",value:function(o,a){return ws(this.props,o,a)}},{key:"isOptionSelected",value:function(o,a){return xs(this.props,o,a)}},{key:"filterOption",value:function(o,a){return ys(this.props,o,a)}},{key:"formatOptionLabel",value:function(o,a){if(typeof this.props.formatOptionLabel=="function"){var i=this.props.inputValue,l=this.state.selectValue;return this.props.formatOptionLabel(o,{context:a,inputValue:i,selectValue:l})}else return this.getOptionLabel(o)}},{key:"formatGroupLabel",value:function(o){return this.props.formatGroupLabel(o)}},{key:"startListeningComposition",value:(function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))})},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:(function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))})},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:(function(){var o=this.props,a=o.isDisabled,i=o.isSearchable,l=o.inputId,u=o.inputValue,c=o.tabIndex,d=o.form,f=o.menuIsOpen,m=o.required,p=this.getComponents(),S=p.Input,_=this.state,y=_.inputIsHidden,w=_.ariaSelection,k=this.commonProps,j=l||this.getElementId("input"),I=ee(ee(ee({"aria-autocomplete":"list","aria-expanded":f,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":m,role:"combobox","aria-activedescendant":this.state.isAppleDevice?void 0:this.state.focusedOptionId||""},f&&{"aria-controls":this.getElementId("listbox")}),!i&&{"aria-readonly":!0}),this.hasValue()?w?.action==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return i?g.createElement(S,ne({},k,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:j,innerRef:this.getInputRef,isDisabled:a,isHidden:y,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:c,form:d,type:"text",value:u},I)):g.createElement(Np,ne({id:j,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:pr,onFocus:this.onInputFocus,disabled:a,tabIndex:c,inputMode:"none",form:d,value:""},I))})},{key:"renderPlaceholderOrValue",value:function(){var o=this,a=this.getComponents(),i=a.MultiValue,l=a.MultiValueContainer,u=a.MultiValueLabel,c=a.MultiValueRemove,d=a.SingleValue,f=a.Placeholder,m=this.commonProps,p=this.props,S=p.controlShouldRenderValue,_=p.isDisabled,y=p.isMulti,w=p.inputValue,k=p.placeholder,j=this.state,I=j.selectValue,F=j.focusedValue,x=j.isFocused;if(!this.hasValue()||!S)return w?null:g.createElement(f,ne({},m,{key:"placeholder",isDisabled:_,isFocused:x,innerProps:{id:this.getElementId("placeholder")}}),k);if(y)return I.map(function(D,C){var N=D===F,A="".concat(o.getOptionLabel(D),"-").concat(o.getOptionValue(D));return g.createElement(i,ne({},m,{components:{Container:l,Label:u,Remove:c},isFocused:N,isDisabled:_,key:A,index:C,removeProps:{onClick:function(){return o.removeValue(D)},onTouchEnd:function(){return o.removeValue(D)},onMouseDown:function(L){L.preventDefault()}},data:D}),o.formatOptionLabel(D,"value"))});if(w)return null;var E=I[0];return g.createElement(d,ne({},m,{data:E,isDisabled:_}),this.formatOptionLabel(E,"value"))}},{key:"renderClearIndicator",value:function(){var o=this.getComponents(),a=o.ClearIndicator,i=this.commonProps,l=this.props,u=l.isDisabled,c=l.isLoading,d=this.state.isFocused;if(!this.isClearable()||!a||u||!this.hasValue()||c)return null;var f={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return g.createElement(a,ne({},i,{innerProps:f,isFocused:d}))}},{key:"renderLoadingIndicator",value:function(){var o=this.getComponents(),a=o.LoadingIndicator,i=this.commonProps,l=this.props,u=l.isDisabled,c=l.isLoading,d=this.state.isFocused;if(!a||!c)return null;var f={"aria-hidden":"true"};return g.createElement(a,ne({},i,{innerProps:f,isDisabled:u,isFocused:d}))}},{key:"renderIndicatorSeparator",value:function(){var o=this.getComponents(),a=o.DropdownIndicator,i=o.IndicatorSeparator;if(!a||!i)return null;var l=this.commonProps,u=this.props.isDisabled,c=this.state.isFocused;return g.createElement(i,ne({},l,{isDisabled:u,isFocused:c}))}},{key:"renderDropdownIndicator",value:function(){var o=this.getComponents(),a=o.DropdownIndicator;if(!a)return null;var i=this.commonProps,l=this.props.isDisabled,u=this.state.isFocused,c={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return g.createElement(a,ne({},i,{innerProps:c,isDisabled:l,isFocused:u}))}},{key:"renderMenu",value:function(){var o=this,a=this.getComponents(),i=a.Group,l=a.GroupHeading,u=a.Menu,c=a.MenuList,d=a.MenuPortal,f=a.LoadingMessage,m=a.NoOptionsMessage,p=a.Option,S=this.commonProps,_=this.state.focusedOption,y=this.props,w=y.captureMenuScroll,k=y.inputValue,j=y.isLoading,I=y.loadingMessage,F=y.minMenuHeight,x=y.maxMenuHeight,E=y.menuIsOpen,D=y.menuPlacement,C=y.menuPosition,N=y.menuPortalTarget,A=y.menuShouldBlockScroll,T=y.menuShouldScrollIntoView,L=y.noOptionsMessage,V=y.onMenuScrollToTop,H=y.onMenuScrollToBottom;if(!E)return null;var re=function(v,Ce){var qe=v.type,Ue=v.data,Be=v.isDisabled,we=v.isSelected,gt=v.label,at=v.value,wt=_===Ue,xt=Be?void 0:function(){return o.onOptionHover(Ue)},rn=Be?void 0:function(){return o.selectOption(Ue)},Tt="".concat(o.getElementId("option"),"-").concat(Ce),bn={id:Tt,onClick:rn,onMouseMove:xt,onMouseOver:xt,tabIndex:-1,role:"option","aria-selected":o.state.isAppleDevice?void 0:we};return g.createElement(p,ne({},S,{innerProps:bn,data:Ue,isDisabled:Be,isSelected:we,key:Tt,label:gt,type:qe,value:at,isFocused:wt,innerRef:wt?o.getFocusedOptionRef:void 0}),o.formatOptionLabel(v.data,"menu"))},ge;if(this.hasOptions())ge=this.getCategorizedOptions().map(function(me){if(me.type==="group"){var v=me.data,Ce=me.options,qe=me.index,Ue="".concat(o.getElementId("group"),"-").concat(qe),Be="".concat(Ue,"-heading");return g.createElement(i,ne({},S,{key:Ue,data:v,options:Ce,Heading:l,headingProps:{id:Be,data:me.data},label:o.formatGroupLabel(me.data)}),me.options.map(function(we){return re(we,"".concat(qe,"-").concat(we.index))}))}else if(me.type==="option")return re(me,"".concat(me.index))});else if(j){var Ee=I({inputValue:k});if(Ee===null)return null;ge=g.createElement(f,S,Ee)}else{var ze=L({inputValue:k});if(ze===null)return null;ge=g.createElement(m,S,ze)}var b={minMenuHeight:F,maxMenuHeight:x,menuPlacement:D,menuPosition:C,menuShouldScrollIntoView:T},We=g.createElement(lh,ne({},S,b),function(me){var v=me.ref,Ce=me.placerProps,qe=Ce.placement,Ue=Ce.maxHeight;return g.createElement(u,ne({},S,b,{innerRef:v,innerProps:{onMouseDown:o.onMenuMouseDown,onMouseMove:o.onMenuMouseMove},isLoading:j,placement:qe}),g.createElement(Mp,{captureEnabled:w,onTopArrive:V,onBottomArrive:H,lockEnabled:A},function(Be){return g.createElement(c,ne({},S,{innerRef:function(gt){o.getMenuListRef(gt),Be(gt)},innerProps:{role:"listbox","aria-multiselectable":S.isMulti,id:o.getElementId("listbox")},isLoading:j,maxHeight:Ue,focusedOption:_}),ge)}))});return N||C==="fixed"?g.createElement(d,ne({},S,{appendTo:N,controlElement:this.controlRef,menuPlacement:D,menuPosition:C}),We):We}},{key:"renderFormField",value:function(){var o=this,a=this.props,i=a.delimiter,l=a.isDisabled,u=a.isMulti,c=a.name,d=a.required,f=this.state.selectValue;if(d&&!this.hasValue()&&!l)return g.createElement(zp,{name:c,onFocus:this.onValueInputFocus});if(!(!c||l))if(u)if(i){var m=f.map(function(_){return o.getOptionValue(_)}).join(i);return g.createElement("input",{name:c,type:"hidden",value:m})}else{var p=f.length>0?f.map(function(_,y){return g.createElement("input",{key:"i-".concat(y),name:c,type:"hidden",value:o.getOptionValue(_)})}):g.createElement("input",{name:c,type:"hidden",value:""});return g.createElement("div",null,p)}else{var S=f[0]?this.getOptionValue(f[0]):"";return g.createElement("input",{name:c,type:"hidden",value:S})}}},{key:"renderLiveRegion",value:function(){var o=this.commonProps,a=this.state,i=a.ariaSelection,l=a.focusedOption,u=a.focusedValue,c=a.isFocused,d=a.selectValue,f=this.getFocusableOptions();return g.createElement(Sp,ne({},o,{id:this.getElementId("live-region"),ariaSelection:i,focusedOption:l,focusedValue:u,isFocused:c,selectValue:d,focusableOptions:f,isAppleDevice:this.state.isAppleDevice}))}},{key:"render",value:function(){var o=this.getComponents(),a=o.Control,i=o.IndicatorsContainer,l=o.SelectContainer,u=o.ValueContainer,c=this.props,d=c.className,f=c.id,m=c.isDisabled,p=c.menuIsOpen,S=this.state.isFocused,_=this.commonProps=this.getCommonProps();return g.createElement(l,ne({},_,{className:d,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:m,isFocused:S}),this.renderLiveRegion(),g.createElement(a,ne({},_,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:m,isFocused:S,menuIsOpen:p}),g.createElement(u,ne({},_,{isDisabled:m}),this.renderPlaceholderOrValue(),this.renderInput()),g.createElement(i,ne({},_,{isDisabled:m}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(o,a){var i=a.prevProps,l=a.clearFocusValueOnUpdate,u=a.inputIsHiddenAfterUpdate,c=a.ariaSelection,d=a.isFocused,f=a.prevWasFocused,m=a.instancePrefix,p=o.options,S=o.value,_=o.menuIsOpen,y=o.inputValue,w=o.isMulti,k=Ri(S),j={};if(i&&(S!==i.value||p!==i.options||_!==i.menuIsOpen||y!==i.inputValue)){var I=_?tf(o,k):[],F=_?fs(yr(o,k),"".concat(m,"-option")):[],x=l?nf(a,k):null,E=rf(a,I),D=No(F,E);j={selectValue:k,focusedOption:E,focusedOptionId:D,focusableOptionsWithIds:F,focusedValue:x,clearFocusValueOnUpdate:!1}}var C=u!=null&&o!==i?{inputIsHidden:u,inputIsHiddenAfterUpdate:void 0}:{},N=c,A=d&&f;return d&&!A&&(N={value:xr(w,k,k[0]||null),options:k,action:"initial-input-focus"},A=!f),c?.action==="initial-input-focus"&&(N=null),ee(ee(ee({},j),C),{},{prevProps:o,ariaSelection:N,prevWasFocused:A})}}]),n})(g.Component);bs.defaultProps=ef;var af=(0,g.forwardRef)(function(e,t){var n=Ju(e);return g.createElement(bs,ne({ref:t},n))}),sf=af,u1=(function(e){var t=e.nonce,n=e.children,r=e.cacheKey,o=useMemo(function(){return createCache({key:r,nonce:t})},[r,t]);return React.createElement(CacheProvider,{value:o},n)}),c1=null,d1=null;const lf=({...e})=>(0,s.jsx)(sf,{classNamePrefix:"wdo:select",...e}),h1=({...e})=>jsx(Creatable,{classNamePrefix:"wdo:select",...e});var Io=lf;const uf=[{value:"en",label:"English"},{value:"es",label:"Spanish"},{value:"pt",label:"Portuguese"},{value:"pt-BR",label:"Portuguese (Brazilian)"},{value:"fr",label:"French"},{value:"de",label:"German"},{value:"it",label:"Italian"},{value:"nl",label:"Dutch"},{value:"da",label:"Danish"},{value:"sv",label:"Swedish"},{value:"no",label:"Norwegian"},{value:"fi",label:"Finnish"},{value:"is",label:"Icelandic"},{value:"pl",label:"Polish"},{value:"cs",label:"Czech"},{value:"sk",label:"Slovak"},{value:"hu",label:"Hungarian"},{value:"ro",label:"Romanian"},{value:"bg",label:"Bulgarian"},{value:"hr",label:"Croatian"},{value:"sr",label:"Serbian"},{value:"sl",label:"Slovenian"},{value:"el",label:"Greek"},{value:"ru",label:"Russian"},{value:"uk",label:"Ukrainian"},{value:"tr",label:"Turkish"},{value:"ar",label:"Arabic"},{value:"he",label:"Hebrew"},{value:"fa",label:"Persian (Farsi)"},{value:"hi",label:"Hindi"},{value:"bn",label:"Bengali"},{value:"ur",label:"Urdu"},{value:"ta",label:"Tamil"},{value:"te",label:"Telugu"},{value:"th",label:"Thai"},{value:"vi",label:"Vietnamese"},{value:"id",label:"Indonesian"},{value:"ms",label:"Malay"},{value:"tl",label:"Filipino (Tagalog)"},{value:"zh",label:"Chinese (Simplified)"},{value:"zh-TW",label:"Chinese (Traditional)"},{value:"ja",label:"Japanese"},{value:"ko",label:"Korean"},{value:"sw",label:"Swahili"},{value:"af",label:"Afrikaans"},{value:"ca",label:"Catalan"},{value:"eu",label:"Basque"},{value:"gl",label:"Galician"},{value:"et",label:"Estonian"},{value:"lv",label:"Latvian"},{value:"lt",label:"Lithuanian"}];var p1=null;const Fo=[{value:"",label:(0,h.__)("Site default (let the AI infer)","ajax-search-pro")},...uf],Po=[{key:"diagnostic",label:(0,h.__)("Search Diagnostics","ajax-search-pro"),description:(0,h.__)(`Conversational "Why isn't X showing up?" assistant. Checks stopwords, index, exclusions and priority rules.`,"ajax-search-pro")},{key:"synonym_discover",label:(0,h.__)("AI Synonym Discovery","ajax-search-pro"),description:(0,h.__)("Suggests creative synonyms \u2014 alternative words real users might type for the same content.","ajax-search-pro")},{key:"quality_report",label:(0,h.__)("Search Quality Report","ajax-search-pro"),description:(0,h.__)("Analyses the last 30 days of search statistics and produces an actionable performance report.","ajax-search-pro")},{key:"config_wizard",label:(0,h.__)("AI Setup Wizard","ajax-search-pro"),description:(0,h.__)("Guides you through creating a new search instance based on your site type and requirements.","ajax-search-pro")},{key:"priorities_advisor",label:(0,h.__)("Priorities Health Check","ajax-search-pro"),description:(0,h.__)("Scans priority rules for orphaned term/post references and suggests new rules based on popular searches.","ajax-search-pro")},{key:"stopword_detector",label:(0,h.__)("Stopword Conflict Detector","ajax-search-pro"),description:(0,h.__)("Cross-references zero-result searches with the active stopword list to flag silently dropped keywords.","ajax-search-pro")},{key:"ai_suggestions",label:(0,h.__)("AI Keyword Suggestions","ajax-search-pro"),description:(0,h.__)("Pre-generates grounded autocomplete and keyword suggestions from your site's index and search history.","ajax-search-pro")}];var cf=({licenseOk:e,onNeedLicense:t})=>{const n=x=>$()({path:x}),{data:r,isLoading:o,error:a,mutate:i}=un((0,Zt.addQueryArgs)("/ajax-search-pro/ai/options"),n,{revalidateIfStale:!1,revalidateOnFocus:!0,revalidateOnReconnect:!1,revalidateOnMount:!0}),[l,u]=(0,g.useState)(null),[c,d]=(0,g.useState)(!1),[f,m]=(0,g.useState)(!1),[p,S]=(0,g.useState)(!1),{addSuccess:_,addError:y}=sn();(0,g.useEffect)(()=>{r&&u(r)},[r]);const w=l?Po.every(x=>l[x.key].value):!1,k=(x,E)=>{l&&(E&&!e||u({...l,[x]:{value:E}}))},j=x=>{if(!l||x&&!e)return;const E={};Po.forEach(D=>{E[D.key]={value:x}}),u({...l,...E})},I=()=>{m(!0),$()({path:"/ajax-search-pro/ai/cache/purge",method:"POST"}).then(()=>{_((0,h.__)("AI cache cleared.","ajax-search-pro"))}).catch(x=>{y(x)}).finally(()=>m(!1))},F=()=>{l&&(d(!0),$()({path:"/ajax-search-pro/ai/options",method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)}).then(x=>{u(x),_((0,h.__)("AI settings saved!","ajax-search-pro"))}).catch(x=>{y(x)}).finally(()=>{i(),d(!1)}))};return o||!l?(0,s.jsx)("div",{className:"wdo:flex wdo:flex-col wdo:card wdo:m-4",children:(0,s.jsx)("p",{className:"wdo:p-6",children:(0,h.__)("Loading\u2026","ajax-search-pro")})}):a?(0,s.jsx)("div",{className:"wdo:flex wdo:flex-col wdo:card wdo:m-4",children:(0,s.jsx)("p",{className:"wdo:p-6",children:(0,h.__)("Error loading AI settings.","ajax-search-pro")})}):(0,s.jsxs)("div",{className:"wdo:flex wdo:flex-col wdo:gap-4 wdo:m-4",children:[!e&&(0,s.jsxs)(Nr,{children:[(0,s.jsx)("span",{children:(0,h.__)("An active license is required to use AI features.","ajax-search-pro")}),t&&(0,s.jsxs)(Se,{className:"wdo:ml-3",onClick:t,children:[(0,h.__)("Activate License","ajax-search-pro")," \u2192"]})]}),(0,s.jsxs)("div",{className:"wdo:card",children:[(0,s.jsx)("div",{className:"wdo:p-6",children:(0,s.jsx)("h2",{className:"wdo:text-[1.2em] wdo:dark:text-white",children:(0,h.__)("Feature Toggles","ajax-search-pro")})}),(0,s.jsx)(kn,{label:(0,h.__)("Enable all features","ajax-search-pro"),description:(0,h.__)("Turn all AI features on or off at once.","ajax-search-pro"),children:(0,s.jsx)(Fa,{value:w,onChange:j})}),(0,s.jsx)("div",{className:"wdo:border-t wdo:border-gray-100 wdo:dark:border-gray-700"}),Po.map(({key:x,label:E,description:D})=>(0,s.jsx)(kn,{label:E,description:D,children:(0,s.jsx)(Fa,{value:l[x].value,onChange:C=>k(x,C)})},x)),(0,s.jsx)("div",{className:"wdo:border-t wdo:border-gray-100 wdo:dark:border-gray-700"}),(0,s.jsx)(kn,{label:(0,h.__)("Content language","ajax-search-pro"),description:(0,h.__)("The language your content is written in. AI synonym suggestions are produced in this language. Leave as \u201CSite default\u201D to let the AI infer it from your content.","ajax-search-pro"),children:(0,s.jsx)(Io,{options:Fo,value:Fo.find(x=>x.value===(l.content_language?.value??""))??Fo[0],onChange:x=>u({...l,content_language:{value:x?.value??""}})})}),(0,s.jsx)("div",{className:"wdo:p-6",children:(0,s.jsx)(Xe,{isLoading:c,disabled:c||!e,onClick:x=>{x.preventDefault(),F()},children:(0,h.__)("Save","ajax-search-pro")})})]}),(0,s.jsxs)("div",{className:"wdo:card wdo:p-6 wdo:flex wdo:items-center wdo:justify-between wdo:gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"wdo:text-[1.2em] wdo:dark:text-white wdo:mb-1",children:(0,h.__)("AI Cache","ajax-search-pro")}),(0,s.jsx)("p",{className:"wdo:text-sm wdo:text-gray-500 wdo:dark:text-gray-400",children:(0,h.__)("Clears all cached AI responses (quality reports, synonym suggestions, wizard configs). Use this to force fresh results.","ajax-search-pro")})]}),(0,s.jsxs)(Se,{disabled:f,onClick:()=>S(!0),className:"wdo:shrink-0",children:[(0,s.jsx)(qu,{size:14,className:"wdo:mr-1.5 wdo:inline"}),(0,h.__)("Purge Cache","ajax-search-pro")]})]}),(0,s.jsxs)(se,{isOpen:p,onOverlayClick:()=>S(!1),children:[(0,s.jsx)("h2",{className:"wdo:mb-2",children:(0,h.__)("Confirm","ajax-search-pro")}),(0,s.jsx)("p",{children:(0,h.__)("Are you sure you want to purge the AI cache?","ajax-search-pro")}),(0,s.jsx)("p",{className:"wdo:text-sm wdo:text-gray-500 wdo:dark:text-gray-400 wdo:mt-1",children:(0,h.__)("All cached AI responses (quality reports, synonym suggestions, wizard configs) will be cleared and regenerated on next use.","ajax-search-pro")}),(0,s.jsxs)("div",{className:"wdo:flex wdo:mt-6 wdo:gap-4",children:[(0,s.jsx)(Xe,{isLoading:f,disabled:f,onClick:x=>{x.preventDefault(),S(!1),I()},children:(0,h.__)("Purge","ajax-search-pro")}),(0,s.jsx)(Se,{disabled:f,onClick:()=>S(!1),children:(0,h.__)("Cancel","ajax-search-pro")})]})]})]})};const _s=25,df=e=>e.replace(/_/g," ").replace(/\b\w/g,t=>t.toUpperCase());var hf=()=>{const[e,t]=(0,g.useState)(1),[n,r]=(0,g.useState)(""),o=p=>$()({path:p}),{data:a,isLoading:i,error:l}=un((0,Zt.addQueryArgs)("/ajax-search-pro/ai/interactions",{page:e,per_page:_s,...n?{feature:n}:{}}),o,{revalidateOnFocus:!1,revalidateOnReconnect:!1,revalidateOnMount:!0,keepPreviousData:!0}),u=a?.items??[],c=a?.total??0,d=Math.max(1,Math.ceil(c/_s)),f=a?.features??[],m=p=>{r(p),t(1)};return(0,s.jsxs)("div",{className:"wdo:card wdo:m-4",children:[(0,s.jsxs)("div",{className:"wdo:p-6 wdo:flex wdo:items-center wdo:justify-between wdo:gap-4 wdo:flex-wrap",children:[(0,s.jsx)("h2",{className:"wdo:text-[1.2em] wdo:dark:text-white",children:(0,h.__)("Interaction Log","ajax-search-pro")}),(0,s.jsxs)("div",{className:"wdo:flex wdo:items-center wdo:gap-2",children:[(0,s.jsx)("label",{className:"wdo:text-sm wdo:text-gray-500 wdo:dark:text-gray-400",children:(0,h.__)("Feature","ajax-search-pro")}),(0,s.jsxs)("select",{value:n,onChange:p=>m(p.target.value),className:"wdo:text-sm wdo:rounded wdo:border wdo:border-gray-200 wdo:dark:border-gray-600 wdo:bg-white wdo:dark:bg-gray-700 wdo:dark:text-gray-200 wdo:px-2 wdo:py-1",children:[(0,s.jsx)("option",{value:"",children:(0,h.__)("All features","ajax-search-pro")}),f.map(p=>(0,s.jsx)("option",{value:p,children:df(p)},p))]})]})]}),l?(0,s.jsx)("p",{className:"wdo:px-6 wdo:pb-6 wdo:text-sm",children:(0,h.__)("Error loading interaction log.","ajax-search-pro")}):i&&u.length===0?(0,s.jsx)("p",{className:"wdo:px-6 wdo:pb-6 wdo:text-sm",children:(0,h.__)("Loading\u2026","ajax-search-pro")}):u.length===0?(0,s.jsx)("p",{className:"wdo:px-6 wdo:pb-6 wdo:text-sm",children:(0,h.__)("No interactions recorded yet.","ajax-search-pro")}):(0,s.jsx)("div",{className:"wdo:overflow-x-auto",children:(0,s.jsxs)("table",{className:"wdo:w-full wdo:text-sm",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{className:"wdo:border-b wdo:border-gray-200 wdo:dark:border-gray-700",children:[(0,s.jsx)("th",{className:"wdo:text-left wdo:px-6 wdo:py-3",children:(0,h.__)("Feature","ajax-search-pro")}),(0,s.jsx)("th",{className:"wdo:text-left wdo:px-6 wdo:py-3",children:(0,h.__)("Prompt (excerpt)","ajax-search-pro")}),(0,s.jsx)("th",{className:"wdo:text-right wdo:px-6 wdo:py-3",children:(0,h.__)("Tokens","ajax-search-pro")}),(0,s.jsx)("th",{className:"wdo:text-center wdo:px-6 wdo:py-3",children:(0,h.__)("Cached","ajax-search-pro")}),(0,s.jsx)("th",{className:"wdo:text-left wdo:px-6 wdo:py-3",children:(0,h.__)("Date","ajax-search-pro")})]})}),(0,s.jsx)("tbody",{children:u.map(p=>(0,s.jsxs)("tr",{className:"wdo:border-b wdo:border-gray-100 wdo:dark:border-gray-800",children:[(0,s.jsx)("td",{className:"wdo:px-6 wdo:py-3 wdo:font-mono wdo:text-xs",children:p.feature}),(0,s.jsx)("td",{className:"wdo:px-6 wdo:py-3",children:p.prompt_summary}),(0,s.jsx)("td",{className:"wdo:px-6 wdo:py-3 wdo:text-right",children:p.cached?"\u2014":p.tokens_used.toLocaleString()}),(0,s.jsx)("td",{className:"wdo:px-6 wdo:py-3 wdo:text-center",children:p.cached?"\u2713":""}),(0,s.jsx)("td",{className:"wdo:px-6 wdo:py-3 wdo:whitespace-nowrap",children:p.created_at??"\u2014"})]},p.id))})]})}),(0,s.jsxs)("div",{className:"wdo:p-6 wdo:flex wdo:gap-4 wdo:items-center",children:[(0,s.jsx)(Se,{disabled:e<=1,onClick:()=>t(p=>Math.max(1,p-1)),children:(0,h.__)("Previous","ajax-search-pro")}),(0,s.jsxs)("span",{className:"wdo:text-sm",children:[(0,h.__)("Page","ajax-search-pro")," ",e," ",(0,h.__)("of","ajax-search-pro")," ",d,c>0&&(0,s.jsxs)("span",{className:"wdo:text-gray-400 wdo:ml-2",children:["(",c.toLocaleString()," ",(0,h.__)("total","ajax-search-pro"),")"]})]}),(0,s.jsx)(Se,{disabled:e>=d,onClick:()=>t(p=>p+1),children:(0,h.__)("Next","ajax-search-pro")})]})]})};/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Do=te("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),ks=e=>e.replace(/_/g," ").replace(/\b\w/g,t=>t.toUpperCase());var pf=({licenseOk:e,onNeedLicense:t})=>{const n=f=>$()({path:f}),{data:r,isLoading:o,error:a,mutate:i,isValidating:l}=un(e?(0,Zt.addQueryArgs)("/ajax-search-pro/ai/usage"):null,n,{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1,revalidateOnMount:!0}),u=r&&r.cap?Math.min(100,Math.round(r.tokens_used/r.cap*100)):null,c=u===null?"#22c55e":u>=80?"#ef4444":u>=60?"#f59e0b":"#22c55e";if(!e)return(0,s.jsx)("div",{className:"wdo:flex wdo:flex-col wdo:gap-4 wdo:m-4",children:(0,s.jsxs)(Nr,{children:[(0,s.jsx)("span",{children:(0,h.__)("An active license is required to use AI features.","ajax-search-pro")}),t&&(0,s.jsxs)(Se,{className:"wdo:ml-3",onClick:t,children:[(0,h.__)("Activate License","ajax-search-pro")," \u2192"]})]})});if(o)return(0,s.jsx)("div",{className:"wdo:flex wdo:flex-col wdo:card wdo:m-4",children:(0,s.jsx)("p",{className:"wdo:p-6",children:(0,h.__)("Loading usage\u2026","ajax-search-pro")})});if(a||!r)return(0,s.jsx)("div",{className:"wdo:flex wdo:flex-col wdo:card wdo:m-4",children:(0,s.jsx)("p",{className:"wdo:p-6",children:(0,h.__)("Unable to load usage data.","ajax-search-pro")})});const d=r.cap!==null?r.cap-r.tokens_used:null;return(0,s.jsxs)("div",{className:"wdo:flex wdo:flex-col wdo:gap-4 wdo:m-4",children:[(0,s.jsxs)("div",{className:"wdo:card wdo:p-6",children:[(0,s.jsxs)("div",{className:"wdo:flex wdo:items-start wdo:justify-between wdo:mb-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"wdo:text-[1.2em] wdo:dark:text-white",children:(0,h.__)("Monthly Token Usage","ajax-search-pro")}),r.product_name&&(0,s.jsx)("span",{className:"wdo:inline-block wdo:mt-1 wdo:px-2 wdo:py-0.5 wdo:text-xs wdo:rounded wdo:bg-gray-100 wdo:dark:bg-gray-700 wdo:text-gray-600 wdo:dark:text-gray-300",children:r.product_name})]}),(0,s.jsxs)(Se,{onClick:()=>i(),disabled:l,className:"wdo:flex wdo:items-center wdo:gap-1.5",children:[(0,s.jsx)(Do,{size:14,className:l?"wdo:animate-spin":""}),(0,h.__)("Refresh","ajax-search-pro")]})]}),(0,s.jsxs)("div",{className:"wdo:flex wdo:items-end wdo:gap-2 wdo:mb-2",children:[(0,s.jsx)("span",{className:"wdo:text-[2em] wdo:font-semibold wdo:dark:text-white wdo:leading-none",children:r.tokens_used.toLocaleString()}),r.cap!==null&&(0,s.jsxs)("span",{className:"wdo:text-sm wdo:text-gray-500 wdo:dark:text-gray-400 wdo:mb-1",children:[(0,h.__)("of","ajax-search-pro")," ",r.cap.toLocaleString()," ",(0,h.__)("tokens","ajax-search-pro")]}),r.cap===null&&(0,s.jsx)("span",{className:"wdo:text-sm wdo:text-gray-500 wdo:dark:text-gray-400 wdo:mb-1",children:(0,h.__)("tokens used","ajax-search-pro")})]}),u!==null&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"wdo:w-full wdo:bg-gray-200 wdo:dark:bg-gray-700 wdo:rounded-full wdo:h-3 wdo:mb-2",children:(0,s.jsx)("div",{className:"wdo:h-3 wdo:rounded-full wdo:transition-all",style:{width:`${u}%`,backgroundColor:c}})}),(0,s.jsxs)("p",{className:"wdo:text-sm wdo:text-gray-500 wdo:dark:text-gray-400",children:[u,"% ",(0,h.__)("used this month","ajax-search-pro"),d!==null&&(0,s.jsxs)(s.Fragment,{children:[" \u2014 ",d.toLocaleString()," ",(0,h.__)("tokens remaining","ajax-search-pro")]})]})]}),r.cap===null&&(0,s.jsx)("p",{className:"wdo:text-sm wdo:text-gray-500 wdo:dark:text-gray-400",children:(0,h.__)("Unlimited usage","ajax-search-pro")})]}),r.feature_breakdown&&r.feature_breakdown.length>0&&(0,s.jsxs)("div",{className:"wdo:card wdo:p-6",children:[(0,s.jsx)("h3",{className:"wdo:text-sm wdo:font-semibold wdo:text-gray-700 wdo:dark:text-gray-200 wdo:mb-1",children:(0,h.__)("Usage by feature","ajax-search-pro")}),(0,s.jsx)("p",{className:"wdo:text-xs wdo:text-gray-400 wdo:dark:text-gray-500 wdo:mb-4",children:(0,h.__)("From the local interaction log, last 30 days.","ajax-search-pro")}),(0,s.jsx)("div",{className:"wdo:flex wdo:flex-col wdo:gap-2.5",children:(()=>{const f=Math.max(...r.feature_breakdown.map(m=>m.tokens),1);return r.feature_breakdown.map(m=>(0,s.jsxs)("div",{className:"wdo:flex wdo:items-center wdo:gap-3 wdo:text-sm",children:[(0,s.jsx)("span",{className:"wdo:w-44 wdo:shrink-0 wdo:text-gray-600 wdo:dark:text-gray-300 wdo:truncate",title:ks(m.feature),children:ks(m.feature)}),(0,s.jsx)("div",{className:"wdo:flex-1 wdo:bg-gray-200 wdo:dark:bg-gray-600 wdo:rounded-full wdo:h-1.5",children:(0,s.jsx)("div",{className:"wdo:bg-violet-500 wdo:h-1.5 wdo:rounded-full",style:{width:`${Math.round(m.tokens/f*100)}%`}})}),(0,s.jsx)("span",{className:"wdo:w-24 wdo:text-right wdo:text-gray-700 wdo:dark:text-gray-300",children:m.tokens.toLocaleString()}),(0,s.jsxs)("span",{className:"wdo:w-20 wdo:text-right wdo:text-xs wdo:text-gray-400 wdo:dark:text-gray-500",children:[m.calls.toLocaleString()," ",(0,h.__)("calls","ajax-search-pro")]})]},m.feature))})()})]})]})},Ss=()=>{const e=i=>$()({path:i}).then(l=>l),t="/ajax-search-pro/options/search_instance/list",{data:n,isLoading:r,mutate:o,error:a}=un(t,e,{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1});return a?{data:void 0,error:a,isLoading:r,mutate:o}:{data:n||[],error:void 0,isLoading:r,mutate:o}},To=({required:e,instances:t,onChange:n,isMulti:r=!1,className:o,...a})=>{const{data:i,isLoading:l,error:u}=Ss(),[c,d]=(0,g.useState)(null),f=!l&&!u?Object.values(i).map(p=>({label:`${p.id} - ${p.name}`,value:p.id})):[];(0,g.useEffect)(()=>{if(!l&&!u){const p=[];(t??[]).map(S=>{const _=f.find(y=>parseInt(y.value)===S);_!==void 0&&p.push(_)}),d(p)}},[l,u,t]);const m=p=>{d(p),p&&n?.(p)};return(0,s.jsx)("div",{className:`${o??""}`,children:u?(0,s.jsx)(Io,{isDisabled:!0,placeholder:u.message}):(0,s.jsx)(Io,{required:e,isLoading:l,isDisabled:l,...r&&{isMulti:!0},options:f,value:c,onChange:m,...a})})},ff=Ae(7259);function Tn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?js(e.position):"start"in e||"end"in e?js(e):"line"in e||"column"in e?Mo(e):""}function Mo(e){return Es(e&&e.line)+":"+Es(e&&e.column)}function js(e){return Mo(e&&e.start)+"-"+Mo(e&&e.end)}function Es(e){return e&&typeof e=="number"?e:1}class ht extends Error{constructor(t,n,r){const o=[null,null];let a={start:{line:null,column:null},end:{line:null,column:null}};if(super(),typeof n=="string"&&(r=n,n=void 0),typeof r=="string"){const i=r.indexOf(":");i===-1?o[1]=r:(o[0]=r.slice(0,i),o[1]=r.slice(i+1))}n&&("type"in n||"position"in n?n.position&&(a=n.position):"start"in n||"end"in n?a=n:("line"in n||"column"in n)&&(a.start=n)),this.name=Tn(n)||"1:1",this.message=typeof t=="object"?t.message:t,this.stack="",typeof t=="object"&&t.stack&&(this.stack=t.stack),this.reason=this.message,this.fatal,this.line=a.start.line,this.column=a.start.column,this.position=a,this.source=o[0],this.ruleId=o[1],this.file,this.actual,this.expected,this.url,this.note}}ht.prototype.file="",ht.prototype.name="",ht.prototype.reason="",ht.prototype.message="",ht.prototype.stack="",ht.prototype.fatal=null,ht.prototype.column=null,ht.prototype.line=null,ht.prototype.source=null,ht.prototype.ruleId=null,ht.prototype.position=null;const It={basename:mf,dirname:gf,extname:wf,join:xf,sep:"/"};function mf(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Mn(e);let n=0,r=-1,o=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.charCodeAt(o)===47){if(a){n=o+1;break}}else r<0&&(a=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let i=-1,l=t.length-1;for(;o--;)if(e.charCodeAt(o)===47){if(a){n=o+1;break}}else i<0&&(a=!0,i=o+1),l>-1&&(e.charCodeAt(o)===t.charCodeAt(l--)?l<0&&(r=o):(l=-1,r=i));return n===r?r=i:r<0&&(r=e.length),e.slice(n,r)}function gf(e){if(Mn(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.charCodeAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.charCodeAt(0)===47?"/":".":t===1&&e.charCodeAt(0)===47?"//":e.slice(0,t)}function wf(e){Mn(e);let t=e.length,n=-1,r=0,o=-1,a=0,i;for(;t--;){const l=e.charCodeAt(t);if(l===47){if(i){r=t+1;break}continue}n<0&&(i=!0,n=t+1),l===46?o<0?o=t:a!==1&&(a=1):o>-1&&(a=-1)}return o<0||n<0||a===0||a===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function xf(...e){let t=-1,n;for(;++t<e.length;)Mn(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":yf(n)}function yf(e){Mn(e);const t=e.charCodeAt(0)===47;let n=vf(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.charCodeAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function vf(e,t){let n="",r=0,o=-1,a=0,i=-1,l,u;for(;++i<=e.length;){if(i<e.length)l=e.charCodeAt(i);else{if(l===47)break;l=47}if(l===47){if(!(o===i-1||a===1))if(o!==i-1&&a===2){if(n.length<2||r!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),o=i,a=0;continue}}else if(n.length>0){n="",r=0,o=i,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,i):n=e.slice(o+1,i),r=i-o-1;o=i,a=0}else l===46&&a>-1?a++:a=-1}return n}function Mn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const bf={cwd:_f};function _f(){return"/"}function Ro(e){return e!==null&&typeof e=="object"&&e.href&&e.origin}function kf(e){if(typeof e=="string")e=new URL(e);else if(!Ro(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Sf(e)}function Sf(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.charCodeAt(n)===37&&t.charCodeAt(n+1)===50){const r=t.charCodeAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const Lo=["history","path","basename","stem","extname","dirname"];class Cs{constructor(t){let n;t?typeof t=="string"||jf(t)?n={value:t}:Ro(t)?n={path:t}:n=t:n={},this.data={},this.messages=[],this.history=[],this.cwd=bf.cwd(),this.value,this.stored,this.result,this.map;let r=-1;for(;++r<Lo.length;){const a=Lo[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let o;for(o in n)Lo.includes(o)||(this[o]=n[o])}get path(){return this.history[this.history.length-1]}set path(t){Ro(t)&&(t=kf(t)),Bo(t,"path"),this.path!==t&&this.history.push(t)}get dirname(){return typeof this.path=="string"?It.dirname(this.path):void 0}set dirname(t){As(this.basename,"dirname"),this.path=It.join(t||"",this.basename)}get basename(){return typeof this.path=="string"?It.basename(this.path):void 0}set basename(t){Bo(t,"basename"),zo(t,"basename"),this.path=It.join(this.dirname||"",t)}get extname(){return typeof this.path=="string"?It.extname(this.path):void 0}set extname(t){if(zo(t,"extname"),As(this.dirname,"extname"),t){if(t.charCodeAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=It.join(this.dirname,this.stem+(t||""))}get stem(){return typeof this.path=="string"?It.basename(this.path,this.extname):void 0}set stem(t){Bo(t,"stem"),zo(t,"stem"),this.path=It.join(this.dirname||"",t+(this.extname||""))}toString(t){return(this.value||"").toString(t||void 0)}message(t,n,r){const o=new ht(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=null,o}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}}function zo(e,t){if(e&&e.includes(It.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+It.sep+"`")}function Bo(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function As(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function jf(e){return ff(e)}function Os(e){if(e)throw e}var Ef=Ae(105),Ns=Ae(562);function Vo(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Cf(){const e=[],t={run:n,use:r};return t;function n(...o){let a=-1;const i=o.pop();if(typeof i!="function")throw new TypeError("Expected function as last argument, not "+i);l(null,...o);function l(u,...c){const d=e[++a];let f=-1;if(u){i(u);return}for(;++f<o.length;)(c[f]===null||c[f]===void 0)&&(c[f]=o[f]);o=c,d?Af(d,l)(...c):i(null,...c)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function Af(e,t){let n;return r;function r(...i){const l=e.length>i.length;let u;l&&i.push(o);try{u=e.apply(this,i)}catch(c){const d=c;if(l&&n)throw d;return o(d)}l||(u&&u.then&&typeof u.then=="function"?u.then(a,o):u instanceof Error?o(u):a(u))}function o(i,...l){n||(n=!0,t(i,...l))}function a(i){o(null,i)}}const Of=Fs().freeze(),Is={}.hasOwnProperty;function Fs(){const e=Cf(),t=[];let n={},r,o=-1;return a.data=i,a.Parser=void 0,a.Compiler=void 0,a.freeze=l,a.attachers=t,a.use=u,a.parse=c,a.stringify=d,a.run=f,a.runSync=m,a.process=p,a.processSync=S,a;function a(){const _=Fs();let y=-1;for(;++y<t.length;)_.use(...t[y]);return _.data(Ns(!0,{},n)),_}function i(_,y){return typeof _=="string"?arguments.length===2?(Uo("data",r),n[_]=y,a):Is.call(n,_)&&n[_]||null:_?(Uo("data",r),n=_,a):n}function l(){if(r)return a;for(;++o<t.length;){const[_,...y]=t[o];if(y[0]===!1)continue;y[0]===!0&&(y[0]=void 0);const w=_.call(a,...y);typeof w=="function"&&e.use(w)}return r=!0,o=Number.POSITIVE_INFINITY,a}function u(_,...y){let w;if(Uo("use",r),_!=null)if(typeof _=="function")F(_,...y);else if(typeof _=="object")Array.isArray(_)?I(_):j(_);else throw new TypeError("Expected usable value, not `"+_+"`");return w&&(n.settings=Object.assign(n.settings||{},w)),a;function k(x){if(typeof x=="function")F(x);else if(typeof x=="object")if(Array.isArray(x)){const[E,...D]=x;F(E,...D)}else j(x);else throw new TypeError("Expected usable value, not `"+x+"`")}function j(x){I(x.plugins),x.settings&&(w=Object.assign(w||{},x.settings))}function I(x){let E=-1;if(x!=null)if(Array.isArray(x))for(;++E<x.length;){const D=x[E];k(D)}else throw new TypeError("Expected a list of plugins, not `"+x+"`")}function F(x,E){let D=-1,C;for(;++D<t.length;)if(t[D][0]===x){C=t[D];break}C?(Vo(C[1])&&Vo(E)&&(E=Ns(!0,C[1],E)),C[1]=E):t.push([...arguments])}}function c(_){a.freeze();const y=Rn(_),w=a.Parser;return $o("parse",w),Ps(w,"parse")?new w(String(y),y).parse():w(String(y),y)}function d(_,y){a.freeze();const w=Rn(y),k=a.Compiler;return Ho("stringify",k),Ds(_),Ps(k,"compile")?new k(_,w).compile():k(_,w)}function f(_,y,w){if(Ds(_),a.freeze(),!w&&typeof y=="function"&&(w=y,y=void 0),!w)return new Promise(k);k(null,w);function k(j,I){e.run(_,Rn(y),F);function F(x,E,D){E=E||_,x?I(x):j?j(E):w(null,E,D)}}}function m(_,y){let w,k;return a.run(_,y,j),Ts("runSync","run",k),w;function j(I,F){Os(I),w=F,k=!0}}function p(_,y){if(a.freeze(),$o("process",a.Parser),Ho("process",a.Compiler),!y)return new Promise(w);w(null,y);function w(k,j){const I=Rn(_);a.run(a.parse(I),I,(x,E,D)=>{if(x||!E||!D)F(x);else{const C=a.stringify(E,D);C==null||(Ff(C)?D.value=C:D.result=C),F(x,D)}});function F(x,E){x||!E?j(x):k?k(E):y(null,E)}}}function S(_){let y;a.freeze(),$o("processSync",a.Parser),Ho("processSync",a.Compiler);const w=Rn(_);return a.process(w,k),Ts("processSync","process",y),w;function k(j){y=!0,Os(j)}}}function Ps(e,t){return typeof e=="function"&&e.prototype&&(Nf(e.prototype)||t in e.prototype)}function Nf(e){let t;for(t in e)if(Is.call(e,t))return!0;return!1}function $o(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Parser`")}function Ho(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Compiler`")}function Uo(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Ds(e){if(!Vo(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ts(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Rn(e){return If(e)?e:new Cs(e)}function If(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Ff(e){return typeof e=="string"||Ef(e)}const Pf={};function Df(e,t){const n=t||Pf,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Ms(e,r,o)}function Ms(e,t,n){if(Tf(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Rs(e.children,t,n)}return Array.isArray(e)?Rs(e,t,n):""}function Rs(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=Ms(e[o],t,n);return r.join("")}function Tf(e){return!!(e&&typeof e=="object")}function Ft(e,t,n,r){const o=e.length;let a=0,i;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)i=Array.from(r),i.unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);a<r.length;)i=r.slice(a,a+1e4),i.unshift(t,0),e.splice(...i),a+=1e4,t+=1e4}function pt(e,t){return e.length>0?(Ft(e,e.length,0,t),e):t}const Wo={}.hasOwnProperty;function Mf(e){const t={};let n=-1;for(;++n<e.length;)Rf(t,e[n]);return t}function Rf(e,t){let n;for(n in t){const o=(Wo.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let i;if(a)for(i in a){Wo.call(o,i)||(o[i]=[]);const l=a[i];Lf(o[i],Array.isArray(l)?l:l?[l]:[])}}}function Lf(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Ft(e,0,0,r)}function v1(e){const t={};let n=-1;for(;++n<e.length;)zf(t,e[n]);return t}function zf(e,t){let n;for(n in t){const o=(Wo.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let i;if(a)for(i in a)o[i]=a[i]}}const Bf=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,Pt=Wt(/[A-Za-z]/),St=Wt(/[\dA-Za-z]/),Vf=Wt(/[#-'*+\--9=?A-Z^-~]/);function qo(e){return e!==null&&(e<32||e===127)}const Go=Wt(/\d/),$f=Wt(/[\dA-Fa-f]/),Hf=Wt(/[!-/:-@[-`{-~]/);function ae(e){return e!==null&&e<-2}function rt(e){return e!==null&&(e<0||e===32)}function be(e){return e===-2||e===-1||e===32}const Uf=Wt(Bf),Wf=Wt(/\s/);function Wt(e){return t;function t(n){return n!==null&&e.test(String.fromCharCode(n))}}function Ne(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return i;function i(u){return be(u)?(e.enter(n),l(u)):t(u)}function l(u){return be(u)&&a++<o?(e.consume(u),l):(e.exit(n),t(u))}}const qf={tokenize:Gf};function Gf(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Ne(e,t,"linePrefix")}function o(l){return e.enter("paragraph"),a(l)}function a(l){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,i(l)}function i(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return ae(l)?(e.consume(l),e.exit("chunkText"),a):(e.consume(l),i)}}const Yf={tokenize:Kf},Ls={tokenize:Xf};function Kf(e){const t=this,n=[];let r=0,o,a,i;return l;function l(j){if(r<n.length){const I=n[r];return t.containerState=I[1],e.attempt(I[0].continuation,u,c)(j)}return c(j)}function u(j){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&k();const I=t.events.length;let F=I,x;for(;F--;)if(t.events[F][0]==="exit"&&t.events[F][1].type==="chunkFlow"){x=t.events[F][1].end;break}w(r);let E=I;for(;E<t.events.length;)t.events[E][1].end=Object.assign({},x),E++;return Ft(t.events,F+1,0,t.events.slice(I)),t.events.length=E,c(j)}return l(j)}function c(j){if(r===n.length){if(!o)return m(j);if(o.currentConstruct&&o.currentConstruct.concrete)return S(j);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ls,d,f)(j)}function d(j){return o&&k(),w(r),m(j)}function f(j){return t.parser.lazy[t.now().line]=r!==n.length,i=t.now().offset,S(j)}function m(j){return t.containerState={},e.attempt(Ls,p,S)(j)}function p(j){return r++,n.push([t.currentConstruct,t.containerState]),m(j)}function S(j){if(j===null){o&&k(),w(0),e.consume(j);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:a,_tokenizer:o}),_(j)}function _(j){if(j===null){y(e.exit("chunkFlow"),!0),w(0),e.consume(j);return}return ae(j)?(e.consume(j),y(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(j),_)}function y(j,I){const F=t.sliceStream(j);if(I&&F.push(null),j.previous=a,a&&(a.next=j),a=j,o.defineSkip(j.start),o.write(F),t.parser.lazy[j.start.line]){let x=o.events.length;for(;x--;)if(o.events[x][1].start.offset<i&&(!o.events[x][1].end||o.events[x][1].end.offset>i))return;const E=t.events.length;let D=E,C,N;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){if(C){N=t.events[D][1].end;break}C=!0}for(w(r),x=E;x<t.events.length;)t.events[x][1].end=Object.assign({},N),x++;Ft(t.events,D+1,0,t.events.slice(E)),t.events.length=x}}function w(j){let I=n.length;for(;I-- >j;){const F=n[I];t.containerState=F[1],F[0].exit.call(t,e)}n.length=j}function k(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function Xf(e,t,n){return Ne(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const br={tokenize:Qf,partial:!0};function Qf(e,t,n){return r;function r(a){return be(a)?Ne(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||ae(a)?t(a):n(a)}}function zs(e){const t={};let n=-1,r,o,a,i,l,u,c;for(;++n<e.length;){for(;n in t;)n=t[n];if(r=e[n],n&&r[1].type==="chunkFlow"&&e[n-1][1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,a=0,a<u.length&&u[a][1].type==="lineEndingBlank"&&(a+=2),a<u.length&&u[a][1].type==="content"))for(;++a<u.length&&u[a][1].type!=="content";)u[a][1].type==="chunkText"&&(u[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Zf(e,n)),n=t[n],c=!0);else if(r[1]._container){for(a=n,o=void 0;a--&&(i=e[a],i[1].type==="lineEnding"||i[1].type==="lineEndingBlank");)i[0]==="enter"&&(o&&(e[o][1].type="lineEndingBlank"),i[1].type="lineEnding",o=a);o&&(r[1].end=Object.assign({},e[o][1].start),l=e.slice(o,n),l.unshift(r),Ft(e,o,n-o+1,l))}}return!c}function Zf(e,t){const n=e[t][1],r=e[t][2];let o=t-1;const a=[],i=n._tokenizer||r.parser[n.contentType](n.start),l=i.events,u=[],c={};let d,f,m=-1,p=n,S=0,_=0;const y=[_];for(;p;){for(;e[++o][1]!==p;);a.push(o),p._tokenizer||(d=r.sliceStream(p),p.next||d.push(null),f&&i.defineSkip(p.start),p._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(d),p._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=n;++m<l.length;)l[m][0]==="exit"&&l[m-1][0]==="enter"&&l[m][1].type===l[m-1][1].type&&l[m][1].start.line!==l[m][1].end.line&&(_=m+1,y.push(_),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(i.events=[],p?(p._tokenizer=void 0,p.previous=void 0):y.pop(),m=y.length;m--;){const w=l.slice(y[m],y[m+1]),k=a.pop();u.unshift([k,k+w.length-1]),Ft(e,k,2,w)}for(m=-1;++m<u.length;)c[S+u[m][0]]=S+u[m][1],S+=u[m][1]-u[m][0]-1;return c}const Jf={tokenize:n0,resolve:t0},e0={tokenize:r0,partial:!0};function t0(e){return zs(e),e}function n0(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(l)}function o(l){return l===null?a(l):ae(l)?e.check(e0,i,a)(l):(e.consume(l),o)}function a(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function i(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function r0(e,t,n){const r=this;return o;function o(i){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Ne(e,a,"linePrefix")}function a(i){if(i===null||ae(i))return n(i);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}const o0={tokenize:a0};function a0(e){const t=this,n=e.attempt(br,r,e.attempt(this.parser.constructs.flowInitial,o,Ne(e,e.attempt(this.parser.constructs.flow,o,e.attempt(Jf,o)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const i0={resolveAll:Vs()},s0=Bs("string"),l0=Bs("text");function Bs(e){return{tokenize:t,resolveAll:Vs(e==="text"?u0:void 0)};function t(n){const r=this,o=this.parser.constructs[e],a=n.attempt(o,i,l);return i;function i(d){return c(d)?a(d):l(d)}function l(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),u}function u(d){return c(d)?(n.exit("data"),a(d)):(n.consume(d),u)}function c(d){if(d===null)return!0;const f=o[d];let m=-1;if(f)for(;++m<f.length;){const p=f[m];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Vs(e){return t;function t(n,r){let o=-1,a;for(;++o<=n.length;)a===void 0?n[o]&&n[o][1].type==="data"&&(a=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==a+2&&(n[a][1].end=n[o-1][1].end,n.splice(a+2,o-a-2),o=a+2),a=void 0);return e?e(n,r):n}}function u0(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let a=o.length,i=-1,l=0,u;for(;a--;){const c=o[a];if(typeof c=="string"){for(i=c.length;c.charCodeAt(i-1)===32;)l++,i--;if(i)break;i=-1}else if(c===-2)u=!0,l++;else if(c!==-1){a++;break}}if(l){const c={type:n===e.length||u||l<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-l,offset:r.end.offset-l,_index:r.start._index+a,_bufferIndex:a?i:r.start._bufferIndex+i},end:Object.assign({},r.end)};r.end=Object.assign({},c.start),r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}function Yo(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}function c0(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const o={},a=[];let i=[],l=[],u=!0;const c={consume:I,enter:F,exit:x,attempt:C(E),check:C(D),interrupt:C(D,{interrupt:!0})},d={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:_,sliceSerialize:S,now:y,defineSkip:w,write:p};let f=t.tokenize.call(d,c),m;return t.resolveAll&&a.push(t),d;function p(L){return i=pt(i,L),k(),i[i.length-1]!==null?[]:(N(t,0),d.events=Yo(a,d.events,d),d.events)}function S(L,V){return h0(_(L),V)}function _(L){return d0(i,L)}function y(){const{line:L,column:V,offset:H,_index:re,_bufferIndex:ge}=r;return{line:L,column:V,offset:H,_index:re,_bufferIndex:ge}}function w(L){o[L.line]=L.column,T()}function k(){let L;for(;r._index<i.length;){const V=i[r._index];if(typeof V=="string")for(L=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===L&&r._bufferIndex<V.length;)j(V.charCodeAt(r._bufferIndex));else j(V)}}function j(L){u=void 0,m=L,f=f(L)}function I(L){ae(L)?(r.line++,r.column=1,r.offset+=L===-3?2:1,T()):L!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===i[r._index].length&&(r._bufferIndex=-1,r._index++)),d.previous=L,u=!0}function F(L,V){const H=V||{};return H.type=L,H.start=y(),d.events.push(["enter",H,d]),l.push(H),H}function x(L){const V=l.pop();return V.end=y(),d.events.push(["exit",V,d]),V}function E(L,V){N(L,V.from)}function D(L,V){V.restore()}function C(L,V){return H;function H(re,ge,Ee){let ze,b,We,me;return Array.isArray(re)?Ce(re):"tokenize"in re?Ce([re]):v(re);function v(we){return gt;function gt(at){const wt=at!==null&&we[at],xt=at!==null&&we.null,rn=[...Array.isArray(wt)?wt:wt?[wt]:[],...Array.isArray(xt)?xt:xt?[xt]:[]];return Ce(rn)(at)}}function Ce(we){return ze=we,b=0,we.length===0?Ee:qe(we[b])}function qe(we){return gt;function gt(at){return me=A(),We=we,we.partial||(d.currentConstruct=we),we.name&&d.parser.constructs.disable.null.includes(we.name)?Be(at):we.tokenize.call(V?Object.assign(Object.create(d),V):d,c,Ue,Be)(at)}}function Ue(we){return u=!0,L(We,me),ge}function Be(we){return u=!0,me.restore(),++b<ze.length?qe(ze[b]):Ee}}}function N(L,V){L.resolveAll&&!a.includes(L)&&a.push(L),L.resolve&&Ft(d.events,V,d.events.length-V,L.resolve(d.events.slice(V),d)),L.resolveTo&&(d.events=L.resolveTo(d.events,d))}function A(){const L=y(),V=d.previous,H=d.currentConstruct,re=d.events.length,ge=Array.from(l);return{restore:Ee,from:re};function Ee(){r=L,d.previous=V,d.currentConstruct=H,d.events.length=re,l=ge,T()}}function T(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function d0(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;let i;if(n===o)i=[e[n].slice(r,a)];else{if(i=e.slice(n,o),r>-1){const l=i[0];typeof l=="string"?i[0]=l.slice(r):i.shift()}a>0&&i.push(e[o].slice(0,a))}return i}function h0(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const a=e[n];let i;if(typeof a=="string")i=a;else switch(a){case-5:{i="\r";break}case-4:{i=`
`;break}case-3:{i=`\r
`;break}case-2:{i=t?" ":"	";break}case-1:{if(!t&&o)continue;i=" ";break}default:i=String.fromCharCode(a)}o=a===-2,r.push(i)}return r.join("")}const _r={name:"thematicBreak",tokenize:p0};function p0(e,t,n){let r=0,o;return a;function a(c){return e.enter("thematicBreak"),i(c)}function i(c){return o=c,l(c)}function l(c){return c===o?(e.enter("thematicBreakSequence"),u(c)):r>=3&&(c===null||ae(c))?(e.exit("thematicBreak"),t(c)):n(c)}function u(c){return c===o?(e.consume(c),r++,u):(e.exit("thematicBreakSequence"),be(c)?Ne(e,l,"whitespace")(c):l(c))}}const ot={name:"list",tokenize:g0,continuation:{tokenize:w0},exit:y0},f0={tokenize:v0,partial:!0},m0={tokenize:x0,partial:!0};function g0(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,i=0;return l;function l(p){const S=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Go(p)){if(r.containerState.type||(r.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(_r,n,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(p)}return n(p)}function u(p){return Go(p)&&++i<10?(e.consume(p),u):(!r.interrupt||i<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):n(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(br,r.interrupt?n:d,e.attempt(f0,m,f))}function d(p){return r.containerState.initialBlankLine=!0,a++,m(p)}function f(p){return be(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),m):n(p)}function m(p){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function w0(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(br,o,a);function o(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ne(e,t,"listItemIndent",r.containerState.size+1)(l)}function a(l){return r.containerState.furtherBlankLines||!be(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(m0,t,i)(l))}function i(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ne(e,e.attempt(ot,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function x0(e,t,n){const r=this;return Ne(e,o,"listItemIndent",r.containerState.size+1);function o(a){const i=r.events[r.events.length-1];return i&&i[1].type==="listItemIndent"&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(a):n(a)}}function y0(e){e.exit(this.containerState.type)}function v0(e,t,n){const r=this;return Ne(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(a){const i=r.events[r.events.length-1];return!be(a)&&i&&i[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const $s={name:"blockQuote",tokenize:b0,continuation:{tokenize:_0},exit:k0};function b0(e,t,n){const r=this;return o;function o(i){if(i===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(i),e.exit("blockQuoteMarker"),a}return n(i)}function a(i){return be(i)?(e.enter("blockQuotePrefixWhitespace"),e.consume(i),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(i))}}function _0(e,t,n){const r=this;return o;function o(i){return be(i)?Ne(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i):a(i)}function a(i){return e.attempt($s,t,n)(i)}}function k0(e){e.exit("blockQuote")}function Hs(e,t,n,r,o,a,i,l,u){const c=u||Number.POSITIVE_INFINITY;let d=0;return f;function f(w){return w===60?(e.enter(r),e.enter(o),e.enter(a),e.consume(w),e.exit(a),m):w===null||w===32||w===41||qo(w)?n(w):(e.enter(r),e.enter(i),e.enter(l),e.enter("chunkString",{contentType:"string"}),_(w))}function m(w){return w===62?(e.enter(a),e.consume(w),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),p(w))}function p(w){return w===62?(e.exit("chunkString"),e.exit(l),m(w)):w===null||w===60||ae(w)?n(w):(e.consume(w),w===92?S:p)}function S(w){return w===60||w===62||w===92?(e.consume(w),p):p(w)}function _(w){return!d&&(w===null||w===41||rt(w))?(e.exit("chunkString"),e.exit(l),e.exit(i),e.exit(r),t(w)):d<c&&w===40?(e.consume(w),d++,_):w===41?(e.consume(w),d--,_):w===null||w===32||w===40||qo(w)?n(w):(e.consume(w),w===92?y:_)}function y(w){return w===40||w===41||w===92?(e.consume(w),_):_(w)}}function Us(e,t,n,r,o,a){const i=this;let l=0,u;return c;function c(p){return e.enter(r),e.enter(o),e.consume(p),e.exit(o),e.enter(a),d}function d(p){return l>999||p===null||p===91||p===93&&!u||p===94&&!l&&"_hiddenFootnoteSupport"in i.parser.constructs?n(p):p===93?(e.exit(a),e.enter(o),e.consume(p),e.exit(o),e.exit(r),t):ae(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||ae(p)||l++>999?(e.exit("chunkString"),d(p)):(e.consume(p),u||(u=!be(p)),p===92?m:f)}function m(p){return p===91||p===92||p===93?(e.consume(p),l++,f):f(p)}}function Ws(e,t,n,r,o,a){let i;return l;function l(m){return m===34||m===39||m===40?(e.enter(r),e.enter(o),e.consume(m),e.exit(o),i=m===40?41:m,u):n(m)}function u(m){return m===i?(e.enter(o),e.consume(m),e.exit(o),e.exit(r),t):(e.enter(a),c(m))}function c(m){return m===i?(e.exit(a),u(i)):m===null?n(m):ae(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),Ne(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===i||m===null||ae(m)?(e.exit("chunkString"),c(m)):(e.consume(m),m===92?f:d)}function f(m){return m===i||m===92?(e.consume(m),d):d(m)}}function Ln(e,t){let n;return r;function r(o){return ae(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):be(o)?Ne(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}function xn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const S0={name:"definition",tokenize:E0},j0={tokenize:C0,partial:!0};function E0(e,t,n){const r=this;let o;return a;function a(p){return e.enter("definition"),i(p)}function i(p){return Us.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function l(p){return o=xn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),u):n(p)}function u(p){return rt(p)?Ln(e,c)(p):c(p)}function c(p){return Hs(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function d(p){return e.attempt(j0,f,f)(p)}function f(p){return be(p)?Ne(e,m,"whitespace")(p):m(p)}function m(p){return p===null||ae(p)?(e.exit("definition"),r.parser.defined.push(o),t(p)):n(p)}}function C0(e,t,n){return r;function r(l){return rt(l)?Ln(e,o)(l):n(l)}function o(l){return Ws(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return be(l)?Ne(e,i,"whitespace")(l):i(l)}function i(l){return l===null||ae(l)?t(l):n(l)}}const Ko={name:"codeIndented",tokenize:O0},A0={tokenize:N0,partial:!0};function O0(e,t,n){const r=this;return o;function o(c){return e.enter("codeIndented"),Ne(e,a,"linePrefix",5)(c)}function a(c){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?i(c):n(c)}function i(c){return c===null?u(c):ae(c)?e.attempt(A0,i,u)(c):(e.enter("codeFlowValue"),l(c))}function l(c){return c===null||ae(c)?(e.exit("codeFlowValue"),i(c)):(e.consume(c),l)}function u(c){return e.exit("codeIndented"),t(c)}}function N0(e,t,n){const r=this;return o;function o(i){return r.parser.lazy[r.now().line]?n(i):ae(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),o):Ne(e,a,"linePrefix",5)(i)}function a(i){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(i):ae(i)?o(i):n(i)}}const I0={name:"headingAtx",tokenize:P0,resolve:F0};function F0(e,t){let n=e.length-2,r=3,o,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Ft(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function P0(e,t,n){let r=0;return o;function o(d){return e.enter("atxHeading"),a(d)}function a(d){return e.enter("atxHeadingSequence"),i(d)}function i(d){return d===35&&r++<6?(e.consume(d),i):d===null||rt(d)?(e.exit("atxHeadingSequence"),l(d)):n(d)}function l(d){return d===35?(e.enter("atxHeadingSequence"),u(d)):d===null||ae(d)?(e.exit("atxHeading"),t(d)):be(d)?Ne(e,l,"whitespace")(d):(e.enter("atxHeadingText"),c(d))}function u(d){return d===35?(e.consume(d),u):(e.exit("atxHeadingSequence"),l(d))}function c(d){return d===null||d===35||rt(d)?(e.exit("atxHeadingText"),l(d)):(e.consume(d),c)}}const qs={name:"setextUnderline",tokenize:T0,resolveTo:D0};function D0(e,t){let n=e.length,r,o,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const i={type:"setextHeading",start:Object.assign({},e[o][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",a?(e.splice(o,0,["enter",i,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[a][1].end)):e[r][1]=i,e.push(["exit",i,t]),e}function T0(e,t,n){const r=this;let o;return a;function a(c){let d=r.events.length,f;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){f=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),o=c,i(c)):n(c)}function i(c){return e.enter("setextHeadingLineSequence"),l(c)}function l(c){return c===o?(e.consume(c),l):(e.exit("setextHeadingLineSequence"),be(c)?Ne(e,u,"lineSuffix")(c):u(c))}function u(c){return c===null||ae(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const M0=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Gs=["pre","script","style","textarea"],R0={name:"htmlFlow",tokenize:V0,resolveTo:B0,concrete:!0},L0={tokenize:H0,partial:!0},z0={tokenize:$0,partial:!0};function B0(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function V0(e,t,n){const r=this;let o,a,i,l,u;return c;function c(v){return d(v)}function d(v){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(v),f}function f(v){return v===33?(e.consume(v),m):v===47?(e.consume(v),a=!0,_):v===63?(e.consume(v),o=3,r.interrupt?t:b):Pt(v)?(e.consume(v),i=String.fromCharCode(v),y):n(v)}function m(v){return v===45?(e.consume(v),o=2,p):v===91?(e.consume(v),o=5,l=0,S):Pt(v)?(e.consume(v),o=4,r.interrupt?t:b):n(v)}function p(v){return v===45?(e.consume(v),r.interrupt?t:b):n(v)}function S(v){const Ce="CDATA[";return v===Ce.charCodeAt(l++)?(e.consume(v),l===Ce.length?r.interrupt?t:T:S):n(v)}function _(v){return Pt(v)?(e.consume(v),i=String.fromCharCode(v),y):n(v)}function y(v){if(v===null||v===47||v===62||rt(v)){const Ce=v===47,qe=i.toLowerCase();return!Ce&&!a&&Gs.includes(qe)?(o=1,r.interrupt?t(v):T(v)):M0.includes(i.toLowerCase())?(o=6,Ce?(e.consume(v),w):r.interrupt?t(v):T(v)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(v):a?k(v):j(v))}return v===45||St(v)?(e.consume(v),i+=String.fromCharCode(v),y):n(v)}function w(v){return v===62?(e.consume(v),r.interrupt?t:T):n(v)}function k(v){return be(v)?(e.consume(v),k):N(v)}function j(v){return v===47?(e.consume(v),N):v===58||v===95||Pt(v)?(e.consume(v),I):be(v)?(e.consume(v),j):N(v)}function I(v){return v===45||v===46||v===58||v===95||St(v)?(e.consume(v),I):F(v)}function F(v){return v===61?(e.consume(v),x):be(v)?(e.consume(v),F):j(v)}function x(v){return v===null||v===60||v===61||v===62||v===96?n(v):v===34||v===39?(e.consume(v),u=v,E):be(v)?(e.consume(v),x):D(v)}function E(v){return v===u?(e.consume(v),u=null,C):v===null||ae(v)?n(v):(e.consume(v),E)}function D(v){return v===null||v===34||v===39||v===47||v===60||v===61||v===62||v===96||rt(v)?F(v):(e.consume(v),D)}function C(v){return v===47||v===62||be(v)?j(v):n(v)}function N(v){return v===62?(e.consume(v),A):n(v)}function A(v){return v===null||ae(v)?T(v):be(v)?(e.consume(v),A):n(v)}function T(v){return v===45&&o===2?(e.consume(v),re):v===60&&o===1?(e.consume(v),ge):v===62&&o===4?(e.consume(v),We):v===63&&o===3?(e.consume(v),b):v===93&&o===5?(e.consume(v),ze):ae(v)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(L0,me,L)(v)):v===null||ae(v)?(e.exit("htmlFlowData"),L(v)):(e.consume(v),T)}function L(v){return e.check(z0,V,me)(v)}function V(v){return e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),H}function H(v){return v===null||ae(v)?L(v):(e.enter("htmlFlowData"),T(v))}function re(v){return v===45?(e.consume(v),b):T(v)}function ge(v){return v===47?(e.consume(v),i="",Ee):T(v)}function Ee(v){if(v===62){const Ce=i.toLowerCase();return Gs.includes(Ce)?(e.consume(v),We):T(v)}return Pt(v)&&i.length<8?(e.consume(v),i+=String.fromCharCode(v),Ee):T(v)}function ze(v){return v===93?(e.consume(v),b):T(v)}function b(v){return v===62?(e.consume(v),We):v===45&&o===2?(e.consume(v),b):T(v)}function We(v){return v===null||ae(v)?(e.exit("htmlFlowData"),me(v)):(e.consume(v),We)}function me(v){return e.exit("htmlFlow"),t(v)}}function $0(e,t,n){const r=this;return o;function o(i){return ae(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),a):n(i)}function a(i){return r.parser.lazy[r.now().line]?n(i):t(i)}}function H0(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(br,t,n)}}const Ys={tokenize:W0,partial:!0},Ks={name:"codeFenced",tokenize:U0,concrete:!0};function U0(e,t,n){const r=this,o={tokenize:F,partial:!0};let a=0,i=0,l;return u;function u(x){return c(x)}function c(x){const E=r.events[r.events.length-1];return a=E&&E[1].type==="linePrefix"?E[2].sliceSerialize(E[1],!0).length:0,l=x,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(x)}function d(x){return x===l?(i++,e.consume(x),d):i<3?n(x):(e.exit("codeFencedFenceSequence"),be(x)?Ne(e,f,"whitespace")(x):f(x))}function f(x){return x===null||ae(x)?(e.exit("codeFencedFence"),r.interrupt?t(x):e.check(Ys,_,I)(x)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(x))}function m(x){return x===null||ae(x)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(x)):be(x)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ne(e,p,"whitespace")(x)):x===96&&x===l?n(x):(e.consume(x),m)}function p(x){return x===null||ae(x)?f(x):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(x))}function S(x){return x===null||ae(x)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(x)):x===96&&x===l?n(x):(e.consume(x),S)}function _(x){return e.attempt(o,I,y)(x)}function y(x){return e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),w}function w(x){return a>0&&be(x)?Ne(e,k,"linePrefix",a+1)(x):k(x)}function k(x){return x===null||ae(x)?e.check(Ys,_,I)(x):(e.enter("codeFlowValue"),j(x))}function j(x){return x===null||ae(x)?(e.exit("codeFlowValue"),k(x)):(e.consume(x),j)}function I(x){return e.exit("codeFenced"),t(x)}function F(x,E,D){let C=0;return N;function N(H){return x.enter("lineEnding"),x.consume(H),x.exit("lineEnding"),A}function A(H){return x.enter("codeFencedFence"),be(H)?Ne(x,T,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):T(H)}function T(H){return H===l?(x.enter("codeFencedFenceSequence"),L(H)):D(H)}function L(H){return H===l?(C++,x.consume(H),L):C>=i?(x.exit("codeFencedFenceSequence"),be(H)?Ne(x,V,"whitespace")(H):V(H)):D(H)}function V(H){return H===null||ae(H)?(x.exit("codeFencedFence"),E(H)):D(H)}}}function W0(e,t,n){const r=this;return o;function o(i){return i===null?n(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),a)}function a(i){return r.parser.lazy[r.now().line]?n(i):t(i)}}const Xs=document.createElement("i");function Xo(e){const t="&"+e+";";Xs.innerHTML=t;const n=Xs.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}const Qs={name:"characterReference",tokenize:q0};function q0(e,t,n){const r=this;let o=0,a,i;return l;function l(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),u}function u(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),a=31,i=St,d(f))}function c(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,i=$f,d):(e.enter("characterReferenceValue"),a=7,i=Go,d(f))}function d(f){if(f===59&&o){const m=e.exit("characterReferenceValue");return i===St&&!Xo(r.sliceSerialize(m))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return i(f)&&o++<a?(e.consume(f),d):n(f)}}const Zs={name:"characterEscape",tokenize:G0};function G0(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),o}function o(a){return Hf(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Qo={name:"lineEnding",tokenize:Y0};function Y0(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ne(e,t,"linePrefix")}}const Zo={name:"labelEnd",tokenize:em,resolveTo:J0,resolveAll:Z0},K0={tokenize:tm},X0={tokenize:nm},Q0={tokenize:rm};function Z0(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function J0(e,t){let n=e.length,r=0,o,a,i,l;for(;n--;)if(o=e[n][1],a){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(i){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(a=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(i=n);const u={type:e[a][1].type==="labelLink"?"link":"image",start:Object.assign({},e[a][1].start),end:Object.assign({},e[e.length-1][1].end)},c={type:"label",start:Object.assign({},e[a][1].start),end:Object.assign({},e[i][1].end)},d={type:"labelText",start:Object.assign({},e[a+r+2][1].end),end:Object.assign({},e[i-2][1].start)};return l=[["enter",u,t],["enter",c,t]],l=pt(l,e.slice(a+1,a+r+3)),l=pt(l,[["enter",d,t]]),l=pt(l,Yo(t.parser.constructs.insideSpan.null,e.slice(a+r+4,i-3),t)),l=pt(l,[["exit",d,t],e[i-2],e[i-1],["exit",c,t]]),l=pt(l,e.slice(i+1)),l=pt(l,[["exit",u,t]]),Ft(e,a,e.length,l),e}function em(e,t,n){const r=this;let o=r.events.length,a,i;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){a=r.events[o][1];break}return l;function l(m){return a?a._inactive?f(m):(i=r.parser.defined.includes(xn(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),u):n(m)}function u(m){return m===40?e.attempt(K0,d,i?d:f)(m):m===91?e.attempt(X0,d,i?c:f)(m):i?d(m):f(m)}function c(m){return e.attempt(Q0,d,f)(m)}function d(m){return t(m)}function f(m){return a._balanced=!0,n(m)}}function tm(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),o}function o(f){return rt(f)?Ln(e,a)(f):a(f)}function a(f){return f===41?d(f):Hs(e,i,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function i(f){return rt(f)?Ln(e,u)(f):d(f)}function l(f){return n(f)}function u(f){return f===34||f===39||f===40?Ws(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):d(f)}function c(f){return rt(f)?Ln(e,d)(f):d(f)}function d(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function nm(e,t,n){const r=this;return o;function o(l){return Us.call(r,e,a,i,"reference","referenceMarker","referenceString")(l)}function a(l){return r.parser.defined.includes(xn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function i(l){return n(l)}}function rm(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),o}function o(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const om={name:"labelStartImage",tokenize:am,resolveAll:Zo.resolveAll};function am(e,t,n){const r=this;return o;function o(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),a}function a(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),i):n(l)}function i(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}function Js(e){if(e===null||rt(e)||Wf(e))return 1;if(Uf(e))return 2}const Jo={name:"attention",tokenize:sm,resolveAll:im};function im(e,t){let n=-1,r,o,a,i,l,u,c,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),m=Object.assign({},e[n][1].start);el(f,-u),el(m,u),i={type:u>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},l={type:u>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:m},a={type:u>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o={type:u>1?"strong":"emphasis",start:Object.assign({},i.start),end:Object.assign({},l.end)},e[r][1].end=Object.assign({},i.start),e[n][1].start=Object.assign({},l.end),c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=pt(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=pt(c,[["enter",o,t],["enter",i,t],["exit",i,t],["enter",a,t]]),c=pt(c,Yo(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=pt(c,[["exit",a,t],["enter",l,t],["exit",l,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,c=pt(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,Ft(e,r-1,n-r+3,c),n=r+c.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function sm(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=Js(r);let a;return i;function i(u){return a=u,e.enter("attentionSequence"),l(u)}function l(u){if(u===a)return e.consume(u),l;const c=e.exit("attentionSequence"),d=Js(u),f=!d||d===2&&o||n.includes(u),m=!o||o===2&&d||n.includes(r);return c._open=!!(a===42?f:f&&(o||!m)),c._close=!!(a===42?m:m&&(d||!f)),t(u)}}function el(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const lm={name:"autolink",tokenize:um};function um(e,t,n){let r=0;return o;function o(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(p){return Pt(p)?(e.consume(p),i):c(p)}function i(p){return p===43||p===45||p===46||St(p)?(r=1,l(p)):c(p)}function l(p){return p===58?(e.consume(p),r=0,u):(p===43||p===45||p===46||St(p))&&r++<32?(e.consume(p),l):(r=0,c(p))}function u(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||qo(p)?n(p):(e.consume(p),u)}function c(p){return p===64?(e.consume(p),d):Vf(p)?(e.consume(p),c):n(p)}function d(p){return St(p)?f(p):n(p)}function f(p){return p===46?(e.consume(p),r=0,d):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):m(p)}function m(p){if((p===45||St(p))&&r++<63){const S=p===45?m:f;return e.consume(p),S}return n(p)}}const cm={name:"htmlText",tokenize:dm};function dm(e,t,n){const r=this;let o,a,i;return l;function l(b){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(b),u}function u(b){return b===33?(e.consume(b),c):b===47?(e.consume(b),F):b===63?(e.consume(b),j):Pt(b)?(e.consume(b),D):n(b)}function c(b){return b===45?(e.consume(b),d):b===91?(e.consume(b),a=0,S):Pt(b)?(e.consume(b),k):n(b)}function d(b){return b===45?(e.consume(b),p):n(b)}function f(b){return b===null?n(b):b===45?(e.consume(b),m):ae(b)?(i=f,ge(b)):(e.consume(b),f)}function m(b){return b===45?(e.consume(b),p):f(b)}function p(b){return b===62?re(b):b===45?m(b):f(b)}function S(b){const We="CDATA[";return b===We.charCodeAt(a++)?(e.consume(b),a===We.length?_:S):n(b)}function _(b){return b===null?n(b):b===93?(e.consume(b),y):ae(b)?(i=_,ge(b)):(e.consume(b),_)}function y(b){return b===93?(e.consume(b),w):_(b)}function w(b){return b===62?re(b):b===93?(e.consume(b),w):_(b)}function k(b){return b===null||b===62?re(b):ae(b)?(i=k,ge(b)):(e.consume(b),k)}function j(b){return b===null?n(b):b===63?(e.consume(b),I):ae(b)?(i=j,ge(b)):(e.consume(b),j)}function I(b){return b===62?re(b):j(b)}function F(b){return Pt(b)?(e.consume(b),x):n(b)}function x(b){return b===45||St(b)?(e.consume(b),x):E(b)}function E(b){return ae(b)?(i=E,ge(b)):be(b)?(e.consume(b),E):re(b)}function D(b){return b===45||St(b)?(e.consume(b),D):b===47||b===62||rt(b)?C(b):n(b)}function C(b){return b===47?(e.consume(b),re):b===58||b===95||Pt(b)?(e.consume(b),N):ae(b)?(i=C,ge(b)):be(b)?(e.consume(b),C):re(b)}function N(b){return b===45||b===46||b===58||b===95||St(b)?(e.consume(b),N):A(b)}function A(b){return b===61?(e.consume(b),T):ae(b)?(i=A,ge(b)):be(b)?(e.consume(b),A):C(b)}function T(b){return b===null||b===60||b===61||b===62||b===96?n(b):b===34||b===39?(e.consume(b),o=b,L):ae(b)?(i=T,ge(b)):be(b)?(e.consume(b),T):(e.consume(b),V)}function L(b){return b===o?(e.consume(b),o=void 0,H):b===null?n(b):ae(b)?(i=L,ge(b)):(e.consume(b),L)}function V(b){return b===null||b===34||b===39||b===60||b===61||b===96?n(b):b===47||b===62||rt(b)?C(b):(e.consume(b),V)}function H(b){return b===47||b===62||rt(b)?C(b):n(b)}function re(b){return b===62?(e.consume(b),e.exit("htmlTextData"),e.exit("htmlText"),t):n(b)}function ge(b){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),Ee}function Ee(b){return be(b)?Ne(e,ze,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):ze(b)}function ze(b){return e.enter("htmlTextData"),i(b)}}const hm={name:"labelStartLink",tokenize:pm,resolveAll:Zo.resolveAll};function pm(e,t,n){const r=this;return o;function o(i){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(i),e.exit("labelMarker"),e.exit("labelLink"),a}function a(i){return i===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(i):t(i)}}const fm={name:"hardBreakEscape",tokenize:mm};function mm(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return ae(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const gm={name:"codeText",tokenize:ym,resolve:wm,previous:xm};function wm(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function xm(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function ym(e,t,n){const r=this;let o=0,a,i;return l;function l(m){return e.enter("codeText"),e.enter("codeTextSequence"),u(m)}function u(m){return m===96?(e.consume(m),o++,u):(e.exit("codeTextSequence"),c(m))}function c(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),c):m===96?(i=e.enter("codeTextSequence"),a=0,f(m)):ae(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),c):(e.enter("codeTextData"),d(m))}function d(m){return m===null||m===32||m===96||ae(m)?(e.exit("codeTextData"),c(m)):(e.consume(m),d)}function f(m){return m===96?(e.consume(m),a++,f):a===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(i.type="codeTextData",d(m))}}const vm={42:ot,43:ot,45:ot,48:ot,49:ot,50:ot,51:ot,52:ot,53:ot,54:ot,55:ot,56:ot,57:ot,62:$s},bm={91:S0},_m={[-2]:Ko,[-1]:Ko,32:Ko},km={35:I0,42:_r,45:[qs,_r],60:R0,61:qs,95:_r,96:Ks,126:Ks},Sm={38:Qs,92:Zs},jm={[-5]:Qo,[-4]:Qo,[-3]:Qo,33:om,38:Qs,42:Jo,60:[lm,cm],91:hm,92:[fm,Zs],93:Zo,95:Jo,96:gm},Em={null:[Jo,i0]},Cm={null:[42,95]},Am={null:[]};function Om(e){const n=Mf([K,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:o(qf),document:o(Yf),flow:o(o0),string:o(s0),text:o(l0)};return r;function o(a){return i;function i(l){return c0(r,a,l)}}}const tl=/[\0\t\n\r]/g;function Nm(){let e=1,t="",n=!0,r;return o;function o(a,i,l){const u=[];let c,d,f,m,p;for(a=t+a.toString(i),f=0,t="",n&&(a.charCodeAt(0)===65279&&f++,n=void 0);f<a.length;){if(tl.lastIndex=f,c=tl.exec(a),m=c&&c.index!==void 0?c.index:a.length,p=a.charCodeAt(m),!c){t=a.slice(f);break}if(p===10&&f===m&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),f<m&&(u.push(a.slice(f,m)),e+=m-f),p){case 0:{u.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,u.push(-2);e++<d;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}f=m+1}return l&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}function Im(e){for(;!zs(e););return e}function nl(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"\uFFFD":String.fromCharCode(n)}const Fm=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Pm(e){return e.replace(Fm,Dm)}function Dm(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return nl(n.slice(a?2:1),a?16:10)}return Xo(n)||e}const rl={}.hasOwnProperty,Tm=(function(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Mm(n)(Im(Om(n).document().write(Nm()(e,t,!0))))});function Mm(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(Pe),autolinkProtocol:A,autolinkEmail:A,atxHeading:l(wa),blockQuote:l(wt),characterEscape:A,characterReference:A,codeFenced:l(xt),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:l(xt,u),codeText:l(rn,u),codeTextData:A,data:A,codeFlowValue:A,definition:l(Tt),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:l(bn),hardBreakEscape:l(je),hardBreakTrailing:l(je),htmlFlow:l(Fe,u),htmlFlowData:A,htmlText:l(Fe,u),htmlTextData:A,image:l(Te),label:u,link:l(Pe),listItem:l(it),listItemValue:S,listOrdered:l(ut,p),listUnordered:l(ut),paragraph:l(Ve),reference:qe,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:l(wa),strong:l(ct),thematicBreak:l(an)},exit:{atxHeading:d(),atxHeadingSequence:E,autolink:d(),autolinkEmail:at,autolinkProtocol:gt,blockQuote:d(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:Be,characterReferenceMarkerNumeric:Be,characterReferenceValue:we,codeFenced:d(k),codeFencedFence:w,codeFencedFenceInfo:_,codeFencedFenceMeta:y,codeFlowValue:T,codeIndented:d(j),codeText:d(ge),codeTextData:T,data:T,definition:d(),definitionDestinationString:x,definitionLabelString:I,definitionTitleString:F,emphasis:d(),hardBreakEscape:d(V),hardBreakTrailing:d(V),htmlFlow:d(H),htmlFlowData:T,htmlText:d(re),htmlTextData:T,image:d(ze),label:We,labelText:b,lineEnding:L,link:d(Ee),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:Ue,resourceDestinationString:me,resourceTitleString:v,resource:Ce,setextHeading:d(N),setextHeadingLineSequence:C,setextHeadingText:D,strong:d(),thematicBreak:d()}};ol(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(O){let z={type:"root",children:[]};const Y={stack:[z],tokenStack:[],config:t,enter:c,exit:f,buffer:u,resume:m,setData:a,getData:i},he=[];let _e=-1;for(;++_e<O.length;)if(O[_e][1].type==="listOrdered"||O[_e][1].type==="listUnordered")if(O[_e][0]==="enter")he.push(_e);else{const dt=he.pop();_e=o(O,dt,_e)}for(_e=-1;++_e<O.length;){const dt=t[O[_e][0]];rl.call(dt,O[_e][1].type)&&dt[O[_e][1].type].call(Object.assign({sliceSerialize:O[_e][2].sliceSerialize},Y),O[_e][1])}if(Y.tokenStack.length>0){const dt=Y.tokenStack[Y.tokenStack.length-1];(dt[1]||al).call(Y,void 0,dt[0])}for(z.position={start:qt(O.length>0?O[0][1].start:{line:1,column:1,offset:0}),end:qt(O.length>0?O[O.length-2][1].end:{line:1,column:1,offset:0})},_e=-1;++_e<t.transforms.length;)z=t.transforms[_e](z)||z;return z}function o(O,z,Y){let he=z-1,_e=-1,dt=!1,yt,$t,$n,Hn;for(;++he<=Y;){const $e=O[he];if($e[1].type==="listUnordered"||$e[1].type==="listOrdered"||$e[1].type==="blockQuote"?($e[0]==="enter"?_e++:_e--,Hn=void 0):$e[1].type==="lineEndingBlank"?$e[0]==="enter"&&(yt&&!Hn&&!_e&&!$n&&($n=he),Hn=void 0):$e[1].type==="linePrefix"||$e[1].type==="listItemValue"||$e[1].type==="listItemMarker"||$e[1].type==="listItemPrefix"||$e[1].type==="listItemPrefixWhitespace"||(Hn=void 0),!_e&&$e[0]==="enter"&&$e[1].type==="listItemPrefix"||_e===-1&&$e[0]==="exit"&&($e[1].type==="listUnordered"||$e[1].type==="listOrdered")){if(yt){let xa=he;for($t=void 0;xa--;){const Ht=O[xa];if(Ht[1].type==="lineEnding"||Ht[1].type==="lineEndingBlank"){if(Ht[0]==="exit")continue;$t&&(O[$t][1].type="lineEndingBlank",dt=!0),Ht[1].type="lineEnding",$t=xa}else if(!(Ht[1].type==="linePrefix"||Ht[1].type==="blockQuotePrefix"||Ht[1].type==="blockQuotePrefixWhitespace"||Ht[1].type==="blockQuoteMarker"||Ht[1].type==="listItemIndent"))break}$n&&(!$t||$n<$t)&&(yt._spread=!0),yt.end=Object.assign({},$t?O[$t][1].start:$e[1].end),O.splice($t||he,0,["exit",yt,$e[2]]),he++,Y++}$e[1].type==="listItemPrefix"&&(yt={type:"listItem",_spread:!1,start:Object.assign({},$e[1].start),end:void 0},O.splice(he,0,["enter",yt,$e[2]]),he++,Y++,$n=void 0,Hn=!0)}}return O[z][1]._spread=dt,Y}function a(O,z){n[O]=z}function i(O){return n[O]}function l(O,z){return Y;function Y(he){c.call(this,O(he),he),z&&z.call(this,he)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(O,z,Y){return this.stack[this.stack.length-1].children.push(O),this.stack.push(O),this.tokenStack.push([z,Y]),O.position={start:qt(z.start)},O}function d(O){return z;function z(Y){O&&O.call(this,Y),f.call(this,Y)}}function f(O,z){const Y=this.stack.pop(),he=this.tokenStack.pop();if(he)he[0].type!==O.type&&(z?z.call(this,O,he[0]):(he[1]||al).call(this,O,he[0]));else throw new Error("Cannot close `"+O.type+"` ("+Tn({start:O.start,end:O.end})+"): it\u2019s not open");return Y.position.end=qt(O.end),Y}function m(){return Df(this.stack.pop())}function p(){a("expectingFirstListItemValue",!0)}function S(O){if(i("expectingFirstListItemValue")){const z=this.stack[this.stack.length-2];z.start=Number.parseInt(this.sliceSerialize(O),10),a("expectingFirstListItemValue")}}function _(){const O=this.resume(),z=this.stack[this.stack.length-1];z.lang=O}function y(){const O=this.resume(),z=this.stack[this.stack.length-1];z.meta=O}function w(){i("flowCodeInside")||(this.buffer(),a("flowCodeInside",!0))}function k(){const O=this.resume(),z=this.stack[this.stack.length-1];z.value=O.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),a("flowCodeInside")}function j(){const O=this.resume(),z=this.stack[this.stack.length-1];z.value=O.replace(/(\r?\n|\r)$/g,"")}function I(O){const z=this.resume(),Y=this.stack[this.stack.length-1];Y.label=z,Y.identifier=xn(this.sliceSerialize(O)).toLowerCase()}function F(){const O=this.resume(),z=this.stack[this.stack.length-1];z.title=O}function x(){const O=this.resume(),z=this.stack[this.stack.length-1];z.url=O}function E(O){const z=this.stack[this.stack.length-1];if(!z.depth){const Y=this.sliceSerialize(O).length;z.depth=Y}}function D(){a("setextHeadingSlurpLineEnding",!0)}function C(O){const z=this.stack[this.stack.length-1];z.depth=this.sliceSerialize(O).charCodeAt(0)===61?1:2}function N(){a("setextHeadingSlurpLineEnding")}function A(O){const z=this.stack[this.stack.length-1];let Y=z.children[z.children.length-1];(!Y||Y.type!=="text")&&(Y=on(),Y.position={start:qt(O.start)},z.children.push(Y)),this.stack.push(Y)}function T(O){const z=this.stack.pop();z.value+=this.sliceSerialize(O),z.position.end=qt(O.end)}function L(O){const z=this.stack[this.stack.length-1];if(i("atHardBreak")){const Y=z.children[z.children.length-1];Y.position.end=qt(O.end),a("atHardBreak");return}!i("setextHeadingSlurpLineEnding")&&t.canContainEols.includes(z.type)&&(A.call(this,O),T.call(this,O))}function V(){a("atHardBreak",!0)}function H(){const O=this.resume(),z=this.stack[this.stack.length-1];z.value=O}function re(){const O=this.resume(),z=this.stack[this.stack.length-1];z.value=O}function ge(){const O=this.resume(),z=this.stack[this.stack.length-1];z.value=O}function Ee(){const O=this.stack[this.stack.length-1];if(i("inReference")){const z=i("referenceType")||"shortcut";O.type+="Reference",O.referenceType=z,delete O.url,delete O.title}else delete O.identifier,delete O.label;a("referenceType")}function ze(){const O=this.stack[this.stack.length-1];if(i("inReference")){const z=i("referenceType")||"shortcut";O.type+="Reference",O.referenceType=z,delete O.url,delete O.title}else delete O.identifier,delete O.label;a("referenceType")}function b(O){const z=this.sliceSerialize(O),Y=this.stack[this.stack.length-2];Y.label=Pm(z),Y.identifier=xn(z).toLowerCase()}function We(){const O=this.stack[this.stack.length-1],z=this.resume(),Y=this.stack[this.stack.length-1];if(a("inReference",!0),Y.type==="link"){const he=O.children;Y.children=he}else Y.alt=z}function me(){const O=this.resume(),z=this.stack[this.stack.length-1];z.url=O}function v(){const O=this.resume(),z=this.stack[this.stack.length-1];z.title=O}function Ce(){a("inReference")}function qe(){a("referenceType","collapsed")}function Ue(O){const z=this.resume(),Y=this.stack[this.stack.length-1];Y.label=z,Y.identifier=xn(this.sliceSerialize(O)).toLowerCase(),a("referenceType","full")}function Be(O){a("characterReferenceType",O.type)}function we(O){const z=this.sliceSerialize(O),Y=i("characterReferenceType");let he;Y?(he=nl(z,Y==="characterReferenceMarkerNumeric"?10:16),a("characterReferenceType")):he=Xo(z);const _e=this.stack.pop();_e.value+=he,_e.position.end=qt(O.end)}function gt(O){T.call(this,O);const z=this.stack[this.stack.length-1];z.url=this.sliceSerialize(O)}function at(O){T.call(this,O);const z=this.stack[this.stack.length-1];z.url="mailto:"+this.sliceSerialize(O)}function wt(){return{type:"blockquote",children:[]}}function xt(){return{type:"code",lang:null,meta:null,value:""}}function rn(){return{type:"inlineCode",value:""}}function Tt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function bn(){return{type:"emphasis",children:[]}}function wa(){return{type:"heading",depth:void 0,children:[]}}function je(){return{type:"break"}}function Fe(){return{type:"html",value:""}}function Te(){return{type:"image",title:null,url:"",alt:null}}function Pe(){return{type:"link",title:null,url:"",children:[]}}function ut(O){return{type:"list",ordered:O.type==="listOrdered",start:null,spread:O._spread,children:[]}}function it(O){return{type:"listItem",spread:O._spread,checked:null,children:[]}}function Ve(){return{type:"paragraph",children:[]}}function ct(){return{type:"strong",children:[]}}function on(){return{type:"text",value:""}}function an(){return{type:"thematicBreak"}}}function qt(e){return{line:e.line,column:e.column,offset:e.offset}}function ol(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?ol(e,r):Rm(e,r)}}function Rm(e,t){let n;for(n in t)if(rl.call(t,n)){if(n==="canContainEols"){const r=t[n];r&&e[n].push(...r)}else if(n==="transforms"){const r=t[n];r&&e[n].push(...r)}else if(n==="enter"||n==="exit"){const r=t[n];r&&Object.assign(e[n],r)}}}function al(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Tn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Tn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Tn({start:t.start,end:t.end})+") is still open")}function Lm(e){Object.assign(this,{Parser:n=>{const r=this.data("settings");return Tm(n,Object.assign({},r,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}const Ge=(function(e,t,n){const r={type:String(e)};return n==null&&(typeof t=="string"||Array.isArray(t))?n=t:Object.assign(r,t),Array.isArray(n)?r.children=n:n!=null&&(r.value=String(n)),r}),b1=(function e(t,n,r,o,a){const i=ea(n);if(r!=null&&(typeof r!="number"||r<0||r===Number.POSITIVE_INFINITY))throw new Error("Expected positive finite index");if(o!=null&&(!e(o)||!o.children))throw new Error("Expected parent node");if(o==null!=(r==null))throw new Error("Expected both parent and index");return t&&t.type&&typeof t.type=="string"?!!i.call(a,t,r,o):!1}),ea=(function(e){if(e==null)return $m;if(typeof e=="string")return Vm(e);if(typeof e=="object")return Array.isArray(e)?zm(e):Bm(e);if(typeof e=="function")return kr(e);throw new Error("Expected function, string, or object as test")});function zm(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ea(e[n]);return kr(r);function r(...o){let a=-1;for(;++a<t.length;)if(t[a].call(this,...o))return!0;return!1}}function Bm(e){return kr(t);function t(n){let r;for(r in e)if(n[r]!==e[r])return!1;return!0}}function Vm(e){return kr(t);function t(n){return n&&n.type===e}}function kr(e){return t;function t(n,...r){return!!(n&&typeof n=="object"&&"type"in n&&e.call(this,n,...r))}}function $m(){return!0}function _1(e){return e}const Hm=!0,il=!1,Um="skip",Wm=(function(e,t,n,r){typeof t=="function"&&typeof n!="function"&&(r=n,n=t,t=null);const o=ea(t),a=r?-1:1;i(e,void 0,[])();function i(l,u,c){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const m=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(l.type+(m?"<"+m+">":""))+")"})}return f;function f(){let m=[],p,S,_;if((!t||o(l,u,c[c.length-1]||null))&&(m=qm(n(l,c)),m[0]===il))return m;if(l.children&&m[0]!==Um)for(S=(r?l.children.length:-1)+a,_=c.concat(l);S>-1&&S<l.children.length;){if(p=i(l.children[S],S,_)(),p[0]===il)return p;S=typeof p[1]=="number"?p[1]:S+a}return m}}});function qm(e){return Array.isArray(e)?e:typeof e=="number"?[Hm,e]:[e]}const ta=(function(e,t,n,r){typeof t=="function"&&typeof n!="function"&&(r=n,n=t,t=null),Wm(e,t,o,r);function o(a,i){const l=i[i.length-1];return n(a,l?l.children.indexOf(a):null,l)}}),na=sl("start"),ra=sl("end");function k1(e){return{start:na(e),end:ra(e)}}function sl(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};return{line:r.line||null,column:r.column||null,offset:r.offset>-1?r.offset:null}}}function Gm(e){return!e||!e.position||!e.position.start||!e.position.start.line||!e.position.start.column||!e.position.end||!e.position.end.line||!e.position.end.column}const ll={}.hasOwnProperty;function Ym(e){const t=Object.create(null);if(!e||!e.type)throw new Error("mdast-util-definitions expected node");return ta(e,"definition",r=>{const o=ul(r.identifier);o&&!ll.call(t,o)&&(t[o]=r)}),n;function n(r){const o=ul(r);return o&&ll.call(t,o)?t[o]:null}}function ul(e){return String(e||"").toUpperCase()}const Sr={}.hasOwnProperty;function Km(e,t){const n=t.data||{};return"value"in t&&!(Sr.call(n,"hName")||Sr.call(n,"hProperties")||Sr.call(n,"hChildren"))?e.augment(t,Ge("text",t.value)):e(t,"div",et(e,t))}function cl(e,t,n){const r=t&&t.type;let o;if(!r)throw new Error("Expected node, got `"+t+"`");return Sr.call(e.handlers,r)?o=e.handlers[r]:e.passThrough&&e.passThrough.includes(r)?o=Xm:o=e.unknownHandler,(typeof o=="function"?o:Km)(e,t,n)}function Xm(e,t){return"children"in t?{...t,children:et(e,t)}:t}function et(e,t){const n=[];if("children"in t){const r=t.children;let o=-1;for(;++o<r.length;){const a=cl(e,r[o],t);if(a){if(o&&r[o-1].type==="break"&&(!Array.isArray(a)&&a.type==="text"&&(a.value=a.value.replace(/^\s+/,"")),!Array.isArray(a)&&a.type==="element")){const i=a.children[0];i&&i.type==="text"&&(i.value=i.value.replace(/^\s+/,""))}Array.isArray(a)?n.push(...a):n.push(a)}}}return n}function dl(e,t){return e(t,"hr")}function Gt(e,t){const n=[];let r=-1;for(t&&n.push(Ge("text",`
`));++r<e.length;)r&&n.push(Ge("text",`
`)),n.push(e[r]);return t&&e.length>0&&n.push(Ge("text",`
`)),n}function hl(e,t){const n={},r=t.ordered?"ol":"ul",o=et(e,t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++a<o.length;){const i=o[a];if(i.type==="element"&&i.tagName==="li"&&i.properties&&Array.isArray(i.properties.className)&&i.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}return e(t,r,n,Gt(o,!0))}function Qm(e){const t=e.footnoteById,n=e.footnoteOrder;let r=-1;const o=[];for(;++r<n.length;){const a=t[n[r].toUpperCase()];if(!a)continue;const i=String(r+1),l=[...a.children],u={type:"link",url:"#fnref"+i,data:{hProperties:{className:["footnote-back"],role:"doc-backlink"}},children:[{type:"text",value:"\u21A9"}]},c=l[l.length-1];c&&c.type==="paragraph"?c.children.push(u):l.push(u),o.push({type:"listItem",data:{hProperties:{id:"fn"+i,role:"doc-endnote"}},children:l,position:a.position})}return o.length===0?null:e(null,"section",{className:["footnotes"],role:"doc-endnotes"},Gt([dl(e),hl(e,{type:"list",ordered:!0,children:o})],!0))}function Zm(e,t){return e(t,"blockquote",Gt(et(e,t),!0))}function Jm(e,t){return[e(t,"br"),Ge("text",`
`)]}function eg(e,t){const n=t.value?t.value+`
`:"",r=t.lang&&t.lang.match(/^[^ \t]+(?=[ \t]|$)/),o={};r&&(o.className=["language-"+r]);const a=e(t,"code",o,[Ge("text",n)]);return t.meta&&(a.data={meta:t.meta}),e(t.position,"pre",[a])}function tg(e,t){return e(t,"del",et(e,t))}function ng(e,t){return e(t,"em",et(e,t))}function pl(e,t){const n=e.footnoteOrder,r=String(t.identifier),o=n.indexOf(r),a=String(o===-1?n.push(r):o+1);return e(t,"a",{href:"#fn"+a,className:["footnote-ref"],id:"fnref"+a,role:"doc-noteref"},[e(t.position,"sup",[Ge("text",a)])])}function rg(e,t){const n=e.footnoteById,r=e.footnoteOrder;let o=1;for(;o in n;)o++;const a=String(o);return r.push(a),n[a]={type:"footnoteDefinition",identifier:a,children:[{type:"paragraph",children:t.children}],position:t.position},pl(e,{type:"footnoteReference",identifier:a,position:t.position})}function og(e,t){return e(t,"h"+t.depth,et(e,t))}function ag(e,t){return e.dangerous?e.augment(t,Ge("raw",t.value)):null}var jr=Ae(848);function fl(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return Ge("text","!["+t.alt+r);const o=et(e,t),a=o[0];a&&a.type==="text"?a.value="["+a.value:o.unshift(Ge("text","["));const i=o[o.length-1];return i&&i.type==="text"?i.value+=r:o.push(Ge("text",r)),o}function ig(e,t){const n=e.definition(t.identifier);if(!n)return fl(e,t);const r={src:jr(n.url||""),alt:t.alt};return n.title!==null&&n.title!==void 0&&(r.title=n.title),e(t,"img",r)}function sg(e,t){const n={src:jr(t.url),alt:t.alt};return t.title!==null&&t.title!==void 0&&(n.title=t.title),e(t,"img",n)}function lg(e,t){return e(t,"code",[Ge("text",t.value.replace(/\r?\n|\r/g," "))])}function ug(e,t){const n=e.definition(t.identifier);if(!n)return fl(e,t);const r={href:jr(n.url||"")};return n.title!==null&&n.title!==void 0&&(r.title=n.title),e(t,"a",r,et(e,t))}function cg(e,t){const n={href:jr(t.url)};return t.title!==null&&t.title!==void 0&&(n.title=t.title),e(t,"a",n,et(e,t))}function dg(e,t,n){const r=et(e,t),o=n?hg(n):ml(t),a={},i=[];if(typeof t.checked=="boolean"){let c;r[0]&&r[0].type==="element"&&r[0].tagName==="p"?c=r[0]:(c=e(null,"p",[]),r.unshift(c)),c.children.length>0&&c.children.unshift(Ge("text"," ")),c.children.unshift(e(null,"input",{type:"checkbox",checked:t.checked,disabled:!0})),a.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const c=r[l];(o||l!==0||c.type!=="element"||c.tagName!=="p")&&i.push(Ge("text",`
`)),c.type==="element"&&c.tagName==="p"&&!o?i.push(...c.children):i.push(c)}const u=r[r.length-1];return u&&(o||!("tagName"in u)||u.tagName!=="p")&&i.push(Ge("text",`
`)),e(t,"li",a,i)}function hg(e){let t=e.spread;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=ml(n[r]);return!!t}function ml(e){const t=e.spread;return t??e.children.length>1}function pg(e,t){return e(t,"p",et(e,t))}function fg(e,t){return e.augment(t,Ge("root",Gt(et(e,t))))}function mg(e,t){return e(t,"strong",et(e,t))}function gg(e,t){const n=t.children;let r=-1;const o=t.align||[],a=[];for(;++r<n.length;){const i=n[r].children,l=r===0?"th":"td";let u=t.align?o.length:i.length;const c=[];for(;u--;){const d=i[u];c[u]=e(d,l,{align:o[u]},d?et(e,d):[])}a[r]=e(n[r],"tr",Gt(c,!0))}return e(t,"table",Gt([e(a[0].position,"thead",Gt([a[0]],!0))].concat(a[1]?e({start:na(a[1]),end:ra(a[a.length-1])},"tbody",Gt(a.slice(1),!0)):[]),!0))}function wg(e,t){return e.augment(t,Ge("text",String(t.value).replace(/[ \t]*(\r?\n|\r)[ \t]*/g,"$1")))}const xg={blockquote:Zm,break:Jm,code:eg,delete:tg,emphasis:ng,footnoteReference:pl,footnote:rg,heading:og,html:ag,imageReference:ig,image:sg,inlineCode:lg,linkReference:ug,link:cg,listItem:dg,list:hl,paragraph:pg,root:fg,strong:mg,table:gg,text:wg,thematicBreak:dl,toml:Er,yaml:Er,definition:Er,footnoteDefinition:Er};function Er(){return null}const yg={}.hasOwnProperty;function vg(e,t){const n=t||{},r=n.allowDangerousHtml||!1,o={};return i.dangerous=r,i.definition=Ym(e),i.footnoteById=o,i.footnoteOrder=[],i.augment=a,i.handlers={...xg,...n.handlers},i.unknownHandler=n.unknownHandler,i.passThrough=n.passThrough,ta(e,"footnoteDefinition",l=>{const u=String(l.identifier).toUpperCase();yg.call(o,u)||(o[u]=l)}),i;function a(l,u){if(l&&"data"in l&&l.data){const c=l.data;c.hName&&(u.type!=="element"&&(u={type:"element",tagName:"",properties:{},children:[]}),u.tagName=c.hName),u.type==="element"&&c.hProperties&&(u.properties={...u.properties,...c.hProperties}),"children"in u&&u.children&&c.hChildren&&(u.children=c.hChildren)}if(l){const c="type"in l?l:{position:l};Gm(c)||(u.position={start:na(c),end:ra(c)})}return u}function i(l,u,c,d){return Array.isArray(c)&&(d=c,c={}),a(l,{type:"element",tagName:u,properties:c||{},children:d||[]})}}function gl(e,t){const n=vg(e,t),r=cl(n,e,null),o=Qm(n);return o&&r.children.push(Ge("text",`
`),o),Array.isArray(r)?{type:"root",children:r}:r}var bg=(function(e,t){return e&&"run"in e?_g(e,t):kg(e)});function _g(e,t){return(n,r,o)=>{e.run(gl(n,t),r,a=>{o(a)})}}function kg(e){return t=>gl(t,e)}var fe=Ae(6727);class zn{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}zn.prototype.property={},zn.prototype.normal={},zn.prototype.space=null;function wl(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new zn(n,r,t)}function oa(e){return e.toLowerCase()}class ft{constructor(t,n){this.property=t,this.attribute=n}}ft.prototype.space=null,ft.prototype.boolean=!1,ft.prototype.booleanish=!1,ft.prototype.overloadedBoolean=!1,ft.prototype.number=!1,ft.prototype.commaSeparated=!1,ft.prototype.spaceSeparated=!1,ft.prototype.commaOrSpaceSeparated=!1,ft.prototype.mustUseProperty=!1,ft.prototype.defined=!1;let Sg=0;const ue=nn(),He=nn(),xl=nn(),M=nn(),Ie=nn(),yn=nn(),lt=nn();function nn(){return 2**++Sg}const aa=Object.keys(P);class ia extends ft{constructor(t,n,r,o){let a=-1;if(super(t,n),yl(this,"space",o),typeof r=="number")for(;++a<aa.length;){const i=aa[a];yl(this,aa[a],(r&P[i])===P[i])}}}ia.prototype.defined=!0;function yl(e,t,n){n&&(e[t]=n)}const jg={}.hasOwnProperty;function vn(e){const t={},n={};let r;for(r in e.properties)if(jg.call(e.properties,r)){const o=e.properties[r],a=new ia(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[oa(r)]=r,n[oa(a.attribute)]=r}return new zn(t,n,e.space)}const vl=vn({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),bl=vn({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function _l(e,t){return t in e?e[t]:t}function kl(e,t){return _l(e,t.toLowerCase())}const Sl=vn({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:kl,properties:{xmlns:null,xmlnsXLink:null}}),jl=vn({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:He,ariaAutoComplete:null,ariaBusy:He,ariaChecked:He,ariaColCount:M,ariaColIndex:M,ariaColSpan:M,ariaControls:Ie,ariaCurrent:null,ariaDescribedBy:Ie,ariaDetails:null,ariaDisabled:He,ariaDropEffect:Ie,ariaErrorMessage:null,ariaExpanded:He,ariaFlowTo:Ie,ariaGrabbed:He,ariaHasPopup:null,ariaHidden:He,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ie,ariaLevel:M,ariaLive:null,ariaModal:He,ariaMultiLine:He,ariaMultiSelectable:He,ariaOrientation:null,ariaOwns:Ie,ariaPlaceholder:null,ariaPosInSet:M,ariaPressed:He,ariaReadOnly:He,ariaRelevant:null,ariaRequired:He,ariaRoleDescription:Ie,ariaRowCount:M,ariaRowIndex:M,ariaRowSpan:M,ariaSelected:He,ariaSetSize:M,ariaSort:null,ariaValueMax:M,ariaValueMin:M,ariaValueNow:M,ariaValueText:null,role:null}}),Eg=vn({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:kl,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:yn,acceptCharset:Ie,accessKey:Ie,action:null,allow:null,allowFullScreen:ue,allowPaymentRequest:ue,allowUserMedia:ue,alt:null,as:null,async:ue,autoCapitalize:null,autoComplete:Ie,autoFocus:ue,autoPlay:ue,blocking:Ie,capture:null,charSet:null,checked:ue,cite:null,className:Ie,cols:M,colSpan:null,content:null,contentEditable:He,controls:ue,controlsList:Ie,coords:M|yn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ue,defer:ue,dir:null,dirName:null,disabled:ue,download:xl,draggable:He,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ue,formTarget:null,headers:Ie,height:M,hidden:ue,high:M,href:null,hrefLang:null,htmlFor:Ie,httpEquiv:Ie,id:null,imageSizes:null,imageSrcSet:null,inert:ue,inputMode:null,integrity:null,is:null,isMap:ue,itemId:null,itemProp:Ie,itemRef:Ie,itemScope:ue,itemType:Ie,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ue,low:M,manifest:null,max:null,maxLength:M,media:null,method:null,min:null,minLength:M,multiple:ue,muted:ue,name:null,nonce:null,noModule:ue,noValidate:ue,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ue,optimum:M,pattern:null,ping:Ie,placeholder:null,playsInline:ue,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ue,referrerPolicy:null,rel:Ie,required:ue,reversed:ue,rows:M,rowSpan:M,sandbox:Ie,scope:null,scoped:ue,seamless:ue,selected:ue,shadowRootClonable:ue,shadowRootDelegatesFocus:ue,shadowRootMode:null,shape:null,size:M,sizes:null,slot:null,span:M,spellCheck:He,src:null,srcDoc:null,srcLang:null,srcSet:null,start:M,step:null,style:null,tabIndex:M,target:null,title:null,translate:null,type:null,typeMustMatch:ue,useMap:null,value:He,width:M,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ie,axis:null,background:null,bgColor:null,border:M,borderColor:null,bottomMargin:M,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ue,declare:ue,event:null,face:null,frame:null,frameBorder:null,hSpace:M,leftMargin:M,link:null,longDesc:null,lowSrc:null,marginHeight:M,marginWidth:M,noResize:ue,noHref:ue,noShade:ue,noWrap:ue,object:null,profile:null,prompt:null,rev:null,rightMargin:M,rules:null,scheme:null,scrolling:He,standby:null,summary:null,text:null,topMargin:M,valueType:null,version:null,vAlign:null,vLink:null,vSpace:M,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ue,disableRemotePlayback:ue,prefix:null,property:null,results:M,security:null,unselectable:null}}),Cg=vn({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:_l,properties:{about:lt,accentHeight:M,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:M,amplitude:M,arabicForm:null,ascent:M,attributeName:null,attributeType:null,azimuth:M,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:M,by:null,calcMode:null,capHeight:M,className:Ie,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:M,diffuseConstant:M,direction:null,display:null,dur:null,divisor:M,dominantBaseline:null,download:ue,dx:null,dy:null,edgeMode:null,editable:null,elevation:M,enableBackground:null,end:null,event:null,exponent:M,externalResourcesRequired:null,fill:null,fillOpacity:M,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:yn,g2:yn,glyphName:yn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:M,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:M,horizOriginX:M,horizOriginY:M,id:null,ideographic:M,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:M,k:M,k1:M,k2:M,k3:M,k4:M,kernelMatrix:lt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:M,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:M,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:M,overlineThickness:M,paintOrder:null,panose1:null,path:null,pathLength:M,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ie,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:M,pointsAtY:M,pointsAtZ:M,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:lt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:lt,rev:lt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:lt,requiredFeatures:lt,requiredFonts:lt,requiredFormats:lt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:M,specularExponent:M,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:M,strikethroughThickness:M,string:null,stroke:null,strokeDashArray:lt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:M,strokeOpacity:M,strokeWidth:null,style:null,surfaceScale:M,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:lt,tabIndex:M,tableValues:null,target:null,targetX:M,targetY:M,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:lt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:M,underlineThickness:M,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:M,values:null,vAlphabetic:M,vMathematical:M,vectorEffect:null,vHanging:M,vIdeographic:M,version:null,vertAdvY:M,vertOriginX:M,vertOriginY:M,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:M,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),Ag=wl([bl,vl,Sl,jl,Eg],"html"),Og=wl([bl,vl,Sl,jl,Cg],"svg");function Ng(e){if(e.allowedElements&&e.disallowedElements)throw new TypeError("Only one of `allowedElements` and `disallowedElements` should be defined");if(e.allowedElements||e.disallowedElements||e.allowElement)return t=>{ta(t,"element",(n,r,o)=>{const a=o;let i;if(e.allowedElements?i=!e.allowedElements.includes(n.tagName):e.disallowedElements&&(i=e.disallowedElements.includes(n.tagName)),!i&&e.allowElement&&typeof r=="number"&&(i=!e.allowElement(n,r,a)),i&&typeof r=="number")return e.unwrapDisallowed&&n.children?a.children.splice(r,1,...n.children):a.children.splice(r,1),r})}}const El=["http","https","mailto","tel"];function Ig(e){const t=(e||"").trim(),n=t.charAt(0);if(n==="#"||n==="/")return t;const r=t.indexOf(":");if(r===-1)return t;let o=-1;for(;++o<El.length;){const a=El[o];if(r===a.length&&t.slice(0,a.length).toLowerCase()===a)return t}return o=t.indexOf("?"),o!==-1&&r>o||(o=t.indexOf("#"),o!==-1&&r>o)?t:"javascript:void(0)"}var Fg=Ae(1316);function Pg(e){const t=e&&typeof e=="object"&&e.type==="text"?e.value||"":e;return typeof t=="string"&&t.replace(/[ \t\n\f\r]/g,"")===""}const Dg=/^data[-\w.:]+$/i,Cl=/-[a-z]/g,Tg=/[A-Z]/g;function Mg(e,t){const n=oa(t);let r=t,o=ft;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Dg.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Cl,Lg);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Cl.test(a)){let i=a.replace(Tg,Rg);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}o=ia}return new o(r,t)}function Rg(e){return"-"+e.toLowerCase()}function Lg(e){return e.charAt(1).toUpperCase()}const Al={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};function j1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function zg(e){return e.join(" ").trim()}function E1(e){const t=[],n=String(e||"");let r=n.indexOf(","),o=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const i=n.slice(o,r).trim();(i||!a)&&t.push(i),o=r+1,r=n.indexOf(",",o)}return t}function Bg(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}var Vg=Ae(1065);const sa={}.hasOwnProperty,$g=new Set(["table","thead","tbody","tfoot","tr"]);function Ol(e,t){const n=[];let r=-1,o;for(;++r<t.children.length;)o=t.children[r],o.type==="element"?n.push(Hg(e,o,r,t)):o.type==="text"?(t.type!=="element"||!$g.has(t.tagName)||!Pg(o))&&n.push(o.value):o.type==="raw"&&!e.options.skipHtml&&n.push(o.value);return n}function Hg(e,t,n,r){const o=e.options,a=e.schema,i=t.tagName,l={};let u=a,c;if(a.space==="html"&&i==="svg"&&(u=Og,e.schema=u),t.properties)for(c in t.properties)sa.call(t.properties,c)&&Wg(l,c,t.properties[c],e);(i==="ol"||i==="ul")&&e.listDepth++;const d=Ol(e,t);(i==="ol"||i==="ul")&&e.listDepth--,e.schema=a;const f=t.position||{start:{line:null,column:null,offset:null},end:{line:null,column:null,offset:null}},m=o.components&&sa.call(o.components,i)?o.components[i]:i,p=typeof m=="string"||m===g.Fragment;if(!Fg.isValidElementType(m))throw new TypeError(`Component for name \`${i}\` not defined or is not renderable`);if(l.key=[i,f.start.line,f.start.column,n].join("-"),i==="a"&&o.linkTarget&&(l.target=typeof o.linkTarget=="function"?o.linkTarget(String(l.href||""),t.children,typeof l.title=="string"?l.title:null):o.linkTarget),i==="a"&&o.transformLinkUri&&(l.href=o.transformLinkUri(String(l.href||""),t.children,typeof l.title=="string"?l.title:null)),!p&&i==="code"&&r.type==="element"&&r.tagName!=="pre"&&(l.inline=!0),!p&&(i==="h1"||i==="h2"||i==="h3"||i==="h4"||i==="h5"||i==="h6")&&(l.level=Number.parseInt(i.charAt(1),10)),i==="img"&&o.transformImageUri&&(l.src=o.transformImageUri(String(l.src||""),String(l.alt||""),typeof l.title=="string"?l.title:null)),!p&&i==="li"&&r.type==="element"){const S=Ug(t);l.checked=S&&S.properties?!!S.properties.checked:null,l.index=la(r,t),l.ordered=r.tagName==="ol"}return!p&&(i==="ol"||i==="ul")&&(l.ordered=i==="ol",l.depth=e.listDepth),(i==="td"||i==="th")&&(l.align&&(l.style||(l.style={}),l.style.textAlign=l.align,delete l.align),p||(l.isHeader=i==="th")),!p&&i==="tr"&&r.type==="element"&&(l.isHeader=r.tagName==="thead"),o.sourcePos&&(l["data-sourcepos"]=Yg(f)),!p&&o.rawSourcePos&&(l.sourcePosition=t.position),!p&&o.includeElementIndex&&(l.index=la(r,t),l.siblingCount=la(r)),p||(l.node=t),d.length>0?g.createElement(m,l,d):g.createElement(m,l)}function Ug(e){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n.type==="element"&&n.tagName==="input")return n}return null}function la(e,t){let n=-1,r=0;for(;++n<e.children.length&&e.children[n]!==t;)e.children[n].type==="element"&&r++;return r}function Wg(e,t,n,r){const o=Mg(r.schema,t);let a=n;a==null||a!==a||(Array.isArray(a)&&(a=o.commaSeparated?Bg(a):zg(a)),o.property==="style"&&typeof a=="string"&&(a=qg(a)),o.space&&o.property?e[sa.call(Al,o.property)?Al[o.property]:o.property]=a:o.attribute&&(e[o.attribute]=a))}function qg(e){const t={};try{Vg(e,n)}catch{}return t;function n(r,o){const a=r.slice(0,4)==="-ms-"?`ms-${r.slice(4)}`:r;t[a.replace(/-([a-z])/g,Gg)]=o}}function Gg(e,t){return t.toUpperCase()}function Yg(e){return[e.start.line,":",e.start.column,"-",e.end.line,":",e.end.column].map(t=>String(t)).join("")}const Nl={}.hasOwnProperty,Kg="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Cr={renderers:{to:"components",id:"change-renderers-to-components"},astPlugins:{id:"remove-buggy-html-in-markdown-parser"},allowDangerousHtml:{id:"remove-buggy-html-in-markdown-parser"},escapeHtml:{id:"remove-buggy-html-in-markdown-parser"},source:{to:"children",id:"change-source-to-children"},allowNode:{to:"allowElement",id:"replace-allownode-allowedtypes-and-disallowedtypes"},allowedTypes:{to:"allowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},disallowedTypes:{to:"disallowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},includeNodeIndex:{to:"includeElementIndex",id:"change-includenodeindex-to-includeelementindex"}};function ua(e){for(const a in Cr)if(Nl.call(Cr,a)&&Nl.call(e,a)){const i=Cr[a];console.warn(`[react-markdown] Warning: please ${i.to?`use \`${i.to}\` instead of`:"remove"} \`${a}\` (see <${Kg}#${i.id}> for more info)`),delete Cr[a]}const t=Of().use(Lm).use(e.remarkPlugins||e.plugins||[]).use(bg,{allowDangerousHtml:!0}).use(e.rehypePlugins||[]).use(Ng,e),n=new Cs;typeof e.children=="string"?n.value=e.children:e.children!==void 0&&e.children!==null&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${e.children}\`)`);const r=t.runSync(t.parse(n),n);if(r.type!=="root")throw new TypeError("Expected a `root` node");let o=g.createElement(g.Fragment,{},Ol({options:e,schema:Ag,listDepth:0},r));return e.className&&(o=g.createElement("div",{className:e.className},o)),o}ua.defaultProps={transformLinkUri:Ig},ua.propTypes={children:fe.string,className:fe.string,allowElement:fe.func,allowedElements:fe.arrayOf(fe.string),disallowedElements:fe.arrayOf(fe.string),unwrapDisallowed:fe.bool,remarkPlugins:fe.arrayOf(fe.oneOfType([fe.object,fe.func,fe.arrayOf(fe.oneOfType([fe.object,fe.func]))])),rehypePlugins:fe.arrayOf(fe.oneOfType([fe.object,fe.func,fe.arrayOf(fe.oneOfType([fe.object,fe.func]))])),sourcePos:fe.bool,rawSourcePos:fe.bool,skipHtml:fe.bool,includeElementIndex:fe.bool,transformLinkUri:fe.oneOfType([fe.func,fe.bool]),linkTarget:fe.oneOfType([fe.func,fe.string]),transformImageUri:fe.func,components:fe.object};const Xg={h1:({children:e})=>(0,s.jsx)("h1",{className:"wdo:text-xl wdo:font-bold wdo:mb-2 wdo:mt-4 wdo:dark:text-white",children:e}),h2:({children:e})=>(0,s.jsx)("h2",{className:"wdo:text-base wdo:font-semibold wdo:mb-2 wdo:mt-3 wdo:text-gray-900 wdo:dark:text-gray-100",children:e}),h3:({children:e})=>(0,s.jsx)("h3",{className:"wdo:text-sm wdo:font-semibold wdo:mb-1 wdo:mt-2 wdo:text-gray-800 wdo:dark:text-gray-200",children:e}),p:({children:e})=>(0,s.jsx)("p",{className:"wdo:mb-2 last:wdo:mb-0",children:e}),ul:({children:e})=>(0,s.jsx)("ul",{className:"wdo:list-disc wdo:ml-4 wdo:mb-2",children:e}),ol:({children:e})=>(0,s.jsx)("ol",{className:"wdo:list-decimal wdo:ml-4 wdo:mb-2",children:e}),li:({children:e})=>(0,s.jsx)("li",{className:"wdo:mb-0.5",children:e}),strong:({children:e})=>(0,s.jsx)("strong",{className:"wdo:font-semibold",children:e}),em:({children:e})=>(0,s.jsx)("em",{className:"wdo:italic",children:e}),pre:({children:e})=>(0,s.jsx)("div",{className:"wdo:mb-2",children:e}),hr:()=>(0,s.jsx)("hr",{className:"wdo:border-gray-200 wdo:dark:border-gray-600 wdo:my-3"}),code:({inline:e,children:t})=>e?(0,s.jsx)("code",{className:"wdo:bg-gray-100 wdo:dark:bg-gray-700 wdo:px-1 wdo:py-0.5 wdo:rounded wdo:text-xs wdo:font-mono",children:t}):(0,s.jsx)("code",{className:"wdo:block wdo:bg-gray-100 wdo:dark:bg-gray-700 wdo:p-3 wdo:rounded wdo:text-xs wdo:font-mono wdo:overflow-x-auto",children:t})},ca=({text:e})=>(0,s.jsx)("div",{className:"wdo:text-sm wdo:text-gray-800 wdo:dark:text-gray-200",children:(0,s.jsx)(ua,{components:Xg,children:e})});/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Qg=te("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Zg=te("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Il=te("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Jg=te("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),Fl="asp_ai_diagnostic_sessions",ew=10,Pl=()=>{try{return JSON.parse(localStorage.getItem(Fl)??"[]")}catch{return[]}},tw=e=>{try{localStorage.setItem(Fl,JSON.stringify(e.slice(0,ew)))}catch{}},nw=e=>{try{return new Date(e).toLocaleDateString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}},Le=({label:e,value:t,span:n,highlight:r})=>(0,s.jsxs)("div",{className:`${n?"wdo:col-span-2":""} ${r==="warn"?"wdo:text-amber-600 wdo:dark:text-amber-400":""} ${r==="info"?"wdo:text-blue-600 wdo:dark:text-blue-400":""}`,children:[(0,s.jsxs)("span",{className:"wdo:font-medium",children:[e," "]}),t]}),rw=({packet:e})=>{const[t,n]=(0,g.useState)(!1),r=Array.isArray(e.enabled_post_types)?e.enabled_post_types:[],o=Array.isArray(e.post_statuses)?e.post_statuses:[],a=Array.isArray(e.phrase_tokens)?e.phrase_tokens:[],i=Array.isArray(e.stopped_tokens)?e.stopped_tokens:[],l=Array.isArray(e.short_tokens_dropped)?e.short_tokens_dropped:[],u=Array.isArray(e.index_hits)?e.index_hits:[],c=Array.isArray(e.include_terms)?e.include_terms:[],d=Array.isArray(e.exclude_terms)?e.exclude_terms:[],f=Array.isArray(e.matching_priority_groups)?e.matching_priority_groups:[],m=e.user_content_filter?e.user_content_filter:null,p=S=>S.map(_=>`${_.name||`#${_.term_id}`} (${_.taxonomy})`).join(", ");return(0,s.jsxs)("div",{className:"wdo:border-t wdo:border-gray-100 wdo:dark:border-gray-700",children:[(0,s.jsxs)("button",{className:"wdo:flex wdo:items-center wdo:gap-1 wdo:px-6 wdo:py-2 wdo:text-xs wdo:text-gray-500 wdo:dark:text-gray-400 wdo:hover:text-gray-700 wdo:dark:hover:text-gray-200 wdo:w-full wdo:text-left",onClick:()=>n(S=>!S),children:[t?(0,s.jsx)(Qg,{size:12}):(0,s.jsx)(Zg,{size:12}),(0,h.__)("Diagnostic context","ajax-search-pro")]}),t&&(0,s.jsxs)("div",{className:"wdo:px-6 wdo:pb-4 wdo:grid wdo:grid-cols-2 wdo:gap-x-6 wdo:gap-y-2 wdo:text-xs wdo:text-gray-600 wdo:dark:text-gray-400",children:[(0,s.jsx)(Le,{label:(0,h.__)("Post types:","ajax-search-pro"),value:r.join(", ")||"\u2014"}),(0,s.jsx)(Le,{label:(0,h.__)("Keyword logic:","ajax-search-pro"),value:String(e.keyword_logic??"\u2014")}),(0,s.jsx)(Le,{label:(0,h.__)("Min word length:","ajax-search-pro"),value:String(e.min_word_length??"\u2014")}),(0,s.jsx)(Le,{label:(0,h.__)("Post statuses:","ajax-search-pro"),value:o.join(", ")||"publish"}),(0,s.jsx)(Le,{label:(0,h.__)("Stopwords:","ajax-search-pro"),value:e.stopwords_enabled?(0,h.__)("enabled","ajax-search-pro"):(0,h.__)("disabled","ajax-search-pro")}),e.include_password_protected&&(0,s.jsx)(Le,{label:(0,h.__)("Password-protected posts:","ajax-search-pro"),value:(0,h.__)("included","ajax-search-pro"),highlight:"info"}),e.exact_match_only&&(0,s.jsx)(Le,{span:!0,label:(0,h.__)("Exact match only:","ajax-search-pro"),value:`${String(e.exact_match_location??"anywhere")}${e.exact_match_secondary?(0,h.__)(", secondary logic allowed","ajax-search-pro"):""}`,highlight:"info"}),a.length>0&&(0,s.jsx)(Le,{span:!0,label:(0,h.__)("Tokens searched:","ajax-search-pro"),value:a.join(", ")}),i.length>0&&(0,s.jsx)(Le,{span:!0,label:(0,h.__)("Stopped words:","ajax-search-pro"),value:i.join(", "),highlight:"warn"}),l.length>0&&(0,s.jsx)(Le,{span:!0,label:(0,h.__)("Too short (dropped):","ajax-search-pro"),value:l.join(", "),highlight:"warn"}),u.length>0&&(0,s.jsxs)("div",{className:"wdo:col-span-2",children:[(0,s.jsx)("span",{className:"wdo:font-medium wdo:block wdo:mb-0.5",children:(0,h.__)("Index hits:","ajax-search-pro")}),u.map((S,_)=>(0,s.jsxs)("div",{className:"wdo:ml-2",children:[S.term," \u2014 ",S.total_occurrences," ",(0,h.__)("occurrences","ajax-search-pro")," (",S.post_types.join(", "),")"]},_))]}),u.length===0&&a.length>0&&(0,s.jsx)(Le,{span:!0,label:(0,h.__)("Index hits:","ajax-search-pro"),value:(0,h.__)("none found \u2014 phrase may not be indexed","ajax-search-pro"),highlight:"warn"}),c.length>0&&(0,s.jsx)(Le,{span:!0,label:(0,h.__)("Include only terms:","ajax-search-pro"),value:p(c),highlight:"info"}),d.length>0&&(0,s.jsx)(Le,{span:!0,label:(0,h.__)("Exclude terms:","ajax-search-pro"),value:p(d),highlight:"warn"}),e.date_filter_enabled&&(0,s.jsx)(Le,{label:(0,h.__)("Date filter:","ajax-search-pro"),value:(0,h.__)("active","ajax-search-pro"),highlight:"info"}),m&&(0,s.jsx)(Le,{label:(0,h.__)("User content filter:","ajax-search-pro"),value:`${m.op_type} ${m.user_count} user(s)`,highlight:"info"}),e.has_custom_field_filters&&(0,s.jsx)(Le,{label:(0,h.__)("Custom field filters:","ajax-search-pro"),value:`${(0,h.__)("active","ajax-search-pro")} (logic: ${String(e.custom_field_logic??"AND")})`,highlight:"info"}),f.length>0&&(0,s.jsx)(Le,{span:!0,label:(0,h.__)("Priority groups matched:","ajax-search-pro"),value:f.map(S=>S.name).join(", ")}),e.excluded_post_count>0&&(0,s.jsx)(Le,{label:(0,h.__)("Excluded posts:","ajax-search-pro"),value:String(e.excluded_post_count),highlight:"warn"}),e.include_cpt_ids_count>0&&(0,s.jsx)(Le,{label:(0,h.__)("CPT ID inclusions:","ajax-search-pro"),value:String(e.include_cpt_ids_count)}),e.exclude_cpt_ids_count>0&&(0,s.jsx)(Le,{label:(0,h.__)("CPT ID exclusions:","ajax-search-pro"),value:String(e.exclude_cpt_ids_count),highlight:"warn"}),e.cf_exclusion_rules_count>0&&(0,s.jsx)(Le,{label:(0,h.__)("CF exclusion rules:","ajax-search-pro"),value:String(e.cf_exclusion_rules_count),highlight:"warn"}),e.taxonomy_exclusion_rules_count>0&&(0,s.jsx)(Le,{label:(0,h.__)("Taxonomy exclusion rules:","ajax-search-pro"),value:String(e.taxonomy_exclusion_rules_count),highlight:"warn"})]})]})};var ow=()=>{const[e,t]=(0,g.useState)(()=>Pl()),[n,r]=(0,g.useState)(()=>Pl()[0]??null),[o,a]=(0,g.useState)(!1),[i,l]=(0,g.useState)(""),[u,c]=(0,g.useState)(null),[d,f]=(0,g.useState)(""),[m,p]=(0,g.useState)(""),[S,_]=(0,g.useState)(!1),[y,w]=(0,g.useState)(null),k=(0,g.useRef)(null);(0,g.useEffect)(()=>{k.current?.scrollIntoView({behavior:"smooth"})},[n?.messages]);const j=(C,N)=>{const A=[C,...N.filter(T=>T.id!==C.id)];t(A),tw(A)},I=C=>{const N=C?.phrase??i,A=C?.aspId??u,T=C?.aspName??d;if(!N.trim()||A===null)return;_(!0),w(null);const L={phrase:N.trim(),asp_id:A};C?.force&&(L.force=!0),$()({path:"/ajax-search-pro/ai/diagnostic/start",method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(L)}).then(V=>{const H={id:String(Date.now()),phrase:N.trim(),aspId:A,aspName:T,conversationId:V.conversation_id??"",messages:[{role:"ai",text:V.reply}],packet:V.packet??null,startedAt:new Date().toISOString()};r(H),j(H,e)}).catch(V=>{w(V.message??(0,h.__)("Failed to start diagnostic.","ajax-search-pro"))}).finally(()=>{_(!1)})},F=()=>{if(!m.trim()||!n)return;const C=m.trim(),N=n,A={...n,messages:[...n.messages,{role:"user",text:C}]};p(""),r(A),_(!0),w(null),$()({path:"/ajax-search-pro/ai/diagnostic/message",method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({conversation_id:n.conversationId,message:C})}).then(T=>{const L={...A,messages:[...A.messages,{role:"ai",text:T.reply}]};r(L),j(L,e)}).catch(T=>{w(T.message??(0,h.__)("Failed to send message.","ajax-search-pro")),r(N),p(C)}).finally(()=>{_(!1)})},x=()=>{r(null),l(""),c(null),f(""),p(""),w(null)},E=C=>{r(C),w(null)},D=C=>{C.key==="Enter"&&!C.shiftKey&&(C.preventDefault(),F())};return(0,s.jsxs)("div",{className:"wdo:flex wdo:h-full",children:[o&&(0,s.jsxs)("div",{className:"wdo:w-52 wdo:shrink-0 wdo:m-4 wdo:mr-0 wdo:card wdo:p-0 wdo:overflow-y-auto",children:[(0,s.jsx)("div",{className:"wdo:px-3 wdo:py-2 wdo:text-xs wdo:font-medium wdo:text-gray-500 wdo:dark:text-gray-400 wdo:border-b wdo:border-gray-100 wdo:dark:border-gray-700",children:(0,h.__)("History","ajax-search-pro")}),e.length===0?(0,s.jsx)("p",{className:"wdo:p-3 wdo:text-xs wdo:text-gray-400",children:(0,h.__)("No past sessions.","ajax-search-pro")}):e.map(C=>(0,s.jsxs)("button",{className:`wdo:w-full wdo:text-left wdo:px-3 wdo:py-2 wdo:text-xs wdo:border-b wdo:border-gray-100 wdo:dark:border-gray-700 wdo:hover:bg-gray-50 wdo:dark:hover:bg-gray-700 ${n?.id===C.id?"wdo:bg-violet-50 wdo:dark:bg-violet-900/20":""}`,onClick:()=>E(C),children:[(0,s.jsx)("div",{className:"wdo:font-medium wdo:text-gray-800 wdo:dark:text-gray-200 wdo:truncate",children:C.phrase}),C.aspName&&(0,s.jsx)("div",{className:"wdo:text-gray-400 wdo:truncate",children:C.aspName}),(0,s.jsx)("div",{className:"wdo:text-gray-400 wdo:mt-0.5",children:nw(C.startedAt)})]},C.id))]}),(0,s.jsxs)("div",{className:"wdo:flex wdo:flex-col wdo:gap-4 wdo:m-4 wdo:flex-1 wdo:min-w-0",children:[n===null&&(0,s.jsxs)("div",{className:"wdo:card wdo:p-6",children:[(0,s.jsx)("h2",{className:"wdo:text-[1.2em] wdo:dark:text-white wdo:mb-4",children:(0,h.__)("Search Diagnostics","ajax-search-pro")}),(0,s.jsx)("p",{className:"wdo:text-sm wdo:text-gray-500 wdo:dark:text-gray-400 wdo:mb-6",children:(0,h.__)("Enter the search phrase your user typed and select the search instance. The AI will analyse your index, stopwords, and priority rules to explain why results may be missing or unexpected.","ajax-search-pro")}),(0,s.jsxs)("div",{className:"wdo:flex wdo:flex-col wdo:gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"wdo:block wdo:text-sm wdo:font-medium wdo:text-gray-700 wdo:dark:text-gray-300 wdo:mb-1",children:(0,h.__)("Search phrase","ajax-search-pro")}),(0,s.jsx)("input",{type:"text",className:"wdo:w-full wdo:border wdo:border-gray-300 wdo:dark:border-gray-600 wdo:rounded wdo:px-3 wdo:py-2 wdo:text-sm wdo:bg-white wdo:dark:bg-gray-700 wdo:text-gray-900 wdo:dark:text-gray-100 wdo:focus:outline-none wdo:focus:ring-2 wdo:focus:ring-wp-admin-500",placeholder:(0,h.__)("e.g. bluetooth speaker","ajax-search-pro"),value:i,onChange:C=>l(C.target.value),onKeyDown:C=>{C.key==="Enter"&&I()},disabled:S})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"wdo:block wdo:text-sm wdo:font-medium wdo:text-gray-700 wdo:dark:text-gray-300 wdo:mb-1",children:(0,h.__)("Search instance","ajax-search-pro")}),(0,s.jsx)("div",{className:"wdo:w-72",children:(0,s.jsx)(To,{onChange:C=>{const N=C;c(parseInt(N.value,10)),f(N.label)}})})]}),y&&(0,s.jsx)("p",{className:"wdo:text-sm wdo:text-red-600 wdo:dark:text-red-400",children:y}),(0,s.jsxs)("div",{className:"wdo:flex wdo:items-center wdo:gap-3",children:[(0,s.jsx)(Xe,{isLoading:S,disabled:S||!i.trim()||u===null,onClick:C=>{C.preventDefault(),I()},children:(0,h.__)("Run Diagnostic","ajax-search-pro")}),e.length>0&&(0,s.jsxs)(Se,{onClick:()=>a(C=>!C),children:[(0,s.jsx)(Il,{size:14,className:"wdo:mr-1 wdo:inline"}),(0,h.__)("History","ajax-search-pro")," (",e.length,")"]})]})]})]}),n!==null&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"wdo:card wdo:overflow-hidden",children:[(0,s.jsxs)("div",{className:"wdo:flex wdo:items-center wdo:justify-between wdo:px-6 wdo:py-4 wdo:border-b wdo:border-gray-200 wdo:dark:border-gray-700",children:[(0,s.jsx)("div",{children:(0,s.jsxs)("h2",{className:"wdo:text-[1.1em] wdo:font-medium wdo:dark:text-white",children:[(0,h.__)("Diagnostic:","ajax-search-pro")," ",(0,s.jsx)("span",{className:"wdo:text-violet-600 wdo:dark:text-violet-400",children:n.phrase}),n.aspName&&(0,s.jsxs)("span",{className:"wdo:text-sm wdo:font-normal wdo:text-gray-400 wdo:dark:text-gray-500 wdo:ml-2",children:[(0,h.__)("in","ajax-search-pro")," ",n.aspName]})]})}),(0,s.jsxs)("div",{className:"wdo:flex wdo:gap-2",children:[e.length>0&&(0,s.jsxs)(Se,{onClick:()=>a(C=>!C),disabled:S,children:[(0,s.jsx)(Il,{size:14,className:"wdo:mr-1 wdo:inline"}),(0,h.__)("History","ajax-search-pro")]}),(0,s.jsxs)(Se,{onClick:x,disabled:S,children:[(0,s.jsx)(Jg,{size:14,className:"wdo:mr-1 wdo:inline"}),(0,h.__)("New Diagnostic","ajax-search-pro")]})]})]}),n.packet&&(0,s.jsx)(rw,{packet:n.packet}),(0,s.jsxs)("div",{className:"wdo:flex wdo:flex-col wdo:gap-4 wdo:p-6 wdo:max-h-[32rem] wdo:overflow-y-auto",children:[n.messages.map((C,N)=>(0,s.jsx)("div",{className:C.role==="user"?"wdo:self-end wdo:max-w-[80%] wdo:bg-gray-100 wdo:dark:bg-gray-700 wdo:rounded-2xl wdo:rounded-br-sm wdo:px-4 wdo:py-3":"wdo:self-start wdo:max-w-[85%] wdo:bg-white wdo:dark:bg-gray-800 wdo:border wdo:border-gray-200 wdo:dark:border-gray-600 wdo:rounded-2xl wdo:rounded-bl-sm wdo:px-4 wdo:py-3 wdo:shadow-sm",children:C.role==="ai"?(0,s.jsx)(ca,{text:C.text}):(0,s.jsx)("span",{className:"wdo:text-sm wdo:text-gray-800 wdo:dark:text-gray-200",children:C.text})},N)),S&&(0,s.jsx)("div",{className:"wdo:self-start wdo:bg-white wdo:dark:bg-gray-800 wdo:border wdo:border-gray-200 wdo:dark:border-gray-600 wdo:rounded-2xl wdo:rounded-bl-sm wdo:px-4 wdo:py-3 wdo:shadow-sm",children:(0,s.jsx)("span",{className:"wdo:text-sm wdo:text-gray-400 wdo:dark:text-gray-500 wdo:animate-pulse",children:(0,h.__)("Analysing\u2026","ajax-search-pro")})}),(0,s.jsx)("div",{ref:k})]})]}),(0,s.jsx)("div",{className:"wdo:card wdo:p-4",children:n.conversationId?(0,s.jsxs)(s.Fragment,{children:[y&&(0,s.jsx)("p",{className:"wdo:text-sm wdo:text-red-600 wdo:dark:text-red-400 wdo:mb-3",children:y}),(0,s.jsxs)("div",{className:"wdo:flex wdo:gap-3 wdo:items-end",children:[(0,s.jsx)("textarea",{className:"wdo:flex-1 wdo:border wdo:border-gray-300 wdo:dark:border-gray-600 wdo:rounded wdo:px-3 wdo:py-2 wdo:text-sm wdo:bg-white wdo:dark:bg-gray-700 wdo:text-gray-900 wdo:dark:text-gray-100 wdo:focus:outline-none wdo:focus:ring-2 wdo:focus:ring-wp-admin-500 wdo:resize-none",rows:2,placeholder:(0,h.__)("Ask a follow-up question\u2026 (Enter to send, Shift+Enter for new line)","ajax-search-pro"),value:m,onChange:C=>p(C.target.value),onKeyDown:D,disabled:S}),(0,s.jsx)(Xe,{isLoading:S,disabled:S||!m.trim(),onClick:C=>{C.preventDefault(),F()},children:(0,h.__)("Send","ajax-search-pro")})]})]}):(0,s.jsxs)("div",{className:"wdo:flex wdo:items-center wdo:justify-between wdo:gap-4",children:[(0,s.jsx)("p",{className:"wdo:text-sm wdo:text-gray-500 wdo:dark:text-gray-400",children:(0,h.__)("This result was served from cache.","ajax-search-pro")}),(0,s.jsx)(Se,{disabled:S,onClick:()=>I({force:!0,phrase:n.phrase,aspId:n.aspId,aspName:n.aspName}),children:(0,h.__)("Start new conversation","ajax-search-pro")})]})})]})]})]})};/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Bn=te("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),Dl=(e,t)=>`asp_ai_synonym_added:${e}:${t??""}`,Tl=(e,t)=>{try{return JSON.parse(localStorage.getItem(Dl(e,t))??"[]")}catch{return[]}},aw=(e,t,n)=>{localStorage.setItem(Dl(t,n),JSON.stringify(e))},Ml=typeof ajaxurl<"u"?ajaxurl.replace("admin-ajax.php","admin.php?page=asp_ai_features"):"";var iw=({phrase:e,lang:t,label:n,existingSynonyms:r=[],onAdded:o})=>{const{addError:a}=sn(),[i,l]=(0,g.useState)(!1),[u,c]=(0,g.useState)(!1),[d,f]=(0,g.useState)(null),[m,p]=(0,g.useState)(null),[S,_]=(0,g.useState)(()=>Tl(e,t)),[y,w]=(0,g.useState)(null),[k,j]=(0,g.useState)(!1),[I,F]=(0,g.useState)(null),x=(0,g.useRef)(null),E=(0,g.useRef)(null);(0,g.useEffect)(()=>{p(null),w(null),j(!1),l(!1),_(Tl(e,t))},[e,t]),(0,g.useEffect)(()=>{if(!i)return;const A=T=>{x.current?.contains(T.target)||E.current?.contains(T.target)||l(!1)};return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[i]),(0,g.useEffect)(()=>{if(!i)return;const A=()=>{const T=x.current?.getBoundingClientRect();T&&F({top:T.bottom+4,right:window.innerWidth-T.right})};return window.addEventListener("scroll",A,!0),window.addEventListener("resize",A),()=>{window.removeEventListener("scroll",A,!0),window.removeEventListener("resize",A)}},[i]);const D=()=>{if(i)return;const A=x.current?.getBoundingClientRect();A&&F({top:A.bottom+4,right:window.innerWidth-A.right}),l(!0),!(m!==null||u)&&(c(!0),w(null),$()({path:(0,Zt.addQueryArgs)("/ajax-search-pro/ai/synonym-discover",{phrase:e,...t?{lang:t}:{}})}).then(T=>{p(T.suggestions)}).catch(T=>{T?.code==="feature_disabled"?j(!0):w(T.message??(0,h.__)("Error loading suggestions.","ajax-search-pro"))}).finally(()=>{c(!1)}))},C=A=>{f(A),$()({path:"/ajax-search-pro/ai/synonym-apply",method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({keyword:e,synonym:A,...t?{lang:t}:{}})}).then(()=>{_(T=>{const L=[...T,A];return aw(L,e,t),L}),o?.()}).catch(T=>{a(T)}).finally(()=>{f(null)})},N=i&&I?oe().createPortal((0,s.jsxs)("div",{ref:E,style:{position:"fixed",top:I.top,right:I.right,zIndex:99999,width:"18rem"},className:"wdo:bg-white wdo:dark:bg-gray-800 wdo:rounded wdo:border wdo:border-gray-200 wdo:dark:border-gray-600 wdo:shadow-xl",children:[(0,s.jsxs)("div",{className:"wdo:flex wdo:items-center wdo:justify-between wdo:px-3 wdo:py-2 wdo:border-b wdo:border-gray-100 wdo:dark:border-gray-700",children:[(0,s.jsxs)("span",{className:"wdo:text-xs wdo:font-medium wdo:text-gray-600 wdo:dark:text-gray-400 wdo:truncate",children:[(0,h.__)("Synonyms for","ajax-search-pro")," ",(0,s.jsxs)("span",{className:"wdo:text-gray-900 wdo:dark:text-gray-100",children:['"',e,'"']})]}),(0,s.jsx)("button",{className:"wdo:ml-2 wdo:shrink-0 wdo:p-0.5 wdo:rounded wdo:border-0 wdo:bg-transparent wdo:text-gray-400 wdo:hover:text-gray-700 wdo:dark:hover:text-gray-200 wdo:cursor-pointer",onClick:()=>l(!1),"aria-label":(0,h.__)("Close","ajax-search-pro"),children:(0,s.jsx)(qn,{size:14})})]}),(0,s.jsxs)("div",{className:"wdo:p-3",children:[u&&(0,s.jsx)("p",{className:"wdo:text-sm wdo:text-gray-500 wdo:py-2 wdo:text-center",children:(0,h.__)("Loading suggestions\u2026","ajax-search-pro")}),!u&&k&&(0,s.jsxs)("p",{className:"wdo:text-xs wdo:text-gray-600 wdo:dark:text-gray-400 wdo:py-2",children:[(0,h.__)("AI Synonym Discovery is disabled.","ajax-search-pro")," ",Ml&&(0,s.jsxs)("a",{href:Ml,target:"_blank",rel:"noreferrer",className:"wdo:underline",children:[(0,h.__)("Enable in Search AI settings","ajax-search-pro")," \u2192"]})]}),!u&&!k&&y&&(0,s.jsx)("p",{className:"wdo:text-sm wdo:text-red-600 wdo:dark:text-red-400 wdo:py-2",children:y}),!u&&!k&&!y&&m!==null&&m.length===0&&(0,s.jsx)("p",{className:"wdo:text-sm wdo:text-gray-500 wdo:dark:text-gray-400 wdo:py-2",children:(0,h.__)("No suggestions found.","ajax-search-pro")}),!u&&!k&&!y&&m!==null&&m.length>0&&(0,s.jsx)("ul",{className:"wdo:flex wdo:flex-col wdo:gap-2",children:m.map(A=>{const T=A.term.toLowerCase(),L=S.some(V=>V.toLowerCase()===T)||r.some(V=>V.toLowerCase()===T);return(0,s.jsxs)("li",{className:"wdo:flex wdo:flex-col wdo:gap-0.5 wdo:border-b wdo:border-gray-100 wdo:dark:border-gray-700 wdo:pb-2 last:wdo:border-0 last:wdo:pb-0",children:[(0,s.jsxs)("div",{className:"wdo:flex wdo:items-center wdo:justify-between wdo:gap-2",children:[(0,s.jsx)("span",{className:"wdo:font-medium wdo:text-gray-900 wdo:dark:text-gray-100 wdo:text-sm",children:A.term}),!!A.occurrences&&(0,s.jsxs)("span",{className:"wdo:text-xs wdo:text-gray-400 wdo:shrink-0",children:[A.occurrences," ",(0,h.__)("hits","ajax-search-pro")]})]}),A.reason&&(0,s.jsx)("p",{className:"wdo:text-xs wdo:italic wdo:text-gray-500 wdo:dark:text-gray-400",children:A.reason}),L?(0,s.jsxs)("span",{className:"wdo:mt-1 wdo:self-start wdo:inline-flex wdo:items-center wdo:gap-1 wdo:px-2 wdo:py-0.5 wdo:rounded wdo:bg-green-100 wdo:dark:bg-green-900/40 wdo:text-green-700 wdo:dark:text-green-400 wdo:text-xs wdo:font-medium",children:[(0,s.jsx)(Bn,{size:11}),(0,h.__)("Added","ajax-search-pro")]}):(0,s.jsx)("button",{className:"wdo:mt-1 wdo:self-start wdo:px-2 wdo:py-0.5 wdo:rounded wdo:bg-wp-admin-600 wdo:text-white wdo:text-xs wdo:cursor-pointer wdo:hover:bg-wp-admin-700 wdo:border-0 wdo:disabled:opacity-50",disabled:d===A.term,onClick:()=>C(A.term),children:d===A.term?(0,h.__)("Adding\u2026","ajax-search-pro"):(0,h.__)("Add","ajax-search-pro")})]},A.term)})})]})]}),document.getElementById("wdo")??document.body):null;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("button",{ref:x,className:"wdo:px-3 wdo:py-1 wdo:rounded wdo:bg-violet-600 wdo:text-white wdo:cursor-pointer wdo:hover:bg-violet-700 wdo:border wdo:border-violet-500 wdo:dark:bg-violet-700 wdo:dark:hover:bg-violet-600 wdo:dark:border-violet-600 wdo:flex wdo:items-center wdo:gap-1.5 wdo:whitespace-nowrap",onClick:D,children:[(0,s.jsx)(Ca,{size:13,className:"wdo:animate-pulse wdo:[animation-duration:2.5s]"}),n??(0,h.__)("Discover","ajax-search-pro")]}),N]})};const da=e=>{try{const t=Date.now()-new Date(e.replace(" ","T")).getTime(),n=Math.floor(t/6e4);return n<2?(0,h.__)("just now","ajax-search-pro"):n<60?`${n} ${(0,h.__)("minutes ago","ajax-search-pro")}`:`${Math.floor(n/60)} ${(0,h.__)("hour(s) ago","ajax-search-pro")}`}catch{return e}};function ha(e,t={}){const[n,r]=(0,g.useState)(null),[o,a]=(0,g.useState)(t.defaultDays??30),[i,l]=(0,g.useState)(null),[u,c]=(0,g.useState)(!1),[d,f]=(0,g.useState)(null),m=(0,g.useRef)(0),p=()=>{m.current++,l(null),c(!1)};return{aspId:n,setAspId:w=>{p(),r(w)},days:o,setDays:w=>{p(),a(w)},result:i,setResult:l,loading:u,error:d,run:(w=!1)=>{const k=++m.current;c(!0),f(null);const j={asp_id:n??0};t.withDays&&(j.days=o),w&&(j.force="1"),$()({path:(0,Zt.addQueryArgs)(e,j)}).then(I=>{k===m.current&&l(I)}).catch(I=>{k===m.current&&f(I.message??t.errorMessage??(0,h.__)("Request failed. Please try again.","ajax-search-pro"))}).finally(()=>{k===m.current&&c(!1)})}}}const sw=[7,14,30,90];var pa=({onRun:e,onInstanceChange:t,loading:n,hasResult:r,error:o,runLabel:a,rerunLabel:i,icon:l,days:u,onDaysChange:c,daysOptions:d=sw})=>{const f=typeof u=="number"&&typeof c=="function";return(0,s.jsxs)("div",{className:"wdo:card wdo:p-5",children:[(0,s.jsxs)("div",{className:"wdo:flex wdo:flex-wrap wdo:items-end wdo:gap-4",children:[(0,s.jsxs)("div",{className:"wdo:flex wdo:flex-col wdo:gap-1 wdo:min-w-52",children:[(0,s.jsx)("label",{className:"wdo:text-xs wdo:font-medium wdo:text-gray-600 wdo:dark:text-gray-400",children:(0,h.__)("Search instance","ajax-search-pro")}),(0,s.jsx)(To,{onChange:m=>t(m?parseInt(m.value):null),placeholder:(0,h.__)("All instances","ajax-search-pro")})]}),f&&(0,s.jsxs)("div",{className:"wdo:flex wdo:flex-col wdo:gap-1",children:[(0,s.jsx)("label",{className:"wdo:text-xs wdo:font-medium wdo:text-gray-600 wdo:dark:text-gray-400",children:(0,h.__)("Period","ajax-search-pro")}),(0,s.jsx)("div",{className:"wdo:flex wdo:rounded wdo:border wdo:border-gray-200 wdo:dark:border-gray-600 wdo:overflow-hidden",children:d.map(m=>(0,s.jsxs)("button",{type:"button",onClick:()=>c(m),className:`wdo:px-3 wdo:py-1.5 wdo:text-sm wdo:cursor-pointer wdo:border-0 wdo:border-r wdo:last:border-r-0 wdo:border-gray-200 wdo:dark:border-gray-600 ${u===m?"wdo:bg-violet-600 wdo:text-white":"wdo:bg-white wdo:dark:bg-gray-700 wdo:text-gray-700 wdo:dark:text-gray-200 wdo:hover:bg-gray-50 wdo:dark:hover:bg-gray-600"}`,children:[m,"d"]},m))})]}),(0,s.jsxs)("div",{className:"wdo:flex wdo:gap-2 wdo:ml-auto",children:[r&&(0,s.jsxs)(Se,{disabled:n,onClick:()=>e(!0),children:[(0,s.jsx)(Do,{size:13,className:"wdo:mr-1 wdo:inline"}),(0,h.__)("Refresh","ajax-search-pro")]}),(0,s.jsxs)(Xe,{isLoading:n,disabled:n,onClick:()=>e(),children:[(0,s.jsx)("span",{className:"wdo:mr-1.5 wdo:inline-flex wdo:items-center wdo:![color:inherit]",children:l}),r?i??(0,h.__)("Re-run","ajax-search-pro"):a]})]})]}),o&&(0,s.jsx)("p",{className:"wdo:mt-3 wdo:text-sm wdo:text-red-600 wdo:dark:text-red-400",children:o})]})};const Rl=e=>e>25?"wdo:text-red-600 wdo:dark:text-red-400":e>10?"wdo:text-amber-600 wdo:dark:text-amber-400":"wdo:text-green-600 wdo:dark:text-green-400",lw=e=>e<10?"wdo:text-red-600 wdo:dark:text-red-400":e<25?"wdo:text-amber-600 wdo:dark:text-amber-400":"wdo:text-green-600 wdo:dark:text-green-400",Ar=({label:e,value:t,sub:n,colorClass:r})=>(0,s.jsxs)("div",{className:"wdo:bg-gray-50 wdo:dark:bg-gray-700/50 wdo:rounded wdo:p-4 wdo:text-center",children:[(0,s.jsx)("div",{className:`wdo:text-2xl wdo:font-bold wdo:mb-0.5 ${r??"wdo:text-gray-900 wdo:dark:text-white"}`,children:t}),(0,s.jsx)("div",{className:"wdo:text-xs wdo:text-gray-500 wdo:dark:text-gray-400 wdo:font-medium",children:e}),n&&(0,s.jsx)("div",{className:"wdo:text-xs wdo:text-gray-400 wdo:dark:text-gray-500 wdo:mt-0.5",children:n})]}),fa=({label:e,count:t,zeroRate:n,total:r})=>{const o=r>0?Math.round(t/r*100):0;return(0,s.jsxs)("div",{className:"wdo:flex wdo:items-center wdo:gap-3 wdo:text-sm",children:[(0,s.jsx)("span",{className:"wdo:w-16 wdo:text-gray-600 wdo:dark:text-gray-400 wdo:shrink-0",children:e}),(0,s.jsx)("div",{className:"wdo:flex-1 wdo:bg-gray-200 wdo:dark:bg-gray-600 wdo:rounded-full wdo:h-1.5",children:(0,s.jsx)("div",{className:"wdo:bg-violet-500 wdo:h-1.5 wdo:rounded-full",style:{width:`${o}%`}})}),(0,s.jsx)("span",{className:"wdo:w-12 wdo:text-right wdo:text-gray-700 wdo:dark:text-gray-300",children:t.toLocaleString()}),(0,s.jsxs)("span",{className:`wdo:w-16 wdo:text-right wdo:text-xs wdo:font-medium ${Rl(n)}`,children:[n,"% zero"]})]})};var uw=()=>{const e=(0,g.useContext)(_n),{setAspId:t,days:n,setDays:r,result:o,loading:a,error:i,run:l}=ha("/ajax-search-pro/ai/quality-report",{withDays:!0,defaultDays:30,errorMessage:(0,h.__)("Failed to generate report.","ajax-search-pro")}),u=o?.stats;return(0,s.jsxs)("div",{className:"wdo:flex wdo:flex-col wdo:gap-4 wdo:m-4",children:[(0,s.jsx)(pa,{onRun:l,onInstanceChange:t,loading:a,hasResult:!!o,error:i,runLabel:(0,h.__)("Generate Report","ajax-search-pro"),icon:(0,s.jsx)(Na,{size:13}),days:n,onDaysChange:r}),u&&(0,s.jsxs)("div",{className:"wdo:card wdo:p-5 wdo:flex wdo:flex-col wdo:gap-5",children:[(0,s.jsxs)("div",{className:"wdo:grid wdo:grid-cols-2 wdo:gap-3 md:wdo:grid-cols-4",children:[(0,s.jsx)(Ar,{label:(0,h.__)("Total searches","ajax-search-pro"),value:u.total_searches.toLocaleString(),sub:`${u.unique_phrases.toLocaleString()} ${(0,h.__)("unique phrases","ajax-search-pro")}`}),(0,s.jsx)(Ar,{label:(0,h.__)("Zero-results rate","ajax-search-pro"),value:`${u.zero_results_rate}%`,sub:`${u.zero_results_count.toLocaleString()} ${(0,h.__)("searches","ajax-search-pro")}`,colorClass:Rl(u.zero_results_rate)}),(0,s.jsx)(Ar,{label:(0,h.__)("Click-through rate","ajax-search-pro"),value:`${u.click_through_rate}%`,sub:`${u.searches_with_clicks.toLocaleString()} ${(0,h.__)("searches with clicks","ajax-search-pro")}`,colorClass:lw(u.click_through_rate)}),(0,s.jsx)(Ar,{label:(0,h.__)("Avg. results returned","ajax-search-pro"),value:String(u.avg_results)})]}),u.device.desktop.count+u.device.mobile.count+u.device.tablet.count>0&&(0,s.jsxs)("div",{className:"wdo:flex wdo:flex-col wdo:gap-2",children:[(0,s.jsx)("h3",{className:"wdo:text-xs wdo:font-semibold wdo:text-gray-500 wdo:dark:text-gray-400 wdo:uppercase wdo:tracking-wider",children:(0,h.__)("By device","ajax-search-pro")}),(0,s.jsx)(fa,{label:(0,h.__)("Desktop","ajax-search-pro"),count:u.device.desktop.count,zeroRate:u.device.desktop.zero_rate,total:u.total_searches}),(0,s.jsx)(fa,{label:(0,h.__)("Mobile","ajax-search-pro"),count:u.device.mobile.count,zeroRate:u.device.mobile.zero_rate,total:u.total_searches}),(0,s.jsx)(fa,{label:(0,h.__)("Tablet","ajax-search-pro"),count:u.device.tablet.count,zeroRate:u.device.tablet.zero_rate,total:u.total_searches})]})]}),o&&(0,s.jsxs)("div",{className:"wdo:card wdo:overflow-hidden",children:[(0,s.jsx)("div",{className:"wdo:flex wdo:items-center wdo:justify-between wdo:px-5 wdo:py-3 wdo:border-b wdo:border-gray-100 wdo:dark:border-gray-700",children:(0,s.jsxs)("span",{className:"wdo:text-xs wdo:text-gray-500 wdo:dark:text-gray-400",children:[o.cached?(0,h.__)("Cached report","ajax-search-pro"):(0,h.__)("Fresh report","ajax-search-pro")," \xB7 ",da(o.generated_at)]})}),(0,s.jsx)("div",{className:"wdo:p-5",children:(0,s.jsx)(ca,{text:o.report})})]}),u&&u.top_zero_results.length>0&&(0,s.jsxs)("div",{className:"wdo:card wdo:overflow-hidden",children:[(0,s.jsx)("div",{className:"wdo:px-5 wdo:py-3 wdo:border-b wdo:border-gray-100 wdo:dark:border-gray-700",children:(0,s.jsx)("h3",{className:"wdo:text-sm wdo:font-semibold wdo:text-gray-700 wdo:dark:text-gray-200",children:(0,h.__)("Top zero-results phrases","ajax-search-pro")})}),(0,s.jsxs)("table",{className:"wdo:w-full wdo:text-sm",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{className:"wdo:border-b wdo:border-gray-100 wdo:dark:border-gray-700 wdo:text-xs wdo:text-gray-500 wdo:dark:text-gray-400",children:[(0,s.jsx)("th",{className:"wdo:text-left wdo:px-5 wdo:py-2 wdo:font-medium",children:(0,h.__)("Phrase","ajax-search-pro")}),(0,s.jsx)("th",{className:"wdo:text-right wdo:px-5 wdo:py-2 wdo:font-medium",children:(0,h.__)("Searches","ajax-search-pro")}),(0,s.jsx)("th",{className:"wdo:text-right wdo:px-4 wdo:py-2 wdo:font-medium",children:(0,h.__)("Actions","ajax-search-pro")})]})}),(0,s.jsx)("tbody",{children:u.top_zero_results.map(c=>(0,s.jsxs)("tr",{className:"wdo:border-b wdo:border-gray-50 wdo:dark:border-gray-700/50 last:wdo:border-0 wdo:hover:bg-gray-50/50 wdo:dark:hover:bg-gray-700/20",children:[(0,s.jsx)("td",{className:"wdo:px-5 wdo:py-2.5 wdo:font-medium wdo:text-gray-800 wdo:dark:text-gray-200",children:c.phrase}),(0,s.jsx)("td",{className:"wdo:px-5 wdo:py-2.5 wdo:text-right wdo:text-gray-500 wdo:dark:text-gray-400",children:c.count.toLocaleString()}),(0,s.jsx)("td",{className:"wdo:px-4 wdo:py-2.5",children:(0,s.jsxs)("div",{className:"wdo:flex wdo:gap-2 wdo:justify-end",children:[(0,s.jsx)(iw,{phrase:c.phrase}),(0,s.jsxs)(Se,{onClick:()=>e?.setActiveId("diagnostics"),children:[(0,s.jsx)(Ia,{size:12,className:"wdo:mr-1 wdo:inline"}),(0,h.__)("Diagnose","ajax-search-pro")]})]})})]},c.phrase))})]})]})]})};/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const cw=te("shopping-cart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]);/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const dw=te("newspaper",[["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-4 0v-9a2 2 0 0 1 2-2h2",key:"39pd36"}],["rect",{width:"8",height:"4",x:"10",y:"6",rx:"1",key:"aywv1n"}]]);/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const hw=te("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const pw=te("building-2",[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]]);/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const fw=te("layout-grid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ll=te("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const zl=te("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const mw=te("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]),Bl=["type","content","engine","behavior","review"],gw=[{id:"woocommerce",icon:cw,label:(0,h.__)("WooCommerce Store","ajax-search-pro"),desc:(0,h.__)("Products and shopping","ajax-search-pro")},{id:"blog",icon:dw,label:(0,h.__)("Blog / News","ajax-search-pro"),desc:(0,h.__)("Articles and posts","ajax-search-pro")},{id:"docs",icon:hw,label:(0,h.__)("Documentation","ajax-search-pro"),desc:(0,h.__)("Knowledge base or guides","ajax-search-pro")},{id:"corporate",icon:pw,label:(0,h.__)("Corporate","ajax-search-pro"),desc:(0,h.__)("Business pages and services","ajax-search-pro")},{id:"mixed",icon:fw,label:(0,h.__)("Mixed / Other","ajax-search-pro"),desc:(0,h.__)("Multiple content types","ajax-search-pro")}],ww=[{id:"post",label:(0,h.__)("Blog Posts","ajax-search-pro")},{id:"page",label:(0,h.__)("Pages","ajax-search-pro")},{id:"product",label:(0,h.__)("WooCommerce Products","ajax-search-pro")}],xw=[{value:"english",label:"English"},{value:"german",label:"Deutsch"},{value:"french",label:"Fran\xE7ais"},{value:"spanish",label:"Espa\xF1ol"},{value:"portuguese",label:"Portugu\xEAs"},{value:"italian",label:"Italiano"},{value:"dutch",label:"Nederlands"},{value:"swedish",label:"Svenska"},{value:"danish",label:"Dansk"},{value:"norwegian",label:"Norsk"},{value:"finnish",label:"Suomi"},{value:"russian",label:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439"},{value:"hungarian",label:"Magyar"},{value:"romanian",label:"Rom\xE2n\u0103"},{value:"turkish",label:"T\xFCrk\xE7e"}],Vl={siteType:"blog",contentTypes:["post","page"],includeUsers:!1,includeAttachments:!1,engine:"regular",searchTerms:!1,indexCustomFields:[],indexPdf:!1,keywordLogic:"and",searchInContent:!0,showDescriptions:!0,language:"english"},ma=({label:e,desc:t,checked:n,onToggle:r})=>(0,s.jsxs)("div",{role:"checkbox","aria-checked":n,tabIndex:0,onClick:r,onKeyDown:o=>{(o.key===" "||o.key==="Enter")&&(o.preventDefault(),r())},className:`wdo:flex wdo:items-center wdo:gap-3 wdo:p-3 wdo:rounded wdo:border-2 wdo:cursor-pointer wdo:select-none wdo:transition-colors ${n?"wdo:border-violet-500 wdo:bg-violet-50 wdo:dark:bg-violet-900/20":"wdo:border-gray-200 wdo:dark:border-gray-600 wdo:hover:border-violet-300"}`,children:[(0,s.jsx)("div",{className:`wdo:w-5 wdo:h-5 wdo:rounded wdo:border-2 wdo:flex wdo:items-center wdo:justify-center wdo:shrink-0 wdo:transition-colors ${n?"wdo:border-violet-500 wdo:bg-violet-500":"wdo:border-gray-300 wdo:dark:border-gray-500 wdo:bg-white wdo:dark:bg-gray-700"}`,children:n&&(0,s.jsx)(Bn,{size:12,className:"wdo:text-white"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:`wdo:text-sm wdo:font-medium wdo:block ${n?"wdo:text-violet-700 wdo:dark:text-violet-300":"wdo:text-gray-800 wdo:dark:text-gray-200"}`,children:e}),t&&(0,s.jsx)("span",{className:"wdo:text-xs wdo:text-gray-400 wdo:dark:text-gray-500",children:t})]})]}),mt=({active:e,onClick:t,children:n})=>(0,s.jsx)("button",{onClick:t,className:`wdo:px-3 wdo:py-1.5 wdo:text-sm wdo:rounded wdo:cursor-pointer wdo:border wdo:transition-colors ${e?"wdo:bg-violet-600 wdo:text-white wdo:border-violet-600":"wdo:bg-white wdo:dark:bg-gray-700 wdo:border-gray-300 wdo:dark:border-gray-600 wdo:text-gray-700 wdo:dark:text-gray-200 wdo:hover:border-violet-400"}`,children:n}),yw=({current:e})=>{if(e==="done")return null;const t=Bl.indexOf(e);return(0,s.jsx)("div",{className:"wdo:flex wdo:items-center wdo:justify-center wdo:gap-2 wdo:mb-6",children:Bl.map((n,r)=>{const o=r<t,a=r===t;return(0,s.jsxs)(q().Fragment,{children:[r>0&&(0,s.jsx)("div",{className:`wdo:h-0.5 wdo:w-6 ${o?"wdo:bg-violet-400":"wdo:bg-gray-200 wdo:dark:bg-gray-600"}`}),(0,s.jsx)("div",{className:`wdo:w-7 wdo:h-7 wdo:rounded-full wdo:flex wdo:items-center wdo:justify-center wdo:text-xs wdo:font-semibold ${a?"wdo:bg-violet-600 wdo:text-white":o?"wdo:bg-violet-100 wdo:dark:bg-violet-900/40 wdo:text-violet-700 wdo:dark:text-violet-400":"wdo:bg-gray-100 wdo:dark:bg-gray-700 wdo:text-gray-400"}`,children:o?(0,s.jsx)(Bn,{size:12}):r+1})]},n)})})},Vn=({title:e,subtitle:t})=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h2",{className:"wdo:text-lg wdo:font-semibold wdo:dark:text-white wdo:mb-1",children:e}),(0,s.jsx)("p",{className:"wdo:text-sm wdo:text-gray-500 wdo:dark:text-gray-400 wdo:mb-5",children:t})]}),Or=({onBack:e,onNext:t,nextLabel:n,nextLoading:r,nextDisabled:o})=>(0,s.jsxs)("div",{className:"wdo:flex wdo:justify-between wdo:mt-6",children:[e?(0,s.jsxs)(Se,{onClick:e,children:["\u2190 ",(0,h.__)("Back","ajax-search-pro")]}):(0,s.jsx)("span",{}),t&&(0,s.jsx)(Xe,{isLoading:r,disabled:r||o,onClick:t,children:n??`${(0,h.__)("Next","ajax-search-pro")} \u2192`})]}),Dt="wdo:text-xs wdo:font-semibold wdo:text-gray-500 wdo:dark:text-gray-400 wdo:uppercase wdo:tracking-wider wdo:mb-2 wdo:block",ga="wdo:border wdo:border-gray-300 wdo:dark:border-gray-600 wdo:rounded wdo:px-3 wdo:py-2 wdo:text-sm wdo:bg-white wdo:dark:bg-gray-700 wdo:text-gray-900 wdo:dark:text-gray-100 wdo:focus:outline-none wdo:focus:ring-2 wdo:focus:ring-violet-500";var vw=()=>{const[e,t]=(0,g.useState)("type"),[n,r]=(0,g.useState)(Vl),[o,a]=(0,g.useState)(null),[i,l]=(0,g.useState)(""),[u,c]=(0,g.useState)(!1),[d,f]=(0,g.useState)(!1),[m,p]=(0,g.useState)(null),[S,_]=(0,g.useState)(null),[y,w]=(0,g.useState)(""),k=N=>r(A=>({...A,...N})),j=N=>k({contentTypes:n.contentTypes.includes(N)?n.contentTypes.filter(A=>A!==N):[...n.contentTypes,N]}),I=N=>{p(null),t(N)};(0,g.useEffect)(()=>{e==="engine"&&n.siteType==="woocommerce"&&n.indexCustomFields.length===0&&k({indexCustomFields:["_sku"]})},[e]);const F=()=>{const N=y.trim();N&&!n.indexCustomFields.includes(N)&&k({indexCustomFields:[...n.indexCustomFields,N]}),w("")},x=N=>k({indexCustomFields:n.indexCustomFields.filter(A=>A!==N)}),E=()=>{if(n.contentTypes.length===0){p((0,h.__)("Please select at least one content type.","ajax-search-pro"));return}c(!0),p(null),$()({path:"/ajax-search-pro/ai/wizard/generate",method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({site_type:n.siteType,content_types:n.contentTypes,include_users:n.includeUsers,include_attachments:n.includeAttachments,engine:n.engine,search_terms:n.searchTerms,index_custom_fields:n.indexCustomFields,index_pdf:n.indexPdf,keyword_logic:n.keywordLogic,search_in_content:n.searchInContent,show_descriptions:n.showDescriptions,language:n.language})}).then(N=>{a(N.config),l(N.config.instance_name??""),t("review")}).catch(N=>{p(N.message??(0,h.__)("Failed to generate configuration. Please try again.","ajax-search-pro"))}).finally(()=>c(!1))},D=()=>{if(!o||!i.trim()){p((0,h.__)("Please enter a name for this search instance.","ajax-search-pro"));return}f(!0),p(null),$()({path:"/ajax-search-pro/ai/instance/create",method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:i.trim(),options:o.options,engine:n.engine,search_terms:n.searchTerms,content_types:n.contentTypes,index_custom_fields:n.indexCustomFields,index_pdf:n.indexPdf})}).then(N=>{_(N),t("done")}).catch(N=>{p(N.message??(0,h.__)("Failed to create instance. Please try again.","ajax-search-pro"))}).finally(()=>f(!1))},C=()=>{t("type"),r(Vl),a(null),l(""),p(null),_(null),w("")};return(0,s.jsx)("div",{className:"wdo:m-4",children:(0,s.jsxs)("div",{className:"wdo:card wdo:p-6 wdo:max-w-2xl wdo:mx-auto",children:[(0,s.jsx)(yw,{current:e}),e==="type"&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Vn,{title:(0,h.__)("What type of site is this?","ajax-search-pro"),subtitle:(0,h.__)("This helps the AI tailor the search configuration to your content.","ajax-search-pro")}),(0,s.jsx)("div",{className:"wdo:grid wdo:grid-cols-2 wdo:gap-3 sm:wdo:grid-cols-3",children:gw.map(({id:N,icon:A,label:T,desc:L})=>(0,s.jsxs)("button",{onClick:()=>k({siteType:N}),className:`wdo:flex wdo:flex-col wdo:items-center wdo:gap-2 wdo:p-4 wdo:rounded wdo:border-2 wdo:cursor-pointer wdo:text-center wdo:transition-colors ${n.siteType===N?"wdo:border-violet-500 wdo:bg-violet-50 wdo:dark:bg-violet-900/20":"wdo:border-gray-200 wdo:dark:border-gray-600 wdo:hover:border-violet-300"}`,children:[(0,s.jsx)(A,{size:24,className:n.siteType===N?"wdo:text-violet-600 wdo:dark:text-violet-400":"wdo:text-gray-400"}),(0,s.jsx)("span",{className:`wdo:text-sm wdo:font-medium ${n.siteType===N?"wdo:text-violet-700 wdo:dark:text-violet-300":"wdo:text-gray-700 wdo:dark:text-gray-200"}`,children:T}),(0,s.jsx)("span",{className:"wdo:text-xs wdo:text-gray-400 wdo:dark:text-gray-500",children:L})]},N))}),(0,s.jsx)(Or,{onNext:()=>{n.siteType==="woocommerce"&&k({contentTypes:["product"]}),t("content")}})]}),e==="content"&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Vn,{title:(0,h.__)("What should the search cover?","ajax-search-pro"),subtitle:(0,h.__)("Select all content types visitors should be able to find.","ajax-search-pro")}),m&&(0,s.jsx)("p",{className:"wdo:text-sm wdo:text-red-600 wdo:dark:text-red-400 wdo:mb-3",children:m}),(0,s.jsx)("div",{className:"wdo:grid wdo:grid-cols-2 wdo:gap-2 wdo:mb-4",children:ww.map(({id:N,label:A})=>(0,s.jsx)(ma,{label:A,checked:n.contentTypes.includes(N),onToggle:()=>{p(null),j(N)}},N))}),(0,s.jsxs)("div",{className:"wdo:border-t wdo:border-gray-100 wdo:dark:border-gray-700 wdo:pt-3 wdo:flex wdo:flex-col wdo:gap-2",children:[(0,s.jsx)(ma,{label:(0,h.__)("User profiles","ajax-search-pro"),desc:(0,h.__)("Let visitors search registered users","ajax-search-pro"),checked:n.includeUsers,onToggle:()=>k({includeUsers:!n.includeUsers})}),(0,s.jsx)(ma,{label:(0,h.__)("Attachments / PDFs","ajax-search-pro"),desc:(0,h.__)("Include uploaded files in search results","ajax-search-pro"),checked:n.includeAttachments,onToggle:()=>k({includeAttachments:!n.includeAttachments})})]}),(0,s.jsx)(Or,{onBack:()=>I("type"),onNext:()=>{if(n.contentTypes.length===0){p((0,h.__)("Please select at least one content type.","ajax-search-pro"));return}p(null),t("engine")}})]}),e==="engine"&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Vn,{title:(0,h.__)("Search engine","ajax-search-pro"),subtitle:(0,h.__)("Choose how the search processes queries on your site.","ajax-search-pro")}),(0,s.jsx)("div",{className:"wdo:grid wdo:grid-cols-2 wdo:gap-3 wdo:mb-4",children:[{id:"regular",icon:Ll,label:(0,h.__)("Standard Search","ajax-search-pro"),desc:(0,h.__)("Real-time MySQL search. Works everywhere with zero setup.","ajax-search-pro")},{id:"index",icon:zl,label:(0,h.__)("Index Table","ajax-search-pro"),desc:(0,h.__)("Pre-built search index. Faster for large sites. Supports PDF and custom field content.","ajax-search-pro")}].map(({id:N,icon:A,label:T,desc:L})=>(0,s.jsxs)("button",{onClick:()=>k({engine:N}),className:`wdo:flex wdo:flex-col wdo:items-start wdo:gap-2 wdo:p-4 wdo:rounded wdo:border-2 wdo:cursor-pointer wdo:text-left wdo:transition-colors ${n.engine===N?"wdo:border-violet-500 wdo:bg-violet-50 wdo:dark:bg-violet-900/20":"wdo:border-gray-200 wdo:dark:border-gray-600 wdo:hover:border-violet-300"}`,children:[(0,s.jsx)(A,{size:20,className:n.engine===N?"wdo:text-violet-600 wdo:dark:text-violet-400":"wdo:text-gray-400"}),(0,s.jsx)("span",{className:`wdo:text-sm wdo:font-semibold ${n.engine===N?"wdo:text-violet-700 wdo:dark:text-violet-300":"wdo:text-gray-800 wdo:dark:text-gray-200"}`,children:T}),(0,s.jsx)("span",{className:"wdo:text-xs wdo:text-gray-500 wdo:dark:text-gray-400 wdo:leading-relaxed",children:L})]},N))}),n.engine==="index"&&(0,s.jsxs)("div",{className:"wdo:border wdo:border-violet-200 wdo:dark:border-violet-800 wdo:bg-violet-50/30 wdo:dark:bg-violet-900/10 wdo:rounded wdo:p-4 wdo:flex wdo:flex-col wdo:gap-5 wdo:mb-2",children:[(0,s.jsx)("p",{className:"wdo:text-xs wdo:text-violet-700 wdo:dark:text-violet-400 wdo:font-medium wdo:-mb-2",children:(0,h.__)("Index Table options \u2014 these settings are shared across all instances using the index.","ajax-search-pro")}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:Dt,children:(0,h.__)("Search taxonomy terms","ajax-search-pro")}),(0,s.jsxs)("div",{className:"wdo:flex wdo:gap-2",children:[(0,s.jsx)(mt,{active:n.searchTerms,onClick:()=>k({searchTerms:!0}),children:(0,h.__)("Yes","ajax-search-pro")}),(0,s.jsx)(mt,{active:!n.searchTerms,onClick:()=>k({searchTerms:!1}),children:(0,h.__)("No","ajax-search-pro")})]}),(0,s.jsx)("p",{className:"wdo:text-xs wdo:text-gray-400 wdo:dark:text-gray-500 wdo:mt-1",children:n.searchTerms?(0,h.__)("All public taxonomy terms (categories, tags, etc.) will be indexed and appear in results.","ajax-search-pro"):(0,h.__)("Only posts and pages appear in results \u2014 no taxonomy terms.","ajax-search-pro")})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:Dt,children:(0,h.__)("Custom fields to index","ajax-search-pro")}),(0,s.jsx)("p",{className:"wdo:text-xs wdo:text-gray-500 wdo:dark:text-gray-400 wdo:mb-2",children:(0,h.__)("Field keys whose values are added to the search index (e.g. _sku, subtitle).","ajax-search-pro")}),n.indexCustomFields.length>0&&(0,s.jsx)("div",{className:"wdo:flex wdo:flex-wrap wdo:gap-1.5 wdo:mb-2",children:n.indexCustomFields.map(N=>(0,s.jsxs)("span",{className:"wdo:inline-flex wdo:items-center wdo:gap-1 wdo:px-2 wdo:py-0.5 wdo:rounded wdo:bg-violet-100 wdo:dark:bg-violet-900/40 wdo:text-violet-700 wdo:dark:text-violet-300 wdo:text-xs wdo:font-mono",children:[N,(0,s.jsx)("button",{onClick:()=>x(N),className:"wdo:ml-0.5 wdo:text-violet-400 wdo:hover:text-violet-700 wdo:dark:hover:text-violet-200 wdo:cursor-pointer wdo:border-0 wdo:bg-transparent wdo:p-0",children:(0,s.jsx)(qn,{size:11})})]},N))}),(0,s.jsxs)("div",{className:"wdo:flex wdo:gap-2",children:[(0,s.jsx)("input",{type:"text",value:y,onChange:N=>w(N.target.value),onKeyDown:N=>{N.key==="Enter"&&(N.preventDefault(),F())},placeholder:"_sku, my_custom_field\u2026",className:ga+" wdo:flex-1"}),(0,s.jsx)(Se,{onClick:F,children:(0,h.__)("Add","ajax-search-pro")})]})]}),n.includeAttachments&&(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:Dt,children:(0,h.__)("PDF & file content search","ajax-search-pro")}),(0,s.jsxs)("div",{className:"wdo:flex wdo:gap-2",children:[(0,s.jsx)(mt,{active:n.indexPdf,onClick:()=>k({indexPdf:!0}),children:(0,h.__)("Enable","ajax-search-pro")}),(0,s.jsx)(mt,{active:!n.indexPdf,onClick:()=>k({indexPdf:!1}),children:(0,h.__)("Disable","ajax-search-pro")})]}),(0,s.jsx)("p",{className:"wdo:text-xs wdo:text-gray-400 wdo:dark:text-gray-500 wdo:mt-1",children:(0,h.__)("Indexes the text content inside PDF, Word, and other document files.","ajax-search-pro")})]})]}),n.engine==="regular"&&(0,s.jsx)("div",{className:"wdo:border wdo:border-gray-100 wdo:dark:border-gray-700 wdo:rounded wdo:p-4 wdo:mb-2",children:(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:Dt,children:(0,h.__)("Search taxonomy terms","ajax-search-pro")}),(0,s.jsxs)("div",{className:"wdo:flex wdo:gap-2",children:[(0,s.jsx)(mt,{active:n.searchTerms,onClick:()=>k({searchTerms:!0}),children:(0,h.__)("Yes","ajax-search-pro")}),(0,s.jsx)(mt,{active:!n.searchTerms,onClick:()=>k({searchTerms:!1}),children:(0,h.__)("No","ajax-search-pro")})]}),(0,s.jsx)("p",{className:"wdo:text-xs wdo:text-gray-400 wdo:dark:text-gray-500 wdo:mt-1",children:(0,h.__)("Show matching categories, tags, and other taxonomy terms in the result dropdown.","ajax-search-pro")})]})}),(0,s.jsx)(Or,{onBack:()=>I("content"),onNext:()=>{p(null),t("behavior")}})]}),e==="behavior"&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Vn,{title:(0,h.__)("How should the search behave?","ajax-search-pro"),subtitle:(0,h.__)("These preferences guide the AI configuration and can be adjusted later.","ajax-search-pro")}),m&&(0,s.jsx)("p",{className:"wdo:text-sm wdo:text-red-600 wdo:dark:text-red-400 wdo:mb-3",children:m}),(0,s.jsxs)("div",{className:"wdo:flex wdo:flex-col wdo:gap-5",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:Dt,children:(0,h.__)("Keyword matching","ajax-search-pro")}),(0,s.jsxs)("div",{className:"wdo:flex wdo:gap-2",children:[(0,s.jsx)(mt,{active:n.keywordLogic==="and",onClick:()=>k({keywordLogic:"and"}),children:(0,h.__)("All words (AND)","ajax-search-pro")}),(0,s.jsx)(mt,{active:n.keywordLogic==="or",onClick:()=>k({keywordLogic:"or"}),children:(0,h.__)("Any word (OR)","ajax-search-pro")})]}),(0,s.jsx)("p",{className:"wdo:text-xs wdo:text-gray-400 wdo:dark:text-gray-500 wdo:mt-1",children:n.keywordLogic==="and"?(0,h.__)("More precise \u2014 all typed words must appear in results.","ajax-search-pro"):(0,h.__)("More results \u2014 any typed word can match.","ajax-search-pro")})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:Dt,children:(0,h.__)("Search within post content","ajax-search-pro")}),(0,s.jsxs)("div",{className:"wdo:flex wdo:gap-2",children:[(0,s.jsx)(mt,{active:n.searchInContent,onClick:()=>k({searchInContent:!0}),children:(0,h.__)("Yes \u2014 full content","ajax-search-pro")}),(0,s.jsx)(mt,{active:!n.searchInContent,onClick:()=>k({searchInContent:!1}),children:(0,h.__)("No \u2014 titles only","ajax-search-pro")})]}),(0,s.jsx)("p",{className:"wdo:text-xs wdo:text-gray-400 wdo:dark:text-gray-500 wdo:mt-1",children:n.searchInContent?(0,h.__)("Finds posts where keywords appear anywhere in the body text.","ajax-search-pro"):(0,h.__)("Faster \u2014 only matches titles and short descriptions.","ajax-search-pro")})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:Dt,children:(0,h.__)("Show descriptions in results","ajax-search-pro")}),(0,s.jsxs)("div",{className:"wdo:flex wdo:gap-2",children:[(0,s.jsx)(mt,{active:n.showDescriptions,onClick:()=>k({showDescriptions:!0}),children:(0,h.__)("Yes","ajax-search-pro")}),(0,s.jsx)(mt,{active:!n.showDescriptions,onClick:()=>k({showDescriptions:!1}),children:(0,h.__)("No \u2014 titles only","ajax-search-pro")})]}),(0,s.jsx)("p",{className:"wdo:text-xs wdo:text-gray-400 wdo:dark:text-gray-500 wdo:mt-1",children:n.showDescriptions?(0,h.__)("A short excerpt appears under each result title.","ajax-search-pro"):(0,h.__)("Compact style \u2014 just the title and image.","ajax-search-pro")})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:Dt,children:(0,h.__)("Primary language","ajax-search-pro")}),(0,s.jsx)("select",{value:n.language,onChange:N=>k({language:N.target.value}),className:ga+" wdo:max-w-xs",children:xw.map(N=>(0,s.jsx)("option",{value:N.value,children:N.label},N.value))})]})]}),(0,s.jsx)(Or,{onBack:()=>I("engine"),onNext:E,nextLabel:`\u2728 ${(0,h.__)("Generate Configuration","ajax-search-pro")}`,nextLoading:u})]}),e==="review"&&o&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Vn,{title:(0,h.__)("Review AI configuration","ajax-search-pro"),subtitle:(0,h.__)("Confirm the settings, edit the name if needed, then create the search instance.","ajax-search-pro")}),o.summary&&(0,s.jsx)("div",{className:"wdo:bg-violet-50 wdo:dark:bg-violet-900/20 wdo:rounded wdo:p-4 wdo:mb-4 wdo:text-sm wdo:text-violet-800 wdo:dark:text-violet-300",children:o.summary}),(0,s.jsxs)("div",{className:"wdo:flex wdo:items-center wdo:gap-2 wdo:mb-4",children:[n.engine==="index"?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(zl,{size:14,className:"wdo:text-violet-500"}),(0,s.jsx)("span",{className:"wdo:text-sm wdo:font-medium wdo:text-violet-700 wdo:dark:text-violet-300",children:(0,h.__)("Index Table engine","ajax-search-pro")})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Ll,{size:14,className:"wdo:text-gray-400"}),(0,s.jsx)("span",{className:"wdo:text-sm wdo:text-gray-600 wdo:dark:text-gray-400",children:(0,h.__)("Standard engine","ajax-search-pro")})]}),n.searchTerms&&(0,s.jsx)("span",{className:"wdo:ml-2 wdo:text-xs wdo:bg-gray-100 wdo:dark:bg-gray-700 wdo:text-gray-600 wdo:dark:text-gray-300 wdo:px-2 wdo:py-0.5 wdo:rounded",children:(0,h.__)("+ taxonomy terms","ajax-search-pro")}),n.engine==="index"&&n.indexCustomFields.length>0&&(0,s.jsx)("span",{className:"wdo:text-xs wdo:bg-gray-100 wdo:dark:bg-gray-700 wdo:text-gray-600 wdo:dark:text-gray-300 wdo:px-2 wdo:py-0.5 wdo:rounded",children:n.indexCustomFields.join(", ")})]}),Object.keys(o.rationale).length>0&&(0,s.jsxs)("div",{className:"wdo:mb-4",children:[(0,s.jsx)("label",{className:Dt,children:(0,h.__)("Key decisions","ajax-search-pro")}),(0,s.jsx)("div",{className:"wdo:border wdo:border-gray-200 wdo:dark:border-gray-600 wdo:rounded wdo:overflow-hidden",children:Object.entries(o.rationale).map(([N,A],T)=>(0,s.jsxs)("div",{className:`wdo:flex wdo:gap-4 wdo:px-4 wdo:py-2.5 wdo:text-sm ${T>0?"wdo:border-t wdo:border-gray-100 wdo:dark:border-gray-700":""}`,children:[(0,s.jsx)("span",{className:"wdo:font-medium wdo:text-gray-600 wdo:dark:text-gray-400 wdo:shrink-0 wdo:w-36 wdo:capitalize",children:N.replace(/_/g," ")}),(0,s.jsx)("span",{className:"wdo:text-gray-700 wdo:dark:text-gray-300",children:A})]},N))})]}),(0,s.jsxs)("div",{className:"wdo:mb-5",children:[(0,s.jsx)("label",{className:Dt+" wdo:mb-1",children:(0,h.__)("Search instance name","ajax-search-pro")}),(0,s.jsx)("input",{type:"text",value:i,onChange:N=>{l(N.target.value),p(null)},placeholder:(0,h.__)("e.g. Main Search","ajax-search-pro"),className:ga+" wdo:w-full",maxLength:100})]}),m&&(0,s.jsx)("p",{className:"wdo:text-sm wdo:text-red-600 wdo:dark:text-red-400 wdo:mb-3",children:m}),(0,s.jsxs)("div",{className:"wdo:flex wdo:justify-between",children:[(0,s.jsxs)(Se,{onClick:()=>{a(null),I("behavior")},children:["\u2190 ",(0,h.__)("Adjust answers","ajax-search-pro")]}),(0,s.jsxs)(Xe,{isLoading:d,disabled:d||!i.trim(),onClick:D,children:[(0,s.jsx)(Bn,{size:14,className:"wdo:mr-1.5 wdo:inline"}),(0,h.__)("Create Search Instance","ajax-search-pro")]})]})]}),e==="done"&&(0,s.jsxs)("div",{className:"wdo:text-center wdo:py-4",children:[(0,s.jsx)("div",{className:"wdo:w-16 wdo:h-16 wdo:rounded-full wdo:bg-green-100 wdo:dark:bg-green-900/30 wdo:flex wdo:items-center wdo:justify-center wdo:mx-auto wdo:mb-4",children:(0,s.jsx)(Bn,{size:32,className:"wdo:text-green-600 wdo:dark:text-green-400"})}),(0,s.jsx)("h2",{className:"wdo:text-xl wdo:font-bold wdo:dark:text-white wdo:mb-2",children:(0,h.__)("Search instance created!","ajax-search-pro")}),(0,s.jsxs)("p",{className:"wdo:text-sm wdo:text-gray-500 wdo:dark:text-gray-400 wdo:mb-4",children:[(0,s.jsxs)("strong",{children:['"',i,'"']})," ",(0,h.__)("is ready. Open the instance list to find it and fine-tune any settings.","ajax-search-pro")]}),S?.index_updated&&(0,s.jsxs)("div",{className:"wdo:flex wdo:items-start wdo:gap-3 wdo:bg-amber-50 wdo:dark:bg-amber-900/20 wdo:border wdo:border-amber-200 wdo:dark:border-amber-800 wdo:rounded wdo:p-4 wdo:mb-5 wdo:text-left",children:[(0,s.jsx)(Do,{size:16,className:"wdo:text-amber-600 wdo:dark:text-amber-400 wdo:shrink-0 wdo:mt-0.5"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"wdo:text-sm wdo:font-medium wdo:text-amber-800 wdo:dark:text-amber-300 wdo:mb-1",children:(0,h.__)("Re-index required","ajax-search-pro")}),(0,s.jsx)("p",{className:"wdo:text-xs wdo:text-amber-700 wdo:dark:text-amber-400",children:(0,h.__)("The index table configuration was updated. Run a new index to apply these changes to search results.","ajax-search-pro")}),S.index_url&&(0,s.jsx)("a",{href:S.index_url,className:"wdo:inline-block wdo:mt-2 wdo:text-xs wdo:text-amber-700 wdo:dark:text-amber-300 wdo:underline",children:(0,h.__)("Go to Index Table settings \u2192","ajax-search-pro")})]})]}),(0,s.jsxs)("div",{className:"wdo:flex wdo:gap-3 wdo:justify-center",children:[S&&(0,s.jsxs)("a",{href:S.edit_url,className:"wdo:inline-flex wdo:items-center wdo:gap-1.5 wdo:px-4 wdo:py-2 wdo:rounded wdo:bg-violet-600 wdo:text-white wdo:text-sm wdo:font-medium wdo:hover:bg-violet-700 wdo:no-underline",children:[(0,h.__)("Open instance list","ajax-search-pro"),(0,s.jsx)(mw,{size:13})]}),(0,s.jsx)(Se,{onClick:C,children:(0,h.__)("Create another","ajax-search-pro")})]})]})]})})};const bw=({word:e,aspId:t,onRemove:n})=>{const{addError:r}=sn(),[o,a]=(0,g.useState)(!1),i=async()=>{a(!0);try{await $()({path:"/ajax-search-pro/ai/instance-suggestions/remove-word",method:"POST",data:{asp_id:t,word:e}}),n()}catch(l){r(l?.message??(0,h.__)("Failed to remove word.","ajax-search-pro")),a(!1)}};return(0,s.jsxs)("span",{className:"wdo:inline-flex wdo:items-center wdo:gap-1 wdo:px-2 wdo:py-0.5 wdo:rounded wdo:bg-gray-100 wdo:dark:bg-gray-700 wdo:text-sm wdo:text-gray-800 wdo:dark:text-gray-200",children:[e,(0,s.jsx)("button",{onClick:i,disabled:o,className:"wdo:flex wdo:items-center wdo:text-gray-400 wdo:hover:text-red-500 wdo:disabled:opacity-40 wdo:transition-colors wdo:ml-0.5",title:(0,h.__)("Remove","ajax-search-pro"),children:(0,s.jsx)(qn,{size:12})})]})};var _w=()=>{const{addSuccess:e,addError:t}=sn(),[n,r]=(0,g.useState)([]),[o,a]=(0,g.useState)(50),[i,l]=(0,g.useState)({}),[u,c]=(0,g.useState)(!1),[d,f]=(0,g.useState)(null),m=Ss(),p=A=>$()({path:A}),{data:S,mutate:_}=un((0,Zt.addQueryArgs)("/ajax-search-pro/ai/instance-suggestions/status"),p,{revalidateOnFocus:!1}),y=m.data?.length??0,w=n.length>0?n.length:y,k=w>5||o>50,j=async()=>{l({_global:!0});try{await $()({path:"/ajax-search-pro/ai/instance-suggestions/generate",method:"POST",data:{asp_ids:n.length===0?"all":n,max_suggestions:o}}),await _(),e((0,h.__)("Suggestions generated successfully.","ajax-search-pro"))}catch(A){t(A?.message??(0,h.__)("Generation failed. Please try again.","ajax-search-pro"))}finally{l({})}},I=()=>{k?c(!0):j()},F=async A=>{f(null);try{await $()({path:"/ajax-search-pro/ai/instance-suggestions/clear",method:"DELETE",data:{asp_id:A}}),await _()}catch(T){t(T?.message??(0,h.__)("Failed to clear suggestions.","ajax-search-pro"))}},x=!!i._global,E=A=>{if(!A)return"";try{return new Date(A.replace(" ","T")).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return A}},D=Math.round(w*(o/50)*1.5*10)/10,C=Math.round(w*(o/50)*2*10)/10,N=d!==null?S?.find(A=>A.asp_id===d)?.asp_name??"":"";return(0,s.jsxs)("div",{className:"wdo:p-6 wdo:flex wdo:flex-col wdo:gap-6",children:[(0,s.jsxs)("div",{className:"wdo:card wdo:p-6 wdo:flex wdo:flex-col wdo:gap-5",children:[(0,s.jsxs)("h2",{className:"wdo:text-base wdo:font-semibold wdo:dark:text-white wdo:flex wdo:items-center wdo:gap-2",children:[(0,s.jsx)(Aa,{size:18,className:"wdo:text-asp"}),(0,h.__)("Generate Suggestions","ajax-search-pro")]}),(0,s.jsx)(kn,{label:(0,h.__)("Instances","ajax-search-pro"),description:(0,h.__)("Leave empty to generate for all instances.","ajax-search-pro"),children:(0,s.jsx)(To,{isMulti:!0,onChange:A=>r(A.map(T=>parseInt(T.value))),placeholder:(0,h.__)("All search instances","ajax-search-pro")})}),(0,s.jsx)(kn,{label:(0,h.__)("Max suggestions","ajax-search-pro"),description:(0,h.__)("Maximum keywords to generate per instance (10\u20131000).","ajax-search-pro"),children:(0,s.jsx)("input",{type:"number",min:10,max:1e3,value:o,onChange:A=>a(Math.max(10,Math.min(1e3,parseInt(A.target.value)||50))),className:"wdo:w-24 wdo:border wdo:border-gray-300 wdo:dark:border-gray-600 wdo:rounded wdo:px-2 wdo:py-1 wdo:text-sm wdo:dark:bg-gray-800 wdo:dark:text-white"})}),(0,s.jsx)("div",{className:"wdo:flex wdo:items-center wdo:gap-3",children:(0,s.jsx)(Xe,{onClick:I,disabled:x,children:x?(0,h.__)("Generating\u2026","ajax-search-pro"):(0,h.__)("Generate","ajax-search-pro")})}),(0,s.jsxs)("p",{className:"wdo:text-xs wdo:text-gray-500 wdo:dark:text-gray-400 wdo:border wdo:border-gray-200 wdo:dark:border-gray-600 wdo:rounded wdo:p-3 wdo:bg-gray-50 wdo:dark:bg-gray-800",children:[(0,h.__)("After generating, add ","ajax-search-pro"),(0,s.jsx)("strong",{children:(0,h.__)("AI Suggestions","ajax-search-pro")}),(0,h.__)(" as a source in each instance's Autocomplete or Keyword Suggestions settings to activate them.","ajax-search-pro")]})]}),S&&S.length>0&&(0,s.jsxs)("div",{className:"wdo:flex wdo:flex-col wdo:gap-4",children:[(0,s.jsx)("h3",{className:"wdo:text-sm wdo:font-semibold wdo:text-gray-700 wdo:dark:text-gray-300",children:(0,h.__)("Generated suggestions","ajax-search-pro")}),S.map(A=>(0,s.jsxs)("div",{className:"wdo:card wdo:p-5 wdo:flex wdo:flex-col wdo:gap-3",children:[(0,s.jsxs)("div",{className:"wdo:flex wdo:items-center wdo:justify-between wdo:gap-2",children:[(0,s.jsxs)("div",{className:"wdo:flex wdo:items-center wdo:gap-2 wdo:flex-wrap",children:[(0,s.jsxs)("span",{className:"wdo:font-semibold wdo:text-sm wdo:dark:text-white",children:[A.asp_id," - ",A.asp_name]}),(0,s.jsxs)("span",{className:"wdo:text-xs wdo:text-gray-500 wdo:dark:text-gray-400",children:["\xB7 ",A.count," ",(0,h.__)("suggestions","ajax-search-pro"),A.generated_at&&` \xB7 ${E(A.generated_at)}`]}),A.used_global_stats&&(0,s.jsx)("span",{className:"wdo:text-xs wdo:px-2 wdo:py-0.5 wdo:rounded-full wdo:bg-amber-100 wdo:dark:bg-amber-900/40 wdo:text-amber-700 wdo:dark:text-amber-300",children:(0,h.__)("Based on site-wide stats","ajax-search-pro")})]}),(0,s.jsx)(Xt,{onClick:()=>f(A.asp_id),className:"wdo:text-xs",children:(0,h.__)("Clear all","ajax-search-pro")})]}),(0,s.jsx)("div",{className:"wdo:flex wdo:flex-wrap wdo:gap-1.5",children:A.suggestions.map(T=>(0,s.jsx)(bw,{word:T,aspId:A.asp_id,onRemove:()=>_()},T))})]},A.asp_id))]}),(0,s.jsxs)(se,{isOpen:u,onOverlayClick:()=>c(!1),children:[(0,s.jsx)("h2",{className:"wdo:mb-2",children:(0,h.__)("High token usage","ajax-search-pro")}),(0,s.jsx)("p",{children:(0,h.__)("This generation may consume a substantial amount of your monthly token budget.","ajax-search-pro")}),(0,s.jsx)("p",{className:"wdo:text-sm wdo:text-gray-500 wdo:dark:text-gray-400 wdo:mt-3",children:(0,h.__)("Baseline estimate: 50 suggestions per instance \u2248 1.5\u20132% of monthly tokens.","ajax-search-pro")}),(0,s.jsxs)("p",{className:"wdo:text-sm wdo:font-semibold wdo:mt-2 wdo:dark:text-white",children:[w," ",(0,h.__)("instance(s)","ajax-search-pro")," \xD7 ",o," ",(0,h.__)("suggestions","ajax-search-pro")," \u2248 ",D,"\u2013",C,"% ",(0,h.__)("of monthly budget","ajax-search-pro")]}),(0,s.jsxs)("div",{className:"wdo:flex wdo:mt-6 wdo:gap-4",children:[(0,s.jsx)(Xe,{onClick:()=>{c(!1),j()},children:(0,h.__)("Generate anyway","ajax-search-pro")}),(0,s.jsx)(Se,{onClick:()=>c(!1),children:(0,h.__)("Cancel","ajax-search-pro")})]})]}),(0,s.jsxs)(se,{isOpen:d!==null,onOverlayClick:()=>f(null),children:[(0,s.jsx)("h2",{className:"wdo:mb-2",children:(0,h.__)("Clear suggestions","ajax-search-pro")}),(0,s.jsxs)("p",{children:[(0,h.__)("Are you sure you want to clear all suggestions for","ajax-search-pro")," ",(0,s.jsx)("strong",{children:N}),"?"]}),(0,s.jsx)("p",{className:"wdo:text-sm wdo:text-gray-500 wdo:dark:text-gray-400 wdo:mt-1",children:(0,h.__)("This cannot be undone. You can regenerate suggestions at any time.","ajax-search-pro")}),(0,s.jsxs)("div",{className:"wdo:flex wdo:mt-6 wdo:gap-4",children:[(0,s.jsx)(Xt,{onClick:()=>d!==null&&F(d),children:(0,h.__)("Clear","ajax-search-pro")}),(0,s.jsx)(Se,{onClick:()=>f(null),children:(0,h.__)("Cancel","ajax-search-pro")})]})]})]})};const kw={orphaned_terms:(0,h.__)("orphaned taxonomy terms","ajax-search-pro"),orphaned_posts:(0,h.__)("orphaned post references","ajax-search-pro"),empty_rule:(0,h.__)("empty rules","ajax-search-pro"),phrase_misconfigured:(0,h.__)("phrase trigger misconfigured","ajax-search-pro"),missing_name:(0,h.__)("missing group name","ajax-search-pro")};var Sw=()=>{const{setAspId:e,result:t,loading:n,error:r,run:o}=ha("/ajax-search-pro/ai/priorities-advisor",{errorMessage:(0,h.__)("Failed to run analysis.","ajax-search-pro")}),a=t?.issues.length??0;return(0,s.jsxs)("div",{className:"wdo:flex wdo:flex-col wdo:gap-4 wdo:m-4",children:[(0,s.jsx)(pa,{onRun:o,onInstanceChange:e,loading:n,hasResult:!!t,error:r,runLabel:(0,h.__)("Run Analysis","ajax-search-pro"),icon:(0,s.jsx)(Fr,{size:13})}),t&&(0,s.jsx)("div",{className:"wdo:flex wdo:items-center wdo:gap-3 wdo:flex-wrap",children:a===0?(0,s.jsxs)("span",{className:"wdo:inline-flex wdo:items-center wdo:gap-1.5 wdo:px-3 wdo:py-1 wdo:rounded-full wdo:text-xs wdo:font-medium wdo:bg-green-100 wdo:dark:bg-green-900/40 wdo:text-green-700 wdo:dark:text-green-300",children:[(0,s.jsx)(Fr,{size:12}),(0,h.__)("No issues detected","ajax-search-pro")]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("span",{className:"wdo:inline-flex wdo:items-center wdo:gap-1.5 wdo:px-3 wdo:py-1 wdo:rounded-full wdo:text-xs wdo:font-medium wdo:bg-amber-100 wdo:dark:bg-amber-900/40 wdo:text-amber-700 wdo:dark:text-amber-300",children:[a," ",(0,h.__)("issue(s) found","ajax-search-pro")]}),t.issues.map((i,l)=>(0,s.jsxs)("span",{className:"wdo:inline-flex wdo:items-center wdo:px-2.5 wdo:py-1 wdo:rounded-full wdo:text-xs wdo:bg-gray-100 wdo:dark:bg-gray-700 wdo:text-gray-600 wdo:dark:text-gray-300",title:i.group_name,children:[(0,s.jsxs)("span",{className:"wdo:font-medium wdo:mr-1",children:[i.group_name,":"]}),i.count,"\xD7 ",kw[i.type],i.taxonomy&&` (${i.taxonomy})`]},l))]})}),t&&(0,s.jsxs)("div",{className:"wdo:card wdo:p-5 wdo:flex wdo:flex-col wdo:gap-3",children:[t.report?(0,s.jsx)(ca,{text:t.report}):(0,s.jsx)("p",{className:"wdo:text-sm wdo:text-gray-500 wdo:dark:text-gray-400",children:(0,h.__)("Nothing to analyze \u2014 no issues detected and insufficient search data.","ajax-search-pro")}),(0,s.jsxs)("div",{className:"wdo:flex wdo:items-center wdo:gap-3 wdo:mt-2 wdo:pt-3 wdo:border-t wdo:border-gray-100 wdo:dark:border-gray-700 wdo:text-xs wdo:text-gray-400 wdo:dark:text-gray-500",children:[t.generated_at&&(0,s.jsxs)("span",{children:[(0,h.__)("Generated","ajax-search-pro")," ",da(t.generated_at)]}),t.cached&&(0,s.jsx)("span",{className:"wdo:bg-gray-100 wdo:dark:bg-gray-700 wdo:px-1.5 wdo:py-0.5 wdo:rounded",children:(0,h.__)("cached","ajax-search-pro")}),t.tokens_used?(0,s.jsxs)("span",{className:"wdo:ml-auto",children:[t.tokens_used.toLocaleString()," ",(0,h.__)("tokens","ajax-search-pro")]}):null]})]})]})};/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const $l=te("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const jw=te("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),Ew=e=>e==="low"?(0,s.jsxs)("span",{className:"wdo:inline-flex wdo:items-center wdo:gap-1 wdo:px-2 wdo:py-0.5 wdo:rounded-full wdo:text-xs wdo:font-medium wdo:bg-green-100 wdo:dark:bg-green-900/40 wdo:text-green-700 wdo:dark:text-green-300",children:[(0,s.jsx)($l,{size:10})," ",(0,h.__)("low risk","ajax-search-pro")]}):e==="high"?(0,s.jsxs)("span",{className:"wdo:inline-flex wdo:items-center wdo:gap-1 wdo:px-2 wdo:py-0.5 wdo:rounded-full wdo:text-xs wdo:font-medium wdo:bg-red-100 wdo:dark:bg-red-900/40 wdo:text-red-700 wdo:dark:text-red-300",children:[(0,s.jsx)(Ze,{size:10})," ",(0,h.__)("high risk","ajax-search-pro")]}):(0,s.jsxs)("span",{className:"wdo:inline-flex wdo:items-center wdo:gap-1 wdo:px-2 wdo:py-0.5 wdo:rounded-full wdo:text-xs wdo:font-medium wdo:bg-amber-100 wdo:dark:bg-amber-900/40 wdo:text-amber-700 wdo:dark:text-amber-300",children:[(0,s.jsx)(Ze,{size:10})," ",(0,h.__)("medium risk","ajax-search-pro")]});var Cw=()=>{const{setAspId:e,days:t,setDays:n,result:r,loading:o,error:a,run:i}=ha("/ajax-search-pro/ai/stopword-detector",{withDays:!0,defaultDays:30,errorMessage:(0,h.__)("Failed to run analysis.","ajax-search-pro")}),[l,u]=(0,g.useState)(new Set),[c,d]=(0,g.useState)(new Set),[f,m]=(0,g.useState)({}),[p,S]=(0,g.useState)(new Set),_=async w=>{u(k=>new Set(k).add(w)),m(k=>{const j={...k};return delete j[w],j});try{await $()({path:"/ajax-search-pro/ai/stopword-detector/remove",method:"POST",data:{word:w}}),d(k=>new Set(k).add(w))}catch(k){m(j=>({...j,[w]:k?.message??(0,h.__)("Failed to remove","ajax-search-pro")}))}finally{u(k=>{const j=new Set(k);return j.delete(w),j})}},y=w=>{S(k=>{const j=new Set(k);return j.has(w)?j.delete(w):j.add(w),j})};return(0,s.jsxs)("div",{className:"wdo:flex wdo:flex-col wdo:gap-4 wdo:m-4",children:[(0,s.jsx)(pa,{onRun:i,onInstanceChange:e,loading:o,hasResult:!!r,error:a,runLabel:(0,h.__)("Run Analysis","ajax-search-pro"),icon:(0,s.jsx)(Oa,{size:13}),days:t,onDaysChange:n}),r&&!r.stopwords_enabled&&(0,s.jsxs)("div",{className:"wdo:card wdo:p-4 wdo:flex wdo:items-start wdo:gap-3",children:[(0,s.jsx)(jw,{size:16,className:"wdo:text-blue-500 wdo:mt-0.5 wdo:shrink-0"}),(0,s.jsx)("p",{className:"wdo:text-sm wdo:text-gray-700 wdo:dark:text-gray-300",children:(0,h.__)("Stopword filtering is currently disabled in Index Table settings. Enable it to use this feature.","ajax-search-pro")})]}),r&&r.stopwords_enabled&&r.conflicts.length===0&&(0,s.jsxs)("div",{className:"wdo:flex wdo:items-center wdo:gap-2 wdo:px-3 wdo:py-2 wdo:rounded-full wdo:bg-green-50 wdo:dark:bg-green-900/20 wdo:w-fit",children:[(0,s.jsx)($l,{size:14,className:"wdo:text-green-600 wdo:dark:text-green-400"}),(0,s.jsx)("span",{className:"wdo:text-sm wdo:text-green-700 wdo:dark:text-green-300",children:(0,h.__)("No stopword conflicts found in the selected period.","ajax-search-pro")})]}),r&&r.stopwords_enabled&&r.conflicts.length>0&&r.conflicts.map(w=>{const k=l.has(w.word),j=c.has(w.word),I=p.has(w.word),F=w.phrases.length,x=5;return(0,s.jsxs)("div",{className:"wdo:card wdo:p-5 wdo:flex wdo:flex-col wdo:gap-3",children:[(0,s.jsxs)("div",{className:"wdo:flex wdo:items-center wdo:gap-2 wdo:flex-wrap",children:[(0,s.jsx)("code",{className:"wdo:font-mono wdo:font-bold wdo:text-base wdo:text-gray-900 wdo:dark:text-white",children:w.word}),w.risk&&Ew(w.risk),(0,s.jsxs)("span",{className:"wdo:inline-flex wdo:items-center wdo:px-2 wdo:py-0.5 wdo:rounded-full wdo:text-xs wdo:bg-gray-100 wdo:dark:bg-gray-700 wdo:text-gray-600 wdo:dark:text-gray-300",children:[w.affected_count," ",(0,h.__)("affected searches","ajax-search-pro")]}),(0,s.jsxs)("div",{className:"wdo:ml-auto wdo:flex wdo:items-center wdo:gap-2",children:[f[w.word]&&(0,s.jsx)("span",{className:"wdo:text-xs wdo:text-red-600 wdo:dark:text-red-400",children:f[w.word]}),j?(0,s.jsxs)("span",{className:"wdo:text-sm wdo:text-green-600 wdo:dark:text-green-400 wdo:font-medium",children:[(0,h.__)("Removed","ajax-search-pro")," \u2713"]}):(0,s.jsx)(Xt,{disabled:k,isLoading:k,className:"wdo:text-xs",onClick:()=>_(w.word),children:(0,h.__)("Remove","ajax-search-pro")})]})]}),w.explanation&&(0,s.jsx)("p",{className:"wdo:text-sm wdo:text-gray-700 wdo:dark:text-gray-300",children:w.explanation}),w.recommendation&&(0,s.jsx)("p",{className:"wdo:text-xs wdo:italic wdo:text-gray-500 wdo:dark:text-gray-400",children:w.recommendation}),j&&(0,s.jsx)("p",{className:"wdo:text-xs wdo:text-amber-600 wdo:dark:text-amber-400",children:(0,h.__)("Re-index recommended for full effect on indexed content.","ajax-search-pro")}),(0,s.jsxs)("div",{className:"wdo:flex wdo:flex-col wdo:gap-1 wdo:pt-1 wdo:border-t wdo:border-gray-100 wdo:dark:border-gray-700",children:[(0,s.jsx)("p",{className:"wdo:text-xs wdo:font-medium wdo:text-gray-500 wdo:dark:text-gray-400 wdo:mb-1",children:(0,h.__)("Affected zero-result phrases:","ajax-search-pro")}),(I?w.phrases:w.phrases.slice(0,x)).map((E,D)=>(0,s.jsxs)("div",{className:"wdo:flex wdo:items-center wdo:justify-between wdo:text-xs wdo:text-gray-700 wdo:dark:text-gray-300",children:[(0,s.jsxs)("span",{className:"wdo:font-mono",children:['"',E.phrase,'"']}),(0,s.jsxs)("span",{className:"wdo:text-gray-400",children:[E.count,"\xD7"]})]},D)),F>x&&(0,s.jsx)("button",{onClick:()=>y(w.word),className:"wdo:text-xs wdo:text-violet-600 wdo:dark:text-violet-400 wdo:mt-1 wdo:text-left wdo:hover:underline",children:I?(0,h.__)("Show less","ajax-search-pro"):`${(0,h.__)("Show all","ajax-search-pro")} ${F} ${(0,h.__)("phrases","ajax-search-pro")}`})]})]},w.word)}),r&&r.stopwords_enabled&&r.conflicts.length>0&&(0,s.jsxs)("div",{className:"wdo:flex wdo:items-center wdo:gap-3 wdo:px-1 wdo:text-xs wdo:text-gray-400 wdo:dark:text-gray-500",children:[r.generated_at&&(0,s.jsxs)("span",{children:[(0,h.__)("Generated","ajax-search-pro")," ",da(r.generated_at)]}),r.cached&&(0,s.jsx)("span",{className:"wdo:bg-gray-100 wdo:dark:bg-gray-700 wdo:px-1.5 wdo:py-0.5 wdo:rounded",children:(0,h.__)("cached","ajax-search-pro")}),r.tokens_used?(0,s.jsxs)("span",{className:"wdo:ml-auto",children:[r.tokens_used.toLocaleString()," ",(0,h.__)("tokens","ajax-search-pro")]}):null]})]})};class Aw extends q().Component{state={hasError:!1,message:""};static getDerivedStateFromError(t){return{hasError:!0,message:t.message}}render(){return this.state.hasError?(0,s.jsxs)("div",{className:"wdo:m-4 wdo:card wdo:p-6",children:[(0,s.jsx)("p",{className:"wdo:font-semibold wdo:text-red-600 wdo:dark:text-red-400",children:(0,h.__)("Something went wrong loading this panel.","ajax-search-pro")}),this.state.message&&(0,s.jsx)("p",{className:"wdo:text-sm wdo:mt-1 wdo:text-gray-500 wdo:dark:text-gray-400",children:this.state.message}),(0,s.jsx)("button",{className:"wdo:mt-3 wdo:text-sm wdo:underline wdo:cursor-pointer wdo:text-gray-600 wdo:dark:text-gray-300 wdo:border-0 wdo:bg-transparent",onClick:()=>this.setState({hasError:!1,message:""}),children:(0,h.__)("Try again","ajax-search-pro")})]}):this.props.children}}const Ow={log:"/ajax-search-pro/ai/interactions",usage:"/ajax-search-pro/ai/usage"},Nw=({name:e,optionKey:t,aiOptions:n,onEnabled:r,licenseOk:o,onNeedLicense:a})=>{const i=(0,g.useContext)(_n),{addError:l}=sn(),[u,c]=(0,g.useState)(!1),d=()=>{if(!o){a();return}c(!0);const f={...n,[t]:{value:!0}};$()({path:"/ajax-search-pro/ai/options",method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)}).then(()=>{r()}).catch(m=>{l(m)}).finally(()=>{c(!1)})};return(0,s.jsxs)("div",{className:"wdo:flex wdo:flex-col wdo:items-center wdo:justify-center wdo:gap-4 wdo:m-4 wdo:p-12 wdo:card wdo:text-center",children:[(0,s.jsx)(Ca,{size:40,className:"wdo:text-gray-300 wdo:dark:text-gray-600"}),(0,s.jsxs)("h2",{className:"wdo:text-lg wdo:font-semibold wdo:dark:text-white",children:[e," ",(0,h.__)("is disabled","ajax-search-pro")]}),(0,s.jsx)("p",{className:"wdo:text-sm wdo:text-gray-500 wdo:dark:text-gray-400 wdo:max-w-sm",children:o?(0,h.__)("Enable this feature in the Settings tab to use it.","ajax-search-pro"):(0,h.__)("A license key must be activated before AI features can be enabled.","ajax-search-pro")}),(0,s.jsxs)("div",{className:"wdo:flex wdo:items-center wdo:gap-3",children:[o?(0,s.jsx)(Xe,{onClick:d,disabled:u,children:u?(0,h.__)("Enabling\u2026","ajax-search-pro"):(0,h.__)("Enable","ajax-search-pro")+" "+e}):(0,s.jsx)(Xe,{onClick:a,children:(0,h.__)("Activate license","ajax-search-pro")}),(0,s.jsxs)(Se,{onClick:()=>i?.setActiveId("settings"),children:[(0,h.__)("Go to Settings","ajax-search-pro")," \u2192"]})]})]})},Iw=({licenseOk:e,onNeedLicense:t,aiOptions:n,onAIOptionsChange:r})=>{const a=((0,g.useContext)(_n)?.activeId??"settings")||"settings",[i,l]=(0,g.useState)(()=>new Set(["settings"])),u=i.has(a)?i:new Set(i).add(a);(0,g.useEffect)(()=>{if(!i.has(a)){l(m=>new Set(m).add(a));return}const f=Ow[a];f&&qa(m=>typeof m=="string"&&m.includes(f))},[a]);const c=(f,m,p)=>n&&!n[f].value?(0,s.jsx)(Nw,{name:m,optionKey:f,aiOptions:n,onEnabled:r,licenseOk:e,onNeedLicense:t}):p,d=[{id:"settings",render:()=>(0,s.jsx)(cf,{licenseOk:e,onNeedLicense:t})},{id:"wizard",render:()=>c("config_wizard",(0,h.__)("AI Setup Wizard","ajax-search-pro"),(0,s.jsx)(vw,{}))},{id:"ai-suggestions",render:()=>c("ai_suggestions",(0,h.__)("AI Keyword Suggestions","ajax-search-pro"),(0,s.jsx)(_w,{}))},{id:"priorities",render:()=>c("priorities_advisor",(0,h.__)("Priorities Advisor","ajax-search-pro"),(0,s.jsx)(Sw,{}))},{id:"stopwords",render:()=>c("stopword_detector",(0,h.__)("Stopword Detector","ajax-search-pro"),(0,s.jsx)(Cw,{}))},{id:"quality-report",render:()=>c("quality_report",(0,h.__)("Search Quality Report","ajax-search-pro"),(0,s.jsx)(uw,{}))},{id:"diagnostics",render:()=>c("diagnostic",(0,h.__)("Search Diagnostics","ajax-search-pro"),(0,s.jsx)(ow,{}))},{id:"usage",render:()=>(0,s.jsx)(pf,{licenseOk:e,onNeedLicense:t})},{id:"log",render:()=>(0,s.jsx)(hf,{})}];return(0,s.jsx)(s.Fragment,{children:d.filter(f=>u.has(f.id)).map(f=>(0,s.jsx)("div",{hidden:a!==f.id,children:(0,s.jsx)(Aw,{children:f.render()})},f.id))})};var Fw=()=>{const{messages:e}=sn(),[t,n]=(0,g.useState)(!1),[r,o]=(0,g.useState)(!0),a=c=>$()({path:c}),{data:i,mutate:l}=un((0,Zt.addQueryArgs)("/ajax-search-pro/ai/options"),a,{revalidateIfStale:!1,revalidateOnFocus:!0,revalidateOnReconnect:!1,revalidateOnMount:!0}),u=()=>{$()({path:"/ajax-search-pro/updates-help/status"}).then(c=>o(!!c.locally_activated)).catch(()=>o(!0))};return(0,g.useEffect)(()=>{u()},[]),(0,s.jsxs)(tu,{children:[(0,s.jsx)(Ql,{messages:e}),(0,s.jsx)(Wl,{forceOpen:t,onClose:()=>{n(!1),u()}}),(0,s.jsx)(iu,{subtitle:(0,h.__)("Search AI","ajax-search-pro"),logo:(0,s.jsx)(mu,{}),className:"wdo:items-center!"}),(0,s.jsx)(uu,{children:(0,s.jsxs)("div",{className:"wdo:panel-container",children:[(0,s.jsx)("nav",{className:"wdo:menu-panel",children:(0,s.jsxs)(cu,{children:[(0,s.jsx)(Mt,{label:(0,h.__)("Settings","ajax-search-pro"),id:"settings",defaultActive:!0,iconBefore:(0,s.jsx)(du,{})}),(0,s.jsx)(Mt,{label:(0,h.__)("Setup Wizard","ajax-search-pro"),id:"wizard",iconBefore:(0,s.jsx)(hu,{})}),(0,s.jsx)(Mt,{label:(0,h.__)("AI Suggestions","ajax-search-pro"),id:"ai-suggestions",iconBefore:(0,s.jsx)(Aa,{})}),(0,s.jsx)(Mt,{label:(0,h.__)("Priorities Advisor","ajax-search-pro"),id:"priorities",iconBefore:(0,s.jsx)(Fr,{})}),(0,s.jsx)(Mt,{label:(0,h.__)("Stopword Detector","ajax-search-pro"),id:"stopwords",iconBefore:(0,s.jsx)(Oa,{})}),(0,s.jsx)(Mt,{label:(0,h.__)("Quality Report","ajax-search-pro"),id:"quality-report",iconBefore:(0,s.jsx)(Na,{})}),(0,s.jsx)(Mt,{label:(0,h.__)("Diagnostics","ajax-search-pro"),id:"diagnostics",iconBefore:(0,s.jsx)(Ia,{})}),(0,s.jsx)(Mt,{label:(0,h.__)("Usage","ajax-search-pro"),id:"usage",iconBefore:(0,s.jsx)(pu,{})}),(0,s.jsx)(Mt,{label:(0,h.__)("Interaction Log","ajax-search-pro"),id:"log",iconBefore:(0,s.jsx)(fu,{})})]})}),(0,s.jsx)("div",{className:"wdo:content-panel",children:(0,s.jsx)(Iw,{licenseOk:r,onNeedLicense:()=>n(!0),aiOptions:i??null,onAIOptionsChange:()=>{l()}})})]})})]})};const Hl=document.getElementById("asp-root");Hl!==null&&oe().render((0,s.jsx)(Fw,{}),Hl)})()})();
