@kinxcdn/commerce-player 1.4.4 → 1.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/index.js CHANGED
@@ -1,30 +1,30 @@
1
- import*as e from"react";import t,{useRef as n,useEffect as r,forwardRef as o,createElement as i,useState as a,useLayoutEffect as s,createContext as l,useContext as c,useCallback as d,useMemo as u}from"react";import{jsx as p,Fragment as f,jsxs as m}from"react/jsx-runtime";import*as h from"react-dom";import v,{createPortal as g}from"react-dom";import{renderToString as b}from"react-dom/server";var w=function(){return w=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},w.apply(this,arguments)};function y(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 E(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"==typeof SuppressedError&&SuppressedError;let x=null,S="";const T=({file:e,mute:o=!0,thumbnail:i,play:a=!0})=>{const s=n(null),l=n(null),c=n(!1);return r(()=>{const t=s.current;let n=function(e,t){if(x&&S===t){x.style.cssText="width:100%;height:100%;object-fit:cover;",e.appendChild(x);const t=x;return x=null,S="",t}return null}(t,e);return n||(n=document.createElement("video"),n.playsInline=!0,n.setAttribute("playsinline",""),n.setAttribute("webkit-playsinline",""),n.loop=!0,n.autoplay=!0,n.preload="auto",n.crossOrigin="anonymous",n.style.cssText="width:100%;height:100%;object-fit:cover;",i&&(n.poster=i),n.src=e,n.load(),t.appendChild(n)),n.muted=o,l.current=n,n.onerror=e=>{console.error(e)},()=>{try{n.pause(),n.removeAttribute("src"),n.load()}catch(e){}n.parentElement===t&&t.removeChild(n),l.current=null}},[e]),r(()=>{const e=l.current;e&&(e.muted=o)},[o]),r(()=>{const e=l.current;if(!e)return;if(c.current=!!a,!a)return void e.pause();const t=E(void 0,void 0,void 0,function*(){if(!e||!c.current)return;try{return void(yield e.play())}catch(e){}let t=requestAnimationFrame(()=>E(void 0,void 0,void 0,function*(){if(e&&c.current)try{e.readyState<2&&(yield new Promise(t=>{const n=()=>{e.removeEventListener("loadeddata",n),t()};e.addEventListener("loadeddata",n,{once:!0})})),yield e.play()}catch(t){const n=e.muted;try{e.muted=!0,yield e.play()}catch(e){}const r=()=>{e.muted=n,e.play().catch(()=>{}),window.removeEventListener("touchstart",r,!0),window.removeEventListener("pointerup",r,!0)};window.addEventListener("touchstart",r,!0),window.addEventListener("pointerup",r,!0)}}));return()=>cancelAnimationFrame(t)});return()=>{"function"==typeof t&&t()}},[a]),t.createElement("div",{className:"w-full h-full relative"},t.createElement("div",{ref:s,className:"w-full h-full"}))};function C(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=C(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}const O=e=>{const t=I(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),k(n,t)||N(e)},getConflictingClassGroupIds:(e,t)=>{const o=n[e]||[];return t&&r[e]?[...o,...r[e]]:o}}},k=(e,t)=>{if(0===e.length)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?k(e.slice(1),r):void 0;if(o)return o;if(0===t.validators.length)return;const i=e.join("-");return t.validators.find(({validator:e})=>e(i))?.classGroupId},P=/^\[(.+)\]$/,N=e=>{if(P.test(e)){const t=P.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},I=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const e in n)M(n[e],r,e,t);return r},M=(e,t,n,r)=>{e.forEach(e=>{if("string"==typeof e){return void((""===e?t:A(t,e)).classGroupId=n)}if("function"==typeof e)return R(e)?void M(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n});Object.entries(e).forEach(([e,o])=>{M(o,A(t,e),n,r)})})},A=(e,t)=>{let n=e;return t.split("-").forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},R=e=>e.isThemeGetter,L=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(o,i)=>{n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(o(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):o(e,t)}}},_=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=e=>{const t=[];let n,r=0,o=0,i=0;for(let a=0;a<e.length;a++){let s=e[a];if(0===r&&0===o){if(":"===s){t.push(e.slice(i,a)),i=a+1;continue}if("/"===s){n=a;continue}}"["===s?r++:"]"===s?r--:"("===s?o++:")"===s&&o--}const a=0===t.length?e:e.substring(i),s=D(a);return{modifiers:t,hasImportantModifier:s!==a,baseClassName:s,maybePostfixModifierPosition:n&&n>i?n-i:void 0}};if(t){const e=t+":",n=r;r=t=>t.startsWith(e)?n(t.substring(e.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:t,maybePostfixModifierPosition:void 0}}if(n){const e=r;r=t=>n({className:t,parseClassName:e})}return r},D=e=>e.endsWith("!")?e.substring(0,e.length-1):e.startsWith("!")?e.substring(1):e,j=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(e=>[e,!0]));return e=>{if(e.length<=1)return e;const n=[];let r=[];return e.forEach(e=>{"["===e[0]||t[e]?(n.push(...r.sort(),e),r=[]):r.push(e)}),n.push(...r.sort()),n}},z=/\s+/;function $(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=F(e))&&(r&&(r+=" "),r+=t);return r}const F=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=F(e[r]))&&(n&&(n+=" "),n+=t);return n};function B(e,...t){let n,r,o,i=function(s){const l=t.reduce((e,t)=>t(e),e());return n=(e=>({cache:L(e.cacheSize),parseClassName:_(e),sortModifiers:j(e),...O(e)}))(l),r=n.cache.get,o=n.cache.set,i=a,a(s)};function a(e){const t=r(e);if(t)return t;const i=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(z);let l="";for(let e=s.length-1;e>=0;e-=1){const t=s[e],{isExternal:c,modifiers:d,hasImportantModifier:u,baseClassName:p,maybePostfixModifierPosition:f}=n(t);if(c){l=t+(l.length>0?" "+l:l);continue}let m=!!f,h=r(m?p.substring(0,f):p);if(!h){if(!m){l=t+(l.length>0?" "+l:l);continue}if(h=r(p),!h){l=t+(l.length>0?" "+l:l);continue}m=!1}const v=i(d).join(":"),g=u?v+"!":v,b=g+h;if(a.includes(b))continue;a.push(b);const w=o(h,m);for(let e=0;e<w.length;++e){const t=w[e];a.push(g+t)}l=t+(l.length>0?" "+l:l)}return l})(e,n);return o(e,i),i}return function(){return i($.apply(null,arguments))}}const V=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},W=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,U=/^\((?:(\w[\w-]*):)?(.+)\)$/i,G=/^\d+\/\d+$/,H=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,q=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Y=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,X=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,K=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Z=e=>G.test(e),J=e=>!!e&&!Number.isNaN(Number(e)),Q=e=>!!e&&Number.isInteger(Number(e)),ee=e=>e.endsWith("%")&&J(e.slice(0,-1)),te=e=>H.test(e),ne=()=>!0,re=e=>q.test(e)&&!Y.test(e),oe=()=>!1,ie=e=>X.test(e),ae=e=>K.test(e),se=e=>!ce(e)&&!he(e),le=e=>xe(e,Oe,oe),ce=e=>W.test(e),de=e=>xe(e,ke,re),ue=e=>xe(e,Pe,J),pe=e=>xe(e,Te,oe),fe=e=>xe(e,Ce,ae),me=e=>xe(e,Ie,ie),he=e=>U.test(e),ve=e=>Se(e,ke),ge=e=>Se(e,Ne),be=e=>Se(e,Te),we=e=>Se(e,Oe),ye=e=>Se(e,Ce),Ee=e=>Se(e,Ie,!0),xe=(e,t,n)=>{const r=W.exec(e);return!!r&&(r[1]?t(r[1]):n(r[2]))},Se=(e,t,n=!1)=>{const r=U.exec(e);return!!r&&(r[1]?t(r[1]):n)},Te=e=>"position"===e||"percentage"===e,Ce=e=>"image"===e||"url"===e,Oe=e=>"length"===e||"size"===e||"bg-size"===e,ke=e=>"length"===e,Pe=e=>"number"===e,Ne=e=>"family-name"===e,Ie=e=>"shadow"===e,Me=B(()=>{const e=V("color"),t=V("font"),n=V("text"),r=V("font-weight"),o=V("tracking"),i=V("leading"),a=V("breakpoint"),s=V("container"),l=V("spacing"),c=V("radius"),d=V("shadow"),u=V("inset-shadow"),p=V("text-shadow"),f=V("drop-shadow"),m=V("blur"),h=V("perspective"),v=V("aspect"),g=V("ease"),b=V("animate"),w=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",he,ce],y=()=>[he,ce,l],E=()=>[Z,"full","auto",...y()],x=()=>[Q,"none","subgrid",he,ce],S=()=>["auto",{span:["full",Q,he,ce]},Q,he,ce],T=()=>[Q,"auto",he,ce],C=()=>["auto","min","max","fr",he,ce],O=()=>["auto",...y()],k=()=>[Z,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...y()],P=()=>[e,he,ce],N=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",be,pe,{position:[he,ce]}],I=()=>["auto","cover","contain",we,le,{size:[he,ce]}],M=()=>[ee,ve,de],A=()=>["","none","full",c,he,ce],R=()=>["",J,ve,de],L=()=>[J,ee,be,pe],_=()=>["","none",m,he,ce],D=()=>["none",J,he,ce],j=()=>["none",J,he,ce],z=()=>[J,he,ce],$=()=>[Z,"full",...y()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[te],breakpoint:[te],color:[ne],container:[te],"drop-shadow":[te],ease:["in","out","in-out"],font:[se],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[te],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[te],shadow:[te],spacing:["px",J],text:[te],"text-shadow":[te],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Z,ce,he,v]}],container:["container"],columns:[{columns:[J,ce,he,s]}],"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"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:w()}],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:E()}],"inset-x":[{"inset-x":E()}],"inset-y":[{"inset-y":E()}],start:[{start:E()}],end:[{end:E()}],top:[{top:E()}],right:[{right:E()}],bottom:[{bottom:E()}],left:[{left:E()}],visibility:["visible","invisible","collapse"],z:[{z:[Q,"auto",he,ce]}],basis:[{basis:[Z,"full","auto",s,...y()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[J,Z,"auto","initial","none",ce]}],grow:[{grow:["",J,he,ce]}],shrink:[{shrink:["",J,he,ce]}],order:[{order:[Q,"first","last","none",he,ce]}],"grid-cols":[{"grid-cols":x()}],"col-start-end":[{col:S()}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":x()}],"row-start-end":[{row:S()}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":C()}],"auto-rows":[{"auto-rows":C()}],gap:[{gap:y()}],"gap-x":[{"gap-x":y()}],"gap-y":[{"gap-y":y()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:y()}],px:[{px:y()}],py:[{py:y()}],ps:[{ps:y()}],pe:[{pe:y()}],pt:[{pt:y()}],pr:[{pr:y()}],pb:[{pb:y()}],pl:[{pl:y()}],m:[{m:O()}],mx:[{mx:O()}],my:[{my:O()}],ms:[{ms:O()}],me:[{me:O()}],mt:[{mt:O()}],mr:[{mr:O()}],mb:[{mb:O()}],ml:[{ml:O()}],"space-x":[{"space-x":y()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":y()}],"space-y-reverse":["space-y-reverse"],size:[{size:k()}],w:[{w:[s,"screen",...k()]}],"min-w":[{"min-w":[s,"screen","none",...k()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...k()]}],h:[{h:["screen",...k()]}],"min-h":[{"min-h":["screen","none",...k()]}],"max-h":[{"max-h":["screen",...k()]}],"font-size":[{text:["base",n,ve,de]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,he,ue]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ee,ce]}],"font-family":[{font:[ge,ce,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,he,ce]}],"line-clamp":[{"line-clamp":[J,"none",he,ue]}],leading:[{leading:[i,...y()]}],"list-image":[{"list-image":["none",he,ce]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",he,ce]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[J,"from-font","auto",he,de]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[J,"auto",he,ce]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",he,ce]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",he,ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:N()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:I()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Q,he,ce],radial:["",he,ce],conic:[Q,he,ce]},ye,fe]}],"bg-color":[{bg:P()}],"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:A()}],"rounded-s":[{"rounded-s":A()}],"rounded-e":[{"rounded-e":A()}],"rounded-t":[{"rounded-t":A()}],"rounded-r":[{"rounded-r":A()}],"rounded-b":[{"rounded-b":A()}],"rounded-l":[{"rounded-l":A()}],"rounded-ss":[{"rounded-ss":A()}],"rounded-se":[{"rounded-se":A()}],"rounded-ee":[{"rounded-ee":A()}],"rounded-es":[{"rounded-es":A()}],"rounded-tl":[{"rounded-tl":A()}],"rounded-tr":[{"rounded-tr":A()}],"rounded-br":[{"rounded-br":A()}],"rounded-bl":[{"rounded-bl":A()}],"border-w":[{border:R()}],"border-w-x":[{"border-x":R()}],"border-w-y":[{"border-y":R()}],"border-w-s":[{"border-s":R()}],"border-w-e":[{"border-e":R()}],"border-w-t":[{"border-t":R()}],"border-w-r":[{"border-r":R()}],"border-w-b":[{"border-b":R()}],"border-w-l":[{"border-l":R()}],"divide-x":[{"divide-x":R()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":R()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[J,he,ce]}],"outline-w":[{outline:["",J,ve,de]}],"outline-color":[{outline:P()}],shadow:[{shadow:["","none",d,Ee,me]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":["none",u,Ee,me]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:R()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[J,de]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":R()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":["none",p,Ee,me]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[J,he,ce]}],"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-darker","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"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[J]}],"mask-image-linear-from-pos":[{"mask-linear-from":L()}],"mask-image-linear-to-pos":[{"mask-linear-to":L()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":L()}],"mask-image-t-to-pos":[{"mask-t-to":L()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":L()}],"mask-image-r-to-pos":[{"mask-r-to":L()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":L()}],"mask-image-b-to-pos":[{"mask-b-to":L()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":L()}],"mask-image-l-to-pos":[{"mask-l-to":L()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":L()}],"mask-image-x-to-pos":[{"mask-x-to":L()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":L()}],"mask-image-y-to-pos":[{"mask-y-to":L()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[he,ce]}],"mask-image-radial-from-pos":[{"mask-radial-from":L()}],"mask-image-radial-to-pos":[{"mask-radial-to":L()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[J]}],"mask-image-conic-from-pos":[{"mask-conic-from":L()}],"mask-image-conic-to-pos":[{"mask-conic-to":L()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:N()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:I()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",he,ce]}],filter:[{filter:["","none",he,ce]}],blur:[{blur:_()}],brightness:[{brightness:[J,he,ce]}],contrast:[{contrast:[J,he,ce]}],"drop-shadow":[{"drop-shadow":["","none",f,Ee,me]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:["",J,he,ce]}],"hue-rotate":[{"hue-rotate":[J,he,ce]}],invert:[{invert:["",J,he,ce]}],saturate:[{saturate:[J,he,ce]}],sepia:[{sepia:["",J,he,ce]}],"backdrop-filter":[{"backdrop-filter":["","none",he,ce]}],"backdrop-blur":[{"backdrop-blur":_()}],"backdrop-brightness":[{"backdrop-brightness":[J,he,ce]}],"backdrop-contrast":[{"backdrop-contrast":[J,he,ce]}],"backdrop-grayscale":[{"backdrop-grayscale":["",J,he,ce]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[J,he,ce]}],"backdrop-invert":[{"backdrop-invert":["",J,he,ce]}],"backdrop-opacity":[{"backdrop-opacity":[J,he,ce]}],"backdrop-saturate":[{"backdrop-saturate":[J,he,ce]}],"backdrop-sepia":[{"backdrop-sepia":["",J,he,ce]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":y()}],"border-spacing-x":[{"border-spacing-x":y()}],"border-spacing-y":[{"border-spacing-y":y()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",he,ce]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[J,"initial",he,ce]}],ease:[{ease:["linear","initial",g,he,ce]}],delay:[{delay:[J,he,ce]}],animate:[{animate:["none",b,he,ce]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,he,ce]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:D()}],"rotate-x":[{"rotate-x":D()}],"rotate-y":[{"rotate-y":D()}],"rotate-z":[{"rotate-z":D()}],scale:[{scale:j()}],"scale-x":[{"scale-x":j()}],"scale-y":[{"scale-y":j()}],"scale-z":[{"scale-z":j()}],"scale-3d":["scale-3d"],skew:[{skew:z()}],"skew-x":[{"skew-x":z()}],"skew-y":[{"skew-y":z()}],transform:[{transform:[he,ce,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:$()}],"translate-x":[{"translate-x":$()}],"translate-y":[{"translate-y":$()}],"translate-z":[{"translate-z":$()}],"translate-none":["translate-none"],accent:[{accent:P()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:P()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",he,ce]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":y()}],"scroll-mx":[{"scroll-mx":y()}],"scroll-my":[{"scroll-my":y()}],"scroll-ms":[{"scroll-ms":y()}],"scroll-me":[{"scroll-me":y()}],"scroll-mt":[{"scroll-mt":y()}],"scroll-mr":[{"scroll-mr":y()}],"scroll-mb":[{"scroll-mb":y()}],"scroll-ml":[{"scroll-ml":y()}],"scroll-p":[{"scroll-p":y()}],"scroll-px":[{"scroll-px":y()}],"scroll-py":[{"scroll-py":y()}],"scroll-ps":[{"scroll-ps":y()}],"scroll-pe":[{"scroll-pe":y()}],"scroll-pt":[{"scroll-pt":y()}],"scroll-pr":[{"scroll-pr":y()}],"scroll-pb":[{"scroll-pb":y()}],"scroll-pl":[{"scroll-pl":y()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",he,ce]}],fill:[{fill:["none",...P()]}],"stroke-w":[{stroke:[J,ve,de,ue]}],stroke:[{stroke:["none",...P()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});var Ae,Re,Le,_e,De,je;!function(e){e.INSTA="INSTA",e.YOUTUBE="YOUTUBE",e.SQUARE="SQUARE"}(Ae||(Ae={})),function(e){e.MANY="MANY",e.ONE="ONE"}(Re||(Re={})),function(e){e.ALWAYS="ALWAYS",e.DAY="DAY",e.DISAPPEAR="DISAPPEAR",e.NONE="NONE"}(Le||(Le={})),function(e){e.POPUP="POPUP",e.PLATFORM="PLATFORM",e.TABLET="TABLET",e.GRID="GRID",e.VERTICAL="VERTICAL",e.HORIZONTAL="HORIZONTAL"}(_e||(_e={})),function(e){e.BOTTOM="BOTTOM",e.INNER="INNER"}(De||(De={})),function(e){e[e.PLATFORM=1]="PLATFORM",e[e.VERTICAL=2]="VERTICAL",e[e.PRODUCTS=3]="PRODUCTS",e[e.HORIZONTAL=4]="HORIZONTAL",e[e.TABLET=5]="TABLET"}(je||(je={}));const ze={API_BASE_URL:"https://api.midibus.im:8001",STATISTICS_BASE_URL:"https://playdata.midibus.im",PLAYER_BACK_BASE_URL:"https://back-playdata.midibus.im",PLAYER_BASE_URL:"https://player.midibus.im",PLAYED_CHECK_KEY:{VIEWED_SHORTS:"mbus-viewed-shorts",LAST_PLAYED:"mbus-last-played"}};function $e(...e){return Me(function(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=C(e))&&(r&&(r+=" "),r+=t);return r}(e))}const Fe=e=>`${ze.API_BASE_URL}/direct/${e}`,Be=e=>e.split(":").reduce((e,t,n)=>e+ +t*60**(2-n),0),Ve=e=>{if(void 0===e||null==e)return"";return e.toString().replace(/\B(?<!\.\d*)(?=(\d{3})+(?!\d))/g,",")},We=()=>{const e=new Date;return`${e.getFullYear()}${String(e.getMonth()+1).padStart(2,"0")}${String(e.getDate()).padStart(2,"0")}${String(e.getHours()).padStart(2,"0")}${String(e.getMinutes()).padStart(2,"0")}${String(e.getSeconds()).padStart(2,"0")}`},Ue=()=>{if("undefined"!=typeof window&&window.crypto&&window.crypto.getRandomValues){const e=new Uint8Array(16);window.crypto.getRandomValues(e),e[6]=15&e[6]|64,e[8]=63&e[8]|128;const t=Array.from(e).map(e=>e.toString(16).padStart(2,"0"));return`${t.slice(0,4).join("")}-${t.slice(4,6).join("")}-${t.slice(6,8).join("")}-${t.slice(8,10).join("")}-${t.slice(10,16).join("")}`}return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},Ge=e=>{const t=ze.PLAYED_CHECK_KEY.VIEWED_SHORTS,n=JSON.parse(localStorage.getItem(t)||"[]"),r=n.includes(e);return r||(n.push(e),localStorage.setItem(t,JSON.stringify(n))),r},He=e=>{const t=ze.PLAYED_CHECK_KEY.LAST_PLAYED,n=Math.floor((new Date).getTime()/1e3);let r=!0;switch(e){case Le.NONE:r=!1;break;case Le.DISAPPEAR:localStorage.getItem(t)&&(r=!1);break;case Le.DAY:const e=localStorage.getItem(t);if(!e)break;n-parseInt(e)<86400&&(r=!1)}return r},qe=e=>e.includes("https")?e:"https://"+e,Ye=e=>{e instanceof Error?console.error(e.toString()):console.error(e)};const Xe=({shortform:e})=>{const n=Fe(e.media.objectId);return Be(e.media.duration),Object.assign({hideProducts:!0},e.player.viewPlayer),t.createElement("div",{className:"relative w-full h-full text-white"},t.createElement(T,{file:n}))};var Ke;!function(e){e[e.PLATFORM=1]="PLATFORM",e[e.GRID=2]="GRID",e[e.VERTICAL=3]="VERTICAL",e[e.HORIZONTAL=4]="HORIZONTAL"}(Ke||(Ke={}));
1
+ import*as e from"react";import t,{useRef as n,useEffect as r,forwardRef as o,createElement as i,useState as a,useLayoutEffect as s,createContext as l,useContext as c,useCallback as d,useMemo as u,memo as p,PureComponent as f}from"react";import{jsx as m,Fragment as h,jsxs as g}from"react/jsx-runtime";import*as v from"react-dom";import b,{createPortal as w,flushSync as y}from"react-dom";import{renderToString as E}from"react-dom/server";var x=function(){return x=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},x.apply(this,arguments)};function S(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 T(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"==typeof SuppressedError&&SuppressedError;let P=null,C="";const O=({file:e,mute:o=!0,thumbnail:i,play:a=!0})=>{const s=n(null),l=n(null),c=n(!1);return r(()=>{const t=s.current;let n=function(e,t){if(P&&C===t){P.style.cssText="width:100%;height:100%;object-fit:cover;",e.appendChild(P);const t=P;return P=null,C="",t}return null}(t,e);return n||(n=document.createElement("video"),n.playsInline=!0,n.setAttribute("playsinline",""),n.setAttribute("webkit-playsinline",""),n.loop=!0,n.autoplay=!0,n.preload="auto",n.crossOrigin="anonymous",n.style.cssText="width:100%;height:100%;object-fit:cover;",i&&(n.poster=i),n.src=e,n.load(),t.appendChild(n)),n.muted=o,l.current=n,n.onerror=e=>{console.error(e)},()=>{try{n.pause(),n.removeAttribute("src"),n.load()}catch(e){}n.parentElement===t&&t.removeChild(n),l.current=null}},[e]),r(()=>{const e=l.current;e&&(e.muted=o)},[o]),r(()=>{const e=l.current;if(!e)return;if(c.current=!!a,!a)return void e.pause();const t=T(void 0,void 0,void 0,function*(){if(!e||!c.current)return;try{return void(yield e.play())}catch(e){}let t=requestAnimationFrame(()=>T(void 0,void 0,void 0,function*(){if(e&&c.current)try{e.readyState<2&&(yield new Promise(t=>{const n=()=>{e.removeEventListener("loadeddata",n),t()};e.addEventListener("loadeddata",n,{once:!0})})),yield e.play()}catch(t){const n=e.muted;try{e.muted=!0,yield e.play()}catch(e){}const r=()=>{e.muted=n,e.play().catch(()=>{}),window.removeEventListener("touchstart",r,!0),window.removeEventListener("pointerup",r,!0)};window.addEventListener("touchstart",r,!0),window.addEventListener("pointerup",r,!0)}}));return()=>cancelAnimationFrame(t)});return()=>{"function"==typeof t&&t()}},[a]),t.createElement("div",{className:"w-full h-full relative"},t.createElement("div",{ref:s,className:"w-full h-full"}))};function N(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=N(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}const k=e=>{const t=D(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),M(n,t)||R(e)},getConflictingClassGroupIds:(e,t)=>{const o=n[e]||[];return t&&r[e]?[...o,...r[e]]:o}}},M=(e,t)=>{if(0===e.length)return t.classGroupId;const 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)return;const i=e.join("-");return t.validators.find(({validator:e})=>e(i))?.classGroupId},I=/^\[(.+)\]$/,R=e=>{if(I.test(e)){const t=I.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},D=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const e in n)A(n[e],r,e,t);return r},A=(e,t,n,r)=>{e.forEach(e=>{if("string"==typeof e){return void((""===e?t:z(t,e)).classGroupId=n)}if("function"==typeof e)return L(e)?void A(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n});Object.entries(e).forEach(([e,o])=>{A(o,z(t,e),n,r)})})},z=(e,t)=>{let n=e;return t.split("-").forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},L=e=>e.isThemeGetter,_=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(o,i)=>{n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(o(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):o(e,t)}}},j=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=e=>{const t=[];let n,r=0,o=0,i=0;for(let a=0;a<e.length;a++){let s=e[a];if(0===r&&0===o){if(":"===s){t.push(e.slice(i,a)),i=a+1;continue}if("/"===s){n=a;continue}}"["===s?r++:"]"===s?r--:"("===s?o++:")"===s&&o--}const a=0===t.length?e:e.substring(i),s=F(a);return{modifiers:t,hasImportantModifier:s!==a,baseClassName:s,maybePostfixModifierPosition:n&&n>i?n-i:void 0}};if(t){const e=t+":",n=r;r=t=>t.startsWith(e)?n(t.substring(e.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:t,maybePostfixModifierPosition:void 0}}if(n){const e=r;r=t=>n({className:t,parseClassName:e})}return r},F=e=>e.endsWith("!")?e.substring(0,e.length-1):e.startsWith("!")?e.substring(1):e,W=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(e=>[e,!0]));return e=>{if(e.length<=1)return e;const n=[];let r=[];return e.forEach(e=>{"["===e[0]||t[e]?(n.push(...r.sort(),e),r=[]):r.push(e)}),n.push(...r.sort()),n}},$=/\s+/;function B(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=H(e))&&(r&&(r+=" "),r+=t);return r}const H=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=H(e[r]))&&(n&&(n+=" "),n+=t);return n};function V(e,...t){let n,r,o,i=function(s){const l=t.reduce((e,t)=>t(e),e());return n=(e=>({cache:_(e.cacheSize),parseClassName:j(e),sortModifiers:W(e),...k(e)}))(l),r=n.cache.get,o=n.cache.set,i=a,a(s)};function a(e){const t=r(e);if(t)return t;const i=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split($);let l="";for(let e=s.length-1;e>=0;e-=1){const t=s[e],{isExternal:c,modifiers:d,hasImportantModifier:u,baseClassName:p,maybePostfixModifierPosition:f}=n(t);if(c){l=t+(l.length>0?" "+l:l);continue}let m=!!f,h=r(m?p.substring(0,f):p);if(!h){if(!m){l=t+(l.length>0?" "+l:l);continue}if(h=r(p),!h){l=t+(l.length>0?" "+l:l);continue}m=!1}const g=i(d).join(":"),v=u?g+"!":g,b=v+h;if(a.includes(b))continue;a.push(b);const w=o(h,m);for(let e=0;e<w.length;++e){const t=w[e];a.push(v+t)}l=t+(l.length>0?" "+l:l)}return l})(e,n);return o(e,i),i}return function(){return i(B.apply(null,arguments))}}const U=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},G=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Y=/^\((?:(\w[\w-]*):)?(.+)\)$/i,q=/^\d+\/\d+$/,X=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,K=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Z=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,J=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Q=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ee=e=>q.test(e),te=e=>!!e&&!Number.isNaN(Number(e)),ne=e=>!!e&&Number.isInteger(Number(e)),re=e=>e.endsWith("%")&&te(e.slice(0,-1)),oe=e=>X.test(e),ie=()=>!0,ae=e=>K.test(e)&&!Z.test(e),se=()=>!1,le=e=>J.test(e),ce=e=>Q.test(e),de=e=>!pe(e)&&!be(e),ue=e=>Pe(e,ke,se),pe=e=>G.test(e),fe=e=>Pe(e,Me,ae),me=e=>Pe(e,Ie,te),he=e=>Pe(e,Oe,se),ge=e=>Pe(e,Ne,ce),ve=e=>Pe(e,De,le),be=e=>Y.test(e),we=e=>Ce(e,Me),ye=e=>Ce(e,Re),Ee=e=>Ce(e,Oe),xe=e=>Ce(e,ke),Se=e=>Ce(e,Ne),Te=e=>Ce(e,De,!0),Pe=(e,t,n)=>{const r=G.exec(e);return!!r&&(r[1]?t(r[1]):n(r[2]))},Ce=(e,t,n=!1)=>{const r=Y.exec(e);return!!r&&(r[1]?t(r[1]):n)},Oe=e=>"position"===e||"percentage"===e,Ne=e=>"image"===e||"url"===e,ke=e=>"length"===e||"size"===e||"bg-size"===e,Me=e=>"length"===e,Ie=e=>"number"===e,Re=e=>"family-name"===e,De=e=>"shadow"===e,Ae=V(()=>{const e=U("color"),t=U("font"),n=U("text"),r=U("font-weight"),o=U("tracking"),i=U("leading"),a=U("breakpoint"),s=U("container"),l=U("spacing"),c=U("radius"),d=U("shadow"),u=U("inset-shadow"),p=U("text-shadow"),f=U("drop-shadow"),m=U("blur"),h=U("perspective"),g=U("aspect"),v=U("ease"),b=U("animate"),w=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",be,pe],y=()=>[be,pe,l],E=()=>[ee,"full","auto",...y()],x=()=>[ne,"none","subgrid",be,pe],S=()=>["auto",{span:["full",ne,be,pe]},ne,be,pe],T=()=>[ne,"auto",be,pe],P=()=>["auto","min","max","fr",be,pe],C=()=>["auto",...y()],O=()=>[ee,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...y()],N=()=>[e,be,pe],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",Ee,he,{position:[be,pe]}],M=()=>["auto","cover","contain",xe,ue,{size:[be,pe]}],I=()=>[re,we,fe],R=()=>["","none","full",c,be,pe],D=()=>["",te,we,fe],A=()=>[te,re,Ee,he],z=()=>["","none",m,be,pe],L=()=>["none",te,be,pe],_=()=>["none",te,be,pe],j=()=>[te,be,pe],F=()=>[ee,"full",...y()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[oe],breakpoint:[oe],color:[ie],container:[oe],"drop-shadow":[oe],ease:["in","out","in-out"],font:[de],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[oe],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[oe],shadow:[oe],spacing:["px",te],text:[oe],"text-shadow":[oe],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ee,pe,be,g]}],container:["container"],columns:[{columns:[te,pe,be,s]}],"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"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:w()}],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:E()}],"inset-x":[{"inset-x":E()}],"inset-y":[{"inset-y":E()}],start:[{start:E()}],end:[{end:E()}],top:[{top:E()}],right:[{right:E()}],bottom:[{bottom:E()}],left:[{left:E()}],visibility:["visible","invisible","collapse"],z:[{z:[ne,"auto",be,pe]}],basis:[{basis:[ee,"full","auto",s,...y()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[te,ee,"auto","initial","none",pe]}],grow:[{grow:["",te,be,pe]}],shrink:[{shrink:["",te,be,pe]}],order:[{order:[ne,"first","last","none",be,pe]}],"grid-cols":[{"grid-cols":x()}],"col-start-end":[{col:S()}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":x()}],"row-start-end":[{row:S()}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":P()}],"auto-rows":[{"auto-rows":P()}],gap:[{gap:y()}],"gap-x":[{"gap-x":y()}],"gap-y":[{"gap-y":y()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:y()}],px:[{px:y()}],py:[{py:y()}],ps:[{ps:y()}],pe:[{pe:y()}],pt:[{pt:y()}],pr:[{pr:y()}],pb:[{pb:y()}],pl:[{pl:y()}],m:[{m:C()}],mx:[{mx:C()}],my:[{my:C()}],ms:[{ms:C()}],me:[{me:C()}],mt:[{mt:C()}],mr:[{mr:C()}],mb:[{mb:C()}],ml:[{ml:C()}],"space-x":[{"space-x":y()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":y()}],"space-y-reverse":["space-y-reverse"],size:[{size:O()}],w:[{w:[s,"screen",...O()]}],"min-w":[{"min-w":[s,"screen","none",...O()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...O()]}],h:[{h:["screen",...O()]}],"min-h":[{"min-h":["screen","none",...O()]}],"max-h":[{"max-h":["screen",...O()]}],"font-size":[{text:["base",n,we,fe]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,be,me]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",re,pe]}],"font-family":[{font:[ye,pe,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,be,pe]}],"line-clamp":[{"line-clamp":[te,"none",be,me]}],leading:[{leading:[i,...y()]}],"list-image":[{"list-image":["none",be,pe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",be,pe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[te,"from-font","auto",be,fe]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[te,"auto",be,pe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",be,pe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",be,pe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:k()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:M()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ne,be,pe],radial:["",be,pe],conic:[ne,be,pe]},Se,ge]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:I()}],"gradient-via-pos":[{via:I()}],"gradient-to-pos":[{to:I()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:R()}],"rounded-s":[{"rounded-s":R()}],"rounded-e":[{"rounded-e":R()}],"rounded-t":[{"rounded-t":R()}],"rounded-r":[{"rounded-r":R()}],"rounded-b":[{"rounded-b":R()}],"rounded-l":[{"rounded-l":R()}],"rounded-ss":[{"rounded-ss":R()}],"rounded-se":[{"rounded-se":R()}],"rounded-ee":[{"rounded-ee":R()}],"rounded-es":[{"rounded-es":R()}],"rounded-tl":[{"rounded-tl":R()}],"rounded-tr":[{"rounded-tr":R()}],"rounded-br":[{"rounded-br":R()}],"rounded-bl":[{"rounded-bl":R()}],"border-w":[{border:D()}],"border-w-x":[{"border-x":D()}],"border-w-y":[{"border-y":D()}],"border-w-s":[{"border-s":D()}],"border-w-e":[{"border-e":D()}],"border-w-t":[{"border-t":D()}],"border-w-r":[{"border-r":D()}],"border-w-b":[{"border-b":D()}],"border-w-l":[{"border-l":D()}],"divide-x":[{"divide-x":D()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":D()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[te,be,pe]}],"outline-w":[{outline:["",te,we,fe]}],"outline-color":[{outline:N()}],shadow:[{shadow:["","none",d,Te,ve]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":["none",u,Te,ve]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[te,fe]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":D()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":["none",p,Te,ve]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[te,be,pe]}],"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-darker","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"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[te]}],"mask-image-linear-from-pos":[{"mask-linear-from":A()}],"mask-image-linear-to-pos":[{"mask-linear-to":A()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":A()}],"mask-image-t-to-pos":[{"mask-t-to":A()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":A()}],"mask-image-r-to-pos":[{"mask-r-to":A()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":A()}],"mask-image-b-to-pos":[{"mask-b-to":A()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":A()}],"mask-image-l-to-pos":[{"mask-l-to":A()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":A()}],"mask-image-x-to-pos":[{"mask-x-to":A()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":A()}],"mask-image-y-to-pos":[{"mask-y-to":A()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[be,pe]}],"mask-image-radial-from-pos":[{"mask-radial-from":A()}],"mask-image-radial-to-pos":[{"mask-radial-to":A()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[te]}],"mask-image-conic-from-pos":[{"mask-conic-from":A()}],"mask-image-conic-to-pos":[{"mask-conic-to":A()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:k()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:M()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",be,pe]}],filter:[{filter:["","none",be,pe]}],blur:[{blur:z()}],brightness:[{brightness:[te,be,pe]}],contrast:[{contrast:[te,be,pe]}],"drop-shadow":[{"drop-shadow":["","none",f,Te,ve]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:["",te,be,pe]}],"hue-rotate":[{"hue-rotate":[te,be,pe]}],invert:[{invert:["",te,be,pe]}],saturate:[{saturate:[te,be,pe]}],sepia:[{sepia:["",te,be,pe]}],"backdrop-filter":[{"backdrop-filter":["","none",be,pe]}],"backdrop-blur":[{"backdrop-blur":z()}],"backdrop-brightness":[{"backdrop-brightness":[te,be,pe]}],"backdrop-contrast":[{"backdrop-contrast":[te,be,pe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",te,be,pe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[te,be,pe]}],"backdrop-invert":[{"backdrop-invert":["",te,be,pe]}],"backdrop-opacity":[{"backdrop-opacity":[te,be,pe]}],"backdrop-saturate":[{"backdrop-saturate":[te,be,pe]}],"backdrop-sepia":[{"backdrop-sepia":["",te,be,pe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":y()}],"border-spacing-x":[{"border-spacing-x":y()}],"border-spacing-y":[{"border-spacing-y":y()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",be,pe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[te,"initial",be,pe]}],ease:[{ease:["linear","initial",v,be,pe]}],delay:[{delay:[te,be,pe]}],animate:[{animate:["none",b,be,pe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,be,pe]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:L()}],"rotate-x":[{"rotate-x":L()}],"rotate-y":[{"rotate-y":L()}],"rotate-z":[{"rotate-z":L()}],scale:[{scale:_()}],"scale-x":[{"scale-x":_()}],"scale-y":[{"scale-y":_()}],"scale-z":[{"scale-z":_()}],"scale-3d":["scale-3d"],skew:[{skew:j()}],"skew-x":[{"skew-x":j()}],"skew-y":[{"skew-y":j()}],transform:[{transform:[be,pe,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:F()}],"translate-x":[{"translate-x":F()}],"translate-y":[{"translate-y":F()}],"translate-z":[{"translate-z":F()}],"translate-none":["translate-none"],accent:[{accent:N()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:N()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",be,pe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":y()}],"scroll-mx":[{"scroll-mx":y()}],"scroll-my":[{"scroll-my":y()}],"scroll-ms":[{"scroll-ms":y()}],"scroll-me":[{"scroll-me":y()}],"scroll-mt":[{"scroll-mt":y()}],"scroll-mr":[{"scroll-mr":y()}],"scroll-mb":[{"scroll-mb":y()}],"scroll-ml":[{"scroll-ml":y()}],"scroll-p":[{"scroll-p":y()}],"scroll-px":[{"scroll-px":y()}],"scroll-py":[{"scroll-py":y()}],"scroll-ps":[{"scroll-ps":y()}],"scroll-pe":[{"scroll-pe":y()}],"scroll-pt":[{"scroll-pt":y()}],"scroll-pr":[{"scroll-pr":y()}],"scroll-pb":[{"scroll-pb":y()}],"scroll-pl":[{"scroll-pl":y()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",be,pe]}],fill:[{fill:["none",...N()]}],"stroke-w":[{stroke:[te,we,fe,me]}],stroke:[{stroke:["none",...N()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});var ze,Le,_e,je,Fe,We;!function(e){e.INSTA="INSTA",e.YOUTUBE="YOUTUBE",e.SQUARE="SQUARE"}(ze||(ze={})),function(e){e.MANY="MANY",e.ONE="ONE"}(Le||(Le={})),function(e){e.ALWAYS="ALWAYS",e.DAY="DAY",e.DISAPPEAR="DISAPPEAR",e.NONE="NONE"}(_e||(_e={})),function(e){e.POPUP="POPUP",e.PLATFORM="PLATFORM",e.TABLET="TABLET",e.GRID="GRID",e.VERTICAL="VERTICAL",e.HORIZONTAL="HORIZONTAL"}(je||(je={})),function(e){e.BOTTOM="BOTTOM",e.INNER="INNER"}(Fe||(Fe={})),function(e){e[e.PLATFORM=1]="PLATFORM",e[e.VERTICAL=2]="VERTICAL",e[e.PRODUCTS=3]="PRODUCTS",e[e.HORIZONTAL=4]="HORIZONTAL",e[e.TABLET=5]="TABLET"}(We||(We={}));const $e={API_BASE_URL:"https://api.midibus.im:8001",STATISTICS_BASE_URL:"https://playdata.midibus.im",PLAYER_BACK_BASE_URL:"https://back-playdata.midibus.im",PLAYER_BASE_URL:"https://player.midibus.im",PLAYED_CHECK_KEY:{VIEWED_SHORTS:"mbus-viewed-shorts",LAST_PLAYED:"mbus-last-played"}};function Be(...e){return Ae(function(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=N(e))&&(r&&(r+=" "),r+=t);return r}(e))}const He=e=>`${$e.API_BASE_URL}/direct/${e}`,Ve=e=>{if(void 0===e||null==e)return"";return e.toString().replace(/\B(?<!\.\d*)(?=(\d{3})+(?!\d))/g,",")},Ue=()=>{const e=new Date;return`${e.getFullYear()}${String(e.getMonth()+1).padStart(2,"0")}${String(e.getDate()).padStart(2,"0")}${String(e.getHours()).padStart(2,"0")}${String(e.getMinutes()).padStart(2,"0")}${String(e.getSeconds()).padStart(2,"0")}`},Ge=()=>{if("undefined"!=typeof window&&window.crypto&&window.crypto.getRandomValues){const e=new Uint8Array(16);window.crypto.getRandomValues(e),e[6]=15&e[6]|64,e[8]=63&e[8]|128;const t=Array.from(e).map(e=>e.toString(16).padStart(2,"0"));return`${t.slice(0,4).join("")}-${t.slice(4,6).join("")}-${t.slice(6,8).join("")}-${t.slice(8,10).join("")}-${t.slice(10,16).join("")}`}return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},Ye=e=>{const t=$e.PLAYED_CHECK_KEY.VIEWED_SHORTS,n=JSON.parse(localStorage.getItem(t)||"[]"),r=n.includes(e);return r||(n.push(e),localStorage.setItem(t,JSON.stringify(n))),r},qe=e=>{const t=$e.PLAYED_CHECK_KEY.LAST_PLAYED,n=Math.floor((new Date).getTime()/1e3);let r=!0;switch(e){case _e.NONE:r=!1;break;case _e.DISAPPEAR:localStorage.getItem(t)&&(r=!1);break;case _e.DAY:const e=localStorage.getItem(t);if(!e)break;n-parseInt(e)<86400&&(r=!1)}return r},Xe=e=>e.includes("https")?e:"https://"+e,Ke=e=>{e instanceof Error?console.error(e.toString()):console.error(e)};const Ze=({shortform:e,mute:n,play:r})=>{const o=He(e.media.objectId);return Object.assign({hideProducts:!0},e.playerSettings),t.createElement("div",{className:"relative w-full h-full text-white"},t.createElement(O,{file:o,mute:n,play:r}))};var Je;!function(e){e[e.PLATFORM=1]="PLATFORM",e[e.GRID=2]="GRID",e[e.VERTICAL=3]="VERTICAL",e[e.HORIZONTAL=4]="HORIZONTAL"}(Je||(Je={}));
2
2
  /**
3
3
  * @license lucide-react v0.503.0 - ISC
4
4
  *
5
5
  * This source code is licensed under the ISC license.
6
6
  * See the LICENSE file in the root directory of this source tree.
7
7
  */
8
- const Ze=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)},Je=(...e)=>e.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),Qe=e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};
8
+ const Qe=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)},et=(...e)=>e.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),tt=e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};
9
9
  /**
10
10
  * @license lucide-react v0.503.0 - ISC
11
11
  *
12
12
  * This source code is licensed under the ISC license.
13
13
  * See the LICENSE file in the root directory of this source tree.
14
14
  */
15
- var et={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"};
15
+ var nt={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"};
16
16
  /**
17
17
  * @license lucide-react v0.503.0 - ISC
18
18
  *
19
19
  * This source code is licensed under the ISC license.
20
20
  * See the LICENSE file in the root directory of this source tree.
21
- */const tt=o(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:s,...l},c)=>i("svg",{ref:c,...et,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:Je("lucide",o),...!a&&!Qe(l)&&{"aria-hidden":"true"},...l},[...s.map(([e,t])=>i(e,t)),...Array.isArray(a)?a:[a]])),nt=(e,t)=>{const n=o(({className:n,...r},o)=>{return i(tt,{ref:o,iconNode:t,className:Je(`lucide-${a=Ze(e),a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,n),...r});var a});return n.displayName=Ze(e),n},rt=nt("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),ot=nt("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),it=nt("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),at=nt("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),st=nt("heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]),lt=nt("pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]),ct=nt("play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]),dt=nt("share-2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]),ut=nt("volume-2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]),pt=nt("volume-x",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]]),ft=nt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),mt=()=>t.createElement("div",{className:"text-white rounded max-w-fit bg-[rgba(0,0,0,.3)] flex overflow-hidden items-center text-[12px] h-6 mt-2"},t.createElement("div",{className:"bg-[#0ab060] h-full flex gap-1 items-center"},t.createElement(ct,{size:18}),t.createElement("span",{className:"pr-1"},"조회수")),t.createElement("div",{className:"p-1"},"123 시청")),ht=({width:e,height:n})=>t.createElement("div",{className:"w-full h-full flex items-center justify-center"},t.createElement("img",{src:"public/images/noImage.svg",alt:"no image",width:e||50,height:n||50})),vt=({product:e,onError:n})=>t.createElement("img",{src:e.thumbPath,alt:e.productName,className:"object-cover p-0 flex-none",style:{height:"80px",width:"80px"},onError:n}),gt=({product:e})=>{const[n,r]=a(!1);return t.createElement("div",{className:"flex gap-3 text-sm cursor-pointer h-[100px] items-center"},t.createElement("div",{className:"h-full border rounded aspect-square"},e.thumbPath&&!n?t.createElement(vt,{product:e,onError:()=>r(!0)}):t.createElement(ht,null)),t.createElement("div",{className:"justify-center flex flex-col"},e.brand&&t.createElement("p",{className:"max-w-52 break-keep line-clamp-1 text-xs text-gray-500"},e.brand.brandName),t.createElement("p",{className:"max-w-52 break-keep line-clamp-2"},e.productName),t.createElement("div",null,t.createElement("span",{className:"font-semibold text-red-500"},e.discount,"%"," "),t.createElement("span",{className:"font-semibold"},Ve(e.sellingPrice),"원"))))},bt=()=>t.createElement("div",{className:"flex flex-col gap-2 overflow-y-auto max-h-[150px] px-2"},t.createElement("p",{className:"font-medium text-gray-400 text-sm"},"영상과 무관하거나 욕설, 비방 등의 댓글은 관리자에 의해 삭제될 수 있습니다."),t.createElement("div",null,t.createElement("div",{className:"flex justify-between"},t.createElement("div",null,t.createElement("p",{className:"font-semibold"},"유저 ID"),t.createElement("p",null,"댓글 내용"),t.createElement("span",{className:"text-gray-500"},"2024.01.01"))))),wt=()=>t.createElement("div",{className:"inline-block absolute pointer-events-none top-0 z-10 animate-float"},t.createElement(st,{className:"fill-red-500 text-transparent"})),yt=({rounded:e})=>{const[n,r]=a(234),[o,i]=a([]),s=()=>E(void 0,void 0,void 0,function*(){(()=>{const e=Date.now();i(t=>[...t,e]),setTimeout(()=>{i(t=>t.filter(t=>t!==e))},2e3)})(),r(e=>e+1)});return e?t.createElement("div",{className:"w-14 h-14 bg-white rounded-full flex justify-center"},t.createElement("div",{className:"flex justify-center flex-col items-center relative"},t.createElement("button",{onClick:s,className:"z-[5] cursor-pointer"},t.createElement(st,{className:"text-xl fill-black"})),o.map(e=>t.createElement(wt,{key:e})),t.createElement("span",{className:"break-keep text-xs"},Ve(n)))):t.createElement("div",{className:"flex justify-center flex-col items-center relative"},t.createElement("button",{onClick:s,className:"z-[5] cursor-pointer"},t.createElement(st,{className:"text-xl fill-white"})),o.map(e=>t.createElement(wt,{key:e})),t.createElement("span",{className:"break-keep text-xs"},Ve(n)))},Et=({rounded:e})=>e?t.createElement("div",{className:"w-14 h-14 bg-white rounded-full flex justify-center "},t.createElement("button",{className:"cursor-pointer"},t.createElement(dt,{size:28}))):t.createElement("button",{className:"cursor-pointer"},t.createElement(dt,{size:28})),xt=({rounded:e,mute:n,handleMute:r,iconSize:o})=>e?t.createElement("div",{className:"w-12 h-12 bg-white rounded-full flex justify-center items-center "},t.createElement("button",Object.assign({className:"cursor-pointer"},r&&{onClick:r}),n?t.createElement(ut,{size:28}):t.createElement(pt,{size:28}))):t.createElement("button",Object.assign({className:"cursor-pointer"},r&&{onClick:r}),n?t.createElement(ut,{size:o||28}):t.createElement(pt,{size:o||28}));
21
+ */const rt=o(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:s,...l},c)=>i("svg",{ref:c,...nt,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:et("lucide",o),...!a&&!tt(l)&&{"aria-hidden":"true"},...l},[...s.map(([e,t])=>i(e,t)),...Array.isArray(a)?a:[a]])),ot=(e,t)=>{const n=o(({className:n,...r},o)=>{return i(rt,{ref:o,iconNode:t,className:et(`lucide-${a=Qe(e),a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,n),...r});var a});return n.displayName=Qe(e),n},it=ot("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),at=ot("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),st=ot("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),lt=ot("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),ct=ot("heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]),dt=ot("pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]),ut=ot("play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]),pt=ot("share-2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]),ft=ot("volume-2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]),mt=ot("volume-x",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]]),ht=ot("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),gt=()=>t.createElement("div",{className:"text-white rounded max-w-fit bg-[rgba(0,0,0,.3)] flex overflow-hidden items-center text-[12px] h-6 mt-2"},t.createElement("div",{className:"bg-[#0ab060] h-full flex gap-1 items-center"},t.createElement(ut,{size:18}),t.createElement("span",{className:"pr-1"},"조회수")),t.createElement("div",{className:"p-1"},"123 시청")),vt=({width:e,height:n})=>t.createElement("div",{className:"w-full h-full flex items-center justify-center"},t.createElement("img",{src:"public/images/noImage.svg",alt:"no image",width:e||50,height:n||50})),bt=({product:e,onError:n})=>t.createElement("img",{src:e.thumbPath,alt:e.productName,className:"object-cover p-0 flex-none",style:{height:"80px",width:"80px"},onError:n}),wt=({product:e})=>{const[n,r]=a(!1);return t.createElement("div",{className:"flex gap-3 text-sm cursor-pointer h-[100px] items-center"},t.createElement("div",{className:"h-full border rounded aspect-square"},e.thumbPath&&!n?t.createElement(bt,{product:e,onError:()=>r(!0)}):t.createElement(vt,null)),t.createElement("div",{className:"justify-center flex flex-col"},e.brand&&t.createElement("p",{className:"max-w-52 break-keep line-clamp-1 text-xs text-gray-500"},e.brand.brandName),t.createElement("p",{className:"max-w-52 break-keep line-clamp-2"},e.productName),t.createElement("div",null,t.createElement("span",{className:"font-semibold text-red-500"},e.discount,"%"," "),t.createElement("span",{className:"font-semibold"},Ve(e.sellingPrice),"원"))))},yt=()=>t.createElement("div",{className:"flex flex-col gap-2 overflow-y-auto max-h-[150px] px-2"},t.createElement("p",{className:"font-medium text-gray-400 text-sm"},"영상과 무관하거나 욕설, 비방 등의 댓글은 관리자에 의해 삭제될 수 있습니다."),t.createElement("div",null,t.createElement("div",{className:"flex justify-between"},t.createElement("div",null,t.createElement("p",{className:"font-semibold"},"유저 ID"),t.createElement("p",null,"댓글 내용"),t.createElement("span",{className:"text-gray-500"},"2024.01.01"))))),Et=()=>t.createElement("div",{className:"inline-block absolute pointer-events-none top-0 z-10 animate-float"},t.createElement(ct,{className:"fill-red-500 text-transparent"})),xt=({rounded:e})=>{const[n,r]=a(234),[o,i]=a([]),s=()=>T(void 0,void 0,void 0,function*(){(()=>{const e=Date.now();i(t=>[...t,e]),setTimeout(()=>{i(t=>t.filter(t=>t!==e))},2e3)})(),r(e=>e+1)});return e?t.createElement("div",{className:"w-14 h-14 bg-white rounded-full flex justify-center"},t.createElement("div",{className:"flex justify-center flex-col items-center relative"},t.createElement("button",{onClick:s,className:"z-[5] cursor-pointer"},t.createElement(ct,{className:"text-xl fill-black"})),o.map(e=>t.createElement(Et,{key:e})),t.createElement("span",{className:"break-keep text-xs"},Ve(n)))):t.createElement("div",{className:"flex justify-center flex-col items-center relative"},t.createElement("button",{onClick:s,className:"z-[5] cursor-pointer"},t.createElement(ct,{className:"text-xl fill-white"})),o.map(e=>t.createElement(Et,{key:e})),t.createElement("span",{className:"break-keep text-xs"},Ve(n)))},St=({rounded:e})=>e?t.createElement("div",{className:"w-14 h-14 bg-white rounded-full flex justify-center "},t.createElement("button",{className:"cursor-pointer"},t.createElement(pt,{size:28}))):t.createElement("button",{className:"cursor-pointer"},t.createElement(pt,{size:28})),Tt=({rounded:e,mute:n,handleMute:r,iconSize:o})=>e?t.createElement("div",{className:"w-12 h-12 bg-white rounded-full flex justify-center items-center "},t.createElement("button",Object.assign({className:"cursor-pointer"},r&&{onClick:r}),n?t.createElement(ft,{size:28}):t.createElement(mt,{size:28}))):t.createElement("button",Object.assign({className:"cursor-pointer"},r&&{onClick:r}),n?t.createElement(ft,{size:o||28}):t.createElement(mt,{size:o||28}));
22
22
  /**
23
23
  * @license lucide-react v0.503.0 - ISC
24
24
  *
25
25
  * This source code is licensed under the ISC license.
26
26
  * See the LICENSE file in the root directory of this source tree.
27
- */function St(t,n=[]){let r=[];const o=()=>{const n=r.map(t=>e.createContext(t));return function(r){const o=r?.[t]||n;return e.useMemo(()=>({[`__scope${t}`]:{...r,[t]:o}}),[r,o])}};return o.scopeName=t,[function(n,o){const i=e.createContext(o),a=r.length;r=[...r,o];const s=n=>{const{scope:r,children:o,...s}=n,l=r?.[t]?.[a]||i,c=e.useMemo(()=>s,Object.values(s));return p(l.Provider,{value:c,children:o})};return s.displayName=n+"Provider",[s,function(r,s){const l=s?.[t]?.[a]||i,c=e.useContext(l);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${n}\``)}]},Tt(o,...n)]}function Tt(...t){const n=t[0];if(1===t.length)return n;const r=()=>{const r=t.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(t){const o=r.reduce((e,{useScope:n,scopeName:r})=>({...e,...n(t)[`__scope${r}`]}),{});return e.useMemo(()=>({[`__scope${n.scopeName}`]:o}),[o])}};return r.scopeName=n.scopeName,r}function Ct(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Ot(...e){return t=>{let n=!1;const r=e.map(e=>{const r=Ct(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():Ct(e[t],null)}}}}function kt(...t){return e.useCallback(Ot(...t),t)}var Pt=e.forwardRef((t,n)=>{const{children:r,...o}=t,i=e.Children.toArray(r),a=i.find(Mt);if(a){const t=a.props.children,r=i.map(n=>n===a?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:n);return p(Nt,{...o,ref:n,children:e.isValidElement(t)?e.cloneElement(t,void 0,r):null})}return p(Nt,{...o,ref:n,children:r})});Pt.displayName="Slot";var Nt=e.forwardRef((t,n)=>{const{children:r,...o}=t;if(e.isValidElement(r)){const t=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}(r),i=function(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}}(o,r.props);return r.type!==e.Fragment&&(i.ref=n?Ot(n,t):t),e.cloneElement(r,i)}return e.Children.count(r)>1?e.Children.only(null):null});Nt.displayName="SlotClone";var It=({children:e})=>p(f,{children:e});function Mt(t){return e.isValidElement(t)&&t.type===It}function At(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Rt(...e){return t=>{let n=!1;const r=e.map(e=>{const r=At(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():At(e[t],null)}}}}function Lt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function _t(t){const n=e.useRef(t);return e.useEffect(()=>{n.current=t}),e.useMemo(()=>(...e)=>n.current?.(...e),[])}function Dt({prop:t,defaultProp:n,onChange:r=()=>{}}){const[o,i]=function({defaultProp:t,onChange:n}){const r=e.useState(t),[o]=r,i=e.useRef(o),a=_t(n);return e.useEffect(()=>{i.current!==o&&(a(o),i.current=o)},[o,i,a]),r}({defaultProp:n,onChange:r}),a=void 0!==t,s=a?t:o,l=_t(r);return[s,e.useCallback(e=>{if(a){const n="function"==typeof e?e(t):e;n!==t&&l(n)}else i(e)},[a,t,i,l])]}var jt=e.forwardRef((t,n)=>{const{children:r,...o}=t,i=e.Children.toArray(r),a=i.find(Ft);if(a){const t=a.props.children,r=i.map(n=>n===a?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:n);return p(zt,{...o,ref:n,children:e.isValidElement(t)?e.cloneElement(t,void 0,r):null})}return p(zt,{...o,ref:n,children:r})});jt.displayName="Slot";var zt=e.forwardRef((t,n)=>{const{children:r,...o}=t;if(e.isValidElement(r)){const t=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}(r),i=function(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}}(o,r.props);return r.type!==e.Fragment&&(i.ref=n?Rt(n,t):t),e.cloneElement(r,i)}return e.Children.count(r)>1?e.Children.only(null):null});zt.displayName="SlotClone";var $t=({children:e})=>p(f,{children:e});function Ft(t){return e.isValidElement(t)&&t.type===$t}var Bt=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((t,n)=>{const r=e.forwardRef((e,t)=>{const{asChild:r,...o}=e,i=r?jt:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),p(i,{...o,ref:t})});return r.displayName=`Primitive.${n}`,{...t,[n]:r}},{}),Vt=Boolean(globalThis?.document)?e.useLayoutEffect:()=>{};function Wt(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Ut(...e){return t=>{let n=!1;const r=e.map(e=>{const r=Wt(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():Wt(e[t],null)}}}}function Gt(...t){return e.useCallback(Ut(...t),t)}var Ht=e.forwardRef((t,n)=>{const{children:r,...o}=t,i=e.Children.toArray(r),a=i.find(Xt);if(a){const t=a.props.children,r=i.map(n=>n===a?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:n);return p(qt,{...o,ref:n,children:e.isValidElement(t)?e.cloneElement(t,void 0,r):null})}return p(qt,{...o,ref:n,children:r})});Ht.displayName="Slot";var qt=e.forwardRef((t,n)=>{const{children:r,...o}=t;if(e.isValidElement(r)){const t=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}(r),i=function(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}}(o,r.props);return r.type!==e.Fragment&&(i.ref=n?Ut(n,t):t),e.cloneElement(r,i)}return e.Children.count(r)>1?e.Children.only(null):null});qt.displayName="SlotClone";var Yt=({children:e})=>p(f,{children:e});function Xt(t){return e.isValidElement(t)&&t.type===Yt}var Kt=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((t,n)=>{const r=e.forwardRef((e,t)=>{const{asChild:r,...o}=e,i=r?Ht:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),p(i,{...o,ref:t})});return r.displayName=`Primitive.${n}`,{...t,[n]:r}},{});var Zt=t=>{const{present:n,children:r}=t,o=function(t){const[n,r]=e.useState(),o=e.useRef({}),i=e.useRef(t),a=e.useRef("none"),s=t?"mounted":"unmounted",[l,c]=function(t,n){return e.useReducer((e,t)=>n[e][t]??e,t)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect(()=>{const e=Jt(o.current);a.current="mounted"===l?e:"none"},[l]),Vt(()=>{const e=o.current,n=i.current;if(n!==t){const r=a.current,o=Jt(e);if(t)c("MOUNT");else if("none"===o||"none"===e?.display)c("UNMOUNT");else{c(n&&r!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=t}},[t,c]),Vt(()=>{if(n){let e;const t=n.ownerDocument.defaultView??window,r=r=>{const a=Jt(o.current).includes(r.animationName);if(r.target===n&&a&&(c("ANIMATION_END"),!i.current)){const r=n.style.animationFillMode;n.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===n.style.animationFillMode&&(n.style.animationFillMode=r)})}},s=e=>{e.target===n&&(a.current=Jt(o.current))};return n.addEventListener("animationstart",s),n.addEventListener("animationcancel",r),n.addEventListener("animationend",r),()=>{t.clearTimeout(e),n.removeEventListener("animationstart",s),n.removeEventListener("animationcancel",r),n.removeEventListener("animationend",r)}}c("ANIMATION_END")},[n,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:e.useCallback(e=>{e&&(o.current=getComputedStyle(e)),r(e)},[])}}(n),i="function"==typeof r?r({present:o.isPresent}):e.Children.only(r),a=Gt(o.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}(i));return"function"==typeof r||o.isPresent?e.cloneElement(i,{ref:a}):null};function Jt(e){return e?.animationName||"none"}Zt.displayName="Presence";var Qt=Boolean(globalThis?.document)?e.useLayoutEffect:()=>{},en=e["useId".toString()]||(()=>{}),tn=0;function nn(t){const[n,r]=e.useState(en());return Qt(()=>{r(e=>e??String(tn++))},[t]),n?`radix-${n}`:""}var rn="Collapsible",[on,an]=St(rn),[sn,ln]=on(rn),cn=e.forwardRef((t,n)=>{const{__scopeCollapsible:r,open:o,defaultOpen:i,disabled:a,onOpenChange:s,...l}=t,[c=!1,d]=Dt({prop:o,defaultProp:i,onChange:s});return p(sn,{scope:r,disabled:a,contentId:nn(),open:c,onOpenToggle:e.useCallback(()=>d(e=>!e),[d]),children:p(Kt.div,{"data-state":hn(c),"data-disabled":a?"":void 0,...l,ref:n})})});cn.displayName=rn;var dn="CollapsibleTrigger",un=e.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=ln(dn,n);return p(Kt.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":hn(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:Lt(e.onClick,o.onOpenToggle)})});un.displayName=dn;var pn="CollapsibleContent",fn=e.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ln(pn,e.__scopeCollapsible);return p(Zt,{present:n||o.open,children:({present:e})=>p(mn,{...r,ref:t,present:e})})});fn.displayName=pn;var mn=e.forwardRef((t,n)=>{const{__scopeCollapsible:r,present:o,children:i,...a}=t,s=ln(pn,r),[l,c]=e.useState(o),d=e.useRef(null),u=Gt(n,d),f=e.useRef(0),m=f.current,h=e.useRef(0),v=h.current,g=s.open||l,b=e.useRef(g),w=e.useRef(void 0);return e.useEffect(()=>{const e=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(e)},[]),Vt(()=>{const e=d.current;if(e){w.current=w.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,h.current=t.width,b.current||(e.style.transitionDuration=w.current.transitionDuration,e.style.animationName=w.current.animationName),c(o)}},[s.open,o]),p(Kt.div,{"data-state":hn(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!g,...a,ref:u,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...t.style},children:g&&i})});function hn(e){return e?"open":"closed"}var vn=cn,gn=un,bn=fn,wn=e.createContext(void 0);var yn="Accordion",En=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[xn,Sn,Tn]=function(e){const n=e+"CollectionProvider",[r,o]=St(n),[i,a]=r(n,{collectionRef:{current:null},itemMap:new Map}),s=e=>{const{scope:n,children:r}=e,o=t.useRef(null),a=t.useRef(new Map).current;return p(i,{scope:n,itemMap:a,collectionRef:o,children:r})};s.displayName=n;const l=e+"CollectionSlot",c=t.forwardRef((e,t)=>{const{scope:n,children:r}=e,o=kt(t,a(l,n).collectionRef);return p(Pt,{ref:o,children:r})});c.displayName=l;const d=e+"CollectionItemSlot",u="data-radix-collection-item",f=t.forwardRef((e,n)=>{const{scope:r,children:o,...i}=e,s=t.useRef(null),l=kt(n,s),c=a(d,r);return t.useEffect(()=>(c.itemMap.set(s,{ref:s,...i}),()=>{c.itemMap.delete(s)})),p(Pt,{[u]:"",ref:l,children:o})});return f.displayName=d,[{Provider:s,Slot:c,ItemSlot:f},function(n){const r=a(e+"CollectionConsumer",n),o=t.useCallback(()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${u}]`)),n=Array.from(r.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current));return n},[r.collectionRef,r.itemMap]);return o},o]}(yn),[Cn,On]=St(yn,[Tn,an]),kn=an(),Pn=t.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,i=r;return p(xn.Provider,{scope:e.__scopeAccordion,children:"multiple"===n?p(Ln,{...i,ref:t}):p(Rn,{...o,ref:t})})});Pn.displayName=yn;var[Nn,In]=Cn(yn),[Mn,An]=Cn(yn,{collapsible:!1}),Rn=t.forwardRef((e,n)=>{const{value:r,defaultValue:o,onValueChange:i=()=>{},collapsible:a=!1,...s}=e,[l,c]=Dt({prop:r,defaultProp:o,onChange:i});return p(Nn,{scope:e.__scopeAccordion,value:l?[l]:[],onItemOpen:c,onItemClose:t.useCallback(()=>a&&c(""),[a,c]),children:p(Mn,{scope:e.__scopeAccordion,collapsible:a,children:p(jn,{...s,ref:n})})})}),Ln=t.forwardRef((e,n)=>{const{value:r,defaultValue:o,onValueChange:i=()=>{},...a}=e,[s=[],l]=Dt({prop:r,defaultProp:o,onChange:i}),c=t.useCallback(e=>l((t=[])=>[...t,e]),[l]),d=t.useCallback(e=>l((t=[])=>t.filter(t=>t!==e)),[l]);return p(Nn,{scope:e.__scopeAccordion,value:s,onItemOpen:c,onItemClose:d,children:p(Mn,{scope:e.__scopeAccordion,collapsible:!0,children:p(jn,{...a,ref:n})})})}),[_n,Dn]=Cn(yn),jn=t.forwardRef((n,r)=>{const{__scopeAccordion:o,disabled:i,dir:a,orientation:s="vertical",...l}=n,c=function(...t){return e.useCallback(Rt(...t),t)}(t.useRef(null),r),d=Sn(o),u="ltr"===function(t){const n=e.useContext(wn);return t||n||"ltr"}(a),f=Lt(n.onKeyDown,e=>{if(!En.includes(e.key))return;const t=e.target,n=d().filter(e=>!e.ref.current?.disabled),r=n.findIndex(e=>e.ref.current===t),o=n.length;if(-1===r)return;e.preventDefault();let i=r;const a=o-1,l=()=>{i=r+1,i>a&&(i=0)},c=()=>{i=r-1,i<0&&(i=a)};switch(e.key){case"Home":i=0;break;case"End":i=a;break;case"ArrowRight":"horizontal"===s&&(u?l():c());break;case"ArrowDown":"vertical"===s&&l();break;case"ArrowLeft":"horizontal"===s&&(u?c():l());break;case"ArrowUp":"vertical"===s&&c()}const p=i%o;n[p].ref.current?.focus()});return p(_n,{scope:o,disabled:i,direction:a,orientation:s,children:p(xn.Slot,{scope:o,children:p(Bt.div,{...l,"data-orientation":s,ref:c,onKeyDown:i?void 0:f})})})}),zn="AccordionItem",[$n,Fn]=Cn(zn),Bn=t.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,i=Dn(zn,n),a=In(zn,n),s=kn(n),l=nn(),c=r&&a.value.includes(r)||!1,d=i.disabled||e.disabled;return p($n,{scope:n,open:c,disabled:d,triggerId:l,children:p(vn,{"data-orientation":i.orientation,"data-state":Yn(c),...s,...o,ref:t,disabled:d,open:c,onOpenChange:e=>{e?a.onItemOpen(r):a.onItemClose(r)}})})});Bn.displayName=zn;var Vn="AccordionHeader",Wn=t.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Dn(yn,n),i=Fn(Vn,n);return p(Bt.h3,{"data-orientation":o.orientation,"data-state":Yn(i.open),"data-disabled":i.disabled?"":void 0,...r,ref:t})});Wn.displayName=Vn;var Un="AccordionTrigger",Gn=t.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Dn(yn,n),i=Fn(Un,n),a=An(Un,n),s=kn(n);return p(xn.ItemSlot,{scope:n,children:p(gn,{"aria-disabled":i.open&&!a.collapsible||void 0,"data-orientation":o.orientation,id:i.triggerId,...s,...r,ref:t})})});Gn.displayName=Un;var Hn="AccordionContent",qn=t.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Dn(yn,n),i=Fn(Hn,n),a=kn(n);return p(bn,{role:"region","aria-labelledby":i.triggerId,"data-orientation":o.orientation,...a,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});function Yn(e){return e?"open":"closed"}qn.displayName=Hn;var Xn=Pn,Kn=Bn,Zn=Wn,Jn=Gn,Qn=qn;function er(t){var n=y(t,[]);return e.createElement(Xn,Object.assign({"data-slot":"accordion"},n))}function tr(t){var{className:n}=t,r=y(t,["className"]);return e.createElement(Kn,Object.assign({"data-slot":"accordion-item",className:$e("border-b last:border-b-0",n)},r))}function nr(t){var{className:n,children:r}=t,o=y(t,["className","children"]);return e.createElement(Zn,{className:"flex"},e.createElement(Jn,Object.assign({"data-slot":"accordion-trigger",className:$e("focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",n)},o),r,e.createElement(rt,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"})))}function rr(t){var{className:n,children:r}=t,o=y(t,["className","children"]);return e.createElement(Qn,Object.assign({"data-slot":"accordion-content",className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm"},o),e.createElement("div",{className:$e("pt-0 pb-4",n)},r))}const or=({title:e,content:n})=>t.createElement(er,{style:{borderRadius:"0.625rem"},type:"single",collapsible:!0,className:"bg-white px-4",defaultValue:"item"},t.createElement(tr,{value:"item"},t.createElement(nr,{className:""},e),t.createElement(rr,{className:"text-gray-700"},n))),ir=({logo:e})=>t.createElement("div",{className:"w-full bg-zinc-700 h-[60px] flex"},t.createElement("div",{className:"my-0 mx-auto w-full px-[24px] flex items-center justify-between"},e?t.createElement("div",{className:"h-10"},t.createElement("img",{src:e.thumbPath,alt:e.logoName,width:100,height:100,className:"object-contain w-full h-full"})):t.createElement("div",null),t.createElement("button",{className:"text-white cursor-pointer"},t.createElement(ft,null)))),ar=e=>{const{playerSettings:n,shortform:{description:r,productsInfo:o,logo:i,brand:a,title:s},player:l}=e;return t.createElement("div",{className:"w-full h-full bg-[#f4f4f4] overflow-scroll"},t.createElement(ir,{logo:i}),t.createElement("div",{className:" w-full h-full flex justify-between p-10 gap-10"},t.createElement("div",{className:""},t.createElement("div",{className:"flex gap-4 w-full mb-2 h-[125px] flex-col"},a?t.createElement("div",{className:"items-center flex gap-3"},a.thumbPath&&t.createElement("div",{className:"w-16 h-16 bg-white rounded-full border "},t.createElement("img",{src:a.thumbPath,alt:a.brandName,width:100,height:100,className:"object-contain w-full h-full rounded-full"})),t.createElement("div",null,t.createElement("p",null,a.brandName),t.createElement("p",{className:"text-lg font-semibold"},s))):t.createElement("p",{className:"text-xl font-semibold"},s),t.createElement(mt,null)),t.createElement("div",{className:"w-full pb-10 flex gap-4 justify-center"},t.createElement("div",{className:"flex gap-3"},l),t.createElement("div",{className:"flex flex-col gap-4 justify-end"},t.createElement(yt,{rounded:!0}),t.createElement(Et,{rounded:!0}),t.createElement(xt,{rounded:!0})))),t.createElement("div",{className:"flex flex-col gap-4 max-w-[40%]"},r&&t.createElement(or,{title:"숏클립 안내",content:t.createElement("p",{className:"font-medium"},r)}),t.createElement(or,{title:"상품 목록",content:t.createElement(t.Fragment,null,t.createElement("div",{className:"max-h-[300px] overflow-y-auto font-medium"},o.map((e,n)=>t.createElement(t.Fragment,null,t.createElement(gt,{product:e}),n!==o.length-1&&t.createElement("div",{className:"h-1 w-full border-t my-2"})))),t.createElement("button",{className:"w-full mt-3 border rounded py-2 px-4 cursor-pointer",disabled:!(null==o?void 0:o.length)},"상품 전체 보기"))}),n.comment&&t.createElement(or,{title:"댓글",content:t.createElement(bt,null)}))))};function sr(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function lr(e,t){void 0===e&&(e={}),void 0===t&&(t={}),Object.keys(t).forEach(n=>{void 0===e[n]?e[n]=t[n]:sr(t[n])&&sr(e[n])&&Object.keys(t[n]).length>0&&lr(e[n],t[n])})}const cr={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function dr(){const e="undefined"!=typeof document?document:{};return lr(e,cr),e}const ur={document:cr,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function pr(){const e="undefined"!=typeof window?window:{};return lr(e,ur),e}function fr(e,t){return void 0===t&&(t=0),setTimeout(e,t)}function mr(){return Date.now()}function hr(e,t){void 0===t&&(t="x");const n=pr();let r,o,i;const a=function(e){const t=pr();let n;return t.getComputedStyle&&(n=t.getComputedStyle(e,null)),!n&&e.currentStyle&&(n=e.currentStyle),n||(n=e.style),n}(e);return n.WebKitCSSMatrix?(o=a.transform||a.webkitTransform,o.split(",").length>6&&(o=o.split(", ").map(e=>e.replace(",",".")).join(", ")),i=new n.WebKitCSSMatrix("none"===o?"":o)):(i=a.MozTransform||a.OTransform||a.MsTransform||a.msTransform||a.transform||a.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),r=i.toString().split(",")),"x"===t&&(o=n.WebKitCSSMatrix?i.m41:16===r.length?parseFloat(r[12]):parseFloat(r[4])),"y"===t&&(o=n.WebKitCSSMatrix?i.m42:16===r.length?parseFloat(r[13]):parseFloat(r[5])),o||0}function vr(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function gr(e){return"undefined"!=typeof window&&void 0!==window.HTMLElement?e instanceof HTMLElement:e&&(1===e.nodeType||11===e.nodeType)}function br(){const e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let n=1;n<arguments.length;n+=1){const r=n<0||arguments.length<=n?void 0:arguments[n];if(null!=r&&!gr(r)){const n=Object.keys(Object(r)).filter(e=>t.indexOf(e)<0);for(let t=0,o=n.length;t<o;t+=1){const o=n[t],i=Object.getOwnPropertyDescriptor(r,o);void 0!==i&&i.enumerable&&(vr(e[o])&&vr(r[o])?r[o].__swiper__?e[o]=r[o]:br(e[o],r[o]):!vr(e[o])&&vr(r[o])?(e[o]={},r[o].__swiper__?e[o]=r[o]:br(e[o],r[o])):e[o]=r[o])}}}return e}function wr(e,t,n){e.style.setProperty(t,n)}function yr(e){let{swiper:t,targetPosition:n,side:r}=e;const o=pr(),i=-t.translate;let a,s=null;const l=t.params.speed;t.wrapperEl.style.scrollSnapType="none",o.cancelAnimationFrame(t.cssModeFrameID);const c=n>i?"next":"prev",d=(e,t)=>"next"===c&&e>=t||"prev"===c&&e<=t,u=()=>{a=(new Date).getTime(),null===s&&(s=a);const e=Math.max(Math.min((a-s)/l,1),0),c=.5-Math.cos(e*Math.PI)/2;let p=i+c*(n-i);if(d(p,n)&&(p=n),t.wrapperEl.scrollTo({[r]:p}),d(p,n))return t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout(()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[r]:p})}),void o.cancelAnimationFrame(t.cssModeFrameID);t.cssModeFrameID=o.requestAnimationFrame(u)};u()}function Er(e){return e.querySelector(".swiper-slide-transform")||e.shadowRoot&&e.shadowRoot.querySelector(".swiper-slide-transform")||e}function xr(e,t){void 0===t&&(t="");const n=[...e.children];return e instanceof HTMLSlotElement&&n.push(...e.assignedElements()),t?n.filter(e=>e.matches(t)):n}function Sr(e){try{return void console.warn(e)}catch(e){}}function Tr(e,t){void 0===t&&(t=[]);const n=document.createElement(e);return n.classList.add(...Array.isArray(t)?t:function(e){return void 0===e&&(e=""),e.trim().split(" ").filter(e=>!!e.trim())}(t)),n}function Cr(e,t){return pr().getComputedStyle(e,null).getPropertyValue(t)}function Or(e){let t,n=e;if(n){for(t=0;null!==(n=n.previousSibling);)1===n.nodeType&&(t+=1);return t}}function kr(e,t,n){const r=pr();return e["width"===t?"offsetWidth":"offsetHeight"]+parseFloat(r.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-right":"margin-top"))+parseFloat(r.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-left":"margin-bottom"))}function Pr(e){return(Array.isArray(e)?e:[e]).filter(e=>!!e)}let Nr,Ir,Mr;function Ar(){return Nr||(Nr=function(){const e=pr(),t=dr();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}()),Nr}function Rr(e){return void 0===e&&(e={}),Ir||(Ir=function(e){let{userAgent:t}=void 0===e?{}:e;const n=Ar(),r=pr(),o=r.navigator.platform,i=t||r.navigator.userAgent,a={ios:!1,android:!1},s=r.screen.width,l=r.screen.height,c=i.match(/(Android);?[\s\/]+([\d.]+)?/);let d=i.match(/(iPad).*OS\s([\d_]+)/);const u=i.match(/(iPod)(.*OS\s([\d_]+))?/),p=!d&&i.match(/(iPhone\sOS|iOS)\s([\d_]+)/),f="Win32"===o;let m="MacIntel"===o;return!d&&m&&n.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${s}x${l}`)>=0&&(d=i.match(/(Version)\/([\d.]+)/),d||(d=[0,1,"13_0_0"]),m=!1),c&&!f&&(a.os="android",a.android=!0),(d||p||u)&&(a.os="ios",a.ios=!0),a}(e)),Ir}function Lr(){return Mr||(Mr=function(){const e=pr(),t=Rr();let n=!1;function r(){const t=e.navigator.userAgent.toLowerCase();return t.indexOf("safari")>=0&&t.indexOf("chrome")<0&&t.indexOf("android")<0}if(r()){const t=String(e.navigator.userAgent);if(t.includes("Version/")){const[e,r]=t.split("Version/")[1].split(" ")[0].split(".").map(e=>Number(e));n=e<16||16===e&&r<2}}const o=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),i=r();return{isSafari:n||i,needPerspectiveFix:n,need3dFix:i||o&&t.ios,isWebView:o}}()),Mr}var _r={on(e,t,n){const r=this;if(!r.eventsListeners||r.destroyed)return r;if("function"!=typeof t)return r;const o=n?"unshift":"push";return e.split(" ").forEach(e=>{r.eventsListeners[e]||(r.eventsListeners[e]=[]),r.eventsListeners[e][o](t)}),r},once(e,t,n){const r=this;if(!r.eventsListeners||r.destroyed)return r;if("function"!=typeof t)return r;function o(){r.off(e,o),o.__emitterProxy&&delete o.__emitterProxy;for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];t.apply(r,i)}return o.__emitterProxy=t,r.on(e,o,n)},onAny(e,t){const n=this;if(!n.eventsListeners||n.destroyed)return n;if("function"!=typeof e)return n;const r=t?"unshift":"push";return n.eventsAnyListeners.indexOf(e)<0&&n.eventsAnyListeners[r](e),n},offAny(e){const t=this;if(!t.eventsListeners||t.destroyed)return t;if(!t.eventsAnyListeners)return t;const n=t.eventsAnyListeners.indexOf(e);return n>=0&&t.eventsAnyListeners.splice(n,1),t},off(e,t){const n=this;return!n.eventsListeners||n.destroyed?n:n.eventsListeners?(e.split(" ").forEach(e=>{void 0===t?n.eventsListeners[e]=[]:n.eventsListeners[e]&&n.eventsListeners[e].forEach((r,o)=>{(r===t||r.__emitterProxy&&r.__emitterProxy===t)&&n.eventsListeners[e].splice(o,1)})}),n):n},emit(){const e=this;if(!e.eventsListeners||e.destroyed)return e;if(!e.eventsListeners)return e;let t,n,r;for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];"string"==typeof i[0]||Array.isArray(i[0])?(t=i[0],n=i.slice(1,i.length),r=e):(t=i[0].events,n=i[0].data,r=i[0].context||e),n.unshift(r);return(Array.isArray(t)?t:t.split(" ")).forEach(t=>{e.eventsAnyListeners&&e.eventsAnyListeners.length&&e.eventsAnyListeners.forEach(e=>{e.apply(r,[t,...n])}),e.eventsListeners&&e.eventsListeners[t]&&e.eventsListeners[t].forEach(e=>{e.apply(r,n)})}),e}};const Dr=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};const jr=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};const zr=(e,t)=>{if(!e||e.destroyed||!e.params)return;const n=t.closest(e.isElement?"swiper-slide":`.${e.params.slideClass}`);if(n){let t=n.querySelector(`.${e.params.lazyPreloaderClass}`);!t&&e.isElement&&(n.shadowRoot?t=n.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{n.shadowRoot&&(t=n.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`),t&&t.remove())})),t&&t.remove()}},$r=(e,t)=>{if(!e.slides[t])return;const n=e.slides[t].querySelector('[loading="lazy"]');n&&n.removeAttribute("loading")},Fr=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const n=e.slides.length;if(!n||!t||t<0)return;t=Math.min(t,n);const r="auto"===e.params.slidesPerView?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),o=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){const n=o,i=[n-t];return i.push(...Array.from({length:t}).map((e,t)=>n+r+t)),void e.slides.forEach((t,n)=>{i.includes(t.column)&&$r(e,n)})}const i=o+r-1;if(e.params.rewind||e.params.loop)for(let r=o-t;r<=i+t;r+=1){const t=(r%n+n)%n;(t<o||t>i)&&$r(e,t)}else for(let r=Math.max(o-t,0);r<=Math.min(i+t,n-1);r+=1)r!==o&&(r>i||r<o)&&$r(e,r)};var Br={updateSize:function(){const e=this;let t,n;const r=e.el;t=void 0!==e.params.width&&null!==e.params.width?e.params.width:r.clientWidth,n=void 0!==e.params.height&&null!==e.params.height?e.params.height:r.clientHeight,0===t&&e.isHorizontal()||0===n&&e.isVertical()||(t=t-parseInt(Cr(r,"padding-left")||0,10)-parseInt(Cr(r,"padding-right")||0,10),n=n-parseInt(Cr(r,"padding-top")||0,10)-parseInt(Cr(r,"padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(n)&&(n=0),Object.assign(e,{width:t,height:n,size:e.isHorizontal()?t:n}))},updateSlides:function(){const e=this;function t(t,n){return parseFloat(t.getPropertyValue(e.getDirectionLabel(n))||0)}const n=e.params,{wrapperEl:r,slidesEl:o,size:i,rtlTranslate:a,wrongRTL:s}=e,l=e.virtual&&n.virtual.enabled,c=l?e.virtual.slides.length:e.slides.length,d=xr(o,`.${e.params.slideClass}, swiper-slide`),u=l?e.virtual.slides.length:d.length;let p=[];const f=[],m=[];let h=n.slidesOffsetBefore;"function"==typeof h&&(h=n.slidesOffsetBefore.call(e));let v=n.slidesOffsetAfter;"function"==typeof v&&(v=n.slidesOffsetAfter.call(e));const g=e.snapGrid.length,b=e.slidesGrid.length;let w=n.spaceBetween,y=-h,E=0,x=0;if(void 0===i)return;"string"==typeof w&&w.indexOf("%")>=0?w=parseFloat(w.replace("%",""))/100*i:"string"==typeof w&&(w=parseFloat(w)),e.virtualSize=-w,d.forEach(e=>{a?e.style.marginLeft="":e.style.marginRight="",e.style.marginBottom="",e.style.marginTop=""}),n.centeredSlides&&n.cssMode&&(wr(r,"--swiper-centered-offset-before",""),wr(r,"--swiper-centered-offset-after",""));const S=n.grid&&n.grid.rows>1&&e.grid;let T;S?e.grid.initSlides(d):e.grid&&e.grid.unsetSlides();const C="auto"===n.slidesPerView&&n.breakpoints&&Object.keys(n.breakpoints).filter(e=>void 0!==n.breakpoints[e].slidesPerView).length>0;for(let r=0;r<u;r+=1){let o;if(T=0,d[r]&&(o=d[r]),S&&e.grid.updateSlide(r,o,d),!d[r]||"none"!==Cr(o,"display")){if("auto"===n.slidesPerView){C&&(d[r].style[e.getDirectionLabel("width")]="");const i=getComputedStyle(o),a=o.style.transform,s=o.style.webkitTransform;if(a&&(o.style.transform="none"),s&&(o.style.webkitTransform="none"),n.roundLengths)T=e.isHorizontal()?kr(o,"width"):kr(o,"height");else{const e=t(i,"width"),n=t(i,"padding-left"),r=t(i,"padding-right"),a=t(i,"margin-left"),s=t(i,"margin-right"),l=i.getPropertyValue("box-sizing");if(l&&"border-box"===l)T=e+a+s;else{const{clientWidth:t,offsetWidth:i}=o;T=e+n+r+a+s+(i-t)}}a&&(o.style.transform=a),s&&(o.style.webkitTransform=s),n.roundLengths&&(T=Math.floor(T))}else T=(i-(n.slidesPerView-1)*w)/n.slidesPerView,n.roundLengths&&(T=Math.floor(T)),d[r]&&(d[r].style[e.getDirectionLabel("width")]=`${T}px`);d[r]&&(d[r].swiperSlideSize=T),m.push(T),n.centeredSlides?(y=y+T/2+E/2+w,0===E&&0!==r&&(y=y-i/2-w),0===r&&(y=y-i/2-w),Math.abs(y)<.001&&(y=0),n.roundLengths&&(y=Math.floor(y)),x%n.slidesPerGroup===0&&p.push(y),f.push(y)):(n.roundLengths&&(y=Math.floor(y)),(x-Math.min(e.params.slidesPerGroupSkip,x))%e.params.slidesPerGroup===0&&p.push(y),f.push(y),y=y+T+w),e.virtualSize+=T+w,E=T,x+=1}}if(e.virtualSize=Math.max(e.virtualSize,i)+v,a&&s&&("slide"===n.effect||"coverflow"===n.effect)&&(r.style.width=`${e.virtualSize+w}px`),n.setWrapperSize&&(r.style[e.getDirectionLabel("width")]=`${e.virtualSize+w}px`),S&&e.grid.updateWrapperSize(T,p),!n.centeredSlides){const t=[];for(let r=0;r<p.length;r+=1){let o=p[r];n.roundLengths&&(o=Math.floor(o)),p[r]<=e.virtualSize-i&&t.push(o)}p=t,Math.floor(e.virtualSize-i)-Math.floor(p[p.length-1])>1&&p.push(e.virtualSize-i)}if(l&&n.loop){const t=m[0]+w;if(n.slidesPerGroup>1){const r=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/n.slidesPerGroup),o=t*n.slidesPerGroup;for(let e=0;e<r;e+=1)p.push(p[p.length-1]+o)}for(let r=0;r<e.virtual.slidesBefore+e.virtual.slidesAfter;r+=1)1===n.slidesPerGroup&&p.push(p[p.length-1]+t),f.push(f[f.length-1]+t),e.virtualSize+=t}if(0===p.length&&(p=[0]),0!==w){const t=e.isHorizontal()&&a?"marginLeft":e.getDirectionLabel("marginRight");d.filter((e,t)=>!(n.cssMode&&!n.loop)||t!==d.length-1).forEach(e=>{e.style[t]=`${w}px`})}if(n.centeredSlides&&n.centeredSlidesBounds){let e=0;m.forEach(t=>{e+=t+(w||0)}),e-=w;const t=e>i?e-i:0;p=p.map(e=>e<=0?-h:e>t?t+v:e)}if(n.centerInsufficientSlides){let e=0;m.forEach(t=>{e+=t+(w||0)}),e-=w;const t=(n.slidesOffsetBefore||0)+(n.slidesOffsetAfter||0);if(e+t<i){const n=(i-e-t)/2;p.forEach((e,t)=>{p[t]=e-n}),f.forEach((e,t)=>{f[t]=e+n})}}if(Object.assign(e,{slides:d,snapGrid:p,slidesGrid:f,slidesSizesGrid:m}),n.centeredSlides&&n.cssMode&&!n.centeredSlidesBounds){wr(r,"--swiper-centered-offset-before",-p[0]+"px"),wr(r,"--swiper-centered-offset-after",e.size/2-m[m.length-1]/2+"px");const t=-e.snapGrid[0],n=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(e=>e+t),e.slidesGrid=e.slidesGrid.map(e=>e+n)}if(u!==c&&e.emit("slidesLengthChange"),p.length!==g&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),f.length!==b&&e.emit("slidesGridLengthChange"),n.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!(l||n.cssMode||"slide"!==n.effect&&"fade"!==n.effect)){const t=`${n.containerModifierClass}backface-hidden`,r=e.el.classList.contains(t);u<=n.maxBackfaceHiddenSlides?r||e.el.classList.add(t):r&&e.el.classList.remove(t)}},updateAutoHeight:function(e){const t=this,n=[],r=t.virtual&&t.params.virtual.enabled;let o,i=0;"number"==typeof e?t.setTransition(e):!0===e&&t.setTransition(t.params.speed);const a=e=>r?t.slides[t.getSlideIndexByData(e)]:t.slides[e];if("auto"!==t.params.slidesPerView&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach(e=>{n.push(e)});else for(o=0;o<Math.ceil(t.params.slidesPerView);o+=1){const e=t.activeIndex+o;if(e>t.slides.length&&!r)break;n.push(a(e))}else n.push(a(t.activeIndex));for(o=0;o<n.length;o+=1)if(void 0!==n[o]){const e=n[o].offsetHeight;i=e>i?e:i}(i||0===i)&&(t.wrapperEl.style.height=`${i}px`)},updateSlidesOffset:function(){const e=this,t=e.slides,n=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let r=0;r<t.length;r+=1)t[r].swiperSlideOffset=(e.isHorizontal()?t[r].offsetLeft:t[r].offsetTop)-n-e.cssOverflowAdjustment()},updateSlidesProgress:function(e){void 0===e&&(e=this&&this.translate||0);const t=this,n=t.params,{slides:r,rtlTranslate:o,snapGrid:i}=t;if(0===r.length)return;void 0===r[0].swiperSlideOffset&&t.updateSlidesOffset();let a=-e;o&&(a=e),t.visibleSlidesIndexes=[],t.visibleSlides=[];let s=n.spaceBetween;"string"==typeof s&&s.indexOf("%")>=0?s=parseFloat(s.replace("%",""))/100*t.size:"string"==typeof s&&(s=parseFloat(s));for(let e=0;e<r.length;e+=1){const l=r[e];let c=l.swiperSlideOffset;n.cssMode&&n.centeredSlides&&(c-=r[0].swiperSlideOffset);const d=(a+(n.centeredSlides?t.minTranslate():0)-c)/(l.swiperSlideSize+s),u=(a-i[0]+(n.centeredSlides?t.minTranslate():0)-c)/(l.swiperSlideSize+s),p=-(a-c),f=p+t.slidesSizesGrid[e],m=p>=0&&p<=t.size-t.slidesSizesGrid[e],h=p>=0&&p<t.size-1||f>1&&f<=t.size||p<=0&&f>=t.size;h&&(t.visibleSlides.push(l),t.visibleSlidesIndexes.push(e)),Dr(l,h,n.slideVisibleClass),Dr(l,m,n.slideFullyVisibleClass),l.progress=o?-d:d,l.originalProgress=o?-u:u}},updateProgress:function(e){const t=this;if(void 0===e){const n=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*n||0}const n=t.params,r=t.maxTranslate()-t.minTranslate();let{progress:o,isBeginning:i,isEnd:a,progressLoop:s}=t;const l=i,c=a;if(0===r)o=0,i=!0,a=!0;else{o=(e-t.minTranslate())/r;const n=Math.abs(e-t.minTranslate())<1,s=Math.abs(e-t.maxTranslate())<1;i=n||o<=0,a=s||o>=1,n&&(o=0),s&&(o=1)}if(n.loop){const n=t.getSlideIndexByData(0),r=t.getSlideIndexByData(t.slides.length-1),o=t.slidesGrid[n],i=t.slidesGrid[r],a=t.slidesGrid[t.slidesGrid.length-1],l=Math.abs(e);s=l>=o?(l-o)/a:(l+a-i)/a,s>1&&(s-=1)}Object.assign(t,{progress:o,progressLoop:s,isBeginning:i,isEnd:a}),(n.watchSlidesProgress||n.centeredSlides&&n.autoHeight)&&t.updateSlidesProgress(e),i&&!l&&t.emit("reachBeginning toEdge"),a&&!c&&t.emit("reachEnd toEdge"),(l&&!i||c&&!a)&&t.emit("fromEdge"),t.emit("progress",o)},updateSlidesClasses:function(){const e=this,{slides:t,params:n,slidesEl:r,activeIndex:o}=e,i=e.virtual&&n.virtual.enabled,a=e.grid&&n.grid&&n.grid.rows>1,s=e=>xr(r,`.${n.slideClass}${e}, swiper-slide${e}`)[0];let l,c,d;if(i)if(n.loop){let t=o-e.virtual.slidesBefore;t<0&&(t=e.virtual.slides.length+t),t>=e.virtual.slides.length&&(t-=e.virtual.slides.length),l=s(`[data-swiper-slide-index="${t}"]`)}else l=s(`[data-swiper-slide-index="${o}"]`);else a?(l=t.filter(e=>e.column===o)[0],d=t.filter(e=>e.column===o+1)[0],c=t.filter(e=>e.column===o-1)[0]):l=t[o];l&&(a||(d=function(e,t){const n=[];for(;e.nextElementSibling;){const r=e.nextElementSibling;t?r.matches(t)&&n.push(r):n.push(r),e=r}return n}(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!d&&(d=t[0]),c=function(e,t){const n=[];for(;e.previousElementSibling;){const r=e.previousElementSibling;t?r.matches(t)&&n.push(r):n.push(r),e=r}return n}(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&0===!c&&(c=t[t.length-1]))),t.forEach(e=>{jr(e,e===l,n.slideActiveClass),jr(e,e===d,n.slideNextClass),jr(e,e===c,n.slidePrevClass)}),e.emitSlidesClasses()},updateActiveIndex:function(e){const t=this,n=t.rtlTranslate?t.translate:-t.translate,{snapGrid:r,params:o,activeIndex:i,realIndex:a,snapIndex:s}=t;let l,c=e;const d=e=>{let n=e-t.virtual.slidesBefore;return n<0&&(n=t.virtual.slides.length+n),n>=t.virtual.slides.length&&(n-=t.virtual.slides.length),n};if(void 0===c&&(c=function(e){const{slidesGrid:t,params:n}=e,r=e.rtlTranslate?e.translate:-e.translate;let o;for(let e=0;e<t.length;e+=1)void 0!==t[e+1]?r>=t[e]&&r<t[e+1]-(t[e+1]-t[e])/2?o=e:r>=t[e]&&r<t[e+1]&&(o=e+1):r>=t[e]&&(o=e);return n.normalizeSlideIndex&&(o<0||void 0===o)&&(o=0),o}(t)),r.indexOf(n)>=0)l=r.indexOf(n);else{const e=Math.min(o.slidesPerGroupSkip,c);l=e+Math.floor((c-e)/o.slidesPerGroup)}if(l>=r.length&&(l=r.length-1),c===i&&!t.params.loop)return void(l!==s&&(t.snapIndex=l,t.emit("snapIndexChange")));if(c===i&&t.params.loop&&t.virtual&&t.params.virtual.enabled)return void(t.realIndex=d(c));const u=t.grid&&o.grid&&o.grid.rows>1;let p;if(t.virtual&&o.virtual.enabled&&o.loop)p=d(c);else if(u){const e=t.slides.filter(e=>e.column===c)[0];let n=parseInt(e.getAttribute("data-swiper-slide-index"),10);Number.isNaN(n)&&(n=Math.max(t.slides.indexOf(e),0)),p=Math.floor(n/o.grid.rows)}else if(t.slides[c]){const e=t.slides[c].getAttribute("data-swiper-slide-index");p=e?parseInt(e,10):c}else p=c;Object.assign(t,{previousSnapIndex:s,snapIndex:l,previousRealIndex:a,realIndex:p,previousIndex:i,activeIndex:c}),t.initialized&&Fr(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(a!==p&&t.emit("realIndexChange"),t.emit("slideChange"))},updateClickedSlide:function(e,t){const n=this,r=n.params;let o=e.closest(`.${r.slideClass}, swiper-slide`);!o&&n.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach(e=>{!o&&e.matches&&e.matches(`.${r.slideClass}, swiper-slide`)&&(o=e)});let i,a=!1;if(o)for(let e=0;e<n.slides.length;e+=1)if(n.slides[e]===o){a=!0,i=e;break}if(!o||!a)return n.clickedSlide=void 0,void(n.clickedIndex=void 0);n.clickedSlide=o,n.virtual&&n.params.virtual.enabled?n.clickedIndex=parseInt(o.getAttribute("data-swiper-slide-index"),10):n.clickedIndex=i,r.slideToClickedSlide&&void 0!==n.clickedIndex&&n.clickedIndex!==n.activeIndex&&n.slideToClickedSlide()}};var Vr={getTranslate:function(e){void 0===e&&(e=this.isHorizontal()?"x":"y");const{params:t,rtlTranslate:n,translate:r,wrapperEl:o}=this;if(t.virtualTranslate)return n?-r:r;if(t.cssMode)return r;let i=hr(o,e);return i+=this.cssOverflowAdjustment(),n&&(i=-i),i||0},setTranslate:function(e,t){const n=this,{rtlTranslate:r,params:o,wrapperEl:i,progress:a}=n;let s,l=0,c=0;n.isHorizontal()?l=r?-e:e:c=e,o.roundLengths&&(l=Math.floor(l),c=Math.floor(c)),n.previousTranslate=n.translate,n.translate=n.isHorizontal()?l:c,o.cssMode?i[n.isHorizontal()?"scrollLeft":"scrollTop"]=n.isHorizontal()?-l:-c:o.virtualTranslate||(n.isHorizontal()?l-=n.cssOverflowAdjustment():c-=n.cssOverflowAdjustment(),i.style.transform=`translate3d(${l}px, ${c}px, 0px)`);const d=n.maxTranslate()-n.minTranslate();s=0===d?0:(e-n.minTranslate())/d,s!==a&&n.updateProgress(e),n.emit("setTranslate",n.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(e,t,n,r,o){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===n&&(n=!0),void 0===r&&(r=!0);const i=this,{params:a,wrapperEl:s}=i;if(i.animating&&a.preventInteractionOnTransition)return!1;const l=i.minTranslate(),c=i.maxTranslate();let d;if(d=r&&e>l?l:r&&e<c?c:e,i.updateProgress(d),a.cssMode){const e=i.isHorizontal();if(0===t)s[e?"scrollLeft":"scrollTop"]=-d;else{if(!i.support.smoothScroll)return yr({swiper:i,targetPosition:-d,side:e?"left":"top"}),!0;s.scrollTo({[e?"left":"top"]:-d,behavior:"smooth"})}return!0}return 0===t?(i.setTransition(0),i.setTranslate(d),n&&(i.emit("beforeTransitionStart",t,o),i.emit("transitionEnd"))):(i.setTransition(t),i.setTranslate(d),n&&(i.emit("beforeTransitionStart",t,o),i.emit("transitionStart")),i.animating||(i.animating=!0,i.onTranslateToWrapperTransitionEnd||(i.onTranslateToWrapperTransitionEnd=function(e){i&&!i.destroyed&&e.target===this&&(i.wrapperEl.removeEventListener("transitionend",i.onTranslateToWrapperTransitionEnd),i.onTranslateToWrapperTransitionEnd=null,delete i.onTranslateToWrapperTransitionEnd,i.animating=!1,n&&i.emit("transitionEnd"))}),i.wrapperEl.addEventListener("transitionend",i.onTranslateToWrapperTransitionEnd))),!0}};function Wr(e){let{swiper:t,runCallbacks:n,direction:r,step:o}=e;const{activeIndex:i,previousIndex:a}=t;let s=r;if(s||(s=i>a?"next":i<a?"prev":"reset"),t.emit(`transition${o}`),n&&i!==a){if("reset"===s)return void t.emit(`slideResetTransition${o}`);t.emit(`slideChangeTransition${o}`),"next"===s?t.emit(`slideNextTransition${o}`):t.emit(`slidePrevTransition${o}`)}}var Ur={slideTo:function(e,t,n,r,o){void 0===e&&(e=0),void 0===n&&(n=!0),"string"==typeof e&&(e=parseInt(e,10));const i=this;let a=e;a<0&&(a=0);const{params:s,snapGrid:l,slidesGrid:c,previousIndex:d,activeIndex:u,rtlTranslate:p,wrapperEl:f,enabled:m}=i;if(!m&&!r&&!o||i.destroyed||i.animating&&s.preventInteractionOnTransition)return!1;void 0===t&&(t=i.params.speed);const h=Math.min(i.params.slidesPerGroupSkip,a);let v=h+Math.floor((a-h)/i.params.slidesPerGroup);v>=l.length&&(v=l.length-1);const g=-l[v];if(s.normalizeSlideIndex)for(let e=0;e<c.length;e+=1){const t=-Math.floor(100*g),n=Math.floor(100*c[e]),r=Math.floor(100*c[e+1]);void 0!==c[e+1]?t>=n&&t<r-(r-n)/2?a=e:t>=n&&t<r&&(a=e+1):t>=n&&(a=e)}if(i.initialized&&a!==u){if(!i.allowSlideNext&&(p?g>i.translate&&g>i.minTranslate():g<i.translate&&g<i.minTranslate()))return!1;if(!i.allowSlidePrev&&g>i.translate&&g>i.maxTranslate()&&(u||0)!==a)return!1}let b;a!==(d||0)&&n&&i.emit("beforeSlideChangeStart"),i.updateProgress(g),b=a>u?"next":a<u?"prev":"reset";const w=i.virtual&&i.params.virtual.enabled;if(!(w&&o)&&(p&&-g===i.translate||!p&&g===i.translate))return i.updateActiveIndex(a),s.autoHeight&&i.updateAutoHeight(),i.updateSlidesClasses(),"slide"!==s.effect&&i.setTranslate(g),"reset"!==b&&(i.transitionStart(n,b),i.transitionEnd(n,b)),!1;if(s.cssMode){const e=i.isHorizontal(),n=p?g:-g;if(0===t)w&&(i.wrapperEl.style.scrollSnapType="none",i._immediateVirtual=!0),w&&!i._cssModeVirtualInitialSet&&i.params.initialSlide>0?(i._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{f[e?"scrollLeft":"scrollTop"]=n})):f[e?"scrollLeft":"scrollTop"]=n,w&&requestAnimationFrame(()=>{i.wrapperEl.style.scrollSnapType="",i._immediateVirtual=!1});else{if(!i.support.smoothScroll)return yr({swiper:i,targetPosition:n,side:e?"left":"top"}),!0;f.scrollTo({[e?"left":"top"]:n,behavior:"smooth"})}return!0}return i.setTransition(t),i.setTranslate(g),i.updateActiveIndex(a),i.updateSlidesClasses(),i.emit("beforeTransitionStart",t,r),i.transitionStart(n,b),0===t?i.transitionEnd(n,b):i.animating||(i.animating=!0,i.onSlideToWrapperTransitionEnd||(i.onSlideToWrapperTransitionEnd=function(e){i&&!i.destroyed&&e.target===this&&(i.wrapperEl.removeEventListener("transitionend",i.onSlideToWrapperTransitionEnd),i.onSlideToWrapperTransitionEnd=null,delete i.onSlideToWrapperTransitionEnd,i.transitionEnd(n,b))}),i.wrapperEl.addEventListener("transitionend",i.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(e,t,n,r){if(void 0===e&&(e=0),void 0===n&&(n=!0),"string"==typeof e){e=parseInt(e,10)}const o=this;if(o.destroyed)return;void 0===t&&(t=o.params.speed);const i=o.grid&&o.params.grid&&o.params.grid.rows>1;let a=e;if(o.params.loop)if(o.virtual&&o.params.virtual.enabled)a+=o.virtual.slidesBefore;else{let e;if(i){const t=a*o.params.grid.rows;e=o.slides.filter(e=>1*e.getAttribute("data-swiper-slide-index")===t)[0].column}else e=o.getSlideIndexByData(a);const t=i?Math.ceil(o.slides.length/o.params.grid.rows):o.slides.length,{centeredSlides:n}=o.params;let s=o.params.slidesPerView;"auto"===s?s=o.slidesPerViewDynamic():(s=Math.ceil(parseFloat(o.params.slidesPerView,10)),n&&s%2==0&&(s+=1));let l=t-e<s;if(n&&(l=l||e<Math.ceil(s/2)),r&&n&&"auto"!==o.params.slidesPerView&&!i&&(l=!1),l){const r=n?e<o.activeIndex?"prev":"next":e-o.activeIndex-1<o.params.slidesPerView?"next":"prev";o.loopFix({direction:r,slideTo:!0,activeSlideIndex:"next"===r?e+1:e-t+1,slideRealIndex:"next"===r?o.realIndex:void 0})}if(i){const e=a*o.params.grid.rows;a=o.slides.filter(t=>1*t.getAttribute("data-swiper-slide-index")===e)[0].column}else a=o.getSlideIndexByData(a)}return requestAnimationFrame(()=>{o.slideTo(a,t,n,r)}),o},slideNext:function(e,t,n){void 0===t&&(t=!0);const r=this,{enabled:o,params:i,animating:a}=r;if(!o||r.destroyed)return r;void 0===e&&(e=r.params.speed);let s=i.slidesPerGroup;"auto"===i.slidesPerView&&1===i.slidesPerGroup&&i.slidesPerGroupAuto&&(s=Math.max(r.slidesPerViewDynamic("current",!0),1));const l=r.activeIndex<i.slidesPerGroupSkip?1:s,c=r.virtual&&i.virtual.enabled;if(i.loop){if(a&&!c&&i.loopPreventsSliding)return!1;if(r.loopFix({direction:"next"}),r._clientLeft=r.wrapperEl.clientLeft,r.activeIndex===r.slides.length-1&&i.cssMode)return requestAnimationFrame(()=>{r.slideTo(r.activeIndex+l,e,t,n)}),!0}return i.rewind&&r.isEnd?r.slideTo(0,e,t,n):r.slideTo(r.activeIndex+l,e,t,n)},slidePrev:function(e,t,n){void 0===t&&(t=!0);const r=this,{params:o,snapGrid:i,slidesGrid:a,rtlTranslate:s,enabled:l,animating:c}=r;if(!l||r.destroyed)return r;void 0===e&&(e=r.params.speed);const d=r.virtual&&o.virtual.enabled;if(o.loop){if(c&&!d&&o.loopPreventsSliding)return!1;r.loopFix({direction:"prev"}),r._clientLeft=r.wrapperEl.clientLeft}function u(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}const p=u(s?r.translate:-r.translate),f=i.map(e=>u(e));let m=i[f.indexOf(p)-1];if(void 0===m&&o.cssMode){let e;i.forEach((t,n)=>{p>=t&&(e=n)}),void 0!==e&&(m=i[e>0?e-1:e])}let h=0;if(void 0!==m&&(h=a.indexOf(m),h<0&&(h=r.activeIndex-1),"auto"===o.slidesPerView&&1===o.slidesPerGroup&&o.slidesPerGroupAuto&&(h=h-r.slidesPerViewDynamic("previous",!0)+1,h=Math.max(h,0))),o.rewind&&r.isBeginning){const o=r.params.virtual&&r.params.virtual.enabled&&r.virtual?r.virtual.slides.length-1:r.slides.length-1;return r.slideTo(o,e,t,n)}return o.loop&&0===r.activeIndex&&o.cssMode?(requestAnimationFrame(()=>{r.slideTo(h,e,t,n)}),!0):r.slideTo(h,e,t,n)},slideReset:function(e,t,n){void 0===t&&(t=!0);const r=this;if(!r.destroyed)return void 0===e&&(e=r.params.speed),r.slideTo(r.activeIndex,e,t,n)},slideToClosest:function(e,t,n,r){void 0===t&&(t=!0),void 0===r&&(r=.5);const o=this;if(o.destroyed)return;void 0===e&&(e=o.params.speed);let i=o.activeIndex;const a=Math.min(o.params.slidesPerGroupSkip,i),s=a+Math.floor((i-a)/o.params.slidesPerGroup),l=o.rtlTranslate?o.translate:-o.translate;if(l>=o.snapGrid[s]){const e=o.snapGrid[s];l-e>(o.snapGrid[s+1]-e)*r&&(i+=o.params.slidesPerGroup)}else{const e=o.snapGrid[s-1];l-e<=(o.snapGrid[s]-e)*r&&(i-=o.params.slidesPerGroup)}return i=Math.max(i,0),i=Math.min(i,o.slidesGrid.length-1),o.slideTo(i,e,t,n)},slideToClickedSlide:function(){const e=this;if(e.destroyed)return;const{params:t,slidesEl:n}=e,r="auto"===t.slidesPerView?e.slidesPerViewDynamic():t.slidesPerView;let o,i=e.clickedIndex;const a=e.isElement?"swiper-slide":`.${t.slideClass}`;if(t.loop){if(e.animating)return;o=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?i<e.loopedSlides-r/2||i>e.slides.length-e.loopedSlides+r/2?(e.loopFix(),i=e.getSlideIndex(xr(n,`${a}[data-swiper-slide-index="${o}"]`)[0]),fr(()=>{e.slideTo(i)})):e.slideTo(i):i>e.slides.length-r?(e.loopFix(),i=e.getSlideIndex(xr(n,`${a}[data-swiper-slide-index="${o}"]`)[0]),fr(()=>{e.slideTo(i)})):e.slideTo(i)}else e.slideTo(i)}};var Gr={loopCreate:function(e){const t=this,{params:n,slidesEl:r}=t;if(!n.loop||t.virtual&&t.params.virtual.enabled)return;const o=()=>{xr(r,`.${n.slideClass}, swiper-slide`).forEach((e,t)=>{e.setAttribute("data-swiper-slide-index",t)})},i=t.grid&&n.grid&&n.grid.rows>1,a=n.slidesPerGroup*(i?n.grid.rows:1),s=t.slides.length%a!==0,l=i&&t.slides.length%n.grid.rows!==0,c=e=>{for(let r=0;r<e;r+=1){const e=t.isElement?Tr("swiper-slide",[n.slideBlankClass]):Tr("div",[n.slideClass,n.slideBlankClass]);t.slidesEl.append(e)}};if(s){if(n.loopAddBlankSlides){c(a-t.slides.length%a),t.recalcSlides(),t.updateSlides()}else Sr("Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");o()}else if(l){if(n.loopAddBlankSlides){c(n.grid.rows-t.slides.length%n.grid.rows),t.recalcSlides(),t.updateSlides()}else Sr("Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");o()}else o();t.loopFix({slideRealIndex:e,direction:n.centeredSlides?void 0:"next"})},loopFix:function(e){let{slideRealIndex:t,slideTo:n=!0,direction:r,setTranslate:o,activeSlideIndex:i,byController:a,byMousewheel:s}=void 0===e?{}:e;const l=this;if(!l.params.loop)return;l.emit("beforeLoopFix");const{slides:c,allowSlidePrev:d,allowSlideNext:u,slidesEl:p,params:f}=l,{centeredSlides:m}=f;if(l.allowSlidePrev=!0,l.allowSlideNext=!0,l.virtual&&f.virtual.enabled)return n&&(f.centeredSlides||0!==l.snapIndex?f.centeredSlides&&l.snapIndex<f.slidesPerView?l.slideTo(l.virtual.slides.length+l.snapIndex,0,!1,!0):l.snapIndex===l.snapGrid.length-1&&l.slideTo(l.virtual.slidesBefore,0,!1,!0):l.slideTo(l.virtual.slides.length,0,!1,!0)),l.allowSlidePrev=d,l.allowSlideNext=u,void l.emit("loopFix");let h=f.slidesPerView;"auto"===h?h=l.slidesPerViewDynamic():(h=Math.ceil(parseFloat(f.slidesPerView,10)),m&&h%2==0&&(h+=1));const v=f.slidesPerGroupAuto?h:f.slidesPerGroup;let g=v;g%v!==0&&(g+=v-g%v),g+=f.loopAdditionalSlides,l.loopedSlides=g;const b=l.grid&&f.grid&&f.grid.rows>1;c.length<h+g?Sr("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled and not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters"):b&&"row"===f.grid.fill&&Sr("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");const w=[],y=[];let E=l.activeIndex;void 0===i?i=l.getSlideIndex(c.filter(e=>e.classList.contains(f.slideActiveClass))[0]):E=i;const x="next"===r||!r,S="prev"===r||!r;let T=0,C=0;const O=b?Math.ceil(c.length/f.grid.rows):c.length,k=(b?c[i].column:i)+(m&&void 0===o?-h/2+.5:0);if(k<g){T=Math.max(g-k,v);for(let e=0;e<g-k;e+=1){const t=e-Math.floor(e/O)*O;if(b){const e=O-t-1;for(let t=c.length-1;t>=0;t-=1)c[t].column===e&&w.push(t)}else w.push(O-t-1)}}else if(k+h>O-g){C=Math.max(k-(O-2*g),v);for(let e=0;e<C;e+=1){const t=e-Math.floor(e/O)*O;b?c.forEach((e,n)=>{e.column===t&&y.push(n)}):y.push(t)}}if(l.__preventObserver__=!0,requestAnimationFrame(()=>{l.__preventObserver__=!1}),S&&w.forEach(e=>{c[e].swiperLoopMoveDOM=!0,p.prepend(c[e]),c[e].swiperLoopMoveDOM=!1}),x&&y.forEach(e=>{c[e].swiperLoopMoveDOM=!0,p.append(c[e]),c[e].swiperLoopMoveDOM=!1}),l.recalcSlides(),"auto"===f.slidesPerView?l.updateSlides():b&&(w.length>0&&S||y.length>0&&x)&&l.slides.forEach((e,t)=>{l.grid.updateSlide(t,e,l.slides)}),f.watchSlidesProgress&&l.updateSlidesOffset(),n)if(w.length>0&&S){if(void 0===t){const e=l.slidesGrid[E],t=l.slidesGrid[E+T]-e;s?l.setTranslate(l.translate-t):(l.slideTo(E+Math.ceil(T),0,!1,!0),o&&(l.touchEventsData.startTranslate=l.touchEventsData.startTranslate-t,l.touchEventsData.currentTranslate=l.touchEventsData.currentTranslate-t))}else if(o){const e=b?w.length/f.grid.rows:w.length;l.slideTo(l.activeIndex+e,0,!1,!0),l.touchEventsData.currentTranslate=l.translate}}else if(y.length>0&&x)if(void 0===t){const e=l.slidesGrid[E],t=l.slidesGrid[E-C]-e;s?l.setTranslate(l.translate-t):(l.slideTo(E-C,0,!1,!0),o&&(l.touchEventsData.startTranslate=l.touchEventsData.startTranslate-t,l.touchEventsData.currentTranslate=l.touchEventsData.currentTranslate-t))}else{const e=b?y.length/f.grid.rows:y.length;l.slideTo(l.activeIndex-e,0,!1,!0)}if(l.allowSlidePrev=d,l.allowSlideNext=u,l.controller&&l.controller.control&&!a){const e={slideRealIndex:t,direction:r,setTranslate:o,activeSlideIndex:i,byController:!0};Array.isArray(l.controller.control)?l.controller.control.forEach(t=>{!t.destroyed&&t.params.loop&&t.loopFix({...e,slideTo:t.params.slidesPerView===f.slidesPerView&&n})}):l.controller.control instanceof l.constructor&&l.controller.control.params.loop&&l.controller.control.loopFix({...e,slideTo:l.controller.control.params.slidesPerView===f.slidesPerView&&n})}l.emit("loopFix")},loopDestroy:function(){const e=this,{params:t,slidesEl:n}=e;if(!t.loop||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();const r=[];e.slides.forEach(e=>{const t=void 0===e.swiperSlideIndex?1*e.getAttribute("data-swiper-slide-index"):e.swiperSlideIndex;r[t]=e}),e.slides.forEach(e=>{e.removeAttribute("data-swiper-slide-index")}),r.forEach(e=>{n.append(e)}),e.recalcSlides(),e.slideTo(e.realIndex,0)}};function Hr(e,t,n){const r=pr(),{params:o}=e,i=o.edgeSwipeDetection,a=o.edgeSwipeThreshold;return!i||!(n<=a||n>=r.innerWidth-a)||"prevent"===i&&(t.preventDefault(),!0)}function qr(e){const t=this,n=dr();let r=e;r.originalEvent&&(r=r.originalEvent);const o=t.touchEventsData;if("pointerdown"===r.type){if(null!==o.pointerId&&o.pointerId!==r.pointerId)return;o.pointerId=r.pointerId}else"touchstart"===r.type&&1===r.targetTouches.length&&(o.touchId=r.targetTouches[0].identifier);if("touchstart"===r.type)return void Hr(t,r,r.targetTouches[0].pageX);const{params:i,touches:a,enabled:s}=t;if(!s)return;if(!i.simulateTouch&&"mouse"===r.pointerType)return;if(t.animating&&i.preventInteractionOnTransition)return;!t.animating&&i.cssMode&&i.loop&&t.loopFix();let l=r.target;if("wrapper"===i.touchEventsTarget&&!function(e,t){const n=t.contains(e);if(!n&&t instanceof HTMLSlotElement)return[...t.assignedElements()].includes(e);return n}(l,t.wrapperEl))return;if("which"in r&&3===r.which)return;if("button"in r&&r.button>0)return;if(o.isTouched&&o.isMoved)return;const c=!!i.noSwipingClass&&""!==i.noSwipingClass,d=r.composedPath?r.composedPath():r.path;c&&r.target&&r.target.shadowRoot&&d&&(l=d[0]);const u=i.noSwipingSelector?i.noSwipingSelector:`.${i.noSwipingClass}`,p=!(!r.target||!r.target.shadowRoot);if(i.noSwiping&&(p?function(e,t){return void 0===t&&(t=this),function t(n){if(!n||n===dr()||n===pr())return null;n.assignedSlot&&(n=n.assignedSlot);const r=n.closest(e);return r||n.getRootNode?r||t(n.getRootNode().host):null}(t)}(u,l):l.closest(u)))return void(t.allowClick=!0);if(i.swipeHandler&&!l.closest(i.swipeHandler))return;a.currentX=r.pageX,a.currentY=r.pageY;const f=a.currentX,m=a.currentY;if(!Hr(t,r,f))return;Object.assign(o,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),a.startX=f,a.startY=m,o.touchStartTime=mr(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,i.threshold>0&&(o.allowThresholdMove=!1);let h=!0;l.matches(o.focusableElements)&&(h=!1,"SELECT"===l.nodeName&&(o.isTouched=!1)),n.activeElement&&n.activeElement.matches(o.focusableElements)&&n.activeElement!==l&&("mouse"===r.pointerType||"mouse"!==r.pointerType&&!l.matches(o.focusableElements))&&n.activeElement.blur();const v=h&&t.allowTouchMove&&i.touchStartPreventDefault;!i.touchStartForcePreventDefault&&!v||l.isContentEditable||r.preventDefault(),i.freeMode&&i.freeMode.enabled&&t.freeMode&&t.animating&&!i.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",r)}function Yr(e){const t=dr(),n=this,r=n.touchEventsData,{params:o,touches:i,rtlTranslate:a,enabled:s}=n;if(!s)return;if(!o.simulateTouch&&"mouse"===e.pointerType)return;let l,c=e;if(c.originalEvent&&(c=c.originalEvent),"pointermove"===c.type){if(null!==r.touchId)return;if(c.pointerId!==r.pointerId)return}if("touchmove"===c.type){if(l=[...c.changedTouches].filter(e=>e.identifier===r.touchId)[0],!l||l.identifier!==r.touchId)return}else l=c;if(!r.isTouched)return void(r.startMoving&&r.isScrolling&&n.emit("touchMoveOpposite",c));const d=l.pageX,u=l.pageY;if(c.preventedByNestedSwiper)return i.startX=d,void(i.startY=u);if(!n.allowTouchMove)return c.target.matches(r.focusableElements)||(n.allowClick=!1),void(r.isTouched&&(Object.assign(i,{startX:d,startY:u,currentX:d,currentY:u}),r.touchStartTime=mr()));if(o.touchReleaseOnEdges&&!o.loop)if(n.isVertical()){if(u<i.startY&&n.translate<=n.maxTranslate()||u>i.startY&&n.translate>=n.minTranslate())return r.isTouched=!1,void(r.isMoved=!1)}else if(d<i.startX&&n.translate<=n.maxTranslate()||d>i.startX&&n.translate>=n.minTranslate())return;if(t.activeElement&&t.activeElement.matches(r.focusableElements)&&t.activeElement!==c.target&&"mouse"!==c.pointerType&&t.activeElement.blur(),t.activeElement&&c.target===t.activeElement&&c.target.matches(r.focusableElements))return r.isMoved=!0,void(n.allowClick=!1);r.allowTouchCallbacks&&n.emit("touchMove",c),i.previousX=i.currentX,i.previousY=i.currentY,i.currentX=d,i.currentY=u;const p=i.currentX-i.startX,f=i.currentY-i.startY;if(n.params.threshold&&Math.sqrt(p**2+f**2)<n.params.threshold)return;if(void 0===r.isScrolling){let e;n.isHorizontal()&&i.currentY===i.startY||n.isVertical()&&i.currentX===i.startX?r.isScrolling=!1:p*p+f*f>=25&&(e=180*Math.atan2(Math.abs(f),Math.abs(p))/Math.PI,r.isScrolling=n.isHorizontal()?e>o.touchAngle:90-e>o.touchAngle)}if(r.isScrolling&&n.emit("touchMoveOpposite",c),void 0===r.startMoving&&(i.currentX===i.startX&&i.currentY===i.startY||(r.startMoving=!0)),r.isScrolling||"touchmove"===c.type&&r.preventTouchMoveFromPointerMove)return void(r.isTouched=!1);if(!r.startMoving)return;n.allowClick=!1,!o.cssMode&&c.cancelable&&c.preventDefault(),o.touchMoveStopPropagation&&!o.nested&&c.stopPropagation();let m=n.isHorizontal()?p:f,h=n.isHorizontal()?i.currentX-i.previousX:i.currentY-i.previousY;o.oneWayMovement&&(m=Math.abs(m)*(a?1:-1),h=Math.abs(h)*(a?1:-1)),i.diff=m,m*=o.touchRatio,a&&(m=-m,h=-h);const v=n.touchesDirection;n.swipeDirection=m>0?"prev":"next",n.touchesDirection=h>0?"prev":"next";const g=n.params.loop&&!o.cssMode,b="next"===n.touchesDirection&&n.allowSlideNext||"prev"===n.touchesDirection&&n.allowSlidePrev;if(!r.isMoved){if(g&&b&&n.loopFix({direction:n.swipeDirection}),r.startTranslate=n.getTranslate(),n.setTransition(0),n.animating){const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});n.wrapperEl.dispatchEvent(e)}r.allowMomentumBounce=!1,!o.grabCursor||!0!==n.allowSlideNext&&!0!==n.allowSlidePrev||n.setGrabCursor(!0),n.emit("sliderFirstMove",c)}if((new Date).getTime(),r.isMoved&&r.allowThresholdMove&&v!==n.touchesDirection&&g&&b&&Math.abs(m)>=1)return Object.assign(i,{startX:d,startY:u,currentX:d,currentY:u,startTranslate:r.currentTranslate}),r.loopSwapReset=!0,void(r.startTranslate=r.currentTranslate);n.emit("sliderMove",c),r.isMoved=!0,r.currentTranslate=m+r.startTranslate;let w=!0,y=o.resistanceRatio;if(o.touchReleaseOnEdges&&(y=0),m>0?(g&&b&&r.allowThresholdMove&&r.currentTranslate>(o.centeredSlides?n.minTranslate()-n.slidesSizesGrid[n.activeIndex+1]-("auto"!==o.slidesPerView&&n.slides.length-o.slidesPerView>=2?n.slidesSizesGrid[n.activeIndex+1]+n.params.spaceBetween:0)-n.params.spaceBetween:n.minTranslate())&&n.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),r.currentTranslate>n.minTranslate()&&(w=!1,o.resistance&&(r.currentTranslate=n.minTranslate()-1+(-n.minTranslate()+r.startTranslate+m)**y))):m<0&&(g&&b&&r.allowThresholdMove&&r.currentTranslate<(o.centeredSlides?n.maxTranslate()+n.slidesSizesGrid[n.slidesSizesGrid.length-1]+n.params.spaceBetween+("auto"!==o.slidesPerView&&n.slides.length-o.slidesPerView>=2?n.slidesSizesGrid[n.slidesSizesGrid.length-1]+n.params.spaceBetween:0):n.maxTranslate())&&n.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:n.slides.length-("auto"===o.slidesPerView?n.slidesPerViewDynamic():Math.ceil(parseFloat(o.slidesPerView,10)))}),r.currentTranslate<n.maxTranslate()&&(w=!1,o.resistance&&(r.currentTranslate=n.maxTranslate()+1-(n.maxTranslate()-r.startTranslate-m)**y))),w&&(c.preventedByNestedSwiper=!0),!n.allowSlideNext&&"next"===n.swipeDirection&&r.currentTranslate<r.startTranslate&&(r.currentTranslate=r.startTranslate),!n.allowSlidePrev&&"prev"===n.swipeDirection&&r.currentTranslate>r.startTranslate&&(r.currentTranslate=r.startTranslate),n.allowSlidePrev||n.allowSlideNext||(r.currentTranslate=r.startTranslate),o.threshold>0){if(!(Math.abs(m)>o.threshold||r.allowThresholdMove))return void(r.currentTranslate=r.startTranslate);if(!r.allowThresholdMove)return r.allowThresholdMove=!0,i.startX=i.currentX,i.startY=i.currentY,r.currentTranslate=r.startTranslate,void(i.diff=n.isHorizontal()?i.currentX-i.startX:i.currentY-i.startY)}o.followFinger&&!o.cssMode&&((o.freeMode&&o.freeMode.enabled&&n.freeMode||o.watchSlidesProgress)&&(n.updateActiveIndex(),n.updateSlidesClasses()),o.freeMode&&o.freeMode.enabled&&n.freeMode&&n.freeMode.onTouchMove(),n.updateProgress(r.currentTranslate),n.setTranslate(r.currentTranslate))}function Xr(e){const t=this,n=t.touchEventsData;let r,o=e;o.originalEvent&&(o=o.originalEvent);if("touchend"===o.type||"touchcancel"===o.type){if(r=[...o.changedTouches].filter(e=>e.identifier===n.touchId)[0],!r||r.identifier!==n.touchId)return}else{if(null!==n.touchId)return;if(o.pointerId!==n.pointerId)return;r=o}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(o.type)){if(!(["pointercancel","contextmenu"].includes(o.type)&&(t.browser.isSafari||t.browser.isWebView)))return}n.pointerId=null,n.touchId=null;const{params:i,touches:a,rtlTranslate:s,slidesGrid:l,enabled:c}=t;if(!c)return;if(!i.simulateTouch&&"mouse"===o.pointerType)return;if(n.allowTouchCallbacks&&t.emit("touchEnd",o),n.allowTouchCallbacks=!1,!n.isTouched)return n.isMoved&&i.grabCursor&&t.setGrabCursor(!1),n.isMoved=!1,void(n.startMoving=!1);i.grabCursor&&n.isMoved&&n.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);const d=mr(),u=d-n.touchStartTime;if(t.allowClick){const e=o.path||o.composedPath&&o.composedPath();t.updateClickedSlide(e&&e[0]||o.target,e),t.emit("tap click",o),u<300&&d-n.lastClickTime<300&&t.emit("doubleTap doubleClick",o)}if(n.lastClickTime=mr(),fr(()=>{t.destroyed||(t.allowClick=!0)}),!n.isTouched||!n.isMoved||!t.swipeDirection||0===a.diff&&!n.loopSwapReset||n.currentTranslate===n.startTranslate&&!n.loopSwapReset)return n.isTouched=!1,n.isMoved=!1,void(n.startMoving=!1);let p;if(n.isTouched=!1,n.isMoved=!1,n.startMoving=!1,p=i.followFinger?s?t.translate:-t.translate:-n.currentTranslate,i.cssMode)return;if(i.freeMode&&i.freeMode.enabled)return void t.freeMode.onTouchEnd({currentPos:p});const f=p>=-t.maxTranslate()&&!t.params.loop;let m=0,h=t.slidesSizesGrid[0];for(let e=0;e<l.length;e+=e<i.slidesPerGroupSkip?1:i.slidesPerGroup){const t=e<i.slidesPerGroupSkip-1?1:i.slidesPerGroup;void 0!==l[e+t]?(f||p>=l[e]&&p<l[e+t])&&(m=e,h=l[e+t]-l[e]):(f||p>=l[e])&&(m=e,h=l[l.length-1]-l[l.length-2])}let v=null,g=null;i.rewind&&(t.isBeginning?g=i.virtual&&i.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(v=0));const b=(p-l[m])/h,w=m<i.slidesPerGroupSkip-1?1:i.slidesPerGroup;if(u>i.longSwipesMs){if(!i.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(b>=i.longSwipesRatio?t.slideTo(i.rewind&&t.isEnd?v:m+w):t.slideTo(m)),"prev"===t.swipeDirection&&(b>1-i.longSwipesRatio?t.slideTo(m+w):null!==g&&b<0&&Math.abs(b)>i.longSwipesRatio?t.slideTo(g):t.slideTo(m))}else{if(!i.shortSwipes)return void t.slideTo(t.activeIndex);t.navigation&&(o.target===t.navigation.nextEl||o.target===t.navigation.prevEl)?o.target===t.navigation.nextEl?t.slideTo(m+w):t.slideTo(m):("next"===t.swipeDirection&&t.slideTo(null!==v?v:m+w),"prev"===t.swipeDirection&&t.slideTo(null!==g?g:m))}}function Kr(){const e=this,{params:t,el:n}=e;if(n&&0===n.offsetWidth)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:r,allowSlidePrev:o,snapGrid:i}=e,a=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const s=a&&t.loop;!("auto"===t.slidesPerView||t.slidesPerView>1)||!e.isEnd||e.isBeginning||e.params.centeredSlides||s?e.params.loop&&!a?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0):e.slideTo(e.slides.length-1,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout(()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()},500)),e.allowSlidePrev=o,e.allowSlideNext=r,e.params.watchOverflow&&i!==e.snapGrid&&e.checkOverflow()}function Zr(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function Jr(){const e=this,{wrapperEl:t,rtlTranslate:n,enabled:r}=e;if(!r)return;let o;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,0===e.translate&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();const i=e.maxTranslate()-e.minTranslate();o=0===i?0:(e.translate-e.minTranslate())/i,o!==e.progress&&e.updateProgress(n?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function Qr(e){const t=this;zr(t,e.target),t.params.cssMode||"auto"!==t.params.slidesPerView&&!t.params.autoHeight||t.update()}function eo(){const e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}const to=(e,t)=>{const n=dr(),{params:r,el:o,wrapperEl:i,device:a}=e,s=!!r.nested,l="on"===t?"addEventListener":"removeEventListener",c=t;o&&"string"!=typeof o&&(n[l]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:s}),o[l]("touchstart",e.onTouchStart,{passive:!1}),o[l]("pointerdown",e.onTouchStart,{passive:!1}),n[l]("touchmove",e.onTouchMove,{passive:!1,capture:s}),n[l]("pointermove",e.onTouchMove,{passive:!1,capture:s}),n[l]("touchend",e.onTouchEnd,{passive:!0}),n[l]("pointerup",e.onTouchEnd,{passive:!0}),n[l]("pointercancel",e.onTouchEnd,{passive:!0}),n[l]("touchcancel",e.onTouchEnd,{passive:!0}),n[l]("pointerout",e.onTouchEnd,{passive:!0}),n[l]("pointerleave",e.onTouchEnd,{passive:!0}),n[l]("contextmenu",e.onTouchEnd,{passive:!0}),(r.preventClicks||r.preventClicksPropagation)&&o[l]("click",e.onClick,!0),r.cssMode&&i[l]("scroll",e.onScroll),r.updateOnWindowResize?e[c](a.ios||a.android?"resize orientationchange observerUpdate":"resize observerUpdate",Kr,!0):e[c]("observerUpdate",Kr,!0),o[l]("load",e.onLoad,{capture:!0}))};const no=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;var ro={setBreakpoint:function(){const e=this,{realIndex:t,initialized:n,params:r,el:o}=e,i=r.breakpoints;if(!i||i&&0===Object.keys(i).length)return;const a=e.getBreakpoint(i,e.params.breakpointsBase,e.el);if(!a||e.currentBreakpoint===a)return;const s=(a in i?i[a]:void 0)||e.originalParams,l=no(e,r),c=no(e,s),d=e.params.grabCursor,u=s.grabCursor,p=r.enabled;l&&!c?(o.classList.remove(`${r.containerModifierClass}grid`,`${r.containerModifierClass}grid-column`),e.emitContainerClasses()):!l&&c&&(o.classList.add(`${r.containerModifierClass}grid`),(s.grid.fill&&"column"===s.grid.fill||!s.grid.fill&&"column"===r.grid.fill)&&o.classList.add(`${r.containerModifierClass}grid-column`),e.emitContainerClasses()),d&&!u?e.unsetGrabCursor():!d&&u&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach(t=>{if(void 0===s[t])return;const n=r[t]&&r[t].enabled,o=s[t]&&s[t].enabled;n&&!o&&e[t].disable(),!n&&o&&e[t].enable()});const f=s.direction&&s.direction!==r.direction,m=r.loop&&(s.slidesPerView!==r.slidesPerView||f),h=r.loop;f&&n&&e.changeDirection(),br(e.params,s);const v=e.params.enabled,g=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),p&&!v?e.disable():!p&&v&&e.enable(),e.currentBreakpoint=a,e.emit("_beforeBreakpoint",s),n&&(m?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!h&&g?(e.loopCreate(t),e.updateSlides()):h&&!g&&e.loopDestroy()),e.emit("breakpoint",s)},getBreakpoint:function(e,t,n){if(void 0===t&&(t="window"),!e||"container"===t&&!n)return;let r=!1;const o=pr(),i="window"===t?o.innerHeight:n.clientHeight,a=Object.keys(e).map(e=>{if("string"==typeof e&&0===e.indexOf("@")){const t=parseFloat(e.substr(1));return{value:i*t,point:e}}return{value:e,point:e}});a.sort((e,t)=>parseInt(e.value,10)-parseInt(t.value,10));for(let e=0;e<a.length;e+=1){const{point:i,value:s}=a[e];"window"===t?o.matchMedia(`(min-width: ${s}px)`).matches&&(r=i):s<=n.clientWidth&&(r=i)}return r||"max"}};var oo={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function io(e,t){return function(n){void 0===n&&(n={});const r=Object.keys(n)[0],o=n[r];"object"==typeof o&&null!==o?(!0===e[r]&&(e[r]={enabled:!0}),"navigation"===r&&e[r]&&e[r].enabled&&!e[r].prevEl&&!e[r].nextEl&&(e[r].auto=!0),["pagination","scrollbar"].indexOf(r)>=0&&e[r]&&e[r].enabled&&!e[r].el&&(e[r].auto=!0),r in e&&"enabled"in o?("object"!=typeof e[r]||"enabled"in e[r]||(e[r].enabled=!0),e[r]||(e[r]={enabled:!1}),br(t,n)):br(t,n)):br(t,n)}}const ao={eventsEmitter:_r,update:Br,translate:Vr,transition:{setTransition:function(e,t){const n=this;n.params.cssMode||(n.wrapperEl.style.transitionDuration=`${e}ms`,n.wrapperEl.style.transitionDelay=0===e?"0ms":""),n.emit("setTransition",e,t)},transitionStart:function(e,t){void 0===e&&(e=!0);const n=this,{params:r}=n;r.cssMode||(r.autoHeight&&n.updateAutoHeight(),Wr({swiper:n,runCallbacks:e,direction:t,step:"Start"}))},transitionEnd:function(e,t){void 0===e&&(e=!0);const n=this,{params:r}=n;n.animating=!1,r.cssMode||(n.setTransition(0),Wr({swiper:n,runCallbacks:e,direction:t,step:"End"}))}},slide:Ur,loop:Gr,grabCursor:{setGrabCursor:function(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const n="container"===t.params.touchEventsTarget?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),n.style.cursor="move",n.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame(()=>{t.__preventObserver__=!1})},unsetGrabCursor:function(){const e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e["container"===e.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame(()=>{e.__preventObserver__=!1}))}},events:{attachEvents:function(){const e=this,{params:t}=e;e.onTouchStart=qr.bind(e),e.onTouchMove=Yr.bind(e),e.onTouchEnd=Xr.bind(e),e.onDocumentTouchStart=eo.bind(e),t.cssMode&&(e.onScroll=Jr.bind(e)),e.onClick=Zr.bind(e),e.onLoad=Qr.bind(e),to(e,"on")},detachEvents:function(){to(this,"off")}},breakpoints:ro,checkOverflow:{checkOverflow:function(){const e=this,{isLocked:t,params:n}=e,{slidesOffsetBefore:r}=n;if(r){const t=e.slides.length-1,n=e.slidesGrid[t]+e.slidesSizesGrid[t]+2*r;e.isLocked=e.size>n}else e.isLocked=1===e.snapGrid.length;!0===n.allowSlideNext&&(e.allowSlideNext=!e.isLocked),!0===n.allowSlidePrev&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}},classes:{addClasses:function(){const e=this,{classNames:t,params:n,rtl:r,el:o,device:i}=e,a=function(e,t){const n=[];return e.forEach(e=>{"object"==typeof e?Object.keys(e).forEach(r=>{e[r]&&n.push(t+r)}):"string"==typeof e&&n.push(t+e)}),n}(["initialized",n.direction,{"free-mode":e.params.freeMode&&n.freeMode.enabled},{autoheight:n.autoHeight},{rtl:r},{grid:n.grid&&n.grid.rows>1},{"grid-column":n.grid&&n.grid.rows>1&&"column"===n.grid.fill},{android:i.android},{ios:i.ios},{"css-mode":n.cssMode},{centered:n.cssMode&&n.centeredSlides},{"watch-progress":n.watchSlidesProgress}],n.containerModifierClass);t.push(...a),o.classList.add(...t),e.emitContainerClasses()},removeClasses:function(){const{el:e,classNames:t}=this;e&&"string"!=typeof e&&(e.classList.remove(...t),this.emitContainerClasses())}}},so={};let lo=class e{constructor(){let t,n;for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];1===o.length&&o[0].constructor&&"Object"===Object.prototype.toString.call(o[0]).slice(8,-1)?n=o[0]:[t,n]=o,n||(n={}),n=br({},n),t&&!n.el&&(n.el=t);const a=dr();if(n.el&&"string"==typeof n.el&&a.querySelectorAll(n.el).length>1){const t=[];return a.querySelectorAll(n.el).forEach(r=>{const o=br({},n,{el:r});t.push(new e(o))}),t}const s=this;s.__swiper__=!0,s.support=Ar(),s.device=Rr({userAgent:n.userAgent}),s.browser=Lr(),s.eventsListeners={},s.eventsAnyListeners=[],s.modules=[...s.__modules__],n.modules&&Array.isArray(n.modules)&&s.modules.push(...n.modules);const l={};s.modules.forEach(e=>{e({params:n,swiper:s,extendParams:io(n,l),on:s.on.bind(s),once:s.once.bind(s),off:s.off.bind(s),emit:s.emit.bind(s)})});const c=br({},oo,l);return s.params=br({},c,so,n),s.originalParams=br({},s.params),s.passedParams=br({},n),s.params&&s.params.on&&Object.keys(s.params.on).forEach(e=>{s.on(e,s.params.on[e])}),s.params&&s.params.onAny&&s.onAny(s.params.onAny),Object.assign(s,{enabled:s.params.enabled,el:t,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===s.params.direction,isVertical:()=>"vertical"===s.params.direction,activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:s.params.allowSlideNext,allowSlidePrev:s.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:s.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:s.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),s.emit("_swiper"),s.params.init&&s.init(),s}getDirectionLabel(e){return this.isHorizontal()?e:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[e]}getSlideIndex(e){const{slidesEl:t,params:n}=this,r=Or(xr(t,`.${n.slideClass}, swiper-slide`)[0]);return Or(e)-r}getSlideIndexByData(e){return this.getSlideIndex(this.slides.filter(t=>1*t.getAttribute("data-swiper-slide-index")===e)[0])}recalcSlides(){const{slidesEl:e,params:t}=this;this.slides=xr(e,`.${t.slideClass}, swiper-slide`)}enable(){const e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))}disable(){const e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))}setProgress(e,t){const n=this;e=Math.min(Math.max(e,0),1);const r=n.minTranslate(),o=(n.maxTranslate()-r)*e+r;n.translateTo(o,void 0===t?0:t),n.updateActiveIndex(),n.updateSlidesClasses()}emitContainerClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=e.el.className.split(" ").filter(t=>0===t.indexOf("swiper")||0===t.indexOf(e.params.containerModifierClass));e.emit("_containerClasses",t.join(" "))}getSlideClasses(e){const t=this;return t.destroyed?"":e.className.split(" ").filter(e=>0===e.indexOf("swiper-slide")||0===e.indexOf(t.params.slideClass)).join(" ")}emitSlidesClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=[];e.slides.forEach(n=>{const r=e.getSlideClasses(n);t.push({slideEl:n,classNames:r}),e.emit("_slideClass",n,r)}),e.emit("_slideClasses",t)}slidesPerViewDynamic(e,t){void 0===e&&(e="current"),void 0===t&&(t=!1);const{params:n,slides:r,slidesGrid:o,slidesSizesGrid:i,size:a,activeIndex:s}=this;let l=1;if("number"==typeof n.slidesPerView)return n.slidesPerView;if(n.centeredSlides){let e,t=r[s]?Math.ceil(r[s].swiperSlideSize):0;for(let n=s+1;n<r.length;n+=1)r[n]&&!e&&(t+=Math.ceil(r[n].swiperSlideSize),l+=1,t>a&&(e=!0));for(let n=s-1;n>=0;n-=1)r[n]&&!e&&(t+=r[n].swiperSlideSize,l+=1,t>a&&(e=!0))}else if("current"===e)for(let e=s+1;e<r.length;e+=1){(t?o[e]+i[e]-o[s]<a:o[e]-o[s]<a)&&(l+=1)}else for(let e=s-1;e>=0;e-=1){o[s]-o[e]<a&&(l+=1)}return l}update(){const e=this;if(!e||e.destroyed)return;const{snapGrid:t,params:n}=e;function r(){const t=e.rtlTranslate?-1*e.translate:e.translate,n=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(n),e.updateActiveIndex(),e.updateSlidesClasses()}let o;if(n.breakpoints&&e.setBreakpoint(),[...e.el.querySelectorAll('[loading="lazy"]')].forEach(t=>{t.complete&&zr(e,t)}),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),n.freeMode&&n.freeMode.enabled&&!n.cssMode)r(),n.autoHeight&&e.updateAutoHeight();else{if(("auto"===n.slidesPerView||n.slidesPerView>1)&&e.isEnd&&!n.centeredSlides){const t=e.virtual&&n.virtual.enabled?e.virtual.slides:e.slides;o=e.slideTo(t.length-1,0,!1,!0)}else o=e.slideTo(e.activeIndex,0,!1,!0);o||r()}n.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,t){void 0===t&&(t=!0);const n=this,r=n.params.direction;return e||(e="horizontal"===r?"vertical":"horizontal"),e===r||"horizontal"!==e&&"vertical"!==e||(n.el.classList.remove(`${n.params.containerModifierClass}${r}`),n.el.classList.add(`${n.params.containerModifierClass}${e}`),n.emitContainerClasses(),n.params.direction=e,n.slides.forEach(t=>{"vertical"===e?t.style.width="":t.style.height=""}),n.emit("changeDirection"),t&&n.update()),n}changeLanguageDirection(e){const t=this;t.rtl&&"rtl"===e||!t.rtl&&"ltr"===e||(t.rtl="rtl"===e,t.rtlTranslate="horizontal"===t.params.direction&&t.rtl,t.rtl?(t.el.classList.add(`${t.params.containerModifierClass}rtl`),t.el.dir="rtl"):(t.el.classList.remove(`${t.params.containerModifierClass}rtl`),t.el.dir="ltr"),t.update())}mount(e){const t=this;if(t.mounted)return!0;let n=e||t.params.el;if("string"==typeof n&&(n=document.querySelector(n)),!n)return!1;n.swiper=t,n.parentNode&&n.parentNode.host&&n.parentNode.host.nodeName===t.params.swiperElementNodeName.toUpperCase()&&(t.isElement=!0);const r=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`;let o=(()=>{if(n&&n.shadowRoot&&n.shadowRoot.querySelector){return n.shadowRoot.querySelector(r())}return xr(n,r())[0]})();return!o&&t.params.createElements&&(o=Tr("div",t.params.wrapperClass),n.append(o),xr(n,`.${t.params.slideClass}`).forEach(e=>{o.append(e)})),Object.assign(t,{el:n,wrapperEl:o,slidesEl:t.isElement&&!n.parentNode.host.slideSlots?n.parentNode.host:o,hostEl:t.isElement?n.parentNode.host:n,mounted:!0,rtl:"rtl"===n.dir.toLowerCase()||"rtl"===Cr(n,"direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===n.dir.toLowerCase()||"rtl"===Cr(n,"direction")),wrongRTL:"-webkit-box"===Cr(o,"display")}),!0}init(e){const t=this;if(t.initialized)return t;if(!1===t.mount(e))return t;t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.loop&&t.virtual&&t.params.virtual.enabled?t.slideTo(t.params.initialSlide+t.virtual.slidesBefore,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.params.loop&&t.loopCreate(),t.attachEvents();const n=[...t.el.querySelectorAll('[loading="lazy"]')];return t.isElement&&n.push(...t.hostEl.querySelectorAll('[loading="lazy"]')),n.forEach(e=>{e.complete?zr(t,e):e.addEventListener("load",e=>{zr(t,e.target)})}),Fr(t),t.initialized=!0,Fr(t),t.emit("init"),t.emit("afterInit"),t}destroy(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);const n=this,{params:r,el:o,wrapperEl:i,slides:a}=n;return void 0===n.params||n.destroyed||(n.emit("beforeDestroy"),n.initialized=!1,n.detachEvents(),r.loop&&n.loopDestroy(),t&&(n.removeClasses(),o&&"string"!=typeof o&&o.removeAttribute("style"),i&&i.removeAttribute("style"),a&&a.length&&a.forEach(e=>{e.classList.remove(r.slideVisibleClass,r.slideFullyVisibleClass,r.slideActiveClass,r.slideNextClass,r.slidePrevClass),e.removeAttribute("style"),e.removeAttribute("data-swiper-slide-index")})),n.emit("destroy"),Object.keys(n.eventsListeners).forEach(e=>{n.off(e)}),!1!==e&&(n.el&&"string"!=typeof n.el&&(n.el.swiper=null),function(e){const t=e;Object.keys(t).forEach(e=>{try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}})}(n)),n.destroyed=!0),null}static extendDefaults(e){br(so,e)}static get extendedDefaults(){return so}static get defaults(){return oo}static installModule(t){e.prototype.__modules__||(e.prototype.__modules__=[]);const n=e.prototype.__modules__;"function"==typeof t&&n.indexOf(t)<0&&n.push(t)}static use(t){return Array.isArray(t)?(t.forEach(t=>e.installModule(t)),e):(e.installModule(t),e)}};Object.keys(ao).forEach(e=>{Object.keys(ao[e]).forEach(t=>{lo.prototype[t]=ao[e][t]})}),lo.use([function(e){let{swiper:t,on:n,emit:r}=e;const o=pr();let i=null,a=null;const s=()=>{t&&!t.destroyed&&t.initialized&&(r("beforeResize"),r("resize"))},l=()=>{t&&!t.destroyed&&t.initialized&&r("orientationchange")};n("init",()=>{t.params.resizeObserver&&void 0!==o.ResizeObserver?t&&!t.destroyed&&t.initialized&&(i=new ResizeObserver(e=>{a=o.requestAnimationFrame(()=>{const{width:n,height:r}=t;let o=n,i=r;e.forEach(e=>{let{contentBoxSize:n,contentRect:r,target:a}=e;a&&a!==t.el||(o=r?r.width:(n[0]||n).inlineSize,i=r?r.height:(n[0]||n).blockSize)}),o===n&&i===r||s()})}),i.observe(t.el)):(o.addEventListener("resize",s),o.addEventListener("orientationchange",l))}),n("destroy",()=>{a&&o.cancelAnimationFrame(a),i&&i.unobserve&&t.el&&(i.unobserve(t.el),i=null),o.removeEventListener("resize",s),o.removeEventListener("orientationchange",l)})},function(e){let{swiper:t,extendParams:n,on:r,emit:o}=e;const i=[],a=pr(),s=function(e,n){void 0===n&&(n={});const r=new(a.MutationObserver||a.WebkitMutationObserver)(e=>{if(t.__preventObserver__)return;if(1===e.length)return void o("observerUpdate",e[0]);const n=function(){o("observerUpdate",e[0])};a.requestAnimationFrame?a.requestAnimationFrame(n):a.setTimeout(n,0)});r.observe(e,{attributes:void 0===n.attributes||n.attributes,childList:t.isElement||(void 0===n.childList||n).childList,characterData:void 0===n.characterData||n.characterData}),i.push(r)};n({observer:!1,observeParents:!1,observeSlideChildren:!1}),r("init",()=>{if(t.params.observer){if(t.params.observeParents){const e=function(e){const t=[];let n=e.parentElement;for(;n;)t.push(n),n=n.parentElement;return t}(t.hostEl);for(let t=0;t<e.length;t+=1)s(e[t])}s(t.hostEl,{childList:t.params.observeSlideChildren}),s(t.wrapperEl,{attributes:!1})}}),r("destroy",()=>{i.forEach(e=>{e.disconnect()}),i.splice(0,i.length)})}]);const co=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","swiperElementNodeName","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","breakpointsBase","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopAdditionalSlides","loopAddBlankSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideFullyVisibleClass","slideNextClass","slidePrevClass","slideBlankClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function uo(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)&&!e.__swiper__}function po(e,t){const n=["__proto__","constructor","prototype"];Object.keys(t).filter(e=>n.indexOf(e)<0).forEach(n=>{void 0===e[n]?e[n]=t[n]:uo(t[n])&&uo(e[n])&&Object.keys(t[n]).length>0?t[n].__swiper__?e[n]=t[n]:po(e[n],t[n]):e[n]=t[n]})}function fo(e){return void 0===e&&(e={}),e.navigation&&void 0===e.navigation.nextEl&&void 0===e.navigation.prevEl}function mo(e){return void 0===e&&(e={}),e.pagination&&void 0===e.pagination.el}function ho(e){return void 0===e&&(e={}),e.scrollbar&&void 0===e.scrollbar.el}function vo(e){void 0===e&&(e="");const t=e.split(" ").map(e=>e.trim()).filter(e=>!!e),n=[];return t.forEach(e=>{n.indexOf(e)<0&&n.push(e)}),n.join(" ")}function go(e){return void 0===e&&(e=""),e?e.includes("swiper-wrapper")?e:`swiper-wrapper ${e}`:"swiper-wrapper"}function bo(){return bo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bo.apply(this,arguments)}function wo(e){return e.type&&e.type.displayName&&e.type.displayName.includes("SwiperSlide")}function yo(e){const n=[];return t.Children.toArray(e).forEach(e=>{wo(e)?n.push(e):e.props&&e.props.children&&yo(e.props.children).forEach(e=>n.push(e))}),n}function Eo(e){const n=[],r={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return t.Children.toArray(e).forEach(e=>{if(wo(e))n.push(e);else if(e.props&&e.props.slot&&r[e.props.slot])r[e.props.slot].push(e);else if(e.props&&e.props.children){const t=yo(e.props.children);t.length>0?t.forEach(e=>n.push(e)):r["container-end"].push(e)}else r["container-end"].push(e)}),{slides:n,slots:r}}function xo(e,t){return"undefined"==typeof window?r(e,t):s(e,t)}const So=l(null),To=l(null),Co=o(function(e,o){let{className:i,tag:s="div",wrapperTag:l="div",children:c,onSwiper:d,...u}=void 0===e?{}:e,p=!1;const[f,m]=a("swiper"),[h,v]=a(null),[g,b]=a(!1),w=n(!1),y=n(null),E=n(null),x=n(null),S=n(null),T=n(null),C=n(null),O=n(null),k=n(null),{params:P,passedParams:N,rest:I,events:M}=function(e,t){void 0===e&&(e={}),void 0===t&&(t=!0);const n={on:{}},r={},o={};po(n,oo),n._emitClasses=!0,n.init=!1;const i={},a=co.map(e=>e.replace(/_/,"")),s=Object.assign({},e);return Object.keys(s).forEach(s=>{void 0!==e[s]&&(a.indexOf(s)>=0?uo(e[s])?(n[s]={},o[s]={},po(n[s],e[s]),po(o[s],e[s])):(n[s]=e[s],o[s]=e[s]):0===s.search(/on[A-Z]/)&&"function"==typeof e[s]?t?r[`${s[2].toLowerCase()}${s.substr(3)}`]=e[s]:n.on[`${s[2].toLowerCase()}${s.substr(3)}`]=e[s]:i[s]=e[s])}),["navigation","pagination","scrollbar"].forEach(e=>{!0===n[e]&&(n[e]={}),!1===n[e]&&delete n[e]}),{params:n,passedParams:o,rest:i,events:r}}(u),{slides:A,slots:R}=Eo(c),L=()=>{b(!g)};Object.assign(P.on,{_containerClasses(e,t){m(t)}});const _=()=>{Object.assign(P.on,M),p=!0;const e={...P};if(delete e.wrapperClass,E.current=new lo(e),E.current.virtual&&E.current.params.virtual.enabled){E.current.virtual.slides=A;const e={cache:!1,slides:A,renderExternal:v,renderExternalUpdate:!1};po(E.current.params.virtual,e),po(E.current.originalParams.virtual,e)}};y.current||_(),E.current&&E.current.on("_beforeBreakpoint",L);return r(()=>()=>{E.current&&E.current.off("_beforeBreakpoint",L)}),r(()=>{!w.current&&E.current&&(E.current.emitSlidesClasses(),w.current=!0)}),xo(()=>{if(o&&(o.current=y.current),y.current)return E.current.destroyed&&_(),function(e,t){let{el:n,nextEl:r,prevEl:o,paginationEl:i,scrollbarEl:a,swiper:s}=e;fo(t)&&r&&o&&(s.params.navigation.nextEl=r,s.originalParams.navigation.nextEl=r,s.params.navigation.prevEl=o,s.originalParams.navigation.prevEl=o),mo(t)&&i&&(s.params.pagination.el=i,s.originalParams.pagination.el=i),ho(t)&&a&&(s.params.scrollbar.el=a,s.originalParams.scrollbar.el=a),s.init(n)}({el:y.current,nextEl:T.current,prevEl:C.current,paginationEl:O.current,scrollbarEl:k.current,swiper:E.current},P),d&&!E.current.destroyed&&d(E.current),()=>{E.current&&!E.current.destroyed&&E.current.destroy(!0,!1)}},[]),xo(()=>{!p&&M&&E.current&&Object.keys(M).forEach(e=>{E.current.on(e,M[e])});const e=function(e,t,n,r,o){const i=[];if(!t)return i;const a=e=>{i.indexOf(e)<0&&i.push(e)};if(n&&r){const e=r.map(o),t=n.map(o);e.join("")!==t.join("")&&a("children"),r.length!==n.length&&a("children")}return co.filter(e=>"_"===e[0]).map(e=>e.replace(/_/,"")).forEach(n=>{if(n in e&&n in t)if(uo(e[n])&&uo(t[n])){const r=Object.keys(e[n]),o=Object.keys(t[n]);r.length!==o.length?a(n):(r.forEach(r=>{e[n][r]!==t[n][r]&&a(n)}),o.forEach(r=>{e[n][r]!==t[n][r]&&a(n)}))}else e[n]!==t[n]&&a(n)}),i}(N,x.current,A,S.current,e=>e.key);return x.current=N,S.current=A,e.length&&E.current&&!E.current.destroyed&&function(e){let{swiper:t,slides:n,passedParams:r,changedParams:o,nextEl:i,prevEl:a,scrollbarEl:s,paginationEl:l}=e;const c=o.filter(e=>"children"!==e&&"direction"!==e&&"wrapperClass"!==e),{params:d,pagination:u,navigation:p,scrollbar:f,virtual:m,thumbs:h}=t;let v,g,b,w,y,E,x,S;o.includes("thumbs")&&r.thumbs&&r.thumbs.swiper&&!r.thumbs.swiper.destroyed&&d.thumbs&&(!d.thumbs.swiper||d.thumbs.swiper.destroyed)&&(v=!0),o.includes("controller")&&r.controller&&r.controller.control&&d.controller&&!d.controller.control&&(g=!0),o.includes("pagination")&&r.pagination&&(r.pagination.el||l)&&(d.pagination||!1===d.pagination)&&u&&!u.el&&(b=!0),o.includes("scrollbar")&&r.scrollbar&&(r.scrollbar.el||s)&&(d.scrollbar||!1===d.scrollbar)&&f&&!f.el&&(w=!0),o.includes("navigation")&&r.navigation&&(r.navigation.prevEl||a)&&(r.navigation.nextEl||i)&&(d.navigation||!1===d.navigation)&&p&&!p.prevEl&&!p.nextEl&&(y=!0);const T=e=>{t[e]&&(t[e].destroy(),"navigation"===e?(t.isElement&&(t[e].prevEl.remove(),t[e].nextEl.remove()),d[e].prevEl=void 0,d[e].nextEl=void 0,t[e].prevEl=void 0,t[e].nextEl=void 0):(t.isElement&&t[e].el.remove(),d[e].el=void 0,t[e].el=void 0))};o.includes("loop")&&t.isElement&&(d.loop&&!r.loop?E=!0:!d.loop&&r.loop?x=!0:S=!0),c.forEach(e=>{if(uo(d[e])&&uo(r[e]))Object.assign(d[e],r[e]),"navigation"!==e&&"pagination"!==e&&"scrollbar"!==e||!("enabled"in r[e])||r[e].enabled||T(e);else{const t=r[e];!0!==t&&!1!==t||"navigation"!==e&&"pagination"!==e&&"scrollbar"!==e?d[e]=r[e]:!1===t&&T(e)}}),c.includes("controller")&&!g&&t.controller&&t.controller.control&&d.controller&&d.controller.control&&(t.controller.control=d.controller.control),o.includes("children")&&n&&m&&d.virtual.enabled?(m.slides=n,m.update(!0)):o.includes("virtual")&&m&&d.virtual.enabled&&(n&&(m.slides=n),m.update(!0)),o.includes("children")&&n&&d.loop&&(S=!0),v&&h.init()&&h.update(!0);g&&(t.controller.control=d.controller.control),b&&(!t.isElement||l&&"string"!=typeof l||(l=document.createElement("div"),l.classList.add("swiper-pagination"),l.part.add("pagination"),t.el.appendChild(l)),l&&(d.pagination.el=l),u.init(),u.render(),u.update()),w&&(!t.isElement||s&&"string"!=typeof s||(s=document.createElement("div"),s.classList.add("swiper-scrollbar"),s.part.add("scrollbar"),t.el.appendChild(s)),s&&(d.scrollbar.el=s),f.init(),f.updateSize(),f.setTranslate()),y&&(t.isElement&&(i&&"string"!=typeof i||(i=document.createElement("div"),i.classList.add("swiper-button-next"),i.innerHTML=t.hostEl.constructor.nextButtonSvg,i.part.add("button-next"),t.el.appendChild(i)),a&&"string"!=typeof a||(a=document.createElement("div"),a.classList.add("swiper-button-prev"),a.innerHTML=t.hostEl.constructor.prevButtonSvg,a.part.add("button-prev"),t.el.appendChild(a))),i&&(d.navigation.nextEl=i),a&&(d.navigation.prevEl=a),p.init(),p.update()),o.includes("allowSlideNext")&&(t.allowSlideNext=r.allowSlideNext),o.includes("allowSlidePrev")&&(t.allowSlidePrev=r.allowSlidePrev),o.includes("direction")&&t.changeDirection(r.direction,!1),(E||S)&&t.loopDestroy(),(x||S)&&t.loopCreate(),t.update()}({swiper:E.current,slides:A,passedParams:N,changedParams:e,nextEl:T.current,prevEl:C.current,scrollbarEl:k.current,paginationEl:O.current}),()=>{M&&E.current&&Object.keys(M).forEach(e=>{E.current.off(e,M[e])})}}),xo(()=>{var e;!(e=E.current)||e.destroyed||!e.params.virtual||e.params.virtual&&!e.params.virtual.enabled||(e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.parallax&&e.params.parallax&&e.params.parallax.enabled&&e.parallax.setTranslate())},[h]),t.createElement(s,bo({ref:y,className:vo(`${f}${i?` ${i}`:""}`)},I),t.createElement(To.Provider,{value:E.current},R["container-start"],t.createElement(l,{className:go(P.wrapperClass)},R["wrapper-start"],P.virtual?function(e,n,r){if(!r)return null;const o=e=>{let t=e;return e<0?t=n.length+e:t>=n.length&&(t-=n.length),t},i=e.isHorizontal()?{[e.rtlTranslate?"right":"left"]:`${r.offset}px`}:{top:`${r.offset}px`},{from:a,to:s}=r,l=e.params.loop?-n.length:0,c=e.params.loop?2*n.length:n.length,d=[];for(let e=l;e<c;e+=1)e>=a&&e<=s&&d.push(n[o(e)]);return d.map((n,r)=>t.cloneElement(n,{swiper:e,style:i,key:n.props.virtualIndex||n.key||`slide-${r}`}))}(E.current,A,h):A.map((e,n)=>t.cloneElement(e,{swiper:E.current,swiperSlideIndex:n})),R["wrapper-end"]),fo(P)&&t.createElement(t.Fragment,null,t.createElement("div",{ref:C,className:"swiper-button-prev"}),t.createElement("div",{ref:T,className:"swiper-button-next"})),ho(P)&&t.createElement("div",{ref:k,className:"swiper-scrollbar"}),mo(P)&&t.createElement("div",{ref:O,className:"swiper-pagination"}),R["container-end"]))});Co.displayName="Swiper";const Oo=o(function(e,r){let{tag:o="div",children:i,className:s="",swiper:l,zoom:c,lazy:d,virtualIndex:u,swiperSlideIndex:p,...f}=void 0===e?{}:e;const m=n(null),[h,v]=a("swiper-slide"),[g,b]=a(!1);function w(e,t,n){t===m.current&&v(n)}xo(()=>{if(void 0!==p&&(m.current.swiperSlideIndex=p),r&&(r.current=m.current),m.current&&l){if(!l.destroyed)return l.on("_slideClass",w),()=>{l&&l.off("_slideClass",w)};"swiper-slide"!==h&&v("swiper-slide")}}),xo(()=>{l&&m.current&&!l.destroyed&&v(l.getSlideClasses(m.current))},[l]);const y={isActive:h.indexOf("swiper-slide-active")>=0,isVisible:h.indexOf("swiper-slide-visible")>=0,isPrev:h.indexOf("swiper-slide-prev")>=0,isNext:h.indexOf("swiper-slide-next")>=0},E=()=>"function"==typeof i?i(y):i;return t.createElement(o,bo({ref:m,className:vo(`${h}${s?` ${s}`:""}`),"data-swiper-slide-index":u,onLoad:()=>{b(!0)}},f),c&&t.createElement(So.Provider,{value:y},t.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":"number"==typeof c?c:void 0},E(),d&&!g&&t.createElement("div",{className:"swiper-lazy-preloader"}))),!c&&t.createElement(So.Provider,{value:y},E(),d&&!g&&t.createElement("div",{className:"swiper-lazy-preloader"})))});function ko(e){let{swiper:t,extendParams:n,on:r,emit:o}=e;const i=pr();let a;n({mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarget:"container",thresholdDelta:null,thresholdTime:null,noMousewheelClass:"swiper-no-mousewheel"}}),t.mousewheel={enabled:!1};let s,l=mr();const c=[];function d(){t.enabled&&(t.mouseEntered=!0)}function u(){t.enabled&&(t.mouseEntered=!1)}function p(e){return!(t.params.mousewheel.thresholdDelta&&e.delta<t.params.mousewheel.thresholdDelta)&&(!(t.params.mousewheel.thresholdTime&&mr()-l<t.params.mousewheel.thresholdTime)&&(e.delta>=6&&mr()-l<60||(e.direction<0?t.isEnd&&!t.params.loop||t.animating||(t.slideNext(),o("scroll",e.raw)):t.isBeginning&&!t.params.loop||t.animating||(t.slidePrev(),o("scroll",e.raw)),l=(new i.Date).getTime(),!1)))}function f(e){let n=e,r=!0;if(!t.enabled)return;if(e.target.closest(`.${t.params.mousewheel.noMousewheelClass}`))return;const i=t.params.mousewheel;t.params.cssMode&&n.preventDefault();let l=t.el;"container"!==t.params.mousewheel.eventsTarget&&(l=document.querySelector(t.params.mousewheel.eventsTarget));const d=l&&l.contains(n.target);if(!t.mouseEntered&&!d&&!i.releaseOnEdges)return!0;n.originalEvent&&(n=n.originalEvent);let u=0;const f=t.rtlTranslate?-1:1,m=function(e){let t=0,n=0,r=0,o=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=10*t,o=10*n,"deltaY"in e&&(o=e.deltaY),"deltaX"in e&&(r=e.deltaX),e.shiftKey&&!r&&(r=o,o=0),(r||o)&&e.deltaMode&&(1===e.deltaMode?(r*=40,o*=40):(r*=800,o*=800)),r&&!t&&(t=r<1?-1:1),o&&!n&&(n=o<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:o}}(n);if(i.forceToAxis)if(t.isHorizontal()){if(!(Math.abs(m.pixelX)>Math.abs(m.pixelY)))return!0;u=-m.pixelX*f}else{if(!(Math.abs(m.pixelY)>Math.abs(m.pixelX)))return!0;u=-m.pixelY}else u=Math.abs(m.pixelX)>Math.abs(m.pixelY)?-m.pixelX*f:-m.pixelY;if(0===u)return!0;i.invert&&(u=-u);let h=t.getTranslate()+u*i.sensitivity;if(h>=t.minTranslate()&&(h=t.minTranslate()),h<=t.maxTranslate()&&(h=t.maxTranslate()),r=!!t.params.loop||!(h===t.minTranslate()||h===t.maxTranslate()),r&&t.params.nested&&n.stopPropagation(),t.params.freeMode&&t.params.freeMode.enabled){const e={time:mr(),delta:Math.abs(u),direction:Math.sign(u)},r=s&&e.time<s.time+500&&e.delta<=s.delta&&e.direction===s.direction;if(!r){s=void 0;let l=t.getTranslate()+u*i.sensitivity;const d=t.isBeginning,p=t.isEnd;if(l>=t.minTranslate()&&(l=t.minTranslate()),l<=t.maxTranslate()&&(l=t.maxTranslate()),t.setTransition(0),t.setTranslate(l),t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses(),(!d&&t.isBeginning||!p&&t.isEnd)&&t.updateSlidesClasses(),t.params.loop&&t.loopFix({direction:e.direction<0?"next":"prev",byMousewheel:!0}),t.params.freeMode.sticky){clearTimeout(a),a=void 0,c.length>=15&&c.shift();const n=c.length?c[c.length-1]:void 0,r=c[0];if(c.push(e),n&&(e.delta>n.delta||e.direction!==n.direction))c.splice(0);else if(c.length>=15&&e.time-r.time<500&&r.delta-e.delta>=1&&e.delta<=6){const n=u>0?.8:.2;s=e,c.splice(0),a=fr(()=>{!t.destroyed&&t.params&&t.slideToClosest(t.params.speed,!0,void 0,n)},0)}a||(a=fr(()=>{if(t.destroyed||!t.params)return;s=e,c.splice(0),t.slideToClosest(t.params.speed,!0,void 0,.5)},500))}if(r||o("scroll",n),t.params.autoplay&&t.params.autoplayDisableOnInteraction&&t.autoplay.stop(),i.releaseOnEdges&&(l===t.minTranslate()||l===t.maxTranslate()))return!0}}else{const n={time:mr(),delta:Math.abs(u),direction:Math.sign(u),raw:e};c.length>=2&&c.shift();const r=c.length?c[c.length-1]:void 0;if(c.push(n),r?(n.direction!==r.direction||n.delta>r.delta||n.time>r.time+150)&&p(n):p(n),function(e){const n=t.params.mousewheel;if(e.direction<0){if(t.isEnd&&!t.params.loop&&n.releaseOnEdges)return!0}else if(t.isBeginning&&!t.params.loop&&n.releaseOnEdges)return!0;return!1}(n))return!0}return n.preventDefault?n.preventDefault():n.returnValue=!1,!1}function m(e){let n=t.el;"container"!==t.params.mousewheel.eventsTarget&&(n=document.querySelector(t.params.mousewheel.eventsTarget)),n[e]("mouseenter",d),n[e]("mouseleave",u),n[e]("wheel",f)}function h(){return t.params.cssMode?(t.wrapperEl.removeEventListener("wheel",f),!0):!t.mousewheel.enabled&&(m("addEventListener"),t.mousewheel.enabled=!0,!0)}function v(){return t.params.cssMode?(t.wrapperEl.addEventListener(event,f),!0):!!t.mousewheel.enabled&&(m("removeEventListener"),t.mousewheel.enabled=!1,!0)}r("init",()=>{!t.params.mousewheel.enabled&&t.params.cssMode&&v(),t.params.mousewheel.enabled&&h()}),r("destroy",()=>{t.params.cssMode&&h(),t.mousewheel.enabled&&v()}),Object.assign(t.mousewheel,{enable:h,disable:v})}function Po(e){let{swiper:t,extendParams:n,on:r,emit:o}=e;function i(e){let n;return e&&"string"==typeof e&&t.isElement&&(n=t.el.querySelector(e)||t.hostEl.querySelector(e),n)?n:(e&&("string"==typeof e&&(n=[...document.querySelectorAll(e)]),t.params.uniqueNavElements&&"string"==typeof e&&n&&n.length>1&&1===t.el.querySelectorAll(e).length?n=t.el.querySelector(e):n&&1===n.length&&(n=n[0])),e&&!n?e:n)}function a(e,n){const r=t.params.navigation;(e=Pr(e)).forEach(e=>{e&&(e.classList[n?"add":"remove"](...r.disabledClass.split(" ")),"BUTTON"===e.tagName&&(e.disabled=n),t.params.watchOverflow&&t.enabled&&e.classList[t.isLocked?"add":"remove"](r.lockClass))})}function s(){const{nextEl:e,prevEl:n}=t.navigation;if(t.params.loop)return a(n,!1),void a(e,!1);a(n,t.isBeginning&&!t.params.rewind),a(e,t.isEnd&&!t.params.rewind)}function l(e){e.preventDefault(),(!t.isBeginning||t.params.loop||t.params.rewind)&&(t.slidePrev(),o("navigationPrev"))}function c(e){e.preventDefault(),(!t.isEnd||t.params.loop||t.params.rewind)&&(t.slideNext(),o("navigationNext"))}function d(){const e=t.params.navigation;if(t.params.navigation=function(e,t,n,r){return e.params.createElements&&Object.keys(r).forEach(o=>{if(!n[o]&&!0===n.auto){let i=xr(e.el,`.${r[o]}`)[0];i||(i=Tr("div",r[o]),i.className=r[o],e.el.append(i)),n[o]=i,t[o]=i}}),n}(t,t.originalParams.navigation,t.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!e.nextEl&&!e.prevEl)return;let n=i(e.nextEl),r=i(e.prevEl);Object.assign(t.navigation,{nextEl:n,prevEl:r}),n=Pr(n),r=Pr(r);const o=(n,r)=>{n&&n.addEventListener("click","next"===r?c:l),!t.enabled&&n&&n.classList.add(...e.lockClass.split(" "))};n.forEach(e=>o(e,"next")),r.forEach(e=>o(e,"prev"))}function u(){let{nextEl:e,prevEl:n}=t.navigation;e=Pr(e),n=Pr(n);const r=(e,n)=>{e.removeEventListener("click","next"===n?c:l),e.classList.remove(...t.params.navigation.disabledClass.split(" "))};e.forEach(e=>r(e,"next")),n.forEach(e=>r(e,"prev"))}n({navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),t.navigation={nextEl:null,prevEl:null},r("init",()=>{!1===t.params.navigation.enabled?p():(d(),s())}),r("toEdge fromEdge lock unlock",()=>{s()}),r("destroy",()=>{u()}),r("enable disable",()=>{let{nextEl:e,prevEl:n}=t.navigation;e=Pr(e),n=Pr(n),t.enabled?s():[...e,...n].filter(e=>!!e).forEach(e=>e.classList.add(t.params.navigation.lockClass))}),r("click",(e,n)=>{let{nextEl:r,prevEl:i}=t.navigation;r=Pr(r),i=Pr(i);const a=n.target;let s=i.includes(a)||r.includes(a);if(t.isElement&&!s){const e=n.path||n.composedPath&&n.composedPath();e&&(s=e.find(e=>r.includes(e)||i.includes(e)))}if(t.params.navigation.hideOnClick&&!s){if(t.pagination&&t.params.pagination&&t.params.pagination.clickable&&(t.pagination.el===a||t.pagination.el.contains(a)))return;let e;r.length?e=r[0].classList.contains(t.params.navigation.hiddenClass):i.length&&(e=i[0].classList.contains(t.params.navigation.hiddenClass)),o(!0===e?"navigationShow":"navigationHide"),[...r,...i].filter(e=>!!e).forEach(e=>e.classList.toggle(t.params.navigation.hiddenClass))}});const p=()=>{t.el.classList.add(...t.params.navigation.navigationDisabledClass.split(" ")),u()};Object.assign(t.navigation,{enable:()=>{t.el.classList.remove(...t.params.navigation.navigationDisabledClass.split(" ")),d(),s()},disable:p,update:s,init:d,destroy:u})}function No(e){let t,n,{swiper:r,extendParams:o,on:i,emit:a,params:s}=e;r.autoplay={running:!1,paused:!1,timeLeft:0},o({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!1,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let l,c,d,u,p,f,m,h,v=s&&s.autoplay?s.autoplay.delay:3e3,g=s&&s.autoplay?s.autoplay.delay:3e3,b=(new Date).getTime();function w(e){r&&!r.destroyed&&r.wrapperEl&&e.target===r.wrapperEl&&(r.wrapperEl.removeEventListener("transitionend",w),h||e.detail&&e.detail.bySwiperTouchMove||C())}const y=()=>{if(r.destroyed||!r.autoplay.running)return;r.autoplay.paused?c=!0:c&&(g=l,c=!1);const e=r.autoplay.paused?l:b+g-(new Date).getTime();r.autoplay.timeLeft=e,a("autoplayTimeLeft",e,e/v),n=requestAnimationFrame(()=>{y()})},E=e=>{if(r.destroyed||!r.autoplay.running)return;cancelAnimationFrame(n),y();let o=void 0===e?r.params.autoplay.delay:e;v=r.params.autoplay.delay,g=r.params.autoplay.delay;const i=(()=>{let e;if(e=r.virtual&&r.params.virtual.enabled?r.slides.filter(e=>e.classList.contains("swiper-slide-active"))[0]:r.slides[r.activeIndex],!e)return;return parseInt(e.getAttribute("data-swiper-autoplay"),10)})();!Number.isNaN(i)&&i>0&&void 0===e&&(o=i,v=i,g=i),l=o;const s=r.params.speed,c=()=>{r&&!r.destroyed&&(r.params.autoplay.reverseDirection?!r.isBeginning||r.params.loop||r.params.rewind?(r.slidePrev(s,!0,!0),a("autoplay")):r.params.autoplay.stopOnLastSlide||(r.slideTo(r.slides.length-1,s,!0,!0),a("autoplay")):!r.isEnd||r.params.loop||r.params.rewind?(r.slideNext(s,!0,!0),a("autoplay")):r.params.autoplay.stopOnLastSlide||(r.slideTo(0,s,!0,!0),a("autoplay")),r.params.cssMode&&(b=(new Date).getTime(),requestAnimationFrame(()=>{E()})))};return o>0?(clearTimeout(t),t=setTimeout(()=>{c()},o)):requestAnimationFrame(()=>{c()}),o},x=()=>{b=(new Date).getTime(),r.autoplay.running=!0,E(),a("autoplayStart")},S=()=>{r.autoplay.running=!1,clearTimeout(t),cancelAnimationFrame(n),a("autoplayStop")},T=(e,n)=>{if(r.destroyed||!r.autoplay.running)return;clearTimeout(t),e||(m=!0);const o=()=>{a("autoplayPause"),r.params.autoplay.waitForTransition?r.wrapperEl.addEventListener("transitionend",w):C()};if(r.autoplay.paused=!0,n)return f&&(l=r.params.autoplay.delay),f=!1,void o();const i=l||r.params.autoplay.delay;l=i-((new Date).getTime()-b),r.isEnd&&l<0&&!r.params.loop||(l<0&&(l=0),o())},C=()=>{r.isEnd&&l<0&&!r.params.loop||r.destroyed||!r.autoplay.running||(b=(new Date).getTime(),m?(m=!1,E(l)):E(),r.autoplay.paused=!1,a("autoplayResume"))},O=()=>{if(r.destroyed||!r.autoplay.running)return;const e=dr();"hidden"===e.visibilityState&&(m=!0,T(!0)),"visible"===e.visibilityState&&C()},k=e=>{"mouse"===e.pointerType&&(m=!0,h=!0,r.animating||r.autoplay.paused||T(!0))},P=e=>{"mouse"===e.pointerType&&(h=!1,r.autoplay.paused&&C())};i("init",()=>{r.params.autoplay.enabled&&(r.params.autoplay.pauseOnMouseEnter&&(r.el.addEventListener("pointerenter",k),r.el.addEventListener("pointerleave",P)),dr().addEventListener("visibilitychange",O),x())}),i("destroy",()=>{r.el&&"string"!=typeof r.el&&(r.el.removeEventListener("pointerenter",k),r.el.removeEventListener("pointerleave",P)),dr().removeEventListener("visibilitychange",O),r.autoplay.running&&S()}),i("_freeModeStaticRelease",()=>{(u||m)&&C()}),i("_freeModeNoMomentumRelease",()=>{r.params.autoplay.disableOnInteraction?S():T(!0,!0)}),i("beforeTransitionStart",(e,t,n)=>{!r.destroyed&&r.autoplay.running&&(n||!r.params.autoplay.disableOnInteraction?T(!0,!0):S())}),i("sliderFirstMove",()=>{!r.destroyed&&r.autoplay.running&&(r.params.autoplay.disableOnInteraction?S():(d=!0,u=!1,m=!1,p=setTimeout(()=>{m=!0,u=!0,T(!0)},200)))}),i("touchEnd",()=>{if(!r.destroyed&&r.autoplay.running&&d){if(clearTimeout(p),clearTimeout(t),r.params.autoplay.disableOnInteraction)return u=!1,void(d=!1);u&&r.params.cssMode&&C(),u=!1,d=!1}}),i("slideChange",()=>{!r.destroyed&&r.autoplay.running&&(f=!0)}),Object.assign(r.autoplay,{start:x,stop:S,pause:T,resume:C})}function Io(e){let t,n,r,o,{swiper:i,extendParams:a,on:s}=e;a({grid:{rows:1,fill:"column"}});const l=()=>{let e=i.params.spaceBetween;return"string"==typeof e&&e.indexOf("%")>=0?e=parseFloat(e.replace("%",""))/100*i.size:"string"==typeof e&&(e=parseFloat(e)),e};s("init",()=>{o=i.params.grid&&i.params.grid.rows>1}),s("update",()=>{const{params:e,el:t}=i,n=e.grid&&e.grid.rows>1;o&&!n?(t.classList.remove(`${e.containerModifierClass}grid`,`${e.containerModifierClass}grid-column`),r=1,i.emitContainerClasses()):!o&&n&&(t.classList.add(`${e.containerModifierClass}grid`),"column"===e.grid.fill&&t.classList.add(`${e.containerModifierClass}grid-column`),i.emitContainerClasses()),o=n}),i.grid={initSlides:e=>{const{slidesPerView:o}=i.params,{rows:a,fill:s}=i.params.grid,l=i.virtual&&i.params.virtual.enabled?i.virtual.slides.length:e.length;r=Math.floor(l/a),t=Math.floor(l/a)===l/a?l:Math.ceil(l/a)*a,"auto"!==o&&"row"===s&&(t=Math.max(t,o*a)),n=t/a},unsetSlides:()=>{i.slides&&i.slides.forEach(e=>{e.swiperSlideGridSet&&(e.style.height="",e.style[i.getDirectionLabel("margin-top")]="")})},updateSlide:(e,o,a)=>{const{slidesPerGroup:s}=i.params,c=l(),{rows:d,fill:u}=i.params.grid,p=i.virtual&&i.params.virtual.enabled?i.virtual.slides.length:a.length;let f,m,h;if("row"===u&&s>1){const n=Math.floor(e/(s*d)),r=e-d*s*n,i=0===n?s:Math.min(Math.ceil((p-n*d*s)/d),s);h=Math.floor(r/i),m=r-h*i+n*s,f=m+h*t/d,o.style.order=f}else"column"===u?(m=Math.floor(e/d),h=e-m*d,(m>r||m===r&&h===d-1)&&(h+=1,h>=d&&(h=0,m+=1))):(h=Math.floor(e/n),m=e-h*n);o.row=h,o.column=m,o.style.height=`calc((100% - ${(d-1)*c}px) / ${d})`,o.style[i.getDirectionLabel("margin-top")]=0!==h?c&&`${c}px`:"",o.swiperSlideGridSet=!0},updateWrapperSize:(e,n)=>{const{centeredSlides:r,roundLengths:o}=i.params,a=l(),{rows:s}=i.params.grid;if(i.virtualSize=(e+a)*t,i.virtualSize=Math.ceil(i.virtualSize/s)-a,i.params.cssMode||(i.wrapperEl.style[i.getDirectionLabel("width")]=`${i.virtualSize+a}px`),r){const e=[];for(let t=0;t<n.length;t+=1){let r=n[t];o&&(r=Math.floor(r)),n[t]<i.virtualSize+n[0]&&e.push(r)}n.splice(0,n.length),n.push(...e)}}}}function Mo(e){const t=this,{params:n,slidesEl:r}=t;n.loop&&t.loopDestroy();const o=e=>{if("string"==typeof e){const t=document.createElement("div");t.innerHTML=e,r.append(t.children[0]),t.innerHTML=""}else r.append(e)};if("object"==typeof e&&"length"in e)for(let t=0;t<e.length;t+=1)e[t]&&o(e[t]);else o(e);t.recalcSlides(),n.loop&&t.loopCreate(),n.observer&&!t.isElement||t.update()}function Ao(e){const t=this,{params:n,activeIndex:r,slidesEl:o}=t;n.loop&&t.loopDestroy();let i=r+1;const a=e=>{if("string"==typeof e){const t=document.createElement("div");t.innerHTML=e,o.prepend(t.children[0]),t.innerHTML=""}else o.prepend(e)};if("object"==typeof e&&"length"in e){for(let t=0;t<e.length;t+=1)e[t]&&a(e[t]);i=r+e.length}else a(e);t.recalcSlides(),n.loop&&t.loopCreate(),n.observer&&!t.isElement||t.update(),t.slideTo(i,0,!1)}function Ro(e,t){const n=this,{params:r,activeIndex:o,slidesEl:i}=n;let a=o;r.loop&&(a-=n.loopedSlides,n.loopDestroy(),n.recalcSlides());const s=n.slides.length;if(e<=0)return void n.prependSlide(t);if(e>=s)return void n.appendSlide(t);let l=a>e?a+1:a;const c=[];for(let t=s-1;t>=e;t-=1){const e=n.slides[t];e.remove(),c.unshift(e)}if("object"==typeof t&&"length"in t){for(let e=0;e<t.length;e+=1)t[e]&&i.append(t[e]);l=a>e?a+t.length:a}else i.append(t);for(let e=0;e<c.length;e+=1)i.append(c[e]);n.recalcSlides(),r.loop&&n.loopCreate(),r.observer&&!n.isElement||n.update(),r.loop?n.slideTo(l+n.loopedSlides,0,!1):n.slideTo(l,0,!1)}function Lo(e){const t=this,{params:n,activeIndex:r}=t;let o=r;n.loop&&(o-=t.loopedSlides,t.loopDestroy());let i,a=o;if("object"==typeof e&&"length"in e){for(let n=0;n<e.length;n+=1)i=e[n],t.slides[i]&&t.slides[i].remove(),i<a&&(a-=1);a=Math.max(a,0)}else i=e,t.slides[i]&&t.slides[i].remove(),i<a&&(a-=1),a=Math.max(a,0);t.recalcSlides(),n.loop&&t.loopCreate(),n.observer&&!t.isElement||t.update(),n.loop?t.slideTo(a+t.loopedSlides,0,!1):t.slideTo(a,0,!1)}function _o(){const e=this,t=[];for(let n=0;n<e.slides.length;n+=1)t.push(n);e.removeSlide(t)}function Do(e){let{swiper:t}=e;Object.assign(t,{appendSlide:Mo.bind(t),prependSlide:Ao.bind(t),addSlide:Ro.bind(t),removeSlide:Lo.bind(t),removeAllSlides:_o.bind(t)})}function jo(e,t){const n=Er(t);return n!==t&&(n.style.backfaceVisibility="hidden",n.style["-webkit-backface-visibility"]="hidden"),n}function zo(e){let{swiper:t,duration:n,transformElements:r,allSlides:o}=e;const{activeIndex:i}=t;if(t.params.virtualTranslate&&0!==n){let e,n=!1;e=o?r:r.filter(e=>{const n=e.classList.contains("swiper-slide-transform")?(e=>{if(!e.parentElement)return t.slides.filter(t=>t.shadowRoot&&t.shadowRoot===e.parentNode)[0];return e.parentElement})(e):e;return t.getSlideIndex(n)===i}),e.forEach(e=>{!function(e,t){t&&e.addEventListener("transitionend",function n(r){r.target===e&&(t.call(e,r),e.removeEventListener("transitionend",n))})}(e,()=>{if(n)return;if(!t||t.destroyed)return;n=!0,t.animating=!1;const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});t.wrapperEl.dispatchEvent(e)})})}}function $o(e,t,n){const r=`swiper-slide-shadow swiper-slide-shadow-${e}`,o=Er(t);let i=o.querySelector(`.${r.split(" ").join(".")}`);return i||(i=Tr("div",r.split(" ")),o.append(i)),i}function Fo(e){let{swiper:t,extendParams:n,on:r}=e;n({cardsEffect:{slideShadows:!0,rotate:!0,perSlideRotate:2,perSlideOffset:8}});!function(e){const{effect:t,swiper:n,on:r,setTranslate:o,setTransition:i,overwriteParams:a,perspective:s,recreateShadows:l,getEffectParams:c}=e;let d;r("beforeInit",()=>{if(n.params.effect!==t)return;n.classNames.push(`${n.params.containerModifierClass}${t}`),s&&s()&&n.classNames.push(`${n.params.containerModifierClass}3d`);const e=a?a():{};Object.assign(n.params,e),Object.assign(n.originalParams,e)}),r("setTranslate",()=>{n.params.effect===t&&o()}),r("setTransition",(e,r)=>{n.params.effect===t&&i(r)}),r("transitionEnd",()=>{if(n.params.effect===t&&l){if(!c||!c().slideShadows)return;n.slides.forEach(e=>{e.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(e=>e.remove())}),l()}}),r("virtualUpdate",()=>{n.params.effect===t&&(n.slides.length||(d=!0),requestAnimationFrame(()=>{d&&n.slides&&n.slides.length&&(o(),d=!1)}))})}({effect:"cards",swiper:t,on:r,setTranslate:()=>{const{slides:e,activeIndex:n,rtlTranslate:r}=t,o=t.params.cardsEffect,{startTranslate:i,isTouched:a}=t.touchEventsData,s=r?-t.translate:t.translate;for(let l=0;l<e.length;l+=1){const c=e[l],d=c.progress,u=Math.min(Math.max(d,-4),4);let p=c.swiperSlideOffset;t.params.centeredSlides&&!t.params.cssMode&&(t.wrapperEl.style.transform=`translateX(${t.minTranslate()}px)`),t.params.centeredSlides&&t.params.cssMode&&(p-=e[0].swiperSlideOffset);let f=t.params.cssMode?-p-t.translate:-p,m=0;const h=-100*Math.abs(u);let v=1,g=-o.perSlideRotate*u,b=o.perSlideOffset-.75*Math.abs(u);const w=t.virtual&&t.params.virtual.enabled?t.virtual.from+l:l,y=(w===n||w===n-1)&&u>0&&u<1&&(a||t.params.cssMode)&&s<i,E=(w===n||w===n+1)&&u<0&&u>-1&&(a||t.params.cssMode)&&s>i;if(y||E){const e=(1-Math.abs((Math.abs(u)-.5)/.5))**.5;g+=-28*u*e,v+=-.5*e,b+=96*e,m=-25*e*Math.abs(u)+"%"}if(f=u<0?`calc(${f}px ${r?"-":"+"} (${b*Math.abs(u)}%))`:u>0?`calc(${f}px ${r?"-":"+"} (-${b*Math.abs(u)}%))`:`${f}px`,!t.isHorizontal()){const e=m;m=f,f=e}const x=u<0?""+(1+(1-v)*u):""+(1-(1-v)*u),S=`\n translate3d(${f}, ${m}, ${h}px)\n rotateZ(${o.rotate?r?-g:g:0}deg)\n scale(${x})\n `;if(o.slideShadows){let e=c.querySelector(".swiper-slide-shadow");e||(e=$o("cards",c)),e&&(e.style.opacity=Math.min(Math.max((Math.abs(u)-.5)/.5,0),1))}c.style.zIndex=-Math.abs(Math.round(d))+e.length;jo(0,c).style.transform=S}},setTransition:e=>{const n=t.slides.map(e=>Er(e));n.forEach(t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow").forEach(t=>{t.style.transitionDuration=`${e}ms`})}),zo({swiper:t,duration:e,transformElements:n})},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!t.params.cssMode})})}Oo.displayName="SwiperSlide";const Bo=({product:e})=>{const[n,r]=a(!1);return t.createElement("a",{href:e.linkPath,target:"_blank"},t.createElement("div",{className:"w-full h-full flex gap-2 flex-col"},t.createElement("div",{className:"w-full max-h-fit aspect-square border mb-2 flex justify-center items-center"},e.thumbPath&&!n?t.createElement(vt,{product:e,onError:()=>r(!0)}):t.createElement(ht,null)),t.createElement("div",{className:"justify-center flex flex-col"},e.brand&&t.createElement("p",{className:"max-w-52 break-keep line-clamp-1 text-xs text-gray-500"},e.brand.brandName),t.createElement("p",null,e.productName),t.createElement("div",null,t.createElement("span",{className:"font-semibold text-red-500"},e.discount,"%"," "),t.createElement("span",{className:"font-semibold"},Ve(e.sellingPrice),"원")))))},Vo=({products:e})=>{const o=n(null),[i,s]=a(0),l=n(null);r(()=>{u(),window.addEventListener("resize",()=>{clearInterval(c),c=setTimeout(u,d)})},[]);let c=null;const d=100,u=()=>{l.current&&s(l.current.offsetWidth)};return e&&t.createElement("div",{className:"flex items-center h-full justify-center w-full",ref:l},e.length>3?t.createElement(ot,{size:50,className:"cursor-pointer slide__prev",onClick:()=>{var e;null===(e=o.current)||void 0===e||e.slidePrev()}}):t.createElement("div",{className:"w-[50px]"}),t.createElement(Co,{modules:[Po],onSwiper:e=>{o.current=e},style:{width:i},slidesPerView:3,navigation:{prevEl:".slide__prev",nextEl:".slide__next"},spaceBetween:20},e.map(e=>t.createElement(Oo,{key:e.productId},t.createElement(Bo,{product:e})))),e.length>3?t.createElement(it,{onClick:()=>{var e;null===(e=o.current)||void 0===e||e.slideNext()},size:50,className:"cursor-pointer slide__next"}):t.createElement("div",{className:"w-[50px]"}))},Wo=e=>{const{player:n,shortform:r}=e;return t.createElement("div",{className:"flex h-full gap-5"},t.createElement("div",{className:"h-full aspect-[9/16]"},n),t.createElement("div",{className:"w-full min-w-44 max-w-[800px] overflow-hidden text-sm"},t.createElement(Vo,{products:r.productsInfo})))},Uo=({products:e})=>{const r=n(null);return t.createElement("div",{className:"flex items-center flex-col h-full"},e.length>4&&t.createElement(at,{size:50,className:"cursor-pointer slide__prev"}),t.createElement(Co,{modules:[ko,Po],mousewheel:!0,onSwiper:e=>{r.current=e},spaceBetween:10,className:"max-w-full h-[80%]",slidesPerView:4,direction:"vertical",navigation:{prevEl:".slide__prev",nextEl:".slide__next"}},e.map(e=>t.createElement(Oo,{key:e.productId},t.createElement(gt,{product:e})))),e.length>4&&t.createElement(rt,{size:50,className:"cursor-pointer slide__next"}))},Go=e=>{const{playerSettings:n,shortform:{productsInfo:r},player:o}=e;return t.createElement("div",{className:"flex h-full w-full gap-5"},t.createElement("div",{className:" h-full "},o),t.createElement("div",{className:"max-w-[800px] overflow-hidden"},t.createElement(Uo,{products:r})))},Ho=({products:e})=>{const r=n(null),o=e.length>6;return t.createElement("div",{className:"flex items-center my-10 h-full text-sm w-full"},o?t.createElement(ot,{onClick:()=>{var e;null===(e=r.current)||void 0===e||e.slidePrev()},size:50,className:"cursor-pointer"}):t.createElement("div",{className:"w-[50px]"}),t.createElement(Co,{onSwiper:e=>{r.current=e},className:"w-[80%] h-[80%]",slidesPerView:3,spaceBetween:20,modules:[Io],grid:{rows:2,fill:"row"}},e.map(e=>t.createElement(Oo,{key:e.productId},t.createElement(Bo,{product:e})))),o?t.createElement(it,{onClick:()=>{var e;null===(e=r.current)||void 0===e||e.slideNext()},size:50,className:"cursor-pointer"}):t.createElement("div",{className:"w-[50px]"}))},qo=e=>{const{player:n,shortform:{productsInfo:r}}=e;return t.createElement("div",{className:"flex gap-4 w-full h-full min-w-[768px]"},t.createElement("div",{className:"flex-1 w-full"},t.createElement("div",{className:"h-full aspect-[9/16]"},n)),t.createElement("div",{className:"flex-[2] w-full h-full overflow-hidden"},t.createElement(Ho,{products:r})))},Yo=e=>(document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}),Xo=()=>document.visibilityState,Ko=()=>{throw Error("useVisibilityChange is a client-only hook")};const Zo=()=>{const[e,t]=a(0);((e,t,o=!0)=>{const i=n(e),a=n(null),s=()=>{a.current&&(clearInterval(a.current),a.current=null)},l=d(()=>{a.current||(a.current=setInterval(()=>i.current(),t))},[t]);r(()=>{i.current=e},[e]),r(()=>(o&&l(),()=>s()),[l,o])})(()=>{t(e=>e+1)},1e3);return{playtime:e,resetPlaytime:()=>t(0)}};var Jo;!function(e){e.LIVE="live",e.SHORTS="shorts",e.COLLECTION="collection"}(Jo||(Jo={}));let Qo=0;const{API_BASE_URL:ei,PLAYER_BACK_BASE_URL:ti}=ze,ni=e=>E(void 0,void 0,void 0,function*(){const{contentId:t,uuid:n,type:r,userId:o}=e;try{if(3===Qo)return;const e=`${ti}/statistics/play`,i=Object.assign({contentId:t,uuid:n,type:r,date:We(),userId:+o,playtime:0,isLive:!1},"shorts"===r&&{isFinished:!1,playedOver5Sec:!1});yield fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)})}catch(e){console.error(`Error in statisticsApi.join - contentId: ${t}`),Ye(e),Qo++}}),ri=e=>{const{contentId:t,uuid:n,type:r,isFinished:o,playtime:i,userId:a}=e,s=Object.assign({contentId:t,uuid:n,playtime:i,type:r,date:We(),userId:+a,isLive:!1},"shorts"===r&&{isFinished:o,playedOver5Sec:Number(i)>5});fetch(`${ti}/statistics/play`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s),keepalive:!0})},oi=e=>E(void 0,void 0,void 0,function*(){const{contentProductId:t}=e;try{yield fetch(`${ti}/statistics/products/${t}/clicks`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Object.assign({date:We()},e))})}catch(e){console.error(`Error in statisticsApi.productClick - contentProductId: ${t}`),Ye(e)}}),ii=e=>E(void 0,void 0,void 0,function*(){try{return(yield(yield fetch(`${ze.STATISTICS_BASE_URL}/${e}/likes`)).json()).result||0}catch(t){return console.error(`Error in statisticsApi.getLike - contentId: ${e}`),Ye(t),0}}),ai=e=>E(void 0,void 0,void 0,function*(){try{yield fetch(`${ze.PLAYER_BACK_BASE_URL}/statistics/like`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({contentId:e,isLive:!1,isFirst:!1})})}catch(t){console.error(`Error in statisticsApi.getLike - contentId: ${e}`),Ye(t)}}),si=e=>E(void 0,[e],void 0,function*({collectionId:e,nextKey:t,size:n=5}){try{const r=new URLSearchParams;-1!==n&&r.set("size",String(n)),t&&r.set("nextKey",t);return(yield fetch(`${ti}/commerce/collection/${e}?${r.toString()}`)).json()}catch(e){return Ye(e),null}}),li=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!=typeof o||null===o)?o:Object.assign({},t,o),n.forEach(n=>n(t,e))}},o=()=>t,i={setState:r,getState:o,getInitialState:()=>a,subscribe:e=>(n.add(e),()=>n.delete(e))},a=t=e(r,o,i);return i},ci=e=>e;const di=e=>{const n=(e=>e?li(e):li)(e),r=e=>function(e,n=ci){const r=t.useSyncExternalStore(e.subscribe,t.useCallback(()=>n(e.getState()),[e,n]),t.useCallback(()=>n(e.getInitialState()),[e,n]));return t.useDebugValue(r),r}(n,e);return Object.assign(r,n),r},ui=e=>e?di(e):di,pi=ui(e=>({priceText:"",isPreview:!1,setPriceText:t=>e({priceText:t}),setIsPreview:t=>e({isPreview:t})})),fi=ui(e=>({collection:null,setCollection:t=>e({collection:t}),nextKey:"",setNextKey:t=>e({nextKey:t}),isFetching:!1,setIsFetching:t=>e({isFetching:t})})),mi=(t,n)=>{const{collection:o,setCollection:i,isFetching:a,setIsFetching:s,nextKey:l,setNextKey:c}=fi(),{isPreview:d}=pi(),u=(null==t?void 0:t.media)?Be(t.media.duration):0,{resetPlaytime:p,playtime:f}=Zo(),{playtime:m,resetPlaytime:h}=Zo(),v="visible"===e.useSyncExternalStore(Yo,Xo,Ko),g=()=>{if(!o)return;const{colId:e,uuid:n,userId:r}=o,i=ze.PLAYED_CHECK_KEY.LAST_PLAYED,a=Math.floor((new Date).getTime()/1e3);localStorage.setItem(i,a.toString()),d||(ri({contentId:e,uuid:n,type:Jo.COLLECTION,userId:r,playtime:m}),t&&ri({contentId:t.shortsId,uuid:t.uuid,type:Jo.SHORTS,userId:r,playtime:f,isFinished:f>=u}),h(),p())};r(()=>{v||g()},[v]);return{onSlideChange:e=>E(void 0,void 0,void 0,function*(){if(t&&o&&(yield(e=>E(void 0,void 0,void 0,function*(){var t,n;if(!o)return;const{contents:r,count:d}=o;if((null!=d?d:Number.MAX_SAFE_INTEGER)>r.length&&e>=r.length-5&&!a){s(!0);try{const e=yield si({collectionId:o.colId,nextKey:l});if(!e||!(null===(t=e.contents)||void 0===t?void 0:t.length))return;c((null===(n=e.contents.at(-1))||void 0===n?void 0:n.shortsId)||"");const r=new Set(o.contents.map(e=>e.shortsId)),a=e.contents.filter(e=>!r.has(e.shortsId));if(!a.length)return;const s=o.contents.concat(a);i(Object.assign(Object.assign({},o),{contents:s}))}catch(e){console.error(e)}finally{s(!1)}}}))(e),!d)){const{shortsId:r,uuid:i,userId:a}=t;ri({contentId:r,uuid:i,type:Jo.SHORTS,playtime:f,isFinished:f>=u,userId:a}),p();const s=Ue(),l=o.contents[e];n(Object.assign(Object.assign({},l),{uuid:s})),yield ni({contentId:l.shortsId,uuid:s,type:Jo.SHORTS,userId:l.userId,isFirstPlay:!Ge(l.shortsId)})}}),onCollectionClose:g}},hi=e=>{const{collection:r,playerSettings:o,shortform:i,setShortform:a}=e,s=n(null),{onSlideChange:l}=mi(r,i);return t.createElement(t.Fragment,null,t.createElement("div",{className:"self-center flex gap-4 flex-col"},t.createElement(at,{size:44,onClick:()=>{var e;null===(e=s.current)||void 0===e||e.swiper.slidePrev()}}),t.createElement(rt,{size:44,onClick:()=>{var e;null===(e=s.current)||void 0===e||e.swiper.slideNext()}})),t.createElement("div",{className:"h-full aspect-[9/16] my-10"},t.createElement(Co,{modules:[ko,Do],mousewheel:!0,loop:!0,direction:"vertical",touchEventsTarget:"container",slidesPerView:1,ref:s,className:"h-full",onSlideChangeTransitionEnd:e=>E(void 0,void 0,void 0,function*(){yield l(e.realIndex)})},r.contents.map(e=>t.createElement(Oo,{key:e.shortsId},i.shortsId===e.shortsId&&t.createElement("div",{className:"h-full rounded-xl absolute z-[999] aspect-[9/16] overflow-hidden"},t.createElement(T,{file:Fe(i.media.objectId)})),t.createElement("img",{src:qe(e.thumbPath),alt:e.title,className:"rounded-xl overflow-hidden h-full bg-black aspect-[9/16] "+(e.media.width>e.media.height?"object-contain":"object-cover")}))))))},vi=e=>{const{collection:r,shortform:o,setShortform:i,playerSettings:a}=e,s=n(null);mi(r,o);return t.createElement("div",{className:"mx-10 flex h-full gap-4"},t.createElement("div",{className:"self-center flex gap-4 flex-col"},t.createElement(at,{size:44,onClick:()=>{var e;null===(e=s.current)||void 0===e||e.swiper.slidePrev()}}),t.createElement(rt,{size:44,onClick:()=>{var e;null===(e=s.current)||void 0===e||e.swiper.slideNext()}})),t.createElement("div",{className:"h-full aspect-[9/16]"},t.createElement(Co,{modules:[ko,Do],mousewheel:!0,direction:"vertical",slidesPerView:1,ref:s,className:"h-full",preventClicksPropagation:!1,preventClicks:!1,noSwiping:!0,allowTouchMove:!1,loop:!0},r.contents.map(e=>t.createElement(Oo,{key:e.shortsId},t.createElement("div",{className:"flex justify-center gap-3 h-full w-full"},o.shortsId===e.shortsId&&t.createElement("div",{className:"h-full absolute z-[999] w-full"},t.createElement("div",{className:"h-full aspect-[9/16]"},t.createElement(T,{file:Fe(o.media.objectId)}))),t.createElement("div",{className:"h-full aspec[9/16]"},t.createElement("img",{src:"https://"+e.thumbPath,alt:e.title,className:"w-full h-full bg-black "+(e.media.width>e.media.height?"object-contain":"object-cover")}))))))))},gi=()=>t.createElement("div",{className:"inline-block absolute pointer-events-none top-0 z-10 animate-float w-[24px] h-[24px]"},t.createElement(st,{className:"fill-red-500 text-transparent w-[24px] h-[24px]"})),bi=({shortsId:e})=>{const{isPreview:n}=pi(),[o,i]=a(n?123:0),[s,l]=a([]);r(()=>{n||E(void 0,void 0,void 0,function*(){try{const t=yield ii(e);i(t)}catch(e){return console.error(`Error in statistics getLikeInLive: ${e.toString()}`),0}})},[]);return t.createElement("div",{className:"flex justify-center flex-col items-center relative w-[24px] h-[24px]"},t.createElement("button",{onClick:()=>E(void 0,void 0,void 0,function*(){(()=>{const e=Date.now();l(t=>[...t,e]),setTimeout(()=>{l(t=>t.filter(t=>t!==e))},2e3)})(),i(e=>e+1),n||(yield E(void 0,void 0,void 0,function*(){yield ai(e)}))}),className:"z-[5] cursor-pointer"},t.createElement(st,{className:"text-xl fill-white w-[24px] h-[24px]"})),s.map(e=>t.createElement(gi,{key:e})),t.createElement("span",{className:"break-keep text-[10px]"},Ve(o)))};function wi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var yi,Ei,xi={},Si={exports:{}},Ti=Si.exports;function Ci(){return yi||(yi=1,e=Si,t=Si.exports,function(n,r){var o="function",i="undefined",a="object",s="string",l="major",c="model",d="name",u="type",p="vendor",f="version",m="architecture",h="console",v="mobile",g="tablet",b="smarttv",w="wearable",y="embedded",E="Amazon",x="Apple",S="ASUS",T="BlackBerry",C="Browser",O="Chrome",k="Firefox",P="Google",N="Huawei",I="LG",M="Microsoft",A="Motorola",R="Opera",L="Samsung",_="Sharp",D="Sony",j="Xiaomi",z="Zebra",$="Facebook",F="Chromium OS",B="Mac OS",V=" Browser",W=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},U=function(e,t){return typeof e===s&&-1!==G(t).indexOf(G(e))},G=function(e){return e.toLowerCase()},H=function(e,t){if(typeof e===s)return e=e.replace(/^\s\s*/,""),typeof t===i?e:e.substring(0,500)},q=function(e,t){for(var n,i,s,l,c,d,u=0;u<t.length&&!c;){var p=t[u],f=t[u+1];for(n=i=0;n<p.length&&!c&&p[n];)if(c=p[n++].exec(e))for(s=0;s<f.length;s++)d=c[++i],typeof(l=f[s])===a&&l.length>0?2===l.length?typeof l[1]==o?this[l[0]]=l[1].call(this,d):this[l[0]]=l[1]:3===l.length?typeof l[1]!==o||l[1].exec&&l[1].test?this[l[0]]=d?d.replace(l[1],l[2]):r:this[l[0]]=d?l[1].call(this,d,l[2]):r:4===l.length&&(this[l[0]]=d?l[3].call(this,d.replace(l[1],l[2])):r):this[l]=d||r;u+=2}},Y=function(e,t){for(var n in t)if(typeof t[n]===a&&t[n].length>0){for(var o=0;o<t[n].length;o++)if(U(t[n][o],e))return"?"===n?r:n}else if(U(t[n],e))return"?"===n?r:n;return t.hasOwnProperty("*")?t["*"]:e},X={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},K={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[f,[d,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[f,[d,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[d,f],[/opios[\/ ]+([\w\.]+)/i],[f,[d,R+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[f,[d,R+" GX"]],[/\bopr\/([\w\.]+)/i],[f,[d,R]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[f,[d,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[f,[d,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[d,f],[/quark(?:pc)?\/([-\w\.]+)/i],[f,[d,"Quark"]],[/\bddg\/([\w\.]+)/i],[f,[d,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[f,[d,"UC"+C]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[f,[d,"WeChat"]],[/konqueror\/([\w\.]+)/i],[f,[d,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[f,[d,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[f,[d,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[f,[d,"Smart Lenovo "+C]],[/(avast|avg)\/([\w\.]+)/i],[[d,/(.+)/,"$1 Secure "+C],f],[/\bfocus\/([\w\.]+)/i],[f,[d,k+" Focus"]],[/\bopt\/([\w\.]+)/i],[f,[d,R+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[f,[d,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[f,[d,"Dolphin"]],[/coast\/([\w\.]+)/i],[f,[d,R+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[f,[d,"MIUI"+V]],[/fxios\/([\w\.-]+)/i],[f,[d,k]],[/\bqihoobrowser\/?([\w\.]*)/i],[f,[d,"360"]],[/\b(qq)\/([\w\.]+)/i],[[d,/(.+)/,"$1Browser"],f],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[d,/(.+)/,"$1"+V],f],[/samsungbrowser\/([\w\.]+)/i],[f,[d,L+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[f,[d,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[d,"Sogou Mobile"],f],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[d,f],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[d],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[f,d],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[d,$],f],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[d,f],[/\bgsa\/([\w\.]+) .*safari\//i],[f,[d,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[f,[d,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[f,[d,O+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[d,O+" WebView"],f],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[f,[d,"Android "+C]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[d,f],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[f,[d,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[f,d],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[d,[f,Y,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[d,f],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[d,"Netscape"],f],[/(wolvic|librewolf)\/([\w\.]+)/i],[d,f],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[f,[d,k+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[d,[f,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[d,[f,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[m,"amd64"]],[/(ia32(?=;))/i],[[m,G]],[/((?:i[346]|x)86)[;\)]/i],[[m,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[m,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[m,"armhf"]],[/windows (ce|mobile); ppc;/i],[[m,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[m,/ower/,"",G]],[/(sun4\w)[;\)]/i],[[m,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[m,G]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[c,[p,L],[u,g]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[c,[p,L],[u,v]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[c,[p,x],[u,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[c,[p,x],[u,g]],[/(macintosh);/i],[c,[p,x]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[c,[p,_],[u,v]],[/(?:honor)([-\w ]+)[;\)]/i],[c,[p,"Honor"],[u,v]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[c,[p,N],[u,g]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[c,[p,N],[u,v]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[c,/_/g," "],[p,j],[u,v]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[c,/_/g," "],[p,j],[u,g]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[c,[p,"OPPO"],[u,v]],[/\b(opd2\d{3}a?) bui/i],[c,[p,"OPPO"],[u,g]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[c,[p,"Vivo"],[u,v]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[c,[p,"Realme"],[u,v]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[c,[p,A],[u,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[c,[p,A],[u,g]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[c,[p,I],[u,g]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[c,[p,I],[u,v]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[c,[p,"Lenovo"],[u,g]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[c,/_/g," "],[p,"Nokia"],[u,v]],[/(pixel c)\b/i],[c,[p,P],[u,g]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[c,[p,P],[u,v]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[c,[p,D],[u,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[c,"Xperia Tablet"],[p,D],[u,g]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[c,[p,"OnePlus"],[u,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[c,[p,E],[u,g]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[c,/(.+)/g,"Fire Phone $1"],[p,E],[u,v]],[/(playbook);[-\w\),; ]+(rim)/i],[c,p,[u,g]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[c,[p,T],[u,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[c,[p,S],[u,g]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[c,[p,S],[u,v]],[/(nexus 9)/i],[c,[p,"HTC"],[u,g]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[p,[c,/_/g," "],[u,v]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[c,[p,"TCL"],[u,g]],[/(itel) ((\w+))/i],[[p,G],c,[u,Y,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[c,[p,"Acer"],[u,g]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[c,[p,"Meizu"],[u,v]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[c,[p,"Ulefone"],[u,v]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[c,[p,"Energizer"],[u,v]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[c,[p,"Cat"],[u,v]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[c,[p,"Smartfren"],[u,v]],[/droid.+; (a(?:015|06[35]|142p?))/i],[c,[p,"Nothing"],[u,v]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[p,c,[u,v]],[/(imo) (tab \w+)/i,/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[p,c,[u,g]],[/(surface duo)/i],[c,[p,M],[u,g]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[c,[p,"Fairphone"],[u,v]],[/(u304aa)/i],[c,[p,"AT&T"],[u,v]],[/\bsie-(\w*)/i],[c,[p,"Siemens"],[u,v]],[/\b(rct\w+) b/i],[c,[p,"RCA"],[u,g]],[/\b(venue[\d ]{2,7}) b/i],[c,[p,"Dell"],[u,g]],[/\b(q(?:mv|ta)\w+) b/i],[c,[p,"Verizon"],[u,g]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[c,[p,"Barnes & Noble"],[u,g]],[/\b(tm\d{3}\w+) b/i],[c,[p,"NuVision"],[u,g]],[/\b(k88) b/i],[c,[p,"ZTE"],[u,g]],[/\b(nx\d{3}j) b/i],[c,[p,"ZTE"],[u,v]],[/\b(gen\d{3}) b.+49h/i],[c,[p,"Swiss"],[u,v]],[/\b(zur\d{3}) b/i],[c,[p,"Swiss"],[u,g]],[/\b((zeki)?tb.*\b) b/i],[c,[p,"Zeki"],[u,g]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[p,"Dragon Touch"],c,[u,g]],[/\b(ns-?\w{0,9}) b/i],[c,[p,"Insignia"],[u,g]],[/\b((nxa|next)-?\w{0,9}) b/i],[c,[p,"NextBook"],[u,g]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[p,"Voice"],c,[u,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[p,"LvTel"],c,[u,v]],[/\b(ph-1) /i],[c,[p,"Essential"],[u,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[c,[p,"Envizen"],[u,g]],[/\b(trio[-\w\. ]+) b/i],[c,[p,"MachSpeed"],[u,g]],[/\btu_(1491) b/i],[c,[p,"Rotor"],[u,g]],[/(shield[\w ]+) b/i],[c,[p,"Nvidia"],[u,g]],[/(sprint) (\w+)/i],[p,c,[u,v]],[/(kin\.[onetw]{3})/i],[[c,/\./g," "],[p,M],[u,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[c,[p,z],[u,g]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[c,[p,z],[u,v]],[/smart-tv.+(samsung)/i],[p,[u,b]],[/hbbtv.+maple;(\d+)/i],[[c,/^/,"SmartTV"],[p,L],[u,b]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[p,I],[u,b]],[/(apple) ?tv/i],[p,[c,x+" TV"],[u,b]],[/crkey/i],[[c,O+"cast"],[p,P],[u,b]],[/droid.+aft(\w+)( bui|\))/i],[c,[p,E],[u,b]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[c,[p,_],[u,b]],[/(bravia[\w ]+)( bui|\))/i],[c,[p,D],[u,b]],[/(mitv-\w{5}) bui/i],[c,[p,j],[u,b]],[/Hbbtv.*(technisat) (.*);/i],[p,c,[u,b]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[p,H],[c,H],[u,b]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[u,b]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[p,c,[u,h]],[/droid.+; (shield) bui/i],[c,[p,"Nvidia"],[u,h]],[/(playstation [345portablevi]+)/i],[c,[p,D],[u,h]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[c,[p,M],[u,h]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[c,[p,L],[u,w]],[/((pebble))app/i],[p,c,[u,w]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[c,[p,x],[u,w]],[/droid.+; (glass) \d/i],[c,[p,P],[u,w]],[/droid.+; (wt63?0{2,3})\)/i],[c,[p,z],[u,w]],[/droid.+; (glass) \d/i],[c,[p,P],[u,w]],[/(pico) (4|neo3(?: link|pro)?)/i],[p,c,[u,w]],[/; (quest( \d| pro)?)/i],[c,[p,$],[u,w]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[p,[u,y]],[/(aeobc)\b/i],[c,[p,E],[u,y]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[c,[u,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[c,[u,g]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[u,g]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[u,v]],[/(android[-\w\. ]{0,9});.+buil/i],[c,[p,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[f,[d,"EdgeHTML"]],[/(arkweb)\/([\w\.]+)/i],[d,f],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[d,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[d,f],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[f,d]],os:[[/microsoft (windows) (vista|xp)/i],[d,f],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[d,[f,Y,X]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[f,Y,X],[d,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[f,/_/g,"."],[d,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[d,B],[f,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[f,d],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[d,f],[/\(bb(10);/i],[f,[d,T]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[f,[d,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[f,[d,k+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[f,[d,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[f,[d,"watchOS"]],[/crkey\/([\d\.]+)/i],[f,[d,O+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[d,F],f],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[d,f],[/(sunos) ?([\w\.\d]*)/i],[[d,"Solaris"],f],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[d,f]]},Z=function(e,t){if(typeof e===a&&(t=e,e=r),!(this instanceof Z))return new Z(e,t).getResult();var h=typeof n!==i&&n.navigator?n.navigator:r,b=e||(h&&h.userAgent?h.userAgent:""),w=h&&h.userAgentData?h.userAgentData:r,y=t?function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}(K,t):K,E=h&&h.userAgent==b;return this.getBrowser=function(){var e,t={};return t[d]=r,t[f]=r,q.call(t,b,y.browser),t[l]=typeof(e=t[f])===s?e.replace(/[^\d\.]/g,"").split(".")[0]:r,E&&h&&h.brave&&typeof h.brave.isBrave==o&&(t[d]="Brave"),t},this.getCPU=function(){var e={};return e[m]=r,q.call(e,b,y.cpu),e},this.getDevice=function(){var e={};return e[p]=r,e[c]=r,e[u]=r,q.call(e,b,y.device),E&&!e[u]&&w&&w.mobile&&(e[u]=v),E&&"Macintosh"==e[c]&&h&&typeof h.standalone!==i&&h.maxTouchPoints&&h.maxTouchPoints>2&&(e[c]="iPad",e[u]=g),e},this.getEngine=function(){var e={};return e[d]=r,e[f]=r,q.call(e,b,y.engine),e},this.getOS=function(){var e={};return e[d]=r,e[f]=r,q.call(e,b,y.os),E&&!e[d]&&w&&w.platform&&"Unknown"!=w.platform&&(e[d]=w.platform.replace(/chrome os/i,F).replace(/macos/i,B)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return b},this.setUA=function(e){return b=typeof e===s&&e.length>500?H(e,500):e,this},this.setUA(b),this};Z.VERSION="1.0.40",Z.BROWSER=W([d,f,l]),Z.CPU=W([m]),Z.DEVICE=W([c,p,u,h,v,b,g,w,y]),Z.ENGINE=Z.OS=W([d,f]),e.exports&&(t=e.exports=Z),t.UAParser=Z;var J=typeof n!==i&&(n.jQuery||n.Zepto);if(J&&!J.ua){var Q=new Z;J.ua=Q.getResult(),J.ua.get=function(){return Q.getUA()},J.ua.set=function(e){Q.setUA(e);var t=Q.getResult();for(var n in t)J.ua[n]=t[n]}}}("object"==typeof window?window:Ti)),Si.exports;var e,t}var Oi=function(){if(Ei)return xi;Ei=1,Object.defineProperty(xi,"__esModule",{value:!0});var e,n=t,r=(e=n)&&"object"==typeof e&&"default"in e?e.default:e,o=Ci(),i=new o,a=i.getBrowser(),s=i.getCPU(),l=i.getDevice(),c=i.getEngine(),d=i.getOS(),u=i.getUA(),p=function(e){return i.setUA(e)},f=function(e){if(e){var t=new o(e);return{UA:t,browser:t.getBrowser(),cpu:t.getCPU(),device:t.getDevice(),engine:t.getEngine(),os:t.getOS(),ua:t.getUA(),setUserAgent:function(e){return t.setUA(e)}}}console.error("No userAgent string was provided")},m=Object.freeze({ClientUAInstance:i,browser:a,cpu:s,device:l,engine:c,os:d,ua:u,setUa:p,parseUserAgent:f});function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function g(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(){return w=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},w.apply(this,arguments)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function E(e,t){return E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},E(e,t)}function x(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function S(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function T(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return C(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var O="mobile",k="tablet",P="smarttv",N="console",I="wearable",M="embedded",A=void 0,R={Chrome:"Chrome",Firefox:"Firefox",Opera:"Opera",Yandex:"Yandex",Safari:"Safari",InternetExplorer:"Internet Explorer",Edge:"Edge",Chromium:"Chromium",Ie:"IE",MobileSafari:"Mobile Safari",EdgeChromium:"Edge Chromium",MIUI:"MIUI Browser",SamsungBrowser:"Samsung Browser"},L={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},_={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},D=function(e){return e||(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none")},j=function(){return!("undefined"==typeof window||!window.navigator&&!navigator)&&(window.navigator||navigator)},z=function(e){var t=j();return t&&t.platform&&(-1!==t.platform.indexOf(e)||"MacIntel"===t.platform&&t.maxTouchPoints>1&&!window.MSStream)},$=function(e,t,n,r){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach(function(t){b(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e,{vendor:D(t.vendor),model:D(t.model),os:D(n.name),osVersion:D(n.version),ua:D(r)})},F=function(e){return e.type===O},B=function(e){return e.type===k},V=function(e){var t=e.type;return t===O||t===k},W=function(e){return e.type===P},U=function(e){return e.type===A},G=function(e){return e.type===I},H=function(e){return e.type===N},q=function(e){return e.type===M},Y=function(e){var t=e.vendor;return D(t)},X=function(e){var t=e.model;return D(t)},K=function(e){var t=e.type;return D(t,"browser")},Z=function(e){return e.name===L.Android},J=function(e){return e.name===L.Windows},Q=function(e){return e.name===L.MAC_OS},ee=function(e){return e.name===L.WindowsPhone},te=function(e){return e.name===L.IOS},ne=function(e){var t=e.version;return D(t)},re=function(e){var t=e.name;return D(t)},oe=function(e){return e.name===R.Chrome},ie=function(e){return e.name===R.Firefox},ae=function(e){return e.name===R.Chromium},se=function(e){return e.name===R.Edge},le=function(e){return e.name===R.Yandex},ce=function(e){var t=e.name;return t===R.Safari||t===R.MobileSafari},de=function(e){return e.name===R.MobileSafari},ue=function(e){return e.name===R.Opera},pe=function(e){var t=e.name;return t===R.InternetExplorer||t===R.Ie},fe=function(e){return e.name===R.MIUI},me=function(e){return e.name===R.SamsungBrowser},he=function(e){var t=e.version;return D(t)},ve=function(e){var t=e.major;return D(t)},ge=function(e){var t=e.name;return D(t)},be=function(e){var t=e.name;return D(t)},we=function(e){var t=e.version;return D(t)},ye=function(){var e=j(),t=e&&e.userAgent&&e.userAgent.toLowerCase();return"string"==typeof t&&/electron/.test(t)},Ee=function(e){return"string"==typeof e&&-1!==e.indexOf("Edg/")},xe=function(){var e=j();return e&&(/iPad|iPhone|iPod/.test(e.platform)||"MacIntel"===e.platform&&e.maxTouchPoints>1)&&!window.MSStream},Se=function(){return z("iPad")},Te=function(){return z("iPhone")},Ce=function(){return z("iPod")},Oe=function(e){return D(e)};function ke(e){var t=e||m,n=t.device,r=t.browser,o=t.os,i=t.engine,a=t.ua;return{isSmartTV:W(n),isConsole:H(n),isWearable:G(n),isEmbedded:q(n),isMobileSafari:de(r)||Se(),isChromium:ae(r),isMobile:V(n)||Se(),isMobileOnly:F(n),isTablet:B(n)||Se(),isBrowser:U(n),isDesktop:U(n),isAndroid:Z(o),isWinPhone:ee(o),isIOS:te(o)||Se(),isChrome:oe(r),isFirefox:ie(r),isSafari:ce(r),isOpera:ue(r),isIE:pe(r),osVersion:ne(o),osName:re(o),fullBrowserVersion:he(r),browserVersion:ve(r),browserName:ge(r),mobileVendor:Y(n),mobileModel:X(n),engineName:be(i),engineVersion:we(i),getUA:Oe(a),isEdge:se(r)||Ee(a),isYandex:le(r),deviceType:K(n),isIOS13:xe(),isIPad13:Se(),isIPhone13:Te(),isIPod13:Ce(),isElectron:ye(),isEdgeChromium:Ee(a),isLegacyEdge:se(r)&&!Ee(a),isWindows:J(o),isMacOs:Q(o),isMIUI:fe(r),isSamsungBrowser:me(r)}}var Pe=W(l),Ne=H(l),Ie=G(l),Me=q(l),Ae=de(a)||Se(),Re=ae(a),Le=V(l)||Se(),_e=F(l),De=B(l)||Se(),je=U(l),ze=U(l),$e=Z(d),Fe=ee(d),Be=te(d)||Se(),Ve=oe(a),We=ie(a),Ue=ce(a),Ge=ue(a),He=pe(a),qe=ne(d),Ye=re(d),Xe=he(a),Ke=ve(a),Ze=ge(a),Je=Y(l),Qe=X(l),et=be(c),tt=we(c),nt=Oe(u),rt=se(a)||Ee(u),ot=le(a),it=K(l),at=xe(),st=Se(),lt=Te(),ct=Ce(),dt=ye(),ut=Ee(u),pt=se(a)&&!Ee(u),ft=J(d),mt=Q(d),ht=fe(a),vt=me(a);function gt(e){var t=e||window.navigator.userAgent;return f(t)}return xi.AndroidView=function(e){var t=e.renderWithFragment,o=e.children,i=x(e,["renderWithFragment","children"]);return $e?t?r.createElement(n.Fragment,null,o):r.createElement("div",i,o):null},xi.BrowserTypes=R,xi.BrowserView=function(e){var t=e.renderWithFragment,o=e.children,i=x(e,["renderWithFragment","children"]);return je?t?r.createElement(n.Fragment,null,o):r.createElement("div",i,o):null},xi.ConsoleView=function(e){var t=e.renderWithFragment,o=e.children,i=x(e,["renderWithFragment","children"]);return Ne?t?r.createElement(n.Fragment,null,o):r.createElement("div",i,o):null},xi.CustomView=function(e){var t=e.renderWithFragment,o=e.children;e.viewClassName,e.style;var i=e.condition,a=x(e,["renderWithFragment","children","viewClassName","style","condition"]);return i?t?r.createElement(n.Fragment,null,o):r.createElement("div",a,o):null},xi.IEView=function(e){var t=e.renderWithFragment,o=e.children,i=x(e,["renderWithFragment","children"]);return He?t?r.createElement(n.Fragment,null,o):r.createElement("div",i,o):null},xi.IOSView=function(e){var t=e.renderWithFragment,o=e.children,i=x(e,["renderWithFragment","children"]);return Be?t?r.createElement(n.Fragment,null,o):r.createElement("div",i,o):null},xi.MobileOnlyView=function(e){var t=e.renderWithFragment,o=e.children;e.viewClassName,e.style;var i=x(e,["renderWithFragment","children","viewClassName","style"]);return _e?t?r.createElement(n.Fragment,null,o):r.createElement("div",i,o):null},xi.MobileView=function(e){var t=e.renderWithFragment,o=e.children,i=x(e,["renderWithFragment","children"]);return Le?t?r.createElement(n.Fragment,null,o):r.createElement("div",i,o):null},xi.OsTypes=L,xi.SmartTVView=function(e){var t=e.renderWithFragment,o=e.children,i=x(e,["renderWithFragment","children"]);return Pe?t?r.createElement(n.Fragment,null,o):r.createElement("div",i,o):null},xi.TabletView=function(e){var t=e.renderWithFragment,o=e.children,i=x(e,["renderWithFragment","children"]);return De?t?r.createElement(n.Fragment,null,o):r.createElement("div",i,o):null},xi.WearableView=function(e){var t=e.renderWithFragment,o=e.children,i=x(e,["renderWithFragment","children"]);return Ie?t?r.createElement(n.Fragment,null,o):r.createElement("div",i,o):null},xi.WinPhoneView=function(e){var t=e.renderWithFragment,o=e.children,i=x(e,["renderWithFragment","children"]);return Fe?t?r.createElement(n.Fragment,null,o):r.createElement("div",i,o):null},xi.browserName=Ze,xi.browserVersion=Ke,xi.deviceDetect=function(e){var t=e?f(e):m,n=t.device,r=t.browser,o=t.engine,i=t.os,a=t.ua,s=function(e){switch(e){case O:return{isMobile:!0};case k:return{isTablet:!0};case P:return{isSmartTV:!0};case N:return{isConsole:!0};case I:return{isWearable:!0};case A:return{isBrowser:!0};case M:return{isEmbedded:!0};default:return _}}(n.type),l=s.isBrowser,c=s.isMobile,d=s.isTablet,u=s.isSmartTV,p=s.isConsole,h=s.isWearable,v=s.isEmbedded;return l?function(e,t,n,r,o){return{isBrowser:e,browserMajorVersion:D(t.major),browserFullVersion:D(t.version),browserName:D(t.name),engineName:D(n.name),engineVersion:D(n.version),osName:D(r.name),osVersion:D(r.version),userAgent:D(o)}}(l,r,o,i,a):u?function(e,t,n,r){return{isSmartTV:e,engineName:D(t.name),engineVersion:D(t.version),osName:D(n.name),osVersion:D(n.version),userAgent:D(r)}}(u,o,i,a):p?function(e,t,n,r){return{isConsole:e,engineName:D(t.name),engineVersion:D(t.version),osName:D(n.name),osVersion:D(n.version),userAgent:D(r)}}(p,o,i,a):c||d?$(s,n,i,a):h?function(e,t,n,r){return{isWearable:e,engineName:D(t.name),engineVersion:D(t.version),osName:D(n.name),osVersion:D(n.version),userAgent:D(r)}}(h,o,i,a):v?function(e,t,n,r,o){return{isEmbedded:e,vendor:D(t.vendor),model:D(t.model),engineName:D(n.name),engineVersion:D(n.version),osName:D(r.name),osVersion:D(r.version),userAgent:D(o)}}(v,n,o,i,a):void 0},xi.deviceType=it,xi.engineName=et,xi.engineVersion=tt,xi.fullBrowserVersion=Xe,xi.getSelectorsByUserAgent=function(e){if(e&&"string"==typeof e){var t=f(e);return ke({device:t.device,browser:t.browser,os:t.os,engine:t.engine,ua:t.ua})}console.error("No valid user agent string was provided")},xi.getUA=nt,xi.isAndroid=$e,xi.isBrowser=je,xi.isChrome=Ve,xi.isChromium=Re,xi.isConsole=Ne,xi.isDesktop=ze,xi.isEdge=rt,xi.isEdgeChromium=ut,xi.isElectron=dt,xi.isEmbedded=Me,xi.isFirefox=We,xi.isIE=He,xi.isIOS=Be,xi.isIOS13=at,xi.isIPad13=st,xi.isIPhone13=lt,xi.isIPod13=ct,xi.isLegacyEdge=pt,xi.isMIUI=ht,xi.isMacOs=mt,xi.isMobile=Le,xi.isMobileOnly=_e,xi.isMobileSafari=Ae,xi.isOpera=Ge,xi.isSafari=Ue,xi.isSamsungBrowser=vt,xi.isSmartTV=Pe,xi.isTablet=De,xi.isWearable=Ie,xi.isWinPhone=Fe,xi.isWindows=ft,xi.isYandex=ot,xi.mobileModel=Qe,xi.mobileVendor=Je,xi.osName=Ye,xi.osVersion=qe,xi.parseUserAgent=f,xi.setUserAgent=function(e){return p(e)},xi.useDeviceData=gt,xi.useDeviceSelectors=function(e){var t=gt(e||window.navigator.userAgent);return[ke(t),t]},xi.useMobileOrientation=function(){var e=T(n.useState(function(){var e=window.innerWidth>window.innerHeight?90:0;return{isPortrait:0===e,isLandscape:90===e,orientation:0===e?"portrait":"landscape"}}),2),t=e[0],r=e[1],o=n.useCallback(function(){var e=window.innerWidth>window.innerHeight?90:0,n={isPortrait:0===e,isLandscape:90===e,orientation:0===e?"portrait":"landscape"};t.orientation!==n.orientation&&r(n)},[t.orientation]);return n.useEffect(function(){return void 0!==("undefined"==typeof window?"undefined":v(window))&&Le&&(o(),window.addEventListener("load",o,!1),window.addEventListener("resize",o,!1)),function(){window.removeEventListener("resize",o,!1),window.removeEventListener("load",o,!1)}},[o]),t},xi.withOrientationChange=function(e){return function(t){function n(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(t=function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return S(e)}(this,y(n).call(this,e))).isEventListenerAdded=!1,t.handleOrientationChange=t.handleOrientationChange.bind(S(t)),t.onOrientationChange=t.onOrientationChange.bind(S(t)),t.onPageLoad=t.onPageLoad.bind(S(t)),t.state={isLandscape:!1,isPortrait:!1},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&E(e,t)}(n,t),g(n,[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var e=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:0===e,isLandscape:90===e})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){void 0!==("undefined"==typeof window?"undefined":v(window))&&Le&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return r.createElement(e,w({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}]),n}(r.Component)},xi}();function ki({message:e,duration:n=3e3,visible:o,setVisible:i}){return r(()=>{const e=setTimeout(()=>i(!1),n);return()=>clearTimeout(e)},[o]),o?t.createElement("div",{style:{position:"fixed",top:"1rem",left:"50%",transform:"translateX(-50%)",background:"rgba(0,0,0,0.8)",color:"#fff",padding:"0.75rem 1.25rem",borderRadius:"0.375rem",fontSize:"14px",zIndex:9999,boxShadow:"0 2px 10px rgba(0,0,0,0.2)"}},e):null}const Pi=({shortForm:e,shareUrl:n})=>{const r=null!=n?n:window.location.href,[o,i]=a(!1);return t.createElement(t.Fragment,null,t.createElement("button",{onClick:()=>E(void 0,void 0,void 0,function*(){try{i(!0),Oi.isMobile&&navigator.share&&e?yield navigator.share({title:e.title,url:r}):(e=>{if(void 0!==navigator.clipboard)navigator.clipboard.writeText(e).then(()=>{});else{const t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select(),t.setSelectionRange(0,99999);try{document.execCommand("copy")}catch(e){console.error("복사 실패",e)}t.setSelectionRange(0,0),document.body.removeChild(t)}})(r)}catch(e){console.error("Fail to copy on clipboard")}}),className:"cursor-pointer"},t.createElement(dt,{size:22}),t.createElement(ki,{message:"공유 링크 복사 완료",setVisible:i,visible:o})))},Ni=({product:e,hideMoreBtn:n,contentId:r})=>{const{isPreview:o,priceText:i}=pi(),[s,l]=a(!1);return t.createElement("div",{style:{height:"80px"},className:"flex gap-2 items-center w-full",onClick:()=>E(void 0,void 0,void 0,function*(){n&&(window.open(e.linkPath,"_blank"),o||(yield oi({contentProductId:e.eventProductId,contentId:r,productId:e.productId})))})},e.thumbPath&&!s?t.createElement(vt,{product:e,onError:()=>l(!0)}):t.createElement(ht,null),t.createElement("div",{className:"flex flex-col text-left p-2 w-full justify-center"},e.brand&&t.createElement("span",{className:"break-keep line-clamp-1 text-gray-500",style:{fontSize:"10px"}},e.brand.brandName),t.createElement("div",{className:"text-gray-800 text-ellipsis line-clamp-1 ",style:{fontSize:"12px"}},e.productName),t.createElement("div",{className:"text-red-500 break-keep",style:{fontSize:"12px"}},i?i+" ":"할인가 ",t.createElement("span",{className:"font-semibold break-keep"},Ve(e.sellingPrice),"원"))))};function Ii(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function Mi(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Ai(...e){return t=>{let n=!1;const r=e.map(e=>{const r=Mi(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():Mi(e[t],null)}}}}function Ri(...t){return e.useCallback(Ai(...t),t)}function Li(...t){const n=t[0];if(1===t.length)return n;const r=()=>{const r=t.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(t){const o=r.reduce((e,{useScope:n,scopeName:r})=>({...e,...n(t)[`__scope${r}`]}),{});return e.useMemo(()=>({[`__scope${n.scopeName}`]:o}),[o])}};return r.scopeName=n.scopeName,r}var _i=globalThis?.document?e.useLayoutEffect:()=>{},Di=e[" useId ".trim().toString()]||(()=>{}),ji=0;function zi(t){const[n,r]=e.useState(Di());return _i(()=>{t||r(e=>e??String(ji++))},[t]),t||(n?`radix-${n}`:"")}var $i=e[" useInsertionEffect ".trim().toString()]||_i;function Fi({prop:t,defaultProp:n,onChange:r=()=>{},caller:o}){const[i,a,s]=function({defaultProp:t,onChange:n}){const[r,o]=e.useState(t),i=e.useRef(r),a=e.useRef(n);return $i(()=>{a.current=n},[n]),e.useEffect(()=>{i.current!==r&&(a.current?.(r),i.current=r)},[r,i]),[r,o,a]}({defaultProp:n,onChange:r}),l=void 0!==t,c=l?t:i;{const n=e.useRef(void 0!==t);e.useEffect(()=>{const e=n.current;if(e!==l){const t=e?"controlled":"uncontrolled",n=l?"controlled":"uncontrolled";console.warn(`${o} is changing from ${t} to ${n}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}n.current=l},[l,o])}const d=e.useCallback(e=>{if(l){const n=function(e){return"function"==typeof e}(e)?e(t):e;n!==t&&s.current?.(n)}else a(e)},[l,t,a,s]);return[c,d]}function Bi(t){const n=Vi(t),r=e.forwardRef((t,r)=>{const{children:o,...i}=t,a=e.Children.toArray(o),s=a.find(Ui);if(s){const t=s.props.children,o=a.map(n=>n===s?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:n);return p(n,{...i,ref:r,children:e.isValidElement(t)?e.cloneElement(t,void 0,o):null})}return p(n,{...i,ref:r,children:o})});return r.displayName=`${t}.Slot`,r}function Vi(t){const n=e.forwardRef((t,n)=>{const{children:r,...o}=t;if(e.isValidElement(r)){const t=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}(r),i=function(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)=>{const t=i(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(o,r.props);return r.type!==e.Fragment&&(i.ref=n?Ai(n,t):t),e.cloneElement(r,i)}return e.Children.count(r)>1?e.Children.only(null):null});return n.displayName=`${t}.SlotClone`,n}var Wi=Symbol("radix.slottable");function Ui(t){return e.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===Wi}var Gi=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,n)=>{const r=Bi(`Primitive.${n}`),o=e.forwardRef((e,t)=>{const{asChild:o,...i}=e,a=o?r:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),p(a,{...i,ref:t})});return o.displayName=`Primitive.${n}`,{...t,[n]:o}},{});function Hi(t){const n=e.useRef(t);return e.useEffect(()=>{n.current=t}),e.useMemo(()=>(...e)=>n.current?.(...e),[])}function qi(t,n=globalThis?.document){const r=Hi(t);e.useEffect(()=>{const e=e=>{"Escape"===e.key&&r(e)};return n.addEventListener("keydown",e,{capture:!0}),()=>n.removeEventListener("keydown",e,{capture:!0})},[r,n])}var Yi,Xi="dismissableLayer.update",Ki="dismissableLayer.pointerDownOutside",Zi="dismissableLayer.focusOutside",Ji=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Qi=e.forwardRef((t,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...c}=t,d=e.useContext(Ji),[u,f]=e.useState(null),m=u?.ownerDocument??globalThis?.document,[,h]=e.useState({}),v=Ri(n,e=>f(e)),g=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),w=g.indexOf(b),y=u?g.indexOf(u):-1,E=d.layersWithOutsidePointerEventsDisabled.size>0,x=y>=w,S=function(t,n=globalThis?.document){const r=Hi(t),o=e.useRef(!1),i=e.useRef(()=>{});return e.useEffect(()=>{const e=e=>{if(e.target&&!o.current){let t=function(){ta(Ki,r,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(n.removeEventListener("click",i.current),i.current=t,n.addEventListener("click",i.current,{once:!0})):t()}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));x&&!n&&(i?.(e),s?.(e),e.defaultPrevented||l?.())},m),T=function(t,n=globalThis?.document){const r=Hi(t),o=e.useRef(!1);return e.useEffect(()=>{const e=e=>{if(e.target&&!o.current){ta(Zi,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))||(a?.(e),s?.(e),e.defaultPrevented||l?.())},m);return qi(e=>{y===d.layers.size-1&&(o?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))},m),e.useEffect(()=>{if(u)return r&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(Yi=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(u)),d.layers.add(u),ea(),()=>{r&&1===d.layersWithOutsidePointerEventsDisabled.size&&(m.body.style.pointerEvents=Yi)}},[u,m,r,d]),e.useEffect(()=>()=>{u&&(d.layers.delete(u),d.layersWithOutsidePointerEventsDisabled.delete(u),ea())},[u,d]),e.useEffect(()=>{const e=()=>h({});return document.addEventListener(Xi,e),()=>document.removeEventListener(Xi,e)},[]),p(Gi.div,{...c,ref:v,style:{pointerEvents:E?x?"auto":"none":void 0,...t.style},onFocusCapture:Ii(t.onFocusCapture,T.onFocusCapture),onBlurCapture:Ii(t.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Ii(t.onPointerDownCapture,S.onPointerDownCapture)})});Qi.displayName="DismissableLayer";function ea(){const e=new CustomEvent(Xi);document.dispatchEvent(e)}function ta(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?function(e,t){e&&h.flushSync(()=>e.dispatchEvent(t))}(o,i):o.dispatchEvent(i)}e.forwardRef((t,n)=>{const r=e.useContext(Ji),o=e.useRef(null),i=Ri(n,o);return e.useEffect(()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),p(Gi.div,{...t,ref:i})}).displayName="DismissableLayerBranch";var na="focusScope.autoFocusOnMount",ra="focusScope.autoFocusOnUnmount",oa={bubbles:!1,cancelable:!0},ia=e.forwardRef((t,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...s}=t,[l,c]=e.useState(null),d=Hi(i),u=Hi(a),f=e.useRef(null),m=Ri(n,e=>c(e)),h=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect(()=>{if(o){let e=function(e){if(h.paused||!l)return;const t=e.target;l.contains(t)?f.current=t:ca(f.current,{select:!0})},t=function(e){if(h.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||ca(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&ca(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,h.paused]),e.useEffect(()=>{if(l){da.add(h);const t=document.activeElement;if(!l.contains(t)){const n=new CustomEvent(na,oa);l.addEventListener(na,d),l.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ca(r,{select:t}),document.activeElement!==n)return}((e=aa(l),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&ca(l))}return()=>{l.removeEventListener(na,d),setTimeout(()=>{const e=new CustomEvent(ra,oa);l.addEventListener(ra,u),l.dispatchEvent(e),e.defaultPrevented||ca(t??document.body,{select:!0}),l.removeEventListener(ra,u),da.remove(h)},0)}}var e},[l,d,u,h]);const v=e.useCallback(e=>{if(!r&&!o)return;if(h.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=aa(e),n=sa(t,e),r=sa(t.reverse(),e);return[n,r]}(t);o&&i?e.shiftKey||n!==i?e.shiftKey&&n===o&&(e.preventDefault(),r&&ca(i,{select:!0})):(e.preventDefault(),r&&ca(o,{select:!0})):n===t&&e.preventDefault()}},[r,o,h.paused]);return p(Gi.div,{tabIndex:-1,...s,ref:m,onKeyDown:v})});function aa(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 sa(e,t){for(const n of e)if(!la(n,{upTo:t}))return n}function la(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 ca(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()}}ia.displayName="FocusScope";var da=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=ua(e,t),e.unshift(t)},remove(t){e=ua(e,t),e[0]?.resume()}}}();function ua(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var pa=e.forwardRef((t,n)=>{const{container:r,...o}=t,[i,a]=e.useState(!1);_i(()=>a(!0),[]);const s=r||i&&globalThis?.document?.body;return s?v.createPortal(p(Gi.div,{...o,ref:n}),s):null});pa.displayName="Portal";var fa=t=>{const{present:n,children:r}=t,o=function(t){const[n,r]=e.useState(),o=e.useRef(null),i=e.useRef(t),a=e.useRef("none"),s=t?"mounted":"unmounted",[l,c]=function(t,n){return e.useReducer((e,t)=>n[e][t]??e,t)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect(()=>{const e=ma(o.current);a.current="mounted"===l?e:"none"},[l]),_i(()=>{const e=o.current,n=i.current;if(n!==t){const r=a.current,o=ma(e);if(t)c("MOUNT");else if("none"===o||"none"===e?.display)c("UNMOUNT");else{c(n&&r!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=t}},[t,c]),_i(()=>{if(n){let e;const t=n.ownerDocument.defaultView??window,r=r=>{const a=ma(o.current).includes(r.animationName);if(r.target===n&&a&&(c("ANIMATION_END"),!i.current)){const r=n.style.animationFillMode;n.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===n.style.animationFillMode&&(n.style.animationFillMode=r)})}},s=e=>{e.target===n&&(a.current=ma(o.current))};return n.addEventListener("animationstart",s),n.addEventListener("animationcancel",r),n.addEventListener("animationend",r),()=>{t.clearTimeout(e),n.removeEventListener("animationstart",s),n.removeEventListener("animationcancel",r),n.removeEventListener("animationend",r)}}c("ANIMATION_END")},[n,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:e.useCallback(e=>{o.current=e?getComputedStyle(e):null,r(e)},[])}}(n),i="function"==typeof r?r({present:o.isPresent}):e.Children.only(r),a=Ri(o.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}(i));return"function"==typeof r||o.isPresent?e.cloneElement(i,{ref:a}):null};function ma(e){return e?.animationName||"none"}fa.displayName="Presence";var ha=0;function va(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ga="right-scroll-bar-position",ba="width-before-scroll-bar";function wa(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var ya="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,Ea=new WeakMap;function xa(e,t){var n,r,o,i=(n=null,r=function(t){return e.forEach(function(e){return wa(e,t)})},(o=a(function(){return{value:n,callback:r,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}})[0]).callback=r,o.facade);return ya(function(){var t=Ea.get(i);if(t){var n=new Set(t),r=new Set(e),o=i.current;n.forEach(function(e){r.has(e)||wa(e,null)}),r.forEach(function(e){n.has(e)||wa(e,o)})}Ea.set(i,e)},[e]),i}function Sa(e){return e}var Ta=function(t){var n=t.sideCar,r=y(t,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=n.read();if(!o)throw new Error("Sidecar medium not found");return e.createElement(o,w({},r))};Ta.isSideCarExport=!0;var Ca=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=Sa);var n=[],r=!1,o={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}}}};return o}(null);return t.options=w({async:!0,ssr:!1},e),t}(),Oa=function(){},ka=e.forwardRef(function(t,n){var r=e.useRef(null),o=e.useState({onScrollCapture:Oa,onWheelCapture:Oa,onTouchMoveCapture:Oa}),i=o[0],a=o[1],s=t.forwardProps,l=t.children,c=t.className,d=t.removeScrollBar,u=t.enabled,p=t.shards,f=t.sideCar,m=t.noRelative,h=t.noIsolation,v=t.inert,g=t.allowPinchZoom,b=t.as,E=void 0===b?"div":b,x=t.gapMode,S=y(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=f,C=xa([r,n]),O=w(w({},S),i);return e.createElement(e.Fragment,null,u&&e.createElement(T,{sideCar:Ca,removeScrollBar:d,shards:p,noRelative:m,noIsolation:h,inert:v,setCallbacks:a,allowPinchZoom:!!g,lockRef:r,gapMode:x}),s?e.cloneElement(e.Children.only(l),w(w({},O),{ref:C})):e.createElement(E,w({},O,{className:c,ref:C}),l))});ka.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ka.classNames={fullWidth:ba,zeroRight:ga};function Pa(){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 Na=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=Pa())&&(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)}}},Ia=function(){var t,n=(t=Na(),function(n,r){e.useEffect(function(){return t.add(n),function(){t.remove()}},[n&&r])});return function(e){var t=e.styles,r=e.dynamic;return n(t,r),null}},Ma={left:0,top:0,right:0,gap:0},Aa=function(e){return parseInt(e||"",10)||0},Ra=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Ma;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[Aa(n),Aa(r),Aa(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])}},La=Ia(),_a="data-scroll-locked",Da=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(_a,"] {\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(ga," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(ba," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(ga," .").concat(ga," {\n right: 0 ").concat(r,";\n }\n \n .").concat(ba," .").concat(ba," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(_a,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},ja=function(){var e=parseInt(document.body.getAttribute(_a)||"0",10);return isFinite(e)?e:0},za=function(t){var n=t.noRelative,r=t.noImportant,o=t.gapMode,i=void 0===o?"margin":o;e.useEffect(function(){return document.body.setAttribute(_a,(ja()+1).toString()),function(){var e=ja()-1;e<=0?document.body.removeAttribute(_a):document.body.setAttribute(_a,e.toString())}},[]);var a=e.useMemo(function(){return Ra(i)},[i]);return e.createElement(La,{styles:Da(a,!n,i,r?"":"!important")})},$a=!1;if("undefined"!=typeof window)try{var Fa=Object.defineProperty({},"passive",{get:function(){return $a=!0,!0}});window.addEventListener("test",Fa,Fa),window.removeEventListener("test",Fa,Fa)}catch(e){$a=!1}var Ba=!!$a&&{passive:!1},Va=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},Wa=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),Ua(e,r)){var o=Ga(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Ua=function(e,t){return"v"===e?function(e){return Va(e,"overflowY")}(t):function(e){return Va(e,"overflowX")}(t)},Ga=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},Ha=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},qa=function(e){return[e.deltaX,e.deltaY]},Ya=function(e){return e&&"current"in e?e.current:e},Xa=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Ka=0,Za=[];function Ja(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Qa,es=(Qa=function(t){var n=e.useRef([]),r=e.useRef([0,0]),o=e.useRef(),i=e.useState(Ka++)[0],a=e.useState(Ia)[0],s=e.useRef(t);e.useEffect(function(){s.current=t},[t]),e.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var e=function(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))}([t.lockRef.current],(t.shards||[]).map(Ya),!0).filter(Boolean);return e.forEach(function(e){return e.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),e.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var l=e.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!s.current.allowPinchZoom;var n,i=Ha(e),a=r.current,l="deltaX"in e?e.deltaX:a[0]-i[0],c="deltaY"in e?e.deltaY:a[1]-i[1],d=e.target,u=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===u&&"range"===d.type)return!1;var p=Wa(u,d);if(!p)return!0;if(p?n=u:(n="v"===u?"h":"v",p=Wa(u,d)),!p)return!1;if(!o.current&&"changedTouches"in e&&(l||c)&&(o.current=n),!n)return!0;var f=o.current||n;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,d=a>0,u=0,p=0;do{if(!s)break;var f=Ga(e,s),m=f[0],h=f[1]-f[2]-i*m;(m||h)&&Ua(e,s)&&(u+=h,p+=m);var v=s.parentNode;s=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return d&&(Math.abs(u)<1||!o)?c=!0:d||!(Math.abs(p)<1)&&o||(c=!0),c}(f,t,e,"h"===f?l:c,!0)},[]),c=e.useCallback(function(e){var t=e;if(Za.length&&Za[Za.length-1]===a){var r="deltaY"in t?qa(t):Ha(t),o=n.current.filter(function(e){return e.name===t.type&&(e.target===t.target||t.target===e.shadowParent)&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,r)})[0];if(o&&o.should)t.cancelable&&t.preventDefault();else if(!o){var i=(s.current.shards||[]).map(Ya).filter(Boolean).filter(function(e){return e.contains(t.target)});(i.length>0?l(t,i[0]):!s.current.noIsolation)&&t.cancelable&&t.preventDefault()}}},[]),d=e.useCallback(function(e,t,r,o){var i={name:e,delta:t,target:r,should:o,shadowParent:Ja(r)};n.current.push(i),setTimeout(function(){n.current=n.current.filter(function(e){return e!==i})},1)},[]),u=e.useCallback(function(e){r.current=Ha(e),o.current=void 0},[]),p=e.useCallback(function(e){d(e.type,qa(e),e.target,l(e,t.lockRef.current))},[]),f=e.useCallback(function(e){d(e.type,Ha(e),e.target,l(e,t.lockRef.current))},[]);e.useEffect(function(){return Za.push(a),t.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:f}),document.addEventListener("wheel",c,Ba),document.addEventListener("touchmove",c,Ba),document.addEventListener("touchstart",u,Ba),function(){Za=Za.filter(function(e){return e!==a}),document.removeEventListener("wheel",c,Ba),document.removeEventListener("touchmove",c,Ba),document.removeEventListener("touchstart",u,Ba)}},[]);var m=t.removeScrollBar,h=t.inert;return e.createElement(e.Fragment,null,h?e.createElement(a,{styles:Xa(i)}):null,m?e.createElement(za,{noRelative:t.noRelative,gapMode:t.gapMode}):null)},Ca.useMedium(Qa),Ta),ts=e.forwardRef(function(t,n){return e.createElement(ka,w({},t,{ref:n,sideCar:es}))});ts.classNames=ka.classNames;var ns=new WeakMap,rs=new WeakMap,os={},is=0,as=function(e){return e&&(e.host||as(e.parentNode))},ss=function(e,t,n,r){var o=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=as(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]);os[n]||(os[n]=new WeakMap);var i=os[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 d=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))d(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,l=(ns.get(e)||0)+1,c=(i.get(e)||0)+1;ns.set(e,l),i.set(e,c),a.push(e),1===l&&o&&rs.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 d(t),s.clear(),is++,function(){a.forEach(function(e){var t=ns.get(e)-1,o=i.get(e)-1;ns.set(e,t),i.set(e,o),t||(rs.has(e)||e.removeAttribute(r),rs.delete(e)),o||e.removeAttribute(n)}),--is||(ns=new WeakMap,ns=new WeakMap,rs=new WeakMap,os={})}},ls=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], script"))),ss(r,o,n,"aria-hidden")):function(){return null}},cs="Dialog",[ds,us]=function(t,n=[]){let r=[];const o=()=>{const n=r.map(t=>e.createContext(t));return function(r){const o=r?.[t]||n;return e.useMemo(()=>({[`__scope${t}`]:{...r,[t]:o}}),[r,o])}};return o.scopeName=t,[function(n,o){const i=e.createContext(o),a=r.length;r=[...r,o];const s=n=>{const{scope:r,children:o,...s}=n,l=r?.[t]?.[a]||i,c=e.useMemo(()=>s,Object.values(s));return p(l.Provider,{value:c,children:o})};return s.displayName=n+"Provider",[s,function(r,s){const l=s?.[t]?.[a]||i,c=e.useContext(l);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${n}\``)}]},Li(o,...n)]}(cs),[ps,fs]=ds(cs),ms=t=>{const{__scopeDialog:n,children:r,open:o,defaultOpen:i,onOpenChange:a,modal:s=!0}=t,l=e.useRef(null),c=e.useRef(null),[d,u]=Fi({prop:o,defaultProp:i??!1,onChange:a,caller:cs});return p(ps,{scope:n,triggerRef:l,contentRef:c,contentId:zi(),titleId:zi(),descriptionId:zi(),open:d,onOpenChange:u,onOpenToggle:e.useCallback(()=>u(e=>!e),[u]),modal:s,children:r})};ms.displayName=cs;var hs="DialogTrigger",vs=e.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=fs(hs,n),i=Ri(t,o.triggerRef);return p(Gi.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Ds(o.open),...r,ref:i,onClick:Ii(e.onClick,o.onOpenToggle)})});vs.displayName=hs;var gs="DialogPortal",[bs,ws]=ds(gs,{forceMount:void 0}),ys=t=>{const{__scopeDialog:n,forceMount:r,children:o,container:i}=t,a=fs(gs,n);return p(bs,{scope:n,forceMount:r,children:e.Children.map(o,e=>p(fa,{present:r||a.open,children:p(pa,{asChild:!0,container:i,children:e})}))})};ys.displayName=gs;var Es="DialogOverlay",xs=e.forwardRef((e,t)=>{const n=ws(Es,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=fs(Es,e.__scopeDialog);return i.modal?p(fa,{present:r||i.open,children:p(Ts,{...o,ref:t})}):null});xs.displayName=Es;var Ss=Bi("DialogOverlay.RemoveScroll"),Ts=e.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=fs(Es,n);return p(ts,{as:Ss,allowPinchZoom:!0,shards:[o.contentRef],children:p(Gi.div,{"data-state":Ds(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Cs="DialogContent",Os=e.forwardRef((e,t)=>{const n=ws(Cs,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=fs(Cs,e.__scopeDialog);return p(fa,{present:r||i.open,children:i.modal?p(ks,{...o,ref:t}):p(Ps,{...o,ref:t})})});Os.displayName=Cs;var ks=e.forwardRef((t,n)=>{const r=fs(Cs,t.__scopeDialog),o=e.useRef(null),i=Ri(n,r.contentRef,o);return e.useEffect(()=>{const e=o.current;if(e)return ls(e)},[]),p(Ns,{...t,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ii(t.onCloseAutoFocus,e=>{e.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:Ii(t.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:Ii(t.onFocusOutside,e=>e.preventDefault())})}),Ps=e.forwardRef((t,n)=>{const r=fs(Cs,t.__scopeDialog),o=e.useRef(!1),i=e.useRef(!1);return p(Ns,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||r.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const n=e.target,a=r.triggerRef.current?.contains(n);a&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}})}),Ns=e.forwardRef((t,n)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,...s}=t,l=fs(Cs,r),c=e.useRef(null),d=Ri(n,c);return e.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??va()),document.body.insertAdjacentElement("beforeend",e[1]??va()),ha++,()=>{1===ha&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),ha--}},[]),m(f,{children:[p(ia,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a,children:p(Qi,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Ds(l.open),...s,ref:d,onDismiss:()=>l.onOpenChange(!1)})}),m(f,{children:[p(Fs,{titleId:l.titleId}),p(Bs,{contentRef:c,descriptionId:l.descriptionId})]})]})}),Is="DialogTitle",Ms=e.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=fs(Is,n);return p(Gi.h2,{id:o.titleId,...r,ref:t})});Ms.displayName=Is;var As="DialogDescription",Rs=e.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=fs(As,n);return p(Gi.p,{id:o.descriptionId,...r,ref:t})});Rs.displayName=As;var Ls="DialogClose",_s=e.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=fs(Ls,n);return p(Gi.button,{type:"button",...r,ref:t,onClick:Ii(e.onClick,()=>o.onOpenChange(!1))})});function Ds(e){return e?"open":"closed"}_s.displayName=Ls;var js="DialogTitleWarning",[zs,$s]=function(t,n){const r=e.createContext(n),o=t=>{const{children:n,...o}=t,i=e.useMemo(()=>o,Object.values(o));return p(r.Provider,{value:i,children:n})};return o.displayName=t+"Provider",[o,function(o){const i=e.useContext(r);if(i)return i;if(void 0!==n)return n;throw new Error(`\`${o}\` must be used within \`${t}\``)}]}(js,{contentName:Cs,titleName:Is,docsSlug:"dialog"}),Fs=({titleId:t})=>{const n=$s(js),r=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return e.useEffect(()=>{if(t){document.getElementById(t)||console.error(r)}},[r,t]),null},Bs=({contentRef:t,descriptionId:n})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${$s("DialogDescriptionWarning").contentName}}.`;return e.useEffect(()=>{const e=t.current?.getAttribute("aria-describedby");if(n&&e){document.getElementById(n)||console.warn(r)}},[r,t,n]),null},Vs=ms,Ws=vs,Us=ys,Gs=xs,Hs=Os,qs=Ms,Ys=Rs,Xs=_s;const Ks=t.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),Zs=()=>{const e=t.useContext(Ks);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};function Js(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function Qs(){return tl(/^iPad/)||tl(/^Mac/)&&navigator.maxTouchPoints>1}function el(){return tl(/^iPhone/)||Qs()}function tl(e){return"undefined"!=typeof window&&null!=window.navigator?e.test(window.navigator.platform):void 0}!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))}("[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(\n[data-state=closed]\n){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-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}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}");const nl="undefined"!=typeof window?s:r;function rl(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}const ol="undefined"!=typeof document&&window.visualViewport;function il(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function al(e){for(il(e)&&(e=e.parentElement);e&&!il(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const sl=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let ll,cl=0;function dl(e={}){let{isDisabled:t}=e;nl(()=>{if(!t)return cl++,1===cl&&el()&&(ll=function(){let e,t=0,n=n=>{e=al(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;fl(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform="translateY(-2000px)",t.focus(),requestAnimationFrame(()=>{t.style.transform=""}))},i=e=>{let t=e.target;fl(t)&&(t.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{t.style.transform="",ol&&(ol.height<window.innerHeight?requestAnimationFrame(()=>{pl(t)}):ol.addEventListener("resize",()=>pl(t),{once:!0}))}))},a=()=>{window.scrollTo(0,0)},s=window.pageXOffset,l=window.pageYOffset,c=rl(function(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}(document.documentElement,"paddingRight",window.innerWidth-document.documentElement.clientWidth+"px"));window.scrollTo(0,0);let d=rl(ul(document,"touchstart",n,{passive:!1,capture:!0}),ul(document,"touchmove",r,{passive:!1,capture:!0}),ul(document,"touchend",o,{passive:!1,capture:!0}),ul(document,"focus",i,!0),ul(window,"scroll",a));return()=>{c(),d(),window.scrollTo(s,l)}}()),()=>{cl--,0===cl&&(null==ll||ll())}},[t])}function ul(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function pl(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=al(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+24&&(t.scrollTop+=r-n)}e=t.parentElement}}function fl(e){return e instanceof HTMLInputElement&&!sl.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function ml(...t){return e.useCallback(function(...e){return t=>e.forEach(e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t))}(...t),t)}const hl=new WeakMap;function vl(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||hl.set(e,r)}const gl=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function bl(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(", ")[gl(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[gl(t)?5:4]):null)}function wl(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}const yl={DURATION:.5,EASE:[.32,.72,0,1]},El=16,xl="vaul-dragging";function Sl(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 Tl({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=Sl(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=Sl(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]}let Cl=null;function Ol({open:e,onOpenChange:n,children:r,onDrag:o,onRelease:i,snapPoints:a,shouldScaleBackground:s=!1,setBackgroundColorOnScale:l=!0,closeThreshold:c=.25,scrollLockTimeout:d=100,dismissible:u=!0,handleOnly:p=!1,fadeFromIndex:f=a&&a.length-1,activeSnapPoint:m,setActiveSnapPoint:h,fixed:v,modal:g=!0,onClose:b,nested:w,noBodyStyles:y=!1,direction:E="bottom",defaultOpen:x=!1,disablePreventScroll:S=!0,snapToSequentialPoint:T=!1,preventScrollRestoration:C=!1,repositionInputs:O=!0,onAnimationEnd:k,container:P,autoFocus:N=!1}){var I,M;const[A=!1,R]=Tl({defaultProp:x,prop:e,onChange:e=>{null==n||n(e),e||w||de(),setTimeout(()=>{null==k||k(e)},1e3*yl.DURATION),e&&!g&&"undefined"!=typeof window&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),e||(document.body.style.pointerEvents="auto")}}),[L,_]=t.useState(!1),[D,j]=t.useState(!1),[z,$]=t.useState(!1),F=t.useRef(null),B=t.useRef(null),V=t.useRef(null),W=t.useRef(null),U=t.useRef(null),G=t.useRef(!1),H=t.useRef(null),q=t.useRef(0),Y=t.useRef(!1),X=t.useRef(!x),K=t.useRef(0),Z=t.useRef(null),J=t.useRef((null==(I=Z.current)?void 0:I.getBoundingClientRect().height)||0),Q=t.useRef((null==(M=Z.current)?void 0:M.getBoundingClientRect().width)||0),ee=t.useRef(0),te=t.useCallback(e=>{a&&e===ae.length-1&&(B.current=new Date)},[]),{activeSnapPoint:ne,activeSnapPointIndex:re,setActiveSnapPoint:oe,onRelease:ie,snapPointsOffset:ae,onDrag:se,shouldFade:le,getPercentageDragged:ce}=function({activeSnapPointProp:e,setActiveSnapPointProp:n,snapPoints:r,drawerRef:o,overlayRef:i,fadeFromIndex:a,onSnapPointChange:s,direction:l="bottom",container:c,snapToSequentialPoint:d}){const[u,p]=Tl({prop:e,defaultProp:null==r?void 0:r[0],onChange:n}),[f,m]=t.useState("undefined"!=typeof window?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);t.useEffect(()=>{function e(){m({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const h=t.useMemo(()=>u===(null==r?void 0:r[r.length-1])||null,[r,u]),v=t.useMemo(()=>{var e;return null!=(e=null==r?void 0:r.findIndex(e=>e===u))?e:null},[r,u]),g=r&&r.length>0&&(a||0===a)&&!Number.isNaN(a)&&r[a]===u||!r,b=t.useMemo(()=>{const e=c?{width:c.getBoundingClientRect().width,height:c.getBoundingClientRect().height}:"undefined"!=typeof window?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var t;return null!=(t=null==r?void 0:r.map(t=>{const n="string"==typeof t;let r=0;if(n&&(r=parseInt(t,10)),gl(l)){const o=n?r:f?t*e.height:0;return f?"bottom"===l?e.height-o:-e.height+o:o}const o=n?r:f?t*e.width:0;return f?"right"===l?e.width-o:-e.width+o:o}))?t:[]},[r,f,c]),w=t.useMemo(()=>null!==v?null==b?void 0:b[v]:null,[b,v]),y=t.useCallback(e=>{var t;const n=null!=(t=null==b?void 0:b.findIndex(t=>t===e))?t:null;s(n),vl(o.current,{transition:`transform ${yl.DURATION}s cubic-bezier(${yl.EASE.join(",")})`,transform:gl(l)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),b&&n!==b.length-1&&void 0!==a&&n!==a&&n<a?vl(i.current,{transition:`opacity ${yl.DURATION}s cubic-bezier(${yl.EASE.join(",")})`,opacity:"0"}):vl(i.current,{transition:`opacity ${yl.DURATION}s cubic-bezier(${yl.EASE.join(",")})`,opacity:"1"}),p(null==r?void 0:r[Math.max(n,0)])},[o.current,r,b,a,i,p]);return t.useEffect(()=>{if(u||e){var t;const n=null!=(t=null==r?void 0:r.findIndex(t=>t===e||t===u))?t:-1;b&&-1!==n&&"number"==typeof b[n]&&y(b[n])}},[u,e,r,b,y]),{isLastSnapPoint:h,activeSnapPoint:u,shouldFade:g,getPercentageDragged:function(e,t){if(!r||"number"!=typeof v||!b||void 0===a)return null;const n=v===a-1;if(v>=a&&t)return 0;if(n&&!t)return 1;if(!g&&!n)return null;const o=n?v+1:v-1,i=n?b[o]-b[o-1]:b[o+1]-b[o],s=e/Math.abs(i);return n?1-s:s},setActiveSnapPoint:p,activeSnapPointIndex:v,onRelease:function({draggedDistance:e,closeDrawer:t,velocity:n,dismissible:o}){if(void 0===a)return;const s="bottom"===l||"right"===l?(null!=w?w:0)-e:(null!=w?w:0)+e,c=0===v,u=e>0;if(v===a-1&&vl(i.current,{transition:`opacity ${yl.DURATION}s cubic-bezier(${yl.EASE.join(",")})`}),!d&&n>2&&!u)return void(o?t():y(b[0]));if(!d&&n>2&&u&&b&&r)return void y(b[r.length-1]);const p=null==b?void 0:b.reduce((e,t)=>"number"!=typeof e||"number"!=typeof t?e:Math.abs(t-s)<Math.abs(e-s)?t:e),f=gl(l)?window.innerHeight:window.innerWidth;if(n>.4&&Math.abs(e)<.4*f){const e=u?1:-1;if(e>0&&h&&r)return void y(b[r.length-1]);if(c&&e<0&&o&&t(),null===v)return;return void y(b[v+e])}y(p)},onDrag:function({draggedDistance:e}){if(null===w)return;const t="bottom"===l||"right"===l?w-e:w+e;("bottom"===l||"right"===l)&&t<b[b.length-1]||("top"===l||"left"===l)&&t>b[b.length-1]||vl(o.current,{transform:gl(l)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})},snapPointsOffset:b}}({snapPoints:a,activeSnapPointProp:m,setActiveSnapPointProp:h,drawerRef:Z,fadeFromIndex:f,overlayRef:F,onSnapPointChange:te,direction:E,container:P,snapToSequentialPoint:T});dl({isDisabled:!A||D||!g||z||!L||!O||!S});const{restorePositionSetting:de}=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),d=t.useCallback(()=>{if(Js()&&null===Cl&&e&&!a){Cl={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]),u=t.useCallback(()=>{if(Js()&&null!==Cl&&!a){const e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Cl),window.requestAnimationFrame(()=>{i&&s!==window.location.href?l(window.location.href):window.scrollTo(t,e)}),Cl=null}},[s]);return t.useEffect(()=>{function e(){c.current=window.scrollY}return e(),window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}},[]),t.useEffect(()=>{if(n)return()=>{"undefined"!=typeof document&&(document.querySelector("[data-vaul-drawer]")||u())}},[n,u]),t.useEffect(()=>{!r&&o&&(e?(!window.matchMedia("(display-mode: standalone)").matches&&d(),n||window.setTimeout(()=>{u()},500)):u())},[e,o,s,n,r,d,u]),{restorePositionSetting:u}}({isOpen:A,modal:g,nested:null!=w&&w,hasBeenOpened:L,preventScrollRestoration:C,noBodyStyles:y});function ue(){return(window.innerWidth-26)/window.innerWidth}function pe(e,t){var n;let r=e;const o=null==(n=window.getSelection())?void 0:n.toString(),i=Z.current?bl(Z.current,E):null,a=new Date;if("SELECT"===r.tagName)return!1;if(r.hasAttribute("data-vaul-no-drag")||r.closest("[data-vaul-no-drag]"))return!1;if("right"===E||"left"===E)return!0;if(B.current&&a.getTime()-B.current.getTime()<500)return!1;if(null!==i&&("bottom"===E?i>0:i<0))return!0;if(o&&o.length>0)return!1;if(U.current&&a.getTime()-U.current.getTime()<d&&0===i)return U.current=a,!1;if(t)return U.current=a,!1;for(;r;){if(r.scrollHeight>r.clientHeight){if(0!==r.scrollTop)return U.current=new Date,!1;if("dialog"===r.getAttribute("role"))return!0}r=r.parentNode}return!0}function fe(e){!function(){if(!D||!Z.current)return;Z.current.classList.remove(xl),G.current=!1,j(!1),W.current=new Date}(),null==b||b(),e||R(!1),setTimeout(()=>{a&&oe(a[0])},1e3*yl.DURATION)}function me(){if(!Z.current)return;const e=document.querySelector("[data-vaul-drawer-wrapper]"),t=bl(Z.current,E);vl(Z.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${yl.DURATION}s cubic-bezier(${yl.EASE.join(",")})`}),vl(F.current,{transition:`opacity ${yl.DURATION}s cubic-bezier(${yl.EASE.join(",")})`,opacity:"1"}),s&&t&&t>0&&A&&vl(e,{borderRadius:"8px",overflow:"hidden",...gl(E)?{transform:`scale(${ue()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${ue()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${yl.DURATION}s`,transitionTimingFunction:`cubic-bezier(${yl.EASE.join(",")})`},!0)}return t.useEffect(()=>{window.requestAnimationFrame(()=>{X.current=!0})},[]),t.useEffect(()=>{var e;function t(){if(!Z.current||!O)return;if(fl(document.activeElement)||Y.current){var e;const t=(null==(e=window.visualViewport)?void 0:e.height)||0,n=window.innerHeight;let r=n-t;const o=Z.current.getBoundingClientRect().height||0,i=o>.8*n;ee.current||(ee.current=o);const s=Z.current.getBoundingClientRect().top;if(Math.abs(K.current-r)>60&&(Y.current=!Y.current),a&&a.length>0&&ae&&re){r+=ae[re]||0}if(K.current=r,o>t||Y.current){const e=Z.current.getBoundingClientRect().height;let n=e;e>t&&(n=t-(i?s:26)),Z.current.style.height=v?e-Math.max(r,0)+"px":`${Math.max(n,t-s)}px`}else(function(){const e=navigator.userAgent;return"undefined"!=typeof window&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))})()||(Z.current.style.height=`${ee.current}px`);a&&a.length>0&&!Y.current?Z.current.style.bottom="0px":Z.current.style.bottom=`${Math.max(r,0)}px`}}return null==(e=window.visualViewport)||e.addEventListener("resize",t),()=>{var e;return null==(e=window.visualViewport)?void 0:e.removeEventListener("resize",t)}},[re,a,ae]),t.useEffect(()=>(A&&(vl(document.documentElement,{scrollBehavior:"auto"}),B.current=new Date),()=>{!function(e,t){if(!(e&&e instanceof HTMLElement))return;let n=hl.get(e);n&&(e.style[t]=n[t])}(document.documentElement,"scrollBehavior")}),[A]),t.useEffect(()=>{g||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[g]),t.createElement(Vs,{defaultOpen:x,onOpenChange:e=>{(u||e)&&(e?_(!0):fe(!0),R(e))},open:A},t.createElement(Ks.Provider,{value:{activeSnapPoint:ne,snapPoints:a,setActiveSnapPoint:oe,drawerRef:Z,overlayRef:F,onOpenChange:n,onPress:function(e){var t,n;(u||a)&&(Z.current&&!Z.current.contains(e.target)||(J.current=(null==(t=Z.current)?void 0:t.getBoundingClientRect().height)||0,Q.current=(null==(n=Z.current)?void 0:n.getBoundingClientRect().width)||0,j(!0),V.current=new Date,el()&&window.addEventListener("touchend",()=>G.current=!1,{once:!0}),e.target.setPointerCapture(e.pointerId),q.current=gl(E)?e.pageY:e.pageX))},onRelease:function(e){if(!D||!Z.current)return;Z.current.classList.remove(xl),G.current=!1,j(!1),W.current=new Date;const t=bl(Z.current,E);if(!e||!pe(e.target,!1)||!t||Number.isNaN(t))return;if(null===V.current)return;const n=W.current.getTime()-V.current.getTime(),r=q.current-(gl(E)?e.pageY:e.pageX),o=Math.abs(r)/n;if(o>.05&&($(!0),setTimeout(()=>{$(!1)},200)),a){return ie({draggedDistance:r*("bottom"===E||"right"===E?1:-1),closeDrawer:fe,velocity:o,dismissible:u}),void(null==i||i(e,!0))}if("bottom"===E||"right"===E?r>0:r<0)return me(),void(null==i||i(e,!0));if(o>.4)return fe(),void(null==i||i(e,!1));var s;const l=Math.min(null!=(s=Z.current.getBoundingClientRect().height)?s:0,window.innerHeight);var d;const p=Math.min(null!=(d=Z.current.getBoundingClientRect().width)?d:0,window.innerWidth),f="left"===E||"right"===E;if(Math.abs(t)>=(f?p:l)*c)return fe(),void(null==i||i(e,!1));null==i||i(e,!0),me()},onDrag:function(e){if(Z.current&&D){const t="bottom"===E||"right"===E?1:-1,n=(q.current-(gl(E)?e.pageY:e.pageX))*t,r=n>0,i=a&&!u&&!r;if(i&&0===re)return;const l=Math.abs(n),c=document.querySelector("[data-vaul-drawer-wrapper]");let d=l/("bottom"===E||"top"===E?J.current:Q.current);const p=ce(l,r);if(null!==p&&(d=p),i&&d>=1)return;if(!G.current&&!pe(e.target,r))return;if(Z.current.classList.add(xl),G.current=!0,vl(Z.current,{transition:"none"}),vl(F.current,{transition:"none"}),a&&se({draggedDistance:n}),r&&!a){const e=function(e){return 8*(Math.log(e+1)-2)}(n),r=Math.min(-1*e,0)*t;return void vl(Z.current,{transform:gl(E)?`translate3d(0, ${r}px, 0)`:`translate3d(${r}px, 0, 0)`})}const m=1-d;if((le||f&&re===f-1)&&(null==o||o(e,d),vl(F.current,{opacity:`${m}`,transition:"none"},!0)),c&&F.current&&s){const e=Math.min(ue()+d*(1-ue()),1),t=8-8*d,n=Math.max(0,14-14*d);vl(c,{borderRadius:`${t}px`,transform:gl(E)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:"none"},!0)}if(!a){const e=l*t;vl(Z.current,{transform:gl(E)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}},dismissible:u,shouldAnimate:X,handleOnly:p,isOpen:A,isDragging:D,shouldFade:le,closeDrawer:fe,onNestedDrag:function(e,t){if(t<0)return;const n=(window.innerWidth-El)/window.innerWidth,r=n+t*(1-n),o=t*El-16;vl(Z.current,{transform:gl(E)?`scale(${r}) translate3d(0, ${o}px, 0)`:`scale(${r}) translate3d(${o}px, 0, 0)`,transition:"none"})},onNestedOpenChange:function(e){const t=e?(window.innerWidth-El)/window.innerWidth:1,n=e?-16:0;H.current&&window.clearTimeout(H.current),vl(Z.current,{transition:`transform ${yl.DURATION}s cubic-bezier(${yl.EASE.join(",")})`,transform:gl(E)?`scale(${t}) translate3d(0, ${n}px, 0)`:`scale(${t}) translate3d(${n}px, 0, 0)`}),!e&&Z.current&&(H.current=setTimeout(()=>{const e=bl(Z.current,E);vl(Z.current,{transition:"none",transform:gl(E)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})},500))},onNestedRelease:function(e,t){const n=gl(E)?window.innerHeight:window.innerWidth,r=t?(n-El)/n:1,o=t?-16:0;t&&vl(Z.current,{transition:`transform ${yl.DURATION}s cubic-bezier(${yl.EASE.join(",")})`,transform:gl(E)?`scale(${r}) translate3d(0, ${o}px, 0)`:`scale(${r}) translate3d(${o}px, 0, 0)`})},keyboardIsOpen:Y,modal:g,snapPointsOffset:ae,activeSnapPointIndex:re,direction:E,shouldScaleBackground:s,setBackgroundColorOnScale:l,noBodyStyles:y,container:P,autoFocus:N}},r))}const kl=t.forwardRef(function({...e},n){const{overlayRef:r,snapPoints:o,onRelease:i,shouldFade:a,isOpen:s,modal:l,shouldAnimate:c}=Zs(),d=ml(n,r),u=o&&o.length>0;if(!l)return null;const p=t.useCallback(e=>i(e),[i]);return t.createElement(Gs,{onMouseUp:p,ref:d,"data-vaul-overlay":"","data-vaul-snap-points":s&&u?"true":"false","data-vaul-snap-points-overlay":s&&a?"true":"false","data-vaul-animate":(null==c?void 0:c.current)?"true":"false",...e})});kl.displayName="Drawer.Overlay";const Pl=t.forwardRef(function({onPointerDownOutside:e,style:n,onOpenAutoFocus:r,...o},i){const{drawerRef:a,onPress:s,onRelease:l,onDrag:c,keyboardIsOpen:d,snapPointsOffset:p,activeSnapPointIndex:f,modal:m,isOpen:h,direction:v,snapPoints:g,container:b,handleOnly:w,shouldAnimate:y,autoFocus:E}=Zs(),[x,S]=t.useState(!1),T=ml(i,a),C=t.useRef(null),O=t.useRef(null),k=t.useRef(!1),P=g&&g.length>0;!function(){const{direction:e,isOpen:n,shouldScaleBackground:r,setBackgroundColorOnScale:o,noBodyStyles:i}=Zs(),a=t.useRef(null),s=u(()=>document.body.style.backgroundColor,[]);function l(){return(window.innerWidth-26)/window.innerWidth}t.useEffect(()=>{if(n&&r){a.current&&clearTimeout(a.current);const t=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!t)return;o&&!i&&wl(document.body,{background:"black"}),wl(t,{transformOrigin:gl(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${yl.DURATION}s`,transitionTimingFunction:`cubic-bezier(${yl.EASE.join(",")})`});const n=wl(t,{borderRadius:"8px",overflow:"hidden",...gl(e)?{transform:`scale(${l()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${l()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{n(),a.current=window.setTimeout(()=>{s?document.body.style.background=s:document.body.style.removeProperty("background")},1e3*yl.DURATION)}}},[n,r,s])}();function N(e){C.current=null,k.current=!1,l(e)}return t.useEffect(()=>{P&&window.requestAnimationFrame(()=>{S(!0)})},[]),t.createElement(Hs,{"data-vaul-drawer-direction":v,"data-vaul-drawer":"","data-vaul-delayed-snap-points":x?"true":"false","data-vaul-snap-points":h&&P?"true":"false","data-vaul-custom-container":b?"true":"false","data-vaul-animate":(null==y?void 0:y.current)?"true":"false",...o,ref:T,style:p&&p.length>0?{"--snap-point-height":`${p[null!=f?f:0]}px`,...n}:n,onPointerDown:e=>{w||(null==o.onPointerDown||o.onPointerDown.call(o,e),C.current={x:e.pageX,y:e.pageY},s(e))},onOpenAutoFocus:e=>{null==r||r(e),E||e.preventDefault()},onPointerDownOutside:t=>{null==e||e(t),m&&!t.defaultPrevented?d.current&&(d.current=!1):t.preventDefault()},onFocusOutside:e=>{m||e.preventDefault()},onPointerMove:e=>{if(O.current=e,w)return;if(null==o.onPointerMove||o.onPointerMove.call(o,e),!C.current)return;const t=e.pageY-C.current.y,n=e.pageX-C.current.x,r="touch"===e.pointerType?10:2,i=((e,t,n=0)=>{if(k.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 k.current=!0,!0})({x:n,y:t},v,r);i?c(e):(Math.abs(n)>r||Math.abs(t)>r)&&(C.current=null)},onPointerUp:e=>{null==o.onPointerUp||o.onPointerUp.call(o,e),C.current=null,k.current=!1,l(e)},onPointerOut:e=>{null==o.onPointerOut||o.onPointerOut.call(o,e),N(O.current)},onContextMenu:e=>{null==o.onContextMenu||o.onContextMenu.call(o,e),O.current&&N(O.current)}})});Pl.displayName="Drawer.Content";const Nl=t.forwardRef(function({preventCycle:e=!1,children:n,...r},o){const{closeDrawer:i,isDragging:a,snapPoints:s,activeSnapPoint:l,setActiveSnapPoint:c,dismissible:d,handleOnly:u,isOpen:p,onPress:f,onDrag:m}=Zs(),h=t.useRef(null),v=t.useRef(!1);function g(){h.current&&window.clearTimeout(h.current),v.current=!1}return t.createElement("div",{onClick:function(){v.current?g():window.setTimeout(()=>{!function(){if(a||e||v.current)return void g();if(g(),!s||0===s.length)return void(d||i());if(l===s[s.length-1]&&d)return void i();const t=s.findIndex(e=>e===l);if(-1===t)return;const n=s[t+1];c(n)}()},120)},onPointerCancel:g,onPointerDown:e=>{u&&f(e),h.current=window.setTimeout(()=>{v.current=!0},250)},onPointerMove:e=>{u&&m(e)},ref:o,"data-vaul-drawer-visible":p?"true":"false","data-vaul-handle":"","aria-hidden":"true",...r},t.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},n))});Nl.displayName="Drawer.Handle";const Il={Root:Ol,NestedRoot:function({onDrag:e,onOpenChange:n,open:r,...o}){const{onNestedDrag:i,onNestedOpenChange:a,onNestedRelease:s}=Zs();if(!i)throw new Error("Drawer.NestedRoot must be placed in another drawer");return t.createElement(Ol,{nested:!0,open:r,onClose:()=>{a(!1)},onDrag:(t,n)=>{i(t,n),null==e||e(t,n)},onOpenChange:e=>{e&&a(e),null==n||n(e)},onRelease:s,...o})},Content:Pl,Overlay:kl,Trigger:Ws,Portal:function(e){const n=Zs(),{container:r=n.container,...o}=e;return t.createElement(Us,{container:r,...o})},Handle:Nl,Close:Xs,Title:qs,Description:Ys};function Ml(t){var n=y(t,[]);return e.createElement(Il.Root,Object.assign({"data-slot":"drawer"},n))}function Al(t){var n=y(t,[]);return e.createElement(Il.Trigger,Object.assign({"data-slot":"drawer-trigger"},n))}function Rl(t){var n=y(t,[]);return e.createElement(Il.Portal,Object.assign({"data-slot":"drawer-portal"},n))}function Ll(t){var{className:n}=t,r=y(t,["className"]);return e.createElement(Il.Overlay,Object.assign({"data-slot":"drawer-overlay",className:$e("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[999999] bg-black/50",n)},r))}function _l(t){var{className:n,children:r}=t,o=y(t,["className","children"]);return e.createElement(Rl,{"data-slot":"drawer-portal"},e.createElement(Ll,null),e.createElement(Il.Content,Object.assign({"data-slot":"drawer-content",className:$e("group/drawer-content bg-background fixed z-[999999] flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",n)},o),e.createElement("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),r))}function Dl(t){var{className:n}=t,r=y(t,["className"]);return e.createElement("div",Object.assign({"data-slot":"drawer-header",className:$e("flex flex-col gap-1.5 p-4",n)},r))}function jl(t){var{className:n}=t,r=y(t,["className"]);return e.createElement(Il.Title,Object.assign({"data-slot":"drawer-title",className:$e("text-foreground font-semibold",n)},r))}const zl=({children:e,products:n,contentId:r})=>{const{isPreview:o}=pi();return t.createElement(Ml,{direction:"right",fadeFromIndex:0,snapPoints:[1]},t.createElement(Al,{className:"w-full"},e),t.createElement(_l,null,t.createElement(Dl,null,t.createElement(jl,null,"상품 목록")),t.createElement("div",{className:"overflow-y-scroll grid-cols-2 grid items-baseline justify-items-center scrollbar-hide"},n.map(e=>e.linkPath?t.createElement("a",{key:e.productId,className:"p-2 text-gray-800 w-full h-full flex flex-col items-center justify-center no-underline",href:e.linkPath,target:"_blank",onClick:()=>E(void 0,void 0,void 0,function*(){o||(yield oi({contentId:r,contentProductId:e.eventProductId,productId:e.productId}))})},t.createElement($l,{product:e})):t.createElement($l,{key:e.productId,product:e})))))},$l=({product:e})=>t.createElement("div",{className:"text-gray-800 w-32"},t.createElement("div",{className:"w-full aspect-square mb-2 border border-[#f4f3f6] rounded "},t.createElement("img",{src:e.thumbPath,alt:e.productName,className:"w-full h-full"})),e.brand&&t.createElement("p",{className:"text-xs text-gray-400 mb-1"},e.brand.brandName),t.createElement("p",{className:"w-full text-[12px] md:text-[15px] mb-1"},e.productName),t.createElement("div",{className:"w-full "},t.createElement("div",{className:"flex"},t.createElement("span",{className:"text-sm text-red-500 mr-2 font-semibold"},e.discount,"%"),t.createElement("span",{className:"font-semibold"},e.sellingPrice.toString().replace(/\B(?=(\d{3})+(?!\d))/g,","),"원")))),Fl=({products:e,useDrawer:n,contentId:r})=>{const o=u(()=>(e=>{if(e.length>=3)return e;const t=[...e];for(;t.length<3;)t.push(...e);return t})(e),[e]);return t.createElement(t.Fragment,null,t.createElement("div",{className:"w-full",style:{height:"80px"}},(null==e?void 0:e.length)?t.createElement(Co,{nested:!0,modules:[Fo,No],slidesPerView:1.1,effect:"cards",autoplay:!0,loop:!0,grabCursor:!0,cardsEffect:{rotate:!1},className:"w-full",style:{height:"80px"}},o.map((o,i)=>t.createElement(Oo,{key:i+o.productId,className:"bg-white overflow-hidden rounded-xl",style:{borderRadius:"10px",height:"80px"}},n?t.createElement(zl,{products:e,contentId:r},t.createElement(Ni,{product:o,productsLength:e.length,contentId:r})):t.createElement(Ni,{product:o,productsLength:e.length,hideMoreBtn:!0,contentId:r})))):null))},Bl=({shortForm:e,useDrawer:n,isPopup:r,shareUrl:o,handleClose:i})=>{const[s,l]=a(!Boolean(r)),[c,d]=a(!0),{logo:u,productsInfo:p,thumbPath:f,title:m,media:h,brand:v,shortsId:g}=e,{objectId:b}=h;return t.createElement("div",{className:"h-full w-full text-sm overflow-hidden text-white relative"},t.createElement("div",{style:{backgroundImage:"linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, transparent 50%, rgba(0,0,0,0.4) 100%)",padding:"15px"},className:"absolute h-full flex flex-col w-full z-[1] justify-between inset-0 bg-gradient-to-b from-black/40 via-transparent to-black/40"},t.createElement("div",{className:"flex gap-2 justify-between "},t.createElement("div",{className:"max-w-16"},(null==u?void 0:u.thumbPath)?t.createElement("img",{className:"mb-1",src:u.thumbPath,alt:u.logoName,width:100,height:100}):null),t.createElement("div",{className:"justify-self-end flex gap-2"},t.createElement("div",{className:"cursor-pointer text-white ",onClick:()=>{d(e=>!e)}},c?t.createElement(lt,{size:20}):t.createElement(ct,{size:20})),t.createElement("div",{className:"cursor-pointer text-white ",onClick:()=>{l(e=>!e)}},s?t.createElement(pt,{size:20}):t.createElement(ut,{size:20})),t.createElement("div",{className:"cursor-pointer text-white ",onClick:i},t.createElement(ft,{size:20})))),t.createElement("div",null,t.createElement("div",{className:"flex justify-between items-end mb-3 gap-3"},t.createElement("div",{className:"w-full"},v&&t.createElement("div",{className:"items-center flex gap-3 mb-2"},t.createElement("div",{className:"w-12 h-12 bg-white rounded-full border overflow-hidden"},t.createElement("img",{src:v.thumbPath,alt:v.brandName,width:100,height:100,className:"object-contain w-full h-full"})),t.createElement("p",{style:{fontSize:"14px",textAlign:"start"}},null==v?void 0:v.brandName)),t.createElement("p",{style:{fontSize:"14px",textAlign:"start"}},m)),t.createElement("div",{className:"flex flex-col items-center",style:{gap:"15px"}},t.createElement(bi,{shortsId:g}),t.createElement("div",{className:"w-[24px] h-[24px] flex items-center justify-center"},t.createElement(Pi,{shortForm:e,shareUrl:o})))),p&&t.createElement(Fl,{products:p,useDrawer:n,contentId:e.shortsId}))),t.createElement(T,{file:Fe(b),thumbnail:`${qe(f)}`,mute:s,isVertical:h.height>h.width,play:c}))},Vl=({collection:e,playerSettings:n})=>{const[r,o]=a(e.contents[0]);return t.createElement("div",{className:"w-full h-full aspect-[9/16]"},t.createElement(Co,{modules:[ko,Do],loop:!0,mousewheel:!0,direction:"vertical",touchEventsTarget:"container",slidesPerView:1,onSlideChangeTransitionEnd:t=>{const n=e.contents[t.realIndex];o(Object.assign({},n))},className:"h-full"},e.contents.map(e=>t.createElement(Oo,{key:e.shortsId,className:"rounded-xl overflow-hidden"},r.shortsId===e.shortsId&&t.createElement("div",{className:"h-full rounded-xl absolute z-[999] w-full"},t.createElement(Bl,{shortForm:r,isPopup:!0})),t.createElement("img",{src:qe(e.thumbPath),alt:e.title,className:"rounded-xl w-full h-full bg-black "+(e.media.width>e.media.height?"object-contain":"object-cover")})))))},Wl=e=>{const{isMobile:n}=e,[r,o]=a("collection"in e?e.collection.contents[0]:null);if(n){if("shortform"in e)return t.createElement(Bl,{shortForm:e.shortform});if(e.collection)return t.createElement(Vl,{collection:e.collection,playerSettings:e.collection.player.shoppingPlayer})}if("shortform"in e){const{layout:n}=e.shortform.player,r=e.shortform.player.shoppingPlayer;switch(n){case Ke.PLATFORM:return t.createElement(ar,{shortform:e.shortform,playerSettings:r,player:t.createElement("div",{className:"aspect-[9/16] h-full rounded-xl border overflow-hidden"},t.createElement(T,{file:Fe(e.shortform.media.objectId)}))});case Ke.HORIZONTAL:return t.createElement(Wo,{shortform:e.shortform,playerSettings:r,player:t.createElement(T,{file:Fe(e.shortform.media.objectId)})});case Ke.VERTICAL:return t.createElement(Go,{shortform:e.shortform,playerSettings:r,player:t.createElement("div",{className:"aspect-[9/16] h-full"},t.createElement(T,{file:Fe(e.shortform.media.objectId)}))});case Ke.GRID:return t.createElement(qo,{shortform:e.shortform,playerSettings:r,player:t.createElement(T,{file:Fe(e.shortform.media.objectId)})})}}else{if(!e.collection||!r)return null;{const{layout:n}=e.collection.player,i=e.collection.player.shoppingPlayer;switch(n){case Ke.PLATFORM:return t.createElement(ar,{shortform:r,playerSettings:i,player:t.createElement("div",{className:"w-full flex items-center justify-center gap-4",style:{height:"calc(-220px + 100vh)"}},t.createElement(hi,{collection:e.collection,playerSettings:i,shortform:r,setShortform:o}))});case Ke.HORIZONTAL:return t.createElement(Wo,{shortform:r,playerSettings:Object.assign({},i),player:t.createElement("div",{className:"h-full aspect-[9/16]"},t.createElement(vi,{collection:e.collection,playerSettings:i,shortform:r,setShortform:o}))});case Ke.VERTICAL:return t.createElement(Go,{playerSettings:Object.assign({},i),shortform:r,player:t.createElement(vi,{collection:e.collection,playerSettings:i,shortform:r,setShortform:o})});case Ke.GRID:return t.createElement(qo,{shortform:r,playerSettings:Object.assign({},i),player:t.createElement(vi,{collection:e.collection,playerSettings:i,shortform:r,setShortform:o})})}}}},Ul=e=>t.createElement(Bl,Object.assign({},e));function Gl(){const[e,t]=a({width:window.innerWidth,height:window.innerHeight});return r(()=>{const e=()=>t({width:window.innerWidth,height:window.innerHeight});return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}const Hl=t.memo(({shortform:e,shareUrl:n,handleClose:r})=>t.createElement(t.Fragment,null,t.createElement("div",{onClick:e=>e.stopPropagation(),className:"overflow-hidden",style:{borderRadius:"10px",overflow:"hidden",width:"100%",height:"100%",backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"cover",backgroundImage:`url(${qe(e.thumbPath)})`}},t.createElement(Bl,{handleClose:r,shortForm:e,useDrawer:!1,isPopup:!0,shareUrl:n})))),ql=t.memo(({shortform:e})=>(Gl().width,t.createElement("div",{onClick:e=>e.stopPropagation(),style:{width:"100%",height:"100%",borderRadius:"10px",backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"cover",backgroundImage:`url(${e.thumbPath.includes("https")?e.thumbPath:`https://${e.thumbPath}`})`}}))),Yl=({shortform:e,shareUrl:n,handleClose:r})=>{const{isActive:o}=c(So),i=c(To),a=Gl().width<430||Oi.isMobile;return t.createElement("div",{className:"flex items-center justify-center w-full h-full select-none"},t.createElement("div",{className:"max-h-full flex items-center justify-center",style:{width:"100%",aspectRatio:a?"auto":"9 / 16",height:a?"100dvh":"auto",maxHeight:a?void 0:"90vh",transform:a?void 0:`scale(${o?1:.8})`,transition:"transform 180ms ease"}},o?t.createElement("div",{className:"flex items-center justify-between w-full h-full text-white"},t.createElement("div",{className:"cursor-pointer absolute",onClick:()=>i.slidePrev(),style:{zIndex:99999,left:a?"0":"-30px"}},t.createElement(ot,{size:24})),t.createElement(Hl,{shortform:e,shareUrl:n,handleClose:r}),t.createElement("div",{className:"cursor-pointer absolute",style:{zIndex:99999,right:a?"0":"-30px"},onClick:()=>i.slideNext()},t.createElement(it,{size:24}))):t.createElement(ql,{shortform:e})))},Xl=({collection:e,initialShortsId:r,onSlideChange:o,onClosePlayer:i})=>{var a;const s=u(()=>Math.max(e.contents.findIndex(e=>e.shortsId===r),0),[e.contents,r]),l=e.contents.length,c=Math.max(l,10),d=null!==(a=Gl().width)&&void 0!==a?a:0,p=d<430||Oi.isMobile,f=p?1:d>=1200?4:d>=900?3:2,m=u(()=>(e=>{const t=[...e];for(;t.length<c;)t.push(...e);return t})(e.contents),[e.contents]),h=n(null);return t.createElement("div",{style:{minHeight:100,minWidth:300},className:"w-full"},t.createElement(Co,{style:{minHeight:100,overflow:"visible"},initialSlide:s,ref:h,lazyPreloadPrevNext:2,className:"w-full",spaceBetween:p?8:d>=1200?24:d>=900?25:16,slidesPerView:f,grabCursor:!0,centeredSlides:1!==f,onSlideChangeTransitionEnd:t=>{const n=t.realIndex%l;null==o||o(n);const r=e.contents[(n+1)%l];var i;i=Fe(r.media.objectId),x||(x=document.createElement("video"),x.muted=!0,x.playsInline=!0,x.preload="metadata",x.loop=!0,x.style.cssText="position:fixed;left:-9999px;top:-9999px;width:1px;height:1px;opacity:0",document.body.appendChild(x)),S!==i&&(x.src=i,x.load(),S=i)},loop:!0},m.map((n,r)=>t.createElement(Oo,{key:r},t.createElement(Yl,{handleClose:i,shortform:n,shareUrl:`${ze.PLAYER_BASE_URL}/collection/${e.colId}?start=${n.shortsId}&layout=5`})))))},Kl=({shortform:e,onThumbnailClick:n,iconSize:r,exposeTitle:o,borderLine:i})=>{const a=u(()=>He(i),[i])?{background:"linear-gradient(#fff,#fff) padding-box, conic-gradient(#f58529,#f77737,#fd1d1d,#833ab4,#c13584,#f58529) border-box",border:"3px solid transparent"}:{background:"#fff",border:"3px solid #fff"};return t.createElement("div",{className:"flex flex-col w-full gap-2",onClick:()=>n(e.shortsId)},t.createElement("div",{className:"rounded-full overflow-hidden cursor-pointer",style:Object.assign({width:r,height:r,padding:4},a)},t.createElement("img",{src:qe(e.thumbPath),alt:"thumbnail",className:"w-full h-full object-cover block rounded-full"})),o&&t.createElement("span",{style:{width:r},className:"text-black overflow-hidden text-[12px] whitespace-nowrap text-center text-clip cursor-default"},e.title))},Zl=ui(e=>({open:!1,setOpen:t=>e({open:t})})),Jl=({product:e,productLength:n,hideMoreBadge:r=!1,contentId:o,lineClamp:i,showMoreBtn:a=!1,openProductPopup:s})=>{const{isPreview:l}=pi();return t.createElement(t.Fragment,null,t.createElement("div",{className:"product-banner border mbus-border",onClick:()=>E(void 0,void 0,void 0,function*(){r&&(window.open(e.linkPath,"_blank"),l||(yield oi({contentProductId:e.eventProductId,contentId:o,productId:e.productId})))})},t.createElement("span",{className:"product-banner__clip","aria-hidden":!0},t.createElement("span",{className:"product-banner__sheen"})),t.createElement("div",{className:"relative",style:{width:"40%",minWidth:"40%"}},t.createElement("img",{style:{borderRadius:"0.625rem"},className:"aspect-square rounded-lg object-cover w-full",src:qe(e.thumbPath),alt:e.productName}),!r&&t.createElement("p",{className:"absolute text-white rounded-lg",style:{backgroundColor:"#797979",top:-10,right:-10,padding:"2px 4px",fontSize:"10px",borderRadius:"0.625rem"}},"+",n)),t.createElement("div",{style:{position:"relative",zIndex:2,minWidth:0,flex:1,paddingRight:24}},t.createElement("p",{style:{display:"-webkit-box",WebkitLineClamp:i||2,WebkitBoxOrient:"vertical",overflow:"hidden",wordBreak:"break-word",fontWeight:600}},e.productName)),t.createElement("span",{className:"product-banner__arrow","aria-hidden":!0},"›")),a&&n>1&&t.createElement("div",{onClick:s,className:" flex items-center justify-center border mbus-border cursor-pointer",style:{borderRadius:"0.625rem",padding:"10px",backgroundColor:"#f5f5f5",fontWeight:600}},"+ 더보기 (",n,")"))},Ql=({products:e,iconSize:n,contentId:r,setSelectedProducts:o,showMoreBtn:i,hideMoreBadge:a})=>{const{setOpen:s}=Zl(),l=()=>{o({productsInfo:e,shortsId:r}),s(!0)};return t.createElement(t.Fragment,null,t.createElement("div",{onClick:()=>E(void 0,void 0,void 0,function*(){1===e.length||i||l()}),className:"flex flex-col gap-2 mt-4 text-gray-800",style:{maxWidth:n||"100%",fontSize:13}},t.createElement(Jl,{showMoreBtn:i,lineClamp:2,product:e[0],contentId:r,productLength:e.length,hideMoreBadge:null!=a?a:1===e.length,openProductPopup:l})))},ec=({shortform:e,onThumbnailClick:n,iconSize:r,exposeTitle:o,rounded:i,borderLine:a,titlePosition:s,exposeProductBanner:l,setSelectedProducts:c,iconRatio:d})=>{const p=u(()=>He(a),[a]);return t.createElement("div",{className:"relative"},t.createElement("div",{onClick:()=>n(e.shortsId),style:Object.assign({width:r,aspectRatio:d},i&&{borderRadius:"10px"}),className:`cursor-pointer p-[3px] ${i&&"rounded-xl"} ${p&&"bg-insta"}`},t.createElement("img",{style:Object.assign({},i&&{borderRadius:"10px"}),src:qe(e.thumbPath),alt:"",className:`w-full h-full object-cover ${i&&"rounded-xl"}`})),o&&t.createElement("p",{style:{width:r,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},className:`my-2 ${s===De.INNER?"absolute bottom-0 left-0 text-white px-2":""} text-[12px] cursor-default truncate`},e.title),l&&t.createElement(Ql,{setSelectedProducts:c,products:e.productsInfo,iconSize:r,contentId:e.shortsId}))},tc=e=>{const{iconShape:n,collection:r}=e;return n===Re.MANY?t.createElement(nc,Object.assign({},e)):t.createElement(rc,Object.assign({},e,{shortform:r.contents[0]}))},nc=e=>{const{collection:n}=e,{setCollection:r,nextKey:o,setNextKey:i,isFetching:a,setIsFetching:s}=fi();return t.createElement(Co,{freeMode:!0,slidesPerView:"auto",spaceBetween:12,onReachEnd:()=>E(void 0,void 0,void 0,function*(){var e,t,l;if(n&&!(a||(null!==(e=n.count)&&void 0!==e?e:Number.MAX_SAFE_INTEGER)<=n.contents.length)){s(!0);try{const e=yield si({collectionId:n.colId,nextKey:o});if(!e||!(null===(t=e.contents)||void 0===t?void 0:t.length))return;i((null===(l=e.contents.at(-1))||void 0===l?void 0:l.shortsId)||"");const a=new Set(n.contents.map(e=>e.shortsId)),s=e.contents.filter(e=>!a.has(e.shortsId));if(!s.length)return;r(Object.assign(Object.assign({},n),{contents:[...n.contents,...s]}))}catch(e){console.error(e)}finally{s(!1)}}})},null==n?void 0:n.contents.map(n=>t.createElement(Oo,{key:n.shortsId,className:"!w-auto"},t.createElement(rc,Object.assign({},e,{shortform:n})))))},rc=e=>{const{iconForm:n}=e;return n===Ae.INSTA?t.createElement(Kl,Object.assign({},e)):t.createElement(ec,Object.assign({},e))};function oc(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function ic(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function ac(...e){return t=>{let n=!1;const r=e.map(e=>{const r=ic(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():ic(e[t],null)}}}}function sc(...t){return e.useCallback(ac(...t),t)}function lc(...t){const n=t[0];if(1===t.length)return n;const r=()=>{const r=t.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(t){const o=r.reduce((e,{useScope:n,scopeName:r})=>({...e,...n(t)[`__scope${r}`]}),{});return e.useMemo(()=>({[`__scope${n.scopeName}`]:o}),[o])}};return r.scopeName=n.scopeName,r}var cc=globalThis?.document?e.useLayoutEffect:()=>{},dc=e[" useId ".trim().toString()]||(()=>{}),uc=0;function pc(t){const[n,r]=e.useState(dc());return cc(()=>{t||r(e=>e??String(uc++))},[t]),t||(n?`radix-${n}`:"")}var fc=e[" useInsertionEffect ".trim().toString()]||cc;function mc({prop:t,defaultProp:n,onChange:r=()=>{},caller:o}){const[i,a,s]=function({defaultProp:t,onChange:n}){const[r,o]=e.useState(t),i=e.useRef(r),a=e.useRef(n);return fc(()=>{a.current=n},[n]),e.useEffect(()=>{i.current!==r&&(a.current?.(r),i.current=r)},[r,i]),[r,o,a]}({defaultProp:n,onChange:r}),l=void 0!==t,c=l?t:i;{const n=e.useRef(void 0!==t);e.useEffect(()=>{const e=n.current;if(e!==l){const t=e?"controlled":"uncontrolled",n=l?"controlled":"uncontrolled";console.warn(`${o} is changing from ${t} to ${n}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}n.current=l},[l,o])}const d=e.useCallback(e=>{if(l){const n=function(e){return"function"==typeof e}(e)?e(t):e;n!==t&&s.current?.(n)}else a(e)},[l,t,a,s]);return[c,d]}function hc(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function vc(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function gc(...e){return t=>{let n=!1;const r=e.map(e=>{const r=vc(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():vc(e[t],null)}}}}function bc(...t){return e.useCallback(gc(...t),t)}function wc(t){const n=e.forwardRef((t,n)=>{const{children:r,...o}=t;if(e.isValidElement(r)){const t=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}(r),i=function(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)=>{const t=i(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(o,r.props);return r.type!==e.Fragment&&(i.ref=n?gc(n,t):t),e.cloneElement(r,i)}return e.Children.count(r)>1?e.Children.only(null):null});return n.displayName=`${t}.SlotClone`,n}var yc=Symbol("radix.slottable");function Ec(t){return e.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===yc}var xc=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,n)=>{const r=function(t){const n=wc(t),r=e.forwardRef((t,r)=>{const{children:o,...i}=t,a=e.Children.toArray(o),s=a.find(Ec);if(s){const t=s.props.children,o=a.map(n=>n===s?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:n);return p(n,{...i,ref:r,children:e.isValidElement(t)?e.cloneElement(t,void 0,o):null})}return p(n,{...i,ref:r,children:o})});return r.displayName=`${t}.Slot`,r}(`Primitive.${n}`),o=e.forwardRef((e,t)=>{const{asChild:o,...i}=e,a=o?r:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),p(a,{...i,ref:t})});return o.displayName=`Primitive.${n}`,{...t,[n]:o}},{});var Sc,Tc="dismissableLayer.update",Cc="dismissableLayer.pointerDownOutside",Oc="dismissableLayer.focusOutside",kc=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Pc=e.forwardRef((t,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...c}=t,d=e.useContext(kc),[u,f]=e.useState(null),m=u?.ownerDocument??globalThis?.document,[,h]=e.useState({}),v=bc(n,e=>f(e)),g=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),w=g.indexOf(b),y=u?g.indexOf(u):-1,E=d.layersWithOutsidePointerEventsDisabled.size>0,x=y>=w,S=function(t,n=globalThis?.document){const r=Hi(t),o=e.useRef(!1),i=e.useRef(()=>{});return e.useEffect(()=>{const e=e=>{if(e.target&&!o.current){let t=function(){Ic(Cc,r,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(n.removeEventListener("click",i.current),i.current=t,n.addEventListener("click",i.current,{once:!0})):t()}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));x&&!n&&(i?.(e),s?.(e),e.defaultPrevented||l?.())},m),T=function(t,n=globalThis?.document){const r=Hi(t),o=e.useRef(!1);return e.useEffect(()=>{const e=e=>{if(e.target&&!o.current){Ic(Oc,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))||(a?.(e),s?.(e),e.defaultPrevented||l?.())},m);return qi(e=>{y===d.layers.size-1&&(o?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))},m),e.useEffect(()=>{if(u)return r&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(Sc=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(u)),d.layers.add(u),Nc(),()=>{r&&1===d.layersWithOutsidePointerEventsDisabled.size&&(m.body.style.pointerEvents=Sc)}},[u,m,r,d]),e.useEffect(()=>()=>{u&&(d.layers.delete(u),d.layersWithOutsidePointerEventsDisabled.delete(u),Nc())},[u,d]),e.useEffect(()=>{const e=()=>h({});return document.addEventListener(Tc,e),()=>document.removeEventListener(Tc,e)},[]),p(xc.div,{...c,ref:v,style:{pointerEvents:E?x?"auto":"none":void 0,...t.style},onFocusCapture:hc(t.onFocusCapture,T.onFocusCapture),onBlurCapture:hc(t.onBlurCapture,T.onBlurCapture),onPointerDownCapture:hc(t.onPointerDownCapture,S.onPointerDownCapture)})});Pc.displayName="DismissableLayer";function Nc(){const e=new CustomEvent(Tc);document.dispatchEvent(e)}function Ic(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?function(e,t){e&&h.flushSync(()=>e.dispatchEvent(t))}(o,i):o.dispatchEvent(i)}e.forwardRef((t,n)=>{const r=e.useContext(kc),o=e.useRef(null),i=bc(n,o);return e.useEffect(()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),p(xc.div,{...t,ref:i})}).displayName="DismissableLayerBranch";var Mc=t=>{const{present:n,children:r}=t,o=function(t){const[n,r]=e.useState(),o=e.useRef(null),i=e.useRef(t),a=e.useRef("none"),s=t?"mounted":"unmounted",[l,c]=function(t,n){return e.useReducer((e,t)=>n[e][t]??e,t)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect(()=>{const e=Ac(o.current);a.current="mounted"===l?e:"none"},[l]),cc(()=>{const e=o.current,n=i.current;if(n!==t){const r=a.current,o=Ac(e);if(t)c("MOUNT");else if("none"===o||"none"===e?.display)c("UNMOUNT");else{c(n&&r!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=t}},[t,c]),cc(()=>{if(n){let e;const t=n.ownerDocument.defaultView??window,r=r=>{const a=Ac(o.current).includes(r.animationName);if(r.target===n&&a&&(c("ANIMATION_END"),!i.current)){const r=n.style.animationFillMode;n.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===n.style.animationFillMode&&(n.style.animationFillMode=r)})}},s=e=>{e.target===n&&(a.current=Ac(o.current))};return n.addEventListener("animationstart",s),n.addEventListener("animationcancel",r),n.addEventListener("animationend",r),()=>{t.clearTimeout(e),n.removeEventListener("animationstart",s),n.removeEventListener("animationcancel",r),n.removeEventListener("animationend",r)}}c("ANIMATION_END")},[n,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:e.useCallback(e=>{o.current=e?getComputedStyle(e):null,r(e)},[])}}(n),i="function"==typeof r?r({present:o.isPresent}):e.Children.only(r),a=sc(o.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}(i));return"function"==typeof r||o.isPresent?e.cloneElement(i,{ref:a}):null};function Ac(e){return e?.animationName||"none"}function Rc(t){const n=Lc(t),r=e.forwardRef((t,r)=>{const{children:o,...i}=t,a=e.Children.toArray(o),s=a.find(Dc);if(s){const t=s.props.children,o=a.map(n=>n===s?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:n);return p(n,{...i,ref:r,children:e.isValidElement(t)?e.cloneElement(t,void 0,o):null})}return p(n,{...i,ref:r,children:o})});return r.displayName=`${t}.Slot`,r}function Lc(t){const n=e.forwardRef((t,n)=>{const{children:r,...o}=t;if(e.isValidElement(r)){const t=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}(r),i=function(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)=>{const t=i(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(o,r.props);return r.type!==e.Fragment&&(i.ref=n?ac(n,t):t),e.cloneElement(r,i)}return e.Children.count(r)>1?e.Children.only(null):null});return n.displayName=`${t}.SlotClone`,n}Mc.displayName="Presence";var _c=Symbol("radix.slottable");function Dc(t){return e.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===_c}var jc=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,n)=>{const r=Rc(`Primitive.${n}`),o=e.forwardRef((e,t)=>{const{asChild:o,...i}=e,a=o?r:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),p(a,{...i,ref:t})});return o.displayName=`Primitive.${n}`,{...t,[n]:o}},{}),zc=0;function $c(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Fc="Dialog",[Bc,Vc]=function(t,n=[]){let r=[];const o=()=>{const n=r.map(t=>e.createContext(t));return function(r){const o=r?.[t]||n;return e.useMemo(()=>({[`__scope${t}`]:{...r,[t]:o}}),[r,o])}};return o.scopeName=t,[function(n,o){const i=e.createContext(o),a=r.length;r=[...r,o];const s=n=>{const{scope:r,children:o,...s}=n,l=r?.[t]?.[a]||i,c=e.useMemo(()=>s,Object.values(s));return p(l.Provider,{value:c,children:o})};return s.displayName=n+"Provider",[s,function(r,s){const l=s?.[t]?.[a]||i,c=e.useContext(l);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${n}\``)}]},lc(o,...n)]}(Fc),[Wc,Uc]=Bc(Fc),Gc=t=>{const{__scopeDialog:n,children:r,open:o,defaultOpen:i,onOpenChange:a,modal:s=!0}=t,l=e.useRef(null),c=e.useRef(null),[d,u]=mc({prop:o,defaultProp:i??!1,onChange:a,caller:Fc});return p(Wc,{scope:n,triggerRef:l,contentRef:c,contentId:pc(),titleId:pc(),descriptionId:pc(),open:d,onOpenChange:u,onOpenToggle:e.useCallback(()=>u(e=>!e),[u]),modal:s,children:r})};Gc.displayName=Fc;var Hc="DialogTrigger";e.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Uc(Hc,n),i=sc(t,o.triggerRef);return p(jc.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":pd(o.open),...r,ref:i,onClick:oc(e.onClick,o.onOpenToggle)})}).displayName=Hc;var qc="DialogPortal",[Yc,Xc]=Bc(qc,{forceMount:void 0}),Kc=t=>{const{__scopeDialog:n,forceMount:r,children:o,container:i}=t,a=Uc(qc,n);return p(Yc,{scope:n,forceMount:r,children:e.Children.map(o,e=>p(Mc,{present:r||a.open,children:p(pa,{asChild:!0,container:i,children:e})}))})};Kc.displayName=qc;var Zc="DialogOverlay",Jc=e.forwardRef((e,t)=>{const n=Xc(Zc,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Uc(Zc,e.__scopeDialog);return i.modal?p(Mc,{present:r||i.open,children:p(ed,{...o,ref:t})}):null});Jc.displayName=Zc;var Qc=Rc("DialogOverlay.RemoveScroll"),ed=e.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Uc(Zc,n);return p(ts,{as:Qc,allowPinchZoom:!0,shards:[o.contentRef],children:p(jc.div,{"data-state":pd(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),td="DialogContent",nd=e.forwardRef((e,t)=>{const n=Xc(td,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Uc(td,e.__scopeDialog);return p(Mc,{present:r||i.open,children:i.modal?p(rd,{...o,ref:t}):p(od,{...o,ref:t})})});nd.displayName=td;var rd=e.forwardRef((t,n)=>{const r=Uc(td,t.__scopeDialog),o=e.useRef(null),i=sc(n,r.contentRef,o);return e.useEffect(()=>{const e=o.current;if(e)return ls(e)},[]),p(id,{...t,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:oc(t.onCloseAutoFocus,e=>{e.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:oc(t.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:oc(t.onFocusOutside,e=>e.preventDefault())})}),od=e.forwardRef((t,n)=>{const r=Uc(td,t.__scopeDialog),o=e.useRef(!1),i=e.useRef(!1);return p(id,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||r.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const n=e.target,a=r.triggerRef.current?.contains(n);a&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}})}),id=e.forwardRef((t,n)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,...s}=t,l=Uc(td,r),c=e.useRef(null),d=sc(n,c);return e.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??$c()),document.body.insertAdjacentElement("beforeend",e[1]??$c()),zc++,()=>{1===zc&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),zc--}},[]),m(f,{children:[p(ia,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a,children:p(Pc,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":pd(l.open),...s,ref:d,onDismiss:()=>l.onOpenChange(!1)})}),m(f,{children:[p(vd,{titleId:l.titleId}),p(gd,{contentRef:c,descriptionId:l.descriptionId})]})]})}),ad="DialogTitle",sd=e.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Uc(ad,n);return p(jc.h2,{id:o.titleId,...r,ref:t})});sd.displayName=ad;var ld="DialogDescription",cd=e.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Uc(ld,n);return p(jc.p,{id:o.descriptionId,...r,ref:t})});cd.displayName=ld;var dd="DialogClose",ud=e.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Uc(dd,n);return p(jc.button,{type:"button",...r,ref:t,onClick:oc(e.onClick,()=>o.onOpenChange(!1))})});function pd(e){return e?"open":"closed"}ud.displayName=dd;var fd="DialogTitleWarning",[md,hd]=function(t,n){const r=e.createContext(n),o=t=>{const{children:n,...o}=t,i=e.useMemo(()=>o,Object.values(o));return p(r.Provider,{value:i,children:n})};return o.displayName=t+"Provider",[o,function(o){const i=e.useContext(r);if(i)return i;if(void 0!==n)return n;throw new Error(`\`${o}\` must be used within \`${t}\``)}]}(fd,{contentName:td,titleName:ad,docsSlug:"dialog"}),vd=({titleId:t})=>{const n=hd(fd),r=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return e.useEffect(()=>{if(t){document.getElementById(t)||console.error(r)}},[r,t]),null},gd=({contentRef:t,descriptionId:n})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${hd("DialogDescriptionWarning").contentName}}.`;return e.useEffect(()=>{const e=t.current?.getAttribute("aria-describedby");if(n&&e){document.getElementById(n)||console.warn(r)}},[r,t,n]),null},bd=Gc,wd=Kc,yd=Jc,Ed=nd,xd=sd,Sd=ud;function Td(t){return e.createElement(bd,Object.assign({"data-slot":"dialog"},t))}function Cd(t){var n=y(t,[]);return e.createElement(wd,Object.assign({"data-slot":"dialog-portal"},n))}function Od(t){var{className:n}=t,r=y(t,["className"]);return e.createElement(yd,Object.assign({"data-slot":"dialog-overlay",className:$e("fixed inset-0 z-50 bg-black/50",n)},r))}function kd(t){var{className:n,children:r,showCloseButton:o=!0,container:i}=t,a=y(t,["className","children","showCloseButton","container"]);return e.createElement(Cd,{"data-slot":"dialog-portal",container:i},e.createElement(Od,null),e.createElement(Ed,Object.assign({"data-slot":"dialog-content",style:{left:"50%",top:"50%",transform:"translate(-50%, -50%)",outline:"none"},className:$e("fixed","z-50 grid w-full max-w-lg sm:mx-0 gap-4 p-6",n)},a),r,o&&e.createElement(Sd,{"data-slot":"dialog-close",style:{right:"calc(var(--spacing) * 4)",top:"calc(var(--spacing) * 4)",outline:"none"},className:$e("absolute right-4 top-4 rounded opacity-70 transition-opacity","hover:opacity-100 focus:outline-none","focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-background","disabled:pointer-events-none"),"aria-label":"Close"},e.createElement(ft,{className:"h-4 w-4 pointer-events-none shrink-0",style:{height:"calc(var(--spacing) * 4)",width:"calc(var(--spacing) * 4)"}}))))}function Pd(t){var{className:n}=t,r=y(t,["className"]);return e.createElement("div",Object.assign({"data-slot":"dialog-header",className:$e("flex flex-col gap-2 text-left",n)},r))}function Nd(t){var{className:n}=t,r=y(t,["className"]);return e.createElement(xd,Object.assign({"data-slot":"dialog-title",className:$e("text-lg leading-none font-semibold",n)},r))}function Id({title:e,children:n,contentClassName:r,hideCloseButton:o=!1,portalContainer:i,description:a}){const{open:s,setOpen:l}=Zl();return t.createElement(Td,{open:s,onOpenChange:l},t.createElement(kd,{container:i,className:r,showCloseButton:!o},t.createElement(Pd,null,t.createElement(Nd,null,e||""),t.createElement(cd,{style:{color:"#5e5e5e",fontSize:"12.5px"}},a||"")),n))}const Md=({products:e,contentId:n})=>{const r=Gl().width<430||Oi.isMobile;return t.createElement("div",{onWheel:e=>e.stopPropagation(),onTouchMove:e=>e.stopPropagation(),className:"grid gap-2 "+(r?"grid-cols-1":"grid-cols-2"),style:{fontSize:13}},e.map(r=>t.createElement(Jl,{key:r.productId,product:r,hideMoreBadge:!0,productLength:e.length,contentId:n})))},Ad=({widgetPlayerOption:e,setCollectionUuid:n,portalContainer:o})=>{const{player:i}=e,[s,l]=a(null),{collection:c}=fi(),{isPreview:d}=pi(),{onSlideChange:u,onCollectionClose:p}=mi(s,l),{setOpen:f,open:m}=Zl();r(()=>{m||(s&&(p(),l(null)),h&&v(null))},[m]);const[h,v]=a();return t.createElement(t.Fragment,null,c&&t.createElement(tc,Object.assign({collection:c},e,{onThumbnailClick:e=>E(void 0,void 0,void 0,function*(){if(i===_e.POPUP){const t=Ue(),r=Ue();if(n(r),l(Object.assign(Object.assign({},c.contents.find(t=>t.shortsId===e)),{uuid:t})),f(!0),d)return;yield Promise.all([ni({contentId:c.colId,uuid:r,type:Jo.COLLECTION,userId:c.userId,isFirstPlay:!Ge(c.colId)}),ni({contentId:e,uuid:t,type:Jo.SHORTS,userId:c.userId,isFirstPlay:!Ge(e)})])}else{const t=(e=>{switch(e){case _e.HORIZONTAL:return je.HORIZONTAL;case _e.VERTICAL:return je.VERTICAL;case _e.GRID:return je.PRODUCTS;case _e.TABLET:return je.TABLET;default:return je.PLATFORM}})(i);open(`${ze.PLAYER_BASE_URL}/collection/${c.colId}?start=${e}&layout=${t}`)}}),setSelectedProducts:v})),h&&t.createElement(Id,{portalContainer:o,title:"상품 목록",contentClassName:"bg-white rounded p-4 product-dialog-container",description:"상품 정보를 확인해 보세요"},t.createElement(Md,{products:h.productsInfo,contentId:h.shortsId})),c&&s&&t.createElement(Id,{portalContainer:o,hideCloseButton:!0,contentClassName:"w-full max-w-none p-0 mx-0"},t.createElement(Xl,{collection:c,initialShortsId:s.shortsId,onClosePlayer:()=>E(void 0,void 0,void 0,function*(){p(),f(!1)}),onSlideChange:u})))};var Rd,Ld={exports:{}},_d={exports:{}},Dd={};var jd,zd,$d,Fd,Bd,Vd,Wd,Ud,Gd,Hd,qd,Yd,Xd,Kd,Zd,Jd={};
27
+ */function Pt(t,n=[]){let r=[];const o=()=>{const n=r.map(t=>e.createContext(t));return function(r){const o=r?.[t]||n;return e.useMemo(()=>({[`__scope${t}`]:{...r,[t]:o}}),[r,o])}};return o.scopeName=t,[function(n,o){const i=e.createContext(o),a=r.length;r=[...r,o];const s=n=>{const{scope:r,children:o,...s}=n,l=r?.[t]?.[a]||i,c=e.useMemo(()=>s,Object.values(s));return m(l.Provider,{value:c,children:o})};return s.displayName=n+"Provider",[s,function(r,s){const l=s?.[t]?.[a]||i,c=e.useContext(l);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${n}\``)}]},Ct(o,...n)]}function Ct(...t){const n=t[0];if(1===t.length)return n;const r=()=>{const r=t.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(t){const o=r.reduce((e,{useScope:n,scopeName:r})=>({...e,...n(t)[`__scope${r}`]}),{});return e.useMemo(()=>({[`__scope${n.scopeName}`]:o}),[o])}};return r.scopeName=n.scopeName,r}function Ot(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Nt(...e){return t=>{let n=!1;const r=e.map(e=>{const r=Ot(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():Ot(e[t],null)}}}}function kt(...t){return e.useCallback(Nt(...t),t)}var Mt=e.forwardRef((t,n)=>{const{children:r,...o}=t,i=e.Children.toArray(r),a=i.find(Dt);if(a){const t=a.props.children,r=i.map(n=>n===a?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:n);return m(It,{...o,ref:n,children:e.isValidElement(t)?e.cloneElement(t,void 0,r):null})}return m(It,{...o,ref:n,children:r})});Mt.displayName="Slot";var It=e.forwardRef((t,n)=>{const{children:r,...o}=t;if(e.isValidElement(r)){const t=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}(r),i=function(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}}(o,r.props);return r.type!==e.Fragment&&(i.ref=n?Nt(n,t):t),e.cloneElement(r,i)}return e.Children.count(r)>1?e.Children.only(null):null});It.displayName="SlotClone";var Rt=({children:e})=>m(h,{children:e});function Dt(t){return e.isValidElement(t)&&t.type===Rt}function At(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function zt(...e){return t=>{let n=!1;const r=e.map(e=>{const r=At(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():At(e[t],null)}}}}function Lt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function _t(t){const n=e.useRef(t);return e.useEffect(()=>{n.current=t}),e.useMemo(()=>(...e)=>n.current?.(...e),[])}function jt({prop:t,defaultProp:n,onChange:r=()=>{}}){const[o,i]=function({defaultProp:t,onChange:n}){const r=e.useState(t),[o]=r,i=e.useRef(o),a=_t(n);return e.useEffect(()=>{i.current!==o&&(a(o),i.current=o)},[o,i,a]),r}({defaultProp:n,onChange:r}),a=void 0!==t,s=a?t:o,l=_t(r);return[s,e.useCallback(e=>{if(a){const n="function"==typeof e?e(t):e;n!==t&&l(n)}else i(e)},[a,t,i,l])]}var Ft=e.forwardRef((t,n)=>{const{children:r,...o}=t,i=e.Children.toArray(r),a=i.find(Bt);if(a){const t=a.props.children,r=i.map(n=>n===a?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:n);return m(Wt,{...o,ref:n,children:e.isValidElement(t)?e.cloneElement(t,void 0,r):null})}return m(Wt,{...o,ref:n,children:r})});Ft.displayName="Slot";var Wt=e.forwardRef((t,n)=>{const{children:r,...o}=t;if(e.isValidElement(r)){const t=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}(r),i=function(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}}(o,r.props);return r.type!==e.Fragment&&(i.ref=n?zt(n,t):t),e.cloneElement(r,i)}return e.Children.count(r)>1?e.Children.only(null):null});Wt.displayName="SlotClone";var $t=({children:e})=>m(h,{children:e});function Bt(t){return e.isValidElement(t)&&t.type===$t}var Ht=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((t,n)=>{const r=e.forwardRef((e,t)=>{const{asChild:r,...o}=e,i=r?Ft:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),m(i,{...o,ref:t})});return r.displayName=`Primitive.${n}`,{...t,[n]:r}},{}),Vt=Boolean(globalThis?.document)?e.useLayoutEffect:()=>{};function Ut(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Gt(...e){return t=>{let n=!1;const r=e.map(e=>{const r=Ut(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():Ut(e[t],null)}}}}function Yt(...t){return e.useCallback(Gt(...t),t)}var qt=e.forwardRef((t,n)=>{const{children:r,...o}=t,i=e.Children.toArray(r),a=i.find(Zt);if(a){const t=a.props.children,r=i.map(n=>n===a?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:n);return m(Xt,{...o,ref:n,children:e.isValidElement(t)?e.cloneElement(t,void 0,r):null})}return m(Xt,{...o,ref:n,children:r})});qt.displayName="Slot";var Xt=e.forwardRef((t,n)=>{const{children:r,...o}=t;if(e.isValidElement(r)){const t=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}(r),i=function(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}}(o,r.props);return r.type!==e.Fragment&&(i.ref=n?Gt(n,t):t),e.cloneElement(r,i)}return e.Children.count(r)>1?e.Children.only(null):null});Xt.displayName="SlotClone";var Kt=({children:e})=>m(h,{children:e});function Zt(t){return e.isValidElement(t)&&t.type===Kt}var Jt=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((t,n)=>{const r=e.forwardRef((e,t)=>{const{asChild:r,...o}=e,i=r?qt:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),m(i,{...o,ref:t})});return r.displayName=`Primitive.${n}`,{...t,[n]:r}},{});var Qt=t=>{const{present:n,children:r}=t,o=function(t){const[n,r]=e.useState(),o=e.useRef({}),i=e.useRef(t),a=e.useRef("none"),s=t?"mounted":"unmounted",[l,c]=function(t,n){return e.useReducer((e,t)=>n[e][t]??e,t)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect(()=>{const e=en(o.current);a.current="mounted"===l?e:"none"},[l]),Vt(()=>{const e=o.current,n=i.current;if(n!==t){const r=a.current,o=en(e);if(t)c("MOUNT");else if("none"===o||"none"===e?.display)c("UNMOUNT");else{c(n&&r!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=t}},[t,c]),Vt(()=>{if(n){let e;const t=n.ownerDocument.defaultView??window,r=r=>{const a=en(o.current).includes(r.animationName);if(r.target===n&&a&&(c("ANIMATION_END"),!i.current)){const r=n.style.animationFillMode;n.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===n.style.animationFillMode&&(n.style.animationFillMode=r)})}},s=e=>{e.target===n&&(a.current=en(o.current))};return n.addEventListener("animationstart",s),n.addEventListener("animationcancel",r),n.addEventListener("animationend",r),()=>{t.clearTimeout(e),n.removeEventListener("animationstart",s),n.removeEventListener("animationcancel",r),n.removeEventListener("animationend",r)}}c("ANIMATION_END")},[n,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:e.useCallback(e=>{e&&(o.current=getComputedStyle(e)),r(e)},[])}}(n),i="function"==typeof r?r({present:o.isPresent}):e.Children.only(r),a=Yt(o.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}(i));return"function"==typeof r||o.isPresent?e.cloneElement(i,{ref:a}):null};function en(e){return e?.animationName||"none"}Qt.displayName="Presence";var tn=Boolean(globalThis?.document)?e.useLayoutEffect:()=>{},nn=e["useId".toString()]||(()=>{}),rn=0;function on(t){const[n,r]=e.useState(nn());return tn(()=>{r(e=>e??String(rn++))},[t]),n?`radix-${n}`:""}var an="Collapsible",[sn,ln]=Pt(an),[cn,dn]=sn(an),un=e.forwardRef((t,n)=>{const{__scopeCollapsible:r,open:o,defaultOpen:i,disabled:a,onOpenChange:s,...l}=t,[c=!1,d]=jt({prop:o,defaultProp:i,onChange:s});return m(cn,{scope:r,disabled:a,contentId:on(),open:c,onOpenToggle:e.useCallback(()=>d(e=>!e),[d]),children:m(Jt.div,{"data-state":vn(c),"data-disabled":a?"":void 0,...l,ref:n})})});un.displayName=an;var pn="CollapsibleTrigger",fn=e.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=dn(pn,n);return m(Jt.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":vn(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:Lt(e.onClick,o.onOpenToggle)})});fn.displayName=pn;var mn="CollapsibleContent",hn=e.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=dn(mn,e.__scopeCollapsible);return m(Qt,{present:n||o.open,children:({present:e})=>m(gn,{...r,ref:t,present:e})})});hn.displayName=mn;var gn=e.forwardRef((t,n)=>{const{__scopeCollapsible:r,present:o,children:i,...a}=t,s=dn(mn,r),[l,c]=e.useState(o),d=e.useRef(null),u=Yt(n,d),p=e.useRef(0),f=p.current,h=e.useRef(0),g=h.current,v=s.open||l,b=e.useRef(v),w=e.useRef(void 0);return e.useEffect(()=>{const e=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(e)},[]),Vt(()=>{const e=d.current;if(e){w.current=w.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";const t=e.getBoundingClientRect();p.current=t.height,h.current=t.width,b.current||(e.style.transitionDuration=w.current.transitionDuration,e.style.animationName=w.current.animationName),c(o)}},[s.open,o]),m(Jt.div,{"data-state":vn(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!v,...a,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...t.style},children:v&&i})});function vn(e){return e?"open":"closed"}var bn=un,wn=fn,yn=hn,En=e.createContext(void 0);var xn="Accordion",Sn=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Tn,Pn,Cn]=function(e){const n=e+"CollectionProvider",[r,o]=Pt(n),[i,a]=r(n,{collectionRef:{current:null},itemMap:new Map}),s=e=>{const{scope:n,children:r}=e,o=t.useRef(null),a=t.useRef(new Map).current;return m(i,{scope:n,itemMap:a,collectionRef:o,children:r})};s.displayName=n;const l=e+"CollectionSlot",c=t.forwardRef((e,t)=>{const{scope:n,children:r}=e,o=kt(t,a(l,n).collectionRef);return m(Mt,{ref:o,children:r})});c.displayName=l;const d=e+"CollectionItemSlot",u="data-radix-collection-item",p=t.forwardRef((e,n)=>{const{scope:r,children:o,...i}=e,s=t.useRef(null),l=kt(n,s),c=a(d,r);return t.useEffect(()=>(c.itemMap.set(s,{ref:s,...i}),()=>{c.itemMap.delete(s)})),m(Mt,{[u]:"",ref:l,children:o})});return p.displayName=d,[{Provider:s,Slot:c,ItemSlot:p},function(n){const r=a(e+"CollectionConsumer",n),o=t.useCallback(()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${u}]`)),n=Array.from(r.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current));return n},[r.collectionRef,r.itemMap]);return o},o]}(xn),[On,Nn]=Pt(xn,[Cn,ln]),kn=ln(),Mn=t.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,i=r;return m(Tn.Provider,{scope:e.__scopeAccordion,children:"multiple"===n?m(Ln,{...i,ref:t}):m(zn,{...o,ref:t})})});Mn.displayName=xn;var[In,Rn]=On(xn),[Dn,An]=On(xn,{collapsible:!1}),zn=t.forwardRef((e,n)=>{const{value:r,defaultValue:o,onValueChange:i=()=>{},collapsible:a=!1,...s}=e,[l,c]=jt({prop:r,defaultProp:o,onChange:i});return m(In,{scope:e.__scopeAccordion,value:l?[l]:[],onItemOpen:c,onItemClose:t.useCallback(()=>a&&c(""),[a,c]),children:m(Dn,{scope:e.__scopeAccordion,collapsible:a,children:m(Fn,{...s,ref:n})})})}),Ln=t.forwardRef((e,n)=>{const{value:r,defaultValue:o,onValueChange:i=()=>{},...a}=e,[s=[],l]=jt({prop:r,defaultProp:o,onChange:i}),c=t.useCallback(e=>l((t=[])=>[...t,e]),[l]),d=t.useCallback(e=>l((t=[])=>t.filter(t=>t!==e)),[l]);return m(In,{scope:e.__scopeAccordion,value:s,onItemOpen:c,onItemClose:d,children:m(Dn,{scope:e.__scopeAccordion,collapsible:!0,children:m(Fn,{...a,ref:n})})})}),[_n,jn]=On(xn),Fn=t.forwardRef((n,r)=>{const{__scopeAccordion:o,disabled:i,dir:a,orientation:s="vertical",...l}=n,c=function(...t){return e.useCallback(zt(...t),t)}(t.useRef(null),r),d=Pn(o),u="ltr"===function(t){const n=e.useContext(En);return t||n||"ltr"}(a),p=Lt(n.onKeyDown,e=>{if(!Sn.includes(e.key))return;const t=e.target,n=d().filter(e=>!e.ref.current?.disabled),r=n.findIndex(e=>e.ref.current===t),o=n.length;if(-1===r)return;e.preventDefault();let i=r;const a=o-1,l=()=>{i=r+1,i>a&&(i=0)},c=()=>{i=r-1,i<0&&(i=a)};switch(e.key){case"Home":i=0;break;case"End":i=a;break;case"ArrowRight":"horizontal"===s&&(u?l():c());break;case"ArrowDown":"vertical"===s&&l();break;case"ArrowLeft":"horizontal"===s&&(u?c():l());break;case"ArrowUp":"vertical"===s&&c()}const p=i%o;n[p].ref.current?.focus()});return m(_n,{scope:o,disabled:i,direction:a,orientation:s,children:m(Tn.Slot,{scope:o,children:m(Ht.div,{...l,"data-orientation":s,ref:c,onKeyDown:i?void 0:p})})})}),Wn="AccordionItem",[$n,Bn]=On(Wn),Hn=t.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,i=jn(Wn,n),a=Rn(Wn,n),s=kn(n),l=on(),c=r&&a.value.includes(r)||!1,d=i.disabled||e.disabled;return m($n,{scope:n,open:c,disabled:d,triggerId:l,children:m(bn,{"data-orientation":i.orientation,"data-state":Kn(c),...s,...o,ref:t,disabled:d,open:c,onOpenChange:e=>{e?a.onItemOpen(r):a.onItemClose(r)}})})});Hn.displayName=Wn;var Vn="AccordionHeader",Un=t.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=jn(xn,n),i=Bn(Vn,n);return m(Ht.h3,{"data-orientation":o.orientation,"data-state":Kn(i.open),"data-disabled":i.disabled?"":void 0,...r,ref:t})});Un.displayName=Vn;var Gn="AccordionTrigger",Yn=t.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=jn(xn,n),i=Bn(Gn,n),a=An(Gn,n),s=kn(n);return m(Tn.ItemSlot,{scope:n,children:m(wn,{"aria-disabled":i.open&&!a.collapsible||void 0,"data-orientation":o.orientation,id:i.triggerId,...s,...r,ref:t})})});Yn.displayName=Gn;var qn="AccordionContent",Xn=t.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=jn(xn,n),i=Bn(qn,n),a=kn(n);return m(yn,{role:"region","aria-labelledby":i.triggerId,"data-orientation":o.orientation,...a,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});function Kn(e){return e?"open":"closed"}Xn.displayName=qn;var Zn=Mn,Jn=Hn,Qn=Un,er=Yn,tr=Xn;function nr(t){var n=S(t,[]);return e.createElement(Zn,Object.assign({"data-slot":"accordion"},n))}function rr(t){var{className:n}=t,r=S(t,["className"]);return e.createElement(Jn,Object.assign({"data-slot":"accordion-item",className:Be("border-b last:border-b-0",n)},r))}function or(t){var{className:n,children:r}=t,o=S(t,["className","children"]);return e.createElement(Qn,{className:"flex"},e.createElement(er,Object.assign({"data-slot":"accordion-trigger",className:Be("focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",n)},o),r,e.createElement(it,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"})))}function ir(t){var{className:n,children:r}=t,o=S(t,["className","children"]);return e.createElement(tr,Object.assign({"data-slot":"accordion-content",className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm"},o),e.createElement("div",{className:Be("pt-0 pb-4",n)},r))}const ar=({title:e,content:n})=>t.createElement(nr,{style:{borderRadius:"0.625rem"},type:"single",collapsible:!0,className:"bg-white px-4",defaultValue:"item"},t.createElement(rr,{value:"item"},t.createElement(or,{className:""},e),t.createElement(ir,{className:"text-gray-700"},n))),sr=({logo:e})=>t.createElement("div",{className:"w-full bg-zinc-700 h-[60px] flex"},t.createElement("div",{className:"my-0 mx-auto w-full px-[24px] flex items-center justify-between"},e?t.createElement("div",{className:"h-10"},t.createElement("img",{src:e.thumbPath,alt:e.logoName,width:100,height:100,className:"object-contain w-full h-full"})):t.createElement("div",null),t.createElement("button",{className:"text-white cursor-pointer"},t.createElement(ht,null)))),lr=e=>{const{playerSettings:n,shortform:{description:r,productsInfo:o,logo:i,brand:a,title:s},player:l}=e;return t.createElement("div",{className:"w-full h-full bg-[#f4f4f4] overflow-scroll"},t.createElement(sr,{logo:i}),t.createElement("div",{className:" w-full h-full flex justify-between p-10 gap-10"},t.createElement("div",{className:""},t.createElement("div",{className:"flex gap-4 w-full mb-2 h-[125px] flex-col"},a?t.createElement("div",{className:"items-center flex gap-3"},a.thumbPath&&t.createElement("div",{className:"w-16 h-16 bg-white rounded-full border "},t.createElement("img",{src:a.thumbPath,alt:a.brandName,width:100,height:100,className:"object-contain w-full h-full rounded-full"})),t.createElement("div",null,t.createElement("p",null,a.brandName),t.createElement("p",{className:"text-lg font-semibold"},s))):t.createElement("p",{className:"text-xl font-semibold"},s),t.createElement(gt,null)),t.createElement("div",{className:"w-full pb-10 flex gap-4 justify-center"},t.createElement("div",{className:"flex gap-3"},l),t.createElement("div",{className:"flex flex-col gap-4 justify-end"},t.createElement(xt,{rounded:!0}),t.createElement(St,{rounded:!0}),t.createElement(Tt,{rounded:!0})))),t.createElement("div",{className:"flex flex-col gap-4 max-w-[40%]"},r&&t.createElement(ar,{title:"숏클립 안내",content:t.createElement("p",{className:"font-medium"},r)}),t.createElement(ar,{title:"상품 목록",content:t.createElement(t.Fragment,null,t.createElement("div",{className:"max-h-[300px] overflow-y-auto font-medium"},o.map((e,n)=>t.createElement(t.Fragment,null,t.createElement(wt,{product:e}),n!==o.length-1&&t.createElement("div",{className:"h-1 w-full border-t my-2"})))),t.createElement("button",{className:"w-full mt-3 border rounded py-2 px-4 cursor-pointer",disabled:!(null==o?void 0:o.length)},"상품 전체 보기"))}),n.comment&&t.createElement(ar,{title:"댓글",content:t.createElement(yt,null)}))))};function cr(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function dr(e,t){void 0===e&&(e={}),void 0===t&&(t={}),Object.keys(t).forEach(n=>{void 0===e[n]?e[n]=t[n]:cr(t[n])&&cr(e[n])&&Object.keys(t[n]).length>0&&dr(e[n],t[n])})}const ur={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function pr(){const e="undefined"!=typeof document?document:{};return dr(e,ur),e}const fr={document:ur,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function mr(){const e="undefined"!=typeof window?window:{};return dr(e,fr),e}function hr(e,t){return void 0===t&&(t=0),setTimeout(e,t)}function gr(){return Date.now()}function vr(e,t){void 0===t&&(t="x");const n=mr();let r,o,i;const a=function(e){const t=mr();let n;return t.getComputedStyle&&(n=t.getComputedStyle(e,null)),!n&&e.currentStyle&&(n=e.currentStyle),n||(n=e.style),n}(e);return n.WebKitCSSMatrix?(o=a.transform||a.webkitTransform,o.split(",").length>6&&(o=o.split(", ").map(e=>e.replace(",",".")).join(", ")),i=new n.WebKitCSSMatrix("none"===o?"":o)):(i=a.MozTransform||a.OTransform||a.MsTransform||a.msTransform||a.transform||a.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),r=i.toString().split(",")),"x"===t&&(o=n.WebKitCSSMatrix?i.m41:16===r.length?parseFloat(r[12]):parseFloat(r[4])),"y"===t&&(o=n.WebKitCSSMatrix?i.m42:16===r.length?parseFloat(r[13]):parseFloat(r[5])),o||0}function br(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function wr(e){return"undefined"!=typeof window&&void 0!==window.HTMLElement?e instanceof HTMLElement:e&&(1===e.nodeType||11===e.nodeType)}function yr(){const e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let n=1;n<arguments.length;n+=1){const r=n<0||arguments.length<=n?void 0:arguments[n];if(null!=r&&!wr(r)){const n=Object.keys(Object(r)).filter(e=>t.indexOf(e)<0);for(let t=0,o=n.length;t<o;t+=1){const o=n[t],i=Object.getOwnPropertyDescriptor(r,o);void 0!==i&&i.enumerable&&(br(e[o])&&br(r[o])?r[o].__swiper__?e[o]=r[o]:yr(e[o],r[o]):!br(e[o])&&br(r[o])?(e[o]={},r[o].__swiper__?e[o]=r[o]:yr(e[o],r[o])):e[o]=r[o])}}}return e}function Er(e,t,n){e.style.setProperty(t,n)}function xr(e){let{swiper:t,targetPosition:n,side:r}=e;const o=mr(),i=-t.translate;let a,s=null;const l=t.params.speed;t.wrapperEl.style.scrollSnapType="none",o.cancelAnimationFrame(t.cssModeFrameID);const c=n>i?"next":"prev",d=(e,t)=>"next"===c&&e>=t||"prev"===c&&e<=t,u=()=>{a=(new Date).getTime(),null===s&&(s=a);const e=Math.max(Math.min((a-s)/l,1),0),c=.5-Math.cos(e*Math.PI)/2;let p=i+c*(n-i);if(d(p,n)&&(p=n),t.wrapperEl.scrollTo({[r]:p}),d(p,n))return t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout(()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[r]:p})}),void o.cancelAnimationFrame(t.cssModeFrameID);t.cssModeFrameID=o.requestAnimationFrame(u)};u()}function Sr(e){return e.querySelector(".swiper-slide-transform")||e.shadowRoot&&e.shadowRoot.querySelector(".swiper-slide-transform")||e}function Tr(e,t){void 0===t&&(t="");const n=[...e.children];return e instanceof HTMLSlotElement&&n.push(...e.assignedElements()),t?n.filter(e=>e.matches(t)):n}function Pr(e){try{return void console.warn(e)}catch(e){}}function Cr(e,t){void 0===t&&(t=[]);const n=document.createElement(e);return n.classList.add(...Array.isArray(t)?t:function(e){return void 0===e&&(e=""),e.trim().split(" ").filter(e=>!!e.trim())}(t)),n}function Or(e,t){return mr().getComputedStyle(e,null).getPropertyValue(t)}function Nr(e){let t,n=e;if(n){for(t=0;null!==(n=n.previousSibling);)1===n.nodeType&&(t+=1);return t}}function kr(e,t,n){const r=mr();return e["width"===t?"offsetWidth":"offsetHeight"]+parseFloat(r.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-right":"margin-top"))+parseFloat(r.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-left":"margin-bottom"))}function Mr(e){return(Array.isArray(e)?e:[e]).filter(e=>!!e)}let Ir,Rr,Dr;function Ar(){return Ir||(Ir=function(){const e=mr(),t=pr();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}()),Ir}function zr(e){return void 0===e&&(e={}),Rr||(Rr=function(e){let{userAgent:t}=void 0===e?{}:e;const n=Ar(),r=mr(),o=r.navigator.platform,i=t||r.navigator.userAgent,a={ios:!1,android:!1},s=r.screen.width,l=r.screen.height,c=i.match(/(Android);?[\s\/]+([\d.]+)?/);let d=i.match(/(iPad).*OS\s([\d_]+)/);const u=i.match(/(iPod)(.*OS\s([\d_]+))?/),p=!d&&i.match(/(iPhone\sOS|iOS)\s([\d_]+)/),f="Win32"===o;let m="MacIntel"===o;return!d&&m&&n.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${s}x${l}`)>=0&&(d=i.match(/(Version)\/([\d.]+)/),d||(d=[0,1,"13_0_0"]),m=!1),c&&!f&&(a.os="android",a.android=!0),(d||p||u)&&(a.os="ios",a.ios=!0),a}(e)),Rr}function Lr(){return Dr||(Dr=function(){const e=mr(),t=zr();let n=!1;function r(){const t=e.navigator.userAgent.toLowerCase();return t.indexOf("safari")>=0&&t.indexOf("chrome")<0&&t.indexOf("android")<0}if(r()){const t=String(e.navigator.userAgent);if(t.includes("Version/")){const[e,r]=t.split("Version/")[1].split(" ")[0].split(".").map(e=>Number(e));n=e<16||16===e&&r<2}}const o=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),i=r();return{isSafari:n||i,needPerspectiveFix:n,need3dFix:i||o&&t.ios,isWebView:o}}()),Dr}var _r={on(e,t,n){const r=this;if(!r.eventsListeners||r.destroyed)return r;if("function"!=typeof t)return r;const o=n?"unshift":"push";return e.split(" ").forEach(e=>{r.eventsListeners[e]||(r.eventsListeners[e]=[]),r.eventsListeners[e][o](t)}),r},once(e,t,n){const r=this;if(!r.eventsListeners||r.destroyed)return r;if("function"!=typeof t)return r;function o(){r.off(e,o),o.__emitterProxy&&delete o.__emitterProxy;for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];t.apply(r,i)}return o.__emitterProxy=t,r.on(e,o,n)},onAny(e,t){const n=this;if(!n.eventsListeners||n.destroyed)return n;if("function"!=typeof e)return n;const r=t?"unshift":"push";return n.eventsAnyListeners.indexOf(e)<0&&n.eventsAnyListeners[r](e),n},offAny(e){const t=this;if(!t.eventsListeners||t.destroyed)return t;if(!t.eventsAnyListeners)return t;const n=t.eventsAnyListeners.indexOf(e);return n>=0&&t.eventsAnyListeners.splice(n,1),t},off(e,t){const n=this;return!n.eventsListeners||n.destroyed?n:n.eventsListeners?(e.split(" ").forEach(e=>{void 0===t?n.eventsListeners[e]=[]:n.eventsListeners[e]&&n.eventsListeners[e].forEach((r,o)=>{(r===t||r.__emitterProxy&&r.__emitterProxy===t)&&n.eventsListeners[e].splice(o,1)})}),n):n},emit(){const e=this;if(!e.eventsListeners||e.destroyed)return e;if(!e.eventsListeners)return e;let t,n,r;for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];"string"==typeof i[0]||Array.isArray(i[0])?(t=i[0],n=i.slice(1,i.length),r=e):(t=i[0].events,n=i[0].data,r=i[0].context||e),n.unshift(r);return(Array.isArray(t)?t:t.split(" ")).forEach(t=>{e.eventsAnyListeners&&e.eventsAnyListeners.length&&e.eventsAnyListeners.forEach(e=>{e.apply(r,[t,...n])}),e.eventsListeners&&e.eventsListeners[t]&&e.eventsListeners[t].forEach(e=>{e.apply(r,n)})}),e}};const jr=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};const Fr=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};const Wr=(e,t)=>{if(!e||e.destroyed||!e.params)return;const n=t.closest(e.isElement?"swiper-slide":`.${e.params.slideClass}`);if(n){let t=n.querySelector(`.${e.params.lazyPreloaderClass}`);!t&&e.isElement&&(n.shadowRoot?t=n.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{n.shadowRoot&&(t=n.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`),t&&t.remove())})),t&&t.remove()}},$r=(e,t)=>{if(!e.slides[t])return;const n=e.slides[t].querySelector('[loading="lazy"]');n&&n.removeAttribute("loading")},Br=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const n=e.slides.length;if(!n||!t||t<0)return;t=Math.min(t,n);const r="auto"===e.params.slidesPerView?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),o=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){const n=o,i=[n-t];return i.push(...Array.from({length:t}).map((e,t)=>n+r+t)),void e.slides.forEach((t,n)=>{i.includes(t.column)&&$r(e,n)})}const i=o+r-1;if(e.params.rewind||e.params.loop)for(let r=o-t;r<=i+t;r+=1){const t=(r%n+n)%n;(t<o||t>i)&&$r(e,t)}else for(let r=Math.max(o-t,0);r<=Math.min(i+t,n-1);r+=1)r!==o&&(r>i||r<o)&&$r(e,r)};var Hr={updateSize:function(){const e=this;let t,n;const r=e.el;t=void 0!==e.params.width&&null!==e.params.width?e.params.width:r.clientWidth,n=void 0!==e.params.height&&null!==e.params.height?e.params.height:r.clientHeight,0===t&&e.isHorizontal()||0===n&&e.isVertical()||(t=t-parseInt(Or(r,"padding-left")||0,10)-parseInt(Or(r,"padding-right")||0,10),n=n-parseInt(Or(r,"padding-top")||0,10)-parseInt(Or(r,"padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(n)&&(n=0),Object.assign(e,{width:t,height:n,size:e.isHorizontal()?t:n}))},updateSlides:function(){const e=this;function t(t,n){return parseFloat(t.getPropertyValue(e.getDirectionLabel(n))||0)}const n=e.params,{wrapperEl:r,slidesEl:o,size:i,rtlTranslate:a,wrongRTL:s}=e,l=e.virtual&&n.virtual.enabled,c=l?e.virtual.slides.length:e.slides.length,d=Tr(o,`.${e.params.slideClass}, swiper-slide`),u=l?e.virtual.slides.length:d.length;let p=[];const f=[],m=[];let h=n.slidesOffsetBefore;"function"==typeof h&&(h=n.slidesOffsetBefore.call(e));let g=n.slidesOffsetAfter;"function"==typeof g&&(g=n.slidesOffsetAfter.call(e));const v=e.snapGrid.length,b=e.slidesGrid.length;let w=n.spaceBetween,y=-h,E=0,x=0;if(void 0===i)return;"string"==typeof w&&w.indexOf("%")>=0?w=parseFloat(w.replace("%",""))/100*i:"string"==typeof w&&(w=parseFloat(w)),e.virtualSize=-w,d.forEach(e=>{a?e.style.marginLeft="":e.style.marginRight="",e.style.marginBottom="",e.style.marginTop=""}),n.centeredSlides&&n.cssMode&&(Er(r,"--swiper-centered-offset-before",""),Er(r,"--swiper-centered-offset-after",""));const S=n.grid&&n.grid.rows>1&&e.grid;let T;S?e.grid.initSlides(d):e.grid&&e.grid.unsetSlides();const P="auto"===n.slidesPerView&&n.breakpoints&&Object.keys(n.breakpoints).filter(e=>void 0!==n.breakpoints[e].slidesPerView).length>0;for(let r=0;r<u;r+=1){let o;if(T=0,d[r]&&(o=d[r]),S&&e.grid.updateSlide(r,o,d),!d[r]||"none"!==Or(o,"display")){if("auto"===n.slidesPerView){P&&(d[r].style[e.getDirectionLabel("width")]="");const i=getComputedStyle(o),a=o.style.transform,s=o.style.webkitTransform;if(a&&(o.style.transform="none"),s&&(o.style.webkitTransform="none"),n.roundLengths)T=e.isHorizontal()?kr(o,"width"):kr(o,"height");else{const e=t(i,"width"),n=t(i,"padding-left"),r=t(i,"padding-right"),a=t(i,"margin-left"),s=t(i,"margin-right"),l=i.getPropertyValue("box-sizing");if(l&&"border-box"===l)T=e+a+s;else{const{clientWidth:t,offsetWidth:i}=o;T=e+n+r+a+s+(i-t)}}a&&(o.style.transform=a),s&&(o.style.webkitTransform=s),n.roundLengths&&(T=Math.floor(T))}else T=(i-(n.slidesPerView-1)*w)/n.slidesPerView,n.roundLengths&&(T=Math.floor(T)),d[r]&&(d[r].style[e.getDirectionLabel("width")]=`${T}px`);d[r]&&(d[r].swiperSlideSize=T),m.push(T),n.centeredSlides?(y=y+T/2+E/2+w,0===E&&0!==r&&(y=y-i/2-w),0===r&&(y=y-i/2-w),Math.abs(y)<.001&&(y=0),n.roundLengths&&(y=Math.floor(y)),x%n.slidesPerGroup===0&&p.push(y),f.push(y)):(n.roundLengths&&(y=Math.floor(y)),(x-Math.min(e.params.slidesPerGroupSkip,x))%e.params.slidesPerGroup===0&&p.push(y),f.push(y),y=y+T+w),e.virtualSize+=T+w,E=T,x+=1}}if(e.virtualSize=Math.max(e.virtualSize,i)+g,a&&s&&("slide"===n.effect||"coverflow"===n.effect)&&(r.style.width=`${e.virtualSize+w}px`),n.setWrapperSize&&(r.style[e.getDirectionLabel("width")]=`${e.virtualSize+w}px`),S&&e.grid.updateWrapperSize(T,p),!n.centeredSlides){const t=[];for(let r=0;r<p.length;r+=1){let o=p[r];n.roundLengths&&(o=Math.floor(o)),p[r]<=e.virtualSize-i&&t.push(o)}p=t,Math.floor(e.virtualSize-i)-Math.floor(p[p.length-1])>1&&p.push(e.virtualSize-i)}if(l&&n.loop){const t=m[0]+w;if(n.slidesPerGroup>1){const r=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/n.slidesPerGroup),o=t*n.slidesPerGroup;for(let e=0;e<r;e+=1)p.push(p[p.length-1]+o)}for(let r=0;r<e.virtual.slidesBefore+e.virtual.slidesAfter;r+=1)1===n.slidesPerGroup&&p.push(p[p.length-1]+t),f.push(f[f.length-1]+t),e.virtualSize+=t}if(0===p.length&&(p=[0]),0!==w){const t=e.isHorizontal()&&a?"marginLeft":e.getDirectionLabel("marginRight");d.filter((e,t)=>!(n.cssMode&&!n.loop)||t!==d.length-1).forEach(e=>{e.style[t]=`${w}px`})}if(n.centeredSlides&&n.centeredSlidesBounds){let e=0;m.forEach(t=>{e+=t+(w||0)}),e-=w;const t=e>i?e-i:0;p=p.map(e=>e<=0?-h:e>t?t+g:e)}if(n.centerInsufficientSlides){let e=0;m.forEach(t=>{e+=t+(w||0)}),e-=w;const t=(n.slidesOffsetBefore||0)+(n.slidesOffsetAfter||0);if(e+t<i){const n=(i-e-t)/2;p.forEach((e,t)=>{p[t]=e-n}),f.forEach((e,t)=>{f[t]=e+n})}}if(Object.assign(e,{slides:d,snapGrid:p,slidesGrid:f,slidesSizesGrid:m}),n.centeredSlides&&n.cssMode&&!n.centeredSlidesBounds){Er(r,"--swiper-centered-offset-before",-p[0]+"px"),Er(r,"--swiper-centered-offset-after",e.size/2-m[m.length-1]/2+"px");const t=-e.snapGrid[0],n=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(e=>e+t),e.slidesGrid=e.slidesGrid.map(e=>e+n)}if(u!==c&&e.emit("slidesLengthChange"),p.length!==v&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),f.length!==b&&e.emit("slidesGridLengthChange"),n.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!(l||n.cssMode||"slide"!==n.effect&&"fade"!==n.effect)){const t=`${n.containerModifierClass}backface-hidden`,r=e.el.classList.contains(t);u<=n.maxBackfaceHiddenSlides?r||e.el.classList.add(t):r&&e.el.classList.remove(t)}},updateAutoHeight:function(e){const t=this,n=[],r=t.virtual&&t.params.virtual.enabled;let o,i=0;"number"==typeof e?t.setTransition(e):!0===e&&t.setTransition(t.params.speed);const a=e=>r?t.slides[t.getSlideIndexByData(e)]:t.slides[e];if("auto"!==t.params.slidesPerView&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach(e=>{n.push(e)});else for(o=0;o<Math.ceil(t.params.slidesPerView);o+=1){const e=t.activeIndex+o;if(e>t.slides.length&&!r)break;n.push(a(e))}else n.push(a(t.activeIndex));for(o=0;o<n.length;o+=1)if(void 0!==n[o]){const e=n[o].offsetHeight;i=e>i?e:i}(i||0===i)&&(t.wrapperEl.style.height=`${i}px`)},updateSlidesOffset:function(){const e=this,t=e.slides,n=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let r=0;r<t.length;r+=1)t[r].swiperSlideOffset=(e.isHorizontal()?t[r].offsetLeft:t[r].offsetTop)-n-e.cssOverflowAdjustment()},updateSlidesProgress:function(e){void 0===e&&(e=this&&this.translate||0);const t=this,n=t.params,{slides:r,rtlTranslate:o,snapGrid:i}=t;if(0===r.length)return;void 0===r[0].swiperSlideOffset&&t.updateSlidesOffset();let a=-e;o&&(a=e),t.visibleSlidesIndexes=[],t.visibleSlides=[];let s=n.spaceBetween;"string"==typeof s&&s.indexOf("%")>=0?s=parseFloat(s.replace("%",""))/100*t.size:"string"==typeof s&&(s=parseFloat(s));for(let e=0;e<r.length;e+=1){const l=r[e];let c=l.swiperSlideOffset;n.cssMode&&n.centeredSlides&&(c-=r[0].swiperSlideOffset);const d=(a+(n.centeredSlides?t.minTranslate():0)-c)/(l.swiperSlideSize+s),u=(a-i[0]+(n.centeredSlides?t.minTranslate():0)-c)/(l.swiperSlideSize+s),p=-(a-c),f=p+t.slidesSizesGrid[e],m=p>=0&&p<=t.size-t.slidesSizesGrid[e],h=p>=0&&p<t.size-1||f>1&&f<=t.size||p<=0&&f>=t.size;h&&(t.visibleSlides.push(l),t.visibleSlidesIndexes.push(e)),jr(l,h,n.slideVisibleClass),jr(l,m,n.slideFullyVisibleClass),l.progress=o?-d:d,l.originalProgress=o?-u:u}},updateProgress:function(e){const t=this;if(void 0===e){const n=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*n||0}const n=t.params,r=t.maxTranslate()-t.minTranslate();let{progress:o,isBeginning:i,isEnd:a,progressLoop:s}=t;const l=i,c=a;if(0===r)o=0,i=!0,a=!0;else{o=(e-t.minTranslate())/r;const n=Math.abs(e-t.minTranslate())<1,s=Math.abs(e-t.maxTranslate())<1;i=n||o<=0,a=s||o>=1,n&&(o=0),s&&(o=1)}if(n.loop){const n=t.getSlideIndexByData(0),r=t.getSlideIndexByData(t.slides.length-1),o=t.slidesGrid[n],i=t.slidesGrid[r],a=t.slidesGrid[t.slidesGrid.length-1],l=Math.abs(e);s=l>=o?(l-o)/a:(l+a-i)/a,s>1&&(s-=1)}Object.assign(t,{progress:o,progressLoop:s,isBeginning:i,isEnd:a}),(n.watchSlidesProgress||n.centeredSlides&&n.autoHeight)&&t.updateSlidesProgress(e),i&&!l&&t.emit("reachBeginning toEdge"),a&&!c&&t.emit("reachEnd toEdge"),(l&&!i||c&&!a)&&t.emit("fromEdge"),t.emit("progress",o)},updateSlidesClasses:function(){const e=this,{slides:t,params:n,slidesEl:r,activeIndex:o}=e,i=e.virtual&&n.virtual.enabled,a=e.grid&&n.grid&&n.grid.rows>1,s=e=>Tr(r,`.${n.slideClass}${e}, swiper-slide${e}`)[0];let l,c,d;if(i)if(n.loop){let t=o-e.virtual.slidesBefore;t<0&&(t=e.virtual.slides.length+t),t>=e.virtual.slides.length&&(t-=e.virtual.slides.length),l=s(`[data-swiper-slide-index="${t}"]`)}else l=s(`[data-swiper-slide-index="${o}"]`);else a?(l=t.filter(e=>e.column===o)[0],d=t.filter(e=>e.column===o+1)[0],c=t.filter(e=>e.column===o-1)[0]):l=t[o];l&&(a||(d=function(e,t){const n=[];for(;e.nextElementSibling;){const r=e.nextElementSibling;t?r.matches(t)&&n.push(r):n.push(r),e=r}return n}(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!d&&(d=t[0]),c=function(e,t){const n=[];for(;e.previousElementSibling;){const r=e.previousElementSibling;t?r.matches(t)&&n.push(r):n.push(r),e=r}return n}(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&0===!c&&(c=t[t.length-1]))),t.forEach(e=>{Fr(e,e===l,n.slideActiveClass),Fr(e,e===d,n.slideNextClass),Fr(e,e===c,n.slidePrevClass)}),e.emitSlidesClasses()},updateActiveIndex:function(e){const t=this,n=t.rtlTranslate?t.translate:-t.translate,{snapGrid:r,params:o,activeIndex:i,realIndex:a,snapIndex:s}=t;let l,c=e;const d=e=>{let n=e-t.virtual.slidesBefore;return n<0&&(n=t.virtual.slides.length+n),n>=t.virtual.slides.length&&(n-=t.virtual.slides.length),n};if(void 0===c&&(c=function(e){const{slidesGrid:t,params:n}=e,r=e.rtlTranslate?e.translate:-e.translate;let o;for(let e=0;e<t.length;e+=1)void 0!==t[e+1]?r>=t[e]&&r<t[e+1]-(t[e+1]-t[e])/2?o=e:r>=t[e]&&r<t[e+1]&&(o=e+1):r>=t[e]&&(o=e);return n.normalizeSlideIndex&&(o<0||void 0===o)&&(o=0),o}(t)),r.indexOf(n)>=0)l=r.indexOf(n);else{const e=Math.min(o.slidesPerGroupSkip,c);l=e+Math.floor((c-e)/o.slidesPerGroup)}if(l>=r.length&&(l=r.length-1),c===i&&!t.params.loop)return void(l!==s&&(t.snapIndex=l,t.emit("snapIndexChange")));if(c===i&&t.params.loop&&t.virtual&&t.params.virtual.enabled)return void(t.realIndex=d(c));const u=t.grid&&o.grid&&o.grid.rows>1;let p;if(t.virtual&&o.virtual.enabled&&o.loop)p=d(c);else if(u){const e=t.slides.filter(e=>e.column===c)[0];let n=parseInt(e.getAttribute("data-swiper-slide-index"),10);Number.isNaN(n)&&(n=Math.max(t.slides.indexOf(e),0)),p=Math.floor(n/o.grid.rows)}else if(t.slides[c]){const e=t.slides[c].getAttribute("data-swiper-slide-index");p=e?parseInt(e,10):c}else p=c;Object.assign(t,{previousSnapIndex:s,snapIndex:l,previousRealIndex:a,realIndex:p,previousIndex:i,activeIndex:c}),t.initialized&&Br(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(a!==p&&t.emit("realIndexChange"),t.emit("slideChange"))},updateClickedSlide:function(e,t){const n=this,r=n.params;let o=e.closest(`.${r.slideClass}, swiper-slide`);!o&&n.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach(e=>{!o&&e.matches&&e.matches(`.${r.slideClass}, swiper-slide`)&&(o=e)});let i,a=!1;if(o)for(let e=0;e<n.slides.length;e+=1)if(n.slides[e]===o){a=!0,i=e;break}if(!o||!a)return n.clickedSlide=void 0,void(n.clickedIndex=void 0);n.clickedSlide=o,n.virtual&&n.params.virtual.enabled?n.clickedIndex=parseInt(o.getAttribute("data-swiper-slide-index"),10):n.clickedIndex=i,r.slideToClickedSlide&&void 0!==n.clickedIndex&&n.clickedIndex!==n.activeIndex&&n.slideToClickedSlide()}};var Vr={getTranslate:function(e){void 0===e&&(e=this.isHorizontal()?"x":"y");const{params:t,rtlTranslate:n,translate:r,wrapperEl:o}=this;if(t.virtualTranslate)return n?-r:r;if(t.cssMode)return r;let i=vr(o,e);return i+=this.cssOverflowAdjustment(),n&&(i=-i),i||0},setTranslate:function(e,t){const n=this,{rtlTranslate:r,params:o,wrapperEl:i,progress:a}=n;let s,l=0,c=0;n.isHorizontal()?l=r?-e:e:c=e,o.roundLengths&&(l=Math.floor(l),c=Math.floor(c)),n.previousTranslate=n.translate,n.translate=n.isHorizontal()?l:c,o.cssMode?i[n.isHorizontal()?"scrollLeft":"scrollTop"]=n.isHorizontal()?-l:-c:o.virtualTranslate||(n.isHorizontal()?l-=n.cssOverflowAdjustment():c-=n.cssOverflowAdjustment(),i.style.transform=`translate3d(${l}px, ${c}px, 0px)`);const d=n.maxTranslate()-n.minTranslate();s=0===d?0:(e-n.minTranslate())/d,s!==a&&n.updateProgress(e),n.emit("setTranslate",n.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(e,t,n,r,o){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===n&&(n=!0),void 0===r&&(r=!0);const i=this,{params:a,wrapperEl:s}=i;if(i.animating&&a.preventInteractionOnTransition)return!1;const l=i.minTranslate(),c=i.maxTranslate();let d;if(d=r&&e>l?l:r&&e<c?c:e,i.updateProgress(d),a.cssMode){const e=i.isHorizontal();if(0===t)s[e?"scrollLeft":"scrollTop"]=-d;else{if(!i.support.smoothScroll)return xr({swiper:i,targetPosition:-d,side:e?"left":"top"}),!0;s.scrollTo({[e?"left":"top"]:-d,behavior:"smooth"})}return!0}return 0===t?(i.setTransition(0),i.setTranslate(d),n&&(i.emit("beforeTransitionStart",t,o),i.emit("transitionEnd"))):(i.setTransition(t),i.setTranslate(d),n&&(i.emit("beforeTransitionStart",t,o),i.emit("transitionStart")),i.animating||(i.animating=!0,i.onTranslateToWrapperTransitionEnd||(i.onTranslateToWrapperTransitionEnd=function(e){i&&!i.destroyed&&e.target===this&&(i.wrapperEl.removeEventListener("transitionend",i.onTranslateToWrapperTransitionEnd),i.onTranslateToWrapperTransitionEnd=null,delete i.onTranslateToWrapperTransitionEnd,i.animating=!1,n&&i.emit("transitionEnd"))}),i.wrapperEl.addEventListener("transitionend",i.onTranslateToWrapperTransitionEnd))),!0}};function Ur(e){let{swiper:t,runCallbacks:n,direction:r,step:o}=e;const{activeIndex:i,previousIndex:a}=t;let s=r;if(s||(s=i>a?"next":i<a?"prev":"reset"),t.emit(`transition${o}`),n&&i!==a){if("reset"===s)return void t.emit(`slideResetTransition${o}`);t.emit(`slideChangeTransition${o}`),"next"===s?t.emit(`slideNextTransition${o}`):t.emit(`slidePrevTransition${o}`)}}var Gr={slideTo:function(e,t,n,r,o){void 0===e&&(e=0),void 0===n&&(n=!0),"string"==typeof e&&(e=parseInt(e,10));const i=this;let a=e;a<0&&(a=0);const{params:s,snapGrid:l,slidesGrid:c,previousIndex:d,activeIndex:u,rtlTranslate:p,wrapperEl:f,enabled:m}=i;if(!m&&!r&&!o||i.destroyed||i.animating&&s.preventInteractionOnTransition)return!1;void 0===t&&(t=i.params.speed);const h=Math.min(i.params.slidesPerGroupSkip,a);let g=h+Math.floor((a-h)/i.params.slidesPerGroup);g>=l.length&&(g=l.length-1);const v=-l[g];if(s.normalizeSlideIndex)for(let e=0;e<c.length;e+=1){const t=-Math.floor(100*v),n=Math.floor(100*c[e]),r=Math.floor(100*c[e+1]);void 0!==c[e+1]?t>=n&&t<r-(r-n)/2?a=e:t>=n&&t<r&&(a=e+1):t>=n&&(a=e)}if(i.initialized&&a!==u){if(!i.allowSlideNext&&(p?v>i.translate&&v>i.minTranslate():v<i.translate&&v<i.minTranslate()))return!1;if(!i.allowSlidePrev&&v>i.translate&&v>i.maxTranslate()&&(u||0)!==a)return!1}let b;a!==(d||0)&&n&&i.emit("beforeSlideChangeStart"),i.updateProgress(v),b=a>u?"next":a<u?"prev":"reset";const w=i.virtual&&i.params.virtual.enabled;if(!(w&&o)&&(p&&-v===i.translate||!p&&v===i.translate))return i.updateActiveIndex(a),s.autoHeight&&i.updateAutoHeight(),i.updateSlidesClasses(),"slide"!==s.effect&&i.setTranslate(v),"reset"!==b&&(i.transitionStart(n,b),i.transitionEnd(n,b)),!1;if(s.cssMode){const e=i.isHorizontal(),n=p?v:-v;if(0===t)w&&(i.wrapperEl.style.scrollSnapType="none",i._immediateVirtual=!0),w&&!i._cssModeVirtualInitialSet&&i.params.initialSlide>0?(i._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{f[e?"scrollLeft":"scrollTop"]=n})):f[e?"scrollLeft":"scrollTop"]=n,w&&requestAnimationFrame(()=>{i.wrapperEl.style.scrollSnapType="",i._immediateVirtual=!1});else{if(!i.support.smoothScroll)return xr({swiper:i,targetPosition:n,side:e?"left":"top"}),!0;f.scrollTo({[e?"left":"top"]:n,behavior:"smooth"})}return!0}return i.setTransition(t),i.setTranslate(v),i.updateActiveIndex(a),i.updateSlidesClasses(),i.emit("beforeTransitionStart",t,r),i.transitionStart(n,b),0===t?i.transitionEnd(n,b):i.animating||(i.animating=!0,i.onSlideToWrapperTransitionEnd||(i.onSlideToWrapperTransitionEnd=function(e){i&&!i.destroyed&&e.target===this&&(i.wrapperEl.removeEventListener("transitionend",i.onSlideToWrapperTransitionEnd),i.onSlideToWrapperTransitionEnd=null,delete i.onSlideToWrapperTransitionEnd,i.transitionEnd(n,b))}),i.wrapperEl.addEventListener("transitionend",i.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(e,t,n,r){if(void 0===e&&(e=0),void 0===n&&(n=!0),"string"==typeof e){e=parseInt(e,10)}const o=this;if(o.destroyed)return;void 0===t&&(t=o.params.speed);const i=o.grid&&o.params.grid&&o.params.grid.rows>1;let a=e;if(o.params.loop)if(o.virtual&&o.params.virtual.enabled)a+=o.virtual.slidesBefore;else{let e;if(i){const t=a*o.params.grid.rows;e=o.slides.filter(e=>1*e.getAttribute("data-swiper-slide-index")===t)[0].column}else e=o.getSlideIndexByData(a);const t=i?Math.ceil(o.slides.length/o.params.grid.rows):o.slides.length,{centeredSlides:n}=o.params;let s=o.params.slidesPerView;"auto"===s?s=o.slidesPerViewDynamic():(s=Math.ceil(parseFloat(o.params.slidesPerView,10)),n&&s%2==0&&(s+=1));let l=t-e<s;if(n&&(l=l||e<Math.ceil(s/2)),r&&n&&"auto"!==o.params.slidesPerView&&!i&&(l=!1),l){const r=n?e<o.activeIndex?"prev":"next":e-o.activeIndex-1<o.params.slidesPerView?"next":"prev";o.loopFix({direction:r,slideTo:!0,activeSlideIndex:"next"===r?e+1:e-t+1,slideRealIndex:"next"===r?o.realIndex:void 0})}if(i){const e=a*o.params.grid.rows;a=o.slides.filter(t=>1*t.getAttribute("data-swiper-slide-index")===e)[0].column}else a=o.getSlideIndexByData(a)}return requestAnimationFrame(()=>{o.slideTo(a,t,n,r)}),o},slideNext:function(e,t,n){void 0===t&&(t=!0);const r=this,{enabled:o,params:i,animating:a}=r;if(!o||r.destroyed)return r;void 0===e&&(e=r.params.speed);let s=i.slidesPerGroup;"auto"===i.slidesPerView&&1===i.slidesPerGroup&&i.slidesPerGroupAuto&&(s=Math.max(r.slidesPerViewDynamic("current",!0),1));const l=r.activeIndex<i.slidesPerGroupSkip?1:s,c=r.virtual&&i.virtual.enabled;if(i.loop){if(a&&!c&&i.loopPreventsSliding)return!1;if(r.loopFix({direction:"next"}),r._clientLeft=r.wrapperEl.clientLeft,r.activeIndex===r.slides.length-1&&i.cssMode)return requestAnimationFrame(()=>{r.slideTo(r.activeIndex+l,e,t,n)}),!0}return i.rewind&&r.isEnd?r.slideTo(0,e,t,n):r.slideTo(r.activeIndex+l,e,t,n)},slidePrev:function(e,t,n){void 0===t&&(t=!0);const r=this,{params:o,snapGrid:i,slidesGrid:a,rtlTranslate:s,enabled:l,animating:c}=r;if(!l||r.destroyed)return r;void 0===e&&(e=r.params.speed);const d=r.virtual&&o.virtual.enabled;if(o.loop){if(c&&!d&&o.loopPreventsSliding)return!1;r.loopFix({direction:"prev"}),r._clientLeft=r.wrapperEl.clientLeft}function u(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}const p=u(s?r.translate:-r.translate),f=i.map(e=>u(e));let m=i[f.indexOf(p)-1];if(void 0===m&&o.cssMode){let e;i.forEach((t,n)=>{p>=t&&(e=n)}),void 0!==e&&(m=i[e>0?e-1:e])}let h=0;if(void 0!==m&&(h=a.indexOf(m),h<0&&(h=r.activeIndex-1),"auto"===o.slidesPerView&&1===o.slidesPerGroup&&o.slidesPerGroupAuto&&(h=h-r.slidesPerViewDynamic("previous",!0)+1,h=Math.max(h,0))),o.rewind&&r.isBeginning){const o=r.params.virtual&&r.params.virtual.enabled&&r.virtual?r.virtual.slides.length-1:r.slides.length-1;return r.slideTo(o,e,t,n)}return o.loop&&0===r.activeIndex&&o.cssMode?(requestAnimationFrame(()=>{r.slideTo(h,e,t,n)}),!0):r.slideTo(h,e,t,n)},slideReset:function(e,t,n){void 0===t&&(t=!0);const r=this;if(!r.destroyed)return void 0===e&&(e=r.params.speed),r.slideTo(r.activeIndex,e,t,n)},slideToClosest:function(e,t,n,r){void 0===t&&(t=!0),void 0===r&&(r=.5);const o=this;if(o.destroyed)return;void 0===e&&(e=o.params.speed);let i=o.activeIndex;const a=Math.min(o.params.slidesPerGroupSkip,i),s=a+Math.floor((i-a)/o.params.slidesPerGroup),l=o.rtlTranslate?o.translate:-o.translate;if(l>=o.snapGrid[s]){const e=o.snapGrid[s];l-e>(o.snapGrid[s+1]-e)*r&&(i+=o.params.slidesPerGroup)}else{const e=o.snapGrid[s-1];l-e<=(o.snapGrid[s]-e)*r&&(i-=o.params.slidesPerGroup)}return i=Math.max(i,0),i=Math.min(i,o.slidesGrid.length-1),o.slideTo(i,e,t,n)},slideToClickedSlide:function(){const e=this;if(e.destroyed)return;const{params:t,slidesEl:n}=e,r="auto"===t.slidesPerView?e.slidesPerViewDynamic():t.slidesPerView;let o,i=e.clickedIndex;const a=e.isElement?"swiper-slide":`.${t.slideClass}`;if(t.loop){if(e.animating)return;o=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?i<e.loopedSlides-r/2||i>e.slides.length-e.loopedSlides+r/2?(e.loopFix(),i=e.getSlideIndex(Tr(n,`${a}[data-swiper-slide-index="${o}"]`)[0]),hr(()=>{e.slideTo(i)})):e.slideTo(i):i>e.slides.length-r?(e.loopFix(),i=e.getSlideIndex(Tr(n,`${a}[data-swiper-slide-index="${o}"]`)[0]),hr(()=>{e.slideTo(i)})):e.slideTo(i)}else e.slideTo(i)}};var Yr={loopCreate:function(e){const t=this,{params:n,slidesEl:r}=t;if(!n.loop||t.virtual&&t.params.virtual.enabled)return;const o=()=>{Tr(r,`.${n.slideClass}, swiper-slide`).forEach((e,t)=>{e.setAttribute("data-swiper-slide-index",t)})},i=t.grid&&n.grid&&n.grid.rows>1,a=n.slidesPerGroup*(i?n.grid.rows:1),s=t.slides.length%a!==0,l=i&&t.slides.length%n.grid.rows!==0,c=e=>{for(let r=0;r<e;r+=1){const e=t.isElement?Cr("swiper-slide",[n.slideBlankClass]):Cr("div",[n.slideClass,n.slideBlankClass]);t.slidesEl.append(e)}};if(s){if(n.loopAddBlankSlides){c(a-t.slides.length%a),t.recalcSlides(),t.updateSlides()}else Pr("Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");o()}else if(l){if(n.loopAddBlankSlides){c(n.grid.rows-t.slides.length%n.grid.rows),t.recalcSlides(),t.updateSlides()}else Pr("Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");o()}else o();t.loopFix({slideRealIndex:e,direction:n.centeredSlides?void 0:"next"})},loopFix:function(e){let{slideRealIndex:t,slideTo:n=!0,direction:r,setTranslate:o,activeSlideIndex:i,byController:a,byMousewheel:s}=void 0===e?{}:e;const l=this;if(!l.params.loop)return;l.emit("beforeLoopFix");const{slides:c,allowSlidePrev:d,allowSlideNext:u,slidesEl:p,params:f}=l,{centeredSlides:m}=f;if(l.allowSlidePrev=!0,l.allowSlideNext=!0,l.virtual&&f.virtual.enabled)return n&&(f.centeredSlides||0!==l.snapIndex?f.centeredSlides&&l.snapIndex<f.slidesPerView?l.slideTo(l.virtual.slides.length+l.snapIndex,0,!1,!0):l.snapIndex===l.snapGrid.length-1&&l.slideTo(l.virtual.slidesBefore,0,!1,!0):l.slideTo(l.virtual.slides.length,0,!1,!0)),l.allowSlidePrev=d,l.allowSlideNext=u,void l.emit("loopFix");let h=f.slidesPerView;"auto"===h?h=l.slidesPerViewDynamic():(h=Math.ceil(parseFloat(f.slidesPerView,10)),m&&h%2==0&&(h+=1));const g=f.slidesPerGroupAuto?h:f.slidesPerGroup;let v=g;v%g!==0&&(v+=g-v%g),v+=f.loopAdditionalSlides,l.loopedSlides=v;const b=l.grid&&f.grid&&f.grid.rows>1;c.length<h+v?Pr("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled and not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters"):b&&"row"===f.grid.fill&&Pr("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");const w=[],y=[];let E=l.activeIndex;void 0===i?i=l.getSlideIndex(c.filter(e=>e.classList.contains(f.slideActiveClass))[0]):E=i;const x="next"===r||!r,S="prev"===r||!r;let T=0,P=0;const C=b?Math.ceil(c.length/f.grid.rows):c.length,O=(b?c[i].column:i)+(m&&void 0===o?-h/2+.5:0);if(O<v){T=Math.max(v-O,g);for(let e=0;e<v-O;e+=1){const t=e-Math.floor(e/C)*C;if(b){const e=C-t-1;for(let t=c.length-1;t>=0;t-=1)c[t].column===e&&w.push(t)}else w.push(C-t-1)}}else if(O+h>C-v){P=Math.max(O-(C-2*v),g);for(let e=0;e<P;e+=1){const t=e-Math.floor(e/C)*C;b?c.forEach((e,n)=>{e.column===t&&y.push(n)}):y.push(t)}}if(l.__preventObserver__=!0,requestAnimationFrame(()=>{l.__preventObserver__=!1}),S&&w.forEach(e=>{c[e].swiperLoopMoveDOM=!0,p.prepend(c[e]),c[e].swiperLoopMoveDOM=!1}),x&&y.forEach(e=>{c[e].swiperLoopMoveDOM=!0,p.append(c[e]),c[e].swiperLoopMoveDOM=!1}),l.recalcSlides(),"auto"===f.slidesPerView?l.updateSlides():b&&(w.length>0&&S||y.length>0&&x)&&l.slides.forEach((e,t)=>{l.grid.updateSlide(t,e,l.slides)}),f.watchSlidesProgress&&l.updateSlidesOffset(),n)if(w.length>0&&S){if(void 0===t){const e=l.slidesGrid[E],t=l.slidesGrid[E+T]-e;s?l.setTranslate(l.translate-t):(l.slideTo(E+Math.ceil(T),0,!1,!0),o&&(l.touchEventsData.startTranslate=l.touchEventsData.startTranslate-t,l.touchEventsData.currentTranslate=l.touchEventsData.currentTranslate-t))}else if(o){const e=b?w.length/f.grid.rows:w.length;l.slideTo(l.activeIndex+e,0,!1,!0),l.touchEventsData.currentTranslate=l.translate}}else if(y.length>0&&x)if(void 0===t){const e=l.slidesGrid[E],t=l.slidesGrid[E-P]-e;s?l.setTranslate(l.translate-t):(l.slideTo(E-P,0,!1,!0),o&&(l.touchEventsData.startTranslate=l.touchEventsData.startTranslate-t,l.touchEventsData.currentTranslate=l.touchEventsData.currentTranslate-t))}else{const e=b?y.length/f.grid.rows:y.length;l.slideTo(l.activeIndex-e,0,!1,!0)}if(l.allowSlidePrev=d,l.allowSlideNext=u,l.controller&&l.controller.control&&!a){const e={slideRealIndex:t,direction:r,setTranslate:o,activeSlideIndex:i,byController:!0};Array.isArray(l.controller.control)?l.controller.control.forEach(t=>{!t.destroyed&&t.params.loop&&t.loopFix({...e,slideTo:t.params.slidesPerView===f.slidesPerView&&n})}):l.controller.control instanceof l.constructor&&l.controller.control.params.loop&&l.controller.control.loopFix({...e,slideTo:l.controller.control.params.slidesPerView===f.slidesPerView&&n})}l.emit("loopFix")},loopDestroy:function(){const e=this,{params:t,slidesEl:n}=e;if(!t.loop||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();const r=[];e.slides.forEach(e=>{const t=void 0===e.swiperSlideIndex?1*e.getAttribute("data-swiper-slide-index"):e.swiperSlideIndex;r[t]=e}),e.slides.forEach(e=>{e.removeAttribute("data-swiper-slide-index")}),r.forEach(e=>{n.append(e)}),e.recalcSlides(),e.slideTo(e.realIndex,0)}};function qr(e,t,n){const r=mr(),{params:o}=e,i=o.edgeSwipeDetection,a=o.edgeSwipeThreshold;return!i||!(n<=a||n>=r.innerWidth-a)||"prevent"===i&&(t.preventDefault(),!0)}function Xr(e){const t=this,n=pr();let r=e;r.originalEvent&&(r=r.originalEvent);const o=t.touchEventsData;if("pointerdown"===r.type){if(null!==o.pointerId&&o.pointerId!==r.pointerId)return;o.pointerId=r.pointerId}else"touchstart"===r.type&&1===r.targetTouches.length&&(o.touchId=r.targetTouches[0].identifier);if("touchstart"===r.type)return void qr(t,r,r.targetTouches[0].pageX);const{params:i,touches:a,enabled:s}=t;if(!s)return;if(!i.simulateTouch&&"mouse"===r.pointerType)return;if(t.animating&&i.preventInteractionOnTransition)return;!t.animating&&i.cssMode&&i.loop&&t.loopFix();let l=r.target;if("wrapper"===i.touchEventsTarget&&!function(e,t){const n=t.contains(e);if(!n&&t instanceof HTMLSlotElement)return[...t.assignedElements()].includes(e);return n}(l,t.wrapperEl))return;if("which"in r&&3===r.which)return;if("button"in r&&r.button>0)return;if(o.isTouched&&o.isMoved)return;const c=!!i.noSwipingClass&&""!==i.noSwipingClass,d=r.composedPath?r.composedPath():r.path;c&&r.target&&r.target.shadowRoot&&d&&(l=d[0]);const u=i.noSwipingSelector?i.noSwipingSelector:`.${i.noSwipingClass}`,p=!(!r.target||!r.target.shadowRoot);if(i.noSwiping&&(p?function(e,t){return void 0===t&&(t=this),function t(n){if(!n||n===pr()||n===mr())return null;n.assignedSlot&&(n=n.assignedSlot);const r=n.closest(e);return r||n.getRootNode?r||t(n.getRootNode().host):null}(t)}(u,l):l.closest(u)))return void(t.allowClick=!0);if(i.swipeHandler&&!l.closest(i.swipeHandler))return;a.currentX=r.pageX,a.currentY=r.pageY;const f=a.currentX,m=a.currentY;if(!qr(t,r,f))return;Object.assign(o,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),a.startX=f,a.startY=m,o.touchStartTime=gr(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,i.threshold>0&&(o.allowThresholdMove=!1);let h=!0;l.matches(o.focusableElements)&&(h=!1,"SELECT"===l.nodeName&&(o.isTouched=!1)),n.activeElement&&n.activeElement.matches(o.focusableElements)&&n.activeElement!==l&&("mouse"===r.pointerType||"mouse"!==r.pointerType&&!l.matches(o.focusableElements))&&n.activeElement.blur();const g=h&&t.allowTouchMove&&i.touchStartPreventDefault;!i.touchStartForcePreventDefault&&!g||l.isContentEditable||r.preventDefault(),i.freeMode&&i.freeMode.enabled&&t.freeMode&&t.animating&&!i.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",r)}function Kr(e){const t=pr(),n=this,r=n.touchEventsData,{params:o,touches:i,rtlTranslate:a,enabled:s}=n;if(!s)return;if(!o.simulateTouch&&"mouse"===e.pointerType)return;let l,c=e;if(c.originalEvent&&(c=c.originalEvent),"pointermove"===c.type){if(null!==r.touchId)return;if(c.pointerId!==r.pointerId)return}if("touchmove"===c.type){if(l=[...c.changedTouches].filter(e=>e.identifier===r.touchId)[0],!l||l.identifier!==r.touchId)return}else l=c;if(!r.isTouched)return void(r.startMoving&&r.isScrolling&&n.emit("touchMoveOpposite",c));const d=l.pageX,u=l.pageY;if(c.preventedByNestedSwiper)return i.startX=d,void(i.startY=u);if(!n.allowTouchMove)return c.target.matches(r.focusableElements)||(n.allowClick=!1),void(r.isTouched&&(Object.assign(i,{startX:d,startY:u,currentX:d,currentY:u}),r.touchStartTime=gr()));if(o.touchReleaseOnEdges&&!o.loop)if(n.isVertical()){if(u<i.startY&&n.translate<=n.maxTranslate()||u>i.startY&&n.translate>=n.minTranslate())return r.isTouched=!1,void(r.isMoved=!1)}else if(d<i.startX&&n.translate<=n.maxTranslate()||d>i.startX&&n.translate>=n.minTranslate())return;if(t.activeElement&&t.activeElement.matches(r.focusableElements)&&t.activeElement!==c.target&&"mouse"!==c.pointerType&&t.activeElement.blur(),t.activeElement&&c.target===t.activeElement&&c.target.matches(r.focusableElements))return r.isMoved=!0,void(n.allowClick=!1);r.allowTouchCallbacks&&n.emit("touchMove",c),i.previousX=i.currentX,i.previousY=i.currentY,i.currentX=d,i.currentY=u;const p=i.currentX-i.startX,f=i.currentY-i.startY;if(n.params.threshold&&Math.sqrt(p**2+f**2)<n.params.threshold)return;if(void 0===r.isScrolling){let e;n.isHorizontal()&&i.currentY===i.startY||n.isVertical()&&i.currentX===i.startX?r.isScrolling=!1:p*p+f*f>=25&&(e=180*Math.atan2(Math.abs(f),Math.abs(p))/Math.PI,r.isScrolling=n.isHorizontal()?e>o.touchAngle:90-e>o.touchAngle)}if(r.isScrolling&&n.emit("touchMoveOpposite",c),void 0===r.startMoving&&(i.currentX===i.startX&&i.currentY===i.startY||(r.startMoving=!0)),r.isScrolling||"touchmove"===c.type&&r.preventTouchMoveFromPointerMove)return void(r.isTouched=!1);if(!r.startMoving)return;n.allowClick=!1,!o.cssMode&&c.cancelable&&c.preventDefault(),o.touchMoveStopPropagation&&!o.nested&&c.stopPropagation();let m=n.isHorizontal()?p:f,h=n.isHorizontal()?i.currentX-i.previousX:i.currentY-i.previousY;o.oneWayMovement&&(m=Math.abs(m)*(a?1:-1),h=Math.abs(h)*(a?1:-1)),i.diff=m,m*=o.touchRatio,a&&(m=-m,h=-h);const g=n.touchesDirection;n.swipeDirection=m>0?"prev":"next",n.touchesDirection=h>0?"prev":"next";const v=n.params.loop&&!o.cssMode,b="next"===n.touchesDirection&&n.allowSlideNext||"prev"===n.touchesDirection&&n.allowSlidePrev;if(!r.isMoved){if(v&&b&&n.loopFix({direction:n.swipeDirection}),r.startTranslate=n.getTranslate(),n.setTransition(0),n.animating){const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});n.wrapperEl.dispatchEvent(e)}r.allowMomentumBounce=!1,!o.grabCursor||!0!==n.allowSlideNext&&!0!==n.allowSlidePrev||n.setGrabCursor(!0),n.emit("sliderFirstMove",c)}if((new Date).getTime(),r.isMoved&&r.allowThresholdMove&&g!==n.touchesDirection&&v&&b&&Math.abs(m)>=1)return Object.assign(i,{startX:d,startY:u,currentX:d,currentY:u,startTranslate:r.currentTranslate}),r.loopSwapReset=!0,void(r.startTranslate=r.currentTranslate);n.emit("sliderMove",c),r.isMoved=!0,r.currentTranslate=m+r.startTranslate;let w=!0,y=o.resistanceRatio;if(o.touchReleaseOnEdges&&(y=0),m>0?(v&&b&&r.allowThresholdMove&&r.currentTranslate>(o.centeredSlides?n.minTranslate()-n.slidesSizesGrid[n.activeIndex+1]-("auto"!==o.slidesPerView&&n.slides.length-o.slidesPerView>=2?n.slidesSizesGrid[n.activeIndex+1]+n.params.spaceBetween:0)-n.params.spaceBetween:n.minTranslate())&&n.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),r.currentTranslate>n.minTranslate()&&(w=!1,o.resistance&&(r.currentTranslate=n.minTranslate()-1+(-n.minTranslate()+r.startTranslate+m)**y))):m<0&&(v&&b&&r.allowThresholdMove&&r.currentTranslate<(o.centeredSlides?n.maxTranslate()+n.slidesSizesGrid[n.slidesSizesGrid.length-1]+n.params.spaceBetween+("auto"!==o.slidesPerView&&n.slides.length-o.slidesPerView>=2?n.slidesSizesGrid[n.slidesSizesGrid.length-1]+n.params.spaceBetween:0):n.maxTranslate())&&n.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:n.slides.length-("auto"===o.slidesPerView?n.slidesPerViewDynamic():Math.ceil(parseFloat(o.slidesPerView,10)))}),r.currentTranslate<n.maxTranslate()&&(w=!1,o.resistance&&(r.currentTranslate=n.maxTranslate()+1-(n.maxTranslate()-r.startTranslate-m)**y))),w&&(c.preventedByNestedSwiper=!0),!n.allowSlideNext&&"next"===n.swipeDirection&&r.currentTranslate<r.startTranslate&&(r.currentTranslate=r.startTranslate),!n.allowSlidePrev&&"prev"===n.swipeDirection&&r.currentTranslate>r.startTranslate&&(r.currentTranslate=r.startTranslate),n.allowSlidePrev||n.allowSlideNext||(r.currentTranslate=r.startTranslate),o.threshold>0){if(!(Math.abs(m)>o.threshold||r.allowThresholdMove))return void(r.currentTranslate=r.startTranslate);if(!r.allowThresholdMove)return r.allowThresholdMove=!0,i.startX=i.currentX,i.startY=i.currentY,r.currentTranslate=r.startTranslate,void(i.diff=n.isHorizontal()?i.currentX-i.startX:i.currentY-i.startY)}o.followFinger&&!o.cssMode&&((o.freeMode&&o.freeMode.enabled&&n.freeMode||o.watchSlidesProgress)&&(n.updateActiveIndex(),n.updateSlidesClasses()),o.freeMode&&o.freeMode.enabled&&n.freeMode&&n.freeMode.onTouchMove(),n.updateProgress(r.currentTranslate),n.setTranslate(r.currentTranslate))}function Zr(e){const t=this,n=t.touchEventsData;let r,o=e;o.originalEvent&&(o=o.originalEvent);if("touchend"===o.type||"touchcancel"===o.type){if(r=[...o.changedTouches].filter(e=>e.identifier===n.touchId)[0],!r||r.identifier!==n.touchId)return}else{if(null!==n.touchId)return;if(o.pointerId!==n.pointerId)return;r=o}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(o.type)){if(!(["pointercancel","contextmenu"].includes(o.type)&&(t.browser.isSafari||t.browser.isWebView)))return}n.pointerId=null,n.touchId=null;const{params:i,touches:a,rtlTranslate:s,slidesGrid:l,enabled:c}=t;if(!c)return;if(!i.simulateTouch&&"mouse"===o.pointerType)return;if(n.allowTouchCallbacks&&t.emit("touchEnd",o),n.allowTouchCallbacks=!1,!n.isTouched)return n.isMoved&&i.grabCursor&&t.setGrabCursor(!1),n.isMoved=!1,void(n.startMoving=!1);i.grabCursor&&n.isMoved&&n.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);const d=gr(),u=d-n.touchStartTime;if(t.allowClick){const e=o.path||o.composedPath&&o.composedPath();t.updateClickedSlide(e&&e[0]||o.target,e),t.emit("tap click",o),u<300&&d-n.lastClickTime<300&&t.emit("doubleTap doubleClick",o)}if(n.lastClickTime=gr(),hr(()=>{t.destroyed||(t.allowClick=!0)}),!n.isTouched||!n.isMoved||!t.swipeDirection||0===a.diff&&!n.loopSwapReset||n.currentTranslate===n.startTranslate&&!n.loopSwapReset)return n.isTouched=!1,n.isMoved=!1,void(n.startMoving=!1);let p;if(n.isTouched=!1,n.isMoved=!1,n.startMoving=!1,p=i.followFinger?s?t.translate:-t.translate:-n.currentTranslate,i.cssMode)return;if(i.freeMode&&i.freeMode.enabled)return void t.freeMode.onTouchEnd({currentPos:p});const f=p>=-t.maxTranslate()&&!t.params.loop;let m=0,h=t.slidesSizesGrid[0];for(let e=0;e<l.length;e+=e<i.slidesPerGroupSkip?1:i.slidesPerGroup){const t=e<i.slidesPerGroupSkip-1?1:i.slidesPerGroup;void 0!==l[e+t]?(f||p>=l[e]&&p<l[e+t])&&(m=e,h=l[e+t]-l[e]):(f||p>=l[e])&&(m=e,h=l[l.length-1]-l[l.length-2])}let g=null,v=null;i.rewind&&(t.isBeginning?v=i.virtual&&i.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(g=0));const b=(p-l[m])/h,w=m<i.slidesPerGroupSkip-1?1:i.slidesPerGroup;if(u>i.longSwipesMs){if(!i.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(b>=i.longSwipesRatio?t.slideTo(i.rewind&&t.isEnd?g:m+w):t.slideTo(m)),"prev"===t.swipeDirection&&(b>1-i.longSwipesRatio?t.slideTo(m+w):null!==v&&b<0&&Math.abs(b)>i.longSwipesRatio?t.slideTo(v):t.slideTo(m))}else{if(!i.shortSwipes)return void t.slideTo(t.activeIndex);t.navigation&&(o.target===t.navigation.nextEl||o.target===t.navigation.prevEl)?o.target===t.navigation.nextEl?t.slideTo(m+w):t.slideTo(m):("next"===t.swipeDirection&&t.slideTo(null!==g?g:m+w),"prev"===t.swipeDirection&&t.slideTo(null!==v?v:m))}}function Jr(){const e=this,{params:t,el:n}=e;if(n&&0===n.offsetWidth)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:r,allowSlidePrev:o,snapGrid:i}=e,a=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const s=a&&t.loop;!("auto"===t.slidesPerView||t.slidesPerView>1)||!e.isEnd||e.isBeginning||e.params.centeredSlides||s?e.params.loop&&!a?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0):e.slideTo(e.slides.length-1,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout(()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()},500)),e.allowSlidePrev=o,e.allowSlideNext=r,e.params.watchOverflow&&i!==e.snapGrid&&e.checkOverflow()}function Qr(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function eo(){const e=this,{wrapperEl:t,rtlTranslate:n,enabled:r}=e;if(!r)return;let o;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,0===e.translate&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();const i=e.maxTranslate()-e.minTranslate();o=0===i?0:(e.translate-e.minTranslate())/i,o!==e.progress&&e.updateProgress(n?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function to(e){const t=this;Wr(t,e.target),t.params.cssMode||"auto"!==t.params.slidesPerView&&!t.params.autoHeight||t.update()}function no(){const e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}const ro=(e,t)=>{const n=pr(),{params:r,el:o,wrapperEl:i,device:a}=e,s=!!r.nested,l="on"===t?"addEventListener":"removeEventListener",c=t;o&&"string"!=typeof o&&(n[l]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:s}),o[l]("touchstart",e.onTouchStart,{passive:!1}),o[l]("pointerdown",e.onTouchStart,{passive:!1}),n[l]("touchmove",e.onTouchMove,{passive:!1,capture:s}),n[l]("pointermove",e.onTouchMove,{passive:!1,capture:s}),n[l]("touchend",e.onTouchEnd,{passive:!0}),n[l]("pointerup",e.onTouchEnd,{passive:!0}),n[l]("pointercancel",e.onTouchEnd,{passive:!0}),n[l]("touchcancel",e.onTouchEnd,{passive:!0}),n[l]("pointerout",e.onTouchEnd,{passive:!0}),n[l]("pointerleave",e.onTouchEnd,{passive:!0}),n[l]("contextmenu",e.onTouchEnd,{passive:!0}),(r.preventClicks||r.preventClicksPropagation)&&o[l]("click",e.onClick,!0),r.cssMode&&i[l]("scroll",e.onScroll),r.updateOnWindowResize?e[c](a.ios||a.android?"resize orientationchange observerUpdate":"resize observerUpdate",Jr,!0):e[c]("observerUpdate",Jr,!0),o[l]("load",e.onLoad,{capture:!0}))};const oo=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;var io={setBreakpoint:function(){const e=this,{realIndex:t,initialized:n,params:r,el:o}=e,i=r.breakpoints;if(!i||i&&0===Object.keys(i).length)return;const a=e.getBreakpoint(i,e.params.breakpointsBase,e.el);if(!a||e.currentBreakpoint===a)return;const s=(a in i?i[a]:void 0)||e.originalParams,l=oo(e,r),c=oo(e,s),d=e.params.grabCursor,u=s.grabCursor,p=r.enabled;l&&!c?(o.classList.remove(`${r.containerModifierClass}grid`,`${r.containerModifierClass}grid-column`),e.emitContainerClasses()):!l&&c&&(o.classList.add(`${r.containerModifierClass}grid`),(s.grid.fill&&"column"===s.grid.fill||!s.grid.fill&&"column"===r.grid.fill)&&o.classList.add(`${r.containerModifierClass}grid-column`),e.emitContainerClasses()),d&&!u?e.unsetGrabCursor():!d&&u&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach(t=>{if(void 0===s[t])return;const n=r[t]&&r[t].enabled,o=s[t]&&s[t].enabled;n&&!o&&e[t].disable(),!n&&o&&e[t].enable()});const f=s.direction&&s.direction!==r.direction,m=r.loop&&(s.slidesPerView!==r.slidesPerView||f),h=r.loop;f&&n&&e.changeDirection(),yr(e.params,s);const g=e.params.enabled,v=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),p&&!g?e.disable():!p&&g&&e.enable(),e.currentBreakpoint=a,e.emit("_beforeBreakpoint",s),n&&(m?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!h&&v?(e.loopCreate(t),e.updateSlides()):h&&!v&&e.loopDestroy()),e.emit("breakpoint",s)},getBreakpoint:function(e,t,n){if(void 0===t&&(t="window"),!e||"container"===t&&!n)return;let r=!1;const o=mr(),i="window"===t?o.innerHeight:n.clientHeight,a=Object.keys(e).map(e=>{if("string"==typeof e&&0===e.indexOf("@")){const t=parseFloat(e.substr(1));return{value:i*t,point:e}}return{value:e,point:e}});a.sort((e,t)=>parseInt(e.value,10)-parseInt(t.value,10));for(let e=0;e<a.length;e+=1){const{point:i,value:s}=a[e];"window"===t?o.matchMedia(`(min-width: ${s}px)`).matches&&(r=i):s<=n.clientWidth&&(r=i)}return r||"max"}};var ao={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function so(e,t){return function(n){void 0===n&&(n={});const r=Object.keys(n)[0],o=n[r];"object"==typeof o&&null!==o?(!0===e[r]&&(e[r]={enabled:!0}),"navigation"===r&&e[r]&&e[r].enabled&&!e[r].prevEl&&!e[r].nextEl&&(e[r].auto=!0),["pagination","scrollbar"].indexOf(r)>=0&&e[r]&&e[r].enabled&&!e[r].el&&(e[r].auto=!0),r in e&&"enabled"in o?("object"!=typeof e[r]||"enabled"in e[r]||(e[r].enabled=!0),e[r]||(e[r]={enabled:!1}),yr(t,n)):yr(t,n)):yr(t,n)}}const lo={eventsEmitter:_r,update:Hr,translate:Vr,transition:{setTransition:function(e,t){const n=this;n.params.cssMode||(n.wrapperEl.style.transitionDuration=`${e}ms`,n.wrapperEl.style.transitionDelay=0===e?"0ms":""),n.emit("setTransition",e,t)},transitionStart:function(e,t){void 0===e&&(e=!0);const n=this,{params:r}=n;r.cssMode||(r.autoHeight&&n.updateAutoHeight(),Ur({swiper:n,runCallbacks:e,direction:t,step:"Start"}))},transitionEnd:function(e,t){void 0===e&&(e=!0);const n=this,{params:r}=n;n.animating=!1,r.cssMode||(n.setTransition(0),Ur({swiper:n,runCallbacks:e,direction:t,step:"End"}))}},slide:Gr,loop:Yr,grabCursor:{setGrabCursor:function(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const n="container"===t.params.touchEventsTarget?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),n.style.cursor="move",n.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame(()=>{t.__preventObserver__=!1})},unsetGrabCursor:function(){const e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e["container"===e.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame(()=>{e.__preventObserver__=!1}))}},events:{attachEvents:function(){const e=this,{params:t}=e;e.onTouchStart=Xr.bind(e),e.onTouchMove=Kr.bind(e),e.onTouchEnd=Zr.bind(e),e.onDocumentTouchStart=no.bind(e),t.cssMode&&(e.onScroll=eo.bind(e)),e.onClick=Qr.bind(e),e.onLoad=to.bind(e),ro(e,"on")},detachEvents:function(){ro(this,"off")}},breakpoints:io,checkOverflow:{checkOverflow:function(){const e=this,{isLocked:t,params:n}=e,{slidesOffsetBefore:r}=n;if(r){const t=e.slides.length-1,n=e.slidesGrid[t]+e.slidesSizesGrid[t]+2*r;e.isLocked=e.size>n}else e.isLocked=1===e.snapGrid.length;!0===n.allowSlideNext&&(e.allowSlideNext=!e.isLocked),!0===n.allowSlidePrev&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}},classes:{addClasses:function(){const e=this,{classNames:t,params:n,rtl:r,el:o,device:i}=e,a=function(e,t){const n=[];return e.forEach(e=>{"object"==typeof e?Object.keys(e).forEach(r=>{e[r]&&n.push(t+r)}):"string"==typeof e&&n.push(t+e)}),n}(["initialized",n.direction,{"free-mode":e.params.freeMode&&n.freeMode.enabled},{autoheight:n.autoHeight},{rtl:r},{grid:n.grid&&n.grid.rows>1},{"grid-column":n.grid&&n.grid.rows>1&&"column"===n.grid.fill},{android:i.android},{ios:i.ios},{"css-mode":n.cssMode},{centered:n.cssMode&&n.centeredSlides},{"watch-progress":n.watchSlidesProgress}],n.containerModifierClass);t.push(...a),o.classList.add(...t),e.emitContainerClasses()},removeClasses:function(){const{el:e,classNames:t}=this;e&&"string"!=typeof e&&(e.classList.remove(...t),this.emitContainerClasses())}}},co={};let uo=class e{constructor(){let t,n;for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];1===o.length&&o[0].constructor&&"Object"===Object.prototype.toString.call(o[0]).slice(8,-1)?n=o[0]:[t,n]=o,n||(n={}),n=yr({},n),t&&!n.el&&(n.el=t);const a=pr();if(n.el&&"string"==typeof n.el&&a.querySelectorAll(n.el).length>1){const t=[];return a.querySelectorAll(n.el).forEach(r=>{const o=yr({},n,{el:r});t.push(new e(o))}),t}const s=this;s.__swiper__=!0,s.support=Ar(),s.device=zr({userAgent:n.userAgent}),s.browser=Lr(),s.eventsListeners={},s.eventsAnyListeners=[],s.modules=[...s.__modules__],n.modules&&Array.isArray(n.modules)&&s.modules.push(...n.modules);const l={};s.modules.forEach(e=>{e({params:n,swiper:s,extendParams:so(n,l),on:s.on.bind(s),once:s.once.bind(s),off:s.off.bind(s),emit:s.emit.bind(s)})});const c=yr({},ao,l);return s.params=yr({},c,co,n),s.originalParams=yr({},s.params),s.passedParams=yr({},n),s.params&&s.params.on&&Object.keys(s.params.on).forEach(e=>{s.on(e,s.params.on[e])}),s.params&&s.params.onAny&&s.onAny(s.params.onAny),Object.assign(s,{enabled:s.params.enabled,el:t,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===s.params.direction,isVertical:()=>"vertical"===s.params.direction,activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:s.params.allowSlideNext,allowSlidePrev:s.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:s.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:s.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),s.emit("_swiper"),s.params.init&&s.init(),s}getDirectionLabel(e){return this.isHorizontal()?e:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[e]}getSlideIndex(e){const{slidesEl:t,params:n}=this,r=Nr(Tr(t,`.${n.slideClass}, swiper-slide`)[0]);return Nr(e)-r}getSlideIndexByData(e){return this.getSlideIndex(this.slides.filter(t=>1*t.getAttribute("data-swiper-slide-index")===e)[0])}recalcSlides(){const{slidesEl:e,params:t}=this;this.slides=Tr(e,`.${t.slideClass}, swiper-slide`)}enable(){const e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))}disable(){const e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))}setProgress(e,t){const n=this;e=Math.min(Math.max(e,0),1);const r=n.minTranslate(),o=(n.maxTranslate()-r)*e+r;n.translateTo(o,void 0===t?0:t),n.updateActiveIndex(),n.updateSlidesClasses()}emitContainerClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=e.el.className.split(" ").filter(t=>0===t.indexOf("swiper")||0===t.indexOf(e.params.containerModifierClass));e.emit("_containerClasses",t.join(" "))}getSlideClasses(e){const t=this;return t.destroyed?"":e.className.split(" ").filter(e=>0===e.indexOf("swiper-slide")||0===e.indexOf(t.params.slideClass)).join(" ")}emitSlidesClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=[];e.slides.forEach(n=>{const r=e.getSlideClasses(n);t.push({slideEl:n,classNames:r}),e.emit("_slideClass",n,r)}),e.emit("_slideClasses",t)}slidesPerViewDynamic(e,t){void 0===e&&(e="current"),void 0===t&&(t=!1);const{params:n,slides:r,slidesGrid:o,slidesSizesGrid:i,size:a,activeIndex:s}=this;let l=1;if("number"==typeof n.slidesPerView)return n.slidesPerView;if(n.centeredSlides){let e,t=r[s]?Math.ceil(r[s].swiperSlideSize):0;for(let n=s+1;n<r.length;n+=1)r[n]&&!e&&(t+=Math.ceil(r[n].swiperSlideSize),l+=1,t>a&&(e=!0));for(let n=s-1;n>=0;n-=1)r[n]&&!e&&(t+=r[n].swiperSlideSize,l+=1,t>a&&(e=!0))}else if("current"===e)for(let e=s+1;e<r.length;e+=1){(t?o[e]+i[e]-o[s]<a:o[e]-o[s]<a)&&(l+=1)}else for(let e=s-1;e>=0;e-=1){o[s]-o[e]<a&&(l+=1)}return l}update(){const e=this;if(!e||e.destroyed)return;const{snapGrid:t,params:n}=e;function r(){const t=e.rtlTranslate?-1*e.translate:e.translate,n=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(n),e.updateActiveIndex(),e.updateSlidesClasses()}let o;if(n.breakpoints&&e.setBreakpoint(),[...e.el.querySelectorAll('[loading="lazy"]')].forEach(t=>{t.complete&&Wr(e,t)}),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),n.freeMode&&n.freeMode.enabled&&!n.cssMode)r(),n.autoHeight&&e.updateAutoHeight();else{if(("auto"===n.slidesPerView||n.slidesPerView>1)&&e.isEnd&&!n.centeredSlides){const t=e.virtual&&n.virtual.enabled?e.virtual.slides:e.slides;o=e.slideTo(t.length-1,0,!1,!0)}else o=e.slideTo(e.activeIndex,0,!1,!0);o||r()}n.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,t){void 0===t&&(t=!0);const n=this,r=n.params.direction;return e||(e="horizontal"===r?"vertical":"horizontal"),e===r||"horizontal"!==e&&"vertical"!==e||(n.el.classList.remove(`${n.params.containerModifierClass}${r}`),n.el.classList.add(`${n.params.containerModifierClass}${e}`),n.emitContainerClasses(),n.params.direction=e,n.slides.forEach(t=>{"vertical"===e?t.style.width="":t.style.height=""}),n.emit("changeDirection"),t&&n.update()),n}changeLanguageDirection(e){const t=this;t.rtl&&"rtl"===e||!t.rtl&&"ltr"===e||(t.rtl="rtl"===e,t.rtlTranslate="horizontal"===t.params.direction&&t.rtl,t.rtl?(t.el.classList.add(`${t.params.containerModifierClass}rtl`),t.el.dir="rtl"):(t.el.classList.remove(`${t.params.containerModifierClass}rtl`),t.el.dir="ltr"),t.update())}mount(e){const t=this;if(t.mounted)return!0;let n=e||t.params.el;if("string"==typeof n&&(n=document.querySelector(n)),!n)return!1;n.swiper=t,n.parentNode&&n.parentNode.host&&n.parentNode.host.nodeName===t.params.swiperElementNodeName.toUpperCase()&&(t.isElement=!0);const r=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`;let o=(()=>{if(n&&n.shadowRoot&&n.shadowRoot.querySelector){return n.shadowRoot.querySelector(r())}return Tr(n,r())[0]})();return!o&&t.params.createElements&&(o=Cr("div",t.params.wrapperClass),n.append(o),Tr(n,`.${t.params.slideClass}`).forEach(e=>{o.append(e)})),Object.assign(t,{el:n,wrapperEl:o,slidesEl:t.isElement&&!n.parentNode.host.slideSlots?n.parentNode.host:o,hostEl:t.isElement?n.parentNode.host:n,mounted:!0,rtl:"rtl"===n.dir.toLowerCase()||"rtl"===Or(n,"direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===n.dir.toLowerCase()||"rtl"===Or(n,"direction")),wrongRTL:"-webkit-box"===Or(o,"display")}),!0}init(e){const t=this;if(t.initialized)return t;if(!1===t.mount(e))return t;t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.loop&&t.virtual&&t.params.virtual.enabled?t.slideTo(t.params.initialSlide+t.virtual.slidesBefore,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.params.loop&&t.loopCreate(),t.attachEvents();const n=[...t.el.querySelectorAll('[loading="lazy"]')];return t.isElement&&n.push(...t.hostEl.querySelectorAll('[loading="lazy"]')),n.forEach(e=>{e.complete?Wr(t,e):e.addEventListener("load",e=>{Wr(t,e.target)})}),Br(t),t.initialized=!0,Br(t),t.emit("init"),t.emit("afterInit"),t}destroy(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);const n=this,{params:r,el:o,wrapperEl:i,slides:a}=n;return void 0===n.params||n.destroyed||(n.emit("beforeDestroy"),n.initialized=!1,n.detachEvents(),r.loop&&n.loopDestroy(),t&&(n.removeClasses(),o&&"string"!=typeof o&&o.removeAttribute("style"),i&&i.removeAttribute("style"),a&&a.length&&a.forEach(e=>{e.classList.remove(r.slideVisibleClass,r.slideFullyVisibleClass,r.slideActiveClass,r.slideNextClass,r.slidePrevClass),e.removeAttribute("style"),e.removeAttribute("data-swiper-slide-index")})),n.emit("destroy"),Object.keys(n.eventsListeners).forEach(e=>{n.off(e)}),!1!==e&&(n.el&&"string"!=typeof n.el&&(n.el.swiper=null),function(e){const t=e;Object.keys(t).forEach(e=>{try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}})}(n)),n.destroyed=!0),null}static extendDefaults(e){yr(co,e)}static get extendedDefaults(){return co}static get defaults(){return ao}static installModule(t){e.prototype.__modules__||(e.prototype.__modules__=[]);const n=e.prototype.__modules__;"function"==typeof t&&n.indexOf(t)<0&&n.push(t)}static use(t){return Array.isArray(t)?(t.forEach(t=>e.installModule(t)),e):(e.installModule(t),e)}};Object.keys(lo).forEach(e=>{Object.keys(lo[e]).forEach(t=>{uo.prototype[t]=lo[e][t]})}),uo.use([function(e){let{swiper:t,on:n,emit:r}=e;const o=mr();let i=null,a=null;const s=()=>{t&&!t.destroyed&&t.initialized&&(r("beforeResize"),r("resize"))},l=()=>{t&&!t.destroyed&&t.initialized&&r("orientationchange")};n("init",()=>{t.params.resizeObserver&&void 0!==o.ResizeObserver?t&&!t.destroyed&&t.initialized&&(i=new ResizeObserver(e=>{a=o.requestAnimationFrame(()=>{const{width:n,height:r}=t;let o=n,i=r;e.forEach(e=>{let{contentBoxSize:n,contentRect:r,target:a}=e;a&&a!==t.el||(o=r?r.width:(n[0]||n).inlineSize,i=r?r.height:(n[0]||n).blockSize)}),o===n&&i===r||s()})}),i.observe(t.el)):(o.addEventListener("resize",s),o.addEventListener("orientationchange",l))}),n("destroy",()=>{a&&o.cancelAnimationFrame(a),i&&i.unobserve&&t.el&&(i.unobserve(t.el),i=null),o.removeEventListener("resize",s),o.removeEventListener("orientationchange",l)})},function(e){let{swiper:t,extendParams:n,on:r,emit:o}=e;const i=[],a=mr(),s=function(e,n){void 0===n&&(n={});const r=new(a.MutationObserver||a.WebkitMutationObserver)(e=>{if(t.__preventObserver__)return;if(1===e.length)return void o("observerUpdate",e[0]);const n=function(){o("observerUpdate",e[0])};a.requestAnimationFrame?a.requestAnimationFrame(n):a.setTimeout(n,0)});r.observe(e,{attributes:void 0===n.attributes||n.attributes,childList:t.isElement||(void 0===n.childList||n).childList,characterData:void 0===n.characterData||n.characterData}),i.push(r)};n({observer:!1,observeParents:!1,observeSlideChildren:!1}),r("init",()=>{if(t.params.observer){if(t.params.observeParents){const e=function(e){const t=[];let n=e.parentElement;for(;n;)t.push(n),n=n.parentElement;return t}(t.hostEl);for(let t=0;t<e.length;t+=1)s(e[t])}s(t.hostEl,{childList:t.params.observeSlideChildren}),s(t.wrapperEl,{attributes:!1})}}),r("destroy",()=>{i.forEach(e=>{e.disconnect()}),i.splice(0,i.length)})}]);const po=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","swiperElementNodeName","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","breakpointsBase","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopAdditionalSlides","loopAddBlankSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideFullyVisibleClass","slideNextClass","slidePrevClass","slideBlankClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function fo(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)&&!e.__swiper__}function mo(e,t){const n=["__proto__","constructor","prototype"];Object.keys(t).filter(e=>n.indexOf(e)<0).forEach(n=>{void 0===e[n]?e[n]=t[n]:fo(t[n])&&fo(e[n])&&Object.keys(t[n]).length>0?t[n].__swiper__?e[n]=t[n]:mo(e[n],t[n]):e[n]=t[n]})}function ho(e){return void 0===e&&(e={}),e.navigation&&void 0===e.navigation.nextEl&&void 0===e.navigation.prevEl}function go(e){return void 0===e&&(e={}),e.pagination&&void 0===e.pagination.el}function vo(e){return void 0===e&&(e={}),e.scrollbar&&void 0===e.scrollbar.el}function bo(e){void 0===e&&(e="");const t=e.split(" ").map(e=>e.trim()).filter(e=>!!e),n=[];return t.forEach(e=>{n.indexOf(e)<0&&n.push(e)}),n.join(" ")}function wo(e){return void 0===e&&(e=""),e?e.includes("swiper-wrapper")?e:`swiper-wrapper ${e}`:"swiper-wrapper"}function yo(){return yo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yo.apply(this,arguments)}function Eo(e){return e.type&&e.type.displayName&&e.type.displayName.includes("SwiperSlide")}function xo(e){const n=[];return t.Children.toArray(e).forEach(e=>{Eo(e)?n.push(e):e.props&&e.props.children&&xo(e.props.children).forEach(e=>n.push(e))}),n}function So(e){const n=[],r={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return t.Children.toArray(e).forEach(e=>{if(Eo(e))n.push(e);else if(e.props&&e.props.slot&&r[e.props.slot])r[e.props.slot].push(e);else if(e.props&&e.props.children){const t=xo(e.props.children);t.length>0?t.forEach(e=>n.push(e)):r["container-end"].push(e)}else r["container-end"].push(e)}),{slides:n,slots:r}}function To(e,t){return"undefined"==typeof window?r(e,t):s(e,t)}const Po=l(null),Co=l(null),Oo=o(function(e,o){let{className:i,tag:s="div",wrapperTag:l="div",children:c,onSwiper:d,...u}=void 0===e?{}:e,p=!1;const[f,m]=a("swiper"),[h,g]=a(null),[v,b]=a(!1),w=n(!1),y=n(null),E=n(null),x=n(null),S=n(null),T=n(null),P=n(null),C=n(null),O=n(null),{params:N,passedParams:k,rest:M,events:I}=function(e,t){void 0===e&&(e={}),void 0===t&&(t=!0);const n={on:{}},r={},o={};mo(n,ao),n._emitClasses=!0,n.init=!1;const i={},a=po.map(e=>e.replace(/_/,"")),s=Object.assign({},e);return Object.keys(s).forEach(s=>{void 0!==e[s]&&(a.indexOf(s)>=0?fo(e[s])?(n[s]={},o[s]={},mo(n[s],e[s]),mo(o[s],e[s])):(n[s]=e[s],o[s]=e[s]):0===s.search(/on[A-Z]/)&&"function"==typeof e[s]?t?r[`${s[2].toLowerCase()}${s.substr(3)}`]=e[s]:n.on[`${s[2].toLowerCase()}${s.substr(3)}`]=e[s]:i[s]=e[s])}),["navigation","pagination","scrollbar"].forEach(e=>{!0===n[e]&&(n[e]={}),!1===n[e]&&delete n[e]}),{params:n,passedParams:o,rest:i,events:r}}(u),{slides:R,slots:D}=So(c),A=()=>{b(!v)};Object.assign(N.on,{_containerClasses(e,t){m(t)}});const z=()=>{Object.assign(N.on,I),p=!0;const e={...N};if(delete e.wrapperClass,E.current=new uo(e),E.current.virtual&&E.current.params.virtual.enabled){E.current.virtual.slides=R;const e={cache:!1,slides:R,renderExternal:g,renderExternalUpdate:!1};mo(E.current.params.virtual,e),mo(E.current.originalParams.virtual,e)}};y.current||z(),E.current&&E.current.on("_beforeBreakpoint",A);return r(()=>()=>{E.current&&E.current.off("_beforeBreakpoint",A)}),r(()=>{!w.current&&E.current&&(E.current.emitSlidesClasses(),w.current=!0)}),To(()=>{if(o&&(o.current=y.current),y.current)return E.current.destroyed&&z(),function(e,t){let{el:n,nextEl:r,prevEl:o,paginationEl:i,scrollbarEl:a,swiper:s}=e;ho(t)&&r&&o&&(s.params.navigation.nextEl=r,s.originalParams.navigation.nextEl=r,s.params.navigation.prevEl=o,s.originalParams.navigation.prevEl=o),go(t)&&i&&(s.params.pagination.el=i,s.originalParams.pagination.el=i),vo(t)&&a&&(s.params.scrollbar.el=a,s.originalParams.scrollbar.el=a),s.init(n)}({el:y.current,nextEl:T.current,prevEl:P.current,paginationEl:C.current,scrollbarEl:O.current,swiper:E.current},N),d&&!E.current.destroyed&&d(E.current),()=>{E.current&&!E.current.destroyed&&E.current.destroy(!0,!1)}},[]),To(()=>{!p&&I&&E.current&&Object.keys(I).forEach(e=>{E.current.on(e,I[e])});const e=function(e,t,n,r,o){const i=[];if(!t)return i;const a=e=>{i.indexOf(e)<0&&i.push(e)};if(n&&r){const e=r.map(o),t=n.map(o);e.join("")!==t.join("")&&a("children"),r.length!==n.length&&a("children")}return po.filter(e=>"_"===e[0]).map(e=>e.replace(/_/,"")).forEach(n=>{if(n in e&&n in t)if(fo(e[n])&&fo(t[n])){const r=Object.keys(e[n]),o=Object.keys(t[n]);r.length!==o.length?a(n):(r.forEach(r=>{e[n][r]!==t[n][r]&&a(n)}),o.forEach(r=>{e[n][r]!==t[n][r]&&a(n)}))}else e[n]!==t[n]&&a(n)}),i}(k,x.current,R,S.current,e=>e.key);return x.current=k,S.current=R,e.length&&E.current&&!E.current.destroyed&&function(e){let{swiper:t,slides:n,passedParams:r,changedParams:o,nextEl:i,prevEl:a,scrollbarEl:s,paginationEl:l}=e;const c=o.filter(e=>"children"!==e&&"direction"!==e&&"wrapperClass"!==e),{params:d,pagination:u,navigation:p,scrollbar:f,virtual:m,thumbs:h}=t;let g,v,b,w,y,E,x,S;o.includes("thumbs")&&r.thumbs&&r.thumbs.swiper&&!r.thumbs.swiper.destroyed&&d.thumbs&&(!d.thumbs.swiper||d.thumbs.swiper.destroyed)&&(g=!0),o.includes("controller")&&r.controller&&r.controller.control&&d.controller&&!d.controller.control&&(v=!0),o.includes("pagination")&&r.pagination&&(r.pagination.el||l)&&(d.pagination||!1===d.pagination)&&u&&!u.el&&(b=!0),o.includes("scrollbar")&&r.scrollbar&&(r.scrollbar.el||s)&&(d.scrollbar||!1===d.scrollbar)&&f&&!f.el&&(w=!0),o.includes("navigation")&&r.navigation&&(r.navigation.prevEl||a)&&(r.navigation.nextEl||i)&&(d.navigation||!1===d.navigation)&&p&&!p.prevEl&&!p.nextEl&&(y=!0);const T=e=>{t[e]&&(t[e].destroy(),"navigation"===e?(t.isElement&&(t[e].prevEl.remove(),t[e].nextEl.remove()),d[e].prevEl=void 0,d[e].nextEl=void 0,t[e].prevEl=void 0,t[e].nextEl=void 0):(t.isElement&&t[e].el.remove(),d[e].el=void 0,t[e].el=void 0))};o.includes("loop")&&t.isElement&&(d.loop&&!r.loop?E=!0:!d.loop&&r.loop?x=!0:S=!0),c.forEach(e=>{if(fo(d[e])&&fo(r[e]))Object.assign(d[e],r[e]),"navigation"!==e&&"pagination"!==e&&"scrollbar"!==e||!("enabled"in r[e])||r[e].enabled||T(e);else{const t=r[e];!0!==t&&!1!==t||"navigation"!==e&&"pagination"!==e&&"scrollbar"!==e?d[e]=r[e]:!1===t&&T(e)}}),c.includes("controller")&&!v&&t.controller&&t.controller.control&&d.controller&&d.controller.control&&(t.controller.control=d.controller.control),o.includes("children")&&n&&m&&d.virtual.enabled?(m.slides=n,m.update(!0)):o.includes("virtual")&&m&&d.virtual.enabled&&(n&&(m.slides=n),m.update(!0)),o.includes("children")&&n&&d.loop&&(S=!0),g&&h.init()&&h.update(!0);v&&(t.controller.control=d.controller.control),b&&(!t.isElement||l&&"string"!=typeof l||(l=document.createElement("div"),l.classList.add("swiper-pagination"),l.part.add("pagination"),t.el.appendChild(l)),l&&(d.pagination.el=l),u.init(),u.render(),u.update()),w&&(!t.isElement||s&&"string"!=typeof s||(s=document.createElement("div"),s.classList.add("swiper-scrollbar"),s.part.add("scrollbar"),t.el.appendChild(s)),s&&(d.scrollbar.el=s),f.init(),f.updateSize(),f.setTranslate()),y&&(t.isElement&&(i&&"string"!=typeof i||(i=document.createElement("div"),i.classList.add("swiper-button-next"),i.innerHTML=t.hostEl.constructor.nextButtonSvg,i.part.add("button-next"),t.el.appendChild(i)),a&&"string"!=typeof a||(a=document.createElement("div"),a.classList.add("swiper-button-prev"),a.innerHTML=t.hostEl.constructor.prevButtonSvg,a.part.add("button-prev"),t.el.appendChild(a))),i&&(d.navigation.nextEl=i),a&&(d.navigation.prevEl=a),p.init(),p.update()),o.includes("allowSlideNext")&&(t.allowSlideNext=r.allowSlideNext),o.includes("allowSlidePrev")&&(t.allowSlidePrev=r.allowSlidePrev),o.includes("direction")&&t.changeDirection(r.direction,!1),(E||S)&&t.loopDestroy(),(x||S)&&t.loopCreate(),t.update()}({swiper:E.current,slides:R,passedParams:k,changedParams:e,nextEl:T.current,prevEl:P.current,scrollbarEl:O.current,paginationEl:C.current}),()=>{I&&E.current&&Object.keys(I).forEach(e=>{E.current.off(e,I[e])})}}),To(()=>{var e;!(e=E.current)||e.destroyed||!e.params.virtual||e.params.virtual&&!e.params.virtual.enabled||(e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.parallax&&e.params.parallax&&e.params.parallax.enabled&&e.parallax.setTranslate())},[h]),t.createElement(s,yo({ref:y,className:bo(`${f}${i?` ${i}`:""}`)},M),t.createElement(Co.Provider,{value:E.current},D["container-start"],t.createElement(l,{className:wo(N.wrapperClass)},D["wrapper-start"],N.virtual?function(e,n,r){if(!r)return null;const o=e=>{let t=e;return e<0?t=n.length+e:t>=n.length&&(t-=n.length),t},i=e.isHorizontal()?{[e.rtlTranslate?"right":"left"]:`${r.offset}px`}:{top:`${r.offset}px`},{from:a,to:s}=r,l=e.params.loop?-n.length:0,c=e.params.loop?2*n.length:n.length,d=[];for(let e=l;e<c;e+=1)e>=a&&e<=s&&d.push(n[o(e)]);return d.map((n,r)=>t.cloneElement(n,{swiper:e,style:i,key:n.props.virtualIndex||n.key||`slide-${r}`}))}(E.current,R,h):R.map((e,n)=>t.cloneElement(e,{swiper:E.current,swiperSlideIndex:n})),D["wrapper-end"]),ho(N)&&t.createElement(t.Fragment,null,t.createElement("div",{ref:P,className:"swiper-button-prev"}),t.createElement("div",{ref:T,className:"swiper-button-next"})),vo(N)&&t.createElement("div",{ref:O,className:"swiper-scrollbar"}),go(N)&&t.createElement("div",{ref:C,className:"swiper-pagination"}),D["container-end"]))});Oo.displayName="Swiper";const No=o(function(e,r){let{tag:o="div",children:i,className:s="",swiper:l,zoom:c,lazy:d,virtualIndex:u,swiperSlideIndex:p,...f}=void 0===e?{}:e;const m=n(null),[h,g]=a("swiper-slide"),[v,b]=a(!1);function w(e,t,n){t===m.current&&g(n)}To(()=>{if(void 0!==p&&(m.current.swiperSlideIndex=p),r&&(r.current=m.current),m.current&&l){if(!l.destroyed)return l.on("_slideClass",w),()=>{l&&l.off("_slideClass",w)};"swiper-slide"!==h&&g("swiper-slide")}}),To(()=>{l&&m.current&&!l.destroyed&&g(l.getSlideClasses(m.current))},[l]);const y={isActive:h.indexOf("swiper-slide-active")>=0,isVisible:h.indexOf("swiper-slide-visible")>=0,isPrev:h.indexOf("swiper-slide-prev")>=0,isNext:h.indexOf("swiper-slide-next")>=0},E=()=>"function"==typeof i?i(y):i;return t.createElement(o,yo({ref:m,className:bo(`${h}${s?` ${s}`:""}`),"data-swiper-slide-index":u,onLoad:()=>{b(!0)}},f),c&&t.createElement(Po.Provider,{value:y},t.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":"number"==typeof c?c:void 0},E(),d&&!v&&t.createElement("div",{className:"swiper-lazy-preloader"}))),!c&&t.createElement(Po.Provider,{value:y},E(),d&&!v&&t.createElement("div",{className:"swiper-lazy-preloader"})))});function ko(e){let{swiper:t,extendParams:n,on:r,emit:o}=e;const i=mr();let a;n({mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarget:"container",thresholdDelta:null,thresholdTime:null,noMousewheelClass:"swiper-no-mousewheel"}}),t.mousewheel={enabled:!1};let s,l=gr();const c=[];function d(){t.enabled&&(t.mouseEntered=!0)}function u(){t.enabled&&(t.mouseEntered=!1)}function p(e){return!(t.params.mousewheel.thresholdDelta&&e.delta<t.params.mousewheel.thresholdDelta)&&(!(t.params.mousewheel.thresholdTime&&gr()-l<t.params.mousewheel.thresholdTime)&&(e.delta>=6&&gr()-l<60||(e.direction<0?t.isEnd&&!t.params.loop||t.animating||(t.slideNext(),o("scroll",e.raw)):t.isBeginning&&!t.params.loop||t.animating||(t.slidePrev(),o("scroll",e.raw)),l=(new i.Date).getTime(),!1)))}function f(e){let n=e,r=!0;if(!t.enabled)return;if(e.target.closest(`.${t.params.mousewheel.noMousewheelClass}`))return;const i=t.params.mousewheel;t.params.cssMode&&n.preventDefault();let l=t.el;"container"!==t.params.mousewheel.eventsTarget&&(l=document.querySelector(t.params.mousewheel.eventsTarget));const d=l&&l.contains(n.target);if(!t.mouseEntered&&!d&&!i.releaseOnEdges)return!0;n.originalEvent&&(n=n.originalEvent);let u=0;const f=t.rtlTranslate?-1:1,m=function(e){let t=0,n=0,r=0,o=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=10*t,o=10*n,"deltaY"in e&&(o=e.deltaY),"deltaX"in e&&(r=e.deltaX),e.shiftKey&&!r&&(r=o,o=0),(r||o)&&e.deltaMode&&(1===e.deltaMode?(r*=40,o*=40):(r*=800,o*=800)),r&&!t&&(t=r<1?-1:1),o&&!n&&(n=o<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:o}}(n);if(i.forceToAxis)if(t.isHorizontal()){if(!(Math.abs(m.pixelX)>Math.abs(m.pixelY)))return!0;u=-m.pixelX*f}else{if(!(Math.abs(m.pixelY)>Math.abs(m.pixelX)))return!0;u=-m.pixelY}else u=Math.abs(m.pixelX)>Math.abs(m.pixelY)?-m.pixelX*f:-m.pixelY;if(0===u)return!0;i.invert&&(u=-u);let h=t.getTranslate()+u*i.sensitivity;if(h>=t.minTranslate()&&(h=t.minTranslate()),h<=t.maxTranslate()&&(h=t.maxTranslate()),r=!!t.params.loop||!(h===t.minTranslate()||h===t.maxTranslate()),r&&t.params.nested&&n.stopPropagation(),t.params.freeMode&&t.params.freeMode.enabled){const e={time:gr(),delta:Math.abs(u),direction:Math.sign(u)},r=s&&e.time<s.time+500&&e.delta<=s.delta&&e.direction===s.direction;if(!r){s=void 0;let l=t.getTranslate()+u*i.sensitivity;const d=t.isBeginning,p=t.isEnd;if(l>=t.minTranslate()&&(l=t.minTranslate()),l<=t.maxTranslate()&&(l=t.maxTranslate()),t.setTransition(0),t.setTranslate(l),t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses(),(!d&&t.isBeginning||!p&&t.isEnd)&&t.updateSlidesClasses(),t.params.loop&&t.loopFix({direction:e.direction<0?"next":"prev",byMousewheel:!0}),t.params.freeMode.sticky){clearTimeout(a),a=void 0,c.length>=15&&c.shift();const n=c.length?c[c.length-1]:void 0,r=c[0];if(c.push(e),n&&(e.delta>n.delta||e.direction!==n.direction))c.splice(0);else if(c.length>=15&&e.time-r.time<500&&r.delta-e.delta>=1&&e.delta<=6){const n=u>0?.8:.2;s=e,c.splice(0),a=hr(()=>{!t.destroyed&&t.params&&t.slideToClosest(t.params.speed,!0,void 0,n)},0)}a||(a=hr(()=>{if(t.destroyed||!t.params)return;s=e,c.splice(0),t.slideToClosest(t.params.speed,!0,void 0,.5)},500))}if(r||o("scroll",n),t.params.autoplay&&t.params.autoplayDisableOnInteraction&&t.autoplay.stop(),i.releaseOnEdges&&(l===t.minTranslate()||l===t.maxTranslate()))return!0}}else{const n={time:gr(),delta:Math.abs(u),direction:Math.sign(u),raw:e};c.length>=2&&c.shift();const r=c.length?c[c.length-1]:void 0;if(c.push(n),r?(n.direction!==r.direction||n.delta>r.delta||n.time>r.time+150)&&p(n):p(n),function(e){const n=t.params.mousewheel;if(e.direction<0){if(t.isEnd&&!t.params.loop&&n.releaseOnEdges)return!0}else if(t.isBeginning&&!t.params.loop&&n.releaseOnEdges)return!0;return!1}(n))return!0}return n.preventDefault?n.preventDefault():n.returnValue=!1,!1}function m(e){let n=t.el;"container"!==t.params.mousewheel.eventsTarget&&(n=document.querySelector(t.params.mousewheel.eventsTarget)),n[e]("mouseenter",d),n[e]("mouseleave",u),n[e]("wheel",f)}function h(){return t.params.cssMode?(t.wrapperEl.removeEventListener("wheel",f),!0):!t.mousewheel.enabled&&(m("addEventListener"),t.mousewheel.enabled=!0,!0)}function g(){return t.params.cssMode?(t.wrapperEl.addEventListener(event,f),!0):!!t.mousewheel.enabled&&(m("removeEventListener"),t.mousewheel.enabled=!1,!0)}r("init",()=>{!t.params.mousewheel.enabled&&t.params.cssMode&&g(),t.params.mousewheel.enabled&&h()}),r("destroy",()=>{t.params.cssMode&&h(),t.mousewheel.enabled&&g()}),Object.assign(t.mousewheel,{enable:h,disable:g})}function Mo(e){let{swiper:t,extendParams:n,on:r,emit:o}=e;function i(e){let n;return e&&"string"==typeof e&&t.isElement&&(n=t.el.querySelector(e)||t.hostEl.querySelector(e),n)?n:(e&&("string"==typeof e&&(n=[...document.querySelectorAll(e)]),t.params.uniqueNavElements&&"string"==typeof e&&n&&n.length>1&&1===t.el.querySelectorAll(e).length?n=t.el.querySelector(e):n&&1===n.length&&(n=n[0])),e&&!n?e:n)}function a(e,n){const r=t.params.navigation;(e=Mr(e)).forEach(e=>{e&&(e.classList[n?"add":"remove"](...r.disabledClass.split(" ")),"BUTTON"===e.tagName&&(e.disabled=n),t.params.watchOverflow&&t.enabled&&e.classList[t.isLocked?"add":"remove"](r.lockClass))})}function s(){const{nextEl:e,prevEl:n}=t.navigation;if(t.params.loop)return a(n,!1),void a(e,!1);a(n,t.isBeginning&&!t.params.rewind),a(e,t.isEnd&&!t.params.rewind)}function l(e){e.preventDefault(),(!t.isBeginning||t.params.loop||t.params.rewind)&&(t.slidePrev(),o("navigationPrev"))}function c(e){e.preventDefault(),(!t.isEnd||t.params.loop||t.params.rewind)&&(t.slideNext(),o("navigationNext"))}function d(){const e=t.params.navigation;if(t.params.navigation=function(e,t,n,r){return e.params.createElements&&Object.keys(r).forEach(o=>{if(!n[o]&&!0===n.auto){let i=Tr(e.el,`.${r[o]}`)[0];i||(i=Cr("div",r[o]),i.className=r[o],e.el.append(i)),n[o]=i,t[o]=i}}),n}(t,t.originalParams.navigation,t.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!e.nextEl&&!e.prevEl)return;let n=i(e.nextEl),r=i(e.prevEl);Object.assign(t.navigation,{nextEl:n,prevEl:r}),n=Mr(n),r=Mr(r);const o=(n,r)=>{n&&n.addEventListener("click","next"===r?c:l),!t.enabled&&n&&n.classList.add(...e.lockClass.split(" "))};n.forEach(e=>o(e,"next")),r.forEach(e=>o(e,"prev"))}function u(){let{nextEl:e,prevEl:n}=t.navigation;e=Mr(e),n=Mr(n);const r=(e,n)=>{e.removeEventListener("click","next"===n?c:l),e.classList.remove(...t.params.navigation.disabledClass.split(" "))};e.forEach(e=>r(e,"next")),n.forEach(e=>r(e,"prev"))}n({navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),t.navigation={nextEl:null,prevEl:null},r("init",()=>{!1===t.params.navigation.enabled?p():(d(),s())}),r("toEdge fromEdge lock unlock",()=>{s()}),r("destroy",()=>{u()}),r("enable disable",()=>{let{nextEl:e,prevEl:n}=t.navigation;e=Mr(e),n=Mr(n),t.enabled?s():[...e,...n].filter(e=>!!e).forEach(e=>e.classList.add(t.params.navigation.lockClass))}),r("click",(e,n)=>{let{nextEl:r,prevEl:i}=t.navigation;r=Mr(r),i=Mr(i);const a=n.target;let s=i.includes(a)||r.includes(a);if(t.isElement&&!s){const e=n.path||n.composedPath&&n.composedPath();e&&(s=e.find(e=>r.includes(e)||i.includes(e)))}if(t.params.navigation.hideOnClick&&!s){if(t.pagination&&t.params.pagination&&t.params.pagination.clickable&&(t.pagination.el===a||t.pagination.el.contains(a)))return;let e;r.length?e=r[0].classList.contains(t.params.navigation.hiddenClass):i.length&&(e=i[0].classList.contains(t.params.navigation.hiddenClass)),o(!0===e?"navigationShow":"navigationHide"),[...r,...i].filter(e=>!!e).forEach(e=>e.classList.toggle(t.params.navigation.hiddenClass))}});const p=()=>{t.el.classList.add(...t.params.navigation.navigationDisabledClass.split(" ")),u()};Object.assign(t.navigation,{enable:()=>{t.el.classList.remove(...t.params.navigation.navigationDisabledClass.split(" ")),d(),s()},disable:p,update:s,init:d,destroy:u})}function Io(e){let t,n,{swiper:r,extendParams:o,on:i,emit:a,params:s}=e;r.autoplay={running:!1,paused:!1,timeLeft:0},o({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!1,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let l,c,d,u,p,f,m,h,g=s&&s.autoplay?s.autoplay.delay:3e3,v=s&&s.autoplay?s.autoplay.delay:3e3,b=(new Date).getTime();function w(e){r&&!r.destroyed&&r.wrapperEl&&e.target===r.wrapperEl&&(r.wrapperEl.removeEventListener("transitionend",w),h||e.detail&&e.detail.bySwiperTouchMove||P())}const y=()=>{if(r.destroyed||!r.autoplay.running)return;r.autoplay.paused?c=!0:c&&(v=l,c=!1);const e=r.autoplay.paused?l:b+v-(new Date).getTime();r.autoplay.timeLeft=e,a("autoplayTimeLeft",e,e/g),n=requestAnimationFrame(()=>{y()})},E=e=>{if(r.destroyed||!r.autoplay.running)return;cancelAnimationFrame(n),y();let o=void 0===e?r.params.autoplay.delay:e;g=r.params.autoplay.delay,v=r.params.autoplay.delay;const i=(()=>{let e;if(e=r.virtual&&r.params.virtual.enabled?r.slides.filter(e=>e.classList.contains("swiper-slide-active"))[0]:r.slides[r.activeIndex],!e)return;return parseInt(e.getAttribute("data-swiper-autoplay"),10)})();!Number.isNaN(i)&&i>0&&void 0===e&&(o=i,g=i,v=i),l=o;const s=r.params.speed,c=()=>{r&&!r.destroyed&&(r.params.autoplay.reverseDirection?!r.isBeginning||r.params.loop||r.params.rewind?(r.slidePrev(s,!0,!0),a("autoplay")):r.params.autoplay.stopOnLastSlide||(r.slideTo(r.slides.length-1,s,!0,!0),a("autoplay")):!r.isEnd||r.params.loop||r.params.rewind?(r.slideNext(s,!0,!0),a("autoplay")):r.params.autoplay.stopOnLastSlide||(r.slideTo(0,s,!0,!0),a("autoplay")),r.params.cssMode&&(b=(new Date).getTime(),requestAnimationFrame(()=>{E()})))};return o>0?(clearTimeout(t),t=setTimeout(()=>{c()},o)):requestAnimationFrame(()=>{c()}),o},x=()=>{b=(new Date).getTime(),r.autoplay.running=!0,E(),a("autoplayStart")},S=()=>{r.autoplay.running=!1,clearTimeout(t),cancelAnimationFrame(n),a("autoplayStop")},T=(e,n)=>{if(r.destroyed||!r.autoplay.running)return;clearTimeout(t),e||(m=!0);const o=()=>{a("autoplayPause"),r.params.autoplay.waitForTransition?r.wrapperEl.addEventListener("transitionend",w):P()};if(r.autoplay.paused=!0,n)return f&&(l=r.params.autoplay.delay),f=!1,void o();const i=l||r.params.autoplay.delay;l=i-((new Date).getTime()-b),r.isEnd&&l<0&&!r.params.loop||(l<0&&(l=0),o())},P=()=>{r.isEnd&&l<0&&!r.params.loop||r.destroyed||!r.autoplay.running||(b=(new Date).getTime(),m?(m=!1,E(l)):E(),r.autoplay.paused=!1,a("autoplayResume"))},C=()=>{if(r.destroyed||!r.autoplay.running)return;const e=pr();"hidden"===e.visibilityState&&(m=!0,T(!0)),"visible"===e.visibilityState&&P()},O=e=>{"mouse"===e.pointerType&&(m=!0,h=!0,r.animating||r.autoplay.paused||T(!0))},N=e=>{"mouse"===e.pointerType&&(h=!1,r.autoplay.paused&&P())};i("init",()=>{r.params.autoplay.enabled&&(r.params.autoplay.pauseOnMouseEnter&&(r.el.addEventListener("pointerenter",O),r.el.addEventListener("pointerleave",N)),pr().addEventListener("visibilitychange",C),x())}),i("destroy",()=>{r.el&&"string"!=typeof r.el&&(r.el.removeEventListener("pointerenter",O),r.el.removeEventListener("pointerleave",N)),pr().removeEventListener("visibilitychange",C),r.autoplay.running&&S()}),i("_freeModeStaticRelease",()=>{(u||m)&&P()}),i("_freeModeNoMomentumRelease",()=>{r.params.autoplay.disableOnInteraction?S():T(!0,!0)}),i("beforeTransitionStart",(e,t,n)=>{!r.destroyed&&r.autoplay.running&&(n||!r.params.autoplay.disableOnInteraction?T(!0,!0):S())}),i("sliderFirstMove",()=>{!r.destroyed&&r.autoplay.running&&(r.params.autoplay.disableOnInteraction?S():(d=!0,u=!1,m=!1,p=setTimeout(()=>{m=!0,u=!0,T(!0)},200)))}),i("touchEnd",()=>{if(!r.destroyed&&r.autoplay.running&&d){if(clearTimeout(p),clearTimeout(t),r.params.autoplay.disableOnInteraction)return u=!1,void(d=!1);u&&r.params.cssMode&&P(),u=!1,d=!1}}),i("slideChange",()=>{!r.destroyed&&r.autoplay.running&&(f=!0)}),Object.assign(r.autoplay,{start:x,stop:S,pause:T,resume:P})}function Ro(e){let t,n,r,o,{swiper:i,extendParams:a,on:s}=e;a({grid:{rows:1,fill:"column"}});const l=()=>{let e=i.params.spaceBetween;return"string"==typeof e&&e.indexOf("%")>=0?e=parseFloat(e.replace("%",""))/100*i.size:"string"==typeof e&&(e=parseFloat(e)),e};s("init",()=>{o=i.params.grid&&i.params.grid.rows>1}),s("update",()=>{const{params:e,el:t}=i,n=e.grid&&e.grid.rows>1;o&&!n?(t.classList.remove(`${e.containerModifierClass}grid`,`${e.containerModifierClass}grid-column`),r=1,i.emitContainerClasses()):!o&&n&&(t.classList.add(`${e.containerModifierClass}grid`),"column"===e.grid.fill&&t.classList.add(`${e.containerModifierClass}grid-column`),i.emitContainerClasses()),o=n}),i.grid={initSlides:e=>{const{slidesPerView:o}=i.params,{rows:a,fill:s}=i.params.grid,l=i.virtual&&i.params.virtual.enabled?i.virtual.slides.length:e.length;r=Math.floor(l/a),t=Math.floor(l/a)===l/a?l:Math.ceil(l/a)*a,"auto"!==o&&"row"===s&&(t=Math.max(t,o*a)),n=t/a},unsetSlides:()=>{i.slides&&i.slides.forEach(e=>{e.swiperSlideGridSet&&(e.style.height="",e.style[i.getDirectionLabel("margin-top")]="")})},updateSlide:(e,o,a)=>{const{slidesPerGroup:s}=i.params,c=l(),{rows:d,fill:u}=i.params.grid,p=i.virtual&&i.params.virtual.enabled?i.virtual.slides.length:a.length;let f,m,h;if("row"===u&&s>1){const n=Math.floor(e/(s*d)),r=e-d*s*n,i=0===n?s:Math.min(Math.ceil((p-n*d*s)/d),s);h=Math.floor(r/i),m=r-h*i+n*s,f=m+h*t/d,o.style.order=f}else"column"===u?(m=Math.floor(e/d),h=e-m*d,(m>r||m===r&&h===d-1)&&(h+=1,h>=d&&(h=0,m+=1))):(h=Math.floor(e/n),m=e-h*n);o.row=h,o.column=m,o.style.height=`calc((100% - ${(d-1)*c}px) / ${d})`,o.style[i.getDirectionLabel("margin-top")]=0!==h?c&&`${c}px`:"",o.swiperSlideGridSet=!0},updateWrapperSize:(e,n)=>{const{centeredSlides:r,roundLengths:o}=i.params,a=l(),{rows:s}=i.params.grid;if(i.virtualSize=(e+a)*t,i.virtualSize=Math.ceil(i.virtualSize/s)-a,i.params.cssMode||(i.wrapperEl.style[i.getDirectionLabel("width")]=`${i.virtualSize+a}px`),r){const e=[];for(let t=0;t<n.length;t+=1){let r=n[t];o&&(r=Math.floor(r)),n[t]<i.virtualSize+n[0]&&e.push(r)}n.splice(0,n.length),n.push(...e)}}}}function Do(e){const t=this,{params:n,slidesEl:r}=t;n.loop&&t.loopDestroy();const o=e=>{if("string"==typeof e){const t=document.createElement("div");t.innerHTML=e,r.append(t.children[0]),t.innerHTML=""}else r.append(e)};if("object"==typeof e&&"length"in e)for(let t=0;t<e.length;t+=1)e[t]&&o(e[t]);else o(e);t.recalcSlides(),n.loop&&t.loopCreate(),n.observer&&!t.isElement||t.update()}function Ao(e){const t=this,{params:n,activeIndex:r,slidesEl:o}=t;n.loop&&t.loopDestroy();let i=r+1;const a=e=>{if("string"==typeof e){const t=document.createElement("div");t.innerHTML=e,o.prepend(t.children[0]),t.innerHTML=""}else o.prepend(e)};if("object"==typeof e&&"length"in e){for(let t=0;t<e.length;t+=1)e[t]&&a(e[t]);i=r+e.length}else a(e);t.recalcSlides(),n.loop&&t.loopCreate(),n.observer&&!t.isElement||t.update(),t.slideTo(i,0,!1)}function zo(e,t){const n=this,{params:r,activeIndex:o,slidesEl:i}=n;let a=o;r.loop&&(a-=n.loopedSlides,n.loopDestroy(),n.recalcSlides());const s=n.slides.length;if(e<=0)return void n.prependSlide(t);if(e>=s)return void n.appendSlide(t);let l=a>e?a+1:a;const c=[];for(let t=s-1;t>=e;t-=1){const e=n.slides[t];e.remove(),c.unshift(e)}if("object"==typeof t&&"length"in t){for(let e=0;e<t.length;e+=1)t[e]&&i.append(t[e]);l=a>e?a+t.length:a}else i.append(t);for(let e=0;e<c.length;e+=1)i.append(c[e]);n.recalcSlides(),r.loop&&n.loopCreate(),r.observer&&!n.isElement||n.update(),r.loop?n.slideTo(l+n.loopedSlides,0,!1):n.slideTo(l,0,!1)}function Lo(e){const t=this,{params:n,activeIndex:r}=t;let o=r;n.loop&&(o-=t.loopedSlides,t.loopDestroy());let i,a=o;if("object"==typeof e&&"length"in e){for(let n=0;n<e.length;n+=1)i=e[n],t.slides[i]&&t.slides[i].remove(),i<a&&(a-=1);a=Math.max(a,0)}else i=e,t.slides[i]&&t.slides[i].remove(),i<a&&(a-=1),a=Math.max(a,0);t.recalcSlides(),n.loop&&t.loopCreate(),n.observer&&!t.isElement||t.update(),n.loop?t.slideTo(a+t.loopedSlides,0,!1):t.slideTo(a,0,!1)}function _o(){const e=this,t=[];for(let n=0;n<e.slides.length;n+=1)t.push(n);e.removeSlide(t)}function jo(e){let{swiper:t}=e;Object.assign(t,{appendSlide:Do.bind(t),prependSlide:Ao.bind(t),addSlide:zo.bind(t),removeSlide:Lo.bind(t),removeAllSlides:_o.bind(t)})}function Fo(e,t){const n=Sr(t);return n!==t&&(n.style.backfaceVisibility="hidden",n.style["-webkit-backface-visibility"]="hidden"),n}function Wo(e){let{swiper:t,duration:n,transformElements:r,allSlides:o}=e;const{activeIndex:i}=t;if(t.params.virtualTranslate&&0!==n){let e,n=!1;e=o?r:r.filter(e=>{const n=e.classList.contains("swiper-slide-transform")?(e=>{if(!e.parentElement)return t.slides.filter(t=>t.shadowRoot&&t.shadowRoot===e.parentNode)[0];return e.parentElement})(e):e;return t.getSlideIndex(n)===i}),e.forEach(e=>{!function(e,t){t&&e.addEventListener("transitionend",function n(r){r.target===e&&(t.call(e,r),e.removeEventListener("transitionend",n))})}(e,()=>{if(n)return;if(!t||t.destroyed)return;n=!0,t.animating=!1;const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});t.wrapperEl.dispatchEvent(e)})})}}function $o(e,t,n){const r=`swiper-slide-shadow swiper-slide-shadow-${e}`,o=Sr(t);let i=o.querySelector(`.${r.split(" ").join(".")}`);return i||(i=Cr("div",r.split(" ")),o.append(i)),i}function Bo(e){let{swiper:t,extendParams:n,on:r}=e;n({cardsEffect:{slideShadows:!0,rotate:!0,perSlideRotate:2,perSlideOffset:8}});!function(e){const{effect:t,swiper:n,on:r,setTranslate:o,setTransition:i,overwriteParams:a,perspective:s,recreateShadows:l,getEffectParams:c}=e;let d;r("beforeInit",()=>{if(n.params.effect!==t)return;n.classNames.push(`${n.params.containerModifierClass}${t}`),s&&s()&&n.classNames.push(`${n.params.containerModifierClass}3d`);const e=a?a():{};Object.assign(n.params,e),Object.assign(n.originalParams,e)}),r("setTranslate",()=>{n.params.effect===t&&o()}),r("setTransition",(e,r)=>{n.params.effect===t&&i(r)}),r("transitionEnd",()=>{if(n.params.effect===t&&l){if(!c||!c().slideShadows)return;n.slides.forEach(e=>{e.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(e=>e.remove())}),l()}}),r("virtualUpdate",()=>{n.params.effect===t&&(n.slides.length||(d=!0),requestAnimationFrame(()=>{d&&n.slides&&n.slides.length&&(o(),d=!1)}))})}({effect:"cards",swiper:t,on:r,setTranslate:()=>{const{slides:e,activeIndex:n,rtlTranslate:r}=t,o=t.params.cardsEffect,{startTranslate:i,isTouched:a}=t.touchEventsData,s=r?-t.translate:t.translate;for(let l=0;l<e.length;l+=1){const c=e[l],d=c.progress,u=Math.min(Math.max(d,-4),4);let p=c.swiperSlideOffset;t.params.centeredSlides&&!t.params.cssMode&&(t.wrapperEl.style.transform=`translateX(${t.minTranslate()}px)`),t.params.centeredSlides&&t.params.cssMode&&(p-=e[0].swiperSlideOffset);let f=t.params.cssMode?-p-t.translate:-p,m=0;const h=-100*Math.abs(u);let g=1,v=-o.perSlideRotate*u,b=o.perSlideOffset-.75*Math.abs(u);const w=t.virtual&&t.params.virtual.enabled?t.virtual.from+l:l,y=(w===n||w===n-1)&&u>0&&u<1&&(a||t.params.cssMode)&&s<i,E=(w===n||w===n+1)&&u<0&&u>-1&&(a||t.params.cssMode)&&s>i;if(y||E){const e=(1-Math.abs((Math.abs(u)-.5)/.5))**.5;v+=-28*u*e,g+=-.5*e,b+=96*e,m=-25*e*Math.abs(u)+"%"}if(f=u<0?`calc(${f}px ${r?"-":"+"} (${b*Math.abs(u)}%))`:u>0?`calc(${f}px ${r?"-":"+"} (-${b*Math.abs(u)}%))`:`${f}px`,!t.isHorizontal()){const e=m;m=f,f=e}const x=u<0?""+(1+(1-g)*u):""+(1-(1-g)*u),S=`\n translate3d(${f}, ${m}, ${h}px)\n rotateZ(${o.rotate?r?-v:v:0}deg)\n scale(${x})\n `;if(o.slideShadows){let e=c.querySelector(".swiper-slide-shadow");e||(e=$o("cards",c)),e&&(e.style.opacity=Math.min(Math.max((Math.abs(u)-.5)/.5,0),1))}c.style.zIndex=-Math.abs(Math.round(d))+e.length;Fo(0,c).style.transform=S}},setTransition:e=>{const n=t.slides.map(e=>Sr(e));n.forEach(t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow").forEach(t=>{t.style.transitionDuration=`${e}ms`})}),Wo({swiper:t,duration:e,transformElements:n})},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!t.params.cssMode})})}No.displayName="SwiperSlide";const Ho=({product:e})=>{const[n,r]=a(!1);return t.createElement("a",{href:e.linkPath,target:"_blank"},t.createElement("div",{className:"w-full h-full flex gap-2 flex-col"},t.createElement("div",{className:"w-full max-h-fit aspect-square border mb-2 flex justify-center items-center"},e.thumbPath&&!n?t.createElement(bt,{product:e,onError:()=>r(!0)}):t.createElement(vt,null)),t.createElement("div",{className:"justify-center flex flex-col"},e.brand&&t.createElement("p",{className:"max-w-52 break-keep line-clamp-1 text-xs text-gray-500"},e.brand.brandName),t.createElement("p",null,e.productName),t.createElement("div",null,t.createElement("span",{className:"font-semibold text-red-500"},e.discount,"%"," "),t.createElement("span",{className:"font-semibold"},Ve(e.sellingPrice),"원")))))},Vo=({products:e})=>{const o=n(null),[i,s]=a(0),l=n(null);r(()=>{u(),window.addEventListener("resize",()=>{clearInterval(c),c=setTimeout(u,d)})},[]);let c=null;const d=100,u=()=>{l.current&&s(l.current.offsetWidth)};return e&&t.createElement("div",{className:"flex items-center h-full justify-center w-full",ref:l},e.length>3?t.createElement(at,{size:50,className:"cursor-pointer slide__prev",onClick:()=>{var e;null===(e=o.current)||void 0===e||e.slidePrev()}}):t.createElement("div",{className:"w-[50px]"}),t.createElement(Oo,{modules:[Mo],onSwiper:e=>{o.current=e},style:{width:i},slidesPerView:3,navigation:{prevEl:".slide__prev",nextEl:".slide__next"},spaceBetween:20},e.map(e=>t.createElement(No,{key:e.productId},t.createElement(Ho,{product:e})))),e.length>3?t.createElement(st,{onClick:()=>{var e;null===(e=o.current)||void 0===e||e.slideNext()},size:50,className:"cursor-pointer slide__next"}):t.createElement("div",{className:"w-[50px]"}))},Uo=e=>{const{player:n,shortform:r}=e;return t.createElement("div",{className:"flex h-full gap-5"},t.createElement("div",{className:"h-full aspect-[9/16]"},n),t.createElement("div",{className:"w-full min-w-44 max-w-[800px] overflow-hidden text-sm"},t.createElement(Vo,{products:r.productsInfo})))},Go=({products:e})=>{const r=n(null);return t.createElement("div",{className:"flex items-center flex-col h-full"},e.length>4&&t.createElement(lt,{size:50,className:"cursor-pointer slide__prev"}),t.createElement(Oo,{modules:[ko,Mo],mousewheel:!0,onSwiper:e=>{r.current=e},spaceBetween:10,className:"max-w-full h-[80%]",slidesPerView:4,direction:"vertical",navigation:{prevEl:".slide__prev",nextEl:".slide__next"}},e.map(e=>t.createElement(No,{key:e.productId},t.createElement(wt,{product:e})))),e.length>4&&t.createElement(it,{size:50,className:"cursor-pointer slide__next"}))},Yo=e=>{const{playerSettings:n,shortform:{productsInfo:r},player:o}=e;return t.createElement("div",{className:"flex h-full w-full gap-5"},t.createElement("div",{className:" h-full "},o),t.createElement("div",{className:"max-w-[800px] overflow-hidden"},t.createElement(Go,{products:r})))},qo=({products:e})=>{const r=n(null),o=e.length>6;return t.createElement("div",{className:"flex items-center my-10 h-full text-sm w-full"},o?t.createElement(at,{onClick:()=>{var e;null===(e=r.current)||void 0===e||e.slidePrev()},size:50,className:"cursor-pointer"}):t.createElement("div",{className:"w-[50px]"}),t.createElement(Oo,{onSwiper:e=>{r.current=e},className:"w-[80%] h-[80%]",slidesPerView:3,spaceBetween:20,modules:[Ro],grid:{rows:2,fill:"row"}},e.map(e=>t.createElement(No,{key:e.productId},t.createElement(Ho,{product:e})))),o?t.createElement(st,{onClick:()=>{var e;null===(e=r.current)||void 0===e||e.slideNext()},size:50,className:"cursor-pointer"}):t.createElement("div",{className:"w-[50px]"}))},Xo=e=>{const{player:n,shortform:{productsInfo:r}}=e;return t.createElement("div",{className:"flex gap-4 w-full h-full min-w-[768px]"},t.createElement("div",{className:"flex-1 w-full"},t.createElement("div",{className:"h-full aspect-[9/16]"},n)),t.createElement("div",{className:"flex-[2] w-full h-full overflow-hidden"},t.createElement(qo,{products:r})))},Ko=e=>(document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}),Zo=()=>document.visibilityState,Jo=()=>{throw Error("useVisibilityChange is a client-only hook")};function Qo(){return"visible"===e.useSyncExternalStore(Ko,Zo,Jo)}const ei=()=>{const[e,t]=a(0);((e,t,o=!0)=>{const i=n(e),a=n(null),s=()=>{a.current&&(clearInterval(a.current),a.current=null)},l=d(()=>{a.current||(a.current=setInterval(()=>i.current(),t))},[t]);r(()=>{i.current=e},[e]),r(()=>(o&&l(),()=>s()),[l,o])})(()=>{t(e=>e+1)},1e3);return{playtime:e,resetPlaytime:()=>t(0)}};var ti;!function(e){e.LIVE="live",e.SHORTS="shorts",e.COLLECTION="collection"}(ti||(ti={}));let ni=0;const{API_BASE_URL:ri,PLAYER_BACK_BASE_URL:oi}=$e,ii=e=>T(void 0,void 0,void 0,function*(){const{contentId:t,uuid:n,type:r,userId:o}=e;try{if(3===ni)return;const e=`${oi}/statistics/play`,i=Object.assign({contentId:t,uuid:n,type:r,date:Ue(),userId:+o,playtime:0,isLive:!1},"shorts"===r&&{isFinished:!1,playedOver5Sec:!1});yield fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)})}catch(e){console.error(`Error in statisticsApi.join - contentId: ${t}`),Ke(e),ni++}}),ai=e=>{const{contentId:t,uuid:n,type:r,isFinished:o,playtime:i,userId:a}=e,s=Object.assign({contentId:t,uuid:n,playtime:i,type:r,date:Ue(),userId:+a,isLive:!1},"shorts"===r&&{isFinished:o,playedOver5Sec:Number(i)>5});fetch(`${oi}/statistics/play`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s),keepalive:!0})},si=e=>T(void 0,void 0,void 0,function*(){const{contentProductId:t}=e;try{yield fetch(`${oi}/statistics/products/${t}/clicks`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Object.assign({date:Ue()},e))})}catch(e){console.error(`Error in statisticsApi.productClick - contentProductId: ${t}`),Ke(e)}}),li=e=>T(void 0,void 0,void 0,function*(){try{return(yield(yield fetch(`${$e.STATISTICS_BASE_URL}/${e}/likes`)).json()).result||0}catch(t){return console.error(`Error in statisticsApi.getLike - contentId: ${e}`),Ke(t),0}}),ci=e=>T(void 0,void 0,void 0,function*(){try{yield fetch(`${$e.PLAYER_BACK_BASE_URL}/statistics/like`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({contentId:e,isLive:!1,isFirst:!1})})}catch(t){console.error(`Error in statisticsApi.getLike - contentId: ${e}`),Ke(t)}}),di=e=>T(void 0,[e],void 0,function*({collectionId:e,nextKey:t,size:n=5}){try{const r=new URLSearchParams;-1!==n&&r.set("size",String(n)),t&&r.set("nextKey",t);return(yield fetch(`${oi}/commerce/collection/${e}?${r.toString()}`)).json()}catch(e){return Ke(e),null}}),ui=e=>T(void 0,void 0,void 0,function*(){try{return(yield fetch(`${oi}/commerce/short-form/${e}`)).json()}catch(e){return Ke(e),null}}),pi=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!=typeof o||null===o)?o:Object.assign({},t,o),n.forEach(n=>n(t,e))}},o=()=>t,i={setState:r,getState:o,getInitialState:()=>a,subscribe:e=>(n.add(e),()=>n.delete(e))},a=t=e(r,o,i);return i},fi=e=>e?pi(e):pi,mi=e=>e;function hi(e,n=mi){const r=t.useSyncExternalStore(e.subscribe,t.useCallback(()=>n(e.getState()),[e,n]),t.useCallback(()=>n(e.getInitialState()),[e,n]));return t.useDebugValue(r),r}const gi=e=>{const t=fi(e),n=e=>hi(t,e);return Object.assign(n,t),n},vi=e=>e?gi(e):gi,bi=vi(e=>({priceText:"",isPreview:!1,setPriceText:t=>e({priceText:t}),setIsPreview:t=>e({isPreview:t})})),wi=t.createContext(null),yi=({children:e})=>{const n=t.useRef(null);return n.current||(n.current=fi(e=>({collection:null,setCollection:t=>e({collection:t}),nextKey:"",setNextKey:t=>e({nextKey:t}),isFetching:!1,setIsFetching:t=>e({isFetching:t})}))),t.createElement(wi.Provider,{value:n.current},e)},Ei=()=>(e=>{const n=t.useContext(wi);if(!n)throw new Error("Missing CollectionProvider");return hi(n,e)})(e=>e),xi=(e,t)=>{const{collection:n,setCollection:o,isFetching:i,setIsFetching:a,nextKey:s,setNextKey:l}=Ei(),{isPreview:c}=bi(),d=(null==e?void 0:e.media)?e.media.duration.split(":").reduce((e,t,n)=>e+ +t*60**(2-n),0):0;const{resetPlaytime:u,playtime:p}=ei(),{playtime:f,resetPlaytime:m}=ei(),h=Qo(),g=()=>{if(!n)return;const{colId:t,uuid:r,userId:o}=n,i=$e.PLAYED_CHECK_KEY.LAST_PLAYED,a=Math.floor((new Date).getTime()/1e3);localStorage.setItem(i,a.toString()),c||(ai({contentId:t,uuid:r,type:ti.COLLECTION,userId:o,playtime:f}),e&&ai({contentId:e.shortsId,uuid:e.uuid,type:ti.SHORTS,userId:o,playtime:p,isFinished:p>=d}),m(),u())};r(()=>{h||g()},[h]);return{onSlideChange:r=>T(void 0,void 0,void 0,function*(){if(e&&n&&(yield(e=>T(void 0,void 0,void 0,function*(){var t,r;if(!n)return;const{contents:c,count:d}=n;if((null!=d?d:Number.MAX_SAFE_INTEGER)>c.length&&e>=c.length-5&&!i){a(!0);try{const e=yield di({collectionId:n.colId,nextKey:s});if(!e||!(null===(t=e.contents)||void 0===t?void 0:t.length))return;l((null===(r=e.contents.at(-1))||void 0===r?void 0:r.shortsId)||"");const i=new Set(n.contents.map(e=>e.shortsId)),a=e.contents.filter(e=>!i.has(e.shortsId));if(!a.length)return;const c=n.contents.concat(a);o(Object.assign(Object.assign({},n),{contents:c}))}catch(e){console.error(e)}finally{a(!1)}}}))(r),!c)){const{shortsId:o,uuid:i,userId:a}=e;ai({contentId:o,uuid:i,type:ti.SHORTS,playtime:p,isFinished:p>=d,userId:a}),u();const s=Ge(),l=n.contents[r];t(Object.assign(Object.assign({},l),{uuid:s})),yield ii({contentId:l.shortsId,uuid:s,type:ti.SHORTS,userId:l.userId,isFirstPlay:!Ye(l.shortsId)})}}),onCollectionClose:g}},Si=e=>{const{collection:r,playerSettings:o,shortform:i,setShortform:a}=e,s=n(null),{onSlideChange:l}=xi(r,i);return t.createElement(t.Fragment,null,t.createElement("div",{className:"self-center flex gap-4 flex-col"},t.createElement(lt,{size:44,onClick:()=>{var e;null===(e=s.current)||void 0===e||e.swiper.slidePrev()}}),t.createElement(it,{size:44,onClick:()=>{var e;null===(e=s.current)||void 0===e||e.swiper.slideNext()}})),t.createElement("div",{className:"h-full aspect-[9/16] my-10"},t.createElement(Oo,{modules:[ko,jo],mousewheel:!0,loop:!0,direction:"vertical",touchEventsTarget:"container",slidesPerView:1,ref:s,className:"h-full",onSlideChangeTransitionEnd:e=>T(void 0,void 0,void 0,function*(){yield l(e.realIndex)})},r.contents.map(e=>t.createElement(No,{key:e.shortsId},i.shortsId===e.shortsId&&t.createElement("div",{className:"h-full rounded-xl absolute z-[999] aspect-[9/16] overflow-hidden"},t.createElement(O,{file:He(i.media.objectId)})),t.createElement("img",{src:Xe(e.thumbPath),alt:e.title,className:"rounded-xl overflow-hidden h-full bg-black aspect-[9/16] "+(e.media.width>e.media.height?"object-contain":"object-cover")}))))))},Ti=e=>{const{collection:r,shortform:o,setShortform:i,playerSettings:a}=e,s=n(null);xi(r,o);return t.createElement("div",{className:"mx-10 flex h-full gap-4"},t.createElement("div",{className:"self-center flex gap-4 flex-col"},t.createElement(lt,{size:44,onClick:()=>{var e;null===(e=s.current)||void 0===e||e.swiper.slidePrev()}}),t.createElement(it,{size:44,onClick:()=>{var e;null===(e=s.current)||void 0===e||e.swiper.slideNext()}})),t.createElement("div",{className:"h-full aspect-[9/16]"},t.createElement(Oo,{modules:[ko,jo],mousewheel:!0,direction:"vertical",slidesPerView:1,ref:s,className:"h-full",preventClicksPropagation:!1,preventClicks:!1,noSwiping:!0,allowTouchMove:!1,loop:!0},r.contents.map(e=>t.createElement(No,{key:e.shortsId},t.createElement("div",{className:"flex justify-center gap-3 h-full w-full"},o.shortsId===e.shortsId&&t.createElement("div",{className:"h-full absolute z-[999] w-full"},t.createElement("div",{className:"h-full aspect-[9/16]"},t.createElement(O,{file:He(o.media.objectId)}))),t.createElement("div",{className:"h-full aspec[9/16]"},t.createElement("img",{src:"https://"+e.thumbPath,alt:e.title,className:"w-full h-full bg-black "+(e.media.width>e.media.height?"object-contain":"object-cover")}))))))))},Pi=()=>t.createElement("div",{className:"inline-block absolute pointer-events-none top-0 z-10 animate-float w-[24px] h-[24px]"},t.createElement(ct,{className:"fill-red-500 text-transparent w-[24px] h-[24px]"})),Ci=({shortsId:e})=>{const{isPreview:n}=bi(),[o,i]=a(n?123:0),[s,l]=a([]);r(()=>{n||T(void 0,void 0,void 0,function*(){try{const t=yield li(e);i(t)}catch(e){return console.error(`Error in statistics getLikeInLive: ${e.toString()}`),0}})},[]);return t.createElement("div",{className:"flex justify-center flex-col items-center relative w-[24px] h-[24px]"},t.createElement("button",{onClick:()=>T(void 0,void 0,void 0,function*(){(()=>{const e=Date.now();l(t=>[...t,e]),setTimeout(()=>{l(t=>t.filter(t=>t!==e))},2e3)})(),i(e=>e+1),n||(yield T(void 0,void 0,void 0,function*(){yield ci(e)}))}),className:"z-[5] cursor-pointer"},t.createElement(ct,{className:"text-xl fill-white w-[24px] h-[24px]"})),s.map(e=>t.createElement(Pi,{key:e})),t.createElement("span",{className:"break-keep text-[10px]"},Ve(o)))};function Oi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ni(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var ki,Mi,Ii={},Ri={exports:{}},Di=Ri.exports;function Ai(){return ki||(ki=1,e=Ri,t=Ri.exports,function(n,r){var o="function",i="undefined",a="object",s="string",l="major",c="model",d="name",u="type",p="vendor",f="version",m="architecture",h="console",g="mobile",v="tablet",b="smarttv",w="wearable",y="embedded",E="Amazon",x="Apple",S="ASUS",T="BlackBerry",P="Browser",C="Chrome",O="Firefox",N="Google",k="Huawei",M="LG",I="Microsoft",R="Motorola",D="Opera",A="Samsung",z="Sharp",L="Sony",_="Xiaomi",j="Zebra",F="Facebook",W="Chromium OS",$="Mac OS",B=" Browser",H=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},V=function(e,t){return typeof e===s&&-1!==U(t).indexOf(U(e))},U=function(e){return e.toLowerCase()},G=function(e,t){if(typeof e===s)return e=e.replace(/^\s\s*/,""),typeof t===i?e:e.substring(0,500)},Y=function(e,t){for(var n,i,s,l,c,d,u=0;u<t.length&&!c;){var p=t[u],f=t[u+1];for(n=i=0;n<p.length&&!c&&p[n];)if(c=p[n++].exec(e))for(s=0;s<f.length;s++)d=c[++i],typeof(l=f[s])===a&&l.length>0?2===l.length?typeof l[1]==o?this[l[0]]=l[1].call(this,d):this[l[0]]=l[1]:3===l.length?typeof l[1]!==o||l[1].exec&&l[1].test?this[l[0]]=d?d.replace(l[1],l[2]):r:this[l[0]]=d?l[1].call(this,d,l[2]):r:4===l.length&&(this[l[0]]=d?l[3].call(this,d.replace(l[1],l[2])):r):this[l]=d||r;u+=2}},q=function(e,t){for(var n in t)if(typeof t[n]===a&&t[n].length>0){for(var o=0;o<t[n].length;o++)if(V(t[n][o],e))return"?"===n?r:n}else if(V(t[n],e))return"?"===n?r:n;return t.hasOwnProperty("*")?t["*"]:e},X={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},K={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[f,[d,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[f,[d,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[d,f],[/opios[\/ ]+([\w\.]+)/i],[f,[d,D+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[f,[d,D+" GX"]],[/\bopr\/([\w\.]+)/i],[f,[d,D]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[f,[d,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[f,[d,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[d,f],[/quark(?:pc)?\/([-\w\.]+)/i],[f,[d,"Quark"]],[/\bddg\/([\w\.]+)/i],[f,[d,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[f,[d,"UC"+P]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[f,[d,"WeChat"]],[/konqueror\/([\w\.]+)/i],[f,[d,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[f,[d,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[f,[d,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[f,[d,"Smart Lenovo "+P]],[/(avast|avg)\/([\w\.]+)/i],[[d,/(.+)/,"$1 Secure "+P],f],[/\bfocus\/([\w\.]+)/i],[f,[d,O+" Focus"]],[/\bopt\/([\w\.]+)/i],[f,[d,D+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[f,[d,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[f,[d,"Dolphin"]],[/coast\/([\w\.]+)/i],[f,[d,D+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[f,[d,"MIUI"+B]],[/fxios\/([\w\.-]+)/i],[f,[d,O]],[/\bqihoobrowser\/?([\w\.]*)/i],[f,[d,"360"]],[/\b(qq)\/([\w\.]+)/i],[[d,/(.+)/,"$1Browser"],f],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[d,/(.+)/,"$1"+B],f],[/samsungbrowser\/([\w\.]+)/i],[f,[d,A+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[f,[d,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[d,"Sogou Mobile"],f],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[d,f],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[d],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[f,d],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[d,F],f],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[d,f],[/\bgsa\/([\w\.]+) .*safari\//i],[f,[d,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[f,[d,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[f,[d,C+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[d,C+" WebView"],f],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[f,[d,"Android "+P]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[d,f],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[f,[d,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[f,d],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[d,[f,q,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[d,f],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[d,"Netscape"],f],[/(wolvic|librewolf)\/([\w\.]+)/i],[d,f],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[f,[d,O+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[d,[f,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[d,[f,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[m,"amd64"]],[/(ia32(?=;))/i],[[m,U]],[/((?:i[346]|x)86)[;\)]/i],[[m,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[m,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[m,"armhf"]],[/windows (ce|mobile); ppc;/i],[[m,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[m,/ower/,"",U]],[/(sun4\w)[;\)]/i],[[m,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[m,U]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[c,[p,A],[u,v]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[c,[p,A],[u,g]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[c,[p,x],[u,g]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[c,[p,x],[u,v]],[/(macintosh);/i],[c,[p,x]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[c,[p,z],[u,g]],[/(?:honor)([-\w ]+)[;\)]/i],[c,[p,"Honor"],[u,g]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[c,[p,k],[u,v]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[c,[p,k],[u,g]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[c,/_/g," "],[p,_],[u,g]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[c,/_/g," "],[p,_],[u,v]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[c,[p,"OPPO"],[u,g]],[/\b(opd2\d{3}a?) bui/i],[c,[p,"OPPO"],[u,v]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[c,[p,"Vivo"],[u,g]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[c,[p,"Realme"],[u,g]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[c,[p,R],[u,g]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[c,[p,R],[u,v]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[c,[p,M],[u,v]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[c,[p,M],[u,g]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[c,[p,"Lenovo"],[u,v]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[c,/_/g," "],[p,"Nokia"],[u,g]],[/(pixel c)\b/i],[c,[p,N],[u,v]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[c,[p,N],[u,g]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[c,[p,L],[u,g]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[c,"Xperia Tablet"],[p,L],[u,v]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[c,[p,"OnePlus"],[u,g]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[c,[p,E],[u,v]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[c,/(.+)/g,"Fire Phone $1"],[p,E],[u,g]],[/(playbook);[-\w\),; ]+(rim)/i],[c,p,[u,v]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[c,[p,T],[u,g]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[c,[p,S],[u,v]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[c,[p,S],[u,g]],[/(nexus 9)/i],[c,[p,"HTC"],[u,v]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[p,[c,/_/g," "],[u,g]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[c,[p,"TCL"],[u,v]],[/(itel) ((\w+))/i],[[p,U],c,[u,q,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[c,[p,"Acer"],[u,v]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[c,[p,"Meizu"],[u,g]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[c,[p,"Ulefone"],[u,g]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[c,[p,"Energizer"],[u,g]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[c,[p,"Cat"],[u,g]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[c,[p,"Smartfren"],[u,g]],[/droid.+; (a(?:015|06[35]|142p?))/i],[c,[p,"Nothing"],[u,g]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[p,c,[u,g]],[/(imo) (tab \w+)/i,/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[p,c,[u,v]],[/(surface duo)/i],[c,[p,I],[u,v]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[c,[p,"Fairphone"],[u,g]],[/(u304aa)/i],[c,[p,"AT&T"],[u,g]],[/\bsie-(\w*)/i],[c,[p,"Siemens"],[u,g]],[/\b(rct\w+) b/i],[c,[p,"RCA"],[u,v]],[/\b(venue[\d ]{2,7}) b/i],[c,[p,"Dell"],[u,v]],[/\b(q(?:mv|ta)\w+) b/i],[c,[p,"Verizon"],[u,v]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[c,[p,"Barnes & Noble"],[u,v]],[/\b(tm\d{3}\w+) b/i],[c,[p,"NuVision"],[u,v]],[/\b(k88) b/i],[c,[p,"ZTE"],[u,v]],[/\b(nx\d{3}j) b/i],[c,[p,"ZTE"],[u,g]],[/\b(gen\d{3}) b.+49h/i],[c,[p,"Swiss"],[u,g]],[/\b(zur\d{3}) b/i],[c,[p,"Swiss"],[u,v]],[/\b((zeki)?tb.*\b) b/i],[c,[p,"Zeki"],[u,v]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[p,"Dragon Touch"],c,[u,v]],[/\b(ns-?\w{0,9}) b/i],[c,[p,"Insignia"],[u,v]],[/\b((nxa|next)-?\w{0,9}) b/i],[c,[p,"NextBook"],[u,v]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[p,"Voice"],c,[u,g]],[/\b(lvtel\-)?(v1[12]) b/i],[[p,"LvTel"],c,[u,g]],[/\b(ph-1) /i],[c,[p,"Essential"],[u,g]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[c,[p,"Envizen"],[u,v]],[/\b(trio[-\w\. ]+) b/i],[c,[p,"MachSpeed"],[u,v]],[/\btu_(1491) b/i],[c,[p,"Rotor"],[u,v]],[/(shield[\w ]+) b/i],[c,[p,"Nvidia"],[u,v]],[/(sprint) (\w+)/i],[p,c,[u,g]],[/(kin\.[onetw]{3})/i],[[c,/\./g," "],[p,I],[u,g]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[c,[p,j],[u,v]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[c,[p,j],[u,g]],[/smart-tv.+(samsung)/i],[p,[u,b]],[/hbbtv.+maple;(\d+)/i],[[c,/^/,"SmartTV"],[p,A],[u,b]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[p,M],[u,b]],[/(apple) ?tv/i],[p,[c,x+" TV"],[u,b]],[/crkey/i],[[c,C+"cast"],[p,N],[u,b]],[/droid.+aft(\w+)( bui|\))/i],[c,[p,E],[u,b]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[c,[p,z],[u,b]],[/(bravia[\w ]+)( bui|\))/i],[c,[p,L],[u,b]],[/(mitv-\w{5}) bui/i],[c,[p,_],[u,b]],[/Hbbtv.*(technisat) (.*);/i],[p,c,[u,b]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[p,G],[c,G],[u,b]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[u,b]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[p,c,[u,h]],[/droid.+; (shield) bui/i],[c,[p,"Nvidia"],[u,h]],[/(playstation [345portablevi]+)/i],[c,[p,L],[u,h]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[c,[p,I],[u,h]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[c,[p,A],[u,w]],[/((pebble))app/i],[p,c,[u,w]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[c,[p,x],[u,w]],[/droid.+; (glass) \d/i],[c,[p,N],[u,w]],[/droid.+; (wt63?0{2,3})\)/i],[c,[p,j],[u,w]],[/droid.+; (glass) \d/i],[c,[p,N],[u,w]],[/(pico) (4|neo3(?: link|pro)?)/i],[p,c,[u,w]],[/; (quest( \d| pro)?)/i],[c,[p,F],[u,w]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[p,[u,y]],[/(aeobc)\b/i],[c,[p,E],[u,y]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[c,[u,g]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[c,[u,v]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[u,v]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[u,g]],[/(android[-\w\. ]{0,9});.+buil/i],[c,[p,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[f,[d,"EdgeHTML"]],[/(arkweb)\/([\w\.]+)/i],[d,f],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[d,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[d,f],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[f,d]],os:[[/microsoft (windows) (vista|xp)/i],[d,f],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[d,[f,q,X]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[f,q,X],[d,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[f,/_/g,"."],[d,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[d,$],[f,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[f,d],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[d,f],[/\(bb(10);/i],[f,[d,T]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[f,[d,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[f,[d,O+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[f,[d,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[f,[d,"watchOS"]],[/crkey\/([\d\.]+)/i],[f,[d,C+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[d,W],f],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[d,f],[/(sunos) ?([\w\.\d]*)/i],[[d,"Solaris"],f],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[d,f]]},Z=function(e,t){if(typeof e===a&&(t=e,e=r),!(this instanceof Z))return new Z(e,t).getResult();var h=typeof n!==i&&n.navigator?n.navigator:r,b=e||(h&&h.userAgent?h.userAgent:""),w=h&&h.userAgentData?h.userAgentData:r,y=t?function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}(K,t):K,E=h&&h.userAgent==b;return this.getBrowser=function(){var e,t={};return t[d]=r,t[f]=r,Y.call(t,b,y.browser),t[l]=typeof(e=t[f])===s?e.replace(/[^\d\.]/g,"").split(".")[0]:r,E&&h&&h.brave&&typeof h.brave.isBrave==o&&(t[d]="Brave"),t},this.getCPU=function(){var e={};return e[m]=r,Y.call(e,b,y.cpu),e},this.getDevice=function(){var e={};return e[p]=r,e[c]=r,e[u]=r,Y.call(e,b,y.device),E&&!e[u]&&w&&w.mobile&&(e[u]=g),E&&"Macintosh"==e[c]&&h&&typeof h.standalone!==i&&h.maxTouchPoints&&h.maxTouchPoints>2&&(e[c]="iPad",e[u]=v),e},this.getEngine=function(){var e={};return e[d]=r,e[f]=r,Y.call(e,b,y.engine),e},this.getOS=function(){var e={};return e[d]=r,e[f]=r,Y.call(e,b,y.os),E&&!e[d]&&w&&w.platform&&"Unknown"!=w.platform&&(e[d]=w.platform.replace(/chrome os/i,W).replace(/macos/i,$)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return b},this.setUA=function(e){return b=typeof e===s&&e.length>500?G(e,500):e,this},this.setUA(b),this};Z.VERSION="1.0.40",Z.BROWSER=H([d,f,l]),Z.CPU=H([m]),Z.DEVICE=H([c,p,u,h,g,b,v,w,y]),Z.ENGINE=Z.OS=H([d,f]),e.exports&&(t=e.exports=Z),t.UAParser=Z;var J=typeof n!==i&&(n.jQuery||n.Zepto);if(J&&!J.ua){var Q=new Z;J.ua=Q.getResult(),J.ua.get=function(){return Q.getUA()},J.ua.set=function(e){Q.setUA(e);var t=Q.getResult();for(var n in t)J.ua[n]=t[n]}}}("object"==typeof window?window:Di)),Ri.exports;var e,t}var zi=function(){if(Mi)return Ii;Mi=1,Object.defineProperty(Ii,"__esModule",{value:!0});var e,n=t,r=(e=n)&&"object"==typeof e&&"default"in e?e.default:e,o=Ai(),i=new o,a=i.getBrowser(),s=i.getCPU(),l=i.getDevice(),c=i.getEngine(),d=i.getOS(),u=i.getUA(),p=function(e){return i.setUA(e)},f=function(e){if(e){var t=new o(e);return{UA:t,browser:t.getBrowser(),cpu:t.getCPU(),device:t.getDevice(),engine:t.getEngine(),os:t.getOS(),ua:t.getUA(),setUserAgent:function(e){return t.setUA(e)}}}console.error("No userAgent string was provided")},m=Object.freeze({ClientUAInstance:i,browser:a,cpu:s,device:l,engine:c,os:d,ua:u,setUa:p,parseUserAgent:f});function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function v(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(){return w=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},w.apply(this,arguments)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function E(e,t){return E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},E(e,t)}function x(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function S(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function T(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return P(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return P(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var C="mobile",O="tablet",N="smarttv",k="console",M="wearable",I="embedded",R=void 0,D={Chrome:"Chrome",Firefox:"Firefox",Opera:"Opera",Yandex:"Yandex",Safari:"Safari",InternetExplorer:"Internet Explorer",Edge:"Edge",Chromium:"Chromium",Ie:"IE",MobileSafari:"Mobile Safari",EdgeChromium:"Edge Chromium",MIUI:"MIUI Browser",SamsungBrowser:"Samsung Browser"},A={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},z={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},L=function(e){return e||(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none")},_=function(){return!("undefined"==typeof window||!window.navigator&&!navigator)&&(window.navigator||navigator)},j=function(e){var t=_();return t&&t.platform&&(-1!==t.platform.indexOf(e)||"MacIntel"===t.platform&&t.maxTouchPoints>1&&!window.MSStream)},F=function(e,t,n,r){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach(function(t){b(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e,{vendor:L(t.vendor),model:L(t.model),os:L(n.name),osVersion:L(n.version),ua:L(r)})},W=function(e){return e.type===C},$=function(e){return e.type===O},B=function(e){var t=e.type;return t===C||t===O},H=function(e){return e.type===N},V=function(e){return e.type===R},U=function(e){return e.type===M},G=function(e){return e.type===k},Y=function(e){return e.type===I},q=function(e){var t=e.vendor;return L(t)},X=function(e){var t=e.model;return L(t)},K=function(e){var t=e.type;return L(t,"browser")},Z=function(e){return e.name===A.Android},J=function(e){return e.name===A.Windows},Q=function(e){return e.name===A.MAC_OS},ee=function(e){return e.name===A.WindowsPhone},te=function(e){return e.name===A.IOS},ne=function(e){var t=e.version;return L(t)},re=function(e){var t=e.name;return L(t)},oe=function(e){return e.name===D.Chrome},ie=function(e){return e.name===D.Firefox},ae=function(e){return e.name===D.Chromium},se=function(e){return e.name===D.Edge},le=function(e){return e.name===D.Yandex},ce=function(e){var t=e.name;return t===D.Safari||t===D.MobileSafari},de=function(e){return e.name===D.MobileSafari},ue=function(e){return e.name===D.Opera},pe=function(e){var t=e.name;return t===D.InternetExplorer||t===D.Ie},fe=function(e){return e.name===D.MIUI},me=function(e){return e.name===D.SamsungBrowser},he=function(e){var t=e.version;return L(t)},ge=function(e){var t=e.major;return L(t)},ve=function(e){var t=e.name;return L(t)},be=function(e){var t=e.name;return L(t)},we=function(e){var t=e.version;return L(t)},ye=function(){var e=_(),t=e&&e.userAgent&&e.userAgent.toLowerCase();return"string"==typeof t&&/electron/.test(t)},Ee=function(e){return"string"==typeof e&&-1!==e.indexOf("Edg/")},xe=function(){var e=_();return e&&(/iPad|iPhone|iPod/.test(e.platform)||"MacIntel"===e.platform&&e.maxTouchPoints>1)&&!window.MSStream},Se=function(){return j("iPad")},Te=function(){return j("iPhone")},Pe=function(){return j("iPod")},Ce=function(e){return L(e)};function Oe(e){var t=e||m,n=t.device,r=t.browser,o=t.os,i=t.engine,a=t.ua;return{isSmartTV:H(n),isConsole:G(n),isWearable:U(n),isEmbedded:Y(n),isMobileSafari:de(r)||Se(),isChromium:ae(r),isMobile:B(n)||Se(),isMobileOnly:W(n),isTablet:$(n)||Se(),isBrowser:V(n),isDesktop:V(n),isAndroid:Z(o),isWinPhone:ee(o),isIOS:te(o)||Se(),isChrome:oe(r),isFirefox:ie(r),isSafari:ce(r),isOpera:ue(r),isIE:pe(r),osVersion:ne(o),osName:re(o),fullBrowserVersion:he(r),browserVersion:ge(r),browserName:ve(r),mobileVendor:q(n),mobileModel:X(n),engineName:be(i),engineVersion:we(i),getUA:Ce(a),isEdge:se(r)||Ee(a),isYandex:le(r),deviceType:K(n),isIOS13:xe(),isIPad13:Se(),isIPhone13:Te(),isIPod13:Pe(),isElectron:ye(),isEdgeChromium:Ee(a),isLegacyEdge:se(r)&&!Ee(a),isWindows:J(o),isMacOs:Q(o),isMIUI:fe(r),isSamsungBrowser:me(r)}}var Ne=H(l),ke=G(l),Me=U(l),Ie=Y(l),Re=de(a)||Se(),De=ae(a),Ae=B(l)||Se(),ze=W(l),Le=$(l)||Se(),_e=V(l),je=V(l),Fe=Z(d),We=ee(d),$e=te(d)||Se(),Be=oe(a),He=ie(a),Ve=ce(a),Ue=ue(a),Ge=pe(a),Ye=ne(d),qe=re(d),Xe=he(a),Ke=ge(a),Ze=ve(a),Je=q(l),Qe=X(l),et=be(c),tt=we(c),nt=Ce(u),rt=se(a)||Ee(u),ot=le(a),it=K(l),at=xe(),st=Se(),lt=Te(),ct=Pe(),dt=ye(),ut=Ee(u),pt=se(a)&&!Ee(u),ft=J(d),mt=Q(d),ht=fe(a),gt=me(a);function vt(e){var t=e||window.navigator.userAgent;return f(t)}return Ii.AndroidView=function(e){var t=e.renderWithFragment,o=e.children,i=x(e,["renderWithFragment","children"]);return Fe?t?r.createElement(n.Fragment,null,o):r.createElement("div",i,o):null},Ii.BrowserTypes=D,Ii.BrowserView=function(e){var t=e.renderWithFragment,o=e.children,i=x(e,["renderWithFragment","children"]);return _e?t?r.createElement(n.Fragment,null,o):r.createElement("div",i,o):null},Ii.ConsoleView=function(e){var t=e.renderWithFragment,o=e.children,i=x(e,["renderWithFragment","children"]);return ke?t?r.createElement(n.Fragment,null,o):r.createElement("div",i,o):null},Ii.CustomView=function(e){var t=e.renderWithFragment,o=e.children;e.viewClassName,e.style;var i=e.condition,a=x(e,["renderWithFragment","children","viewClassName","style","condition"]);return i?t?r.createElement(n.Fragment,null,o):r.createElement("div",a,o):null},Ii.IEView=function(e){var t=e.renderWithFragment,o=e.children,i=x(e,["renderWithFragment","children"]);return Ge?t?r.createElement(n.Fragment,null,o):r.createElement("div",i,o):null},Ii.IOSView=function(e){var t=e.renderWithFragment,o=e.children,i=x(e,["renderWithFragment","children"]);return $e?t?r.createElement(n.Fragment,null,o):r.createElement("div",i,o):null},Ii.MobileOnlyView=function(e){var t=e.renderWithFragment,o=e.children;e.viewClassName,e.style;var i=x(e,["renderWithFragment","children","viewClassName","style"]);return ze?t?r.createElement(n.Fragment,null,o):r.createElement("div",i,o):null},Ii.MobileView=function(e){var t=e.renderWithFragment,o=e.children,i=x(e,["renderWithFragment","children"]);return Ae?t?r.createElement(n.Fragment,null,o):r.createElement("div",i,o):null},Ii.OsTypes=A,Ii.SmartTVView=function(e){var t=e.renderWithFragment,o=e.children,i=x(e,["renderWithFragment","children"]);return Ne?t?r.createElement(n.Fragment,null,o):r.createElement("div",i,o):null},Ii.TabletView=function(e){var t=e.renderWithFragment,o=e.children,i=x(e,["renderWithFragment","children"]);return Le?t?r.createElement(n.Fragment,null,o):r.createElement("div",i,o):null},Ii.WearableView=function(e){var t=e.renderWithFragment,o=e.children,i=x(e,["renderWithFragment","children"]);return Me?t?r.createElement(n.Fragment,null,o):r.createElement("div",i,o):null},Ii.WinPhoneView=function(e){var t=e.renderWithFragment,o=e.children,i=x(e,["renderWithFragment","children"]);return We?t?r.createElement(n.Fragment,null,o):r.createElement("div",i,o):null},Ii.browserName=Ze,Ii.browserVersion=Ke,Ii.deviceDetect=function(e){var t=e?f(e):m,n=t.device,r=t.browser,o=t.engine,i=t.os,a=t.ua,s=function(e){switch(e){case C:return{isMobile:!0};case O:return{isTablet:!0};case N:return{isSmartTV:!0};case k:return{isConsole:!0};case M:return{isWearable:!0};case R:return{isBrowser:!0};case I:return{isEmbedded:!0};default:return z}}(n.type),l=s.isBrowser,c=s.isMobile,d=s.isTablet,u=s.isSmartTV,p=s.isConsole,h=s.isWearable,g=s.isEmbedded;return l?function(e,t,n,r,o){return{isBrowser:e,browserMajorVersion:L(t.major),browserFullVersion:L(t.version),browserName:L(t.name),engineName:L(n.name),engineVersion:L(n.version),osName:L(r.name),osVersion:L(r.version),userAgent:L(o)}}(l,r,o,i,a):u?function(e,t,n,r){return{isSmartTV:e,engineName:L(t.name),engineVersion:L(t.version),osName:L(n.name),osVersion:L(n.version),userAgent:L(r)}}(u,o,i,a):p?function(e,t,n,r){return{isConsole:e,engineName:L(t.name),engineVersion:L(t.version),osName:L(n.name),osVersion:L(n.version),userAgent:L(r)}}(p,o,i,a):c||d?F(s,n,i,a):h?function(e,t,n,r){return{isWearable:e,engineName:L(t.name),engineVersion:L(t.version),osName:L(n.name),osVersion:L(n.version),userAgent:L(r)}}(h,o,i,a):g?function(e,t,n,r,o){return{isEmbedded:e,vendor:L(t.vendor),model:L(t.model),engineName:L(n.name),engineVersion:L(n.version),osName:L(r.name),osVersion:L(r.version),userAgent:L(o)}}(g,n,o,i,a):void 0},Ii.deviceType=it,Ii.engineName=et,Ii.engineVersion=tt,Ii.fullBrowserVersion=Xe,Ii.getSelectorsByUserAgent=function(e){if(e&&"string"==typeof e){var t=f(e);return Oe({device:t.device,browser:t.browser,os:t.os,engine:t.engine,ua:t.ua})}console.error("No valid user agent string was provided")},Ii.getUA=nt,Ii.isAndroid=Fe,Ii.isBrowser=_e,Ii.isChrome=Be,Ii.isChromium=De,Ii.isConsole=ke,Ii.isDesktop=je,Ii.isEdge=rt,Ii.isEdgeChromium=ut,Ii.isElectron=dt,Ii.isEmbedded=Ie,Ii.isFirefox=He,Ii.isIE=Ge,Ii.isIOS=$e,Ii.isIOS13=at,Ii.isIPad13=st,Ii.isIPhone13=lt,Ii.isIPod13=ct,Ii.isLegacyEdge=pt,Ii.isMIUI=ht,Ii.isMacOs=mt,Ii.isMobile=Ae,Ii.isMobileOnly=ze,Ii.isMobileSafari=Re,Ii.isOpera=Ue,Ii.isSafari=Ve,Ii.isSamsungBrowser=gt,Ii.isSmartTV=Ne,Ii.isTablet=Le,Ii.isWearable=Me,Ii.isWinPhone=We,Ii.isWindows=ft,Ii.isYandex=ot,Ii.mobileModel=Qe,Ii.mobileVendor=Je,Ii.osName=qe,Ii.osVersion=Ye,Ii.parseUserAgent=f,Ii.setUserAgent=function(e){return p(e)},Ii.useDeviceData=vt,Ii.useDeviceSelectors=function(e){var t=vt(e||window.navigator.userAgent);return[Oe(t),t]},Ii.useMobileOrientation=function(){var e=T(n.useState(function(){var e=window.innerWidth>window.innerHeight?90:0;return{isPortrait:0===e,isLandscape:90===e,orientation:0===e?"portrait":"landscape"}}),2),t=e[0],r=e[1],o=n.useCallback(function(){var e=window.innerWidth>window.innerHeight?90:0,n={isPortrait:0===e,isLandscape:90===e,orientation:0===e?"portrait":"landscape"};t.orientation!==n.orientation&&r(n)},[t.orientation]);return n.useEffect(function(){return void 0!==("undefined"==typeof window?"undefined":g(window))&&Ae&&(o(),window.addEventListener("load",o,!1),window.addEventListener("resize",o,!1)),function(){window.removeEventListener("resize",o,!1),window.removeEventListener("load",o,!1)}},[o]),t},Ii.withOrientationChange=function(e){return function(t){function n(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(t=function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return S(e)}(this,y(n).call(this,e))).isEventListenerAdded=!1,t.handleOrientationChange=t.handleOrientationChange.bind(S(t)),t.onOrientationChange=t.onOrientationChange.bind(S(t)),t.onPageLoad=t.onPageLoad.bind(S(t)),t.state={isLandscape:!1,isPortrait:!1},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&E(e,t)}(n,t),v(n,[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var e=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:0===e,isLandscape:90===e})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){void 0!==("undefined"==typeof window?"undefined":g(window))&&Ae&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return r.createElement(e,w({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}]),n}(r.Component)},Ii}();function Li({message:e,duration:n=3e3,visible:o,setVisible:i}){return r(()=>{const e=setTimeout(()=>i(!1),n);return()=>clearTimeout(e)},[o]),o?t.createElement("div",{style:{position:"fixed",top:"1rem",left:"50%",transform:"translateX(-50%)",background:"rgba(0,0,0,0.8)",color:"#fff",padding:"0.75rem 1.25rem",borderRadius:"0.375rem",fontSize:"14px",zIndex:9999,boxShadow:"0 2px 10px rgba(0,0,0,0.2)"}},e):null}const _i=({shortForm:e,shareUrl:n})=>{const r=null!=n?n:window.location.href,[o,i]=a(!1);return t.createElement(t.Fragment,null,t.createElement("button",{onClick:()=>T(void 0,void 0,void 0,function*(){try{i(!0),zi.isMobile&&navigator.share&&e?yield navigator.share({title:e.title,url:r}):(e=>{if(void 0!==navigator.clipboard)navigator.clipboard.writeText(e).then(()=>{});else{const t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select(),t.setSelectionRange(0,99999);try{document.execCommand("copy")}catch(e){console.error("복사 실패",e)}t.setSelectionRange(0,0),document.body.removeChild(t)}})(r)}catch(e){console.error("Fail to copy on clipboard")}}),className:"cursor-pointer"},t.createElement(pt,{size:22}),t.createElement(Li,{message:"공유 링크 복사 완료",setVisible:i,visible:o})))},ji=({product:e,hideMoreBtn:n,contentId:r})=>{const{isPreview:o,priceText:i}=bi(),[s,l]=a(!1);return t.createElement("div",{style:{height:"80px"},className:"flex gap-2 items-center w-full",onClick:()=>T(void 0,void 0,void 0,function*(){n&&(window.open(e.linkPath,"_blank"),o||(yield si({contentProductId:e.eventProductId,contentId:r,productId:e.productId})))})},e.thumbPath&&!s?t.createElement(bt,{product:e,onError:()=>l(!0)}):t.createElement(vt,null),t.createElement("div",{className:"flex flex-col text-left p-2 w-full justify-center"},e.brand&&t.createElement("span",{className:"break-keep line-clamp-1 text-gray-500",style:{fontSize:"10px"}},e.brand.brandName),t.createElement("div",{className:"text-gray-800 text-ellipsis line-clamp-1 ",style:{fontSize:"12px"}},e.productName),t.createElement("div",{className:"text-red-500 break-keep",style:{fontSize:"12px"}},i?i+" ":"할인가 ",t.createElement("span",{className:"font-semibold break-keep"},Ve(e.sellingPrice),"원"))))};function Fi(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function Wi(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function $i(...e){return t=>{let n=!1;const r=e.map(e=>{const r=Wi(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():Wi(e[t],null)}}}}function Bi(...t){return e.useCallback($i(...t),t)}function Hi(...t){const n=t[0];if(1===t.length)return n;const r=()=>{const r=t.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(t){const o=r.reduce((e,{useScope:n,scopeName:r})=>({...e,...n(t)[`__scope${r}`]}),{});return e.useMemo(()=>({[`__scope${n.scopeName}`]:o}),[o])}};return r.scopeName=n.scopeName,r}var Vi=globalThis?.document?e.useLayoutEffect:()=>{},Ui=e[" useId ".trim().toString()]||(()=>{}),Gi=0;function Yi(t){const[n,r]=e.useState(Ui());return Vi(()=>{t||r(e=>e??String(Gi++))},[t]),t||(n?`radix-${n}`:"")}var qi=e[" useInsertionEffect ".trim().toString()]||Vi;function Xi({prop:t,defaultProp:n,onChange:r=()=>{},caller:o}){const[i,a,s]=function({defaultProp:t,onChange:n}){const[r,o]=e.useState(t),i=e.useRef(r),a=e.useRef(n);return qi(()=>{a.current=n},[n]),e.useEffect(()=>{i.current!==r&&(a.current?.(r),i.current=r)},[r,i]),[r,o,a]}({defaultProp:n,onChange:r}),l=void 0!==t,c=l?t:i;{const n=e.useRef(void 0!==t);e.useEffect(()=>{const e=n.current;if(e!==l){const t=e?"controlled":"uncontrolled",n=l?"controlled":"uncontrolled";console.warn(`${o} is changing from ${t} to ${n}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}n.current=l},[l,o])}const d=e.useCallback(e=>{if(l){const n=function(e){return"function"==typeof e}(e)?e(t):e;n!==t&&s.current?.(n)}else a(e)},[l,t,a,s]);return[c,d]}function Ki(t){const n=Zi(t),r=e.forwardRef((t,r)=>{const{children:o,...i}=t,a=e.Children.toArray(o),s=a.find(Qi);if(s){const t=s.props.children,o=a.map(n=>n===s?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:n);return m(n,{...i,ref:r,children:e.isValidElement(t)?e.cloneElement(t,void 0,o):null})}return m(n,{...i,ref:r,children:o})});return r.displayName=`${t}.Slot`,r}function Zi(t){const n=e.forwardRef((t,n)=>{const{children:r,...o}=t;if(e.isValidElement(r)){const t=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}(r),i=function(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)=>{const t=i(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(o,r.props);return r.type!==e.Fragment&&(i.ref=n?$i(n,t):t),e.cloneElement(r,i)}return e.Children.count(r)>1?e.Children.only(null):null});return n.displayName=`${t}.SlotClone`,n}var Ji=Symbol("radix.slottable");function Qi(t){return e.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===Ji}var ea=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,n)=>{const r=Ki(`Primitive.${n}`),o=e.forwardRef((e,t)=>{const{asChild:o,...i}=e,a=o?r:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),m(a,{...i,ref:t})});return o.displayName=`Primitive.${n}`,{...t,[n]:o}},{});function ta(t){const n=e.useRef(t);return e.useEffect(()=>{n.current=t}),e.useMemo(()=>(...e)=>n.current?.(...e),[])}function na(t,n=globalThis?.document){const r=ta(t);e.useEffect(()=>{const e=e=>{"Escape"===e.key&&r(e)};return n.addEventListener("keydown",e,{capture:!0}),()=>n.removeEventListener("keydown",e,{capture:!0})},[r,n])}var ra,oa="dismissableLayer.update",ia="dismissableLayer.pointerDownOutside",aa="dismissableLayer.focusOutside",sa=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),la=e.forwardRef((t,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...c}=t,d=e.useContext(sa),[u,p]=e.useState(null),f=u?.ownerDocument??globalThis?.document,[,h]=e.useState({}),g=Bi(n,e=>p(e)),v=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),w=v.indexOf(b),y=u?v.indexOf(u):-1,E=d.layersWithOutsidePointerEventsDisabled.size>0,x=y>=w,S=function(t,n=globalThis?.document){const r=ta(t),o=e.useRef(!1),i=e.useRef(()=>{});return e.useEffect(()=>{const e=e=>{if(e.target&&!o.current){let t=function(){da(ia,r,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(n.removeEventListener("click",i.current),i.current=t,n.addEventListener("click",i.current,{once:!0})):t()}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));x&&!n&&(i?.(e),s?.(e),e.defaultPrevented||l?.())},f),T=function(t,n=globalThis?.document){const r=ta(t),o=e.useRef(!1);return e.useEffect(()=>{const e=e=>{if(e.target&&!o.current){da(aa,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))||(a?.(e),s?.(e),e.defaultPrevented||l?.())},f);return na(e=>{y===d.layers.size-1&&(o?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))},f),e.useEffect(()=>{if(u)return r&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(ra=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(u)),d.layers.add(u),ca(),()=>{r&&1===d.layersWithOutsidePointerEventsDisabled.size&&(f.body.style.pointerEvents=ra)}},[u,f,r,d]),e.useEffect(()=>()=>{u&&(d.layers.delete(u),d.layersWithOutsidePointerEventsDisabled.delete(u),ca())},[u,d]),e.useEffect(()=>{const e=()=>h({});return document.addEventListener(oa,e),()=>document.removeEventListener(oa,e)},[]),m(ea.div,{...c,ref:g,style:{pointerEvents:E?x?"auto":"none":void 0,...t.style},onFocusCapture:Fi(t.onFocusCapture,T.onFocusCapture),onBlurCapture:Fi(t.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Fi(t.onPointerDownCapture,S.onPointerDownCapture)})});la.displayName="DismissableLayer";function ca(){const e=new CustomEvent(oa);document.dispatchEvent(e)}function da(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?function(e,t){e&&v.flushSync(()=>e.dispatchEvent(t))}(o,i):o.dispatchEvent(i)}e.forwardRef((t,n)=>{const r=e.useContext(sa),o=e.useRef(null),i=Bi(n,o);return e.useEffect(()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),m(ea.div,{...t,ref:i})}).displayName="DismissableLayerBranch";var ua="focusScope.autoFocusOnMount",pa="focusScope.autoFocusOnUnmount",fa={bubbles:!1,cancelable:!0},ma=e.forwardRef((t,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...s}=t,[l,c]=e.useState(null),d=ta(i),u=ta(a),p=e.useRef(null),f=Bi(n,e=>c(e)),h=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect(()=>{if(o){let e=function(e){if(h.paused||!l)return;const t=e.target;l.contains(t)?p.current=t:ba(p.current,{select:!0})},t=function(e){if(h.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||ba(p.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&ba(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,h.paused]),e.useEffect(()=>{if(l){wa.add(h);const t=document.activeElement;if(!l.contains(t)){const n=new CustomEvent(ua,fa);l.addEventListener(ua,d),l.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ba(r,{select:t}),document.activeElement!==n)return}((e=ha(l),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&ba(l))}return()=>{l.removeEventListener(ua,d),setTimeout(()=>{const e=new CustomEvent(pa,fa);l.addEventListener(pa,u),l.dispatchEvent(e),e.defaultPrevented||ba(t??document.body,{select:!0}),l.removeEventListener(pa,u),wa.remove(h)},0)}}var e},[l,d,u,h]);const g=e.useCallback(e=>{if(!r&&!o)return;if(h.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=ha(e),n=ga(t,e),r=ga(t.reverse(),e);return[n,r]}(t);o&&i?e.shiftKey||n!==i?e.shiftKey&&n===o&&(e.preventDefault(),r&&ba(i,{select:!0})):(e.preventDefault(),r&&ba(o,{select:!0})):n===t&&e.preventDefault()}},[r,o,h.paused]);return m(ea.div,{tabIndex:-1,...s,ref:f,onKeyDown:g})});function ha(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 ga(e,t){for(const n of e)if(!va(n,{upTo:t}))return n}function va(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 ba(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()}}ma.displayName="FocusScope";var wa=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=ya(e,t),e.unshift(t)},remove(t){e=ya(e,t),e[0]?.resume()}}}();function ya(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var Ea=e.forwardRef((t,n)=>{const{container:r,...o}=t,[i,a]=e.useState(!1);Vi(()=>a(!0),[]);const s=r||i&&globalThis?.document?.body;return s?b.createPortal(m(ea.div,{...o,ref:n}),s):null});Ea.displayName="Portal";var xa=t=>{const{present:n,children:r}=t,o=function(t){const[n,r]=e.useState(),o=e.useRef(null),i=e.useRef(t),a=e.useRef("none"),s=t?"mounted":"unmounted",[l,c]=function(t,n){return e.useReducer((e,t)=>n[e][t]??e,t)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect(()=>{const e=Sa(o.current);a.current="mounted"===l?e:"none"},[l]),Vi(()=>{const e=o.current,n=i.current;if(n!==t){const r=a.current,o=Sa(e);if(t)c("MOUNT");else if("none"===o||"none"===e?.display)c("UNMOUNT");else{c(n&&r!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=t}},[t,c]),Vi(()=>{if(n){let e;const t=n.ownerDocument.defaultView??window,r=r=>{const a=Sa(o.current).includes(r.animationName);if(r.target===n&&a&&(c("ANIMATION_END"),!i.current)){const r=n.style.animationFillMode;n.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===n.style.animationFillMode&&(n.style.animationFillMode=r)})}},s=e=>{e.target===n&&(a.current=Sa(o.current))};return n.addEventListener("animationstart",s),n.addEventListener("animationcancel",r),n.addEventListener("animationend",r),()=>{t.clearTimeout(e),n.removeEventListener("animationstart",s),n.removeEventListener("animationcancel",r),n.removeEventListener("animationend",r)}}c("ANIMATION_END")},[n,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:e.useCallback(e=>{o.current=e?getComputedStyle(e):null,r(e)},[])}}(n),i="function"==typeof r?r({present:o.isPresent}):e.Children.only(r),a=Bi(o.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}(i));return"function"==typeof r||o.isPresent?e.cloneElement(i,{ref:a}):null};function Sa(e){return e?.animationName||"none"}xa.displayName="Presence";var Ta=0;function Pa(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ca="right-scroll-bar-position",Oa="width-before-scroll-bar";function Na(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var ka="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,Ma=new WeakMap;function Ia(e,t){var n,r,o,i=(n=null,r=function(t){return e.forEach(function(e){return Na(e,t)})},(o=a(function(){return{value:n,callback:r,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}})[0]).callback=r,o.facade);return ka(function(){var t=Ma.get(i);if(t){var n=new Set(t),r=new Set(e),o=i.current;n.forEach(function(e){r.has(e)||Na(e,null)}),r.forEach(function(e){n.has(e)||Na(e,o)})}Ma.set(i,e)},[e]),i}function Ra(e){return e}var Da=function(t){var n=t.sideCar,r=S(t,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=n.read();if(!o)throw new Error("Sidecar medium not found");return e.createElement(o,x({},r))};Da.isSideCarExport=!0;var Aa=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=Ra);var n=[],r=!1,o={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}}}};return o}(null);return t.options=x({async:!0,ssr:!1},e),t}(),za=function(){},La=e.forwardRef(function(t,n){var r=e.useRef(null),o=e.useState({onScrollCapture:za,onWheelCapture:za,onTouchMoveCapture:za}),i=o[0],a=o[1],s=t.forwardProps,l=t.children,c=t.className,d=t.removeScrollBar,u=t.enabled,p=t.shards,f=t.sideCar,m=t.noRelative,h=t.noIsolation,g=t.inert,v=t.allowPinchZoom,b=t.as,w=void 0===b?"div":b,y=t.gapMode,E=S(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=f,P=Ia([r,n]),C=x(x({},E),i);return e.createElement(e.Fragment,null,u&&e.createElement(T,{sideCar:Aa,removeScrollBar:d,shards:p,noRelative:m,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!v,lockRef:r,gapMode:y}),s?e.cloneElement(e.Children.only(l),x(x({},C),{ref:P})):e.createElement(w,x({},C,{className:c,ref:P}),l))});La.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},La.classNames={fullWidth:Oa,zeroRight:Ca};function _a(){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 ja=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=_a())&&(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)}}},Fa=function(){var t,n=(t=ja(),function(n,r){e.useEffect(function(){return t.add(n),function(){t.remove()}},[n&&r])});return function(e){var t=e.styles,r=e.dynamic;return n(t,r),null}},Wa={left:0,top:0,right:0,gap:0},$a=function(e){return parseInt(e||"",10)||0},Ba=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Wa;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[$a(n),$a(r),$a(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])}},Ha=Fa(),Va="data-scroll-locked",Ua=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(Va,"] {\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(Ca," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(Oa," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(Ca," .").concat(Ca," {\n right: 0 ").concat(r,";\n }\n \n .").concat(Oa," .").concat(Oa," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(Va,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},Ga=function(){var e=parseInt(document.body.getAttribute(Va)||"0",10);return isFinite(e)?e:0},Ya=function(t){var n=t.noRelative,r=t.noImportant,o=t.gapMode,i=void 0===o?"margin":o;e.useEffect(function(){return document.body.setAttribute(Va,(Ga()+1).toString()),function(){var e=Ga()-1;e<=0?document.body.removeAttribute(Va):document.body.setAttribute(Va,e.toString())}},[]);var a=e.useMemo(function(){return Ba(i)},[i]);return e.createElement(Ha,{styles:Ua(a,!n,i,r?"":"!important")})},qa=!1;if("undefined"!=typeof window)try{var Xa=Object.defineProperty({},"passive",{get:function(){return qa=!0,!0}});window.addEventListener("test",Xa,Xa),window.removeEventListener("test",Xa,Xa)}catch(e){qa=!1}var Ka=!!qa&&{passive:!1},Za=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},Ja=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),Qa(e,r)){var o=es(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Qa=function(e,t){return"v"===e?function(e){return Za(e,"overflowY")}(t):function(e){return Za(e,"overflowX")}(t)},es=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},ts=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ns=function(e){return[e.deltaX,e.deltaY]},rs=function(e){return e&&"current"in e?e.current:e},os=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},is=0,as=[];function ss(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var ls,cs=(ls=function(t){var n=e.useRef([]),r=e.useRef([0,0]),o=e.useRef(),i=e.useState(is++)[0],a=e.useState(Fa)[0],s=e.useRef(t);e.useEffect(function(){s.current=t},[t]),e.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var e=function(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))}([t.lockRef.current],(t.shards||[]).map(rs),!0).filter(Boolean);return e.forEach(function(e){return e.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),e.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var l=e.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!s.current.allowPinchZoom;var n,i=ts(e),a=r.current,l="deltaX"in e?e.deltaX:a[0]-i[0],c="deltaY"in e?e.deltaY:a[1]-i[1],d=e.target,u=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===u&&"range"===d.type)return!1;var p=Ja(u,d);if(!p)return!0;if(p?n=u:(n="v"===u?"h":"v",p=Ja(u,d)),!p)return!1;if(!o.current&&"changedTouches"in e&&(l||c)&&(o.current=n),!n)return!0;var f=o.current||n;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,d=a>0,u=0,p=0;do{if(!s)break;var f=es(e,s),m=f[0],h=f[1]-f[2]-i*m;(m||h)&&Qa(e,s)&&(u+=h,p+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return d&&(Math.abs(u)<1||!o)?c=!0:d||!(Math.abs(p)<1)&&o||(c=!0),c}(f,t,e,"h"===f?l:c,!0)},[]),c=e.useCallback(function(e){var t=e;if(as.length&&as[as.length-1]===a){var r="deltaY"in t?ns(t):ts(t),o=n.current.filter(function(e){return e.name===t.type&&(e.target===t.target||t.target===e.shadowParent)&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,r)})[0];if(o&&o.should)t.cancelable&&t.preventDefault();else if(!o){var i=(s.current.shards||[]).map(rs).filter(Boolean).filter(function(e){return e.contains(t.target)});(i.length>0?l(t,i[0]):!s.current.noIsolation)&&t.cancelable&&t.preventDefault()}}},[]),d=e.useCallback(function(e,t,r,o){var i={name:e,delta:t,target:r,should:o,shadowParent:ss(r)};n.current.push(i),setTimeout(function(){n.current=n.current.filter(function(e){return e!==i})},1)},[]),u=e.useCallback(function(e){r.current=ts(e),o.current=void 0},[]),p=e.useCallback(function(e){d(e.type,ns(e),e.target,l(e,t.lockRef.current))},[]),f=e.useCallback(function(e){d(e.type,ts(e),e.target,l(e,t.lockRef.current))},[]);e.useEffect(function(){return as.push(a),t.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:f}),document.addEventListener("wheel",c,Ka),document.addEventListener("touchmove",c,Ka),document.addEventListener("touchstart",u,Ka),function(){as=as.filter(function(e){return e!==a}),document.removeEventListener("wheel",c,Ka),document.removeEventListener("touchmove",c,Ka),document.removeEventListener("touchstart",u,Ka)}},[]);var m=t.removeScrollBar,h=t.inert;return e.createElement(e.Fragment,null,h?e.createElement(a,{styles:os(i)}):null,m?e.createElement(Ya,{noRelative:t.noRelative,gapMode:t.gapMode}):null)},Aa.useMedium(ls),Da),ds=e.forwardRef(function(t,n){return e.createElement(La,x({},t,{ref:n,sideCar:cs}))});ds.classNames=La.classNames;var us=new WeakMap,ps=new WeakMap,fs={},ms=0,hs=function(e){return e&&(e.host||hs(e.parentNode))},gs=function(e,t,n,r){var o=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=hs(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]);fs[n]||(fs[n]=new WeakMap);var i=fs[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 d=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))d(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,l=(us.get(e)||0)+1,c=(i.get(e)||0)+1;us.set(e,l),i.set(e,c),a.push(e),1===l&&o&&ps.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 d(t),s.clear(),ms++,function(){a.forEach(function(e){var t=us.get(e)-1,o=i.get(e)-1;us.set(e,t),i.set(e,o),t||(ps.has(e)||e.removeAttribute(r),ps.delete(e)),o||e.removeAttribute(n)}),--ms||(us=new WeakMap,us=new WeakMap,ps=new WeakMap,fs={})}},vs=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], script"))),gs(r,o,n,"aria-hidden")):function(){return null}},bs="Dialog",[ws,ys]=function(t,n=[]){let r=[];const o=()=>{const n=r.map(t=>e.createContext(t));return function(r){const o=r?.[t]||n;return e.useMemo(()=>({[`__scope${t}`]:{...r,[t]:o}}),[r,o])}};return o.scopeName=t,[function(n,o){const i=e.createContext(o),a=r.length;r=[...r,o];const s=n=>{const{scope:r,children:o,...s}=n,l=r?.[t]?.[a]||i,c=e.useMemo(()=>s,Object.values(s));return m(l.Provider,{value:c,children:o})};return s.displayName=n+"Provider",[s,function(r,s){const l=s?.[t]?.[a]||i,c=e.useContext(l);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${n}\``)}]},Hi(o,...n)]}(bs),[Es,xs]=ws(bs),Ss=t=>{const{__scopeDialog:n,children:r,open:o,defaultOpen:i,onOpenChange:a,modal:s=!0}=t,l=e.useRef(null),c=e.useRef(null),[d,u]=Xi({prop:o,defaultProp:i??!1,onChange:a,caller:bs});return m(Es,{scope:n,triggerRef:l,contentRef:c,contentId:Yi(),titleId:Yi(),descriptionId:Yi(),open:d,onOpenChange:u,onOpenToggle:e.useCallback(()=>u(e=>!e),[u]),modal:s,children:r})};Ss.displayName=bs;var Ts="DialogTrigger",Ps=e.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=xs(Ts,n),i=Bi(t,o.triggerRef);return m(ea.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Us(o.open),...r,ref:i,onClick:Fi(e.onClick,o.onOpenToggle)})});Ps.displayName=Ts;var Cs="DialogPortal",[Os,Ns]=ws(Cs,{forceMount:void 0}),ks=t=>{const{__scopeDialog:n,forceMount:r,children:o,container:i}=t,a=xs(Cs,n);return m(Os,{scope:n,forceMount:r,children:e.Children.map(o,e=>m(xa,{present:r||a.open,children:m(Ea,{asChild:!0,container:i,children:e})}))})};ks.displayName=Cs;var Ms="DialogOverlay",Is=e.forwardRef((e,t)=>{const n=Ns(Ms,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=xs(Ms,e.__scopeDialog);return i.modal?m(xa,{present:r||i.open,children:m(Ds,{...o,ref:t})}):null});Is.displayName=Ms;var Rs=Ki("DialogOverlay.RemoveScroll"),Ds=e.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=xs(Ms,n);return m(ds,{as:Rs,allowPinchZoom:!0,shards:[o.contentRef],children:m(ea.div,{"data-state":Us(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),As="DialogContent",zs=e.forwardRef((e,t)=>{const n=Ns(As,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=xs(As,e.__scopeDialog);return m(xa,{present:r||i.open,children:i.modal?m(Ls,{...o,ref:t}):m(_s,{...o,ref:t})})});zs.displayName=As;var Ls=e.forwardRef((t,n)=>{const r=xs(As,t.__scopeDialog),o=e.useRef(null),i=Bi(n,r.contentRef,o);return e.useEffect(()=>{const e=o.current;if(e)return vs(e)},[]),m(js,{...t,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Fi(t.onCloseAutoFocus,e=>{e.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:Fi(t.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:Fi(t.onFocusOutside,e=>e.preventDefault())})}),_s=e.forwardRef((t,n)=>{const r=xs(As,t.__scopeDialog),o=e.useRef(!1),i=e.useRef(!1);return m(js,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||r.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const n=e.target,a=r.triggerRef.current?.contains(n);a&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}})}),js=e.forwardRef((t,n)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,...s}=t,l=xs(As,r),c=e.useRef(null),d=Bi(n,c);return e.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Pa()),document.body.insertAdjacentElement("beforeend",e[1]??Pa()),Ta++,()=>{1===Ta&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Ta--}},[]),g(h,{children:[m(ma,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a,children:m(la,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Us(l.open),...s,ref:d,onDismiss:()=>l.onOpenChange(!1)})}),g(h,{children:[m(Xs,{titleId:l.titleId}),m(Ks,{contentRef:c,descriptionId:l.descriptionId})]})]})}),Fs="DialogTitle",Ws=e.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=xs(Fs,n);return m(ea.h2,{id:o.titleId,...r,ref:t})});Ws.displayName=Fs;var $s="DialogDescription",Bs=e.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=xs($s,n);return m(ea.p,{id:o.descriptionId,...r,ref:t})});Bs.displayName=$s;var Hs="DialogClose",Vs=e.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=xs(Hs,n);return m(ea.button,{type:"button",...r,ref:t,onClick:Fi(e.onClick,()=>o.onOpenChange(!1))})});function Us(e){return e?"open":"closed"}Vs.displayName=Hs;var Gs="DialogTitleWarning",[Ys,qs]=function(t,n){const r=e.createContext(n),o=t=>{const{children:n,...o}=t,i=e.useMemo(()=>o,Object.values(o));return m(r.Provider,{value:i,children:n})};return o.displayName=t+"Provider",[o,function(o){const i=e.useContext(r);if(i)return i;if(void 0!==n)return n;throw new Error(`\`${o}\` must be used within \`${t}\``)}]}(Gs,{contentName:As,titleName:Fs,docsSlug:"dialog"}),Xs=({titleId:t})=>{const n=qs(Gs),r=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return e.useEffect(()=>{if(t){document.getElementById(t)||console.error(r)}},[r,t]),null},Ks=({contentRef:t,descriptionId:n})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${qs("DialogDescriptionWarning").contentName}}.`;return e.useEffect(()=>{const e=t.current?.getAttribute("aria-describedby");if(n&&e){document.getElementById(n)||console.warn(r)}},[r,t,n]),null},Zs=Ss,Js=Ps,Qs=ks,el=Is,tl=zs,nl=Ws,rl=Bs,ol=Vs;const il=t.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),al=()=>{const e=t.useContext(il);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};function sl(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function ll(){return dl(/^iPad/)||dl(/^Mac/)&&navigator.maxTouchPoints>1}function cl(){return dl(/^iPhone/)||ll()}function dl(e){return"undefined"!=typeof window&&null!=window.navigator?e.test(window.navigator.platform):void 0}!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))}("[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(\n[data-state=closed]\n){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-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}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}");const ul="undefined"!=typeof window?s:r;function pl(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}const fl="undefined"!=typeof document&&window.visualViewport;function ml(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function hl(e){for(ml(e)&&(e=e.parentElement);e&&!ml(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const gl=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let vl,bl=0;function wl(e={}){let{isDisabled:t}=e;ul(()=>{if(!t)return bl++,1===bl&&cl()&&(vl=function(){let e,t=0,n=n=>{e=hl(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;xl(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform="translateY(-2000px)",t.focus(),requestAnimationFrame(()=>{t.style.transform=""}))},i=e=>{let t=e.target;xl(t)&&(t.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{t.style.transform="",fl&&(fl.height<window.innerHeight?requestAnimationFrame(()=>{El(t)}):fl.addEventListener("resize",()=>El(t),{once:!0}))}))},a=()=>{window.scrollTo(0,0)},s=window.pageXOffset,l=window.pageYOffset,c=pl(function(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}(document.documentElement,"paddingRight",window.innerWidth-document.documentElement.clientWidth+"px"));window.scrollTo(0,0);let d=pl(yl(document,"touchstart",n,{passive:!1,capture:!0}),yl(document,"touchmove",r,{passive:!1,capture:!0}),yl(document,"touchend",o,{passive:!1,capture:!0}),yl(document,"focus",i,!0),yl(window,"scroll",a));return()=>{c(),d(),window.scrollTo(s,l)}}()),()=>{bl--,0===bl&&(null==vl||vl())}},[t])}function yl(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function El(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=hl(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+24&&(t.scrollTop+=r-n)}e=t.parentElement}}function xl(e){return e instanceof HTMLInputElement&&!gl.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function Sl(...t){return e.useCallback(function(...e){return t=>e.forEach(e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t))}(...t),t)}const Tl=new WeakMap;function Pl(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||Tl.set(e,r)}const Cl=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function Ol(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(", ")[Cl(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[Cl(t)?5:4]):null)}function Nl(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}const kl={DURATION:.5,EASE:[.32,.72,0,1]},Ml=16,Il="vaul-dragging";function Rl(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 Dl({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=Rl(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=Rl(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]}let Al=null;function zl({open:e,onOpenChange:n,children:r,onDrag:o,onRelease:i,snapPoints:a,shouldScaleBackground:s=!1,setBackgroundColorOnScale:l=!0,closeThreshold:c=.25,scrollLockTimeout:d=100,dismissible:u=!0,handleOnly:p=!1,fadeFromIndex:f=a&&a.length-1,activeSnapPoint:m,setActiveSnapPoint:h,fixed:g,modal:v=!0,onClose:b,nested:w,noBodyStyles:y=!1,direction:E="bottom",defaultOpen:x=!1,disablePreventScroll:S=!0,snapToSequentialPoint:T=!1,preventScrollRestoration:P=!1,repositionInputs:C=!0,onAnimationEnd:O,container:N,autoFocus:k=!1}){var M,I;const[R=!1,D]=Dl({defaultProp:x,prop:e,onChange:e=>{null==n||n(e),e||w||de(),setTimeout(()=>{null==O||O(e)},1e3*kl.DURATION),e&&!v&&"undefined"!=typeof window&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),e||(document.body.style.pointerEvents="auto")}}),[A,z]=t.useState(!1),[L,_]=t.useState(!1),[j,F]=t.useState(!1),W=t.useRef(null),$=t.useRef(null),B=t.useRef(null),H=t.useRef(null),V=t.useRef(null),U=t.useRef(!1),G=t.useRef(null),Y=t.useRef(0),q=t.useRef(!1),X=t.useRef(!x),K=t.useRef(0),Z=t.useRef(null),J=t.useRef((null==(M=Z.current)?void 0:M.getBoundingClientRect().height)||0),Q=t.useRef((null==(I=Z.current)?void 0:I.getBoundingClientRect().width)||0),ee=t.useRef(0),te=t.useCallback(e=>{a&&e===ae.length-1&&($.current=new Date)},[]),{activeSnapPoint:ne,activeSnapPointIndex:re,setActiveSnapPoint:oe,onRelease:ie,snapPointsOffset:ae,onDrag:se,shouldFade:le,getPercentageDragged:ce}=function({activeSnapPointProp:e,setActiveSnapPointProp:n,snapPoints:r,drawerRef:o,overlayRef:i,fadeFromIndex:a,onSnapPointChange:s,direction:l="bottom",container:c,snapToSequentialPoint:d}){const[u,p]=Dl({prop:e,defaultProp:null==r?void 0:r[0],onChange:n}),[f,m]=t.useState("undefined"!=typeof window?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);t.useEffect(()=>{function e(){m({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const h=t.useMemo(()=>u===(null==r?void 0:r[r.length-1])||null,[r,u]),g=t.useMemo(()=>{var e;return null!=(e=null==r?void 0:r.findIndex(e=>e===u))?e:null},[r,u]),v=r&&r.length>0&&(a||0===a)&&!Number.isNaN(a)&&r[a]===u||!r,b=t.useMemo(()=>{const e=c?{width:c.getBoundingClientRect().width,height:c.getBoundingClientRect().height}:"undefined"!=typeof window?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var t;return null!=(t=null==r?void 0:r.map(t=>{const n="string"==typeof t;let r=0;if(n&&(r=parseInt(t,10)),Cl(l)){const o=n?r:f?t*e.height:0;return f?"bottom"===l?e.height-o:-e.height+o:o}const o=n?r:f?t*e.width:0;return f?"right"===l?e.width-o:-e.width+o:o}))?t:[]},[r,f,c]),w=t.useMemo(()=>null!==g?null==b?void 0:b[g]:null,[b,g]),y=t.useCallback(e=>{var t;const n=null!=(t=null==b?void 0:b.findIndex(t=>t===e))?t:null;s(n),Pl(o.current,{transition:`transform ${kl.DURATION}s cubic-bezier(${kl.EASE.join(",")})`,transform:Cl(l)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),b&&n!==b.length-1&&void 0!==a&&n!==a&&n<a?Pl(i.current,{transition:`opacity ${kl.DURATION}s cubic-bezier(${kl.EASE.join(",")})`,opacity:"0"}):Pl(i.current,{transition:`opacity ${kl.DURATION}s cubic-bezier(${kl.EASE.join(",")})`,opacity:"1"}),p(null==r?void 0:r[Math.max(n,0)])},[o.current,r,b,a,i,p]);return t.useEffect(()=>{if(u||e){var t;const n=null!=(t=null==r?void 0:r.findIndex(t=>t===e||t===u))?t:-1;b&&-1!==n&&"number"==typeof b[n]&&y(b[n])}},[u,e,r,b,y]),{isLastSnapPoint:h,activeSnapPoint:u,shouldFade:v,getPercentageDragged:function(e,t){if(!r||"number"!=typeof g||!b||void 0===a)return null;const n=g===a-1;if(g>=a&&t)return 0;if(n&&!t)return 1;if(!v&&!n)return null;const o=n?g+1:g-1,i=n?b[o]-b[o-1]:b[o+1]-b[o],s=e/Math.abs(i);return n?1-s:s},setActiveSnapPoint:p,activeSnapPointIndex:g,onRelease:function({draggedDistance:e,closeDrawer:t,velocity:n,dismissible:o}){if(void 0===a)return;const s="bottom"===l||"right"===l?(null!=w?w:0)-e:(null!=w?w:0)+e,c=0===g,u=e>0;if(g===a-1&&Pl(i.current,{transition:`opacity ${kl.DURATION}s cubic-bezier(${kl.EASE.join(",")})`}),!d&&n>2&&!u)return void(o?t():y(b[0]));if(!d&&n>2&&u&&b&&r)return void y(b[r.length-1]);const p=null==b?void 0:b.reduce((e,t)=>"number"!=typeof e||"number"!=typeof t?e:Math.abs(t-s)<Math.abs(e-s)?t:e),f=Cl(l)?window.innerHeight:window.innerWidth;if(n>.4&&Math.abs(e)<.4*f){const e=u?1:-1;if(e>0&&h&&r)return void y(b[r.length-1]);if(c&&e<0&&o&&t(),null===g)return;return void y(b[g+e])}y(p)},onDrag:function({draggedDistance:e}){if(null===w)return;const t="bottom"===l||"right"===l?w-e:w+e;("bottom"===l||"right"===l)&&t<b[b.length-1]||("top"===l||"left"===l)&&t>b[b.length-1]||Pl(o.current,{transform:Cl(l)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})},snapPointsOffset:b}}({snapPoints:a,activeSnapPointProp:m,setActiveSnapPointProp:h,drawerRef:Z,fadeFromIndex:f,overlayRef:W,onSnapPointChange:te,direction:E,container:N,snapToSequentialPoint:T});wl({isDisabled:!R||L||!v||j||!A||!C||!S});const{restorePositionSetting:de}=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),d=t.useCallback(()=>{if(sl()&&null===Al&&e&&!a){Al={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]),u=t.useCallback(()=>{if(sl()&&null!==Al&&!a){const e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Al),window.requestAnimationFrame(()=>{i&&s!==window.location.href?l(window.location.href):window.scrollTo(t,e)}),Al=null}},[s]);return t.useEffect(()=>{function e(){c.current=window.scrollY}return e(),window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}},[]),t.useEffect(()=>{if(n)return()=>{"undefined"!=typeof document&&(document.querySelector("[data-vaul-drawer]")||u())}},[n,u]),t.useEffect(()=>{!r&&o&&(e?(!window.matchMedia("(display-mode: standalone)").matches&&d(),n||window.setTimeout(()=>{u()},500)):u())},[e,o,s,n,r,d,u]),{restorePositionSetting:u}}({isOpen:R,modal:v,nested:null!=w&&w,hasBeenOpened:A,preventScrollRestoration:P,noBodyStyles:y});function ue(){return(window.innerWidth-26)/window.innerWidth}function pe(e,t){var n;let r=e;const o=null==(n=window.getSelection())?void 0:n.toString(),i=Z.current?Ol(Z.current,E):null,a=new Date;if("SELECT"===r.tagName)return!1;if(r.hasAttribute("data-vaul-no-drag")||r.closest("[data-vaul-no-drag]"))return!1;if("right"===E||"left"===E)return!0;if($.current&&a.getTime()-$.current.getTime()<500)return!1;if(null!==i&&("bottom"===E?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 fe(e){!function(){if(!L||!Z.current)return;Z.current.classList.remove(Il),U.current=!1,_(!1),H.current=new Date}(),null==b||b(),e||D(!1),setTimeout(()=>{a&&oe(a[0])},1e3*kl.DURATION)}function me(){if(!Z.current)return;const e=document.querySelector("[data-vaul-drawer-wrapper]"),t=Ol(Z.current,E);Pl(Z.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${kl.DURATION}s cubic-bezier(${kl.EASE.join(",")})`}),Pl(W.current,{transition:`opacity ${kl.DURATION}s cubic-bezier(${kl.EASE.join(",")})`,opacity:"1"}),s&&t&&t>0&&R&&Pl(e,{borderRadius:"8px",overflow:"hidden",...Cl(E)?{transform:`scale(${ue()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${ue()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${kl.DURATION}s`,transitionTimingFunction:`cubic-bezier(${kl.EASE.join(",")})`},!0)}return t.useEffect(()=>{window.requestAnimationFrame(()=>{X.current=!0})},[]),t.useEffect(()=>{var e;function t(){if(!Z.current||!C)return;if(xl(document.activeElement)||q.current){var e;const t=(null==(e=window.visualViewport)?void 0:e.height)||0,n=window.innerHeight;let r=n-t;const o=Z.current.getBoundingClientRect().height||0,i=o>.8*n;ee.current||(ee.current=o);const s=Z.current.getBoundingClientRect().top;if(Math.abs(K.current-r)>60&&(q.current=!q.current),a&&a.length>0&&ae&&re){r+=ae[re]||0}if(K.current=r,o>t||q.current){const e=Z.current.getBoundingClientRect().height;let n=e;e>t&&(n=t-(i?s:26)),Z.current.style.height=g?e-Math.max(r,0)+"px":`${Math.max(n,t-s)}px`}else(function(){const e=navigator.userAgent;return"undefined"!=typeof window&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))})()||(Z.current.style.height=`${ee.current}px`);a&&a.length>0&&!q.current?Z.current.style.bottom="0px":Z.current.style.bottom=`${Math.max(r,0)}px`}}return null==(e=window.visualViewport)||e.addEventListener("resize",t),()=>{var e;return null==(e=window.visualViewport)?void 0:e.removeEventListener("resize",t)}},[re,a,ae]),t.useEffect(()=>(R&&(Pl(document.documentElement,{scrollBehavior:"auto"}),$.current=new Date),()=>{!function(e,t){if(!(e&&e instanceof HTMLElement))return;let n=Tl.get(e);n&&(e.style[t]=n[t])}(document.documentElement,"scrollBehavior")}),[R]),t.useEffect(()=>{v||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[v]),t.createElement(Zs,{defaultOpen:x,onOpenChange:e=>{(u||e)&&(e?z(!0):fe(!0),D(e))},open:R},t.createElement(il.Provider,{value:{activeSnapPoint:ne,snapPoints:a,setActiveSnapPoint:oe,drawerRef:Z,overlayRef:W,onOpenChange:n,onPress:function(e){var t,n;(u||a)&&(Z.current&&!Z.current.contains(e.target)||(J.current=(null==(t=Z.current)?void 0:t.getBoundingClientRect().height)||0,Q.current=(null==(n=Z.current)?void 0:n.getBoundingClientRect().width)||0,_(!0),B.current=new Date,cl()&&window.addEventListener("touchend",()=>U.current=!1,{once:!0}),e.target.setPointerCapture(e.pointerId),Y.current=Cl(E)?e.pageY:e.pageX))},onRelease:function(e){if(!L||!Z.current)return;Z.current.classList.remove(Il),U.current=!1,_(!1),H.current=new Date;const t=Ol(Z.current,E);if(!e||!pe(e.target,!1)||!t||Number.isNaN(t))return;if(null===B.current)return;const n=H.current.getTime()-B.current.getTime(),r=Y.current-(Cl(E)?e.pageY:e.pageX),o=Math.abs(r)/n;if(o>.05&&(F(!0),setTimeout(()=>{F(!1)},200)),a){return ie({draggedDistance:r*("bottom"===E||"right"===E?1:-1),closeDrawer:fe,velocity:o,dismissible:u}),void(null==i||i(e,!0))}if("bottom"===E||"right"===E?r>0:r<0)return me(),void(null==i||i(e,!0));if(o>.4)return fe(),void(null==i||i(e,!1));var s;const l=Math.min(null!=(s=Z.current.getBoundingClientRect().height)?s:0,window.innerHeight);var d;const p=Math.min(null!=(d=Z.current.getBoundingClientRect().width)?d:0,window.innerWidth),f="left"===E||"right"===E;if(Math.abs(t)>=(f?p:l)*c)return fe(),void(null==i||i(e,!1));null==i||i(e,!0),me()},onDrag:function(e){if(Z.current&&L){const t="bottom"===E||"right"===E?1:-1,n=(Y.current-(Cl(E)?e.pageY:e.pageX))*t,r=n>0,i=a&&!u&&!r;if(i&&0===re)return;const l=Math.abs(n),c=document.querySelector("[data-vaul-drawer-wrapper]");let d=l/("bottom"===E||"top"===E?J.current:Q.current);const p=ce(l,r);if(null!==p&&(d=p),i&&d>=1)return;if(!U.current&&!pe(e.target,r))return;if(Z.current.classList.add(Il),U.current=!0,Pl(Z.current,{transition:"none"}),Pl(W.current,{transition:"none"}),a&&se({draggedDistance:n}),r&&!a){const e=function(e){return 8*(Math.log(e+1)-2)}(n),r=Math.min(-1*e,0)*t;return void Pl(Z.current,{transform:Cl(E)?`translate3d(0, ${r}px, 0)`:`translate3d(${r}px, 0, 0)`})}const m=1-d;if((le||f&&re===f-1)&&(null==o||o(e,d),Pl(W.current,{opacity:`${m}`,transition:"none"},!0)),c&&W.current&&s){const e=Math.min(ue()+d*(1-ue()),1),t=8-8*d,n=Math.max(0,14-14*d);Pl(c,{borderRadius:`${t}px`,transform:Cl(E)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:"none"},!0)}if(!a){const e=l*t;Pl(Z.current,{transform:Cl(E)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}},dismissible:u,shouldAnimate:X,handleOnly:p,isOpen:R,isDragging:L,shouldFade:le,closeDrawer:fe,onNestedDrag:function(e,t){if(t<0)return;const n=(window.innerWidth-Ml)/window.innerWidth,r=n+t*(1-n),o=t*Ml-16;Pl(Z.current,{transform:Cl(E)?`scale(${r}) translate3d(0, ${o}px, 0)`:`scale(${r}) translate3d(${o}px, 0, 0)`,transition:"none"})},onNestedOpenChange:function(e){const t=e?(window.innerWidth-Ml)/window.innerWidth:1,n=e?-16:0;G.current&&window.clearTimeout(G.current),Pl(Z.current,{transition:`transform ${kl.DURATION}s cubic-bezier(${kl.EASE.join(",")})`,transform:Cl(E)?`scale(${t}) translate3d(0, ${n}px, 0)`:`scale(${t}) translate3d(${n}px, 0, 0)`}),!e&&Z.current&&(G.current=setTimeout(()=>{const e=Ol(Z.current,E);Pl(Z.current,{transition:"none",transform:Cl(E)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})},500))},onNestedRelease:function(e,t){const n=Cl(E)?window.innerHeight:window.innerWidth,r=t?(n-Ml)/n:1,o=t?-16:0;t&&Pl(Z.current,{transition:`transform ${kl.DURATION}s cubic-bezier(${kl.EASE.join(",")})`,transform:Cl(E)?`scale(${r}) translate3d(0, ${o}px, 0)`:`scale(${r}) translate3d(${o}px, 0, 0)`})},keyboardIsOpen:q,modal:v,snapPointsOffset:ae,activeSnapPointIndex:re,direction:E,shouldScaleBackground:s,setBackgroundColorOnScale:l,noBodyStyles:y,container:N,autoFocus:k}},r))}const Ll=t.forwardRef(function({...e},n){const{overlayRef:r,snapPoints:o,onRelease:i,shouldFade:a,isOpen:s,modal:l,shouldAnimate:c}=al(),d=Sl(n,r),u=o&&o.length>0;if(!l)return null;const p=t.useCallback(e=>i(e),[i]);return t.createElement(el,{onMouseUp:p,ref:d,"data-vaul-overlay":"","data-vaul-snap-points":s&&u?"true":"false","data-vaul-snap-points-overlay":s&&a?"true":"false","data-vaul-animate":(null==c?void 0:c.current)?"true":"false",...e})});Ll.displayName="Drawer.Overlay";const _l=t.forwardRef(function({onPointerDownOutside:e,style:n,onOpenAutoFocus:r,...o},i){const{drawerRef:a,onPress:s,onRelease:l,onDrag:c,keyboardIsOpen:d,snapPointsOffset:p,activeSnapPointIndex:f,modal:m,isOpen:h,direction:g,snapPoints:v,container:b,handleOnly:w,shouldAnimate:y,autoFocus:E}=al(),[x,S]=t.useState(!1),T=Sl(i,a),P=t.useRef(null),C=t.useRef(null),O=t.useRef(!1),N=v&&v.length>0;!function(){const{direction:e,isOpen:n,shouldScaleBackground:r,setBackgroundColorOnScale:o,noBodyStyles:i}=al(),a=t.useRef(null),s=u(()=>document.body.style.backgroundColor,[]);function l(){return(window.innerWidth-26)/window.innerWidth}t.useEffect(()=>{if(n&&r){a.current&&clearTimeout(a.current);const t=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!t)return;o&&!i&&Nl(document.body,{background:"black"}),Nl(t,{transformOrigin:Cl(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${kl.DURATION}s`,transitionTimingFunction:`cubic-bezier(${kl.EASE.join(",")})`});const n=Nl(t,{borderRadius:"8px",overflow:"hidden",...Cl(e)?{transform:`scale(${l()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${l()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{n(),a.current=window.setTimeout(()=>{s?document.body.style.background=s:document.body.style.removeProperty("background")},1e3*kl.DURATION)}}},[n,r,s])}();function k(e){P.current=null,O.current=!1,l(e)}return t.useEffect(()=>{N&&window.requestAnimationFrame(()=>{S(!0)})},[]),t.createElement(tl,{"data-vaul-drawer-direction":g,"data-vaul-drawer":"","data-vaul-delayed-snap-points":x?"true":"false","data-vaul-snap-points":h&&N?"true":"false","data-vaul-custom-container":b?"true":"false","data-vaul-animate":(null==y?void 0:y.current)?"true":"false",...o,ref:T,style:p&&p.length>0?{"--snap-point-height":`${p[null!=f?f:0]}px`,...n}:n,onPointerDown:e=>{w||(null==o.onPointerDown||o.onPointerDown.call(o,e),P.current={x:e.pageX,y:e.pageY},s(e))},onOpenAutoFocus:e=>{null==r||r(e),E||e.preventDefault()},onPointerDownOutside:t=>{null==e||e(t),m&&!t.defaultPrevented?d.current&&(d.current=!1):t.preventDefault()},onFocusOutside:e=>{m||e.preventDefault()},onPointerMove:e=>{if(C.current=e,w)return;if(null==o.onPointerMove||o.onPointerMove.call(o,e),!P.current)return;const t=e.pageY-P.current.y,n=e.pageX-P.current.x,r="touch"===e.pointerType?10:2,i=((e,t,n=0)=>{if(O.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 O.current=!0,!0})({x:n,y:t},g,r);i?c(e):(Math.abs(n)>r||Math.abs(t)>r)&&(P.current=null)},onPointerUp:e=>{null==o.onPointerUp||o.onPointerUp.call(o,e),P.current=null,O.current=!1,l(e)},onPointerOut:e=>{null==o.onPointerOut||o.onPointerOut.call(o,e),k(C.current)},onContextMenu:e=>{null==o.onContextMenu||o.onContextMenu.call(o,e),C.current&&k(C.current)}})});_l.displayName="Drawer.Content";const jl=t.forwardRef(function({preventCycle:e=!1,children:n,...r},o){const{closeDrawer:i,isDragging:a,snapPoints:s,activeSnapPoint:l,setActiveSnapPoint:c,dismissible:d,handleOnly:u,isOpen:p,onPress:f,onDrag:m}=al(),h=t.useRef(null),g=t.useRef(!1);function v(){h.current&&window.clearTimeout(h.current),g.current=!1}return t.createElement("div",{onClick:function(){g.current?v():window.setTimeout(()=>{!function(){if(a||e||g.current)return void v();if(v(),!s||0===s.length)return void(d||i());if(l===s[s.length-1]&&d)return void i();const t=s.findIndex(e=>e===l);if(-1===t)return;const n=s[t+1];c(n)}()},120)},onPointerCancel:v,onPointerDown:e=>{u&&f(e),h.current=window.setTimeout(()=>{g.current=!0},250)},onPointerMove:e=>{u&&m(e)},ref:o,"data-vaul-drawer-visible":p?"true":"false","data-vaul-handle":"","aria-hidden":"true",...r},t.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},n))});jl.displayName="Drawer.Handle";const Fl={Root:zl,NestedRoot:function({onDrag:e,onOpenChange:n,open:r,...o}){const{onNestedDrag:i,onNestedOpenChange:a,onNestedRelease:s}=al();if(!i)throw new Error("Drawer.NestedRoot must be placed in another drawer");return t.createElement(zl,{nested:!0,open:r,onClose:()=>{a(!1)},onDrag:(t,n)=>{i(t,n),null==e||e(t,n)},onOpenChange:e=>{e&&a(e),null==n||n(e)},onRelease:s,...o})},Content:_l,Overlay:Ll,Trigger:Js,Portal:function(e){const n=al(),{container:r=n.container,...o}=e;return t.createElement(Qs,{container:r,...o})},Handle:jl,Close:ol,Title:nl,Description:rl};function Wl(t){var n=S(t,[]);return e.createElement(Fl.Root,Object.assign({"data-slot":"drawer"},n))}function $l(t){var n=S(t,[]);return e.createElement(Fl.Trigger,Object.assign({"data-slot":"drawer-trigger"},n))}function Bl(t){var n=S(t,[]);return e.createElement(Fl.Portal,Object.assign({"data-slot":"drawer-portal"},n))}function Hl(t){var{className:n}=t,r=S(t,["className"]);return e.createElement(Fl.Overlay,Object.assign({"data-slot":"drawer-overlay",className:Be("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[999999] bg-black/50",n)},r))}function Vl(t){var{className:n,children:r}=t,o=S(t,["className","children"]);return e.createElement(Bl,{"data-slot":"drawer-portal"},e.createElement(Hl,null),e.createElement(Fl.Content,Object.assign({"data-slot":"drawer-content",className:Be("group/drawer-content bg-background fixed z-[999999] flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",n)},o),e.createElement("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),r))}function Ul(t){var{className:n}=t,r=S(t,["className"]);return e.createElement("div",Object.assign({"data-slot":"drawer-header",className:Be("flex flex-col gap-1.5 p-4",n)},r))}function Gl(t){var{className:n}=t,r=S(t,["className"]);return e.createElement(Fl.Title,Object.assign({"data-slot":"drawer-title",className:Be("text-foreground font-semibold",n)},r))}const Yl=({children:e,products:n,contentId:r})=>{const{isPreview:o}=bi();return t.createElement(Wl,{direction:"right",fadeFromIndex:0,snapPoints:[1]},t.createElement($l,{className:"w-full"},e),t.createElement(Vl,null,t.createElement(Ul,null,t.createElement(Gl,null,"상품 목록")),t.createElement("div",{className:"overflow-y-scroll grid-cols-2 grid items-baseline justify-items-center scrollbar-hide"},n.map(e=>e.linkPath?t.createElement("a",{key:e.productId,className:"p-2 text-gray-800 w-full h-full flex flex-col items-center justify-center no-underline",href:e.linkPath,target:"_blank",onClick:()=>T(void 0,void 0,void 0,function*(){o||(yield si({contentId:r,contentProductId:e.eventProductId,productId:e.productId}))})},t.createElement(ql,{product:e})):t.createElement(ql,{key:e.productId,product:e})))))},ql=({product:e})=>t.createElement("div",{className:"text-gray-800 w-32"},t.createElement("div",{className:"w-full aspect-square mb-2 border border-[#f4f3f6] rounded "},t.createElement("img",{src:e.thumbPath,alt:e.productName,className:"w-full h-full"})),e.brand&&t.createElement("p",{className:"text-xs text-gray-400 mb-1"},e.brand.brandName),t.createElement("p",{className:"w-full text-[12px] md:text-[15px] mb-1"},e.productName),t.createElement("div",{className:"w-full "},t.createElement("div",{className:"flex"},t.createElement("span",{className:"text-sm text-red-500 mr-2 font-semibold"},e.discount,"%"),t.createElement("span",{className:"font-semibold"},e.sellingPrice.toString().replace(/\B(?=(\d{3})+(?!\d))/g,","),"원")))),Xl=({products:e,useDrawer:n,contentId:r})=>{const o=u(()=>(e=>{if(e.length>=3)return e;const t=[...e];for(;t.length<3;)t.push(...e);return t})(e),[e]);return t.createElement(t.Fragment,null,t.createElement("div",{className:"w-full",style:{height:"80px"}},(null==e?void 0:e.length)?t.createElement(Oo,{nested:!0,modules:[Bo,Io],slidesPerView:1.1,effect:"cards",autoplay:!0,loop:!0,grabCursor:!0,cardsEffect:{rotate:!1},className:"w-full",style:{height:"80px"}},o.map((o,i)=>t.createElement(No,{key:i+o.productId,className:"bg-white overflow-hidden rounded-xl",style:{borderRadius:"10px",height:"80px"}},n?t.createElement(Yl,{products:e,contentId:r},t.createElement(ji,{product:o,productsLength:e.length,contentId:r})):t.createElement(ji,{product:o,productsLength:e.length,hideMoreBtn:!0,contentId:r})))):null))},Kl=({shortForm:e,useDrawer:n,isPopup:r,shareUrl:o,handleClose:i})=>{const[s,l]=a(!Boolean(r)),[c,d]=a(!0),{logo:u,productsInfo:p,thumbPath:f,title:m,media:h,brand:g,shortsId:v}=e,{objectId:b}=h;return t.createElement("div",{className:"h-full w-full text-sm overflow-hidden text-white relative"},t.createElement("div",{style:{backgroundImage:"linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, transparent 50%, rgba(0,0,0,0.4) 100%)",padding:"15px"},className:"absolute h-full flex flex-col w-full z-[1] justify-between inset-0 bg-gradient-to-b from-black/40 via-transparent to-black/40"},t.createElement("div",{className:"flex gap-2 justify-between "},t.createElement("div",{className:"max-w-16"},(null==u?void 0:u.thumbPath)?t.createElement("img",{className:"mb-1",src:u.thumbPath,alt:u.logoName,width:100,height:100}):null),t.createElement("div",{className:"justify-self-end flex gap-2"},t.createElement("div",{className:"cursor-pointer text-white ",onClick:()=>{d(e=>!e)}},c?t.createElement(dt,{size:20}):t.createElement(ut,{size:20})),t.createElement("div",{className:"cursor-pointer text-white ",onClick:()=>{l(e=>!e)}},s?t.createElement(mt,{size:20}):t.createElement(ft,{size:20})),t.createElement("div",{className:"cursor-pointer text-white ",onClick:i},t.createElement(ht,{size:20})))),t.createElement("div",null,t.createElement("div",{className:"flex justify-between items-end mb-3 gap-3"},t.createElement("div",{className:"w-full"},g&&t.createElement("div",{className:"items-center flex gap-3 mb-2"},t.createElement("div",{className:"w-12 h-12 bg-white rounded-full border overflow-hidden"},t.createElement("img",{src:g.thumbPath,alt:g.brandName,width:100,height:100,className:"object-contain w-full h-full"})),t.createElement("p",{style:{fontSize:"14px",textAlign:"start"}},null==g?void 0:g.brandName)),t.createElement("p",{style:{fontSize:"14px",textAlign:"start"}},m)),t.createElement("div",{className:"flex flex-col items-center",style:{gap:"15px"}},t.createElement(Ci,{shortsId:v}),t.createElement("div",{className:"w-[24px] h-[24px] flex items-center justify-center"},t.createElement(_i,{shortForm:e,shareUrl:o})))),p&&t.createElement(Xl,{products:p,useDrawer:n,contentId:e.shortsId}))),t.createElement(O,{file:He(b),thumbnail:`${Xe(f)}`,mute:s,isVertical:h.height>h.width,play:c}))},Zl=({collection:e,playerSettings:n})=>{const[r,o]=a(e.contents[0]);return t.createElement("div",{className:"w-full h-full aspect-[9/16]"},t.createElement(Oo,{modules:[ko,jo],loop:!0,mousewheel:!0,direction:"vertical",touchEventsTarget:"container",slidesPerView:1,onSlideChangeTransitionEnd:t=>{const n=e.contents[t.realIndex];o(Object.assign({},n))},className:"h-full"},e.contents.map(e=>t.createElement(No,{key:e.shortsId,className:"rounded-xl overflow-hidden"},r.shortsId===e.shortsId&&t.createElement("div",{className:"h-full rounded-xl absolute z-[999] w-full"},t.createElement(Kl,{shortForm:r,isPopup:!0})),t.createElement("img",{src:Xe(e.thumbPath),alt:e.title,className:"rounded-xl w-full h-full bg-black "+(e.media.width>e.media.height?"object-contain":"object-cover")})))))},Jl=e=>{const{isMobile:n}=e,[r,o]=a("collection"in e?e.collection.contents[0]:null);if(n){if("shortform"in e)return t.createElement(Kl,{shortForm:e.shortform});if(e.collection)return t.createElement(Zl,{collection:e.collection,playerSettings:e.collection.player.shoppingPlayer})}if("shortform"in e){const{layout:n}=e.shortform.player,r=e.shortform.player.shoppingPlayer;switch(n){case Je.PLATFORM:return t.createElement(lr,{shortform:e.shortform,playerSettings:r,player:t.createElement("div",{className:"aspect-[9/16] h-full rounded-xl border overflow-hidden"},t.createElement(O,{file:He(e.shortform.media.objectId)}))});case Je.HORIZONTAL:return t.createElement(Uo,{shortform:e.shortform,playerSettings:r,player:t.createElement(O,{file:He(e.shortform.media.objectId)})});case Je.VERTICAL:return t.createElement(Yo,{shortform:e.shortform,playerSettings:r,player:t.createElement("div",{className:"aspect-[9/16] h-full"},t.createElement(O,{file:He(e.shortform.media.objectId)}))});case Je.GRID:return t.createElement(Xo,{shortform:e.shortform,playerSettings:r,player:t.createElement(O,{file:He(e.shortform.media.objectId)})})}}else{if(!e.collection||!r)return null;{const{layout:n}=e.collection.player,i=e.collection.player.shoppingPlayer;switch(n){case Je.PLATFORM:return t.createElement(lr,{shortform:r,playerSettings:i,player:t.createElement("div",{className:"w-full flex items-center justify-center gap-4",style:{height:"calc(-220px + 100vh)"}},t.createElement(Si,{collection:e.collection,playerSettings:i,shortform:r,setShortform:o}))});case Je.HORIZONTAL:return t.createElement(Uo,{shortform:r,playerSettings:Object.assign({},i),player:t.createElement("div",{className:"h-full aspect-[9/16]"},t.createElement(Ti,{collection:e.collection,playerSettings:i,shortform:r,setShortform:o}))});case Je.VERTICAL:return t.createElement(Yo,{playerSettings:Object.assign({},i),shortform:r,player:t.createElement(Ti,{collection:e.collection,playerSettings:i,shortform:r,setShortform:o})});case Je.GRID:return t.createElement(Xo,{shortform:r,playerSettings:Object.assign({},i),player:t.createElement(Ti,{collection:e.collection,playerSettings:i,shortform:r,setShortform:o})})}}}},Ql=e=>t.createElement(Kl,Object.assign({},e));function ec(){const[e,t]=a({width:window.innerWidth,height:window.innerHeight});return r(()=>{const e=()=>t({width:window.innerWidth,height:window.innerHeight});return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}const tc=t.memo(({shortform:e,shareUrl:n,handleClose:r})=>t.createElement(t.Fragment,null,t.createElement("div",{onClick:e=>e.stopPropagation(),className:"overflow-hidden",style:{borderRadius:"10px",overflow:"hidden",width:"100%",height:"100%",backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"cover",backgroundImage:`url(${Xe(e.thumbPath)})`}},t.createElement(Kl,{handleClose:r,shortForm:e,useDrawer:!1,isPopup:!0,shareUrl:n})))),nc=t.memo(({shortform:e})=>(ec().width,t.createElement("div",{onClick:e=>e.stopPropagation(),style:{width:"100%",height:"100%",borderRadius:"10px",backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"cover",backgroundImage:`url(${e.thumbPath.includes("https")?e.thumbPath:`https://${e.thumbPath}`})`}}))),rc=({shortform:e,shareUrl:n,handleClose:r})=>{const{isActive:o}=c(Po),i=c(Co),a=ec().width<430||zi.isMobile;return t.createElement("div",{className:"flex items-center justify-center w-full h-full select-none"},t.createElement("div",{className:"max-h-full flex items-center justify-center",style:{width:"100%",aspectRatio:a?"auto":"9 / 16",height:a?"100dvh":"auto",maxHeight:a?void 0:"90vh",transform:a?void 0:`scale(${o?1:.8})`,transition:"transform 180ms ease"}},o?t.createElement("div",{className:"flex items-center justify-between w-full h-full text-white"},t.createElement("div",{className:"cursor-pointer absolute",onClick:()=>i.slidePrev(),style:{zIndex:99999,left:a?"0":"-30px"}},t.createElement(at,{size:24})),t.createElement(tc,{shortform:e,shareUrl:n,handleClose:r}),t.createElement("div",{className:"cursor-pointer absolute",style:{zIndex:99999,right:a?"0":"-30px"},onClick:()=>i.slideNext()},t.createElement(st,{size:24}))):t.createElement(nc,{shortform:e})))},oc=({collection:e,initialShortsId:r,onSlideChange:o,onClosePlayer:i})=>{var a;const s=u(()=>Math.max(e.contents.findIndex(e=>e.shortsId===r),0),[e.contents,r]),l=e.contents.length,c=Math.max(l,10),d=null!==(a=ec().width)&&void 0!==a?a:0,p=d<430||zi.isMobile,f=p?1:d>=1200?4:d>=900?3:2,m=u(()=>(e=>{const t=[...e];for(;t.length<c;)t.push(...e);return t})(e.contents),[e.contents]),h=n(null);return t.createElement("div",{style:{minHeight:100,minWidth:300},className:"w-full"},t.createElement(Oo,{style:{minHeight:100,overflow:"visible"},initialSlide:s,ref:h,lazyPreloadPrevNext:2,className:"w-full",spaceBetween:p?8:d>=1200?24:d>=900?25:16,slidesPerView:f,grabCursor:!0,centeredSlides:1!==f,onSlideChangeTransitionEnd:t=>{const n=t.realIndex%l;null==o||o(n);const r=e.contents[(n+1)%l];var i;i=He(r.media.objectId),P||(P=document.createElement("video"),P.muted=!0,P.playsInline=!0,P.preload="metadata",P.loop=!0,P.style.cssText="position:fixed;left:-9999px;top:-9999px;width:1px;height:1px;opacity:0",document.body.appendChild(P)),C!==i&&(P.src=i,P.load(),C=i)},loop:!0},m.map((n,r)=>t.createElement(No,{key:r},t.createElement(rc,{handleClose:i,shortform:n,shareUrl:`${$e.PLAYER_BASE_URL}/collection/${e.colId}?start=${n.shortsId}&layout=5`})))))},ic=({shortform:e,onThumbnailClick:n,iconSize:r,exposeTitle:o,borderLine:i})=>{const a=u(()=>qe(i),[i])?{background:"linear-gradient(#fff,#fff) padding-box, conic-gradient(#f58529,#f77737,#fd1d1d,#833ab4,#c13584,#f58529) border-box",border:"3px solid transparent"}:{background:"#fff",border:"3px solid #fff"};return t.createElement("div",{className:"flex flex-col w-full gap-2",onClick:()=>n(e.shortsId)},t.createElement("div",{className:"rounded-full overflow-hidden cursor-pointer",style:Object.assign({width:r,height:r,padding:4},a)},t.createElement("img",{src:Xe(e.thumbPath),alt:"thumbnail",className:"w-full h-full object-cover block rounded-full"})),o&&t.createElement("span",{style:{width:r},className:"text-black overflow-hidden text-[12px] whitespace-nowrap text-center text-clip cursor-default"},e.title))},ac=vi(e=>({open:!1,setOpen:t=>e({open:t})})),sc=({product:e,productLength:n,hideMoreBadge:r=!1,contentId:o,lineClamp:i,showMoreBtn:a=!1,openProductPopup:s})=>{const{isPreview:l}=bi();return t.createElement(t.Fragment,null,t.createElement("div",{className:"product-banner border mbus-border",onClick:()=>T(void 0,void 0,void 0,function*(){r&&(window.open(e.linkPath,"_blank"),l||(yield si({contentProductId:e.eventProductId,contentId:o,productId:e.productId})))})},t.createElement("span",{className:"product-banner__clip","aria-hidden":!0},t.createElement("span",{className:"product-banner__sheen"})),t.createElement("div",{className:"relative",style:{width:"40%",minWidth:"40%"}},t.createElement("img",{style:{borderRadius:"0.625rem"},className:"aspect-square rounded-lg object-cover w-full",src:Xe(e.thumbPath),alt:e.productName}),!r&&t.createElement("p",{className:"absolute text-white rounded-lg",style:{backgroundColor:"#797979",top:-10,right:-10,padding:"2px 4px",fontSize:"10px",borderRadius:"0.625rem"}},"+",n)),t.createElement("div",{style:{position:"relative",zIndex:2,minWidth:0,flex:1,paddingRight:24}},t.createElement("p",{style:{display:"-webkit-box",WebkitLineClamp:i||2,WebkitBoxOrient:"vertical",overflow:"hidden",wordBreak:"break-word",fontWeight:600}},e.productName)),t.createElement("span",{className:"product-banner__arrow","aria-hidden":!0},"›")),a&&n>1&&t.createElement("div",{onClick:s,className:" flex items-center justify-center border mbus-border cursor-pointer",style:{borderRadius:"0.625rem",padding:"10px",backgroundColor:"#f5f5f5",fontWeight:600}},"+ 더보기 (",n,")"))},lc=({products:e,iconSize:n,contentId:r,setSelectedProducts:o,showMoreBtn:i,hideMoreBadge:a})=>{const{setOpen:s}=ac(),l=()=>{o({productsInfo:e,shortsId:r}),s(!0)};return t.createElement(t.Fragment,null,t.createElement("div",{onClick:()=>T(void 0,void 0,void 0,function*(){1===e.length||i||l()}),className:"flex flex-col gap-2 mt-4 text-gray-800",style:{maxWidth:n||"100%",fontSize:13}},t.createElement(sc,{showMoreBtn:i,lineClamp:2,product:e[0],contentId:r,productLength:e.length,hideMoreBadge:null!=a?a:1===e.length,openProductPopup:l})))},cc=({shortform:e,onThumbnailClick:n,iconSize:r,exposeTitle:o,rounded:i,borderLine:a,titlePosition:s,exposeProductBanner:l,setSelectedProducts:c,iconRatio:d})=>{const p=u(()=>qe(a),[a]);return t.createElement("div",{className:"relative"},t.createElement("div",{onClick:()=>n(e.shortsId),style:Object.assign({width:r,aspectRatio:d},i&&{borderRadius:"10px"}),className:`cursor-pointer p-[3px] ${i&&"rounded-xl"} ${p&&"bg-insta"}`},t.createElement("img",{style:Object.assign({},i&&{borderRadius:"10px"}),src:Xe(e.thumbPath),alt:"",className:`w-full h-full object-cover ${i&&"rounded-xl"}`})),o&&t.createElement("p",{style:{width:r,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},className:`my-2 ${s===Fe.INNER?"absolute bottom-0 left-0 text-white px-2":""} text-[12px] cursor-default truncate`},e.title),l&&t.createElement(lc,{setSelectedProducts:c,products:e.productsInfo,iconSize:r,contentId:e.shortsId}))},dc=e=>{const{iconShape:n,collection:r}=e;return n===Le.MANY?t.createElement(uc,Object.assign({},e)):t.createElement(pc,Object.assign({},e,{shortform:r.contents[0]}))},uc=e=>{const{collection:n}=e,{setCollection:r,nextKey:o,setNextKey:i,isFetching:a,setIsFetching:s}=Ei();return t.createElement(Oo,{freeMode:!0,slidesPerView:"auto",spaceBetween:12,onReachEnd:()=>T(void 0,void 0,void 0,function*(){var e,t,l;if(n&&!(a||(null!==(e=n.count)&&void 0!==e?e:Number.MAX_SAFE_INTEGER)<=n.contents.length)){s(!0);try{const e=yield di({collectionId:n.colId,nextKey:o});if(!e||!(null===(t=e.contents)||void 0===t?void 0:t.length))return;i((null===(l=e.contents.at(-1))||void 0===l?void 0:l.shortsId)||"");const a=new Set(n.contents.map(e=>e.shortsId)),s=e.contents.filter(e=>!a.has(e.shortsId));if(!s.length)return;r(Object.assign(Object.assign({},n),{contents:[...n.contents,...s]}))}catch(e){console.error(e)}finally{s(!1)}}})},null==n?void 0:n.contents.map(n=>t.createElement(No,{key:n.shortsId,className:"!w-auto"},t.createElement(pc,Object.assign({},e,{shortform:n})))))},pc=e=>{const{iconForm:n}=e;return n===ze.INSTA?t.createElement(ic,Object.assign({},e)):t.createElement(cc,Object.assign({},e))};function fc(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function mc(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function hc(...e){return t=>{let n=!1;const r=e.map(e=>{const r=mc(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():mc(e[t],null)}}}}function gc(...t){return e.useCallback(hc(...t),t)}function vc(...t){const n=t[0];if(1===t.length)return n;const r=()=>{const r=t.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(t){const o=r.reduce((e,{useScope:n,scopeName:r})=>({...e,...n(t)[`__scope${r}`]}),{});return e.useMemo(()=>({[`__scope${n.scopeName}`]:o}),[o])}};return r.scopeName=n.scopeName,r}var bc=globalThis?.document?e.useLayoutEffect:()=>{},wc=e[" useId ".trim().toString()]||(()=>{}),yc=0;function Ec(t){const[n,r]=e.useState(wc());return bc(()=>{t||r(e=>e??String(yc++))},[t]),t||(n?`radix-${n}`:"")}var xc=e[" useInsertionEffect ".trim().toString()]||bc;function Sc({prop:t,defaultProp:n,onChange:r=()=>{},caller:o}){const[i,a,s]=function({defaultProp:t,onChange:n}){const[r,o]=e.useState(t),i=e.useRef(r),a=e.useRef(n);return xc(()=>{a.current=n},[n]),e.useEffect(()=>{i.current!==r&&(a.current?.(r),i.current=r)},[r,i]),[r,o,a]}({defaultProp:n,onChange:r}),l=void 0!==t,c=l?t:i;{const n=e.useRef(void 0!==t);e.useEffect(()=>{const e=n.current;if(e!==l){const t=e?"controlled":"uncontrolled",n=l?"controlled":"uncontrolled";console.warn(`${o} is changing from ${t} to ${n}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}n.current=l},[l,o])}const d=e.useCallback(e=>{if(l){const n=function(e){return"function"==typeof e}(e)?e(t):e;n!==t&&s.current?.(n)}else a(e)},[l,t,a,s]);return[c,d]}function Tc(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function Pc(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Cc(...e){return t=>{let n=!1;const r=e.map(e=>{const r=Pc(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():Pc(e[t],null)}}}}function Oc(...t){return e.useCallback(Cc(...t),t)}function Nc(t){const n=e.forwardRef((t,n)=>{const{children:r,...o}=t;if(e.isValidElement(r)){const t=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}(r),i=function(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)=>{const t=i(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(o,r.props);return r.type!==e.Fragment&&(i.ref=n?Cc(n,t):t),e.cloneElement(r,i)}return e.Children.count(r)>1?e.Children.only(null):null});return n.displayName=`${t}.SlotClone`,n}var kc=Symbol("radix.slottable");function Mc(t){return e.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===kc}var Ic=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,n)=>{const r=function(t){const n=Nc(t),r=e.forwardRef((t,r)=>{const{children:o,...i}=t,a=e.Children.toArray(o),s=a.find(Mc);if(s){const t=s.props.children,o=a.map(n=>n===s?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:n);return m(n,{...i,ref:r,children:e.isValidElement(t)?e.cloneElement(t,void 0,o):null})}return m(n,{...i,ref:r,children:o})});return r.displayName=`${t}.Slot`,r}(`Primitive.${n}`),o=e.forwardRef((e,t)=>{const{asChild:o,...i}=e,a=o?r:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),m(a,{...i,ref:t})});return o.displayName=`Primitive.${n}`,{...t,[n]:o}},{});var Rc,Dc="dismissableLayer.update",Ac="dismissableLayer.pointerDownOutside",zc="dismissableLayer.focusOutside",Lc=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_c=e.forwardRef((t,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...c}=t,d=e.useContext(Lc),[u,p]=e.useState(null),f=u?.ownerDocument??globalThis?.document,[,h]=e.useState({}),g=Oc(n,e=>p(e)),v=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),w=v.indexOf(b),y=u?v.indexOf(u):-1,E=d.layersWithOutsidePointerEventsDisabled.size>0,x=y>=w,S=function(t,n=globalThis?.document){const r=ta(t),o=e.useRef(!1),i=e.useRef(()=>{});return e.useEffect(()=>{const e=e=>{if(e.target&&!o.current){let t=function(){Fc(Ac,r,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(n.removeEventListener("click",i.current),i.current=t,n.addEventListener("click",i.current,{once:!0})):t()}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));x&&!n&&(i?.(e),s?.(e),e.defaultPrevented||l?.())},f),T=function(t,n=globalThis?.document){const r=ta(t),o=e.useRef(!1);return e.useEffect(()=>{const e=e=>{if(e.target&&!o.current){Fc(zc,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))||(a?.(e),s?.(e),e.defaultPrevented||l?.())},f);return na(e=>{y===d.layers.size-1&&(o?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))},f),e.useEffect(()=>{if(u)return r&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(Rc=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(u)),d.layers.add(u),jc(),()=>{r&&1===d.layersWithOutsidePointerEventsDisabled.size&&(f.body.style.pointerEvents=Rc)}},[u,f,r,d]),e.useEffect(()=>()=>{u&&(d.layers.delete(u),d.layersWithOutsidePointerEventsDisabled.delete(u),jc())},[u,d]),e.useEffect(()=>{const e=()=>h({});return document.addEventListener(Dc,e),()=>document.removeEventListener(Dc,e)},[]),m(Ic.div,{...c,ref:g,style:{pointerEvents:E?x?"auto":"none":void 0,...t.style},onFocusCapture:Tc(t.onFocusCapture,T.onFocusCapture),onBlurCapture:Tc(t.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Tc(t.onPointerDownCapture,S.onPointerDownCapture)})});_c.displayName="DismissableLayer";function jc(){const e=new CustomEvent(Dc);document.dispatchEvent(e)}function Fc(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?function(e,t){e&&v.flushSync(()=>e.dispatchEvent(t))}(o,i):o.dispatchEvent(i)}e.forwardRef((t,n)=>{const r=e.useContext(Lc),o=e.useRef(null),i=Oc(n,o);return e.useEffect(()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),m(Ic.div,{...t,ref:i})}).displayName="DismissableLayerBranch";var Wc=t=>{const{present:n,children:r}=t,o=function(t){const[n,r]=e.useState(),o=e.useRef(null),i=e.useRef(t),a=e.useRef("none"),s=t?"mounted":"unmounted",[l,c]=function(t,n){return e.useReducer((e,t)=>n[e][t]??e,t)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect(()=>{const e=$c(o.current);a.current="mounted"===l?e:"none"},[l]),bc(()=>{const e=o.current,n=i.current;if(n!==t){const r=a.current,o=$c(e);if(t)c("MOUNT");else if("none"===o||"none"===e?.display)c("UNMOUNT");else{c(n&&r!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=t}},[t,c]),bc(()=>{if(n){let e;const t=n.ownerDocument.defaultView??window,r=r=>{const a=$c(o.current).includes(r.animationName);if(r.target===n&&a&&(c("ANIMATION_END"),!i.current)){const r=n.style.animationFillMode;n.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===n.style.animationFillMode&&(n.style.animationFillMode=r)})}},s=e=>{e.target===n&&(a.current=$c(o.current))};return n.addEventListener("animationstart",s),n.addEventListener("animationcancel",r),n.addEventListener("animationend",r),()=>{t.clearTimeout(e),n.removeEventListener("animationstart",s),n.removeEventListener("animationcancel",r),n.removeEventListener("animationend",r)}}c("ANIMATION_END")},[n,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:e.useCallback(e=>{o.current=e?getComputedStyle(e):null,r(e)},[])}}(n),i="function"==typeof r?r({present:o.isPresent}):e.Children.only(r),a=gc(o.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}(i));return"function"==typeof r||o.isPresent?e.cloneElement(i,{ref:a}):null};function $c(e){return e?.animationName||"none"}function Bc(t){const n=Hc(t),r=e.forwardRef((t,r)=>{const{children:o,...i}=t,a=e.Children.toArray(o),s=a.find(Uc);if(s){const t=s.props.children,o=a.map(n=>n===s?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:n);return m(n,{...i,ref:r,children:e.isValidElement(t)?e.cloneElement(t,void 0,o):null})}return m(n,{...i,ref:r,children:o})});return r.displayName=`${t}.Slot`,r}function Hc(t){const n=e.forwardRef((t,n)=>{const{children:r,...o}=t;if(e.isValidElement(r)){const t=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}(r),i=function(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)=>{const t=i(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(o,r.props);return r.type!==e.Fragment&&(i.ref=n?hc(n,t):t),e.cloneElement(r,i)}return e.Children.count(r)>1?e.Children.only(null):null});return n.displayName=`${t}.SlotClone`,n}Wc.displayName="Presence";var Vc=Symbol("radix.slottable");function Uc(t){return e.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===Vc}var Gc=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,n)=>{const r=Bc(`Primitive.${n}`),o=e.forwardRef((e,t)=>{const{asChild:o,...i}=e,a=o?r:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),m(a,{...i,ref:t})});return o.displayName=`Primitive.${n}`,{...t,[n]:o}},{}),Yc=0;function qc(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Xc="Dialog",[Kc,Zc]=function(t,n=[]){let r=[];const o=()=>{const n=r.map(t=>e.createContext(t));return function(r){const o=r?.[t]||n;return e.useMemo(()=>({[`__scope${t}`]:{...r,[t]:o}}),[r,o])}};return o.scopeName=t,[function(n,o){const i=e.createContext(o),a=r.length;r=[...r,o];const s=n=>{const{scope:r,children:o,...s}=n,l=r?.[t]?.[a]||i,c=e.useMemo(()=>s,Object.values(s));return m(l.Provider,{value:c,children:o})};return s.displayName=n+"Provider",[s,function(r,s){const l=s?.[t]?.[a]||i,c=e.useContext(l);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${n}\``)}]},vc(o,...n)]}(Xc),[Jc,Qc]=Kc(Xc),ed=t=>{const{__scopeDialog:n,children:r,open:o,defaultOpen:i,onOpenChange:a,modal:s=!0}=t,l=e.useRef(null),c=e.useRef(null),[d,u]=Sc({prop:o,defaultProp:i??!1,onChange:a,caller:Xc});return m(Jc,{scope:n,triggerRef:l,contentRef:c,contentId:Ec(),titleId:Ec(),descriptionId:Ec(),open:d,onOpenChange:u,onOpenToggle:e.useCallback(()=>u(e=>!e),[u]),modal:s,children:r})};ed.displayName=Xc;var td="DialogTrigger";e.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Qc(td,n),i=gc(t,o.triggerRef);return m(Gc.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Ed(o.open),...r,ref:i,onClick:fc(e.onClick,o.onOpenToggle)})}).displayName=td;var nd="DialogPortal",[rd,od]=Kc(nd,{forceMount:void 0}),id=t=>{const{__scopeDialog:n,forceMount:r,children:o,container:i}=t,a=Qc(nd,n);return m(rd,{scope:n,forceMount:r,children:e.Children.map(o,e=>m(Wc,{present:r||a.open,children:m(Ea,{asChild:!0,container:i,children:e})}))})};id.displayName=nd;var ad="DialogOverlay",sd=e.forwardRef((e,t)=>{const n=od(ad,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Qc(ad,e.__scopeDialog);return i.modal?m(Wc,{present:r||i.open,children:m(cd,{...o,ref:t})}):null});sd.displayName=ad;var ld=Bc("DialogOverlay.RemoveScroll"),cd=e.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Qc(ad,n);return m(ds,{as:ld,allowPinchZoom:!0,shards:[o.contentRef],children:m(Gc.div,{"data-state":Ed(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),dd="DialogContent",ud=e.forwardRef((e,t)=>{const n=od(dd,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Qc(dd,e.__scopeDialog);return m(Wc,{present:r||i.open,children:i.modal?m(pd,{...o,ref:t}):m(fd,{...o,ref:t})})});ud.displayName=dd;var pd=e.forwardRef((t,n)=>{const r=Qc(dd,t.__scopeDialog),o=e.useRef(null),i=gc(n,r.contentRef,o);return e.useEffect(()=>{const e=o.current;if(e)return vs(e)},[]),m(md,{...t,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:fc(t.onCloseAutoFocus,e=>{e.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:fc(t.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:fc(t.onFocusOutside,e=>e.preventDefault())})}),fd=e.forwardRef((t,n)=>{const r=Qc(dd,t.__scopeDialog),o=e.useRef(!1),i=e.useRef(!1);return m(md,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||r.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const n=e.target,a=r.triggerRef.current?.contains(n);a&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}})}),md=e.forwardRef((t,n)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,...s}=t,l=Qc(dd,r),c=e.useRef(null),d=gc(n,c);return e.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??qc()),document.body.insertAdjacentElement("beforeend",e[1]??qc()),Yc++,()=>{1===Yc&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Yc--}},[]),g(h,{children:[m(ma,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a,children:m(_c,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Ed(l.open),...s,ref:d,onDismiss:()=>l.onOpenChange(!1)})}),g(h,{children:[m(Pd,{titleId:l.titleId}),m(Cd,{contentRef:c,descriptionId:l.descriptionId})]})]})}),hd="DialogTitle",gd=e.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Qc(hd,n);return m(Gc.h2,{id:o.titleId,...r,ref:t})});gd.displayName=hd;var vd="DialogDescription",bd=e.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Qc(vd,n);return m(Gc.p,{id:o.descriptionId,...r,ref:t})});bd.displayName=vd;var wd="DialogClose",yd=e.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Qc(wd,n);return m(Gc.button,{type:"button",...r,ref:t,onClick:fc(e.onClick,()=>o.onOpenChange(!1))})});function Ed(e){return e?"open":"closed"}yd.displayName=wd;var xd="DialogTitleWarning",[Sd,Td]=function(t,n){const r=e.createContext(n),o=t=>{const{children:n,...o}=t,i=e.useMemo(()=>o,Object.values(o));return m(r.Provider,{value:i,children:n})};return o.displayName=t+"Provider",[o,function(o){const i=e.useContext(r);if(i)return i;if(void 0!==n)return n;throw new Error(`\`${o}\` must be used within \`${t}\``)}]}(xd,{contentName:dd,titleName:hd,docsSlug:"dialog"}),Pd=({titleId:t})=>{const n=Td(xd),r=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return e.useEffect(()=>{if(t){document.getElementById(t)||console.error(r)}},[r,t]),null},Cd=({contentRef:t,descriptionId:n})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Td("DialogDescriptionWarning").contentName}}.`;return e.useEffect(()=>{const e=t.current?.getAttribute("aria-describedby");if(n&&e){document.getElementById(n)||console.warn(r)}},[r,t,n]),null},Od=ed,Nd=id,kd=sd,Md=ud,Id=gd,Rd=yd;function Dd(t){return e.createElement(Od,Object.assign({"data-slot":"dialog"},t))}function Ad(t){var n=S(t,[]);return e.createElement(Nd,Object.assign({"data-slot":"dialog-portal"},n))}function zd(t){var{className:n}=t,r=S(t,["className"]);return e.createElement(kd,Object.assign({"data-slot":"dialog-overlay",className:Be("fixed inset-0 z-50 bg-black/50",n)},r))}function Ld(t){var{className:n,children:r,showCloseButton:o=!0,container:i}=t,a=S(t,["className","children","showCloseButton","container"]);return e.createElement(Ad,{"data-slot":"dialog-portal",container:i},e.createElement(zd,null),e.createElement(Md,Object.assign({"data-slot":"dialog-content",style:{left:"50%",top:"50%",transform:"translate(-50%, -50%)",outline:"none"},className:Be("fixed","z-50 grid w-full max-w-lg sm:mx-0 gap-4 p-6",n)},a),r,o&&e.createElement(Rd,{"data-slot":"dialog-close",style:{right:"calc(var(--spacing) * 4)",top:"calc(var(--spacing) * 4)",outline:"none"},className:Be("absolute right-4 top-4 rounded opacity-70 transition-opacity","hover:opacity-100 focus:outline-none","focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-background","disabled:pointer-events-none"),"aria-label":"Close"},e.createElement(ht,{className:"h-4 w-4 pointer-events-none shrink-0",style:{height:"calc(var(--spacing) * 4)",width:"calc(var(--spacing) * 4)"}}))))}function _d(t){var{className:n}=t,r=S(t,["className"]);return e.createElement("div",Object.assign({"data-slot":"dialog-header",className:Be("flex flex-col gap-2 text-left",n)},r))}function jd(t){var{className:n}=t,r=S(t,["className"]);return e.createElement(Id,Object.assign({"data-slot":"dialog-title",className:Be("text-lg leading-none font-semibold",n)},r))}function Fd({title:e,children:n,contentClassName:r,hideCloseButton:o=!1,portalContainer:i,description:a}){const{open:s,setOpen:l}=ac();return t.createElement(Dd,{open:s,onOpenChange:l},t.createElement(Ld,{container:i,className:r,showCloseButton:!o},t.createElement(_d,null,t.createElement(jd,null,e||""),t.createElement(bd,{style:{color:"#5e5e5e",fontSize:"12.5px"}},a||"")),n))}const Wd=({products:e,contentId:n})=>{const r=ec().width<430||zi.isMobile;return t.createElement("div",{onWheel:e=>e.stopPropagation(),onTouchMove:e=>e.stopPropagation(),className:"grid gap-2 "+(r?"grid-cols-1":"grid-cols-2"),style:{fontSize:13}},e.map(r=>t.createElement(sc,{key:r.productId,product:r,hideMoreBadge:!0,productLength:e.length,contentId:n})))},$d=({widgetPlayerOption:e,setCollectionUuid:n,portalContainer:o})=>{const{player:i}=e,[s,l]=a(null),{collection:c}=Ei(),{isPreview:d}=bi(),{onSlideChange:u,onCollectionClose:p}=xi(s,l),{setOpen:f,open:m}=ac();r(()=>{m||(s&&(p(),l(null)),h&&g(null))},[m]);const[h,g]=a();return t.createElement(t.Fragment,null,c&&t.createElement(dc,Object.assign({collection:c},e,{onThumbnailClick:e=>T(void 0,void 0,void 0,function*(){if(i===je.POPUP){const t=Ge(),r=Ge();if(n(r),l(Object.assign(Object.assign({},c.contents.find(t=>t.shortsId===e)),{uuid:t})),f(!0),d)return;yield Promise.all([ii({contentId:c.colId,uuid:r,type:ti.COLLECTION,userId:c.userId,isFirstPlay:!Ye(c.colId)}),ii({contentId:e,uuid:t,type:ti.SHORTS,userId:c.userId,isFirstPlay:!Ye(e)})])}else{const t=(e=>{switch(e){case je.HORIZONTAL:return We.HORIZONTAL;case je.VERTICAL:return We.VERTICAL;case je.GRID:return We.PRODUCTS;case je.TABLET:return We.TABLET;default:return We.PLATFORM}})(i);open(`${$e.PLAYER_BASE_URL}/collection/${c.colId}?start=${e}&layout=${t}`)}}),setSelectedProducts:g})),h&&t.createElement(Fd,{portalContainer:o,title:"상품 목록",contentClassName:"bg-white rounded p-4 product-dialog-container",description:"상품 정보를 확인해 보세요"},t.createElement(Wd,{products:h.productsInfo,contentId:h.shortsId})),c&&s&&t.createElement(Fd,{portalContainer:o,hideCloseButton:!0,contentClassName:"w-full max-w-none p-0 mx-0"},t.createElement(oc,{collection:c,initialShortsId:s.shortsId,onClosePlayer:()=>T(void 0,void 0,void 0,function*(){p(),f(!1)}),onSlideChange:u})))};var Bd,Hd={exports:{}},Vd={exports:{}},Ud={};var Gd,Yd,qd,Xd,Kd,Zd,Jd,Qd,eu,tu,nu,ru,ou,iu,au,su={};
28
28
  /** @license React v16.13.1
29
29
  * react-is.development.js
30
30
  *
@@ -32,9 +32,9 @@ var et={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24
32
32
  *
33
33
  * This source code is licensed under the MIT license found in the
34
34
  * LICENSE file in the root directory of this source tree.
35
- */function Qd(){return zd||(zd=1,"production"===process.env.NODE_ENV?_d.exports=function(){if(Rd)return Dd;Rd=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,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case l:case c:case r:case i:case o:case u:return e;default:switch(e=e&&e.$$typeof){case s:case d:case m:case f:case a:return e;default:return p}}case n:return p}}}function y(e){return w(e)===c}return Dd.AsyncMode=l,Dd.ConcurrentMode=c,Dd.ContextConsumer=s,Dd.ContextProvider=a,Dd.Element=t,Dd.ForwardRef=d,Dd.Fragment=r,Dd.Lazy=m,Dd.Memo=f,Dd.Portal=n,Dd.Profiler=i,Dd.StrictMode=o,Dd.Suspense=u,Dd.isAsyncMode=function(e){return y(e)||w(e)===l},Dd.isConcurrentMode=y,Dd.isContextConsumer=function(e){return w(e)===s},Dd.isContextProvider=function(e){return w(e)===a},Dd.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Dd.isForwardRef=function(e){return w(e)===d},Dd.isFragment=function(e){return w(e)===r},Dd.isLazy=function(e){return w(e)===m},Dd.isMemo=function(e){return w(e)===f},Dd.isPortal=function(e){return w(e)===n},Dd.isProfiler=function(e){return w(e)===i},Dd.isStrictMode=function(e){return w(e)===o},Dd.isSuspense=function(e){return w(e)===u},Dd.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===u||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===f||e.$$typeof===a||e.$$typeof===s||e.$$typeof===d||e.$$typeof===v||e.$$typeof===g||e.$$typeof===b||e.$$typeof===h)},Dd.typeOf=w,Dd}():_d.exports=(jd||(jd=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,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:var h=e.type;switch(h){case l:case c:case r:case i:case o:case u:return h;default:var v=h&&h.$$typeof;switch(v){case s:case d:case m:case f:case a:return v;default:return p}}case n:return p}}}var y=l,E=c,x=s,S=a,T=t,C=d,O=r,k=m,P=f,N=n,I=i,M=o,A=u,R=!1;function L(e){return w(e)===c}Jd.AsyncMode=y,Jd.ConcurrentMode=E,Jd.ContextConsumer=x,Jd.ContextProvider=S,Jd.Element=T,Jd.ForwardRef=C,Jd.Fragment=O,Jd.Lazy=k,Jd.Memo=P,Jd.Portal=N,Jd.Profiler=I,Jd.StrictMode=M,Jd.Suspense=A,Jd.isAsyncMode=function(e){return R||(R=!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.")),L(e)||w(e)===l},Jd.isConcurrentMode=L,Jd.isContextConsumer=function(e){return w(e)===s},Jd.isContextProvider=function(e){return w(e)===a},Jd.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Jd.isForwardRef=function(e){return w(e)===d},Jd.isFragment=function(e){return w(e)===r},Jd.isLazy=function(e){return w(e)===m},Jd.isMemo=function(e){return w(e)===f},Jd.isPortal=function(e){return w(e)===n},Jd.isProfiler=function(e){return w(e)===i},Jd.isStrictMode=function(e){return w(e)===o},Jd.isSuspense=function(e){return w(e)===u},Jd.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===u||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===f||e.$$typeof===a||e.$$typeof===s||e.$$typeof===d||e.$$typeof===v||e.$$typeof===g||e.$$typeof===b||e.$$typeof===h)},Jd.typeOf=w}()),Jd)),_d.exports}
35
+ */function lu(){return Yd||(Yd=1,"production"===process.env.NODE_ENV?Vd.exports=function(){if(Bd)return Ud;Bd=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,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=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 w(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case l:case c:case r:case i:case o:case u:return e;default:switch(e=e&&e.$$typeof){case s:case d:case m:case f:case a:return e;default:return p}}case n:return p}}}function y(e){return w(e)===c}return Ud.AsyncMode=l,Ud.ConcurrentMode=c,Ud.ContextConsumer=s,Ud.ContextProvider=a,Ud.Element=t,Ud.ForwardRef=d,Ud.Fragment=r,Ud.Lazy=m,Ud.Memo=f,Ud.Portal=n,Ud.Profiler=i,Ud.StrictMode=o,Ud.Suspense=u,Ud.isAsyncMode=function(e){return y(e)||w(e)===l},Ud.isConcurrentMode=y,Ud.isContextConsumer=function(e){return w(e)===s},Ud.isContextProvider=function(e){return w(e)===a},Ud.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Ud.isForwardRef=function(e){return w(e)===d},Ud.isFragment=function(e){return w(e)===r},Ud.isLazy=function(e){return w(e)===m},Ud.isMemo=function(e){return w(e)===f},Ud.isPortal=function(e){return w(e)===n},Ud.isProfiler=function(e){return w(e)===i},Ud.isStrictMode=function(e){return w(e)===o},Ud.isSuspense=function(e){return w(e)===u},Ud.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===u||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===f||e.$$typeof===a||e.$$typeof===s||e.$$typeof===d||e.$$typeof===g||e.$$typeof===v||e.$$typeof===b||e.$$typeof===h)},Ud.typeOf=w,Ud}():Vd.exports=(Gd||(Gd=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,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=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 w(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:var h=e.type;switch(h){case l:case c:case r:case i:case o:case u:return h;default:var g=h&&h.$$typeof;switch(g){case s:case d:case m:case f:case a:return g;default:return p}}case n:return p}}}var y=l,E=c,x=s,S=a,T=t,P=d,C=r,O=m,N=f,k=n,M=i,I=o,R=u,D=!1;function A(e){return w(e)===c}su.AsyncMode=y,su.ConcurrentMode=E,su.ContextConsumer=x,su.ContextProvider=S,su.Element=T,su.ForwardRef=P,su.Fragment=C,su.Lazy=O,su.Memo=N,su.Portal=k,su.Profiler=M,su.StrictMode=I,su.Suspense=R,su.isAsyncMode=function(e){return D||(D=!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.")),A(e)||w(e)===l},su.isConcurrentMode=A,su.isContextConsumer=function(e){return w(e)===s},su.isContextProvider=function(e){return w(e)===a},su.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},su.isForwardRef=function(e){return w(e)===d},su.isFragment=function(e){return w(e)===r},su.isLazy=function(e){return w(e)===m},su.isMemo=function(e){return w(e)===f},su.isPortal=function(e){return w(e)===n},su.isProfiler=function(e){return w(e)===i},su.isStrictMode=function(e){return w(e)===o},su.isSuspense=function(e){return w(e)===u},su.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===u||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===f||e.$$typeof===a||e.$$typeof===s||e.$$typeof===d||e.$$typeof===g||e.$$typeof===v||e.$$typeof===b||e.$$typeof===h)},su.typeOf=w}()),su)),Vd.exports}
36
36
  /*
37
37
  object-assign
38
38
  (c) Sindre Sorhus
39
39
  @license MIT
40
- */function eu(){if(Fd)return $d;Fd=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return $d=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 d=0;d<a.length;d++)n.call(i,a[d])&&(s[a[d]]=i[a[d]])}}return s},$d}function tu(){if(Vd)return Bd;Vd=1;return Bd="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function nu(){return Ud?Wd:(Ud=1,Wd=Function.call.bind(Object.prototype.hasOwnProperty))}function ru(){if(Hd)return Gd;Hd=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=tu(),n={},r=nu();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 d;try{if("function"!=typeof o[c]){var u=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 u.name="Invariant Violation",u}d=o[c](i,c,s,a,null,t)}catch(e){d=e}if(!d||d 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 d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var p=l?l():"";e("Failed "+a+" type: "+d.message+(null!=p?p:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},Gd=o}function ou(){if(Yd)return qd;Yd=1;var e=Qd(),t=eu(),n=tu(),r=nu(),o=ru(),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){}}),qd=function(s,l){var c="function"==typeof Symbol&&Symbol.iterator;var d="<<anonymous>>",u={array:h("array"),bigint:h("bigint"),bool:h("boolean"),func:h("function"),number:h("number"),object:h("object"),string:h("string"),symbol:h("symbol"),any:m(a),arrayOf:function(e){return m(function(t,r,o,i,a){if("function"!=typeof e)return new f("Property `"+a+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var s=t[r];if(!Array.isArray(s))return new f("Invalid "+i+" `"+a+"` of type `"+b(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:m(function(e,t,n,r,o){var i=e[t];return s(i)?null:new f("Invalid "+r+" `"+o+"` of type `"+b(i)+"` supplied to `"+n+"`, expected a single ReactElement.")}),elementType:m(function(t,n,r,o,i){var a=t[n];return e.isValidElementType(a)?null:new f("Invalid "+o+" `"+i+"` of type `"+b(a)+"` supplied to `"+r+"`, expected a single ReactElement type.")}),instanceOf:function(e){return m(function(t,n,r,o,i){if(!(t[n]instanceof e)){var a=e.name||d;return new f("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:m(function(e,t,n,r,o){return g(e[t])?null:new f("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")}),objectOf:function(e){return m(function(t,o,i,a,s){if("function"!=typeof e)return new f("Property `"+s+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var l=t[o],c=b(l);if("object"!==c)return new f("Invalid "+a+" `"+s+"` of type `"+c+"` supplied to `"+i+"`, expected an object.");for(var d in l)if(r(l,d)){var u=e(l,d,i,a,s+"."+d,n);if(u instanceof Error)return u}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 m(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 f("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 "+y(o)+" at index "+t+"."),a}return m(function(t,o,i,a,s){for(var l=[],c=0;c<e.length;c++){var d=(0,e[c])(t,o,i,a,s,n);if(null==d)return null;d.data&&r(d.data,"expectedType")&&l.push(d.data.expectedType)}return new f("Invalid "+a+" `"+s+"` supplied to `"+i+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")})},shape:function(e){return m(function(t,r,o,i,a){var s=t[r],l=b(s);if("object"!==l)return new f("Invalid "+i+" `"+a+"` of type `"+l+"` supplied to `"+o+"`, expected `object`.");for(var c in e){var d=e[c];if("function"!=typeof d)return v(o,i,a,c,w(d));var u=d(s,c,o,i,a+"."+c,n);if(u)return u}return null})},exact:function(e){return m(function(o,i,a,s,l){var c=o[i],d=b(c);if("object"!==d)return new f("Invalid "+s+" `"+l+"` of type `"+d+"` supplied to `"+a+"`, expected `object`.");var u=t({},o[i],e);for(var p in u){var m=e[p];if(r(e,p)&&"function"!=typeof m)return v(a,s,l,p,w(m));if(!m)return new f("Invalid "+s+" `"+l+"` key `"+p+"` supplied to `"+a+"`.\nBad object: "+JSON.stringify(o[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var h=m(c,p,a,s,l+"."+p,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 f(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function m(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,a,s,c,u,p,m){if(c=c||d,p=p||s,m!==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 v=c+":"+s;!t[v]&&r<3&&(i("You are manually calling a React.PropTypes validation function for the `"+p+"` 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[v]=!0,r++)}}return null==a[s]?o?null===a[s]?new f("The "+u+" `"+p+"` is marked as required in `"+c+"`, but its value is `null`."):new f("The "+u+" `"+p+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(a,s,c,u,p)}var a=o.bind(null,!1);return a.isRequired=o.bind(null,!0),a}function h(e){return m(function(t,n,r,o,i,a){var s=t[n];return b(s)!==e?new f("Invalid "+o+" `"+i+"` of type `"+w(s)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null})}function v(e,t,n,r,o){return new f((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function g(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(g);if(null===e||s(e))return!0;var t=function(e){var t=e&&(c&&e[c]||e["@@iterator"]);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(!g(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!g(o[1]))return!1}return!0;default:return!1}}function b(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=b(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function y(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 f.prototype=Error.prototype,u.checkPropTypes=o,u.resetWarningCache=o.resetWarningCache,u.PropTypes=u,u},qd}function iu(){if(Kd)return Xd;Kd=1;var e=tu();function t(){}function n(){}return n.resetWarningCache=t,Xd=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 au(){if(Zd)return Ld.exports;if(Zd=1,"production"!==process.env.NODE_ENV){var e=Qd();Ld.exports=ou()(e.isElement,true)}else Ld.exports=iu()();return Ld.exports}var su=wi(au()),lu="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function cu(e,t){return e(t={exports:{}},t.exports),t.exports}var du=cu(function(e){!function(t){var n=function(e,t,r){if(!l(t)||d(t)||u(t)||p(t)||s(t))return t;var o,i=0,a=0;if(c(t))for(o=[],a=t.length;i<a;i++)o.push(n(e,t[i],r));else for(var f in o={},t)Object.prototype.hasOwnProperty.call(t,f)&&(o[e(f,r)]=n(e,t[f],r));return o},r=function(e){return f(e)?e:(e=e.replace(/[\-_\s]+(.)?/g,function(e,t){return t?t.toUpperCase():""})).substr(0,1).toLowerCase()+e.substr(1)},o=function(e){var t=r(e);return t.substr(0,1).toUpperCase()+t.substr(1)},i=function(e,t){return function(e,t){var n=(t=t||{}).separator||"_",r=t.split||/(?=[A-Z])/;return e.split(r).join(n)}(e,t).toLowerCase()},a=Object.prototype.toString,s=function(e){return"function"==typeof e},l=function(e){return e===Object(e)},c=function(e){return"[object Array]"==a.call(e)},d=function(e){return"[object Date]"==a.call(e)},u=function(e){return"[object RegExp]"==a.call(e)},p=function(e){return"[object Boolean]"==a.call(e)},f=function(e){return(e-=0)==e},m=function(e,t){var n=t&&"process"in t?t.process:t;return"function"!=typeof n?e:function(t,r){return n(t,e,r)}},h={camelize:r,decamelize:i,pascalize:o,depascalize:i,camelizeKeys:function(e,t){return n(m(r,t),e)},decamelizeKeys:function(e,t){return n(m(i,t),e,t)},pascalizeKeys:function(e,t){return n(m(o,t),e)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=h:t.humps=h}(lu)}).decamelize,uu=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},pu=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return uu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?uu(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},fu=cu(function(e){function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}e.exports=t}),mu=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},hu=l(null);function vu(e){var n=e.children,r=void 0===n?"":n,o=mu(e,["children"]);return"string"!=typeof r&&(r=b(r)),t.createElement("template",fu({},o,{dangerouslySetInnerHTML:{__html:r}}))}function gu(e){var t=e.root,n=e.children;return g(void 0===n?null:n,t)}vu.propTypes={children:su.oneOfType([su.string,su.node])},gu.propTypes={root:su.object.isRequired,children:su.node};var bu=new Map;var wu=function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"core",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return e.children};return new Proxy(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{get:function(l,c){var d=du(c,{separator:"-"}),u="".concat(e,"-").concat(d);return bu.has(u)||bu.set(u,function(e){var i=o(function(o,i){var l,c,d=o.mode,u=void 0===d?"open":d,p=o.delegatesFocus,f=void 0!==p&&p,m=o.styleSheets,h=void 0===m?[]:m,v=o.ssr,g=void 0!==v&&v,b=o.children,w=mu(o,["mode","delegatesFocus","styleSheets","ssr","children"]),y=(c=n((l=i)&&l.current),r(function(){l&&(l.current=c.current)},[l]),c),E=a(null),x=pu(E,2),S=x[0],T=x[1],C="node_".concat(u).concat(f);return s(function(){if(y.current)try{if("function"==typeof i&&i(y.current),g){var e=y.current.shadowRoot;return void T(e)}var t=y.current.attachShadow({mode:u,delegatesFocus:f});h.length>0&&(t.adoptedStyleSheets=h),T(t)}catch(e){!function(e){var t=e.error,n=e.styleSheets,r=e.root;if("NotSupportedError"!==t.name)throw t;n.length>0&&(r.adoptedStyleSheets=n)}({error:e,styleSheets:h,root:S})}},[i,y,h]),t.createElement(t.Fragment,null,t.createElement(e.tag,fu({key:C,ref:y},w),(S||g)&&t.createElement(hu.Provider,{value:S},g?t.createElement(vu,{shadowroot:u,shadowrootmode:u},e.render({root:S,ssr:g,children:b})):t.createElement(gu,{root:S},e.render({root:S,ssr:g,children:b})))))});return i.propTypes={mode:su.oneOf(["open","closed"]),delegatesFocus:su.bool,styleSheets:su.arrayOf(su.instanceOf(globalThis.CSSStyleSheet)),ssr:su.bool,children:su.node},i}({tag:d,render:i})),bu.get(u)}})}();function yu(e){const[o,i]=t.useState(null),a=n(null),{open:s,setOpen:l}=Zl();return r(()=>{a.current&&(a.current.style.display=s?"block":"none")},[s]),t.useLayoutEffect(()=>{const t=document.createElement("div");t.style.position="fixed",t.style.inset="0",t.style.zIndex="214748348",t.style.display="none",document.body.appendChild(t),a.current=t;const n=t.attachShadow({mode:"open"}),r=document.createElement("link");r.rel="stylesheet",r.href=e.cssHref;const o=document.createElement("style");o.innerHTML="\n /* Dialog size override for small viewports */\n .product-dialog-container{ \n max-height: 70vh;\n overflow-y: auto;\n width: 100%;\n max-width: min(82vw, 500px) !important;\n }\n ",n.appendChild(o),n.appendChild(r);const s=document.createElement("div");return n.appendChild(s),i(s),()=>t.remove()},[]),{container:o,setOpen:l}}const Eu=e=>{const{collectionId:n,isPreview:o,priceText:i}=e,{setIsPreview:s,setPriceText:l}=pi();r(()=>{i&&l(i);const e=Boolean(o);e&&s(e)},[]);const{setCollection:c,collection:d,setNextKey:u}=fi();r(()=>{E(void 0,void 0,void 0,function*(){var e;const t=yield si({collectionId:n,size:10});if(!t)return;const{contents:r,count:o}=t;(null==r?void 0:r.length)&&u(null===(e=r.at(-1))||void 0===e?void 0:e.shortsId),c(Object.assign(Object.assign({},t),{count:o}))})},[n]);const p=function(e){var t,n,r,o,i,a,s,l,c;const d=null!==(t=e.iconForm)&&void 0!==t?t:Ae.INSTA,u={collectionId:e.collectionId,iconForm:d,iconShape:null!==(n=e.iconShape)&&void 0!==n?n:Re.MANY,iconSize:null!==(r=e.iconSize)&&void 0!==r?r:120,borderLine:null!==(o=e.borderLine)&&void 0!==o?o:Le.DAY,exposeTitle:null===(i=e.exposeTitle)||void 0===i||i,player:null!==(a=e.player)&&void 0!==a?a:_e.POPUP,rounded:null===(s=e.rounded)||void 0===s||s,titlePosition:null!==(l=e.titlePosition)&&void 0!==l?l:De.BOTTOM,exposeProductBanner:null!==(c=e.exposeProductBanner)&&void 0!==c&&c,priceText:e.priceText||"할인가"};return d===Ae.YOUTUBE?Object.assign(Object.assign({},u),{iconForm:Ae.YOUTUBE,iconRatio:e.iconRatio||"9/16"}):Object.assign(Object.assign({},u),{iconForm:Ae.INSTA})}(e),{containerRef:f}=function({collectionId:e,iconSize:n}){const{collection:r,setCollection:o,nextKey:i,setNextKey:a,isFetching:s,setIsFetching:l}=fi(),c=t.useRef(null),[d,u]=t.useState(0);return t.useEffect(()=>{if(!c.current)return;const e=new ResizeObserver(e=>{var t,n,r;const o=null!==(r=null===(n=null===(t=e[0])||void 0===t?void 0:t.contentRect)||void 0===n?void 0:n.width)&&void 0!==r?r:0;u(o)});return e.observe(c.current),()=>e.disconnect()},[]),t.useEffect(()=>{var e;if(!r||!r.contents)return;const t=Math.max(1,n+12),c=Math.ceil((d||0)/t)+4,u=null!==(e=r.count)&&void 0!==e?e:Number.MAX_SAFE_INTEGER,p=Math.min(u,c);if(r.contents.length>=p||s)return;let f=!1;return(()=>{E(this,void 0,void 0,function*(){var e,t,n,s,c;try{l(!0);let d=r,u=i||(null===(e=d.contents.at(-1))||void 0===e?void 0:e.shortsId)||void 0;const m=new Set(d.contents.map(e=>e.shortsId));for(;!f&&d.contents.length<p;){const e=Math.max(6,p-d.contents.length),r=yield si({collectionId:d.colId,nextKey:u,size:e});if(!r||!(null===(t=r.contents)||void 0===t?void 0:t.length))break;u=null!==(s=null===(n=r.contents.at(-1))||void 0===n?void 0:n.shortsId)&&void 0!==s?s:u;const i=r.contents.filter(e=>!m.has(e.shortsId));if(!i.length)break;if(i.forEach(e=>m.add(e.shortsId)),d=Object.assign(Object.assign({},d),{contents:[...d.contents,...i]}),o(d),a(u||""),d.contents.length>=(null!==(c=d.count)&&void 0!==c?c:Number.MAX_SAFE_INTEGER))break}}finally{l(!1)}})})(),()=>{f=!0}},[null==r?void 0:r.colId,null==r?void 0:r.count,null==r?void 0:r.contents.length,d,n,s,i,o,l,a]),{containerRef:c}}({collectionId:n,iconSize:p.iconSize}),[m,h]=a("");r(()=>{E(void 0,void 0,void 0,function*(){function e(e){return E(this,void 0,void 0,function*(){const t=yield fetch(e);if(!t.ok)throw new Error(String(t.status));return t.text()})}let t="";try{t=yield e("https://unpkg.com/@kinxcdn/commerce-player@latest/dist/styles.css")}catch(n){t=yield e("https://mbus-player-sy.s3.ap-northeast-2.amazonaws.com/styles.css")}h(t)}).catch(()=>console.error("Failed to load styles.css"))},[]);const{container:v}=yu({cssHref:"https://unpkg.com/@kinxcdn/commerce-player@latest/dist/styles.css"});return v&&m&&t.createElement(wu.div,null,t.createElement("style",null,m),t.createElement("div",{ref:f},t.createElement(Ad,{widgetPlayerOption:p,setCollectionUuid:e=>{c(Object.assign(Object.assign({},d),{uuid:e}))},portalContainer:v})))},xu=({portalContainer:e,aspectRatio:n})=>{var o;const{collection:i,setNextKey:s}=fi(),[l,c]=a(),{setOpen:d,open:u}=Zl();r(()=>{u||l&&c(null)},[u]);const p=(null!==(o=Gl().width)&&void 0!==o?o:0)<430||Oi.isMobile;return t.createElement(t.Fragment,null,t.createElement("div",{className:"grid gap-4",style:{gridTemplateColumns:`repeat(${p?2:5}, 1fr)`}},null==i?void 0:i.contents.map(e=>t.createElement("div",null,t.createElement("div",{className:"overflow-hidden",style:{borderRadius:"0.625rem",aspectRatio:null!=n?n:"9/16"}},t.createElement("video",{loop:!0,className:"w-full h-full object-cover",muted:!0,autoPlay:!0,playsInline:!0,src:Fe(e.media.objectId),poster:qe(e.thumbPath)})),t.createElement(Ql,{hideMoreBadge:!0,showMoreBtn:!0,products:e.productsInfo,contentId:e.shortsId,setSelectedProducts:c})))),l&&t.createElement(Id,{portalContainer:e,title:"상품 목록",contentClassName:"bg-white rounded p-4 product-dialog-container",description:"연결된 전체 상품 정보를 확인해 보세요"},t.createElement(Md,{products:l.productsInfo,contentId:l.shortsId})))},Su=e=>{const{collectionId:n,aspectRatio:o}=e,{setCollection:i,setNextKey:s}=fi();r(()=>{E(void 0,void 0,void 0,function*(){var e;const t=yield si({collectionId:n,size:-1});if(!t)return;const{contents:r,count:o}=t;(null==r?void 0:r.length)&&s(null===(e=r.at(-1))||void 0===e?void 0:e.shortsId),i(Object.assign(Object.assign({},t),{count:o}))})},[n]);const[l,c]=a("");r(()=>{E(void 0,void 0,void 0,function*(){function e(e){return E(this,void 0,void 0,function*(){const t=yield fetch(e);if(!t.ok)throw new Error(String(t.status));return t.text()})}let t="\n ";try{t+=(yield e("https://unpkg.com/@kinxcdn/commerce-player@latest/dist/styles.css"))}catch(n){t+=(yield e("https://mbus-player-sy.s3.ap-northeast-2.amazonaws.com/styles.css"))}c(t)}).catch(()=>console.error("Failed to load styles.css"))},[]);const{container:d}=yu({cssHref:"https://unpkg.com/@kinxcdn/commerce-player@latest/dist/styles.css"});return d&&l&&t.createElement(wu.div,null,t.createElement("style",null,l),t.createElement(xu,{portalContainer:d,aspectRatio:o}))};export{Su as CollectionShowcase,Ul as PreviewPlayer,Wl as ShoppingPlayer,Xe as ViewPlayer,Eu as WidgetPlayer};
40
+ */function cu(){if(Xd)return qd;Xd=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return qd=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 d=0;d<a.length;d++)n.call(i,a[d])&&(s[a[d]]=i[a[d]])}}return s},qd}function du(){if(Zd)return Kd;Zd=1;return Kd="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function uu(){return Qd?Jd:(Qd=1,Jd=Function.call.bind(Object.prototype.hasOwnProperty))}function pu(){if(tu)return eu;tu=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=du(),n={},r=uu();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 d;try{if("function"!=typeof o[c]){var u=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 u.name="Invariant Violation",u}d=o[c](i,c,s,a,null,t)}catch(e){d=e}if(!d||d 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 d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var p=l?l():"";e("Failed "+a+" type: "+d.message+(null!=p?p:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},eu=o}function fu(){if(ru)return nu;ru=1;var e=lu(),t=cu(),n=du(),r=uu(),o=pu(),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){}}),nu=function(s,l){var c="function"==typeof Symbol&&Symbol.iterator;var d="<<anonymous>>",u={array:h("array"),bigint:h("bigint"),bool:h("boolean"),func:h("function"),number:h("number"),object:h("object"),string:h("string"),symbol:h("symbol"),any:m(a),arrayOf:function(e){return m(function(t,r,o,i,a){if("function"!=typeof e)return new f("Property `"+a+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var s=t[r];if(!Array.isArray(s))return new f("Invalid "+i+" `"+a+"` of type `"+b(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:m(function(e,t,n,r,o){var i=e[t];return s(i)?null:new f("Invalid "+r+" `"+o+"` of type `"+b(i)+"` supplied to `"+n+"`, expected a single ReactElement.")}),elementType:m(function(t,n,r,o,i){var a=t[n];return e.isValidElementType(a)?null:new f("Invalid "+o+" `"+i+"` of type `"+b(a)+"` supplied to `"+r+"`, expected a single ReactElement type.")}),instanceOf:function(e){return m(function(t,n,r,o,i){if(!(t[n]instanceof e)){var a=e.name||d;return new f("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:m(function(e,t,n,r,o){return v(e[t])?null:new f("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")}),objectOf:function(e){return m(function(t,o,i,a,s){if("function"!=typeof e)return new f("Property `"+s+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var l=t[o],c=b(l);if("object"!==c)return new f("Invalid "+a+" `"+s+"` of type `"+c+"` supplied to `"+i+"`, expected an object.");for(var d in l)if(r(l,d)){var u=e(l,d,i,a,s+"."+d,n);if(u instanceof Error)return u}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 m(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 f("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 "+y(o)+" at index "+t+"."),a}return m(function(t,o,i,a,s){for(var l=[],c=0;c<e.length;c++){var d=(0,e[c])(t,o,i,a,s,n);if(null==d)return null;d.data&&r(d.data,"expectedType")&&l.push(d.data.expectedType)}return new f("Invalid "+a+" `"+s+"` supplied to `"+i+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")})},shape:function(e){return m(function(t,r,o,i,a){var s=t[r],l=b(s);if("object"!==l)return new f("Invalid "+i+" `"+a+"` of type `"+l+"` supplied to `"+o+"`, expected `object`.");for(var c in e){var d=e[c];if("function"!=typeof d)return g(o,i,a,c,w(d));var u=d(s,c,o,i,a+"."+c,n);if(u)return u}return null})},exact:function(e){return m(function(o,i,a,s,l){var c=o[i],d=b(c);if("object"!==d)return new f("Invalid "+s+" `"+l+"` of type `"+d+"` supplied to `"+a+"`, expected `object`.");var u=t({},o[i],e);for(var p in u){var m=e[p];if(r(e,p)&&"function"!=typeof m)return g(a,s,l,p,w(m));if(!m)return new f("Invalid "+s+" `"+l+"` key `"+p+"` supplied to `"+a+"`.\nBad object: "+JSON.stringify(o[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var h=m(c,p,a,s,l+"."+p,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 f(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function m(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,a,s,c,u,p,m){if(c=c||d,p=p||s,m!==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 `"+p+"` 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 f("The "+u+" `"+p+"` is marked as required in `"+c+"`, but its value is `null`."):new f("The "+u+" `"+p+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(a,s,c,u,p)}var a=o.bind(null,!1);return a.isRequired=o.bind(null,!0),a}function h(e){return m(function(t,n,r,o,i,a){var s=t[n];return b(s)!==e?new f("Invalid "+o+" `"+i+"` of type `"+w(s)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null})}function g(e,t,n,r,o){return new f((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function v(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(v);if(null===e||s(e))return!0;var t=function(e){var t=e&&(c&&e[c]||e["@@iterator"]);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(!v(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!v(o[1]))return!1}return!0;default:return!1}}function b(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=b(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function y(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 f.prototype=Error.prototype,u.checkPropTypes=o,u.resetWarningCache=o.resetWarningCache,u.PropTypes=u,u},nu}function mu(){if(iu)return ou;iu=1;var e=du();function t(){}function n(){}return n.resetWarningCache=t,ou=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 hu(){if(au)return Hd.exports;if(au=1,"production"!==process.env.NODE_ENV){var e=lu();Hd.exports=fu()(e.isElement,true)}else Hd.exports=mu()();return Hd.exports}var gu=Oi(hu()),vu="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function bu(e,t){return e(t={exports:{}},t.exports),t.exports}var wu=bu(function(e){!function(t){var n=function(e,t,r){if(!l(t)||d(t)||u(t)||p(t)||s(t))return t;var o,i=0,a=0;if(c(t))for(o=[],a=t.length;i<a;i++)o.push(n(e,t[i],r));else for(var f in o={},t)Object.prototype.hasOwnProperty.call(t,f)&&(o[e(f,r)]=n(e,t[f],r));return o},r=function(e){return f(e)?e:(e=e.replace(/[\-_\s]+(.)?/g,function(e,t){return t?t.toUpperCase():""})).substr(0,1).toLowerCase()+e.substr(1)},o=function(e){var t=r(e);return t.substr(0,1).toUpperCase()+t.substr(1)},i=function(e,t){return function(e,t){var n=(t=t||{}).separator||"_",r=t.split||/(?=[A-Z])/;return e.split(r).join(n)}(e,t).toLowerCase()},a=Object.prototype.toString,s=function(e){return"function"==typeof e},l=function(e){return e===Object(e)},c=function(e){return"[object Array]"==a.call(e)},d=function(e){return"[object Date]"==a.call(e)},u=function(e){return"[object RegExp]"==a.call(e)},p=function(e){return"[object Boolean]"==a.call(e)},f=function(e){return(e-=0)==e},m=function(e,t){var n=t&&"process"in t?t.process:t;return"function"!=typeof n?e:function(t,r){return n(t,e,r)}},h={camelize:r,decamelize:i,pascalize:o,depascalize:i,camelizeKeys:function(e,t){return n(m(r,t),e)},decamelizeKeys:function(e,t){return n(m(i,t),e,t)},pascalizeKeys:function(e,t){return n(m(o,t),e)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=h:t.humps=h}(vu)}).decamelize,yu=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},Eu=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return yu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yu(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},xu=bu(function(e){function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}e.exports=t}),Su=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},Tu=l(null);function Pu(e){var n=e.children,r=void 0===n?"":n,o=Su(e,["children"]);return"string"!=typeof r&&(r=E(r)),t.createElement("template",xu({},o,{dangerouslySetInnerHTML:{__html:r}}))}function Cu(e){var t=e.root,n=e.children;return w(void 0===n?null:n,t)}Pu.propTypes={children:gu.oneOfType([gu.string,gu.node])},Cu.propTypes={root:gu.object.isRequired,children:gu.node};var Ou=new Map;var Nu=function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"core",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return e.children};return new Proxy(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{get:function(l,c){var d=wu(c,{separator:"-"}),u="".concat(e,"-").concat(d);return Ou.has(u)||Ou.set(u,function(e){var i=o(function(o,i){var l,c,d=o.mode,u=void 0===d?"open":d,p=o.delegatesFocus,f=void 0!==p&&p,m=o.styleSheets,h=void 0===m?[]:m,g=o.ssr,v=void 0!==g&&g,b=o.children,w=Su(o,["mode","delegatesFocus","styleSheets","ssr","children"]),y=(c=n((l=i)&&l.current),r(function(){l&&(l.current=c.current)},[l]),c),E=a(null),x=Eu(E,2),S=x[0],T=x[1],P="node_".concat(u).concat(f);return s(function(){if(y.current)try{if("function"==typeof i&&i(y.current),v){var e=y.current.shadowRoot;return void T(e)}var t=y.current.attachShadow({mode:u,delegatesFocus:f});h.length>0&&(t.adoptedStyleSheets=h),T(t)}catch(e){!function(e){var t=e.error,n=e.styleSheets,r=e.root;if("NotSupportedError"!==t.name)throw t;n.length>0&&(r.adoptedStyleSheets=n)}({error:e,styleSheets:h,root:S})}},[i,y,h]),t.createElement(t.Fragment,null,t.createElement(e.tag,xu({key:P,ref:y},w),(S||v)&&t.createElement(Tu.Provider,{value:S},v?t.createElement(Pu,{shadowroot:u,shadowrootmode:u},e.render({root:S,ssr:v,children:b})):t.createElement(Cu,{root:S},e.render({root:S,ssr:v,children:b})))))});return i.propTypes={mode:gu.oneOf(["open","closed"]),delegatesFocus:gu.bool,styleSheets:gu.arrayOf(gu.instanceOf(globalThis.CSSStyleSheet)),ssr:gu.bool,children:gu.node},i}({tag:d,render:i})),Ou.get(u)}})}();function ku(e){const[o,i]=t.useState(null),a=n(null),{open:s,setOpen:l}=ac();return r(()=>{a.current&&(a.current.style.display=s?"block":"none")},[s]),t.useLayoutEffect(()=>{const t=document.createElement("div");t.style.position="fixed",t.style.inset="0",t.style.zIndex="214748348",t.style.display="none",document.body.appendChild(t),a.current=t;const n=t.attachShadow({mode:"open"}),r=document.createElement("link");r.rel="stylesheet",r.href=e.cssHref;const o=document.createElement("style");o.innerHTML="\n /* Dialog size override for small viewports */\n .product-dialog-container{ \n max-height: 70vh;\n overflow-y: auto;\n width: 100%;\n max-width: min(82vw, 500px) !important;\n }\n ",n.appendChild(o),n.appendChild(r);const s=document.createElement("div");return n.appendChild(s),i(s),()=>t.remove()},[]),{container:o,setOpen:l}}const Mu=e=>{const{collectionId:n,isPreview:o,priceText:i,container:a,cssText:s}=e,{setIsPreview:l,setPriceText:c}=bi(),{setCollection:d,setNextKey:u,collection:p}=Ei();r(()=>{i&&c(i);const e=Boolean(o);e&&l(e)},[]),r(()=>{T(void 0,void 0,void 0,function*(){var e;const t=yield di({collectionId:n,size:10});if(!t)return;const{contents:r,count:o}=t;(null==r?void 0:r.length)&&u(null===(e=r.at(-1))||void 0===e?void 0:e.shortsId),d(Object.assign(Object.assign({},t),{count:o}))})},[n]);const f=function(e){var t,n,r,o,i,a,s,l,c;const d=null!==(t=e.iconForm)&&void 0!==t?t:ze.INSTA,u={collectionId:e.collectionId,iconForm:d,iconShape:null!==(n=e.iconShape)&&void 0!==n?n:Le.MANY,iconSize:null!==(r=e.iconSize)&&void 0!==r?r:120,borderLine:null!==(o=e.borderLine)&&void 0!==o?o:_e.DAY,exposeTitle:null===(i=e.exposeTitle)||void 0===i||i,player:null!==(a=e.player)&&void 0!==a?a:je.POPUP,rounded:null===(s=e.rounded)||void 0===s||s,titlePosition:null!==(l=e.titlePosition)&&void 0!==l?l:Fe.BOTTOM,exposeProductBanner:null!==(c=e.exposeProductBanner)&&void 0!==c&&c,priceText:e.priceText||"할인가"};return d===ze.YOUTUBE?Object.assign(Object.assign({},u),{iconForm:ze.YOUTUBE,iconRatio:e.iconRatio||"9/16"}):Object.assign(Object.assign({},u),{iconForm:ze.INSTA})}(e),{containerRef:m}=function({collectionId:e,iconSize:n}){const{collection:r,setCollection:o,nextKey:i,setNextKey:a,isFetching:s,setIsFetching:l}=Ei(),c=t.useRef(null),[d,u]=t.useState(0);return t.useEffect(()=>{if(!c.current)return;const e=new ResizeObserver(e=>{var t,n,r;const o=null!==(r=null===(n=null===(t=e[0])||void 0===t?void 0:t.contentRect)||void 0===n?void 0:n.width)&&void 0!==r?r:0;u(o)});return e.observe(c.current),()=>e.disconnect()},[]),t.useEffect(()=>{var e;if(!r||!r.contents)return;const t=Math.max(1,n+12),c=Math.ceil((d||0)/t)+4,u=null!==(e=r.count)&&void 0!==e?e:Number.MAX_SAFE_INTEGER,p=Math.min(u,c);if(r.contents.length>=p||s)return;let f=!1;return(()=>{T(this,void 0,void 0,function*(){var e,t,n,s,c;try{l(!0);let d=r,u=i||(null===(e=d.contents.at(-1))||void 0===e?void 0:e.shortsId)||void 0;const m=new Set(d.contents.map(e=>e.shortsId));for(;!f&&d.contents.length<p;){const e=Math.max(6,p-d.contents.length),r=yield di({collectionId:d.colId,nextKey:u,size:e});if(!r||!(null===(t=r.contents)||void 0===t?void 0:t.length))break;u=null!==(s=null===(n=r.contents.at(-1))||void 0===n?void 0:n.shortsId)&&void 0!==s?s:u;const i=r.contents.filter(e=>!m.has(e.shortsId));if(!i.length)break;if(i.forEach(e=>m.add(e.shortsId)),d=Object.assign(Object.assign({},d),{contents:[...d.contents,...i]}),o(d),a(u||""),d.contents.length>=(null!==(c=d.count)&&void 0!==c?c:Number.MAX_SAFE_INTEGER))break}}finally{l(!1)}})})(),()=>{f=!0}},[null==r?void 0:r.colId,null==r?void 0:r.count,null==r?void 0:r.contents.length,d,n,s,i,o,l,a]),{containerRef:c}}({collectionId:n,iconSize:f.iconSize});return t.createElement(Nu.div,null,t.createElement("style",null,s),t.createElement("div",{ref:m},t.createElement($d,{widgetPlayerOption:f,setCollectionUuid:e=>{d(Object.assign(Object.assign({},p),{uuid:e}))},portalContainer:a})))},Iu=e=>{const[n,o]=a("");r(()=>{T(void 0,void 0,void 0,function*(){function e(e){return T(this,void 0,void 0,function*(){const t=yield fetch(e);if(!t.ok)throw new Error(String(t.status));return t.text()})}let t="";try{t=yield e("https://unpkg.com/@kinxcdn/commerce-player@latest/dist/styles.css")}catch(n){t=yield e("https://mbus-player-sy.s3.ap-northeast-2.amazonaws.com/styles.css")}o(t)}).catch(()=>console.error("Failed to load styles.css"))},[]);const{container:i}=ku({cssHref:"https://unpkg.com/@kinxcdn/commerce-player@latest/dist/styles.css"});return i&&n?t.createElement(yi,null,t.createElement(Mu,Object.assign({},e,{container:i,cssText:n}))):null},Ru=({portalContainer:e,aspectRatio:n})=>{var o;const{collection:i,setNextKey:s}=Ei(),[l,c]=a(),{setOpen:d,open:u}=ac();r(()=>{u||l&&c(null)},[u]);const p=(null!==(o=ec().width)&&void 0!==o?o:0)<430||zi.isMobile;return t.createElement(t.Fragment,null,t.createElement("div",{className:"grid gap-4",style:{gridTemplateColumns:`repeat(${p?2:5}, 1fr)`}},null==i?void 0:i.contents.map(e=>t.createElement("div",null,t.createElement("div",{className:"overflow-hidden",style:{borderRadius:"0.625rem",aspectRatio:null!=n?n:"9/16"}},t.createElement("video",{loop:!0,className:"w-full h-full object-cover",muted:!0,autoPlay:!0,playsInline:!0,src:He(e.media.objectId),poster:Xe(e.thumbPath)})),t.createElement(lc,{hideMoreBadge:!0,showMoreBtn:!0,products:e.productsInfo,contentId:e.shortsId,setSelectedProducts:c})))),l&&t.createElement(Fd,{portalContainer:e,title:"상품 목록",contentClassName:"bg-white rounded p-4 product-dialog-container",description:"연결된 전체 상품 정보를 확인해 보세요"},t.createElement(Wd,{products:l.productsInfo,contentId:l.shortsId})))},Du=({collectionId:e,aspectRatio:n,container:o,cssText:i})=>{const{setCollection:a,setNextKey:s}=Ei();return r(()=>{T(void 0,void 0,void 0,function*(){var t;const n=yield di({collectionId:e,size:-1});if(!n)return;const{contents:r,count:o}=n;(null==r?void 0:r.length)&&s(null===(t=r.at(-1))||void 0===t?void 0:t.shortsId),a(Object.assign(Object.assign({},n),{count:o}))})},[e]),t.createElement(Nu.div,null,t.createElement("style",null,i),t.createElement(Ru,{portalContainer:o,aspectRatio:n}))},Au=e=>{const[n,o]=a("");r(()=>{T(void 0,void 0,void 0,function*(){function e(e){return T(this,void 0,void 0,function*(){const t=yield fetch(e);if(!t.ok)throw new Error(String(t.status));return t.text()})}let t="";try{t+=(yield e("https://unpkg.com/@kinxcdn/commerce-player@latest/dist/styles.css"))}catch(n){t+=(yield e("https://mbus-player-sy.s3.ap-northeast-2.amazonaws.com/styles.css"))}o(t)}).catch(()=>console.error("Failed to load styles.css"))},[]);const{container:i}=ku({cssHref:"https://unpkg.com/@kinxcdn/commerce-player@latest/dist/styles.css"});return i&&n?t.createElement(yi,null,t.createElement(Du,Object.assign({},e,{container:i,cssText:n}))):null},zu=vi(e=>({shortform:null,setShortform:t=>e({shortform:t})}));var Lu={exports:{}},_u={};function ju(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=ju(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Fu(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=ju(e))&&(r&&(r+=" "),r+=t);return r}var Wu,$u=Ni(Object.freeze({__proto__:null,clsx:Fu,default:Fu})),Bu={},Hu={};function Vu(){if(Wu)return Hu;return Wu=1,Object.defineProperty(Hu,"__esModule",{value:!0}),Hu.dontSetMe=function(e,t,n){if(e[t])return new Error("Invalid prop ".concat(t," passed to ").concat(n," - do not set this, set it on the child."))},Hu.findInArray=function(e,t){for(let n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]},Hu.int=function(e){return parseInt(e,10)},Hu.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},Hu.isNum=function(e){return"number"==typeof e&&!isNaN(e)},Hu}var Uu,Gu,Yu={};function qu(){if(Gu)return Bu;Gu=1,Object.defineProperty(Bu,"__esModule",{value:!0}),Bu.addClassName=a,Bu.addEvent=function(e,t,n,r){if(!e)return;const o={capture:!0,...r};e.addEventListener?e.addEventListener(t,n,o):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},Bu.addUserSelectStyles=function(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&a(e.body,"react-draggable-transparent-selection")},Bu.createCSSTransform=function(e,n){const r=i(e,n,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:r}},Bu.createSVGTransform=function(e,t){return i(e,t,"")},Bu.getTouch=function(t,n){return t.targetTouches&&(0,e.findInArray)(t.targetTouches,e=>n===e.identifier)||t.changedTouches&&(0,e.findInArray)(t.changedTouches,e=>n===e.identifier)},Bu.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},Bu.getTranslation=i,Bu.innerHeight=function(t){let n=t.clientHeight;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(r.paddingTop),n-=(0,e.int)(r.paddingBottom),n},Bu.innerWidth=function(t){let n=t.clientWidth;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(r.paddingLeft),n-=(0,e.int)(r.paddingRight),n},Bu.matchesSelector=o,Bu.matchesSelectorAndParentsTo=function(e,t,n){let r=e;do{if(o(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1},Bu.offsetXYFromParent=function(e,t,n){const r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),o=(e.clientX+t.scrollLeft-r.left)/n,i=(e.clientY+t.scrollTop-r.top)/n;return{x:o,y:i}},Bu.outerHeight=function(t){let n=t.clientHeight;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(r.borderTopWidth),n+=(0,e.int)(r.borderBottomWidth),n},Bu.outerWidth=function(t){let n=t.clientWidth;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(r.borderLeftWidth),n+=(0,e.int)(r.borderRightWidth),n},Bu.removeClassName=s,Bu.removeEvent=function(e,t,n,r){if(!e)return;const o={capture:!0,...r};e.removeEventListener?e.removeEventListener(t,n,o):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},Bu.removeUserSelectStyles=function(e){if(!e)return;try{if(e.body&&s(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(e){}};var e=Vu(),t=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=n(t);if(r&&r.has(e))return r.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(o,a,s):o[a]=e[a]}o.default=e,r&&r.set(e,o);return o}(function(){if(Uu)return Yu;Uu=1,Object.defineProperty(Yu,"__esModule",{value:!0}),Yu.browserPrefixToKey=n,Yu.browserPrefixToStyle=function(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e},Yu.default=void 0,Yu.getPrefix=t;const e=["Moz","Webkit","O","ms"];function t(){var t;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";const o=null===(t=window.document)||void 0===t||null===(t=t.documentElement)||void 0===t?void 0:t.style;if(!o)return"";if(r in o)return"";for(let t=0;t<e.length;t++)if(n(r,e[t])in o)return e[t];return""}function n(e,t){return t?"".concat(t).concat(function(e){let t="",n=!0;for(let r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):"-"===e[r]?n=!0:t+=e[r];return t}(e)):e}return Yu.default=t(),Yu}());function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(n=function(e){return e?r:t})(e)}let r="";function o(t,n){return r||(r=(0,e.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(n){return(0,e.isFunction)(t[n])})),!!(0,e.isFunction)(t[r])&&t[r](n)}function i(e,t,n){let{x:r,y:o}=e,i="translate(".concat(r).concat(n,",").concat(o).concat(n,")");if(t){const e="".concat("string"==typeof t.x?t.x:t.x+n),r="".concat("string"==typeof t.y?t.y:t.y+n);i="translate(".concat(e,", ").concat(r,")")+i}return i}function a(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)")))||(e.className+=" ".concat(t))}function s(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)"),"g"),"")}return Bu}var Xu,Ku={};function Zu(){if(Xu)return Ku;Xu=1,Object.defineProperty(Ku,"__esModule",{value:!0}),Ku.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},Ku.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},Ku.createCoreData=function(t,r,o){const i=!(0,e.isNum)(t.lastX),a=n(t);return i?{node:a,deltaX:0,deltaY:0,lastX:r,lastY:o,x:r,y:o}:{node:a,deltaX:r-t.lastX,deltaY:o-t.lastY,lastX:t.lastX,lastY:t.lastY,x:r,y:o}},Ku.createDraggableData=function(e,t){const n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}},Ku.getBoundPosition=function(r,o,i){if(!r.props.bounds)return[o,i];let{bounds:a}=r.props;a="string"==typeof a?a:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(a);const s=n(r);if("string"==typeof a){const{ownerDocument:n}=s,r=n.defaultView;let o;if(o="parent"===a?s.parentNode:n.querySelector(a),!(o instanceof r.HTMLElement))throw new Error('Bounds selector "'+a+'" could not find an element.');const i=o,l=r.getComputedStyle(s),c=r.getComputedStyle(i);a={left:-s.offsetLeft+(0,e.int)(c.paddingLeft)+(0,e.int)(l.marginLeft),top:-s.offsetTop+(0,e.int)(c.paddingTop)+(0,e.int)(l.marginTop),right:(0,t.innerWidth)(i)-(0,t.outerWidth)(s)-s.offsetLeft+(0,e.int)(c.paddingRight)-(0,e.int)(l.marginRight),bottom:(0,t.innerHeight)(i)-(0,t.outerHeight)(s)-s.offsetTop+(0,e.int)(c.paddingBottom)-(0,e.int)(l.marginBottom)}}(0,e.isNum)(a.right)&&(o=Math.min(o,a.right));(0,e.isNum)(a.bottom)&&(i=Math.min(i,a.bottom));(0,e.isNum)(a.left)&&(o=Math.max(o,a.left));(0,e.isNum)(a.top)&&(i=Math.max(i,a.top));return[o,i]},Ku.getControlPosition=function(e,r,o){const i="number"==typeof r?(0,t.getTouch)(e,r):null;if("number"==typeof r&&!i)return null;const a=n(o),s=o.props.offsetParent||a.offsetParent||a.ownerDocument.body;return(0,t.offsetXYFromParent)(i||e,s,o.props.scale)},Ku.snapToGrid=function(e,t,n){const r=Math.round(t/e[0])*e[0],o=Math.round(n/e[1])*e[1];return[r,o]};var e=Vu(),t=qu();function n(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}return Ku}var Ju,Qu,ep,tp,np={},rp={};function op(){if(Ju)return rp;return Ju=1,Object.defineProperty(rp,"__esModule",{value:!0}),rp.default=function(){},rp}function ip(){if(Qu)return np;Qu=1,Object.defineProperty(np,"__esModule",{value:!0}),np.default=void 0;var e=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(t),n=l(hu()),r=l(b),o=qu(),i=Zu(),a=Vu(),s=l(op());function l(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function d(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const u={start:"touchstart",move:"touchmove",stop:"touchend"},p={start:"mousedown",move:"mousemove",stop:"mouseup"};let f=p,m=class extends e.Component{constructor(){super(...arguments),d(this,"dragging",!1),d(this,"lastX",NaN),d(this,"lastY",NaN),d(this,"touchIdentifier",null),d(this,"mounted",!1),d(this,"handleDragStart",e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!(0,o.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,o.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;"touchstart"===e.type&&e.preventDefault();const r=(0,o.getTouchIdentifier)(e);this.touchIdentifier=r;const a=(0,i.getControlPosition)(e,r,this);if(null==a)return;const{x:l,y:c}=a,d=(0,i.createCoreData)(this,l,c);(0,s.default)("DraggableCore: handleDragStart: %j",d),(0,s.default)("calling",this.props.onStart);!1!==this.props.onStart(e,d)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,o.addUserSelectStyles)(n),this.dragging=!0,this.lastX=l,this.lastY=c,(0,o.addEvent)(n,f.move,this.handleDrag),(0,o.addEvent)(n,f.stop,this.handleDragStop))}),d(this,"handleDrag",e=>{const t=(0,i.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=r-this.lastY;if([e,t]=(0,i.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}const o=(0,i.createCoreData)(this,n,r);(0,s.default)("DraggableCore: handleDrag: %j",o);if(!1!==this.props.onDrag(e,o)&&!1!==this.mounted)this.lastX=n,this.lastY=r;else try{this.handleDragStop(new MouseEvent("mouseup"))}catch(e){const t=document.createEvent("MouseEvents");t.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(t)}}),d(this,"handleDragStop",e=>{if(!this.dragging)return;const t=(0,i.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=r-this.lastY||0;[e,t]=(0,i.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}const a=(0,i.createCoreData)(this,n,r);if(!1===this.props.onStop(e,a)||!1===this.mounted)return!1;const l=this.findDOMNode();l&&this.props.enableUserSelectHack&&(0,o.removeUserSelectStyles)(l.ownerDocument),(0,s.default)("DraggableCore: handleDragStop: %j",a),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,l&&((0,s.default)("DraggableCore: Removing handlers"),(0,o.removeEvent)(l.ownerDocument,f.move,this.handleDrag),(0,o.removeEvent)(l.ownerDocument,f.stop,this.handleDragStop))}),d(this,"onMouseDown",e=>(f=p,this.handleDragStart(e))),d(this,"onMouseUp",e=>(f=p,this.handleDragStop(e))),d(this,"onTouchStart",e=>(f=u,this.handleDragStart(e))),d(this,"onTouchEnd",e=>(f=u,this.handleDragStop(e)))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,o.addEvent)(e,u.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,o.removeEvent)(t,p.move,this.handleDrag),(0,o.removeEvent)(t,u.move,this.handleDrag),(0,o.removeEvent)(t,p.stop,this.handleDragStop),(0,o.removeEvent)(t,u.stop,this.handleDragStop),(0,o.removeEvent)(e,u.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,o.removeUserSelectStyles)(t)}}findDOMNode(){var e,t;return null!==(e=this.props)&&void 0!==e&&e.nodeRef?null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current:r.default.findDOMNode(this)}render(){return e.cloneElement(e.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};return np.default=m,d(m,"displayName","DraggableCore"),d(m,"propTypes",{allowAnyClick:n.default.bool,children:n.default.node.isRequired,disabled:n.default.bool,enableUserSelectHack:n.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:n.default.arrayOf(n.default.number),handle:n.default.string,cancel:n.default.string,nodeRef:n.default.object,onStart:n.default.func,onDrag:n.default.func,onStop:n.default.func,onMouseDown:n.default.func,scale:n.default.number,className:a.dontSetMe,style:a.dontSetMe,transform:a.dontSetMe}),d(m,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),np}function ap(){return ep||(ep=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return c.default}}),e.default=void 0;var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(t),r=u(hu()),o=u(b),i=u($u),a=qu(),s=Zu(),l=Vu(),c=u(ip()),d=u(op());function u(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f.apply(this,arguments)}function m(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class h extends n.Component{static getDerivedStateFromProps(e,t){let{position:n}=e,{prevPropsPosition:r}=t;return!n||r&&n.x===r.x&&n.y===r.y?null:((0,d.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:{...n}})}constructor(e){super(e),m(this,"onDragStart",(e,t)=>{(0,d.default)("Draggable: onDragStart: %j",t);if(!1===this.props.onStart(e,(0,s.createDraggableData)(this,t)))return!1;this.setState({dragging:!0,dragged:!0})}),m(this,"onDrag",(e,t)=>{if(!this.state.dragging)return!1;(0,d.default)("Draggable: onDrag: %j",t);const n=(0,s.createDraggableData)(this,t),r={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){const{x:e,y:t}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;const[o,i]=(0,s.getBoundPosition)(this,r.x,r.y);r.x=o,r.y=i,r.slackX=this.state.slackX+(e-r.x),r.slackY=this.state.slackY+(t-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-this.state.x,n.deltaY=r.y-this.state.y}if(!1===this.props.onDrag(e,n))return!1;this.setState(r)}),m(this,"onDragStop",(e,t)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(e,(0,s.createDraggableData)(this,t)))return!1;(0,d.default)("Draggable: onDragStop: %j",t);const n={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)}),this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var e,t;return null!==(e=null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current)&&void 0!==e?e:o.default.findDOMNode(this)}render(){const{axis:e,bounds:t,children:r,defaultPosition:o,defaultClassName:l,defaultClassNameDragging:d,defaultClassNameDragged:u,position:p,positionOffset:m,scale:h,...g}=this.props;let v={},b=null;const w=!Boolean(p)||this.state.dragging,y=p||o,E={x:(0,s.canDragX)(this)&&w?this.state.x:y.x,y:(0,s.canDragY)(this)&&w?this.state.y:y.y};this.state.isElementSVG?b=(0,a.createSVGTransform)(E,m):v=(0,a.createCSSTransform)(E,m);const x=(0,i.default)(r.props.className||"",l,{[d]:this.state.dragging,[u]:this.state.dragged});return n.createElement(c.default,f({},g,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),n.cloneElement(n.Children.only(r),{className:x,style:{...r.props.style,...v},transform:b}))}}e.default=h,m(h,"displayName","Draggable"),m(h,"propTypes",{...c.default.propTypes,axis:r.default.oneOf(["both","x","y","none"]),bounds:r.default.oneOfType([r.default.shape({left:r.default.number,right:r.default.number,top:r.default.number,bottom:r.default.number}),r.default.string,r.default.oneOf([!1])]),defaultClassName:r.default.string,defaultClassNameDragging:r.default.string,defaultClassNameDragged:r.default.string,defaultPosition:r.default.shape({x:r.default.number,y:r.default.number}),positionOffset:r.default.shape({x:r.default.oneOfType([r.default.number,r.default.string]),y:r.default.oneOfType([r.default.number,r.default.string])}),position:r.default.shape({x:r.default.number,y:r.default.number}),className:l.dontSetMe,style:l.dontSetMe,transform:l.dontSetMe}),m(h,"defaultProps",{...c.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(_u)),_u}var sp=function(){if(tp)return Lu.exports;tp=1;const{default:e,DraggableCore:t}=ap();return Lu.exports=e,Lu.exports.default=e,Lu.exports.DraggableCore=t,Lu.exports}(),lp=Oi(sp),cp=function(){return cp=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},cp.apply(this,arguments)},dp={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},up={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},pp={width:"20px",height:"20px",position:"absolute",zIndex:1},fp={top:cp(cp({},dp),{top:"-5px"}),right:cp(cp({},up),{left:void 0,right:"-5px"}),bottom:cp(cp({},dp),{top:void 0,bottom:"-5px"}),left:cp(cp({},up),{left:"-5px"}),topRight:cp(cp({},pp),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:cp(cp({},pp),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:cp(cp({},pp),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:cp(cp({},pp),{left:"-10px",top:"-10px",cursor:"nw-resize"})},mp=p(function(e){var t=e.onResizeStart,n=e.direction,r=e.children,o=e.replaceStyles,i=e.className,a=d(function(e){t(e,n)},[t,n]),s=d(function(e){t(e,n)},[t,n]),l=u(function(){return cp(cp({position:"absolute",userSelect:"none"},fp[n]),null!=o?o:{})},[o,n]);return m("div",{className:i||void 0,style:l,onMouseDown:a,onTouchStart:s,children:r})}),hp=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),gp=function(){return gp=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},gp.apply(this,arguments)},vp={width:"auto",height:"auto"},bp=function(e,t,n){return Math.max(Math.min(e,n),t)},wp=function(e,t,n){var r=Math.round(e/t);return r*t+n*(r-1)},yp=function(e,t){return new RegExp(e,"i").test(t)},Ep=function(e){return Boolean(e.touches&&e.touches.length)},xp=function(e,t,n){void 0===n&&(n=0);var r=t.reduce(function(n,r,o){return Math.abs(r-e)<Math.abs(t[n]-e)?o:n},0),o=Math.abs(t[r]-e);return 0===n||o<n?t[r]:e},Sp=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:"".concat(e,"px")},Tp=function(e,t,n,r){if(e&&"string"==typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%"))return t*(Number(e.replace("%",""))/100);if(e.endsWith("vw"))return n*(Number(e.replace("vw",""))/100);if(e.endsWith("vh"))return r*(Number(e.replace("vh",""))/100)}return e},Pp=["as","ref","style","className","grid","gridGap","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],Cp="__resizable_base__",Op=function(e){function t(t){var n,r,o,i,a=e.call(this,t)||this;return a.ratio=1,a.resizable=null,a.parentLeft=0,a.parentTop=0,a.resizableLeft=0,a.resizableRight=0,a.resizableTop=0,a.resizableBottom=0,a.targetLeft=0,a.targetTop=0,a.delta={width:0,height:0},a.appendBase=function(){if(!a.resizable||!a.window)return null;var e=a.parentNode;if(!e)return null;var t=a.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add(Cp):t.className+=Cp,e.appendChild(t),t},a.removeBase=function(e){var t=a.parentNode;t&&t.removeChild(e)},a.state={isResizing:!1,width:null!==(r=null===(n=a.propsSize)||void 0===n?void 0:n.width)&&void 0!==r?r:"auto",height:null!==(i=null===(o=a.propsSize)||void 0===o?void 0:o.height)&&void 0!==i?i:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},a.onResizeStart=a.onResizeStart.bind(a),a.onMouseMove=a.onMouseMove.bind(a),a.onMouseUp=a.onMouseUp.bind(a),a}return hp(t,e),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||vp},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,r=this.resizable.offsetHeight,o=this.resizable.style.position;"relative"!==o&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:n,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:r,this.resizable.style.position=o}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,n=function(t){var n;if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&(null===(n=e.propsSize[t])||void 0===n?void 0:n.toString().endsWith("%"))){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var r=e.getParentSize(),o=Number(e.state[t].toString().replace("px",""))/r[t]*100;return"".concat(o,"%")}return Sp(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?Sp(t.width):n("width"),height:t&&void 0!==t.height&&!this.state.isResizing?Sp(t.height):n("height")}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,n=this.parentNode.style.flexWrap;"wrap"!==n&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var r={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=n),this.removeBase(e),r},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var n=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==n&&"auto"!==n?e:"auto"},t.prototype.calculateNewMaxFromBoundary=function(e,t){var n,r,o=this.props.boundsByDirection,i=this.state.direction,a=o&&yp("left",i),s=o&&yp("top",i);if("parent"===this.props.bounds){var l=this.parentNode;l&&(n=a?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),r=s?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(n=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,r=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(n=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),r=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return n&&Number.isFinite(n)&&(e=e&&e<n?e:n),r&&Number.isFinite(r)&&(t=t&&t<r?t:r),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var n,r=this.props.scale||1,o=(n=this.props.resizeRatio||1,Array.isArray(n)?n:[n,n]),i=o[0],a=o[1],s=this.state,l=s.direction,c=s.original,d=this.props,u=d.lockAspectRatio,p=d.lockAspectRatioExtraHeight,f=d.lockAspectRatioExtraWidth,m=c.width,h=c.height,g=p||0,v=f||0;return yp("right",l)&&(m=c.width+(e-c.x)*i/r,u&&(h=(m-v)/this.ratio+g)),yp("left",l)&&(m=c.width-(e-c.x)*i/r,u&&(h=(m-v)/this.ratio+g)),yp("bottom",l)&&(h=c.height+(t-c.y)*a/r,u&&(m=(h-g)*this.ratio+v)),yp("top",l)&&(h=c.height-(t-c.y)*a/r,u&&(m=(h-g)*this.ratio+v)),{newWidth:m,newHeight:h}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,r){var o=this.props,i=o.lockAspectRatio,a=o.lockAspectRatioExtraHeight,s=o.lockAspectRatioExtraWidth,l=void 0===r.width?10:r.width,c=void 0===n.width||n.width<0?e:n.width,d=void 0===r.height?10:r.height,u=void 0===n.height||n.height<0?t:n.height,p=a||0,f=s||0;if(i){var m=(d-p)*this.ratio+f,h=(u-p)*this.ratio+f,g=(l-f)/this.ratio+p,v=(c-f)/this.ratio+p,b=Math.max(l,m),w=Math.min(c,h),y=Math.max(d,g),E=Math.min(u,v);e=bp(e,b,w),t=bp(t,y,E)}else e=bp(e,l,c),t=bp(t,d,u);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){var e=1/(this.props.scale||1);if("parent"===this.props.bounds){var t=this.parentNode;if(t){var n=t.getBoundingClientRect();this.parentLeft=n.left*e,this.parentTop=n.top*e}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var r=this.props.bounds.getBoundingClientRect();this.targetLeft=r.left*e,this.targetTop=r.top*e}if(this.resizable){var o=this.resizable.getBoundingClientRect(),i=o.left,a=o.top,s=o.right,l=o.bottom;this.resizableLeft=i*e,this.resizableRight=s*e,this.resizableTop=a*e,this.resizableBottom=l*e}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var n,r=0,o=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(r=e.nativeEvent.clientX,o=e.nativeEvent.clientY):e.nativeEvent&&Ep(e.nativeEvent)&&(r=e.nativeEvent.touches[0].clientX,o=e.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var i=this.window.getComputedStyle(this.resizable);if("auto"!==i.flexBasis){var a=this.parentNode;if(a){var s=this.window.getComputedStyle(a).flexDirection;this.flexDir=s.startsWith("row")?"row":"column",n=i.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var l={original:{x:r,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:gp(gp({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:n};this.setState(l)}},t.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&Ep(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var n=this.props,r=n.maxWidth,o=n.maxHeight,i=n.minWidth,a=n.minHeight,s=Ep(e)?e.touches[0].clientX:e.clientX,l=Ep(e)?e.touches[0].clientY:e.clientY,c=this.state,d=c.direction,u=c.original,p=c.width,f=c.height,m=this.getParentSize(),h=function(e,t,n,r,o,i,a){return r=Tp(r,e.width,t,n),o=Tp(o,e.height,t,n),i=Tp(i,e.width,t,n),a=Tp(a,e.height,t,n),{maxWidth:void 0===r?void 0:Number(r),maxHeight:void 0===o?void 0:Number(o),minWidth:void 0===i?void 0:Number(i),minHeight:void 0===a?void 0:Number(a)}}(m,this.window.innerWidth,this.window.innerHeight,r,o,i,a);r=h.maxWidth,o=h.maxHeight,i=h.minWidth,a=h.minHeight;var g=this.calculateNewSizeFromDirection(s,l),v=g.newHeight,b=g.newWidth,w=this.calculateNewMaxFromBoundary(r,o);this.props.snap&&this.props.snap.x&&(b=xp(b,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(v=xp(v,this.props.snap.y,this.props.snapGap));var E=this.calculateNewSizeFromAspectRatio(b,v,{width:w.maxWidth,height:w.maxHeight},{width:i,height:a});if(b=E.newWidth,v=E.newHeight,this.props.grid){var x=wp(b,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),S=wp(v,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),T=this.props.snapGap||0;b=0===T||Math.abs(x-b)<=T?x:b,v=0===T||Math.abs(S-v)<=T?S:v}var P={width:b-u.width,height:v-u.height};if(this.delta=P,p&&"string"==typeof p)if(p.endsWith("%")){var C=b/m.width*100;b="".concat(C,"%")}else if(p.endsWith("vw")){var O=b/this.window.innerWidth*100;b="".concat(O,"vw")}else if(p.endsWith("vh")){var N=b/this.window.innerHeight*100;b="".concat(N,"vh")}if(f&&"string"==typeof f)if(f.endsWith("%")){C=v/m.height*100;v="".concat(C,"%")}else if(f.endsWith("vw")){O=v/this.window.innerWidth*100;v="".concat(O,"vw")}else if(f.endsWith("vh")){N=v/this.window.innerHeight*100;v="".concat(N,"vh")}var k={width:this.createSizeForCssProperty(b,"width"),height:this.createSizeForCssProperty(v,"height")};"row"===this.flexDir?k.flexBasis=k.width:"column"===this.flexDir&&(k.flexBasis=k.height);var M=this.state.width!==k.width,I=this.state.height!==k.height,R=this.state.flexBasis!==k.flexBasis,D=M||I||R;D&&y(function(){t.setState(k)}),this.props.onResize&&D&&this.props.onResize(e,d,this.resizable,P)}},t.prototype.onMouseUp=function(e){var t,n,r=this.state,o=r.isResizing,i=r.direction;r.original,o&&this.resizable&&(this.props.onResizeStop&&this.props.onResizeStop(e,i,this.resizable,this.delta),this.props.size&&this.setState({width:null!==(t=this.props.size.width)&&void 0!==t?t:"auto",height:null!==(n=this.props.size.height)&&void 0!==n?n:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:gp(gp({},this.state.backgroundStyle),{cursor:"auto"})}))},t.prototype.updateSize=function(e){var t,n;this.setState({width:null!==(t=e.width)&&void 0!==t?t:"auto",height:null!==(n=e.height)&&void 0!==n?n:"auto"})},t.prototype.renderResizer=function(){var e=this,t=this.props,n=t.enable,r=t.handleStyles,o=t.handleClasses,i=t.handleWrapperStyle,a=t.handleWrapperClass,s=t.handleComponent;if(!n)return null;var l=Object.keys(n).map(function(t){return!1!==n[t]?m(mp,{direction:t,onResizeStart:e.onResizeStart,replaceStyles:r&&r[t],className:o&&o[t],children:s&&s[t]?s[t]:null},t):null});return m("div",{className:a,style:i,children:l})},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce(function(t,n){return-1!==Pp.indexOf(n)||(t[n]=e.props[n]),t},{}),n=gp(gp(gp({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(n.flexBasis=this.state.flexBasis);var r=this.props.as||"div";return g(r,gp({style:n,className:this.props.className},t,{ref:function(t){t&&(e.resizable=t)},children:[this.state.isResizing&&m("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]}))},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(f),Np=function(e,t){return Np=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},Np(e,t)};var kp=function(){return kp=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},kp.apply(this,arguments)};var Mp={width:"auto",height:"auto",display:"inline-block",position:"absolute",top:0,left:0},Ip=function(e){function t(t){var n=e.call(this,t)||this;return n.resizingPosition={x:0,y:0},n.offsetFromParent={left:0,top:0},n.resizableElement={current:null},n.originalPosition={x:0,y:0},n.state={resizing:!1,bounds:{top:0,right:0,bottom:0,left:0},maxWidth:t.maxWidth,maxHeight:t.maxHeight},n.onResizeStart=n.onResizeStart.bind(n),n.onResize=n.onResize.bind(n),n.onResizeStop=n.onResizeStop.bind(n),n.onDragStart=n.onDragStart.bind(n),n.onDrag=n.onDrag.bind(n),n.onDragStop=n.onDragStop.bind(n),n.getMaxSizesFromProps=n.getMaxSizesFromProps.bind(n),n}return function(e,t){function n(){this.constructor=e}Np(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){this.updateOffsetFromParent();var e=this.offsetFromParent,t=e.left,n=e.top,r=this.getDraggablePosition(),o=r.x,i=r.y;this.draggable.setState({x:o-t,y:i-n}),this.forceUpdate()},t.prototype.getDraggablePosition=function(){var e=this.draggable.state;return{x:e.x,y:e.y}},t.prototype.getParent=function(){return this.resizable&&this.resizable.parentNode},t.prototype.getParentSize=function(){return this.resizable.getParentSize()},t.prototype.getMaxSizesFromProps=function(){return{maxWidth:void 0===this.props.maxWidth?Number.MAX_SAFE_INTEGER:this.props.maxWidth,maxHeight:void 0===this.props.maxHeight?Number.MAX_SAFE_INTEGER:this.props.maxHeight}},t.prototype.getSelfElement=function(){return this.resizable&&this.resizable.resizable},t.prototype.getOffsetHeight=function(e){var t=this.props.scale;switch(this.props.bounds){case"window":return window.innerHeight/t;case"body":return document.body.offsetHeight/t;default:return e.offsetHeight}},t.prototype.getOffsetWidth=function(e){var t=this.props.scale;switch(this.props.bounds){case"window":return window.innerWidth/t;case"body":return document.body.offsetWidth/t;default:return e.offsetWidth}},t.prototype.onDragStart=function(e,t){this.props.onDragStart&&this.props.onDragStart(e,t);var n=this.getDraggablePosition();if(this.originalPosition=n,this.props.bounds){var r,o=this.getParent(),i=this.props.scale;if("parent"===this.props.bounds)r=o;else{if("body"===this.props.bounds){var a=o.getBoundingClientRect(),s=a.left,l=a.top,c=document.body.getBoundingClientRect(),d=-(s-o.offsetLeft*i-c.left)/i,u=-(l-o.offsetTop*i-c.top)/i,p=(document.body.offsetWidth-this.resizable.size.width*i)/i+d,f=(document.body.offsetHeight-this.resizable.size.height*i)/i+u;return this.setState({bounds:{top:u,right:p,bottom:f,left:d}})}if("window"===this.props.bounds){if(!this.resizable)return;var m=o.getBoundingClientRect(),h=m.left,g=m.top,v=-(h-o.offsetLeft*i)/i,b=-(g-o.offsetTop*i)/i;p=(window.innerWidth-this.resizable.size.width*i)/i+v,f=(window.innerHeight-this.resizable.size.height*i)/i+b;return this.setState({bounds:{top:b,right:p,bottom:f,left:v}})}"string"==typeof this.props.bounds?r=document.querySelector(this.props.bounds):this.props.bounds instanceof HTMLElement&&(r=this.props.bounds)}if(r instanceof HTMLElement&&o instanceof HTMLElement){var w=r.getBoundingClientRect(),y=w.left,E=w.top,x=o.getBoundingClientRect(),S=(y-x.left)/i,T=E-x.top;if(this.resizable){this.updateOffsetFromParent();var P=this.offsetFromParent;this.setState({bounds:{top:T-P.top,right:S+(r.offsetWidth-this.resizable.size.width)-P.left/i,bottom:T+(r.offsetHeight-this.resizable.size.height)-P.top,left:S-P.left/i}})}}}},t.prototype.onDrag=function(e,t){if(this.props.onDrag){var n=this.offsetFromParent,r=n.left,o=n.top;return this.props.dragAxis&&"both"!==this.props.dragAxis?"x"===this.props.dragAxis?this.props.onDrag(e,kp(kp({},t),{x:t.x+r,y:this.originalPosition.y+o,deltaY:0})):"y"===this.props.dragAxis?this.props.onDrag(e,kp(kp({},t),{x:this.originalPosition.x+r,y:t.y+o,deltaX:0})):void 0:this.props.onDrag(e,kp(kp({},t),{x:t.x+r,y:t.y+o}))}},t.prototype.onDragStop=function(e,t){if(this.props.onDragStop){var n=this.offsetFromParent,r=n.left,o=n.top;return this.props.dragAxis&&"both"!==this.props.dragAxis?"x"===this.props.dragAxis?this.props.onDragStop(e,kp(kp({},t),{x:t.x+r,y:this.originalPosition.y+o,deltaY:0})):"y"===this.props.dragAxis?this.props.onDragStop(e,kp(kp({},t),{x:this.originalPosition.x+r,y:t.y+o,deltaX:0})):void 0:this.props.onDragStop(e,kp(kp({},t),{x:t.x+r,y:t.y+o}))}},t.prototype.onResizeStart=function(e,t,n){e.stopPropagation(),this.setState({resizing:!0});var r=this.props.scale,o=this.offsetFromParent,i=this.getDraggablePosition();if(this.resizingPosition={x:i.x+o.left,y:i.y+o.top},this.originalPosition=i,this.props.bounds){var a=this.getParent(),s=void 0;"parent"===this.props.bounds?s=a:"body"===this.props.bounds?s=document.body:"window"===this.props.bounds?s=window:"string"==typeof this.props.bounds?s=document.querySelector(this.props.bounds):this.props.bounds instanceof HTMLElement&&(s=this.props.bounds);var l=this.getSelfElement();if(l instanceof Element&&(s instanceof HTMLElement||s===window)&&a instanceof HTMLElement){var c=this.getMaxSizesFromProps(),d=c.maxWidth,u=c.maxHeight,p=this.getParentSize();if(d&&"string"==typeof d)if(d.endsWith("%")){var f=Number(d.replace("%",""))/100;d=p.width*f}else d.endsWith("px")&&(d=Number(d.replace("px","")));if(u&&"string"==typeof u)if(u.endsWith("%")){f=Number(u.replace("%",""))/100;u=p.height*f}else u.endsWith("px")&&(u=Number(u.replace("px","")));var m=l.getBoundingClientRect(),h=m.left,g=m.top,v="window"===this.props.bounds?{left:0,top:0}:s.getBoundingClientRect(),b=v.left,w=v.top,y=this.getOffsetWidth(s),E=this.getOffsetHeight(s),x=t.toLowerCase().endsWith("left"),S=t.toLowerCase().endsWith("right"),T=t.startsWith("top"),P=t.startsWith("bottom");if((x||T)&&this.resizable){var C=(h-b)/r+this.resizable.size.width;this.setState({maxWidth:C>Number(d)?d:C})}if(S||this.props.lockAspectRatio&&!x&&!T){C=y+(b-h)/r;this.setState({maxWidth:C>Number(d)?d:C})}if((T||x)&&this.resizable){C=(g-w)/r+this.resizable.size.height;this.setState({maxHeight:C>Number(u)?u:C})}if(P||this.props.lockAspectRatio&&!T&&!x){C=E+(w-g)/r;this.setState({maxHeight:C>Number(u)?u:C})}}}else this.setState({maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight});this.props.onResizeStart&&this.props.onResizeStart(e,t,n)},t.prototype.onResize=function(e,t,n,r){var o=this,i={x:this.originalPosition.x,y:this.originalPosition.y},a=-r.width,s=-r.height;["top","left","topLeft","bottomLeft","topRight"].includes(t)&&("bottomLeft"===t?i.x+=a:("topRight"===t||(i.x+=a),i.y+=s));var l=this.draggable.state;i.x===l.x&&i.y===l.y||y(function(){o.draggable.setState(i)}),this.updateOffsetFromParent();var c=this.offsetFromParent,d=this.getDraggablePosition().x+c.left,u=this.getDraggablePosition().y+c.top;this.resizingPosition={x:d,y:u},this.props.onResize&&this.props.onResize(e,t,n,r,{x:d,y:u})},t.prototype.onResizeStop=function(e,t,n,r){this.setState({resizing:!1});var o=this.getMaxSizesFromProps(),i=o.maxWidth,a=o.maxHeight;this.setState({maxWidth:i,maxHeight:a}),this.props.onResizeStop&&this.props.onResizeStop(e,t,n,r,this.resizingPosition)},t.prototype.updateSize=function(e){this.resizable&&this.resizable.updateSize({width:e.width,height:e.height})},t.prototype.updatePosition=function(e){this.draggable.setState(e)},t.prototype.updateOffsetFromParent=function(){var e=this.props.scale,t=this.getParent(),n=this.getSelfElement();if(!t||null===n)return{top:0,left:0};var r=t.getBoundingClientRect(),o=r.left,i=r.top,a=n.getBoundingClientRect(),s=this.getDraggablePosition(),l=t.scrollLeft,c=t.scrollTop;this.offsetFromParent={left:a.left-o+l-s.x*e,top:a.top-i+c-s.y*e}},t.prototype.render=function(){var e=this,t=this.props,n=t.disableDragging,r=t.style,o=t.dragHandleClassName,a=t.position,s=t.onMouseDown,l=t.onMouseUp,c=t.dragAxis,d=t.dragGrid,u=t.bounds,p=t.enableUserSelectHack,f=t.cancel,m=t.children;t.onResizeStart,t.onResize,t.onResizeStop,t.onDragStart,t.onDrag,t.onDragStop;var h=t.resizeHandleStyles,g=t.resizeHandleClasses,v=t.resizeHandleComponent,b=t.enableResizing,w=t.resizeGrid,y=t.resizeHandleWrapperClass,E=t.resizeHandleWrapperStyle,x=t.scale,S=t.allowAnyClick,T=t.dragPositionOffset,P=function(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}(t,["disableDragging","style","dragHandleClassName","position","onMouseDown","onMouseUp","dragAxis","dragGrid","bounds","enableUserSelectHack","cancel","children","onResizeStart","onResize","onResizeStop","onDragStart","onDrag","onDragStop","resizeHandleStyles","resizeHandleClasses","resizeHandleComponent","enableResizing","resizeGrid","resizeHandleWrapperClass","resizeHandleWrapperStyle","scale","allowAnyClick","dragPositionOffset"]),C=this.props.default?kp({},this.props.default):void 0;delete P.default;var O,N=n||o?{cursor:"auto"}:{cursor:"move"},k=kp(kp(kp({},Mp),N),r),M=this.offsetFromParent,I=M.left,R=M.top;a&&(O={x:a.x-I,y:a.y-R});var D,A=this.state.resizing?void 0:O,z=this.state.resizing?"both":c;return i(lp,{ref:function(t){t&&(e.draggable=t)},handle:o?".".concat(o):void 0,defaultPosition:C,onMouseDown:s,onMouseUp:l,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,axis:z,disabled:n,grid:d,bounds:u?this.state.bounds:void 0,position:A,enableUserSelectHack:p,cancel:f,scale:x,allowAnyClick:S,nodeRef:this.resizableElement,positionOffset:T},i(Op,kp({},P,{ref:function(t){t&&(e.resizable=t,e.resizableElement.current=t.resizable)},defaultSize:C,size:this.props.size,enable:"boolean"==typeof b?(D=b,{bottom:D,bottomLeft:D,bottomRight:D,left:D,right:D,top:D,topLeft:D,topRight:D}):b,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,style:k,minWidth:this.props.minWidth,minHeight:this.props.minHeight,maxWidth:this.state.resizing?this.state.maxWidth:this.props.maxWidth,maxHeight:this.state.resizing?this.state.maxHeight:this.props.maxHeight,grid:w,handleWrapperClass:y,handleWrapperStyle:E,lockAspectRatio:this.props.lockAspectRatio,lockAspectRatioExtraWidth:this.props.lockAspectRatioExtraWidth,lockAspectRatioExtraHeight:this.props.lockAspectRatioExtraHeight,handleStyles:h,handleClasses:g,handleComponent:v,scale:this.props.scale}),m))},t.defaultProps={maxWidth:Number.MAX_SAFE_INTEGER,maxHeight:Number.MAX_SAFE_INTEGER,scale:1,onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},onDragStart:function(){},onDrag:function(){},onDragStop:function(){}},t}(f);const Rp=({shortform:e,setClose:n})=>{const[o,i]=t.useState(!0),[s,l]=a(!0),[c,d]=a(!1),u=t.useRef(null),p=()=>{u.current&&(window.clearTimeout(u.current),u.current=null)},f=(e=1500)=>{p(),u.current=window.setTimeout(()=>d(!1),e)};return r(()=>()=>p(),[]),t.createElement("div",{className:"relative w-full h-full",onClick:()=>{d(!0),f(2e3)},onMouseLeave:()=>f(800),onMouseEnter:()=>c&&f(1500)},t.createElement("div",{className:"absolute inset-0 bg-black",style:{zIndex:1,opacity:c?.4:0,transition:"opacity 300ms ease",pointerEvents:c?"auto":"none"}}),t.createElement("div",{className:"absolute inset-0",style:{zIndex:2,opacity:c?1:0,transition:"opacity 300ms ease",pointerEvents:c?"auto":"none"}},t.createElement("div",{className:"absolute text-white flex gap-2",style:{zIndex:3,top:8,right:8}},t.createElement("button",{className:"cursor-pointer",onClick:e=>{e.stopPropagation(),i(e=>!e)},"aria-label":o?"Unmute":"Mute"},o?t.createElement(mt,{size:20}):t.createElement(ft,{size:20})),t.createElement("button",{className:"cursor-pointer",onClick:e=>{null==e||e.stopPropagation(),n()},"aria-label":"Close"},t.createElement(ht,{size:20}))),t.createElement("div",{className:"absolute inset-0 flex items-center justify-center",style:{pointerEvents:"none"}},t.createElement("button",{onClick:e=>{null==e||e.stopPropagation(),l(e=>!e)},"aria-label":s?"Pause":"Play",className:"cursor-pointer text-white p-2 ",style:{pointerEvents:"auto"}},s?t.createElement(dt,{size:28}):t.createElement(ut,{size:28})))),t.createElement(Ze,{shortform:e,mute:o,play:s}))},Dp=({shortsId:e,type:n})=>{const{setShortform:o,shortform:i}=zu(),[s,l]=a(!1);r(()=>{if(!e)return;e&&T(void 0,void 0,void 0,function*(){const t=yield ui(e);t&&o(Object.assign(Object.assign({},t),{uuid:Ge()}))})},[e]);const{playtime:c}=ei();return(({shorform:e,playtime:t})=>{r(()=>{if(!e)return;const{shortsId:t,shortsUuid:n,userId:r}=e;ii({contentId:t,uuid:n,type:ti.SHORTS,userId:r,isFirstPlay:!Ye(t)})},[]);const n=Qo();r(()=>{if(!e||n)return;const{shortsId:r,uuid:o,userId:i}=e;ai({contentId:r,uuid:o,type:ti.SHORTS,playtime:t,userId:i})},[n])})({shorform:i,playtime:c}),i&&!s&&t.createElement(Ip,{minWidth:240,lockAspectRatio:9/16,style:{zIndex:99999},default:{width:240,height:427,x:window.innerWidth-240-50,y:window.innerHeight-427-50},bounds:"window"},"shopping"===n?t.createElement(Kl,{shortForm:i}):t.createElement(Rp,{shortform:i,setClose:()=>{if(!i)return;l(!0);const{shortsId:e,uuid:t,userId:n}=i;ai({contentId:e,uuid:t,type:ti.SHORTS,playtime:c,userId:n})}}))},Ap=({shortsId:e,type:n})=>{const{setShortform:o}=zu();r(()=>{if(!e)return;e&&T(void 0,void 0,void 0,function*(){const t=yield ui(e);t&&o(Object.assign(Object.assign({},t),{uuid:Ge()}))})},[e]);const[i,s]=a("");r(()=>{T(void 0,void 0,void 0,function*(){function e(e){return T(this,void 0,void 0,function*(){const t=yield fetch(e);if(!t.ok)throw new Error(String(t.status));return t.text()})}let t="";try{t=yield e("https://unpkg.com/@kinxcdn/commerce-player@latest/dist/styles.css")}catch(n){t=yield e("https://mbus-player-sy.s3.ap-northeast-2.amazonaws.com/styles.css")}s(t)}).catch(()=>console.error("Failed to load styles.css"))},[]);const{container:l}=ku({cssHref:"https://unpkg.com/@kinxcdn/commerce-player@latest/dist/styles.css"});return l&&i&&t.createElement(Nu.div,null,t.createElement("style",null,i),t.createElement("div",null,t.createElement(Dp,{shortsId:e,type:n})))};export{Au as CollectionShowcase,Ap as FloatingPlayer,Ql as PreviewPlayer,Jl as ShoppingPlayer,Ze as ViewPlayer,Iu as WidgetPlayer};