@qratilabs/qrati-connect 2.26.0 → 2.27.0

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.
Files changed (57) hide show
  1. package/element/{CVdpS1mF2.js → 1eQ9Ef0M2.js} +3 -3
  2. package/element/B0sEsGHn.js +8 -0
  3. package/element/B9ImRAum.js +1 -0
  4. package/element/{DwanMJWW.js → BKENYwOQ.js} +1 -1
  5. package/element/{DpD2Abx9.js → BLeZg2Bz.js} +1 -1
  6. package/element/{BfPopwQu2.js → BdkTKcG52.js} +8 -8
  7. package/element/{CwPz_TbG.js → BmsDSHUi.js} +1 -1
  8. package/element/{CM46pkhP2.js → BqiJLitq2.js} +1 -1
  9. package/element/{DLSVYuRG.js → BspExsK7.js} +2 -2
  10. package/element/Bspyv2wJ2.js +24 -0
  11. package/element/{D6nJgjWV.js → C4DSwLWc.js} +1 -1
  12. package/element/{CMR1TPJ1.js → C6MqLLDX.js} +1 -1
  13. package/element/C6YE4WUG2.js +5 -0
  14. package/element/C8meSsHD.js +1 -0
  15. package/element/CBM5QMn8.js +1 -0
  16. package/element/CKQOToSD.js +41 -0
  17. package/element/{DDyjgYNE.js → CUBxHQ8u.js} +1 -1
  18. package/element/CeHBrY_i.js +1 -0
  19. package/element/{BXZi_HIE.js → CfTdZB8y.js} +1 -1
  20. package/element/{xW6UboQF.js → CgxypkdG.js} +1 -1
  21. package/element/{DBUAmPz_.js → Cl0CwL5p.js} +1 -1
  22. package/element/DGZEznLT2.js +1 -0
  23. package/element/{Cw3szkAB.js → DLF5ysgi.js} +1 -1
  24. package/element/{BBWyJmHC.js → DOOdI-Oh.js} +1 -1
  25. package/element/DRPgs6nu2.js +16 -0
  26. package/element/{CDUjv5F52.js → DSx5wvUb2.js} +1 -1
  27. package/element/{BmU1kgIz2.js → DVFC5Z2L2.js} +14 -14
  28. package/element/{D9UPX_0d2.js → DWqIpaZ02.js} +1 -1
  29. package/element/{Bt5DH8OK.js → DZGp2V2-.js} +1 -1
  30. package/element/{DER_7fjj2.js → D_FNRN5A2.js} +1 -1
  31. package/element/{OGzsLhnG.js → DdYePHxG.js} +1 -1
  32. package/element/{BlD6lUxS.js → DlAI3J0X.js} +1 -1
  33. package/element/{CE4Zhv-W.js → DmIYOIw1.js} +1 -1
  34. package/element/DmpmrPE5.js +1 -0
  35. package/element/{Cqyszkb5.js → DvisvxzJ.js} +1 -1
  36. package/element/{CtWIgfGz.js → DyemeRjE2.js} +1 -1
  37. package/element/MU5QuIq0.js +3 -0
  38. package/element/{nOtAuUm1.js → QDuBhueG.js} +1 -1
  39. package/element/{Bb4v1eCh2.js → SgRzjPnr.js} +11 -11
  40. package/element/{PRmGsKkz2.js → Vk429P022.js} +1 -1
  41. package/element/{uIYtFcCq2.js → aXvUP7X72.js} +4 -4
  42. package/element/{BvrbBj1F.js → p0Q_2x6C.js} +1 -1
  43. package/element/{CzHEb5lR2.js → qBKIp1ZW2.js} +14 -14
  44. package/element/web.es.js +4 -4
  45. package/element/{CCDjXLSf.js → xJZs5Gan.js} +1 -1
  46. package/package.json +1 -1
  47. package/element/2CzUGwUv.js +0 -1
  48. package/element/BlmPmkho.js +0 -41
  49. package/element/CD7ZeUsI2.js +0 -9
  50. package/element/CitgNM58.js +0 -3
  51. package/element/DAjJ8IJf.js +0 -1
  52. package/element/DhbEeiM3.js +0 -8
  53. package/element/DvW8TE7T.js +0 -1
  54. package/element/KcnPb5CZ.js +0 -1
  55. package/element/PVzBLdl-2.js +0 -5
  56. package/element/VF9qDLJE2.js +0 -1
  57. package/element/b3Wjw4T02.js +0 -16
@@ -1 +1 @@
1
- import{_ as t,c as n,f as o,h as a,l as e,m as s,r,u as i}from"./DrrpB4Om.js";import{o as l}from"./BlmPmkho.js";var f=t=>"number"==typeof t&&!isNaN(t),c=t=>"string"==typeof t,d=t=>"function"==typeof t,y=t=>c(t)||d(t)?t:null,m=(t,n)=>!1===t||f(t)&&t>0?t:n,p=t=>i(t)||c(t)||d(t)||f(t);function u({enter:a,exit:e,appendPosition:r=!1,collapse:i=!0,collapseDuration:l=300}){return function({children:f,position:c,preventExitTransition:d,done:y,nodeRef:m,isIn:p,playToast:u}){let _=r?`${a}--${c}`:a,g=r?`${e}--${c}`:e,v=o(0);return s(()=>{let t=m.current,n=_.split(" "),o=a=>{a.target===m.current&&(u(),t.removeEventListener("animationend",o),t.removeEventListener("animationcancel",o),0===v.current&&"animationcancel"!==a.type&&t.classList.remove(...n))};t.classList.add(...n),t.addEventListener("animationend",o),t.addEventListener("animationcancel",o)},[]),t(()=>{let t=m.current,n=()=>{t.removeEventListener("animationend",n),i?function(t,n,o=300){let{scrollHeight:a,style:e}=t;requestAnimationFrame(()=>{e.minHeight="initial",e.height=a+"px",e.transition=`all ${o}ms`,requestAnimationFrame(()=>{e.height="0",e.padding="0",e.margin="0",setTimeout(n,o)})})}(t,y,l):y()};p||(d?n():(v.current=1,t.className+=` ${g}`,t.addEventListener("animationend",n)))},[p]),n.createElement(n.Fragment,null,f)}}function _(t,n){return{content:g(t.content,t.props),containerId:t.props.containerId,id:t.props.toastId,theme:t.props.theme,type:t.props.type,data:t.props.data||{},isLoading:t.props.isLoading,icon:t.props.icon,reason:t.removalReason,status:n}}function g(t,n,o=!1){return i(t)&&!c(t.type)?e(t,{closeToast:n.closeToast,toastProps:n,data:n.data,isPaused:o}):d(t)?t({closeToast:n.closeToast,toastProps:n,data:n.data,isPaused:o}):t}function v({delay:t,isRunning:o,closeToast:a,type:e="default",hide:s,className:r,controlledProgress:i,progress:f,rtl:c,isIn:y,theme:m}){let p=s||i&&0===f,u={animationDuration:`${t}ms`,animationPlayState:o?"running":"paused"};i&&(u.transform=`scaleX(${f})`);let _=l("Toastify__progress-bar",i?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${m}`,`Toastify__progress-bar--${e}`,{"Toastify__progress-bar--rtl":c}),g=d(r)?r({rtl:c,type:e,defaultClassName:_}):l(_,r),v={[i&&f>=1?"onTransitionEnd":"onAnimationEnd"]:i&&f<1?null:()=>{y&&a()}};return n.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":p},n.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${m} Toastify__progress-bar--${e}`}),n.createElement("div",{role:"progressbar","aria-hidden":p?"true":"false","aria-label":"notification timer","aria-valuenow":i?Math.round(100*f):void 0,"aria-valuemin":0,"aria-valuemax":100,className:g,style:u,...v}))}var b=1,T=()=>""+b++;var h=/* @__PURE__ */new Map,x=[],k=/* @__PURE__ */new Set,w=t=>k.forEach(n=>n(t)),I=()=>h.size>0;function E(t,n){var o;if(n)return!(null==(o=h.get(n))||!o.isToastActive(t));let a=!1;return h.forEach(n=>{n.isToastActive(t)&&(a=!0)}),a}function L(t,n){p(t)&&(I()||x.push({content:t,options:n}),h.forEach(o=>{o.buildToast(t,n)}))}function C(t,n){h.forEach(o=>{(null==n||null==n||!n.containerId||(null==n?void 0:n.containerId)===o.id)&&o.toggle(t,null==n?void 0:n.id)})}function O(t){let n=t.containerId||1;return{subscribe(o){let a=function(t,n,o){let a=1,e=0,s=[],r=[],i=n,l=/* @__PURE__ */new Map,c=/* @__PURE__ */new Set,d=()=>{r=Array.from(l.values()),c.forEach(t=>t())},u=t=>{var n,a;t.isActive&&(null==(a=null==(n=t.props)?void 0:n.onClose)||a.call(n,t.removalReason),t.isActive=!1,o(_(t,"removed")))},g=t=>{if(null==t)l.forEach(u);else{let n=l.get(t);n&&u(n)}d()},v=t=>{var n,a;let{toastId:e,updateId:s}=t.props,r=null==s;t.staleId&&l.delete(t.staleId),t.isActive=!0,l.set(e,t),d(),o(_(t,r?"added":"updated")),r&&(null==(a=(n=t.props).onOpen)||a.call(n))};return{id:t,props:i,observe:t=>(c.add(t),()=>c.delete(t)),toggle:(t,n)=>{l.forEach(o=>{var a;(null==n||n===o.props.toastId)&&(null==(a=o.toggle)||a.call(o,t))})},removeToast:g,toasts:l,clearQueue:()=>{e-=s.length,s=[]},buildToast:(n,o)=>{if((({containerId:n,toastId:o,updateId:a})=>{let e=n?n!==t:1!==t,s=l.has(o)&&null==a;return e||s})(o))return;let{toastId:r,updateId:c,data:u,staleId:_,delay:b}=o,T=null==c;T&&e++;let h={...i,style:i.toastStyle,key:a++,...Object.fromEntries(Object.entries(o).filter(([t,n])=>null!=n)),toastId:r,updateId:c,data:u,isIn:!1,className:y(o.className||i.toastClassName),progressClassName:y(o.progressClassName||i.progressClassName),autoClose:!o.isLoading&&m(o.autoClose,i.autoClose),closeToast(t){let n=l.get(r);n&&(n.removalReason=t,g(r))},deleteToast(){if(null!=l.get(r)){if(l.delete(r),e--,e<0&&(e=0),s.length>0)return void v(s.shift());d()}}};h.closeButton=i.closeButton,!1===o.closeButton||p(o.closeButton)?h.closeButton=o.closeButton:!0===o.closeButton&&(h.closeButton=!p(i.closeButton)||i.closeButton);let x={content:n,props:h,staleId:_};i.limit&&i.limit>0&&e>i.limit&&T?s.push(x):f(b)?setTimeout(()=>{v(x)},b):v(x)},setProps(t){i=t},setToggle:(t,n)=>{let o=l.get(t);o&&(o.toggle=n)},isToastActive:t=>{var n;return null==(n=l.get(t))?void 0:n.isActive},getSnapshot:()=>r}}(n,t,w);h.set(n,a);let e=a.observe(o);return x.forEach(t=>L(t.content,t.options)),x=[],()=>{e(),h.delete(n)}},setProps(t){var o;null==(o=h.get(n))||o.setProps(t)},getSnapshot(){var t;return null==(t=h.get(n))?void 0:t.getSnapshot()}}}function z(t){return t&&(c(t.toastId)||f(t.toastId))?t.toastId:T()}function P(t,n){return L(t,n),n.toastId}function $(t,n){return{...n,type:n&&n.type||t,toastId:z(n)}}function N(t){return(n,o)=>P(n,$(t,o))}function A(t,n){return P(t,$("default",n))}function D(t){var n;let{subscribe:a,getSnapshot:e,setProps:s}=o(O(t)).current;s(t);let i=null==(n=r(a,e,e))?void 0:n.slice();return{getToastToRender:function(n){if(!i)return[];let o=/* @__PURE__ */new Map;return t.newestOnTop&&i.reverse(),i.forEach(t=>{let{position:n}=t.props;o.has(n)||o.set(n,[]),o.get(n).push(t)}),Array.from(o,t=>n(t[0],t[1]))},isToastActive:E,count:null==i?void 0:i.length}}function M(n){let[e,s]=a(!1),[r,i]=a(!1),l=o(null),f=o({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:c,pauseOnHover:d,closeToast:y,onClick:m,closeOnClick:p}=n;function u(){s(!0)}function _(){s(!1)}function g(t){let o=l.current;if(f.canDrag&&o){f.didMove=!0,e&&_(),"x"===n.draggableDirection?f.delta=t.clientX-f.start:f.delta=t.clientY-f.start,f.start!==t.clientX&&(f.canCloseOnClick=!1);let a="x"===n.draggableDirection?`${f.delta}px, var(--y)`:`0, calc(${f.delta}px + var(--y))`;o.style.transform=`translate3d(${a},0)`,o.style.opacity=""+(1-Math.abs(f.delta/f.removalDistance))}}function v(){document.removeEventListener("pointermove",g),document.removeEventListener("pointerup",v);let t=l.current;if(f.canDrag&&f.didMove&&t){if(f.canDrag=!1,Math.abs(f.delta)>f.removalDistance)return i(!0),n.closeToast(!0),void n.collapseAll();t.style.transition="transform 0.2s, opacity 0.2s",t.style.removeProperty("transform"),t.style.removeProperty("opacity")}}(function(t){var n;null==(n=h.get(t.containerId||1))||n.setToggle(t.id,t.fn)})({id:n.toastId,containerId:n.containerId,fn:s}),t(()=>{if(n.pauseOnFocusLoss)return document.hasFocus()||_(),window.addEventListener("focus",u),window.addEventListener("blur",_),()=>{window.removeEventListener("focus",u),window.removeEventListener("blur",_)}},[n.pauseOnFocusLoss]);let b={onPointerDown:function(t){if(!0===n.draggable||n.draggable===t.pointerType){f.didMove=!1,document.addEventListener("pointermove",g),document.addEventListener("pointerup",v);let o=l.current;f.canCloseOnClick=!0,f.canDrag=!0,o.style.transition="none","x"===n.draggableDirection?(f.start=t.clientX,f.removalDistance=o.offsetWidth*(n.draggablePercent/100)):(f.start=t.clientY,f.removalDistance=o.offsetHeight*(80===n.draggablePercent?1.5*n.draggablePercent:n.draggablePercent)/100)}},onPointerUp:function(t){let{top:o,bottom:a,left:e,right:s}=l.current.getBoundingClientRect();"mouse"===t.pointerType&&n.pauseOnHover&&t.clientX>=e&&t.clientX<=s&&t.clientY>=o&&t.clientY<=a?_():u()}};return c&&d&&(b.onMouseEnter=_,n.stacked||(b.onMouseLeave=u)),p&&(b.onClick=t=>{m&&m(t),f.canCloseOnClick&&y(!0)}),{playToast:u,pauseToast:_,isRunning:e,preventExitTransition:r,toastRef:l,eventHandlers:b}}A.loading=(t,n)=>P(t,$("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...n})),A.promise=function(t,{pending:n,error:o,success:a},e){let s;n&&(s=c(n)?A.loading(n,e):A.loading(n.render,{...e,...n}));let r={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},i=(t,n,o)=>{if(null==n)return void A.dismiss(s);let a={type:t,...r,...e,data:o},i=c(n)?{render:n}:n;return s?A.update(s,{...a,...i}):A(i.render,{...a,...i}),o},l=d(t)?t():t;return l.then(t=>i("success",a,t)).catch(t=>i("error",o,t)),l},A.success=N("success"),A.info=N("info"),A.error=N("error"),A.warning=N("warning"),A.warn=A.warning,A.dark=(t,n)=>P(t,$("default",{theme:"dark",...n})),A.dismiss=function(t){!function(t){if(I()){if(null==t||(t=>c(t)||f(t))(t))h.forEach(n=>{n.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){let n=h.get(t.containerId);n?n.removeToast(t.id):h.forEach(n=>{n.removeToast(t.id)})}}else x=x.filter(n=>null!=t&&n.options.toastId!==t)}(t)},A.clearWaitingQueue=(t={})=>{h.forEach(n=>{n.props.limit&&(!t.containerId||n.id===t.containerId)&&n.clearQueue()})},A.isActive=E,A.update=(t,n={})=>{let o=((t,{containerId:n})=>{var o;return null==(o=h.get(n||1))?void 0:o.toasts.get(t)})(t,n);if(o){let{props:a,content:e}=o,s={delay:100,...a,...n,toastId:n.toastId||t,updateId:T()};s.toastId!==t&&(s.staleId=t);let r=s.render||e;delete s.render,P(r,s)}},A.done=t=>{A.update(t,{progress:1})},A.onChange=function(t){return k.add(t),()=>{k.delete(t)}},A.play=t=>C(!0,t),A.pause=t=>C(!1,t);var R="undefined"!=typeof window?s:t,B=({theme:t,type:o,isLoading:a,...e})=>n.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===t?"currentColor":`var(--toastify-icon-color-${o})`,...e}),X={info:function(t){return n.createElement(B,{...t},n.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(t){return n.createElement(B,{...t},n.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(t){return n.createElement(B,{...t},n.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(t){return n.createElement(B,{...t},n.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return n.createElement("div",{className:"Toastify__spinner"})}};var S=t=>{let{isRunning:o,preventExitTransition:a,toastRef:s,eventHandlers:r,playToast:f}=M(t),{closeButton:c,children:y,autoClose:m,onClick:p,type:u,hideProgressBar:_,closeToast:b,transition:T,position:h,className:x,style:k,progressClassName:w,updateId:I,role:E,progress:L,rtl:C,toastId:O,deleteToast:z,isIn:P,isLoading:$,closeOnClick:N,theme:A,ariaLabel:D}=t,R=l("Toastify__toast",`Toastify__toast-theme--${A}`,`Toastify__toast--${u}`,{"Toastify__toast--rtl":C},{"Toastify__toast--close-on-click":N}),B=d(x)?x({rtl:C,position:h,type:u,defaultClassName:R}):l(R,x),S=function({theme:t,type:n,isLoading:o,icon:a}){let s=null,r={theme:t,type:n};return!1===a||(d(a)?s=a({...r,isLoading:o}):i(a)?s=e(a,r):o?s=X.spinner():(t=>t in X)(n)&&(s=X[n](r))),s}(t),U=!!L||!m,H={closeToast:b,type:u,theme:A},F=null;return!1===c||(F=d(c)?c(H):i(c)?e(c,H):function({closeToast:t,theme:o,ariaLabel:a="close"}){return n.createElement("button",{className:`Toastify__close-button Toastify__close-button--${o}`,type:"button",onClick:n=>{n.stopPropagation(),t(!0)},"aria-label":a},n.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},n.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(H)),n.createElement(T,{isIn:P,done:z,position:h,preventExitTransition:a,nodeRef:s,playToast:f},n.createElement("div",{id:O,tabIndex:0,onClick:p,"data-in":P,className:B,...r,style:k,ref:s,...P&&{role:E,"aria-label":D}},null!=S&&n.createElement("div",{className:l("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!$})},S),g(y,t,!o),F,!t.customProgressBar&&n.createElement(v,{...I&&!U?{key:`p-${I}`}:{},rtl:C,theme:A,delay:m,isRunning:o,isIn:P,closeToast:b,hide:_,type:u,className:w,controlledProgress:U,progress:L||0})))},U=(t,n=!1)=>({enter:`Toastify--animate Toastify__${t}-enter`,exit:`Toastify--animate Toastify__${t}-exit`,appendPosition:n}),H=u(U("bounce",!0)),F=(u(U("slide",!0)),u(U("zoom")),u(U("flip")),{position:"top-right",transition:H,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light","aria-label":"Notifications Alt+T",hotKeys:t=>t.altKey&&"KeyT"===t.code});function Y(e){let s={...F,...e},r=e.stacked,[i,f]=a(!0),c=o(null),{getToastToRender:m,isToastActive:p,count:u}=D(s),{className:_,style:g,rtl:v,containerId:b,hotKeys:T}=s;function h(t){let n=l("Toastify__toast-container",`Toastify__toast-container--${t}`,{"Toastify__toast-container--rtl":v});return d(_)?_({position:t,rtl:v,defaultClassName:n}):l(n,y(_))}function x(){r&&(f(!0),A.play())}return R(()=>{var t;if(r){let n=c.current.querySelectorAll('[data-in="true"]'),o=12,a=null==(t=s.position)?void 0:t.includes("top"),e=0,r=0;Array.from(n).reverse().forEach((t,n)=>{let s=t;s.classList.add("Toastify__toast--stacked"),n>0&&(s.dataset.collapsed=`${i}`),s.dataset.pos||(s.dataset.pos=a?"top":"bot");let l=e*(i?.2:1)+(i?0:o*n),f=Math.max(.5,1-(i?r:0));s.style.setProperty("--y",`${a?l:-1*l}px`),s.style.setProperty("--g",`${o}`),s.style.setProperty("--s",`${f}`),e+=s.offsetHeight,r+=.025})}},[i,u,r]),t(()=>{function t(t){var n;let o=c.current;T(t)&&(null==(n=null==o?void 0:o.querySelector('[tabIndex="0"]'))||n.focus(),f(!1),A.pause()),"Escape"===t.key&&(document.activeElement===o||null!=o&&o.contains(document.activeElement))&&(f(!0),A.play())}return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[T]),n.createElement("section",{ref:c,className:"Toastify",id:b,onMouseEnter:()=>{r&&(f(!1),A.pause())},onMouseLeave:x,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text","aria-label":s["aria-label"]},m((t,o)=>{let a=o.length?{...g}:{...g,pointerEvents:"none"};return n.createElement("div",{tabIndex:-1,className:h(t),"data-stacked":r,style:a,key:`c-${t}`},o.map(({content:t,props:o})=>n.createElement(S,{...o,stacked:r,collapseAll:x,isIn:p(o.toastId,o.containerId),key:`t-${o.key}`},t)))}))}var j=/* @__PURE__ */new Map;function q(t){return((t,n)=>{R(()=>{if("undefined"==typeof document)return;let o=document,a=j.get(o);if(a)return void(n&&a.setAttribute("nonce",n));let e=o.createElement("style");e.textContent=t,n&&e.setAttribute("nonce",n),o.head.appendChild(e),j.set(o,e)},[n])})(":root {\n --toastify-color-light: #fff;\n --toastify-color-dark: #121212;\n --toastify-color-info: #3498db;\n --toastify-color-success: #07bc0c;\n --toastify-color-warning: #f1c40f;\n --toastify-color-error: hsl(6, 78%, 57%);\n --toastify-color-transparent: rgba(255, 255, 255, 0.7);\n\n --toastify-icon-color-info: var(--toastify-color-info);\n --toastify-icon-color-success: var(--toastify-color-success);\n --toastify-icon-color-warning: var(--toastify-color-warning);\n --toastify-icon-color-error: var(--toastify-color-error);\n\n --toastify-container-width: fit-content;\n --toastify-toast-width: 320px;\n --toastify-toast-offset: 16px;\n --toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));\n --toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));\n --toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));\n --toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));\n --toastify-toast-background: #fff;\n --toastify-toast-padding: 14px;\n --toastify-toast-min-height: 64px;\n --toastify-toast-max-height: 800px;\n --toastify-toast-bd-radius: 6px;\n --toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);\n --toastify-font-family: sans-serif;\n --toastify-z-index: 9999;\n --toastify-text-color-light: #757575;\n --toastify-text-color-dark: #fff;\n\n /* Used only for colored theme */\n --toastify-text-color-info: #fff;\n --toastify-text-color-success: #fff;\n --toastify-text-color-warning: #fff;\n --toastify-text-color-error: #fff;\n\n --toastify-spinner-color: #616161;\n --toastify-spinner-color-empty-area: #e0e0e0;\n --toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);\n --toastify-color-progress-dark: #bb86fc;\n --toastify-color-progress-info: var(--toastify-color-info);\n --toastify-color-progress-success: var(--toastify-color-success);\n --toastify-color-progress-warning: var(--toastify-color-warning);\n --toastify-color-progress-error: var(--toastify-color-error);\n /* used to control the opacity of the progress trail */\n --toastify-color-progress-bgo: 0.2;\n}\n\n.Toastify__toast-container {\n z-index: var(--toastify-z-index);\n -webkit-transform: translate3d(0, 0, var(--toastify-z-index));\n position: fixed;\n width: var(--toastify-container-width);\n box-sizing: border-box;\n color: #fff;\n display: flex;\n flex-direction: column;\n}\n\n.Toastify__toast-container--top-left {\n top: var(--toastify-toast-top);\n left: var(--toastify-toast-left);\n}\n.Toastify__toast-container--top-center {\n top: var(--toastify-toast-top);\n left: 50%;\n transform: translateX(-50%);\n align-items: center;\n}\n.Toastify__toast-container--top-right {\n top: var(--toastify-toast-top);\n right: var(--toastify-toast-right);\n align-items: end;\n}\n.Toastify__toast-container--bottom-left {\n bottom: var(--toastify-toast-bottom);\n left: var(--toastify-toast-left);\n}\n.Toastify__toast-container--bottom-center {\n bottom: var(--toastify-toast-bottom);\n left: 50%;\n transform: translateX(-50%);\n align-items: center;\n}\n.Toastify__toast-container--bottom-right {\n bottom: var(--toastify-toast-bottom);\n right: var(--toastify-toast-right);\n align-items: end;\n}\n\n.Toastify__toast {\n --y: 0px;\n position: relative;\n touch-action: none;\n width: var(--toastify-toast-width);\n min-height: var(--toastify-toast-min-height);\n box-sizing: border-box;\n margin-bottom: 1rem;\n padding: var(--toastify-toast-padding);\n border-radius: var(--toastify-toast-bd-radius);\n box-shadow: var(--toastify-toast-shadow);\n max-height: var(--toastify-toast-max-height);\n font-family: var(--toastify-font-family);\n /* webkit only issue #791 */\n z-index: 0;\n /* inner swag */\n display: flex;\n flex: 1 auto;\n align-items: center;\n word-break: break-word;\n}\n\n@media only screen and (max-width: 480px) {\n .Toastify__toast-container {\n width: 100vw;\n left: env(safe-area-inset-left);\n margin: 0;\n }\n .Toastify__toast-container--top-left,\n .Toastify__toast-container--top-center,\n .Toastify__toast-container--top-right {\n top: env(safe-area-inset-top);\n transform: translateX(0);\n }\n .Toastify__toast-container--bottom-left,\n .Toastify__toast-container--bottom-center,\n .Toastify__toast-container--bottom-right {\n bottom: env(safe-area-inset-bottom);\n transform: translateX(0);\n }\n .Toastify__toast-container--rtl {\n right: env(safe-area-inset-right);\n left: initial;\n }\n .Toastify__toast {\n --toastify-toast-width: 100%;\n margin-bottom: 0;\n border-radius: 0;\n }\n}\n\n.Toastify__toast-container[data-stacked='true'] {\n width: var(--toastify-toast-width);\n}\n\n@media only screen and (max-width: 480px) {\n .Toastify__toast-container[data-stacked='true'] {\n width: 100vw;\n }\n}\n\n.Toastify__toast--stacked {\n position: absolute;\n width: 100%;\n transform: translate3d(0, var(--y), 0) scale(var(--s));\n transition: transform 0.3s;\n}\n\n.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,\n.Toastify__toast--stacked[data-collapsed] .Toastify__close-button {\n transition: opacity 0.1s;\n}\n\n.Toastify__toast--stacked[data-collapsed='false'] {\n overflow: visible;\n}\n\n.Toastify__toast--stacked[data-collapsed='true']:not(:last-child) > * {\n opacity: 0;\n}\n\n.Toastify__toast--stacked:after {\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n height: calc(var(--g) * 1px);\n bottom: 100%;\n}\n\n.Toastify__toast--stacked[data-pos='top'] {\n top: 0;\n}\n\n.Toastify__toast--stacked[data-pos='bot'] {\n bottom: 0;\n}\n\n.Toastify__toast--stacked[data-pos='bot'].Toastify__toast--stacked:before {\n transform-origin: top;\n}\n\n.Toastify__toast--stacked[data-pos='top'].Toastify__toast--stacked:before {\n transform-origin: bottom;\n}\n\n.Toastify__toast--stacked:before {\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n height: 100%;\n transform: scaleY(3);\n z-index: -1;\n}\n\n.Toastify__toast--rtl {\n direction: rtl;\n}\n\n.Toastify__toast--close-on-click {\n cursor: pointer;\n}\n\n.Toastify__toast-icon {\n margin-inline-end: 10px;\n width: 22px;\n flex-shrink: 0;\n display: flex;\n}\n\n.Toastify--animate {\n animation-fill-mode: both;\n animation-duration: 0.5s;\n}\n\n.Toastify--animate-icon {\n animation-fill-mode: both;\n animation-duration: 0.3s;\n}\n\n.Toastify__toast-theme--dark {\n background: var(--toastify-color-dark);\n color: var(--toastify-text-color-dark);\n}\n\n.Toastify__toast-theme--light {\n background: var(--toastify-color-light);\n color: var(--toastify-text-color-light);\n}\n\n.Toastify__toast-theme--colored.Toastify__toast--default {\n background: var(--toastify-color-light);\n color: var(--toastify-text-color-light);\n}\n\n.Toastify__toast-theme--colored.Toastify__toast--info {\n color: var(--toastify-text-color-info);\n background: var(--toastify-color-info);\n}\n\n.Toastify__toast-theme--colored.Toastify__toast--success {\n color: var(--toastify-text-color-success);\n background: var(--toastify-color-success);\n}\n\n.Toastify__toast-theme--colored.Toastify__toast--warning {\n color: var(--toastify-text-color-warning);\n background: var(--toastify-color-warning);\n}\n\n.Toastify__toast-theme--colored.Toastify__toast--error {\n color: var(--toastify-text-color-error);\n background: var(--toastify-color-error);\n}\n\n.Toastify__progress-bar-theme--light {\n background: var(--toastify-color-progress-light);\n}\n\n.Toastify__progress-bar-theme--dark {\n background: var(--toastify-color-progress-dark);\n}\n\n.Toastify__progress-bar--info {\n background: var(--toastify-color-progress-info);\n}\n\n.Toastify__progress-bar--success {\n background: var(--toastify-color-progress-success);\n}\n\n.Toastify__progress-bar--warning {\n background: var(--toastify-color-progress-warning);\n}\n\n.Toastify__progress-bar--error {\n background: var(--toastify-color-progress-error);\n}\n\n.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,\n.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,\n.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,\n.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error {\n background: var(--toastify-color-transparent);\n}\n\n.Toastify__close-button {\n color: #fff;\n position: absolute;\n top: 6px;\n right: 6px;\n background: transparent;\n outline: none;\n border: none;\n padding: 0;\n cursor: pointer;\n opacity: 0.7;\n transition: 0.3s ease;\n z-index: 1;\n}\n\n.Toastify__toast--rtl .Toastify__close-button {\n left: 6px;\n right: unset;\n}\n\n.Toastify__close-button--light {\n color: #000;\n opacity: 0.3;\n}\n\n.Toastify__close-button > svg {\n fill: currentColor;\n height: 16px;\n width: 14px;\n}\n\n.Toastify__close-button:hover,\n.Toastify__close-button:focus {\n opacity: 1;\n}\n\n@keyframes Toastify__trackProgress {\n 0% {\n transform: scaleX(1);\n }\n 100% {\n transform: scaleX(0);\n }\n}\n\n.Toastify__progress-bar {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 1;\n opacity: 0.7;\n transform-origin: left;\n}\n\n.Toastify__progress-bar--animated {\n animation: Toastify__trackProgress linear 1 forwards;\n}\n\n.Toastify__progress-bar--controlled {\n transition: transform 0.2s;\n}\n\n.Toastify__progress-bar--rtl {\n right: 0;\n left: initial;\n transform-origin: right;\n border-bottom-left-radius: initial;\n}\n\n.Toastify__progress-bar--wrp {\n position: absolute;\n overflow: hidden;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 5px;\n border-bottom-left-radius: var(--toastify-toast-bd-radius);\n border-bottom-right-radius: var(--toastify-toast-bd-radius);\n}\n\n.Toastify__progress-bar--wrp[data-hidden='true'] {\n opacity: 0;\n}\n\n.Toastify__progress-bar--bg {\n opacity: var(--toastify-color-progress-bgo);\n width: 100%;\n height: 100%;\n}\n\n.Toastify__spinner {\n width: 20px;\n height: 20px;\n box-sizing: border-box;\n border: 2px solid;\n border-radius: 100%;\n border-color: var(--toastify-spinner-color-empty-area);\n border-right-color: var(--toastify-spinner-color);\n animation: Toastify__spin 0.65s linear infinite;\n}\n\n@keyframes Toastify__bounceInRight {\n from,\n 60%,\n 75%,\n 90%,\n to {\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n from {\n opacity: 0;\n transform: translate3d(3000px, 0, 0);\n }\n 60% {\n opacity: 1;\n transform: translate3d(-25px, 0, 0);\n }\n 75% {\n transform: translate3d(10px, 0, 0);\n }\n 90% {\n transform: translate3d(-5px, 0, 0);\n }\n to {\n transform: none;\n }\n}\n\n@keyframes Toastify__bounceOutRight {\n 20% {\n opacity: 1;\n transform: translate3d(-20px, var(--y), 0);\n }\n to {\n opacity: 0;\n transform: translate3d(2000px, var(--y), 0);\n }\n}\n\n@keyframes Toastify__bounceInLeft {\n from,\n 60%,\n 75%,\n 90%,\n to {\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n 0% {\n opacity: 0;\n transform: translate3d(-3000px, 0, 0);\n }\n 60% {\n opacity: 1;\n transform: translate3d(25px, 0, 0);\n }\n 75% {\n transform: translate3d(-10px, 0, 0);\n }\n 90% {\n transform: translate3d(5px, 0, 0);\n }\n to {\n transform: none;\n }\n}\n\n@keyframes Toastify__bounceOutLeft {\n 20% {\n opacity: 1;\n transform: translate3d(20px, var(--y), 0);\n }\n to {\n opacity: 0;\n transform: translate3d(-2000px, var(--y), 0);\n }\n}\n\n@keyframes Toastify__bounceInUp {\n from,\n 60%,\n 75%,\n 90%,\n to {\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n from {\n opacity: 0;\n transform: translate3d(0, 3000px, 0);\n }\n 60% {\n opacity: 1;\n transform: translate3d(0, -20px, 0);\n }\n 75% {\n transform: translate3d(0, 10px, 0);\n }\n 90% {\n transform: translate3d(0, -5px, 0);\n }\n to {\n transform: translate3d(0, 0, 0);\n }\n}\n\n@keyframes Toastify__bounceOutUp {\n 20% {\n transform: translate3d(0, calc(var(--y) - 10px), 0);\n }\n 40%,\n 45% {\n opacity: 1;\n transform: translate3d(0, calc(var(--y) + 20px), 0);\n }\n to {\n opacity: 0;\n transform: translate3d(0, -2000px, 0);\n }\n}\n\n@keyframes Toastify__bounceInDown {\n from,\n 60%,\n 75%,\n 90%,\n to {\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n 0% {\n opacity: 0;\n transform: translate3d(0, -3000px, 0);\n }\n 60% {\n opacity: 1;\n transform: translate3d(0, 25px, 0);\n }\n 75% {\n transform: translate3d(0, -10px, 0);\n }\n 90% {\n transform: translate3d(0, 5px, 0);\n }\n to {\n transform: none;\n }\n}\n\n@keyframes Toastify__bounceOutDown {\n 20% {\n transform: translate3d(0, calc(var(--y) - 10px), 0);\n }\n 40%,\n 45% {\n opacity: 1;\n transform: translate3d(0, calc(var(--y) + 20px), 0);\n }\n to {\n opacity: 0;\n transform: translate3d(0, 2000px, 0);\n }\n}\n\n.Toastify__bounce-enter--top-left,\n.Toastify__bounce-enter--bottom-left {\n animation-name: Toastify__bounceInLeft;\n}\n\n.Toastify__bounce-enter--top-right,\n.Toastify__bounce-enter--bottom-right {\n animation-name: Toastify__bounceInRight;\n}\n\n.Toastify__bounce-enter--top-center {\n animation-name: Toastify__bounceInDown;\n}\n\n.Toastify__bounce-enter--bottom-center {\n animation-name: Toastify__bounceInUp;\n}\n\n.Toastify__bounce-exit--top-left,\n.Toastify__bounce-exit--bottom-left {\n animation-name: Toastify__bounceOutLeft;\n}\n\n.Toastify__bounce-exit--top-right,\n.Toastify__bounce-exit--bottom-right {\n animation-name: Toastify__bounceOutRight;\n}\n\n.Toastify__bounce-exit--top-center {\n animation-name: Toastify__bounceOutUp;\n}\n\n.Toastify__bounce-exit--bottom-center {\n animation-name: Toastify__bounceOutDown;\n}\n\n@keyframes Toastify__zoomIn {\n from {\n opacity: 0;\n transform: scale3d(0.3, 0.3, 0.3);\n }\n 50% {\n opacity: 1;\n }\n}\n\n@keyframes Toastify__zoomOut {\n from {\n opacity: 1;\n }\n 50% {\n opacity: 0;\n transform: translate3d(0, var(--y), 0) scale3d(0.3, 0.3, 0.3);\n }\n to {\n opacity: 0;\n }\n}\n\n.Toastify__zoom-enter {\n animation-name: Toastify__zoomIn;\n}\n\n.Toastify__zoom-exit {\n animation-name: Toastify__zoomOut;\n}\n\n@keyframes Toastify__flipIn {\n from {\n transform: perspective(400px) rotate3d(1, 0, 0, 90deg);\n animation-timing-function: ease-in;\n opacity: 0;\n }\n 40% {\n transform: perspective(400px) rotate3d(1, 0, 0, -20deg);\n animation-timing-function: ease-in;\n }\n 60% {\n transform: perspective(400px) rotate3d(1, 0, 0, 10deg);\n opacity: 1;\n }\n 80% {\n transform: perspective(400px) rotate3d(1, 0, 0, -5deg);\n }\n to {\n transform: perspective(400px);\n }\n}\n\n@keyframes Toastify__flipOut {\n from {\n transform: translate3d(0, var(--y), 0) perspective(400px);\n }\n 30% {\n transform: translate3d(0, var(--y), 0) perspective(400px) rotate3d(1, 0, 0, -20deg);\n opacity: 1;\n }\n to {\n transform: translate3d(0, var(--y), 0) perspective(400px) rotate3d(1, 0, 0, 90deg);\n opacity: 0;\n }\n}\n\n.Toastify__flip-enter {\n animation-name: Toastify__flipIn;\n}\n\n.Toastify__flip-exit {\n animation-name: Toastify__flipOut;\n}\n\n@keyframes Toastify__slideInRight {\n from {\n transform: translate3d(110%, 0, 0);\n visibility: visible;\n }\n to {\n transform: translate3d(0, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideInLeft {\n from {\n transform: translate3d(-110%, 0, 0);\n visibility: visible;\n }\n to {\n transform: translate3d(0, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideInUp {\n from {\n transform: translate3d(0, 110%, 0);\n visibility: visible;\n }\n to {\n transform: translate3d(0, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideInDown {\n from {\n transform: translate3d(0, -110%, 0);\n visibility: visible;\n }\n to {\n transform: translate3d(0, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideOutRight {\n from {\n transform: translate3d(0, var(--y), 0);\n }\n to {\n visibility: hidden;\n transform: translate3d(110%, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideOutLeft {\n from {\n transform: translate3d(0, var(--y), 0);\n }\n to {\n visibility: hidden;\n transform: translate3d(-110%, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideOutDown {\n from {\n transform: translate3d(0, var(--y), 0);\n }\n to {\n visibility: hidden;\n transform: translate3d(0, 500px, 0);\n }\n}\n\n@keyframes Toastify__slideOutUp {\n from {\n transform: translate3d(0, var(--y), 0);\n }\n to {\n visibility: hidden;\n transform: translate3d(0, -500px, 0);\n }\n}\n\n.Toastify__slide-enter--top-left,\n.Toastify__slide-enter--bottom-left {\n animation-name: Toastify__slideInLeft;\n}\n\n.Toastify__slide-enter--top-right,\n.Toastify__slide-enter--bottom-right {\n animation-name: Toastify__slideInRight;\n}\n\n.Toastify__slide-enter--top-center {\n animation-name: Toastify__slideInDown;\n}\n\n.Toastify__slide-enter--bottom-center {\n animation-name: Toastify__slideInUp;\n}\n\n.Toastify__slide-exit--top-left,\n.Toastify__slide-exit--bottom-left {\n animation-name: Toastify__slideOutLeft;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n\n.Toastify__slide-exit--top-right,\n.Toastify__slide-exit--bottom-right {\n animation-name: Toastify__slideOutRight;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n\n.Toastify__slide-exit--top-center {\n animation-name: Toastify__slideOutUp;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n\n.Toastify__slide-exit--bottom-center {\n animation-name: Toastify__slideOutDown;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n\n@keyframes Toastify__spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n",t.nonce),n.createElement(Y,{...t})}export{A as n,q as t};
1
+ import{_ as t,c as n,f as o,h as a,l as e,m as s,r,u as i}from"./DrrpB4Om.js";import{o as l}from"./CKQOToSD.js";var f=t=>"number"==typeof t&&!isNaN(t),c=t=>"string"==typeof t,d=t=>"function"==typeof t,y=t=>c(t)||d(t)?t:null,m=(t,n)=>!1===t||f(t)&&t>0?t:n,p=t=>i(t)||c(t)||d(t)||f(t);function u({enter:a,exit:e,appendPosition:r=!1,collapse:i=!0,collapseDuration:l=300}){return function({children:f,position:c,preventExitTransition:d,done:y,nodeRef:m,isIn:p,playToast:u}){let _=r?`${a}--${c}`:a,g=r?`${e}--${c}`:e,v=o(0);return s(()=>{let t=m.current,n=_.split(" "),o=a=>{a.target===m.current&&(u(),t.removeEventListener("animationend",o),t.removeEventListener("animationcancel",o),0===v.current&&"animationcancel"!==a.type&&t.classList.remove(...n))};t.classList.add(...n),t.addEventListener("animationend",o),t.addEventListener("animationcancel",o)},[]),t(()=>{let t=m.current,n=()=>{t.removeEventListener("animationend",n),i?function(t,n,o=300){let{scrollHeight:a,style:e}=t;requestAnimationFrame(()=>{e.minHeight="initial",e.height=a+"px",e.transition=`all ${o}ms`,requestAnimationFrame(()=>{e.height="0",e.padding="0",e.margin="0",setTimeout(n,o)})})}(t,y,l):y()};p||(d?n():(v.current=1,t.className+=` ${g}`,t.addEventListener("animationend",n)))},[p]),n.createElement(n.Fragment,null,f)}}function _(t,n){return{content:g(t.content,t.props),containerId:t.props.containerId,id:t.props.toastId,theme:t.props.theme,type:t.props.type,data:t.props.data||{},isLoading:t.props.isLoading,icon:t.props.icon,reason:t.removalReason,status:n}}function g(t,n,o=!1){return i(t)&&!c(t.type)?e(t,{closeToast:n.closeToast,toastProps:n,data:n.data,isPaused:o}):d(t)?t({closeToast:n.closeToast,toastProps:n,data:n.data,isPaused:o}):t}function v({delay:t,isRunning:o,closeToast:a,type:e="default",hide:s,className:r,controlledProgress:i,progress:f,rtl:c,isIn:y,theme:m}){let p=s||i&&0===f,u={animationDuration:`${t}ms`,animationPlayState:o?"running":"paused"};i&&(u.transform=`scaleX(${f})`);let _=l("Toastify__progress-bar",i?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${m}`,`Toastify__progress-bar--${e}`,{"Toastify__progress-bar--rtl":c}),g=d(r)?r({rtl:c,type:e,defaultClassName:_}):l(_,r),v={[i&&f>=1?"onTransitionEnd":"onAnimationEnd"]:i&&f<1?null:()=>{y&&a()}};return n.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":p},n.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${m} Toastify__progress-bar--${e}`}),n.createElement("div",{role:"progressbar","aria-hidden":p?"true":"false","aria-label":"notification timer","aria-valuenow":i?Math.round(100*f):void 0,"aria-valuemin":0,"aria-valuemax":100,className:g,style:u,...v}))}var b=1,T=()=>""+b++;var h=/* @__PURE__ */new Map,x=[],k=/* @__PURE__ */new Set,w=t=>k.forEach(n=>n(t)),I=()=>h.size>0;function E(t,n){var o;if(n)return!(null==(o=h.get(n))||!o.isToastActive(t));let a=!1;return h.forEach(n=>{n.isToastActive(t)&&(a=!0)}),a}function L(t,n){p(t)&&(I()||x.push({content:t,options:n}),h.forEach(o=>{o.buildToast(t,n)}))}function C(t,n){h.forEach(o=>{(null==n||null==n||!n.containerId||(null==n?void 0:n.containerId)===o.id)&&o.toggle(t,null==n?void 0:n.id)})}function O(t){let n=t.containerId||1;return{subscribe(o){let a=function(t,n,o){let a=1,e=0,s=[],r=[],i=n,l=/* @__PURE__ */new Map,c=/* @__PURE__ */new Set,d=()=>{r=Array.from(l.values()),c.forEach(t=>t())},u=t=>{var n,a;t.isActive&&(null==(a=null==(n=t.props)?void 0:n.onClose)||a.call(n,t.removalReason),t.isActive=!1,o(_(t,"removed")))},g=t=>{if(null==t)l.forEach(u);else{let n=l.get(t);n&&u(n)}d()},v=t=>{var n,a;let{toastId:e,updateId:s}=t.props,r=null==s;t.staleId&&l.delete(t.staleId),t.isActive=!0,l.set(e,t),d(),o(_(t,r?"added":"updated")),r&&(null==(a=(n=t.props).onOpen)||a.call(n))};return{id:t,props:i,observe:t=>(c.add(t),()=>c.delete(t)),toggle:(t,n)=>{l.forEach(o=>{var a;(null==n||n===o.props.toastId)&&(null==(a=o.toggle)||a.call(o,t))})},removeToast:g,toasts:l,clearQueue:()=>{e-=s.length,s=[]},buildToast:(n,o)=>{if((({containerId:n,toastId:o,updateId:a})=>{let e=n?n!==t:1!==t,s=l.has(o)&&null==a;return e||s})(o))return;let{toastId:r,updateId:c,data:u,staleId:_,delay:b}=o,T=null==c;T&&e++;let h={...i,style:i.toastStyle,key:a++,...Object.fromEntries(Object.entries(o).filter(([t,n])=>null!=n)),toastId:r,updateId:c,data:u,isIn:!1,className:y(o.className||i.toastClassName),progressClassName:y(o.progressClassName||i.progressClassName),autoClose:!o.isLoading&&m(o.autoClose,i.autoClose),closeToast(t){let n=l.get(r);n&&(n.removalReason=t,g(r))},deleteToast(){if(null!=l.get(r)){if(l.delete(r),e--,e<0&&(e=0),s.length>0)return void v(s.shift());d()}}};h.closeButton=i.closeButton,!1===o.closeButton||p(o.closeButton)?h.closeButton=o.closeButton:!0===o.closeButton&&(h.closeButton=!p(i.closeButton)||i.closeButton);let x={content:n,props:h,staleId:_};i.limit&&i.limit>0&&e>i.limit&&T?s.push(x):f(b)?setTimeout(()=>{v(x)},b):v(x)},setProps(t){i=t},setToggle:(t,n)=>{let o=l.get(t);o&&(o.toggle=n)},isToastActive:t=>{var n;return null==(n=l.get(t))?void 0:n.isActive},getSnapshot:()=>r}}(n,t,w);h.set(n,a);let e=a.observe(o);return x.forEach(t=>L(t.content,t.options)),x=[],()=>{e(),h.delete(n)}},setProps(t){var o;null==(o=h.get(n))||o.setProps(t)},getSnapshot(){var t;return null==(t=h.get(n))?void 0:t.getSnapshot()}}}function z(t){return t&&(c(t.toastId)||f(t.toastId))?t.toastId:T()}function P(t,n){return L(t,n),n.toastId}function $(t,n){return{...n,type:n&&n.type||t,toastId:z(n)}}function N(t){return(n,o)=>P(n,$(t,o))}function A(t,n){return P(t,$("default",n))}function D(t){var n;let{subscribe:a,getSnapshot:e,setProps:s}=o(O(t)).current;s(t);let i=null==(n=r(a,e,e))?void 0:n.slice();return{getToastToRender:function(n){if(!i)return[];let o=/* @__PURE__ */new Map;return t.newestOnTop&&i.reverse(),i.forEach(t=>{let{position:n}=t.props;o.has(n)||o.set(n,[]),o.get(n).push(t)}),Array.from(o,t=>n(t[0],t[1]))},isToastActive:E,count:null==i?void 0:i.length}}function M(n){let[e,s]=a(!1),[r,i]=a(!1),l=o(null),f=o({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:c,pauseOnHover:d,closeToast:y,onClick:m,closeOnClick:p}=n;function u(){s(!0)}function _(){s(!1)}function g(t){let o=l.current;if(f.canDrag&&o){f.didMove=!0,e&&_(),"x"===n.draggableDirection?f.delta=t.clientX-f.start:f.delta=t.clientY-f.start,f.start!==t.clientX&&(f.canCloseOnClick=!1);let a="x"===n.draggableDirection?`${f.delta}px, var(--y)`:`0, calc(${f.delta}px + var(--y))`;o.style.transform=`translate3d(${a},0)`,o.style.opacity=""+(1-Math.abs(f.delta/f.removalDistance))}}function v(){document.removeEventListener("pointermove",g),document.removeEventListener("pointerup",v);let t=l.current;if(f.canDrag&&f.didMove&&t){if(f.canDrag=!1,Math.abs(f.delta)>f.removalDistance)return i(!0),n.closeToast(!0),void n.collapseAll();t.style.transition="transform 0.2s, opacity 0.2s",t.style.removeProperty("transform"),t.style.removeProperty("opacity")}}(function(t){var n;null==(n=h.get(t.containerId||1))||n.setToggle(t.id,t.fn)})({id:n.toastId,containerId:n.containerId,fn:s}),t(()=>{if(n.pauseOnFocusLoss)return document.hasFocus()||_(),window.addEventListener("focus",u),window.addEventListener("blur",_),()=>{window.removeEventListener("focus",u),window.removeEventListener("blur",_)}},[n.pauseOnFocusLoss]);let b={onPointerDown:function(t){if(!0===n.draggable||n.draggable===t.pointerType){f.didMove=!1,document.addEventListener("pointermove",g),document.addEventListener("pointerup",v);let o=l.current;f.canCloseOnClick=!0,f.canDrag=!0,o.style.transition="none","x"===n.draggableDirection?(f.start=t.clientX,f.removalDistance=o.offsetWidth*(n.draggablePercent/100)):(f.start=t.clientY,f.removalDistance=o.offsetHeight*(80===n.draggablePercent?1.5*n.draggablePercent:n.draggablePercent)/100)}},onPointerUp:function(t){let{top:o,bottom:a,left:e,right:s}=l.current.getBoundingClientRect();"mouse"===t.pointerType&&n.pauseOnHover&&t.clientX>=e&&t.clientX<=s&&t.clientY>=o&&t.clientY<=a?_():u()}};return c&&d&&(b.onMouseEnter=_,n.stacked||(b.onMouseLeave=u)),p&&(b.onClick=t=>{m&&m(t),f.canCloseOnClick&&y(!0)}),{playToast:u,pauseToast:_,isRunning:e,preventExitTransition:r,toastRef:l,eventHandlers:b}}A.loading=(t,n)=>P(t,$("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...n})),A.promise=function(t,{pending:n,error:o,success:a},e){let s;n&&(s=c(n)?A.loading(n,e):A.loading(n.render,{...e,...n}));let r={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},i=(t,n,o)=>{if(null==n)return void A.dismiss(s);let a={type:t,...r,...e,data:o},i=c(n)?{render:n}:n;return s?A.update(s,{...a,...i}):A(i.render,{...a,...i}),o},l=d(t)?t():t;return l.then(t=>i("success",a,t)).catch(t=>i("error",o,t)),l},A.success=N("success"),A.info=N("info"),A.error=N("error"),A.warning=N("warning"),A.warn=A.warning,A.dark=(t,n)=>P(t,$("default",{theme:"dark",...n})),A.dismiss=function(t){!function(t){if(I()){if(null==t||(t=>c(t)||f(t))(t))h.forEach(n=>{n.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){let n=h.get(t.containerId);n?n.removeToast(t.id):h.forEach(n=>{n.removeToast(t.id)})}}else x=x.filter(n=>null!=t&&n.options.toastId!==t)}(t)},A.clearWaitingQueue=(t={})=>{h.forEach(n=>{n.props.limit&&(!t.containerId||n.id===t.containerId)&&n.clearQueue()})},A.isActive=E,A.update=(t,n={})=>{let o=((t,{containerId:n})=>{var o;return null==(o=h.get(n||1))?void 0:o.toasts.get(t)})(t,n);if(o){let{props:a,content:e}=o,s={delay:100,...a,...n,toastId:n.toastId||t,updateId:T()};s.toastId!==t&&(s.staleId=t);let r=s.render||e;delete s.render,P(r,s)}},A.done=t=>{A.update(t,{progress:1})},A.onChange=function(t){return k.add(t),()=>{k.delete(t)}},A.play=t=>C(!0,t),A.pause=t=>C(!1,t);var R="undefined"!=typeof window?s:t,B=({theme:t,type:o,isLoading:a,...e})=>n.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===t?"currentColor":`var(--toastify-icon-color-${o})`,...e}),X={info:function(t){return n.createElement(B,{...t},n.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(t){return n.createElement(B,{...t},n.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(t){return n.createElement(B,{...t},n.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(t){return n.createElement(B,{...t},n.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return n.createElement("div",{className:"Toastify__spinner"})}};var S=t=>{let{isRunning:o,preventExitTransition:a,toastRef:s,eventHandlers:r,playToast:f}=M(t),{closeButton:c,children:y,autoClose:m,onClick:p,type:u,hideProgressBar:_,closeToast:b,transition:T,position:h,className:x,style:k,progressClassName:w,updateId:I,role:E,progress:L,rtl:C,toastId:O,deleteToast:z,isIn:P,isLoading:$,closeOnClick:N,theme:A,ariaLabel:D}=t,R=l("Toastify__toast",`Toastify__toast-theme--${A}`,`Toastify__toast--${u}`,{"Toastify__toast--rtl":C},{"Toastify__toast--close-on-click":N}),B=d(x)?x({rtl:C,position:h,type:u,defaultClassName:R}):l(R,x),S=function({theme:t,type:n,isLoading:o,icon:a}){let s=null,r={theme:t,type:n};return!1===a||(d(a)?s=a({...r,isLoading:o}):i(a)?s=e(a,r):o?s=X.spinner():(t=>t in X)(n)&&(s=X[n](r))),s}(t),U=!!L||!m,H={closeToast:b,type:u,theme:A},F=null;return!1===c||(F=d(c)?c(H):i(c)?e(c,H):function({closeToast:t,theme:o,ariaLabel:a="close"}){return n.createElement("button",{className:`Toastify__close-button Toastify__close-button--${o}`,type:"button",onClick:n=>{n.stopPropagation(),t(!0)},"aria-label":a},n.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},n.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(H)),n.createElement(T,{isIn:P,done:z,position:h,preventExitTransition:a,nodeRef:s,playToast:f},n.createElement("div",{id:O,tabIndex:0,onClick:p,"data-in":P,className:B,...r,style:k,ref:s,...P&&{role:E,"aria-label":D}},null!=S&&n.createElement("div",{className:l("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!$})},S),g(y,t,!o),F,!t.customProgressBar&&n.createElement(v,{...I&&!U?{key:`p-${I}`}:{},rtl:C,theme:A,delay:m,isRunning:o,isIn:P,closeToast:b,hide:_,type:u,className:w,controlledProgress:U,progress:L||0})))},U=(t,n=!1)=>({enter:`Toastify--animate Toastify__${t}-enter`,exit:`Toastify--animate Toastify__${t}-exit`,appendPosition:n}),H=u(U("bounce",!0)),F=(u(U("slide",!0)),u(U("zoom")),u(U("flip")),{position:"top-right",transition:H,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light","aria-label":"Notifications Alt+T",hotKeys:t=>t.altKey&&"KeyT"===t.code});function Y(e){let s={...F,...e},r=e.stacked,[i,f]=a(!0),c=o(null),{getToastToRender:m,isToastActive:p,count:u}=D(s),{className:_,style:g,rtl:v,containerId:b,hotKeys:T}=s;function h(t){let n=l("Toastify__toast-container",`Toastify__toast-container--${t}`,{"Toastify__toast-container--rtl":v});return d(_)?_({position:t,rtl:v,defaultClassName:n}):l(n,y(_))}function x(){r&&(f(!0),A.play())}return R(()=>{var t;if(r){let n=c.current.querySelectorAll('[data-in="true"]'),o=12,a=null==(t=s.position)?void 0:t.includes("top"),e=0,r=0;Array.from(n).reverse().forEach((t,n)=>{let s=t;s.classList.add("Toastify__toast--stacked"),n>0&&(s.dataset.collapsed=`${i}`),s.dataset.pos||(s.dataset.pos=a?"top":"bot");let l=e*(i?.2:1)+(i?0:o*n),f=Math.max(.5,1-(i?r:0));s.style.setProperty("--y",`${a?l:-1*l}px`),s.style.setProperty("--g",`${o}`),s.style.setProperty("--s",`${f}`),e+=s.offsetHeight,r+=.025})}},[i,u,r]),t(()=>{function t(t){var n;let o=c.current;T(t)&&(null==(n=null==o?void 0:o.querySelector('[tabIndex="0"]'))||n.focus(),f(!1),A.pause()),"Escape"===t.key&&(document.activeElement===o||null!=o&&o.contains(document.activeElement))&&(f(!0),A.play())}return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[T]),n.createElement("section",{ref:c,className:"Toastify",id:b,onMouseEnter:()=>{r&&(f(!1),A.pause())},onMouseLeave:x,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text","aria-label":s["aria-label"]},m((t,o)=>{let a=o.length?{...g}:{...g,pointerEvents:"none"};return n.createElement("div",{tabIndex:-1,className:h(t),"data-stacked":r,style:a,key:`c-${t}`},o.map(({content:t,props:o})=>n.createElement(S,{...o,stacked:r,collapseAll:x,isIn:p(o.toastId,o.containerId),key:`t-${o.key}`},t)))}))}var j=/* @__PURE__ */new Map;function q(t){return((t,n)=>{R(()=>{if("undefined"==typeof document)return;let o=document,a=j.get(o);if(a)return void(n&&a.setAttribute("nonce",n));let e=o.createElement("style");e.textContent=t,n&&e.setAttribute("nonce",n),o.head.appendChild(e),j.set(o,e)},[n])})(":root {\n --toastify-color-light: #fff;\n --toastify-color-dark: #121212;\n --toastify-color-info: #3498db;\n --toastify-color-success: #07bc0c;\n --toastify-color-warning: #f1c40f;\n --toastify-color-error: hsl(6, 78%, 57%);\n --toastify-color-transparent: rgba(255, 255, 255, 0.7);\n\n --toastify-icon-color-info: var(--toastify-color-info);\n --toastify-icon-color-success: var(--toastify-color-success);\n --toastify-icon-color-warning: var(--toastify-color-warning);\n --toastify-icon-color-error: var(--toastify-color-error);\n\n --toastify-container-width: fit-content;\n --toastify-toast-width: 320px;\n --toastify-toast-offset: 16px;\n --toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));\n --toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));\n --toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));\n --toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));\n --toastify-toast-background: #fff;\n --toastify-toast-padding: 14px;\n --toastify-toast-min-height: 64px;\n --toastify-toast-max-height: 800px;\n --toastify-toast-bd-radius: 6px;\n --toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);\n --toastify-font-family: sans-serif;\n --toastify-z-index: 9999;\n --toastify-text-color-light: #757575;\n --toastify-text-color-dark: #fff;\n\n /* Used only for colored theme */\n --toastify-text-color-info: #fff;\n --toastify-text-color-success: #fff;\n --toastify-text-color-warning: #fff;\n --toastify-text-color-error: #fff;\n\n --toastify-spinner-color: #616161;\n --toastify-spinner-color-empty-area: #e0e0e0;\n --toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);\n --toastify-color-progress-dark: #bb86fc;\n --toastify-color-progress-info: var(--toastify-color-info);\n --toastify-color-progress-success: var(--toastify-color-success);\n --toastify-color-progress-warning: var(--toastify-color-warning);\n --toastify-color-progress-error: var(--toastify-color-error);\n /* used to control the opacity of the progress trail */\n --toastify-color-progress-bgo: 0.2;\n}\n\n.Toastify__toast-container {\n z-index: var(--toastify-z-index);\n -webkit-transform: translate3d(0, 0, var(--toastify-z-index));\n position: fixed;\n width: var(--toastify-container-width);\n box-sizing: border-box;\n color: #fff;\n display: flex;\n flex-direction: column;\n}\n\n.Toastify__toast-container--top-left {\n top: var(--toastify-toast-top);\n left: var(--toastify-toast-left);\n}\n.Toastify__toast-container--top-center {\n top: var(--toastify-toast-top);\n left: 50%;\n transform: translateX(-50%);\n align-items: center;\n}\n.Toastify__toast-container--top-right {\n top: var(--toastify-toast-top);\n right: var(--toastify-toast-right);\n align-items: end;\n}\n.Toastify__toast-container--bottom-left {\n bottom: var(--toastify-toast-bottom);\n left: var(--toastify-toast-left);\n}\n.Toastify__toast-container--bottom-center {\n bottom: var(--toastify-toast-bottom);\n left: 50%;\n transform: translateX(-50%);\n align-items: center;\n}\n.Toastify__toast-container--bottom-right {\n bottom: var(--toastify-toast-bottom);\n right: var(--toastify-toast-right);\n align-items: end;\n}\n\n.Toastify__toast {\n --y: 0px;\n position: relative;\n touch-action: none;\n width: var(--toastify-toast-width);\n min-height: var(--toastify-toast-min-height);\n box-sizing: border-box;\n margin-bottom: 1rem;\n padding: var(--toastify-toast-padding);\n border-radius: var(--toastify-toast-bd-radius);\n box-shadow: var(--toastify-toast-shadow);\n max-height: var(--toastify-toast-max-height);\n font-family: var(--toastify-font-family);\n /* webkit only issue #791 */\n z-index: 0;\n /* inner swag */\n display: flex;\n flex: 1 auto;\n align-items: center;\n word-break: break-word;\n}\n\n@media only screen and (max-width: 480px) {\n .Toastify__toast-container {\n width: 100vw;\n left: env(safe-area-inset-left);\n margin: 0;\n }\n .Toastify__toast-container--top-left,\n .Toastify__toast-container--top-center,\n .Toastify__toast-container--top-right {\n top: env(safe-area-inset-top);\n transform: translateX(0);\n }\n .Toastify__toast-container--bottom-left,\n .Toastify__toast-container--bottom-center,\n .Toastify__toast-container--bottom-right {\n bottom: env(safe-area-inset-bottom);\n transform: translateX(0);\n }\n .Toastify__toast-container--rtl {\n right: env(safe-area-inset-right);\n left: initial;\n }\n .Toastify__toast {\n --toastify-toast-width: 100%;\n margin-bottom: 0;\n border-radius: 0;\n }\n}\n\n.Toastify__toast-container[data-stacked='true'] {\n width: var(--toastify-toast-width);\n}\n\n@media only screen and (max-width: 480px) {\n .Toastify__toast-container[data-stacked='true'] {\n width: 100vw;\n }\n}\n\n.Toastify__toast--stacked {\n position: absolute;\n width: 100%;\n transform: translate3d(0, var(--y), 0) scale(var(--s));\n transition: transform 0.3s;\n}\n\n.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,\n.Toastify__toast--stacked[data-collapsed] .Toastify__close-button {\n transition: opacity 0.1s;\n}\n\n.Toastify__toast--stacked[data-collapsed='false'] {\n overflow: visible;\n}\n\n.Toastify__toast--stacked[data-collapsed='true']:not(:last-child) > * {\n opacity: 0;\n}\n\n.Toastify__toast--stacked:after {\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n height: calc(var(--g) * 1px);\n bottom: 100%;\n}\n\n.Toastify__toast--stacked[data-pos='top'] {\n top: 0;\n}\n\n.Toastify__toast--stacked[data-pos='bot'] {\n bottom: 0;\n}\n\n.Toastify__toast--stacked[data-pos='bot'].Toastify__toast--stacked:before {\n transform-origin: top;\n}\n\n.Toastify__toast--stacked[data-pos='top'].Toastify__toast--stacked:before {\n transform-origin: bottom;\n}\n\n.Toastify__toast--stacked:before {\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n height: 100%;\n transform: scaleY(3);\n z-index: -1;\n}\n\n.Toastify__toast--rtl {\n direction: rtl;\n}\n\n.Toastify__toast--close-on-click {\n cursor: pointer;\n}\n\n.Toastify__toast-icon {\n margin-inline-end: 10px;\n width: 22px;\n flex-shrink: 0;\n display: flex;\n}\n\n.Toastify--animate {\n animation-fill-mode: both;\n animation-duration: 0.5s;\n}\n\n.Toastify--animate-icon {\n animation-fill-mode: both;\n animation-duration: 0.3s;\n}\n\n.Toastify__toast-theme--dark {\n background: var(--toastify-color-dark);\n color: var(--toastify-text-color-dark);\n}\n\n.Toastify__toast-theme--light {\n background: var(--toastify-color-light);\n color: var(--toastify-text-color-light);\n}\n\n.Toastify__toast-theme--colored.Toastify__toast--default {\n background: var(--toastify-color-light);\n color: var(--toastify-text-color-light);\n}\n\n.Toastify__toast-theme--colored.Toastify__toast--info {\n color: var(--toastify-text-color-info);\n background: var(--toastify-color-info);\n}\n\n.Toastify__toast-theme--colored.Toastify__toast--success {\n color: var(--toastify-text-color-success);\n background: var(--toastify-color-success);\n}\n\n.Toastify__toast-theme--colored.Toastify__toast--warning {\n color: var(--toastify-text-color-warning);\n background: var(--toastify-color-warning);\n}\n\n.Toastify__toast-theme--colored.Toastify__toast--error {\n color: var(--toastify-text-color-error);\n background: var(--toastify-color-error);\n}\n\n.Toastify__progress-bar-theme--light {\n background: var(--toastify-color-progress-light);\n}\n\n.Toastify__progress-bar-theme--dark {\n background: var(--toastify-color-progress-dark);\n}\n\n.Toastify__progress-bar--info {\n background: var(--toastify-color-progress-info);\n}\n\n.Toastify__progress-bar--success {\n background: var(--toastify-color-progress-success);\n}\n\n.Toastify__progress-bar--warning {\n background: var(--toastify-color-progress-warning);\n}\n\n.Toastify__progress-bar--error {\n background: var(--toastify-color-progress-error);\n}\n\n.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,\n.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,\n.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,\n.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error {\n background: var(--toastify-color-transparent);\n}\n\n.Toastify__close-button {\n color: #fff;\n position: absolute;\n top: 6px;\n right: 6px;\n background: transparent;\n outline: none;\n border: none;\n padding: 0;\n cursor: pointer;\n opacity: 0.7;\n transition: 0.3s ease;\n z-index: 1;\n}\n\n.Toastify__toast--rtl .Toastify__close-button {\n left: 6px;\n right: unset;\n}\n\n.Toastify__close-button--light {\n color: #000;\n opacity: 0.3;\n}\n\n.Toastify__close-button > svg {\n fill: currentColor;\n height: 16px;\n width: 14px;\n}\n\n.Toastify__close-button:hover,\n.Toastify__close-button:focus {\n opacity: 1;\n}\n\n@keyframes Toastify__trackProgress {\n 0% {\n transform: scaleX(1);\n }\n 100% {\n transform: scaleX(0);\n }\n}\n\n.Toastify__progress-bar {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 1;\n opacity: 0.7;\n transform-origin: left;\n}\n\n.Toastify__progress-bar--animated {\n animation: Toastify__trackProgress linear 1 forwards;\n}\n\n.Toastify__progress-bar--controlled {\n transition: transform 0.2s;\n}\n\n.Toastify__progress-bar--rtl {\n right: 0;\n left: initial;\n transform-origin: right;\n border-bottom-left-radius: initial;\n}\n\n.Toastify__progress-bar--wrp {\n position: absolute;\n overflow: hidden;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 5px;\n border-bottom-left-radius: var(--toastify-toast-bd-radius);\n border-bottom-right-radius: var(--toastify-toast-bd-radius);\n}\n\n.Toastify__progress-bar--wrp[data-hidden='true'] {\n opacity: 0;\n}\n\n.Toastify__progress-bar--bg {\n opacity: var(--toastify-color-progress-bgo);\n width: 100%;\n height: 100%;\n}\n\n.Toastify__spinner {\n width: 20px;\n height: 20px;\n box-sizing: border-box;\n border: 2px solid;\n border-radius: 100%;\n border-color: var(--toastify-spinner-color-empty-area);\n border-right-color: var(--toastify-spinner-color);\n animation: Toastify__spin 0.65s linear infinite;\n}\n\n@keyframes Toastify__bounceInRight {\n from,\n 60%,\n 75%,\n 90%,\n to {\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n from {\n opacity: 0;\n transform: translate3d(3000px, 0, 0);\n }\n 60% {\n opacity: 1;\n transform: translate3d(-25px, 0, 0);\n }\n 75% {\n transform: translate3d(10px, 0, 0);\n }\n 90% {\n transform: translate3d(-5px, 0, 0);\n }\n to {\n transform: none;\n }\n}\n\n@keyframes Toastify__bounceOutRight {\n 20% {\n opacity: 1;\n transform: translate3d(-20px, var(--y), 0);\n }\n to {\n opacity: 0;\n transform: translate3d(2000px, var(--y), 0);\n }\n}\n\n@keyframes Toastify__bounceInLeft {\n from,\n 60%,\n 75%,\n 90%,\n to {\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n 0% {\n opacity: 0;\n transform: translate3d(-3000px, 0, 0);\n }\n 60% {\n opacity: 1;\n transform: translate3d(25px, 0, 0);\n }\n 75% {\n transform: translate3d(-10px, 0, 0);\n }\n 90% {\n transform: translate3d(5px, 0, 0);\n }\n to {\n transform: none;\n }\n}\n\n@keyframes Toastify__bounceOutLeft {\n 20% {\n opacity: 1;\n transform: translate3d(20px, var(--y), 0);\n }\n to {\n opacity: 0;\n transform: translate3d(-2000px, var(--y), 0);\n }\n}\n\n@keyframes Toastify__bounceInUp {\n from,\n 60%,\n 75%,\n 90%,\n to {\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n from {\n opacity: 0;\n transform: translate3d(0, 3000px, 0);\n }\n 60% {\n opacity: 1;\n transform: translate3d(0, -20px, 0);\n }\n 75% {\n transform: translate3d(0, 10px, 0);\n }\n 90% {\n transform: translate3d(0, -5px, 0);\n }\n to {\n transform: translate3d(0, 0, 0);\n }\n}\n\n@keyframes Toastify__bounceOutUp {\n 20% {\n transform: translate3d(0, calc(var(--y) - 10px), 0);\n }\n 40%,\n 45% {\n opacity: 1;\n transform: translate3d(0, calc(var(--y) + 20px), 0);\n }\n to {\n opacity: 0;\n transform: translate3d(0, -2000px, 0);\n }\n}\n\n@keyframes Toastify__bounceInDown {\n from,\n 60%,\n 75%,\n 90%,\n to {\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n 0% {\n opacity: 0;\n transform: translate3d(0, -3000px, 0);\n }\n 60% {\n opacity: 1;\n transform: translate3d(0, 25px, 0);\n }\n 75% {\n transform: translate3d(0, -10px, 0);\n }\n 90% {\n transform: translate3d(0, 5px, 0);\n }\n to {\n transform: none;\n }\n}\n\n@keyframes Toastify__bounceOutDown {\n 20% {\n transform: translate3d(0, calc(var(--y) - 10px), 0);\n }\n 40%,\n 45% {\n opacity: 1;\n transform: translate3d(0, calc(var(--y) + 20px), 0);\n }\n to {\n opacity: 0;\n transform: translate3d(0, 2000px, 0);\n }\n}\n\n.Toastify__bounce-enter--top-left,\n.Toastify__bounce-enter--bottom-left {\n animation-name: Toastify__bounceInLeft;\n}\n\n.Toastify__bounce-enter--top-right,\n.Toastify__bounce-enter--bottom-right {\n animation-name: Toastify__bounceInRight;\n}\n\n.Toastify__bounce-enter--top-center {\n animation-name: Toastify__bounceInDown;\n}\n\n.Toastify__bounce-enter--bottom-center {\n animation-name: Toastify__bounceInUp;\n}\n\n.Toastify__bounce-exit--top-left,\n.Toastify__bounce-exit--bottom-left {\n animation-name: Toastify__bounceOutLeft;\n}\n\n.Toastify__bounce-exit--top-right,\n.Toastify__bounce-exit--bottom-right {\n animation-name: Toastify__bounceOutRight;\n}\n\n.Toastify__bounce-exit--top-center {\n animation-name: Toastify__bounceOutUp;\n}\n\n.Toastify__bounce-exit--bottom-center {\n animation-name: Toastify__bounceOutDown;\n}\n\n@keyframes Toastify__zoomIn {\n from {\n opacity: 0;\n transform: scale3d(0.3, 0.3, 0.3);\n }\n 50% {\n opacity: 1;\n }\n}\n\n@keyframes Toastify__zoomOut {\n from {\n opacity: 1;\n }\n 50% {\n opacity: 0;\n transform: translate3d(0, var(--y), 0) scale3d(0.3, 0.3, 0.3);\n }\n to {\n opacity: 0;\n }\n}\n\n.Toastify__zoom-enter {\n animation-name: Toastify__zoomIn;\n}\n\n.Toastify__zoom-exit {\n animation-name: Toastify__zoomOut;\n}\n\n@keyframes Toastify__flipIn {\n from {\n transform: perspective(400px) rotate3d(1, 0, 0, 90deg);\n animation-timing-function: ease-in;\n opacity: 0;\n }\n 40% {\n transform: perspective(400px) rotate3d(1, 0, 0, -20deg);\n animation-timing-function: ease-in;\n }\n 60% {\n transform: perspective(400px) rotate3d(1, 0, 0, 10deg);\n opacity: 1;\n }\n 80% {\n transform: perspective(400px) rotate3d(1, 0, 0, -5deg);\n }\n to {\n transform: perspective(400px);\n }\n}\n\n@keyframes Toastify__flipOut {\n from {\n transform: translate3d(0, var(--y), 0) perspective(400px);\n }\n 30% {\n transform: translate3d(0, var(--y), 0) perspective(400px) rotate3d(1, 0, 0, -20deg);\n opacity: 1;\n }\n to {\n transform: translate3d(0, var(--y), 0) perspective(400px) rotate3d(1, 0, 0, 90deg);\n opacity: 0;\n }\n}\n\n.Toastify__flip-enter {\n animation-name: Toastify__flipIn;\n}\n\n.Toastify__flip-exit {\n animation-name: Toastify__flipOut;\n}\n\n@keyframes Toastify__slideInRight {\n from {\n transform: translate3d(110%, 0, 0);\n visibility: visible;\n }\n to {\n transform: translate3d(0, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideInLeft {\n from {\n transform: translate3d(-110%, 0, 0);\n visibility: visible;\n }\n to {\n transform: translate3d(0, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideInUp {\n from {\n transform: translate3d(0, 110%, 0);\n visibility: visible;\n }\n to {\n transform: translate3d(0, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideInDown {\n from {\n transform: translate3d(0, -110%, 0);\n visibility: visible;\n }\n to {\n transform: translate3d(0, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideOutRight {\n from {\n transform: translate3d(0, var(--y), 0);\n }\n to {\n visibility: hidden;\n transform: translate3d(110%, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideOutLeft {\n from {\n transform: translate3d(0, var(--y), 0);\n }\n to {\n visibility: hidden;\n transform: translate3d(-110%, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideOutDown {\n from {\n transform: translate3d(0, var(--y), 0);\n }\n to {\n visibility: hidden;\n transform: translate3d(0, 500px, 0);\n }\n}\n\n@keyframes Toastify__slideOutUp {\n from {\n transform: translate3d(0, var(--y), 0);\n }\n to {\n visibility: hidden;\n transform: translate3d(0, -500px, 0);\n }\n}\n\n.Toastify__slide-enter--top-left,\n.Toastify__slide-enter--bottom-left {\n animation-name: Toastify__slideInLeft;\n}\n\n.Toastify__slide-enter--top-right,\n.Toastify__slide-enter--bottom-right {\n animation-name: Toastify__slideInRight;\n}\n\n.Toastify__slide-enter--top-center {\n animation-name: Toastify__slideInDown;\n}\n\n.Toastify__slide-enter--bottom-center {\n animation-name: Toastify__slideInUp;\n}\n\n.Toastify__slide-exit--top-left,\n.Toastify__slide-exit--bottom-left {\n animation-name: Toastify__slideOutLeft;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n\n.Toastify__slide-exit--top-right,\n.Toastify__slide-exit--bottom-right {\n animation-name: Toastify__slideOutRight;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n\n.Toastify__slide-exit--top-center {\n animation-name: Toastify__slideOutUp;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n\n.Toastify__slide-exit--bottom-center {\n animation-name: Toastify__slideOutDown;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n\n@keyframes Toastify__spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n",t.nonce),n.createElement(Y,{...t})}export{A as n,q as t};
@@ -0,0 +1,16 @@
1
+ import{h as e,p as a,t as r}from"./DrrpB4Om.js";import{n as s}from"./CKQOToSD.js";import{x as i}from"./BLeZg2Bz.js";import{l}from"./DdYePHxG.js";import{t}from"./DmIYOIw1.js";import{n as o}from"./DGGc10Cy.js";import{t as n}from"./DyemeRjE2.js";import{i as d,s as c,t as u}from"./DWqIpaZ02.js";var h=({count:e=1,currentStep:a=0,disabled:s,onStepClick:i})=>{const l=s||!i;/* @__PURE__ */
2
+ return r("ol",{className:"flex items-center space-x-6 pl-1.5",children:Array.from({length:e}).map((e,s)=>/* @__PURE__ */r("li",{children:/* @__PURE__ */r("button",s<a?{type:"button",className:"bg-primary block h-3 w-3 rounded-full",disabled:l,onClick:()=>i?.(s)}:s===a?{type:"button",className:"relative flex items-center justify-center","aria-current":"step",disabled:l,onClick:()=>i?.(s),children:[/* @__PURE__ */r("span",{className:"absolute flex size-6 p-px","aria-hidden":"true",children:/* @__PURE__ */r("span",{className:"bg-primary/40 size-full rounded-full"})}),/* @__PURE__ */r("span",{className:"bg-primary relative block size-3 rounded-full","aria-hidden":"true"})]}:{type:"button",className:"bg-muted block size-3 rounded-full",disabled:l,onClick:()=>i?.(s)})},`progress-dot-${s}`))})},m=({onCodeSent:a})=>{const{t:i}=o(),{sendPasswordResetCode:l}=s(),[c,h]=e(""),[m,f]=e(!1),[p,y]=e(null),[v,g]=e(null);/* @__PURE__ */
3
+ return r("div",{className:"space-y-4",children:[
4
+ /* @__PURE__ */r(t,{variant:"h4",children:i("auth.forgotPassword","Forgot Password")}),
5
+ /* @__PURE__ */r(u,{type:"email",name:"email",value:c,onChange:e=>{h(e.target.value),p&&y(null),v&&g(null)},placeholder:i("auth.emailPlaceholder","Enter your email address"),error:p??void 0,disabled:m}),v&&/* @__PURE__ */r(t,{variant:"body2",color:"error",children:v}),
6
+ /* @__PURE__ */r("div",{children:/* @__PURE__ */r(n,{onClick:async()=>{y(null),g(null);const e=c.trim().toLowerCase(),r=d(e);if(r)y(r);else{f(!0);try{const r=await l(e);r?.error?g(r.error):a(e)}catch(s){g(s instanceof Error?s.message:String(s))}finally{f(!1)}}},fullWidth:!0,loading:m,disabled:m,children:i("auth.sendVerificationCode","Send verification code")})})]})},f=({email:a,onCodeVerified:i})=>{const{t:l}=o(),{verifyPasswordResetCode:d}=s(),[c,h]=e(""),[m,f]=e(!1),[p,y]=e(null);/* @__PURE__ */
7
+ return r("div",{className:"space-y-4 sm:space-y-6",children:[
8
+ /* @__PURE__ */r("div",{className:"space-y-2",children:[/* @__PURE__ */r(t,{variant:"h4",children:l("auth.verifyCode","Verify Code")}),/* @__PURE__ */r(t,{variant:"body1",children:[l("auth.enterCodeSentTo","Enter the 6-digit code sent to")," ",a]})]}),
9
+ /* @__PURE__ */r(u,{value:c,name:"code",onChange:e=>h(e.target.value),placeholder:l("auth.codePlaceholder","Enter verification code"),disabled:m}),p&&/* @__PURE__ */r(t,{variant:"body2",color:"error",children:p}),
10
+ /* @__PURE__ */r("div",{className:"flex gap-2",children:/* @__PURE__ */r(n,{onClick:async()=>{if(y(null),a)if(c.trim()){f(!0);try{const e=await d(a,c.trim());e?.error?y(e.error):e?.data?i(e.data):y(l("auth.codeVerifyFailed","Failed to verify code"))}catch(e){y(e instanceof Error?e.message:String(e))}finally{f(!1)}}else y(l("auth.codeRequired","Please enter the verification code"));else y(l("auth.emailMissing","Email address is missing"))},fullWidth:!0,loading:m,disabled:m,children:l("auth.verify","Verify")})})]})},p=({email:i,passwordResetCodeId:l,onPasswordReset:d})=>{const{t:h}=o(),{resetPassword:m}=s(),[f,p]=e(""),[y,v]=e(""),[g,w]=e(null),[b,C]=e(!1),P=a(()=>c(f),[f]),N=f&&f===y&&!P;/* @__PURE__ */
11
+ return r("div",{className:"space-y-4",children:[
12
+ /* @__PURE__ */r(t,{variant:"h4",children:h("auth.resetPassword","Reset Password")}),
13
+ /* @__PURE__ */r(u,{type:"password",name:"password",value:f,onChange:e=>{p(e.target.value),g&&w(null)},placeholder:h("auth.newPassword","New password"),disabled:b,error:P}),
14
+ /* @__PURE__ */r(u,{type:"password",name:"confirmPassword",value:y,onChange:e=>{v(e.target.value),g&&w(null)},placeholder:h("auth.confirmNewPassword","Confirm new password"),disabled:b}),g&&/* @__PURE__ */r(t,{variant:"body2",color:"error",children:g}),
15
+ /* @__PURE__ */r("div",{children:/* @__PURE__ */r(n,{onClick:async()=>{if(w(null),i)if(l)if(N){C(!0);try{const e=await m(l,f);e?.error?w(e.error):d()}catch(e){w(e instanceof Error?e.message:String(e))}finally{C(!1)}}else w(h("auth.passwordsDoNotMatch","Passwords do not match"));else w(h("auth.codeIdMissing","Verification code ID is missing"));else w(h("auth.emailMissing","Email address is missing"))},disabled:!N||b,fullWidth:!0,loading:b,children:h("auth.resetPasswordButton","Reset Password")})})]})},y=()=>{const a=l(),[s,t]=e(null),[o,n]=e(null),[d,c]=e(0);/* @__PURE__ */
16
+ return r("div",{className:"bg-background min-h-[60vh]",children:[(({index:e})=>{switch(e){case 0:/* @__PURE__ */return r(m,{onCodeSent:e=>{t(e),c(1)}});case 1:/* @__PURE__ */return r(f,{email:s,onCodeVerified:e=>{n(e),c(2)}});case 2:/* @__PURE__ */return r(p,{email:s,passwordResetCodeId:o,onPasswordReset:()=>{a(i.LOGIN)}})}})({index:d}),/* @__PURE__ */r("div",{className:"mt-8 flex justify-center",children:/* @__PURE__ */r(h,{count:3,currentStep:d})})]})};export{y as default};
@@ -1 +1 @@
1
- import{r as t}from"./DpD2Abx9.js";function e(t){return t?String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"):""}var o={[t.LINK]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="M5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h6q.425 0 .713.288T12 4t-.288.713T11 5H5v14h14v-6q0-.425.288-.712T20 12t.713.288T21 13v6q0 .825-.587 1.413T19 21zM19 6.4L10.4 15q-.275.275-.7.275T9 15t-.275-.7t.275-.7L17.6 5H15q-.425 0-.712-.288T14 4t.288-.712T15 3h5q.425 0 .713.288T21 4v5q0 .425-.288.713T20 10t-.712-.288T19 9z"/></svg>',[t.EMAIL]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="M12 22q-2.075 0-3.9-.788t-3.175-2.137T2.788 15.9T2 12t.788-3.9t2.137-3.175T8.1 2.788T12 2t3.9.788t3.175 2.137T21.213 8.1T22 12v1.45q0 1.475-1.012 2.513T18.5 17q-.875 0-1.65-.375t-1.3-1.075q-.725.725-1.638 1.088T12 17q-2.075 0-3.537-1.463T7 12t1.463-3.537T12 7t3.538 1.463T17 12v1.45q0 .65.425 1.1T18.5 15t1.075-.45t.425-1.1V12q0-3.35-2.325-5.675T12 4T6.325 6.325T4 12t2.325 5.675T12 20h4q.425 0 .713.288T17 21t-.288.713T16 22zm0-7q1.25 0 2.125-.875T15 12t-.875-2.125T12 9t-2.125.875T9 12t.875 2.125T12 15"/></svg>',[t.PHONE]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="M19.95 21q-3.125 0-6.175-1.362t-5.55-3.863t-3.862-5.55T3 4.05q0-.45.3-.75t.75-.3H8.1q.35 0 .625.238t.325.562l.65 3.5q.05.4-.025.675T9.4 8.45L6.975 10.9q.5.925 1.187 1.787t1.513 1.663q.775.775 1.625 1.438T13.1 17l2.35-2.35q.225-.225.588-.337t.712-.063l3.45.7q.35.1.575.363T21 15.9v4.05q0 .45-.3.75t-.75.3M6.025 9l1.65-1.65L7.25 5H5.025q.125 1.025.35 2.025T6.025 9m8.95 8.95q.975.425 1.988.675T19 18.95v-2.2l-2.35-.475zm0 0"/></svg>',[t.SMS]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="m6 18l-2.3 2.3q-.475.475-1.088.213T2 19.575V4q0-.825.588-1.412T4 2h16q.825 0 1.413.588T22 4v12q0 .825-.587 1.413T20 18zm-.85-2H20V4H4v13.125zM4 16V4zm4-5q.425 0 .713-.288T9 10t-.288-.712T8 9t-.712.288T7 10t.288.713T8 11m4 0q.425 0 .713-.288T13 10t-.288-.712T12 9t-.712.288T11 10t.288.713T12 11m4 0q.425 0 .713-.288T17 10t-.288-.712T16 9t-.712.288T15 10t.288.713T16 11"/></svg>',[t.WHATSAPP]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 256 258"><defs><linearGradient id="logosWhatsappIcon0" x1="50%" x2="50%" y1="100%" y2="0%"><stop offset="0%" stop-color="#1faf38"/><stop offset="100%" stop-color="#60d669"/></linearGradient><linearGradient id="logosWhatsappIcon1" x1="50%" x2="50%" y1="100%" y2="0%"><stop offset="0%" stop-color="#f9f9f9"/><stop offset="100%" stop-color="#fff"/></linearGradient></defs><path fill="url(#logosWhatsappIcon0)" d="M5.463 127.456c-.006 21.677 5.658 42.843 16.428 61.499L4.433 252.697l65.232-17.104a123 123 0 0 0 58.8 14.97h.054c67.815 0 123.018-55.183 123.047-123.01c.013-32.867-12.775-63.773-36.009-87.025c-23.23-23.25-54.125-36.061-87.043-36.076c-67.823 0-123.022 55.18-123.05 123.004"/><path fill="url(#logosWhatsappIcon1)" d="M1.07 127.416c-.007 22.457 5.86 44.38 17.014 63.704L0 257.147l67.571-17.717c18.618 10.151 39.58 15.503 60.91 15.511h.055c70.248 0 127.434-57.168 127.464-127.423c.012-34.048-13.236-66.065-37.3-90.15C194.633 13.286 162.633.014 128.536 0C58.276 0 1.099 57.16 1.071 127.416m40.24 60.376l-2.523-4.005c-10.606-16.864-16.204-36.352-16.196-56.363C22.614 69.029 70.138 21.52 128.576 21.52c28.3.012 54.896 11.044 74.9 31.06c20.003 20.018 31.01 46.628 31.003 74.93c-.026 58.395-47.551 105.91-105.943 105.91h-.042c-19.013-.01-37.66-5.116-53.922-14.765l-3.87-2.295l-40.098 10.513z"/><path fill="#fff" d="M96.678 74.148c-2.386-5.303-4.897-5.41-7.166-5.503c-1.858-.08-3.982-.074-6.104-.074c-2.124 0-5.575.799-8.492 3.984c-2.92 3.188-11.148 10.892-11.148 26.561s11.413 30.813 13.004 32.94c1.593 2.123 22.033 35.307 54.405 48.073c26.904 10.609 32.379 8.499 38.218 7.967c5.84-.53 18.844-7.702 21.497-15.139c2.655-7.436 2.655-13.81 1.859-15.142c-.796-1.327-2.92-2.124-6.105-3.716s-18.844-9.298-21.763-10.361c-2.92-1.062-5.043-1.592-7.167 1.597c-2.124 3.184-8.223 10.356-10.082 12.48c-1.857 2.129-3.716 2.394-6.9.801c-3.187-1.598-13.444-4.957-25.613-15.806c-9.468-8.442-15.86-18.867-17.718-22.056c-1.858-3.184-.199-4.91 1.398-6.497c1.431-1.427 3.186-3.719 4.78-5.578c1.588-1.86 2.118-3.187 3.18-5.311c1.063-2.126.531-3.986-.264-5.579c-.798-1.593-6.987-17.343-9.819-23.64"/></svg>',[t.MESSENGER]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 256 256"><defs><radialGradient id="logosMessenger0" cx="19.247%" cy="99.465%" r="108.96%" fx="19.247%" fy="99.465%"><stop offset="0%" stop-color="#09f"/><stop offset="60.975%" stop-color="#a033ff"/><stop offset="93.482%" stop-color="#ff5280"/><stop offset="100%" stop-color="#ff7061"/></radialGradient></defs><path fill="url(#logosMessenger0)" d="M128 0C55.894 0 0 52.818 0 124.16c0 37.317 15.293 69.562 40.2 91.835c2.09 1.871 3.352 4.493 3.438 7.298l.697 22.77c.223 7.262 7.724 11.988 14.37 9.054L84.111 243.9a10.22 10.22 0 0 1 6.837-.501c11.675 3.21 24.1 4.92 37.052 4.92c72.106 0 128-52.818 128-124.16S200.106 0 128 0"/><path fill="#fff" d="m51.137 160.47l37.6-59.653c5.98-9.49 18.788-11.853 27.762-5.123l29.905 22.43a7.68 7.68 0 0 0 9.252-.027l40.388-30.652c5.39-4.091 12.428 2.36 8.82 8.085l-37.6 59.654c-5.981 9.489-18.79 11.852-27.763 5.122l-29.906-22.43a7.68 7.68 0 0 0-9.25.027l-40.39 30.652c-5.39 4.09-12.427-2.36-8.818-8.085"/></svg>'},n=class{constructor(t,e,o){this.lightbox=t,this.captureAdImpression=e,this.captureAdClick=o,this.captionOn=!0,this.options={captionButtonOrder:8},t.on("init",()=>{this.initPswpEvents(t.pswp)})}getRootNode(){return this.lightbox?.pswp?.element?.getRootNode?.()||document}getElementById(t){const e=this.getRootNode();return"function"==typeof e.getElementById?e.getElementById(t):e.querySelector?.(`#${t}`)||document.getElementById(t)}querySelector(t){return this.getRootNode().querySelector?.(t)||document.querySelector(t)}initPswpEvents(t){t.on("uiRegister",()=>{t.ui.registerElement({name:"caption-toggle-button",title:"Toggle caption view",order:this.options.captionButtonOrder,isButton:!0,html:'<svg aria-hidden="true" class="pswp__icn p-0.5" viewBox="0 0 24 24"><use class="pswp__icn-shadow" xlink:href="#pswp__icn-show-caption"/><use class="pswp__icn-shadow" xlink:href="#pswp__icn-hide-caption"/><path id="pswp__icn-show-caption" d="M5 20q-.825 0-1.412-.587T3 18V6q0-.825.588-1.412T5 4h14q.825 0 1.413.588T21 6v12q0 .825-.587 1.413T19 20zm0-2h14V6H5zm2-3h3q.425 0 .713-.288T11 14v-.5q0-.225-.15-.375t-.375-.15h-.45q-.225 0-.375.15t-.15.375h-2v-3h2q0 .225.15.375t.375.15h.45q.225 0 .375-.15T11 10.5V10q0-.425-.288-.712T10 9H7q-.425 0-.712.288T6 10v4q0 .425.288.713T7 15m10-6h-3q-.425 0-.712.288T13 10v4q0 .425.288.713T14 15h3q.425 0 .713-.288T18 14v-.5q0-.225-.15-.375t-.375-.15h-.45q-.225 0-.375.15t-.15.375h-2v-3h2q0 .225.15.375t.375.15h.45q.225 0 .375-.15T18 10.5V10q0-.425-.288-.712T17 9M5 18V6z"/><path id="pswp__icn-hide-caption" style="display:none" d="m9.025 9l1.5 1.5H7.5v3h2q0-.225.15-.375t.375-.15h.45q.225 0 .375.15t.15.375v.5q0 .425-.288.713T10 15H7q-.425 0-.712-.288T6 14v-4q0-.425.288-.712T7 9zM21 6v10q0 .5-.325.763t-.7.262t-.675-.262T19 16V6H8.975q-.5 0-.75-.312T7.975 5t.25-.687t.75-.313H19q.825 0 1.413.588T21 6m-3 8q0 .225-.088.438t-.262.337L16.375 13.5h.125q0-.225.15-.375t.375-.15h.45q.225 0 .375.15t.15.375zm-1-5q.425 0 .713.288T18 10v.5q0 .225-.15.375t-.375.15h-.45q-.225 0-.375-.15t-.15-.375h-2v1.125l-1.5-1.5V10q0-.425.288-.712T14 9zM5 20q-.825 0-1.412-.587T3 18V6q0-.625.338-1.112t.862-.713L6.025 6H5v12h10.175L1.375 4.225q-.3-.3-.3-.712t.3-.713t.713-.3t.712.3l18.375 18.375q.3.3.3.713t-.3.712t-.712.3t-.713-.3L17.175 20z"/></svg>',onClick:()=>{this.toggleCaption(t)}}),t.ui.registerElement({name:"custom-caption",isButton:!1,appendTo:"root",html:'<div id="pswp-caption-container" class=" absolute bottom-0 w-full bg-transparent"></div>'})}),t.on("change",()=>{this.captionOn&&this.updateCaption(t)}),t.on("close",()=>{this.clearCaption()})}toggleCaption(t){this.captionOn?this.clearCaption():this.updateCaption(t),this.captionOn=!this.captionOn;const e=this.querySelector("#pswp__icn-show-caption"),o=this.querySelector("#pswp__icn-hide-caption");e&&(e.style.display=this.captionOn?"inline":"none"),o&&(o.style.display=this.captionOn?"none":"inline")}createCaptionHTML(n){const{id:s,type:i,caption:c,title:a,description:r,targetType:l,targetText:p,targetUrl:h}=n||{},d=Boolean(l)&&String(l)!==String(t.NONE),g=d?l:t.LINK;switch("ad"===i&&this.captureAdImpression&&this.captureAdImpression(s),i){case"image":case"video":return c?.length>0?`\n <div class=" w-full bg-black/50 p-4 text-gray-300">\n <h3 class=" text-center sm:text-lg">${e(c)}</h3>\n </div>\n `:"";case"ad":return`\n <div class=" w-full bg-black/85 p-4 text-white">\n <div class=" mx-auto w-full max-w-2xl space-y-2 text-center">\n <h3 class=" text-center sm:text-lg">${e(a)}</h3>\n <h4 class=" pb-2 text-center text-sm sm:text-base">${e(r)}</h4>\n ${d?`<button\n class=" flex w-full items-center justify-center gap-3 rounded bg-white py-1 text-lg text-black caption-action-button"\n data-id="${e(s)}"\n data-target-type="${e(g)}"\n data-target-url="${e(h)}">\n ${o[g]}\n ${e(p)}\n </button>`:""}\n </div>\n </div>\n `;default:return""}}updateCaption(t){try{const e=this.getElementById("pswp-caption-container");if(!e)return;const o=t.currSlide?.data;e.innerHTML=this.createCaptionHTML(o);const n=e.querySelector(".caption-action-button");n&&n.addEventListener("click",t=>{const e=t.currentTarget.dataset.id,o=t.currentTarget.dataset.targetType,n=t.currentTarget.dataset.targetUrl;this.captureAdClick&&e&&this.captureAdClick(e,o,n)})}catch(e){console.error("Error rendering caption:",e)}}clearCaption(){const t=this.getElementById("pswp-caption-container");t&&(t.innerHTML="")}};export{n as default};
1
+ import{r as t}from"./BLeZg2Bz.js";function e(t){return t?String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"):""}var o={[t.LINK]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="M5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h6q.425 0 .713.288T12 4t-.288.713T11 5H5v14h14v-6q0-.425.288-.712T20 12t.713.288T21 13v6q0 .825-.587 1.413T19 21zM19 6.4L10.4 15q-.275.275-.7.275T9 15t-.275-.7t.275-.7L17.6 5H15q-.425 0-.712-.288T14 4t.288-.712T15 3h5q.425 0 .713.288T21 4v5q0 .425-.288.713T20 10t-.712-.288T19 9z"/></svg>',[t.EMAIL]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="M12 22q-2.075 0-3.9-.788t-3.175-2.137T2.788 15.9T2 12t.788-3.9t2.137-3.175T8.1 2.788T12 2t3.9.788t3.175 2.137T21.213 8.1T22 12v1.45q0 1.475-1.012 2.513T18.5 17q-.875 0-1.65-.375t-1.3-1.075q-.725.725-1.638 1.088T12 17q-2.075 0-3.537-1.463T7 12t1.463-3.537T12 7t3.538 1.463T17 12v1.45q0 .65.425 1.1T18.5 15t1.075-.45t.425-1.1V12q0-3.35-2.325-5.675T12 4T6.325 6.325T4 12t2.325 5.675T12 20h4q.425 0 .713.288T17 21t-.288.713T16 22zm0-7q1.25 0 2.125-.875T15 12t-.875-2.125T12 9t-2.125.875T9 12t.875 2.125T12 15"/></svg>',[t.PHONE]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="M19.95 21q-3.125 0-6.175-1.362t-5.55-3.863t-3.862-5.55T3 4.05q0-.45.3-.75t.75-.3H8.1q.35 0 .625.238t.325.562l.65 3.5q.05.4-.025.675T9.4 8.45L6.975 10.9q.5.925 1.187 1.787t1.513 1.663q.775.775 1.625 1.438T13.1 17l2.35-2.35q.225-.225.588-.337t.712-.063l3.45.7q.35.1.575.363T21 15.9v4.05q0 .45-.3.75t-.75.3M6.025 9l1.65-1.65L7.25 5H5.025q.125 1.025.35 2.025T6.025 9m8.95 8.95q.975.425 1.988.675T19 18.95v-2.2l-2.35-.475zm0 0"/></svg>',[t.SMS]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="m6 18l-2.3 2.3q-.475.475-1.088.213T2 19.575V4q0-.825.588-1.412T4 2h16q.825 0 1.413.588T22 4v12q0 .825-.587 1.413T20 18zm-.85-2H20V4H4v13.125zM4 16V4zm4-5q.425 0 .713-.288T9 10t-.288-.712T8 9t-.712.288T7 10t.288.713T8 11m4 0q.425 0 .713-.288T13 10t-.288-.712T12 9t-.712.288T11 10t.288.713T12 11m4 0q.425 0 .713-.288T17 10t-.288-.712T16 9t-.712.288T15 10t.288.713T16 11"/></svg>',[t.WHATSAPP]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 256 258"><defs><linearGradient id="logosWhatsappIcon0" x1="50%" x2="50%" y1="100%" y2="0%"><stop offset="0%" stop-color="#1faf38"/><stop offset="100%" stop-color="#60d669"/></linearGradient><linearGradient id="logosWhatsappIcon1" x1="50%" x2="50%" y1="100%" y2="0%"><stop offset="0%" stop-color="#f9f9f9"/><stop offset="100%" stop-color="#fff"/></linearGradient></defs><path fill="url(#logosWhatsappIcon0)" d="M5.463 127.456c-.006 21.677 5.658 42.843 16.428 61.499L4.433 252.697l65.232-17.104a123 123 0 0 0 58.8 14.97h.054c67.815 0 123.018-55.183 123.047-123.01c.013-32.867-12.775-63.773-36.009-87.025c-23.23-23.25-54.125-36.061-87.043-36.076c-67.823 0-123.022 55.18-123.05 123.004"/><path fill="url(#logosWhatsappIcon1)" d="M1.07 127.416c-.007 22.457 5.86 44.38 17.014 63.704L0 257.147l67.571-17.717c18.618 10.151 39.58 15.503 60.91 15.511h.055c70.248 0 127.434-57.168 127.464-127.423c.012-34.048-13.236-66.065-37.3-90.15C194.633 13.286 162.633.014 128.536 0C58.276 0 1.099 57.16 1.071 127.416m40.24 60.376l-2.523-4.005c-10.606-16.864-16.204-36.352-16.196-56.363C22.614 69.029 70.138 21.52 128.576 21.52c28.3.012 54.896 11.044 74.9 31.06c20.003 20.018 31.01 46.628 31.003 74.93c-.026 58.395-47.551 105.91-105.943 105.91h-.042c-19.013-.01-37.66-5.116-53.922-14.765l-3.87-2.295l-40.098 10.513z"/><path fill="#fff" d="M96.678 74.148c-2.386-5.303-4.897-5.41-7.166-5.503c-1.858-.08-3.982-.074-6.104-.074c-2.124 0-5.575.799-8.492 3.984c-2.92 3.188-11.148 10.892-11.148 26.561s11.413 30.813 13.004 32.94c1.593 2.123 22.033 35.307 54.405 48.073c26.904 10.609 32.379 8.499 38.218 7.967c5.84-.53 18.844-7.702 21.497-15.139c2.655-7.436 2.655-13.81 1.859-15.142c-.796-1.327-2.92-2.124-6.105-3.716s-18.844-9.298-21.763-10.361c-2.92-1.062-5.043-1.592-7.167 1.597c-2.124 3.184-8.223 10.356-10.082 12.48c-1.857 2.129-3.716 2.394-6.9.801c-3.187-1.598-13.444-4.957-25.613-15.806c-9.468-8.442-15.86-18.867-17.718-22.056c-1.858-3.184-.199-4.91 1.398-6.497c1.431-1.427 3.186-3.719 4.78-5.578c1.588-1.86 2.118-3.187 3.18-5.311c1.063-2.126.531-3.986-.264-5.579c-.798-1.593-6.987-17.343-9.819-23.64"/></svg>',[t.MESSENGER]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 256 256"><defs><radialGradient id="logosMessenger0" cx="19.247%" cy="99.465%" r="108.96%" fx="19.247%" fy="99.465%"><stop offset="0%" stop-color="#09f"/><stop offset="60.975%" stop-color="#a033ff"/><stop offset="93.482%" stop-color="#ff5280"/><stop offset="100%" stop-color="#ff7061"/></radialGradient></defs><path fill="url(#logosMessenger0)" d="M128 0C55.894 0 0 52.818 0 124.16c0 37.317 15.293 69.562 40.2 91.835c2.09 1.871 3.352 4.493 3.438 7.298l.697 22.77c.223 7.262 7.724 11.988 14.37 9.054L84.111 243.9a10.22 10.22 0 0 1 6.837-.501c11.675 3.21 24.1 4.92 37.052 4.92c72.106 0 128-52.818 128-124.16S200.106 0 128 0"/><path fill="#fff" d="m51.137 160.47l37.6-59.653c5.98-9.49 18.788-11.853 27.762-5.123l29.905 22.43a7.68 7.68 0 0 0 9.252-.027l40.388-30.652c5.39-4.091 12.428 2.36 8.82 8.085l-37.6 59.654c-5.981 9.489-18.79 11.852-27.763 5.122l-29.906-22.43a7.68 7.68 0 0 0-9.25.027l-40.39 30.652c-5.39 4.09-12.427-2.36-8.818-8.085"/></svg>'},n=class{constructor(t,e,o){this.lightbox=t,this.captureAdImpression=e,this.captureAdClick=o,this.captionOn=!0,this.options={captionButtonOrder:8},t.on("init",()=>{this.initPswpEvents(t.pswp)})}getRootNode(){return this.lightbox?.pswp?.element?.getRootNode?.()||document}getElementById(t){const e=this.getRootNode();return"function"==typeof e.getElementById?e.getElementById(t):e.querySelector?.(`#${t}`)||document.getElementById(t)}querySelector(t){return this.getRootNode().querySelector?.(t)||document.querySelector(t)}initPswpEvents(t){t.on("uiRegister",()=>{t.ui.registerElement({name:"caption-toggle-button",title:"Toggle caption view",order:this.options.captionButtonOrder,isButton:!0,html:'<svg aria-hidden="true" class="pswp__icn p-0.5" viewBox="0 0 24 24"><use class="pswp__icn-shadow" xlink:href="#pswp__icn-show-caption"/><use class="pswp__icn-shadow" xlink:href="#pswp__icn-hide-caption"/><path id="pswp__icn-show-caption" d="M5 20q-.825 0-1.412-.587T3 18V6q0-.825.588-1.412T5 4h14q.825 0 1.413.588T21 6v12q0 .825-.587 1.413T19 20zm0-2h14V6H5zm2-3h3q.425 0 .713-.288T11 14v-.5q0-.225-.15-.375t-.375-.15h-.45q-.225 0-.375.15t-.15.375h-2v-3h2q0 .225.15.375t.375.15h.45q.225 0 .375-.15T11 10.5V10q0-.425-.288-.712T10 9H7q-.425 0-.712.288T6 10v4q0 .425.288.713T7 15m10-6h-3q-.425 0-.712.288T13 10v4q0 .425.288.713T14 15h3q.425 0 .713-.288T18 14v-.5q0-.225-.15-.375t-.375-.15h-.45q-.225 0-.375.15t-.15.375h-2v-3h2q0 .225.15.375t.375.15h.45q.225 0 .375-.15T18 10.5V10q0-.425-.288-.712T17 9M5 18V6z"/><path id="pswp__icn-hide-caption" style="display:none" d="m9.025 9l1.5 1.5H7.5v3h2q0-.225.15-.375t.375-.15h.45q.225 0 .375.15t.15.375v.5q0 .425-.288.713T10 15H7q-.425 0-.712-.288T6 14v-4q0-.425.288-.712T7 9zM21 6v10q0 .5-.325.763t-.7.262t-.675-.262T19 16V6H8.975q-.5 0-.75-.312T7.975 5t.25-.687t.75-.313H19q.825 0 1.413.588T21 6m-3 8q0 .225-.088.438t-.262.337L16.375 13.5h.125q0-.225.15-.375t.375-.15h.45q.225 0 .375.15t.15.375zm-1-5q.425 0 .713.288T18 10v.5q0 .225-.15.375t-.375.15h-.45q-.225 0-.375-.15t-.15-.375h-2v1.125l-1.5-1.5V10q0-.425.288-.712T14 9zM5 20q-.825 0-1.412-.587T3 18V6q0-.625.338-1.112t.862-.713L6.025 6H5v12h10.175L1.375 4.225q-.3-.3-.3-.712t.3-.713t.713-.3t.712.3l18.375 18.375q.3.3.3.713t-.3.712t-.712.3t-.713-.3L17.175 20z"/></svg>',onClick:()=>{this.toggleCaption(t)}}),t.ui.registerElement({name:"custom-caption",isButton:!1,appendTo:"root",html:'<div id="pswp-caption-container" class=" absolute bottom-0 w-full bg-transparent"></div>'})}),t.on("change",()=>{this.captionOn&&this.updateCaption(t)}),t.on("close",()=>{this.clearCaption()})}toggleCaption(t){this.captionOn?this.clearCaption():this.updateCaption(t),this.captionOn=!this.captionOn;const e=this.querySelector("#pswp__icn-show-caption"),o=this.querySelector("#pswp__icn-hide-caption");e&&(e.style.display=this.captionOn?"inline":"none"),o&&(o.style.display=this.captionOn?"none":"inline")}createCaptionHTML(n){const{id:s,type:i,caption:c,title:a,description:r,targetType:l,targetText:p,targetUrl:h}=n||{},d=Boolean(l)&&String(l)!==String(t.NONE),g=d?l:t.LINK;switch("ad"===i&&this.captureAdImpression&&this.captureAdImpression(s),i){case"image":case"video":return c?.length>0?`\n <div class=" w-full bg-black/50 p-4 text-gray-300">\n <h3 class=" text-center sm:text-lg">${e(c)}</h3>\n </div>\n `:"";case"ad":return`\n <div class=" w-full bg-black/85 p-4 text-white">\n <div class=" mx-auto w-full max-w-2xl space-y-2 text-center">\n <h3 class=" text-center sm:text-lg">${e(a)}</h3>\n <h4 class=" pb-2 text-center text-sm sm:text-base">${e(r)}</h4>\n ${d?`<button\n class=" flex w-full items-center justify-center gap-3 rounded bg-white py-1 text-lg text-black caption-action-button"\n data-id="${e(s)}"\n data-target-type="${e(g)}"\n data-target-url="${e(h)}">\n ${o[g]}\n ${e(p)}\n </button>`:""}\n </div>\n </div>\n `;default:return""}}updateCaption(t){try{const e=this.getElementById("pswp-caption-container");if(!e)return;const o=t.currSlide?.data;e.innerHTML=this.createCaptionHTML(o);const n=e.querySelector(".caption-action-button");n&&n.addEventListener("click",t=>{const e=t.currentTarget.dataset.id,o=t.currentTarget.dataset.targetType,n=t.currentTarget.dataset.targetUrl;this.captureAdClick&&e&&this.captureAdClick(e,o,n)})}catch(e){console.error("Error rendering caption:",e)}}clearCaption(){const t=this.getElementById("pswp-caption-container");t&&(t.innerHTML="")}};export{n as default};
@@ -1,10 +1,10 @@
1
- import{_ as e,d as t,f as n,h as r,p as a,s as i,t as s,v as o,w as l}from"./DrrpB4Om.js";import{c,d,i as u,n as m,s as g}from"./BlmPmkho.js";import{n as h,r as f,t as p}from"./DAjJ8IJf.js";import{E as w,S as v,T,_ as y,a as N,c as q,d as x,f as b,g as E,h as C,i as S,l as I,m as z,o as L,p as k,s as M,u as _,x as A}from"./DpD2Abx9.js";import{t as P,u as R}from"./OGzsLhnG.js";import{n as O,t as V}from"./CE4Zhv-W.js";import{a as F,c as j,i as B,l as H,n as U,o as G,r as $,s as W,t as D}from"./DBUAmPz_.js";import{t as K}from"./CitgNM58.js";import{t as Q}from"./DwanMJWW.js";import{t as Z}from"./CAETItHr.js";import{r as Y}from"./DGGc10Cy.js";import{t as J}from"./2CzUGwUv.js";import{n as X,t as ee}from"./CtWIgfGz.js";import{t as te}from"./DPg_DKOi2.js";import{t as ne}from"./CZ9iaxjO2.js";import{a as re,i as ae,n as ie,o as se,r as oe,s as le,t as ce}from"./CM46pkhP2.js";import{c as de,i as ue,n as me,t as ge}from"./CBLQRRGX2.js";import{n as he,t as fe}from"./D9UPX_0d2.js";function pe(e){if(e<1e3)return String(e);const[t,n]=e<1e6?[1e3,"K"]:[1e6,"M"],r=Math.round(e/t*10)/10;return`${r%1==0?r.toFixed(0):r.toFixed(1)}${n}`}function we({className:e}){/* @__PURE__ */
1
+ import{_ as e,d as t,f as n,h as r,p as a,s as i,t as s,v as o,w as l}from"./DrrpB4Om.js";import{i as c,n as d,s as u,u as m}from"./CKQOToSD.js";import{n as g,r as h,t as f}from"./C8meSsHD.js";import{t as p}from"./DmpmrPE5.js";import{E as w,S as v,T,_ as y,a as N,c as q,d as x,f as b,g as E,h as C,i as S,l as I,m as z,o as L,p as k,s as M,u as A,x as _}from"./BLeZg2Bz.js";import{t as P,u as R}from"./DdYePHxG.js";import{n as O,t as V}from"./DmIYOIw1.js";import{a as F,c as j,i as B,l as H,n as U,o as G,r as $,s as W,t as D}from"./Cl0CwL5p.js";import{t as K}from"./MU5QuIq0.js";import{t as Q}from"./BKENYwOQ.js";import{t as Z}from"./CAETItHr.js";import{r as Y}from"./DGGc10Cy.js";import{t as J}from"./CBM5QMn8.js";import{n as X,t as ee}from"./DyemeRjE2.js";import{t as te}from"./DPg_DKOi2.js";import{t as ne}from"./CZ9iaxjO2.js";import{a as re,i as ae,n as ie,o as se,r as oe,s as le,t as ce}from"./BqiJLitq2.js";import{c as de,i as ue,n as me,t as ge}from"./CBLQRRGX2.js";import{n as he,t as fe}from"./DWqIpaZ02.js";function pe(e){if(e<1e3)return String(e);const[t,n]=e<1e6?[1e3,"K"]:[1e6,"M"],r=Math.round(e/t*10)/10;return`${r%1==0?r.toFixed(0):r.toFixed(1)}${n}`}function we({className:e}){/* @__PURE__ */
2
2
  return s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */s("path",{fill:"currentColor",d:"M5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.587 1.413T19 21zm0-2h14V5H5zm0 0V5zm2-2h10q.3 0 .45-.275t-.05-.525l-2.75-3.675q-.15-.2-.4-.2t-.4.2L11.25 16L9.4 13.525q-.15-.2-.4-.2t-.4.2l-2 2.675q-.2.25-.05.525T7 17"})})}function ve({className:e}){/* @__PURE__ */
3
- return s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */s("path",{fill:"currentColor",d:"M15.188 14.688Q16.5 13.375 16.5 11.5t-1.312-3.187T12 7T8.813 8.313T7.5 11.5t1.313 3.188T12 16t3.188-1.312m-5.1-1.276Q9.3 12.625 9.3 11.5t.788-1.912T12 8.8t1.913.788t.787 1.912t-.787 1.913T12 14.2t-1.912-.787m-4.2 3.787q-2.763-1.8-4.363-4.75q-.125-.225-.187-.462t-.063-.488t.063-.488t.187-.462q1.6-2.95 4.363-4.75T12 4t6.113 1.8t4.362 4.75q.125.225.188.463t.062.487t-.062.488t-.188.462q-1.6 2.95-4.362 4.75T12 19t-6.113-1.8m11.3-1.687Q19.55 14.025 20.8 11.5q-1.25-2.525-3.613-4.012T12 6T6.813 7.488T3.2 11.5q1.25 2.525 3.613 4.013T12 17t5.188-1.487"})})}var Te=({description:t,maxLines:a=2,className:i})=>{const[o,l]=r(!1),[c,d]=r(!1),m=n(null),g=n(null);return e(()=>{l(!1)},[t]),e(()=>{if(!m.current||!t)return void d(!1);const e=m.current,n=()=>{const t=window.getComputedStyle(e),r=Math.max(0,Math.floor(e.getBoundingClientRect().width));if(!r)return void(g.current=window.requestAnimationFrame(n));const i=t.lineHeight,s=parseFloat(t.fontSize)||16;let o=1.2*s;i&&"normal"!==i&&(o=i.endsWith("px")?parseFloat(i):parseFloat(i)*s);const l=document.createElement("div");l.style.position="absolute",l.style.visibility="hidden",l.style.pointerEvents="none",l.style.whiteSpace="normal",l.style.width=`${r}px`,l.style.boxSizing=t.boxSizing,l.style.padding=t.padding,l.style.margin=t.margin,l.style.fontSize=t.fontSize,l.style.fontFamily=t.fontFamily,l.style.fontWeight=t.fontWeight,l.style.lineHeight=t.lineHeight,l.style.letterSpacing=t.letterSpacing,l.style.wordBreak="break-word",l.innerText=e.innerText||"",document.body.appendChild(l);const c=l.scrollHeight;document.body.removeChild(l),d(c>o*a+1)},r=()=>{null!==g.current&&window.cancelAnimationFrame(g.current),g.current=window.requestAnimationFrame(n)};let i;r(),window.addEventListener("resize",r);try{i=new MutationObserver(r),i.observe(e,{characterData:!0,childList:!0,subtree:!0})}catch{}return()=>{window.removeEventListener("resize",r),null!==g.current&&window.cancelAnimationFrame(g.current),i?.disconnect()}},[t,a]),t?/* @__PURE__ */s("div",{className:u("relative w-full",i),children:[/* @__PURE__ */s("p",{ref:m,className:u(O({variant:"body2",color:"muted",align:"center"}),"w-full",o?void 0:`line-clamp-${a}`),children:[t,c&&o&&/* @__PURE__ */s("button",{type:"button",onClick:()=>l(!1),className:"text-primary ml-2 text-sm font-medium hover:underline cursor-pointer",children:"see less"})]}),c&&!o&&/* @__PURE__ */s("span",{className:"bg-background absolute right-0 bottom-0 inline-flex items-center pl-2",children:[/* @__PURE__ */s("span",{className:"text-muted-foreground",children:"..."}),/* @__PURE__ */s("button",{type:"button",onClick:()=>l(!0),className:"text-primary ml-1 text-sm font-medium hover:underline cursor-pointer",children:"see more"})]})]}):null},ye=()=>{const{t:e}=Y(),{eventSlug:t}=R(),{event:n}=J({eventSlug:t}),{props:r,organization:a}=m(),{curateLabel:i,leaderboardLabel:o}=r??{},{eventViews:l,contentCount:d,curationCount:u}=(({event:e})=>{const{props:t,organization:n}=m(),r=t?.organizationId,{isLoading:a,data:i}=c({queryKey:["event-stats",r??"",e?._id??""],queryFn:async()=>{try{return(await g.get(S.GET_EVENT_STATISTICS,{searchParams:{eventSlug:e?.slug},headers:{"x-org-id":r}}).json()).data}catch(t){throw new Error(t instanceof Error?t.message:String(t)||"Failed to fetch event stats")}},enabled:!!e&&Boolean(n?.integrationSettings?.showEventStats)});return{isLoading:a,eventViews:"number"==typeof i?.eventViews?i.eventViews:i?.eventViews?.views??0,contentCount:i?.contentCount||0,curationCount:i?.curationCount||0}})({event:n});/* @__PURE__ */
3
+ return s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */s("path",{fill:"currentColor",d:"M15.188 14.688Q16.5 13.375 16.5 11.5t-1.312-3.187T12 7T8.813 8.313T7.5 11.5t1.313 3.188T12 16t3.188-1.312m-5.1-1.276Q9.3 12.625 9.3 11.5t.788-1.912T12 8.8t1.913.788t.787 1.912t-.787 1.913T12 14.2t-1.912-.787m-4.2 3.787q-2.763-1.8-4.363-4.75q-.125-.225-.187-.462t-.063-.488t.063-.488t.187-.462q1.6-2.95 4.363-4.75T12 4t6.113 1.8t4.362 4.75q.125.225.188.463t.062.487t-.062.488t-.188.462q-1.6 2.95-4.362 4.75T12 19t-6.113-1.8m11.3-1.687Q19.55 14.025 20.8 11.5q-1.25-2.525-3.613-4.012T12 6T6.813 7.488T3.2 11.5q1.25 2.525 3.613 4.013T12 17t5.188-1.487"})})}var Te=({description:t,maxLines:a=2,className:i})=>{const[o,l]=r(!1),[d,u]=r(!1),m=n(null),g=n(null);return e(()=>{l(!1)},[t]),e(()=>{if(!m.current||!t)return void u(!1);const e=m.current,n=()=>{const t=window.getComputedStyle(e),r=Math.max(0,Math.floor(e.getBoundingClientRect().width));if(!r)return void(g.current=window.requestAnimationFrame(n));const i=t.lineHeight,s=parseFloat(t.fontSize)||16;let o=1.2*s;i&&"normal"!==i&&(o=i.endsWith("px")?parseFloat(i):parseFloat(i)*s);const l=document.createElement("div");l.style.position="absolute",l.style.visibility="hidden",l.style.pointerEvents="none",l.style.whiteSpace="normal",l.style.width=`${r}px`,l.style.boxSizing=t.boxSizing,l.style.padding=t.padding,l.style.margin=t.margin,l.style.fontSize=t.fontSize,l.style.fontFamily=t.fontFamily,l.style.fontWeight=t.fontWeight,l.style.lineHeight=t.lineHeight,l.style.letterSpacing=t.letterSpacing,l.style.wordBreak="break-word",l.innerText=e.innerText||"",document.body.appendChild(l);const c=l.scrollHeight;document.body.removeChild(l),u(c>o*a+1)},r=()=>{null!==g.current&&window.cancelAnimationFrame(g.current),g.current=window.requestAnimationFrame(n)};let i;r(),window.addEventListener("resize",r);try{i=new MutationObserver(r),i.observe(e,{characterData:!0,childList:!0,subtree:!0})}catch{}return()=>{window.removeEventListener("resize",r),null!==g.current&&window.cancelAnimationFrame(g.current),i?.disconnect()}},[t,a]),t?/* @__PURE__ */s("div",{className:c("relative w-full",i),children:[/* @__PURE__ */s("p",{ref:m,className:c(O({variant:"body2",color:"muted",align:"center"}),"w-full",o?void 0:`line-clamp-${a}`),children:[t,d&&o&&/* @__PURE__ */s("button",{type:"button",onClick:()=>l(!1),className:"text-primary ml-2 text-sm font-medium hover:underline cursor-pointer",children:"see less"})]}),d&&!o&&/* @__PURE__ */s("span",{className:"bg-background absolute right-0 bottom-0 inline-flex items-center pl-2",children:[/* @__PURE__ */s("span",{className:"text-muted-foreground",children:"..."}),/* @__PURE__ */s("button",{type:"button",onClick:()=>l(!0),className:"text-primary ml-1 text-sm font-medium hover:underline cursor-pointer",children:"see more"})]})]}):null},ye=()=>{const{t:e}=Y(),{eventSlug:t}=R(),{event:n}=J({eventSlug:t}),{props:r,organization:a}=d(),{curateLabel:i,leaderboardLabel:o}=r??{},{eventViews:l,contentCount:c,curationCount:m}=(({event:e})=>{const{props:t,organization:n}=d(),r=t?.organizationId,{isLoading:a,data:i}=u({queryKey:["event-stats",r??"",e?._id??""],queryFn:async()=>{try{return(await p.get(S.GET_EVENT_STATISTICS,{searchParams:{eventSlug:e?.slug},headers:{"x-org-id":r}}).json()).data}catch(t){throw new Error(t instanceof Error?t.message:String(t)||"Failed to fetch event stats")}},enabled:!!e&&Boolean(n?.integrationSettings?.showEventStats)});return{isLoading:a,eventViews:"number"==typeof i?.eventViews?i.eventViews:i?.eventViews?.views??0,contentCount:i?.contentCount||0,curationCount:i?.curationCount||0}})({event:n});/* @__PURE__ */
4
4
  return s("div",{className:"w-full space-y-3",children:[
5
5
  /* @__PURE__ */s("div",{className:"space-y-2 md:-mt-8",children:[/* @__PURE__ */s(V,{variant:"h4",align:"center",immutable:!0,className:"mx-auto max-w-2xl",children:n?.name}),/* @__PURE__ */s(Te,{description:n?.description})]}),a?.integrationSettings?.showEventStats&&/* @__PURE__ */s("div",{className:"flex justify-center",children:/* @__PURE__ */s("div",{className:"flex items-center gap-6",children:[
6
6
  /* @__PURE__ */s("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */s(ve,{className:"text-primary"}),/* @__PURE__ */s("span",{className:"font-medium",children:pe(l??0)})]}),
7
- /* @__PURE__ */s("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */s(we,{className:"text-primary"}),/* @__PURE__ */s("span",{className:"font-medium",children:pe(d??0)})]}),n?.engagementStyle===b.CONTEST&&/* @__PURE__ */s("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */s(le,{className:"text-primary"}),/* @__PURE__ */s("span",{className:"font-medium",children:u})]})]})}),(n?.status===k.OPEN&&n?.uploadLimit&&n.uploadLimit>0||n?.status===k.OPEN&&n?.engagementStyle===b.CONTEST||n?.engagementStyle===b.REACTION&&n?.showLeaderboard||n?.engagementStyle===b.CONTEST)&&/* @__PURE__ */s("div",{className:"flex w-full flex-wrap justify-center gap-3",children:[n?.status===k.OPEN&&n?.uploadLimit&&n.uploadLimit>0&&/* @__PURE__ */s(P,{to:A.UPLOAD(n?.slug??""),children:/* @__PURE__ */s(ee,{icon:/* @__PURE__ */s(de,{className:"size-5"}),children:e("content.upload","Upload")})}),n?.status===k.OPEN&&n?.engagementStyle===b.CONTEST&&/* @__PURE__ */s(P,{to:A.CURATE(n?.slug??""),children:/* @__PURE__ */s(ee,{icon:/* @__PURE__ */s(le,{className:"size-5"}),children:i||e("content.curate","Curate")})}),n?.showLeaderboard&&/* @__PURE__ */s(P,{to:A.LEADERBOARD(n?.slug??""),children:/* @__PURE__ */s(ee,{icon:/* @__PURE__ */s(ne,{className:"size-5"}),children:o||e("content.leaderboard","Leaderboard")})})]})]})},Ne=(e,t)=>["in-review-count",e??"",t??""];function qe({className:e}){/* @__PURE__ */
7
+ /* @__PURE__ */s("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */s(we,{className:"text-primary"}),/* @__PURE__ */s("span",{className:"font-medium",children:pe(c??0)})]}),n?.engagementStyle===b.CONTEST&&/* @__PURE__ */s("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */s(le,{className:"text-primary"}),/* @__PURE__ */s("span",{className:"font-medium",children:m})]})]})}),(n?.status===k.OPEN&&n?.uploadLimit&&n.uploadLimit>0||n?.status===k.OPEN&&n?.engagementStyle===b.CONTEST||n?.engagementStyle===b.REACTION&&n?.showLeaderboard||n?.engagementStyle===b.CONTEST)&&/* @__PURE__ */s("div",{className:"flex w-full flex-wrap justify-center gap-3",children:[n?.status===k.OPEN&&n?.uploadLimit&&n.uploadLimit>0&&/* @__PURE__ */s(P,{to:_.UPLOAD(n?.slug??""),children:/* @__PURE__ */s(ee,{icon:/* @__PURE__ */s(de,{className:"size-5"}),children:e("content.upload","Upload")})}),n?.status===k.OPEN&&n?.engagementStyle===b.CONTEST&&/* @__PURE__ */s(P,{to:_.CURATE(n?.slug??""),children:/* @__PURE__ */s(ee,{icon:/* @__PURE__ */s(le,{className:"size-5"}),children:i||e("content.curate","Curate")})}),n?.showLeaderboard&&/* @__PURE__ */s(P,{to:_.LEADERBOARD(n?.slug??""),children:/* @__PURE__ */s(ee,{icon:/* @__PURE__ */s(ne,{className:"size-5"}),children:o||e("content.leaderboard","Leaderboard")})})]})]})},Ne=(e,t)=>["in-review-count",e??"",t??""];function qe({className:e}){/* @__PURE__ */
8
8
  return s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */s("path",{fill:"currentColor",d:"M12.275 9H19.4q-.675-1.725-2.062-2.963T14.15 4.3l-2.3 3.95q-.15.25 0 .5t.425.25m-3.6 1.25q.15.25.425.25t.425-.25L13.1 4.1q-.275-.05-.55-.075T12 4q-1.65 0-3.075.625T6.4 6.3zM4.25 14h4.575q.275 0 .438-.25t.012-.5L5.7 7.1q-.8 1.025-1.25 2.263T4 12q0 .525.063 1.013T4.25 14m5.6 5.7l2.275-3.95q.15-.25-.012-.5t-.438-.25H4.6q.675 1.725 2.063 2.963T9.85 19.7M12 20q1.65 0 3.075-.625T17.6 17.7l-2.275-3.95q-.15-.25-.425-.25t-.425.25L10.9 19.9q.275.05.538.075T12 20m6.3-3.1q.8-1.025 1.25-2.262T20 12q0-.525-.062-1.012T19.75 10h-4.575q-.275 0-.437.25t-.013.5zM12 22q-2.05 0-3.875-.788t-3.187-2.15t-2.15-3.187T2 12q0-2.075.788-3.887t2.15-3.175t3.187-2.15T12 2q2.075 0 3.888.788t3.174 2.15t2.15 3.175T22 12q0 2.05-.788 3.875t-2.15 3.188t-3.175 2.15T12 22"})})}function xe({className:e}){/* @__PURE__ */
9
9
  return s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */s("path",{fill:"currentColor",d:"M11.25 16L9.6 13.8q-.225-.3-.6-.3t-.6.3l-1.8 2.4q-.2.25-.05.525T7 17h10q.3 0 .45-.275t-.05-.525l-2.475-3.3q-.275-.05-.563-.125T13.8 12.6zM5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h4q.425 0 .713.288T10 4t-.288.713T9 5H5v14h14v-3.325q0-.425.288-.712t.712-.288t.713.288t.287.712V19q0 .825-.587 1.413T19 21zm11.05-10q-1.85 0-3.15-1.312T11.6 6.5t1.313-3.187T16.1 2t3.188 1.313T20.6 6.5q0 .675-.2 1.3t-.5 1.15l2.35 2.35q.275.275.275.7t-.275.7t-.7.275t-.7-.275l-2.4-2.4q-.525.35-1.125.525T16.05 11m.05-2q1.05 0 1.775-.725T18.6 6.5t-.725-1.775T16.1 4t-1.775.725T13.6 6.5t.725 1.775T16.1 9"})})}function be({className:e}){/* @__PURE__ */
10
10
  return s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */s("path",{fill:"currentColor",d:"M7 21q-.425 0-.712-.288T6 20t.288-.712T7 19h4v-3H4q-.825 0-1.412-.587T2 14V5q0-.825.588-1.412T4 3h16q.825 0 1.413.588T22 5v9q0 .825-.587 1.413T20 16h-7v3h4q.425 0 .713.288T18 20t-.288.713T17 21zm-3-7h16V5H4zm0 0V5z"})})}function Ee({className:e}){/* @__PURE__ */
@@ -12,28 +12,28 @@ return s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",view
12
12
  return s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */s("path",{fill:"currentColor",d:"M9 20v-4q-1.275-.1-2.5-.275t-2.45-.45q-.425-.1-.675-.475T3.25 14t.513-.625t.812-.1q1.825.425 3.688.575T12 14t3.738-.15t3.687-.575q.45-.1.825.1t.5.625t-.137.8t-.688.475q-1.225.275-2.45.45T15 16v4q0 .425-.287.713T14 21h-4q-.425 0-.712-.288T9 20m3-7q-.85 0-1.425-.575T10 11q0-.825.575-1.412T12 9q.825 0 1.413.588T14 11q0 .85-.587 1.425T12 13m-7.5-3q-.65 0-1.075-.425T3 8.5q0-.625.425-1.062T4.5 7q.625 0 1.063.438T6 8.5q0 .65-.437 1.075T4.5 10m15 0q-.65 0-1.075-.425T18 8.5q0-.625.425-1.062T19.5 7q.625 0 1.063.438T21 8.5q0 .65-.437 1.075T19.5 10M7.25 6.25q-.65 0-1.075-.425T5.75 4.75q0-.625.425-1.062T7.25 3.25q.625 0 1.063.438T8.75 4.75q0 .65-.437 1.075T7.25 6.25m9.5 0q-.65 0-1.075-.425T15.25 4.75q0-.625.425-1.062t1.075-.438q.625 0 1.063.438t.437 1.062q0 .65-.437 1.075t-1.063.425M12 5q-.65 0-1.075-.425T10.5 3.5q0-.625.425-1.062T12 2q.625 0 1.063.438T13.5 3.5q0 .65-.437 1.075T12 5"})})}function Se({className:e}){/* @__PURE__ */
13
13
  return s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */s("path",{fill:"currentColor",d:"M11 12q-1.65 0-2.825-1.175T7 8t1.175-2.825T11 4t2.825 1.175T15 8t-1.175 2.825T11 12m0-2q.825 0 1.413-.587T13 8t-.587-1.412T11 6t-1.412.588T9 8t.588 1.413T11 10m10.4 12.8l-2.5-2.5q-.525.3-1.125.5T16.5 21q-1.875 0-3.187-1.312T12 16.5t1.313-3.187T16.5 12t3.188 1.313T21 16.5q0 .675-.2 1.275t-.5 1.125l2.5 2.5q.275.275.275.7t-.275.7t-.7.275t-.7-.275m-3.125-4.525Q19 17.55 19 16.5t-.725-1.775T16.5 14t-1.775.725T14 16.5t.725 1.775T16.5 19t1.775-.725M3 18v-.775q0-.85.425-1.575t1.175-1.1q1.05-.55 2.338-.962t2.637-.538q.425-.05.725.25t.3.725t-.3.738t-.725.362q-1.425.175-2.4.525t-1.65.7q-.25.125-.387.363T5 17.225V18h4.6q.425 0 .713.288T10.6 19t-.287.713T9.6 20H5q-.825 0-1.412-.587T3 18m7.175 0"})})}function Ie({className:e}){/* @__PURE__ */
14
14
  return s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */s("path",{fill:"currentColor",d:"M5 11q-.825 0-1.412-.587T3 9V5q0-.825.588-1.412T5 3h4q.825 0 1.413.588T11 5v4q0 .825-.587 1.413T9 11zm0 10q-.825 0-1.412-.587T3 19v-4q0-.825.588-1.412T5 13h4q.825 0 1.413.588T11 15v4q0 .825-.587 1.413T9 21zm10-10q-.825 0-1.412-.587T13 9V5q0-.825.588-1.412T15 3h4q.825 0 1.413.588T21 5v4q0 .825-.587 1.413T19 11zm0 10q-.825 0-1.412-.587T13 19v-4q0-.825.588-1.412T15 13h4q.825 0 1.413.588T21 15v4q0 .825-.587 1.413T19 21zM5 9h4V5H5zm10 0h4V5h-4zm0 10h4v-4h-4zM5 19h4v-4H5zM9 9"})})}function ze({className:e}){/* @__PURE__ */
15
- return s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */s("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 3c4.97 0 9 4.03 9 9",children:/* @__PURE__ */s("animateTransform",{attributeName:"transform",dur:"1.5s",repeatCount:"indefinite",type:"rotate",values:"0 12 12;360 12 12"})})})}var Le=({event:e})=>{const t=d(),{user:n,props:a}=m(),i=a?.organizationId,[o,l]=r(!1);/* @__PURE__ */
16
- return s(U,{children:[/* @__PURE__ */s(F,{children:/* @__PURE__ */s(o?ze:Ie,{className:"size-6"})}),/* @__PURE__ */s($,{align:"end",side:"bottom",className:"w-44",children:Object.values(E).map(r=>/* @__PURE__ */s(B,{onClick:()=>(async r=>{l(!0);try{const a=new FormData;a.append("eventId",e?._id??""),a.append("galleryLayout",r),await g.post(S.UPDATE_EVENT_LAYOUT,{body:a,headers:{"x-org-id":i,Authorization:n?`Bearer ${n.token}`:void 0}}),t.invalidateQueries({queryKey:[`event-data-${i??""}-${e?.slug??""}`]})}catch(a){console.error(a)}l(!1)})(r),isChecked:e?.galleryLayout===r,title:he(r)},r))})]})},ke=({event:e,onAutoscrollClick:t})=>{const{t:n}=Y(),{isSuper:r,isOwner:i,isAdmin:o,isModerator:l}=j(),{inReviewCount:u}=(e=>{const t=d(),{props:n}=m(),r=n?.organizationId,{role:a,isSuper:i}=j(),{isLoading:s,data:o,isError:l,error:u}=c({queryKey:Ne(r,e?.slug),queryFn:async()=>{try{const t=await g.get(S.GET_CONTENTS_COUNT,{searchParams:{eventSlug:e?.slug,filter:`status:${M.IN_REVIEW}`},headers:{"x-org-id":r}}).json();if(t.error)throw new Error(t.error);return t.data}catch(t){throw new Error(t instanceof Error?t.message:String(t)||"Failed to fetch in review count")}},staleTime:0,enabled:Boolean(a)||Boolean(i)});return{loading:s,inReviewCount:o,error:l?u:null,increment:()=>{t.setQueryData(Ne(r,e?.slug),e=>(e??0)+1)},decrement:()=>{t.setQueryData(Ne(r,e?.slug),e=>Math.max(0,(e??0)-1))}}})(e),h=r||i||o||l,f=r||i||o,p=a(()=>{const t=[];return f&&t.push({title:n("event.shot_inspector","Shot Inspector"),icon:qe,href:C.EVENT_SHOT_INSPECTOR(e?.slug??"")}),e?.visibility===z.PRIVATE&&h&&t.push({title:n("event.access_requests","Access Requests"),icon:Se,href:C.EVENT_ACCESS_REQUESTS(e?.slug??"")}),e?.engagementStyle===b.CONTEST&&f&&t.push({title:n("event.curation_details","Curation Details"),icon:Ce,href:C.EVENT_CURATION_DETAILS(e?.slug??"")}),f&&t.push({title:n("event.edit_event","Edit Event"),icon:G,href:C.EVENT_SETTINGS_BASIC_DETAILS(e?.slug??"")}),t},[e,f,h]);/* @__PURE__ */
17
- return s("div",{className:"text-muted-foreground sm:text-foreground flex flex-row items-center justify-end gap-6 pr-1 sm:justify-between sm:pr-4",children:["undefined"!=typeof document&&document?.fullscreenEnabled&&t&&/* @__PURE__ */s(W,{content:n("event.kiosk_mode","Kiosk Mode"),children:/* @__PURE__ */s("button",{onClick:t,className:"hidden sm:block",children:/* @__PURE__ */s(be,{className:"size-6"})})}),"undefined"!=typeof document&&document?.fullscreenEnabled&&f&&/* @__PURE__ */s(Le,{event:e}),h&&/* @__PURE__ */s(W,{content:n("event.review_contents","Review Contents"),children:/* @__PURE__ */s("a",{target:"_blank",rel:"noreferrer",href:C.EVENT_REVIEW_CONTENTS(e?.slug??""),className:"relative",children:[/* @__PURE__ */s(xe,{className:"size-6"}),Number(u)>0&&/* @__PURE__ */s("div",{className:"bg-primary text-primary-foreground absolute -top-2 -right-2 rounded-lg px-1 py-0 text-xs",children:u})]})}),p.length>0&&/* @__PURE__ */s(U,{children:[/* @__PURE__ */s(F,{children:/* @__PURE__ */s(Ee,{className:"size-6"})}),/* @__PURE__ */s($,{align:"end",side:"bottom",className:"w-48",children:p.map(e=>/* @__PURE__ */s(B,{href:e.href,icon:/* @__PURE__ */s(e.icon,{className:"text-primary"}),title:e.title,suffix:e?.chip?/* @__PURE__ */s("span",{className:"bg-primary text-primary-foreground rounded-full px-1.5 py-0.5 text-[0.5rem] font-medium sm:text-xs",children:e.chip}):void 0,isBeta:"BETA"===e?.chip},e.href??e.title))})]})]})};function Me({className:e}){/* @__PURE__ */
18
- return s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */s("path",{fill:"currentColor",d:"M4 18q-.425 0-.712-.288T3 17t.288-.712T4 16h16q.425 0 .713.288T21 17t-.288.713T20 18zm0-5q-.425 0-.712-.288T3 12t.288-.712T4 11h16q.425 0 .713.288T21 12t-.288.713T20 13zm0-5q-.425 0-.712-.288T3 7t.288-.712T4 6h16q.425 0 .713.288T21 7t-.288.713T20 8z"})})}var _e=({engagementStyle:e,sort:t=_,order:n=x,onSortChange:r,onSortOrderChange:i})=>{const{t:o}=Y(),l=a(()=>{const t=Object.keys(L).map(e=>({text:o(`content.sortby_${L[e].label.toLowerCase()}`,L[e].label),value:e,activeClassName:"bg-primary text-primary-foreground"}));return e===b.CONTEST?t:t.filter(e=>e.value!==N.POPULAR)},[e,o]);/* @__PURE__ */
19
- return s("div",{className:"relative flex w-auto items-center gap-2",children:[/* @__PURE__ */s("button",{type:"button",className:"bg-background rounded p-1",onClick:i,children:/* @__PURE__ */s("svg",{xmlns:"http://www.w3.org/2000/svg",className:u("text-foreground w-7 -scale-x-100 transition-transform",n===T.ASC&&"-scale-y-100"),viewBox:"0 0 24 24",children:/* @__PURE__ */s("path",{fill:"currentColor",d:"M4 18q-.425 0-.712-.288T3 17t.288-.712T4 16h4q.425 0 .713.288T9 17t-.288.713T8 18zm0-5q-.425 0-.712-.288T3 12t.288-.712T4 11h10q.425 0 .713.288T15 12t-.288.713T14 13zm0-5q-.425 0-.712-.288T3 7t.288-.712T4 6h16q.425 0 .713.288T21 7t-.288.713T20 8z"})})}),/* @__PURE__ */s(H,{className:"flex-1 lg:flex-none",selected:t,buttons:l,onChange:e=>r&&r(e)})]})},Ae=["jpg","jpeg","png","webp","heic","tiff","bmp"],Pe=({value:t,onChange:i})=>{const[o,l]=r(!1),c=n(null),d=a(()=>t?URL.createObjectURL(t):null,[t]);return e(()=>()=>{d&&URL.revokeObjectURL(d)},[d]),e(()=>{!t&&c.current&&(c.current.value="")},[t]),/* @__PURE__ */s("div",{className:"flex items-center gap-3",children:[!t&&/* @__PURE__ */s("div",{className:"flex items-center gap-4",children:/* @__PURE__ */s("button",{type:"button",onClick:()=>c.current?.click(),className:"border-border flex items-center gap-2 rounded border px-3 py-2.5 "+(o?"bg-opacity-75 cursor-not-allowed":"hover:cursor-pointer"),children:/* @__PURE__ */s(o?X:se,{})})}),t&&d&&/* @__PURE__ */s("img",{src:d,alt:"Facial Search",className:"size-10 rounded object-cover"}),
20
- /* @__PURE__ */s("input",{ref:c,type:"file",accept:"image/*",className:"hidden",onChange:e=>{const t=e.target?.files?.[0]??null;if(!t)return;const n=(t.name.split(".").pop()||"").toLowerCase();if(!Ae.includes(n))return i(null);(async e=>{if(!e)return;l(!0);let t=e;try{const n=await ue(e);t=n.size/1024/1024>1?await me(n,{maxSizeMB:1,maxWidthOrHeight:1600,useWebWorker:!0,preserveExif:!1,maxIteration:3}):n}catch(n){console.error(n)}l(!1),i(t)})(t)}})]})},Re={[I.GRID]:{icon:/* @__PURE__ */s(Ie,{className:"size-full text-inherit"})},[I.SINGLE]:{icon:/* @__PURE__ */s(Me,{className:"size-full text-inherit"})}},Oe=Object.keys(Re).map(e=>({icon:Re[e].icon,value:e})),Ve=({engagementStyle:t,disabled:a,mode:i,onModeChange:l,sort:c,onSortChange:d,sortOrder:u,onSortOrderChange:g,handleChange:h,face:f,onFaceImageChange:p})=>{const{t:w}=Y(),{organization:v}=m(),[T,y]=r(""),[N,q]=r(null),x=n(null),b=o(()=>{x.current&&(URL.revokeObjectURL(x.current),x.current=null)},[]),E=o(e=>{if(q(e),b(),e){const t=URL.createObjectURL(e);x.current=t,p?.(t)}else p?.(void 0)},[p,b]),C=o(e=>{y(e.target.value)},[]),S=o(e=>{const t=e.key;"Enter"===t?h&&h(T.length>0?T:""):"Escape"===t&&(y(""),h&&h(""))},[T,h]),I=o(()=>{y(""),h&&h("")},[h]),z=o(()=>{h&&h(T)},[T,h]);return e(()=>{f||q(null)},[f]),e(()=>()=>{b()},[b]),/* @__PURE__ */s("fieldset",{disabled:a,className:"m-0 mb-3 grid min-w-0 grid-cols-3 border-0 p-0 md:space-y-0 md:space-x-4 "+(a?"opacity-50":""),children:[
15
+ return s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */s("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 3c4.97 0 9 4.03 9 9",children:/* @__PURE__ */s("animateTransform",{attributeName:"transform",dur:"1.5s",repeatCount:"indefinite",type:"rotate",values:"0 12 12;360 12 12"})})})}var Le=({event:e})=>{const t=m(),{user:n,props:a}=d(),i=a?.organizationId,[o,l]=r(!1);/* @__PURE__ */
16
+ return s(U,{children:[/* @__PURE__ */s(F,{children:/* @__PURE__ */s(o?ze:Ie,{className:"size-6"})}),/* @__PURE__ */s($,{align:"end",side:"bottom",className:"w-44",children:Object.values(E).map(r=>/* @__PURE__ */s(B,{onClick:()=>(async r=>{l(!0);try{const a=new FormData;a.append("eventId",e?._id??""),a.append("galleryLayout",r),await p.post(S.UPDATE_EVENT_LAYOUT,{body:a,headers:{"x-org-id":i,Authorization:n?`Bearer ${n.token}`:void 0}}),t.invalidateQueries({queryKey:[`event-data-${i??""}-${e?.slug??""}`]})}catch(a){console.error(a)}l(!1)})(r),isChecked:e?.galleryLayout===r,title:he(r)},r))})]})},ke=({event:e,onAutoscrollClick:t})=>{const{t:n}=Y(),{isSuper:r,isOwner:i,isAdmin:o,isModerator:l}=j(),{inReviewCount:c}=(e=>{const t=m(),{props:n}=d(),r=n?.organizationId,{role:a,isSuper:i}=j(),{isLoading:s,data:o,isError:l,error:c}=u({queryKey:Ne(r,e?.slug),queryFn:async()=>{try{const t=await p.get(S.GET_CONTENTS_COUNT,{searchParams:{eventSlug:e?.slug,filter:`status:${M.IN_REVIEW}`},headers:{"x-org-id":r}}).json();if(t.error)throw new Error(t.error);return t.data}catch(t){throw new Error(t instanceof Error?t.message:String(t)||"Failed to fetch in review count")}},staleTime:0,enabled:Boolean(a)||Boolean(i)});return{loading:s,inReviewCount:o,error:l?c:null,increment:()=>{t.setQueryData(Ne(r,e?.slug),e=>(e??0)+1)},decrement:()=>{t.setQueryData(Ne(r,e?.slug),e=>Math.max(0,(e??0)-1))}}})(e),g=r||i||o||l,h=r||i||o,f=a(()=>{const t=[];return h&&t.push({title:n("event.shot_inspector","Shot Inspector"),icon:qe,href:C.EVENT_SHOT_INSPECTOR(e?.slug??"")}),e?.visibility===z.PRIVATE&&g&&t.push({title:n("event.access_requests","Access Requests"),icon:Se,href:C.EVENT_ACCESS_REQUESTS(e?.slug??"")}),e?.engagementStyle===b.CONTEST&&h&&t.push({title:n("event.curation_details","Curation Details"),icon:Ce,href:C.EVENT_CURATION_DETAILS(e?.slug??"")}),h&&t.push({title:n("event.edit_event","Edit Event"),icon:G,href:C.EVENT_SETTINGS_BASIC_DETAILS(e?.slug??"")}),t},[e,h,g]);/* @__PURE__ */
17
+ return s("div",{className:"text-muted-foreground sm:text-foreground flex flex-row items-center justify-end gap-6 pr-1 sm:justify-between sm:pr-4",children:["undefined"!=typeof document&&document?.fullscreenEnabled&&t&&/* @__PURE__ */s(W,{content:n("event.kiosk_mode","Kiosk Mode"),children:/* @__PURE__ */s("button",{onClick:t,className:"hidden sm:block",children:/* @__PURE__ */s(be,{className:"size-6"})})}),"undefined"!=typeof document&&document?.fullscreenEnabled&&h&&/* @__PURE__ */s(Le,{event:e}),g&&/* @__PURE__ */s(W,{content:n("event.review_contents","Review Contents"),children:/* @__PURE__ */s("a",{target:"_blank",rel:"noreferrer",href:C.EVENT_REVIEW_CONTENTS(e?.slug??""),className:"relative",children:[/* @__PURE__ */s(xe,{className:"size-6"}),Number(c)>0&&/* @__PURE__ */s("div",{className:"bg-primary text-primary-foreground absolute -top-2 -right-2 rounded-lg px-1 py-0 text-xs",children:c})]})}),f.length>0&&/* @__PURE__ */s(U,{children:[/* @__PURE__ */s(F,{children:/* @__PURE__ */s(Ee,{className:"size-6"})}),/* @__PURE__ */s($,{align:"end",side:"bottom",className:"w-48",children:f.map(e=>/* @__PURE__ */s(B,{href:e.href,icon:/* @__PURE__ */s(e.icon,{className:"text-primary"}),title:e.title,suffix:e?.chip?/* @__PURE__ */s("span",{className:"bg-primary text-primary-foreground rounded-full px-1.5 py-0.5 text-[0.5rem] font-medium sm:text-xs",children:e.chip}):void 0,isBeta:"BETA"===e?.chip},e.href??e.title))})]})]})};function Me({className:e}){/* @__PURE__ */
18
+ return s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */s("path",{fill:"currentColor",d:"M4 18q-.425 0-.712-.288T3 17t.288-.712T4 16h16q.425 0 .713.288T21 17t-.288.713T20 18zm0-5q-.425 0-.712-.288T3 12t.288-.712T4 11h16q.425 0 .713.288T21 12t-.288.713T20 13zm0-5q-.425 0-.712-.288T3 7t.288-.712T4 6h16q.425 0 .713.288T21 7t-.288.713T20 8z"})})}var Ae=({engagementStyle:e,sort:t=A,order:n=x,onSortChange:r,onSortOrderChange:i})=>{const{t:o}=Y(),l=a(()=>{const t=Object.keys(L).map(e=>({text:o(`content.sortby_${L[e].label.toLowerCase()}`,L[e].label),value:e,activeClassName:"bg-primary text-primary-foreground"}));return e===b.CONTEST?t:t.filter(e=>e.value!==N.POPULAR)},[e,o]);/* @__PURE__ */
19
+ return s("div",{className:"relative flex w-auto items-center gap-2",children:[/* @__PURE__ */s("button",{type:"button",className:"bg-background rounded p-1",onClick:i,children:/* @__PURE__ */s("svg",{xmlns:"http://www.w3.org/2000/svg",className:c("text-foreground w-7 -scale-x-100 transition-transform",n===T.ASC&&"-scale-y-100"),viewBox:"0 0 24 24",children:/* @__PURE__ */s("path",{fill:"currentColor",d:"M4 18q-.425 0-.712-.288T3 17t.288-.712T4 16h4q.425 0 .713.288T9 17t-.288.713T8 18zm0-5q-.425 0-.712-.288T3 12t.288-.712T4 11h10q.425 0 .713.288T15 12t-.288.713T14 13zm0-5q-.425 0-.712-.288T3 7t.288-.712T4 6h16q.425 0 .713.288T21 7t-.288.713T20 8z"})})}),/* @__PURE__ */s(H,{className:"flex-1 lg:flex-none",selected:t,buttons:l,onChange:e=>r&&r(e)})]})},_e=["jpg","jpeg","png","webp","heic","tiff","bmp"],Pe=({value:t,onChange:i})=>{const[o,l]=r(!1),c=n(null),d=a(()=>t?URL.createObjectURL(t):null,[t]);return e(()=>()=>{d&&URL.revokeObjectURL(d)},[d]),e(()=>{!t&&c.current&&(c.current.value="")},[t]),/* @__PURE__ */s("div",{className:"flex items-center gap-3",children:[!t&&/* @__PURE__ */s("div",{className:"flex items-center gap-4",children:/* @__PURE__ */s("button",{type:"button",onClick:()=>c.current?.click(),className:"border-border flex items-center gap-2 rounded border px-3 py-2.5 "+(o?"bg-opacity-75 cursor-not-allowed":"hover:cursor-pointer"),children:/* @__PURE__ */s(o?X:se,{})})}),t&&d&&/* @__PURE__ */s("img",{src:d,alt:"Facial Search",className:"size-10 rounded object-cover"}),
20
+ /* @__PURE__ */s("input",{ref:c,type:"file",accept:"image/*",className:"hidden",onChange:e=>{const t=e.target?.files?.[0]??null;if(!t)return;const n=(t.name.split(".").pop()||"").toLowerCase();if(!_e.includes(n))return i(null);(async e=>{if(!e)return;l(!0);let t=e;try{const n=await ue(e);t=n.size/1024/1024>1?await me(n,{maxSizeMB:1,maxWidthOrHeight:1600,useWebWorker:!0,preserveExif:!1,maxIteration:3}):n}catch(n){console.error(n)}l(!1),i(t)})(t)}})]})},Re={[I.GRID]:{icon:/* @__PURE__ */s(Ie,{className:"size-full text-inherit"})},[I.SINGLE]:{icon:/* @__PURE__ */s(Me,{className:"size-full text-inherit"})}},Oe=Object.keys(Re).map(e=>({icon:Re[e].icon,value:e})),Ve=({engagementStyle:t,disabled:a,mode:i,onModeChange:l,sort:c,onSortChange:u,sortOrder:m,onSortOrderChange:g,handleChange:h,face:f,onFaceImageChange:p})=>{const{t:w}=Y(),{organization:v}=d(),[T,y]=r(""),[N,q]=r(null),x=n(null),b=o(()=>{x.current&&(URL.revokeObjectURL(x.current),x.current=null)},[]),E=o(e=>{if(q(e),b(),e){const t=URL.createObjectURL(e);x.current=t,p?.(t)}else p?.(void 0)},[p,b]),C=o(e=>{y(e.target.value)},[]),S=o(e=>{const t=e.key;"Enter"===t?h&&h(T.length>0?T:""):"Escape"===t&&(y(""),h&&h(""))},[T,h]),I=o(()=>{y(""),h&&h("")},[h]),z=o(()=>{h&&h(T)},[T,h]);return e(()=>{f||q(null)},[f]),e(()=>()=>{b()},[b]),/* @__PURE__ */s("fieldset",{disabled:a,className:"m-0 mb-3 grid min-w-0 grid-cols-3 border-0 p-0 md:space-y-0 md:space-x-4 "+(a?"opacity-50":""),children:[
21
21
  /* @__PURE__ */s("div",{className:"col-span-3 flex items-center gap-4 md:col-span-1",children:[v?.integrationSettings?.showGridViewToggle&&/* @__PURE__ */s(H,{buttons:Oe,selected:i,onChange:l}),v?.integrationSettings?.showKeywordSearch&&/* @__PURE__ */s("div",{className:"flex-auto",children:/* @__PURE__ */s("div",{className:"relative min-w-32 sm:min-w-48",children:[
22
22
  /* @__PURE__ */s(fe,{placeholder:w("content.search_placeholder","Search using text"),value:T,className:"py-2",onChange:C,onKeyUp:S}),T?.length>0&&/* @__PURE__ */s("button",{className:"absolute inset-y-0 right-10 flex items-center",onClick:I,children:/* @__PURE__ */s(Z,{className:"text-foreground w-5"})}),
23
23
  /* @__PURE__ */s("button",{className:"absolute inset-y-0 right-3 flex items-center",onClick:z,children:/* @__PURE__ */s(D,{className:"text-foreground w-5"})})]})}),v?.integrationSettings?.showFacialSearch&&/* @__PURE__ */s(Pe,{value:N,onChange:E})]}),
24
24
  /* @__PURE__ */s("div",{className:"col-span-3 md:col-span-1"}),
25
- /* @__PURE__ */s("div",{className:"col-span-3 mt-3 md:col-span-1 md:mt-0 lg:justify-self-end",children:/* @__PURE__ */s(_e,{engagementStyle:t,sort:c,order:u,onSortChange:d,onSortOrderChange:g})})]})},Fe=()=>/* @__PURE__ */s("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-full",width:"800",height:"469.317",viewBox:"0 0 800 469.317",role:"img","aria-hidden":"true",children:/* @__PURE__ */s("g",{transform:"translate(-443.142 -257.876)",children:[
25
+ /* @__PURE__ */s("div",{className:"col-span-3 mt-3 md:col-span-1 md:mt-0 lg:justify-self-end",children:/* @__PURE__ */s(Ae,{engagementStyle:t,sort:c,order:m,onSortChange:u,onSortOrderChange:g})})]})},Fe=()=>/* @__PURE__ */s("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-full",width:"800",height:"469.317",viewBox:"0 0 800 469.317",role:"img","aria-hidden":"true",children:/* @__PURE__ */s("g",{transform:"translate(-443.142 -257.876)",children:[
26
26
  /* @__PURE__ */s("path",{d:"M898.247,664.1H371.155a30.276,30.276,0,0,1-30.241-30.241V352.525a30.276,30.276,0,0,1,30.241-30.241H898.247a30.276,30.276,0,0,1,30.241,30.241V633.862A30.276,30.276,0,0,1,898.247,664.1Z",transform:"translate(308.867 25.517)",fill:"#fff"}),
27
27
  /* @__PURE__ */s("path",{d:"M557.334,341.82H30.241A30.276,30.276,0,0,1,0,311.578V30.241A30.276,30.276,0,0,1,30.241,0H557.334a30.276,30.276,0,0,1,30.241,30.241V311.578A30.276,30.276,0,0,1,557.334,341.82ZM30.241,1.833A28.441,28.441,0,0,0,1.833,30.241V311.578a28.441,28.441,0,0,0,28.409,28.409H557.334a28.441,28.441,0,0,0,28.409-28.409V30.241A28.441,28.441,0,0,0,557.334,1.833Z",transform:"matrix(0.999, -0.035, 0.035, 0.999, 643.995, 358.158)",fill:"#d6d6e3"}),
28
28
  /* @__PURE__ */s("path",{d:"M754.171,630.2l-509.5-135.058a30.276,30.276,0,0,1-21.483-36.981L295.28,186.212a30.276,30.276,0,0,1,36.981-21.483l509.5,135.058a30.276,30.276,0,0,1,21.483,36.981L791.152,608.712A30.276,30.276,0,0,1,754.171,630.2Z",transform:"translate(220.958 94.156)",fill:"#f2f2f2"}),
29
29
  /* @__PURE__ */s("path",{d:"M775.247,705.1H248.155a30.276,30.276,0,0,1-30.241-30.241V393.525a30.276,30.276,0,0,1,30.241-30.241H775.247a30.276,30.276,0,0,1,30.241,30.242V674.862A30.275,30.275,0,0,1,775.247,705.1Z",transform:"translate(319.149 22.09)",fill:"#fff"}),
30
30
  /* @__PURE__ */s("path",{d:"M638.653,701.841H298.272c-.426,0-.852-.009-1.272-.033l160.985-90.663c3.065-1.762,9.943-2.382,15.361-1.385a13.912,13.912,0,0,1,4.26,1.385l108.041,60.842,5.176,2.911Z",transform:"translate(312.538 1.526)",fill:"#e6e6e6"}),
31
31
  /* @__PURE__ */s("path",{d:"M760.145,704.279h-294.4l57.049-26.943L526.9,675.4l74.341-35.111c4.874-2.3,16.6-2.445,22.328-.434q.577.206,1.071.434Z",transform:"translate(298.432 -0.912)",fill:"#e6e6e6"}),
32
- /* @__PURE__ */s("path",{d:"M248.322,365.284a28.441,28.441,0,0,0-28.409,28.409V675.03a28.441,28.441,0,0,0,28.409,28.409H775.415a28.441,28.441,0,0,0,28.409-28.409V393.693a28.441,28.441,0,0,0-28.409-28.409Z",transform:"translate(319.149 22.09)",fill:"none",stroke:"#d6d6e3",strokeWidth:"1.833"})]})}),je=({position:t,gamConfig:r,eventId:a,organizationId:i})=>{const{trackGamAnalytics:o}=ie(),l=n(null),c=`gam-${t}-banner-${a??"ev"}`,d=r.placementCategories?.[t];return e(()=>{let e=!1,t=null,n=null,s=null,u=null,m=null,g=null;const h=d?[d]:[],f=document.createElement("div");f.id=c,document.body.appendChild(f);const p=()=>{const e=l.current;if(!e)return;const t=e.getBoundingClientRect(),n=t.width>0&&t.height>0;f.style.display=n?"block":"none",n&&(f.style.position="fixed",f.style.top=`${t.top}px`,f.style.left=`${t.left}px`,f.style.width="728px",f.style.height="90px",f.style.zIndex="20")};return p(),window.addEventListener("scroll",p,{passive:!0}),window.addEventListener("resize",p),(async()=>{await re(),e||window.googletag.cmd.push(()=>{if(e)return;oe(c);const l=window.googletag.defineSlot(r.adUnitPath,[[728,90]],c)?.addService(window.googletag.pubads());l&&(t=l,u=window.googletag.pubads(),a?l.setConfig({targeting:{qrati_event:a,...h.length>0?{qrati_category:h}:{}}}):h.length>0&&l.setConfig({targeting:{qrati_category:h}}),m=e=>{e.slot===l&&o({eventId:a,organizationId:i,type:y.GAM_IMPRESSION,creativeId:String(e.creativeId??""),lineItemId:String(e.lineItemId??""),advertiserId:String(e.advertiserId??""),isEmpty:e.isEmpty??!1})},u.addEventListener("slotRenderEnded",m),g=e=>{e.slot===l&&o({eventId:a,organizationId:i,type:y.GAM_VIEWABLE})},u.addEventListener("impressionViewable",g),s=ce({container:f,onClick:()=>{o({eventId:a,organizationId:i,type:y.GAM_CLICK})}}),ae(),window.googletag.display(c),n=window.setTimeout(()=>{e||(p(),l.getResponseInformation?.()||window.googletag.pubads().refresh([l]))},1500))})})(),()=>{e=!0,window.removeEventListener("scroll",p),window.removeEventListener("resize",p),null!==n&&window.clearTimeout(n),s?.(),u&&"function"==typeof u.removeEventListener&&(m&&u.removeEventListener("slotRenderEnded",m),g&&u.removeEventListener("impressionViewable",g));const r=t;t=null,r&&window.googletag?.cmd?.push(()=>{window.googletag.destroySlots([r])}),f.parentNode&&f.parentNode.removeChild(f)}},[a,r.adUnitPath,i,d,t,c]),/* @__PURE__ */s("div",{className:"flex w-full items-center justify-center overflow-x-auto py-2",children:/* @__PURE__ */s("div",{ref:l,style:{width:728,height:90,minWidth:728}})})},Be=({gamConfig:t,eventId:r,organizationId:a})=>{const{trackGamAnalytics:i}=ie(),o=n(null),l=`gam-right-${r??"ev"}`,c=t.placementCategories?.right??t.placementCategories?.sidebar;return e(()=>{let e=!1,n=null,s=null,d=null,u=null,m=null,g=null;const h=c?[c]:[],f=document.createElement("div");f.id=l,document.body.appendChild(f);const p=()=>{const e=o.current;if(!e)return;const t=e.getBoundingClientRect(),n=e.parentElement?.getBoundingClientRect(),r=t.width>0&&t.height>0;if(f.style.display=r?"block":"none",!r)return;const a=t.top<=0&&n?Math.min(0,n.bottom-600):t.top;f.style.position="fixed",f.style.top=`${a}px`,f.style.left=`${t.left}px`,f.style.width="160px",f.style.height="600px",f.style.zIndex="20"};return p(),window.addEventListener("scroll",p,{passive:!0}),window.addEventListener("resize",p),(async()=>{await re(),e||window.googletag.cmd.push(()=>{if(e)return;oe(l);const o=window.googletag.defineSlot(t.adUnitPath,[[160,600]],l)?.addService(window.googletag.pubads());o&&(n=o,u=window.googletag.pubads(),r?o.setConfig({targeting:{qrati_event:r,...h.length>0?{qrati_category:h}:{}}}):h.length>0&&o.setConfig({targeting:{qrati_category:h}}),m=e=>{e.slot===o&&i({eventId:r,organizationId:a,type:y.GAM_IMPRESSION,creativeId:String(e.creativeId??""),lineItemId:String(e.lineItemId??""),advertiserId:String(e.advertiserId??""),isEmpty:e.isEmpty??!1})},u.addEventListener("slotRenderEnded",m),g=e=>{e.slot===o&&i({eventId:r,organizationId:a,type:y.GAM_VIEWABLE})},u.addEventListener("impressionViewable",g),d=ce({container:f,onClick:()=>{i({eventId:r,organizationId:a,type:y.GAM_CLICK})}}),ae(),window.googletag.display(l),s=window.setTimeout(()=>{e||(p(),o.getResponseInformation?.()||window.googletag.pubads().refresh([o]))},1500))})})(),()=>{e=!0,window.removeEventListener("scroll",p),window.removeEventListener("resize",p),null!==s&&window.clearTimeout(s),d?.(),u&&"function"==typeof u.removeEventListener&&(m&&u.removeEventListener("slotRenderEnded",m),g&&u.removeEventListener("impressionViewable",g));const t=n;n=null,t&&window.googletag?.cmd?.push(()=>{window.googletag.destroySlots([t])}),f.parentNode&&f.parentNode.removeChild(f)}},[r,t.adUnitPath,a,c,l]),/* @__PURE__ */s("div",{ref:o,style:{width:160,height:600},className:"hidden shrink-0 self-start lg:block"})},He=t(()=>import("./CzHEb5lR2.js")),Ue=()=>{const t=R().eventSlug,{loadingUser:c,organization:T}=m(),y=d(),[E,C]=r(""),[z,M]=r(void 0),[P,O]=r(_),[F,j]=r(x),[B,H]=r("undefined"!=typeof window&&window.innerWidth<768?I.SINGLE:I.GRID),U=n(null),{event:G,ads:$,gamConfig:W}=J({eventSlug:t}),{loading:D,isError:Y,error:X,refetch:ne,contentsWithAds:re,hasNextPage:ae,fetchNextPage:se,isFetchingNextPage:oe}=(({event:e,ads:t=[],gamConfig:n,sort:r=_,order:i=x,keywords:s,face:o,limit:l=20})=>{const{props:c,loadingUser:d,user:u}=m(),T=c?.organizationId,{isLoading:y,isError:N,error:b,data:E,hasNextPage:C,fetchNextPage:I,isFetchingNextPage:z,refetch:k}=f({queryKey:[v.CONTENTS_BY_EVENT(e?._id??""),T??"",r,i,s,o,String(l)],queryFn:async({pageParam:t=1})=>{try{return await g.get(S.GET_CONTENTS,{searchParams:{eventId:e?._id,page:t,keywords:s,faceImageUrl:o,sort:`${w[i].sortOrder}${L[r].sortField}`,limit:l},headers:{"x-org-id":T,...u?{Authorization:`Bearer ${u.token}`}:{}}}).json()}catch(b){throw new Error(b instanceof Error?b.message:String(b)||"Failed to fetch contents")}},enabled:!d&&!!e,staleTime:6e4,gcTime:3e5,refetchOnWindowFocus:"always",initialPageParam:1,getPreviousPageParam:e=>h(e),getNextPageParam:p}),M=a(()=>E?.pages?.flatMap(e=>e?.data??[])??[],[E]);return{contents:M,contentsWithAds:a(()=>{const r=Boolean(n?.inGalleryEnabled);return((e=[],{ads:t,gamConfig:n,position:r,gamShare:a})=>{if(r<=0)return e;const i=Boolean(n?.inGalleryEnabled),s=t.length>0;if(!i&&!s)return e;const o=i?s?Math.min(1,Math.max(0,a)):1:0,l=e=>{const n=t.length>1?t.filter(t=>t._id!==e):t,r=n.reduce((e,t)=>e+Math.max(1,t.frequency??1),0);let a=Math.random()*r;for(const t of n)if(a-=Math.max(1,t.frequency??1),a<=0)return t;return n[n.length-1]};let c=null,d=0;const u=[];for(let m=0;m<e.length;m++)if(u.push(e[m]),(m+1)%r===0){if(i&&(!s||Math.floor((d+1)*o)>Math.floor(d*o))&&n){const e=s?l(c):null;u.push({_id:`gam-ad-slot-${d}`,type:q.GAM_AD,slotIndex:d,gamConfig:n,fallbackAd:e,width:n.sizes[0]?.[0]??300,height:n.sizes[0]?.[1]??250})}else{const e=l(c);c=e._id??null,u.push({...e,type:q.AD,adType:e.type})}d++}return u})(M,{ads:"gam"!==e?.adMode||r?t:[],gamConfig:r?n:null,position:e?.adPosition??0,gamShare:(n?.inGalleryBlend??50)/100})},[M,t,e,n]),loading:y,isError:N,error:b,refetch:k,hasNextPage:C,fetchNextPage:I,isFetchingNextPage:z}})({event:G,ads:$,gamConfig:W,sort:P,order:F,keywords:E,face:z}),{incrementEventView:le}=ie(),{start:ce,initializing:de,running:ue}=(({ref:t,onBottomReached:a,hasNextPage:i,fetchNextPage:s,isFetchingNextPage:o})=>{const[l,c]=r(!1),[d,u]=r(!1),m=n(1),g=n(null),h=n(null),f=n(null),p=n(0),w=n(!1),v=n(null),T=n(null),y=n(!1),N=n(),q=n(),x=n(i),b=n(o),E=n(s),C=n(a);x.current=i,b.current=o,E.current=s,C.current=a,e(()=>{o||(w.current=!1)},[o]);const S=()=>{null!==g.current&&(window.cancelAnimationFrame(g.current),g.current=null)},I=e=>{const n=t.current;if(!n)return;null===f.current&&(f.current=e);const r=Math.min((e-f.current)/1e3,.05);f.current=e,p.current+=60*m.current*r;const a=Math.floor(p.current);a>0&&(n.scrollTop+=a,p.current-=a),x.current&&!b.current&&!w.current&&"function"==typeof E.current&&n.scrollTop+n.clientHeight>=.5*n.scrollHeight&&(w.current=!0,E.current()),Math.ceil(n.scrollTop)+n.clientHeight>=n.scrollHeight?(S(),h.current=window.setTimeout(()=>{u(!0),C.current?.(),w.current=!1,h.current=window.setTimeout(()=>{t.current&&(t.current.scrollTop=0),u(!1),p.current=0,f.current=null,g.current=window.requestAnimationFrame(I)},1e3)},1e3)):g.current=window.requestAnimationFrame(I)},z=()=>{S(),h.current&&(window.clearTimeout(h.current),h.current=null),null!==v.current&&v.current.release().catch(()=>{}).finally(()=>{v.current=null}),T.current&&(document.removeEventListener("visibilitychange",T.current),T.current=null),y.current&&(N.current&&document.removeEventListener("keydown",N.current),q.current&&document.removeEventListener("fullscreenchange",q.current),y.current=!1),c(!1),u(!1),t.current&&(t.current.scrollTop=0)},L=n(e=>{"+"===e.key&&(m.current=Math.min(m.current+1,10)),"-"===e.key&&(m.current=Math.max(m.current-1,1))}),k=n(()=>{document.fullscreenElement||z()});return k.current=()=>{document.fullscreenElement||z()},e(()=>()=>{z()},[]),{start:()=>{if(t?.current?.requestFullscreen)t.current.requestFullscreen();else{const e=t.current;e?.webkitRequestFullscreen?e.webkitRequestFullscreen():e?.mozRequestFullScreen?e.mozRequestFullScreen():e?.msRequestFullscreen&&e.msRequestFullscreen()}(async()=>{try{if(!("wakeLock"in navigator))return;const e=navigator;v.current=await e.wakeLock.request("screen");const t=async()=>{"visible"===document.visibilityState&&(v.current=await e.wakeLock.request("screen"))};T.current=t,document.addEventListener("visibilitychange",t)}catch(e){}})(),y.current||(N.current=e=>L.current(e),q.current=()=>k.current(),document.addEventListener("keydown",N.current),document.addEventListener("fullscreenchange",q.current),y.current=!0),p.current=0,f.current=null,w.current=!1,c(!0),S(),h.current=window.setTimeout(()=>{g.current=window.requestAnimationFrame(I)},300)},initializing:d,running:l}})({ref:U,hasNextPage:ae,fetchNextPage:se,isFetchingNextPage:oe,onBottomReached:()=>G?._id&&y.refetchQueries({queryKey:[v.CONTENTS_BY_EVENT(G._id)]})});e(()=>{G?.slug&&le(G.slug)},[G?.slug,le]);const me=a(()=>B===I.SINGLE,[B]),he=a(()=>/* @__PURE__ */s(ke,{event:G,onAutoscrollClick:ce}),[G,ce]),fe=n(null),pe=n({hasNextPage:ae,isFetchingNextPage:oe,loading:D,running:ue,fetchNextPage:se});pe.current={hasNextPage:ae,isFetchingNextPage:oe,loading:D,running:ue,fetchNextPage:se},e(()=>(fe.current=new IntersectionObserver(e=>{const t=pe.current;t.running||e[0].isIntersecting&&t.hasNextPage&&!t.isFetchingNextPage&&!t.loading&&t.fetchNextPage()},{rootMargin:"200px"}),()=>{fe.current?.disconnect(),fe.current=null}),[]);const we=o(e=>{const t=fe.current;t&&(t.disconnect(),e&&t.observe(e))},[]),ve=W?.bannerPositions??[],Te=T?._id,Ne=W&&ve.includes("right"),qe=Boolean(T?.integrationSettings?.showQuickSearch);/* @__PURE__ */
32
+ /* @__PURE__ */s("path",{d:"M248.322,365.284a28.441,28.441,0,0,0-28.409,28.409V675.03a28.441,28.441,0,0,0,28.409,28.409H775.415a28.441,28.441,0,0,0,28.409-28.409V393.693a28.441,28.441,0,0,0-28.409-28.409Z",transform:"translate(319.149 22.09)",fill:"none",stroke:"#d6d6e3",strokeWidth:"1.833"})]})}),je=({position:t,gamConfig:r,eventId:a,organizationId:i})=>{const{trackGamAnalytics:o}=ie(),l=n(null),c=`gam-${t}-banner-${a??"ev"}`,d=r.placementCategories?.[t];return e(()=>{let e=!1,t=null,n=null,s=null,u=null,m=null,g=null;const h=d?[d]:[],f=document.createElement("div");f.id=c,document.body.appendChild(f);const p=()=>{const e=l.current;if(!e)return;const t=e.getBoundingClientRect(),n=t.width>0&&t.height>0;f.style.display=n?"block":"none",n&&(f.style.position="fixed",f.style.top=`${t.top}px`,f.style.left=`${t.left}px`,f.style.width="728px",f.style.height="90px",f.style.zIndex="20")};return p(),window.addEventListener("scroll",p,{passive:!0}),window.addEventListener("resize",p),(async()=>{await re(),e||window.googletag.cmd.push(()=>{if(e)return;oe(c);const l=window.googletag.defineSlot(r.adUnitPath,[[728,90]],c)?.addService(window.googletag.pubads());l&&(t=l,u=window.googletag.pubads(),a?l.setConfig({targeting:{qrati_event:a,...h.length>0?{qrati_category:h}:{}}}):h.length>0&&l.setConfig({targeting:{qrati_category:h}}),m=e=>{e.slot===l&&o({eventId:a,organizationId:i,type:y.GAM_IMPRESSION,creativeId:String(e.creativeId??""),lineItemId:String(e.lineItemId??""),advertiserId:String(e.advertiserId??""),isEmpty:e.isEmpty??!1})},u.addEventListener("slotRenderEnded",m),g=e=>{e.slot===l&&o({eventId:a,organizationId:i,type:y.GAM_VIEWABLE})},u.addEventListener("impressionViewable",g),s=ce({container:f,onClick:()=>{o({eventId:a,organizationId:i,type:y.GAM_CLICK})}}),ae(),window.googletag.display(c),n=window.setTimeout(()=>{e||(p(),l.getResponseInformation?.()||window.googletag.pubads().refresh([l]))},1500))})})(),()=>{e=!0,window.removeEventListener("scroll",p),window.removeEventListener("resize",p),null!==n&&window.clearTimeout(n),s?.(),u&&"function"==typeof u.removeEventListener&&(m&&u.removeEventListener("slotRenderEnded",m),g&&u.removeEventListener("impressionViewable",g));const r=t;t=null,r&&window.googletag?.cmd?.push(()=>{window.googletag.destroySlots([r])}),f.parentNode&&f.parentNode.removeChild(f)}},[a,r.adUnitPath,i,d,t,c]),/* @__PURE__ */s("div",{className:"flex w-full items-center justify-center overflow-x-auto py-2",children:/* @__PURE__ */s("div",{ref:l,style:{width:728,height:90,minWidth:728}})})},Be=({gamConfig:t,eventId:r,organizationId:a})=>{const{trackGamAnalytics:i}=ie(),o=n(null),l=`gam-right-${r??"ev"}`,c=t.placementCategories?.right??t.placementCategories?.sidebar;return e(()=>{let e=!1,n=null,s=null,d=null,u=null,m=null,g=null;const h=c?[c]:[],f=document.createElement("div");f.id=l,document.body.appendChild(f);const p=()=>{const e=o.current;if(!e)return;const t=e.getBoundingClientRect(),n=e.parentElement?.getBoundingClientRect(),r=t.width>0&&t.height>0;if(f.style.display=r?"block":"none",!r)return;const a=t.top<=0&&n?Math.min(0,n.bottom-600):t.top;f.style.position="fixed",f.style.top=`${a}px`,f.style.left=`${t.left}px`,f.style.width="160px",f.style.height="600px",f.style.zIndex="20"};return p(),window.addEventListener("scroll",p,{passive:!0}),window.addEventListener("resize",p),(async()=>{await re(),e||window.googletag.cmd.push(()=>{if(e)return;oe(l);const o=window.googletag.defineSlot(t.adUnitPath,[[160,600]],l)?.addService(window.googletag.pubads());o&&(n=o,u=window.googletag.pubads(),r?o.setConfig({targeting:{qrati_event:r,...h.length>0?{qrati_category:h}:{}}}):h.length>0&&o.setConfig({targeting:{qrati_category:h}}),m=e=>{e.slot===o&&i({eventId:r,organizationId:a,type:y.GAM_IMPRESSION,creativeId:String(e.creativeId??""),lineItemId:String(e.lineItemId??""),advertiserId:String(e.advertiserId??""),isEmpty:e.isEmpty??!1})},u.addEventListener("slotRenderEnded",m),g=e=>{e.slot===o&&i({eventId:r,organizationId:a,type:y.GAM_VIEWABLE})},u.addEventListener("impressionViewable",g),d=ce({container:f,onClick:()=>{i({eventId:r,organizationId:a,type:y.GAM_CLICK})}}),ae(),window.googletag.display(l),s=window.setTimeout(()=>{e||(p(),o.getResponseInformation?.()||window.googletag.pubads().refresh([o]))},1500))})})(),()=>{e=!0,window.removeEventListener("scroll",p),window.removeEventListener("resize",p),null!==s&&window.clearTimeout(s),d?.(),u&&"function"==typeof u.removeEventListener&&(m&&u.removeEventListener("slotRenderEnded",m),g&&u.removeEventListener("impressionViewable",g));const t=n;n=null,t&&window.googletag?.cmd?.push(()=>{window.googletag.destroySlots([t])}),f.parentNode&&f.parentNode.removeChild(f)}},[r,t.adUnitPath,a,c,l]),/* @__PURE__ */s("div",{ref:o,style:{width:160,height:600},className:"hidden shrink-0 self-start lg:block"})},He=t(()=>import("./qBKIp1ZW2.js")),Ue=()=>{const t=R().eventSlug,{loadingUser:u,organization:T}=d(),y=m(),[E,C]=r(""),[z,M]=r(void 0),[P,O]=r(A),[F,j]=r(x),[B,H]=r("undefined"!=typeof window&&window.innerWidth<768?I.SINGLE:I.GRID),U=n(null),{event:G,ads:$,gamConfig:W}=J({eventSlug:t}),{loading:D,isError:Y,error:X,refetch:ne,contentsWithAds:re,hasNextPage:ae,fetchNextPage:se,isFetchingNextPage:oe}=(({event:e,ads:t=[],gamConfig:n,sort:r=A,order:i=x,keywords:s,face:o,limit:l=20})=>{const{props:c,loadingUser:u,user:m}=d(),T=c?.organizationId,{isLoading:y,isError:N,error:b,data:E,hasNextPage:C,fetchNextPage:I,isFetchingNextPage:z,refetch:k}=h({queryKey:[v.CONTENTS_BY_EVENT(e?._id??""),T??"",r,i,s,o,String(l)],queryFn:async({pageParam:t=1})=>{try{return await p.get(S.GET_CONTENTS,{searchParams:{eventId:e?._id,page:t,keywords:s,faceImageUrl:o,sort:`${w[i].sortOrder}${L[r].sortField}`,limit:l},headers:{"x-org-id":T,...m?{Authorization:`Bearer ${m.token}`}:{}}}).json()}catch(b){throw new Error(b instanceof Error?b.message:String(b)||"Failed to fetch contents")}},enabled:!u&&!!e,staleTime:6e4,gcTime:3e5,refetchOnWindowFocus:"always",initialPageParam:1,getPreviousPageParam:e=>g(e),getNextPageParam:f}),M=a(()=>E?.pages?.flatMap(e=>e?.data??[])??[],[E]);return{contents:M,contentsWithAds:a(()=>{const r=Boolean(n?.inGalleryEnabled);return((e=[],{ads:t,gamConfig:n,position:r,gamShare:a})=>{if(r<=0)return e;const i=Boolean(n?.inGalleryEnabled),s=t.length>0;if(!i&&!s)return e;const o=i?s?Math.min(1,Math.max(0,a)):1:0,l=e=>{const n=t.length>1?t.filter(t=>t._id!==e):t,r=n.reduce((e,t)=>e+Math.max(1,t.frequency??1),0);let a=Math.random()*r;for(const t of n)if(a-=Math.max(1,t.frequency??1),a<=0)return t;return n[n.length-1]};let c=null,d=0;const u=[];for(let m=0;m<e.length;m++)if(u.push(e[m]),(m+1)%r===0){if(i&&(!s||Math.floor((d+1)*o)>Math.floor(d*o))&&n){const e=s?l(c):null;u.push({_id:`gam-ad-slot-${d}`,type:q.GAM_AD,slotIndex:d,gamConfig:n,fallbackAd:e,width:n.sizes[0]?.[0]??300,height:n.sizes[0]?.[1]??250})}else{const e=l(c);c=e._id??null,u.push({...e,type:q.AD,adType:e.type})}d++}return u})(M,{ads:"gam"!==e?.adMode||r?t:[],gamConfig:r?n:null,position:e?.adPosition??0,gamShare:(n?.inGalleryBlend??50)/100})},[M,t,e,n]),loading:y,isError:N,error:b,refetch:k,hasNextPage:C,fetchNextPage:I,isFetchingNextPage:z}})({event:G,ads:$,gamConfig:W,sort:P,order:F,keywords:E,face:z}),{incrementEventView:le}=ie(),{start:ce,initializing:de,running:ue}=(({ref:t,onBottomReached:a,hasNextPage:i,fetchNextPage:s,isFetchingNextPage:o})=>{const[l,c]=r(!1),[d,u]=r(!1),m=n(1),g=n(null),h=n(null),f=n(null),p=n(0),w=n(!1),v=n(null),T=n(null),y=n(!1),N=n(),q=n(),x=n(i),b=n(o),E=n(s),C=n(a);x.current=i,b.current=o,E.current=s,C.current=a,e(()=>{o||(w.current=!1)},[o]);const S=()=>{null!==g.current&&(window.cancelAnimationFrame(g.current),g.current=null)},I=e=>{const n=t.current;if(!n)return;null===f.current&&(f.current=e);const r=Math.min((e-f.current)/1e3,.05);f.current=e,p.current+=60*m.current*r;const a=Math.floor(p.current);a>0&&(n.scrollTop+=a,p.current-=a),x.current&&!b.current&&!w.current&&"function"==typeof E.current&&n.scrollTop+n.clientHeight>=.5*n.scrollHeight&&(w.current=!0,E.current()),Math.ceil(n.scrollTop)+n.clientHeight>=n.scrollHeight?(S(),h.current=window.setTimeout(()=>{u(!0),C.current?.(),w.current=!1,h.current=window.setTimeout(()=>{t.current&&(t.current.scrollTop=0),u(!1),p.current=0,f.current=null,g.current=window.requestAnimationFrame(I)},1e3)},1e3)):g.current=window.requestAnimationFrame(I)},z=()=>{S(),h.current&&(window.clearTimeout(h.current),h.current=null),null!==v.current&&v.current.release().catch(()=>{}).finally(()=>{v.current=null}),T.current&&(document.removeEventListener("visibilitychange",T.current),T.current=null),y.current&&(N.current&&document.removeEventListener("keydown",N.current),q.current&&document.removeEventListener("fullscreenchange",q.current),y.current=!1),c(!1),u(!1),t.current&&(t.current.scrollTop=0)},L=n(e=>{"+"===e.key&&(m.current=Math.min(m.current+1,10)),"-"===e.key&&(m.current=Math.max(m.current-1,1))}),k=n(()=>{document.fullscreenElement||z()});return k.current=()=>{document.fullscreenElement||z()},e(()=>()=>{z()},[]),{start:()=>{if(t?.current?.requestFullscreen)t.current.requestFullscreen();else{const e=t.current;e?.webkitRequestFullscreen?e.webkitRequestFullscreen():e?.mozRequestFullScreen?e.mozRequestFullScreen():e?.msRequestFullscreen&&e.msRequestFullscreen()}(async()=>{try{if(!("wakeLock"in navigator))return;const e=navigator;v.current=await e.wakeLock.request("screen");const t=async()=>{"visible"===document.visibilityState&&(v.current=await e.wakeLock.request("screen"))};T.current=t,document.addEventListener("visibilitychange",t)}catch(e){}})(),y.current||(N.current=e=>L.current(e),q.current=()=>k.current(),document.addEventListener("keydown",N.current),document.addEventListener("fullscreenchange",q.current),y.current=!0),p.current=0,f.current=null,w.current=!1,c(!0),S(),h.current=window.setTimeout(()=>{g.current=window.requestAnimationFrame(I)},300)},initializing:d,running:l}})({ref:U,hasNextPage:ae,fetchNextPage:se,isFetchingNextPage:oe,onBottomReached:()=>G?._id&&y.refetchQueries({queryKey:[v.CONTENTS_BY_EVENT(G._id)]})});e(()=>{G?.slug&&le(G.slug)},[G?.slug,le]);const me=a(()=>B===I.SINGLE,[B]),he=a(()=>/* @__PURE__ */s(ke,{event:G,onAutoscrollClick:ce}),[G,ce]),fe=n(null),pe=n({hasNextPage:ae,isFetchingNextPage:oe,loading:D,running:ue,fetchNextPage:se});pe.current={hasNextPage:ae,isFetchingNextPage:oe,loading:D,running:ue,fetchNextPage:se},e(()=>(fe.current=new IntersectionObserver(e=>{const t=pe.current;t.running||e[0].isIntersecting&&t.hasNextPage&&!t.isFetchingNextPage&&!t.loading&&t.fetchNextPage()},{rootMargin:"200px"}),()=>{fe.current?.disconnect(),fe.current=null}),[]);const we=o(e=>{const t=fe.current;t&&(t.disconnect(),e&&t.observe(e))},[]),ve=W?.bannerPositions??[],Te=T?._id,Ne=W&&ve.includes("right"),qe=Boolean(T?.integrationSettings?.showQuickSearch);/* @__PURE__ */
33
33
  return s("div",{className:"bg-background mx-auto min-h-[80vh]",children:[
34
34
  /* @__PURE__ */s("div",{className:"flex flex-row justify-end gap-4 pt-2",children:he}),
35
35
  /* @__PURE__ */s("div",{className:"pb-3",children:/* @__PURE__ */s(ye,{})}),W&&ve.includes("top")&&/* @__PURE__ */s(je,{position:"top",gamConfig:W,eventId:G?._id,organizationId:Te}),
36
- /* @__PURE__ */s(Ve,{engagementStyle:G?.engagementStyle,disabled:c||D,mode:B,onModeChange:e=>H(e),sort:P,sortOrder:F,onSortChange:e=>O(e),onSortOrderChange:()=>j("asc"===F?"desc":"asc"),handleChange:C,face:z,onFaceImageChange:e=>M(e)}),z&&/* @__PURE__ */s("div",{className:"flex gap-4 py-2",children:[/* @__PURE__ */s("div",{className:"space-y-2",children:[/* @__PURE__ */s(V,{variant:"h4",children:"Searching using"}),/* @__PURE__ */s("img",{src:z,alt:"face",className:"h-32 rounded"})]}),/* @__PURE__ */s("div",{className:"flex flex-col justify-end gap-2",children:/* @__PURE__ */s(ee,{color:"error",icon:/* @__PURE__ */s(Z,{className:"size-5"}),onClick:()=>M(void 0),children:"Clear search"})})]}),
37
- /* @__PURE__ */s("div",{className:"flex items-start gap-4",children:[/* @__PURE__ */s("div",{className:"min-w-0 flex-1",children:[c||D?/* @__PURE__ */s("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-3",children:Array.from({length:8}).map((e,t)=>/* @__PURE__ */s(Q,{className:"h-72"},t))}):Y?/* @__PURE__ */s("div",{className:"my-16 flex flex-col items-center gap-4",children:/* @__PURE__ */s(K,{title:X?.message?.toLowerCase().includes("timed out")?"Request timed out":"Failed to load",description:/* @__PURE__ */s("div",{className:"flex flex-col items-center gap-4",children:[/* @__PURE__ */s(V,{variant:"body2",color:"muted",align:"center",children:X?.message?.toLowerCase().includes("timed out")?"The search took too long to respond. Please try again.":"Something went wrong while loading content."}),/* @__PURE__ */s(ee,{icon:/* @__PURE__ */s(ge,{className:"size-5"}),onClick:()=>{ne()},children:"Retry"})]})})}):re?.length<=0?/* @__PURE__ */s("div",{className:"my-16 flex flex-col items-center gap-4",children:/* @__PURE__ */s(K,{title:"No Contents",description:"Check back soon for amazing contents.",iconSvg:/* @__PURE__ */s(Fe,{})})}):/* @__PURE__ */s(l,{children:[
38
- /* @__PURE__ */s("div",{ref:U,className:u(me?"flex w-full justify-center":"",de?"opacity-0":"opacity-100",ue?"scrollbar-hide pointer-events-none transition-opacity duration-300":"pointer-events-auto transition-none","relative size-full overflow-auto"),children:/* @__PURE__ */s(i,{fallback:/* @__PURE__ */s("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:Array.from({length:8}).map((e,t)=>/* @__PURE__ */s(Q,{className:"h-72"},t))}),children:/* @__PURE__ */s(He,{event:G,contents:re,gamConfig:W,singleColumnMode:me,kioskMode:ue,timestampField:P===N.CAPTURE_TIME?"capturedAt":void 0,curateLink:G?.engagementStyle===b.CONTEST&&G.status===k.OPEN&&G.slug?A.CURATE(G.slug):void 0,onChangeFaceUrl:e=>M(e),showQuickSearch:qe})})}),
36
+ /* @__PURE__ */s(Ve,{engagementStyle:G?.engagementStyle,disabled:u||D,mode:B,onModeChange:e=>H(e),sort:P,sortOrder:F,onSortChange:e=>O(e),onSortOrderChange:()=>j("asc"===F?"desc":"asc"),handleChange:C,face:z,onFaceImageChange:e=>M(e)}),z&&/* @__PURE__ */s("div",{className:"flex gap-4 py-2",children:[/* @__PURE__ */s("div",{className:"space-y-2",children:[/* @__PURE__ */s(V,{variant:"h4",children:"Searching using"}),/* @__PURE__ */s("img",{src:z,alt:"face",className:"h-32 rounded"})]}),/* @__PURE__ */s("div",{className:"flex flex-col justify-end gap-2",children:/* @__PURE__ */s(ee,{color:"error",icon:/* @__PURE__ */s(Z,{className:"size-5"}),onClick:()=>M(void 0),children:"Clear search"})})]}),
37
+ /* @__PURE__ */s("div",{className:"flex items-start gap-4",children:[/* @__PURE__ */s("div",{className:"min-w-0 flex-1",children:[u||D?/* @__PURE__ */s("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-3",children:Array.from({length:8}).map((e,t)=>/* @__PURE__ */s(Q,{className:"h-72"},t))}):Y?/* @__PURE__ */s("div",{className:"my-16 flex flex-col items-center gap-4",children:/* @__PURE__ */s(K,{title:X?.message?.toLowerCase().includes("timed out")?"Request timed out":"Failed to load",description:/* @__PURE__ */s("div",{className:"flex flex-col items-center gap-4",children:[/* @__PURE__ */s(V,{variant:"body2",color:"muted",align:"center",children:X?.message?.toLowerCase().includes("timed out")?"The search took too long to respond. Please try again.":"Something went wrong while loading content."}),/* @__PURE__ */s(ee,{icon:/* @__PURE__ */s(ge,{className:"size-5"}),onClick:()=>{ne()},children:"Retry"})]})})}):re?.length<=0?/* @__PURE__ */s("div",{className:"my-16 flex flex-col items-center gap-4",children:/* @__PURE__ */s(K,{title:"No Contents",description:"Check back soon for amazing contents.",iconSvg:/* @__PURE__ */s(Fe,{})})}):/* @__PURE__ */s(l,{children:[
38
+ /* @__PURE__ */s("div",{ref:U,className:c(me?"flex w-full justify-center":"",de?"opacity-0":"opacity-100",ue?"scrollbar-hide pointer-events-none transition-opacity duration-300":"pointer-events-auto transition-none","relative size-full overflow-auto"),children:/* @__PURE__ */s(i,{fallback:/* @__PURE__ */s("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:Array.from({length:8}).map((e,t)=>/* @__PURE__ */s(Q,{className:"h-72"},t))}),children:/* @__PURE__ */s(He,{event:G,contents:re,gamConfig:W,singleColumnMode:me,kioskMode:ue,timestampField:P===N.CAPTURE_TIME?"capturedAt":void 0,curateLink:G?.engagementStyle===b.CONTEST&&G.status===k.OPEN&&G.slug?_.CURATE(G.slug):void 0,onChangeFaceUrl:e=>M(e),showQuickSearch:qe})})}),
39
39
  /* @__PURE__ */s("div",{ref:we,className:"h-4 w-full","aria-hidden":"true"}),oe&&/* @__PURE__ */s("div",{className:"mx-auto my-6 w-fit",children:/* @__PURE__ */s(te,{className:"size-8"})})]}),W&&ve.includes("bottom")&&/* @__PURE__ */s(je,{position:"bottom",gamConfig:W,eventId:G?._id,organizationId:Te})]}),Ne&&/* @__PURE__ */s(Be,{gamConfig:W,eventId:G?._id,organizationId:Te})]})]})};export{Ue as default};
@@ -1,2 +1,2 @@
1
- import{t as e}from"./DrrpB4Om.js";import{i as r}from"./BlmPmkho.js";import{t as a}from"./CE4Zhv-W.js";var s=e=>e&&e.length>0?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():"",t=e=>e.trim()?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)?void 0:"Enter a valid email":"Please enter your email",o=e=>e?e.length<8?"Min password length is 8":void 0:"Please enter your password",i=e=>{if(!e.trim())return"First name is required"},n=e=>{if(!e.trim())return"Last name is required"},d=(e,r)=>e?e!==r?"Passwords do not match":void 0:"Please confirm your password",l=({label:s,type:t="text",disabled:o,error:i,iconSVG:n,actionIcon:d,onActionClick:l,actionLabel:m,className:c="",step:u,...p})=>/* @__PURE__ */e("div",{className:"relative",children:[s&&/* @__PURE__ */e(a,{variant:"body1",className:"sm:mb-1",children:s}),
1
+ import{t as e}from"./DrrpB4Om.js";import{i as r}from"./CKQOToSD.js";import{t as a}from"./DmIYOIw1.js";var s=e=>e&&e.length>0?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():"",t=e=>e.trim()?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)?void 0:"Enter a valid email":"Please enter your email",o=e=>e?e.length<8?"Min password length is 8":void 0:"Please enter your password",i=e=>{if(!e.trim())return"First name is required"},n=e=>{if(!e.trim())return"Last name is required"},d=(e,r)=>e?e!==r?"Passwords do not match":void 0:"Please confirm your password",l=({label:s,type:t="text",disabled:o,error:i,iconSVG:n,actionIcon:d,onActionClick:l,actionLabel:m,className:c="",step:u,...p})=>/* @__PURE__ */e("div",{className:"relative",children:[s&&/* @__PURE__ */e(a,{variant:"body1",className:"sm:mb-1",children:s}),
2
2
  /* @__PURE__ */e("div",{className:"relative",children:[n&&/* @__PURE__ */e("div",{className:r("pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3",o?"text-muted-foreground":" "),children:n}),/* @__PURE__ */e("input",{type:t,disabled:o,step:"number"===t?u:void 0,"aria-invalid":!!i,className:r("border-border shadow-outer focus:border-primary peer w-full rounded border px-4 py-2 focus:border focus:ring-0 focus:outline-none",o?"text-muted-foreground bg-transparent":"bg-input",i?"border-destructive animate-pulse":"border-border animate-none",n?"pl-9":"",c),...p,value:p.value??""})]}),i&&/* @__PURE__ */e(a,{variant:"caption",color:"error","data-testid":"input-error",children:i})]});export{i as a,t as i,s as n,n as o,d as r,o as s,l as t};
@@ -1,2 +1,2 @@
1
- import{D as e,_ as t,a as r,f as o,h as n,t as s}from"./DrrpB4Om.js";import{i}from"./BlmPmkho.js";import{n as a}from"./BkIDQGIs.js";var l=({as:r="div",className:n,threshold:s=.5,rootMargin:i="0px",triggerOnce:a,onChange:l,onClick:h,children:c})=>{const u=o(null),d=o(!1),p=o(l);return p.current=l,t(()=>{const e=u.current;if(!e)return;d.current=!1;const t=new IntersectionObserver(e=>{e.forEach(e=>{a&&d.current||(e.isIntersecting&&(d.current=!0),p.current?.(e.isIntersecting))})},{threshold:s,rootMargin:i});return t.observe(e),()=>t.disconnect()},[s,i,a]),e(r,{ref:u,className:n,onClick:h},c)},h=Object.defineProperty,c=Object.defineProperties,u=Object.getOwnPropertyDescriptors,d=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,g=(e,t,r)=>t in e?h(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,m=(e,t)=>{for(var r in t||(t={}))p.call(t,r)&&g(e,r,t[r]);if(d)for(var r of d(t))f.call(t,r)&&g(e,r,t[r]);return e},b=(e,t)=>c(e,u(t)),w=(e,t)=>{var r={};for(var o in e)p.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&d)for(var o of d(e))t.indexOf(o)<0&&f.call(e,o)&&(r[o]=e[o]);return r},v=class extends r{constructor(){super(...arguments),this.canvas=null,this.handleRef=e=>{this.canvas=e,this.draw()},this.draw=()=>{let{hash:e,height:t,punch:r,width:o}=this.props;if(this.canvas){let n=a(e,o,t,r),s=this.canvas.getContext("2d"),i=s.createImageData(o,t);i.data.set(n),s.putImageData(i,0,0)}}}componentDidUpdate(){this.draw()}render(){let t=this.props,{hash:r,height:o,width:n}=t,s=w(t,["hash","height","width"]);return e("canvas",b(m({},s),{height:o,width:n,ref:this.handleRef}))}};v.defaultProps={height:128,width:128};var y={position:"absolute",top:0,bottom:0,left:0,right:0,width:"100%",height:"100%"};(class extends r{componentDidUpdate(){if(this.props.resolutionX<=0)throw new Error("resolutionX must be larger than zero");if(this.props.resolutionY<=0)throw new Error("resolutionY must be larger than zero")}render(){let t=this.props,{hash:r,height:o,width:n,punch:s,resolutionX:i,resolutionY:a,style:l}=t,h=w(t,["hash","height","width","punch","resolutionX","resolutionY","style"]);return e("div",b(m({},h),{style:b(m({display:"inline-block",height:o,width:n},l),{position:"relative"})}),e(v,{hash:r,height:a,width:i,punch:s,style:y}))}}).defaultProps={height:128,width:128,resolutionX:32,resolutionY:32};var j=v,O=({src:e,alt:r,threshold:a=.1,rootMargin:h="600px 0px",blurhash:c,containerClassName:u="size-full",wrapperClassName:d,imgClassName:p="",sizeMode:f="cover",position:g="center",delayMs:m=100,delayTime:b,onClick:w})=>{const v=c&&c.length>=6?c:"LEHV6nWB2yk8pyo0adR*.7kCMdnj",[y,O]=n(!1),[C,x]=n(!1),[N,k]=n(!1),z=o(null);t(()=>{O(!1),x(!1)},[e]);const M="number"==typeof b?b:m,P=d??u;t(()=>{if(!y)return N?z.current=window.setTimeout(()=>{x(!0)},M):z.current&&(clearTimeout(z.current),z.current=null),()=>{z.current&&clearTimeout(z.current)}},[N,y,M]);const D=C&&N||y;/* @__PURE__ */
1
+ import{D as e,_ as t,a as r,f as o,h as n,t as s}from"./DrrpB4Om.js";import{i}from"./CKQOToSD.js";import{n as a}from"./BkIDQGIs.js";var l=({as:r="div",className:n,threshold:s=.5,rootMargin:i="0px",triggerOnce:a,onChange:l,onClick:h,children:c})=>{const u=o(null),d=o(!1),p=o(l);return p.current=l,t(()=>{const e=u.current;if(!e)return;d.current=!1;const t=new IntersectionObserver(e=>{e.forEach(e=>{a&&d.current||(e.isIntersecting&&(d.current=!0),p.current?.(e.isIntersecting))})},{threshold:s,rootMargin:i});return t.observe(e),()=>t.disconnect()},[s,i,a]),e(r,{ref:u,className:n,onClick:h},c)},h=Object.defineProperty,c=Object.defineProperties,u=Object.getOwnPropertyDescriptors,d=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,g=(e,t,r)=>t in e?h(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,m=(e,t)=>{for(var r in t||(t={}))p.call(t,r)&&g(e,r,t[r]);if(d)for(var r of d(t))f.call(t,r)&&g(e,r,t[r]);return e},b=(e,t)=>c(e,u(t)),w=(e,t)=>{var r={};for(var o in e)p.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&d)for(var o of d(e))t.indexOf(o)<0&&f.call(e,o)&&(r[o]=e[o]);return r},v=class extends r{constructor(){super(...arguments),this.canvas=null,this.handleRef=e=>{this.canvas=e,this.draw()},this.draw=()=>{let{hash:e,height:t,punch:r,width:o}=this.props;if(this.canvas){let n=a(e,o,t,r),s=this.canvas.getContext("2d"),i=s.createImageData(o,t);i.data.set(n),s.putImageData(i,0,0)}}}componentDidUpdate(){this.draw()}render(){let t=this.props,{hash:r,height:o,width:n}=t,s=w(t,["hash","height","width"]);return e("canvas",b(m({},s),{height:o,width:n,ref:this.handleRef}))}};v.defaultProps={height:128,width:128};var y={position:"absolute",top:0,bottom:0,left:0,right:0,width:"100%",height:"100%"};(class extends r{componentDidUpdate(){if(this.props.resolutionX<=0)throw new Error("resolutionX must be larger than zero");if(this.props.resolutionY<=0)throw new Error("resolutionY must be larger than zero")}render(){let t=this.props,{hash:r,height:o,width:n,punch:s,resolutionX:i,resolutionY:a,style:l}=t,h=w(t,["hash","height","width","punch","resolutionX","resolutionY","style"]);return e("div",b(m({},h),{style:b(m({display:"inline-block",height:o,width:n},l),{position:"relative"})}),e(v,{hash:r,height:a,width:i,punch:s,style:y}))}}).defaultProps={height:128,width:128,resolutionX:32,resolutionY:32};var j=v,O=({src:e,alt:r,threshold:a=.1,rootMargin:h="600px 0px",blurhash:c,containerClassName:u="size-full",wrapperClassName:d,imgClassName:p="",sizeMode:f="cover",position:g="center",delayMs:m=100,delayTime:b,onClick:w})=>{const v=c&&c.length>=6?c:"LEHV6nWB2yk8pyo0adR*.7kCMdnj",[y,O]=n(!1),[C,x]=n(!1),[N,k]=n(!1),z=o(null);t(()=>{O(!1),x(!1)},[e]);const M="number"==typeof b?b:m,P=d??u;t(()=>{if(!y)return N?z.current=window.setTimeout(()=>{x(!0)},M):z.current&&(clearTimeout(z.current),z.current=null),()=>{z.current&&clearTimeout(z.current)}},[N,y,M]);const D=C&&N||y;/* @__PURE__ */
2
2
  return s(l,{as:"div",className:i(P,"relative overflow-hidden"),threshold:a,rootMargin:h,onChange:e=>k(e),children:[N&&/* @__PURE__ */s(j,{className:"size-full blur-2xl",hash:v}),D&&e&&/* @__PURE__ */s("img",{alt:r,src:e,loading:"lazy",decoding:"async",onLoad:()=>O(!0),className:i("absolute top-0 left-0 size-full object-center transition-all duration-300",y?"scale-100 opacity-100":"scale-95 opacity-0","contain"===f?"object-contain":"object-cover","top"===g?"object-top":"bottom"===g?"object-bottom":"object-center",p),onClick:e=>w?.(e)})]})};export{l as n,O as t};
@@ -1,4 +1,4 @@
1
- import{t as e}from"./DrrpB4Om.js";import{i as r}from"./BlmPmkho.js";import{t}from"./CtWIgfGz.js";import{n as o,o as s,r as i,t as n}from"./PRmGsKkz2.js";function d({className:r}){/* @__PURE__ */
1
+ import{t as e}from"./DrrpB4Om.js";import{i as r}from"./CKQOToSD.js";import{t}from"./DyemeRjE2.js";import{n as o,o as s,r as i,t as n}from"./Vk429P022.js";function d({className:r}){/* @__PURE__ */
2
2
  return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:r,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */e("path",{fill:"currentColor",d:"M2.725 21q-.275 0-.5-.137t-.35-.363t-.137-.488t.137-.512l9.25-16q.15-.25.388-.375T12 3t.488.125t.387.375l9.25 16q.15.25.138.513t-.138.487t-.35.363t-.5.137zm1.725-2h15.1L12 6zm8.263-1.287Q13 17.425 13 17t-.288-.712T12 16t-.712.288T11 17t.288.713T12 18t.713-.288m0-3Q13 14.425 13 14v-3q0-.425-.288-.712T12 10t-.712.288T11 11v3q0 .425.288.713T12 15t.713-.288M12 12.5"})})}function a({open:a,onOpenChange:l,title:c,description:u,cancelText:g="Cancel",confirmText:m="Confirm",confirmColor:f="error",loading:h,onCancel:b,onConfirm:v}){/* @__PURE__ */
3
3
  return e(n,{open:a,onOpenChange:l,children:/* @__PURE__ */e(o,{className:"w-full max-w-lg",children:[/* @__PURE__ */e("div",{className:"flex flex-col gap-6 p-2 sm:flex-row sm:items-start sm:p-4",children:[/* @__PURE__ */e("div",{className:"bg-destructive/10 mx-auto flex size-12 shrink-0 items-center justify-center rounded-full sm:mx-0",children:/* @__PURE__ */e(d,{className:"text-destructive size-6"})}),/* @__PURE__ */e("div",{className:"flex-1 space-y-2 text-center sm:text-left",children:[c&&/* @__PURE__ */e(s,{children:c}),u&&/* @__PURE__ */e(i,{children:u})]})]}),/* @__PURE__ */e("div",{className:"flex flex-col-reverse gap-3 p-4 sm:flex-row sm:justify-end",children:[/* @__PURE__ */e(t,{variant:"outlined",color:"foreground",disabled:h,className:"w-full sm:w-auto",onClick:b,children:g}),/* @__PURE__ */e(t,{color:f,loading:h,disabled:h,className:r("w-full sm:w-auto","error"===f&&"text-white"),onClick:v,children:m})]})]})})}var l={xs:"size-6 [&>*]:size-4",sm:"size-8 [&>*]:size-5",md:"size-10 [&>*]:size-6",lg:"size-12 [&>*]:size-7"},c={ghost:{primary:"text-primary hover:bg-primary/10",foreground:"text-foreground hover:bg-foreground/10",muted:"text-muted-foreground hover:bg-muted/20",error:"text-destructive hover:bg-destructive/10",success:"text-success hover:bg-success/10",warning:"text-warning hover:bg-warning/10",info:"text-info hover:bg-info/10"},filled:{primary:"bg-primary text-primary-foreground hover:bg-primary/90",foreground:"bg-foreground text-background hover:bg-foreground/90",muted:"bg-muted text-muted-foreground hover:bg-muted/80",error:"bg-destructive text-white hover:bg-destructive/90",success:"bg-success text-white hover:bg-success/90",warning:"bg-warning text-white hover:bg-warning/90",info:"bg-info text-white hover:bg-info/90"},outlined:{primary:"border border-primary text-primary hover:bg-primary/10",foreground:"border border-foreground text-foreground hover:bg-foreground/10",muted:"border border-border text-muted-foreground hover:bg-muted/20",error:"border border-destructive text-destructive hover:bg-destructive/10",success:"border border-success text-success hover:bg-success/10",warning:"border border-warning text-warning hover:bg-warning/10",info:"border border-info text-info hover:bg-info/10"}};function u({icon:t,size:o="md",variant:s="ghost",color:i="foreground",loading:n,disabled:d,tooltip:a,className:u,...g}){const m="default"===s?"filled":s,f=r("inline-flex cursor-pointer items-center justify-center rounded-full transition-colors disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",l[o],c[m]?.[i]||c[m]?.foreground,u);/* @__PURE__ */
4
4
  return e("button",{type:"button",disabled:d||n,className:f,title:a,...g,children:n?/* @__PURE__ */e("svg",{className:"animate-spin",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:/* @__PURE__ */e("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}):t})}function g({className:r}){/* @__PURE__ */
@@ -1,4 +1,4 @@
1
- import{E as t,S as e,_ as n,f as s,h as r,p as i,t as a,v as o,w as l,y as c}from"./DrrpB4Om.js";import{i as u}from"./BlmPmkho.js";var h=t(null),p=t(null),d=class{entries;index=0;listeners=/* @__PURE__ */new Set;constructor(t="/"){this.entries=[{path:t}]}get location(){return this.entries[this.index]?.path??"/"}get state(){return this.entries[this.index]?.state}push(t,e){this.entries=this.entries.slice(0,this.index+1),this.index=this.entries.push({path:t,state:e})-1,this.notify()}replace(t,e){this.entries[this.index]={path:t,state:e},this.notify()}go(t){const e=this.index+t;e>=0&&e<this.entries.length&&(this.index=e,this.notify())}listen(t){return this.listeners.add(t),()=>this.listeners.delete(t)}notify(){this.listeners.forEach(t=>t(this.location))}},f=class{listeners=/* @__PURE__ */new Set;get location(){return window.location.hash.replace(/^#/,"")||"/"}get state(){return window.history.state?.__qrati_state}makeUrl(t){return`${window.location.pathname+window.location.search}#${t}`}push(t,e){window.history.pushState({__qrati_state:e},"",this.makeUrl(t)),this.notify()}replace(t,e){window.history.replaceState({__qrati_state:e},"",this.makeUrl(t)),this.notify()}go(t){window.history.go(t)}listen(t){this.listeners.add(t);const e=()=>this.notify();return window.addEventListener("popstate",e),window.addEventListener("hashchange",e),queueMicrotask(()=>t(this.location)),()=>{this.listeners.delete(t),window.removeEventListener("popstate",e),window.removeEventListener("hashchange",e)}}notify(){this.listeners.forEach(t=>t(this.location))}};function m(){const t=c(p);if(!t)throw new Error("useParams must be used inside a Route");return t.params}function w(){const t=c(h);if(!t)throw new Error("useNavigate must be used inside a Router");const{navigate:e,go:n}=t;return o((t,s)=>{"number"!=typeof t?e(t,s):n(t)},[e,n])}function y(){const t=c(h);if(!t)throw new Error("useLocation must be used inside a Router");return{pathname:t.location,state:t.state,search:"",hash:""}}function v(t,e,n=!0){const s=t.split("/").filter(Boolean),r=function(t){const e=[],n=t.split("/").filter(Boolean);for(const s of n)if("*"===s)e.push({type:"wildcard"});else if(s.startsWith(":")){const t=s.endsWith("?"),n=t?s.slice(1,-1):s.slice(1);e.push({type:"param",name:n,optional:t})}else e.push({type:"static",value:s});return e}(e),i={};let a=0;for(const o of r)if("static"===o.type){if(s[a]!==o.value)return null;a++}else if("param"===o.type){if(a<s.length){try{i[o.name]=decodeURIComponent(s[a])}catch{i[o.name]=s[a]}a++}else if(!o.optional)return null}else if("wildcard"===o.type){i["*"]=s.slice(a).join("/"),a=s.length;break}return n&&a<s.length?null:{params:i}}function g(t,e){return e.startsWith("/")?e:t.endsWith("/")?t+e:`${t}/${e}`}function k(t,e,n=""){for(const s of e){const e=s.path.startsWith("/")?s.path:g(n,s.path);if(s.children&&s.children.length>0){const n=v(t,e,!1);if(n){const r=[{route:s,params:n.params}],i=k(t,s.children,e);if(i)r.push(...i);else{const t=s.children.find(t=>""===t.path);t&&r.push({route:t,params:{}})}return r}}const r=v(t,e,!0);if(r)return[{route:s,params:r.params}]}return null}function E({mode:t,initialPath:e,children:l}){const c=s("memory"===t?new d(e):new f),[u,p]=r(c.current.location),[m,w]=r(c.current.state);n(()=>(p(c.current.location),w(c.current.state),c.current.listen(t=>{p(t),w(c.current.state)})),[]);const y=o((t,e)=>{const n=c.current;e&&e.replace?n.replace(t,e.state):n.push(t,e?.state)},[]),v=o(t=>{c.current.go(t)},[]),g=i(()=>({location:u,state:m,navigate:y,go:v,mode:t}),[u,m,y,v,t]);/* @__PURE__ */
1
+ import{E as t,S as e,_ as n,f as s,h as r,p as i,t as a,v as o,w as l,y as c}from"./DrrpB4Om.js";import{i as u}from"./CKQOToSD.js";var h=t(null),p=t(null),d=class{entries;index=0;listeners=/* @__PURE__ */new Set;constructor(t="/"){this.entries=[{path:t}]}get location(){return this.entries[this.index]?.path??"/"}get state(){return this.entries[this.index]?.state}push(t,e){this.entries=this.entries.slice(0,this.index+1),this.index=this.entries.push({path:t,state:e})-1,this.notify()}replace(t,e){this.entries[this.index]={path:t,state:e},this.notify()}go(t){const e=this.index+t;e>=0&&e<this.entries.length&&(this.index=e,this.notify())}listen(t){return this.listeners.add(t),()=>this.listeners.delete(t)}notify(){this.listeners.forEach(t=>t(this.location))}},f=class{listeners=/* @__PURE__ */new Set;get location(){return window.location.hash.replace(/^#/,"")||"/"}get state(){return window.history.state?.__qrati_state}makeUrl(t){return`${window.location.pathname+window.location.search}#${t}`}push(t,e){window.history.pushState({__qrati_state:e},"",this.makeUrl(t)),this.notify()}replace(t,e){window.history.replaceState({__qrati_state:e},"",this.makeUrl(t)),this.notify()}go(t){window.history.go(t)}listen(t){this.listeners.add(t);const e=()=>this.notify();return window.addEventListener("popstate",e),window.addEventListener("hashchange",e),queueMicrotask(()=>t(this.location)),()=>{this.listeners.delete(t),window.removeEventListener("popstate",e),window.removeEventListener("hashchange",e)}}notify(){this.listeners.forEach(t=>t(this.location))}};function m(){const t=c(p);if(!t)throw new Error("useParams must be used inside a Route");return t.params}function w(){const t=c(h);if(!t)throw new Error("useNavigate must be used inside a Router");const{navigate:e,go:n}=t;return o((t,s)=>{"number"!=typeof t?e(t,s):n(t)},[e,n])}function y(){const t=c(h);if(!t)throw new Error("useLocation must be used inside a Router");return{pathname:t.location,state:t.state,search:"",hash:""}}function v(t,e,n=!0){const s=t.split("/").filter(Boolean),r=function(t){const e=[],n=t.split("/").filter(Boolean);for(const s of n)if("*"===s)e.push({type:"wildcard"});else if(s.startsWith(":")){const t=s.endsWith("?"),n=t?s.slice(1,-1):s.slice(1);e.push({type:"param",name:n,optional:t})}else e.push({type:"static",value:s});return e}(e),i={};let a=0;for(const o of r)if("static"===o.type){if(s[a]!==o.value)return null;a++}else if("param"===o.type){if(a<s.length){try{i[o.name]=decodeURIComponent(s[a])}catch{i[o.name]=s[a]}a++}else if(!o.optional)return null}else if("wildcard"===o.type){i["*"]=s.slice(a).join("/"),a=s.length;break}return n&&a<s.length?null:{params:i}}function g(t,e){return e.startsWith("/")?e:t.endsWith("/")?t+e:`${t}/${e}`}function k(t,e,n=""){for(const s of e){const e=s.path.startsWith("/")?s.path:g(n,s.path);if(s.children&&s.children.length>0){const n=v(t,e,!1);if(n){const r=[{route:s,params:n.params}],i=k(t,s.children,e);if(i)r.push(...i);else{const t=s.children.find(t=>""===t.path);t&&r.push({route:t,params:{}})}return r}}const r=v(t,e,!0);if(r)return[{route:s,params:r.params}]}return null}function E({mode:t,initialPath:e,children:l}){const c=s("memory"===t?new d(e):new f),[u,p]=r(c.current.location),[m,w]=r(c.current.state);n(()=>(p(c.current.location),w(c.current.state),c.current.listen(t=>{p(t),w(c.current.state)})),[]);const y=o((t,e)=>{const n=c.current;e&&e.replace?n.replace(t,e.state):n.push(t,e?.state)},[]),v=o(t=>{c.current.go(t)},[]),g=i(()=>({location:u,state:m,navigate:y,go:v,mode:t}),[u,m,y,v,t]);/* @__PURE__ */
2
2
  return a(h.Provider,{value:g,children:l})}function _(t){return null}function x(t){return e(t).filter(t=>t?.type===_).map(t=>({path:t.props.path,element:t.props.element,children:t.props.children?x(t.props.children):void 0}))}function C({children:t}){const{location:n}=c(h),r=s([]),o=e(t).filter(t=>t?.type===_).map(t=>t.props.path).join("\0"),u=s("");o!==u.current&&(u.current=o,r.current=x(t));const d=r.current,f=i(()=>k(n,d),[n,d]),m=i(()=>(f??[]).reduce((t,e)=>({...t,...e.params}),{}),[f]),w=i(()=>{if(!f)return null;let t=null;for(let e=f.length-1;e>=0;e--){const n=f[e].route.element;t=/* @__PURE__ */a(p.Provider,{value:{params:m,outlet:t},children:/* @__PURE__ */a(n,{})})}return t},[f,m]);return f?/* @__PURE__ */a(l,{children:w}):null}function N(){/* @__PURE__ */
3
3
  return a(l,{children:c(p)?.outlet})}function W({to:t,state:e,replace:n,children:s,className:r,onClick:i,...l}){const u=c(h);/* @__PURE__ */
4
4
  return a("a",{href:t,onClick:o(s=>{s.preventDefault(),i?.(s),u?.navigate(t,{state:e,replace:n})},[u,t,e,n,i]),className:r,...l,children:s})}function b({to:t,state:e,replace:n,children:s,className:r,activeClassName:l,onClick:p,...d}){const f=c(h),m=i(()=>{if(!f)return!1;const e=f.location;return e===t||!("/"===t||!e.startsWith(`${t}/`))},[f?.location,t]);/* @__PURE__ */
@@ -1,4 +1,4 @@
1
- import{d as e,s as r,t,v as o}from"./DrrpB4Om.js";import{n as s}from"./BlmPmkho.js";import{x as l}from"./DpD2Abx9.js";import{l as i}from"./OGzsLhnG.js";import"./DvW8TE7T.js";var n=e(()=>import("./CMR1TPJ1.js")),a=e(()=>import("./CwPz_TbG.js")),c=e(()=>import("./xW6UboQF.js")),p=e(()=>import("./BXZi_HIE.js")),d=()=>/* @__PURE__ */t("div",{class:"flex h-full items-center justify-center",children:/* @__PURE__ */t("div",{class:"text-center",children:[
1
+ import{d as e,s as r,t,v as o}from"./DrrpB4Om.js";import{n as s}from"./CKQOToSD.js";import{x as l}from"./BLeZg2Bz.js";import{l as i}from"./DdYePHxG.js";import"./B9ImRAum.js";var n=e(()=>import("./C6MqLLDX.js")),a=e(()=>import("./BmsDSHUi.js")),c=e(()=>import("./CgxypkdG.js")),p=e(()=>import("./CfTdZB8y.js")),d=()=>/* @__PURE__ */t("div",{class:"flex h-full items-center justify-center",children:/* @__PURE__ */t("div",{class:"text-center",children:[
2
2
  /* @__PURE__ */t("svg",{xmlns:"http://www.w3.org/2000/svg",class:"text-muted-foreground mx-auto mb-3 size-10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5",children:[/* @__PURE__ */t("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7z"}),/* @__PURE__ */t("circle",{cx:"12",cy:"9",r:"2.5"})]}),
3
3
  /* @__PURE__ */t("p",{class:"text-foreground",children:"No location data available."}),
4
4
  /* @__PURE__ */t("p",{class:"text-muted-foreground mt-1 text-xs",children:"Events need location data to appear on the map."})]})}),m=()=>/* @__PURE__ */t("div",{class:"flex h-full items-center justify-center",children:/* @__PURE__ */t("div",{class:"border-primary size-8 animate-spin rounded-full border-4 border-t-transparent"})}),g=({events:e,isLoading:g=!1})=>{const{organization:x}=s(),f=i(),h=x?.integrationSettings??{},u=h.mapProvider??"openstreetmap",v=o(e=>{f(l.GALLERY(e))},[f]);if("openstreetmap_free"===u)/* @__PURE__ */return t("div",{class:"relative mt-3 h-screen sm:mt-6",children:/* @__PURE__ */t(r,{fallback:/* @__PURE__ */t(m,{}),children:/* @__PURE__ */t(n,{onExplore:v,logoUrl:x?.logoUrl})})});const y=h.mapTilerApiKey??"",b=h.googleMapsApiKey??"",j=h.mapboxApiKey??"",w=e.filter(e=>"number"==typeof e.location?.x&&"number"==typeof e.location?.y);/* @__PURE__ */