@salesforce/ui-design-mode 11.24.2 → 11.24.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
- var oi=Object.create;var Ka=Object.defineProperty;var ai=Object.getOwnPropertyDescriptor;var ri=Object.getOwnPropertyNames;var li=Object.getPrototypeOf,ni=Object.prototype.hasOwnProperty;var ii=(e,t,o)=>t in e?Ka(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var Kt=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(o){throw t=0,o}};var si=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of ri(t))!ni.call(e,r)&&r!==o&&Ka(e,r,{get:()=>t[r],enumerable:!(a=ai(t,r))||a.enumerable});return e};var kn=(e,t,o)=>(o=e!=null?oi(li(e)):{},si(t||!e||!e.__esModule?Ka(o,"default",{value:e,enumerable:!0}):o,e));var et=(e,t,o)=>ii(e,typeof t!="symbol"?t+"":t,o);var E0=Kt((Ew,O0)=>{"use strict";var Tu="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";O0.exports=Tu});var F0=Kt((Bw,Z0)=>{"use strict";var Vu=E0();function B0(){}function A0(){}A0.resetWarningCache=B0;Z0.exports=function(){function e(a,r,l,n,i,s){if(s!==Vu){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}e.isRequired=e;function t(){return e}var o={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:A0,resetWarningCache:B0};return o.PropTypes=o,o}});var N0=Kt((Fw,$0)=>{$0.exports=F0()();var Aw,Zw});var q0=Kt(Ce=>{"use strict";var Il=Symbol.for("react.element"),yl=Symbol.for("react.portal"),ba=Symbol.for("react.fragment"),Ia=Symbol.for("react.strict_mode"),ya=Symbol.for("react.profiler"),Ma=Symbol.for("react.provider"),Sa=Symbol.for("react.context"),_u=Symbol.for("react.server_context"),Ra=Symbol.for("react.forward_ref"),Ha=Symbol.for("react.suspense"),ka=Symbol.for("react.suspense_list"),Pa=Symbol.for("react.memo"),Ta=Symbol.for("react.lazy"),Du=Symbol.for("react.offscreen"),U0;U0=Symbol.for("react.module.reference");function n1(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Il:switch(e=e.type,e){case ba:case ya:case Ia:case Ha:case ka:return e;default:switch(e=e&&e.$$typeof,e){case _u:case Sa:case Ra:case Ta:case Pa:case Ma:return e;default:return t}}case yl:return t}}}Ce.ContextConsumer=Sa;Ce.ContextProvider=Ma;Ce.Element=Il;Ce.ForwardRef=Ra;Ce.Fragment=ba;Ce.Lazy=Ta;Ce.Memo=Pa;Ce.Portal=yl;Ce.Profiler=ya;Ce.StrictMode=Ia;Ce.Suspense=Ha;Ce.SuspenseList=ka;Ce.isAsyncMode=function(){return!1};Ce.isConcurrentMode=function(){return!1};Ce.isContextConsumer=function(e){return n1(e)===Sa};Ce.isContextProvider=function(e){return n1(e)===Ma};Ce.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Il};Ce.isForwardRef=function(e){return n1(e)===Ra};Ce.isFragment=function(e){return n1(e)===ba};Ce.isLazy=function(e){return n1(e)===Ta};Ce.isMemo=function(e){return n1(e)===Pa};Ce.isPortal=function(e){return n1(e)===yl};Ce.isProfiler=function(e){return n1(e)===ya};Ce.isStrictMode=function(e){return n1(e)===Ia};Ce.isSuspense=function(e){return n1(e)===Ha};Ce.isSuspenseList=function(e){return n1(e)===ka};Ce.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ba||e===ya||e===Ia||e===Ha||e===ka||e===Du||typeof e=="object"&&e!==null&&(e.$$typeof===Ta||e.$$typeof===Pa||e.$$typeof===Ma||e.$$typeof===Sa||e.$$typeof===Ra||e.$$typeof===U0||e.getModuleId!==void 0)};Ce.typeOf=n1});var j0=Kt((Nw,z0)=>{"use strict";z0.exports=q0()});import{forwardRef as he,createElement as Q}from"react";function ge(e,t){if(e==null)return{};var o={},a=Object.keys(e),r,l;for(l=0;l<a.length;l++)r=a[l],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var di=["color"],Pn=he(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=ge(e,di);return Q("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),Q("path",{d:"M0 7.5C0 7.22386 0.223858 7 0.5 7H3C3.27614 7 3.5 7.22386 3.5 7.5C3.5 7.77614 3.27614 8 3 8H0.5C0.223858 8 0 7.77614 0 7.5ZM5.75 7.5C5.75 7.22386 5.97386 7 6.25 7H8.75C9.02614 7 9.25 7.22386 9.25 7.5C9.25 7.77614 9.02614 8 8.75 8H6.25C5.97386 8 5.75 7.77614 5.75 7.5ZM12 7C11.7239 7 11.5 7.22386 11.5 7.5C11.5 7.77614 11.7239 8 12 8H14.5C14.7761 8 15 7.77614 15 7.5C15 7.22386 14.7761 7 14.5 7H12Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),ui=["color"],Tn=he(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=ge(e,ui);return Q("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),Q("path",{d:"M1.5 6.625C1.01675 6.625 0.625 7.01675 0.625 7.5C0.625 7.98325 1.01675 8.375 1.5 8.375C1.98325 8.375 2.375 7.98325 2.375 7.5C2.375 7.01675 1.98325 6.625 1.5 6.625ZM5.5 6.625C5.01675 6.625 4.625 7.01675 4.625 7.5C4.625 7.98325 5.01675 8.375 5.5 8.375C5.98325 8.375 6.375 7.98325 6.375 7.5C6.375 7.01675 5.98325 6.625 5.5 6.625ZM9.5 6.625C9.01675 6.625 8.625 7.01675 8.625 7.5C8.625 7.98325 9.01675 8.375 9.5 8.375C9.98325 8.375 10.375 7.98325 10.375 7.5C10.375 7.01675 9.98325 6.625 9.5 6.625ZM12.625 7.5C12.625 7.01675 13.0168 6.625 13.5 6.625C13.9832 6.625 14.375 7.01675 14.375 7.5C14.375 7.98325 13.9832 8.375 13.5 8.375C13.0168 8.375 12.625 7.98325 12.625 7.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var ci=["color"],Vn=he(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=ge(e,ci);return Q("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),Q("path",{d:"M1.25 7.5C1.25 7.22386 1.47386 7 1.75 7H13.25C13.5261 7 13.75 7.22386 13.75 7.5C13.75 7.77614 13.5261 8 13.25 8H1.75C1.47386 8 1.25 7.77614 1.25 7.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var fi=["color"],_n=he(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=ge(e,fi);return Q("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),Q("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var pi=["color"],ht=he(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=ge(e,pi);return Q("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),Q("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Ci=["color"],Dn=he(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=ge(e,Ci);return Q("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),Q("path",{d:"M5.67494 3.50017C5.67494 3.25164 5.87641 3.05017 6.12494 3.05017H10.6249C10.8735 3.05017 11.0749 3.25164 11.0749 3.50017C11.0749 3.7487 10.8735 3.95017 10.6249 3.95017H9.00587L7.2309 11.05H8.87493C9.12345 11.05 9.32493 11.2515 9.32493 11.5C9.32493 11.7486 9.12345 11.95 8.87493 11.95H4.37493C4.1264 11.95 3.92493 11.7486 3.92493 11.5C3.92493 11.2515 4.1264 11.05 4.37493 11.05H5.99397L7.76894 3.95017H6.12494C5.87641 3.95017 5.67494 3.7487 5.67494 3.50017Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),mi=["color"],On=he(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=ge(e,mi);return Q("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),Q("path",{d:"M4.79993 3.50017C4.79993 3.25164 5.0014 3.05017 5.24993 3.05017H9.74993C9.99845 3.05017 10.1999 3.25164 10.1999 3.50017C10.1999 3.7487 9.99845 3.95017 9.74993 3.95017H8.09993V11.05H9.74994C9.99847 11.05 10.1999 11.2515 10.1999 11.5C10.1999 11.7486 9.99847 11.95 9.74994 11.95H5.24994C5.00141 11.95 4.79994 11.7486 4.79994 11.5C4.79994 11.2515 5.00141 11.05 5.24994 11.05H6.89993V3.95017H5.24993C5.0014 3.95017 4.79993 3.7487 4.79993 3.50017Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),hi=["color"],En=he(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=ge(e,hi);return Q("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),Q("path",{d:"M2.78233 2.21707C2.70732 2.14206 2.60557 2.09991 2.49949 2.09991C2.3934 2.09991 2.29166 2.14206 2.21664 2.21707L0.216645 4.21707C0.0604351 4.37328 0.0604351 4.62655 0.216645 4.78276C0.372855 4.93897 0.626121 4.93897 0.78233 4.78276L2.09949 3.4656L2.09949 11.5342L0.78233 10.2171C0.62612 10.0609 0.372854 10.0609 0.216645 10.2171C0.0604349 10.3733 0.0604349 10.6265 0.216645 10.7828L2.21664 12.7828C2.29166 12.8578 2.3934 12.8999 2.49949 12.8999C2.60557 12.8999 2.70731 12.8578 2.78233 12.7828L4.78233 10.7828C4.93854 10.6265 4.93854 10.3733 4.78233 10.2171C4.62612 10.0609 4.37285 10.0609 4.21664 10.2171L2.89949 11.5342L2.89949 3.4656L4.21664 4.78276C4.37285 4.93897 4.62612 4.93897 4.78233 4.78276C4.93854 4.62655 4.93854 4.37328 4.78233 4.21707L2.78233 2.21707ZM10.5 2.74997C10.7107 2.74997 10.8988 2.88211 10.9703 3.08036L13.9703 11.3999C14.064 11.6597 13.9293 11.9462 13.6696 12.0399C13.4098 12.1336 13.1233 11.9989 13.0296 11.7392L12.0477 9.016H8.95228L7.97033 11.7392C7.87666 11.9989 7.59013 12.1336 7.33036 12.0399C7.07059 11.9462 6.93595 11.6597 7.02962 11.3999L10.0296 3.08036C10.1011 2.88211 10.2892 2.74997 10.5 2.74997ZM10.5 4.72396L11.7412 8.166H9.25879L10.5 4.72396Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var gi=["color"],Bn=he(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=ge(e,gi);return Q("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),Q("path",{d:"M7.1813 1.68179C7.35704 1.50605 7.64196 1.50605 7.8177 1.68179L10.3177 4.18179C10.4934 4.35753 10.4934 4.64245 10.3177 4.81819C10.142 4.99392 9.85704 4.99392 9.6813 4.81819L7.9495 3.08638L7.9495 11.9136L9.6813 10.1818C9.85704 10.0061 10.142 10.0061 10.3177 10.1818C10.4934 10.3575 10.4934 10.6424 10.3177 10.8182L7.8177 13.3182C7.73331 13.4026 7.61885 13.45 7.4995 13.45C7.38015 13.45 7.26569 13.4026 7.1813 13.3182L4.6813 10.8182C4.50557 10.6424 4.50557 10.3575 4.6813 10.1818C4.85704 10.0061 5.14196 10.0061 5.3177 10.1818L7.0495 11.9136L7.0495 3.08638L5.3177 4.81819C5.14196 4.99392 4.85704 4.99392 4.6813 4.81819C4.50557 4.64245 4.50557 4.35753 4.6813 4.18179L7.1813 1.68179Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var vi=["color"],An=he(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=ge(e,vi);return Q("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),Q("path",{d:"M6.5 1C6.22386 1 6 1.22386 6 1.5C6 1.77614 6.22386 2 6.5 2C7.12671 2 7.45718 2.20028 7.65563 2.47812C7.8781 2.78957 8 3.28837 8 4V11C8 11.7116 7.8781 12.2104 7.65563 12.5219C7.45718 12.7997 7.12671 13 6.5 13C6.22386 13 6 13.2239 6 13.5C6 13.7761 6.22386 14 6.5 14C7.37329 14 8.04282 13.7003 8.46937 13.1031C8.47976 13.0886 8.48997 13.0739 8.5 13.0591C8.51003 13.0739 8.52024 13.0886 8.53063 13.1031C8.95718 13.7003 9.62671 14 10.5 14C10.7761 14 11 13.7761 11 13.5C11 13.2239 10.7761 13 10.5 13C9.87329 13 9.54282 12.7997 9.34437 12.5219C9.1219 12.2104 9 11.7116 9 11V4C9 3.28837 9.1219 2.78957 9.34437 2.47812C9.54282 2.20028 9.87329 2 10.5 2C10.7761 2 11 1.77614 11 1.5C11 1.22386 10.7761 1 10.5 1C9.62671 1 8.95718 1.29972 8.53063 1.89688C8.52024 1.91143 8.51003 1.92611 8.5 1.9409C8.48997 1.92611 8.47976 1.91143 8.46937 1.89688C8.04282 1.29972 7.37329 1 6.5 1ZM14 5H11V4H14C14.5523 4 15 4.44772 15 5V10C15 10.5523 14.5523 11 14 11H11V10H14V5ZM6 4V5H1L1 10H6V11H1C0.447715 11 0 10.5523 0 10V5C0 4.44772 0.447715 4 1 4H6Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var xi=["color"],Zn=he(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=ge(e,xi);return Q("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),Q("path",{d:"M3.68979 2.75C3.89667 2.74979 4.08232 2.87701 4.15679 3.07003L7.36662 11.39C7.46602 11.6477 7.33774 11.9371 7.0801 12.0365C6.82247 12.1359 6.53304 12.0076 6.43365 11.75L5.3825 9.02537H2.01133L0.966992 11.749C0.868128 12.0068 0.578964 12.1357 0.321126 12.0369C0.0632878 11.938 -0.0655864 11.6488 0.0332774 11.391L3.22344 3.07099C3.29751 2.87782 3.4829 2.75021 3.68979 2.75ZM3.69174 4.64284L5.05458 8.17537H2.33724L3.69174 4.64284ZM10.8989 5.20703C9.25818 5.20703 8.00915 6.68569 8.00915 8.60972C8.00915 10.6337 9.35818 12.0124 10.8989 12.0124C11.7214 12.0124 12.5744 11.6692 13.1543 11.0219V11.53C13.1543 11.7785 13.3557 11.98 13.6043 11.98C13.8528 11.98 14.0543 11.7785 14.0543 11.53V5.72C14.0543 5.47147 13.8528 5.27 13.6043 5.27C13.3557 5.27 13.1543 5.47147 13.1543 5.72V6.22317C12.6054 5.60095 11.7924 5.20703 10.8989 5.20703ZM13.1543 9.79823V7.30195C12.7639 6.58101 11.9414 6.05757 11.0868 6.05757C10.1088 6.05757 9.03503 6.96581 9.03503 8.60955C9.03503 10.1533 10.0088 11.1615 11.0868 11.1615C11.9701 11.1615 12.7719 10.4952 13.1543 9.79823Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),Li=["color"],Fn=he(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=ge(e,Li);return Q("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),Q("path",{d:"M3.69899 5.20703C2.05823 5.20703 0.809204 6.68569 0.809204 8.60972C0.809204 10.6337 2.15823 12.0124 3.69899 12.0124C4.52126 12.0124 5.37402 11.6693 5.9539 11.0223V11.53C5.9539 11.7785 6.15537 11.98 6.4039 11.98C6.65243 11.98 6.8539 11.7785 6.8539 11.53V5.72001C6.8539 5.47149 6.65243 5.27001 6.4039 5.27001C6.15537 5.27001 5.9539 5.47149 5.9539 5.72001V6.22269C5.40506 5.60075 4.59218 5.20703 3.69899 5.20703ZM5.9539 9.799V7.30117C5.56339 6.58064 4.74118 6.05757 3.8868 6.05757C2.9089 6.05757 1.83508 6.96581 1.83508 8.60955C1.83508 10.1533 2.80889 11.1615 3.8868 11.1615C4.76984 11.1615 5.57141 10.4957 5.9539 9.799ZM10.799 5.20703C9.15823 5.20703 7.9092 6.68569 7.9092 8.60972C7.9092 10.6337 9.25823 12.0124 10.799 12.0124C11.6215 12.0124 12.4744 11.6692 13.0543 11.0218V11.53C13.0543 11.7785 13.2558 11.98 13.5043 11.98C13.7529 11.98 13.9543 11.7785 13.9543 11.53V5.72C13.9543 5.47147 13.7529 5.27 13.5043 5.27C13.2558 5.27 13.0543 5.47147 13.0543 5.72V6.22318C12.5055 5.60095 11.6924 5.20703 10.799 5.20703ZM13.0543 9.79822V7.30196C12.664 6.58102 11.8415 6.05757 10.9868 6.05757C10.0089 6.05757 8.93508 6.96581 8.93508 8.60955C8.93508 10.1533 9.90889 11.1615 10.9868 11.1615C11.8702 11.1615 12.672 10.4952 13.0543 9.79822Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var wi=["color"],$n=he(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=ge(e,wi);return Q("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),Q("path",{d:"M3.6255 2.75C3.83478 2.75 4.02192 2.88034 4.09448 3.07664L7.16985 11.3962C7.2656 11.6552 7.13324 11.9428 6.87423 12.0386C6.61522 12.1343 6.32763 12.002 6.23188 11.7429L5.22387 9.01603H2.02712L1.01911 11.7429C0.923362 12.002 0.635774 12.1343 0.376762 12.0386C0.117749 11.9428 -0.0146052 11.6552 0.0811401 11.3962L3.15651 3.07664C3.22908 2.88034 3.41621 2.75 3.6255 2.75ZM3.6255 4.69207L4.90966 8.16603H2.34133L3.6255 4.69207ZM11.3719 2.75C11.5811 2.75 11.7683 2.88034 11.8408 3.07664L14.9162 11.3962C15.012 11.6552 14.8796 11.9428 14.6206 12.0386C14.3616 12.1343 14.074 12.002 13.9782 11.7429L12.9702 9.01603H9.77348L8.76547 11.7429C8.66972 12.002 8.38213 12.1343 8.12312 12.0386C7.86411 11.9428 7.73175 11.6552 7.8275 11.3962L10.9029 3.07664C10.9754 2.88034 11.1626 2.75 11.3719 2.75ZM11.3719 4.69207L12.656 8.16603H10.0877L11.3719 4.69207Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),bi=["color"],Nn=he(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=ge(e,bi);return Q("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),Q("path",{d:"M4.55293 0.999969C4.75295 0.999969 4.93372 1.11917 5.0125 1.30301L8.01106 8.29982C8.11984 8.55363 8.00226 8.84757 7.74844 8.95635C7.49463 9.06512 7.20069 8.94754 7.09191 8.69373L6.11613 6.41685H2.98973L2.01395 8.69373C1.90517 8.94754 1.61123 9.06512 1.35742 8.95635C1.1036 8.84757 0.986023 8.55363 1.0948 8.29982L4.09336 1.30301C4.17214 1.11917 4.35291 0.999969 4.55293 0.999969ZM4.55293 2.76929L5.75186 5.56685H3.354L4.55293 2.76929ZM11.0562 9.00214C11.2617 9.00214 11.4463 8.87633 11.5215 8.68502L14.2733 1.68299C14.3743 1.42598 14.2478 1.13575 13.9908 1.03475C13.7338 0.933747 13.4436 1.06021 13.3426 1.31722L11.0562 7.13514L8.76973 1.31722C8.66873 1.06021 8.3785 0.933747 8.1215 1.03475C7.86449 1.13575 7.73802 1.42598 7.83902 1.68299L10.5908 8.68502C10.666 8.87633 10.8506 9.00214 11.0562 9.00214ZM14.9537 12.4999C14.9537 12.606 14.9115 12.7077 14.8365 12.7828L12.8365 14.7828C12.6803 14.939 12.4271 14.939 12.2708 14.7828C12.1146 14.6265 12.1146 14.3733 12.2708 14.2171L13.588 12.8999H1.51937L2.83653 14.2171C2.99274 14.3733 2.99274 14.6265 2.83653 14.7828C2.68032 14.939 2.42705 14.939 2.27084 14.7828L0.270843 12.7828C0.195828 12.7077 0.153687 12.606 0.153687 12.4999C0.153687 12.3938 0.195828 12.2921 0.270843 12.2171L2.27084 10.2171C2.42705 10.0609 2.68032 10.0609 2.83653 10.2171C2.99274 10.3733 2.99274 10.6265 2.83653 10.7828L1.51937 12.0999L13.588 12.0999L12.2708 10.7828C12.1146 10.6265 12.1146 10.3733 12.2708 10.2171C12.4271 10.0609 12.6803 10.0609 12.8365 10.2171L14.8365 12.2171C14.9115 12.2921 14.9537 12.3938 14.9537 12.4999Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Ii=["color"],Un=he(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=ge(e,Ii);return Q("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),Q("path",{d:"M3.78233 2.21713C3.70732 2.14212 3.60557 2.09998 3.49949 2.09998C3.3934 2.09998 3.29166 2.14212 3.21664 2.21713L1.21664 4.21713C1.06044 4.37334 1.06044 4.62661 1.21664 4.78282C1.37285 4.93903 1.62612 4.93903 1.78233 4.78282L3.09949 3.46566L3.09949 11.5343L1.78233 10.2171C1.62612 10.0609 1.37285 10.0609 1.21664 10.2171C1.06043 10.3733 1.06043 10.6266 1.21664 10.7828L3.21664 12.7828C3.29166 12.8578 3.3934 12.9 3.49949 12.9C3.60557 12.9 3.70731 12.8578 3.78233 12.7828L5.78233 10.7828C5.93854 10.6266 5.93854 10.3733 5.78233 10.2171C5.62612 10.0609 5.37285 10.0609 5.21664 10.2171L3.89949 11.5343L3.89949 3.46566L5.21664 4.78282C5.37285 4.93903 5.62612 4.93903 5.78233 4.78282C5.93854 4.62661 5.93854 4.37334 5.78233 4.21713L3.78233 2.21713ZM8.49998 3.99997C8.22383 3.99997 7.99998 4.22382 7.99998 4.49997C7.99998 4.77611 8.22383 4.99997 8.49998 4.99997H14.5C14.7761 4.99997 15 4.77611 15 4.49997C15 4.22382 14.7761 3.99997 14.5 3.99997H8.49998ZM7.99998 7.49997C7.99998 7.22382 8.22383 6.99997 8.49998 6.99997H14.5C14.7761 6.99997 15 7.22382 15 7.49997C15 7.77611 14.7761 7.99997 14.5 7.99997H8.49998C8.22383 7.99997 7.99998 7.77611 7.99998 7.49997ZM8.49998 9.99997C8.22383 9.99997 7.99998 10.2238 7.99998 10.5C7.99998 10.7761 8.22383 11 8.49998 11H14.5C14.7761 11 15 10.7761 15 10.5C15 10.2238 14.7761 9.99997 14.5 9.99997H8.49998Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),yi=["color"],qn=he(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=ge(e,yi);return Q("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),Q("path",{d:"M4.62471 4.00001L4.56402 4.00001C4.04134 3.99993 3.70687 3.99988 3.4182 4.055C2.2379 4.28039 1.29846 5.17053 1.05815 6.33035C0.999538 6.61321 0.999604 6.93998 0.999703 7.43689L0.999711 7.50001L0.999703 7.56313C0.999604 8.06004 0.999538 8.38681 1.05815 8.66967C1.29846 9.8295 2.2379 10.7196 3.4182 10.945C3.70688 11.0001 4.04135 11.0001 4.56403 11L4.62471 11H5.49971C5.77585 11 5.99971 10.7762 5.99971 10.5C5.99971 10.2239 5.77585 10 5.49971 10H4.62471C4.02084 10 3.78907 9.99777 3.60577 9.96277C2.80262 9.8094 2.19157 9.21108 2.03735 8.46678C2.00233 8.29778 1.99971 8.08251 1.99971 7.50001C1.99971 6.91752 2.00233 6.70225 2.03735 6.53324C2.19157 5.78895 2.80262 5.19062 3.60577 5.03725C3.78907 5.00225 4.02084 5.00001 4.62471 5.00001H5.49971C5.77585 5.00001 5.99971 4.77615 5.99971 4.50001C5.99971 4.22387 5.77585 4.00001 5.49971 4.00001H4.62471ZM10.3747 5.00001C10.9786 5.00001 11.2104 5.00225 11.3937 5.03725C12.1968 5.19062 12.8079 5.78895 12.9621 6.53324C12.9971 6.70225 12.9997 6.91752 12.9997 7.50001C12.9997 8.08251 12.9971 8.29778 12.9621 8.46678C12.8079 9.21108 12.1968 9.8094 11.3937 9.96277C11.2104 9.99777 10.9786 10 10.3747 10H9.49971C9.22357 10 8.99971 10.2239 8.99971 10.5C8.99971 10.7762 9.22357 11 9.49971 11H10.3747L10.4354 11C10.9581 11.0001 11.2925 11.0001 11.5812 10.945C12.7615 10.7196 13.701 9.8295 13.9413 8.66967C13.9999 8.38681 13.9998 8.06005 13.9997 7.56314L13.9997 7.50001L13.9997 7.43688C13.9998 6.93998 13.9999 6.61321 13.9413 6.33035C13.701 5.17053 12.7615 4.28039 11.5812 4.055C11.2925 3.99988 10.9581 3.99993 10.4354 4.00001L10.3747 4.00001H9.49971C9.22357 4.00001 8.99971 4.22387 8.99971 4.50001C8.99971 4.77615 9.22357 5.00001 9.49971 5.00001H10.3747ZM5.00038 7C4.72424 7 4.50038 7.22386 4.50038 7.5C4.50038 7.77614 4.72424 8 5.00038 8H10.0004C10.2765 8 10.5004 7.77614 10.5004 7.5C10.5004 7.22386 10.2765 7 10.0004 7H5.00038Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Mi=["color"],zn=he(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=ge(e,Mi);return Q("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),Q("path",{d:"M4.56427 3.99988C4.58422 3.99989 4.60445 3.99989 4.62496 3.99989H5.49996C5.7761 3.99989 5.99996 4.22375 5.99996 4.49989C5.99996 4.77603 5.7761 4.99989 5.49996 4.99989H4.62496C4.02108 4.99989 3.78932 5.00213 3.60601 5.03713C2.80287 5.1905 2.19181 5.78883 2.03759 6.53312C2.00257 6.70212 1.99996 6.91739 1.99996 7.49989C1.99996 8.08239 2.00257 8.29766 2.03759 8.46666C2.19181 9.21095 2.80287 9.80928 3.60601 9.96265C3.78932 9.99765 4.02108 9.99989 4.62496 9.99989H5.49996C5.7761 9.99989 5.99996 10.2237 5.99996 10.4999C5.99996 10.776 5.7761 10.9999 5.49996 10.9999H4.62496C4.60445 10.9999 4.58422 10.9999 4.56427 10.9999C4.04159 11 3.70712 11 3.41845 10.9449C2.23814 10.7195 1.29871 9.82937 1.05839 8.66955C0.999782 8.38669 0.999848 8.05992 0.999947 7.56301C0.999951 7.54227 0.999955 7.52123 0.999955 7.49989C0.999955 7.47855 0.999951 7.45751 0.999947 7.43677C0.999848 6.93986 0.999782 6.61309 1.05839 6.33023C1.29871 5.17041 2.23814 4.28027 3.41845 4.05488C3.70712 3.99976 4.04159 3.99981 4.56427 3.99988ZM11.3939 5.03713C11.2106 5.00213 10.9788 4.99989 10.375 4.99989H9.49996C9.22381 4.99989 8.99996 4.77603 8.99996 4.49989C8.99996 4.22375 9.22381 3.99989 9.49996 3.99989H10.375C10.3955 3.99989 10.4157 3.99989 10.4356 3.99988C10.9583 3.99981 11.2928 3.99976 11.5815 4.05488C12.7618 4.28027 13.7012 5.17041 13.9415 6.33023C14.0001 6.61309 14.0001 6.93985 14 7.43676C14 7.4575 14 7.47854 14 7.49989C14 7.52124 14 7.54228 14 7.56302C14.0001 8.05992 14.0001 8.38669 13.9415 8.66955C13.7012 9.82937 12.7618 10.7195 11.5815 10.9449C11.2928 11 10.9583 11 10.4356 10.9999C10.4157 10.9999 10.3955 10.9999 10.375 10.9999H9.49996C9.22381 10.9999 8.99996 10.776 8.99996 10.4999C8.99996 10.2237 9.22381 9.99989 9.49996 9.99989H10.375C10.9788 9.99989 11.2106 9.99765 11.3939 9.96265C12.197 9.80928 12.8081 9.21095 12.9623 8.46666C12.9973 8.29766 13 8.08239 13 7.49989C13 6.91739 12.9973 6.70212 12.9623 6.53312C12.8081 5.78883 12.197 5.1905 11.3939 5.03713Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Si=["color"],jn=he(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=ge(e,Si);return Q("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),Q("path",{d:"M5.00003 3.25C5.00003 2.97386 4.77617 2.75 4.50003 2.75C4.22389 2.75 4.00003 2.97386 4.00003 3.25V7.10003H2.49998C2.27906 7.10003 2.09998 7.27912 2.09998 7.50003C2.09998 7.72094 2.27906 7.90003 2.49998 7.90003H4.00003V8.55C4.00003 10.483 5.56703 12.05 7.50003 12.05C9.43303 12.05 11 10.483 11 8.55V7.90003H12.5C12.7209 7.90003 12.9 7.72094 12.9 7.50003C12.9 7.27912 12.7209 7.10003 12.5 7.10003H11V3.25C11 2.97386 10.7762 2.75 10.5 2.75C10.2239 2.75 10 2.97386 10 3.25V7.10003H5.00003V3.25ZM5.00003 7.90003V8.55C5.00003 9.93071 6.11932 11.05 7.50003 11.05C8.88074 11.05 10 9.93071 10 8.55V7.90003H5.00003Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Ri=["color"],Kn=he(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=ge(e,Ri);return Q("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),Q("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM4 7.5C4 7.22386 4.22386 7 4.5 7H10.5C10.7761 7 11 7.22386 11 7.5C11 7.77614 10.7761 8 10.5 8H4.5C4.22386 8 4 7.77614 4 7.5ZM3 10.5C3 10.2239 3.22386 10 3.5 10H11.5C11.7761 10 12 10.2239 12 10.5C12 10.7761 11.7761 11 11.5 11H3.5C3.22386 11 3 10.7761 3 10.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),Hi=["color"],Gn=he(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=ge(e,Hi);return Q("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),Q("path",{d:"M2.5 4C2.22386 4 2 4.22386 2 4.5C2 4.77614 2.22386 5 2.5 5H12.5C12.7761 5 13 4.77614 13 4.5C13 4.22386 12.7761 4 12.5 4H2.5ZM2 7.5C2 7.22386 2.22386 7 2.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H2.5C2.22386 8 2 7.77614 2 7.5ZM2 10.5C2 10.2239 2.22386 10 2.5 10H12.5C12.7761 10 13 10.2239 13 10.5C13 10.7761 12.7761 11 12.5 11H2.5C2.22386 11 2 10.7761 2 10.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),ki=["color"],Wn=he(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=ge(e,ki);return Q("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),Q("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM2 7.5C2 7.22386 2.22386 7 2.5 7H7.5C7.77614 7 8 7.22386 8 7.5C8 7.77614 7.77614 8 7.5 8H2.5C2.22386 8 2 7.77614 2 7.5ZM2 10.5C2 10.2239 2.22386 10 2.5 10H10.5C10.7761 10 11 10.2239 11 10.5C11 10.7761 10.7761 11 10.5 11H2.5C2.22386 11 2 10.7761 2 10.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Pi=["color"],Xn=he(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=ge(e,Pi);return Q("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),Q("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM7 7.5C7 7.22386 7.22386 7 7.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H7.5C7.22386 8 7 7.77614 7 7.5ZM4 10.5C4 10.2239 4.22386 10 4.5 10H12.5C12.7761 10 13 10.2239 13 10.5C13 10.7761 12.7761 11 12.5 11H4.5C4.22386 11 4 10.7761 4 10.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Ti=["color"],Qn=he(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=ge(e,Ti);return Q("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),Q("path",{d:"M4 6H11L7.5 10.5L4 6Z",fill:a}))});var Vi=["color"],Jn=he(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=ge(e,Vi);return Q("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),Q("path",{d:"M4 9H11L7.5 4.5L4 9Z",fill:a}))});var _i=["color"],Yn=he(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=ge(e,_i);return Q("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),Q("path",{d:"M5.00001 2.75C5.00001 2.47386 4.77615 2.25 4.50001 2.25C4.22387 2.25 4.00001 2.47386 4.00001 2.75V8.05C4.00001 9.983 5.56702 11.55 7.50001 11.55C9.43301 11.55 11 9.983 11 8.05V2.75C11 2.47386 10.7762 2.25 10.5 2.25C10.2239 2.25 10 2.47386 10 2.75V8.05C10 9.43071 8.88072 10.55 7.50001 10.55C6.1193 10.55 5.00001 9.43071 5.00001 8.05V2.75ZM3.49998 13.1001C3.27906 13.1001 3.09998 13.2791 3.09998 13.5001C3.09998 13.721 3.27906 13.9001 3.49998 13.9001H11.5C11.7209 13.9001 11.9 13.721 11.9 13.5001C11.9 13.2791 11.7209 13.1001 11.5 13.1001H3.49998Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Di=["color"],e9=he(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=ge(e,Di);return Q("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),Q("path",{d:"M4.81812 4.68161C4.99386 4.85734 4.99386 5.14227 4.81812 5.318L3.08632 7.0498H11.9135L10.1817 5.318C10.006 5.14227 10.006 4.85734 10.1817 4.68161C10.3575 4.50587 10.6424 4.50587 10.8181 4.68161L13.3181 7.18161C13.4939 7.35734 13.4939 7.64227 13.3181 7.818L10.8181 10.318C10.6424 10.4937 10.3575 10.4937 10.1817 10.318C10.006 10.1423 10.006 9.85734 10.1817 9.68161L11.9135 7.9498H3.08632L4.81812 9.68161C4.99386 9.85734 4.99386 10.1423 4.81812 10.318C4.64239 10.4937 4.35746 10.4937 4.18173 10.318L1.68173 7.818C1.50599 7.64227 1.50599 7.35734 1.68173 7.18161L4.18173 4.68161C4.35746 4.50587 4.64239 4.50587 4.81812 4.68161Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});import ve from"react";import{createRoot as b8}from"react-dom/client";import t9 from"react";import{jsx as Ga,jsxs as o9}from"react/jsx-runtime";function tt({title:e,defaultOpen:t=!0,children:o}){let[a,r]=t9.useState(t),l=t9.useCallback(n=>{r(n.currentTarget.open)},[]);return o9("details",{className:"property-panel-section",open:a,onToggle:l,children:[o9("summary",{className:"property-panel-section-trigger",children:[Ga("span",{children:e}),Ga(_n,{className:"property-panel-section-chevron",width:12,height:12,"aria-hidden":"true"})]}),Ga("div",{className:"property-panel-section-content",children:o})]})}var a9=["H1","H2","H3","H4","H5","H6","P","SPAN","A","BUTTON","LABEL"];import c1 from"react";import*as H1 from"react";import{jsx as Oi}from"react/jsx-runtime";function gt(e,t=[]){let o=[];function a(l,n){let i=H1.createContext(n),s=o.length;o=[...o,n];let d=f=>{let{scope:p,children:c,...x}=f,w=p?.[e]?.[s]||i,C=H1.useMemo(()=>x,Object.values(x));return Oi(w.Provider,{value:C,children:c})};d.displayName=l+"Provider";function u(f,p){let c=p?.[e]?.[s]||i,x=H1.useContext(c);if(x)return x;if(n!==void 0)return n;throw new Error(`\`${f}\` must be used within \`${l}\``)}return[d,u]}let r=()=>{let l=o.map(n=>H1.createContext(n));return function(i){let s=i?.[e]||l;return H1.useMemo(()=>({[`__scope${e}`]:{...i,[e]:s}}),[i,s])}};return r.scopeName=e,[a,Ei(r,...t)]}function Ei(...e){let t=e[0];if(e.length===1)return t;let o=()=>{let a=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(l){let n=a.reduce((i,{useScope:s,scopeName:d})=>{let f=s(l)[`__scope${d}`];return{...i,...f}},{});return H1.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])}};return o.scopeName=t.scopeName,o}import*as i9 from"react";import*as Ni from"react-dom";import*as Me from"react";import*as l9 from"react";function r9(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Wa(...e){return t=>{let o=!1,a=e.map(r=>{let l=r9(r,t);return!o&&typeof l=="function"&&(o=!0),l});if(o)return()=>{for(let r=0;r<a.length;r++){let l=a[r];typeof l=="function"?l():r9(e[r],null)}}}}function Gt(...e){return l9.useCallback(Wa(...e),e)}import{Fragment as Y8,jsx as n9}from"react/jsx-runtime";function Wt(e){let t=Bi(e),o=Me.forwardRef((a,r)=>{let{children:l,...n}=a,i=Me.Children.toArray(l),s=i.find(Zi);if(s){let d=s.props.children,u=i.map(f=>f===s?Me.Children.count(d)>1?Me.Children.only(null):Me.isValidElement(d)?d.props.children:null:f);return n9(t,{...n,ref:r,children:Me.isValidElement(d)?Me.cloneElement(d,void 0,u):null})}return n9(t,{...n,ref:r,children:l})});return o.displayName=`${e}.Slot`,o}function Bi(e){let t=Me.forwardRef((o,a)=>{let{children:r,...l}=o;if(Me.isValidElement(r)){let n=$i(r),i=Fi(l,r.props);return r.type!==Me.Fragment&&(i.ref=a?Wa(a,n):n),Me.cloneElement(r,i)}return Me.Children.count(r)>1?Me.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ai=Symbol("radix.slottable");function Zi(e){return Me.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ai}function Fi(e,t){let o={...t};for(let a in t){let r=e[a],l=t[a];/^on[A-Z]/.test(a)?r&&l?o[a]=(...i)=>{let s=l(...i);return r(...i),s}:r&&(o[a]=r):a==="style"?o[a]={...r,...l}:a==="className"&&(o[a]=[r,l].filter(Boolean).join(" "))}return{...e,...o}}function $i(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}import{jsx as Ui}from"react/jsx-runtime";var qi=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],E1=qi.reduce((e,t)=>{let o=Wt(`Primitive.${t}`),a=i9.forwardRef((r,l)=>{let{asChild:n,...i}=r,s=n?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),Ui(s,{...i,ref:l})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});import*as He from"react";var rc=!!(typeof window<"u"&&window.document&&window.document.createElement);function k1(e,t,{checkForDefaultPrevented:o=!0}={}){return function(r){if(e?.(r),o===!1||!r.defaultPrevented)return t?.(r)}}import ot from"react";import{jsx as Xa}from"react/jsx-runtime";import mc from"react";import{jsx as gc}from"react/jsx-runtime";function s9(e){let t=e+"CollectionProvider",[o,a]=gt(t),[r,l]=o(t,{collectionRef:{current:null},itemMap:new Map}),n=w=>{let{scope:C,children:y}=w,g=ot.useRef(null),k=ot.useRef(new Map).current;return Xa(r,{scope:C,itemMap:k,collectionRef:g,children:y})};n.displayName=t;let i=e+"CollectionSlot",s=Wt(i),d=ot.forwardRef((w,C)=>{let{scope:y,children:g}=w,k=l(i,y),m=Gt(C,k.collectionRef);return Xa(s,{ref:m,children:g})});d.displayName=i;let u=e+"CollectionItemSlot",f="data-radix-collection-item",p=Wt(u),c=ot.forwardRef((w,C)=>{let{scope:y,children:g,...k}=w,m=ot.useRef(null),V=Gt(C,m),H=l(u,y);return ot.useEffect(()=>(H.itemMap.set(m,{ref:m,...k}),()=>{H.itemMap.delete(m)})),Xa(p,{[f]:"",ref:V,children:g})});c.displayName=u;function x(w){let C=l(e+"CollectionConsumer",w);return ot.useCallback(()=>{let g=C.collectionRef.current;if(!g)return[];let k=Array.from(g.querySelectorAll(`[${f}]`));return Array.from(C.itemMap.values()).sort((H,q)=>k.indexOf(H.ref.current)-k.indexOf(q.ref.current))},[C.collectionRef,C.itemMap])}return[{Provider:n,Slot:d,ItemSlot:c},x,a]}import*as Qa from"react";import*as d9 from"react";var ko=globalThis?.document?d9.useLayoutEffect:()=>{};var zi=Qa[" useId ".trim().toString()]||(()=>{}),ji=0;function u9(e){let[t,o]=Qa.useState(zi());return ko(()=>{e||o(a=>a??String(ji++))},[e]),e||(t?`radix-${t}`:"")}import*as vt from"react";function c9(e){let t=vt.useRef(e);return vt.useEffect(()=>{t.current=e}),vt.useMemo(()=>(...o)=>t.current?.(...o),[])}import*as e1 from"react";import*as Po from"react";var Ki=e1[" useInsertionEffect ".trim().toString()]||ko;function at({prop:e,defaultProp:t,onChange:o=()=>{},caller:a}){let[r,l,n]=Gi({defaultProp:t,onChange:o}),i=e!==void 0,s=i?e:r;{let u=e1.useRef(e!==void 0);e1.useEffect(()=>{let f=u.current;f!==i&&console.warn(`${a} is changing from ${f?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=i},[i,a])}let d=e1.useCallback(u=>{if(i){let f=Wi(u)?u(e):u;f!==e&&n.current?.(f)}else l(u)},[i,e,l,n]);return[s,d]}function Gi({defaultProp:e,onChange:t}){let[o,a]=e1.useState(e),r=e1.useRef(o),l=e1.useRef(t);return Ki(()=>{l.current=t},[t]),e1.useEffect(()=>{r.current!==o&&(l.current?.(o),r.current=o)},[o,r]),[o,a,l]}function Wi(e){return typeof e=="function"}import*as To from"react";import{jsx as Rc}from"react/jsx-runtime";var Xi=To.createContext(void 0);function Vo(e){let t=To.useContext(Xi);return e||t||"ltr"}import{jsx as rt}from"react/jsx-runtime";var Ja="rovingFocusGroup.onEntryFocus",Qi={bubbles:!1,cancelable:!0},Xt="RovingFocusGroup",[Ya,f9,Ji]=s9(Xt),[Yi,er]=gt(Xt,[Ji]),[es,ts]=Yi(Xt),p9=He.forwardRef((e,t)=>rt(Ya.Provider,{scope:e.__scopeRovingFocusGroup,children:rt(Ya.Slot,{scope:e.__scopeRovingFocusGroup,children:rt(os,{...e,ref:t})})}));p9.displayName=Xt;var os=He.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:o,orientation:a,loop:r=!1,dir:l,currentTabStopId:n,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:s,onEntryFocus:d,preventScrollOnEntryFocus:u=!1,...f}=e,p=He.useRef(null),c=Gt(t,p),x=Vo(l),[w,C]=at({prop:n,defaultProp:i??null,onChange:s,caller:Xt}),[y,g]=He.useState(!1),k=c9(d),m=f9(o),V=He.useRef(!1),[H,q]=He.useState(0);return He.useEffect(()=>{let M=p.current;if(M)return M.addEventListener(Ja,k),()=>M.removeEventListener(Ja,k)},[k]),rt(es,{scope:o,orientation:a,dir:x,loop:r,currentTabStopId:w,onItemFocus:He.useCallback(M=>C(M),[C]),onItemShiftTab:He.useCallback(()=>g(!0),[]),onFocusableItemAdd:He.useCallback(()=>q(M=>M+1),[]),onFocusableItemRemove:He.useCallback(()=>q(M=>M-1),[]),children:rt(E1.div,{tabIndex:y||H===0?-1:0,"data-orientation":a,...f,ref:c,style:{outline:"none",...e.style},onMouseDown:k1(e.onMouseDown,()=>{V.current=!0}),onFocus:k1(e.onFocus,M=>{let A=!V.current;if(M.target===M.currentTarget&&A&&!y){let K=new CustomEvent(Ja,Qi);if(M.currentTarget.dispatchEvent(K),!K.defaultPrevented){let U=m().filter(b=>b.focusable),ae=U.find(b=>b.active),B=U.find(b=>b.id===w),S=[ae,B,...U].filter(Boolean).map(b=>b.ref.current);h9(S,u)}}V.current=!1}),onBlur:k1(e.onBlur,()=>g(!1))})})}),C9="RovingFocusGroupItem",m9=He.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:o,focusable:a=!0,active:r=!1,tabStopId:l,children:n,...i}=e,s=u9(),d=l||s,u=ts(C9,o),f=u.currentTabStopId===d,p=f9(o),{onFocusableItemAdd:c,onFocusableItemRemove:x,currentTabStopId:w}=u;return He.useEffect(()=>{if(a)return c(),()=>x()},[a,c,x]),rt(Ya.ItemSlot,{scope:o,id:d,focusable:a,active:r,children:rt(E1.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...i,ref:t,onMouseDown:k1(e.onMouseDown,C=>{a?u.onItemFocus(d):C.preventDefault()}),onFocus:k1(e.onFocus,()=>u.onItemFocus(d)),onKeyDown:k1(e.onKeyDown,C=>{if(C.key==="Tab"&&C.shiftKey){u.onItemShiftTab();return}if(C.target!==C.currentTarget)return;let y=ls(C,u.orientation,u.dir);if(y!==void 0){if(C.metaKey||C.ctrlKey||C.altKey||C.shiftKey)return;C.preventDefault();let k=p().filter(m=>m.focusable).map(m=>m.ref.current);if(y==="last")k.reverse();else if(y==="prev"||y==="next"){y==="prev"&&k.reverse();let m=k.indexOf(C.currentTarget);k=u.loop?ns(k,m+1):k.slice(m+1)}setTimeout(()=>h9(k))}}),children:typeof n=="function"?n({isCurrentTabStop:f,hasTabStop:w!=null}):n})})});m9.displayName=C9;var as={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function rs(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function ls(e,t,o){let a=rs(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return as[a]}function h9(e,t=!1){let o=document.activeElement;for(let a of e)if(a===o||(a.focus({preventScroll:t}),document.activeElement!==o))return}function ns(e,t){return e.map((o,a)=>e[(t+a)%e.length])}var g9=p9,v9=m9;import*as x9 from"react";import{jsx as ss}from"react/jsx-runtime";var L9="Toggle",tr=x9.forwardRef((e,t)=>{let{pressed:o,defaultPressed:a,onPressedChange:r,...l}=e,[n,i]=at({prop:o,onChange:r,defaultProp:a??!1,caller:L9});return ss(E1.button,{type:"button","aria-pressed":n,"data-state":n?"on":"off","data-disabled":e.disabled?"":void 0,...l,ref:t,onClick:k1(e.onClick,()=>{e.disabled||i(!n)})})});tr.displayName=L9;import{jsx as $e}from"react/jsx-runtime";var B1="ToggleGroup",[b9,Jc]=gt(B1,[er]),I9=er(),or=c1.forwardRef((e,t)=>{let{type:o,...a}=e;if(o==="single")return $e(ds,{...a,ref:t});if(o==="multiple")return $e(us,{...a,ref:t});throw new Error(`Missing prop \`type\` expected on \`${B1}\``)});or.displayName=B1;var[y9,M9]=b9(B1),ds=c1.forwardRef((e,t)=>{let{value:o,defaultValue:a,onValueChange:r=()=>{},...l}=e,[n,i]=at({prop:o,defaultProp:a??"",onChange:r,caller:B1});return $e(y9,{scope:e.__scopeToggleGroup,type:"single",value:c1.useMemo(()=>n?[n]:[],[n]),onItemActivate:i,onItemDeactivate:c1.useCallback(()=>i(""),[i]),children:$e(S9,{...l,ref:t})})}),us=c1.forwardRef((e,t)=>{let{value:o,defaultValue:a,onValueChange:r=()=>{},...l}=e,[n,i]=at({prop:o,defaultProp:a??[],onChange:r,caller:B1}),s=c1.useCallback(u=>i((f=[])=>[...f,u]),[i]),d=c1.useCallback(u=>i((f=[])=>f.filter(p=>p!==u)),[i]);return $e(y9,{scope:e.__scopeToggleGroup,type:"multiple",value:n,onItemActivate:s,onItemDeactivate:d,children:$e(S9,{...l,ref:t})})});or.displayName=B1;var[cs,fs]=b9(B1),S9=c1.forwardRef((e,t)=>{let{__scopeToggleGroup:o,disabled:a=!1,rovingFocus:r=!0,orientation:l,dir:n,loop:i=!0,...s}=e,d=I9(o),u=Vo(n),f={role:"group",dir:u,...s};return $e(cs,{scope:o,rovingFocus:r,disabled:a,children:r?$e(g9,{asChild:!0,...d,orientation:l,dir:u,loop:i,children:$e(E1.div,{...f,ref:t})}):$e(E1.div,{...f,ref:t})})}),_o="ToggleGroupItem",R9=c1.forwardRef((e,t)=>{let o=M9(_o,e.__scopeToggleGroup),a=fs(_o,e.__scopeToggleGroup),r=I9(e.__scopeToggleGroup),l=o.value.includes(e.value),n=a.disabled||e.disabled,i={...e,pressed:l,disabled:n},s=c1.useRef(null);return a.rovingFocus?$e(v9,{asChild:!0,...r,focusable:!n,active:l,ref:s,children:$e(w9,{...i,ref:t})}):$e(w9,{...i,ref:t})});R9.displayName=_o;var w9=c1.forwardRef((e,t)=>{let{__scopeToggleGroup:o,value:a,...r}=e,l=M9(_o,o),n={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},i=l.type==="single"?n:void 0;return $e(tr,{...i,...r,ref:t,onPressedChange:s=>{s?l.onItemActivate(a):l.onItemDeactivate(a)}})}),H9=or,k9=R9;import vs from"react";import{jsx as hs,jsxs as gs}from"react/jsx-runtime";var Cs={border:"none",margin:0,padding:0,minWidth:0},ms={color:"var(--dmp-color-foreground)",fontSize:"var(--dmp-font-size-label)",display:"block",marginBottom:"5px",padding:0};function t1({label:e,id:t,className:o,children:a}){let r=`${t}-legend`;return gs("fieldset",{style:Cs,className:o,"aria-labelledby":r,children:[hs("legend",{id:r,style:ms,children:e}),a]})}import{jsx as ar}from"react/jsx-runtime";function x1({label:e,options:t,value:o,onChange:a,id:r="radio-group"}){let l=vs.useCallback(n=>{n&&typeof a=="function"&&a(n)},[a]);return ar(t1,{label:e,id:r,className:"radioGroupEditor-fieldset",children:ar(H9,{type:"single",value:o,onValueChange:l,className:"radioGroupEditor-root","aria-label":e,children:t.map(n=>ar(k9,{value:n.value,className:"radioGroupEditor-item","aria-label":n.label,title:n.label,children:n.icon??n.label},n.value))})})}import{jsx as Qt}from"react/jsx-runtime";var T9=[{value:"none",labelKey:"none",defaultLabel:"None",icon:Qt(ht,{width:14,height:14})},{value:"solid",labelKey:"solid",defaultLabel:"Solid",icon:Qt(Vn,{width:14,height:14})},{value:"dashed",labelKey:"dashed",defaultLabel:"Dashed",icon:Qt(Pn,{width:14,height:14})},{value:"dotted",labelKey:"dotted",defaultLabel:"Dotted",icon:Qt(Tn,{width:14,height:14})}],P9=new Set(T9.map(e=>e.value));function xs(e){if(!e)return"none";if(P9.has(e))return e;let t=e.split(/\s+/)[0]??"";return P9.has(t)?t:"none"}function V9({label:e="Border Style",value:t,onChange:o,id:a="border-style",optionLabels:r}){let l=T9.map(n=>({value:n.value,label:r?.[n.labelKey]??n.defaultLabel,icon:n.icon}));return Qt(x1,{label:e,options:l,value:xs(t),onChange:o,id:a})}import Oe from"react";function Se(e,t){return e.replace(/\{(\d+)\}/g,(o,a)=>{let r=t[Number(a)];return r===void 0?o:String(r)})}function f1(e,t){if(t==null||typeof t!="object"||typeof e!="object")return e;let o={...e},a=t;for(let r of Object.keys(o)){let l=o[r],n=a[r];l!==null&&typeof l=="object"&&!Array.isArray(l)?o[r]=f1(l,n):typeof n=="string"&&(o[r]=n)}return o}var _9=[{path:"general.headerTitle"},{path:"general.emptyPlaceholder"},{path:"general.inlineEditEditable"},{path:"general.inlineEditNonEditable"},{path:"general.addToChatContext"},{path:"general.ariaPropertyPanel"},{path:"general.ariaSelectedComponent"},{path:"general.ariaElementStyling"},{path:"sections.imageSource"},{path:"sections.background"},{path:"sections.spacing"},{path:"sections.border"},{path:"sections.typography"},{path:"sections.elementDimensions"},{path:"instances.imageSource"},{path:"instances.backgroundColor"},{path:"instances.padding"},{path:"instances.margin"},{path:"instances.borderRadius"},{path:"instances.borderWeight"},{path:"instances.borderStyle"},{path:"instances.borderColor"},{path:"instances.fontFamily"},{path:"instances.fontSize"},{path:"instances.fontWeight"},{path:"instances.fontStyle"},{path:"instances.textColor"},{path:"instances.textAlignment"},{path:"instances.textFormatting"},{path:"instances.textTransform"},{path:"instances.lineHeight"},{path:"instances.letterSpacing"},{path:"instances.width"},{path:"instances.minWidth"},{path:"instances.maxWidth"},{path:"instances.height"},{path:"instances.minHeight"},{path:"instances.maxHeight"},{path:"instances.overflow"},{path:"editors.image.tabCms"},{path:"editors.image.tabLocal"},{path:"editors.image.tabUrl"},{path:"editors.image.ariaTablist"},{path:"editors.image.clearImage"},{path:"editors.image.chooseFile"},{path:"editors.image.ariaChooseFile"},{path:"editors.image.useThisImage"},{path:"editors.image.ariaImageUrl"},{path:"editors.image.urlPlaceholder"},{path:"editors.image.previewAlt"},{path:"editors.image.altText"},{path:"editors.image.altPlaceholder"},{path:"editors.image.width"},{path:"editors.image.height"},{path:"editors.image.autoPlaceholder"},{path:"editors.image.workspace"},{path:"editors.image.selectWorkspace"},{path:"editors.image.selectImage"},{path:"editors.image.loadingWorkspaces"},{path:"editors.image.noWorkspaces"},{path:"editors.image.loadingImages"},{path:"editors.image.noImages"},{path:"editors.image.loadingMore"},{path:"editors.image.untitled"},{path:"editors.image.downloadingImage"},{path:"editors.image.downloadFailed"},{path:"editors.image.closePicker"},{path:"editors.image.cancel"},{path:"editors.image.done"},{path:"editors.image.pickerTitle",placeholders:[0]},{path:"editors.image.pickerError",placeholders:[0]},{path:"editors.boxDimension.sides.top"},{path:"editors.boxDimension.sides.right"},{path:"editors.boxDimension.sides.bottom"},{path:"editors.boxDimension.sides.left"},{path:"editors.boxDimension.corners.topLeft"},{path:"editors.boxDimension.corners.topRight"},{path:"editors.boxDimension.corners.bottomRight"},{path:"editors.boxDimension.corners.bottomLeft"},{path:"editors.boxDimension.linkSides"},{path:"editors.boxDimension.unlinkSides"},{path:"editors.boxDimension.ariaUnit",placeholders:[0]},{path:"editors.boxDimension.ariaSide",placeholders:[0,1]},{path:"editors.dimension.ariaValue",placeholders:[0]},{path:"editors.dimension.ariaUnit",placeholders:[0]},{path:"editors.color.placeholder"},{path:"editors.color.ariaValue",placeholders:[0]},{path:"editors.color.ariaOpenPicker",placeholders:[0,1]},{path:"editors.color.ariaPicker",placeholders:[0]},{path:"editors.color.ariaSaturation"},{path:"editors.color.ariaEyedropper"},{path:"editors.color.ariaHue"},{path:"editors.color.ariaAlphaSlider"},{path:"editors.color.ariaHex"},{path:"editors.color.ariaChannel",placeholders:[0,1,2,3]},{path:"editors.color.ariaAlphaInput"},{path:"editors.color.ariaFormatCycle",placeholders:[0]},{path:"editors.color.titleFormatCycle"},{path:"editors.fontWeight.options.default"},{path:"editors.fontWeight.options.thin"},{path:"editors.fontWeight.options.extraLight"},{path:"editors.fontWeight.options.light"},{path:"editors.fontWeight.options.regular"},{path:"editors.fontWeight.options.medium"},{path:"editors.fontWeight.options.semiBold"},{path:"editors.fontWeight.options.bold"},{path:"editors.fontWeight.options.extraBold"},{path:"editors.fontWeight.options.black"},{path:"editors.fontStyle.options.normal"},{path:"editors.fontStyle.options.italic"},{path:"editors.borderStyle.options.none"},{path:"editors.borderStyle.options.solid"},{path:"editors.borderStyle.options.dashed"},{path:"editors.borderStyle.options.dotted"},{path:"editors.overflow.options.default"},{path:"editors.overflow.options.visible"},{path:"editors.overflow.options.hidden"},{path:"editors.overflow.options.scroll"},{path:"editors.overflow.options.auto"},{path:"editors.textAlignment.options.left"},{path:"editors.textAlignment.options.center"},{path:"editors.textAlignment.options.right"},{path:"editors.textAlignment.options.justify"},{path:"editors.textDecoration.options.none"},{path:"editors.textDecoration.options.underline"},{path:"editors.textDecoration.options.lineThrough"},{path:"editors.textTransform.options.none"},{path:"editors.textTransform.options.uppercase"},{path:"editors.textTransform.options.lowercase"},{path:"editors.textTransform.options.capitalize"},{path:"editors.fontFamily.options.default"},{path:"history.changeLimitTitle"},{path:"history.changeLimitBody",placeholders:[0]}];function Ls(e,t){return t.split(".").reduce((o,a)=>{if(o&&typeof o=="object")return o[a]},e)}function ws(e){let t=new Set;for(let o of e.matchAll(/\{(\d+)\}/g))t.add(Number(o[1]));return Array.from(t).sort((o,a)=>o-a)}function bs(e){let t=[];if(!e||typeof e!="object")return["labels is not an object"];for(let o of _9){let{path:a,placeholders:r}=o,l=Ls(e,a);if(typeof l!="string"){t.push(`missing or non-string label: ${a}`);continue}if(r){let n=ws(l),i=[...r].sort((d,u)=>d-u);(n.length!==i.length||n.some((d,u)=>d!==i[u]))&&t.push(`placeholder mismatch at ${a}: expected {${i.join(",")}}, got {${n.join(",")}}`)}}return t}var Do=[{value:"px",label:"px"},{value:"em",label:"em"},{value:"rem",label:"rem"},{value:"%",label:"%"},{value:"pt",label:"pt"},{value:"vw",label:"vw"},{value:"vh",label:"vh"},{value:"vmin",label:"vmin"},{value:"vmax",label:"vmax"},{value:"ch",label:"ch"},{value:"ex",label:"ex"},{value:"cm",label:"cm"},{value:"mm",label:"mm"},{value:"in",label:"in"},{value:"pc",label:"pc"}],p1={px:{min:0,max:1e4,step:1,decimals:1},em:{min:0,max:100,step:.1,decimals:3},rem:{min:0,max:100,step:.1,decimals:3},"%":{min:0,max:1e3,step:1,decimals:2},pt:{min:0,max:1e4,step:1,decimals:1},vw:{min:0,max:100,step:.1,decimals:1},vh:{min:0,max:100,step:.1,decimals:1},vmin:{min:0,max:100,step:.1,decimals:1},vmax:{min:0,max:100,step:.1,decimals:1},ch:{min:0,max:100,step:.1,decimals:1},ex:{min:0,max:100,step:.1,decimals:1},cm:{min:0,max:100,step:.1,decimals:2},mm:{min:0,max:1e3,step:1,decimals:1},in:{min:0,max:50,step:.01,decimals:2},pc:{min:0,max:500,step:1,decimals:0}},Is=p1.px??{min:0,max:1e4,step:1,decimals:0};function Jt(e){let t=e.map(o=>o.value).join("|");return new RegExp(`^(-?\\d*\\.?\\d+)\\s*(${t})$`)}var ys=Jt(Do);function Ne(e,t="px",o=ys){if(e==null||e==="")return{numericValue:"",unit:t};let a=String(e).trim();if(a==="")return{numericValue:"",unit:t};let r=a.match(o);if(r&&r[1]!=null&&r[2]!=null)return{numericValue:parseFloat(r[1]),unit:r[2]};let l=parseFloat(a);return isNaN(l)?{numericValue:"",unit:t}:{numericValue:l,unit:t}}function rr(e,t=p1){return t[e]||Is}function C1(e,t,o=p1){let a=rr(t,o);return Math.min(a.max,Math.max(a.min,e))}function m1(e,t,o=p1){if(e===""||e==null||isNaN(e))return"";let a=rr(t,o);return Number(Number(e).toFixed(a.decimals))}function Oo(e,t){return e===""||e==null||isNaN(e)?"":`${e}${t}`}function Eo(e,t,o,a,r=p1){let l=parseFloat(e)||0,n=rr(a,r),i=o?10:1,s=(t==="ArrowUp"?1:-1)*n.step*i,d=C1(l+s,a,r);return String(m1(d,a,r))}function lr({top:e,right:t,bottom:o,left:a}){return`${e||"0px"} ${t||"0px"} ${o||"0px"} ${a||"0px"}`}function xt(e){let t={top:"",right:"",bottom:"",left:""};if(!e||typeof e!="string")return t;let o=e.trim().split(/\s+/),[a="",r="",l="",n=""]=o;return o.length===0||o.length===1&&a===""?t:o.length===1?{top:a,right:a,bottom:a,left:a}:o.length===2?{top:a,right:r,bottom:a,left:r}:o.length===3?{top:a,right:r,bottom:l,left:r}:{top:a,right:r,bottom:l,left:n}}function o1(...e){return Do.filter(t=>e.includes(t.value))}var L1={width:{units:o1("px","em","rem","vw","ch","%"),icon:e9},minWidth:{units:o1("px","em","rem","vw","ch","%")},maxWidth:{units:o1("px","em","rem","vw","ch","%")},height:{units:o1("px","em","rem","vh","%"),icon:Bn},minHeight:{units:o1("px","em","rem","vh","%")},maxHeight:{units:o1("px","em","rem","vh","%")},fontSize:{units:o1("px","em","rem","%","pt"),constraints:{...p1,px:{min:0,max:1e3,step:1,decimals:0},"%":{min:0,max:1e3,step:1,decimals:0}},icon:En},lineHeight:{units:[],defaultUnit:"",constraints:{"":{min:0,max:10,step:.1,decimals:2}},icon:Un},letterSpacing:{units:o1("px","em","rem"),constraints:{...p1,px:{min:-100,max:1e3,step:.5,decimals:1},em:{min:-10,max:100,step:.01,decimals:3},rem:{min:-10,max:100,step:.01,decimals:3}},icon:Nn}},Yt={padding:{units:o1("px","em","rem","%")},margin:{units:o1("px","em","rem","%")},borderRadius:{units:o1("px","em","rem","%"),sideLabelKind:"corners"},borderWidth:{units:o1("px","em","rem")}};import{jsx as h1,jsxs as Bo}from"react/jsx-runtime";var Ms=[{value:"px",label:"px"},{value:"em",label:"em"},{value:"rem",label:"rem"},{value:"%",label:"%"}],Lt=["top","right","bottom","left"],Ss={sides:{top:"Top",right:"Right",bottom:"Bottom",left:"Left"},corners:{topLeft:"Top Left",topRight:"Top Right",bottomRight:"Bottom Right",bottomLeft:"Bottom Left"},linkSides:"Link all sides",unlinkSides:"Unlink sides",ariaUnit:"{0} unit",ariaSide:"{0} {1}"};function Rs(e,t){return t==="corners"?[e.corners.topLeft,e.corners.topRight,e.corners.bottomRight,e.corners.bottomLeft]:[e.sides.top,e.sides.right,e.sides.bottom,e.sides.left]}var Hs=h1(qn,{width:14,height:14}),ks=h1(zn,{width:14,height:14});function eo(e){return typeof e=="string"&&e.trim().toLowerCase()==="auto"}function nr(e,t,o){let a={top:"",right:"",bottom:"",left:""};for(let r of Lt){let l=e[r];if(l==null||l==="")a[r]="";else if(eo(l))a[r]="auto";else{let n=Ne(String(l),t,o);a[r]=n.numericValue!==""?String(n.numericValue):""}}return a}function ir(e){let t=e.top||"";return t===(e.right||"")&&t===(e.bottom||"")&&t===(e.left||"")}function D9(e,t,o){for(let a of Lt){let r=e[a];if(r!=null&&r!==""&&r!=="0"){let l=Ne(String(r),"px",t);if(l.unit&&o.has(l.unit))return l.unit}}return"px"}function Ps(e,t,o){if(eo(e))return"auto";let a=parseFloat(e);if(e===""||isNaN(a))return"";let r=C1(a,t,o);return`${m1(r,t,o)}${t}`}function O9(e){if(!e)return"";let t=xt(e);return!t.top&&!t.right&&!t.bottom&&!t.left?"":lr(t)}function to({label:e,value:t="",onChange:o,id:a="",units:r=Ms,constraints:l=p1,allowAuto:n=!1,sideLabelKind:i="sides",sideIcons:s,placeholder:d="",aria:u}){let f=f1(Ss,u),p=Rs(f,i),c=Oe.useRef(o);c.current=o;let x=Oe.useMemo(()=>Jt(r),[r]),w=Oe.useMemo(()=>new Set(r.map(S=>S.value)),[r]),C=Oe.useMemo(()=>{if(!d)return{top:"0",right:"0",bottom:"0",left:"0"};let S=xt(d),b={top:"0",right:"0",bottom:"0",left:"0"};for(let I of Lt){let L=S[I];if(!L||L==="")b[I]="0";else{let O=Ne(L,"px",x);b[I]=O.numericValue!==""?String(O.numericValue):"0"}}return b},[d,x]),y=Oe.useMemo(()=>xt(t),[]),[g,k]=Oe.useState(()=>D9(y,x,w)),[m,V]=Oe.useState(()=>nr(y,g,x)),[H,q]=Oe.useState(()=>ir(m)),M=Oe.useRef(O9(t));Oe.useEffect(()=>{if(t===M.current)return;let S=O9(t);if(S===M.current)return;M.current=S;let b=xt(t),I=D9(b,x,w);k(I);let L=nr(b,I,x);V(L),q(ir(L))},[t,x,w]);let A=Oe.useCallback((S,b)=>{let I={top:"",right:"",bottom:"",left:""},L=!0;for(let T of Lt)I[T]=Ps(S[T],b,l),I[T]!==""&&(L=!1);let O=L?"":lr(I);O!==M.current&&(M.current=O,typeof c.current=="function"&&c.current(O))},[l]),K=Oe.useCallback((S,b)=>{V(H?{top:b,right:b,bottom:b,left:b}:L=>({...L,[S]:b}));let I=Ne(b,g,x);I.numericValue!==""&&I.unit&&w.has(I.unit)&&I.unit!==g&&k(I.unit)},[H,g,x,w]),U=Oe.useCallback((S,b)=>{let I=b.clipboardData.getData("text"),L=Ne(I,g,x);if(L.numericValue!==""&&L.unit&&w.has(L.unit)){b.preventDefault();let O=C1(L.numericValue,L.unit,l),T=String(m1(O,L.unit,l)),F=H?{top:T,right:T,bottom:T,left:T}:{...m,[S]:T};V(F),L.unit!==g&&k(L.unit),A(F,L.unit)}},[H,m,g,x,w,l,A]),ae=Oe.useCallback(S=>{let b=m[S];if(b===""){let F=H?{top:"",right:"",bottom:"",left:""}:{...m,[S]:""};V(F),A(F,g);return}if(n&&eo(b)){let F="auto",$=H?{top:F,right:F,bottom:F,left:F}:{...m,[S]:F};V($),A($,g);return}let I=parseFloat(b);if(isNaN(I)){let F=xt(M.current);V(nr(F,g,x));return}let L=C1(I,g,l),O=String(m1(L,g,l)),T=H?{top:O,right:O,bottom:O,left:O}:{...m,[S]:O};V(T),A(T,g)},[m,H,g,x,l,A,n]),B=Oe.useCallback((S,b)=>{if(b.key==="Enter"){b.currentTarget.blur();return}if(b.key==="ArrowUp"||b.key==="ArrowDown"){if(eo(m[S]))return;b.preventDefault();let I=Eo(m[S],b.key,b.shiftKey,g,l);if(I===null)return;let L=H?{top:I,right:I,bottom:I,left:I}:{...m,[S]:I};V(L),A(L,g)}},[m,H,g,l,A]),Z=Oe.useCallback(S=>{let b=S.target.value;if(!w.has(b))return;k(b);let I={top:"",right:"",bottom:"",left:""};for(let L of Lt){let O=m[L];if(eo(O))I[L]="auto";else if(O!==""){let T=parseFloat(O);if(isNaN(T))I[L]=O;else{let F=C1(T,b,l);I[L]=String(m1(F,b,l))}}else I[L]=""}V(I),A(I,b)},[m,w,l,A]);return Bo(t1,{label:e,id:a,className:"boxDimensionEditor-fieldset",children:[h1("div",{className:"boxDimensionEditor-header",children:Bo("div",{className:"boxDimensionEditor-controls",children:[h1("button",{type:"button",className:"boxDimensionEditor-link-btn"+(H?" boxDimensionEditor-link-btn--active":""),onClick:()=>{if(!H){let S=m.top;if(!ir(m)){let b={top:S,right:S,bottom:S,left:S};V(b),A(b,g)}}q(S=>!S)},"aria-label":H?f.unlinkSides:f.linkSides,"aria-pressed":H,title:H?f.unlinkSides:f.linkSides,children:H?Hs:ks}),h1("select",{className:"boxDimensionEditor-unit",value:g,onChange:Z,"aria-label":Se(f.ariaUnit,[e]),children:r.map(S=>h1("option",{value:S.value,children:S.label},S.value))})]})}),h1("div",{className:"boxDimensionEditor-grid",children:Lt.map((S,b)=>{let I=s&&s[b];return Bo("div",{className:"boxDimensionEditor-cell",children:[h1("label",{htmlFor:`${a}-${S}`,className:"boxDimensionEditor-label",children:p[b]}),Bo("div",{className:"boxDimensionEditor-input-row",children:[I&&h1("span",{className:"boxDimensionEditor-input-icon","aria-hidden":"true",children:h1(I,{size:12,width:12,height:12})}),h1("input",{id:`${a}-${S}`,type:"text",className:I?"boxDimensionEditor-input boxDimensionEditor-input--with-icon":"boxDimensionEditor-input",value:m[S],placeholder:C[S],onChange:L=>K(S,L.target.value),onPaste:L=>U(S,L),onBlur:()=>ae(S),onKeyDown:L=>B(S,L),"aria-label":Se(f.ariaSide,[e,p[b]??""]),autoComplete:"off",spellCheck:"false"})]})]},S)})})]})}import{forwardRef as Vs,createElement as _s}from"react";var Ao=(...e)=>e.filter((t,o,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===o).join(" ").trim();var E9=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();var B9=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,o,a)=>a?a.toUpperCase():o.toLowerCase());var sr=e=>{let t=B9(e);return t.charAt(0).toUpperCase()+t.slice(1)};import{forwardRef as Ts,createElement as F9}from"react";var A9={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"};var Z9=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};var $9=Ts(({color:e="currentColor",size:t=24,strokeWidth:o=2,absoluteStrokeWidth:a,className:r="",children:l,iconNode:n,...i},s)=>F9("svg",{ref:s,...A9,width:t,height:t,stroke:e,strokeWidth:a?Number(o)*24/Number(t):o,className:Ao("lucide",r),...!l&&!Z9(i)&&{"aria-hidden":"true"},...i},[...n.map(([d,u])=>F9(d,u)),...Array.isArray(l)?l:[l]]));var N9=(e,t)=>{let o=Vs(({className:a,...r},l)=>_s($9,{ref:l,iconNode:t,className:Ao(`lucide-${E9(sr(e))}`,`lucide-${e}`,a),...r}));return o.displayName=sr(e),o};var Ds=[["path",{d:"m12 9-8.414 8.414A2 2 0 0 0 3 18.828v1.344a2 2 0 0 1-.586 1.414A2 2 0 0 1 3.828 21h1.344a2 2 0 0 0 1.414-.586L15 12",key:"1y3wsu"}],["path",{d:"m18 9 .4.4a1 1 0 1 1-3 3l-3.8-3.8a1 1 0 1 1 3-3l.4.4 3.4-3.4a1 1 0 1 1 3 3z",key:"110lr1"}],["path",{d:"m2 22 .414-.414",key:"jhxm08"}]],oo=N9("pipette",Ds);import Le from"react";import{useRef as No,useCallback as _e,useEffect as hr,useMemo as Uo,useState as gr,createContext as Os,useContext as Es}from"react";var U9={exports:{}},ao={};var q9;function Bs(){if(q9)return ao;q9=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function o(a,r,l){var n=null;if(l!==void 0&&(n=""+l),r.key!==void 0&&(n=""+r.key),"key"in r){l={};for(var i in r)i!=="key"&&(l[i]=r[i])}else l=r;return r=l.ref,{$$typeof:e,type:a,key:n,ref:r!==void 0?r:null,props:l}}return ao.Fragment=t,ao.jsx=o,ao.jsxs=o,ao}var z9;function As(){return z9||(z9=1,U9.exports=Bs()),U9.exports}var we=As();function e2(e){var t,o,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(o=e2(e[t]))&&(a&&(a+=" "),a+=o)}else for(o in e)e[o]&&(a&&(a+=" "),a+=o);return a}function Zs(){for(var e,t,o=0,a="",r=arguments.length;o<r;o++)(e=arguments[o])&&(t=e2(e))&&(a&&(a+=" "),a+=t);return a}var vr="-",Fs=e=>{let t=Ns(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:r=>{let l=r.split(vr);return l[0]===""&&l.length!==1&&l.shift(),t2(l,t)||$s(r)},getConflictingClassGroupIds:(r,l)=>{let n=o[r]||[];return l&&a[r]?[...n,...a[r]]:n}}},t2=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],a=t.nextPart.get(o),r=a?t2(e.slice(1),a):void 0;if(r)return r;if(t.validators.length===0)return;let l=e.join(vr);return t.validators.find(({validator:n})=>n(l))?.classGroupId},j9=/^\[(.+)\]$/,$s=e=>{if(j9.test(e)){let t=j9.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},Ns=e=>{let{theme:t,classGroups:o}=e,a={nextPart:new Map,validators:[]};for(let r in o)cr(o[r],a,r,t);return a},cr=(e,t,o,a)=>{e.forEach(r=>{if(typeof r=="string"){let l=r===""?t:K9(t,r);l.classGroupId=o;return}if(typeof r=="function"){if(Us(r)){cr(r(a),t,o,a);return}t.validators.push({validator:r,classGroupId:o});return}Object.entries(r).forEach(([l,n])=>{cr(n,K9(t,l),o,a)})})},K9=(e,t)=>{let o=e;return t.split(vr).forEach(a=>{o.nextPart.has(a)||o.nextPart.set(a,{nextPart:new Map,validators:[]}),o=o.nextPart.get(a)}),o},Us=e=>e.isThemeGetter,qs=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,a=new Map,r=(l,n)=>{o.set(l,n),t++,t>e&&(t=0,a=o,o=new Map)};return{get(l){let n=o.get(l);if(n!==void 0)return n;if((n=a.get(l))!==void 0)return r(l,n),n},set(l,n){o.has(l)?o.set(l,n):r(l,n)}}},fr="!",pr=":",zs=pr.length,js=e=>{let{prefix:t,experimentalParseClassName:o}=e,a=r=>{let l=[],n=0,i=0,s=0,d;for(let x=0;x<r.length;x++){let w=r[x];if(n===0&&i===0){if(w===pr){l.push(r.slice(s,x)),s=x+zs;continue}if(w==="/"){d=x;continue}}w==="["?n++:w==="]"?n--:w==="("?i++:w===")"&&i--}let u=l.length===0?r:r.substring(s),f=Ks(u),p=f!==u,c=d&&d>s?d-s:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:f,maybePostfixModifierPosition:c}};if(t){let r=t+pr,l=a;a=n=>n.startsWith(r)?l(n.substring(r.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:n,maybePostfixModifierPosition:void 0}}if(o){let r=a;a=l=>o({className:l,parseClassName:r})}return a},Ks=e=>e.endsWith(fr)?e.substring(0,e.length-1):e.startsWith(fr)?e.substring(1):e,Gs=e=>{let t=Object.fromEntries(e.orderSensitiveModifiers.map(o=>[o,!0]));return o=>{if(o.length<=1)return o;let a=[],r=[];return o.forEach(l=>{l[0]==="["||t[l]?(a.push(...r.sort(),l),r=[]):r.push(l)}),a.push(...r.sort()),a}},Ws=e=>({cache:qs(e.cacheSize),parseClassName:js(e),sortModifiers:Gs(e),...Fs(e)}),Xs=/\s+/,Qs=(e,t)=>{let{parseClassName:o,getClassGroupId:a,getConflictingClassGroupIds:r,sortModifiers:l}=t,n=[],i=e.trim().split(Xs),s="";for(let d=i.length-1;d>=0;d-=1){let u=i[d],{isExternal:f,modifiers:p,hasImportantModifier:c,baseClassName:x,maybePostfixModifierPosition:w}=o(u);if(f){s=u+(s.length>0?" "+s:s);continue}let C=!!w,y=a(C?x.substring(0,w):x);if(!y){if(!C){s=u+(s.length>0?" "+s:s);continue}if(y=a(x),!y){s=u+(s.length>0?" "+s:s);continue}C=!1}let g=l(p).join(":"),k=c?g+fr:g,m=k+y;if(n.includes(m))continue;n.push(m);let V=r(y,C);for(let H=0;H<V.length;++H){let q=V[H];n.push(k+q)}s=u+(s.length>0?" "+s:s)}return s};function Js(){let e=0,t,o,a="";for(;e<arguments.length;)(t=arguments[e++])&&(o=o2(t))&&(a&&(a+=" "),a+=o);return a}var o2=e=>{if(typeof e=="string")return e;let t,o="";for(let a=0;a<e.length;a++)e[a]&&(t=o2(e[a]))&&(o&&(o+=" "),o+=t);return o};function Ys(e,...t){let o,a,r,l=n;function n(s){let d=t.reduce((u,f)=>f(u),e());return o=Ws(d),a=o.cache.get,r=o.cache.set,l=i,i(s)}function i(s){let d=a(s);if(d)return d;let u=Qs(s,o);return r(s,u),u}return function(){return l(Js.apply(null,arguments))}}var Re=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},a2=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,r2=/^\((?:(\w[\w-]*):)?(.+)\)$/i,e3=/^\d+\/\d+$/,t3=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,o3=/\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$/,a3=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,r3=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,l3=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,wt=e=>e3.test(e),se=e=>!!e&&!Number.isNaN(Number(e)),A1=e=>!!e&&Number.isInteger(Number(e)),dr=e=>e.endsWith("%")&&se(e.slice(0,-1)),P1=e=>t3.test(e),n3=()=>!0,i3=e=>o3.test(e)&&!a3.test(e),l2=()=>!1,s3=e=>r3.test(e),d3=e=>l3.test(e),u3=e=>!z(e)&&!j(e),c3=e=>bt(e,s2,l2),z=e=>a2.test(e),lt=e=>bt(e,d2,i3),ur=e=>bt(e,h3,se),G9=e=>bt(e,n2,l2),f3=e=>bt(e,i2,d3),Zo=e=>bt(e,u2,s3),j=e=>r2.test(e),ro=e=>It(e,d2),p3=e=>It(e,g3),W9=e=>It(e,n2),C3=e=>It(e,s2),m3=e=>It(e,i2),Fo=e=>It(e,u2,!0),bt=(e,t,o)=>{let a=a2.exec(e);return a?a[1]?t(a[1]):o(a[2]):!1},It=(e,t,o=!1)=>{let a=r2.exec(e);return a?a[1]?t(a[1]):o:!1},n2=e=>e==="position"||e==="percentage",i2=e=>e==="image"||e==="url",s2=e=>e==="length"||e==="size"||e==="bg-size",d2=e=>e==="length",h3=e=>e==="number",g3=e=>e==="family-name",u2=e=>e==="shadow",v3=()=>{let e=Re("color"),t=Re("font"),o=Re("text"),a=Re("font-weight"),r=Re("tracking"),l=Re("leading"),n=Re("breakpoint"),i=Re("container"),s=Re("spacing"),d=Re("radius"),u=Re("shadow"),f=Re("inset-shadow"),p=Re("text-shadow"),c=Re("drop-shadow"),x=Re("blur"),w=Re("perspective"),C=Re("aspect"),y=Re("ease"),g=Re("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],m=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],V=()=>[...m(),j,z],H=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto","contain","none"],M=()=>[j,z,s],A=()=>[wt,"full","auto",...M()],K=()=>[A1,"none","subgrid",j,z],U=()=>["auto",{span:["full",A1,j,z]},A1,j,z],ae=()=>[A1,"auto",j,z],B=()=>["auto","min","max","fr",j,z],Z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],S=()=>["start","end","center","stretch","center-safe","end-safe"],b=()=>["auto",...M()],I=()=>[wt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],L=()=>[e,j,z],O=()=>[...m(),W9,G9,{position:[j,z]}],T=()=>["no-repeat",{repeat:["","x","y","space","round"]}],F=()=>["auto","cover","contain",C3,c3,{size:[j,z]}],$=()=>[dr,ro,lt],v=()=>["","none","full",d,j,z],h=()=>["",se,ro,lt],_=()=>["solid","dashed","dotted","double"],E=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],R=()=>[se,dr,W9,G9],G=()=>["","none",x,j,z],re=()=>["none",se,j,z],N=()=>["none",se,j,z],J=()=>[se,j,z],W=()=>[wt,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[P1],breakpoint:[P1],color:[n3],container:[P1],"drop-shadow":[P1],ease:["in","out","in-out"],font:[u3],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[P1],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[P1],shadow:[P1],spacing:["px",se],text:[P1],"text-shadow":[P1],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",wt,z,j,C]}],container:["container"],columns:[{columns:[se,z,j,i]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:V()}],overflow:[{overflow:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-y":[{"overscroll-y":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{start:A()}],end:[{end:A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[A1,"auto",j,z]}],basis:[{basis:[wt,"full","auto",i,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[se,wt,"auto","initial","none",z]}],grow:[{grow:["",se,j,z]}],shrink:[{shrink:["",se,j,z]}],order:[{order:[A1,"first","last","none",j,z]}],"grid-cols":[{"grid-cols":K()}],"col-start-end":[{col:U()}],"col-start":[{"col-start":ae()}],"col-end":[{"col-end":ae()}],"grid-rows":[{"grid-rows":K()}],"row-start-end":[{row:U()}],"row-start":[{"row-start":ae()}],"row-end":[{"row-end":ae()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":B()}],"auto-rows":[{"auto-rows":B()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...Z(),"normal"]}],"justify-items":[{"justify-items":[...S(),"normal"]}],"justify-self":[{"justify-self":["auto",...S()]}],"align-content":[{content:["normal",...Z()]}],"align-items":[{items:[...S(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...S(),{baseline:["","last"]}]}],"place-content":[{"place-content":Z()}],"place-items":[{"place-items":[...S(),"baseline"]}],"place-self":[{"place-self":["auto",...S()]}],p:[{p:M()}],px:[{px:M()}],py:[{py:M()}],ps:[{ps:M()}],pe:[{pe:M()}],pt:[{pt:M()}],pr:[{pr:M()}],pb:[{pb:M()}],pl:[{pl:M()}],m:[{m:b()}],mx:[{mx:b()}],my:[{my:b()}],ms:[{ms:b()}],me:[{me:b()}],mt:[{mt:b()}],mr:[{mr:b()}],mb:[{mb:b()}],ml:[{ml:b()}],"space-x":[{"space-x":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"space-y-reverse":["space-y-reverse"],size:[{size:I()}],w:[{w:[i,"screen",...I()]}],"min-w":[{"min-w":[i,"screen","none",...I()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[n]},...I()]}],h:[{h:["screen","lh",...I()]}],"min-h":[{"min-h":["screen","lh","none",...I()]}],"max-h":[{"max-h":["screen","lh",...I()]}],"font-size":[{text:["base",o,ro,lt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,j,ur]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",dr,z]}],"font-family":[{font:[p3,z,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[r,j,z]}],"line-clamp":[{"line-clamp":[se,"none",j,ur]}],leading:[{leading:[l,...M()]}],"list-image":[{"list-image":["none",j,z]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",j,z]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[..._(),"wavy"]}],"text-decoration-thickness":[{decoration:[se,"from-font","auto",j,lt]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[se,"auto",j,z]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",j,z]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",j,z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:T()}],"bg-size":[{bg:F()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},A1,j,z],radial:["",j,z],conic:[A1,j,z]},m3,f3]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:$()}],"gradient-via-pos":[{via:$()}],"gradient-to-pos":[{to:$()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:v()}],"rounded-s":[{"rounded-s":v()}],"rounded-e":[{"rounded-e":v()}],"rounded-t":[{"rounded-t":v()}],"rounded-r":[{"rounded-r":v()}],"rounded-b":[{"rounded-b":v()}],"rounded-l":[{"rounded-l":v()}],"rounded-ss":[{"rounded-ss":v()}],"rounded-se":[{"rounded-se":v()}],"rounded-ee":[{"rounded-ee":v()}],"rounded-es":[{"rounded-es":v()}],"rounded-tl":[{"rounded-tl":v()}],"rounded-tr":[{"rounded-tr":v()}],"rounded-br":[{"rounded-br":v()}],"rounded-bl":[{"rounded-bl":v()}],"border-w":[{border:h()}],"border-w-x":[{"border-x":h()}],"border-w-y":[{"border-y":h()}],"border-w-s":[{"border-s":h()}],"border-w-e":[{"border-e":h()}],"border-w-t":[{"border-t":h()}],"border-w-r":[{"border-r":h()}],"border-w-b":[{"border-b":h()}],"border-w-l":[{"border-l":h()}],"divide-x":[{"divide-x":h()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":h()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[..._(),"hidden","none"]}],"divide-style":[{divide:[..._(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[..._(),"none","hidden"]}],"outline-offset":[{"outline-offset":[se,j,z]}],"outline-w":[{outline:["",se,ro,lt]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",u,Fo,Zo]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",f,Fo,Zo]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:h()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[se,lt]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":h()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",p,Fo,Zo]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[se,j,z]}],"mix-blend":[{"mix-blend":[...E(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":E()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[se]}],"mask-image-linear-from-pos":[{"mask-linear-from":R()}],"mask-image-linear-to-pos":[{"mask-linear-to":R()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":R()}],"mask-image-t-to-pos":[{"mask-t-to":R()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":R()}],"mask-image-r-to-pos":[{"mask-r-to":R()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":R()}],"mask-image-b-to-pos":[{"mask-b-to":R()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":R()}],"mask-image-l-to-pos":[{"mask-l-to":R()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":R()}],"mask-image-x-to-pos":[{"mask-x-to":R()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":R()}],"mask-image-y-to-pos":[{"mask-y-to":R()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[j,z]}],"mask-image-radial-from-pos":[{"mask-radial-from":R()}],"mask-image-radial-to-pos":[{"mask-radial-to":R()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":m()}],"mask-image-conic-pos":[{"mask-conic":[se]}],"mask-image-conic-from-pos":[{"mask-conic-from":R()}],"mask-image-conic-to-pos":[{"mask-conic-to":R()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:T()}],"mask-size":[{mask:F()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",j,z]}],filter:[{filter:["","none",j,z]}],blur:[{blur:G()}],brightness:[{brightness:[se,j,z]}],contrast:[{contrast:[se,j,z]}],"drop-shadow":[{"drop-shadow":["","none",c,Fo,Zo]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",se,j,z]}],"hue-rotate":[{"hue-rotate":[se,j,z]}],invert:[{invert:["",se,j,z]}],saturate:[{saturate:[se,j,z]}],sepia:[{sepia:["",se,j,z]}],"backdrop-filter":[{"backdrop-filter":["","none",j,z]}],"backdrop-blur":[{"backdrop-blur":G()}],"backdrop-brightness":[{"backdrop-brightness":[se,j,z]}],"backdrop-contrast":[{"backdrop-contrast":[se,j,z]}],"backdrop-grayscale":[{"backdrop-grayscale":["",se,j,z]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[se,j,z]}],"backdrop-invert":[{"backdrop-invert":["",se,j,z]}],"backdrop-opacity":[{"backdrop-opacity":[se,j,z]}],"backdrop-saturate":[{"backdrop-saturate":[se,j,z]}],"backdrop-sepia":[{"backdrop-sepia":["",se,j,z]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":M()}],"border-spacing-x":[{"border-spacing-x":M()}],"border-spacing-y":[{"border-spacing-y":M()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",j,z]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[se,"initial",j,z]}],ease:[{ease:["linear","initial",y,j,z]}],delay:[{delay:[se,j,z]}],animate:[{animate:["none",g,j,z]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,j,z]}],"perspective-origin":[{"perspective-origin":V()}],rotate:[{rotate:re()}],"rotate-x":[{"rotate-x":re()}],"rotate-y":[{"rotate-y":re()}],"rotate-z":[{"rotate-z":re()}],scale:[{scale:N()}],"scale-x":[{"scale-x":N()}],"scale-y":[{"scale-y":N()}],"scale-z":[{"scale-z":N()}],"scale-3d":["scale-3d"],skew:[{skew:J()}],"skew-x":[{"skew-x":J()}],"skew-y":[{"skew-y":J()}],transform:[{transform:[j,z,"","none","gpu","cpu"]}],"transform-origin":[{origin:V()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:W()}],"translate-x":[{"translate-x":W()}],"translate-y":[{"translate-y":W()}],"translate-z":[{"translate-z":W()}],"translate-none":["translate-none"],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",j,z]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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",j,z]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[se,ro,lt,ur]}],stroke:[{stroke:["none",...L()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},x3=Ys(v3),L3=(e,t,o)=>Math.min(Math.max(e,t),o),$o=e=>Math.round(L3(e,0,255)),c2=e=>{let t=e.replace("#",""),o=parseInt(t,16);return{r:o>>16&255,g:o>>8&255,b:o&255}},w3=({r:e,g:t,b:o})=>{let a=r=>$o(r).toString(16).padStart(2,"0");return`#${a(e)}${a(t)}${a(o)}`},Cr=({h:e,s:t,v:o})=>{e=e/360,t=t/100,o=o/100;let a=Math.floor(e*6),r=e*6-a,l=o*(1-t),n=o*(1-r*t),i=o*(1-(1-r)*t),s,d,u;switch(a%6){case 0:s=o,d=i,u=l;break;case 1:s=n,d=o,u=l;break;case 2:s=l,d=o,u=i;break;case 3:s=l,d=n,u=o;break;case 4:s=i,d=l,u=o;break;case 5:s=o,d=l,u=n;break;default:s=d=u=0}return{r:$o(s*255),g:$o(d*255),b:$o(u*255)}},mr=({r:e,g:t,b:o})=>{e/=255,t/=255,o/=255;let a=Math.max(e,t,o),r=Math.min(e,t,o),l=a-r,n=0,i=a===0?0:l/a,s=a;if(l!==0)switch(a){case e:n=((t-o)/l+(t<o?6:0))/6;break;case t:n=((o-e)/l+2)/6;break;case o:n=((e-t)/l+4)/6;break}return{h:Math.round(n*360),s:Math.round(i*100),v:Math.round(s*100)}},b3=e=>w3(Cr(e)),I3=e=>mr(c2(e));var X9=({h:e,s:t,v:o})=>{let a=o*(2-t/100)/2,r=a!==0&&a!==100?(o-a)/Math.min(a,100-a)*100:0;return{h:e,s:Math.round(r),l:Math.round(a)}},Q9=({h:e,s:t,l:o})=>{let a=o+t*Math.min(o,100-o)/100,r=a===0?0:2*(1-o/a)*100;return{h:e,s:Math.round(r),v:Math.round(a)}},y3=e=>{let{r:t,g:o,b:a}=c2(e);return(.299*t+.587*o+.114*a)/255>.5?"#000000":"#ffffff"};var M3=(e,t="hex")=>{switch(t){case"hex":return e.getHex();case"rgb":let o=e.getRgb();return`rgb(${o.r}, ${o.g}, ${o.b})`;case"rgba":let a=e.getRgba();return`rgba(${a.r}, ${a.g}, ${a.b}, ${a.a})`;case"hsl":let r=e.getHsl();return`hsl(${r.h}, ${r.s}%, ${r.l}%)`;case"hsla":let l=e.getHsla();return`hsla(${l.h}, ${l.s}%, ${l.l}%, ${l.a})`;default:qo()}};function S3(e){switch(e.type){case"hex":return{...I3(e.value),a:1};case"rgb":return{...mr(e),a:1};case"rgba":return{...mr(e),a:e.a};case"hsl":return{...Q9(e),a:1};case"hsla":return{...Q9(e),a:1};case"hsv":return{...e,a:1};case"hsva":return{...e};default:qo()}}function Z1(e,t){let o=S3(e);switch(t){case"hex":return b3(o);case"rgb":return Cr(o);case"rgba":return{...Cr(o),a:o.a};case"hsl":return X9(o);case"hsla":return{...X9(o),a:o.a};case"hsv":return{h:o.h,s:o.s,v:o.v};case"hsva":return o;default:qo()}}var nt=(...e)=>x3(Zs(e)),T1=(e,t,o)=>Math.min(Math.max(e,t),o),F1=e=>Math.round(e);function qo(e){throw new Error("You should never get here.")}var $1=class e{constructor(t){this.colorInput=t,typeof t=="string"?this.color={type:"hex",value:t}:"type"in t?this.color=t:"r"in t?"a"in t?this.color={type:"rgba",...t}:this.color={type:"rgb",...t}:"v"in t?"a"in t?this.color={type:"hsva",...t}:this.color={type:"hsv",...t}:"a"in t?this.color={type:"hsla",...t}:this.color={type:"hsl",...t}}getRgb(){return Z1(this.color,"rgb")}getHsv(){return Z1(this.color,"hsv")}getHsla(){return Z1(this.color,"hsla")}getHsva(){return Z1(this.color,"hsva")}getHex(){return Z1(this.color,"hex")}getHsl(){return Z1(this.color,"hsl")}getRgba(){return Z1(this.color,"rgba")}format(t="hex"){return M3(this,t)}getContrastingColor(){return new e({type:"hex",value:y3(this.getHex())})}},J9=(e,t)=>{let o=e.getBoundingClientRect(),a,r;if("touches"in t){let d=t.touches[0]||t.changedTouches[0];a=d.clientX,r=d.clientY}else a=t.clientX,r=t.clientY;let l=a-o.left,n=r-o.top,i=T1(l/o.width,0,1),s=T1(n/o.height,0,1);return{left:i,top:s}},xr=({onMove:e,onMoveEnd:t,onKey:o,children:a,className:r,...l})=>{let n=No(null),i=No(!1),s=_e(p=>{!i.current||!n.current||(p.preventDefault(),e(J9(n.current,p)))},[e]),d=_e(()=>{i.current=!1,t(),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",d),document.removeEventListener("touchmove",s),document.removeEventListener("touchend",d)},[s,t]),u=_e(p=>{let c=n.current;c&&(p.preventDefault(),i.current=!0,e(J9(c,p.nativeEvent)),document.addEventListener("mousemove",s),document.addEventListener("mouseup",d),document.addEventListener("touchmove",s,{passive:!1}),document.addEventListener("touchend",d))},[e,s,d]),f=_e(p=>{if(!o)return;let c=p.which||p.keyCode;c<37||c>40||(p.preventDefault(),o({left:c===39?.05:c===37?-.05:0,top:c===40?.05:c===38?-.05:0}))},[o]);return hr(()=>()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",d),document.removeEventListener("touchmove",s),document.removeEventListener("touchend",d)},[s,d]),we.jsx("div",{ref:n,className:nt("rounded-inherit absolute inset-0 touch-none outline-none","focus:[&_.react-colorful-pointer]:scale-110",r),onTouchStart:u,onMouseDown:u,onKeyDown:f,tabIndex:0,role:"slider",...l,children:a})},Lr=({className:e,top:t=.5,left:o,color:a})=>we.jsx("div",{className:nt("absolute z-[1] h-6 w-6 -translate-x-1/2 -translate-y-1/2 cursor-grab rounded-full border-2 border-white bg-white active:cursor-grabbing","react-colorful-pointer shadow-[0_2px_8px_rgba(0,0,0,0.15)] transition-transform",e),style:{top:`${t*100}%`,left:`${o*100}%`}}),R3=({hsva:e,onChange:t,className:o,onFinishedUpdates:a})=>{let r=_e(s=>{t({a:s.left},!1)},[t]),l=_e(s=>{t({a:T1(e.a+s.left,0,1)},!0)},[e.a,t]),n=Uo(()=>new $1({type:"hsva",h:e.h,s:e.s,v:e.v,a:0}).format("hsla"),[e.h,e.s,e.v]),i=Uo(()=>new $1({type:"hsva",h:e.h,s:e.s,v:e.v,a:1}).format("hsla"),[e.h,e.s,e.v]);return we.jsx("div",{className:nt("relative h-full w-full",o),children:we.jsxs(xr,{onMove:r,onMoveEnd:a,onKey:l,"aria-label":"Alpha","aria-valuetext":`${F1(e.a*100)}%`,"aria-valuenow":F1(e.a*100),"aria-valuemin":0,"aria-valuemax":100,className:"h-full w-full rounded-lg",children:[we.jsx("div",{className:"absolute inset-0 rounded-lg bg-white",style:{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><rect x="8" width="8" height="8"/><rect y="8" width="8" height="8"/></svg>')`}}),we.jsx("div",{className:"absolute inset-0 rounded-lg",style:{backgroundImage:`linear-gradient(90deg, ${n}, ${i})`}}),we.jsx(Lr,{className:"z-[1]",top:.5,left:e.a,color:""})]})})},H3=({hue:e,onChange:t,className:o,onFinishedUpdates:a})=>{let r=_e(n=>{let i=F1(T1(360*n.left,0,360));t({h:i},!1)},[t]),l=_e(n=>{t({h:T1(e+n.left*360,0,360)},!0)},[e,t]);return we.jsx("div",{className:nt("relative h-full w-full",o),children:we.jsxs(xr,{onMove:r,onMoveEnd:a,onKey:l,"aria-label":"Hue","aria-valuenow":F1(e),"aria-valuemax":360,"aria-valuemin":0,className:"h-full w-full rounded-lg",children:[we.jsx("div",{className:"absolute inset-0 rounded-lg",style:{background:"linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%)"}}),we.jsx(Lr,{className:"z-[2]",top:.5,left:e/360,color:""})]})})},k3=({hsva:e,onChange:t,className:o,onFinishedUpdates:a})=>{let r=_e(i=>{let s=F1(T1(i.left*100,0,100)),d=F1(T1(100-i.top*100,0,100));t({s,v:d},!1)},[t]),l=_e(i=>{t({s:T1(e.s+i.left*100,0,100),v:T1(e.v-i.top*100,0,100)},!0)},[e.s,e.v,t]),n=`hsl(${e.h}, 100%, 50%)`;return we.jsx("div",{className:nt("relative h-full w-full rounded-xl",o),children:we.jsxs(xr,{onMove:r,onMoveEnd:a,onKey:l,"aria-label":"Color","aria-valuetext":`Saturation ${F1(e.s)}%, Brightness ${F1(e.v)}%`,className:"rounded-inherit h-full w-full",children:[we.jsx("div",{className:"rounded-inherit absolute inset-0 rounded-b-none",style:{backgroundColor:n,backgroundImage:"linear-gradient(to top, #000, rgba(0, 0, 0, 0)), linear-gradient(to right, #fff, rgba(255, 255, 255, 0))",boxShadow:"inset 0 0 0 1px rgba(0, 0, 0, 0.05)"}}),we.jsx(Lr,{className:"z-[3]",top:1-e.v/100,left:e.s/100,color:""})]})})},f2=Os(null),zo=()=>{let e=Es(f2);if(!e)throw new Error("ColorPicker compound components must be used within a ColorPicker");return e};function Y9(e){return"type"in e?new $1(e):e}var P3=({color:e,onChange:t,className:o,children:a,defaultColor:r,...l})=>{let[n,i]=gr(Y9(e??r??{h:340,s:58,v:100,a:1,type:"hsva"})),s=No(!1),d=No(n);hr(()=>{!s.current&&e&&(d.current=Y9(e),i(d.current))},[e]);let u=_e((x,w)=>{let C=new $1({type:"hsva",...d.current.getHsva(),...x});d.current=C,i(C),s.current=!w,t?.(C)},[t]),f=_e(()=>{s.current=!1},[]),p=_e(async()=>{if(!("EyeDropper"in window)){console.log("EyeDropper API not supported");return}try{let x=await new window.EyeDropper().open();x.sRGBHex&&u(Z1({type:"hex",value:x.sRGBHex},"hsva"),!0)}catch(x){console.log("EyeDropper cancelled or failed:",x)}},[t]),c={hsva:n.getHsva(),updateHsva:u,handleEyeDropper:p,onFinishedUpdates:f};return we.jsx(f2.Provider,{value:c,children:we.jsx("div",{...l,className:nt("relative flex h-[280px] w-[280px] cursor-default flex-col rounded-2xl bg-white shadow-lg select-none",o),children:a})})},T3=({className:e})=>{let{hsva:t,updateHsva:o,onFinishedUpdates:a}=zo(),r=_e((l,n)=>{o(l,n)},[o]);return we.jsx(k3,{hsva:t,onChange:r,className:e,onFinishedUpdates:a})},V3=({className:e})=>{let{hsva:t,updateHsva:o,onFinishedUpdates:a}=zo(),r=_e((l,n)=>{o(l,n)},[o]);return we.jsx(H3,{hue:t.h,onChange:r,className:e,onFinishedUpdates:a})},_3=({className:e})=>{let{hsva:t,updateHsva:o,onFinishedUpdates:a}=zo(),r=_e((l,n)=>{o(l,n)},[o]);return we.jsx(R3,{hsva:t,onChange:r,className:e,onFinishedUpdates:a})},D3=({className:e,title:t="Pick color from screen",children:o})=>{let{handleEyeDropper:a}=zo(),[r,l]=gr(!1);return hr(()=>{typeof window<"u"&&"EyeDropper"in window&&l(!0)},[]),r?we.jsx("button",{onClick:a,className:nt("flex h-10 w-10 flex-shrink-0 cursor-pointer items-center justify-center rounded-lg transition-colors hover:bg-gray-100",e),title:t,children:o}):null},yt=Object.assign(P3,{Saturation:T3,Hue:V3,Alpha:_3,EyeDropper:D3});function O3(e,t){switch(t){case"hex":return{type:"hex",value:e.getHex()};case"rgb":return{type:"rgb",...e.getRgb()};case"rgba":return{type:"rgba",...e.getRgba()};case"hsl":return{type:"hsl",...e.getHsl()};case"hsla":return{type:"hsla",...e.getHsla()};case"hsv":return{type:"hsv",...e.getHsv()};case"hsva":return{type:"hsva",...e.getHsva()};default:qo()}}var p2=(e={type:"hex",value:"#ff6b9d"})=>{let[t,o]=gr(()=>{let n=typeof e=="function"?e():e;return{color:new $1(n),type:n.type}}),a=Uo(()=>O3(t.color,t.type),[t.color,t.type]),r=Uo(()=>{let n=t.color.getHsva();return{hex:t.color.getHex(),rgb:t.color.getRgb(),rgba:t.color.getRgba(),hsl:t.color.getHsl(),hsla:t.color.getHsla(),hsv:t.color.getHsv(),hsva:n,alpha:n.a}},[t.color]),l=_e(n=>{try{let i="type"in n?new $1(n):n;o(s=>({color:i,type:s.type}))}catch(i){console.warn("Invalid color input:",n,i)}},[]);return[{colorInput:a,colorState:r},l]};import{createPortal as hu}from"react-dom";import{useRef as g1,useMemo as E3,useEffect as B3,useState as jf,useCallback as Kf}from"react";function C2(e,t,o,a){var r=this,l=g1(null),n=g1(0),i=g1(0),s=g1(null),d=g1([]),u=g1(),f=g1(),p=g1(e),c=g1(!0),x=g1(),w=g1();p.current=e;var C=typeof window<"u",y=!t&&t!==0&&C;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var g=!!(o=o||{}).leading,k=!("trailing"in o)||!!o.trailing,m=!!o.flushOnExit&&k,V="maxWait"in o,H="debounceOnServer"in o&&!!o.debounceOnServer,q=V?Math.max(+o.maxWait||0,t):null,M=E3(function(){var A=function(b){var I=d.current,L=u.current;return d.current=u.current=null,n.current=b,i.current=i.current||b,f.current=p.current.apply(L,I)},K=function(b,I){y&&cancelAnimationFrame(s.current),s.current=y?requestAnimationFrame(b):setTimeout(b,I)},U=function(b){if(!c.current)return!1;var I=b-l.current;return!l.current||I>=t||I<0||V&&b-n.current>=q},ae=function(b){return s.current=null,k&&d.current?A(b):(d.current=u.current=null,f.current)},B=function b(){var I=Date.now();if(g&&i.current===n.current&&Z(),U(I))return ae(I);if(c.current){var L=t-(I-l.current),O=V?Math.min(L,q-(I-n.current)):L;K(b,O)}},Z=function(){a&&a({})},S=function(){if(C||H){var b,I=Date.now(),L=U(I);if(d.current=[].slice.call(arguments),u.current=r,l.current=I,m&&!x.current&&(x.current=function(){var O;((O=globalThis.document)==null?void 0:O.visibilityState)==="hidden"&&w.current.flush()},(b=globalThis.document)==null||b.addEventListener==null||b.addEventListener("visibilitychange",x.current)),L){if(!s.current&&c.current)return n.current=l.current,K(B,t),g?A(l.current):f.current;if(V)return K(B,t),A(l.current)}return s.current||K(B,t),f.current}};return S.cancel=function(){var b=s.current;b&&(y?cancelAnimationFrame(s.current):clearTimeout(s.current)),n.current=0,d.current=l.current=u.current=s.current=null,b&&a&&a({})},S.isPending=function(){return!!s.current},S.flush=function(){return s.current?ae(Date.now()):f.current},S},[g,V,t,q,k,m,y,C,H,a]);return w.current=M,B3(function(){return c.current=!0,function(){var A;m&&w.current.flush(),x.current&&((A=globalThis.document)==null||A.removeEventListener==null||A.removeEventListener("visibilitychange",x.current),x.current=null),c.current=!1}},[m]),M}import Be from"react";function it(e){let t=e?.parentNode;for(;t;){if(t instanceof ShadowRoot){t=t.host;continue}if(t instanceof HTMLElement){let{overflowY:o}=getComputedStyle(t);if(o==="auto"||o==="scroll")return t}t=t.parentNode}return null}var m2='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';function h2({computePosition:e,onClose:t,autoFocus:o=!0,trapFocus:a=!1}={}){let[r,l]=Be.useState(!1),[n,i]=Be.useState({top:0,left:0}),s=Be.useRef(null),d=Be.useRef(null),u=Be.useRef(!1),f=Be.useRef(e);f.current=e;let p=Be.useRef(t);p.current=t;let c=Be.useRef(a);c.current=a;let x=Be.useCallback((...g)=>{!s.current||!f.current||i(f.current(s.current,...g))},[]),w=Be.useCallback(()=>{x(),u.current=!0,l(!0)},[x]),C=Be.useCallback(()=>{p.current&&p.current(),u.current=!1,l(!1),s.current?.focus()},[]),y=Be.useCallback(()=>{u.current?C():w()},[w,C]);return Be.useEffect(()=>{if(!r)return;let g=m=>{if(m.key==="Escape"&&(m.preventDefault(),C()),c.current&&m.key==="Tab"){let V=d.current;if(!V)return;let H=Array.from(V.querySelectorAll(m2)).filter(A=>!A.hasAttribute("disabled")),q=H[0],M=H.at(-1);if(!q||!M)return;m.shiftKey&&document.activeElement===q?(m.preventDefault(),M.focus()):!m.shiftKey&&document.activeElement===M&&(m.preventDefault(),q.focus())}},k=m=>{let V=d.current,H=s.current;if(!V||!H)return;let q=typeof m.composedPath=="function"?m.composedPath():[],M=q.includes(V)||m.target instanceof Node&&V.contains(m.target),A=q.includes(H)||m.target instanceof Node&&H.contains(m.target);!M&&!A&&C()};return document.addEventListener("keydown",g),document.addEventListener("mousedown",k),document.addEventListener("touchstart",k),()=>{document.removeEventListener("keydown",g),document.removeEventListener("mousedown",k),document.removeEventListener("touchstart",k)}},[r,C]),Be.useEffect(()=>{if(!r||!o||!d.current)return;let g=d.current.querySelector(m2);g&&g.focus()},[r,o]),Be.useEffect(()=>{if(!r||!s.current)return;let g=it(s.current);if(!g)return;let k=()=>C();return g.addEventListener("scroll",k,{passive:!0}),()=>g.removeEventListener("scroll",k)},[r,C]),{isOpen:r,open:w,close:C,toggle:y,triggerRef:s,popoverRef:d,position:n,reposition:x}}var A3=(e,t)=>{if(typeof e=="number"){if(t===3)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(t===4)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(t===6)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(t===8)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}},jo=A3;var Z3={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},g2=Z3;var F3=e=>jo(g2[e.toLowerCase()],6),v2=F3;var $3=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,N3=e=>{let t;return(t=e.match($3))?jo(parseInt(t[1],16),t[1].length):void 0},x2=N3;var Ae="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",n6=`(?:${Ae}|none)`,st=`${Ae}%`,i6=`(?:${Ae}%|none)`,lo=`(?:${Ae}%|${Ae})`,U3=`(?:${Ae}%|${Ae}|none)`,L2=`(?:${Ae}(deg|grad|rad|turn)|${Ae})`,s6=`(?:${Ae}(deg|grad|rad|turn)|${Ae}|none)`,N1="\\s*,\\s*";var d6=new RegExp("^"+U3+"$");var q3=new RegExp(`^rgba?\\(\\s*${Ae}${N1}${Ae}${N1}${Ae}\\s*(?:,\\s*${lo}\\s*)?\\)$`),z3=new RegExp(`^rgba?\\(\\s*${st}${N1}${st}${N1}${st}\\s*(?:,\\s*${lo}\\s*)?\\)$`),j3=e=>{let t={mode:"rgb"},o;if(o=e.match(q3))o[1]!==void 0&&(t.r=o[1]/255),o[2]!==void 0&&(t.g=o[2]/255),o[3]!==void 0&&(t.b=o[3]/255);else if(o=e.match(z3))o[1]!==void 0&&(t.r=o[1]/100),o[2]!==void 0&&(t.g=o[2]/100),o[3]!==void 0&&(t.b=o[3]/100);else return;return o[4]!==void 0?t.alpha=Math.max(0,Math.min(1,o[4]/100)):o[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+o[5]))),t},w2=j3;var K3=(e,t)=>e===void 0?void 0:typeof e!="object"?dt(e):e.mode!==void 0?e:t?{...e,mode:t}:void 0,Ko=K3;var G3=(e="rgb")=>t=>(t=Ko(t,e))!==void 0?t.mode===e?t:v1[t.mode][e]?v1[t.mode][e](t):e==="rgb"?v1[t.mode].rgb(t):v1.rgb[e](v1[t.mode].rgb(t)):void 0,Xe=G3;var v1={},b2={},no=[],wr={},W3=e=>e,pe=e=>(v1[e.mode]={...v1[e.mode],...e.toMode},Object.keys(e.fromMode||{}).forEach(t=>{v1[t]||(v1[t]={}),v1[t][e.mode]=e.fromMode[t]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(t=>{if(e.ranges[t]===void 0&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw new Error(`Missing interpolator for: ${t}`);typeof e.interpolate[t]=="function"&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=W3)}),b2[e.mode]=e,(e.parse||[]).forEach(t=>{X3(t,e.mode)}),Xe(e.mode)),Go=e=>b2[e],X3=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");wr[e]=t}else typeof e=="function"&&no.indexOf(e)<0&&no.push(e)};var br=/[^\x00-\x7F]|[a-zA-Z_]/,Q3=/[^\x00-\x7F]|[-\w]/,P={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},Y=0;function Wo(e){let t=e[Y],o=e[Y+1];return t==="-"||t==="+"?/\d/.test(o)||o==="."&&/\d/.test(e[Y+2]):t==="."?/\d/.test(o):/\d/.test(t)}function Ir(e){if(Y>=e.length)return!1;let t=e[Y];if(br.test(t))return!0;if(t==="-"){if(e.length-Y<2)return!1;let o=e[Y+1];return!!(o==="-"||br.test(o))}return!1}var J3={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function io(e){let t="";if((e[Y]==="-"||e[Y]==="+")&&(t+=e[Y++]),t+=Xo(e),e[Y]==="."&&/\d/.test(e[Y+1])&&(t+=e[Y++]+Xo(e)),(e[Y]==="e"||e[Y]==="E")&&((e[Y+1]==="-"||e[Y+1]==="+")&&/\d/.test(e[Y+2])?t+=e[Y++]+e[Y++]+Xo(e):/\d/.test(e[Y+1])&&(t+=e[Y++]+Xo(e))),Ir(e)){let o=Qo(e);return o==="deg"||o==="rad"||o==="turn"||o==="grad"?{type:P.Hue,value:t*J3[o]}:void 0}return e[Y]==="%"?(Y++,{type:P.Percentage,value:+t}):{type:P.Number,value:+t}}function Xo(e){let t="";for(;/\d/.test(e[Y]);)t+=e[Y++];return t}function Qo(e){let t="";for(;Y<e.length&&Q3.test(e[Y]);)t+=e[Y++];return t}function Y3(e){let t=Qo(e);return e[Y]==="("?(Y++,{type:P.Function,value:t}):t==="none"?{type:P.None,value:void 0}:{type:P.Ident,value:t}}function ed(e=""){let t=e.trim(),o=[],a;for(Y=0;Y<t.length;){if(a=t[Y++],a===`
2
- `||a===" "||a===" "){for(;Y<t.length&&(t[Y]===`
3
- `||t[Y]===" "||t[Y]===" ");)Y++;continue}if(a===",")return;if(a===")"){o.push({type:P.ParenClose});continue}if(a==="+"){if(Y--,Wo(t)){o.push(io(t));continue}return}if(a==="-"){if(Y--,Wo(t)){o.push(io(t));continue}if(Ir(t)){o.push({type:P.Ident,value:Qo(t)});continue}return}if(a==="."){if(Y--,Wo(t)){o.push(io(t));continue}return}if(a==="/"){for(;Y<t.length&&(t[Y]===`
4
- `||t[Y]===" "||t[Y]===" ");)Y++;let r;if(Wo(t)&&(r=io(t),r.type!==P.Hue)){o.push({type:P.Alpha,value:r});continue}if(Ir(t)&&Qo(t)==="none"){o.push({type:P.Alpha,value:{type:P.None,value:void 0}});continue}return}if(/\d/.test(a)){Y--,o.push(io(t));continue}if(br.test(a)){Y--,o.push(Y3(t));continue}return}return o}function td(e){e._i=0;let t=e[e._i++];if(!t||t.type!==P.Function||t.value!=="color"||(t=e[e._i++],t.type!==P.Ident))return;let o=wr[t.value];if(!o)return;let a={mode:o},r=I2(e,!1);if(!r)return;let l=Go(o).channels;for(let n=0,i,s;n<l.length;n++)i=r[n],s=l[n],i.type!==P.None&&(a[s]=i.type===P.Number?i.value:i.value/100,s==="alpha"&&(a[s]=Math.max(0,Math.min(1,a[s]))));return a}function I2(e,t){let o=[],a;for(;e._i<e.length;){if(a=e[e._i++],a.type===P.None||a.type===P.Number||a.type===P.Alpha||a.type===P.Percentage||t&&a.type===P.Hue){o.push(a);continue}if(a.type===P.ParenClose){if(e._i<e.length)return;continue}return}if(!(o.length<3||o.length>4)){if(o.length===4){if(o[3].type!==P.Alpha)return;o[3]=o[3].value}return o.length===3&&o.push({type:P.None,value:void 0}),o.every(r=>r.type!==P.Alpha)?o:void 0}}function od(e,t){e._i=0;let o=e[e._i++];if(!o||o.type!==P.Function)return;let a=I2(e,t);if(a)return a.unshift(o.value),a}var ad=e=>{if(typeof e!="string")return;let t=ed(e),o=t?od(t,!0):void 0,a,r=0,l=no.length;for(;r<l;)if((a=no[r++](e,o))!==void 0)return a;return t?td(t):void 0},dt=ad;function rd(e,t){if(!t||t[0]!=="rgb"&&t[0]!=="rgba")return;let o={mode:"rgb"},[,a,r,l,n]=t;if(!(a.type===P.Hue||r.type===P.Hue||l.type===P.Hue))return a.type!==P.None&&(o.r=a.type===P.Number?a.value/255:a.value/100),r.type!==P.None&&(o.g=r.type===P.Number?r.value/255:r.value/100),l.type!==P.None&&(o.b=l.type===P.Number?l.value/255:l.value/100),n.type!==P.None&&(o.alpha=Math.min(1,Math.max(0,n.type===P.Number?n.value:n.value/100))),o}var y2=rd;var ld=e=>e==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,M2=ld;var S2=(e,t,o)=>e+o*(t-e);var nd=e=>{let t=[];for(let o=0;o<e.length-1;o++){let a=e[o],r=e[o+1];a===void 0&&r===void 0?t.push(void 0):a!==void 0&&r!==void 0?t.push([a,r]):t.push(a!==void 0?[a,a]:[r,r])}return t},R2=e=>t=>{let o=nd(t);return a=>{let r=a*o.length,l=a>=1?o.length-1:Math.max(Math.floor(r),0),n=o[l];return n===void 0?void 0:e(n[0],n[1],r-l)}};var D=R2(S2);var de=e=>{let t=!1,o=e.map(a=>a!==void 0?(t=!0,a):1);return t?o:e};var id={mode:"rgb",channels:["r","g","b","alpha"],parse:[y2,x2,w2,v2,M2,"srgb"],serialize:"srgb",interpolate:{r:D,g:D,b:D,alpha:{use:D,fixup:de}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},a1=id;var yr=(e=0)=>Math.pow(Math.abs(e),2.19921875)*Math.sign(e),sd=e=>{let t=yr(e.r),o=yr(e.g),a=yr(e.b),r={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*o+.1882286462349947*a,y:.297344975250536*t+.6273635662554661*o+.0752914584939979*a,z:.0270313613864123*t+.0706888525358272*o+.9913375368376386*a};return e.alpha!==void 0&&(r.alpha=e.alpha),r},Mr=sd;var Sr=e=>Math.pow(Math.abs(e),.4547069271758437)*Math.sign(e),dd=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r={mode:"a98",r:Sr(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*o),g:Sr(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*o),b:Sr(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*o)};return a!==void 0&&(r.alpha=a),r},Rr=dd;var Hr=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},ud=({r:e,g:t,b:o,alpha:a})=>{let r={mode:"lrgb",r:Hr(e),g:Hr(t),b:Hr(o)};return a!==void 0&&(r.alpha=a),r},r1=ud;var cd=e=>{let{r:t,g:o,b:a,alpha:r}=r1(e),l={mode:"xyz65",x:.4123907992659593*t+.357584339383878*o+.1804807884018343*a,y:.2126390058715102*t+.715168678767756*o+.0721923153607337*a,z:.0193308187155918*t+.119194779794626*o+.9505321522496607*a};return r!==void 0&&(l.alpha=r),l},Ue=cd;var kr=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,.4166666666666667)-.055):e*12.92},fd=({r:e,g:t,b:o,alpha:a},r="rgb")=>{let l={mode:r,r:kr(e),g:kr(t),b:kr(o)};return a!==void 0&&(l.alpha=a),l},l1=fd;var pd=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=l1({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*o,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*o,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*o});return a!==void 0&&(r.alpha=a),r},qe=pd;var Cd={...a1,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>Rr(Ue(e)),xyz65:Rr},toMode:{rgb:e=>qe(Mr(e)),xyz65:Mr}},H2=Cd;var md=e=>(e=e%360)<0?e+360:e,me=md;var hd=(e,t)=>e.map((o,a,r)=>{if(o===void 0)return o;let l=me(o);return a===0||e[a-1]===void 0?l:t(l-me(r[a-1]))}).reduce((o,a)=>!o.length||a===void 0||o[o.length-1]===void 0?(o.push(a),o):(o.push(a+o[o.length-1]),o),[]),ke=e=>hd(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t));var ye=[-.14861,1.78277,-.29227,-.90649,1.97294,0],k2=Math.PI/180,P2=180/Math.PI;var T2=ye[3]*ye[4],V2=ye[1]*ye[4],_2=ye[1]*ye[2]-ye[0]*ye[3],gd=({r:e,g:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=(_2*o+e*T2-t*V2)/(_2+T2-V2),l=o-r,n=(ye[4]*(t-r)-ye[2]*l)/ye[3],i={mode:"cubehelix",l:r,s:r===0||r===1?void 0:Math.sqrt(l*l+n*n)/(ye[4]*r*(1-r))};return i.s&&(i.h=Math.atan2(n,l)*P2-120),a!==void 0&&(i.alpha=a),i},D2=gd;var vd=({h:e,s:t,l:o,alpha:a})=>{let r={mode:"rgb"};e=(e===void 0?0:e+120)*k2,o===void 0&&(o=0);let l=t===void 0?0:t*o*(1-o),n=Math.cos(e),i=Math.sin(e);return r.r=o+l*(ye[0]*n+ye[1]*i),r.g=o+l*(ye[2]*n+ye[3]*i),r.b=o+l*(ye[4]*n+ye[5]*i),a!==void 0&&(r.alpha=a),r},O2=vd;var U1=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let o=me(e.h),a=me(t.h),r=Math.sin((a-o+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*r},E2=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let o=me(e.h),a=me(t.h);return Math.abs(a-o)>180?o-(a-360*Math.sign(a-o)):a-o},q1=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let o=me(e.h),a=me(t.h),r=Math.sin((a-o+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*r};var Pe=e=>{let t=e.reduce((a,r)=>{if(r!==void 0){let l=r*Math.PI/180;a.sin+=Math.sin(l),a.cos+=Math.cos(l)}return a},{sin:0,cos:0}),o=Math.atan2(t.sin,t.cos)*180/Math.PI;return o<0?360+o:o};var xd={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:D2},toMode:{rgb:O2},interpolate:{h:{use:D,fixup:ke},s:D,l:D,alpha:{use:D,fixup:de}},difference:{h:U1},average:{h:Pe}},B2=xd;var Ld=({l:e,a:t,b:o,alpha:a},r="lch")=>{t===void 0&&(t=0),o===void 0&&(o=0);let l=Math.sqrt(t*t+o*o),n={mode:r,l:e,c:l};return l&&(n.h=me(Math.atan2(o,t)*180/Math.PI)),a!==void 0&&(n.alpha=a),n},Qe=Ld;var wd=({l:e,c:t,h:o,alpha:a},r="lab")=>{o===void 0&&(o=0);let l={mode:r,l:e,a:t?t*Math.cos(o/180*Math.PI):0,b:t?t*Math.sin(o/180*Math.PI):0};return a!==void 0&&(l.alpha=a),l},Je=wd;var Jo=Math.pow(29,3)/Math.pow(3,3),Yo=Math.pow(6,3)/Math.pow(29,3);var xe={X:.9642956764295677,Y:1,Z:.8251046025104602},z1={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},bp=Math.pow(29,3)/Math.pow(3,3),Ip=Math.pow(6,3)/Math.pow(29,3);var Pr=e=>Math.pow(e,3)>Yo?Math.pow(e,3):(116*e-16)/Jo,bd=({l:e,a:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=(e+16)/116,l=t/500+r,n=r-o/200,i={mode:"xyz65",x:Pr(l)*z1.X,y:Pr(r)*z1.Y,z:Pr(n)*z1.Z};return a!==void 0&&(i.alpha=a),i},ea=bd;var Id=e=>qe(ea(e)),j1=Id;var Tr=e=>e>Yo?Math.cbrt(e):(Jo*e+16)/116,yd=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Tr(e/z1.X),l=Tr(t/z1.Y),n=Tr(o/z1.Z),i={mode:"lab65",l:116*l-16,a:500*(r-l),b:200*(l-n)};return a!==void 0&&(i.alpha=a),i},ta=yd;var Md=e=>{let t=ta(Ue(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},K1=Md;var ut=.14444444444444443*Math.PI,Mt=Math.cos(ut),St=Math.sin(ut),oa=100/Math.log(139/100);var Sd=({l:e,c:t,h:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r={mode:"lab65",l:(Math.exp(e*1/oa)-1)/.0039},l=(Math.exp(.0435*t*1*1)-1)/.075,n=l*Math.cos(o/180*Math.PI-ut),i=l*Math.sin(o/180*Math.PI-ut);return r.a=n*Mt-i/.83*St,r.b=n*St+i/.83*Mt,a!==void 0&&(r.alpha=a),r},uo=Sd;var Rd=({l:e,a:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=t*Mt+o*St,l=.83*(o*Mt-t*St),n=Math.sqrt(r*r+l*l),i={mode:"dlch",l:oa/1*Math.log(1+.0039*e),c:Math.log(1+.075*n)/(.0435*1*1)};return i.c&&(i.h=me((Math.atan2(l,r)+ut)/Math.PI*180)),a!==void 0&&(i.alpha=a),i},co=Rd;var A2=e=>uo(Qe(e,"dlch")),Z2=e=>Je(co(e),"dlab"),Hd={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:A2,rgb:e=>j1(A2(e))},fromMode:{lab65:Z2,rgb:e=>Z2(K1(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:D,a:D,b:D,alpha:{use:D,fixup:de}}},F2=Hd;var kd={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:uo,dlab:e=>Je(e,"dlab"),rgb:e=>j1(uo(e))},fromMode:{lab65:co,dlab:e=>Qe(e,"dlch"),rgb:e=>co(K1(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:D,c:D,h:{use:D,fixup:ke},alpha:{use:D,fixup:de}},difference:{h:q1},average:{h:Pe}},$2=kd;function _r({h:e,s:t,i:o,alpha:a}){e=me(e!==void 0?e:0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.abs(e/60%2-1),l;switch(Math.floor(e/60)){case 0:l={r:o*(1+t*(3/(2-r)-1)),g:o*(1+t*(3*(1-r)/(2-r)-1)),b:o*(1-t)};break;case 1:l={r:o*(1+t*(3*(1-r)/(2-r)-1)),g:o*(1+t*(3/(2-r)-1)),b:o*(1-t)};break;case 2:l={r:o*(1-t),g:o*(1+t*(3/(2-r)-1)),b:o*(1+t*(3*(1-r)/(2-r)-1))};break;case 3:l={r:o*(1-t),g:o*(1+t*(3*(1-r)/(2-r)-1)),b:o*(1+t*(3/(2-r)-1))};break;case 4:l={r:o*(1+t*(3*(1-r)/(2-r)-1)),g:o*(1-t),b:o*(1+t*(3/(2-r)-1))};break;case 5:l={r:o*(1+t*(3/(2-r)-1)),g:o*(1-t),b:o*(1+t*(3*(1-r)/(2-r)-1))};break;default:l={r:o*(1-t),g:o*(1-t),b:o*(1-t)}}return l.mode="rgb",a!==void 0&&(l.alpha=a),l}function Dr({r:e,g:t,b:o,alpha:a}){e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.max(e,t,o),l=Math.min(e,t,o),n={mode:"hsi",s:e+t+o===0?0:1-3*l/(e+t+o),i:(e+t+o)/3};return r-l!==0&&(n.h=(r===e?(t-o)/(r-l)+(t<o)*6:r===t?(o-e)/(r-l)+2:(e-t)/(r-l)+4)*60),a!==void 0&&(n.alpha=a),n}var Pd={mode:"hsi",toMode:{rgb:_r},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:Dr},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:D,fixup:ke},s:D,i:D,alpha:{use:D,fixup:de}},difference:{h:U1},average:{h:Pe}},N2=Pd;function Or({h:e,s:t,l:o,alpha:a}){e=me(e!==void 0?e:0),t===void 0&&(t=0),o===void 0&&(o=0);let r=o+t*(o<.5?o:1-o),l=r-(r-o)*2*Math.abs(e/60%2-1),n;switch(Math.floor(e/60)){case 0:n={r,g:l,b:2*o-r};break;case 1:n={r:l,g:r,b:2*o-r};break;case 2:n={r:2*o-r,g:r,b:l};break;case 3:n={r:2*o-r,g:l,b:r};break;case 4:n={r:l,g:2*o-r,b:r};break;case 5:n={r,g:2*o-r,b:l};break;default:n={r:2*o-r,g:2*o-r,b:2*o-r}}return n.mode="rgb",a!==void 0&&(n.alpha=a),n}function Er({r:e,g:t,b:o,alpha:a}){e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.max(e,t,o),l=Math.min(e,t,o),n={mode:"hsl",s:r===l?0:(r-l)/(1-Math.abs(r+l-1)),l:.5*(r+l)};return r-l!==0&&(n.h=(r===e?(t-o)/(r-l)+(t<o)*6:r===t?(o-e)/(r-l)+2:(e-t)/(r-l)+4)*60),a!==void 0&&(n.alpha=a),n}var Td=(e,t)=>{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return e*360}},U2=Td;var Vd=new RegExp(`^hsla?\\(\\s*${L2}${N1}${st}${N1}${st}\\s*(?:,\\s*${lo}\\s*)?\\)$`),_d=e=>{let t=e.match(Vd);if(!t)return;let o={mode:"hsl"};return t[3]!==void 0?o.h=+t[3]:t[1]!==void 0&&t[2]!==void 0&&(o.h=U2(t[1],t[2])),t[4]!==void 0&&(o.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(o.l=Math.min(Math.max(0,t[5]/100),1)),t[6]!==void 0?o.alpha=Math.max(0,Math.min(1,t[6]/100)):t[7]!==void 0&&(o.alpha=Math.max(0,Math.min(1,+t[7]))),o},q2=_d;function Dd(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;let o={mode:"hsl"},[,a,r,l,n]=t;if(a.type!==P.None){if(a.type===P.Percentage)return;o.h=a.value}if(r.type!==P.None){if(r.type===P.Hue)return;o.s=r.value/100}if(l.type!==P.None){if(l.type===P.Hue)return;o.l=l.value/100}return n.type!==P.None&&(o.alpha=Math.min(1,Math.max(0,n.type===P.Number?n.value:n.value/100))),o}var z2=Dd;var Od={mode:"hsl",toMode:{rgb:Or},fromMode:{rgb:Er},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[z2,q2],serialize:e=>`hsl(${e.h!==void 0?e.h:"none"} ${e.s!==void 0?e.s*100+"%":"none"} ${e.l!==void 0?e.l*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:D,fixup:ke},s:D,l:D,alpha:{use:D,fixup:de}},difference:{h:U1},average:{h:Pe}},aa=Od;function fo({h:e,s:t,v:o,alpha:a}){e=me(e!==void 0?e:0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.abs(e/60%2-1),l;switch(Math.floor(e/60)){case 0:l={r:o,g:o*(1-t*r),b:o*(1-t)};break;case 1:l={r:o*(1-t*r),g:o,b:o*(1-t)};break;case 2:l={r:o*(1-t),g:o,b:o*(1-t*r)};break;case 3:l={r:o*(1-t),g:o*(1-t*r),b:o};break;case 4:l={r:o*(1-t*r),g:o*(1-t),b:o};break;case 5:l={r:o,g:o*(1-t),b:o*(1-t*r)};break;default:l={r:o*(1-t),g:o*(1-t),b:o*(1-t)}}return l.mode="rgb",a!==void 0&&(l.alpha=a),l}function po({r:e,g:t,b:o,alpha:a}){e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.max(e,t,o),l=Math.min(e,t,o),n={mode:"hsv",s:r===0?0:1-l/r,v:r};return r-l!==0&&(n.h=(r===e?(t-o)/(r-l)+(t<o)*6:r===t?(o-e)/(r-l)+2:(e-t)/(r-l)+4)*60),a!==void 0&&(n.alpha=a),n}var Ed={mode:"hsv",toMode:{rgb:fo},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:po},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:D,fixup:ke},s:D,v:D,alpha:{use:D,fixup:de}},difference:{h:U1},average:{h:Pe}},ra=Ed;function Br({h:e,w:t,b:o,alpha:a}){if(t===void 0&&(t=0),o===void 0&&(o=0),t+o>1){let r=t+o;t/=r,o/=r}return fo({h:e,s:o===1?1:1-t/(1-o),v:1-o,alpha:a})}function Ar(e){let t=po(e);if(t===void 0)return;let o=t.s!==void 0?t.s:0,a=t.v!==void 0?t.v:0,r={mode:"hwb",w:(1-o)*a,b:1-a};return t.h!==void 0&&(r.h=t.h),t.alpha!==void 0&&(r.alpha=t.alpha),r}function Bd(e,t){if(!t||t[0]!=="hwb")return;let o={mode:"hwb"},[,a,r,l,n]=t;if(a.type!==P.None){if(a.type===P.Percentage)return;o.h=a.value}if(r.type!==P.None){if(r.type===P.Hue)return;o.w=r.value/100}if(l.type!==P.None){if(l.type===P.Hue)return;o.b=l.value/100}return n.type!==P.None&&(o.alpha=Math.min(1,Math.max(0,n.type===P.Number?n.value:n.value/100))),o}var j2=Bd;var Ad={mode:"hwb",toMode:{rgb:Br},fromMode:{rgb:Ar},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[j2],serialize:e=>`hwb(${e.h!==void 0?e.h:"none"} ${e.w!==void 0?e.w*100+"%":"none"} ${e.b!==void 0?e.b*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:D,fixup:ke},w:D,b:D,alpha:{use:D,fixup:de}},difference:{h:E2},average:{h:Pe}},K2=Ad;var Rt=.1593017578125,G2=78.84375,Ht=.8359375,kt=18.8515625,Pt=18.6875;function la(e){if(e<0)return 0;let t=Math.pow(e,1/G2);return 1e4*Math.pow(Math.max(0,t-Ht)/(kt-Pt*t),1/Rt)}function na(e){if(e<0)return 0;let t=Math.pow(e/1e4,Rt);return Math.pow((Ht+kt*t)/(1+Pt*t),G2)}var Zr=e=>Math.max(e/203,0),Fd=({i:e,t,p:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=la(e+.008609037037932761*t+.11102962500302593*o),l=la(e-.00860903703793275*t-.11102962500302599*o),n=la(e+.5600313357106791*t-.32062717498731885*o),i={mode:"xyz65",x:Zr(2.070152218389422*r-1.3263473389671556*l+.2066510476294051*n),y:Zr(.3647385209748074*r+.680566024947227*l-.0453045459220346*n),z:Zr(-.049747207535812*r-.0492609666966138*l+1.1880659249923042*n)};return a!==void 0&&(i.alpha=a),i},Fr=Fd;var $r=(e=0)=>Math.max(e*203,0),$d=({x:e,y:t,z:o,alpha:a})=>{let r=$r(e),l=$r(t),n=$r(o),i=na(.3592832590121217*r+.6976051147779502*l-.0358915932320289*n),s=na(-.1920808463704995*r+1.1004767970374323*l+.0753748658519118*n),d=na(.0070797844607477*r+.0748396662186366*l+.8433265453898765*n),u=.5*i+.5*s,f=1.61376953125*i-3.323486328125*s+1.709716796875*d,p=4.378173828125*i-4.24560546875*s-.132568359375*d,c={mode:"itp",i:u,t:f,p};return a!==void 0&&(c.alpha=a),c},Nr=$d;var Nd={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:Fr,rgb:e=>qe(Fr(e))},fromMode:{xyz65:Nr,rgb:e=>Nr(Ue(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:D,t:D,p:D,alpha:{use:D,fixup:de}}},W2=Nd;var Ud=134.03437499999998,qd=16295499532821565e-27,Ur=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,Rt);return Math.pow((Ht+kt*t)/(1+Pt*t),Ud)},qr=(e=0)=>Math.max(e*203,0),zd=({x:e,y:t,z:o,alpha:a})=>{e=qr(e),t=qr(t),o=qr(o);let r=1.15*e-.15*o,l=.66*t+.34*e,n=Ur(.41478972*r+.579999*l+.014648*o),i=Ur(-.20151*r+1.120649*l+.0531008*o),s=Ur(-.0166008*r+.2648*l+.6684799*o),d=(n+i)/2,u={mode:"jab",j:.44*d/(1-.56*d)-qd,a:3.524*n-4.066708*i+.542708*s,b:.199076*n+1.096799*i-1.295875*s};return a!==void 0&&(u.alpha=a),u},ia=zd;var jd=134.03437499999998,X2=16295499532821565e-27,zr=e=>{if(e<0)return 0;let t=Math.pow(e,1/jd);return 1e4*Math.pow((Ht-t)/(Pt*t-kt),1/Rt)},jr=e=>e/203,Kd=({j:e,a:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=(e+X2)/(.44+.56*(e+X2)),l=zr(r+.13860504*t+.058047316*o),n=zr(r-.13860504*t-.058047316*o),i=zr(r-.096019242*t-.8118919*o),s={mode:"xyz65",x:jr(1.661373024652174*l-.914523081304348*n+.23136208173913045*i),y:jr(-.3250758611844533*l+1.571847026732543*n-.21825383453227928*i),z:jr(-.090982811*l-.31272829*n+1.5227666*i)};return a!==void 0&&(s.alpha=a),s},sa=Kd;var Gd=e=>{let t=ia(Ue(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},da=Gd;var Wd=e=>qe(sa(e)),ua=Wd;var Xd={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:da,xyz65:ia},toMode:{rgb:ua,xyz65:sa},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:D,a:D,b:D,alpha:{use:D,fixup:de}}},Q2=Xd;var Qd=({j:e,a:t,b:o,alpha:a})=>{t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.sqrt(t*t+o*o),l={mode:"jch",j:e,c:r};return r&&(l.h=me(Math.atan2(o,t)*180/Math.PI)),a!==void 0&&(l.alpha=a),l},Kr=Qd;var Jd=({j:e,c:t,h:o,alpha:a})=>{o===void 0&&(o=0);let r={mode:"jab",j:e,a:t?t*Math.cos(o/180*Math.PI):0,b:t?t*Math.sin(o/180*Math.PI):0};return a!==void 0&&(r.alpha=a),r},Gr=Jd;var Yd={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Gr,rgb:e=>ua(Gr(e))},fromMode:{rgb:e=>Kr(da(e)),jab:Kr},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:D,fixup:ke},c:D,j:D,alpha:{use:D,fixup:de}},difference:{h:q1},average:{h:Pe}},J2=Yd;var G1=Math.pow(29,3)/Math.pow(3,3),Tt=Math.pow(6,3)/Math.pow(29,3);var Wr=e=>Math.pow(e,3)>Tt?Math.pow(e,3):(116*e-16)/G1,e7=({l:e,a:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=(e+16)/116,l=t/500+r,n=r-o/200,i={mode:"xyz50",x:Wr(l)*xe.X,y:Wr(r)*xe.Y,z:Wr(n)*xe.Z};return a!==void 0&&(i.alpha=a),i},Vt=e7;var t7=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=l1({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*o,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*o,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*o});return a!==void 0&&(r.alpha=a),r},w1=t7;var o7=e=>w1(Vt(e)),ca=o7;var a7=e=>{let{r:t,g:o,b:a,alpha:r}=r1(e),l={mode:"xyz50",x:.436065742824811*t+.3851514688337912*o+.14307845442264197*a,y:.22249319175623702*t+.7168870538238823*o+.06061979053616537*a,z:.013923904500943465*t+.09708128566574634*o+.7140993584005155*a};return r!==void 0&&(l.alpha=r),l},b1=a7;var Xr=e=>e>Tt?Math.cbrt(e):(G1*e+16)/116,r7=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Xr(e/xe.X),l=Xr(t/xe.Y),n=Xr(o/xe.Z),i={mode:"lab",l:116*l-16,a:500*(r-l),b:200*(l-n)};return a!==void 0&&(i.alpha=a),i},_t=r7;var l7=e=>{let t=_t(b1(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},fa=l7;function n7(e,t){if(!t||t[0]!=="lab")return;let o={mode:"lab"},[,a,r,l,n]=t;if(!(a.type===P.Hue||r.type===P.Hue||l.type===P.Hue))return a.type!==P.None&&(o.l=Math.min(Math.max(0,a.value),100)),r.type!==P.None&&(o.a=r.type===P.Number?r.value:r.value*125/100),l.type!==P.None&&(o.b=l.type===P.Number?l.value:l.value*125/100),n.type!==P.None&&(o.alpha=Math.min(1,Math.max(0,n.type===P.Number?n.value:n.value/100))),o}var Y2=n7;var i7={mode:"lab",toMode:{xyz50:Vt,rgb:ca},fromMode:{xyz50:_t,rgb:fa},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[Y2],serialize:e=>`lab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:D,a:D,b:D,alpha:{use:D,fixup:de}}},Dt=i7;var s7={...Dt,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:ea,rgb:j1},fromMode:{xyz65:ta,rgb:K1},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}},e0=s7;function d7(e,t){if(!t||t[0]!=="lch")return;let o={mode:"lch"},[,a,r,l,n]=t;if(a.type!==P.None){if(a.type===P.Hue)return;o.l=Math.min(Math.max(0,a.value),100)}if(r.type!==P.None&&(o.c=Math.max(0,r.type===P.Number?r.value:r.value*150/100)),l.type!==P.None){if(l.type===P.Percentage)return;o.h=l.value}return n.type!==P.None&&(o.alpha=Math.min(1,Math.max(0,n.type===P.Number?n.value:n.value/100))),o}var t0=d7;var u7={mode:"lch",toMode:{lab:Je,rgb:e=>ca(Je(e))},fromMode:{rgb:e=>Qe(fa(e)),lab:Qe},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[t0],serialize:e=>`lch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:D,fixup:ke},c:D,l:D,alpha:{use:D,fixup:de}},difference:{h:q1},average:{h:Pe}},Ot=u7;var c7={...Ot,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>Je(e,"lab65"),rgb:e=>j1(Je(e,"lab65"))},fromMode:{rgb:e=>Qe(K1(e),"lch65"),lab65:e=>Qe(e,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}},o0=c7;var f7=({l:e,u:t,v:o,alpha:a})=>{t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.sqrt(t*t+o*o),l={mode:"lchuv",l:e,c:r};return r&&(l.h=me(Math.atan2(o,t)*180/Math.PI)),a!==void 0&&(l.alpha=a),l},Qr=f7;var p7=({l:e,c:t,h:o,alpha:a})=>{o===void 0&&(o=0);let r={mode:"luv",l:e,u:t?t*Math.cos(o/180*Math.PI):0,v:t?t*Math.sin(o/180*Math.PI):0};return a!==void 0&&(r.alpha=a),r},Jr=p7;var a0=(e,t,o)=>4*e/(e+15*t+3*o),r0=(e,t,o)=>9*t/(e+15*t+3*o),C7=a0(xe.X,xe.Y,xe.Z),m7=r0(xe.X,xe.Y,xe.Z),h7=e=>e<=Tt?G1*e:116*Math.cbrt(e)-16,g7=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=h7(t/xe.Y),l=a0(e,t,o),n=r0(e,t,o);!isFinite(l)||!isFinite(n)?r=l=n=0:(l=13*r*(l-C7),n=13*r*(n-m7));let i={mode:"luv",l:r,u:l,v:n};return a!==void 0&&(i.alpha=a),i},Co=g7;var v7=(e,t,o)=>4*e/(e+15*t+3*o),x7=(e,t,o)=>9*t/(e+15*t+3*o),L7=v7(xe.X,xe.Y,xe.Z),w7=x7(xe.X,xe.Y,xe.Z),b7=({l:e,u:t,v:o,alpha:a})=>{if(e===void 0&&(e=0),e===0)return{mode:"xyz50",x:0,y:0,z:0};t===void 0&&(t=0),o===void 0&&(o=0);let r=t/(13*e)+L7,l=o/(13*e)+w7,n=xe.Y*(e<=8?e/G1:Math.pow((e+16)/116,3)),i=n*(9*r)/(4*l),s=n*(12-3*r-20*l)/(4*l),d={mode:"xyz50",x:i,y:n,z:s};return a!==void 0&&(d.alpha=a),d},mo=b7;var I7=e=>Qr(Co(b1(e))),y7=e=>w1(mo(Jr(e))),M7={mode:"lchuv",toMode:{luv:Jr,rgb:y7},fromMode:{rgb:I7,luv:Qr},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:D,fixup:ke},c:D,l:D,alpha:{use:D,fixup:de}},difference:{h:q1},average:{h:Pe}},l0=M7;var S7={...a1,mode:"lrgb",toMode:{rgb:l1},fromMode:{rgb:r1},parse:["srgb-linear"],serialize:"srgb-linear"},n0=S7;var R7={mode:"luv",toMode:{xyz50:mo,rgb:e=>w1(mo(e))},fromMode:{xyz50:Co,rgb:e=>Co(b1(e))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:D,u:D,v:D,alpha:{use:D,fixup:de}}},i0=R7;var H7=({r:e,g:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.cbrt(.412221469470763*e+.5363325372617348*t+.0514459932675022*o),l=Math.cbrt(.2119034958178252*e+.6806995506452344*t+.1073969535369406*o),n=Math.cbrt(.0883024591900564*e+.2817188391361215*t+.6299787016738222*o),i={mode:"oklab",l:.210454268309314*r+.7936177747023054*l-.0040720430116193*n,a:1.9779985324311684*r-2.42859224204858*l+.450593709617411*n,b:.0259040424655478*r+.7827717124575296*l-.8086757549230774*n};return a!==void 0&&(i.alpha=a),i},pa=H7;var k7=e=>{let t=pa(r1(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},W1=k7;var P7=({l:e,a:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.pow(e+.3963377773761749*t+.2158037573099136*o,3),l=Math.pow(e-.1055613458156586*t-.0638541728258133*o,3),n=Math.pow(e-.0894841775298119*t-1.2914855480194092*o,3),i={mode:"lrgb",r:4.076741636075957*r-3.3077115392580616*l+.2309699031821044*n,g:-1.2684379732850317*r+2.6097573492876887*l-.3413193760026573*n,b:-.0041960761386756*r-.7034186179359362*l+1.7076146940746117*n};return a!==void 0&&(i.alpha=a),i},I1=P7;var T7=e=>l1(I1(e)),X1=T7;function ho(e){let a=1.170873786407767;return .5*(a*e-.206+Math.sqrt((a*e-.206)*(a*e-.206)+4*.03*a*e))}function ct(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function V7(e,t){let o,a,r,l,n,i,s,d;-1.88170328*e-.80936493*t>1?(o=1.19086277,a=1.76576728,r=.59662641,l=.75515197,n=.56771245,i=4.0767416621,s=-3.3077115913,d=.2309699292):1.81444104*e-1.19445276*t>1?(o=.73956515,a=-.45954404,r=.08285427,l=.1254107,n=.14503204,i=-1.2684380046,s=2.6097574011,d=-.3413193965):(o=1.35733652,a=-.00915799,r=-1.1513021,l=-.50559606,n=.00692167,i=-.0041960863,s=-.7034186147,d=1.707614701);let u=o+a*e+r*t+l*e*e+n*e*t,f=.3963377774*e+.2158037573*t,p=-.1055613458*e-.0638541728*t,c=-.0894841775*e-1.291485548*t;{let x=1+u*f,w=1+u*p,C=1+u*c,y=x*x*x,g=w*w*w,k=C*C*C,m=3*f*x*x,V=3*p*w*w,H=3*c*C*C,q=6*f*f*x,M=6*p*p*w,A=6*c*c*C,K=i*y+s*g+d*k,U=i*m+s*V+d*H,ae=i*q+s*M+d*A;u=u-K*U/(U*U-.5*K*ae)}return u}function Yr(e,t){let o=V7(e,t),a=I1({l:1,a:o*e,b:o*t}),r=Math.cbrt(1/Math.max(a.r,a.g,a.b)),l=r*o;return[r,l]}function _7(e,t,o,a,r,l=null){l||(l=Yr(e,t));let n;if((o-r)*l[1]-(l[0]-r)*a<=0)n=l[1]*r/(a*l[0]+l[1]*(r-o));else{n=l[1]*(r-1)/(a*(l[0]-1)+l[1]*(r-o));{let i=o-r,s=a,d=.3963377774*e+.2158037573*t,u=-.1055613458*e-.0638541728*t,f=-.0894841775*e-1.291485548*t,p=i+s*d,c=i+s*u,x=i+s*f;{let w=r*(1-n)+n*o,C=n*a,y=w+C*d,g=w+C*u,k=w+C*f,m=y*y*y,V=g*g*g,H=k*k*k,q=3*p*y*y,M=3*c*g*g,A=3*x*k*k,K=6*p*p*y,U=6*c*c*g,ae=6*x*x*k,B=4.0767416621*m-3.3077115913*V+.2309699292*H-1,Z=4.0767416621*q-3.3077115913*M+.2309699292*A,S=4.0767416621*K-3.3077115913*U+.2309699292*ae,b=Z/(Z*Z-.5*B*S),I=-B*b,L=-1.2684380046*m+2.6097574011*V-.3413193965*H-1,O=-1.2684380046*q+2.6097574011*M-.3413193965*A,T=-1.2684380046*K+2.6097574011*U-.3413193965*ae,F=O/(O*O-.5*L*T),$=-L*F,v=-.0041960863*m-.7034186147*V+1.707614701*H-1,h=-.0041960863*q-.7034186147*M+1.707614701*A,_=-.0041960863*K-.7034186147*U+1.707614701*ae,E=h/(h*h-.5*v*_),R=-v*E;I=b>=0?I:1e6,$=F>=0?$:1e6,R=E>=0?R:1e6,n+=Math.min(I,Math.min($,R))}}}return n}function go(e,t,o=null){o||(o=Yr(e,t));let a=o[0],r=o[1];return[r/a,r/(1-a)]}function Ca(e,t,o){let a=Yr(t,o),r=_7(t,o,e,1,e,a),l=go(t,o,a),n=.11516993+1/(7.4477897+4.1590124*o+t*(-2.19557347+1.75198401*o+t*(-2.13704948-10.02301043*o+t*(-4.24894561+5.38770819*o+4.69891013*t)))),i=.11239642+1/(1.6132032-.68124379*o+t*(.40370612+.90148123*o+t*(-.27087943+.6122399*o+t*(.00299215-.45399568*o-.14661872*t)))),s=r/Math.min(e*l[0],(1-e)*l[1]),d=e*n,u=(1-e)*i,f=.9*s*Math.sqrt(Math.sqrt(1/(1/(d*d*d*d)+1/(u*u*u*u))));return d=e*.4,u=(1-e)*.8,[Math.sqrt(1/(1/(d*d)+1/(u*u))),f,r]}function ma(e){let t=e.l!==void 0?e.l:0,o=e.a!==void 0?e.a:0,a=e.b!==void 0?e.b:0,r={mode:"okhsl",l:ho(t)};e.alpha!==void 0&&(r.alpha=e.alpha);let l=Math.sqrt(o*o+a*a);if(!l)return r.s=0,r;let[n,i,s]=Ca(t,o/l,a/l),d;if(l<i){let u=0,f=.8*n,p=1-f/i;d=(l-u)/(f+p*(l-u))*.8}else{let u=i,f=.2*i*i*1.25*1.25/n,p=1-f/(s-i);d=.8+.2*((l-u)/(f+p*(l-u)))}return d&&(r.s=d,r.h=me(Math.atan2(a,o)*180/Math.PI)),r}function ha(e){let t=e.h!==void 0?e.h:0,o=e.s!==void 0?e.s:0,a=e.l!==void 0?e.l:0,r={mode:"oklab",l:ct(a)};if(e.alpha!==void 0&&(r.alpha=e.alpha),!o||a===1)return r.a=r.b=0,r;let l=Math.cos(t/180*Math.PI),n=Math.sin(t/180*Math.PI),[i,s,d]=Ca(r.l,l,n),u,f,p,c;o<.8?(u=1.25*o,f=0,p=.8*i,c=1-p/s):(u=5*(o-.8),f=s,p=.2*s*s*1.25*1.25/i,c=1-p/(d-s));let x=f+u*p/(1-c*u);return r.a=x*l,r.b=x*n,r}var D7={...aa,mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:ma,rgb:e=>ma(W1(e))},toMode:{oklab:ha,rgb:e=>X1(ha(e))}},s0=D7;function ga(e){let t=e.l!==void 0?e.l:0,o=e.a!==void 0?e.a:0,a=e.b!==void 0?e.b:0,r=Math.sqrt(o*o+a*a),l=r?o/r:1,n=r?a/r:1,[i,s]=go(l,n),d=.5,u=1-d/i,f=s/(r+t*s),p=f*t,c=f*r,x=ct(p),w=c*x/p,C=I1({l:x,a:l*w,b:n*w}),y=Math.cbrt(1/Math.max(C.r,C.g,C.b,0));t=t/y,r=r/y*ho(t)/t,t=ho(t);let g={mode:"okhsv",s:r?(d+s)*c/(s*d+s*u*c):0,v:t?t/p:0};return g.s&&(g.h=me(Math.atan2(a,o)*180/Math.PI)),e.alpha!==void 0&&(g.alpha=e.alpha),g}function va(e){let t={mode:"oklab"};e.alpha!==void 0&&(t.alpha=e.alpha);let o=e.h!==void 0?e.h:0,a=e.s!==void 0?e.s:0,r=e.v!==void 0?e.v:0,l=Math.cos(o/180*Math.PI),n=Math.sin(o/180*Math.PI),[i,s]=go(l,n),d=.5,u=1-d/i,f=1-a*d/(d+s-s*u*a),p=a*s*d/(d+s-s*u*a),c=ct(f),x=p*c/f,w=I1({l:c,a:l*x,b:n*x}),C=Math.cbrt(1/Math.max(w.r,w.g,w.b,0)),y=ct(r*f),g=p*y/f;return t.l=y*C,t.a=g*l*C,t.b=g*n*C,t}var O7={...ra,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:ga,rgb:e=>ga(W1(e))},toMode:{oklab:va,rgb:e=>X1(va(e))}},d0=O7;function E7(e,t){if(!t||t[0]!=="oklab")return;let o={mode:"oklab"},[,a,r,l,n]=t;if(!(a.type===P.Hue||r.type===P.Hue||l.type===P.Hue))return a.type!==P.None&&(o.l=Math.min(Math.max(0,a.type===P.Number?a.value:a.value/100),1)),r.type!==P.None&&(o.a=r.type===P.Number?r.value:r.value*.4/100),l.type!==P.None&&(o.b=l.type===P.Number?l.value:l.value*.4/100),n.type!==P.None&&(o.alpha=Math.min(1,Math.max(0,n.type===P.Number?n.value:n.value/100))),o}var u0=E7;var B7={...Dt,mode:"oklab",toMode:{lrgb:I1,rgb:X1},fromMode:{lrgb:pa,rgb:W1},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[u0],serialize:e=>`oklab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`},c0=B7;function A7(e,t){if(!t||t[0]!=="oklch")return;let o={mode:"oklch"},[,a,r,l,n]=t;if(a.type!==P.None){if(a.type===P.Hue)return;o.l=Math.min(Math.max(0,a.type===P.Number?a.value:a.value/100),1)}if(r.type!==P.None&&(o.c=Math.max(0,r.type===P.Number?r.value:r.value*.4/100)),l.type!==P.None){if(l.type===P.Percentage)return;o.h=l.value}return n.type!==P.None&&(o.alpha=Math.min(1,Math.max(0,n.type===P.Number?n.value:n.value/100))),o}var f0=A7;var Z7={...Ot,mode:"oklch",toMode:{oklab:e=>Je(e,"oklab"),rgb:e=>X1(Je(e,"oklab"))},fromMode:{rgb:e=>Qe(W1(e),"oklch"),oklab:e=>Qe(e,"oklch")},parse:[f0],serialize:e=>`oklch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}},p0=Z7;var F7=e=>{let{r:t,g:o,b:a,alpha:r}=r1(e),l={mode:"xyz65",x:.486570948648216*t+.265667693169093*o+.1982172852343625*a,y:.2289745640697487*t+.6917385218365062*o+.079286914093745*a,z:0*t+.0451133818589026*o+1.043944368900976*a};return r!==void 0&&(l.alpha=r),l},el=F7;var $7=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=l1({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*o,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*o,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*o},"p3");return a!==void 0&&(r.alpha=a),r},tl=$7;var N7={...a1,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>tl(Ue(e)),xyz65:tl},toMode:{rgb:e=>qe(el(e)),xyz65:el}},C0=N7;var ol=e=>{let t=Math.abs(e);return t>=.001953125?Math.sign(e)*Math.pow(t,.5555555555555556):16*e},U7=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r={mode:"prophoto",r:ol(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*o),g:ol(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*o),b:ol(e*0+t*0+1.2119675456389452*o)};return a!==void 0&&(r.alpha=a),r},al=U7;var rl=(e=0)=>{let t=Math.abs(e);return t>=.03125?Math.sign(e)*Math.pow(t,1.8):e/16},q7=e=>{let t=rl(e.r),o=rl(e.g),a=rl(e.b),r={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*o+.0313477341283922*a,y:.2880748288194013*t+.7118352342418731*o+899369387256e-16*a,z:0*t+0*o+.8251046025104602*a};return e.alpha!==void 0&&(r.alpha=e.alpha),r},ll=q7;var z7={...a1,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:al,rgb:e=>al(b1(e))},toMode:{xyz50:ll,rgb:e=>w1(ll(e))}},m0=z7;var h0=1.09929682680944,j7=.018053968510807,nl=e=>{let t=Math.abs(e);return t>j7?(Math.sign(e)||1)*(h0*Math.pow(t,.45)-(h0-1)):4.5*e},K7=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r={mode:"rec2020",r:nl(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*o),g:nl(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*o),b:nl(e*.0176398574453108-t*.0427706132578085+.9421031212354739*o)};return a!==void 0&&(r.alpha=a),r},il=K7;var g0=1.09929682680944,G7=.018053968510807,sl=(e=0)=>{let t=Math.abs(e);return t<G7*4.5?e/4.5:(Math.sign(e)||1)*Math.pow((t+g0-1)/g0,1/.45)},W7=e=>{let t=sl(e.r),o=sl(e.g),a=sl(e.b),r={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*o+.1688809751641721*a,y:.262700212011267*t+.6779980715188708*o+.059301716469862*a,z:0*t+.0280726930490874*o+1.0609850577107909*a};return e.alpha!==void 0&&(r.alpha=e.alpha),r},dl=W7;var X7={...a1,mode:"rec2020",fromMode:{xyz65:il,rgb:e=>il(Ue(e))},toMode:{xyz65:dl,rgb:e=>qe(dl(e))},parse:["rec2020"],serialize:"rec2020"},v0=X7;var V1=.0037930732552754493,xa=Math.cbrt(V1);var ul=e=>Math.cbrt(e)-xa,Q7=e=>{let{r:t,g:o,b:a,alpha:r}=r1(e),l=ul(.3*t+.622*o+.078*a+V1),n=ul(.23*t+.692*o+.078*a+V1),i=ul(.2434226892454782*t+.2047674442449682*o+.5518098665095535*a+V1),s={mode:"xyb",x:(l-n)/2,y:(l+n)/2,b:i-(l+n)/2};return r!==void 0&&(s.alpha=r),s},x0=Q7;var cl=e=>Math.pow(e+xa,3),J7=({x:e,y:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=cl(e+t)-V1,l=cl(t-e)-V1,n=cl(o+t)-V1,i=l1({r:11.031566904639861*r-9.866943908131562*l-.16462299650829934*n,g:-3.2541473810744237*r+4.418770377582723*l-.16462299650829934*n,b:-3.6588512867136815*r+2.7129230459360922*l+1.9459282407775895*n});return a!==void 0&&(i.alpha=a),i},L0=J7;var Y7={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:L0},fromMode:{rgb:x0},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:D,y:D,b:D,alpha:{use:D,fixup:de}}},w0=Y7;var eu={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:w1,lab:_t},fromMode:{rgb:b1,lab:Vt},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:D,y:D,z:D,alpha:{use:D,fixup:de}}},b0=eu;var tu=e=>{let{x:t,y:o,z:a,alpha:r}=e;t===void 0&&(t=0),o===void 0&&(o=0),a===void 0&&(a=0);let l={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*o-.0501922295431356*a,y:.0296278156881593*t+.990434484573249*o-.0170738250293851*a,z:-.0092430581525912*t+.0150551448965779*o+.7518742899580008*a};return r!==void 0&&(l.alpha=r),l},I0=tu;var ou=e=>{let{x:t,y:o,z:a,alpha:r}=e;t===void 0&&(t=0),o===void 0&&(o=0),a===void 0&&(a=0);let l={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*o+.0632593086610217*a,y:-.0283697069632081*t+1.0099954580058226*o+.021041398966943*a,z:.0123140016883199*t-.0205076964334779*o+1.3303659366080753*a};return r!==void 0&&(l.alpha=r),l},y0=ou;var au={mode:"xyz65",toMode:{rgb:qe,xyz50:I0},fromMode:{rgb:Ue,xyz50:y0},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:D,y:D,z:D,alpha:{use:D,fixup:de}}},M0=au;var ru=({r:e,g:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*o,i:.59597799*e-.2741761*t-.32180189*o,q:.21147017*e-.52261711*t+.31114694*o};return a!==void 0&&(r.alpha=a),r},S0=ru;var lu=({y:e,i:t,q:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r={mode:"rgb",r:e+.95608445*t+.6208885*o,g:e-.27137664*t-.6486059*o,b:e-1.10561724*t+1.70250126*o};return a!==void 0&&(r.alpha=a),r},R0=lu;var nu={mode:"yiq",toMode:{rgb:R0},fromMode:{rgb:S0},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:D,i:D,q:D,alpha:{use:D,fixup:de}}},H0=nu;var iu=(e,t)=>Math.round(e*(t=Math.pow(10,t)))/t,su=(e=4)=>t=>typeof t=="number"?iu(t,e):t,vo=su;var Fx=vo(2);var $x=Xe("rgb"),Nx=Xe("hsl");var fl=e=>{let t=Ko(e);if(!t)return;let o=Go(t.mode);if(!o.serialize||typeof o.serialize=="string"){let a=`color(${o.serialize||`--${t.mode}`} `;return o.channels.forEach((r,l)=>{r!=="alpha"&&(a+=(l?" ":"")+(t[r]!==void 0?t[r]:"none"))}),t.alpha!==void 0&&t.alpha<1&&(a+=` / ${t.alpha}`),a+")"}if(typeof o.serialize=="function")return o.serialize(t)};var kL=pe(H2),PL=pe(B2),TL=pe(F2),VL=pe($2),_L=pe(N2),DL=pe(aa),OL=pe(ra),EL=pe(K2),BL=pe(W2),AL=pe(Q2),ZL=pe(J2),FL=pe(Dt),$L=pe(e0),NL=pe(Ot),UL=pe(o0),qL=pe(l0),zL=pe(n0),jL=pe(i0),KL=pe(s0),GL=pe(d0),WL=pe(c0),XL=pe(p0),QL=pe(C0),JL=pe(m0),YL=pe(v0),ew=pe(a1),tw=pe(w0),ow=pe(b0),aw=pe(M0),rw=pe(H0);var pl=Xe("rgb"),du=Xe("hsl"),uu=Xe("oklch"),cu=Xe("oklab"),fu=Xe("lch"),pu=Xe("lab"),Cu=vo(3),k0=null;function mu(){return k0??(k0=document.createElement("canvas").getContext("2d")),k0}function P0(e){try{let t=mu();if(!t)return null;t.fillStyle="#000000",t.fillStyle=e;let o=t.fillStyle;t.fillStyle="#ffffff",t.fillStyle=e;let a=t.fillStyle;return o===a?o:null}catch{return null}}function T0(e){if(!e||typeof e!="string")return!1;let t=e.trim();return dt(t)!==void 0?!0:P0(t)!==null}function ft(e){let t={r:255,g:255,b:255,a:1};if(!e||typeof e!="string")return t;let o=e.trim(),a=dt(o);if(a){let l=pl(a);if(l&&"r"in l&&"g"in l&&"b"in l)return{r:Math.round(Math.min(255,Math.max(0,l.r*255))),g:Math.round(Math.min(255,Math.max(0,l.g*255))),b:Math.round(Math.min(255,Math.max(0,l.b*255))),a:l.alpha??1}}let r=P0(o);if(r){if(r.startsWith("#")){let n=r.slice(1);return{r:parseInt(n.slice(0,2),16),g:parseInt(n.slice(2,4),16),b:parseInt(n.slice(4,6),16),a:1}}let l=r.match(/rgba?\(\s*(\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);if(l&&l[1]!=null&&l[2]!=null&&l[3]!=null)return{r:+l[1],g:+l[2],b:+l[3],a:l[4]!=null?+l[4]:1}}return t}function Et(e){let t=Math.round(Math.min(255,Math.max(0,e.r))),o=Math.round(Math.min(255,Math.max(0,e.g))),a=Math.round(Math.min(255,Math.max(0,e.b))),r=Math.round(Math.min(1,Math.max(0,e.a))*100)/100;return r>=1?`rgb(${t}, ${o}, ${a})`:`rgba(${t}, ${o}, ${a}, ${r})`}function La(e){let t=e.startsWith("#")?e.slice(1):e;return/^[0-9a-fA-F]+$/.test(t)&&[3,4,6,8].includes(t.length)}function xo(e){let t=Math.round(Math.min(255,Math.max(0,e.r))),o=Math.round(Math.min(255,Math.max(0,e.g))),a=Math.round(Math.min(255,Math.max(0,e.b))),r=Math.min(1,Math.max(0,e.a)),l=`#${[t,o,a].map(n=>n.toString(16).padStart(2,"0")).join("")}`;return r<1?l+Math.round(r*255).toString(16).padStart(2,"0"):l}function V0(e){return!e||typeof e!="string"?"rgb":dt(e.trim())?.mode??"rgb"}function ze(e,t){let o={mode:"rgb",r:e.r/255,g:e.g/255,b:e.b/255,alpha:e.a};switch(t){case"oklch":return uu(o);case"oklab":return cu(o);case"lch":return fu(o);case"lab":return pu(o);default:return o}}function Cl(e){let t=e?pl(e):null;return!t||!("r"in t)||!("g"in t)||!("b"in t)?{r:255,g:255,b:255,a:1}:{r:Math.round(Math.min(255,Math.max(0,t.r*255))),g:Math.round(Math.min(255,Math.max(0,t.g*255))),b:Math.round(Math.min(255,Math.max(0,t.b*255))),a:t.alpha??1}}function ml(e){if(!e)return"";let t={...e},o=t;for(let a of Object.keys(o)){let r=o[a];typeof r=="number"&&(o[a]=Cu(r))}return fl(t)}function Bt(e){let t={mode:"rgb",r:e.r/255,g:e.g/255,b:e.b/255},o=du(t);return o?{h:o.h??0,s:o.s*100,l:o.l*100}:{h:0,s:0,l:0}}function hl(e){let t={mode:"hsl",h:e.h,s:e.s/100,l:e.l/100},o=pl(t);return!o||!("r"in o)||!("g"in o)||!("b"in o)?{r:0,g:0,b:0}:{r:Math.round(o.r*255),g:Math.round(o.g*255),b:Math.round(o.b*255)}}import{jsx as Te,jsxs as y1}from"react/jsx-runtime";var gl=16,At=4,gu=245,_0=260,vu=200,xu="linear-gradient(45deg, #e0e0e0 25%, transparent 25%), linear-gradient(-45deg, #e0e0e0 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e0e0e0 75%), linear-gradient(-45deg, transparent 75%, #e0e0e0 75%)",Lu=["oklch","oklab","lch","lab","hsl"],D0=["oklch","oklab","lch","lab"],vl=["rgb","hsl","oklch","oklab","lch","lab"];function xl(e){let t=V0(e);return Lu.includes(t)?t:"rgb"}function Lo(e,t){let o=Bt({r:e.r,g:e.g,b:e.b}),a=ze(e,"oklch"),r=ze(e,"oklab"),l=ze(e,"lch"),n=ze(e,"lab");return{hex:yu(t,e),r:e.r,g:e.g,b:e.b,h:Math.round(o.h),s:Math.round(o.s),l:Math.round(o.l),a:Math.round(e.a*100),oklch_l:Math.round(a.l*100),oklch_c:Math.round(a.c*1e3)/10,oklch_h:Math.round(a.h||0),oklab_l:Math.round(r.l*100),oklab_a:Math.round(r.a*1e3)/10,oklab_b:Math.round(r.b*1e3)/10,lch_l:Math.round(l.l),lch_c:Math.round(l.c),lch_h:Math.round(l.h||0),lab_l:Math.round(n.l),lab_a:Math.round(n.a),lab_b:Math.round(n.b)}}function wl(e,t){let o=t.a/100;switch(e){case"oklch":return{mode:"oklch",l:t.oklch_l/100,c:t.oklch_c/100,h:t.oklch_h,alpha:o};case"oklab":return{mode:"oklab",l:t.oklab_l/100,a:t.oklab_a/100,b:t.oklab_b/100,alpha:o};case"lch":return{mode:"lch",l:t.lch_l,c:t.lch_c,h:t.lch_h,alpha:o};case"lab":return{mode:"lab",l:t.lab_l,a:t.lab_a,b:t.lab_b,alpha:o};case"hsl":return{mode:"hsl",h:t.h,s:t.s,l:t.l};default:return{mode:"rgb",r:t.r/255,g:t.g/255,b:t.b/255,alpha:o}}}function wu(e){let t=it(e);return t?t.getBoundingClientRect():{top:0,bottom:window.innerHeight,left:0,right:window.innerWidth}}function bu(e,t=gu){let o=e.getBoundingClientRect(),a=wu(e),r=a.bottom-o.bottom-At,l=o.top-a.top-At,i=r<t&&l>=t?o.top-t-At:o.bottom+At;i=Math.max(a.top+At,Math.min(i,a.bottom-t-At));let s=o.left;return s+_0>a.right&&(s=a.right-_0-gl),s<a.left+gl&&(s=a.left+gl),{top:i,left:s}}function bl(e){return e!=null&&typeof e=="string"?e:"#ffffff"}function Ll(e){let{r:t,g:o,b:a,a:r}=ft(bl(e));return{type:"rgba",r:t,g:o,b:a,a:r}}function Iu(e,t){let o=e||Et(t);return t.a>=1?{backgroundColor:o}:{backgroundColor:o,backgroundImage:`linear-gradient(0deg, ${o}, ${o}), ${xu}`,backgroundSize:"100% 100%, 8px 8px, 8px 8px, 8px 8px, 8px 8px",backgroundPosition:"0 0, 0 0, 0 4px, 4px -4px, -4px 0"}}function yu(e,t){let o=typeof e=="string"?e.trim():"";return La(o)?o:xo(t)}var Mu=e=>e.preventDefault(),Su=e=>{e.key==="Enter"&&e.currentTarget.blur()};function Ru(e,t){switch(t.type){case"SET_ALL":return{format:e.format,hex:t.hex,r:t.r,g:t.g,b:t.b,h:t.h,s:t.s,l:t.l,a:t.a,oklch_l:t.oklch_l,oklch_c:t.oklch_c,oklch_h:t.oklch_h,oklab_l:t.oklab_l,oklab_a:t.oklab_a,oklab_b:t.oklab_b,lch_l:t.lch_l,lch_c:t.lch_c,lch_h:t.lch_h,lab_l:t.lab_l,lab_a:t.lab_a,lab_b:t.lab_b};case"SET_RGBA":{let{r:o,g:a,b:r,a:l}=t,n=Bt({r:o,g:a,b:r}),i={r:o,g:a,b:r,a:l/100},s=ze(i,"oklch"),d=ze(i,"oklab"),u=ze(i,"lch"),f=ze(i,"lab");return{...e,hex:xo(i),r:o,g:a,b:r,h:Math.round(n.h),s:Math.round(n.s),l:Math.round(n.l),a:l,oklch_l:Math.round(s.l*100),oklch_c:Math.round(s.c*1e3)/10,oklch_h:Math.round(s.h||0),oklab_l:Math.round(d.l*100),oklab_a:Math.round(d.a*1e3)/10,oklab_b:Math.round(d.b*1e3)/10,lch_l:Math.round(u.l),lch_c:Math.round(u.c),lch_h:Math.round(u.h||0),lab_l:Math.round(f.l),lab_a:Math.round(f.a),lab_b:Math.round(f.b)}}case"SET_HEX":return{...e,hex:t.hex};case"SET_CHANNEL":{let o={...e,[t.channel]:t.value},a;if(e.format==="rgb")a={r:o.r,g:o.g,b:o.b,a:o.a/100};else if(e.format==="hsl"){let d=hl({h:o.h,s:o.s,l:o.l});o.r=Math.round(d.r),o.g=Math.round(d.g),o.b=Math.round(d.b),a={r:o.r,g:o.g,b:o.b,a:o.a/100}}else{let d=wl(e.format,o);a=Cl(d),o.r=a.r,o.g=a.g,o.b=a.b}let r=Bt({r:o.r,g:o.g,b:o.b}),l=ze(a,"oklch"),n=ze(a,"oklab"),i=ze(a,"lch"),s=ze(a,"lab");return{...o,hex:xo(a),h:Math.round(r.h),s:Math.round(r.s),l:Math.round(r.l),oklch_l:Math.round(l.l*100),oklch_c:Math.round(l.c*1e3)/10,oklch_h:Math.round(l.h||0),oklab_l:Math.round(n.l*100),oklab_a:Math.round(n.a*1e3)/10,oklab_b:Math.round(n.b*1e3)/10,lch_l:Math.round(i.l),lch_c:Math.round(i.c),lch_h:Math.round(i.h||0),lab_l:Math.round(s.l),lab_a:Math.round(s.a),lab_b:Math.round(s.b)}}case"SET_FORMAT":return{...e,format:t.format};default:return e}}var Hu={placeholder:"Enter color value",ariaValue:"{0} color value",ariaOpenPicker:"{0}, open color picker. Current color: {1}",ariaPicker:"{0} picker",ariaSaturation:"Color saturation and brightness",ariaEyedropper:"Pick color from screen",ariaHue:"Hue, 0 to 360 degrees",ariaAlphaSlider:"Alpha transparency, 0 to 100 percent",ariaHex:"Hexadecimal color value",ariaChannel:"{0} ({1}), {2} to {3}",ariaAlphaInput:"Alpha, 0 to 100 percent",ariaFormatCycle:"Color format: {0}. Click to change format.",titleFormatCycle:"Click to cycle format: RGB, HSL, OKLCH, OKLAB, LCH, LAB"};function wa({label:e,value:t,onChange:o,id:a="color",aria:r}){let l=f1(Hu,r),n=`${a}-trigger`,i=`${a}-popover`,s=bl(t),[{colorInput:d,colorState:u},f]=p2(()=>Ll(s)),[p,c]=Le.useReducer(Ru,s,v=>{let h=ft(v),_=Lo(h,v);return{format:xl(v),..._}}),x=Le.useRef(p);x.current=p;let w=Le.useRef(null),C=Le.useRef(t),y=Le.useRef(o);y.current=o;let g=Le.useCallback(v=>{let h=x.current.format,_;if(D0.includes(h)){let E=ze(v,h);_=ml(E)}else if(h==="hsl"){let E=Bt({r:v.r,g:v.g,b:v.b}),R=Math.round(v.a*100)/100;_=R>=1?`hsl(${Math.round(E.h)}, ${Math.round(E.s)}%, ${Math.round(E.l)}%)`:`hsla(${Math.round(E.h)}, ${Math.round(E.s)}%, ${Math.round(E.l)}%, ${R})`}else _=Et(v);_!==w.current&&(w.current=_,C.current=_,typeof y.current=="function"&&y.current(_))},[]),k=C2(g,vu),m=h2({computePosition:bu,onClose:k.flush,trapFocus:!0});Le.useEffect(()=>{let v=bl(t);if(v===C.current)return;C.current=v;let h=ft(v);f(Ll(t));let _=Lo(h,v),E=xl(v);c({type:"SET_ALL",..._}),E!==x.current.format&&c({type:"SET_FORMAT",format:E})},[t,f]);let V=Le.useCallback(v=>{k.cancel();let h=v.target.value;if((!h||!h.startsWith("#"))&&(h="#"+h.replace(/^#+/,"")),La(h)){f({type:"hex",value:h});let _=ft(h),E=Lo(_,h);c({type:"SET_ALL",...E})}else c({type:"SET_HEX",hex:h})},[k,f]),H=Le.useCallback(()=>{k.cancel();let v=x.current.hex.trim();if(La(v)){let h=ft(v),_=Lo(h,v);c({type:"SET_ALL",..._}),g(h)}else{let h=x.current;c({type:"SET_HEX",hex:xo({r:h.r,g:h.g,b:h.b,a:h.a/100})})}},[k,g]),q=Le.useMemo(()=>{switch(p.format){case"hsl":return[{key:"h",label:"H",min:0,max:360},{key:"s",label:"S",min:0,max:100},{key:"l",label:"L",min:0,max:100}];case"oklch":return[{key:"oklch_l",label:"L",min:0,max:100,step:1},{key:"oklch_c",label:"C",min:0,max:40,step:.1},{key:"oklch_h",label:"H",min:0,max:360,step:1}];case"oklab":return[{key:"oklab_l",label:"L",min:0,max:100,step:1},{key:"oklab_a",label:"A",min:-40,max:40,step:.1},{key:"oklab_b",label:"B",min:-40,max:40,step:.1}];case"lch":return[{key:"lch_l",label:"L",min:0,max:100,step:1},{key:"lch_c",label:"C",min:0,max:150,step:1},{key:"lch_h",label:"H",min:0,max:360,step:1}];case"lab":return[{key:"lab_l",label:"L",min:0,max:100,step:1},{key:"lab_a",label:"A",min:-128,max:127,step:1},{key:"lab_b",label:"B",min:-128,max:127,step:1}];default:return[{key:"r",label:"R",min:0,max:255},{key:"g",label:"G",min:0,max:255},{key:"b",label:"B",min:0,max:255}]}},[p.format]),M=Le.useCallback((v,h)=>{k.cancel();let _=String(h).trim(),E=["oklch_c","oklab_a","oklab_b"].includes(v),R=_===""?0:E?parseFloat(_):parseInt(_,10);if(Number.isNaN(R))return;let G=x.current,re=q.find(fe=>fe.key===v),N=0,J=100;re?(N=re.min,J=re.max):v==="a"?(N=0,J=100):v==="h"?(N=0,J=360):G.format==="rgb"&&(N=0,J=255);let W=Math.min(J,Math.max(N,R));c({type:"SET_CHANNEL",channel:v,value:W});let ne={...G,[v]:W},ie;if(G.format==="rgb")ie={r:ne.r,g:ne.g,b:ne.b,a:ne.a/100};else if(G.format==="hsl"){let fe=hl({h:ne.h,s:ne.s,l:ne.l});ie={r:fe.r,g:fe.g,b:fe.b,a:ne.a/100}}else{let fe=wl(G.format,ne);ie=Cl(fe)}f({type:"rgba",...ie}),g(ie)},[k,f,g,q]),A=Le.useCallback(v=>{f(v);let h=v.getRgba();c({type:"SET_RGBA",r:Math.round(h.r),g:Math.round(h.g),b:Math.round(h.b),a:Math.round(h.a*100)}),k({r:h.r,g:h.g,b:h.b,a:h.a})},[f,k]),K=Le.useCallback(v=>{let h=v.target.closest('[role="slider"]');h instanceof HTMLElement&&h.focus()},[]);Le.useLayoutEffect(()=>{if(!m.isOpen||!m.popoverRef.current)return;let v=m.popoverRef.current.offsetHeight;v<=0||m.reposition(v)},[m.isOpen,m.reposition]);let U=u?.rgba??{r:255,g:255,b:255,a:1},B=Le.useCallback(()=>{let v=p.format;if(D0.includes(v)){let h=wl(v,p);return ml(h)}else if(v==="hsl"){let h=Bt({r:U.r,g:U.g,b:U.b}),_=Math.round(U.a*100)/100;return _>=1?`hsl(${Math.round(h.h)}, ${Math.round(h.s)}%, ${Math.round(h.l)}%)`:`hsla(${Math.round(h.h)}, ${Math.round(h.s)}%, ${Math.round(h.l)}%, ${_})`}else return Et(U)},[p,U])(),Z=Iu(B,U),[S,b]=Le.useState(B),I=Le.useRef(S);I.current=S,Le.useEffect(()=>{b(B)},[B]);let L=Le.useCallback(v=>{let h=v.target.value;b(h)},[]),O=Le.useCallback(()=>{k.cancel();let v=I.current.trim();if(!v||!T0(v)){b(B);return}let h=ft(v),_=Et(h),E=Et(U);if(_!==E){f(Ll(v));let R=Lo(h,v),G=xl(v);c({type:"SET_ALL",...R}),G!==x.current.format&&c({type:"SET_FORMAT",format:G}),v!==w.current&&(w.current=v,C.current=v,typeof y.current=="function"&&y.current(v))}else b(B)},[k,B,U,f]),T=Le.useCallback(v=>{v.key==="Enter"&&v.currentTarget.blur()},[]),F=Le.useCallback(()=>{let v=vl.indexOf(p.format),h=vl[(v+1)%vl.length]??p.format;c({type:"SET_FORMAT",format:h})},[p.format]),$=Le.useMemo(()=>{let v=m.triggerRef.current;if(!v)return document.body;let h=v.getRootNode();return h instanceof ShadowRoot?h:document.body},[m.isOpen,m.triggerRef]);return Te(t1,{label:e,id:a,className:"colorEditor-fieldset",children:y1("div",{className:"colorEditor-wrapper",children:[Te("button",{ref:m.triggerRef,id:n,type:"button",className:"colorEditor-swatch-only",onClick:m.toggle,"aria-expanded":m.isOpen,"aria-haspopup":"dialog","aria-controls":i,"aria-label":Se(l.ariaOpenPicker,[e,B]),children:Te("span",{style:Z,"aria-hidden":"true",className:"colorEditor-swatch"})}),Te("input",{type:"text",className:"colorEditor-value-input",value:S,onChange:L,onBlur:O,onKeyDown:T,"aria-label":Se(l.ariaValue,[e]),placeholder:l.placeholder,spellCheck:"false",autoComplete:"off"}),m.isOpen&&hu(y1("div",{ref:m.popoverRef,id:i,role:"dialog","aria-modal":"true","aria-label":Se(l.ariaPicker,[e]),style:{top:m.position.top,left:m.position.left},onDragStart:Mu,onMouseUp:K,className:"colorEditor-popover",children:[y1(yt,{color:d,onChange:A,className:"colorEditor-picker",children:[Te(yt.Saturation,{className:"colorEditor-picker-saturation","aria-label":l.ariaSaturation}),y1("div",{className:"colorEditor-picker-toolbar",children:[Te(yt.EyeDropper,{"aria-label":l.ariaEyedropper,children:Te(oo,{size:18,"aria-hidden":"true"})}),y1("div",{className:"colorEditor-picker-sliders",children:[Te(yt.Hue,{className:"h-4 colorEditor-picker-hue","aria-label":l.ariaHue}),Te(yt.Alpha,{className:"h-4 colorEditor-picker-alpha","aria-label":l.ariaAlphaSlider})]})]})]}),y1("div",{className:"colorEditor-input-wrapper",children:[y1("div",{className:"colorEditor-input-group",children:[Te("input",{type:"text",value:p.hex,onChange:V,onBlur:H,onKeyDown:Su,"aria-label":l.ariaHex,className:"colorEditor-input-hex",spellCheck:"false",autoComplete:"off"}),Te("label",{className:"colorEditor-input-label","aria-hidden":"true",children:"HEX"})]}),y1("div",{className:"colorEditor-channels-wrapper",children:[y1("div",{className:"colorEditor-input-container",children:[q.map(v=>Te("div",{className:"colorEditor-input-group-no-label",children:Te("input",{type:"number",min:v.min,max:v.max,step:v.step||1,value:p[v.key],onChange:h=>M(v.key,h.target.value),onBlur:h=>M(v.key,h.target.value),"aria-label":Se(l.ariaChannel,[v.label,p.format.toUpperCase(),v.min,v.max]),"aria-valuemin":v.min,"aria-valuemax":v.max,"aria-valuenow":p[v.key],className:"colorEditor-input-rgba"})},v.key)),Te("div",{className:"colorEditor-input-group-no-label",children:Te("input",{type:"number",min:0,max:100,value:p.a,onChange:v=>M("a",v.target.value),onBlur:v=>M("a",v.target.value),"aria-label":l.ariaAlphaInput,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":p.a,className:"colorEditor-input-rgba"})})]}),Te("div",{className:"colorEditor-format-selector",children:y1("button",{type:"button",className:"colorEditor-format-picker",onClick:F,"aria-label":Se(l.ariaFormatCycle,[p.format.toUpperCase()]),"aria-live":"polite",title:l.titleFormatCycle,children:[q.map(v=>Te("span",{className:"colorEditor-format-letter","aria-hidden":"true",children:v.label},v.key)),Te("span",{className:"colorEditor-format-letter","aria-hidden":"true",children:"A"})]})})]})]})]}),$)]})})}import je from"react";import{jsx as Zt,jsxs as Pu}from"react/jsx-runtime";var ku={ariaValue:"{0} value",ariaUnit:"{0} unit"};function M1({label:e,value:t,onChange:o,units:a=Do,constraints:r=p1,defaultUnit:l="px",placeholder:n=0,id:i="dimension",icon:s,aria:d}){let u=f1(ku,d),f=je.useMemo(()=>new Set(a.map(B=>B.value)),[a]),p=je.useMemo(()=>Jt(a),[a]),c=je.useMemo(()=>{if(n==null||n==="")return"";if(typeof n=="number")return String(n);let B=Ne(String(n),l,p);return B.numericValue!==""?String(B.numericValue):String(n)},[n,l,p]),[x,w]=je.useState(()=>{let B=Ne(t,l,p);return B.numericValue!==""?String(B.numericValue):""}),[C,y]=je.useState(()=>Ne(t,l,p).unit),g=je.useRef(o);g.current=o;let k=je.useRef(t);je.useEffect(()=>{if(t===k.current)return;k.current=t;let B=Ne(t,l,p);w(B.numericValue!==""?String(B.numericValue):""),y(B.unit)},[t,l,p]);let m=je.useCallback((B,Z)=>{let S=parseFloat(B);if(B===""||isNaN(S)){if(k.current==="")return;k.current="",typeof g.current=="function"&&g.current("");return}let b=C1(S,Z,r),I=m1(b,Z,r),L=Oo(I,Z);L!==k.current&&(k.current=L,typeof g.current=="function"&&g.current(L))},[r]),V=je.useCallback(B=>{let Z=B.target.value;w(Z);let S=Ne(Z,l,p);S.numericValue!==""&&S.unit&&f.has(S.unit)&&S.unit!==C&&y(S.unit)},[l,p,C,f]),H=je.useCallback(B=>{let Z=B.clipboardData.getData("text"),S=Ne(Z,l,p);if(S.numericValue!==""&&S.unit&&f.has(S.unit)){B.preventDefault(),w(String(S.numericValue)),y(S.unit);let b=C1(S.numericValue,S.unit,r),I=m1(b,S.unit,r),L=Oo(I,S.unit);k.current=L,typeof g.current=="function"&&g.current(L)}},[l,p,f,r]),q=je.useCallback(()=>{if(x===""){m("",C);return}let B=parseFloat(x);if(isNaN(B)){let b=Ne(t,l,p);w(b.numericValue!==""?String(b.numericValue):"");return}let Z=C1(B,C,r),S=m1(Z,C,r);w(String(S)),m(String(S),C)},[x,C,t,l,p,r,m]),M=je.useCallback(B=>{if(B.key==="Enter"){B.currentTarget.blur();return}if(B.key==="ArrowUp"||B.key==="ArrowDown"){B.preventDefault();let Z=Eo(x,B.key,B.shiftKey,C,r);if(Z===null)return;w(Z),m(Z,C)}},[x,C,r,m]),A=je.useCallback(B=>{let Z=B.target.value;if(!f.has(Z))return;if(y(Z),x===""){m("",Z);return}let S=parseFloat(x);if(isNaN(S))return;let b=C1(S,Z,r),I=m1(b,Z,r);w(String(I));let L=Oo(I,Z);k.current=L,typeof g.current=="function"&&g.current(L)},[x,f,r,m]),K=`${i}-input`,U=`${i}-unit`,ae=a.some(B=>B.value!=="");return Zt(t1,{label:e,id:i,className:"dimensionEditor-fieldset",children:Pu("div",{className:"dimensionEditor-row",children:[s&&Zt("span",{className:"dimensionEditor-icon","aria-hidden":"true",children:Zt(s,{size:14,width:14,height:14})}),Zt("input",{id:K,type:"text",className:s?"dimensionEditor-input dimensionEditor-input--with-icon":"dimensionEditor-input",value:x,placeholder:c,onChange:V,onPaste:H,onBlur:q,onKeyDown:M,"aria-label":Se(u.ariaValue,[e]),autoComplete:"off",spellCheck:"false"}),ae&&Zt("select",{id:U,className:"dimensionEditor-unit",value:C,onChange:A,"aria-label":Se(u.ariaUnit,[e]),children:a.map(B=>Zt("option",{value:B.value,children:B.label},B.value))})]})})}function Ke(e,t){if(e==null)return{};var o={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.indexOf(a)!==-1)continue;o[a]=e[a]}return o}function te(){return te=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var a in o)({}).hasOwnProperty.call(o,a)&&(e[a]=o[a])}return e},te.apply(null,arguments)}var X=kn(N0(),1),Eu=kn(j0(),1);import*as ce from"react";import{cloneElement as Ww,Component as Xw,useRef as i1,useCallback as ue,useEffect as S1,useMemo as Ft}from"react";var K0=e=>typeof e=="object"&&e!=null&&e.nodeType===1,G0=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",Va=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let o=getComputedStyle(e,null);return G0(o.overflowY,t)||G0(o.overflowX,t)||(a=>{let r=(l=>{if(!l.ownerDocument||!l.ownerDocument.defaultView)return null;try{return l.ownerDocument.defaultView.frameElement}catch{return null}})(a);return!!r&&(r.clientHeight<a.scrollHeight||r.clientWidth<a.scrollWidth)})(e)}return!1},_a=(e,t,o,a,r,l,n,i)=>l<e&&n>t||l>e&&n<t?0:l<=e&&i<=o||n>=t&&i>=o?l-e-a:n>t&&i<o||l<e&&i>o?n-t+r:0,Ou=e=>{let t=e.parentElement;return t??(e.getRootNode().host||null)},W0=(e,t)=>{var o,a,r,l;if(typeof document>"u")return[];let{scrollMode:n,block:i,inline:s,boundary:d,skipOverflowHiddenElements:u}=t,f=typeof d=="function"?d:b=>b!==d;if(!K0(e))throw new TypeError("Invalid target");let p=document.scrollingElement||document.documentElement,c=[],x=e;for(;K0(x)&&f(x);){if(x=Ou(x),x===p){c.push(x);break}x!=null&&x===document.body&&Va(x)&&!Va(document.documentElement)||x!=null&&Va(x,u)&&c.push(x)}let w=(a=(o=window.visualViewport)==null?void 0:o.width)!=null?a:innerWidth,C=(l=(r=window.visualViewport)==null?void 0:r.height)!=null?l:innerHeight,{scrollX:y,scrollY:g}=window,{height:k,width:m,top:V,right:H,bottom:q,left:M}=e.getBoundingClientRect(),{top:A,right:K,bottom:U,left:ae}=(b=>{let I=window.getComputedStyle(b);return{top:parseFloat(I.scrollMarginTop)||0,right:parseFloat(I.scrollMarginRight)||0,bottom:parseFloat(I.scrollMarginBottom)||0,left:parseFloat(I.scrollMarginLeft)||0}})(e),B=i==="start"||i==="nearest"?V-A:i==="end"?q+U:V+k/2-A+U,Z=s==="center"?M+m/2-ae+K:s==="end"?H+K:M-ae,S=[];for(let b=0;b<c.length;b++){let I=c[b],{height:L,width:O,top:T,right:F,bottom:$,left:v}=I.getBoundingClientRect();if(n==="if-needed"&&V>=0&&M>=0&&q<=C&&H<=w&&(I===p&&!Va(I)||V>=T&&q<=$&&M>=v&&H<=F))return S;let h=getComputedStyle(I),_=parseInt(h.borderLeftWidth,10),E=parseInt(h.borderTopWidth,10),R=parseInt(h.borderRightWidth,10),G=parseInt(h.borderBottomWidth,10),re=0,N=0,J="offsetWidth"in I?I.offsetWidth-I.clientWidth-_-R:0,W="offsetHeight"in I?I.offsetHeight-I.clientHeight-E-G:0,ne="offsetWidth"in I?I.offsetWidth===0?0:O/I.offsetWidth:0,ie="offsetHeight"in I?I.offsetHeight===0?0:L/I.offsetHeight:0;if(p===I)re=i==="start"?B:i==="end"?B-C:i==="nearest"?_a(g,g+C,C,E,G,g+B,g+B+k,k):B-C/2,N=s==="start"?Z:s==="center"?Z-w/2:s==="end"?Z-w:_a(y,y+w,w,_,R,y+Z,y+Z+m,m),re=Math.max(0,re+g),N=Math.max(0,N+y);else{re=i==="start"?B-T-E:i==="end"?B-$+G+W:i==="nearest"?_a(T,$,L,E,G+W,B,B+k,k):B-(T+L/2)+W/2,N=s==="start"?Z-v-_:s==="center"?Z-(v+O/2)+J/2:s==="end"?Z-F+R+J:_a(v,F,O,_,R+J,Z,Z+m,m);let{scrollLeft:fe,scrollTop:Ie}=I;re=ie===0?0:Math.max(0,Math.min(Ie+re/ie,I.scrollHeight-L/ie+W)),N=ne===0?0:Math.max(0,Math.min(fe+N/ne,I.scrollWidth-O/ne+J)),B+=Ie-re,Z+=fe-N}S.push({el:I,top:re,left:N})}return S};var Bu=0;function o5(){return String(Bu++)}function Io(e){var t=ce.useRef(e);return t.current=e,t}function Au(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(a){t.forEach(function(r){typeof r=="function"?r(a):r&&(r.current=a)})}}function Ml(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(a){for(var r=arguments.length,l=new Array(r>1?r-1:0),n=1;n<r;n++)l[n-1]=arguments[n];return t.some(function(i){return i&&i.apply(void 0,[a].concat(l)),a.preventDownshiftDefault||a.hasOwnProperty("nativeEvent")&&a.nativeEvent.preventDownshiftDefault})}}function a5(e,t){var o;function a(){o&&clearTimeout(o)}function r(){for(var l=arguments.length,n=new Array(l),i=0;i<l;i++)n[i]=arguments[i];a(),o=setTimeout(function(){o=null,e.apply(void 0,n)},t)}return r.cancel=a,r}var Zu=a5(function(e){r5(e).textContent=""},500);function r5(e){var t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}function Fu(e,t){if(!(!e||!t)){var o=r5(t);o.textContent=e,Zu(t)}}function $u(e){var t=e?.getElementById("a11y-status-message");t&&t.remove()}function yo(){}var Rl=yo;function Oa(e,t){if(!t)return e;var o=Object.keys(e);return o.reduce(function(a,r){return t[r]!==void 0&&(a[r]=t[r]),a},te({},e))}function Nu(e,t){if(e){var o=W0(e,{boundary:t,block:"nearest",scrollMode:"if-needed"});o.forEach(function(a){var r=a.el,l=a.top,n=a.left;r.scrollTop=l,r.scrollLeft=n})}}function X0(e,t,o){var a=e===t||t instanceof o.Node&&e.contains&&e.contains(t);return a}function Uu(e,t){var o;function a(){o&&clearTimeout(o)}function r(){for(var l=arguments.length,n=new Array(l),i=0;i<l;i++)n[i]=arguments[i];a(),o=setTimeout(function(){o=null,e.apply(void 0,n)},t)}return r.cancel=a,r}function be(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(a){for(var r=arguments.length,l=new Array(r>1?r-1:0),n=1;n<r;n++)l[n-1]=arguments[n];return t.some(function(i){return i&&i.apply(void 0,[a].concat(l)),a.preventDownshiftDefault||a.hasOwnProperty("nativeEvent")&&a.nativeEvent.preventDownshiftDefault})}}function _1(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(a){t.forEach(function(r){typeof r=="function"?r(a):r&&(r.current=a)})}}function qu(e,t){return e[t]!==void 0}function Ea(e){var t=e.key,o=e.keyCode;return o>=37&&o<=40&&t.indexOf("Arrow")!==0?"Arrow"+t:t}function Q1(e,t,o,a,r){r===void 0&&(r=!1);var l=o.length;if(l===0)return-1;var n=l-1;(typeof e!="number"||e<0||e>n)&&(e=t>0?-1:n+1);var i=e+t;i<0?i=r?n:0:i>n&&(i=r?0:n);var s=$t(i,t<0,o,a,r);return s===-1?e>=l?-1:e:s}function $t(e,t,o,a,r){r===void 0&&(r=!1);var l=o.length;if(t){for(var n=e;n>=0;n--)if(!a(o[n],n))return n}else for(var i=e;i<l;i++)if(!a(o[i],i))return i;return r?$t(t?l-1:0,t,o,a):-1}function Q0(e,t,o,a){return a===void 0&&(a=!0),o&&t.some(function(r){return r&&(X0(r,e,o)||a&&X0(r,o.document.activeElement,o))})}function Hl(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function zu(e,t,o,a){for(var r=e.type,l={},n=Object.keys(o),i=0,s=n;i<s.length;i++){var d=s[i];ju(d,e,t,o,a),a[d]!==o[d]&&(l[d]=a[d])}t.onStateChange&&Object.keys(l).length&&t.onStateChange(te({type:r},l))}function ju(e,t,o,a,r){if(r[e]!==a[e]){var l="on"+Hl(e)+"Change",n=o[l];if(typeof n=="function"){var i=t.type;n(te({type:i},r))}}}function l5(e,t,o,a){var r=ce.useRef(null),l=ce.useRef(void 0),n=Io(t),i=ce.useCallback(function(p,c){l.current=c,p=Oa(p,n.current);var x=e(p,n.current,c),w=n.current.stateReducer(p,te({},c,{changes:x}));return te({},p,w)},[n,e]),s=ce.useReducer(i,t,o),d=s[0],u=s[1],f=l.current;return ce.useEffect(function(){var p,c=Oa((p=r.current)!=null?p:{},n.current),x=f&&r.current&&!a(c,d);x&&zu(f,n.current,c,d),r.current=d},[d,f,a,n]),[d,u]}function kl(e,t,o,a){var r=l5(e,t,o,a),l=r[0],n=r[1];return[Oa(l,t),n]}function Pl(e,t,o,a){if(e!==void 0&&t!==void 0)return[e,t];if(e!==void 0){var r=o.indexOf(e);if(r<0)throw new Error(a);return[e,o.indexOf(e)]}if(t!==void 0){var l=o[t];if(l===void 0)throw new Error(a);return[l,t]}throw new Error(a)}function Na(){var e=ce.useRef(!0);return ce.useEffect(function(){return e.current=!1,function(){e.current=!0}},[]),e.current}function Ku(e,t){return t.changes}var Gu={environment:X.default.shape({addEventListener:X.default.func.isRequired,removeEventListener:X.default.func.isRequired,document:X.default.shape({createElement:X.default.func.isRequired,getElementById:X.default.func.isRequired,activeElement:X.default.any.isRequired,body:X.default.any.isRequired}).isRequired,Node:X.default.func.isRequired}),itemToKey:X.default.func,stateReducer:X.default.func};function R1(e,t,o){var a=e["default"+Hl(t)];return a!==void 0?a:o[t]}function pt(e,t,o){var a=e[t];if(a!==void 0)return a;var r=e["initial"+Hl(t)];return r!==void 0?r:R1(e,t,o)}var J0=a5(function(e,t){Fu(e,t)},200);function Tl(e,t,o,a){var r=a?.document,l=Na();ce.useEffect(function(){if(!(!e||l||!r)){var n=e(t);J0(n,r)}},o),ce.useEffect(function(){return function(){J0.cancel(),$u(r)}},[r])}var wo=te({},Gu,{getA11yStatusMessage:X.default.func,highlightedIndex:X.default.number,defaultHighlightedIndex:X.default.number,initialHighlightedIndex:X.default.number,isOpen:X.default.bool,defaultIsOpen:X.default.bool,initialIsOpen:X.default.bool,selectedItem:X.default.any,initialSelectedItem:X.default.any,defaultSelectedItem:X.default.any,id:X.default.string,labelId:X.default.string,menuId:X.default.string,getItemId:X.default.func,toggleButtonId:X.default.string,onSelectedItemChange:X.default.func,onHighlightedIndexChange:X.default.func,onStateChange:X.default.func,onIsOpenChange:X.default.func,scrollIntoView:X.default.func}),bo={itemToString:function(t){return t?String(t):""},itemToKey:function(t){return t},stateReducer:Ku,scrollIntoView:Nu,environment:typeof window>"u"?void 0:window},Ge={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""},Wu=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?ce.useLayoutEffect:ce.useEffect;function Xu(e){return/^\S{1}$/.test(e)}function n5(e){var t=pt(e,"selectedItem",Ge),o=pt(e,"isOpen",Ge),a=Qu(e),r=pt(e,"inputValue",Ge);return{highlightedIndex:a<0&&t&&o?e.items.findIndex(function(l){return e.itemToKey(l)===e.itemToKey(t)}):a,isOpen:o,selectedItem:t,inputValue:r}}function Ct(e,t,o){var a=e.items,r=e.initialHighlightedIndex,l=e.defaultHighlightedIndex,n=e.isItemDisabled,i=e.itemToKey,s=t.selectedItem,d=t.highlightedIndex;return a.length===0?-1:r!==void 0&&d===r&&!n(a[r],r)?r:l!==void 0&&!n(a[l],l)?l:s?a.findIndex(function(u){return i(s)===i(u)}):o<0&&!n(a[a.length-1],a.length-1)?a.length-1:o>0&&!n(a[0],0)?0:-1}function i5(e,t,o){var a=ce.useRef({isMouseDown:!1,isTouchMove:!1,isTouchEnd:!1}),r=ce.useCallback(function(){return o.map(function(l){return l.current})},[o]);return ce.useEffect(function(){if(!e)return yo;function l(){a.current.isTouchEnd=!1,a.current.isMouseDown=!0}function n(u){a.current.isMouseDown=!1,Q0(u.target,r(),e)||t()}function i(){a.current.isTouchEnd=!1,a.current.isTouchMove=!1}function s(){a.current.isTouchMove=!0}function d(u){a.current.isTouchEnd=!0,!a.current.isTouchMove&&!Q0(u.target,r(),e,!1)&&t()}return e.addEventListener("mousedown",l),e.addEventListener("mouseup",n),e.addEventListener("touchstart",i),e.addEventListener("touchmove",s),e.addEventListener("touchend",d),function(){e.removeEventListener("mousedown",l),e.removeEventListener("mouseup",n),e.removeEventListener("touchstart",i),e.removeEventListener("touchmove",s),e.removeEventListener("touchend",d)}},[e,r,t]),a.current}var Vl=function(){return yo};function s5(e){var t=e.highlightedIndex,o=e.isOpen,a=e.itemRefs,r=e.getItemNodeFromIndex,l=e.menuElement,n=e.scrollIntoView,i=ce.useRef(!0);return Wu(function(){t<0||!o||!Object.keys(a.current).length||(i.current===!1?i.current=!0:n(r(t),l))},[t]),i}var _l=yo;function Ba(e,t,o){var a;o===void 0&&(o=!0);var r=((a=e.items)==null?void 0:a.length)&&t>=0;return te({isOpen:!1,highlightedIndex:-1},r&&te({selectedItem:e.items[t],isOpen:R1(e,"isOpen",Ge),highlightedIndex:R1(e,"highlightedIndex",Ge)},o&&{inputValue:e.itemToString(e.items[t])}))}function d5(e,t){return e.isOpen===t.isOpen&&e.inputValue===t.inputValue&&e.highlightedIndex===t.highlightedIndex&&e.selectedItem===t.selectedItem}function Aa(e){var t=R1(e,"highlightedIndex",Ge);return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}function Qu(e){var t=pt(e,"highlightedIndex",Ge);return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}function u5(e,t,o,a){var r=o.type,l;switch(r){case a.ItemMouseMove:l={highlightedIndex:o.disabled?-1:o.index};break;case a.MenuMouseLeave:l={highlightedIndex:-1};break;case a.ToggleButtonClick:case a.FunctionToggleMenu:l={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:Ct(t,e,0)};break;case a.FunctionOpenMenu:l={isOpen:!0,highlightedIndex:Ct(t,e,0)};break;case a.FunctionCloseMenu:l={isOpen:!1};break;case a.FunctionSetHighlightedIndex:l={highlightedIndex:t.isItemDisabled(t.items[o.highlightedIndex],o.highlightedIndex)?-1:o.highlightedIndex};break;case a.FunctionSetInputValue:l={inputValue:o.inputValue};break;case a.FunctionReset:l={highlightedIndex:Aa(t),isOpen:R1(t,"isOpen",Ge),selectedItem:R1(t,"selectedItem",Ge),inputValue:R1(t,"inputValue",Ge)};break;default:throw new Error("Reducer called without proper action type.")}return te({},e,l)}var Ju=te({},wo,{items:X.default.array.isRequired,isItemDisabled:X.default.func}),Yu=te({},bo,{isItemDisabled:function(){return!1}});function e4(e){for(var t=e.keysSoFar,o=e.highlightedIndex,a=e.items,r=e.itemToString,l=e.isItemDisabled,n=t.toLowerCase(),i=0;i<a.length;i++){var s=(i+o+(t.length<2?1:0))%a.length,d=a[s];if(d!==void 0&&r(d).toLowerCase().startsWith(n)&&!l(d,s))return s}return o}var Da=0,Dl=1,Ol=2,Za=3,El=4,Bl=5,Al=6,Zl=7,Fl=8,$l=9,Nl=10,Fa=11,c5=12,f5=13,Ul=14,p5=15,C5=16,m5=17,h5=18,ql=19,Sl=20,g5=21,v5=Object.freeze({__proto__:null,FunctionCloseMenu:m5,FunctionOpenMenu:C5,FunctionReset:g5,FunctionSelectItem:ql,FunctionSetHighlightedIndex:h5,FunctionSetInputValue:Sl,FunctionToggleMenu:p5,ItemClick:Ul,ItemMouseMove:f5,MenuMouseLeave:c5,ToggleButtonBlur:Fa,ToggleButtonClick:Da,ToggleButtonKeyDownArrowDown:Dl,ToggleButtonKeyDownArrowUp:Ol,ToggleButtonKeyDownCharacter:Za,ToggleButtonKeyDownEnd:Al,ToggleButtonKeyDownEnter:Zl,ToggleButtonKeyDownEscape:El,ToggleButtonKeyDownHome:Bl,ToggleButtonKeyDownPageDown:Nl,ToggleButtonKeyDownPageUp:$l,ToggleButtonKeyDownSpaceButton:Fl});function t4(e,t,o){var a,r=o.type,l=o.altKey,n;switch(r){case Ul:n={isOpen:R1(t,"isOpen",Ge),highlightedIndex:Aa(t),selectedItem:t.items[o.index]};break;case Za:{var i=o.key,s=""+e.inputValue+i,d=!e.isOpen&&e.selectedItem?t.items.findIndex(function(c){return t.itemToKey(c)===t.itemToKey(e.selectedItem)}):e.highlightedIndex,u=e4({keysSoFar:s,highlightedIndex:d,items:t.items,itemToString:t.itemToString,isItemDisabled:t.isItemDisabled});n={inputValue:s,highlightedIndex:u,isOpen:!0}}break;case Dl:{var f=e.isOpen?Q1(e.highlightedIndex,1,t.items,t.isItemDisabled):l&&e.selectedItem==null?-1:Ct(t,e,1);n={highlightedIndex:f,isOpen:!0}}break;case Ol:if(e.isOpen&&l)n=Ba(t,e.highlightedIndex,!1);else{var p=e.isOpen?Q1(e.highlightedIndex,-1,t.items,t.isItemDisabled):Ct(t,e,-1);n={highlightedIndex:p,isOpen:!0}}break;case Zl:case Fl:n=Ba(t,e.highlightedIndex,!1);break;case Bl:n={highlightedIndex:$t(0,!1,t.items,t.isItemDisabled),isOpen:!0};break;case Al:n={highlightedIndex:$t(t.items.length-1,!0,t.items,t.isItemDisabled),isOpen:!0};break;case $l:n={highlightedIndex:Q1(e.highlightedIndex,-10,t.items,t.isItemDisabled)};break;case Nl:n={highlightedIndex:Q1(e.highlightedIndex,10,t.items,t.isItemDisabled)};break;case El:n={isOpen:!1,highlightedIndex:-1};break;case Fa:n=te({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((a=t.items)==null?void 0:a.length)&&{selectedItem:t.items[e.highlightedIndex]});break;case ql:n={selectedItem:o.selectedItem};break;default:return u5(e,t,o,v5)}return te({},e,n)}var o4=te({},ce),x5=o4.useId,L5=typeof x5=="function"?a4:r4;function a4(e){var t=e.id,o=e.labelId,a=e.menuId,r=e.getItemId,l=e.toggleButtonId,n=e.inputId,i="downshift-"+x5();t||(t=i);var s=ce.useMemo(function(){return{labelId:o??t+"-label",menuId:a??t+"-menu",getItemId:r??function(d){return t+"-item-"+d},toggleButtonId:l??t+"-toggle-button",inputId:n??t+"-input"}},[r,t,n,o,a,l]);return s}function r4(e){var t=e.id,o=e.labelId,a=e.menuId,r=e.getItemId,l=e.toggleButtonId,n=e.inputId,i=ce.useRef(t??"downshift-"+o5()),s=i.current,d=ce.useMemo(function(){return{labelId:o??s+"-label",menuId:a??s+"-menu",getItemId:r??function(u){return s+"-item-"+u},toggleButtonId:l??s+"-toggle-button",inputId:n??s+"-input"}},[r,n,o,a,l,s]);return d}var l4=["onClick"],n4=["onMouseLeave","refKey","ref"],i4=["onBlur","onClick","onPress","onKeyDown","refKey","ref"],s4=["item","index","onMouseMove","onClick","onMouseDown","onPress","refKey","disabled","ref"];Ua.stateChangeTypes=v5;function Ua(e){e===void 0&&(e={}),Rl(e,Ua,Ju);var t=te({},Yu,e),o=t.scrollIntoView,a=t.environment,r=t.getA11yStatusMessage,l=kl(t4,t,n5,d5),n=l[0],i=l[1],s=n.isOpen,d=n.highlightedIndex,u=n.selectedItem,f=n.inputValue,p=i1(null),c=i1(null),x=i1({}),w=i1(null),C=L5(t),y=Io({state:n,props:t}),g=ue(function(T){return x.current[C.getItemId(T)]},[C]);Tl(r,n,[s,d,u,f],a);var k=s5({menuElement:c.current,highlightedIndex:d,isOpen:s,itemRefs:x,scrollIntoView:o,getItemNodeFromIndex:g});S1(function(){return w.current=Uu(function(T){T({type:Sl,inputValue:""})},500),function(){w.current.cancel()}},[]),S1(function(){f&&w.current(i)},[i,f]),_l({props:t,state:n}),S1(function(){var T=pt(t,"isOpen",Ge);T&&p.current&&p.current.focus()},[]);var m=ue(function(){y.current.state.isOpen&&i({type:Fa})},[i,y]),V=Ft(function(){return[c,p]},[]),H=i5(a,m,V),q=Vl("getMenuProps","getToggleButtonProps");S1(function(){s||(x.current={})},[s]);var M=Ft(function(){return{ArrowDown:function(F){F.preventDefault(),i({type:Dl,altKey:F.altKey})},ArrowUp:function(F){F.preventDefault(),i({type:Ol,altKey:F.altKey})},Home:function(F){F.preventDefault(),i({type:Bl})},End:function(F){F.preventDefault(),i({type:Al})},Escape:function(){y.current.state.isOpen&&i({type:El})},Enter:function(F){F.preventDefault(),i({type:y.current.state.isOpen?Zl:Da})},PageUp:function(F){y.current.state.isOpen&&(F.preventDefault(),i({type:$l}))},PageDown:function(F){y.current.state.isOpen&&(F.preventDefault(),i({type:Nl}))}," ":function(F){F.preventDefault();var $=y.current.state;if(!$.isOpen){i({type:Da});return}$.inputValue?i({type:Za,key:" "}):i({type:Fl})}}},[i,y]),A=ue(function(){i({type:p5})},[i]),K=ue(function(){i({type:m5})},[i]),U=ue(function(){i({type:C5})},[i]),ae=ue(function(T){i({type:h5,highlightedIndex:T})},[i]),B=ue(function(T){i({type:ql,selectedItem:T})},[i]),Z=ue(function(){i({type:g5})},[i]),S=ue(function(T){i({type:Sl,inputValue:T})},[i]),b=ue(function(T){var F=T===void 0?{}:T,$=F.onClick,v=Ke(F,l4),h=function(){var E;(E=p.current)==null||E.focus()};return te({id:C.labelId,htmlFor:C.toggleButtonId,onClick:be($,h)},v)},[C]),I=ue(function(T,F){var $,v=T===void 0?{}:T,h=v.onMouseLeave,_=v.refKey,E=_===void 0?"ref":_,R=v.ref,G=Ke(v,n4),re=F===void 0?{}:F,N=re.suppressRefError,J=N===void 0?!1:N,W=function(){i({type:c5})};return q("getMenuProps",J,E,c),te(($={},$[E]=_1(R,function(ne){c.current=ne}),$.id=C.menuId,$.role="listbox",$["aria-labelledby"]=G&&G["aria-label"]?void 0:""+C.labelId,$.onMouseLeave=be(h,W),$),G)},[i,q,C]),L=ue(function(T,F){var $,v=T===void 0?{}:T,h=v.onBlur,_=v.onClick;v.onPress;var E=v.onKeyDown,R=v.refKey,G=R===void 0?"ref":R,re=v.ref,N=Ke(v,i4),J=F===void 0?{}:F,W=J.suppressRefError,ne=W===void 0?!1:W,ie=y.current.state,fe=function(){i({type:Da})},Ie=function(){ie.isOpen&&!H.isMouseDown&&i({type:Fa})},s1=function(Ze){var Ye=Ea(Ze);Ye&&M[Ye]?M[Ye](Ze):Xu(Ye)&&i({type:Za,key:Ye})},De=te(($={},$[G]=_1(re,function(We){p.current=We}),$["aria-activedescendant"]=ie.isOpen&&ie.highlightedIndex>-1?C.getItemId(ie.highlightedIndex):"",$["aria-controls"]=C.menuId,$["aria-expanded"]=y.current.state.isOpen,$["aria-haspopup"]="listbox",$["aria-labelledby"]=N&&N["aria-label"]?void 0:""+C.labelId,$.id=C.toggleButtonId,$.role="combobox",$.tabIndex=0,$.onBlur=be(h,Ie),$),N);return N.disabled||(De.onClick=be(_,fe),De.onKeyDown=be(E,s1)),q("getToggleButtonProps",ne,G,p),De},[i,C,y,H,q,M]),O=ue(function(T){var F,$=T===void 0?{}:T,v=$.item,h=$.index,_=$.onMouseMove,E=$.onClick,R=$.onMouseDown;$.onPress;var G=$.refKey,re=G===void 0?"ref":G,N=$.disabled,J=$.ref,W=Ke($,s4);N!==void 0&&console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useSelect.');var ne=y.current,ie=ne.state,fe=ne.props,Ie=Pl(v,h,fe.items,"Pass either item or index to getItemProps!"),s1=Ie[0],De=Ie[1],We=fe.isItemDisabled(s1,De),Ze=function(){H.isTouchEnd||De===ie.highlightedIndex||(k.current=!1,i({type:f5,index:De,disabled:We}))},Ye=function(){i({type:Ul,index:De})},zt=function(jt){return jt.preventDefault()},Fe=te((F={},F[re]=_1(J,function(d1){d1&&(x.current[C.getItemId(De)]=d1)}),F["aria-disabled"]=We,F["aria-selected"]=s1===ie.selectedItem,F.id=C.getItemId(De),F.role="option",F),W);return We||(Fe.onClick=be(E,Ye)),Fe.onMouseMove=be(_,Ze),Fe.onMouseDown=be(R,zt),Fe},[y,C,H,k,i]);return{getToggleButtonProps:L,getLabelProps:b,getMenuProps:I,getItemProps:O,toggleMenu:A,openMenu:U,closeMenu:K,setHighlightedIndex:ae,selectItem:B,reset:Z,setInputValue:S,highlightedIndex:d,isOpen:s,selectedItem:u,inputValue:f}}var zl=0,jl=1,Kl=2,Gl=3,Wl=4,Xl=5,Ql=6,Jl=7,Yl=8,$a=9,en=10,w5=11,b5=12,tn=13,I5=14,y5=15,M5=16,S5=17,R5=18,on=19,H5=20,k5=21,an=22,P5=Object.freeze({__proto__:null,ControlledPropUpdatedSelectedItem:an,FunctionCloseMenu:S5,FunctionOpenMenu:M5,FunctionReset:k5,FunctionSelectItem:on,FunctionSetHighlightedIndex:R5,FunctionSetInputValue:H5,FunctionToggleMenu:y5,InputBlur:$a,InputChange:Yl,InputClick:en,InputKeyDownArrowDown:zl,InputKeyDownArrowUp:jl,InputKeyDownEnd:Wl,InputKeyDownEnter:Jl,InputKeyDownEscape:Kl,InputKeyDownHome:Gl,InputKeyDownPageDown:Ql,InputKeyDownPageUp:Xl,ItemClick:tn,ItemMouseMove:b5,MenuMouseLeave:w5,ToggleButtonClick:I5});function d4(e){var t=n5(e),o=t.selectedItem,a=t.inputValue;return a===""&&o&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(a=e.itemToString(o)),te({},t,{inputValue:a})}var u4=te({},wo,{items:X.default.array.isRequired,isItemDisabled:X.default.func,inputValue:X.default.string,defaultInputValue:X.default.string,initialInputValue:X.default.string,inputId:X.default.string,onInputValueChange:X.default.func});function c4(e,t,o,a){var r=i1(),l=l5(e,t,o,a),n=l[0],i=l[1],s=Na();return S1(function(){if(qu(t,"selectedItem")){if(!s){var d=t.itemToKey(t.selectedItem)!==t.itemToKey(r.current);d&&i({type:an,inputValue:t.itemToString(t.selectedItem)})}r.current=n.selectedItem===r.current?t.selectedItem:n.selectedItem}},[n.selectedItem,t.selectedItem]),[Oa(n,t),i]}var f4=te({},bo,{isItemDisabled:function(){return!1}});function p4(e,t,o){var a,r=o.type,l=o.altKey,n;switch(r){case tn:n={isOpen:R1(t,"isOpen",Ge),highlightedIndex:Aa(t),selectedItem:t.items[o.index],inputValue:t.itemToString(t.items[o.index])};break;case zl:e.isOpen?n={highlightedIndex:Q1(e.highlightedIndex,1,t.items,t.isItemDisabled,!0)}:n={highlightedIndex:l&&e.selectedItem==null?-1:Ct(t,e,1),isOpen:t.items.length>=0};break;case jl:e.isOpen?l?n=Ba(t,e.highlightedIndex):n={highlightedIndex:Q1(e.highlightedIndex,-1,t.items,t.isItemDisabled,!0)}:n={highlightedIndex:Ct(t,e,-1),isOpen:t.items.length>=0};break;case Jl:n=Ba(t,e.highlightedIndex);break;case Kl:n=te({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case Xl:n={highlightedIndex:Q1(e.highlightedIndex,-10,t.items,t.isItemDisabled,!0)};break;case Ql:n={highlightedIndex:Q1(e.highlightedIndex,10,t.items,t.isItemDisabled,!0)};break;case Gl:n={highlightedIndex:$t(0,!1,t.items,t.isItemDisabled)};break;case Wl:n={highlightedIndex:$t(t.items.length-1,!0,t.items,t.isItemDisabled)};break;case $a:n=te({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((a=t.items)==null?void 0:a.length)&&o.selectItem&&{selectedItem:t.items[e.highlightedIndex],inputValue:t.itemToString(t.items[e.highlightedIndex])});break;case Yl:n={isOpen:!0,highlightedIndex:Aa(t),inputValue:o.inputValue};break;case en:n={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:Ct(t,e,0)};break;case on:n={selectedItem:o.selectedItem,inputValue:t.itemToString(o.selectedItem)};break;case an:n={inputValue:o.inputValue};break;default:return u5(e,t,o,P5)}return te({},e,n)}var C4=["onMouseLeave","refKey","ref"],m4=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],h4=["onClick","onPress","refKey","ref"],g4=["onKeyDown","onChange","onInput","onBlur","onChangeText","onClick","refKey","ref"];T5.stateChangeTypes=P5;function T5(e){e===void 0&&(e={}),Rl(e,T5,u4);var t=te({},f4,e),o=t.items,a=t.scrollIntoView,r=t.environment,l=t.getA11yStatusMessage,n=c4(p4,t,d4,d5),i=n[0],s=n[1],d=i.isOpen,u=i.highlightedIndex,f=i.selectedItem,p=i.inputValue,c=i1(null),x=i1({}),w=i1(null),C=i1(null),y=Na(),g=L5(t),k=i1(),m=Io({state:i,props:t}),V=ue(function(h){return x.current[g.getItemId(h)]},[g]);Tl(l,i,[d,u,f,p],r);var H=s5({menuElement:c.current,highlightedIndex:u,isOpen:d,itemRefs:x,scrollIntoView:a,getItemNodeFromIndex:V});_l({props:t,state:i}),S1(function(){var h=pt(t,"isOpen",Ge);h&&w.current&&w.current.focus()},[]),S1(function(){y||(k.current=o.length)});var q=ue(function(){m.current.state.isOpen&&s({type:$a})},[s,m]),M=Ft(function(){return[c,C,w]},[]),A=i5(r,q,M),K=Vl("getInputProps","getMenuProps");S1(function(){d||(x.current={})},[d]),S1(function(){var h;!d||!(r!=null&&r.document)||!(w!=null&&(h=w.current)!=null&&h.focus)||r.document.activeElement!==w.current&&w.current.focus()},[d,r]);var U=Ft(function(){return{ArrowDown:function(_){_.preventDefault(),s({type:zl,altKey:_.altKey})},ArrowUp:function(_){_.preventDefault(),s({type:jl,altKey:_.altKey})},Home:function(_){m.current.state.isOpen&&(_.preventDefault(),s({type:Gl}))},End:function(_){m.current.state.isOpen&&(_.preventDefault(),s({type:Wl}))},Escape:function(_){var E=m.current.state;(E.isOpen||E.inputValue||E.selectedItem||E.highlightedIndex>-1)&&(_.preventDefault(),s({type:Kl}))},Enter:function(_){var E=m.current.state;!E.isOpen||_.which===229||(_.preventDefault(),s({type:Jl}))},PageUp:function(_){m.current.state.isOpen&&(_.preventDefault(),s({type:Xl}))},PageDown:function(_){m.current.state.isOpen&&(_.preventDefault(),s({type:Ql}))}}},[s,m]),ae=ue(function(h){return te({id:g.labelId,htmlFor:g.inputId},h)},[g]),B=ue(function(h,_){var E,R=h===void 0?{}:h,G=R.onMouseLeave,re=R.refKey,N=re===void 0?"ref":re,J=R.ref,W=Ke(R,C4),ne=_===void 0?{}:_,ie=ne.suppressRefError,fe=ie===void 0?!1:ie;return K("getMenuProps",fe,N,c),te((E={},E[N]=_1(J,function(Ie){c.current=Ie}),E.id=g.menuId,E.role="listbox",E["aria-labelledby"]=W&&W["aria-label"]?void 0:""+g.labelId,E.onMouseLeave=be(G,function(){s({type:w5})}),E),W)},[s,K,g]),Z=ue(function(h){var _,E,R=h===void 0?{}:h,G=R.item,re=R.index,N=R.refKey,J=N===void 0?"ref":N,W=R.ref,ne=R.onMouseMove,ie=R.onMouseDown,fe=R.onClick;R.onPress;var Ie=R.disabled,s1=Ke(R,m4);Ie!==void 0&&console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useCombobox.');var De=m.current,We=De.props,Ze=De.state,Ye=Pl(G,re,We.items,"Pass either item or index to getItemProps!"),zt=Ye[0],Fe=Ye[1],d1=We.isItemDisabled(zt,Fe),jt="onClick",Ho=fe,D1=function(){A.isTouchEnd||Fe===Ze.highlightedIndex||(H.current=!1,s({type:b5,index:Fe,disabled:d1}))},Y1=function(){s({type:tn,index:Fe})},O1=function(ti){return ti.preventDefault()};return te((_={},_[J]=_1(W,function(u1){u1&&(x.current[g.getItemId(Fe)]=u1)}),_["aria-disabled"]=d1,_["aria-selected"]=Fe===Ze.highlightedIndex,_.id=g.getItemId(Fe),_.role="option",_),!d1&&(E={},E[jt]=be(Ho,Y1),E),{onMouseMove:be(ne,D1),onMouseDown:be(ie,O1)},s1)},[s,g,m,A,H]),S=ue(function(h){var _,E=h===void 0?{}:h,R=E.onClick;E.onPress;var G=E.refKey,re=G===void 0?"ref":G,N=E.ref,J=Ke(E,h4),W=m.current.state,ne=function(){s({type:I5})};return te((_={},_[re]=_1(N,function(ie){C.current=ie}),_["aria-controls"]=g.menuId,_["aria-expanded"]=W.isOpen,_.id=g.toggleButtonId,_.tabIndex=-1,_),!J.disabled&&te({},{onClick:be(R,ne)}),J)},[s,m,g]),b=ue(function(h,_){var E,R=h===void 0?{}:h,G=R.onKeyDown,re=R.onChange,N=R.onInput,J=R.onBlur;R.onChangeText;var W=R.onClick,ne=R.refKey,ie=ne===void 0?"ref":ne,fe=R.ref,Ie=Ke(R,g4),s1=_===void 0?{}:_,De=s1.suppressRefError,We=De===void 0?!1:De;K("getInputProps",We,ie,w);var Ze=m.current.state,Ye=function(O1){var u1=Ea(O1);u1&&U[u1]&&U[u1](O1)},zt=function(O1){s({type:Yl,inputValue:O1.target.value})},Fe=function(O1){if(r!=null&&r.document&&Ze.isOpen&&!A.isMouseDown){var u1=O1.relatedTarget===null&&r.document.activeElement!==r.document.body;s({type:$a,selectItem:!u1})}},d1=function(){s({type:en})},jt="onChange",Ho={};if(!Ie.disabled){var D1;Ho=(D1={},D1[jt]=be(re,N,zt),D1.onKeyDown=be(G,Ye),D1.onBlur=be(J,Fe),D1.onClick=be(W,d1),D1)}return te((E={},E[ie]=_1(fe,function(Y1){w.current=Y1}),E["aria-activedescendant"]=Ze.isOpen&&Ze.highlightedIndex>-1?g.getItemId(Ze.highlightedIndex):"",E["aria-autocomplete"]="list",E["aria-controls"]=g.menuId,E["aria-expanded"]=Ze.isOpen,E["aria-labelledby"]=Ie&&Ie["aria-label"]?void 0:g.labelId,E.autoComplete="off",E.id=g.inputId,E.role="combobox",E.value=Ze.inputValue,E),Ho,Ie)},[s,g,r,U,m,A,K]),I=ue(function(){s({type:y5})},[s]),L=ue(function(){s({type:S5})},[s]),O=ue(function(){s({type:M5})},[s]),T=ue(function(h){s({type:R5,highlightedIndex:h})},[s]),F=ue(function(h){s({type:on,selectedItem:h})},[s]),$=ue(function(h){s({type:H5,inputValue:h})},[s]),v=ue(function(){s({type:k5})},[s]);return{getItemProps:Z,getLabelProps:ae,getMenuProps:B,getInputProps:b,getToggleButtonProps:S,toggleMenu:I,openMenu:O,closeMenu:L,setHighlightedIndex:T,setInputValue:$,selectItem:F,reset:v,highlightedIndex:u,isOpen:d,selectedItem:f,inputValue:p}}var V5={activeIndex:-1,selectedItems:[]};function Y0(e,t){return pt(e,t,V5)}function e5(e,t){return R1(e,t,V5)}function v4(e){var t=Y0(e,"activeIndex"),o=Y0(e,"selectedItems");return{activeIndex:t,selectedItems:o}}function t5(e){if(e.shiftKey||e.metaKey||e.ctrlKey||e.altKey)return!1;var t=e.target;return!(t instanceof HTMLInputElement&&t.value!==""&&(t.selectionStart!==0||t.selectionEnd!==0))}function x4(e,t){return e.selectedItems===t.selectedItems&&e.activeIndex===t.activeIndex}var Jw={stateReducer:wo.stateReducer,itemToKey:wo.itemToKey,environment:wo.environment,selectedItems:X.default.array,initialSelectedItems:X.default.array,defaultSelectedItems:X.default.array,getA11yStatusMessage:X.default.func,activeIndex:X.default.number,initialActiveIndex:X.default.number,defaultActiveIndex:X.default.number,onActiveIndexChange:X.default.func,onSelectedItemsChange:X.default.func,keyNavigationNext:X.default.string,keyNavigationPrevious:X.default.string},L4={itemToKey:bo.itemToKey,stateReducer:bo.stateReducer,environment:bo.environment,keyNavigationNext:"ArrowRight",keyNavigationPrevious:"ArrowLeft"},w4=yo,rn=0,ln=1,nn=2,sn=3,dn=4,un=5,cn=6,fn=7,pn=8,Cn=9,mn=10,hn=11,gn=12,b4=Object.freeze({__proto__:null,DropdownClick:fn,DropdownKeyDownBackspace:cn,DropdownKeyDownNavigationPrevious:un,FunctionAddSelectedItem:pn,FunctionRemoveSelectedItem:Cn,FunctionReset:gn,FunctionSetActiveIndex:hn,FunctionSetSelectedItems:mn,SelectedItemClick:rn,SelectedItemKeyDownBackspace:nn,SelectedItemKeyDownDelete:ln,SelectedItemKeyDownNavigationNext:sn,SelectedItemKeyDownNavigationPrevious:dn});function I4(e,t,o){var a=o.type,r=o.index,l=o.selectedItem,n=e.activeIndex,i=e.selectedItems,s;switch(a){case rn:s={activeIndex:r};break;case dn:s={activeIndex:n-1<0?0:n-1};break;case sn:s={activeIndex:n+1>=i.length?-1:n+1};break;case nn:case ln:{if(n<0)break;var d=n;i.length===1?d=-1:n===i.length-1&&(d=i.length-2),s=te({selectedItems:[].concat(i.slice(0,n),i.slice(n+1))},{activeIndex:d});break}case un:s={activeIndex:i.length-1};break;case cn:s={selectedItems:i.slice(0,i.length-1)};break;case pn:s={selectedItems:[].concat(i,[l])};break;case fn:s={activeIndex:-1};break;case Cn:{var u=n,f=i.findIndex(function(x){return t.itemToKey(x)===t.itemToKey(l)});if(f<0)break;i.length===1?u=-1:f===i.length-1&&(u=i.length-2),s={selectedItems:[].concat(i.slice(0,f),i.slice(f+1)),activeIndex:u};break}case mn:{var p=o.selectedItems;s={selectedItems:p};break}case hn:{var c=o.activeIndex;s={activeIndex:c};break}case gn:s={activeIndex:e5(t,"activeIndex"),selectedItems:e5(t,"selectedItems")};break;default:throw new Error("Reducer called without proper action type.")}return te({},e,s)}var y4=["refKey","ref","onClick","onKeyDown","selectedItem","index"],M4=["refKey","ref","onKeyDown","onClick","preventKeyAction"];_5.stateChangeTypes=b4;function _5(e){e===void 0&&(e={}),w4(e,_5);var t=te({},L4,e),o=t.getA11yStatusMessage,a=t.environment,r=t.keyNavigationNext,l=t.keyNavigationPrevious,n=kl(I4,t,v4,x4),i=n[0],s=n[1],d=i.activeIndex,u=i.selectedItems,f=Na(),p=i1(null),c=i1();c.current=[];var x=Io({state:i,props:t});Tl(o,i,[d,u],a),S1(function(){f||(d===-1&&p.current?p.current.focus():c.current[d]&&c.current[d].focus())},[d]),_l({props:t,state:i});var w=Vl("getDropdownProps"),C=Ft(function(){var A;return A={},A[l]=function(){s({type:dn})},A[r]=function(){s({type:sn})},A.Delete=function(){s({type:ln})},A.Backspace=function(){s({type:nn})},A},[s,r,l]),y=Ft(function(){var A;return A={},A[l]=function(K){t5(K)&&s({type:un})},A.Backspace=function(U){t5(U)&&s({type:cn})},A},[s,l]),g=ue(function(A){var K,U=A===void 0?{}:A,ae=U.refKey,B=ae===void 0?"ref":ae,Z=U.ref,S=U.onClick,b=U.onKeyDown,I=U.selectedItem,L=U.index,O=Ke(U,y4),T=x.current.state,F=Pl(I,L,T.selectedItems,"Pass either item or index to getSelectedItemProps!"),$=F[1],v=$>-1&&$===T.activeIndex,h=function(){s({type:rn,index:$})},_=function(R){var G=Ea(R);G&&C[G]&&C[G](R)};return te((K={},K[B]=_1(Z,function(E){E&&c.current.push(E)}),K.tabIndex=v?0:-1,K.onClick=be(S,h),K.onKeyDown=be(b,_),K),O)},[s,x,C]),k=ue(function(A,K){var U,ae=A===void 0?{}:A,B=ae.refKey,Z=B===void 0?"ref":B,S=ae.ref,b=ae.onKeyDown,I=ae.onClick,L=ae.preventKeyAction,O=L===void 0?!1:L,T=Ke(ae,M4),F=K===void 0?{}:K,$=F.suppressRefError,v=$===void 0?!1:$;w("getDropdownProps",v,Z,p);var h=function(R){var G=Ea(R);G&&y[G]&&y[G](R)},_=function(){s({type:fn})};return te((U={},U[Z]=_1(S,function(E){E&&(p.current=E)}),U),!O&&{onKeyDown:be(b,h),onClick:be(I,_)},T)},[s,y,w]),m=ue(function(A){s({type:pn,selectedItem:A})},[s]),V=ue(function(A){s({type:Cn,selectedItem:A})},[s]),H=ue(function(A){s({type:mn,selectedItems:A})},[s]),q=ue(function(A){s({type:hn,activeIndex:A})},[s]),M=ue(function(){s({type:gn})},[s]);return{getSelectedItemProps:g,getDropdownProps:k,addSelectedItem:m,removeSelectedItem:V,setSelectedItems:H,setActiveIndex:q,reset:M,selectedItems:u,activeIndex:d}}var vn=0,xn=1,Ln=2,wn=3,bn=4,In=5,yn=6,S4=Object.freeze({__proto__:null,FunctionAddItem:yn,TagClick:vn,TagGroupKeyDownArrowLeft:xn,TagGroupKeyDownArrowRight:Ln,TagGroupKeyDownBackspace:bn,TagGroupKeyDownDelete:wn,TagRemoveClick:In});function R4(e,t,o){var a=o.type,r;switch(a){case vn:r={activeIndex:o.index};break;case xn:r={activeIndex:e.activeIndex===0?e.items.length-1:e.activeIndex-1};break;case Ln:r={activeIndex:e.activeIndex===e.items.length-1?0:e.activeIndex+1};break;case bn:case wn:{var l=[].concat(e.items.slice(0,e.activeIndex),e.items.slice(e.activeIndex+1)),n=l.length===0?-1:l.length===e.activeIndex?e.activeIndex-1:e.activeIndex;r={items:[].concat(e.items.slice(0,e.activeIndex),e.items.slice(e.activeIndex+1)),activeIndex:n};break}case In:{var i=[].concat(e.items.slice(0,o.index),e.items.slice(o.index+1)),s=i.length===0?-1:i.length===o.index?o.index-1:o.index;r={items:i,activeIndex:s}}break;case yn:{var d=[];o.index===void 0?d=[].concat(e.items,[o.item]):d=[].concat(e.items.slice(0,o.index),[o.item],e.items.slice(o.index));var u=e.activeIndex===-1?d.length-1:e.activeIndex;r={items:d,activeIndex:u};break}default:throw new Error("Invalid useTagGroup reducer action.")}return te({},e,r)}var H4=te({},ce),D5=H4.useId,k4=typeof D5=="function"?P4:T4;function P4(e){var t=e.id,o=e.tagGroupId,a=e.getTagId,r="downshift-"+D5();t||(t=r);var l=ce.useMemo(function(){return{tagGroupId:o??t+"-tag-group",getTagId:a??function(n){return t+"-tag-"+n}}},[a,t,o]);return l}function T4(e){var t=e.id,o=e.getTagId,a=e.tagGroupId,r=ce.useRef(t??"downshift-"+o5()),l=r.current,n=ce.useMemo(function(){return{tagGroupId:a??l+"-tag-group",getTagId:o??function(i){return l+"-tag-"+i}}},[o,l,a]);return n}function V4(e){var t,o,a,r,l=(t=(o=e.items)!=null?o:e.initialItems)!=null?t:[],n=(a=(r=e.activeIndex)!=null?r:e.initialActiveIndex)!=null?a:l.length===0?-1:0;return{activeIndex:n,items:l}}function _4(e,t){return e.activeIndex===t.activeIndex&&e.items===t.items}var O5="tag-group-a11y-description";function D4(e,t){ce.useEffect(function(){if(e){var o=e.createElement("div");return o.setAttribute("id",O5),o.style.display="none",o.textContent=t,e.body.appendChild(o),function(){o.remove()}}},[t,e])}function O4(e){return te({stateReducer:function(o,a){var r=a.changes;return r},environment:typeof window>"u"?void 0:window,removeElementDescription:"Press Delete or Backspace to remove tag."},e)}function E4(e,t,o){var a=ce.useRef({}),r=ce.useRef(e),l=ce.useRef(t);return ce.useEffect(function(){if(e!==-1&&r.current!==-1&&e!==r.current||l.current===t+1){var n;(n=a.current[o(e)])==null||n.focus()}r.current=e,l.current=t},[e,o,t]),a}var B4={isItemDisabled:X.default.func},A4=["onKeyDown"],Z4=["index","refKey","ref","onClick"],F4=["index","onClick"],E5=function(t){var o;t===void 0&&(t={}),Rl(t,E5,B4);var a=O4(t),r=kl(R4,a,V4,_4),l=r[0],n=r[1],i=l.activeIndex,s=l.items,d=Io({state:l,props:a}),u=k4({getTagId:a.getTagId,id:a.id,tagGroupId:a.tagGroupId});D4((o=a.environment)==null?void 0:o.document,a.removeElementDescription);var f=E4(i,s.length,u.getTagId),p=ue(function(C){var y=C??{},g=y.onKeyDown,k=Ke(y,A4),m=function(q){switch(q.key){case"ArrowLeft":n({type:xn});break;case"ArrowRight":n({type:Ln});break;case"Delete":n({type:wn});break;case"Backspace":n({type:bn});break}},V=te({id:u.tagGroupId,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions",role:"listbox",onKeyDown:Ml(g,m)},k);return V},[n,u.tagGroupId]),c=ue(function(C){var y,g=C.index,k=C.refKey,m=k===void 0?"ref":k,V=C.ref,H=C.onClick,q=Ke(C,Z4);if(!Number.isInteger(g)||g<0)throw new Error("Pass correct item index to getTagProps!");var M=d.current.state,A=function(){n({type:vn,index:g})},K=u.getTagId(g);return te((y={"aria-describedby":O5},y[m]=Au(V,function(U){U&&(f.current[K]=U)}),y["aria-labelledby"]=K,y.role="option",y.id=K,y.onClick=Ml(H,A),y.tabIndex=M.activeIndex===g?0:-1,y),q)},[n,u,d,f]),x=ue(function(C){var y=C.index,g=C.onClick,k=Ke(C,F4);if(!Number.isInteger(y)||y<0)throw new Error("Pass correct item index to getTagRemoveProps!");var m=function(M){M.stopPropagation(),n({type:In,index:y})},V=u.getTagId(y),H=V+"-remove";return te({id:H,tabIndex:-1,"aria-labelledby":H+" "+V,onClick:Ml(g,m)},k)},[u,n]),w=ue(function(C,y){n({type:yn,item:C,index:y})},[n]);return{activeIndex:i,addItem:w,getTagGroupProps:p,getTagProps:c,getTagRemoveProps:x,items:s}};E5.stateChangeTypes=S4;import Mo from"react";import{createPortal as $4}from"react-dom";import{jsx as mt,jsxs as B5}from"react/jsx-runtime";var N4=260,qa=4,U4=mt(Qn,{width:9,height:9}),q4=mt(Jn,{width:9,height:9});function z4(e){let t=e.getBoundingClientRect(),o=it(e),a=o?o.getBoundingClientRect():{top:0,bottom:window.innerHeight},r=a.bottom-t.bottom-qa,l=t.top-a.top-qa,n=r<N4&&l>r;return{top:n?t.top-qa:t.bottom+qa,left:t.left,width:t.width,openAbove:n}}function Nt({label:e,options:t,selectedItem:o,onChange:a,id:r="picklist",getOptionStyle:l,getTriggerStyle:n}){let[i,s]=Mo.useState({top:0,left:0,width:0,openAbove:!1}),d=Mo.useRef(null),u=`${r}-legend`,{isOpen:f,closeMenu:p,highlightedIndex:c,getToggleButtonProps:x,getMenuProps:w,getItemProps:C}=Ua({items:t,itemToString:V=>V?V.label:"",selectedItem:o,onSelectedItemChange:({selectedItem:V})=>{typeof a=="function"&&V&&V.value!==o?.value&&a(V.value)},onIsOpenChange:({isOpen:V})=>{V&&d.current&&s(z4(d.current))},id:r,labelId:u});Mo.useEffect(()=>{if(!f||!d.current)return;let V=it(d.current);if(!V)return;let H=()=>p();return V.addEventListener("scroll",H,{passive:!0}),()=>V.removeEventListener("scroll",H)},[f,p]);let y="picklistEditor-dropdown"+(f?" picklistEditor-dropdown--open":""),g=f?{top:i.top,left:i.left,width:i.width,...i.openAbove?{transform:"translateY(-100%)"}:void 0}:void 0,[k,m]=Mo.useState(null);return Mo.useLayoutEffect(()=>{let H=d.current?.getRootNode();m(H instanceof ShadowRoot?H:document.body)},[]),mt(t1,{label:e,id:r,className:"picklistEditor-fieldset",children:B5("div",{className:"picklistEditor-wrapper",children:[B5("button",{type:"button",className:"picklistEditor-trigger",style:n?n(o):void 0,...x({ref:d}),children:[mt("span",{className:"picklistEditor-trigger-label",children:o?.label??"Default"}),mt("span",{className:"picklistEditor-trigger-chevron","aria-hidden":"true",children:f?q4:U4})]}),$4(mt("ul",{className:y,style:g,...w(),children:f&&t.map((V,H)=>mt("li",{className:"picklistEditor-option"+(c===H?" picklistEditor-option--highlighted":"")+(o?.value===V.value?" picklistEditor-option--selected":""),style:l?l(V):void 0,...C({item:V,index:H}),children:V.label},V.value||"default"))}),k??document.body)]})})}import{jsx as X4}from"react/jsx-runtime";var j4=[{value:"",label:"Default"},{value:"Arial, sans-serif",label:"Arial"},{value:"Helvetica, sans-serif",label:"Helvetica"},{value:"Verdana, sans-serif",label:"Verdana"},{value:"Tahoma, sans-serif",label:"Tahoma"},{value:"'Trebuchet MS', sans-serif",label:"Trebuchet MS"},{value:"'Lucida Sans Unicode', sans-serif",label:"Lucida Sans"},{value:"Georgia, serif",label:"Georgia"},{value:"'Times New Roman', serif",label:"Times New Roman"},{value:"'Palatino Linotype', serif",label:"Palatino"},{value:"'Courier New', monospace",label:"Courier New"},{value:"'Lucida Console', monospace",label:"Lucida Console"}];function K4(e,t){if(!e)return null;let o=e.replace(/['"]/g,""),a=(o.split(",")[0]??"").trim();for(let r of t){if(!r.value)continue;let l=r.value.replace(/['"]/g,"");if(o.indexOf(l)!==-1||l.indexOf(a)!==-1)return r}return null}var G4=e=>e.value?{fontFamily:e.value}:void 0,W4=e=>e?.value?{fontFamily:e.value}:void 0;function A5({label:e="Font family",value:t,options:o,onChange:a,matchOption:r=K4,id:l="font-family",optionLabels:n}){let i=o??j4.map(d=>d.value===""?{...d,label:n?.default??d.label}:d),s=r(t,i)??i[0]??null;return X4(Nt,{label:e,options:i,selectedItem:s,onChange:a,id:l,getOptionStyle:G4,getTriggerStyle:W4})}import{jsx as Mn}from"react/jsx-runtime";var Q4=[{value:"normal",labelKey:"normal",defaultLabel:"Normal",icon:Mn(On,{width:14,height:14})},{value:"italic",labelKey:"italic",defaultLabel:"Italic",icon:Mn(Dn,{width:14,height:14})}];function Z5({label:e="Font Style",value:t,onChange:o,id:a="font-style",optionLabels:r}){let l=Q4.map(n=>({value:n.value,label:r?.[n.labelKey]??n.defaultLabel,icon:n.icon}));return Mn(x1,{label:e,options:l,value:t||"normal",onChange:o,id:a})}import{jsx as t8}from"react/jsx-runtime";var J4=[{value:"",labelKey:"default",defaultWord:"Default"},{value:"100",labelKey:"thin",defaultWord:"Thin"},{value:"200",labelKey:"extraLight",defaultWord:"Extra Light"},{value:"300",labelKey:"light",defaultWord:"Light"},{value:"400",labelKey:"regular",defaultWord:"Regular"},{value:"500",labelKey:"medium",defaultWord:"Medium"},{value:"600",labelKey:"semiBold",defaultWord:"Semi Bold"},{value:"700",labelKey:"bold",defaultWord:"Bold"},{value:"800",labelKey:"extraBold",defaultWord:"Extra Bold"},{value:"900",labelKey:"black",defaultWord:"Black"}];function Y4(e){return J4.map(t=>{let o=e?.[t.labelKey]??t.defaultWord;return{value:t.value,label:t.value?`${o} (${t.value})`:o}})}function e8(e,t){if(!e)return null;let o=String(e).trim();return t.find(a=>a.value===o)??null}function F5({label:e="Font weight",value:t,options:o,onChange:a,matchOption:r=e8,id:l="font-weight",optionLabels:n}){let i=o??Y4(n),s=r(t,i)??i[0]??null;return t8(Nt,{label:e,options:i,selectedItem:s,onChange:a,id:l})}import le from"react";import{createPortal as o8}from"react-dom";import{jsx as ee,jsxs as Ve}from"react/jsx-runtime";var a8={tabCms:"CMS",tabLocal:"Local",tabUrl:"URL",ariaTablist:"Image source",clearImage:"Clear image",chooseFile:"Choose File...",ariaChooseFile:"Choose an image file from your computer",useThisImage:"Use This Image",ariaImageUrl:"Image URL",urlPlaceholder:"https://example.com/image.png",previewAlt:"Preview",altText:"Alt Text",altPlaceholder:"Describe the image",width:"Width",height:"Height",autoPlaceholder:"auto",workspace:"Workspace",selectWorkspace:"Select a workspace...",selectImage:"Select an Image",loadingWorkspaces:"Loading workspaces...",noWorkspaces:"No CMS workspaces found",loadingImages:"Loading images...",noImages:"No images in this workspace",loadingMore:"Loading more...",untitled:"Untitled",downloadingImage:"Downloading image...",downloadFailed:"Download failed",closePicker:"Close",cancel:"Cancel",done:"Done",pickerTitle:"Select an image from {0}",pickerError:"Error: {0}"},Ut=["cms","local","url"];function r8({labels:e,workspaceName:t,folderId:o,portalTarget:a,folderItemsResult:r,contentDetail:l,thumbnailResult:n,onFetchFolderItems:i,onFetchContentDetail:s,onFetchThumbnail:d,onCancel:u,onConfirm:f}){let[p,c]=le.useState([]),[x,w]=le.useState(0),[C,y]=le.useState(!0),[g,k]=le.useState(!1),[m,V]=le.useState(null),[H,q]=le.useState(null),[M,A]=le.useState({}),[K,U]=le.useState({}),ae=le.useRef(new Set),B=le.useRef(new Set),Z=le.useCallback(O=>{g||typeof i=="function"&&(k(!0),V(null),i(o,O,20))},[o,g,i]);le.useEffect(()=>{Z(0)},[o]),le.useEffect(()=>{let O=T=>{T.key==="Escape"&&(T.stopPropagation(),u())};return document.addEventListener("keydown",O),()=>document.removeEventListener("keydown",O)},[u]);let S=le.useRef(null);le.useEffect(()=>{S.current?.focus()},[]),le.useEffect(()=>{if(!r)return;let O=(r.items??[]).map(T=>({contentKey:T.contentKey,title:T.title??e.untitled,mimeType:T.mimeType??"image/png"}));c(T=>r.page===0?O:[...T,...O]),y(!!r.hasMore),w(r.page??0),k(!1),r.error&&V(String(r.error))},[r]),le.useEffect(()=>{if(!l)return;let O=l.contentKey;if(!O||l.error)return;let T=l.url??"",F=l.mimeType??"image/png",$=l.title??"";A(v=>v[O]?v:{...v,[O]:{url:T,mimeType:F,title:$}}),T&&!B.current.has(O)&&typeof d=="function"&&(B.current.add(O),d(O,T,F))},[l,d]),le.useEffect(()=>{if(!n)return;let{imageId:O,thumbnailUrl:T}=n;O&&T&&U(F=>({...F,[O]:T}))},[n]);let b=le.useRef(null);le.useEffect(()=>{let O=b.current;if(!O||!C||g)return;let T=new IntersectionObserver(F=>{F.some(v=>v.isIntersecting)&&Z(x+1)});return T.observe(O),()=>T.disconnect()},[C,g,x,Z]);let I=le.useCallback(O=>{ae.current.has(O)||typeof s=="function"&&(ae.current.add(O),s(O))},[s]),L=()=>{if(!H)return;let O=M[H],T=p.find(F=>F.contentKey===H);!O||!T||f({contentKey:H,title:T.title,url:O.url,mimeType:O.mimeType||T.mimeType})};return o8(ee("div",{ref:S,tabIndex:-1,className:"cmsPicker-overlay",role:"dialog","aria-modal":"true","aria-label":Se(e.pickerTitle,[t]),onClick:O=>{O.target===O.currentTarget&&u()},children:Ve("div",{className:"cmsPicker-dialog",children:[Ve("div",{className:"cmsPicker-header",children:[ee("span",{className:"cmsPicker-title",children:Se(e.pickerTitle,[t])}),ee("button",{type:"button",className:"cmsPicker-close",onClick:u,"aria-label":e.closePicker,title:e.closePicker,children:"\u2715"})]}),Ve("div",{className:"cmsPicker-body",children:[p.length===0&&g&&ee("div",{className:"cmsPicker-empty",children:e.loadingImages}),p.length===0&&!g&&!m&&ee("div",{className:"cmsPicker-empty",children:e.noImages}),m&&ee("div",{className:"cmsPicker-empty",children:Se(e.pickerError,[m])}),Ve("div",{className:"cmsPicker-grid",children:[p.map(O=>ee(l8,{item:O,selected:H===O.contentKey,thumbnailDataUrl:K[O.contentKey],onIntersect:()=>I(O.contentKey),onClick:()=>q(O.contentKey)},O.contentKey)),C&&ee("div",{className:"cmsPicker-sentinel",ref:b,children:g?e.loadingMore:""})]})]}),Ve("div",{className:"cmsPicker-footer",children:[ee("button",{type:"button",className:"cmsPicker-btn",onClick:u,children:e.cancel}),ee("button",{type:"button",className:"cmsPicker-btn cmsPicker-btn--primary",disabled:!H||!M[H??""],onClick:L,children:e.done})]})]})}),a)}function l8({item:e,selected:t,thumbnailDataUrl:o,onIntersect:a,onClick:r}){let l=le.useRef(null),n=le.useRef(!1);return le.useEffect(()=>{let i=l.current;if(!i||n.current)return;let s=new IntersectionObserver(d=>{d.some(f=>f.isIntersecting)&&!n.current&&(n.current=!0,a(),s.disconnect())});return s.observe(i),()=>s.disconnect()},[a]),Ve("button",{ref:l,type:"button",className:`cmsPicker-thumb${t?" cmsPicker-thumb--selected":""}`,onClick:r,title:e.title,"aria-pressed":t,children:[ee("div",{className:"cmsPicker-thumb-img",children:o?ee("img",{src:o,alt:e.title}):ee("div",{className:"cmsPicker-thumb-placeholder","aria-hidden":"true",children:"\u2026"})}),ee("span",{className:"cmsPicker-thumb-label",children:e.title})]})}function n8({labels:e,spaces:t,spacesLoading:o,selectedSpaceId:a,onSpaceSelect:r,onOpenPicker:l}){return o?ee("div",{className:"imageEditor-cms",children:ee("div",{className:"imageEditor-cms-loading",children:e.loadingWorkspaces})}):t.length===0?ee("div",{className:"imageEditor-cms",children:ee("div",{className:"imageEditor-cms-empty",children:e.noWorkspaces})}):Ve("div",{className:"imageEditor-cms",children:[Ve("div",{className:"imageEditor-cms-channel",children:[ee("label",{className:"imageEditor-cms-channel-label",htmlFor:"cms-space-select",children:e.workspace}),Ve("select",{id:"cms-space-select",className:"imageEditor-input imageEditor-cms-channel-select",value:a,onChange:n=>r(n.target.value),children:[ee("option",{value:"",children:e.selectWorkspace}),t.map(n=>ee("option",{value:n.id,children:n.name},n.id))]})]}),ee("button",{type:"button",className:"imageEditor-cms-pick-btn",onClick:l,disabled:!a,children:e.selectImage})]})}function i8({labels:e,preview:t,onPick:o,onApply:a}){return Ve("div",{className:"imageEditor-local",children:[ee("button",{className:"imageEditor-local-pick",onClick:o,type:"button","aria-label":e.ariaChooseFile,"aria-haspopup":"dialog",children:e.chooseFile}),t&&Ve("div",{className:"imageEditor-local-preview",children:[ee("img",{src:t.webviewUri,alt:t.fileName,className:"imageEditor-preview-thumb"}),ee("span",{className:"imageEditor-local-filename",children:t.fileName}),ee("button",{className:"imageEditor-local-apply",onClick:()=>a(t.devUrl||t.webviewUri),type:"button",children:e.useThisImage})]})]})}function $5({src:e,alt:t,className:o}){let[a,r]=le.useState(!1);return le.useEffect(()=>{r(!1)},[e]),a?null:ee("img",{src:e,alt:t,className:o,onError:()=>r(!0)})}function s8({labels:e,input:t,onInputChange:o,onApply:a,currentUrl:r}){return Ve("div",{className:"imageEditor-url",children:[ee("input",{type:"text",value:t,"aria-label":e.ariaImageUrl,placeholder:e.urlPlaceholder,className:"imageEditor-input",onChange:l=>o(l.target.value),onKeyDown:l=>{l.key==="Enter"&&t&&a(t)},onBlur:()=>{t&&t!==r&&a(t)}}),t&&ee("div",{className:"imageEditor-url-preview",children:ee($5,{src:t,alt:e.previewAlt,className:"imageEditor-preview-thumb"})})]})}function Sn({id:e,label:t,value:o,type:a,inputMode:r,placeholder:l,onCommit:n}){let[i,s]=le.useState(o),d=le.useRef(n);d.current=n;let u=le.useRef(o);le.useEffect(()=>{o!==u.current&&(u.current=o,s(o))},[o]);let f=()=>{i!==o&&(u.current=i,d.current(i))};return Ve("div",{className:"imageEditor-attr",children:[ee("label",{className:"imageEditor-attr-label",htmlFor:e,children:t}),ee("input",{id:e,type:a,inputMode:r,value:i,placeholder:l,className:"imageEditor-input",onChange:p=>s(p.target.value),onKeyDown:p=>{p.key==="Enter"&&f()},onBlur:f})]})}function d8({labels:e,attributes:t,onAttributeChange:o}){return Ve("div",{className:"imageEditor-attrs",children:[ee(Sn,{id:"design-img-alt",label:e.altText,type:"text",value:t.alt,placeholder:e.altPlaceholder,onCommit:a=>o("alt",a)}),Ve("div",{className:"imageEditor-attrs-row",children:[ee(Sn,{id:"design-img-width",label:e.width,type:"number",inputMode:"numeric",value:t.width,placeholder:e.autoPlaceholder,onCommit:a=>o("width",a)}),ee(Sn,{id:"design-img-height",label:e.height,type:"number",inputMode:"numeric",value:t.height,placeholder:e.autoPlaceholder,onCommit:a=>o("height",a)})]})]})}function N5({label:e,value:t,onChange:o,id:a="image",attributes:r,onAttributeChange:l,cmsSpaces:n,cmsSpacesLoading:i,onFetchCmsSpaces:s,cmsFolderItemsResult:d,onFetchCmsFolderItems:u,cmsContentDetail:f,onFetchCmsContentDetail:p,cmsThumbnailResult:c,onFetchCmsThumbnail:x,onImportCmsImage:w,cmsImportResult:C,onPickLocalFile:y,localPreview:g,imageLabels:k}){let m=f1(a8,k),V={cms:m.tabCms,local:m.tabLocal,url:m.tabUrl},[H,q]=le.useState("cms"),[M,A]=le.useState(""),[K,U]=le.useState(!1),[ae,B]=le.useState(""),[Z,S]=le.useState("idle"),b=le.useRef(null),I=le.useRef(null),L=le.useCallback(()=>{let R=I.current?.getRootNode();return R instanceof ShadowRoot?R:document.body},[]),O=le.useRef({}),T=le.useCallback(R=>{q(R),O.current[R]?.focus()},[]),F=le.useCallback((R,G)=>{let re=null;switch(R.key){case"ArrowRight":re=(G+1)%Ut.length;break;case"ArrowLeft":re=(G-1+Ut.length)%Ut.length;break;case"Home":re=0;break;case"End":re=Ut.length-1;break;default:return}R.preventDefault();let N=Ut[re];N&&T(N)},[T]),$=n??[],v=i??!1,h=t||"";le.useEffect(()=>{if(C)if(C.success&&C.devUrl)o(C.devUrl),S("success");else{let R=b.current?.url;R?(o(R),S("success")):S("error")}},[C,o]),le.useEffect(()=>{H==="cms"&&$.length===0&&!v&&typeof s=="function"&&s()},[H]);let _=le.useMemo(()=>$.find(R=>R.id===M)??null,[$,M]),E=le.useCallback(R=>{let G={id:R.contentKey,title:R.title,url:R.url,thumbnailUrl:"",contentType:R.mimeType};b.current=G,U(!1),typeof w=="function"&&G.url?(S("importing"),w(G)):G.url&&o(G.url)},[o,w]);return ee(t1,{label:e,id:a,className:"imageEditor-fieldset",children:Ve("div",{ref:I,className:"imageEditor-root",children:[h&&Ve("div",{className:"imageEditor-current",children:[ee($5,{src:h,alt:"",className:"imageEditor-current-thumb"}),ee("span",{className:"imageEditor-current-url",title:h,children:h.length>30?`...${h.slice(-30)}`:h}),ee("button",{className:"imageEditor-clear",onClick:()=>o(""),title:m.clearImage,"aria-label":m.clearImage,type:"button",children:"\u2715"})]}),ee("div",{className:"imageEditor-tabs",role:"tablist","aria-label":m.ariaTablist,children:Ut.map((R,G)=>ee("button",{id:`${a}-tab-${R}`,ref:re=>{O.current[R]=re},role:"tab",type:"button","aria-selected":H===R,"aria-controls":`${a}-tabpanel`,tabIndex:H===R?0:-1,className:`imageEditor-tab${H===R?" imageEditor-tab--active":""}`,onClick:()=>q(R),onKeyDown:re=>F(re,G),children:V[R]},R))}),Ve("div",{className:"imageEditor-tab-content",role:"tabpanel",id:`${a}-tabpanel`,"aria-labelledby":`${a}-tab-${H}`,children:[H==="cms"&&ee(n8,{labels:m,spaces:$,spacesLoading:v,selectedSpaceId:M,onSpaceSelect:A,onOpenPicker:()=>U(!0)}),H==="cms"&&Z==="importing"&&ee("div",{className:"imageEditor-cms-loading",children:m.downloadingImage}),H==="cms"&&Z==="error"&&ee("div",{className:"imageEditor-cms-empty",children:m.downloadFailed}),H==="local"&&ee(i8,{labels:m,preview:g,onPick:()=>y?.(),onApply:R=>o(R)}),H==="url"&&ee(s8,{labels:m,input:ae,onInputChange:B,onApply:o,currentUrl:h})]}),r&&l&&ee(d8,{labels:m,attributes:r,onAttributeChange:l}),K&&_&&ee(r8,{labels:m,workspaceName:_.name,folderId:_.rootFolderId,portalTarget:L(),folderItemsResult:d,contentDetail:f,thumbnailResult:c,onFetchFolderItems:u,onFetchContentDetail:p,onFetchThumbnail:x,onCancel:()=>U(!1),onConfirm:E})]})})}import{jsx as p8}from"react/jsx-runtime";var u8=[{value:"",labelKey:"default",defaultLabel:"Default"},{value:"visible",labelKey:"visible",defaultLabel:"Visible"},{value:"hidden",labelKey:"hidden",defaultLabel:"Hidden"},{value:"scroll",labelKey:"scroll",defaultLabel:"Scroll"},{value:"auto",labelKey:"auto",defaultLabel:"Auto"}];function c8(e){return u8.map(t=>({value:t.value,label:e?.[t.labelKey]??t.defaultLabel}))}function f8(e,t){if(!e)return null;let o=String(e).trim().toLowerCase();return t.find(a=>a.value===o)??null}function U5({label:e="Overflow",value:t,onChange:o,id:a="overflow",optionLabels:r}){let l=c8(r),n=f8(t,l)??l[0]??null;return p8(Nt,{label:e,options:l,selectedItem:n,onChange:o,id:a})}import{jsx as So}from"react/jsx-runtime";var C8=[{value:"left",labelKey:"left",defaultLabel:"Left",icon:So(Wn,{width:14,height:14})},{value:"center",labelKey:"center",defaultLabel:"Center",icon:So(Kn,{width:14,height:14})},{value:"right",labelKey:"right",defaultLabel:"Right",icon:So(Xn,{width:14,height:14})},{value:"justify",labelKey:"justify",defaultLabel:"Justify",icon:So(Gn,{width:14,height:14})}],m8={start:"left",end:"right"};function q5({label:e="Text Align",value:t,onChange:o,id:a="text-align",optionLabels:r}){let l=m8[t||""]||t||"left",n=C8.map(i=>({value:i.value,label:r?.[i.labelKey]??i.defaultLabel,icon:i.icon}));return So(x1,{label:e,options:n,value:l,onChange:o,id:a})}import{jsx as za}from"react/jsx-runtime";var z5=[{value:"none",labelKey:"none",defaultLabel:"None",icon:za(ht,{width:14,height:14})},{value:"underline",labelKey:"underline",defaultLabel:"Underline",icon:za(Yn,{width:14,height:14})},{value:"line-through",labelKey:"lineThrough",defaultLabel:"Line Through",icon:za(jn,{width:14,height:14})}];function h8(e){if(!e)return"none";for(let t of z5)if(e===t.value||e.startsWith(t.value+" "))return t.value;return"none"}function j5({label:e="Text Decoration",value:t,onChange:o,id:a="text-decoration",optionLabels:r}){let l=z5.map(n=>({value:n.value,label:r?.[n.labelKey]??n.defaultLabel,icon:n.icon}));return za(x1,{label:e,options:l,value:h8(t),onChange:o,id:a})}import{jsx as Ro}from"react/jsx-runtime";var g8=[{value:"none",labelKey:"none",defaultLabel:"None",icon:Ro(ht,{width:14,height:14})},{value:"uppercase",labelKey:"uppercase",defaultLabel:"Uppercase",icon:Ro($n,{width:14,height:14})},{value:"lowercase",labelKey:"lowercase",defaultLabel:"Lowercase",icon:Ro(Fn,{width:14,height:14})},{value:"capitalize",labelKey:"capitalize",defaultLabel:"Capitalize",icon:Ro(Zn,{width:14,height:14})}];function K5({label:e="Text Transform",value:t,onChange:o,id:a="text-transform",optionLabels:r}){let l=g8.map(n=>({value:n.value,label:r?.[n.labelKey]??n.defaultLabel,icon:n.icon}));return Ro(x1,{label:e,options:l,value:t||"none",onChange:o,id:a})}var G5="textContent";var v8=e=>typeof e?.sourceFile=="string"&&e.sourceFile!==""&&e.lineNumber!=null&&e.columnNumber!=null?{sourceFile:e.sourceFile,lineNumber:e.lineNumber,columnNumber:e.columnNumber}:void 0;function W5(e){let t=[],o=new Map,a=r=>{let l=v8(r);if(!l)return;let{sourceFile:n,lineNumber:i,columnNumber:s}=l,d=`${n}\0${i}:${s}`,u=o.get(d);return u||(u={byProperty:new Map,debugSource:l},o.set(d,u),t.push(u)),u};for(let r of e){let l=r.data;r.type==="style"&&l?.property!=null?a(l)?.byProperty.set(String(l.property),String(r.newValue??"")):r.type==="text"&&a(l)?.byProperty.set(G5,String(r.newValue??""))}return t.map(r=>{let l=[...r.byProperty].map(([n,i])=>({property:n,value:i})).filter(n=>n.property===G5||n.value!=="");return{debugSource:r.debugSource,commands:l}}).filter(r=>r.commands.length>0)}var J1={CHANGED:"history-changed",COMMAND_PUSHED:"command-pushed",COMMAND_UNDONE:"command-undone",COMMAND_REDONE:"command-redone",CLEARED:"history-cleared"},ja=class{constructor(t={}){et(this,"undoStack",[]);et(this,"redoStack",[]);et(this,"maxHistorySize");et(this,"listeners",new Set);et(this,"_isProcessing",!1);et(this,"commandExecutor");if(this.maxHistorySize=t.maxHistorySize??200,!t.commandExecutor)throw new Error("CommandExecutor is required");this.commandExecutor=t.commandExecutor}createCommand(t,o,a,r){return Object.freeze({id:this._generateCommandId(),type:t,oldValue:o,newValue:a,data:r})}_generateCommandId(){return`cmd-${Date.now()}-${Math.random().toString(36).substr(2,9)}`}subscribe(t){if(typeof t!="function")throw new Error("Listener must be a function");return this.listeners.add(t),()=>{this.listeners.delete(t)}}_notify(t,o={}){if(this.listeners.size===0)return;let a=Object.freeze({type:t,timestamp:Date.now(),canUndo:this.canUndo(),canRedo:this.canRedo(),undoCount:this.getUndoCount(),redoCount:this.getRedoCount(),...o}),r=Array.from(this.listeners);for(let l of r)try{l(a)}catch(n){console.error("[HistoryManager] Error in listener:",n)}}pushCommand(t){if(!t||typeof t!="object")throw new Error("Invalid command: must be an object");if(!t.type)throw new Error("Invalid command: missing required fields (type)");if(this._isProcessing){console.warn("[HistoryManager] pushCommand called during processing, ignoring");return}this.undoStack.length>=this.maxHistorySize||(this.undoStack.push(t),this.redoStack=[],this._notify(J1.COMMAND_PUSHED,{command:t}),this._notify(J1.CHANGED))}_trimStack(){if(this.undoStack.length>this.maxHistorySize){let t=this.undoStack.length-this.maxHistorySize;this.undoStack.splice(0,t)}}_applyCommand(t,o){if(!this.commandExecutor.canHandle(t.type))return console.warn("[HistoryManager] No executor for command type:",t.type),!1;try{return this.commandExecutor.execute(t,o)}catch(a){return console.error("[HistoryManager] Error applying command:",a,t),!1}}_createInverseCommand(t,o){let a=this.commandExecutor.getCurrentValue(t);return Object.freeze({id:this._generateCommandId(),type:t.type,oldValue:o?t.oldValue:a,newValue:o?a:t.newValue,data:t.data})}undo(){if(this._isProcessing)return console.warn("[HistoryManager] undo called during processing, ignoring"),!1;if(!this.canUndo())return!1;this._isProcessing=!0;try{let t=this.undoStack.pop(),o=this._applyCommand(t,!0);if(o){let a=this._createInverseCommand(t,!1);this.redoStack.push(a)}else this.undoStack.push(t),console.warn("[HistoryManager] Undo failed, command restored to stack");return this._notify(J1.COMMAND_UNDONE,{command:t,appliedValue:t.oldValue}),this._notify(J1.CHANGED),o}finally{this._isProcessing=!1}}redo(){if(this._isProcessing)return console.warn("[HistoryManager] redo called during processing, ignoring"),!1;if(!this.canRedo())return!1;this._isProcessing=!0;try{let t=this.redoStack.pop();if(!t)return console.warn("[HistoryManager] No command to redo"),!1;let o=this._applyCommand(t,!1);if(o){let a=this._createInverseCommand(t,!0);this.undoStack.push(a),this._trimStack()}else this.redoStack.push(t),console.warn("[HistoryManager] Redo failed, command restored to stack");return this._notify(J1.COMMAND_REDONE,{command:t,appliedValue:t.newValue}),this._notify(J1.CHANGED),o}finally{this._isProcessing=!1}}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}clear(){this.undoStack=[],this.redoStack=[],this._notify(J1.CLEARED),this._notify(J1.CHANGED)}getUndoCount(){return this.undoStack.length}getMaxHistorySize(){return this.maxHistorySize}getRedoCount(){return this.redoStack.length}getUndoStackSnapshot(){return this.undoStack.map(t=>({type:t.type,oldValue:t.oldValue,newValue:t.newValue,data:t.data}))}};var x8=(e,t)=>{let o=t?e.oldValue:e.newValue;return typeof o=="string"?o:String(o??"")},Rn=e=>{if(!e||typeof e!="object")return;let t=e;if(!(typeof t.sourceFile!="string"||typeof t.lineNumber!="number"||typeof t.columnNumber!="number"))return{sourceFile:t.sourceFile,lineNumber:t.lineNumber,columnNumber:t.columnNumber}},L8=e=>typeof e=="object"&&e!==null&&"property"in e&&typeof e.property=="string",w8=e=>typeof e=="object"&&e!==null&&"tag"in e&&typeof e.tag=="string"&&"attribute"in e&&typeof e.attribute=="string",X5=(e,t,o)=>{let a=new Map;return{execute:(r,l)=>{let n=x8(r,l);a.set(r.id,n);try{if(r.type==="style"&&L8(r.data)){let i=Rn(r.data);return e(r.data.property,n,i),!0}else if(r.type==="text"){let i=Rn(r.data);return t(n,i),!0}else if(r.type==="media"&&w8(r.data)){if(!o)return!1;let i=Rn(r.data);return o(r.data.tag,{[r.data.attribute]:n},i),!0}}catch{return!1}return!1},getCurrentValue:r=>a.get(r.id)??r.newValue,canHandle:r=>r==="style"||r==="text"||r==="media"&&typeof o=="function"}};function Q5(e,t,o){let a=X5(e,t,o),r=new ja({commandExecutor:a});return{recordStyleChange(l,n,i,s){let d=r.createCommand("style",n,i,{...s,property:l});r.pushCommand(d)},recordTextChange(l,n,i){let s=r.createCommand("text",l,n,{...i});r.pushCommand(s)},recordMediaChange(l,n,i,s,d){let u=r.createCommand("media",i,s,{...d,tag:l,attribute:n});r.pushCommand(u)},undo:()=>r.undo(),redo:()=>r.redo(),canUndo:()=>r.canUndo(),canRedo:()=>r.canRedo(),subscribe:l=>r.subscribe(l),getHistoryStack:()=>r.getUndoStackSnapshot(),clear:()=>r.clear(),getUndoCount:()=>r.getUndoCount(),getMaxHistorySize:()=>r.getMaxHistorySize()}}import{jsx as oe,jsxs as Ee}from"react/jsx-runtime";var I8="This element's text can be edited inline.",y8="This element's text cannot be edited inline because it contains dynamic content.",M8={opacity:.4},S8=new Set(a9),R8={general:{headerTitle:"Selected Element",emptyPlaceholder:"Click on an element in the preview to select it.",inlineEditEditable:I8,inlineEditNonEditable:y8,addToChatContext:"Add to chat as context",ariaPropertyPanel:"Property panel",ariaSelectedComponent:"Selected component",ariaElementStyling:"Element styling"},sections:{imageSource:"Image Source",background:"Background",spacing:"Spacing",border:"Border",typography:"Typography",elementDimensions:"Element Dimensions"},instances:{imageSource:"Source",backgroundColor:"Background Color",padding:"Padding",margin:"Margin",borderRadius:"Border Radius",borderWeight:"Border Weight",borderStyle:"Border Style",borderColor:"Border Color",fontFamily:"Font Family",fontSize:"Font Size",fontWeight:"Font Weight",fontStyle:"Font Style",textColor:"Text Color",textAlignment:"Text Alignment",textFormatting:"Text Formatting",textTransform:"Text Transform",lineHeight:"Line Height",letterSpacing:"Letter Spacing",width:"Width",minWidth:"Minimum Width",maxWidth:"Maximum Width",height:"Height",minHeight:"Minimum Height",maxHeight:"Maximum Height",overflow:"Overflow"},history:{changeLimitTitle:"Change limit reached",changeLimitBody:"Apply your {0} design changes to save your work and continue editing."}};function H8({size:e=16}){return oe("svg",{width:e,height:e,viewBox:"-1 0 252 302",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:oe("path",{d:"M57 49Q67 49 74 42Q81 35 81 25Q81 15 74 8Q67 1 57 1Q47 1 40 8Q33 15 33 25Q33 35 40 42Q47 49 57 49ZM193 49Q203 49 210 42Q217 35 217 25Q217 15 210 8Q203 1 193 1Q183 1 176 8Q169 15 169 25Q169 35 176 42Q183 49 193 49ZM125 301Q100 301 71 292Q47 285 26 274Q7 265 3.5 259.5Q0 254 1 249Q13 216 20 189Q24 171 26 157V147Q28 120 30 105Q34 78 40 65Q48 48 63 39Q85 27 125 27Q165 27 186 39Q201 47 209 65Q216 78 220 105Q222 120 224 147V157Q226 171 230 189Q237 216 248 249Q250 254 246.5 259.5Q243 265 224 274Q203 285 179 292Q150 301 125 301ZM23 249Q39 259 63 268Q97 280 125 280Q153 280 187 268Q210 259 227 249Q216 219 210 194Q205 174 204 159L203 148Q199 91 191 73Q188 66 184 62Q177 56 165 52Q150 48 125 48Q90 48 73 57Q64 63 59 73Q51 91 47 148L46 158Q45 174 40 194Q34 220 23 249ZM124 248Q113 248 102 244Q84 236 76 217Q72 209 71 201Q70 193 70 179Q70 163 73 151Q76 142 81.5 134Q87 126 98 120Q109 114 125.5 114Q142 114 152 120Q164 127 169 134.5Q174 142 177 151Q180 163 180 178.5Q180 194 179 200Q178 209 174 218Q167 232 154.5 240Q142 248 126 248ZM124 228H126Q147 228 156 209Q158 203 159 197.5Q160 192 160 179Q160 166 157 157Q155 151 152 146.5Q149 142 141 138Q136 134 125 134Q114 134 107.5 138Q101 142 98 146.5Q95 151 93 157Q90 166 90 178.5Q90 191 91 197Q92 203 94 209Q99 221 111 225Q117 228 124 228ZM195 81Q192 79 190 78Q170 70 146 76Q134 80 125.5 80Q117 80 104 76Q80 70 60 78Q58 79 55 81Q50 84 51 89L55 112Q56 117 59.5 120.5Q63 124 68 125Q83 126 99 126Q111 126 115 114L122 92Q122 91 124 89L125 88L126 89Q128 91 128 92L135 114Q139 126 152 126Q167 126 182 125Q187 124 190.5 120.5Q194 117 195 112L199 89Q200 84 195 81ZM141 192Q137 190 133 193V171Q138 169 141 165Q143 163 144 161Q145 159 145 156.5Q145 154 143.5 152Q142 150 140 148.5Q138 147 134 146Q130 145 125.5 145Q121 145 116 146Q111 147 109 149Q107 151 106 153Q105 155 105 157Q105 159 106 161Q107 163 109.5 166Q112 169 116 171H117V193Q113 190 109 191.5Q105 193 104 196Q103 199 105 202Q108 210 117 213Q124 216 133 213L134 212Q143 209 146 202Q147 199 145.5 196Q144 193 141 192Z"})})}function k8(e,t){let o=e[t];return o!=null?String(o):""}function Hn(e){if(!(!e||!e.name||!e.debugSource))return{sourceFile:e.debugSource.sourceFile,lineNumber:e.debugSource.lineNumber,columnNumber:e.debugSource.columnNumber,componentName:e.name}}function P8({component:e,onOpenSourceFile:t,showOpenSourceFile:o,generalLabels:a}){if(!e||!e.name)return oe("section",{id:"property-panel-selected-component",className:"property-panel-selected-component",children:oe("p",{className:"property-panel-selected-component-placeholder",id:"component-info",children:a.emptyPlaceholder})});let r=e.tagName?e.tagName.toLowerCase():"",l=r?`${e.name} > ${r}`:e.name,n=null;if(o&&e.debugSource){let{sourceFile:i,lineNumber:s,columnNumber:d}=e.debugSource,u=i.split("/").pop()||i,f=`:${s}:${d}`;n=Ee("a",{href:"#",className:"property-panel-selected-component-source",onClick:c=>{c.preventDefault(),t?.({sourceFile:i,lineNumber:s,columnNumber:d})},title:`${i}${f}`,children:[u,f]})}return oe("section",{id:"property-panel-selected-component",className:"property-panel-selected-component","aria-label":a.ariaSelectedComponent,children:Ee("div",{id:"component-info",className:"property-panel-selected-component-info",children:[oe("span",{className:"property-panel-selected-component-name",children:l}),n&&Ee("span",{className:"property-panel-selected-component-source-row",children:["\u21B3 ",n]})]})})}var T8=ve.forwardRef(function({title:t,body:o},a){return Ee("section",{ref:a,role:"alert","aria-live":"assertive","aria-labelledby":"property-panel-change-limit-title",className:"property-panel-change-limit-message",tabIndex:-1,children:[oe("svg",{className:"property-panel-change-limit-icon",viewBox:"0 0 520 520",fill:"currentColor","aria-hidden":"true",focusable:"false",children:oe("path",{d:"M260 20a240 240 0 100 480 240 240 0 100-480m0 121c17 0 30 13 30 30s-13 30-30 30-30-13-30-30 13-30 30-30m50 210c0 5-4 9-10 9h-80c-5 0-10-3-10-9v-20c0-5 4-11 10-11 5 0 10-3 10-9v-40c0-5-4-11-10-11-5 0-10-3-10-9v-20c0-5 4-11 10-11h60c5 0 10 5 10 11v80c0 5 4 9 10 9 5 0 10 5 10 11z"})}),Ee("div",{className:"property-panel-change-limit-content",children:[oe("h2",{id:"property-panel-change-limit-title",className:"property-panel-change-limit-title",children:t}),oe("p",{className:"property-panel-change-limit-body",children:o})]})]})});function V8({styles:e,computedStyles:t,hasSelection:o,onStyleChange:a,generalLabels:r,sectionLabels:l,instanceLabels:n,editorLabels:i,component:s,onImageAttributeChange:d,imageSource:u}){let f=o?"visible":"",p=s?.media?.tag==="img"?s.media:null;return oe("section",{className:"property-panel-style-properties-container"+(f?" "+f:""),"aria-label":r.ariaElementStyling,"aria-hidden":!o,children:Ee("div",{className:"property-panel-style-properties",children:[p&&oe(tt,{title:l.imageSource,children:oe(N5,{label:n.imageSource,value:p.src,onChange:c=>d("src",c),id:"design-img-src",attributes:{alt:p.alt,width:p.width,height:p.height},onAttributeChange:d,imageLabels:i?.image,...u})}),oe(tt,{title:l.background,children:oe(wa,{label:n.backgroundColor,value:e.backgroundColor||t.backgroundColor||"#ffffff",onChange:c=>a("backgroundColor",c),id:"design-bg-color"})}),Ee(tt,{title:l.spacing,children:[oe(to,{label:n.padding,id:"design-padding",value:e.padding,placeholder:t.padding,onChange:c=>a("padding",c),...Yt.padding,aria:i?.boxDimension}),oe(to,{label:n.margin,id:"design-margin",value:e.margin,placeholder:t.margin,onChange:c=>a("margin",c),...Yt.margin,allowAuto:!0,aria:i?.boxDimension})]}),Ee(tt,{title:l.border,children:[oe(to,{label:n.borderRadius,id:"design-border-radius",value:e.borderRadius,placeholder:t.borderRadius,onChange:c=>a("borderRadius",c),...Yt.borderRadius,aria:i?.boxDimension}),oe(to,{label:n.borderWeight,id:"design-border-width",value:e.borderWidth,placeholder:t.borderWidth,onChange:c=>a("borderWidth",c),...Yt.borderWidth,aria:i?.boxDimension}),oe(V9,{label:n.borderStyle,id:"design-border-style",value:e.borderStyle||t.borderStyle,onChange:c=>a("borderStyle",c),optionLabels:i?.borderStyle?.options}),oe(wa,{label:n.borderColor,value:e.borderColor||t.borderColor||"#000000",onChange:c=>a("borderColor",c),id:"design-border-color",aria:i?.color})]}),Ee(tt,{title:l.typography,children:[oe(A5,{label:n.fontFamily,id:"design-font-family",value:e.fontFamily||t.fontFamily,onChange:c=>a("fontFamily",c),optionLabels:i?.fontFamily?.options}),oe(M1,{label:n.fontSize,id:"design-font-size",value:e.fontSize,placeholder:t.fontSize,onChange:c=>a("fontSize",c),...L1.fontSize,aria:i?.dimension}),oe(F5,{label:n.fontWeight,id:"design-font-weight",value:e.fontWeight||t.fontWeight,onChange:c=>a("fontWeight",c),optionLabels:i?.fontWeight?.options}),oe(Z5,{label:n.fontStyle,id:"design-font-style",value:e.fontStyle||t.fontStyle,onChange:c=>a("fontStyle",c),optionLabels:i?.fontStyle?.options}),oe(wa,{label:n.textColor,value:e.color||t.color||"#000000",onChange:c=>a("color",c),id:"design-text-color",aria:i?.color}),oe(q5,{label:n.textAlignment,id:"design-text-align",value:e.textAlign||t.textAlign,onChange:c=>a("textAlign",c),optionLabels:i?.textAlignment?.options}),oe(j5,{label:n.textFormatting,id:"design-text-decoration",value:e.textDecoration||t.textDecoration,onChange:c=>a("textDecoration",c),optionLabels:i?.textDecoration?.options}),oe(K5,{label:n.textTransform,id:"design-text-transform",value:e.textTransform||t.textTransform,onChange:c=>a("textTransform",c),optionLabels:i?.textTransform?.options}),oe(M1,{label:n.lineHeight,id:"design-line-height",value:e.lineHeight,placeholder:t.lineHeight,onChange:c=>a("lineHeight",c),...L1.lineHeight,aria:i?.dimension}),oe(M1,{label:n.letterSpacing,id:"design-letter-spacing",value:e.letterSpacing,placeholder:t.letterSpacing,onChange:c=>a("letterSpacing",c),...L1.letterSpacing,aria:i?.dimension})]}),Ee(tt,{title:l.elementDimensions,children:[oe(M1,{label:n.width,id:"design-width",value:e.width,placeholder:t.width,onChange:c=>a("width",c),...L1.width,aria:i?.dimension}),Ee("div",{className:"property-panel-row-2col",children:[oe(M1,{label:n.minWidth,id:"design-min-width",value:e.minWidth,placeholder:t.minWidth,onChange:c=>a("minWidth",c),...L1.minWidth,aria:i?.dimension}),oe(M1,{label:n.maxWidth,id:"design-max-width",value:e.maxWidth,placeholder:t.maxWidth,onChange:c=>a("maxWidth",c),...L1.maxWidth,aria:i?.dimension})]}),oe(M1,{label:n.height,id:"design-height",value:e.height,placeholder:t.height,onChange:c=>a("height",c),...L1.height,aria:i?.dimension}),Ee("div",{className:"property-panel-row-2col",children:[oe(M1,{label:n.minHeight,id:"design-min-height",value:e.minHeight,placeholder:t.minHeight,onChange:c=>a("minHeight",c),...L1.minHeight,aria:i?.dimension}),oe(M1,{label:n.maxHeight,id:"design-max-height",value:e.maxHeight,placeholder:t.maxHeight,onChange:c=>a("maxHeight",c),...L1.maxHeight,aria:i?.dimension})]}),oe(U5,{label:n.overflow,id:"design-overflow",value:e.overflow||t.overflow,onChange:c=>a("overflow",c),optionLabels:i?.overflow?.options})]})]})})}var Y5=["width","minWidth","maxWidth","height","minHeight","maxHeight","overflow","padding","margin","backgroundColor","borderWidth","borderStyle","borderColor","borderRadius","color","fontFamily","fontSize","fontWeight","fontStyle","lineHeight","letterSpacing","textAlign","textDecoration","textTransform"],qt=Object.fromEntries(Y5.map(e=>[e,""]));function J5(e,t,o,a){let r={...t};for(let l of Y5){let n=e[l];n!=null&&!o.has(l)&&(r[l]=n[a]??t[l]??"")}return r}var ei=ve.forwardRef(function(t,o){let{component:a,styles:r,onStyleChange:l,onTextChange:n,onHistoryStateChange:i,onAddToChatContext:s,onOpenSourceFile:d,onMediaChange:u,showAddToChatContext:f=!0,showOpenSourceFile:p=!0,labels:c,imageSource:x}=t,w=f1(R8,c),[C,y]=ve.useState(qt),[g,k]=ve.useState(qt),[m,V]=ve.useState(()=>new Set),H=ve.useRef(C);H.current=C;let q=ve.useRef(g);q.current=g;let M=ve.useRef(m);M.current=m;let A=ve.useRef(new Map),K=ve.useRef(l);K.current=l;let U=ve.useRef(n);U.current=n;let ae=ve.useRef(u);ae.current=u;let B=ve.useRef(null);B.current||(B.current=Q5((N,J,W)=>K.current(N,J,W),(N,J)=>U.current?.(N,J),(N,J,W)=>ae.current?.(N,J,W)));let Z=B.current,S=ve.useRef(i);S.current=i;let[b,I]=ve.useState(()=>Z.getUndoCount()),L=Z.getMaxHistorySize();ve.useEffect(()=>{let N=W=>{S.current?.({canUndo:W.canUndo,canRedo:W.canRedo}),I(W.undoCount);let ne=W.type==="command-undone"||W.type==="command-redone",ie=W.command?.data?.property;if(ne&&typeof ie=="string"){let fe=typeof W.appliedValue=="string"?W.appliedValue:"";y(Ie=>({...Ie,[ie]:fe})),V(Ie=>{let s1=new Set(Ie);return s1.add(ie),s1})}},J=Z.subscribe(N);return S.current?.({canUndo:Z.canUndo(),canRedo:Z.canRedo()}),I(Z.getUndoCount()),J},[Z]);let O=b>=L,T=ve.useRef(null),F=ve.useRef(!1);ve.useEffect(()=>{O&&!F.current&&T.current?.focus(),F.current=O},[O]),ve.useImperativeHandle(o,()=>({undo:()=>Z.undo(),redo:()=>Z.redo(),clearHistory:()=>{Z.clear(),A.current.clear(),y(qt),k(qt),V(new Set),I(0)},getHistoryStack:()=>Z.getHistoryStack(),getChangeSet:()=>W5(Z.getHistoryStack()),recordTextChange:(N,J,W)=>Z.recordTextChange(N,J,W),canUndo:()=>Z.canUndo(),canRedo:()=>Z.canRedo()}),[Z]);let $=a?`${a.name}-${a.tagName??""}-${a.debugSource?.lineNumber??""}-${a.debugSource?.columnNumber??""}`:"none",v=ve.useRef("none");ve.useEffect(()=>{let N=v.current,J,W,ne;if($!==N){N!=="none"&&M.current.size>0&&A.current.set(N,{styles:H.current,computedStyles:q.current,sessionEdits:M.current}),v.current=$;let fe=A.current.get($);J=fe?fe.styles:qt,W=fe?fe.computedStyles:qt,ne=fe?fe.sessionEdits:new Set}else J=H.current,W=q.current,ne=M.current;let ie=r||{};y(J5(ie,J,ne,"inline")),k(J5(ie,W,ne,"computed")),V(ne)},[$,r]);let h=ve.useCallback((N,J)=>{l(N,J);let W=k8(H.current,N),ne=Hn(a);Z.recordStyleChange(N,W,J,ne),y(ie=>({...ie,[N]:J})),V(ie=>{let fe=new Set(ie);return fe.add(N),fe})},[l,Z,a]),_=ve.useCallback((N,J)=>{let W=a?.media;if(!W)return;let ne=a?.debugSource;u?.(W.tag,{[N]:J},ne);let ie=String(W[N]??"");Z.recordMediaChange(W.tag,N,ie,J,Hn(a))},[a,u,Z]),E=!!(a&&a.name),R=ve.useCallback(()=>{let N=Hn(a);N&&s?.(N)},[a,s]),G=E&&a&&a.tagName&&S8.has(a.tagName.toUpperCase()),re=a?.hasNonEditableText?w.general.inlineEditNonEditable:w.general.inlineEditEditable;return Ee("div",{role:"complementary","aria-label":w.general.ariaPropertyPanel,className:"property-panel-container",children:[Ee("header",{className:"property-panel-header",children:[oe("h2",{id:"design-property-panel-title",className:"property-panel-title",children:w.general.headerTitle}),E&&Ee("div",{className:"property-panel-header-actions",children:[G&&oe("span",{className:"property-panel-selected-component-action property-panel-selected-component-action-help","data-tooltip":re,"aria-label":re,children:oe(An,{width:14,height:14,style:a.hasNonEditableText?M8:void 0})}),f&&!O&&oe("button",{type:"button",className:"property-panel-selected-component-action",onClick:R,"data-tooltip":w.general.addToChatContext,"aria-label":w.general.addToChatContext,children:oe(H8,{size:14})})]})]}),Ee("div",{className:"property-panel-content","aria-labelledby":"design-property-panel-title",children:[oe(P8,{component:a,onOpenSourceFile:d,showOpenSourceFile:p,generalLabels:w.general}),O?oe(T8,{ref:T,title:w.history.changeLimitTitle,body:Se(w.history.changeLimitBody,[String(L)])}):oe(V8,{styles:C,computedStyles:g,hasSelection:E,onStyleChange:h,generalLabels:w.general,sectionLabels:w.sections,instanceLabels:w.instances,editorLabels:c?.editors,component:a,onImageAttributeChange:_,imageSource:x},$)]})]})});function _8(e,t,o){if(!e)return;b8(e).render(ve.createElement(ei,{...t,ref:o}))}export{ei as DesignPropertyPanel,_9 as REQUIRED_LABEL_KEYS,Se as interpolate,_8 as mountDesignPropertyPanel,bs as validateLabels};
1
+ var ai=Object.create;var Ga=Object.defineProperty;var ri=Object.getOwnPropertyDescriptor;var li=Object.getOwnPropertyNames;var ni=Object.getPrototypeOf,ii=Object.prototype.hasOwnProperty;var si=(e,t,o)=>t in e?Ga(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var Kt=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(o){throw t=0,o}};var di=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of li(t))!ii.call(e,r)&&r!==o&&Ga(e,r,{get:()=>t[r],enumerable:!(a=ri(t,r))||a.enumerable});return e};var Hn=(e,t,o)=>(o=e!=null?ai(ni(e)):{},di(t||!e||!e.__esModule?Ga(o,"default",{value:e,enumerable:!0}):o,e));var et=(e,t,o)=>si(e,typeof t!="symbol"?t+"":t,o);var E0=Kt(($w,O0)=>{"use strict";var _7="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";O0.exports=_7});var F0=Kt((Nw,Z0)=>{"use strict";var D7=E0();function B0(){}function A0(){}A0.resetWarningCache=B0;Z0.exports=function(){function e(a,r,l,n,i,s){if(s!==D7){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}e.isRequired=e;function t(){return e}var o={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:A0,resetWarningCache:B0};return o.PropTypes=o,o}});var N0=Kt((zw,$0)=>{$0.exports=F0()();var Uw,qw});var q0=Kt(he=>{"use strict";var yl=Symbol.for("react.element"),Ml=Symbol.for("react.portal"),ba=Symbol.for("react.fragment"),Ia=Symbol.for("react.strict_mode"),ya=Symbol.for("react.profiler"),Ma=Symbol.for("react.provider"),Sa=Symbol.for("react.context"),O7=Symbol.for("react.server_context"),Ra=Symbol.for("react.forward_ref"),ka=Symbol.for("react.suspense"),Ha=Symbol.for("react.suspense_list"),Pa=Symbol.for("react.memo"),Ta=Symbol.for("react.lazy"),E7=Symbol.for("react.offscreen"),U0;U0=Symbol.for("react.module.reference");function i1(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case yl:switch(e=e.type,e){case ba:case ya:case Ia:case ka:case Ha:return e;default:switch(e=e&&e.$$typeof,e){case O7:case Sa:case Ra:case Ta:case Pa:case Ma:return e;default:return t}}case Ml:return t}}}he.ContextConsumer=Sa;he.ContextProvider=Ma;he.Element=yl;he.ForwardRef=Ra;he.Fragment=ba;he.Lazy=Ta;he.Memo=Pa;he.Portal=Ml;he.Profiler=ya;he.StrictMode=Ia;he.Suspense=ka;he.SuspenseList=Ha;he.isAsyncMode=function(){return!1};he.isConcurrentMode=function(){return!1};he.isContextConsumer=function(e){return i1(e)===Sa};he.isContextProvider=function(e){return i1(e)===Ma};he.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===yl};he.isForwardRef=function(e){return i1(e)===Ra};he.isFragment=function(e){return i1(e)===ba};he.isLazy=function(e){return i1(e)===Ta};he.isMemo=function(e){return i1(e)===Pa};he.isPortal=function(e){return i1(e)===Ml};he.isProfiler=function(e){return i1(e)===ya};he.isStrictMode=function(e){return i1(e)===Ia};he.isSuspense=function(e){return i1(e)===ka};he.isSuspenseList=function(e){return i1(e)===Ha};he.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ba||e===ya||e===Ia||e===ka||e===Ha||e===E7||typeof e=="object"&&e!==null&&(e.$$typeof===Ta||e.$$typeof===Pa||e.$$typeof===Ma||e.$$typeof===Sa||e.$$typeof===Ra||e.$$typeof===U0||e.getModuleId!==void 0)};he.typeOf=i1});var j0=Kt((Kw,z0)=>{"use strict";z0.exports=q0()});import{forwardRef as xe,createElement as ee}from"react";function Le(e,t){if(e==null)return{};var o={},a=Object.keys(e),r,l;for(l=0;l<a.length;l++)r=a[l],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var ui=["color"],Pn=xe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Le(e,ui);return ee("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ee("path",{d:"M0 7.5C0 7.22386 0.223858 7 0.5 7H3C3.27614 7 3.5 7.22386 3.5 7.5C3.5 7.77614 3.27614 8 3 8H0.5C0.223858 8 0 7.77614 0 7.5ZM5.75 7.5C5.75 7.22386 5.97386 7 6.25 7H8.75C9.02614 7 9.25 7.22386 9.25 7.5C9.25 7.77614 9.02614 8 8.75 8H6.25C5.97386 8 5.75 7.77614 5.75 7.5ZM12 7C11.7239 7 11.5 7.22386 11.5 7.5C11.5 7.77614 11.7239 8 12 8H14.5C14.7761 8 15 7.77614 15 7.5C15 7.22386 14.7761 7 14.5 7H12Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),ci=["color"],Tn=xe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Le(e,ci);return ee("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ee("path",{d:"M1.5 6.625C1.01675 6.625 0.625 7.01675 0.625 7.5C0.625 7.98325 1.01675 8.375 1.5 8.375C1.98325 8.375 2.375 7.98325 2.375 7.5C2.375 7.01675 1.98325 6.625 1.5 6.625ZM5.5 6.625C5.01675 6.625 4.625 7.01675 4.625 7.5C4.625 7.98325 5.01675 8.375 5.5 8.375C5.98325 8.375 6.375 7.98325 6.375 7.5C6.375 7.01675 5.98325 6.625 5.5 6.625ZM9.5 6.625C9.01675 6.625 8.625 7.01675 8.625 7.5C8.625 7.98325 9.01675 8.375 9.5 8.375C9.98325 8.375 10.375 7.98325 10.375 7.5C10.375 7.01675 9.98325 6.625 9.5 6.625ZM12.625 7.5C12.625 7.01675 13.0168 6.625 13.5 6.625C13.9832 6.625 14.375 7.01675 14.375 7.5C14.375 7.98325 13.9832 8.375 13.5 8.375C13.0168 8.375 12.625 7.98325 12.625 7.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var fi=["color"],Vn=xe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Le(e,fi);return ee("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ee("path",{d:"M1.25 7.5C1.25 7.22386 1.47386 7 1.75 7H13.25C13.5261 7 13.75 7.22386 13.75 7.5C13.75 7.77614 13.5261 8 13.25 8H1.75C1.47386 8 1.25 7.77614 1.25 7.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var pi=["color"],_n=xe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Le(e,pi);return ee("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ee("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Ci=["color"],ht=xe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Le(e,Ci);return ee("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ee("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var mi=["color"],Dn=xe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Le(e,mi);return ee("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ee("path",{d:"M5.67494 3.50017C5.67494 3.25164 5.87641 3.05017 6.12494 3.05017H10.6249C10.8735 3.05017 11.0749 3.25164 11.0749 3.50017C11.0749 3.7487 10.8735 3.95017 10.6249 3.95017H9.00587L7.2309 11.05H8.87493C9.12345 11.05 9.32493 11.2515 9.32493 11.5C9.32493 11.7486 9.12345 11.95 8.87493 11.95H4.37493C4.1264 11.95 3.92493 11.7486 3.92493 11.5C3.92493 11.2515 4.1264 11.05 4.37493 11.05H5.99397L7.76894 3.95017H6.12494C5.87641 3.95017 5.67494 3.7487 5.67494 3.50017Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),hi=["color"],On=xe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Le(e,hi);return ee("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ee("path",{d:"M4.79993 3.50017C4.79993 3.25164 5.0014 3.05017 5.24993 3.05017H9.74993C9.99845 3.05017 10.1999 3.25164 10.1999 3.50017C10.1999 3.7487 9.99845 3.95017 9.74993 3.95017H8.09993V11.05H9.74994C9.99847 11.05 10.1999 11.2515 10.1999 11.5C10.1999 11.7486 9.99847 11.95 9.74994 11.95H5.24994C5.00141 11.95 4.79994 11.7486 4.79994 11.5C4.79994 11.2515 5.00141 11.05 5.24994 11.05H6.89993V3.95017H5.24993C5.0014 3.95017 4.79993 3.7487 4.79993 3.50017Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),gi=["color"],En=xe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Le(e,gi);return ee("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ee("path",{d:"M2.78233 2.21707C2.70732 2.14206 2.60557 2.09991 2.49949 2.09991C2.3934 2.09991 2.29166 2.14206 2.21664 2.21707L0.216645 4.21707C0.0604351 4.37328 0.0604351 4.62655 0.216645 4.78276C0.372855 4.93897 0.626121 4.93897 0.78233 4.78276L2.09949 3.4656L2.09949 11.5342L0.78233 10.2171C0.62612 10.0609 0.372854 10.0609 0.216645 10.2171C0.0604349 10.3733 0.0604349 10.6265 0.216645 10.7828L2.21664 12.7828C2.29166 12.8578 2.3934 12.8999 2.49949 12.8999C2.60557 12.8999 2.70731 12.8578 2.78233 12.7828L4.78233 10.7828C4.93854 10.6265 4.93854 10.3733 4.78233 10.2171C4.62612 10.0609 4.37285 10.0609 4.21664 10.2171L2.89949 11.5342L2.89949 3.4656L4.21664 4.78276C4.37285 4.93897 4.62612 4.93897 4.78233 4.78276C4.93854 4.62655 4.93854 4.37328 4.78233 4.21707L2.78233 2.21707ZM10.5 2.74997C10.7107 2.74997 10.8988 2.88211 10.9703 3.08036L13.9703 11.3999C14.064 11.6597 13.9293 11.9462 13.6696 12.0399C13.4098 12.1336 13.1233 11.9989 13.0296 11.7392L12.0477 9.016H8.95228L7.97033 11.7392C7.87666 11.9989 7.59013 12.1336 7.33036 12.0399C7.07059 11.9462 6.93595 11.6597 7.02962 11.3999L10.0296 3.08036C10.1011 2.88211 10.2892 2.74997 10.5 2.74997ZM10.5 4.72396L11.7412 8.166H9.25879L10.5 4.72396Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var vi=["color"],Bn=xe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Le(e,vi);return ee("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ee("path",{d:"M7.1813 1.68179C7.35704 1.50605 7.64196 1.50605 7.8177 1.68179L10.3177 4.18179C10.4934 4.35753 10.4934 4.64245 10.3177 4.81819C10.142 4.99392 9.85704 4.99392 9.6813 4.81819L7.9495 3.08638L7.9495 11.9136L9.6813 10.1818C9.85704 10.0061 10.142 10.0061 10.3177 10.1818C10.4934 10.3575 10.4934 10.6424 10.3177 10.8182L7.8177 13.3182C7.73331 13.4026 7.61885 13.45 7.4995 13.45C7.38015 13.45 7.26569 13.4026 7.1813 13.3182L4.6813 10.8182C4.50557 10.6424 4.50557 10.3575 4.6813 10.1818C4.85704 10.0061 5.14196 10.0061 5.3177 10.1818L7.0495 11.9136L7.0495 3.08638L5.3177 4.81819C5.14196 4.99392 4.85704 4.99392 4.6813 4.81819C4.50557 4.64245 4.50557 4.35753 4.6813 4.18179L7.1813 1.68179Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var xi=["color"],An=xe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Le(e,xi);return ee("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ee("path",{d:"M6.5 1C6.22386 1 6 1.22386 6 1.5C6 1.77614 6.22386 2 6.5 2C7.12671 2 7.45718 2.20028 7.65563 2.47812C7.8781 2.78957 8 3.28837 8 4V11C8 11.7116 7.8781 12.2104 7.65563 12.5219C7.45718 12.7997 7.12671 13 6.5 13C6.22386 13 6 13.2239 6 13.5C6 13.7761 6.22386 14 6.5 14C7.37329 14 8.04282 13.7003 8.46937 13.1031C8.47976 13.0886 8.48997 13.0739 8.5 13.0591C8.51003 13.0739 8.52024 13.0886 8.53063 13.1031C8.95718 13.7003 9.62671 14 10.5 14C10.7761 14 11 13.7761 11 13.5C11 13.2239 10.7761 13 10.5 13C9.87329 13 9.54282 12.7997 9.34437 12.5219C9.1219 12.2104 9 11.7116 9 11V4C9 3.28837 9.1219 2.78957 9.34437 2.47812C9.54282 2.20028 9.87329 2 10.5 2C10.7761 2 11 1.77614 11 1.5C11 1.22386 10.7761 1 10.5 1C9.62671 1 8.95718 1.29972 8.53063 1.89688C8.52024 1.91143 8.51003 1.92611 8.5 1.9409C8.48997 1.92611 8.47976 1.91143 8.46937 1.89688C8.04282 1.29972 7.37329 1 6.5 1ZM14 5H11V4H14C14.5523 4 15 4.44772 15 5V10C15 10.5523 14.5523 11 14 11H11V10H14V5ZM6 4V5H1L1 10H6V11H1C0.447715 11 0 10.5523 0 10V5C0 4.44772 0.447715 4 1 4H6Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Li=["color"],Zn=xe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Le(e,Li);return ee("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ee("path",{d:"M3.68979 2.75C3.89667 2.74979 4.08232 2.87701 4.15679 3.07003L7.36662 11.39C7.46602 11.6477 7.33774 11.9371 7.0801 12.0365C6.82247 12.1359 6.53304 12.0076 6.43365 11.75L5.3825 9.02537H2.01133L0.966992 11.749C0.868128 12.0068 0.578964 12.1357 0.321126 12.0369C0.0632878 11.938 -0.0655864 11.6488 0.0332774 11.391L3.22344 3.07099C3.29751 2.87782 3.4829 2.75021 3.68979 2.75ZM3.69174 4.64284L5.05458 8.17537H2.33724L3.69174 4.64284ZM10.8989 5.20703C9.25818 5.20703 8.00915 6.68569 8.00915 8.60972C8.00915 10.6337 9.35818 12.0124 10.8989 12.0124C11.7214 12.0124 12.5744 11.6692 13.1543 11.0219V11.53C13.1543 11.7785 13.3557 11.98 13.6043 11.98C13.8528 11.98 14.0543 11.7785 14.0543 11.53V5.72C14.0543 5.47147 13.8528 5.27 13.6043 5.27C13.3557 5.27 13.1543 5.47147 13.1543 5.72V6.22317C12.6054 5.60095 11.7924 5.20703 10.8989 5.20703ZM13.1543 9.79823V7.30195C12.7639 6.58101 11.9414 6.05757 11.0868 6.05757C10.1088 6.05757 9.03503 6.96581 9.03503 8.60955C9.03503 10.1533 10.0088 11.1615 11.0868 11.1615C11.9701 11.1615 12.7719 10.4952 13.1543 9.79823Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),wi=["color"],Fn=xe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Le(e,wi);return ee("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ee("path",{d:"M3.69899 5.20703C2.05823 5.20703 0.809204 6.68569 0.809204 8.60972C0.809204 10.6337 2.15823 12.0124 3.69899 12.0124C4.52126 12.0124 5.37402 11.6693 5.9539 11.0223V11.53C5.9539 11.7785 6.15537 11.98 6.4039 11.98C6.65243 11.98 6.8539 11.7785 6.8539 11.53V5.72001C6.8539 5.47149 6.65243 5.27001 6.4039 5.27001C6.15537 5.27001 5.9539 5.47149 5.9539 5.72001V6.22269C5.40506 5.60075 4.59218 5.20703 3.69899 5.20703ZM5.9539 9.799V7.30117C5.56339 6.58064 4.74118 6.05757 3.8868 6.05757C2.9089 6.05757 1.83508 6.96581 1.83508 8.60955C1.83508 10.1533 2.80889 11.1615 3.8868 11.1615C4.76984 11.1615 5.57141 10.4957 5.9539 9.799ZM10.799 5.20703C9.15823 5.20703 7.9092 6.68569 7.9092 8.60972C7.9092 10.6337 9.25823 12.0124 10.799 12.0124C11.6215 12.0124 12.4744 11.6692 13.0543 11.0218V11.53C13.0543 11.7785 13.2558 11.98 13.5043 11.98C13.7529 11.98 13.9543 11.7785 13.9543 11.53V5.72C13.9543 5.47147 13.7529 5.27 13.5043 5.27C13.2558 5.27 13.0543 5.47147 13.0543 5.72V6.22318C12.5055 5.60095 11.6924 5.20703 10.799 5.20703ZM13.0543 9.79822V7.30196C12.664 6.58102 11.8415 6.05757 10.9868 6.05757C10.0089 6.05757 8.93508 6.96581 8.93508 8.60955C8.93508 10.1533 9.90889 11.1615 10.9868 11.1615C11.8702 11.1615 12.672 10.4952 13.0543 9.79822Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var bi=["color"],$n=xe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Le(e,bi);return ee("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ee("path",{d:"M3.6255 2.75C3.83478 2.75 4.02192 2.88034 4.09448 3.07664L7.16985 11.3962C7.2656 11.6552 7.13324 11.9428 6.87423 12.0386C6.61522 12.1343 6.32763 12.002 6.23188 11.7429L5.22387 9.01603H2.02712L1.01911 11.7429C0.923362 12.002 0.635774 12.1343 0.376762 12.0386C0.117749 11.9428 -0.0146052 11.6552 0.0811401 11.3962L3.15651 3.07664C3.22908 2.88034 3.41621 2.75 3.6255 2.75ZM3.6255 4.69207L4.90966 8.16603H2.34133L3.6255 4.69207ZM11.3719 2.75C11.5811 2.75 11.7683 2.88034 11.8408 3.07664L14.9162 11.3962C15.012 11.6552 14.8796 11.9428 14.6206 12.0386C14.3616 12.1343 14.074 12.002 13.9782 11.7429L12.9702 9.01603H9.77348L8.76547 11.7429C8.66972 12.002 8.38213 12.1343 8.12312 12.0386C7.86411 11.9428 7.73175 11.6552 7.8275 11.3962L10.9029 3.07664C10.9754 2.88034 11.1626 2.75 11.3719 2.75ZM11.3719 4.69207L12.656 8.16603H10.0877L11.3719 4.69207Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),Ii=["color"],Nn=xe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Le(e,Ii);return ee("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ee("path",{d:"M4.55293 0.999969C4.75295 0.999969 4.93372 1.11917 5.0125 1.30301L8.01106 8.29982C8.11984 8.55363 8.00226 8.84757 7.74844 8.95635C7.49463 9.06512 7.20069 8.94754 7.09191 8.69373L6.11613 6.41685H2.98973L2.01395 8.69373C1.90517 8.94754 1.61123 9.06512 1.35742 8.95635C1.1036 8.84757 0.986023 8.55363 1.0948 8.29982L4.09336 1.30301C4.17214 1.11917 4.35291 0.999969 4.55293 0.999969ZM4.55293 2.76929L5.75186 5.56685H3.354L4.55293 2.76929ZM11.0562 9.00214C11.2617 9.00214 11.4463 8.87633 11.5215 8.68502L14.2733 1.68299C14.3743 1.42598 14.2478 1.13575 13.9908 1.03475C13.7338 0.933747 13.4436 1.06021 13.3426 1.31722L11.0562 7.13514L8.76973 1.31722C8.66873 1.06021 8.3785 0.933747 8.1215 1.03475C7.86449 1.13575 7.73802 1.42598 7.83902 1.68299L10.5908 8.68502C10.666 8.87633 10.8506 9.00214 11.0562 9.00214ZM14.9537 12.4999C14.9537 12.606 14.9115 12.7077 14.8365 12.7828L12.8365 14.7828C12.6803 14.939 12.4271 14.939 12.2708 14.7828C12.1146 14.6265 12.1146 14.3733 12.2708 14.2171L13.588 12.8999H1.51937L2.83653 14.2171C2.99274 14.3733 2.99274 14.6265 2.83653 14.7828C2.68032 14.939 2.42705 14.939 2.27084 14.7828L0.270843 12.7828C0.195828 12.7077 0.153687 12.606 0.153687 12.4999C0.153687 12.3938 0.195828 12.2921 0.270843 12.2171L2.27084 10.2171C2.42705 10.0609 2.68032 10.0609 2.83653 10.2171C2.99274 10.3733 2.99274 10.6265 2.83653 10.7828L1.51937 12.0999L13.588 12.0999L12.2708 10.7828C12.1146 10.6265 12.1146 10.3733 12.2708 10.2171C12.4271 10.0609 12.6803 10.0609 12.8365 10.2171L14.8365 12.2171C14.9115 12.2921 14.9537 12.3938 14.9537 12.4999Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var yi=["color"],Un=xe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Le(e,yi);return ee("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ee("path",{d:"M3.78233 2.21713C3.70732 2.14212 3.60557 2.09998 3.49949 2.09998C3.3934 2.09998 3.29166 2.14212 3.21664 2.21713L1.21664 4.21713C1.06044 4.37334 1.06044 4.62661 1.21664 4.78282C1.37285 4.93903 1.62612 4.93903 1.78233 4.78282L3.09949 3.46566L3.09949 11.5343L1.78233 10.2171C1.62612 10.0609 1.37285 10.0609 1.21664 10.2171C1.06043 10.3733 1.06043 10.6266 1.21664 10.7828L3.21664 12.7828C3.29166 12.8578 3.3934 12.9 3.49949 12.9C3.60557 12.9 3.70731 12.8578 3.78233 12.7828L5.78233 10.7828C5.93854 10.6266 5.93854 10.3733 5.78233 10.2171C5.62612 10.0609 5.37285 10.0609 5.21664 10.2171L3.89949 11.5343L3.89949 3.46566L5.21664 4.78282C5.37285 4.93903 5.62612 4.93903 5.78233 4.78282C5.93854 4.62661 5.93854 4.37334 5.78233 4.21713L3.78233 2.21713ZM8.49998 3.99997C8.22383 3.99997 7.99998 4.22382 7.99998 4.49997C7.99998 4.77611 8.22383 4.99997 8.49998 4.99997H14.5C14.7761 4.99997 15 4.77611 15 4.49997C15 4.22382 14.7761 3.99997 14.5 3.99997H8.49998ZM7.99998 7.49997C7.99998 7.22382 8.22383 6.99997 8.49998 6.99997H14.5C14.7761 6.99997 15 7.22382 15 7.49997C15 7.77611 14.7761 7.99997 14.5 7.99997H8.49998C8.22383 7.99997 7.99998 7.77611 7.99998 7.49997ZM8.49998 9.99997C8.22383 9.99997 7.99998 10.2238 7.99998 10.5C7.99998 10.7761 8.22383 11 8.49998 11H14.5C14.7761 11 15 10.7761 15 10.5C15 10.2238 14.7761 9.99997 14.5 9.99997H8.49998Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),Mi=["color"],qn=xe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Le(e,Mi);return ee("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ee("path",{d:"M4.62471 4.00001L4.56402 4.00001C4.04134 3.99993 3.70687 3.99988 3.4182 4.055C2.2379 4.28039 1.29846 5.17053 1.05815 6.33035C0.999538 6.61321 0.999604 6.93998 0.999703 7.43689L0.999711 7.50001L0.999703 7.56313C0.999604 8.06004 0.999538 8.38681 1.05815 8.66967C1.29846 9.8295 2.2379 10.7196 3.4182 10.945C3.70688 11.0001 4.04135 11.0001 4.56403 11L4.62471 11H5.49971C5.77585 11 5.99971 10.7762 5.99971 10.5C5.99971 10.2239 5.77585 10 5.49971 10H4.62471C4.02084 10 3.78907 9.99777 3.60577 9.96277C2.80262 9.8094 2.19157 9.21108 2.03735 8.46678C2.00233 8.29778 1.99971 8.08251 1.99971 7.50001C1.99971 6.91752 2.00233 6.70225 2.03735 6.53324C2.19157 5.78895 2.80262 5.19062 3.60577 5.03725C3.78907 5.00225 4.02084 5.00001 4.62471 5.00001H5.49971C5.77585 5.00001 5.99971 4.77615 5.99971 4.50001C5.99971 4.22387 5.77585 4.00001 5.49971 4.00001H4.62471ZM10.3747 5.00001C10.9786 5.00001 11.2104 5.00225 11.3937 5.03725C12.1968 5.19062 12.8079 5.78895 12.9621 6.53324C12.9971 6.70225 12.9997 6.91752 12.9997 7.50001C12.9997 8.08251 12.9971 8.29778 12.9621 8.46678C12.8079 9.21108 12.1968 9.8094 11.3937 9.96277C11.2104 9.99777 10.9786 10 10.3747 10H9.49971C9.22357 10 8.99971 10.2239 8.99971 10.5C8.99971 10.7762 9.22357 11 9.49971 11H10.3747L10.4354 11C10.9581 11.0001 11.2925 11.0001 11.5812 10.945C12.7615 10.7196 13.701 9.8295 13.9413 8.66967C13.9999 8.38681 13.9998 8.06005 13.9997 7.56314L13.9997 7.50001L13.9997 7.43688C13.9998 6.93998 13.9999 6.61321 13.9413 6.33035C13.701 5.17053 12.7615 4.28039 11.5812 4.055C11.2925 3.99988 10.9581 3.99993 10.4354 4.00001L10.3747 4.00001H9.49971C9.22357 4.00001 8.99971 4.22387 8.99971 4.50001C8.99971 4.77615 9.22357 5.00001 9.49971 5.00001H10.3747ZM5.00038 7C4.72424 7 4.50038 7.22386 4.50038 7.5C4.50038 7.77614 4.72424 8 5.00038 8H10.0004C10.2765 8 10.5004 7.77614 10.5004 7.5C10.5004 7.22386 10.2765 7 10.0004 7H5.00038Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Si=["color"],zn=xe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Le(e,Si);return ee("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ee("path",{d:"M4.56427 3.99988C4.58422 3.99989 4.60445 3.99989 4.62496 3.99989H5.49996C5.7761 3.99989 5.99996 4.22375 5.99996 4.49989C5.99996 4.77603 5.7761 4.99989 5.49996 4.99989H4.62496C4.02108 4.99989 3.78932 5.00213 3.60601 5.03713C2.80287 5.1905 2.19181 5.78883 2.03759 6.53312C2.00257 6.70212 1.99996 6.91739 1.99996 7.49989C1.99996 8.08239 2.00257 8.29766 2.03759 8.46666C2.19181 9.21095 2.80287 9.80928 3.60601 9.96265C3.78932 9.99765 4.02108 9.99989 4.62496 9.99989H5.49996C5.7761 9.99989 5.99996 10.2237 5.99996 10.4999C5.99996 10.776 5.7761 10.9999 5.49996 10.9999H4.62496C4.60445 10.9999 4.58422 10.9999 4.56427 10.9999C4.04159 11 3.70712 11 3.41845 10.9449C2.23814 10.7195 1.29871 9.82937 1.05839 8.66955C0.999782 8.38669 0.999848 8.05992 0.999947 7.56301C0.999951 7.54227 0.999955 7.52123 0.999955 7.49989C0.999955 7.47855 0.999951 7.45751 0.999947 7.43677C0.999848 6.93986 0.999782 6.61309 1.05839 6.33023C1.29871 5.17041 2.23814 4.28027 3.41845 4.05488C3.70712 3.99976 4.04159 3.99981 4.56427 3.99988ZM11.3939 5.03713C11.2106 5.00213 10.9788 4.99989 10.375 4.99989H9.49996C9.22381 4.99989 8.99996 4.77603 8.99996 4.49989C8.99996 4.22375 9.22381 3.99989 9.49996 3.99989H10.375C10.3955 3.99989 10.4157 3.99989 10.4356 3.99988C10.9583 3.99981 11.2928 3.99976 11.5815 4.05488C12.7618 4.28027 13.7012 5.17041 13.9415 6.33023C14.0001 6.61309 14.0001 6.93985 14 7.43676C14 7.4575 14 7.47854 14 7.49989C14 7.52124 14 7.54228 14 7.56302C14.0001 8.05992 14.0001 8.38669 13.9415 8.66955C13.7012 9.82937 12.7618 10.7195 11.5815 10.9449C11.2928 11 10.9583 11 10.4356 10.9999C10.4157 10.9999 10.3955 10.9999 10.375 10.9999H9.49996C9.22381 10.9999 8.99996 10.776 8.99996 10.4999C8.99996 10.2237 9.22381 9.99989 9.49996 9.99989H10.375C10.9788 9.99989 11.2106 9.99765 11.3939 9.96265C12.197 9.80928 12.8081 9.21095 12.9623 8.46666C12.9973 8.29766 13 8.08239 13 7.49989C13 6.91739 12.9973 6.70212 12.9623 6.53312C12.8081 5.78883 12.197 5.1905 11.3939 5.03713Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Ri=["color"],jn=xe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Le(e,Ri);return ee("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ee("path",{d:"M5.00003 3.25C5.00003 2.97386 4.77617 2.75 4.50003 2.75C4.22389 2.75 4.00003 2.97386 4.00003 3.25V7.10003H2.49998C2.27906 7.10003 2.09998 7.27912 2.09998 7.50003C2.09998 7.72094 2.27906 7.90003 2.49998 7.90003H4.00003V8.55C4.00003 10.483 5.56703 12.05 7.50003 12.05C9.43303 12.05 11 10.483 11 8.55V7.90003H12.5C12.7209 7.90003 12.9 7.72094 12.9 7.50003C12.9 7.27912 12.7209 7.10003 12.5 7.10003H11V3.25C11 2.97386 10.7762 2.75 10.5 2.75C10.2239 2.75 10 2.97386 10 3.25V7.10003H5.00003V3.25ZM5.00003 7.90003V8.55C5.00003 9.93071 6.11932 11.05 7.50003 11.05C8.88074 11.05 10 9.93071 10 8.55V7.90003H5.00003Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var ki=["color"],Kn=xe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Le(e,ki);return ee("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ee("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM4 7.5C4 7.22386 4.22386 7 4.5 7H10.5C10.7761 7 11 7.22386 11 7.5C11 7.77614 10.7761 8 10.5 8H4.5C4.22386 8 4 7.77614 4 7.5ZM3 10.5C3 10.2239 3.22386 10 3.5 10H11.5C11.7761 10 12 10.2239 12 10.5C12 10.7761 11.7761 11 11.5 11H3.5C3.22386 11 3 10.7761 3 10.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),Hi=["color"],Gn=xe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Le(e,Hi);return ee("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ee("path",{d:"M2.5 4C2.22386 4 2 4.22386 2 4.5C2 4.77614 2.22386 5 2.5 5H12.5C12.7761 5 13 4.77614 13 4.5C13 4.22386 12.7761 4 12.5 4H2.5ZM2 7.5C2 7.22386 2.22386 7 2.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H2.5C2.22386 8 2 7.77614 2 7.5ZM2 10.5C2 10.2239 2.22386 10 2.5 10H12.5C12.7761 10 13 10.2239 13 10.5C13 10.7761 12.7761 11 12.5 11H2.5C2.22386 11 2 10.7761 2 10.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),Pi=["color"],Wn=xe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Le(e,Pi);return ee("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ee("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM2 7.5C2 7.22386 2.22386 7 2.5 7H7.5C7.77614 7 8 7.22386 8 7.5C8 7.77614 7.77614 8 7.5 8H2.5C2.22386 8 2 7.77614 2 7.5ZM2 10.5C2 10.2239 2.22386 10 2.5 10H10.5C10.7761 10 11 10.2239 11 10.5C11 10.7761 10.7761 11 10.5 11H2.5C2.22386 11 2 10.7761 2 10.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Ti=["color"],Xn=xe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Le(e,Ti);return ee("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ee("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM7 7.5C7 7.22386 7.22386 7 7.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H7.5C7.22386 8 7 7.77614 7 7.5ZM4 10.5C4 10.2239 4.22386 10 4.5 10H12.5C12.7761 10 13 10.2239 13 10.5C13 10.7761 12.7761 11 12.5 11H4.5C4.22386 11 4 10.7761 4 10.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Vi=["color"],Qn=xe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Le(e,Vi);return ee("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ee("path",{d:"M4 6H11L7.5 10.5L4 6Z",fill:a}))});var _i=["color"],Jn=xe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Le(e,_i);return ee("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ee("path",{d:"M4 9H11L7.5 4.5L4 9Z",fill:a}))});var Di=["color"],Yn=xe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Le(e,Di);return ee("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ee("path",{d:"M5.00001 2.75C5.00001 2.47386 4.77615 2.25 4.50001 2.25C4.22387 2.25 4.00001 2.47386 4.00001 2.75V8.05C4.00001 9.983 5.56702 11.55 7.50001 11.55C9.43301 11.55 11 9.983 11 8.05V2.75C11 2.47386 10.7762 2.25 10.5 2.25C10.2239 2.25 10 2.47386 10 2.75V8.05C10 9.43071 8.88072 10.55 7.50001 10.55C6.1193 10.55 5.00001 9.43071 5.00001 8.05V2.75ZM3.49998 13.1001C3.27906 13.1001 3.09998 13.2791 3.09998 13.5001C3.09998 13.721 3.27906 13.9001 3.49998 13.9001H11.5C11.7209 13.9001 11.9 13.721 11.9 13.5001C11.9 13.2791 11.7209 13.1001 11.5 13.1001H3.49998Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Oi=["color"],e9=xe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Le(e,Oi);return ee("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ee("path",{d:"M4.81812 4.68161C4.99386 4.85734 4.99386 5.14227 4.81812 5.318L3.08632 7.0498H11.9135L10.1817 5.318C10.006 5.14227 10.006 4.85734 10.1817 4.68161C10.3575 4.50587 10.6424 4.50587 10.8181 4.68161L13.3181 7.18161C13.4939 7.35734 13.4939 7.64227 13.3181 7.818L10.8181 10.318C10.6424 10.4937 10.3575 10.4937 10.1817 10.318C10.006 10.1423 10.006 9.85734 10.1817 9.68161L11.9135 7.9498H3.08632L4.81812 9.68161C4.99386 9.85734 4.99386 10.1423 4.81812 10.318C4.64239 10.4937 4.35746 10.4937 4.18173 10.318L1.68173 7.818C1.50599 7.64227 1.50599 7.35734 1.68173 7.18161L4.18173 4.68161C4.35746 4.50587 4.64239 4.50587 4.81812 4.68161Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});import we from"react";import{createRoot as R8}from"react-dom/client";import t9 from"react";import{jsx as Wa,jsxs as o9}from"react/jsx-runtime";function tt({title:e,defaultOpen:t=!0,children:o}){let[a,r]=t9.useState(t),l=t9.useCallback(n=>{r(n.currentTarget.open)},[]);return o9("details",{className:"property-panel-section",open:a,onToggle:l,children:[o9("summary",{className:"property-panel-section-trigger",children:[Wa("span",{children:e}),Wa(_n,{className:"property-panel-section-chevron",width:12,height:12,"aria-hidden":"true"})]}),Wa("div",{className:"property-panel-section-content",children:o})]})}var a9=["H1","H2","H3","H4","H5","H6","P","SPAN","A","BUTTON","LABEL"];import c1 from"react";import*as k1 from"react";import{jsx as Ei}from"react/jsx-runtime";function gt(e,t=[]){let o=[];function a(l,n){let i=k1.createContext(n),s=o.length;o=[...o,n];let d=f=>{let{scope:C,children:c,...m}=f,L=C?.[e]?.[s]||i,p=k1.useMemo(()=>m,Object.values(m));return Ei(L.Provider,{value:p,children:c})};d.displayName=l+"Provider";function u(f,C){let c=C?.[e]?.[s]||i,m=k1.useContext(c);if(m)return m;if(n!==void 0)return n;throw new Error(`\`${f}\` must be used within \`${l}\``)}return[d,u]}let r=()=>{let l=o.map(n=>k1.createContext(n));return function(i){let s=i?.[e]||l;return k1.useMemo(()=>({[`__scope${e}`]:{...i,[e]:s}}),[i,s])}};return r.scopeName=e,[a,Bi(r,...t)]}function Bi(...e){let t=e[0];if(e.length===1)return t;let o=()=>{let a=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(l){let n=a.reduce((i,{useScope:s,scopeName:d})=>{let f=s(l)[`__scope${d}`];return{...i,...f}},{});return k1.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])}};return o.scopeName=t.scopeName,o}import*as i9 from"react";import*as Ui from"react-dom";import*as He from"react";import*as l9 from"react";function r9(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Xa(...e){return t=>{let o=!1,a=e.map(r=>{let l=r9(r,t);return!o&&typeof l=="function"&&(o=!0),l});if(o)return()=>{for(let r=0;r<a.length;r++){let l=a[r];typeof l=="function"?l():r9(e[r],null)}}}}function Gt(...e){return l9.useCallback(Xa(...e),e)}import{Fragment as rc,jsx as n9}from"react/jsx-runtime";function Wt(e){let t=Ai(e),o=He.forwardRef((a,r)=>{let{children:l,...n}=a,i=He.Children.toArray(l),s=i.find(Fi);if(s){let d=s.props.children,u=i.map(f=>f===s?He.Children.count(d)>1?He.Children.only(null):He.isValidElement(d)?d.props.children:null:f);return n9(t,{...n,ref:r,children:He.isValidElement(d)?He.cloneElement(d,void 0,u):null})}return n9(t,{...n,ref:r,children:l})});return o.displayName=`${e}.Slot`,o}function Ai(e){let t=He.forwardRef((o,a)=>{let{children:r,...l}=o;if(He.isValidElement(r)){let n=Ni(r),i=$i(l,r.props);return r.type!==He.Fragment&&(i.ref=a?Xa(a,n):n),He.cloneElement(r,i)}return He.Children.count(r)>1?He.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Zi=Symbol("radix.slottable");function Fi(e){return He.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Zi}function $i(e,t){let o={...t};for(let a in t){let r=e[a],l=t[a];/^on[A-Z]/.test(a)?r&&l?o[a]=(...i)=>{let s=l(...i);return r(...i),s}:r&&(o[a]=r):a==="style"?o[a]={...r,...l}:a==="className"&&(o[a]=[r,l].filter(Boolean).join(" "))}return{...e,...o}}function Ni(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}import{jsx as qi}from"react/jsx-runtime";var zi=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],E1=zi.reduce((e,t)=>{let o=Wt(`Primitive.${t}`),a=i9.forwardRef((r,l)=>{let{asChild:n,...i}=r,s=n?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),qi(s,{...i,ref:l})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});import*as Ve from"react";var dc=!!(typeof window<"u"&&window.document&&window.document.createElement);function H1(e,t,{checkForDefaultPrevented:o=!0}={}){return function(r){if(e?.(r),o===!1||!r.defaultPrevented)return t?.(r)}}import ot from"react";import{jsx as Qa}from"react/jsx-runtime";import Lc from"react";import{jsx as bc}from"react/jsx-runtime";function s9(e){let t=e+"CollectionProvider",[o,a]=gt(t),[r,l]=o(t,{collectionRef:{current:null},itemMap:new Map}),n=L=>{let{scope:p,children:I}=L,h=ot.useRef(null),V=ot.useRef(new Map).current;return Qa(r,{scope:p,itemMap:V,collectionRef:h,children:I})};n.displayName=t;let i=e+"CollectionSlot",s=Wt(i),d=ot.forwardRef((L,p)=>{let{scope:I,children:h}=L,V=l(i,I),g=Gt(p,V.collectionRef);return Qa(s,{ref:g,children:h})});d.displayName=i;let u=e+"CollectionItemSlot",f="data-radix-collection-item",C=Wt(u),c=ot.forwardRef((L,p)=>{let{scope:I,children:h,...V}=L,g=ot.useRef(null),S=Gt(p,g),R=l(u,I);return ot.useEffect(()=>(R.itemMap.set(g,{ref:g,...V}),()=>{R.itemMap.delete(g)})),Qa(C,{[f]:"",ref:S,children:h})});c.displayName=u;function m(L){let p=l(e+"CollectionConsumer",L);return ot.useCallback(()=>{let h=p.collectionRef.current;if(!h)return[];let V=Array.from(h.querySelectorAll(`[${f}]`));return Array.from(p.itemMap.values()).sort((R,G)=>V.indexOf(R.ref.current)-V.indexOf(G.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:n,Slot:d,ItemSlot:c},m,a]}import*as Ja from"react";import*as d9 from"react";var Ho=globalThis?.document?d9.useLayoutEffect:()=>{};var ji=Ja[" useId ".trim().toString()]||(()=>{}),Ki=0;function u9(e){let[t,o]=Ja.useState(ji());return Ho(()=>{e||o(a=>a??String(Ki++))},[e]),e||(t?`radix-${t}`:"")}import*as vt from"react";function c9(e){let t=vt.useRef(e);return vt.useEffect(()=>{t.current=e}),vt.useMemo(()=>(...o)=>t.current?.(...o),[])}import*as t1 from"react";import*as Po from"react";var Gi=t1[" useInsertionEffect ".trim().toString()]||Ho;function at({prop:e,defaultProp:t,onChange:o=()=>{},caller:a}){let[r,l,n]=Wi({defaultProp:t,onChange:o}),i=e!==void 0,s=i?e:r;{let u=t1.useRef(e!==void 0);t1.useEffect(()=>{let f=u.current;f!==i&&console.warn(`${a} is changing from ${f?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=i},[i,a])}let d=t1.useCallback(u=>{if(i){let f=Xi(u)?u(e):u;f!==e&&n.current?.(f)}else l(u)},[i,e,l,n]);return[s,d]}function Wi({defaultProp:e,onChange:t}){let[o,a]=t1.useState(e),r=t1.useRef(o),l=t1.useRef(t);return Gi(()=>{l.current=t},[t]),t1.useEffect(()=>{r.current!==o&&(l.current?.(o),r.current=o)},[o,r]),[o,a,l]}function Xi(e){return typeof e=="function"}import*as To from"react";import{jsx as Vc}from"react/jsx-runtime";var Qi=To.createContext(void 0);function Vo(e){let t=To.useContext(Qi);return e||t||"ltr"}import{jsx as rt}from"react/jsx-runtime";var Ya="rovingFocusGroup.onEntryFocus",Ji={bubbles:!1,cancelable:!0},Xt="RovingFocusGroup",[er,f9,Yi]=s9(Xt),[es,tr]=gt(Xt,[Yi]),[ts,os]=es(Xt),p9=Ve.forwardRef((e,t)=>rt(er.Provider,{scope:e.__scopeRovingFocusGroup,children:rt(er.Slot,{scope:e.__scopeRovingFocusGroup,children:rt(as,{...e,ref:t})})}));p9.displayName=Xt;var as=Ve.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:o,orientation:a,loop:r=!1,dir:l,currentTabStopId:n,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:s,onEntryFocus:d,preventScrollOnEntryFocus:u=!1,...f}=e,C=Ve.useRef(null),c=Gt(t,C),m=Vo(l),[L,p]=at({prop:n,defaultProp:i??null,onChange:s,caller:Xt}),[I,h]=Ve.useState(!1),V=c9(d),g=f9(o),S=Ve.useRef(!1),[R,G]=Ve.useState(0);return Ve.useEffect(()=>{let y=C.current;if(y)return y.addEventListener(Ya,V),()=>y.removeEventListener(Ya,V)},[V]),rt(ts,{scope:o,orientation:a,dir:m,loop:r,currentTabStopId:L,onItemFocus:Ve.useCallback(y=>p(y),[p]),onItemShiftTab:Ve.useCallback(()=>h(!0),[]),onFocusableItemAdd:Ve.useCallback(()=>G(y=>y+1),[]),onFocusableItemRemove:Ve.useCallback(()=>G(y=>y-1),[]),children:rt(E1.div,{tabIndex:I||R===0?-1:0,"data-orientation":a,...f,ref:c,style:{outline:"none",...e.style},onMouseDown:H1(e.onMouseDown,()=>{S.current=!0}),onFocus:H1(e.onFocus,y=>{let D=!S.current;if(y.target===y.currentTarget&&D&&!I){let X=new CustomEvent(Ya,Ji);if(y.currentTarget.dispatchEvent(X),!X.defaultPrevented){let Q=g().filter(w=>w.focusable),J=Q.find(w=>w.active),Z=Q.find(w=>w.id===L),M=[J,Z,...Q].filter(Boolean).map(w=>w.ref.current);h9(M,u)}}S.current=!1}),onBlur:H1(e.onBlur,()=>h(!1))})})}),C9="RovingFocusGroupItem",m9=Ve.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:o,focusable:a=!0,active:r=!1,tabStopId:l,children:n,...i}=e,s=u9(),d=l||s,u=os(C9,o),f=u.currentTabStopId===d,C=f9(o),{onFocusableItemAdd:c,onFocusableItemRemove:m,currentTabStopId:L}=u;return Ve.useEffect(()=>{if(a)return c(),()=>m()},[a,c,m]),rt(er.ItemSlot,{scope:o,id:d,focusable:a,active:r,children:rt(E1.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...i,ref:t,onMouseDown:H1(e.onMouseDown,p=>{a?u.onItemFocus(d):p.preventDefault()}),onFocus:H1(e.onFocus,()=>u.onItemFocus(d)),onKeyDown:H1(e.onKeyDown,p=>{if(p.key==="Tab"&&p.shiftKey){u.onItemShiftTab();return}if(p.target!==p.currentTarget)return;let I=ns(p,u.orientation,u.dir);if(I!==void 0){if(p.metaKey||p.ctrlKey||p.altKey||p.shiftKey)return;p.preventDefault();let V=C().filter(g=>g.focusable).map(g=>g.ref.current);if(I==="last")V.reverse();else if(I==="prev"||I==="next"){I==="prev"&&V.reverse();let g=V.indexOf(p.currentTarget);V=u.loop?is(V,g+1):V.slice(g+1)}setTimeout(()=>h9(V))}}),children:typeof n=="function"?n({isCurrentTabStop:f,hasTabStop:L!=null}):n})})});m9.displayName=C9;var rs={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ls(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function ns(e,t,o){let a=ls(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return rs[a]}function h9(e,t=!1){let o=document.activeElement;for(let a of e)if(a===o||(a.focus({preventScroll:t}),document.activeElement!==o))return}function is(e,t){return e.map((o,a)=>e[(t+a)%e.length])}var g9=p9,v9=m9;import*as x9 from"react";import{jsx as ds}from"react/jsx-runtime";var L9="Toggle",or=x9.forwardRef((e,t)=>{let{pressed:o,defaultPressed:a,onPressedChange:r,...l}=e,[n,i]=at({prop:o,onChange:r,defaultProp:a??!1,caller:L9});return ds(E1.button,{type:"button","aria-pressed":n,"data-state":n?"on":"off","data-disabled":e.disabled?"":void 0,...l,ref:t,onClick:H1(e.onClick,()=>{e.disabled||i(!n)})})});or.displayName=L9;import{jsx as qe}from"react/jsx-runtime";var B1="ToggleGroup",[b9,af]=gt(B1,[tr]),I9=tr(),ar=c1.forwardRef((e,t)=>{let{type:o,...a}=e;if(o==="single")return qe(us,{...a,ref:t});if(o==="multiple")return qe(cs,{...a,ref:t});throw new Error(`Missing prop \`type\` expected on \`${B1}\``)});ar.displayName=B1;var[y9,M9]=b9(B1),us=c1.forwardRef((e,t)=>{let{value:o,defaultValue:a,onValueChange:r=()=>{},...l}=e,[n,i]=at({prop:o,defaultProp:a??"",onChange:r,caller:B1});return qe(y9,{scope:e.__scopeToggleGroup,type:"single",value:c1.useMemo(()=>n?[n]:[],[n]),onItemActivate:i,onItemDeactivate:c1.useCallback(()=>i(""),[i]),children:qe(S9,{...l,ref:t})})}),cs=c1.forwardRef((e,t)=>{let{value:o,defaultValue:a,onValueChange:r=()=>{},...l}=e,[n,i]=at({prop:o,defaultProp:a??[],onChange:r,caller:B1}),s=c1.useCallback(u=>i((f=[])=>[...f,u]),[i]),d=c1.useCallback(u=>i((f=[])=>f.filter(C=>C!==u)),[i]);return qe(y9,{scope:e.__scopeToggleGroup,type:"multiple",value:n,onItemActivate:s,onItemDeactivate:d,children:qe(S9,{...l,ref:t})})});ar.displayName=B1;var[fs,ps]=b9(B1),S9=c1.forwardRef((e,t)=>{let{__scopeToggleGroup:o,disabled:a=!1,rovingFocus:r=!0,orientation:l,dir:n,loop:i=!0,...s}=e,d=I9(o),u=Vo(n),f={role:"group",dir:u,...s};return qe(fs,{scope:o,rovingFocus:r,disabled:a,children:r?qe(g9,{asChild:!0,...d,orientation:l,dir:u,loop:i,children:qe(E1.div,{...f,ref:t})}):qe(E1.div,{...f,ref:t})})}),_o="ToggleGroupItem",R9=c1.forwardRef((e,t)=>{let o=M9(_o,e.__scopeToggleGroup),a=ps(_o,e.__scopeToggleGroup),r=I9(e.__scopeToggleGroup),l=o.value.includes(e.value),n=a.disabled||e.disabled,i={...e,pressed:l,disabled:n},s=c1.useRef(null);return a.rovingFocus?qe(v9,{asChild:!0,...r,focusable:!n,active:l,ref:s,children:qe(w9,{...i,ref:t})}):qe(w9,{...i,ref:t})});R9.displayName=_o;var w9=c1.forwardRef((e,t)=>{let{__scopeToggleGroup:o,value:a,...r}=e,l=M9(_o,o),n={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},i=l.type==="single"?n:void 0;return qe(or,{...i,...r,ref:t,onPressedChange:s=>{s?l.onItemActivate(a):l.onItemDeactivate(a)}})}),k9=ar,H9=R9;import xs from"react";import{jsx as gs,jsxs as vs}from"react/jsx-runtime";var ms={border:"none",margin:0,padding:0,minWidth:0},hs={color:"var(--dmp-color-foreground)",fontSize:"var(--dmp-font-size-label)",display:"block",marginBottom:"5px",padding:0};function o1({label:e,id:t,className:o,children:a}){let r=`${t}-legend`;return vs("fieldset",{style:ms,className:o,"aria-labelledby":r,children:[gs("legend",{id:r,style:hs,children:e}),a]})}import{jsx as rr}from"react/jsx-runtime";function x1({label:e,options:t,value:o,onChange:a,id:r="radio-group"}){let l=xs.useCallback(n=>{n&&typeof a=="function"&&a(n)},[a]);return rr(o1,{label:e,id:r,className:"radioGroupEditor-fieldset",children:rr(k9,{type:"single",value:o,onValueChange:l,className:"radioGroupEditor-root","aria-label":e,children:t.map(n=>rr(H9,{value:n.value,className:"radioGroupEditor-item","aria-label":n.label,title:n.label,children:n.icon??n.label},n.value))})})}import{jsx as Qt}from"react/jsx-runtime";var T9=[{value:"none",labelKey:"none",defaultLabel:"None",icon:Qt(ht,{width:14,height:14})},{value:"solid",labelKey:"solid",defaultLabel:"Solid",icon:Qt(Vn,{width:14,height:14})},{value:"dashed",labelKey:"dashed",defaultLabel:"Dashed",icon:Qt(Pn,{width:14,height:14})},{value:"dotted",labelKey:"dotted",defaultLabel:"Dotted",icon:Qt(Tn,{width:14,height:14})}],P9=new Set(T9.map(e=>e.value));function Ls(e){if(!e)return"none";if(P9.has(e))return e;let t=e.split(/\s+/)[0]??"";return P9.has(t)?t:"none"}function V9({label:e="Border Style",value:t,onChange:o,id:a="border-style",optionLabels:r}){let l=T9.map(n=>({value:n.value,label:r?.[n.labelKey]??n.defaultLabel,icon:n.icon}));return Qt(x1,{label:e,options:l,value:Ls(t),onChange:o,id:a})}import Ae from"react";function Pe(e,t){return e.replace(/\{(\d+)\}/g,(o,a)=>{let r=t[Number(a)];return r===void 0?o:String(r)})}function f1(e,t){if(t==null||typeof t!="object"||typeof e!="object")return e;let o={...e},a=t;for(let r of Object.keys(o)){let l=o[r],n=a[r];l!==null&&typeof l=="object"&&!Array.isArray(l)?o[r]=f1(l,n):typeof n=="string"&&(o[r]=n)}return o}var _9=[{path:"general.headerTitle"},{path:"general.emptyPlaceholder"},{path:"general.inlineEditEditable"},{path:"general.inlineEditNonEditable"},{path:"general.addToChatContext"},{path:"general.ariaPropertyPanel"},{path:"general.ariaSelectedComponent"},{path:"general.ariaElementStyling"},{path:"sections.imageSource"},{path:"sections.background"},{path:"sections.spacing"},{path:"sections.border"},{path:"sections.typography"},{path:"sections.elementDimensions"},{path:"instances.imageSource"},{path:"instances.backgroundColor"},{path:"instances.padding"},{path:"instances.margin"},{path:"instances.borderRadius"},{path:"instances.borderWeight"},{path:"instances.borderStyle"},{path:"instances.borderColor"},{path:"instances.fontFamily"},{path:"instances.fontSize"},{path:"instances.fontWeight"},{path:"instances.fontStyle"},{path:"instances.textColor"},{path:"instances.textAlignment"},{path:"instances.textFormatting"},{path:"instances.textTransform"},{path:"instances.lineHeight"},{path:"instances.letterSpacing"},{path:"instances.width"},{path:"instances.minWidth"},{path:"instances.maxWidth"},{path:"instances.height"},{path:"instances.minHeight"},{path:"instances.maxHeight"},{path:"instances.overflow"},{path:"editors.image.tabCms"},{path:"editors.image.tabLocal"},{path:"editors.image.tabUrl"},{path:"editors.image.ariaTablist"},{path:"editors.image.clearImage"},{path:"editors.image.chooseFile"},{path:"editors.image.ariaChooseFile"},{path:"editors.image.useThisImage"},{path:"editors.image.ariaImageUrl"},{path:"editors.image.urlPlaceholder"},{path:"editors.image.previewAlt"},{path:"editors.image.altText"},{path:"editors.image.altPlaceholder"},{path:"editors.image.width"},{path:"editors.image.height"},{path:"editors.image.autoPlaceholder"},{path:"editors.image.workspace"},{path:"editors.image.selectWorkspace"},{path:"editors.image.selectImage"},{path:"editors.image.loadingWorkspaces"},{path:"editors.image.noWorkspaces"},{path:"editors.image.loadingImages"},{path:"editors.image.noImages"},{path:"editors.image.loadingMore"},{path:"editors.image.untitled"},{path:"editors.image.downloadingImage"},{path:"editors.image.downloadFailed"},{path:"editors.image.closePicker"},{path:"editors.image.cancel"},{path:"editors.image.done"},{path:"editors.image.pickerTitle",placeholders:[0]},{path:"editors.image.pickerError",placeholders:[0]},{path:"editors.boxDimension.sides.top"},{path:"editors.boxDimension.sides.right"},{path:"editors.boxDimension.sides.bottom"},{path:"editors.boxDimension.sides.left"},{path:"editors.boxDimension.corners.topLeft"},{path:"editors.boxDimension.corners.topRight"},{path:"editors.boxDimension.corners.bottomRight"},{path:"editors.boxDimension.corners.bottomLeft"},{path:"editors.boxDimension.linkSides"},{path:"editors.boxDimension.unlinkSides"},{path:"editors.boxDimension.ariaUnit",placeholders:[0]},{path:"editors.boxDimension.ariaSide",placeholders:[0,1]},{path:"editors.dimension.ariaValue",placeholders:[0]},{path:"editors.dimension.ariaUnit",placeholders:[0]},{path:"editors.color.placeholder"},{path:"editors.color.ariaValue",placeholders:[0]},{path:"editors.color.ariaOpenPicker",placeholders:[0,1]},{path:"editors.color.ariaPicker",placeholders:[0]},{path:"editors.color.ariaSaturation"},{path:"editors.color.ariaEyedropper"},{path:"editors.color.ariaHue"},{path:"editors.color.ariaAlphaSlider"},{path:"editors.color.ariaHex"},{path:"editors.color.ariaChannel",placeholders:[0,1,2,3]},{path:"editors.color.ariaAlphaInput"},{path:"editors.color.ariaFormatCycle",placeholders:[0]},{path:"editors.color.titleFormatCycle"},{path:"editors.color.gradientValue"},{path:"editors.color.imageValue"},{path:"editors.fontWeight.options.default"},{path:"editors.fontWeight.options.thin"},{path:"editors.fontWeight.options.extraLight"},{path:"editors.fontWeight.options.light"},{path:"editors.fontWeight.options.regular"},{path:"editors.fontWeight.options.medium"},{path:"editors.fontWeight.options.semiBold"},{path:"editors.fontWeight.options.bold"},{path:"editors.fontWeight.options.extraBold"},{path:"editors.fontWeight.options.black"},{path:"editors.fontStyle.options.normal"},{path:"editors.fontStyle.options.italic"},{path:"editors.borderStyle.options.none"},{path:"editors.borderStyle.options.solid"},{path:"editors.borderStyle.options.dashed"},{path:"editors.borderStyle.options.dotted"},{path:"editors.overflow.options.default"},{path:"editors.overflow.options.visible"},{path:"editors.overflow.options.hidden"},{path:"editors.overflow.options.scroll"},{path:"editors.overflow.options.auto"},{path:"editors.textAlignment.options.left"},{path:"editors.textAlignment.options.center"},{path:"editors.textAlignment.options.right"},{path:"editors.textAlignment.options.justify"},{path:"editors.textDecoration.options.none"},{path:"editors.textDecoration.options.underline"},{path:"editors.textDecoration.options.lineThrough"},{path:"editors.textTransform.options.none"},{path:"editors.textTransform.options.uppercase"},{path:"editors.textTransform.options.lowercase"},{path:"editors.textTransform.options.capitalize"},{path:"editors.fontFamily.options.default"},{path:"history.changeLimitTitle"},{path:"history.changeLimitBody",placeholders:[0]}];function ws(e,t){return t.split(".").reduce((o,a)=>{if(o&&typeof o=="object")return o[a]},e)}function bs(e){let t=new Set;for(let o of e.matchAll(/\{(\d+)\}/g))t.add(Number(o[1]));return Array.from(t).sort((o,a)=>o-a)}function Is(e){let t=[];if(!e||typeof e!="object")return["labels is not an object"];for(let o of _9){let{path:a,placeholders:r}=o,l=ws(e,a);if(typeof l!="string"){t.push(`missing or non-string label: ${a}`);continue}if(r){let n=bs(l),i=[...r].sort((d,u)=>d-u);(n.length!==i.length||n.some((d,u)=>d!==i[u]))&&t.push(`placeholder mismatch at ${a}: expected {${i.join(",")}}, got {${n.join(",")}}`)}}return t}var Do=[{value:"px",label:"px"},{value:"em",label:"em"},{value:"rem",label:"rem"},{value:"%",label:"%"},{value:"pt",label:"pt"},{value:"vw",label:"vw"},{value:"vh",label:"vh"},{value:"vmin",label:"vmin"},{value:"vmax",label:"vmax"},{value:"ch",label:"ch"},{value:"ex",label:"ex"},{value:"cm",label:"cm"},{value:"mm",label:"mm"},{value:"in",label:"in"},{value:"pc",label:"pc"}],p1={px:{min:0,max:1e4,step:1,decimals:1},em:{min:0,max:100,step:.1,decimals:3},rem:{min:0,max:100,step:.1,decimals:3},"%":{min:0,max:1e3,step:1,decimals:2},pt:{min:0,max:1e4,step:1,decimals:1},vw:{min:0,max:100,step:.1,decimals:1},vh:{min:0,max:100,step:.1,decimals:1},vmin:{min:0,max:100,step:.1,decimals:1},vmax:{min:0,max:100,step:.1,decimals:1},ch:{min:0,max:100,step:.1,decimals:1},ex:{min:0,max:100,step:.1,decimals:1},cm:{min:0,max:100,step:.1,decimals:2},mm:{min:0,max:1e3,step:1,decimals:1},in:{min:0,max:50,step:.01,decimals:2},pc:{min:0,max:500,step:1,decimals:0}},ys=p1.px??{min:0,max:1e4,step:1,decimals:0};function Jt(e){let t=e.map(o=>o.value).join("|");return new RegExp(`^(-?\\d*\\.?\\d+)\\s*(${t})$`)}var Ms=Jt(Do);function ze(e,t="px",o=Ms){if(e==null||e==="")return{numericValue:"",unit:t};let a=String(e).trim();if(a==="")return{numericValue:"",unit:t};let r=a.match(o);if(r&&r[1]!=null&&r[2]!=null)return{numericValue:parseFloat(r[1]),unit:r[2]};let l=parseFloat(a);return isNaN(l)?{numericValue:"",unit:t}:{numericValue:l,unit:t}}function lr(e,t=p1){return t[e]||ys}function C1(e,t,o=p1){let a=lr(t,o);return Math.min(a.max,Math.max(a.min,e))}function m1(e,t,o=p1){if(e===""||e==null||isNaN(e))return"";let a=lr(t,o);return Number(Number(e).toFixed(a.decimals))}function Oo(e,t){return e===""||e==null||isNaN(e)?"":`${e}${t}`}function Eo(e,t,o,a,r=p1){let l=parseFloat(e)||0,n=lr(a,r),i=o?10:1,s=(t==="ArrowUp"?1:-1)*n.step*i,d=C1(l+s,a,r);return String(m1(d,a,r))}function nr({top:e,right:t,bottom:o,left:a}){return`${e||"0px"} ${t||"0px"} ${o||"0px"} ${a||"0px"}`}function xt(e){let t={top:"",right:"",bottom:"",left:""};if(!e||typeof e!="string")return t;let o=e.trim().split(/\s+/),[a="",r="",l="",n=""]=o;return o.length===0||o.length===1&&a===""?t:o.length===1?{top:a,right:a,bottom:a,left:a}:o.length===2?{top:a,right:r,bottom:a,left:r}:o.length===3?{top:a,right:r,bottom:l,left:r}:{top:a,right:r,bottom:l,left:n}}function a1(...e){return Do.filter(t=>e.includes(t.value))}var L1={width:{units:a1("px","em","rem","vw","ch","%"),icon:e9},minWidth:{units:a1("px","em","rem","vw","ch","%")},maxWidth:{units:a1("px","em","rem","vw","ch","%")},height:{units:a1("px","em","rem","vh","%"),icon:Bn},minHeight:{units:a1("px","em","rem","vh","%")},maxHeight:{units:a1("px","em","rem","vh","%")},fontSize:{units:a1("px","em","rem","%","pt"),constraints:{...p1,px:{min:0,max:1e3,step:1,decimals:0},"%":{min:0,max:1e3,step:1,decimals:0}},icon:En},lineHeight:{units:[],defaultUnit:"",constraints:{"":{min:0,max:10,step:.1,decimals:2}},icon:Un},letterSpacing:{units:a1("px","em","rem"),constraints:{...p1,px:{min:-100,max:1e3,step:.5,decimals:1},em:{min:-10,max:100,step:.01,decimals:3},rem:{min:-10,max:100,step:.01,decimals:3}},icon:Nn}},Yt={padding:{units:a1("px","em","rem","%")},margin:{units:a1("px","em","rem","%")},borderRadius:{units:a1("px","em","rem","%"),sideLabelKind:"corners"},borderWidth:{units:a1("px","em","rem")}};import{jsx as h1,jsxs as Bo}from"react/jsx-runtime";var Ss=[{value:"px",label:"px"},{value:"em",label:"em"},{value:"rem",label:"rem"},{value:"%",label:"%"}],Lt=["top","right","bottom","left"],Rs={sides:{top:"Top",right:"Right",bottom:"Bottom",left:"Left"},corners:{topLeft:"Top Left",topRight:"Top Right",bottomRight:"Bottom Right",bottomLeft:"Bottom Left"},linkSides:"Link all sides",unlinkSides:"Unlink sides",ariaUnit:"{0} unit",ariaSide:"{0} {1}"};function ks(e,t){return t==="corners"?[e.corners.topLeft,e.corners.topRight,e.corners.bottomRight,e.corners.bottomLeft]:[e.sides.top,e.sides.right,e.sides.bottom,e.sides.left]}var Hs=h1(qn,{width:14,height:14}),Ps=h1(zn,{width:14,height:14});function eo(e){return typeof e=="string"&&e.trim().toLowerCase()==="auto"}function ir(e,t,o){let a={top:"",right:"",bottom:"",left:""};for(let r of Lt){let l=e[r];if(l==null||l==="")a[r]="";else if(eo(l))a[r]="auto";else{let n=ze(String(l),t,o);a[r]=n.numericValue!==""?String(n.numericValue):""}}return a}function sr(e){let t=e.top||"";return t===(e.right||"")&&t===(e.bottom||"")&&t===(e.left||"")}function D9(e,t,o){for(let a of Lt){let r=e[a];if(r!=null&&r!==""&&r!=="0"){let l=ze(String(r),"px",t);if(l.unit&&o.has(l.unit))return l.unit}}return"px"}function Ts(e,t,o){if(eo(e))return"auto";let a=parseFloat(e);if(e===""||isNaN(a))return"";let r=C1(a,t,o);return`${m1(r,t,o)}${t}`}function O9(e){if(!e)return"";let t=xt(e);return!t.top&&!t.right&&!t.bottom&&!t.left?"":nr(t)}function to({label:e,value:t="",onChange:o,id:a="",units:r=Ss,constraints:l=p1,allowAuto:n=!1,sideLabelKind:i="sides",sideIcons:s,placeholder:d="",aria:u}){let f=f1(Rs,u),C=ks(f,i),c=Ae.useRef(o);c.current=o;let m=Ae.useMemo(()=>Jt(r),[r]),L=Ae.useMemo(()=>new Set(r.map(M=>M.value)),[r]),p=Ae.useMemo(()=>{if(!d)return{top:"0",right:"0",bottom:"0",left:"0"};let M=xt(d),w={top:"0",right:"0",bottom:"0",left:"0"};for(let b of Lt){let x=M[b];if(!x||x==="")w[b]="0";else{let O=ze(x,"px",m);w[b]=O.numericValue!==""?String(O.numericValue):"0"}}return w},[d,m]),I=Ae.useMemo(()=>xt(t),[]),[h,V]=Ae.useState(()=>D9(I,m,L)),[g,S]=Ae.useState(()=>ir(I,h,m)),[R,G]=Ae.useState(()=>sr(g)),y=Ae.useRef(O9(t));Ae.useEffect(()=>{if(t===y.current)return;let M=O9(t);if(M===y.current)return;y.current=M;let w=xt(t),b=D9(w,m,L);V(b);let x=ir(w,b,m);S(x),G(sr(x))},[t,m,L]);let D=Ae.useCallback((M,w)=>{let b={top:"",right:"",bottom:"",left:""},x=!0;for(let P of Lt)b[P]=Ts(M[P],w,l),b[P]!==""&&(x=!1);let O=x?"":nr(b);O!==y.current&&(y.current=O,typeof c.current=="function"&&c.current(O))},[l]),X=Ae.useCallback((M,w)=>{S(R?{top:w,right:w,bottom:w,left:w}:x=>({...x,[M]:w}));let b=ze(w,h,m);b.numericValue!==""&&b.unit&&L.has(b.unit)&&b.unit!==h&&V(b.unit)},[R,h,m,L]),Q=Ae.useCallback((M,w)=>{let b=w.clipboardData.getData("text"),x=ze(b,h,m);if(x.numericValue!==""&&x.unit&&L.has(x.unit)){w.preventDefault();let O=C1(x.numericValue,x.unit,l),P=String(m1(O,x.unit,l)),A=R?{top:P,right:P,bottom:P,left:P}:{...g,[M]:P};S(A),x.unit!==h&&V(x.unit),D(A,x.unit)}},[R,g,h,m,L,l,D]),J=Ae.useCallback(M=>{let w=g[M];if(w===""){let A=R?{top:"",right:"",bottom:"",left:""}:{...g,[M]:""};S(A),D(A,h);return}if(n&&eo(w)){let A="auto",$=R?{top:A,right:A,bottom:A,left:A}:{...g,[M]:A};S($),D($,h);return}let b=parseFloat(w);if(isNaN(b)){let A=xt(y.current);S(ir(A,h,m));return}let x=C1(b,h,l),O=String(m1(x,h,l)),P=R?{top:O,right:O,bottom:O,left:O}:{...g,[M]:O};S(P),D(P,h)},[g,R,h,m,l,D,n]),Z=Ae.useCallback((M,w)=>{if(w.key==="Enter"){w.currentTarget.blur();return}if(w.key==="ArrowUp"||w.key==="ArrowDown"){if(eo(g[M]))return;w.preventDefault();let b=Eo(g[M],w.key,w.shiftKey,h,l);if(b===null)return;let x=R?{top:b,right:b,bottom:b,left:b}:{...g,[M]:b};S(x),D(x,h)}},[g,R,h,l,D]),E=Ae.useCallback(M=>{let w=M.target.value;if(!L.has(w))return;V(w);let b={top:"",right:"",bottom:"",left:""};for(let x of Lt){let O=g[x];if(eo(O))b[x]="auto";else if(O!==""){let P=parseFloat(O);if(isNaN(P))b[x]=O;else{let A=C1(P,w,l);b[x]=String(m1(A,w,l))}}else b[x]=""}S(b),D(b,w)},[g,L,l,D]);return Bo(o1,{label:e,id:a,className:"boxDimensionEditor-fieldset",children:[h1("div",{className:"boxDimensionEditor-header",children:Bo("div",{className:"boxDimensionEditor-controls",children:[h1("button",{type:"button",className:"boxDimensionEditor-link-btn"+(R?" boxDimensionEditor-link-btn--active":""),onClick:()=>{if(!R){let M=g.top;if(!sr(g)){let w={top:M,right:M,bottom:M,left:M};S(w),D(w,h)}}G(M=>!M)},"aria-label":R?f.unlinkSides:f.linkSides,"aria-pressed":R,title:R?f.unlinkSides:f.linkSides,children:R?Hs:Ps}),h1("select",{className:"boxDimensionEditor-unit",value:h,onChange:E,"aria-label":Pe(f.ariaUnit,[e]),children:r.map(M=>h1("option",{value:M.value,children:M.label},M.value))})]})}),h1("div",{className:"boxDimensionEditor-grid",children:Lt.map((M,w)=>{let b=s&&s[w];return Bo("div",{className:"boxDimensionEditor-cell",children:[h1("label",{htmlFor:`${a}-${M}`,className:"boxDimensionEditor-label",children:C[w]}),Bo("div",{className:"boxDimensionEditor-input-row",children:[b&&h1("span",{className:"boxDimensionEditor-input-icon","aria-hidden":"true",children:h1(b,{size:12,width:12,height:12})}),h1("input",{id:`${a}-${M}`,type:"text",className:b?"boxDimensionEditor-input boxDimensionEditor-input--with-icon":"boxDimensionEditor-input",value:g[M],placeholder:p[M],onChange:x=>X(M,x.target.value),onPaste:x=>Q(M,x),onBlur:()=>J(M),onKeyDown:x=>Z(M,x),"aria-label":Pe(f.ariaSide,[e,C[w]??""]),autoComplete:"off",spellCheck:"false"})]})]},M)})})]})}import{forwardRef as _s,createElement as Ds}from"react";var Ao=(...e)=>e.filter((t,o,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===o).join(" ").trim();var E9=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();var B9=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,o,a)=>a?a.toUpperCase():o.toLowerCase());var dr=e=>{let t=B9(e);return t.charAt(0).toUpperCase()+t.slice(1)};import{forwardRef as Vs,createElement as F9}from"react";var A9={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"};var Z9=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};var $9=Vs(({color:e="currentColor",size:t=24,strokeWidth:o=2,absoluteStrokeWidth:a,className:r="",children:l,iconNode:n,...i},s)=>F9("svg",{ref:s,...A9,width:t,height:t,stroke:e,strokeWidth:a?Number(o)*24/Number(t):o,className:Ao("lucide",r),...!l&&!Z9(i)&&{"aria-hidden":"true"},...i},[...n.map(([d,u])=>F9(d,u)),...Array.isArray(l)?l:[l]]));var N9=(e,t)=>{let o=_s(({className:a,...r},l)=>Ds($9,{ref:l,iconNode:t,className:Ao(`lucide-${E9(dr(e))}`,`lucide-${e}`,a),...r}));return o.displayName=dr(e),o};var Os=[["path",{d:"m12 9-8.414 8.414A2 2 0 0 0 3 18.828v1.344a2 2 0 0 1-.586 1.414A2 2 0 0 1 3.828 21h1.344a2 2 0 0 0 1.414-.586L15 12",key:"1y3wsu"}],["path",{d:"m18 9 .4.4a1 1 0 1 1-3 3l-3.8-3.8a1 1 0 1 1 3-3l.4.4 3.4-3.4a1 1 0 1 1 3 3z",key:"110lr1"}],["path",{d:"m2 22 .414-.414",key:"jhxm08"}]],oo=N9("pipette",Os);import ye from"react";import{useRef as No,useCallback as Be,useEffect as gr,useMemo as Uo,useState as vr,createContext as Es,useContext as Bs}from"react";var U9={exports:{}},ao={};var q9;function As(){if(q9)return ao;q9=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function o(a,r,l){var n=null;if(l!==void 0&&(n=""+l),r.key!==void 0&&(n=""+r.key),"key"in r){l={};for(var i in r)i!=="key"&&(l[i]=r[i])}else l=r;return r=l.ref,{$$typeof:e,type:a,key:n,ref:r!==void 0?r:null,props:l}}return ao.Fragment=t,ao.jsx=o,ao.jsxs=o,ao}var z9;function Zs(){return z9||(z9=1,U9.exports=As()),U9.exports}var Se=Zs();function e2(e){var t,o,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(o=e2(e[t]))&&(a&&(a+=" "),a+=o)}else for(o in e)e[o]&&(a&&(a+=" "),a+=o);return a}function Fs(){for(var e,t,o=0,a="",r=arguments.length;o<r;o++)(e=arguments[o])&&(t=e2(e))&&(a&&(a+=" "),a+=t);return a}var xr="-",$s=e=>{let t=Us(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:r=>{let l=r.split(xr);return l[0]===""&&l.length!==1&&l.shift(),t2(l,t)||Ns(r)},getConflictingClassGroupIds:(r,l)=>{let n=o[r]||[];return l&&a[r]?[...n,...a[r]]:n}}},t2=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],a=t.nextPart.get(o),r=a?t2(e.slice(1),a):void 0;if(r)return r;if(t.validators.length===0)return;let l=e.join(xr);return t.validators.find(({validator:n})=>n(l))?.classGroupId},j9=/^\[(.+)\]$/,Ns=e=>{if(j9.test(e)){let t=j9.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},Us=e=>{let{theme:t,classGroups:o}=e,a={nextPart:new Map,validators:[]};for(let r in o)fr(o[r],a,r,t);return a},fr=(e,t,o,a)=>{e.forEach(r=>{if(typeof r=="string"){let l=r===""?t:K9(t,r);l.classGroupId=o;return}if(typeof r=="function"){if(qs(r)){fr(r(a),t,o,a);return}t.validators.push({validator:r,classGroupId:o});return}Object.entries(r).forEach(([l,n])=>{fr(n,K9(t,l),o,a)})})},K9=(e,t)=>{let o=e;return t.split(xr).forEach(a=>{o.nextPart.has(a)||o.nextPart.set(a,{nextPart:new Map,validators:[]}),o=o.nextPart.get(a)}),o},qs=e=>e.isThemeGetter,zs=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,a=new Map,r=(l,n)=>{o.set(l,n),t++,t>e&&(t=0,a=o,o=new Map)};return{get(l){let n=o.get(l);if(n!==void 0)return n;if((n=a.get(l))!==void 0)return r(l,n),n},set(l,n){o.has(l)?o.set(l,n):r(l,n)}}},pr="!",Cr=":",js=Cr.length,Ks=e=>{let{prefix:t,experimentalParseClassName:o}=e,a=r=>{let l=[],n=0,i=0,s=0,d;for(let m=0;m<r.length;m++){let L=r[m];if(n===0&&i===0){if(L===Cr){l.push(r.slice(s,m)),s=m+js;continue}if(L==="/"){d=m;continue}}L==="["?n++:L==="]"?n--:L==="("?i++:L===")"&&i--}let u=l.length===0?r:r.substring(s),f=Gs(u),C=f!==u,c=d&&d>s?d-s:void 0;return{modifiers:l,hasImportantModifier:C,baseClassName:f,maybePostfixModifierPosition:c}};if(t){let r=t+Cr,l=a;a=n=>n.startsWith(r)?l(n.substring(r.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:n,maybePostfixModifierPosition:void 0}}if(o){let r=a;a=l=>o({className:l,parseClassName:r})}return a},Gs=e=>e.endsWith(pr)?e.substring(0,e.length-1):e.startsWith(pr)?e.substring(1):e,Ws=e=>{let t=Object.fromEntries(e.orderSensitiveModifiers.map(o=>[o,!0]));return o=>{if(o.length<=1)return o;let a=[],r=[];return o.forEach(l=>{l[0]==="["||t[l]?(a.push(...r.sort(),l),r=[]):r.push(l)}),a.push(...r.sort()),a}},Xs=e=>({cache:zs(e.cacheSize),parseClassName:Ks(e),sortModifiers:Ws(e),...$s(e)}),Qs=/\s+/,Js=(e,t)=>{let{parseClassName:o,getClassGroupId:a,getConflictingClassGroupIds:r,sortModifiers:l}=t,n=[],i=e.trim().split(Qs),s="";for(let d=i.length-1;d>=0;d-=1){let u=i[d],{isExternal:f,modifiers:C,hasImportantModifier:c,baseClassName:m,maybePostfixModifierPosition:L}=o(u);if(f){s=u+(s.length>0?" "+s:s);continue}let p=!!L,I=a(p?m.substring(0,L):m);if(!I){if(!p){s=u+(s.length>0?" "+s:s);continue}if(I=a(m),!I){s=u+(s.length>0?" "+s:s);continue}p=!1}let h=l(C).join(":"),V=c?h+pr:h,g=V+I;if(n.includes(g))continue;n.push(g);let S=r(I,p);for(let R=0;R<S.length;++R){let G=S[R];n.push(V+G)}s=u+(s.length>0?" "+s:s)}return s};function Ys(){let e=0,t,o,a="";for(;e<arguments.length;)(t=arguments[e++])&&(o=o2(t))&&(a&&(a+=" "),a+=o);return a}var o2=e=>{if(typeof e=="string")return e;let t,o="";for(let a=0;a<e.length;a++)e[a]&&(t=o2(e[a]))&&(o&&(o+=" "),o+=t);return o};function e3(e,...t){let o,a,r,l=n;function n(s){let d=t.reduce((u,f)=>f(u),e());return o=Xs(d),a=o.cache.get,r=o.cache.set,l=i,i(s)}function i(s){let d=a(s);if(d)return d;let u=Js(s,o);return r(s,u),u}return function(){return l(Ys.apply(null,arguments))}}var Te=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},a2=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,r2=/^\((?:(\w[\w-]*):)?(.+)\)$/i,t3=/^\d+\/\d+$/,o3=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,a3=/\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$/,r3=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,l3=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,n3=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,wt=e=>t3.test(e),de=e=>!!e&&!Number.isNaN(Number(e)),A1=e=>!!e&&Number.isInteger(Number(e)),ur=e=>e.endsWith("%")&&de(e.slice(0,-1)),P1=e=>o3.test(e),i3=()=>!0,s3=e=>a3.test(e)&&!r3.test(e),l2=()=>!1,d3=e=>l3.test(e),u3=e=>n3.test(e),c3=e=>!z(e)&&!j(e),f3=e=>bt(e,s2,l2),z=e=>a2.test(e),lt=e=>bt(e,d2,s3),cr=e=>bt(e,g3,de),G9=e=>bt(e,n2,l2),p3=e=>bt(e,i2,u3),Zo=e=>bt(e,u2,d3),j=e=>r2.test(e),ro=e=>It(e,d2),C3=e=>It(e,v3),W9=e=>It(e,n2),m3=e=>It(e,s2),h3=e=>It(e,i2),Fo=e=>It(e,u2,!0),bt=(e,t,o)=>{let a=a2.exec(e);return a?a[1]?t(a[1]):o(a[2]):!1},It=(e,t,o=!1)=>{let a=r2.exec(e);return a?a[1]?t(a[1]):o:!1},n2=e=>e==="position"||e==="percentage",i2=e=>e==="image"||e==="url",s2=e=>e==="length"||e==="size"||e==="bg-size",d2=e=>e==="length",g3=e=>e==="number",v3=e=>e==="family-name",u2=e=>e==="shadow",x3=()=>{let e=Te("color"),t=Te("font"),o=Te("text"),a=Te("font-weight"),r=Te("tracking"),l=Te("leading"),n=Te("breakpoint"),i=Te("container"),s=Te("spacing"),d=Te("radius"),u=Te("shadow"),f=Te("inset-shadow"),C=Te("text-shadow"),c=Te("drop-shadow"),m=Te("blur"),L=Te("perspective"),p=Te("aspect"),I=Te("ease"),h=Te("animate"),V=()=>["auto","avoid","all","avoid-page","page","left","right","column"],g=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...g(),j,z],R=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto","contain","none"],y=()=>[j,z,s],D=()=>[wt,"full","auto",...y()],X=()=>[A1,"none","subgrid",j,z],Q=()=>["auto",{span:["full",A1,j,z]},A1,j,z],J=()=>[A1,"auto",j,z],Z=()=>["auto","min","max","fr",j,z],E=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],M=()=>["start","end","center","stretch","center-safe","end-safe"],w=()=>["auto",...y()],b=()=>[wt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...y()],x=()=>[e,j,z],O=()=>[...g(),W9,G9,{position:[j,z]}],P=()=>["no-repeat",{repeat:["","x","y","space","round"]}],A=()=>["auto","cover","contain",m3,f3,{size:[j,z]}],$=()=>[ur,ro,lt],W=()=>["","none","full",d,j,z],F=()=>["",de,ro,lt],U=()=>["solid","dashed","dotted","double"],N=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>[de,ur,W9,G9],v=()=>["","none",m,j,z],k=()=>["none",de,j,z],B=()=>["none",de,j,z],q=()=>[de,j,z],K=()=>[wt,"full",...y()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[P1],breakpoint:[P1],color:[i3],container:[P1],"drop-shadow":[P1],ease:["in","out","in-out"],font:[c3],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[P1],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[P1],shadow:[P1],spacing:["px",de],text:[P1],"text-shadow":[P1],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",wt,z,j,p]}],container:["container"],columns:[{columns:[de,z,j,i]}],"break-after":[{"break-after":V()}],"break-before":[{"break-before":V()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:S()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{start:D()}],end:[{end:D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[A1,"auto",j,z]}],basis:[{basis:[wt,"full","auto",i,...y()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[de,wt,"auto","initial","none",z]}],grow:[{grow:["",de,j,z]}],shrink:[{shrink:["",de,j,z]}],order:[{order:[A1,"first","last","none",j,z]}],"grid-cols":[{"grid-cols":X()}],"col-start-end":[{col:Q()}],"col-start":[{"col-start":J()}],"col-end":[{"col-end":J()}],"grid-rows":[{"grid-rows":X()}],"row-start-end":[{row:Q()}],"row-start":[{"row-start":J()}],"row-end":[{"row-end":J()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Z()}],"auto-rows":[{"auto-rows":Z()}],gap:[{gap:y()}],"gap-x":[{"gap-x":y()}],"gap-y":[{"gap-y":y()}],"justify-content":[{justify:[...E(),"normal"]}],"justify-items":[{"justify-items":[...M(),"normal"]}],"justify-self":[{"justify-self":["auto",...M()]}],"align-content":[{content:["normal",...E()]}],"align-items":[{items:[...M(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...M(),{baseline:["","last"]}]}],"place-content":[{"place-content":E()}],"place-items":[{"place-items":[...M(),"baseline"]}],"place-self":[{"place-self":["auto",...M()]}],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:w()}],mx:[{mx:w()}],my:[{my:w()}],ms:[{ms:w()}],me:[{me:w()}],mt:[{mt:w()}],mr:[{mr:w()}],mb:[{mb:w()}],ml:[{ml:w()}],"space-x":[{"space-x":y()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":y()}],"space-y-reverse":["space-y-reverse"],size:[{size:b()}],w:[{w:[i,"screen",...b()]}],"min-w":[{"min-w":[i,"screen","none",...b()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[n]},...b()]}],h:[{h:["screen","lh",...b()]}],"min-h":[{"min-h":["screen","lh","none",...b()]}],"max-h":[{"max-h":["screen","lh",...b()]}],"font-size":[{text:["base",o,ro,lt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,j,cr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ur,z]}],"font-family":[{font:[C3,z,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[r,j,z]}],"line-clamp":[{"line-clamp":[de,"none",j,cr]}],leading:[{leading:[l,...y()]}],"list-image":[{"list-image":["none",j,z]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",j,z]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:x()}],"text-color":[{text:x()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:[de,"from-font","auto",j,lt]}],"text-decoration-color":[{decoration:x()}],"underline-offset":[{"underline-offset":[de,"auto",j,z]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",j,z]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",j,z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:A()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},A1,j,z],radial:["",j,z],conic:[A1,j,z]},h3,p3]}],"bg-color":[{bg:x()}],"gradient-from-pos":[{from:$()}],"gradient-via-pos":[{via:$()}],"gradient-to-pos":[{to:$()}],"gradient-from":[{from:x()}],"gradient-via":[{via:x()}],"gradient-to":[{to:x()}],rounded:[{rounded:W()}],"rounded-s":[{"rounded-s":W()}],"rounded-e":[{"rounded-e":W()}],"rounded-t":[{"rounded-t":W()}],"rounded-r":[{"rounded-r":W()}],"rounded-b":[{"rounded-b":W()}],"rounded-l":[{"rounded-l":W()}],"rounded-ss":[{"rounded-ss":W()}],"rounded-se":[{"rounded-se":W()}],"rounded-ee":[{"rounded-ee":W()}],"rounded-es":[{"rounded-es":W()}],"rounded-tl":[{"rounded-tl":W()}],"rounded-tr":[{"rounded-tr":W()}],"rounded-br":[{"rounded-br":W()}],"rounded-bl":[{"rounded-bl":W()}],"border-w":[{border:F()}],"border-w-x":[{"border-x":F()}],"border-w-y":[{"border-y":F()}],"border-w-s":[{"border-s":F()}],"border-w-e":[{"border-e":F()}],"border-w-t":[{"border-t":F()}],"border-w-r":[{"border-r":F()}],"border-w-b":[{"border-b":F()}],"border-w-l":[{"border-l":F()}],"divide-x":[{"divide-x":F()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":F()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...U(),"hidden","none"]}],"divide-style":[{divide:[...U(),"hidden","none"]}],"border-color":[{border:x()}],"border-color-x":[{"border-x":x()}],"border-color-y":[{"border-y":x()}],"border-color-s":[{"border-s":x()}],"border-color-e":[{"border-e":x()}],"border-color-t":[{"border-t":x()}],"border-color-r":[{"border-r":x()}],"border-color-b":[{"border-b":x()}],"border-color-l":[{"border-l":x()}],"divide-color":[{divide:x()}],"outline-style":[{outline:[...U(),"none","hidden"]}],"outline-offset":[{"outline-offset":[de,j,z]}],"outline-w":[{outline:["",de,ro,lt]}],"outline-color":[{outline:x()}],shadow:[{shadow:["","none",u,Fo,Zo]}],"shadow-color":[{shadow:x()}],"inset-shadow":[{"inset-shadow":["none",f,Fo,Zo]}],"inset-shadow-color":[{"inset-shadow":x()}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:x()}],"ring-offset-w":[{"ring-offset":[de,lt]}],"ring-offset-color":[{"ring-offset":x()}],"inset-ring-w":[{"inset-ring":F()}],"inset-ring-color":[{"inset-ring":x()}],"text-shadow":[{"text-shadow":["none",C,Fo,Zo]}],"text-shadow-color":[{"text-shadow":x()}],opacity:[{opacity:[de,j,z]}],"mix-blend":[{"mix-blend":[...N(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":N()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[de]}],"mask-image-linear-from-pos":[{"mask-linear-from":H()}],"mask-image-linear-to-pos":[{"mask-linear-to":H()}],"mask-image-linear-from-color":[{"mask-linear-from":x()}],"mask-image-linear-to-color":[{"mask-linear-to":x()}],"mask-image-t-from-pos":[{"mask-t-from":H()}],"mask-image-t-to-pos":[{"mask-t-to":H()}],"mask-image-t-from-color":[{"mask-t-from":x()}],"mask-image-t-to-color":[{"mask-t-to":x()}],"mask-image-r-from-pos":[{"mask-r-from":H()}],"mask-image-r-to-pos":[{"mask-r-to":H()}],"mask-image-r-from-color":[{"mask-r-from":x()}],"mask-image-r-to-color":[{"mask-r-to":x()}],"mask-image-b-from-pos":[{"mask-b-from":H()}],"mask-image-b-to-pos":[{"mask-b-to":H()}],"mask-image-b-from-color":[{"mask-b-from":x()}],"mask-image-b-to-color":[{"mask-b-to":x()}],"mask-image-l-from-pos":[{"mask-l-from":H()}],"mask-image-l-to-pos":[{"mask-l-to":H()}],"mask-image-l-from-color":[{"mask-l-from":x()}],"mask-image-l-to-color":[{"mask-l-to":x()}],"mask-image-x-from-pos":[{"mask-x-from":H()}],"mask-image-x-to-pos":[{"mask-x-to":H()}],"mask-image-x-from-color":[{"mask-x-from":x()}],"mask-image-x-to-color":[{"mask-x-to":x()}],"mask-image-y-from-pos":[{"mask-y-from":H()}],"mask-image-y-to-pos":[{"mask-y-to":H()}],"mask-image-y-from-color":[{"mask-y-from":x()}],"mask-image-y-to-color":[{"mask-y-to":x()}],"mask-image-radial":[{"mask-radial":[j,z]}],"mask-image-radial-from-pos":[{"mask-radial-from":H()}],"mask-image-radial-to-pos":[{"mask-radial-to":H()}],"mask-image-radial-from-color":[{"mask-radial-from":x()}],"mask-image-radial-to-color":[{"mask-radial-to":x()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":g()}],"mask-image-conic-pos":[{"mask-conic":[de]}],"mask-image-conic-from-pos":[{"mask-conic-from":H()}],"mask-image-conic-to-pos":[{"mask-conic-to":H()}],"mask-image-conic-from-color":[{"mask-conic-from":x()}],"mask-image-conic-to-color":[{"mask-conic-to":x()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:A()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",j,z]}],filter:[{filter:["","none",j,z]}],blur:[{blur:v()}],brightness:[{brightness:[de,j,z]}],contrast:[{contrast:[de,j,z]}],"drop-shadow":[{"drop-shadow":["","none",c,Fo,Zo]}],"drop-shadow-color":[{"drop-shadow":x()}],grayscale:[{grayscale:["",de,j,z]}],"hue-rotate":[{"hue-rotate":[de,j,z]}],invert:[{invert:["",de,j,z]}],saturate:[{saturate:[de,j,z]}],sepia:[{sepia:["",de,j,z]}],"backdrop-filter":[{"backdrop-filter":["","none",j,z]}],"backdrop-blur":[{"backdrop-blur":v()}],"backdrop-brightness":[{"backdrop-brightness":[de,j,z]}],"backdrop-contrast":[{"backdrop-contrast":[de,j,z]}],"backdrop-grayscale":[{"backdrop-grayscale":["",de,j,z]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[de,j,z]}],"backdrop-invert":[{"backdrop-invert":["",de,j,z]}],"backdrop-opacity":[{"backdrop-opacity":[de,j,z]}],"backdrop-saturate":[{"backdrop-saturate":[de,j,z]}],"backdrop-sepia":[{"backdrop-sepia":["",de,j,z]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":y()}],"border-spacing-x":[{"border-spacing-x":y()}],"border-spacing-y":[{"border-spacing-y":y()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",j,z]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[de,"initial",j,z]}],ease:[{ease:["linear","initial",I,j,z]}],delay:[{delay:[de,j,z]}],animate:[{animate:["none",h,j,z]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[L,j,z]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:k()}],"rotate-x":[{"rotate-x":k()}],"rotate-y":[{"rotate-y":k()}],"rotate-z":[{"rotate-z":k()}],scale:[{scale:B()}],"scale-x":[{"scale-x":B()}],"scale-y":[{"scale-y":B()}],"scale-z":[{"scale-z":B()}],"scale-3d":["scale-3d"],skew:[{skew:q()}],"skew-x":[{"skew-x":q()}],"skew-y":[{"skew-y":q()}],transform:[{transform:[j,z,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:K()}],"translate-x":[{"translate-x":K()}],"translate-y":[{"translate-y":K()}],"translate-z":[{"translate-z":K()}],"translate-none":["translate-none"],accent:[{accent:x()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:x()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",j,z]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":y()}],"scroll-mx":[{"scroll-mx":y()}],"scroll-my":[{"scroll-my":y()}],"scroll-ms":[{"scroll-ms":y()}],"scroll-me":[{"scroll-me":y()}],"scroll-mt":[{"scroll-mt":y()}],"scroll-mr":[{"scroll-mr":y()}],"scroll-mb":[{"scroll-mb":y()}],"scroll-ml":[{"scroll-ml":y()}],"scroll-p":[{"scroll-p":y()}],"scroll-px":[{"scroll-px":y()}],"scroll-py":[{"scroll-py":y()}],"scroll-ps":[{"scroll-ps":y()}],"scroll-pe":[{"scroll-pe":y()}],"scroll-pt":[{"scroll-pt":y()}],"scroll-pr":[{"scroll-pr":y()}],"scroll-pb":[{"scroll-pb":y()}],"scroll-pl":[{"scroll-pl":y()}],"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",j,z]}],fill:[{fill:["none",...x()]}],"stroke-w":[{stroke:[de,ro,lt,cr]}],stroke:[{stroke:["none",...x()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},L3=e3(x3),w3=(e,t,o)=>Math.min(Math.max(e,t),o),$o=e=>Math.round(w3(e,0,255)),c2=e=>{let t=e.replace("#",""),o=parseInt(t,16);return{r:o>>16&255,g:o>>8&255,b:o&255}},b3=({r:e,g:t,b:o})=>{let a=r=>$o(r).toString(16).padStart(2,"0");return`#${a(e)}${a(t)}${a(o)}`},mr=({h:e,s:t,v:o})=>{e=e/360,t=t/100,o=o/100;let a=Math.floor(e*6),r=e*6-a,l=o*(1-t),n=o*(1-r*t),i=o*(1-(1-r)*t),s,d,u;switch(a%6){case 0:s=o,d=i,u=l;break;case 1:s=n,d=o,u=l;break;case 2:s=l,d=o,u=i;break;case 3:s=l,d=n,u=o;break;case 4:s=i,d=l,u=o;break;case 5:s=o,d=l,u=n;break;default:s=d=u=0}return{r:$o(s*255),g:$o(d*255),b:$o(u*255)}},hr=({r:e,g:t,b:o})=>{e/=255,t/=255,o/=255;let a=Math.max(e,t,o),r=Math.min(e,t,o),l=a-r,n=0,i=a===0?0:l/a,s=a;if(l!==0)switch(a){case e:n=((t-o)/l+(t<o?6:0))/6;break;case t:n=((o-e)/l+2)/6;break;case o:n=((e-t)/l+4)/6;break}return{h:Math.round(n*360),s:Math.round(i*100),v:Math.round(s*100)}},I3=e=>b3(mr(e)),y3=e=>hr(c2(e));var X9=({h:e,s:t,v:o})=>{let a=o*(2-t/100)/2,r=a!==0&&a!==100?(o-a)/Math.min(a,100-a)*100:0;return{h:e,s:Math.round(r),l:Math.round(a)}},Q9=({h:e,s:t,l:o})=>{let a=o+t*Math.min(o,100-o)/100,r=a===0?0:2*(1-o/a)*100;return{h:e,s:Math.round(r),v:Math.round(a)}},M3=e=>{let{r:t,g:o,b:a}=c2(e);return(.299*t+.587*o+.114*a)/255>.5?"#000000":"#ffffff"};var S3=(e,t="hex")=>{switch(t){case"hex":return e.getHex();case"rgb":let o=e.getRgb();return`rgb(${o.r}, ${o.g}, ${o.b})`;case"rgba":let a=e.getRgba();return`rgba(${a.r}, ${a.g}, ${a.b}, ${a.a})`;case"hsl":let r=e.getHsl();return`hsl(${r.h}, ${r.s}%, ${r.l}%)`;case"hsla":let l=e.getHsla();return`hsla(${l.h}, ${l.s}%, ${l.l}%, ${l.a})`;default:qo()}};function R3(e){switch(e.type){case"hex":return{...y3(e.value),a:1};case"rgb":return{...hr(e),a:1};case"rgba":return{...hr(e),a:e.a};case"hsl":return{...Q9(e),a:1};case"hsla":return{...Q9(e),a:1};case"hsv":return{...e,a:1};case"hsva":return{...e};default:qo()}}function Z1(e,t){let o=R3(e);switch(t){case"hex":return I3(o);case"rgb":return mr(o);case"rgba":return{...mr(o),a:o.a};case"hsl":return X9(o);case"hsla":return{...X9(o),a:o.a};case"hsv":return{h:o.h,s:o.s,v:o.v};case"hsva":return o;default:qo()}}var nt=(...e)=>L3(Fs(e)),T1=(e,t,o)=>Math.min(Math.max(e,t),o),F1=e=>Math.round(e);function qo(e){throw new Error("You should never get here.")}var $1=class e{constructor(t){this.colorInput=t,typeof t=="string"?this.color={type:"hex",value:t}:"type"in t?this.color=t:"r"in t?"a"in t?this.color={type:"rgba",...t}:this.color={type:"rgb",...t}:"v"in t?"a"in t?this.color={type:"hsva",...t}:this.color={type:"hsv",...t}:"a"in t?this.color={type:"hsla",...t}:this.color={type:"hsl",...t}}getRgb(){return Z1(this.color,"rgb")}getHsv(){return Z1(this.color,"hsv")}getHsla(){return Z1(this.color,"hsla")}getHsva(){return Z1(this.color,"hsva")}getHex(){return Z1(this.color,"hex")}getHsl(){return Z1(this.color,"hsl")}getRgba(){return Z1(this.color,"rgba")}format(t="hex"){return S3(this,t)}getContrastingColor(){return new e({type:"hex",value:M3(this.getHex())})}},J9=(e,t)=>{let o=e.getBoundingClientRect(),a,r;if("touches"in t){let d=t.touches[0]||t.changedTouches[0];a=d.clientX,r=d.clientY}else a=t.clientX,r=t.clientY;let l=a-o.left,n=r-o.top,i=T1(l/o.width,0,1),s=T1(n/o.height,0,1);return{left:i,top:s}},Lr=({onMove:e,onMoveEnd:t,onKey:o,children:a,className:r,...l})=>{let n=No(null),i=No(!1),s=Be(C=>{!i.current||!n.current||(C.preventDefault(),e(J9(n.current,C)))},[e]),d=Be(()=>{i.current=!1,t(),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",d),document.removeEventListener("touchmove",s),document.removeEventListener("touchend",d)},[s,t]),u=Be(C=>{let c=n.current;c&&(C.preventDefault(),i.current=!0,e(J9(c,C.nativeEvent)),document.addEventListener("mousemove",s),document.addEventListener("mouseup",d),document.addEventListener("touchmove",s,{passive:!1}),document.addEventListener("touchend",d))},[e,s,d]),f=Be(C=>{if(!o)return;let c=C.which||C.keyCode;c<37||c>40||(C.preventDefault(),o({left:c===39?.05:c===37?-.05:0,top:c===40?.05:c===38?-.05:0}))},[o]);return gr(()=>()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",d),document.removeEventListener("touchmove",s),document.removeEventListener("touchend",d)},[s,d]),Se.jsx("div",{ref:n,className:nt("rounded-inherit absolute inset-0 touch-none outline-none","focus:[&_.react-colorful-pointer]:scale-110",r),onTouchStart:u,onMouseDown:u,onKeyDown:f,tabIndex:0,role:"slider",...l,children:a})},wr=({className:e,top:t=.5,left:o,color:a})=>Se.jsx("div",{className:nt("absolute z-[1] h-6 w-6 -translate-x-1/2 -translate-y-1/2 cursor-grab rounded-full border-2 border-white bg-white active:cursor-grabbing","react-colorful-pointer shadow-[0_2px_8px_rgba(0,0,0,0.15)] transition-transform",e),style:{top:`${t*100}%`,left:`${o*100}%`}}),k3=({hsva:e,onChange:t,className:o,onFinishedUpdates:a})=>{let r=Be(s=>{t({a:s.left},!1)},[t]),l=Be(s=>{t({a:T1(e.a+s.left,0,1)},!0)},[e.a,t]),n=Uo(()=>new $1({type:"hsva",h:e.h,s:e.s,v:e.v,a:0}).format("hsla"),[e.h,e.s,e.v]),i=Uo(()=>new $1({type:"hsva",h:e.h,s:e.s,v:e.v,a:1}).format("hsla"),[e.h,e.s,e.v]);return Se.jsx("div",{className:nt("relative h-full w-full",o),children:Se.jsxs(Lr,{onMove:r,onMoveEnd:a,onKey:l,"aria-label":"Alpha","aria-valuetext":`${F1(e.a*100)}%`,"aria-valuenow":F1(e.a*100),"aria-valuemin":0,"aria-valuemax":100,className:"h-full w-full rounded-lg",children:[Se.jsx("div",{className:"absolute inset-0 rounded-lg bg-white",style:{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><rect x="8" width="8" height="8"/><rect y="8" width="8" height="8"/></svg>')`}}),Se.jsx("div",{className:"absolute inset-0 rounded-lg",style:{backgroundImage:`linear-gradient(90deg, ${n}, ${i})`}}),Se.jsx(wr,{className:"z-[1]",top:.5,left:e.a,color:""})]})})},H3=({hue:e,onChange:t,className:o,onFinishedUpdates:a})=>{let r=Be(n=>{let i=F1(T1(360*n.left,0,360));t({h:i},!1)},[t]),l=Be(n=>{t({h:T1(e+n.left*360,0,360)},!0)},[e,t]);return Se.jsx("div",{className:nt("relative h-full w-full",o),children:Se.jsxs(Lr,{onMove:r,onMoveEnd:a,onKey:l,"aria-label":"Hue","aria-valuenow":F1(e),"aria-valuemax":360,"aria-valuemin":0,className:"h-full w-full rounded-lg",children:[Se.jsx("div",{className:"absolute inset-0 rounded-lg",style:{background:"linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%)"}}),Se.jsx(wr,{className:"z-[2]",top:.5,left:e/360,color:""})]})})},P3=({hsva:e,onChange:t,className:o,onFinishedUpdates:a})=>{let r=Be(i=>{let s=F1(T1(i.left*100,0,100)),d=F1(T1(100-i.top*100,0,100));t({s,v:d},!1)},[t]),l=Be(i=>{t({s:T1(e.s+i.left*100,0,100),v:T1(e.v-i.top*100,0,100)},!0)},[e.s,e.v,t]),n=`hsl(${e.h}, 100%, 50%)`;return Se.jsx("div",{className:nt("relative h-full w-full rounded-xl",o),children:Se.jsxs(Lr,{onMove:r,onMoveEnd:a,onKey:l,"aria-label":"Color","aria-valuetext":`Saturation ${F1(e.s)}%, Brightness ${F1(e.v)}%`,className:"rounded-inherit h-full w-full",children:[Se.jsx("div",{className:"rounded-inherit absolute inset-0 rounded-b-none",style:{backgroundColor:n,backgroundImage:"linear-gradient(to top, #000, rgba(0, 0, 0, 0)), linear-gradient(to right, #fff, rgba(255, 255, 255, 0))",boxShadow:"inset 0 0 0 1px rgba(0, 0, 0, 0.05)"}}),Se.jsx(wr,{className:"z-[3]",top:1-e.v/100,left:e.s/100,color:""})]})})},f2=Es(null),zo=()=>{let e=Bs(f2);if(!e)throw new Error("ColorPicker compound components must be used within a ColorPicker");return e};function Y9(e){return"type"in e?new $1(e):e}var T3=({color:e,onChange:t,className:o,children:a,defaultColor:r,...l})=>{let[n,i]=vr(Y9(e??r??{h:340,s:58,v:100,a:1,type:"hsva"})),s=No(!1),d=No(n);gr(()=>{!s.current&&e&&(d.current=Y9(e),i(d.current))},[e]);let u=Be((m,L)=>{let p=new $1({type:"hsva",...d.current.getHsva(),...m});d.current=p,i(p),s.current=!L,t?.(p)},[t]),f=Be(()=>{s.current=!1},[]),C=Be(async()=>{if(!("EyeDropper"in window)){console.log("EyeDropper API not supported");return}try{let m=await new window.EyeDropper().open();m.sRGBHex&&u(Z1({type:"hex",value:m.sRGBHex},"hsva"),!0)}catch(m){console.log("EyeDropper cancelled or failed:",m)}},[t]),c={hsva:n.getHsva(),updateHsva:u,handleEyeDropper:C,onFinishedUpdates:f};return Se.jsx(f2.Provider,{value:c,children:Se.jsx("div",{...l,className:nt("relative flex h-[280px] w-[280px] cursor-default flex-col rounded-2xl bg-white shadow-lg select-none",o),children:a})})},V3=({className:e})=>{let{hsva:t,updateHsva:o,onFinishedUpdates:a}=zo(),r=Be((l,n)=>{o(l,n)},[o]);return Se.jsx(P3,{hsva:t,onChange:r,className:e,onFinishedUpdates:a})},_3=({className:e})=>{let{hsva:t,updateHsva:o,onFinishedUpdates:a}=zo(),r=Be((l,n)=>{o(l,n)},[o]);return Se.jsx(H3,{hue:t.h,onChange:r,className:e,onFinishedUpdates:a})},D3=({className:e})=>{let{hsva:t,updateHsva:o,onFinishedUpdates:a}=zo(),r=Be((l,n)=>{o(l,n)},[o]);return Se.jsx(k3,{hsva:t,onChange:r,className:e,onFinishedUpdates:a})},O3=({className:e,title:t="Pick color from screen",children:o})=>{let{handleEyeDropper:a}=zo(),[r,l]=vr(!1);return gr(()=>{typeof window<"u"&&"EyeDropper"in window&&l(!0)},[]),r?Se.jsx("button",{onClick:a,className:nt("flex h-10 w-10 flex-shrink-0 cursor-pointer items-center justify-center rounded-lg transition-colors hover:bg-gray-100",e),title:t,children:o}):null},yt=Object.assign(T3,{Saturation:V3,Hue:_3,Alpha:D3,EyeDropper:O3});function E3(e,t){switch(t){case"hex":return{type:"hex",value:e.getHex()};case"rgb":return{type:"rgb",...e.getRgb()};case"rgba":return{type:"rgba",...e.getRgba()};case"hsl":return{type:"hsl",...e.getHsl()};case"hsla":return{type:"hsla",...e.getHsla()};case"hsv":return{type:"hsv",...e.getHsv()};case"hsva":return{type:"hsva",...e.getHsva()};default:qo()}}var p2=(e={type:"hex",value:"#ff6b9d"})=>{let[t,o]=vr(()=>{let n=typeof e=="function"?e():e;return{color:new $1(n),type:n.type}}),a=Uo(()=>E3(t.color,t.type),[t.color,t.type]),r=Uo(()=>{let n=t.color.getHsva();return{hex:t.color.getHex(),rgb:t.color.getRgb(),rgba:t.color.getRgba(),hsl:t.color.getHsl(),hsla:t.color.getHsla(),hsv:t.color.getHsv(),hsva:n,alpha:n.a}},[t.color]),l=Be(n=>{try{let i="type"in n?new $1(n):n;o(s=>({color:i,type:s.type}))}catch(i){console.warn("Invalid color input:",n,i)}},[]);return[{colorInput:a,colorState:r},l]};import{createPortal as g7}from"react-dom";import{useRef as g1,useMemo as B3,useEffect as A3,useState as Qf,useCallback as Jf}from"react";function C2(e,t,o,a){var r=this,l=g1(null),n=g1(0),i=g1(0),s=g1(null),d=g1([]),u=g1(),f=g1(),C=g1(e),c=g1(!0),m=g1(),L=g1();C.current=e;var p=typeof window<"u",I=!t&&t!==0&&p;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var h=!!(o=o||{}).leading,V=!("trailing"in o)||!!o.trailing,g=!!o.flushOnExit&&V,S="maxWait"in o,R="debounceOnServer"in o&&!!o.debounceOnServer,G=S?Math.max(+o.maxWait||0,t):null,y=B3(function(){var D=function(w){var b=d.current,x=u.current;return d.current=u.current=null,n.current=w,i.current=i.current||w,f.current=C.current.apply(x,b)},X=function(w,b){I&&cancelAnimationFrame(s.current),s.current=I?requestAnimationFrame(w):setTimeout(w,b)},Q=function(w){if(!c.current)return!1;var b=w-l.current;return!l.current||b>=t||b<0||S&&w-n.current>=G},J=function(w){return s.current=null,V&&d.current?D(w):(d.current=u.current=null,f.current)},Z=function w(){var b=Date.now();if(h&&i.current===n.current&&E(),Q(b))return J(b);if(c.current){var x=t-(b-l.current),O=S?Math.min(x,G-(b-n.current)):x;X(w,O)}},E=function(){a&&a({})},M=function(){if(p||R){var w,b=Date.now(),x=Q(b);if(d.current=[].slice.call(arguments),u.current=r,l.current=b,g&&!m.current&&(m.current=function(){var O;((O=globalThis.document)==null?void 0:O.visibilityState)==="hidden"&&L.current.flush()},(w=globalThis.document)==null||w.addEventListener==null||w.addEventListener("visibilitychange",m.current)),x){if(!s.current&&c.current)return n.current=l.current,X(Z,t),h?D(l.current):f.current;if(S)return X(Z,t),D(l.current)}return s.current||X(Z,t),f.current}};return M.cancel=function(){var w=s.current;w&&(I?cancelAnimationFrame(s.current):clearTimeout(s.current)),n.current=0,d.current=l.current=u.current=s.current=null,w&&a&&a({})},M.isPending=function(){return!!s.current},M.flush=function(){return s.current?J(Date.now()):f.current},M},[h,S,t,G,V,g,I,p,R,a]);return L.current=y,A3(function(){return c.current=!0,function(){var D;g&&L.current.flush(),m.current&&((D=globalThis.document)==null||D.removeEventListener==null||D.removeEventListener("visibilitychange",m.current),m.current=null),c.current=!1}},[g]),y}import Fe from"react";function it(e){let t=e?.parentNode;for(;t;){if(t instanceof ShadowRoot){t=t.host;continue}if(t instanceof HTMLElement){let{overflowY:o}=getComputedStyle(t);if(o==="auto"||o==="scroll")return t}t=t.parentNode}return null}var m2='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';function h2({computePosition:e,onClose:t,autoFocus:o=!0,trapFocus:a=!1}={}){let[r,l]=Fe.useState(!1),[n,i]=Fe.useState({top:0,left:0}),s=Fe.useRef(null),d=Fe.useRef(null),u=Fe.useRef(!1),f=Fe.useRef(e);f.current=e;let C=Fe.useRef(t);C.current=t;let c=Fe.useRef(a);c.current=a;let m=Fe.useCallback((...h)=>{!s.current||!f.current||i(f.current(s.current,...h))},[]),L=Fe.useCallback(()=>{m(),u.current=!0,l(!0)},[m]),p=Fe.useCallback(()=>{C.current&&C.current(),u.current=!1,l(!1),s.current?.focus()},[]),I=Fe.useCallback(()=>{u.current?p():L()},[L,p]);return Fe.useEffect(()=>{if(!r)return;let h=g=>{if(g.key==="Escape"&&(g.preventDefault(),p()),c.current&&g.key==="Tab"){let S=d.current;if(!S)return;let R=Array.from(S.querySelectorAll(m2)).filter(D=>!D.hasAttribute("disabled")),G=R[0],y=R.at(-1);if(!G||!y)return;g.shiftKey&&document.activeElement===G?(g.preventDefault(),y.focus()):!g.shiftKey&&document.activeElement===y&&(g.preventDefault(),G.focus())}},V=g=>{let S=d.current,R=s.current;if(!S||!R)return;let G=typeof g.composedPath=="function"?g.composedPath():[],y=G.includes(S)||g.target instanceof Node&&S.contains(g.target),D=G.includes(R)||g.target instanceof Node&&R.contains(g.target);!y&&!D&&p()};return document.addEventListener("keydown",h),document.addEventListener("mousedown",V),document.addEventListener("touchstart",V),()=>{document.removeEventListener("keydown",h),document.removeEventListener("mousedown",V),document.removeEventListener("touchstart",V)}},[r,p]),Fe.useEffect(()=>{if(!r||!o||!d.current)return;let h=d.current.querySelector(m2);h&&h.focus()},[r,o]),Fe.useEffect(()=>{if(!r||!s.current)return;let h=it(s.current);if(!h)return;let V=()=>p();return h.addEventListener("scroll",V,{passive:!0}),()=>h.removeEventListener("scroll",V)},[r,p]),{isOpen:r,open:L,close:p,toggle:I,triggerRef:s,popoverRef:d,position:n,reposition:m}}var Z3=(e,t)=>{if(typeof e=="number"){if(t===3)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(t===4)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(t===6)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(t===8)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}},jo=Z3;var F3={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},g2=F3;var $3=e=>jo(g2[e.toLowerCase()],6),v2=$3;var N3=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,U3=e=>{let t;return(t=e.match(N3))?jo(parseInt(t[1],16),t[1].length):void 0},x2=U3;var $e="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",c6=`(?:${$e}|none)`,st=`${$e}%`,f6=`(?:${$e}%|none)`,lo=`(?:${$e}%|${$e})`,q3=`(?:${$e}%|${$e}|none)`,L2=`(?:${$e}(deg|grad|rad|turn)|${$e})`,p6=`(?:${$e}(deg|grad|rad|turn)|${$e}|none)`,N1="\\s*,\\s*";var C6=new RegExp("^"+q3+"$");var z3=new RegExp(`^rgba?\\(\\s*${$e}${N1}${$e}${N1}${$e}\\s*(?:,\\s*${lo}\\s*)?\\)$`),j3=new RegExp(`^rgba?\\(\\s*${st}${N1}${st}${N1}${st}\\s*(?:,\\s*${lo}\\s*)?\\)$`),K3=e=>{let t={mode:"rgb"},o;if(o=e.match(z3))o[1]!==void 0&&(t.r=o[1]/255),o[2]!==void 0&&(t.g=o[2]/255),o[3]!==void 0&&(t.b=o[3]/255);else if(o=e.match(j3))o[1]!==void 0&&(t.r=o[1]/100),o[2]!==void 0&&(t.g=o[2]/100),o[3]!==void 0&&(t.b=o[3]/100);else return;return o[4]!==void 0?t.alpha=Math.max(0,Math.min(1,o[4]/100)):o[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+o[5]))),t},w2=K3;var G3=(e,t)=>e===void 0?void 0:typeof e!="object"?dt(e):e.mode!==void 0?e:t?{...e,mode:t}:void 0,Ko=G3;var W3=(e="rgb")=>t=>(t=Ko(t,e))!==void 0?t.mode===e?t:v1[t.mode][e]?v1[t.mode][e](t):e==="rgb"?v1[t.mode].rgb(t):v1.rgb[e](v1[t.mode].rgb(t)):void 0,Je=W3;var v1={},b2={},no=[],br={},X3=e=>e,me=e=>(v1[e.mode]={...v1[e.mode],...e.toMode},Object.keys(e.fromMode||{}).forEach(t=>{v1[t]||(v1[t]={}),v1[t][e.mode]=e.fromMode[t]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(t=>{if(e.ranges[t]===void 0&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw new Error(`Missing interpolator for: ${t}`);typeof e.interpolate[t]=="function"&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=X3)}),b2[e.mode]=e,(e.parse||[]).forEach(t=>{Q3(t,e.mode)}),Je(e.mode)),Go=e=>b2[e],Q3=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");br[e]=t}else typeof e=="function"&&no.indexOf(e)<0&&no.push(e)};var Ir=/[^\x00-\x7F]|[a-zA-Z_]/,J3=/[^\x00-\x7F]|[-\w]/,T={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},te=0;function Wo(e){let t=e[te],o=e[te+1];return t==="-"||t==="+"?/\d/.test(o)||o==="."&&/\d/.test(e[te+2]):t==="."?/\d/.test(o):/\d/.test(t)}function yr(e){if(te>=e.length)return!1;let t=e[te];if(Ir.test(t))return!0;if(t==="-"){if(e.length-te<2)return!1;let o=e[te+1];return!!(o==="-"||Ir.test(o))}return!1}var Y3={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function io(e){let t="";if((e[te]==="-"||e[te]==="+")&&(t+=e[te++]),t+=Xo(e),e[te]==="."&&/\d/.test(e[te+1])&&(t+=e[te++]+Xo(e)),(e[te]==="e"||e[te]==="E")&&((e[te+1]==="-"||e[te+1]==="+")&&/\d/.test(e[te+2])?t+=e[te++]+e[te++]+Xo(e):/\d/.test(e[te+1])&&(t+=e[te++]+Xo(e))),yr(e)){let o=Qo(e);return o==="deg"||o==="rad"||o==="turn"||o==="grad"?{type:T.Hue,value:t*Y3[o]}:void 0}return e[te]==="%"?(te++,{type:T.Percentage,value:+t}):{type:T.Number,value:+t}}function Xo(e){let t="";for(;/\d/.test(e[te]);)t+=e[te++];return t}function Qo(e){let t="";for(;te<e.length&&J3.test(e[te]);)t+=e[te++];return t}function ed(e){let t=Qo(e);return e[te]==="("?(te++,{type:T.Function,value:t}):t==="none"?{type:T.None,value:void 0}:{type:T.Ident,value:t}}function td(e=""){let t=e.trim(),o=[],a;for(te=0;te<t.length;){if(a=t[te++],a===`
2
+ `||a===" "||a===" "){for(;te<t.length&&(t[te]===`
3
+ `||t[te]===" "||t[te]===" ");)te++;continue}if(a===",")return;if(a===")"){o.push({type:T.ParenClose});continue}if(a==="+"){if(te--,Wo(t)){o.push(io(t));continue}return}if(a==="-"){if(te--,Wo(t)){o.push(io(t));continue}if(yr(t)){o.push({type:T.Ident,value:Qo(t)});continue}return}if(a==="."){if(te--,Wo(t)){o.push(io(t));continue}return}if(a==="/"){for(;te<t.length&&(t[te]===`
4
+ `||t[te]===" "||t[te]===" ");)te++;let r;if(Wo(t)&&(r=io(t),r.type!==T.Hue)){o.push({type:T.Alpha,value:r});continue}if(yr(t)&&Qo(t)==="none"){o.push({type:T.Alpha,value:{type:T.None,value:void 0}});continue}return}if(/\d/.test(a)){te--,o.push(io(t));continue}if(Ir.test(a)){te--,o.push(ed(t));continue}return}return o}function od(e){e._i=0;let t=e[e._i++];if(!t||t.type!==T.Function||t.value!=="color"||(t=e[e._i++],t.type!==T.Ident))return;let o=br[t.value];if(!o)return;let a={mode:o},r=I2(e,!1);if(!r)return;let l=Go(o).channels;for(let n=0,i,s;n<l.length;n++)i=r[n],s=l[n],i.type!==T.None&&(a[s]=i.type===T.Number?i.value:i.value/100,s==="alpha"&&(a[s]=Math.max(0,Math.min(1,a[s]))));return a}function I2(e,t){let o=[],a;for(;e._i<e.length;){if(a=e[e._i++],a.type===T.None||a.type===T.Number||a.type===T.Alpha||a.type===T.Percentage||t&&a.type===T.Hue){o.push(a);continue}if(a.type===T.ParenClose){if(e._i<e.length)return;continue}return}if(!(o.length<3||o.length>4)){if(o.length===4){if(o[3].type!==T.Alpha)return;o[3]=o[3].value}return o.length===3&&o.push({type:T.None,value:void 0}),o.every(r=>r.type!==T.Alpha)?o:void 0}}function ad(e,t){e._i=0;let o=e[e._i++];if(!o||o.type!==T.Function)return;let a=I2(e,t);if(a)return a.unshift(o.value),a}var rd=e=>{if(typeof e!="string")return;let t=td(e),o=t?ad(t,!0):void 0,a,r=0,l=no.length;for(;r<l;)if((a=no[r++](e,o))!==void 0)return a;return t?od(t):void 0},dt=rd;function ld(e,t){if(!t||t[0]!=="rgb"&&t[0]!=="rgba")return;let o={mode:"rgb"},[,a,r,l,n]=t;if(!(a.type===T.Hue||r.type===T.Hue||l.type===T.Hue))return a.type!==T.None&&(o.r=a.type===T.Number?a.value/255:a.value/100),r.type!==T.None&&(o.g=r.type===T.Number?r.value/255:r.value/100),l.type!==T.None&&(o.b=l.type===T.Number?l.value/255:l.value/100),n.type!==T.None&&(o.alpha=Math.min(1,Math.max(0,n.type===T.Number?n.value:n.value/100))),o}var y2=ld;var nd=e=>e==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,M2=nd;var S2=(e,t,o)=>e+o*(t-e);var id=e=>{let t=[];for(let o=0;o<e.length-1;o++){let a=e[o],r=e[o+1];a===void 0&&r===void 0?t.push(void 0):a!==void 0&&r!==void 0?t.push([a,r]):t.push(a!==void 0?[a,a]:[r,r])}return t},R2=e=>t=>{let o=id(t);return a=>{let r=a*o.length,l=a>=1?o.length-1:Math.max(Math.floor(r),0),n=o[l];return n===void 0?void 0:e(n[0],n[1],r-l)}};var _=R2(S2);var ue=e=>{let t=!1,o=e.map(a=>a!==void 0?(t=!0,a):1);return t?o:e};var sd={mode:"rgb",channels:["r","g","b","alpha"],parse:[y2,x2,w2,v2,M2,"srgb"],serialize:"srgb",interpolate:{r:_,g:_,b:_,alpha:{use:_,fixup:ue}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},r1=sd;var Mr=(e=0)=>Math.pow(Math.abs(e),2.19921875)*Math.sign(e),dd=e=>{let t=Mr(e.r),o=Mr(e.g),a=Mr(e.b),r={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*o+.1882286462349947*a,y:.297344975250536*t+.6273635662554661*o+.0752914584939979*a,z:.0270313613864123*t+.0706888525358272*o+.9913375368376386*a};return e.alpha!==void 0&&(r.alpha=e.alpha),r},Sr=dd;var Rr=e=>Math.pow(Math.abs(e),.4547069271758437)*Math.sign(e),ud=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r={mode:"a98",r:Rr(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*o),g:Rr(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*o),b:Rr(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*o)};return a!==void 0&&(r.alpha=a),r},kr=ud;var Hr=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},cd=({r:e,g:t,b:o,alpha:a})=>{let r={mode:"lrgb",r:Hr(e),g:Hr(t),b:Hr(o)};return a!==void 0&&(r.alpha=a),r},l1=cd;var fd=e=>{let{r:t,g:o,b:a,alpha:r}=l1(e),l={mode:"xyz65",x:.4123907992659593*t+.357584339383878*o+.1804807884018343*a,y:.2126390058715102*t+.715168678767756*o+.0721923153607337*a,z:.0193308187155918*t+.119194779794626*o+.9505321522496607*a};return r!==void 0&&(l.alpha=r),l},je=fd;var Pr=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,.4166666666666667)-.055):e*12.92},pd=({r:e,g:t,b:o,alpha:a},r="rgb")=>{let l={mode:r,r:Pr(e),g:Pr(t),b:Pr(o)};return a!==void 0&&(l.alpha=a),l},n1=pd;var Cd=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=n1({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*o,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*o,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*o});return a!==void 0&&(r.alpha=a),r},Ke=Cd;var md={...r1,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>kr(je(e)),xyz65:kr},toMode:{rgb:e=>Ke(Sr(e)),xyz65:Sr}},k2=md;var hd=e=>(e=e%360)<0?e+360:e,ge=hd;var gd=(e,t)=>e.map((o,a,r)=>{if(o===void 0)return o;let l=ge(o);return a===0||e[a-1]===void 0?l:t(l-ge(r[a-1]))}).reduce((o,a)=>!o.length||a===void 0||o[o.length-1]===void 0?(o.push(a),o):(o.push(a+o[o.length-1]),o),[]),_e=e=>gd(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t));var ke=[-.14861,1.78277,-.29227,-.90649,1.97294,0],H2=Math.PI/180,P2=180/Math.PI;var T2=ke[3]*ke[4],V2=ke[1]*ke[4],_2=ke[1]*ke[2]-ke[0]*ke[3],vd=({r:e,g:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=(_2*o+e*T2-t*V2)/(_2+T2-V2),l=o-r,n=(ke[4]*(t-r)-ke[2]*l)/ke[3],i={mode:"cubehelix",l:r,s:r===0||r===1?void 0:Math.sqrt(l*l+n*n)/(ke[4]*r*(1-r))};return i.s&&(i.h=Math.atan2(n,l)*P2-120),a!==void 0&&(i.alpha=a),i},D2=vd;var xd=({h:e,s:t,l:o,alpha:a})=>{let r={mode:"rgb"};e=(e===void 0?0:e+120)*H2,o===void 0&&(o=0);let l=t===void 0?0:t*o*(1-o),n=Math.cos(e),i=Math.sin(e);return r.r=o+l*(ke[0]*n+ke[1]*i),r.g=o+l*(ke[2]*n+ke[3]*i),r.b=o+l*(ke[4]*n+ke[5]*i),a!==void 0&&(r.alpha=a),r},O2=xd;var U1=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let o=ge(e.h),a=ge(t.h),r=Math.sin((a-o+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*r},E2=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let o=ge(e.h),a=ge(t.h);return Math.abs(a-o)>180?o-(a-360*Math.sign(a-o)):a-o},q1=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let o=ge(e.h),a=ge(t.h),r=Math.sin((a-o+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*r};var De=e=>{let t=e.reduce((a,r)=>{if(r!==void 0){let l=r*Math.PI/180;a.sin+=Math.sin(l),a.cos+=Math.cos(l)}return a},{sin:0,cos:0}),o=Math.atan2(t.sin,t.cos)*180/Math.PI;return o<0?360+o:o};var Ld={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:D2},toMode:{rgb:O2},interpolate:{h:{use:_,fixup:_e},s:_,l:_,alpha:{use:_,fixup:ue}},difference:{h:U1},average:{h:De}},B2=Ld;var wd=({l:e,a:t,b:o,alpha:a},r="lch")=>{t===void 0&&(t=0),o===void 0&&(o=0);let l=Math.sqrt(t*t+o*o),n={mode:r,l:e,c:l};return l&&(n.h=ge(Math.atan2(o,t)*180/Math.PI)),a!==void 0&&(n.alpha=a),n},Ye=wd;var bd=({l:e,c:t,h:o,alpha:a},r="lab")=>{o===void 0&&(o=0);let l={mode:r,l:e,a:t?t*Math.cos(o/180*Math.PI):0,b:t?t*Math.sin(o/180*Math.PI):0};return a!==void 0&&(l.alpha=a),l},e1=bd;var Jo=Math.pow(29,3)/Math.pow(3,3),Yo=Math.pow(6,3)/Math.pow(29,3);var Ie={X:.9642956764295677,Y:1,Z:.8251046025104602},z1={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},Rp=Math.pow(29,3)/Math.pow(3,3),kp=Math.pow(6,3)/Math.pow(29,3);var Tr=e=>Math.pow(e,3)>Yo?Math.pow(e,3):(116*e-16)/Jo,Id=({l:e,a:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=(e+16)/116,l=t/500+r,n=r-o/200,i={mode:"xyz65",x:Tr(l)*z1.X,y:Tr(r)*z1.Y,z:Tr(n)*z1.Z};return a!==void 0&&(i.alpha=a),i},ea=Id;var yd=e=>Ke(ea(e)),j1=yd;var Vr=e=>e>Yo?Math.cbrt(e):(Jo*e+16)/116,Md=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Vr(e/z1.X),l=Vr(t/z1.Y),n=Vr(o/z1.Z),i={mode:"lab65",l:116*l-16,a:500*(r-l),b:200*(l-n)};return a!==void 0&&(i.alpha=a),i},ta=Md;var Sd=e=>{let t=ta(je(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},K1=Sd;var ut=.14444444444444443*Math.PI,Mt=Math.cos(ut),St=Math.sin(ut),oa=100/Math.log(139/100);var Rd=({l:e,c:t,h:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r={mode:"lab65",l:(Math.exp(e*1/oa)-1)/.0039},l=(Math.exp(.0435*t*1*1)-1)/.075,n=l*Math.cos(o/180*Math.PI-ut),i=l*Math.sin(o/180*Math.PI-ut);return r.a=n*Mt-i/.83*St,r.b=n*St+i/.83*Mt,a!==void 0&&(r.alpha=a),r},uo=Rd;var kd=({l:e,a:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=t*Mt+o*St,l=.83*(o*Mt-t*St),n=Math.sqrt(r*r+l*l),i={mode:"dlch",l:oa/1*Math.log(1+.0039*e),c:Math.log(1+.075*n)/(.0435*1*1)};return i.c&&(i.h=ge((Math.atan2(l,r)+ut)/Math.PI*180)),a!==void 0&&(i.alpha=a),i},co=kd;var A2=e=>uo(Ye(e,"dlch")),Z2=e=>e1(co(e),"dlab"),Hd={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:A2,rgb:e=>j1(A2(e))},fromMode:{lab65:Z2,rgb:e=>Z2(K1(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:_,a:_,b:_,alpha:{use:_,fixup:ue}}},F2=Hd;var Pd={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:uo,dlab:e=>e1(e,"dlab"),rgb:e=>j1(uo(e))},fromMode:{lab65:co,dlab:e=>Ye(e,"dlch"),rgb:e=>co(K1(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:_,c:_,h:{use:_,fixup:_e},alpha:{use:_,fixup:ue}},difference:{h:q1},average:{h:De}},$2=Pd;function Dr({h:e,s:t,i:o,alpha:a}){e=ge(e!==void 0?e:0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.abs(e/60%2-1),l;switch(Math.floor(e/60)){case 0:l={r:o*(1+t*(3/(2-r)-1)),g:o*(1+t*(3*(1-r)/(2-r)-1)),b:o*(1-t)};break;case 1:l={r:o*(1+t*(3*(1-r)/(2-r)-1)),g:o*(1+t*(3/(2-r)-1)),b:o*(1-t)};break;case 2:l={r:o*(1-t),g:o*(1+t*(3/(2-r)-1)),b:o*(1+t*(3*(1-r)/(2-r)-1))};break;case 3:l={r:o*(1-t),g:o*(1+t*(3*(1-r)/(2-r)-1)),b:o*(1+t*(3/(2-r)-1))};break;case 4:l={r:o*(1+t*(3*(1-r)/(2-r)-1)),g:o*(1-t),b:o*(1+t*(3/(2-r)-1))};break;case 5:l={r:o*(1+t*(3/(2-r)-1)),g:o*(1-t),b:o*(1+t*(3*(1-r)/(2-r)-1))};break;default:l={r:o*(1-t),g:o*(1-t),b:o*(1-t)}}return l.mode="rgb",a!==void 0&&(l.alpha=a),l}function Or({r:e,g:t,b:o,alpha:a}){e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.max(e,t,o),l=Math.min(e,t,o),n={mode:"hsi",s:e+t+o===0?0:1-3*l/(e+t+o),i:(e+t+o)/3};return r-l!==0&&(n.h=(r===e?(t-o)/(r-l)+(t<o)*6:r===t?(o-e)/(r-l)+2:(e-t)/(r-l)+4)*60),a!==void 0&&(n.alpha=a),n}var Td={mode:"hsi",toMode:{rgb:Dr},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:Or},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:_,fixup:_e},s:_,i:_,alpha:{use:_,fixup:ue}},difference:{h:U1},average:{h:De}},N2=Td;function Er({h:e,s:t,l:o,alpha:a}){e=ge(e!==void 0?e:0),t===void 0&&(t=0),o===void 0&&(o=0);let r=o+t*(o<.5?o:1-o),l=r-(r-o)*2*Math.abs(e/60%2-1),n;switch(Math.floor(e/60)){case 0:n={r,g:l,b:2*o-r};break;case 1:n={r:l,g:r,b:2*o-r};break;case 2:n={r:2*o-r,g:r,b:l};break;case 3:n={r:2*o-r,g:l,b:r};break;case 4:n={r:l,g:2*o-r,b:r};break;case 5:n={r,g:2*o-r,b:l};break;default:n={r:2*o-r,g:2*o-r,b:2*o-r}}return n.mode="rgb",a!==void 0&&(n.alpha=a),n}function Br({r:e,g:t,b:o,alpha:a}){e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.max(e,t,o),l=Math.min(e,t,o),n={mode:"hsl",s:r===l?0:(r-l)/(1-Math.abs(r+l-1)),l:.5*(r+l)};return r-l!==0&&(n.h=(r===e?(t-o)/(r-l)+(t<o)*6:r===t?(o-e)/(r-l)+2:(e-t)/(r-l)+4)*60),a!==void 0&&(n.alpha=a),n}var Vd=(e,t)=>{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return e*360}},U2=Vd;var _d=new RegExp(`^hsla?\\(\\s*${L2}${N1}${st}${N1}${st}\\s*(?:,\\s*${lo}\\s*)?\\)$`),Dd=e=>{let t=e.match(_d);if(!t)return;let o={mode:"hsl"};return t[3]!==void 0?o.h=+t[3]:t[1]!==void 0&&t[2]!==void 0&&(o.h=U2(t[1],t[2])),t[4]!==void 0&&(o.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(o.l=Math.min(Math.max(0,t[5]/100),1)),t[6]!==void 0?o.alpha=Math.max(0,Math.min(1,t[6]/100)):t[7]!==void 0&&(o.alpha=Math.max(0,Math.min(1,+t[7]))),o},q2=Dd;function Od(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;let o={mode:"hsl"},[,a,r,l,n]=t;if(a.type!==T.None){if(a.type===T.Percentage)return;o.h=a.value}if(r.type!==T.None){if(r.type===T.Hue)return;o.s=r.value/100}if(l.type!==T.None){if(l.type===T.Hue)return;o.l=l.value/100}return n.type!==T.None&&(o.alpha=Math.min(1,Math.max(0,n.type===T.Number?n.value:n.value/100))),o}var z2=Od;var Ed={mode:"hsl",toMode:{rgb:Er},fromMode:{rgb:Br},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[z2,q2],serialize:e=>`hsl(${e.h!==void 0?e.h:"none"} ${e.s!==void 0?e.s*100+"%":"none"} ${e.l!==void 0?e.l*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:_,fixup:_e},s:_,l:_,alpha:{use:_,fixup:ue}},difference:{h:U1},average:{h:De}},aa=Ed;function fo({h:e,s:t,v:o,alpha:a}){e=ge(e!==void 0?e:0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.abs(e/60%2-1),l;switch(Math.floor(e/60)){case 0:l={r:o,g:o*(1-t*r),b:o*(1-t)};break;case 1:l={r:o*(1-t*r),g:o,b:o*(1-t)};break;case 2:l={r:o*(1-t),g:o,b:o*(1-t*r)};break;case 3:l={r:o*(1-t),g:o*(1-t*r),b:o};break;case 4:l={r:o*(1-t*r),g:o*(1-t),b:o};break;case 5:l={r:o,g:o*(1-t),b:o*(1-t*r)};break;default:l={r:o*(1-t),g:o*(1-t),b:o*(1-t)}}return l.mode="rgb",a!==void 0&&(l.alpha=a),l}function po({r:e,g:t,b:o,alpha:a}){e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.max(e,t,o),l=Math.min(e,t,o),n={mode:"hsv",s:r===0?0:1-l/r,v:r};return r-l!==0&&(n.h=(r===e?(t-o)/(r-l)+(t<o)*6:r===t?(o-e)/(r-l)+2:(e-t)/(r-l)+4)*60),a!==void 0&&(n.alpha=a),n}var Bd={mode:"hsv",toMode:{rgb:fo},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:po},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:_,fixup:_e},s:_,v:_,alpha:{use:_,fixup:ue}},difference:{h:U1},average:{h:De}},ra=Bd;function Ar({h:e,w:t,b:o,alpha:a}){if(t===void 0&&(t=0),o===void 0&&(o=0),t+o>1){let r=t+o;t/=r,o/=r}return fo({h:e,s:o===1?1:1-t/(1-o),v:1-o,alpha:a})}function Zr(e){let t=po(e);if(t===void 0)return;let o=t.s!==void 0?t.s:0,a=t.v!==void 0?t.v:0,r={mode:"hwb",w:(1-o)*a,b:1-a};return t.h!==void 0&&(r.h=t.h),t.alpha!==void 0&&(r.alpha=t.alpha),r}function Ad(e,t){if(!t||t[0]!=="hwb")return;let o={mode:"hwb"},[,a,r,l,n]=t;if(a.type!==T.None){if(a.type===T.Percentage)return;o.h=a.value}if(r.type!==T.None){if(r.type===T.Hue)return;o.w=r.value/100}if(l.type!==T.None){if(l.type===T.Hue)return;o.b=l.value/100}return n.type!==T.None&&(o.alpha=Math.min(1,Math.max(0,n.type===T.Number?n.value:n.value/100))),o}var j2=Ad;var Zd={mode:"hwb",toMode:{rgb:Ar},fromMode:{rgb:Zr},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[j2],serialize:e=>`hwb(${e.h!==void 0?e.h:"none"} ${e.w!==void 0?e.w*100+"%":"none"} ${e.b!==void 0?e.b*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:_,fixup:_e},w:_,b:_,alpha:{use:_,fixup:ue}},difference:{h:E2},average:{h:De}},K2=Zd;var Rt=.1593017578125,G2=78.84375,kt=.8359375,Ht=18.8515625,Pt=18.6875;function la(e){if(e<0)return 0;let t=Math.pow(e,1/G2);return 1e4*Math.pow(Math.max(0,t-kt)/(Ht-Pt*t),1/Rt)}function na(e){if(e<0)return 0;let t=Math.pow(e/1e4,Rt);return Math.pow((kt+Ht*t)/(1+Pt*t),G2)}var Fr=e=>Math.max(e/203,0),$d=({i:e,t,p:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=la(e+.008609037037932761*t+.11102962500302593*o),l=la(e-.00860903703793275*t-.11102962500302599*o),n=la(e+.5600313357106791*t-.32062717498731885*o),i={mode:"xyz65",x:Fr(2.070152218389422*r-1.3263473389671556*l+.2066510476294051*n),y:Fr(.3647385209748074*r+.680566024947227*l-.0453045459220346*n),z:Fr(-.049747207535812*r-.0492609666966138*l+1.1880659249923042*n)};return a!==void 0&&(i.alpha=a),i},$r=$d;var Nr=(e=0)=>Math.max(e*203,0),Nd=({x:e,y:t,z:o,alpha:a})=>{let r=Nr(e),l=Nr(t),n=Nr(o),i=na(.3592832590121217*r+.6976051147779502*l-.0358915932320289*n),s=na(-.1920808463704995*r+1.1004767970374323*l+.0753748658519118*n),d=na(.0070797844607477*r+.0748396662186366*l+.8433265453898765*n),u=.5*i+.5*s,f=1.61376953125*i-3.323486328125*s+1.709716796875*d,C=4.378173828125*i-4.24560546875*s-.132568359375*d,c={mode:"itp",i:u,t:f,p:C};return a!==void 0&&(c.alpha=a),c},Ur=Nd;var Ud={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:$r,rgb:e=>Ke($r(e))},fromMode:{xyz65:Ur,rgb:e=>Ur(je(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:_,t:_,p:_,alpha:{use:_,fixup:ue}}},W2=Ud;var qd=134.03437499999998,zd=16295499532821565e-27,qr=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,Rt);return Math.pow((kt+Ht*t)/(1+Pt*t),qd)},zr=(e=0)=>Math.max(e*203,0),jd=({x:e,y:t,z:o,alpha:a})=>{e=zr(e),t=zr(t),o=zr(o);let r=1.15*e-.15*o,l=.66*t+.34*e,n=qr(.41478972*r+.579999*l+.014648*o),i=qr(-.20151*r+1.120649*l+.0531008*o),s=qr(-.0166008*r+.2648*l+.6684799*o),d=(n+i)/2,u={mode:"jab",j:.44*d/(1-.56*d)-zd,a:3.524*n-4.066708*i+.542708*s,b:.199076*n+1.096799*i-1.295875*s};return a!==void 0&&(u.alpha=a),u},ia=jd;var Kd=134.03437499999998,X2=16295499532821565e-27,jr=e=>{if(e<0)return 0;let t=Math.pow(e,1/Kd);return 1e4*Math.pow((kt-t)/(Pt*t-Ht),1/Rt)},Kr=e=>e/203,Gd=({j:e,a:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=(e+X2)/(.44+.56*(e+X2)),l=jr(r+.13860504*t+.058047316*o),n=jr(r-.13860504*t-.058047316*o),i=jr(r-.096019242*t-.8118919*o),s={mode:"xyz65",x:Kr(1.661373024652174*l-.914523081304348*n+.23136208173913045*i),y:Kr(-.3250758611844533*l+1.571847026732543*n-.21825383453227928*i),z:Kr(-.090982811*l-.31272829*n+1.5227666*i)};return a!==void 0&&(s.alpha=a),s},sa=Gd;var Wd=e=>{let t=ia(je(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},da=Wd;var Xd=e=>Ke(sa(e)),ua=Xd;var Qd={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:da,xyz65:ia},toMode:{rgb:ua,xyz65:sa},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:_,a:_,b:_,alpha:{use:_,fixup:ue}}},Q2=Qd;var Jd=({j:e,a:t,b:o,alpha:a})=>{t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.sqrt(t*t+o*o),l={mode:"jch",j:e,c:r};return r&&(l.h=ge(Math.atan2(o,t)*180/Math.PI)),a!==void 0&&(l.alpha=a),l},Gr=Jd;var Yd=({j:e,c:t,h:o,alpha:a})=>{o===void 0&&(o=0);let r={mode:"jab",j:e,a:t?t*Math.cos(o/180*Math.PI):0,b:t?t*Math.sin(o/180*Math.PI):0};return a!==void 0&&(r.alpha=a),r},Wr=Yd;var eu={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Wr,rgb:e=>ua(Wr(e))},fromMode:{rgb:e=>Gr(da(e)),jab:Gr},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:_,fixup:_e},c:_,j:_,alpha:{use:_,fixup:ue}},difference:{h:q1},average:{h:De}},J2=eu;var G1=Math.pow(29,3)/Math.pow(3,3),Tt=Math.pow(6,3)/Math.pow(29,3);var Xr=e=>Math.pow(e,3)>Tt?Math.pow(e,3):(116*e-16)/G1,tu=({l:e,a:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=(e+16)/116,l=t/500+r,n=r-o/200,i={mode:"xyz50",x:Xr(l)*Ie.X,y:Xr(r)*Ie.Y,z:Xr(n)*Ie.Z};return a!==void 0&&(i.alpha=a),i},Vt=tu;var ou=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=n1({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*o,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*o,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*o});return a!==void 0&&(r.alpha=a),r},w1=ou;var au=e=>w1(Vt(e)),ca=au;var ru=e=>{let{r:t,g:o,b:a,alpha:r}=l1(e),l={mode:"xyz50",x:.436065742824811*t+.3851514688337912*o+.14307845442264197*a,y:.22249319175623702*t+.7168870538238823*o+.06061979053616537*a,z:.013923904500943465*t+.09708128566574634*o+.7140993584005155*a};return r!==void 0&&(l.alpha=r),l},b1=ru;var Qr=e=>e>Tt?Math.cbrt(e):(G1*e+16)/116,lu=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Qr(e/Ie.X),l=Qr(t/Ie.Y),n=Qr(o/Ie.Z),i={mode:"lab",l:116*l-16,a:500*(r-l),b:200*(l-n)};return a!==void 0&&(i.alpha=a),i},_t=lu;var nu=e=>{let t=_t(b1(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},fa=nu;function iu(e,t){if(!t||t[0]!=="lab")return;let o={mode:"lab"},[,a,r,l,n]=t;if(!(a.type===T.Hue||r.type===T.Hue||l.type===T.Hue))return a.type!==T.None&&(o.l=Math.min(Math.max(0,a.value),100)),r.type!==T.None&&(o.a=r.type===T.Number?r.value:r.value*125/100),l.type!==T.None&&(o.b=l.type===T.Number?l.value:l.value*125/100),n.type!==T.None&&(o.alpha=Math.min(1,Math.max(0,n.type===T.Number?n.value:n.value/100))),o}var Y2=iu;var su={mode:"lab",toMode:{xyz50:Vt,rgb:ca},fromMode:{xyz50:_t,rgb:fa},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[Y2],serialize:e=>`lab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:_,a:_,b:_,alpha:{use:_,fixup:ue}}},Dt=su;var du={...Dt,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:ea,rgb:j1},fromMode:{xyz65:ta,rgb:K1},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}},e0=du;function uu(e,t){if(!t||t[0]!=="lch")return;let o={mode:"lch"},[,a,r,l,n]=t;if(a.type!==T.None){if(a.type===T.Hue)return;o.l=Math.min(Math.max(0,a.value),100)}if(r.type!==T.None&&(o.c=Math.max(0,r.type===T.Number?r.value:r.value*150/100)),l.type!==T.None){if(l.type===T.Percentage)return;o.h=l.value}return n.type!==T.None&&(o.alpha=Math.min(1,Math.max(0,n.type===T.Number?n.value:n.value/100))),o}var t0=uu;var cu={mode:"lch",toMode:{lab:e1,rgb:e=>ca(e1(e))},fromMode:{rgb:e=>Ye(fa(e)),lab:Ye},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[t0],serialize:e=>`lch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:_,fixup:_e},c:_,l:_,alpha:{use:_,fixup:ue}},difference:{h:q1},average:{h:De}},Ot=cu;var fu={...Ot,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>e1(e,"lab65"),rgb:e=>j1(e1(e,"lab65"))},fromMode:{rgb:e=>Ye(K1(e),"lch65"),lab65:e=>Ye(e,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}},o0=fu;var pu=({l:e,u:t,v:o,alpha:a})=>{t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.sqrt(t*t+o*o),l={mode:"lchuv",l:e,c:r};return r&&(l.h=ge(Math.atan2(o,t)*180/Math.PI)),a!==void 0&&(l.alpha=a),l},Jr=pu;var Cu=({l:e,c:t,h:o,alpha:a})=>{o===void 0&&(o=0);let r={mode:"luv",l:e,u:t?t*Math.cos(o/180*Math.PI):0,v:t?t*Math.sin(o/180*Math.PI):0};return a!==void 0&&(r.alpha=a),r},Yr=Cu;var a0=(e,t,o)=>4*e/(e+15*t+3*o),r0=(e,t,o)=>9*t/(e+15*t+3*o),mu=a0(Ie.X,Ie.Y,Ie.Z),hu=r0(Ie.X,Ie.Y,Ie.Z),gu=e=>e<=Tt?G1*e:116*Math.cbrt(e)-16,vu=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=gu(t/Ie.Y),l=a0(e,t,o),n=r0(e,t,o);!isFinite(l)||!isFinite(n)?r=l=n=0:(l=13*r*(l-mu),n=13*r*(n-hu));let i={mode:"luv",l:r,u:l,v:n};return a!==void 0&&(i.alpha=a),i},Co=vu;var xu=(e,t,o)=>4*e/(e+15*t+3*o),Lu=(e,t,o)=>9*t/(e+15*t+3*o),wu=xu(Ie.X,Ie.Y,Ie.Z),bu=Lu(Ie.X,Ie.Y,Ie.Z),Iu=({l:e,u:t,v:o,alpha:a})=>{if(e===void 0&&(e=0),e===0)return{mode:"xyz50",x:0,y:0,z:0};t===void 0&&(t=0),o===void 0&&(o=0);let r=t/(13*e)+wu,l=o/(13*e)+bu,n=Ie.Y*(e<=8?e/G1:Math.pow((e+16)/116,3)),i=n*(9*r)/(4*l),s=n*(12-3*r-20*l)/(4*l),d={mode:"xyz50",x:i,y:n,z:s};return a!==void 0&&(d.alpha=a),d},mo=Iu;var yu=e=>Jr(Co(b1(e))),Mu=e=>w1(mo(Yr(e))),Su={mode:"lchuv",toMode:{luv:Yr,rgb:Mu},fromMode:{rgb:yu,luv:Jr},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:_,fixup:_e},c:_,l:_,alpha:{use:_,fixup:ue}},difference:{h:q1},average:{h:De}},l0=Su;var Ru={...r1,mode:"lrgb",toMode:{rgb:n1},fromMode:{rgb:l1},parse:["srgb-linear"],serialize:"srgb-linear"},n0=Ru;var ku={mode:"luv",toMode:{xyz50:mo,rgb:e=>w1(mo(e))},fromMode:{xyz50:Co,rgb:e=>Co(b1(e))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:_,u:_,v:_,alpha:{use:_,fixup:ue}}},i0=ku;var Hu=({r:e,g:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.cbrt(.412221469470763*e+.5363325372617348*t+.0514459932675022*o),l=Math.cbrt(.2119034958178252*e+.6806995506452344*t+.1073969535369406*o),n=Math.cbrt(.0883024591900564*e+.2817188391361215*t+.6299787016738222*o),i={mode:"oklab",l:.210454268309314*r+.7936177747023054*l-.0040720430116193*n,a:1.9779985324311684*r-2.42859224204858*l+.450593709617411*n,b:.0259040424655478*r+.7827717124575296*l-.8086757549230774*n};return a!==void 0&&(i.alpha=a),i},pa=Hu;var Pu=e=>{let t=pa(l1(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},W1=Pu;var Tu=({l:e,a:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.pow(e+.3963377773761749*t+.2158037573099136*o,3),l=Math.pow(e-.1055613458156586*t-.0638541728258133*o,3),n=Math.pow(e-.0894841775298119*t-1.2914855480194092*o,3),i={mode:"lrgb",r:4.076741636075957*r-3.3077115392580616*l+.2309699031821044*n,g:-1.2684379732850317*r+2.6097573492876887*l-.3413193760026573*n,b:-.0041960761386756*r-.7034186179359362*l+1.7076146940746117*n};return a!==void 0&&(i.alpha=a),i},I1=Tu;var Vu=e=>n1(I1(e)),X1=Vu;function ho(e){let a=1.170873786407767;return .5*(a*e-.206+Math.sqrt((a*e-.206)*(a*e-.206)+4*.03*a*e))}function ct(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function _u(e,t){let o,a,r,l,n,i,s,d;-1.88170328*e-.80936493*t>1?(o=1.19086277,a=1.76576728,r=.59662641,l=.75515197,n=.56771245,i=4.0767416621,s=-3.3077115913,d=.2309699292):1.81444104*e-1.19445276*t>1?(o=.73956515,a=-.45954404,r=.08285427,l=.1254107,n=.14503204,i=-1.2684380046,s=2.6097574011,d=-.3413193965):(o=1.35733652,a=-.00915799,r=-1.1513021,l=-.50559606,n=.00692167,i=-.0041960863,s=-.7034186147,d=1.707614701);let u=o+a*e+r*t+l*e*e+n*e*t,f=.3963377774*e+.2158037573*t,C=-.1055613458*e-.0638541728*t,c=-.0894841775*e-1.291485548*t;{let m=1+u*f,L=1+u*C,p=1+u*c,I=m*m*m,h=L*L*L,V=p*p*p,g=3*f*m*m,S=3*C*L*L,R=3*c*p*p,G=6*f*f*m,y=6*C*C*L,D=6*c*c*p,X=i*I+s*h+d*V,Q=i*g+s*S+d*R,J=i*G+s*y+d*D;u=u-X*Q/(Q*Q-.5*X*J)}return u}function el(e,t){let o=_u(e,t),a=I1({l:1,a:o*e,b:o*t}),r=Math.cbrt(1/Math.max(a.r,a.g,a.b)),l=r*o;return[r,l]}function Du(e,t,o,a,r,l=null){l||(l=el(e,t));let n;if((o-r)*l[1]-(l[0]-r)*a<=0)n=l[1]*r/(a*l[0]+l[1]*(r-o));else{n=l[1]*(r-1)/(a*(l[0]-1)+l[1]*(r-o));{let i=o-r,s=a,d=.3963377774*e+.2158037573*t,u=-.1055613458*e-.0638541728*t,f=-.0894841775*e-1.291485548*t,C=i+s*d,c=i+s*u,m=i+s*f;{let L=r*(1-n)+n*o,p=n*a,I=L+p*d,h=L+p*u,V=L+p*f,g=I*I*I,S=h*h*h,R=V*V*V,G=3*C*I*I,y=3*c*h*h,D=3*m*V*V,X=6*C*C*I,Q=6*c*c*h,J=6*m*m*V,Z=4.0767416621*g-3.3077115913*S+.2309699292*R-1,E=4.0767416621*G-3.3077115913*y+.2309699292*D,M=4.0767416621*X-3.3077115913*Q+.2309699292*J,w=E/(E*E-.5*Z*M),b=-Z*w,x=-1.2684380046*g+2.6097574011*S-.3413193965*R-1,O=-1.2684380046*G+2.6097574011*y-.3413193965*D,P=-1.2684380046*X+2.6097574011*Q-.3413193965*J,A=O/(O*O-.5*x*P),$=-x*A,W=-.0041960863*g-.7034186147*S+1.707614701*R-1,F=-.0041960863*G-.7034186147*y+1.707614701*D,U=-.0041960863*X-.7034186147*Q+1.707614701*J,N=F/(F*F-.5*W*U),H=-W*N;b=w>=0?b:1e6,$=A>=0?$:1e6,H=N>=0?H:1e6,n+=Math.min(b,Math.min($,H))}}}return n}function go(e,t,o=null){o||(o=el(e,t));let a=o[0],r=o[1];return[r/a,r/(1-a)]}function Ca(e,t,o){let a=el(t,o),r=Du(t,o,e,1,e,a),l=go(t,o,a),n=.11516993+1/(7.4477897+4.1590124*o+t*(-2.19557347+1.75198401*o+t*(-2.13704948-10.02301043*o+t*(-4.24894561+5.38770819*o+4.69891013*t)))),i=.11239642+1/(1.6132032-.68124379*o+t*(.40370612+.90148123*o+t*(-.27087943+.6122399*o+t*(.00299215-.45399568*o-.14661872*t)))),s=r/Math.min(e*l[0],(1-e)*l[1]),d=e*n,u=(1-e)*i,f=.9*s*Math.sqrt(Math.sqrt(1/(1/(d*d*d*d)+1/(u*u*u*u))));return d=e*.4,u=(1-e)*.8,[Math.sqrt(1/(1/(d*d)+1/(u*u))),f,r]}function ma(e){let t=e.l!==void 0?e.l:0,o=e.a!==void 0?e.a:0,a=e.b!==void 0?e.b:0,r={mode:"okhsl",l:ho(t)};e.alpha!==void 0&&(r.alpha=e.alpha);let l=Math.sqrt(o*o+a*a);if(!l)return r.s=0,r;let[n,i,s]=Ca(t,o/l,a/l),d;if(l<i){let u=0,f=.8*n,C=1-f/i;d=(l-u)/(f+C*(l-u))*.8}else{let u=i,f=.2*i*i*1.25*1.25/n,C=1-f/(s-i);d=.8+.2*((l-u)/(f+C*(l-u)))}return d&&(r.s=d,r.h=ge(Math.atan2(a,o)*180/Math.PI)),r}function ha(e){let t=e.h!==void 0?e.h:0,o=e.s!==void 0?e.s:0,a=e.l!==void 0?e.l:0,r={mode:"oklab",l:ct(a)};if(e.alpha!==void 0&&(r.alpha=e.alpha),!o||a===1)return r.a=r.b=0,r;let l=Math.cos(t/180*Math.PI),n=Math.sin(t/180*Math.PI),[i,s,d]=Ca(r.l,l,n),u,f,C,c;o<.8?(u=1.25*o,f=0,C=.8*i,c=1-C/s):(u=5*(o-.8),f=s,C=.2*s*s*1.25*1.25/i,c=1-C/(d-s));let m=f+u*C/(1-c*u);return r.a=m*l,r.b=m*n,r}var Ou={...aa,mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:ma,rgb:e=>ma(W1(e))},toMode:{oklab:ha,rgb:e=>X1(ha(e))}},s0=Ou;function ga(e){let t=e.l!==void 0?e.l:0,o=e.a!==void 0?e.a:0,a=e.b!==void 0?e.b:0,r=Math.sqrt(o*o+a*a),l=r?o/r:1,n=r?a/r:1,[i,s]=go(l,n),d=.5,u=1-d/i,f=s/(r+t*s),C=f*t,c=f*r,m=ct(C),L=c*m/C,p=I1({l:m,a:l*L,b:n*L}),I=Math.cbrt(1/Math.max(p.r,p.g,p.b,0));t=t/I,r=r/I*ho(t)/t,t=ho(t);let h={mode:"okhsv",s:r?(d+s)*c/(s*d+s*u*c):0,v:t?t/C:0};return h.s&&(h.h=ge(Math.atan2(a,o)*180/Math.PI)),e.alpha!==void 0&&(h.alpha=e.alpha),h}function va(e){let t={mode:"oklab"};e.alpha!==void 0&&(t.alpha=e.alpha);let o=e.h!==void 0?e.h:0,a=e.s!==void 0?e.s:0,r=e.v!==void 0?e.v:0,l=Math.cos(o/180*Math.PI),n=Math.sin(o/180*Math.PI),[i,s]=go(l,n),d=.5,u=1-d/i,f=1-a*d/(d+s-s*u*a),C=a*s*d/(d+s-s*u*a),c=ct(f),m=C*c/f,L=I1({l:c,a:l*m,b:n*m}),p=Math.cbrt(1/Math.max(L.r,L.g,L.b,0)),I=ct(r*f),h=C*I/f;return t.l=I*p,t.a=h*l*p,t.b=h*n*p,t}var Eu={...ra,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:ga,rgb:e=>ga(W1(e))},toMode:{oklab:va,rgb:e=>X1(va(e))}},d0=Eu;function Bu(e,t){if(!t||t[0]!=="oklab")return;let o={mode:"oklab"},[,a,r,l,n]=t;if(!(a.type===T.Hue||r.type===T.Hue||l.type===T.Hue))return a.type!==T.None&&(o.l=Math.min(Math.max(0,a.type===T.Number?a.value:a.value/100),1)),r.type!==T.None&&(o.a=r.type===T.Number?r.value:r.value*.4/100),l.type!==T.None&&(o.b=l.type===T.Number?l.value:l.value*.4/100),n.type!==T.None&&(o.alpha=Math.min(1,Math.max(0,n.type===T.Number?n.value:n.value/100))),o}var u0=Bu;var Au={...Dt,mode:"oklab",toMode:{lrgb:I1,rgb:X1},fromMode:{lrgb:pa,rgb:W1},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[u0],serialize:e=>`oklab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`},c0=Au;function Zu(e,t){if(!t||t[0]!=="oklch")return;let o={mode:"oklch"},[,a,r,l,n]=t;if(a.type!==T.None){if(a.type===T.Hue)return;o.l=Math.min(Math.max(0,a.type===T.Number?a.value:a.value/100),1)}if(r.type!==T.None&&(o.c=Math.max(0,r.type===T.Number?r.value:r.value*.4/100)),l.type!==T.None){if(l.type===T.Percentage)return;o.h=l.value}return n.type!==T.None&&(o.alpha=Math.min(1,Math.max(0,n.type===T.Number?n.value:n.value/100))),o}var f0=Zu;var Fu={...Ot,mode:"oklch",toMode:{oklab:e=>e1(e,"oklab"),rgb:e=>X1(e1(e,"oklab"))},fromMode:{rgb:e=>Ye(W1(e),"oklch"),oklab:e=>Ye(e,"oklch")},parse:[f0],serialize:e=>`oklch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}},p0=Fu;var $u=e=>{let{r:t,g:o,b:a,alpha:r}=l1(e),l={mode:"xyz65",x:.486570948648216*t+.265667693169093*o+.1982172852343625*a,y:.2289745640697487*t+.6917385218365062*o+.079286914093745*a,z:0*t+.0451133818589026*o+1.043944368900976*a};return r!==void 0&&(l.alpha=r),l},tl=$u;var Nu=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=n1({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*o,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*o,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*o},"p3");return a!==void 0&&(r.alpha=a),r},ol=Nu;var Uu={...r1,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>ol(je(e)),xyz65:ol},toMode:{rgb:e=>Ke(tl(e)),xyz65:tl}},C0=Uu;var al=e=>{let t=Math.abs(e);return t>=.001953125?Math.sign(e)*Math.pow(t,.5555555555555556):16*e},qu=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r={mode:"prophoto",r:al(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*o),g:al(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*o),b:al(e*0+t*0+1.2119675456389452*o)};return a!==void 0&&(r.alpha=a),r},rl=qu;var ll=(e=0)=>{let t=Math.abs(e);return t>=.03125?Math.sign(e)*Math.pow(t,1.8):e/16},zu=e=>{let t=ll(e.r),o=ll(e.g),a=ll(e.b),r={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*o+.0313477341283922*a,y:.2880748288194013*t+.7118352342418731*o+899369387256e-16*a,z:0*t+0*o+.8251046025104602*a};return e.alpha!==void 0&&(r.alpha=e.alpha),r},nl=zu;var ju={...r1,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:rl,rgb:e=>rl(b1(e))},toMode:{xyz50:nl,rgb:e=>w1(nl(e))}},m0=ju;var h0=1.09929682680944,Ku=.018053968510807,il=e=>{let t=Math.abs(e);return t>Ku?(Math.sign(e)||1)*(h0*Math.pow(t,.45)-(h0-1)):4.5*e},Gu=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r={mode:"rec2020",r:il(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*o),g:il(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*o),b:il(e*.0176398574453108-t*.0427706132578085+.9421031212354739*o)};return a!==void 0&&(r.alpha=a),r},sl=Gu;var g0=1.09929682680944,Wu=.018053968510807,dl=(e=0)=>{let t=Math.abs(e);return t<Wu*4.5?e/4.5:(Math.sign(e)||1)*Math.pow((t+g0-1)/g0,1/.45)},Xu=e=>{let t=dl(e.r),o=dl(e.g),a=dl(e.b),r={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*o+.1688809751641721*a,y:.262700212011267*t+.6779980715188708*o+.059301716469862*a,z:0*t+.0280726930490874*o+1.0609850577107909*a};return e.alpha!==void 0&&(r.alpha=e.alpha),r},ul=Xu;var Qu={...r1,mode:"rec2020",fromMode:{xyz65:sl,rgb:e=>sl(je(e))},toMode:{xyz65:ul,rgb:e=>Ke(ul(e))},parse:["rec2020"],serialize:"rec2020"},v0=Qu;var V1=.0037930732552754493,xa=Math.cbrt(V1);var cl=e=>Math.cbrt(e)-xa,Ju=e=>{let{r:t,g:o,b:a,alpha:r}=l1(e),l=cl(.3*t+.622*o+.078*a+V1),n=cl(.23*t+.692*o+.078*a+V1),i=cl(.2434226892454782*t+.2047674442449682*o+.5518098665095535*a+V1),s={mode:"xyb",x:(l-n)/2,y:(l+n)/2,b:i-(l+n)/2};return r!==void 0&&(s.alpha=r),s},x0=Ju;var fl=e=>Math.pow(e+xa,3),Yu=({x:e,y:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=fl(e+t)-V1,l=fl(t-e)-V1,n=fl(o+t)-V1,i=n1({r:11.031566904639861*r-9.866943908131562*l-.16462299650829934*n,g:-3.2541473810744237*r+4.418770377582723*l-.16462299650829934*n,b:-3.6588512867136815*r+2.7129230459360922*l+1.9459282407775895*n});return a!==void 0&&(i.alpha=a),i},L0=Yu;var e7={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:L0},fromMode:{rgb:x0},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:_,y:_,b:_,alpha:{use:_,fixup:ue}}},w0=e7;var t7={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:w1,lab:_t},fromMode:{rgb:b1,lab:Vt},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:_,y:_,z:_,alpha:{use:_,fixup:ue}}},b0=t7;var o7=e=>{let{x:t,y:o,z:a,alpha:r}=e;t===void 0&&(t=0),o===void 0&&(o=0),a===void 0&&(a=0);let l={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*o-.0501922295431356*a,y:.0296278156881593*t+.990434484573249*o-.0170738250293851*a,z:-.0092430581525912*t+.0150551448965779*o+.7518742899580008*a};return r!==void 0&&(l.alpha=r),l},I0=o7;var a7=e=>{let{x:t,y:o,z:a,alpha:r}=e;t===void 0&&(t=0),o===void 0&&(o=0),a===void 0&&(a=0);let l={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*o+.0632593086610217*a,y:-.0283697069632081*t+1.0099954580058226*o+.021041398966943*a,z:.0123140016883199*t-.0205076964334779*o+1.3303659366080753*a};return r!==void 0&&(l.alpha=r),l},y0=a7;var r7={mode:"xyz65",toMode:{rgb:Ke,xyz50:I0},fromMode:{rgb:je,xyz50:y0},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:_,y:_,z:_,alpha:{use:_,fixup:ue}}},M0=r7;var l7=({r:e,g:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*o,i:.59597799*e-.2741761*t-.32180189*o,q:.21147017*e-.52261711*t+.31114694*o};return a!==void 0&&(r.alpha=a),r},S0=l7;var n7=({y:e,i:t,q:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r={mode:"rgb",r:e+.95608445*t+.6208885*o,g:e-.27137664*t-.6486059*o,b:e-1.10561724*t+1.70250126*o};return a!==void 0&&(r.alpha=a),r},R0=n7;var i7={mode:"yiq",toMode:{rgb:R0},fromMode:{rgb:S0},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:_,i:_,q:_,alpha:{use:_,fixup:ue}}},k0=i7;var s7=(e,t)=>Math.round(e*(t=Math.pow(10,t)))/t,d7=(e=4)=>t=>typeof t=="number"?s7(t,e):t,vo=d7;var zx=vo(2);var jx=Je("rgb"),Kx=Je("hsl");var pl=e=>{let t=Ko(e);if(!t)return;let o=Go(t.mode);if(!o.serialize||typeof o.serialize=="string"){let a=`color(${o.serialize||`--${t.mode}`} `;return o.channels.forEach((r,l)=>{r!=="alpha"&&(a+=(l?" ":"")+(t[r]!==void 0?t[r]:"none"))}),t.alpha!==void 0&&t.alpha<1&&(a+=` / ${t.alpha}`),a+")"}if(typeof o.serialize=="function")return o.serialize(t)};var DL=me(k2),OL=me(B2),EL=me(F2),BL=me($2),AL=me(N2),ZL=me(aa),FL=me(ra),$L=me(K2),NL=me(W2),UL=me(Q2),qL=me(J2),zL=me(Dt),jL=me(e0),KL=me(Ot),GL=me(o0),WL=me(l0),XL=me(n0),QL=me(i0),JL=me(s0),YL=me(d0),ew=me(c0),tw=me(p0),ow=me(C0),aw=me(m0),rw=me(v0),lw=me(r1),nw=me(w0),iw=me(b0),sw=me(M0),dw=me(k0);var Cl=Je("rgb"),u7=Je("hsl"),c7=Je("oklch"),f7=Je("oklab"),p7=Je("lch"),C7=Je("lab"),m7=vo(3),H0=null;function h7(){return H0??(H0=document.createElement("canvas").getContext("2d")),H0}function P0(e){try{let t=h7();if(!t)return null;t.fillStyle="#000000",t.fillStyle=e;let o=t.fillStyle;t.fillStyle="#ffffff",t.fillStyle=e;let a=t.fillStyle;return o===a?o:null}catch{return null}}function T0(e){if(!e||typeof e!="string")return!1;let t=e.trim();return dt(t)!==void 0?!0:P0(t)!==null}function ft(e){let t={r:255,g:255,b:255,a:1};if(!e||typeof e!="string")return t;let o=e.trim(),a=dt(o);if(a){let l=Cl(a);if(l&&"r"in l&&"g"in l&&"b"in l)return{r:Math.round(Math.min(255,Math.max(0,l.r*255))),g:Math.round(Math.min(255,Math.max(0,l.g*255))),b:Math.round(Math.min(255,Math.max(0,l.b*255))),a:l.alpha??1}}let r=P0(o);if(r){if(r.startsWith("#")){let n=r.slice(1);return{r:parseInt(n.slice(0,2),16),g:parseInt(n.slice(2,4),16),b:parseInt(n.slice(4,6),16),a:1}}let l=r.match(/rgba?\(\s*(\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);if(l&&l[1]!=null&&l[2]!=null&&l[3]!=null)return{r:+l[1],g:+l[2],b:+l[3],a:l[4]!=null?+l[4]:1}}return t}function Et(e){let t=Math.round(Math.min(255,Math.max(0,e.r))),o=Math.round(Math.min(255,Math.max(0,e.g))),a=Math.round(Math.min(255,Math.max(0,e.b))),r=Math.round(Math.min(1,Math.max(0,e.a))*100)/100;return r>=1?`rgb(${t}, ${o}, ${a})`:`rgba(${t}, ${o}, ${a}, ${r})`}function La(e){let t=e.startsWith("#")?e.slice(1):e;return/^[0-9a-fA-F]+$/.test(t)&&[3,4,6,8].includes(t.length)}function xo(e){let t=Math.round(Math.min(255,Math.max(0,e.r))),o=Math.round(Math.min(255,Math.max(0,e.g))),a=Math.round(Math.min(255,Math.max(0,e.b))),r=Math.min(1,Math.max(0,e.a)),l=`#${[t,o,a].map(n=>n.toString(16).padStart(2,"0")).join("")}`;return r<1?l+Math.round(r*255).toString(16).padStart(2,"0"):l}function V0(e){return!e||typeof e!="string"?"rgb":dt(e.trim())?.mode??"rgb"}function Ge(e,t){let o={mode:"rgb",r:e.r/255,g:e.g/255,b:e.b/255,alpha:e.a};switch(t){case"oklch":return c7(o);case"oklab":return f7(o);case"lch":return p7(o);case"lab":return C7(o);default:return o}}function ml(e){let t=e?Cl(e):null;return!t||!("r"in t)||!("g"in t)||!("b"in t)?{r:255,g:255,b:255,a:1}:{r:Math.round(Math.min(255,Math.max(0,t.r*255))),g:Math.round(Math.min(255,Math.max(0,t.g*255))),b:Math.round(Math.min(255,Math.max(0,t.b*255))),a:t.alpha??1}}function hl(e){if(!e)return"";let t={...e},o=t;for(let a of Object.keys(o)){let r=o[a];typeof r=="number"&&(o[a]=m7(r))}return pl(t)}function Bt(e){let t={mode:"rgb",r:e.r/255,g:e.g/255,b:e.b/255},o=u7(t);return o?{h:o.h??0,s:o.s*100,l:o.l*100}:{h:0,s:0,l:0}}function gl(e){let t={mode:"hsl",h:e.h,s:e.s/100,l:e.l/100},o=Cl(t);return!o||!("r"in o)||!("g"in o)||!("b"in o)?{r:0,g:0,b:0}:{r:Math.round(o.r*255),g:Math.round(o.g*255),b:Math.round(o.b*255)}}import{jsx as Oe,jsxs as y1}from"react/jsx-runtime";var vl=16,At=4,v7=245,_0=260,x7=200,L7="linear-gradient(45deg, #e0e0e0 25%, transparent 25%), linear-gradient(-45deg, #e0e0e0 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e0e0e0 75%), linear-gradient(-45deg, transparent 75%, #e0e0e0 75%)",w7=["oklch","oklab","lch","lab","hsl"],D0=["oklch","oklab","lch","lab"],xl=["rgb","hsl","oklch","oklab","lch","lab"];function Ll(e){let t=V0(e);return w7.includes(t)?t:"rgb"}function Lo(e,t){let o=Bt({r:e.r,g:e.g,b:e.b}),a=Ge(e,"oklch"),r=Ge(e,"oklab"),l=Ge(e,"lch"),n=Ge(e,"lab");return{hex:M7(t,e),r:e.r,g:e.g,b:e.b,h:Math.round(o.h),s:Math.round(o.s),l:Math.round(o.l),a:Math.round(e.a*100),oklch_l:Math.round(a.l*100),oklch_c:Math.round(a.c*1e3)/10,oklch_h:Math.round(a.h||0),oklab_l:Math.round(r.l*100),oklab_a:Math.round(r.a*1e3)/10,oklab_b:Math.round(r.b*1e3)/10,lch_l:Math.round(l.l),lch_c:Math.round(l.c),lch_h:Math.round(l.h||0),lab_l:Math.round(n.l),lab_a:Math.round(n.a),lab_b:Math.round(n.b)}}function bl(e,t){let o=t.a/100;switch(e){case"oklch":return{mode:"oklch",l:t.oklch_l/100,c:t.oklch_c/100,h:t.oklch_h,alpha:o};case"oklab":return{mode:"oklab",l:t.oklab_l/100,a:t.oklab_a/100,b:t.oklab_b/100,alpha:o};case"lch":return{mode:"lch",l:t.lch_l,c:t.lch_c,h:t.lch_h,alpha:o};case"lab":return{mode:"lab",l:t.lab_l,a:t.lab_a,b:t.lab_b,alpha:o};case"hsl":return{mode:"hsl",h:t.h,s:t.s,l:t.l};default:return{mode:"rgb",r:t.r/255,g:t.g/255,b:t.b/255,alpha:o}}}function b7(e){let t=it(e);return t?t.getBoundingClientRect():{top:0,bottom:window.innerHeight,left:0,right:window.innerWidth}}function I7(e,t=v7){let o=e.getBoundingClientRect(),a=b7(e),r=a.bottom-o.bottom-At,l=o.top-a.top-At,i=r<t&&l>=t?o.top-t-At:o.bottom+At;i=Math.max(a.top+At,Math.min(i,a.bottom-t-At));let s=o.left;return s+_0>a.right&&(s=a.right-_0-vl),s<a.left+vl&&(s=a.left+vl),{top:i,left:s}}function Il(e){return e!=null&&typeof e=="string"?e:"#ffffff"}function wl(e){let{r:t,g:o,b:a,a:r}=ft(Il(e));return{type:"rgba",r:t,g:o,b:a,a:r}}function y7(e,t){let o=e||Et(t);return t.a>=1?{backgroundColor:o}:{backgroundColor:o,backgroundImage:`linear-gradient(0deg, ${o}, ${o}), ${L7}`,backgroundSize:"100% 100%, 8px 8px, 8px 8px, 8px 8px, 8px 8px",backgroundPosition:"0 0, 0 0, 0 4px, 4px -4px, -4px 0"}}function M7(e,t){let o=typeof e=="string"?e.trim():"";return La(o)?o:xo(t)}var S7=e=>e.preventDefault(),R7=e=>{e.key==="Enter"&&e.currentTarget.blur()};function k7(e,t){switch(t.type){case"SET_ALL":return{format:e.format,hex:t.hex,r:t.r,g:t.g,b:t.b,h:t.h,s:t.s,l:t.l,a:t.a,oklch_l:t.oklch_l,oklch_c:t.oklch_c,oklch_h:t.oklch_h,oklab_l:t.oklab_l,oklab_a:t.oklab_a,oklab_b:t.oklab_b,lch_l:t.lch_l,lch_c:t.lch_c,lch_h:t.lch_h,lab_l:t.lab_l,lab_a:t.lab_a,lab_b:t.lab_b};case"SET_RGBA":{let{r:o,g:a,b:r,a:l}=t,n=Bt({r:o,g:a,b:r}),i={r:o,g:a,b:r,a:l/100},s=Ge(i,"oklch"),d=Ge(i,"oklab"),u=Ge(i,"lch"),f=Ge(i,"lab");return{...e,hex:xo(i),r:o,g:a,b:r,h:Math.round(n.h),s:Math.round(n.s),l:Math.round(n.l),a:l,oklch_l:Math.round(s.l*100),oklch_c:Math.round(s.c*1e3)/10,oklch_h:Math.round(s.h||0),oklab_l:Math.round(d.l*100),oklab_a:Math.round(d.a*1e3)/10,oklab_b:Math.round(d.b*1e3)/10,lch_l:Math.round(u.l),lch_c:Math.round(u.c),lch_h:Math.round(u.h||0),lab_l:Math.round(f.l),lab_a:Math.round(f.a),lab_b:Math.round(f.b)}}case"SET_HEX":return{...e,hex:t.hex};case"SET_CHANNEL":{let o={...e,[t.channel]:t.value},a;if(e.format==="rgb")a={r:o.r,g:o.g,b:o.b,a:o.a/100};else if(e.format==="hsl"){let d=gl({h:o.h,s:o.s,l:o.l});o.r=Math.round(d.r),o.g=Math.round(d.g),o.b=Math.round(d.b),a={r:o.r,g:o.g,b:o.b,a:o.a/100}}else{let d=bl(e.format,o);a=ml(d),o.r=a.r,o.g=a.g,o.b=a.b}let r=Bt({r:o.r,g:o.g,b:o.b}),l=Ge(a,"oklch"),n=Ge(a,"oklab"),i=Ge(a,"lch"),s=Ge(a,"lab");return{...o,hex:xo(a),h:Math.round(r.h),s:Math.round(r.s),l:Math.round(r.l),oklch_l:Math.round(l.l*100),oklch_c:Math.round(l.c*1e3)/10,oklch_h:Math.round(l.h||0),oklab_l:Math.round(n.l*100),oklab_a:Math.round(n.a*1e3)/10,oklab_b:Math.round(n.b*1e3)/10,lch_l:Math.round(i.l),lch_c:Math.round(i.c),lch_h:Math.round(i.h||0),lab_l:Math.round(s.l),lab_a:Math.round(s.a),lab_b:Math.round(s.b)}}case"SET_FORMAT":return{...e,format:t.format};default:return e}}var H7={placeholder:"Enter color value",ariaValue:"{0} color value",ariaOpenPicker:"{0}, open color picker. Current color: {1}",ariaPicker:"{0} picker",ariaSaturation:"Color saturation and brightness",ariaEyedropper:"Pick color from screen",ariaHue:"Hue, 0 to 360 degrees",ariaAlphaSlider:"Alpha transparency, 0 to 100 percent",ariaHex:"Hexadecimal color value",ariaChannel:"{0} ({1}), {2} to {3}",ariaAlphaInput:"Alpha, 0 to 100 percent",ariaFormatCycle:"Color format: {0}. Click to change format.",titleFormatCycle:"Click to cycle format: RGB, HSL, OKLCH, OKLAB, LCH, LAB",gradientValue:"Gradient",imageValue:"Image"};function P7(e){let t=(e??"").trim();return t===""||t.toLowerCase()==="none"?"":t}function wa({label:e,value:t,onChange:o,id:a="color",aria:r,backgroundImage:l}){let n=f1(H7,r),i=`${a}-trigger`,s=`${a}-popover`,d=Il(t),[{colorInput:u,colorState:f},C]=p2(()=>wl(d)),[c,m]=ye.useReducer(k7,d,v=>{let k=ft(v),B=Lo(k,v);return{format:Ll(v),...B}}),L=ye.useRef(c);L.current=c;let p=ye.useRef(null),I=ye.useRef(t),h=ye.useRef(o);h.current=o;let V=ye.useCallback(v=>{let k=L.current.format,B;if(D0.includes(k)){let q=Ge(v,k);B=hl(q)}else if(k==="hsl"){let q=Bt({r:v.r,g:v.g,b:v.b}),K=Math.round(v.a*100)/100;B=K>=1?`hsl(${Math.round(q.h)}, ${Math.round(q.s)}%, ${Math.round(q.l)}%)`:`hsla(${Math.round(q.h)}, ${Math.round(q.s)}%, ${Math.round(q.l)}%, ${K})`}else B=Et(v);B!==p.current&&(p.current=B,I.current=B,typeof h.current=="function"&&h.current(B))},[]),g=C2(V,x7),S=h2({computePosition:I7,onClose:g.flush,trapFocus:!0});ye.useEffect(()=>{let v=Il(t);if(v===I.current)return;I.current=v;let k=ft(v);C(wl(t));let B=Lo(k,v),q=Ll(v);m({type:"SET_ALL",...B}),q!==L.current.format&&m({type:"SET_FORMAT",format:q})},[t,C]);let R=ye.useCallback(v=>{g.cancel();let k=v.target.value;if((!k||!k.startsWith("#"))&&(k="#"+k.replace(/^#+/,"")),La(k)){C({type:"hex",value:k});let B=ft(k),q=Lo(B,k);m({type:"SET_ALL",...q})}else m({type:"SET_HEX",hex:k})},[g,C]),G=ye.useCallback(()=>{g.cancel();let v=L.current.hex.trim();if(La(v)){let k=ft(v),B=Lo(k,v);m({type:"SET_ALL",...B}),V(k)}else{let k=L.current;m({type:"SET_HEX",hex:xo({r:k.r,g:k.g,b:k.b,a:k.a/100})})}},[g,V]),y=ye.useMemo(()=>{switch(c.format){case"hsl":return[{key:"h",label:"H",min:0,max:360},{key:"s",label:"S",min:0,max:100},{key:"l",label:"L",min:0,max:100}];case"oklch":return[{key:"oklch_l",label:"L",min:0,max:100,step:1},{key:"oklch_c",label:"C",min:0,max:40,step:.1},{key:"oklch_h",label:"H",min:0,max:360,step:1}];case"oklab":return[{key:"oklab_l",label:"L",min:0,max:100,step:1},{key:"oklab_a",label:"A",min:-40,max:40,step:.1},{key:"oklab_b",label:"B",min:-40,max:40,step:.1}];case"lch":return[{key:"lch_l",label:"L",min:0,max:100,step:1},{key:"lch_c",label:"C",min:0,max:150,step:1},{key:"lch_h",label:"H",min:0,max:360,step:1}];case"lab":return[{key:"lab_l",label:"L",min:0,max:100,step:1},{key:"lab_a",label:"A",min:-128,max:127,step:1},{key:"lab_b",label:"B",min:-128,max:127,step:1}];default:return[{key:"r",label:"R",min:0,max:255},{key:"g",label:"G",min:0,max:255},{key:"b",label:"B",min:0,max:255}]}},[c.format]),D=ye.useCallback((v,k)=>{g.cancel();let B=String(k).trim(),q=["oklch_c","oklab_a","oklab_b"].includes(v),K=B===""?0:q?parseFloat(B):parseInt(B,10);if(Number.isNaN(K))return;let ne=L.current,se=y.find(ve=>ve.key===v),ie=0,Ce=100;se?(ie=se.min,Ce=se.max):v==="a"?(ie=0,Ce=100):v==="h"?(ie=0,Ce=360):ne.format==="rgb"&&(ie=0,Ce=255);let Me=Math.min(Ce,Math.max(ie,K));m({type:"SET_CHANNEL",channel:v,value:Me});let fe={...ne,[v]:Me},be;if(ne.format==="rgb")be={r:fe.r,g:fe.g,b:fe.b,a:fe.a/100};else if(ne.format==="hsl"){let ve=gl({h:fe.h,s:fe.s,l:fe.l});be={r:ve.r,g:ve.g,b:ve.b,a:fe.a/100}}else{let ve=bl(ne.format,fe);be=ml(ve)}C({type:"rgba",...be}),V(be)},[g,C,V,y]),X=ye.useCallback(v=>{C(v);let k=v.getRgba();m({type:"SET_RGBA",r:Math.round(k.r),g:Math.round(k.g),b:Math.round(k.b),a:Math.round(k.a*100)}),g({r:k.r,g:k.g,b:k.b,a:k.a})},[C,g]),Q=ye.useCallback(v=>{let k=v.target.closest('[role="slider"]');k instanceof HTMLElement&&k.focus()},[]);ye.useLayoutEffect(()=>{if(!S.isOpen||!S.popoverRef.current)return;let v=S.popoverRef.current.offsetHeight;v<=0||S.reposition(v)},[S.isOpen,S.reposition]);let J=f?.rgba??{r:255,g:255,b:255,a:1},E=ye.useCallback(()=>{let v=c.format;if(D0.includes(v)){let k=bl(v,c);return hl(k)}else if(v==="hsl"){let k=Bt({r:J.r,g:J.g,b:J.b}),B=Math.round(J.a*100)/100;return B>=1?`hsl(${Math.round(k.h)}, ${Math.round(k.s)}%, ${Math.round(k.l)}%)`:`hsla(${Math.round(k.h)}, ${Math.round(k.s)}%, ${Math.round(k.l)}%, ${B})`}else return Et(J)},[c,J])(),M=P7(l),w=M!==""&&J.a===0,b=/url\(/i.test(M)?n.imageValue:n.gradientValue,x=w?b:E,O=w?{backgroundImage:M,backgroundSize:"cover",backgroundPosition:"center"}:y7(E,J),[P,A]=ye.useState(E),$=ye.useRef(P);$.current=P,ye.useEffect(()=>{A(E)},[E]);let W=ye.useCallback(v=>{let k=v.target.value;A(k)},[]),F=ye.useCallback(()=>{g.cancel();let v=$.current.trim();if(!v||!T0(v)){A(E);return}let k=ft(v),B=Et(k),q=Et(J);if(B!==q){C(wl(v));let K=Lo(k,v),ne=Ll(v);m({type:"SET_ALL",...K}),ne!==L.current.format&&m({type:"SET_FORMAT",format:ne}),v!==p.current&&(p.current=v,I.current=v,typeof h.current=="function"&&h.current(v))}else A(E)},[g,E,J,C]),U=ye.useCallback(v=>{v.key==="Enter"&&v.currentTarget.blur()},[]),N=ye.useCallback(()=>{let v=xl.indexOf(c.format),k=xl[(v+1)%xl.length]??c.format;m({type:"SET_FORMAT",format:k})},[c.format]),H=ye.useMemo(()=>{let v=S.triggerRef.current;if(!v)return document.body;let k=v.getRootNode();return k instanceof ShadowRoot?k:document.body},[S.isOpen,S.triggerRef]);return Oe(o1,{label:e,id:a,className:"colorEditor-fieldset",children:y1("div",{className:"colorEditor-wrapper",children:[Oe("button",{ref:S.triggerRef,id:i,type:"button",className:"colorEditor-swatch-only",onClick:S.toggle,"aria-expanded":S.isOpen,"aria-haspopup":"dialog","aria-controls":s,"aria-label":Pe(n.ariaOpenPicker,[e,x]),children:Oe("span",{style:O,"aria-hidden":"true",className:"colorEditor-swatch"})}),Oe("input",{type:"text",className:"colorEditor-value-input",value:w?x:P,readOnly:w,onChange:W,onBlur:F,onKeyDown:U,"aria-label":Pe(n.ariaValue,[e]),placeholder:n.placeholder,spellCheck:"false",autoComplete:"off"}),S.isOpen&&g7(y1("div",{ref:S.popoverRef,id:s,role:"dialog","aria-modal":"true","aria-label":Pe(n.ariaPicker,[e]),style:{top:S.position.top,left:S.position.left},onDragStart:S7,onMouseUp:Q,className:"colorEditor-popover",children:[y1(yt,{color:u,onChange:X,className:"colorEditor-picker",children:[Oe(yt.Saturation,{className:"colorEditor-picker-saturation","aria-label":n.ariaSaturation}),y1("div",{className:"colorEditor-picker-toolbar",children:[Oe(yt.EyeDropper,{"aria-label":n.ariaEyedropper,children:Oe(oo,{size:18,"aria-hidden":"true"})}),y1("div",{className:"colorEditor-picker-sliders",children:[Oe(yt.Hue,{className:"h-4 colorEditor-picker-hue","aria-label":n.ariaHue}),Oe(yt.Alpha,{className:"h-4 colorEditor-picker-alpha","aria-label":n.ariaAlphaSlider})]})]})]}),y1("div",{className:"colorEditor-input-wrapper",children:[y1("div",{className:"colorEditor-input-group",children:[Oe("input",{type:"text",value:c.hex,onChange:R,onBlur:G,onKeyDown:R7,"aria-label":n.ariaHex,className:"colorEditor-input-hex",spellCheck:"false",autoComplete:"off"}),Oe("label",{className:"colorEditor-input-label","aria-hidden":"true",children:"HEX"})]}),y1("div",{className:"colorEditor-channels-wrapper",children:[y1("div",{className:"colorEditor-input-container",children:[y.map(v=>Oe("div",{className:"colorEditor-input-group-no-label",children:Oe("input",{type:"number",min:v.min,max:v.max,step:v.step||1,value:c[v.key],onChange:k=>D(v.key,k.target.value),onBlur:k=>D(v.key,k.target.value),"aria-label":Pe(n.ariaChannel,[v.label,c.format.toUpperCase(),v.min,v.max]),"aria-valuemin":v.min,"aria-valuemax":v.max,"aria-valuenow":c[v.key],className:"colorEditor-input-rgba"})},v.key)),Oe("div",{className:"colorEditor-input-group-no-label",children:Oe("input",{type:"number",min:0,max:100,value:c.a,onChange:v=>D("a",v.target.value),onBlur:v=>D("a",v.target.value),"aria-label":n.ariaAlphaInput,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":c.a,className:"colorEditor-input-rgba"})})]}),Oe("div",{className:"colorEditor-format-selector",children:y1("button",{type:"button",className:"colorEditor-format-picker",onClick:N,"aria-label":Pe(n.ariaFormatCycle,[c.format.toUpperCase()]),"aria-live":"polite",title:n.titleFormatCycle,children:[y.map(v=>Oe("span",{className:"colorEditor-format-letter","aria-hidden":"true",children:v.label},v.key)),Oe("span",{className:"colorEditor-format-letter","aria-hidden":"true",children:"A"})]})})]})]})]}),H)]})})}import We from"react";import{jsx as Zt,jsxs as V7}from"react/jsx-runtime";var T7={ariaValue:"{0} value",ariaUnit:"{0} unit"};function M1({label:e,value:t,onChange:o,units:a=Do,constraints:r=p1,defaultUnit:l="px",placeholder:n=0,id:i="dimension",icon:s,aria:d}){let u=f1(T7,d),f=We.useMemo(()=>new Set(a.map(Z=>Z.value)),[a]),C=We.useMemo(()=>Jt(a),[a]),c=We.useMemo(()=>{if(n==null||n==="")return"";if(typeof n=="number")return String(n);let Z=ze(String(n),l,C);return Z.numericValue!==""?String(Z.numericValue):String(n)},[n,l,C]),[m,L]=We.useState(()=>{let Z=ze(t,l,C);return Z.numericValue!==""?String(Z.numericValue):""}),[p,I]=We.useState(()=>ze(t,l,C).unit),h=We.useRef(o);h.current=o;let V=We.useRef(t);We.useEffect(()=>{if(t===V.current)return;V.current=t;let Z=ze(t,l,C);L(Z.numericValue!==""?String(Z.numericValue):""),I(Z.unit)},[t,l,C]);let g=We.useCallback((Z,E)=>{let M=parseFloat(Z);if(Z===""||isNaN(M)){if(V.current==="")return;V.current="",typeof h.current=="function"&&h.current("");return}let w=C1(M,E,r),b=m1(w,E,r),x=Oo(b,E);x!==V.current&&(V.current=x,typeof h.current=="function"&&h.current(x))},[r]),S=We.useCallback(Z=>{let E=Z.target.value;L(E);let M=ze(E,l,C);M.numericValue!==""&&M.unit&&f.has(M.unit)&&M.unit!==p&&I(M.unit)},[l,C,p,f]),R=We.useCallback(Z=>{let E=Z.clipboardData.getData("text"),M=ze(E,l,C);if(M.numericValue!==""&&M.unit&&f.has(M.unit)){Z.preventDefault(),L(String(M.numericValue)),I(M.unit);let w=C1(M.numericValue,M.unit,r),b=m1(w,M.unit,r),x=Oo(b,M.unit);V.current=x,typeof h.current=="function"&&h.current(x)}},[l,C,f,r]),G=We.useCallback(()=>{if(m===""){g("",p);return}let Z=parseFloat(m);if(isNaN(Z)){let w=ze(t,l,C);L(w.numericValue!==""?String(w.numericValue):"");return}let E=C1(Z,p,r),M=m1(E,p,r);L(String(M)),g(String(M),p)},[m,p,t,l,C,r,g]),y=We.useCallback(Z=>{if(Z.key==="Enter"){Z.currentTarget.blur();return}if(Z.key==="ArrowUp"||Z.key==="ArrowDown"){Z.preventDefault();let E=Eo(m,Z.key,Z.shiftKey,p,r);if(E===null)return;L(E),g(E,p)}},[m,p,r,g]),D=We.useCallback(Z=>{let E=Z.target.value;if(!f.has(E))return;if(I(E),m===""){g("",E);return}let M=parseFloat(m);if(isNaN(M))return;let w=C1(M,E,r),b=m1(w,E,r);L(String(b));let x=Oo(b,E);V.current=x,typeof h.current=="function"&&h.current(x)},[m,f,r,g]),X=`${i}-input`,Q=`${i}-unit`,J=a.some(Z=>Z.value!=="");return Zt(o1,{label:e,id:i,className:"dimensionEditor-fieldset",children:V7("div",{className:"dimensionEditor-row",children:[s&&Zt("span",{className:"dimensionEditor-icon","aria-hidden":"true",children:Zt(s,{size:14,width:14,height:14})}),Zt("input",{id:X,type:"text",className:s?"dimensionEditor-input dimensionEditor-input--with-icon":"dimensionEditor-input",value:m,placeholder:c,onChange:S,onPaste:R,onBlur:G,onKeyDown:y,"aria-label":Pe(u.ariaValue,[e]),autoComplete:"off",spellCheck:"false"}),J&&Zt("select",{id:Q,className:"dimensionEditor-unit",value:p,onChange:D,"aria-label":Pe(u.ariaUnit,[e]),children:a.map(Z=>Zt("option",{value:Z.value,children:Z.label},Z.value))})]})})}function Xe(e,t){if(e==null)return{};var o={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.indexOf(a)!==-1)continue;o[a]=e[a]}return o}function ae(){return ae=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var a in o)({}).hasOwnProperty.call(o,a)&&(e[a]=o[a])}return e},ae.apply(null,arguments)}var Y=Hn(N0(),1),A7=Hn(j0(),1);import*as pe from"react";import{cloneElement as eb,Component as tb,useRef as s1,useCallback as ce,useEffect as S1,useMemo as Ft}from"react";var K0=e=>typeof e=="object"&&e!=null&&e.nodeType===1,G0=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",Va=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let o=getComputedStyle(e,null);return G0(o.overflowY,t)||G0(o.overflowX,t)||(a=>{let r=(l=>{if(!l.ownerDocument||!l.ownerDocument.defaultView)return null;try{return l.ownerDocument.defaultView.frameElement}catch{return null}})(a);return!!r&&(r.clientHeight<a.scrollHeight||r.clientWidth<a.scrollWidth)})(e)}return!1},_a=(e,t,o,a,r,l,n,i)=>l<e&&n>t||l>e&&n<t?0:l<=e&&i<=o||n>=t&&i>=o?l-e-a:n>t&&i<o||l<e&&i>o?n-t+r:0,B7=e=>{let t=e.parentElement;return t??(e.getRootNode().host||null)},W0=(e,t)=>{var o,a,r,l;if(typeof document>"u")return[];let{scrollMode:n,block:i,inline:s,boundary:d,skipOverflowHiddenElements:u}=t,f=typeof d=="function"?d:w=>w!==d;if(!K0(e))throw new TypeError("Invalid target");let C=document.scrollingElement||document.documentElement,c=[],m=e;for(;K0(m)&&f(m);){if(m=B7(m),m===C){c.push(m);break}m!=null&&m===document.body&&Va(m)&&!Va(document.documentElement)||m!=null&&Va(m,u)&&c.push(m)}let L=(a=(o=window.visualViewport)==null?void 0:o.width)!=null?a:innerWidth,p=(l=(r=window.visualViewport)==null?void 0:r.height)!=null?l:innerHeight,{scrollX:I,scrollY:h}=window,{height:V,width:g,top:S,right:R,bottom:G,left:y}=e.getBoundingClientRect(),{top:D,right:X,bottom:Q,left:J}=(w=>{let b=window.getComputedStyle(w);return{top:parseFloat(b.scrollMarginTop)||0,right:parseFloat(b.scrollMarginRight)||0,bottom:parseFloat(b.scrollMarginBottom)||0,left:parseFloat(b.scrollMarginLeft)||0}})(e),Z=i==="start"||i==="nearest"?S-D:i==="end"?G+Q:S+V/2-D+Q,E=s==="center"?y+g/2-J+X:s==="end"?R+X:y-J,M=[];for(let w=0;w<c.length;w++){let b=c[w],{height:x,width:O,top:P,right:A,bottom:$,left:W}=b.getBoundingClientRect();if(n==="if-needed"&&S>=0&&y>=0&&G<=p&&R<=L&&(b===C&&!Va(b)||S>=P&&G<=$&&y>=W&&R<=A))return M;let F=getComputedStyle(b),U=parseInt(F.borderLeftWidth,10),N=parseInt(F.borderTopWidth,10),H=parseInt(F.borderRightWidth,10),v=parseInt(F.borderBottomWidth,10),k=0,B=0,q="offsetWidth"in b?b.offsetWidth-b.clientWidth-U-H:0,K="offsetHeight"in b?b.offsetHeight-b.clientHeight-N-v:0,ne="offsetWidth"in b?b.offsetWidth===0?0:O/b.offsetWidth:0,se="offsetHeight"in b?b.offsetHeight===0?0:x/b.offsetHeight:0;if(C===b)k=i==="start"?Z:i==="end"?Z-p:i==="nearest"?_a(h,h+p,p,N,v,h+Z,h+Z+V,V):Z-p/2,B=s==="start"?E:s==="center"?E-L/2:s==="end"?E-L:_a(I,I+L,L,U,H,I+E,I+E+g,g),k=Math.max(0,k+h),B=Math.max(0,B+I);else{k=i==="start"?Z-P-N:i==="end"?Z-$+v+K:i==="nearest"?_a(P,$,x,N,v+K,Z,Z+V,V):Z-(P+x/2)+K/2,B=s==="start"?E-W-U:s==="center"?E-(W+O/2)+q/2:s==="end"?E-A+H+q:_a(W,A,O,U,H+q,E,E+g,g);let{scrollLeft:ie,scrollTop:Ce}=b;k=se===0?0:Math.max(0,Math.min(Ce+k/se,b.scrollHeight-x/se+K)),B=ne===0?0:Math.max(0,Math.min(ie+B/ne,b.scrollWidth-O/ne+q)),Z+=Ce-k,E+=ie-B}M.push({el:b,top:k,left:B})}return M};var Z7=0;function o5(){return String(Z7++)}function Io(e){var t=pe.useRef(e);return t.current=e,t}function F7(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(a){t.forEach(function(r){typeof r=="function"?r(a):r&&(r.current=a)})}}function Sl(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(a){for(var r=arguments.length,l=new Array(r>1?r-1:0),n=1;n<r;n++)l[n-1]=arguments[n];return t.some(function(i){return i&&i.apply(void 0,[a].concat(l)),a.preventDownshiftDefault||a.hasOwnProperty("nativeEvent")&&a.nativeEvent.preventDownshiftDefault})}}function a5(e,t){var o;function a(){o&&clearTimeout(o)}function r(){for(var l=arguments.length,n=new Array(l),i=0;i<l;i++)n[i]=arguments[i];a(),o=setTimeout(function(){o=null,e.apply(void 0,n)},t)}return r.cancel=a,r}var $7=a5(function(e){r5(e).textContent=""},500);function r5(e){var t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}function N7(e,t){if(!(!e||!t)){var o=r5(t);o.textContent=e,$7(t)}}function U7(e){var t=e?.getElementById("a11y-status-message");t&&t.remove()}function yo(){}var kl=yo;function Oa(e,t){if(!t)return e;var o=Object.keys(e);return o.reduce(function(a,r){return t[r]!==void 0&&(a[r]=t[r]),a},ae({},e))}function q7(e,t){if(e){var o=W0(e,{boundary:t,block:"nearest",scrollMode:"if-needed"});o.forEach(function(a){var r=a.el,l=a.top,n=a.left;r.scrollTop=l,r.scrollLeft=n})}}function X0(e,t,o){var a=e===t||t instanceof o.Node&&e.contains&&e.contains(t);return a}function z7(e,t){var o;function a(){o&&clearTimeout(o)}function r(){for(var l=arguments.length,n=new Array(l),i=0;i<l;i++)n[i]=arguments[i];a(),o=setTimeout(function(){o=null,e.apply(void 0,n)},t)}return r.cancel=a,r}function Re(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(a){for(var r=arguments.length,l=new Array(r>1?r-1:0),n=1;n<r;n++)l[n-1]=arguments[n];return t.some(function(i){return i&&i.apply(void 0,[a].concat(l)),a.preventDownshiftDefault||a.hasOwnProperty("nativeEvent")&&a.nativeEvent.preventDownshiftDefault})}}function _1(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(a){t.forEach(function(r){typeof r=="function"?r(a):r&&(r.current=a)})}}function j7(e,t){return e[t]!==void 0}function Ea(e){var t=e.key,o=e.keyCode;return o>=37&&o<=40&&t.indexOf("Arrow")!==0?"Arrow"+t:t}function Q1(e,t,o,a,r){r===void 0&&(r=!1);var l=o.length;if(l===0)return-1;var n=l-1;(typeof e!="number"||e<0||e>n)&&(e=t>0?-1:n+1);var i=e+t;i<0?i=r?n:0:i>n&&(i=r?0:n);var s=$t(i,t<0,o,a,r);return s===-1?e>=l?-1:e:s}function $t(e,t,o,a,r){r===void 0&&(r=!1);var l=o.length;if(t){for(var n=e;n>=0;n--)if(!a(o[n],n))return n}else for(var i=e;i<l;i++)if(!a(o[i],i))return i;return r?$t(t?l-1:0,t,o,a):-1}function Q0(e,t,o,a){return a===void 0&&(a=!0),o&&t.some(function(r){return r&&(X0(r,e,o)||a&&X0(r,o.document.activeElement,o))})}function Hl(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function K7(e,t,o,a){for(var r=e.type,l={},n=Object.keys(o),i=0,s=n;i<s.length;i++){var d=s[i];G7(d,e,t,o,a),a[d]!==o[d]&&(l[d]=a[d])}t.onStateChange&&Object.keys(l).length&&t.onStateChange(ae({type:r},l))}function G7(e,t,o,a,r){if(r[e]!==a[e]){var l="on"+Hl(e)+"Change",n=o[l];if(typeof n=="function"){var i=t.type;n(ae({type:i},r))}}}function l5(e,t,o,a){var r=pe.useRef(null),l=pe.useRef(void 0),n=Io(t),i=pe.useCallback(function(C,c){l.current=c,C=Oa(C,n.current);var m=e(C,n.current,c),L=n.current.stateReducer(C,ae({},c,{changes:m}));return ae({},C,L)},[n,e]),s=pe.useReducer(i,t,o),d=s[0],u=s[1],f=l.current;return pe.useEffect(function(){var C,c=Oa((C=r.current)!=null?C:{},n.current),m=f&&r.current&&!a(c,d);m&&K7(f,n.current,c,d),r.current=d},[d,f,a,n]),[d,u]}function Pl(e,t,o,a){var r=l5(e,t,o,a),l=r[0],n=r[1];return[Oa(l,t),n]}function Tl(e,t,o,a){if(e!==void 0&&t!==void 0)return[e,t];if(e!==void 0){var r=o.indexOf(e);if(r<0)throw new Error(a);return[e,o.indexOf(e)]}if(t!==void 0){var l=o[t];if(l===void 0)throw new Error(a);return[l,t]}throw new Error(a)}function Na(){var e=pe.useRef(!0);return pe.useEffect(function(){return e.current=!1,function(){e.current=!0}},[]),e.current}function W7(e,t){return t.changes}var X7={environment:Y.default.shape({addEventListener:Y.default.func.isRequired,removeEventListener:Y.default.func.isRequired,document:Y.default.shape({createElement:Y.default.func.isRequired,getElementById:Y.default.func.isRequired,activeElement:Y.default.any.isRequired,body:Y.default.any.isRequired}).isRequired,Node:Y.default.func.isRequired}),itemToKey:Y.default.func,stateReducer:Y.default.func};function R1(e,t,o){var a=e["default"+Hl(t)];return a!==void 0?a:o[t]}function pt(e,t,o){var a=e[t];if(a!==void 0)return a;var r=e["initial"+Hl(t)];return r!==void 0?r:R1(e,t,o)}var J0=a5(function(e,t){N7(e,t)},200);function Vl(e,t,o,a){var r=a?.document,l=Na();pe.useEffect(function(){if(!(!e||l||!r)){var n=e(t);J0(n,r)}},o),pe.useEffect(function(){return function(){J0.cancel(),U7(r)}},[r])}var wo=ae({},X7,{getA11yStatusMessage:Y.default.func,highlightedIndex:Y.default.number,defaultHighlightedIndex:Y.default.number,initialHighlightedIndex:Y.default.number,isOpen:Y.default.bool,defaultIsOpen:Y.default.bool,initialIsOpen:Y.default.bool,selectedItem:Y.default.any,initialSelectedItem:Y.default.any,defaultSelectedItem:Y.default.any,id:Y.default.string,labelId:Y.default.string,menuId:Y.default.string,getItemId:Y.default.func,toggleButtonId:Y.default.string,onSelectedItemChange:Y.default.func,onHighlightedIndexChange:Y.default.func,onStateChange:Y.default.func,onIsOpenChange:Y.default.func,scrollIntoView:Y.default.func}),bo={itemToString:function(t){return t?String(t):""},itemToKey:function(t){return t},stateReducer:W7,scrollIntoView:q7,environment:typeof window>"u"?void 0:window},Qe={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""},Q7=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?pe.useLayoutEffect:pe.useEffect;function J7(e){return/^\S{1}$/.test(e)}function n5(e){var t=pt(e,"selectedItem",Qe),o=pt(e,"isOpen",Qe),a=Y7(e),r=pt(e,"inputValue",Qe);return{highlightedIndex:a<0&&t&&o?e.items.findIndex(function(l){return e.itemToKey(l)===e.itemToKey(t)}):a,isOpen:o,selectedItem:t,inputValue:r}}function Ct(e,t,o){var a=e.items,r=e.initialHighlightedIndex,l=e.defaultHighlightedIndex,n=e.isItemDisabled,i=e.itemToKey,s=t.selectedItem,d=t.highlightedIndex;return a.length===0?-1:r!==void 0&&d===r&&!n(a[r],r)?r:l!==void 0&&!n(a[l],l)?l:s?a.findIndex(function(u){return i(s)===i(u)}):o<0&&!n(a[a.length-1],a.length-1)?a.length-1:o>0&&!n(a[0],0)?0:-1}function i5(e,t,o){var a=pe.useRef({isMouseDown:!1,isTouchMove:!1,isTouchEnd:!1}),r=pe.useCallback(function(){return o.map(function(l){return l.current})},[o]);return pe.useEffect(function(){if(!e)return yo;function l(){a.current.isTouchEnd=!1,a.current.isMouseDown=!0}function n(u){a.current.isMouseDown=!1,Q0(u.target,r(),e)||t()}function i(){a.current.isTouchEnd=!1,a.current.isTouchMove=!1}function s(){a.current.isTouchMove=!0}function d(u){a.current.isTouchEnd=!0,!a.current.isTouchMove&&!Q0(u.target,r(),e,!1)&&t()}return e.addEventListener("mousedown",l),e.addEventListener("mouseup",n),e.addEventListener("touchstart",i),e.addEventListener("touchmove",s),e.addEventListener("touchend",d),function(){e.removeEventListener("mousedown",l),e.removeEventListener("mouseup",n),e.removeEventListener("touchstart",i),e.removeEventListener("touchmove",s),e.removeEventListener("touchend",d)}},[e,r,t]),a.current}var _l=function(){return yo};function s5(e){var t=e.highlightedIndex,o=e.isOpen,a=e.itemRefs,r=e.getItemNodeFromIndex,l=e.menuElement,n=e.scrollIntoView,i=pe.useRef(!0);return Q7(function(){t<0||!o||!Object.keys(a.current).length||(i.current===!1?i.current=!0:n(r(t),l))},[t]),i}var Dl=yo;function Ba(e,t,o){var a;o===void 0&&(o=!0);var r=((a=e.items)==null?void 0:a.length)&&t>=0;return ae({isOpen:!1,highlightedIndex:-1},r&&ae({selectedItem:e.items[t],isOpen:R1(e,"isOpen",Qe),highlightedIndex:R1(e,"highlightedIndex",Qe)},o&&{inputValue:e.itemToString(e.items[t])}))}function d5(e,t){return e.isOpen===t.isOpen&&e.inputValue===t.inputValue&&e.highlightedIndex===t.highlightedIndex&&e.selectedItem===t.selectedItem}function Aa(e){var t=R1(e,"highlightedIndex",Qe);return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}function Y7(e){var t=pt(e,"highlightedIndex",Qe);return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}function u5(e,t,o,a){var r=o.type,l;switch(r){case a.ItemMouseMove:l={highlightedIndex:o.disabled?-1:o.index};break;case a.MenuMouseLeave:l={highlightedIndex:-1};break;case a.ToggleButtonClick:case a.FunctionToggleMenu:l={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:Ct(t,e,0)};break;case a.FunctionOpenMenu:l={isOpen:!0,highlightedIndex:Ct(t,e,0)};break;case a.FunctionCloseMenu:l={isOpen:!1};break;case a.FunctionSetHighlightedIndex:l={highlightedIndex:t.isItemDisabled(t.items[o.highlightedIndex],o.highlightedIndex)?-1:o.highlightedIndex};break;case a.FunctionSetInputValue:l={inputValue:o.inputValue};break;case a.FunctionReset:l={highlightedIndex:Aa(t),isOpen:R1(t,"isOpen",Qe),selectedItem:R1(t,"selectedItem",Qe),inputValue:R1(t,"inputValue",Qe)};break;default:throw new Error("Reducer called without proper action type.")}return ae({},e,l)}var e4=ae({},wo,{items:Y.default.array.isRequired,isItemDisabled:Y.default.func}),t4=ae({},bo,{isItemDisabled:function(){return!1}});function o4(e){for(var t=e.keysSoFar,o=e.highlightedIndex,a=e.items,r=e.itemToString,l=e.isItemDisabled,n=t.toLowerCase(),i=0;i<a.length;i++){var s=(i+o+(t.length<2?1:0))%a.length,d=a[s];if(d!==void 0&&r(d).toLowerCase().startsWith(n)&&!l(d,s))return s}return o}var Da=0,Ol=1,El=2,Za=3,Bl=4,Al=5,Zl=6,Fl=7,$l=8,Nl=9,Ul=10,Fa=11,c5=12,f5=13,ql=14,p5=15,C5=16,m5=17,h5=18,zl=19,Rl=20,g5=21,v5=Object.freeze({__proto__:null,FunctionCloseMenu:m5,FunctionOpenMenu:C5,FunctionReset:g5,FunctionSelectItem:zl,FunctionSetHighlightedIndex:h5,FunctionSetInputValue:Rl,FunctionToggleMenu:p5,ItemClick:ql,ItemMouseMove:f5,MenuMouseLeave:c5,ToggleButtonBlur:Fa,ToggleButtonClick:Da,ToggleButtonKeyDownArrowDown:Ol,ToggleButtonKeyDownArrowUp:El,ToggleButtonKeyDownCharacter:Za,ToggleButtonKeyDownEnd:Zl,ToggleButtonKeyDownEnter:Fl,ToggleButtonKeyDownEscape:Bl,ToggleButtonKeyDownHome:Al,ToggleButtonKeyDownPageDown:Ul,ToggleButtonKeyDownPageUp:Nl,ToggleButtonKeyDownSpaceButton:$l});function a4(e,t,o){var a,r=o.type,l=o.altKey,n;switch(r){case ql:n={isOpen:R1(t,"isOpen",Qe),highlightedIndex:Aa(t),selectedItem:t.items[o.index]};break;case Za:{var i=o.key,s=""+e.inputValue+i,d=!e.isOpen&&e.selectedItem?t.items.findIndex(function(c){return t.itemToKey(c)===t.itemToKey(e.selectedItem)}):e.highlightedIndex,u=o4({keysSoFar:s,highlightedIndex:d,items:t.items,itemToString:t.itemToString,isItemDisabled:t.isItemDisabled});n={inputValue:s,highlightedIndex:u,isOpen:!0}}break;case Ol:{var f=e.isOpen?Q1(e.highlightedIndex,1,t.items,t.isItemDisabled):l&&e.selectedItem==null?-1:Ct(t,e,1);n={highlightedIndex:f,isOpen:!0}}break;case El:if(e.isOpen&&l)n=Ba(t,e.highlightedIndex,!1);else{var C=e.isOpen?Q1(e.highlightedIndex,-1,t.items,t.isItemDisabled):Ct(t,e,-1);n={highlightedIndex:C,isOpen:!0}}break;case Fl:case $l:n=Ba(t,e.highlightedIndex,!1);break;case Al:n={highlightedIndex:$t(0,!1,t.items,t.isItemDisabled),isOpen:!0};break;case Zl:n={highlightedIndex:$t(t.items.length-1,!0,t.items,t.isItemDisabled),isOpen:!0};break;case Nl:n={highlightedIndex:Q1(e.highlightedIndex,-10,t.items,t.isItemDisabled)};break;case Ul:n={highlightedIndex:Q1(e.highlightedIndex,10,t.items,t.isItemDisabled)};break;case Bl:n={isOpen:!1,highlightedIndex:-1};break;case Fa:n=ae({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((a=t.items)==null?void 0:a.length)&&{selectedItem:t.items[e.highlightedIndex]});break;case zl:n={selectedItem:o.selectedItem};break;default:return u5(e,t,o,v5)}return ae({},e,n)}var r4=ae({},pe),x5=r4.useId,L5=typeof x5=="function"?l4:n4;function l4(e){var t=e.id,o=e.labelId,a=e.menuId,r=e.getItemId,l=e.toggleButtonId,n=e.inputId,i="downshift-"+x5();t||(t=i);var s=pe.useMemo(function(){return{labelId:o??t+"-label",menuId:a??t+"-menu",getItemId:r??function(d){return t+"-item-"+d},toggleButtonId:l??t+"-toggle-button",inputId:n??t+"-input"}},[r,t,n,o,a,l]);return s}function n4(e){var t=e.id,o=e.labelId,a=e.menuId,r=e.getItemId,l=e.toggleButtonId,n=e.inputId,i=pe.useRef(t??"downshift-"+o5()),s=i.current,d=pe.useMemo(function(){return{labelId:o??s+"-label",menuId:a??s+"-menu",getItemId:r??function(u){return s+"-item-"+u},toggleButtonId:l??s+"-toggle-button",inputId:n??s+"-input"}},[r,n,o,a,l,s]);return d}var i4=["onClick"],s4=["onMouseLeave","refKey","ref"],d4=["onBlur","onClick","onPress","onKeyDown","refKey","ref"],u4=["item","index","onMouseMove","onClick","onMouseDown","onPress","refKey","disabled","ref"];Ua.stateChangeTypes=v5;function Ua(e){e===void 0&&(e={}),kl(e,Ua,e4);var t=ae({},t4,e),o=t.scrollIntoView,a=t.environment,r=t.getA11yStatusMessage,l=Pl(a4,t,n5,d5),n=l[0],i=l[1],s=n.isOpen,d=n.highlightedIndex,u=n.selectedItem,f=n.inputValue,C=s1(null),c=s1(null),m=s1({}),L=s1(null),p=L5(t),I=Io({state:n,props:t}),h=ce(function(P){return m.current[p.getItemId(P)]},[p]);Vl(r,n,[s,d,u,f],a);var V=s5({menuElement:c.current,highlightedIndex:d,isOpen:s,itemRefs:m,scrollIntoView:o,getItemNodeFromIndex:h});S1(function(){return L.current=z7(function(P){P({type:Rl,inputValue:""})},500),function(){L.current.cancel()}},[]),S1(function(){f&&L.current(i)},[i,f]),Dl({props:t,state:n}),S1(function(){var P=pt(t,"isOpen",Qe);P&&C.current&&C.current.focus()},[]);var g=ce(function(){I.current.state.isOpen&&i({type:Fa})},[i,I]),S=Ft(function(){return[c,C]},[]),R=i5(a,g,S),G=_l("getMenuProps","getToggleButtonProps");S1(function(){s||(m.current={})},[s]);var y=Ft(function(){return{ArrowDown:function(A){A.preventDefault(),i({type:Ol,altKey:A.altKey})},ArrowUp:function(A){A.preventDefault(),i({type:El,altKey:A.altKey})},Home:function(A){A.preventDefault(),i({type:Al})},End:function(A){A.preventDefault(),i({type:Zl})},Escape:function(){I.current.state.isOpen&&i({type:Bl})},Enter:function(A){A.preventDefault(),i({type:I.current.state.isOpen?Fl:Da})},PageUp:function(A){I.current.state.isOpen&&(A.preventDefault(),i({type:Nl}))},PageDown:function(A){I.current.state.isOpen&&(A.preventDefault(),i({type:Ul}))}," ":function(A){A.preventDefault();var $=I.current.state;if(!$.isOpen){i({type:Da});return}$.inputValue?i({type:Za,key:" "}):i({type:$l})}}},[i,I]),D=ce(function(){i({type:p5})},[i]),X=ce(function(){i({type:m5})},[i]),Q=ce(function(){i({type:C5})},[i]),J=ce(function(P){i({type:h5,highlightedIndex:P})},[i]),Z=ce(function(P){i({type:zl,selectedItem:P})},[i]),E=ce(function(){i({type:g5})},[i]),M=ce(function(P){i({type:Rl,inputValue:P})},[i]),w=ce(function(P){var A=P===void 0?{}:P,$=A.onClick,W=Xe(A,i4),F=function(){var N;(N=C.current)==null||N.focus()};return ae({id:p.labelId,htmlFor:p.toggleButtonId,onClick:Re($,F)},W)},[p]),b=ce(function(P,A){var $,W=P===void 0?{}:P,F=W.onMouseLeave,U=W.refKey,N=U===void 0?"ref":U,H=W.ref,v=Xe(W,s4),k=A===void 0?{}:A,B=k.suppressRefError,q=B===void 0?!1:B,K=function(){i({type:c5})};return G("getMenuProps",q,N,c),ae(($={},$[N]=_1(H,function(ne){c.current=ne}),$.id=p.menuId,$.role="listbox",$["aria-labelledby"]=v&&v["aria-label"]?void 0:""+p.labelId,$.onMouseLeave=Re(F,K),$),v)},[i,G,p]),x=ce(function(P,A){var $,W=P===void 0?{}:P,F=W.onBlur,U=W.onClick;W.onPress;var N=W.onKeyDown,H=W.refKey,v=H===void 0?"ref":H,k=W.ref,B=Xe(W,d4),q=A===void 0?{}:A,K=q.suppressRefError,ne=K===void 0?!1:K,se=I.current.state,ie=function(){i({type:Da})},Ce=function(){se.isOpen&&!R.isMouseDown&&i({type:Fa})},Me=function(ve){var Ne=Ea(ve);Ne&&y[Ne]?y[Ne](ve):J7(Ne)&&i({type:Za,key:Ne})},fe=ae(($={},$[v]=_1(k,function(be){C.current=be}),$["aria-activedescendant"]=se.isOpen&&se.highlightedIndex>-1?p.getItemId(se.highlightedIndex):"",$["aria-controls"]=p.menuId,$["aria-expanded"]=I.current.state.isOpen,$["aria-haspopup"]="listbox",$["aria-labelledby"]=B&&B["aria-label"]?void 0:""+p.labelId,$.id=p.toggleButtonId,$.role="combobox",$.tabIndex=0,$.onBlur=Re(F,Ce),$),B);return B.disabled||(fe.onClick=Re(U,ie),fe.onKeyDown=Re(N,Me)),G("getToggleButtonProps",ne,v,C),fe},[i,p,I,R,G,y]),O=ce(function(P){var A,$=P===void 0?{}:P,W=$.item,F=$.index,U=$.onMouseMove,N=$.onClick,H=$.onMouseDown;$.onPress;var v=$.refKey,k=v===void 0?"ref":v,B=$.disabled,q=$.ref,K=Xe($,u4);B!==void 0&&console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useSelect.');var ne=I.current,se=ne.state,ie=ne.props,Ce=Tl(W,F,ie.items,"Pass either item or index to getItemProps!"),Me=Ce[0],fe=Ce[1],be=ie.isItemDisabled(Me,fe),ve=function(){R.isTouchEnd||fe===se.highlightedIndex||(V.current=!1,i({type:f5,index:fe,disabled:be}))},Ne=function(){i({type:ql,index:fe})},zt=function(jt){return jt.preventDefault()},Ue=ae((A={},A[k]=_1(q,function(d1){d1&&(m.current[p.getItemId(fe)]=d1)}),A["aria-disabled"]=be,A["aria-selected"]=Me===se.selectedItem,A.id=p.getItemId(fe),A.role="option",A),K);return be||(Ue.onClick=Re(N,Ne)),Ue.onMouseMove=Re(U,ve),Ue.onMouseDown=Re(H,zt),Ue},[I,p,R,V,i]);return{getToggleButtonProps:x,getLabelProps:w,getMenuProps:b,getItemProps:O,toggleMenu:D,openMenu:Q,closeMenu:X,setHighlightedIndex:J,selectItem:Z,reset:E,setInputValue:M,highlightedIndex:d,isOpen:s,selectedItem:u,inputValue:f}}var jl=0,Kl=1,Gl=2,Wl=3,Xl=4,Ql=5,Jl=6,Yl=7,en=8,$a=9,tn=10,w5=11,b5=12,on=13,I5=14,y5=15,M5=16,S5=17,R5=18,an=19,k5=20,H5=21,rn=22,P5=Object.freeze({__proto__:null,ControlledPropUpdatedSelectedItem:rn,FunctionCloseMenu:S5,FunctionOpenMenu:M5,FunctionReset:H5,FunctionSelectItem:an,FunctionSetHighlightedIndex:R5,FunctionSetInputValue:k5,FunctionToggleMenu:y5,InputBlur:$a,InputChange:en,InputClick:tn,InputKeyDownArrowDown:jl,InputKeyDownArrowUp:Kl,InputKeyDownEnd:Xl,InputKeyDownEnter:Yl,InputKeyDownEscape:Gl,InputKeyDownHome:Wl,InputKeyDownPageDown:Jl,InputKeyDownPageUp:Ql,ItemClick:on,ItemMouseMove:b5,MenuMouseLeave:w5,ToggleButtonClick:I5});function c4(e){var t=n5(e),o=t.selectedItem,a=t.inputValue;return a===""&&o&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(a=e.itemToString(o)),ae({},t,{inputValue:a})}var f4=ae({},wo,{items:Y.default.array.isRequired,isItemDisabled:Y.default.func,inputValue:Y.default.string,defaultInputValue:Y.default.string,initialInputValue:Y.default.string,inputId:Y.default.string,onInputValueChange:Y.default.func});function p4(e,t,o,a){var r=s1(),l=l5(e,t,o,a),n=l[0],i=l[1],s=Na();return S1(function(){if(j7(t,"selectedItem")){if(!s){var d=t.itemToKey(t.selectedItem)!==t.itemToKey(r.current);d&&i({type:rn,inputValue:t.itemToString(t.selectedItem)})}r.current=n.selectedItem===r.current?t.selectedItem:n.selectedItem}},[n.selectedItem,t.selectedItem]),[Oa(n,t),i]}var C4=ae({},bo,{isItemDisabled:function(){return!1}});function m4(e,t,o){var a,r=o.type,l=o.altKey,n;switch(r){case on:n={isOpen:R1(t,"isOpen",Qe),highlightedIndex:Aa(t),selectedItem:t.items[o.index],inputValue:t.itemToString(t.items[o.index])};break;case jl:e.isOpen?n={highlightedIndex:Q1(e.highlightedIndex,1,t.items,t.isItemDisabled,!0)}:n={highlightedIndex:l&&e.selectedItem==null?-1:Ct(t,e,1),isOpen:t.items.length>=0};break;case Kl:e.isOpen?l?n=Ba(t,e.highlightedIndex):n={highlightedIndex:Q1(e.highlightedIndex,-1,t.items,t.isItemDisabled,!0)}:n={highlightedIndex:Ct(t,e,-1),isOpen:t.items.length>=0};break;case Yl:n=Ba(t,e.highlightedIndex);break;case Gl:n=ae({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case Ql:n={highlightedIndex:Q1(e.highlightedIndex,-10,t.items,t.isItemDisabled,!0)};break;case Jl:n={highlightedIndex:Q1(e.highlightedIndex,10,t.items,t.isItemDisabled,!0)};break;case Wl:n={highlightedIndex:$t(0,!1,t.items,t.isItemDisabled)};break;case Xl:n={highlightedIndex:$t(t.items.length-1,!0,t.items,t.isItemDisabled)};break;case $a:n=ae({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((a=t.items)==null?void 0:a.length)&&o.selectItem&&{selectedItem:t.items[e.highlightedIndex],inputValue:t.itemToString(t.items[e.highlightedIndex])});break;case en:n={isOpen:!0,highlightedIndex:Aa(t),inputValue:o.inputValue};break;case tn:n={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:Ct(t,e,0)};break;case an:n={selectedItem:o.selectedItem,inputValue:t.itemToString(o.selectedItem)};break;case rn:n={inputValue:o.inputValue};break;default:return u5(e,t,o,P5)}return ae({},e,n)}var h4=["onMouseLeave","refKey","ref"],g4=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],v4=["onClick","onPress","refKey","ref"],x4=["onKeyDown","onChange","onInput","onBlur","onChangeText","onClick","refKey","ref"];T5.stateChangeTypes=P5;function T5(e){e===void 0&&(e={}),kl(e,T5,f4);var t=ae({},C4,e),o=t.items,a=t.scrollIntoView,r=t.environment,l=t.getA11yStatusMessage,n=p4(m4,t,c4,d5),i=n[0],s=n[1],d=i.isOpen,u=i.highlightedIndex,f=i.selectedItem,C=i.inputValue,c=s1(null),m=s1({}),L=s1(null),p=s1(null),I=Na(),h=L5(t),V=s1(),g=Io({state:i,props:t}),S=ce(function(F){return m.current[h.getItemId(F)]},[h]);Vl(l,i,[d,u,f,C],r);var R=s5({menuElement:c.current,highlightedIndex:u,isOpen:d,itemRefs:m,scrollIntoView:a,getItemNodeFromIndex:S});Dl({props:t,state:i}),S1(function(){var F=pt(t,"isOpen",Qe);F&&L.current&&L.current.focus()},[]),S1(function(){I||(V.current=o.length)});var G=ce(function(){g.current.state.isOpen&&s({type:$a})},[s,g]),y=Ft(function(){return[c,p,L]},[]),D=i5(r,G,y),X=_l("getInputProps","getMenuProps");S1(function(){d||(m.current={})},[d]),S1(function(){var F;!d||!(r!=null&&r.document)||!(L!=null&&(F=L.current)!=null&&F.focus)||r.document.activeElement!==L.current&&L.current.focus()},[d,r]);var Q=Ft(function(){return{ArrowDown:function(U){U.preventDefault(),s({type:jl,altKey:U.altKey})},ArrowUp:function(U){U.preventDefault(),s({type:Kl,altKey:U.altKey})},Home:function(U){g.current.state.isOpen&&(U.preventDefault(),s({type:Wl}))},End:function(U){g.current.state.isOpen&&(U.preventDefault(),s({type:Xl}))},Escape:function(U){var N=g.current.state;(N.isOpen||N.inputValue||N.selectedItem||N.highlightedIndex>-1)&&(U.preventDefault(),s({type:Gl}))},Enter:function(U){var N=g.current.state;!N.isOpen||U.which===229||(U.preventDefault(),s({type:Yl}))},PageUp:function(U){g.current.state.isOpen&&(U.preventDefault(),s({type:Ql}))},PageDown:function(U){g.current.state.isOpen&&(U.preventDefault(),s({type:Jl}))}}},[s,g]),J=ce(function(F){return ae({id:h.labelId,htmlFor:h.inputId},F)},[h]),Z=ce(function(F,U){var N,H=F===void 0?{}:F,v=H.onMouseLeave,k=H.refKey,B=k===void 0?"ref":k,q=H.ref,K=Xe(H,h4),ne=U===void 0?{}:U,se=ne.suppressRefError,ie=se===void 0?!1:se;return X("getMenuProps",ie,B,c),ae((N={},N[B]=_1(q,function(Ce){c.current=Ce}),N.id=h.menuId,N.role="listbox",N["aria-labelledby"]=K&&K["aria-label"]?void 0:""+h.labelId,N.onMouseLeave=Re(v,function(){s({type:w5})}),N),K)},[s,X,h]),E=ce(function(F){var U,N,H=F===void 0?{}:F,v=H.item,k=H.index,B=H.refKey,q=B===void 0?"ref":B,K=H.ref,ne=H.onMouseMove,se=H.onMouseDown,ie=H.onClick;H.onPress;var Ce=H.disabled,Me=Xe(H,g4);Ce!==void 0&&console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useCombobox.');var fe=g.current,be=fe.props,ve=fe.state,Ne=Tl(v,k,be.items,"Pass either item or index to getItemProps!"),zt=Ne[0],Ue=Ne[1],d1=be.isItemDisabled(zt,Ue),jt="onClick",ko=ie,D1=function(){D.isTouchEnd||Ue===ve.highlightedIndex||(R.current=!1,s({type:b5,index:Ue,disabled:d1}))},Y1=function(){s({type:on,index:Ue})},O1=function(oi){return oi.preventDefault()};return ae((U={},U[q]=_1(K,function(u1){u1&&(m.current[h.getItemId(Ue)]=u1)}),U["aria-disabled"]=d1,U["aria-selected"]=Ue===ve.highlightedIndex,U.id=h.getItemId(Ue),U.role="option",U),!d1&&(N={},N[jt]=Re(ko,Y1),N),{onMouseMove:Re(ne,D1),onMouseDown:Re(se,O1)},Me)},[s,h,g,D,R]),M=ce(function(F){var U,N=F===void 0?{}:F,H=N.onClick;N.onPress;var v=N.refKey,k=v===void 0?"ref":v,B=N.ref,q=Xe(N,v4),K=g.current.state,ne=function(){s({type:I5})};return ae((U={},U[k]=_1(B,function(se){p.current=se}),U["aria-controls"]=h.menuId,U["aria-expanded"]=K.isOpen,U.id=h.toggleButtonId,U.tabIndex=-1,U),!q.disabled&&ae({},{onClick:Re(H,ne)}),q)},[s,g,h]),w=ce(function(F,U){var N,H=F===void 0?{}:F,v=H.onKeyDown,k=H.onChange,B=H.onInput,q=H.onBlur;H.onChangeText;var K=H.onClick,ne=H.refKey,se=ne===void 0?"ref":ne,ie=H.ref,Ce=Xe(H,x4),Me=U===void 0?{}:U,fe=Me.suppressRefError,be=fe===void 0?!1:fe;X("getInputProps",be,se,L);var ve=g.current.state,Ne=function(O1){var u1=Ea(O1);u1&&Q[u1]&&Q[u1](O1)},zt=function(O1){s({type:en,inputValue:O1.target.value})},Ue=function(O1){if(r!=null&&r.document&&ve.isOpen&&!D.isMouseDown){var u1=O1.relatedTarget===null&&r.document.activeElement!==r.document.body;s({type:$a,selectItem:!u1})}},d1=function(){s({type:tn})},jt="onChange",ko={};if(!Ce.disabled){var D1;ko=(D1={},D1[jt]=Re(k,B,zt),D1.onKeyDown=Re(v,Ne),D1.onBlur=Re(q,Ue),D1.onClick=Re(K,d1),D1)}return ae((N={},N[se]=_1(ie,function(Y1){L.current=Y1}),N["aria-activedescendant"]=ve.isOpen&&ve.highlightedIndex>-1?h.getItemId(ve.highlightedIndex):"",N["aria-autocomplete"]="list",N["aria-controls"]=h.menuId,N["aria-expanded"]=ve.isOpen,N["aria-labelledby"]=Ce&&Ce["aria-label"]?void 0:h.labelId,N.autoComplete="off",N.id=h.inputId,N.role="combobox",N.value=ve.inputValue,N),ko,Ce)},[s,h,r,Q,g,D,X]),b=ce(function(){s({type:y5})},[s]),x=ce(function(){s({type:S5})},[s]),O=ce(function(){s({type:M5})},[s]),P=ce(function(F){s({type:R5,highlightedIndex:F})},[s]),A=ce(function(F){s({type:an,selectedItem:F})},[s]),$=ce(function(F){s({type:k5,inputValue:F})},[s]),W=ce(function(){s({type:H5})},[s]);return{getItemProps:E,getLabelProps:J,getMenuProps:Z,getInputProps:w,getToggleButtonProps:M,toggleMenu:b,openMenu:O,closeMenu:x,setHighlightedIndex:P,setInputValue:$,selectItem:A,reset:W,highlightedIndex:u,isOpen:d,selectedItem:f,inputValue:C}}var V5={activeIndex:-1,selectedItems:[]};function Y0(e,t){return pt(e,t,V5)}function e5(e,t){return R1(e,t,V5)}function L4(e){var t=Y0(e,"activeIndex"),o=Y0(e,"selectedItems");return{activeIndex:t,selectedItems:o}}function t5(e){if(e.shiftKey||e.metaKey||e.ctrlKey||e.altKey)return!1;var t=e.target;return!(t instanceof HTMLInputElement&&t.value!==""&&(t.selectionStart!==0||t.selectionEnd!==0))}function w4(e,t){return e.selectedItems===t.selectedItems&&e.activeIndex===t.activeIndex}var ab={stateReducer:wo.stateReducer,itemToKey:wo.itemToKey,environment:wo.environment,selectedItems:Y.default.array,initialSelectedItems:Y.default.array,defaultSelectedItems:Y.default.array,getA11yStatusMessage:Y.default.func,activeIndex:Y.default.number,initialActiveIndex:Y.default.number,defaultActiveIndex:Y.default.number,onActiveIndexChange:Y.default.func,onSelectedItemsChange:Y.default.func,keyNavigationNext:Y.default.string,keyNavigationPrevious:Y.default.string},b4={itemToKey:bo.itemToKey,stateReducer:bo.stateReducer,environment:bo.environment,keyNavigationNext:"ArrowRight",keyNavigationPrevious:"ArrowLeft"},I4=yo,ln=0,nn=1,sn=2,dn=3,un=4,cn=5,fn=6,pn=7,Cn=8,mn=9,hn=10,gn=11,vn=12,y4=Object.freeze({__proto__:null,DropdownClick:pn,DropdownKeyDownBackspace:fn,DropdownKeyDownNavigationPrevious:cn,FunctionAddSelectedItem:Cn,FunctionRemoveSelectedItem:mn,FunctionReset:vn,FunctionSetActiveIndex:gn,FunctionSetSelectedItems:hn,SelectedItemClick:ln,SelectedItemKeyDownBackspace:sn,SelectedItemKeyDownDelete:nn,SelectedItemKeyDownNavigationNext:dn,SelectedItemKeyDownNavigationPrevious:un});function M4(e,t,o){var a=o.type,r=o.index,l=o.selectedItem,n=e.activeIndex,i=e.selectedItems,s;switch(a){case ln:s={activeIndex:r};break;case un:s={activeIndex:n-1<0?0:n-1};break;case dn:s={activeIndex:n+1>=i.length?-1:n+1};break;case sn:case nn:{if(n<0)break;var d=n;i.length===1?d=-1:n===i.length-1&&(d=i.length-2),s=ae({selectedItems:[].concat(i.slice(0,n),i.slice(n+1))},{activeIndex:d});break}case cn:s={activeIndex:i.length-1};break;case fn:s={selectedItems:i.slice(0,i.length-1)};break;case Cn:s={selectedItems:[].concat(i,[l])};break;case pn:s={activeIndex:-1};break;case mn:{var u=n,f=i.findIndex(function(m){return t.itemToKey(m)===t.itemToKey(l)});if(f<0)break;i.length===1?u=-1:f===i.length-1&&(u=i.length-2),s={selectedItems:[].concat(i.slice(0,f),i.slice(f+1)),activeIndex:u};break}case hn:{var C=o.selectedItems;s={selectedItems:C};break}case gn:{var c=o.activeIndex;s={activeIndex:c};break}case vn:s={activeIndex:e5(t,"activeIndex"),selectedItems:e5(t,"selectedItems")};break;default:throw new Error("Reducer called without proper action type.")}return ae({},e,s)}var S4=["refKey","ref","onClick","onKeyDown","selectedItem","index"],R4=["refKey","ref","onKeyDown","onClick","preventKeyAction"];_5.stateChangeTypes=y4;function _5(e){e===void 0&&(e={}),I4(e,_5);var t=ae({},b4,e),o=t.getA11yStatusMessage,a=t.environment,r=t.keyNavigationNext,l=t.keyNavigationPrevious,n=Pl(M4,t,L4,w4),i=n[0],s=n[1],d=i.activeIndex,u=i.selectedItems,f=Na(),C=s1(null),c=s1();c.current=[];var m=Io({state:i,props:t});Vl(o,i,[d,u],a),S1(function(){f||(d===-1&&C.current?C.current.focus():c.current[d]&&c.current[d].focus())},[d]),Dl({props:t,state:i});var L=_l("getDropdownProps"),p=Ft(function(){var D;return D={},D[l]=function(){s({type:un})},D[r]=function(){s({type:dn})},D.Delete=function(){s({type:nn})},D.Backspace=function(){s({type:sn})},D},[s,r,l]),I=Ft(function(){var D;return D={},D[l]=function(X){t5(X)&&s({type:cn})},D.Backspace=function(Q){t5(Q)&&s({type:fn})},D},[s,l]),h=ce(function(D){var X,Q=D===void 0?{}:D,J=Q.refKey,Z=J===void 0?"ref":J,E=Q.ref,M=Q.onClick,w=Q.onKeyDown,b=Q.selectedItem,x=Q.index,O=Xe(Q,S4),P=m.current.state,A=Tl(b,x,P.selectedItems,"Pass either item or index to getSelectedItemProps!"),$=A[1],W=$>-1&&$===P.activeIndex,F=function(){s({type:ln,index:$})},U=function(H){var v=Ea(H);v&&p[v]&&p[v](H)};return ae((X={},X[Z]=_1(E,function(N){N&&c.current.push(N)}),X.tabIndex=W?0:-1,X.onClick=Re(M,F),X.onKeyDown=Re(w,U),X),O)},[s,m,p]),V=ce(function(D,X){var Q,J=D===void 0?{}:D,Z=J.refKey,E=Z===void 0?"ref":Z,M=J.ref,w=J.onKeyDown,b=J.onClick,x=J.preventKeyAction,O=x===void 0?!1:x,P=Xe(J,R4),A=X===void 0?{}:X,$=A.suppressRefError,W=$===void 0?!1:$;L("getDropdownProps",W,E,C);var F=function(H){var v=Ea(H);v&&I[v]&&I[v](H)},U=function(){s({type:pn})};return ae((Q={},Q[E]=_1(M,function(N){N&&(C.current=N)}),Q),!O&&{onKeyDown:Re(w,F),onClick:Re(b,U)},P)},[s,I,L]),g=ce(function(D){s({type:Cn,selectedItem:D})},[s]),S=ce(function(D){s({type:mn,selectedItem:D})},[s]),R=ce(function(D){s({type:hn,selectedItems:D})},[s]),G=ce(function(D){s({type:gn,activeIndex:D})},[s]),y=ce(function(){s({type:vn})},[s]);return{getSelectedItemProps:h,getDropdownProps:V,addSelectedItem:g,removeSelectedItem:S,setSelectedItems:R,setActiveIndex:G,reset:y,selectedItems:u,activeIndex:d}}var xn=0,Ln=1,wn=2,bn=3,In=4,yn=5,Mn=6,k4=Object.freeze({__proto__:null,FunctionAddItem:Mn,TagClick:xn,TagGroupKeyDownArrowLeft:Ln,TagGroupKeyDownArrowRight:wn,TagGroupKeyDownBackspace:In,TagGroupKeyDownDelete:bn,TagRemoveClick:yn});function H4(e,t,o){var a=o.type,r;switch(a){case xn:r={activeIndex:o.index};break;case Ln:r={activeIndex:e.activeIndex===0?e.items.length-1:e.activeIndex-1};break;case wn:r={activeIndex:e.activeIndex===e.items.length-1?0:e.activeIndex+1};break;case In:case bn:{var l=[].concat(e.items.slice(0,e.activeIndex),e.items.slice(e.activeIndex+1)),n=l.length===0?-1:l.length===e.activeIndex?e.activeIndex-1:e.activeIndex;r={items:[].concat(e.items.slice(0,e.activeIndex),e.items.slice(e.activeIndex+1)),activeIndex:n};break}case yn:{var i=[].concat(e.items.slice(0,o.index),e.items.slice(o.index+1)),s=i.length===0?-1:i.length===o.index?o.index-1:o.index;r={items:i,activeIndex:s}}break;case Mn:{var d=[];o.index===void 0?d=[].concat(e.items,[o.item]):d=[].concat(e.items.slice(0,o.index),[o.item],e.items.slice(o.index));var u=e.activeIndex===-1?d.length-1:e.activeIndex;r={items:d,activeIndex:u};break}default:throw new Error("Invalid useTagGroup reducer action.")}return ae({},e,r)}var P4=ae({},pe),D5=P4.useId,T4=typeof D5=="function"?V4:_4;function V4(e){var t=e.id,o=e.tagGroupId,a=e.getTagId,r="downshift-"+D5();t||(t=r);var l=pe.useMemo(function(){return{tagGroupId:o??t+"-tag-group",getTagId:a??function(n){return t+"-tag-"+n}}},[a,t,o]);return l}function _4(e){var t=e.id,o=e.getTagId,a=e.tagGroupId,r=pe.useRef(t??"downshift-"+o5()),l=r.current,n=pe.useMemo(function(){return{tagGroupId:a??l+"-tag-group",getTagId:o??function(i){return l+"-tag-"+i}}},[o,l,a]);return n}function D4(e){var t,o,a,r,l=(t=(o=e.items)!=null?o:e.initialItems)!=null?t:[],n=(a=(r=e.activeIndex)!=null?r:e.initialActiveIndex)!=null?a:l.length===0?-1:0;return{activeIndex:n,items:l}}function O4(e,t){return e.activeIndex===t.activeIndex&&e.items===t.items}var O5="tag-group-a11y-description";function E4(e,t){pe.useEffect(function(){if(e){var o=e.createElement("div");return o.setAttribute("id",O5),o.style.display="none",o.textContent=t,e.body.appendChild(o),function(){o.remove()}}},[t,e])}function B4(e){return ae({stateReducer:function(o,a){var r=a.changes;return r},environment:typeof window>"u"?void 0:window,removeElementDescription:"Press Delete or Backspace to remove tag."},e)}function A4(e,t,o){var a=pe.useRef({}),r=pe.useRef(e),l=pe.useRef(t);return pe.useEffect(function(){if(e!==-1&&r.current!==-1&&e!==r.current||l.current===t+1){var n;(n=a.current[o(e)])==null||n.focus()}r.current=e,l.current=t},[e,o,t]),a}var Z4={isItemDisabled:Y.default.func},F4=["onKeyDown"],$4=["index","refKey","ref","onClick"],N4=["index","onClick"],E5=function(t){var o;t===void 0&&(t={}),kl(t,E5,Z4);var a=B4(t),r=Pl(H4,a,D4,O4),l=r[0],n=r[1],i=l.activeIndex,s=l.items,d=Io({state:l,props:a}),u=T4({getTagId:a.getTagId,id:a.id,tagGroupId:a.tagGroupId});E4((o=a.environment)==null?void 0:o.document,a.removeElementDescription);var f=A4(i,s.length,u.getTagId),C=ce(function(p){var I=p??{},h=I.onKeyDown,V=Xe(I,F4),g=function(G){switch(G.key){case"ArrowLeft":n({type:Ln});break;case"ArrowRight":n({type:wn});break;case"Delete":n({type:bn});break;case"Backspace":n({type:In});break}},S=ae({id:u.tagGroupId,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions",role:"listbox",onKeyDown:Sl(h,g)},V);return S},[n,u.tagGroupId]),c=ce(function(p){var I,h=p.index,V=p.refKey,g=V===void 0?"ref":V,S=p.ref,R=p.onClick,G=Xe(p,$4);if(!Number.isInteger(h)||h<0)throw new Error("Pass correct item index to getTagProps!");var y=d.current.state,D=function(){n({type:xn,index:h})},X=u.getTagId(h);return ae((I={"aria-describedby":O5},I[g]=F7(S,function(Q){Q&&(f.current[X]=Q)}),I["aria-labelledby"]=X,I.role="option",I.id=X,I.onClick=Sl(R,D),I.tabIndex=y.activeIndex===h?0:-1,I),G)},[n,u,d,f]),m=ce(function(p){var I=p.index,h=p.onClick,V=Xe(p,N4);if(!Number.isInteger(I)||I<0)throw new Error("Pass correct item index to getTagRemoveProps!");var g=function(y){y.stopPropagation(),n({type:yn,index:I})},S=u.getTagId(I),R=S+"-remove";return ae({id:R,tabIndex:-1,"aria-labelledby":R+" "+S,onClick:Sl(h,g)},V)},[u,n]),L=ce(function(p,I){n({type:Mn,item:p,index:I})},[n]);return{activeIndex:i,addItem:L,getTagGroupProps:C,getTagProps:c,getTagRemoveProps:m,items:s}};E5.stateChangeTypes=k4;import Mo from"react";import{createPortal as U4}from"react-dom";import{jsx as mt,jsxs as B5}from"react/jsx-runtime";var q4=260,qa=4,z4=mt(Qn,{width:9,height:9}),j4=mt(Jn,{width:9,height:9});function K4(e){let t=e.getBoundingClientRect(),o=it(e),a=o?o.getBoundingClientRect():{top:0,bottom:window.innerHeight},r=a.bottom-t.bottom-qa,l=t.top-a.top-qa,n=r<q4&&l>r;return{top:n?t.top-qa:t.bottom+qa,left:t.left,width:t.width,openAbove:n}}function Nt({label:e,options:t,selectedItem:o,onChange:a,id:r="picklist",getOptionStyle:l,getTriggerStyle:n}){let[i,s]=Mo.useState({top:0,left:0,width:0,openAbove:!1}),d=Mo.useRef(null),u=`${r}-legend`,{isOpen:f,closeMenu:C,highlightedIndex:c,getToggleButtonProps:m,getMenuProps:L,getItemProps:p}=Ua({items:t,itemToString:S=>S?S.label:"",selectedItem:o,onSelectedItemChange:({selectedItem:S})=>{typeof a=="function"&&S&&S.value!==o?.value&&a(S.value)},onIsOpenChange:({isOpen:S})=>{S&&d.current&&s(K4(d.current))},id:r,labelId:u});Mo.useEffect(()=>{if(!f||!d.current)return;let S=it(d.current);if(!S)return;let R=()=>C();return S.addEventListener("scroll",R,{passive:!0}),()=>S.removeEventListener("scroll",R)},[f,C]);let I="picklistEditor-dropdown"+(f?" picklistEditor-dropdown--open":""),h=f?{top:i.top,left:i.left,width:i.width,...i.openAbove?{transform:"translateY(-100%)"}:void 0}:void 0,[V,g]=Mo.useState(null);return Mo.useLayoutEffect(()=>{let R=d.current?.getRootNode();g(R instanceof ShadowRoot?R:document.body)},[]),mt(o1,{label:e,id:r,className:"picklistEditor-fieldset",children:B5("div",{className:"picklistEditor-wrapper",children:[B5("button",{type:"button",className:"picklistEditor-trigger",style:n?n(o):void 0,...m({ref:d}),children:[mt("span",{className:"picklistEditor-trigger-label",children:o?.label??"Default"}),mt("span",{className:"picklistEditor-trigger-chevron","aria-hidden":"true",children:f?j4:z4})]}),U4(mt("ul",{className:I,style:h,...L(),children:f&&t.map((S,R)=>mt("li",{className:"picklistEditor-option"+(c===R?" picklistEditor-option--highlighted":"")+(o?.value===S.value?" picklistEditor-option--selected":""),style:l?l(S):void 0,...p({item:S,index:R}),children:S.label},S.value||"default"))}),V??document.body)]})})}import{jsx as J4}from"react/jsx-runtime";var G4=[{value:"",label:"Default"},{value:"Arial, sans-serif",label:"Arial"},{value:"Helvetica, sans-serif",label:"Helvetica"},{value:"Verdana, sans-serif",label:"Verdana"},{value:"Tahoma, sans-serif",label:"Tahoma"},{value:"'Trebuchet MS', sans-serif",label:"Trebuchet MS"},{value:"'Lucida Sans Unicode', sans-serif",label:"Lucida Sans"},{value:"Georgia, serif",label:"Georgia"},{value:"'Times New Roman', serif",label:"Times New Roman"},{value:"'Palatino Linotype', serif",label:"Palatino"},{value:"'Courier New', monospace",label:"Courier New"},{value:"'Lucida Console', monospace",label:"Lucida Console"}];function W4(e,t){if(!e)return null;let o=e.replace(/['"]/g,""),a=(o.split(",")[0]??"").trim();for(let r of t){if(!r.value)continue;let l=r.value.replace(/['"]/g,"");if(o.indexOf(l)!==-1||l.indexOf(a)!==-1)return r}return null}var X4=e=>e.value?{fontFamily:e.value}:void 0,Q4=e=>e?.value?{fontFamily:e.value}:void 0;function A5({label:e="Font family",value:t,options:o,onChange:a,matchOption:r=W4,id:l="font-family",optionLabels:n}){let i=o??G4.map(d=>d.value===""?{...d,label:n?.default??d.label}:d),s=r(t,i)??i[0]??null;return J4(Nt,{label:e,options:i,selectedItem:s,onChange:a,id:l,getOptionStyle:X4,getTriggerStyle:Q4})}import{jsx as Sn}from"react/jsx-runtime";var Y4=[{value:"normal",labelKey:"normal",defaultLabel:"Normal",icon:Sn(On,{width:14,height:14})},{value:"italic",labelKey:"italic",defaultLabel:"Italic",icon:Sn(Dn,{width:14,height:14})}];function Z5({label:e="Font Style",value:t,onChange:o,id:a="font-style",optionLabels:r}){let l=Y4.map(n=>({value:n.value,label:r?.[n.labelKey]??n.defaultLabel,icon:n.icon}));return Sn(x1,{label:e,options:l,value:t||"normal",onChange:o,id:a})}import{jsx as a8}from"react/jsx-runtime";var e8=[{value:"",labelKey:"default",defaultWord:"Default"},{value:"100",labelKey:"thin",defaultWord:"Thin"},{value:"200",labelKey:"extraLight",defaultWord:"Extra Light"},{value:"300",labelKey:"light",defaultWord:"Light"},{value:"400",labelKey:"regular",defaultWord:"Regular"},{value:"500",labelKey:"medium",defaultWord:"Medium"},{value:"600",labelKey:"semiBold",defaultWord:"Semi Bold"},{value:"700",labelKey:"bold",defaultWord:"Bold"},{value:"800",labelKey:"extraBold",defaultWord:"Extra Bold"},{value:"900",labelKey:"black",defaultWord:"Black"}];function t8(e){return e8.map(t=>{let o=e?.[t.labelKey]??t.defaultWord;return{value:t.value,label:t.value?`${o} (${t.value})`:o}})}function o8(e,t){if(!e)return null;let o=String(e).trim();return t.find(a=>a.value===o)??null}function F5({label:e="Font weight",value:t,options:o,onChange:a,matchOption:r=o8,id:l="font-weight",optionLabels:n}){let i=o??t8(n),s=r(t,i)??i[0]??null;return a8(Nt,{label:e,options:i,selectedItem:s,onChange:a,id:l})}import le from"react";import{createPortal as r8}from"react-dom";import{jsx as oe,jsxs as Ee}from"react/jsx-runtime";var l8={tabCms:"CMS",tabLocal:"Local",tabUrl:"URL",ariaTablist:"Image source",clearImage:"Clear image",chooseFile:"Choose File...",ariaChooseFile:"Choose an image file from your computer",useThisImage:"Use This Image",ariaImageUrl:"Image URL",urlPlaceholder:"https://example.com/image.png",previewAlt:"Preview",altText:"Alt Text",altPlaceholder:"Describe the image",width:"Width",height:"Height",autoPlaceholder:"auto",workspace:"Workspace",selectWorkspace:"Select a workspace...",selectImage:"Select an Image",loadingWorkspaces:"Loading workspaces...",noWorkspaces:"No CMS workspaces found",loadingImages:"Loading images...",noImages:"No images in this workspace",loadingMore:"Loading more...",untitled:"Untitled",downloadingImage:"Downloading image...",downloadFailed:"Download failed",closePicker:"Close",cancel:"Cancel",done:"Done",pickerTitle:"Select an image from {0}",pickerError:"Error: {0}"},Ut=["cms","local","url"];function n8({labels:e,workspaceName:t,folderId:o,portalTarget:a,folderItemsResult:r,contentDetail:l,thumbnailResult:n,onFetchFolderItems:i,onFetchContentDetail:s,onFetchThumbnail:d,onCancel:u,onConfirm:f}){let[C,c]=le.useState([]),[m,L]=le.useState(0),[p,I]=le.useState(!0),[h,V]=le.useState(!1),[g,S]=le.useState(null),[R,G]=le.useState(null),[y,D]=le.useState({}),[X,Q]=le.useState({}),J=le.useRef(new Set),Z=le.useRef(new Set),E=le.useCallback(O=>{h||typeof i=="function"&&(V(!0),S(null),i(o,O,20))},[o,h,i]);le.useEffect(()=>{E(0)},[o]),le.useEffect(()=>{let O=P=>{P.key==="Escape"&&(P.stopPropagation(),u())};return document.addEventListener("keydown",O),()=>document.removeEventListener("keydown",O)},[u]);let M=le.useRef(null);le.useEffect(()=>{M.current?.focus()},[]),le.useEffect(()=>{if(!r)return;let O=(r.items??[]).map(P=>({contentKey:P.contentKey,title:P.title??e.untitled,mimeType:P.mimeType??"image/png"}));c(P=>r.page===0?O:[...P,...O]),I(!!r.hasMore),L(r.page??0),V(!1),r.error&&S(String(r.error))},[r]),le.useEffect(()=>{if(!l)return;let O=l.contentKey;if(!O||l.error)return;let P=l.url??"",A=l.mimeType??"image/png",$=l.title??"";D(W=>W[O]?W:{...W,[O]:{url:P,mimeType:A,title:$}}),P&&!Z.current.has(O)&&typeof d=="function"&&(Z.current.add(O),d(O,P,A))},[l,d]),le.useEffect(()=>{if(!n)return;let{imageId:O,thumbnailUrl:P}=n;O&&P&&Q(A=>({...A,[O]:P}))},[n]);let w=le.useRef(null);le.useEffect(()=>{let O=w.current;if(!O||!p||h)return;let P=new IntersectionObserver(A=>{A.some(W=>W.isIntersecting)&&E(m+1)});return P.observe(O),()=>P.disconnect()},[p,h,m,E]);let b=le.useCallback(O=>{J.current.has(O)||typeof s=="function"&&(J.current.add(O),s(O))},[s]),x=()=>{if(!R)return;let O=y[R],P=C.find(A=>A.contentKey===R);!O||!P||f({contentKey:R,title:P.title,url:O.url,mimeType:O.mimeType||P.mimeType})};return r8(oe("div",{ref:M,tabIndex:-1,className:"cmsPicker-overlay",role:"dialog","aria-modal":"true","aria-label":Pe(e.pickerTitle,[t]),onClick:O=>{O.target===O.currentTarget&&u()},children:Ee("div",{className:"cmsPicker-dialog",children:[Ee("div",{className:"cmsPicker-header",children:[oe("span",{className:"cmsPicker-title",children:Pe(e.pickerTitle,[t])}),oe("button",{type:"button",className:"cmsPicker-close",onClick:u,"aria-label":e.closePicker,title:e.closePicker,children:"\u2715"})]}),Ee("div",{className:"cmsPicker-body",children:[C.length===0&&h&&oe("div",{className:"cmsPicker-empty",children:e.loadingImages}),C.length===0&&!h&&!g&&oe("div",{className:"cmsPicker-empty",children:e.noImages}),g&&oe("div",{className:"cmsPicker-empty",children:Pe(e.pickerError,[g])}),Ee("div",{className:"cmsPicker-grid",children:[C.map(O=>oe(i8,{item:O,selected:R===O.contentKey,thumbnailDataUrl:X[O.contentKey],onIntersect:()=>b(O.contentKey),onClick:()=>G(O.contentKey)},O.contentKey)),p&&oe("div",{className:"cmsPicker-sentinel",ref:w,children:h?e.loadingMore:""})]})]}),Ee("div",{className:"cmsPicker-footer",children:[oe("button",{type:"button",className:"cmsPicker-btn",onClick:u,children:e.cancel}),oe("button",{type:"button",className:"cmsPicker-btn cmsPicker-btn--primary",disabled:!R||!y[R??""],onClick:x,children:e.done})]})]})}),a)}function i8({item:e,selected:t,thumbnailDataUrl:o,onIntersect:a,onClick:r}){let l=le.useRef(null),n=le.useRef(!1);return le.useEffect(()=>{let i=l.current;if(!i||n.current)return;let s=new IntersectionObserver(d=>{d.some(f=>f.isIntersecting)&&!n.current&&(n.current=!0,a(),s.disconnect())});return s.observe(i),()=>s.disconnect()},[a]),Ee("button",{ref:l,type:"button",className:`cmsPicker-thumb${t?" cmsPicker-thumb--selected":""}`,onClick:r,title:e.title,"aria-pressed":t,children:[oe("div",{className:"cmsPicker-thumb-img",children:o?oe("img",{src:o,alt:e.title}):oe("div",{className:"cmsPicker-thumb-placeholder","aria-hidden":"true",children:"\u2026"})}),oe("span",{className:"cmsPicker-thumb-label",children:e.title})]})}function s8({labels:e,spaces:t,spacesLoading:o,selectedSpaceId:a,onSpaceSelect:r,onOpenPicker:l}){return o?oe("div",{className:"imageEditor-cms",children:oe("div",{className:"imageEditor-cms-loading",children:e.loadingWorkspaces})}):t.length===0?oe("div",{className:"imageEditor-cms",children:oe("div",{className:"imageEditor-cms-empty",children:e.noWorkspaces})}):Ee("div",{className:"imageEditor-cms",children:[Ee("div",{className:"imageEditor-cms-channel",children:[oe("label",{className:"imageEditor-cms-channel-label",htmlFor:"cms-space-select",children:e.workspace}),Ee("select",{id:"cms-space-select",className:"imageEditor-input imageEditor-cms-channel-select",value:a,onChange:n=>r(n.target.value),children:[oe("option",{value:"",children:e.selectWorkspace}),t.map(n=>oe("option",{value:n.id,children:n.name},n.id))]})]}),oe("button",{type:"button",className:"imageEditor-cms-pick-btn",onClick:l,disabled:!a,children:e.selectImage})]})}function d8({labels:e,preview:t,onPick:o,onApply:a}){return Ee("div",{className:"imageEditor-local",children:[oe("button",{className:"imageEditor-local-pick",onClick:o,type:"button","aria-label":e.ariaChooseFile,"aria-haspopup":"dialog",children:e.chooseFile}),t&&Ee("div",{className:"imageEditor-local-preview",children:[oe("img",{src:t.webviewUri,alt:t.fileName,className:"imageEditor-preview-thumb"}),oe("span",{className:"imageEditor-local-filename",children:t.fileName}),oe("button",{className:"imageEditor-local-apply",onClick:()=>a(t.devUrl||t.webviewUri),type:"button",children:e.useThisImage})]})]})}function $5({src:e,alt:t,className:o}){let[a,r]=le.useState(!1);return le.useEffect(()=>{r(!1)},[e]),a?null:oe("img",{src:e,alt:t,className:o,onError:()=>r(!0)})}function u8({labels:e,input:t,onInputChange:o,onApply:a,currentUrl:r}){return Ee("div",{className:"imageEditor-url",children:[oe("input",{type:"text",value:t,"aria-label":e.ariaImageUrl,placeholder:e.urlPlaceholder,className:"imageEditor-input",onChange:l=>o(l.target.value),onKeyDown:l=>{l.key==="Enter"&&t&&a(t)},onBlur:()=>{t&&t!==r&&a(t)}}),t&&oe("div",{className:"imageEditor-url-preview",children:oe($5,{src:t,alt:e.previewAlt,className:"imageEditor-preview-thumb"})})]})}function Rn({id:e,label:t,value:o,type:a,inputMode:r,placeholder:l,onCommit:n}){let[i,s]=le.useState(o),d=le.useRef(n);d.current=n;let u=le.useRef(o);le.useEffect(()=>{o!==u.current&&(u.current=o,s(o))},[o]);let f=()=>{i!==o&&(u.current=i,d.current(i))};return Ee("div",{className:"imageEditor-attr",children:[oe("label",{className:"imageEditor-attr-label",htmlFor:e,children:t}),oe("input",{id:e,type:a,inputMode:r,value:i,placeholder:l,className:"imageEditor-input",onChange:C=>s(C.target.value),onKeyDown:C=>{C.key==="Enter"&&f()},onBlur:f})]})}function c8({labels:e,attributes:t,onAttributeChange:o}){return Ee("div",{className:"imageEditor-attrs",children:[oe(Rn,{id:"design-img-alt",label:e.altText,type:"text",value:t.alt,placeholder:e.altPlaceholder,onCommit:a=>o("alt",a)}),Ee("div",{className:"imageEditor-attrs-row",children:[oe(Rn,{id:"design-img-width",label:e.width,type:"number",inputMode:"numeric",value:t.width,placeholder:e.autoPlaceholder,onCommit:a=>o("width",a)}),oe(Rn,{id:"design-img-height",label:e.height,type:"number",inputMode:"numeric",value:t.height,placeholder:e.autoPlaceholder,onCommit:a=>o("height",a)})]})]})}function N5({label:e,value:t,onChange:o,id:a="image",attributes:r,onAttributeChange:l,cmsSpaces:n,cmsSpacesLoading:i,onFetchCmsSpaces:s,cmsFolderItemsResult:d,onFetchCmsFolderItems:u,cmsContentDetail:f,onFetchCmsContentDetail:C,cmsThumbnailResult:c,onFetchCmsThumbnail:m,onImportCmsImage:L,cmsImportResult:p,onPickLocalFile:I,localPreview:h,imageLabels:V}){let g=f1(l8,V),S={cms:g.tabCms,local:g.tabLocal,url:g.tabUrl},[R,G]=le.useState("cms"),[y,D]=le.useState(""),[X,Q]=le.useState(!1),[J,Z]=le.useState(""),[E,M]=le.useState("idle"),w=le.useRef(null),b=le.useRef(null),x=le.useCallback(()=>{let H=b.current?.getRootNode();return H instanceof ShadowRoot?H:document.body},[]),O=le.useRef({}),P=le.useCallback(H=>{G(H),O.current[H]?.focus()},[]),A=le.useCallback((H,v)=>{let k=null;switch(H.key){case"ArrowRight":k=(v+1)%Ut.length;break;case"ArrowLeft":k=(v-1+Ut.length)%Ut.length;break;case"Home":k=0;break;case"End":k=Ut.length-1;break;default:return}H.preventDefault();let B=Ut[k];B&&P(B)},[P]),$=n??[],W=i??!1,F=t||"";le.useEffect(()=>{if(p)if(p.success&&p.devUrl)o(p.devUrl),M("success");else{let H=w.current?.url;H?(o(H),M("success")):M("error")}},[p,o]),le.useEffect(()=>{R==="cms"&&$.length===0&&!W&&typeof s=="function"&&s()},[R]);let U=le.useMemo(()=>$.find(H=>H.id===y)??null,[$,y]),N=le.useCallback(H=>{let v={id:H.contentKey,title:H.title,url:H.url,thumbnailUrl:"",contentType:H.mimeType};w.current=v,Q(!1),typeof L=="function"&&v.url?(M("importing"),L(v)):v.url&&o(v.url)},[o,L]);return oe(o1,{label:e,id:a,className:"imageEditor-fieldset",children:Ee("div",{ref:b,className:"imageEditor-root",children:[F&&Ee("div",{className:"imageEditor-current",children:[oe($5,{src:F,alt:"",className:"imageEditor-current-thumb"}),oe("span",{className:"imageEditor-current-url",title:F,children:F.length>30?`...${F.slice(-30)}`:F}),oe("button",{className:"imageEditor-clear",onClick:()=>o(""),title:g.clearImage,"aria-label":g.clearImage,type:"button",children:"\u2715"})]}),oe("div",{className:"imageEditor-tabs",role:"tablist","aria-label":g.ariaTablist,children:Ut.map((H,v)=>oe("button",{id:`${a}-tab-${H}`,ref:k=>{O.current[H]=k},role:"tab",type:"button","aria-selected":R===H,"aria-controls":`${a}-tabpanel`,tabIndex:R===H?0:-1,className:`imageEditor-tab${R===H?" imageEditor-tab--active":""}`,onClick:()=>G(H),onKeyDown:k=>A(k,v),children:S[H]},H))}),Ee("div",{className:"imageEditor-tab-content",role:"tabpanel",id:`${a}-tabpanel`,"aria-labelledby":`${a}-tab-${R}`,children:[R==="cms"&&oe(s8,{labels:g,spaces:$,spacesLoading:W,selectedSpaceId:y,onSpaceSelect:D,onOpenPicker:()=>Q(!0)}),R==="cms"&&E==="importing"&&oe("div",{className:"imageEditor-cms-loading",children:g.downloadingImage}),R==="cms"&&E==="error"&&oe("div",{className:"imageEditor-cms-empty",children:g.downloadFailed}),R==="local"&&oe(d8,{labels:g,preview:h,onPick:()=>I?.(),onApply:H=>o(H)}),R==="url"&&oe(u8,{labels:g,input:J,onInputChange:Z,onApply:o,currentUrl:F})]}),r&&l&&oe(c8,{labels:g,attributes:r,onAttributeChange:l}),X&&U&&oe(n8,{labels:g,workspaceName:U.name,folderId:U.rootFolderId,portalTarget:x(),folderItemsResult:d,contentDetail:f,thumbnailResult:c,onFetchFolderItems:u,onFetchContentDetail:C,onFetchThumbnail:m,onCancel:()=>Q(!1),onConfirm:N})]})})}import{jsx as m8}from"react/jsx-runtime";var f8=[{value:"",labelKey:"default",defaultLabel:"Default"},{value:"visible",labelKey:"visible",defaultLabel:"Visible"},{value:"hidden",labelKey:"hidden",defaultLabel:"Hidden"},{value:"scroll",labelKey:"scroll",defaultLabel:"Scroll"},{value:"auto",labelKey:"auto",defaultLabel:"Auto"}];function p8(e){return f8.map(t=>({value:t.value,label:e?.[t.labelKey]??t.defaultLabel}))}function C8(e,t){if(!e)return null;let o=String(e).trim().toLowerCase();return t.find(a=>a.value===o)??null}function U5({label:e="Overflow",value:t,onChange:o,id:a="overflow",optionLabels:r}){let l=p8(r),n=C8(t,l)??l[0]??null;return m8(Nt,{label:e,options:l,selectedItem:n,onChange:o,id:a})}import{jsx as So}from"react/jsx-runtime";var h8=[{value:"left",labelKey:"left",defaultLabel:"Left",icon:So(Wn,{width:14,height:14})},{value:"center",labelKey:"center",defaultLabel:"Center",icon:So(Kn,{width:14,height:14})},{value:"right",labelKey:"right",defaultLabel:"Right",icon:So(Xn,{width:14,height:14})},{value:"justify",labelKey:"justify",defaultLabel:"Justify",icon:So(Gn,{width:14,height:14})}],g8={start:"left",end:"right"};function q5({label:e="Text Align",value:t,onChange:o,id:a="text-align",optionLabels:r}){let l=g8[t||""]||t||"left",n=h8.map(i=>({value:i.value,label:r?.[i.labelKey]??i.defaultLabel,icon:i.icon}));return So(x1,{label:e,options:n,value:l,onChange:o,id:a})}import{jsx as za}from"react/jsx-runtime";var z5=[{value:"none",labelKey:"none",defaultLabel:"None",icon:za(ht,{width:14,height:14})},{value:"underline",labelKey:"underline",defaultLabel:"Underline",icon:za(Yn,{width:14,height:14})},{value:"line-through",labelKey:"lineThrough",defaultLabel:"Line Through",icon:za(jn,{width:14,height:14})}];function v8(e){if(!e)return"none";for(let t of z5)if(e===t.value||e.startsWith(t.value+" "))return t.value;return"none"}function j5({label:e="Text Decoration",value:t,onChange:o,id:a="text-decoration",optionLabels:r}){let l=z5.map(n=>({value:n.value,label:r?.[n.labelKey]??n.defaultLabel,icon:n.icon}));return za(x1,{label:e,options:l,value:v8(t),onChange:o,id:a})}import{jsx as Ro}from"react/jsx-runtime";var x8=[{value:"none",labelKey:"none",defaultLabel:"None",icon:Ro(ht,{width:14,height:14})},{value:"uppercase",labelKey:"uppercase",defaultLabel:"Uppercase",icon:Ro($n,{width:14,height:14})},{value:"lowercase",labelKey:"lowercase",defaultLabel:"Lowercase",icon:Ro(Fn,{width:14,height:14})},{value:"capitalize",labelKey:"capitalize",defaultLabel:"Capitalize",icon:Ro(Zn,{width:14,height:14})}];function K5({label:e="Text Transform",value:t,onChange:o,id:a="text-transform",optionLabels:r}){let l=x8.map(n=>({value:n.value,label:r?.[n.labelKey]??n.defaultLabel,icon:n.icon}));return Ro(x1,{label:e,options:l,value:t||"none",onChange:o,id:a})}var G5="textContent";var L8=e=>e!=null&&typeof e=="object"&&"property"in e,w8=e=>typeof e?.sourceFile=="string"&&e.sourceFile!==""&&e.lineNumber!=null&&e.columnNumber!=null?{sourceFile:e.sourceFile,lineNumber:e.lineNumber,columnNumber:e.columnNumber}:void 0;function W5(e){let t=[],o=new Map,a=r=>{let l=w8(r);if(!l)return;let{sourceFile:n,lineNumber:i,columnNumber:s}=l,d=`${n}\0${i}:${s}`,u=o.get(d);return u||(u={byProperty:new Map,debugSource:l},o.set(d,u),t.push(u)),u};for(let r of e){let l=r.data;if(r.type==="style"&&l?.property!=null)a(l)?.byProperty.set(String(l.property),String(r.newValue??""));else if(r.type==="style-batch"&&Array.isArray(l?.changes)){let n=a(l);for(let i of l.changes)L8(i)&&i.property!=null&&n?.byProperty.set(String(i.property),String(i.newValue??""))}else r.type==="text"&&a(l)?.byProperty.set(G5,String(r.newValue??""))}return t.map(r=>{let l=[...r.byProperty].map(([n,i])=>({property:n,value:i})).filter(n=>n.property===G5||n.value!=="");return{debugSource:r.debugSource,commands:l}}).filter(r=>r.commands.length>0)}var J1={CHANGED:"history-changed",COMMAND_PUSHED:"command-pushed",COMMAND_UNDONE:"command-undone",COMMAND_REDONE:"command-redone",CLEARED:"history-cleared"},ja=class{constructor(t={}){et(this,"undoStack",[]);et(this,"redoStack",[]);et(this,"maxHistorySize");et(this,"listeners",new Set);et(this,"_isProcessing",!1);et(this,"commandExecutor");if(this.maxHistorySize=t.maxHistorySize??200,!t.commandExecutor)throw new Error("CommandExecutor is required");this.commandExecutor=t.commandExecutor}createCommand(t,o,a,r){return Object.freeze({id:this._generateCommandId(),type:t,oldValue:o,newValue:a,data:r})}_generateCommandId(){return`cmd-${Date.now()}-${Math.random().toString(36).substr(2,9)}`}subscribe(t){if(typeof t!="function")throw new Error("Listener must be a function");return this.listeners.add(t),()=>{this.listeners.delete(t)}}_notify(t,o={}){if(this.listeners.size===0)return;let a=Object.freeze({type:t,timestamp:Date.now(),canUndo:this.canUndo(),canRedo:this.canRedo(),undoCount:this.getUndoCount(),redoCount:this.getRedoCount(),...o}),r=Array.from(this.listeners);for(let l of r)try{l(a)}catch(n){console.error("[HistoryManager] Error in listener:",n)}}pushCommand(t){if(!t||typeof t!="object")throw new Error("Invalid command: must be an object");if(!t.type)throw new Error("Invalid command: missing required fields (type)");if(this._isProcessing){console.warn("[HistoryManager] pushCommand called during processing, ignoring");return}this.undoStack.length>=this.maxHistorySize||(this.undoStack.push(t),this.redoStack=[],this._notify(J1.COMMAND_PUSHED,{command:t}),this._notify(J1.CHANGED))}_trimStack(){if(this.undoStack.length>this.maxHistorySize){let t=this.undoStack.length-this.maxHistorySize;this.undoStack.splice(0,t)}}_applyCommand(t,o){if(!this.commandExecutor.canHandle(t.type))return console.warn("[HistoryManager] No executor for command type:",t.type),!1;try{return this.commandExecutor.execute(t,o)}catch(a){return console.error("[HistoryManager] Error applying command:",a,t),!1}}_createInverseCommand(t,o){let a=this.commandExecutor.getCurrentValue(t);return Object.freeze({id:this._generateCommandId(),type:t.type,oldValue:o?t.oldValue:a,newValue:o?a:t.newValue,data:t.data})}undo(){if(this._isProcessing)return console.warn("[HistoryManager] undo called during processing, ignoring"),!1;if(!this.canUndo())return!1;this._isProcessing=!0;try{let t=this.undoStack.pop(),o=this._applyCommand(t,!0);if(o){let a=this._createInverseCommand(t,!1);this.redoStack.push(a)}else this.undoStack.push(t),console.warn("[HistoryManager] Undo failed, command restored to stack");return this._notify(J1.COMMAND_UNDONE,{command:t,appliedValue:t.oldValue}),this._notify(J1.CHANGED),o}finally{this._isProcessing=!1}}redo(){if(this._isProcessing)return console.warn("[HistoryManager] redo called during processing, ignoring"),!1;if(!this.canRedo())return!1;this._isProcessing=!0;try{let t=this.redoStack.pop();if(!t)return console.warn("[HistoryManager] No command to redo"),!1;let o=this._applyCommand(t,!1);if(o){let a=this._createInverseCommand(t,!0);this.undoStack.push(a),this._trimStack()}else this.redoStack.push(t),console.warn("[HistoryManager] Redo failed, command restored to stack");return this._notify(J1.COMMAND_REDONE,{command:t,appliedValue:t.newValue}),this._notify(J1.CHANGED),o}finally{this._isProcessing=!1}}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}clear(){this.undoStack=[],this.redoStack=[],this._notify(J1.CLEARED),this._notify(J1.CHANGED)}getUndoCount(){return this.undoStack.length}getMaxHistorySize(){return this.maxHistorySize}getRedoCount(){return this.redoStack.length}getUndoStackSnapshot(){return this.undoStack.map(t=>({type:t.type,oldValue:t.oldValue,newValue:t.newValue,data:t.data}))}};var b8=(e,t)=>{let o=t?e.oldValue:e.newValue;return typeof o=="string"?o:String(o??"")},Ka=e=>{if(!e||typeof e!="object")return;let t=e;if(!(typeof t.sourceFile!="string"||typeof t.lineNumber!="number"||typeof t.columnNumber!="number"))return{sourceFile:t.sourceFile,lineNumber:t.lineNumber,columnNumber:t.columnNumber}},I8=e=>typeof e=="object"&&e!==null&&"property"in e&&typeof e.property=="string",y8=e=>typeof e=="object"&&e!==null&&Array.isArray(e.changes)&&e.changes.every(t=>t!=null&&typeof t.property=="string"),M8=e=>typeof e=="object"&&e!==null&&"tag"in e&&typeof e.tag=="string"&&"attribute"in e&&typeof e.attribute=="string",X5=(e,t,o)=>{let a=new Map;return{execute:(r,l)=>{let n=b8(r,l);a.set(r.id,n);try{if(r.type==="style"&&I8(r.data)){let i=Ka(r.data);return e(r.data.property,n,i),!0}else if(r.type==="style-batch"&&y8(r.data)){let i=Ka(r.data);for(let s of r.data.changes)e(s.property,l?s.oldValue:s.newValue,i);return!0}else if(r.type==="text"){let i=Ka(r.data);return t(n,i),!0}else if(r.type==="media"&&M8(r.data)){if(!o)return!1;let i=Ka(r.data);return o(r.data.tag,{[r.data.attribute]:n},i),!0}}catch{return!1}return!1},getCurrentValue:r=>a.get(r.id)??r.newValue,canHandle:r=>r==="style"||r==="style-batch"||r==="text"||r==="media"&&typeof o=="function"}};function Q5(e,t,o){let a=X5(e,t,o),r=new ja({commandExecutor:a});return{recordStyleChange(l,n,i,s){let d=r.createCommand("style",n,i,{...s,property:l});r.pushCommand(d)},recordStyleBatch(l,n){if(l.length===0)return;let i=l[0],s=r.createCommand("style-batch",i.oldValue,i.newValue,{...n,changes:l});r.pushCommand(s)},recordTextChange(l,n,i){let s=r.createCommand("text",l,n,{...i});r.pushCommand(s)},recordMediaChange(l,n,i,s,d){let u=r.createCommand("media",i,s,{...d,tag:l,attribute:n});r.pushCommand(u)},undo:()=>r.undo(),redo:()=>r.redo(),canUndo:()=>r.canUndo(),canRedo:()=>r.canRedo(),subscribe:l=>r.subscribe(l),getHistoryStack:()=>r.getUndoStackSnapshot(),clear:()=>r.clear(),getUndoCount:()=>r.getUndoCount(),getMaxHistorySize:()=>r.getMaxHistorySize()}}var S8=e=>{let t=e.trim().toLowerCase();return t===""||t==="none"};function J5(e,t,o,a){if(e!=="backgroundColor")return[];if(t.trim()==="")return[];let r=(a??"").trim();if(r.toLowerCase()==="none")return[];let l=r||(o??"");return S8(l)?[]:[{property:"backgroundImage",oldValue:l,newValue:"none"}]}import{jsx as re,jsxs as Ze}from"react/jsx-runtime";var k8="This element's text can be edited inline.",H8="This element's text cannot be edited inline because it contains dynamic content.",P8={opacity:.4},T8=new Set(a9),V8={general:{headerTitle:"Selected Element",emptyPlaceholder:"Click on an element in the preview to select it.",inlineEditEditable:k8,inlineEditNonEditable:H8,addToChatContext:"Add to chat as context",ariaPropertyPanel:"Property panel",ariaSelectedComponent:"Selected component",ariaElementStyling:"Element styling"},sections:{imageSource:"Image Source",background:"Background",spacing:"Spacing",border:"Border",typography:"Typography",elementDimensions:"Element Dimensions"},instances:{imageSource:"Source",backgroundColor:"Background Color",padding:"Padding",margin:"Margin",borderRadius:"Border Radius",borderWeight:"Border Weight",borderStyle:"Border Style",borderColor:"Border Color",fontFamily:"Font Family",fontSize:"Font Size",fontWeight:"Font Weight",fontStyle:"Font Style",textColor:"Text Color",textAlignment:"Text Alignment",textFormatting:"Text Formatting",textTransform:"Text Transform",lineHeight:"Line Height",letterSpacing:"Letter Spacing",width:"Width",minWidth:"Minimum Width",maxWidth:"Maximum Width",height:"Height",minHeight:"Minimum Height",maxHeight:"Maximum Height",overflow:"Overflow"},history:{changeLimitTitle:"Change limit reached",changeLimitBody:"Apply your {0} design changes to save your work and continue editing."}};function _8({size:e=16}){return re("svg",{width:e,height:e,viewBox:"-1 0 252 302",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:re("path",{d:"M57 49Q67 49 74 42Q81 35 81 25Q81 15 74 8Q67 1 57 1Q47 1 40 8Q33 15 33 25Q33 35 40 42Q47 49 57 49ZM193 49Q203 49 210 42Q217 35 217 25Q217 15 210 8Q203 1 193 1Q183 1 176 8Q169 15 169 25Q169 35 176 42Q183 49 193 49ZM125 301Q100 301 71 292Q47 285 26 274Q7 265 3.5 259.5Q0 254 1 249Q13 216 20 189Q24 171 26 157V147Q28 120 30 105Q34 78 40 65Q48 48 63 39Q85 27 125 27Q165 27 186 39Q201 47 209 65Q216 78 220 105Q222 120 224 147V157Q226 171 230 189Q237 216 248 249Q250 254 246.5 259.5Q243 265 224 274Q203 285 179 292Q150 301 125 301ZM23 249Q39 259 63 268Q97 280 125 280Q153 280 187 268Q210 259 227 249Q216 219 210 194Q205 174 204 159L203 148Q199 91 191 73Q188 66 184 62Q177 56 165 52Q150 48 125 48Q90 48 73 57Q64 63 59 73Q51 91 47 148L46 158Q45 174 40 194Q34 220 23 249ZM124 248Q113 248 102 244Q84 236 76 217Q72 209 71 201Q70 193 70 179Q70 163 73 151Q76 142 81.5 134Q87 126 98 120Q109 114 125.5 114Q142 114 152 120Q164 127 169 134.5Q174 142 177 151Q180 163 180 178.5Q180 194 179 200Q178 209 174 218Q167 232 154.5 240Q142 248 126 248ZM124 228H126Q147 228 156 209Q158 203 159 197.5Q160 192 160 179Q160 166 157 157Q155 151 152 146.5Q149 142 141 138Q136 134 125 134Q114 134 107.5 138Q101 142 98 146.5Q95 151 93 157Q90 166 90 178.5Q90 191 91 197Q92 203 94 209Q99 221 111 225Q117 228 124 228ZM195 81Q192 79 190 78Q170 70 146 76Q134 80 125.5 80Q117 80 104 76Q80 70 60 78Q58 79 55 81Q50 84 51 89L55 112Q56 117 59.5 120.5Q63 124 68 125Q83 126 99 126Q111 126 115 114L122 92Q122 91 124 89L125 88L126 89Q128 91 128 92L135 114Q139 126 152 126Q167 126 182 125Q187 124 190.5 120.5Q194 117 195 112L199 89Q200 84 195 81ZM141 192Q137 190 133 193V171Q138 169 141 165Q143 163 144 161Q145 159 145 156.5Q145 154 143.5 152Q142 150 140 148.5Q138 147 134 146Q130 145 125.5 145Q121 145 116 146Q111 147 109 149Q107 151 106 153Q105 155 105 157Q105 159 106 161Q107 163 109.5 166Q112 169 116 171H117V193Q113 190 109 191.5Q105 193 104 196Q103 199 105 202Q108 210 117 213Q124 216 133 213L134 212Q143 209 146 202Q147 199 145.5 196Q144 193 141 192Z"})})}function D8(e,t){let o=e[t];return o!=null?String(o):""}function kn(e){if(!(!e||!e.name||!e.debugSource))return{sourceFile:e.debugSource.sourceFile,lineNumber:e.debugSource.lineNumber,columnNumber:e.debugSource.columnNumber,componentName:e.name}}function O8({component:e,onOpenSourceFile:t,showOpenSourceFile:o,generalLabels:a}){if(!e||!e.name)return re("section",{id:"property-panel-selected-component",className:"property-panel-selected-component",children:re("p",{className:"property-panel-selected-component-placeholder",id:"component-info",children:a.emptyPlaceholder})});let r=e.tagName?e.tagName.toLowerCase():"",l=r?`${e.name} > ${r}`:e.name,n=null;if(o&&e.debugSource){let{sourceFile:i,lineNumber:s,columnNumber:d}=e.debugSource,u=i.split("/").pop()||i,f=`:${s}:${d}`;n=Ze("a",{href:"#",className:"property-panel-selected-component-source",onClick:c=>{c.preventDefault(),t?.({sourceFile:i,lineNumber:s,columnNumber:d})},title:`${i}${f}`,children:[u,f]})}return re("section",{id:"property-panel-selected-component",className:"property-panel-selected-component","aria-label":a.ariaSelectedComponent,children:Ze("div",{id:"component-info",className:"property-panel-selected-component-info",children:[re("span",{className:"property-panel-selected-component-name",children:l}),n&&Ze("span",{className:"property-panel-selected-component-source-row",children:["\u21B3 ",n]})]})})}var E8=we.forwardRef(function({title:t,body:o},a){return Ze("section",{ref:a,role:"alert","aria-live":"assertive","aria-labelledby":"property-panel-change-limit-title",className:"property-panel-change-limit-message",tabIndex:-1,children:[re("svg",{className:"property-panel-change-limit-icon",viewBox:"0 0 520 520",fill:"currentColor","aria-hidden":"true",focusable:"false",children:re("path",{d:"M260 20a240 240 0 100 480 240 240 0 100-480m0 121c17 0 30 13 30 30s-13 30-30 30-30-13-30-30 13-30 30-30m50 210c0 5-4 9-10 9h-80c-5 0-10-3-10-9v-20c0-5 4-11 10-11 5 0 10-3 10-9v-40c0-5-4-11-10-11-5 0-10-3-10-9v-20c0-5 4-11 10-11h60c5 0 10 5 10 11v80c0 5 4 9 10 9 5 0 10 5 10 11z"})}),Ze("div",{className:"property-panel-change-limit-content",children:[re("h2",{id:"property-panel-change-limit-title",className:"property-panel-change-limit-title",children:t}),re("p",{className:"property-panel-change-limit-body",children:o})]})]})});function B8({styles:e,computedStyles:t,hasSelection:o,onStyleChange:a,generalLabels:r,sectionLabels:l,instanceLabels:n,editorLabels:i,component:s,onImageAttributeChange:d,imageSource:u}){let f=o?"visible":"",C=s?.media?.tag==="img"?s.media:null;return re("section",{className:"property-panel-style-properties-container"+(f?" "+f:""),"aria-label":r.ariaElementStyling,"aria-hidden":!o,children:Ze("div",{className:"property-panel-style-properties",children:[C&&re(tt,{title:l.imageSource,children:re(N5,{label:n.imageSource,value:C.src,onChange:c=>d("src",c),id:"design-img-src",attributes:{alt:C.alt,width:C.width,height:C.height},onAttributeChange:d,imageLabels:i?.image,...u})}),re(tt,{title:l.background,children:re(wa,{label:n.backgroundColor,value:e.backgroundColor||t.backgroundColor||"#ffffff",onChange:c=>a("backgroundColor",c),id:"design-bg-color",aria:i?.color,backgroundImage:e.backgroundImage||t.backgroundImage})}),Ze(tt,{title:l.spacing,children:[re(to,{label:n.padding,id:"design-padding",value:e.padding,placeholder:t.padding,onChange:c=>a("padding",c),...Yt.padding,aria:i?.boxDimension}),re(to,{label:n.margin,id:"design-margin",value:e.margin,placeholder:t.margin,onChange:c=>a("margin",c),...Yt.margin,allowAuto:!0,aria:i?.boxDimension})]}),Ze(tt,{title:l.border,children:[re(to,{label:n.borderRadius,id:"design-border-radius",value:e.borderRadius,placeholder:t.borderRadius,onChange:c=>a("borderRadius",c),...Yt.borderRadius,aria:i?.boxDimension}),re(to,{label:n.borderWeight,id:"design-border-width",value:e.borderWidth,placeholder:t.borderWidth,onChange:c=>a("borderWidth",c),...Yt.borderWidth,aria:i?.boxDimension}),re(V9,{label:n.borderStyle,id:"design-border-style",value:e.borderStyle||t.borderStyle,onChange:c=>a("borderStyle",c),optionLabels:i?.borderStyle?.options}),re(wa,{label:n.borderColor,value:e.borderColor||t.borderColor||"#000000",onChange:c=>a("borderColor",c),id:"design-border-color",aria:i?.color})]}),Ze(tt,{title:l.typography,children:[re(A5,{label:n.fontFamily,id:"design-font-family",value:e.fontFamily||t.fontFamily,onChange:c=>a("fontFamily",c),optionLabels:i?.fontFamily?.options}),re(M1,{label:n.fontSize,id:"design-font-size",value:e.fontSize,placeholder:t.fontSize,onChange:c=>a("fontSize",c),...L1.fontSize,aria:i?.dimension}),re(F5,{label:n.fontWeight,id:"design-font-weight",value:e.fontWeight||t.fontWeight,onChange:c=>a("fontWeight",c),optionLabels:i?.fontWeight?.options}),re(Z5,{label:n.fontStyle,id:"design-font-style",value:e.fontStyle||t.fontStyle,onChange:c=>a("fontStyle",c),optionLabels:i?.fontStyle?.options}),re(wa,{label:n.textColor,value:e.color||t.color||"#000000",onChange:c=>a("color",c),id:"design-text-color",aria:i?.color}),re(q5,{label:n.textAlignment,id:"design-text-align",value:e.textAlign||t.textAlign,onChange:c=>a("textAlign",c),optionLabels:i?.textAlignment?.options}),re(j5,{label:n.textFormatting,id:"design-text-decoration",value:e.textDecoration||t.textDecoration,onChange:c=>a("textDecoration",c),optionLabels:i?.textDecoration?.options}),re(K5,{label:n.textTransform,id:"design-text-transform",value:e.textTransform||t.textTransform,onChange:c=>a("textTransform",c),optionLabels:i?.textTransform?.options}),re(M1,{label:n.lineHeight,id:"design-line-height",value:e.lineHeight,placeholder:t.lineHeight,onChange:c=>a("lineHeight",c),...L1.lineHeight,aria:i?.dimension}),re(M1,{label:n.letterSpacing,id:"design-letter-spacing",value:e.letterSpacing,placeholder:t.letterSpacing,onChange:c=>a("letterSpacing",c),...L1.letterSpacing,aria:i?.dimension})]}),Ze(tt,{title:l.elementDimensions,children:[re(M1,{label:n.width,id:"design-width",value:e.width,placeholder:t.width,onChange:c=>a("width",c),...L1.width,aria:i?.dimension}),Ze("div",{className:"property-panel-row-2col",children:[re(M1,{label:n.minWidth,id:"design-min-width",value:e.minWidth,placeholder:t.minWidth,onChange:c=>a("minWidth",c),...L1.minWidth,aria:i?.dimension}),re(M1,{label:n.maxWidth,id:"design-max-width",value:e.maxWidth,placeholder:t.maxWidth,onChange:c=>a("maxWidth",c),...L1.maxWidth,aria:i?.dimension})]}),re(M1,{label:n.height,id:"design-height",value:e.height,placeholder:t.height,onChange:c=>a("height",c),...L1.height,aria:i?.dimension}),Ze("div",{className:"property-panel-row-2col",children:[re(M1,{label:n.minHeight,id:"design-min-height",value:e.minHeight,placeholder:t.minHeight,onChange:c=>a("minHeight",c),...L1.minHeight,aria:i?.dimension}),re(M1,{label:n.maxHeight,id:"design-max-height",value:e.maxHeight,placeholder:t.maxHeight,onChange:c=>a("maxHeight",c),...L1.maxHeight,aria:i?.dimension})]}),re(U5,{label:n.overflow,id:"design-overflow",value:e.overflow||t.overflow,onChange:c=>a("overflow",c),optionLabels:i?.overflow?.options})]})]})})}var ei=["width","minWidth","maxWidth","height","minHeight","maxHeight","overflow","padding","margin","backgroundColor","backgroundImage","borderWidth","borderStyle","borderColor","borderRadius","color","fontFamily","fontSize","fontWeight","fontStyle","lineHeight","letterSpacing","textAlign","textDecoration","textTransform"],qt=Object.fromEntries(ei.map(e=>[e,""]));function Y5(e,t,o,a){let r={...t};for(let l of ei){let n=e[l];n!=null&&!o.has(l)&&(r[l]=n[a]??t[l]??"")}return r}var ti=we.forwardRef(function(t,o){let{component:a,styles:r,onStyleChange:l,onTextChange:n,onHistoryStateChange:i,onAddToChatContext:s,onOpenSourceFile:d,onMediaChange:u,showAddToChatContext:f=!0,showOpenSourceFile:C=!0,labels:c,imageSource:m}=t,L=f1(V8,c),[p,I]=we.useState(qt),[h,V]=we.useState(qt),[g,S]=we.useState(()=>new Set),R=we.useRef(p);R.current=p;let G=we.useRef(h);G.current=h;let y=we.useRef(g);y.current=g;let D=we.useRef(new Map),X=we.useRef(l);X.current=l;let Q=we.useRef(n);Q.current=n;let J=we.useRef(u);J.current=u;let Z=we.useRef(null);Z.current||(Z.current=Q5((B,q,K)=>X.current(B,q,K),(B,q)=>Q.current?.(B,q),(B,q,K)=>J.current?.(B,q,K)));let E=Z.current,M=we.useRef(i);M.current=i;let[w,b]=we.useState(()=>E.getUndoCount()),x=E.getMaxHistorySize();we.useEffect(()=>{let B=K=>{if(M.current?.({canUndo:K.canUndo,canRedo:K.canRedo}),b(K.undoCount),!(K.type==="command-undone"||K.type==="command-redone"))return;let se=K.type==="command-undone",ie=K.command?.data?.property,Ce=K.command?.data?.changes,Me=[];typeof ie=="string"?Me=[[ie,typeof K.appliedValue=="string"?K.appliedValue:""]]:Array.isArray(Ce)&&(Me=Ce.filter(fe=>fe!=null&&typeof fe.property=="string").map(fe=>[fe.property,String((se?fe.oldValue:fe.newValue)??"")])),Me.length!==0&&(I(fe=>{let be={...fe};for(let[ve,Ne]of Me)be[ve]=Ne;return be}),S(fe=>{let be=new Set(fe);for(let[ve]of Me)be.add(ve);return be}))},q=E.subscribe(B);return M.current?.({canUndo:E.canUndo(),canRedo:E.canRedo()}),b(E.getUndoCount()),q},[E]);let O=w>=x,P=we.useRef(null),A=we.useRef(!1);we.useEffect(()=>{O&&!A.current&&P.current?.focus(),A.current=O},[O]),we.useImperativeHandle(o,()=>({undo:()=>E.undo(),redo:()=>E.redo(),clearHistory:()=>{E.clear(),D.current.clear(),I(qt),V(qt),S(new Set),b(0)},getHistoryStack:()=>E.getHistoryStack(),getChangeSet:()=>W5(E.getHistoryStack()),recordTextChange:(B,q,K)=>E.recordTextChange(B,q,K),canUndo:()=>E.canUndo(),canRedo:()=>E.canRedo()}),[E]);let $=a?`${a.name}-${a.tagName??""}-${a.debugSource?.lineNumber??""}-${a.debugSource?.columnNumber??""}`:"none",W=we.useRef("none");we.useEffect(()=>{let B=W.current,q,K,ne;if($!==B){B!=="none"&&y.current.size>0&&D.current.set(B,{styles:R.current,computedStyles:G.current,sessionEdits:y.current}),W.current=$;let ie=D.current.get($);q=ie?ie.styles:qt,K=ie?ie.computedStyles:qt,ne=ie?ie.sessionEdits:new Set}else q=R.current,K=G.current,ne=y.current;let se=r||{};I(Y5(se,q,ne,"inline")),V(Y5(se,K,ne,"computed")),S(ne)},[$,r]);let F=we.useCallback((B,q)=>{let K=D8(R.current,B),ne=kn(a),se=J5(B,q,G.current.backgroundImage,R.current.backgroundImage);l(B,q);for(let ie of se)l(ie.property,ie.newValue);se.length===0?E.recordStyleChange(B,K,q,ne):E.recordStyleBatch([{property:B,oldValue:K,newValue:q},...se.map(ie=>({property:ie.property,oldValue:ie.oldValue,newValue:ie.newValue}))],ne),I(ie=>{let Ce={...ie,[B]:q};for(let Me of se)Ce[Me.property]=Me.newValue;return Ce}),S(ie=>{let Ce=new Set(ie);Ce.add(B);for(let Me of se)Ce.add(Me.property);return Ce})},[l,E,a]),U=we.useCallback((B,q)=>{let K=a?.media;if(!K)return;let ne=a?.debugSource;u?.(K.tag,{[B]:q},ne);let se=String(K[B]??"");E.recordMediaChange(K.tag,B,se,q,kn(a))},[a,u,E]),N=!!(a&&a.name),H=we.useCallback(()=>{let B=kn(a);B&&s?.(B)},[a,s]),v=N&&a&&a.tagName&&T8.has(a.tagName.toUpperCase()),k=a?.hasNonEditableText?L.general.inlineEditNonEditable:L.general.inlineEditEditable;return Ze("div",{role:"complementary","aria-label":L.general.ariaPropertyPanel,className:"property-panel-container",children:[Ze("header",{className:"property-panel-header",children:[re("h2",{id:"design-property-panel-title",className:"property-panel-title",children:L.general.headerTitle}),N&&Ze("div",{className:"property-panel-header-actions",children:[v&&re("span",{className:"property-panel-selected-component-action property-panel-selected-component-action-help","data-tooltip":k,"aria-label":k,children:re(An,{width:14,height:14,style:a.hasNonEditableText?P8:void 0})}),f&&!O&&re("button",{type:"button",className:"property-panel-selected-component-action",onClick:H,"data-tooltip":L.general.addToChatContext,"aria-label":L.general.addToChatContext,children:re(_8,{size:14})})]})]}),Ze("div",{className:"property-panel-content","aria-labelledby":"design-property-panel-title",children:[re(O8,{component:a,onOpenSourceFile:d,showOpenSourceFile:C,generalLabels:L.general}),O?re(E8,{ref:P,title:L.history.changeLimitTitle,body:Pe(L.history.changeLimitBody,[String(x)])}):re(B8,{styles:p,computedStyles:h,hasSelection:N,onStyleChange:F,generalLabels:L.general,sectionLabels:L.sections,instanceLabels:L.instances,editorLabels:c?.editors,component:a,onImageAttributeChange:U,imageSource:m},$)]})]})});function A8(e,t,o){if(!e)return;R8(e).render(we.createElement(ti,{...t,ref:o}))}export{ti as DesignPropertyPanel,_9 as REQUIRED_LABEL_KEYS,Pe as interpolate,A8 as mountDesignPropertyPanel,Is as validateLabels};
5
5
  /*! Bundled license information:
6
6
 
7
7
  react-is/cjs/react-is.production.min.js: