/
var
/
www
/
html
/
wordpress
/
wp-content
/
plugins
/
astra-addon
/
admin
/
core
/
assets
/
build
/
Upload File
HOME
(()=>{var e,t,n={77(e){"use strict";var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(l,c):c}e.exports=function(e,l){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var d=1,h=1;function p(e){var t=e.match(n);t&&(d+=t.length);var r=e.lastIndexOf("\n");h=~r?e.length-r:h+e.length}function f(){var e={line:d,column:h};return function(t){return t.position=new m(e),y(),t}}function m(e){this.start=e,this.end={line:d,column:h},this.source=l.source}function g(t){var n=new Error(l.source+":"+d+":"+h+": "+t);if(n.reason=t,n.filename=l.source,n.line=d,n.column=h,n.source=e,!l.silent)throw n}function v(t){var n=t.exec(e);if(n){var r=n[0];return p(r),e=e.slice(r.length),n}}function y(){v(r)}function b(e){var t;for(e=e||[];t=x();)!1!==t&&e.push(t);return e}function x(){var t=f();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return g("End of comment missing");var r=e.slice(2,n-2);return h+=2,p(r),e=e.slice(n),h+=2,t({type:"comment",comment:r})}}function w(){var e=f(),n=v(o);if(n){if(x(),!v(i))return g("property missing ':'");var r=v(s),l=e({type:"declaration",property:u(n[0].replace(t,c)),value:r?u(r[0].replace(t,c)):c});return v(a),l}}return m.prototype.content=e,y(),function(){var e,t=[];for(b(t);e=w();)!1!==e&&(t.push(e),b(t));return t}()}},84(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.cloneNode=t.hasChildren=t.isDocument=t.isDirective=t.isComment=t.isText=t.isCDATA=t.isTag=t.Element=t.Document=t.CDATA=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var s=n(742),a=function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),k(this,e)},e}();t.Node=a;var l=function(e){function t(t){var n=e.call(this)||this;return n.data=t,n}return o(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(a);t.DataNode=l;var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.Text,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),t}(l);t.Text=c;var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.Comment,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),t}(l);t.Comment=u;var d=function(e){function t(t,n){var r=e.call(this,n)||this;return r.name=t,r.type=s.ElementType.Directive,r}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),t}(l);t.ProcessingInstruction=d;var h=function(e){function t(t){var n=e.call(this)||this;return n.children=t,n}return o(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(a);t.NodeWithChildren=h;var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.CDATA,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(h);t.CDATA=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.Root,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(h);t.Document=f;var m=function(e){function t(t,n,r,o){void 0===r&&(r=[]),void 0===o&&(o="script"===t?s.ElementType.Script:"style"===t?s.ElementType.Style:s.ElementType.Tag);var i=e.call(this,r)||this;return i.name=t,i.attribs=n,i.type=o,i}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map(function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}})},enumerable:!1,configurable:!0}),t}(h);function g(e){return(0,s.isTag)(e)}function v(e){return e.type===s.ElementType.CDATA}function y(e){return e.type===s.ElementType.Text}function b(e){return e.type===s.ElementType.Comment}function x(e){return e.type===s.ElementType.Directive}function w(e){return e.type===s.ElementType.Root}function k(e,t){var n;if(void 0===t&&(t=!1),y(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(g(e)){var r=t?E(e.children):[],o=new m(e.name,i({},e.attribs),r);r.forEach(function(e){return e.parent=o}),null!=e.namespace&&(o.namespace=e.namespace),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=o}else if(v(e)){r=t?E(e.children):[];var s=new p(r);r.forEach(function(e){return e.parent=s}),n=s}else if(w(e)){r=t?E(e.children):[];var a=new f(r);r.forEach(function(e){return e.parent=a}),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),n=a}else{if(!x(e))throw new Error("Not implemented yet: ".concat(e.type));var l=new d(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),n=l}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function E(e){for(var t=e.map(function(e){return k(e,!0)}),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}t.Element=m,t.isTag=g,t.isCDATA=v,t.isText=y,t.isComment=b,t.isDirective=x,t.isDocument=w,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=k},133(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){let n=null;if(!e||"string"!=typeof e)return n;const r=(0,o.default)(e),i="function"==typeof t;return r.forEach(e=>{if("declaration"!==e.type)return;const{property:r,value:o}=e;i?t(r,o,e):o&&(n=n||{},n[r]=o)}),n};const o=r(n(77))},210(e,t,n){"use strict";function r(e,t,n,r,o,i,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}const o={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(e=>{o[e]=new r(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([e,t])=>{o[e]=new r(e,1,!1,t,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(e=>{o[e]=new r(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(e=>{o[e]=new r(e,2,!1,e,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(e=>{o[e]=new r(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(e=>{o[e]=new r(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(e=>{o[e]=new r(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(e=>{o[e]=new r(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(e=>{o[e]=new r(e,5,!1,e.toLowerCase(),null,!1,!1)});const i=/[\-\:]([a-z])/g,s=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(e=>{const t=e.replace(i,s);o[t]=new r(t,1,!1,e,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(e=>{const t=e.replace(i,s);o[t]=new r(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(e=>{const t=e.replace(i,s);o[t]=new r(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(e=>{o[e]=new r(e,1,!1,e.toLowerCase(),null,!1,!1)}),o.xlinkHref=new r("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(e=>{o[e]=new r(e,1,!1,e.toLowerCase(),null,!0,!0)});const{CAMELCASE:a,SAME:l,possibleStandardNames:c}=n(811),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce((e,t)=>{const n=c[t];return n===l?e[t]=t:n===a?e[t.toLowerCase()]=t:e[t]=n,e},{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return o.hasOwnProperty(e)?o[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},229(e,t,n){"use strict";var r=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(133)),o=n(917);function i(e,t){var n={};return e&&"string"==typeof e?((0,r.default)(e,function(e,r){e&&r&&(n[(0,o.camelCase)(e,t)]=r)}),n):n}i.default=i,e.exports=i},270(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CARRIAGE_RETURN_PLACEHOLDER_REGEX=t.CARRIAGE_RETURN_PLACEHOLDER=t.CARRIAGE_RETURN_REGEX=t.CARRIAGE_RETURN=t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce(function(e,t){return e[t.toLowerCase()]=t,e},{}),t.CARRIAGE_RETURN="\r",t.CARRIAGE_RETURN_REGEX=new RegExp(t.CARRIAGE_RETURN,"g"),t.CARRIAGE_RETURN_PLACEHOLDER="__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_".concat(Date.now().toString(),"__"),t.CARRIAGE_RETURN_PLACEHOLDER_REGEX=new RegExp(t.CARRIAGE_RETURN_PLACEHOLDER,"g")},308(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n){var r,o,c,u,d;void 0===n&&(n={});for(var h=[],p="function"==typeof n.replace,f=null!==(r=n.transform)&&void 0!==r?r:s.returnFirstArg,m=null!==(o=n.library)&&void 0!==o?o:a,g=m.cloneElement,v=m.createElement,y=m.isValidElement,b=t.length,x=0;x<b;x++){var w=t[x];if(p){var k=null===(c=n.replace)||void 0===c?void 0:c.call(n,w,x);if(y(k)){b>1&&(k=g(k,{key:null!==(u=k.key)&&void 0!==u?u:x})),h.push(f(k,w,x));continue}}if("text"!==w.type){var E=w,T={};l(E)?((0,s.setStyleProp)(E.attribs.style,E.attribs),T=E.attribs):E.attribs&&(T=(0,i.default)(E.attribs,E.name));var _=void 0;switch(w.type){case"script":case"style":w.children[0]&&(T.dangerouslySetInnerHTML={__html:w.children[0].data});break;case"tag":"textarea"===w.name&&w.children[0]?T.defaultValue=w.children[0].data:(null===(d=w.children)||void 0===d?void 0:d.length)&&(_=e(w.children,n));break;default:continue}b>1&&(T.key=x),h.push(f(v(w.name,T,_),w,x))}else{var S=!w.data.trim().length;if(S&&w.parent&&!(0,s.canTextBeChildOfNode)(w.parent))continue;if(n.trim&&S)continue;h.push(f(w.data,w,x))}}return 1===h.length?h[0]:h};var o=n(609),i=r(n(840)),s=n(958),a={cloneElement:o.cloneElement,createElement:o.createElement,isValidElement:o.isValidElement};function l(e){return s.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,s.isCustomComponent)(e.name,e.attribs)}},326(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(742),s=n(84);o(n(84),t);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function e(e,t,n){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=a),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:a,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,r=new s.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new s.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new s.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new s.Text(""),t=new s.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new s.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=l,t.default=l},442(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0,t.default=function(e,t){var n;if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,s.default)((0,o.default)(e,null!==(n=null==t?void 0:t.htmlparser2)&&void 0!==n?n:l),t):[]};var o=r(n(471));t.htmlToDOM=o.default;var i=r(n(840));t.attributesToProps=i.default;var s=r(n(308));t.domToReact=s.default;var a=n(326);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return a.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return a.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return a.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return a.Text}});var l={lowerCaseAttributeNames:!1}},471(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=s.exec(e),n=t?t[1]:void 0;return(0,i.formatDOM)((0,o.default)(e),null,n)};var o=r(n(496)),i=n(731),s=/<(![a-zA-Z\s]+)>/},496(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n,h,p,f,g;e=(0,r.escapeSpecialCharacters)(e);var y=a.exec(e),b=null===(t=null==y?void 0:y[1])||void 0===t?void 0:t.toLowerCase();switch(b){case o:var x=d(e);return l.test(e)||null===(n=null==(k=x.querySelector(i))?void 0:k.parentNode)||void 0===n||n.removeChild(k),c.test(e)||null===(h=null==(k=x.querySelector(s))?void 0:k.parentNode)||void 0===h||h.removeChild(k),x.querySelectorAll(o);case i:case s:var w=u(e).querySelectorAll(b);return c.test(e)&&l.test(e)?null!==(f=null===(p=w[0].parentNode)||void 0===p?void 0:p.childNodes)&&void 0!==f?f:v():w;default:return m?m(e):null!==(g=null==(k=u(e,s).querySelector(s))?void 0:k.childNodes)&&void 0!==g?g:v();var k}};var r=n(731),o="html",i="head",s="body",a=/<([a-zA-Z]+[0-9]?)/,l=/<head[^]*>/i,c=/<body[^]*>/i,u=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},d=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},h="object"==typeof window&&window.DOMParser;if("function"==typeof h){var p=new h;u=d=function(e,t){return t&&(e="<".concat(t,">").concat(e,"</").concat(t,">")),p.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var f=document.implementation.createHTMLDocument();u=function(e,t){if(t){var n=f.documentElement.querySelector(t);return n&&(n.innerHTML=e),f}return f.documentElement.innerHTML=e,f}}var m,g="object"==typeof document&&document.createElement("template");g&&g.content&&(m=function(e){return g.innerHTML=e,g.content.childNodes});var v=function(){return document.createDocumentFragment().childNodes}},609(e){"use strict";e.exports=window.React},699(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.cloneNode=t.hasChildren=t.isDocument=t.isDirective=t.isComment=t.isText=t.isCDATA=t.isTag=t.Element=t.Document=t.CDATA=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var s=n(895),a=function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),k(this,e)},e}();t.Node=a;var l=function(e){function t(t){var n=e.call(this)||this;return n.data=t,n}return o(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(a);t.DataNode=l;var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.Text,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),t}(l);t.Text=c;var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.Comment,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),t}(l);t.Comment=u;var d=function(e){function t(t,n){var r=e.call(this,n)||this;return r.name=t,r.type=s.ElementType.Directive,r}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),t}(l);t.ProcessingInstruction=d;var h=function(e){function t(t){var n=e.call(this)||this;return n.children=t,n}return o(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(a);t.NodeWithChildren=h;var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.CDATA,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(h);t.CDATA=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.Root,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(h);t.Document=f;var m=function(e){function t(t,n,r,o){void 0===r&&(r=[]),void 0===o&&(o="script"===t?s.ElementType.Script:"style"===t?s.ElementType.Style:s.ElementType.Tag);var i=e.call(this,r)||this;return i.name=t,i.attribs=n,i.type=o,i}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map(function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}})},enumerable:!1,configurable:!0}),t}(h);function g(e){return(0,s.isTag)(e)}function v(e){return e.type===s.ElementType.CDATA}function y(e){return e.type===s.ElementType.Text}function b(e){return e.type===s.ElementType.Comment}function x(e){return e.type===s.ElementType.Directive}function w(e){return e.type===s.ElementType.Root}function k(e,t){var n;if(void 0===t&&(t=!1),y(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(g(e)){var r=t?E(e.children):[],o=new m(e.name,i({},e.attribs),r);r.forEach(function(e){return e.parent=o}),null!=e.namespace&&(o.namespace=e.namespace),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=o}else if(v(e)){r=t?E(e.children):[];var s=new p(r);r.forEach(function(e){return e.parent=s}),n=s}else if(w(e)){r=t?E(e.children):[];var a=new f(r);r.forEach(function(e){return e.parent=a}),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),n=a}else{if(!x(e))throw new Error("Not implemented yet: ".concat(e.type));var l=new d(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),n=l}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function E(e){for(var t=e.map(function(e){return k(e,!0)}),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}t.Element=m,t.isTag=g,t.isCDATA=v,t.isText=y,t.isComment=b,t.isDirective=x,t.isDocument=w,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=k},731(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAttributes=i,t.escapeSpecialCharacters=function(e){return e.replace(o.CARRIAGE_RETURN_REGEX,o.CARRIAGE_RETURN_PLACEHOLDER)},t.revertEscapedCharacters=a,t.formatDOM=function e(t,n,o){var l,c,u,d;void 0===n&&(n=null);for(var h,p=[],f=0,m=t.length;f<m;f++){var g=t[f];switch(g.nodeType){case 1:var v=s(g.nodeName);(h=new r.Element(v,i(g.attributes))).children=e("template"===v?g.content.childNodes:g.childNodes,h);break;case 3:h=new r.Text(a(null!==(l=g.nodeValue)&&void 0!==l?l:""));break;case 8:h=new r.Comment(null!==(c=g.nodeValue)&&void 0!==c?c:"");break;default:continue}var y=null!==(u=p[f-1])&&void 0!==u?u:null;y&&(y.next=h),h.parent=n,h.prev=y,h.next=null,p.push(h)}return o&&((h=new r.ProcessingInstruction(o.substring(0,o.indexOf(" ")).toLowerCase(),o)).next=null!==(d=p[0])&&void 0!==d?d:null,h.parent=n,p.unshift(h),p[1]&&(p[1].prev=p[0])),p};var r=n(899),o=n(270);function i(e){for(var t={},n=0,r=e.length;n<r;n++){var o=e[n];t[o.name]=o.value}return t}function s(e){return function(e){return o.CASE_SENSITIVE_TAG_NAMES_MAP[e]}(e=e.toLowerCase())||e}function a(e){return e.replace(o.CARRIAGE_RETURN_PLACEHOLDER_REGEX,o.CARRIAGE_RETURN)}},742(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},811(e,t){t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},840(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&a[e.type]);for(var u in e){var d=e[u];if((0,r.isCustomAttribute)(u))n[u]=d;else{var h=u.toLowerCase(),p=l(h);if(p){var f=(0,r.getPropertyInfo)(p);switch(i.includes(p)&&s.includes(t)&&!c&&(p=l("default"+h)),n[p]=d,null==f?void 0:f.type){case r.BOOLEAN:n[p]=!0;break;case r.OVERLOADED_BOOLEAN:""===d&&(n[p]=!0)}}else o.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,o.setStyleProp)(e.style,n),n};var r=n(210),o=n(958),i=["checked","value"],s=["input","select","textarea"],a={reset:!0,submit:!0};function l(e){return r.possibleStandardNames[e]}},895(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},899(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(895),s=n(699);o(n(699),t);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function e(e,t,n){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=a),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:a,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,r=new s.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new s.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new s.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new s.Text(""),t=new s.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new s.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=l,t.default=l},917(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,o=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(e,t){return t.toUpperCase()},l=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||o.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(s,l):e.replace(i,l)).replace(r,a))}},958(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=function(e,t){return e.includes("-")?!s.has(e):Boolean(t&&"string"==typeof t.is)},t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,a)}catch(e){t.style={}}else t.style={}};var o=n(609),i=r(n(229)),s=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),a={reactCompat:!0};t.PRESERVE_CUSTOM_ATTRIBUTES=Number(o.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={exports:{}};return n[e].call(i.exports,i,i.exports,o),i.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var i=Object.create(null);o.r(i);var s={};e=e||[null,t({}),t([]),t(t)];for(var a=2&r&&n;("object"==typeof a||"function"==typeof a)&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach(e=>s[e]=()=>n[e]);return s.default=()=>n,o.d(i,s),i},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e=o(609),t=o.t(e,2);const n=window.wp.i18n,r=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)},i=(...e)=>e.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim();var s={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"};const a=(0,e.forwardRef)(({color:t="currentColor",size:n=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:a="",children:l,iconNode:c,...u},d)=>(0,e.createElement)("svg",{ref:d,...s,width:n,height:n,stroke:t,strokeWidth:o?24*Number(r)/Number(n):r,className:i("lucide",a),...u},[...c.map(([t,n])=>(0,e.createElement)(t,n)),...Array.isArray(l)?l:[l]])),l=(t,n)=>{const o=(0,e.forwardRef)(({className:o,...s},l)=>{return(0,e.createElement)(a,{ref:l,iconNode:n,className:i(`lucide-${c=r(t),c.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${t}`,o),...s});var c});return o.displayName=r(t),o},c=l("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]),u=l("circle-help",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),d=window.ReactJSXRuntime,h=(0,e.createContext)({});function p(t){const n=(0,e.useRef)(null);return null===n.current&&(n.current=t()),n.current}const f=(0,e.createContext)(null),m=(0,e.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class g extends e.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function v({children:t,isPresent:n}){const r=(0,e.useId)(),o=(0,e.useRef)(null),i=(0,e.useRef)({width:0,height:0,top:0,left:0}),{nonce:s}=(0,e.useContext)(m);return(0,e.useInsertionEffect)(()=>{const{width:e,height:t,top:a,left:l}=i.current;if(n||!o.current||!e||!t)return;o.current.dataset.motionPopId=r;const c=document.createElement("style");return s&&(c.nonce=s),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`\n [data-motion-pop-id="${r}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${t}px !important;\n top: ${a}px !important;\n left: ${l}px !important;\n }\n `),()=>{document.head.removeChild(c)}},[n]),(0,d.jsx)(g,{isPresent:n,childRef:o,sizeRef:i,children:e.cloneElement(t,{ref:o})})}const y=({children:t,initial:n,isPresent:r,onExitComplete:o,custom:i,presenceAffectsLayout:s,mode:a})=>{const l=p(b),c=(0,e.useId)(),u=(0,e.useCallback)(e=>{l.set(e,!0);for(const e of l.values())if(!e)return;o&&o()},[l,o]),h=(0,e.useMemo)(()=>({id:c,initial:n,isPresent:r,custom:i,onExitComplete:u,register:e=>(l.set(e,!1),()=>l.delete(e))}),s?[Math.random(),u]:[r,u]);return(0,e.useMemo)(()=>{l.forEach((e,t)=>l.set(t,!1))},[r]),e.useEffect(()=>{!r&&!l.size&&o&&o()},[r]),"popLayout"===a&&(t=(0,d.jsx)(v,{isPresent:r,children:t})),(0,d.jsx)(f.Provider,{value:h,children:t})};function b(){return new Map}function x(t=!0){const n=(0,e.useContext)(f);if(null===n)return[!0,null];const{isPresent:r,onExitComplete:o,register:i}=n,s=(0,e.useId)();(0,e.useEffect)(()=>{t&&i(s)},[t]);const a=(0,e.useCallback)(()=>t&&o&&o(s),[s,o,t]);return!r&&o?[!1,a]:[!0]}const w=e=>e.key||"";function k(t){const n=[];return e.Children.forEach(t,t=>{(0,e.isValidElement)(t)&&n.push(t)}),n}const E="undefined"!=typeof window,T=E?e.useLayoutEffect:e.useEffect,_=({children:t,custom:n,initial:r=!0,onExitComplete:o,presenceAffectsLayout:i=!0,mode:s="sync",propagate:a=!1})=>{const[l,c]=x(a),u=(0,e.useMemo)(()=>k(t),[t]),f=a&&!l?[]:u.map(w),m=(0,e.useRef)(!0),g=(0,e.useRef)(u),v=p(()=>new Map),[b,E]=(0,e.useState)(u),[_,S]=(0,e.useState)(u);T(()=>{m.current=!1,g.current=u;for(let e=0;e<_.length;e++){const t=w(_[e]);f.includes(t)?v.delete(t):!0!==v.get(t)&&v.set(t,!1)}},[_,f.length,f.join("-")]);const C=[];if(u!==b){let e=[...u];for(let t=0;t<_.length;t++){const n=_[t],r=w(n);f.includes(r)||(e.splice(t,0,n),C.push(n))}return"wait"===s&&C.length&&(e=C),S(k(e)),void E(u)}const{forceRender:P}=(0,e.useContext)(h);return(0,d.jsx)(d.Fragment,{children:_.map(e=>{const t=w(e),h=!(a&&!l)&&(u===_||f.includes(t));return(0,d.jsx)(y,{isPresent:h,initial:!(m.current&&!r)&&void 0,custom:h?void 0:n,presenceAffectsLayout:i,mode:s,onExitComplete:h?void 0:()=>{if(!v.has(t))return;v.set(t,!0);let e=!0;v.forEach(t=>{t||(e=!1)}),e&&(null==P||P(),S(g.current),a&&(null==c||c()),o&&o())},children:e},t)})})};function S(e){if("undefined"==typeof Proxy)return e;const t=new Map;return new Proxy((...t)=>e(...t),{get:(n,r)=>"create"===r?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}function C(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}const P=e=>Array.isArray(e);function j(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function R(e){return"string"==typeof e||Array.isArray(e)}function A(e){const t=[{},{}];return null==e||e.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function N(e,t,n,r){if("function"==typeof t){const[o,i]=A(r);t=t(void 0!==n?n:e.custom,o,i)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[o,i]=A(r);t=t(void 0!==n?n:e.custom,o,i)}return t}function M(e,t,n){const r=e.getProps();return N(r,t,void 0!==n?n:r.custom,e)}const D=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],O=["initial",...D];function I(e){let t;return()=>(void 0===t&&(t=e()),t)}const L=I(()=>void 0!==window.ScrollTimeline);class V{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>"finished"in e?e.finished:e))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e,t){const n=this.animations.map(n=>L()&&n.attachTimeline?n.attachTimeline(e):"function"==typeof t?t(n):void 0);return()=>{n.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach(t=>t[e]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class F extends V{then(e,t){return Promise.all(this.animations).then(e).catch(t)}}function z(e,t){return e?e[t]||e.default||e:void 0}const B=2e4;function U(e){let t=0,n=e.next(t);for(;!n.done&&t<B;)t+=50,n=e.next(t);return t>=B?1/0:t}function W(e){return"function"==typeof e}function $(e,t){e.timeline=t,e.onfinish=null}const H=e=>Array.isArray(e)&&"number"==typeof e[0],G={linearEasing:void 0};function q(e,t){const n=I(e);return()=>{var e;return null!==(e=G[t])&&void 0!==e?e:n()}}const K=q(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),X=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},Y=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let t=0;t<o;t++)r+=e(X(0,o-1,t))+", ";return`linear(${r.substring(0,r.length-2)})`};function Z(e){return Boolean("function"==typeof e&&K()||!e||"string"==typeof e&&(e in Q||K())||H(e)||Array.isArray(e)&&e.every(Z))}const J=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Q={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:J([0,.65,.55,1]),circOut:J([.55,0,1,.45]),backIn:J([.31,.01,.66,-.59]),backOut:J([.33,1.53,.69,.99])};function ee(e,t){return e?"function"==typeof e&&K()?Y(e,t):H(e)?J(e):Array.isArray(e)?e.map(e=>ee(e,t)||Q.easeOut):Q[e]:void 0}const te={x:!1,y:!1};function ne(){return te.x||te.y}function re(e,t){const n=function(e){if(e instanceof Element)return[e];if("string"==typeof e){let t=document;const n=t.querySelectorAll(e);return n?Array.from(n):[]}return Array.from(e)}(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function oe(e){return t=>{"touch"===t.pointerType||ne()||e(t)}}const ie=(e,t)=>!!t&&(e===t||ie(e,t.parentElement)),se=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,ae=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),le=new WeakSet;function ce(e){return t=>{"Enter"===t.key&&e(t)}}function ue(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function de(e){return se(e)&&!ne()}const he=e=>1e3*e,pe=e=>e/1e3,fe=e=>e,me=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ge=new Set(me),ve=new Set(["width","height","top","left","right","bottom",...me]),ye=e=>P(e)?e[e.length-1]||0:e,be=["read","resolveKeyframes","update","preRender","render","postRender"];function xe(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=be.reduce((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,o=!1;const i=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(t){i.has(t)&&(l.schedule(t),e()),t(s)}const l={schedule:(e,o=!1,s=!1)=>{const a=s&&r?t:n;return o&&i.add(e),a.has(e)||a.add(e),e},cancel:e=>{n.delete(e),i.delete(e)},process:e=>{s=e,r?o=!0:(r=!0,[t,n]=[n,t],t.forEach(a),t.clear(),r=!1,o&&(o=!1,l.process(e)))}};return l}(i),e),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:h}=s,p=()=>{const i=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(i-o.timestamp,40),1),o.timestamp=i,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),h.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(p))};return{schedule:be.reduce((t,i)=>{const a=s[i];return t[i]=(t,i=!1,s=!1)=>(n||(n=!0,r=!0,o.isProcessing||e(p)),a.schedule(t,i,s)),t},{}),cancel:e=>{for(let t=0;t<be.length;t++)s[be[t]].cancel(e)},state:o,steps:s}}const{schedule:we,cancel:ke,state:Ee,steps:Te}=xe("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:fe,!0);let _e;function Se(){_e=void 0}const Ce={now:()=>(void 0===_e&&Ce.set(Ee.isProcessing?Ee.timestamp:performance.now()),_e),set:e=>{_e=e,queueMicrotask(Se)}};function Pe(e,t){-1===e.indexOf(t)&&e.push(t)}function je(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Re{constructor(){this.subscriptions=[]}add(e){return Pe(this.subscriptions,e),()=>je(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let o=0;o<r;o++){const r=this.subscriptions[o];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Ae(e,t){return t?e*(1e3/t):0}const Ne={current:void 0};class Me{constructor(e,t={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{const n=Ce.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=Ce.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new Re);const n=this.events[e].add(t);return"change"===e?()=>{n(),we.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Ne.current&&Ne.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=Ce.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Ae(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function De(e,t){return new Me(e,t)}function Oe(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,De(n))}const Ie=e=>Boolean(e&&e.getVelocity);function Le(e,t){const n=e.getValue("willChange");if(r=n,Boolean(Ie(r)&&r.add))return n.add(t);var r}const Ve=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Fe="data-"+Ve("framerAppearId");function ze(e){return e.props[Fe]}const Be=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function Ue(e,t,n,r){if(e===t&&n===r)return fe;return o=>0===o||1===o?o:Be(function(e,t,n,r,o){let i,s,a=0;do{s=t+(n-t)/2,i=Be(s,r,o)-e,i>0?n=s:t=s}while(Math.abs(i)>1e-7&&++a<12);return s}(o,0,1,e,n),t,r)}const We=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,$e=e=>t=>1-e(1-t),He=Ue(.33,1.53,.69,.99),Ge=$e(He),qe=We(Ge),Ke=e=>(e*=2)<1?.5*Ge(e):.5*(2-Math.pow(2,-10*(e-1))),Xe=e=>1-Math.sin(Math.acos(e)),Ye=$e(Xe),Ze=We(Xe),Je=e=>/^0[^.\s]+$/u.test(e);function Qe(e){return"number"==typeof e?0===e:null===e||"none"===e||"0"===e||Je(e)}const et=(e,t,n)=>n>t?t:n<e?e:n,tt={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},nt={...tt,transform:e=>et(0,1,e)},rt={...tt,default:1},ot=e=>Math.round(1e5*e)/1e5,it=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,st=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,at=(e,t)=>n=>Boolean("string"==typeof n&&st.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),lt=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[o,i,s,a]=r.match(it);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},ct={...tt,transform:e=>Math.round((e=>et(0,255,e))(e))},ut={test:at("rgb","red"),parse:lt("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ct.transform(e)+", "+ct.transform(t)+", "+ct.transform(n)+", "+ot(nt.transform(r))+")"},dt={test:at("#"),parse:function(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:ut.transform},ht=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),pt=ht("deg"),ft=ht("%"),mt=ht("px"),gt=ht("vh"),vt=ht("vw"),yt={...ft,parse:e=>ft.parse(e)/100,transform:e=>ft.transform(100*e)},bt={test:at("hsl","hue"),parse:lt("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+ft.transform(ot(t))+", "+ft.transform(ot(n))+", "+ot(nt.transform(r))+")"},xt={test:e=>ut.test(e)||dt.test(e)||bt.test(e),parse:e=>ut.test(e)?ut.parse(e):bt.test(e)?bt.parse(e):dt.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?ut.transform(e):bt.transform(e)},wt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,kt="number",Et="color",Tt=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function _t(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(Tt,e=>(xt.test(e)?(r.color.push(i),o.push(Et),n.push(xt.parse(e))):e.startsWith("var(")?(r.var.push(i),o.push("var"),n.push(e)):(r.number.push(i),o.push(kt),n.push(parseFloat(e))),++i,"${}")).split("${}");return{values:n,split:s,indexes:r,types:o}}function St(e){return _t(e).values}function Ct(e){const{split:t,types:n}=_t(e),r=t.length;return e=>{let o="";for(let i=0;i<r;i++)if(o+=t[i],void 0!==e[i]){const t=n[i];o+=t===kt?ot(e[i]):t===Et?xt.transform(e[i]):e[i]}return o}}const Pt=e=>"number"==typeof e?0:e,jt={test:function(e){var t,n;return isNaN(e)&&"string"==typeof e&&((null===(t=e.match(it))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(wt))||void 0===n?void 0:n.length)||0)>0},parse:St,createTransformer:Ct,getAnimatableNone:function(e){const t=St(e);return Ct(e)(t.map(Pt))}},Rt=new Set(["brightness","contrast","saturate","opacity"]);function At(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(it)||[];if(!r)return e;const o=n.replace(r,"");let i=Rt.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const Nt=/\b([a-z-]*)\(.*?\)/gu,Mt={...jt,getAnimatableNone:e=>{const t=e.match(Nt);return t?t.map(At).join(" "):e}},Dt={borderWidth:mt,borderTopWidth:mt,borderRightWidth:mt,borderBottomWidth:mt,borderLeftWidth:mt,borderRadius:mt,radius:mt,borderTopLeftRadius:mt,borderTopRightRadius:mt,borderBottomRightRadius:mt,borderBottomLeftRadius:mt,width:mt,maxWidth:mt,height:mt,maxHeight:mt,top:mt,right:mt,bottom:mt,left:mt,padding:mt,paddingTop:mt,paddingRight:mt,paddingBottom:mt,paddingLeft:mt,margin:mt,marginTop:mt,marginRight:mt,marginBottom:mt,marginLeft:mt,backgroundPositionX:mt,backgroundPositionY:mt},Ot={rotate:pt,rotateX:pt,rotateY:pt,rotateZ:pt,scale:rt,scaleX:rt,scaleY:rt,scaleZ:rt,skew:pt,skewX:pt,skewY:pt,distance:mt,translateX:mt,translateY:mt,translateZ:mt,x:mt,y:mt,z:mt,perspective:mt,transformPerspective:mt,opacity:nt,originX:yt,originY:yt,originZ:mt},It={...tt,transform:Math.round},Lt={...Dt,...Ot,zIndex:It,size:mt,fillOpacity:nt,strokeOpacity:nt,numOctaves:It},Vt={...Lt,color:xt,backgroundColor:xt,outlineColor:xt,fill:xt,stroke:xt,borderColor:xt,borderTopColor:xt,borderRightColor:xt,borderBottomColor:xt,borderLeftColor:xt,filter:Mt,WebkitFilter:Mt},Ft=e=>Vt[e];function zt(e,t){let n=Ft(e);return n!==Mt&&(n=jt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Bt=new Set(["auto","none","0"]),Ut=e=>e===tt||e===mt,Wt=(e,t)=>parseFloat(e.split(", ")[t]),$t=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return Wt(o[1],t);{const t=r.match(/^matrix\((.+)\)$/u);return t?Wt(t[1],e):0}},Ht=new Set(["x","y","z"]),Gt=me.filter(e=>!Ht.has(e)),qt={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:$t(4,13),y:$t(5,14)};qt.translateX=qt.x,qt.translateY=qt.y;const Kt=new Set;let Xt=!1,Yt=!1;function Zt(){if(Yt){const e=Array.from(Kt).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{const t=function(e){const t=[];return Gt.forEach(n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();const t=n.get(e);t&&t.forEach(([t,n])=>{var r;null===(r=e.getValue(t))||void 0===r||r.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}Yt=!1,Xt=!1,Kt.forEach(e=>e.complete()),Kt.clear()}function Jt(){Kt.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Yt=!0)})}class Qt{constructor(e,t,n,r,o,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=o,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Kt.add(this),Xt||(Xt=!0,we.read(Jt),we.resolveKeyframes(Zt))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;for(let o=0;o<e.length;o++)if(null===e[o])if(0===o){const o=null==r?void 0:r.get(),i=e[e.length-1];if(void 0!==o)e[0]=o;else if(n&&t){const r=n.readValue(t,i);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=i),r&&void 0===o&&r.set(e[0])}else e[o]=e[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Kt.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Kt.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}let en=fe,tn=fe;const nn=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),rn=e=>t=>"string"==typeof t&&t.startsWith(e),on=rn("--"),sn=rn("var(--"),an=e=>!!sn(e)&&ln.test(e.split("/*")[0].trim()),ln=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,cn=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function un(e,t,n=1){tn(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=function(e){const t=cn.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${null!=n?n:r}`,o]}(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const e=i.trim();return nn(e)?parseFloat(e):e}return an(o)?un(o,t,n+1):o}const dn=e=>t=>t.test(e),hn=[tt,mt,ft,pt,vt,gt,{test:e=>"auto"===e,parse:e=>e}],pn=e=>hn.find(dn(e));class fn extends Qt{constructor(e,t,n,r,o){super(e,t,n,r,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if("string"==typeof r&&(r=r.trim(),an(r))){const o=un(r,t.current);void 0!==o&&(e[n]=o),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!ve.has(n)||2!==e.length)return;const[r,o]=e,i=pn(r),s=pn(o);if(i!==s)if(Ut(i)&&Ut(s))for(let t=0;t<e.length;t++){const n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)Qe(e[t])&&n.push(t);n.length&&function(e,t,n){let r,o=0;for(;o<e.length&&!r;){const t=e[o];"string"==typeof t&&!Bt.has(t)&&_t(t).values.length&&(r=e[o]),o++}if(r&&n)for(const o of t)e[o]=zt(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=qt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){var e;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,s=r[i];r[i]=qt[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),(null===(e=this.removedTransforms)||void 0===e?void 0:e.length)&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const mn=(e,t)=>!("zIndex"===t||"number"!=typeof e&&!Array.isArray(e)&&("string"!=typeof e||!jt.test(e)&&"0"!==e||e.startsWith("url(")));function gn(e,t,n,r){const o=e[0];if(null===o)return!1;if("display"===t||"visibility"===t)return!0;const i=e[e.length-1],s=mn(o,t),a=mn(i,t);return en(s===a,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!(!s||!a)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||W(n))&&r)}const vn=e=>null!==e;function yn(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(vn),i=t&&"loop"!==n&&t%2==1?0:o.length-1;return i&&void 0!==r?r:o[i]}class bn{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Ce.now(),this.options={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:o,repeatType:i,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(Jt(),Zt()),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=Ce.now(),this.hasAttemptedResolve=!0;const{name:n,type:r,velocity:o,delay:i,onComplete:s,onUpdate:a,isGenerator:l}=this.options;if(!l&&!gn(e,n,r,o)){if(!i)return a&&a(yn(e,this.options,t)),s&&s(),void this.resolveFinishedPromise();this.options.duration=0}const c=this.initPlayback(e,t);!1!==c&&(this._resolved={keyframes:e,finalKeyframe:t,...c},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}const xn=(e,t,n)=>e+(t-e)*n;function wn(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function kn(e,t){return n=>n>0?t:e}const En=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},Tn=[dt,ut,bt];function Sn(e){const t=(n=e,Tn.find(e=>e.test(n)));var n;if(en(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`),!Boolean(t))return!1;let r=t.parse(e);return t===bt&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let o=0,i=0,s=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,a=2*n-r;o=wn(a,r,e+1/3),i=wn(a,r,e),s=wn(a,r,e-1/3)}else o=i=s=n;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*s),alpha:r}}(r)),r}const Cn=(e,t)=>{const n=Sn(e),r=Sn(t);if(!n||!r)return kn(e,t);const o={...n};return e=>(o.red=En(n.red,r.red,e),o.green=En(n.green,r.green,e),o.blue=En(n.blue,r.blue,e),o.alpha=xn(n.alpha,r.alpha,e),ut.transform(o))},Pn=(e,t)=>n=>t(e(n)),jn=(...e)=>e.reduce(Pn),Rn=new Set(["none","hidden"]);function An(e,t){return n=>xn(e,t,n)}function Nn(e){return"number"==typeof e?An:"string"==typeof e?an(e)?kn:xt.test(e)?Cn:On:Array.isArray(e)?Mn:"object"==typeof e?xt.test(e)?Cn:Dn:kn}function Mn(e,t){const n=[...e],r=n.length,o=e.map((e,n)=>Nn(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=o[t](e);return n}}function Dn(e,t){const n={...e,...t},r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=Nn(e[o])(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const On=(e,t)=>{const n=jt.createTransformer(t),r=_t(e),o=_t(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Rn.has(e)&&!o.values.length||Rn.has(t)&&!r.values.length?function(e,t){return Rn.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):jn(Mn(function(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],a=e.indexes[s][o[s]],l=null!==(n=e.values[a])&&void 0!==n?n:0;r[i]=l,o[s]++}return r}(r,o),o.values),n):(en(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),kn(e,t))};function In(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?xn(e,t,n):Nn(e)(e,t)}function Ln(e,t,n){const r=Math.max(t-5,0);return Ae(n-e(r),t-r)}const Vn=.01,Fn=2,zn=.005,Bn=.5;const Un=12;function Wn(e,t){return e*Math.sqrt(1-t*t)}const $n=["duration","bounce"],Hn=["stiffness","damping","mass"];function Gn(e,t){return t.some(t=>void 0!==e[t])}function qn(e=.3,t=.3){const n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:h,isResolvedFromDuration:p}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Gn(e,Hn)&&Gn(e,$n))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),o=r*r,i=2*et(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:1,stiffness:o,damping:i}}else{const n=function({duration:e=800,bounce:t=.3,velocity:n=0,mass:r=1}){let o,i;en(e<=he(10),"Spring duration must be 10 seconds or less");let s=1-t;s=et(.05,1,s),e=et(.01,10,pe(e)),s<1?(o=t=>{const r=t*s,o=r*e;return.001-(r-n)/Wn(t,s)*Math.exp(-o)},i=t=>{const r=t*s*e,i=r*n+n,a=Math.pow(s,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=Wn(Math.pow(t,2),s);return(.001-o(t)>0?-1:1)*((i-a)*l)/c}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,i=t=>Math.exp(-t*e)*(e*e*(n-t)));const a=function(e,t,n){let r=n;for(let n=1;n<Un;n++)r-=e(r)/t(r);return r}(o,i,5/e);if(e=he(e),isNaN(a))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(a,2)*r;return{stiffness:t,damping:2*s*Math.sqrt(r*t),duration:e}}}(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}({...n,velocity:-pe(n.velocity||0)}),f=h||0,m=c/(2*Math.sqrt(l*u)),g=s-i,v=pe(Math.sqrt(l/u)),y=Math.abs(g)<5;let b;if(r||(r=y?Vn:Fn),o||(o=y?zn:Bn),m<1){const e=Wn(v,m);b=t=>{const n=Math.exp(-m*v*t);return s-n*((f+m*v*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}}else if(1===m)b=e=>s-Math.exp(-v*e)*(g+(f+v*g)*e);else{const e=v*Math.sqrt(m*m-1);b=t=>{const n=Math.exp(-m*v*t),r=Math.min(e*t,300);return s-n*((f+m*v*g)*Math.sinh(r)+e*g*Math.cosh(r))/e}}const x={calculatedDuration:p&&d||null,next:e=>{const t=b(e);if(p)a.done=e>=d;else{let n=0;m<1&&(n=0===e?he(f):Ln(b,e,t));const i=Math.abs(n)<=r,l=Math.abs(s-t)<=o;a.done=i&&l}return a.value=a.done?s:t,a},toString:()=>{const e=Math.min(U(x),B),t=Y(t=>x.next(e*t).value,e,30);return e+"ms "+t}};return x}function Kn({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],h={done:!1,value:d},p=e=>void 0===a?l:void 0===l||Math.abs(a-e)<Math.abs(l-e)?a:l;let f=n*t;const m=d+f,g=void 0===s?m:s(m);g!==m&&(f=g-d);const v=e=>-f*Math.exp(-e/r),y=e=>g+v(e),b=e=>{const t=v(e),n=y(e);h.done=Math.abs(t)<=c,h.value=h.done?g:n};let x,w;const k=e=>{var t;t=h.value,(void 0!==a&&t<a||void 0!==l&&t>l)&&(x=e,w=qn({keyframes:[h.value,p(h.value)],velocity:Ln(y,e,h.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return k(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==x||(t=!0,b(e),k(e)),void 0!==x&&e>=x?w.next(e-x):(!t&&b(e),h)}}}const Xn=Ue(.42,0,1,1),Yn=Ue(0,0,.58,1),Zn=Ue(.42,0,.58,1),Jn={linear:fe,easeIn:Xn,easeInOut:Zn,easeOut:Yn,circIn:Xe,circInOut:Ze,circOut:Ye,backIn:Ge,backInOut:qe,backOut:He,anticipate:Ke},Qn=e=>{if(H(e)){tn(4===e.length,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Ue(t,n,r,o)}return"string"==typeof e?(tn(void 0!==Jn[e],`Invalid easing type '${e}'`),Jn[e]):e};function er({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(Qn):Qn(r),i={done:!1,value:t[0]},s=function(e,t){return e.map(e=>e*t)}(n&&n.length===t.length?n:function(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=X(0,t,r);e.push(xn(n,1,o))}}(t,e.length-1),t}(t),e),a=function(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(tn(i===t.length,"Both input and output ranges must be the same length"),1===i)return()=>t[0];if(2===i&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=function(e,t,n){const r=[],o=n||In,i=e.length-1;for(let n=0;n<i;n++){let i=o(e[n],e[n+1]);if(t){const e=Array.isArray(t)?t[n]||fe:t;i=jn(e,i)}r.push(i)}return r}(t,r,o),l=a.length,c=n=>{if(s&&n<e[0])return t[0];let r=0;if(l>1)for(;r<e.length-2&&!(n<e[r+1]);r++);const o=X(e[r],e[r+1],n);return a[r](o)};return n?t=>c(et(e[0],e[i-1],t)):c}(s,t,{ease:Array.isArray(o)?o:(l=t,c=o,l.map(()=>c||Zn).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(i.value=a(t),i.done=t>=e,i)}}const tr=e=>{const t=({timestamp:t})=>e(t);return{start:()=>we.update(t,!0),stop:()=>ke(t),now:()=>Ee.isProcessing?Ee.timestamp:Ce.now()}},nr={decay:Kn,inertia:Kn,tween:er,keyframes:er,spring:qn},rr=e=>e/100;class or extends bn{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:e}=this.options;e&&e()};const{name:t,motionValue:n,element:r,keyframes:o}=this.options,i=(null==r?void 0:r.KeyframeResolver)||Qt;this.resolver=new i(o,(e,t)=>this.onKeyframesResolved(e,t),t,n,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:t="keyframes",repeat:n=0,repeatDelay:r=0,repeatType:o,velocity:i=0}=this.options,s=W(t)?t:nr[t]||er;let a,l;s!==er&&"number"!=typeof e[0]&&(a=jn(rr,In(e[0],e[1])),e=[0,100]);const c=s({...this.options,keyframes:e});"mirror"===o&&(l=s({...this.options,keyframes:[...e].reverse(),velocity:-i})),null===c.calculatedDuration&&(c.calculatedDuration=U(c));const{calculatedDuration:u}=c,d=u+r;return{generator:c,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:u,resolvedDuration:d,totalDuration:d*(n+1)-r}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){const{resolved:n}=this;if(!n){const{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}const{finalKeyframe:r,generator:o,mirroredGenerator:i,mapPercentToKeyframes:s,keyframes:a,calculatedDuration:l,totalDuration:c,resolvedDuration:u}=n;if(null===this.startTime)return o.next(0);const{delay:d,repeat:h,repeatType:p,repeatDelay:f,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const g=this.currentTime-d*(this.speed>=0?1:-1),v=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=c);let y=this.currentTime,b=o;if(h){const e=Math.min(this.currentTime,c)/u;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,h+1),Boolean(t%2)&&("reverse"===p?(n=1-n,f&&(n-=f/u)):"mirror"===p&&(b=i)),y=et(0,1,n)*u}const x=v?{done:!1,value:a[0]}:b.next(y);s&&(x.value=s(x.value));let{done:w}=x;v||null===l||(w=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const k=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return k&&void 0!==r&&(x.value=yn(a,this.options,r)),m&&m(x.value),k&&this.finish(),x}get duration(){const{resolved:e}=this;return e?pe(e.calculatedDuration):0}get time(){return pe(this.currentTime)}set time(e){e=he(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=pe(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:e=tr,onPlay:t,startTime:n}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),t&&t();const r=this.driver.now();null!==this.holdTime?this.startTime=r-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=r):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;this._resolved?(this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const ir=new Set(["opacity","clipPath","filter","transform"]),sr=I(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ar={anticipate:Ke,backInOut:qe,circInOut:Ze};class lr extends bn{constructor(e){super(e);const{name:t,motionValue:n,element:r,keyframes:o}=this.options;this.resolver=new fn(o,(e,t)=>this.onKeyframesResolved(e,t),t,n,r),this.resolver.scheduleResolve()}initPlayback(e,t){let{duration:n=300,times:r,ease:o,type:i,motionValue:s,name:a,startTime:l}=this.options;if(!s.owner||!s.owner.current)return!1;var c;if("string"==typeof o&&K()&&o in ar&&(o=ar[o]),W((c=this.options).type)||"spring"===c.type||!Z(c.ease)){const{onComplete:t,onUpdate:s,motionValue:a,element:l,...c}=this.options,u=function(e,t){const n=new or({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<2e4;)r=n.sample(i),o.push(r.value),i+=10;return{times:void 0,keyframes:o,duration:i-10,ease:"linear"}}(e,c);1===(e=u.keyframes).length&&(e[1]=e[0]),n=u.duration,r=u.times,o=u.ease,i="keyframes"}const u=function(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=ee(a,o);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:"reverse"===s?"alternate":"normal"})}(s.owner.current,a,e,{...this.options,duration:n,times:r,ease:o});return u.startTime=null!=l?l:this.calcStartTime(),this.pendingTimeline?($(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:n}=this.options;s.set(yn(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:n,times:r,type:i,ease:o,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:t}=e;return pe(t)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:t}=e;return pe(t.currentTime||0)}set time(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.currentTime=he(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:t}=e;return t.playbackRate}set speed(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:t}=e;return t.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:t}=e;return t.startTime}attachTimeline(e){if(this._resolved){const{resolved:t}=this;if(!t)return fe;const{animation:n}=t;$(n,e)}else this.pendingTimeline=e;return fe}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:t,keyframes:n,duration:r,type:o,ease:i,times:s}=e;if("idle"===t.playState||"finished"===t.playState)return;if(this.time){const{motionValue:e,onUpdate:t,onComplete:a,element:l,...c}=this.options,u=new or({...c,keyframes:n,duration:r,type:o,ease:i,times:s,isGenerator:!0}),d=he(this.time);e.setWithVelocity(u.sample(d-10).value,u.sample(d).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:s}=e;if(!(t&&t.owner&&t.owner.current instanceof HTMLElement))return!1;const{onUpdate:a,transformTemplate:l}=t.owner.getProps();return sr()&&n&&ir.has(n)&&!a&&!l&&!r&&"mirror"!==o&&0!==i&&"inertia"!==s}}const cr={type:"spring",stiffness:500,damping:25,restSpeed:10},ur={type:"keyframes",duration:.8},dr={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},hr=(e,{keyframes:t})=>t.length>2?ur:ge.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:cr:dr,pr=(e,t,n,r={},o,i)=>s=>{const a=z(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c-=he(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:e=>{t.set(e),a.onUpdate&&a.onUpdate(e)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:o};(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length})(a)||(u={...u,...hr(e,u)}),u.duration&&(u.duration=he(u.duration)),u.repeatDelay&&(u.repeatDelay=he(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let d=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(u.duration=0,0===u.delay&&(d=!0)),d&&!i&&void 0!==t.get()){const e=yn(u.keyframes,a);if(void 0!==e)return we.update(()=>{u.onUpdate(e),u.onComplete()}),new F([])}return!i&&lr.supports(u)?new lr(u):new or(u)};function fr({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function mr(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(s=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const t in l){const r=e.getValue(t,null!==(i=e.latestValues[t])&&void 0!==i?i:null),o=l[t];if(void 0===o||u&&fr(u,t))continue;const a={delay:n,...z(s||{},t)};let d=!1;if(window.MotionHandoffAnimation){const n=ze(e);if(n){const e=window.MotionHandoffAnimation(n,t,we);null!==e&&(a.startTime=e,d=!0)}}Le(e,t),r.start(pr(t,r,o,e.shouldReduceMotion&&ve.has(t)?{type:!1}:a,e,d));const h=r.animation;h&&c.push(h)}return a&&Promise.all(c).then(()=>{we.update(()=>{a&&function(e,t){const n=M(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const t in i)Oe(e,t,ye(i[t]))}(e,a)})}),c}function gr(e,t,n={}){var r;const o=M(e,t,"exit"===n.type?null===(r=e.presenceContext)||void 0===r?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const s=o?()=>Promise.all(mr(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:o=0,staggerChildren:s,staggerDirection:a}=i;return function(e,t,n=0,r=0,o=1,i){const s=[],a=(e.variantChildren.size-1)*r,l=1===o?(e=0)=>e*r:(e=0)=>a-e*r;return Array.from(e.variantChildren).sort(vr).forEach((e,r)=>{e.notify("AnimationStart",t),s.push(gr(e,t,{...i,delay:n+l(r)}).then(()=>e.notify("AnimationComplete",t)))}),Promise.all(s)}(e,t,o+r,s,a,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[e,t]="beforeChildren"===l?[s,a]:[a,s];return e().then(()=>t())}return Promise.all([s(),a(n.delay)])}function vr(e,t){return e.sortNodePosition(t)}const yr=O.length;function br(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&br(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<yr;n++){const r=O[n],o=e.props[r];(R(o)||!1===o)&&(t[r]=o)}return t}const xr=[...D].reverse(),wr=D.length;function kr(e){let t=function(e){return t=>Promise.all(t.map(({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const o=t.map(t=>gr(e,t,n));r=Promise.all(o)}else if("string"==typeof t)r=gr(e,t,n);else{const o="function"==typeof t?M(e,t,n.custom):t;r=Promise.all(mr(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}(e,t,n)))}(e),n=_r(),r=!0;const o=t=>(n,r)=>{var o;const i=M(e,r,"exit"===t?null===(o=e.presenceContext)||void 0===o?void 0:o.custom:void 0);if(i){const{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function i(i){const{props:s}=e,a=br(e.parent)||{},l=[],c=new Set;let u={},d=1/0;for(let t=0;t<wr;t++){const h=xr[t],p=n[h],f=void 0!==s[h]?s[h]:a[h],m=R(f),g=h===i?p.isActive:null;!1===g&&(d=t);let v=f===a[h]&&f!==s[h]&&m;if(v&&r&&e.manuallyAnimateOnMount&&(v=!1),p.protectedKeys={...u},!p.isActive&&null===g||!f&&!p.prevProp||C(f)||"boolean"==typeof f)continue;const y=Er(p.prevProp,f);let b=y||h===i&&p.isActive&&!v&&m||t>d&&m,x=!1;const w=Array.isArray(f)?f:[f];let k=w.reduce(o(h),{});!1===g&&(k={});const{prevResolvedValues:E={}}=p,T={...E,...k},_=t=>{b=!0,c.has(t)&&(x=!0,c.delete(t)),p.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in T){const t=k[e],n=E[e];if(u.hasOwnProperty(e))continue;let r=!1;r=P(t)&&P(n)?!j(t,n):t!==n,r?null!=t?_(e):c.add(e):void 0!==t&&c.has(e)?_(e):p.protectedKeys[e]=!0}p.prevProp=f,p.prevResolvedValues=k,p.isActive&&(u={...u,...k}),r&&e.blockInitialAnimation&&(b=!1),b&&(!v||!y||x)&&l.push(...w.map(e=>({animation:e,options:{type:h}})))}if(c.size){const t={};c.forEach(n=>{const r=e.getBaseTarget(n),o=e.getValue(n);o&&(o.liveStyle=!0),t[n]=null!=r?r:null}),l.push({animation:t})}let h=Boolean(l.length);return!r||!1!==s.initial&&s.initial!==s.animate||e.manuallyAnimateOnMount||(h=!1),r=!1,h?t(l):Promise.resolve()}return{animateChanges:i,setActive:function(t,r){var o;if(n[t].isActive===r)return Promise.resolve();null===(o=e.variantChildren)||void 0===o||o.forEach(e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)}),n[t].isActive=r;const s=i(t);for(const e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=_r(),r=!0}}}function Er(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!j(t,e)}function Tr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function _r(){return{animate:Tr(!0),whileInView:Tr(),whileHover:Tr(),whileTap:Tr(),whileDrag:Tr(),whileFocus:Tr(),exit:Tr()}}class Sr{constructor(e){this.isMounted=!1,this.node=e}update(){}}let Cr=0;const Pr={animation:{Feature:class extends Sr{constructor(e){super(e),e.animationState||(e.animationState=kr(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();C(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}}},exit:{Feature:class extends Sr{constructor(){super(...arguments),this.id=Cr++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then(()=>t(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}};function jr(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Rr(e){return{point:{x:e.pageX,y:e.pageY}}}function Ar(e,t,n,r){return jr(e,t,(e=>t=>se(t)&&e(t,Rr(t)))(n),r)}const Nr=(e,t)=>Math.abs(e-t);class Mr{constructor(e,t,{transformPagePoint:n,contextWindow:r,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=Ir(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=Nr(e.x,t.x),r=Nr(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:o}=Ee;this.history.push({...r,timestamp:o});const{onStart:i,onMove:s}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),s&&s(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=Dr(t,this.transformPagePoint),we.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:o}=this.handlers;if(this.dragSnapToOrigin&&o&&o(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const i=Ir("pointercancel"===e.type?this.lastMoveEventInfo:Dr(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,i),r&&r(e,i)},!se(e))return;this.dragSnapToOrigin=o,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;const i=Dr(Rr(e),this.transformPagePoint),{point:s}=i,{timestamp:a}=Ee;this.history=[{...s,timestamp:a}];const{onSessionStart:l}=t;l&&l(e,Ir(i,this.history)),this.removeListeners=jn(Ar(this.contextWindow,"pointermove",this.handlePointerMove),Ar(this.contextWindow,"pointerup",this.handlePointerUp),Ar(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),ke(this.updatePoint)}}function Dr(e,t){return t?{point:t(e.point)}:e}function Or(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ir({point:e},t){return{point:e,delta:Or(e,Vr(t)),offset:Or(e,Lr(t)),velocity:Fr(t,.1)}}function Lr(e){return e[0]}function Vr(e){return e[e.length-1]}function Fr(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Vr(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>he(t)));)n--;if(!r)return{x:0,y:0};const i=pe(o.timestamp-r.timestamp);if(0===i)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function zr(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function Br(e){return e.max-e.min}function Ur(e,t,n,r=.5){e.origin=r,e.originPoint=xn(t.min,t.max,e.origin),e.scale=Br(n)/Br(t),e.translate=xn(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function Wr(e,t,n,r){Ur(e.x,t.x,n.x,r?r.originX:void 0),Ur(e.y,t.y,n.y,r?r.originY:void 0)}function $r(e,t,n){e.min=n.min+t.min,e.max=e.min+Br(t)}function Hr(e,t,n){e.min=t.min-n.min,e.max=e.min+Br(t)}function Gr(e,t,n){Hr(e.x,t.x,n.x),Hr(e.y,t.y,n.y)}function qr(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function Kr(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const Xr=.35;function Yr(e,t,n){return{min:Zr(e,t),max:Zr(e,n)}}function Zr(e,t){return"number"==typeof e?e:e[t]||0}const Jr=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Qr(e){return[e("x"),e("y")]}function eo({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function to(e){return void 0===e||1===e}function no({scale:e,scaleX:t,scaleY:n}){return!to(e)||!to(t)||!to(n)}function ro(e){return no(e)||oo(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function oo(e){return io(e.x)||io(e.y)}function io(e){return e&&"0%"!==e}function so(e,t,n){return n+t*(e-n)}function ao(e,t,n,r,o){return void 0!==o&&(e=so(e,o,r)),so(e,n,r)+t}function lo(e,t=0,n=1,r,o){e.min=ao(e.min,t,n,r,o),e.max=ao(e.max,t,n,r,o)}function co(e,{x:t,y:n}){lo(e.x,t.translate,t.scale,t.originPoint),lo(e.y,n.translate,n.scale,n.originPoint)}const uo=.999999999999,ho=1.0000000000001;function po(e,t){e.min=e.min+t,e.max=e.max+t}function fo(e,t,n,r,o=.5){lo(e,t,n,xn(e.min,e.max,o),r)}function mo(e,t){fo(e.x,t.x,t.scaleX,t.scale,t.originX),fo(e.y,t.y,t.scaleY,t.scale,t.originY)}function go(e,t){return eo(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const vo=({current:e})=>e?e.ownerDocument.defaultView:null,yo=new WeakMap;class bo{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:r}=this.getProps();this.panSession=new Mr(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(Rr(e).point)},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:o}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(i=n)||"y"===i?te[i]?null:(te[i]=!0,()=>{te[i]=!1}):te.x||te.y?null:(te.x=te.y=!0,()=>{te.x=te.y=!1}),!this.openDragLock))return;var i;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Qr(e=>{let t=this.getAxisMotionValue(e).get()||0;if(ft.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];r&&(t=Br(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),o&&we.postRender(()=>o(e,t)),Le(this.visualElement,"transform");const{animationState:s}=this.visualElement;s&&s.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:o,onDrag:i}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:s}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}(s),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",t.point,s),this.updateAxis("y",t.point,s),this.visualElement.render(),i&&i(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>Qr(e=>{var t;return"paused"===this.getAnimationState(e)&&(null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.play())})},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,contextWindow:vo(this.visualElement)})}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:o}=this.getProps();o&&we.postRender(()=>o(e,t))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!xo(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?xn(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?xn(n,e,r.max):Math.min(e,n)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,o=this.constraints;t&&zr(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!r)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:qr(e.x,n,o),y:qr(e.y,t,r)}}(r.layoutBox,t),this.elastic=function(e=Xr){return!1===e?e=0:!0===e&&(e=Xr),{x:Yr(e,"left","right"),y:Yr(e,"top","bottom")}}(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Qr(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(r.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!zr(e))return!1;const n=e.current;tn(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=function(e,t,n){const r=go(e,n),{scroll:o}=t;return o&&(po(r.x,o.offset.x),po(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:Kr(e.x,t.x),y:Kr(e.y,t.y)}}(r.layout.layoutBox,o);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=eo(e))}return i}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{},l=Qr(s=>{if(!xo(s,t,this.currentDirection))return;let l=a&&a[s]||{};i&&(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,d={type:"inertia",velocity:n?e[s]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(s,d)});return Promise.all(l).then(s)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return Le(this.visualElement,e),n.start(pr(e,n,0,t,this.visualElement,!1))}stopAnimation(){Qr(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){Qr(e=>{var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.pause()})}getAnimationState(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){Qr(t=>{const{drag:n}=this.getProps();if(!xo(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:i}=r.layout.layoutBox[t];o.set(e[t]-xn(n,i,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!zr(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Qr(e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=Br(e),o=Br(t);return o>r?n=X(t.min,t.max-r,e.min):r>o&&(n=X(e.min,e.max-o,t.min)),et(0,1,n)}({min:n,max:n},this.constraints[e])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Qr(t=>{if(!xo(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:i}=this.constraints[t];n.set(xn(o,i,r[t]))})}addListeners(){if(!this.visualElement.current)return;yo.set(this.visualElement,this);const e=Ar(this.visualElement.current,"pointerdown",e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),t=()=>{const{dragConstraints:e}=this.getProps();zr(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),we.read(t);const o=jr(window,"resize",()=>this.scalePositionWithinConstraints()),i=n.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Qr(t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{o(),e(),r(),i&&i()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=Xr,dragMomentum:s=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:s}}}function xo(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const wo=e=>(t,n)=>{e&&we.postRender(()=>e(t,n))},ko=(0,e.createContext)({}),Eo={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function To(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const _o={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!mt.test(e))return e;e=parseFloat(e)}return`${To(e,t.target.x)}% ${To(e,t.target.y)}%`}},So={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=jt.parse(e);if(o.length>5)return r;const i=jt.createTransformer(e),s="number"!=typeof o[0]?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+s]/=a,o[1+s]/=l;const c=xn(a,l,.5);return"number"==typeof o[2+s]&&(o[2+s]/=c),"number"==typeof o[3+s]&&(o[3+s]/=c),i(o)}},Co={},{schedule:Po,cancel:jo}=xe(queueMicrotask,!1);class Ro extends e.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;var i;i=No,Object.assign(Co,i),o&&(t.group&&t.group.add(o),n&&n.register&&r&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Eo.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:o}=this.props,i=n.projection;return i?(i.isPresent=o,r||e.layoutDependency!==t||void 0===t?i.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?i.promote():i.relegate()||we.postRender(()=>{const e=i.getStack();e&&e.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Po.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Ao(t){const[n,r]=x(),o=(0,e.useContext)(h);return(0,d.jsx)(Ro,{...t,layoutGroup:o,switchLayoutGroup:(0,e.useContext)(ko),isPresent:n,safeToRemove:r})}const No={borderRadius:{..._o,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:_o,borderTopRightRadius:_o,borderBottomLeftRadius:_o,borderBottomRightRadius:_o,boxShadow:So},Mo=(e,t)=>e.depth-t.depth;class Do{constructor(){this.children=[],this.isDirty=!1}add(e){Pe(this.children,e),this.isDirty=!0}remove(e){je(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Mo),this.isDirty=!1,this.children.forEach(e)}}function Oo(e){const t=Ie(e)?e.get():e;return n=t,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?t.toValue():t;var n}const Io=["TopLeft","TopRight","BottomLeft","BottomRight"],Lo=Io.length,Vo=e=>"string"==typeof e?parseFloat(e):e,Fo=e=>"number"==typeof e||mt.test(e);function zo(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const Bo=Wo(0,.5,Ye),Uo=Wo(.5,.95,fe);function Wo(e,t,n){return r=>r<e?0:r>t?1:n(X(e,t,r))}function $o(e,t){e.min=t.min,e.max=t.max}function Ho(e,t){$o(e.x,t.x),$o(e.y,t.y)}function Go(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function qo(e,t,n,r,o){return e=so(e-=t,1/n,r),void 0!==o&&(e=so(e,1/o,r)),e}function Ko(e,t,[n,r,o],i,s){!function(e,t=0,n=1,r=.5,o,i=e,s=e){if(ft.test(t)&&(t=parseFloat(t),t=xn(s.min,s.max,t/100)-s.min),"number"!=typeof t)return;let a=xn(i.min,i.max,r);e===i&&(a-=t),e.min=qo(e.min,t,n,a,o),e.max=qo(e.max,t,n,a,o)}(e,t[n],t[r],t[o],t.scale,i,s)}const Xo=["x","scaleX","originX"],Yo=["y","scaleY","originY"];function Zo(e,t,n,r){Ko(e.x,t,Xo,n?n.x:void 0,r?r.x:void 0),Ko(e.y,t,Yo,n?n.y:void 0,r?r.y:void 0)}function Jo(e){return 0===e.translate&&1===e.scale}function Qo(e){return Jo(e.x)&&Jo(e.y)}function ei(e,t){return e.min===t.min&&e.max===t.max}function ti(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ni(e,t){return ti(e.x,t.x)&&ti(e.y,t.y)}function ri(e){return Br(e.x)/Br(e.y)}function oi(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class ii{constructor(){this.members=[]}add(e){Pe(this.members,e),e.scheduleRender()}remove(e){if(je(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex(t=>e===t);if(0===t)return!1;let n;for(let e=t;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const si={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},ai="undefined"!=typeof window&&void 0!==window.MotionDebug,li=["","X","Y","Z"],ci={visibility:"hidden"};let ui=0;function di(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function hi(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=ze(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",we,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&hi(r)}function pi({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=ui++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,ai&&(si.totalNodes=si.resolvedTargetDeltas=si.recalculatedProjection=0),this.nodes.forEach(gi),this.nodes.forEach(Ei),this.nodes.forEach(Ti),this.nodes.forEach(vi),ai&&window.MotionDebug.record(si)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new Do)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Re),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;var r;this.isSVG=(r=t)instanceof SVGElement&&"svg"!==r.tagName,this.instance=t;const{layoutId:o,layout:i,visualElement:s}=this.options;if(s&&!s.current&&s.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(i||o)&&(this.isLayoutDirty=!0),e){let n;const r=()=>this.root.updateBlockedByResize=!1;e(t,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=Ce.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(ke(r),e(i-t))};return we.read(r,!0),()=>ke(r)}(r,250),Eo.hasAnimatedSinceResize&&(Eo.hasAnimatedSinceResize=!1,this.nodes.forEach(ki))})}o&&this.root.registerSharedNode(o,this),!1!==this.options.animate&&s&&(o||i)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||s.getDefaultTransition()||Ri,{onLayoutAnimationStart:i,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!ni(this.targetLayout,r)||n,c=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,c);const t={...z(o,"layout"),onPlay:i,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||ki(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,ke(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(_i),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&hi(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){const t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(bi);this.isUpdating||this.nodes.forEach(xi),this.isUpdating=!1,this.nodes.forEach(wi),this.nodes.forEach(fi),this.nodes.forEach(mi),this.clearAllSnapshots();const e=Ce.now();Ee.delta=et(0,1e3/60,e-Ee.timestamp),Ee.timestamp=e,Ee.isProcessing=!0,Te.update.process(Ee),Te.preRender.process(Ee),Te.render.process(Ee),Ee.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Po.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(yi),this.sharedNodes.forEach(Si)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,we.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){we.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){const t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!o)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Qo(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,i=r!==this.prevTransformTemplateValue;e&&(t||ro(this.latestValues)||i)&&(o(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),Mi((r=n).x),Mi(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const n=t.measureViewportBox();if(!(null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)&&!this.path.some(Oi)){const{scroll:e}=this.root;e&&(po(n.x,e.offset.x),po(n.y,e.offset.y))}return n}removeElementScroll(e){var t;const n={x:{min:0,max:0},y:{min:0,max:0}};if(Ho(n,e),null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)return n;for(let t=0;t<this.path.length;t++){const r=this.path[t],{scroll:o,options:i}=r;r!==this.root&&o&&i.layoutScroll&&(o.wasRoot&&Ho(n,e),po(n.x,o.offset.x),po(n.y,o.offset.y))}return n}applyTransform(e,t=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Ho(n,e);for(let e=0;e<this.path.length;e++){const r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&mo(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),ro(r.latestValues)&&mo(n,r.latestValues)}return ro(this.latestValues)&&mo(n,this.latestValues),n}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};Ho(t,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];if(!n.instance)continue;if(!ro(n.latestValues))continue;no(n.latestValues)&&n.updateSnapshot();const r=Jr();Ho(r,n.measurePageBox()),Zo(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return ro(this.latestValues)&&Zo(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ee.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:o,layoutId:i}=this.options;if(this.layout&&(o||i)){if(this.resolvedRelativeTargetAt=Ee.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Gr(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),Ho(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var s,a,l;if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s=this.target,a=this.relativeTarget,l=this.relativeParent.target,$r(s.x,a.x,l.x),$r(s.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Ho(this.target,this.layout.layoutBox),co(this.target,this.targetDelta)):Ho(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Gr(this.relativeTargetOrigin,this.target,e.target),Ho(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}ai&&si.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!no(this.parent.latestValues)&&!oo(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===Ee.timestamp&&(r=!1),r)return;const{layout:o,layoutId:i}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!o&&!i)return;Ho(this.layoutCorrected,this.layout.layoutBox);const s=this.treeScale.x,a=this.treeScale.y;!function(e,t,n,r=!1){const o=n.length;if(!o)return;let i,s;t.x=t.y=1;for(let a=0;a<o;a++){i=n[a],s=i.projectionDelta;const{visualElement:o}=i.options;o&&o.props.style&&"contents"===o.props.style.display||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&mo(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,co(e,s)),r&&ro(i.latestValues)&&mo(e,i.latestValues))}t.x<ho&&t.x>uo&&(t.x=1),t.y<ho&&t.y>uo&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(Go(this.prevProjectionDelta.x,this.projectionDelta.x),Go(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Wr(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===s&&this.treeScale.y===a&&oi(this.projectionDelta.x,this.prevProjectionDelta.x)&&oi(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),ai&&si.recalculatedProjection++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null===(t=this.options.visualElement)||void 0===t||t.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},o={...this.latestValues},i={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const s={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(a&&!c&&!0===this.options.crossfade&&!this.path.some(ji));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;Ci(i.x,e.x,n),Ci(i.y,e.y,n),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Gr(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(e,t,n,r){Pi(e.x,t.x,n.x,r),Pi(e.y,t.y,n.y,r)}(this.relativeTarget,this.relativeTargetOrigin,s,n),d&&function(e,t){return ei(e.x,t.x)&&ei(e.y,t.y)}(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),Ho(d,this.relativeTarget)),a&&(this.animationValues=o,function(e,t,n,r,o,i){o?(e.opacity=xn(0,void 0!==n.opacity?n.opacity:1,Bo(r)),e.opacityExit=xn(void 0!==t.opacity?t.opacity:1,0,Uo(r))):i&&(e.opacity=xn(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let o=0;o<Lo;o++){const i=`border${Io[o]}Radius`;let s=zo(t,i),a=zo(n,i);void 0===s&&void 0===a||(s||(s=0),a||(a=0),0===s||0===a||Fo(s)===Fo(a)?(e[i]=Math.max(xn(Vo(s),Vo(a),r),0),(ft.test(a)||ft.test(s))&&(e[i]+="%")):e[i]=a)}(t.rotate||n.rotate)&&(e.rotate=xn(t.rotate||0,n.rotate||0,r))}(o,r,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ke(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=we.update(()=>{Eo.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=Ie(0)?0:De(0);return r.start(pr("",r,1e3,n)),r.animation}(0,0,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:o}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&Di(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=Br(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=Br(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Ho(t,n),mo(t,o),Wr(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new ii),this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&di("z",e,r,this.animationValues);for(let t=0;t<li.length;t++)di(`rotate${li[t]}`,e,r,this.animationValues),di(`skew${li[t]}`,e,r,this.animationValues);e.render();for(const t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}getProjectionStyles(e){var t,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return ci;const r={visibility:""},o=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=Oo(null==e?void 0:e.pointerEvents)||"",r.transform=o?o(this.latestValues,""):"none",r;const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=Oo(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!ro(this.latestValues)&&(t.transform=o?o({},""):"none",this.hasProjected=!1),t}const s=i.animationValues||i.latestValues;this.applyTransformsToTarget(),r.transform=function(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,s=(null==n?void 0:n.z)||0;if((o||i||s)&&(r=`translate3d(${o}px, ${i}px, ${s}px) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:o,rotateY:i,skewX:s,skewY:a}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),o&&(r+=`rotateX(${o}deg) `),i&&(r+=`rotateY(${i}deg) `),s&&(r+=`skewX(${s}deg) `),a&&(r+=`skewY(${a}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return 1===a&&1===l||(r+=`scale(${a}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,s),o&&(r.transform=o(s,r.transform));const{x:a,y:l}=this.projectionDelta;r.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,i.animationValues?r.opacity=i===this?null!==(n=null!==(t=s.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:r.opacity=i===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const e in Co){if(void 0===s[e])continue;const{correct:t,applyTo:n}=Co[e],o="none"===r.transform?s[e]:t(s[e],i);if(n){const e=n.length;for(let t=0;t<e;t++)r[n[t]]=o}else r[e]=o}return this.options.layoutId&&(r.pointerEvents=i===this?Oo(null==e?void 0:e.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()}),this.root.nodes.forEach(bi),this.root.sharedNodes.clear()}}}function fi(e){e.updateLayout()}function mi(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:o}=e.options,i=n.source!==e.layout.source;"size"===o?Qr(e=>{const r=i?n.measuredBox[e]:n.layoutBox[e],o=Br(r);r.min=t[e].min,r.max=r.min+o}):Di(o,n.layoutBox,t)&&Qr(r=>{const o=i?n.measuredBox[r]:n.layoutBox[r],s=Br(t[r]);o.max=o.min+s,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+s)});const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Wr(s,t,n.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};i?Wr(a,e.applyTransform(r,!0),n.measuredBox):Wr(a,t,n.layoutBox);const l=!Qo(s);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:o,layout:i}=r;if(o&&i){const s={x:{min:0,max:0},y:{min:0,max:0}};Gr(s,n.layoutBox,o.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};Gr(a,t,i.layoutBox),ni(s,a)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=a,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function gi(e){ai&&si.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function vi(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function yi(e){e.clearSnapshot()}function bi(e){e.clearMeasurements()}function xi(e){e.isLayoutDirty=!1}function wi(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function ki(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Ei(e){e.resolveTargetDelta()}function Ti(e){e.calcProjection()}function _i(e){e.resetSkewAndRotation()}function Si(e){e.removeLeadSnapshot()}function Ci(e,t,n){e.translate=xn(t.translate,0,n),e.scale=xn(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Pi(e,t,n,r){e.min=xn(t.min,n.min,r),e.max=xn(t.max,n.max,r)}function ji(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const Ri={duration:.45,ease:[.4,0,.1,1]},Ai=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ni=Ai("applewebkit/")&&!Ai("chrome/")?Math.round:fe;function Mi(e){e.min=Ni(e.min),e.max=Ni(e.max)}function Di(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=ri(t),o=ri(n),!(Math.abs(r-o)<=.2));var r,o}function Oi(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}const Ii=pi({attachResizeListener:(e,t)=>jr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Li={current:void 0},Vi=pi({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Li.current){const e=new Ii({});e.mount(window),e.setOptions({layoutScroll:!0}),Li.current=e}return Li.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),Fi={pan:{Feature:class extends Sr{constructor(){super(...arguments),this.removePointerDownListener=fe}onPointerDown(e){this.session=new Mr(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:vo(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:wo(e),onStart:wo(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&we.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=Ar(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Sr{constructor(e){super(e),this.removeGroupControls=fe,this.removeListeners=fe,this.controls=new bo(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||fe}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Vi,MeasureLayout:Ao}};function zi(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const o=r["onHover"+n];o&&we.postRender(()=>o(t,Rr(t)))}function Bi(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);const o=r["onTap"+("End"===n?"":n)];o&&we.postRender(()=>o(t,Rr(t)))}const Ui=new WeakMap,Wi=new WeakMap,$i=e=>{const t=Ui.get(e.target);t&&t(e)},Hi=e=>{e.forEach($i)};const Gi={some:0,all:1},qi={inView:{Feature:class extends Sr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:o}=e,i={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:Gi[r]};return function(e,t,n){const r=function({root:e,...t}){const n=e||document;Wi.has(n)||Wi.set(n,{});const r=Wi.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(Hi,{root:e,...t})),r[o]}(t);return Ui.set(e,n),r.observe(e),()=>{Ui.delete(e),r.unobserve(e)}}(this.node.current,i,e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,o&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),i=t?n:r;i&&i(e)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Sr{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[r,o,i]=re(e,n),s=e=>{const r=e.currentTarget;if(!de(e)||le.has(r))return;le.add(r);const i=t(e),s=(e,t)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),de(e)&&le.has(r)&&(le.delete(r),"function"==typeof i&&i(e,{success:t}))},a=e=>{s(e,n.useGlobalTarget||ie(r,e.target))},l=e=>{s(e,!1)};window.addEventListener("pointerup",a,o),window.addEventListener("pointercancel",l,o)};return r.forEach(e=>{(function(e){return ae.has(e.tagName)||-1!==e.tabIndex})(e)||null!==e.getAttribute("tabindex")||(e.tabIndex=0),(n.useGlobalTarget?window:e).addEventListener("pointerdown",s,o),e.addEventListener("focus",e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=ce(()=>{if(le.has(n))return;ue(n,"down");const e=ce(()=>{ue(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>ue(n,"cancel"),t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)})(e,o),o)}),i}(e,e=>(Bi(this.node,e,"Start"),(e,{success:t})=>Bi(this.node,e,t?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends Sr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=jn(jr(this.node.current,"focus",()=>this.onFocus()),jr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends Sr{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[r,o,i]=re(e,n),s=oe(e=>{const{target:n}=e,r=t(e);if("function"!=typeof r||!n)return;const i=oe(e=>{r(e),n.removeEventListener("pointerleave",i)});n.addEventListener("pointerleave",i,o)});return r.forEach(e=>{e.addEventListener("pointerenter",s,o)}),i}(e,e=>(zi(this.node,e,"Start"),e=>zi(this.node,e,"End"))))}unmount(){}}}},Ki={layout:{ProjectionNode:Vi,MeasureLayout:Ao}},Xi=(0,e.createContext)({strict:!1}),Yi=(0,e.createContext)({});function Zi(e){return C(e.animate)||O.some(t=>R(e[t]))}function Ji(e){return Boolean(Zi(e)||e.variants)}function Qi(e){return Array.isArray(e)?e.join(" "):e}const es={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ts={};for(const e in es)ts[e]={isEnabled:t=>es[e].some(e=>!!t[e])};const ns=Symbol.for("motionComponentSymbol");function rs(t,n,r){return(0,e.useCallback)(e=>{e&&t.onMount&&t.onMount(e),n&&(e?n.mount(e):n.unmount()),r&&("function"==typeof r?r(e):zr(r)&&(r.current=e))},[n])}function os(t,n,r,o,i){var s,a;const{visualElement:l}=(0,e.useContext)(Yi),c=(0,e.useContext)(Xi),u=(0,e.useContext)(f),d=(0,e.useContext)(m).reducedMotion,h=(0,e.useRef)(null);o=o||c.renderer,!h.current&&o&&(h.current=o(t,{visualState:n,parent:l,props:r,presenceContext:u,blockInitialAnimation:!!u&&!1===u.initial,reducedMotionConfig:d}));const p=h.current,g=(0,e.useContext)(ko);!p||p.projection||!i||"html"!==p.type&&"svg"!==p.type||function(e,t,n,r){const{layoutId:o,layout:i,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:is(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:Boolean(s)||a&&zr(a),visualElement:e,animationType:"string"==typeof i?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}(h.current,r,i,g);const v=(0,e.useRef)(!1);(0,e.useInsertionEffect)(()=>{p&&v.current&&p.update(r,u)});const y=r[Fe],b=(0,e.useRef)(Boolean(y)&&!(null===(s=window.MotionHandoffIsComplete)||void 0===s?void 0:s.call(window,y))&&(null===(a=window.MotionHasOptimisedAnimation)||void 0===a?void 0:a.call(window,y)));return T(()=>{p&&(v.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),Po.render(p.render),b.current&&p.animationState&&p.animationState.animateChanges())}),(0,e.useEffect)(()=>{p&&(!b.current&&p.animationState&&p.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var e;null===(e=window.MotionHandoffMarkAsComplete)||void 0===e||e.call(window,y)}),b.current=!1))}),p}function is(e){if(e)return!1!==e.options.allowProjection?e.projection:is(e.parent)}function ss({preloadedFeatures:t,createVisualElement:n,useRender:r,useVisualState:o,Component:i}){var s,a;function l(t,s){let a;const l={...(0,e.useContext)(m),...t,layoutId:as(t)},{isStatic:c}=l,u=function(t){const{initial:n,animate:r}=function(e,t){if(Zi(e)){const{initial:t,animate:n}=e;return{initial:!1===t||R(t)?t:void 0,animate:R(n)?n:void 0}}return!1!==e.inherit?t:{}}(t,(0,e.useContext)(Yi));return(0,e.useMemo)(()=>({initial:n,animate:r}),[Qi(n),Qi(r)])}(t),h=o(t,c);if(!c&&E){(0,e.useContext)(Xi).strict;const t=function(e){const{drag:t,layout:n}=ts;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==n?void 0:n.isEnabled(e))?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(l);a=t.MeasureLayout,u.visualElement=os(i,h,l,n,t.ProjectionNode)}return(0,d.jsxs)(Yi.Provider,{value:u,children:[a&&u.visualElement?(0,d.jsx)(a,{visualElement:u.visualElement,...l}):null,r(i,t,rs(h,u.visualElement,s),h,c,u.visualElement)]})}t&&function(e){for(const t in e)ts[t]={...ts[t],...e[t]}}(t),l.displayName=`motion.${"string"==typeof i?i:`create(${null!==(a=null!==(s=i.displayName)&&void 0!==s?s:i.name)&&void 0!==a?a:""})`}`;const c=(0,e.forwardRef)(l);return c[ns]=i,c}function as({layoutId:t}){const n=(0,e.useContext)(h).id;return n&&void 0!==t?n+"-"+t:t}const ls=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function cs(e){return"string"==typeof e&&!e.includes("-")&&!!(ls.indexOf(e)>-1||/[A-Z]/u.test(e))}const us=t=>(n,r)=>{const o=(0,e.useContext)(Yi),i=(0,e.useContext)(f),s=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const s={latestValues:ds(r,o,i,e),renderState:t()};return n&&(s.onMount=e=>n({props:r,current:e,...s}),s.onUpdate=e=>n(e)),s}(t,n,o,i);return r?s():p(s)};function ds(e,t,n,r){const o={},i=r(e,{});for(const e in i)o[e]=Oo(i[e]);let{initial:s,animate:a}=e;const l=Zi(e),c=Ji(e);t&&c&&!l&&!1!==e.inherit&&(void 0===s&&(s=t.initial),void 0===a&&(a=t.animate));let u=!!n&&!1===n.initial;u=u||!1===s;const d=u?a:s;if(d&&"boolean"!=typeof d&&!C(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=N(e,t[n]);if(r){const{transitionEnd:e,transition:t,...n}=r;for(const e in n){let t=n[e];Array.isArray(t)&&(t=t[u?t.length-1:0]),null!==t&&(o[e]=t)}for(const t in e)o[t]=e[t]}}}return o}const hs=(e,t)=>t&&"number"==typeof e?t.transform(e):e,ps={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},fs=me.length;function ms(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let s=!1,a=!1;for(const e in t){const n=t[e];if(ge.has(e))s=!0;else if(on(e))o[e]=n;else{const t=hs(n,Lt[e]);e.startsWith("origin")?(a=!0,i[e]=t):r[e]=t}}if(t.transform||(s||n?r.transform=function(e,t,n){let r="",o=!0;for(let i=0;i<fs;i++){const s=me[i],a=e[s];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(s.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const e=hs(a,Lt[s]);l||(o=!1,r+=`${ps[s]||s}(${e}) `),n&&(t[s]=e)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:e="50%",originY:t="50%",originZ:n=0}=i;r.transformOrigin=`${e} ${t} ${n}`}}const gs={offset:"stroke-dashoffset",array:"stroke-dasharray"},vs={offset:"strokeDashoffset",array:"strokeDasharray"};function ys(e,t,n){return"string"==typeof e?e:mt.transform(t+n*e)}function bs(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(ms(e,c,d),u)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:h,style:p,dimensions:f}=e;h.transform&&(f&&(p.transform=h.transform),delete h.transform),f&&(void 0!==o||void 0!==i||p.transform)&&(p.transformOrigin=function(e,t,n){return`${ys(t,e.x,e.width)} ${ys(n,e.y,e.height)}`}(f,void 0!==o?o:.5,void 0!==i?i:.5)),void 0!==t&&(h.x=t),void 0!==n&&(h.y=n),void 0!==r&&(h.scale=r),void 0!==s&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?gs:vs;e[i.offset]=mt.transform(-r);const s=mt.transform(t),a=mt.transform(n);e[i.array]=`${s} ${a}`}(h,s,a,l,!1)}const xs=e=>"string"==typeof e&&"svg"===e.toLowerCase();function ws(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const t in n)e.style.setProperty(t,n[t])}const ks=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Es(e,t,n,r){ws(e,t,void 0,r);for(const n in t.attrs)e.setAttribute(ks.has(n)?n:Ve(n),t.attrs[n])}function Ts(e,{layout:t,layoutId:n}){return ge.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!Co[e]||"opacity"===e)}function _s(e,t,n){var r;const{style:o}=e,i={};for(const s in o)(Ie(o[s])||t.style&&Ie(t.style[s])||Ts(s,e)||void 0!==(null===(r=null==n?void 0:n.getValue(s))||void 0===r?void 0:r.liveStyle))&&(i[s]=o[s]);return i}function Ss(e,t,n){const r=_s(e,t,n);for(const n in e)(Ie(e[n])||Ie(t[n]))&&(r[-1!==me.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]);return r}const Cs=["x","y","width","height","cx","cy","r"],Ps={useVisualState:us({scrapeMotionValuesFromProps:Ss,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let i=!!e.drag;if(!i)for(const e in o)if(ge.has(e)){i=!0;break}if(!i)return;let s=!t;if(t)for(let n=0;n<Cs.length;n++){const r=Cs[n];e[r]!==t[r]&&(s=!0)}s&&we.read(()=>{!function(e,t){try{t.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(e){t.dimensions={x:0,y:0,width:0,height:0}}}(n,r),we.render(()=>{bs(r,o,xs(n.tagName),e.transformTemplate),Es(n,r)})})}})},js={useVisualState:us({scrapeMotionValuesFromProps:_s,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{}})})};function Rs(e,t,n){for(const r in t)Ie(t[r])||Ts(r,n)||(e[r]=t[r])}function As(t,n){const r={},o=function(t,n){const r={};return Rs(r,t.style||{},t),Object.assign(r,function({transformTemplate:t},n){return(0,e.useMemo)(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return ms(e,n,t),Object.assign({},e.vars,e.style)},[n])}(t,n)),r}(t,n);return t.drag&&!1!==t.dragListener&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(r.tabIndex=0),r.style=o,r}const Ns=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Ms(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Ns.has(e)}let Ds=e=>!Ms(e);try{(Os=require("@emotion/is-prop-valid").default)&&(Ds=e=>e.startsWith("on")?!Ms(e):Os(e))}catch(e){}var Os;function Is(t,n,r,o){const i=(0,e.useMemo)(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return bs(e,n,xs(o),t.transformTemplate),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const e={};Rs(e,t.style,t),i.style={...e,...i.style}}return i}function Ls(t=!1){return(n,r,o,{latestValues:i},s)=>{const a=(cs(n)?Is:As)(r,i,s,n),l=function(e,t,n){const r={};for(const o in e)"values"===o&&"object"==typeof e.values||(Ds(o)||!0===n&&Ms(o)||!t&&!Ms(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(r,"string"==typeof n,t),c=n!==e.Fragment?{...l,...a,ref:o}:{},{children:u}=r,d=(0,e.useMemo)(()=>Ie(u)?u.get():u,[u]);return(0,e.createElement)(n,{...c,children:d})}}function Vs(e,t){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){return ss({...cs(n)?Ps:js,preloadedFeatures:e,useRender:Ls(r),createVisualElement:t,Component:n})}}const Fs={current:null},zs={current:!1},Bs=[...hn,xt,jt],Us=new WeakMap,Ws=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class $s{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:o,visualState:i},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Qt,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=Ce.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,we.render(this.render,!1,!0))};const{latestValues:a,renderState:l,onUpdate:c}=i;this.onUpdate=c,this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=s,this.blockInitialAnimation=Boolean(o),this.isControllingVariants=Zi(t),this.isVariantNode=Ji(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in d){const t=d[e];void 0!==a[e]&&Ie(t)&&t.set(a[e],!1)}}mount(e){this.current=e,Us.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),zs.current||function(){if(zs.current=!0,E)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Fs.current=e.matches;e.addListener(t),t()}else Fs.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Fs.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Us.delete(this.current),this.projection&&this.projection.unmount(),ke(this.notifyUpdate),ke(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=ge.has(e),r=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&we.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),o=t.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),o(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in ts){const t=ts[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<Ws.length;t++){const n=Ws[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const r=e["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const o=t[r],i=n[r];if(Ie(o))e.addValue(r,o);else if(Ie(i))e.addValue(r,De(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(o):t.hasAnimated||t.set(o)}else{const t=e.getStaticValue(r);e.addValue(r,De(void 0!==t?t:o,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=De(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var n;let r=void 0===this.latestValues[e]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,e))&&void 0!==n?n:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=r&&("string"==typeof r&&(nn(r)||Je(r))?r=parseFloat(r):(o=r,!Bs.find(dn(o))&&jt.test(t)&&(r=zt(e,t))),this.setBaseTarget(e,Ie(r)?r.get():r)),Ie(r)?r.get():r;var o}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props;let r;if("string"==typeof n||"object"==typeof n){const o=N(this.props,n,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);o&&(r=o[e])}if(n&&void 0!==r)return r;const o=this.getBaseTargetFromProps(this.props,e);return void 0===o||Ie(o)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:o}on(e,t){return this.events[e]||(this.events[e]=new Re),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class Hs extends $s{constructor(){super(...arguments),this.KeyframeResolver=fn}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Ie(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}class Gs extends Hs{constructor(){super(...arguments),this.type="html",this.renderInstance=ws}readValueFromInstance(e,t){if(ge.has(t)){const e=Ft(t);return e&&e.default||0}{const r=(n=e,window.getComputedStyle(n)),o=(on(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return go(e,t)}build(e,t,n){ms(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return _s(e,t,n)}}class qs extends Hs{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Jr}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(ge.has(t)){const e=Ft(t);return e&&e.default||0}return t=ks.has(t)?t:Ve(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Ss(e,t,n)}build(e,t,n){bs(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){Es(e,t,0,r)}mount(e){this.isSVGTag=xs(e.tagName),super.mount(e)}}const Ks=S(Vs({...Pr,...qi,...Fi,...Ki},(t,n)=>cs(t)?new qs(n):new Gs(n,{allowProjection:t!==e.Fragment}))),Xs=e=>{const t=Qs(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),Ys(n,t)||Js(e)},getConflictingClassGroupIds:(e,t)=>{const o=n[e]||[];return t&&r[e]?[...o,...r[e]]:o}}},Ys=(e,t)=>{if(0===e.length)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Ys(e.slice(1),r):void 0;if(o)return o;if(0===t.validators.length)return;const i=e.join("-");return t.validators.find(({validator:e})=>e(i))?.classGroupId},Zs=/^\[(.+)\]$/,Js=e=>{if(Zs.test(e)){const t=Zs.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Qs=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return ra(Object.entries(e.classGroups),n).forEach(([e,n])=>{ea(n,r,e,t)}),r},ea=(e,t,n,r)=>{e.forEach(e=>{if("string"!=typeof e)return"function"==typeof e?na(e)?void ea(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n}):void Object.entries(e).forEach(([e,o])=>{ea(o,ta(t,e),n,r)});(""===e?t:ta(t,e)).classGroupId=n})},ta=(e,t)=>{let n=e;return t.split("-").forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},na=e=>e.isThemeGetter,ra=(e,t)=>t?e.map(([e,n])=>[e,n.map(e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,n])=>[t+e,n])):e)]):e,oa=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(o,i)=>{n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(o(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):o(e,t)}}},ia=e=>{const{separator:t,experimentalParseClassName:n}=e,r=1===t.length,o=t[0],i=t.length,s=e=>{const n=[];let s,a=0,l=0;for(let c=0;c<e.length;c++){let u=e[c];if(0===a){if(u===o&&(r||e.slice(c,c+i)===t)){n.push(e.slice(l,c)),l=c+i;continue}if("/"===u){s=c;continue}}"["===u?a++:"]"===u&&a--}const c=0===n.length?e:e.substring(l),u=c.startsWith("!");return{modifiers:n,hasImportantModifier:u,baseClassName:u?c.substring(1):c,maybePostfixModifierPosition:s&&s>l?s-l:void 0}};return n?e=>n({className:e,parseClassName:s}):s},sa=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(e=>{"["===e[0]?(t.push(...n.sort(),e),n=[]):n.push(e)}),t.push(...n.sort()),t},aa=/\s+/;function la(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=ca(e))&&(r&&(r+=" "),r+=t);return r}const ca=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ca(e[r]))&&(n&&(n+=" "),n+=t);return n};function ua(e,...t){let n,r,o,i=function(a){const l=t.reduce((e,t)=>t(e),e());return n=(e=>({cache:oa(e.cacheSize),parseClassName:ia(e),...Xs(e)}))(l),r=n.cache.get,o=n.cache.set,i=s,s(a)};function s(e){const t=r(e);if(t)return t;const i=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],s=e.trim().split(aa);let a="";for(let e=s.length-1;e>=0;e-=1){const t=s[e],{modifiers:l,hasImportantModifier:c,baseClassName:u,maybePostfixModifierPosition:d}=n(t);let h=Boolean(d),p=r(h?u.substring(0,d):u);if(!p){if(!h){a=t+(a.length>0?" "+a:a);continue}if(p=r(u),!p){a=t+(a.length>0?" "+a:a);continue}h=!1}const f=sa(l).join(":"),m=c?f+"!":f,g=m+p;if(i.includes(g))continue;i.push(g);const v=o(p,h);for(let e=0;e<v.length;++e){const t=v[e];i.push(m+t)}a=t+(a.length>0?" "+a:a)}return a})(e,n);return o(e,i),i}return function(){return i(la.apply(null,arguments))}}const da=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},ha=/^\[(?:([a-z-]+):)?(.+)\]$/i,pa=/^\d+\/\d+$/,fa=new Set(["px","full","screen"]),ma=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ga=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,va=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ya=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ba=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xa=e=>ka(e)||fa.has(e)||pa.test(e),wa=e=>Oa(e,"length",Ia),ka=e=>Boolean(e)&&!Number.isNaN(Number(e)),Ea=e=>Oa(e,"number",ka),Ta=e=>Boolean(e)&&Number.isInteger(Number(e)),_a=e=>e.endsWith("%")&&ka(e.slice(0,-1)),Sa=e=>ha.test(e),Ca=e=>ma.test(e),Pa=new Set(["length","size","percentage"]),ja=e=>Oa(e,Pa,La),Ra=e=>Oa(e,"position",La),Aa=new Set(["image","url"]),Na=e=>Oa(e,Aa,Fa),Ma=e=>Oa(e,"",Va),Da=()=>!0,Oa=(e,t,n)=>{const r=ha.exec(e);return!!r&&(r[1]?"string"==typeof t?r[1]===t:t.has(r[1]):n(r[2]))},Ia=e=>ga.test(e)&&!va.test(e),La=()=>!1,Va=e=>ya.test(e),Fa=e=>ba.test(e),za=(Symbol.toStringTag,()=>{const e=da("colors"),t=da("spacing"),n=da("blur"),r=da("brightness"),o=da("borderColor"),i=da("borderRadius"),s=da("borderSpacing"),a=da("borderWidth"),l=da("contrast"),c=da("grayscale"),u=da("hueRotate"),d=da("invert"),h=da("gap"),p=da("gradientColorStops"),f=da("gradientColorStopPositions"),m=da("inset"),g=da("margin"),v=da("opacity"),y=da("padding"),b=da("saturate"),x=da("scale"),w=da("sepia"),k=da("skew"),E=da("space"),T=da("translate"),_=()=>["auto",Sa,t],S=()=>[Sa,t],C=()=>["",xa,wa],P=()=>["auto",ka,Sa],j=()=>["","0",Sa],R=()=>[ka,Sa];return{cacheSize:500,separator:":",theme:{colors:[Da],spacing:[xa,wa],blur:["none","",Ca,Sa],brightness:R(),borderColor:[e],borderRadius:["none","","full",Ca,Sa],borderSpacing:S(),borderWidth:C(),contrast:R(),grayscale:j(),hueRotate:R(),invert:j(),gap:S(),gradientColorStops:[e],gradientColorStopPositions:[_a,wa],inset:_(),margin:_(),opacity:R(),padding:S(),saturate:R(),scale:R(),sepia:j(),skew:R(),space:S(),translate:S()},classGroups:{aspect:[{aspect:["auto","square","video",Sa]}],container:["container"],columns:[{columns:[Ca]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",Sa]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ta,Sa]}],basis:[{basis:_()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Sa]}],grow:[{grow:j()}],shrink:[{shrink:j()}],order:[{order:["first","last","none",Ta,Sa]}],"grid-cols":[{"grid-cols":[Da]}],"col-start-end":[{col:["auto",{span:["full",Ta,Sa]},Sa]}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":[Da]}],"row-start-end":[{row:["auto",{span:[Ta,Sa]},Sa]}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Sa]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Sa]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Sa,t]}],"min-w":[{"min-w":[Sa,t,"min","max","fit"]}],"max-w":[{"max-w":[Sa,t,"none","full","min","max","fit","prose",{screen:[Ca]},Ca]}],h:[{h:[Sa,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Sa,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Sa,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Sa,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ca,wa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ea]}],"font-family":[{font:[Da]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Sa]}],"line-clamp":[{"line-clamp":["none",ka,Ea]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",xa,Sa]}],"list-image":[{"list-image":["none",Sa]}],"list-style-type":[{list:["none","disc","decimal",Sa]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",xa,wa]}],"underline-offset":[{"underline-offset":["auto",xa,Sa]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Sa]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Sa]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",Ra]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ja]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Na]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[f]}],"gradient-via-pos":[{via:[f]}],"gradient-to-pos":[{to:[f]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[xa,Sa]}],"outline-w":[{outline:[xa,wa]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:C()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[xa,wa]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ca,Ma]}],"shadow-color":[{shadow:[Da]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Ca,Sa]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[b]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Sa]}],duration:[{duration:R()}],ease:[{ease:["linear","in","out","in-out",Sa]}],delay:[{delay:R()}],animate:[{animate:["none","spin","ping","pulse","bounce",Sa]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[Ta,Sa]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Sa]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Sa]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Sa]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[xa,wa,Ea]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}),Ba=ua(za);function Ua(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ua(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Wa(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ua(e))&&(r&&(r+=" "),r+=t);return r}const $a=(...e)=>Ba(Wa(...e)),Ha=(...e)=>(...t)=>e.forEach(e=>e?.(...t)),Ga=(...e)=>e.filter((e,t,n)=>Boolean(e)&&n.indexOf(e)===t).join(" ");var qa={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"};const Ka=(0,e.forwardRef)(({color:t="currentColor",size:n=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:i="",children:s,iconNode:a,...l},c)=>(0,e.createElement)("svg",{ref:c,...qa,width:n,height:n,stroke:t,strokeWidth:o?24*Number(r)/Number(n):r,className:Ga("lucide",i),...l},[...a.map(([t,n])=>(0,e.createElement)(t,n)),...Array.isArray(s)?s:[s]])),Xa=(t,n)=>{const r=(0,e.forwardRef)(({className:r,...o},i)=>{return(0,e.createElement)(Ka,{ref:i,iconNode:n,className:Ga(`lucide-${s=t,s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,r),...o});var s});return r.displayName=`${t}`,r},Ya=Xa("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Za=window.ReactDOM,Ja=(0,e.createContext)({}),Qa=()=>(0,e.useContext)(Ja),el={open:{opacity:1},exit:{opacity:0}},tl={duration:.2},nl=({open:t,setOpen:n,children:r,trigger:o=null,className:i,exitOnClickOutside:s=!1,exitOnEsc:a=!0,design:l="simple",scrollLock:c=!0})=>{const u=void 0!==t&&void 0!==n,[h,p]=(0,e.useState)(!1),f=(0,e.useRef)(null),m=(0,e.useRef)(null),g=(0,e.useMemo)(()=>u?t:h,[t,h]),v=(0,e.useMemo)(()=>u?n:p,[p,p]),y=()=>{g||v(!0)},b=()=>{g&&v(!1)},x=(0,e.useCallback)(()=>(0,e.isValidElement)(o)?(0,e.cloneElement)(o,{onClick:Ha(y,o?.props?.onClick)}):"function"==typeof o?o({onClick:y}):null,[o,y,b]),w=e=>{"Escape"===e.key&&a&&b()},k=e=>{s&&f.current&&!f.current.contains(e.target)&&b()};return(0,e.useEffect)(()=>(window.addEventListener("keydown",w),document.addEventListener("mousedown",k),()=>{window.removeEventListener("keydown",w),document.removeEventListener("mousedown",k)}),[g]),(0,e.useEffect)(()=>{if(!c)return;const e=document.querySelector("html");return g&&e&&(e.style.overflow="hidden"),()=>{e&&(e.style.overflow="")}},[g]),(0,d.jsxs)(d.Fragment,{children:[x(),(0,d.jsx)(Ja.Provider,{value:{open:g,setOpen:v,handleClose:b,design:l,dialogContainerRef:m,dialogRef:f},children:(0,d.jsx)("div",{ref:m,className:$a("fixed z-999999 w-0 h-0 overflow-visible",i),children:r})})]})};nl.displayName="Dialog";const rl=({children:e,className:t})=>{const{open:n,handleClose:r,dialogRef:o}=Qa();return(0,d.jsx)(_,{children:n&&(0,d.jsx)(Ks.div,{className:"fixed inset-0 overflow-y-auto",initial:"exit",animate:"open",exit:"exit",variants:el,role:"dialog",transition:tl,children:(0,d.jsx)("div",{className:"flex items-center justify-center min-h-full",children:(0,d.jsx)("div",{ref:o,className:$a("flex flex-col gap-5 w-120 h-fit bg-background-primary border border-solid border-border-subtle rounded-xl shadow-soft-shadow-2xl my-5 overflow-hidden",t),children:"function"==typeof e?e({close:r}):e})})})})};rl.displayName="Dialog.Panel";const ol=({className:e,...t})=>{const{open:n,dialogContainerRef:r}=Qa();return r?.current?(0,d.jsx)(d.Fragment,{children:(0,Za.createPortal)((0,d.jsx)(_,{children:n&&(0,d.jsx)(Ks.div,{className:$a("fixed inset-0 -z-10 bg-background-inverse/90",e),...t,initial:"exit",animate:"open",exit:"exit",variants:el,transition:tl})}),r.current)}):null};ol.displayName="Dialog.Backdrop";const il=({children:e,className:t,...n})=>(0,d.jsx)("div",{className:$a("space-y-2 px-5 pt-5 pb-1",t),...n,children:e});il.displayName="Dialog.Header";const sl=({children:e,as:t="h3",className:n,...r})=>(0,d.jsx)(t,{className:$a("text-base font-semibold text-text-primary m-0 p-0",n),...r,children:e});sl.displayName="Dialog.Title";const al=({children:e,as:t="p",className:n,...r})=>(0,d.jsx)(t,{className:$a("text-sm font-normal text-text-secondary my-0 ml-0 mr-1 p-0",n),...r,children:e});al.displayName="Dialog.Description";const ll=({className:e,...t})=>(0,d.jsx)("button",{className:$a("bg-transparent inline-flex justify-center items-center border-0 p-1 m-0 cursor-pointer focus:outline-none outline-none shadow-none",e),"aria-label":"Close dialog",...t,children:(0,d.jsx)(Ya,{className:"size-4 text-text-primary shrink-0"})}),cl=({children:t,as:n=e.Fragment,...r})=>{const{handleClose:o}=Qa();return t?n===e.Fragment?"function"==typeof t?t({close:o}):(0,e.cloneElement)(t,{onClick:o}):(0,d.jsx)(n,{...r,onClick:o,children:t}):(0,d.jsx)(ll,{onClick:o,...r})};cl.displayName="Dialog.CloseButton";const ul=({children:e,className:t,...n})=>(0,d.jsx)("div",{className:$a("px-5",t),...n,children:e});ul.displayName="Dialog.Body";const dl=({children:e,className:t})=>{const{design:n,handleClose:r}=Qa();return(0,d.jsx)("div",{className:$a("p-4 flex justify-end gap-3",{"bg-background-secondary":"footer-divided"===n},t),children:e?"function"==typeof e?e({close:r}):e:null})};dl.displayName="Dialog.Footer",nl.Panel=rl,nl.Title=sl,nl.Description=al,nl.CloseButton=cl,nl.Header=il,nl.Body=ul,nl.Footer=dl,nl.Backdrop=ol;const hl=(0,e.forwardRef)((t,n)=>{const{variant:r="primary",size:o="md",type:i="button",tag:s="button",className:a,children:l,disabled:c=!1,destructive:u=!1,icon:h=null,iconPosition:p="left",loading:f=!1,...m}=t,g=u&&"focus:ring-focus-error",v=f?"opacity-50 disabled:cursor-not-allowed":"",y={primary:"text-text-on-color bg-button-primary hover:bg-button-primary-hover outline-button-primary hover:outline-button-primary-hover shadow-xs disabled:shadow-none focus:shadow-none disabled:bg-button-disabled disabled:outline-button-disabled",secondary:"text-text-on-color bg-button-secondary hover:bg-button-secondary-hover outline-button-secondary hover:outline-button-secondary-hover shadow-xs focus:shadow-none disabled:shadow-none disabled:bg-button-disabled disabled:outline-button-disabled",outline:"text-button-tertiary-color outline-border-subtle bg-button-tertiary shadow-sm focus:shadow-none hover:bg-button-tertiary-hover hover:outline-border-subtle disabled:bg-button-tertiary disabled:outline-border-disabled",ghost:"text-text-primary bg-transparent outline-transparent hover:bg-button-tertiary-hover",link:"outline-none text-link-primary bg-transparent hover:text-link-primary-hover hover:underline p-0 border-0 leading-none"}[r],b=u&&!c?{primary:"bg-button-danger hover:bg-button-danger-hover outline-button-danger hover:outline-button-danger-hover",secondary:"bg-button-danger hover:bg-button-danger-hover outline-button-danger hover:outline-button-danger-hover",outline:"text-button-danger outline outline-1 outline-button-danger hover:outline-button-danger bg-button-tertiary hover:bg-field-background-error",ghost:"text-button-danger hover:bg-field-background-error",link:"text-button-danger hover:text-button-danger-secondary"}[r]:"",x={xs:"p-1 rounded [&>svg]:size-4",sm:"p-2 rounded [&>svg]:size-4 gap-0.5",md:"p-2.5 rounded-md text-sm [&>svg]:size-5 gap-1",lg:"p-3 rounded-lg text-base [&>svg]:size-6 gap-1"}[o];let w,k=null,E="";return h&&(E="flex items-center justify-center","left"===p?w=h:k=h),(0,d.jsxs)(s,{ref:n,type:i,className:$a(E,"outline outline-1 border-none cursor-pointer transition-colors duration-300 ease-in-out text-xs font-semibold focus:ring-2 focus:ring-toggle-on focus:ring-offset-2 disabled:text-text-disabled",x,y,b,g,v,{"cursor-default":c},a),disabled:c,...m,children:[(0,d.jsx)(e.Fragment,{children:w},"left-icon"),l?(0,d.jsx)("span",{className:"px-1",children:l}):null,(0,d.jsx)(e.Fragment,{children:k},"right-icon")]})});hl.displayName="Button";const pl=({showDialog:e,setShowDialog:t,version:r,product:o})=>(0,d.jsxs)(nl,{design:"simple",open:e,setOpen:t,exitOnEsc:!0,scrollLock:!0,exitOnClickOutside:!0,children:[(0,d.jsx)(nl.Backdrop,{}),(0,d.jsxs)(nl.Panel,{className:"gap-0",children:[(0,d.jsxs)(nl.Header,{children:[(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsx)(nl.Title,{children:(0,n.__)("Rollback to Previous Version","astra-addon")}),(0,d.jsx)(nl.CloseButton,{})]}),(0,d.jsx)(nl.Description,{children:(0,n.sprintf)((0,n.__)("Are you sure you want to rollback to %1$s %2$s?","astra-addon"),o===astra_addon_admin.rollback_plugin_name?astra_addon_admin.addon_name:astra_admin.theme_name,r)})]}),(0,d.jsxs)(nl.Footer,{children:[(0,d.jsx)(hl,{onClick:()=>{let e="";e=o===astra_addon_admin.rollback_plugin_name?astra_addon_admin.addon_rollback_url.replace("VERSION",r):astra_addon_admin.theme_rollback_url.replace("VERSION",r),t(!1),window.location.href=e},children:(0,n.__)("Rollback","astra-addon")}),(0,d.jsx)(hl,{className:"text-text-primary hover:bg-button-secondary",variant:"secondary",onClick:()=>{t(!e)},children:(0,n.__)("Cancel","astra-addon")})]})]})]}),fl={400:"font-normal",500:"font-medium",600:"font-semibold",700:"font-bold"},ml={36:"text-4xl",30:"text-3xl",24:"text-2xl",20:"text-xl",18:"text-lg",16:"text-base",14:"text-sm",12:"text-xs"},gl={44:"leading-11",38:"leading-9.5",32:"leading-8",30:"leading-7.5",28:"leading-7",24:"leading-6",20:"leading-5",16:"leading-4"},vl={2:"tracking-2"},yl={brand600:"text-brand-primary-600",link:"text-link-primary",primary:"text-text-primary",secondary:"text-text-secondary",tertiary:"text-text-tertiary",disabled:"text-text-disabled",help:"text-field-helper",label:"text-field-label",info:"text-support-info",success:"text-support-success",warning:"text-support-warning",error:"text-support-error",inverse:"text-text-on-color"},bl=(0,e.forwardRef)(function({as:e,children:t,weight:n,size:r,lineHeight:o,letterSpacing:i,color:s="primary",className:a,...l},c){return(0,d.jsx)(e||"p",{ref:c,className:$a("m-0 p-0",n?fl[n]:"",r?ml[r]:"",o?gl[o]:"",i?vl[i]:"",s?yl[s]:"",a),...l,children:t})});function xl(){return"undefined"!=typeof window}function wl(e){return Tl(e)?(e.nodeName||"").toLowerCase():"#document"}function kl(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function El(e){var t;return null==(t=(Tl(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Tl(e){return!!xl()&&(e instanceof Node||e instanceof kl(e).Node)}function _l(e){return!!xl()&&(e instanceof Element||e instanceof kl(e).Element)}function Sl(e){return!!xl()&&(e instanceof HTMLElement||e instanceof kl(e).HTMLElement)}function Cl(e){return!(!xl()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof kl(e).ShadowRoot)}const Pl=new Set(["inline","contents"]);function jl(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Bl(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Pl.has(o)}const Rl=new Set(["table","td","th"]);function Al(e){return Rl.has(wl(e))}const Nl=[":popover-open",":modal"];function Ml(e){return Nl.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const Dl=["transform","translate","scale","rotate","perspective"],Ol=["transform","translate","scale","rotate","perspective","filter"],Il=["paint","layout","strict","content"];function Ll(e){const t=Vl(),n=_l(e)?Bl(e):e;return Dl.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||Ol.some(e=>(n.willChange||"").includes(e))||Il.some(e=>(n.contain||"").includes(e))}function Vl(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Fl=new Set(["html","body","#document"]);function zl(e){return Fl.has(wl(e))}function Bl(e){return kl(e).getComputedStyle(e)}function Ul(e){return _l(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Wl(e){if("html"===wl(e))return e;const t=e.assignedSlot||e.parentNode||Cl(e)&&e.host||El(e);return Cl(t)?t.host:t}function $l(e){const t=Wl(e);return zl(t)?e.ownerDocument?e.ownerDocument.body:e.body:Sl(t)&&jl(t)?t:$l(t)}function Hl(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=$l(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),s=kl(o);if(i){const e=Gl(s);return t.concat(s,s.visualViewport||[],jl(o)?o:[],e&&n?Hl(e):[])}return t.concat(o,Hl(o,[],n))}function Gl(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ql(e){let t=e.activeElement;for(;null!=(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;t=t.shadowRoot.activeElement}return t}function Kl(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Cl(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Xl(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function Yl(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+"/"+n}).join(" "):navigator.userAgent}function Zl(e){return!(0!==e.mozInputSource||!e.isTrusted)||(ec()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function Jl(e){return!Yl().includes("jsdom/")&&(!ec()&&0===e.width&&0===e.height||ec()&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)}function Ql(){return/apple/i.test(navigator.vendor)}function ec(){const e=/android/i;return e.test(Xl())||e.test(Yl())}function tc(){return Xl().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function nc(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function rc(e){return(null==e?void 0:e.ownerDocument)||document}function oc(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function ic(e){return"composedPath"in e?e.composedPath()[0]:e.target}function sc(e){return Sl(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}function ac(e){e.preventDefault(),e.stopPropagation()}function lc(e){return!!e&&"combobox"===e.getAttribute("role")&&sc(e)}const cc=Math.min,uc=Math.max,dc=Math.round,hc=Math.floor,pc=e=>({x:e,y:e}),fc={left:"right",right:"left",bottom:"top",top:"bottom"},mc={start:"end",end:"start"};function gc(e,t,n){return uc(e,cc(t,n))}function vc(e,t){return"function"==typeof e?e(t):e}function yc(e){return e.split("-")[0]}function bc(e){return e.split("-")[1]}function xc(e){return"x"===e?"y":"x"}function wc(e){return"y"===e?"height":"width"}const kc=new Set(["top","bottom"]);function Ec(e){return kc.has(yc(e))?"y":"x"}function Tc(e){return xc(Ec(e))}function _c(e){return e.replace(/start|end/g,e=>mc[e])}const Sc=["left","right"],Cc=["right","left"],Pc=["top","bottom"],jc=["bottom","top"];function Rc(e){return e.replace(/left|right|bottom|top/g,e=>fc[e])}function Ac(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Nc(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}}var Mc=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"].join(","),Dc="undefined"==typeof Element,Oc=Dc?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ic=!Dc&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},Lc=function(e,t){var n;void 0===t&&(t=!0);var r=null==e||null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,"inert");return""===r||"true"===r||t&&e&&("function"==typeof e.closest?e.closest("[inert]"):Lc(e.parentNode))},Vc=function(e,t,n){for(var r=[],o=Array.from(e);o.length;){var i=o.shift();if(!Lc(i,!1))if("SLOT"===i.tagName){var s=i.assignedElements(),a=s.length?s:i.children,l=Vc(a,!0,n);n.flatten?r.push.apply(r,l):r.push({scopeParent:i,candidates:l})}else{Oc.call(i,Mc)&&n.filter(i)&&(t||!e.includes(i))&&r.push(i);var c=i.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(i),u=!Lc(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(i));if(c&&u){var d=Vc(!0===c?i.children:c.children,!0,n);n.flatten?r.push.apply(r,d):r.push({scopeParent:i,candidates:d})}else o.unshift.apply(o,i.children)}}return r},Fc=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},zc=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!Fc(e)?0:e.tabIndex},Bc=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Uc=function(e){return"INPUT"===e.tagName},Wc=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},$c=function(e,t){return!(t.disabled||function(e){return Uc(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("full-native"===n&&"checkVisibility"in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if("hidden"===getComputedStyle(e).visibility)return!0;var o=Oc.call(e,"details>summary:first-of-type")?e.parentElement:e;if(Oc.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"full-native"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return Wc(e)}else{if("function"==typeof r){for(var i=e;e;){var s=e.parentElement,a=Ic(e);if(s&&!s.shadowRoot&&!0===r(s))return Wc(e);e=e.assignedSlot?e.assignedSlot:s||a===e.ownerDocument?s:a.host}e=i}if(function(e){var t,n,r,o,i=e&&Ic(e),s=null===(t=i)||void 0===t?void 0:t.host,a=!1;if(i&&i!==e)for(a=!!(null!==(n=s)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(s)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!a&&s;){var l,c,u;a=!(null===(c=s=null===(l=i=Ic(s))||void 0===l?void 0:l.host)||void 0===c||null===(u=c.ownerDocument)||void 0===u||!u.contains(s))}return a}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some(function(e){return"SUMMARY"===e.tagName})}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!Oc.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},Hc=function(e,t){return!(function(e){return function(e){return Uc(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||Ic(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)}(t)||zc(t)<0||!$c(e,t))},Gc=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},qc=function(e){var t=[],n=[];return e.forEach(function(e,r){var o=!!e.scopeParent,i=o?e.scopeParent:e,s=function(e,t){var n=zc(e);return n<0&&t&&!Fc(e)?0:n}(i,o),a=o?qc(e.candidates):i;0===s?o?t.push.apply(t,a):t.push(i):n.push({documentOrder:r,tabIndex:s,item:e,isScope:o,content:a})}),n.sort(Bc).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},Kc=function(e,t){var n;return n=(t=t||{}).getShadowRoot?Vc([e],t.includeContainer,{filter:Hc.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Gc}):function(e,t,n){if(Lc(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Mc));return t&&Oc.call(e,Mc)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,Hc.bind(null,t)),qc(n)};function Xc(e,t,n){let{reference:r,floating:o}=e;const i=Ec(t),s=Tc(t),a=wc(s),l=yc(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(bc(t)){case"start":p[s]-=h*(n&&c?-1:1);break;case"end":p[s]+=h*(n&&c?-1:1)}return p}async function Yc(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=vc(t,e),f=Ac(p),m=a[h?"floating"===d?"reference":"floating":d],g=Nc(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),v="floating"===d?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),b=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},x=Nc(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:y,strategy:l}):v);return{top:(g.top-x.top+f.top)/b.y,bottom:(x.bottom-g.bottom+f.bottom)/b.y,left:(g.left-x.left+f.left)/b.x,right:(x.right-g.right+f.right)/b.x}}const Zc=new Set(["left","top"]);function Jc(e){const t=Bl(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Sl(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=dc(n)!==i||dc(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Qc(e){return _l(e)?e:e.contextElement}function eu(e){const t=Qc(e);if(!Sl(t))return pc(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Jc(t);let s=(i?dc(n.width):n.width)/r,a=(i?dc(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const tu=pc(0);function nu(e){const t=kl(e);return Vl()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:tu}function ru(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Qc(e);let s=pc(1);t&&(r?_l(r)&&(s=eu(r)):s=eu(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==kl(e))&&t}(i,n,r)?nu(i):pc(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){const e=kl(i),t=r&&_l(r)?kl(r):r;let n=e,o=Gl(n);for(;o&&r&&t!==n;){const e=eu(o),t=o.getBoundingClientRect(),r=Bl(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=s,n=kl(o),o=Gl(n)}}return Nc({width:u,height:d,x:l,y:c})}function ou(e,t){const n=Ul(e).scrollLeft;return t?t.left+n:ru(El(e)).left+n}function iu(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ou(e,n),y:n.top+t.scrollTop}}const su=new Set(["absolute","fixed"]);function au(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=kl(e),r=El(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const e=Vl();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}const c=ou(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,s=Math.abs(r.clientWidth-t.clientWidth-o);s<=25&&(i-=s)}else c<=25&&(i+=c);return{width:i,height:s,x:a,y:l}}(e,n);else if("document"===t)r=function(e){const t=El(e),n=Ul(e),r=e.ownerDocument.body,o=uc(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=uc(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+ou(e);const a=-n.scrollTop;return"rtl"===Bl(r).direction&&(s+=uc(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}(El(e));else if(_l(t))r=function(e,t){const n=ru(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Sl(e)?eu(e):pc(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=nu(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Nc(r)}function lu(e,t){const n=Wl(e);return!(n===t||!_l(n)||zl(n))&&("fixed"===Bl(n).position||lu(n,t))}function cu(e,t,n){const r=Sl(t),o=El(t),i="fixed"===n,s=ru(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=pc(0);function c(){l.x=ou(o)}if(r||!r&&!i)if(("body"!==wl(t)||jl(o))&&(a=Ul(t)),r){const e=ru(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=!o||r||i?pc(0):iu(o,a);return{x:s.left+a.scrollLeft-l.x-u.x,y:s.top+a.scrollTop-l.y-u.y,width:s.width,height:s.height}}function uu(e){return"static"===Bl(e).position}function du(e,t){if(!Sl(e)||"fixed"===Bl(e).position)return null;if(t)return t(e);let n=e.offsetParent;return El(e)===n&&(n=n.ownerDocument.body),n}function hu(e,t){const n=kl(e);if(Ml(e))return n;if(!Sl(e)){let t=Wl(e);for(;t&&!zl(t);){if(_l(t)&&!uu(t))return t;t=Wl(t)}return n}let r=du(e,t);for(;r&&Al(r)&&uu(r);)r=du(r,t);return r&&zl(r)&&uu(r)&&!Ll(r)?n:r||function(e){let t=Wl(e);for(;Sl(t)&&!zl(t);){if(Ll(t))return t;if(Ml(t))return null;t=Wl(t)}return null}(e)||n}const pu={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,s=El(r),a=!!t&&Ml(t.floating);if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=pc(1);const u=pc(0),d=Sl(r);if((d||!d&&!i)&&(("body"!==wl(r)||jl(s))&&(l=Ul(r)),Sl(r))){const e=ru(r);c=eu(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const h=!s||d||i?pc(0):iu(s,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-l.scrollTop*c.y+u.y+h.y}},getDocumentElement:El,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?Ml(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Hl(e,[],!1).filter(e=>_l(e)&&"body"!==wl(e)),o=null;const i="fixed"===Bl(e).position;let s=i?Wl(e):e;for(;_l(s)&&!zl(s);){const t=Bl(s),n=Ll(s);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&su.has(o.position)||jl(s)&&!n&&lu(e,s))?r=r.filter(e=>e!==s):o=t,s=Wl(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=i[0],a=i.reduce((e,n)=>{const r=au(t,n,o);return e.top=uc(r.top,e.top),e.right=cc(r.right,e.right),e.bottom=cc(r.bottom,e.bottom),e.left=uc(r.left,e.left),e},au(t,s,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:hu,getElementRects:async function(e){const t=this.getOffsetParent||hu,n=this.getDimensions,r=await n(e.floating);return{reference:cu(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Jc(e);return{width:t,height:n}},getScale:eu,isElement:_l,isRTL:function(e){return"rtl"===Bl(e).direction}};function fu(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function mu(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=Qc(e),u=o||i?[...c?Hl(c):[],...Hl(t)]:[];u.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const d=c&&a?function(e,t){let n,r=null;const o=El(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:h,height:p}=c;if(a||t(),!h||!p)return;const f={rootMargin:-hc(d)+"px "+-hc(o.clientWidth-(u+h))+"px "+-hc(o.clientHeight-(d+p))+"px "+-hc(u)+"px",threshold:uc(0,cc(1,l))||1};let m=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return s();r?s(!1,r):n=setTimeout(()=>{s(!1,1e-7)},1e3)}1!==r||fu(c,e.getBoundingClientRect())||s(),m=!1}try{r=new IntersectionObserver(g,{...f,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,f)}r.observe(e)}(!0),i}(c,n):null;let h,p=-1,f=null;s&&(f=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=f)||e.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let m=l?ru(e):null;return l&&function t(){const r=ru(e);m&&!fu(m,r)&&n(),m=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const gu=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),s=yc(n),a=bc(n),l="y"===Ec(n),c=Zc.has(s)?-1:1,u=i&&l?-1:1,d=vc(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&"number"==typeof f&&(p="end"===a?-1*f:f),l?{x:p*u,y:h*c}:{x:h*c,y:p*u}}(t,e);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},vu=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=vc(e,t),u={x:n,y:r},d=await i.detectOverflow(t,c),h=Ec(yc(o)),p=xc(h);let f=u[p],m=u[h];if(s){const e="y"===p?"bottom":"right";f=gc(f+d["y"===p?"top":"left"],f,f-d[e])}if(a){const e="y"===h?"bottom":"right";m=gc(m+d["y"===h?"top":"left"],m,m-d[e])}const g=l.fn({...t,[p]:f,[h]:m});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:s,[h]:a}}}}}},yu=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...g}=vc(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=yc(o),y=Ec(a),b=yc(a)===a,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=h||(b||!m?[Rc(a)]:function(e){const t=Rc(e);return[_c(e),t,_c(t)]}(a)),k="none"!==f;!h&&k&&w.push(...function(e,t,n,r){const o=bc(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?Cc:Sc:t?Sc:Cc;case"left":case"right":return t?Pc:jc;default:return[]}}(yc(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(_c)))),i}(a,m,f,x));const E=[a,...w],T=await l.detectOverflow(t,g),_=[];let S=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&_.push(T[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=bc(e),o=Tc(e),i=wc(o);let s="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Rc(s)),[s,Rc(s)]}(o,s,x);_.push(T[e[0]],T[e[1]])}if(S=[...S,{placement:o,overflows:_}],!_.every(e=>e<=0)){var C,P;const e=((null==(C=i.flip)?void 0:C.index)||0)+1,t=E[e];if(t&&("alignment"!==d||y===Ec(t)||S.every(e=>Ec(e.placement)!==y||e.overflows[0]>0)))return{data:{index:e,overflows:S},reset:{placement:t}};let n=null==(P=S.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:P.placement;if(!n)switch(p){case"bestFit":{var j;const e=null==(j=S.filter(e=>{if(k){const t=Ec(e.placement);return t===y||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:j[0];e&&(n=e);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},bu=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...c}=vc(e,t),u=await s.detectOverflow(t,c),d=yc(o),h=bc(o),p="y"===Ec(o),{width:f,height:m}=i.floating;let g,v;"top"===d||"bottom"===d?(g=d,v=h===(await(null==s.isRTL?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,g="end"===h?"top":"bottom");const y=m-u.top-u.bottom,b=f-u.left-u.right,x=cc(m-u[g],y),w=cc(f-u[v],b),k=!t.middlewareData.shift;let E=x,T=w;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(T=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(E=y),k&&!h){const e=uc(u.left,0),t=uc(u.right,0),n=uc(u.top,0),r=uc(u.bottom,0);p?T=f-2*(0!==e||0!==t?e+t:uc(u.left,u.right)):E=m-2*(0!==n||0!==r?n+r:uc(u.top,u.bottom))}await l({...t,availableWidth:T,availableHeight:E});const _=await s.getDimensions(a.floating);return f!==_.width||m!==_.height?{reset:{rects:!0}}:{}}}},xu=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=vc(e,t)||{};if(null==c)return{};const d=Ac(u),h={x:n,y:r},p=Tc(o),f=wc(p),m=await s.getDimensions(c),g="y"===p,v=g?"top":"left",y=g?"bottom":"right",b=g?"clientHeight":"clientWidth",x=i.reference[f]+i.reference[p]-h[p]-i.floating[f],w=h[p]-i.reference[p],k=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let E=k?k[b]:0;E&&await(null==s.isElement?void 0:s.isElement(k))||(E=a.floating[b]||i.floating[f]);const T=x/2-w/2,_=E/2-m[f]/2-1,S=cc(d[v],_),C=cc(d[y],_),P=S,j=E-m[f]-C,R=E/2-m[f]/2+T,A=gc(P,R,j),N=!l.arrow&&null!=bc(o)&&R!==A&&i.reference[f]/2-(R<P?S:C)-m[f]/2<0,M=N?R<P?R-P:R-j:0;return{[p]:h[p]+M,data:{[p]:A,centerOffset:R-A-M,...N&&{alignmentOffset:M}},reset:N}}}),wu=(e,t,n)=>{const r=new Map,o={platform:pu,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Xc(c,r,l),h=r,p={},f=0;for(let n=0;n<a.length;n++){var m;const{name:i,fn:g}=a[n],{x:v,y,data:b,reset:x}=await g({x:u,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:p,rects:c,platform:{...s,detectOverflow:null!=(m=s.detectOverflow)?m:Yc},elements:{reference:e,floating:t}});u=null!=v?v:u,d=null!=y?y:d,p={...p,[i]:{...p[i],...b}},x&&f<=50&&(f++,"object"==typeof x&&(x.placement&&(h=x.placement),x.rects&&(c=!0===x.rects?await s.getElementRects({reference:e,floating:t,strategy:o}):x.rects),({x:u,y:d}=Xc(c,h,l))),n=-1)}return{x:u,y:d,placement:h,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var ku="undefined"!=typeof document?e.useLayoutEffect:function(){};function Eu(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!Eu(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||Eu(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function Tu(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _u(e,t){const n=Tu(e);return Math.round(t*n)/n}function Su(t){const n=e.useRef(t);return ku(()=>{n.current=t}),n}const Cu=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?xu({element:n.current,padding:r}).fn(t):{}:n?xu({element:n,padding:r}).fn(t):{};var o}}),Pu=(e,t)=>({...gu(e),options:[e,t]}),ju=(e,t)=>({...yu(e),options:[e,t]}),Ru=(e,t)=>({...Cu(e),options:[e,t]}),Au={...t},Nu=Au.useInsertionEffect||(e=>e());function Mu(t){const n=e.useRef(()=>{});return Nu(()=>{n.current=t}),e.useCallback(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return null==n.current?void 0:n.current(...t)},[])}const Du="ArrowUp",Ou="ArrowDown",Iu="ArrowLeft",Lu="ArrowRight";function Vu(e,t,n){return Math.floor(e/t)!==n}function Fu(e,t){return t<0||t>=e.current.length}function zu(e,t){return Uu(e,{disabledIndices:t})}function Bu(e,t){return Uu(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Uu(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=void 0===t?{}:t;const s=e.current;let a=n;do{a+=r?-i:i}while(a>=0&&a<=s.length-1&&Hu(s,a,o));return a}function Wu(e,t,n,r,o){if(-1===e)return-1;const i=n.indexOf(e),s=t[e];switch(o){case"tl":return i;case"tr":return s?i+s.width-1:i;case"bl":return s?i+(s.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function $u(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function Hu(e,t,n){if(n)return n.includes(t);const r=e[t];return null==r||r.hasAttribute("disabled")||"true"===r.getAttribute("aria-disabled")}var Gu="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;function qu(){return qu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qu.apply(this,arguments)}let Ku=!1,Xu=0;const Yu=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Xu++,Zu=Au.useId||function(){const[t,n]=e.useState(()=>Ku?Yu():void 0);return Gu(()=>{null==t&&n(Yu())},[]),e.useEffect(()=>{Ku=!0},[]),t},Ju=e.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i,shift:s}},width:a=14,height:l=7,tipRadius:c=0,strokeWidth:u=0,staticOffset:d,stroke:h,d:p,style:{transform:f,...m}={},...g}=t,v=Zu(),[y,b]=e.useState(!1);if(Gu(()=>{o&&"rtl"===Bl(o).direction&&b(!0)},[o]),!o)return null;const[x,w]=r.split("-"),k="top"===x||"bottom"===x;let E=d;(k&&null!=s&&s.x||!k&&null!=s&&s.y)&&(E=null);const T=2*u,_=T/2,S=a/2*(c/-8+1),C=l/2*c/4,P=!!p,j=E&&"end"===w?"bottom":"top";let R=E&&"end"===w?"right":"left";E&&y&&(R="end"===w?"left":"right");const A=null!=(null==i?void 0:i.x)?E||i.x:"",N=null!=(null==i?void 0:i.y)?E||i.y:"",M=p||"M0,0 H"+a+" L"+(a-S)+","+(l-C)+" Q"+a/2+","+l+" "+S+","+(l-C)+" Z",D={top:P?"rotate(180deg)":"",left:P?"rotate(90deg)":"rotate(-90deg)",bottom:P?"":"rotate(180deg)",right:P?"rotate(-90deg)":"rotate(90deg)"}[x];return e.createElement("svg",qu({},g,{"aria-hidden":!0,ref:n,width:P?a:a+T,height:a,viewBox:"0 0 "+a+" "+(l>a?l:a),style:{position:"absolute",pointerEvents:"none",[R]:A,[j]:N,[x]:k||P?"100%":"calc(100% - "+T/2+"px)",transform:[D,f].filter(e=>!!e).join(" "),...m}}),T>0&&e.createElement("path",{clipPath:"url(#"+v+")",fill:"none",stroke:h,strokeWidth:T+(p?0:1),d:M}),e.createElement("path",{stroke:T&&!p?g.fill:"none",d:M}),e.createElement("clipPath",{id:v},e.createElement("rect",{x:-_,y:_*(P?-1:1),width:a+T,height:a})))});const Qu=e.createContext(null),ed=e.createContext(null),td=()=>{var t;return(null==(t=e.useContext(Qu))?void 0:t.id)||null},nd=()=>e.useContext(ed);function rd(e){return"data-floating-ui-"+e}function od(t){const n=(0,e.useRef)(t);return Gu(()=>{n.current=t}),n}const id=rd("safe-polygon");function sd(e,t,n){return n&&!nc(n)?0:"number"==typeof e?e:null==e?void 0:e[t]}let ad=0;function ld(e,t){void 0===t&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(ad);const i=()=>null==e?void 0:e.focus({preventScroll:n});o?i():ad=requestAnimationFrame(i)}function cd(e,t){let n=e.filter(e=>{var n;return e.parentId===t&&(null==(n=e.context)?void 0:n.open)}),r=n;for(;r.length;)r=e.filter(e=>{var t;return null==(t=r)?void 0:t.some(t=>{var n;return e.parentId===t.id&&(null==(n=e.context)?void 0:n.open)})}),n=n.concat(r);return n}let ud=new WeakMap,dd=new WeakSet,hd={},pd=0;const fd=e=>e&&(e.host||fd(e.parentNode));function md(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=rc(e[0]).body;return function(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,s=(a=t,e.map(e=>{if(a.contains(e))return e;const t=fd(e);return a.contains(t)?t:null}).filter(e=>null!=e));var a;const l=new Set,c=new Set(s),u=[];hd[o]||(hd[o]=new WeakMap);const d=hd[o];return s.forEach(function e(t){t&&!l.has(t)&&(l.add(t),t.parentNode&&e(t.parentNode))}),function e(t){t&&!c.has(t)&&[].forEach.call(t.children,t=>{if("script"!==wl(t))if(l.has(t))e(t);else{const e=i?t.getAttribute(i):null,n=null!==e&&"false"!==e,r=(ud.get(t)||0)+1,s=(d.get(t)||0)+1;ud.set(t,r),d.set(t,s),u.push(t),1===r&&n&&dd.add(t),1===s&&t.setAttribute(o,""),!n&&i&&t.setAttribute(i,"true")}})}(t),l.clear(),pd++,()=>{u.forEach(e=>{const t=(ud.get(e)||0)-1,n=(d.get(e)||0)-1;ud.set(e,t),d.set(e,n),t||(!dd.has(e)&&i&&e.removeAttribute(i),dd.delete(e)),n||e.removeAttribute(o)}),pd--,pd||(ud=new WeakMap,ud=new WeakMap,dd=new WeakSet,hd={})}}(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const gd=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function vd(e,t){const n=Kc(e,gd());"prev"===t&&n.reverse();const r=n.indexOf(ql(rc(e)));return n.slice(r+1)[0]}function yd(){return vd(document.body,"next")}function bd(){return vd(document.body,"prev")}function xd(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Kl(n,r)}function wd(e){Kc(e,gd()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})}function kd(e){e.querySelectorAll("[data-tabindex]").forEach(e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})}const Ed={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};function Td(e){"Tab"===e.key&&(e.target,clearTimeout(void 0))}const _d=e.forwardRef(function(t,n){const[r,o]=e.useState();Gu(()=>(Ql()&&o("button"),document.addEventListener("keydown",Td),()=>{document.removeEventListener("keydown",Td)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":!r||void 0,[rd("focus-guard")]:"",style:Ed};return e.createElement("span",qu({},t,i))}),Sd=e.createContext(null),Cd=rd("portal");function Pd(t){const{children:n,id:r,root:o,preserveTabOrder:i=!0}=t,s=function(t){void 0===t&&(t={});const{id:n,root:r}=t,o=Zu(),i=jd(),[s,a]=e.useState(null),l=e.useRef(null);return Gu(()=>()=>{null==s||s.remove(),queueMicrotask(()=>{l.current=null})},[s]),Gu(()=>{if(!o)return;if(l.current)return;const e=n?document.getElementById(n):null;if(!e)return;const t=document.createElement("div");t.id=o,t.setAttribute(Cd,""),e.appendChild(t),l.current=t,a(t)},[n,o]),Gu(()=>{if(null===r)return;if(!o)return;if(l.current)return;let e=r||(null==i?void 0:i.portalNode);e&&!_l(e)&&(e=e.current),e=e||document.body;let t=null;n&&(t=document.createElement("div"),t.id=n,e.appendChild(t));const s=document.createElement("div");s.id=o,s.setAttribute(Cd,""),e=t||e,e.appendChild(s),l.current=s,a(s)},[n,r,o,i]),s}({id:r,root:o}),[a,l]=e.useState(null),c=e.useRef(null),u=e.useRef(null),d=e.useRef(null),h=e.useRef(null),p=null==a?void 0:a.modal,f=null==a?void 0:a.open,m=!!a&&!a.modal&&a.open&&i&&!(!o&&!s);return e.useEffect(()=>{if(s&&i&&!p)return s.addEventListener("focusin",e,!0),s.addEventListener("focusout",e,!0),()=>{s.removeEventListener("focusin",e,!0),s.removeEventListener("focusout",e,!0)};function e(e){s&&xd(e)&&("focusin"===e.type?kd:wd)(s)}},[s,i,p]),e.useEffect(()=>{s&&(f||kd(s))},[f,s]),e.createElement(Sd.Provider,{value:e.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:c,afterOutsideRef:u,beforeInsideRef:d,afterInsideRef:h,portalNode:s,setFocusManagerState:l}),[i,s])},m&&s&&e.createElement(_d,{"data-type":"outside",ref:c,onFocus:e=>{if(xd(e,s)){var t;null==(t=d.current)||t.focus()}else{const e=bd()||(null==a?void 0:a.refs.domReference.current);null==e||e.focus()}}}),m&&s&&e.createElement("span",{"aria-owns":s.id,style:Ed}),s&&Za.createPortal(n,s),m&&s&&e.createElement(_d,{"data-type":"outside",ref:u,onFocus:e=>{if(xd(e,s)){var t;null==(t=h.current)||t.focus()}else{const t=yd()||(null==a?void 0:a.refs.domReference.current);null==t||t.focus(),(null==a?void 0:a.closeOnFocusOut)&&(null==a||a.onOpenChange(!1,e.nativeEvent,"focus-out"))}}}))}const jd=()=>e.useContext(Sd),Rd="data-floating-ui-focusable";function Ad(e){return e?e.hasAttribute(Rd)?e:e.querySelector("["+Rd+"]")||e:null}let Nd=[];function Md(e){Nd=Nd.filter(e=>e.isConnected);let t=e;if(t&&"body"!==wl(t)){if(!function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==Oc.call(e,Mc)&&Hc(t,e)}(t,gd())){const e=Kc(t,gd())[0];e&&(t=e)}Nd.push(t),Nd.length>20&&(Nd=Nd.slice(-20))}}function Dd(){return Nd.slice().reverse().find(e=>e.isConnected)}const Od=e.forwardRef(function(t,n){return e.createElement("button",qu({},t,{type:"button",ref:n,tabIndex:-1,style:Ed}))});function Id(t){const{context:n,children:r,disabled:o=!1,order:i=["content"],guards:s=!0,initialFocus:a=0,returnFocus:l=!0,restoreFocus:c=!1,modal:u=!0,visuallyHiddenDismiss:d=!1,closeOnFocusOut:h=!0}=t,{open:p,refs:f,nodeId:m,onOpenChange:g,events:v,dataRef:y,floatingId:b,elements:{domReference:x,floating:w}}=n,k="number"==typeof a&&a<0,E=lc(x)&&k,T="undefined"==typeof HTMLElement||!("inert"in HTMLElement.prototype)||s,_=od(i),S=od(a),C=od(l),P=nd(),j=jd(),R=e.useRef(null),A=e.useRef(null),N=e.useRef(!1),M=e.useRef(!1),D=e.useRef(-1),O=null!=j,I=Ad(w),L=Mu(function(e){return void 0===e&&(e=I),e?Kc(e,gd()):[]}),V=Mu(e=>{const t=L(e);return _.current.map(e=>x&&"reference"===e?x:I&&"floating"===e?I:t).filter(Boolean).flat()});function F(t){return!o&&d&&u?e.createElement(Od,{ref:"start"===t?R:A,onClick:e=>g(!1,e.nativeEvent)},"string"==typeof d?d:"Dismiss"):null}e.useEffect(()=>{if(o)return;if(!u)return;function e(e){if("Tab"===e.key){Kl(I,ql(rc(I)))&&0===L().length&&!E&&ac(e);const t=V(),n=ic(e);"reference"===_.current[0]&&n===x&&(ac(e),e.shiftKey?ld(t[t.length-1]):ld(t[1])),"floating"===_.current[1]&&n===I&&e.shiftKey&&(ac(e),ld(t[0]))}}const t=rc(I);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}},[o,x,I,u,_,E,L,V]),e.useEffect(()=>{if(!o&&w)return w.addEventListener("focusin",e),()=>{w.removeEventListener("focusin",e)};function e(e){const t=ic(e),n=L().indexOf(t);-1!==n&&(D.current=n)}},[o,w,L]),e.useEffect(()=>{if(!o&&h)return w&&Sl(x)?(x.addEventListener("focusout",t),x.addEventListener("pointerdown",e),w.addEventListener("focusout",t),()=>{x.removeEventListener("focusout",t),x.removeEventListener("pointerdown",e),w.removeEventListener("focusout",t)}):void 0;function e(){M.current=!0,setTimeout(()=>{M.current=!1})}function t(e){const t=e.relatedTarget;queueMicrotask(()=>{const n=!(Kl(x,t)||Kl(w,t)||Kl(t,w)||Kl(null==j?void 0:j.portalNode,t)||null!=t&&t.hasAttribute(rd("focus-guard"))||P&&(cd(P.nodesRef.current,m).find(e=>{var n,r;return Kl(null==(n=e.context)?void 0:n.elements.floating,t)||Kl(null==(r=e.context)?void 0:r.elements.domReference,t)})||function(e,t){var n;let r=[],o=null==(n=e.find(e=>e.id===t))?void 0:n.parentId;for(;o;){const t=e.find(e=>e.id===o);o=null==t?void 0:t.parentId,t&&(r=r.concat(t))}return r}(P.nodesRef.current,m).find(e=>{var n,r;return(null==(n=e.context)?void 0:n.elements.floating)===t||(null==(r=e.context)?void 0:r.elements.domReference)===t})));if(c&&n&&ql(rc(I))===rc(I).body){Sl(I)&&I.focus();const e=D.current,t=L(),n=t[e]||t[t.length-1]||I;Sl(n)&&n.focus()}!E&&u||!t||!n||M.current||t===Dd()||(N.current=!0,g(!1,e,"focus-out"))})}},[o,x,w,I,u,m,P,j,g,h,c,L,E]),e.useEffect(()=>{var e;if(o)return;const t=Array.from((null==j||null==(e=j.portalNode)?void 0:e.querySelectorAll("["+rd("portal")+"]"))||[]);if(w){const e=[w,...t,R.current,A.current,_.current.includes("reference")||E?x:null].filter(e=>null!=e),n=u||E?md(e,T,!T):md(e);return()=>{n()}}},[o,x,w,u,_,j,E,T]),Gu(()=>{if(o||!Sl(I))return;const e=ql(rc(I));queueMicrotask(()=>{const t=V(I),n=S.current,r=("number"==typeof n?t[n]:n.current)||I,o=Kl(I,e);k||o||!p||ld(r,{preventScroll:r===I})})},[o,p,I,k,V,S]),Gu(()=>{if(o||!I)return;let e=!1;const t=rc(I),n=ql(t);let r=y.current.openEvent;function i(t){let{open:n,reason:o,event:i,nested:s}=t;n&&(r=i),"escape-key"===o&&f.domReference.current&&Md(f.domReference.current),"hover"===o&&"mouseleave"===i.type&&(N.current=!0),"outside-press"===o&&(s?(N.current=!1,e=!0):N.current=!(Zl(i)||Jl(i)))}Md(n),v.on("openchange",i);const s=t.createElement("span");return s.setAttribute("tabindex","-1"),s.setAttribute("aria-hidden","true"),Object.assign(s.style,Ed),O&&x&&x.insertAdjacentElement("afterend",s),()=>{v.off("openchange",i);const n=ql(t),o=Kl(w,n)||P&&cd(P.nodesRef.current,m).some(e=>{var t;return Kl(null==(t=e.context)?void 0:t.elements.floating,n)});(o||r&&["click","mousedown"].includes(r.type))&&f.domReference.current&&Md(f.domReference.current);const a="boolean"==typeof C.current?Dd()||s:C.current.current||s;queueMicrotask(()=>{C.current&&!N.current&&Sl(a)&&(a===n||n===t.body||o)&&a.focus({preventScroll:e}),s.remove()})}},[o,w,I,C,y,f,v,P,m,O,x]),e.useEffect(()=>{queueMicrotask(()=>{N.current=!1})},[o]),Gu(()=>{if(!o&&j)return j.setFocusManagerState({modal:u,closeOnFocusOut:h,open:p,onOpenChange:g,refs:f}),()=>{j.setFocusManagerState(null)}},[o,j,u,p,g,f,h]),Gu(()=>{if(o)return;if(!I)return;if("function"!=typeof MutationObserver)return;if(k)return;const e=()=>{const e=I.getAttribute("tabindex"),t=L(),n=ql(rc(w)),r=t.indexOf(n);-1!==r&&(D.current=r),_.current.includes("floating")||n!==f.domReference.current&&0===t.length?"0"!==e&&I.setAttribute("tabindex","0"):"-1"!==e&&I.setAttribute("tabindex","-1")};e();const t=new MutationObserver(e);return t.observe(I,{childList:!0,subtree:!0,attributes:!0}),()=>{t.disconnect()}},[o,w,I,f,_,L,k]);const z=!o&&T&&(!u||!E)&&(O||u);return e.createElement(e.Fragment,null,z&&e.createElement(_d,{"data-type":"inside",ref:null==j?void 0:j.beforeInsideRef,onFocus:e=>{if(u){const e=V();ld("reference"===i[0]?e[0]:e[e.length-1])}else if(null!=j&&j.preserveTabOrder&&j.portalNode)if(N.current=!1,xd(e,j.portalNode)){const e=yd()||x;null==e||e.focus()}else{var t;null==(t=j.beforeOutsideRef.current)||t.focus()}}}),!E&&F("start"),r,F("end"),z&&e.createElement(_d,{"data-type":"inside",ref:null==j?void 0:j.afterInsideRef,onFocus:e=>{if(u)ld(V()[0]);else if(null!=j&&j.preserveTabOrder&&j.portalNode)if(h&&(N.current=!0),xd(e,j.portalNode)){const e=bd()||x;null==e||e.focus()}else{var t;null==(t=j.afterOutsideRef.current)||t.focus()}}}))}function Ld(e){return Sl(e.target)&&"BUTTON"===e.target.tagName}function Vd(e){return sc(e)}function Fd(t,n){void 0===n&&(n={});const{open:r,onOpenChange:o,dataRef:i,elements:{domReference:s}}=t,{enabled:a=!0,event:l="click",toggle:c=!0,ignoreMouse:u=!1,keyboardHandlers:d=!0,stickIfOpen:h=!0}=n,p=e.useRef(),f=e.useRef(!1),m=e.useMemo(()=>({onPointerDown(e){p.current=e.pointerType},onMouseDown(e){const t=p.current;0===e.button&&"click"!==l&&(nc(t,!0)&&u||(!r||!c||i.current.openEvent&&h&&"mousedown"!==i.current.openEvent.type?(e.preventDefault(),o(!0,e.nativeEvent,"click")):o(!1,e.nativeEvent,"click")))},onClick(e){const t=p.current;"mousedown"===l&&p.current?p.current=void 0:nc(t,!0)&&u||(!r||!c||i.current.openEvent&&h&&"click"!==i.current.openEvent.type?o(!0,e.nativeEvent,"click"):o(!1,e.nativeEvent,"click"))},onKeyDown(e){p.current=void 0,e.defaultPrevented||!d||Ld(e)||(" "!==e.key||Vd(s)||(e.preventDefault(),f.current=!0),"Enter"===e.key&&o(!r||!c,e.nativeEvent,"click"))},onKeyUp(e){e.defaultPrevented||!d||Ld(e)||Vd(s)||" "===e.key&&f.current&&(f.current=!1,o(!r||!c,e.nativeEvent,"click"))}}),[i,s,l,u,d,o,r,h,c]);return e.useMemo(()=>a?{reference:m}:{},[a,m])}const zd={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Bd={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Ud=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function Wd(t,n){void 0===n&&(n={});const{open:r,onOpenChange:o,elements:i,dataRef:s}=t,{enabled:a=!0,escapeKey:l=!0,outsidePress:c=!0,outsidePressEvent:u="pointerdown",referencePress:d=!1,referencePressEvent:h="pointerdown",ancestorScroll:p=!1,bubbles:f,capture:m}=n,g=nd(),v=Mu("function"==typeof c?c:()=>!1),y="function"==typeof c?v:c,b=e.useRef(!1),x=e.useRef(!1),{escapeKey:w,outsidePress:k}=Ud(f),{escapeKey:E,outsidePress:T}=Ud(m),_=e.useRef(!1),S=Mu(e=>{var t;if(!r||!a||!l||"Escape"!==e.key)return;if(_.current)return;const n=null==(t=s.current.floatingContext)?void 0:t.nodeId,i=g?cd(g.nodesRef.current,n):[];if(!w&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach(t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)}),!e)return}o(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")}),C=Mu(e=>{var t;const n=()=>{var t;S(e),null==(t=ic(e))||t.removeEventListener("keydown",n)};null==(t=ic(e))||t.addEventListener("keydown",n)}),P=Mu(e=>{var t;const n=b.current;b.current=!1;const r=x.current;if(x.current=!1,"click"===u&&r)return;if(n)return;if("function"==typeof y&&!y(e))return;const a=ic(e),l="["+rd("inert")+"]",c=rc(i.floating).querySelectorAll(l);let d=_l(a)?a:null;for(;d&&!zl(d);){const e=Wl(d);if(zl(e)||!_l(e))break;d=e}if(c.length&&_l(a)&&!a.matches("html,body")&&!Kl(a,i.floating)&&Array.from(c).every(e=>!Kl(d,e)))return;if(Sl(a)&&A){const t=a.clientWidth>0&&a.scrollWidth>a.clientWidth,n=a.clientHeight>0&&a.scrollHeight>a.clientHeight;let r=n&&e.offsetX>a.clientWidth;if(n&&"rtl"===Bl(a).direction&&(r=e.offsetX<=a.offsetWidth-a.clientWidth),r||t&&e.offsetY>a.clientHeight)return}const h=null==(t=s.current.floatingContext)?void 0:t.nodeId,p=g&&cd(g.nodesRef.current,h).some(t=>{var n;return oc(e,null==(n=t.context)?void 0:n.elements.floating)});if(oc(e,i.floating)||oc(e,i.domReference)||p)return;const f=g?cd(g.nodesRef.current,h):[];if(f.length>0){let e=!0;if(f.forEach(t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)}),!e)return}o(!1,e,"outside-press")}),j=Mu(e=>{var t;const n=()=>{var t;P(e),null==(t=ic(e))||t.removeEventListener(u,n)};null==(t=ic(e))||t.addEventListener(u,n)});e.useEffect(()=>{if(!r||!a)return;s.current.__escapeKeyBubbles=w,s.current.__outsidePressBubbles=k;let e=-1;function t(e){o(!1,e,"ancestor-scroll")}function n(){window.clearTimeout(e),_.current=!0}function c(){e=window.setTimeout(()=>{_.current=!1},Vl()?5:0)}const d=rc(i.floating);l&&(d.addEventListener("keydown",E?C:S,E),d.addEventListener("compositionstart",n),d.addEventListener("compositionend",c)),y&&d.addEventListener(u,T?j:P,T);let h=[];return p&&(_l(i.domReference)&&(h=Hl(i.domReference)),_l(i.floating)&&(h=h.concat(Hl(i.floating))),!_l(i.reference)&&i.reference&&i.reference.contextElement&&(h=h.concat(Hl(i.reference.contextElement)))),h=h.filter(e=>{var t;return e!==(null==(t=d.defaultView)?void 0:t.visualViewport)}),h.forEach(e=>{e.addEventListener("scroll",t,{passive:!0})}),()=>{l&&(d.removeEventListener("keydown",E?C:S,E),d.removeEventListener("compositionstart",n),d.removeEventListener("compositionend",c)),y&&d.removeEventListener(u,T?j:P,T),h.forEach(e=>{e.removeEventListener("scroll",t)}),window.clearTimeout(e)}},[s,i,l,y,u,r,o,p,a,w,k,S,E,C,P,T,j]),e.useEffect(()=>{b.current=!1},[y,u]);const R=e.useMemo(()=>({onKeyDown:S,[zd[h]]:e=>{d&&o(!1,e.nativeEvent,"reference-press")}}),[S,o,d,h]),A=e.useMemo(()=>({onKeyDown:S,onMouseDown(){x.current=!0},onMouseUp(){x.current=!0},[Bd[u]]:()=>{b.current=!0}}),[S,u]);return e.useMemo(()=>a?{reference:R,floating:A}:{},[a,R,A])}function $d(t){void 0===t&&(t={});const{nodeId:n}=t,r=function(t){const{open:n=!1,onOpenChange:r,elements:o}=t,i=Zu(),s=e.useRef({}),[a]=e.useState(()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach(e=>e(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter(e=>e!==n))||[])}}}()),l=null!=td(),[c,u]=e.useState(o.reference),d=Mu((e,t,n)=>{s.current.openEvent=e?t:void 0,a.emit("openchange",{open:e,event:t,reason:n,nested:l}),null==r||r(e,t,n)}),h=e.useMemo(()=>({setPositionReference:u}),[]),p=e.useMemo(()=>({reference:c||o.reference||null,floating:o.floating||null,domReference:o.reference}),[c,o.reference,o.floating]);return e.useMemo(()=>({dataRef:s,open:n,onOpenChange:d,elements:p,events:a,floatingId:i,refs:h}),[n,d,p,a,i,h])}({...t,elements:{reference:null,floating:null,...t.elements}}),o=t.rootContext||r,i=o.elements,[s,a]=e.useState(null),[l,c]=e.useState(null),u=(null==i?void 0:i.domReference)||s,d=e.useRef(null),h=nd();Gu(()=>{u&&(d.current=u)},[u]);const p=function(t){void 0===t&&(t={});const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:s,floating:a}={},transform:l=!0,whileElementsMounted:c,open:u}=t,[d,h]=e.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[p,f]=e.useState(o);Eu(p,o)||f(o);const[m,g]=e.useState(null),[v,y]=e.useState(null),b=e.useCallback(e=>{e!==E.current&&(E.current=e,g(e))},[]),x=e.useCallback(e=>{e!==T.current&&(T.current=e,y(e))},[]),w=s||m,k=a||v,E=e.useRef(null),T=e.useRef(null),_=e.useRef(d),S=null!=c,C=Su(c),P=Su(i),j=Su(u),R=e.useCallback(()=>{if(!E.current||!T.current)return;const e={placement:n,strategy:r,middleware:p};P.current&&(e.platform=P.current),wu(E.current,T.current,e).then(e=>{const t={...e,isPositioned:!1!==j.current};A.current&&!Eu(_.current,t)&&(_.current=t,Za.flushSync(()=>{h(t)}))})},[p,n,r,P,j]);ku(()=>{!1===u&&_.current.isPositioned&&(_.current.isPositioned=!1,h(e=>({...e,isPositioned:!1})))},[u]);const A=e.useRef(!1);ku(()=>(A.current=!0,()=>{A.current=!1}),[]),ku(()=>{if(w&&(E.current=w),k&&(T.current=k),w&&k){if(C.current)return C.current(w,k,R);R()}},[w,k,R,C,S]);const N=e.useMemo(()=>({reference:E,floating:T,setReference:b,setFloating:x}),[b,x]),M=e.useMemo(()=>({reference:w,floating:k}),[w,k]),D=e.useMemo(()=>{const e={position:r,left:0,top:0};if(!M.floating)return e;const t=_u(M.floating,d.x),n=_u(M.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+n+"px)",...Tu(M.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,l,M.floating,d.x,d.y]);return e.useMemo(()=>({...d,update:R,refs:N,elements:M,floatingStyles:D}),[d,R,N,M,D])}({...t,elements:{...i,...l&&{reference:l}}}),f=e.useCallback(e=>{const t=_l(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;c(t),p.refs.setReference(t)},[p.refs]),m=e.useCallback(e=>{(_l(e)||null===e)&&(d.current=e,a(e)),(_l(p.refs.reference.current)||null===p.refs.reference.current||null!==e&&!_l(e))&&p.refs.setReference(e)},[p.refs]),g=e.useMemo(()=>({...p.refs,setReference:m,setPositionReference:f,domReference:d}),[p.refs,m,f]),v=e.useMemo(()=>({...p.elements,domReference:u}),[p.elements,u]),y=e.useMemo(()=>({...p,...o,refs:g,elements:v,nodeId:n}),[p,g,v,n,o]);return Gu(()=>{o.dataRef.current.floatingContext=y;const e=null==h?void 0:h.nodesRef.current.find(e=>e.id===n);e&&(e.context=y)}),e.useMemo(()=>({...p,context:y,refs:g,elements:v}),[p,g,v,y])}const Hd="active",Gd="selected";function qd(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[Hd]:t,[Gd]:__,...n}=e;i=n}return{..."floating"===n&&{tabIndex:-1,[Rd]:""},...i,...t.map(t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r}).concat(e).reduce((e,t)=>t?(Object.entries(t).forEach(t=>{let[n,i]=t;var s;o&&[Hd,Gd].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(s=r.get(n))||s.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map(e=>e(...o)).find(e=>void 0!==e)})):e[n]=i)}),e):e,{})}}function Kd(t){void 0===t&&(t=[]);const n=t.map(e=>null==e?void 0:e.reference),r=t.map(e=>null==e?void 0:e.floating),o=t.map(e=>null==e?void 0:e.item),i=e.useCallback(e=>qd(e,t,"reference"),n),s=e.useCallback(e=>qd(e,t,"floating"),r),a=e.useCallback(e=>qd(e,t,"item"),o);return e.useMemo(()=>({getReferenceProps:i,getFloatingProps:s,getItemProps:a}),[i,s,a])}let Xd=!1;function Yd(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Zd(e,t){return Yd(t,e===Du||e===Ou,e===Iu||e===Lu)}function Jd(e,t,n){return Yd(t,e===Ou,n?e===Iu:e===Lu)||"Enter"===e||" "===e||""===e}function Qd(e,t,n){return Yd(t,n?e===Lu:e===Iu,e===Du)}function eh(t,n){const{open:r,onOpenChange:o,elements:i}=t,{listRef:s,activeIndex:a,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:u=null,allowEscape:d=!1,loop:h=!1,nested:p=!1,rtl:f=!1,virtual:m=!1,focusItemOnOpen:g="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:y=!0,disabledIndices:b,orientation:x="vertical",cols:w=1,scrollItemIntoView:k=!0,virtualItemRef:E,itemSizes:T,dense:_=!1}=n,S=od(Ad(i.floating)),C=td(),P=nd(),j=Mu(l),R=lc(i.domReference),A=e.useRef(g),N=e.useRef(null!=u?u:-1),M=e.useRef(null),D=e.useRef(!0),O=e.useRef(j),I=e.useRef(!!i.floating),L=e.useRef(r),V=e.useRef(!1),F=e.useRef(!1),z=od(b),B=od(r),U=od(k),W=od(u),[$,H]=e.useState(),[G,q]=e.useState(),K=Mu(function(e,t,n){function r(e){m?(H(e.id),null==P||P.events.emit("virtualfocus",e),E&&(E.current=e)):ld(e,{preventScroll:!0,sync:!(!tc()||!Ql())&&(Xd||V.current)})}void 0===n&&(n=!1);const o=e.current[t.current];o&&r(o),requestAnimationFrame(()=>{const i=e.current[t.current]||o;if(!i)return;o||r(i);const s=U.current;s&&Y&&(n||!D.current)&&(null==i.scrollIntoView||i.scrollIntoView("boolean"==typeof s?{block:"nearest",inline:"nearest"}:s))})});Gu(()=>{document.createElement("div").focus({get preventScroll(){return Xd=!0,!1}})},[]),Gu(()=>{c&&(r&&i.floating?A.current&&null!=u&&(F.current=!0,N.current=u,j(u)):I.current&&(N.current=-1,O.current(null)))},[c,r,i.floating,u,j]),Gu(()=>{if(c&&r&&i.floating)if(null==a){if(V.current=!1,null!=W.current)return;if(I.current&&(N.current=-1,K(s,N)),(!L.current||!I.current)&&A.current&&(null!=M.current||!0===A.current&&null==M.current)){let e=0;const t=()=>{null==s.current[0]?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e++):(N.current=null==M.current||Jd(M.current,x,f)||p?zu(s,z.current):Bu(s,z.current),M.current=null,j(N.current))};t()}}else Fu(s,a)||(N.current=a,K(s,N,F.current),F.current=!1)},[c,r,i.floating,a,W,p,s,x,f,j,K,z]),Gu(()=>{var e;if(!c||i.floating||!P||m||!I.current)return;const t=P.nodesRef.current,n=null==(e=t.find(e=>e.id===C))||null==(e=e.context)?void 0:e.elements.floating,r=ql(rc(i.floating)),o=t.some(e=>e.context&&Kl(e.context.elements.floating,r));n&&!o&&D.current&&n.focus({preventScroll:!0})},[c,i.floating,P,C,m]),Gu(()=>{if(c&&P&&m&&!C)return P.events.on("virtualfocus",e),()=>{P.events.off("virtualfocus",e)};function e(e){q(e.id),E&&(E.current=e)}},[c,P,m,C,E]),Gu(()=>{O.current=j,I.current=!!i.floating}),Gu(()=>{r||(M.current=null)},[r]),Gu(()=>{L.current=r},[r]);const X=null!=a,Y=e.useMemo(()=>{function e(e){if(!r)return;const t=s.current.indexOf(e);-1!==t&&j(t)}return{onFocus(t){let{currentTarget:n}=t;e(n)},onClick:e=>{let{currentTarget:t}=e;return t.focus({preventScroll:!0})},...v&&{onMouseMove(t){let{currentTarget:n}=t;e(n)},onPointerLeave(e){let{pointerType:t}=e;D.current&&"touch"!==t&&(N.current=-1,K(s,N),j(null),m||ld(S.current,{preventScroll:!0}))}}}},[r,S,K,v,s,j,m]),Z=Mu(e=>{if(D.current=!1,V.current=!0,229===e.which)return;if(!B.current&&e.currentTarget===S.current)return;if(p&&Qd(e.key,x,f))return ac(e),o(!1,e.nativeEvent,"list-navigation"),void(Sl(i.domReference)&&(m?null==P||P.events.emit("virtualfocus",i.domReference):i.domReference.focus()));const t=N.current,n=zu(s,b),a=Bu(s,b);if(R||("Home"===e.key&&(ac(e),N.current=n,j(N.current)),"End"===e.key&&(ac(e),N.current=a,j(N.current))),w>1){const t=T||Array.from({length:s.current.length},()=>({width:1,height:1})),r=function(e,t,n){const r=[];let o=0;return e.forEach((e,i)=>{let{width:s,height:a}=e,l=!1;for(n&&(o=0);!l;){const e=[];for(let n=0;n<s;n++)for(let r=0;r<a;r++)e.push(o+n+r*t);o%t+s<=t&&e.every(e=>null==r[e])?(e.forEach(e=>{r[e]=i}),l=!0):o++}}),[...r]}(t,w,_),o=r.findIndex(e=>null!=e&&!Hu(s.current,e,b)),i=r.reduce((e,t,n)=>null==t||Hu(s.current,t,b)?e:n,-1),l=r[function(e,t){let{event:n,orientation:r,loop:o,rtl:i,cols:s,disabledIndices:a,minIndex:l,maxIndex:c,prevIndex:u,stopEvent:d=!1}=t,h=u;if(n.key===Du){if(d&&ac(n),-1===u)h=c;else if(h=Uu(e,{startingIndex:h,amount:s,decrement:!0,disabledIndices:a}),o&&(u-s<l||h<0)){const e=u%s,t=c%s,n=c-(t-e);h=t===e?c:t>e?n:n-s}Fu(e,h)&&(h=u)}if(n.key===Ou&&(d&&ac(n),-1===u?h=l:(h=Uu(e,{startingIndex:u,amount:s,disabledIndices:a}),o&&u+s>c&&(h=Uu(e,{startingIndex:u%s-s,amount:s,disabledIndices:a}))),Fu(e,h)&&(h=u)),"both"===r){const t=hc(u/s);n.key===(i?Iu:Lu)&&(d&&ac(n),u%s!==s-1?(h=Uu(e,{startingIndex:u,disabledIndices:a}),o&&Vu(h,s,t)&&(h=Uu(e,{startingIndex:u-u%s-1,disabledIndices:a}))):o&&(h=Uu(e,{startingIndex:u-u%s-1,disabledIndices:a})),Vu(h,s,t)&&(h=u)),n.key===(i?Lu:Iu)&&(d&&ac(n),u%s!==0?(h=Uu(e,{startingIndex:u,decrement:!0,disabledIndices:a}),o&&Vu(h,s,t)&&(h=Uu(e,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:a}))):o&&(h=Uu(e,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:a})),Vu(h,s,t)&&(h=u));const r=hc(c/s)===t;Fu(e,h)&&(h=o&&r?n.key===(i?Lu:Iu)?c:Uu(e,{startingIndex:u-u%s-1,disabledIndices:a}):u)}return h}({current:r.map(e=>null!=e?s.current[e]:null)},{event:e,orientation:x,loop:h,rtl:f,cols:w,disabledIndices:$u([...b||s.current.map((e,t)=>Hu(s.current,t)?t:void 0),void 0],r),minIndex:o,maxIndex:i,prevIndex:Wu(N.current>a?n:N.current,t,r,w,e.key===Ou?"bl":e.key===(f?Iu:Lu)?"tr":"tl"),stopEvent:!0})];if(null!=l&&(N.current=l,j(N.current)),"both"===x)return}if(Zd(e.key,x)){if(ac(e),r&&!m&&ql(e.currentTarget.ownerDocument)===e.currentTarget)return N.current=Jd(e.key,x,f)?n:a,void j(N.current);Jd(e.key,x,f)?N.current=h?t>=a?d&&t!==s.current.length?-1:n:Uu(s,{startingIndex:t,disabledIndices:b}):Math.min(a,Uu(s,{startingIndex:t,disabledIndices:b})):N.current=h?t<=n?d&&-1!==t?s.current.length:a:Uu(s,{startingIndex:t,decrement:!0,disabledIndices:b}):Math.max(n,Uu(s,{startingIndex:t,decrement:!0,disabledIndices:b})),Fu(s,N.current)?j(null):j(N.current)}}),J=e.useMemo(()=>m&&r&&X&&{"aria-activedescendant":G||$},[m,r,X,G,$]),Q=e.useMemo(()=>({"aria-orientation":"both"===x?void 0:x,...!lc(i.domReference)&&J,onKeyDown:Z,onPointerMove(){D.current=!0}}),[J,Z,i.domReference,x]),ee=e.useMemo(()=>{function e(e){"auto"===g&&Zl(e.nativeEvent)&&(A.current=!0)}return{...J,onKeyDown(e){D.current=!1;const t=e.key.startsWith("Arrow"),n=["Home","End"].includes(e.key),i=t||n,a=function(e,t,n){return Yd(t,n?e===Iu:e===Lu,e===Ou)}(e.key,x,f),l=Qd(e.key,x,f),c=Zd(e.key,x),d=(p?a:c)||"Enter"===e.key||""===e.key.trim();if(m&&r){const t=null==P?void 0:P.nodesRef.current.find(e=>null==e.parentId),r=P&&t?function(e,t){let n,r=-1;return function t(o,i){i>r&&(n=o,r=i),cd(e,o).forEach(e=>{t(e.id,i+1)})}(t,0),e.find(e=>e.id===n)}(P.nodesRef.current,t.id):null;if(i&&r&&E){const t=new KeyboardEvent("keydown",{key:e.key,bubbles:!0});if(a||l){var h,g;const n=(null==(h=r.context)?void 0:h.elements.domReference)===e.currentTarget,o=l&&!n?null==(g=r.context)?void 0:g.elements.domReference:a?s.current.find(e=>(null==e?void 0:e.id)===$):null;o&&(ac(e),o.dispatchEvent(t),q(void 0))}var v;if((c||n)&&r.context&&r.context.open&&r.parentId&&e.currentTarget!==r.context.elements.domReference)return ac(e),void(null==(v=r.context.elements.domReference)||v.dispatchEvent(t))}return Z(e)}(r||y||!t)&&(d&&(M.current=p&&c?null:e.key),p?a&&(ac(e),r?(N.current=zu(s,z.current),j(N.current)):o(!0,e.nativeEvent,"list-navigation")):c&&(null!=u&&(N.current=u),ac(e),!r&&y?o(!0,e.nativeEvent,"list-navigation"):Z(e),r&&j(N.current)))},onFocus(){r&&!m&&j(null)},onPointerDown:function(e){A.current=g,"auto"===g&&Jl(e.nativeEvent)&&(A.current=!0)},onMouseDown:e,onClick:e}},[$,J,Z,z,g,s,p,j,o,r,y,x,f,u,P,m,E]);return e.useMemo(()=>c?{reference:ee,floating:Q,item:Y}:{},[c,ee,Q,Y])}const th=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function nh(t,n){var r;void 0===n&&(n={});const{open:o,floatingId:i}=t,{enabled:s=!0,role:a="dialog"}=n,l=null!=(r=th.get(a))?r:a,c=Zu(),u=null!=td(),d=e.useMemo(()=>"tooltip"===l||"label"===a?{["aria-"+("label"===a?"labelledby":"describedby")]:o?i:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":"alertdialog"===l?"dialog":l,"aria-controls":o?i:void 0,..."listbox"===l&&{role:"combobox"},..."menu"===l&&{id:c},..."menu"===l&&u&&{role:"menuitem"},..."select"===a&&{"aria-autocomplete":"none"},..."combobox"===a&&{"aria-autocomplete":"list"}},[l,i,u,o,c,a]),h=e.useMemo(()=>{const e={id:i,...l&&{role:l}};return"tooltip"===l||"label"===a?e:{...e,..."menu"===l&&{"aria-labelledby":c}}},[l,i,c,a]),p=e.useCallback(e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:i+"-option"}};switch(a){case"select":return{...r,"aria-selected":t&&n};case"combobox":return{...r,...t&&{"aria-selected":!0}}}return{}},[i,a]);return e.useMemo(()=>s?{reference:d,floating:h,item:p}:{},[s,d,h,p])}const rh=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,t)=>(t?"-":"")+e.toLowerCase());function oh(e,t){return"function"==typeof e?e(t):e}function ih(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let e=0,s=i-1;e<i;s=e++){const[i,a]=t[e]||[0,0],[l,c]=t[s]||[0,0];a>=r!=c>=r&&n<=(l-i)*(r-a)/(c-a)+i&&(o=!o)}return o}function sh(e){void 0===e&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,s=null,a=null,l=performance.now();const c=e=>{let{x:n,y:c,placement:u,elements:d,onClose:h,nodeId:p,tree:f}=e;return function(e){function m(){clearTimeout(o),h()}if(clearTimeout(o),!d.domReference||!d.floating||null==u||null==n||null==c)return;const{clientX:g,clientY:v}=e,y=[g,v],b=ic(e),x="mouseleave"===e.type,w=Kl(d.floating,b),k=Kl(d.domReference,b),E=d.domReference.getBoundingClientRect(),T=d.floating.getBoundingClientRect(),_=u.split("-")[0],S=n>T.right-T.width/2,C=c>T.bottom-T.height/2,P=function(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}(y,E),j=T.width>E.width,R=T.height>E.height,A=(j?E:T).left,N=(j?E:T).right,M=(R?E:T).top,D=(R?E:T).bottom;if(w&&(i=!0,!x))return;if(k&&(i=!1),k&&!x)return void(i=!0);if(x&&_l(e.relatedTarget)&&Kl(d.floating,e.relatedTarget))return;if(f&&cd(f.nodesRef.current,p).some(e=>{let{context:t}=e;return null==t?void 0:t.open}))return;if("top"===_&&c>=E.bottom-1||"bottom"===_&&c<=E.top+1||"left"===_&&n>=E.right-1||"right"===_&&n<=E.left+1)return m();let O=[];switch(_){case"top":O=[[A,E.top+1],[A,T.bottom-1],[N,T.bottom-1],[N,E.top+1]];break;case"bottom":O=[[A,T.top+1],[A,E.bottom-1],[N,E.bottom-1],[N,T.top+1]];break;case"left":O=[[T.right-1,D],[T.right-1,M],[E.left+1,M],[E.left+1,D]];break;case"right":O=[[E.right-1,D],[E.right-1,M],[T.left+1,M],[T.left+1,D]]}if(!ih([g,v],O)){if(i&&!P)return m();if(!x&&r){const t=function(e,t){const n=performance.now(),r=n-l;if(null===s||null===a||0===r)return s=e,a=t,l=n,null;const o=e-s,i=t-a,c=Math.sqrt(o*o+i*i);return s=e,a=t,l=n,c/r}(e.clientX,e.clientY);if(null!==t&&t<.1)return m()}ih([g,v],function(e){let[n,r]=e;switch(_){case"top":return[[j?n+t/2:S?n+4*t:n-4*t,r+t+1],[j?n-t/2:S?n+4*t:n-4*t,r+t+1],[T.left,S||j?T.bottom-t:T.top],[T.right,S?j?T.bottom-t:T.top:T.bottom-t]];case"bottom":return[[j?n+t/2:S?n+4*t:n-4*t,r-t],[j?n-t/2:S?n+4*t:n-4*t,r-t],[T.left,S||j?T.top+t:T.bottom],[T.right,S?j?T.top+t:T.bottom:T.top+t]];case"left":{const e=[n+t+1,R?r+t/2:C?r+4*t:r-4*t],o=[n+t+1,R?r-t/2:C?r+4*t:r-4*t];return[[C||R?T.right-t:T.left,T.top],[C?R?T.right-t:T.left:T.right-t,T.bottom],e,o]}case"right":return[[n-t,R?r+t/2:C?r+4*t:r-4*t],[n-t,R?r-t/2:C?r+4*t:r-4*t],[C||R?T.left+t:T.right,T.top],[C?R?T.left+t:T.right:T.left+t,T.bottom]]}}([n,c]))?!i&&r&&(o=window.setTimeout(m,40)):m()}}};return c.__options={blockPointerEvents:n},c}const ah=Xa("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),lh=Xa("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),ch=Xa("TriangleAlert",[["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"}]]),uh=Xa("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),dh="light",hh="neutral",ph=({icon:t,theme:n=dh,variant:r=hh})=>{const o="[&>svg]:h-5 [&>svg]:w-5",i=(({theme:e=dh,variant:t=hh})=>{let n="light"===e?"text-icon-secondary":"text-icon-inverse";return n={info:"light"===e?"text-support-info":"text-support-info-inverse",success:"light"===e?"text-support-success":"text-support-success-inverse",warning:"light"===e?"text-support-warning":"text-support-warning-inverse",error:"light"===e?"text-support-error":"text-support-error-inverse"}[t]||n,n})({theme:n,variant:r});if(t&&(0,e.isValidElement)(t))return(0,e.cloneElement)(t,{className:$a(o,i,t?.props?.className??"")});const s={neutral:(0,d.jsx)(ah,{className:$a(o,i)}),info:(0,d.jsx)(ah,{className:$a(o,i)}),success:(0,d.jsx)(lh,{className:$a(o,i)}),warning:(0,d.jsx)(ch,{className:$a(o,i)}),error:(0,d.jsx)(uh,{className:$a(o,i)})};return s[r]||s.neutral},fh=({actionType:e="button",onAction:t=()=>{},actionLabel:n="",theme:r=dh})=>{const o="focus:ring-0 focus:ring-offset-0 ring-offset-0 focus:outline-none";let i="text-button-primary border-button-primary hover:border-button-primary hover:text-button-primary-hover";switch("dark"===r&&(i="text-text-inverse border-text-inverse hover:border-text-inverse hover:text-text-inverse"),e){case"button":return(0,d.jsx)(hl,{variant:"outline",size:"xs",onClick:t,className:$a("rounded",o,i,"dark"===r?"bg-transparent hover:bg-transparent":"bg-white hover:bg-white"),children:n});case"link":return(0,d.jsx)(hl,{variant:"link",size:"xs",onClick:t,className:$a(o,i),children:n});default:return null}},mh=({theme:e=dh,title:t="",inline:n=!1})=>t?(0,d.jsx)("span",{className:$a("block",{light:"text-text-primary",dark:"text-text-inverse"}[e],"text-sm leading-5 font-semibold",n?"inline":"block"),children:t}):null,gh=({theme:e=dh,content:t="",inline:n=!1})=>t?(0,d.jsx)("span",{className:$a({light:"text-text-primary",dark:"text-text-inverse"}[e],"block text-sm [&_*]:text-sm leading-5 [&_*]:leading-5 font-normal [word-break:break-word]",n?"inline":"block"),children:t}):null,vh=(...e)=>t=>{e.forEach(e=>{"function"==typeof e?e(t):e&&(e.current=t)})},yh=({variant:t="dark",placement:n="bottom",title:r="",content:o,arrow:i=!1,open:s,setOpen:a,children:l,className:c,tooltipPortalRoot:u,tooltipPortalId:h,boundary:p="clippingAncestors",strategy:f="fixed",offset:m=8,triggers:g=["hover","focus"],interactive:v=!1})=>{const y=(0,e.useMemo)(()=>"boolean"==typeof s&&"function"==typeof a,[s,a]),[b,x]=(0,e.useState)(!1),w=(0,e.useRef)(null),{refs:k,floatingStyles:E,context:T}=$d({open:y?s:b,onOpenChange:y?a:x,placement:n,strategy:f,middleware:[Pu(m),ju({boundary:p}),(I={boundary:p},{...vu(I),options:[I,void 0]}),Ru({element:w})],whileElementsMounted:mu}),_=Fd(T,{enabled:!y&&g.includes("click")}),S=function(t,n){void 0===n&&(n={});const{open:r,onOpenChange:o,dataRef:i,events:s,elements:a}=t,{enabled:l=!0,delay:c=0,handleClose:u=null,mouseOnly:d=!1,restMs:h=0,move:p=!0}=n,f=nd(),m=td(),g=od(u),v=od(c),y=od(r),b=e.useRef(),x=e.useRef(-1),w=e.useRef(),k=e.useRef(-1),E=e.useRef(!0),T=e.useRef(!1),_=e.useRef(()=>{}),S=e.useRef(!1),C=e.useCallback(()=>{var e;const t=null==(e=i.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t},[i]);e.useEffect(()=>{if(l)return s.on("openchange",e),()=>{s.off("openchange",e)};function e(e){let{open:t}=e;t||(clearTimeout(x.current),clearTimeout(k.current),E.current=!0,S.current=!1)}},[l,s]),e.useEffect(()=>{if(!l)return;if(!g.current)return;if(!r)return;function e(e){C()&&o(!1,e,"hover")}const t=rc(a.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}},[a.floating,r,o,l,g,C]);const P=e.useCallback(function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");const r=sd(v.current,"close",b.current);r&&!w.current?(clearTimeout(x.current),x.current=window.setTimeout(()=>o(!1,e,n),r)):t&&(clearTimeout(x.current),o(!1,e,n))},[v,o]),j=Mu(()=>{_.current(),w.current=void 0}),R=Mu(()=>{if(T.current){const e=rc(a.floating).body;e.style.pointerEvents="",e.removeAttribute(id),T.current=!1}}),A=Mu(()=>!!i.current.openEvent&&["click","mousedown"].includes(i.current.openEvent.type));e.useEffect(()=>{if(l&&_l(a.domReference)){var e;const o=a.domReference;return r&&o.addEventListener("mouseleave",s),null==(e=a.floating)||e.addEventListener("mouseleave",s),p&&o.addEventListener("mousemove",t,{once:!0}),o.addEventListener("mouseenter",t),o.addEventListener("mouseleave",n),()=>{var e;r&&o.removeEventListener("mouseleave",s),null==(e=a.floating)||e.removeEventListener("mouseleave",s),p&&o.removeEventListener("mousemove",t),o.removeEventListener("mouseenter",t),o.removeEventListener("mouseleave",n)}}function t(e){if(clearTimeout(x.current),E.current=!1,d&&!nc(b.current)||h>0&&!sd(v.current,"open"))return;const t=sd(v.current,"open",b.current);t?x.current=window.setTimeout(()=>{y.current||o(!0,e,"hover")},t):r||o(!0,e,"hover")}function n(e){if(A())return;_.current();const t=rc(a.floating);if(clearTimeout(k.current),S.current=!1,g.current&&i.current.floatingContext){r||clearTimeout(x.current),w.current=g.current({...i.current.floatingContext,tree:f,x:e.clientX,y:e.clientY,onClose(){R(),j(),A()||P(e,!0,"safe-polygon")}});const n=w.current;return t.addEventListener("mousemove",n),void(_.current=()=>{t.removeEventListener("mousemove",n)})}("touch"!==b.current||!Kl(a.floating,e.relatedTarget))&&P(e)}function s(e){A()||i.current.floatingContext&&(null==g.current||g.current({...i.current.floatingContext,tree:f,x:e.clientX,y:e.clientY,onClose(){R(),j(),A()||P(e)}})(e))}},[a,l,t,d,h,p,P,j,R,o,r,y,f,v,g,i,A]),Gu(()=>{var e;if(l&&r&&null!=(e=g.current)&&e.__options.blockPointerEvents&&C()){T.current=!0;const e=a.floating;if(_l(a.domReference)&&e){var t;const n=rc(a.floating).body;n.setAttribute(id,"");const r=a.domReference,o=null==f||null==(t=f.nodesRef.current.find(e=>e.id===m))||null==(t=t.context)?void 0:t.elements.floating;return o&&(o.style.pointerEvents=""),n.style.pointerEvents="none",r.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{n.style.pointerEvents="",r.style.pointerEvents="",e.style.pointerEvents=""}}}},[l,r,m,a,f,g,C]),Gu(()=>{r||(b.current=void 0,S.current=!1,j(),R())},[r,j,R]),e.useEffect(()=>()=>{j(),clearTimeout(x.current),clearTimeout(k.current),R()},[l,a.domReference,j,R]);const N=e.useMemo(()=>{function e(e){b.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function n(){E.current||y.current||o(!0,t,"hover")}d&&!nc(b.current)||r||0===h||S.current&&e.movementX**2+e.movementY**2<2||(clearTimeout(k.current),"touch"===b.current?n():(S.current=!0,k.current=window.setTimeout(n,h)))}}},[d,o,r,y,h]),M=e.useMemo(()=>({onMouseEnter(){clearTimeout(x.current)},onMouseLeave(e){A()||P(e.nativeEvent,!1)}}),[P,A]);return e.useMemo(()=>l?{reference:N,floating:M}:{},[l,N,M])}(T,{move:!1,enabled:!y&&g.includes("hover"),...v&&{handleClose:sh()}}),C=function(t,n){void 0===n&&(n={});const{open:r,onOpenChange:o,events:i,dataRef:s,elements:a}=t,{enabled:l=!0,visibleOnly:c=!0}=n,u=e.useRef(!1),d=e.useRef(),h=e.useRef(!0);e.useEffect(()=>{if(!l)return;const e=kl(a.domReference);function t(){!r&&Sl(a.domReference)&&a.domReference===ql(rc(a.domReference))&&(u.current=!0)}function n(){h.current=!0}return e.addEventListener("blur",t),e.addEventListener("keydown",n,!0),()=>{e.removeEventListener("blur",t),e.removeEventListener("keydown",n,!0)}},[a.domReference,r,l]),e.useEffect(()=>{if(l)return i.on("openchange",e),()=>{i.off("openchange",e)};function e(e){let{reason:t}=e;"reference-press"!==t&&"escape-key"!==t||(u.current=!0)}},[i,l]),e.useEffect(()=>()=>{clearTimeout(d.current)},[]);const p=e.useMemo(()=>({onPointerDown(e){Jl(e.nativeEvent)||(h.current=!1)},onMouseLeave(){u.current=!1},onFocus(e){if(u.current)return;const t=ic(e.nativeEvent);if(c&&_l(t))try{if(Ql()&&tc())throw Error();if(!t.matches(":focus-visible"))return}catch(e){if(!h.current&&!sc(t))return}o(!0,e.nativeEvent,"focus")},onBlur(e){u.current=!1;const t=e.relatedTarget,n=e.nativeEvent,r=_l(t)&&t.hasAttribute(rd("focus-guard"))&&"outside"===t.getAttribute("data-type");d.current=window.setTimeout(()=>{var e;const i=ql(a.domReference?a.domReference.ownerDocument:document);(t||i!==a.domReference)&&(Kl(null==(e=s.current.floatingContext)?void 0:e.refs.floating.current,i)||Kl(a.domReference,i)||r||o(!1,n,"focus"))})}}),[s,a.domReference,o,c]);return e.useMemo(()=>l?{reference:p}:{},[l,p])}(T,{enabled:!y&&g.includes("focus")}),P=Wd(T),j=nh(T,{role:"tooltip"}),{getReferenceProps:R,getFloatingProps:A}=Kd([_,S,C,P,j]),{isMounted:N,styles:M}=function(t,n){void 0===n&&(n={});const{initial:r={opacity:0},open:o,close:i,common:s,duration:a=250}=n,l=t.placement,c=l.split("-")[0],u=e.useMemo(()=>({side:c,placement:l}),[c,l]),d="number"==typeof a,h=(d?a:a.open)||0,p=(d?a:a.close)||0,[f,m]=e.useState(()=>({...oh(s,u),...oh(r,u)})),{isMounted:g,status:v}=function(t,n){void 0===n&&(n={});const{open:r,elements:{floating:o}}=t,{duration:i=250}=n,s=("number"==typeof i?i:i.close)||0,[a,l]=e.useState("unmounted"),c=function(t,n){const[r,o]=e.useState(t);return t&&!r&&o(!0),e.useEffect(()=>{if(!t&&r){const e=setTimeout(()=>o(!1),n);return()=>clearTimeout(e)}},[t,r,n]),r}(r,s);return c||"close"!==a||l("unmounted"),Gu(()=>{if(o){if(r){l("initial");const e=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(e)}}l("close")}},[r,o]),{isMounted:c,status:a}}(t,{duration:a}),y=od(r),b=od(o),x=od(i),w=od(s);return Gu(()=>{const e=oh(y.current,u),t=oh(x.current,u),n=oh(w.current,u),r=oh(b.current,u)||Object.keys(e).reduce((e,t)=>(e[t]="",e),{});if("initial"===v&&m(t=>({transitionProperty:t.transitionProperty,...n,...e})),"open"===v&&m({transitionProperty:Object.keys(r).map(rh).join(","),transitionDuration:h+"ms",...n,...r}),"close"===v){const r=t||e;m({transitionProperty:Object.keys(r).map(rh).join(","),transitionDuration:p+"ms",...n,...r})}},[p,x,y,b,w,h,v,u]),{isMounted:g,styles:f}}(T,{duration:150,initial:{opacity:0},open:{opacity:1},close:{opacity:0}}),D={light:"bg-tooltip-background-light text-text-primary",dark:"bg-tooltip-background-dark text-text-on-color"}[t],O="dark"===t?"text-tooltip-background-dark":"text-tooltip-background-light";var I;return(0,d.jsxs)(e.Fragment,{children:[(0,e.isValidElement)(l)&&(0,d.jsx)(e.Fragment,{children:(0,e.cloneElement)(l,{ref:vh(l.ref,k.setReference),className:$a(l.props.className),...R()})},"tooltip-reference"),(0,d.jsx)(Pd,{id:h,root:u,children:N&&(0,d.jsxs)("div",{className:$a("absolute z-20 py-2 px-3 rounded-md text-xs leading-4 shadow-soft-shadow-lg",D,"max-w-80 w-fit",c),ref:k.setFloating,style:{...E,...M},...A(),children:[(0,d.jsxs)("div",{children:[!!r&&(0,d.jsx)("span",{className:"font-semibold",children:r},"tooltip-title"),!!o&&(0,d.jsx)("div",{className:"font-normal",children:o},"tooltip-content")]}),i&&(0,d.jsx)(Ju,{ref:w,context:T,className:$a("fill-current",O)})]})})]})};yh.displayName="Tooltip";const bh=(0,e.forwardRef)(({children:e=null,tag:t="label",size:n="sm",className:r="",variant:o="neutral",required:i=!1,...s},a)=>{if(!e)return null;let l="";return i&&(l="after:content-['*'] after:text-field-required after:ml-0.5"),(0,d.jsx)(t,{ref:a,className:$a("font-medium text-field-label flex items-center gap-0.5",{xs:"text-xs [&>*]:text-xs [&>svg]:h-3 [&>svg]:w-3",sm:"text-sm [&>*]:text-sm [&>svg]:h-4 [&>svg]:w-4",md:"text-base [&>*]:text-base [&>svg]:h-5 [&>svg]:w-5"}[n],{neutral:"text-field-label [&>*]:text-field-label",help:"text-field-helper [&>*]:text-field-helper",error:"text-support-error [&>*]:text-support-error",disabled:"text-field-color-disabled disabled cursor-not-allowed [&>*]:text-field-color-disabled"}[o],l,{neutral:"",help:"font-normal",error:"font-normal",disabled:""}?.[o],r),...s,children:e})});bh.displayName="Label";const xh=Xa("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]),wh=Xa("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),kh=Xa("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);let Eh=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t};const Th={sm:{icon:"[&>svg]:size-4",searchIcon:"[&>svg]:size-4",selectButton:"px-2.5 py-2 rounded text-xs font-medium leading-4 min-h-[2rem]",multiSelect:"pl-2 pr-2 py-1.5",displaySelected:"text-xs font-normal",dropdown:"rounded-md",dropdownItemsWrapper:"p-1.5",searchbarWrapper:"p-3 flex items-center gap-0.5",searchbar:"font-medium text-sm",searchbarIcon:"size-4",label:"text-sm font-medium"},md:{icon:"[&>svg]:size-5",searchIcon:"[&>svg]:size-5",selectButton:"px-3.5 py-2.5 rounded-md text-sm font-medium leading-4 min-h-[2.5rem]",multiSelect:"pl-2 pr-2.5 py-2",displaySelected:"text-sm font-normal",dropdown:"rounded-lg",dropdownItemsWrapper:"p-2",searchbarWrapper:"p-2.5 flex items-center gap-1",searchbar:"font-medium text-sm",searchbarIcon:"size-5",label:"text-sm font-medium"},lg:{icon:"[&>svg]:size-6",searchIcon:"[&>svg]:size-5",selectButton:"px-4 py-3 rounded-lg text-sm font-medium leading-5 min-h-[3rem]",multiSelect:"pl-2.5 pr-3 py-2.5",displaySelected:"text-base font-normal",dropdown:"rounded-lg",dropdownItemsWrapper:"p-2",searchbarWrapper:"p-2.5 flex items-center gap-1",searchbar:"font-medium text-sm",searchbarIcon:"size-5",label:"text-base font-medium"}},_h="group-disabled:text-field-color-disabled",Sh={sm:"w-[calc(100%+0.75rem)] translate-x-[-0.375rem]",md:"w-[calc(100%+1rem)] translate-x-[-0.5rem]",lg:"w-[calc(100%+1rem)] translate-x-[-0.5rem]"},Ch=e=>"string"==typeof e?e:"object"==typeof e&&"textContent"in e?e.textContent?.toString().toLowerCase()||"":"object"==typeof e&&"children"in e?Ch(e.children):"",Ph=(0,e.forwardRef)(({label:e="",size:t="sm",className:n="",type:r="pill",variant:o="neutral",icon:i=null,disabled:s=!1,onClose:a=()=>{},closable:l=!1,onMouseDown:c=()=>{},disableHover:u=!1},h)=>{const p={neutral:"bg-badge-background-gray text-badge-color-gray border-badge-border-gray",red:"bg-badge-background-red text-badge-color-red border-badge-border-red",yellow:"bg-badge-background-yellow text-badge-color-yellow border-badge-border-yellow",green:"bg-badge-background-green text-badge-color-green border-badge-border-green",blue:"bg-badge-background-sky text-badge-color-sky border-badge-border-sky",inverse:"bg-background-inverse text-text-inverse border-background-inverse",disabled:"bg-badge-background-disabled text-badge-color-disabled border-badge-border-disabled disabled cursor-not-allowed"};let f="",m="group relative justify-center flex items-center cursor-pointer";const g={xxs:"[&>svg]:size-3",xs:"[&>svg]:size-3",sm:"[&>svg]:size-3",md:"[&>svg]:size-4",lg:"[&>svg]:size-5"};return s?(f=p.disabled,m+=" cursor-not-allowed disabled"):f=p[o],e?(0,d.jsxs)("span",{className:$a("font-medium border-badge-border-gray flex items-center justify-center border border-solid box-border max-w-full transition-colors duration-150 ease-in-out",{xxs:"py-0.5 px-0.5 text-xs h-4",xs:"py-0.5 px-1 text-xs h-5",sm:"py-1 px-1.5 text-xs h-6",md:"py-1 px-1.5 text-sm h-7",lg:"py-1 px-1.5 text-base h-8"}[t],{pill:"rounded-full",rounded:"rounded"}[r],"gap-0.5",f,!u&&{neutral:"hover:bg-badge-hover-gray",red:"hover:bg-badge-hover-red",yellow:"hover:bg-badge-hover-yellow",green:"hover:bg-badge-hover-green",blue:"hover:bg-badge-hover-sky",inverse:"hover:bg-badge-hover-inverse",disabled:"hover:bg-badge-hover-disabled"}[o],n),ref:h,children:[i?(0,d.jsx)("span",{className:$a("justify-center flex items-center",g[t]),children:i}):null,(0,d.jsx)("span",{className:"px-1 truncate inline-block",children:e}),l&&(0,d.jsxs)("span",{className:$a(m,g[t]),onMouseDown:c,role:"button",tabIndex:0,...!s&&{onClick:a},children:[(0,d.jsx)("span",{className:"sr-only",children:`Remove ${e}`}),(0,d.jsx)(Ya,{}),(0,d.jsx)("span",{className:"absolute -inset-1"})]})]}):null});Ph.displayName="Badge";const jh=Xa("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),Rh=({variant:e="primary",size:t="md",icon:n=null,className:r=""})=>{const o={primary:"text-brand-primary-600",secondary:"text-background-primary"}[e],i={sm:"[&>svg]:size-4",md:"[&>svg]:size-5",lg:"[&>svg]:size-6",xl:"[&>svg]:size-8"}[t];return(0,d.jsx)("span",{className:$a("flex",i,o,r),children:n||(0,d.jsx)(jh,{className:"animate-spin shrink-0"})})},Ah=(0,e.createContext)({}),Nh=()=>(0,e.useContext)(Ah);function Mh({children:t,icon:n=null,placeholder:r="Select an option",optionIcon:o=null,render:i,label:s,className:a,...l}){const{sizeValue:c,getReferenceProps:u,getValues:h,selectId:p,refs:f,isOpen:m,multiple:g,combobox:v,setSelected:y,onChange:b,isControlled:x,disabled:w,by:k}=Nh(),E={sm:"xs",md:"sm",lg:"md"}[c],T=(0,e.useCallback)(()=>{if(n)return n;const e="text-field-placeholder group-disabled:text-icon-disabled";return v?(0,d.jsx)(xh,{className:e}):(0,d.jsx)(wh,{className:e})},[n]),_=(0,e.useCallback)(()=>{const n=h();if(!n)return null;if(g)return n.map((e,t)=>(0,d.jsx)(Ph,{className:"cursor-default",icon:o,type:"rounded",size:E,onMouseDown:S(e),label:"function"==typeof i?i(e):e.toString(),closable:!0,disabled:w},t));let r="string"==typeof n?n:"";if("function"==typeof i&&(r=i(n)),"function"==typeof t&&"function"!=typeof i){const e={value:n,...g?{onClose:S(n)}:{}};r=t(e)}return((0,e.isValidElement)(t)||"string"==typeof t)&&"function"!=typeof i&&(r=t),(0,d.jsx)("span",{className:$a("truncate",Th[c].displaySelected,_h),children:r})},[h,w]),S=e=>t=>{t?.preventDefault(),t?.stopPropagation();const n=[...h()??[]],r=n.findIndex(t=>null!==t&&null!==e&&"object"==typeof t?t[k]===e[k]:t===e);-1!==r&&(n.splice(r,1),x||y(n),"function"==typeof b&&b(n))};return(0,d.jsxs)("div",{className:"w-full flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[!!s&&(0,d.jsx)("label",{className:$a(Th[c]?.label,"text-field-label"),htmlFor:p,children:s}),(0,d.jsxs)("button",{id:p,ref:f.setReference,className:$a("flex items-center justify-between w-full box-border transition-[outline,background-color,color,box-shadow] duration-200 bg-white","outline outline-1 outline-field-border border-none cursor-pointer",!m&&"focus:ring-2 focus:ring-offset-2 focus:outline-focus-border focus:ring-focus [&:hover:not(:focus):not(:disabled)]:outline-border-strong",Th[c].selectButton,g&&Th[c].multiSelect,"group disabled:outline-field-border-disabled [&:hover:has(:disabled)]:outline-field-border-disabled disabled:cursor-default",a),tabIndex:0,disabled:w,...l,...u(),children:[(0,d.jsxs)("div",{className:$a("flex-1 grid items-center justify-start gap-1.5 overflow-hidden",h()&&"flex flex-wrap"),children:[_(),(g?!h()?.length:!h())&&(0,d.jsx)("div",{className:$a("[grid-area:1/1/2/3] text-field-input px-1",Th[c].displaySelected,_h),children:r})]}),(0,d.jsx)("div",{className:$a("flex items-center [&>svg]:shrink-0",Th[c].icon),children:T()})]})]})}function Dh({label:t,children:n,className:r,...o}){const{index:i,totalGroups:s}=o,{sizeValue:a}=Nh();return(0,d.jsxs)(e.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col",role:"group","aria-label":t,children:[(0,d.jsx)("div",{className:$a("p-2 font-normal text-text-tertiary",{sm:"text-xs",md:"text-xs",lg:"text-sm"}[a],r),id:`group-${t?.toLowerCase().replace(/\s+/g,"-")}`,children:t}),(0,d.jsx)("div",{className:"flex flex-col",role:"presentation","aria-labelledby":`group-${t?.toLowerCase().replace(/\s+/g,"-")}`,children:n})]}),i<s&&!!(n&&e.Children.count(n)>0)&&(0,d.jsx)("hr",{className:$a("h-px my-2 w-full border-border-subtle border-b border-t-0 border-solid",Sh[a])})]})}function Oh({children:t,className:n}){const{isOpen:r,context:o,refs:i,combobox:s,floatingStyles:a,getFloatingProps:l,sizeValue:c,setSearchKeyword:u,setActiveIndex:h,setSelectedIndex:p,value:f,selected:m,getValues:g,searchKeyword:v,listContentRef:y,by:b,searchPlaceholder:x,activeIndex:w,searchFn:k,debounceDelay:E}=Nh(),T=(0,e.useMemo)(()=>{const n=g();let r=-1;if(n){let o=e.Children.toArray(t);o.length>0&&(0,e.isValidElement)(o[0])&&o[0].type===Dh&&(o=e.Children.toArray(t).map(t=>(0,e.isValidElement)(t)?e.Children.toArray(t.props.children):[]).flat()),r=o.findIndex(t=>{if(!(0,e.isValidElement)(t))return!1;const r=t.props.value;return"object"==typeof r&&"object"==typeof n?r[b]===n[b]:r===n})}return r},[f,m,t,b]);(0,e.useLayoutEffect)(()=>{r||(h(T),p(T))},[T,r]),(0,e.useLayoutEffect)(()=>{r&&(s&&[-1,null].includes(w)||h(-1))},[v,r]);const _=(0,e.useMemo)(()=>{let n=0,r=0;e.Children.forEach(t,t=>{(0,e.isValidElement)(t)&&t.type===Dh&&e.Children.toArray(t.props.children).some(t=>{if(!(0,e.isValidElement)(t))return!1;if(v&&!k){const e=Ch(t.props.children)?.toLowerCase(),n=v.toLowerCase();return e.includes(n)}return!0})&&n++}),r=Math.max(0,n-1);let o=0,i=0;const s=t=>{if(!(0,e.isValidElement)(t))return null;if(t.type===Dh){const n=e.Children.map(t.props.children,s);if(!n?.some(e=>null!==e))return null;const o={...t.props,children:n,index:i,totalGroups:r};return i++,(0,e.cloneElement)(t,o)}if(v&&!k){const e=Ch(t.props?.children)?.toLowerCase(),n=v.toLowerCase();if(!e?.includes(n))return null}return(0,e.cloneElement)(t,{...t.props,index:o++})};return e.Children.map(t,s)},[v,f,m,t,k]),S=e.Children.count(_);(0,e.useEffect)(()=>{y.current=[];let n=e.Children.toArray(t);n&&(0,e.isValidElement)(n[0])&&n[0].type===Dh&&(n=e.Children.toArray(n).map(t=>(0,e.isValidElement)(t)?t.props.children:null).filter(Boolean)),e.Children.forEach(n,t=>{if(!(0,e.isValidElement)(t))return;const n=Ch(t.props?.children)?.toLowerCase();if(v&&!k){const e=v.toLowerCase();if(!n?.includes(e))return}y.current.push(n)})},[v,k]);const[C,P]=(0,e.useState)(!1),j=((t,n=500)=>{const r=(0,e.useRef)(null);return(0,e.useCallback)((...e)=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>t(...e),n)},[t,n])})((0,e.useCallback)(async()=>{if(k&&"function"==typeof k&&!C){P(!0);try{await k(v)}catch(e){console.error(e)}finally{P(!1)}}},[v]),E);return(0,e.useEffect)(()=>{"function"==typeof k&&j()},[j]),(0,d.jsx)(d.Fragment,{children:r&&(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(Id,{context:o,modal:!1,children:(0,d.jsxs)("div",{ref:i.setFloating,className:$a("box-border [&_*]:box-border w-full bg-white outline-none shadow-lg outline outline-1 outline-border-subtle",s&&"grid grid-cols-1 grid-rows-[auto_1fr] divide-y divide-x-0 divide-solid divide-border-subtle",Th[c].dropdown,!s&&"h-auto",s?"overflow-hidden":"overflow-y-auto overflow-x-hidden",n),style:{...a},...l(),children:[s&&(0,d.jsxs)("div",{className:$a(Th[c].searchbarWrapper),children:[C?(0,d.jsx)(Rh,{className:Th[c].searchbarIcon}):(0,d.jsx)(kh,{className:$a("text-icon-secondary shrink-0",Th[c].searchbarIcon)}),(0,d.jsx)("input",{className:$a("px-1 w-full placeholder:text-field-placeholder border-0 focus:outline-none focus:shadow-none",Th[c].searchbar),type:"search",name:"keyword",placeholder:x,onChange:e=>u(e.target.value),value:v,autoComplete:"off"})]}),(0,d.jsxs)("div",{className:$a("overflow-y-auto overflow-x-hidden",!s&&"w-full h-full",Th[c].dropdownItemsWrapper),children:[!!S&&_,!S&&(0,d.jsx)("div",{className:"p-2 text-center text-base font-medium text-field-placeholder",children:"No items found"})]})]})})})})}function Ih({children:e,root:t,id:n}){return(0,d.jsx)(Pd,{id:n,root:t,children:e})}function Lh({value:t,selected:n,children:r,className:o,...i}){const{sizeValue:s,getItemProps:a,onKeyDownItem:l,onClickItem:c,activeIndex:u,selectedIndex:h,updateListRef:p,getValues:f,by:m,multiple:g}=Nh(),{index:v}=i,y=(0,e.useRef)(v),b=(0,e.useMemo)(()=>{if(!g)return!1;const e=f();return!!e&&e.some(e=>null!==e&&null!==t&&"object"==typeof e?e[m]===t[m]:e===t)},[t,f]),x=(0,e.useMemo)(()=>"boolean"==typeof n?n:g?b:v===h,[b,h,n]);return(0,d.jsxs)("div",{className:$a("w-full flex items-center justify-between text-text-primary hover:bg-button-tertiary-hover rounded-md transition-all duration-150 cursor-pointer focus:outline-none focus-within:outline-none outline-none",{sm:"py-1.5 px-2 text-xs font-normal",md:"p-2 text-sm font-normal",lg:"p-2 text-base font-normal"}[s],v===u&&"bg-button-tertiary-hover",o),ref:e=>{p(v,e)},role:"option",tabIndex:v===u?0:-1,"aria-selected":x&&v===u,...a({onClick(){c(y.current,t)},onKeyDown(e){l(e,y.current,t)}}),children:[(0,d.jsx)("span",{className:"w-full truncate",children:r}),x&&(0,d.jsx)(lh,{className:$a("text-icon-on-color-disabled",{sm:"size-4",md:"size-4",lg:"size-5"}[s])})]})}const Vh=({id:t,size:n="md",value:r,defaultValue:o,onChange:i,by:s="id",children:a,multiple:l=!1,combobox:c=!1,disabled:u=!1,searchPlaceholder:h="Search...",searchFn:p,debounceDelay:f=500})=>{const m=(0,e.useMemo)(()=>t||`select-${Eh()}`,[t]),g=(0,e.useMemo)(()=>typeof r<"u",[r]),[v,y]=(0,e.useState)(o),[b,x]=(0,e.useState)(""),w=(0,e.useCallback)(()=>g?r:v,[g,r,v]),[k,E]=(0,e.useState)(!1),[T,_]=(0,e.useState)(null),[S,C]=(0,e.useState)(null),P={sm:c?256:172,md:c?256:216,lg:c?256:216},{refs:j,floatingStyles:R,context:A}=$d({placement:"bottom-start",open:k,onOpenChange:E,whileElementsMounted:mu,middleware:[Pu(5),ju({padding:10}),(H={apply({rects:e,elements:t,availableHeight:r}){Object.assign(t.floating.style,{maxHeight:`min(${r}px, ${P[n]}px)`,maxWidth:`${e.reference.width}px`})},padding:10},{...bu(H),options:[H,void 0]})]}),N=(0,e.useRef)([]),M=(0,e.useRef)([]),D=(0,e.useRef)(!1),O=Fd(A,{event:"mousedown"}),I=Wd(A),L=nh(A,{role:"listbox"}),V=eh(A,{listRef:N,activeIndex:T,selectedIndex:S,onNavigate:_,loop:!0}),F=function(t,n){var r;const{open:o,dataRef:i}=t,{listRef:s,activeIndex:a,onMatch:l,onTypingChange:c,enabled:u=!0,findMatch:d=null,resetMs:h=750,ignoreKeys:p=[],selectedIndex:f=null}=n,m=e.useRef(),g=e.useRef(""),v=e.useRef(null!=(r=null!=f?f:a)?r:-1),y=e.useRef(null),b=Mu(l),x=Mu(c),w=od(d),k=od(p);Gu(()=>{o&&(clearTimeout(m.current),y.current=null,g.current="")},[o]),Gu(()=>{var e;o&&""===g.current&&(v.current=null!=(e=null!=f?f:a)?e:-1)},[o,f,a]);const E=Mu(e=>{e?i.current.typing||(i.current.typing=e,x(e)):i.current.typing&&(i.current.typing=e,x(e))}),T=Mu(e=>{function t(e,t,n){const r=w.current?w.current(t,n):t.find(e=>0===(null==e?void 0:e.toLocaleLowerCase().indexOf(n.toLocaleLowerCase())));return r?e.indexOf(r):-1}const n=s.current;if(g.current.length>0&&" "!==g.current[0]&&(-1===t(n,n,g.current)?E(!1):" "===e.key&&ac(e)),null==n||k.current.includes(e.key)||1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey)return;o&&" "!==e.key&&(ac(e),E(!0)),n.every(e=>{var t,n;return!e||(null==(t=e[0])?void 0:t.toLocaleLowerCase())!==(null==(n=e[1])?void 0:n.toLocaleLowerCase())})&&g.current===e.key&&(g.current="",v.current=y.current),g.current+=e.key,clearTimeout(m.current),m.current=setTimeout(()=>{g.current="",v.current=y.current,E(!1)},h);const r=v.current,i=t(n,[...n.slice((r||0)+1),...n.slice(0,(r||0)+1)],g.current);-1!==i?(b(i),y.current=i):" "!==e.key&&(g.current="",E(!1))}),_=e.useMemo(()=>({onKeyDown:T}),[T]),S=e.useMemo(()=>({onKeyDown:T,onKeyUp(e){" "===e.key&&E(!1)}}),[T,E]);return e.useMemo(()=>u?{reference:_,floating:S}:{},[u,_,S])}(A,{listRef:M,activeIndex:T,selectedIndex:S,onMatch:k?_:C,onTypingChange(e){D.current=e}}),{getReferenceProps:z,getFloatingProps:B,getItemProps:U}=Kd([I,L,V,O,...c?[]:[F]]),W=(e,t)=>{if(l)return((e,t)=>{const n=[...w()??[]];-1===n.findIndex(e=>null!==e&&null!==t&&"object"==typeof e?e[s]===t[s]:e===t)&&(n.push(t),g||y(n),C(e),j.reference.current.focus(),E(!1),x(""),"function"==typeof i&&i(n))})(e,t);C(e),g||y(t),j.reference.current.focus(),E(!1),x(""),"function"==typeof i&&i(t)},$=(0,e.useCallback)((e,t)=>{N.current[e]=t},[]);var H;return(0,d.jsx)(Ah.Provider,{value:{selectedIndex:S,setSelectedIndex:C,activeIndex:T,setActiveIndex:_,selected:v,setSelected:y,handleSelect:W,combobox:c,sizeValue:n,multiple:l,onChange:i,isTypingRef:D,getItemProps:U,onClickItem:(e,t)=>{W(e,t)},onKeyDownItem:(e,t,n)=>{"Enter"===e.key&&(e.preventDefault(),W(t,n))," "===e.key&&!D.current&&(e.preventDefault(),W(t,n))},getValues:w,selectId:m,getReferenceProps:z,isOpen:k,value:r,updateListRef:$,refs:j,listContentRef:M,by:s,getFloatingProps:B,floatingStyles:R,context:A,searchKeyword:b,setSearchKeyword:x,disabled:u,isControlled:g,searchPlaceholder:h,searchFn:p,debounceDelay:f},children:a})};Vh.displayName="Select";const Fh=Object.assign(Vh,{Portal:Ih,Button:Mh,Options:Oh,Option:Lh,OptionGroup:Dh});Ih.displayName="Select.Portal",Mh.displayName="Select.Button",Oh.displayName="Select.Options",Lh.displayName="Select.Option",Dh.displayName="Select.OptionGroup";const zh=()=>{const{theme_versions:t,addon_versions:r}=astra_addon_admin,[o,i]=(0,e.useState)(!1),[s,a]=(0,e.useState)("astra-theme"),[l,h]=(0,e.useState)(t[0]?.value),[p,f]=(0,e.useState)(r[0]?.value);if(!astra_addon_admin.is_bsf_package)return"";const m=!astra_addon_admin.license_status,g=e=>{m||(a(e),i(!0))};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col md:flex-row gap-4 "+(m?"opacity-60":""),children:[(0,d.jsxs)("div",{className:"w-full flex flex-col gap-1",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)(bl,{as:"h5",size:18,weight:600,children:(0,n.__)("Rollback to Previous Version","astra-addon")}),m&&(0,d.jsx)(yh,{content:(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsx)("span",{children:(0,n.__)("To use this feature, please activate your license.","astra-addon")}),(0,d.jsx)(hl,{size:"xs",onClick:e=>{e.preventDefault(),e.stopPropagation(),window.location.href=`admin.php?page=${astra_admin.home_slug}&path=settings&focus=license`},children:(0,n.__)("Go to License Settings","astra-addon")})]}),placement:"top",arrow:!0,interactive:!0,delay:[200,0],children:(0,d.jsx)(c,{size:16,className:"text-text-tertiary cursor-help"})})]}),(0,d.jsx)(bl,{color:"secondary",children:(0,n.__)("Experiencing an issue with current versions of software? Roll back to a previous version to help troubleshoot the issue.","astra-addon")})]}),(0,d.jsxs)("div",{className:"grid justify-items-end gap-3 tablet:justify-items-start tablet:my-2",children:[(0,d.jsxs)("div",{className:"inline-flex w-full items-center gap-2 md:w-max",children:[(0,d.jsx)(bh,{className:"font-medium grow",htmlFor:"themeVersionRollback",children:astra_admin.theme_name}),l&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"bsf-rollback-theme-version",children:(0,d.jsxs)(Fh,{id:"themeVersionRollback",name:"themeVersionRollback",className:"astra-admin__input-field astra-admin__dropdown",defaultValue:l,onBlur:()=>setProductSelect("astra-theme"),onChange:e=>h(e),disabled:m,children:[(0,d.jsx)(Fh.Button,{}),(0,d.jsx)(Fh.Portal,{children:(0,d.jsx)(Fh.Options,{children:t.map(e=>(0,d.jsx)(Fh.Option,{value:e.value,children:e.label},e.value))})})]})}),(0,d.jsx)(hl,{className:"bsf-rollback-button",onClick:()=>g("astra-theme"),"data-product_type":"theme",disabled:m,children:(0,n.__)("Rollback","astra-addon")})]}),!l&&(0,d.jsx)(yh,{className:"w-[350px]",text:(0,n.__)("Previous theme versions are unavailable. This may be because WordPress restricts access to themes and plugins APIs on WP Engine's Flywheel hosting. If this does not apply to you, please contact our support team for assistance.","astra-addon"),delay:100,placement:"left",children:(0,d.jsx)(u,{size:20,className:"mr-2 cursor-help"})})]}),(0,d.jsxs)("div",{className:"inline-flex w-full items-center gap-2 md:w-max",children:[(0,d.jsx)(bh,{className:"font-medium grow",htmlFor:"addonVersionRollback",children:astra_addon_admin.addon_name}),(0,d.jsxs)("div",{className:"bsf-rollback-version",children:[(0,d.jsx)("input",{type:"hidden",name:"product-name",id:"bsf-product-name",value:astra_addon_admin.addon_name}),(0,d.jsxs)(Fh,{id:"addonVersionRollback",name:"addonVersionRollback",className:"bsf-rollback-version-select astra-admin__input-field astra-admin__dropdown",defaultValue:p,onBlur:()=>setProductSelect("astra-addon"),onChange:e=>f(e),disabled:m,children:[(0,d.jsx)(Fh.Button,{}),(0,d.jsx)(Fh.Portal,{children:(0,d.jsx)(Fh.Options,{children:r.map(e=>(0,d.jsx)(Fh.Option,{value:e.value,children:e.label},e.value))})})]})]}),(0,d.jsx)(hl,{className:"bsf-rollback-button",onClick:()=>g("astra-addon"),"data-product_type":"addon","data-placeholder-url":astra_addon_admin.addon_rollback_nonce_placeholder_url,disabled:m,children:(0,n.__)("Rollback","astra-addon")})]})]}),(0,d.jsx)(pl,{showDialog:o,setShowDialog:i,version:s===astra_addon_admin.rollback_plugin_name?p:l,product:s})]}),(0,d.jsx)("div",{className:"h-px bg-border-subtle"})]})};let Bh=1;const Uh=new class{#e;#t;constructor(){this.#e=[],this.#t=[]}subscribe(e){return this.#t.push(e),()=>{this.#t=this.#t.filter(t=>t!==e)}}publish(e){this.#t.forEach(t=>t(e))}add(e){this.#e.push(e),this.publish(e)}remove(e){return this.#e=this.#e.filter(t=>t.id!==e),e}create(e){const{id:t,message:n="",jsx:r,...o}=e;if(!n&&"function"!=typeof r)return;const i="number"==typeof t?t:Bh++;return this.#e.find(e=>e.id===i)&&(this.#e=this.#e.map(e=>e.id===i?(this.publish({...e,title:n,jsx:r,...o}),{...e,title:n,jsx:r,...o}):e)),this.add({id:i,title:n,jsx:r,...o}),i}update(e,t){const{render:n}=t;let r=t;switch(typeof n){case"function":r={jsx:n,...t};break;case"string":r={title:n,...t}}this.#e=this.#e.map(t=>t.id===e?(this.publish({...t,...r}),{...t,...r}):t)}dismiss(e){return e||this.#e.forEach(e=>this.#t.forEach(t=>t({id:e.id,dismiss:!0}))),this.#t.forEach(t=>t({id:e,dismiss:!0})),e}history(){return this.#e}default(e="",t={}){return this.create({message:e,type:"neutral",...t})}success(e="",t={}){return this.create({message:e,type:"success",...t})}error(e="",t={}){return this.create({message:e,type:"error",...t})}warning(e="",t={}){return this.create({message:e,type:"warning",...t})}info(e="",t={}){return this.create({message:e,type:"info",...t})}custom(e,t={}){return this.create({jsx:e,type:"custom",...t})}},Wh=Object.seal(Object.assign((e,t)=>Uh.default(e,t),{success:Uh.success.bind(Uh),error:Uh.error.bind(Uh),warning:Uh.warning.bind(Uh),info:Uh.info.bind(Uh),custom:Uh.custom.bind(Uh),dismiss:Uh.dismiss.bind(Uh),update:Uh.update.bind(Uh)},{getHistory:Uh.history.bind(Uh)})),$h={"top-left":"top-0 bottom-0 left-0 justify-start items-start","top-right":"top-0 bottom-0 right-0 justify-start items-end","bottom-left":"top-0 bottom-0 left-0 justify-end items-start","bottom-right":"top-0 bottom-0 right-0 justify-end items-end"},Hh={neutral:"border-alert-border-neutral bg-alert-background-neutral",custom:"border-alert-border-neutral bg-alert-background-neutral",info:"border-alert-border-info bg-alert-background-info",success:"border-alert-border-green bg-alert-background-green",warning:"border-alert-border-warning bg-alert-background-warning",error:"border-alert-border-danger bg-alert-background-danger"},Gh="bg-background-inverse border-background-inverse",qh={light:"text-icon-secondary",dark:"text-icon-inverse"};let Kh=!1;const Xh=({toastItem:t,title:n="",content:r="",autoDismiss:o=!0,dismissAfter:i=5e3,theme:s="light",design:a="stack",icon:l,variant:c="neutral",removeToast:u})=>{const h=(0,e.useRef)(0),p=(0,e.useRef)(0),f=(0,e.useRef)(),m=(e,t=i)=>{if(o&&!(i<0))return h.current=(new Date).getTime(),setTimeout(()=>{"function"==typeof u&&u(e.id)},t)};(0,e.useEffect)(()=>{const e=i;return f.current=m(t,e),()=>{clearTimeout(f.current)}},[]),(0,e.useEffect)(()=>{!t?.dismiss||"function"!=typeof u||u(t.id)},[t]);const g=()=>{"function"==typeof u&&t?.action?.onClick?.(()=>u(t.id))};let v=null;return"stack"===a&&(v=(0,d.jsx)("div",{className:$a("flex items-center justify-start p-4 gap-2 relative border border-solid rounded-md shadow-lg","dark"===s?Gh:Hh?.[c],"w-[22.5rem]"),onMouseEnter:()=>{clearTimeout(f.current),p.current=(new Date).getTime()},onMouseLeave:()=>{f.current=m(t,i-(p.current-h.current))},children:"custom"!==t.type?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:ph({variant:c,icon:l,theme:s})}),(0,d.jsxs)("div",{className:"flex flex-col items-start justify-start gap-0.5 mr-6",children:[mh({title:n,theme:s}),gh({content:r,theme:s}),t?.action?.label&&"function"==typeof t?.action?.onClick&&(0,d.jsx)("div",{className:"mt-2.5",children:fh({actionLabel:t?.action?.label,actionType:t?.action?.type??"button",onAction:g,theme:s})})]}),(0,d.jsx)("div",{className:"absolute right-4 top-4 [&_svg]:size-5",children:(0,d.jsx)("button",{className:$a("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",qh[s]??qh.light),onClick:()=>{"function"==typeof u&&u(t.id)},children:(0,d.jsx)(Ya,{})})})]}):t?.jsx?.({close:()=>u(t.id),action:t?.action?{...t?.action,onClick:g}:null})})),"inline"===a&&(v=(0,d.jsxs)("div",{className:$a("flex items-center justify-start p-3 gap-2 relative border border-solid rounded-md shadow-lg","dark"===s?Gh:Hh?.[c],"lg:w-[47.5rem] w-full"),children:[(0,d.jsx)("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:ph({variant:c,icon:l,theme:s})}),(0,d.jsxs)("div",{className:"flex items-start justify-start gap-1 mr-10 [&>span:first-child]:shrink-0",children:[mh({title:n,theme:s}),gh({content:r,theme:s})]}),(0,d.jsx)("div",{className:"absolute right-3 top-3 [&_svg]:size-5",children:(0,d.jsx)("button",{className:$a("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",qh[s]??qh.light),onClick:()=>u(t.id),children:(0,d.jsx)(Ya,{})})})]})),v},Yh=(Qh=({position:t="top-right",design:n="stack",theme:r="light",className:o="",autoDismiss:i=!0,dismissAfter:s=5e3})=>{const[a,l]=(0,e.useState)([]);(0,e.useEffect)(()=>{Uh.subscribe(e=>{e?.dismiss?l(t=>t.map(t=>t.id===e.id?{...t,dismiss:!0}:t)):setTimeout(()=>{(0,Za.flushSync)(()=>l(t=>-1!==t.findIndex(t=>t.id===e.id)?t.map(t=>t.id===e.id?{...t,...e}:t):[...t,e]))})})},[]);const c=e=>{l(t=>t.filter(t=>t.id!==e))};return(0,d.jsx)("ul",{className:$a("fixed flex flex-col list-none z-20 p-10 pointer-events-none [&>li]:pointer-events-auto gap-3",$h[t]??$h["top-right"],o),children:(0,d.jsx)(_,{initial:!1,children:a.map(e=>(0,d.jsx)(Ks.li,{initial:{opacity:0,y:50,scale:.7},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.6,transition:{duration:.15}},layoutId:`toast-${e.id}`,children:(0,d.jsx)(Xh,{toastItem:e,title:e.title,content:e?.description,icon:e?.icon??void 0,design:e?.design??n,autoDismiss:e?.autoDismiss??i,dismissAfter:e?.dismissAfter??s,removeToast:c,variant:e.type,theme:e?.theme??r})},e.id))})})},(0,e.memo)(e=>{const t=e.singleTon;return Kh&&t?null:(Kh=!0,(0,d.jsx)(Qh,{...e}))})),Zh=({message:t=(0,n.__)("Successfully saved!","astra-addon"),description:r="",type:o="success"})=>{const[i,s]=(0,e.useState)(!0);return(0,e.useEffect)(()=>{if(i){switch(o){case"success":Wh.success(t,{description:r});break;case"error":Wh.error(t,{description:r});break;case"warning":Wh.warning(t,{description:r});break;default:Wh.info(t,{description:r})}const e=setTimeout(()=>s(!1),2e3);return()=>clearTimeout(e)}},[i]),(0,d.jsx)(Yh,{position:"top-right",design:"stack",theme:"light",autoDismiss:!0,dismissAfter:2e3})},Jh=window.wp.apiFetch;var Qh,ep=o.n(Jh);const tp=(...e)=>e.filter(Boolean).join(" "),np=(()=>{let e;function t(...t){clearTimeout(e),e=setTimeout(()=>((e,t,n,r)=>{t.current&&t.current.abort(),t.current=new AbortController;const o=new window.FormData;return Object.entries(e).forEach(([e,t])=>o.append(e,t)),o.has("security")||o.append("security",astra_addon_admin.update_nonce),ep()({url:astra_admin.ajax_url,method:"POST",body:o,signal:t.current.signal}).then(n).catch(e=>{"AbortError"!==e.name&&(console.error("Error occurred in saving the settings: ",e),r(e))})})(...t),300)}return t.cancel=()=>{clearTimeout(e)},t})(),rp=(e,t={current:null})=>new Promise((n,r)=>{np(e,t,n,r)});var op=o(442);const ip=op.default||op,sp=({label:t,switchId:n,disabled:r=!1,children:o,size:i})=>{const s={xs:"text-xs leading-4 font-medium",sm:"text-sm leading-5 font-medium",md:"text-base leading-6 font-medium"},a={xs:"text-xs leading-4 font-normal",sm:"text-sm leading-5 font-normal",md:"text-sm leading-5 font-normal"},l={xs:"space-y-0.5",sm:"space-y-0.5",md:"space-y-1"};if((0,e.isValidElement)(t))return(0,d.jsxs)("div",{className:$a("inline-flex items-center gap-3","items-start"),children:[o,t]});const c=!t?.heading&&!t?.description,u=t?.heading&&t?.description?"items-start":"items-center";return c?o:(0,d.jsxs)("div",{className:$a("inline-flex",u,"gap-3"),children:[o,(()=>{const{heading:e="",description:o=""}=t||{};return(0,d.jsxs)("div",{className:$a("space-y-0.5",l[i]),children:[e&&(0,d.jsx)(bh,{htmlFor:n,className:$a("m-0",s[i]),...r&&{variant:"disabled"},children:e}),o&&(0,d.jsx)(bh,{tag:"p",variant:"help",className:$a("text-sm font-normal leading-5 m-0",a[i]),...r&&{variant:"disabled"},children:o})]})})()]})},ap=(0,e.forwardRef)(({id:t,onChange:n,value:r,defaultValue:o=!1,size:i="sm",disabled:s=!1,label:a={heading:"",description:""},name:l,className:c,...u},h)=>{const p="lg"===i?"md":i,f=(0,e.useMemo)(()=>typeof r<"u",[r]),m=(0,e.useMemo)(()=>t||`switch-${Eh()}`,[]),[g,v]=(0,e.useState)(o),y="primary",b=(0,e.useCallback)(()=>f?r:g,[f,r,g]),x={primary:{input:"bg-toggle-off checked:bg-toggle-on focus:ring focus:ring-toggle-on focus:ring-offset-2 border border-solid border-toggle-off-border checked:border-toggle-on-border shadow-toggleContainer focus:outline-none checked:focus:border-toggle-on-border focus:border-toggle-off-border",toggleDial:"bg-toggle-dial-background shadow-toggleDial"}},w={md:{container:"w-11 h-6",toggleDial:"size-4 peer-checked:translate-x-5"},sm:{container:"w-10 h-5",toggleDial:"size-3 peer-checked:translate-x-5"},xs:{container:"w-8 h-4",toggleDial:"size-2.5 peer-checked:translate-x-3.75"}};return(0,d.jsx)(sp,{label:a,switchId:m,disabled:s,size:p,children:(0,d.jsxs)("div",{className:$a("relative group/switch inline-block cursor-pointer rounded-full shrink-0",w[p].container,c),children:[(0,d.jsx)("input",{ref:h,id:m,type:"checkbox",className:$a("peer appearance-none absolute rounded-full cursor-pointer transition-colors duration-300 h-full w-full before:content-[''] checked:before:content-[''] m-0 checked:[background-image:none]",x[y].input,s&&"bg-toggle-off-disabled disabled:border-transparent disabled:cursor-not-allowed checked:disabled:bg-toggle-on-disabled disabled:shadow-toggle-disabled",!s&&{primary:{input:"group-hover/switch:bg-toggle-off-hover checked:group-hover/switch:bg-toggle-on-hover checked:group-hover/switch:border-toggle-on-border"}}[y].input),checked:b(),onChange:e=>{if(s)return;const t=e.target.checked;f||v(t),"function"==typeof n&&n(t)},disabled:s,name:l,...u}),(0,d.jsx)("label",{htmlFor:m,className:$a("peer/toggle-dial bg-white border rounded-full absolute cursor-pointer shadow-md before:content[''] before:transition-opacity before:opacity-0 hover:before:opacity-10 before:hidden border-none transition-all duration-300 top-2/4 not-rtl:left-1 rtl:right-1 -translate-y-2/4 before:w-10 before:h-10 before:rounded-full before:absolute before:top-2/4 not-rtl:before:left-2/4 rtl:before:right-2/4 before:-translate-y-2/4 before:-translate-x-2/4",w[p].toggleDial,x[y].toggleDial,s&&"peer-disabled:cursor-not-allowed",!s&&{md:"group-hover/switch:size-5 group-focus-within/switch:size-5 not-rtl:group-focus-within/switch:left-0.5 rtl:group-focus-within/switch:right-0.5 not-rtl:group-hover/switch:left-0.5 rtl:group-hover/switch:right-0.5",sm:"group-hover/switch:size-4 group-focus-within/switch:size-4 not-rtl:group-focus-within/switch:left-0.5 rtl:group-focus-within/switch:right-0.5 not-rtl:group-hover/switch:left-0.5 rtl:group-hover/switch:right-0.5",xs:"group-hover/switch:size-3.25 group-focus-within/switch:size-3.25 not-rtl:group-focus-within/switch:left-0.5 rtl:group-focus-within/switch:right-0.5 not-rtl:group-hover/switch:left-0.5 rtl:group-hover/switch:right-0.5"}[p])})]})})});ap.displayName="Switch";const lp=()=>{const t=(0,e.useRef)(),r="disable"!==astra_addon_admin.enable_beta,[o,i]=(0,e.useState)(r),[s,a]=(0,e.useState)(!1),l=`<a href="https://wpastra.com/docs/automatic-beta-updates-for-astra/?utm_source=wp&utm_medium=dashboard" target="_blank" rel="noreferrer" class="cursor-pointer text-link-primary hover:text-link-primary-hover">${(0,n.__)("this article","astra-addon")}</a>`;return(0,d.jsxs)("div",{className:"flex gap-4",children:[(0,d.jsxs)("div",{className:"w-full flex flex-col gap-1",children:[(0,d.jsx)(bl,{as:"h5",size:18,weight:600,children:(0,n.__)("Enable Beta","astra-addon")}),(0,d.jsx)(bl,{color:"secondary",children:ip((0,n.sprintf)((0,n.__)( // translators: %s is the this article text with link. "Enable this option to receive update notifications for beta versions. Please read %s to know more.","astra-addon"),l))})]}),(0,d.jsx)(ap,{value:o,onChange:()=>{i(!o);const e={action:"astra_beta_updates",status:o?"disable":"enable"};rp(e,t).then(t=>{t.success&&(window.astra_addon_admin.enable_beta=e.status,a(!0),setTimeout(()=>a(!1),2e3))}).catch(e=>{console.error("Error occurred in toggling beta updates: ",e)})}}),s&&(0,d.jsx)(Zh,{})]})},cp=l("lock-open",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]]),up=l("key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]),dp=Xa("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]),hp=(0,e.forwardRef)(({id:t,type:n="text",defaultValue:r="",value:o,size:i="sm",className:s="",disabled:a=!1,onChange:l=()=>{},error:c=!1,onError:u=()=>{},prefix:h=null,suffix:p=null,label:f="",...m},g)=>{const v=(0,e.useRef)(null),y=(0,e.useMemo)(()=>t||`input-${n}-${Eh()}`,[t]),b=(0,e.useMemo)(()=>typeof o<"u",[o]),[x,w]=(0,e.useState)(r),[k,E]=(0,e.useState)(null),T=(0,e.useCallback)(()=>b?o:x,[b,o,x]),_=e=>{if(a)return;let t;"file"===n?(t=e.target.files,t&&t.length>0?E(t[0].name):E(null)):t=e.target.value,!b&&"file"!==n&&w(t),"function"==typeof l&&l(t)},S=()=>{E(null),v.current&&(v.current.value=""),l(null)},C="bg-field-secondary-background font-normal placeholder-text-tertiary text-text-primary w-full outline outline-1 outline-border-subtle border-none transition-[color,box-shadow,outline] duration-200",P={xs:"px-2 py-1 rounded",sm:"p-3 py-2 rounded",md:"p-3.5 py-2.5 rounded-md",lg:"p-4 py-3 rounded-lg"},j={xs:"text-xs font-medium",sm:"text-sm font-medium",md:"text-sm font-medium",lg:"text-base font-medium"},R={xs:"text-xs",sm:"text-xs",md:"text-sm",lg:"text-base"},A={sm:h?"pl-8":"",md:h?"pl-9":"",lg:h?"pl-10":""},N={sm:p?"pr-8":"",md:p?"pr-9":"",lg:p?"pr-10":""},M=a?"hover:outline-border-disabled":"hover:outline-border-strong",D="focus:outline-focus-border focus:ring-2 focus:ring-toggle-on focus:ring-offset-2",O=c?"focus:outline-focus-error-border focus:ring-field-color-error outline-focus-error-border":"",I=c?"focus:outline-focus-error-border focus:ring-field-color-error outline-focus-error-border":"",L=a?"outline-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled":"",V=a?"outline-border-disabled cursor-not-allowed text-text-disabled file:text-text-tertiary":"",F="font-normal placeholder-text-tertiary text-text-primary pointer-events-none absolute inset-y-0 flex flex-1 items-center [&>svg]:h-4 [&>svg]:w-4",z=a?"font-normal placeholder-text-tertiary text-icon-disabled pointer-events-none absolute inset-y-0 flex flex-1 items-center":"font-normal placeholder-text-tertiary text-field-placeholder pointer-events-none absolute inset-y-0 flex flex-1 items-center",B={xs:"[&>svg]:size-4",sm:"[&>svg]:size-4",md:"[&>svg]:size-5",lg:"[&>svg]:size-6"},U=(0,e.useMemo)(()=>f?(0,d.jsx)(bh,{className:$a(j[i]),htmlFor:y,...m?.required&&{required:!0},children:f}):null,[f,i,y]),W=k?"file:border-0 file:bg-transparent pr-10":"text-text-tertiary file:border-0 file:bg-transparent pr-10";return"file"===n?(0,d.jsxs)("div",{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[U,(0,d.jsxs)("div",{className:$a("w-full relative flex focus-within:z-10",s),children:[(0,d.jsx)("input",{ref:vh(v,g),id:y,type:"file",className:$a(C,V,P[i],R[i],D,M,I,W),disabled:a,onChange:_,onInvalid:u,...m}),(0,d.jsx)("div",{className:$a(z,"right-0 pr-3",B[i]),children:(0,d.jsx)(dp,{})})]})]}):(0,d.jsxs)("div",{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[U,(0,d.jsxs)("div",{className:$a("w-full relative flex focus-within:z-10",s),children:[h?(0,d.jsx)("div",{className:$a(F,"left-0 pl-3",R[i]),children:h}):null,(0,d.jsx)("input",{ref:vh(v,g),id:y,type:n,className:$a(C,L,P[i],R[i],A[i],N[i],D,M,O),disabled:a,onChange:_,onInvalid:u,value:T(),...m}),"file"===n?k?(0,d.jsx)("div",{className:$a(z,"right-0 pr-3 cursor-pointer z-20 pointer-events-auto",B[i]),onClick:S,role:"button",tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&S()},children:(0,d.jsx)(Ya,{})}):(0,d.jsx)("div",{className:$a(z,"right-0 pr-3",B[i]),children:(0,d.jsx)(dp,{})}):p?(0,d.jsx)("div",{className:$a(F,"right-0 pr-3",R[i]),children:p}):null]})]})});hp.displayName="Input";const pp=()=>{const t=astra_addon_admin.license_status,r=t?"bsf_deactivate_license":"bsf_activate_license",[o,i]=(0,e.useState)(t?"activated":""),s=t?(0,n.__)("Deactivate","astra-addon"):(0,n.__)("Activate","astra-addon"),a=t?(0,n.__)("Your license is active.","astra-addon"):(0,n.__)("Paste your license key here","astra-addon"),l=t?(0,n.__)("You are using","astra-addon"):(0,n.__)(`Please enter your valid license key below to activate ${astra_admin.plugin_name}!`,"astra-addon"),[c,u]=(0,e.useState)(!1),[h,p]=(0,e.useState)(""),[f,m]=(0,e.useState)(!1);return(0,e.useEffect)(()=>{"license"!==new URLSearchParams(window.location.search).get("focus")||t||setTimeout(()=>{const e=document.getElementById("bsf_license_manager[license_key]");e&&(e.focus(),e.scrollIntoView({behavior:"smooth",block:"center"}))},100)},[t]),(0,d.jsxs)("div",{className:"ast-licensing-wrap w-full max-w-md","data-license-inactive":!t,children:[(0,d.jsxs)("form",{method:"post",id:"bsf-astra-license-form",className:"flex flex-col gap-2 form-wrap bsf-license-register-astra-addon form-submited-astra-addon",children:[(0,d.jsx)("span",{className:"inline-flex w-max p-2 rounded-[4px] border border-solid",style:t?{borderColor:"#e6e6ef"}:{borderColor:"#dc2626"},children:(0,d.jsx)(cp,{size:24,strokeWidth:1.25,color:t?void 0:"#DC2626"})}),(0,d.jsxs)("div",{className:"flex flex-col gap-1 pb-2",children:[(0,d.jsx)("h3",{className:tp("m-0 flex items-center text-2xl font-semibold",t?"text-text-primary":"text-red-600"),style:t?{}:{color:"#DC2626"},children:t?(0,n.__)("Your License","astra-addon"):(0,n.__)("License not active","astra-addon")}),!t&&(0,d.jsxs)("div",{className:"text-sm text-text-secondary",children:[(0,d.jsx)(bl,{className:"mb-1",color:"secondary",children:ip((0,n.sprintf)((0,n.__)( // translators: %s is Astra Pro text with pricing link. "Activate %s to get professional support and automatic updates from your WordPress dashboard.","astra-addon"),`<a href=${astra_admin.show_self_branding?astra_admin.upgrade_url:astra_addon_admin.agency_license_link} class="text-link-primary underline" target='_blank'>${astra_admin.plugin_name}</a>`))}),(0,d.jsxs)(bh,{htmlFor:"bsf_license_manager[license_key]",className:"text-text-secondary font-normal",children:[l," ",t?(0,d.jsxs)("span",{className:"font-medium",children:[" ",astra_admin.theme_name," + ",astra_admin.plugin_name,"."," "]}):""]})]}),t&&(0,d.jsx)(bl,{size:14,children:ip((0,n.sprintf)((0,n.__)("You are using %s.","astra-addon"),`<b>${astra_admin.theme_name} + ${astra_addon_admin.addon_name}</b>`))})]}),(0,d.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 text-text-tertiary",children:[(0,d.jsxs)("div",{className:"relative grow",children:[(0,d.jsx)("input",{type:"hidden",id:"bsf_graupi_nonce",name:"bsf_graupi_nonce",value:astra_addon_admin.bsf_graupi_nonce}),(0,d.jsx)("input",{type:"hidden",name:"_wp_http_referer",value:window.location.href.replace(window.location.origin,"")}),(0,d.jsx)("input",{type:"hidden",name:r,value:""}),t&&(0,d.jsx)("input",{type:"hidden",id:"bsf_license_manager[license_key]",name:"bsf_license_manager[license_key]",value:a}),(0,d.jsx)(hp,{type:"text",id:t?"astra_addon_license_key":"bsf_license_manager[license_key]",name:t?"astra_addon_license_key":"bsf_license_manager[license_key]",size:"md",defaultValue:t?a:o,placeholder:a,readOnly:!!t,disabled:!!t,onChange:e=>i(e),prefix:(0,d.jsx)(up,{size:20,strokeWidth:1.25,className:"text-text-tertiary"})}),(0,d.jsx)("input",{type:"hidden",id:"bsf_license_manager[product_id]",name:"bsf_license_manager[product_id]",value:astra_addon_admin.product})]}),(0,d.jsx)(hl,{className:tp(t?"text-badge-color-green":"text-button-primary hover:bg-button-secondary hover:bg-background-button-hover hover:outline-button-secondary"),variant:t?"outline":"secondary",onClick:e=>{e.preventDefault();const t=e.target?.closest("button");m("loading"),"deactivate"===t.dataset.trigger?document.getElementById("bsf-astra-license-form").submit():(e.target?.closest("button"),ep()({path:`/bsf-core/v1/license/${t.dataset.trigger}`,method:"POST",data:{"license-key":o,"product-id":"astra-addon"}}).then(async e=>{m(!1),p(e.message),u(!0),setTimeout(()=>u(!1),2e3),e.success?(m(!0),location.reload()):i("")}).catch(e=>{console.error("Error occurred in validating license: "+e)}))},"data-trigger":t?"deactivate":"activate",name:r,disabled:""===o,icon:"loading"===f&&(0,d.jsx)(Rh,{className:t?"text-badge-color-green":"text-button-primary"}),iconPosition:"right",children:s})]}),!astra_admin.is_whitelabel&&(0,d.jsx)(bl,{as:"a",href:"https://store.brainstormforce.com/"+(t?"upgrades":"support"),target:"_blank",className:"w-max text-sm font-semibold text-button-primary no-underline",children:t?(0,n.__)("Need more license?","astra-addon"):(0,n.__)("Need Help?","astra-addon")})]}),c&&(0,d.jsx)(Zh,{type:f?"success":"error",message:h})]})},fp=()=>{const t=(0,e.useRef)(),r="disable"!==astra_addon_admin.enable_file_generation,[o,i]=(0,e.useState)(r),[s,a]=(0,e.useState)(!1),l=`<a class='inline text-link-primary focus:text-link-primary-hover' href="https://wpastra.com/astra-2-1/?utm_source=wp&utm_medium=dashboard" target='_blank' rel="noreferrer">${(0,n.__)("this article","astra-addon")}</a>`;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"h-px bg-border-subtle"}),(0,d.jsxs)("div",{className:tp("flex gap-4",o?"":"astra-parent-field-false"),children:[(0,d.jsxs)("div",{className:"w-full flex flex-col gap-1",children:[(0,d.jsx)(bl,{as:"h5",size:18,weight:600,children:(0,n.__)("File Generation","astra-addon")}),(0,d.jsx)(bl,{color:"secondary",children:(0,n.sprintf)((0,n.__)( // translators: %s is the Astra theme name. "%s loads the CSS and JS inline on the page by default. If you want to generate separate CSS and JS files for individual addons, enable this option.","astra-addon"),astra_admin.theme_name)}),astra_admin.show_self_branding&&(0,d.jsx)(bl,{color:"secondary",children:ip((0,n.sprintf)((0,n.__)( // translators: %s is the this article text with link. "Please read %s to learn the difference between generating CSS and JS inline and in a separate file.","astra-addon"),l))})]}),(0,d.jsx)(ap,{value:o,onChange:()=>{i(!o);const e={action:"astra_file_generation",status:o?"disable":"enable"};rp(e,t).then(t=>{t.success&&(window.astra_addon_admin.enable_file_generation=e.status,a(!0),setTimeout(()=>a(!1),2e3))}).catch(e=>{console.error("Error occurred in toggling file generation status: "+e)})}}),s&&(0,d.jsx)(Zh,{})]})]})},mp=()=>{const t=(0,e.useRef)(),[r,o]=(0,e.useState)(!1),[i,s]=(0,e.useState)(!1);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"h-px bg-border-subtle"}),(0,d.jsxs)("div",{className:"astra-child-field flex flex-col md:flex-row gap-4",children:[(0,d.jsxs)("div",{className:"w-full flex flex-col gap-1",children:[(0,d.jsx)(bl,{as:"h5",size:18,weight:600,children:(0,n.__)("Asset Regeneration","astra-addon")}),(0,d.jsx)(bl,{color:"secondary",className:"loading"!==i?"md:w-[calc(100%-24px)]":"w-full",children:(0,n.__)("Facing issues with style, layout, color or another page element? Use this option to regenerate CSS and Javascript assets. It can help with all kinds of asset issues.","astra")})]}),(0,d.jsx)(hl,{className:"self-start whitespace-nowrap",onClick:()=>{s("loading"),rp({action:"astra_refresh_assets_files"},t).then(()=>{s(!1),o(!0),setTimeout(()=>o(!1),2e3)}).catch(e=>{console.error("Error occurred in generating assets: ",e)})},icon:"loading"===i&&(0,d.jsx)(Rh,{variant:"secondary"}),iconPosition:"right",children:(0,n.__)("Regenerate Assets","astra-addon")}),r&&(0,d.jsx)(Zh,{message:(0,n.__)("Assets regenerated successfully!","astra-addon")})]})]})},gp=()=>{const t=(0,e.useRef)(),r=!astra_addon_admin.show_self_branding,[o,i]=(0,e.useState)(!1),[s,a]=(0,e.useState)(r);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"h-px bg-border-subtle"}),(0,d.jsxs)("div",{className:"flex gap-4",children:[(0,d.jsxs)("div",{className:"w-full flex flex-col gap-1",children:[(0,d.jsx)(bl,{size:20,weight:600,children:(0,n.__)("Enable White Label","astra-addon")}),(0,d.jsx)(bl,{color:"secondary",children:(0,n.__)("White Label removes any links to Astra website and change the identity in the dashboard. This setting is mostly used by agencies and developers who are building websites for clients.","astra-addon")})]}),(0,d.jsx)(ap,{value:s,onChange:()=>{a(!s);const e={action:"astra_addon_update_whitelabel",key:"hide_branding",parent:"astra-agency",value:!s};rp(e,t).then(t=>{t.success&&(window.astra_addon_admin.show_self_branding=e.value,i(!0),setTimeout(()=>{i(!1);let e=t.data.rebranded_theme_name.replaceAll("%","");window.open(`${astra_admin.admin_url}?page=${e.toLowerCase()}&path=settings`,"_self")},500))}).catch(e=>{console.error("Error occurred in toggling white label status: "+e)})}}),o&&(0,d.jsx)(Zh,{})]})]})},vp=(0,e.forwardRef)(({id:t,defaultValue:n="",value:r,size:o="sm",className:i="",disabled:s=!1,onChange:a=()=>{},error:l=!1,onError:c=()=>{},...u},h)=>{const p=(0,e.useMemo)(()=>t||`input-textarea-${Eh()}`,[t]),f=(0,e.useMemo)(()=>typeof r<"u",[r]),[m,g]=(0,e.useState)(n),v=(0,e.useCallback)(()=>f?r:m,[f,r,m]),y=s?"hover:border-border-disabled":"hover:border-border-strong",b=l?"focus:border-focus-error-border focus:ring-field-color-error border-focus-error-border":"";return(0,d.jsx)("textarea",{ref:h,id:p,className:$a("py-2 rounded border border-solid border-border-subtle bg-field-secondary-background font-normal placeholder-text-tertiary text-text-primary focus:outline-none transition ease-in-out duration-200",s?"border-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled":"",{sm:"px-3 rounded text-xs",md:"px-3 rounded-md text-sm",lg:"px-4 rounded-lg text-base"}[o],"focus:border-focus-border focus:ring-2 focus:ring-toggle-on focus:ring-offset-2",y,b,i),disabled:s,onChange:e=>{if(s)return;const t=e.target.value;f||g(t),"function"==typeof a&&a(t)},onInvalid:c,value:v(),...u})});vp.displayName="TextArea";const yp=()=>{const t=(0,e.useRef)(),[r,o]=(0,e.useState)(!1),[i,s]=(0,e.useState)(!1),[a,l]=(0,e.useState)({agencyAuthorName:astra_addon_admin.agency_author_name,agencyLicenseLink:astra_addon_admin.agency_license_link,agencyAuthorURL:astra_addon_admin.agency_author_url,themeName:astra_addon_admin.theme_name,themeDescription:astra_addon_admin.theme_description,themeScreenshotURL:astra_addon_admin.theme_screenshot_url,themeIconURL:astra_addon_admin.theme_icon_url,pluginName:astra_addon_admin.plugin_name,pluginDescription:astra_addon_admin.plugin_description,sTPluginName:astra_addon_admin.st_plugin_name,sTPluginDescription:astra_addon_admin.st_plugin_description}),c=(e,t,n)=>{const r={...a};r[t]=e,l(r),window.astra_addon_admin[n]=e};return(0,d.jsxs)("div",{className:"ast-whitelabel-wrap flex flex-col gap-8",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)(bl,{as:"h4",size:20,children:(0,n.__)("Agency Details","astra-addon")}),(0,d.jsxs)("div",{className:"pt-3 flex flex-col gap-3",children:[(0,d.jsx)(hp,{type:"text",size:"md",label:(0,n.__)("Agency author name","astra-addon"),value:a.agencyAuthorName,onChange:e=>c(e,"agencyAuthorName","agency_author_name"),id:"author",name:"author","data-parent":"astra-agency"}),(0,d.jsx)(hp,{type:"text",size:"md",label:(0,n.__)("Agency author URL","astra-addon"),value:a.agencyAuthorURL,onChange:e=>c(e,"agencyAuthorURL","agency_author_url"),id:"author_url",name:"author_url","data-parent":"astra-agency"}),(0,d.jsxs)("div",{children:[(0,d.jsx)(hp,{type:"text",size:"md",label:(0,n.__)("Agency license link","astra-addon"),value:a.agencyLicenseLink,onChange:e=>c(e,"agencyLicenseLink","agency_license_link"),id:"license",name:"license","data-parent":"astra-agency"}),(0,d.jsx)(bl,{color:"help",weight:400,className:"mt-1.5",children:(0,n.__)("Get license link will be displayed in the license form when the purchase key is expired/not valid.","astra-addon")})]})]})]}),(0,d.jsx)("div",{className:"h-px bg-border-subtle"}),(0,d.jsxs)("div",{children:[(0,d.jsx)(bl,{as:"h4",size:20,children:(0,n.__)("Astra Theme Branding","astra-addon")}),(0,d.jsxs)("div",{className:"pt-3 flex flex-col gap-3",children:[(0,d.jsx)(hp,{type:"text",size:"md",label:(0,n.__)("Theme Name","astra-addon"),value:a.themeName,onChange:e=>c(e,"themeName","theme_name"),id:"name",name:"name","data-parent":"astra"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,d.jsx)(bh,{htmlFor:"description",children:(0,n.__)("Theme Description","astra-addon")}),(0,d.jsx)(vp,{className:"h-36",size:"md",value:a.themeDescription,onChange:e=>c(e,"themeDescription","theme_description"),id:"description",name:"description","data-parent":"astra"})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)(hp,{type:"text",size:"md",label:(0,n.__)("Theme Screenshot URL","astra-addon"),value:a.themeScreenshotURL,onChange:e=>c(e,"themeScreenshotURL","theme_screenshot_url"),id:"screenshot",name:"screenshot","data-parent":"astra"}),(0,d.jsx)(bl,{color:"help",weight:400,className:"mt-1.5",children:(0,n.__)("The recommended image size is 1200px wide by 900px tall.","astra-addon")})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)(hp,{type:"text",size:"md",label:(0,n.__)("Theme Icon URL","astra-addon"),value:a.themeIconURL,onChange:e=>c(e,"themeIconURL","theme_icon_url"),id:"icon",name:"icon","data-parent":"astra"}),(0,d.jsx)(bl,{color:"help",weight:400,className:"mt-1.5",children:(0,n.__)("The recommended icon should have some background to get adjust properly on white background too.","astra-addon")})]})]})]}),(0,d.jsx)("div",{className:"h-px bg-border-subtle"}),(0,d.jsxs)("div",{children:[(0,d.jsx)(bl,{as:"h4",size:20,children:(0,n.__)("Astra Pro Branding","astra-addon")}),(0,d.jsxs)("div",{className:"pt-3 flex flex-col gap-3",children:[(0,d.jsx)(hp,{type:"text",size:"md",label:(0,n.__)("Plugin Name","astra-addon"),value:a.pluginName,onChange:e=>c(e,"pluginName","plugin_name"),id:"astra_pro_name",name:"astra_pro_name","data-parent":"astra-pro"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,d.jsx)(bh,{htmlFor:"astra_pro_description",children:(0,n.__)("Plugin Description","astra-addon")}),(0,d.jsx)(vp,{className:"h-36",size:"md",value:a.pluginDescription,onChange:e=>c(e,"pluginDescription","plugin_description"),id:"astra_pro_description",name:"astra_pro_description","data-parent":"astra-pro"})]})]})]}),astra_admin.starter_templates_data.is_available&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"h-px bg-border-subtle"}),(0,d.jsxs)("div",{children:[(0,d.jsx)(bl,{as:"h4",size:20,children:(0,n.__)("Starter Templates Branding","astra-addon")}),(0,d.jsxs)("div",{className:"pt-3 flex flex-col gap-3",children:[(0,d.jsx)(hp,{type:"text",size:"md",label:(0,n.__)("Plugin Name","astra-addon"),value:a.sTPluginName,onChange:e=>c(e,"sTPluginName","st_plugin_name"),id:"st_name",name:"st_name","data-parent":"astra-sites"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,d.jsx)(bh,{htmlFor:"st_description",children:(0,n.__)("Plugin Description","astra-addon")}),(0,d.jsx)(vp,{className:"h-36",size:"md",value:a.sTPluginDescription,onChange:e=>c(e,"sTPluginDescription","st_plugin_description"),id:"st_description",name:"st_description","data-parent":"astra-site"})]})]})]})]}),(0,d.jsx)(hl,{className:"w-max",onClick:()=>{s("loading");const e={action:"astra_addon_update_whitelabel",data:JSON.stringify(a)};rp(e,t).then(e=>{e.success&&(s(!1),o(!0),setTimeout(()=>{o(!1);const t=e.data.rebranded_theme_name.replaceAll("%","");window.open(`${astra_admin.admin_url}?page=${t.toLowerCase()}&path=settings`,"_self")},500))}).catch(e=>{console.error("Error occurred in submitting white label data:",e)})},icon:"loading"===i&&(0,d.jsx)(Rh,{variant:"secondary"}),iconPosition:"right",children:(0,n.__)("Save","astra-addon")}),r&&(0,d.jsx)(Zh,{})]})},bp=l("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"}]]),xp=l("badge-check",[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);wp.hooks.addFilter("astra_dashboard.after_navigation_version","astra_addon/dashboard_app",function(e){return astra_addon_admin.is_bsf_package&&(e=astra_addon_admin.license_status?(0,d.jsx)("div",{className:"pl-3",children:(0,d.jsx)(Ph,{label:(0,n.__)("Active","astra-addon"),size:"xxs",variant:"green"})}):(0,d.jsx)("div",{className:"pl-3",children:(0,d.jsx)("a",{className:"hover:text-astra no-underline text-slate-400",href:`admin.php?page=${astra_admin.home_slug}&path=settings`,children:(0,d.jsx)(Ph,{label:(0,n.__)("Inactive","astra-addon"),size:"xxs",variant:"yellow"})})})),e}),wp.hooks.addFilter("astra_dashboard.main_navigation","astra_addon/dashboard_app",function(e){return e.filter(e=>"free-vs-pro"!==e.path)}),wp.hooks.addFilter("astra_dashboard.settings_navigation","astra_addon/dashboard_app",function(e){let t=!0;return astra_admin.show_self_branding||astra_addon_admin.license_status||(t=!1),astra_addon_admin.is_bsf_package||(t=!1),t&&e.push({name:(0,n.__)("Version Control","astra-addon"),slug:"version-control",icon:(0,d.jsx)(bp,{size:20})}),astra_admin.show_self_branding&&e.push({name:(0,n.__)("White Label","astra-addon"),slug:"white-label",icon:(0,d.jsx)(xp,{size:20})}),e}),wp.hooks.addFilter("astra_dashboard.changelog_products","astra_addon/dashboard_app",function(e){return e.push({name:"Astra Pro",value:"astra-pro"}),e}),wp.hooks.addFilter("astra_dashboard.settings_tab_wrappers","astra_addon/dashboard_app",function(e){return astra_addon_admin.is_bsf_package?astra_admin.show_self_branding?(e["version-control"]=(0,d.jsxs)(d.Fragment,{children:[" ",(0,d.jsx)(zh,{})," ",(0,d.jsx)(lp,{})," "]}),e["white-label"]=(0,d.jsxs)(d.Fragment,{children:[" ",(0,d.jsx)(yp,{})," ",(0,d.jsx)(gp,{})," "]})):e["version-control"]=(0,d.jsxs)(d.Fragment,{children:[" ",(0,d.jsx)(zh,{})," "]}):astra_admin.show_self_branding&&(e["white-label"]=(0,d.jsxs)(d.Fragment,{children:[" ",(0,d.jsx)(yp,{})," ",(0,d.jsx)(gp,{})," "]})),e}),wp.hooks.addFilter("astra_dashboard.settings_screen_before_global-settings","astra_addon/dashboard_app",function(e){return astra_addon_admin.is_bsf_package?(0,d.jsxs)(d.Fragment,{children:[" ",(0,d.jsx)(pp,{})," ",(0,d.jsx)(fp,{})," ",(0,d.jsx)(mp,{})," "]}):(0,d.jsxs)(d.Fragment,{children:[" ",(0,d.jsx)(fp,{})," ",(0,d.jsx)(mp,{})," "]})}),wp.hooks.addFilter("astra_dashboard.welcome_screen_after_integrations","astra_addon/dashboard_app",function(e){return astra_addon_admin.is_bsf_package&&(e=(0,d.jsx)("div",{className:"p-1",children:(0,d.jsx)(pp,{})})),e})})()})();