@wavy/react-ui 0.0.13 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.d.ts +3 -0
- package/dist/main.js +1 -1
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -1618,6 +1618,8 @@ interface EditableProps extends Partial<Pick<TextFieldProps, "focusColor">> {
|
|
|
1618
1618
|
onContentClick?: () => void;
|
|
1619
1619
|
onCancelClick?: () => void;
|
|
1620
1620
|
onSaveClick?: (value: string) => void;
|
|
1621
|
+
/** Formats the content when at rest */
|
|
1622
|
+
formatContent?: (value: string) => string;
|
|
1621
1623
|
onSave?: (value: string) => void;
|
|
1622
1624
|
/** @param value The content after it was changed (includes reversions)*/
|
|
1623
1625
|
onChange?: (value: string) => void;
|
|
@@ -1842,6 +1844,7 @@ declare namespace ProfileCardProps {
|
|
|
1842
1844
|
}
|
|
1843
1845
|
|
|
1844
1846
|
interface CheckboxProps {
|
|
1847
|
+
disabled?: boolean;
|
|
1845
1848
|
defaultChecked?: boolean;
|
|
1846
1849
|
checked?: boolean;
|
|
1847
1850
|
size?: BasicDivProps["size"];
|
package/dist/main.js
CHANGED
|
@@ -14,7 +14,7 @@ import'path';import'url';import {ClientOnly,IconButton,Skeleton,Span,Tooltip,Por
|
|
|
14
14
|
transparent ${n}
|
|
15
15
|
)
|
|
16
16
|
${r}
|
|
17
|
-
`}function cm(e,r){return {display:"flex",justifyContent:"center",alignItems:"center",flexDirection:r?"column":"row",...e}}function dm(e,r){let t=o=>"affectedCorners"in e&&typeof e.affectedCorners=="string"?o.includes(e.affectedCorners)?e.radius:void 0:"affectedCorners"in e?e.affectedCorners.includes(o)?e.radius:void 0:e[o];return {...r,borderTopLeftRadius:t("top-left"),borderTopRightRadius:t("top-right"),borderBottomLeftRadius:t("bottom-left"),borderBottomRightRadius:t("bottom-right")}}function um(e){let r=typeof e.disabledCurves=="function"?e.disabledCurves():e.disabledCurves,t=n=>r==="both"||r===n?0:e.curveRadius||le.md;return {borderTopLeftRadius:t("left"),borderBottomLeftRadius:t("left"),borderTopRightRadius:t("right"),borderBottomRightRadius:t("right")}}function fm(e){let r=0,t=0,o=0,n=0;document.getElementById(e.id+"header")?document.getElementById(e.id+"header").onmousedown=i:e.onmousedown=i;function i(c){c.preventDefault(),o=c.clientX,n=c.clientY,document.onmouseup=s,document.onmousemove=l;}function l(c){c.preventDefault(),r=o-c.clientX,t=n-c.clientY,o=c.clientX,n=c.clientY,e.style.top=e.offsetTop-t+"px",e.style.left=e.offsetLeft-r+"px";}function s(){document.onmouseup=null,document.onmousemove=null;}}function mm(e){return {...e,margin:0,padding:0}}function X(e,r={apply:true}){return r.apply?ze(1,e):e}function gm(e,r={apply:true}){return r.apply?{...e,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}:e}function Gt(e){let r=e;for(;r&&!Tr(r);)r=r.parentElement;return r}function jt(e){let r=document.createElement("span");r.textContent="A",r.style.visibility="hidden",r.style.position="absolute";let t=getComputedStyle(e);r.style.fontFamily=t.fontFamily,r.style.fontSize=t.fontSize,r.style.lineHeight=t.lineHeight,document.body.appendChild(r);let o=r.offsetHeight;return document.body.removeChild(r),e.offsetHeight>o+2}function C(e,r){if(!e||typeof e!="string")return;let t=r?.preference||"css",o=e.replaceAll(" ",""),{0:n,1:i}=o.split("["),l=()=>J[o],s=()=>i?$i(ee[n],parseFloat(i)):ee[o];if(t==="css"){if(o in J)return l();if(n in ee)return s()}else if(t==="res"){if(n in ee)return s();if(o in J)return l()}return o}var Hi=e=>/^#([A-Fa-f0-9]{3,4}){1,2}$/.test(e),Wi=e=>parseInt(e.repeat(2/e.length),16);function $i(e,r=1){let t=(v,m)=>v.match(new RegExp(`.{${m}}`,"g")),o=v=>typeof v<"u"?v/255:typeof r!="number"||r<0||r>1?1:r;if(!Hi(e))throw new Error(`Invalid HEX: ${e}`);let n=Math.floor((e.length-1)/3),i=t(e.slice(1),n),[l,s,c,g]=i.map(Wi);return `rgba(${l}, ${s}, ${c}, ${o(g)})`}function vm(e,r){let t=e.includes(",")?",":" ",o=e.split("").filter(n=>(t+"0123456789").includes(n)).join("").split(t);return o.length===3?o.push(`${r}`):o=o.with(3,`${r}`),"rgba("+o.join(t)+")"}function ym(e){return window.matchMedia(`(max-width:${e})`).matches}function hm(e){return window.matchMedia(`(min-width:${e})`).matches}function ze(e=2,r){return {...r,overflow:"hidden",width:"100%",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical"}}function Ni(e){return e*16}function pm(e){return `${Ni(e)}px`}function Tr(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function Cm(e){let r=document.body,t=e.replace("var(","").replace(")","");return getComputedStyle(r).getPropertyValue(t)}a();var Ji=Object.freeze({"2xl":"1.75rem",xl:"1.5rem",lg:"1rem",md:"0.5rem",sm:"0.25rem",xs:"0.125rem","2xs":"0.1rem"}),se=Ji;a();var Xi=Object.freeze({"2xl":"1.75rem",xl:"1.5rem",lg:"1.25rem",md:"1rem",sm:"0.85rem",xs:"0.75rem","2xs":"0.65rem"}),G=Xi;var lr=["top","right","bottom","left"],Yt=(e,r)=>`translate(${e}, ${r})`,Kt=e=>`translateX(${e})`,qt=e=>`translateY(${e})`,Ui=(e,r)=>{let t=e.fontSize in G?G[e.fontSize]:e.fontSize,{overflowX:o,overflowY:n}=(()=>{let s=e?.spill||{};if(s)return {overflowX:typeof s=="string"?s:s?.x||"visible",overflowY:typeof s=="string"?s:s?.y||"visible"}})();function i(s){return e.style?.[s]?e.style[s]:(e.size||e.size===0)&&(s==="height"||s==="width")?e.size==="full"?"100%":e.size:e[s]==="full"?"100%":e[s]}let l={top:e.centerSelf===true||e.centerSelf==="y"?"50%":e.top,left:e.centerSelf===true||e.centerSelf==="x"?"50%":e.left,right:e.right,bottom:e.bottom,cursor:e.clickable?"pointer":e.cursor,scrollbarColor:`${C(e.scrollbarThumbColor||"inherit")} ${C(e.scrollbarThumbColor||"inherit")}`,transform:e.centerSelf===true?Yt("-50%","-50%"):e.centerSelf==="x"?Kt("-50%"):e.centerSelf==="y"?qt("-50%"):e.translate?.x&&e.translate?.y?Yt(e.translate.x,e.translate.y):e.translate?.x?Kt(e.translate.x):e.translate?.y?qt(e.translate.y):void 0,position:e.pos==="absolute"||e.centerSelf?"absolute":e.pos,padding:Ki(e.padding),fontSize:t,fontWeight:e.fontWeight,border:e.border,borderColor:Gi(e.borderColor),borderWidth:ji(e.borderWidth,e.borderColor?"1px":void 0),borderStyle:Yi(e.borderStyle,e.borderColor?"solid":void 0),lineHeight:t?`calc(${t} + (${t} * .15))`:void 0,borderRadius:qi(e.corners),userSelect:e.disableSelection?"none":e.allowTextSelection?"text":void 0,minHeight:i("minHeight"),minWidth:i("minWidth"),maxHeight:i("maxHeight"),maxWidth:i("maxWidth"),height:i("height"),width:i("width"),display:e.hide?"none":void 0,flexDirection:e.row?"row":"column",flex:e.flex,backgroundColor:C(e.backgroundColor),color:C(e.color),gap:Zi(e.gap),overflowX:o,overflowY:n,aspectRatio:e.aspectRatio,opacity:e.fade,alignItems:e.centerContent?"center":e.align||"start",justifyContent:e.centerContent?"center":e.justify||"start",backdropFilter:e.backdropBlur?`blur(${e.backdropBlur})`:void 0,filter:e.blur?`blur(${e.blur})`:void 0,...e.style};return Object.keys(l).forEach(s=>{let c=s,g=l[c];typeof g=="string"&&(g=g.trim()),!g&&g!==0&&delete l[c];}),(r||e.debug)&&console.log({props:e,style:l}),l};function Gi(e){if(!e)return;let r="transparent";return typeof e=="string"?C(e):lr.map(t=>{if(Array.isArray(e)){let{0:o,1:n}=e;return (Array.isArray(n)?n.includes(t):[t,"all"].includes(n))?C(o):r}return typeof e=="object"&&t in e?C(e[t]):r}).join(" ")}function ji(e,r){if(!e)return r;let t=0;return typeof e=="string"?e:lr.map(o=>{if(Array.isArray(e)){let{0:n,1:i}=e;return (Array.isArray(i)?i.includes(o):[o,"all"].includes(i))?n:t}return typeof e=="object"&&o in e?e[o]:t}).join(" ")}function Yi(e,r){if(!e)return r;let t=0;return typeof e=="string"?e:lr.map(o=>{if(Array.isArray(e)){let{0:n,1:i}=e;return (Array.isArray(i)?i.includes(o):[o,"all"].includes(i))?n:t}return typeof e=="object"&&o in e?e[o]:t}).join(" ")}function Ki(e){let t=o=>o?o in se?se[o]:o:"0px";return e?typeof e=="string"?t(e):lr.map(o=>{if(Array.isArray(e)){let{0:n,1:i}=e;return (Array.isArray(i)?i.includes(o):i===o)?t(n):"0px"}return typeof e=="object"&&o in e?t(e[o]):"0px"}).join(" "):"0px"}function qi(e){let t=n=>n?n in le?le[n]:n:"0px";return e?typeof e=="string"?t(e):["topLeft","topRight","bottomRight","bottomLeft"].map(n=>{let i=e?.[n];return n.includes("top")&&e?.top?t(e.top):n.includes("bottom")&&e?.bottom?t(e.bottom):i?t(i):"0px"}).join(" "):"0px"}function Zi(e){if(!(!e||typeof e!="string"))return e in se?se[e]:e}var b=Ui;var ia=["inherit","sm","md","lg","xl","2xl","xs"],aa=["sm","md","lg","xl","2xl","xs","2xs"];function Zt(e){let[r,t]=useState(false),o=e.disabled||r,n=async m=>{if(!o){if(!e.async)return e.onClick?.(m);t(true),await e.onClick?.(m),setTimeout(()=>t(false),e.pendingDelay||1);}},i=m=>{if(m){if(typeof m==typeof FaFolder){let h=S=>typeof S=="string"&&[...ia].includes(S);return jsx(Icon,{size:h(e.iconSize)?e.iconSize:void 0,boxSize:h(e.iconSize)?void 0:e.iconSize,as:m})}return m}},l=i(e.leadingEl),s=i(e.trailingEl),c=m=>typeof m=="string"&&[...aa].includes(m),{size:g,...v}=e;return jsxs(Button,{...ae(e),disabled:o,size:c(g)?g:void 0,style:b({...v,size:c(g)?void 0:g,clickable:!o,row:true,centerContent:true,gap:e.gap||"md",corners:e.corners||"md",padding:e.padding||"md",color:e.color||(e.variant==="outline"?"onSurface":"onPrimary"),backgroundColor:e.backgroundColor||(e.variant==="outline"?"transparent":"primary"),border:e.border,borderColor:e.borderColor||(e.variant==="outline"?"onSurface[0.1]":void 0),fade:o?e.disabledOpacity||.5:e.fade||1,pos:r?"relative":e.pos,height:e.height||"fit-content",width:e.width||"fit-content"}),onClick:n,onMouseDown:e.onMouseDown,children:[l,e.text,e.children,s,r&&jsx(AbsoluteCenter,{children:jsx(Spinner,{size:"sm",animationDuration:"slowest",borderWidth:".1rem",color:e.spinnerColor?C(e.spinnerColor):"blue.500"})})]})}var ce=e=>r=>jsx(Zt,{...(()=>{let o={...r,...e.preset};for(let n of Object.keys(e.optional||{})){let i=n,l=i in o,s=[void 0,null].includes(o[i]);(!l||s)&&(o[i]=e.optional[i]);}return o})()}),B=Zt;a();a();a();a();a();function cr(){return cr=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)({}).hasOwnProperty.call(t,o)&&(e[o]=t[o]);}return e},cr.apply(null,arguments)}a();a();function Qt(e){for(var r=0,t,o=0,n=e.length;n>=4;++o,n-=4)t=e.charCodeAt(o)&255|(e.charCodeAt(++o)&255)<<8|(e.charCodeAt(++o)&255)<<16|(e.charCodeAt(++o)&255)<<24,t=(t&65535)*1540483477+((t>>>16)*59797<<16),t^=t>>>24,r=(t&65535)*1540483477+((t>>>16)*59797<<16)^(r&65535)*1540483477+((r>>>16)*59797<<16);switch(n){case 3:r^=(e.charCodeAt(o+2)&255)<<16;case 2:r^=(e.charCodeAt(o+1)&255)<<8;case 1:r^=e.charCodeAt(o)&255,r=(r&65535)*1540483477+((r>>>16)*59797<<16);}return r^=r>>>13,r=(r&65535)*1540483477+((r>>>16)*59797<<16),((r^r>>>15)>>>0).toString(36)}a();var eo={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};a();function dr(e){var r=Object.create(null);return function(t){return r[t]===void 0&&(r[t]=e(t)),r[t]}}var ca=/[A-Z]|^ms/g,da=/_EMO_([^_]+?)_([^]*?)_EMO_/g,no=function(r){return r.charCodeAt(1)===45},ro=function(r){return r!=null&&typeof r!="boolean"},Er=dr(function(e){return no(e)?e:e.replace(ca,"-$&").toLowerCase()}),to=function(r,t){switch(r){case "animation":case "animationName":if(typeof t=="string")return t.replace(da,function(o,n,i){return j={name:n,styles:i,next:j},n})}return eo[r]!==1&&!no(r)&&typeof t=="number"&&t!==0?t+"px":t};function Oe(e,r,t){if(t==null)return "";var o=t;if(o.__emotion_styles!==void 0)return o;switch(typeof t){case "boolean":return "";case "object":{var n=t;if(n.anim===1)return j={name:n.name,styles:n.styles,next:j},n.name;var i=t;if(i.styles!==void 0){var l=i.next;if(l!==void 0)for(;l!==void 0;)j={name:l.name,styles:l.styles,next:j},l=l.next;var s=i.styles+";";return s}return fa(e,r,t)}case "function":{if(e!==void 0){var c=j,g=t(e);return j=c,Oe(e,r,g)}break}}var v=t;if(r==null)return v;var m=r[v];return m!==void 0?m:v}function fa(e,r,t){var o="";if(Array.isArray(t))for(var n=0;n<t.length;n++)o+=Oe(e,r,t[n])+";";else for(var i in t){var l=t[i];if(typeof l!="object"){var s=l;r!=null&&r[s]!==void 0?o+=i+"{"+r[s]+"}":ro(s)&&(o+=Er(i)+":"+to(i,s)+";");}else {if(Array.isArray(l)&&typeof l[0]=="string"&&(r==null||r[l[0]]===void 0))for(var c=0;c<l.length;c++)ro(l[c])&&(o+=Er(i)+":"+to(i,l[c])+";");else {var g=Oe(e,r,l);switch(i){case "animation":case "animationName":{o+=Er(i)+":"+g+";";break}default:o+=i+"{"+g+"}";}}}}return o}var oo=/label:\s*([^\s;{]+)\s*(;|$)/g,j;function io(e,r,t){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var o=true,n="";j=void 0;var i=e[0];if(i==null||i.raw===void 0)o=false,n+=Oe(t,r,i);else {var l=i;n+=l[0];}for(var s=1;s<e.length;s++)if(n+=Oe(t,r,e[s]),o){var c=i;n+=c[s];}oo.lastIndex=0;for(var g="",v;(v=oo.exec(n))!==null;)g+="-"+v[1];var m=Qt(n)+g;return {name:m,styles:n,next:j}}a();var ma=typeof document<"u",ao=function(r){return r()},ga=re.useInsertionEffect?re.useInsertionEffect:false,lo=ma&&ga||ao;a();var Fr=typeof document<"u";function so(e,r,t){var o="";return t.split(" ").forEach(function(n){e[n]!==void 0?r.push(e[n]+";"):n&&(o+=n+" ");}),o}var Rr=function(r,t,o){var n=r.key+"-"+t.name;(o===false||Fr===false&&r.compat!==void 0)&&r.registered[n]===void 0&&(r.registered[n]=t.styles);},co=function(r,t,o){Rr(r,t,o);var n=r.key+"-"+t.name;if(r.inserted[t.name]===void 0){var i="",l=t;do{var s=r.insert(t===l?"."+n:"",l,r.sheet,true);!Fr&&s!==void 0&&(i+=s),l=l.next;}while(l!==void 0);if(!Fr&&i.length!==0)return i}};a();var va=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,uo=dr(function(e){return va.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});var pa=typeof document<"u",_a=uo,ba=function(r){return r!=="theme"},fo=function(r){return typeof r=="string"&&r.charCodeAt(0)>96?_a:ba},mo=function(r,t,o){var n;if(t){var i=t.shouldForwardProp;n=r.__emotion_forwardProp&&i?function(l){return r.__emotion_forwardProp(l)&&i(l)}:i;}return typeof n!="function"&&o&&(n=r.__emotion_forwardProp),n},Sa=function(r){var t=r.cache,o=r.serialized,n=r.isStringTag;Rr(t,o,n);var i=lo(function(){return co(t,o,n)});if(!pa&&i!==void 0){for(var l,s=o.name,c=o.next;c!==void 0;)s+=" "+c.name,c=c.next;return re.createElement("style",(l={},l["data-emotion"]=t.key+" "+s,l.dangerouslySetInnerHTML={__html:i},l.nonce=t.sheet.nonce,l))}return null},go=function e(r,t){var o=r.__emotion_real===r,n=o&&r.__emotion_base||r,i,l;t!==void 0&&(i=t.label,l=t.target);var s=mo(r,t,o),c=s||fo(n),g=!c("as");return function(){var v=arguments,m=o&&r.__emotion_styles!==void 0?r.__emotion_styles.slice(0):[];if(i!==void 0&&m.push("label:"+i+";"),v[0]==null||v[0].raw===void 0)m.push.apply(m,v);else {var h=v[0];m.push(h[0]);for(var S=v.length,x=1;x<S;x++)m.push(v[x],h[x]);}var y=withEmotionCache(function(_,P,R){var z=g&&_.as||n,Pe="",Mt=[],tr=_;if(_.theme==null){tr={};for(var Lt in _)tr[Lt]=_[Lt];tr.theme=re.useContext(ThemeContext);}typeof _.className=="string"?Pe=so(P.registered,Mt,_.className):_.className!=null&&(Pe=_.className+" ");var or=io(m.concat(Mt),P.registered,tr);Pe+=P.key+"-"+or.name,l!==void 0&&(Pe+=" "+l);var hi=g&&s===void 0?fo(z):c,nr={};for(var ir in _)g&&ir==="as"||hi(ir)&&(nr[ir]=_[ir]);return nr.className=Pe,R&&(nr.ref=R),re.createElement(re.Fragment,null,re.createElement(Sa,{cache:P,serialized:or,isStringTag:typeof z=="string"}),re.createElement(z,nr))});return y.displayName=i!==void 0?i:"Styled("+(typeof n=="string"?n:n.displayName||n.name||"Component")+")",y.defaultProps=r.defaultProps,y.__emotion_real=y,y.__emotion_base=n,y.__emotion_styles=m,y.__emotion_forwardProp=s,Object.defineProperty(y,"toString",{value:function(){return "."+l}}),y.withComponent=function(_,P){var R=e(_,cr({},t,P,{shouldForwardProp:mo(y,P,true)}));return R.apply(void 0,m)},y}};ki(vo());var xa=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],Be=go.bind(null);xa.forEach(function(e){Be[e]=Be(e);});var Or=class{static getStyle(r){if(r)return JSON.parse(JSON.stringify(r||{}),(t,o)=>t==="backgroundColor"||t==="color"?C(o):o)}static span=r=>Be.span({...this.getStyle(r)});static div=r=>Be.div({...this.getStyle(r)});static img=r=>Be.img({...this.getStyle(r)})},ke=Or;function wa(e){let r=useRef(null),[t,o]=useState(false),n=T({top:0,left:0});e.rememberScrollPos&&useEffect(()=>{let v=n.read();r.current&&[v.top,v.left].some(m=>!!m)&&(r.current.scrollTop=v?.top??0,r.current.scrollLeft=v?.left??0);},e.updateScrollPosDeps),(e.rememberScrollPos||e.overflowPadding)&&useEffect(()=>{r.current&&Tr(r.current)&&!t&&o(true);},[]);let i="10%",l=`linear-gradient(to bottom, transparent, black calc(${i}/4), black calc(100% - ${i}), transparent) `,s=e.decreaseYFaderPadding?"2vh":"5rem",c=b({...e,spill:e.spill==="hidden"?"hidden":e.spill||(e.rememberScrollPos?"auto":void 0),padding:e.padding||{right:e.overflowPadding&&t?e.overflowPadding:void 0,top:e.enableYFaders?s:void 0,bottom:e.enableYFaders?s:void 0}}),g=ke.div(e.css);if(!e.hide)return e.asChildren?e.children:jsx(g,{...ae(e),ref:e.rememberScrollPos||e.overflowPadding?r:e.ref,draggable:e.draggable,onScroll:v=>{let m=r?.current?.scrollTop,h=r?.current?.scrollLeft;!t&&e.overflowPadding&&o(true),isEmpty(strictArray([m,h]))||n.upsert({top:m??0,left:h??0}),e.onScroll?.(v);},style:{...c,display:e.grid?"grid":c.display||"flex",flexWrap:c.flexWrap||(e.flexWrap?"wrap":void 0),gridTemplateColumns:c?.gridTemplateColumns||e.gridCols||"1fr",gridTemplateRows:c?.gridTemplateRows||e.gridRows,WebkitMaskImage:e.enableYFaders&&l,maskImage:e.enableYFaders&&l},children:e.children})}var d=wa;a();function Ea(e){let r=!!e.tint,t=ke.img(e.sx);return jsx(t,{...ae(e),loading:"lazy",decoding:"async",fetchPriority:"high",src:e.src,alt:e.alt,style:{...b(e),filter:r?`drop-shadow(0px 1000px 0 ${C(e.tint)})`:void 0,transform:r&&"translateY(-1000px)",objectFit:e.noFit?"none":e.fill?"fill":e.cover?"cover":e.scaleDown?"scale-down":"contain"}})}var de=Ea;a();function za(e){let r=o=>e.onItemClick?.(o),t=e.bold??e.items.some(o=>typeof o=="object");return jsx(d,{gap:e.gap||"md",width:e.width,height:e.height,children:e.items.map((o,n)=>typeof o=="string"?jsx(Ir,{index:n,item:o,bold:t,active:e.isItemActive(o),completed:e.isItemCompleted(o),onClick:r},o):jsxs(d,{width:"full",children:[jsx(Ir,{index:n,bold:t,item:o.label,active:o.nestedItems.some(i=>e.isItemActive(i)),completed:o.nestedItems.every(i=>e.isItemCompleted(i)),onClick:o.nestedItems?.[0]?()=>r(o.nestedItems[0]):void 0}),jsx(d,{width:"full",children:o.nestedItems.map((i,l)=>jsx(Ir,{index:l,fontSize:"sm",nested:true,item:i,active:e.isItemActive(i),completed:e.isItemCompleted(i),onClick:r},i))})]},o.label))})}function Ir(e){let r=ee.white,t=J.onSurface,o=e.nested?t:J.tertiaryContainer,n=e.active?o:ee.carlsbergGreen,i=e.active&&!e.nested?o:J["onSurface[0.25]"],l=e.nested?J["onSurface[0.4]"]:J["onSurface[0.5]"],s=J["onSurface[0.2]"],c=()=>e.onClick?.(e.item),g=IoMdCheckmark;return jsxs(d,{row:true,gap:"md",clickable:true,width:"full",fontSize:e.fontSize||"md",align:"center",onClick:c,css:{transition:"all 300ms linear",color:e.completed&&!(e.nested&&e.active)?i:e.active?o:l,borderColor:e.completed?n:e.active?o:s,":hover":e.active?void 0:{color:t,borderColor:e.completed&&!e.nested?void 0:t}},children:[jsx(d,{corners:"circle",centerContent:true,size:"1.5rem",style:{textAlign:"center",flexShrink:0},borderColor:"inherit",backgroundColor:e.completed?n:void 0,color:e.completed?r:"inherit",fade:e.nested?0:1,padding:e.completed?void 0:"md",children:e.completed?jsx(g,{fontSize:"1rem"}):jsx(p,{fontWeight:"bold",textAlign:"center",centerContent:true,text:`${e.index+1}`,style:{lineHeight:"0"}})}),jsx("span",{style:{width:"100%",fontWeight:e.bold?"bold":void 0,opacity:e.completed&&!e.active?e.nested?.5:.75:1},children:e.item}),e.completed&&e.nested&&jsx(g,{size:"1.25rem",opacity:.75})]})}var Ar=za;a();function Ia(e){let r=i=>e.ellipsis?X(i):e.lineLimit?ze(e.lineLimit,i):i,t=()=>strictArray([e.underline||e.link||e.fakeHyperlink||e.hyperlink?"underline":void 0,e.strikeThrough?"line-through":void 0]).join(" ").trim(),o=b({...e,color:e.fakeHyperlink||e.hyperlink?"hyperlink":e.color,cursor:e.link||e.hyperlink||e.clickable?"pointer":e.cursor}),n=ke.span(e.sx);return jsx(n,{...ae(e),ref:e.ref,style:r({...o,width:e.ellipsis?"100%":o.width,textAlign:o.textAlign||e.textAlign||"justify",fontStyle:o.fontStyle||e.italic?"italic":void 0,textDecoration:o.textDecoration||t()||void 0}),children:e.text||e.children})}var p=Ia;a();var Ae=createContext(null);function Va(e){let r=e.columnWeight||"1fr",t=["none",0].includes(e.separatorColor)?void 0:e.separatorColor??"onSurface[0.25]",o=x=>(e.selectable?"auto ":"")+x.map(_=>typeof _=="string"||!_.weight?r:_.weight).join(" "),n=!!e.selectedRows,[i,l]=useState(e.defaultSelectedRows||[]),[s,c]=useState(o(e.columns)),g=i.length===e.entries.length&&e.entries.length>0,v=(Array.isArray(e.children)?e.children:[e.children]).filter((x,y)=>y<2),m=()=>{let x=[];g||(x=e.entries.map((y,_)=>_)),e.onSelectedRowsChange?.(x),n||l(x);},h=x=>{let y=[...i];y.includes(x)?y=y.filter(_=>_!==x):y.push(x),e.onSelectedRowsChange?.(y),n||l(y);},S=()=>e.columnWeight?e.columns.map(x=>{let y=typeof x=="object"?x:{};return {...y,name:ve(x),weight:"weight"in y?y.weight:e.columnWeight,textAlign:"textAlign"in y?y.textAlign:e.textAlign||"start"}}):e.columns;return useEffect(()=>{},[]),jsx(Ae.Provider,{value:{...e,gridCols:s,selectedRowIndices:n?e.selectedRows:i,separatorColor:t,allRowsSelected:g,onSelectRowClick:h,onSelectAllRowsClick:m,columns:S(),padding:e.padding??"sm",columnGap:e.columnGap??e.gap??"lg",rowGap:e.rowGap??e.gap,onAutoColumnWidthsComputed:x=>{let y=e.columns.map(_=>{let P=x.get(ve(_));return P?{..._,weight:`${P}px`}:_});c(o(y));}},children:jsx(d,{grid:true,gridRows:"auto auto",corners:e.corners,height:e.height,width:e.width,minHeight:e.minHeight,maxHeight:e.maxHeight,minWidth:e.minWidth,maxWidth:e.maxWidth,color:e.color,fontSize:e.fontSize,fontWeight:e.fontWeight,backgroundColor:e.backgroundColor,spill:e.spill,style:{gridTemplateAreas:'"header" "body"'},children:v})})}function Ha(e){let r=useContext(Ae),t=e.separatorColor||r.separatorColor;return jsxs(d,{grid:true,gridCols:r.gridCols,gap:r.columnGap,borderColor:e.borderColor||(t?[t,"bottom"]:void 0),spill:"hidden",padding:e.padding??r.padding,corners:e.corners??(r.separatorColor?0:void 0),color:e.color,backgroundColor:e.backgroundColor,fontWeight:e.fontWeight,fontSize:e.fontSize,align:"center",width:"full",style:{gridArea:"header"},children:[r.selectable&&jsx(bo,{selected:r.allRowsSelected,onClick:r.onSelectAllRowsClick}),r.columns.map((o,n)=>{let i=ve(o);return jsx(p,{size:"full",borderColor:t&&n!==lastIndex(r.columns)?[t,"right"]:void 0,text:!e.formatColumnName||e.formatColumnName==="camelToLetter"?camelCaseToLetter(i):e.formatColumnName?.(i)??i,style:{flexGrow:1,textAlign:Ie("textAlign",o)}},i+n)})]})}function Wa(e){let r=useContext(Ae),t=useRef(new Map);return useEffect(()=>()=>{t.current.clear();},[]),jsx(d,{width:"full",gap:r.rowGap,padding:e.padding??(r.rowGap?[r.rowGap,"top"]:void 0),color:e.color,fontSize:e.fontSize,style:{paddingTop:r.rowGap,gridArea:"body"},children:r.entries.map((o,n)=>jsx($a,{rowData:o,index:n,style:e.styleRow?.(n),styleCell:e.styleCell,onColWidthComputed:(i,l)=>{let s=t.current.get(i);(!s||l>s)&&t.current.set(i,l);},onCellRendered:i=>{let l=n===lastIndex(r.entries),s=i===lastIndex(r.columns);l&&s&&t.current.size>0&&r.onAutoColumnWidthsComputed(t.current);}},n))})}function $a(e){let r=useContext(Ae),t=r.selectedRowIndices.includes(e.index),o=()=>r.onSelectRowClick(e.index),{gap:n,padding:i,backgroundColor:l}=b({gap:r.columnGap,padding:r.padding??e.padding,backgroundColor:t?"onSurface[0.1]":"transparent"});return jsxs(d,{style:{gap:n,padding:i,backgroundColor:l,width:"100%",display:"grid",alignItems:"center",gridTemplateColumns:r.gridCols,...e.style},children:[r.selectable&&jsx(bo,{selected:t,onClick:o}),r.columns.map((s,c,g)=>{let v=ve(s),m=e.rowData[v],h=typeof s=="object"?s?.placeholder:void 0,S=()=>e.onCellRendered?.(c),x=c+ve(s),y=Ie("textAlign",s),_={textAlign:y,justifyContent:y,color:Ie("color",s),opacity:Ie("opacity",s,1),backgroundColor:Ie("backgroundColor",s),...e.styleCell?.({cellIndex:e.index*r.columns.length+c,columnName:v,columnIndex:c,rowIndex:e.index,data:typeof m=="string"?m:null,siblingData:{previous:c===0?null:run(e.rowData[ve(g[c-1])],P=>typeof P=="string"?P:null),next:c===g.length-1?null:run(e.rowData[ve(g[c+1])],P=>typeof P=="string"?P:null)}})||{}};return typeof s=="object"&&s.weight==="auto"?jsx(Na,{data:m,style:_,onRender:S,placeholder:h,onWidthComputed:P=>e.onColWidthComputed(v,P)},x):jsx(So,{data:m,style:_,placeholder:h,onRender:S},x)})]})}function bo(e){let r=useContext(Ae),{disableSeparator:t,separatorColor:o}=r.slotProps?.selectColumn||{},n=o||r.separatorColor;return jsx(d,{padding:t?void 0:["md","right"],borderColor:n&&!t?[n,"right"]:void 0,children:jsx(Po,{padding:"sm",iconSize:".85rem",checked:e.selected,onChange:e.onClick})})}function Na(e){let r=useRef(null);return useEffect(()=>{r.current?e.onWidthComputed(parseFloat(getComputedStyle(r.current).width)):console.error(new Error("Failed to compute style for an Auto cell",{cause:{data:e.data,cellRef:r}}));},[]),jsx(So,{noWrap:true,data:e.data,placeholder:e.placeholder,ref:r,style:e.style,onRender:e.onRender})}function So(e){return useEffect(()=>{e.onRender?.();},[]),typeof e.data=="string"||!e.data?jsx(p,{ref:e.ref,children:e.data||"-",fade:e.data?1:.75,style:{...e.style,whiteSpace:e.noWrap?"nowrap":void 0,width:"100%"}}):e.ref?jsx("div",{ref:e.ref,style:{...e.style,width:"100%",overflow:"hidden"},children:e.data}):e.data}var ve=e=>typeof e=="string"?e:e.name,Ie=(e,r,t)=>typeof r=="object"&&e in r?r[e]:t,Ja={Root:Va,Header:Ha,Body:Wa},Xa=Ja;a();a();function Ga(e){return jsxs(d,{row:true,ref:r=>{r&&!e.scrollIntoView&&e.selected&&r.scrollIntoView(true);},gap:"sm",align:"center",fade:e.disabled?.5:1,width:e.width??"full",corners:e.corners??"md",padding:e.padding??"sm",fontSize:e.fontSize||"sm",cursor:e.disabled?"not-allowed":"pointer",css:{...e.sx,transition:e.sx?.transition||"all 200ms linear",color:e.color||e.sx?.color||(e.selected?"surface":"onSurface"),backgroundColor:e.backgroundColor||e.sx?.backgroundColor||(e.selected?"onSurface":void 0),":hover":e.disabled||e.selected?void 0:{...e.sx?.[":hover"],backgroundColor:e.sx?.[":hover"]?.backgroundColor||"onSurface[0.1]"}},onClick:e.disabled?void 0:e.onClick,children:[e.selected&&jsx(LuCheck,{style:{flexShrink:0}}),jsx("span",{children:e.value.toString(),style:X({maxWidth:"100%",flex:"1",alignItems:"start",textAlign:"start"})})]})}var Lr=Ga;var ko=createContext(null);function Qa(e){return jsx(ko.Provider,{value:e,children:jsx(De,{...e,backdropBlur:e.backdropBlur,padding:e.padding||"md",corners:e.corners||"md",displayAction:"click",content:jsx(el,{})})})}function el(){let e=useContext(ko),r=Do(),[t,o]=useState(e.isSelected?e.options.findIndex(i=>e.isSelected(i)):void 0),{triggerRerender:n}=L();return useEffect(()=>{setTimeout(()=>{n();},10);},[]),jsx(d,{spill:"auto",gap:e.gap||"sm",children:e.options.map((i,l)=>{let s=l===t,c=()=>{i.onClick?.(),e.onOptionClick?.(i,l,e.options),o(l),r.close();};return (!i||!i?.value)&&console.error(`Index ${l} is not defined in ${e.options.join()}`),jsx(Lr,{value:i?.value.toString(),disabled:i?.disabled,selected:s,onClick:c},l)})})}var Le=Qa;a();a();a();var wo=["Google"],To=["pdf","word","excel","img","txt","unknown"],Eo=Object.freeze({txt:["text/plain"],img:["image/jpeg","image/png","image/jpg"],excel:["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.ms-excel","application/vnd.ms-excel.sheet.macroEnabled.12"],word:["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/msword","application/vnd.microsoft.portable-executable"],pdf:["application/pdf"],unknown:[]});function Ro(e){let r=t=>{e.onChange(t.currentTarget.files);};return jsxs(FileUpload.Root,{alignItems:"stretch",width:e.width,maxWidth:e.maxWidth||"xl",maxFiles:e.maxFiles||(e.multiple?1/0:1),overflow:"hidden",height:e.height,accept:rl(e.accepts),children:[jsx(FileUpload.HiddenInput,{onChange:r}),e.children,e.showList&&jsx(FileUpload.List,{...e.slotProps?.fileList})]})}var rl=e=>e.flatMap(r=>Eo[r]);function dv(e){return jsx(Ro,{...e,children:jsxs(FileUpload.Dropzone,{borderRadius:"xl",height:"full",width:"full",overflow:"hidden",backgroundColor:C(e.backgroundColor||"transparent"),borderColor:C(e.borderColor||"outlineVariant"),color:C(e.color||"onSurface"),cursor:"pointer",children:[jsx(Icon,{size:"md",color:"fg.muted",children:jsx(LuUpload,{})}),jsx(FileUpload.DropzoneContent,{maxHeight:"100%",overflow:"hidden",children:e.content||jsxs(Fragment,{children:[jsx(Box,{children:"Drag and drop files here"}),jsx(Box,{color:"fg.muted",children:".png, .jpg up to 5MB"})]})})]})})}a();var Mo=createContext(null);function _v(e){let r=T(null),t=T(e.defaultValue??""),[o,n]=useState(e.value??t.read()),[i,l]=useState(false),s=e.activationMode||"click",c=e.size||"md",g=z=>{e.value===void 0&&n(z),e.onChange?.(z);},v=()=>{g(t.read());},m=()=>{e.onEdit?.(),!e.preventDefault&&l(true);},h=(z={asClick:true})=>{r.upsert("cancel"),v(),z.asClick&&e.onCancelClick?.(),l(false);},S=z=>{z.preventDefault(),r.read()!=="save"&&v(),l(false);},x=(z=true)=>{t.upsert(o),z&&(r.upsert("save"),e.onSaveClick?.(o)),e.onSave?.(o),l(false);},y=()=>{r.upsert("edit"),e.onEditClick?.(),m();},_=()=>{x(false);},P=()=>{e.onContentClick?.(),m();},R={align:"center",gap:e.rowGap??"sm",width:e.width,maxWidth:"full"};return jsx(Mo.Provider,{value:{padding:".25rem",iconSize:e.iconSize||c},children:jsxs(d,{...R,asChildren:!e.label,row:false,align:"start",children:[e.label&&jsx(p,{text:e.label,fontSize:G[c],fade:i?.75:.5,style:{transition:"all 200ms linear"}}),jsxs(d,{...R,grid:true,gap:e.columnGap??R.gap,gridCols:e.hideControls===true||Array.isArray(e.hideControls)&&["cancel","save","edit"].every(z=>e.hideControls.includes(z))?"1fr":e.control?"1fr auto":i?"1fr auto auto":"1fr auto",justify:e.spaceBetween?"space-between":void 0,children:[i?jsx(d,{width:"full",align:"center",gap:"md",children:jsx(U,{autoFocus:true,allowedChars:e.allowedChars,maxChars:e.maxChars,value:o,corners:"md",width:e.inputWidth,focusColor:e.focusColor,size:e.inputSize||c,placeholder:e.placeholder,showCharCounter:e.showCharCounter,slotProps:{charCounter:{fontSize:e.charCounterFontSize}},onChange:g,onBlur:S,onEnterKeyPressed:_,onEscapeKeyPressed:()=>h({asClick:false})})}):jsx(d,{spill:"hidden",width:"full",padding:e.contentPadding??["md",["top","bottom"]],corners:"sm",fontSize:e.fontSize||c,cursor:"text",css:{transition:"all 200ms linear",":hover":{backgroundColor:"onSurface[0.1]"}},onDoubleClick:s==="dblclick"?()=>h({asClick:false}):void 0,onClick:s==="click"?P:void 0,children:jsx(De,{...e.slotProps?.popover,allowInteractions:true,asChild:e.showPopoverOnHover===false?true:e.slotProps?.popover?.asChild??!!o,content:(e.slotProps?.popover?.content||e.renderPopoverContent?.(o))??o,displayAction:"hover",maxWidth:e.slotProps?.popover?.maxWidth||"10rem",maxHeight:e.slotProps?.popover?.maxHeight||"5rem",children:jsx("span",{style:X({opacity:e.placeholder&&!o?.85:1,width:"100%"}),children:o||e.placeholder})})}),e.hideControls!==true&&(e.control||jsx(ul,{editing:i,hideControl:typeof e.hideControls=="boolean"?void 0:e.hideControls,onCancel:h,onSave:x,onEdit:y}))]})]})})}function ul(e){let r=t=>Array.isArray(e.hideControl)?e.hideControl.includes(t):e.hideControl===t;return e.editing?jsxs(Fragment,{children:[!r("cancel")&&jsx(Hr,{outlined:true,icon:LuX,onClick:e.onCancel}),!r("save")&&jsx(Hr,{preventDefault:true,outlined:true,icon:LuCheck,onClick:e.onSave})]}):r("edit")?void 0:jsx(Hr,{icon:LuPencilLine,onClick:e.onEdit})}function Hr(e){let{padding:r,iconSize:t}=useContext(Mo);return jsx(d,{asChildren:e.outlined,corners:"sm",css:{transition:"all 200ms linear",":hover":{backgroundColor:"onSurface[0.1]"}},children:jsx(B,{size:t,padding:r,leadingEl:e.icon,backgroundColor:"transparent",borderColor:e.outlined?"onSurface[0.25]":void 0,onClick:e.onClick,aspectRatio:1,color:"onSurface",corners:"sm",onMouseDown:o=>{o.preventDefault();}})})}a();var $r=createContext(null);function gl(e){return jsx($r,{value:e.itemFade?{fade:e.itemFade}:{fade:.5},children:jsx(d,{...e,size:e.size??"full",centerContent:e.centerContent??true,gap:e.gap||"lg",children:e.children})})}function vl(e){let{fade:r}=useContext($r);return jsx(d,{fade:e.disableFade?1:r,size:e.size||"4rem",children:e.element})}function yl(e){let{fade:r}=useContext($r);return jsxs(d,{align:"center",gap:e.gap||"sm",children:[jsx(p,{fontWeight:"bold",fontSize:e.titleFontSize||"lg",text:e.title}),jsx(p,{fade:r,fontSize:e.descriptionFontSize,text:e.description})]})}var gr={Root:gl,Indicator:vl,Content:yl};a();function ue(e){let r=()=>{if(!e.disableFallback){if(typeof e.fallback=="string")return jsx(Avatar.Fallback,{name:e.fallback});if(e.fallback&&re__default.isValidElement(e.fallback))return e.fallback;if(e.fallback){let t=e.fallback;return jsx(t,{size:"50%"})}return jsx(Avatar.Fallback,{})}};return jsxs(Avatar.Root,{size:e.size||"md",backgroundColor:C(e.backgroundColor),color:C(e.color),children:[jsx(r,{}),jsx(Avatar.Image,{src:e.src})]})}a();function Ho(e){let r=useRef(null),t=useRef(null);return e.asChild?e.children:jsxs(Box,{position:"relative",ref:r,children:[e.children,jsx(Float,{ref:t,offset:e.offset||(e.circleChild?".25rem":void 0),placement:e.placement,children:e.badge})]})}a();var Wo=createContext(null);function kl(e){return jsx(Wo.Provider,{value:{gap:e.gap},children:jsx(d,{row:true,clickable:e.clickable,gap:e.gap??"md",padding:e.padding??"md",corners:e.corners??"lg",height:e.height,width:e.width,maxWidth:e.maxWidth,minWidth:e.minWidth,backgroundColor:e.backgroundColor,color:e.color,align:"center",style:e.style,spill:e.spill??"hidden",css:e.sx,children:e.children})})}function $o(e){return r=>{let{children:t,className:o,row:n=true,spill:i="hidden",centerContent:l=true,align:s="center",...c}=r;return jsx(d,{className:o,...c,row:n,spill:i,centerContent:l,align:s,children:t})}}function No(e){return r=>jsx("span",{style:(()=>{let o=b({...e,fontSize:r.fontSize||e.fontSize,fontWeight:r.fontWeight||e.fontWeight,fade:r.fade||e.fade,color:r.color||e.color||"inherit"});return !r.truncateStyle||r.truncateStyle==="none"?o:r.truncateStyle==="ellipsis"?X(o):ze(r.truncateStyle.lineCount,o)})(),children:r.value})}var Dl=$o(),wl=$o(),Tl=e=>{let{gap:r=e.gap}=useContext(Wo);return jsx(d,{gap:r,...e,spill:e.spill||"hidden",maxWidth:e.maxWidth||"full",children:e.children})},El=No({fontWeight:"bold",fontSize:"xs",fade:.75}),Fl=No({fontSize:"sm"}),W={Root:kl,LeadingAddOn:Dl,TrailingAddOn:wl,Content:Tl,Label:El,Item:Fl};a();function Ol(e){let r=()=>{if(typeof e.fallback=="string"||re__default.isValidElement(e.fallback))return e.fallback;let o=e.fallback||PiImageBrokenLight;return jsx(o,{size:"3rem"})};return jsxs(d,{className:e.className,padding:"1px",corners:"lg",backgroundColor:"onSurface",color:"surface",gap:"sm",spill:"hidden",fade:e.fade,height:e.height??"fit-content",width:e.width??"14rem",style:{...e.style,boxShadow:"rgba(0, 0, 0, 0.35) 0px 5px 15px"},children:[jsx(d,{centerContent:true,height:e.mediaHeight??"7rem",width:"full",backgroundColor:"surface",color:"onSurface",borderColor:"surface",corners:{top:"lg"},spill:"hidden",children:e.src?jsx(de,{cover:e.coverImg??true,size:e.imgSize??"full",corners:e.imgCorners??"md",spill:"hidden",src:e.src,style:{boxShadow:"rgba(0, 0, 0, 0.24) 0px 3px 8px"}}):jsx(r,{})}),jsxs(d,{width:"full",gap:"md",padding:"md",align:"start",spill:"hidden",children:[jsxs(d,{width:"full",gap:0,spill:"hidden",children:[jsx("span",{children:e.title,style:b({fontSize:e.titleFontSize??"md"})}),e.description&&jsx("span",{children:e.description,style:b({fontSize:e.descriptionFontSize??"xs",fade:.5})})]}),e.children]})]})}function Il(e){return jsx(d,{...e,width:e.width??"full",spill:e.spill||"hidden",children:e.children})}var ry={Root:Ol,Content:Il};a();function Al(e){let r={backgroundColor:"onSurface",color:"surface",padding:"md",corners:"lg"},t=i=>e[i]??r[i],o=i=>{if(!e.children)return e[i]||r[i]},n=e.disableBoxShadow?"none":e.style?.boxShadow||"rgba(0, 0, 0, 0.35) 0px 5px 15px";return jsxs(d,{className:e.className,asChildren:!e.children,height:t("height"),width:t("width"),backgroundColor:t("backgroundColor"),color:t("color"),padding:t("padding"),corners:t("corners"),gap:"md",spill:"hidden",style:{...e.style,boxShadow:n},children:[jsxs(d,{row:true,className:e.children?void 0:e.className,gap:"md",align:"center",height:o("height"),width:o("width"),backgroundColor:o("backgroundColor"),color:o("color"),padding:o("padding"),corners:o("corners"),spill:"hidden",style:e.children?void 0:{...e.style,boxShadow:n},children:[jsx(ue,{src:e.avatarSrc,size:e.avatarSize??"sm",fallback:e.avatarFallback,backgroundColor:e.avatarBackgroundColor,color:e.avatarColor}),jsxs(d,{width:"full",spill:"hidden",children:[jsx("span",{children:e.title,style:X(b({fontSize:e.titleFontSize??"sm",fontWeight:e.titleFontWeight,fade:e.titleFade}))}),jsx("span",{children:e.description,style:X(b({fade:e.descriptionFade??.5,fontSize:e.descriptionFontSize??"xs",fontWeight:e.descriptionFontWeight}))})]})]}),e.children]})}var dy={Root:Al,Content:d};a();function Po(e){let[r,t]=useState(e.defaultChecked??false),o=e.checked??r,n=e.checked!==void 0,i=()=>{e.onClick?.(),n||(e.onChange?.(!o),t(!o));};return jsx(d,{clickable:true,size:e.size,corners:e.corners??"sm",padding:e.padding??"sm",backgroundColor:o?e.accentColor||"primaryContainer":"transparent",color:e.iconColor||"onPrimaryContainer",borderColor:e.borderColor||"onSurface[0.1]",style:{boxShadow:e.disableShadow?void 0:"rgba(0, 0, 0, 0.25) 0px 2px 4px 0px inset"},onClick:i,children:jsx(IoMdCheckmark,{size:e.iconSize,style:{opacity:o?1:0}})})}a();a();function Wl(e){let{triggerRerender:r}=L(),t=b({...e,padding:e.padding||"xl",corners:e.corners||"md",gap:e.gap||"lg"}),o=({open:i})=>{e.onOpenChange?.(i);},n=()=>{e.onClose?.(),e.controller?.hide?.(),e.rerenderOnClose&&r();};if(e.controller?.isOpen!==false)return jsxs(Dialog.Root,{unmountOnExit:e.unmountOnExit,open:e.controller?.isOpen,onEscapeKeyDown:e.closeOnEscape??true?e.controller?.hide:void 0,scrollBehavior:e.scrollBehavior,onInteractOutside:e.closeOnInteractOutside??true?e.controller?.hide:void 0,placement:e.placement||"center",closeOnEscape:e.closeOnEscape,closeOnInteractOutside:e.closeOnInteractOutside,onOpenChange:o,onExitComplete:n,motionPreset:e.enterAnimation||"slide-in-bottom",children:[e.triggerElement&&jsx(Dialog.Trigger,{asChild:true,children:e.triggerElement}),jsxs(Portal,{children:[jsx(Dialog.Backdrop,{}),jsx(Dialog.Positioner,{children:jsxs(Dialog.Content,{style:t,children:[e.children,!e.hideCloseButton&&jsx(Dialog.CloseTrigger,{asChild:true,children:jsx(CloseButton,{size:e.closeButtonSize||"sm",onClick:e.controller?.hide})})]})})]})]})}var Gr=(e,r)=>t=>{let o=Dialog[e],n={...t,spill:t.spill||"hidden"};return Object.keys(r||{}).forEach(i=>{let l=i;n?.[l]||(n=Object.assign(n,{[l]:r[l]}));}),jsx(o,{width:"full",height:"full",overflow:"hidden",children:jsx(d,{...n,children:t.children})})},$l=Gr("Header",{fontSize:"xl",fontWeight:"bold"}),Nl=Gr("Body",{gap:"md"}),Jl=Gr("Footer",{row:true,gap:"sm"}),Xl=e=>jsx(Dialog.CloseTrigger,{asChild:true,children:e.wrap?jsx("div",{...e.slotProps?.divWrapper,children:e.children}):e.children}),Ul=e=>jsx(Dialog.ActionTrigger,{asChild:true,children:e.children}),D={Root:Wl,Header:$l,Body:Nl,Footer:Jl,CloseTrigger:Xl,ActionTrigger:Ul};function Ry(e){let r=e.severity||"error",t=C(r,{preference:"res"});return jsxs(D.Root,{controller:e.controller,width:e.width??"25rem",height:e.height,minHeight:e.minHeight,maxHeight:e.maxHeight,minWidth:e.minWidth,maxWidth:e.maxWidth,triggerElement:e.triggerElement,children:[jsx(D.Header,{fontSize:"2xl",children:e.title}),jsxs(D.Body,{fade:.75,children:[jsx("span",{children:e.message}),e.disclaimer&&jsx(Xo,{width:"full",facade:o=>o==="error"?"warning":o,hideLabel:e.hideDisclaimerLabel,severity:r,message:e.disclaimer})]}),jsxs(D.Footer,{gap:"md",children:[jsx(D.ActionTrigger,{children:jsx(B,{size:"sm",fade:.75,color:"onSurface",backgroundColor:"transparent",text:e.cancelLabel||"Cancel",onClick:e.onCancelClick})}),jsx(B,{async:true,size:"sm",text:e.action.label,backgroundColor:t,color:"white",onClick:e.action.onClick})]})]})}a();var Yr=createContext(null);function Wy(e){let r=e.sections.flatMap(y=>typeof y=="object"?y.nestedItems:y),t=e.defaultSection?r.findIndex(y=>y===e.defaultSection):0,[o,n]=useState(t>=0?t:0),{triggerRerender:i}=L(),l=T([]),s=r[o],c=Array.isArray(e.ignoredSections)?e.ignoredSections:strictArray([e.ignoredSections]),g=o<=0;e.checkCompletionOnMount&&useEffect(()=>{r.forEach((y,_)=>{m(y,_);}),i();},[]);let v=(y=l.read())=>r.filter(_=>!y.includes(_)&&!c.includes(_)),m=(y=s,_=o)=>{let P=l.read();if(!c.includes(y)){if(e.isSectionComplete(y)&&!P.includes(y))P=[...P,y];else if(!e.isSectionComplete(y)&&P.includes(y))P=P.filter((R,z)=>z!==_);else return;l.upsert(P),e.onSectionsStatusChange?.(v(P),P);}},h=y=>{m(),n(r.findIndex(_=>_===y));},S=()=>{o>=r.length-1||(m(),n(o+1));},x=()=>{g||(m(),n(o-1));};return jsx(Yr.Provider,{value:{activeSection:s,completedSections:l.read(),rawSections:e.sections},children:jsx(D.Root,{controller:e.controller,triggerElement:e.triggerElement,unmountOnExit:e.unmountOnExit,height:"30rem",width:"45rem",maxWidth:"45rem",backdropBlur:"1rem",padding:"0px",rerenderOnClose:e.rerenderOnClose,backgroundColor:"transparent",spill:"hidden",children:jsxs(D.Body,{grid:true,gap:"0px",width:"full",height:"full",spill:"hidden",gridCols:".45fr 1fr",children:[jsx(ql,{title:e.title,onSectionClick:h}),jsx(Zl,{hideSubmitButton:e.hideSubmitButton,sectionMapper:e.sectionMapper,previousDisabled:g,onPreviousClick:x,onNextClick:S,incompleteSections:v(),onSubmitClick:e.onSubmit})]})})})}function ql(e){let{rawSections:r,activeSection:t,completedSections:o}=useContext(Yr);return jsxs(d,{size:"full",padding:"xl",backgroundColor:"surfaceContainer",gap:e.title?"xl":void 0,spill:"hidden",children:[e.title&&jsx(d,{fontSize:"lg",fontWeight:"bold",spill:"hidden",children:e.title}),jsx(Ar,{width:"full",items:r,isItemActive:n=>t===n,isItemCompleted:n=>o.includes(n),onItemClick:e.onSectionClick})]})}function Zl(e){let{activeSection:r}=useContext(Yr),{title:t,description:o,element:n}=e.sectionMapper[r],i=typeof n=="function"?jsx(n,{incompleteSections:e.incompleteSections}):n;return jsxs(d,{size:"full",backgroundColor:"surfaceContainer[0.5]",padding:"3rem",gap:"xl",grid:true,gridRows:"auto 1fr auto",justify:"space-between",spill:"hidden",children:[jsxs(d,{children:[jsx(p,{text:t,fontSize:"xl",fontWeight:"bold"}),jsx("span",{children:o,style:{opacity:.75}})]}),jsx(d,{size:"full",gap:"lg",children:i}),jsxs(d,{row:true,width:"full",align:"center",justify:"space-between",children:[jsx(qr,{disabled:e.previousDisabled,onClick:e.onPreviousClick}),r==="Submission"?!e.hideSubmitButton&&jsx(Zr,{disabled:!!e.onSubmitClick,onClick:e.onSubmitClick}):jsx(Kr,{onClick:e.onNextClick})]})]})}a();a();var Ql=ce({preset:{text:"Save",async:true}}),Qr=Ql;function Qy(e){let{triggerRerender:r}=L(),t=T(Object.fromEntries(Object.entries(e.fields).map(([l,s])=>[l,typeof s=="object"&&"defaultValue"in s?s.defaultValue:e.defaultValue?.[l]??""]))),o=e.actionButtionSize||"lg",n=()=>{e.onSave?.(t.read());},i=()=>{e.onCancel?.();};return jsxs(D.Root,{rerenderOnClose:true,width:e.width,closeButtonSize:e.closeButtonSize||"md",controller:e.controller,triggerElement:e.triggerElement,onClose:()=>r(),children:[jsx(D.Header,{fontSize:"2rem",children:e.title||"Edit Form"}),jsx(D.Body,{padding:"xs",children:Object.keys(e.fields).map(l=>{let s=l,c=e.fields[s],g=t.read()?.[s]??"",v=typeof c.label=="function"?c.label(l):!c.label||c.label==="prop-name"?e.formatFieldPropName?.(l)??l:c.label,m=h=>t.upsert(S=>({...S||{},[s]:h}));return c.options?jsx(rs,{label:v,size:e.textfieldSize,defaultValue:g,disabled:c.disabled,placeholder:c.placeholder,options:c.options,onChange:m},l):jsx(U,{width:"full",placeholder:c.placeholder,label:v,size:e.textfieldSize,defaultValue:g,disabled:c.disabled,allowedChars:c.allowedChars||e.allowedChars,onChange:m},s)})}),jsxs(D.Footer,{children:[jsx(D.ActionTrigger,{children:jsx(Ne,{fade:.5,size:o,onClick:i})}),jsx(D.ActionTrigger,{children:jsx(Qr,{size:o,onClick:n})})]})]})}function rs(e){let[r,t]=useState(e.defaultValue),o=({value:n})=>{e.onChange(n),t(n);};return jsx(Le,{wrap:true,asChild:e.disabled,width:"match-anchor",maxHeight:"10rem",isSelected:({value:n})=>r===n,options:e.options.map(n=>({value:n.trim()})),onOptionClick:o,slotProps:{divWrapper:{style:{width:"100%"}}},children:jsx(U,{readOnly:true,size:e.size,disabled:e.disabled,label:e.label,width:"full",value:r,placeholder:e.placeholder})})}a();var Z={sidebar:"fv-sidebar",topbar:"fv-topbar",viewer:"fv-viewer"},Xe=createContext(null);function is(e){let r=C(e.borderColor||"outline[0.1]"),t=le.md;return jsx(Xe.Provider,{value:{borderColor:r,corners:t,navThickness:e.navThickness||"3rem"},children:jsx(d,{minHeight:e.minHeight,maxHeight:e.maxHeight,minWidth:e.minWidth,maxWidth:e.maxWidth,corners:t,size:e.size,backgroundColor:e.backgroundColor??"surfaceContainer",height:e.height??"30rem",width:e.width??"40rem",spill:"hidden",grid:true,gridCols:"auto 1fr",gridRows:"auto 1fr",borderColor:r,style:{gridTemplateAreas:`"${Z.topbar} ${Z.topbar}" "${Z.sidebar} ${Z.viewer}"`,boxShadow:"rgba(0, 0, 0, 0.35) 0px 5px 15px"},children:e.children})})}function as(e){let{navThickness:r}=useContext(Xe),t=yr(e.file.typeAlias);return jsxs(d,{row:true,align:"center",children:[t&&jsx(t.filled,{style:b({size:r||e.styles?.icon?.size,color:"pdf",style:{padding:b({padding:e.styles?.icon?.padding||".65rem"})?.padding}})}),jsxs(d,{asChildren:e.hideFileMetadata,children:[jsx(p,{color:e.styles?.filename?.color,fontWeight:e.styles?.filename?.fontWeight,fontSize:e.styles?.filename?.fontSize||"1rem",text:e.file.name}),!e.hideFileMetadata&&jsxs(d,{row:true,fontSize:e.styles?.fileMetadata?.fontSize||".7rem",gap:e.styles?.fileMetadata?.gap??"sm",fade:e.styles?.fileMetadata?.fade??.5,color:e.styles?.fileMetadata?.color,align:"center",children:[jsx(p,{fontWeight:"bold",text:(e.file.ext||e.file.typeAlias)?.toUpperCase()}),jsx(d,{size:e.styles?.fileMetadataSeparator?.size||".3rem",corners:e.styles?.fileMetadataSeparator?.corners??"circle",backgroundColor:e.styles?.fileMetadataSeparator?.color||"onSurface"}),jsx(p,{fade:.75,text:format("file-size",e.file.sizeInBytes)})]})]})]})}function ls(e){let{navThickness:r}=useContext(Xe),{children:t,...o}=e;return jsx(d,{...o,row:true,id:Z.topbar,height:r,width:"full",align:"center",gap:e.gap??"md",padding:e.children?["md","right"]:void 0,justify:e.justify||"space-between",style:{...e.style,gridArea:Z.topbar},children:e.children})}var Yo=createContext(null);function ss(e){let{children:r,onOptionClick:t,...o}=e,{navThickness:n}=useContext(Xe);return jsx(Yo.Provider,{value:{onOptionClick:i=>e.onOptionClick?.(i)},children:jsx(d,{...o,id:Z.sidebar,height:"full",width:n,align:"center",gap:o.gap||"md",padding:["md",["top","bottom"]],style:{...o.style,gridArea:Z.sidebar},children:e.children})})}function cs(e){let{onOptionClick:r}=useContext(Yo),t=()=>{e.onClick?.(),r(e.label);};return jsx(De,{displayAction:"hover",placement:"right",fontSize:"sm",content:e.label,asChild:e.disabled,children:jsx(d,{fade:e.disabled?.5:1,cursor:e.disabled?"not-allowed":e.selected?"default":"pointer",corners:e.corners??"md",padding:e.padding??"md",borderColor:e.selected?"onPrimaryContainer[0.1]":"transparent",css:{transition:"background-color 200ms linear",backgroundColor:e.backgroundColor?.(e.selected)??(e.selected?"primaryContainer":"outline[0.1]"),color:e.color?.(e.selected)??(e.selected?"onPrimaryContainer":"onSurface"),":hover":e.selected?void 0:{...e.css?.[":hover"],backgroundColor:e.css?.[":hover"].backgroundColor||"outline[0.25]"}},onClick:e.disabled?void 0:t,children:jsx(e.icon,{size:e.iconSize??"1.1rem"})})})}function ds(e){let{borderColor:r,corners:t}=useContext(Xe),o=useRef(null);useEffect(()=>{n();let i=new MutationObserver(l=>{for(let s of l)s.type==="childList"&&n();});return i.observe(o.current?.parentNode,{childList:true}),()=>{i.disconnect();}},[]);let n=()=>{let i=["sidebar","topbar"],l=o.current?.parentElement,s=i.filter(c=>l?.querySelector(`#${Z[c]}`));i.every(c=>s.includes(c))?Object.assign(o.current?.style,{borderRadius:`${t} 0 0 0`,borderColor:`${r} transparent transparent ${r}`}):s.includes("sidebar")?Object.assign(o.current?.style,{borderRadius:`${t} 0 0 ${t}`,borderLeftColor:r}):s.includes("topbar")?Object.assign(o.current?.style,{borderRadius:0,borderTopColor:r}):Object.assign(o.current?.style,{borderRadius:t,borderColor:r});};return jsx(d,{ref:o,size:"full",centerContent:e.centerContent??true,backgroundColor:e.backgroundColor||"onSurface[0.1]",color:e.color||"onSurface",spill:"hidden",borderColor:"transparent",style:{gridArea:Z.viewer,boxShadow:"rgba(50, 50, 93, 0.25) 0px 30px 60px -12px inset, rgba(0, 0, 0, 0.3) 0px 18px 36px -18px inset"},children:e.children})}function us(e){let r=e.thickness||"0.0104in",t=e.length||"70%",o={horizontal:{height:r,width:t},vertical:{height:t,width:r}}[e.orientation||"vertical"];return jsx(d,{...o,backgroundColor:e.color||"outline[0.1]"})}var sh={Root:is,Sidebar:ss,SidebarOption:cs,Topbar:ls,Viewer:ds,Indicator:as,Sep:us};a();var Ko=(i=>(i["2xl"]="2rem",i.xl="1.75rem",i.lg="1.5rem",i.md="1.25rem",i.sm="1rem",i.xs=".85rem",i["2xs"]=".5rem",i))(Ko||{});function qo(e){let r=Ko[e.size||"sm"];return jsx(d,{hide:e.hide||e.content!==void 0&&!e.content,padding:e.padding||"xs",fontSize:e.fontSize||"xxs",corners:r,size:r,centerContent:true,backgroundColor:e.backgroundColor||"orange",color:e.color||"white",children:e.content})}a();function Zo(e){return jsxs(d,{row:true,clickable:true,width:"full",align:"center",justify:"space-between",corners:"lg",backgroundColor:"surfaceVariant[0.1]",padding:"lg",onClick:()=>{let t=(o,n=false)=>typeof o=="string"?o:Object.entries(o).map(([i,l],s,c)=>`${n?" ":""}${i}: ${[void 0,null,""].includes(l)?null:typeof l=="object"?`{
|
|
17
|
+
`}function cm(e,r){return {display:"flex",justifyContent:"center",alignItems:"center",flexDirection:r?"column":"row",...e}}function dm(e,r){let t=o=>"affectedCorners"in e&&typeof e.affectedCorners=="string"?o.includes(e.affectedCorners)?e.radius:void 0:"affectedCorners"in e?e.affectedCorners.includes(o)?e.radius:void 0:e[o];return {...r,borderTopLeftRadius:t("top-left"),borderTopRightRadius:t("top-right"),borderBottomLeftRadius:t("bottom-left"),borderBottomRightRadius:t("bottom-right")}}function um(e){let r=typeof e.disabledCurves=="function"?e.disabledCurves():e.disabledCurves,t=n=>r==="both"||r===n?0:e.curveRadius||le.md;return {borderTopLeftRadius:t("left"),borderBottomLeftRadius:t("left"),borderTopRightRadius:t("right"),borderBottomRightRadius:t("right")}}function fm(e){let r=0,t=0,o=0,n=0;document.getElementById(e.id+"header")?document.getElementById(e.id+"header").onmousedown=i:e.onmousedown=i;function i(c){c.preventDefault(),o=c.clientX,n=c.clientY,document.onmouseup=s,document.onmousemove=l;}function l(c){c.preventDefault(),r=o-c.clientX,t=n-c.clientY,o=c.clientX,n=c.clientY,e.style.top=e.offsetTop-t+"px",e.style.left=e.offsetLeft-r+"px";}function s(){document.onmouseup=null,document.onmousemove=null;}}function mm(e){return {...e,margin:0,padding:0}}function X(e,r={apply:true}){return r.apply?ze(1,e):e}function gm(e,r={apply:true}){return r.apply?{...e,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}:e}function Gt(e){let r=e;for(;r&&!Tr(r);)r=r.parentElement;return r}function jt(e){let r=document.createElement("span");r.textContent="A",r.style.visibility="hidden",r.style.position="absolute";let t=getComputedStyle(e);r.style.fontFamily=t.fontFamily,r.style.fontSize=t.fontSize,r.style.lineHeight=t.lineHeight,document.body.appendChild(r);let o=r.offsetHeight;return document.body.removeChild(r),e.offsetHeight>o+2}function C(e,r){if(!e||typeof e!="string")return;let t=r?.preference||"css",o=e.replaceAll(" ",""),{0:n,1:i}=o.split("["),l=()=>J[o],s=()=>i?$i(ee[n],parseFloat(i)):ee[o];if(t==="css"){if(o in J)return l();if(n in ee)return s()}else if(t==="res"){if(n in ee)return s();if(o in J)return l()}return o}var Hi=e=>/^#([A-Fa-f0-9]{3,4}){1,2}$/.test(e),Wi=e=>parseInt(e.repeat(2/e.length),16);function $i(e,r=1){let t=(v,m)=>v.match(new RegExp(`.{${m}}`,"g")),o=v=>typeof v<"u"?v/255:typeof r!="number"||r<0||r>1?1:r;if(!Hi(e))throw new Error(`Invalid HEX: ${e}`);let n=Math.floor((e.length-1)/3),i=t(e.slice(1),n),[l,s,c,g]=i.map(Wi);return `rgba(${l}, ${s}, ${c}, ${o(g)})`}function vm(e,r){let t=e.includes(",")?",":" ",o=e.split("").filter(n=>(t+"0123456789").includes(n)).join("").split(t);return o.length===3?o.push(`${r}`):o=o.with(3,`${r}`),"rgba("+o.join(t)+")"}function ym(e){return window.matchMedia(`(max-width:${e})`).matches}function hm(e){return window.matchMedia(`(min-width:${e})`).matches}function ze(e=2,r){return {...r,overflow:"hidden",width:"100%",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical"}}function Ni(e){return e*16}function pm(e){return `${Ni(e)}px`}function Tr(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function Cm(e){let r=document.body,t=e.replace("var(","").replace(")","");return getComputedStyle(r).getPropertyValue(t)}a();var Ji=Object.freeze({"2xl":"1.75rem",xl:"1.5rem",lg:"1rem",md:"0.5rem",sm:"0.25rem",xs:"0.125rem","2xs":"0.1rem"}),se=Ji;a();var Xi=Object.freeze({"2xl":"1.75rem",xl:"1.5rem",lg:"1.25rem",md:"1rem",sm:"0.85rem",xs:"0.75rem","2xs":"0.65rem"}),G=Xi;var lr=["top","right","bottom","left"],Yt=(e,r)=>`translate(${e}, ${r})`,Kt=e=>`translateX(${e})`,qt=e=>`translateY(${e})`,Ui=(e,r)=>{let t=e.fontSize in G?G[e.fontSize]:e.fontSize,{overflowX:o,overflowY:n}=(()=>{let s=e?.spill||{};if(s)return {overflowX:typeof s=="string"?s:s?.x||"visible",overflowY:typeof s=="string"?s:s?.y||"visible"}})();function i(s){return e.style?.[s]?e.style[s]:(e.size||e.size===0)&&(s==="height"||s==="width")?e.size==="full"?"100%":e.size:e[s]==="full"?"100%":e[s]}let l={top:e.centerSelf===true||e.centerSelf==="y"?"50%":e.top,left:e.centerSelf===true||e.centerSelf==="x"?"50%":e.left,right:e.right,bottom:e.bottom,cursor:e.clickable?"pointer":e.cursor,scrollbarColor:`${C(e.scrollbarThumbColor||"inherit")} ${C(e.scrollbarThumbColor||"inherit")}`,transform:e.centerSelf===true?Yt("-50%","-50%"):e.centerSelf==="x"?Kt("-50%"):e.centerSelf==="y"?qt("-50%"):e.translate?.x&&e.translate?.y?Yt(e.translate.x,e.translate.y):e.translate?.x?Kt(e.translate.x):e.translate?.y?qt(e.translate.y):void 0,position:e.pos==="absolute"||e.centerSelf?"absolute":e.pos,padding:Ki(e.padding),fontSize:t,fontWeight:e.fontWeight,border:e.border,borderColor:Gi(e.borderColor),borderWidth:ji(e.borderWidth,e.borderColor?"1px":void 0),borderStyle:Yi(e.borderStyle,e.borderColor?"solid":void 0),lineHeight:t?`calc(${t} + (${t} * .15))`:void 0,borderRadius:qi(e.corners),userSelect:e.disableSelection?"none":e.allowTextSelection?"text":void 0,minHeight:i("minHeight"),minWidth:i("minWidth"),maxHeight:i("maxHeight"),maxWidth:i("maxWidth"),height:i("height"),width:i("width"),display:e.hide?"none":void 0,flexDirection:e.row?"row":"column",flex:e.flex,backgroundColor:C(e.backgroundColor),color:C(e.color),gap:Zi(e.gap),overflowX:o,overflowY:n,aspectRatio:e.aspectRatio,opacity:e.fade,alignItems:e.centerContent?"center":e.align||"start",justifyContent:e.centerContent?"center":e.justify||"start",backdropFilter:e.backdropBlur?`blur(${e.backdropBlur})`:void 0,filter:e.blur?`blur(${e.blur})`:void 0,...e.style};return Object.keys(l).forEach(s=>{let c=s,g=l[c];typeof g=="string"&&(g=g.trim()),!g&&g!==0&&delete l[c];}),(r||e.debug)&&console.log({props:e,style:l}),l};function Gi(e){if(!e)return;let r="transparent";return typeof e=="string"?C(e):lr.map(t=>{if(Array.isArray(e)){let{0:o,1:n}=e;return (Array.isArray(n)?n.includes(t):[t,"all"].includes(n))?C(o):r}return typeof e=="object"&&t in e?C(e[t]):r}).join(" ")}function ji(e,r){if(!e)return r;let t=0;return typeof e=="string"?e:lr.map(o=>{if(Array.isArray(e)){let{0:n,1:i}=e;return (Array.isArray(i)?i.includes(o):[o,"all"].includes(i))?n:t}return typeof e=="object"&&o in e?e[o]:t}).join(" ")}function Yi(e,r){if(!e)return r;let t=0;return typeof e=="string"?e:lr.map(o=>{if(Array.isArray(e)){let{0:n,1:i}=e;return (Array.isArray(i)?i.includes(o):[o,"all"].includes(i))?n:t}return typeof e=="object"&&o in e?e[o]:t}).join(" ")}function Ki(e){let t=o=>o?o in se?se[o]:o:"0px";return e?typeof e=="string"?t(e):lr.map(o=>{if(Array.isArray(e)){let{0:n,1:i}=e;return (Array.isArray(i)?i.includes(o):i===o)?t(n):"0px"}return typeof e=="object"&&o in e?t(e[o]):"0px"}).join(" "):"0px"}function qi(e){let t=n=>n?n in le?le[n]:n:"0px";return e?typeof e=="string"?t(e):["topLeft","topRight","bottomRight","bottomLeft"].map(n=>{let i=e?.[n];return n.includes("top")&&e?.top?t(e.top):n.includes("bottom")&&e?.bottom?t(e.bottom):i?t(i):"0px"}).join(" "):"0px"}function Zi(e){if(!(!e||typeof e!="string"))return e in se?se[e]:e}var b=Ui;var ia=["inherit","sm","md","lg","xl","2xl","xs"],aa=["sm","md","lg","xl","2xl","xs","2xs"];function Zt(e){let[r,t]=useState(false),o=e.disabled||r,n=async m=>{if(!o){if(!e.async)return e.onClick?.(m);t(true),await e.onClick?.(m),setTimeout(()=>t(false),e.pendingDelay||1);}},i=m=>{if(m){if(typeof m==typeof FaFolder){let h=S=>typeof S=="string"&&[...ia].includes(S);return jsx(Icon,{size:h(e.iconSize)?e.iconSize:void 0,boxSize:h(e.iconSize)?void 0:e.iconSize,as:m})}return m}},l=i(e.leadingEl),s=i(e.trailingEl),c=m=>typeof m=="string"&&[...aa].includes(m),{size:g,...v}=e;return jsxs(Button,{...ae(e),disabled:o,size:c(g)?g:void 0,style:b({...v,size:c(g)?void 0:g,clickable:!o,row:true,centerContent:true,gap:e.gap||"md",corners:e.corners||"md",padding:e.padding||"md",color:e.color||(e.variant==="outline"?"onSurface":"onPrimary"),backgroundColor:e.backgroundColor||(e.variant==="outline"?"transparent":"primary"),border:e.border,borderColor:e.borderColor||(e.variant==="outline"?"onSurface[0.1]":void 0),fade:o?e.disabledOpacity||.5:e.fade||1,pos:r?"relative":e.pos,height:e.height||"fit-content",width:e.width||"fit-content"}),onClick:n,onMouseDown:e.onMouseDown,children:[l,e.text,e.children,s,r&&jsx(AbsoluteCenter,{children:jsx(Spinner,{size:"sm",animationDuration:"slowest",borderWidth:".1rem",color:e.spinnerColor?C(e.spinnerColor):"blue.500"})})]})}var ce=e=>r=>jsx(Zt,{...(()=>{let o={...r,...e.preset};for(let n of Object.keys(e.optional||{})){let i=n,l=i in o,s=[void 0,null].includes(o[i]);(!l||s)&&(o[i]=e.optional[i]);}return o})()}),B=Zt;a();a();a();a();a();function cr(){return cr=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)({}).hasOwnProperty.call(t,o)&&(e[o]=t[o]);}return e},cr.apply(null,arguments)}a();a();function Qt(e){for(var r=0,t,o=0,n=e.length;n>=4;++o,n-=4)t=e.charCodeAt(o)&255|(e.charCodeAt(++o)&255)<<8|(e.charCodeAt(++o)&255)<<16|(e.charCodeAt(++o)&255)<<24,t=(t&65535)*1540483477+((t>>>16)*59797<<16),t^=t>>>24,r=(t&65535)*1540483477+((t>>>16)*59797<<16)^(r&65535)*1540483477+((r>>>16)*59797<<16);switch(n){case 3:r^=(e.charCodeAt(o+2)&255)<<16;case 2:r^=(e.charCodeAt(o+1)&255)<<8;case 1:r^=e.charCodeAt(o)&255,r=(r&65535)*1540483477+((r>>>16)*59797<<16);}return r^=r>>>13,r=(r&65535)*1540483477+((r>>>16)*59797<<16),((r^r>>>15)>>>0).toString(36)}a();var eo={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};a();function dr(e){var r=Object.create(null);return function(t){return r[t]===void 0&&(r[t]=e(t)),r[t]}}var ca=/[A-Z]|^ms/g,da=/_EMO_([^_]+?)_([^]*?)_EMO_/g,no=function(r){return r.charCodeAt(1)===45},ro=function(r){return r!=null&&typeof r!="boolean"},Er=dr(function(e){return no(e)?e:e.replace(ca,"-$&").toLowerCase()}),to=function(r,t){switch(r){case "animation":case "animationName":if(typeof t=="string")return t.replace(da,function(o,n,i){return j={name:n,styles:i,next:j},n})}return eo[r]!==1&&!no(r)&&typeof t=="number"&&t!==0?t+"px":t};function Oe(e,r,t){if(t==null)return "";var o=t;if(o.__emotion_styles!==void 0)return o;switch(typeof t){case "boolean":return "";case "object":{var n=t;if(n.anim===1)return j={name:n.name,styles:n.styles,next:j},n.name;var i=t;if(i.styles!==void 0){var l=i.next;if(l!==void 0)for(;l!==void 0;)j={name:l.name,styles:l.styles,next:j},l=l.next;var s=i.styles+";";return s}return fa(e,r,t)}case "function":{if(e!==void 0){var c=j,g=t(e);return j=c,Oe(e,r,g)}break}}var v=t;if(r==null)return v;var m=r[v];return m!==void 0?m:v}function fa(e,r,t){var o="";if(Array.isArray(t))for(var n=0;n<t.length;n++)o+=Oe(e,r,t[n])+";";else for(var i in t){var l=t[i];if(typeof l!="object"){var s=l;r!=null&&r[s]!==void 0?o+=i+"{"+r[s]+"}":ro(s)&&(o+=Er(i)+":"+to(i,s)+";");}else {if(Array.isArray(l)&&typeof l[0]=="string"&&(r==null||r[l[0]]===void 0))for(var c=0;c<l.length;c++)ro(l[c])&&(o+=Er(i)+":"+to(i,l[c])+";");else {var g=Oe(e,r,l);switch(i){case "animation":case "animationName":{o+=Er(i)+":"+g+";";break}default:o+=i+"{"+g+"}";}}}}return o}var oo=/label:\s*([^\s;{]+)\s*(;|$)/g,j;function io(e,r,t){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var o=true,n="";j=void 0;var i=e[0];if(i==null||i.raw===void 0)o=false,n+=Oe(t,r,i);else {var l=i;n+=l[0];}for(var s=1;s<e.length;s++)if(n+=Oe(t,r,e[s]),o){var c=i;n+=c[s];}oo.lastIndex=0;for(var g="",v;(v=oo.exec(n))!==null;)g+="-"+v[1];var m=Qt(n)+g;return {name:m,styles:n,next:j}}a();var ma=typeof document<"u",ao=function(r){return r()},ga=re.useInsertionEffect?re.useInsertionEffect:false,lo=ma&&ga||ao;a();var Fr=typeof document<"u";function so(e,r,t){var o="";return t.split(" ").forEach(function(n){e[n]!==void 0?r.push(e[n]+";"):n&&(o+=n+" ");}),o}var Rr=function(r,t,o){var n=r.key+"-"+t.name;(o===false||Fr===false&&r.compat!==void 0)&&r.registered[n]===void 0&&(r.registered[n]=t.styles);},co=function(r,t,o){Rr(r,t,o);var n=r.key+"-"+t.name;if(r.inserted[t.name]===void 0){var i="",l=t;do{var s=r.insert(t===l?"."+n:"",l,r.sheet,true);!Fr&&s!==void 0&&(i+=s),l=l.next;}while(l!==void 0);if(!Fr&&i.length!==0)return i}};a();var va=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,uo=dr(function(e){return va.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});var pa=typeof document<"u",_a=uo,ba=function(r){return r!=="theme"},fo=function(r){return typeof r=="string"&&r.charCodeAt(0)>96?_a:ba},mo=function(r,t,o){var n;if(t){var i=t.shouldForwardProp;n=r.__emotion_forwardProp&&i?function(l){return r.__emotion_forwardProp(l)&&i(l)}:i;}return typeof n!="function"&&o&&(n=r.__emotion_forwardProp),n},Sa=function(r){var t=r.cache,o=r.serialized,n=r.isStringTag;Rr(t,o,n);var i=lo(function(){return co(t,o,n)});if(!pa&&i!==void 0){for(var l,s=o.name,c=o.next;c!==void 0;)s+=" "+c.name,c=c.next;return re.createElement("style",(l={},l["data-emotion"]=t.key+" "+s,l.dangerouslySetInnerHTML={__html:i},l.nonce=t.sheet.nonce,l))}return null},go=function e(r,t){var o=r.__emotion_real===r,n=o&&r.__emotion_base||r,i,l;t!==void 0&&(i=t.label,l=t.target);var s=mo(r,t,o),c=s||fo(n),g=!c("as");return function(){var v=arguments,m=o&&r.__emotion_styles!==void 0?r.__emotion_styles.slice(0):[];if(i!==void 0&&m.push("label:"+i+";"),v[0]==null||v[0].raw===void 0)m.push.apply(m,v);else {var h=v[0];m.push(h[0]);for(var S=v.length,x=1;x<S;x++)m.push(v[x],h[x]);}var y=withEmotionCache(function(_,P,R){var z=g&&_.as||n,Pe="",Mt=[],tr=_;if(_.theme==null){tr={};for(var Lt in _)tr[Lt]=_[Lt];tr.theme=re.useContext(ThemeContext);}typeof _.className=="string"?Pe=so(P.registered,Mt,_.className):_.className!=null&&(Pe=_.className+" ");var or=io(m.concat(Mt),P.registered,tr);Pe+=P.key+"-"+or.name,l!==void 0&&(Pe+=" "+l);var hi=g&&s===void 0?fo(z):c,nr={};for(var ir in _)g&&ir==="as"||hi(ir)&&(nr[ir]=_[ir]);return nr.className=Pe,R&&(nr.ref=R),re.createElement(re.Fragment,null,re.createElement(Sa,{cache:P,serialized:or,isStringTag:typeof z=="string"}),re.createElement(z,nr))});return y.displayName=i!==void 0?i:"Styled("+(typeof n=="string"?n:n.displayName||n.name||"Component")+")",y.defaultProps=r.defaultProps,y.__emotion_real=y,y.__emotion_base=n,y.__emotion_styles=m,y.__emotion_forwardProp=s,Object.defineProperty(y,"toString",{value:function(){return "."+l}}),y.withComponent=function(_,P){var R=e(_,cr({},t,P,{shouldForwardProp:mo(y,P,true)}));return R.apply(void 0,m)},y}};ki(vo());var xa=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],Be=go.bind(null);xa.forEach(function(e){Be[e]=Be(e);});var Or=class{static getStyle(r){if(r)return JSON.parse(JSON.stringify(r||{}),(t,o)=>t==="backgroundColor"||t==="color"?C(o):o)}static span=r=>Be.span({...this.getStyle(r)});static div=r=>Be.div({...this.getStyle(r)});static img=r=>Be.img({...this.getStyle(r)})},ke=Or;function wa(e){let r=useRef(null),[t,o]=useState(false),n=T({top:0,left:0});e.rememberScrollPos&&useEffect(()=>{let v=n.read();r.current&&[v.top,v.left].some(m=>!!m)&&(r.current.scrollTop=v?.top??0,r.current.scrollLeft=v?.left??0);},e.updateScrollPosDeps),(e.rememberScrollPos||e.overflowPadding)&&useEffect(()=>{r.current&&Tr(r.current)&&!t&&o(true);},[]);let i="10%",l=`linear-gradient(to bottom, transparent, black calc(${i}/4), black calc(100% - ${i}), transparent) `,s=e.decreaseYFaderPadding?"2vh":"5rem",c=b({...e,spill:e.spill==="hidden"?"hidden":e.spill||(e.rememberScrollPos?"auto":void 0),padding:e.padding||{right:e.overflowPadding&&t?e.overflowPadding:void 0,top:e.enableYFaders?s:void 0,bottom:e.enableYFaders?s:void 0}}),g=ke.div(e.css);if(!e.hide)return e.asChildren?e.children:jsx(g,{...ae(e),ref:e.rememberScrollPos||e.overflowPadding?r:e.ref,draggable:e.draggable,onScroll:v=>{let m=r?.current?.scrollTop,h=r?.current?.scrollLeft;!t&&e.overflowPadding&&o(true),isEmpty(strictArray([m,h]))||n.upsert({top:m??0,left:h??0}),e.onScroll?.(v);},style:{...c,display:e.grid?"grid":c.display||"flex",flexWrap:c.flexWrap||(e.flexWrap?"wrap":void 0),gridTemplateColumns:c?.gridTemplateColumns||e.gridCols||"1fr",gridTemplateRows:c?.gridTemplateRows||e.gridRows,WebkitMaskImage:e.enableYFaders&&l,maskImage:e.enableYFaders&&l},children:e.children})}var d=wa;a();function Ea(e){let r=!!e.tint,t=ke.img(e.sx);return jsx(t,{...ae(e),loading:"lazy",decoding:"async",fetchPriority:"high",src:e.src,alt:e.alt,style:{...b(e),filter:r?`drop-shadow(0px 1000px 0 ${C(e.tint)})`:void 0,transform:r&&"translateY(-1000px)",objectFit:e.noFit?"none":e.fill?"fill":e.cover?"cover":e.scaleDown?"scale-down":"contain"}})}var de=Ea;a();function za(e){let r=o=>e.onItemClick?.(o),t=e.bold??e.items.some(o=>typeof o=="object");return jsx(d,{gap:e.gap||"md",width:e.width,height:e.height,children:e.items.map((o,n)=>typeof o=="string"?jsx(Ir,{index:n,item:o,bold:t,active:e.isItemActive(o),completed:e.isItemCompleted(o),onClick:r},o):jsxs(d,{width:"full",children:[jsx(Ir,{index:n,bold:t,item:o.label,active:o.nestedItems.some(i=>e.isItemActive(i)),completed:o.nestedItems.every(i=>e.isItemCompleted(i)),onClick:o.nestedItems?.[0]?()=>r(o.nestedItems[0]):void 0}),jsx(d,{width:"full",children:o.nestedItems.map((i,l)=>jsx(Ir,{index:l,fontSize:"sm",nested:true,item:i,active:e.isItemActive(i),completed:e.isItemCompleted(i),onClick:r},i))})]},o.label))})}function Ir(e){let r=ee.white,t=J.onSurface,o=e.nested?t:J.tertiaryContainer,n=e.active?o:ee.carlsbergGreen,i=e.active&&!e.nested?o:J["onSurface[0.25]"],l=e.nested?J["onSurface[0.4]"]:J["onSurface[0.5]"],s=J["onSurface[0.2]"],c=()=>e.onClick?.(e.item),g=IoMdCheckmark;return jsxs(d,{row:true,gap:"md",clickable:true,width:"full",fontSize:e.fontSize||"md",align:"center",onClick:c,css:{transition:"all 300ms linear",color:e.completed&&!(e.nested&&e.active)?i:e.active?o:l,borderColor:e.completed?n:e.active?o:s,":hover":e.active?void 0:{color:t,borderColor:e.completed&&!e.nested?void 0:t}},children:[jsx(d,{corners:"circle",centerContent:true,size:"1.5rem",style:{textAlign:"center",flexShrink:0},borderColor:"inherit",backgroundColor:e.completed?n:void 0,color:e.completed?r:"inherit",fade:e.nested?0:1,padding:e.completed?void 0:"md",children:e.completed?jsx(g,{fontSize:"1rem"}):jsx(p,{fontWeight:"bold",textAlign:"center",centerContent:true,text:`${e.index+1}`,style:{lineHeight:"0"}})}),jsx("span",{style:{width:"100%",fontWeight:e.bold?"bold":void 0,opacity:e.completed&&!e.active?e.nested?.5:.75:1},children:e.item}),e.completed&&e.nested&&jsx(g,{size:"1.25rem",opacity:.75})]})}var Ar=za;a();function Ia(e){let r=i=>e.ellipsis?X(i):e.lineLimit?ze(e.lineLimit,i):i,t=()=>strictArray([e.underline||e.link||e.fakeHyperlink||e.hyperlink?"underline":void 0,e.strikeThrough?"line-through":void 0]).join(" ").trim(),o=b({...e,color:e.fakeHyperlink||e.hyperlink?"hyperlink":e.color,cursor:e.link||e.hyperlink||e.clickable?"pointer":e.cursor}),n=ke.span(e.sx);return jsx(n,{...ae(e),ref:e.ref,style:r({...o,width:e.ellipsis?"100%":o.width,textAlign:o.textAlign||e.textAlign||"justify",fontStyle:o.fontStyle||e.italic?"italic":void 0,textDecoration:o.textDecoration||t()||void 0}),children:e.text||e.children})}var p=Ia;a();var Ae=createContext(null);function Va(e){let r=e.columnWeight||"1fr",t=["none",0].includes(e.separatorColor)?void 0:e.separatorColor??"onSurface[0.25]",o=x=>(e.selectable?"auto ":"")+x.map(_=>typeof _=="string"||!_.weight?r:_.weight).join(" "),n=!!e.selectedRows,[i,l]=useState(e.defaultSelectedRows||[]),[s,c]=useState(o(e.columns)),g=i.length===e.entries.length&&e.entries.length>0,v=(Array.isArray(e.children)?e.children:[e.children]).filter((x,y)=>y<2),m=()=>{let x=[];g||(x=e.entries.map((y,_)=>_)),e.onSelectedRowsChange?.(x),n||l(x);},h=x=>{let y=[...i];y.includes(x)?y=y.filter(_=>_!==x):y.push(x),e.onSelectedRowsChange?.(y),n||l(y);},S=()=>e.columnWeight?e.columns.map(x=>{let y=typeof x=="object"?x:{};return {...y,name:ve(x),weight:"weight"in y?y.weight:e.columnWeight,textAlign:"textAlign"in y?y.textAlign:e.textAlign||"start"}}):e.columns;return useEffect(()=>{},[]),jsx(Ae.Provider,{value:{...e,gridCols:s,selectedRowIndices:n?e.selectedRows:i,separatorColor:t,allRowsSelected:g,onSelectRowClick:h,onSelectAllRowsClick:m,columns:S(),padding:e.padding??"sm",columnGap:e.columnGap??e.gap??"lg",rowGap:e.rowGap??e.gap,onAutoColumnWidthsComputed:x=>{let y=e.columns.map(_=>{let P=x.get(ve(_));return P?{..._,weight:`${P}px`}:_});c(o(y));}},children:jsx(d,{grid:true,gridRows:"auto auto",corners:e.corners,height:e.height,width:e.width,minHeight:e.minHeight,maxHeight:e.maxHeight,minWidth:e.minWidth,maxWidth:e.maxWidth,color:e.color,fontSize:e.fontSize,fontWeight:e.fontWeight,backgroundColor:e.backgroundColor,spill:e.spill,style:{gridTemplateAreas:'"header" "body"'},children:v})})}function Ha(e){let r=useContext(Ae),t=e.separatorColor||r.separatorColor;return jsxs(d,{grid:true,gridCols:r.gridCols,gap:r.columnGap,borderColor:e.borderColor||(t?[t,"bottom"]:void 0),spill:"hidden",padding:e.padding??r.padding,corners:e.corners??(r.separatorColor?0:void 0),color:e.color,backgroundColor:e.backgroundColor,fontWeight:e.fontWeight,fontSize:e.fontSize,align:"center",width:"full",style:{gridArea:"header"},children:[r.selectable&&jsx(bo,{selected:r.allRowsSelected,onClick:r.onSelectAllRowsClick}),r.columns.map((o,n)=>{let i=ve(o);return jsx(p,{size:"full",borderColor:t&&n!==lastIndex(r.columns)?[t,"right"]:void 0,text:!e.formatColumnName||e.formatColumnName==="camelToLetter"?camelCaseToLetter(i):e.formatColumnName?.(i)??i,style:{flexGrow:1,textAlign:Ie("textAlign",o)}},i+n)})]})}function Wa(e){let r=useContext(Ae),t=useRef(new Map);return useEffect(()=>()=>{t.current.clear();},[]),jsx(d,{width:"full",gap:r.rowGap,padding:e.padding??(r.rowGap?[r.rowGap,"top"]:void 0),color:e.color,fontSize:e.fontSize,style:{paddingTop:r.rowGap,gridArea:"body"},children:r.entries.map((o,n)=>jsx($a,{rowData:o,index:n,style:e.styleRow?.(n),styleCell:e.styleCell,onColWidthComputed:(i,l)=>{let s=t.current.get(i);(!s||l>s)&&t.current.set(i,l);},onCellRendered:i=>{let l=n===lastIndex(r.entries),s=i===lastIndex(r.columns);l&&s&&t.current.size>0&&r.onAutoColumnWidthsComputed(t.current);}},n))})}function $a(e){let r=useContext(Ae),t=r.selectedRowIndices.includes(e.index),o=()=>r.onSelectRowClick(e.index),{gap:n,padding:i,backgroundColor:l}=b({gap:r.columnGap,padding:r.padding??e.padding,backgroundColor:t?"onSurface[0.1]":"transparent"});return jsxs(d,{style:{gap:n,padding:i,backgroundColor:l,width:"100%",display:"grid",alignItems:"center",gridTemplateColumns:r.gridCols,...e.style},children:[r.selectable&&jsx(bo,{selected:t,onClick:o}),r.columns.map((s,c,g)=>{let v=ve(s),m=e.rowData[v],h=typeof s=="object"?s?.placeholder:void 0,S=()=>e.onCellRendered?.(c),x=c+ve(s),y=Ie("textAlign",s),_={textAlign:y,justifyContent:y,color:Ie("color",s),opacity:Ie("opacity",s,1),backgroundColor:Ie("backgroundColor",s),...e.styleCell?.({cellIndex:e.index*r.columns.length+c,columnName:v,columnIndex:c,rowIndex:e.index,data:typeof m=="string"?m:null,siblingData:{previous:c===0?null:run(e.rowData[ve(g[c-1])],P=>typeof P=="string"?P:null),next:c===g.length-1?null:run(e.rowData[ve(g[c+1])],P=>typeof P=="string"?P:null)}})||{}};return typeof s=="object"&&s.weight==="auto"?jsx(Na,{data:m,style:_,onRender:S,placeholder:h,onWidthComputed:P=>e.onColWidthComputed(v,P)},x):jsx(So,{data:m,style:_,placeholder:h,onRender:S},x)})]})}function bo(e){let r=useContext(Ae),{disableSeparator:t,separatorColor:o}=r.slotProps?.selectColumn||{},n=o||r.separatorColor;return jsx(d,{padding:t?void 0:["md","right"],borderColor:n&&!t?[n,"right"]:void 0,children:jsx(Po,{padding:"sm",iconSize:".85rem",checked:e.selected,onChange:e.onClick})})}function Na(e){let r=useRef(null);return useEffect(()=>{r.current?e.onWidthComputed(parseFloat(getComputedStyle(r.current).width)):console.error(new Error("Failed to compute style for an Auto cell",{cause:{data:e.data,cellRef:r}}));},[]),jsx(So,{noWrap:true,data:e.data,placeholder:e.placeholder,ref:r,style:e.style,onRender:e.onRender})}function So(e){return useEffect(()=>{e.onRender?.();},[]),typeof e.data=="string"||!e.data?jsx(p,{ref:e.ref,children:e.data||"-",fade:e.data?1:.75,style:{...e.style,whiteSpace:e.noWrap?"nowrap":void 0,width:"100%"}}):e.ref?jsx("div",{ref:e.ref,style:{...e.style,width:"100%",overflow:"hidden"},children:e.data}):e.data}var ve=e=>typeof e=="string"?e:e.name,Ie=(e,r,t)=>typeof r=="object"&&e in r?r[e]:t,Ja={Root:Va,Header:Ha,Body:Wa},Xa=Ja;a();a();function Ga(e){return jsxs(d,{row:true,ref:r=>{r&&!e.scrollIntoView&&e.selected&&r.scrollIntoView(true);},gap:"sm",align:"center",fade:e.disabled?.5:1,width:e.width??"full",corners:e.corners??"md",padding:e.padding??"sm",fontSize:e.fontSize||"sm",cursor:e.disabled?"not-allowed":"pointer",css:{...e.sx,transition:e.sx?.transition||"all 200ms linear",color:e.color||e.sx?.color||(e.selected?"surface":"onSurface"),backgroundColor:e.backgroundColor||e.sx?.backgroundColor||(e.selected?"onSurface":void 0),":hover":e.disabled||e.selected?void 0:{...e.sx?.[":hover"],backgroundColor:e.sx?.[":hover"]?.backgroundColor||"onSurface[0.1]"}},onClick:e.disabled?void 0:e.onClick,children:[e.selected&&jsx(LuCheck,{style:{flexShrink:0}}),jsx("span",{children:e.value.toString(),style:X({maxWidth:"100%",flex:"1",alignItems:"start",textAlign:"start"})})]})}var Lr=Ga;var ko=createContext(null);function Qa(e){return jsx(ko.Provider,{value:e,children:jsx(De,{...e,backdropBlur:e.backdropBlur,padding:e.padding||"md",corners:e.corners||"md",displayAction:"click",content:jsx(el,{})})})}function el(){let e=useContext(ko),r=Do(),[t,o]=useState(e.isSelected?e.options.findIndex(i=>e.isSelected(i)):void 0),{triggerRerender:n}=L();return useEffect(()=>{setTimeout(()=>{n();},10);},[]),jsx(d,{spill:"auto",gap:e.gap||"sm",children:e.options.map((i,l)=>{let s=l===t,c=()=>{i.onClick?.(),e.onOptionClick?.(i,l,e.options),o(l),r.close();};return (!i||!i?.value)&&console.error(`Index ${l} is not defined in ${e.options.join()}`),jsx(Lr,{value:i?.value.toString(),disabled:i?.disabled,selected:s,onClick:c},l)})})}var Le=Qa;a();a();a();var wo=["Google"],To=["pdf","word","excel","img","txt","unknown"],Eo=Object.freeze({txt:["text/plain"],img:["image/jpeg","image/png","image/jpg"],excel:["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.ms-excel","application/vnd.ms-excel.sheet.macroEnabled.12"],word:["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/msword","application/vnd.microsoft.portable-executable"],pdf:["application/pdf"],unknown:[]});function Ro(e){let r=t=>{e.onChange(t.currentTarget.files);};return jsxs(FileUpload.Root,{alignItems:"stretch",width:e.width,maxWidth:e.maxWidth||"xl",maxFiles:e.maxFiles||(e.multiple?1/0:1),overflow:"hidden",height:e.height,accept:rl(e.accepts),children:[jsx(FileUpload.HiddenInput,{onChange:r}),e.children,e.showList&&jsx(FileUpload.List,{...e.slotProps?.fileList})]})}var rl=e=>e.flatMap(r=>Eo[r]);function dv(e){return jsx(Ro,{...e,children:jsxs(FileUpload.Dropzone,{borderRadius:"xl",height:"full",width:"full",overflow:"hidden",backgroundColor:C(e.backgroundColor||"transparent"),borderColor:C(e.borderColor||"outlineVariant"),color:C(e.color||"onSurface"),cursor:"pointer",children:[jsx(Icon,{size:"md",color:"fg.muted",children:jsx(LuUpload,{})}),jsx(FileUpload.DropzoneContent,{maxHeight:"100%",overflow:"hidden",children:e.content||jsxs(Fragment,{children:[jsx(Box,{children:"Drag and drop files here"}),jsx(Box,{color:"fg.muted",children:".png, .jpg up to 5MB"})]})})]})})}a();var Mo=createContext(null);function _v(e){let r=T(null),t=T(e.defaultValue??""),[o,n]=useState(e.value??t.read()),[i,l]=useState(false),s=e.activationMode||"click",c=e.size||"md",g=z=>{e.value===void 0&&n(z),e.onChange?.(z);},v=()=>{g(t.read());},m=()=>{e.onEdit?.(),!e.preventDefault&&l(true);},h=(z={asClick:true})=>{r.upsert("cancel"),v(),z.asClick&&e.onCancelClick?.(),l(false);},S=z=>{z.preventDefault(),r.read()!=="save"&&v(),l(false);},x=(z=true)=>{t.upsert(o),z&&(r.upsert("save"),e.onSaveClick?.(o)),e.onSave?.(o),l(false);},y=()=>{r.upsert("edit"),e.onEditClick?.(),m();},_=()=>{x(false);},P=()=>{e.onContentClick?.(),m();},R={align:"center",gap:e.rowGap??"sm",width:e.width,maxWidth:"full"};return jsx(Mo.Provider,{value:{padding:".25rem",iconSize:e.iconSize||c},children:jsxs(d,{...R,asChildren:!e.label,row:false,align:"start",children:[e.label&&jsx(p,{text:e.label,fontSize:G[c],fade:i?.75:.5,style:{transition:"all 200ms linear"}}),jsxs(d,{...R,grid:true,gap:e.columnGap??R.gap,gridCols:e.hideControls===true||Array.isArray(e.hideControls)&&["cancel","save","edit"].every(z=>e.hideControls.includes(z))?"1fr":e.control?"1fr auto":i?"1fr auto auto":"1fr auto",justify:e.spaceBetween?"space-between":void 0,children:[i?jsx(d,{width:"full",align:"center",gap:"md",children:jsx(U,{autoFocus:true,allowedChars:e.allowedChars,maxChars:e.maxChars,value:o,corners:"md",width:e.inputWidth,focusColor:e.focusColor,size:e.inputSize||c,placeholder:e.placeholder,showCharCounter:e.showCharCounter,slotProps:{charCounter:{fontSize:e.charCounterFontSize}},onChange:g,onBlur:S,onEnterKeyPressed:_,onEscapeKeyPressed:()=>h({asClick:false})})}):jsx(d,{spill:"hidden",width:"full",padding:e.contentPadding??["md",["top","bottom"]],corners:"sm",fontSize:e.fontSize||c,cursor:"text",css:{transition:"all 200ms linear",":hover":{backgroundColor:"onSurface[0.1]"}},onDoubleClick:s==="dblclick"?()=>h({asClick:false}):void 0,onClick:s==="click"?P:void 0,children:jsx(De,{...e.slotProps?.popover,allowInteractions:true,asChild:e.showPopoverOnHover===false?true:e.slotProps?.popover?.asChild??!!o,content:(e.slotProps?.popover?.content||e.renderPopoverContent?.(o))??o,displayAction:"hover",maxWidth:e.slotProps?.popover?.maxWidth||"10rem",maxHeight:e.slotProps?.popover?.maxHeight||"5rem",children:jsx("span",{style:X({opacity:e.placeholder&&!o?.85:1,width:"100%"}),children:(e.formatContent?.(o)??o)||e.placeholder})})}),e.hideControls!==true&&(e.control||jsx(ul,{editing:i,hideControl:typeof e.hideControls=="boolean"?void 0:e.hideControls,onCancel:h,onSave:x,onEdit:y}))]})]})})}function ul(e){let r=t=>Array.isArray(e.hideControl)?e.hideControl.includes(t):e.hideControl===t;return e.editing?jsxs(Fragment,{children:[!r("cancel")&&jsx(Hr,{outlined:true,icon:LuX,onClick:e.onCancel}),!r("save")&&jsx(Hr,{preventDefault:true,outlined:true,icon:LuCheck,onClick:e.onSave})]}):r("edit")?void 0:jsx(Hr,{icon:LuPencilLine,onClick:e.onEdit})}function Hr(e){let{padding:r,iconSize:t}=useContext(Mo);return jsx(d,{asChildren:e.outlined,corners:"sm",css:{transition:"all 200ms linear",":hover":{backgroundColor:"onSurface[0.1]"}},children:jsx(B,{size:t,padding:r,leadingEl:e.icon,backgroundColor:"transparent",borderColor:e.outlined?"onSurface[0.25]":void 0,onClick:e.onClick,aspectRatio:1,color:"onSurface",corners:"sm",onMouseDown:o=>{o.preventDefault();}})})}a();var $r=createContext(null);function gl(e){return jsx($r,{value:e.itemFade?{fade:e.itemFade}:{fade:.5},children:jsx(d,{...e,size:e.size??"full",centerContent:e.centerContent??true,gap:e.gap||"lg",children:e.children})})}function vl(e){let{fade:r}=useContext($r);return jsx(d,{fade:e.disableFade?1:r,size:e.size||"4rem",children:e.element})}function yl(e){let{fade:r}=useContext($r);return jsxs(d,{align:"center",gap:e.gap||"sm",children:[jsx(p,{fontWeight:"bold",fontSize:e.titleFontSize||"lg",text:e.title}),jsx(p,{fade:r,fontSize:e.descriptionFontSize,text:e.description})]})}var gr={Root:gl,Indicator:vl,Content:yl};a();function ue(e){let r=()=>{if(!e.disableFallback){if(typeof e.fallback=="string")return jsx(Avatar.Fallback,{name:e.fallback});if(e.fallback&&re__default.isValidElement(e.fallback))return e.fallback;if(e.fallback){let t=e.fallback;return jsx(t,{size:"50%"})}return jsx(Avatar.Fallback,{})}};return jsxs(Avatar.Root,{size:e.size||"md",backgroundColor:C(e.backgroundColor),color:C(e.color),children:[jsx(r,{}),jsx(Avatar.Image,{src:e.src})]})}a();function Ho(e){let r=useRef(null),t=useRef(null);return e.asChild?e.children:jsxs(Box,{position:"relative",ref:r,children:[e.children,jsx(Float,{ref:t,offset:e.offset||(e.circleChild?".25rem":void 0),placement:e.placement,children:e.badge})]})}a();var Wo=createContext(null);function kl(e){return jsx(Wo.Provider,{value:{gap:e.gap},children:jsx(d,{row:true,clickable:e.clickable,gap:e.gap??"md",padding:e.padding??"md",corners:e.corners??"lg",height:e.height,width:e.width,maxWidth:e.maxWidth,minWidth:e.minWidth,backgroundColor:e.backgroundColor,color:e.color,align:"center",style:e.style,spill:e.spill??"hidden",css:e.sx,children:e.children})})}function $o(e){return r=>{let{children:t,className:o,row:n=true,spill:i="hidden",centerContent:l=true,align:s="center",...c}=r;return jsx(d,{className:o,...c,row:n,spill:i,centerContent:l,align:s,children:t})}}function No(e){return r=>jsx("span",{style:(()=>{let o=b({...e,fontSize:r.fontSize||e.fontSize,fontWeight:r.fontWeight||e.fontWeight,fade:r.fade||e.fade,color:r.color||e.color||"inherit"});return !r.truncateStyle||r.truncateStyle==="none"?o:r.truncateStyle==="ellipsis"?X(o):ze(r.truncateStyle.lineCount,o)})(),children:r.value})}var Dl=$o(),wl=$o(),Tl=e=>{let{gap:r=e.gap}=useContext(Wo);return jsx(d,{gap:r,...e,spill:e.spill||"hidden",maxWidth:e.maxWidth||"full",children:e.children})},El=No({fontWeight:"bold",fontSize:"xs",fade:.75}),Fl=No({fontSize:"sm"}),W={Root:kl,LeadingAddOn:Dl,TrailingAddOn:wl,Content:Tl,Label:El,Item:Fl};a();function Ol(e){let r=()=>{if(typeof e.fallback=="string"||re__default.isValidElement(e.fallback))return e.fallback;let o=e.fallback||PiImageBrokenLight;return jsx(o,{size:"3rem"})};return jsxs(d,{className:e.className,padding:"1px",corners:"lg",backgroundColor:"onSurface",color:"surface",gap:"sm",spill:"hidden",fade:e.fade,height:e.height??"fit-content",width:e.width??"14rem",style:{...e.style,boxShadow:"rgba(0, 0, 0, 0.35) 0px 5px 15px"},children:[jsx(d,{centerContent:true,height:e.mediaHeight??"7rem",width:"full",backgroundColor:"surface",color:"onSurface",borderColor:"surface",corners:{top:"lg"},spill:"hidden",children:e.src?jsx(de,{cover:e.coverImg??true,size:e.imgSize??"full",corners:e.imgCorners??"md",spill:"hidden",src:e.src,style:{boxShadow:"rgba(0, 0, 0, 0.24) 0px 3px 8px"}}):jsx(r,{})}),jsxs(d,{width:"full",gap:"md",padding:"md",align:"start",spill:"hidden",children:[jsxs(d,{width:"full",gap:0,spill:"hidden",children:[jsx("span",{children:e.title,style:b({fontSize:e.titleFontSize??"md"})}),e.description&&jsx("span",{children:e.description,style:b({fontSize:e.descriptionFontSize??"xs",fade:.5})})]}),e.children]})]})}function Il(e){return jsx(d,{...e,width:e.width??"full",spill:e.spill||"hidden",children:e.children})}var ry={Root:Ol,Content:Il};a();function Al(e){let r={backgroundColor:"onSurface",color:"surface",padding:"md",corners:"lg"},t=i=>e[i]??r[i],o=i=>{if(!e.children)return e[i]||r[i]},n=e.disableBoxShadow?"none":e.style?.boxShadow||"rgba(0, 0, 0, 0.35) 0px 5px 15px";return jsxs(d,{className:e.className,asChildren:!e.children,height:t("height"),width:t("width"),backgroundColor:t("backgroundColor"),color:t("color"),padding:t("padding"),corners:t("corners"),gap:"md",spill:"hidden",style:{...e.style,boxShadow:n},children:[jsxs(d,{row:true,className:e.children?void 0:e.className,gap:"md",align:"center",height:o("height"),width:o("width"),backgroundColor:o("backgroundColor"),color:o("color"),padding:o("padding"),corners:o("corners"),spill:"hidden",style:e.children?void 0:{...e.style,boxShadow:n},children:[jsx(ue,{src:e.avatarSrc,size:e.avatarSize??"sm",fallback:e.avatarFallback,backgroundColor:e.avatarBackgroundColor,color:e.avatarColor}),jsxs(d,{width:"full",spill:"hidden",children:[jsx("span",{children:e.title,style:X(b({fontSize:e.titleFontSize??"sm",fontWeight:e.titleFontWeight,fade:e.titleFade}))}),jsx("span",{children:e.description,style:X(b({fade:e.descriptionFade??.5,fontSize:e.descriptionFontSize??"xs",fontWeight:e.descriptionFontWeight}))})]})]}),e.children]})}var dy={Root:Al,Content:d};a();function Po(e){let[r,t]=useState(e.defaultChecked??false),o=e.checked??r,n=e.checked!==void 0,i=()=>{e.onClick?.(),n||(e.onChange?.(!o),t(!o));};return jsx(d,{cursor:e.disabled?"not-allowed":"pointer",fade:e.disabled?.5:1,size:e.size,corners:e.corners??"sm",padding:e.padding??"sm",backgroundColor:o?e.accentColor||"primaryContainer":"transparent",color:e.iconColor||"onPrimaryContainer",borderColor:e.borderColor||"onSurface[0.1]",style:{boxShadow:e.disableShadow?void 0:"rgba(0, 0, 0, 0.25) 0px 2px 4px 0px inset"},onClick:e.disabled?void 0:i,children:jsx(IoMdCheckmark,{size:e.iconSize,style:{opacity:o?1:0}})})}a();a();function Wl(e){let{triggerRerender:r}=L(),t=b({...e,padding:e.padding||"xl",corners:e.corners||"md",gap:e.gap||"lg"}),o=({open:i})=>{e.onOpenChange?.(i);},n=()=>{e.onClose?.(),e.controller?.hide?.(),e.rerenderOnClose&&r();};if(e.controller?.isOpen!==false)return jsxs(Dialog.Root,{unmountOnExit:e.unmountOnExit,open:e.controller?.isOpen,onEscapeKeyDown:e.closeOnEscape??true?e.controller?.hide:void 0,scrollBehavior:e.scrollBehavior,onInteractOutside:e.closeOnInteractOutside??true?e.controller?.hide:void 0,placement:e.placement||"center",closeOnEscape:e.closeOnEscape,closeOnInteractOutside:e.closeOnInteractOutside,onOpenChange:o,onExitComplete:n,motionPreset:e.enterAnimation||"slide-in-bottom",children:[e.triggerElement&&jsx(Dialog.Trigger,{asChild:true,children:e.triggerElement}),jsxs(Portal,{children:[jsx(Dialog.Backdrop,{}),jsx(Dialog.Positioner,{children:jsxs(Dialog.Content,{style:t,children:[e.children,!e.hideCloseButton&&jsx(Dialog.CloseTrigger,{asChild:true,children:jsx(CloseButton,{size:e.closeButtonSize||"sm",onClick:e.controller?.hide})})]})})]})]})}var Gr=(e,r)=>t=>{let o=Dialog[e],n={...t,spill:t.spill||"hidden"};return Object.keys(r||{}).forEach(i=>{let l=i;n?.[l]||(n=Object.assign(n,{[l]:r[l]}));}),jsx(o,{width:"full",height:"full",overflow:"hidden",children:jsx(d,{...n,children:t.children})})},$l=Gr("Header",{fontSize:"xl",fontWeight:"bold"}),Nl=Gr("Body",{gap:"md"}),Jl=Gr("Footer",{row:true,gap:"sm"}),Xl=e=>jsx(Dialog.CloseTrigger,{asChild:true,children:e.wrap?jsx("div",{...e.slotProps?.divWrapper,children:e.children}):e.children}),Ul=e=>jsx(Dialog.ActionTrigger,{asChild:true,children:e.children}),D={Root:Wl,Header:$l,Body:Nl,Footer:Jl,CloseTrigger:Xl,ActionTrigger:Ul};function Ry(e){let r=e.severity||"error",t=C(r,{preference:"res"});return jsxs(D.Root,{controller:e.controller,width:e.width??"25rem",height:e.height,minHeight:e.minHeight,maxHeight:e.maxHeight,minWidth:e.minWidth,maxWidth:e.maxWidth,triggerElement:e.triggerElement,children:[jsx(D.Header,{fontSize:"2xl",children:e.title}),jsxs(D.Body,{fade:.75,children:[jsx("span",{children:e.message}),e.disclaimer&&jsx(Xo,{width:"full",facade:o=>o==="error"?"warning":o,hideLabel:e.hideDisclaimerLabel,severity:r,message:e.disclaimer})]}),jsxs(D.Footer,{gap:"md",children:[jsx(D.ActionTrigger,{children:jsx(B,{size:"sm",fade:.75,color:"onSurface",backgroundColor:"transparent",text:e.cancelLabel||"Cancel",onClick:e.onCancelClick})}),jsx(B,{async:true,size:"sm",text:e.action.label,backgroundColor:t,color:"white",onClick:e.action.onClick})]})]})}a();var Yr=createContext(null);function Wy(e){let r=e.sections.flatMap(y=>typeof y=="object"?y.nestedItems:y),t=e.defaultSection?r.findIndex(y=>y===e.defaultSection):0,[o,n]=useState(t>=0?t:0),{triggerRerender:i}=L(),l=T([]),s=r[o],c=Array.isArray(e.ignoredSections)?e.ignoredSections:strictArray([e.ignoredSections]),g=o<=0;e.checkCompletionOnMount&&useEffect(()=>{r.forEach((y,_)=>{m(y,_);}),i();},[]);let v=(y=l.read())=>r.filter(_=>!y.includes(_)&&!c.includes(_)),m=(y=s,_=o)=>{let P=l.read();if(!c.includes(y)){if(e.isSectionComplete(y)&&!P.includes(y))P=[...P,y];else if(!e.isSectionComplete(y)&&P.includes(y))P=P.filter((R,z)=>z!==_);else return;l.upsert(P),e.onSectionsStatusChange?.(v(P),P);}},h=y=>{m(),n(r.findIndex(_=>_===y));},S=()=>{o>=r.length-1||(m(),n(o+1));},x=()=>{g||(m(),n(o-1));};return jsx(Yr.Provider,{value:{activeSection:s,completedSections:l.read(),rawSections:e.sections},children:jsx(D.Root,{controller:e.controller,triggerElement:e.triggerElement,unmountOnExit:e.unmountOnExit,height:"30rem",width:"45rem",maxWidth:"45rem",backdropBlur:"1rem",padding:"0px",rerenderOnClose:e.rerenderOnClose,backgroundColor:"transparent",spill:"hidden",children:jsxs(D.Body,{grid:true,gap:"0px",width:"full",height:"full",spill:"hidden",gridCols:".45fr 1fr",children:[jsx(ql,{title:e.title,onSectionClick:h}),jsx(Zl,{hideSubmitButton:e.hideSubmitButton,sectionMapper:e.sectionMapper,previousDisabled:g,onPreviousClick:x,onNextClick:S,incompleteSections:v(),onSubmitClick:e.onSubmit})]})})})}function ql(e){let{rawSections:r,activeSection:t,completedSections:o}=useContext(Yr);return jsxs(d,{size:"full",padding:"xl",backgroundColor:"surfaceContainer",gap:e.title?"xl":void 0,spill:"hidden",children:[e.title&&jsx(d,{fontSize:"lg",fontWeight:"bold",spill:"hidden",children:e.title}),jsx(Ar,{width:"full",items:r,isItemActive:n=>t===n,isItemCompleted:n=>o.includes(n),onItemClick:e.onSectionClick})]})}function Zl(e){let{activeSection:r}=useContext(Yr),{title:t,description:o,element:n}=e.sectionMapper[r],i=typeof n=="function"?jsx(n,{incompleteSections:e.incompleteSections}):n;return jsxs(d,{size:"full",backgroundColor:"surfaceContainer[0.5]",padding:"3rem",gap:"xl",grid:true,gridRows:"auto 1fr auto",justify:"space-between",spill:"hidden",children:[jsxs(d,{children:[jsx(p,{text:t,fontSize:"xl",fontWeight:"bold"}),jsx("span",{children:o,style:{opacity:.75}})]}),jsx(d,{size:"full",gap:"lg",children:i}),jsxs(d,{row:true,width:"full",align:"center",justify:"space-between",children:[jsx(qr,{disabled:e.previousDisabled,onClick:e.onPreviousClick}),r==="Submission"?!e.hideSubmitButton&&jsx(Zr,{disabled:!!e.onSubmitClick,onClick:e.onSubmitClick}):jsx(Kr,{onClick:e.onNextClick})]})]})}a();a();var Ql=ce({preset:{text:"Save",async:true}}),Qr=Ql;function Qy(e){let{triggerRerender:r}=L(),t=T(Object.fromEntries(Object.entries(e.fields).map(([l,s])=>[l,typeof s=="object"&&"defaultValue"in s?s.defaultValue:e.defaultValue?.[l]??""]))),o=e.actionButtionSize||"lg",n=()=>{e.onSave?.(t.read());},i=()=>{e.onCancel?.();};return jsxs(D.Root,{rerenderOnClose:true,width:e.width,closeButtonSize:e.closeButtonSize||"md",controller:e.controller,triggerElement:e.triggerElement,onClose:()=>r(),children:[jsx(D.Header,{fontSize:"2rem",children:e.title||"Edit Form"}),jsx(D.Body,{padding:"xs",children:Object.keys(e.fields).map(l=>{let s=l,c=e.fields[s],g=t.read()?.[s]??"",v=typeof c.label=="function"?c.label(l):!c.label||c.label==="prop-name"?e.formatFieldPropName?.(l)??l:c.label,m=h=>t.upsert(S=>({...S||{},[s]:h}));return c.options?jsx(rs,{label:v,size:e.textfieldSize,defaultValue:g,disabled:c.disabled,placeholder:c.placeholder,options:c.options,onChange:m},l):jsx(U,{width:"full",placeholder:c.placeholder,label:v,size:e.textfieldSize,defaultValue:g,disabled:c.disabled,allowedChars:c.allowedChars||e.allowedChars,onChange:m},s)})}),jsxs(D.Footer,{children:[jsx(D.ActionTrigger,{children:jsx(Ne,{fade:.5,size:o,onClick:i})}),jsx(D.ActionTrigger,{children:jsx(Qr,{size:o,onClick:n})})]})]})}function rs(e){let[r,t]=useState(e.defaultValue),o=({value:n})=>{e.onChange(n),t(n);};return jsx(Le,{wrap:true,asChild:e.disabled,width:"match-anchor",maxHeight:"10rem",isSelected:({value:n})=>r===n,options:e.options.map(n=>({value:n.trim()})),onOptionClick:o,slotProps:{divWrapper:{style:{width:"100%"}}},children:jsx(U,{readOnly:true,size:e.size,disabled:e.disabled,label:e.label,width:"full",value:r,placeholder:e.placeholder})})}a();var Z={sidebar:"fv-sidebar",topbar:"fv-topbar",viewer:"fv-viewer"},Xe=createContext(null);function is(e){let r=C(e.borderColor||"outline[0.1]"),t=le.md;return jsx(Xe.Provider,{value:{borderColor:r,corners:t,navThickness:e.navThickness||"3rem"},children:jsx(d,{minHeight:e.minHeight,maxHeight:e.maxHeight,minWidth:e.minWidth,maxWidth:e.maxWidth,corners:t,size:e.size,backgroundColor:e.backgroundColor??"surfaceContainer",height:e.height??"30rem",width:e.width??"40rem",spill:"hidden",grid:true,gridCols:"auto 1fr",gridRows:"auto 1fr",borderColor:r,style:{gridTemplateAreas:`"${Z.topbar} ${Z.topbar}" "${Z.sidebar} ${Z.viewer}"`,boxShadow:"rgba(0, 0, 0, 0.35) 0px 5px 15px"},children:e.children})})}function as(e){let{navThickness:r}=useContext(Xe),t=yr(e.file.typeAlias);return jsxs(d,{row:true,align:"center",children:[t&&jsx(t.filled,{style:b({size:r||e.styles?.icon?.size,color:"pdf",style:{padding:b({padding:e.styles?.icon?.padding||".65rem"})?.padding}})}),jsxs(d,{asChildren:e.hideFileMetadata,children:[jsx(p,{color:e.styles?.filename?.color,fontWeight:e.styles?.filename?.fontWeight,fontSize:e.styles?.filename?.fontSize||"1rem",text:e.file.name}),!e.hideFileMetadata&&jsxs(d,{row:true,fontSize:e.styles?.fileMetadata?.fontSize||".7rem",gap:e.styles?.fileMetadata?.gap??"sm",fade:e.styles?.fileMetadata?.fade??.5,color:e.styles?.fileMetadata?.color,align:"center",children:[jsx(p,{fontWeight:"bold",text:(e.file.ext||e.file.typeAlias)?.toUpperCase()}),jsx(d,{size:e.styles?.fileMetadataSeparator?.size||".3rem",corners:e.styles?.fileMetadataSeparator?.corners??"circle",backgroundColor:e.styles?.fileMetadataSeparator?.color||"onSurface"}),jsx(p,{fade:.75,text:format("file-size",e.file.sizeInBytes)})]})]})]})}function ls(e){let{navThickness:r}=useContext(Xe),{children:t,...o}=e;return jsx(d,{...o,row:true,id:Z.topbar,height:r,width:"full",align:"center",gap:e.gap??"md",padding:e.children?["md","right"]:void 0,justify:e.justify||"space-between",style:{...e.style,gridArea:Z.topbar},children:e.children})}var Yo=createContext(null);function ss(e){let{children:r,onOptionClick:t,...o}=e,{navThickness:n}=useContext(Xe);return jsx(Yo.Provider,{value:{onOptionClick:i=>e.onOptionClick?.(i)},children:jsx(d,{...o,id:Z.sidebar,height:"full",width:n,align:"center",gap:o.gap||"md",padding:["md",["top","bottom"]],style:{...o.style,gridArea:Z.sidebar},children:e.children})})}function cs(e){let{onOptionClick:r}=useContext(Yo),t=()=>{e.onClick?.(),r(e.label);};return jsx(De,{displayAction:"hover",placement:"right",fontSize:"sm",content:e.label,asChild:e.disabled,children:jsx(d,{fade:e.disabled?.5:1,cursor:e.disabled?"not-allowed":e.selected?"default":"pointer",corners:e.corners??"md",padding:e.padding??"md",borderColor:e.selected?"onPrimaryContainer[0.1]":"transparent",css:{transition:"background-color 200ms linear",backgroundColor:e.backgroundColor?.(e.selected)??(e.selected?"primaryContainer":"outline[0.1]"),color:e.color?.(e.selected)??(e.selected?"onPrimaryContainer":"onSurface"),":hover":e.selected?void 0:{...e.css?.[":hover"],backgroundColor:e.css?.[":hover"].backgroundColor||"outline[0.25]"}},onClick:e.disabled?void 0:t,children:jsx(e.icon,{size:e.iconSize??"1.1rem"})})})}function ds(e){let{borderColor:r,corners:t}=useContext(Xe),o=useRef(null);useEffect(()=>{n();let i=new MutationObserver(l=>{for(let s of l)s.type==="childList"&&n();});return i.observe(o.current?.parentNode,{childList:true}),()=>{i.disconnect();}},[]);let n=()=>{let i=["sidebar","topbar"],l=o.current?.parentElement,s=i.filter(c=>l?.querySelector(`#${Z[c]}`));i.every(c=>s.includes(c))?Object.assign(o.current?.style,{borderRadius:`${t} 0 0 0`,borderColor:`${r} transparent transparent ${r}`}):s.includes("sidebar")?Object.assign(o.current?.style,{borderRadius:`${t} 0 0 ${t}`,borderLeftColor:r}):s.includes("topbar")?Object.assign(o.current?.style,{borderRadius:0,borderTopColor:r}):Object.assign(o.current?.style,{borderRadius:t,borderColor:r});};return jsx(d,{ref:o,size:"full",centerContent:e.centerContent??true,backgroundColor:e.backgroundColor||"onSurface[0.1]",color:e.color||"onSurface",spill:"hidden",borderColor:"transparent",style:{gridArea:Z.viewer,boxShadow:"rgba(50, 50, 93, 0.25) 0px 30px 60px -12px inset, rgba(0, 0, 0, 0.3) 0px 18px 36px -18px inset"},children:e.children})}function us(e){let r=e.thickness||"0.0104in",t=e.length||"70%",o={horizontal:{height:r,width:t},vertical:{height:t,width:r}}[e.orientation||"vertical"];return jsx(d,{...o,backgroundColor:e.color||"outline[0.1]"})}var sh={Root:is,Sidebar:ss,SidebarOption:cs,Topbar:ls,Viewer:ds,Indicator:as,Sep:us};a();var Ko=(i=>(i["2xl"]="2rem",i.xl="1.75rem",i.lg="1.5rem",i.md="1.25rem",i.sm="1rem",i.xs=".85rem",i["2xs"]=".5rem",i))(Ko||{});function qo(e){let r=Ko[e.size||"sm"];return jsx(d,{hide:e.hide||e.content!==void 0&&!e.content,padding:e.padding||"xs",fontSize:e.fontSize||"xxs",corners:r,size:r,centerContent:true,backgroundColor:e.backgroundColor||"orange",color:e.color||"white",children:e.content})}a();function Zo(e){return jsxs(d,{row:true,clickable:true,width:"full",align:"center",justify:"space-between",corners:"lg",backgroundColor:"surfaceVariant[0.1]",padding:"lg",onClick:()=>{let t=(o,n=false)=>typeof o=="string"?o:Object.entries(o).map(([i,l],s,c)=>`${n?" ":""}${i}: ${[void 0,null,""].includes(l)?null:typeof l=="object"?`{
|
|
18
18
|
${t(l,true)}
|
|
19
19
|
}`:l}`+(s===lastIndex(c)?"":",")).join(`
|
|
20
20
|
`);alert(t(typeof e.info=="function"?e.info():e.info));},children:[jsxs(d,{row:true,align:"center",gap:"md",children:[e.item.icon&&jsx(e.item.icon,{size:"1.5rem",style:{borderRadius:"1.5rem"}}),jsxs(d,{gap:"sm",children:[jsx(p,{fontSize:".85rem",text:e.item.title}),e.item.description&&jsx(p,{fade:.5,fontSize:".75rem",text:e.item.description})]})]}),jsx(IoAdd,{size:"1.25rem"})]})}a();var en=createContext(null);function Cs(e){let r=e.backgroundColor||"surfaceContainer",t=e.color||"onSurface",o=e.placement||"right-start";return jsx(en.Provider,{value:{color:t,placement:o,onItemClick:e.onItemClick},children:jsxs(Menu.Root,{positioning:{placement:o,hideWhenDetached:true},children:[jsx(Menu.Trigger,{asChild:true,children:e.wrapTrigger?jsx("div",{...e.slotProps?.divWrapper,children:e.children}):e.children}),jsx(_s,{children:jsx(Menu.Positioner,{children:jsx(Menu.Content,{h:e.height,w:e.width,maxH:e.maxHeight,maxW:e.maxWidth,minH:e.minHeight,minW:e.minWidth,backgroundColor:C(r),color:C(t),style:b({gap:e.gap||"xs",padding:".5rem",corners:"md"}),children:Object.keys(e.items).map(n=>{let i=e.items[n];return i.subMenu?jsx(Cs,{...e,gutter:(e.gutter||0)+2,items:i.subMenu,wrapTrigger:false,children:jsx(Qo,{isTrigger:true,value:n})}):jsx(Qo,{...i,value:n})})})})})]})})}function _s(e){return e.asChild?e.children:jsx(Portal,{children:e.children})}function Qo(e){let{color:r,onItemClick:t}=useContext(en),o=()=>{if(e.trailingEl)return "command"in e.trailingEl?jsx(Menu.ItemCommand,{children:e.trailingEl.command}):e.trailingEl},n=()=>{e.onClick?.(e.value),t?.(e.value);},{backgroundColor:i="onSurface[0.1]",color:l}=e.sx?.[":hover"]||{},s={disabled:e.disabled,backgroundColor:C(e.backgroundColor||"transparent"),color:C(e.color||r),padding:".25rem",borderRadius:".35rem",cursor:"pointer",_hover:{transition:"all 200ms linear",backgroundColor:C(i),color:l?C(l):void 0},_active:e.sx?.[":active"]?{...b({...e.sx[":active"]}),transition:"all 200ms linear"}:void 0,onClick:n};return e.isTrigger?jsxs(Menu.TriggerItem,{...s,alignItems:"center",justifyContent:"space-between",children:[e.value," ",jsx(LuChevronRight,{})]}):jsxs(Menu.Item,{...s,value:e.value,children:[e.leadingEl,jsx(d,{style:{flexGrow:1},asChildren:!e.leadingEl&&!e.trailingEl,children:e.value}),jsx(o,{})]})}a();var nn=createContext(null);function Xh(e){let[r,t]=useState(false),o=e.controller||an(0),[n,i]=useState(o.defaultPage??0),l;useEffect(()=>{r?e.onTransition?.("start"):e.onTransition?.("end");},[r]),o.goTo=useCallback((v,m)=>{let h=m?.transition||"smooth",S=n;if(!(v===S||r||!m?.ignoreOutOfBoundsCheck&&!e.children[v]))if(l?.(S,v),e.onChange?.(S,v),h==="smooth"){t(true);let x=S,y=setInterval(()=>{v>S?x++:x--,i(x),x===v&&(clearInterval(y),t(false));},m?.transitionDuration||200);}else i(v);},[n,e.children,r]),o.echo=e.onEcho,o.isPageActive=useCallback(v=>v===n,[n]),o.onPageChange=useCallback(v=>{l=v;},[]),o.getActivePage=useCallback(()=>n,[n]),useEffect(()=>()=>{for(let m of Object.keys(o)){let h=m;typeof o[h]=="function"&&(o[h]=null);}l=null;},[]);let s=()=>o.goTo(n-1),c=()=>o.goTo(n+1),g=b({height:e.height,width:e.width,spill:e.spill,gap:e.gap});return jsx(nn.Provider,{value:{...e,transitioning:r},children:jsxs("div",{style:{display:"flex",position:"relative",alignItems:"center",height:g.height,width:g.width??"100%",justifyContent:"center",gap:g.gap??".5rem",overflow:g.overflow,transition:"all 300ms ease-in-out",perspective:"500px",transformStyle:"preserve-3d"},children:[jsx(on,{disabled:n<=0,inset:"left",onClick:s}),e.children.map((v,m)=>{let h=Math.sign(n-m),S=Math.abs(n-m)/3,x=Math.abs(n-m)>2;return jsx("div",{style:{position:"absolute",overflow:"hidden",transition:"all 0.3s ease-out",flexGrow:e.childFlexGrow??1,display:x?"none":"flex",justifyContent:"center",alignItems:"center",transform:`
|