@qratilabs/qrati-connect 2.5.4 → 2.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/element/{B59V0Mhr.js → B28y50Bi.js} +1 -1
- package/element/{DLz0G_z2.js → BWU1Eb1i.js} +1 -1
- package/element/{kdp9oLRU.js → CAt6yWea.js} +1 -1
- package/element/{D_N6wPLS.js → CH2f_afH.js} +1 -1
- package/element/{D43BQzpf.js → CUOOhGTj.js} +1 -1
- package/element/{BwemkCCJ.js → Cf1QDu0i.js} +1 -1
- package/element/{OucaMSbY.js → CvA0vfrf.js} +1 -1
- package/element/{DhfeoyBz.js → D4xTzxjA.js} +1 -1
- package/element/{J72K45YE.js → DODG2TX4.js} +1 -1
- package/element/{CPPs7pi-.js → DPOkh0eJ.js} +1 -1
- package/element/{DhcdFi7M.js → DiiWe_SG.js} +2 -2
- package/element/{BrMlCiWh.js → wHbQZdly.js} +1 -1
- package/element/web.es.js +3 -3
- package/package.json +1 -1
- package/react/{DXg0jviV.js → BAbwOJvT.js} +1 -1
- package/react/{DVhoieUG.js → BXiO9Rt2.js} +1 -1
- package/react/{B-MiXFkt.js → BaT1o9UO.js} +1 -1
- package/react/{q8ln6Sqn.js → BexGhdGA.js} +2 -2
- package/react/{CYK5EdMk.js → C4TTO8j2.js} +1 -1
- package/react/{DQq5P5kz.js → CNAEfadS.js} +1 -1
- package/react/{yjP1jdU0.js → CT_Cvh8-.js} +1 -1
- package/react/{DQRcftrx.js → Cs3wia2w.js} +1 -1
- package/react/{BBNhso7S.js → Czrz88CD.js} +1 -1
- package/react/{Rx2eXHSy.js → Czw0BHMZ.js} +1 -1
- package/react/{BaqVlxbd.js → D3jlv133.js} +1 -1
- package/react/{HzUDi5NE.js → D4BACpJw.js} +1 -1
- package/react/{Bh_3jcgw.js → D6cMN4OJ.js} +1 -1
- package/react/{B9vdeEQv.js → D7c4q3kj.js} +1 -1
- package/react/{t-ii7Ss0.js → DEIcfk-y.js} +1 -1
- package/react/{-k-ffFwP.js → DGIVHiX4.js} +1 -1
- package/react/{DMqKxwcb.js → DOw70z3P.js} +1 -1
- package/react/DV6DJ1Br.js +1 -0
- package/react/{r0vUVZIh.js → Dljj3ToS.js} +1 -1
- package/react/QPXxc9eb.js +1 -0
- package/react/{BQ7Q_1WB.js → Sb4c6EUR.js} +1 -1
- package/react/{Fhq5zLvg.js → aragUG-J.js} +1 -1
- package/react/{BRLq62Uv.js → e8YBtYhk.js} +1 -1
- package/react/index.cjs +1 -1
- package/react/index.mjs +3 -3
- package/react/{BTW-b-Wo.js → pIx9IeV5.js} +1 -1
- package/umd/web.umd.js +1 -1
- package/react/BJBX47Jb.js +0 -1
- package/react/C9yNmSQ8.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as e from"react";import{jsx as t}from"react/jsx-runtime";var r,o,n,s,i,a,l,c,u,d,p,f,h={},_=[],m=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,b=Array.isArray;function g(e,t){for(var r in t)e[r]=t[r];return e}function v(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function y(e,t,o){var n,s,i,a={};for(i in t)"key"==i?n=t[i]:"ref"==i?s=t[i]:a[i]=t[i];if(arguments.length>2&&(a.children=arguments.length>3?r.call(arguments,2):o),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===a[i]&&(a[i]=e.defaultProps[i]);return w(e,a,n,s,null)}function w(e,t,r,s,i){var a={type:e,props:t,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==i?++n:i,__i:-1,__u:0};return null==i&&null!=o.vnode&&o.vnode(a),a}function k(e){return e.children}function E(e,t){this.props=e,this.context=t}function x(e,t){if(null==t)return e.__?x(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e)return r.__e;return"function"==typeof e.type?x(e):null}function S(e){if(e.__P&&e.__d){var t=e.__v,r=t.__e,n=[],s=[],i=g({},t);i.__v=t.__v+1,o.vnode&&o.vnode(i),F(e.__P,i,t,e.__n,e.__P.namespaceURI,32&t.__u?[r]:null,n,null==r?x(t):r,!!(32&t.__u),s),i.__v=t.__v,i.__.__k[i.__i]=i,U(n,i,s),t.__e=t.__=null,i.__e!=r&&T(i)}}function T(e){if(null!=(e=e.__)&&null!=e.__c)return e.__e=e.__c.base=null,e.__k.some(function(t){if(null!=t&&null!=t.__e)return e.__e=e.__c.base=t.__e}),T(e)}function N(e){(!e.__d&&(e.__d=!0)&&s.push(e)&&!O.__r++||i!=o.debounceRendering)&&((i=o.debounceRendering)||a)(O)}function O(){try{for(var e,t=1;s.length;)s.length>t&&s.sort(l),e=s.shift(),t=s.length,S(e)}finally{s.length=O.__r=0}}function C(e,t,r,o,n,s,i,a,l,c,u){var d,p,f,m,g,v,y,E=o&&o.__k||_,S=t.length;for(l=function(e,t,r,o,n){var s,i,a,l,c,u=r.length,d=u,p=0;for(e.__k=new Array(n),s=0;s<n;s++)null!=(i=t[s])&&"boolean"!=typeof i&&"function"!=typeof i?("string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?i=e.__k[s]=w(null,i,null,null,null):b(i)?i=e.__k[s]=w(k,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?i=e.__k[s]=w(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):e.__k[s]=i,l=s+p,i.__=e,i.__b=e.__b+1,a=null,-1!=(c=i.__i=R(i,r,l,d))&&(d--,(a=r[c])&&(a.__u|=2)),null==a||null==a.__v?(-1==c&&(n>u?p--:n<u&&p++),"function"!=typeof i.type&&(i.__u|=4)):c!=l&&(c==l-1?p--:c==l+1?p++:(c>l?p--:p++,i.__u|=4))):e.__k[s]=null;if(d)for(s=0;s<u;s++)null!=(a=r[s])&&!(2&a.__u)&&(a.__e==o&&(o=x(a)),q(a,a));return o}(r,t,E,l,S),d=0;d<S;d++)null!=(f=r.__k[d])&&(p=-1!=f.__i&&E[f.__i]||h,f.__i=d,v=F(e,f,p,n,s,i,a,l,c,u),m=f.__e,f.ref&&p.ref!=f.ref&&(p.ref&&z(p.ref,null,f),u.push(f.ref,f.__c||m,f)),null==g&&null!=m&&(g=m),(y=!!(4&f.__u))||p.__k===f.__k?l=A(f,l,e,y):"function"==typeof f.type&&void 0!==v?l=v:m&&(l=m.nextSibling),f.__u&=-7);return r.__e=g,l}function A(e,t,r,o){var n,s;if("function"==typeof e.type){for(n=e.__k,s=0;n&&s<n.length;s++)n[s]&&(n[s].__=e,t=A(n[s],t,r,o));return t}e.__e!=t&&(o&&(t&&e.type&&!t.parentNode&&(t=x(e)),r.insertBefore(e.__e,t||null)),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function I(e,t){return t=t||[],null==e||"boolean"==typeof e||(b(e)?e.some(function(e){I(e,t)}):t.push(e)),t}function R(e,t,r,o){var n,s,i,a=e.key,l=e.type,c=t[r],u=null!=c&&!(2&c.__u);if(null===c&&null==a||u&&a==c.key&&l==c.type)return r;if(o>(u?1:0))for(n=r-1,s=r+1;n>=0||s<t.length;)if(null!=(c=t[i=n>=0?n--:s++])&&!(2&c.__u)&&a==c.key&&l==c.type)return i;return-1}function D(e,t,r){"-"==t[0]?e.setProperty(t,null==r?"":r):e[t]=null==r?"":"number"!=typeof r||m.test(t)?r:r+"px"}function P(e,t,r,o,n){var s,i;e:if("style"==t)if("string"==typeof r)e.style.cssText=r;else{if("string"==typeof o&&(e.style.cssText=o=""),o)for(t in o)r&&t in r||D(e.style,t,"");if(r)for(t in r)o&&r[t]==o[t]||D(e.style,t,r[t])}else if("o"==t[0]&&"n"==t[1])s=t!=(t=t.replace(c,"$1")),i=t.toLowerCase(),t=i in e||"onFocusOut"==t||"onFocusIn"==t?i.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=r,r?o?r.u=o.u:(r.u=u,e.addEventListener(t,s?p:d,s)):e.removeEventListener(t,s?p:d,s);else{if("http://www.w3.org/2000/svg"==n)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==r?"":r;break e}catch(e){}"function"==typeof r||(null==r||!1===r&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==r?"":r))}}function L(e){return function(t){if(this.l){var r=this.l[t.type+e];if(null==t.t)t.t=u++;else if(t.t<r.u)return;return r(o.event?o.event(t):t)}}}function F(e,t,r,n,s,i,a,l,c,u){var d,p,f,h,m,y,w,x,S,T,N,O,A,I,R,D=t.type;if(void 0!==t.constructor)return null;128&r.__u&&(c=!!(32&r.__u),i=[l=t.__e=r.__e]),(d=o.__b)&&d(t);e:if("function"==typeof D)try{if(x=t.props,S=D.prototype&&D.prototype.render,T=(d=D.contextType)&&n[d.__c],N=d?T?T.props.value:d.__:n,r.__c?w=(p=t.__c=r.__c).__=p.__E:(S?t.__c=p=new D(x,N):(t.__c=p=new E(x,N),p.constructor=D,p.render=j),T&&T.sub(p),p.state||(p.state={}),p.__n=n,f=p.__d=!0,p.__h=[],p._sb=[]),S&&null==p.__s&&(p.__s=p.state),S&&null!=D.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=g({},p.__s)),g(p.__s,D.getDerivedStateFromProps(x,p.__s))),h=p.props,m=p.state,p.__v=t,f)S&&null==D.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),S&&null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(S&&null==D.getDerivedStateFromProps&&x!==h&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(x,N),t.__v==r.__v||!p.__e&&null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(x,p.__s,N)){t.__v!=r.__v&&(p.props=x,p.state=p.__s,p.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(e){e&&(e.__=t)}),_.push.apply(p.__h,p._sb),p._sb=[],p.__h.length&&a.push(p);break e}null!=p.componentWillUpdate&&p.componentWillUpdate(x,p.__s,N),S&&null!=p.componentDidUpdate&&p.__h.push(function(){p.componentDidUpdate(h,m,y)})}if(p.context=N,p.props=x,p.__P=e,p.__e=!1,O=o.__r,A=0,S)p.state=p.__s,p.__d=!1,O&&O(t),d=p.render(p.props,p.state,p.context),_.push.apply(p.__h,p._sb),p._sb=[];else do{p.__d=!1,O&&O(t),d=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&++A<25);p.state=p.__s,null!=p.getChildContext&&(n=g(g({},n),p.getChildContext())),S&&!f&&null!=p.getSnapshotBeforeUpdate&&(y=p.getSnapshotBeforeUpdate(h,m)),I=null!=d&&d.type===k&&null==d.key?G(d.props.children):d,l=C(e,b(I)?I:[I],t,r,n,s,i,a,l,c,u),p.base=t.__e,t.__u&=-161,p.__h.length&&a.push(p),w&&(p.__E=p.__=null)}catch(e){if(t.__v=null,c||null!=i)if(e.then){for(t.__u|=c?160:128;l&&8==l.nodeType&&l.nextSibling;)l=l.nextSibling;i[i.indexOf(l)]=null,t.__e=l}else{for(R=i.length;R--;)v(i[R]);$(t)}else t.__e=r.__e,t.__k=r.__k,e.then||$(t);o.__e(e,t,r)}else null==i&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):l=t.__e=M(r.__e,t,r,n,s,i,a,c,u);return(d=o.diffed)&&d(t),128&t.__u?void 0:l}function $(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some($))}function U(e,t,r){for(var n=0;n<r.length;n++)z(r[n],r[++n],r[++n]);o.__c&&o.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){o.__e(e,t.__v)}})}function G(e){return"object"!=typeof e||null==e||e.__b>0?e:b(e)?e.map(G):g({},e)}function M(e,t,n,s,i,a,l,c,u){var d,p,f,_,m,g,y,w=n.props||h,k=t.props,E=t.type;if("svg"==E?i="http://www.w3.org/2000/svg":"math"==E?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),null!=a)for(d=0;d<a.length;d++)if((m=a[d])&&"setAttribute"in m==!!E&&(E?m.localName==E:3==m.nodeType)){e=m,a[d]=null;break}if(null==e){if(null==E)return document.createTextNode(k);e=document.createElementNS(i,E,k.is&&k),c&&(o.__m&&o.__m(t,a),c=!1),a=null}if(null==E)w===k||c&&e.data==k||(e.data=k);else{if(a=a&&r.call(e.childNodes),!c&&null!=a)for(w={},d=0;d<e.attributes.length;d++)w[(m=e.attributes[d]).name]=m.value;for(d in w)m=w[d],"dangerouslySetInnerHTML"==d?f=m:"children"==d||d in k||"value"==d&&"defaultValue"in k||"checked"==d&&"defaultChecked"in k||P(e,d,null,m,i);for(d in k)m=k[d],"children"==d?_=m:"dangerouslySetInnerHTML"==d?p=m:"value"==d?g=m:"checked"==d?y=m:c&&"function"!=typeof m||w[d]===m||P(e,d,m,w[d],i);if(p)c||f&&(p.__html==f.__html||p.__html==e.innerHTML)||(e.innerHTML=p.__html),t.__k=[];else if(f&&(e.innerHTML=""),C("template"==t.type?e.content:e,b(_)?_:[_],t,n,s,"foreignObject"==E?"http://www.w3.org/1999/xhtml":i,a,l,a?a[0]:n.__k&&x(n,0),c,u),null!=a)for(d=a.length;d--;)v(a[d]);c||(d="value","progress"==E&&null==g?e.removeAttribute("value"):null!=g&&(g!==e[d]||"progress"==E&&!g||"option"==E&&g!=w[d])&&P(e,d,g,w[d],i),d="checked",null!=y&&y!=e[d]&&P(e,d,y,w[d],i))}return e}function z(e,t,r){try{if("function"==typeof e){var n="function"==typeof e.__u;n&&e.__u(),n&&null==t||(e.__u=e(t))}else e.current=t}catch(e){o.__e(e,r)}}function q(e,t,r){var n,s;if(o.unmount&&o.unmount(e),(n=e.ref)&&(n.current&&n.current!=e.__e||z(n,null,t)),null!=(n=e.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(e){o.__e(e,t)}n.base=n.__P=null}if(n=e.__k)for(s=0;s<n.length;s++)n[s]&&q(n[s],t,r||"function"!=typeof e.type);r||v(e.__e),e.__c=e.__=e.__e=void 0}function j(e,t,r){return this.constructor(e,r)}function H(e,t,n){var s,i,a,l;t==document&&(t=document.documentElement),o.__&&o.__(e,t),i=(s="function"==typeof n)?null:n&&n.__k||t.__k,a=[],l=[],F(t,e=(!s&&n||t).__k=y(k,null,[e]),i||h,h,t.namespaceURI,!s&&n?[n]:i?null:t.firstChild?r.call(t.childNodes):null,a,!s&&n?n:i?i.__e:t.firstChild,s,l),U(a,e,l)}function V(e,t,o){var n,s,i,a,l=g({},e.props);for(i in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)"key"==i?n=t[i]:"ref"==i?s=t[i]:l[i]=void 0===t[i]&&null!=a?a[i]:t[i];return arguments.length>2&&(l.children=arguments.length>3?r.call(arguments,2):o),w(e.type,l,n||e.key,s||e.ref,null)}function W(e){function t(e){var r,o;return this.getChildContext||(r=/* @__PURE__ */new Set,(o={})[t.__c]=this,this.getChildContext=function(){return o},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&r.forEach(function(e){e.__e=!0,N(e)})},this.sub=function(e){r.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r&&r.delete(e),t&&t.call(e)}}),e.children}return t.__c="__cC"+f++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}r=_.slice,o={__e:function(e,t,r,o){for(var n,s,i;t=t.__;)if((n=t.__c)&&!n.__)try{if((s=n.constructor)&&null!=s.getDerivedStateFromError&&(n.setState(s.getDerivedStateFromError(e)),i=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(e,o||{}),i=n.__d),i)return n.__E=n}catch(t){e=t}throw e}},n=0,E.prototype.setState=function(e,t){var r=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=g({},this.state);"function"==typeof e&&(e=e(g({},r),this.props)),e&&g(r,e),null!=e&&this.__v&&(t&&this._sb.push(t),N(this))},E.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),N(this))},E.prototype.render=k,s=[],a="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,l=function(e,t){return e.__v.__b-t.__v.__b},O.__r=0,c=/(PointerCapture)$|Capture$/i,u=0,d=L(!1),p=L(!0),f=0;var B,K,Q,Y,J=0,Z=[],X=o,ee=X.__b,te=X.__r,re=X.diffed,oe=X.__c,ne=X.unmount,se=X.__;function ie(e,t){X.__h&&X.__h(K,e,J||t),J=0;var r=K.__H||(K.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function ae(e){return J=1,function(e,t){var r=ie(B++,2);if(r.t=e,!r.__c&&(r.__=[we(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],o=r.t(t,e);t!==o&&(r.__N=[o,r.__[1]],r.__c.setState({}))}],r.__c=K,!K.__f)){var o=function(e,t,o){if(!r.__c.__H)return!0;var s=r.__c.__H.__.filter(function(e){return e.__c});if(s.every(function(e){return!e.__N}))return!n||n.call(this,e,t,o);var i=r.__c.props!==e;return s.some(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(i=!0)}}),n&&n.call(this,e,t,o)||i};K.__f=!0;var n=K.shouldComponentUpdate,s=K.componentWillUpdate;K.componentWillUpdate=function(e,t,r){if(this.__e){var i=n;n=void 0,o(e,t,r),n=i}s&&s.call(this,e,t,r)},K.shouldComponentUpdate=o}return r.__N||r.__}(we,e)}function le(e,t){var r=ie(B++,3);!X.__s&&ye(r.__H,t)&&(r.__=e,r.u=t,K.__H.__h.push(r))}function ce(e,t){var r=ie(B++,4);!X.__s&&ye(r.__H,t)&&(r.__=e,r.u=t,K.__h.push(r))}function ue(e){return J=5,de(function(){return{current:e}},[])}function de(e,t){var r=ie(B++,7);return ye(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function pe(e,t){return J=8,de(function(){return e},t)}function fe(e){var t=K.context[e.__c],r=ie(B++,9);return r.c=e,t?(r.__??(r.__=!0,t.sub(K)),t.props.value):e.__}function he(){var e=ie(B++,11);if(!e.__){for(var t=K.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function _e(){for(var e;e=Z.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(ge),t.__h.some(ve),t.__h=[]}catch(Bt){t.__h=[],X.__e(Bt,e.__v)}}}X.__b=function(e){K=null,ee&&ee(e)},X.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),se&&se(e,t)},X.__r=function(e){te&&te(e),B=0;var t=(K=e.__c).__H;t&&(Q===K?(t.__h=[],K.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(ge),t.__h.some(ve),t.__h=[],B=0)),Q=K},X.diffed=function(e){re&&re(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Z.push(t)&&Y===X.requestAnimationFrame||((Y=X.requestAnimationFrame)||be)(_e)),t.__H.__.some(function(e){e.u&&(e.__H=e.u),e.u=void 0})),Q=K=null},X.__c=function(e,t){t.some(function(e){try{e.__h.some(ge),e.__h=e.__h.filter(function(e){return!e.__||ve(e)})}catch(Bt){t.some(function(e){e.__h&&(e.__h=[])}),t=[],X.__e(Bt,e.__v)}}),oe&&oe(e,t)},X.unmount=function(e){ne&&ne(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.some(function(e){try{ge(e)}catch(e){t=e}}),r.__H=void 0,t&&X.__e(t,r.__v))};var me="function"==typeof requestAnimationFrame;function be(e){var t,r=function(){clearTimeout(o),me&&cancelAnimationFrame(t),setTimeout(e)},o=setTimeout(r,35);me&&(t=requestAnimationFrame(r))}function ge(e){var t=K,r=e.__c;"function"==typeof r&&(e.__c=void 0,r()),K=t}function ve(e){var t=K;e.__c=e.__(),K=t}function ye(e,t){return!e||e.length!==t.length||t.some(function(t,r){return t!==e[r]})}function we(e,t){return"function"==typeof t?t(e):t}var ke=class{constructor(){this.listeners=/* @__PURE__ */new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ee=new class extends ke{#e;#t;#r;constructor(){super(),this.#r=e=>{if("undefined"!=typeof window&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#e?this.#e:"hidden"!==globalThis.document?.visibilityState}},xe={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Se=new class{#o=xe;#n=!1;setTimeoutProvider(e){"production"!==process.env.NODE_ENV&&this.#n&&e!==this.#o&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:this.#o,provider:e}),this.#o=e,"production"!==process.env.NODE_ENV&&(this.#n=!1)}setTimeout(e,t){return"production"!==process.env.NODE_ENV&&(this.#n=!0),this.#o.setTimeout(e,t)}clearTimeout(e){this.#o.clearTimeout(e)}setInterval(e,t){return"production"!==process.env.NODE_ENV&&(this.#n=!0),this.#o.setInterval(e,t)}clearInterval(e){this.#o.clearInterval(e)}},Te="undefined"==typeof window||"Deno"in globalThis;function Ne(){}function Oe(e,t){return"function"==typeof e?e(t):e}function Ce(e){return"number"==typeof e&&e>=0&&e!==1/0}function Ae(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ie(e,t){return"function"==typeof e?e(t):e}function Re(e,t){return"function"==typeof e?e(t):e}function De(e,t){const{type:r="all",exact:o,fetchStatus:n,predicate:s,queryKey:i,stale:a}=e;if(i)if(o){if(t.queryHash!==Le(i,t.options))return!1}else if(!$e(t.queryKey,i))return!1;if("all"!==r){const e=t.isActive();if("active"===r&&!e)return!1;if("inactive"===r&&e)return!1}return!("boolean"==typeof a&&t.isStale()!==a||n&&n!==t.state.fetchStatus||s&&!s(t))}function Pe(e,t){const{exact:r,status:o,predicate:n,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(r){if(Fe(t.options.mutationKey)!==Fe(s))return!1}else if(!$e(t.options.mutationKey,s))return!1}return!(o&&t.state.status!==o||n&&!n(t))}function Le(e,t){return(t?.queryKeyHashFn||Fe)(e)}function Fe(e){return JSON.stringify(e,(e,t)=>qe(t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t)}function $e(e,t){return e===t||typeof e==typeof t&&!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&Object.keys(t).every(r=>$e(e[r],t[r]))}var Ue=Object.prototype.hasOwnProperty;function Ge(e,t,r=0){if(e===t)return e;if(r>500)return t;const o=ze(e)&&ze(t);if(!(o||qe(e)&&qe(t)))return t;const n=(o?e:Object.keys(e)).length,s=o?t:Object.keys(t),i=s.length,a=o?new Array(i):{};let l=0;for(let c=0;c<i;c++){const i=o?c:s[c],u=e[i],d=t[i];if(u===d){a[i]=u,(o?c<n:Ue.call(e,i))&&l++;continue}if(null===u||null===d||"object"!=typeof u||"object"!=typeof d){a[i]=d;continue}const p=Ge(u,d,r+1);a[i]=p,p===u&&l++}return n===i&&l===n?e:a}function Me(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function ze(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function qe(e){if(!je(e))return!1;const t=e.constructor;if(void 0===t)return!0;const r=t.prototype;return!!je(r)&&!!r.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype}function je(e){return"[object Object]"===Object.prototype.toString.call(e)}function He(e,t,r){if("function"==typeof r.structuralSharing)return r.structuralSharing(e,t);if(!1!==r.structuralSharing){if("production"!==process.env.NODE_ENV)try{return Ge(e,t)}catch(o){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${r.queryHash}]: ${o}`),o}return Ge(e,t)}return t}function Ve(e,t,r=0){const o=[...e,t];return r&&o.length>r?o.slice(1):o}function We(e,t,r=0){const o=[t,...e];return r&&o.length>r?o.slice(0,-1):o}var Be=/* @__PURE__ */Symbol();function Ke(e,t){return"production"!==process.env.NODE_ENV&&e.queryFn===Be&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==Be?e.queryFn:()=>Promise.reject(/* @__PURE__ */new Error(`Missing queryFn: '${e.queryHash}'`))}function Qe(e,t){return"function"==typeof e?e(...t):!!e}function Ye(e,t,r){let o,n=!1;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??=t(),n||(n=!0,o.aborted?r():o.addEventListener("abort",r,{once:!0})),o)}),e}var Je=/* @__PURE__ */(()=>{let e=()=>Te;return{isServer:()=>e(),setIsServer(t){e=t}}})();function Ze(){let e,t;const r=new Promise((r,o)=>{e=r,t=o});function o(e){Object.assign(r,e),delete r.resolve,delete r.reject}return r.status="pending",r.catch(()=>{}),r.resolve=t=>{o({status:"fulfilled",value:t}),e(t)},r.reject=e=>{o({status:"rejected",reason:e}),t(e)},r}var Xe=function(e){setTimeout(e,0)},et=function(){let e=[],t=0,r=e=>{e()},o=e=>{e()},n=Xe;const s=o=>{t?e.push(o):n(()=>{r(o)})};return{batch:s=>{let i;t++;try{i=s()}finally{t--,t||(()=>{const t=e;e=[],t.length&&n(()=>{o(()=>{t.forEach(e=>{r(e)})})})})()}return i},batchCalls:e=>(...t)=>{s(()=>{e(...t)})},schedule:s,setNotifyFunction:e=>{r=e},setBatchNotifyFunction:e=>{o=e},setScheduler:e=>{n=e}}}(),tt=new class extends ke{#s=!0;#t;#r;constructor(){super(),this.#r=e=>{if("undefined"!=typeof window&&window.addEventListener){const t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#s!==e&&(this.#s=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#s}};function rt(e){return Math.min(1e3*2**e,3e4)}function ot(e){return"online"!==(e??"online")||tt.isOnline()}var nt=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function st(e){let t,r=!1,o=0;const n=Ze(),s=()=>"pending"!==n.status,i=()=>Ee.isFocused()&&("always"===e.networkMode||tt.isOnline())&&e.canRun(),a=()=>ot(e.networkMode)&&e.canRun(),l=e=>{s()||(t?.(),n.resolve(e))},c=e=>{s()||(t?.(),n.reject(e))},u=()=>new Promise(r=>{t=e=>{(s()||i())&&r(e)},e.onPause?.()}).then(()=>{t=void 0,s()||e.onContinue?.()}),d=()=>{if(s())return;let t;const n=0===o?e.initialPromise:void 0;try{t=n??e.fn()}catch(a){t=Promise.reject(a)}Promise.resolve(t).then(l).catch(t=>{if(s())return;const n=e.retry??(Je.isServer()?0:3),a=e.retryDelay??rt,l="function"==typeof a?a(o,t):a,p=!0===n||"number"==typeof n&&o<n||"function"==typeof n&&n(o,t);var f;!r&&p?(o++,e.onFail?.(o,t),(f=l,new Promise(e=>{Se.setTimeout(e,f)})).then(()=>i()?void 0:u()).then(()=>{r?c(t):d()})):c(t)})};return{promise:n,status:()=>n.status,cancel:t=>{if(!s()){const r=new nt(t);c(r),e.onCancel?.(r)}},continue:()=>(t?.(),n),cancelRetry:()=>{r=!0},continueRetry:()=>{r=!1},canStart:a,start:()=>(a()?d():u().then(d),n)}}var it=class{#i;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ce(this.gcTime)&&(this.#i=Se.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Je.isServer()?1/0:3e5))}clearGcTimeout(){this.#i&&(Se.clearTimeout(this.#i),this.#i=void 0)}},at=class extends it{#a;#l;#c;#u;#d;#p;#f;constructor(e){super(),this.#f=!1,this.#p=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#u=e.client,this.#c=this.#u.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#a=ut(this.options),this.state=e.state??this.#a,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#d?.promise}setOptions(e){if(this.options={...this.#p,...e},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){const e=ut(this.options);void 0!==e.data&&(this.setState(ct(e.data,e.dataUpdatedAt)),this.#a=e)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#c.remove(this)}setData(e,t){const r=He(this.state.data,e,this.options);return this.#h({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#h({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#d?.promise;return this.#d?.cancel(e),t?t.then(Ne).catch(Ne):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#a}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>!1!==Re(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Be||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===Ie(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!Ae(this.state.dataUpdatedAt,e))}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#d?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#d?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#c.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#d&&(this.#f||this.#_()?this.#d.cancel({revert:!0}):this.#d.cancelRetry()),this.scheduleGc()),this.#c.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#_(){return"paused"===this.state.fetchStatus&&"pending"===this.state.status}invalidate(){this.state.isInvalidated||this.#h({type:"invalidate"})}async fetch(e,t){if("idle"!==this.state.fetchStatus&&"rejected"!==this.#d?.status())if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#d)return this.#d.continueRetry(),this.#d.promise;if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}"production"!==process.env.NODE_ENV&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const r=new AbortController,o=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#f=!0,r.signal)})},n=()=>{const e=Ke(this.options,t),r=(()=>{const e={client:this.#u,queryKey:this.queryKey,meta:this.meta};return o(e),e})();return this.#f=!1,this.options.persister?this.options.persister(e,r,this):e(r)},s=(()=>{const e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#u,state:this.state,fetchFn:n};return o(e),e})();this.options.behavior?.onFetch(s,this),this.#l=this.state,"idle"!==this.state.fetchStatus&&this.state.fetchMeta===s.fetchOptions?.meta||this.#h({type:"fetch",meta:s.fetchOptions?.meta}),this.#d=st({initialPromise:t?.initialPromise,fn:s.fetchFn,onCancel:e=>{e instanceof nt&&e.revert&&this.setState({...this.#l,fetchStatus:"idle"}),r.abort()},onFail:(e,t)=>{this.#h({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#h({type:"pause"})},onContinue:()=>{this.#h({type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0});try{const e=await this.#d.start();if(void 0===e)throw"production"!==process.env.NODE_ENV&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),new Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#c.config.onSuccess?.(e,this),this.#c.config.onSettled?.(e,this.state.error,this),e}catch(i){if(i instanceof nt){if(i.silent)return this.#d.promise;if(i.revert){if(void 0===this.state.data)throw i;return this.state.data}}throw this.#h({type:"error",error:i}),this.#c.config.onError?.(i,this),this.#c.config.onSettled?.(this.state.data,i,this),i}finally{this.scheduleGc()}}#h(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...lt(t.data,this.options),fetchMeta:e.meta??null};case"success":const r={...t,...ct(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#l=e.manual?r:void 0,r;case"error":const o=e.error;return{...t,error:o,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),et.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#c.notify({query:this,type:"updated",action:e})})}};function lt(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ot(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function ct(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ut(e){const t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,o=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var dt=e.createContext(void 0),pt=t=>{const r=e.useContext(dt);if(t)return t;if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},ft=({client:r,children:o})=>(e.useEffect(()=>(r.mount(),()=>{r.unmount()}),[r]),/* @__PURE__ */t(dt.Provider,{value:r,children:o})),ht={PUBLIC_EVENTS:"/",FOLDER_EVENTS:e=>`/${e}`,LOGIN:"/auth/login",REGISTER:"/auth/register",FORGOT_PASSWORD:"/auth/forgot-password",RESET_PASSWORD:"/auth/reset-password",VERIFY_EMAIL:"/auth/verify-email",GALLERY:e=>`/event/${e}`,UPLOAD:e=>`/event/${e}/upload`,CURATE:e=>`/event/${e}/curate`,LEADERBOARD:e=>`/event/${e}/leaderboard`},_t={ORGANIZATION_SETTINGS:e=>`https://qrati.com/org/${e}/settings`,ORGANIZATION_SETTINGS_INTEGRATION:e=>`https://qrati.com/org/${e}/settings/integration`,ORGANIZATION_DASHBOARD:e=>`https://qrati.com/org/${e}/dashboard`,ORGANIZATION_ADMINS:e=>`https://qrati.com/org/${e}/admins`,EVENT_SETTINGS_BASIC_DETAILS:e=>`https://qrati.com/event/${e}/settings`,EVENT_REVIEW_CONTENTS:e=>`https://qrati.com/event/${e}/review-contents`,EVENT_DEEP_SEARCH:e=>`https://qrati.com/event/${e}/deep-search`,EVENT_GENERATE_ARTICLE:e=>`https://qrati.com/event/${e}/generate-article`,EVENT_ACCESS_REQUESTS:e=>`https://qrati.com/event/${e}/access-requests`,EVENT_SHOT_INSPECTOR:e=>`https://qrati.com/event/${e}/shot-inspector`,EVENT_CURATION_DETAILS:e=>`https://qrati.com/event/${e}/curation-details`},mt={PUBLIC:"PUBLIC",PRIVATE:"PRIVATE",SECRET:"SECRET"},bt="https://qrati.com/api/connect",gt={INITIALIZE_SESSION:`${bt}/session/initialize`,REGISTER:`${bt}/auth/register`,LOGIN:`${bt}/auth/login`,LOGOUT:`${bt}/auth/logout`,UPDATE_SESSION:`${bt}/session/update`,EXTERNAL_LOGIN:`${bt}/auth/external-login`,PUBLIC_EVENTS:`${bt}/event/public-events`,SEARCH_EVENTS:`${bt}/event/search`,FOLDER_DETAILS:`${bt}/folder/details`,NESTED_FOLDERS:`${bt}/folder/nested-folders`,GET_EVENT_POINTS:`${bt}/event/points`,ELIGIBLE_TO_CURATE:`${bt}/content/curation-eligibility`,CONTENT_FOR_CURATION:`${bt}/content/for-curation`,CURATE_CONTENT:`${bt}/content/curate`,GET_LEADERBOARD:`${bt}/event/leaderboard`,GET_UPLOAD_COUNT:`${bt}/event/upload-count`,SINGLE_UPLOAD:`${bt}/content/single-upload`,UPDATE_REACTION:`${bt}/content/update-reaction`,EVENT_DATA:`${bt}/event/details-with-ads-parameters`,UPDATE_EVENT_LAYOUT:`${bt}/event/update-layout`,GET_EVENT_STATISTICS:`${bt}/event/statistics`,GET_CONTENTS:`${bt}/content/for-gallery`,SEARCH_CONTENTS:`${bt}/content/search`,GET_CONTENTS_COUNT:`${bt}/content/count`,UPDATE_AD_ANALYTICS:`${bt}/event/update-ad-analytics`,INCREMENT_EVENT_VIEW:`${bt}/event/increment-view`,SEND_PASSWORD_RESET_CODE:`${bt}/auth/send-password-reset-code`,VERIFY_PASSWORD_RESET_CODE:`${bt}/auth/verify-password-reset-code`,RESET_PASSWORD:`${bt}/auth/reset-password`,REPORT_ERROR:`${bt}/session/report-error`},vt={OWNER:"owner",ADMIN:"admin",MODERATOR:"moderator"},yt={IMAGE:"IMAGE",VIDEO:"VIDEO",AD:"AD"},wt={ROW:"ROW",COLUMN:"COLUMN",MASONRY:"MASONRY"},kt={IN_REVIEW:"IN_REVIEW",APPROVED:"APPROVED",REJECTED:"REJECTED"},Et={WAITING:"Waiting",UPLOADING:"Uploading",RETRYING:"Retrying",DONE:"Done",FAILED:"Failed",ERROR:"Error"},xt=1048576,St={CLOSED:"CLOSED",OPEN:"OPEN",UPCOMING:"UPCOMING"},Tt={WAITING:"Waiting",PROCESSING:"Processing",DONE:"Done"},Nt={TEXT:"text",IMAGE:"image",LOTTIE:"lottie"},Ot={CONTEST:"CONTEST",REACTION:"REACTION"},Ct={GRID:"grid",SINGLE:"single"},At={POPULAR:"popular",UPLOAD_TIME:"upload",CAPTURE_TIME:"capture"},It={[At.POPULAR]:{label:"Popular",sortField:"score"},[At.UPLOAD_TIME]:{label:"Uploaded",sortField:"createdAt"},[At.CAPTURE_TIME]:{label:"Captured",sortField:"capturedAt"}},Rt=At.UPLOAD_TIME,Dt={ASC:"asc",DESC:"desc"},Pt={[Dt.ASC]:{label:"Ascending",sortOrder:""},[Dt.DESC]:{label:"Descending",sortOrder:"-"}},Lt=Dt.DESC,Ft={OWN:"own",CURATED:"curated",ELIGIBLE:"eligible"},$t={NONE:null,LINK:"LINK",EMAIL:"EMAIL",PHONE:"PHONE",SMS:"SMS",WHATSAPP:"WHATSAPP",MESSENGER:"MESSENGER"},Ut={[$t.LINK]:"material-symbols:open-in-new-rounded",[$t.EMAIL]:"material-symbols:alternate-email-rounded",[$t.PHONE]:"material-symbols:call-outline",[$t.SMS]:"material-symbols:sms-outline-rounded",[$t.WHATSAPP]:"logos:whatsapp-icon",[$t.MESSENGER]:"logos:messenger"},Gt={AD_IMPRESSION:"impression",AD_ENGAGEMENT:"engagement",AD_CLICK:"click"},Mt={EVENT_IN_REVIEW_COUNT:e=>`in-review-count-${e}`,CONTENTS_BY_EVENT:e=>`contents-by-event-${e}`},zt=0;function qt(e,t,r,n,s,i){t||(t={});var a,l,c=t;if("ref"in c)for(l in c={},t)"ref"==l?a=t[l]:c[l]=t[l];var u={type:e,props:c,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--zt,__i:-1,__u:0,__source:s,__self:i};if("function"==typeof e&&(a=e.defaultProps))for(l in a)void 0===c[l]&&(c[l]=a[l]);return o.vnode&&o.vnode(u),u}Array.isArray;var jt='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',Ht=e=>e.trim().replace(/\s+/g," "),Vt=e=>{if(!e)return jt;const t=Ht("string"==typeof e?e:e.fontFamily||""),r="string"==typeof e?void 0:e.customFontName;return t&&"system"!==t?"custom"===t?`"${r||"QratiCustomFont"}", ${jt}`:`"${t}", ${jt}`:jt},Wt=(e,t)=>{if(!e?.fontFamily||"system"===e.fontFamily)return"";const r=Ht(e.fontFamily);if("custom"===r&&t){const r=e.customFontName||"QratiCustomFont",n=/\.woff2(\?|$)/i.test(t)?"woff2":/\.ttf(\?|$)/i.test(t)?"truetype":"woff";return`@font-face{font-family:"${o=r,o.replace(/"/g,'\\"')}";src:url("${t}") format("${n}");font-weight:400 700;font-style:normal;font-display:swap;}`}var o;const n=(e=>{if(!e)return null;const t=Ht(e);return t&&"system"!==t.toLowerCase()&&"custom"!==t.toLowerCase()?`https://fonts.googleapis.com/css2?family=${t.replace(/\s+/g,"+")}:wght@400;500;600;700&display=swap`:null})(r);return n?`@import url("${n}");`:""};function Bt(e){var t,r,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=Bt(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function Kt(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=Bt(e))&&(o&&(o+=" "),o+=t);return o}var Qt=(e=/* @__PURE__ */new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Yt="-",Jt=[],Zt=e=>{const t=tr(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]"))return er(e);const r=e.split(Yt);return Xt(r,""===r[0]&&r.length>1?1:0,t)},getConflictingClassGroupIds:(e,t)=>{if(t){const t=o[e],n=r[e];return t?n?((e,t)=>{const r=new Array(e.length+t.length);for(let o=0;o<e.length;o++)r[o]=e[o];for(let o=0;o<t.length;o++)r[e.length+o]=t[o];return r})(n,t):t:n||Jt}return r[e]||Jt}}},Xt=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const o=e[t],n=r.nextPart.get(o);if(n){const r=Xt(e,t+1,n);if(r)return r}const s=r.validators;if(null===s)return;const i=0===t?e.join(Yt):e.slice(t).join(Yt),a=s.length;for(let l=0;l<a;l++){const e=s[l];if(e.validator(i))return e.classGroupId}},er=e=>-1===e.slice(1,-1).indexOf(":")?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),o=t.slice(0,r);return o?"arbitrary.."+o:void 0})(),tr=e=>{const{theme:t,classGroups:r}=e;return rr(r,t)},rr=(e,t)=>{const r=Qt();for(const o in e){const n=e[o];or(n,r,o,t)}return r},or=(e,t,r,o)=>{const n=e.length;for(let s=0;s<n;s++){const n=e[s];nr(n,t,r,o)}},nr=(e,t,r,o)=>{"string"!=typeof e?"function"!=typeof e?ar(e,t,r,o):ir(e,t,r,o):sr(e,t,r)},sr=(e,t,r)=>{(""===e?t:lr(t,e)).classGroupId=r},ir=(e,t,r,o)=>{cr(e)?or(e(o),t,r,o):(null===t.validators&&(t.validators=[]),t.validators.push(((e,t)=>({classGroupId:e,validator:t}))(r,e)))},ar=(e,t,r,o)=>{const n=Object.entries(e),s=n.length;for(let i=0;i<s;i++){const[e,s]=n[i];or(s,lr(t,e),r,o)}},lr=(e,t)=>{let r=e;const o=t.split(Yt),n=o.length;for(let s=0;s<n;s++){const e=o[s];let t=r.nextPart.get(e);t||(t=Qt(),r.nextPart.set(e,t)),r=t}return r},cr=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,ur=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),o=Object.create(null);const n=(n,s)=>{r[n]=s,t++,t>e&&(t=0,o=r,r=Object.create(null))};return{get(e){let t=r[e];return void 0!==t?t:void 0!==(t=o[e])?(n(e,t),t):void 0},set(e,t){e in r?r[e]=t:n(e,t)}}},dr=[],pr=(e,t,r,o,n)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:o,isExternal:n}),fr=e=>{const{prefix:t,experimentalParseClassName:r}=e;let o=e=>{const t=[];let r,o=0,n=0,s=0;const i=e.length;for(let u=0;u<i;u++){const i=e[u];if(0===o&&0===n){if(":"===i){t.push(e.slice(s,u)),s=u+1;continue}if("/"===i){r=u;continue}}"["===i?o++:"]"===i?o--:"("===i?n++:")"===i&&n--}const a=0===t.length?e:e.slice(s);let l=a,c=!1;return a.endsWith("!")?(l=a.slice(0,-1),c=!0):a.startsWith("!")&&(l=a.slice(1),c=!0),pr(t,c,l,r&&r>s?r-s:void 0)};if(t){const e=t+":",r=o;o=t=>t.startsWith(e)?r(t.slice(e.length)):pr(dr,!1,t,void 0,!0)}if(r){const e=o;o=t=>r({className:t,parseClassName:e})}return o},hr=e=>{const t=/* @__PURE__ */new Map;return e.orderSensitiveModifiers.forEach((e,r)=>{t.set(e,1e6+r)}),e=>{const r=[];let o=[];for(let n=0;n<e.length;n++){const s=e[n],i="["===s[0],a=t.has(s);i||a?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},_r=/\s+/,mr=e=>{if("string"==typeof e)return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=mr(e[o]))&&(r&&(r+=" "),r+=t);return r},br=[],gr=e=>{const t=t=>t[e]||br;return t.isThemeGetter=!0,t},vr=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,yr=/^\((?:(\w[\w-]*):)?(.+)\)$/i,wr=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,kr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Er=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,xr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Sr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Tr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Nr=e=>wr.test(e),Or=e=>!!e&&!Number.isNaN(Number(e)),Cr=e=>!!e&&Number.isInteger(Number(e)),Ar=e=>e.endsWith("%")&&Or(e.slice(0,-1)),Ir=e=>kr.test(e),Rr=()=>!0,Dr=e=>Er.test(e)&&!xr.test(e),Pr=()=>!1,Lr=e=>Sr.test(e),Fr=e=>Tr.test(e),$r=e=>!Gr(e)&&!Br(e),Ur=e=>to(e,so,Pr),Gr=e=>vr.test(e),Mr=e=>to(e,io,Dr),zr=e=>to(e,ao,Or),qr=e=>to(e,co,Rr),jr=e=>to(e,lo,Pr),Hr=e=>to(e,oo,Pr),Vr=e=>to(e,no,Fr),Wr=e=>to(e,uo,Lr),Br=e=>yr.test(e),Kr=e=>ro(e,io),Qr=e=>ro(e,lo),Yr=e=>ro(e,oo),Jr=e=>ro(e,so),Zr=e=>ro(e,no),Xr=e=>ro(e,uo,!0),eo=e=>ro(e,co,!0),to=(e,t,r)=>{const o=vr.exec(e);return!!o&&(o[1]?t(o[1]):r(o[2]))},ro=(e,t,r=!1)=>{const o=yr.exec(e);return!!o&&(o[1]?t(o[1]):r)},oo=e=>"position"===e||"percentage"===e,no=e=>"image"===e||"url"===e,so=e=>"length"===e||"size"===e||"bg-size"===e,io=e=>"length"===e,ao=e=>"number"===e,lo=e=>"family-name"===e,co=e=>"number"===e||"weight"===e,uo=e=>"shadow"===e,po=/* @__PURE__ */((e,...t)=>{let r,o,n,s;const i=e=>{const t=o(e);if(t)return t;const s=((e,t)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n,sortModifiers:s}=t,i=[],a=e.trim().split(_r);let l="";for(let c=a.length-1;c>=0;c-=1){const e=a[c],{isExternal:t,modifiers:u,hasImportantModifier:d,baseClassName:p,maybePostfixModifierPosition:f}=r(e);if(t){l=e+(l.length>0?" "+l:l);continue}let h=!!f,_=o(h?p.substring(0,f):p);if(!_){if(!h){l=e+(l.length>0?" "+l:l);continue}if(_=o(p),!_){l=e+(l.length>0?" "+l:l);continue}h=!1}const m=0===u.length?"":1===u.length?u[0]:s(u).join(":"),b=d?m+"!":m,g=b+_;if(i.indexOf(g)>-1)continue;i.push(g);const v=n(_,h);for(let r=0;r<v.length;++r){const e=v[r];i.push(b+e)}l=e+(l.length>0?" "+l:l)}return l})(e,r);return n(e,s),s};return s=a=>{var l;return l=t.reduce((e,t)=>t(e),e()),r={cache:ur(l.cacheSize),parseClassName:fr(l),sortModifiers:hr(l),...Zt(l)},o=r.cache.get,n=r.cache.set,s=i,i(a)},(...e)=>s(((...e)=>{let t,r,o=0,n="";for(;o<e.length;)(t=e[o++])&&(r=mr(t))&&(n&&(n+=" "),n+=r);return n})(...e))})(()=>{const e=gr("color"),t=gr("font"),r=gr("text"),o=gr("font-weight"),n=gr("tracking"),s=gr("leading"),i=gr("breakpoint"),a=gr("container"),l=gr("spacing"),c=gr("radius"),u=gr("shadow"),d=gr("inset-shadow"),p=gr("text-shadow"),f=gr("drop-shadow"),h=gr("blur"),_=gr("perspective"),m=gr("aspect"),b=gr("ease"),g=gr("animate"),v=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",Br,Gr],y=()=>[Br,Gr,l],w=()=>[Nr,"full","auto",...y()],k=()=>[Cr,"none","subgrid",Br,Gr],E=()=>["auto",{span:["full",Cr,Br,Gr]},Cr,Br,Gr],x=()=>[Cr,"auto",Br,Gr],S=()=>["auto","min","max","fr",Br,Gr],T=()=>["auto",...y()],N=()=>[Nr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...y()],O=()=>[Nr,"screen","full","dvw","lvw","svw","min","max","fit",...y()],C=()=>[Nr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...y()],A=()=>[e,Br,Gr],I=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",Yr,Hr,{position:[Br,Gr]}],R=()=>["auto","cover","contain",Jr,Ur,{size:[Br,Gr]}],D=()=>[Ar,Kr,Mr],P=()=>["","none","full",c,Br,Gr],L=()=>["",Or,Kr,Mr],F=()=>[Or,Ar,Yr,Hr],$=()=>["","none",h,Br,Gr],U=()=>["none",Or,Br,Gr],G=()=>["none",Or,Br,Gr],M=()=>[Or,Br,Gr],z=()=>[Nr,"full",...y()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ir],breakpoint:[Ir],color:[Rr],container:[Ir],"drop-shadow":[Ir],ease:["in","out","in-out"],font:[$r],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ir],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ir],shadow:[Ir],spacing:["px",Or],text:[Ir],"text-shadow":[Ir],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Nr,Gr,Br,m]}],container:["container"],columns:[{columns:[Or,Gr,Br,a]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:v()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:w()}],"inset-x":[{"inset-x":w()}],"inset-y":[{"inset-y":w()}],start:[{"inset-s":w(),start:w()}],end:[{"inset-e":w(),end:w()}],"inset-bs":[{"inset-bs":w()}],"inset-be":[{"inset-be":w()}],top:[{top:w()}],right:[{right:w()}],bottom:[{bottom:w()}],left:[{left:w()}],visibility:["visible","invisible","collapse"],z:[{z:[Cr,"auto",Br,Gr]}],basis:[{basis:[Nr,"full","auto",a,...y()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Or,Nr,"auto","initial","none",Gr]}],grow:[{grow:["",Or,Br,Gr]}],shrink:[{shrink:["",Or,Br,Gr]}],order:[{order:[Cr,"first","last","none",Br,Gr]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:E()}],"col-start":[{"col-start":x()}],"col-end":[{"col-end":x()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:E()}],"row-start":[{"row-start":x()}],"row-end":[{"row-end":x()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":S()}],"auto-rows":[{"auto-rows":S()}],gap:[{gap:y()}],"gap-x":[{"gap-x":y()}],"gap-y":[{"gap-y":y()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:y()}],px:[{px:y()}],py:[{py:y()}],ps:[{ps:y()}],pe:[{pe:y()}],pbs:[{pbs:y()}],pbe:[{pbe:y()}],pt:[{pt:y()}],pr:[{pr:y()}],pb:[{pb:y()}],pl:[{pl:y()}],m:[{m:T()}],mx:[{mx:T()}],my:[{my:T()}],ms:[{ms:T()}],me:[{me:T()}],mbs:[{mbs:T()}],mbe:[{mbe:T()}],mt:[{mt:T()}],mr:[{mr:T()}],mb:[{mb:T()}],ml:[{ml:T()}],"space-x":[{"space-x":y()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":y()}],"space-y-reverse":["space-y-reverse"],size:[{size:N()}],"inline-size":[{inline:["auto",...O()]}],"min-inline-size":[{"min-inline":["auto",...O()]}],"max-inline-size":[{"max-inline":["none",...O()]}],"block-size":[{block:["auto",...C()]}],"min-block-size":[{"min-block":["auto",...C()]}],"max-block-size":[{"max-block":["none",...C()]}],w:[{w:[a,"screen",...N()]}],"min-w":[{"min-w":[a,"screen","none",...N()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...N()]}],h:[{h:["screen","lh",...N()]}],"min-h":[{"min-h":["screen","lh","none",...N()]}],"max-h":[{"max-h":["screen","lh",...N()]}],"font-size":[{text:["base",r,Kr,Mr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,eo,qr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ar,Gr]}],"font-family":[{font:[Qr,jr,t]}],"font-features":[{"font-features":[Gr]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,Br,Gr]}],"line-clamp":[{"line-clamp":[Or,"none",Br,zr]}],leading:[{leading:[s,...y()]}],"list-image":[{"list-image":["none",Br,Gr]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Br,Gr]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[Or,"from-font","auto",Br,Mr]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[Or,"auto",Br,Gr]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Br,Gr]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Br,Gr]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:I()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:R()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Cr,Br,Gr],radial:["",Br,Gr],conic:[Cr,Br,Gr]},Zr,Vr]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:D()}],"gradient-via-pos":[{via:D()}],"gradient-to-pos":[{to:D()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:P()}],"rounded-s":[{"rounded-s":P()}],"rounded-e":[{"rounded-e":P()}],"rounded-t":[{"rounded-t":P()}],"rounded-r":[{"rounded-r":P()}],"rounded-b":[{"rounded-b":P()}],"rounded-l":[{"rounded-l":P()}],"rounded-ss":[{"rounded-ss":P()}],"rounded-se":[{"rounded-se":P()}],"rounded-ee":[{"rounded-ee":P()}],"rounded-es":[{"rounded-es":P()}],"rounded-tl":[{"rounded-tl":P()}],"rounded-tr":[{"rounded-tr":P()}],"rounded-br":[{"rounded-br":P()}],"rounded-bl":[{"rounded-bl":P()}],"border-w":[{border:L()}],"border-w-x":[{"border-x":L()}],"border-w-y":[{"border-y":L()}],"border-w-s":[{"border-s":L()}],"border-w-e":[{"border-e":L()}],"border-w-bs":[{"border-bs":L()}],"border-w-be":[{"border-be":L()}],"border-w-t":[{"border-t":L()}],"border-w-r":[{"border-r":L()}],"border-w-b":[{"border-b":L()}],"border-w-l":[{"border-l":L()}],"divide-x":[{"divide-x":L()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":L()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-bs":[{"border-bs":A()}],"border-color-be":[{"border-be":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[Or,Br,Gr]}],"outline-w":[{outline:["",Or,Kr,Mr]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",u,Xr,Wr]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",d,Xr,Wr]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[Or,Mr]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":L()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",p,Xr,Wr]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[Or,Br,Gr]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Or]}],"mask-image-linear-from-pos":[{"mask-linear-from":F()}],"mask-image-linear-to-pos":[{"mask-linear-to":F()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":F()}],"mask-image-t-to-pos":[{"mask-t-to":F()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":F()}],"mask-image-r-to-pos":[{"mask-r-to":F()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":F()}],"mask-image-b-to-pos":[{"mask-b-to":F()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":F()}],"mask-image-l-to-pos":[{"mask-l-to":F()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":F()}],"mask-image-x-to-pos":[{"mask-x-to":F()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":F()}],"mask-image-y-to-pos":[{"mask-y-to":F()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[Br,Gr]}],"mask-image-radial-from-pos":[{"mask-radial-from":F()}],"mask-image-radial-to-pos":[{"mask-radial-to":F()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[Or]}],"mask-image-conic-from-pos":[{"mask-conic-from":F()}],"mask-image-conic-to-pos":[{"mask-conic-to":F()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:I()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:R()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Br,Gr]}],filter:[{filter:["","none",Br,Gr]}],blur:[{blur:$()}],brightness:[{brightness:[Or,Br,Gr]}],contrast:[{contrast:[Or,Br,Gr]}],"drop-shadow":[{"drop-shadow":["","none",f,Xr,Wr]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",Or,Br,Gr]}],"hue-rotate":[{"hue-rotate":[Or,Br,Gr]}],invert:[{invert:["",Or,Br,Gr]}],saturate:[{saturate:[Or,Br,Gr]}],sepia:[{sepia:["",Or,Br,Gr]}],"backdrop-filter":[{"backdrop-filter":["","none",Br,Gr]}],"backdrop-blur":[{"backdrop-blur":$()}],"backdrop-brightness":[{"backdrop-brightness":[Or,Br,Gr]}],"backdrop-contrast":[{"backdrop-contrast":[Or,Br,Gr]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Or,Br,Gr]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Or,Br,Gr]}],"backdrop-invert":[{"backdrop-invert":["",Or,Br,Gr]}],"backdrop-opacity":[{"backdrop-opacity":[Or,Br,Gr]}],"backdrop-saturate":[{"backdrop-saturate":[Or,Br,Gr]}],"backdrop-sepia":[{"backdrop-sepia":["",Or,Br,Gr]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":y()}],"border-spacing-x":[{"border-spacing-x":y()}],"border-spacing-y":[{"border-spacing-y":y()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Br,Gr]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Or,"initial",Br,Gr]}],ease:[{ease:["linear","initial",b,Br,Gr]}],delay:[{delay:[Or,Br,Gr]}],animate:[{animate:["none",g,Br,Gr]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[_,Br,Gr]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:U()}],"rotate-x":[{"rotate-x":U()}],"rotate-y":[{"rotate-y":U()}],"rotate-z":[{"rotate-z":U()}],scale:[{scale:G()}],"scale-x":[{"scale-x":G()}],"scale-y":[{"scale-y":G()}],"scale-z":[{"scale-z":G()}],"scale-3d":["scale-3d"],skew:[{skew:M()}],"skew-x":[{"skew-x":M()}],"skew-y":[{"skew-y":M()}],transform:[{transform:[Br,Gr,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:z()}],"translate-x":[{"translate-x":z()}],"translate-y":[{"translate-y":z()}],"translate-z":[{"translate-z":z()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Br,Gr]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":y()}],"scroll-mx":[{"scroll-mx":y()}],"scroll-my":[{"scroll-my":y()}],"scroll-ms":[{"scroll-ms":y()}],"scroll-me":[{"scroll-me":y()}],"scroll-mbs":[{"scroll-mbs":y()}],"scroll-mbe":[{"scroll-mbe":y()}],"scroll-mt":[{"scroll-mt":y()}],"scroll-mr":[{"scroll-mr":y()}],"scroll-mb":[{"scroll-mb":y()}],"scroll-ml":[{"scroll-ml":y()}],"scroll-p":[{"scroll-p":y()}],"scroll-px":[{"scroll-px":y()}],"scroll-py":[{"scroll-py":y()}],"scroll-ps":[{"scroll-ps":y()}],"scroll-pe":[{"scroll-pe":y()}],"scroll-pbs":[{"scroll-pbs":y()}],"scroll-pbe":[{"scroll-pbe":y()}],"scroll-pt":[{"scroll-pt":y()}],"scroll-pr":[{"scroll-pr":y()}],"scroll-pb":[{"scroll-pb":y()}],"scroll-pl":[{"scroll-pl":y()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Br,Gr]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[Or,Kr,Mr,zr]}],stroke:[{stroke:["none",...A()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),fo=(...e)=>Kt(po(...e.filter(Boolean))),ho=e=>{const t=e.replace(/#/g,"");return(299*parseInt(t.slice(0,2),16)+587*parseInt(t.slice(2,4),16)+114*parseInt(t.slice(4,6),16))/1e3>=128?"#000000":"#FFFFFF"},_o="px",mo=(e,t="light")=>{const r=e?.themeSettings?.colors??{},o=e?.themeSettings?.border,n=e?.themeSettings?.shadow,s=e?.integrationSettings,i="dark"===t,a=(e,t,o,n)=>{const s=i?n:o;return r[i?t:e]||s},l=a("primaryLight","primaryDark","#ff4800","#ff4800");return{"--background":a("backgroundLight","backgroundDark","#fafafa","#0a0a0a"),"--foreground":a("foregroundLight","foregroundDark","#252629","#f5f5f5"),"--muted":a("mutedLight","mutedDark","#e5e5e5","#171717"),"--muted-foreground":a("mutedForegroundLight","mutedForegroundDark","#484848","#b5b8bb"),"--border":a("borderLight","borderDark","#dddddd","#353538"),"--input":a("inputLight","inputDark","#f5f5f5","#171717"),"--primary":l,"--primary-foreground":ho(l),"--popover":a("popoverLight","popoverDark","#f5f5f5","#171717"),"--popover-foreground":a("popoverForegroundLight","popoverForegroundDark","#252629","#fafafa"),"--info":a("infoLight","infoDark","#2563eb","#5b8def"),"--warning":a("warningLight","warningDark","#f59e0b","#fbbf24"),"--success":a("successLight","successDark","#10b981","#34d399"),"--destructive":a("destructiveLight","destructiveDark","#ef4444","#f87171"),"--border-width":`${o?.width||"1"}${o?.unit||"px"}`,"--radius":`${o?.radius||"10"}${o?.unit||"px"}`,"--shadow-outer-horizontal-offset":`${n?.outerHorizontalOffset||"0"}${n?.unit||_o}`,"--shadow-outer-vertical-offset":`${n?.outerVerticalOffset||"0"}${n?.unit||_o}`,"--shadow-outer-blur":`${n?.outerBlur||"0"}${n?.unit||_o}`,"--shadow-outer-spread":`${n?.outerSpread||"0"}${n?.unit||_o}`,"--font-family":Vt(s)}};export{$e as $,Dt as A,Ze as B,_t as C,k as Ct,Mt as D,ht as E,lt as F,Ke as G,Ye as H,it as I,Le as J,Oe as K,st as L,ft as M,pt as N,Ft as O,at as P,Ne as Q,tt as R,mt as S,y as St,wt as T,E as Tt,Ve as U,Je as V,We as W,Pe as X,Ce as Y,De as Z,Ct as _,le as _t,qt as a,Be as at,Ot as b,V as bt,$t as c,Ee as ct,Tt as d,de as dt,He as et,At as f,ce as ft,Et as g,fe as gt,yt as h,pe as ht,Wt as i,Qe as it,Pt as j,Nt as k,Ut as l,ke as lt,kt as m,he as mt,mo as n,Ie as nt,vt as o,Ae as ot,It as p,ae as pt,Fe as q,Kt as r,Me as rt,Gt as s,Se as st,fo as t,Re as tt,gt as u,ue as ut,Rt as v,H as vt,xt as w,o as wt,St as x,W as xt,Lt as y,I as yt,et as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require("./D4geS7mP.js");const e=require("./C9yNmSQ8.js"),t=require("./BaqVlxbd.js"),n=require("./DQRcftrx.js"),i=require("./DXg0jviV.js");let s=require("react"),o=require("react/jsx-runtime");function r(e,t){const[n,i]=e;if(n===t)return e;if(void 0!==i&&void 0!==t&&void 0!==n&&t===i&&Math.abs(t-n)<=20){const s=Math.min(n,t),o=Math.max(n,t);return s===n&&o===i?e:[s,o]}return[t,n]}function a(e,t,n){const[[i],o]=(0,s.useReducer)(r,[n]),a=function(e){const[t,n]=(0,s.useState)(e);return e===t||e&&t&&e.length===t.length&&!e.some((e,n)=>e!==t[n])?t:(n(e),e)}(t),l=(0,s.useRef)(void 0);return{containerRef:(0,s.useCallback)(t=>{l.current?.disconnect(),l.current=void 0;const n=()=>o(function(e,t){let n=e?.clientWidth;if(void 0!==n&&t&&t.length>0){const e=[...t.filter(e=>e>0)].sort((e,t)=>t-e);e.push(Math.floor(e[e.length-1]/2)),n=e.find((t,i)=>t<=n||i===e.length-1)}return n}(t,a));n(),t&&"undefined"!=typeof ResizeObserver&&(l.current=new ResizeObserver(n),l.current.observe(t)),"function"==typeof e?e(t):e&&(e.current=t)},[e,a]),containerWidth:i}}function l(e){return["react-photo-album",e].filter(Boolean).join("--")}function c({width:e,height:t}){const n=e/t;return Number.isFinite(n)?n:1}var d=Object.freeze([1200,600,300,0]);function u(e,t){return"function"==typeof e?e(t):e}function h(e,t){return void 0!==t?u(e,t):void 0}function p(e,t,n,i=0){if(void 0===t)return;const s=h(e,t);return Math.round(Math.max(void 0===s?function(e,t){const n=d.findIndex(e=>e<=t);return u(e[Math.max(n,0)],t)}(n,t):s,i))}function m(e,{spacing:t,padding:n,componentsProps:i,render:s}){return{spacing:p(t,e,[20,15,10,5]),padding:p(n,e,[0,0,0,0]),componentsProps:u(i,e)||{},render:u(s,e)}}function g(e,t=0){const n=10**t;return Math.round((e+Number.EPSILON)*n)/n}function f(e,t,n,i,s,o,r){let a,l;const c=e=>{const t=o*(s-1)+2*r*s;return`calc((${e.match(/^\s*calc\((.*)\)\s*$/)?.[1]??e} - ${t}px) / ${g((i-t)/n,5)})`},d=e.srcSet;return d&&d.length>0&&(a=d.concat(d.some(({width:t})=>t===e.width)?[]:[{src:e.src,width:e.width,height:e.height}]).sort((e,t)=>e.width-t.width).map(e=>`${e.src} ${e.width}w`).join(", ")),l=t?.size?(t.sizes||[]).map(({viewport:e,size:t})=>`${e} ${c(t)}`).concat(c(t.size)).join(", "):`${Math.ceil(n/i*100)}vw`,{srcSet:a,sizes:l}}var T=(0,s.forwardRef)(function({as:e,render:t,context:n,classes:i=[],variables:s={},style:r,className:a,children:c,...d},u){const h=function(...e){return e.filter(Boolean).join(" ")}(...(Array.isArray(i)?i:[i]).filter(e=>"string"==typeof e).map(l),a),p={style:{...Object.fromEntries(Object.entries(s).map(([e,t])=>{return[(n=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),`--${l(n)}`),"number"==typeof t?g(t,5):t];var n})),...r},className:h,children:c,...d};if(t){const e=t({ref:u,...p},n);if(e)return e}return(0,o.jsx)(e||"div",{ref:u,...p})}),w=(0,s.forwardRef)(function({photo:e,index:t,width:n,height:i,onClick:s,render:{wrapper:r,link:a,button:l,image:c,extras:d}={},componentsProps:{link:u,button:h,wrapper:p,image:m}={}},f){const{href:w}=e,y={photo:e,index:t,width:g(n,3),height:g(i,3)};let v;return v=w?{...u,as:"a",render:a,classes:["photo","link"],href:w,onClick:s}:s?{...h,as:"button",type:"button",render:l,classes:["photo","button"],onClick:s}:{...p,render:r,classes:"photo"},(0,o.jsxs)(T,{ref:f,variables:{photoWidth:y.width,photoHeight:y.height},context:y,...v,children:[(0,o.jsx)(T,{as:"img",classes:"image",render:c,context:y,...m}),d?.({},y)]})}),y=(0,s.forwardRef)(function({layout:e,sizes:t,model:n,skeleton:i,onClick:r,render:{container:a,track:l,photo:c,...d}={},componentsProps:{container:h,track:p,link:m,button:g,wrapper:y,image:v}={}},b){const{spacing:_,padding:x,containerWidth:k,tracks:q,variables:E,horizontal:S}=n||{};return(0,o.jsxs)(T,{role:"group","aria-label":"Photo album",...h,variables:{spacing:_,padding:x,containerWidth:k,...E},classes:["",e],render:a,ref:b,children:[void 0!==_&&void 0!==x&&void 0!==k&&q?.map(({photos:e,variables:n},i)=>{const a=e.length,h=S?a:q.length;return(0,s.createElement)(T,{...p,key:i,render:l,classes:"track",variables:{trackSize:a,...n}},e.map(e=>{const{photo:n,index:i,width:s}=e,{key:a,src:l,alt:p="",title:T,label:b}=n,q=r?e=>{r({event:e,photo:n,index:i})}:void 0;if(c){const t=c({onClick:q},e);if(t)return t}const E=e=>b?{"aria-label":b,...e}:e;return(0,o.jsx)(w,{onClick:q,render:d,componentsProps:{image:{loading:"lazy",decoding:"async",src:l,alt:p,title:T,...f(n,t,s,k,h,_,x),...u(v,e)},link:E(u(m,e)),button:E(u(g,e)),wrapper:u(y,e)},...e},a??i)}))}),void 0===k&&i]})});function v(e,t,n){return function(e,t){if(!e)return;const n=[];for(let i=t;void 0!==i;i=e.get(i))n.push(i);return n.reverse()}(function(e,t,n){const i=new Map,s=new Set,o=new Map;o.set(t,0);const r=function(e){let t=0;const n=[],i=(t,i)=>e(n[t],n[i])<0,s=(e,t)=>{const i=n[e];n[e]=n[t],n[t]=i};return{push:e=>{t+=1,n[t]=e,(e=>{let t=e,n=Math.floor(t/2);for(;t>1&&i(n,t);)s(n,t),t=n,n=Math.floor(t/2)})(t)},pop:()=>{if(0===t)return;s(1,t),t-=1;const e=n.pop();return(()=>{let e=1,n=2*e;for(;n<=t&&(n<t&&i(n,n+1)&&(n+=1),i(e,n));)s(e,n),e=n,n=2*e})(),e},size:()=>t}}((a=e=>e[1],(e,t)=>a(t)-a(e)));var a;for(r.push([t,0]);r.size()>0;){const[t,n]=r.pop();if(!s.has(t)){const a=e(t);s.add(t),a.forEach((e,s)=>{const a=n+e,l=i.get(s),c=o.get(s);(void 0===c||c>a&&(c/a>1.005||void 0!==l&&l<t))&&(o.set(s,a),r.push([s,a]),i.set(s,t))})}}return o.has(n)?i:void 0}(e,t,n),n)}function b(e,t,n,i){return(t-(e.length-1)*n-2*i*e.length)/e.reduce((e,t)=>e+c(t),0)}function _(e,t,n,i,s,o,r){const a=e.slice(t,n),l=b(a,i,s,o);return l>0?(l-r)**2*a.length:void 0}var x=(0,s.forwardRef)(function({photos:e,breakpoints:t,defaultContainerWidth:n,...i},r){const{containerRef:l,containerWidth:d}=a(r,t,n),{spacing:u,padding:f,targetRowHeight:T,minPhotos:w,maxPhotos:x,...k}=function(e,{photos:t,targetRowHeight:n,rowConstraints:i,...s}){const{spacing:o,padding:r,componentsProps:a,render:l}=m(e,s),{singleRowMaxHeight:c,minPhotos:d,maxPhotos:u}=h(i,e)||{};if(void 0!==c&&void 0!==o&&void 0!==r){const e=Math.floor(t.reduce((e,{width:t,height:n})=>e+t/n*c+2*r,o*(t.length-1)));e>0&&(a.container={...a.container},a.container.style={maxWidth:e,...a.container.style})}return{...s,targetRowHeight:p(n,e,[e=>e/5,e=>e/4,e=>e/3,e=>e/2]),render:l,spacing:o,padding:r,minPhotos:d,maxPhotos:u,componentsProps:a}}(d,{photos:e,...i});return(0,o.jsx)(y,{layout:"rows",ref:l,model:(0,s.useMemo)(()=>void 0!==d&&void 0!==u&&void 0!==f&&void 0!==T?function(e,t,n,i,s,o,r){const a=v(function(e,t,n,i,s,o,r,a){return l=>{const c=new Map;c.set(l,0);const d=r||1,u=Math.min(o,a||1/0);for(let o=l+d;o<e.length+1&&!(o-l>u);o+=1){const r=_(e,l,o,i,t,n,s);if(void 0===r)break;c.set(o,r)}return c}}(e,t,n,i,s,function(e,t,n,i){return g(t/n/Math.min(...e.map(e=>c(e))))+(i||0)+2}(e,i,s,o),o,r),0,e.length);if(!a)return;const l=[];for(let d=1;d<a.length;d+=1){const s=e.slice(a[d-1],a[d]).map((e,t)=>({photo:e,index:a[d-1]+t})),o=b(s.map(({photo:e})=>e),i,t,n);l.push({photos:s.map(({photo:e,index:t})=>({photo:e,index:t,width:o*c(e),height:o}))})}return{spacing:t,padding:n,containerWidth:i,tracks:l,horizontal:!0}}(e,u,f,d,T,w,x):void 0,[e,u,f,d,T,w,x]),...k})});function k(e,t,n,i,s,o,r){const a=[],l=r.reduce((e,t)=>e+t,0);for(let d=0;d<e.length-1;d+=1){const u=t.slice(e[d],e[d+1]).map((t,n)=>({photo:t,index:e[d]+n})),h=r.reduce((e,t,n)=>e+(o[d]-o[n])*t,0),p=(s-(e.length-2)*n-2*(e.length-1)*i-h)*r[d]/l;a.push({photos:u.map(({photo:e,index:t})=>({photo:e,index:t,width:p,height:p/c(e)})),variables:{adjustedGaps:h,columnRatio:r[d]}})}return{tracks:a,variables:{totalRatio:l}}}function q(e,t,n,i,s,o){const r=[],a=[];if(e.length<=o){const s=e.length>0?e.reduce((e,t)=>e+c(t),0)/e.length:1;for(let t=0;t<o;t+=1)r[t]=2*n,a[t]=t<e.length?c(e[t]):s;return k(Array.from({length:o+1},(t,n)=>Math.min(n,e.length)),e,t,n,i,r,a)}const l=(d=function(e,t,n,i,s){return o=>{const r=[],a=1.5*s;let l=i/c(e[o])+2*n;for(let d=o+1;d<e.length+1&&(r.push([d,(s-l)**2]),!(l>a||d===e.length));d+=1)l+=i/c(e[d])+t+2*n;return r}}(e,t,n,s,(e.reduce((e,t)=>e+s/c(t),0)+t*(e.length-o)+2*n*e.length)/o),u=o,h=0,p=e.length,function(e,t,n){const i=[n];for(let s=n,o=t;o>0;o-=1)[s]=e.get(s)[o],i.push(s);return i.reverse()}(function(e,t,n,i){const s=new Map,o=new Set;o.add(n);for(let r=0;r<t;r+=1){const n=[...o.keys()];o.clear(),n.forEach(n=>{const a=r>0?s.get(n)[r][1]:0;e(n).forEach(([e,l])=>{let c=s.get(e);c||(c=[],s.set(e,c));const d=a+l,u=c[r+1];(!u||u[1]>d&&(u[1]/d>1.0001||n<u[0]))&&(c[r+1]=[n,d]),r<t-1&&e!==i&&o.add(e)})})}return s}(d,u,h,p),u,p));var d,u,h,p;for(let m=0;m<l.length-1;m+=1){const i=e.slice(l[m],l[m+1]);r[m]=t*(i.length-1)+2*n*i.length,a[m]=1/i.reduce((e,t)=>e+1/c(t),0)}return k(l,e,t,n,i,r,a)}function E(e,t,n,i,s){const{tracks:o,variables:r}=q(e,t,n,i,(i-t*(s-1)-2*n*s)/s,s);return o.some(e=>e.photos.some(({width:e,height:t})=>e<=0||t<=0))?s>1?E(e,t,n,i,s-1):void 0:{tracks:o,spacing:t,padding:n,containerWidth:i,variables:{columns:s,...r}}}var S=(0,s.forwardRef)(function({photos:e,breakpoints:t,defaultContainerWidth:n,...i},r){const{containerRef:l,containerWidth:c}=a(r,t,n),{spacing:d,padding:u,columns:h,...g}=function(e,{columns:t,...n}){return{...n,...m(e,n),columns:p(t,e,[5,4,3,2],1)}}(c,{photos:e,...i});return(0,o.jsx)(y,{layout:"columns",ref:l,model:(0,s.useMemo)(()=>void 0!==c&&void 0!==d&&void 0!==u&&void 0!==h?E(e,d,u,c,h):void 0,[e,d,u,c,h]),...g})});function A(e,t,n,i,s){const o=(i-t*(s-1)-2*n*s)/s;if(o<=0)return s>1?A(e,t,n,i,s-1):void 0;const r=[];for(let l=0;l<s;l+=1)r[l]=0;const a=e.reduce((e,i,s)=>{const a=r.reduce((e,t,n)=>t<r[e]-1?n:e,0);return r[a]=r[a]+o/c(i)+t+2*n,e[a].push({photo:i,index:s}),e},Array.from({length:s},()=>[]));return{spacing:t,padding:n,containerWidth:i,variables:{columns:s},tracks:a.map(e=>({photos:e.map(({photo:e,index:t})=>({photo:e,index:t,width:o,height:o/c(e)}))}))}}var C=(0,s.forwardRef)(function({photos:e,breakpoints:t,defaultContainerWidth:n,...i},r){const{containerRef:l,containerWidth:c}=a(r,t,n),{spacing:d,padding:u,columns:h,...g}=function(e,{columns:t,...n}){return{...n,...m(e,n),columns:p(t,e,[5,4,3,2],1)}}(c,{photos:e,...i});return(0,o.jsx)(y,{layout:"masonry",ref:l,model:(0,s.useMemo)(()=>void 0!==c&&void 0!==d&&void 0!==u&&void 0!==h?A(e,d,u,c,h):void 0,[e,d,u,c,h]),...g})});function I(e){return e?String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):""}var L=class{constructor(e,t={}){this.lightbox=e,this.aiSummaryVisible=!1,this.currentSummary=null,this.options={aiSummaryButtonOrder:7,width:"400px",height:"300px",transition:"0.3s ease",...t},document.head.insertAdjacentHTML("beforeend",`<style>\n .pswp__ai-summary-panel {\n background: rgba(30, 30, 30, 0.9);\n color: white;\n position: absolute;\n overflow-y: auto;\n z-index: 1;\n transition: transform ${this.options.transition};\n box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);\n padding: 20px;\n }\n\n /* Desktop styles */\n @media (min-width: 768px) {\n .pswp__ai-summary-panel {\n top: 0;\n right: 0;\n height: 100%;\n width: ${this.options.width};\n transform: translateX(100%);\n }\n\n .pswp__ai-summary-panel.visible {\n transform: translateX(0);\n }\n\n .pswp__container.shifted-for-ai-summary {\n transform: translateX(-${this.options.width});\n transition: transform ${this.options.transition};\n }\n }\n\n /* Mobile styles */\n @media (max-width: 767px) {\n .pswp__ai-summary-panel {\n bottom: 0;\n left: 0;\n width: 100%;\n height: ${this.options.height};\n transform: translateY(100%);\n }\n\n .pswp__ai-summary-panel.visible {\n transform: translateY(0);\n }\n\n .pswp__container.shifted-for-ai-summary {\n transform: translateY(-${this.options.height});\n transition: transform ${this.options.transition};\n }\n }\n\n .pswp__ai-summary-close {\n position: absolute;\n top: 10px;\n right: 10px;\n width: 32px;\n height: 32px;\n opacity: 0.6;\n cursor: pointer;\n z-index: 2;\n background: rgba(0, 0, 0, 0.3);\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: opacity 0.3s;\n }\n\n .pswp__ai-summary-close:hover {\n opacity: 1;\n }\n\n .pswp__ai-summary-close:before,\n .pswp__ai-summary-close:after {\n position: absolute;\n content: '';\n width: 16px;\n height: 2px;\n background-color: white;\n }\n\n .pswp__ai-summary-close:before {\n transform: rotate(45deg);\n }\n\n .pswp__ai-summary-close:after {\n transform: rotate(-45deg);\n }\n\n .pswp__ai-summary-content {\n margin-top: 20px;\n }\n\n .pswp__ai-summary-title {\n margin-bottom: 16px;\n font-size: 18px;\n font-weight: bold;\n padding-right: 30px; /* Add space for the close button */\n }\n\n .pswp__ai-summary-section {\n margin-bottom: 16px;\n }\n\n .pswp__ai-summary-section-title {\n font-weight: bold;\n margin-bottom: 8px;\n }\n\n .pswp__ai-summary-label {\n display: inline-flex;\n align-items: center;\n background: rgba(255, 255, 255, 0.1);\n border-radius: 12px;\n padding: 4px 12px;\n margin-right: 8px;\n margin-bottom: 8px;\n font-size: 14px;\n }\n\n .pswp__ai-summary-description {\n font-size: 14px;\n line-height: 1.5;\n }\n\n .pswp__ai-summary-empty {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n color: rgba(255, 255, 255, 0.6);\n font-style: italic;\n }\n\n .pswp__ai-summary-bing-search {\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 8px;\n z-index: 2;\n }\n\n .pswp__ai-summary-bing-button {\n height: 32px;\n background: rgba(255, 255, 255, 0.2);\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n transition: background-color 0.3s;\n }\n\n .pswp__ai-summary-bing-button:hover {\n background: rgba(255, 255, 255, 0.4);\n }\n\n .pswp__ai-summary-bing-icon {\n width: 20px;\n height: 20px;\n }\n\n .pswp__ai-summary-disclaimer {\n font-size: 12px;\n color: rgba(255, 255, 255, 0.7);\n text-align: center;\n margin-top: 32px;\n padding: 0 10px;\n line-height: 1.4;\n font-style: italic;\n }\n </style>`),e.on("init",()=>{this.initPswpEvents(e.pswp)})}initPswpEvents(e){e.on("uiRegister",()=>{e.ui.registerElement({name:"ai-summary-toggle-button",title:"Toggle AI summary view",order:this.options.aiSummaryButtonOrder,isButton:!0,html:'<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 24 24">\n <use class="pswp__icn-shadow" xlink:href="#pswp__icn-ai-summary"/>\n <path d="M12 17q.425 0 .713-.288T13 16v-4q0-.425-.288-.712T12 11t-.712.288T11 12v4q0 .425.288.713T12 17m0-8q.425 0 .713-.288T13 8t-.288-.712T12 7t-.712.288T11 8t.288.713T12 9m0 13q-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 12t-.788 3.9t-2.137 3.175t-3.175 2.138T12 22m0-2q3.35 0 5.675-2.325T20 12t-2.325-5.675T12 4T6.325 6.325T4 12t2.325 5.675T12 20m0-8"/>\n </svg>',onClick:()=>{this.toggleAISummary(e)}}),e.ui.registerElement({name:"ai-summary-panel",isButton:!1,appendTo:"root",html:'<div class="pswp__ai-summary-panel"><div class="pswp__ai-summary-close"></div></div>'})}),e.on("change",()=>{this.aiSummaryVisible&&this.updateAISummary(e)}),e.on("close",()=>{this.hideAISummary(e)}),e.on("firstUpdate",()=>{const t=e.element.querySelector(".pswp__ai-summary-close");t&&t.addEventListener("click",()=>{this.hideAISummary(e)})})}toggleAISummary(e){this.aiSummaryVisible?this.hideAISummary(e):this.showAISummary(e)}showAISummary(e){const t=e.container,n=e.element.querySelector(".pswp__ai-summary-panel");n&&(this.aiSummaryVisible=!0,n.classList.add("visible"),t.classList.add("shifted-for-ai-summary"),this.updateAISummary(e))}hideAISummary(e){const t=e.container,n=e.element.querySelector(".pswp__ai-summary-panel");n&&(this.aiSummaryVisible=!1,n.classList.remove("visible"),t.classList.remove("shifted-for-ai-summary"))}updateAISummary(e){if(!e.currSlide)return;const t=e.element.querySelector(".pswp__ai-summary-panel");if(!t)return;const n=e.currSlide.data,i=n.src||n.url||"";let s=null;try{n.contentSummary&&(s=JSON.parse(n.contentSummary),this.currentSummary=s)}catch(r){console.error("Error parsing AI summary data:",r)}const o=i?`<a class="pswp__ai-summary-bing-search" href="https://www.bing.com/images/search?view=detailv2&iss=SBI&form=SBIIRP&sbisrc=UrlPaste&q=imgurl:${encodeURIComponent(i)}&idpbck=1&selectedindex=0&id=${encodeURIComponent(i)}&mediaurl=${encodeURIComponent(i)}" target="_blank" rel="noopener noreferrer" class="pswp__ai-summary-bing-button">\n <svg xmlns="http://www.w3.org/2000/svg" style="height:24px;width:24px" width="256" height="388" viewBox="0 0 256 388"><defs><radialGradient id="logosBing0" cx="93.717%" cy="77.818%" r="143.121%" fx="93.717%" fy="77.818%" gradientTransform="scale(-1 -.71954)rotate(49.091 2.036 -2.204)"><stop offset="0%" stop-color="#00cacc"/><stop offset="100%" stop-color="#048fce"/></radialGradient><radialGradient id="logosBing1" cx="13.893%" cy="71.448%" r="150.086%" fx="13.893%" fy="71.448%" gradientTransform="matrix(.55155 -.39387 .23634 .91917 -.107 .112)"><stop offset="0%" stop-color="#00bbec"/><stop offset="100%" stop-color="#2756a9"/></radialGradient><linearGradient id="logosBing2" x1="50%" x2="50%" y1="0%" y2="100%"><stop offset="0%" stop-color="#00bbec"/><stop offset="100%" stop-color="#2756a9"/></linearGradient></defs><path fill="url(#logosBing0)" d="M129.424 122.047c-7.133.829-12.573 6.622-13.079 13.928c-.218 3.147-.15 3.36 6.986 21.722c16.233 41.774 20.166 51.828 20.827 53.243c1.603 3.427 3.856 6.65 6.672 9.544c2.16 2.22 3.585 3.414 5.994 5.024c4.236 2.829 6.337 3.61 22.818 8.49c16.053 4.754 24.824 7.913 32.381 11.664c9.791 4.86 16.623 10.387 20.944 16.946c3.1 4.706 5.846 13.145 7.04 21.64c.468 3.321.47 10.661.006 13.663c-1.008 6.516-3.021 11.976-6.101 16.545c-1.638 2.43-1.068 2.023 1.313-.939c6.74-8.379 13.605-22.7 17.108-35.687c4.24-15.718 4.817-32.596 1.66-48.57c-6.147-31.108-25.786-57.955-53.444-73.06c-1.738-.95-8.357-4.42-17.331-9.085a1633 1633 0 0 1-4.127-2.154c-.907-.477-2.764-1.447-4.126-2.154c-1.362-.708-5.282-2.75-8.711-4.539l-8.528-4.446a6021 6021 0 0 1-8.344-4.357c-8.893-4.655-12.657-6.537-13.73-6.863c-1.125-.343-3.984-.782-4.701-.723c-.152.012-.838.088-1.527.168"/><path fill="url(#logosBing1)" d="M148.81 277.994c-.493.292-1.184.714-1.537.938c-.354.225-1.137.712-1.743 1.083a8315 8315 0 0 0-13.204 8.137a2848 2848 0 0 0-8.07 4.997a388 388 0 0 1-3.576 2.198c-.454.271-2.393 1.465-4.31 2.654a2652 2652 0 0 1-7.427 4.586a3958 3958 0 0 0-8.62 5.316a3011 3011 0 0 1-7.518 4.637c-1.564.959-3.008 1.885-3.21 2.058c-.3.257-14.205 8.87-21.182 13.121c-5.3 3.228-11.43 5.387-17.705 6.235c-2.921.395-8.45.396-11.363.003c-7.9-1.067-15.176-4.013-21.409-8.666c-2.444-1.826-7.047-6.425-8.806-8.8c-4.147-5.598-6.829-11.602-8.218-18.396c-.32-1.564-.622-2.884-.672-2.935c-.13-.13.105 2.231.528 5.319c.44 3.211 1.377 7.856 2.387 11.829c7.814 30.743 30.05 55.749 60.15 67.646c8.668 3.424 17.415 5.582 26.932 6.64c3.576.4 13.699.56 17.43.276c17.117-1.296 32.02-6.334 47.308-15.996c1.362-.86 3.92-2.474 5.685-3.585a877 877 0 0 0 4.952-3.14c.958-.615 2.114-1.341 2.567-1.614a91 91 0 0 0 2.018-1.268c.656-.424 3.461-2.2 6.235-3.944l11.092-7.006l3.809-2.406l.137-.086l.42-.265l.199-.126l2.804-1.771l9.69-6.121c12.348-7.759 16.03-10.483 21.766-16.102c2.392-2.342 5.997-6.34 6.176-6.848c.037-.104.678-1.092 1.424-2.197c3.036-4.492 5.06-9.995 6.064-16.484c.465-3.002.462-10.342-.005-13.663c-.903-6.42-2.955-13.702-5.167-18.339c-3.627-7.603-11.353-14.512-22.453-20.076c-3.065-1.537-6.23-2.943-6.583-2.924c-.168.009-10.497 6.322-22.954 14.03c-12.457 7.71-23.268 14.4-24.025 14.87s-2.056 1.263-2.888 1.764z"/><path fill="url(#logosBing2)" d="m.053 241.013l.054 53.689l.695 3.118c2.172 9.747 5.937 16.775 12.482 23.302c3.078 3.07 5.432 4.922 8.768 6.896c7.06 4.177 14.657 6.238 22.978 6.235c8.716-.005 16.256-2.179 24.025-6.928c1.311-.801 6.449-3.964 11.416-7.029l9.032-5.572v-127.4l-.002-58.273c-.002-37.177-.07-59.256-.188-60.988c-.74-10.885-5.293-20.892-12.948-28.461c-2.349-2.323-4.356-3.875-10.336-7.99a25160 25160 0 0 1-12.104-8.336L28.617 5.835C22.838 1.85 22.386 1.574 20.639.949C18.367.136 15.959-.163 13.67.084C6.998.804 1.657 5.622.269 12.171C.053 13.191.013 26.751.01 100.35l-.003 86.975H0z"/></svg>\n <span>Search on Bing</span>\n </a>\n <div class="pswp__ai-summary-disclaimer">\n These are AI generated summaries based on the content. Please verify the information before using it.\n </div>`:"";if(s){t.innerHTML=`<div class="pswp__ai-summary-close"></div>${this.renderAISummary(s)}${o}`;const n=t.querySelector(".pswp__ai-summary-close");n&&n.addEventListener("click",()=>{this.hideAISummary(e)})}else{t.innerHTML=`<div class="pswp__ai-summary-close"></div><div class="pswp__ai-summary-empty">No AI summary available for this content</div>${o}`;const n=t.querySelector(".pswp__ai-summary-close");n&&n.addEventListener("click",()=>{this.hideAISummary(e)})}}renderAISummary(e){let t='<div class="pswp__ai-summary-content">';return e.subject&&(t+=`<div class="pswp__ai-summary-title">${I(e.subject)}</div>`),e.labels&&Object.entries(e.labels).filter(([e,t])=>Array.isArray(t)&&t.length>0).forEach(([e,n])=>{t+=`\n <div class="pswp__ai-summary-section">\n <div class="pswp__ai-summary-section-title">${I(e.replace("_"," ").replace(/\b\w/g,e=>e.toUpperCase()))}</div>\n <div class="pswp__ai-summary-labels space-y-2">\n ${n.map(e=>`<span class="pswp__ai-summary-label">${I(e)}</span>`).join("")}\n </div>\n </div>\n `}),e.description&&(t+=`\n <div class="pswp__ai-summary-section">\n <div class="pswp__ai-summary-description">${I(e.description)}</div>\n </div>\n `),t+="</div>",t}},N='url("https://res.cloudinary.com/dectzk2b2/image/upload/v1736933014/black_rpie3v.png")',M=class{constructor(e){this.backdropOn=!1,this.lightbox=e,this.backgroundElement=null,this.backgroundVideoElement=null,this.referenceVideoElement=null,this.options={toggleBackdropButtonOrder:7},e.on("init",()=>{this.initPswpEvents(e.pswp)})}initPswpEvents(e){e.on("afterInit",()=>{setTimeout(()=>{this.backgroundElement.style.display="block",this.backgroundVideoElement.style.display="block"},[500])}),e.on("uiRegister",()=>{e.ui.registerElement({name:"toggle-backdrop-button",title:"Toggle blur backdrop",order:this.options.toggleBackdropButtonOrder,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-backdrop"/><use class="pswp__icn-shadow" xlink:href="#pswp__icn-hide-backdrop"/><path id="pswp__icn-show-backdrop" style="display:none" d="M3 14.5q-.2 0-.35-.15T2.5 14t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m0-4q-.2 0-.35-.15T2.5 10t.15-.35T3 9.5t.35.15t.15.35t-.15.35t-.35.15M6 19q-.425 0-.712-.288T5 18t.288-.712T6 17t.713.288T7 18t-.288.713T6 19m0-4q-.425 0-.712-.288T5 14t.288-.712T6 13t.713.288T7 14t-.288.713T6 15m0-4q-.425 0-.712-.288T5 10t.288-.712T6 9t.713.288T7 10t-.288.713T6 11m0-4q-.425 0-.712-.288T5 6t.288-.712T6 5t.713.288T7 6t-.288.713T6 7m4 8.5q-.625 0-1.062-.437T8.5 14t.438-1.062T10 12.5t1.063.438T11.5 14t-.437 1.063T10 15.5m0-4q-.625 0-1.062-.437T8.5 10t.438-1.062T10 8.5t1.063.438T11.5 10t-.437 1.063T10 11.5m0 7.5q-.425 0-.712-.288T9 18t.288-.712T10 17t.713.288T11 18t-.288.713T10 19m0-12q-.425 0-.712-.288T9 6t.288-.712T10 5t.713.288T11 6t-.288.713T10 7m0 14.5q-.2 0-.35-.15T9.5 21t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m0-18q-.2 0-.35-.15T9.5 3t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m4 12q-.625 0-1.062-.437T12.5 14t.438-1.062T14 12.5t1.063.438T15.5 14t-.437 1.063T14 15.5m0-4q-.625 0-1.062-.437T12.5 10t.438-1.062T14 8.5t1.063.438T15.5 10t-.437 1.063T14 11.5m0 7.5q-.425 0-.712-.288T13 18t.288-.712T14 17t.713.288T15 18t-.288.713T14 19m0-12q-.425 0-.712-.288T13 6t.288-.712T14 5t.713.288T15 6t-.288.713T14 7m0 14.5q-.2 0-.35-.15T13.5 21t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m0-18q-.2 0-.35-.15T13.5 3t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15M18 19q-.425 0-.712-.288T17 18t.288-.712T18 17t.713.288T19 18t-.288.713T18 19m0-4q-.425 0-.712-.288T17 14t.288-.712T18 13t.713.288T19 14t-.288.713T18 15m0-4q-.425 0-.712-.288T17 10t.288-.712T18 9t.713.288T19 10t-.288.713T18 11m0-4q-.425 0-.712-.288T17 6t.288-.712T18 5t.713.288T19 6t-.288.713T18 7m3 7.5q-.2 0-.35-.15T20.5 14t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m0-4q-.2 0-.35-.15T20.5 10t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15"/><path id="pswp__icn-hide-backdrop" d="m19.1 21.9l-17-17q-.275-.275-.275-.7t.275-.7t.7-.275t.7.275l17 17q.275.275.275.7t-.275.7t-.7.275t-.7-.275m-9.1-.4q-.2 0-.35-.15T9.5 21t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m4 0q-.2 0-.35-.15T13.5 21t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15M6 19q-.425 0-.712-.288T5 18t.288-.712T6 17t.713.288T7 18t-.288.713T6 19m4 0q-.425 0-.712-.288T9 18t.288-.712T10 17t.713.288T11 18t-.288.713T10 19m4 0q-.425 0-.712-.288T13 18t.288-.712T14 17t.713.288T15 18t-.288.713T14 19m-4-3.5q-.65 0-1.075-.425T8.5 14t.425-1.075T10 12.5t1.075.425T11.5 14t-.425 1.075T10 15.5M6 15q-.425 0-.712-.288T5 14t.288-.712T6 13t.713.288T7 14t-.288.713T6 15m11.8-.025l-.775-.775q-.1-.5.213-.85T18 13q.425 0 .713.288T19 14q0 .45-.35.763t-.85.212M3 14.5q-.2 0-.35-.15T2.5 14t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m18 0q-.2 0-.35-.15T20.5 14t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m-6.7-3.05L12.55 9.7q.125-.525.5-.862T14 8.5q.65 0 1.075.425T15.5 10q0 .575-.35.963t-.85.487M6 11q-.425 0-.712-.287T5 10t.288-.712T6 9t.713.288T7 10t-.288.713T6 11m12 0q-.425 0-.712-.288T17 10t.288-.712T18 9t.713.288T19 10t-.288.713T18 11m-15-.5q-.2 0-.35-.15T2.5 10t.15-.35T3 9.5t.35.15t.15.35t-.15.35t-.35.15m18 0q-.2 0-.35-.15T20.5 10t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15M14 7q-.425 0-.712-.288T13 6t.288-.712T14 5t.713.288T15 6t-.288.713T14 7m-4.175-.025l-.8-.8q-.075-.5.225-.837T10 5q.425 0 .712.287T11 6q0 .45-.337.75t-.838.225M18 7q-.425 0-.712-.288T17 6t.288-.712T18 5t.713.288T19 6t-.288.713T18 7m-8-3.5q-.2 0-.35-.15T9.5 3t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m4 0q-.2 0-.35-.15T13.5 3t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15" /></svg>',onClick:()=>{this.toggleBackdrop(e)}}),this.createBlurBackground(e)}),e.on("change",()=>{this.backdropOn&&this.updateBlurBackground(e)}),e.on("close",()=>{this.removeBlurBackground(),this.backdropOn=!1})}createBlurBackground(e){const t=e.element;if(!this.backgroundElement){const e=document.createElement("div");e.style.position="fixed",e.style.top=0,e.style.left=0,e.style.width="100vw",e.style.height="100vh",e.style.backgroundSize="cover",e.style.backgroundPosition="center",e.style.filter="blur(44px)",e.style.zIndex=-1,e.style.transition="background-image 0.5s ease, opacity 0.5s ease",e.style.display="none",e.style.backgroundImage=N,t.append(e),this.backgroundElement=e}if(!this.backgroundVideoElement){const e=document.createElement("video");e.style.position="fixed",e.style.top=0,e.style.left=0,e.style.width="100vw",e.style.height="100vh",e.style.objectFit="cover",e.style.filter="blur(44px)",e.style.zIndex=-1,e.style.display="none",e.style.transition="opacity 0.5s ease",e.muted=!0,e.loop=!0,e.autoplay=!1,e.muted=!0,e.volume=0,t.append(e),this.backgroundVideoElement=e}}toggleBackdrop(e){this.backdropOn?(this.backgroundElement.style.backgroundImage=N,this.backgroundVideoElement.style.opacity=0,this.backgroundVideoElement.pause(),this.backdropOn=!1):(this.updateBlurBackground(e),this.backdropOn=!0),document.querySelector("#pswp__icn-hide-backdrop").style.display=this.backdropOn?"none":"inline",document.querySelector("#pswp__icn-show-backdrop").style.display=this.backdropOn?"inline":"none"}updateBlurBackground(e){const t=e.currSlide;if(t?.data)if("video"===t.data.type){const e=this.backgroundVideoElement,n=t.content.element;"video"===n?.tagName?.toLowerCase()&&(this.referenceVideoElement=n,this.registerVideoEvents(n,e)),e.style.opacity=0,setTimeout(()=>{e.src=t.data.src,e.load(),this.initBackgroundVideo(),e.style.opacity=1},500),this.backgroundElement&&(this.backgroundElement.style.opacity=0)}else{if(this.backgroundElement){const e=t.data.blurhash||"LEHV6nWB2yk8pyo0adR*.7kCMdnj";if(e){const t=this.createBlurhashCanvas(e,200,200);t.startsWith("data:")?this.backgroundElement.style.backgroundImage=`url('${t}')`:(this.backgroundElement.style.backgroundImage="none",this.backgroundElement.style.backgroundColor=t)}else this.backgroundElement.style.backgroundImage=`url('${t.data.thumbnailUrl}')`;this.backgroundElement.style.opacity=1}this.backgroundVideoElement&&(this.backgroundVideoElement.style.opacity=0,this.backgroundVideoElement.src="")}}initBackgroundVideo(){this.referenceVideoElement&&(this.backgroundVideoElement.currentTime=this.referenceVideoElement.currentTime,this.referenceVideoElement.currentTime>0&&!this.referenceVideoElement.paused&&!this.referenceVideoElement.ended&&this.referenceVideoElement.readyState>2&&this.backgroundVideoElement.play())}removeBlurBackground(){this.backgroundElement&&(this.backgroundElement.remove(),this.backgroundVideoElement.remove(),this.backgroundElement=null,this.backgroundVideoElement=null)}createBlurhashCanvas(e,t=100,i=100){const s=document.createElement("canvas");s.width=t,s.height=i;try{const o=s.getContext("2d"),r=n.j(e,t,i);if(r&&r.length>0){const e=o.createImageData(t,i);return e.data.set(r),o.putImageData(e,0,0),s.toDataURL()}throw new Error("Empty pixels array")}catch(o){return console.warn("Failed to decode blurhash for backdrop:",o),this.blurhashToColor(e)}}blurhashToColor(e){const t=["#8B9DC3","#DFB2A3","#C4B5A0","#A8B8C8","#B8A898"];return t[e.charCodeAt(0)%t.length]}registerVideoEvents(e,t){this.foregroundVideoElement=e,e.addEventListener("play",()=>{t.currentTime=e.currentTime,t.play()}),e.addEventListener("pause",()=>{t.pause()}),e.addEventListener("ended",()=>{t.pause(),t.currentTime=0})}};function R(e){return e?String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):""}var P={[e.AD_TARGET_TYPES.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>',[e.AD_TARGET_TYPES.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>',[e.AD_TARGET_TYPES.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>',[e.AD_TARGET_TYPES.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>',[e.AD_TARGET_TYPES.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>',[e.AD_TARGET_TYPES.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>'},O=class{constructor(e,t,n){this.lightbox=e,this.captureAdImpression=t,this.captureAdClick=n,this.captionOn=!0,this.options={captionButtonOrder:8},e.on("init",()=>{this.initPswpEvents(e.pswp)})}initPswpEvents(e){e.on("uiRegister",()=>{e.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(e)}}),e.ui.registerElement({name:"custom-caption",isButton:!1,appendTo:"root",html:'<div id="pswp-caption-container" class=" absolute bottom-0 w-full"></div>'})}),e.on("change",()=>{this.captionOn&&this.updateCaption(e)}),e.on("close",()=>{this.clearCaption()})}toggleCaption(e){this.captionOn?this.clearCaption():this.updateCaption(e),this.captionOn=!this.captionOn,document.querySelector("#pswp__icn-show-caption").style.display=this.captionOn?"inline":"none",document.querySelector("#pswp__icn-hide-caption").style.display=this.captionOn?"none":"inline"}createCaptionHTML(t){const{id:n,type:i,caption:s,title:o,description:r,targetType:a,targetText:l,targetUrl:c}=t||{};switch("ad"===i&&this.captureAdImpression&&this.captureAdImpression(n),i){case"image":case"video":return s?.length>0?`\n <div class=" w-full bg-black bg-opacity-50 p-4 text-gray-300">\n <h3 class=" text-center sm:text-lg">${R(s)}</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">${R(o)}</h3>\n <h4 class=" pb-2 text-center text-sm sm:text-base">${R(r)}</h4>\n <button\n class=" flex w-full items-center justify-center gap-3 rounded-md bg-white py-1 text-lg text-black caption-action-button"\n data-id="${R(n)}"\n data-target-type="${R(a||e.AD_TARGET_TYPES.LINK)}"\n data-target-url="${R(c)}">\n ${P[a||e.AD_TARGET_TYPES.LINK]}\n ${R(l)}\n </button>\n </div>\n </div>\n `;default:return""}}updateCaption(e){try{const t=document.getElementById("pswp-caption-container");if(!t)return;const n=e.currSlide?.data;t.innerHTML=this.createCaptionHTML(n);const i=t.querySelector(". caption-action-button");i&&i.addEventListener("click",e=>{const t=e.currentTarget.dataset.id,n=e.currentTarget.dataset.targetType,i=e.currentTarget.dataset.targetUrl;this.captureAdClick&&t&&this.captureAdClick(t,n,i)})}catch(t){console.error("Error rendering caption:",t)}}clearCaption(){const e=document.getElementById("pswp-caption-container");e&&(e.innerHTML="")}},B=class{constructor(e){this.lightbox=e,this.fullscreen=!1,this.options={fullScreenButtonOrder:7},e.on("init",()=>{this.initPswpEvents(e.pswp)})}initPswpEvents(e){e.on("uiRegister",()=>{(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)&&e.ui.registerElement({name:"fullscreen-button",title:"Toggle fullscreen view",order:this.options.fullScreenButtonOrder,isButton:!0,html:'<svg aria-hidden="true" class="pswp__icn p-1" viewBox="0 0 24 24"><use class="pswp__icn-shadow" xlink:href="#pswp__icn-fullscreen"/><use class="pswp__icn-shadow" xlink:href="#pswp__icn-exit-fullscreen"/><path id="pswp__icn-fullscreen" d="M5 19h2q.425 0 .713.288T8 20t-.288.713T7 21H4q-.425 0-.712-.288T3 20v-3q0-.425.288-.712T4 16t.713.288T5 17zm14 0v-2q0-.425.288-.712T20 16t.713.288T21 17v3q0 .425-.288.713T20 21h-3q-.425 0-.712-.288T16 20t.288-.712T17 19zM5 5v2q0 .425-.288.713T4 8t-.712-.288T3 7V4q0-.425.288-.712T4 3h3q.425 0 .713.288T8 4t-.288.713T7 5zm14 0h-2q-.425 0-.712-.288T16 4t.288-.712T17 3h3q.425 0 .713.288T21 4v3q0 .425-.288.713T20 8t-.712-.288T19 7z"/><path id="pswp__icn-exit-fullscreen" style="display:none" d="M6 18H4q-.425 0-.712-.288T3 17t.288-.712T4 16h3q.425 0 .713.288T8 17v3q0 .425-.288.713T7 21t-.712-.288T6 20zm12 0v2q0 .425-.288.713T17 21t-.712-.288T16 20v-3q0-.425.288-.712T17 16h3q.425 0 .713.288T21 17t-.288.713T20 18zM6 6V4q0-.425.288-.712T7 3t.713.288T8 4v3q0 .425-.288.713T7 8H4q-.425 0-.712-.288T3 7t.288-.712T4 6zm12 0h2q.425 0 .713.288T21 7t-.288.713T20 8h-3q-.425 0-.712-.288T16 7V4q0-.425.288-.712T17 3t.713.288T18 4z"/></svg>',onClick:()=>{this.toggleFullscreen(e)}})})}toggleFullscreen(e){const t=e.element;this.fullscreen?(document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen(),e.options.showHideAnimationType="zoom",this.fullscreen=!1):(t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen&&t.msRequestFullscreen(),e.options.showHideAnimationType="fade",this.fullscreen=!0),document.querySelector("#pswp__icn-exit-fullscreen").style.display=this.fullscreen?"inline":"none",document.querySelector("#pswp__icn-fullscreen").style.display=this.fullscreen?"none":"inline"}},D=class{constructor(e,t={}){this.lightbox=e,this.autoHideTimer=null,this.uiVisible=!0,this.options=Object.assign({defaultDelayMs:4e3,playPauseButtonOrder:9,progressBarPosition:"top",progressBarTransition:"ease",restartOnSlideChange:!0,autoHideProgressBar:!0},t),this.setSlideshowLength(Number(localStorage.getItem("pswp_delay"))||this.options.defaultDelayMs),document.head.insertAdjacentHTML("beforeend",`<style>.pswp__progress-bar{position:fixed;${this.options.progressBarPosition}:0;width:0;height:0}.pswp__progress-bar.running{width:100%;height:2px;transition-property:width;background:#ff4800}</style>`),this.slideshowIsRunning=!1,this.slideshowTimerID=null,this.wakeLockIsRunning=!1,this.wakeLockSentinel=null,this.lightbox.on("init",()=>{this.init(this.lightbox.pswp)})}init(e){e.on("uiRegister",()=>{e.ui.registerElement({name:"playpause-button",title:"Toggle slideshow (Space)\nChange delay with +/- while running",order:this.options.playPauseButtonOrder,isButton:!0,html:'<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 24 24"><use class="pswp__icn-shadow" xlink:href="#pswp__icn-play"/><use class="pswp__icn-shadow" xlink:href="#pswp__icn-stop"/><path id="pswp__icn-play" d="M8 17.175V6.825q0-.425.3-.713t.7-.287q.125 0 .263.037t.262.113l8.15 5.175q.225.15.338.375t.112.475t-.112.475t-.338.375l-8.15 5.175q-.125.075-.262.113T9 18.175q-.4 0-.7-.288t-.3-.712"/><path id="pswp__icn-stop" style="display:none" d="M16 19q-.825 0-1.412-.587T14 17V7q0-.825.588-1.412T16 5t1.413.588T18 7v10q0 .825-.587 1.413T16 19m-8 0q-.825 0-1.412-.587T6 17V7q0-.825.588-1.412T8 5t1.413.588T10 7v10q0 .825-.587 1.413T8 19"/></svg>',onClick:()=>{this.setSlideshowState()}}),e.ui.registerElement({name:"playtime",appendTo:"wrapper",tagName:"div",className:"pswp__progress-bar"}),e.events.add(document,"keydown",e=>{switch(e.code){case"Space":this.setSlideshowState(),e.preventDefault();break;case"ArrowUp":case"NumpadAdd":case"Equal":this.changeSlideshowLength(1e3),e.preventDefault();break;case"ArrowDown":case"NumpadSubtract":case"Minus":this.changeSlideshowLength(-1e3),e.preventDefault()}})}),this.lightbox.on("change",()=>{this.slideshowIsRunning&&this.options.restartOnSlideChange&&this.goToNextSlideAfterTimeout()}),this.lightbox.on("close",()=>{this.slideshowIsRunning&&this.setSlideshowState()})}showUI(){this.lightbox&&this.lightbox.pswp&&this.lightbox.pswp.element&&this.lightbox.pswp.element.classList.add("pswp--ui-visible"),this.uiVisible=!0}stopAutoHideTimer(){this.autoHideTimer&&(clearTimeout(this.autoHideTimer),this.autoHideTimer=null)}hideUI(){this.lightbox&&this.lightbox.pswp&&this.lightbox.pswp.element&&this.lightbox.pswp.element.classList.remove("pswp--ui-visible"),this.uiVisible=!1}resetAutoHideTimer(){this.autoHideTimer&&clearTimeout(this.autoHideTimer),this.autoHideTimer=setTimeout(()=>{this.slideshowIsRunning&&this.hideUI(),this.autoHideTimer=null},[3e3])}setSlideshowState(){this.slideshowIsRunning=!this.slideshowIsRunning,this.slideshowIsRunning?(this.goToNextSlideAfterTimeout(),this.showUI(),this.resetAutoHideTimer(),document.addEventListener("touchstart",()=>{this.stopAutoHideTimer(),this.showUI()}),document.addEventListener("touchend",()=>{this.resetAutoHideTimer()}),document.addEventListener("mousemove",()=>{this.uiVisible||this.showUI(),this.resetAutoHideTimer()})):(this.showUI(),this.resetSlideshow(),this.stopAutoHideTimer()),document.querySelector("#pswp__icn-stop").style.display=this.slideshowIsRunning?"inline":"none",document.querySelector("#pswp__icn-play").style.display=this.slideshowIsRunning?"none":"inline",document.querySelector(".pswp__progress-bar").style.opacity=this.options.autoHideProgressBar?null:1,this.toggleWakeLock()}setSlideshowLength(e){this.options.defaultDelayMs=Math.min(Math.max(e,1e3),2147483647),this.options.defaultDelayMs!=e&&localStorage.setItem("pswp_delay",this.options.defaultDelayMs)}changeSlideshowLength(e){if(!this.slideshowIsRunning)return;this.setSlideshowLength(this.options.defaultDelayMs+e),localStorage.setItem("pswp_delay",this.options.defaultDelayMs);const t=document.querySelector(".pswp__counter");t&&(t.innerHTML=this.options.defaultDelayMs/1e3+"s"),this.goToNextSlideAfterTimeout()}isVideoContent(e){return"video"===e?.data?.type}getSlideTimeout(){const e=this.lightbox.pswp.currSlide.content;if(this.isVideoContent(e)){const t=e.element;if(t.paused)return this.options.defaultDelayMs;const n=t.duration,i=t.currentTime;return isNaN(n)||isNaN(i)?this.options.defaultDelayMs:1e3*(n-i)}return this.options.defaultDelayMs}slideContentHasLoaded(){const e=this.lightbox.pswp.currSlide.content;if(this.isVideoContent(e)){const t=e.element;return t.ended||t.readyState===HTMLMediaElement.HAVE_ENOUGH_DATA&&[HTMLMediaElement.NETWORK_IDLE,HTMLMediaElement.NETWORK_LOADING].includes(t.networkState)}return!e.isLoading()}goToNextSlideAfterTimeout(){if(this.resetSlideshow(),this.slideContentHasLoaded()){const e=this.getSlideTimeout();this.slideshowTimerID=setTimeout(()=>{this.lightbox.pswp.next(),this.options.restartOnSlideChange||this.goToNextSlideAfterTimeout()},e),setTimeout(()=>{this.slideshowIsRunning&&this.toggleProgressBar(e)},100)}else this.slideshowTimerID=setTimeout(()=>{this.goToNextSlideAfterTimeout()},200)}getSlideTransition(){return this.isVideoContent(this.lightbox.pswp.currSlide.content)?"linear":this.options.progressBarTransition}toggleProgressBar(e){const t=document.querySelector(".pswp__progress-bar");e?(t.style.transitionTimingFunction=this.getSlideTransition(),t.style.transitionDuration=`${e}ms`,t.classList.add("running")):t.classList.remove("running")}toggleWakeLock(){this.wakeLockIsRunning!=this.slideshowIsRunning&&("keepAwake"in screen?screen.keepAwake=this.slideshowIsRunning:"wakeLock"in navigator&&(this.wakeLockSentinel?this.wakeLockSentinel.release().then(()=>(this.wakeLockSentinel=null,!0)).catch(e=>console.error(e)):navigator.wakeLock.request("screen").then(e=>(this.wakeLockSentinel=e,this.wakeLockSentinel.addEventListener("release",()=>{this.wakeLockSentinel=null,this.wakeLockIsRunning=!1}),!0)).catch(e=>{})),this.wakeLockIsRunning=this.slideshowIsRunning)}resetSlideshow(){this.toggleProgressBar(),this.slideshowTimerID&&(clearTimeout(this.slideshowTimerID),this.slideshowTimerID=null)}},V={videoAttributes:{controls:"",playsinline:"",muted:"",preload:"auto"},autoplay:!0,preventDragOffset:40};function z(e){return e&&e.data&&"video"===e.data.type}var $=class{constructor(e,t){this.options=t,this.initLightboxEvents(e),e.on("init",()=>{this.initPswpEvents(e.pswp)})}initLightboxEvents(e){e.on("contentLoad",this.onContentLoad.bind(this)),e.on("contentDestroy",this.onContentDestroy.bind(this)),e.on("contentActivate",this.onContentActivate.bind(this)),e.on("contentDeactivate",this.onContentDeactivate.bind(this)),e.on("contentAppend",this.onContentAppend.bind(this)),e.on("contentResize",this.onContentResize.bind(this)),e.addFilter("isKeepingPlaceholder",this.isKeepingPlaceholder.bind(this)),e.addFilter("isContentZoomable",this.isContentZoomable.bind(this)),e.addFilter("useContentPlaceholder",this.useContentPlaceholder.bind(this)),e.addFilter("domItemData",(e,t,n)=>("video"===e.type&&n&&(n.dataset.pswpVideoSources?e.videoSources=JSON.parse(n.dataset.pswpVideoSources):n.dataset.pswpVideoSrc?e.videoSrc=n.dataset.pswpVideoSrc:e.videoSrc=n.href),e))}initPswpEvents(e){e.on("pointerDown",t=>{const n=e.currSlide;if(z(n)&&this.options.preventDragOffset){const i=t.originalEvent;if("pointerdown"===i.type){const s=Math.ceil(n.height*n.currZoomLevel)+n.bounds.center.y,o=i.pageY-e.offset.y;o>s-this.options.preventDragOffset&&o<s&&t.preventDefault()}}}),e.on("appendHeavy",e=>{z(e.slide)&&!e.slide.isActive&&e.preventDefault()}),e.on("close",()=>{z(e.currSlide.content)&&this.pauseVideo(e.currSlide.content)})}onContentDestroy({content:e}){z(e)&&e._videoPosterImg&&(e._videoPosterImg.onload=e._videoPosterImg.onerror=null,e._videoPosterImg=null)}onContentResize(e){if(z(e.content)){e.preventDefault();const t=e.width,n=e.height,i=e.content;if(i.element&&(i.element.style.width=`${t}px`,i.element.style.height=`${n}px`),i.slide&&i.slide.placeholder){const e=i.slide.placeholder.element.style;e.transform="none",e.width=`${t}px`,e.height=`${n}px`}}}isKeepingPlaceholder(e,t){return!z(t)&&e}isContentZoomable(e,t){return!z(t)&&e}onContentActivate({content:e}){z(e)&&this.options.autoplay&&this.playVideo(e)}onContentDeactivate({content:e}){z(e)&&this.pauseVideo(e)}onContentAppend(e){z(e.content)&&(e.preventDefault(),e.content.isAttached=!0,e.content.appendImage())}onContentLoad(e){const t=e.content;if(z(e.content)&&(e.preventDefault(),!t.element)){if(t.state="loading",t.type="video",t.element=document.createElement("video"),this.options.videoAttributes)for(let e in this.options.videoAttributes)t.element.setAttribute(e,this.options.videoAttributes[e]||"");t.element.setAttribute("poster",t.data.msrc),this.preloadVideoPoster(t,t.data.msrc),t.element.style.position="relative",t.element.style.left=0,t.element.style.top=0,t.data.videoSources?t.data.videoSources.forEach(e=>{let n=document.createElement("source");n.src=e.src,n.type=e.type,t.element.appendChild(n)}):t.data.videoSrc&&(t.element.src=t.data.videoSrc)}}preloadVideoPoster(e,t){!e._videoPosterImg&&t&&(e._videoPosterImg=new Image,e._videoPosterImg.src=t,e._videoPosterImg.complete?e.onLoaded():e._videoPosterImg.onload=e._videoPosterImg.onerror=()=>{e.onLoaded()})}playVideo(e){e.element&&e.element.play()}pauseVideo(e){e.element&&e.element.pause()}useContentPlaceholder(e,t){return!!z(t)||e}},H=class{constructor(e,t={}){new $(e,{...V,...t})}},U=({open:t,ad:n,onClose:s,captureAdClick:o})=>e.u(i.Dialog,{open:Boolean(t&&n),onOpenChange:e=>!e&&s?.(),children:e.u(i.DialogContent,{children:[e.u(i.DialogHeader,{className:"hidden",children:[e.u(i.DialogTitle,{children:n?.title}),e.u(i.DialogDescription,{children:n?.description})]}),e.u("div",{className:"flex max-w-lg flex-col overflow-hidden",children:[e.u("img",{className:"h-auto max-h-96 w-full object-contain",src:n?.imageUrl,alt:"Image not found"}),e.u("div",{className:"flex flex-col gap-2 p-3",children:[e.u(i.Typography,{variant:"h4",align:"center",lines:2,children:n?.title}),e.u(i.Typography,{variant:"body3",color:"secondary",align:"center",lines:6,children:n?.description})]}),e.u(i.Button,{fullWidth:!0,className:"rounded-t-none",onClick:()=>o?.(n?._id,n?.targetType??e.AD_TARGET_TYPES.LINK,n?.targetUrl),icon:e.AD_TARGET_TYPE_ICONS[n?.targetType]??e.AD_TARGET_TYPE_ICONS[e.AD_TARGET_TYPES.LINK],children:n?.targetText})]})]})}),j=({url:t,alt:i="",thumbnailUrl:s,blurhash:o,pswpData:r={},curateLink:a,onClick:l})=>{const c=e.u(e.k,{children:[e.u(n.LazyLoadImage,{threshold:.1,src:s||t,blurhash:o,alt:i}),r.type===e.CONTENT_TYPES.VIDEO&&e.u("div",{className:"absolute inset-0 top-0 left-0 flex items-center justify-center opacity-75",children:e.u("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-16 text-white lg:w-24",viewBox:"0 0 24 24",children:e.u("path",{fill:"currentColor",d:"M8 17.175V6.825q0-.425.3-.713t.7-.287q.125 0 .263.037t.262.113l8.15 5.175q.225.15.338.375t.112.475t-.112.475t-.338.375l-8.15 5.175q-.125.075-.262.113T9 18.175q-.4 0-.7-.288t-.3-.712"})})})]});return l?e.u("button",{className:"h-full w-full",onClick:l,children:c}):a?e.u(n.Link,{to:a,className:"h-full w-full",children:c}):e.u("a",{href:t,className:"pswp-item block h-full w-full",...Object.keys(r).reduce((e,t)=>{var n;return e[`data-pswp-${n=t,n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}`]=String(r[t]),e},{}),target:"_blank",rel:"noreferrer",children:c})},F=({style:t,content:s,curateLink:o,onAdClick:r})=>{const{captureAdImpression:a,captureAdEngagement:l,captureAdClick:c}=i.useAnalytics();return e.u("div",{style:t,className:"group relative mb-1 overflow-hidden rounded",children:[e.u(n.InView,{className:"size-full",threshold:.8,triggerOnce:!0,onChange:e=>{e&&a(s._id)},onClick:()=>l(s._id),children:e.u(j,{url:s.src,thumbnailUrl:s.src,blurhash:s.blurhash,alt:s.caption,onClick:o?r:void 0,pswpData:{id:s._id,type:e.CONTENT_TYPES.AD,hash:s._id,width:s.width,height:s.height,title:s.title,description:s.description,targetType:s.targetType,targetText:s.targetText,targetUrl:s.targetUrl,thumbnailUrl:s.imageUrl,blurhash:s.blurhash}})}),e.u("div",{className:"transition-opacity duration-500 group-hover:opacity-100 sm:opacity-0",children:e.u("div",{className:"text-foreground bg-background bg-opacity-75 absolute bottom-0 w-full flex-col items-center justify-between sm:flex sm:flex-row",children:[e.u("h3",{className:"text-foreground line-clamp-2 p-2 text-sm font-medium sm:ml-3 sm:line-clamp-1 sm:p-0",children:s.title}),s?.targetType!==e.AD_TARGET_TYPES.NONE&&e.u(i.Button,{immutable:!0,className:"w-full rounded-t-none py-1 text-nowrap sm:w-auto sm:rounded-t-none sm:rounded-bl-none sm:py-2",onClick:()=>c(s._id,s.targetType,s.targetUrl),icon:e.AD_TARGET_TYPE_ICONS[s?.targetType??e.AD_TARGET_TYPES.LINK],children:s?.targetText})]})})]})},Y=e.R(null),G=()=>{const t=e.x(Y);if(!t)throw new Error("Popover components must be used within a Popover");return t},W=({children:t,className:n,open:i,onOpenChange:s})=>{const[o,r]=e.d(!1),a="boolean"==typeof i,l=a?i:o,c=e.g(),d=`popover-trigger-${c}`,u=`popover-content-${c}`,h=e.A(null);return e.u(Y.Provider,{value:{isOpen:l,setIsOpen:e=>{a||r(e),s?.(e)},triggerId:d,contentId:u,triggerRef:h},children:e.u("div",{"data-slot":"popover",className:e.cn("relative inline-block",n),children:t})})},K=({children:t,asChild:n,className:i,onClick:s,...o})=>{const{isOpen:r,setIsOpen:a,triggerId:l,contentId:c,triggerRef:d}=G();if(e.y(()=>{if(!n)return;const e=document.getElementById(l);return d.current=e,()=>{d.current===e&&(d.current=null)}},[n,l,d]),n){const n=Array.isArray(t)?t[0]:t;if(n&&n.type){const t=n.props?.className;return e.Q(n,{id:l,className:i?t?`${t} ${i}`:i:t,"aria-haspopup":"dialog","aria-expanded":r,"aria-controls":r?c:void 0,onClick:e=>{a(!r),n.props?.onClick?.(e)},"data-state":r?"open":"closed"})}}return e.u("button",{ref:d,id:l,type:"button","aria-haspopup":"dialog","aria-expanded":r,"aria-controls":r?c:void 0,"data-slot":"popover-trigger","data-state":r?"open":"closed",className:i,onClick:e=>{a(!r),s?.(e)},...o,children:t})},Q=({children:n,className:i,align:s="center",side:o="top",sideOffset:r=4,...a})=>{const{isOpen:l,setIsOpen:c,contentId:d,triggerRef:u}=G(),{organization:h}=t.useSession(),p=e.A(null),[m,g]=e.d(null);if(e._(()=>{if(!l)return;const e=()=>{if(!u.current||!p.current)return;const e=u.current.getBoundingClientRect(),t=p.current.getBoundingClientRect();let n=e.left,i=e.bottom+r;"center"===s&&(n=e.left+e.width/2-t.width/2),"end"===s&&(n=e.right-t.width),"top"===o&&(i=e.top-t.height-r),"left"===o&&(n=e.left-t.width-r,i=e.top+e.height/2-t.height/2),"right"===o&&(n=e.right+r,i=e.top+e.height/2-t.height/2),"bottom"===o&&(i=e.bottom+r),g({top:i,left:n})},t=requestAnimationFrame(e);return window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),()=>{cancelAnimationFrame(t),window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0)}},[s,l,o,r,u]),e.y(()=>{if(!l)return;const e=e=>{const t=e.target;p.current&&!p.current.contains(t)&&u.current&&!u.current.contains(t)&&c(!1)},t=e=>{"Escape"===e.key&&(c(!1),u.current?.focus())},n=window.setTimeout(()=>{document.addEventListener("mousedown",e)},0);return document.addEventListener("keydown",t),()=>{window.clearTimeout(n),document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[l,c,u]),!l)return null;const f=e.u("div",{ref:p,id:d,role:"dialog","aria-modal":"false","data-state":l?"open":"closed",className:e.cn("bg-background text-foreground border-border shadow-outer rounded outline-none",i),style:{position:"fixed",top:m?.top??0,left:m?.left??0,zIndex:2010,...e.getStyleObject(h)},...a,children:n});return"undefined"!=typeof document?t.$(f,document.body):f},Z=({eventId:s,contentId:o,emojis:r=[],counts:a={},userReaction:l})=>{const{user:c,props:d,organization:u}=t.useSession(),h=d?.loginUrl,{handleReactionClick:p}=(()=>{const n=e.useQueryClient(),{props:s,user:o}=t.useSession(),r=s?.organizationId;return{handleReactionClick:async(s,a,l)=>{if(!s||!a||!l)return!1;if(!o)return i.y.error("Please login to react"),!1;const c=[e.QUERY_KEYS.CONTENTS_BY_EVENT(s)],d=n.getQueriesData({queryKey:c});n.setQueriesData({queryKey:c},e=>e?.pages&&Array.isArray(e.pages)?{...e,pages:e.pages.map(e=>e.data?{...e,data:e.data.map(e=>{if(e._id===a){const t={...e.reactionCounts};return e.userReaction&&e.userReaction!==l&&(t[e.userReaction]=Math.max(0,(t[e.userReaction]??1)-1)),e.userReaction===l?(t[l]=Math.max(0,(t[l]??1)-1),{...e,reactionCounts:t,userReaction:void 0}):(t[l]=(t[l]??0)+1,{...e,reactionCounts:t,userReaction:l})}return e})}:e)}:e);try{return await t.ky.post(e.API_ROUTES.UPDATE_REACTION,{json:{eventId:s,contentId:a,reaction:l},headers:{"x-org-id":r,Authorization:`Bearer ${o.token}`}}),!0}catch(u){return d.forEach(([e,t])=>{n.setQueryData(e,t)}),i.y.error("Failed to add reaction"),console.error("Error handling reaction click:",u),!1}}}})(),[m,g]=e.d(!1),[f,T]=e.d(!1),w=Object.values(a).reduce((e,t)=>e+t,0);return e.u(W,{open:m,onOpenChange:g,children:[e.u(K,{children:e.u("div",{className:e.cn("bg-background/50 flex items-center gap-1 rounded px-2 py-1 backdrop-blur-sm transition-transform active:scale-90 sm:gap-2 sm:py-0",l&&"ring-primary ring-1"),children:[(r||[]).slice().sort((e,t)=>(a[t]||0)-(a[e]||0)).slice(0,1).map(t=>e.u("span",{className:"text-sm sm:text-lg",children:l||t},`${o}-${t}-1`)),w>0&&e.u("span",{className:"text-xs font-bold sm:text-sm",children:w||0})]})}),e.u(Q,{side:"top",align:"end",children:[c?null:u?.customAuth?e.u("div",{className:"p-2 font-semibold",children:["Please"," ",e.u("a",{className:"text-info underline",href:h,children:"Login"})," ","to react"]}):e.u("div",{className:"p-2 font-semibold",children:["Please"," ",e.u(n.Link,{className:"text-info underline",to:e.PAGE_ROUTES.LOGIN,children:"Login"})," ","to react"]}),c&&e.u("div",{className:"flex gap-1 p-2",children:r.map(t=>{const n=l===t;return e.u("div",{className:"flex flex-col items-center",children:[e.u("span",{className:"text-xs font-medium",children:a[t]||0}),e.u("button",{type:"button",disabled:f,className:e.cn("text-3xl transition-transform disabled:opacity-50",n?"scale-125":"hover:scale-110",f&&"cursor-not-allowed"),onClick:()=>(async e=>{!f&&p&&(T(!0),await p(s,o,e)&&g(!1),T(!1))})(t),children:t})]},`${o}-${t}-2`)})})]})]})},J=({event:t={},content:n,curateLink:s})=>t.engagementStyle===e.ENGAGEMENT_STYLES.CONTEST?e.u("button",{className:"bg-background/75 flex items-center gap-1 rounded px-2 py-1",children:[e.u(i.Iconify,{name:"material-symbols:star-half-rounded",className:"size-4"}),e.u("span",{className:"text-xs font-semibold",children:parseFloat(String(n.score||0)).toFixed(1)})]}):t.engagementStyle===e.ENGAGEMENT_STYLES.REACTION&&t.reactionEmojis?.length?e.u(Z,{eventId:t?._id,contentId:n._id,emojis:t?.reactionEmojis,engagementStyle:t?.engagementStyle,counts:n.reactionCounts||{},userReaction:n.userReaction}):null,X=({content:t})=>e.u("div",{className:"w-full space-y-3 px-3 pb-3",children:[t?.caption&&e.u("span",{className:"hidden w-full py-1 text-xs drop-shadow-[0_1.2px_1.2px_rgba(0,0,0,0.8)] sm:block","data-tooltip-target":"tooltip-default",children:e.u("div",{className:"hover:text-foreground lg:text-md line-clamp-2 text-xs text-white lg:font-medium",title:t?.caption,role:"note",children:t?.caption})}),e.u("div",{className:"flex items-center justify-between",children:e.u("span",{className:"lg:text-md line-clamp-1 text-sm font-medium text-white drop-shadow-[0_1.2px_1.2px_rgba(0,0,0,0.8)]",children:t?.user?.name})})]}),ee=({event:n,content:s,style:o,timestampField:r,curateLink:a,onChangeFaceUrl:l,hideControls:c})=>{const{organization:d}=t.useSession(),u=`content-${s._id}`,h=((e,t)=>{if(!e||!t)return null;const n=t?.[e];if(!n)return null;try{const e=new Date(String(n)),t=new Date,i=e.getFullYear()===t.getFullYear(),s={weekday:"long",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0};return i||(s.year="numeric"),e.toLocaleString("en-US",s).replace(","," •")}catch{return null}})(r,s);return e.u("div",{id:u,style:o,className:"group relative mb-1 overflow-hidden rounded",children:[e.u(j,{url:s.src,alt:s.caption,blurhash:s.blurhash,thumbnailUrl:s.thumbnailUrl,curateLink:a,pswpData:{id:s._id,type:e.CONTENT_TYPES.IMAGE,hash:s._id,width:s.width,height:s.height,thumbnailUrl:s.thumbnailUrl,blurhash:s.blurhash,caption:s.caption,contentSummary:JSON.stringify(s.contentSummary)}}),!c&&e.u(e.k,{children:[h&&e.u("div",{className:"absolute top-2 left-2 max-w-[calc(100%-80px)] truncate rounded bg-black/50 px-2 py-0.5 text-xs text-white backdrop-blur-sm",children:h}),d?.integrationSettings?.showQuickSearch&&(s.faces?.length??0)>0&&e.u("button",{className:"bg-primary absolute top-2 right-2 rounded-full p-1 text-gray-200 opacity-50 transition-all sm:p-1.5 sm:hover:scale-110 sm:hover:opacity-100",onClick:()=>{l?.(s?.url);const e=document.getElementById("media-gallery-container");e&&e.scrollIntoView({behavior:"smooth",block:"start"})},children:e.u(i.Iconify,{color:"a11y",name:"material-symbols:familiar-face-and-zone-outline-rounded"})}),e.u("div",{className:"",children:[e.u("div",{className:"absolute bottom-0 w-full rounded-b",children:e.u(X,{content:s})}),e.u("div",{className:"absolute right-2 bottom-2",children:e.u(J,{event:n,content:s,curateLink:a})})]})]})]})},te=({content:t,style:n,event:i,timestampField:s,curateLink:o,hideControls:r})=>{const a=((e,t)=>{if(!e||!t)return null;const n=t?.[e];if(!n)return null;try{const e=new Date(String(n)),t=new Date,i=e.getFullYear()===t.getFullYear(),s={weekday:"long",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0};return i||(s.year="numeric"),e.toLocaleString("en-US",s).replace(","," •")}catch{return null}})(s,t);return e.u("div",{id:`content-${t._id}`,className:"group relative mb-1 overflow-hidden rounded",style:n,children:[e.u(j,{url:t.src??t.url,thumbnailUrl:t.thumbnailUrl,blurhash:t.blurhash,alt:t.caption,curateLink:o,pswpData:{id:t._id,type:e.CONTENT_TYPES.VIDEO,hash:t._id,width:t.width,height:t.height,thumbnailUrl:t.thumbnailUrl,blurhash:t.blurhash,caption:t.caption}}),!r&&e.u("div",{className:"transition-opacity duration-500",children:[a&&e.u("div",{className:"absolute top-2 left-2 max-w-[calc(100%-80px)] truncate rounded bg-black/50 px-2 py-0.5 text-xs text-white backdrop-blur-sm",children:a}),e.u("div",{className:"absolute bottom-0 w-full rounded-b",children:e.u(X,{content:t})}),e.u("div",{className:"absolute right-2 bottom-2",children:e.u(J,{event:i,content:t,curateLink:o})})]})]})};exports.default=({event:n,contents:s=[],singleColumnMode:o,kioskMode:r,timestampField:a,curateLink:l,onChangeFaceUrl:c})=>{const d=e.A(null),u=e.T(()=>`gallery-${n?._id??""}`,[n]),{captureAdImpression:h,captureAdClick:p}=i.useAnalytics(),{organization:m}=t.useSession(),[g,f]=e.d(null);return e.y(()=>{if(!l){const e=new i.lightbox_default({gallery:`#${u}`,children:"a",counter:!1,bgOpacity:1,wheelToZoom:!0,pinchToClose:!0,zoom:!1,pswpModule:()=>Promise.resolve().then(()=>require("./BD2gDjZu.js"))});d.current=e,new H(e),new M(e),new O(e,h,p),new B(e),new D(e),m?.navigationSettings?.showAIDescription&&new L(e,{width:"400px",height:"40%"}),e.init()}return()=>{d.current?.destroy?.(),d.current=null}},[n?.galleryLayout,l,p,h,u,m]),e.u(e.k,{children:[e.u(e.T(()=>{switch(n?.galleryLayout){case e.GALLERY_LAYOUTS.ROW:return x;case e.GALLERY_LAYOUTS.COLUMN:return S;case e.GALLERY_LAYOUTS.MASONRY:return C;default:return x}},[o,n?.galleryLayout]),{spacing:4,targetRowHeight:o?500:360,columns:e=>o?1:e<400?2:e<800?3:4,photos:s.map(t=>({src:t.type===e.CONTENT_TYPES.IMAGE||t.type===e.CONTENT_TYPES.VIDEO?t.url:t.imageUrl,width:t.dimension?.width,height:t.dimension?.height,...t})),render:{container:({ref:t,className:n,children:i})=>e.u("div",{id:u,ref:t,className:e.cn(n??"",o?"w-full lg:w-1/3":"w-full"),children:i}),photo:(t,{photo:i,width:s,height:o,index:d})=>{const u=i;let h=null;switch(u.type){case e.CONTENT_TYPES.IMAGE:h=ee;break;case e.CONTENT_TYPES.VIDEO:h=te;break;case e.CONTENT_TYPES.AD:h=F;break;default:h=null}return h&&e.u(h,{style:{width:s,height:o},event:n,content:u,timestampField:a,onAdClick:()=>{f(u)},hideControls:r,curateLink:l?`${l}/${u._id}`:null,onChangeFaceUrl:c},`${u._id??d}-${d}`)}}}),e.u(U,{ad:g,onClose:()=>f(null),captureAdClick:p})]})};
|
|
1
|
+
require("./D4geS7mP.js");const e=require("./DV6DJ1Br.js"),t=require("./D3jlv133.js"),n=require("./Cs3wia2w.js"),i=require("./BAbwOJvT.js");let s=require("react"),o=require("react/jsx-runtime");function r(e,t){const[n,i]=e;if(n===t)return e;if(void 0!==i&&void 0!==t&&void 0!==n&&t===i&&Math.abs(t-n)<=20){const s=Math.min(n,t),o=Math.max(n,t);return s===n&&o===i?e:[s,o]}return[t,n]}function a(e,t,n){const[[i],o]=(0,s.useReducer)(r,[n]),a=function(e){const[t,n]=(0,s.useState)(e);return e===t||e&&t&&e.length===t.length&&!e.some((e,n)=>e!==t[n])?t:(n(e),e)}(t),l=(0,s.useRef)(void 0);return{containerRef:(0,s.useCallback)(t=>{l.current?.disconnect(),l.current=void 0;const n=()=>o(function(e,t){let n=e?.clientWidth;if(void 0!==n&&t&&t.length>0){const e=[...t.filter(e=>e>0)].sort((e,t)=>t-e);e.push(Math.floor(e[e.length-1]/2)),n=e.find((t,i)=>t<=n||i===e.length-1)}return n}(t,a));n(),t&&"undefined"!=typeof ResizeObserver&&(l.current=new ResizeObserver(n),l.current.observe(t)),"function"==typeof e?e(t):e&&(e.current=t)},[e,a]),containerWidth:i}}function l(e){return["react-photo-album",e].filter(Boolean).join("--")}function c({width:e,height:t}){const n=e/t;return Number.isFinite(n)?n:1}var d=Object.freeze([1200,600,300,0]);function u(e,t){return"function"==typeof e?e(t):e}function h(e,t){return void 0!==t?u(e,t):void 0}function p(e,t,n,i=0){if(void 0===t)return;const s=h(e,t);return Math.round(Math.max(void 0===s?function(e,t){const n=d.findIndex(e=>e<=t);return u(e[Math.max(n,0)],t)}(n,t):s,i))}function m(e,{spacing:t,padding:n,componentsProps:i,render:s}){return{spacing:p(t,e,[20,15,10,5]),padding:p(n,e,[0,0,0,0]),componentsProps:u(i,e)||{},render:u(s,e)}}function g(e,t=0){const n=10**t;return Math.round((e+Number.EPSILON)*n)/n}function f(e,t,n,i,s,o,r){let a,l;const c=e=>{const t=o*(s-1)+2*r*s;return`calc((${e.match(/^\s*calc\((.*)\)\s*$/)?.[1]??e} - ${t}px) / ${g((i-t)/n,5)})`},d=e.srcSet;return d&&d.length>0&&(a=d.concat(d.some(({width:t})=>t===e.width)?[]:[{src:e.src,width:e.width,height:e.height}]).sort((e,t)=>e.width-t.width).map(e=>`${e.src} ${e.width}w`).join(", ")),l=t?.size?(t.sizes||[]).map(({viewport:e,size:t})=>`${e} ${c(t)}`).concat(c(t.size)).join(", "):`${Math.ceil(n/i*100)}vw`,{srcSet:a,sizes:l}}var T=(0,s.forwardRef)(function({as:e,render:t,context:n,classes:i=[],variables:s={},style:r,className:a,children:c,...d},u){const h=function(...e){return e.filter(Boolean).join(" ")}(...(Array.isArray(i)?i:[i]).filter(e=>"string"==typeof e).map(l),a),p={style:{...Object.fromEntries(Object.entries(s).map(([e,t])=>{return[(n=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),`--${l(n)}`),"number"==typeof t?g(t,5):t];var n})),...r},className:h,children:c,...d};if(t){const e=t({ref:u,...p},n);if(e)return e}return(0,o.jsx)(e||"div",{ref:u,...p})}),w=(0,s.forwardRef)(function({photo:e,index:t,width:n,height:i,onClick:s,render:{wrapper:r,link:a,button:l,image:c,extras:d}={},componentsProps:{link:u,button:h,wrapper:p,image:m}={}},f){const{href:w}=e,y={photo:e,index:t,width:g(n,3),height:g(i,3)};let v;return v=w?{...u,as:"a",render:a,classes:["photo","link"],href:w,onClick:s}:s?{...h,as:"button",type:"button",render:l,classes:["photo","button"],onClick:s}:{...p,render:r,classes:"photo"},(0,o.jsxs)(T,{ref:f,variables:{photoWidth:y.width,photoHeight:y.height},context:y,...v,children:[(0,o.jsx)(T,{as:"img",classes:"image",render:c,context:y,...m}),d?.({},y)]})}),y=(0,s.forwardRef)(function({layout:e,sizes:t,model:n,skeleton:i,onClick:r,render:{container:a,track:l,photo:c,...d}={},componentsProps:{container:h,track:p,link:m,button:g,wrapper:y,image:v}={}},b){const{spacing:_,padding:x,containerWidth:k,tracks:q,variables:E,horizontal:S}=n||{};return(0,o.jsxs)(T,{role:"group","aria-label":"Photo album",...h,variables:{spacing:_,padding:x,containerWidth:k,...E},classes:["",e],render:a,ref:b,children:[void 0!==_&&void 0!==x&&void 0!==k&&q?.map(({photos:e,variables:n},i)=>{const a=e.length,h=S?a:q.length;return(0,s.createElement)(T,{...p,key:i,render:l,classes:"track",variables:{trackSize:a,...n}},e.map(e=>{const{photo:n,index:i,width:s}=e,{key:a,src:l,alt:p="",title:T,label:b}=n,q=r?e=>{r({event:e,photo:n,index:i})}:void 0;if(c){const t=c({onClick:q},e);if(t)return t}const E=e=>b?{"aria-label":b,...e}:e;return(0,o.jsx)(w,{onClick:q,render:d,componentsProps:{image:{loading:"lazy",decoding:"async",src:l,alt:p,title:T,...f(n,t,s,k,h,_,x),...u(v,e)},link:E(u(m,e)),button:E(u(g,e)),wrapper:u(y,e)},...e},a??i)}))}),void 0===k&&i]})});function v(e,t,n){return function(e,t){if(!e)return;const n=[];for(let i=t;void 0!==i;i=e.get(i))n.push(i);return n.reverse()}(function(e,t,n){const i=new Map,s=new Set,o=new Map;o.set(t,0);const r=function(e){let t=0;const n=[],i=(t,i)=>e(n[t],n[i])<0,s=(e,t)=>{const i=n[e];n[e]=n[t],n[t]=i};return{push:e=>{t+=1,n[t]=e,(e=>{let t=e,n=Math.floor(t/2);for(;t>1&&i(n,t);)s(n,t),t=n,n=Math.floor(t/2)})(t)},pop:()=>{if(0===t)return;s(1,t),t-=1;const e=n.pop();return(()=>{let e=1,n=2*e;for(;n<=t&&(n<t&&i(n,n+1)&&(n+=1),i(e,n));)s(e,n),e=n,n=2*e})(),e},size:()=>t}}((a=e=>e[1],(e,t)=>a(t)-a(e)));var a;for(r.push([t,0]);r.size()>0;){const[t,n]=r.pop();if(!s.has(t)){const a=e(t);s.add(t),a.forEach((e,s)=>{const a=n+e,l=i.get(s),c=o.get(s);(void 0===c||c>a&&(c/a>1.005||void 0!==l&&l<t))&&(o.set(s,a),r.push([s,a]),i.set(s,t))})}}return o.has(n)?i:void 0}(e,t,n),n)}function b(e,t,n,i){return(t-(e.length-1)*n-2*i*e.length)/e.reduce((e,t)=>e+c(t),0)}function _(e,t,n,i,s,o,r){const a=e.slice(t,n),l=b(a,i,s,o);return l>0?(l-r)**2*a.length:void 0}var x=(0,s.forwardRef)(function({photos:e,breakpoints:t,defaultContainerWidth:n,...i},r){const{containerRef:l,containerWidth:d}=a(r,t,n),{spacing:u,padding:f,targetRowHeight:T,minPhotos:w,maxPhotos:x,...k}=function(e,{photos:t,targetRowHeight:n,rowConstraints:i,...s}){const{spacing:o,padding:r,componentsProps:a,render:l}=m(e,s),{singleRowMaxHeight:c,minPhotos:d,maxPhotos:u}=h(i,e)||{};if(void 0!==c&&void 0!==o&&void 0!==r){const e=Math.floor(t.reduce((e,{width:t,height:n})=>e+t/n*c+2*r,o*(t.length-1)));e>0&&(a.container={...a.container},a.container.style={maxWidth:e,...a.container.style})}return{...s,targetRowHeight:p(n,e,[e=>e/5,e=>e/4,e=>e/3,e=>e/2]),render:l,spacing:o,padding:r,minPhotos:d,maxPhotos:u,componentsProps:a}}(d,{photos:e,...i});return(0,o.jsx)(y,{layout:"rows",ref:l,model:(0,s.useMemo)(()=>void 0!==d&&void 0!==u&&void 0!==f&&void 0!==T?function(e,t,n,i,s,o,r){const a=v(function(e,t,n,i,s,o,r,a){return l=>{const c=new Map;c.set(l,0);const d=r||1,u=Math.min(o,a||1/0);for(let o=l+d;o<e.length+1&&!(o-l>u);o+=1){const r=_(e,l,o,i,t,n,s);if(void 0===r)break;c.set(o,r)}return c}}(e,t,n,i,s,function(e,t,n,i){return g(t/n/Math.min(...e.map(e=>c(e))))+(i||0)+2}(e,i,s,o),o,r),0,e.length);if(!a)return;const l=[];for(let d=1;d<a.length;d+=1){const s=e.slice(a[d-1],a[d]).map((e,t)=>({photo:e,index:a[d-1]+t})),o=b(s.map(({photo:e})=>e),i,t,n);l.push({photos:s.map(({photo:e,index:t})=>({photo:e,index:t,width:o*c(e),height:o}))})}return{spacing:t,padding:n,containerWidth:i,tracks:l,horizontal:!0}}(e,u,f,d,T,w,x):void 0,[e,u,f,d,T,w,x]),...k})});function k(e,t,n,i,s,o,r){const a=[],l=r.reduce((e,t)=>e+t,0);for(let d=0;d<e.length-1;d+=1){const u=t.slice(e[d],e[d+1]).map((t,n)=>({photo:t,index:e[d]+n})),h=r.reduce((e,t,n)=>e+(o[d]-o[n])*t,0),p=(s-(e.length-2)*n-2*(e.length-1)*i-h)*r[d]/l;a.push({photos:u.map(({photo:e,index:t})=>({photo:e,index:t,width:p,height:p/c(e)})),variables:{adjustedGaps:h,columnRatio:r[d]}})}return{tracks:a,variables:{totalRatio:l}}}function q(e,t,n,i,s,o){const r=[],a=[];if(e.length<=o){const s=e.length>0?e.reduce((e,t)=>e+c(t),0)/e.length:1;for(let t=0;t<o;t+=1)r[t]=2*n,a[t]=t<e.length?c(e[t]):s;return k(Array.from({length:o+1},(t,n)=>Math.min(n,e.length)),e,t,n,i,r,a)}const l=(d=function(e,t,n,i,s){return o=>{const r=[],a=1.5*s;let l=i/c(e[o])+2*n;for(let d=o+1;d<e.length+1&&(r.push([d,(s-l)**2]),!(l>a||d===e.length));d+=1)l+=i/c(e[d])+t+2*n;return r}}(e,t,n,s,(e.reduce((e,t)=>e+s/c(t),0)+t*(e.length-o)+2*n*e.length)/o),u=o,h=0,p=e.length,function(e,t,n){const i=[n];for(let s=n,o=t;o>0;o-=1)[s]=e.get(s)[o],i.push(s);return i.reverse()}(function(e,t,n,i){const s=new Map,o=new Set;o.add(n);for(let r=0;r<t;r+=1){const n=[...o.keys()];o.clear(),n.forEach(n=>{const a=r>0?s.get(n)[r][1]:0;e(n).forEach(([e,l])=>{let c=s.get(e);c||(c=[],s.set(e,c));const d=a+l,u=c[r+1];(!u||u[1]>d&&(u[1]/d>1.0001||n<u[0]))&&(c[r+1]=[n,d]),r<t-1&&e!==i&&o.add(e)})})}return s}(d,u,h,p),u,p));var d,u,h,p;for(let m=0;m<l.length-1;m+=1){const i=e.slice(l[m],l[m+1]);r[m]=t*(i.length-1)+2*n*i.length,a[m]=1/i.reduce((e,t)=>e+1/c(t),0)}return k(l,e,t,n,i,r,a)}function E(e,t,n,i,s){const{tracks:o,variables:r}=q(e,t,n,i,(i-t*(s-1)-2*n*s)/s,s);return o.some(e=>e.photos.some(({width:e,height:t})=>e<=0||t<=0))?s>1?E(e,t,n,i,s-1):void 0:{tracks:o,spacing:t,padding:n,containerWidth:i,variables:{columns:s,...r}}}var S=(0,s.forwardRef)(function({photos:e,breakpoints:t,defaultContainerWidth:n,...i},r){const{containerRef:l,containerWidth:c}=a(r,t,n),{spacing:d,padding:u,columns:h,...g}=function(e,{columns:t,...n}){return{...n,...m(e,n),columns:p(t,e,[5,4,3,2],1)}}(c,{photos:e,...i});return(0,o.jsx)(y,{layout:"columns",ref:l,model:(0,s.useMemo)(()=>void 0!==c&&void 0!==d&&void 0!==u&&void 0!==h?E(e,d,u,c,h):void 0,[e,d,u,c,h]),...g})});function A(e,t,n,i,s){const o=(i-t*(s-1)-2*n*s)/s;if(o<=0)return s>1?A(e,t,n,i,s-1):void 0;const r=[];for(let l=0;l<s;l+=1)r[l]=0;const a=e.reduce((e,i,s)=>{const a=r.reduce((e,t,n)=>t<r[e]-1?n:e,0);return r[a]=r[a]+o/c(i)+t+2*n,e[a].push({photo:i,index:s}),e},Array.from({length:s},()=>[]));return{spacing:t,padding:n,containerWidth:i,variables:{columns:s},tracks:a.map(e=>({photos:e.map(({photo:e,index:t})=>({photo:e,index:t,width:o,height:o/c(e)}))}))}}var C=(0,s.forwardRef)(function({photos:e,breakpoints:t,defaultContainerWidth:n,...i},r){const{containerRef:l,containerWidth:c}=a(r,t,n),{spacing:d,padding:u,columns:h,...g}=function(e,{columns:t,...n}){return{...n,...m(e,n),columns:p(t,e,[5,4,3,2],1)}}(c,{photos:e,...i});return(0,o.jsx)(y,{layout:"masonry",ref:l,model:(0,s.useMemo)(()=>void 0!==c&&void 0!==d&&void 0!==u&&void 0!==h?A(e,d,u,c,h):void 0,[e,d,u,c,h]),...g})});function I(e){return e?String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):""}var L=class{constructor(e,t={}){this.lightbox=e,this.aiSummaryVisible=!1,this.currentSummary=null,this.options={aiSummaryButtonOrder:7,width:"400px",height:"300px",transition:"0.3s ease",...t},document.head.insertAdjacentHTML("beforeend",`<style>\n .pswp__ai-summary-panel {\n background: rgba(30, 30, 30, 0.9);\n color: white;\n position: absolute;\n overflow-y: auto;\n z-index: 1;\n transition: transform ${this.options.transition};\n box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);\n padding: 20px;\n }\n\n /* Desktop styles */\n @media (min-width: 768px) {\n .pswp__ai-summary-panel {\n top: 0;\n right: 0;\n height: 100%;\n width: ${this.options.width};\n transform: translateX(100%);\n }\n\n .pswp__ai-summary-panel.visible {\n transform: translateX(0);\n }\n\n .pswp__container.shifted-for-ai-summary {\n transform: translateX(-${this.options.width});\n transition: transform ${this.options.transition};\n }\n }\n\n /* Mobile styles */\n @media (max-width: 767px) {\n .pswp__ai-summary-panel {\n bottom: 0;\n left: 0;\n width: 100%;\n height: ${this.options.height};\n transform: translateY(100%);\n }\n\n .pswp__ai-summary-panel.visible {\n transform: translateY(0);\n }\n\n .pswp__container.shifted-for-ai-summary {\n transform: translateY(-${this.options.height});\n transition: transform ${this.options.transition};\n }\n }\n\n .pswp__ai-summary-close {\n position: absolute;\n top: 10px;\n right: 10px;\n width: 32px;\n height: 32px;\n opacity: 0.6;\n cursor: pointer;\n z-index: 2;\n background: rgba(0, 0, 0, 0.3);\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: opacity 0.3s;\n }\n\n .pswp__ai-summary-close:hover {\n opacity: 1;\n }\n\n .pswp__ai-summary-close:before,\n .pswp__ai-summary-close:after {\n position: absolute;\n content: '';\n width: 16px;\n height: 2px;\n background-color: white;\n }\n\n .pswp__ai-summary-close:before {\n transform: rotate(45deg);\n }\n\n .pswp__ai-summary-close:after {\n transform: rotate(-45deg);\n }\n\n .pswp__ai-summary-content {\n margin-top: 20px;\n }\n\n .pswp__ai-summary-title {\n margin-bottom: 16px;\n font-size: 18px;\n font-weight: bold;\n padding-right: 30px; /* Add space for the close button */\n }\n\n .pswp__ai-summary-section {\n margin-bottom: 16px;\n }\n\n .pswp__ai-summary-section-title {\n font-weight: bold;\n margin-bottom: 8px;\n }\n\n .pswp__ai-summary-label {\n display: inline-flex;\n align-items: center;\n background: rgba(255, 255, 255, 0.1);\n border-radius: 12px;\n padding: 4px 12px;\n margin-right: 8px;\n margin-bottom: 8px;\n font-size: 14px;\n }\n\n .pswp__ai-summary-description {\n font-size: 14px;\n line-height: 1.5;\n }\n\n .pswp__ai-summary-empty {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n color: rgba(255, 255, 255, 0.6);\n font-style: italic;\n }\n\n .pswp__ai-summary-bing-search {\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 8px;\n z-index: 2;\n }\n\n .pswp__ai-summary-bing-button {\n height: 32px;\n background: rgba(255, 255, 255, 0.2);\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n transition: background-color 0.3s;\n }\n\n .pswp__ai-summary-bing-button:hover {\n background: rgba(255, 255, 255, 0.4);\n }\n\n .pswp__ai-summary-bing-icon {\n width: 20px;\n height: 20px;\n }\n\n .pswp__ai-summary-disclaimer {\n font-size: 12px;\n color: rgba(255, 255, 255, 0.7);\n text-align: center;\n margin-top: 32px;\n padding: 0 10px;\n line-height: 1.4;\n font-style: italic;\n }\n </style>`),e.on("init",()=>{this.initPswpEvents(e.pswp)})}initPswpEvents(e){e.on("uiRegister",()=>{e.ui.registerElement({name:"ai-summary-toggle-button",title:"Toggle AI summary view",order:this.options.aiSummaryButtonOrder,isButton:!0,html:'<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 24 24">\n <use class="pswp__icn-shadow" xlink:href="#pswp__icn-ai-summary"/>\n <path d="M12 17q.425 0 .713-.288T13 16v-4q0-.425-.288-.712T12 11t-.712.288T11 12v4q0 .425.288.713T12 17m0-8q.425 0 .713-.288T13 8t-.288-.712T12 7t-.712.288T11 8t.288.713T12 9m0 13q-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 12t-.788 3.9t-2.137 3.175t-3.175 2.138T12 22m0-2q3.35 0 5.675-2.325T20 12t-2.325-5.675T12 4T6.325 6.325T4 12t2.325 5.675T12 20m0-8"/>\n </svg>',onClick:()=>{this.toggleAISummary(e)}}),e.ui.registerElement({name:"ai-summary-panel",isButton:!1,appendTo:"root",html:'<div class="pswp__ai-summary-panel"><div class="pswp__ai-summary-close"></div></div>'})}),e.on("change",()=>{this.aiSummaryVisible&&this.updateAISummary(e)}),e.on("close",()=>{this.hideAISummary(e)}),e.on("firstUpdate",()=>{const t=e.element.querySelector(".pswp__ai-summary-close");t&&t.addEventListener("click",()=>{this.hideAISummary(e)})})}toggleAISummary(e){this.aiSummaryVisible?this.hideAISummary(e):this.showAISummary(e)}showAISummary(e){const t=e.container,n=e.element.querySelector(".pswp__ai-summary-panel");n&&(this.aiSummaryVisible=!0,n.classList.add("visible"),t.classList.add("shifted-for-ai-summary"),this.updateAISummary(e))}hideAISummary(e){const t=e.container,n=e.element.querySelector(".pswp__ai-summary-panel");n&&(this.aiSummaryVisible=!1,n.classList.remove("visible"),t.classList.remove("shifted-for-ai-summary"))}updateAISummary(e){if(!e.currSlide)return;const t=e.element.querySelector(".pswp__ai-summary-panel");if(!t)return;const n=e.currSlide.data,i=n.src||n.url||"";let s=null;try{n.contentSummary&&(s=JSON.parse(n.contentSummary),this.currentSummary=s)}catch(r){console.error("Error parsing AI summary data:",r)}const o=i?`<a class="pswp__ai-summary-bing-search" href="https://www.bing.com/images/search?view=detailv2&iss=SBI&form=SBIIRP&sbisrc=UrlPaste&q=imgurl:${encodeURIComponent(i)}&idpbck=1&selectedindex=0&id=${encodeURIComponent(i)}&mediaurl=${encodeURIComponent(i)}" target="_blank" rel="noopener noreferrer" class="pswp__ai-summary-bing-button">\n <svg xmlns="http://www.w3.org/2000/svg" style="height:24px;width:24px" width="256" height="388" viewBox="0 0 256 388"><defs><radialGradient id="logosBing0" cx="93.717%" cy="77.818%" r="143.121%" fx="93.717%" fy="77.818%" gradientTransform="scale(-1 -.71954)rotate(49.091 2.036 -2.204)"><stop offset="0%" stop-color="#00cacc"/><stop offset="100%" stop-color="#048fce"/></radialGradient><radialGradient id="logosBing1" cx="13.893%" cy="71.448%" r="150.086%" fx="13.893%" fy="71.448%" gradientTransform="matrix(.55155 -.39387 .23634 .91917 -.107 .112)"><stop offset="0%" stop-color="#00bbec"/><stop offset="100%" stop-color="#2756a9"/></radialGradient><linearGradient id="logosBing2" x1="50%" x2="50%" y1="0%" y2="100%"><stop offset="0%" stop-color="#00bbec"/><stop offset="100%" stop-color="#2756a9"/></linearGradient></defs><path fill="url(#logosBing0)" d="M129.424 122.047c-7.133.829-12.573 6.622-13.079 13.928c-.218 3.147-.15 3.36 6.986 21.722c16.233 41.774 20.166 51.828 20.827 53.243c1.603 3.427 3.856 6.65 6.672 9.544c2.16 2.22 3.585 3.414 5.994 5.024c4.236 2.829 6.337 3.61 22.818 8.49c16.053 4.754 24.824 7.913 32.381 11.664c9.791 4.86 16.623 10.387 20.944 16.946c3.1 4.706 5.846 13.145 7.04 21.64c.468 3.321.47 10.661.006 13.663c-1.008 6.516-3.021 11.976-6.101 16.545c-1.638 2.43-1.068 2.023 1.313-.939c6.74-8.379 13.605-22.7 17.108-35.687c4.24-15.718 4.817-32.596 1.66-48.57c-6.147-31.108-25.786-57.955-53.444-73.06c-1.738-.95-8.357-4.42-17.331-9.085a1633 1633 0 0 1-4.127-2.154c-.907-.477-2.764-1.447-4.126-2.154c-1.362-.708-5.282-2.75-8.711-4.539l-8.528-4.446a6021 6021 0 0 1-8.344-4.357c-8.893-4.655-12.657-6.537-13.73-6.863c-1.125-.343-3.984-.782-4.701-.723c-.152.012-.838.088-1.527.168"/><path fill="url(#logosBing1)" d="M148.81 277.994c-.493.292-1.184.714-1.537.938c-.354.225-1.137.712-1.743 1.083a8315 8315 0 0 0-13.204 8.137a2848 2848 0 0 0-8.07 4.997a388 388 0 0 1-3.576 2.198c-.454.271-2.393 1.465-4.31 2.654a2652 2652 0 0 1-7.427 4.586a3958 3958 0 0 0-8.62 5.316a3011 3011 0 0 1-7.518 4.637c-1.564.959-3.008 1.885-3.21 2.058c-.3.257-14.205 8.87-21.182 13.121c-5.3 3.228-11.43 5.387-17.705 6.235c-2.921.395-8.45.396-11.363.003c-7.9-1.067-15.176-4.013-21.409-8.666c-2.444-1.826-7.047-6.425-8.806-8.8c-4.147-5.598-6.829-11.602-8.218-18.396c-.32-1.564-.622-2.884-.672-2.935c-.13-.13.105 2.231.528 5.319c.44 3.211 1.377 7.856 2.387 11.829c7.814 30.743 30.05 55.749 60.15 67.646c8.668 3.424 17.415 5.582 26.932 6.64c3.576.4 13.699.56 17.43.276c17.117-1.296 32.02-6.334 47.308-15.996c1.362-.86 3.92-2.474 5.685-3.585a877 877 0 0 0 4.952-3.14c.958-.615 2.114-1.341 2.567-1.614a91 91 0 0 0 2.018-1.268c.656-.424 3.461-2.2 6.235-3.944l11.092-7.006l3.809-2.406l.137-.086l.42-.265l.199-.126l2.804-1.771l9.69-6.121c12.348-7.759 16.03-10.483 21.766-16.102c2.392-2.342 5.997-6.34 6.176-6.848c.037-.104.678-1.092 1.424-2.197c3.036-4.492 5.06-9.995 6.064-16.484c.465-3.002.462-10.342-.005-13.663c-.903-6.42-2.955-13.702-5.167-18.339c-3.627-7.603-11.353-14.512-22.453-20.076c-3.065-1.537-6.23-2.943-6.583-2.924c-.168.009-10.497 6.322-22.954 14.03c-12.457 7.71-23.268 14.4-24.025 14.87s-2.056 1.263-2.888 1.764z"/><path fill="url(#logosBing2)" d="m.053 241.013l.054 53.689l.695 3.118c2.172 9.747 5.937 16.775 12.482 23.302c3.078 3.07 5.432 4.922 8.768 6.896c7.06 4.177 14.657 6.238 22.978 6.235c8.716-.005 16.256-2.179 24.025-6.928c1.311-.801 6.449-3.964 11.416-7.029l9.032-5.572v-127.4l-.002-58.273c-.002-37.177-.07-59.256-.188-60.988c-.74-10.885-5.293-20.892-12.948-28.461c-2.349-2.323-4.356-3.875-10.336-7.99a25160 25160 0 0 1-12.104-8.336L28.617 5.835C22.838 1.85 22.386 1.574 20.639.949C18.367.136 15.959-.163 13.67.084C6.998.804 1.657 5.622.269 12.171C.053 13.191.013 26.751.01 100.35l-.003 86.975H0z"/></svg>\n <span>Search on Bing</span>\n </a>\n <div class="pswp__ai-summary-disclaimer">\n These are AI generated summaries based on the content. Please verify the information before using it.\n </div>`:"";if(s){t.innerHTML=`<div class="pswp__ai-summary-close"></div>${this.renderAISummary(s)}${o}`;const n=t.querySelector(".pswp__ai-summary-close");n&&n.addEventListener("click",()=>{this.hideAISummary(e)})}else{t.innerHTML=`<div class="pswp__ai-summary-close"></div><div class="pswp__ai-summary-empty">No AI summary available for this content</div>${o}`;const n=t.querySelector(".pswp__ai-summary-close");n&&n.addEventListener("click",()=>{this.hideAISummary(e)})}}renderAISummary(e){let t='<div class="pswp__ai-summary-content">';return e.subject&&(t+=`<div class="pswp__ai-summary-title">${I(e.subject)}</div>`),e.labels&&Object.entries(e.labels).filter(([e,t])=>Array.isArray(t)&&t.length>0).forEach(([e,n])=>{t+=`\n <div class="pswp__ai-summary-section">\n <div class="pswp__ai-summary-section-title">${I(e.replace("_"," ").replace(/\b\w/g,e=>e.toUpperCase()))}</div>\n <div class="pswp__ai-summary-labels space-y-2">\n ${n.map(e=>`<span class="pswp__ai-summary-label">${I(e)}</span>`).join("")}\n </div>\n </div>\n `}),e.description&&(t+=`\n <div class="pswp__ai-summary-section">\n <div class="pswp__ai-summary-description">${I(e.description)}</div>\n </div>\n `),t+="</div>",t}},N='url("https://res.cloudinary.com/dectzk2b2/image/upload/v1736933014/black_rpie3v.png")',M=class{constructor(e){this.backdropOn=!1,this.lightbox=e,this.backgroundElement=null,this.backgroundVideoElement=null,this.referenceVideoElement=null,this.options={toggleBackdropButtonOrder:7},e.on("init",()=>{this.initPswpEvents(e.pswp)})}initPswpEvents(e){e.on("afterInit",()=>{setTimeout(()=>{this.backgroundElement.style.display="block",this.backgroundVideoElement.style.display="block"},[500])}),e.on("uiRegister",()=>{e.ui.registerElement({name:"toggle-backdrop-button",title:"Toggle blur backdrop",order:this.options.toggleBackdropButtonOrder,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-backdrop"/><use class="pswp__icn-shadow" xlink:href="#pswp__icn-hide-backdrop"/><path id="pswp__icn-show-backdrop" style="display:none" d="M3 14.5q-.2 0-.35-.15T2.5 14t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m0-4q-.2 0-.35-.15T2.5 10t.15-.35T3 9.5t.35.15t.15.35t-.15.35t-.35.15M6 19q-.425 0-.712-.288T5 18t.288-.712T6 17t.713.288T7 18t-.288.713T6 19m0-4q-.425 0-.712-.288T5 14t.288-.712T6 13t.713.288T7 14t-.288.713T6 15m0-4q-.425 0-.712-.288T5 10t.288-.712T6 9t.713.288T7 10t-.288.713T6 11m0-4q-.425 0-.712-.288T5 6t.288-.712T6 5t.713.288T7 6t-.288.713T6 7m4 8.5q-.625 0-1.062-.437T8.5 14t.438-1.062T10 12.5t1.063.438T11.5 14t-.437 1.063T10 15.5m0-4q-.625 0-1.062-.437T8.5 10t.438-1.062T10 8.5t1.063.438T11.5 10t-.437 1.063T10 11.5m0 7.5q-.425 0-.712-.288T9 18t.288-.712T10 17t.713.288T11 18t-.288.713T10 19m0-12q-.425 0-.712-.288T9 6t.288-.712T10 5t.713.288T11 6t-.288.713T10 7m0 14.5q-.2 0-.35-.15T9.5 21t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m0-18q-.2 0-.35-.15T9.5 3t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m4 12q-.625 0-1.062-.437T12.5 14t.438-1.062T14 12.5t1.063.438T15.5 14t-.437 1.063T14 15.5m0-4q-.625 0-1.062-.437T12.5 10t.438-1.062T14 8.5t1.063.438T15.5 10t-.437 1.063T14 11.5m0 7.5q-.425 0-.712-.288T13 18t.288-.712T14 17t.713.288T15 18t-.288.713T14 19m0-12q-.425 0-.712-.288T13 6t.288-.712T14 5t.713.288T15 6t-.288.713T14 7m0 14.5q-.2 0-.35-.15T13.5 21t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m0-18q-.2 0-.35-.15T13.5 3t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15M18 19q-.425 0-.712-.288T17 18t.288-.712T18 17t.713.288T19 18t-.288.713T18 19m0-4q-.425 0-.712-.288T17 14t.288-.712T18 13t.713.288T19 14t-.288.713T18 15m0-4q-.425 0-.712-.288T17 10t.288-.712T18 9t.713.288T19 10t-.288.713T18 11m0-4q-.425 0-.712-.288T17 6t.288-.712T18 5t.713.288T19 6t-.288.713T18 7m3 7.5q-.2 0-.35-.15T20.5 14t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m0-4q-.2 0-.35-.15T20.5 10t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15"/><path id="pswp__icn-hide-backdrop" d="m19.1 21.9l-17-17q-.275-.275-.275-.7t.275-.7t.7-.275t.7.275l17 17q.275.275.275.7t-.275.7t-.7.275t-.7-.275m-9.1-.4q-.2 0-.35-.15T9.5 21t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m4 0q-.2 0-.35-.15T13.5 21t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15M6 19q-.425 0-.712-.288T5 18t.288-.712T6 17t.713.288T7 18t-.288.713T6 19m4 0q-.425 0-.712-.288T9 18t.288-.712T10 17t.713.288T11 18t-.288.713T10 19m4 0q-.425 0-.712-.288T13 18t.288-.712T14 17t.713.288T15 18t-.288.713T14 19m-4-3.5q-.65 0-1.075-.425T8.5 14t.425-1.075T10 12.5t1.075.425T11.5 14t-.425 1.075T10 15.5M6 15q-.425 0-.712-.288T5 14t.288-.712T6 13t.713.288T7 14t-.288.713T6 15m11.8-.025l-.775-.775q-.1-.5.213-.85T18 13q.425 0 .713.288T19 14q0 .45-.35.763t-.85.212M3 14.5q-.2 0-.35-.15T2.5 14t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m18 0q-.2 0-.35-.15T20.5 14t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m-6.7-3.05L12.55 9.7q.125-.525.5-.862T14 8.5q.65 0 1.075.425T15.5 10q0 .575-.35.963t-.85.487M6 11q-.425 0-.712-.287T5 10t.288-.712T6 9t.713.288T7 10t-.288.713T6 11m12 0q-.425 0-.712-.288T17 10t.288-.712T18 9t.713.288T19 10t-.288.713T18 11m-15-.5q-.2 0-.35-.15T2.5 10t.15-.35T3 9.5t.35.15t.15.35t-.15.35t-.35.15m18 0q-.2 0-.35-.15T20.5 10t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15M14 7q-.425 0-.712-.288T13 6t.288-.712T14 5t.713.288T15 6t-.288.713T14 7m-4.175-.025l-.8-.8q-.075-.5.225-.837T10 5q.425 0 .712.287T11 6q0 .45-.337.75t-.838.225M18 7q-.425 0-.712-.288T17 6t.288-.712T18 5t.713.288T19 6t-.288.713T18 7m-8-3.5q-.2 0-.35-.15T9.5 3t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m4 0q-.2 0-.35-.15T13.5 3t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15" /></svg>',onClick:()=>{this.toggleBackdrop(e)}}),this.createBlurBackground(e)}),e.on("change",()=>{this.backdropOn&&this.updateBlurBackground(e)}),e.on("close",()=>{this.removeBlurBackground(),this.backdropOn=!1})}createBlurBackground(e){const t=e.element;if(!this.backgroundElement){const e=document.createElement("div");e.style.position="fixed",e.style.top=0,e.style.left=0,e.style.width="100vw",e.style.height="100vh",e.style.backgroundSize="cover",e.style.backgroundPosition="center",e.style.filter="blur(44px)",e.style.zIndex=-1,e.style.transition="background-image 0.5s ease, opacity 0.5s ease",e.style.display="none",e.style.backgroundImage=N,t.append(e),this.backgroundElement=e}if(!this.backgroundVideoElement){const e=document.createElement("video");e.style.position="fixed",e.style.top=0,e.style.left=0,e.style.width="100vw",e.style.height="100vh",e.style.objectFit="cover",e.style.filter="blur(44px)",e.style.zIndex=-1,e.style.display="none",e.style.transition="opacity 0.5s ease",e.muted=!0,e.loop=!0,e.autoplay=!1,e.muted=!0,e.volume=0,t.append(e),this.backgroundVideoElement=e}}toggleBackdrop(e){this.backdropOn?(this.backgroundElement.style.backgroundImage=N,this.backgroundVideoElement.style.opacity=0,this.backgroundVideoElement.pause(),this.backdropOn=!1):(this.updateBlurBackground(e),this.backdropOn=!0),document.querySelector("#pswp__icn-hide-backdrop").style.display=this.backdropOn?"none":"inline",document.querySelector("#pswp__icn-show-backdrop").style.display=this.backdropOn?"inline":"none"}updateBlurBackground(e){const t=e.currSlide;if(t?.data)if("video"===t.data.type){const e=this.backgroundVideoElement,n=t.content.element;"video"===n?.tagName?.toLowerCase()&&(this.referenceVideoElement=n,this.registerVideoEvents(n,e)),e.style.opacity=0,setTimeout(()=>{e.src=t.data.src,e.load(),this.initBackgroundVideo(),e.style.opacity=1},500),this.backgroundElement&&(this.backgroundElement.style.opacity=0)}else{if(this.backgroundElement){const e=t.data.blurhash||"LEHV6nWB2yk8pyo0adR*.7kCMdnj";if(e){const t=this.createBlurhashCanvas(e,200,200);t.startsWith("data:")?this.backgroundElement.style.backgroundImage=`url('${t}')`:(this.backgroundElement.style.backgroundImage="none",this.backgroundElement.style.backgroundColor=t)}else this.backgroundElement.style.backgroundImage=`url('${t.data.thumbnailUrl}')`;this.backgroundElement.style.opacity=1}this.backgroundVideoElement&&(this.backgroundVideoElement.style.opacity=0,this.backgroundVideoElement.src="")}}initBackgroundVideo(){this.referenceVideoElement&&(this.backgroundVideoElement.currentTime=this.referenceVideoElement.currentTime,this.referenceVideoElement.currentTime>0&&!this.referenceVideoElement.paused&&!this.referenceVideoElement.ended&&this.referenceVideoElement.readyState>2&&this.backgroundVideoElement.play())}removeBlurBackground(){this.backgroundElement&&(this.backgroundElement.remove(),this.backgroundVideoElement.remove(),this.backgroundElement=null,this.backgroundVideoElement=null)}createBlurhashCanvas(e,t=100,i=100){const s=document.createElement("canvas");s.width=t,s.height=i;try{const o=s.getContext("2d"),r=n.j(e,t,i);if(r&&r.length>0){const e=o.createImageData(t,i);return e.data.set(r),o.putImageData(e,0,0),s.toDataURL()}throw new Error("Empty pixels array")}catch(o){return console.warn("Failed to decode blurhash for backdrop:",o),this.blurhashToColor(e)}}blurhashToColor(e){const t=["#8B9DC3","#DFB2A3","#C4B5A0","#A8B8C8","#B8A898"];return t[e.charCodeAt(0)%t.length]}registerVideoEvents(e,t){this.foregroundVideoElement=e,e.addEventListener("play",()=>{t.currentTime=e.currentTime,t.play()}),e.addEventListener("pause",()=>{t.pause()}),e.addEventListener("ended",()=>{t.pause(),t.currentTime=0})}};function R(e){return e?String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):""}var P={[e.AD_TARGET_TYPES.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>',[e.AD_TARGET_TYPES.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>',[e.AD_TARGET_TYPES.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>',[e.AD_TARGET_TYPES.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>',[e.AD_TARGET_TYPES.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>',[e.AD_TARGET_TYPES.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>'},O=class{constructor(e,t,n){this.lightbox=e,this.captureAdImpression=t,this.captureAdClick=n,this.captionOn=!0,this.options={captionButtonOrder:8},e.on("init",()=>{this.initPswpEvents(e.pswp)})}initPswpEvents(e){e.on("uiRegister",()=>{e.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(e)}}),e.ui.registerElement({name:"custom-caption",isButton:!1,appendTo:"root",html:'<div id="pswp-caption-container" class=" absolute bottom-0 w-full"></div>'})}),e.on("change",()=>{this.captionOn&&this.updateCaption(e)}),e.on("close",()=>{this.clearCaption()})}toggleCaption(e){this.captionOn?this.clearCaption():this.updateCaption(e),this.captionOn=!this.captionOn,document.querySelector("#pswp__icn-show-caption").style.display=this.captionOn?"inline":"none",document.querySelector("#pswp__icn-hide-caption").style.display=this.captionOn?"none":"inline"}createCaptionHTML(t){const{id:n,type:i,caption:s,title:o,description:r,targetType:a,targetText:l,targetUrl:c}=t||{};switch("ad"===i&&this.captureAdImpression&&this.captureAdImpression(n),i){case"image":case"video":return s?.length>0?`\n <div class=" w-full bg-black bg-opacity-50 p-4 text-gray-300">\n <h3 class=" text-center sm:text-lg">${R(s)}</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">${R(o)}</h3>\n <h4 class=" pb-2 text-center text-sm sm:text-base">${R(r)}</h4>\n <button\n class=" flex w-full items-center justify-center gap-3 rounded-md bg-white py-1 text-lg text-black caption-action-button"\n data-id="${R(n)}"\n data-target-type="${R(a||e.AD_TARGET_TYPES.LINK)}"\n data-target-url="${R(c)}">\n ${P[a||e.AD_TARGET_TYPES.LINK]}\n ${R(l)}\n </button>\n </div>\n </div>\n `;default:return""}}updateCaption(e){try{const t=document.getElementById("pswp-caption-container");if(!t)return;const n=e.currSlide?.data;t.innerHTML=this.createCaptionHTML(n);const i=t.querySelector(". caption-action-button");i&&i.addEventListener("click",e=>{const t=e.currentTarget.dataset.id,n=e.currentTarget.dataset.targetType,i=e.currentTarget.dataset.targetUrl;this.captureAdClick&&t&&this.captureAdClick(t,n,i)})}catch(t){console.error("Error rendering caption:",t)}}clearCaption(){const e=document.getElementById("pswp-caption-container");e&&(e.innerHTML="")}},B=class{constructor(e){this.lightbox=e,this.fullscreen=!1,this.options={fullScreenButtonOrder:7},e.on("init",()=>{this.initPswpEvents(e.pswp)})}initPswpEvents(e){e.on("uiRegister",()=>{(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)&&e.ui.registerElement({name:"fullscreen-button",title:"Toggle fullscreen view",order:this.options.fullScreenButtonOrder,isButton:!0,html:'<svg aria-hidden="true" class="pswp__icn p-1" viewBox="0 0 24 24"><use class="pswp__icn-shadow" xlink:href="#pswp__icn-fullscreen"/><use class="pswp__icn-shadow" xlink:href="#pswp__icn-exit-fullscreen"/><path id="pswp__icn-fullscreen" d="M5 19h2q.425 0 .713.288T8 20t-.288.713T7 21H4q-.425 0-.712-.288T3 20v-3q0-.425.288-.712T4 16t.713.288T5 17zm14 0v-2q0-.425.288-.712T20 16t.713.288T21 17v3q0 .425-.288.713T20 21h-3q-.425 0-.712-.288T16 20t.288-.712T17 19zM5 5v2q0 .425-.288.713T4 8t-.712-.288T3 7V4q0-.425.288-.712T4 3h3q.425 0 .713.288T8 4t-.288.713T7 5zm14 0h-2q-.425 0-.712-.288T16 4t.288-.712T17 3h3q.425 0 .713.288T21 4v3q0 .425-.288.713T20 8t-.712-.288T19 7z"/><path id="pswp__icn-exit-fullscreen" style="display:none" d="M6 18H4q-.425 0-.712-.288T3 17t.288-.712T4 16h3q.425 0 .713.288T8 17v3q0 .425-.288.713T7 21t-.712-.288T6 20zm12 0v2q0 .425-.288.713T17 21t-.712-.288T16 20v-3q0-.425.288-.712T17 16h3q.425 0 .713.288T21 17t-.288.713T20 18zM6 6V4q0-.425.288-.712T7 3t.713.288T8 4v3q0 .425-.288.713T7 8H4q-.425 0-.712-.288T3 7t.288-.712T4 6zm12 0h2q.425 0 .713.288T21 7t-.288.713T20 8h-3q-.425 0-.712-.288T16 7V4q0-.425.288-.712T17 3t.713.288T18 4z"/></svg>',onClick:()=>{this.toggleFullscreen(e)}})})}toggleFullscreen(e){const t=e.element;this.fullscreen?(document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen(),e.options.showHideAnimationType="zoom",this.fullscreen=!1):(t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen&&t.msRequestFullscreen(),e.options.showHideAnimationType="fade",this.fullscreen=!0),document.querySelector("#pswp__icn-exit-fullscreen").style.display=this.fullscreen?"inline":"none",document.querySelector("#pswp__icn-fullscreen").style.display=this.fullscreen?"none":"inline"}},D=class{constructor(e,t={}){this.lightbox=e,this.autoHideTimer=null,this.uiVisible=!0,this.options=Object.assign({defaultDelayMs:4e3,playPauseButtonOrder:9,progressBarPosition:"top",progressBarTransition:"ease",restartOnSlideChange:!0,autoHideProgressBar:!0},t),this.setSlideshowLength(Number(localStorage.getItem("pswp_delay"))||this.options.defaultDelayMs),document.head.insertAdjacentHTML("beforeend",`<style>.pswp__progress-bar{position:fixed;${this.options.progressBarPosition}:0;width:0;height:0}.pswp__progress-bar.running{width:100%;height:2px;transition-property:width;background:#ff4800}</style>`),this.slideshowIsRunning=!1,this.slideshowTimerID=null,this.wakeLockIsRunning=!1,this.wakeLockSentinel=null,this.lightbox.on("init",()=>{this.init(this.lightbox.pswp)})}init(e){e.on("uiRegister",()=>{e.ui.registerElement({name:"playpause-button",title:"Toggle slideshow (Space)\nChange delay with +/- while running",order:this.options.playPauseButtonOrder,isButton:!0,html:'<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 24 24"><use class="pswp__icn-shadow" xlink:href="#pswp__icn-play"/><use class="pswp__icn-shadow" xlink:href="#pswp__icn-stop"/><path id="pswp__icn-play" d="M8 17.175V6.825q0-.425.3-.713t.7-.287q.125 0 .263.037t.262.113l8.15 5.175q.225.15.338.375t.112.475t-.112.475t-.338.375l-8.15 5.175q-.125.075-.262.113T9 18.175q-.4 0-.7-.288t-.3-.712"/><path id="pswp__icn-stop" style="display:none" d="M16 19q-.825 0-1.412-.587T14 17V7q0-.825.588-1.412T16 5t1.413.588T18 7v10q0 .825-.587 1.413T16 19m-8 0q-.825 0-1.412-.587T6 17V7q0-.825.588-1.412T8 5t1.413.588T10 7v10q0 .825-.587 1.413T8 19"/></svg>',onClick:()=>{this.setSlideshowState()}}),e.ui.registerElement({name:"playtime",appendTo:"wrapper",tagName:"div",className:"pswp__progress-bar"}),e.events.add(document,"keydown",e=>{switch(e.code){case"Space":this.setSlideshowState(),e.preventDefault();break;case"ArrowUp":case"NumpadAdd":case"Equal":this.changeSlideshowLength(1e3),e.preventDefault();break;case"ArrowDown":case"NumpadSubtract":case"Minus":this.changeSlideshowLength(-1e3),e.preventDefault()}})}),this.lightbox.on("change",()=>{this.slideshowIsRunning&&this.options.restartOnSlideChange&&this.goToNextSlideAfterTimeout()}),this.lightbox.on("close",()=>{this.slideshowIsRunning&&this.setSlideshowState()})}showUI(){this.lightbox&&this.lightbox.pswp&&this.lightbox.pswp.element&&this.lightbox.pswp.element.classList.add("pswp--ui-visible"),this.uiVisible=!0}stopAutoHideTimer(){this.autoHideTimer&&(clearTimeout(this.autoHideTimer),this.autoHideTimer=null)}hideUI(){this.lightbox&&this.lightbox.pswp&&this.lightbox.pswp.element&&this.lightbox.pswp.element.classList.remove("pswp--ui-visible"),this.uiVisible=!1}resetAutoHideTimer(){this.autoHideTimer&&clearTimeout(this.autoHideTimer),this.autoHideTimer=setTimeout(()=>{this.slideshowIsRunning&&this.hideUI(),this.autoHideTimer=null},[3e3])}setSlideshowState(){this.slideshowIsRunning=!this.slideshowIsRunning,this.slideshowIsRunning?(this.goToNextSlideAfterTimeout(),this.showUI(),this.resetAutoHideTimer(),document.addEventListener("touchstart",()=>{this.stopAutoHideTimer(),this.showUI()}),document.addEventListener("touchend",()=>{this.resetAutoHideTimer()}),document.addEventListener("mousemove",()=>{this.uiVisible||this.showUI(),this.resetAutoHideTimer()})):(this.showUI(),this.resetSlideshow(),this.stopAutoHideTimer()),document.querySelector("#pswp__icn-stop").style.display=this.slideshowIsRunning?"inline":"none",document.querySelector("#pswp__icn-play").style.display=this.slideshowIsRunning?"none":"inline",document.querySelector(".pswp__progress-bar").style.opacity=this.options.autoHideProgressBar?null:1,this.toggleWakeLock()}setSlideshowLength(e){this.options.defaultDelayMs=Math.min(Math.max(e,1e3),2147483647),this.options.defaultDelayMs!=e&&localStorage.setItem("pswp_delay",this.options.defaultDelayMs)}changeSlideshowLength(e){if(!this.slideshowIsRunning)return;this.setSlideshowLength(this.options.defaultDelayMs+e),localStorage.setItem("pswp_delay",this.options.defaultDelayMs);const t=document.querySelector(".pswp__counter");t&&(t.innerHTML=this.options.defaultDelayMs/1e3+"s"),this.goToNextSlideAfterTimeout()}isVideoContent(e){return"video"===e?.data?.type}getSlideTimeout(){const e=this.lightbox.pswp.currSlide.content;if(this.isVideoContent(e)){const t=e.element;if(t.paused)return this.options.defaultDelayMs;const n=t.duration,i=t.currentTime;return isNaN(n)||isNaN(i)?this.options.defaultDelayMs:1e3*(n-i)}return this.options.defaultDelayMs}slideContentHasLoaded(){const e=this.lightbox.pswp.currSlide.content;if(this.isVideoContent(e)){const t=e.element;return t.ended||t.readyState===HTMLMediaElement.HAVE_ENOUGH_DATA&&[HTMLMediaElement.NETWORK_IDLE,HTMLMediaElement.NETWORK_LOADING].includes(t.networkState)}return!e.isLoading()}goToNextSlideAfterTimeout(){if(this.resetSlideshow(),this.slideContentHasLoaded()){const e=this.getSlideTimeout();this.slideshowTimerID=setTimeout(()=>{this.lightbox.pswp.next(),this.options.restartOnSlideChange||this.goToNextSlideAfterTimeout()},e),setTimeout(()=>{this.slideshowIsRunning&&this.toggleProgressBar(e)},100)}else this.slideshowTimerID=setTimeout(()=>{this.goToNextSlideAfterTimeout()},200)}getSlideTransition(){return this.isVideoContent(this.lightbox.pswp.currSlide.content)?"linear":this.options.progressBarTransition}toggleProgressBar(e){const t=document.querySelector(".pswp__progress-bar");e?(t.style.transitionTimingFunction=this.getSlideTransition(),t.style.transitionDuration=`${e}ms`,t.classList.add("running")):t.classList.remove("running")}toggleWakeLock(){this.wakeLockIsRunning!=this.slideshowIsRunning&&("keepAwake"in screen?screen.keepAwake=this.slideshowIsRunning:"wakeLock"in navigator&&(this.wakeLockSentinel?this.wakeLockSentinel.release().then(()=>(this.wakeLockSentinel=null,!0)).catch(e=>console.error(e)):navigator.wakeLock.request("screen").then(e=>(this.wakeLockSentinel=e,this.wakeLockSentinel.addEventListener("release",()=>{this.wakeLockSentinel=null,this.wakeLockIsRunning=!1}),!0)).catch(e=>{})),this.wakeLockIsRunning=this.slideshowIsRunning)}resetSlideshow(){this.toggleProgressBar(),this.slideshowTimerID&&(clearTimeout(this.slideshowTimerID),this.slideshowTimerID=null)}},V={videoAttributes:{controls:"",playsinline:"",muted:"",preload:"auto"},autoplay:!0,preventDragOffset:40};function z(e){return e&&e.data&&"video"===e.data.type}var $=class{constructor(e,t){this.options=t,this.initLightboxEvents(e),e.on("init",()=>{this.initPswpEvents(e.pswp)})}initLightboxEvents(e){e.on("contentLoad",this.onContentLoad.bind(this)),e.on("contentDestroy",this.onContentDestroy.bind(this)),e.on("contentActivate",this.onContentActivate.bind(this)),e.on("contentDeactivate",this.onContentDeactivate.bind(this)),e.on("contentAppend",this.onContentAppend.bind(this)),e.on("contentResize",this.onContentResize.bind(this)),e.addFilter("isKeepingPlaceholder",this.isKeepingPlaceholder.bind(this)),e.addFilter("isContentZoomable",this.isContentZoomable.bind(this)),e.addFilter("useContentPlaceholder",this.useContentPlaceholder.bind(this)),e.addFilter("domItemData",(e,t,n)=>("video"===e.type&&n&&(n.dataset.pswpVideoSources?e.videoSources=JSON.parse(n.dataset.pswpVideoSources):n.dataset.pswpVideoSrc?e.videoSrc=n.dataset.pswpVideoSrc:e.videoSrc=n.href),e))}initPswpEvents(e){e.on("pointerDown",t=>{const n=e.currSlide;if(z(n)&&this.options.preventDragOffset){const i=t.originalEvent;if("pointerdown"===i.type){const s=Math.ceil(n.height*n.currZoomLevel)+n.bounds.center.y,o=i.pageY-e.offset.y;o>s-this.options.preventDragOffset&&o<s&&t.preventDefault()}}}),e.on("appendHeavy",e=>{z(e.slide)&&!e.slide.isActive&&e.preventDefault()}),e.on("close",()=>{z(e.currSlide.content)&&this.pauseVideo(e.currSlide.content)})}onContentDestroy({content:e}){z(e)&&e._videoPosterImg&&(e._videoPosterImg.onload=e._videoPosterImg.onerror=null,e._videoPosterImg=null)}onContentResize(e){if(z(e.content)){e.preventDefault();const t=e.width,n=e.height,i=e.content;if(i.element&&(i.element.style.width=`${t}px`,i.element.style.height=`${n}px`),i.slide&&i.slide.placeholder){const e=i.slide.placeholder.element.style;e.transform="none",e.width=`${t}px`,e.height=`${n}px`}}}isKeepingPlaceholder(e,t){return!z(t)&&e}isContentZoomable(e,t){return!z(t)&&e}onContentActivate({content:e}){z(e)&&this.options.autoplay&&this.playVideo(e)}onContentDeactivate({content:e}){z(e)&&this.pauseVideo(e)}onContentAppend(e){z(e.content)&&(e.preventDefault(),e.content.isAttached=!0,e.content.appendImage())}onContentLoad(e){const t=e.content;if(z(e.content)&&(e.preventDefault(),!t.element)){if(t.state="loading",t.type="video",t.element=document.createElement("video"),this.options.videoAttributes)for(let e in this.options.videoAttributes)t.element.setAttribute(e,this.options.videoAttributes[e]||"");t.element.setAttribute("poster",t.data.msrc),this.preloadVideoPoster(t,t.data.msrc),t.element.style.position="relative",t.element.style.left=0,t.element.style.top=0,t.data.videoSources?t.data.videoSources.forEach(e=>{let n=document.createElement("source");n.src=e.src,n.type=e.type,t.element.appendChild(n)}):t.data.videoSrc&&(t.element.src=t.data.videoSrc)}}preloadVideoPoster(e,t){!e._videoPosterImg&&t&&(e._videoPosterImg=new Image,e._videoPosterImg.src=t,e._videoPosterImg.complete?e.onLoaded():e._videoPosterImg.onload=e._videoPosterImg.onerror=()=>{e.onLoaded()})}playVideo(e){e.element&&e.element.play()}pauseVideo(e){e.element&&e.element.pause()}useContentPlaceholder(e,t){return!!z(t)||e}},H=class{constructor(e,t={}){new $(e,{...V,...t})}},U=({open:t,ad:n,onClose:s,captureAdClick:o})=>e.u(i.Dialog,{open:Boolean(t&&n),onOpenChange:e=>!e&&s?.(),children:e.u(i.DialogContent,{children:[e.u(i.DialogHeader,{className:"hidden",children:[e.u(i.DialogTitle,{children:n?.title}),e.u(i.DialogDescription,{children:n?.description})]}),e.u("div",{className:"flex max-w-lg flex-col overflow-hidden",children:[e.u("img",{className:"h-auto max-h-96 w-full object-contain",src:n?.imageUrl,alt:"Image not found"}),e.u("div",{className:"flex flex-col gap-2 p-3",children:[e.u(i.Typography,{variant:"h4",align:"center",lines:2,children:n?.title}),e.u(i.Typography,{variant:"body3",color:"secondary",align:"center",lines:6,children:n?.description})]}),e.u(i.Button,{fullWidth:!0,className:"rounded-t-none",onClick:()=>o?.(n?._id,n?.targetType??e.AD_TARGET_TYPES.LINK,n?.targetUrl),icon:e.AD_TARGET_TYPE_ICONS[n?.targetType]??e.AD_TARGET_TYPE_ICONS[e.AD_TARGET_TYPES.LINK],children:n?.targetText})]})]})}),j=({url:t,alt:i="",thumbnailUrl:s,blurhash:o,pswpData:r={},curateLink:a,onClick:l})=>{const c=e.u(e.k,{children:[e.u(n.LazyLoadImage,{threshold:.1,src:s||t,blurhash:o,alt:i}),r.type===e.CONTENT_TYPES.VIDEO&&e.u("div",{className:"absolute inset-0 top-0 left-0 flex items-center justify-center opacity-75",children:e.u("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-16 text-white lg:w-24",viewBox:"0 0 24 24",children:e.u("path",{fill:"currentColor",d:"M8 17.175V6.825q0-.425.3-.713t.7-.287q.125 0 .263.037t.262.113l8.15 5.175q.225.15.338.375t.112.475t-.112.475t-.338.375l-8.15 5.175q-.125.075-.262.113T9 18.175q-.4 0-.7-.288t-.3-.712"})})})]});return l?e.u("button",{className:"h-full w-full",onClick:l,children:c}):a?e.u(n.Link,{to:a,className:"h-full w-full",children:c}):e.u("a",{href:t,className:"pswp-item block h-full w-full",...Object.keys(r).reduce((e,t)=>{var n;return e[`data-pswp-${n=t,n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}`]=String(r[t]),e},{}),target:"_blank",rel:"noreferrer",children:c})},F=({style:t,content:s,curateLink:o,onAdClick:r})=>{const{captureAdImpression:a,captureAdEngagement:l,captureAdClick:c}=i.useAnalytics();return e.u("div",{style:t,className:"group relative mb-1 overflow-hidden rounded",children:[e.u(n.InView,{className:"size-full",threshold:.8,triggerOnce:!0,onChange:e=>{e&&a(s._id)},onClick:()=>l(s._id),children:e.u(j,{url:s.src,thumbnailUrl:s.src,blurhash:s.blurhash,alt:s.caption,onClick:o?r:void 0,pswpData:{id:s._id,type:e.CONTENT_TYPES.AD,hash:s._id,width:s.width,height:s.height,title:s.title,description:s.description,targetType:s.targetType,targetText:s.targetText,targetUrl:s.targetUrl,thumbnailUrl:s.imageUrl,blurhash:s.blurhash}})}),e.u("div",{className:"transition-opacity duration-500 group-hover:opacity-100 sm:opacity-0",children:e.u("div",{className:"text-foreground bg-background bg-opacity-75 absolute bottom-0 w-full flex-col items-center justify-between sm:flex sm:flex-row",children:[e.u("h3",{className:"text-foreground line-clamp-2 p-2 text-sm font-medium sm:ml-3 sm:line-clamp-1 sm:p-0",children:s.title}),s?.targetType!==e.AD_TARGET_TYPES.NONE&&e.u(i.Button,{immutable:!0,className:"w-full rounded-t-none py-1 text-nowrap sm:w-auto sm:rounded-t-none sm:rounded-bl-none sm:py-2",onClick:()=>c(s._id,s.targetType,s.targetUrl),icon:e.AD_TARGET_TYPE_ICONS[s?.targetType??e.AD_TARGET_TYPES.LINK],children:s?.targetText})]})})]})},Y=e.R(null),G=()=>{const t=e.x(Y);if(!t)throw new Error("Popover components must be used within a Popover");return t},W=({children:t,className:n,open:i,onOpenChange:s})=>{const[o,r]=e.d(!1),a="boolean"==typeof i,l=a?i:o,c=e.g(),d=`popover-trigger-${c}`,u=`popover-content-${c}`,h=e.A(null);return e.u(Y.Provider,{value:{isOpen:l,setIsOpen:e=>{a||r(e),s?.(e)},triggerId:d,contentId:u,triggerRef:h},children:e.u("div",{"data-slot":"popover",className:e.cn("relative inline-block",n),children:t})})},K=({children:t,asChild:n,className:i,onClick:s,...o})=>{const{isOpen:r,setIsOpen:a,triggerId:l,contentId:c,triggerRef:d}=G();if(e.y(()=>{if(!n)return;const e=document.getElementById(l);return d.current=e,()=>{d.current===e&&(d.current=null)}},[n,l,d]),n){const n=Array.isArray(t)?t[0]:t;if(n&&n.type){const t=n.props?.className;return e.Q(n,{id:l,className:i?t?`${t} ${i}`:i:t,"aria-haspopup":"dialog","aria-expanded":r,"aria-controls":r?c:void 0,onClick:e=>{a(!r),n.props?.onClick?.(e)},"data-state":r?"open":"closed"})}}return e.u("button",{ref:d,id:l,type:"button","aria-haspopup":"dialog","aria-expanded":r,"aria-controls":r?c:void 0,"data-slot":"popover-trigger","data-state":r?"open":"closed",className:i,onClick:e=>{a(!r),s?.(e)},...o,children:t})},Q=({children:n,className:i,align:s="center",side:o="top",sideOffset:r=4,...a})=>{const{isOpen:l,setIsOpen:c,contentId:d,triggerRef:u}=G(),{organization:h}=t.useSession(),p=e.A(null),[m,g]=e.d(null);if(e._(()=>{if(!l)return;const e=()=>{if(!u.current||!p.current)return;const e=u.current.getBoundingClientRect(),t=p.current.getBoundingClientRect();let n=e.left,i=e.bottom+r;"center"===s&&(n=e.left+e.width/2-t.width/2),"end"===s&&(n=e.right-t.width),"top"===o&&(i=e.top-t.height-r),"left"===o&&(n=e.left-t.width-r,i=e.top+e.height/2-t.height/2),"right"===o&&(n=e.right+r,i=e.top+e.height/2-t.height/2),"bottom"===o&&(i=e.bottom+r),g({top:i,left:n})},t=requestAnimationFrame(e);return window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),()=>{cancelAnimationFrame(t),window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0)}},[s,l,o,r,u]),e.y(()=>{if(!l)return;const e=e=>{const t=e.target;p.current&&!p.current.contains(t)&&u.current&&!u.current.contains(t)&&c(!1)},t=e=>{"Escape"===e.key&&(c(!1),u.current?.focus())},n=window.setTimeout(()=>{document.addEventListener("mousedown",e)},0);return document.addEventListener("keydown",t),()=>{window.clearTimeout(n),document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[l,c,u]),!l)return null;const f=e.u("div",{ref:p,id:d,role:"dialog","aria-modal":"false","data-state":l?"open":"closed",className:e.cn("bg-background text-foreground border-border shadow-outer rounded outline-none",i),style:{position:"fixed",top:m?.top??0,left:m?.left??0,zIndex:2010,...e.getStyleObject(h)},...a,children:n});return"undefined"!=typeof document?t.$(f,document.body):f},Z=({eventId:s,contentId:o,emojis:r=[],counts:a={},userReaction:l})=>{const{user:c,props:d,organization:u}=t.useSession(),h=d?.loginUrl,{handleReactionClick:p}=(()=>{const n=e.useQueryClient(),{props:s,user:o}=t.useSession(),r=s?.organizationId;return{handleReactionClick:async(s,a,l)=>{if(!s||!a||!l)return!1;if(!o)return i.y.error("Please login to react"),!1;const c=[e.QUERY_KEYS.CONTENTS_BY_EVENT(s)],d=n.getQueriesData({queryKey:c});n.setQueriesData({queryKey:c},e=>e?.pages&&Array.isArray(e.pages)?{...e,pages:e.pages.map(e=>e.data?{...e,data:e.data.map(e=>{if(e._id===a){const t={...e.reactionCounts};return e.userReaction&&e.userReaction!==l&&(t[e.userReaction]=Math.max(0,(t[e.userReaction]??1)-1)),e.userReaction===l?(t[l]=Math.max(0,(t[l]??1)-1),{...e,reactionCounts:t,userReaction:void 0}):(t[l]=(t[l]??0)+1,{...e,reactionCounts:t,userReaction:l})}return e})}:e)}:e);try{return await t.ky.post(e.API_ROUTES.UPDATE_REACTION,{json:{eventId:s,contentId:a,reaction:l},headers:{"x-org-id":r,Authorization:`Bearer ${o.token}`}}),!0}catch(u){return d.forEach(([e,t])=>{n.setQueryData(e,t)}),i.y.error("Failed to add reaction"),console.error("Error handling reaction click:",u),!1}}}})(),[m,g]=e.d(!1),[f,T]=e.d(!1),w=Object.values(a).reduce((e,t)=>e+t,0);return e.u(W,{open:m,onOpenChange:g,children:[e.u(K,{children:e.u("div",{className:e.cn("bg-background/50 flex items-center gap-1 rounded px-2 py-1 backdrop-blur-sm transition-transform active:scale-90 sm:gap-2 sm:py-0",l&&"ring-primary ring-1"),children:[(r||[]).slice().sort((e,t)=>(a[t]||0)-(a[e]||0)).slice(0,1).map(t=>e.u("span",{className:"text-sm sm:text-lg",children:l||t},`${o}-${t}-1`)),w>0&&e.u("span",{className:"text-xs font-bold sm:text-sm",children:w||0})]})}),e.u(Q,{side:"top",align:"end",children:[c?null:u?.customAuth?e.u("div",{className:"p-2 font-semibold",children:["Please"," ",e.u("a",{className:"text-info underline",href:h,children:"Login"})," ","to react"]}):e.u("div",{className:"p-2 font-semibold",children:["Please"," ",e.u(n.Link,{className:"text-info underline",to:e.PAGE_ROUTES.LOGIN,children:"Login"})," ","to react"]}),c&&e.u("div",{className:"flex gap-1 p-2",children:r.map(t=>{const n=l===t;return e.u("div",{className:"flex flex-col items-center",children:[e.u("span",{className:"text-xs font-medium",children:a[t]||0}),e.u("button",{type:"button",disabled:f,className:e.cn("text-3xl transition-transform disabled:opacity-50",n?"scale-125":"hover:scale-110",f&&"cursor-not-allowed"),onClick:()=>(async e=>{!f&&p&&(T(!0),await p(s,o,e)&&g(!1),T(!1))})(t),children:t})]},`${o}-${t}-2`)})})]})]})},J=({event:t={},content:n,curateLink:s})=>t.engagementStyle===e.ENGAGEMENT_STYLES.CONTEST?e.u("button",{className:"bg-background/75 flex items-center gap-1 rounded px-2 py-1",children:[e.u(i.Iconify,{name:"material-symbols:star-half-rounded",className:"size-4"}),e.u("span",{className:"text-xs font-semibold",children:parseFloat(String(n.score||0)).toFixed(1)})]}):t.engagementStyle===e.ENGAGEMENT_STYLES.REACTION&&t.reactionEmojis?.length?e.u(Z,{eventId:t?._id,contentId:n._id,emojis:t?.reactionEmojis,engagementStyle:t?.engagementStyle,counts:n.reactionCounts||{},userReaction:n.userReaction}):null,X=({content:t})=>e.u("div",{className:"w-full space-y-3 px-3 pb-3",children:[t?.caption&&e.u("span",{className:"hidden w-full py-1 text-xs drop-shadow-[0_1.2px_1.2px_rgba(0,0,0,0.8)] sm:block","data-tooltip-target":"tooltip-default",children:e.u("div",{className:"hover:text-foreground lg:text-md line-clamp-2 text-xs text-white lg:font-medium",title:t?.caption,role:"note",children:t?.caption})}),e.u("div",{className:"flex items-center justify-between",children:e.u("span",{className:"lg:text-md line-clamp-1 text-sm font-medium text-white drop-shadow-[0_1.2px_1.2px_rgba(0,0,0,0.8)]",children:t?.user?.name})})]}),ee=({event:n,content:s,style:o,timestampField:r,curateLink:a,onChangeFaceUrl:l,hideControls:c})=>{const{organization:d}=t.useSession(),u=`content-${s._id}`,h=((e,t)=>{if(!e||!t)return null;const n=t?.[e];if(!n)return null;try{const e=new Date(String(n)),t=new Date,i=e.getFullYear()===t.getFullYear(),s={weekday:"long",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0};return i||(s.year="numeric"),e.toLocaleString("en-US",s).replace(","," •")}catch{return null}})(r,s);return e.u("div",{id:u,style:o,className:"group relative mb-1 overflow-hidden rounded",children:[e.u(j,{url:s.src,alt:s.caption,blurhash:s.blurhash,thumbnailUrl:s.thumbnailUrl,curateLink:a,pswpData:{id:s._id,type:e.CONTENT_TYPES.IMAGE,hash:s._id,width:s.width,height:s.height,thumbnailUrl:s.thumbnailUrl,blurhash:s.blurhash,caption:s.caption,contentSummary:JSON.stringify(s.contentSummary)}}),!c&&e.u(e.k,{children:[h&&e.u("div",{className:"absolute top-2 left-2 max-w-[calc(100%-80px)] truncate rounded bg-black/50 px-2 py-0.5 text-xs text-white backdrop-blur-sm",children:h}),d?.integrationSettings?.showQuickSearch&&(s.faces?.length??0)>0&&e.u("button",{className:"bg-primary absolute top-2 right-2 rounded-full p-1 text-gray-200 opacity-50 transition-all sm:p-1.5 sm:hover:scale-110 sm:hover:opacity-100",onClick:()=>{l?.(s?.url);const e=document.getElementById("media-gallery-container");e&&e.scrollIntoView({behavior:"smooth",block:"start"})},children:e.u(i.Iconify,{color:"a11y",name:"material-symbols:familiar-face-and-zone-outline-rounded"})}),e.u("div",{className:"",children:[e.u("div",{className:"absolute bottom-0 w-full rounded-b",children:e.u(X,{content:s})}),e.u("div",{className:"absolute right-2 bottom-2",children:e.u(J,{event:n,content:s,curateLink:a})})]})]})]})},te=({content:t,style:n,event:i,timestampField:s,curateLink:o,hideControls:r})=>{const a=((e,t)=>{if(!e||!t)return null;const n=t?.[e];if(!n)return null;try{const e=new Date(String(n)),t=new Date,i=e.getFullYear()===t.getFullYear(),s={weekday:"long",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0};return i||(s.year="numeric"),e.toLocaleString("en-US",s).replace(","," •")}catch{return null}})(s,t);return e.u("div",{id:`content-${t._id}`,className:"group relative mb-1 overflow-hidden rounded",style:n,children:[e.u(j,{url:t.src??t.url,thumbnailUrl:t.thumbnailUrl,blurhash:t.blurhash,alt:t.caption,curateLink:o,pswpData:{id:t._id,type:e.CONTENT_TYPES.VIDEO,hash:t._id,width:t.width,height:t.height,thumbnailUrl:t.thumbnailUrl,blurhash:t.blurhash,caption:t.caption}}),!r&&e.u("div",{className:"transition-opacity duration-500",children:[a&&e.u("div",{className:"absolute top-2 left-2 max-w-[calc(100%-80px)] truncate rounded bg-black/50 px-2 py-0.5 text-xs text-white backdrop-blur-sm",children:a}),e.u("div",{className:"absolute bottom-0 w-full rounded-b",children:e.u(X,{content:t})}),e.u("div",{className:"absolute right-2 bottom-2",children:e.u(J,{event:i,content:t,curateLink:o})})]})]})};exports.default=({event:n,contents:s=[],singleColumnMode:o,kioskMode:r,timestampField:a,curateLink:l,onChangeFaceUrl:c})=>{const d=e.A(null),u=e.T(()=>`gallery-${n?._id??""}`,[n]),{captureAdImpression:h,captureAdClick:p}=i.useAnalytics(),{organization:m}=t.useSession(),[g,f]=e.d(null);return e.y(()=>{if(!l){const e=new i.lightbox_default({gallery:`#${u}`,children:"a",counter:!1,bgOpacity:1,wheelToZoom:!0,pinchToClose:!0,zoom:!1,pswpModule:()=>Promise.resolve().then(()=>require("./BD2gDjZu.js"))});d.current=e,new H(e),new M(e),new O(e,h,p),new B(e),new D(e),m?.navigationSettings?.showAIDescription&&new L(e,{width:"400px",height:"40%"}),e.init()}return()=>{d.current?.destroy?.(),d.current=null}},[n?.galleryLayout,l,p,h,u,m]),e.u(e.k,{children:[e.u(e.T(()=>{switch(n?.galleryLayout){case e.GALLERY_LAYOUTS.ROW:return x;case e.GALLERY_LAYOUTS.COLUMN:return S;case e.GALLERY_LAYOUTS.MASONRY:return C;default:return x}},[o,n?.galleryLayout]),{spacing:4,targetRowHeight:o?500:360,columns:e=>o?1:e<400?2:e<800?3:4,photos:s.map(t=>({src:t.type===e.CONTENT_TYPES.IMAGE||t.type===e.CONTENT_TYPES.VIDEO?t.url:t.imageUrl,width:t.dimension?.width,height:t.dimension?.height,...t})),render:{container:({ref:t,className:n,children:i})=>e.u("div",{id:u,ref:t,className:e.cn(n??"",o?"w-full lg:w-1/3":"w-full"),children:i}),photo:(t,{photo:i,width:s,height:o,index:d})=>{const u=i;let h=null;switch(u.type){case e.CONTENT_TYPES.IMAGE:h=ee;break;case e.CONTENT_TYPES.VIDEO:h=te;break;case e.CONTENT_TYPES.AD:h=F;break;default:h=null}return h&&e.u(h,{style:{width:s,height:o},event:n,content:u,timestampField:a,onAdClick:()=>{f(u)},hideControls:r,curateLink:l?`${l}/${u._id}`:null,onChangeFaceUrl:c},`${u._id??d}-${d}`)}}}),e.u(U,{ad:g,onClose:()=>f(null),captureAdClick:p})]})};
|