import{_ as C}from"./iframe-BROlT08N.js";import{s as kt}from"./popup-BXRymj07.js";import{i as Ft,d as It,e as Bt}from"./XPro-_Ll7JVYJ.js";import{r as P,i as bt,b as At}from"./runtime-CZkC8ltm.js";import"../sb-preview/runtime.js";import"./index-C0Lr04gB.js";import"./index-CP70Tq58.js";import"./lifecycle-D_bIUHQK.js";import"./each-C4g42ehH.js";import"./spread-CgU5AtxT.js";import"./globals-D0QH3NT1.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./tslib.es6-pJfR_DrR.js";function Mt(){Ft(),It(),Bt()}const Y=Math.min,$=Math.max,it=Math.round,ot=Math.floor,I=t=>({x:t,y:t}),Nt={left:"right",right:"left",bottom:"top",top:"bottom"},Wt={start:"end",end:"start"};function ft(t,e,o){return $(t,Y(e,o))}function tt(t,e){return typeof t=="function"?t(e):t}function z(t){return t.split("-")[0]}function et(t){return t.split("-")[1]}function Et(t){return t==="x"?"y":"x"}function dt(t){return t==="y"?"height":"width"}function q(t){return["top","bottom"].includes(z(t))?"y":"x"}function mt(t){return Et(q(t))}function $t(t,e,o){o===void 0&&(o=!1);const n=et(t),i=mt(t),s=dt(i);let r=i==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=rt(r)),[r,rt(r)]}function zt(t){const e=rt(t);return[ut(t),e,ut(e)]}function ut(t){return t.replace(/start|end/g,e=>Wt[e])}function Ht(t,e,o){const n=["left","right"],i=["right","left"],s=["top","bottom"],r=["bottom","top"];switch(t){case"top":case"bottom":return o?e?i:n:e?n:i;case"left":case"right":return e?s:r;default:return[]}}function jt(t,e,o,n){const i=et(t);let s=Ht(z(t),o==="start",n);return i&&(s=s.map(r=>r+"-"+i),e&&(s=s.concat(s.map(ut)))),s}function rt(t){return t.replace(/left|right|bottom|top/g,e=>Nt[e])}function Xt(t){return{top:0,right:0,bottom:0,left:0,...t}}function Rt(t){return typeof t!="number"?Xt(t):{top:t,right:t,bottom:t,left:t}}function st(t){const{x:e,y:o,width:n,height:i}=t;return{width:n,height:i,top:o,left:e,right:e+n,bottom:o+i,x:e,y:o}}function wt(t,e,o){let{reference:n,floating:i}=t;const s=q(e),r=mt(e),c=dt(r),l=z(e),a=s==="y",d=n.x+n.width/2-i.width/2,u=n.y+n.height/2-i.height/2,p=n[c]/2-i[c]/2;let f;switch(l){case"top":f={x:d,y:n.y-i.height};break;case"bottom":f={x:d,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:u};break;case"left":f={x:n.x-i.width,y:u};break;default:f={x:n.x,y:n.y}}switch(et(e)){case"start":f[r]-=p*(o&&a?-1:1);break;case"end":f[r]+=p*(o&&a?-1:1);break}return f}const Yt=async(t,e,o)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:r}=o,c=s.filter(Boolean),l=await(r.isRTL==null?void 0:r.isRTL(e));let a=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=wt(a,n,l),p=n,f={},m=0;for(let g=0;g({name:"arrow",options:t,async fn(e){const{x:o,y:n,placement:i,rects:s,platform:r,elements:c,middlewareData:l}=e,{element:a,padding:d=0}=tt(t,e)||{};if(a==null)return{};const u=Rt(d),p={x:o,y:n},f=mt(i),m=dt(f),g=await r.getDimensions(a),w=f==="y",h=w?"top":"left",x=w?"bottom":"right",y=w?"clientHeight":"clientWidth",b=s.reference[m]+s.reference[f]-p[f]-s.floating[m],v=p[f]-s.reference[f],_=await(r.getOffsetParent==null?void 0:r.getOffsetParent(a));let M=_?_[y]:0;(!M||!await(r.isElement==null?void 0:r.isElement(_)))&&(M=c.floating[y]||s.floating[m]);const K=b/2-v/2,N=M/2-g[m]/2-1,V=Y(u[h],N),Z=Y(u[x],N),W=V,J=M-g[m]-Z,A=M/2-g[m]/2+K,j=ft(W,A,J),D=!l.arrow&&et(i)!=null&&A!==j&&s.reference[m]/2-(AA<=0)){var Z,W;const A=(((Z=s.flip)==null?void 0:Z.index)||0)+1,j=M[A];if(j)return{data:{index:A,overflows:V},reset:{placement:j}};let D=(W=V.filter(O=>O.overflows[0]<=0).sort((O,k)=>O.overflows[1]-k.overflows[1])[0])==null?void 0:W.placement;if(!D)switch(f){case"bestFit":{var J;const O=(J=V.filter(k=>{if(_){const F=q(k.placement);return F===x||F==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(F=>F>0).reduce((F,Vt)=>F+Vt,0)]).sort((k,F)=>k[1]-F[1])[0])==null?void 0:J[0];O&&(D=O);break}case"initialPlacement":D=c;break}if(i!==D)return{reset:{placement:D}}}return{}}}};async function Gt(t,e){const{placement:o,platform:n,elements:i}=t,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),r=z(o),c=et(o),l=q(o)==="y",a=["left","top"].includes(r)?-1:1,d=s&&l?-1:1,u=tt(e,t);let{mainAxis:p,crossAxis:f,alignmentAxis:m}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return c&&typeof m=="number"&&(f=c==="end"?m*-1:m),l?{x:f*d,y:p*a}:{x:p*a,y:f*d}}const Kt=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var o,n;const{x:i,y:s,placement:r,middlewareData:c}=e,l=await Gt(e,t);return r===((o=c.offset)==null?void 0:o.placement)&&(n=c.arrow)!=null&&n.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:r}}}}},Zt=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:n,placement:i}=e,{mainAxis:s=!0,crossAxis:r=!1,limiter:c={fn:w=>{let{x:h,y:x}=w;return{x:h,y:x}}},...l}=tt(t,e),a={x:o,y:n},d=await _t(e,l),u=q(z(i)),p=Et(u);let f=a[p],m=a[u];if(s){const w=p==="y"?"top":"left",h=p==="y"?"bottom":"right",x=f+d[w],y=f-d[h];f=ft(x,f,y)}if(r){const w=u==="y"?"top":"left",h=u==="y"?"bottom":"right",x=m+d[w],y=m-d[h];m=ft(x,m,y)}const g=c.fn({...e,[p]:f,[u]:m});return{...g,data:{x:g.x-o,y:g.y-n}}}}};function G(t){return Ot(t)?(t.nodeName||"").toLowerCase():"#document"}function E(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function S(t){var e;return(e=(Ot(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Ot(t){return t instanceof Node||t instanceof E(t).Node}function L(t){return t instanceof Element||t instanceof E(t).Element}function T(t){return t instanceof HTMLElement||t instanceof E(t).HTMLElement}function xt(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof E(t).ShadowRoot}function nt(t){const{overflow:e,overflowX:o,overflowY:n,display:i}=R(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+o)&&!["inline","contents"].includes(i)}function Jt(t){return["table","td","th"].includes(G(t))}function ct(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function pt(t){const e=gt(),o=R(t);return o.transform!=="none"||o.perspective!=="none"||(o.containerType?o.containerType!=="normal":!1)||!e&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!e&&(o.filter?o.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(o.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(o.contain||"").includes(n))}function Qt(t){let e=B(t);for(;T(e)&&!U(e);){if(ct(e))return null;if(pt(e))return e;e=B(e)}return null}function gt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function U(t){return["html","body","#document"].includes(G(t))}function R(t){return E(t).getComputedStyle(t)}function lt(t){return L(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function B(t){if(G(t)==="html")return t;const e=t.assignedSlot||t.parentNode||xt(t)&&t.host||S(t);return xt(e)?e.host:e}function Lt(t){const e=B(t);return U(e)?t.ownerDocument?t.ownerDocument.body:t.body:T(e)&&nt(e)?e:Lt(e)}function Q(t,e,o){var n;e===void 0&&(e=[]),o===void 0&&(o=!0);const i=Lt(t),s=i===((n=t.ownerDocument)==null?void 0:n.body),r=E(i);return s?e.concat(r,r.visualViewport||[],nt(i)?i:[],r.frameElement&&o?Q(r.frameElement):[]):e.concat(i,Q(i,[],o))}function Tt(t){const e=R(t);let o=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=T(t),s=i?t.offsetWidth:o,r=i?t.offsetHeight:n,c=it(o)!==s||it(n)!==r;return c&&(o=s,n=r),{width:o,height:n,$:c}}function ht(t){return L(t)?t:t.contextElement}function X(t){const e=ht(t);if(!T(e))return I(1);const o=e.getBoundingClientRect(),{width:n,height:i,$:s}=Tt(e);let r=(s?it(o.width):o.width)/n,c=(s?it(o.height):o.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}const te=I(0);function Ct(t){const e=E(t);return!gt()||!e.visualViewport?te:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ee(t,e,o){return e===void 0&&(e=!1),!o||e&&o!==E(t)?!1:e}function H(t,e,o,n){e===void 0&&(e=!1),o===void 0&&(o=!1);const i=t.getBoundingClientRect(),s=ht(t);let r=I(1);e&&(n?L(n)&&(r=X(n)):r=X(t));const c=ee(s,o,n)?Ct(s):I(0);let l=(i.left+c.x)/r.x,a=(i.top+c.y)/r.y,d=i.width/r.x,u=i.height/r.y;if(s){const p=E(s),f=n&&L(n)?E(n):n;let m=p,g=m.frameElement;for(;g&&n&&f!==m;){const w=X(g),h=g.getBoundingClientRect(),x=R(g),y=h.left+(g.clientLeft+parseFloat(x.paddingLeft))*w.x,b=h.top+(g.clientTop+parseFloat(x.paddingTop))*w.y;l*=w.x,a*=w.y,d*=w.x,u*=w.y,l+=y,a+=b,m=E(g),g=m.frameElement}}return st({width:d,height:u,x:l,y:a})}function ne(t){let{elements:e,rect:o,offsetParent:n,strategy:i}=t;const s=i==="fixed",r=S(n),c=e?ct(e.floating):!1;if(n===r||c&&s)return o;let l={scrollLeft:0,scrollTop:0},a=I(1);const d=I(0),u=T(n);if((u||!u&&!s)&&((G(n)!=="body"||nt(r))&&(l=lt(n)),T(n))){const p=H(n);a=X(n),d.x=p.x+n.clientLeft,d.y=p.y+n.clientTop}return{width:o.width*a.x,height:o.height*a.y,x:o.x*a.x-l.scrollLeft*a.x+d.x,y:o.y*a.y-l.scrollTop*a.y+d.y}}function oe(t){return Array.from(t.getClientRects())}function Pt(t){return H(S(t)).left+lt(t).scrollLeft}function ie(t){const e=S(t),o=lt(t),n=t.ownerDocument.body,i=$(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=$(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let r=-o.scrollLeft+Pt(t);const c=-o.scrollTop;return R(n).direction==="rtl"&&(r+=$(e.clientWidth,n.clientWidth)-i),{width:i,height:s,x:r,y:c}}function re(t,e){const o=E(t),n=S(t),i=o.visualViewport;let s=n.clientWidth,r=n.clientHeight,c=0,l=0;if(i){s=i.width,r=i.height;const a=gt();(!a||a&&e==="fixed")&&(c=i.offsetLeft,l=i.offsetTop)}return{width:s,height:r,x:c,y:l}}function se(t,e){const o=H(t,!0,e==="fixed"),n=o.top+t.clientTop,i=o.left+t.clientLeft,s=T(t)?X(t):I(1),r=t.clientWidth*s.x,c=t.clientHeight*s.y,l=i*s.x,a=n*s.y;return{width:r,height:c,x:l,y:a}}function yt(t,e,o){let n;if(e==="viewport")n=re(t,o);else if(e==="document")n=ie(S(t));else if(L(e))n=se(e,o);else{const i=Ct(t);n={...e,x:e.x-i.x,y:e.y-i.y}}return st(n)}function Dt(t,e){const o=B(t);return o===e||!L(o)||U(o)?!1:R(o).position==="fixed"||Dt(o,e)}function ce(t,e){const o=e.get(t);if(o)return o;let n=Q(t,[],!1).filter(c=>L(c)&&G(c)!=="body"),i=null;const s=R(t).position==="fixed";let r=s?B(t):t;for(;L(r)&&!U(r);){const c=R(r),l=pt(r);!l&&c.position==="fixed"&&(i=null),(s?!l&&!i:!l&&c.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||nt(r)&&!l&&Dt(t,r))?n=n.filter(d=>d!==r):i=c,r=B(r)}return e.set(t,n),n}function le(t){let{element:e,boundary:o,rootBoundary:n,strategy:i}=t;const r=[...o==="clippingAncestors"?ct(e)?[]:ce(e,this._c):[].concat(o),n],c=r[0],l=r.reduce((a,d)=>{const u=yt(e,d,i);return a.top=$(u.top,a.top),a.right=Y(u.right,a.right),a.bottom=Y(u.bottom,a.bottom),a.left=$(u.left,a.left),a},yt(e,c,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function ae(t){const{width:e,height:o}=Tt(t);return{width:e,height:o}}function fe(t,e,o){const n=T(e),i=S(e),s=o==="fixed",r=H(t,!0,s,e);let c={scrollLeft:0,scrollTop:0};const l=I(0);if(n||!n&&!s)if((G(e)!=="body"||nt(i))&&(c=lt(e)),n){const u=H(e,!0,s,e);l.x=u.x+e.clientLeft,l.y=u.y+e.clientTop}else i&&(l.x=Pt(i));const a=r.left+c.scrollLeft-l.x,d=r.top+c.scrollTop-l.y;return{x:a,y:d,width:r.width,height:r.height}}function at(t){return R(t).position==="static"}function vt(t,e){return!T(t)||R(t).position==="fixed"?null:e?e(t):t.offsetParent}function St(t,e){const o=E(t);if(ct(t))return o;if(!T(t)){let i=B(t);for(;i&&!U(i);){if(L(i)&&!at(i))return i;i=B(i)}return o}let n=vt(t,e);for(;n&&Jt(n)&&at(n);)n=vt(n,e);return n&&U(n)&&at(n)&&!pt(n)?o:n||Qt(t)||o}const ue=async function(t){const e=this.getOffsetParent||St,o=this.getDimensions,n=await o(t.floating);return{reference:fe(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function de(t){return R(t).direction==="rtl"}const me={convertOffsetParentRelativeRectToViewportRelativeRect:ne,getDocumentElement:S,getClippingRect:le,getOffsetParent:St,getElementRects:ue,getClientRects:oe,getDimensions:ae,getScale:X,isElement:L,isRTL:de};function pe(t,e){let o=null,n;const i=S(t);function s(){var c;clearTimeout(n),(c=o)==null||c.disconnect(),o=null}function r(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),s();const{left:a,top:d,width:u,height:p}=t.getBoundingClientRect();if(c||e(),!u||!p)return;const f=ot(d),m=ot(i.clientWidth-(a+u)),g=ot(i.clientHeight-(d+p)),w=ot(a),x={rootMargin:-f+"px "+-m+"px "+-g+"px "+-w+"px",threshold:$(0,Y(1,l))||1};let y=!0;function b(v){const _=v[0].intersectionRatio;if(_!==l){if(!y)return r();_?r(!1,_):n=setTimeout(()=>{r(!1,1e-7)},1e3)}y=!1}try{o=new IntersectionObserver(b,{...x,root:i.ownerDocument})}catch{o=new IntersectionObserver(b,x)}o.observe(t)}return r(!0),s}function ge(t,e,o,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,a=ht(t),d=i||s?[...a?Q(a):[],...Q(e)]:[];d.forEach(h=>{i&&h.addEventListener("scroll",o,{passive:!0}),s&&h.addEventListener("resize",o)});const u=a&&c?pe(a,o):null;let p=-1,f=null;r&&(f=new ResizeObserver(h=>{let[x]=h;x&&x.target===a&&f&&(f.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var y;(y=f)==null||y.observe(e)})),o()}),a&&!l&&f.observe(a),f.observe(e));let m,g=l?H(t):null;l&&w();function w(){const h=H(t);g&&(h.x!==g.x||h.y!==g.y||h.width!==g.width||h.height!==g.height)&&o(),g=h,m=requestAnimationFrame(w)}return o(),()=>{var h;d.forEach(x=>{i&&x.removeEventListener("scroll",o),s&&x.removeEventListener("resize",o)}),u==null||u(),(h=f)==null||h.disconnect(),f=null,l&&cancelAnimationFrame(m)}}const he=Kt,we=Zt,xe=Ut,ye=qt,ve=(t,e,o)=>{const n=new Map,i={platform:me,...o},s={...i.platform,_c:n};return Yt(t,e,{...i,platform:s})},be="en";P("bg",()=>C(()=>import("./bg-r6cmeECz.js"),[],import.meta.url));P("de",()=>C(()=>import("./de-CDDnUb90.js"),[],import.meta.url));P("en",()=>C(()=>import("./en-DxK4I9Bw.js"),[],import.meta.url));P("he",()=>C(()=>import("./he-EvnTeWzX.js"),[],import.meta.url));P("pl",()=>C(()=>import("./pl-1NAmQj38.js"),[],import.meta.url));bt({fallbackLocale:be,initialLocale:window.navigator.language});function Ae(t){return["he"].includes(t)?"rtl":"ltr"}P("bg",()=>C(()=>import("./bg-r6cmeECz.js"),[],import.meta.url));P("de",()=>C(()=>import("./de-CDDnUb90.js"),[],import.meta.url));P("en",()=>C(()=>import("./en-DxK4I9Bw.js"),[],import.meta.url));P("he",()=>C(()=>import("./he-EvnTeWzX.js"),[],import.meta.url));P("pl",()=>C(()=>import("./pl-1NAmQj38.js"),[],import.meta.url));bt({fallbackLocale:"en",initialLocale:"en"});At.set("en");function Ee(t,e){const o=e.globals.locale;return At.set(o),document.dir=Ae(o),t()}function Re(t){return Mt(),t()}function _e(t){return kt.set({computePosition:ve,autoUpdate:ge,offset:he,shift:we,flip:xe,arrow:ye}),t()}const Ne={globalTypes:{locale:{description:"Internationalization locale",defaultValue:"en",toolbar:{icon:"globe",items:[{value:"bg",title:"Bulgarian"},{value:"de",title:"German"},{value:"en",title:"English"},{value:"he",title:"Hebrew"},{value:"pl",title:"Polish"}]}}},parameters:{actions:{argTypesRegex:"^on[A-Z].*"},controls:{matchers:{color:/(background|color)$/i,date:/Date$/i}}}},We=[Ee,_e,Re];export{We as decorators,Ne as default};