HEX
Server: LiteSpeed
System: Linux node612.namehero.net 4.18.0-553.121.1.lve.el8.x86_64 #1 SMP Thu Apr 30 16:40:41 UTC 2026 x86_64
User: dfwparty (1186)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: /home/dfwparty/public_html/wp-content/plugins/astra-addon/admin/core/assets/build/dashboard-app.js
(()=>{var e,t,n={20(e,t,n){"use strict";var r=n(609),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,i={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)s.call(t,r)&&!l.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:i,_owner:a.current}}t.Fragment=i,t.jsx=c,t.jsxs=c},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 m(){var e={line:d,column:h};return function(t){return t.position=new f(e),y(),t}}function f(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=m();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=m(),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 f.prototype.content=e,y(),function(){var e,t=[];for(b(t);e=w();)!1!==e&&(t.push(e),b(t));return t}()}},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))},141(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(413),s=n(957);o(n(957),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},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,m=null!==(r=n.transform)&&void 0!==r?r:s.returnFirstArg,f=null!==(o=n.library)&&void 0!==o?o:a,g=f.cloneElement,v=f.createElement,y=f.isValidElement,b=t.length,x=0;x<b;x++){var w=t[x];if(p){var E=null===(c=n.replace)||void 0===c?void 0:c.call(n,w,x);if(y(E)){b>1&&(E=g(E,{key:null!==(u=E.key)&&void 0!==u?u:x})),h.push(m(E,w,x));continue}}if("text"!==w.type){var k=w,_={};l(k)?((0,s.setStyleProp)(k.attribs.style,k.attribs),_=k.attribs):k.attribs&&(_=(0,i.default)(k.attribs,k.name));var T=void 0;switch(w.type){case"script":case"style":w.children[0]&&(_.dangerouslySetInnerHTML={__html:w.children[0].data});break;case"tag":"textarea"===w.name&&w.children[0]?_.defaultValue=w.children[0].data:(null===(d=w.children)||void 0===d?void 0:d.length)&&(T=e(w.children,n));break;default:continue}b>1&&(_.key=x),h.push(m(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(m(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)}},413(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},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(141);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,m,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==(E=x.querySelector(i))?void 0:E.parentNode)||void 0===n||n.removeChild(E),c.test(e)||null===(h=null==(E=x.querySelector(s))?void 0:E.parentNode)||void 0===h||h.removeChild(E),x.querySelectorAll(o);case i:case s:var w=u(e).querySelectorAll(b);return c.test(e)&&l.test(e)?null!==(m=null===(p=w[0].parentNode)||void 0===p?void 0:p.childNodes)&&void 0!==m?m:v():w;default:return f?f(e):null!==(g=null==(E=u(e,s).querySelector(s))?void 0:E.childNodes)&&void 0!==g?g:v();var E}};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 m=document.implementation.createHTMLDocument();u=function(e,t){if(t){var n=m.documentElement.querySelector(t);return n&&(n.innerHTML=e),m}return m.documentElement.innerHTML=e,m}}var f,g="object"==typeof document&&document.createElement("template");g&&g.content&&(f=function(e){return g.innerHTML=e,g.content.childNodes});var v=function(){return document.createDocumentFragment().childNodes}},609(e){"use strict";e.exports=window.React},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=[],m=0,f=t.length;m<f;m++){var g=t[m];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[m-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(141),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)}},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 m=(0,r.getPropertyInfo)(p);switch(i.includes(p)&&s.includes(t)&&!c&&(p=l("default"+h)),n[p]=d,null==m?void 0:m.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]}},848(e,t,n){"use strict";e.exports=n(20)},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))}},957(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(413),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),E(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 m=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=m;var f=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 E(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?k(e.children):[],o=new f(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?k(e.children):[];var s=new p(r);r.forEach(function(e){return e.parent=s}),n=s}else if(w(e)){r=t?k(e.children):[];var a=new m(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 k(e){for(var t=e.map(function(e){return E(e,!0)}),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}t.Element=f,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=E},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";const e=window.wp.element;var t=o(609),n=o.t(t,2);const r=window.wp.i18n,i=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)},s=(...e)=>e.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim();var a={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 l=(0,t.forwardRef)(({color:e="currentColor",size:n=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:i="",children:l,iconNode:c,...u},d)=>(0,t.createElement)("svg",{ref:d,...a,width:n,height:n,stroke:e,strokeWidth:o?24*Number(r)/Number(n):r,className:s("lucide",i),...u},[...c.map(([e,n])=>(0,t.createElement)(e,n)),...Array.isArray(l)?l:[l]])),c=(e,n)=>{const r=(0,t.forwardRef)(({className:r,...o},a)=>{return(0,t.createElement)(l,{ref:a,iconNode:n,className:s(`lucide-${c=i(e),c.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,r),...o});var c});return r.displayName=i(e),r},u=c("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"}]]),d=c("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"}]]);var h=o(848);const p=(0,t.createContext)({});function m(e){const n=(0,t.useRef)(null);return null===n.current&&(n.current=e()),n.current}const f=(0,t.createContext)(null),g=(0,t.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class v extends t.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 y({children:e,isPresent:n}){const r=(0,t.useId)(),o=(0,t.useRef)(null),i=(0,t.useRef)({width:0,height:0,top:0,left:0}),{nonce:s}=(0,t.useContext)(g);return(0,t.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,h.jsx)(v,{isPresent:n,childRef:o,sizeRef:i,children:t.cloneElement(e,{ref:o})})}const b=({children:e,initial:n,isPresent:r,onExitComplete:o,custom:i,presenceAffectsLayout:s,mode:a})=>{const l=m(x),c=(0,t.useId)(),u=(0,t.useCallback)(e=>{l.set(e,!0);for(const e of l.values())if(!e)return;o&&o()},[l,o]),d=(0,t.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,t.useMemo)(()=>{l.forEach((e,t)=>l.set(t,!1))},[r]),t.useEffect(()=>{!r&&!l.size&&o&&o()},[r]),"popLayout"===a&&(e=(0,h.jsx)(y,{isPresent:r,children:e})),(0,h.jsx)(f.Provider,{value:d,children:e})};function x(){return new Map}function w(e=!0){const n=(0,t.useContext)(f);if(null===n)return[!0,null];const{isPresent:r,onExitComplete:o,register:i}=n,s=(0,t.useId)();(0,t.useEffect)(()=>{e&&i(s)},[e]);const a=(0,t.useCallback)(()=>e&&o&&o(s),[s,o,e]);return!r&&o?[!1,a]:[!0]}const E=e=>e.key||"";function k(e){const n=[];return t.Children.forEach(e,e=>{(0,t.isValidElement)(e)&&n.push(e)}),n}const _="undefined"!=typeof window,T=_?t.useLayoutEffect:t.useEffect,S=({children:e,custom:n,initial:r=!0,onExitComplete:o,presenceAffectsLayout:i=!0,mode:s="sync",propagate:a=!1})=>{const[l,c]=w(a),u=(0,t.useMemo)(()=>k(e),[e]),d=a&&!l?[]:u.map(E),f=(0,t.useRef)(!0),g=(0,t.useRef)(u),v=m(()=>new Map),[y,x]=(0,t.useState)(u),[_,S]=(0,t.useState)(u);T(()=>{f.current=!1,g.current=u;for(let e=0;e<_.length;e++){const t=E(_[e]);d.includes(t)?v.delete(t):!0!==v.get(t)&&v.set(t,!1)}},[_,d.length,d.join("-")]);const C=[];if(u!==y){let e=[...u];for(let t=0;t<_.length;t++){const n=_[t],r=E(n);d.includes(r)||(e.splice(t,0,n),C.push(n))}return"wait"===s&&C.length&&(e=C),S(k(e)),void x(u)}const{forceRender:R}=(0,t.useContext)(p);return(0,h.jsx)(h.Fragment,{children:_.map(e=>{const t=E(e),p=!(a&&!l)&&(u===_||d.includes(t));return(0,h.jsx)(b,{isPresent:p,initial:!(f.current&&!r)&&void 0,custom:p?void 0:n,presenceAffectsLayout:i,mode:s,onExitComplete:p?void 0:()=>{if(!v.has(t))return;v.set(t,!0);let e=!0;v.forEach(t=>{t||(e=!1)}),e&&(null==R||R(),S(g.current),a&&(null==c||c()),o&&o())},children:e},t)})})};function C(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 R(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}const P=e=>Array.isArray(e);function A(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 N(e){return"string"==typeof e||Array.isArray(e)}function M(e){const t=[{},{}];return null==e||e.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function j(e,t,n,r){if("function"==typeof t){const[o,i]=M(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]=M(r);t=t(void 0!==n?n:e.custom,o,i)}return t}function D(e,t,n){const r=e.getProps();return j(r,t,void 0!==n?n:r.custom,e)}const L=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],I=["initial",...L];function O(e){let t;return()=>(void 0===t&&(t=e()),t)}const V=O(()=>void 0!==window.ScrollTimeline);class F{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=>V()&&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 z extends F{then(e,t){return Promise.all(this.animations).then(e).catch(t)}}function B(e,t){return e?e[t]||e.default||e:void 0}const U=2e4;function W(e){let t=0,n=e.next(t);for(;!n.done&&t<U;)t+=50,n=e.next(t);return t>=U?1/0:t}function $(e){return"function"==typeof e}function H(e,t){e.timeline=t,e.onfinish=null}const G=e=>Array.isArray(e)&&"number"==typeof e[0],q={linearEasing:void 0};function K(e,t){const n=O(e);return()=>{var e;return null!==(e=q[t])&&void 0!==e?e:n()}}const X=K(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),Y=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},Z=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let t=0;t<o;t++)r+=e(Y(0,o-1,t))+", ";return`linear(${r.substring(0,r.length-2)})`};function J(e){return Boolean("function"==typeof e&&X()||!e||"string"==typeof e&&(e in ee||X())||G(e)||Array.isArray(e)&&e.every(J))}const Q=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ee={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Q([0,.65,.55,1]),circOut:Q([.55,0,1,.45]),backIn:Q([.31,.01,.66,-.59]),backOut:Q([.33,1.53,.69,.99])};function te(e,t){return e?"function"==typeof e&&X()?Z(e,t):G(e)?Q(e):Array.isArray(e)?e.map(e=>te(e,t)||ee.easeOut):ee[e]:void 0}const ne={x:!1,y:!1};function re(){return ne.x||ne.y}function oe(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 ie(e){return t=>{"touch"===t.pointerType||re()||e(t)}}const se=(e,t)=>!!t&&(e===t||se(e,t.parentElement)),ae=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,le=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),ce=new WeakSet;function ue(e){return t=>{"Enter"===t.key&&e(t)}}function de(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function he(e){return ae(e)&&!re()}const pe=e=>1e3*e,me=e=>e/1e3,fe=e=>e,ge=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ve=new Set(ge),ye=new Set(["width","height","top","left","right","bottom",...ge]),be=e=>P(e)?e[e.length-1]||0:e,xe=["read","resolveKeyframes","update","preRender","render","postRender"];function we(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=xe.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:xe.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<xe.length;t++)s[xe[t]].cancel(e)},state:o,steps:s}}const{schedule:Ee,cancel:ke,state:_e,steps:Te}=we("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:fe,!0);let Se;function Ce(){Se=void 0}const Re={now:()=>(void 0===Se&&Re.set(_e.isProcessing?_e.timestamp:performance.now()),Se),set:e=>{Se=e,queueMicrotask(Ce)}};function Pe(e,t){-1===e.indexOf(t)&&e.push(t)}function Ae(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Ne{constructor(){this.subscriptions=[]}add(e){return Pe(this.subscriptions,e),()=>Ae(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 Me(e,t){return t?e*(1e3/t):0}const je={current:void 0};class De{constructor(e,t={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{const n=Re.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=Re.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 Ne);const n=this.events[e].add(t);return"change"===e?()=>{n(),Ee.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 je.current&&je.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=Re.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Me(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 Le(e,t){return new De(e,t)}function Ie(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Le(n))}const Oe=e=>Boolean(e&&e.getVelocity);function Ve(e,t){const n=e.getValue("willChange");if(r=n,Boolean(Oe(r)&&r.add))return n.add(t);var r}const Fe=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ze="data-"+Fe("framerAppearId");function Be(e){return e.props[ze]}const Ue=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function We(e,t,n,r){if(e===t&&n===r)return fe;return o=>0===o||1===o?o:Ue(function(e,t,n,r,o){let i,s,a=0;do{s=t+(n-t)/2,i=Ue(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 $e=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,He=e=>t=>1-e(1-t),Ge=We(.33,1.53,.69,.99),qe=He(Ge),Ke=$e(qe),Xe=e=>(e*=2)<1?.5*qe(e):.5*(2-Math.pow(2,-10*(e-1))),Ye=e=>1-Math.sin(Math.acos(e)),Ze=He(Ye),Je=$e(Ye),Qe=e=>/^0[^.\s]+$/u.test(e);function et(e){return"number"==typeof e?0===e:null===e||"none"===e||"0"===e||Qe(e)}const tt=(e,t,n)=>n>t?t:n<e?e:n,nt={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},rt={...nt,transform:e=>tt(0,1,e)},ot={...nt,default:1},it=e=>Math.round(1e5*e)/1e5,st=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,at=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,lt=(e,t)=>n=>Boolean("string"==typeof n&&at.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),ct=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[o,i,s,a]=r.match(st);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},ut={...nt,transform:e=>Math.round((e=>tt(0,255,e))(e))},dt={test:lt("rgb","red"),parse:ct("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ut.transform(e)+", "+ut.transform(t)+", "+ut.transform(n)+", "+it(rt.transform(r))+")"},ht={test:lt("#"),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:dt.transform},pt=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),mt=pt("deg"),ft=pt("%"),gt=pt("px"),vt=pt("vh"),yt=pt("vw"),bt={...ft,parse:e=>ft.parse(e)/100,transform:e=>ft.transform(100*e)},xt={test:lt("hsl","hue"),parse:ct("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+ft.transform(it(t))+", "+ft.transform(it(n))+", "+it(rt.transform(r))+")"},wt={test:e=>dt.test(e)||ht.test(e)||xt.test(e),parse:e=>dt.test(e)?dt.parse(e):xt.test(e)?xt.parse(e):ht.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?dt.transform(e):xt.transform(e)},Et=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,kt="number",_t="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 St(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(Tt,e=>(wt.test(e)?(r.color.push(i),o.push(_t),n.push(wt.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 Ct(e){return St(e).values}function Rt(e){const{split:t,types:n}=St(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?it(e[i]):t===_t?wt.transform(e[i]):e[i]}return o}}const Pt=e=>"number"==typeof e?0:e,At={test:function(e){var t,n;return isNaN(e)&&"string"==typeof e&&((null===(t=e.match(st))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(Et))||void 0===n?void 0:n.length)||0)>0},parse:Ct,createTransformer:Rt,getAnimatableNone:function(e){const t=Ct(e);return Rt(e)(t.map(Pt))}},Nt=new Set(["brightness","contrast","saturate","opacity"]);function Mt(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(st)||[];if(!r)return e;const o=n.replace(r,"");let i=Nt.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const jt=/\b([a-z-]*)\(.*?\)/gu,Dt={...At,getAnimatableNone:e=>{const t=e.match(jt);return t?t.map(Mt).join(" "):e}},Lt={borderWidth:gt,borderTopWidth:gt,borderRightWidth:gt,borderBottomWidth:gt,borderLeftWidth:gt,borderRadius:gt,radius:gt,borderTopLeftRadius:gt,borderTopRightRadius:gt,borderBottomRightRadius:gt,borderBottomLeftRadius:gt,width:gt,maxWidth:gt,height:gt,maxHeight:gt,top:gt,right:gt,bottom:gt,left:gt,padding:gt,paddingTop:gt,paddingRight:gt,paddingBottom:gt,paddingLeft:gt,margin:gt,marginTop:gt,marginRight:gt,marginBottom:gt,marginLeft:gt,backgroundPositionX:gt,backgroundPositionY:gt},It={rotate:mt,rotateX:mt,rotateY:mt,rotateZ:mt,scale:ot,scaleX:ot,scaleY:ot,scaleZ:ot,skew:mt,skewX:mt,skewY:mt,distance:gt,translateX:gt,translateY:gt,translateZ:gt,x:gt,y:gt,z:gt,perspective:gt,transformPerspective:gt,opacity:rt,originX:bt,originY:bt,originZ:gt},Ot={...nt,transform:Math.round},Vt={...Lt,...It,zIndex:Ot,size:gt,fillOpacity:rt,strokeOpacity:rt,numOctaves:Ot},Ft={...Vt,color:wt,backgroundColor:wt,outlineColor:wt,fill:wt,stroke:wt,borderColor:wt,borderTopColor:wt,borderRightColor:wt,borderBottomColor:wt,borderLeftColor:wt,filter:Dt,WebkitFilter:Dt},zt=e=>Ft[e];function Bt(e,t){let n=zt(e);return n!==Dt&&(n=At),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Ut=new Set(["auto","none","0"]),Wt=e=>e===nt||e===gt,$t=(e,t)=>parseFloat(e.split(", ")[t]),Ht=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return $t(o[1],t);{const t=r.match(/^matrix\((.+)\)$/u);return t?$t(t[1],e):0}},Gt=new Set(["x","y","z"]),qt=ge.filter(e=>!Gt.has(e)),Kt={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:Ht(4,13),y:Ht(5,14)};Kt.translateX=Kt.x,Kt.translateY=Kt.y;const Xt=new Set;let Yt=!1,Zt=!1;function Jt(){if(Zt){const e=Array.from(Xt).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 qt.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)})}Zt=!1,Yt=!1,Xt.forEach(e=>e.complete()),Xt.clear()}function Qt(){Xt.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Zt=!0)})}class en{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?(Xt.add(this),Yt||(Yt=!0,Ee.read(Qt),Ee.resolveKeyframes(Jt))):(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),Xt.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Xt.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}let tn=fe,nn=fe;const rn=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),on=e=>t=>"string"==typeof t&&t.startsWith(e),sn=on("--"),an=on("var(--"),ln=e=>!!an(e)&&cn.test(e.split("/*")[0].trim()),cn=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,un=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function dn(e,t,n=1){nn(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=un.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 rn(e)?parseFloat(e):e}return ln(o)?dn(o,t,n+1):o}const hn=e=>t=>t.test(e),pn=[nt,gt,ft,mt,yt,vt,{test:e=>"auto"===e,parse:e=>e}],mn=e=>pn.find(hn(e));class fn extends en{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(),ln(r))){const o=dn(r,t.current);void 0!==o&&(e[n]=o),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!ye.has(n)||2!==e.length)return;const[r,o]=e,i=mn(r),s=mn(o);if(i!==s)if(Wt(i)&&Wt(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++)et(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&&!Ut.has(t)&&St(t).values.length&&(r=e[o]),o++}if(r&&n)for(const o of t)e[o]=Bt(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=Kt[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]=Kt[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 gn=(e,t)=>!("zIndex"===t||"number"!=typeof e&&!Array.isArray(e)&&("string"!=typeof e||!At.test(e)&&"0"!==e||e.startsWith("url(")));function vn(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=gn(o,t),a=gn(i,t);return tn(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||$(n))&&r)}const yn=e=>null!==e;function bn(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(yn),i=t&&"loop"!==n&&t%2==1?0:o.length-1;return i&&void 0!==r?r:o[i]}class xn{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=Re.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||(Qt(),Jt()),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=Re.now(),this.hasAttemptedResolve=!0;const{name:n,type:r,velocity:o,delay:i,onComplete:s,onUpdate:a,isGenerator:l}=this.options;if(!l&&!vn(e,n,r,o)){if(!i)return a&&a(bn(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 wn=(e,t,n)=>e+(t-e)*n;function En(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 Tn=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},Sn=[ht,dt,xt];function Cn(e){const t=(n=e,Sn.find(e=>e.test(n)));var n;if(tn(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===xt&&(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=En(a,r,e+1/3),i=En(a,r,e),s=En(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 Rn=(e,t)=>{const n=Cn(e),r=Cn(t);if(!n||!r)return kn(e,t);const o={...n};return e=>(o.red=Tn(n.red,r.red,e),o.green=Tn(n.green,r.green,e),o.blue=Tn(n.blue,r.blue,e),o.alpha=wn(n.alpha,r.alpha,e),dt.transform(o))},Pn=(e,t)=>n=>t(e(n)),An=(...e)=>e.reduce(Pn),Nn=new Set(["none","hidden"]);function Mn(e,t){return n=>wn(e,t,n)}function jn(e){return"number"==typeof e?Mn:"string"==typeof e?ln(e)?kn:wt.test(e)?Rn:In:Array.isArray(e)?Dn:"object"==typeof e?wt.test(e)?Rn:Ln:kn}function Dn(e,t){const n=[...e],r=n.length,o=e.map((e,n)=>jn(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=o[t](e);return n}}function Ln(e,t){const n={...e,...t},r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=jn(e[o])(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const In=(e,t)=>{const n=At.createTransformer(t),r=St(e),o=St(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?Nn.has(e)&&!o.values.length||Nn.has(t)&&!r.values.length?function(e,t){return Nn.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):An(Dn(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):(tn(!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 On(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?wn(e,t,n):jn(e)(e,t)}function Vn(e,t,n){const r=Math.max(t-5,0);return Me(n-e(r),t-r)}const Fn=.01,zn=2,Bn=.005,Un=.5;const Wn=12;function $n(e,t){return e*Math.sqrt(1-t*t)}const Hn=["duration","bounce"],Gn=["stiffness","damping","mass"];function qn(e,t){return t.some(t=>void 0!==e[t])}function Kn(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(!qn(e,Gn)&&qn(e,Hn))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),o=r*r,i=2*tt(.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;tn(e<=pe(10),"Spring duration must be 10 seconds or less");let s=1-t;s=tt(.05,1,s),e=tt(.01,10,me(e)),s<1?(o=t=>{const r=t*s,o=r*e;return.001-(r-n)/$n(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=$n(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<Wn;n++)r-=e(r)/t(r);return r}(o,i,5/e);if(e=pe(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:-me(n.velocity||0)}),m=h||0,f=c/(2*Math.sqrt(l*u)),g=s-i,v=me(Math.sqrt(l/u)),y=Math.abs(g)<5;let b;if(r||(r=y?Fn:zn),o||(o=y?Bn:Un),f<1){const e=$n(v,f);b=t=>{const n=Math.exp(-f*v*t);return s-n*((m+f*v*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}}else if(1===f)b=e=>s-Math.exp(-v*e)*(g+(m+v*g)*e);else{const e=v*Math.sqrt(f*f-1);b=t=>{const n=Math.exp(-f*v*t),r=Math.min(e*t,300);return s-n*((m+f*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;f<1&&(n=0===e?pe(m):Vn(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(W(x),U),t=Z(t=>x.next(e*t).value,e,30);return e+"ms "+t}};return x}function Xn({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 m=n*t;const f=d+m,g=void 0===s?f:s(f);g!==f&&(m=g-d);const v=e=>-m*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 E=e=>{var t;t=h.value,(void 0!==a&&t<a||void 0!==l&&t>l)&&(x=e,w=Kn({keyframes:[h.value,p(h.value)],velocity:Vn(y,e,h.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return E(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==x||(t=!0,b(e),E(e)),void 0!==x&&e>=x?w.next(e-x):(!t&&b(e),h)}}}const Yn=We(.42,0,1,1),Zn=We(0,0,.58,1),Jn=We(.42,0,.58,1),Qn={linear:fe,easeIn:Yn,easeInOut:Jn,easeOut:Zn,circIn:Ye,circInOut:Je,circOut:Ze,backIn:qe,backInOut:Ke,backOut:Ge,anticipate:Xe},er=e=>{if(G(e)){nn(4===e.length,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return We(t,n,r,o)}return"string"==typeof e?(nn(void 0!==Qn[e],`Invalid easing type '${e}'`),Qn[e]):e};function tr({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(er):er(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=Y(0,t,r);e.push(wn(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(nn(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||On,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=An(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=Y(e[r],e[r+1],n);return a[r](o)};return n?t=>c(tt(e[0],e[i-1],t)):c}(s,t,{ease:Array.isArray(o)?o:(l=t,c=o,l.map(()=>c||Jn).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(i.value=a(t),i.done=t>=e,i)}}const nr=e=>{const t=({timestamp:t})=>e(t);return{start:()=>Ee.update(t,!0),stop:()=>ke(t),now:()=>_e.isProcessing?_e.timestamp:Re.now()}},rr={decay:Xn,inertia:Xn,tween:tr,keyframes:tr,spring:Kn},or=e=>e/100;class ir extends xn{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)||en;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=$(t)?t:rr[t]||tr;let a,l;s!==tr&&"number"!=typeof e[0]&&(a=An(or,On(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=W(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:m,onUpdate:f}=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,m&&(n-=m/u)):"mirror"===p&&(b=i)),y=tt(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 E=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return E&&void 0!==r&&(x.value=bn(a,this.options,r)),f&&f(x.value),E&&this.finish(),x}get duration(){const{resolved:e}=this;return e?me(e.calculatedDuration):0}get time(){return me(this.currentTime)}set time(e){e=pe(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=me(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:e=nr,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 sr=new Set(["opacity","clipPath","filter","transform"]),ar=O(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),lr={anticipate:Xe,backInOut:Ke,circInOut:Je};class cr extends xn{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&&X()&&o in lr&&(o=lr[o]),$((c=this.options).type)||"spring"===c.type||!J(c.ease)){const{onComplete:t,onUpdate:s,motionValue:a,element:l,...c}=this.options,u=function(e,t){const n=new ir({...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=te(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?(H(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:n}=this.options;s.set(bn(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 me(t)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:t}=e;return me(t.currentTime||0)}set time(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.currentTime=pe(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;H(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 ir({...c,keyframes:n,duration:r,type:o,ease:i,times:s,isGenerator:!0}),d=pe(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 ar()&&n&&sr.has(n)&&!a&&!l&&!r&&"mirror"!==o&&0!==i&&"inertia"!==s}}const ur={type:"spring",stiffness:500,damping:25,restSpeed:10},dr={type:"keyframes",duration:.8},hr={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},pr=(e,{keyframes:t})=>t.length>2?dr:ve.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:ur:hr,mr=(e,t,n,r={},o,i)=>s=>{const a=B(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c-=pe(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,...pr(e,u)}),u.duration&&(u.duration=pe(u.duration)),u.repeatDelay&&(u.repeatDelay=pe(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=bn(u.keyframes,a);if(void 0!==e)return Ee.update(()=>{u.onUpdate(e),u.onComplete()}),new z([])}return!i&&cr.supports(u)?new cr(u):new ir(u)};function fr({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function gr(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,...B(s||{},t)};let d=!1;if(window.MotionHandoffAnimation){const n=Be(e);if(n){const e=window.MotionHandoffAnimation(n,t,Ee);null!==e&&(a.startTime=e,d=!0)}}Ve(e,t),r.start(mr(t,r,o,e.shouldReduceMotion&&ye.has(t)?{type:!1}:a,e,d));const h=r.animation;h&&c.push(h)}return a&&Promise.all(c).then(()=>{Ee.update(()=>{a&&function(e,t){const n=D(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const t in i)Ie(e,t,be(i[t]))}(e,a)})}),c}function vr(e,t,n={}){var r;const o=D(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(gr(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(yr).forEach((e,r)=>{e.notify("AnimationStart",t),s.push(vr(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 yr(e,t){return e.sortNodePosition(t)}const br=I.length;function xr(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&xr(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<br;n++){const r=I[n],o=e.props[r];(N(o)||!1===o)&&(t[r]=o)}return t}const wr=[...L].reverse(),Er=L.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=>vr(e,t,n));r=Promise.all(o)}else if("string"==typeof t)r=vr(e,t,n);else{const o="function"==typeof t?D(e,t,n.custom):t;r=Promise.all(gr(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}(e,t,n)))}(e),n=Sr(),r=!0;const o=t=>(n,r)=>{var o;const i=D(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=xr(e.parent)||{},l=[],c=new Set;let u={},d=1/0;for(let t=0;t<Er;t++){const h=wr[t],p=n[h],m=void 0!==s[h]?s[h]:a[h],f=N(m),g=h===i?p.isActive:null;!1===g&&(d=t);let v=m===a[h]&&m!==s[h]&&f;if(v&&r&&e.manuallyAnimateOnMount&&(v=!1),p.protectedKeys={...u},!p.isActive&&null===g||!m&&!p.prevProp||R(m)||"boolean"==typeof m)continue;const y=_r(p.prevProp,m);let b=y||h===i&&p.isActive&&!v&&f||t>d&&f,x=!1;const w=Array.isArray(m)?m:[m];let E=w.reduce(o(h),{});!1===g&&(E={});const{prevResolvedValues:k={}}=p,_={...k,...E},T=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 _){const t=E[e],n=k[e];if(u.hasOwnProperty(e))continue;let r=!1;r=P(t)&&P(n)?!A(t,n):t!==n,r?null!=t?T(e):c.add(e):void 0!==t&&c.has(e)?T(e):p.protectedKeys[e]=!0}p.prevProp=m,p.prevResolvedValues=E,p.isActive&&(u={...u,...E}),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=Sr(),r=!0}}}function _r(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!A(t,e)}function Tr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Sr(){return{animate:Tr(!0),whileInView:Tr(),whileHover:Tr(),whileTap:Tr(),whileDrag:Tr(),whileFocus:Tr(),exit:Tr()}}class Cr{constructor(e){this.isMounted=!1,this.node=e}update(){}}let Rr=0;const Pr={animation:{Feature:class extends Cr{constructor(e){super(e),e.animationState||(e.animationState=kr(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();R(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 Cr{constructor(){super(...arguments),this.id=Rr++}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 Ar(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Nr(e){return{point:{x:e.pageX,y:e.pageY}}}function Mr(e,t,n,r){return Ar(e,t,(e=>t=>ae(t)&&e(t,Nr(t)))(n),r)}const jr=(e,t)=>Math.abs(e-t);class Dr{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=Or(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=jr(e.x,t.x),r=jr(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}=_e;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=Lr(t,this.transformPagePoint),Ee.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=Or("pointercancel"===e.type?this.lastMoveEventInfo:Lr(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,i),r&&r(e,i)},!ae(e))return;this.dragSnapToOrigin=o,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;const i=Lr(Nr(e),this.transformPagePoint),{point:s}=i,{timestamp:a}=_e;this.history=[{...s,timestamp:a}];const{onSessionStart:l}=t;l&&l(e,Or(i,this.history)),this.removeListeners=An(Mr(this.contextWindow,"pointermove",this.handlePointerMove),Mr(this.contextWindow,"pointerup",this.handlePointerUp),Mr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),ke(this.updatePoint)}}function Lr(e,t){return t?{point:t(e.point)}:e}function Ir(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Or({point:e},t){return{point:e,delta:Ir(e,Fr(t)),offset:Ir(e,Vr(t)),velocity:zr(t,.1)}}function Vr(e){return e[0]}function Fr(e){return e[e.length-1]}function zr(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Fr(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>pe(t)));)n--;if(!r)return{x:0,y:0};const i=me(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 Br(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function Ur(e){return e.max-e.min}function Wr(e,t,n,r=.5){e.origin=r,e.originPoint=wn(t.min,t.max,e.origin),e.scale=Ur(n)/Ur(t),e.translate=wn(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 $r(e,t,n,r){Wr(e.x,t.x,n.x,r?r.originX:void 0),Wr(e.y,t.y,n.y,r?r.originY:void 0)}function Hr(e,t,n){e.min=n.min+t.min,e.max=e.min+Ur(t)}function Gr(e,t,n){e.min=t.min-n.min,e.max=e.min+Ur(t)}function qr(e,t,n){Gr(e.x,t.x,n.x),Gr(e.y,t.y,n.y)}function Kr(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 Xr(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 Yr=.35;function Zr(e,t,n){return{min:Jr(e,t),max:Jr(e,n)}}function Jr(e,t){return"number"==typeof e?e:e[t]||0}const Qr=()=>({x:{min:0,max:0},y:{min:0,max:0}});function eo(e){return[e("x"),e("y")]}function to({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function no(e){return void 0===e||1===e}function ro({scale:e,scaleX:t,scaleY:n}){return!no(e)||!no(t)||!no(n)}function oo(e){return ro(e)||io(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function io(e){return so(e.x)||so(e.y)}function so(e){return e&&"0%"!==e}function ao(e,t,n){return n+t*(e-n)}function lo(e,t,n,r,o){return void 0!==o&&(e=ao(e,o,r)),ao(e,n,r)+t}function co(e,t=0,n=1,r,o){e.min=lo(e.min,t,n,r,o),e.max=lo(e.max,t,n,r,o)}function uo(e,{x:t,y:n}){co(e.x,t.translate,t.scale,t.originPoint),co(e.y,n.translate,n.scale,n.originPoint)}const ho=.999999999999,po=1.0000000000001;function mo(e,t){e.min=e.min+t,e.max=e.max+t}function fo(e,t,n,r,o=.5){co(e,t,n,wn(e.min,e.max,o),r)}function go(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 vo(e,t){return to(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 yo=({current:e})=>e?e.ownerDocument.defaultView:null,bo=new WeakMap;class xo{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 Dr(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(Nr(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?ne[i]?null:(ne[i]=!0,()=>{ne[i]=!1}):ne.x||ne.y?null:(ne.x=ne.y=!0,()=>{ne.x=ne.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),eo(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=Ur(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),o&&Ee.postRender(()=>o(e,t)),Ve(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:()=>eo(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:yo(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&&Ee.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||!wo(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?wn(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?wn(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&&Br(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!r)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:Kr(e.x,n,o),y:Kr(e.y,t,r)}}(r.layoutBox,t),this.elastic=function(e=Yr){return!1===e?e=0:!0===e&&(e=Yr),{x:Zr(e,"left","right"),y:Zr(e,"top","bottom")}}(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&eo(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||!Br(e))return!1;const n=e.current;nn(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=vo(e,n),{scroll:o}=t;return o&&(mo(r.x,o.offset.x),mo(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:Xr(e.x,t.x),y:Xr(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=to(e))}return i}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{},l=eo(s=>{if(!wo(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 Ve(this.visualElement,e),n.start(mr(e,n,0,t,this.visualElement,!1))}stopAnimation(){eo(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){eo(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){eo(t=>{const{drag:n}=this.getProps();if(!wo(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]-wn(n,i,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Br(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};eo(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=Ur(e),o=Ur(t);return o>r?n=Y(t.min,t.max-r,e.min):r>o&&(n=Y(e.min,e.max-o,t.min)),tt(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(),eo(t=>{if(!wo(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:i}=this.constraints[t];n.set(wn(o,i,r[t]))})}addListeners(){if(!this.visualElement.current)return;bo.set(this.visualElement,this);const e=Mr(this.visualElement.current,"pointerdown",e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),t=()=>{const{dragConstraints:e}=this.getProps();Br(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()),Ee.read(t);const o=Ar(window,"resize",()=>this.scalePositionWithinConstraints()),i=n.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(eo(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=Yr,dragMomentum:s=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:s}}}function wo(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const Eo=e=>(t,n)=>{e&&Ee.postRender(()=>e(t,n))},ko=(0,t.createContext)({}),_o={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function To(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const So={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!gt.test(e))return e;e=parseFloat(e)}return`${To(e,t.target.x)}% ${To(e,t.target.y)}%`}},Co={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=At.parse(e);if(o.length>5)return r;const i=At.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=wn(a,l,.5);return"number"==typeof o[2+s]&&(o[2+s]/=c),"number"==typeof o[3+s]&&(o[3+s]/=c),i(o)}},Ro={},{schedule:Po,cancel:Ao}=we(queueMicrotask,!1);class No extends t.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;var i;i=jo,Object.assign(Ro,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()})),_o.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()||Ee.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 Mo(e){const[n,r]=w(),o=(0,t.useContext)(p);return(0,h.jsx)(No,{...e,layoutGroup:o,switchLayoutGroup:(0,t.useContext)(ko),isPresent:n,safeToRemove:r})}const jo={borderRadius:{...So,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:So,borderTopRightRadius:So,borderBottomLeftRadius:So,borderBottomRightRadius:So,boxShadow:Co},Do=(e,t)=>e.depth-t.depth;class Lo{constructor(){this.children=[],this.isDirty=!1}add(e){Pe(this.children,e),this.isDirty=!0}remove(e){Ae(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Do),this.isDirty=!1,this.children.forEach(e)}}function Io(e){const t=Oe(e)?e.get():e;return n=t,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?t.toValue():t;var n}const Oo=["TopLeft","TopRight","BottomLeft","BottomRight"],Vo=Oo.length,Fo=e=>"string"==typeof e?parseFloat(e):e,zo=e=>"number"==typeof e||gt.test(e);function Bo(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const Uo=$o(0,.5,Ze),Wo=$o(.5,.95,fe);function $o(e,t,n){return r=>r<e?0:r>t?1:n(Y(e,t,r))}function Ho(e,t){e.min=t.min,e.max=t.max}function Go(e,t){Ho(e.x,t.x),Ho(e.y,t.y)}function qo(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Ko(e,t,n,r,o){return e=ao(e-=t,1/n,r),void 0!==o&&(e=ao(e,1/o,r)),e}function Xo(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=wn(s.min,s.max,t/100)-s.min),"number"!=typeof t)return;let a=wn(i.min,i.max,r);e===i&&(a-=t),e.min=Ko(e.min,t,n,a,o),e.max=Ko(e.max,t,n,a,o)}(e,t[n],t[r],t[o],t.scale,i,s)}const Yo=["x","scaleX","originX"],Zo=["y","scaleY","originY"];function Jo(e,t,n,r){Xo(e.x,t,Yo,n?n.x:void 0,r?r.x:void 0),Xo(e.y,t,Zo,n?n.y:void 0,r?r.y:void 0)}function Qo(e){return 0===e.translate&&1===e.scale}function ei(e){return Qo(e.x)&&Qo(e.y)}function ti(e,t){return e.min===t.min&&e.max===t.max}function ni(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ri(e,t){return ni(e.x,t.x)&&ni(e.y,t.y)}function oi(e){return Ur(e.x)/Ur(e.y)}function ii(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class si{constructor(){this.members=[]}add(e){Pe(this.members,e),e.scheduleRender()}remove(e){if(Ae(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 ai={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},li="undefined"!=typeof window&&void 0!==window.MotionDebug,ci=["","X","Y","Z"],ui={visibility:"hidden"};let di=0;function hi(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function pi(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Be(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ee,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&pi(r)}function mi({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=di++,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,li&&(ai.totalNodes=ai.resolvedTargetDeltas=ai.recalculatedProjection=0),this.nodes.forEach(vi),this.nodes.forEach(_i),this.nodes.forEach(Ti),this.nodes.forEach(yi),li&&window.MotionDebug.record(ai)},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 Lo)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Ne),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=Re.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(ke(r),e(i-t))};return Ee.read(r,!0),()=>ke(r)}(r,250),_o.hasAnimatedSinceResize&&(_o.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()||Ni,{onLayoutAnimationStart:i,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!ri(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={...B(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(Si),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&&pi(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(xi);this.isUpdating||this.nodes.forEach(wi),this.isUpdating=!1,this.nodes.forEach(Ei),this.nodes.forEach(fi),this.nodes.forEach(gi),this.clearAllSnapshots();const e=Re.now();_e.delta=tt(0,1e3/60,e-_e.timestamp),_e.timestamp=e,_e.isProcessing=!0,Te.update.process(_e),Te.preRender.process(_e),Te.render.process(_e),_e.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Po.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(bi),this.sharedNodes.forEach(Ci)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ee.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ee.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&&!ei(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,i=r!==this.prevTransformTemplateValue;e&&(t||oo(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)),Di((r=n).x),Di(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(Ii)){const{scroll:e}=this.root;e&&(mo(n.x,e.offset.x),mo(n.y,e.offset.y))}return n}removeElementScroll(e){var t;const n={x:{min:0,max:0},y:{min:0,max:0}};if(Go(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&&Go(n,e),mo(n.x,o.offset.x),mo(n.y,o.offset.y))}return n}applyTransform(e,t=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Go(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&&go(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),oo(r.latestValues)&&go(n,r.latestValues)}return oo(this.latestValues)&&go(n,this.latestValues),n}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};Go(t,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];if(!n.instance)continue;if(!oo(n.latestValues))continue;ro(n.latestValues)&&n.updateSnapshot();const r=Qr();Go(r,n.measurePageBox()),Jo(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return oo(this.latestValues)&&Jo(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!==_e.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=_e.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}},qr(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),Go(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,Hr(s.x,a.x,l.x),Hr(s.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Go(this.target,this.layout.layoutBox),uo(this.target,this.targetDelta)):Go(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}},qr(this.relativeTargetOrigin,this.target,e.target),Go(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}li&&ai.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!ro(this.parent.latestValues)&&!io(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===_e.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;Go(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&&go(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,uo(e,s)),r&&oo(i.latestValues)&&go(e,i.latestValues))}t.x<po&&t.x>ho&&(t.x=1),t.y<po&&t.y>ho&&(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?(qo(this.prevProjectionDelta.x,this.projectionDelta.x),qo(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),$r(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===s&&this.treeScale.y===a&&ii(this.projectionDelta.x,this.prevProjectionDelta.x)&&ii(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),li&&ai.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(Ai));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;Ri(i.x,e.x,n),Ri(i.y,e.y,n),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(qr(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 ti(e.x,t.x)&&ti(e.y,t.y)}(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),Go(d,this.relativeTarget)),a&&(this.animationValues=o,function(e,t,n,r,o,i){o?(e.opacity=wn(0,void 0!==n.opacity?n.opacity:1,Uo(r)),e.opacityExit=wn(void 0!==t.opacity?t.opacity:1,0,Wo(r))):i&&(e.opacity=wn(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let o=0;o<Vo;o++){const i=`border${Oo[o]}Radius`;let s=Bo(t,i),a=Bo(n,i);void 0===s&&void 0===a||(s||(s=0),a||(a=0),0===s||0===a||zo(s)===zo(a)?(e[i]=Math.max(wn(Fo(s),Fo(a),r),0),(ft.test(a)||ft.test(s))&&(e[i]+="%")):e[i]=a)}(t.rotate||n.rotate)&&(e.rotate=wn(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=Ee.update(()=>{_o.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=Oe(0)?0:Le(0);return r.start(mr("",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&&Li(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=Ur(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=Ur(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Go(t,n),go(t,o),$r(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new si),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&&hi("z",e,r,this.animationValues);for(let t=0;t<ci.length;t++)hi(`rotate${ci[t]}`,e,r,this.animationValues),hi(`skew${ci[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 ui;const r={visibility:""},o=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=Io(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=Io(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!oo(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 Ro){if(void 0===s[e])continue;const{correct:t,applyTo:n}=Ro[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?Io(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(xi),this.root.sharedNodes.clear()}}}function fi(e){e.updateLayout()}function gi(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?eo(e=>{const r=i?n.measuredBox[e]:n.layoutBox[e],o=Ur(r);r.min=t[e].min,r.max=r.min+o}):Li(o,n.layoutBox,t)&&eo(r=>{const o=i?n.measuredBox[r]:n.layoutBox[r],s=Ur(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}};$r(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?$r(a,e.applyTransform(r,!0),n.measuredBox):$r(a,t,n.layoutBox);const l=!ei(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}};qr(s,n.layoutBox,o.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};qr(a,t,i.layoutBox),ri(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 vi(e){li&&ai.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 yi(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function bi(e){e.clearSnapshot()}function xi(e){e.clearMeasurements()}function wi(e){e.isLayoutDirty=!1}function Ei(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 _i(e){e.resolveTargetDelta()}function Ti(e){e.calcProjection()}function Si(e){e.resetSkewAndRotation()}function Ci(e){e.removeLeadSnapshot()}function Ri(e,t,n){e.translate=wn(t.translate,0,n),e.scale=wn(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Pi(e,t,n,r){e.min=wn(t.min,n.min,r),e.max=wn(t.max,n.max,r)}function Ai(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const Ni={duration:.45,ease:[.4,0,.1,1]},Mi=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ji=Mi("applewebkit/")&&!Mi("chrome/")?Math.round:fe;function Di(e){e.min=ji(e.min),e.max=ji(e.max)}function Li(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=oi(t),o=oi(n),!(Math.abs(r-o)<=.2));var r,o}function Ii(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}const Oi=mi({attachResizeListener:(e,t)=>Ar(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Vi={current:void 0},Fi=mi({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Vi.current){const e=new Oi({});e.mount(window),e.setOptions({layoutScroll:!0}),Vi.current=e}return Vi.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),zi={pan:{Feature:class extends Cr{constructor(){super(...arguments),this.removePointerDownListener=fe}onPointerDown(e){this.session=new Dr(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:yo(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Eo(e),onStart:Eo(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&Ee.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=Mr(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 Cr{constructor(e){super(e),this.removeGroupControls=fe,this.removeListeners=fe,this.controls=new xo(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:Fi,MeasureLayout:Mo}};function Bi(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const o=r["onHover"+n];o&&Ee.postRender(()=>o(t,Nr(t)))}function Ui(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&&Ee.postRender(()=>o(t,Nr(t)))}const Wi=new WeakMap,$i=new WeakMap,Hi=e=>{const t=Wi.get(e.target);t&&t(e)},Gi=e=>{e.forEach(Hi)};const qi={some:0,all:1},Ki={inView:{Feature:class extends Cr{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:qi[r]};return function(e,t,n){const r=function({root:e,...t}){const n=e||document;$i.has(n)||$i.set(n,{});const r=$i.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(Gi,{root:e,...t})),r[o]}(t);return Wi.set(e,n),r.observe(e),()=>{Wi.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 Cr{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[r,o,i]=oe(e,n),s=e=>{const r=e.currentTarget;if(!he(e)||ce.has(r))return;ce.add(r);const i=t(e),s=(e,t)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),he(e)&&ce.has(r)&&(ce.delete(r),"function"==typeof i&&i(e,{success:t}))},a=e=>{s(e,n.useGlobalTarget||se(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 le.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=ue(()=>{if(ce.has(n))return;de(n,"down");const e=ue(()=>{de(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>de(n,"cancel"),t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)})(e,o),o)}),i}(e,e=>(Ui(this.node,e,"Start"),(e,{success:t})=>Ui(this.node,e,t?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends Cr{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=An(Ar(this.node.current,"focus",()=>this.onFocus()),Ar(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends Cr{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[r,o,i]=oe(e,n),s=ie(e=>{const{target:n}=e,r=t(e);if("function"!=typeof r||!n)return;const i=ie(e=>{r(e),n.removeEventListener("pointerleave",i)});n.addEventListener("pointerleave",i,o)});return r.forEach(e=>{e.addEventListener("pointerenter",s,o)}),i}(e,e=>(Bi(this.node,e,"Start"),e=>Bi(this.node,e,"End"))))}unmount(){}}}},Xi={layout:{ProjectionNode:Fi,MeasureLayout:Mo}},Yi=(0,t.createContext)({strict:!1}),Zi=(0,t.createContext)({});function Ji(e){return R(e.animate)||I.some(t=>N(e[t]))}function Qi(e){return Boolean(Ji(e)||e.variants)}function es(e){return Array.isArray(e)?e.join(" "):e}const ts={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"]},ns={};for(const e in ts)ns[e]={isEnabled:t=>ts[e].some(e=>!!t[e])};const rs=Symbol.for("motionComponentSymbol");function os(e,n,r){return(0,t.useCallback)(t=>{t&&e.onMount&&e.onMount(t),n&&(t?n.mount(t):n.unmount()),r&&("function"==typeof r?r(t):Br(r)&&(r.current=t))},[n])}function is(e,n,r,o,i){var s,a;const{visualElement:l}=(0,t.useContext)(Zi),c=(0,t.useContext)(Yi),u=(0,t.useContext)(f),d=(0,t.useContext)(g).reducedMotion,h=(0,t.useRef)(null);o=o||c.renderer,!h.current&&o&&(h.current=o(e,{visualState:n,parent:l,props:r,presenceContext:u,blockInitialAnimation:!!u&&!1===u.initial,reducedMotionConfig:d}));const p=h.current,m=(0,t.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:ss(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:Boolean(s)||a&&Br(a),visualElement:e,animationType:"string"==typeof i?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}(h.current,r,i,m);const v=(0,t.useRef)(!1);(0,t.useInsertionEffect)(()=>{p&&v.current&&p.update(r,u)});const y=r[ze],b=(0,t.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,t.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 ss(e){if(e)return!1!==e.options.allowProjection?e.projection:ss(e.parent)}function as({preloadedFeatures:e,createVisualElement:n,useRender:r,useVisualState:o,Component:i}){var s,a;function l(e,s){let a;const l={...(0,t.useContext)(g),...e,layoutId:ls(e)},{isStatic:c}=l,u=function(e){const{initial:n,animate:r}=function(e,t){if(Ji(e)){const{initial:t,animate:n}=e;return{initial:!1===t||N(t)?t:void 0,animate:N(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,t.useContext)(Zi));return(0,t.useMemo)(()=>({initial:n,animate:r}),[es(n),es(r)])}(e),d=o(e,c);if(!c&&_){(0,t.useContext)(Yi).strict;const e=function(e){const{drag:t,layout:n}=ns;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=e.MeasureLayout,u.visualElement=is(i,d,l,n,e.ProjectionNode)}return(0,h.jsxs)(Zi.Provider,{value:u,children:[a&&u.visualElement?(0,h.jsx)(a,{visualElement:u.visualElement,...l}):null,r(i,e,os(d,u.visualElement,s),d,c,u.visualElement)]})}e&&function(e){for(const t in e)ns[t]={...ns[t],...e[t]}}(e),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,t.forwardRef)(l);return c[rs]=i,c}function ls({layoutId:e}){const n=(0,t.useContext)(p).id;return n&&void 0!==e?n+"-"+e:e}const cs=["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 us(e){return"string"==typeof e&&!e.includes("-")&&!!(cs.indexOf(e)>-1||/[A-Z]/u.test(e))}const ds=e=>(n,r)=>{const o=(0,t.useContext)(Zi),i=(0,t.useContext)(f),s=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const s={latestValues:hs(r,o,i,e),renderState:t()};return n&&(s.onMount=e=>n({props:r,current:e,...s}),s.onUpdate=e=>n(e)),s}(e,n,o,i);return r?s():m(s)};function hs(e,t,n,r){const o={},i=r(e,{});for(const e in i)o[e]=Io(i[e]);let{initial:s,animate:a}=e;const l=Ji(e),c=Qi(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&&!R(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=j(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 ps=(e,t)=>t&&"number"==typeof e?t.transform(e):e,ms={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},fs=ge.length;function gs(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(ve.has(e))s=!0;else if(sn(e))o[e]=n;else{const t=ps(n,Vt[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=ge[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=ps(a,Vt[s]);l||(o=!1,r+=`${ms[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 vs={offset:"stroke-dashoffset",array:"stroke-dasharray"},ys={offset:"strokeDashoffset",array:"strokeDasharray"};function bs(e,t,n){return"string"==typeof e?e:gt.transform(t+n*e)}function xs(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(gs(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:m}=e;h.transform&&(m&&(p.transform=h.transform),delete h.transform),m&&(void 0!==o||void 0!==i||p.transform)&&(p.transformOrigin=function(e,t,n){return`${bs(t,e.x,e.width)} ${bs(n,e.y,e.height)}`}(m,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?vs:ys;e[i.offset]=gt.transform(-r);const s=gt.transform(t),a=gt.transform(n);e[i.array]=`${s} ${a}`}(h,s,a,l,!1)}const ws=e=>"string"==typeof e&&"svg"===e.toLowerCase();function Es(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 _s(e,t,n,r){Es(e,t,void 0,r);for(const n in t.attrs)e.setAttribute(ks.has(n)?n:Fe(n),t.attrs[n])}function Ts(e,{layout:t,layoutId:n}){return ve.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!Ro[e]||"opacity"===e)}function Ss(e,t,n){var r;const{style:o}=e,i={};for(const s in o)(Oe(o[s])||t.style&&Oe(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 Cs(e,t,n){const r=Ss(e,t,n);for(const n in e)(Oe(e[n])||Oe(t[n]))&&(r[-1!==ge.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]);return r}const Rs=["x","y","width","height","cx","cy","r"],Ps={useVisualState:ds({scrapeMotionValuesFromProps:Cs,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(ve.has(e)){i=!0;break}if(!i)return;let s=!t;if(t)for(let n=0;n<Rs.length;n++){const r=Rs[n];e[r]!==t[r]&&(s=!0)}s&&Ee.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),Ee.render(()=>{xs(r,o,ws(n.tagName),e.transformTemplate),_s(n,r)})})}})},As={useVisualState:ds({scrapeMotionValuesFromProps:Ss,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{}})})};function Ns(e,t,n){for(const r in t)Oe(t[r])||Ts(r,n)||(e[r]=t[r])}function Ms(e,n){const r={},o=function(e,n){const r={};return Ns(r,e.style||{},e),Object.assign(r,function({transformTemplate:e},n){return(0,t.useMemo)(()=>{const t={style:{},transform:{},transformOrigin:{},vars:{}};return gs(t,n,e),Object.assign({},t.vars,t.style)},[n])}(e,n)),r}(e,n);return e.drag&&!1!==e.dragListener&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=o,r}const js=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 Ds(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||js.has(e)}let Ls=e=>!Ds(e);try{(Is=require("@emotion/is-prop-valid").default)&&(Ls=e=>e.startsWith("on")?!Ds(e):Is(e))}catch(e){}var Is;function Os(e,n,r,o){const i=(0,t.useMemo)(()=>{const t={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return xs(t,n,ws(o),e.transformTemplate),{...t.attrs,style:{...t.style}}},[n]);if(e.style){const t={};Ns(t,e.style,e),i.style={...t,...i.style}}return i}function Vs(e=!1){return(n,r,o,{latestValues:i},s)=>{const a=(us(n)?Os:Ms)(r,i,s,n),l=function(e,t,n){const r={};for(const o in e)"values"===o&&"object"==typeof e.values||(Ls(o)||!0===n&&Ds(o)||!t&&!Ds(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(r,"string"==typeof n,e),c=n!==t.Fragment?{...l,...a,ref:o}:{},{children:u}=r,d=(0,t.useMemo)(()=>Oe(u)?u.get():u,[u]);return(0,t.createElement)(n,{...c,children:d})}}function Fs(e,t){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){return as({...us(n)?Ps:As,preloadedFeatures:e,useRender:Vs(r),createVisualElement:t,Component:n})}}const zs={current:null},Bs={current:!1},Us=[...pn,wt,At],Ws=new WeakMap,$s=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Hs{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=en,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=Re.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,Ee.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=Ji(t),this.isVariantNode=Qi(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]&&Oe(t)&&t.set(a[e],!1)}}mount(e){this.current=e,Ws.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)),Bs.current||function(){if(Bs.current=!0,_)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>zs.current=e.matches;e.addListener(t),t()}else zs.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||zs.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Ws.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=ve.has(e),r=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&Ee.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 ns){const t=ns[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<$s.length;t++){const n=$s[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(Oe(o))e.addValue(r,o);else if(Oe(i))e.addValue(r,Le(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,Le(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=Le(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&&(rn(r)||Qe(r))?r=parseFloat(r):(o=r,!Us.find(hn(o))&&At.test(t)&&(r=Bt(e,t))),this.setBaseTarget(e,Oe(r)?r.get():r)),Oe(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=j(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||Oe(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 Ne),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class Gs extends Hs{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;Oe(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}class qs extends Gs{constructor(){super(...arguments),this.type="html",this.renderInstance=Es}readValueFromInstance(e,t){if(ve.has(t)){const e=zt(t);return e&&e.default||0}{const r=(n=e,window.getComputedStyle(n)),o=(sn(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return vo(e,t)}build(e,t,n){gs(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Ss(e,t,n)}}class Ks extends Gs{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Qr}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(ve.has(t)){const e=zt(t);return e&&e.default||0}return t=ks.has(t)?t:Fe(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Cs(e,t,n)}build(e,t,n){xs(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){_s(e,t,0,r)}mount(e){this.isSVGTag=ws(e.tagName),super.mount(e)}}const Xs=C(Fs({...Pr,...Ki,...zi,...Xi},(e,n)=>us(e)?new Ks(n):new qs(n,{allowProjection:e!==t.Fragment}))),Ys=e=>{const t=ea(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),Zs(n,t)||Qs(e)},getConflictingClassGroupIds:(e,t)=>{const o=n[e]||[];return t&&r[e]?[...o,...r[e]]:o}}},Zs=(e,t)=>{if(0===e.length)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Zs(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},Js=/^\[(.+)\]$/,Qs=e=>{if(Js.test(e)){const t=Js.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},ea=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return oa(Object.entries(e.classGroups),n).forEach(([e,n])=>{ta(n,r,e,t)}),r},ta=(e,t,n,r)=>{e.forEach(e=>{if("string"!=typeof e)return"function"==typeof e?ra(e)?void ta(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n}):void Object.entries(e).forEach(([e,o])=>{ta(o,na(t,e),n,r)});(""===e?t:na(t,e)).classGroupId=n})},na=(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},ra=e=>e.isThemeGetter,oa=(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,ia=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)}}},sa=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},aa=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},la=/\s+/;function ca(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=ua(e))&&(r&&(r+=" "),r+=t);return r}const ua=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ua(e[r]))&&(n&&(n+=" "),n+=t);return n};function da(e,...t){let n,r,o,i=function(a){const l=t.reduce((e,t)=>t(e),e());return n=(e=>({cache:ia(e.cacheSize),parseClassName:sa(e),...Ys(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(la);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 m=aa(l).join(":"),f=c?m+"!":m,g=f+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(f+t)}a=t+(a.length>0?" "+a:a)}return a})(e,n);return o(e,i),i}return function(){return i(ca.apply(null,arguments))}}const ha=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},pa=/^\[(?:([a-z-]+):)?(.+)\]$/i,ma=/^\d+\/\d+$/,fa=new Set(["px","full","screen"]),ga=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,va=/\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$/,ya=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ba=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,xa=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,wa=e=>ka(e)||fa.has(e)||ma.test(e),Ea=e=>Ia(e,"length",Oa),ka=e=>Boolean(e)&&!Number.isNaN(Number(e)),_a=e=>Ia(e,"number",ka),Ta=e=>Boolean(e)&&Number.isInteger(Number(e)),Sa=e=>e.endsWith("%")&&ka(e.slice(0,-1)),Ca=e=>pa.test(e),Ra=e=>ga.test(e),Pa=new Set(["length","size","percentage"]),Aa=e=>Ia(e,Pa,Va),Na=e=>Ia(e,"position",Va),Ma=new Set(["image","url"]),ja=e=>Ia(e,Ma,za),Da=e=>Ia(e,"",Fa),La=()=>!0,Ia=(e,t,n)=>{const r=pa.exec(e);return!!r&&(r[1]?"string"==typeof t?r[1]===t:t.has(r[1]):n(r[2]))},Oa=e=>va.test(e)&&!ya.test(e),Va=()=>!1,Fa=e=>ba.test(e),za=e=>xa.test(e),Ba=(Symbol.toStringTag,()=>{const e=ha("colors"),t=ha("spacing"),n=ha("blur"),r=ha("brightness"),o=ha("borderColor"),i=ha("borderRadius"),s=ha("borderSpacing"),a=ha("borderWidth"),l=ha("contrast"),c=ha("grayscale"),u=ha("hueRotate"),d=ha("invert"),h=ha("gap"),p=ha("gradientColorStops"),m=ha("gradientColorStopPositions"),f=ha("inset"),g=ha("margin"),v=ha("opacity"),y=ha("padding"),b=ha("saturate"),x=ha("scale"),w=ha("sepia"),E=ha("skew"),k=ha("space"),_=ha("translate"),T=()=>["auto",Ca,t],S=()=>[Ca,t],C=()=>["",wa,Ea],R=()=>["auto",ka,Ca],P=()=>["","0",Ca],A=()=>[ka,Ca];return{cacheSize:500,separator:":",theme:{colors:[La],spacing:[wa,Ea],blur:["none","",Ra,Ca],brightness:A(),borderColor:[e],borderRadius:["none","","full",Ra,Ca],borderSpacing:S(),borderWidth:C(),contrast:A(),grayscale:P(),hueRotate:A(),invert:P(),gap:S(),gradientColorStops:[e],gradientColorStopPositions:[Sa,Ea],inset:T(),margin:T(),opacity:A(),padding:S(),saturate:A(),scale:A(),sepia:P(),skew:A(),space:S(),translate:S()},classGroups:{aspect:[{aspect:["auto","square","video",Ca]}],container:["container"],columns:[{columns:[Ra]}],"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",Ca]}],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:[f]}],"inset-x":[{"inset-x":[f]}],"inset-y":[{"inset-y":[f]}],start:[{start:[f]}],end:[{end:[f]}],top:[{top:[f]}],right:[{right:[f]}],bottom:[{bottom:[f]}],left:[{left:[f]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ta,Ca]}],basis:[{basis:T()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ca]}],grow:[{grow:P()}],shrink:[{shrink:P()}],order:[{order:["first","last","none",Ta,Ca]}],"grid-cols":[{"grid-cols":[La]}],"col-start-end":[{col:["auto",{span:["full",Ta,Ca]},Ca]}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":[La]}],"row-start-end":[{row:["auto",{span:[Ta,Ca]},Ca]}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ca]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ca]}],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":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ca,t]}],"min-w":[{"min-w":[Ca,t,"min","max","fit"]}],"max-w":[{"max-w":[Ca,t,"none","full","min","max","fit","prose",{screen:[Ra]},Ra]}],h:[{h:[Ca,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ca,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ca,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ca,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ra,Ea]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",_a]}],"font-family":[{font:[La]}],"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",Ca]}],"line-clamp":[{"line-clamp":["none",ka,_a]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",wa,Ca]}],"list-image":[{"list-image":["none",Ca]}],"list-style-type":[{list:["none","disc","decimal",Ca]}],"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",wa,Ea]}],"underline-offset":[{"underline-offset":["auto",wa,Ca]}],"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",Ca]}],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",Ca]}],"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",Na]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Aa]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ja]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"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":[wa,Ca]}],"outline-w":[{outline:[wa,Ea]}],"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":[wa,Ea]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ra,Da]}],"shadow-color":[{shadow:[La]}],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",Ra,Ca]}],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",Ca]}],duration:[{duration:A()}],ease:[{ease:["linear","in","out","in-out",Ca]}],delay:[{delay:A()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ca]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[Ta,Ca]}],"translate-x":[{"translate-x":[_]}],"translate-y":[{"translate-y":[_]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ca]}],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",Ca]}],"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",Ca]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[wa,Ea,_a]}],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"]}}}),Ua=da(Ba);function Wa(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=Wa(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function $a(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Wa(e))&&(r&&(r+=" "),r+=t);return r}const Ha=(...e)=>Ua($a(...e)),Ga=(...e)=>(...t)=>e.forEach(e=>e?.(...t)),qa=(...e)=>e.filter((e,t,n)=>Boolean(e)&&n.indexOf(e)===t).join(" ");var Ka={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 Xa=(0,t.forwardRef)(({color:e="currentColor",size:n=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:i="",children:s,iconNode:a,...l},c)=>(0,t.createElement)("svg",{ref:c,...Ka,width:n,height:n,stroke:e,strokeWidth:o?24*Number(r)/Number(n):r,className:qa("lucide",i),...l},[...a.map(([e,n])=>(0,t.createElement)(e,n)),...Array.isArray(s)?s:[s]])),Ya=(e,n)=>{const r=(0,t.forwardRef)(({className:r,...o},i)=>{return(0,t.createElement)(Xa,{ref:i,iconNode:n,className:qa(`lucide-${s=e,s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,r),...o});var s});return r.displayName=`${e}`,r},Za=Ya("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Ja=window.ReactDOM,Qa=(0,t.createContext)({}),el=()=>(0,t.useContext)(Qa),tl={open:{opacity:1},exit:{opacity:0}},nl={duration:.2},rl=({open:e,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!==e&&void 0!==n,[d,p]=(0,t.useState)(!1),m=(0,t.useRef)(null),f=(0,t.useRef)(null),g=(0,t.useMemo)(()=>u?e:d,[e,d]),v=(0,t.useMemo)(()=>u?n:p,[p,p]),y=()=>{g||v(!0)},b=()=>{g&&v(!1)},x=(0,t.useCallback)(()=>(0,t.isValidElement)(o)?(0,t.cloneElement)(o,{onClick:Ga(y,o?.props?.onClick)}):"function"==typeof o?o({onClick:y}):null,[o,y,b]),w=e=>{"Escape"===e.key&&a&&b()},E=e=>{s&&m.current&&!m.current.contains(e.target)&&b()};return(0,t.useEffect)(()=>(window.addEventListener("keydown",w),document.addEventListener("mousedown",E),()=>{window.removeEventListener("keydown",w),document.removeEventListener("mousedown",E)}),[g]),(0,t.useEffect)(()=>{if(!c)return;const e=document.querySelector("html");return g&&e&&(e.style.overflow="hidden"),()=>{e&&(e.style.overflow="")}},[g]),(0,h.jsxs)(h.Fragment,{children:[x(),(0,h.jsx)(Qa.Provider,{value:{open:g,setOpen:v,handleClose:b,design:l,dialogContainerRef:f,dialogRef:m},children:(0,h.jsx)("div",{ref:f,className:Ha("fixed z-999999 w-0 h-0 overflow-visible",i),children:r})})]})};rl.displayName="Dialog";const ol=({children:e,className:t})=>{const{open:n,handleClose:r,dialogRef:o}=el();return(0,h.jsx)(S,{children:n&&(0,h.jsx)(Xs.div,{className:"fixed inset-0 overflow-y-auto",initial:"exit",animate:"open",exit:"exit",variants:tl,role:"dialog",transition:nl,children:(0,h.jsx)("div",{className:"flex items-center justify-center min-h-full",children:(0,h.jsx)("div",{ref:o,className:Ha("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})})})})};ol.displayName="Dialog.Panel";const il=({className:e,...t})=>{const{open:n,dialogContainerRef:r}=el();return r?.current?(0,h.jsx)(h.Fragment,{children:(0,Ja.createPortal)((0,h.jsx)(S,{children:n&&(0,h.jsx)(Xs.div,{className:Ha("fixed inset-0 -z-10 bg-background-inverse/90",e),...t,initial:"exit",animate:"open",exit:"exit",variants:tl,transition:nl})}),r.current)}):null};il.displayName="Dialog.Backdrop";const sl=({children:e,className:t,...n})=>(0,h.jsx)("div",{className:Ha("space-y-2 px-5 pt-5 pb-1",t),...n,children:e});sl.displayName="Dialog.Header";const al=({children:e,as:t="h3",className:n,...r})=>(0,h.jsx)(t,{className:Ha("text-base font-semibold text-text-primary m-0 p-0",n),...r,children:e});al.displayName="Dialog.Title";const ll=({children:e,as:t="p",className:n,...r})=>(0,h.jsx)(t,{className:Ha("text-sm font-normal text-text-secondary my-0 ml-0 mr-1 p-0",n),...r,children:e});ll.displayName="Dialog.Description";const cl=({className:e,...t})=>(0,h.jsx)("button",{className:Ha("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,h.jsx)(Za,{className:"size-4 text-text-primary shrink-0"})}),ul=({children:e,as:n=t.Fragment,...r})=>{const{handleClose:o}=el();return e?n===t.Fragment?"function"==typeof e?e({close:o}):(0,t.cloneElement)(e,{onClick:o}):(0,h.jsx)(n,{...r,onClick:o,children:e}):(0,h.jsx)(cl,{onClick:o,...r})};ul.displayName="Dialog.CloseButton";const dl=({children:e,className:t,...n})=>(0,h.jsx)("div",{className:Ha("px-5",t),...n,children:e});dl.displayName="Dialog.Body";const hl=({children:e,className:t})=>{const{design:n,handleClose:r}=el();return(0,h.jsx)("div",{className:Ha("p-4 flex justify-end gap-3",{"bg-background-secondary":"footer-divided"===n},t),children:e?"function"==typeof e?e({close:r}):e:null})};hl.displayName="Dialog.Footer",rl.Panel=ol,rl.Title=al,rl.Description=ll,rl.CloseButton=ul,rl.Header=sl,rl.Body=dl,rl.Footer=hl,rl.Backdrop=il;const pl=(0,t.forwardRef)((e,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:d=null,iconPosition:p="left",loading:m=!1,...f}=e,g=u&&"focus:ring-focus-error",v=m?"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,E=null,k="";return d&&(k="flex items-center justify-center","left"===p?w=d:E=d),(0,h.jsxs)(s,{ref:n,type:i,className:Ha(k,"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,...f,children:[(0,h.jsx)(t.Fragment,{children:w},"left-icon"),l?(0,h.jsx)("span",{className:"px-1",children:l}):null,(0,h.jsx)(t.Fragment,{children:E},"right-icon")]})});pl.displayName="Button";const ml=({showDialog:t,setShowDialog:n,version:o,product:i})=>(0,e.createElement)(rl,{design:"simple",open:t,setOpen:n,exitOnEsc:!0,scrollLock:!0,exitOnClickOutside:!0},(0,e.createElement)(rl.Backdrop,null),(0,e.createElement)(rl.Panel,{className:"gap-0"},(0,e.createElement)(rl.Header,null,(0,e.createElement)("div",{className:"flex items-center justify-between"},(0,e.createElement)(rl.Title,null,(0,r.__)("Rollback to Previous Version","astra-addon")),(0,e.createElement)(rl.CloseButton,null)),(0,e.createElement)(rl.Description,null,(0,r.sprintf)((0,r.__)("Are you sure you want to rollback to %1$s %2$s?","astra-addon"),i===astra_addon_admin.rollback_plugin_name?astra_addon_admin.addon_name:astra_admin.theme_name,o))),(0,e.createElement)(rl.Footer,null,(0,e.createElement)(pl,{onClick:()=>{let e="";e=i===astra_addon_admin.rollback_plugin_name?astra_addon_admin.addon_rollback_url.replace("VERSION",o):astra_addon_admin.theme_rollback_url.replace("VERSION",o),n(!1),window.location.href=e}},(0,r.__)("Rollback","astra-addon")),(0,e.createElement)(pl,{className:"text-text-primary hover:bg-button-secondary",variant:"secondary",onClick:()=>{n(!t)}},(0,r.__)("Cancel","astra-addon"))))),fl={400:"font-normal",500:"font-medium",600:"font-semibold",700:"font-bold"},gl={36:"text-4xl",30:"text-3xl",24:"text-2xl",20:"text-xl",18:"text-lg",16:"text-base",14:"text-sm",12:"text-xs"},vl={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"},yl={2:"tracking-2"},bl={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"},xl=(0,t.forwardRef)(function({as:e,children:t,weight:n,size:r,lineHeight:o,letterSpacing:i,color:s="primary",className:a,...l},c){return(0,h.jsx)(e||"p",{ref:c,className:Ha("m-0 p-0",n?fl[n]:"",r?gl[r]:"",o?vl[o]:"",i?yl[i]:"",s?bl[s]:"",a),...l,children:t})});function wl(){return"undefined"!=typeof window}function El(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 _l(e){var t;return null==(t=(Tl(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Tl(e){return!!wl()&&(e instanceof Node||e instanceof kl(e).Node)}function Sl(e){return!!wl()&&(e instanceof Element||e instanceof kl(e).Element)}function Cl(e){return!!wl()&&(e instanceof HTMLElement||e instanceof kl(e).HTMLElement)}function Rl(e){return!(!wl()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof kl(e).ShadowRoot)}const Pl=new Set(["inline","contents"]);function Al(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ul(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Pl.has(o)}const Nl=new Set(["table","td","th"]);function Ml(e){return Nl.has(El(e))}const jl=[":popover-open",":modal"];function Dl(e){return jl.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const Ll=["transform","translate","scale","rotate","perspective"],Il=["transform","translate","scale","rotate","perspective","filter"],Ol=["paint","layout","strict","content"];function Vl(e){const t=Fl(),n=Sl(e)?Ul(e):e;return Ll.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||Il.some(e=>(n.willChange||"").includes(e))||Ol.some(e=>(n.contain||"").includes(e))}function Fl(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const zl=new Set(["html","body","#document"]);function Bl(e){return zl.has(El(e))}function Ul(e){return kl(e).getComputedStyle(e)}function Wl(e){return Sl(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function $l(e){if("html"===El(e))return e;const t=e.assignedSlot||e.parentNode||Rl(e)&&e.host||_l(e);return Rl(t)?t.host:t}function Hl(e){const t=$l(e);return Bl(t)?e.ownerDocument?e.ownerDocument.body:e.body:Cl(t)&&Al(t)?t:Hl(t)}function Gl(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Hl(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),s=kl(o);if(i){const e=ql(s);return t.concat(s,s.visualViewport||[],Al(o)?o:[],e&&n?Gl(e):[])}return t.concat(o,Gl(o,[],n))}function ql(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Kl(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 Xl(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Rl(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Yl(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function Zl(){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 Jl(e){return!(0!==e.mozInputSource||!e.isTrusted)||(tc()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function Ql(e){return!Zl().includes("jsdom/")&&(!tc()&&0===e.width&&0===e.height||tc()&&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 ec(){return/apple/i.test(navigator.vendor)}function tc(){const e=/android/i;return e.test(Yl())||e.test(Zl())}function nc(){return Yl().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function rc(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function oc(e){return(null==e?void 0:e.ownerDocument)||document}function ic(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 sc(e){return"composedPath"in e?e.composedPath()[0]:e.target}function ac(e){return Cl(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}function lc(e){e.preventDefault(),e.stopPropagation()}function cc(e){return!!e&&"combobox"===e.getAttribute("role")&&ac(e)}const uc=Math.min,dc=Math.max,hc=Math.round,pc=Math.floor,mc=e=>({x:e,y:e}),fc={left:"right",right:"left",bottom:"top",top:"bottom"},gc={start:"end",end:"start"};function vc(e,t,n){return dc(e,uc(t,n))}function yc(e,t){return"function"==typeof e?e(t):e}function bc(e){return e.split("-")[0]}function xc(e){return e.split("-")[1]}function wc(e){return"x"===e?"y":"x"}function Ec(e){return"y"===e?"height":"width"}const kc=new Set(["top","bottom"]);function _c(e){return kc.has(bc(e))?"y":"x"}function Tc(e){return wc(_c(e))}function Sc(e){return e.replace(/start|end/g,e=>gc[e])}const Cc=["left","right"],Rc=["right","left"],Pc=["top","bottom"],Ac=["bottom","top"];function Nc(e){return e.replace(/left|right|bottom|top/g,e=>fc[e])}function Mc(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 jc(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 Dc=["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(","),Lc="undefined"==typeof Element,Ic=Lc?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Oc=!Lc&&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},Vc=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]"):Vc(e.parentNode))},Fc=function(e,t,n){for(var r=[],o=Array.from(e);o.length;){var i=o.shift();if(!Vc(i,!1))if("SLOT"===i.tagName){var s=i.assignedElements(),a=s.length?s:i.children,l=Fc(a,!0,n);n.flatten?r.push.apply(r,l):r.push({scopeParent:i,candidates:l})}else{Ic.call(i,Dc)&&n.filter(i)&&(t||!e.includes(i))&&r.push(i);var c=i.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(i),u=!Vc(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(i));if(c&&u){var d=Fc(!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},zc=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Bc=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))&&!zc(e)?0:e.tabIndex},Uc=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Wc=function(e){return"INPUT"===e.tagName},$c=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},Hc=function(e,t){return!(t.disabled||function(e){return Wc(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=Ic.call(e,"details>summary:first-of-type")?e.parentElement:e;if(Ic.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"full-native"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return $c(e)}else{if("function"==typeof r){for(var i=e;e;){var s=e.parentElement,a=Oc(e);if(s&&!s.shadowRoot&&!0===r(s))return $c(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&&Oc(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=Oc(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!!Ic.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},Gc=function(e,t){return!(function(e){return function(e){return Wc(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||Oc(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)||Bc(t)<0||!Hc(e,t))},qc=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Kc=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=Bc(e);return n<0&&t&&!zc(e)?0:n}(i,o),a=o?Kc(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(Uc).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},Xc=function(e,t){var n;return n=(t=t||{}).getShadowRoot?Fc([e],t.includeContainer,{filter:Gc.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:qc}):function(e,t,n){if(Vc(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Dc));return t&&Ic.call(e,Dc)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,Gc.bind(null,t)),Kc(n)};function Yc(e,t,n){let{reference:r,floating:o}=e;const i=_c(t),s=Tc(t),a=Ec(s),l=bc(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(xc(t)){case"start":p[s]-=h*(n&&c?-1:1);break;case"end":p[s]+=h*(n&&c?-1:1)}return p}async function Zc(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}=yc(t,e),m=Mc(p),f=a[h?"floating"===d?"reference":"floating":d],g=jc(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(f)))||n?f:f.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=jc(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:y,strategy:l}):v);return{top:(g.top-x.top+m.top)/b.y,bottom:(x.bottom-g.bottom+m.bottom)/b.y,left:(g.left-x.left+m.left)/b.x,right:(x.right-g.right+m.right)/b.x}}const Jc=new Set(["left","top"]);function Qc(e){const t=Ul(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Cl(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=hc(n)!==i||hc(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function eu(e){return Sl(e)?e:e.contextElement}function tu(e){const t=eu(e);if(!Cl(t))return mc(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Qc(t);let s=(i?hc(n.width):n.width)/r,a=(i?hc(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const nu=mc(0);function ru(e){const t=kl(e);return Fl()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:nu}function ou(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=eu(e);let s=mc(1);t&&(r?Sl(r)&&(s=tu(r)):s=tu(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==kl(e))&&t}(i,n,r)?ru(i):mc(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&&Sl(r)?kl(r):r;let n=e,o=ql(n);for(;o&&r&&t!==n;){const e=tu(o),t=o.getBoundingClientRect(),r=Ul(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=ql(n)}}return jc({width:u,height:d,x:l,y:c})}function iu(e,t){const n=Wl(e).scrollLeft;return t?t.left+n:ou(_l(e)).left+n}function su(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-iu(e,n),y:n.top+t.scrollTop}}const au=new Set(["absolute","fixed"]);function lu(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=kl(e),r=_l(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=Fl();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}const c=iu(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=_l(e),n=Wl(e),r=e.ownerDocument.body,o=dc(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=dc(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+iu(e);const a=-n.scrollTop;return"rtl"===Ul(r).direction&&(s+=dc(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}(_l(e));else if(Sl(t))r=function(e,t){const n=ou(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Cl(e)?tu(e):mc(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=ru(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return jc(r)}function cu(e,t){const n=$l(e);return!(n===t||!Sl(n)||Bl(n))&&("fixed"===Ul(n).position||cu(n,t))}function uu(e,t,n){const r=Cl(t),o=_l(t),i="fixed"===n,s=ou(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=mc(0);function c(){l.x=iu(o)}if(r||!r&&!i)if(("body"!==El(t)||Al(o))&&(a=Wl(t)),r){const e=ou(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?mc(0):su(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 du(e){return"static"===Ul(e).position}function hu(e,t){if(!Cl(e)||"fixed"===Ul(e).position)return null;if(t)return t(e);let n=e.offsetParent;return _l(e)===n&&(n=n.ownerDocument.body),n}function pu(e,t){const n=kl(e);if(Dl(e))return n;if(!Cl(e)){let t=$l(e);for(;t&&!Bl(t);){if(Sl(t)&&!du(t))return t;t=$l(t)}return n}let r=hu(e,t);for(;r&&Ml(r)&&du(r);)r=hu(r,t);return r&&Bl(r)&&du(r)&&!Vl(r)?n:r||function(e){let t=$l(e);for(;Cl(t)&&!Bl(t);){if(Vl(t))return t;if(Dl(t))return null;t=$l(t)}return null}(e)||n}const mu={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,s=_l(r),a=!!t&&Dl(t.floating);if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=mc(1);const u=mc(0),d=Cl(r);if((d||!d&&!i)&&(("body"!==El(r)||Al(s))&&(l=Wl(r)),Cl(r))){const e=ou(r);c=tu(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const h=!s||d||i?mc(0):su(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:_l,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?Dl(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Gl(e,[],!1).filter(e=>Sl(e)&&"body"!==El(e)),o=null;const i="fixed"===Ul(e).position;let s=i?$l(e):e;for(;Sl(s)&&!Bl(s);){const t=Ul(s),n=Vl(s);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&au.has(o.position)||Al(s)&&!n&&cu(e,s))?r=r.filter(e=>e!==s):o=t,s=$l(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=i[0],a=i.reduce((e,n)=>{const r=lu(t,n,o);return e.top=dc(r.top,e.top),e.right=uc(r.right,e.right),e.bottom=uc(r.bottom,e.bottom),e.left=dc(r.left,e.left),e},lu(t,s,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:pu,getElementRects:async function(e){const t=this.getOffsetParent||pu,n=this.getDimensions,r=await n(e.floating);return{reference:uu(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}=Qc(e);return{width:t,height:n}},getScale:tu,isElement:Sl,isRTL:function(e){return"rtl"===Ul(e).direction}};function fu(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function gu(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=eu(e),u=o||i?[...c?Gl(c):[],...Gl(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=_l(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 m={rootMargin:-pc(d)+"px "+-pc(o.clientWidth-(u+h))+"px "+-pc(o.clientHeight-(d+p))+"px "+-pc(u)+"px",threshold:dc(0,uc(1,l))||1};let f=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!f)return s();r?s(!1,r):n=setTimeout(()=>{s(!1,1e-7)},1e3)}1!==r||fu(c,e.getBoundingClientRect())||s(),f=!1}try{r=new IntersectionObserver(g,{...m,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,m)}r.observe(e)}(!0),i}(c,n):null;let h,p=-1,m=null;s&&(m=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),n()}),c&&!l&&m.observe(c),m.observe(t));let f=l?ou(e):null;return l&&function t(){const r=ou(e);f&&!fu(f,r)&&n(),f=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=m)||e.disconnect(),m=null,l&&cancelAnimationFrame(h)}}const vu=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=bc(n),a=xc(n),l="y"===_c(n),c=Jc.has(s)?-1:1,u=i&&l?-1:1,d=yc(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&"number"==typeof m&&(p="end"===a?-1*m:m),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}}}}},yu=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}=yc(e,t),u={x:n,y:r},d=await i.detectOverflow(t,c),h=_c(bc(o)),p=wc(h);let m=u[p],f=u[h];if(s){const e="y"===p?"bottom":"right";m=vc(m+d["y"===p?"top":"left"],m,m-d[e])}if(a){const e="y"===h?"bottom":"right";f=vc(f+d["y"===h?"top":"left"],f,f-d[e])}const g=l.fn({...t,[p]:m,[h]:f});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:s,[h]:a}}}}}},bu=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:m="none",flipAlignment:f=!0,...g}=yc(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=bc(o),y=_c(a),b=bc(a)===a,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=h||(b||!f?[Nc(a)]:function(e){const t=Nc(e);return[Sc(e),t,Sc(t)]}(a)),E="none"!==m;!h&&E&&w.push(...function(e,t,n,r){const o=xc(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?Rc:Cc:t?Cc:Rc;case"left":case"right":return t?Pc:Ac;default:return[]}}(bc(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(Sc)))),i}(a,f,m,x));const k=[a,...w],_=await l.detectOverflow(t,g),T=[];let S=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&T.push(_[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=xc(e),o=Tc(e),i=Ec(o);let s="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Nc(s)),[s,Nc(s)]}(o,s,x);T.push(_[e[0]],_[e[1]])}if(S=[...S,{placement:o,overflows:T}],!T.every(e=>e<=0)){var C,R;const e=((null==(C=i.flip)?void 0:C.index)||0)+1,t=k[e];if(t&&("alignment"!==d||y===_c(t)||S.every(e=>_c(e.placement)!==y||e.overflows[0]>0)))return{data:{index:e,overflows:S},reset:{placement:t}};let n=null==(R=S.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:R.placement;if(!n)switch(p){case"bestFit":{var P;const e=null==(P=S.filter(e=>{if(E){const t=_c(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:P[0];e&&(n=e);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},xu=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}=yc(e,t),u=await s.detectOverflow(t,c),d=bc(o),h=xc(o),p="y"===_c(o),{width:m,height:f}=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=f-u.top-u.bottom,b=m-u.left-u.right,x=uc(f-u[g],y),w=uc(m-u[v],b),E=!t.middlewareData.shift;let k=x,_=w;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(_=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(k=y),E&&!h){const e=dc(u.left,0),t=dc(u.right,0),n=dc(u.top,0),r=dc(u.bottom,0);p?_=m-2*(0!==e||0!==t?e+t:dc(u.left,u.right)):k=f-2*(0!==n||0!==r?n+r:dc(u.top,u.bottom))}await l({...t,availableWidth:_,availableHeight:k});const T=await s.getDimensions(a.floating);return m!==T.width||f!==T.height?{reset:{rects:!0}}:{}}}},wu=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}=yc(e,t)||{};if(null==c)return{};const d=Mc(u),h={x:n,y:r},p=Tc(o),m=Ec(p),f=await s.getDimensions(c),g="y"===p,v=g?"top":"left",y=g?"bottom":"right",b=g?"clientHeight":"clientWidth",x=i.reference[m]+i.reference[p]-h[p]-i.floating[m],w=h[p]-i.reference[p],E=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let k=E?E[b]:0;k&&await(null==s.isElement?void 0:s.isElement(E))||(k=a.floating[b]||i.floating[m]);const _=x/2-w/2,T=k/2-f[m]/2-1,S=uc(d[v],T),C=uc(d[y],T),R=S,P=k-f[m]-C,A=k/2-f[m]/2+_,N=vc(R,A,P),M=!l.arrow&&null!=xc(o)&&A!==N&&i.reference[m]/2-(A<R?S:C)-f[m]/2<0,j=M?A<R?A-R:A-P:0;return{[p]:h[p]+j,data:{[p]:N,centerOffset:A-N-j,...M&&{alignmentOffset:j}},reset:M}}}),Eu=(e,t,n)=>{const r=new Map,o={platform:mu,...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}=Yc(c,r,l),h=r,p={},m=0;for(let n=0;n<a.length;n++){var f;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!=(f=s.detectOverflow)?f:Zc},elements:{reference:e,floating:t}});u=null!=v?v:u,d=null!=y?y:d,p={...p,[i]:{...p[i],...b}},x&&m<=50&&(m++,"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}=Yc(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?t.useLayoutEffect:function(){};function _u(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(!_u(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||_u(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 Su(e,t){const n=Tu(e);return Math.round(t*n)/n}function Cu(e){const n=t.useRef(e);return ku(()=>{n.current=e}),n}const Ru=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?wu({element:n.current,padding:r}).fn(t):{}:n?wu({element:n,padding:r}).fn(t):{};var o}}),Pu=(e,t)=>({...vu(e),options:[e,t]}),Au=(e,t)=>({...bu(e),options:[e,t]}),Nu=(e,t)=>({...Ru(e),options:[e,t]}),Mu={...n},ju=Mu.useInsertionEffect||(e=>e());function Du(e){const n=t.useRef(()=>{});return ju(()=>{n.current=e}),t.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 Lu="ArrowUp",Iu="ArrowDown",Ou="ArrowLeft",Vu="ArrowRight";function Fu(e,t,n){return Math.floor(e/t)!==n}function zu(e,t){return t<0||t>=e.current.length}function Bu(e,t){return Wu(e,{disabledIndices:t})}function Uu(e,t){return Wu(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Wu(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&&Gu(s,a,o));return a}function $u(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 Hu(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function Gu(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 qu="undefined"!=typeof document?t.useLayoutEffect:t.useEffect;function Ku(){return Ku=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},Ku.apply(this,arguments)}let Xu=!1,Yu=0;const Zu=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Yu++,Ju=Mu.useId||function(){const[e,n]=t.useState(()=>Xu?Zu():void 0);return qu(()=>{null==e&&n(Zu())},[]),t.useEffect(()=>{Xu=!0},[]),e},Qu=t.forwardRef(function(e,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:m,...f}={},...g}=e,v=Ju(),[y,b]=t.useState(!1);if(qu(()=>{o&&"rtl"===Ul(o).direction&&b(!0)},[o]),!o)return null;const[x,w]=r.split("-"),E="top"===x||"bottom"===x;let k=d;(E&&null!=s&&s.x||!E&&null!=s&&s.y)&&(k=null);const _=2*u,T=_/2,S=a/2*(c/-8+1),C=l/2*c/4,R=!!p,P=k&&"end"===w?"bottom":"top";let A=k&&"end"===w?"right":"left";k&&y&&(A="end"===w?"left":"right");const N=null!=(null==i?void 0:i.x)?k||i.x:"",M=null!=(null==i?void 0:i.y)?k||i.y:"",j=p||"M0,0 H"+a+" L"+(a-S)+","+(l-C)+" Q"+a/2+","+l+" "+S+","+(l-C)+" Z",D={top:R?"rotate(180deg)":"",left:R?"rotate(90deg)":"rotate(-90deg)",bottom:R?"":"rotate(180deg)",right:R?"rotate(-90deg)":"rotate(90deg)"}[x];return t.createElement("svg",Ku({},g,{"aria-hidden":!0,ref:n,width:R?a:a+_,height:a,viewBox:"0 0 "+a+" "+(l>a?l:a),style:{position:"absolute",pointerEvents:"none",[A]:N,[P]:M,[x]:E||R?"100%":"calc(100% - "+_/2+"px)",transform:[D,m].filter(e=>!!e).join(" "),...f}}),_>0&&t.createElement("path",{clipPath:"url(#"+v+")",fill:"none",stroke:h,strokeWidth:_+(p?0:1),d:j}),t.createElement("path",{stroke:_&&!p?g.fill:"none",d:j}),t.createElement("clipPath",{id:v},t.createElement("rect",{x:-T,y:T*(R?-1:1),width:a+_,height:a})))});const ed=t.createContext(null),td=t.createContext(null),nd=()=>{var e;return(null==(e=t.useContext(ed))?void 0:e.id)||null},rd=()=>t.useContext(td);function od(e){return"data-floating-ui-"+e}function id(e){const n=(0,t.useRef)(e);return qu(()=>{n.current=e}),n}const sd=od("safe-polygon");function ad(e,t,n){return n&&!rc(n)?0:"number"==typeof e?e:null==e?void 0:e[t]}let ld=0;function cd(e,t){void 0===t&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(ld);const i=()=>null==e?void 0:e.focus({preventScroll:n});o?i():ld=requestAnimationFrame(i)}function ud(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 dd=new WeakMap,hd=new WeakSet,pd={},md=0;const fd=e=>e&&(e.host||fd(e.parentNode));function gd(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=oc(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=[];pd[o]||(pd[o]=new WeakMap);const d=pd[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"!==El(t))if(l.has(t))e(t);else{const e=i?t.getAttribute(i):null,n=null!==e&&"false"!==e,r=(dd.get(t)||0)+1,s=(d.get(t)||0)+1;dd.set(t,r),d.set(t,s),u.push(t),1===r&&n&&hd.add(t),1===s&&t.setAttribute(o,""),!n&&i&&t.setAttribute(i,"true")}})}(t),l.clear(),md++,()=>{u.forEach(e=>{const t=(dd.get(e)||0)-1,n=(d.get(e)||0)-1;dd.set(e,t),d.set(e,n),t||(!hd.has(e)&&i&&e.removeAttribute(i),hd.delete(e)),n||e.removeAttribute(o)}),md--,md||(dd=new WeakMap,dd=new WeakMap,hd=new WeakSet,pd={})}}(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const vd=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function yd(e,t){const n=Xc(e,vd());"prev"===t&&n.reverse();const r=n.indexOf(Kl(oc(e)));return n.slice(r+1)[0]}function bd(){return yd(document.body,"next")}function xd(){return yd(document.body,"prev")}function wd(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Xl(n,r)}function Ed(e){Xc(e,vd()).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 _d={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 Sd=t.forwardRef(function(e,n){const[r,o]=t.useState();qu(()=>(ec()&&o("button"),document.addEventListener("keydown",Td),()=>{document.removeEventListener("keydown",Td)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":!r||void 0,[od("focus-guard")]:"",style:_d};return t.createElement("span",Ku({},e,i))}),Cd=t.createContext(null),Rd=od("portal");function Pd(e){const{children:n,id:r,root:o,preserveTabOrder:i=!0}=e,s=function(e){void 0===e&&(e={});const{id:n,root:r}=e,o=Ju(),i=Ad(),[s,a]=t.useState(null),l=t.useRef(null);return qu(()=>()=>{null==s||s.remove(),queueMicrotask(()=>{l.current=null})},[s]),qu(()=>{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(Rd,""),e.appendChild(t),l.current=t,a(t)},[n,o]),qu(()=>{if(null===r)return;if(!o)return;if(l.current)return;let e=r||(null==i?void 0:i.portalNode);e&&!Sl(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(Rd,""),e=t||e,e.appendChild(s),l.current=s,a(s)},[n,r,o,i]),s}({id:r,root:o}),[a,l]=t.useState(null),c=t.useRef(null),u=t.useRef(null),d=t.useRef(null),h=t.useRef(null),p=null==a?void 0:a.modal,m=null==a?void 0:a.open,f=!!a&&!a.modal&&a.open&&i&&!(!o&&!s);return t.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&&wd(e)&&("focusin"===e.type?kd:Ed)(s)}},[s,i,p]),t.useEffect(()=>{s&&(m||kd(s))},[m,s]),t.createElement(Cd.Provider,{value:t.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:c,afterOutsideRef:u,beforeInsideRef:d,afterInsideRef:h,portalNode:s,setFocusManagerState:l}),[i,s])},f&&s&&t.createElement(Sd,{"data-type":"outside",ref:c,onFocus:e=>{if(wd(e,s)){var t;null==(t=d.current)||t.focus()}else{const e=xd()||(null==a?void 0:a.refs.domReference.current);null==e||e.focus()}}}),f&&s&&t.createElement("span",{"aria-owns":s.id,style:_d}),s&&Ja.createPortal(n,s),f&&s&&t.createElement(Sd,{"data-type":"outside",ref:u,onFocus:e=>{if(wd(e,s)){var t;null==(t=h.current)||t.focus()}else{const t=bd()||(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 Ad=()=>t.useContext(Cd),Nd="data-floating-ui-focusable";function Md(e){return e?e.hasAttribute(Nd)?e:e.querySelector("["+Nd+"]")||e:null}let jd=[];function Dd(e){jd=jd.filter(e=>e.isConnected);let t=e;if(t&&"body"!==El(t)){if(!function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==Ic.call(e,Dc)&&Gc(t,e)}(t,vd())){const e=Xc(t,vd())[0];e&&(t=e)}jd.push(t),jd.length>20&&(jd=jd.slice(-20))}}function Ld(){return jd.slice().reverse().find(e=>e.isConnected)}const Id=t.forwardRef(function(e,n){return t.createElement("button",Ku({},e,{type:"button",ref:n,tabIndex:-1,style:_d}))});function Od(e){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}=e,{open:p,refs:m,nodeId:f,onOpenChange:g,events:v,dataRef:y,floatingId:b,elements:{domReference:x,floating:w}}=n,E="number"==typeof a&&a<0,k=cc(x)&&E,_="undefined"==typeof HTMLElement||!("inert"in HTMLElement.prototype)||s,T=id(i),S=id(a),C=id(l),R=rd(),P=Ad(),A=t.useRef(null),N=t.useRef(null),M=t.useRef(!1),j=t.useRef(!1),D=t.useRef(-1),L=null!=P,I=Md(w),O=Du(function(e){return void 0===e&&(e=I),e?Xc(e,vd()):[]}),V=Du(e=>{const t=O(e);return T.current.map(e=>x&&"reference"===e?x:I&&"floating"===e?I:t).filter(Boolean).flat()});function F(e){return!o&&d&&u?t.createElement(Id,{ref:"start"===e?A:N,onClick:e=>g(!1,e.nativeEvent)},"string"==typeof d?d:"Dismiss"):null}t.useEffect(()=>{if(o)return;if(!u)return;function e(e){if("Tab"===e.key){Xl(I,Kl(oc(I)))&&0===O().length&&!k&&lc(e);const t=V(),n=sc(e);"reference"===T.current[0]&&n===x&&(lc(e),e.shiftKey?cd(t[t.length-1]):cd(t[1])),"floating"===T.current[1]&&n===I&&e.shiftKey&&(lc(e),cd(t[0]))}}const t=oc(I);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}},[o,x,I,u,T,k,O,V]),t.useEffect(()=>{if(!o&&w)return w.addEventListener("focusin",e),()=>{w.removeEventListener("focusin",e)};function e(e){const t=sc(e),n=O().indexOf(t);-1!==n&&(D.current=n)}},[o,w,O]),t.useEffect(()=>{if(!o&&h)return w&&Cl(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(){j.current=!0,setTimeout(()=>{j.current=!1})}function t(e){const t=e.relatedTarget;queueMicrotask(()=>{const n=!(Xl(x,t)||Xl(w,t)||Xl(t,w)||Xl(null==P?void 0:P.portalNode,t)||null!=t&&t.hasAttribute(od("focus-guard"))||R&&(ud(R.nodesRef.current,f).find(e=>{var n,r;return Xl(null==(n=e.context)?void 0:n.elements.floating,t)||Xl(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}(R.nodesRef.current,f).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&&Kl(oc(I))===oc(I).body){Cl(I)&&I.focus();const e=D.current,t=O(),n=t[e]||t[t.length-1]||I;Cl(n)&&n.focus()}!k&&u||!t||!n||j.current||t===Ld()||(M.current=!0,g(!1,e,"focus-out"))})}},[o,x,w,I,u,f,R,P,g,h,c,O,k]),t.useEffect(()=>{var e;if(o)return;const t=Array.from((null==P||null==(e=P.portalNode)?void 0:e.querySelectorAll("["+od("portal")+"]"))||[]);if(w){const e=[w,...t,A.current,N.current,T.current.includes("reference")||k?x:null].filter(e=>null!=e),n=u||k?gd(e,_,!_):gd(e);return()=>{n()}}},[o,x,w,u,T,P,k,_]),qu(()=>{if(o||!Cl(I))return;const e=Kl(oc(I));queueMicrotask(()=>{const t=V(I),n=S.current,r=("number"==typeof n?t[n]:n.current)||I,o=Xl(I,e);E||o||!p||cd(r,{preventScroll:r===I})})},[o,p,I,E,V,S]),qu(()=>{if(o||!I)return;let e=!1;const t=oc(I),n=Kl(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&&m.domReference.current&&Dd(m.domReference.current),"hover"===o&&"mouseleave"===i.type&&(M.current=!0),"outside-press"===o&&(s?(M.current=!1,e=!0):M.current=!(Jl(i)||Ql(i)))}Dd(n),v.on("openchange",i);const s=t.createElement("span");return s.setAttribute("tabindex","-1"),s.setAttribute("aria-hidden","true"),Object.assign(s.style,_d),L&&x&&x.insertAdjacentElement("afterend",s),()=>{v.off("openchange",i);const n=Kl(t),o=Xl(w,n)||R&&ud(R.nodesRef.current,f).some(e=>{var t;return Xl(null==(t=e.context)?void 0:t.elements.floating,n)});(o||r&&["click","mousedown"].includes(r.type))&&m.domReference.current&&Dd(m.domReference.current);const a="boolean"==typeof C.current?Ld()||s:C.current.current||s;queueMicrotask(()=>{C.current&&!M.current&&Cl(a)&&(a===n||n===t.body||o)&&a.focus({preventScroll:e}),s.remove()})}},[o,w,I,C,y,m,v,R,f,L,x]),t.useEffect(()=>{queueMicrotask(()=>{M.current=!1})},[o]),qu(()=>{if(!o&&P)return P.setFocusManagerState({modal:u,closeOnFocusOut:h,open:p,onOpenChange:g,refs:m}),()=>{P.setFocusManagerState(null)}},[o,P,u,p,g,m,h]),qu(()=>{if(o)return;if(!I)return;if("function"!=typeof MutationObserver)return;if(E)return;const e=()=>{const e=I.getAttribute("tabindex"),t=O(),n=Kl(oc(w)),r=t.indexOf(n);-1!==r&&(D.current=r),T.current.includes("floating")||n!==m.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,m,T,O,E]);const z=!o&&_&&(!u||!k)&&(L||u);return t.createElement(t.Fragment,null,z&&t.createElement(Sd,{"data-type":"inside",ref:null==P?void 0:P.beforeInsideRef,onFocus:e=>{if(u){const e=V();cd("reference"===i[0]?e[0]:e[e.length-1])}else if(null!=P&&P.preserveTabOrder&&P.portalNode)if(M.current=!1,wd(e,P.portalNode)){const e=bd()||x;null==e||e.focus()}else{var t;null==(t=P.beforeOutsideRef.current)||t.focus()}}}),!k&&F("start"),r,F("end"),z&&t.createElement(Sd,{"data-type":"inside",ref:null==P?void 0:P.afterInsideRef,onFocus:e=>{if(u)cd(V()[0]);else if(null!=P&&P.preserveTabOrder&&P.portalNode)if(h&&(M.current=!0),wd(e,P.portalNode)){const e=xd()||x;null==e||e.focus()}else{var t;null==(t=P.afterOutsideRef.current)||t.focus()}}}))}function Vd(e){return Cl(e.target)&&"BUTTON"===e.target.tagName}function Fd(e){return ac(e)}function zd(e,n){void 0===n&&(n={});const{open:r,onOpenChange:o,dataRef:i,elements:{domReference:s}}=e,{enabled:a=!0,event:l="click",toggle:c=!0,ignoreMouse:u=!1,keyboardHandlers:d=!0,stickIfOpen:h=!0}=n,p=t.useRef(),m=t.useRef(!1),f=t.useMemo(()=>({onPointerDown(e){p.current=e.pointerType},onMouseDown(e){const t=p.current;0===e.button&&"click"!==l&&(rc(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:rc(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||Vd(e)||(" "!==e.key||Fd(s)||(e.preventDefault(),m.current=!0),"Enter"===e.key&&o(!r||!c,e.nativeEvent,"click"))},onKeyUp(e){e.defaultPrevented||!d||Vd(e)||Fd(s)||" "===e.key&&m.current&&(m.current=!1,o(!r||!c,e.nativeEvent,"click"))}}),[i,s,l,u,d,o,r,h,c]);return t.useMemo(()=>a?{reference:f}:{},[a,f])}const Bd={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Ud={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Wd=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 $d(e,n){void 0===n&&(n={});const{open:r,onOpenChange:o,elements:i,dataRef:s}=e,{enabled:a=!0,escapeKey:l=!0,outsidePress:c=!0,outsidePressEvent:u="pointerdown",referencePress:d=!1,referencePressEvent:h="pointerdown",ancestorScroll:p=!1,bubbles:m,capture:f}=n,g=rd(),v=Du("function"==typeof c?c:()=>!1),y="function"==typeof c?v:c,b=t.useRef(!1),x=t.useRef(!1),{escapeKey:w,outsidePress:E}=Wd(m),{escapeKey:k,outsidePress:_}=Wd(f),T=t.useRef(!1),S=Du(e=>{var t;if(!r||!a||!l||"Escape"!==e.key)return;if(T.current)return;const n=null==(t=s.current.floatingContext)?void 0:t.nodeId,i=g?ud(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=Du(e=>{var t;const n=()=>{var t;S(e),null==(t=sc(e))||t.removeEventListener("keydown",n)};null==(t=sc(e))||t.addEventListener("keydown",n)}),R=Du(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=sc(e),l="["+od("inert")+"]",c=oc(i.floating).querySelectorAll(l);let d=Sl(a)?a:null;for(;d&&!Bl(d);){const e=$l(d);if(Bl(e)||!Sl(e))break;d=e}if(c.length&&Sl(a)&&!a.matches("html,body")&&!Xl(a,i.floating)&&Array.from(c).every(e=>!Xl(d,e)))return;if(Cl(a)&&N){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"===Ul(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&&ud(g.nodesRef.current,h).some(t=>{var n;return ic(e,null==(n=t.context)?void 0:n.elements.floating)});if(ic(e,i.floating)||ic(e,i.domReference)||p)return;const m=g?ud(g.nodesRef.current,h):[];if(m.length>0){let e=!0;if(m.forEach(t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)}),!e)return}o(!1,e,"outside-press")}),P=Du(e=>{var t;const n=()=>{var t;R(e),null==(t=sc(e))||t.removeEventListener(u,n)};null==(t=sc(e))||t.addEventListener(u,n)});t.useEffect(()=>{if(!r||!a)return;s.current.__escapeKeyBubbles=w,s.current.__outsidePressBubbles=E;let e=-1;function t(e){o(!1,e,"ancestor-scroll")}function n(){window.clearTimeout(e),T.current=!0}function c(){e=window.setTimeout(()=>{T.current=!1},Fl()?5:0)}const d=oc(i.floating);l&&(d.addEventListener("keydown",k?C:S,k),d.addEventListener("compositionstart",n),d.addEventListener("compositionend",c)),y&&d.addEventListener(u,_?P:R,_);let h=[];return p&&(Sl(i.domReference)&&(h=Gl(i.domReference)),Sl(i.floating)&&(h=h.concat(Gl(i.floating))),!Sl(i.reference)&&i.reference&&i.reference.contextElement&&(h=h.concat(Gl(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",k?C:S,k),d.removeEventListener("compositionstart",n),d.removeEventListener("compositionend",c)),y&&d.removeEventListener(u,_?P:R,_),h.forEach(e=>{e.removeEventListener("scroll",t)}),window.clearTimeout(e)}},[s,i,l,y,u,r,o,p,a,w,E,S,k,C,R,_,P]),t.useEffect(()=>{b.current=!1},[y,u]);const A=t.useMemo(()=>({onKeyDown:S,[Bd[h]]:e=>{d&&o(!1,e.nativeEvent,"reference-press")}}),[S,o,d,h]),N=t.useMemo(()=>({onKeyDown:S,onMouseDown(){x.current=!0},onMouseUp(){x.current=!0},[Ud[u]]:()=>{b.current=!0}}),[S,u]);return t.useMemo(()=>a?{reference:A,floating:N}:{},[a,A,N])}function Hd(e){void 0===e&&(e={});const{nodeId:n}=e,r=function(e){const{open:n=!1,onOpenChange:r,elements:o}=e,i=Ju(),s=t.useRef({}),[a]=t.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!=nd(),[c,u]=t.useState(o.reference),d=Du((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=t.useMemo(()=>({setPositionReference:u}),[]),p=t.useMemo(()=>({reference:c||o.reference||null,floating:o.floating||null,domReference:o.reference}),[c,o.reference,o.floating]);return t.useMemo(()=>({dataRef:s,open:n,onOpenChange:d,elements:p,events:a,floatingId:i,refs:h}),[n,d,p,a,i,h])}({...e,elements:{reference:null,floating:null,...e.elements}}),o=e.rootContext||r,i=o.elements,[s,a]=t.useState(null),[l,c]=t.useState(null),u=(null==i?void 0:i.domReference)||s,d=t.useRef(null),h=rd();qu(()=>{u&&(d.current=u)},[u]);const p=function(e){void 0===e&&(e={});const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:s,floating:a}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,h]=t.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[p,m]=t.useState(o);_u(p,o)||m(o);const[f,g]=t.useState(null),[v,y]=t.useState(null),b=t.useCallback(e=>{e!==k.current&&(k.current=e,g(e))},[]),x=t.useCallback(e=>{e!==_.current&&(_.current=e,y(e))},[]),w=s||f,E=a||v,k=t.useRef(null),_=t.useRef(null),T=t.useRef(d),S=null!=c,C=Cu(c),R=Cu(i),P=Cu(u),A=t.useCallback(()=>{if(!k.current||!_.current)return;const e={placement:n,strategy:r,middleware:p};R.current&&(e.platform=R.current),Eu(k.current,_.current,e).then(e=>{const t={...e,isPositioned:!1!==P.current};N.current&&!_u(T.current,t)&&(T.current=t,Ja.flushSync(()=>{h(t)}))})},[p,n,r,R,P]);ku(()=>{!1===u&&T.current.isPositioned&&(T.current.isPositioned=!1,h(e=>({...e,isPositioned:!1})))},[u]);const N=t.useRef(!1);ku(()=>(N.current=!0,()=>{N.current=!1}),[]),ku(()=>{if(w&&(k.current=w),E&&(_.current=E),w&&E){if(C.current)return C.current(w,E,A);A()}},[w,E,A,C,S]);const M=t.useMemo(()=>({reference:k,floating:_,setReference:b,setFloating:x}),[b,x]),j=t.useMemo(()=>({reference:w,floating:E}),[w,E]),D=t.useMemo(()=>{const e={position:r,left:0,top:0};if(!j.floating)return e;const t=Su(j.floating,d.x),n=Su(j.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+n+"px)",...Tu(j.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,l,j.floating,d.x,d.y]);return t.useMemo(()=>({...d,update:A,refs:M,elements:j,floatingStyles:D}),[d,A,M,j,D])}({...e,elements:{...i,...l&&{reference:l}}}),m=t.useCallback(e=>{const t=Sl(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;c(t),p.refs.setReference(t)},[p.refs]),f=t.useCallback(e=>{(Sl(e)||null===e)&&(d.current=e,a(e)),(Sl(p.refs.reference.current)||null===p.refs.reference.current||null!==e&&!Sl(e))&&p.refs.setReference(e)},[p.refs]),g=t.useMemo(()=>({...p.refs,setReference:f,setPositionReference:m,domReference:d}),[p.refs,f,m]),v=t.useMemo(()=>({...p.elements,domReference:u}),[p.elements,u]),y=t.useMemo(()=>({...p,...o,refs:g,elements:v,nodeId:n}),[p,g,v,n,o]);return qu(()=>{o.dataRef.current.floatingContext=y;const e=null==h?void 0:h.nodesRef.current.find(e=>e.id===n);e&&(e.context=y)}),t.useMemo(()=>({...p,context:y,refs:g,elements:v}),[p,g,v,y])}const Gd="active",qd="selected";function Kd(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[Gd]:t,[qd]:__,...n}=e;i=n}return{..."floating"===n&&{tabIndex:-1,[Nd]:""},...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&&[Gd,qd].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 Xd(e){void 0===e&&(e=[]);const n=e.map(e=>null==e?void 0:e.reference),r=e.map(e=>null==e?void 0:e.floating),o=e.map(e=>null==e?void 0:e.item),i=t.useCallback(t=>Kd(t,e,"reference"),n),s=t.useCallback(t=>Kd(t,e,"floating"),r),a=t.useCallback(t=>Kd(t,e,"item"),o);return t.useMemo(()=>({getReferenceProps:i,getFloatingProps:s,getItemProps:a}),[i,s,a])}let Yd=!1;function Zd(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Jd(e,t){return Zd(t,e===Lu||e===Iu,e===Ou||e===Vu)}function Qd(e,t,n){return Zd(t,e===Iu,n?e===Ou:e===Vu)||"Enter"===e||" "===e||""===e}function eh(e,t,n){return Zd(t,n?e===Vu:e===Ou,e===Lu)}function th(e,n){const{open:r,onOpenChange:o,elements:i}=e,{listRef:s,activeIndex:a,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:u=null,allowEscape:d=!1,loop:h=!1,nested:p=!1,rtl:m=!1,virtual:f=!1,focusItemOnOpen:g="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:y=!0,disabledIndices:b,orientation:x="vertical",cols:w=1,scrollItemIntoView:E=!0,virtualItemRef:k,itemSizes:_,dense:T=!1}=n,S=id(Md(i.floating)),C=nd(),R=rd(),P=Du(l),A=cc(i.domReference),N=t.useRef(g),M=t.useRef(null!=u?u:-1),j=t.useRef(null),D=t.useRef(!0),L=t.useRef(P),I=t.useRef(!!i.floating),O=t.useRef(r),V=t.useRef(!1),F=t.useRef(!1),z=id(b),B=id(r),U=id(E),W=id(u),[$,H]=t.useState(),[G,q]=t.useState(),K=Du(function(e,t,n){function r(e){f?(H(e.id),null==R||R.events.emit("virtualfocus",e),k&&(k.current=e)):cd(e,{preventScroll:!0,sync:!(!nc()||!ec())&&(Yd||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))})});qu(()=>{document.createElement("div").focus({get preventScroll(){return Yd=!0,!1}})},[]),qu(()=>{c&&(r&&i.floating?N.current&&null!=u&&(F.current=!0,M.current=u,P(u)):I.current&&(M.current=-1,L.current(null)))},[c,r,i.floating,u,P]),qu(()=>{if(c&&r&&i.floating)if(null==a){if(V.current=!1,null!=W.current)return;if(I.current&&(M.current=-1,K(s,M)),(!O.current||!I.current)&&N.current&&(null!=j.current||!0===N.current&&null==j.current)){let e=0;const t=()=>{null==s.current[0]?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e++):(M.current=null==j.current||Qd(j.current,x,m)||p?Bu(s,z.current):Uu(s,z.current),j.current=null,P(M.current))};t()}}else zu(s,a)||(M.current=a,K(s,M,F.current),F.current=!1)},[c,r,i.floating,a,W,p,s,x,m,P,K,z]),qu(()=>{var e;if(!c||i.floating||!R||f||!I.current)return;const t=R.nodesRef.current,n=null==(e=t.find(e=>e.id===C))||null==(e=e.context)?void 0:e.elements.floating,r=Kl(oc(i.floating)),o=t.some(e=>e.context&&Xl(e.context.elements.floating,r));n&&!o&&D.current&&n.focus({preventScroll:!0})},[c,i.floating,R,C,f]),qu(()=>{if(c&&R&&f&&!C)return R.events.on("virtualfocus",e),()=>{R.events.off("virtualfocus",e)};function e(e){q(e.id),k&&(k.current=e)}},[c,R,f,C,k]),qu(()=>{L.current=P,I.current=!!i.floating}),qu(()=>{r||(j.current=null)},[r]),qu(()=>{O.current=r},[r]);const X=null!=a,Y=t.useMemo(()=>{function e(e){if(!r)return;const t=s.current.indexOf(e);-1!==t&&P(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&&(M.current=-1,K(s,M),P(null),f||cd(S.current,{preventScroll:!0}))}}}},[r,S,K,v,s,P,f]),Z=Du(e=>{if(D.current=!1,V.current=!0,229===e.which)return;if(!B.current&&e.currentTarget===S.current)return;if(p&&eh(e.key,x,m))return lc(e),o(!1,e.nativeEvent,"list-navigation"),void(Cl(i.domReference)&&(f?null==R||R.events.emit("virtualfocus",i.domReference):i.domReference.focus()));const t=M.current,n=Bu(s,b),a=Uu(s,b);if(A||("Home"===e.key&&(lc(e),M.current=n,P(M.current)),"End"===e.key&&(lc(e),M.current=a,P(M.current))),w>1){const 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,T),o=r.findIndex(e=>null!=e&&!Gu(s.current,e,b)),i=r.reduce((e,t,n)=>null==t||Gu(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===Lu){if(d&&lc(n),-1===u)h=c;else if(h=Wu(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}zu(e,h)&&(h=u)}if(n.key===Iu&&(d&&lc(n),-1===u?h=l:(h=Wu(e,{startingIndex:u,amount:s,disabledIndices:a}),o&&u+s>c&&(h=Wu(e,{startingIndex:u%s-s,amount:s,disabledIndices:a}))),zu(e,h)&&(h=u)),"both"===r){const t=pc(u/s);n.key===(i?Ou:Vu)&&(d&&lc(n),u%s!==s-1?(h=Wu(e,{startingIndex:u,disabledIndices:a}),o&&Fu(h,s,t)&&(h=Wu(e,{startingIndex:u-u%s-1,disabledIndices:a}))):o&&(h=Wu(e,{startingIndex:u-u%s-1,disabledIndices:a})),Fu(h,s,t)&&(h=u)),n.key===(i?Vu:Ou)&&(d&&lc(n),u%s!==0?(h=Wu(e,{startingIndex:u,decrement:!0,disabledIndices:a}),o&&Fu(h,s,t)&&(h=Wu(e,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:a}))):o&&(h=Wu(e,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:a})),Fu(h,s,t)&&(h=u));const r=pc(c/s)===t;zu(e,h)&&(h=o&&r?n.key===(i?Vu:Ou)?c:Wu(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:m,cols:w,disabledIndices:Hu([...b||s.current.map((e,t)=>Gu(s.current,t)?t:void 0),void 0],r),minIndex:o,maxIndex:i,prevIndex:$u(M.current>a?n:M.current,t,r,w,e.key===Iu?"bl":e.key===(m?Ou:Vu)?"tr":"tl"),stopEvent:!0})];if(null!=l&&(M.current=l,P(M.current)),"both"===x)return}if(Jd(e.key,x)){if(lc(e),r&&!f&&Kl(e.currentTarget.ownerDocument)===e.currentTarget)return M.current=Qd(e.key,x,m)?n:a,void P(M.current);Qd(e.key,x,m)?M.current=h?t>=a?d&&t!==s.current.length?-1:n:Wu(s,{startingIndex:t,disabledIndices:b}):Math.min(a,Wu(s,{startingIndex:t,disabledIndices:b})):M.current=h?t<=n?d&&-1!==t?s.current.length:a:Wu(s,{startingIndex:t,decrement:!0,disabledIndices:b}):Math.max(n,Wu(s,{startingIndex:t,decrement:!0,disabledIndices:b})),zu(s,M.current)?P(null):P(M.current)}}),J=t.useMemo(()=>f&&r&&X&&{"aria-activedescendant":G||$},[f,r,X,G,$]),Q=t.useMemo(()=>({"aria-orientation":"both"===x?void 0:x,...!cc(i.domReference)&&J,onKeyDown:Z,onPointerMove(){D.current=!0}}),[J,Z,i.domReference,x]),ee=t.useMemo(()=>{function e(e){"auto"===g&&Jl(e.nativeEvent)&&(N.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 Zd(t,n?e===Ou:e===Vu,e===Iu)}(e.key,x,m),l=eh(e.key,x,m),c=Jd(e.key,x),d=(p?a:c)||"Enter"===e.key||""===e.key.trim();if(f&&r){const t=null==R?void 0:R.nodesRef.current.find(e=>null==e.parentId),r=R&&t?function(e,t){let n,r=-1;return function t(o,i){i>r&&(n=o,r=i),ud(e,o).forEach(e=>{t(e.id,i+1)})}(t,0),e.find(e=>e.id===n)}(R.nodesRef.current,t.id):null;if(i&&r&&k){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&&(lc(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 lc(e),void(null==(v=r.context.elements.domReference)||v.dispatchEvent(t))}return Z(e)}(r||y||!t)&&(d&&(j.current=p&&c?null:e.key),p?a&&(lc(e),r?(M.current=Bu(s,z.current),P(M.current)):o(!0,e.nativeEvent,"list-navigation")):c&&(null!=u&&(M.current=u),lc(e),!r&&y?o(!0,e.nativeEvent,"list-navigation"):Z(e),r&&P(M.current)))},onFocus(){r&&!f&&P(null)},onPointerDown:function(e){N.current=g,"auto"===g&&Ql(e.nativeEvent)&&(N.current=!0)},onMouseDown:e,onClick:e}},[$,J,Z,z,g,s,p,P,o,r,y,x,m,u,R,f,k]);return t.useMemo(()=>c?{reference:ee,floating:Q,item:Y}:{},[c,ee,Q,Y])}const nh=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function rh(e,n){var r;void 0===n&&(n={});const{open:o,floatingId:i}=e,{enabled:s=!0,role:a="dialog"}=n,l=null!=(r=nh.get(a))?r:a,c=Ju(),u=null!=nd(),d=t.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=t.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=t.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 t.useMemo(()=>s?{reference:d,floating:h,item:p}:{},[s,d,h,p])}const oh=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,t)=>(t?"-":"")+e.toLowerCase());function ih(e,t){return"function"==typeof e?e(t):e}function sh(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 ah(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:m}=e;return function(e){function f(){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=sc(e),x="mouseleave"===e.type,w=Xl(d.floating,b),E=Xl(d.domReference,b),k=d.domReference.getBoundingClientRect(),_=d.floating.getBoundingClientRect(),T=u.split("-")[0],S=n>_.right-_.width/2,C=c>_.bottom-_.height/2,R=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,k),P=_.width>k.width,A=_.height>k.height,N=(P?k:_).left,M=(P?k:_).right,j=(A?k:_).top,D=(A?k:_).bottom;if(w&&(i=!0,!x))return;if(E&&(i=!1),E&&!x)return void(i=!0);if(x&&Sl(e.relatedTarget)&&Xl(d.floating,e.relatedTarget))return;if(m&&ud(m.nodesRef.current,p).some(e=>{let{context:t}=e;return null==t?void 0:t.open}))return;if("top"===T&&c>=k.bottom-1||"bottom"===T&&c<=k.top+1||"left"===T&&n>=k.right-1||"right"===T&&n<=k.left+1)return f();let L=[];switch(T){case"top":L=[[N,k.top+1],[N,_.bottom-1],[M,_.bottom-1],[M,k.top+1]];break;case"bottom":L=[[N,_.top+1],[N,k.bottom-1],[M,k.bottom-1],[M,_.top+1]];break;case"left":L=[[_.right-1,D],[_.right-1,j],[k.left+1,j],[k.left+1,D]];break;case"right":L=[[k.right-1,D],[k.right-1,j],[_.left+1,j],[_.left+1,D]]}if(!sh([g,v],L)){if(i&&!R)return f();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 f()}sh([g,v],function(e){let[n,r]=e;switch(T){case"top":return[[P?n+t/2:S?n+4*t:n-4*t,r+t+1],[P?n-t/2:S?n+4*t:n-4*t,r+t+1],[_.left,S||P?_.bottom-t:_.top],[_.right,S?P?_.bottom-t:_.top:_.bottom-t]];case"bottom":return[[P?n+t/2:S?n+4*t:n-4*t,r-t],[P?n-t/2:S?n+4*t:n-4*t,r-t],[_.left,S||P?_.top+t:_.bottom],[_.right,S?P?_.top+t:_.bottom:_.top+t]];case"left":{const e=[n+t+1,A?r+t/2:C?r+4*t:r-4*t],o=[n+t+1,A?r-t/2:C?r+4*t:r-4*t];return[[C||A?_.right-t:_.left,_.top],[C?A?_.right-t:_.left:_.right-t,_.bottom],e,o]}case"right":return[[n-t,A?r+t/2:C?r+4*t:r-4*t],[n-t,A?r-t/2:C?r+4*t:r-4*t],[C||A?_.left+t:_.right,_.top],[C?A?_.left+t:_.right:_.left+t,_.bottom]]}}([n,c]))?!i&&r&&(o=window.setTimeout(f,40)):f()}}};return c.__options={blockPointerEvents:n},c}const lh=Ya("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),ch=Ya("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),uh=Ya("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"}]]),dh=Ya("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"}]]),hh="light",ph="neutral",mh=({icon:e,theme:n=hh,variant:r=ph})=>{const o="[&>svg]:h-5 [&>svg]:w-5",i=(({theme:e=hh,variant:t=ph})=>{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(e&&(0,t.isValidElement)(e))return(0,t.cloneElement)(e,{className:Ha(o,i,e?.props?.className??"")});const s={neutral:(0,h.jsx)(lh,{className:Ha(o,i)}),info:(0,h.jsx)(lh,{className:Ha(o,i)}),success:(0,h.jsx)(ch,{className:Ha(o,i)}),warning:(0,h.jsx)(uh,{className:Ha(o,i)}),error:(0,h.jsx)(dh,{className:Ha(o,i)})};return s[r]||s.neutral},fh=({actionType:e="button",onAction:t=()=>{},actionLabel:n="",theme:r=hh})=>{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,h.jsx)(pl,{variant:"outline",size:"xs",onClick:t,className:Ha("rounded",o,i,"dark"===r?"bg-transparent hover:bg-transparent":"bg-white hover:bg-white"),children:n});case"link":return(0,h.jsx)(pl,{variant:"link",size:"xs",onClick:t,className:Ha(o,i),children:n});default:return null}},gh=({theme:e=hh,title:t="",inline:n=!1})=>t?(0,h.jsx)("span",{className:Ha("block",{light:"text-text-primary",dark:"text-text-inverse"}[e],"text-sm leading-5 font-semibold",n?"inline":"block"),children:t}):null,vh=({theme:e=hh,content:t="",inline:n=!1})=>t?(0,h.jsx)("span",{className:Ha({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,yh=(...e)=>t=>{e.forEach(e=>{"function"==typeof e?e(t):e&&(e.current=t)})},bh=({variant:e="dark",placement:n="bottom",title:r="",content:o,arrow:i=!1,open:s,setOpen:a,children:l,className:c,tooltipPortalRoot:u,tooltipPortalId:d,boundary:p="clippingAncestors",strategy:m="fixed",offset:f=8,triggers:g=["hover","focus"],interactive:v=!1})=>{const y=(0,t.useMemo)(()=>"boolean"==typeof s&&"function"==typeof a,[s,a]),[b,x]=(0,t.useState)(!1),w=(0,t.useRef)(null),{refs:E,floatingStyles:k,context:_}=Hd({open:y?s:b,onOpenChange:y?a:x,placement:n,strategy:m,middleware:[Pu(f),Au({boundary:p}),(I={boundary:p},{...yu(I),options:[I,void 0]}),Nu({element:w})],whileElementsMounted:gu}),T=zd(_,{enabled:!y&&g.includes("click")}),S=function(e,n){void 0===n&&(n={});const{open:r,onOpenChange:o,dataRef:i,events:s,elements:a}=e,{enabled:l=!0,delay:c=0,handleClose:u=null,mouseOnly:d=!1,restMs:h=0,move:p=!0}=n,m=rd(),f=nd(),g=id(u),v=id(c),y=id(r),b=t.useRef(),x=t.useRef(-1),w=t.useRef(),E=t.useRef(-1),k=t.useRef(!0),_=t.useRef(!1),T=t.useRef(()=>{}),S=t.useRef(!1),C=t.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]);t.useEffect(()=>{if(l)return s.on("openchange",e),()=>{s.off("openchange",e)};function e(e){let{open:t}=e;t||(clearTimeout(x.current),clearTimeout(E.current),k.current=!0,S.current=!1)}},[l,s]),t.useEffect(()=>{if(!l)return;if(!g.current)return;if(!r)return;function e(e){C()&&o(!1,e,"hover")}const t=oc(a.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}},[a.floating,r,o,l,g,C]);const R=t.useCallback(function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");const r=ad(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]),P=Du(()=>{T.current(),w.current=void 0}),A=Du(()=>{if(_.current){const e=oc(a.floating).body;e.style.pointerEvents="",e.removeAttribute(sd),_.current=!1}}),N=Du(()=>!!i.current.openEvent&&["click","mousedown"].includes(i.current.openEvent.type));t.useEffect(()=>{if(l&&Sl(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),k.current=!1,d&&!rc(b.current)||h>0&&!ad(v.current,"open"))return;const t=ad(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(N())return;T.current();const t=oc(a.floating);if(clearTimeout(E.current),S.current=!1,g.current&&i.current.floatingContext){r||clearTimeout(x.current),w.current=g.current({...i.current.floatingContext,tree:m,x:e.clientX,y:e.clientY,onClose(){A(),P(),N()||R(e,!0,"safe-polygon")}});const n=w.current;return t.addEventListener("mousemove",n),void(T.current=()=>{t.removeEventListener("mousemove",n)})}("touch"!==b.current||!Xl(a.floating,e.relatedTarget))&&R(e)}function s(e){N()||i.current.floatingContext&&(null==g.current||g.current({...i.current.floatingContext,tree:m,x:e.clientX,y:e.clientY,onClose(){A(),P(),N()||R(e)}})(e))}},[a,l,e,d,h,p,R,P,A,o,r,y,m,v,g,i,N]),qu(()=>{var e;if(l&&r&&null!=(e=g.current)&&e.__options.blockPointerEvents&&C()){_.current=!0;const e=a.floating;if(Sl(a.domReference)&&e){var t;const n=oc(a.floating).body;n.setAttribute(sd,"");const r=a.domReference,o=null==m||null==(t=m.nodesRef.current.find(e=>e.id===f))||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,f,a,m,g,C]),qu(()=>{r||(b.current=void 0,S.current=!1,P(),A())},[r,P,A]),t.useEffect(()=>()=>{P(),clearTimeout(x.current),clearTimeout(E.current),A()},[l,a.domReference,P,A]);const M=t.useMemo(()=>{function e(e){b.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function n(){k.current||y.current||o(!0,t,"hover")}d&&!rc(b.current)||r||0===h||S.current&&e.movementX**2+e.movementY**2<2||(clearTimeout(E.current),"touch"===b.current?n():(S.current=!0,E.current=window.setTimeout(n,h)))}}},[d,o,r,y,h]),j=t.useMemo(()=>({onMouseEnter(){clearTimeout(x.current)},onMouseLeave(e){N()||R(e.nativeEvent,!1)}}),[R,N]);return t.useMemo(()=>l?{reference:M,floating:j}:{},[l,M,j])}(_,{move:!1,enabled:!y&&g.includes("hover"),...v&&{handleClose:ah()}}),C=function(e,n){void 0===n&&(n={});const{open:r,onOpenChange:o,events:i,dataRef:s,elements:a}=e,{enabled:l=!0,visibleOnly:c=!0}=n,u=t.useRef(!1),d=t.useRef(),h=t.useRef(!0);t.useEffect(()=>{if(!l)return;const e=kl(a.domReference);function t(){!r&&Cl(a.domReference)&&a.domReference===Kl(oc(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]),t.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]),t.useEffect(()=>()=>{clearTimeout(d.current)},[]);const p=t.useMemo(()=>({onPointerDown(e){Ql(e.nativeEvent)||(h.current=!1)},onMouseLeave(){u.current=!1},onFocus(e){if(u.current)return;const t=sc(e.nativeEvent);if(c&&Sl(t))try{if(ec()&&nc())throw Error();if(!t.matches(":focus-visible"))return}catch(e){if(!h.current&&!ac(t))return}o(!0,e.nativeEvent,"focus")},onBlur(e){u.current=!1;const t=e.relatedTarget,n=e.nativeEvent,r=Sl(t)&&t.hasAttribute(od("focus-guard"))&&"outside"===t.getAttribute("data-type");d.current=window.setTimeout(()=>{var e;const i=Kl(a.domReference?a.domReference.ownerDocument:document);(t||i!==a.domReference)&&(Xl(null==(e=s.current.floatingContext)?void 0:e.refs.floating.current,i)||Xl(a.domReference,i)||r||o(!1,n,"focus"))})}}),[s,a.domReference,o,c]);return t.useMemo(()=>l?{reference:p}:{},[l,p])}(_,{enabled:!y&&g.includes("focus")}),R=$d(_),P=rh(_,{role:"tooltip"}),{getReferenceProps:A,getFloatingProps:N}=Xd([T,S,C,R,P]),{isMounted:M,styles:j}=function(e,n){void 0===n&&(n={});const{initial:r={opacity:0},open:o,close:i,common:s,duration:a=250}=n,l=e.placement,c=l.split("-")[0],u=t.useMemo(()=>({side:c,placement:l}),[c,l]),d="number"==typeof a,h=(d?a:a.open)||0,p=(d?a:a.close)||0,[m,f]=t.useState(()=>({...ih(s,u),...ih(r,u)})),{isMounted:g,status:v}=function(e,n){void 0===n&&(n={});const{open:r,elements:{floating:o}}=e,{duration:i=250}=n,s=("number"==typeof i?i:i.close)||0,[a,l]=t.useState("unmounted"),c=function(e,n){const[r,o]=t.useState(e);return e&&!r&&o(!0),t.useEffect(()=>{if(!e&&r){const e=setTimeout(()=>o(!1),n);return()=>clearTimeout(e)}},[e,r,n]),r}(r,s);return c||"close"!==a||l("unmounted"),qu(()=>{if(o){if(r){l("initial");const e=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(e)}}l("close")}},[r,o]),{isMounted:c,status:a}}(e,{duration:a}),y=id(r),b=id(o),x=id(i),w=id(s);return qu(()=>{const e=ih(y.current,u),t=ih(x.current,u),n=ih(w.current,u),r=ih(b.current,u)||Object.keys(e).reduce((e,t)=>(e[t]="",e),{});if("initial"===v&&f(t=>({transitionProperty:t.transitionProperty,...n,...e})),"open"===v&&f({transitionProperty:Object.keys(r).map(oh).join(","),transitionDuration:h+"ms",...n,...r}),"close"===v){const r=t||e;f({transitionProperty:Object.keys(r).map(oh).join(","),transitionDuration:p+"ms",...n,...r})}},[p,x,y,b,w,h,v,u]),{isMounted:g,styles:m}}(_,{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"}[e],L="dark"===e?"text-tooltip-background-dark":"text-tooltip-background-light";var I;return(0,h.jsxs)(t.Fragment,{children:[(0,t.isValidElement)(l)&&(0,h.jsx)(t.Fragment,{children:(0,t.cloneElement)(l,{ref:yh(l.ref,E.setReference),className:Ha(l.props.className),...A()})},"tooltip-reference"),(0,h.jsx)(Pd,{id:d,root:u,children:M&&(0,h.jsxs)("div",{className:Ha("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:E.setFloating,style:{...k,...j},...N(),children:[(0,h.jsxs)("div",{children:[!!r&&(0,h.jsx)("span",{className:"font-semibold",children:r},"tooltip-title"),!!o&&(0,h.jsx)("div",{className:"font-normal",children:o},"tooltip-content")]}),i&&(0,h.jsx)(Qu,{ref:w,context:_,className:Ha("fill-current",L)})]})})]})};bh.displayName="Tooltip";const xh=(0,t.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,h.jsx)(t,{ref:a,className:Ha("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})});xh.displayName="Label";const wh=Ya("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]),Eh=Ya("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),kh=Ya("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);let _h=(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"}},Sh="group-disabled:text-field-color-disabled",Ch={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]"},Rh=e=>"string"==typeof e?e:"object"==typeof e&&"textContent"in e?e.textContent?.toString().toLowerCase()||"":"object"==typeof e&&"children"in e?Rh(e.children):"",Ph=(0,t.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},d)=>{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 m="",f="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?(m=p.disabled,f+=" cursor-not-allowed disabled"):m=p[o],e?(0,h.jsxs)("span",{className:Ha("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",m,!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:d,children:[i?(0,h.jsx)("span",{className:Ha("justify-center flex items-center",g[t]),children:i}):null,(0,h.jsx)("span",{className:"px-1 truncate inline-block",children:e}),l&&(0,h.jsxs)("span",{className:Ha(f,g[t]),onMouseDown:c,role:"button",tabIndex:0,...!s&&{onClick:a},children:[(0,h.jsx)("span",{className:"sr-only",children:`Remove ${e}`}),(0,h.jsx)(Za,{}),(0,h.jsx)("span",{className:"absolute -inset-1"})]})]}):null});Ph.displayName="Badge";const Ah=Ya("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),Nh=({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,h.jsx)("span",{className:Ha("flex",i,o,r),children:n||(0,h.jsx)(Ah,{className:"animate-spin shrink-0"})})},Mh=(0,t.createContext)({}),jh=()=>(0,t.useContext)(Mh);function Dh({children:e,icon:n=null,placeholder:r="Select an option",optionIcon:o=null,render:i,label:s,className:a,...l}){const{sizeValue:c,getReferenceProps:u,getValues:d,selectId:p,refs:m,isOpen:f,multiple:g,combobox:v,setSelected:y,onChange:b,isControlled:x,disabled:w,by:E}=jh(),k={sm:"xs",md:"sm",lg:"md"}[c],_=(0,t.useCallback)(()=>{if(n)return n;const e="text-field-placeholder group-disabled:text-icon-disabled";return v?(0,h.jsx)(wh,{className:e}):(0,h.jsx)(Eh,{className:e})},[n]),T=(0,t.useCallback)(()=>{const n=d();if(!n)return null;if(g)return n.map((e,t)=>(0,h.jsx)(Ph,{className:"cursor-default",icon:o,type:"rounded",size:k,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 e&&"function"!=typeof i){const t={value:n,...g?{onClose:S(n)}:{}};r=e(t)}return((0,t.isValidElement)(e)||"string"==typeof e)&&"function"!=typeof i&&(r=e),(0,h.jsx)("span",{className:Ha("truncate",Th[c].displaySelected,Sh),children:r})},[d,w]),S=e=>t=>{t?.preventDefault(),t?.stopPropagation();const n=[...d()??[]],r=n.findIndex(t=>null!==t&&null!==e&&"object"==typeof t?t[E]===e[E]:t===e);-1!==r&&(n.splice(r,1),x||y(n),"function"==typeof b&&b(n))};return(0,h.jsxs)("div",{className:"w-full flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[!!s&&(0,h.jsx)("label",{className:Ha(Th[c]?.label,"text-field-label"),htmlFor:p,children:s}),(0,h.jsxs)("button",{id:p,ref:m.setReference,className:Ha("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",!f&&"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,h.jsxs)("div",{className:Ha("flex-1 grid items-center justify-start gap-1.5 overflow-hidden",d()&&"flex flex-wrap"),children:[T(),(g?!d()?.length:!d())&&(0,h.jsx)("div",{className:Ha("[grid-area:1/1/2/3] text-field-input px-1",Th[c].displaySelected,Sh),children:r})]}),(0,h.jsx)("div",{className:Ha("flex items-center [&>svg]:shrink-0",Th[c].icon),children:_()})]})]})}function Lh({label:e,children:n,className:r,...o}){const{index:i,totalGroups:s}=o,{sizeValue:a}=jh();return(0,h.jsxs)(t.Fragment,{children:[(0,h.jsxs)("div",{className:"flex flex-col",role:"group","aria-label":e,children:[(0,h.jsx)("div",{className:Ha("p-2 font-normal text-text-tertiary",{sm:"text-xs",md:"text-xs",lg:"text-sm"}[a],r),id:`group-${e?.toLowerCase().replace(/\s+/g,"-")}`,children:e}),(0,h.jsx)("div",{className:"flex flex-col",role:"presentation","aria-labelledby":`group-${e?.toLowerCase().replace(/\s+/g,"-")}`,children:n})]}),i<s&&!!(n&&t.Children.count(n)>0)&&(0,h.jsx)("hr",{className:Ha("h-px my-2 w-full border-border-subtle border-b border-t-0 border-solid",Ch[a])})]})}function Ih({children:e,className:n}){const{isOpen:r,context:o,refs:i,combobox:s,floatingStyles:a,getFloatingProps:l,sizeValue:c,setSearchKeyword:u,setActiveIndex:d,setSelectedIndex:p,value:m,selected:f,getValues:g,searchKeyword:v,listContentRef:y,by:b,searchPlaceholder:x,activeIndex:w,searchFn:E,debounceDelay:k}=jh(),_=(0,t.useMemo)(()=>{const n=g();let r=-1;if(n){let o=t.Children.toArray(e);o.length>0&&(0,t.isValidElement)(o[0])&&o[0].type===Lh&&(o=t.Children.toArray(e).map(e=>(0,t.isValidElement)(e)?t.Children.toArray(e.props.children):[]).flat()),r=o.findIndex(e=>{if(!(0,t.isValidElement)(e))return!1;const r=e.props.value;return"object"==typeof r&&"object"==typeof n?r[b]===n[b]:r===n})}return r},[m,f,e,b]);(0,t.useLayoutEffect)(()=>{r||(d(_),p(_))},[_,r]),(0,t.useLayoutEffect)(()=>{r&&(s&&[-1,null].includes(w)||d(-1))},[v,r]);const T=(0,t.useMemo)(()=>{let n=0,r=0;t.Children.forEach(e,e=>{(0,t.isValidElement)(e)&&e.type===Lh&&t.Children.toArray(e.props.children).some(e=>{if(!(0,t.isValidElement)(e))return!1;if(v&&!E){const t=Rh(e.props.children)?.toLowerCase(),n=v.toLowerCase();return t.includes(n)}return!0})&&n++}),r=Math.max(0,n-1);let o=0,i=0;const s=e=>{if(!(0,t.isValidElement)(e))return null;if(e.type===Lh){const n=t.Children.map(e.props.children,s);if(!n?.some(e=>null!==e))return null;const o={...e.props,children:n,index:i,totalGroups:r};return i++,(0,t.cloneElement)(e,o)}if(v&&!E){const t=Rh(e.props?.children)?.toLowerCase(),n=v.toLowerCase();if(!t?.includes(n))return null}return(0,t.cloneElement)(e,{...e.props,index:o++})};return t.Children.map(e,s)},[v,m,f,e,E]),S=t.Children.count(T);(0,t.useEffect)(()=>{y.current=[];let n=t.Children.toArray(e);n&&(0,t.isValidElement)(n[0])&&n[0].type===Lh&&(n=t.Children.toArray(n).map(e=>(0,t.isValidElement)(e)?e.props.children:null).filter(Boolean)),t.Children.forEach(n,e=>{if(!(0,t.isValidElement)(e))return;const n=Rh(e.props?.children)?.toLowerCase();if(v&&!E){const e=v.toLowerCase();if(!n?.includes(e))return}y.current.push(n)})},[v,E]);const[C,R]=(0,t.useState)(!1),P=((e,n=500)=>{const r=(0,t.useRef)(null);return(0,t.useCallback)((...t)=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>e(...t),n)},[e,n])})((0,t.useCallback)(async()=>{if(E&&"function"==typeof E&&!C){R(!0);try{await E(v)}catch(e){console.error(e)}finally{R(!1)}}},[v]),k);return(0,t.useEffect)(()=>{"function"==typeof E&&P()},[P]),(0,h.jsx)(h.Fragment,{children:r&&(0,h.jsx)(h.Fragment,{children:(0,h.jsx)(Od,{context:o,modal:!1,children:(0,h.jsxs)("div",{ref:i.setFloating,className:Ha("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,h.jsxs)("div",{className:Ha(Th[c].searchbarWrapper),children:[C?(0,h.jsx)(Nh,{className:Th[c].searchbarIcon}):(0,h.jsx)(kh,{className:Ha("text-icon-secondary shrink-0",Th[c].searchbarIcon)}),(0,h.jsx)("input",{className:Ha("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,h.jsxs)("div",{className:Ha("overflow-y-auto overflow-x-hidden",!s&&"w-full h-full",Th[c].dropdownItemsWrapper),children:[!!S&&T,!S&&(0,h.jsx)("div",{className:"p-2 text-center text-base font-medium text-field-placeholder",children:"No items found"})]})]})})})})}function Oh({children:e,root:t,id:n}){return(0,h.jsx)(Pd,{id:n,root:t,children:e})}function Vh({value:e,selected:n,children:r,className:o,...i}){const{sizeValue:s,getItemProps:a,onKeyDownItem:l,onClickItem:c,activeIndex:u,selectedIndex:d,updateListRef:p,getValues:m,by:f,multiple:g}=jh(),{index:v}=i,y=(0,t.useRef)(v),b=(0,t.useMemo)(()=>{if(!g)return!1;const t=m();return!!t&&t.some(t=>null!==t&&null!==e&&"object"==typeof t?t[f]===e[f]:t===e)},[e,m]),x=(0,t.useMemo)(()=>"boolean"==typeof n?n:g?b:v===d,[b,d,n]);return(0,h.jsxs)("div",{className:Ha("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,e)},onKeyDown(t){l(t,y.current,e)}}),children:[(0,h.jsx)("span",{className:"w-full truncate",children:r}),x&&(0,h.jsx)(ch,{className:Ha("text-icon-on-color-disabled",{sm:"size-4",md:"size-4",lg:"size-5"}[s])})]})}const Fh=({id:e,size:n="md",value:r,defaultValue:o,onChange:i,by:s="id",children:a,multiple:l=!1,combobox:c=!1,disabled:u=!1,searchPlaceholder:d="Search...",searchFn:p,debounceDelay:m=500})=>{const f=(0,t.useMemo)(()=>e||`select-${_h()}`,[e]),g=(0,t.useMemo)(()=>typeof r<"u",[r]),[v,y]=(0,t.useState)(o),[b,x]=(0,t.useState)(""),w=(0,t.useCallback)(()=>g?r:v,[g,r,v]),[E,k]=(0,t.useState)(!1),[_,T]=(0,t.useState)(null),[S,C]=(0,t.useState)(null),R={sm:c?256:172,md:c?256:216,lg:c?256:216},{refs:P,floatingStyles:A,context:N}=Hd({placement:"bottom-start",open:E,onOpenChange:k,whileElementsMounted:gu,middleware:[Pu(5),Au({padding:10}),(H={apply({rects:e,elements:t,availableHeight:r}){Object.assign(t.floating.style,{maxHeight:`min(${r}px, ${R[n]}px)`,maxWidth:`${e.reference.width}px`})},padding:10},{...xu(H),options:[H,void 0]})]}),M=(0,t.useRef)([]),j=(0,t.useRef)([]),D=(0,t.useRef)(!1),L=zd(N,{event:"mousedown"}),I=$d(N),O=rh(N,{role:"listbox"}),V=th(N,{listRef:M,activeIndex:_,selectedIndex:S,onNavigate:T,loop:!0}),F=function(e,n){var r;const{open:o,dataRef:i}=e,{listRef:s,activeIndex:a,onMatch:l,onTypingChange:c,enabled:u=!0,findMatch:d=null,resetMs:h=750,ignoreKeys:p=[],selectedIndex:m=null}=n,f=t.useRef(),g=t.useRef(""),v=t.useRef(null!=(r=null!=m?m:a)?r:-1),y=t.useRef(null),b=Du(l),x=Du(c),w=id(d),E=id(p);qu(()=>{o&&(clearTimeout(f.current),y.current=null,g.current="")},[o]),qu(()=>{var e;o&&""===g.current&&(v.current=null!=(e=null!=m?m:a)?e:-1)},[o,m,a]);const k=Du(e=>{e?i.current.typing||(i.current.typing=e,x(e)):i.current.typing&&(i.current.typing=e,x(e))}),_=Du(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)?k(!1):" "===e.key&&lc(e)),null==n||E.current.includes(e.key)||1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey)return;o&&" "!==e.key&&(lc(e),k(!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(f.current),f.current=setTimeout(()=>{g.current="",v.current=y.current,k(!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="",k(!1))}),T=t.useMemo(()=>({onKeyDown:_}),[_]),S=t.useMemo(()=>({onKeyDown:_,onKeyUp(e){" "===e.key&&k(!1)}}),[_,k]);return t.useMemo(()=>u?{reference:T,floating:S}:{},[u,T,S])}(N,{listRef:j,activeIndex:_,selectedIndex:S,onMatch:E?T:C,onTypingChange(e){D.current=e}}),{getReferenceProps:z,getFloatingProps:B,getItemProps:U}=Xd([I,O,V,L,...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),P.reference.current.focus(),k(!1),x(""),"function"==typeof i&&i(n))})(e,t);C(e),g||y(t),P.reference.current.focus(),k(!1),x(""),"function"==typeof i&&i(t)},$=(0,t.useCallback)((e,t)=>{M.current[e]=t},[]);var H;return(0,h.jsx)(Mh.Provider,{value:{selectedIndex:S,setSelectedIndex:C,activeIndex:_,setActiveIndex:T,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:f,getReferenceProps:z,isOpen:E,value:r,updateListRef:$,refs:P,listContentRef:j,by:s,getFloatingProps:B,floatingStyles:A,context:N,searchKeyword:b,setSearchKeyword:x,disabled:u,isControlled:g,searchPlaceholder:d,searchFn:p,debounceDelay:m},children:a})};Fh.displayName="Select";const zh=Object.assign(Fh,{Portal:Oh,Button:Dh,Options:Ih,Option:Vh,OptionGroup:Lh});Oh.displayName="Select.Portal",Dh.displayName="Select.Button",Ih.displayName="Select.Options",Vh.displayName="Select.Option",Lh.displayName="Select.OptionGroup";const Bh=()=>{const{theme_versions:n,addon_versions:o}=astra_addon_admin,[i,s]=(0,t.useState)(!1),[a,l]=(0,t.useState)("astra-theme"),[c,h]=(0,t.useState)(n[0]?.value),[p,m]=(0,t.useState)(o[0]?.value);if(!astra_addon_admin.is_bsf_package)return"";const f=!astra_addon_admin.license_status,g=e=>{f||(l(e),s(!0))};return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"flex flex-col md:flex-row gap-4 "+(f?"opacity-60":"")},(0,e.createElement)("div",{className:"w-full flex flex-col gap-1"},(0,e.createElement)("div",{className:"flex items-center gap-2"},(0,e.createElement)(xl,{as:"h5",size:18,weight:600},(0,r.__)("Rollback to Previous Version","astra-addon")),f&&(0,e.createElement)(bh,{content:(0,e.createElement)("div",{className:"flex flex-col gap-2"},(0,e.createElement)("span",null,(0,r.__)("To use this feature, please activate your license.","astra-addon")),(0,e.createElement)(pl,{size:"xs",onClick:e=>{e.preventDefault(),e.stopPropagation(),window.location.href=`admin.php?page=${astra_admin.home_slug}&path=settings&focus=license`}},(0,r.__)("Go to License Settings","astra-addon"))),placement:"top",arrow:!0,interactive:!0,delay:[200,0]},(0,e.createElement)(u,{size:16,className:"text-text-tertiary cursor-help"}))),(0,e.createElement)(xl,{color:"secondary"},(0,r.__)("Experiencing an issue with current versions of software? Roll back to a previous version to help troubleshoot the issue.","astra-addon"))),(0,e.createElement)("div",{className:"grid justify-items-end gap-3 tablet:justify-items-start tablet:my-2"},(0,e.createElement)("div",{className:"inline-flex w-full items-center gap-2 md:w-max"},(0,e.createElement)(xh,{className:"font-medium grow",htmlFor:"themeVersionRollback"},astra_admin.theme_name),c&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"bsf-rollback-theme-version"},(0,e.createElement)(zh,{id:"themeVersionRollback",name:"themeVersionRollback",className:"astra-admin__input-field astra-admin__dropdown",defaultValue:c,onBlur:()=>setProductSelect("astra-theme"),onChange:e=>h(e),disabled:f},(0,e.createElement)(zh.Button,null),(0,e.createElement)(zh.Portal,null,(0,e.createElement)(zh.Options,null,n.map(t=>(0,e.createElement)(zh.Option,{key:t.value,value:t.value},t.label)))))),(0,e.createElement)(pl,{className:"bsf-rollback-button",onClick:()=>g("astra-theme"),"data-product_type":"theme",disabled:f},(0,r.__)("Rollback","astra-addon"))),!c&&(0,e.createElement)(bh,{className:"w-[350px]",text:(0,r.__)("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"},(0,e.createElement)(d,{size:20,className:"mr-2 cursor-help"}))),(0,e.createElement)("div",{className:"inline-flex w-full items-center gap-2 md:w-max"},(0,e.createElement)(xh,{className:"font-medium grow",htmlFor:"addonVersionRollback"},astra_addon_admin.addon_name),(0,e.createElement)("div",{className:"bsf-rollback-version"},(0,e.createElement)("input",{type:"hidden",name:"product-name",id:"bsf-product-name",value:astra_addon_admin.addon_name}),(0,e.createElement)(zh,{id:"addonVersionRollback",name:"addonVersionRollback",className:"bsf-rollback-version-select astra-admin__input-field astra-admin__dropdown",defaultValue:p,onBlur:()=>setProductSelect("astra-addon"),onChange:e=>m(e),disabled:f},(0,e.createElement)(zh.Button,null),(0,e.createElement)(zh.Portal,null,(0,e.createElement)(zh.Options,null,o.map(t=>(0,e.createElement)(zh.Option,{key:t.value,value:t.value},t.label)))))),(0,e.createElement)(pl,{className:"bsf-rollback-button",onClick:()=>g("astra-addon"),"data-product_type":"addon","data-placeholder-url":astra_addon_admin.addon_rollback_nonce_placeholder_url,disabled:f},(0,r.__)("Rollback","astra-addon")))),(0,e.createElement)(ml,{showDialog:i,setShowDialog:s,version:a===astra_addon_admin.rollback_plugin_name?p:c,product:a})),(0,e.createElement)("div",{className:"h-px bg-border-subtle"}))};let Uh=1;const Wh=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:Uh++;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})}},$h=Object.seal(Object.assign((e,t)=>Wh.default(e,t),{success:Wh.success.bind(Wh),error:Wh.error.bind(Wh),warning:Wh.warning.bind(Wh),info:Wh.info.bind(Wh),custom:Wh.custom.bind(Wh),dismiss:Wh.dismiss.bind(Wh),update:Wh.update.bind(Wh)},{getHistory:Wh.history.bind(Wh)})),Hh={"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"},Gh={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"},qh="bg-background-inverse border-background-inverse",Kh={light:"text-icon-secondary",dark:"text-icon-inverse"};let Xh=!1;const Yh=({toastItem:e,title:n="",content:r="",autoDismiss:o=!0,dismissAfter:i=5e3,theme:s="light",design:a="stack",icon:l,variant:c="neutral",removeToast:u})=>{const d=(0,t.useRef)(0),p=(0,t.useRef)(0),m=(0,t.useRef)(),f=(e,t=i)=>{if(o&&!(i<0))return d.current=(new Date).getTime(),setTimeout(()=>{"function"==typeof u&&u(e.id)},t)};(0,t.useEffect)(()=>{const t=i;return m.current=f(e,t),()=>{clearTimeout(m.current)}},[]),(0,t.useEffect)(()=>{!e?.dismiss||"function"!=typeof u||u(e.id)},[e]);const g=()=>{"function"==typeof u&&e?.action?.onClick?.(()=>u(e.id))};let v=null;return"stack"===a&&(v=(0,h.jsx)("div",{className:Ha("flex items-center justify-start p-4 gap-2 relative border border-solid rounded-md shadow-lg","dark"===s?qh:Gh?.[c],"w-[22.5rem]"),onMouseEnter:()=>{clearTimeout(m.current),p.current=(new Date).getTime()},onMouseLeave:()=>{m.current=f(e,i-(p.current-d.current))},children:"custom"!==e.type?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:mh({variant:c,icon:l,theme:s})}),(0,h.jsxs)("div",{className:"flex flex-col items-start justify-start gap-0.5 mr-6",children:[gh({title:n,theme:s}),vh({content:r,theme:s}),e?.action?.label&&"function"==typeof e?.action?.onClick&&(0,h.jsx)("div",{className:"mt-2.5",children:fh({actionLabel:e?.action?.label,actionType:e?.action?.type??"button",onAction:g,theme:s})})]}),(0,h.jsx)("div",{className:"absolute right-4 top-4 [&_svg]:size-5",children:(0,h.jsx)("button",{className:Ha("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",Kh[s]??Kh.light),onClick:()=>{"function"==typeof u&&u(e.id)},children:(0,h.jsx)(Za,{})})})]}):e?.jsx?.({close:()=>u(e.id),action:e?.action?{...e?.action,onClick:g}:null})})),"inline"===a&&(v=(0,h.jsxs)("div",{className:Ha("flex items-center justify-start p-3 gap-2 relative border border-solid rounded-md shadow-lg","dark"===s?qh:Gh?.[c],"lg:w-[47.5rem] w-full"),children:[(0,h.jsx)("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:mh({variant:c,icon:l,theme:s})}),(0,h.jsxs)("div",{className:"flex items-start justify-start gap-1 mr-10 [&>span:first-child]:shrink-0",children:[gh({title:n,theme:s}),vh({content:r,theme:s})]}),(0,h.jsx)("div",{className:"absolute right-3 top-3 [&_svg]:size-5",children:(0,h.jsx)("button",{className:Ha("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",Kh[s]??Kh.light),onClick:()=>u(e.id),children:(0,h.jsx)(Za,{})})})]})),v},Zh=(ep=({position:e="top-right",design:n="stack",theme:r="light",className:o="",autoDismiss:i=!0,dismissAfter:s=5e3})=>{const[a,l]=(0,t.useState)([]);(0,t.useEffect)(()=>{Wh.subscribe(e=>{e?.dismiss?l(t=>t.map(t=>t.id===e.id?{...t,dismiss:!0}:t)):setTimeout(()=>{(0,Ja.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,h.jsx)("ul",{className:Ha("fixed flex flex-col list-none z-20 p-10 pointer-events-none [&>li]:pointer-events-auto gap-3",Hh[e]??Hh["top-right"],o),children:(0,h.jsx)(S,{initial:!1,children:a.map(e=>(0,h.jsx)(Xs.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,h.jsx)(Yh,{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,t.memo)(e=>{const t=e.singleTon;return Xh&&t?null:(Xh=!0,(0,h.jsx)(ep,{...e}))})),Jh=({message:n=(0,r.__)("Successfully saved!","astra-addon"),description:o="",type:i="success"})=>{const[s,a]=(0,t.useState)(!0);return(0,t.useEffect)(()=>{if(s){switch(i){case"success":$h.success(n,{description:o});break;case"error":$h.error(n,{description:o});break;case"warning":$h.warning(n,{description:o});break;default:$h.info(n,{description:o})}const e=setTimeout(()=>a(!1),2e3);return()=>clearTimeout(e)}},[s]),(0,e.createElement)(Zh,{position:"top-right",design:"stack",theme:"light",autoDismiss:!0,dismissAfter:2e3})},Qh=window.wp.apiFetch;var ep,tp=o.n(Qh);const np=(...e)=>e.filter(Boolean).join(" "),rp=(()=>{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),tp()({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})(),op=(e,t={current:null})=>new Promise((n,r)=>{rp(e,t,n,r)});var ip=o(442);const sp=ip.default||ip,ap=({label:e,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,t.isValidElement)(e))return(0,h.jsxs)("div",{className:Ha("inline-flex items-center gap-3","items-start"),children:[o,e]});const c=!e?.heading&&!e?.description,u=e?.heading&&e?.description?"items-start":"items-center";return c?o:(0,h.jsxs)("div",{className:Ha("inline-flex",u,"gap-3"),children:[o,(()=>{const{heading:t="",description:o=""}=e||{};return(0,h.jsxs)("div",{className:Ha("space-y-0.5",l[i]),children:[t&&(0,h.jsx)(xh,{htmlFor:n,className:Ha("m-0",s[i]),...r&&{variant:"disabled"},children:t}),o&&(0,h.jsx)(xh,{tag:"p",variant:"help",className:Ha("text-sm font-normal leading-5 m-0",a[i]),...r&&{variant:"disabled"},children:o})]})})()]})},lp=(0,t.forwardRef)(({id:e,onChange:n,value:r,defaultValue:o=!1,size:i="sm",disabled:s=!1,label:a={heading:"",description:""},name:l,className:c,...u},d)=>{const p="lg"===i?"md":i,m=(0,t.useMemo)(()=>typeof r<"u",[r]),f=(0,t.useMemo)(()=>e||`switch-${_h()}`,[]),[g,v]=(0,t.useState)(o),y="primary",b=(0,t.useCallback)(()=>m?r:g,[m,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,h.jsx)(ap,{label:a,switchId:f,disabled:s,size:p,children:(0,h.jsxs)("div",{className:Ha("relative group/switch inline-block cursor-pointer rounded-full shrink-0",w[p].container,c),children:[(0,h.jsx)("input",{ref:d,id:f,type:"checkbox",className:Ha("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;m||v(t),"function"==typeof n&&n(t)},disabled:s,name:l,...u}),(0,h.jsx)("label",{htmlFor:f,className:Ha("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])})]})})});lp.displayName="Switch";const cp=()=>{const n=(0,t.useRef)(),o="disable"!==astra_addon_admin.enable_beta,[i,s]=(0,t.useState)(o),[a,l]=(0,t.useState)(!1),c=`<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,r.__)("this article","astra-addon")}</a>`;return(0,e.createElement)("div",{className:"flex gap-4"},(0,e.createElement)("div",{className:"w-full flex flex-col gap-1"},(0,e.createElement)(xl,{as:"h5",size:18,weight:600},(0,r.__)("Enable Beta","astra-addon")),(0,e.createElement)(xl,{color:"secondary"},sp((0,r.sprintf)((0,r.__)(
// 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"),c)))),(0,e.createElement)(lp,{value:i,onChange:()=>{s(!i);const e={action:"astra_beta_updates",status:i?"disable":"enable"};op(e,n).then(t=>{t.success&&(window.astra_addon_admin.enable_beta=e.status,l(!0),setTimeout(()=>l(!1),2e3))}).catch(e=>{console.error("Error occurred in toggling beta updates: ",e)})}}),a&&(0,e.createElement)(Jh,null))},up=c("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"}]]),dp=c("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"}]]),hp=Ya("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"}]]),pp=(0,t.forwardRef)(({id:e,type:n="text",defaultValue:r="",value:o,size:i="sm",className:s="",disabled:a=!1,onChange:l=()=>{},error:c=!1,onError:u=()=>{},prefix:d=null,suffix:p=null,label:m="",...f},g)=>{const v=(0,t.useRef)(null),y=(0,t.useMemo)(()=>e||`input-${n}-${_h()}`,[e]),b=(0,t.useMemo)(()=>typeof o<"u",[o]),[x,w]=(0,t.useState)(r),[E,k]=(0,t.useState)(null),_=(0,t.useCallback)(()=>b?o:x,[b,o,x]),T=e=>{if(a)return;let t;"file"===n?(t=e.target.files,t&&t.length>0?k(t[0].name):k(null)):t=e.target.value,!b&&"file"!==n&&w(t),"function"==typeof l&&l(t)},S=()=>{k(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",R={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"},P={xs:"text-xs font-medium",sm:"text-sm font-medium",md:"text-sm font-medium",lg:"text-base font-medium"},A={xs:"text-xs",sm:"text-xs",md:"text-sm",lg:"text-base"},N={sm:d?"pl-8":"",md:d?"pl-9":"",lg:d?"pl-10":""},M={sm:p?"pr-8":"",md:p?"pr-9":"",lg:p?"pr-10":""},j=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",L=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":"",O=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,t.useMemo)(()=>m?(0,h.jsx)(xh,{className:Ha(P[i]),htmlFor:y,...f?.required&&{required:!0},children:m}):null,[m,i,y]),W=E?"file:border-0 file:bg-transparent pr-10":"text-text-tertiary file:border-0 file:bg-transparent pr-10";return"file"===n?(0,h.jsxs)("div",{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[U,(0,h.jsxs)("div",{className:Ha("w-full relative flex focus-within:z-10",s),children:[(0,h.jsx)("input",{ref:yh(v,g),id:y,type:"file",className:Ha(C,V,R[i],A[i],D,j,I,W),disabled:a,onChange:T,onInvalid:u,...f}),(0,h.jsx)("div",{className:Ha(z,"right-0 pr-3",B[i]),children:(0,h.jsx)(hp,{})})]})]}):(0,h.jsxs)("div",{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[U,(0,h.jsxs)("div",{className:Ha("w-full relative flex focus-within:z-10",s),children:[d?(0,h.jsx)("div",{className:Ha(F,"left-0 pl-3",A[i]),children:d}):null,(0,h.jsx)("input",{ref:yh(v,g),id:y,type:n,className:Ha(C,O,R[i],A[i],N[i],M[i],D,j,L),disabled:a,onChange:T,onInvalid:u,value:_(),...f}),"file"===n?E?(0,h.jsx)("div",{className:Ha(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,h.jsx)(Za,{})}):(0,h.jsx)("div",{className:Ha(z,"right-0 pr-3",B[i]),children:(0,h.jsx)(hp,{})}):p?(0,h.jsx)("div",{className:Ha(F,"right-0 pr-3",A[i]),children:p}):null]})]})});pp.displayName="Input";const mp=()=>{var n,o;const i=astra_addon_admin.license_status,s=null!==(n=astra_addon_admin.license_expires)&&void 0!==n?n:"",a=(()=>{if(!s||"lifetime"===s)return null;const e=new Date(s)-Date.now();return Math.max(0,Math.ceil(e/864e5))})(),l=i?null!==a&&a<=0?"expired":"active":"inactive",c={inactive:"#DC2626",expired:"#DC2626","expiring-soon":"#D97706",active:void 0},u={inactive:(0,r.__)("License not active","astra-addon"),expired:(0,r.__)("License Expired","astra-addon"),"expiring-soon":(0,r.__)("License Expiring Soon","astra-addon"),active:(0,r.__)("Your License","astra-addon")},d={expired:(0,r.__)("Renew your license to continue receiving automatic updates and access to premium support.","astra-addon"),"expiring-soon":(0,r.sprintf)(/* translators: %d: number of days until license expires */ /* translators: %d: number of days until license expires */
(0,r.__)("Your license expires in %d day(s). Renew now to keep receiving automatic updates and access to premium support.","astra-addon"),a)},h=i?"bsf_deactivate_license":"bsf_activate_license",[p,m]=(0,t.useState)(i?"activated":""),f=i?(0,r.__)("Deactivate","astra-addon"):(0,r.__)("Activate","astra-addon"),g=i?(0,r.__)("Your license is active.","astra-addon"):(0,r.__)("Paste your license key here","astra-addon"),v=i?(0,r.__)("You are using","astra-addon"):(0,r.__)(`Please enter your valid license key below to activate ${astra_admin.plugin_name}!`,"astra-addon"),[y,b]=(0,t.useState)(!1),[x,w]=(0,t.useState)(""),[E,k]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{"license"!==new URLSearchParams(window.location.search).get("focus")||i||setTimeout(()=>{const e=document.getElementById("bsf_license_manager[license_key]");e&&(e.focus(),e.scrollIntoView({behavior:"smooth",block:"center"}))},100)},[i]),(0,e.createElement)("div",{className:"ast-licensing-wrap w-full max-w-md","data-license-inactive":!i,"data-license-state":l},(0,e.createElement)("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"},(0,e.createElement)("span",{className:"inline-flex w-max p-2 rounded-[4px] border border-solid",style:{borderColor:null!==(o=c[l])&&void 0!==o?o:"#e6e6ef"}},(0,e.createElement)(up,{size:24,strokeWidth:1.25,color:c[l]})),(0,e.createElement)("div",{className:"flex flex-col gap-1 pb-2"},(0,e.createElement)("h3",{className:np("m-0 flex items-center text-2xl font-semibold"),style:c[l]?{color:c[l]}:{}},u[l]),!i&&(0,e.createElement)("div",{className:"text-sm text-text-secondary"},(0,e.createElement)(xl,{className:"mb-1",color:"secondary"},sp((0,r.sprintf)((0,r.__)(
// 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,e.createElement)(xh,{htmlFor:"bsf_license_manager[license_key]",className:"text-text-secondary font-normal"},v)),d[l]&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(xl,{color:"secondary"},d[l]),(0,e.createElement)(xl,{as:"a",href:"https://store.brainstormforce.com/upgrades/?utm_source=wp&utm_medium=dashboard&utm_campaign=license-expiry",target:"_blank",className:"font-semibold text-button-primary no-underline"},(0,r.__)("Renew Now","astra-addon"))),"active"===l&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(xl,{size:14},sp((0,r.sprintf)((0,r.__)("You are using %s.","astra-addon"),`<b>${astra_admin.theme_name} + ${astra_addon_admin.addon_name}</b>`))),s&&(0,e.createElement)(xl,{size:12,color:"secondary"},"lifetime"===s?(0,r.__)("Lifetime license","astra-addon"):(0,r.sprintf)(/* translators: %s: license expiry date */ /* translators: %s: license expiry date */
(0,r.__)("Valid until %s","astra-addon"),new Date(s).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}))))),(0,e.createElement)("div",{className:"flex flex-col sm:flex-row gap-2 text-text-tertiary"},(0,e.createElement)("div",{className:"relative grow"},(0,e.createElement)("input",{type:"hidden",id:"bsf_graupi_nonce",name:"bsf_graupi_nonce",value:astra_addon_admin.bsf_graupi_nonce}),(0,e.createElement)("input",{type:"hidden",name:"_wp_http_referer",value:window.location.href.replace(window.location.origin,"")}),(0,e.createElement)("input",{type:"hidden",name:h,value:""}),i&&(0,e.createElement)("input",{type:"hidden",id:"bsf_license_manager[license_key]",name:"bsf_license_manager[license_key]",value:g}),(0,e.createElement)(pp,{type:"text",id:i?"astra_addon_license_key":"bsf_license_manager[license_key]",name:i?"astra_addon_license_key":"bsf_license_manager[license_key]",size:"md",defaultValue:i?g:p,placeholder:g,readOnly:!!i,disabled:!!i,onChange:e=>m(e),prefix:(0,e.createElement)(dp,{size:20,strokeWidth:1.25,className:"text-text-tertiary"})}),(0,e.createElement)("input",{type:"hidden",id:"bsf_license_manager[product_id]",name:"bsf_license_manager[product_id]",value:astra_addon_admin.product})),(0,e.createElement)(pl,{className:np(i?"text-badge-color-green":"text-button-primary hover:bg-button-secondary hover:bg-background-button-hover hover:outline-button-secondary"),variant:i?"outline":"secondary",onClick:e=>{e.preventDefault();const t=e.target?.closest("button");k("loading"),"deactivate"===t.dataset.trigger?document.getElementById("bsf-astra-license-form").submit():(e.target?.closest("button"),tp()({path:`/bsf-core/v1/license/${t.dataset.trigger}`,method:"POST",data:{"license-key":p,"product-id":"astra-addon"}}).then(async e=>{k(!1),w(e.message),b(!0),setTimeout(()=>b(!1),2e3),e.success?(k(!0),location.reload()):m("")}).catch(e=>{console.error("Error occurred in validating license: "+e)}))},"data-trigger":i?"deactivate":"activate",name:h,disabled:""===p,icon:"loading"===E&&(0,e.createElement)(Nh,{className:i?"text-badge-color-green":"text-button-primary"}),iconPosition:"right"},f)),!astra_admin.is_whitelabel&&(0,e.createElement)(xl,{as:"a",href:"https://store.brainstormforce.com/"+(i?"upgrades":"support"),target:"_blank",className:"w-max text-sm font-semibold text-button-primary no-underline"},i?(0,r.__)("Need more license?","astra-addon"):(0,r.__)("Need Help?","astra-addon"))),y&&(0,e.createElement)(Jh,{type:E?"success":"error",message:x}))},fp=()=>{const n=(0,t.useRef)(),o="disable"!==astra_addon_admin.enable_file_generation,[i,s]=(0,t.useState)(o),[a,l]=(0,t.useState)(!1),c=`<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,r.__)("this article","astra-addon")}</a>`;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"h-px bg-border-subtle"}),(0,e.createElement)("div",{className:np("flex gap-4",i?"":"astra-parent-field-false")},(0,e.createElement)("div",{className:"w-full flex flex-col gap-1"},(0,e.createElement)(xl,{as:"h5",size:18,weight:600},(0,r.__)("File Generation","astra-addon")),(0,e.createElement)(xl,{color:"secondary"},(0,r.sprintf)((0,r.__)(
// 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,e.createElement)(xl,{color:"secondary"},sp((0,r.sprintf)((0,r.__)(
// 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"),c)))),(0,e.createElement)(lp,{value:i,onChange:()=>{s(!i);const e={action:"astra_file_generation",status:i?"disable":"enable"};op(e,n).then(t=>{t.success&&(window.astra_addon_admin.enable_file_generation=e.status,l(!0),setTimeout(()=>l(!1),2e3))}).catch(e=>{console.error("Error occurred in toggling file generation status: "+e)})}}),a&&(0,e.createElement)(Jh,null)))},gp=()=>{const n=(0,t.useRef)(),[o,i]=(0,t.useState)(null),[s,a]=(0,t.useState)(!1);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"h-px bg-border-subtle"}),(0,e.createElement)("div",{className:"astra-child-field flex flex-col md:flex-row gap-4"},(0,e.createElement)("div",{className:"w-full flex flex-col gap-1"},(0,e.createElement)(xl,{as:"h5",size:18,weight:600},(0,r.__)("Asset Regeneration","astra-addon")),(0,e.createElement)(xl,{color:"secondary",className:"loading"!==s?"md:w-[calc(100%-24px)]":"w-full"},(0,r.__)("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,e.createElement)(pl,{className:"self-start whitespace-nowrap",onClick:()=>{a("loading"),op({action:"astra_refresh_assets_files"},n).then(e=>{if(a(!1),!e||!1===e.success){const t=e?.data?.message||(0,r.__)("Failed to regenerate assets.","astra-addon");return i({type:"error",message:t}),void setTimeout(()=>i(null),6e3)}const t=e?.data?.message||(0,r.__)("Assets regenerated successfully!","astra-addon");i({type:"success",message:t}),setTimeout(()=>i(null),2e3)}).catch(e=>{console.error("Error occurred in generating assets: ",e),a(!1),i({type:"error",message:(0,r.__)("An unexpected error occurred while regenerating assets.","astra-addon")}),setTimeout(()=>i(null),6e3)})},icon:"loading"===s&&(0,e.createElement)(Nh,{variant:"secondary"}),iconPosition:"right"},(0,r.__)("Regenerate Assets","astra-addon")),o&&(0,e.createElement)(Jh,{message:o.message,type:o.type})))},vp=()=>{const n=(0,t.useRef)(),o=!astra_addon_admin.show_self_branding,[i,s]=(0,t.useState)(!1),[a,l]=(0,t.useState)(o);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"h-px bg-border-subtle"}),(0,e.createElement)("div",{className:"flex gap-4"},(0,e.createElement)("div",{className:"w-full flex flex-col gap-1"},(0,e.createElement)(xl,{size:20,weight:600},(0,r.__)("Enable White Label","astra-addon")),(0,e.createElement)(xl,{color:"secondary"},(0,r.__)("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,e.createElement)(lp,{value:a,onChange:()=>{l(!a);const e={action:"astra_addon_update_whitelabel",key:"hide_branding",parent:"astra-agency",value:!a};op(e,n).then(t=>{t.success&&(window.astra_addon_admin.show_self_branding=e.value,s(!0),setTimeout(()=>{s(!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)})}}),i&&(0,e.createElement)(Jh,null)))},yp=(0,t.forwardRef)(({id:e,defaultValue:n="",value:r,size:o="sm",className:i="",disabled:s=!1,onChange:a=()=>{},error:l=!1,onError:c=()=>{},...u},d)=>{const p=(0,t.useMemo)(()=>e||`input-textarea-${_h()}`,[e]),m=(0,t.useMemo)(()=>typeof r<"u",[r]),[f,g]=(0,t.useState)(n),v=(0,t.useCallback)(()=>m?r:f,[m,r,f]),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,h.jsx)("textarea",{ref:d,id:p,className:Ha("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;m||g(t),"function"==typeof a&&a(t)},onInvalid:c,value:v(),...u})});yp.displayName="TextArea";const bp=()=>{const n=(0,t.useRef)(),[o,i]=(0,t.useState)(!1),[s,a]=(0,t.useState)(!1),[l,c]=(0,t.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}),u=(e,t,n)=>{const r={...l};r[t]=e,c(r),window.astra_addon_admin[n]=e};return(0,e.createElement)("div",{className:"ast-whitelabel-wrap flex flex-col gap-8"},(0,e.createElement)("div",null,(0,e.createElement)(xl,{as:"h4",size:20},(0,r.__)("Agency Details","astra-addon")),(0,e.createElement)("div",{className:"pt-3 flex flex-col gap-3"},(0,e.createElement)(pp,{type:"text",size:"md",label:(0,r.__)("Agency author name","astra-addon"),value:l.agencyAuthorName,onChange:e=>u(e,"agencyAuthorName","agency_author_name"),id:"author",name:"author","data-parent":"astra-agency"}),(0,e.createElement)(pp,{type:"text",size:"md",label:(0,r.__)("Agency author URL","astra-addon"),value:l.agencyAuthorURL,onChange:e=>u(e,"agencyAuthorURL","agency_author_url"),id:"author_url",name:"author_url","data-parent":"astra-agency"}),(0,e.createElement)("div",null,(0,e.createElement)(pp,{type:"text",size:"md",label:(0,r.__)("Agency license link","astra-addon"),value:l.agencyLicenseLink,onChange:e=>u(e,"agencyLicenseLink","agency_license_link"),id:"license",name:"license","data-parent":"astra-agency"}),(0,e.createElement)(xl,{color:"help",weight:400,className:"mt-1.5"},(0,r.__)("Get license link will be displayed in the license form when the purchase key is expired/not valid.","astra-addon"))))),(0,e.createElement)("div",{className:"h-px bg-border-subtle"}),(0,e.createElement)("div",null,(0,e.createElement)(xl,{as:"h4",size:20},(0,r.__)("Astra Theme Branding","astra-addon")),(0,e.createElement)("div",{className:"pt-3 flex flex-col gap-3"},(0,e.createElement)(pp,{type:"text",size:"md",label:(0,r.__)("Theme Name","astra-addon"),value:l.themeName,onChange:e=>u(e,"themeName","theme_name"),id:"name",name:"name","data-parent":"astra"}),(0,e.createElement)("div",{className:"flex flex-col gap-1.5"},(0,e.createElement)(xh,{htmlFor:"description"},(0,r.__)("Theme Description","astra-addon")),(0,e.createElement)(yp,{className:"h-36",size:"md",value:l.themeDescription,onChange:e=>u(e,"themeDescription","theme_description"),id:"description",name:"description","data-parent":"astra"})),(0,e.createElement)("div",null,(0,e.createElement)(pp,{type:"text",size:"md",label:(0,r.__)("Theme Screenshot URL","astra-addon"),value:l.themeScreenshotURL,onChange:e=>u(e,"themeScreenshotURL","theme_screenshot_url"),id:"screenshot",name:"screenshot","data-parent":"astra"}),(0,e.createElement)(xl,{color:"help",weight:400,className:"mt-1.5"},(0,r.__)("The recommended image size is 1200px wide by 900px tall.","astra-addon"))),(0,e.createElement)("div",null,(0,e.createElement)(pp,{type:"text",size:"md",label:(0,r.__)("Theme Icon URL","astra-addon"),value:l.themeIconURL,onChange:e=>u(e,"themeIconURL","theme_icon_url"),id:"icon",name:"icon","data-parent":"astra"}),(0,e.createElement)(xl,{color:"help",weight:400,className:"mt-1.5"},(0,r.__)("The recommended icon should have some background to get adjust properly on white background too.","astra-addon"))))),(0,e.createElement)("div",{className:"h-px bg-border-subtle"}),(0,e.createElement)("div",null,(0,e.createElement)(xl,{as:"h4",size:20},(0,r.__)("Astra Pro Branding","astra-addon")),(0,e.createElement)("div",{className:"pt-3 flex flex-col gap-3"},(0,e.createElement)(pp,{type:"text",size:"md",label:(0,r.__)("Plugin Name","astra-addon"),value:l.pluginName,onChange:e=>u(e,"pluginName","plugin_name"),id:"astra_pro_name",name:"astra_pro_name","data-parent":"astra-pro"}),(0,e.createElement)("div",{className:"flex flex-col gap-1.5"},(0,e.createElement)(xh,{htmlFor:"astra_pro_description"},(0,r.__)("Plugin Description","astra-addon")),(0,e.createElement)(yp,{className:"h-36",size:"md",value:l.pluginDescription,onChange:e=>u(e,"pluginDescription","plugin_description"),id:"astra_pro_description",name:"astra_pro_description","data-parent":"astra-pro"})))),astra_admin.starter_templates_data.is_available&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"h-px bg-border-subtle"}),(0,e.createElement)("div",null,(0,e.createElement)(xl,{as:"h4",size:20},(0,r.__)("Starter Templates Branding","astra-addon")),(0,e.createElement)("div",{className:"pt-3 flex flex-col gap-3"},(0,e.createElement)(pp,{type:"text",size:"md",label:(0,r.__)("Plugin Name","astra-addon"),value:l.sTPluginName,onChange:e=>u(e,"sTPluginName","st_plugin_name"),id:"st_name",name:"st_name","data-parent":"astra-sites"}),(0,e.createElement)("div",{className:"flex flex-col gap-1.5"},(0,e.createElement)(xh,{htmlFor:"st_description"},(0,r.__)("Plugin Description","astra-addon")),(0,e.createElement)(yp,{className:"h-36",size:"md",value:l.sTPluginDescription,onChange:e=>u(e,"sTPluginDescription","st_plugin_description"),id:"st_description",name:"st_description","data-parent":"astra-site"}))))),(0,e.createElement)(pl,{className:"w-max",onClick:()=>{a("loading");const e={action:"astra_addon_update_whitelabel",data:JSON.stringify(l)};op(e,n).then(e=>{e.success&&(a(!1),i(!0),setTimeout(()=>{i(!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"===s&&(0,e.createElement)(Nh,{variant:"secondary"}),iconPosition:"right"},(0,r.__)("Save","astra-addon")),o&&(0,e.createElement)(Jh,null))},xp=c("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"}]]),Ep=c("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(t){return astra_addon_admin.is_bsf_package&&(t=astra_addon_admin.license_status?(0,e.createElement)("div",{className:"pl-3"},(0,e.createElement)(Ph,{label:(0,r.__)("Active","astra-addon"),size:"xxs",variant:"green"})):(0,e.createElement)("div",{className:"pl-3"},(0,e.createElement)("a",{className:"hover:text-astra no-underline text-slate-400",href:`admin.php?page=${astra_admin.home_slug}&path=settings`},(0,e.createElement)(Ph,{label:(0,r.__)("Inactive","astra-addon"),size:"xxs",variant:"yellow"})))),t}),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(t){let n=!0;return astra_admin.show_self_branding||astra_addon_admin.license_status||(n=!1),astra_addon_admin.is_bsf_package||(n=!1),n&&t.push({name:(0,r.__)("Version Control","astra-addon"),slug:"version-control",icon:(0,e.createElement)(xp,{size:20})}),astra_admin.show_self_branding&&t.push({name:(0,r.__)("White Label","astra-addon"),slug:"white-label",icon:(0,e.createElement)(Ep,{size:20})}),t}),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(t){return astra_addon_admin.is_bsf_package?astra_admin.show_self_branding?(t["version-control"]=(0,e.createElement)(e.Fragment,null," ",(0,e.createElement)(Bh,null)," ",(0,e.createElement)(cp,null)," "),t["white-label"]=(0,e.createElement)(e.Fragment,null," ",(0,e.createElement)(bp,null)," ",(0,e.createElement)(vp,null)," ")):t["version-control"]=(0,e.createElement)(e.Fragment,null," ",(0,e.createElement)(Bh,null)," "):astra_admin.show_self_branding&&(t["white-label"]=(0,e.createElement)(e.Fragment,null," ",(0,e.createElement)(bp,null)," ",(0,e.createElement)(vp,null)," ")),t}),wp.hooks.addFilter("astra_dashboard.settings_screen_before_global-settings","astra_addon/dashboard_app",function(t){return astra_addon_admin.is_bsf_package?(0,e.createElement)(e.Fragment,null," ",(0,e.createElement)(mp,null)," ",(0,e.createElement)(fp,null)," ",(0,e.createElement)(gp,null)," "):(0,e.createElement)(e.Fragment,null," ",(0,e.createElement)(fp,null)," ",(0,e.createElement)(gp,null)," ")}),wp.hooks.addFilter("astra_dashboard.welcome_screen_after_integrations","astra_addon/dashboard_app",function(t){return astra_addon_admin.is_bsf_package&&(t=(0,e.createElement)("div",{className:"p-1"},(0,e.createElement)(mp,null))),t})})()})();