@tapcart/mobile-components 0.6.19 → 0.6.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,44 +0,0 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("use-sync-external-store/shim/index.js"),require("react/jsx-runtime"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","use-sync-external-store/shim/index.js","react/jsx-runtime","react-dom"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).TapcartMobileComponents={},e.React,e.index_js,e.jsxRuntime,e.ReactDOM)}(this,(function(e,t,n,r,o){"use strict";function i(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var a=i(t),s=i(o);function l(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=l(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function c(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=l(e))&&(r&&(r+=" "),r+=t);return r}function u(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=d(e))&&(r&&(r+=" "),r+=t);return r}function d(e){if("string"==typeof e)return e;for(var t,n="",r=0;r<e.length;r++)e[r]&&(t=d(e[r]))&&(n&&(n+=" "),n+=t);return n}var f="-";function p(e){var t=function(e){var t=e.theme,n=e.prefix,r={nextPart:new Map,validators:[]},o=function(e,t){if(!t)return e;return e.map((function(e){return[e[0],e[1].map((function(e){return"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map((function(e){var n=e[0],r=e[1];return[t+n,r]}))):e}))]}))}(Object.entries(e.classGroups),n);return o.forEach((function(e){var n=e[0];g(e[1],r,n,t)})),r}(e),n=e.conflictingClassGroups,r=e.conflictingClassGroupModifiers,o=void 0===r?{}:r;return{getClassGroupId:function(e){var n=e.split(f);return""===n[0]&&1!==n.length&&n.shift(),m(n,t)||function(e){if(h.test(e)){var t=h.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}(e)},getConflictingClassGroupIds:function(e,t){var r=n[e]||[];return t&&o[e]?[].concat(r,o[e]):r}}}function m(e,t){if(0===e.length)return t.classGroupId;var n=e[0],r=t.nextPart.get(n),o=r?m(e.slice(1),r):void 0;if(o)return o;if(0!==t.validators.length){var i=e.join(f);return t.validators.find((function(e){return(0,e.validator)(i)}))?.classGroupId}}var h=/^\[(.+)\]$/;function g(e,t,n,r){e.forEach((function(e){if("string"!=typeof e){if("function"==typeof e)return e.isThemeGetter?void g(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n});Object.entries(e).forEach((function(e){var o=e[0];g(e[1],v(t,o),n,r)}))}else{(""===e?t:v(t,e)).classGroupId=n}}))}function v(e,t){var n=e;return t.split(f).forEach((function(e){n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)})),n}function b(e){if(e<1)return{get:function(){},set:function(){}};var t=0,n=new Map,r=new Map;function o(o,i){n.set(o,i),++t>e&&(t=0,r=n,n=new Map)}return{get:function(e){var t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(o(e,t),t):void 0},set:function(e,t){n.has(e)?n.set(e,t):o(e,t)}}}var y="!";function w(e){var t=e.separator||":",n=1===t.length,r=t[0],o=t.length;return function(e){for(var i,a=[],s=0,l=0,c=0;c<e.length;c++){var u=e[c];if(0===s){if(u===r&&(n||e.slice(c,c+o)===t)){a.push(e.slice(l,c)),l=c+o;continue}if("/"===u){i=c;continue}}"["===u?s++:"]"===u&&s--}var d=0===a.length?e:e.substring(l),f=d.startsWith(y);return{modifiers:a,hasImportantModifier:f,baseClassName:f?d.substring(1):d,maybePostfixModifierPosition:i&&i>l?i-l:void 0}}}var x=/\s+/;function C(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,o,i,a=function(e){var n=t[0],l=t.slice(1).reduce((function(e,t){return t(e)}),n());return r=function(e){return{cache:b(e.cacheSize),splitModifiers:w(e),...p(e)}}(l),o=r.cache.get,i=r.cache.set,a=s,s(e)};function s(e){var t=o(e);if(t)return t;var n=function(e,t){var n=t.splitModifiers,r=t.getClassGroupId,o=t.getConflictingClassGroupIds,i=new Set;return e.trim().split(x).map((function(e){var t=n(e),o=t.modifiers,i=t.hasImportantModifier,a=t.baseClassName,s=t.maybePostfixModifierPosition,l=r(s?a.substring(0,s):a),c=Boolean(s);if(!l){if(!s)return{isTailwindClass:!1,originalClassName:e};if(!(l=r(a)))return{isTailwindClass:!1,originalClassName:e};c=!1}var u=function(e){if(e.length<=1)return e;var t=[],n=[];return e.forEach((function(e){"["===e[0]?(t.push.apply(t,n.sort().concat([e])),n=[]):n.push(e)})),t.push.apply(t,n.sort()),t}(o).join(":");return{isTailwindClass:!0,modifierId:i?u+y:u,classGroupId:l,originalClassName:e,hasPostfixModifier:c}})).reverse().filter((function(e){if(!e.isTailwindClass)return!0;var t=e.modifierId,n=e.classGroupId,r=e.hasPostfixModifier,a=t+n;return!i.has(a)&&(i.add(a),o(n,r).forEach((function(e){return i.add(t+e)})),!0)})).reverse().map((function(e){return e.originalClassName})).join(" ")}(e,r);return i(e,n),n}return function(){return a(u.apply(null,arguments))}}function E(e){var t=function(t){return t[e]||[]};return t.isThemeGetter=!0,t}var S=/^\[(?:([a-z-]+):)?(.+)\]$/i,j=/^\d+\/\d+$/,R=new Set(["px","full","screen"]),O=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,N=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|^0$/,P=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;function k(e){return D(e)||R.has(e)||j.test(e)||T(e)}function T(e){return B(e,"length",U)}function _(e){return B(e,"size",H)}function A(e){return B(e,"position",H)}function M(e){return B(e,"url",q)}function I(e){return B(e,"number",D)}function D(e){return!Number.isNaN(Number(e))}function L(e){return e.endsWith("%")&&D(e.slice(0,-1))}function F(e){return G(e)||B(e,"number",G)}function z(e){return S.test(e)}function $(){return!0}function V(e){return O.test(e)}function W(e){return B(e,"",K)}function B(e,t,n){var r=S.exec(e);return!!r&&(r[1]?r[1]===t:n(r[2]))}function U(e){return N.test(e)}function H(){return!1}function q(e){return e.startsWith("url(")}function G(e){return Number.isInteger(Number(e))}function K(e){return P.test(e)}function X(){var e=E("colors"),t=E("spacing"),n=E("blur"),r=E("brightness"),o=E("borderColor"),i=E("borderRadius"),a=E("borderSpacing"),s=E("borderWidth"),l=E("contrast"),c=E("grayscale"),u=E("hueRotate"),d=E("invert"),f=E("gap"),p=E("gradientColorStops"),m=E("gradientColorStopPositions"),h=E("inset"),g=E("margin"),v=E("opacity"),b=E("padding"),y=E("saturate"),w=E("scale"),x=E("sepia"),C=E("skew"),S=E("space"),j=E("translate"),R=function(){return["auto",t]},O=function(){return["",k]},N=function(){return["auto",D,z]},P=function(){return["","0",z]},B=function(){return[D,I]},U=function(){return[D,z]};return{cacheSize:500,theme:{colors:[$],spacing:[k],blur:["none","",V,T],brightness:B(),borderColor:[e],borderRadius:["none","","full",V,T],borderSpacing:[t],borderWidth:O(),contrast:B(),grayscale:P(),hueRotate:U(),invert:P(),gap:[t],gradientColorStops:[e],gradientColorStopPositions:[L,T],inset:R(),margin:R(),opacity:B(),padding:[t],saturate:B(),scale:B(),sepia:P(),skew:U(),space:[t],translate:[t]},classGroups:{aspect:[{aspect:["auto","square","video",z]}],container:["container"],columns:[{columns:[V]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[].concat(["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],[z])}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",F]}],basis:[{basis:R()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",z]}],grow:[{grow:P()}],shrink:[{shrink:P()}],order:[{order:["first","last","none",F]}],"grid-cols":[{"grid-cols":[$]}],"col-start-end":[{col:["auto",{span:[F]},z]}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":[$]}],"row-start-end":[{row:["auto",{span:[F]},z]}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",z]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",z]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal"].concat(["start","end","center","between","around","evenly","stretch"])}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal"].concat(["start","end","center","between","around","evenly","stretch"],["baseline"])}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[].concat(["start","end","center","between","around","evenly","stretch"],["baseline"])}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",t]}],"min-w":[{"min-w":["min","max","fit",k]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[V]},V,T]}],h:[{h:[t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",k]}],"max-h":[{"max-h":[t,"min","max","fit"]}],"font-size":[{text:["base",V,T]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",I]}],"font-family":[{font:[$]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",T]}],"line-clamp":[{"line-clamp":["none",D,I]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",k]}],"list-image":[{"list-image":["none",z]}],"list-style-type":[{list:["none","disc","decimal",z]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[].concat(["solid","dashed","dotted","double","none"],["wavy"])}],"text-decoration-thickness":[{decoration:["auto","from-font",k]}],"underline-offset":[{"underline-offset":["auto",k]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:[t]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",T]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[].concat(["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],[A])}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",_]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},M]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[].concat(["solid","dashed","dotted","double","none"],["hidden"])}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:[""].concat(["solid","dashed","dotted","double","none"])}],"outline-offset":[{"outline-offset":[k]}],"outline-w":[{outline:[k]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:O()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[k]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",V,W]}],"shadow-color":[{shadow:[$]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"]}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",V,z]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",z]}],duration:[{duration:U()}],ease:[{ease:["linear","in","out","in-out",z]}],delay:[{delay:U()}],animate:[{animate:["none","spin","ping","pulse","bounce",z]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[F,z]}],"translate-x":[{"translate-x":[j]}],"translate-y":[{"translate-y":[j]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",z]}],accent:[{accent:["auto",e]}],appearance:["appearance-none"],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",z]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":[t]}],"scroll-mx":[{"scroll-mx":[t]}],"scroll-my":[{"scroll-my":[t]}],"scroll-ms":[{"scroll-ms":[t]}],"scroll-me":[{"scroll-me":[t]}],"scroll-mt":[{"scroll-mt":[t]}],"scroll-mr":[{"scroll-mr":[t]}],"scroll-mb":[{"scroll-mb":[t]}],"scroll-ml":[{"scroll-ml":[t]}],"scroll-p":[{"scroll-p":[t]}],"scroll-px":[{"scroll-px":[t]}],"scroll-py":[{"scroll-py":[t]}],"scroll-ps":[{"scroll-ps":[t]}],"scroll-pe":[{"scroll-pe":[t]}],"scroll-pt":[{"scroll-pt":[t]}],"scroll-pr":[{"scroll-pr":[t]}],"scroll-pb":[{"scroll-pb":[t]}],"scroll-pl":[{"scroll-pl":[t]}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","pinch-zoom","manipulation",{pan:["x","left","right","y","up","down"]}]}],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",z]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[k,I]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}var Y=C(X);const Z=e=>"boolean"==typeof e?"".concat(e):0===e?"0":e,J=c,Q=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return J(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map((e=>{const t=null==n?void 0:n[e],r=null==i?void 0:i[e];if(null===t)return null;const a=Z(t)||Z(r);return o[e][a]})),s=n&&Object.entries(n).reduce(((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e}),{}),l=null==t||null===(r=t.compoundVariants)||void 0===r?void 0:r.reduce(((e,t)=>{let{class:n,className:r,...o}=t;return Object.entries(o).every((e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...s}[t]):{...i,...s}[t]===n}))?[...e,n,r]:e}),[]);return J(e,a,l,null==n?void 0:n.class,null==n?void 0:n.className)};function ee(...e){return Y(c(e))}const te=["coreColors-primaryIcon","coreColors-secondaryIcon","coreColors-headerIcon","coreColors-brandColorPrimary","stateColors-subscriptions","stateColors-favorites","stateColors-reviews","stateColors-success","stateColors-error","stateColors-warning","stateColors-disabled","buttonColors-primaryText","buttonColors-secondaryText"],ne={};for(let e of te)ne[e]=`text-${e}`;const re=e=>{if(null!==(null==e?void 0:e.value))return e?"brand-kit"===(null==e?void 0:e.type)?`var(--${e.value})`:e.value:void 0},oe=e=>e.includes("all")?{borderWidth:"1px"}:{borderTopWidth:e.includes("top")?"1px":0,borderBottomWidth:e.includes("bottom")?"1px":0,borderLeftWidth:e.includes("left")?"1px":0,borderRightWidth:e.includes("right")?"1px":0},ie=e=>e?{paddingTop:void 0!==(null==e?void 0:e.top)?`${e.top}px`:void 0,paddingBottom:void 0!==(null==e?void 0:e.bottom)?`${e.bottom}px`:void 0,paddingLeft:void 0!==(null==e?void 0:e.left)?`${e.left}px`:void 0,paddingRight:void 0!==(null==e?void 0:e.right)?`${e.right}px`:void 0}:{},ae=e=>{const{backgroundColor:t,borderSides:n,borderColor:r,cornerRadius:o,padding:i,borderRadius:a}=e,s=o||a;return Object.assign(Object.assign({},ie(i)),{backgroundColor:re(t),borderColor:re(r),borderTopWidth:(null==n?void 0:n.includes("top"))||(null==n?void 0:n.includes("all"))?"1px":void 0,borderBottomWidth:(null==n?void 0:n.includes("bottom"))||(null==n?void 0:n.includes("all"))?"1px":void 0,borderLeftWidth:(null==n?void 0:n.includes("left"))||(null==n?void 0:n.includes("all"))?"1px":void 0,borderRightWidth:(null==n?void 0:n.includes("right"))||(null==n?void 0:n.includes("all"))?"1px":void 0,borderStyle:(null==n?void 0:n.length)?"solid":void 0,borderRadius:void 0!==s?`${s}px`:void 0})},se=e=>{const{font:t,size:n,color:r,uppercase:o,textAlignment:i,wrapText:a}=e;return{fontFamily:"initial"===t.family?void 0:t.family,fontWeight:"initial"===t.weight?void 0:t.weight,fontSize:n,color:re(r),textTransform:o?"uppercase":"none",textAlign:i,textWrap:a?"wrap":"nowrap"}},le={left:"justify-start",middle:"justify-center",right:"justify-end"};function ce(e){if(!e)return"";const t=e.split("/");return t[t.length-1]||""}var ue=function(){return ue=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ue.apply(this,arguments)};function de(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function fe(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))}function pe(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;const me=()=>{},he=me(),ge=Object,ve=e=>e===he,be=e=>"function"==typeof e,ye=(e,t)=>({...e,...t}),we=new WeakMap;let xe=0;const Ce=e=>{const t=typeof e,n=e&&e.constructor,r=n==Date;let o,i;if(ge(e)!==e||r||n==RegExp)o=r?e.toJSON():"symbol"==t?e.toString():"string"==t?JSON.stringify(e):""+e;else{if(o=we.get(e),o)return o;if(o=++xe+"~",we.set(e,o),n==Array){for(o="@",i=0;i<e.length;i++)o+=Ce(e[i])+",";we.set(e,o)}if(n==ge){o="#";const t=ge.keys(e).sort();for(;!ve(i=t.pop());)ve(e[i])||(o+=i+":"+Ce(e[i])+",");we.set(e,o)}}return o},Ee=new WeakMap,Se={},je={},Re="undefined",Oe=typeof window!=Re,Ne=typeof document!=Re,Pe=(e,t)=>{const n=Ee.get(e);return[()=>!ve(t)&&e.get(t)||Se,r=>{if(!ve(t)){const o=e.get(t);t in je||(je[t]=o),n[5](t,ye(o,r),o||Se)}},n[6],()=>!ve(t)&&t in je?je[t]:!ve(t)&&e.get(t)||Se]};let ke=!0;const[Te,_e]=Oe&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[me,me],Ae={isOnline:()=>ke,isVisible:()=>{const e=Ne&&document.visibilityState;return ve(e)||"hidden"!==e}},Me={initFocus:e=>(Ne&&document.addEventListener("visibilitychange",e),Te("focus",e),()=>{Ne&&document.removeEventListener("visibilitychange",e),_e("focus",e)}),initReconnect:e=>{const t=()=>{ke=!0,e()},n=()=>{ke=!1};return Te("online",t),Te("offline",n),()=>{_e("online",t),_e("offline",n)}}},Ie=!t.useId,De=!Oe||"Deno"in window,Le=e=>Oe&&typeof window.requestAnimationFrame!=Re?window.requestAnimationFrame(e):setTimeout(e,1),Fe=De?t.useEffect:t.useLayoutEffect,ze="undefined"!=typeof navigator&&navigator.connection,$e=!De&&ze&&(["slow-2g","2g"].includes(ze.effectiveType)||ze.saveData),Ve=e=>{if(be(e))try{e=e()}catch(t){e=""}const t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?Ce(e):"",t]};let We=0;const Be=()=>++We;var Ue=3,He=0,qe=2,Ge=1;async function Ke(...e){const[t,n,r,o]=e,i=ye({populateCache:!0,throwOnError:!0},"boolean"==typeof o?{revalidate:o}:o||{});let a=i.populateCache;const s=i.rollbackOnError;let l=i.optimisticData;const c=i.throwOnError;if(be(n)){const e=n,r=[],o=t.keys();for(const n of o)!/^\$(inf|sub)\$/.test(n)&&e(t.get(n)._k)&&r.push(n);return Promise.all(r.map(u))}return u(n);async function u(n){const[o]=Ve(n);if(!o)return;const[u,d]=Pe(t,o),[f,p,m,h]=Ee.get(t),g=()=>{const e=f[o];return(be(i.revalidate)?i.revalidate(u().data,n):!1!==i.revalidate)&&(delete m[o],delete h[o],e&&e[0])?e[0](2).then((()=>u().data)):u().data};if(e.length<3)return g();let v,b=r;const y=Be();p[o]=[y,0];const w=!ve(l),x=u(),C=x.data,E=x._c,S=ve(E)?C:E;if(w&&(l=be(l)?l(S,C):l,d({data:l,_c:S})),be(b))try{b=b(S)}catch(e){v=e}if(b&&be(b.then)){if(b=await b.catch((e=>{v=e})),y!==p[o][0]){if(v)throw v;return b}v&&w&&(e=>"function"==typeof s?s(e):!1!==s)(v)&&(a=!0,d({data:S,_c:he}))}if(a&&!v)if(be(a)){const e=a(b,S);d({data:e,error:he,_c:he})}else d({data:b,error:he,_c:he});if(p[o][1]=Be(),Promise.resolve(g()).then((()=>{d({_c:he})})),!v)return b;if(c)throw v}}const Xe=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},[Ye,Ze]=((e,t)=>{if(!Ee.has(e)){const n=ye(Me,t),r={},o=Ke.bind(he,e);let i=me;const a={},s=(e,t)=>{const n=a[e]||[];return a[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},l=(t,n,r)=>{e.set(t,n);const o=a[t];if(o)for(const e of o)e(n,r)},c=()=>{if(!Ee.has(e)&&(Ee.set(e,[r,{},{},{},o,l,s]),!De)){const t=n.initFocus(setTimeout.bind(he,Xe.bind(he,r,0))),o=n.initReconnect(setTimeout.bind(he,Xe.bind(he,r,1)));i=()=>{t&&t(),o&&o(),Ee.delete(e)}}};return c(),[e,o,c,i]}return[e,Ee.get(e)[4]]})(new Map),Je=ye({onLoadingSlow:me,onSuccess:me,onError:me,onErrorRetry:(e,t,n,r,o)=>{const i=n.errorRetryCount,a=o.retryCount,s=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!ve(i)&&a>i||setTimeout(r,s,o)},onDiscarded:me,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:$e?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:$e?5e3:3e3,compare:(e,t)=>Ce(e)==Ce(t),isPaused:()=>!1,cache:Ye,mutate:Ze,fallback:{}},Ae),Qe=t.createContext({}),et="$inf$",tt=Oe&&window.__SWR_DEVTOOLS_USE__,nt=tt?window.__SWR_DEVTOOLS_USE__:[],rt=e=>be(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],ot=nt.concat((e=>(t,n,r)=>e(t,n&&((...e)=>{const[r]=Ve(t),[,,,o]=Ee.get(Ye);if(r.startsWith(et))return n(...e);const i=o[r];return ve(i)?n(...e):(delete o[r],i)}),r))),it=e=>function(...n){const r=ye(Je,t.useContext(Qe)),[o,i,a]=rt(n),s=((e,t)=>{const n=ye(e,t);if(t){const{use:r,fallback:o}=e,{use:i,fallback:a}=t;r&&i&&(n.use=r.concat(i)),o&&a&&(n.fallback=ye(o,a))}return n})(r,a);let l=e;const{use:c}=s,u=(c||[]).concat(ot);for(let e=u.length;e--;)l=u[e](l);return l(o,i||s.fetcher||null,s)},at=(e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}};tt&&(window.__SWR_DEVTOOLS_REACT__=t);const st=t.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then((t=>{e.status="fulfilled",e.value=t}),(t=>{e.status="rejected",e.reason=t})),e)}),lt={dedupe:!0},ct=it(((e,r,o)=>{const{cache:i,compare:a,suspense:s,fallbackData:l,revalidateOnMount:c,revalidateIfStale:u,refreshInterval:d,refreshWhenHidden:f,refreshWhenOffline:p,keepPreviousData:m}=o,[h,g,v,b]=Ee.get(i),[y,w]=Ve(e),x=t.useRef(!1),C=t.useRef(!1),E=t.useRef(y),S=t.useRef(r),j=t.useRef(o),R=()=>j.current,O=()=>R().isVisible()&&R().isOnline(),[N,P,k,T]=Pe(i,y),_=t.useRef({}).current,A=ve(l)?o.fallback[y]:l,M=(e,t)=>{for(const n in _){const r=n;if("data"===r){if(!a(e[r],t[r])){if(!ve(e[r]))return!1;if(!a(B,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},I=t.useMemo((()=>{const e=!!y&&!!r&&(ve(c)?!R().isPaused()&&!s&&(!!ve(u)||u):c),t=t=>{const n=ye(t);return delete n._k,e?{isValidating:!0,isLoading:!0,...n}:n},n=N(),o=T(),i=t(n),a=n===o?i:t(o);let l=i;return[()=>{const e=t(N());return M(e,l)?(l.data=e.data,l.isLoading=e.isLoading,l.isValidating=e.isValidating,l.error=e.error,l):(l=e,e)},()=>a]}),[i,y]),D=n.useSyncExternalStore(t.useCallback((e=>k(y,((t,n)=>{M(n,t)||e()}))),[i,y]),I[0],I[1]),L=!x.current,F=h[y]&&h[y].length>0,z=D.data,$=ve(z)?A:z,V=D.error,W=t.useRef($),B=m?ve(z)?W.current:z:$,U=!(F&&!ve(V))&&(L&&!ve(c)?c:!R().isPaused()&&(s?!ve($)&&u:ve($)||u)),H=!!(y&&r&&L&&U),q=ve(D.isValidating)?H:D.isValidating,G=ve(D.isLoading)?H:D.isLoading,K=t.useCallback((async e=>{const t=S.current;if(!y||!t||C.current||R().isPaused())return!1;let n,r,i=!0;const s=e||{},l=!v[y]||!s.dedupe,c=()=>Ie?!C.current&&y===E.current&&x.current:y===E.current,u={isValidating:!1,isLoading:!1},d=()=>{P(u)},f=()=>{const e=v[y];e&&e[1]===r&&delete v[y]},p={isValidating:!0};ve(N().data)&&(p.isLoading=!0);try{if(l&&(P(p),o.loadingTimeout&&ve(N().data)&&setTimeout((()=>{i&&c()&&R().onLoadingSlow(y,o)}),o.loadingTimeout),v[y]=[t(w),Be()]),[n,r]=v[y],n=await n,l&&setTimeout(f,o.dedupingInterval),!v[y]||v[y][1]!==r)return l&&c()&&R().onDiscarded(y),!1;u.error=he;const e=g[y];if(!ve(e)&&(r<=e[0]||r<=e[1]||0===e[1]))return d(),l&&c()&&R().onDiscarded(y),!1;const s=N().data;u.data=a(s,n)?s:n,l&&c()&&R().onSuccess(n,y,o)}catch(e){f();const t=R(),{shouldRetryOnError:n}=t;t.isPaused()||(u.error=e,l&&c()&&(t.onError(e,y,t),(!0===n||be(n)&&n(e))&&(R().revalidateOnFocus&&R().revalidateOnReconnect&&!O()||t.onErrorRetry(e,y,t,(e=>{const t=h[y];t&&t[0]&&t[0](Ue,e)}),{retryCount:(s.retryCount||0)+1,dedupe:!0}))))}return i=!1,d(),!0}),[y,i]),X=t.useCallback(((...e)=>Ke(i,E.current,...e)),[]);if(Fe((()=>{S.current=r,j.current=o,ve(z)||(W.current=z)})),Fe((()=>{if(!y)return;const e=K.bind(he,lt);let t=0;const n=at(y,h,((n,r={})=>{if(n==He){const n=Date.now();R().revalidateOnFocus&&n>t&&O()&&(t=n+R().focusThrottleInterval,e())}else if(n==Ge)R().revalidateOnReconnect&&O()&&e();else{if(n==qe)return K();if(n==Ue)return K(r)}}));return C.current=!1,E.current=y,x.current=!0,P({_k:w}),U&&(ve($)||De?e():Le(e)),()=>{C.current=!0,n()}}),[y]),Fe((()=>{let e;function t(){const t=be(d)?d(N().data):d;t&&-1!==e&&(e=setTimeout(n,t))}function n(){N().error||!f&&!R().isVisible()||!p&&!R().isOnline()?t():K(lt).then(t)}return t(),()=>{e&&(clearTimeout(e),e=-1)}}),[d,f,p,y]),t.useDebugValue(B),s&&ve($)&&y){if(!Ie&&De)throw new Error("Fallback data is required when using suspense in SSR.");S.current=r,j.current=o,C.current=!1;const e=b[y];if(!ve(e)){const t=X(e);st(t)}if(!ve(V))throw V;{const e=K(lt);ve(B)||(e.status="fulfilled",e.value=!0),st(e)}}return{mutate:X,get data(){return _.data=!0,B},get error(){return _.error=!0,V},get isValidating(){return _.isValidating=!0,q},get isLoading(){return _.isLoading=!0,G}}})),ut=Promise.resolve(),dt=((e,t)=>(...n)=>{const[r,o,i]=rt(n),a=(i.use||[]).concat(t);return e(r,o,{...i,use:a})})(ct,(e=>(r,o,i)=>{const a=t.useRef(!1),{cache:s,initialSize:l=1,revalidateAll:c=!1,persistSize:u=!1,revalidateFirstPage:d=!0,revalidateOnMount:f=!1,parallel:p=!1}=i,[,,,m]=Ee.get(Ye);let h;try{h=(e=>Ve(e?e(0,null):null)[0])(r),h&&(h=et+h)}catch(e){}const[g,v,b]=Pe(s,h),y=t.useCallback((()=>ve(g()._l)?l:g()._l),[s,h,l]);n.useSyncExternalStore(t.useCallback((e=>h?b(h,(()=>{e()})):()=>{}),[s,h]),y,y);const w=t.useCallback((()=>{const e=g()._l;return ve(e)?l:e}),[h,l]),x=t.useRef(w());Fe((()=>{a.current?h&&v({_l:u?x.current:w()}):a.current=!0}),[h,s]);const C=f&&!a.current,E=e(h,(async e=>{const t=g()._i,n=g()._r;v({_r:he});const a=[],l=w(),[u]=Pe(s,e),f=u().data,h=[];let b=null;for(let e=0;e<l;++e){const[l,u]=Ve(r(e,p?null:b));if(!l)break;const[g,v]=Pe(s,l);let y=g().data;const w=c||t||ve(y)||d&&!e&&!ve(f)||C||f&&!ve(f[e])&&!i.compare(f[e],y);if(o&&("function"==typeof n?n(y,u):w)){const t=async()=>{if(l in m){const e=m[l];delete m[l],y=await e}else y=await o(u);v({data:y,_k:u}),a[e]=y};p?h.push(t):await t()}else a[e]=y;p||(b=y)}return p&&await Promise.all(h.map((e=>e()))),v({_i:he}),a}),i),S=t.useCallback((function(e,t){const n="boolean"==typeof t?{revalidate:t}:t||{},r=!1!==n.revalidate;return h?(r&&(ve(e)?v({_i:!0,_r:n.revalidate}):v({_i:!1,_r:n.revalidate})),arguments.length?E.mutate(e,{...n,revalidate:r}):E.mutate()):ut}),[h,s]),j=t.useCallback((e=>{if(!h)return ut;const[,t]=Pe(s,h);let n;if(be(e)?n=e(w()):"number"==typeof e&&(n=e),"number"!=typeof n)return ut;t({_l:n}),x.current=n;const o=[],[i]=Pe(s,h);let a=null;for(let e=0;e<n;++e){const[t]=Ve(r(e,a)),[n]=Pe(s,t),l=t?n().data:he;if(ve(l))return S(i().data);o.push(l),a=l}return S(o)}),[h,s,S,w]);return{size:w(),setSize:j,mutate:S,get data(){return E.data},get error(){return E.error},get isValidating(){return E.isValidating},get isLoading(){return E.isLoading}}}));var ft=new Map,pt=new WeakMap,mt=0,ht=void 0;function gt(e){return Object.keys(e).sort().filter((t=>void 0!==e[t])).map((t=>{return`${t}_${"root"===t?(n=e.root,n?(pt.has(n)||(mt+=1,pt.set(n,mt.toString())),pt.get(n)):"0"):e[t]}`;var n})).toString()}function vt(e,t,n={},r=ht){if(void 0===window.IntersectionObserver&&void 0!==r){const o=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:"number"==typeof n.threshold?n.threshold:0,time:0,boundingClientRect:o,intersectionRect:o,rootBounds:o}),()=>{}}const{id:o,observer:i,elements:a}=function(e){const t=gt(e);let n=ft.get(t);if(!n){const r=new Map;let o;const i=new IntersectionObserver((t=>{t.forEach((t=>{var n;const i=t.isIntersecting&&o.some((e=>t.intersectionRatio>=e));e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=i),null==(n=r.get(t.target))||n.forEach((e=>{e(i,t)}))}))}),e);o=i.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:i,elements:r},ft.set(t,n)}return n}(n),s=a.get(e)||[];return a.has(e)||a.set(e,s),s.push(t),i.observe(e),function(){s.splice(s.indexOf(t),1),0===s.length&&(a.delete(e),i.unobserve(e)),0===a.size&&(i.disconnect(),ft.delete(o))}}var bt,yt,wt={exports:{}},xt={},Ct={};function Et(){if(bt)return Ct;return bt=1,Ct._=Ct._interop_require_default=function(e){return e&&e.__esModule?e:{default:e}},Ct}var St,jt={};var Rt,Ot={exports:{}};var Nt,Pt={};var kt,Tt,_t,At={exports:{}},Mt={exports:{}},It={exports:{}},Dt={exports:{}},Lt={exports:{}};function Ft(){return kt||(kt=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createAsyncLocalStorage",{enumerable:!0,get:function(){return i}});const n=new Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class r{disable(){throw n}getStore(){}run(){throw n}exit(){throw n}enterWith(){throw n}}const o=globalThis.AsyncLocalStorage;function i(){return o?new o:new r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(Lt,Lt.exports)),Lt.exports}function zt(){return _t||(_t=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{getExpectedRequestStore:function(){return r},requestAsyncStorage:function(){return n.requestAsyncStorage}});const n=(Tt||(Tt=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"requestAsyncStorage",{enumerable:!0,get:function(){return n}});const n=(0,Ft().createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(Dt,Dt.exports)),Dt.exports);function r(e){const t=n.requestAsyncStorage.getStore();if(t)return t;throw new Error("`"+e+"` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context")}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(It,It.exports)),It.exports}var $t,Vt,Wt={exports:{}},Bt={exports:{}};function Ut(){return Vt||(Vt=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return n.actionAsyncStorage}});const n=($t||($t=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return n}});const n=(0,Ft().createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(Bt,Bt.exports)),Bt.exports);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(Wt,Wt.exports)),Wt.exports}var Ht,qt,Gt={exports:{}};function Kt(){return qt||(qt=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{RedirectType:function(){return a},getRedirectError:function(){return s},getRedirectStatusCodeFromError:function(){return p},getRedirectTypeFromError:function(){return f},getURLFromRedirectError:function(){return d},isRedirectError:function(){return u},permanentRedirect:function(){return c},redirect:function(){return l}});const n=zt(),r=Ut(),o=(Ht||(Ht=1,function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RedirectStatusCode",{enumerable:!0,get:function(){return n}}),function(e){e[e.SeeOther=303]="SeeOther",e[e.TemporaryRedirect=307]="TemporaryRedirect",e[e.PermanentRedirect=308]="PermanentRedirect"}(n||(n={})),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(Gt,Gt.exports)),Gt.exports),i="NEXT_REDIRECT";var a;function s(e,t,r){void 0===r&&(r=o.RedirectStatusCode.TemporaryRedirect);const a=new Error(i);a.digest=i+";"+t+";"+e+";"+r+";";const s=n.requestAsyncStorage.getStore();return s&&(a.mutableCookies=s.mutableCookies),a}function l(e,t){void 0===t&&(t="replace");const n=r.actionAsyncStorage.getStore();throw s(e,t,(null==n?void 0:n.isAction)?o.RedirectStatusCode.SeeOther:o.RedirectStatusCode.TemporaryRedirect)}function c(e,t){void 0===t&&(t="replace");const n=r.actionAsyncStorage.getStore();throw s(e,t,(null==n?void 0:n.isAction)?o.RedirectStatusCode.SeeOther:o.RedirectStatusCode.PermanentRedirect)}function u(e){if("object"!=typeof e||null===e||!("digest"in e)||"string"!=typeof e.digest)return!1;const[t,n,r,a]=e.digest.split(";",4),s=Number(a);return t===i&&("replace"===n||"push"===n)&&"string"==typeof r&&!isNaN(s)&&s in o.RedirectStatusCode}function d(e){return u(e)?e.digest.split(";",3)[2]:null}function f(e){if(!u(e))throw new Error("Not a redirect error");return e.digest.split(";",2)[1]}function p(e){if(!u(e))throw new Error("Not a redirect error");return Number(e.digest.split(";",4)[3])}!function(e){e.push="push",e.replace="replace"}(a||(a={})),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(Mt,Mt.exports)),Mt.exports}var Xt,Yt,Zt={exports:{}};function Jt(){return Yt||(Yt=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ReadonlyURLSearchParams:function(){return i},RedirectType:function(){return n.RedirectType},notFound:function(){return r.notFound},permanentRedirect:function(){return n.permanentRedirect},redirect:function(){return n.redirect}});const n=Kt(),r=(Xt||(Xt=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{isNotFoundError:function(){return o},notFound:function(){return r}});const n="NEXT_NOT_FOUND";function r(){const e=new Error(n);throw e.digest=n,e}function o(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(Zt,Zt.exports)),Zt.exports);class o extends Error{constructor(){super("Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams")}}class i extends URLSearchParams{append(){throw new o}delete(){throw new o}set(){throw new o}sort(){throw new o}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(At,At.exports)),At.exports}var Qt,en,tn={},nn={};function rn(){if(Qt)return nn;function e(t){if("function"!=typeof WeakMap)return null;var n=new WeakMap,r=new WeakMap;return(e=function(e){return e?r:n})(t)}return Qt=1,nn._=nn._interop_require_wildcard=function(t,n){if(!n&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var r=e(n);if(r&&r.has(t))return r.get(t);var o={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var s=i?Object.getOwnPropertyDescriptor(t,a):null;s&&(s.get||s.set)?Object.defineProperty(o,a,s):o[a]=t[a]}o.default=t,r&&r.set(t,o);return o},nn}var on,an={exports:{}},sn={};var ln,cn,un,dn,fn,pn,mn={exports:{}},hn={exports:{}};function gn(){return cn||(cn=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return n.staticGenerationAsyncStorage}});const n=(ln||(ln=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return n}});const n=(0,Ft().createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(hn,hn.exports)),hn.exports);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(mn,mn.exports)),mn.exports}function vn(){return un||(un=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"bailoutToClientRendering",{enumerable:!0,get:function(){return o}});const n=(on||(on=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(e,{BailoutToCSRError:function(){return n},isBailoutToCSRError:function(){return r}});const t="BAILOUT_TO_CLIENT_SIDE_RENDERING";class n extends Error{constructor(e){super("Bail out to client-side rendering: "+e),this.reason=e,this.digest=t}}function r(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===t}}(sn)),sn),r=gn();function o(e){const t=r.staticGenerationAsyncStorage.getStore();if(!(null==t?void 0:t.forceStatic)&&(null==t?void 0:t.isStaticGeneration))throw new n.BailoutToCSRError(e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(an,an.exports)),an.exports}function bn(){return dn||(dn=1,function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(n,{ReadonlyURLSearchParams:function(){return l.ReadonlyURLSearchParams},RedirectType:function(){return l.RedirectType},ServerInsertedHTMLContext:function(){return c.ServerInsertedHTMLContext},notFound:function(){return l.notFound},permanentRedirect:function(){return l.permanentRedirect},redirect:function(){return l.redirect},useParams:function(){return p},usePathname:function(){return d},useRouter:function(){return f},useSearchParams:function(){return u},useSelectedLayoutSegment:function(){return g},useSelectedLayoutSegments:function(){return h},useServerInsertedHTML:function(){return c.useServerInsertedHTML}});const r=t,o=(yt||(yt=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(e,{AppRouterContext:function(){return r},GlobalLayoutRouterContext:function(){return i},LayoutRouterContext:function(){return o},MissingSlotContext:function(){return s},TemplateContext:function(){return a}});const n=Et()._(t),r=n.default.createContext(null),o=n.default.createContext(null),i=n.default.createContext(null),a=n.default.createContext(null);"production"!==process.env.NODE_ENV&&(r.displayName="AppRouterContext",o.displayName="LayoutRouterContext",i.displayName="GlobalLayoutRouterContext",a.displayName="TemplateContext");const s=n.default.createContext(new Set)}(xt)),xt),i=(St||(St=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(e,{PathParamsContext:function(){return i},PathnameContext:function(){return o},SearchParamsContext:function(){return r}});const n=t,r=(0,n.createContext)(null),o=(0,n.createContext)(null),i=(0,n.createContext)(null);"production"!==process.env.NODE_ENV&&(r.displayName="SearchParamsContext",o.displayName="PathnameContext",i.displayName="PathParamsContext")}(jt)),jt),a=(Rt||(Rt=1,function(e,t){function n(e){return Array.isArray(e)?e[1]:e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentValue",{enumerable:!0,get:function(){return n}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}(Ot,Ot.exports)),Ot.exports),s=(Nt||(Nt=1,function(e){function t(e){return"("===e[0]&&e.endsWith(")")}Object.defineProperty(e,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(e,{DEFAULT_SEGMENT_KEY:function(){return r},PAGE_SEGMENT_KEY:function(){return n},isGroupSegment:function(){return t}});const n="__PAGE__",r="__DEFAULT__"}(Pt)),Pt),l=Jt(),c=(en||(en=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(e,{ServerInsertedHTMLContext:function(){return r},useServerInsertedHTML:function(){return o}});const n=rn()._(t),r=n.default.createContext(null);function o(e){const t=(0,n.useContext)(r);t&&t(e)}}(tn)),tn);function u(){const e=(0,r.useContext)(i.SearchParamsContext),t=(0,r.useMemo)((()=>e?new l.ReadonlyURLSearchParams(e):null),[e]);if("undefined"==typeof window){const{bailoutToClientRendering:e}=vn();e("useSearchParams()")}return t}function d(){return(0,r.useContext)(i.PathnameContext)}function f(){const e=(0,r.useContext)(o.AppRouterContext);if(null===e)throw new Error("invariant expected app router to be mounted");return e}function p(){return(0,r.useContext)(i.PathParamsContext)}function m(e,t,n,r){let o;if(void 0===n&&(n=!0),void 0===r&&(r=[]),n)o=e[1][t];else{const t=e[1];var i;o=null!=(i=t.children)?i:Object.values(t)[0]}if(!o)return r;const l=o[0],c=(0,a.getSegmentValue)(l);return!c||c.startsWith(s.PAGE_SEGMENT_KEY)?r:(r.push(c),m(o,t,!1,r))}function h(e){void 0===e&&(e="children");const t=(0,r.useContext)(o.LayoutRouterContext);return t?m(t.tree,e):null}function g(e){void 0===e&&(e="children");const t=h(e);if(!t||0===t.length)return null;const n="children"===e?t[0]:t[t.length-1];return n===s.DEFAULT_SEGMENT_KEY?null:n}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),e.exports=n.default)}(wt,wt.exports)),wt.exports}var yn=pn?fn:(pn=1,fn=bn());const wn=e=>{const t={};return e?(e.forEach(((e,n)=>{t[n]?Array.isArray(t[n])?t[n].push(e):t[n]=[t[n],e]:t[n]=e})),t):t},xn=e=>new URL(e).toString(),Cn=t.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then((t=>{e.status="fulfilled",e.value=t}),(t=>{e.status="rejected",e.reason=t})),e)}),En={dedupe:!0},Sn=it(((e,r,o)=>{const{cache:i,compare:a,suspense:s,fallbackData:l,revalidateOnMount:c,revalidateIfStale:u,refreshInterval:d,refreshWhenHidden:f,refreshWhenOffline:p,keepPreviousData:m}=o,[h,g,v,b]=Ee.get(i),[y,w]=Ve(e),x=t.useRef(!1),C=t.useRef(!1),E=t.useRef(y),S=t.useRef(r),j=t.useRef(o),R=()=>j.current,O=()=>R().isVisible()&&R().isOnline(),[N,P,k,T]=Pe(i,y),_=t.useRef({}).current,A=ve(l)?o.fallback[y]:l,M=(e,t)=>{for(const n in _){const r=n;if("data"===r){if(!a(e[r],t[r])){if(!ve(e[r]))return!1;if(!a(B,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},I=t.useMemo((()=>{const e=!!y&&!!r&&(ve(c)?!R().isPaused()&&!s&&(!!ve(u)||u):c),t=t=>{const n=ye(t);return delete n._k,e?{isValidating:!0,isLoading:!0,...n}:n},n=N(),o=T(),i=t(n),a=n===o?i:t(o);let l=i;return[()=>{const e=t(N());return M(e,l)?(l.data=e.data,l.isLoading=e.isLoading,l.isValidating=e.isValidating,l.error=e.error,l):(l=e,e)},()=>a]}),[i,y]),D=n.useSyncExternalStore(t.useCallback((e=>k(y,((t,n)=>{M(n,t)||e()}))),[i,y]),I[0],I[1]),L=!x.current,F=h[y]&&h[y].length>0,z=D.data,$=ve(z)?A:z,V=D.error,W=t.useRef($),B=m?ve(z)?W.current:z:$,U=!(F&&!ve(V))&&(L&&!ve(c)?c:!R().isPaused()&&(s?!ve($)&&u:ve($)||u)),H=!!(y&&r&&L&&U),q=ve(D.isValidating)?H:D.isValidating,G=ve(D.isLoading)?H:D.isLoading,K=t.useCallback((async e=>{const t=S.current;if(!y||!t||C.current||R().isPaused())return!1;let n,r,i=!0;const s=e||{},l=!v[y]||!s.dedupe,c=()=>Ie?!C.current&&y===E.current&&x.current:y===E.current,u={isValidating:!1,isLoading:!1},d=()=>{P(u)},f=()=>{const e=v[y];e&&e[1]===r&&delete v[y]},p={isValidating:!0};ve(N().data)&&(p.isLoading=!0);try{if(l&&(P(p),o.loadingTimeout&&ve(N().data)&&setTimeout((()=>{i&&c()&&R().onLoadingSlow(y,o)}),o.loadingTimeout),v[y]=[t(w),Be()]),[n,r]=v[y],n=await n,l&&setTimeout(f,o.dedupingInterval),!v[y]||v[y][1]!==r)return l&&c()&&R().onDiscarded(y),!1;u.error=he;const e=g[y];if(!ve(e)&&(r<=e[0]||r<=e[1]||0===e[1]))return d(),l&&c()&&R().onDiscarded(y),!1;const s=N().data;u.data=a(s,n)?s:n,l&&c()&&R().onSuccess(n,y,o)}catch(e){f();const t=R(),{shouldRetryOnError:n}=t;t.isPaused()||(u.error=e,l&&c()&&(t.onError(e,y,t),(!0===n||be(n)&&n(e))&&(R().revalidateOnFocus&&R().revalidateOnReconnect&&!O()||t.onErrorRetry(e,y,t,(e=>{const t=h[y];t&&t[0]&&t[0](Ue,e)}),{retryCount:(s.retryCount||0)+1,dedupe:!0}))))}return i=!1,d(),!0}),[y,i]),X=t.useCallback(((...e)=>Ke(i,E.current,...e)),[]);if(Fe((()=>{S.current=r,j.current=o,ve(z)||(W.current=z)})),Fe((()=>{if(!y)return;const e=K.bind(he,En);let t=0;const n=at(y,h,((n,r={})=>{if(n==He){const n=Date.now();R().revalidateOnFocus&&n>t&&O()&&(t=n+R().focusThrottleInterval,e())}else if(n==Ge)R().revalidateOnReconnect&&O()&&e();else{if(n==qe)return K();if(n==Ue)return K(r)}}));return C.current=!1,E.current=y,x.current=!0,P({_k:w}),U&&(ve($)||De?e():Le(e)),()=>{C.current=!0,n()}}),[y]),Fe((()=>{let e;function t(){const t=be(d)?d(N().data):d;t&&-1!==e&&(e=setTimeout(n,t))}function n(){N().error||!f&&!R().isVisible()||!p&&!R().isOnline()?t():K(En).then(t)}return t(),()=>{e&&(clearTimeout(e),e=-1)}}),[d,f,p,y]),t.useDebugValue(B),s&&ve($)&&y){if(!Ie&&De)throw new Error("Fallback data is required when using suspense in SSR.");S.current=r,j.current=o,C.current=!1;const e=b[y];if(!ve(e)){const t=X(e);Cn(t)}if(!ve(V))throw V;{const e=K(En);ve(B)||(e.status="fulfilled",e.value=!0),Cn(e)}}return{mutate:X,get data(){return _.data=!0,B},get error(){return _.error=!0,V},get isValidating(){return _.isValidating=!0,q},get isLoading(){return _.isLoading=!0,G}}}));const jn=({apiURL:e,body:t})=>fetch((e=>new URL(e).toString())(e),{method:"POST",body:JSON.stringify(t)}).then((e=>e.json()));function Rn(){return Rn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rn.apply(null,arguments)}function On(e,n=[]){let r=[];const o=()=>{const n=r.map((e=>t.createContext(e)));return function(r){const o=(null==r?void 0:r[e])||n;return t.useMemo((()=>({[`__scope${e}`]:{...r,[e]:o}})),[r,o])}};return o.scopeName=e,[function(n,o){const i=t.createContext(o),a=r.length;function s(n){const{scope:r,children:o,...s}=n,l=(null==r?void 0:r[e][a])||i,c=t.useMemo((()=>s),Object.values(s));return t.createElement(l.Provider,{value:c},o)}return r=[...r,o],s.displayName=n+"Provider",[s,function(r,s){const l=(null==s?void 0:s[e][a])||i,c=t.useContext(l);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${n}\``)}]},Nn(o,...n)]}function Nn(...e){const n=e[0];if(1===e.length)return n;const r=()=>{const r=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const o=r.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return t.useMemo((()=>({[`__scope${n.scopeName}`]:o})),[o])}};return r.scopeName=n.scopeName,r}function Pn(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function kn(...e){return t.useCallback(Pn(...e),e)}const Tn=t.forwardRef(((e,n)=>{const{children:r,...o}=e,i=t.Children.toArray(r),a=i.find(Mn);if(a){const e=a.props.children,r=i.map((n=>n===a?t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null:n));return t.createElement(_n,Rn({},o,{ref:n}),t.isValidElement(e)?t.cloneElement(e,void 0,r):null)}return t.createElement(_n,Rn({},o,{ref:n}),r)}));Tn.displayName="Slot";const _n=t.forwardRef(((e,n)=>{const{children:r,...o}=e;return t.isValidElement(r)?t.cloneElement(r,{...In(o,r.props),ref:n?Pn(n,r.ref):r.ref}):t.Children.count(r)>1?t.Children.only(null):null}));_n.displayName="SlotClone";const An=({children:e})=>t.createElement(t.Fragment,null,e);function Mn(e){return t.isValidElement(e)&&e.type===An}function In(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Dn(e){const n=e+"CollectionProvider",[r,o]=On(n),[i,a]=r(n,{collectionRef:{current:null},itemMap:new Map}),s=e+"CollectionSlot",l=e+"CollectionItemSlot",c="data-radix-collection-item";return[{Provider:e=>{const{scope:n,children:r}=e,o=t.useRef(null),a=t.useRef(new Map).current;return t.createElement(i,{scope:n,itemMap:a,collectionRef:o},r)},Slot:t.forwardRef(((e,n)=>{const{scope:r,children:o}=e,i=kn(n,a(s,r).collectionRef);return t.createElement(Tn,{ref:i},o)})),ItemSlot:t.forwardRef(((e,n)=>{const{scope:r,children:o,...i}=e,s=t.useRef(null),u=kn(n,s),d=a(l,r);return t.useEffect((()=>(d.itemMap.set(s,{ref:s,...i}),()=>{d.itemMap.delete(s)}))),t.createElement(Tn,{[c]:"",ref:u},o)}))},function(n){const r=a(e+"CollectionConsumer",n);return t.useCallback((()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${c}]`));return Array.from(r.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[r.collectionRef,r.itemMap])},o]}function Ln(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function Fn(e){const n=t.useRef(e);return t.useEffect((()=>{n.current=e})),t.useMemo((()=>(...e)=>{var t;return null===(t=n.current)||void 0===t?void 0:t.call(n,...e)}),[])}function zn({prop:e,defaultProp:n,onChange:r=()=>{}}){const[o,i]=function({defaultProp:e,onChange:n}){const r=t.useState(e),[o]=r,i=t.useRef(o),a=Fn(n);return t.useEffect((()=>{i.current!==o&&(a(o),i.current=o)}),[o,i,a]),r}({defaultProp:n,onChange:r}),a=void 0!==e,s=a?e:o,l=Fn(r);return[s,t.useCallback((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else i(t)}),[a,e,i,l])]}const $n=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,n)=>{const r=t.forwardRef(((e,r)=>{const{asChild:o,...i}=e,a=o?Tn:n;return t.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),t.createElement(a,Rn({},i,{ref:r}))}));return r.displayName=`Primitive.${n}`,{...e,[n]:r}}),{});function Vn(e,t){e&&o.flushSync((()=>e.dispatchEvent(t)))}const Wn=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?t.useLayoutEffect:()=>{};const Bn=e=>{const{present:n,children:r}=e,i=function(e){const[n,r]=t.useState(),i=t.useRef({}),a=t.useRef(e),s=t.useRef("none"),l=e?"mounted":"unmounted",[c,u]=function(e,n){return t.useReducer(((e,t)=>{const r=n[e][t];return null!=r?r:e}),e)}(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return t.useEffect((()=>{const e=Un(i.current);s.current="mounted"===c?e:"none"}),[c]),Wn((()=>{const t=i.current,n=a.current;if(n!==e){const r=s.current,o=Un(t);if(e)u("MOUNT");else if("none"===o||"none"===(null==t?void 0:t.display))u("UNMOUNT");else{u(n&&r!==o?"ANIMATION_OUT":"UNMOUNT")}a.current=e}}),[e,u]),Wn((()=>{if(n){const e=e=>{const t=Un(i.current).includes(e.animationName);e.target===n&&t&&o.flushSync((()=>u("ANIMATION_END")))},t=e=>{e.target===n&&(s.current=Un(i.current))};return n.addEventListener("animationstart",t),n.addEventListener("animationcancel",e),n.addEventListener("animationend",e),()=>{n.removeEventListener("animationstart",t),n.removeEventListener("animationcancel",e),n.removeEventListener("animationend",e)}}u("ANIMATION_END")}),[n,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:t.useCallback((e=>{e&&(i.current=getComputedStyle(e)),r(e)}),[])}}(n),a="function"==typeof r?r({present:i.isPresent}):t.Children.only(r),s=kn(i.ref,a.ref);return"function"==typeof r||i.isPresent?t.cloneElement(a,{ref:s}):null};function Un(e){return(null==e?void 0:e.animationName)||"none"}Bn.displayName="Presence";const Hn=a["useId".toString()]||(()=>{});let qn=0;function Gn(e){const[t,n]=a.useState(Hn());return Wn((()=>{n((e=>null!=e?e:String(qn++)))}),[e]),t?`radix-${t}`:""}const Kn="Collapsible",[Xn,Yn]=On(Kn),[Zn,Jn]=Xn(Kn),Qn=t.forwardRef(((e,n)=>{const{__scopeCollapsible:r,open:o,defaultOpen:i,disabled:a,onOpenChange:s,...l}=e,[c=!1,u]=zn({prop:o,defaultProp:i,onChange:s});return t.createElement(Zn,{scope:r,disabled:a,contentId:Gn(),open:c,onOpenToggle:t.useCallback((()=>u((e=>!e))),[u])},t.createElement($n.div,Rn({"data-state":or(c),"data-disabled":a?"":void 0},l,{ref:n})))})),er=t.forwardRef(((e,n)=>{const{__scopeCollapsible:r,...o}=e,i=Jn("CollapsibleTrigger",r);return t.createElement($n.button,Rn({type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":or(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled},o,{ref:n,onClick:Ln(e.onClick,i.onOpenToggle)}))})),tr="CollapsibleContent",nr=t.forwardRef(((e,n)=>{const{forceMount:r,...o}=e,i=Jn(tr,e.__scopeCollapsible);return t.createElement(Bn,{present:r||i.open},(({present:e})=>t.createElement(rr,Rn({},o,{ref:n,present:e}))))})),rr=t.forwardRef(((e,n)=>{const{__scopeCollapsible:r,present:o,children:i,...a}=e,s=Jn(tr,r),[l,c]=t.useState(o),u=t.useRef(null),d=kn(n,u),f=t.useRef(0),p=f.current,m=t.useRef(0),h=m.current,g=s.open||l,v=t.useRef(g),b=t.useRef();return t.useEffect((()=>{const e=requestAnimationFrame((()=>v.current=!1));return()=>cancelAnimationFrame(e)}),[]),Wn((()=>{const e=u.current;if(e){b.current=b.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";const t=e.getBoundingClientRect();f.current=t.height,m.current=t.width,v.current||(e.style.transitionDuration=b.current.transitionDuration,e.style.animationName=b.current.animationName),c(o)}}),[s.open,o]),t.createElement($n.div,Rn({"data-state":or(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!g},a,{ref:d,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...e.style}}),g&&i)}));function or(e){return e?"open":"closed"}const ir=Qn,ar=er,sr=nr,lr=t.createContext(void 0);function cr(e){const n=t.useContext(lr);return e||n||"ltr"}const ur="Accordion",dr=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[fr,pr,mr]=Dn(ur),[hr,gr]=On(ur,[mr,Yn]),vr=Yn(),br=t.forwardRef(((e,n)=>{const{type:r,...o}=e,i=o,a=o;return t.createElement(fr.Provider,{scope:e.__scopeAccordion},"multiple"===r?t.createElement(Sr,Rn({},a,{ref:n})):t.createElement(Er,Rn({},i,{ref:n})))}));br.propTypes={type(e){const t=e.value||e.defaultValue;return e.type&&!["single","multiple"].includes(e.type)?new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`."):"multiple"===e.type&&"string"==typeof t?new Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`."):"single"===e.type&&Array.isArray(t)?new Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`."):null}};const[yr,wr]=hr(ur),[xr,Cr]=hr(ur,{collapsible:!1}),Er=t.forwardRef(((e,n)=>{const{value:r,defaultValue:o,onValueChange:i=()=>{},collapsible:a=!1,...s}=e,[l,c]=zn({prop:r,defaultProp:o,onChange:i});return t.createElement(yr,{scope:e.__scopeAccordion,value:l?[l]:[],onItemOpen:c,onItemClose:t.useCallback((()=>a&&c("")),[a,c])},t.createElement(xr,{scope:e.__scopeAccordion,collapsible:a},t.createElement(Or,Rn({},s,{ref:n}))))})),Sr=t.forwardRef(((e,n)=>{const{value:r,defaultValue:o,onValueChange:i=()=>{},...a}=e,[s=[],l]=zn({prop:r,defaultProp:o,onChange:i}),c=t.useCallback((e=>l(((t=[])=>[...t,e]))),[l]),u=t.useCallback((e=>l(((t=[])=>t.filter((t=>t!==e))))),[l]);return t.createElement(yr,{scope:e.__scopeAccordion,value:s,onItemOpen:c,onItemClose:u},t.createElement(xr,{scope:e.__scopeAccordion,collapsible:!0},t.createElement(Or,Rn({},a,{ref:n}))))})),[jr,Rr]=hr(ur),Or=t.forwardRef(((e,n)=>{const{__scopeAccordion:r,disabled:o,dir:i,orientation:a="vertical",...s}=e,l=kn(t.useRef(null),n),c=pr(r),u="ltr"===cr(i),d=Ln(e.onKeyDown,(e=>{var t;if(!dr.includes(e.key))return;const n=e.target,r=c().filter((e=>{var t;return!(null!==(t=e.ref.current)&&void 0!==t&&t.disabled)})),o=r.findIndex((e=>e.ref.current===n)),i=r.length;if(-1===o)return;e.preventDefault();let s=o;const l=i-1,d=()=>{s=o+1,s>l&&(s=0)},f=()=>{s=o-1,s<0&&(s=l)};switch(e.key){case"Home":s=0;break;case"End":s=l;break;case"ArrowRight":"horizontal"===a&&(u?d():f());break;case"ArrowDown":"vertical"===a&&d();break;case"ArrowLeft":"horizontal"===a&&(u?f():d());break;case"ArrowUp":"vertical"===a&&f()}null===(t=r[s%i].ref.current)||void 0===t||t.focus()}));return t.createElement(jr,{scope:r,disabled:o,direction:i,orientation:a},t.createElement(fr.Slot,{scope:r},t.createElement($n.div,Rn({},s,{"data-orientation":a,ref:l,onKeyDown:o?void 0:d}))))})),Nr="AccordionItem",[Pr,kr]=hr(Nr),Tr="AccordionTrigger";function _r(e){return e?"open":"closed"}const Ar=br,Mr=t.forwardRef(((e,n)=>{const{__scopeAccordion:r,value:o,...i}=e,a=Rr(Nr,r),s=wr(Nr,r),l=vr(r),c=Gn(),u=o&&s.value.includes(o)||!1,d=a.disabled||e.disabled;return t.createElement(Pr,{scope:r,open:u,disabled:d,triggerId:c},t.createElement(ir,Rn({"data-orientation":a.orientation,"data-state":_r(u)},l,i,{ref:n,disabled:d,open:u,onOpenChange:e=>{e?s.onItemOpen(o):s.onItemClose(o)}})))})),Ir=t.forwardRef(((e,n)=>{const{__scopeAccordion:r,...o}=e,i=Rr(ur,r),a=kr("AccordionHeader",r);return t.createElement($n.h3,Rn({"data-orientation":i.orientation,"data-state":_r(a.open),"data-disabled":a.disabled?"":void 0},o,{ref:n}))})),Dr=t.forwardRef(((e,n)=>{const{__scopeAccordion:r,...o}=e,i=Rr(ur,r),a=kr(Tr,r),s=Cr(Tr,r),l=vr(r);return t.createElement(fr.ItemSlot,{scope:r},t.createElement(ar,Rn({"aria-disabled":a.open&&!s.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId},l,o,{ref:n})))})),Lr=t.forwardRef(((e,n)=>{const{__scopeAccordion:r,...o}=e,i=Rr(ur,r),a=kr("AccordionContent",r),s=vr(r);return t.createElement(sr,Rn({role:"region","aria-labelledby":a.triggerId,"data-orientation":i.orientation},s,o,{ref:n,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}}))}));function Fr(e,t){return Fr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Fr(e,t)}var zr,$r={};
2
- /*!
3
- * content-type
4
- * Copyright(c) 2015 Douglas Christopher Wilson
5
- * MIT Licensed
6
- */var Vr,Wr=function(){if(zr)return $r;zr=1;var e=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,t=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,n=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,r=/\\([\u000b\u0020-\u00ff])/g,o=/([\\"])/g,i=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function a(e){var r=String(e);if(n.test(r))return r;if(r.length>0&&!t.test(r))throw new TypeError("invalid parameter value");return'"'+r.replace(o,"\\$1")+'"'}function s(e){this.parameters=Object.create(null),this.type=e}return $r.format=function(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var t=e.parameters,r=e.type;if(!r||!i.test(r))throw new TypeError("invalid type");var o=r;if(t&&"object"==typeof t)for(var s,l=Object.keys(t).sort(),c=0;c<l.length;c++){if(s=l[c],!n.test(s))throw new TypeError("invalid parameter name");o+="; "+s+"="+a(t[s])}return o},$r.parse=function(t){if(!t)throw new TypeError("argument string is required");var n="object"==typeof t?function(e){var t;"function"==typeof e.getHeader?t=e.getHeader("content-type"):"object"==typeof e.headers&&(t=e.headers&&e.headers["content-type"]);if("string"!=typeof t)throw new TypeError("content-type header is missing from object");return t}(t):t;if("string"!=typeof n)throw new TypeError("argument string is required to be a string");var o=n.indexOf(";"),a=-1!==o?n.slice(0,o).trim():n.trim();if(!i.test(a))throw new TypeError("invalid media type");var l=new s(a.toLowerCase());if(-1!==o){var c,u,d;for(e.lastIndex=o;u=e.exec(n);){if(u.index!==o)throw new TypeError("invalid parameter format");o+=u[0].length,c=u[1].toLowerCase(),34===(d=u[2]).charCodeAt(0)&&-1!==(d=d.slice(1,-1)).indexOf("\\")&&(d=d.replace(r,"$1")),l.parameters[c]=d}if(o!==n.length)throw new TypeError("invalid parameter format")}return l},$r}(),Br=new Map,Ur=function(e){return e.cloneNode(!0)},Hr=function(){return"file:"===window.location.protocol},qr=function(e,t,n){var r=new XMLHttpRequest;r.onreadystatechange=function(){try{if(!/\.svg/i.test(e)&&2===r.readyState){var t=r.getResponseHeader("Content-Type");if(!t)throw new Error("Content type not found");var o=Wr.parse(t).type;if("image/svg+xml"!==o&&"text/plain"!==o)throw new Error("Invalid content type: ".concat(o))}if(4===r.readyState){if(404===r.status||null===r.responseXML)throw new Error(Hr()?"Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver.":"Unable to load SVG file: "+e);if(!(200===r.status||Hr()&&0===r.status))throw new Error("There was a problem injecting the SVG: "+r.status+" "+r.statusText);n(null,r)}}catch(e){if(r.abort(),!(e instanceof Error))throw e;n(e,r)}},r.open("GET",e),r.withCredentials=t,r.overrideMimeType&&r.overrideMimeType("text/xml"),r.send()},Gr={},Kr=function(e,t){Gr[e]=Gr[e]||[],Gr[e].push(t)},Xr=function(e,t,n){if(Br.has(e)){var r=Br.get(e);if(void 0===r)return void Kr(e,n);if(r instanceof SVGSVGElement)return void n(null,Ur(r))}Br.set(e,void 0),Kr(e,n),qr(e,t,(function(t,n){var r;t?Br.set(e,t):(null===(r=n.responseXML)||void 0===r?void 0:r.documentElement)instanceof SVGSVGElement&&Br.set(e,n.responseXML.documentElement),function(e){for(var t=function(t,n){setTimeout((function(){if(Array.isArray(Gr[e])){var n=Br.get(e),r=Gr[e][t];n instanceof SVGSVGElement&&r(null,Ur(n)),n instanceof Error&&r(n),t===Gr[e].length-1&&delete Gr[e]}}),0)},n=0,r=Gr[e].length;n<r;n++)t(n)}(e)}))},Yr=function(e,t,n){qr(e,t,(function(e,t){var r;e?n(e):(null===(r=t.responseXML)||void 0===r?void 0:r.documentElement)instanceof SVGSVGElement&&n(null,t.responseXML.documentElement)}))},Zr=0,Jr=[],Qr={},eo="http://www.w3.org/1999/xlink",to=function(e,t,n,r,o,i,a){var s=e.getAttribute("data-src")||e.getAttribute("src");if(s){if(-1!==Jr.indexOf(e))return Jr.splice(Jr.indexOf(e),1),void(e=null);Jr.push(e),e.setAttribute("src",""),(r?Xr:Yr)(s,o,(function(r,o){if(!o)return Jr.splice(Jr.indexOf(e),1),e=null,void a(r);var l=e.getAttribute("id");l&&o.setAttribute("id",l);var c=e.getAttribute("title");c&&o.setAttribute("title",c);var u=e.getAttribute("width");u&&o.setAttribute("width",u);var d=e.getAttribute("height");d&&o.setAttribute("height",d);var f=Array.from(new Set(pe(pe(pe([],(o.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(e.getAttribute("class")||"").split(" "),!0))).join(" ").trim();o.setAttribute("class",f);var p=e.getAttribute("style");p&&o.setAttribute("style",p),o.setAttribute("data-src",s);var m=[].filter.call(e.attributes,(function(e){return/^data-\w[\w-]*$/.test(e.name)}));if(Array.prototype.forEach.call(m,(function(e){e.name&&e.value&&o.setAttribute(e.name,e.value)})),n){var h,g,v,b,y,w={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],path:[],pattern:["fill","stroke"],radialGradient:["fill","stroke"]};Object.keys(w).forEach((function(e){h=e,v=w[e];for(var t=function(e,t){var n;b=g[e].id,y=b+"-"+ ++Zr,Array.prototype.forEach.call(v,(function(e){for(var t=0,r=(n=o.querySelectorAll("["+e+'*="'+b+'"]')).length;t<r;t++){var i=n[t].getAttribute(e);i&&!i.match(new RegExp('url\\("?#'+b+'"?\\)'))||n[t].setAttribute(e,"url(#"+y+")")}}));for(var r=o.querySelectorAll("[*|href]"),i=[],a=0,s=r.length;a<s;a++){var l=r[a].getAttributeNS(eo,"href");l&&l.toString()==="#"+g[e].id&&i.push(r[a])}for(var c=0,u=i.length;c<u;c++)i[c].setAttributeNS(eo,"href","#"+y);g[e].id=y},n=0,r=(g=o.querySelectorAll(h+"[id]")).length;n<r;n++)t(n)}))}o.removeAttribute("xmlns:a");for(var x,C,E=o.querySelectorAll("script"),S=[],j=0,R=E.length;j<R;j++)(C=E[j].getAttribute("type"))&&"application/ecmascript"!==C&&"application/javascript"!==C&&"text/javascript"!==C||((x=E[j].innerText||E[j].textContent)&&S.push(x),o.removeChild(E[j]));if(S.length>0&&("always"===t||"once"===t&&!Qr[s])){for(var O=0,N=S.length;O<N;O++)new Function(S[O])(window);Qr[s]=!0}var P=o.querySelectorAll("style");if(Array.prototype.forEach.call(P,(function(e){e.textContent+=""})),o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("xmlns:xlink",eo),i(o),!e.parentNode)return Jr.splice(Jr.indexOf(e),1),e=null,void a(new Error("Parent node is null"));e.parentNode.replaceChild(o,e),Jr.splice(Jr.indexOf(e),1),e=null,a(null,o)}))}else a(new Error("Invalid data-src or src attribute"))},no={exports:{}},ro={exports:{}},oo={};var io,ao,so,lo,co,uo,fo,po,mo,ho,go,vo,bo,yo,wo,xo={};
7
- /** @license React v16.13.1
8
- * react-is.development.js
9
- *
10
- * Copyright (c) Facebook, Inc. and its affiliates.
11
- *
12
- * This source code is licensed under the MIT license found in the
13
- * LICENSE file in the root directory of this source tree.
14
- */function Co(){return ao||(ao=1,"production"===process.env.NODE_ENV?ro.exports=function(){if(Vr)return oo;Vr=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var f=e.$$typeof;switch(f){case t:switch(e=e.type){case l:case c:case r:case i:case o:case d:return e;default:switch(e=e&&e.$$typeof){case s:case u:case m:case p:case a:return e;default:return f}}case n:return f}}}function w(e){return y(e)===c}return oo.AsyncMode=l,oo.ConcurrentMode=c,oo.ContextConsumer=s,oo.ContextProvider=a,oo.Element=t,oo.ForwardRef=u,oo.Fragment=r,oo.Lazy=m,oo.Memo=p,oo.Portal=n,oo.Profiler=i,oo.StrictMode=o,oo.Suspense=d,oo.isAsyncMode=function(e){return w(e)||y(e)===l},oo.isConcurrentMode=w,oo.isContextConsumer=function(e){return y(e)===s},oo.isContextProvider=function(e){return y(e)===a},oo.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},oo.isForwardRef=function(e){return y(e)===u},oo.isFragment=function(e){return y(e)===r},oo.isLazy=function(e){return y(e)===m},oo.isMemo=function(e){return y(e)===p},oo.isPortal=function(e){return y(e)===n},oo.isProfiler=function(e){return y(e)===i},oo.isStrictMode=function(e){return y(e)===o},oo.isSuspense=function(e){return y(e)===d},oo.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===d||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===p||e.$$typeof===a||e.$$typeof===s||e.$$typeof===u||e.$$typeof===g||e.$$typeof===v||e.$$typeof===b||e.$$typeof===h)},oo.typeOf=y,oo}():ro.exports=(io||(io=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var f=e.$$typeof;switch(f){case t:var h=e.type;switch(h){case l:case c:case r:case i:case o:case d:return h;default:var g=h&&h.$$typeof;switch(g){case s:case u:case m:case p:case a:return g;default:return f}}case n:return f}}}var w=l,x=c,C=s,E=a,S=t,j=u,R=r,O=m,N=p,P=n,k=i,T=o,_=d,A=!1;function M(e){return y(e)===c}xo.AsyncMode=w,xo.ConcurrentMode=x,xo.ContextConsumer=C,xo.ContextProvider=E,xo.Element=S,xo.ForwardRef=j,xo.Fragment=R,xo.Lazy=O,xo.Memo=N,xo.Portal=P,xo.Profiler=k,xo.StrictMode=T,xo.Suspense=_,xo.isAsyncMode=function(e){return A||(A=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),M(e)||y(e)===l},xo.isConcurrentMode=M,xo.isContextConsumer=function(e){return y(e)===s},xo.isContextProvider=function(e){return y(e)===a},xo.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},xo.isForwardRef=function(e){return y(e)===u},xo.isFragment=function(e){return y(e)===r},xo.isLazy=function(e){return y(e)===m},xo.isMemo=function(e){return y(e)===p},xo.isPortal=function(e){return y(e)===n},xo.isProfiler=function(e){return y(e)===i},xo.isStrictMode=function(e){return y(e)===o},xo.isSuspense=function(e){return y(e)===d},xo.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===d||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===p||e.$$typeof===a||e.$$typeof===s||e.$$typeof===u||e.$$typeof===g||e.$$typeof===v||e.$$typeof===b||e.$$typeof===h)},xo.typeOf=y}()),xo)),ro.exports}
15
- /*
16
- object-assign
17
- (c) Sindre Sorhus
18
- @license MIT
19
- */function Eo(){if(lo)return so;lo=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return so=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(r,o){for(var i,a,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(r),l=1;l<arguments.length;l++){for(var c in i=Object(arguments[l]))t.call(i,c)&&(s[c]=i[c]);if(e){a=e(i);for(var u=0;u<a.length;u++)n.call(i,a[u])&&(s[a[u]]=i[a[u]])}}return s},so}function So(){if(uo)return co;uo=1;return co="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function jo(){return po?fo:(po=1,fo=Function.call.bind(Object.prototype.hasOwnProperty))}function Ro(){if(ho)return mo;ho=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=So(),n={},r=jo();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function o(o,i,a,s,l){if("production"!==process.env.NODE_ENV)for(var c in o)if(r(o,c)){var u;try{if("function"!=typeof o[c]){var d=Error((s||"React class")+": "+a+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}u=o[c](i,c,s,a,null,t)}catch(e){u=e}if(!u||u instanceof Error||e((s||"React class")+": type specification of "+a+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in n)){n[u.message]=!0;var f=l?l():"";e("Failed "+a+" type: "+u.message+(null!=f?f:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},mo=o}function Oo(){if(vo)return go;vo=1;var e=Co(),t=Eo(),n=So(),r=jo(),o=Ro(),i=function(){};function a(){return null}return"production"!==process.env.NODE_ENV&&(i=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),go=function(s,l){var c="function"==typeof Symbol&&Symbol.iterator,u="@@iterator";var d="<<anonymous>>",f={array:g("array"),bigint:g("bigint"),bool:g("boolean"),func:g("function"),number:g("number"),object:g("object"),string:g("string"),symbol:g("symbol"),any:h(a),arrayOf:function(e){return h((function(t,r,o,i,a){if("function"!=typeof e)return new m("Property `"+a+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var s=t[r];if(!Array.isArray(s))return new m("Invalid "+i+" `"+a+"` of type `"+y(s)+"` supplied to `"+o+"`, expected an array.");for(var l=0;l<s.length;l++){var c=e(s,l,o,i,a+"["+l+"]",n);if(c instanceof Error)return c}return null}))},element:h((function(e,t,n,r,o){var i=e[t];return s(i)?null:new m("Invalid "+r+" `"+o+"` of type `"+y(i)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:h((function(t,n,r,o,i){var a=t[n];return e.isValidElementType(a)?null:new m("Invalid "+o+" `"+i+"` of type `"+y(a)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return h((function(t,n,r,o,i){if(!(t[n]instanceof e)){var a=e.name||d;return new m("Invalid "+o+" `"+i+"` of type `"+(((s=t[n]).constructor&&s.constructor.name?s.constructor.name:d)+"` supplied to `")+r+"`, expected instance of `"+a+"`.")}var s;return null}))},node:h((function(e,t,n,r,o){return b(e[t])?null:new m("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return h((function(t,o,i,a,s){if("function"!=typeof e)return new m("Property `"+s+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var l=t[o],c=y(l);if("object"!==c)return new m("Invalid "+a+" `"+s+"` of type `"+c+"` supplied to `"+i+"`, expected an object.");for(var u in l)if(r(l,u)){var d=e(l,u,i,a,s+"."+u,n);if(d instanceof Error)return d}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),a;return h((function(t,n,r,o,i){for(var a=t[n],s=0;s<e.length;s++)if(p(a,e[s]))return null;var l=JSON.stringify(e,(function(e,t){return"symbol"===w(t)?String(t):t}));return new m("Invalid "+o+" `"+i+"` of value `"+String(a)+"` supplied to `"+r+"`, expected one of "+l+".")}))},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var t=0;t<e.length;t++){var o=e[t];if("function"!=typeof o)return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+x(o)+" at index "+t+"."),a}return h((function(t,o,i,a,s){for(var l=[],c=0;c<e.length;c++){var u=(0,e[c])(t,o,i,a,s,n);if(null==u)return null;u.data&&r(u.data,"expectedType")&&l.push(u.data.expectedType)}return new m("Invalid "+a+" `"+s+"` supplied to `"+i+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")}))},shape:function(e){return h((function(t,r,o,i,a){var s=t[r],l=y(s);if("object"!==l)return new m("Invalid "+i+" `"+a+"` of type `"+l+"` supplied to `"+o+"`, expected `object`.");for(var c in e){var u=e[c];if("function"!=typeof u)return v(o,i,a,c,w(u));var d=u(s,c,o,i,a+"."+c,n);if(d)return d}return null}))},exact:function(e){return h((function(o,i,a,s,l){var c=o[i],u=y(c);if("object"!==u)return new m("Invalid "+s+" `"+l+"` of type `"+u+"` supplied to `"+a+"`, expected `object`.");var d=t({},o[i],e);for(var f in d){var p=e[f];if(r(e,f)&&"function"!=typeof p)return v(a,s,l,f,w(p));if(!p)return new m("Invalid "+s+" `"+l+"` key `"+f+"` supplied to `"+a+"`.\nBad object: "+JSON.stringify(o[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var h=p(c,f,a,s,l+"."+f,n);if(h)return h}return null}))}};function p(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function m(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function h(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,a,s,c,u,f,p){if(c=c||d,f=f||s,p!==n){if(l){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var g=c+":"+s;!t[g]&&r<3&&(i("You are manually calling a React.PropTypes validation function for the `"+f+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[g]=!0,r++)}}return null==a[s]?o?null===a[s]?new m("The "+u+" `"+f+"` is marked as required in `"+c+"`, but its value is `null`."):new m("The "+u+" `"+f+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(a,s,c,u,f)}var a=o.bind(null,!1);return a.isRequired=o.bind(null,!0),a}function g(e){return h((function(t,n,r,o,i,a){var s=t[n];return y(s)!==e?new m("Invalid "+o+" `"+i+"` of type `"+w(s)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function v(e,t,n,r,o){return new m((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function b(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(b);if(null===e||s(e))return!0;var t=function(e){var t=e&&(c&&e[c]||e[u]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!b(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!b(o[1]))return!1}return!0;default:return!1}}function y(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function w(e){if(null==e)return""+e;var t=y(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function x(e){var t=w(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return m.prototype=Error.prototype,f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},go}function No(){if(yo)return bo;yo=1;var e=So();function t(){}function n(){}return n.resetWarningCache=t,bo=function(){function r(t,n,r,o,i,a){if(a!==e){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function o(){return r}r.isRequired=r;var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i}}function Po(){if(wo)return no.exports;if(wo=1,"production"!==process.env.NODE_ENV){var e=Co();no.exports=Oo()(e.isElement,true)}else no.exports=No()();return no.exports}var ko=Po(),To=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],_o="http://www.w3.org/2000/svg",Ao="http://www.w3.org/1999/xlink",Mo=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).initialState={hasError:!1,isLoading:!0},t.state=t.initialState,t._isMounted=!1,t.reactWrapper=void 0,t.nonReactWrapper=void 0,t.refCallback=function(e){t.reactWrapper=e},t}var n,r;r=e,(n=t).prototype=Object.create(r.prototype),n.prototype.constructor=n,Fr(n,r);var o=t.prototype;return o.renderSVG=function(){var e,t=this;if(this.reactWrapper instanceof(e=this.reactWrapper,((null==e?void 0:e.ownerDocument)||document).defaultView||window).Node){var n,r,o=this.props,i=o.desc,a=o.evalScripts,s=o.httpRequestWithCredentials,l=o.renumerateIRIElements,c=o.src,u=o.title,d=o.useRequestCache,f=this.props.onError,p=this.props.beforeInjection,m=this.props.afterInjection,h=this.props.wrapper;"svg"===h?((n=document.createElementNS(_o,h)).setAttribute("xmlns",_o),n.setAttribute("xmlns:xlink",Ao),r=document.createElementNS(_o,h)):(n=document.createElement(h),r=document.createElement(h)),n.appendChild(r),r.dataset.src=c,this.nonReactWrapper=this.reactWrapper.appendChild(n);var g=function(e){t.removeSVG(),t._isMounted?t.setState((function(){return{hasError:!0,isLoading:!1}}),(function(){f(e)})):f(e)};!function(e,t){var n=void 0===t?{}:t,r=n.afterAll,o=void 0===r?function(){}:r,i=n.afterEach,a=void 0===i?function(){}:i,s=n.beforeEach,l=void 0===s?function(){}:s,c=n.cacheRequests,u=void 0===c||c,d=n.evalScripts,f=void 0===d?"never":d,p=n.httpRequestWithCredentials,m=void 0!==p&&p,h=n.renumerateIRIElements,g=void 0===h||h;if(e&&"length"in e)for(var v=0,b=0,y=e.length;b<y;b++)to(e[b],f,g,u,m,l,(function(t,n){a(t,n),e&&"length"in e&&e.length===++v&&o(v)}));else e?to(e,f,g,u,m,l,(function(t,n){a(t,n),o(1),e=null})):o(0)}(r,{afterEach:function(e,n){e?g(e):t._isMounted&&t.setState((function(){return{isLoading:!1}}),(function(){try{m(n)}catch(e){g(e)}}))},beforeEach:function(e){if(e.setAttribute("role","img"),i){var t=e.querySelector(":scope > desc");t&&e.removeChild(t);var n=document.createElement("desc");n.innerHTML=i,e.prepend(n)}if(u){var r=e.querySelector(":scope > title");r&&e.removeChild(r);var o=document.createElement("title");o.innerHTML=u,e.prepend(o)}try{p(e)}catch(e){g(e)}},cacheRequests:d,evalScripts:a,httpRequestWithCredentials:s,renumerateIRIElements:l})}},o.removeSVG=function(){var e;null!=(e=this.nonReactWrapper)&&e.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},o.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},o.componentDidUpdate=function(e){var t=this;(function(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1})(Rn({},e),this.props)&&this.setState((function(){return t.initialState}),(function(){t.removeSVG(),t.renderSVG()}))},o.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},o.render=function(){var e=this.props;e.afterInjection,e.beforeInjection,e.desc,e.evalScripts;var t=e.fallback;e.httpRequestWithCredentials;var n=e.loading;e.renumerateIRIElements,e.src,e.title,e.useRequestCache;var r=e.wrapper,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,To),i=r;return a.createElement(i,Rn({},o,{ref:this.refCallback},"svg"===r?{xmlns:_o,xmlnsXlink:Ao}:{}),this.state.isLoading&&n&&a.createElement(n,null),this.state.hasError&&t&&a.createElement(t,null))},t}(a.Component);Mo.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"},Mo.propTypes={afterInjection:ko.func,beforeInjection:ko.func,desc:ko.string,evalScripts:ko.oneOf(["always","once","never"]),fallback:ko.oneOfType([ko.func,ko.object,ko.string]),httpRequestWithCredentials:ko.bool,loading:ko.oneOfType([ko.func,ko.object,ko.string]),onError:ko.func,renumerateIRIElements:ko.bool,src:ko.string.isRequired,title:ko.string,useRequestCache:ko.bool,wrapper:ko.oneOf(["div","span","svg"])};
20
- /**
21
- * @license @tabler/icons-react v3.2.0 - MIT
22
- *
23
- * This source code is licensed under the MIT license.
24
- * See the LICENSE file in the root directory of this source tree.
25
- */
26
- var Io={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};
27
- /**
28
- * @license @tabler/icons-react v3.2.0 - MIT
29
- *
30
- * This source code is licensed under the MIT license.
31
- * See the LICENSE file in the root directory of this source tree.
32
- */const Do=(e,n,r,o)=>{const i=t.forwardRef((({color:r="currentColor",size:i=24,stroke:a=2,className:s,children:l,...c},u)=>t.createElement("svg",{ref:u,...Io[e],width:i,height:i,className:["tabler-icon",`tabler-icon-${n}`,s].join(" "),..."filled"===e?{fill:r}:{strokeWidth:a,stroke:r},...c},[...o.map((([e,n])=>t.createElement(e,n))),...Array.isArray(l)?l:[l]])));return i.displayName=`${r}`,i};
33
- /**
34
- * @license @tabler/icons-react v3.2.0 - MIT
35
- *
36
- * This source code is licensed under the MIT license.
37
- * See the LICENSE file in the root directory of this source tree.
38
- */var Lo=Do("outline","adjustments-alt","IconAdjustmentsAlt",[["path",{d:"M4 8h4v4h-4z",key:"svg-0"}],["path",{d:"M6 4l0 4",key:"svg-1"}],["path",{d:"M6 12l0 8",key:"svg-2"}],["path",{d:"M10 14h4v4h-4z",key:"svg-3"}],["path",{d:"M12 4l0 10",key:"svg-4"}],["path",{d:"M12 18l0 2",key:"svg-5"}],["path",{d:"M16 5h4v4h-4z",key:"svg-6"}],["path",{d:"M18 4l0 1",key:"svg-7"}],["path",{d:"M18 9l0 11",key:"svg-8"}]]),Fo=Do("outline","alert-circle","IconAlertCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 8v4",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]]),zo=Do("outline","arrows-sort","IconArrowsSort",[["path",{d:"M3 9l4 -4l4 4m-4 -4v14",key:"svg-0"}],["path",{d:"M21 15l-4 4l-4 -4m4 4v-14",key:"svg-1"}]]),$o=Do("outline","check","IconCheck",[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]]),Vo=Do("outline","chevron-down","IconChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]),Wo=Do("outline","chevron-left","IconChevronLeft",[["path",{d:"M15 6l-6 6l6 6",key:"svg-0"}]]),Bo=Do("outline","chevron-right","IconChevronRight",[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]]),Uo=Do("outline","chevron-up","IconChevronUp",[["path",{d:"M6 15l6 -6l6 6",key:"svg-0"}]]),Ho=Do("outline","circle-off","IconCircleOff",[["path",{d:"M20.042 16.045a9 9 0 0 0 -12.087 -12.087m-2.318 1.677a9 9 0 1 0 12.725 12.73",key:"svg-0"}],["path",{d:"M3 3l18 18",key:"svg-1"}]]),qo=Do("outline","circle-x","IconCircleX",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M10 10l4 4m0 -4l-4 4",key:"svg-1"}]]),Go=Do("outline","circle","IconCircle",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}]]),Ko=Do("outline","columns-1","IconColumns1",[["path",{d:"M5 3m0 1a1 1 0 0 1 1 -1h12a1 1 0 0 1 1 1v16a1 1 0 0 1 -1 1h-12a1 1 0 0 1 -1 -1z",key:"svg-0"}]]),Xo=Do("outline","columns-2","IconColumns2",[["path",{d:"M3 3m0 1a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v16a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1zm9 -1v18",key:"svg-0"}]]),Yo=Do("outline","columns-3","IconColumns3",[["path",{d:"M3 3m0 1a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v16a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1zm6 -1v18m6 -18v18",key:"svg-0"}]]),Zo=Do("outline","currency-dollar","IconCurrencyDollar",[["path",{d:"M16.7 8a3 3 0 0 0 -2.7 -2h-4a3 3 0 0 0 0 6h4a3 3 0 0 1 0 6h-4a3 3 0 0 1 -2.7 -2",key:"svg-0"}],["path",{d:"M12 3v3m0 12v3",key:"svg-1"}]]),Jo=Do("outline","eye-off","IconEyeOff",[["path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828",key:"svg-0"}],["path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}]]),Qo=Do("outline","info-circle","IconInfoCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 9h.01",key:"svg-1"}],["path",{d:"M11 12h1v4h1",key:"svg-2"}]]),ei=Do("outline","loader-2","IconLoader2",[["path",{d:"M12 3a9 9 0 1 0 9 9",key:"svg-0"}]]),ti=Do("outline","map-pin","IconMapPin",[["path",{d:"M9 11a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-0"}],["path",{d:"M17.657 16.657l-4.243 4.243a2 2 0 0 1 -2.827 0l-4.244 -4.243a8 8 0 1 1 11.314 0z",key:"svg-1"}]]),ni=Do("outline","minus","IconMinus",[["path",{d:"M5 12l14 0",key:"svg-0"}]]),ri=Do("outline","mood-sad","IconMoodSad",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 10l.01 0",key:"svg-1"}],["path",{d:"M15 10l.01 0",key:"svg-2"}],["path",{d:"M9.5 15.25a3.5 3.5 0 0 1 5 0",key:"svg-3"}]]),oi=Do("outline","pencil-minus","IconPencilMinus",[["path",{d:"M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4",key:"svg-0"}],["path",{d:"M13.5 6.5l4 4",key:"svg-1"}],["path",{d:"M16 19h6",key:"svg-2"}]]),ii=Do("outline","plus","IconPlus",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]]),ai=Do("outline","repeat","IconRepeat",[["path",{d:"M4 12v-3a3 3 0 0 1 3 -3h13m-3 -3l3 3l-3 3",key:"svg-0"}],["path",{d:"M20 12v3a3 3 0 0 1 -3 3h-13m3 3l-3 -3l3 -3",key:"svg-1"}]]),si=Do("outline","search","IconSearch",[["path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]]),li=Do("outline","shopping-bag-plus","IconShoppingBagPlus",[["path",{d:"M12.5 21h-3.926a3 3 0 0 1 -2.965 -2.544l-1.255 -8.152a2 2 0 0 1 1.977 -2.304h11.339a2 2 0 0 1 1.977 2.304l-.263 1.708",key:"svg-0"}],["path",{d:"M16 19h6",key:"svg-1"}],["path",{d:"M19 16v6",key:"svg-2"}],["path",{d:"M9 11v-5a3 3 0 0 1 6 0v5",key:"svg-3"}]]),ci=Do("outline","shopping-bag","IconShoppingBag",[["path",{d:"M6.331 8h11.339a2 2 0 0 1 1.977 2.304l-1.255 8.152a3 3 0 0 1 -2.966 2.544h-6.852a3 3 0 0 1 -2.965 -2.544l-1.255 -8.152a2 2 0 0 1 1.977 -2.304z",key:"svg-0"}],["path",{d:"M9 11v-5a3 3 0 0 1 6 0v5",key:"svg-1"}]]),ui=Do("outline","shopping-cart-off","IconShoppingCartOff",[["path",{d:"M6 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-0"}],["path",{d:"M17 17a2 2 0 1 0 2 2",key:"svg-1"}],["path",{d:"M17 17h-11v-11",key:"svg-2"}],["path",{d:"M9.239 5.231l10.761 .769l-1 7h-2m-4 0h-7",key:"svg-3"}],["path",{d:"M3 3l18 18",key:"svg-4"}]]),di=Do("outline","square-check","IconSquareCheck",[["path",{d:"M3 3m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M9 12l2 2l4 -4",key:"svg-1"}]]),fi=Do("outline","square-off","IconSquareOff",[["path",{d:"M8 4h10a2 2 0 0 1 2 2v10m-.584 3.412a2 2 0 0 1 -1.416 .588h-12a2 2 0 0 1 -2 -2v-12c0 -.552 .224 -1.052 .586 -1.414",key:"svg-0"}],["path",{d:"M3 3l18 18",key:"svg-1"}]]),pi=Do("outline","square-x","IconSquareX",[["path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z",key:"svg-0"}],["path",{d:"M9 9l6 6m0 -6l-6 6",key:"svg-1"}]]),mi=Do("outline","square","IconSquare",[["path",{d:"M3 3m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z",key:"svg-0"}]]),hi=Do("outline","trash","IconTrash",[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]]),gi=Do("outline","upload","IconUpload",[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 9l5 -5l5 5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]]),vi=Do("outline","x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]),bi=Do("filled","circle-dot-filled","IconCircleDotFilled",[["path",{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-5 6.66a2 2 0 0 0 -1.977 1.697l-.018 .154l-.005 .149l.005 .15a2 2 0 1 0 1.995 -2.15z",key:"svg-0"}]]),yi=Do("filled","heart-filled","IconHeartFilled",[["path",{d:"M6.979 3.074a6 6 0 0 1 4.988 1.425l.037 .033l.034 -.03a6 6 0 0 1 4.733 -1.44l.246 .036a6 6 0 0 1 3.364 10.008l-.18 .185l-.048 .041l-7.45 7.379a1 1 0 0 1 -1.313 .082l-.094 -.082l-7.493 -7.422a6 6 0 0 1 3.176 -10.215z",key:"svg-0"}]]),wi=Do("filled","shield-check-filled","IconShieldCheckFilled",[["path",{d:"M11.998 2l.118 .007l.059 .008l.061 .013l.111 .034a.993 .993 0 0 1 .217 .112l.104 .082l.255 .218a11 11 0 0 0 7.189 2.537l.342 -.01a1 1 0 0 1 1.005 .717a13 13 0 0 1 -9.208 16.25a1 1 0 0 1 -.502 0a13 13 0 0 1 -9.209 -16.25a1 1 0 0 1 1.005 -.717a11 11 0 0 0 7.531 -2.527l.263 -.225l.096 -.075a.993 .993 0 0 1 .217 -.112l.112 -.034a.97 .97 0 0 1 .119 -.021l.115 -.007zm3.71 7.293a1 1 0 0 0 -1.415 0l-3.293 3.292l-1.293 -1.292l-.094 -.083a1 1 0 0 0 -1.32 1.497l2 2l.094 .083a1 1 0 0 0 1.32 -.083l4 -4l.083 -.094a1 1 0 0 0 -.083 -1.32z",key:"svg-0"}]]),xi=Do("filled","square-x-filled","IconSquareXFilled",[["path",{d:"M19 2h-14a3 3 0 0 0 -3 3v14a3 3 0 0 0 3 3h14a3 3 0 0 0 3 -3v-14a3 3 0 0 0 -3 -3zm-9.387 6.21l.094 .083l2.293 2.292l2.293 -2.292a1 1 0 0 1 1.497 1.32l-.083 .094l-2.292 2.293l2.292 2.293a1 1 0 0 1 -1.32 1.497l-.094 -.083l-2.293 -2.292l-2.293 2.292a1 1 0 0 1 -1.497 -1.32l.083 -.094l2.292 -2.293l-2.292 -2.293a1 1 0 0 1 1.32 -1.497z",key:"svg-0"}]]),Ci=Do("filled","star-filled","IconStarFilled",[["path",{d:"M8.243 7.34l-6.38 .925l-.113 .023a1 1 0 0 0 -.44 1.684l4.622 4.499l-1.09 6.355l-.013 .11a1 1 0 0 0 1.464 .944l5.706 -3l5.693 3l.1 .046a1 1 0 0 0 1.352 -1.1l-1.091 -6.355l4.624 -4.5l.078 -.085a1 1 0 0 0 -.633 -1.62l-6.38 -.926l-2.852 -5.78a1 1 0 0 0 -1.794 0l-2.853 5.78z",key:"svg-0"}]]);
39
- /**
40
- * @license @tabler/icons-react v3.2.0 - MIT
41
- *
42
- * This source code is licensed under the MIT license.
43
- * See the LICENSE file in the root directory of this source tree.
44
- */const Ei=Q("inline-flex items-center justify-center text-sm font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none ring-offset-background",{variants:{size:{xs:"h-4 w-4",sm:"h-5 w-5",md:"h-6 w-6",lg:"h-14 w-14"},color:ne},defaultVariants:{size:"md"}}),Si={xs:1.5,sm:2,md:2,lg:""},ji={xs:16,sm:20,md:24,lg:56},Ri={minus:ni,plus:ii,"adjustments-alt":Lo,"arrows-sort":zo,"alert-circle":Fo,"circle-x":qo,"info-circle":Qo,check:$o,"square-off":fi,"map-pin":ti,repeat:ai,square:mi,"square-check":di,"chevron-up":Uo,"chevron-right":Bo,"chevron-left":Wo,"eye-off":Jo,"square-x":pi,circle:Go,"chevron-down":Vo,"heart-filled":yi,"menu-icon-heart":yi,upload:gi,"currency-dollar":Zo,x:vi,"circle-off":Ho,"circle-dot-filled":bi,"mood-sad":ri,"square-x-filled":xi,trash:hi,loader:ei,"columns-1":Ko,"columns-2":Xo,"columns-3":Yo,search:si,"shopping-cart-off":ui,"star-filled":Ci,"shopping-bag":ci,"shopping-bag-plus":li,"shield-check-filled":wi},Oi=({name:e,size:t})=>{const n=Ri[e];return n?r.jsx(n,{size:ji[t],strokeWidth:Si[t]}):null},Ni=({url:e,size:t,color:n,fillColor:o,strokeColor:i})=>r.jsx(Mo,{src:e,beforeInjection:e=>{e.setAttribute("style",`width: ${ji[t]}px; height: ${ji[t]}px`);e.querySelectorAll("path").forEach((e=>{n&&(e.hasAttribute("fill")&&e.setAttribute("fill",n),e.hasAttribute("stroke")&&e.setAttribute("stroke",n)),e.hasAttribute("stroke")&&e.setAttribute("stroke-width",Si[t].toString()),o&&e.setAttribute("fill",o),i&&e.setAttribute("stroke",i)}))}});function Pi(e){var{className:t,name:n,size:o="md",color:i,url:a,fillColor:s,strokeColor:l}=e,c=de(e,["className","name","size","color","url","fillColor","strokeColor"]);return r.jsxs("div",Object.assign({className:ee(Ei({size:o,color:i,className:t}))},c,{children:[a?r.jsx(Ni,{url:a,size:o,color:i,fillColor:s,strokeColor:l}):r.jsx(Oi,{name:n,size:o}),c.children]}))}const ki=Ar,Ti=a.forwardRef(((e,t)=>{var{className:n}=e,o=de(e,["className"]);return r.jsx(Mr,Object.assign({ref:t,className:ee("border-t border-coreColors-dividingLines",n)},o))}));Ti.displayName="AccordionItem";const _i=a.forwardRef(((e,t)=>{var{className:n,children:o,showDefaultIcon:i=!0}=e,a=de(e,["className","children","showDefaultIcon"]);return r.jsx(Ir,Object.assign({className:"flex"},{children:r.jsxs(Dr,Object.assign({ref:t,className:ee("px-4 flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]_svg]:rotate-180 active:opacity-70",n)},a,{children:[o,i&&r.jsx(Pi,{name:"chevron-down",size:"sm",className:"text-coreColors-secondaryIcon shrink-0 transition-transform duration-200"})]}))}))}));_i.displayName=Dr.displayName;const Ai=a.forwardRef(((e,t)=>{var{className:n,children:o}=e,i=de(e,["className","children"]);return r.jsx(Lr,Object.assign({ref:t,className:"px-4 overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"},i,{children:r.jsx("div",Object.assign({className:ee("pb-4 pt-0",n)},{children:o}))}))}));Ai.displayName=Lr.displayName;const Mi=t.forwardRef(((e,n)=>{const{ratio:r=1,style:o,...i}=e;return t.createElement("div",{style:{position:"relative",width:"100%",paddingBottom:100/r+"%"},"data-radix-aspect-ratio-wrapper":""},t.createElement($n.div,Rn({},i,{ref:n,style:{...o,position:"absolute",top:0,right:0,bottom:0,left:0}})))})),Ii=Q("",{variants:{type:{h1:"text-[23px] font-fontRegular leading-[130%] font-normal text-textColors-primaryColor",h2:"text-lg font-fontRegular leading-[130%] font-medium text-textColors-primaryColor","body-primary":"text-[14px] font-fontRegular leading-[160%] font-normal text-textColors-primaryColor","body-secondary":"text-[12px] font-fontRegular leading-[130%] font-normal text-textColors-secondaryColor",label:"text-[10px] font-fontRegular leading-[130%] font-normal text-textColors-secondaryColor"}},defaultVariants:{type:"body-primary"}});function Di(e){var{className:t,type:n,fontColor:o}=e,i=de(e,["className","type","fontColor"]);const a=o?{color:o}:{};return r.jsx("p",Object.assign({className:ee(Ii({type:n}),t),style:a},i))}const Li=Q("inline-flex items-center justify-center gap-1 py-1 px-2 text-productBadging-text bg-productBadging-fill focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{alignment:{start:"",end:"",center:"w-full"},cornerRadius:{rounded:"",square:"",circle:""}},defaultVariants:{cornerRadius:"rounded",alignment:"start"},compoundVariants:[{alignment:"start",cornerRadius:"rounded",class:"rounded-tr rounded-br"},{alignment:"end",cornerRadius:"rounded",class:"rounded-tl rounded-bl"},{alignment:"center",cornerRadius:"rounded",class:"rounded"},{alignment:"start",cornerRadius:"circle",class:"rounded-tr-2xl rounded-br-2xl"},{alignment:"end",cornerRadius:"circle",class:"rounded-tl-2xl rounded-bl-2xl"},{alignment:"center",cornerRadius:"circle",class:"rounded-2xl"}]});function Fi(e){var{className:t,icon:n,iconUrl:o,alignment:i,cornerRadius:a="rounded",type:s="icon-and-text",size:l="plp-layout",backgroundColor:c,fontColor:u}=e,d=de(e,["className","icon","iconUrl","alignment","cornerRadius","type","size","backgroundColor","fontColor"]);const f=c?{backgroundColor:c}:{},p=()=>r.jsx(Di,Object.assign({type:"plp-layout"===l?"body-primary":"body-secondary",className:"text-productBadging-text",fontColor:u},{children:d.children}));return r.jsx("div",Object.assign({className:ee(Li({alignment:i,cornerRadius:a}),t),style:f},d,{children:"icon-and-text"===s?r.jsxs(r.Fragment,{children:[(n||o)&&r.jsx(Pi,{name:n,url:o,strokeColor:u,fillColor:u,size:"carousels"===l?"xs":"sm"}),r.jsx(p,{})]}):"icon-only"===s&&n?r.jsx(Pi,{name:n,url:o,strokeColor:u,fillColor:u,size:"carousels"===l?"xs":"sm"}):r.jsx(p,{})}))}const zi=Q("w-full flex rounded items-center justify-center transition-colors disabled:bg-stateColors-disabled disabled:border-stateColors-disabled disabled:pointer-events-none ring-offset-background overflow-elipse whitespace-nowrap truncate active:opacity-70 disabled:opacity-70",{variants:{size:{default:"py-3 px-4",sm:"px-3 rounded-md",lg:"px-8 rounded-md",icon:"p-3 w-auto",content:"py-3 px-4 w-auto"},variant:{default:"bg-buttonColors-primaryFill border border-buttonColors-primaryOutlineColor shadow-primary",destructive:"bg-stateColors-error disabled:bg-stateColors-disabled shadow-buttonColors-primaryShadow",outline:"border border-input hover:bg-accent",secondary:"bg-buttonColors-secondaryFill border border-buttonColors-secondaryOutlineColor disabled:bg-buttonColors-secondaryFill disabled:text-stateColors-disabled shadow-secondary",ghost:"hover:bg-accent",link:"underline-offset-4 hover:underline disabled:text-stateColors-disabled disabled:bg-transparent",quickadd:"bg-buttonColors-primaryFill w-full rounded-none rounded-b-lg h-8 border border-buttonColors-primaryOutlineColor py-2",applePay:"bg-white border border-black",shopPay:"bg-[#612EFF]"}},defaultVariants:{variant:"default",size:"default"}}),$i=Q("",{variants:{variant:{default:"text-buttonColors-primaryText",destructive:"text-coreColors-pageColor",outline:"hover:text-accent-foreground",secondary:"text-buttonColors-secondaryText",ghost:"hover:text-accent-foreground",link:"text-textColors-primaryColor",quickadd:"text-buttonColors-primaryText",applePay:"text-black",shopPay:""}},defaultVariants:{variant:"default"}}),Vi=Q("truncate",{variants:{variant:{default:"text-buttonColors-primaryText",destructive:"text-coreColors-pageColor",outline:"hover:text-accent-foreground",secondary:"text-buttonColors-secondaryText",ghost:"hover:text-accent-foreground",link:"text-textColors-primaryColor",quickadd:"text-buttonColors-primaryText text-xs",applePay:"text-black border",shopPay:""}},defaultVariants:{variant:"default"}}),Wi=a.forwardRef(((e,t)=>{var{className:n,labelClassName:o,labelStyle:i,variant:s,size:l,asChild:c=!1,loading:u,icon:d,iconColor:f,iconStrokeColor:p,iconPosition:m,iconSize:h,iconUrl:g}=e,v=de(e,["className","labelClassName","labelStyle","variant","size","asChild","loading","icon","iconColor","iconStrokeColor","iconPosition","iconSize","iconUrl"]);const b=c?Tn:"button";return r.jsx(b,Object.assign({className:ee(zi({variant:s,size:l}),n,{"pointer-events-none":u,"flex-row-reverse":(d||g)&&"right"===m}),ref:t},v,{children:u?r.jsx((()=>r.jsx("div",Object.assign({className:ee("flex items-center justify-center","icon"===l?"h-5":"h-6")},{children:r.jsx(Pi,{className:ee($i({variant:s}),"h-5 w-5 animate-spin"),name:"loader",style:{color:f}})}))),{}):"object"==typeof v.children&&a.isValidElement(v.children)?v.children:"icon"===l?r.jsx((()=>d||g?r.jsx(Pi,{name:d,size:"sm",style:{color:f}}):null),{}):r.jsx((()=>r.jsxs(r.Fragment,{children:[d||g?r.jsx(Pi,{name:g?void 0:d,url:g,size:h||"quickadd"===s?"xs":"sm",className:ee($i({variant:s}),{"mr-2":"right"!==m}),strokeColor:p,style:{color:f}}):null,u?r.jsx(r.Fragment,{}):r.jsx(Di,Object.assign({type:"body-primary",className:ee(Vi({variant:s}),o),style:i},{children:v.children}))]})),{})}))}));Wi.displayName="Button";function Bi(e){return function(e){return"[object Object]"===Object.prototype.toString.call(e)}(e)||Array.isArray(e)}function Ui(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;return JSON.stringify(Object.keys(e.breakpoints||{}))===JSON.stringify(Object.keys(t.breakpoints||{}))&&n.every((n=>{const r=e[n],o=t[n];return"function"==typeof r?`${r}`==`${o}`:Bi(r)&&Bi(o)?Ui(r,o):r===o}))}function Hi(e){return e.concat().sort(((e,t)=>e.name>t.name?1:-1)).map((e=>e.options))}function qi(e){return"number"==typeof e}function Gi(e){return"string"==typeof e}function Ki(e){return"boolean"==typeof e}function Xi(e){return"[object Object]"===Object.prototype.toString.call(e)}function Yi(e){return Math.abs(e)}function Zi(e){return Math.sign(e)}function Ji(e,t){return Yi(e-t)}function Qi(e){return oa(e).map(Number)}function ea(e){return e[ta(e)]}function ta(e){return Math.max(0,e.length-1)}function na(e,t){return t===ta(e)}function ra(e,t=0){return Array.from(Array(e),((e,n)=>t+n))}function oa(e){return Object.keys(e)}function ia(e,t){return[e,t].reduce(((e,t)=>(oa(t).forEach((n=>{const r=e[n],o=t[n],i=Xi(r)&&Xi(o);e[n]=i?ia(r,o):o})),e)),{})}function aa(e,t){return void 0!==t.MouseEvent&&e instanceof t.MouseEvent}function sa(){let e=[];const t={add:function(n,r,o,i={passive:!0}){let a;if("addEventListener"in n)n.addEventListener(r,o,i),a=()=>n.removeEventListener(r,o,i);else{const e=n;e.addListener(o),a=()=>e.removeListener(o)}return e.push(a),t},clear:function(){e=e.filter((e=>e()))}};return t}function la(e,t,n,r){const o=sa(),i=1e3/60;let a=null,s=0,l=0;function c(e){if(!l)return;a||(a=e);const o=e-a;for(a=e,s+=o;s>=i;)n(),s-=i;const u=Yi(s/i);r(u),l&&t.requestAnimationFrame(c)}function u(){t.cancelAnimationFrame(l),a=null,s=0,l=0}return{init:function(){o.add(e,"visibilitychange",(()=>{e.hidden&&(a=null,s=0)}))},destroy:function(){u(),o.clear()},start:function(){l||(l=t.requestAnimationFrame(c))},stop:u,update:n,render:r}}function ca(e=0,t=0){const n=Yi(e-t);function r(t){return t<e}function o(e){return e>t}function i(e){return r(e)||o(e)}return{length:n,max:t,min:e,constrain:function(n){return i(n)?r(n)?e:t:n},reachedAny:i,reachedMax:o,reachedMin:r,removeOffset:function(e){return n?e-n*Math.ceil((e-t)/n):e}}}function ua(e,t,n){const{constrain:r}=ca(0,e),o=e+1;let i=a(t);function a(e){return n?Yi((o+e)%o):r(e)}function s(){return i}function l(){return ua(e,s(),n)}const c={get:s,set:function(e){return i=a(e),c},add:function(e){return l().set(s()+e)},clone:l};return c}function da(e,t,n,r,o,i,a,s,l,c,u,d,f,p,m,h,g,v,b){const{cross:y,direction:w}=e,x=["INPUT","SELECT","TEXTAREA"],C={passive:!1},E=sa(),S=sa(),j=ca(50,225).constrain(p.measure(20)),R={mouse:300,touch:400},O={mouse:500,touch:600},N=m?43:25;let P=!1,k=0,T=0,_=!1,A=!1,M=!1,I=!1;function D(e){const t=i.readPoint(e),n=i.readPoint(e,y),r=Ji(t,k),a=Ji(n,T);if(!A&&!I){if(!e.cancelable)return L(e);if(A=r>a,!A)return L(e)}const l=i.pointerMove(e);r>h&&(M=!0),c.useFriction(.3).useDuration(1),s.start(),o.add(w(l)),e.preventDefault()}function L(e){const t=u.byDistance(0,!1).index!==d.get(),n=i.pointerUp(e)*(m?O:R)[I?"mouse":"touch"],r=function(e,t){const n=d.add(-1*Zi(e)),r=u.byDistance(e,!m).distance;return m||Yi(e)<j?r:g&&t?.5*r:u.byIndex(n.get(),0).distance}(w(n),t),o=function(e,t){if(0===e||0===t)return 0;if(Yi(e)<=Yi(t))return 0;const n=Ji(Yi(e),Yi(t));return Yi(n/e)}(n,r),a=N-10*o,s=v+o/50;A=!1,_=!1,S.clear(),c.useDuration(a).useFriction(s),l.distance(r,!m),I=!1,f.emit("pointerUp")}function F(e){M&&(e.stopPropagation(),e.preventDefault(),M=!1)}return{init:function(e){if(!b)return;function s(s){(Ki(b)||b(e,s))&&function(e){const s=aa(e,r);if(I=s,M=m&&s&&!e.buttons&&P,P=Ji(o.get(),a.get())>=2,s&&0!==e.button)return;if(function(e){const t=e.nodeName||"";return x.includes(t)}(e.target))return;_=!0,i.pointerDown(e),c.useFriction(0).useDuration(0),o.set(a),function(){const e=I?n:t;S.add(e,"touchmove",D,C).add(e,"touchend",L).add(e,"mousemove",D,C).add(e,"mouseup",L)}(),k=i.readPoint(e),T=i.readPoint(e,y),f.emit("pointerDown")}(s)}const l=t;E.add(l,"dragstart",(e=>e.preventDefault()),C).add(l,"touchmove",(()=>{}),C).add(l,"touchend",(()=>{})).add(l,"touchstart",s).add(l,"mousedown",s).add(l,"touchcancel",L).add(l,"contextmenu",L).add(l,"click",F,!0)},pointerDown:function(){return _},destroy:function(){E.clear(),S.clear()}}}function fa(e,t){let n,r;function o(e){return e.timeStamp}function i(n,r){const o="client"+("x"===(r||e.scroll)?"X":"Y");return(aa(n,t)?n:n.touches[0])[o]}return{pointerDown:function(e){return n=e,r=e,i(e)},pointerMove:function(e){const t=i(e)-i(r),a=o(e)-o(n)>170;return r=e,a&&(n=e),t},pointerUp:function(e){if(!n||!r)return 0;const t=i(r)-i(n),a=o(e)-o(n),s=o(e)-o(r)>170,l=t/a;return a&&!s&&Yi(l)>.1?l:0},readPoint:i}}function pa(e,t,n,r,o,i,a){let s,l,c=[],u=!1;function d(e){return o.measureSize(a.measure(e))}return{init:function(o){if(!i)return;l=d(e),c=r.map(d),s=new ResizeObserver((a=>{u||(Ki(i)||i(o,a))&&function(i){for(const a of i){const i=a.target===e,s=r.indexOf(a.target),u=i?l:c[s];if(Yi(d(i?e:r[s])-u)>=.5){n.requestAnimationFrame((()=>{o.reInit(),t.emit("resize")}));break}}}(a)})),[e].concat(r).forEach((e=>s.observe(e)))},destroy:function(){s&&s.disconnect(),u=!0}}}function ma(e,t,n,r,o){const i=o.measure(10),a=o.measure(50),s=ca(.1,.99);let l=!1;return{constrain:function(o){if(l||!e.reachedAny(n.get())||!e.reachedAny(t.get()))return;const c=e.reachedMin(t.get())?"min":"max",u=Yi(e[c]-t.get()),d=n.get()-t.get(),f=s.constrain(u/a);n.subtract(d*f),!o&&Yi(d)<i&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())},toggleActive:function(e){l=!e}}}function ha(e,t,n,r){const o=t.min+.1,i=t.max+.1,{reachedMin:a,reachedMax:s}=ca(o,i);return{loop:function(t){if(!function(e){return 1===e?s(n.get()):-1===e&&a(n.get())}(t))return;const o=e*(-1*t);r.forEach((e=>e.add(o)))}}}function ga(e,t,n,r,o){const{reachedAny:i,removeOffset:a,constrain:s}=r;function l(e){return e.concat().sort(((e,t)=>Yi(e)-Yi(t)))[0]}function c(t,r){const o=[t,t+n,t-n];if(!e)return o[0];if(!r)return l(o);const i=o.filter((e=>Zi(e)===r));return i.length?l(i):ea(o)-n}const u={byDistance:function(n,r){const l=o.get()+n,{index:u,distance:d}=function(n){const r=e?a(n):s(n),o=t.map(((e,t)=>({diff:c(e-r,0),index:t}))).sort(((e,t)=>Yi(e.diff)-Yi(t.diff))),{index:i}=o[0];return{index:i,distance:r}}(l),f=!e&&i(l);return!r||f?{index:u,distance:n}:{index:u,distance:n+c(t[u]-d,0)}},byIndex:function(e,n){return{index:e,distance:c(t[e]-o.get(),n)}},shortcut:c};return u}function va(e){let t=e;function n(e){return qi(e)?e:e.get()}return{get:function(){return t},set:function(e){t=n(e)},add:function(e){t+=n(e)},subtract:function(e){t-=n(e)}}}function ba(e,t){const n="x"===e.scroll?function(e){return`translate3d(${e}px,0px,0px)`}:function(e){return`translate3d(0px,${e}px,0px)`},r=t.style;let o=!1;return{clear:function(){o||(r.transform="",t.getAttribute("style")||t.removeAttribute("style"))},to:function(t){o||(r.transform=n(e.direction(t)))},toggleActive:function(e){o=!e}}}function ya(e,t,n,r,o,i,a,s,l){const c=.5,u=Qi(o),d=Qi(o).reverse(),f=function(){const e=a[0];return h(m(d,e),n,!1)}().concat(function(){const e=t-a[0]-1;return h(m(u,e),-n,!0)}());function p(e,t){return e.reduce(((e,t)=>e-o[t]),t)}function m(e,t){return e.reduce(((e,n)=>p(e,t)>0?e.concat([n]):e),[])}function h(o,a,u){const d=function(e){return i.map(((n,o)=>({start:n-r[o]+c+e,end:n+t-c+e})))}(a);return o.map((t=>{const r=u?0:-n,o=u?n:0,i=u?"end":"start",a=d[t][i];return{index:t,loopPoint:a,slideLocation:va(-1),translate:ba(e,l[t]),target:()=>s.get()>a?r:o}}))}const g={canLoop:function(){return f.every((({index:e})=>p(u.filter((t=>t!==e)),t)<=.1))},clear:function(){f.forEach((e=>e.translate.clear()))},loop:function(){f.forEach((e=>{const{target:t,translate:n,slideLocation:r}=e,o=t();o!==r.get()&&(n.to(o),r.set(o))}))},loopPoints:f};return g}function wa(e,t,n){let r,o=!1;return{init:function(i){n&&(r=new MutationObserver((e=>{o||(Ki(n)||n(i,e))&&function(e){for(const n of e)if("childList"===n.type){i.reInit(),t.emit("slidesChanged");break}}(e)})),r.observe(e,{childList:!0}))},destroy:function(){r&&r.disconnect(),o=!0}}}function xa(e,t,n,r){const o={};let i,a=null,s=null,l=!1;const c={init:function(){i=new IntersectionObserver((e=>{l||(e.forEach((e=>{const n=t.indexOf(e.target);o[n]=e})),a=null,s=null,n.emit("slidesInView"))}),{root:e.parentElement,threshold:r}),t.forEach((e=>i.observe(e)))},destroy:function(){i&&i.disconnect(),l=!0},get:function(e=!0){if(e&&a)return a;if(!e&&s)return s;const t=function(e){return oa(o).reduce(((t,n)=>{const r=parseInt(n),{isIntersecting:i}=o[r];return(e&&i||!e&&!i)&&t.push(r),t}),[])}(e);return e&&(a=t),e||(s=t),t}};return c}function Ca(e,t,n,r,o,i,a,s,l){const{startEdge:c,endEdge:u,direction:d}=e,f=qi(n);const p={groupSlides:function(e){return f?function(e,t){return Qi(e).filter((e=>e%t==0)).map((n=>e.slice(n,n+t)))}(e,n):function(e){return e.length?Qi(e).reduce(((n,f,p)=>{const m=ea(n)||0,h=0===m,g=f===ta(e),v=o[c]-i[m][c],b=o[c]-i[f][u],y=!r&&h?d(a):0,w=Yi(b-(!r&&g?d(s):0)-(v+y));return p&&w>t+l&&n.push(f),g&&n.push(e.length),n}),[]).map(((t,n,r)=>{const o=Math.max(r[n-1]||0);return e.slice(o,t)})):[]}(e)}};return p}function Ea(e,t,n,r,o,i,a){const{align:s,axis:l,direction:c,startIndex:u,loop:d,duration:f,dragFree:p,dragThreshold:m,inViewThreshold:h,slidesToScroll:g,skipSnaps:v,containScroll:b,watchResize:y,watchSlides:w,watchDrag:x}=i,C={measure:function(e){const{offsetTop:t,offsetLeft:n,offsetWidth:r,offsetHeight:o}=e;return{top:t,right:n+r,bottom:t+o,left:n,width:r,height:o}}},E=C.measure(t),S=n.map(C.measure),j=function(e,t){const n="rtl"===t,r="y"===e,o=!r&&n?-1:1;return{scroll:r?"y":"x",cross:r?"x":"y",startEdge:r?"top":n?"right":"left",endEdge:r?"bottom":n?"left":"right",measureSize:function(e){const{height:t,width:n}=e;return r?t:n},direction:function(e){return e*o}}}(l,c),R=j.measureSize(E),O=function(e){return{measure:function(t){return e*(t/100)}}}(R),N=function(e,t){const n={start:function(){return 0},center:function(e){return r(e)/2},end:r};function r(e){return t-e}const o={measure:function(r,o){return Gi(e)?n[e](r):e(t,r,o)}};return o}(s,R),P=!d&&!!b,k=d||!!b,{slideSizes:T,slideSizesWithGaps:_,startGap:A,endGap:M}=function(e,t,n,r,o,i){const{measureSize:a,startEdge:s,endEdge:l}=e,c=n[0]&&o,u=function(){if(!c)return 0;const e=n[0];return Yi(t[s]-e[s])}(),d=function(){if(!c)return 0;const e=i.getComputedStyle(ea(r));return parseFloat(e.getPropertyValue(`margin-${l}`))}(),f=n.map(a),p=n.map(((e,t,n)=>{const r=!t,o=na(n,t);return r?f[t]+u:o?f[t]+d:n[t+1][s]-e[s]})).map(Yi);return{slideSizes:f,slideSizesWithGaps:p,startGap:u,endGap:d}}(j,E,S,n,k,o),I=Ca(j,R,g,d,E,S,A,M,2),{snaps:D,snapsAligned:L}=function(e,t,n,r,o){const{startEdge:i,endEdge:a}=e,{groupSlides:s}=o,l=s(r).map((e=>ea(e)[a]-e[0][i])).map(Yi).map(t.measure),c=r.map((e=>n[i]-e[i])).map((e=>-Yi(e))),u=s(c).map((e=>e[0])).map(((e,t)=>e+l[t]));return{snaps:c,snapsAligned:u}}(j,N,E,S,I),F=-ea(D)+ea(_),{snapsContained:z,scrollContainLimit:$}=function(e,t,n,r,o){const i=ca(-t+e,0),a=n.map(((e,t)=>{const{min:r,max:o}=i,a=i.constrain(e),s=!t,l=na(n,t);return s?o:l||c(r,a)?r:c(o,a)?o:a})).map((e=>parseFloat(e.toFixed(3)))),s=function(){const e=a[0],t=ea(a);return ca(a.lastIndexOf(e),a.indexOf(t)+1)}(),l=function(){if(t<=e+o)return[i.max];if("keepSnaps"===r)return a;const{min:n,max:l}=s;return a.slice(n,l)}();function c(e,t){return Ji(e,t)<1}return{snapsContained:l,scrollContainLimit:s}}(R,F,L,b,2),V=P?z:L,{limit:W}=function(e,t,n){const r=t[0];return{limit:ca(n?r-e:ea(t),r)}}(F,V,d),B=ua(ta(V),u,d),U=B.clone(),H=Qi(n),q=la(r,o,(()=>(({dragHandler:e,scrollBody:t,scrollBounds:n,options:{loop:r}})=>{r||n.constrain(e.pointerDown()),t.seek()})(ie)),(e=>(({scrollBody:e,translate:t,location:n,offsetLocation:r,scrollLooper:o,slideLooper:i,dragHandler:a,animation:s,eventHandler:l,options:{loop:c}},u)=>{const d=e.velocity(),f=e.settled();f&&!a.pointerDown()&&(s.stop(),l.emit("settle")),f||l.emit("scroll"),r.set(n.get()-d+d*u),c&&(o.loop(e.direction()),i.loop()),t.to(r.get())})(ie,e))),G=V[B.get()],K=va(G),X=va(G),Y=va(G),Z=function(e,t,n,r,o){let i=0,a=0,s=r,l=o,c=e.get(),u=0;function d(e){return s=e,p}function f(e){return l=e,p}const p={direction:function(){return a},duration:function(){return s},velocity:function(){return i},seek:function(){const t=n.get()-e.get();let r=0;return s?(i+=t/s,i*=l,c+=i,e.add(i),r=c-u):(i=0,e.set(n),r=t),a=Zi(r),u=c,p},settled:function(){return Yi(n.get()-t.get())<.001},useBaseFriction:function(){return f(o)},useBaseDuration:function(){return d(r)},useFriction:f,useDuration:d};return p}(K,X,Y,f,.68),J=ga(d,V,F,W,Y),Q=function(e,t,n,r,o,i,a){function s(o){const s=o.distance,l=o.index!==t.get();i.add(s),s&&(r.duration()?e.start():(e.update(),e.render(1),e.update())),l&&(n.set(t.get()),t.set(o.index),a.emit("select"))}return{distance:function(e,t){s(o.byDistance(e,t))},index:function(e,n){const r=t.clone().set(e);s(o.byIndex(r.get(),n))}}}(q,B,U,Z,J,Y,a),ee=function(e){const{max:t,length:n}=e;return{get:function(e){return n?(e-t)/-n:0}}}(W),te=sa(),ne=xa(t,n,a,h),{slideRegistry:re}=function(e,t,n,r,o,i){const{groupSlides:a}=o,{min:s,max:l}=r,c=function(){const r=a(i),o=!e||"keepSnaps"===t;return 1===n.length?[i]:o?r:r.slice(s,l).map(((e,t,n)=>{const r=!t,o=na(n,t);return r?ra(ea(n[0])+1):o?ra(ta(i)-ea(n)[0]+1,ea(n)[0]):e}))}();return{slideRegistry:c}}(P,b,V,$,I,H),oe=function(e,t,n,r,o,i){let a=0;function s(e){"Tab"===e.code&&(a=(new Date).getTime())}function l(s){i.add(s,"focus",(()=>{if((new Date).getTime()-a>10)return;e.scrollLeft=0;const i=t.indexOf(s),l=n.findIndex((e=>e.includes(i)));qi(l)&&(o.useDuration(0),r.index(l,0))}),{passive:!0,capture:!0})}return{init:function(){i.add(document,"keydown",s,!1),t.forEach(l)}}}(e,n,re,Q,Z,te),ie={ownerDocument:r,ownerWindow:o,eventHandler:a,containerRect:E,slideRects:S,animation:q,axis:j,dragHandler:da(j,e,r,o,Y,fa(j,o),K,q,Q,Z,J,B,a,O,p,m,v,.68,x),eventStore:te,percentOfView:O,index:B,indexPrevious:U,limit:W,location:K,offsetLocation:X,options:i,resizeHandler:pa(t,a,o,n,j,y,C),scrollBody:Z,scrollBounds:ma(W,X,Y,Z,O),scrollLooper:ha(F,W,X,[K,X,Y]),scrollProgress:ee,scrollSnapList:V.map(ee.get),scrollSnaps:V,scrollTarget:J,scrollTo:Q,slideLooper:ya(j,R,F,T,_,D,V,X,n),slideFocus:oe,slidesHandler:wa(t,a,w),slidesInView:ne,slideIndexes:H,slideRegistry:re,slidesToScroll:I,target:Y,translate:ba(j,t)};return ie}const Sa={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0};function ja(e){function t(e,t){return ia(e,t||{})}const n={mergeOptions:t,optionsAtMedia:function(n){const r=n.breakpoints||{},o=oa(r).filter((t=>e.matchMedia(t).matches)).map((e=>r[e])).reduce(((e,n)=>t(e,n)),{});return t(n,o)},optionsMediaQueries:function(t){return t.map((e=>oa(e.breakpoints||{}))).reduce(((e,t)=>e.concat(t)),[]).map(e.matchMedia)}};return n}function Ra(e,t,n){const r=e.ownerDocument,o=r.defaultView,i=ja(o),a=function(e){let t=[];const n={init:function(n,r){return t=r.filter((({options:t})=>!1!==e.optionsAtMedia(t).active)),t.forEach((t=>t.init(n,e))),r.reduce(((e,t)=>Object.assign(e,{[t.name]:t})),{})},destroy:function(){t=t.filter((e=>e.destroy()))}};return n}(i),s=sa(),l=function(){const e={};let t;function n(t){return e[t]||[]}const r={init:function(e){t=e},emit:function(e){return n(e).forEach((n=>n(t,e))),r},off:function(t,o){return e[t]=n(t).filter((e=>e!==o)),r},on:function(t,o){return e[t]=n(t).concat([o]),r}};return r}(),{mergeOptions:c,optionsAtMedia:u,optionsMediaQueries:d}=i,{on:f,off:p,emit:m}=l,h=R;let g,v,b,y,w=!1,x=c(Sa,Ra.globalOptions),C=c(x),E=[];function S(t){const n=Ea(e,b,y,r,o,t,l);if(t.loop&&!n.slideLooper.canLoop()){return S(Object.assign({},t,{loop:!1}))}return n}function j(t,n){w||(x=c(x,t),C=u(x),E=n||E,function(){const{container:t,slides:n}=C,r=Gi(t)?e.querySelector(t):t;b=r||e.children[0];const o=Gi(n)?b.querySelectorAll(n):n;y=[].slice.call(o||b.children)}(),g=S(C),d([x,...E.map((({options:e})=>e))]).forEach((e=>s.add(e,"change",R))),C.active&&(g.translate.to(g.location.get()),g.animation.init(),g.slidesInView.init(),g.slideFocus.init(),g.eventHandler.init(k),g.resizeHandler.init(k),g.slidesHandler.init(k),g.options.loop&&g.slideLooper.loop(),b.offsetParent&&y.length&&g.dragHandler.init(k),v=a.init(k,E)))}function R(e,t){const n=P();O(),j(c({startIndex:n},e),t),l.emit("reInit")}function O(){g.dragHandler.destroy(),g.eventStore.clear(),g.translate.clear(),g.slideLooper.clear(),g.resizeHandler.destroy(),g.slidesHandler.destroy(),g.slidesInView.destroy(),g.animation.destroy(),a.destroy(),s.clear()}function N(e,t,n){C.active&&!w&&(g.scrollBody.useBaseFriction().useDuration(!0===t?0:C.duration),g.scrollTo.index(e,n||0))}function P(){return g.index.get()}const k={canScrollNext:function(){return g.index.add(1).get()!==P()},canScrollPrev:function(){return g.index.add(-1).get()!==P()},containerNode:function(){return b},internalEngine:function(){return g},destroy:function(){w||(w=!0,s.clear(),O(),l.emit("destroy"))},off:p,on:f,emit:m,plugins:function(){return v},previousScrollSnap:function(){return g.indexPrevious.get()},reInit:h,rootNode:function(){return e},scrollNext:function(e){N(g.index.add(1).get(),e,-1)},scrollPrev:function(e){N(g.index.add(-1).get(),e,1)},scrollProgress:function(){return g.scrollProgress.get(g.location.get())},scrollSnapList:function(){return g.scrollSnapList},scrollTo:N,selectedScrollSnap:P,slideNodes:function(){return y},slidesInView:function(){return g.slidesInView.get()},slidesNotInView:function(){return g.slidesInView.get(!1)}};return j(t,n),setTimeout((()=>l.emit("init")),0),k}function Oa(e={},n=[]){const r=t.useRef(e),o=t.useRef(n),[i,a]=t.useState(),[s,l]=t.useState(),c=t.useCallback((()=>{i&&i.reInit(r.current,o.current)}),[i]);return t.useEffect((()=>{if("undefined"!=typeof window&&window.document&&window.document.createElement&&s){Ra.globalOptions=Oa.globalOptions;const e=Ra(s,r.current,o.current);return a(e),()=>e.destroy()}a(void 0)}),[s,a]),t.useEffect((()=>{Ui(r.current,e)||(r.current=e,c())}),[e,c]),t.useEffect((()=>{(function(e,t){if(e.length!==t.length)return!1;const n=Hi(e),r=Hi(t);return n.every(((e,t)=>Ui(e,r[t])))})(o.current,n)||(o.current=n,c())}),[n,c]),[l,i]}Ra.globalOptions=void 0,Oa.globalOptions=void 0;var Na={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Pa=(e,n)=>{const r=t.forwardRef((({color:r="currentColor",size:o=24,strokeWidth:i=2,absoluteStrokeWidth:a,children:s,...l},c)=>{return t.createElement("svg",{ref:c,...Na,width:o,height:o,stroke:r,strokeWidth:a?24*Number(i)/Number(o):i,className:`lucide lucide-${u=e,u.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,...l},[...n.map((([e,n])=>t.createElement(e,n))),...(Array.isArray(s)?s:[s])||[]]);var u}));return r.displayName=`${e}`,r},ka=Pa("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]),Ta=Pa("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),_a=Pa("ChevronDown",[["polyline",{points:"6 9 12 15 18 9",key:"1do0m2"}]]),Aa=Pa("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Ma=a.createContext(null);function Ia(){const e=a.useContext(Ma);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}const Da=a.forwardRef(((e,t)=>{var{orientation:n="horizontal",opts:o,setApi:i,plugins:s,className:l,children:c,slidesInView:u}=e,d=de(e,["orientation","opts","setApi","plugins","className","children","slidesInView"]);const[f,p]=Oa(Object.assign(Object.assign({},o),{axis:"horizontal"===n?"x":"y"}),s),[m,h]=a.useState(!1),[g,v]=a.useState(!1),b=a.useCallback((e=>{e&&(h(e.canScrollPrev()),v(e.canScrollNext()))}),[]),y=a.useCallback((e=>{e&&(null==u||u(e.slidesInView()))}),[u]),w=a.useCallback((()=>{null==p||p.scrollPrev()}),[p]),x=a.useCallback((()=>{null==p||p.scrollNext()}),[p]),C=a.useCallback((e=>{"ArrowLeft"===e.key?(e.preventDefault(),w()):"ArrowRight"===e.key&&(e.preventDefault(),x())}),[w,x]);return a.useEffect((()=>{p&&i&&i(p)}),[p,i]),a.useEffect((()=>{if(p)return b(p),p.on("reInit",b),p.on("select",b),p.on("slidesInView",y),()=>{null==p||p.off("select",b)}}),[p,b]),r.jsx(Ma.Provider,Object.assign({value:{carouselRef:f,api:p,opts:o,orientation:n||("y"===(null==o?void 0:o.axis)?"vertical":"horizontal"),scrollPrev:w,scrollNext:x,canScrollPrev:m,canScrollNext:g}},{children:r.jsx("div",Object.assign({ref:t,onKeyDownCapture:C,className:ee("relative",l),role:"region","aria-roledescription":"carousel"},d,{children:c}))}))}));Da.displayName="Carousel";const La=a.forwardRef(((e,t)=>{var{className:n}=e,o=de(e,["className"]);const{carouselRef:i,orientation:a}=Ia();return r.jsx("div",Object.assign({ref:i,className:"overflow-hidden"},{children:r.jsx("div",Object.assign({ref:t,className:ee("flex","horizontal"===a?"":"-mt-4 flex-col",n)},o))}))}));La.displayName="CarouselContent";const Fa=a.forwardRef(((e,t)=>{var{className:n}=e,o=de(e,["className"]);const{orientation:i}=Ia();return r.jsx("div",Object.assign({ref:t,role:"group","aria-roledescription":"slide",className:ee("min-w-0 shrink-0 grow-0 basis-full","horizontal"===i?"pl-4":"pt-4",n)},o))}));Fa.displayName="CarouselItem";const za=a.forwardRef(((e,t)=>{var{className:n,variant:o="outline",size:i="icon"}=e,a=de(e,["className","variant","size"]);const{orientation:s,scrollPrev:l,canScrollPrev:c}=Ia();return r.jsxs(Wi,Object.assign({ref:t,variant:o,size:i,className:ee("absolute h-8 w-8 rounded-full","horizontal"===s?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",n),disabled:!c,onClick:l},a,{children:[r.jsx(ka,{className:"h-4 w-4"}),r.jsx("span",Object.assign({className:"sr-only"},{children:"Previous slide"}))]}))}));za.displayName="CarouselPrevious";const $a=a.forwardRef(((e,t)=>{var{className:n,variant:o="outline",size:i="icon"}=e,a=de(e,["className","variant","size"]);const{orientation:s,scrollNext:l,canScrollNext:c}=Ia();return r.jsxs(Wi,Object.assign({ref:t,variant:o,size:i,className:ee("absolute h-8 w-8 rounded-full","horizontal"===s?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",n),disabled:!c,onClick:l},a,{children:[r.jsx(Ta,{className:"h-4 w-4"}),r.jsx("span",Object.assign({className:"sr-only"},{children:"Next slide"}))]}))}));$a.displayName="CarouselNext";const Va=a.forwardRef(((e,t)=>{var{maxDots:n=5,dotColor:o="var(--coreColors-brandColorPrimary)"}=e,i=de(e,["maxDots","dotColor"]);const{api:s}=Ia(),[l,c]=a.useState(!1),u=a.useCallback((()=>c((e=>!e))),[]);a.useEffect((()=>{if(s)return s.on("select",u),s.on("reInit",u),()=>{s.off("select",u),s.off("reInit",u)}}),[s,u]);const d=Math.min((null==s?void 0:s.scrollSnapList().length)||0,n),f=Math.min((null==s?void 0:s.selectedScrollSnap())||0,n-1);return d>1?r.jsx("div",Object.assign({ref:t,className:`flex justify-center ${i.className}`},{children:Array.from({length:d},((e,t)=>r.jsx(Wi,{className:"mx-1 h-1.5 w-1.5 rounded-full p-0 border-none",style:{backgroundColor:o,opacity:t===f?1:.5},"aria-label":`Go to slide ${t+1}`,onClick:()=>null==s?void 0:s.scrollTo(t)},t)))})):r.jsx(r.Fragment,{})}));function Wa(e){const n=t.useRef({value:e,previous:e});return t.useMemo((()=>(n.current.value!==e&&(n.current.previous=n.current.value,n.current.value=e),n.current.previous)),[e])}function Ba(e){const[n,r]=t.useState(void 0);return Wn((()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const n=t[0];let o,i;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;r({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)}),[e]),n}Va.displayName="CarouselDots";const Ua="Checkbox",[Ha,qa]=On(Ua),[Ga,Ka]=Ha(Ua),Xa=t.forwardRef(((e,n)=>{const{__scopeCheckbox:r,name:o,checked:i,defaultChecked:a,required:s,disabled:l,value:c="on",onCheckedChange:u,...d}=e,[f,p]=t.useState(null),m=kn(n,(e=>p(e))),h=t.useRef(!1),g=!f||Boolean(f.closest("form")),[v=!1,b]=zn({prop:i,defaultProp:a,onChange:u}),y=t.useRef(v);return t.useEffect((()=>{const e=null==f?void 0:f.form;if(e){const t=()=>b(y.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[f,b]),t.createElement(Ga,{scope:r,state:v,disabled:l},t.createElement($n.button,Rn({type:"button",role:"checkbox","aria-checked":Za(v)?"mixed":v,"aria-required":s,"data-state":Ja(v),"data-disabled":l?"":void 0,disabled:l,value:c},d,{ref:m,onKeyDown:Ln(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:Ln(e.onClick,(e=>{b((e=>!!Za(e)||!e)),g&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())}))})),g&&t.createElement(Ya,{control:f,bubbles:!h.current,name:o,value:c,checked:v,required:s,disabled:l,style:{transform:"translateX(-100%)"}}))})),Ya=e=>{const{control:n,checked:r,bubbles:o=!0,...i}=e,a=t.useRef(null),s=Wa(r),l=Ba(n);return t.useEffect((()=>{const e=a.current,t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(s!==r&&n){const t=new Event("click",{bubbles:o});e.indeterminate=Za(r),n.call(e,!Za(r)&&r),e.dispatchEvent(t)}}),[s,r,o]),t.createElement("input",Rn({type:"checkbox","aria-hidden":!0,defaultChecked:!Za(r)&&r},i,{tabIndex:-1,ref:a,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Za(e){return"indeterminate"===e}function Ja(e){return Za(e)?"indeterminate":e?"checked":"unchecked"}const Qa=Xa,es=t.forwardRef(((e,n)=>{const{__scopeCheckbox:r,forceMount:o,...i}=e,a=Ka("CheckboxIndicator",r);return t.createElement(Bn,{present:o||Za(a.state)||!0===a.state},t.createElement($n.span,Rn({"data-state":Ja(a.state),"data-disabled":a.disabled?"":void 0},i,{ref:n,style:{pointerEvents:"none",...e.style}})))})),ts=({className:e})=>r.jsxs("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",className:e},{children:[r.jsx("g",Object.assign({clipPath:"url(#clip0_1465_24)"},{children:r.jsx("path",{d:"M5.667 21H5.66695C4.98414 21 4.32733 20.7382 3.83183 20.2684C3.33941 19.8015 3.04358 19.1646 3.00429 18.4875L3 18.3202V5.667C3 4.24616 4.11102 3.08465 5.51221 3.0043L5.67982 3H18.333C19.7538 3 20.9153 4.11101 20.9957 5.51219L21 5.67983V18.333C21 19.7538 19.889 20.9153 18.4878 20.9957L18.3202 21H5.667ZM16.4141 8.58593L16.414 8.58579C16.0389 8.21085 15.5303 8.00021 15 8.00021C14.4697 8.00021 13.9611 8.21085 13.586 8.58579L10.9998 11.1712L10.4138 10.5856L10.392 10.5638L10.3689 10.5434L10.2749 10.4604L10.2505 10.4388L10.2247 10.4189C9.82271 10.1081 9.31749 9.96192 8.81164 10.0101C8.3058 10.0583 7.83726 10.2972 7.50119 10.6783C7.16512 11.0595 6.98673 11.5542 7.00224 12.0621C7.01775 12.57 7.226 13.053 7.58469 13.4129L7.58589 13.4141L9.58589 15.4141L9.60784 15.4361L9.63111 15.4566L9.72511 15.5396L9.74895 15.5607L9.77407 15.5801C10.1589 15.8786 10.6394 16.0265 11.1254 15.9959C11.6115 15.9654 12.0697 15.7585 12.4141 15.4141L12.4141 15.4141L16.4141 11.4141L16.4361 11.3922L16.4566 11.3689L16.5396 11.2749L16.5607 11.2511L16.5801 11.2259C16.8786 10.8411 17.0265 10.3606 16.9959 9.87457C16.9654 9.38851 16.7585 8.93031 16.4141 8.58593Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"2"})})),r.jsx("defs",{children:r.jsx("clipPath",Object.assign({id:"clip0_1465_24"},{children:r.jsx("rect",{width:"24",height:"24",fill:"white"})}))})]})),ns=({className:e})=>r.jsxs("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:e},{children:[r.jsx("g",Object.assign({clipPath:"url(#clip0_1465_32)"},{children:r.jsx("path",{d:"M3 5C3 4.46957 3.21071 3.96086 3.58579 3.58579C3.96086 3.21071 4.46957 3 5 3H19C19.5304 3 20.0391 3.21071 20.4142 3.58579C20.7893 3.96086 21 4.46957 21 5V19C21 19.5304 20.7893 20.0391 20.4142 20.4142C20.0391 20.7893 19.5304 21 19 21H5C4.46957 21 3.96086 20.7893 3.58579 20.4142C3.21071 20.0391 3 19.5304 3 19V5Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})),r.jsx("defs",{children:r.jsx("clipPath",Object.assign({id:"clip0_1465_32"},{children:r.jsx("rect",{width:"24",height:"24",fill:"white"})}))})]})),rs=({className:e})=>r.jsxs("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:e},{children:[r.jsxs("g",Object.assign({clipPath:"url(#clip0_1465_43)"},{children:[r.jsx("path",{d:"M8 4H18C18.5304 4 19.0391 4.21071 19.4142 4.58579C19.7893 4.96086 20 5.46957 20 6V16M19.416 19.412C19.2303 19.5983 19.0096 19.7462 18.7666 19.8471C18.5236 19.948 18.2631 19.9999 18 20H6C5.46957 20 4.96086 19.7893 4.58579 19.4142C4.21071 19.0391 4 18.5304 4 18V6C4 5.448 4.224 4.948 4.586 4.586",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("path",{d:"M3 3L21 21",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})),r.jsx("defs",{children:r.jsx("clipPath",Object.assign({id:"clip0_1465_43"},{children:r.jsx("rect",{width:"24",height:"24",fill:"white"})}))})]})),os=Q("flex flex-col group group-disabled",{variants:{deactivated:{true:"[&_p]:text-stateColors-disabled",false:"active:opacity-70"}},defaultVariants:{deactivated:!1}}),is=a.forwardRef(((e,t)=>{var{id:n,className:o,label:i,numberAmount:a,subtext:s,selected:l=!1,onCheck:c,onSelect:u,deactivated:d=!1}=e,f=de(e,["id","className","label","numberAmount","subtext","selected","onCheck","onSelect","deactivated"]);return r.jsx("div",Object.assign({className:ee(os({deactivated:d}))},{children:r.jsx(Qa,Object.assign({ref:t,className:ee("w-full peer h-6 shrink-0 self-start rounded ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 group ",o),id:n,checked:l,onSelect:u,onCheckedChange:c,disabled:null!=d&&d},f,{children:r.jsxs("div",Object.assign({className:"grid grid-cols-[auto,auto,1fr] gap-2 items-start group "},{children:[r.jsxs("div",Object.assign({className:"grid"},{children:[r.jsx(es,Object.assign({className:"flex items-center justify-center text-current col-start-1 row-start-1"},{children:!d&&r.jsx(ts,{className:"col-start-1 row-start-1 items-center z-50 text-coreColors-brandColorPrimary"})})),r.jsxs("div",Object.assign({className:"flex items-center justify-center col-start-1 row-start-1"},{children:[!d&&!l&&r.jsx(ns,{className:"text-coreColors-secondaryIcon"}),d&&r.jsx(rs,{className:"text-stateColors-disabled"})]}))]})),r.jsxs("div",Object.assign({className:"flex flex-col gap-2 items-start overflow-x-auto"},{children:[i&&r.jsx("label",Object.assign({htmlFor:n,className:"max-w-full"},{children:r.jsxs("span",Object.assign({className:"flex gap-2"},{children:[r.jsx(Di,Object.assign({type:"body-primary",className:"group-disabled:text-stateColors-disabled text-ellipsis overflow-hidden "},{children:i})),a&&r.jsxs(Di,Object.assign({type:"body-primary",className:"text-textColors-secondaryColor group-disabled:text-stateColors-disabled inline"},{children:["(",a,")"]}))]}))})),s&&r.jsx(Di,Object.assign({type:"body-secondary",className:"group-disabled:text-stateColors-disabled"},{children:s}))]}))]}))}))}))}));is.displayName=Qa.displayName;const as=Q("inline-flex items-center justify-center rounded border border-coreColors-dividingLines text-[12px] transition-colors h-8 active:opacity-70",{variants:{variant:{primary:"bg-coreColors-pageColor text-textColors-primaryColor",secondary:"bg-coreColors-pageColor text-textColors-secondaryColor"},direction:{horizontal:"flex-row",vertical:"flex-col"},iconPosition:{default:"p-2",left:"pr-2",right:"pl-2"}},defaultVariants:{variant:"primary",direction:"horizontal",iconPosition:"default"}}),ss=t.forwardRef(((e,t)=>{var{className:n,variant:o,direction:i,children:a,iconPosition:s,onChipClick:l,onIconClick:c}=e,u=de(e,["className","variant","direction","children","iconPosition","onChipClick","onIconClick"]);const d=()=>{null==c||c()};return r.jsxs("div",Object.assign({onClick:()=>{null==l||l()},ref:t,className:ee(as({variant:o,direction:i,iconPosition:s}),n)},u,{children:["left"===s&&r.jsx("button",Object.assign({onClick:d,className:"h-full flex items-center justify-center pl-2"},{children:r.jsx(Pi,{name:"square-x-filled",className:"mr-2 h-4 w-4 cursor-pointer",color:"coreColors-secondaryIcon"})})),a,"right"===s&&r.jsx("button",Object.assign({onClick:d,className:"h-full flex items-center justify-center pr-2"},{children:r.jsx(Pi,{name:"square-x-filled",className:"ml-2 h-4 w-4 cursor-pointer",onClick:d,color:"coreColors-secondaryIcon"})}))]}))}));ss.displayName="Chip";const ls=Q("grid grid-flow-col w-full gap-x-2 gap-y-2",{variants:{overflow:{"horizontal-scroll":"overflow-x-auto [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",wrap:"flex flex-wrap"}},defaultVariants:{overflow:"horizontal-scroll"}}),cs=Q("container",{variants:{variant:{spaced:"my-3"}}});function us(e){var{className:t,variant:n}=e,o=de(e,["className","variant"]);return r.jsx("div",Object.assign({className:ee(cs({variant:n}),t)},o))}const ds="dismissableLayer.update",fs="dismissableLayer.pointerDownOutside",ps="dismissableLayer.focusOutside";let ms;const hs=t.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),gs=t.forwardRef(((e,n)=>{var r;const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:c,...u}=e,d=t.useContext(hs),[f,p]=t.useState(null),m=null!==(r=null==f?void 0:f.ownerDocument)&&void 0!==r?r:null===globalThis||void 0===globalThis?void 0:globalThis.document,[,h]=t.useState({}),g=kn(n,(e=>p(e))),v=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=v.indexOf(b),w=f?v.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,C=w>=y,E=function(e,n=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const r=Fn(e),o=t.useRef(!1),i=t.useRef((()=>{}));return t.useEffect((()=>{const e=e=>{if(e.target&&!o.current){const t={originalEvent:e};function a(){bs(fs,r,t,{discrete:!0})}"touch"===e.pointerType?(n.removeEventListener("click",i.current),i.current=a,n.addEventListener("click",i.current,{once:!0})):a()}else n.removeEventListener("click",i.current);o.current=!1},t=window.setTimeout((()=>{n.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(t),n.removeEventListener("pointerdown",e),n.removeEventListener("click",i.current)}}),[n,r]),{onPointerDownCapture:()=>o.current=!0}}((e=>{const t=e.target,n=[...d.branches].some((e=>e.contains(t)));C&&!n&&(null==a||a(e),null==l||l(e),e.defaultPrevented||null==c||c())}),m),S=function(e,n=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const r=Fn(e),o=t.useRef(!1);return t.useEffect((()=>{const e=e=>{if(e.target&&!o.current){bs(ps,r,{originalEvent:e},{discrete:!1})}};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)}),[n,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}((e=>{const t=e.target;[...d.branches].some((e=>e.contains(t)))||(null==s||s(e),null==l||l(e),e.defaultPrevented||null==c||c())}),m);return function(e,n=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const r=Fn(e);t.useEffect((()=>{const e=e=>{"Escape"===e.key&&r(e)};return n.addEventListener("keydown",e),()=>n.removeEventListener("keydown",e)}),[r,n])}((e=>{w===d.layers.size-1&&(null==i||i(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))}),m),t.useEffect((()=>{if(f)return o&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(ms=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),vs(),()=>{o&&1===d.layersWithOutsidePointerEventsDisabled.size&&(m.body.style.pointerEvents=ms)}}),[f,m,o,d]),t.useEffect((()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),vs())}),[f,d]),t.useEffect((()=>{const e=()=>h({});return document.addEventListener(ds,e),()=>document.removeEventListener(ds,e)}),[]),t.createElement($n.div,Rn({},u,{ref:g,style:{pointerEvents:x?C?"auto":"none":void 0,...e.style},onFocusCapture:Ln(e.onFocusCapture,S.onFocusCapture),onBlurCapture:Ln(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:Ln(e.onPointerDownCapture,E.onPointerDownCapture)}))}));function vs(){const e=new CustomEvent(ds);document.dispatchEvent(e)}function bs(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Vn(o,i):o.dispatchEvent(i)}const ys=gs,ws=t.forwardRef(((e,n)=>{const r=t.useContext(hs),o=t.useRef(null),i=kn(n,o);return t.useEffect((()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}}),[r.branches]),t.createElement($n.div,Rn({},e,{ref:i}))})),xs="focusScope.autoFocusOnMount",Cs="focusScope.autoFocusOnUnmount",Es={bubbles:!1,cancelable:!0},Ss=t.forwardRef(((e,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...s}=e,[l,c]=t.useState(null),u=Fn(i),d=Fn(a),f=t.useRef(null),p=kn(n,(e=>c(e))),m=t.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;t.useEffect((()=>{if(o){function e(e){if(m.paused||!l)return;const t=e.target;l.contains(t)?f.current=t:Ns(f.current,{select:!0})}function t(e){if(m.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||Ns(f.current,{select:!0}))}function n(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Ns(l)}document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[o,l,m.paused]),t.useEffect((()=>{if(l){Ps.add(m);const t=document.activeElement;if(!l.contains(t)){const n=new CustomEvent(xs,Es);l.addEventListener(xs,u),l.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ns(r,{select:t}),document.activeElement!==n)return}((e=js(l),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&Ns(l))}return()=>{l.removeEventListener(xs,u),setTimeout((()=>{const e=new CustomEvent(Cs,Es);l.addEventListener(Cs,d),l.dispatchEvent(e),e.defaultPrevented||Ns(null!=t?t:document.body,{select:!0}),l.removeEventListener(Cs,d),Ps.remove(m)}),0)}}var e}),[l,u,d,m]);const h=t.useCallback((e=>{if(!r&&!o)return;if(m.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[o,i]=function(e){const t=js(e),n=Rs(t,e),r=Rs(t.reverse(),e);return[n,r]}(t);o&&i?e.shiftKey||n!==i?e.shiftKey&&n===o&&(e.preventDefault(),r&&Ns(i,{select:!0})):(e.preventDefault(),r&&Ns(o,{select:!0})):n===t&&e.preventDefault()}}),[r,o,m.paused]);return t.createElement($n.div,Rn({tabIndex:-1},s,{ref:p,onKeyDown:h}))}));function js(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Rs(e,t){for(const n of e)if(!Os(n,{upTo:t}))return n}function Os(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function Ns(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}const Ps=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=ks(e,t),e.unshift(t)},remove(t){var n;e=ks(e,t),null===(n=e[0])||void 0===n||n.resume()}}}();function ks(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}const Ts=t.forwardRef(((e,n)=>{var r;const{container:i=(null===globalThis||void 0===globalThis||null===(r=globalThis.document)||void 0===r?void 0:r.body),...a}=e;return i?o.createPortal(t.createElement($n.div,Rn({},a,{ref:n})),i):null}));let _s=0;function As(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Ms="right-scroll-bar-position",Is="width-before-scroll-bar";function Ds(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var Ls="undefined"!=typeof window?a.useLayoutEffect:a.useEffect,Fs=new WeakMap;function zs(e,n){var r,o,i,a=(r=null,o=function(t){return e.forEach((function(e){return Ds(e,t)}))},(i=t.useState((function(){return{value:r,callback:o,facade:{get current(){return i.value},set current(e){var t=i.value;t!==e&&(i.value=e,i.callback(e,t))}}}}))[0]).callback=o,i.facade);return Ls((function(){var t=Fs.get(a);if(t){var n=new Set(t),r=new Set(e),o=a.current;n.forEach((function(e){r.has(e)||Ds(e,null)})),r.forEach((function(e){n.has(e)||Ds(e,o)}))}Fs.set(a,e)}),[e]),a}function $s(e){return e}function Vs(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=$s);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var i=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),n={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=ue({async:!0,ssr:!1},e),t}var Ws=function(e){var t=e.sideCar,n=de(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return a.createElement(r,ue({},n))};function Bs(e,t){return e.useMedium(t),Ws}Ws.isSideCarExport=!0;var Us=Vs(),Hs=function(){},qs=a.forwardRef((function(e,t){var n=a.useRef(null),r=a.useState({onScrollCapture:Hs,onWheelCapture:Hs,onTouchMoveCapture:Hs}),o=r[0],i=r[1],s=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,v=e.as,b=void 0===v?"div":v,y=de(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=p,x=zs([n,t]),C=ue(ue({},y),o);return a.createElement(a.Fragment,null,d&&a.createElement(w,{sideCar:Us,removeScrollBar:u,shards:f,noIsolation:m,inert:h,setCallbacks:i,allowPinchZoom:!!g,lockRef:n}),s?a.cloneElement(a.Children.only(l),ue(ue({},C),{ref:x})):a.createElement(b,ue({},C,{className:c,ref:x}),l))}));qs.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},qs.classNames={fullWidth:Is,zeroRight:Ms};function Gs(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var Ks=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=Gs())&&(o=n,(r=t).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Xs=function(){var e,t=(e=Ks(),function(t,n){a.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},Ys={left:0,top:0,right:0,gap:0},Zs=function(e){return parseInt(e||"",10)||0},Js=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Ys;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[Zs(n),Zs(r),Zs(o)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Qs=Xs(),el="data-scroll-locked",tl=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(el,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Ms," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(Is," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(Ms," .").concat(Ms," {\n right: 0 ").concat(r,";\n }\n \n .").concat(Is," .").concat(Is," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(el,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},nl=function(){var e=parseInt(document.body.getAttribute(el)||"0",10);return isFinite(e)?e:0},rl=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;a.useEffect((function(){return document.body.setAttribute(el,(nl()+1).toString()),function(){var e=nl()-1;e<=0?document.body.removeAttribute(el):document.body.setAttribute(el,e.toString())}}),[]);var i=a.useMemo((function(){return Js(o)}),[o]);return a.createElement(Qs,{styles:tl(i,!t,o,n?"":"!important")})},ol=!1;if("undefined"!=typeof window)try{var il=Object.defineProperty({},"passive",{get:function(){return ol=!0,!0}});window.addEventListener("test",il,il),window.removeEventListener("test",il,il)}catch(e){ol=!1}var al=!!ol&&{passive:!1},sl=function(e,t){var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},ll=function(e,t){var n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),cl(e,n)){var r=ul(e,n);if(r[1]>r[2])return!0}n=n.parentNode}while(n&&n!==document.body);return!1},cl=function(e,t){return"v"===e?function(e){return sl(e,"overflowY")}(t):function(e){return sl(e,"overflowX")}(t)},ul=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},dl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},fl=function(e){return[e.deltaX,e.deltaY]},pl=function(e){return e&&"current"in e?e.current:e},ml=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},hl=0,gl=[];var vl=Bs(Us,(function(e){var t=a.useRef([]),n=a.useRef([0,0]),r=a.useRef(),o=a.useState(hl++)[0],i=a.useState((function(){return Xs()}))[0],s=a.useRef(e);a.useEffect((function(){s.current=e}),[e]),a.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=pe([e.lockRef.current],(e.shards||[]).map(pl),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(o))})),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(o))}))}}}),[e.inert,e.lockRef.current,e.shards]);var l=a.useCallback((function(e,t){if("touches"in e&&2===e.touches.length)return!s.current.allowPinchZoom;var o,i=dl(e),a=n.current,l="deltaX"in e?e.deltaX:a[0]-i[0],c="deltaY"in e?e.deltaY:a[1]-i[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var f=ll(d,u);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=ll(d,u)),!f)return!1;if(!r.current&&"changedTouches"in e&&(l||c)&&(r.current=o),!o)return!0;var p=r.current||o;return function(e,t,n,r,o){var i=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,l=t.contains(s),c=!1,u=a>0,d=0,f=0;do{var p=ul(e,s),m=p[0],h=p[1]-p[2]-i*m;(m||h)&&cl(e,s)&&(d+=h,f+=m),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(!u||0!==d&&o)&&(u||0!==f&&o)||(c=!0),c}(p,t,e,"h"===p?l:c,!0)}),[]),c=a.useCallback((function(e){var n=e;if(gl.length&&gl[gl.length-1]===i){var r="deltaY"in n?fl(n):dl(n),o=t.current.filter((function(e){return e.name===n.type&&e.target===n.target&&(t=e.delta,o=r,t[0]===o[0]&&t[1]===o[1]);var t,o}))[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var a=(s.current.shards||[]).map(pl).filter(Boolean).filter((function(e){return e.contains(n.target)}));(a.length>0?l(n,a[0]):!s.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),u=a.useCallback((function(e,n,r,o){var i={name:e,delta:n,target:r,should:o};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),d=a.useCallback((function(e){n.current=dl(e),r.current=void 0}),[]),f=a.useCallback((function(t){u(t.type,fl(t),t.target,l(t,e.lockRef.current))}),[]),p=a.useCallback((function(t){u(t.type,dl(t),t.target,l(t,e.lockRef.current))}),[]);a.useEffect((function(){return gl.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,al),document.addEventListener("touchmove",c,al),document.addEventListener("touchstart",d,al),function(){gl=gl.filter((function(e){return e!==i})),document.removeEventListener("wheel",c,al),document.removeEventListener("touchmove",c,al),document.removeEventListener("touchstart",d,al)}}),[]);var m=e.removeScrollBar,h=e.inert;return a.createElement(a.Fragment,null,h?a.createElement(i,{styles:ml(o)}):null,m?a.createElement(rl,{gapMode:"margin"}):null)})),bl=a.forwardRef((function(e,t){return a.createElement(qs,ue({},e,{ref:t,sideCar:vl}))}));bl.classNames=qs.classNames;var yl=new WeakMap,wl=new WeakMap,xl={},Cl=0,El=function(e){return e&&(e.host||El(e.parentNode))},Sl=function(e,t,n,r){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=El(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);xl[n]||(xl[n]=new WeakMap);var i=xl[n],a=[],s=new Set,l=new Set(o),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};o.forEach(c);var u=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,l=(yl.get(e)||0)+1,c=(i.get(e)||0)+1;yl.set(e,l),i.set(e,c),a.push(e),1===l&&o&&wl.set(e,!0),1===c&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}}))};return u(t),s.clear(),Cl++,function(){a.forEach((function(e){var t=yl.get(e)-1,o=i.get(e)-1;yl.set(e,t),i.set(e,o),t||(wl.has(e)||e.removeAttribute(r),wl.delete(e)),o||e.removeAttribute(n)})),--Cl||(yl=new WeakMap,yl=new WeakMap,wl=new WeakMap,xl={})}},jl=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Sl(r,o,n,"aria-hidden")):function(){return null}};const Rl="Dialog",[Ol,Nl]=On(Rl),[Pl,kl]=Ol(Rl),Tl=t.forwardRef(((e,n)=>{const{__scopeDialog:r,...o}=e,i=kl("DialogTrigger",r),a=kn(n,i.triggerRef);return t.createElement($n.button,Rn({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Xl(i.open)},o,{ref:a,onClick:Ln(e.onClick,i.onOpenToggle)}))})),_l="DialogPortal",[Al,Ml]=Ol(_l,{forceMount:void 0}),Il="DialogOverlay",Dl=t.forwardRef(((e,n)=>{const r=Ml(Il,e.__scopeDialog),{forceMount:o=r.forceMount,...i}=e,a=kl(Il,e.__scopeDialog);return a.modal?t.createElement(Bn,{present:o||a.open},t.createElement(Ll,Rn({},i,{ref:n}))):null})),Ll=t.forwardRef(((e,n)=>{const{__scopeDialog:r,...o}=e,i=kl(Il,r);return t.createElement(bl,{as:Tn,allowPinchZoom:!0,shards:[i.contentRef]},t.createElement($n.div,Rn({"data-state":Xl(i.open)},o,{ref:n,style:{pointerEvents:"auto",...o.style}})))})),Fl="DialogContent",zl=t.forwardRef(((e,n)=>{const r=Ml(Fl,e.__scopeDialog),{forceMount:o=r.forceMount,...i}=e,a=kl(Fl,e.__scopeDialog);return t.createElement(Bn,{present:o||a.open},a.modal?t.createElement($l,Rn({},i,{ref:n})):t.createElement(Vl,Rn({},i,{ref:n})))})),$l=t.forwardRef(((e,n)=>{const r=kl(Fl,e.__scopeDialog),o=t.useRef(null),i=kn(n,r.contentRef,o);return t.useEffect((()=>{const e=o.current;if(e)return jl(e)}),[]),t.createElement(Wl,Rn({},e,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ln(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null===(t=r.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:Ln(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:Ln(e.onFocusOutside,(e=>e.preventDefault()))}))})),Vl=t.forwardRef(((e,n)=>{const r=kl(Fl,e.__scopeDialog),o=t.useRef(!1),i=t.useRef(!1);return t.createElement(Wl,Rn({},e,{ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var n,a;(null===(n=e.onCloseAutoFocus)||void 0===n||n.call(e,t),t.defaultPrevented)||(o.current||null===(a=r.triggerRef.current)||void 0===a||a.focus(),t.preventDefault());o.current=!1,i.current=!1},onInteractOutside:t=>{var n,a;null===(n=e.onInteractOutside)||void 0===n||n.call(e,t),t.defaultPrevented||(o.current=!0,"pointerdown"===t.detail.originalEvent.type&&(i.current=!0));const s=t.target;(null===(a=r.triggerRef.current)||void 0===a?void 0:a.contains(s))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&i.current&&t.preventDefault()}}))})),Wl=t.forwardRef(((e,n)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,...s}=e,l=kl(Fl,r),c=kn(n,t.useRef(null));return t.useEffect((()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:As()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:As()),_s++,()=>{1===_s&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),_s--}}),[]),t.createElement(t.Fragment,null,t.createElement(Ss,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a},t.createElement(gs,Rn({role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Xl(l.open)},s,{ref:c,onDismiss:()=>l.onOpenChange(!1)}))),!1)})),Bl="DialogTitle",Ul=t.forwardRef(((e,n)=>{const{__scopeDialog:r,...o}=e,i=kl(Bl,r);return t.createElement($n.h2,Rn({id:i.titleId},o,{ref:n}))})),Hl="DialogDescription",ql=t.forwardRef(((e,n)=>{const{__scopeDialog:r,...o}=e,i=kl(Hl,r);return t.createElement($n.p,Rn({id:i.descriptionId},o,{ref:n}))})),Gl="DialogClose",Kl=t.forwardRef(((e,n)=>{const{__scopeDialog:r,...o}=e,i=kl(Gl,r);return t.createElement($n.button,Rn({type:"button"},o,{ref:n,onClick:Ln(e.onClick,(()=>i.onOpenChange(!1)))}))}));function Xl(e){return e?"open":"closed"}const Yl=e=>{const{__scopeDialog:n,children:r,open:o,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,l=t.useRef(null),c=t.useRef(null),[u=!1,d]=zn({prop:o,defaultProp:i,onChange:a});return t.createElement(Pl,{scope:n,triggerRef:l,contentRef:c,contentId:Gn(),titleId:Gn(),descriptionId:Gn(),open:u,onOpenChange:d,onOpenToggle:t.useCallback((()=>d((e=>!e))),[d]),modal:s},r)},Zl=Tl,Jl=e=>{const{__scopeDialog:n,forceMount:r,children:o,container:i}=e,a=kl(_l,n);return t.createElement(Al,{scope:n,forceMount:r},t.Children.map(o,(e=>t.createElement(Bn,{present:r||a.open},t.createElement(Ts,{asChild:!0,container:i},e)))))},Ql=Dl,ec=zl,tc=Ul,nc=ql,rc=Kl;const oc=t.createContext({drawerRef:{current:null},overlayRef:{current:null},scaleBackground:()=>{},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,handleOnly:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},visible:!1,closeDrawer:()=>{},setVisible:()=>{},direction:"bottom"}),ic=()=>{const e=t.useContext(oc);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};!function(e){if("undefined"==typeof document)return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}("[vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1)}[vaul-drawer][vaul-drawer-direction=bottom]{transform:translate3d(0,100%,0)}[vaul-drawer][vaul-drawer-direction=top]{transform:translate3d(0,-100%,0)}[vaul-drawer][vaul-drawer-direction=left]{transform:translate3d(-100%,0,0)}[vaul-drawer][vaul-drawer-direction=right]{transform:translate3d(100%,0,0)}.vaul-dragging .vaul-scrollable [vault-drawer-direction=top]{overflow-y:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=bottom]{overflow-y:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=left]{overflow-x:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=right]{overflow-x:hidden!important}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[vaul-overlay]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[vaul-overlay][vaul-drawer-visible=true]{opacity:1}[vaul-drawer]::after{content:'';position:absolute;background:inherit;background-color:inherit}[vaul-drawer][vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[vaul-drawer][vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[vaul-drawer][vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[vaul-drawer][vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[vaul-handle]{display:block;position:relative;opacity:.8;margin-left:auto;margin-right:auto;height:5px;width:56px;border-radius:1rem;touch-action:pan-y;cursor:grab}[vaul-handle]:active,[vaul-handle]:hover{opacity:1}[vaul-handle]:active{cursor:grabbing}[vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}[vaul-overlay][vaul-snap-points=true]:not([vaul-snap-points-overlay=true]):not([data-state=closed]){opacity:0}[vaul-overlay][vaul-snap-points-overlay=true]:not([vaul-drawer-visible=false]){opacity:1}@media (hover:hover) and (pointer:fine){[vaul-drawer]{user-select:none}}@media (pointer:fine){[vaul-handle-hitarea]:{width:100%;height:100%}}");const ac="undefined"!=typeof window?t.useLayoutEffect:t.useEffect;function sc(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}function lc(){return uc(/^iPad/)||uc(/^Mac/)&&navigator.maxTouchPoints>1}function cc(){return uc(/^iPhone/)||lc()}function uc(e){return"undefined"!=typeof window&&null!=window.navigator?e.test(window.navigator.platform):void 0}const dc="undefined"!=typeof document&&window.visualViewport;function fc(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function pc(e){for(fc(e)&&(e=e.parentElement);e&&!fc(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const mc=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let hc,gc=0;function vc(e={}){let{isDisabled:t}=e;ac((()=>{if(!t)return gc++,1===gc&&(hc=cc()?function(){let e,t=0,n=n=>{e=pc(n.target),e===document.documentElement&&e===document.body||(t=n.changedTouches[0].pageY)},r=n=>{if(!e||e===document.documentElement||e===document.body)return void n.preventDefault();let r=n.changedTouches[0].pageY,o=e.scrollTop,i=e.scrollHeight-e.clientHeight;0!==i&&((o<=0&&r>t||o>=i&&r<t)&&n.preventDefault(),t=r)},o=e=>{let t=e.target;xc(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform="translateY(-2000px)",t.focus(),requestAnimationFrame((()=>{t.style.transform=""})))},i=e=>{let t=e.target;xc(t)&&(t.style.transform="translateY(-2000px)",requestAnimationFrame((()=>{t.style.transform="",dc&&(dc.height<window.innerHeight?requestAnimationFrame((()=>{wc(t)})):dc.addEventListener("resize",(()=>wc(t)),{once:!0}))})))},a=()=>{window.scrollTo(0,0)},s=window.pageXOffset,l=window.pageYOffset,c=sc(bc(document.documentElement,"paddingRight",window.innerWidth-document.documentElement.clientWidth+"px"));window.scrollTo(0,0);let u=sc(yc(document,"touchstart",n,{passive:!1,capture:!0}),yc(document,"touchmove",r,{passive:!1,capture:!0}),yc(document,"touchend",o,{passive:!1,capture:!0}),yc(document,"focus",i,!0),yc(window,"scroll",a));return()=>{c(),u(),window.scrollTo(s,l)}}():sc(bc(document.documentElement,"paddingRight",window.innerWidth-document.documentElement.clientWidth+"px"))),()=>{gc--,0===gc&&hc()}}),[t])}function bc(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function yc(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function wc(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=pc(e);if(t!==document.documentElement&&t!==document.body&&t!==e){let n=t.getBoundingClientRect().top,r=e.getBoundingClientRect().top;e.getBoundingClientRect().bottom>t.getBoundingClientRect().bottom&&(t.scrollTop+=r-n)}e=t.parentElement}}function xc(e){return e instanceof HTMLInputElement&&!mc.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function Cc(...e){return a.useCallback(function(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}(...e),e)}let Ec=null;const Sc=new WeakMap;function jc(e,t,n=!1){if(!(e&&e instanceof HTMLElement))return;let r={};Object.entries(t).forEach((([t,n])=>{t.startsWith("--")?e.style.setProperty(t,n):(r[t]=e.style[t],e.style[t]=n)})),n||Sc.set(e,r)}function Rc(e,t){if(!(e&&e instanceof HTMLElement))return;let n=Sc.get(e);n&&(t?e.style[t]=n[t]:Object.entries(n).forEach((([t,n])=>{e.style[t]=n})))}const Oc=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function Nc(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let o=r.match(/^matrix3d\((.+)\)$/);return o?parseFloat(o[1].split(", ")[Oc(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[Oc(t)?5:4]):null)}const Pc={DURATION:.5,EASE:[.32,.72,0,1]},kc=.4;function Tc(e){const n=t.useRef(e);return t.useEffect((()=>{n.current=e})),t.useMemo((()=>(...e)=>null==n.current?void 0:n.current.call(n,...e)),[])}function _c({prop:e,defaultProp:n,onChange:r=()=>{}}){const[o,i]=function({defaultProp:e,onChange:n}){const r=t.useState(e),[o]=r,i=t.useRef(o),a=Tc(n);return t.useEffect((()=>{i.current!==o&&(a(o),i.current=o)}),[o,i,a]),r}({defaultProp:n,onChange:r}),a=void 0!==e,s=a?e:o,l=Tc(r),c=t.useCallback((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else i(t)}),[a,e,i,l]);return[s,c]}const Ac=.25,Mc=100,Ic=8,Dc=16,Lc=26,Fc="vaul-dragging";function zc({open:e,onOpenChange:n,children:r,shouldScaleBackground:o,onDrag:i,onRelease:a,snapPoints:s,nested:l=!1,setBackgroundColorOnScale:c=!0,closeThreshold:u=Ac,scrollLockTimeout:d=Mc,dismissible:f=!0,handleOnly:p=!1,fadeFromIndex:m=s&&s.length-1,activeSnapPoint:h,setActiveSnapPoint:g,fixed:v,modal:b=!0,onClose:y,noBodyStyles:w,direction:x="bottom",preventScrollRestoration:C=!0,disablePreventScroll:E=!1}){var S;const[j=!1,R]=t.useState(!1),[O,N]=t.useState(!1),[P,k]=t.useState(!1),[T,_]=t.useState(!1),[A,M]=t.useState(!1),[I,D]=t.useState(!1),L=t.useRef(null),F=t.useRef(null),z=t.useRef(null),$=t.useRef(null),V=t.useRef(null),W=t.useRef(!1),B=t.useRef(null),U=t.useRef(0),H=t.useRef(!1),q=t.useRef(0),G=t.useRef(null),K=t.useRef((null==(S=G.current)?void 0:S.getBoundingClientRect().height)||0),X=t.useRef(0),Y=t.useCallback((e=>{s&&e===te.length-1&&(F.current=new Date)}),[]),{activeSnapPoint:Z,activeSnapPointIndex:J,setActiveSnapPoint:Q,onRelease:ee,snapPointsOffset:te,onDrag:ne,shouldFade:re,getPercentageDragged:oe}=function({activeSnapPointProp:e,setActiveSnapPointProp:n,snapPoints:r,drawerRef:o,overlayRef:i,fadeFromIndex:a,onSnapPointChange:s,direction:l="bottom"}){const[c,u]=_c({prop:e,defaultProp:null==r?void 0:r[0],onChange:n}),d=t.useMemo((()=>c===(null==r?void 0:r[r.length-1])||null),[r,c]),f=r&&r.length>0&&(a||0===a)&&!Number.isNaN(a)&&r[a]===c||!r,p=t.useMemo((()=>null==r?void 0:r.findIndex((e=>e===c))),[r,c]),m=t.useMemo((()=>{var e;return null!=(e=null==r?void 0:r.map((e=>{const t="undefined"!=typeof window,n="string"==typeof e;let r=0;if(n&&(r=parseInt(e,10)),Oc(l)){const o=n?r:t?e*window.innerHeight:0;return t?"bottom"===l?window.innerHeight-o:-window.innerHeight+o:o}const o=n?r:t?e*window.innerWidth:0;return t?"right"===l?window.innerWidth-o:-window.innerWidth+o:o})))?e:[]}),[r]),h=t.useMemo((()=>null!==p?null==m?void 0:m[p]:null),[m,p]),g=t.useCallback((e=>{var t;const n=null!=(t=null==m?void 0:m.findIndex((t=>t===e)))?t:null;s(n),jc(o.current,{transition:`transform ${Pc.DURATION}s cubic-bezier(${Pc.EASE.join(",")})`,transform:Oc(l)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),m&&n!==m.length-1&&n!==a?jc(i.current,{transition:`opacity ${Pc.DURATION}s cubic-bezier(${Pc.EASE.join(",")})`,opacity:"0"}):jc(i.current,{transition:`opacity ${Pc.DURATION}s cubic-bezier(${Pc.EASE.join(",")})`,opacity:"1"}),u(null!==n?null==r?void 0:r[n]:null)}),[o.current,r,m,a,i,u]);return t.useEffect((()=>{if(c||e){var t;const n=null!=(t=null==r?void 0:r.findIndex((t=>t===e||t===c)))?t:-1;m&&-1!==n&&"number"==typeof m[n]&&g(m[n])}}),[c,e,r,m,g]),{isLastSnapPoint:d,activeSnapPoint:c,shouldFade:f,getPercentageDragged:function(e,t){if(!r||"number"!=typeof p||!m||void 0===a)return null;const n=p===a-1;if(p>=a&&t)return 0;if(n&&!t)return 1;if(!f&&!n)return null;const o=n?p+1:p-1,i=n?m[o]-m[o-1]:m[o+1]-m[o],s=e/Math.abs(i);return n?1-s:s},setActiveSnapPoint:u,activeSnapPointIndex:p,onRelease:function({draggedDistance:e,closeDrawer:t,velocity:n,dismissible:o}){if(void 0===a)return;const s="bottom"===l||"right"===l?(null!=h?h:0)-e:(null!=h?h:0)+e,c=0===p,u=e>0;if(p===a-1&&jc(i.current,{transition:`opacity ${Pc.DURATION}s cubic-bezier(${Pc.EASE.join(",")})`}),n>2&&!u)return void(o?t():g(m[0]));if(n>2&&u&&m&&r)return void g(m[r.length-1]);const f=null==m?void 0:m.reduce(((e,t)=>"number"!=typeof e||"number"!=typeof t?e:Math.abs(t-s)<Math.abs(e-s)?t:e)),v=Oc(l)?window.innerHeight:window.innerWidth;if(n>kc&&Math.abs(e)<.4*v){const e=u?1:-1;if(e>0&&d)return void g(m[r.length-1]);if(c&&e<0&&o&&t(),null===p)return;g(m[p+e])}else g(f)},onDrag:function({draggedDistance:e}){if(null===h)return;const t="bottom"===l||"right"===l?h-e:h+e;("bottom"===l||"right"===l)&&t<m[m.length-1]||("top"===l||"left"===l)&&t>m[m.length-1]||jc(o.current,{transform:Oc(l)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})},snapPointsOffset:m}}({snapPoints:s,activeSnapPointProp:h,setActiveSnapPointProp:g,drawerRef:G,fadeFromIndex:m,overlayRef:L,onSnapPointChange:Y,direction:x});vc({isDisabled:!j||A||!b||I||!O||E});const{restorePositionSetting:ie}=function({isOpen:e,modal:n,nested:r,hasBeenOpened:o,preventScrollRestoration:i,noBodyStyles:a}){const[s,l]=t.useState((()=>"undefined"!=typeof window?window.location.href:"")),c=t.useRef(0),u=t.useCallback((()=>{if(null===Ec&&e&&!a){Ec={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:e,innerHeight:t}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:-c.current+"px",left:-e+"px",right:"0px",height:"auto"}),window.setTimeout((()=>window.requestAnimationFrame((()=>{const e=t-window.innerHeight;e&&c.current>=t&&(document.body.style.top=-(c.current+e)+"px")}))),300)}}),[e]),d=t.useCallback((()=>{if(null!==Ec&&!a){const e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Ec),window.requestAnimationFrame((()=>{i&&s!==window.location.href?l(window.location.href):window.scrollTo(t,e)})),Ec=null}}),[s]);return t.useEffect((()=>{function e(){c.current=window.scrollY}return e(),window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}}),[]),t.useEffect((()=>{!r&&o&&(e?(!window.matchMedia("(display-mode: standalone)").matches&&u(),n||window.setTimeout((()=>{d()}),500)):d())}),[e,o,s,n,r,u,d]),{restorePositionSetting:d}}({isOpen:j,modal:b,nested:l,hasBeenOpened:O,preventScrollRestoration:C,noBodyStyles:w});function ae(){return(window.innerWidth-Lc)/window.innerWidth}function se(e,t){var n;let r=e;const o=null==(n=window.getSelection())?void 0:n.toString(),i=G.current?Nc(G.current,x):null,a=new Date;if(r.hasAttribute("data-vaul-no-drag")||r.closest("[data-vaul-no-drag]"))return!1;if("right"===x||"left"===x)return!0;if(F.current&&a.getTime()-F.current.getTime()<500)return!1;if(null!==i&&("bottom"===x?i>0:i<0))return!0;if(o&&o.length>0)return!1;if(V.current&&a.getTime()-V.current.getTime()<d&&0===i)return V.current=a,!1;if(t)return V.current=a,!1;for(;r;){if(r.scrollHeight>r.clientHeight){if(0!==r.scrollTop)return V.current=new Date,!1;if("dialog"===r.getAttribute("role"))return!0}r=r.parentNode}return!0}function le(){G.current&&(!function(){if(!A||!G.current)return;G.current.classList.remove(Fc),W.current=!1,M(!1),$.current=new Date}(),null==y||y(),jc(G.current,{transform:Oc(x)?`translate3d(0, ${"bottom"===x?"100%":"-100%"}, 0)`:`translate3d(${"right"===x?"100%":"-100%"}, 0, 0)`,transition:`transform ${Pc.DURATION}s cubic-bezier(${Pc.EASE.join(",")})`}),jc(L.current,{opacity:"0",transition:`opacity ${Pc.DURATION}s cubic-bezier(${Pc.EASE.join(",")})`}),ue(!1),setTimeout((()=>{k(!1),R(!1)}),300),setTimeout((()=>{s&&Q(s[0])}),1e3*Pc.DURATION))}function ce(){if(!G.current)return;const e=document.querySelector("[vaul-drawer-wrapper]"),t=Nc(G.current,x);jc(G.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${Pc.DURATION}s cubic-bezier(${Pc.EASE.join(",")})`}),jc(L.current,{transition:`opacity ${Pc.DURATION}s cubic-bezier(${Pc.EASE.join(",")})`,opacity:"1"}),o&&t&&t>0&&j&&jc(e,{borderRadius:`${Ic}px`,overflow:"hidden",...Oc(x)?{transform:`scale(${ae()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${ae()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${Pc.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Pc.EASE.join(",")})`},!0)}function ue(e){const t=document.querySelector("[vaul-drawer-wrapper]");t&&o&&(e?(c&&(w||(jc(document.body,{background:document.body.style.backgroundColor||document.body.style.background}),jc(document.body,{background:"black"},!0))),jc(t,{borderRadius:`${Ic}px`,overflow:"hidden",...Oc(x)?{transform:`scale(${ae()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${ae()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${Pc.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Pc.EASE.join(",")})`})):(Rc(t,"overflow"),Rc(t,"transform"),Rc(t,"borderRadius"),jc(t,{transitionProperty:"transform, border-radius",transitionDuration:`${Pc.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Pc.EASE.join(",")})`})))}return t.useEffect((()=>()=>{ue(!1),ie()}),[]),t.useEffect((()=>{var e;function t(){if(!G.current)return;if(xc(document.activeElement)||H.current){var e;const t=(null==(e=window.visualViewport)?void 0:e.height)||0;let n=window.innerHeight-t;const r=G.current.getBoundingClientRect().height||0;X.current||(X.current=r);const o=G.current.getBoundingClientRect().top;if(Math.abs(q.current-n)>60&&(H.current=!H.current),s&&s.length>0&&te&&J){n+=te[J]||0}if(q.current=n,r>t||H.current){const e=G.current.getBoundingClientRect().height;let r=e;e>t&&(r=t-Lc),G.current.style.height=v?e-Math.max(n,0)+"px":`${Math.max(r,t-o)}px`}else G.current.style.height=`${X.current}px`;s&&s.length>0&&!H.current?G.current.style.bottom="0px":G.current.style.bottom=`${Math.max(n,0)}px`}}return null==(e=window.visualViewport)||e.addEventListener("resize",t),()=>{var e;return null==(e=window.visualViewport)?void 0:e.removeEventListener("resize",t)}}),[J,s,te]),t.useEffect((()=>{if(!j&&o){const e=setTimeout((()=>{Rc(document.body)}),200);return()=>clearTimeout(e)}}),[j,o]),t.useLayoutEffect((()=>{e?(R(!0),N(!0)):le()}),[e]),t.useEffect((()=>{T&&(null==n||n(j))}),[j]),t.useEffect((()=>{_(!0)}),[]),t.useEffect((()=>{j&&(jc(document.documentElement,{scrollBehavior:"auto"}),F.current=new Date,ue(!0))}),[j]),t.useEffect((()=>{if(G.current&&P){var e;const t=null==G||null==(e=G.current)?void 0:e.querySelectorAll("*");null==t||t.forEach((e=>{const t=e;(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth)&&t.classList.add("vaul-scrollable")}))}}),[P]),t.createElement(Yl,{modal:b,onOpenChange:t=>{void 0===e?t?(N(!0),R(t)):le():null==n||n(t)},open:j},t.createElement(oc.Provider,{value:{visible:P,activeSnapPoint:Z,snapPoints:s,setActiveSnapPoint:Q,drawerRef:G,overlayRef:L,scaleBackground:ue,onOpenChange:n,onPress:function(e){var t;(f||s)&&(G.current&&!G.current.contains(e.target)||(K.current=(null==(t=G.current)?void 0:t.getBoundingClientRect().height)||0,M(!0),z.current=new Date,cc()&&window.addEventListener("touchend",(()=>W.current=!1),{once:!0}),e.target.setPointerCapture(e.pointerId),U.current=Oc(x)?e.clientY:e.clientX))},setVisible:k,onRelease:function(e){if(!A||!G.current)return;G.current.classList.remove(Fc),W.current=!1,M(!1),$.current=new Date;const t=Nc(G.current,x);if(!se(e.target,!1)||!t||Number.isNaN(t))return;if(null===z.current)return;const n=$.current.getTime()-z.current.getTime(),r=U.current-(Oc(x)?e.clientY:e.clientX),o=Math.abs(r)/n;if(o>.05&&(D(!0),setTimeout((()=>{D(!1)}),200)),s){return ee({draggedDistance:r*("bottom"===x||"right"===x?1:-1),closeDrawer:le,velocity:o,dismissible:f}),void(null==a||a(e,!0))}if("bottom"===x||"right"===x?r>0:r<0)return ce(),void(null==a||a(e,!0));if(o>kc)return le(),void(null==a||a(e,!1));var i;if(t>=Math.min(null!=(i=G.current.getBoundingClientRect().height)?i:0,window.innerHeight)*u)return le(),void(null==a||a(e,!1));null==a||a(e,!0),ce()},onDrag:function(e){var t;if(G.current&&A){const n="bottom"===x||"right"===x?1:-1,r=(U.current-(Oc(x)?e.clientY:e.clientX))*n,a=r>0,l=s&&!f&&!a;if(l&&0===J)return;const c=Math.abs(r),u=document.querySelector("[vaul-drawer-wrapper]");let d=c/K.current;const p=oe(c,a);if(null!==p&&(d=p),l&&d>=1)return;if(!W.current&&!se(e.target,a))return;if(G.current.classList.add(Fc),W.current=!0,jc(G.current,{transition:"none"}),jc(L.current,{transition:"none"}),s&&ne({draggedDistance:r}),a&&!s){const e=(t=r,8*(Math.log(t+1)-2)),o=Math.min(-1*e,0)*n;return void jc(G.current,{transform:Oc(x)?`translate3d(0, ${o}px, 0)`:`translate3d(${o}px, 0, 0)`})}const h=1-d;if((re||m&&J===m-1)&&(null==i||i(e,d),jc(L.current,{opacity:`${h}`,transition:"none"},!0)),u&&L.current&&o){const e=Math.min(ae()+d*(1-ae()),1),t=8-8*d,n=Math.max(0,14-14*d);jc(u,{borderRadius:`${t}px`,transform:Oc(x)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:"none"},!0)}if(!s){const e=c*n;jc(G.current,{transform:Oc(x)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}},dismissible:f,handleOnly:p,isOpen:j,isDragging:A,shouldFade:re,closeDrawer:le,onNestedDrag:function(e,t){if(t<0)return;const n=Oc(x)?window.innerHeight:window.innerWidth,r=(n-Dc)/n,o=r+t*(1-r),i=t*Dc-Dc;jc(G.current,{transform:Oc(x)?`scale(${o}) translate3d(0, ${i}px, 0)`:`scale(${o}) translate3d(${i}px, 0, 0)`,transition:"none"})},onNestedOpenChange:function(e){const t=e?(window.innerWidth-Dc)/window.innerWidth:1,n=e?-Dc:0;B.current&&window.clearTimeout(B.current),jc(G.current,{transition:`transform ${Pc.DURATION}s cubic-bezier(${Pc.EASE.join(",")})`,transform:`scale(${t}) translate3d(0, ${n}px, 0)`}),!e&&G.current&&(B.current=setTimeout((()=>{const e=Nc(G.current,x);jc(G.current,{transition:"none",transform:Oc(x)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}),500))},onNestedRelease:function(e,t){const n=Oc(x)?window.innerHeight:window.innerWidth,r=t?(n-Dc)/n:1,o=t?-Dc:0;t&&jc(G.current,{transition:`transform ${Pc.DURATION}s cubic-bezier(${Pc.EASE.join(",")})`,transform:Oc(x)?`scale(${r}) translate3d(0, ${o}px, 0)`:`scale(${r}) translate3d(${o}px, 0, 0)`})},keyboardIsOpen:H,openProp:e,modal:b,snapPointsOffset:te,direction:x}},r))}const $c=t.forwardRef((function({preventCycle:e=!1,children:n,...r},o){const{visible:i,closeDrawer:a,isDragging:s,snapPoints:l,activeSnapPoint:c,setActiveSnapPoint:u,dismissible:d,handleOnly:f,onPress:p,onDrag:m}=ic(),h=t.useRef(null),g=t.useRef(!1);function v(){window.clearTimeout(h.current),g.current=!1}return t.createElement("div",{onClick:function(){g.current?v():window.setTimeout((()=>{!function(){if(s||e||g.current)return void v();if(v(),(!l||0===l.length)&&d)return void a();if(c===l[l.length-1]&&d)return void a();const t=l.findIndex((e=>e===c));if(-1===t)return;const n=l[t+1];u(n)}()}),120)},onDoubleClick:()=>{g.current=!0,a()},onPointerCancel:v,onPointerDown:e=>{f&&p(e),h.current=window.setTimeout((()=>{g.current=!0}),250)},onPointerMove:e=>{f&&m(e)},ref:o,"vaul-drawer-visible":i?"true":"false","vaul-handle":"","aria-hidden":"true",...r},t.createElement("span",{"vaul-handle-hitarea":"","aria-hidden":"true"},n))}));$c.displayName="Drawer.Handle";const Vc=t.forwardRef((function({children:e,...n},r){const{overlayRef:o,snapPoints:i,onRelease:a,shouldFade:s,isOpen:l,visible:c}=ic(),u=Cc(r,o),d=i&&i.length>0;return t.createElement(Ql,{onMouseUp:a,ref:u,"vaul-drawer-visible":c?"true":"false","vaul-overlay":"","vaul-snap-points":l&&d?"true":"false","vaul-snap-points-overlay":l&&s?"true":"false",...n})}));Vc.displayName="Drawer.Overlay";const Wc=t.forwardRef((function({onOpenAutoFocus:e,onPointerDownOutside:n,onAnimationEnd:r,style:o,...i},a){const{drawerRef:s,onPress:l,onRelease:c,onDrag:u,dismissible:d,keyboardIsOpen:f,snapPointsOffset:p,visible:m,closeDrawer:h,modal:g,openProp:v,onOpenChange:b,setVisible:y,handleOnly:w,direction:x}=ic(),C=Cc(a,s),E=t.useRef(null),S=t.useRef(!1);return t.useEffect((()=>{y(!0)}),[]),t.createElement(ec,{"vaul-drawer":"","vaul-drawer-direction":x,"vaul-drawer-visible":m?"true":"false",...i,ref:C,style:p&&p.length>0?{"--snap-point-height":`${p[0]}px`,...o}:o,onOpenAutoFocus:t=>{var n;e?e(t):(t.preventDefault(),null==(n=s.current)||n.focus())},onPointerDown:e=>{w||(null==i.onPointerDown||i.onPointerDown.call(i,e),E.current={x:e.clientX,y:e.clientY},l(e))},onPointerDownOutside:e=>{null==n||n(e),g&&!e.defaultPrevented?(f.current&&(f.current=!1),e.preventDefault(),null==b||b(!1),d&&void 0===v&&h()):e.preventDefault()},onFocusOutside:e=>{g||e.preventDefault()},onEscapeKeyDown:e=>{g||e.preventDefault()},onPointerMove:e=>{if(w)return;if(null==i.onPointerMove||i.onPointerMove.call(i,e),!E.current)return;const t=e.clientY-E.current.y,n=e.clientX-E.current.x,r="touch"===e.pointerType?10:2,o=((e,t,n=0)=>{if(S.current)return!0;const r=Math.abs(e.y),o=Math.abs(e.x),i=o>r,a=["bottom","right"].includes(t)?1:-1;if("left"===t||"right"===t){if(!(e.x*a<0)&&o>=0&&o<=n)return i}else if(!(e.y*a<0)&&r>=0&&r<=n)return!i;return S.current=!0,!0})({x:n,y:t},x,r);o?u(e):(Math.abs(n)>r||Math.abs(t)>r)&&(E.current=null)},onPointerUp:e=>{null==i.onPointerUp||i.onPointerUp.call(i,e),E.current=null,S.current=!1,c(e)}})}));Wc.displayName="Drawer.Content";const Bc={Root:zc,NestedRoot:function({onDrag:e,onOpenChange:n,...r}){const{onNestedDrag:o,onNestedOpenChange:i,onNestedRelease:a}=ic();if(!o)throw new Error("Drawer.NestedRoot must be placed in another drawer");return t.createElement(zc,{nested:!0,onClose:()=>{i(!1)},onDrag:(t,n)=>{o(t,n),null==e||e(t,n)},onOpenChange:e=>{e&&i(e),null==n||n(e)},onRelease:a,...r})},Content:Wc,Handle:$c,Overlay:Vc,Trigger:Zl,Portal:Jl,Close:rc,Title:tc,Description:nc},Uc=Bc.Trigger,Hc=Bc.Portal,qc=Bc.Close,Gc=e=>{var t=de(e,["shouldScaleBackground"]);return r.jsx(Bc.Root,Object.assign({shouldScaleBackground:!0},t,{noBodyStyles:!0,disablePreventScroll:!0}))};Gc.displayName="Drawer";const Kc=a.forwardRef(((e,t)=>{var{className:n,backdropHexColor:o="#000000"}=e,i=de(e,["className","backdropHexColor"]);const a={backgroundColor:`${o}CC`};return r.jsx(Bc.Overlay,Object.assign({style:a,ref:t,className:ee("fixed inset-0 z-50",n)},i))}));Kc.displayName=Bc.Overlay.displayName;const Xc=a.forwardRef(((e,t)=>{var{className:n,children:o,hideBackdrop:i=!1,backdropHexColor:a,isSheet:s=!1}=e,l=de(e,["className","children","hideBackdrop","backdropHexColor","isSheet"]);const c=s?{height:"calc(100vh - 112px)"}:{maxHeight:"calc(100vh - 112px)"};return r.jsxs(Hc,{children:[i?null:r.jsx(Kc,{backdropHexColor:a}),r.jsxs(Bc.Content,Object.assign({ref:t,style:c,className:ee("fixed inset-x-0 bottom-0 z-50 flex h-auto flex-col rounded-t-2xl bg-coreColors-modalBackground",n)},l,{children:[r.jsx("div",{className:"mx-auto mb-2 mt-2 h-[4px] w-[40px] rounded-full bg-coreColors-dividingLines"}),o]}))]})}));Xc.displayName="DrawerContentBase";const Yc=e=>{var{className:t}=e,n=de(e,["className"]);return r.jsx("div",Object.assign({className:ee(t)},n))};Yc.displayName="DrawerHeaderBase";const Zc=a.forwardRef(((e,t)=>{var{className:n}=e,o=de(e,["className"]);return r.jsx(Bc.Title,Object.assign({ref:t,className:ee("text-textColors-primaryColor text-center text-[18px] font-medium leading-[24px] truncate my-0 mx-4",n)},o))}));Zc.displayName=Bc.Title.displayName;const Jc=e=>{var{className:t}=e,n=de(e,["className"]);return r.jsx("div",Object.assign({className:ee("mt-auto flex flex-row gap-2 pb-8 pt-4 pl-4 pr-4 border-t border-coreColors-dividingLines",t)},n))};Jc.displayName="DrawerFooter";const Qc=a.forwardRef(((e,t)=>{var{className:n}=e,o=de(e,["className"]);return r.jsx(Bc.Description,Object.assign({ref:t,className:ee("text-sm text-muted-foreground",n)},o))}));Qc.displayName=Bc.Description.displayName;function eu(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function tu(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function nu(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return a.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function ru(e){const t=a.useRef(e);return a.useEffect((()=>{t.current=e})),a.useMemo((()=>(...e)=>t.current?.(...e)),[])}function ou({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=function({defaultProp:e,onChange:t}){const n=a.useState(e),[r]=n,o=a.useRef(r),i=ru(t);return a.useEffect((()=>{o.current!==r&&(i(r),o.current=r)}),[r,o,i]),n}({defaultProp:t,onChange:n}),i=void 0!==e,s=i?e:r,l=ru(n);return[s,a.useCallback((t=>{if(i){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[i,e,o,l])]}var iu=a.forwardRef(((e,t)=>{const{children:n,...o}=e,i=a.Children.toArray(n),s=i.find(lu);if(s){const e=s.props.children,n=i.map((t=>t===s?a.Children.count(e)>1?a.Children.only(null):a.isValidElement(e)?e.props.children:null:t));return r.jsx(au,{...o,ref:t,children:a.isValidElement(e)?a.cloneElement(e,void 0,n):null})}return r.jsx(au,{...o,ref:t,children:n})}));iu.displayName="Slot";var au=a.forwardRef(((e,t)=>{const{children:n,...r}=e;if(a.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n);return a.cloneElement(n,{...cu(r,n.props),ref:t?tu(t,e):e})}return a.Children.count(n)>1?a.Children.only(null):null}));au.displayName="SlotClone";var su=({children:e})=>r.jsx(r.Fragment,{children:e});function lu(e){return a.isValidElement(e)&&e.type===su}function cu(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}var uu=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const n=a.forwardRef(((e,n)=>{const{asChild:o,...i}=e,a=o?iu:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),r.jsx(a,{...i,ref:n})}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function du(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function fu(e,t=[]){let n=[];const o=()=>{const t=n.map((e=>a.createContext(e)));return function(n){const r=n?.[e]||t;return a.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return o.scopeName=e,[function(t,o){const i=a.createContext(o),s=n.length;function l(t){const{scope:n,children:o,...l}=t,c=n?.[e][s]||i,u=a.useMemo((()=>l),Object.values(l));return r.jsx(c.Provider,{value:u,children:o})}return n=[...n,o],l.displayName=t+"Provider",[l,function(n,r){const l=r?.[e][s]||i,c=a.useContext(l);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},pu(o,...t)]}function pu(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return a.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function mu(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function hu(...e){return a.useCallback(mu(...e),e)}var gu=a.forwardRef(((e,t)=>{const{children:n,...o}=e,i=a.Children.toArray(n),s=i.find(yu);if(s){const e=s.props.children,n=i.map((t=>t===s?a.Children.count(e)>1?a.Children.only(null):a.isValidElement(e)?e.props.children:null:t));return r.jsx(vu,{...o,ref:t,children:a.isValidElement(e)?a.cloneElement(e,void 0,n):null})}return r.jsx(vu,{...o,ref:t,children:n})}));gu.displayName="Slot";var vu=a.forwardRef(((e,t)=>{const{children:n,...r}=e;if(a.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n);return a.cloneElement(n,{...wu(r,n.props),ref:t?mu(t,e):e})}return a.Children.count(n)>1?a.Children.only(null):null}));vu.displayName="SlotClone";var bu=({children:e})=>r.jsx(r.Fragment,{children:e});function yu(e){return a.isValidElement(e)&&e.type===bu}function wu(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}var xu=a.createContext(void 0);var Cu=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const n=a.forwardRef(((e,n)=>{const{asChild:o,...i}=e,a=o?gu:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),r.jsx(a,{...i,ref:n})}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function Eu(e,t){e&&s.flushSync((()=>e.dispatchEvent(t)))}function Su(e){const t=a.useRef(e);return a.useEffect((()=>{t.current=e})),a.useMemo((()=>(...e)=>t.current?.(...e)),[])}var ju,Ru="dismissableLayer.update",Ou="dismissableLayer.pointerDownOutside",Nu="dismissableLayer.focusOutside",Pu=a.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ku=a.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:l,onDismiss:c,...u}=e,d=a.useContext(Pu),[f,p]=a.useState(null),m=f?.ownerDocument??globalThis?.document,[,h]=a.useState({}),g=hu(t,(e=>p(e))),v=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=v.indexOf(b),w=f?v.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,C=w>=y,E=function(e,t=globalThis?.document){const n=Su(e),r=a.useRef(!1),o=a.useRef((()=>{}));return a.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){_u(Ou,n,i,{discrete:!0})};const i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...d.branches].some((e=>e.contains(t)));C&&!n&&(i?.(e),l?.(e),e.defaultPrevented||c?.())}),m),S=function(e,t=globalThis?.document){const n=Su(e),r=a.useRef(!1);return a.useEffect((()=>{const e=e=>{if(e.target&&!r.current){_u(Nu,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...d.branches].some((e=>e.contains(t)))||(s?.(e),l?.(e),e.defaultPrevented||c?.())}),m);return function(e,t=globalThis?.document){const n=Su(e);a.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}((e=>{w===d.layers.size-1&&(o?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))}),m),a.useEffect((()=>{if(f)return n&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(ju=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Tu(),()=>{n&&1===d.layersWithOutsidePointerEventsDisabled.size&&(m.body.style.pointerEvents=ju)}}),[f,m,n,d]),a.useEffect((()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Tu())}),[f,d]),a.useEffect((()=>{const e=()=>h({});return document.addEventListener(Ru,e),()=>document.removeEventListener(Ru,e)}),[]),r.jsx(Cu.div,{...u,ref:g,style:{pointerEvents:x?C?"auto":"none":void 0,...e.style},onFocusCapture:du(e.onFocusCapture,S.onFocusCapture),onBlurCapture:du(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:du(e.onPointerDownCapture,E.onPointerDownCapture)})}));ku.displayName="DismissableLayer";function Tu(){const e=new CustomEvent(Ru);document.dispatchEvent(e)}function _u(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Eu(o,i):o.dispatchEvent(i)}a.forwardRef(((e,t)=>{const n=a.useContext(Pu),o=a.useRef(null),i=hu(t,o);return a.useEffect((()=>{const e=o.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),r.jsx(Cu.div,{...e,ref:i})})).displayName="DismissableLayerBranch";var Au=0;function Mu(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}function Iu(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}var Du=a.forwardRef(((e,t)=>{const{children:n,...o}=e,i=a.Children.toArray(n),s=i.find(zu);if(s){const e=s.props.children,n=i.map((t=>t===s?a.Children.count(e)>1?a.Children.only(null):a.isValidElement(e)?e.props.children:null:t));return r.jsx(Lu,{...o,ref:t,children:a.isValidElement(e)?a.cloneElement(e,void 0,n):null})}return r.jsx(Lu,{...o,ref:t,children:n})}));Du.displayName="Slot";var Lu=a.forwardRef(((e,t)=>{const{children:n,...r}=e;if(a.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n);return a.cloneElement(n,{...$u(r,n.props),ref:t?Iu(t,e):e})}return a.Children.count(n)>1?a.Children.only(null):null}));Lu.displayName="SlotClone";var Fu=({children:e})=>r.jsx(r.Fragment,{children:e});function zu(e){return a.isValidElement(e)&&e.type===Fu}function $u(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}var Vu=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const n=a.forwardRef(((e,n)=>{const{asChild:o,...i}=e,a=o?Du:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),r.jsx(a,{...i,ref:n})}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function Wu(e){const t=a.useRef(e);return a.useEffect((()=>{t.current=e})),a.useMemo((()=>(...e)=>t.current?.(...e)),[])}var Bu="focusScope.autoFocusOnMount",Uu="focusScope.autoFocusOnUnmount",Hu={bubbles:!1,cancelable:!0},qu=a.forwardRef(((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...l}=e,[c,u]=a.useState(null),d=Wu(i),f=Wu(s),p=a.useRef(null),m=function(...e){return a.useCallback(Iu(...e),e)}(t,(e=>u(e))),h=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect((()=>{if(o){let e=function(e){if(h.paused||!c)return;const t=e.target;c.contains(t)?p.current=t:Yu(p.current,{select:!0})},t=function(e){if(h.paused||!c)return;const t=e.relatedTarget;null!==t&&(c.contains(t)||Yu(p.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Yu(c)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[o,c,h.paused]),a.useEffect((()=>{if(c){Zu.add(h);const t=document.activeElement;if(!c.contains(t)){const n=new CustomEvent(Bu,Hu);c.addEventListener(Bu,d),c.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Yu(r,{select:t}),document.activeElement!==n)return}((e=Gu(c),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&Yu(c))}return()=>{c.removeEventListener(Bu,d),setTimeout((()=>{const e=new CustomEvent(Uu,Hu);c.addEventListener(Uu,f),c.dispatchEvent(e),e.defaultPrevented||Yu(t??document.body,{select:!0}),c.removeEventListener(Uu,f),Zu.remove(h)}),0)}}var e}),[c,d,f,h]);const g=a.useCallback((e=>{if(!n&&!o)return;if(h.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=document.activeElement;if(t&&r){const t=e.currentTarget,[o,i]=function(e){const t=Gu(e),n=Ku(t,e),r=Ku(t.reverse(),e);return[n,r]}(t);o&&i?e.shiftKey||r!==i?e.shiftKey&&r===o&&(e.preventDefault(),n&&Yu(i,{select:!0})):(e.preventDefault(),n&&Yu(o,{select:!0})):r===t&&e.preventDefault()}}),[n,o,h.paused]);return r.jsx(Vu.div,{tabIndex:-1,...l,ref:m,onKeyDown:g})}));function Gu(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Ku(e,t){for(const n of e)if(!Xu(n,{upTo:t}))return n}function Xu(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function Yu(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}qu.displayName="FocusScope";var Zu=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Ju(e,t),e.unshift(t)},remove(t){e=Ju(e,t),e[0]?.resume()}}}();function Ju(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var Qu=Boolean(globalThis?.document)?a.useLayoutEffect:()=>{};const ed=["top","right","bottom","left"],td=Math.min,nd=Math.max,rd=Math.round,od=Math.floor,id=e=>({x:e,y:e}),ad={left:"right",right:"left",bottom:"top",top:"bottom"},sd={start:"end",end:"start"};function ld(e,t,n){return nd(e,td(t,n))}function cd(e,t){return"function"==typeof e?e(t):e}function ud(e){return e.split("-")[0]}function dd(e){return e.split("-")[1]}function fd(e){return"x"===e?"y":"x"}function pd(e){return"y"===e?"height":"width"}function md(e){return["top","bottom"].includes(ud(e))?"y":"x"}function hd(e){return fd(md(e))}function gd(e){return e.replace(/start|end/g,(e=>sd[e]))}function vd(e){return e.replace(/left|right|bottom|top/g,(e=>ad[e]))}function bd(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function yd(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function wd(e,t,n){let{reference:r,floating:o}=e;const i=md(t),a=hd(t),s=pd(a),l=ud(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(dd(t)){case"start":p[a]-=f*(n&&c?-1:1);break;case"end":p[a]+=f*(n&&c?-1:1)}return p}async function xd(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=cd(t,e),m=bd(p),h=s[f?"floating"===d?"reference":"floating":d],g=yd(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),v="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),y=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},w=yd(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:b,strategy:l}):v);return{top:(g.top-w.top+m.top)/y.y,bottom:(w.bottom-g.bottom+m.bottom)/y.y,left:(g.left-w.left+m.left)/y.x,right:(w.right-g.right+m.right)/y.x}}function Cd(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ed(e){return ed.some((t=>e[t]>=0))}function Sd(e){return Od(e)?(e.nodeName||"").toLowerCase():"#document"}function jd(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Rd(e){var t;return null==(t=(Od(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Od(e){return e instanceof Node||e instanceof jd(e).Node}function Nd(e){return e instanceof Element||e instanceof jd(e).Element}function Pd(e){return e instanceof HTMLElement||e instanceof jd(e).HTMLElement}function kd(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof jd(e).ShadowRoot)}function Td(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ld(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function _d(e){return["table","td","th"].includes(Sd(e))}function Ad(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Md(e){const t=Id(),n=Nd(e)?Ld(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function Id(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Dd(e){return["html","body","#document"].includes(Sd(e))}function Ld(e){return jd(e).getComputedStyle(e)}function Fd(e){return Nd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function zd(e){if("html"===Sd(e))return e;const t=e.assignedSlot||e.parentNode||kd(e)&&e.host||Rd(e);return kd(t)?t.host:t}function $d(e){const t=zd(e);return Dd(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pd(t)&&Td(t)?t:$d(t)}function Vd(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=$d(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=jd(o);if(i){const e=Wd(a);return t.concat(a,a.visualViewport||[],Td(o)?o:[],e&&n?Vd(e):[])}return t.concat(o,Vd(o,[],n))}function Wd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Bd(e){const t=Ld(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Pd(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=rd(n)!==i||rd(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Ud(e){return Nd(e)?e:e.contextElement}function Hd(e){const t=Ud(e);if(!Pd(t))return id(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Bd(t);let a=(i?rd(n.width):n.width)/r,s=(i?rd(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const qd=id(0);function Gd(e){const t=jd(e);return Id()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:qd}function Kd(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Ud(e);let a=id(1);t&&(r?Nd(r)&&(a=Hd(r)):a=Hd(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==jd(e))&&t}(i,n,r)?Gd(i):id(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=jd(i),t=r&&Nd(r)?jd(r):r;let n=e,o=Wd(n);for(;o&&r&&t!==n;){const e=Hd(o),t=o.getBoundingClientRect(),r=Ld(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=a,n=jd(o),o=Wd(n)}}return yd({width:u,height:d,x:l,y:c})}function Xd(e){return Kd(Rd(e)).left+Fd(e).scrollLeft}function Yd(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=jd(e),r=Rd(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=Id();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=Rd(e),n=Fd(e),r=e.ownerDocument.body,o=nd(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=nd(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Xd(e);const s=-n.scrollTop;return"rtl"===Ld(r).direction&&(a+=nd(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(Rd(e));else if(Nd(t))r=function(e,t){const n=Kd(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Pd(e)?Hd(e):id(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Gd(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return yd(r)}function Zd(e,t){const n=zd(e);return!(n===t||!Nd(n)||Dd(n))&&("fixed"===Ld(n).position||Zd(n,t))}function Jd(e,t,n){const r=Pd(t),o=Rd(t),i="fixed"===n,a=Kd(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=id(0);if(r||!r&&!i)if(("body"!==Sd(t)||Td(o))&&(s=Fd(t)),r){const e=Kd(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=Xd(o));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Qd(e){return"static"===Ld(e).position}function ef(e,t){return Pd(e)&&"fixed"!==Ld(e).position?t?t(e):e.offsetParent:null}function tf(e,t){const n=jd(e);if(Ad(e))return n;if(!Pd(e)){let t=zd(e);for(;t&&!Dd(t);){if(Nd(t)&&!Qd(t))return t;t=zd(t)}return n}let r=ef(e,t);for(;r&&_d(r)&&Qd(r);)r=ef(r,t);return r&&Dd(r)&&Qd(r)&&!Md(r)?n:r||function(e){let t=zd(e);for(;Pd(t)&&!Dd(t);){if(Md(t))return t;if(Ad(t))return null;t=zd(t)}return null}(e)||n}const nf={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=Rd(r),s=!!t&&Ad(t.floating);if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=id(1);const u=id(0),d=Pd(r);if((d||!d&&!i)&&(("body"!==Sd(r)||Td(a))&&(l=Fd(r)),Pd(r))){const e=Kd(r);c=Hd(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}},getDocumentElement:Rd,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?Ad(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Vd(e,[],!1).filter((e=>Nd(e)&&"body"!==Sd(e))),o=null;const i="fixed"===Ld(e).position;let a=i?zd(e):e;for(;Nd(a)&&!Dd(a);){const t=Ld(a),n=Md(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Td(a)&&!n&&Zd(e,a))?r=r.filter((e=>e!==a)):o=t,a=zd(a)}return t.set(e,r),r}(t,this._c):[].concat(n),a=[...i,r],s=a[0],l=a.reduce(((e,n)=>{const r=Yd(t,n,o);return e.top=nd(r.top,e.top),e.right=td(r.right,e.right),e.bottom=td(r.bottom,e.bottom),e.left=nd(r.left,e.left),e}),Yd(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:tf,getElementRects:async function(e){const t=this.getOffsetParent||tf,n=this.getDimensions,r=await n(e.floating);return{reference:Jd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Bd(e);return{width:t,height:n}},getScale:Hd,isElement:Nd,isRTL:function(e){return"rtl"===Ld(e).direction}};function rf(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=Ud(e),u=o||i?[...c?Vd(c):[],...Vd(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,r=null;const o=Rd(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const{left:c,top:u,width:d,height:f}=e.getBoundingClientRect();if(s||t(),!d||!f)return;const p={rootMargin:-od(u)+"px "+-od(o.clientWidth-(c+d))+"px "+-od(o.clientHeight-(u+f))+"px "+-od(c)+"px",threshold:nd(0,td(1,l))||1};let m=!0;function h(e){const t=e[0].intersectionRatio;if(t!==l){if(!m)return a();t?a(!1,t):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}m=!1}try{r=new IntersectionObserver(h,{...p,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(h,p)}r.observe(e)}(!0),i}(c,n):null;let f,p=-1,m=null;a&&(m=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=m)||e.observe(t)}))),n()})),c&&!l&&m.observe(c),m.observe(t));let h=l?Kd(e):null;return l&&function t(){const r=Kd(e);!h||r.x===h.x&&r.y===h.y&&r.width===h.width&&r.height===h.height||n();h=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=m)||e.disconnect(),m=null,l&&cancelAnimationFrame(f)}}const of=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=ud(n),s=dd(n),l="y"===md(n),c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=cd(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&"number"==typeof m&&(p="end"===s?-1*m:m),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},af=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=cd(e,t),c={x:n,y:r},u=await xd(t,l),d=md(ud(o)),f=fd(d);let p=c[f],m=c[d];if(i){const e="y"===f?"bottom":"right";p=ld(p+u["y"===f?"top":"left"],p,p-u[e])}if(a){const e="y"===d?"bottom":"right";m=ld(m+u["y"===d?"top":"left"],m,m-u[e])}const h=s.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-n,y:h.y-r}}}}},sf=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...g}=cd(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=ud(o),b=md(s),y=ud(s)===s,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=f||(y||!h?[vd(s)]:function(e){const t=vd(e);return[gd(e),t,gd(t)]}(s)),C="none"!==m;!f&&C&&x.push(...function(e,t,n,r){const o=dd(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}(ud(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(gd)))),i}(s,h,m,w));const E=[s,...x],S=await xd(t,g),j=[];let R=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&j.push(S[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=dd(e),o=hd(e),i=pd(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=vd(a)),[a,vd(a)]}(o,a,w);j.push(S[e[0]],S[e[1]])}if(R=[...R,{placement:o,overflows:j}],!j.every((e=>e<=0))){var O,N;const e=((null==(O=i.flip)?void 0:O.index)||0)+1,t=E[e];if(t)return{data:{index:e,overflows:R},reset:{placement:t}};let n=null==(N=R.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:N.placement;if(!n)switch(p){case"bestFit":{var P;const e=null==(P=R.filter((e=>{if(C){const t=md(e.placement);return t===b||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:P[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},lf=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...s}=cd(e,t),l=await xd(t,s),c=ud(n),u=dd(n),d="y"===md(n),{width:f,height:p}=r.floating;let m,h;"top"===c||"bottom"===c?(m=c,h=u===(await(null==o.isRTL?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(h=c,m="end"===u?"top":"bottom");const g=p-l.top-l.bottom,v=f-l.left-l.right,b=td(p-l[m],g),y=td(f-l[h],v),w=!t.middlewareData.shift;let x=b,C=y;if(d?C=u||w?td(y,v):v:x=u||w?td(b,g):g,w&&!u){const e=nd(l.left,0),t=nd(l.right,0),n=nd(l.top,0),r=nd(l.bottom,0);d?C=f-2*(0!==e||0!==t?e+t:nd(l.left,l.right)):x=p-2*(0!==n||0!==r?n+r:nd(l.top,l.bottom))}await a({...t,availableWidth:C,availableHeight:x});const E=await o.getDimensions(i.floating);return f!==E.width||p!==E.height?{reset:{rects:!0}}:{}}}},cf=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=cd(e,t);switch(r){case"referenceHidden":{const e=Cd(await xd(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ed(e)}}}case"escaped":{const e=Cd(await xd(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ed(e)}}}default:return{}}}}},uf=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=cd(e,t)||{};if(null==c)return{};const d=bd(u),f={x:n,y:r},p=hd(o),m=pd(p),h=await a.getDimensions(c),g="y"===p,v=g?"top":"left",b=g?"bottom":"right",y=g?"clientHeight":"clientWidth",w=i.reference[m]+i.reference[p]-f[p]-i.floating[m],x=f[p]-i.reference[p],C=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let E=C?C[y]:0;E&&await(null==a.isElement?void 0:a.isElement(C))||(E=s.floating[y]||i.floating[m]);const S=w/2-x/2,j=E/2-h[m]/2-1,R=td(d[v],j),O=td(d[b],j),N=R,P=E-h[m]-O,k=E/2-h[m]/2+S,T=ld(N,k,P),_=!l.arrow&&null!=dd(o)&&k!==T&&i.reference[m]/2-(k<N?R:O)-h[m]/2<0,A=_?k<N?k-N:k-P:0;return{[p]:f[p]+A,data:{[p]:T,centerOffset:k-T-A,..._&&{alignmentOffset:A}},reset:_}}}),df=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=cd(e,t),u={x:n,y:r},d=md(o),f=fd(d);let p=u[f],m=u[d];const h=cd(s,t),g="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+g.mainAxis,n=i.reference[f]+i.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(c){var v,b;const e="y"===f?"width":"height",t=["top","left"].includes(ud(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(v=a.offset)?void 0:v[d])||0)+(t?0:g.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(b=a.offset)?void 0:b[d])||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},ff=(e,t,n)=>{const r=new Map,o={platform:nf,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=wd(c,r,l),f=r,p={},m=0;for(let n=0;n<s.length;n++){const{name:i,fn:h}=s[n],{x:g,y:v,data:b,reset:y}=await h({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=v?v:d,p={...p,[i]:{...p[i],...b}},y&&m<=50&&(m++,"object"==typeof y&&(y.placement&&(f=y.placement),y.rects&&(c=!0===y.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):y.rects),({x:u,y:d}=wd(c,f,l))),n=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var pf="undefined"!=typeof document?t.useLayoutEffect:t.useEffect;function mf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!mf(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!mf(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function hf(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function gf(e,t){const n=hf(e);return Math.round(t*n)/n}function vf(e){const t=a.useRef(e);return pf((()=>{t.current=e})),t}const bf=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?uf({element:n.current,padding:r}).fn(t):{}:n?uf({element:n,padding:r}).fn(t):{};var o}}),yf=(e,t)=>({...of(e),options:[e,t]}),wf=(e,t)=>({...af(e),options:[e,t]}),xf=(e,t)=>({...df(e),options:[e,t]}),Cf=(e,t)=>({...sf(e),options:[e,t]}),Ef=(e,t)=>({...lf(e),options:[e,t]}),Sf=(e,t)=>({...cf(e),options:[e,t]}),jf=(e,t)=>({...bf(e),options:[e,t]});function Rf(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function Of(...e){return a.useCallback(Rf(...e),e)}var Nf=a.forwardRef(((e,t)=>{const{children:n,...o}=e,i=a.Children.toArray(n),s=i.find(Tf);if(s){const e=s.props.children,n=i.map((t=>t===s?a.Children.count(e)>1?a.Children.only(null):a.isValidElement(e)?e.props.children:null:t));return r.jsx(Pf,{...o,ref:t,children:a.isValidElement(e)?a.cloneElement(e,void 0,n):null})}return r.jsx(Pf,{...o,ref:t,children:n})}));Nf.displayName="Slot";var Pf=a.forwardRef(((e,t)=>{const{children:n,...r}=e;if(a.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n);return a.cloneElement(n,{..._f(r,n.props),ref:t?Rf(t,e):e})}return a.Children.count(n)>1?a.Children.only(null):null}));Pf.displayName="SlotClone";var kf=({children:e})=>r.jsx(r.Fragment,{children:e});function Tf(e){return a.isValidElement(e)&&e.type===kf}function _f(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}var Af=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const n=a.forwardRef(((e,n)=>{const{asChild:o,...i}=e,a=o?Nf:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),r.jsx(a,{...i,ref:n})}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{}),Mf=a.forwardRef(((e,t)=>{const{children:n,width:o=10,height:i=5,...a}=e;return r.jsx(Af.svg,{...a,ref:t,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:r.jsx("polygon",{points:"0,0 30,0 15,10"})})}));Mf.displayName="Arrow";var If=Mf;function Df(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return a.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}var Lf=Boolean(globalThis?.document)?a.useLayoutEffect:()=>{};var Ff="Popper",[zf,$f]=function(e,t=[]){let n=[];const o=()=>{const t=n.map((e=>a.createContext(e)));return function(n){const r=n?.[e]||t;return a.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return o.scopeName=e,[function(t,o){const i=a.createContext(o),s=n.length;function l(t){const{scope:n,children:o,...l}=t,c=n?.[e][s]||i,u=a.useMemo((()=>l),Object.values(l));return r.jsx(c.Provider,{value:u,children:o})}return n=[...n,o],l.displayName=t+"Provider",[l,function(n,r){const l=r?.[e][s]||i,c=a.useContext(l);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},Df(o,...t)]}(Ff),[Vf,Wf]=zf(Ff),Bf=e=>{const{__scopePopper:t,children:n}=e,[o,i]=a.useState(null);return r.jsx(Vf,{scope:t,anchor:o,onAnchorChange:i,children:n})};Bf.displayName=Ff;var Uf="PopperAnchor",Hf=a.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:o,...i}=e,s=Wf(Uf,n),l=a.useRef(null),c=Of(t,l);return a.useEffect((()=>{s.onAnchorChange(o?.current||l.current)})),o?null:r.jsx(Af.div,{...i,ref:c})}));Hf.displayName=Uf;var qf="PopperContent",[Gf,Kf]=zf(qf),Xf=a.forwardRef(((e,t)=>{const{__scopePopper:n,side:o="bottom",sideOffset:i=0,align:l="center",alignOffset:c=0,arrowPadding:u=0,avoidCollisions:d=!0,collisionBoundary:f=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:h=!1,updatePositionStrategy:g="optimized",onPlaced:v,...b}=e,y=Wf(qf,n),[w,x]=a.useState(null),C=Of(t,(e=>x(e))),[E,S]=a.useState(null),j=function(e){const[t,n]=a.useState(void 0);return Lf((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}(E),R=j?.width??0,O=j?.height??0,N=o+("center"!==l?"-"+l:""),P="number"==typeof p?p:{top:0,right:0,bottom:0,left:0,...p},k=Array.isArray(f)?f:[f],T=k.length>0,_={padding:P,boundary:k.filter(Qf),altBoundary:T},{refs:A,floatingStyles:M,placement:I,isPositioned:D,middlewareData:L}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:l}={},transform:c=!0,whileElementsMounted:u,open:d}=e,[f,p]=a.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=a.useState(r);mf(m,r)||h(r);const[g,v]=a.useState(null),[b,y]=a.useState(null),w=a.useCallback((e=>{e!==S.current&&(S.current=e,v(e))}),[]),x=a.useCallback((e=>{e!==j.current&&(j.current=e,y(e))}),[]),C=i||g,E=l||b,S=a.useRef(null),j=a.useRef(null),R=a.useRef(f),O=null!=u,N=vf(u),P=vf(o),k=a.useCallback((()=>{if(!S.current||!j.current)return;const e={placement:t,strategy:n,middleware:m};P.current&&(e.platform=P.current),ff(S.current,j.current,e).then((e=>{const t={...e,isPositioned:!0};T.current&&!mf(R.current,t)&&(R.current=t,s.flushSync((()=>{p(t)})))}))}),[m,t,n,P]);pf((()=>{!1===d&&R.current.isPositioned&&(R.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[d]);const T=a.useRef(!1);pf((()=>(T.current=!0,()=>{T.current=!1})),[]),pf((()=>{if(C&&(S.current=C),E&&(j.current=E),C&&E){if(N.current)return N.current(C,E,k);k()}}),[C,E,k,N,O]);const _=a.useMemo((()=>({reference:S,floating:j,setReference:w,setFloating:x})),[w,x]),A=a.useMemo((()=>({reference:C,floating:E})),[C,E]),M=a.useMemo((()=>{const e={position:n,left:0,top:0};if(!A.floating)return e;const t=gf(A.floating,f.x),r=gf(A.floating,f.y);return c?{...e,transform:"translate("+t+"px, "+r+"px)",...hf(A.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,c,A.floating,f.x,f.y]);return a.useMemo((()=>({...f,update:k,refs:_,elements:A,floatingStyles:M})),[f,k,_,A,M])}({strategy:"fixed",placement:N,whileElementsMounted:(...e)=>rf(...e,{animationFrame:"always"===g}),elements:{reference:y.anchor},middleware:[yf({mainAxis:i+O,alignmentAxis:c}),d&&wf({mainAxis:!0,crossAxis:!1,limiter:"partial"===m?xf():void 0,..._}),d&&Cf({..._}),Ef({..._,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${n}px`),a.setProperty("--radix-popper-available-height",`${r}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),E&&jf({element:E,padding:u}),ep({arrowWidth:R,arrowHeight:O}),h&&Sf({strategy:"referenceHidden",..._})]}),[F,z]=tp(I),$=function(e){const t=a.useRef(e);return a.useEffect((()=>{t.current=e})),a.useMemo((()=>(...e)=>t.current?.(...e)),[])}(v);Lf((()=>{D&&$?.()}),[D,$]);const V=L.arrow?.x,W=L.arrow?.y,B=0!==L.arrow?.centerOffset,[U,H]=a.useState();return Lf((()=>{w&&H(window.getComputedStyle(w).zIndex)}),[w]),r.jsx("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{...M,transform:D?M.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:U,"--radix-popper-transform-origin":[L.transformOrigin?.x,L.transformOrigin?.y].join(" "),...L.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:r.jsx(Gf,{scope:n,placedSide:F,onArrowChange:S,arrowX:V,arrowY:W,shouldHideArrow:B,children:r.jsx(Af.div,{"data-side":F,"data-align":z,...b,ref:C,style:{...b.style,animation:D?void 0:"none"}})})})}));Xf.displayName=qf;var Yf="PopperArrow",Zf={top:"bottom",right:"left",bottom:"top",left:"right"},Jf=a.forwardRef((function(e,t){const{__scopePopper:n,...o}=e,i=Kf(Yf,n),a=Zf[i.placedSide];return r.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:r.jsx(If,{...o,ref:t,style:{...o.style,display:"block"}})})}));function Qf(e){return null!==e}Jf.displayName=Yf;var ep=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=0!==o.arrow?.centerOffset,a=i?0:e.arrowWidth,s=i?0:e.arrowHeight,[l,c]=tp(n),u={start:"0%",center:"50%",end:"100%"}[c],d=(o.arrow?.x??0)+a/2,f=(o.arrow?.y??0)+s/2;let p="",m="";return"bottom"===l?(p=i?u:`${d}px`,m=-s+"px"):"top"===l?(p=i?u:`${d}px`,m=`${r.floating.height+s}px`):"right"===l?(p=-s+"px",m=i?u:`${f}px`):"left"===l&&(p=`${r.floating.width+s}px`,m=i?u:`${f}px`),{data:{x:p,y:m}}}});function tp(e){const[t,n="center"]=e.split("-");return[t,n]}var np=Bf,rp=Hf,op=Xf,ip=Jf,ap=a.forwardRef(((e,t)=>{const{container:n,...i}=e,[s,l]=a.useState(!1);Qu((()=>l(!0)),[]);const c=n||s&&globalThis?.document?.body;return c?o.createPortal(r.jsx(Cu.div,{...i,ref:t}),c):null}));ap.displayName="Portal";var sp=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=a.useState(),r=a.useRef({}),o=a.useRef(e),i=a.useRef("none"),l=e?"mounted":"unmounted",[c,u]=function(e,t){return a.useReducer(((e,n)=>t[e][n]??e),e)}(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return a.useEffect((()=>{const e=lp(r.current);i.current="mounted"===c?e:"none"}),[c]),Qu((()=>{const t=r.current,n=o.current;if(n!==e){const r=i.current,a=lp(t);if(e)u("MOUNT");else if("none"===a||"none"===t?.display)u("UNMOUNT");else{u(n&&r!==a?"ANIMATION_OUT":"UNMOUNT")}o.current=e}}),[e,u]),Qu((()=>{if(t){const e=e=>{const n=lp(r.current).includes(e.animationName);e.target===t&&n&&s.flushSync((()=>u("ANIMATION_END")))},n=e=>{e.target===t&&(i.current=lp(r.current))};return t.addEventListener("animationstart",n),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",n),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}u("ANIMATION_END")}),[t,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:a.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}(t),o="function"==typeof n?n({present:r.isPresent}):a.Children.only(n),i=hu(r.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(o));return"function"==typeof n||r.isPresent?a.cloneElement(o,{ref:i}):null};function lp(e){return e?.animationName||"none"}function cp(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function up(e,t=[]){let n=[];const o=()=>{const t=n.map((e=>a.createContext(e)));return function(n){const r=n?.[e]||t;return a.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return o.scopeName=e,[function(t,o){const i=a.createContext(o),s=n.length;function l(t){const{scope:n,children:o,...l}=t,c=n?.[e][s]||i,u=a.useMemo((()=>l),Object.values(l));return r.jsx(c.Provider,{value:u,children:o})}return n=[...n,o],l.displayName=t+"Provider",[l,function(n,r){const l=r?.[e][s]||i,c=a.useContext(l);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},dp(o,...t)]}function dp(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return a.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function fp(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function pp(...e){return a.useCallback(fp(...e),e)}sp.displayName="Presence";var mp=a.forwardRef(((e,t)=>{const{children:n,...o}=e,i=a.Children.toArray(n),s=i.find(vp);if(s){const e=s.props.children,n=i.map((t=>t===s?a.Children.count(e)>1?a.Children.only(null):a.isValidElement(e)?e.props.children:null:t));return r.jsx(hp,{...o,ref:t,children:a.isValidElement(e)?a.cloneElement(e,void 0,n):null})}return r.jsx(hp,{...o,ref:t,children:n})}));mp.displayName="Slot";var hp=a.forwardRef(((e,t)=>{const{children:n,...r}=e;if(a.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n);return a.cloneElement(n,{...bp(r,n.props),ref:t?fp(t,e):e})}return a.Children.count(n)>1?a.Children.only(null):null}));hp.displayName="SlotClone";var gp=({children:e})=>r.jsx(r.Fragment,{children:e});function vp(e){return a.isValidElement(e)&&e.type===gp}function bp(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}var yp=Boolean(globalThis?.document)?a.useLayoutEffect:()=>{},wp=a["useId".toString()]||(()=>{}),xp=0;var Cp=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const n=a.forwardRef(((e,n)=>{const{asChild:o,...i}=e,a=o?mp:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),r.jsx(a,{...i,ref:n})}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function Ep(e){const t=a.useRef(e);return a.useEffect((()=>{t.current=e})),a.useMemo((()=>(...e)=>t.current?.(...e)),[])}function Sp({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=function({defaultProp:e,onChange:t}){const n=a.useState(e),[r]=n,o=a.useRef(r),i=Ep(t);return a.useEffect((()=>{o.current!==r&&(i(r),o.current=r)}),[r,o,i]),n}({defaultProp:t,onChange:n}),i=void 0!==e,s=i?e:r,l=Ep(n);return[s,a.useCallback((t=>{if(i){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[i,e,o,l])]}var jp=a.createContext(void 0);var Rp="rovingFocusGroup.onEntryFocus",Op={bubbles:!1,cancelable:!0},Np="RovingFocusGroup",[Pp,kp,Tp]=function(e){const n=e+"CollectionProvider",[o,i]=up(n),[a,s]=o(n,{collectionRef:{current:null},itemMap:new Map}),l=e=>{const{scope:n,children:o}=e,i=t.useRef(null),s=t.useRef(new Map).current;return r.jsx(a,{scope:n,itemMap:s,collectionRef:i,children:o})};l.displayName=n;const c=e+"CollectionSlot",u=t.forwardRef(((e,t)=>{const{scope:n,children:o}=e,i=pp(t,s(c,n).collectionRef);return r.jsx(mp,{ref:i,children:o})}));u.displayName=c;const d=e+"CollectionItemSlot",f="data-radix-collection-item",p=t.forwardRef(((e,n)=>{const{scope:o,children:i,...a}=e,l=t.useRef(null),c=pp(n,l),u=s(d,o);return t.useEffect((()=>(u.itemMap.set(l,{ref:l,...a}),()=>{u.itemMap.delete(l)}))),r.jsx(mp,{[f]:"",ref:c,children:i})}));return p.displayName=d,[{Provider:l,Slot:u,ItemSlot:p},function(n){const r=s(e+"CollectionConsumer",n);return t.useCallback((()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(r.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[r.collectionRef,r.itemMap])},i]}(Np),[_p,Ap]=up(Np,[Tp]),[Mp,Ip]=_p(Np),Dp=a.forwardRef(((e,t)=>r.jsx(Pp.Provider,{scope:e.__scopeRovingFocusGroup,children:r.jsx(Pp.Slot,{scope:e.__scopeRovingFocusGroup,children:r.jsx(Lp,{...e,ref:t})})})));Dp.displayName=Np;var Lp=a.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:i=!1,dir:s,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...p}=e,m=a.useRef(null),h=pp(t,m),g=function(e){const t=a.useContext(jp);return e||t||"ltr"}(s),[v=null,b]=Sp({prop:l,defaultProp:c,onChange:u}),[y,w]=a.useState(!1),x=Ep(d),C=kp(n),E=a.useRef(!1),[S,j]=a.useState(0);return a.useEffect((()=>{const e=m.current;if(e)return e.addEventListener(Rp,x),()=>e.removeEventListener(Rp,x)}),[x]),r.jsx(Mp,{scope:n,orientation:o,dir:g,loop:i,currentTabStopId:v,onItemFocus:a.useCallback((e=>b(e)),[b]),onItemShiftTab:a.useCallback((()=>w(!0)),[]),onFocusableItemAdd:a.useCallback((()=>j((e=>e+1))),[]),onFocusableItemRemove:a.useCallback((()=>j((e=>e-1))),[]),children:r.jsx(Cp.div,{tabIndex:y||0===S?-1:0,"data-orientation":o,...p,ref:h,style:{outline:"none",...e.style},onMouseDown:cp(e.onMouseDown,(()=>{E.current=!0})),onFocus:cp(e.onFocus,(e=>{const t=!E.current;if(e.target===e.currentTarget&&t&&!y){const t=new CustomEvent(Rp,Op);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=C().filter((e=>e.focusable));Vp([e.find((e=>e.active)),e.find((e=>e.id===v)),...e].filter(Boolean).map((e=>e.ref.current)),f)}}E.current=!1})),onBlur:cp(e.onBlur,(()=>w(!1)))})})})),Fp="RovingFocusGroupItem",zp=a.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:i=!1,tabStopId:s,...l}=e,c=function(e){const[t,n]=a.useState(wp());return yp((()=>{n((e=>e??String(xp++)))}),[e]),t?`radix-${t}`:""}(),u=s||c,d=Ip(Fp,n),f=d.currentTabStopId===u,p=kp(n),{onFocusableItemAdd:m,onFocusableItemRemove:h}=d;return a.useEffect((()=>{if(o)return m(),()=>h()}),[o,m,h]),r.jsx(Pp.ItemSlot,{scope:n,id:u,focusable:o,active:i,children:r.jsx(Cp.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...l,ref:t,onMouseDown:cp(e.onMouseDown,(e=>{o?d.onItemFocus(u):e.preventDefault()})),onFocus:cp(e.onFocus,(()=>d.onItemFocus(u))),onKeyDown:cp(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void d.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:$p[r]}(e,d.orientation,d.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let o=p().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const i=o.indexOf(e.currentTarget);o=d.loop?(r=i+1,(n=o).map(((e,t)=>n[(r+t)%n.length]))):o.slice(i+1)}setTimeout((()=>Vp(o)))}var n,r}))})})}));zp.displayName=Fp;var $p={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Vp(e,t=!1){const n=document.activeElement;for(const r of e){if(r===n)return;if(r.focus({preventScroll:t}),document.activeElement!==n)return}}var Wp=Dp,Bp=zp,Up=Vs(),Hp=function(){},qp=a.forwardRef((function(e,t){var n=a.useRef(null),r=a.useState({onScrollCapture:Hp,onWheelCapture:Hp,onTouchMoveCapture:Hp}),o=r[0],i=r[1],s=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,v=e.as,b=void 0===v?"div":v,y=e.gapMode,w=de(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=p,C=zs([n,t]),E=ue(ue({},w),o);return a.createElement(a.Fragment,null,d&&a.createElement(x,{sideCar:Up,removeScrollBar:u,shards:f,noIsolation:m,inert:h,setCallbacks:i,allowPinchZoom:!!g,lockRef:n,gapMode:y}),s?a.cloneElement(a.Children.only(l),ue(ue({},E),{ref:C})):a.createElement(b,ue({},E,{className:c,ref:C}),l))}));qp.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},qp.classNames={fullWidth:Is,zeroRight:Ms};var Gp=!1;if("undefined"!=typeof window)try{var Kp=Object.defineProperty({},"passive",{get:function(){return Gp=!0,!0}});window.addEventListener("test",Kp,Kp),window.removeEventListener("test",Kp,Kp)}catch(e){Gp=!1}var Xp=!!Gp&&{passive:!1},Yp=function(e,t){var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},Zp=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),Jp(e,r)){var o=Qp(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Jp=function(e,t){return"v"===e?function(e){return Yp(e,"overflowY")}(t):function(e){return Yp(e,"overflowX")}(t)},Qp=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},em=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},tm=function(e){return[e.deltaX,e.deltaY]},nm=function(e){return e&&"current"in e?e.current:e},rm=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},om=0,im=[];function am(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var sm=Bs(Up,(function(e){var t=a.useRef([]),n=a.useRef([0,0]),r=a.useRef(),o=a.useState(om++)[0],i=a.useState(Xs)[0],s=a.useRef(e);a.useEffect((function(){s.current=e}),[e]),a.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=pe([e.lockRef.current],(e.shards||[]).map(nm),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(o))})),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(o))}))}}}),[e.inert,e.lockRef.current,e.shards]);var l=a.useCallback((function(e,t){if("touches"in e&&2===e.touches.length)return!s.current.allowPinchZoom;var o,i=em(e),a=n.current,l="deltaX"in e?e.deltaX:a[0]-i[0],c="deltaY"in e?e.deltaY:a[1]-i[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var f=Zp(d,u);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=Zp(d,u)),!f)return!1;if(!r.current&&"changedTouches"in e&&(l||c)&&(r.current=o),!o)return!0;var p=r.current||o;return function(e,t,n,r,o){var i=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,l=t.contains(s),c=!1,u=a>0,d=0,f=0;do{var p=Qp(e,s),m=p[0],h=p[1]-p[2]-i*m;(m||h)&&Jp(e,s)&&(d+=h,f+=m),s=s instanceof ShadowRoot?s.host:s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return u&&(Math.abs(d)<1||!o)?c=!0:u||!(Math.abs(f)<1)&&o||(c=!0),c}(p,t,e,"h"===p?l:c,!0)}),[]),c=a.useCallback((function(e){var n=e;if(im.length&&im[im.length-1]===i){var r="deltaY"in n?tm(n):em(n),o=t.current.filter((function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&(t=e.delta,o=r,t[0]===o[0]&&t[1]===o[1]);var t,o}))[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var a=(s.current.shards||[]).map(nm).filter(Boolean).filter((function(e){return e.contains(n.target)}));(a.length>0?l(n,a[0]):!s.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),u=a.useCallback((function(e,n,r,o){var i={name:e,delta:n,target:r,should:o,shadowParent:am(r)};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),d=a.useCallback((function(e){n.current=em(e),r.current=void 0}),[]),f=a.useCallback((function(t){u(t.type,tm(t),t.target,l(t,e.lockRef.current))}),[]),p=a.useCallback((function(t){u(t.type,em(t),t.target,l(t,e.lockRef.current))}),[]);a.useEffect((function(){return im.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Xp),document.addEventListener("touchmove",c,Xp),document.addEventListener("touchstart",d,Xp),function(){im=im.filter((function(e){return e!==i})),document.removeEventListener("wheel",c,Xp),document.removeEventListener("touchmove",c,Xp),document.removeEventListener("touchstart",d,Xp)}}),[]);var m=e.removeScrollBar,h=e.inert;return a.createElement(a.Fragment,null,h?a.createElement(i,{styles:rm(o)}):null,m?a.createElement(rl,{gapMode:e.gapMode}):null)})),lm=a.forwardRef((function(e,t){return a.createElement(qp,ue({},e,{ref:t,sideCar:sm}))}));lm.classNames=qp.classNames;var cm=["Enter"," "],um=["ArrowUp","PageDown","End"],dm=["ArrowDown","PageUp","Home",...um],fm={ltr:[...cm,"ArrowRight"],rtl:[...cm,"ArrowLeft"]},pm={ltr:["ArrowLeft"],rtl:["ArrowRight"]},mm="Menu",[hm,gm,vm]=function(e){const n=e+"CollectionProvider",[o,i]=fu(n),[a,s]=o(n,{collectionRef:{current:null},itemMap:new Map}),l=e=>{const{scope:n,children:o}=e,i=t.useRef(null),s=t.useRef(new Map).current;return r.jsx(a,{scope:n,itemMap:s,collectionRef:i,children:o})};l.displayName=n;const c=e+"CollectionSlot",u=t.forwardRef(((e,t)=>{const{scope:n,children:o}=e,i=hu(t,s(c,n).collectionRef);return r.jsx(gu,{ref:i,children:o})}));u.displayName=c;const d=e+"CollectionItemSlot",f="data-radix-collection-item",p=t.forwardRef(((e,n)=>{const{scope:o,children:i,...a}=e,l=t.useRef(null),c=hu(n,l),u=s(d,o);return t.useEffect((()=>(u.itemMap.set(l,{ref:l,...a}),()=>{u.itemMap.delete(l)}))),r.jsx(gu,{[f]:"",ref:c,children:i})}));return p.displayName=d,[{Provider:l,Slot:u,ItemSlot:p},function(n){const r=s(e+"CollectionConsumer",n);return t.useCallback((()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(r.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[r.collectionRef,r.itemMap])},i]}(mm),[bm,ym]=fu(mm,[vm,$f,Ap]),wm=$f(),xm=Ap(),[Cm,Em]=bm(mm),[Sm,jm]=bm(mm),Rm=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:i,onOpenChange:s,modal:l=!0}=e,c=wm(t),[u,d]=a.useState(null),f=a.useRef(!1),p=Su(s),m=function(e){const t=a.useContext(xu);return e||t||"ltr"}(i);return a.useEffect((()=>{const e=()=>{f.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>f.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}}),[]),r.jsx(np,{...c,children:r.jsx(Cm,{scope:t,open:n,onOpenChange:p,content:u,onContentChange:d,children:r.jsx(Sm,{scope:t,onClose:a.useCallback((()=>p(!1)),[p]),isUsingKeyboardRef:f,dir:m,modal:l,children:o})})})};Rm.displayName=mm;var Om=a.forwardRef(((e,t)=>{const{__scopeMenu:n,...o}=e,i=wm(n);return r.jsx(rp,{...i,...o,ref:t})}));Om.displayName="MenuAnchor";var Nm="MenuPortal",[Pm,km]=bm(Nm,{forceMount:void 0}),Tm=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:i}=e,a=Em(Nm,t);return r.jsx(Pm,{scope:t,forceMount:n,children:r.jsx(sp,{present:n||a.open,children:r.jsx(ap,{asChild:!0,container:i,children:o})})})};Tm.displayName=Nm;var _m="MenuContent",[Am,Mm]=bm(_m),Im=a.forwardRef(((e,t)=>{const n=km(_m,e.__scopeMenu),{forceMount:o=n.forceMount,...i}=e,a=Em(_m,e.__scopeMenu),s=jm(_m,e.__scopeMenu);return r.jsx(hm.Provider,{scope:e.__scopeMenu,children:r.jsx(sp,{present:o||a.open,children:r.jsx(hm.Slot,{scope:e.__scopeMenu,children:s.modal?r.jsx(Dm,{...i,ref:t}):r.jsx(Lm,{...i,ref:t})})})})})),Dm=a.forwardRef(((e,t)=>{const n=Em(_m,e.__scopeMenu),o=a.useRef(null),i=hu(t,o);return a.useEffect((()=>{const e=o.current;if(e)return jl(e)}),[]),r.jsx(Fm,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:du(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})})),Lm=a.forwardRef(((e,t)=>{const n=Em(_m,e.__scopeMenu);return r.jsx(Fm,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})})),Fm=a.forwardRef(((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:l,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:m,onDismiss:h,disableOutsideScroll:g,...v}=e,b=Em(_m,n),y=jm(_m,n),w=wm(n),x=xm(n),C=gm(n),[E,S]=a.useState(null),j=a.useRef(null),R=hu(t,j,b.onContentChange),O=a.useRef(0),N=a.useRef(""),P=a.useRef(0),k=a.useRef(null),T=a.useRef("right"),_=a.useRef(0),A=g?lm:a.Fragment,M=g?{as:gu,allowPinchZoom:!0}:void 0,I=e=>{const t=N.current+e,n=C().filter((e=>!e.disabled)),r=document.activeElement,o=n.find((e=>e.ref.current===r))?.textValue,i=function(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0])),o=r?t[0]:t,i=n?e.indexOf(n):-1;let a=(s=e,l=Math.max(i,0),s.map(((e,t)=>s[(l+t)%s.length])));var s,l;1===o.length&&(a=a.filter((e=>e!==n)));const c=a.find((e=>e.toLowerCase().startsWith(o.toLowerCase())));return c!==n?c:void 0}(n.map((e=>e.textValue)),t,o),a=n.find((e=>e.textValue===i))?.ref.current;!function e(t){N.current=t,window.clearTimeout(O.current),""!==t&&(O.current=window.setTimeout((()=>e("")),1e3))}(t),a&&setTimeout((()=>a.focus()))};a.useEffect((()=>()=>window.clearTimeout(O.current)),[]),a.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Mu()),document.body.insertAdjacentElement("beforeend",e[1]??Mu()),Au++,()=>{1===Au&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Au--}}),[]);const D=a.useCallback((e=>T.current===k.current?.side&&function(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return function(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){const a=t[e].x,s=t[e].y,l=t[i].x,c=t[i].y;s>r!=c>r&&n<(l-a)*(r-s)/(c-s)+a&&(o=!o)}return o}(n,t)}(e,k.current?.area)),[]);return r.jsx(Am,{scope:n,searchRef:N,onItemEnter:a.useCallback((e=>{D(e)&&e.preventDefault()}),[D]),onItemLeave:a.useCallback((e=>{D(e)||(j.current?.focus(),S(null))}),[D]),onTriggerLeave:a.useCallback((e=>{D(e)&&e.preventDefault()}),[D]),pointerGraceTimerRef:P,onPointerGraceIntentChange:a.useCallback((e=>{k.current=e}),[]),children:r.jsx(A,{...M,children:r.jsx(qu,{asChild:!0,trapped:i,onMountAutoFocus:du(s,(e=>{e.preventDefault(),j.current?.focus({preventScroll:!0})})),onUnmountAutoFocus:l,children:r.jsx(ku,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:m,onDismiss:h,children:r.jsx(Wp,{asChild:!0,...x,dir:y.dir,orientation:"vertical",loop:o,currentTabStopId:E,onCurrentTabStopIdChange:S,onEntryFocus:du(u,(e=>{y.isUsingKeyboardRef.current||e.preventDefault()})),preventScrollOnEntryFocus:!0,children:r.jsx(op,{role:"menu","aria-orientation":"vertical","data-state":uh(b.open),"data-radix-menu-content":"",dir:y.dir,...w,...v,ref:R,style:{outline:"none",...v.style},onKeyDown:du(v.onKeyDown,(e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&I(e.key));const o=j.current;if(e.target!==o)return;if(!dm.includes(e.key))return;e.preventDefault();const i=C().filter((e=>!e.disabled)).map((e=>e.ref.current));um.includes(e.key)&&i.reverse(),function(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}(i)})),onBlur:du(e.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(O.current),N.current="")})),onPointerMove:du(e.onPointerMove,ph((e=>{const t=e.target,n=_.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>_.current?"right":"left";T.current=t,_.current=e.clientX}})))})})})})})})}));Im.displayName=_m;var zm=a.forwardRef(((e,t)=>{const{__scopeMenu:n,...o}=e;return r.jsx(Cu.div,{role:"group",...o,ref:t})}));zm.displayName="MenuGroup";var $m=a.forwardRef(((e,t)=>{const{__scopeMenu:n,...o}=e;return r.jsx(Cu.div,{...o,ref:t})}));$m.displayName="MenuLabel";var Vm="MenuItem",Wm="menu.itemSelect",Bm=a.forwardRef(((e,t)=>{const{disabled:n=!1,onSelect:o,...i}=e,s=a.useRef(null),l=jm(Vm,e.__scopeMenu),c=Mm(Vm,e.__scopeMenu),u=hu(t,s),d=a.useRef(!1);return r.jsx(Um,{...i,ref:u,disabled:n,onClick:du(e.onClick,(()=>{const e=s.current;if(!n&&e){const t=new CustomEvent(Wm,{bubbles:!0,cancelable:!0});e.addEventListener(Wm,(e=>o?.(e)),{once:!0}),Eu(e,t),t.defaultPrevented?d.current=!1:l.onClose()}})),onPointerDown:t=>{e.onPointerDown?.(t),d.current=!0},onPointerUp:du(e.onPointerUp,(e=>{d.current||e.currentTarget?.click()})),onKeyDown:du(e.onKeyDown,(e=>{const t=""!==c.searchRef.current;n||t&&" "===e.key||cm.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))})}));Bm.displayName=Vm;var Um=a.forwardRef(((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:i,...s}=e,l=Mm(Vm,n),c=xm(n),u=a.useRef(null),d=hu(t,u),[f,p]=a.useState(!1),[m,h]=a.useState("");return a.useEffect((()=>{const e=u.current;e&&h((e.textContent??"").trim())}),[s.children]),r.jsx(hm.ItemSlot,{scope:n,disabled:o,textValue:i??m,children:r.jsx(Bp,{asChild:!0,...c,focusable:!o,children:r.jsx(Cu.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:d,onPointerMove:du(e.onPointerMove,ph((e=>{if(o)l.onItemLeave(e);else if(l.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus({preventScroll:!0})}}))),onPointerLeave:du(e.onPointerLeave,ph((e=>l.onItemLeave(e)))),onFocus:du(e.onFocus,(()=>p(!0))),onBlur:du(e.onBlur,(()=>p(!1)))})})})})),Hm=a.forwardRef(((e,t)=>{const{checked:n=!1,onCheckedChange:o,...i}=e;return r.jsx(Qm,{scope:e.__scopeMenu,checked:n,children:r.jsx(Bm,{role:"menuitemcheckbox","aria-checked":dh(n)?"mixed":n,...i,ref:t,"data-state":fh(n),onSelect:du(i.onSelect,(()=>o?.(!!dh(n)||!n)),{checkForDefaultPrevented:!1})})})}));Hm.displayName="MenuCheckboxItem";var qm="MenuRadioGroup",[Gm,Km]=bm(qm,{value:void 0,onValueChange:()=>{}}),Xm=a.forwardRef(((e,t)=>{const{value:n,onValueChange:o,...i}=e,a=Su(o);return r.jsx(Gm,{scope:e.__scopeMenu,value:n,onValueChange:a,children:r.jsx(zm,{...i,ref:t})})}));Xm.displayName=qm;var Ym="MenuRadioItem",Zm=a.forwardRef(((e,t)=>{const{value:n,...o}=e,i=Km(Ym,e.__scopeMenu),a=n===i.value;return r.jsx(Qm,{scope:e.__scopeMenu,checked:a,children:r.jsx(Bm,{role:"menuitemradio","aria-checked":a,...o,ref:t,"data-state":fh(a),onSelect:du(o.onSelect,(()=>i.onValueChange?.(n)),{checkForDefaultPrevented:!1})})})}));Zm.displayName=Ym;var Jm="MenuItemIndicator",[Qm,eh]=bm(Jm,{checked:!1}),th=a.forwardRef(((e,t)=>{const{__scopeMenu:n,forceMount:o,...i}=e,a=eh(Jm,n);return r.jsx(sp,{present:o||dh(a.checked)||!0===a.checked,children:r.jsx(Cu.span,{...i,ref:t,"data-state":fh(a.checked)})})}));th.displayName=Jm;var nh=a.forwardRef(((e,t)=>{const{__scopeMenu:n,...o}=e;return r.jsx(Cu.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})}));nh.displayName="MenuSeparator";var rh=a.forwardRef(((e,t)=>{const{__scopeMenu:n,...o}=e,i=wm(n);return r.jsx(ip,{...i,...o,ref:t})}));rh.displayName="MenuArrow";var[oh,ih]=bm("MenuSub"),ah="MenuSubTrigger",sh=a.forwardRef(((e,t)=>{const n=Em(ah,e.__scopeMenu),o=jm(ah,e.__scopeMenu),i=ih(ah,e.__scopeMenu),s=Mm(ah,e.__scopeMenu),l=a.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:u}=s,d={__scopeMenu:e.__scopeMenu},f=a.useCallback((()=>{l.current&&window.clearTimeout(l.current),l.current=null}),[]);return a.useEffect((()=>f),[f]),a.useEffect((()=>{const e=c.current;return()=>{window.clearTimeout(e),u(null)}}),[c,u]),r.jsx(Om,{asChild:!0,...d,children:r.jsx(Um,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":uh(n.open),...e,ref:mu(t,i.onTriggerChange),onClick:t=>{e.onClick?.(t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:du(e.onPointerMove,ph((t=>{s.onItemEnter(t),t.defaultPrevented||e.disabled||n.open||l.current||(s.onPointerGraceIntentChange(null),l.current=window.setTimeout((()=>{n.onOpenChange(!0),f()}),100))}))),onPointerLeave:du(e.onPointerLeave,ph((e=>{f();const t=n.content?.getBoundingClientRect();if(t){const r=n.content?.dataset.side,o="right"===r,i=o?-5:5,a=t[o?"left":"right"],l=t[o?"right":"left"];s.onPointerGraceIntentChange({area:[{x:e.clientX+i,y:e.clientY},{x:a,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:a,y:t.bottom}],side:r}),window.clearTimeout(c.current),c.current=window.setTimeout((()=>s.onPointerGraceIntentChange(null)),300)}else{if(s.onTriggerLeave(e),e.defaultPrevented)return;s.onPointerGraceIntentChange(null)}}))),onKeyDown:du(e.onKeyDown,(t=>{const r=""!==s.searchRef.current;e.disabled||r&&" "===t.key||fm[o.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())}))})})}));sh.displayName=ah;var lh="MenuSubContent",ch=a.forwardRef(((e,t)=>{const n=km(_m,e.__scopeMenu),{forceMount:o=n.forceMount,...i}=e,s=Em(_m,e.__scopeMenu),l=jm(_m,e.__scopeMenu),c=ih(lh,e.__scopeMenu),u=a.useRef(null),d=hu(t,u);return r.jsx(hm.Provider,{scope:e.__scopeMenu,children:r.jsx(sp,{present:o||s.open,children:r.jsx(hm.Slot,{scope:e.__scopeMenu,children:r.jsx(Fm,{id:c.contentId,"aria-labelledby":c.triggerId,...i,ref:d,align:"start",side:"rtl"===l.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{l.isUsingKeyboardRef.current&&u.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:du(e.onFocusOutside,(e=>{e.target!==c.trigger&&s.onOpenChange(!1)})),onEscapeKeyDown:du(e.onEscapeKeyDown,(e=>{l.onClose(),e.preventDefault()})),onKeyDown:du(e.onKeyDown,(e=>{const t=e.currentTarget.contains(e.target),n=pm[l.dir].includes(e.key);t&&n&&(s.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())}))})})})})}));function uh(e){return e?"open":"closed"}function dh(e){return"indeterminate"===e}function fh(e){return dh(e)?"indeterminate":e?"checked":"unchecked"}function ph(e){return t=>"mouse"===t.pointerType?e(t):void 0}ch.displayName=lh;var mh=Rm,hh=Om,gh=Tm,vh=Im,bh=zm,yh=$m,wh=Bm,xh=Hm,Ch=Xm,Eh=Zm,Sh=th,jh=nh,Rh=rh,Oh=sh,Nh=ch,Ph=Boolean(globalThis?.document)?a.useLayoutEffect:()=>{},kh=a["useId".toString()]||(()=>{}),Th=0;function _h(e){const[t,n]=a.useState(kh());return Ph((()=>{e||n((e=>e??String(Th++)))}),[e]),e||(t?`radix-${t}`:"")}var Ah="DropdownMenu",[Mh,Ih]=function(e,t=[]){let n=[];const o=()=>{const t=n.map((e=>a.createContext(e)));return function(n){const r=n?.[e]||t;return a.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return o.scopeName=e,[function(t,o){const i=a.createContext(o),s=n.length;function l(t){const{scope:n,children:o,...l}=t,c=n?.[e][s]||i,u=a.useMemo((()=>l),Object.values(l));return r.jsx(c.Provider,{value:u,children:o})}return n=[...n,o],l.displayName=t+"Provider",[l,function(n,r){const l=r?.[e][s]||i,c=a.useContext(l);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},nu(o,...t)]}(Ah,[ym]),Dh=ym(),[Lh,Fh]=Mh(Ah),zh=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:i,defaultOpen:s,onOpenChange:l,modal:c=!0}=e,u=Dh(t),d=a.useRef(null),[f=!1,p]=ou({prop:i,defaultProp:s,onChange:l});return r.jsx(Lh,{scope:t,triggerId:_h(),triggerRef:d,contentId:_h(),open:f,onOpenChange:p,onOpenToggle:a.useCallback((()=>p((e=>!e))),[p]),modal:c,children:r.jsx(mh,{...u,open:f,onOpenChange:p,dir:o,modal:c,children:n})})};zh.displayName=Ah;var $h="DropdownMenuTrigger",Vh=a.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...i}=e,a=Fh($h,n),s=Dh(n);return r.jsx(hh,{asChild:!0,...s,children:r.jsx(uu.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...i,ref:tu(t,a.triggerRef),onPointerDown:eu(e.onPointerDown,(e=>{o||0!==e.button||!1!==e.ctrlKey||(a.onOpenToggle(),a.open||e.preventDefault())})),onKeyDown:eu(e.onKeyDown,(e=>{o||(["Enter"," "].includes(e.key)&&a.onOpenToggle(),"ArrowDown"===e.key&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())}))})})}));Vh.displayName=$h;var Wh=e=>{const{__scopeDropdownMenu:t,...n}=e,o=Dh(t);return r.jsx(gh,{...o,...n})};Wh.displayName="DropdownMenuPortal";var Bh="DropdownMenuContent",Uh=a.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Fh(Bh,n),s=Dh(n),l=a.useRef(!1);return r.jsx(vh,{id:i.contentId,"aria-labelledby":i.triggerId,...s,...o,ref:t,onCloseAutoFocus:eu(e.onCloseAutoFocus,(e=>{l.current||i.triggerRef.current?.focus(),l.current=!1,e.preventDefault()})),onInteractOutside:eu(e.onInteractOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;i.modal&&!r||(l.current=!0)})),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})}));Uh.displayName=Bh;var Hh=a.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Dh(n);return r.jsx(bh,{...i,...o,ref:t})}));Hh.displayName="DropdownMenuGroup";a.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Dh(n);return r.jsx(yh,{...i,...o,ref:t})})).displayName="DropdownMenuLabel";var qh=a.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Dh(n);return r.jsx(wh,{...i,...o,ref:t})}));qh.displayName="DropdownMenuItem";a.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Dh(n);return r.jsx(xh,{...i,...o,ref:t})})).displayName="DropdownMenuCheckboxItem";a.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Dh(n);return r.jsx(Ch,{...i,...o,ref:t})})).displayName="DropdownMenuRadioGroup";a.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Dh(n);return r.jsx(Eh,{...i,...o,ref:t})})).displayName="DropdownMenuRadioItem";a.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Dh(n);return r.jsx(Sh,{...i,...o,ref:t})})).displayName="DropdownMenuItemIndicator";a.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Dh(n);return r.jsx(jh,{...i,...o,ref:t})})).displayName="DropdownMenuSeparator";a.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Dh(n);return r.jsx(Rh,{...i,...o,ref:t})})).displayName="DropdownMenuArrow";a.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Dh(n);return r.jsx(Oh,{...i,...o,ref:t})})).displayName="DropdownMenuSubTrigger";a.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Dh(n);return r.jsx(Nh,{...i,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})})).displayName="DropdownMenuSubContent";var Gh=zh,Kh=Vh,Xh=Wh,Yh=Uh,Zh=Hh,Jh=qh;const Qh=()=>r.jsx("div",Object.assign({className:"flex-shrink-0 flex items-center justify-center h-10 w-10 bg-stateColors-skeleton rounded-sm"},{children:r.jsx(Pi,{name:"heart-filled",size:"sm",color:"coreColors-secondaryIcon"})})),eg=a.forwardRef(((e,t)=>{var{selected:n=!1,onClick:o,className:i,name:a,amount:s,imgUrl:l,aspectRatio:c,objectFit:u,isTrigger:d,translations:f}=e,p=de(e,["selected","onClick","className","name","amount","imgUrl","aspectRatio","objectFit","isTrigger","translations"]);return r.jsxs("button",Object.assign({className:ee("flex flex-row items-center px-4 py-2 w-full ",n?"bg-stateColors-skeleton":"",i),ref:t,onClick:o},p,{children:[l?r.jsx("div",Object.assign({className:"flex-shrink-0 h-10 w-10 border border-coreColors-dividingLines rounded-sm overflow-hidden"},{children:r.jsx("img",{alt:"wishlist-image",src:`${l}?width=40`,width:40,height:40,className:ee("rounded-sm w-full h-full","contain"===u?"object-contain":"object-cover")})})):r.jsx(Qh,{}),r.jsxs("div",Object.assign({className:"flex flex-col items-start ml-2 space-y-1 overflow-hidden"},{children:[d&&r.jsx(Di,Object.assign({type:"body-secondary"},{children:"Wishlists"})),r.jsx(Di,Object.assign({type:"body-primary",className:"w-full overflow-hidden text-ellipsis whitespace-nowrap"},{children:a})),!d&&r.jsx(Di,Object.assign({type:"body-secondary"},{children:`${s} ${1!==s?f["cart-checkout-items"]:f["cart-checkout-item"]}`}))]}))]}))}));eg.displayName="Wishlist";const tg=a.forwardRef(((e,t)=>{var{selected:n=!1,onClick:o,className:i,translations:a}=e,s=de(e,["selected","onClick","className","translations"]);return r.jsx("button",Object.assign({className:ee("flex flex-row items-center w-full relative py-2","active:bg-black/10 transition-colors duration-150",i),ref:t,onClick:o},s,{children:r.jsx("div",Object.assign({className:"flex flex-col items-center justify-center m-auto space-y-1 overflow-hidden h-10"},{children:r.jsxs(Di,Object.assign({type:"body-primary",className:"w-full text-center text-coreColors-brandColorPrimary"},{children:["+ ",a["wishlist-dropdown-create-list-button"]]}))}))}))}));tg.displayName="CreateNew";const ng=Gh,rg=Zh,og=a.forwardRef(((e,t)=>{var{className:n,sideOffset:o=4,width:i}=e,a=de(e,["className","sideOffset","width"]);return r.jsx(Xh,{children:r.jsx(Yh,Object.assign({ref:t,sideOffset:o,className:ee("z-50 max-h-[240px] overflow-y-auto min-w-[8rem] rounded-[4px] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n),style:{outlineStyle:"solid",outlineWidth:1,outlineColor:"var(--coreColors-brandColorPrimary)",width:i}},a))})}));og.displayName=Yh.displayName;const ig=a.forwardRef(((e,t)=>{var{className:n,inset:o}=e,i=de(e,["className","inset"]);return r.jsx(Jh,Object.assign({ref:t,className:ee("relative flex cursor-default select-none items-center outline-none transition-colors focus:bg-stateColors-skeleton data-[disabled]:pointer-events-none data-[disabled]:opacity-50",o&&"pl-8",n)},i))}));ig.displayName=Jh.displayName;const ag=Q("flex p-2 gap-2 rounded-[4px]",{variants:{size:{small:"p-2",large:"p-3"},showBackgroundShadow:{true:"shadow-primary",false:""},layoutType:{"below-image-on-right":"absolute right-0","top-right":"","top-left":"","bottom-left":"","bottom-right":""}},defaultVariants:{size:"small",showBackgroundShadow:!1,layoutType:"below-image-on-right"}}),sg=a.forwardRef(((e,t)=>{var{className:n,size:o="small",selected:i=!1,onClick:a,iconUrl:s="https://storage.googleapis.com/tapcart-asset-uploads-prod/default-icon-options/Heart_1.svg",showBackground:l=!1,showBackgroundShadow:c=!1,cornerRadius:u=4,layoutType:d="below-image-on-right",favoriteFillColor:f="#D91E18",disabledFillColor:p="#727272",backgroundColor:m="#FFFFFF",borderSides:h=["all"],borderColorStyle:g,borderPadding:v={}}=e,b=de(e,["className","size","selected","onClick","iconUrl","showBackground","showBackgroundShadow","cornerRadius","layoutType","favoriteFillColor","disabledFillColor","backgroundColor","borderSides","borderColorStyle","borderPadding"]);return r.jsx("button",Object.assign({onClick:a,ref:t,className:ee(ag({size:o,showBackgroundShadow:c,layoutType:d}),n),style:Object.assign(Object.assign({borderRadius:`${u}px`,backgroundColor:m||"var(--coreColors-inputBackground)",borderColor:g},oe(h)),ie(v))},b,{children:r.jsx(Pi,{url:s,color:i?"stateColors-favorites":"stateColors-disabled",size:"small"===o?"xs":"sm",fillColor:i?f:p})}))}));sg.displayName="Favorite";const lg=Q("grid",{variants:{columns:{1:"grid-cols-1 gap-y-4",2:"grid-cols-2 gap-x-[7px] gap-y-4",3:"grid-cols-3 gap-x-[7px] gap-y-4",4:"grid-cols-4 gap-x-[7px] gap-y-4"}},defaultVariants:{columns:2}});function cg({imgAttributes:e}){const t={as:"image",imageSrcSet:e.srcSet,imageSizes:e.sizes,fetchPriority:e.fetchPriority};return o.preload?(o.preload(e.src,t),null):null}const ug=a.forwardRef(((e,t)=>{var n,o,{alt:i,aspectRatio:s,crop:l="center",data:c,decoding:u="async",height:d="auto",loader:f=dg,loading:p="lazy",sizes:m,src:h,imageWrapperStyles:g,imageRadius:v,srcSetOptions:b={intervals:15,startingWidth:100,incrementSize:100,placeholderWidth:100},width:y="100%",objectFit:w="cover"}=e,x=de(e,["alt","aspectRatio","crop","data","decoding","height","loader","loading","sizes","src","imageWrapperStyles","imageRadius","srcSetOptions","width","objectFit"]);const C=a.useMemo((()=>{const e=(null==c?void 0:c.width)&&(null==c?void 0:c.height)?null==c?void 0:c.width:void 0,t=(null==c?void 0:c.width)&&(null==c?void 0:c.height)?null==c?void 0:c.height:void 0;return{width:e,height:t,unitsMatch:Boolean(fg(e,t))}}),[c]),E=a.useMemo((()=>{const e=pg((y||"100%").toString()),t=`${e.number}${e.unit}`,n="auto"===d||null==d,r=n?null:pg(d.toString()),o=r?`${r.number}${r.unit}`:"";return{width:t,height:n?"auto":o,src:h||(null==c?void 0:c.url),alt:(null==c?void 0:c.altText)&&!i?null==c?void 0:c.altText:i||"",aspectRatio:s||(C.unitsMatch?[mg(C.width),mg(C.height)].join(":"):void 0),objectFit:"fill"===w?"cover":"fit"===w?"contain":w,fetchPriority:"eager"===p?"high":"auto"}}),[y,d,h,c,i,s,C,null==x?void 0:x.key]),{intervals:S,startingWidth:j,incrementSize:R,placeholderWidth:O}=b,N=a.useMemo((()=>vg(y,S,j,R)),[y,S,j,R]);hg(E.width);const[P,k]=a.useState(!1),[T,_]=a.useState(!1),A="opacity-0 transition-opacity duration-500 ease-in-out "+(P?"opacity-100":""),M=Object.assign({aspectRatio:null===(n=E.aspectRatio)||void 0===n?void 0:n.replace(":","/")},g),I=gg(E.src,yg(N,E.aspectRatio,l),f,"contain"===E.objectFit);return r.jsxs(r.Fragment,{children:["eager"===p&&r.jsx(cg,{imgAttributes:{srcSet:I,sizes:m,fetchPriority:E.fetchPriority,src:E.src||""}}),r.jsx("div",Object.assign({className:"relative bg-stateColors-skeleton border-transparent",style:M},{children:!T&&E.src?r.jsx("img",Object.assign({},x,{fetchPriority:E.fetchPriority,alt:E.alt,decoding:u,height:E.height,loading:p,srcSet:I,width:E.width,className:A,onLoad:()=>{k(!0)},onError:()=>{_(!0)},sizes:m,src:E.src,ref:t,style:{objectFit:E.objectFit,maxHeight:"100%",height:"100%",width:"100%",borderRadius:`${v}px`}})):r.jsx("div",{className:"w-full h-full bg-stateColors-skeleton",style:Object.assign({aspectRatio:s&&"auto"!==s?null===(o=E.aspectRatio)||void 0===o?void 0:o.replace(":","/"):"2/3"},g)})}))]})}));function dg({src:e,width:t,height:n,crop:r,isContained:o}){if(!e)return"";const i=new URL(e);return t&&!o&&i.searchParams.append("width",Math.round(t).toString()),n&&i.searchParams.append("height",Math.round(n).toString()),r&&!o&&i.searchParams.append("crop",r),i.href}function fg(e="100%",t="auto"){return pg(e.toString()).unit===pg(t.toString()).unit}function pg(e){const t=e.replace(/[0-9.]/g,""),n=parseFloat(e.replace(t,""));return{unit:""===t?void 0===n?"auto":"px":t,number:n}}function mg(e){if(void 0===e)return;const{unit:t,number:n}=pg(e.toString());switch(t){case"em":case"rem":return 16*n;case"px":case"":return n;default:return}}function hg(e){return"number"==typeof e||"string"==typeof e&&/\d(px|em|rem)$/.test(e)}function gg(e,t,n=dg,r=!1){if(!e)return"";if(!t||0===t.length)return e;const o=t.map(((o,i)=>{var a;return`${n({src:e,width:o.width,height:o.height,crop:o.crop,isContained:r})} ${3===t.length?`${i+1}x`:`${null!==(a=o.width)&&void 0!==a?a:0}w`}`})).join(", ");return o}function vg(e="100%",t,n,r){const o=Array.from({length:t},((e,t)=>t*r+n)),i=Array.from({length:3},((t,n)=>{var r;return(n+1)*(null!==(r=mg(e))&&void 0!==r?r:0)}));return hg(e)?i:o}function bg(e){if(!e)return;const[t,n]=e.split(":");return Number(t)/Number(n)}function yg(e,t,n="center"){if(!e)return;return e.map((e=>{var r;return{width:e,height:t?e/(null!==(r=bg(t))&&void 0!==r?r:1):void 0,crop:n}}))}const wg=12,xg=Q("flex w-full border border-coreColors-dividingLines bg-coreColors-inputBackground text-textColors-primaryColor text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-textColors-secondaryColor focus-visible:outline-none focus-visible:ring-0 disabled:cursor-not-allowed disabled:opacity-50 focus:border-coreColors-brandColorPrimary peer data-[icon=true]:pr-10",{variants:{hasLabel:{true:"h-14 px-4 rounded pt-5 pb-2 placeholder-shown:p-4",false:"pl-10 pr-4 py-2"},error:{true:"border-stateColors-error text-stateColors-error placeholder:text-stateColors-error focus:border-stateColors-error [&+label]:text-stateColors-error",false:""}},defaultVariants:{error:!1,hasLabel:!0}}),Cg=a.forwardRef(((e,t)=>{var{className:n,error:o=!1,id:i,type:a,label:s,asChild:l,value:c,onChange:u,icon:d,iconPosition:f="right",iconColor:p,placeholder:m,placeholderFont:h,placeholderFontWeight:g,placeholderFontSize:v,placeholderTextAlign:b,placeholderTextColor:y,placeholderUpperCase:w,inputPadding:x,backgroundColor:C,borderRadius:E,inputBorderColor:S,borderSides:j,inputSpacing:R}=e,O=de(e,["className","error","id","type","label","asChild","value","onChange","icon","iconPosition","iconColor","placeholder","placeholderFont","placeholderFontWeight","placeholderFontSize","placeholderTextAlign","placeholderTextColor","placeholderUpperCase","inputPadding","backgroundColor","borderRadius","inputBorderColor","borderSides","inputSpacing"]);const{Comp:N,inputPaddingRight:P,inputPaddingLeft:k,borderStyle:T,borderRadiusStyle:_,iconLeftPadding:A,iconRightPadding:M,iconTopPadding:I,iconBottomPadding:D,placeholderTextColorStyle:L,iconColorStyle:F,inputBgColor:z,inputBorderColorStyle:$}=(e=>{const{asChild:t,icon:n,iconPosition:r="right",iconColor:o,placeholderTextColor:i,backgroundColor:a,borderRadius:s,inputBorderColor:l,borderSides:c=["all"],inputPadding:u,inputSpacing:d=wg}=e,f=t?Tn:"div",p=n&&"right"===r?(null==u?void 0:u.right)?`${null==u?void 0:u.right}px`:"2.5rem":void 0,m=n&&"left"===r?void 0!==(null==u?void 0:u.left)&&d?`calc(${(null==u?void 0:u.left)+d+20}px)`:(null==u?void 0:u.left)?`calc(${(null==u?void 0:u.left)+20+8}px)`:d?`calc(${d+wg+20}px)`:`calc(${8+wg+20}px)`:void 0,h=c.includes("all")?{borderWidth:"1px"}:{borderTopWidth:c.includes("top")?"1px":0,borderBottomWidth:c.includes("bottom")?"1px":0,borderLeftWidth:c.includes("left")?"1px":0,borderRightWidth:c.includes("right")?"1px":0},g=s?{borderRadius:`${s}px`}:{},v=void 0!==(null==u?void 0:u.left)?`${u.left}px`:`${wg}px`,b=void 0!==(null==u?void 0:u.right)?`${u.right}px`:`${wg}px`,y=void 0!==(null==u?void 0:u.top)?`${u.top}px`:"8px",w=void 0!==(null==u?void 0:u.bottom)?`${u.bottom}px`:"8px",x=re(o),C=re(a),E=re(l);return{Comp:f,inputPaddingRight:p,inputPaddingLeft:m,borderStyle:h,borderRadiusStyle:g,iconLeftPadding:v,iconRightPadding:b,iconTopPadding:y,iconBottomPadding:w,placeholderTextColorStyle:re(i),iconColorStyle:x,inputBgColor:C,inputBorderColorStyle:E}})({asChild:l,icon:d,iconPosition:f,iconColor:p,className:n,backgroundColor:C,borderRadius:E,inputBorderColor:S,borderSides:j,inputSpacing:R,inputPadding:x,placeholderTextColor:y});return r.jsxs(N,Object.assign({className:"relative flex items-center group"},{children:[d&&"left"===f&&r.jsx(Pi,{name:d,"data-error":o,size:"sm",color:"inherit"!==F?void 0:"coreColors-secondaryIcon",className:ee("flex items-center absolute aspect-square fill-current z-10 icon ",{"w-5":!0,"text-stateColors-error":o}),style:{left:A,right:M,top:I,bottom:D,color:F}}),r.jsx("style",{children:` \n .custom-placeholder-value::placeholder { \n color: ${L}; \n }`}),r.jsx("input",Object.assign({placeholder:m,value:c,onChange:e=>u(e.target.value),id:i,type:a,className:ee(xg({error:o,hasLabel:!!s}),n,"custom-placeholder-value"),"data-icon":!!d,ref:t},O,{style:Object.assign(Object.assign({paddingLeft:k,paddingRight:P,fontFamily:h,fontWeight:g,fontSize:`${v}px`,textAlign:b,color:L,textTransform:w?"uppercase":void 0,borderColor:$,paddingTop:null==x?void 0:x.top,paddingBottom:null==x?void 0:x.bottom,backgroundColor:z},T),s?{borderRadius:"8px"}:_)})),s?r.jsx("label",Object.assign({htmlFor:i,className:ee("absolute text-[10px] text-textColors-secondaryColor group-active:text-coreColors-brandColorPrimary top-2 z-10 h-4 origin-[0] opacity-100 peer-placeholder-shown:opacity-0","left"===f?"start-10":"start-4")},{children:s})):null,d&&"right"===f&&r.jsx(Pi,{name:d,"data-error":o,size:"sm",className:"absolute w-5 aspect-square fill-current text-textColors-secondaryColor top-[18px] z-10 origin-[0] end-4 peer-pr-8 icon data-[error=true]:text-stateColors-error"})]}))}));Cg.displayName="Input";const Eg=t.forwardRef(((e,n)=>t.createElement($n.label,Rn({},e,{ref:n,onMouseDown:t=>{var n;null===(n=e.onMouseDown)||void 0===n||n.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault()}})))),Sg=Q("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),jg=a.forwardRef(((e,t)=>{var{className:n}=e,o=de(e,["className"]);return r.jsx(Eg,Object.assign({ref:t,className:ee(Sg(),n)},o))}));jg.displayName=Eg.displayName;const Rg=a.forwardRef(((e,t)=>{var{primaryText:n,secondaryText:o,selected:i=!1,showIcon:a=!0,showSecondaryText:s=!0,showChevron:l=!0,onClick:c,className:u}=e,d=de(e,["primaryText","secondaryText","selected","showIcon","showSecondaryText","showChevron","onClick","className"]);return r.jsxs("button",Object.assign({className:ee("flex flex-row p-4 gap-2 w-full border-b border-coreColors-dividingLines",i?"bg-stateColors-skeleton":"",u),ref:t,onClick:c},d,{children:[r.jsx(Pi,{name:"map-pin",size:"sm",color:"coreColors-secondaryIcon",className:""+(a?"":"opacity-0")}),r.jsxs("div",Object.assign({className:"flex flex-col w-full items-start gap-1 overflow-hidden"},{children:[r.jsx(Di,Object.assign({type:"body-primary",className:"text-textColors-primaryColor max-w-full truncate"},{children:n})),r.jsx(Di,Object.assign({type:"body-secondary",className:"text-textColors-secondaryColor line-clamp-2 text-left "+(s?"":"opacity-0")},{children:o}))]})),r.jsx(Pi,{name:"chevron-right",size:"sm",color:"coreColors-secondaryIcon",className:"my-auto "+(l?"":"opacity-0")})]}))}));Rg.displayName="LineItemTextIcon";const Og=Q("",{variants:{},defaultVariants:{currency:"USD",locale:"en-US"}});function Ng(e){var{price:t,locale:n,currency:o,styles:i}=e,a=de(e,["price","locale","currency","styles"]);let s=new Intl.NumberFormat(n,{style:"currency",currency:o,currencyDisplay:"narrowSymbol"}).format(Number(t));return r.jsx("span",Object.assign({},a,{style:i},{children:s}))}function Pg({price:e,priceHigh:t,priceRanges:n=!1,isSale:o=!1,compareAtPrice:i,compareAtPriceHigh:a,currency:s="USD",locale:l="en-US",fontSize:c=15,textAlignment:u="",standardStyles:d,saleStyles:f,strikeThroughStyles:p}){const m=()=>r.jsx("span",{children:" - "});return r.jsxs("div",Object.assign({className:ee("flex flex-wrap gap-2",{"justify-start":"left"===u},{"justify-end":"right"===u},{"justify-center":"center"===u})},{children:[r.jsx((()=>{const a=o&&i?f:d,u=o?"text-textColors-salePriceText":"text-textColors-priceText";return r.jsx(Di,Object.assign({className:`${u} flex-shrink-0`,style:{fontSize:`${c}px`}},{children:r.jsxs("span",Object.assign({className:"flex-grow min-w-[fit-content]"},{children:[r.jsx(Ng,{price:e,currency:s,locale:l,styles:a}),n&&void 0!==t&&r.jsx(m,{}),n&&void 0!==t&&r.jsx(Ng,{price:t,currency:s,locale:l,styles:a})]}))}))}),{}),r.jsx((()=>o&&i?r.jsxs(Di,Object.assign({className:"line-through text-textColors-strikethroughPriceText flex-shrink-0",style:Object.assign({fontSize:`${c}px`},p)},{children:[r.jsx(Ng,{price:i,currency:s,locale:l}),n&&a&&r.jsx(m,{}),n&&a&&r.jsx(Ng,{price:a,currency:s,locale:l})]})):null),{})]}))}const kg=Q("animate-pulse flex bg-stateColors-skeleton rounded-[4px]",{variants:{variant:{line:"",rectangular:"",circle:"rounded-full"}},defaultVariants:{variant:"line"}});function Tg(e){var{className:t,variant:n,height:o,width:i,borderRadius:a=4}=e,s=de(e,["className","variant","height","width","borderRadius"]);const l={width:i,height:o,borderRadius:"rectangular"===n?a:""};return r.jsx("div",Object.assign({className:ee(kg({variant:n}),t),style:l},s))}const _g=Q("absolute truncate",{variants:{horizontalPosition:{start:"left-0",end:"",center:""},verticalPosition:{top:"top-0 mt-2",bottom:"bottom-0 mb-2",below:""},imageSwipeEnabled:{true:"",false:""}},compoundVariants:[{verticalPosition:"bottom",imageSwipeEnabled:!0,class:"bottom-[18px]"}]}),Ag=Q("absolute ",{variants:{iconPosition:{"top-left":"top-0 left-2 mt-2","top-right":"top-0 right-2 mt-2","bottom-left":"bottom-0 left-2 mb-2","bottom-right":"bottom-0 right-2 mb-2","below-image-on-right":""},badgeHorizontalPosition:{start:"",end:"",center:""},badgeVerticalPosition:{top:"",bottom:"",below:""},isSoldOut:{true:"",false:""},showSoldOutBadge:{true:"",false:""},imageSwipeEnabled:{true:"",false:""}},compoundVariants:[{iconPosition:"top-left",badgeHorizontalPosition:["start","center"],badgeVerticalPosition:"top",showSoldOutBadge:!1,class:"top-10"},{iconPosition:"top-right",badgeHorizontalPosition:["end","center"],badgeVerticalPosition:"top",showSoldOutBadge:!1,class:"top-10"},{iconPosition:"bottom-left",badgeHorizontalPosition:["start","center"],badgeVerticalPosition:"bottom",class:"bottom-10"},{iconPosition:"bottom-right",badgeHorizontalPosition:["end","center"],badgeVerticalPosition:"bottom",class:"bottom-10"},{iconPosition:"bottom-left",showSoldOutBadge:!0,class:"bottom-10"},{iconPosition:["bottom-left","bottom-right"],imageSwipeEnabled:!0,class:"bottom-[18px]"},{iconPosition:"bottom-left",badgeHorizontalPosition:["start","center"],badgeVerticalPosition:"bottom",isSoldOut:!1,showSoldOutBadge:!1,imageSwipeEnabled:!0,class:"bottom-[58px]"},{iconPosition:"bottom-right",badgeHorizontalPosition:["end","center"],badgeVerticalPosition:"bottom",showSoldOutBadge:!1,imageSwipeEnabled:!0,class:"bottom-[58px]"},{iconPosition:"bottom-left",showSoldOutBadge:!0,imageSwipeEnabled:!0,class:"bottom-[58px]"}],defaultVariants:{iconPosition:"below-image-on-right"}}),Mg=({icon:e,handler:t,className:n})=>r.jsx("button",Object.assign({onClick:t,className:ee("flex items-center justify-center h-7 w-7 bg-stateColors-skeleton outline outline-1 outline-stateColors-skeleton",n)},{children:r.jsx(Pi,{name:e,size:"sm",color:"coreColors-secondaryIcon"})})),Ig=a.forwardRef(((e,t)=>{var{className:n,decreaseIcon:o,increaseIcon:i,deleteIcon:a,onDecreaseClick:s,onIncreaseClick:l,value:c,setValue:u}=e,d=de(e,["className","decreaseIcon","increaseIcon","deleteIcon","onDecreaseClick","onIncreaseClick","value","setValue"]);return r.jsxs("div",Object.assign({className:ee("flex",n),ref:t},d,{children:[r.jsx(Mg,{handler:s,icon:1===c?a:o,className:"rounded-tl rounded-bl"}),r.jsx("div",Object.assign({className:"w-8 h-7 py-1 flex justify-center bg-coreColors-inputBackground outline outline-1 outline-coreColors-dividingLines text-[14px] font-sfpro-roboto leading-[160%] font-normal text-textColors-primaryColor"},{children:r.jsx("input",{type:"tel",pattern:"[0-9]*",value:c,onBlur:e=>e.target.value=c.toString(),onFocus:e=>e.target.value="",onChange:e=>u(parseInt(e.target.value)||0),className:"w-8 focus-visible:outline-none text-center"})})),r.jsx(Mg,{handler:l,icon:i,className:"rounded-tr rounded-br"})]}))}));Ig.displayName="QuantityPicker";const Dg="rovingFocusGroup.onEntryFocus",Lg={bubbles:!1,cancelable:!0},Fg="RovingFocusGroup",[zg,$g,Vg]=Dn(Fg),[Wg,Bg]=On(Fg,[Vg]),[Ug,Hg]=Wg(Fg),qg=t.forwardRef(((e,n)=>t.createElement(zg.Provider,{scope:e.__scopeRovingFocusGroup},t.createElement(zg.Slot,{scope:e.__scopeRovingFocusGroup},t.createElement(Gg,Rn({},e,{ref:n})))))),Gg=t.forwardRef(((e,n)=>{const{__scopeRovingFocusGroup:r,orientation:o,loop:i=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,...d}=e,f=t.useRef(null),p=kn(n,f),m=cr(a),[h=null,g]=zn({prop:s,defaultProp:l,onChange:c}),[v,b]=t.useState(!1),y=Fn(u),w=$g(r),x=t.useRef(!1),[C,E]=t.useState(0);return t.useEffect((()=>{const e=f.current;if(e)return e.addEventListener(Dg,y),()=>e.removeEventListener(Dg,y)}),[y]),t.createElement(Ug,{scope:r,orientation:o,dir:m,loop:i,currentTabStopId:h,onItemFocus:t.useCallback((e=>g(e)),[g]),onItemShiftTab:t.useCallback((()=>b(!0)),[]),onFocusableItemAdd:t.useCallback((()=>E((e=>e+1))),[]),onFocusableItemRemove:t.useCallback((()=>E((e=>e-1))),[])},t.createElement($n.div,Rn({tabIndex:v||0===C?-1:0,"data-orientation":o},d,{ref:p,style:{outline:"none",...e.style},onMouseDown:Ln(e.onMouseDown,(()=>{x.current=!0})),onFocus:Ln(e.onFocus,(e=>{const t=!x.current;if(e.target===e.currentTarget&&t&&!v){const t=new CustomEvent(Dg,Lg);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=w().filter((e=>e.focusable));Yg([e.find((e=>e.active)),e.find((e=>e.id===h)),...e].filter(Boolean).map((e=>e.ref.current)))}}x.current=!1})),onBlur:Ln(e.onBlur,(()=>b(!1)))})))})),Kg=t.forwardRef(((e,n)=>{const{__scopeRovingFocusGroup:r,focusable:o=!0,active:i=!1,tabStopId:a,...s}=e,l=Gn(),c=a||l,u=Hg("RovingFocusGroupItem",r),d=u.currentTabStopId===c,f=$g(r),{onFocusableItemAdd:p,onFocusableItemRemove:m}=u;return t.useEffect((()=>{if(o)return p(),()=>m()}),[o,p,m]),t.createElement(zg.ItemSlot,{scope:r,id:c,focusable:o,active:i},t.createElement($n.span,Rn({tabIndex:d?0:-1,"data-orientation":u.orientation},s,{ref:n,onMouseDown:Ln(e.onMouseDown,(e=>{o?u.onItemFocus(c):e.preventDefault()})),onFocus:Ln(e.onFocus,(()=>u.onItemFocus(c))),onKeyDown:Ln(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void u.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:Xg[r]}(e,u.orientation,u.dir);if(void 0!==t){e.preventDefault();let o=f().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const i=o.indexOf(e.currentTarget);o=u.loop?(r=i+1,(n=o).map(((e,t)=>n[(r+t)%n.length]))):o.slice(i+1)}setTimeout((()=>Yg(o)))}var n,r}))})))})),Xg={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Yg(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}const Zg=qg,Jg=Kg,Qg="Radio",[ev,tv]=On(Qg),[nv,rv]=ev(Qg),ov=t.forwardRef(((e,n)=>{const{__scopeRadio:r,name:o,checked:i=!1,required:a,disabled:s,value:l="on",onCheck:c,...u}=e,[d,f]=t.useState(null),p=kn(n,(e=>f(e))),m=t.useRef(!1),h=!d||Boolean(d.closest("form"));return t.createElement(nv,{scope:r,checked:i,disabled:s},t.createElement($n.button,Rn({type:"button",role:"radio","aria-checked":i,"data-state":sv(i),"data-disabled":s?"":void 0,disabled:s,value:l},u,{ref:p,onClick:Ln(e.onClick,(e=>{i||null==c||c(),h&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())}))})),h&&t.createElement(av,{control:d,bubbles:!m.current,name:o,value:l,checked:i,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))})),iv=t.forwardRef(((e,n)=>{const{__scopeRadio:r,forceMount:o,...i}=e,a=rv("RadioIndicator",r);return t.createElement(Bn,{present:o||a.checked},t.createElement($n.span,Rn({"data-state":sv(a.checked),"data-disabled":a.disabled?"":void 0},i,{ref:n})))})),av=e=>{const{control:n,checked:r,bubbles:o=!0,...i}=e,a=t.useRef(null),s=Wa(r),l=Ba(n);return t.useEffect((()=>{const e=a.current,t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(s!==r&&n){const t=new Event("click",{bubbles:o});n.call(e,r),e.dispatchEvent(t)}}),[s,r,o]),t.createElement("input",Rn({type:"radio","aria-hidden":!0,defaultChecked:r},i,{tabIndex:-1,ref:a,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function sv(e){return e?"checked":"unchecked"}const lv=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],cv="RadioGroup",[uv,dv]=On(cv,[Bg,tv]),fv=Bg(),pv=tv(),[mv,hv]=uv(cv),gv=t.forwardRef(((e,n)=>{const{__scopeRadioGroup:r,name:o,defaultValue:i,value:a,required:s=!1,disabled:l=!1,orientation:c,dir:u,loop:d=!0,onValueChange:f,...p}=e,m=fv(r),h=cr(u),[g,v]=zn({prop:a,defaultProp:i,onChange:f});return t.createElement(mv,{scope:r,name:o,required:s,disabled:l,value:g,onValueChange:v},t.createElement(Zg,Rn({asChild:!0},m,{orientation:c,dir:h,loop:d}),t.createElement($n.div,Rn({role:"radiogroup","aria-required":s,"aria-orientation":c,"data-disabled":l?"":void 0,dir:h},p,{ref:n}))))})),vv=t.forwardRef(((e,n)=>{const{__scopeRadioGroup:r,disabled:o,...i}=e,a=hv("RadioGroupItem",r),s=a.disabled||o,l=fv(r),c=pv(r),u=t.useRef(null),d=kn(n,u),f=a.value===i.value,p=t.useRef(!1);return t.useEffect((()=>{const e=e=>{lv.includes(e.key)&&(p.current=!0)},t=()=>p.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}}),[]),t.createElement(Jg,Rn({asChild:!0},l,{focusable:!s,active:f}),t.createElement(ov,Rn({disabled:s,required:a.required,checked:f},c,i,{name:a.name,ref:d,onCheck:()=>a.onValueChange(i.value),onKeyDown:Ln((e=>{"Enter"===e.key&&e.preventDefault()})),onFocus:Ln(i.onFocus,(()=>{var e;p.current&&(null===(e=u.current)||void 0===e||e.click())}))})))})),bv=t.forwardRef(((e,n)=>{const{__scopeRadioGroup:r,...o}=e,i=pv(r);return t.createElement(iv,Rn({},i,o,{ref:n}))})),yv=a.forwardRef(((e,t)=>{var{className:n}=e,o=de(e,["className"]);return r.jsx(gv,Object.assign({className:ee("grid gap-4",n)},o,{ref:t}))}));yv.displayName=gv.displayName;const wv=Q("grid grid-cols-[auto,auto,1fr] gap-2 items-start group",{variants:{variant:{default:"",selected:"[&>div>button]:border-coreColors-brandColorPrimary",deactivated:"[&_p]:text-stateColors-disabled"}},defaultVariants:{variant:"default"}}),xv=({key:e,label:t,numberAmount:n,subtext:o})=>r.jsxs("div",Object.assign({className:"col-span-2"},{children:[r.jsxs("div",Object.assign({className:"flex flex-row items-start"},{children:[r.jsx(Di,Object.assign({type:"body-primary",className:"group-disabled:text-stateColors-disabled mr-2"},{children:t})),n?r.jsx(Di,Object.assign({type:"body-primary",className:"text-textColors-secondaryColor group-disabled:text-stateColors-disabled"},{children:`(${n})`})):null]})),o?r.jsx(Di,Object.assign({type:"body-secondary",className:"group-disabled:text-stateColors-disabled mt-2"},{children:o})):null]})),Cv=a.forwardRef(((e,t)=>{var{value:n,label:o="",subtext:i,numberAmount:a=0,onSelect:s,onClick:l,selected:c=!1,className:u,variant:d="default",key:f}=e,p=de(e,["value","label","subtext","numberAmount","onSelect","onClick","selected","className","variant","key"]);return r.jsx("div",Object.assign({className:ee(wv({variant:d}),u)},{children:"deactivated"===d?r.jsxs(r.Fragment,{children:[r.jsx(Pi,{name:"circle-off",size:"md",className:"text-stateColors-disabled"}),r.jsx(xv,{label:o,numberAmount:a,subtext:i},f)]}):r.jsx(vv,Object.assign({ref:t,value:n,onSelect:s,checked:c,onClick:l,className:ee("flex items-center justify-center active:opacity-70",u)},p,{children:c||"selected"===d?r.jsxs("div",Object.assign({className:"grid grid-cols-[auto,auto,1fr] gap-2 items-start group"},{children:[r.jsx(Pi,{name:"circle-dot-filled",size:"md",className:"text-coreColors-brandColorPrimary z-10"}),r.jsx(xv,{label:o,numberAmount:a,subtext:i},f)]})):r.jsxs("div",Object.assign({className:"grid grid-cols-[auto,auto,1fr] gap-2 items-start group"},{children:[r.jsxs("div",Object.assign({className:"grid"},{children:[r.jsx(bv,Object.assign({className:"flex items-center justify-center col-start-1 row-start-1"},{children:r.jsx(Pi,{name:"circle-dot-filled",size:"md",className:"text-coreColors-brandColorPrimary z-10"})})),r.jsx("div",Object.assign({className:"flex items-center justify-center col-start-1 row-start-1"},{children:r.jsx(Pi,{name:"circle",size:"md",className:"col-start-1 row-start-1 text-coreColors-secondaryIcon items-center z-1"})}))]})),r.jsx(xv,{label:o,numberAmount:a,subtext:i},f)]}))}))}))}));function Ev(e,[t,n]){return Math.min(n,Math.max(t,e))}Cv.displayName=vv.displayName;const Sv="ScrollArea",[jv,Rv]=On(Sv),[Ov,Nv]=jv(Sv),Pv=t.forwardRef(((e,n)=>{const{__scopeScrollArea:r,type:o="hover",dir:i,scrollHideDelay:a=600,...s}=e,[l,c]=t.useState(null),[u,d]=t.useState(null),[f,p]=t.useState(null),[m,h]=t.useState(null),[g,v]=t.useState(null),[b,y]=t.useState(0),[w,x]=t.useState(0),[C,E]=t.useState(!1),[S,j]=t.useState(!1),R=kn(n,(e=>c(e))),O=cr(i);return t.createElement(Ov,{scope:r,type:o,dir:O,scrollHideDelay:a,scrollArea:l,viewport:u,onViewportChange:d,content:f,onContentChange:p,scrollbarX:m,onScrollbarXChange:h,scrollbarXEnabled:C,onScrollbarXEnabledChange:E,scrollbarY:g,onScrollbarYChange:v,scrollbarYEnabled:S,onScrollbarYEnabledChange:j,onCornerWidthChange:y,onCornerHeightChange:x},t.createElement($n.div,Rn({dir:O},s,{ref:R,style:{position:"relative","--radix-scroll-area-corner-width":b+"px","--radix-scroll-area-corner-height":w+"px",...e.style}})))})),kv=t.forwardRef(((e,n)=>{const{__scopeScrollArea:r,children:o,...i}=e,a=Nv("ScrollAreaViewport",r),s=kn(n,t.useRef(null),a.onViewportChange);return t.createElement(t.Fragment,null,t.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),t.createElement($n.div,Rn({"data-radix-scroll-area-viewport":""},i,{ref:s,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style}}),t.createElement("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"}},o)))})),Tv="ScrollAreaScrollbar",_v=t.forwardRef(((e,n)=>{const{forceMount:r,...o}=e,i=Nv(Tv,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:s}=i,l="horizontal"===e.orientation;return t.useEffect((()=>(l?a(!0):s(!0),()=>{l?a(!1):s(!1)})),[l,a,s]),"hover"===i.type?t.createElement(Av,Rn({},o,{ref:n,forceMount:r})):"scroll"===i.type?t.createElement(Mv,Rn({},o,{ref:n,forceMount:r})):"auto"===i.type?t.createElement(Iv,Rn({},o,{ref:n,forceMount:r})):"always"===i.type?t.createElement(Dv,Rn({},o,{ref:n})):null})),Av=t.forwardRef(((e,n)=>{const{forceMount:r,...o}=e,i=Nv(Tv,e.__scopeScrollArea),[a,s]=t.useState(!1);return t.useEffect((()=>{const e=i.scrollArea;let t=0;if(e){const n=()=>{window.clearTimeout(t),s(!0)},r=()=>{t=window.setTimeout((()=>s(!1)),i.scrollHideDelay)};return e.addEventListener("pointerenter",n),e.addEventListener("pointerleave",r),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",n),e.removeEventListener("pointerleave",r)}}}),[i.scrollArea,i.scrollHideDelay]),t.createElement(Bn,{present:r||a},t.createElement(Iv,Rn({"data-state":a?"visible":"hidden"},o,{ref:n})))})),Mv=t.forwardRef(((e,n)=>{const{forceMount:r,...o}=e,i=Nv(Tv,e.__scopeScrollArea),a="horizontal"===e.orientation,s=tb((()=>c("SCROLL_END")),100),[l,c]=(u="hidden",d={hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}},t.useReducer(((e,t)=>{const n=d[e][t];return null!=n?n:e}),u));var u,d;return t.useEffect((()=>{if("idle"===l){const e=window.setTimeout((()=>c("HIDE")),i.scrollHideDelay);return()=>window.clearTimeout(e)}}),[l,i.scrollHideDelay,c]),t.useEffect((()=>{const e=i.viewport,t=a?"scrollLeft":"scrollTop";if(e){let n=e[t];const r=()=>{const r=e[t];n!==r&&(c("SCROLL"),s()),n=r};return e.addEventListener("scroll",r),()=>e.removeEventListener("scroll",r)}}),[i.viewport,a,c,s]),t.createElement(Bn,{present:r||"hidden"!==l},t.createElement(Dv,Rn({"data-state":"hidden"===l?"hidden":"visible"},o,{ref:n,onPointerEnter:Ln(e.onPointerEnter,(()=>c("POINTER_ENTER"))),onPointerLeave:Ln(e.onPointerLeave,(()=>c("POINTER_LEAVE")))})))})),Iv=t.forwardRef(((e,n)=>{const r=Nv(Tv,e.__scopeScrollArea),{forceMount:o,...i}=e,[a,s]=t.useState(!1),l="horizontal"===e.orientation,c=tb((()=>{if(r.viewport){const e=r.viewport.offsetWidth<r.viewport.scrollWidth,t=r.viewport.offsetHeight<r.viewport.scrollHeight;s(l?e:t)}}),10);return nb(r.viewport,c),nb(r.content,c),t.createElement(Bn,{present:o||a},t.createElement(Dv,Rn({"data-state":a?"visible":"hidden"},i,{ref:n})))})),Dv=t.forwardRef(((e,n)=>{const{orientation:r="vertical",...o}=e,i=Nv(Tv,e.__scopeScrollArea),a=t.useRef(null),s=t.useRef(0),[l,c]=t.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=Xv(l.viewport,l.content),d={...o,sizes:l,onSizesChange:c,hasThumb:Boolean(u>0&&u<1),onThumbChange:e=>a.current=e,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:e=>s.current=e};function f(e,t){return function(e,t,n,r="ltr"){const o=Yv(n),i=o/2,a=t||i,s=o-a,l=n.scrollbar.paddingStart+a,c=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d="ltr"===r?[0,u]:[-1*u,0];return Jv([l,c],d)(e)}(e,s.current,l,t)}return"horizontal"===r?t.createElement(Lv,Rn({},d,{ref:n,onThumbPositionChange:()=>{if(i.viewport&&a.current){const e=Zv(i.viewport.scrollLeft,l,i.dir);a.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=f(e,i.dir))}})):"vertical"===r?t.createElement(Fv,Rn({},d,{ref:n,onThumbPositionChange:()=>{if(i.viewport&&a.current){const e=Zv(i.viewport.scrollTop,l);a.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=f(e))}})):null})),Lv=t.forwardRef(((e,n)=>{const{sizes:r,onSizesChange:o,...i}=e,a=Nv(Tv,e.__scopeScrollArea),[s,l]=t.useState(),c=t.useRef(null),u=kn(n,c,a.onScrollbarXChange);return t.useEffect((()=>{c.current&&l(getComputedStyle(c.current))}),[c]),t.createElement(Vv,Rn({"data-orientation":"horizontal"},i,{ref:u,sizes:r,style:{bottom:0,left:"rtl"===a.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===a.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Yv(r)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(a.viewport){const r=a.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),Qv(r,n)&&t.preventDefault()}},onResize:()=>{c.current&&a.viewport&&s&&o({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:Kv(s.paddingLeft),paddingEnd:Kv(s.paddingRight)}})}}))})),Fv=t.forwardRef(((e,n)=>{const{sizes:r,onSizesChange:o,...i}=e,a=Nv(Tv,e.__scopeScrollArea),[s,l]=t.useState(),c=t.useRef(null),u=kn(n,c,a.onScrollbarYChange);return t.useEffect((()=>{c.current&&l(getComputedStyle(c.current))}),[c]),t.createElement(Vv,Rn({"data-orientation":"vertical"},i,{ref:u,sizes:r,style:{top:0,right:"ltr"===a.dir?0:void 0,left:"rtl"===a.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Yv(r)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(a.viewport){const r=a.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),Qv(r,n)&&t.preventDefault()}},onResize:()=>{c.current&&a.viewport&&s&&o({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:Kv(s.paddingTop),paddingEnd:Kv(s.paddingBottom)}})}}))})),[zv,$v]=jv(Tv),Vv=t.forwardRef(((e,n)=>{const{__scopeScrollArea:r,sizes:o,hasThumb:i,onThumbChange:a,onThumbPointerUp:s,onThumbPointerDown:l,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:f,...p}=e,m=Nv(Tv,r),[h,g]=t.useState(null),v=kn(n,(e=>g(e))),b=t.useRef(null),y=t.useRef(""),w=m.viewport,x=o.content-o.viewport,C=Fn(d),E=Fn(c),S=tb(f,10);function j(e){if(b.current){const t=e.clientX-b.current.left,n=e.clientY-b.current.top;u({x:t,y:n})}}return t.useEffect((()=>{const e=e=>{const t=e.target;(null==h?void 0:h.contains(t))&&C(e,x)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})}),[w,h,x,C]),t.useEffect(E,[o,E]),nb(h,S),nb(m.content,S),t.createElement(zv,{scope:r,scrollbar:h,hasThumb:i,onThumbChange:Fn(a),onThumbPointerUp:Fn(s),onThumbPositionChange:E,onThumbPointerDown:Fn(l)},t.createElement($n.div,Rn({},p,{ref:v,style:{position:"absolute",...p.style},onPointerDown:Ln(e.onPointerDown,(e=>{if(0===e.button){e.target.setPointerCapture(e.pointerId),b.current=h.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),j(e)}})),onPointerMove:Ln(e.onPointerMove,j),onPointerUp:Ln(e.onPointerUp,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=y.current,m.viewport&&(m.viewport.style.scrollBehavior=""),b.current=null}))})))})),Wv="ScrollAreaThumb",Bv=t.forwardRef(((e,n)=>{const{forceMount:r,...o}=e,i=$v(Wv,e.__scopeScrollArea);return t.createElement(Bn,{present:r||i.hasThumb},t.createElement(Uv,Rn({ref:n},o)))})),Uv=t.forwardRef(((e,n)=>{const{__scopeScrollArea:r,style:o,...i}=e,a=Nv(Wv,r),s=$v(Wv,r),{onThumbPositionChange:l}=s,c=kn(n,(e=>s.onThumbChange(e))),u=t.useRef(),d=tb((()=>{u.current&&(u.current(),u.current=void 0)}),100);return t.useEffect((()=>{const e=a.viewport;if(e){const t=()=>{if(d(),!u.current){const t=eb(e,l);u.current=t,l()}};return l(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}}),[a.viewport,d,l]),t.createElement($n.div,Rn({"data-state":s.hasThumb?"visible":"hidden"},i,{ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:Ln(e.onPointerDownCapture,(e=>{const t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;s.onThumbPointerDown({x:n,y:r})})),onPointerUp:Ln(e.onPointerUp,s.onThumbPointerUp)}))})),Hv="ScrollAreaCorner",qv=t.forwardRef(((e,n)=>{const r=Nv(Hv,e.__scopeScrollArea),o=Boolean(r.scrollbarX&&r.scrollbarY);return"scroll"!==r.type&&o?t.createElement(Gv,Rn({},e,{ref:n})):null})),Gv=t.forwardRef(((e,n)=>{const{__scopeScrollArea:r,...o}=e,i=Nv(Hv,r),[a,s]=t.useState(0),[l,c]=t.useState(0),u=Boolean(a&&l);return nb(i.scrollbarX,(()=>{var e;const t=(null===(e=i.scrollbarX)||void 0===e?void 0:e.offsetHeight)||0;i.onCornerHeightChange(t),c(t)})),nb(i.scrollbarY,(()=>{var e;const t=(null===(e=i.scrollbarY)||void 0===e?void 0:e.offsetWidth)||0;i.onCornerWidthChange(t),s(t)})),u?t.createElement($n.div,Rn({},o,{ref:n,style:{width:a,height:l,position:"absolute",right:"ltr"===i.dir?0:void 0,left:"rtl"===i.dir?0:void 0,bottom:0,...e.style}})):null}));function Kv(e){return e?parseInt(e,10):0}function Xv(e,t){const n=e/t;return isNaN(n)?0:n}function Yv(e){const t=Xv(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Zv(e,t,n="ltr"){const r=Yv(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,a=t.content-t.viewport,s=i-r,l=Ev(e,"ltr"===n?[0,a]:[-1*a,0]);return Jv([0,a],[0,s])(l)}function Jv(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Qv(e,t){return e>0&&e<t}const eb=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},a=n.left!==i.left,s=n.top!==i.top;(a||s)&&t(),n=i,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function tb(e,n){const r=Fn(e),o=t.useRef(0);return t.useEffect((()=>()=>window.clearTimeout(o.current)),[]),t.useCallback((()=>{window.clearTimeout(o.current),o.current=window.setTimeout(r,n)}),[r,n])}function nb(e,t){const n=Fn(t);Wn((()=>{let t=0;if(e){const r=new ResizeObserver((()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)}));return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}}),[e,n])}const rb=Pv,ob=kv,ib=qv,ab=a.forwardRef(((e,t)=>{var{className:n,children:o}=e,i=de(e,["className","children"]);return r.jsxs(rb,Object.assign({ref:t,className:ee("relative overflow-hidden",n)},i,{children:[r.jsx(ob,Object.assign({className:"h-full w-full rounded-[inherit]"},{children:r.jsx("div",Object.assign({className:"flex w-max px-[16px]"},{children:o}))})),r.jsx(sb,{}),r.jsx(ib,{})]}))}));ab.displayName=rb.displayName;const sb=a.forwardRef(((e,t)=>{var{className:n,orientation:o="horizontal"}=e,i=de(e,["className","orientation"]);return r.jsx(_v,Object.assign({ref:t,orientation:o,className:ee("flex touch-none select-none transition-colors","vertical"===o&&"h-full w-2.5 border-l border-l-transparent p-[1px]","horizontal"===o&&"h-2.5 flex-col border-t border-t-transparent p-[1px] ",n)},i,{children:r.jsx(Bv,{className:"relative flex-1 rounded-full bg-border"})}))}));sb.displayName=_v.displayName;const lb=Q("flex py-2 px-4 whitespace-nowrap bg-coreColors-pageColor flex-row justify-center outline outline-1 rounded text-textColors-primaryColor outline-coreColors-dividingLines items-center",{variants:{selected:{true:"outline-coreColors-brandColorPrimary",false:""},disabled:{true:"[&>p]:!line-through [&>p]:text-stateColors-disabled",false:"cursor-pointer"}},defaultVariants:{selected:!1}}),cb=a.forwardRef(((e,t)=>{var{label:n,selected:o,disabled:i=!1,disabledClick:a=!0,className:s,onSelect:l,children:c}=e,u=de(e,["label","selected","disabled","disabledClick","className","onSelect","children"]);return r.jsx("button",Object.assign({disabled:i&&a,onClick:l,className:ee(lb({selected:o,className:s,disabled:i}),"group",s),ref:t},u,{children:c||r.jsx(Di,Object.assign({type:"body-primary",color:"text-textColors-primaryColor"},{children:n}))}))}));cb.displayName="Selectors";const ub="horizontal",db=["horizontal","vertical"],fb=t.forwardRef(((e,n)=>{const{decorative:r,orientation:o=ub,...i}=e,a=pb(o)?o:ub,s=r?{role:"none"}:{"aria-orientation":"vertical"===a?a:void 0,role:"separator"};return t.createElement($n.div,Rn({"data-orientation":a},s,i,{ref:n}))}));function pb(e){return db.includes(e)}fb.propTypes={orientation(e,t,n){const r=e[t],o=String(r);return r&&!pb(r)?new Error(function(e,t){return`Invalid prop \`orientation\` of value \`${e}\` supplied to \`${t}\`, expected one of:\n - horizontal\n - vertical\n\nDefaulting to \`${ub}\`.`}(o,n)):null}};const mb=fb,hb=a.forwardRef(((e,t)=>{var{className:n,orientation:o="horizontal",decorative:i=!0}=e,a=de(e,["className","orientation","decorative"]);return r.jsx(mb,Object.assign({ref:t,decorative:i,orientation:o,className:ee("shrink-0 bg-border","horizontal"===o?"h-[1px] w-full":"h-full w-[1px]",n)},a))}));hb.displayName=mb.displayName;const gb=["PageUp","PageDown"],vb=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],bb={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},yb="Slider",[wb,xb,Cb]=Dn(yb),[Eb,Sb]=On(yb,[Cb]),[jb,Rb]=Eb(yb),Ob=t.forwardRef(((e,n)=>{const{name:r,min:o=0,max:i=100,step:a=1,orientation:s="horizontal",disabled:l=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[o],value:d,onValueChange:f=()=>{},onValueCommit:p=()=>{},inverted:m=!1,...h}=e,[g,v]=t.useState(null),b=kn(n,(e=>v(e))),y=t.useRef(new Set),w=t.useRef(0),x="horizontal"===s,C=!g||Boolean(g.closest("form")),E=x?kb:Tb,[S=[],j]=zn({prop:d,defaultProp:u,onChange:e=>{var t;null===(t=[...y.current][w.current])||void 0===t||t.focus(),f(e)}}),R=t.useRef(S);function O(e,t,{commit:n}={commit:!1}){const r=function(e){return(String(e).split(".")[1]||"").length}(a),s=function(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}(Math.round((e-o)/a)*a+o,r),l=Ev(s,[o,i]);j(((e=[])=>{const r=function(e=[],t,n){const r=[...e];return r[n]=t,r.sort(((e,t)=>e-t))}(e,l,t);if(function(e,t){if(t>0){const n=function(e){return e.slice(0,-1).map(((t,n)=>e[n+1]-t))}(e);return Math.min(...n)>=t}return!0}(r,c*a)){w.current=r.indexOf(l);const t=String(r)!==String(e);return t&&n&&p(r),t?r:e}return e}))}return t.createElement(jb,{scope:e.__scopeSlider,disabled:l,min:o,max:i,valueIndexToChangeRef:w,thumbs:y.current,values:S,orientation:s},t.createElement(wb.Provider,{scope:e.__scopeSlider},t.createElement(wb.Slot,{scope:e.__scopeSlider},t.createElement(E,Rn({"aria-disabled":l,"data-disabled":l?"":void 0},h,{ref:b,onPointerDown:Ln(h.onPointerDown,(()=>{l||(R.current=S)})),min:o,max:i,inverted:m,onSlideStart:l?void 0:function(e){const t=function(e,t){if(1===e.length)return 0;const n=e.map((e=>Math.abs(e-t))),r=Math.min(...n);return n.indexOf(r)}(S,e);O(e,t)},onSlideMove:l?void 0:function(e){O(e,w.current)},onSlideEnd:l?void 0:function(){const e=R.current[w.current];S[w.current]!==e&&p(S)},onHomeKeyDown:()=>!l&&O(o,0,{commit:!0}),onEndKeyDown:()=>!l&&O(i,S.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!l){const n=gb.includes(e.key)||e.shiftKey&&vb.includes(e.key)?10:1,r=w.current;O(S[r]+a*n*t,r,{commit:!0})}}})))),C&&S.map(((e,n)=>t.createElement(zb,{key:n,name:r?r+(S.length>1?"[]":""):void 0,value:e}))))})),[Nb,Pb]=Eb(yb,{startEdge:"left",endEdge:"right",size:"width",direction:1}),kb=t.forwardRef(((e,n)=>{const{min:r,max:o,dir:i,inverted:a,onSlideStart:s,onSlideMove:l,onSlideEnd:c,onStepKeyDown:u,...d}=e,[f,p]=t.useState(null),m=kn(n,(e=>p(e))),h=t.useRef(),g=cr(i),v="ltr"===g,b=v&&!a||!v&&a;function y(e){const t=h.current||f.getBoundingClientRect(),n=Vb([0,t.width],b?[r,o]:[o,r]);return h.current=t,n(e-t.left)}return t.createElement(Nb,{scope:e.__scopeSlider,startEdge:b?"left":"right",endEdge:b?"right":"left",direction:b?1:-1,size:"width"},t.createElement(_b,Rn({dir:g,"data-orientation":"horizontal"},d,{ref:m,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{const t=y(e.clientX);null==s||s(t)},onSlideMove:e=>{const t=y(e.clientX);null==l||l(t)},onSlideEnd:()=>{h.current=void 0,null==c||c()},onStepKeyDown:e=>{const t=bb[b?"from-left":"from-right"].includes(e.key);null==u||u({event:e,direction:t?-1:1})}})))})),Tb=t.forwardRef(((e,n)=>{const{min:r,max:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...u}=e,d=t.useRef(null),f=kn(n,d),p=t.useRef(),m=!i;function h(e){const t=p.current||d.current.getBoundingClientRect(),n=Vb([0,t.height],m?[o,r]:[r,o]);return p.current=t,n(e-t.top)}return t.createElement(Nb,{scope:e.__scopeSlider,startEdge:m?"bottom":"top",endEdge:m?"top":"bottom",size:"height",direction:m?1:-1},t.createElement(_b,Rn({"data-orientation":"vertical"},u,{ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{const t=h(e.clientY);null==a||a(t)},onSlideMove:e=>{const t=h(e.clientY);null==s||s(t)},onSlideEnd:()=>{p.current=void 0,null==l||l()},onStepKeyDown:e=>{const t=bb[m?"from-bottom":"from-top"].includes(e.key);null==c||c({event:e,direction:t?-1:1})}})))})),_b=t.forwardRef(((e,n)=>{const{__scopeSlider:r,onSlideStart:o,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:s,onEndKeyDown:l,onStepKeyDown:c,...u}=e,d=Rb(yb,r);return t.createElement($n.span,Rn({},u,{ref:n,onKeyDown:Ln(e.onKeyDown,(e=>{"Home"===e.key?(s(e),e.preventDefault()):"End"===e.key?(l(e),e.preventDefault()):gb.concat(vb).includes(e.key)&&(c(e),e.preventDefault())})),onPointerDown:Ln(e.onPointerDown,(e=>{const t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),d.thumbs.has(t)?t.focus():o(e)})),onPointerMove:Ln(e.onPointerMove,(e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)})),onPointerUp:Ln(e.onPointerUp,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))}))}))})),Ab=t.forwardRef(((e,n)=>{const{__scopeSlider:r,...o}=e,i=Rb("SliderTrack",r);return t.createElement($n.span,Rn({"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation},o,{ref:n}))})),Mb="SliderRange",Ib=t.forwardRef(((e,n)=>{const{__scopeSlider:r,...o}=e,i=Rb(Mb,r),a=Pb(Mb,r),s=kn(n,t.useRef(null)),l=i.values.length,c=i.values.map((e=>$b(e,i.min,i.max))),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return t.createElement($n.span,Rn({"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0},o,{ref:s,style:{...e.style,[a.startEdge]:u+"%",[a.endEdge]:d+"%"}}))})),Db="SliderThumb",Lb=t.forwardRef(((e,n)=>{const r=xb(e.__scopeSlider),[o,i]=t.useState(null),a=kn(n,(e=>i(e))),s=t.useMemo((()=>o?r().findIndex((e=>e.ref.current===o)):-1),[r,o]);return t.createElement(Fb,Rn({},e,{ref:a,index:s}))})),Fb=t.forwardRef(((e,n)=>{const{__scopeSlider:r,index:o,...i}=e,a=Rb(Db,r),s=Pb(Db,r),[l,c]=t.useState(null),u=kn(n,(e=>c(e))),d=Ba(l),f=a.values[o],p=void 0===f?0:$b(f,a.min,a.max),m=function(e,t){return t>2?`Value ${e+1} of ${t}`:2===t?["Minimum","Maximum"][e]:void 0}(o,a.values.length),h=null==d?void 0:d[s.size],g=h?function(e,t,n){const r=e/2,o=Vb([0,50],[0,r]);return(r-o(t)*n)*n}(h,p,s.direction):0;return t.useEffect((()=>{if(l)return a.thumbs.add(l),()=>{a.thumbs.delete(l)}}),[l,a.thumbs]),t.createElement("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${p}% + ${g}px)`}},t.createElement(wb.ItemSlot,{scope:e.__scopeSlider},t.createElement($n.span,Rn({role:"slider","aria-label":e["aria-label"]||m,"aria-valuemin":a.min,"aria-valuenow":f,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0},i,{ref:u,style:void 0===f?{display:"none"}:e.style,onFocus:Ln(e.onFocus,(()=>{a.valueIndexToChangeRef.current=o}))}))))})),zb=e=>{const{value:n,...r}=e,o=t.useRef(null),i=Wa(n);return t.useEffect((()=>{const e=o.current,t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(i!==n&&r){const t=new Event("input",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}}),[i,n]),t.createElement("input",Rn({style:{display:"none"}},r,{ref:o,defaultValue:n}))};function $b(e,t,n){return Ev(100/(n-t)*(e-t),[0,100])}function Vb(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}const Wb=Ob,Bb=Ab,Ub=Ib,Hb=Lb,qb=a.forwardRef(((e,t)=>{var{className:n,max:o,min:i=0,step:s=1,defaultValue:l,value:c,onChange:u}=e,d=de(e,["className","max","min","step","defaultValue","value","onChange"]);const f=((e,t)=>{const[n,r]=a.useState(e);return a.useEffect((()=>{const n=setTimeout((()=>{r(e)}),t);return()=>{clearTimeout(n)}}),[e,t]),n})(c,200);return r.jsxs(r.Fragment,{children:[r.jsx("div",Object.assign({className:"mt-3 mb-6"},{children:r.jsxs(Wb,Object.assign({ref:t,className:ee("flex relative h-0.5 w-auto items-center select-none",n),onValueChange:e=>u(e),onValueCommit:e=>{(e=>{u(e),d.onValueChange&&d.onValueChange(e)})(e)},defaultValue:l,value:c,max:o,min:i,step:s},d,{children:[r.jsx(Bb,Object.assign({className:"relative h-1 rounded w-full grow overflow-hidden bg-coreColors-dividingLines"},{children:r.jsx(Ub,{className:"absolute h-full bg-coreColors-brandColorPrimary"})})),r.jsx(Hb,{className:"block hover:slider-thumb h-4 w-4 rounded-full border-2 border-coreColors-brandColorPrimary bg-coreColors-modalBackground focus-visible:outline-none hover:h-[18px] hover:w-[18px] disabled:pointer-events-none"})]}))})),r.jsxs("div",Object.assign({className:"flex w-auto gap-4 "},{children:["",r.jsx("div",Object.assign({className:"w-full px-4 py-2 outline outline-1 outline-coreColors-dividingLines rounded bg-coreColors-inputBackground"},{children:r.jsxs("div",Object.assign({className:"flex flex-col"},{children:[r.jsx("div",Object.assign({className:"flex items-center h-4 text-textColors-secondaryColor text-[10px] leading-[13px]"},{children:"Maximum"})),r.jsxs("div",Object.assign({className:"flex h-6 text-textColors-primaryColor text-[14px] w-full [&>div]:w-full"},{children:["$",r.jsx(Cg,{className:"border-0 p-0 h-full w-full text-[14px]",id:"slider-maximum",value:f[0].toString(),placeholder:l[0].toString(),onChange:e=>{const t=Number(e);u(t>o?[o]:[t])}})]}))]}))}))]}))]})}));qb.displayName=Wb.displayName;const Gb=a.forwardRef(((e,t)=>{var{imgUrl:n,name:o,oldPrice:i,newPrice:a,savePercentage:s=!0,selected:l=!1,type:c="subscription",onClick:u,className:d}=e,f=de(e,["imgUrl","name","oldPrice","newPrice","savePercentage","selected","type","onClick","className"]);return r.jsxs("button",Object.assign({className:ee("flex flex-row p-4 gap-2 w-full border-b border-coreColors-dividingLines",l?"bg-stateColors-skeleton":"",d),ref:t,onClick:u},f,{children:["subscription"==c&&r.jsx(Pi,{name:"repeat",size:"sm",color:"stateColors-subscriptions",className:"my-auto"}),r.jsxs("div",Object.assign({className:"flex flex-col w-full items-start overflow-hidden"},{children:[r.jsx(Di,Object.assign({type:"body-primary",className:"text-textColors-primaryColor truncate w-full text-left"},{children:o})),"subscription"==c&&s&&a?r.jsxs(Di,Object.assign({type:"body-secondary",className:"text-stateColors-subscriptions"},{children:["Save ",100-100*a/i,"%"]})):null]})),r.jsxs("div",Object.assign({className:"flex flex-row items-start gap-2"},{children:["subscription"==c&&a?r.jsx(Di,Object.assign({type:"body-primary",className:"text-textColors-salePriceText"},{children:`$${a.toFixed(2)}`})):null,r.jsx(Di,Object.assign({type:"body-primary",className:""+("subscription"==c?"line-through hover:!line-through text-textColors-strikethroughPriceText":"text-textColors-priceText")},{children:`$${i.toFixed(2)}`}))]}))]}))}));Gb.displayName="Subscription";const Kb="Switch",[Xb,Yb]=On(Kb),[Zb,Jb]=Xb(Kb),Qb=t.forwardRef(((e,n)=>{const{__scopeSwitch:r,name:o,checked:i,defaultChecked:a,required:s,disabled:l,value:c="on",onCheckedChange:u,...d}=e,[f,p]=t.useState(null),m=kn(n,(e=>p(e))),h=t.useRef(!1),g=!f||Boolean(f.closest("form")),[v=!1,b]=zn({prop:i,defaultProp:a,onChange:u});return t.createElement(Zb,{scope:r,checked:v,disabled:l},t.createElement($n.button,Rn({type:"button",role:"switch","aria-checked":v,"aria-required":s,"data-state":ty(v),"data-disabled":l?"":void 0,disabled:l,value:c},d,{ref:m,onClick:Ln(e.onClick,(e=>{b((e=>!e)),g&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())}))})),g&&t.createElement(ey,{control:f,bubbles:!h.current,name:o,value:c,checked:v,required:s,disabled:l,style:{transform:"translateX(-100%)"}}))})),ey=e=>{const{control:n,checked:r,bubbles:o=!0,...i}=e,a=t.useRef(null),s=Wa(r),l=Ba(n);return t.useEffect((()=>{const e=a.current,t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(s!==r&&n){const t=new Event("click",{bubbles:o});n.call(e,r),e.dispatchEvent(t)}}),[s,r,o]),t.createElement("input",Rn({type:"checkbox","aria-hidden":!0,defaultChecked:r},i,{tabIndex:-1,ref:a,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function ty(e){return e?"checked":"unchecked"}const ny=Qb,ry=t.forwardRef(((e,n)=>{const{__scopeSwitch:r,...o}=e,i=Jb("SwitchThumb",r);return t.createElement($n.span,Rn({"data-state":ty(i.checked),"data-disabled":i.disabled?"":void 0},o,{ref:n}))})),oy=a.forwardRef(((e,t)=>{var{className:n,onClick:o}=e,i=de(e,["className","onClick"]);return r.jsx(ny,Object.assign({onClick:o,className:ee("peer inline-flex h-8 w-14 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-stateColors-success data-[state=unchecked]:bg-stateColors-disabled",n)},i,{ref:t},{children:r.jsx(ry,{className:ee("pointer-events-none block h-7 w-7 rounded-full bg-coreColors-pageColor drop-shadow-[0_3px_1px_0_rgba(0,0,0,1)] ring-0 transition-transform data-[state=checked]:translate-x-6 data-[state=unchecked]:translate-x-0")})}))}));oy.displayName=ny.displayName;const iy=Q("flex items-center justify-center px-4 py-2 active:opacity-70",{variants:{isActive:{true:"[&>p]:text-textColors-primaryColor",false:"[&>p]:text-textColors-secondaryColor"}},defaultVariants:{isActive:!1}}),ay=({label:e,isActive:t=!1,onClick:n})=>r.jsx("button",Object.assign({className:ee(iy({isActive:t}),"whitespace-nowrap"),onClick:n},{children:r.jsx(Di,Object.assign({type:"body-primary"},{children:e}))})),sy=a.forwardRef(((e,t)=>{var{className:n,tabs:o,activeTab:i,onTabChange:s}=e,l=de(e,["className","tabs","activeTab","onTabChange"]);const[c,u]=a.useState({left:0,width:0}),d=a.useRef(null),[f,p]=a.useState(!1),[m,h]=a.useState(!1);a.useEffect((()=>{s(i)}),[i,o,s]);const g=()=>{const{scrollLeft:e,scrollWidth:t,clientWidth:n}=d.current;p(e>0),h(e+n<t)},v=a.useCallback((()=>{var e,t;if(null===i)return void u({left:0,width:0});const n=d.current.children[i];u({left:null!==(e=null==n?void 0:n.offsetLeft)&&void 0!==e?e:0,width:null!==(t=null==n?void 0:n.clientWidth)&&void 0!==t?t:0}),n.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})}),[i]);return a.useEffect((()=>(v(),window.addEventListener("resize",v),()=>{window.removeEventListener("resize",v)})),[v]),a.useEffect((()=>{const e=()=>g();return window.addEventListener("resize",e),g(),()=>window.removeEventListener("resize",e)}),[]),a.useEffect((()=>{g()}),[o]),a.useEffect((()=>{t&&("function"==typeof t?t(d.current):t.current=d.current)}),[t]),r.jsxs("div",Object.assign({className:"relative no-scrollbar"},l,{children:[r.jsxs("div",Object.assign({ref:d,className:"relative flex overflow-x-auto no-scrollbar",onScroll:g},{children:[o.map(((e,t)=>r.jsx(ay,{label:e.label,isActive:i===t,onClick:()=>s(t)},t))),null!==i&&r.jsx("div",{className:"absolute bottom-0 bg-coreColors-brandColorPrimary h-[2px] transition-all duration-300",style:{left:c.left,width:c.width}})]})),m&&r.jsx("div",Object.assign({className:"absolute right-0 bottom-0 w-16 h-10 pointer-events-none overflow-hidden"},{children:r.jsx("div",{className:"w-full h-full gradient-right"})})),f&&r.jsx("div",Object.assign({className:"absolute left-0 bottom-0 w-16 h-10 pointer-events-none overflow-hidden"},{children:r.jsx("div",{className:"w-full h-full gradient-left"})}))]}))}));sy.displayName="Tabs";const ly=Q("relative pl-4 pr-4 rounded border border-coreColors-dividingLines bg-coreColors-inputBackground focus-within:border-coreColors-brandColorPrimary [&_label]:focus-within:text-coreColors-brandColorPrimary",{variants:{error:{true:"!border-stateColors-error [&_*]:text-stateColors-error [&_*]:placeholder:text-stateColors-error focus-within:!border-stateColors-error [&+label]:text-stateColors-error [&_label]:focus-within:!text-stateColors-error",false:""}},defaultVariants:{error:!1}}),cy=a.forwardRef(((e,t)=>{var{className:n,error:o=!1,id:i,label:s,icon:l,asChild:c,value:u,placeholder:d,maxHeight:f,onChange:p}=e,m=de(e,["className","error","id","label","icon","asChild","value","placeholder","maxHeight","onChange"]);const h=c?Tn:"div",[g,v]=a.useState(u),b=a.useRef(null);a.useEffect((()=>{b.current&&(b.current.style.height="auto",b.current.style.height=`${b.current.scrollHeight}px`)}),[g]);return r.jsxs(h,Object.assign({className:ee(ly({error:o}),g?"pt-6 pb-2":"pt-4 pb-4",n),onClick:()=>{b.current&&b.current.focus()}},{children:[r.jsx("textarea",Object.assign({placeholder:d,value:u,onChange:e=>{p(e.target.value),(e=>{v(e)})(e.target.value)},id:i,className:ee("textarea-component overflow-y-auto w-full resize-none text-[14px] font-fontRegular leading-[160%] font-normal min-h-[24px] align-top placeholder-shown:!truncate text-textColors-primaryColor ring-offset-background file:border-0 file:bg-transparent placeholder-shown:text-textColors-secondaryColor focus-visible:outline-none focus-visible:ring-0 disabled:cursor-not-allowed disabled:opacity-50 focus:border-coreColors-brandColorPrimary peer",{"pr-1":b.current&&f&&b.current.scrollHeight>=f}),style:{maxHeight:`${f}px`},"data-text":"Enter text here",rows:1,ref:b},m)),s?r.jsx("label",Object.assign({htmlFor:i,style:{maxWidth:"-webkit-fill-available"},className:"absolute truncate text-[10px] pr-4 text-textColors-secondaryColor top-2 z-10 h-4 origin-[0] start-4 opacity-100 peer-placeholder-shown:opacity-0"},{children:s})):null]}))}));cy.displayName="Textarea";const uy=t.forwardRef(((e,n)=>t.createElement($n.span,Rn({},e,{ref:n,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})))),dy="ToastProvider",[fy,py,my]=Dn("Toast"),[hy,gy]=On("Toast",[my]),[vy,by]=hy(dy),yy=e=>{const{__scopeToast:n,label:r="Notification",duration:o=5e3,swipeDirection:i="right",swipeThreshold:a=50,children:s}=e,[l,c]=t.useState(null),[u,d]=t.useState(0),f=t.useRef(!1),p=t.useRef(!1);return t.createElement(fy.Provider,{scope:n},t.createElement(vy,{scope:n,label:r,duration:o,swipeDirection:i,swipeThreshold:a,toastCount:u,viewport:l,onViewportChange:c,onToastAdd:t.useCallback((()=>d((e=>e+1))),[]),onToastRemove:t.useCallback((()=>d((e=>e-1))),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:p},s))};yy.propTypes={label(e){if(e.label&&"string"==typeof e.label&&!e.label.trim()){return new Error(`Invalid prop \`label\` supplied to \`${dy}\`. Expected non-empty \`string\`.`)}return null}};const wy=["F8"],xy="toast.viewportPause",Cy="toast.viewportResume",Ey=t.forwardRef(((e,n)=>{const{__scopeToast:r,hotkey:o=wy,label:i="Notifications ({hotkey})",...a}=e,s=by("ToastViewport",r),l=py(r),c=t.useRef(null),u=t.useRef(null),d=t.useRef(null),f=t.useRef(null),p=kn(n,f,s.onViewportChange),m=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),h=s.toastCount>0;t.useEffect((()=>{const e=e=>{var t;o.every((t=>e[t]||e.code===t))&&(null===(t=f.current)||void 0===t||t.focus())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[o]),t.useEffect((()=>{const e=c.current,t=f.current;if(h&&e&&t){const n=()=>{if(!s.isClosePausedRef.current){const e=new CustomEvent(xy);t.dispatchEvent(e),s.isClosePausedRef.current=!0}},r=()=>{if(s.isClosePausedRef.current){const e=new CustomEvent(Cy);t.dispatchEvent(e),s.isClosePausedRef.current=!1}},o=t=>{!e.contains(t.relatedTarget)&&r()},i=()=>{e.contains(document.activeElement)||r()};return e.addEventListener("focusin",n),e.addEventListener("focusout",o),e.addEventListener("pointermove",n),e.addEventListener("pointerleave",i),window.addEventListener("blur",n),window.addEventListener("focus",r),()=>{e.removeEventListener("focusin",n),e.removeEventListener("focusout",o),e.removeEventListener("pointermove",n),e.removeEventListener("pointerleave",i),window.removeEventListener("blur",n),window.removeEventListener("focus",r)}}}),[h,s.isClosePausedRef]);const g=t.useCallback((({tabbingDirection:e})=>{const t=l().map((t=>{const n=t.ref.current,r=[n,...zy(n)];return"forwards"===e?r:r.reverse()}));return("forwards"===e?t.reverse():t).flat()}),[l]);return t.useEffect((()=>{const e=f.current;if(e){const t=t=>{const n=t.altKey||t.ctrlKey||t.metaKey;if("Tab"===t.key&&!n){const n=document.activeElement,a=t.shiftKey;var r;if(t.target===e&&a)return void(null===(r=u.current)||void 0===r||r.focus());const s=g({tabbingDirection:a?"backwards":"forwards"}),l=s.findIndex((e=>e===n));var o,i;if($y(s.slice(l+1)))t.preventDefault();else a?null===(o=u.current)||void 0===o||o.focus():null===(i=d.current)||void 0===i||i.focus()}};return e.addEventListener("keydown",t),()=>e.removeEventListener("keydown",t)}}),[l,g]),t.createElement(ws,{ref:c,role:"region","aria-label":i.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:h?void 0:"none"}},h&&t.createElement(Sy,{ref:u,onFocusFromOutsideViewport:()=>{$y(g({tabbingDirection:"forwards"}))}}),t.createElement(fy.Slot,{scope:r},t.createElement($n.ol,Rn({tabIndex:-1},a,{ref:p}))),h&&t.createElement(Sy,{ref:d,onFocusFromOutsideViewport:()=>{$y(g({tabbingDirection:"backwards"}))}}))})),Sy=t.forwardRef(((e,n)=>{const{__scopeToast:r,onFocusFromOutsideViewport:o,...i}=e,a=by("ToastFocusProxy",r);return t.createElement(uy,Rn({"aria-hidden":!0,tabIndex:0},i,{ref:n,style:{position:"fixed"},onFocus:e=>{var t;const n=e.relatedTarget;!(null!==(t=a.viewport)&&void 0!==t&&t.contains(n))&&o()}}))})),jy="Toast",Ry=t.forwardRef(((e,n)=>{const{forceMount:r,open:o,defaultOpen:i,onOpenChange:a,...s}=e,[l=!0,c]=zn({prop:o,defaultProp:i,onChange:a});return t.createElement(Bn,{present:r||l},t.createElement(Py,Rn({open:l},s,{ref:n,onClose:()=>c(!1),onPause:Fn(e.onPause),onResume:Fn(e.onResume),onSwipeStart:Ln(e.onSwipeStart,(e=>{e.currentTarget.setAttribute("data-swipe","start")})),onSwipeMove:Ln(e.onSwipeMove,(e=>{const{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","move"),e.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${t}px`),e.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${n}px`)})),onSwipeCancel:Ln(e.onSwipeCancel,(e=>{e.currentTarget.setAttribute("data-swipe","cancel"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")})),onSwipeEnd:Ln(e.onSwipeEnd,(e=>{const{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","end"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${t}px`),e.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${n}px`),c(!1)}))})))})),[Oy,Ny]=hy(jy,{onClose(){}}),Py=t.forwardRef(((e,n)=>{const{__scopeToast:r,type:i="foreground",duration:a,open:s,onClose:l,onEscapeKeyDown:c,onPause:u,onResume:d,onSwipeStart:f,onSwipeMove:p,onSwipeCancel:m,onSwipeEnd:h,...g}=e,v=by(jy,r),[b,y]=t.useState(null),w=kn(n,(e=>y(e))),x=t.useRef(null),C=t.useRef(null),E=a||v.duration,S=t.useRef(0),j=t.useRef(E),R=t.useRef(0),{onToastAdd:O,onToastRemove:N}=v,P=Fn((()=>{var e;(null==b?void 0:b.contains(document.activeElement))&&(null===(e=v.viewport)||void 0===e||e.focus()),l()})),k=t.useCallback((e=>{e&&e!==1/0&&(window.clearTimeout(R.current),S.current=(new Date).getTime(),R.current=window.setTimeout(P,e))}),[P]);t.useEffect((()=>{const e=v.viewport;if(e){const t=()=>{k(j.current),null==d||d()},n=()=>{const e=(new Date).getTime()-S.current;j.current=j.current-e,window.clearTimeout(R.current),null==u||u()};return e.addEventListener(xy,n),e.addEventListener(Cy,t),()=>{e.removeEventListener(xy,n),e.removeEventListener(Cy,t)}}}),[v.viewport,E,u,d,k]),t.useEffect((()=>{s&&!v.isClosePausedRef.current&&k(E)}),[s,E,v.isClosePausedRef,k]),t.useEffect((()=>(O(),()=>N())),[O,N]);const T=t.useMemo((()=>b?Dy(b):null),[b]);return v.viewport?t.createElement(t.Fragment,null,T&&t.createElement(ky,{__scopeToast:r,role:"status","aria-live":"foreground"===i?"assertive":"polite","aria-atomic":!0},T),t.createElement(Oy,{scope:r,onClose:P},o.createPortal(t.createElement(fy.ItemSlot,{scope:r},t.createElement(ys,{asChild:!0,onEscapeKeyDown:Ln(c,(()=>{v.isFocusedToastEscapeKeyDownRef.current||P(),v.isFocusedToastEscapeKeyDownRef.current=!1}))},t.createElement($n.li,Rn({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":v.swipeDirection},g,{ref:w,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Ln(e.onKeyDown,(e=>{"Escape"===e.key&&(null==c||c(e.nativeEvent),e.nativeEvent.defaultPrevented||(v.isFocusedToastEscapeKeyDownRef.current=!0,P()))})),onPointerDown:Ln(e.onPointerDown,(e=>{0===e.button&&(x.current={x:e.clientX,y:e.clientY})})),onPointerMove:Ln(e.onPointerMove,(e=>{if(!x.current)return;const t=e.clientX-x.current.x,n=e.clientY-x.current.y,r=Boolean(C.current),o=["left","right"].includes(v.swipeDirection),i=["left","up"].includes(v.swipeDirection)?Math.min:Math.max,a=o?i(0,t):0,s=o?0:i(0,n),l="touch"===e.pointerType?10:2,c={x:a,y:s},u={originalEvent:e,delta:c};r?(C.current=c,Ly("toast.swipeMove",p,u,{discrete:!1})):Fy(c,v.swipeDirection,l)?(C.current=c,Ly("toast.swipeStart",f,u,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>l||Math.abs(n)>l)&&(x.current=null)})),onPointerUp:Ln(e.onPointerUp,(e=>{const t=C.current,n=e.target;if(n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),C.current=null,x.current=null,t){const n=e.currentTarget,r={originalEvent:e,delta:t};Fy(t,v.swipeDirection,v.swipeThreshold)?Ly("toast.swipeEnd",h,r,{discrete:!0}):Ly("toast.swipeCancel",m,r,{discrete:!0}),n.addEventListener("click",(e=>e.preventDefault()),{once:!0})}}))})))),v.viewport))):null}));Py.propTypes={type(e){if(e.type&&!["foreground","background"].includes(e.type)){return new Error(`Invalid prop \`type\` supplied to \`${jy}\`. Expected \`foreground | background\`.`)}return null}};const ky=e=>{const{__scopeToast:n,children:r,...o}=e,i=by(jy,n),[a,s]=t.useState(!1),[l,c]=t.useState(!1);return function(e=()=>{}){const t=Fn(e);Wn((()=>{let e=0,n=0;return e=window.requestAnimationFrame((()=>n=window.requestAnimationFrame(t))),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(n)}}),[t])}((()=>s(!0))),t.useEffect((()=>{const e=window.setTimeout((()=>c(!0)),1e3);return()=>window.clearTimeout(e)}),[]),l?null:t.createElement(Ts,{asChild:!0},t.createElement(uy,o,a&&t.createElement(t.Fragment,null,i.label," ",r)))},Ty=t.forwardRef(((e,n)=>{const{__scopeToast:r,...o}=e;return t.createElement($n.div,Rn({},o,{ref:n}))})),_y=t.forwardRef(((e,n)=>{const{__scopeToast:r,...o}=e;return t.createElement($n.div,Rn({},o,{ref:n}))})),Ay=t.forwardRef(((e,n)=>{const{altText:r,...o}=e;return r?t.createElement(Iy,{altText:r,asChild:!0},t.createElement(My,Rn({},o,{ref:n}))):null}));Ay.propTypes={altText:e=>e.altText?null:new Error("Missing prop `altText` expected on `ToastAction`")};const My=t.forwardRef(((e,n)=>{const{__scopeToast:r,...o}=e,i=Ny("ToastClose",r);return t.createElement(Iy,{asChild:!0},t.createElement($n.button,Rn({type:"button"},o,{ref:n,onClick:Ln(e.onClick,i.onClose)})))})),Iy=t.forwardRef(((e,n)=>{const{__scopeToast:r,altText:o,...i}=e;return t.createElement($n.div,Rn({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0},i,{ref:n}))}));function Dy(e){const t=[];return Array.from(e.childNodes).forEach((e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent&&t.push(e.textContent),function(e){return e.nodeType===e.ELEMENT_NODE}(e)){const n=e.ariaHidden||e.hidden||"none"===e.style.display,r=""===e.dataset.radixToastAnnounceExclude;if(!n)if(r){const n=e.dataset.radixToastAnnounceAlt;n&&t.push(n)}else t.push(...Dy(e))}})),t}function Ly(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Vn(o,i):o.dispatchEvent(i)}const Fy=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return"left"===t||"right"===t?i&&r>n:!i&&o>n};function zy(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function $y(e){const t=document.activeElement;return e.some((e=>e===t||(e.focus(),document.activeElement!==t)))}const Vy=Ey,Wy=Ry,By=Ty,Uy=_y,Hy=Ay,qy=My,Gy=yy,Ky=a.forwardRef(((e,t)=>{var{className:n}=e,o=de(e,["className"]);return r.jsx(Vy,Object.assign({ref:t,className:ee("fixed z-[100] top-0 flex max-h-screen w-full flex-col items-center right-0",n)},o))}));Ky.displayName=Vy.displayName;const Xy=Q("fixed w-full pb-4 pt-12 px-4 h-auto group pointer-events-auto flex items-center justify-between shadow-[0_0_6px_0_rgba(17,17,17,0.16)] transition-all\n data-[swipe=cancel]:translate-x-0 \n data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] \n data-[swipe=end]:animate-out \n data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] \n data-[swipe=move]:transition-none \n data-[state=closed]:animate-out \n data-[state=closed]:fade-out-0 \n data-[state=closed]:slide-out-to-top-full \n data-[state=open]:slide-in-from-top-full\n data-[state=open]:animate-in\n data-[state=open]:duration-500",{variants:{variant:{default:"bg-coreColors-modalBackground [&_*]:text-textColors-primaryColor",error:"bg-stateColors-error [&_*]:text-coreColors-pageColor",warning:"bg-stateColors-warning [&_*]:text-coreColors-pageColor",success:"bg-stateColors-success [&_*]:text-coreColors-pageColor"}},defaultVariants:{variant:"default"}}),Yy=a.forwardRef(((e,t)=>{var{className:n,variant:o}=e,i=de(e,["className","variant"]);return r.jsx(Wy,Object.assign({ref:t,className:ee(Xy({variant:o}),n)},i))}));Yy.displayName=Wy.displayName;const Zy=a.forwardRef(((e,t)=>{var{className:n}=e,o=de(e,["className"]);return r.jsx(Hy,Object.assign({ref:t,className:ee("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",n)},o))}));Zy.displayName=Hy.displayName;const Jy=a.forwardRef(((e,t)=>{var{className:n}=e,o=de(e,["className"]);return r.jsx(qy,Object.assign({ref:t,className:ee("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",n),"toast-close":""},o,{children:r.jsx(Aa,{className:"h-4 w-4"})}))}));Jy.displayName=qy.displayName;const Qy=a.forwardRef(((e,t)=>{var{className:n}=e,o=de(e,["className"]);return r.jsx(By,Object.assign({ref:t,className:ee("text-sm font-semibold",n)},o))}));Qy.displayName=By.displayName;const ew=({type:e})=>{const t={warning:{name:"alert-circle",color:"coreColors-pageColor"},error:{name:"circle-x",color:"coreColors-pageColor"},success:{name:"check",color:"coreColors-pageColor"},default:{name:"info-circle",color:"textColos-primaryColor"}}[e];return r.jsx(Pi,{name:t.name||"",size:"sm",color:t.color})},tw=a.forwardRef(((e,t)=>{var{className:n,type:o="default",icon:i}=e,a=de(e,["className","type","icon"]);return r.jsxs(Uy,Object.assign({ref:t,className:ee("flex gap-4 items-center",n)},a,{children:[i?r.jsx(ew,{type:o}):null,r.jsx(Di,Object.assign({type:"body-primary",className:"line-clamp-2"},{children:a.children}))]}))}));tw.displayName=Uy.displayName;let nw=0;const rw=new Map,ow=e=>{if(rw.has(e))return;const t=setTimeout((()=>{rw.delete(e),lw({type:"REMOVE_TOAST",toastId:e})}),1e6);rw.set(e,t)},iw=(e,t)=>{switch(t.type){case"ADD_TOAST":return Object.assign(Object.assign({},e),{toasts:[t.toast,...e.toasts].slice(0,1)});case"UPDATE_TOAST":return Object.assign(Object.assign({},e),{toasts:e.toasts.map((e=>e.id===t.toast.id?Object.assign(Object.assign({},e),t.toast):e))});case"DISMISS_TOAST":{const{toastId:n}=t;return n?ow(n):e.toasts.forEach((e=>{ow(e.id)})),Object.assign(Object.assign({},e),{toasts:e.toasts.map((e=>e.id===n||void 0===n?Object.assign(Object.assign({},e),{open:!1}):e))})}case"REMOVE_TOAST":return void 0===t.toastId?Object.assign(Object.assign({},e),{toasts:[]}):Object.assign(Object.assign({},e),{toasts:e.toasts.filter((e=>e.id!==t.toastId))})}},aw=[];let sw={toasts:[]};function lw(e){sw=iw(sw,e),aw.forEach((e=>{e(sw)}))}function cw(e){var t=de(e,[]);const n=(nw=(nw+1)%Number.MAX_SAFE_INTEGER,nw.toString()),r=()=>lw({type:"DISMISS_TOAST",toastId:n});return lw({type:"ADD_TOAST",toast:Object.assign(Object.assign({},t),{id:n,open:!0,onOpenChange:e=>{e||r()}})}),{id:n,dismiss:r,update:e=>lw({type:"UPDATE_TOAST",toast:Object.assign(Object.assign({},e),{id:n})})}}function uw(){const[e,t]=a.useState(sw);return a.useEffect((()=>(aw.push(t),()=>{const e=aw.indexOf(t);e>-1&&aw.splice(e,1)})),[e]),Object.assign(Object.assign({},e),{toast:cw,dismiss:e=>lw({type:"DISMISS_TOAST",toastId:e})})}const dw="rovingFocusGroup.onEntryFocus",fw={bubbles:!1,cancelable:!0},pw="RovingFocusGroup",[mw,hw,gw]=Dn(pw),[vw,bw]=On(pw,[gw]),[yw,ww]=vw(pw),xw=t.forwardRef(((e,n)=>t.createElement(mw.Provider,{scope:e.__scopeRovingFocusGroup},t.createElement(mw.Slot,{scope:e.__scopeRovingFocusGroup},t.createElement(Cw,Rn({},e,{ref:n})))))),Cw=t.forwardRef(((e,n)=>{const{__scopeRovingFocusGroup:r,orientation:o,loop:i=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,...d}=e,f=t.useRef(null),p=kn(n,f),m=cr(a),[h=null,g]=zn({prop:s,defaultProp:l,onChange:c}),[v,b]=t.useState(!1),y=Fn(u),w=hw(r),x=t.useRef(!1),[C,E]=t.useState(0);return t.useEffect((()=>{const e=f.current;if(e)return e.addEventListener(dw,y),()=>e.removeEventListener(dw,y)}),[y]),t.createElement(yw,{scope:r,orientation:o,dir:m,loop:i,currentTabStopId:h,onItemFocus:t.useCallback((e=>g(e)),[g]),onItemShiftTab:t.useCallback((()=>b(!0)),[]),onFocusableItemAdd:t.useCallback((()=>E((e=>e+1))),[]),onFocusableItemRemove:t.useCallback((()=>E((e=>e-1))),[])},t.createElement($n.div,Rn({tabIndex:v||0===C?-1:0,"data-orientation":o},d,{ref:p,style:{outline:"none",...e.style},onMouseDown:Ln(e.onMouseDown,(()=>{x.current=!0})),onFocus:Ln(e.onFocus,(e=>{const t=!x.current;if(e.target===e.currentTarget&&t&&!v){const t=new CustomEvent(dw,fw);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=w().filter((e=>e.focusable));jw([e.find((e=>e.active)),e.find((e=>e.id===h)),...e].filter(Boolean).map((e=>e.ref.current)))}}x.current=!1})),onBlur:Ln(e.onBlur,(()=>b(!1)))})))})),Ew=t.forwardRef(((e,n)=>{const{__scopeRovingFocusGroup:r,focusable:o=!0,active:i=!1,tabStopId:a,...s}=e,l=Gn(),c=a||l,u=ww("RovingFocusGroupItem",r),d=u.currentTabStopId===c,f=hw(r),{onFocusableItemAdd:p,onFocusableItemRemove:m}=u;return t.useEffect((()=>{if(o)return p(),()=>m()}),[o,p,m]),t.createElement(mw.ItemSlot,{scope:r,id:c,focusable:o,active:i},t.createElement($n.span,Rn({tabIndex:d?0:-1,"data-orientation":u.orientation},s,{ref:n,onMouseDown:Ln(e.onMouseDown,(e=>{o?u.onItemFocus(c):e.preventDefault()})),onFocus:Ln(e.onFocus,(()=>u.onItemFocus(c))),onKeyDown:Ln(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void u.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:Sw[r]}(e,u.orientation,u.dir);if(void 0!==t){e.preventDefault();let o=f().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const i=o.indexOf(e.currentTarget);o=u.loop?(r=i+1,(n=o).map(((e,t)=>n[(r+t)%n.length]))):o.slice(i+1)}setTimeout((()=>jw(o)))}var n,r}))})))})),Sw={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function jw(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}const Rw=xw,Ow=Ew,Nw=t.forwardRef(((e,n)=>{const{pressed:r,defaultPressed:o=!1,onPressedChange:i,...a}=e,[s=!1,l]=zn({prop:r,onChange:i,defaultProp:o});return t.createElement($n.button,Rn({type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0},a,{ref:n,onClick:Ln(e.onClick,(()=>{e.disabled||l(!s)}))}))})),Pw=Nw,kw="ToggleGroup",[Tw,_w]=On(kw,[bw]),Aw=bw(),Mw=t.forwardRef(((e,n)=>{const{type:r,...o}=e;if("single"===r){const e=o;return t.createElement(Lw,Rn({},e,{ref:n}))}if("multiple"===r){const e=o;return t.createElement(Fw,Rn({},e,{ref:n}))}throw new Error(`Missing prop \`type\` expected on \`${kw}\``)})),[Iw,Dw]=Tw(kw),Lw=t.forwardRef(((e,n)=>{const{value:r,defaultValue:o,onValueChange:i=()=>{},...a}=e,[s,l]=zn({prop:r,defaultProp:o,onChange:i});return t.createElement(Iw,{scope:e.__scopeToggleGroup,type:"single",value:s?[s]:[],onItemActivate:l,onItemDeactivate:t.useCallback((()=>l("")),[l])},t.createElement(Vw,Rn({},a,{ref:n})))})),Fw=t.forwardRef(((e,n)=>{const{value:r,defaultValue:o,onValueChange:i=()=>{},...a}=e,[s=[],l]=zn({prop:r,defaultProp:o,onChange:i}),c=t.useCallback((e=>l(((t=[])=>[...t,e]))),[l]),u=t.useCallback((e=>l(((t=[])=>t.filter((t=>t!==e))))),[l]);return t.createElement(Iw,{scope:e.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:c,onItemDeactivate:u},t.createElement(Vw,Rn({},a,{ref:n})))})),[zw,$w]=Tw(kw),Vw=t.forwardRef(((e,n)=>{const{__scopeToggleGroup:r,disabled:o=!1,rovingFocus:i=!0,orientation:a,dir:s,loop:l=!0,...c}=e,u=Aw(r),d=cr(s),f={role:"group",dir:d,...c};return t.createElement(zw,{scope:r,rovingFocus:i,disabled:o},i?t.createElement(Rw,Rn({asChild:!0},u,{orientation:a,dir:d,loop:l}),t.createElement($n.div,Rn({},f,{ref:n}))):t.createElement($n.div,Rn({},f,{ref:n})))})),Ww="ToggleGroupItem",Bw=t.forwardRef(((e,n)=>{const r=Dw(Ww,e.__scopeToggleGroup),o=$w(Ww,e.__scopeToggleGroup),i=Aw(e.__scopeToggleGroup),a=r.value.includes(e.value),s=o.disabled||e.disabled,l={...e,pressed:a,disabled:s},c=t.useRef(null);return o.rovingFocus?t.createElement(Ow,Rn({asChild:!0},i,{focusable:!s,active:a,ref:c}),t.createElement(Uw,Rn({},l,{ref:n}))):t.createElement(Uw,Rn({},l,{ref:n}))})),Uw=t.forwardRef(((e,n)=>{const{__scopeToggleGroup:r,value:o,...i}=e,a=Dw(Ww,r),s={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},l="single"===a.type?s:void 0;return t.createElement(Nw,Rn({},l,i,{ref:n,onPressedChange:e=>{e?a.onItemActivate(o):a.onItemDeactivate(o)}}))})),Hw=Mw,qw=Bw,Gw=Q("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground active:opacity-70",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),Kw=a.forwardRef(((e,t)=>{var{className:n,variant:o,size:i}=e,a=de(e,["className","variant","size"]);return r.jsx(Pw,Object.assign({ref:t,className:ee(Gw({variant:o,size:i,className:n}))},a))}));Kw.displayName=Pw.displayName;const Xw=a.createContext({size:"default",variant:"default"}),Yw=a.forwardRef(((e,t)=>{var{className:n,variant:o,size:i,children:a}=e,s=de(e,["className","variant","size","children"]);return r.jsx(Hw,Object.assign({ref:t,className:ee("flex items-center justify-center gap-1",n)},s,{children:r.jsx(Xw.Provider,Object.assign({value:{variant:o,size:i}},{children:a}))}))}));Yw.displayName=Hw.displayName;const Zw=a.forwardRef(((e,t)=>{var{className:n,children:o,variant:i,size:s}=e,l=de(e,["className","children","variant","size"]);const c=a.useContext(Xw);return r.jsx(qw,Object.assign({ref:t,className:ee(Gw({variant:c.variant||i,size:c.size||s}),n)},l,{children:o}))}));Zw.displayName=qw.displayName;const Jw=Q("w-full",{variants:{}});const Qw=a.forwardRef((({children:e,defaultValue:t,onChange:n,onOpenChange:o,onCreateNew:i,translations:s},l)=>{const[c,u]=a.useState(!1),[d,f]=a.useState(t),p=a.useRef(null),m=a.useRef(null);a.useEffect((()=>{const e=e=>{c&&p.current&&m.current&&!p.current.contains(e.target)&&!m.current.contains(e.target)&&(u(!1),o&&o(!1))};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[c,o]);const h=a.Children.toArray(e).find((e=>a.isValidElement(e)&&e.props.value===d));return r.jsxs("div",Object.assign({className:"relative",ref:l},{children:[r.jsxs(ex,Object.assign({ref:p,onClick:()=>{const e=!c;u(e),o&&o(e)}},{children:[r.jsx(nx,Object.assign({isTrigger:!0},{children:h?h.props.children({isTrigger:!0,translations:s}):r.jsx(eg,{name:s["wishlist-multiple-create-text-field-placeholder"],isTrigger:!0,translations:s})})),r.jsx(_a,{className:ee("h-4 w-4 opacity-50 mr-4 transition-transform duration-200 ease-in-out",c&&"transform rotate-180")})]})),r.jsxs(tx,Object.assign({isOpen:c,ref:m},{children:[a.Children.map(e,(e=>a.isValidElement(e)?a.cloneElement(e,{onSelect:()=>{return t=e.props.value,f(t),u(!1),n&&n(t),void(o&&o(!1));var t},isSelected:e.props.value===d,translations:s},e.props.children({isTrigger:!1,translations:s})):e)),r.jsx("div",Object.assign({className:"sticky bottom-0 bg-coreColors-inputBackground border-t border-coreColors-dividingLines"},{children:r.jsx(tg,{onClick:()=>{i&&i(),u(!1),o&&o(!1)},translations:s})}))]}))]}))}));Qw.displayName="WishlistSelect";const ex=a.forwardRef(((e,t)=>{var{className:n,children:o,isTrigger:i=!1}=e,a=de(e,["className","children","isTrigger"]);return r.jsx("button",Object.assign({ref:t,className:ee("flex w-full items-center justify-between rounded-md border border-coreColors-brandColorPrimary bg-coreColors-inputBackground text-sm placeholder:text-coreColors-brandColorPrimary disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",n),style:{WebkitTapHighlightColor:"transparent"}},a,{children:o}))}));ex.displayName="WishlistSelectTrigger";const tx=a.forwardRef(((e,t)=>{var{className:n,children:o,isOpen:i}=e,a=de(e,["className","children","isOpen"]);return r.jsx("div",Object.assign({ref:t,className:ee("mt-1 absolute z-50 w-full max-h-[200px] overflow-y-auto rounded-md bg-coreColors-inputBackground shadow-md border border-coreColors-brandColorPrimary","transition-all duration-300 ease-in-out",i?"opacity-100 translate-y-0":"opacity-0 translate-y-[-10px] pointer-events-none",n)},a,{children:o}))}));tx.displayName="WishlistSelectContent";const nx=a.forwardRef(((e,t)=>{var{className:n,children:o,onSelect:i,isSelected:a,isTrigger:s}=e,l=de(e,["className","children","onSelect","isSelected","isTrigger"]);return r.jsx("div",Object.assign({ref:t,className:ee("relative flex w-full cursor-pointer select-none items-center text-sm outline-none",!s&&"border-b border-coreColors-dividingLines last:border-b-0",a&&"bg-stateColors-skeleton",n),onClick:i},l,{children:"function"==typeof o?o({isTrigger:s||!1}):o}))}));nx.displayName="WishlistSelectItem";class rx{constructor(){this.getSortSearchParamKey=()=>"sort_by",this.convertFilterCategoriesToSearchParams=(e,t)=>{const n=e.reduce(((e,t)=>{const n=t.filters.reduce(((e,n)=>(n.isSelected&&e.push(`${t.title}-${n.tag}`),e)),[]);return e.concat(n)}),[]),r=new URLSearchParams(t.toString()),o=new URLSearchParams;return r.forEach(((e,t)=>{t.startsWith("filter")||o.append(t,e)})),n.length&&o.append("filter",JSON.stringify(n)),o.toString()}}convertSortToSearchParams({sortOption:e,existingParams:t}){const n=JSON.stringify(e),r=new URLSearchParams;return t.forEach(((e,t)=>{t.startsWith(this.getSortSearchParamKey())||r.append(t,e)})),n&&n.length&&r.append(this.getSortSearchParamKey(),n),r}getActiveSortFromSearchParams({searchParams:e,sortOptions:t}){var n;const r=e.get(this.getSortSearchParamKey());try{const e=JSON.parse(null!=r?r:"{}");return null!==(n=t.find((t=>(null==t?void 0:t.sortName)==e.sortName)))&&void 0!==n?n:null}catch(e){return null}}}class ox{constructor(){this.getSortSearchParamKey=()=>"selectedSort",this.convertFilterCategoriesToSearchParams=(e,t)=>{const n=e.flatMap((e=>{var t;let n=null===(t=e.id)||void 0===t?void 0:t.toLowerCase(),r=[];if(r="price"==n?e.filters.filter((e=>e.isSelected)).map((e=>{var t;return`(${e.min},${null!==(t=e.max)&&void 0!==t?t:1e4})`})):"rating"==n?e.filters.filter((e=>e.isSelected)).map((e=>`${e.min}`)):e.filters.filter((e=>e.isSelected)).map((e=>e.tag)),r.length)return`${n}=${JSON.stringify(r)}`})).filter((e=>void 0!==e)),r=e.flatMap((e=>{var t;return null===(t=e.id)||void 0===t?void 0:t.toLowerCase()})),o=new URLSearchParams(t.toString()),i=new URLSearchParams;return o.forEach(((e,t)=>{r.some((e=>e==t))||i.append(t,e)})),n.forEach((e=>{if(e){const[t,n]=e.split("=");t&&n&&i.append(t,n)}})),i.toString()}}convertSortToSearchParams({sortOption:e,existingParams:t}){const n=e.sortType,r=new URLSearchParams;return t.forEach(((e,t)=>{t.startsWith(this.getSortSearchParamKey())||r.append(t,e)})),n&&n.length&&r.append(this.getSortSearchParamKey(),n),r}getActiveSortFromSearchParams({searchParams:e,sortOptions:t}){var n;const r=e.get(this.getSortSearchParamKey());return null!==(n=t.find((e=>(null==e?void 0:e.sortType)==r)))&&void 0!==n?n:null}}class ix extends rx{constructor({integration:e}){var t;super(),this.sendFirstSort=null!==(t=null==e?void 0:e.sendFirstSort)&&void 0!==t&&t}}class ax extends rx{constructor({integration:e}){var t;super(),this.sendFirstSort=null!==(t=null==e?void 0:e.sendFirstSort)&&void 0!==t&&t}}class sx{constructor(){this.collectionSortOptions=[{sortName:"manual",name:"collection-sort-recommended",sortKey:ux.COLLECTION_DEFAULT,isReverse:!1},{sortName:"created-descending",name:"collection-sort-new",sortKey:ux.CREATED,isReverse:!0},{sortName:"best-selling",name:"collection-sort-best",sortKey:ux.BEST_SELLING,isReverse:!1},{sortName:"price-ascending",name:"collection-sort-ascending-price",sortKey:ux.PRICE,isReverse:!1},{sortName:"price-descending",name:"collection-sort-descending-price",sortKey:ux.PRICE,isReverse:!0}],this.getSortSearchParamKey=()=>"sort_by",this.convertFilterCategoriesToSearchParams=(e,t)=>{const n=e.flatMap((e=>e.filters.filter((e=>e.isSelected)).map((e=>{const t=JSON.parse(e.tag),n=e.collectionId;if(t.hasOwnProperty("available"))return"filter.v.availability="+(t.available?1:0);if(t.productVendor)return`${n}=${t.productVendor}`;if(t.tag)return`${n}=${t.tag}`;if(t.productType)return`${n}=${t.productType}`;if(n){const e=Object.keys(t)[0];return e?`${n}=${t[e].value}`:""}return""})).filter((e=>""!==e)))),r=new URLSearchParams(t.toString()),o=new URLSearchParams;return r.forEach(((e,t)=>{t.startsWith("filter.")||o.append(t,e)})),n.forEach((e=>{const[t,n]=e.split("=");t&&n&&o.append(t,n)})),o.toString()}}convertSortToSearchParams({sortOption:e,existingParams:t}){var n;const r=null==e?void 0:e.name,o=null===(n=this.collectionSortOptions.find((e=>e.name==r)))||void 0===n?void 0:n.sortName,i=new URLSearchParams;return t.forEach(((e,t)=>{t.startsWith(this.getSortSearchParamKey())||i.append(t,e)})),o&&o.length&&i.append(this.getSortSearchParamKey(),o),i}getActiveSortFromSearchParams({searchParams:e,sortOptions:t}){var n,r;const o=e.get(this.getSortSearchParamKey()),i=null===(n=this.collectionSortOptions.find((e=>e.sortName==o)))||void 0===n?void 0:n.name;return null!==(r=t.find((e=>(null==e?void 0:e.name)==i)))&&void 0!==r?r:null}}var lx,cx,ux;!function(e){e.PRICE="PRICE",e.RELEVANCE="RELEVANCE"}(lx||(lx={})),function(e){e.SHOW="SHOW",e.HIDE="HIDE"}(cx||(cx={})),function(e){e.TITLE="TITLE",e.PRICE="PRICE",e.BEST_SELLING="BEST_SELLING",e.CREATED="CREATED",e.ID="ID",e.MANUAL="MANUAL",e.COLLECTION_DEFAULT="COLLECTION_DEFAULT",e.RELEVANCE="RELEVANCE"}(ux||(ux={}));const dx=e=>e.reduce(((e,t)=>(e[t.name]=t,e)),{}),fx=(e,t)=>t.some((t=>{var n;return null===(n=e[t])||void 0===n?void 0:n.enabled}));e.Accordion=ki,e.AccordionContent=Ai,e.AccordionItem=Ti,e.AccordionTrigger=_i,e.AspectRatio=Mi,e.Badge=Fi,e.Button=Wi,e.Carousel=Da,e.CarouselContent=La,e.CarouselDots=Va,e.CarouselItem=Fa,e.CarouselNext=$a,e.CarouselPrevious=za,e.Checkbox=is,e.Chip=ss,e.ColorSwatch=e=>{var{className:t,onSelect:n,shape:o="rectangle",overflow:i="horizontal-scroll",items:a,type:s}=e,l=de(e,["className","onSelect","shape","overflow","items","type"]);return r.jsx("div",Object.assign({className:ee(ls({overflow:i}),t)},l,{children:a.map(((e,t)=>r.jsx("button",Object.assign({className:ee("border border-transparent rounded-sm",{"border-coreColors-brandColorPrimary":e.selected,"rounded-sm":"rectangle"===o,"rounded-full":"circle"===o}),onClick:()=>n(e)},{children:r.jsx("div",Object.assign({className:ee("relative h-[22px] w-[22px] border border-coreColors-dividingLines bg-contain",{"rounded-sm":"rectangle"===o,"rounded-full":"circle"===o}),style:{backgroundColor:"color"===s?e.color:"",borderColor:e.selected?"#FFF":"",backgroundImage:"image"===s?`url(${e.url})`:""}},{children:e.disabled?r.jsx("div",Object.assign({className:"absolute flex items-center justify-center",style:{inset:"rectangle"===o?0:2}},{children:r.jsx("div",{className:"w-full h-[1px] bg-white transform rotate-45 rounded"})})):null}),t)}))))}))},e.Container=us,e.CreateNew=tg,e.Drawer=Gc,e.DrawerClose=qc,e.DrawerContent=({children:e})=>r.jsx("div",Object.assign({className:"h-full overflow-scroll"},{children:e})),e.DrawerContentBase=Xc,e.DrawerDescription=Qc,e.DrawerFooter=Jc,e.DrawerHeader=({title:e,iconLeftName:t,iconRightName:n,onCloseClick:o})=>r.jsxs(Yc,Object.assign({className:"p-4 text-center flex justify-between"},{children:[t?r.jsx(qc,Object.assign({className:"h-6 w-6 p-0",onClick:o},{children:r.jsx(Pi,{name:t,color:"coreColors-secondaryIcon",className:"h-6 w-6 p-0",size:"md"})})):r.jsx("div",{className:"w-6"}),r.jsx(Zc,{children:e}),n?r.jsx(qc,Object.assign({className:"h-6 w-6 p-0",onClick:o},{children:r.jsx(Pi,{name:n,color:"coreColors-secondaryIcon",className:"h-6 w-6 p-0",size:"md"})})):r.jsx("div",{className:"w-6"})]})),e.DrawerOverlay=Kc,e.DrawerPortal=Hc,e.DrawerTrigger=Uc,e.DropdownMenu=ng,e.DropdownMenuContent=og,e.DropdownMenuGroup=rg,e.DropdownMenuItem=ig,e.DropdownMenuTrigger=e=>{var{label:t,className:n,asChild:o,selectedItem:i,isError:a,width:s}=e,l=de(e,["label","className","asChild","selectedItem","isError","width"]);const u=c("[&[data-state=open]_.chevron-icon]:rotate-180 active:text-coreColors-brandColorPrimary active:outline-coreColors-brandColorPrimary outline outline-1 outline-coreColors-dividingLines",{"outline-stateColors-error":a,"[&[data-state=open]]:outline-coreColors-brandColorPrimary":!a,"[&[data-state=open]_.label]:text-coreColors-brandColorPrimary":i,"[&[data-state=open]_.label]:text-textColors-secondaryColor":!i}),d=c("label overflow-hidden text-ellipsis whitespace-nowrap",{"text-stateColors-error":a,"text-textColors-secondaryColor":!a}),f=c("name",{"text-stateColors-error":a,"":!a}),p=c("",{"stateColors-error":a,"coreColors-secondaryIcon":!a});return r.jsx(Kh,Object.assign({asChild:o,className:ee(u,n)},l,{style:{width:s}},{children:r.jsxs("button",Object.assign({className:"h-14 flex justify-between items-center w-full rounded-[4px] p-4 bg-coreColors-inputBackground"},{children:[i?r.jsxs("div",Object.assign({className:"flex flex-row items-center overflow-hidden"},{children:[i.imgUrl?r.jsx("img",{alt:"wishlist-image",className:"flex-shrink-0 h-10 w-10 border border-coreColors-dividingLines rounded-sm",src:i.imgUrl}):r.jsx(Qh,{}),r.jsxs("div",Object.assign({className:"ml-2 text-start overflow-hidden"},{children:[r.jsx(Di,Object.assign({type:"label",className:d},{children:t})),r.jsx(Di,Object.assign({type:"body-primary",className:f},{children:i.name}))]}))]})):r.jsx(Di,Object.assign({type:"body-primary",className:d},{children:t})),r.jsx(Pi,{name:"chevron-down",size:"sm",color:p,className:"chevron-icon shrink-0 ml-2"})]}))}))},e.EmptyMessage=function({iconName:e,title:n,description:o,className:i,buttonLabel:a,openScreen:s,usePathname:l=()=>"",useRouter:c=()=>[],useSearchParams:u=()=>""}){const[d,f]=t.useState(0),p=c(),m=l(),h=u();t.useEffect((()=>{const e=setTimeout((()=>{f(0)}),2e3);return()=>clearTimeout(e)}),[d]);const g=e=>{const t=document.createElement("textarea");t.value=e,t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{const e=document.execCommand("copy");alert(e?"Full URL copied to clipboard!":"Unable to copy URL")}catch(e){alert("Failed to copy URL")}document.body.removeChild(t)};return r.jsxs("div",Object.assign({className:ee("flex-grow flex flex-col justify-center items-center gap-4 h-full",i),onClick:()=>{f((e=>{const t=e+1;if(10===t){const e=`${window.location.origin}${m}?${h.toString()}`;return navigator.clipboard&&navigator.clipboard.writeText?navigator.clipboard.writeText(e).then((()=>alert("Full URL copied to clipboard!"))).catch((()=>g(e))):g(e),0}return t}))}},{children:[r.jsxs("div",Object.assign({className:"flex flex-col justify-center items-center gap-2"},{children:[r.jsx(Pi,{name:e,size:"md",color:"coreColors-secondaryIcon"}),r.jsx(Di,Object.assign({type:"h2",className:"text-textColors-primaryColor text-center"},{children:n})),r.jsx(Di,Object.assign({type:"body-primary",className:"text-textColors-secondaryColor text-center"},{children:o}))]})),a?r.jsx(Wi,Object.assign({variant:"default",onClick:()=>{const e=new URLSearchParams(h.toString());e.get("filters")?(e.delete("filters"),p.push(`${m}?${e}`)):s({destination:{type:"internal",url:"/home"}})},className:"w-auto"},{children:a})):null]}))},e.Favorite=sg,e.Grid=function(e){var{className:t,columns:n}=e,o=de(e,["className","columns"]);return r.jsx(us,{children:r.jsx("div",Object.assign({className:ee(lg({columns:n}),t)},o))})},e.Icon=Pi,e.IconPencilMinus=oi,e.Image=ug,e.Input=Cg,e.Label=jg,e.LineItemTextIcon=Rg,e.Money=Ng,e.MultipleChips=({children:e,containerRef:n})=>{const[o,i]=t.useState(!1),[a,s]=t.useState(!1),l=()=>{const{scrollLeft:e,scrollWidth:t,clientWidth:r}=n.current;i(e>0),s(e+r<t)};return t.useEffect((()=>{const e=()=>l();return window.addEventListener("resize",e),l(),()=>window.removeEventListener("resize",e)}),[]),t.useEffect((()=>{l()}),[e]),r.jsxs("div",Object.assign({className:"relative no-scrollbar"},{children:[r.jsx("div",Object.assign({ref:n,className:"flex overflow-x-auto overflow-y-hidden pt-2",onScroll:l},{children:e.map(((t,n)=>r.jsx("div",Object.assign({className:ee("shrink-0",{"mr-2":n<e.length-1})},{children:t}),n)))})),o&&r.jsx("div",{className:"absolute top-0 left-0 w-8 h-full pointer-events-none bg-fade-left"}),a&&r.jsx("div",{className:"absolute top-0 right-0 w-8 h-full pointer-events-none bg-fade-right"})]}))},e.PlaceholderIcon=Qh,e.Price=Pg,e.ProductCard=({config:e,tapcartData:t,product:n,isLoading:o,favorited:i,onFavoriteClick:s,onQuickAdd:l,openProduct:c,className:u})=>{var d,f,p,m,h,g,v,b,y,w,x,C,E,S,j,R,O,N,P,k,T,_,A,M,I,D,L,F,z,$,V,W,B,U,H,q,G,K,X,Y,Z,J,Q,te,ne;const{variants:re,images:oe,title:ie,tags:ae}=n;let se=re.filter((e=>e.available));0===se.length&&(se=re);const le=se.reduce(((e,t)=>t.price.amount<e.price.amount?t:e));null===(d=oe[0])||void 0===d||d.url,a.useState(!1);const ce=(null===(f=e.favoritesIcon)||void 0===f?void 0:f.layoutType)||"below-image-on-right";if(o)return r.jsxs("div",Object.assign({className:"w-1/2 rounded"},{children:[r.jsx(Tg,{className:"w-full h-64 rounded"}),r.jsx(Tg,{className:"h-6 w-1/2 mt-2 rounded"}),r.jsx(Tg,{className:"h-4 w-full mt-2 rounded"})]}));const ue=null===(p=null==t?void 0:t["product-badges"])||void 0===p?void 0:p.pdp,de=Object.keys(ue).filter((e=>"below"!==e)).flatMap((e=>{const t=null==ue?void 0:ue[e];return null==t?void 0:t.map((t=>Object.assign(Object.assign({},t),{verticalPosition:e})))})),fe=de.length?de[0]:null,pe=ue.below,me=(null==pe?void 0:pe.length)?pe[0]:null,he=!n.availableForSale&&!(null===(m=e.quickAdd)||void 0===m?void 0:m.enabled),ge=n.id,ve=le.id,be=(e=>{switch(e.columns){case"1":default:return"100vw";case"2":return"50vw";case"3":return"33vw"}})(e),ye=(null===(h=e.productImage)||void 0===h?void 0:h.allowSwipeability)&&n.images.length>1;return r.jsx("div",Object.assign({className:ee("w-1/2",u)},{children:r.jsxs("div",Object.assign({className:"w-full active:opacity-70",onClick:()=>{null==c||c({productId:ge,variantId:ve})}},{children:[(null===(g=e.productImage)||void 0===g?void 0:g.enabled)&&r.jsxs("div",Object.assign({className:"relative w-full overflow-hidden",style:{borderTopLeftRadius:`${e.productImage.cornerRadius}px`,borderTopRightRadius:`${e.productImage.cornerRadius}px`,borderBottomLeftRadius:`${(null===(v=e.quickAdd)||void 0===v?void 0:v.enabled)?"0":e.productImage.cornerRadius}px`,borderBottomRightRadius:`${(null===(b=e.quickAdd)||void 0===b?void 0:b.enabled)?"0":e.productImage.cornerRadius}px`}},{children:[ye?r.jsx(Da,Object.assign({className:"w-full max-w-xs overflow-hidden relative"},{children:r.jsxs("div",Object.assign({className:"relative"},{children:[r.jsx(La,Object.assign({className:""},{children:n.images.map(((e,o)=>{var i,a,s,l;return r.jsx(Fa,Object.assign({className:"pl-0"},{children:r.jsx(ug,{alt:n.title,aspectRatio:null===(a=null===(i=t.theme)||void 0===i?void 0:i.productImages)||void 0===a?void 0:a.aspectRatio,data:e,sizes:be,objectFit:null===(l=null===(s=t.theme)||void 0===s?void 0:s.productImages)||void 0===l?void 0:l.scaling})}),`${n.title}-${e.url}`)}))})),r.jsx(Va,{className:"absolute left-0 w-full bottom-2"})]}))})):r.jsx(ug,{alt:n.title,aspectRatio:null===(w=null===(y=t.theme)||void 0===y?void 0:y.productImages)||void 0===w?void 0:w.aspectRatio,data:n.featuredImage||n.images[0],sizes:be,objectFit:null===(C=null===(x=t.theme)||void 0===x?void 0:x.productImages)||void 0===C?void 0:C.scaling}),fe&&n.availableForSale&&r.jsx(Fi,Object.assign({size:"plp-layout",className:ee(_g({verticalPosition:fe.verticalPosition,horizontalPosition:fe.horizontalPosition,imageSwipeEnabled:ye})),style:{color:fe.fontColor,backgroundColor:fe.backgroundColor},alignment:fe.horizontalPosition,cornerRadius:fe.cornerRadius,icon:fe.image},{children:fe.text})),he&&r.jsx(Fi,Object.assign({size:"plp-layout",className:ee(_g({verticalPosition:"bottom",horizontalPosition:"start",imageSwipeEnabled:ye}),"bg-stateColors-disabled"),alignment:"start",cornerRadius:"rounded",type:"text-only"},{children:"Sold Out"})),(null===(E=e.favoritesIcon)||void 0===E?void 0:E.enabled)&&"below-image-on-right"!==ce&&r.jsx(sg,{className:ee(Ag({iconPosition:ce,badgeHorizontalPosition:null==fe?void 0:fe.horizontalPosition,badgeVerticalPosition:null==fe?void 0:fe.verticalPosition,isSoldOut:!n.availableForSale,showSoldOutBadge:he,imageSwipeEnabled:ye})),selected:i,onClick:e=>{null==s||s(e,n)},iconUrl:null===(j=null===(S=e.favoritesIcon)||void 0===S?void 0:S.icon)||void 0===j?void 0:j.url,layoutType:null===(R=e.favoritesIcon)||void 0===R?void 0:R.layoutType,showBackground:null===(O=e.favoritesIcon)||void 0===O?void 0:O.showBackground,cornerRadius:null===(N=e.favoritesIcon)||void 0===N?void 0:N.cornerRadius})]})),(null===(P=e.quickAdd)||void 0===P?void 0:P.enabled)&&r.jsx(Wi,Object.assign({className:"outline-0",style:{borderBottomLeftRadius:`${e.quickAdd.cornerRadius}px`,borderBottomRightRadius:`${e.quickAdd.cornerRadius}px`},labelClassName:ee("outline-0 w-full",{uppercase:null===(k=e.quickAdd)||void 0===k?void 0:k.uppercase},{"text-left":"left"===(null===(T=e.quickAdd)||void 0===T?void 0:T.textAlignment)},{"text-right":"right"===(null===(_=e.quickAdd)||void 0===_?void 0:_.textAlignment)},{"text-center":"center"===(null===(A=e.quickAdd)||void 0===A?void 0:A.textAlignment)}),labelStyle:{fontSize:null===(M=e.quickAdd)||void 0===M?void 0:M.fontSize},variant:"quickadd",size:"default",disabled:!1===n.availableForSale,onClick:e=>{e.stopPropagation(),null==l||l(e,n)}},{children:r.jsxs("div",Object.assign({className:"flex items-center justify-center gap-2"},{children:[r.jsx(Pi,{name:n.availableForSale?"plus":"shopping-cart-off",size:"xs"}),n.availableForSale?"Quick Add":"Sold Out"]}))})),r.jsxs("div",Object.assign({className:"w-full flex-col justify-start items-start gap-0 inline-flex"},{children:[me&&r.jsx("div",Object.assign({className:ee("mt-2 w-full flex justify-start",{"justify-end":"end"===me.horizontalPosition})},{children:r.jsx(Fi,Object.assign({size:"plp-layout",alignment:me.horizontalPosition,icon:me.image,className:ee("truncate",{rounded:"rounded"===me.cornerRadius},{"rounded-none":"square"===me.cornerRadius})},{children:me.text}))})),(null===(I=e.productTitle)||void 0===I?void 0:I.enabled)&&r.jsx("div",Object.assign({className:"mt-2 w-full"},{children:r.jsx(Di,Object.assign({type:"body-secondary",className:ee({uppercase:null===(D=e.productTitle)||void 0===D?void 0:D.uppercase},{"text-left":"left"===(null===(L=e.productTitle)||void 0===L?void 0:L.textAlignment)},{"text-right":"right"===(null===(F=e.productTitle)||void 0===F?void 0:F.textAlignment)},{"text-center":"center"===(null===(z=e.productTitle)||void 0===z?void 0:z.textAlignment)},{"line-clamp-2":null===($=e.productTitle)||void 0===$?void 0:$.wrapText,"line-clamp-1":!(null===(V=e.productTitle)||void 0===V?void 0:V.wrapText)},"text-textColors-productTitle"),style:{fontSize:null===(W=e.productTitle)||void 0===W?void 0:W.fontSize}},{children:ie}))})),r.jsxs("div",Object.assign({className:ee("flex flex-row w-full gap-2 mt-1 justify-end items-center",{"justify-start":"left"===(null===(B=e.price)||void 0===B?void 0:B.textAlignment)},{"justify-end":"right"===(null===(U=e.price)||void 0===U?void 0:U.textAlignment)},{"justify-center":"center"===(null===(H=e.price)||void 0===H?void 0:H.textAlignment)})},{children:[(null===(q=e.price)||void 0===q?void 0:q.enabled)&&r.jsx(Pg,{price:parseFloat(le.price.amount),isSale:!!le.compareAtPrice&&le.compareAtPrice&&parseFloat(null===(G=le.compareAtPrice)||void 0===G?void 0:G.amount)>parseFloat(le.price.amount),compareAtPrice:le.compareAtPrice&&parseFloat(null===(K=le.compareAtPrice)||void 0===K?void 0:K.amount),currency:t.currency.code,locale:t.currency.locale,fontSize:null===(X=e.price)||void 0===X?void 0:X.fontSize}),(null===(Y=e.favoritesIcon)||void 0===Y?void 0:Y.enabled)&&"below-image-on-right"===e.favoritesIcon.layoutType&&r.jsx("div",Object.assign({className:"w-8 h-8 flex items-center justify-center"},{children:r.jsx(sg,{selected:i,onClick:e=>{null==s||s(e,n)},size:"small",iconUrl:null===(J=null===(Z=e.favoritesIcon)||void 0===Z?void 0:Z.icon)||void 0===J?void 0:J.url,cornerRadius:null===(Q=e.favoritesIcon)||void 0===Q?void 0:Q.cornerRadius,layoutType:null===(te=e.favoritesIcon)||void 0===te?void 0:te.layoutType,showBackground:null===(ne=e.favoritesIcon)||void 0===ne?void 0:ne.showBackground})}))]}))]}))]}))}))},e.QuantityPicker=Ig,e.RadioGroup=yv,e.RadioGroupItem=Cv,e.ScrollArea=ab,e.ScrollBar=sb,e.SelectorContainer=({children:e,containerRef:t,className:n})=>{const[o,i]=a.useState(!1),[s,l]=a.useState(!1),c=()=>{const{scrollLeft:e,scrollWidth:n,clientWidth:r}=t.current;i(e>0),l(e+r<n)};return a.useEffect((()=>{const e=()=>c();return window.addEventListener("resize",e),c(),()=>window.removeEventListener("resize",e)}),[]),a.useEffect((()=>{c()}),[e]),r.jsx("div",Object.assign({className:"relative no-scrollbar"},{children:r.jsxs("div",Object.assign({className:ee("flex gap-2 px-1 h-[42px] items-center overflow-x-auto overflow-y-hidden no-scrollbar",n),onScroll:c,ref:t},{children:[e,o&&r.jsx("div",{className:"absolute top-0 left-0 w-8 h-full pointer-events-none"}),s&&r.jsx("div",{className:"absolute top-0 right-0 w-8 h-full pointer-events-none "})]}))}))},e.Selectors=cb,e.Separator=hb,e.Skeleton=Tg,e.Slider=qb,e.SubCollectionTabs=function({subCollections:e,useActions:n}){const o=yn.useSearchParams(),[i,a]=t.useState(null),s=t.useRef(!0),l=t.useRef(null),{openCollection:c}=n(),u=t.useMemo((()=>null==e?void 0:e.map((e=>({label:e.title,children:null})))),[e]);t.useEffect((()=>{const t=o.get("collectionId"),n=o.get("collectionHandle"),r=e.findIndex((e=>t&&ce(e.id)===t||n&&e.handle===n));a(-1!==r?r:null),l.current=-1!==r?r:null,s.current=!1}),[e,o]);const d=t.useCallback((t=>{if(t!==l.current&&null!==t&&!s.current){const n=e[t],r=(null==n?void 0:n.id)?ce(n.id):null,o=(null==n?void 0:n.handle)||null;r?c({collectionId:r}):o&&c({collectionId:o})}}),[e,c]);return u?r.jsx(sy,{tabs:u,activeTab:i,onTabChange:d}):null},e.Subscription=Gb,e.Switch=oy,e.Tabs=sy,e.Text=Di,e.Textarea=cy,e.Toast=Yy,e.ToastAction=Zy,e.ToastClose=Jy,e.ToastDescription=tw,e.ToastProvider=Gy,e.ToastTitle=Qy,e.ToastViewport=Ky,e.Toaster=function({type:e="default"}){const{toasts:t}=uw();return r.jsxs(Gy,{children:[t.map((function(t){var{id:n,title:o,description:i,icon:a}=t,s=de(t,["id","title","description","icon"]);return r.jsx(Yy,Object.assign({variant:e},s,{children:r.jsxs("div",Object.assign({className:"flex w-full justify-center"},{children:[o&&r.jsx(Qy,{children:o}),i&&r.jsx(tw,Object.assign({type:e,icon:a},{children:i}))]}))}),n)})),r.jsx(Ky,{})]})},e.Toggle=Kw,e.ToggleGroup=Yw,e.ToggleGroupItem=Zw,e.Video=function(e){var{className:t}=e,n=de(e,["className"]);return r.jsx("video",Object.assign({className:ee(Jw({}),t),preload:"metadata"},n))},e.Wishlist=eg,e.WishlistSelect=Qw,e.WishlistSelectContent=tx,e.WishlistSelectItem=nx,e.WishlistSelectTrigger=ex,e.badgeVariants=Li,e.buttonVariants=zi,e.cn=ee,e.constructURL=xn,e.containerVariants=cs,e.createIntegrationLookup=dx,e.cva=Q,e.favoriteVariants=ag,e.formatSearchParamsAsNextQueryVariables=wn,e.generateImageWidths=vg,e.generateSizes=yg,e.generateSrcSet=gg,e.getBackgroundAndPaddingStyle=ae,e.getBackgroundAndSpacingStyle=e=>{const{spacing:t,borderColor:n,backgroundColor:r,backgroundCorners:o}=e;return{padding:`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,borderColor:n?n.value:"transparent",backgroundColor:re(r)||"transparent",borderRadius:`${null!=o?o:0}px`}},e.getBorderSidesStyle=oe,e.getButtonProps=e=>({iconColor:re(e.iconColor),labelStyle:Object.assign(Object.assign({},se(e)),{color:re(e.color)}),iconUrl:e.iconDetails.url,style:Object.assign(Object.assign({},ae(e)),{color:re(e.color),boxShadow:e.backgroundShadow?"0px 4px 6px rgba(0,0,0,0.1)":"none",width:"fit-content"})}),e.getColor=re,e.getIdFromGid=ce,e.getPaddingStyle=ie,e.getTextStyle=se,e.getVerticalAlignment=(e,t={top:0,bottom:0})=>"bottom"===e?{bottom:`${t.bottom}px`,top:"auto"}:"middle"===e?{top:"50%",transform:"translateY(-50%)"}:"top"===e?{top:`${t.top}px`,bottom:"auto"}:{},e.getVerticalAlignmentStyle=e=>{const{alignment:t,spacing:n}=e;switch(t){case"bottom":return{bottom:`${n.bottom}px`,top:"auto"};case"middle":return{top:"50%",transform:"translateY(-50%)"};case"top":return{top:`${n.top}px`,bottom:"auto"};default:return{}}},e.getVideoAttributeProps=e=>e.enabled?{autoPlay:e.autoplay,controls:!e.autoplay,muted:!e.videoSound,loop:!0}:{},e.getVideoStyle=(e,t)=>e.enabled?{aspectRatio:"auto"===e.aspectRatio?t.naturalAspectRatio.replace(":","/"):e.aspectRatio.replace(":","/"),objectFit:"fill"===e.videoFit?"cover":"contain"}:{aspectRatio:t.naturalAspectRatio.replace(":","/")},e.gridVariants=lg,e.iconVariants=Ei,e.isDynamicFiltersSupported=e=>e instanceof sx,e.isSearchProvider=fx,e.mapFlexToAlignment=e=>e in le?le[e]:"",e.moneyVariants=Og,e.parseAspectRatio=bg,e.productGidFromId=function(e){return e?e.startsWith("gid://shopify/Product/")?e:`gid://shopify/Product/${e}`:null},e.radiogroupItemVariants=wv,e.reducer=iw,e.searchIntegrationProvider=e=>{const t=dx(e);switch(!0){case fx(t,["beyond-search"]):return new ox;case fx(t,["search-spring"]):return new ix({integration:t["search-spring"]});case fx(t,["nosto-search"]):return new ax({integration:t["nosto-search"]});case fx(t,["algolia","instant-search-plus","searchanise"]):return new rx;default:return new sx}},e.selectorsVariants=lb,e.shopifyLoader=dg,e.textVariants=Ii,e.toast=cw,e.toggleVariants=Gw,e.useCollection=({apiUrl:e,appId:n,collectionId:r,collectionHandle:o,language:i,getCollections:a=!1})=>{const[s,l]=t.useState(null),[c,u]=t.useState(null),[d,f]=t.useState(!0),[p,m]=t.useState(null);return t.useEffect((()=>{fe(void 0,void 0,void 0,(function*(){try{const t=`${e}/collections/by-app-id`;let n=null;if(r||o){const t=new URLSearchParams({collectionHandle:o||"",collectionId:r||"",language:i}).toString();n=`${e}/collections/${o?"by-handle":"by-id"}?${t}`}const s=a&&t?fetch(t,{method:"GET",headers:{"Content-Type":"application/json"}}):null,c=n?fetch(n,{method:"GET",headers:{"Content-Type":"application/json"}}):null,[d,f]=yield Promise.all([s,c]);if(s&&d&&!d.ok)throw new Error(`Failed to fetch all collections: ${d.statusText}`);if(c&&f&&!f.ok)throw new Error(`Failed to fetch specific collection: ${f.statusText}`);const p=s&&d?yield d.json():null,m=c&&f?yield f.json():null;l(p),u(m)}catch(e){console.error("Error fetching collection:",e),m(e instanceof Error?e.message:"An unknown error occurred.")}finally{f(!1)}}))}),[e,n,r,o,i,a]),{collections:s,specificCollection:c,loading:d,error:p}},e.useInfiniteScroll=({initialData:e,queryVariables:n})=>{var r,o,i,s,l;const c=yn.useSearchParams(),{ref:u,inView:d}=function({threshold:e,delay:t,trackVisibility:n,rootMargin:r,root:o,triggerOnce:i,skip:s,initialInView:l,fallbackInView:c,onChange:u}={}){var d;const[f,p]=a.useState(null),m=a.useRef(),[h,g]=a.useState({inView:!!l,entry:void 0});m.current=u,a.useEffect((()=>{if(s||!f)return;let a;return a=vt(f,((e,t)=>{g({inView:e,entry:t}),m.current&&m.current(e,t),t.isIntersecting&&i&&a&&(a(),a=void 0)}),{root:o,rootMargin:r,threshold:e,trackVisibility:n,delay:t},c),()=>{a&&a()}}),[Array.isArray(e)?e.toString():e,f,o,r,i,s,n,c,t]);const v=null==(d=h.entry)?void 0:d.target,b=a.useRef();f||!v||i||s||b.current===v||(b.current=v,g({inView:!!l,entry:void 0}));const y=[p,h.inView,h.entry];return y.ref=y[0],y.inView=y[1],y.entry=y[2],y}({rootMargin:"600px"}),f=t.useMemo((()=>{const e=wn(c);return Object.assign(Object.assign({},n),{searchParams:e})}),[n,c]),{data:p,error:m,size:h,setSize:g,isLoading:v,isValidating:b}=dt(((e,t)=>((e,t,n)=>{var r;return 0===e?Object.assign({},n):t&&(null===(r=t.pageData)||void 0===r?void 0:r.cursorBlob)?Object.assign(Object.assign({},n),{cursorBlob:t.pageData.cursorBlob}):null})(e,t,f)),(t=>fetch(xn(e.apiURL),{method:"POST",body:JSON.stringify(t)}).then((e=>e.json()))),{revalidateFirstPage:!1,initialSize:1}),y=!p&&!m,w=y||h>0&&p&&void 0===p[h-1],x=0===(null!==(i=null===(o=null===(r=null==p?void 0:p[0])||void 0===r?void 0:r.products)||void 0===o?void 0:o.length)&&void 0!==i?i:0),C=!p||!(null===(l=null===(s=p[p.length-1])||void 0===s?void 0:s.pageData)||void 0===l?void 0:l.cursorBlob),E=x||C,S=b&&p&&p.length===h,j=t.useCallback((()=>{w||E||S||g(h+1)}),[w,E,S,g,h]);return t.useEffect((()=>{d&&j()}),[d,j]),{data:p,error:m,isLoadingInitialData:y,isLoadingMore:w,isEmpty:x,isReachingEnd:E,ref:u,products:p?null==p?void 0:p.flatMap((e=>null==e?void 0:e.products)):[],isLoading:v,isValidating:b}},e.useProductOptions=function(e,n){const r=t.useMemo((()=>e||[]),[e]),o=t.useMemo((()=>()=>{if(!r.length)return null;const e=r.filter((e=>e.availableForSale));return(e.length?e:r).reduce(((e,t)=>t.price.amount<e.price.amount?t:e))}),[r]),i=t.useMemo((()=>e=>{const t={};return e.selectedOptions.forEach((e=>{t[e.name]=e.value})),t}),[]),a=t.useMemo((()=>e=>r.find((t=>t.id===e))),[r]),s=t.useCallback((e=>{if(e){const t=a(e);if(t)return i(t)}const t=o();return t?i(t):{}}),[o,i,a]),[l,c]=t.useState(s(n));t.useEffect((()=>{c(s(n))}),[r,s,n]);const u=t.useMemo((()=>r.find((e=>e.selectedOptions.every((e=>l[e.name]===e.value))))),[r,l]);return{selectedOptions:l,handleSelect:(e,t)=>{c((n=>Object.assign(Object.assign({},n),{[e]:t})))},selectedVariant:u}},e.useProducts=function(e){let t=null;if(e){const{baseURL:n,productIds:r,productHandles:o,metafields:i}=e;let a=new URLSearchParams;if((null==r?void 0:r.length)>0?a.set("ids",r.join(",")):(null==o?void 0:o.length)>0&&a.set("handles",o.join(",")),i&&i.length>0){const e=i.map((e=>`${e.namespace}.${e.key}`));a.set("metafields",e.join(","))}t=`${n}/products/by-ids?${a.toString()}`}const n=(null==e?void 0:e.fetcher)||(e=>fetch(e).then((e=>e.json()))),{data:r,error:o}=Sn(t,n);return{products:r||[],error:o,isLoading:!r&&!o}},e.useRecommendations=({queryVariables:e,apiURL:t})=>{const n=yn.useSearchParams().get("recommendation"),r=n&&n.trim().length>0,{data:o,error:i,isLoading:a}=Sn(r?{appId:e.appId,query:n,language:e.language}:null,(e=>fetch((e=>new URL(e).toString())(t),{method:"POST",body:JSON.stringify(e)}).then((e=>e.json()))),{revalidateOnFocus:!1,revalidateOnReconnect:!1});return{products:null==o?void 0:o.products,collections:null==o?void 0:o.collections,searches:null==o?void 0:o.searches,isLoading:a,error:i}},e.useScrollDirection=function(e=100){const[n,r]=t.useState({direction:null,scrollY:0}),[o,i]=t.useTransition(),a=t.useRef(0),s=t.useRef(!1);return t.useEffect((()=>{if("undefined"==typeof window)return;const t=()=>{if(document.body.hasAttribute("data-scroll-locked"))return;const t=window.scrollY,n=document.documentElement.scrollHeight,o=document.documentElement.clientHeight;s.current=t<=0||t+o>=n,!s.current&&Math.abs(t-a.current)>e&&(i((()=>{r({direction:t>a.current?"down":"up",scrollY:t})})),a.current=t>0?t:0)};return window.addEventListener("scroll",t,{passive:!0}),()=>{window.removeEventListener("scroll",t)}}),[e]),n},e.useShop=function(e){let t=null;if(e){const{baseURL:n}=e;t=`${n}/shop`}const n=(null==e?void 0:e.fetcher)||(e=>fetch(e).then((e=>e.json()))),{data:r,error:o}=Sn(t,n);return{shop:r||[],error:o,isLoading:!r&&!o}},e.useSortFilter=({initialData:e,queryVariables:t})=>{const n=t&&Object.keys(t).length>0,{data:r,isLoading:o}=Sn(n?{apiUrl:e.sortFilterURL,body:Object.assign({},t)}:null,(({apiUrl:e,body:t})=>jn({apiURL:e,body:t}))),{data:i,mutate:a}=dt((()=>r&&r.dynamicFiltersEnabled?Object.assign(Object.assign({},r.queryVariables),e.uiFilterState&&{filterCategories:e.uiFilterState}):null),(t=>jn({apiURL:e.filtersURL,body:t})),{revalidateFirstPage:!0,initialSize:1});return{sortFilterData:r,data:null!=i?i:[],mutate:a,isLoading:o}},e.useToast=uw,e.variantGidFromId=function(e){return e?e.startsWith("gid://shopify/ProductVariant/")?e:`gid://shopify/ProductVariant/${e}`:null},e.videoVariants=Jw}));